diff --git a/.hgtags b/.hgtags index 001205086b5..7d7a81f4ffd 100644 --- a/.hgtags +++ b/.hgtags @@ -399,3 +399,25 @@ d7034ff7f8e257e81c9f95c7785dd4eaaa3c2afc jdk-9+153 8c70d170e62c0c58b5bc3ba666bd140399b98c9c jdk-10+0 45b751afd11e6c05991cf4913c5a0ac3304fcc4e jdk-9+154 f4aff695ffe05cfdb69d8af25a4ddc6a029754ea jdk-9+155 +06bce0388880b5ff8e040e4a9d72a3ea11dac321 jdk-9+156 +fa3e76b477829afc4476f0b725cfaa440a6fd917 jdk-9+157 +b5015f742ba648184bb7fc547197bd33ebfde30d jdk-9+158 +fd1497902bbe3aa24b21f270ecdcb8de5f7aa9ac jdk-9+159 +6aa8be0c4e054fe8b3ab016ae00d16d680f92145 jdk-9+160 +f6883b1a5a6478437cd4181c4bd45328ab24feaf jdk-9+161 +d16aebbb56d37f12e0c0b0a4fb427db65e1fb1a8 jdk-9+162 +18c41483a082e097ac2f5f983c1226ed94aa4215 jdk-9+163 +32db52c675e7d5bc413605d2e89b68b608b19be0 jdk-9+164 +3965b747cfe1e6cbd66b8739da5a1ea6ec6985e9 jdk-9+165 +d3e973f1809606c67412361041ad197e50fe8cec jdk-9+166 +8fd0a4569191f33c98ee90c2709174a342fefb0d jdk-9+167 +fcabc74bd44e56c7419d111d59b95669ecb33c55 jdk-9+168 +c7efde2b60fc1ec04630be769d9ad60efb39c39c jdk-9+169 +898cbe31fbdae2d25d141384fac746cc244a730c jdk-9+170 +643b5f18c2656fe91b69fea85b07b98d5fad394d jdk-9+171 +dad6746278facbbea57dd462cb56fb743dc0a5f0 jdk-9+172 +6dd7fda42bab7ecf648cafb0a4e9b4ca11b3094f jdk-9+173 +94680c6d60ecd9ed3ffd1847706efde7eb947afc jdk-9+174 +994036e74ab805bcc09afa0646be17a725bec42f jdk-9+175 +43bf6f30fcba031ecf0cc7e511efe3a8179d0f77 jdk-9+176 +d9f6bc6ba599d0487dc18b2fbdb6c34eedf6f958 jdk-9+177 diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 3d81f131af0..2cec32fee92 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -398,3 +398,25 @@ ef056360ddf3977d7d2ddbeb456a4d612d19ea05 jdk-9+152 816a6d03a7c44edfbd8780110529f1bdc3964fb9 jdk-9+153 8d26916eaa21b689835ffc1c0dbf12470aa9be61 jdk-9+154 688a3863c00ebc089ab17ee1fc46272cbbd96815 jdk-9+155 +783ec7542cf7154e5d2b87f55bb97d28f81e9ada jdk-9+156 +4eb77fb98952dc477a4229575c81d2263a9ce711 jdk-9+157 +a4087bc10a88a43ea3ad0919b5b4af1c86977221 jdk-9+158 +fe8466adaef8178dba94be53c789a0aaa87d13bb jdk-9+159 +4d29ee32d926ebc960072d51a3bc558f95c1cbad jdk-9+160 +cda60babd152d889aba4d8f20a8f643ab151d3de jdk-9+161 +21b063d75b3edbffb9bebc8872d990920c4ae1e5 jdk-9+162 +c38c6b270ccc8e2b86d1631bcf42248241b54d2c jdk-9+163 +7810f75d016a52e32295c4233009de5ca90e31af jdk-9+164 +aff4f339acd40942d3dab499846b52acd87b3af1 jdk-9+165 +ba5b16c9c6d80632b61959a33d424b1c3398ce62 jdk-9+166 +35017c286513ddcbcc6b63b99679c604993fc639 jdk-9+167 +143d4c87bc1ef1ed6dadd613cd9dd4488fdefc29 jdk-9+168 +b25838a28195f4b6dab34668411eedd2d366a16c jdk-9+169 +4d163ec59d989a9261ed7f848bc6303f90869af5 jdk-9+170 +4c12464a907db4656c1033f56fa49cba643ac629 jdk-9+171 +2c25fc24103251f9711a1c280c31e1e41016d90f jdk-9+172 +88d7fd969e7df0e07a53b201cfd29393ca33ede9 jdk-9+173 +5466f409346e0446ee9a6daeb7f5d75c8fc76823 jdk-9+174 +8f7227c6012b0051ea4e0bcee040c627bf699b88 jdk-9+175 +84777531d994ef70163d35078ec9c4127f2eadb5 jdk-9+176 +a4371edb589c60db01142e45c317adb9ccbcb083 jdk-9+177 diff --git a/README b/README index 477b38887fc..537dea30aec 100644 --- a/README +++ b/README @@ -1,40 +1,10 @@ -README: - This file should be located at the top of the OpenJDK Mercurial root - repository. A full OpenJDK repository set (forest) should also include - the following 7 nested repositories: - "jdk", "hotspot", "langtools", "nashorn", "corba", "jaxws" and "jaxp". +Welcome to OpenJDK! +=================== - The root repository can be obtained with something like: - hg clone http://hg.openjdk.java.net/jdk9/jdk9 openjdk9 +For information about building OpenJDK, including how to fully retrieve all +source code, please see either of these: - You can run the get_source.sh script located in the root repository to get - the other needed repositories: - cd openjdk9 && sh ./get_source.sh + * common/doc/building.html (html version) + * common/doc/building.md (markdown version) - People unfamiliar with Mercurial should read the first few chapters of - the Mercurial book: http://hgbook.red-bean.com/read/ - - See http://openjdk.java.net/ for more information about OpenJDK. - -Simple Build Instructions: - - 0. Get the necessary system software/packages installed on your system, see - http://hg.openjdk.java.net/jdk9/jdk9/raw-file/tip/README-builds.html - - 1. If you don't have a jdk8 or newer jdk, download and install it from - http://java.sun.com/javase/downloads/index.jsp - Add the /bin directory of this installation to your PATH environment - variable. - - 2. Configure the build: - bash ./configure - - 3. Build the OpenJDK: - make all - The resulting JDK image should be found in build/*/images/jdk - -where make is GNU make 3.81 or newer, /usr/bin/make on Linux usually -is 3.81 or newer. Note that on Solaris, GNU make is called "gmake". - -Complete details are available in the file: - http://hg.openjdk.java.net/jdk9/jdk9/raw-file/tip/README-builds.html +See http://openjdk.java.net/ for more information about OpenJDK. diff --git a/README-builds.html b/README-builds.html deleted file mode 100644 index 6d7d5b52461..00000000000 --- a/README-builds.html +++ /dev/null @@ -1,1406 +0,0 @@ - - - OpenJDK Build README - - -

OpenJDK

- -

OpenJDK Build README

- -
- -

- -

Introduction

- -

This README file contains build instructions for the -OpenJDK. Building the source code for the OpenJDK -requires a certain degree of technical expertise.

- -

!!!!!!!!!!!!!!! THIS IS A MAJOR RE-WRITE of this document. !!!!!!!!!!!!!

- -

Some Headlines:

- - - -
- -

Contents

- - - -
- - - -
- -

- -

Use of Mercurial

- -

The OpenJDK sources are maintained with the revision control system -Mercurial. If you are new to -Mercurial, please see the Beginner Guides or refer to the Mercurial Book. -The first few chapters of the book provide an excellent overview of Mercurial, -what it is and how it works.

- -

For using Mercurial with the OpenJDK refer to the Developer Guide: Installing -and Configuring Mercurial section for more information.

- -

- -

Getting the Source

- -

To get the entire set of OpenJDK Mercurial repositories use the script -get_source.sh located in the root repository:

- -
  hg clone http://hg.openjdk.java.net/jdk9/jdk9 YourOpenJDK
-  cd YourOpenJDK
-  bash ./get_source.sh
-
- -

Once you have all the repositories, keep in mind that each repository is its -own independent repository. You can also re-run ./get_source.sh anytime to -pull over all the latest changesets in all the repositories. This set of -nested repositories has been given the term "forest" and there are various -ways to apply the same hg command to each of the repositories. For -example, the script make/scripts/hgforest.sh can be used to repeat the -same hg command on every repository, e.g.

- -
  cd YourOpenJDK
-  bash ./make/scripts/hgforest.sh status
-
- -

- -

Repositories

- -

The set of repositories and what they contain:

- - - -

Repository Source Guidelines

- -

There are some very basic guidelines:

- - - -
- -

- -

Building

- -

The very first step in building the OpenJDK is making sure the system itself -has everything it needs to do OpenJDK builds. Once a system is setup, it -generally doesn't need to be done again.

- -

Building the OpenJDK is now done with running a configure script which will -try and find and verify you have everything you need, followed by running -make, e.g.

- -
-

bash ./configure
- make all

-
- -

Where possible the configure script will attempt to located the various -components in the default locations or via component specific variable -settings. When the normal defaults fail or components cannot be found, -additional configure options may be necessary to help configure find the -necessary tools for the build, or you may need to re-visit the setup of your -system due to missing software packages.

- -

NOTE: The configure script file does not have execute permissions and -will need to be explicitly run with bash, see the source guidelines.

- -
- -

- -

System Setup

- -

Before even attempting to use a system to build the OpenJDK there are some very -basic system setups needed. For all systems:

- - - -

And for specific systems:

- - - -

- -

Linux

- -

With Linux, try and favor the system packages over building your own or getting -packages from other areas. Most Linux builds should be possible with the -system's available packages.

- -

Note that some Linux systems have a habit of pre-populating your environment -variables for you, for example JAVA_HOME might get pre-defined for you to -refer to the JDK installed on your Linux system. You will need to unset -JAVA_HOME. It's a good idea to run env and verify the environment variables -you are getting from the default system settings make sense for building the -OpenJDK.

- -

- -

Solaris

- -

- -
Studio Compilers
- -

At a minimum, the Studio 12 Update 4 Compilers (containing -version 5.13 of the C and C++ compilers) is required, including specific -patches.

- -

The Solaris Studio installation should contain at least these packages:

- -
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PackageVersion
developer/solarisstudio-124/backend12.4-1.0.6.0
developer/solarisstudio-124/c++12.4-1.0.10.0
developer/solarisstudio-124/cc12.4-1.0.4.0
developer/solarisstudio-124/library/c++-libs12.4-1.0.10.0
developer/solarisstudio-124/library/math-libs12.4-1.0.0.1
developer/solarisstudio-124/library/studio-gccrt12.4-1.0.0.1
developer/solarisstudio-124/studio-common12.4-1.0.0.1
developer/solarisstudio-124/studio-ja12.4-1.0.0.1
developer/solarisstudio-124/studio-legal12.4-1.0.0.1
developer/solarisstudio-124/studio-zhCN12.4-1.0.0.1

-
- -

In particular backend 12.4-1.0.6.0 contains a critical patch for the sparc -version.

- -

Place the bin directory in PATH.

- -

The Oracle Solaris Studio Express compilers at: Oracle Solaris Studio Express -Download site are also an option, although these compilers -have not been extensively used yet.

- -

- -

Windows

- -
Windows Unix Toolkit
- -

Building on Windows requires a Unix-like environment, notably a Unix-like -shell. There are several such environments available of which -Cygwin and -MinGW/MSYS are currently supported for the -OpenJDK build. One of the differences of these systems from standard Windows -tools is the way they handle Windows path names, particularly path names which -contain spaces, backslashes as path separators and possibly drive letters. -Depending on the use case and the specifics of each environment these path -problems can be solved by a combination of quoting whole paths, translating -backslashes to forward slashes, escaping backslashes with additional -backslashes and translating the path names to their "8.3" -version.

- -

- -
CYGWIN
- -

CYGWIN is an open source, Linux-like environment which tries to emulate a -complete POSIX layer on Windows. It tries to be smart about path names and can -usually handle all kinds of paths if they are correctly quoted or escaped -although internally it maps drive letters <drive>: to a virtual directory -/cygdrive/<drive>.

- -

You can always use the cygpath utility to map pathnames with spaces or the -backslash character into the C:/ style of pathname (called 'mixed'), e.g. -cygpath -s -m "<path>".

- -

Note that the use of CYGWIN creates a unique problem with regards to setting -PATH. Normally on Windows the PATH variable contains directories -separated with the ";" character (Solaris and Linux use ":"). With CYGWIN, it -uses ":", but that means that paths like "C:/path" cannot be placed in the -CYGWIN version of PATH and instead CYGWIN uses something like -/cygdrive/c/path which CYGWIN understands, but only CYGWIN understands.

- -

The OpenJDK build requires CYGWIN version 1.7.16 or newer. Information about -CYGWIN can be obtained from the CYGWIN website at -www.cygwin.com.

- -

By default CYGWIN doesn't install all the tools required for building the -OpenJDK. Along with the default installation, you need to install the following -tools.

- -
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Binary NameCategoryPackageDescription
ar.exeDevelbinutilsThe GNU assembler, linker and binary utilities
make.exeDevelmakeThe GNU version of the 'make' utility built for CYGWIN
m4.exeInterpretersm4GNU implementation of the traditional Unix macro processor
cpio.exeUtilscpioA program to manage archives of files
gawk.exeUtilsawkPattern-directed scanning and processing language
file.exeUtilsfileDetermines file type using 'magic' numbers
zip.exeArchivezipPackage and compress (archive) files
unzip.exeArchiveunzipExtract compressed files in a ZIP archive
free.exeSystemprocpsDisplay amount of free and used memory in the system

-
- -

Note that the CYGWIN software can conflict with other non-CYGWIN software on -your Windows system. CYGWIN provides a FAQ for known issues and problems, of particular interest is the -section on BLODA (applications that interfere with -CYGWIN).

- -

- -
MinGW/MSYS
- -

MinGW ("Minimalist GNU for Windows") is a collection of free Windows specific -header files and import libraries combined with GNU toolsets that allow one to -produce native Windows programs that do not rely on any 3rd-party C runtime -DLLs. MSYS is a supplement to MinGW which allows building applications and -programs which rely on traditional UNIX tools to be present. Among others this -includes tools like bash and make. See MinGW/MSYS for more information.

- -

Like Cygwin, MinGW/MSYS can handle different types of path formats. They are -internally converted to paths with forward slashes and drive letters -<drive>: replaced by a virtual directory /<drive>. Additionally, MSYS -automatically detects binaries compiled for the MSYS environment and feeds them -with the internal, Unix-style path names. If native Windows applications are -called from within MSYS programs their path arguments are automatically -converted back to Windows style path names with drive letters and backslashes -as path separators. This may cause problems for Windows applications which use -forward slashes as parameter separator (e.g. cl /nologo /I) because MSYS may -wrongly replace such parameters by drive letters.

- -

In addition to the tools which will be installed by default, you have to -manually install the msys-zip and msys-unzip packages. This can be easily -done with the MinGW command line installer:

- -
  mingw-get.exe install msys-zip
-  mingw-get.exe install msys-unzip
-
- -

- -
Visual Studio 2013 Compilers
- -

The 32-bit and 64-bit OpenJDK Windows build requires Microsoft Visual Studio -C++ 2013 (VS2013) Professional Edition or Express compiler. The compiler and -other tools are expected to reside in the location defined by the variable -VS120COMNTOOLS which is set by the Microsoft Visual Studio installer.

- -

Only the C++ part of VS2013 is needed. Try to let the installation go to the -default install directory. Always reboot your system after installing VS2013. -The system environment variable VS120COMNTOOLS should be set in your -environment.

- -

Make sure that TMP and TEMP are also set in the environment and refer to -Windows paths that exist, like C:\temp, not /tmp, not /cygdrive/c/temp, -and not C:/temp. C:\temp is just an example, it is assumed that this area -is private to the user, so by default after installs you should see a unique -user path in these variables.

- -

- -

Mac OS X

- -

Make sure you get the right XCode version.

- -
- -

- -

Configure

- -

The basic invocation of the configure script looks like:

- -
-

bash ./configure [options]

-
- -

This will create an output directory containing the "configuration" and setup -an area for the build result. This directory typically looks like:

- -
-

build/linux-x64-normal-server-release

-
- -

configure will try to figure out what system you are running on and where all -necessary build components are. If you have all prerequisites for building -installed, it should find everything. If it fails to detect any component -automatically, it will exit and inform you about the problem. When this -happens, read more below in the configure options.

- -

Some examples:

- -
-

Windows 32bit build with freetype specified:
- bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target- -bits=32

- -

Debug 64bit Build:
- bash ./configure --enable-debug --with-target-bits=64

-
- -

- -

Configure Options

- -

Complete details on all the OpenJDK configure options can be seen with:

- -
-

bash ./configure --help=short

-
- -

Use -help to see all the configure options available. You can generate any -number of different configurations, e.g. debug, release, 32, 64, etc.

- -

Some of the more commonly used configure options are:

- -
-

--enable-debug
- set the debug level to fastdebug (this is a shorthand for --with-debug- - level=fastdebug)

-
- -

- -
-

--with-alsa=path
- select the location of the Advanced Linux Sound Architecture (ALSA)

- -

Version 0.9.1 or newer of the ALSA files are required for building the - OpenJDK on Linux. These Linux files are usually available from an "alsa" of - "libasound" development package, and it's highly recommended that you try - and use the package provided by the particular version of Linux that you are - using.

- -

--with-boot-jdk=path
- select the Bootstrap JDK

- -

--with-boot-jdk-jvmargs="args"
- provide the JVM options to be used to run the Bootstrap JDK

- -

--with-cacerts=path
- select the path to the cacerts file.

- -

See Certificate Authority on Wikipedia for a better understanding of the Certificate - Authority (CA). A certificates file named "cacerts" represents a system-wide - keystore with CA certificates. In JDK and JRE binary bundles, the "cacerts" - file contains root CA certificates from several public CAs (e.g., VeriSign, - Thawte, and Baltimore). The source contain a cacerts file without CA root - certificates. Formal JDK builders will need to secure permission from each - public CA and include the certificates into their own custom cacerts file. - Failure to provide a populated cacerts file will result in verification - errors of a certificate chain during runtime. By default an empty cacerts - file is provided and that should be fine for most JDK developers.

-
- -

- -
-

--with-cups=path
- select the CUPS install location

- -

The Common UNIX Printing System (CUPS) Headers are required for building the - OpenJDK on Solaris and Linux. The Solaris header files can be obtained by - installing the package print/cups.

- -

The CUPS header files can always be downloaded from - www.cups.org.

- -

--with-cups-include=path
- select the CUPS include directory location

- -

--with-debug-level=level
- select the debug information level of release, fastdebug, or slowdebug

- -

--with-dev-kit=path
- select location of the compiler install or developer install location

-
- -

- -
-

--with-freetype=path
- select the freetype files to use.

- -

Expecting the freetype libraries under lib/ and the headers under - include/.

- -

Version 2.3 or newer of FreeType is required. On Unix systems required files - can be available as part of your distribution (while you still may need to - upgrade them). Note that you need development version of package that - includes both the FreeType library and header files.

- -

You can always download latest FreeType version from the FreeType - website. Building the freetype 2 libraries from - scratch is also possible, however on Windows refer to the Windows FreeType - DLL build instructions.

- -

Note that by default FreeType is built with byte code hinting support - disabled due to licensing restrictions. In this case, text appearance and - metrics are expected to differ from Sun's official JDK build. See the - SourceForge FreeType2 Home Page - for more information.

- -

--with-import-hotspot=path
- select the location to find hotspot binaries from a previous build to avoid - building hotspot

- -

--with-target-bits=arg
- select 32 or 64 bit build

- -

--with-jvm-variants=variants
- select the JVM variants to build from, comma separated list that can - include: server, client, kernel, zero and zeroshark

- -

--with-memory-size=size
- select the RAM size that GNU make will think this system has

- -

--with-msvcr-dll=path
- select the msvcr100.dll file to include in the Windows builds (C/C++ - runtime library for Visual Studio).

- -

This is usually picked up automatically from the redist directories of - Visual Studio 2013.

- -

--with-num-cores=cores
- select the number of cores to use (processor count or CPU count)

-
- -

- -
-

--with-x=path
- select the location of the X11 and xrender files.

- -

The XRender Extension Headers are required for building the OpenJDK on - Solaris and Linux. The Linux header files are usually available from a - "Xrender" development package, it's recommended that you try and use the - package provided by the particular distribution of Linux that you are using. - The Solaris XRender header files is included with the other X11 header files - in the package SFWxwinc on new enough versions of Solaris and will be - installed in /usr/X11/include/X11/extensions/Xrender.h or - /usr/openwin/share/include/X11/extensions/Xrender.h

-
- -
- -

- -

Make

- -

The basic invocation of the make utility looks like:

- -
-

make all

-
- -

This will start the build to the output directory containing the -"configuration" that was created by the configure script. Run make help for -more information on the available targets.

- -

There are some of the make targets that are of general interest:

- -
-

empty
- build everything but no images

- -

all
- build everything including images

- -

all-conf
- build all configurations

- -

images
- create complete j2sdk and j2re images

- -

install
- install the generated images locally, typically in /usr/local

- -

clean
- remove all files generated by make, but not those generated by configure

- -

dist-clean
- remove all files generated by both and configure (basically killing the - configuration)

- -

help
- give some help on using make, including some interesting make targets

-
- -
- -

- -

Testing

- -

When the build is completed, you should see the generated binaries and -associated files in the j2sdk-image directory in the output directory. In -particular, the build/*/images/j2sdk-image/bin directory should contain -executables for the OpenJDK tools and utilities for that configuration. The -testing tool jtreg will be needed and can be found at: the jtreg -site. The provided regression tests in the -repositories can be run with the command:

- -
-

cd test && make PRODUCT_HOME=`pwd`/../build/*/images/j2sdk-image all

-
- -
- -

- -

Appendix A: Hints and Tips

- -

- -

FAQ

- -

Q: The generated-configure.sh file looks horrible! How are you going to -edit it?
-A: The generated-configure.sh file is generated (think "compiled") by the -autoconf tools. The source code is in configure.ac and various .m4 files in -common/autoconf, which are much more readable.

- -

Q: Why is the generated-configure.sh file checked in, if it is -generated?
-A: If it was not generated, every user would need to have the autoconf -tools installed, and re-generate the configure file as the first step. Our -goal is to minimize the work needed to be done by the user to start building -OpenJDK, and to minimize the number of external dependencies required.

- -

Q: Do you require a specific version of autoconf for regenerating -generated-configure.sh?
-A: Yes, version 2.69 is required and should be easy enough to aquire on all -supported operating systems. The reason for this is to avoid large spurious -changes in generated-configure.sh.

- -

Q: How do you regenerate generated-configure.sh after making changes to -the input files?
-A: Regnerating generated-configure.sh should always be done using the -script common/autoconf/autogen.sh to ensure that the correct files get -updated. This script should also be run after mercurial tries to merge -generated-configure.sh as a merge of the generated file is not guaranteed to -be correct.

- -

Q: What are the files in common/makefiles/support/* for? They look like -gibberish.
-A: They are a somewhat ugly hack to compensate for command line length -limitations on certain platforms (Windows, Solaris). Due to a combination of -limitations in make and the shell, command lines containing too many files will -not work properly. These helper files are part of an elaborate hack that will -compress the command line in the makefile and then uncompress it safely. We're -not proud of it, but it does fix the problem. If you have any better -suggestions, we're all ears! :-)

- -

Q: I want to see the output of the commands that make runs, like in the old -build. How do I do that?
-A: You specify the LOG variable to make. There are several log levels:

- - - -

Q: When do I have to re-run configure?
-A: Normally you will run configure only once for creating a -configuration. You need to re-run configuration only if you want to change any -configuration options, or if you pull down changes to the configure script.

- -

Q: I have added a new source file. Do I need to modify the makefiles?
-A: Normally, no. If you want to create e.g. a new native library, you will -need to modify the makefiles. But for normal file additions or removals, no -changes are needed. There are certan exceptions for some native libraries where -the source files are spread over many directories which also contain sources -for other libraries. In these cases it was simply easier to create include -lists rather than excludes.

- -

Q: When I run configure --help, I see many strange options, like ---dvidir. What is this?
-A: Configure provides a slew of options by default, to all projects that -use autoconf. Most of them are not used in OpenJDK, so you can safely ignore -them. To list only OpenJDK specific features, use configure --help=short -instead.

- -

Q: configure provides OpenJDK-specific features such as --with- -builddeps-server that are not described in this document. What about those?
-A: Try them out if you like! But be aware that most of these are -experimental features. Many of them don't do anything at all at the moment; the -option is just a placeholder. Others depend on pieces of code or infrastructure -that is currently not ready for prime time.

- -

Q: How will you make sure you don't break anything?
-A: We have a script that compares the result of the new build system with -the result of the old. For most part, we aim for (and achieve) byte-by-byte -identical output. There are however technical issues with e.g. native binaries, -which might differ in a byte-by-byte comparison, even when building twice with -the old build system. For these, we compare relevant aspects (e.g. the symbol -table and file size). Note that we still don't have 100% equivalence, but we're -close.

- -

Q: I noticed this thing X in the build that looks very broken by design. -Why don't you fix it?
-A: Our goal is to produce a build output that is as close as technically -possible to the old build output. If things were weird in the old build, they -will be weird in the new build. Often, things were weird before due to -obscurity, but in the new build system the weird stuff comes up to the surface. -The plan is to attack these things at a later stage, after the new build system -is established.

- -

Q: The code in the new build system is not that well-structured. Will you -fix this?
-A: Yes! The new build system has grown bit by bit as we converted the old -system. When all of the old build system is converted, we can take a step back -and clean up the structure of the new build system. Some of this we plan to do -before replacing the old build system and some will need to wait until after.

- -

Q: Is anything able to use the results of the new build's default make -target?
-A: Yes, this is the minimal (or roughly minimal) set of compiled output -needed for a developer to actually execute the newly built JDK. The idea is -that in an incremental development fashion, when doing a normal make, you -should only spend time recompiling what's changed (making it purely -incremental) and only do the work that's needed to actually run and test your -code. The packaging stuff that is part of the images target is not needed for -a normal developer who wants to test his new code. Even if it's quite fast, -it's still unnecessary. We're targeting sub-second incremental rebuilds! ;-) -(Or, well, at least single-digit seconds...)

- -

Q: I usually set a specific environment variable when building, but I can't -find the equivalent in the new build. What should I do?
-A: It might very well be that we have neglected to add support for an -option that was actually used from outside the build system. Email us and we -will add support for it!

- -

- -

Build Performance Tips

- -

Building OpenJDK requires a lot of horsepower. Some of the build tools can be -adjusted to utilize more or less of resources such as parallel threads and -memory. The configure script analyzes your system and selects reasonable -values for such options based on your hardware. If you encounter resource -problems, such as out of memory conditions, you can modify the detected values -with:

- - - -

It might also be necessary to specify the JVM arguments passed to the Bootstrap -JDK, using e.g. --with-boot-jdk-jvmargs="-Xmx8G -enableassertions". Doing -this will override the default JVM arguments passed to the Bootstrap JDK.

- -

One of the top goals of the new build system is to improve the build -performance and decrease the time needed to build. This will soon also apply to -the java compilation when the Smart Javac wrapper is fully supported.

- -

At the end of a successful execution of configure, you will get a performance -summary, indicating how well the build will perform. Here you will also get -performance hints. If you want to build fast, pay attention to those!

- -

Building with ccache

- -

The OpenJDK build supports building with ccache when using gcc or clang. Using -ccache can radically speed up compilation of native code if you often rebuild -the same sources. Your milage may vary however so we recommend evaluating it -for yourself. To enable it, make sure it's on the path and configure with ---enable-ccache.

- -

Building on local disk

- -

If you are using network shares, e.g. via NFS, for your source code, make sure -the build directory is situated on local disk. The performance penalty is -extremely high for building on a network share, close to unusable.

- -

Building only one JVM

- -

The old build builds multiple JVMs on 32-bit systems (client and server; and on -Windows kernel as well). In the new build we have changed this default to only -build server when it's available. This improves build times for those not -interested in multiple JVMs. To mimic the old behavior on platforms that -support it, use --with-jvm-variants=client,server.

- -

Selecting the number of cores to build on

- -

By default, configure will analyze your machine and run the make process in -parallel with as many threads as you have cores. This behavior can be -overridden, either "permanently" (on a configure basis) using ---with-num-cores=N or for a single build only (on a make basis), using -make JOBS=N.

- -

If you want to make a slower build just this time, to save some CPU power for -other processes, you can run e.g. make JOBS=2. This will force the makefiles -to only run 2 parallel processes, or even make JOBS=1 which will disable -parallelism.

- -

If you want to have it the other way round, namely having slow builds default -and override with fast if you're impatient, you should call configure with ---with-num-cores=2, making 2 the default. If you want to run with more cores, -run make JOBS=8

- -

- -

Troubleshooting

- -

Solving build problems

- -

If the build fails (and it's not due to a compilation error in a source file -you've changed), the first thing you should do is to re-run the build with more -verbosity. Do this by adding LOG=debug to your make command line.

- -

The build log (with both stdout and stderr intermingled, basically the same as -you see on your console) can be found as build.log in your build directory.

- -

You can ask for help on build problems with the new build system on either the -build-dev or the -build-infra-dev -mailing lists. Please include the relevant parts of the build log.

- -

A build can fail for any number of reasons. Most failures are a result of -trying to build in an environment in which all the pre-build requirements have -not been met. The first step in troubleshooting a build failure is to recheck -that you have satisfied all the pre-build requirements for your platform. -Scanning the configure log is a good first step, making sure that what it -found makes sense for your system. Look for strange error messages or any -difficulties that configure had in finding things.

- -

Some of the more common problems with builds are briefly described below, with -suggestions for remedies.

- - - -
- -

- -

Appendix B: GNU make

- -

The Makefiles in the OpenJDK are only valid when used with the GNU version of -the utility command make (usually called gmake on Solaris). A few notes -about using GNU make:

- - - -

Information on GNU make, and access to ftp download sites, are available on the -GNU make web site . The latest -source to GNU make is available at -ftp.gnu.org/pub/gnu/make/.

- -

- -

Building GNU make

- -

First step is to get the GNU make 3.81 or newer source from -ftp.gnu.org/pub/gnu/make/. Building is a -little different depending on the OS but is basically done with:

- -
  bash ./configure
-  make
-
- -
- -

- -

Appendix C: Build Environments

- -

Minimum Build Environments

- -

This file often describes specific requirements for what we call the "minimum -build environments" (MBE) for this specific release of the JDK. What is listed -below is what the Oracle Release Engineering Team will use to build the Oracle -JDK product. Building with the MBE will hopefully generate the most compatible -bits that install on, and run correctly on, the most variations of the same -base OS and hardware architecture. In some cases, these represent what is often -called the least common denominator, but each Operating System has different -aspects to it.

- -

In all cases, the Bootstrap JDK version minimum is critical, we cannot -guarantee builds will work with older Bootstrap JDK's. Also in all cases, more -RAM and more processors is better, the minimums listed below are simply -recommendations.

- -

With Solaris and Mac OS X, the version listed below is the oldest release we -can guarantee builds and works, and the specific version of the compilers used -could be critical.

- -

With Windows the critical aspect is the Visual Studio compiler used, which due -to it's runtime, generally dictates what Windows systems can do the builds and -where the resulting bits can be used.

- -

NOTE: We expect a change here off these older Windows OS releases and to a -'less older' one, probably Windows 2008R2 X64.

- -

With Linux, it was just a matter of picking a stable distribution that is a -good representative for Linux in general.

- -

It is understood that most developers will NOT be using these specific -versions, and in fact creating these specific versions may be difficult due to -the age of some of this software. It is expected that developers are more often -using the more recent releases and distributions of these operating systems.

- -

Compilation problems with newer or different C/C++ compilers is a common -problem. Similarly, compilation problems related to changes to the -/usr/include or system header files is also a common problem with older, -newer, or unreleased OS versions. Please report these types of problems as bugs -so that they can be dealt with accordingly.

- -
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Base OS and ArchitectureOSC/C++ CompilerBootstrap JDKProcessorsRAM MinimumDISK Needs
Linux X86 (32-bit) and X64 (64-bit)Oracle Enterprise Linux 6.4gcc 4.9.2 JDK 82 or more1 GB6 GB
Solaris SPARCV9 (64-bit)Solaris 11 Update 1Studio 12 Update 4 + patchesJDK 84 or more4 GB8 GB
Solaris X64 (64-bit)Solaris 11 Update 1Studio 12 Update 4 + patchesJDK 84 or more4 GB8 GB
Windows X86 (32-bit)Windows Server 2012 R2 x64Microsoft Visual Studio C++ 2013 Professional EditionJDK 82 or more2 GB6 GB
Windows X64 (64-bit)Windows Server 2012 R2 x64Microsoft Visual Studio C++ 2013 Professional EditionJDK 82 or more2 GB6 GB
Mac OS X X64 (64-bit)Mac OS X 10.9 "Mavericks"Xcode 6.3 or newerJDK 82 or more4 GB6 GB

-
- -
- -

- -

Specific Developer Build Environments

- -

We won't be listing all the possible environments, but we will try to provide -what information we have available to us.

- -

NOTE: The community can help out by updating this part of the document.

- -

Fedora

- -

After installing the latest Fedora you need to -install several build dependencies. The simplest way to do it is to execute the -following commands as user root:

- -
  yum-builddep java-1.7.0-openjdk
-  yum install gcc gcc-c++
-
- -

In addition, it's necessary to set a few environment variables for the build:

- -
  export LANG=C
-  export PATH="/usr/lib/jvm/java-openjdk/bin:${PATH}"
-
- -

CentOS 5.5

- -

After installing CentOS 5.5 you need to make sure you -have the following Development bundles installed:

- - - -

Plus the following packages:

- - - -

The freetype 2.3 packages don't seem to be available, but the freetype 2.3 -sources can be downloaded, built, and installed easily enough from the -freetype site. Build and install -with something like:

- -
  bash ./configure
-  make
-  sudo -u root make install
-
- -

Mercurial packages could not be found easily, but a Google search should find -ones, and they usually include Python if it's needed.

- -

Debian 5.0 (Lenny)

- -

After installing Debian 5 you need to install several -build dependencies. The simplest way to install the build dependencies is to -execute the following commands as user root:

- -
  aptitude build-dep openjdk-7
-  aptitude install openjdk-7-jdk libmotif-dev
-
- -

In addition, it's necessary to set a few environment variables for the build:

- -
  export LANG=C
-  export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"
-
- -

Ubuntu 12.04

- -

After installing Ubuntu 12.04 you need to install several -build dependencies. The simplest way to do it is to execute the following -commands:

- -
  sudo aptitude build-dep openjdk-7
-  sudo aptitude install openjdk-7-jdk
-
- -

In addition, it's necessary to set a few environment variables for the build:

- -
  export LANG=C
-  export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"
-
- -

OpenSUSE 11.1

- -

After installing OpenSUSE 11.1 you need to install -several build dependencies. The simplest way to install the build dependencies -is to execute the following commands:

- -
  sudo zypper source-install -d java-1_7_0-openjdk
-  sudo zypper install make
-
- -

In addition, it is necessary to set a few environment variables for the build:

- -
  export LANG=C
-  export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:$[PATH}"
-
- -

Finally, you need to unset the JAVA_HOME environment variable:

- -
  export -n JAVA_HOME`
-
- -

Mandriva Linux One 2009 Spring

- -

After installing Mandriva Linux One 2009 Spring you need -to install several build dependencies. The simplest way to install the build -dependencies is to execute the following commands as user root:

- -
  urpmi java-1.7.0-openjdk-devel make gcc gcc-c++ freetype-devel zip unzip
-    libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel
-    libxtst6-devel libxi-devel
-
- -

In addition, it is necessary to set a few environment variables for the build:

- -
  export LANG=C
-  export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:${PATH}"
-
- -

OpenSolaris 2009.06

- -

After installing OpenSolaris 2009.06 you need to -install several build dependencies. The simplest way to install the build -dependencies is to execute the following commands:

- -
  pfexec pkg install SUNWgmake SUNWj7dev sunstudioexpress SUNWcups SUNWzip
-    SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2
-
- -

In addition, it is necessary to set a few environment variables for the build:

- -
  export LANG=C
-  export PATH="/opt/SunStudioExpress/bin:${PATH}"
-
- -
- -

End of the OpenJDK build README document.

- -

Please come again!

- - diff --git a/README-builds.md b/README-builds.md deleted file mode 100644 index c6907cd7ab2..00000000000 --- a/README-builds.md +++ /dev/null @@ -1,1285 +0,0 @@ -![OpenJDK](http://openjdk.java.net/images/openjdk.png) -# OpenJDK Build README - -***** - - -## Introduction - -This README file contains build instructions for the -[OpenJDK](http://openjdk.java.net). Building the source code for the OpenJDK -requires a certain degree of technical expertise. - -### !!!!!!!!!!!!!!! THIS IS A MAJOR RE-WRITE of this document. !!!!!!!!!!!!! - -Some Headlines: - - * The build is now a "`configure && make`" style build - * Any GNU make 3.81 or newer should work, except on Windows where 4.0 or newer - is recommended. - * The build should scale, i.e. more processors should cause the build to be - done in less wall-clock time - * Nested or recursive make invocations have been significantly reduced, - as has the total fork/exec or spawning of sub processes during the build - * Windows MKS usage is no longer supported - * Windows Visual Studio `vsvars*.bat` and `vcvars*.bat` files are run - automatically - * Ant is no longer used when building the OpenJDK - * Use of ALT_* environment variables for configuring the build is no longer - supported - -***** - -## Contents - - * [Introduction](#introduction) - * [Use of Mercurial](#hg) - * [Getting the Source](#get_source) - * [Repositories](#repositories) - * [Building](#building) - * [System Setup](#setup) - * [Linux](#linux) - * [Solaris](#solaris) - * [Mac OS X](#macosx) - * [Windows](#windows) - * [Configure](#configure) - * [Make](#make) - * [Testing](#testing) - -***** - - * [Appendix A: Hints and Tips](#hints) - * [FAQ](#faq) - * [Build Performance Tips](#performance) - * [Troubleshooting](#troubleshooting) - * [Appendix B: GNU Make Information](#gmake) - * [Appendix C: Build Environments](#buildenvironments) - -***** - - -## Use of Mercurial - -The OpenJDK sources are maintained with the revision control system -[Mercurial](http://mercurial.selenic.com/wiki/Mercurial). If you are new to -Mercurial, please see the [Beginner Guides](http://mercurial.selenic.com/wiki/ -BeginnersGuides) or refer to the [Mercurial Book](http://hgbook.red-bean.com/). -The first few chapters of the book provide an excellent overview of Mercurial, -what it is and how it works. - -For using Mercurial with the OpenJDK refer to the [Developer Guide: Installing -and Configuring Mercurial](http://openjdk.java.net/guide/ -repositories.html#installConfig) section for more information. - - -### Getting the Source - -To get the entire set of OpenJDK Mercurial repositories use the script -`get_source.sh` located in the root repository: - - hg clone http://hg.openjdk.java.net/jdk9/jdk9 YourOpenJDK - cd YourOpenJDK - bash ./get_source.sh - -Once you have all the repositories, keep in mind that each repository is its -own independent repository. You can also re-run `./get_source.sh` anytime to -pull over all the latest changesets in all the repositories. This set of -nested repositories has been given the term "forest" and there are various -ways to apply the same `hg` command to each of the repositories. For -example, the script `make/scripts/hgforest.sh` can be used to repeat the -same `hg` command on every repository, e.g. - - cd YourOpenJDK - bash ./make/scripts/hgforest.sh status - - -### Repositories - -The set of repositories and what they contain: - - * **. (root)** contains common configure and makefile logic - * **hotspot** contains source code and make files for building the OpenJDK - Hotspot Virtual Machine - * **langtools** contains source code for the OpenJDK javac and language tools - * **jdk** contains source code and make files for building the OpenJDK runtime - libraries and misc files - * **jaxp** contains source code for the OpenJDK JAXP functionality - * **jaxws** contains source code for the OpenJDK JAX-WS functionality - * **corba** contains source code for the OpenJDK Corba functionality - * **nashorn** contains source code for the OpenJDK JavaScript implementation - -### Repository Source Guidelines - -There are some very basic guidelines: - - * Use of whitespace in source files (.java, .c, .h, .cpp, and .hpp files) is - restricted. No TABs, no trailing whitespace on lines, and files should not - terminate in more than one blank line. - * Files with execute permissions should not be added to the source - repositories. - * All generated files need to be kept isolated from the files maintained or - managed by the source control system. The standard area for generated files - is the top level `build/` directory. - * The default build process should be to build the product and nothing else, - in one form, e.g. a product (optimized), debug (non-optimized, -g plus - assert logic), or fastdebug (optimized, -g plus assert logic). - * The `.hgignore` file in each repository must exist and should include - `^build/`, `^dist/` and optionally any `nbproject/private` directories. **It - should NEVER** include anything in the `src/` or `test/` or any managed - directory area of a repository. - * Directory names and file names should never contain blanks or non-printing - characters. - * Generated source or binary files should NEVER be added to the repository - (that includes `javah` output). There are some exceptions to this rule, in - particular with some of the generated configure scripts. - * Files not needed for typical building or testing of the repository should - not be added to the repository. - -***** - - -## Building - -The very first step in building the OpenJDK is making sure the system itself -has everything it needs to do OpenJDK builds. Once a system is setup, it -generally doesn't need to be done again. - -Building the OpenJDK is now done with running a `configure` script which will -try and find and verify you have everything you need, followed by running -`make`, e.g. - -> **`bash ./configure`** -> **`make all`** - -Where possible the `configure` script will attempt to located the various -components in the default locations or via component specific variable -settings. When the normal defaults fail or components cannot be found, -additional `configure` options may be necessary to help `configure` find the -necessary tools for the build, or you may need to re-visit the setup of your -system due to missing software packages. - -**NOTE:** The `configure` script file does not have execute permissions and -will need to be explicitly run with `bash`, see the source guidelines. - -***** - - -### System Setup - -Before even attempting to use a system to build the OpenJDK there are some very -basic system setups needed. For all systems: - - * Be sure the GNU make utility is version 3.81 (4.0 on windows) or newer, e.g. - run "`make -version`" - - - * Install a Bootstrap JDK. All OpenJDK builds require access to a previously - released JDK called the _bootstrap JDK_ or _boot JDK._ The general rule is - that the bootstrap JDK must be an instance of the previous major release of - the JDK. In addition, there may be a requirement to use a release at or - beyond a particular update level. - - **_Building JDK 9 requires JDK 8. JDK 9 developers should not use JDK 9 as - the boot JDK, to ensure that JDK 9 dependencies are not introduced into the - parts of the system that are built with JDK 8._** - - The JDK 8 binaries can be downloaded from Oracle's [JDK 8 download - site](http://www.oracle.com/technetwork/java/javase/downloads/index.html). - For build performance reasons it is very important that this bootstrap JDK - be made available on the local disk of the machine doing the build. You - should add its `bin` directory to the `PATH` environment variable. If - `configure` has any issues finding this JDK, you may need to use the - `configure` option `--with-boot-jdk`. - - * Ensure that GNU make, the Bootstrap JDK, and the compilers are all in your - PATH environment variable. - -And for specific systems: - - * **Linux** - - Install all the software development packages needed including - [alsa](#alsa), [freetype](#freetype), [cups](#cups), and - [xrender](#xrender). See [specific system packages](#SDBE). - - * **Solaris** - - Install all the software development packages needed including [Studio - Compilers](#studio), [freetype](#freetype), [cups](#cups), and - [xrender](#xrender). See [specific system packages](#SDBE). - - * **Windows** - - * Install one of [CYGWIN](#cygwin) or [MinGW/MSYS](#msys) - * Install [Visual Studio 2013](#vs2013) - - * **Mac OS X** - - Install [XCode 6.3](https://developer.apple.com/xcode/) - - -#### Linux - -With Linux, try and favor the system packages over building your own or getting -packages from other areas. Most Linux builds should be possible with the -system's available packages. - -Note that some Linux systems have a habit of pre-populating your environment -variables for you, for example `JAVA_HOME` might get pre-defined for you to -refer to the JDK installed on your Linux system. You will need to unset -`JAVA_HOME`. It's a good idea to run `env` and verify the environment variables -you are getting from the default system settings make sense for building the -OpenJDK. - - -#### Solaris - - -##### Studio Compilers - -At a minimum, the [Studio 12 Update 4 Compilers](http://www.oracle.com/ -technetwork/server-storage/solarisstudio/downloads/index.htm) (containing -version 5.13 of the C and C++ compilers) is required, including specific -patches. - -The Solaris Studio installation should contain at least these packages: - -> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
**Package****Version**
developer/solarisstudio-124/backend12.4-1.0.6.0
developer/solarisstudio-124/c++12.4-1.0.10.0
developer/solarisstudio-124/cc12.4-1.0.4.0
developer/solarisstudio-124/library/c++-libs12.4-1.0.10.0
developer/solarisstudio-124/library/math-libs12.4-1.0.0.1
developer/solarisstudio-124/library/studio-gccrt12.4-1.0.0.1
developer/solarisstudio-124/studio-common12.4-1.0.0.1
developer/solarisstudio-124/studio-ja12.4-1.0.0.1
developer/solarisstudio-124/studio-legal12.4-1.0.0.1
developer/solarisstudio-124/studio-zhCN12.4-1.0.0.1
- -In particular backend 12.4-1.0.6.0 contains a critical patch for the sparc -version. - -Place the `bin` directory in `PATH`. - -The Oracle Solaris Studio Express compilers at: [Oracle Solaris Studio Express -Download site](http://www.oracle.com/technetwork/server-storage/solarisstudio/ -downloads/index-jsp-142582.html) are also an option, although these compilers -have not been extensively used yet. - - -#### Windows - -##### Windows Unix Toolkit - -Building on Windows requires a Unix-like environment, notably a Unix-like -shell. There are several such environments available of which -[Cygwin](http://www.cygwin.com/) and -[MinGW/MSYS](http://www.mingw.org/wiki/MSYS) are currently supported for the -OpenJDK build. One of the differences of these systems from standard Windows -tools is the way they handle Windows path names, particularly path names which -contain spaces, backslashes as path separators and possibly drive letters. -Depending on the use case and the specifics of each environment these path -problems can be solved by a combination of quoting whole paths, translating -backslashes to forward slashes, escaping backslashes with additional -backslashes and translating the path names to their ["8.3" -version](http://en.wikipedia.org/wiki/8.3_filename). - - -###### CYGWIN - -CYGWIN is an open source, Linux-like environment which tries to emulate a -complete POSIX layer on Windows. It tries to be smart about path names and can -usually handle all kinds of paths if they are correctly quoted or escaped -although internally it maps drive letters `:` to a virtual directory -`/cygdrive/`. - -You can always use the `cygpath` utility to map pathnames with spaces or the -backslash character into the `C:/` style of pathname (called 'mixed'), e.g. -`cygpath -s -m ""`. - -Note that the use of CYGWIN creates a unique problem with regards to setting -[`PATH`](#path). Normally on Windows the `PATH` variable contains directories -separated with the ";" character (Solaris and Linux use ":"). With CYGWIN, it -uses ":", but that means that paths like "C:/path" cannot be placed in the -CYGWIN version of `PATH` and instead CYGWIN uses something like -`/cygdrive/c/path` which CYGWIN understands, but only CYGWIN understands. - -The OpenJDK build requires CYGWIN version 1.7.16 or newer. Information about -CYGWIN can be obtained from the CYGWIN website at -[www.cygwin.com](http://www.cygwin.com). - -By default CYGWIN doesn't install all the tools required for building the -OpenJDK. Along with the default installation, you need to install the following -tools. - -> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Binary NameCategoryPackageDescription
ar.exeDevelbinutilsThe GNU assembler, linker and binary utilities
make.exeDevelmakeThe GNU version of the 'make' utility built for CYGWIN
m4.exeInterpretersm4GNU implementation of the traditional Unix macro processor
cpio.exeUtilscpioA program to manage archives of files
gawk.exeUtilsawkPattern-directed scanning and processing language
file.exeUtilsfileDetermines file type using 'magic' numbers
zip.exeArchivezipPackage and compress (archive) files
unzip.exeArchiveunzipExtract compressed files in a ZIP archive
free.exeSystemprocpsDisplay amount of free and used memory in the system
- -Note that the CYGWIN software can conflict with other non-CYGWIN software on -your Windows system. CYGWIN provides a [FAQ](http://cygwin.com/faq/ -faq.using.html) for known issues and problems, of particular interest is the -section on [BLODA (applications that interfere with -CYGWIN)](http://cygwin.com/faq/faq.using.html#faq.using.bloda). - - -###### MinGW/MSYS - -MinGW ("Minimalist GNU for Windows") is a collection of free Windows specific -header files and import libraries combined with GNU toolsets that allow one to -produce native Windows programs that do not rely on any 3rd-party C runtime -DLLs. MSYS is a supplement to MinGW which allows building applications and -programs which rely on traditional UNIX tools to be present. Among others this -includes tools like `bash` and `make`. See [MinGW/MSYS](http://www.mingw.org/ -wiki/MSYS) for more information. - -Like Cygwin, MinGW/MSYS can handle different types of path formats. They are -internally converted to paths with forward slashes and drive letters -`:` replaced by a virtual directory `/`. Additionally, MSYS -automatically detects binaries compiled for the MSYS environment and feeds them -with the internal, Unix-style path names. If native Windows applications are -called from within MSYS programs their path arguments are automatically -converted back to Windows style path names with drive letters and backslashes -as path separators. This may cause problems for Windows applications which use -forward slashes as parameter separator (e.g. `cl /nologo /I`) because MSYS may -wrongly [replace such parameters by drive letters](http://mingw.org/wiki/ -Posix_path_conversion). - -In addition to the tools which will be installed by default, you have to -manually install the `msys-zip` and `msys-unzip` packages. This can be easily -done with the MinGW command line installer: - - mingw-get.exe install msys-zip - mingw-get.exe install msys-unzip - - -##### Visual Studio 2013 Compilers - -The 32-bit and 64-bit OpenJDK Windows build requires Microsoft Visual Studio -C++ 2013 (VS2013) Professional Edition or Express compiler. The compiler and -other tools are expected to reside in the location defined by the variable -`VS120COMNTOOLS` which is set by the Microsoft Visual Studio installer. - -Only the C++ part of VS2013 is needed. Try to let the installation go to the -default install directory. Always reboot your system after installing VS2013. -The system environment variable VS120COMNTOOLS should be set in your -environment. - -Make sure that TMP and TEMP are also set in the environment and refer to -Windows paths that exist, like `C:\temp`, not `/tmp`, not `/cygdrive/c/temp`, -and not `C:/temp`. `C:\temp` is just an example, it is assumed that this area -is private to the user, so by default after installs you should see a unique -user path in these variables. - - -#### Mac OS X - -Make sure you get the right XCode version. - -***** - - -### Configure - -The basic invocation of the `configure` script looks like: - -> **`bash ./configure [options]`** - -This will create an output directory containing the "configuration" and setup -an area for the build result. This directory typically looks like: - -> **`build/linux-x64-normal-server-release`** - -`configure` will try to figure out what system you are running on and where all -necessary build components are. If you have all prerequisites for building -installed, it should find everything. If it fails to detect any component -automatically, it will exit and inform you about the problem. When this -happens, read more below in [the `configure` options](#configureoptions). - -Some examples: - -> **Windows 32bit build with freetype specified:** -> `bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target- -bits=32` - -> **Debug 64bit Build:** -> `bash ./configure --enable-debug --with-target-bits=64` - - -#### Configure Options - -Complete details on all the OpenJDK `configure` options can be seen with: - -> **`bash ./configure --help=short`** - -Use `-help` to see all the `configure` options available. You can generate any -number of different configurations, e.g. debug, release, 32, 64, etc. - -Some of the more commonly used `configure` options are: - -> **`--enable-debug`** -> set the debug level to fastdebug (this is a shorthand for `--with-debug- - level=fastdebug`) - - -> **`--with-alsa=`**_path_ -> select the location of the Advanced Linux Sound Architecture (ALSA) - -> Version 0.9.1 or newer of the ALSA files are required for building the - OpenJDK on Linux. These Linux files are usually available from an "alsa" of - "libasound" development package, and it's highly recommended that you try - and use the package provided by the particular version of Linux that you are - using. - -> **`--with-boot-jdk=`**_path_ -> select the [Bootstrap JDK](#bootjdk) - -> **`--with-boot-jdk-jvmargs=`**"_args_" -> provide the JVM options to be used to run the [Bootstrap JDK](#bootjdk) - -> **`--with-cacerts=`**_path_ -> select the path to the cacerts file. - -> See [Certificate Authority on Wikipedia](http://en.wikipedia.org/wiki/ - Certificate_Authority) for a better understanding of the Certificate - Authority (CA). A certificates file named "cacerts" represents a system-wide - keystore with CA certificates. In JDK and JRE binary bundles, the "cacerts" - file contains root CA certificates from several public CAs (e.g., VeriSign, - Thawte, and Baltimore). The source contain a cacerts file without CA root - certificates. Formal JDK builders will need to secure permission from each - public CA and include the certificates into their own custom cacerts file. - Failure to provide a populated cacerts file will result in verification - errors of a certificate chain during runtime. By default an empty cacerts - file is provided and that should be fine for most JDK developers. - - -> **`--with-cups=`**_path_ -> select the CUPS install location - -> The Common UNIX Printing System (CUPS) Headers are required for building the - OpenJDK on Solaris and Linux. The Solaris header files can be obtained by - installing the package **print/cups**. - -> The CUPS header files can always be downloaded from - [www.cups.org](http://www.cups.org). - -> **`--with-cups-include=`**_path_ -> select the CUPS include directory location - -> **`--with-debug-level=`**_level_ -> select the debug information level of release, fastdebug, or slowdebug - -> **`--with-dev-kit=`**_path_ -> select location of the compiler install or developer install location - - -> **`--with-freetype=`**_path_ -> select the freetype files to use. - -> Expecting the freetype libraries under `lib/` and the headers under - `include/`. - -> Version 2.3 or newer of FreeType is required. On Unix systems required files - can be available as part of your distribution (while you still may need to - upgrade them). Note that you need development version of package that - includes both the FreeType library and header files. - -> You can always download latest FreeType version from the [FreeType - website](http://www.freetype.org). Building the freetype 2 libraries from - scratch is also possible, however on Windows refer to the [Windows FreeType - DLL build instructions](http://freetype.freedesktop.org/wiki/FreeType_DLL). - -> Note that by default FreeType is built with byte code hinting support - disabled due to licensing restrictions. In this case, text appearance and - metrics are expected to differ from Sun's official JDK build. See the - [SourceForge FreeType2 Home Page](http://freetype.sourceforge.net/freetype2) - for more information. - -> **`--with-import-hotspot=`**_path_ -> select the location to find hotspot binaries from a previous build to avoid - building hotspot - -> **`--with-target-bits=`**_arg_ -> select 32 or 64 bit build - -> **`--with-jvm-variants=`**_variants_ -> select the JVM variants to build from, comma separated list that can - include: server, client, kernel, zero and zeroshark - -> **`--with-memory-size=`**_size_ -> select the RAM size that GNU make will think this system has - -> **`--with-msvcr-dll=`**_path_ -> select the `msvcr100.dll` file to include in the Windows builds (C/C++ - runtime library for Visual Studio). - -> This is usually picked up automatically from the redist directories of - Visual Studio 2013. - -> **`--with-num-cores=`**_cores_ -> select the number of cores to use (processor count or CPU count) - - -> **`--with-x=`**_path_ -> select the location of the X11 and xrender files. - -> The XRender Extension Headers are required for building the OpenJDK on - Solaris and Linux. The Linux header files are usually available from a - "Xrender" development package, it's recommended that you try and use the - package provided by the particular distribution of Linux that you are using. - The Solaris XRender header files is included with the other X11 header files - in the package **SFWxwinc** on new enough versions of Solaris and will be - installed in `/usr/X11/include/X11/extensions/Xrender.h` or - `/usr/openwin/share/include/X11/extensions/Xrender.h` - -***** - - -### Make - -The basic invocation of the `make` utility looks like: - -> **`make all`** - -This will start the build to the output directory containing the -"configuration" that was created by the `configure` script. Run `make help` for -more information on the available targets. - -There are some of the make targets that are of general interest: - -> _empty_ -> build everything but no images - -> **`all`** -> build everything including images - -> **`all-conf`** -> build all configurations - -> **`images`** -> create complete j2sdk and j2re images - -> **`install`** -> install the generated images locally, typically in `/usr/local` - -> **`clean`** -> remove all files generated by make, but not those generated by `configure` - -> **`dist-clean`** -> remove all files generated by both and `configure` (basically killing the - configuration) - -> **`help`** -> give some help on using `make`, including some interesting make targets - -***** - - -## Testing - -When the build is completed, you should see the generated binaries and -associated files in the `j2sdk-image` directory in the output directory. In -particular, the `build/*/images/j2sdk-image/bin` directory should contain -executables for the OpenJDK tools and utilities for that configuration. The -testing tool `jtreg` will be needed and can be found at: [the jtreg -site](http://openjdk.java.net/jtreg/). The provided regression tests in the -repositories can be run with the command: - -> **``cd test && make PRODUCT_HOME=`pwd`/../build/*/images/j2sdk-image all``** - -***** - - -## Appendix A: Hints and Tips - - -### FAQ - -**Q:** The `generated-configure.sh` file looks horrible! How are you going to -edit it? -**A:** The `generated-configure.sh` file is generated (think "compiled") by the -autoconf tools. The source code is in `configure.ac` and various .m4 files in -common/autoconf, which are much more readable. - -**Q:** Why is the `generated-configure.sh` file checked in, if it is -generated? -**A:** If it was not generated, every user would need to have the autoconf -tools installed, and re-generate the `configure` file as the first step. Our -goal is to minimize the work needed to be done by the user to start building -OpenJDK, and to minimize the number of external dependencies required. - -**Q:** Do you require a specific version of autoconf for regenerating -`generated-configure.sh`? -**A:** Yes, version 2.69 is required and should be easy enough to aquire on all -supported operating systems. The reason for this is to avoid large spurious -changes in `generated-configure.sh`. - -**Q:** How do you regenerate `generated-configure.sh` after making changes to -the input files? -**A:** Regnerating `generated-configure.sh` should always be done using the -script `common/autoconf/autogen.sh` to ensure that the correct files get -updated. This script should also be run after mercurial tries to merge -`generated-configure.sh` as a merge of the generated file is not guaranteed to -be correct. - -**Q:** What are the files in `common/makefiles/support/*` for? They look like -gibberish. -**A:** They are a somewhat ugly hack to compensate for command line length -limitations on certain platforms (Windows, Solaris). Due to a combination of -limitations in make and the shell, command lines containing too many files will -not work properly. These helper files are part of an elaborate hack that will -compress the command line in the makefile and then uncompress it safely. We're -not proud of it, but it does fix the problem. If you have any better -suggestions, we're all ears! :-) - -**Q:** I want to see the output of the commands that make runs, like in the old -build. How do I do that? -**A:** You specify the `LOG` variable to make. There are several log levels: - - * **`warn`** -- Default and very quiet. - * **`info`** -- Shows more progress information than warn. - * **`debug`** -- Echos all command lines and prints all macro calls for - compilation definitions. - * **`trace`** -- Echos all $(shell) command lines as well. - -**Q:** When do I have to re-run `configure`? -**A:** Normally you will run `configure` only once for creating a -configuration. You need to re-run configuration only if you want to change any -configuration options, or if you pull down changes to the `configure` script. - -**Q:** I have added a new source file. Do I need to modify the makefiles? -**A:** Normally, no. If you want to create e.g. a new native library, you will -need to modify the makefiles. But for normal file additions or removals, no -changes are needed. There are certan exceptions for some native libraries where -the source files are spread over many directories which also contain sources -for other libraries. In these cases it was simply easier to create include -lists rather than excludes. - -**Q:** When I run `configure --help`, I see many strange options, like -`--dvidir`. What is this? -**A:** Configure provides a slew of options by default, to all projects that -use autoconf. Most of them are not used in OpenJDK, so you can safely ignore -them. To list only OpenJDK specific features, use `configure --help=short` -instead. - -**Q:** `configure` provides OpenJDK-specific features such as `--with- -builddeps-server` that are not described in this document. What about those? -**A:** Try them out if you like! But be aware that most of these are -experimental features. Many of them don't do anything at all at the moment; the -option is just a placeholder. Others depend on pieces of code or infrastructure -that is currently not ready for prime time. - -**Q:** How will you make sure you don't break anything? -**A:** We have a script that compares the result of the new build system with -the result of the old. For most part, we aim for (and achieve) byte-by-byte -identical output. There are however technical issues with e.g. native binaries, -which might differ in a byte-by-byte comparison, even when building twice with -the old build system. For these, we compare relevant aspects (e.g. the symbol -table and file size). Note that we still don't have 100% equivalence, but we're -close. - -**Q:** I noticed this thing X in the build that looks very broken by design. -Why don't you fix it? -**A:** Our goal is to produce a build output that is as close as technically -possible to the old build output. If things were weird in the old build, they -will be weird in the new build. Often, things were weird before due to -obscurity, but in the new build system the weird stuff comes up to the surface. -The plan is to attack these things at a later stage, after the new build system -is established. - -**Q:** The code in the new build system is not that well-structured. Will you -fix this? -**A:** Yes! The new build system has grown bit by bit as we converted the old -system. When all of the old build system is converted, we can take a step back -and clean up the structure of the new build system. Some of this we plan to do -before replacing the old build system and some will need to wait until after. - -**Q:** Is anything able to use the results of the new build's default make -target? -**A:** Yes, this is the minimal (or roughly minimal) set of compiled output -needed for a developer to actually execute the newly built JDK. The idea is -that in an incremental development fashion, when doing a normal make, you -should only spend time recompiling what's changed (making it purely -incremental) and only do the work that's needed to actually run and test your -code. The packaging stuff that is part of the `images` target is not needed for -a normal developer who wants to test his new code. Even if it's quite fast, -it's still unnecessary. We're targeting sub-second incremental rebuilds! ;-) -(Or, well, at least single-digit seconds...) - -**Q:** I usually set a specific environment variable when building, but I can't -find the equivalent in the new build. What should I do? -**A:** It might very well be that we have neglected to add support for an -option that was actually used from outside the build system. Email us and we -will add support for it! - - -### Build Performance Tips - -Building OpenJDK requires a lot of horsepower. Some of the build tools can be -adjusted to utilize more or less of resources such as parallel threads and -memory. The `configure` script analyzes your system and selects reasonable -values for such options based on your hardware. If you encounter resource -problems, such as out of memory conditions, you can modify the detected values -with: - - * **`--with-num-cores`** -- number of cores in the build system, e.g. - `--with-num-cores=8` - * **`--with-memory-size`** -- memory (in MB) available in the build system, - e.g. `--with-memory-size=1024` - -It might also be necessary to specify the JVM arguments passed to the Bootstrap -JDK, using e.g. `--with-boot-jdk-jvmargs="-Xmx8G -enableassertions"`. Doing -this will override the default JVM arguments passed to the Bootstrap JDK. - -One of the top goals of the new build system is to improve the build -performance and decrease the time needed to build. This will soon also apply to -the java compilation when the Smart Javac wrapper is fully supported. - -At the end of a successful execution of `configure`, you will get a performance -summary, indicating how well the build will perform. Here you will also get -performance hints. If you want to build fast, pay attention to those! - -#### Building with ccache - -The OpenJDK build supports building with ccache when using gcc or clang. Using -ccache can radically speed up compilation of native code if you often rebuild -the same sources. Your milage may vary however so we recommend evaluating it -for yourself. To enable it, make sure it's on the path and configure with -`--enable-ccache`. - -#### Building on local disk - -If you are using network shares, e.g. via NFS, for your source code, make sure -the build directory is situated on local disk. The performance penalty is -extremely high for building on a network share, close to unusable. - -#### Building only one JVM - -The old build builds multiple JVMs on 32-bit systems (client and server; and on -Windows kernel as well). In the new build we have changed this default to only -build server when it's available. This improves build times for those not -interested in multiple JVMs. To mimic the old behavior on platforms that -support it, use `--with-jvm-variants=client,server`. - -#### Selecting the number of cores to build on - -By default, `configure` will analyze your machine and run the make process in -parallel with as many threads as you have cores. This behavior can be -overridden, either "permanently" (on a `configure` basis) using -`--with-num-cores=N` or for a single build only (on a make basis), using -`make JOBS=N`. - -If you want to make a slower build just this time, to save some CPU power for -other processes, you can run e.g. `make JOBS=2`. This will force the makefiles -to only run 2 parallel processes, or even `make JOBS=1` which will disable -parallelism. - -If you want to have it the other way round, namely having slow builds default -and override with fast if you're impatient, you should call `configure` with -`--with-num-cores=2`, making 2 the default. If you want to run with more cores, -run `make JOBS=8` - - -### Troubleshooting - -#### Solving build problems - -If the build fails (and it's not due to a compilation error in a source file -you've changed), the first thing you should do is to re-run the build with more -verbosity. Do this by adding `LOG=debug` to your make command line. - -The build log (with both stdout and stderr intermingled, basically the same as -you see on your console) can be found as `build.log` in your build directory. - -You can ask for help on build problems with the new build system on either the -[build-dev](http://mail.openjdk.java.net/mailman/listinfo/build-dev) or the -[build-infra-dev](http://mail.openjdk.java.net/mailman/listinfo/build-infra-dev) -mailing lists. Please include the relevant parts of the build log. - -A build can fail for any number of reasons. Most failures are a result of -trying to build in an environment in which all the pre-build requirements have -not been met. The first step in troubleshooting a build failure is to recheck -that you have satisfied all the pre-build requirements for your platform. -Scanning the `configure` log is a good first step, making sure that what it -found makes sense for your system. Look for strange error messages or any -difficulties that `configure` had in finding things. - -Some of the more common problems with builds are briefly described below, with -suggestions for remedies. - - * **Corrupted Bundles on Windows:** - Some virus scanning software has been known to corrupt the downloading of - zip bundles. It may be necessary to disable the 'on access' or 'real time' - virus scanning features to prevent this corruption. This type of 'real time' - virus scanning can also slow down the build process significantly. - Temporarily disabling the feature, or excluding the build output directory - may be necessary to get correct and faster builds. - - * **Slow Builds:** - If your build machine seems to be overloaded from too many simultaneous C++ - compiles, try setting the `JOBS=1` on the `make` command line. Then try - increasing the count slowly to an acceptable level for your system. Also: - - Creating the javadocs can be very slow, if you are running javadoc, consider - skipping that step. - - Faster CPUs, more RAM, and a faster DISK usually helps. The VM build tends - to be CPU intensive (many C++ compiles), and the rest of the JDK will often - be disk intensive. - - Faster compiles are possible using a tool called - [ccache](http://ccache.samba.org/). - - * **File time issues:** - If you see warnings that refer to file time stamps, e.g. - - > _Warning message:_ ` File 'xxx' has modification time in the future.` - > _Warning message:_ ` Clock skew detected. Your build may be incomplete.` - - These warnings can occur when the clock on the build machine is out of sync - with the timestamps on the source files. Other errors, apparently unrelated - but in fact caused by the clock skew, can occur along with the clock skew - warnings. These secondary errors may tend to obscure the fact that the true - root cause of the problem is an out-of-sync clock. - - If you see these warnings, reset the clock on the build machine, run - "`gmake clobber`" or delete the directory containing the build output, and - restart the build from the beginning. - - * **Error message: `Trouble writing out table to disk`** - Increase the amount of swap space on your build machine. This could be - caused by overloading the system and it may be necessary to use: - - > `make JOBS=1` - - to reduce the load on the system. - - * **Error Message: `libstdc++ not found`:** - This is caused by a missing libstdc++.a library. This is installed as part - of a specific package (e.g. libstdc++.so.devel.386). By default some 64-bit - Linux versions (e.g. Fedora) only install the 64-bit version of the - libstdc++ package. Various parts of the JDK build require a static link of - the C++ runtime libraries to allow for maximum portability of the built - images. - - * **Linux Error Message: `cannot restore segment prot after reloc`** - This is probably an issue with SELinux (See [SELinux on - Wikipedia](http://en.wikipedia.org/wiki/SELinux)). Parts of the VM is built - without the `-fPIC` for performance reasons. - - To completely disable SELinux: - - 1. `$ su root` - 2. `# system-config-securitylevel` - 3. `In the window that appears, select the SELinux tab` - 4. `Disable SELinux` - - Alternatively, instead of completely disabling it you could disable just - this one check. - - 1. Select System->Administration->SELinux Management - 2. In the SELinux Management Tool which appears, select "Boolean" from the - menu on the left - 3. Expand the "Memory Protection" group - 4. Check the first item, labeled "Allow all unconfined executables to use - libraries requiring text relocation ..." - - * **Windows Error Messages:** - `*** fatal error - couldn't allocate heap, ... ` - `rm fails with "Directory not empty"` - `unzip fails with "cannot create ... Permission denied"` - `unzip fails with "cannot create ... Error 50"` - - The CYGWIN software can conflict with other non-CYGWIN software. See the - CYGWIN FAQ section on [BLODA (applications that interfere with - CYGWIN)](http://cygwin.com/faq/faq.using.html#faq.using.bloda). - - * **Windows Error Message: `spawn failed`** - Try rebooting the system, or there could be some kind of issue with the disk - or disk partition being used. Sometimes it comes with a "Permission Denied" - message. - -***** - - -## Appendix B: GNU make - -The Makefiles in the OpenJDK are only valid when used with the GNU version of -the utility command `make` (usually called `gmake` on Solaris). A few notes -about using GNU make: - - * You need GNU make version 3.81 or newer. On Windows 4.0 or newer is - recommended. If the GNU make utility on your systems is not of a suitable - version, see "[Building GNU make](#buildgmake)". - * Place the location of the GNU make binary in the `PATH`. - * **Solaris:** Do NOT use `/usr/bin/make` on Solaris. If your Solaris system - has the software from the Solaris Developer Companion CD installed, you - should try and use `/usr/bin/gmake` or `/usr/gnu/bin/make`. - * **Windows:** Make sure you start your build inside a bash shell. - * **Mac OS X:** The XCode "command line tools" must be installed on your Mac. - -Information on GNU make, and access to ftp download sites, are available on the -[GNU make web site ](http://www.gnu.org/software/make/make.html). The latest -source to GNU make is available at -[ftp.gnu.org/pub/gnu/make/](http://ftp.gnu.org/pub/gnu/make/). - - -### Building GNU make - -First step is to get the GNU make 3.81 or newer source from -[ftp.gnu.org/pub/gnu/make/](http://ftp.gnu.org/pub/gnu/make/). Building is a -little different depending on the OS but is basically done with: - - bash ./configure - make - -***** - - -## Appendix C: Build Environments - -### Minimum Build Environments - -This file often describes specific requirements for what we call the "minimum -build environments" (MBE) for this specific release of the JDK. What is listed -below is what the Oracle Release Engineering Team will use to build the Oracle -JDK product. Building with the MBE will hopefully generate the most compatible -bits that install on, and run correctly on, the most variations of the same -base OS and hardware architecture. In some cases, these represent what is often -called the least common denominator, but each Operating System has different -aspects to it. - -In all cases, the Bootstrap JDK version minimum is critical, we cannot -guarantee builds will work with older Bootstrap JDK's. Also in all cases, more -RAM and more processors is better, the minimums listed below are simply -recommendations. - -With Solaris and Mac OS X, the version listed below is the oldest release we -can guarantee builds and works, and the specific version of the compilers used -could be critical. - -With Windows the critical aspect is the Visual Studio compiler used, which due -to it's runtime, generally dictates what Windows systems can do the builds and -where the resulting bits can be used. - -**NOTE: We expect a change here off these older Windows OS releases and to a -'less older' one, probably Windows 2008R2 X64.** - -With Linux, it was just a matter of picking a stable distribution that is a -good representative for Linux in general. - -It is understood that most developers will NOT be using these specific -versions, and in fact creating these specific versions may be difficult due to -the age of some of this software. It is expected that developers are more often -using the more recent releases and distributions of these operating systems. - -Compilation problems with newer or different C/C++ compilers is a common -problem. Similarly, compilation problems related to changes to the -`/usr/include` or system header files is also a common problem with older, -newer, or unreleased OS versions. Please report these types of problems as bugs -so that they can be dealt with accordingly. - -> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Base OS and ArchitectureOSC/C++ CompilerBootstrap JDKProcessorsRAM MinimumDISK Needs
Linux X86 (32-bit) and X64 (64-bit)Oracle Enterprise Linux 6.4gcc 4.9.2 JDK 82 or more1 GB6 GB
Solaris SPARCV9 (64-bit)Solaris 11 Update 1Studio 12 Update 4 + patchesJDK 84 or more4 GB8 GB
Solaris X64 (64-bit)Solaris 11 Update 1Studio 12 Update 4 + patchesJDK 84 or more4 GB8 GB
Windows X86 (32-bit)Windows Server 2012 R2 x64Microsoft Visual Studio C++ 2013 Professional EditionJDK 82 or more2 GB6 GB
Windows X64 (64-bit)Windows Server 2012 R2 x64Microsoft Visual Studio C++ 2013 Professional EditionJDK 82 or more2 GB6 GB
Mac OS X X64 (64-bit)Mac OS X 10.9 "Mavericks"Xcode 6.3 or newerJDK 82 or more4 GB6 GB
- -***** - - -### Specific Developer Build Environments - -We won't be listing all the possible environments, but we will try to provide -what information we have available to us. - -**NOTE: The community can help out by updating this part of the document.** - -#### Fedora - -After installing the latest [Fedora](http://fedoraproject.org) you need to -install several build dependencies. The simplest way to do it is to execute the -following commands as user `root`: - - yum-builddep java-1.7.0-openjdk - yum install gcc gcc-c++ - -In addition, it's necessary to set a few environment variables for the build: - - export LANG=C - export PATH="/usr/lib/jvm/java-openjdk/bin:${PATH}" - -#### CentOS 5.5 - -After installing [CentOS 5.5](http://www.centos.org/) you need to make sure you -have the following Development bundles installed: - - * Development Libraries - * Development Tools - * Java Development - * X Software Development (Including XFree86-devel) - -Plus the following packages: - - * cups devel: Cups Development Package - * alsa devel: Alsa Development Package - * Xi devel: libXi.so Development Package - -The freetype 2.3 packages don't seem to be available, but the freetype 2.3 -sources can be downloaded, built, and installed easily enough from [the -freetype site](http://downloads.sourceforge.net/freetype). Build and install -with something like: - - bash ./configure - make - sudo -u root make install - -Mercurial packages could not be found easily, but a Google search should find -ones, and they usually include Python if it's needed. - -#### Debian 5.0 (Lenny) - -After installing [Debian](http://debian.org) 5 you need to install several -build dependencies. The simplest way to install the build dependencies is to -execute the following commands as user `root`: - - aptitude build-dep openjdk-7 - aptitude install openjdk-7-jdk libmotif-dev - -In addition, it's necessary to set a few environment variables for the build: - - export LANG=C - export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}" - -#### Ubuntu 12.04 - -After installing [Ubuntu](http://ubuntu.org) 12.04 you need to install several -build dependencies. The simplest way to do it is to execute the following -commands: - - sudo aptitude build-dep openjdk-7 - sudo aptitude install openjdk-7-jdk - -In addition, it's necessary to set a few environment variables for the build: - - export LANG=C - export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}" - -#### OpenSUSE 11.1 - -After installing [OpenSUSE](http://opensuse.org) 11.1 you need to install -several build dependencies. The simplest way to install the build dependencies -is to execute the following commands: - - sudo zypper source-install -d java-1_7_0-openjdk - sudo zypper install make - -In addition, it is necessary to set a few environment variables for the build: - - export LANG=C - export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:$[PATH}" - -Finally, you need to unset the `JAVA_HOME` environment variable: - - export -n JAVA_HOME` - -#### Mandriva Linux One 2009 Spring - -After installing [Mandriva](http://mandriva.org) Linux One 2009 Spring you need -to install several build dependencies. The simplest way to install the build -dependencies is to execute the following commands as user `root`: - - urpmi java-1.7.0-openjdk-devel make gcc gcc-c++ freetype-devel zip unzip - libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel - libxtst6-devel libxi-devel - -In addition, it is necessary to set a few environment variables for the build: - - export LANG=C - export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:${PATH}" - -#### OpenSolaris 2009.06 - -After installing [OpenSolaris](http://opensolaris.org) 2009.06 you need to -install several build dependencies. The simplest way to install the build -dependencies is to execute the following commands: - - pfexec pkg install SUNWgmake SUNWj7dev sunstudioexpress SUNWcups SUNWzip - SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2 - -In addition, it is necessary to set a few environment variables for the build: - - export LANG=C - export PATH="/opt/SunStudioExpress/bin:${PATH}" - -***** - -End of the OpenJDK build README document. - -Please come again! diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4 index 35e835c3994..187ad8ac161 100644 --- a/common/autoconf/basics.m4 +++ b/common/autoconf/basics.m4 @@ -530,6 +530,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS], BASIC_PATH_PROGS(DF, df) BASIC_PATH_PROGS(CPIO, [cpio bsdcpio]) BASIC_PATH_PROGS(NICE, nice) + BASIC_PATH_PROGS(PANDOC, pandoc) ]) # Setup basic configuration paths, and platform-specific stuff related to PATHs. @@ -1094,6 +1095,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS], OTOOL="true" fi BASIC_PATH_PROGS(READELF, [greadelf readelf]) + BASIC_PATH_PROGS(DOT, dot) BASIC_PATH_PROGS(HG, hg) BASIC_PATH_PROGS(STAT, stat) BASIC_PATH_PROGS(TIME, time) @@ -1202,6 +1204,18 @@ AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], # Check for support for specific options in bash AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS], [ + # Check bash version + # Extra [ ] to stop m4 mangling + [ BASH_VER=`$BASH --version | $SED -n -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'` ] + AC_MSG_CHECKING([bash version]) + AC_MSG_RESULT([$BASH_VER]) + + BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1` + BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2` + if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then + AC_MSG_ERROR([bash version 3.2 or better is required]) + fi + # Test if bash supports pipefail. AC_MSG_CHECKING([if bash supports pipefail]) if ${BASH} -c 'set -o pipefail'; then diff --git a/common/autoconf/basics_windows.m4 b/common/autoconf/basics_windows.m4 index 1a79bf8fc86..2ae6e34a556 100644 --- a/common/autoconf/basics_windows.m4 +++ b/common/autoconf/basics_windows.m4 @@ -329,8 +329,8 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS], AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path]) fi AC_MSG_CHECKING([cygwin root directory as unix-style path]) - # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away - cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"` + # The cmd output ends with Windows line endings (CR/LF) + cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'` # Force cygpath to report the proper root by including a trailing space, and then stripping it off again. CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "` AC_MSG_RESULT([$CYGWIN_ROOT_PATH]) diff --git a/common/autoconf/build-aux/install.sh b/common/autoconf/build-aux/install.sh index 98c1dc444a7..5934326e225 100644 --- a/common/autoconf/build-aux/install.sh +++ b/common/autoconf/build-aux/install.sh @@ -1,5 +1,28 @@ -#!/bin/sh -echo >&2 "No suitable 'install' command found.'" -echo >&2 "If automake is installed, running 'automake -fa'" -echo >&2 "(and ignoring the errors) might produce one." -exit 1 +#!/bin/bash +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# This file is empty on purpose. It's a placeholder which is required by +# autoconf, but it serves no purpose for us. diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4 index ca7f625664c..a96b74be793 100644 --- a/common/autoconf/flags.m4 +++ b/common/autoconf/flags.m4 @@ -355,7 +355,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS], SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" JVM_CFLAGS="$JVM_CFLAGS $PICFLAG" fi - SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' + SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)' SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1' @@ -375,7 +375,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS], # Linking is different on MacOSX PICFLAG='' SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" - SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' + SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)' SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1' diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 917181abf10..ab0642affe6 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -688,6 +688,7 @@ LIBFFI_LIBS LIBFFI_CFLAGS ALSA_LIBS ALSA_CFLAGS +FREETYPE_LICENSE FREETYPE_BUNDLE_LIB_PATH FREETYPE_LIBS FREETYPE_CFLAGS @@ -918,6 +919,7 @@ COMPRESS_JARS INCLUDE_SA UNLIMITED_CRYPTO CACERTS_FILE +ENABLE_FULL_DOCS ENABLE_HEADLESS_ONLY DEFAULT_MAKE_TARGET OS_VERSION_MICRO @@ -935,6 +937,7 @@ DTRACE TIME STAT HG +DOT READELF OTOOL LDD @@ -993,8 +996,9 @@ OPENJDK_TARGET_CPU_OSARCH OPENJDK_TARGET_CPU_ISADIR OPENJDK_TARGET_CPU_LEGACY_LIB OPENJDK_TARGET_CPU_LEGACY -REQUIRED_OS_VERSION -REQUIRED_OS_NAME +RELEASE_FILE_OS_ARCH +RELEASE_FILE_OS_NAME +OPENJDK_MODULE_TARGET_PLATFORM COMPILE_TYPE OPENJDK_TARGET_CPU_ENDIAN OPENJDK_TARGET_CPU_BITS @@ -1024,6 +1028,7 @@ build_os build_vendor build_cpu build +PANDOC NICE CPIO DF @@ -1136,6 +1141,7 @@ with_conf_name with_output_sync with_default_make_target enable_headless_only +enable_full_docs with_cacerts_file enable_unlimited_crypto with_copyright_year @@ -1194,6 +1200,7 @@ with_freetype_include with_freetype_lib with_freetype_src enable_freetype_bundling +with_freetype_license with_alsa with_alsa_include with_alsa_lib @@ -1281,12 +1288,14 @@ READLINK DF CPIO NICE +PANDOC MAKE UNZIP ZIPEXE LDD OTOOL READELF +DOT HG STAT TIME @@ -1967,6 +1976,8 @@ Optional Features: --enable-debug set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) [disabled] --enable-headless-only only build headless (no GUI) support [disabled] + --enable-full-docs build complete documentation [enabled if all tools + found] --disable-unlimited-crypto Disable unlimited crypto policy [enabled] --disable-keep-packaged-modules @@ -2142,6 +2153,7 @@ Optional Packages: --with-freetype-src specify directory with freetype sources to automatically build the library (experimental, Windows-only) + --with-freetype-license if bundling freetype, also bundle this license file --with-alsa specify prefix directory for the alsa package (expecting the libraries under PATH/lib and the headers under PATH/include) @@ -2244,12 +2256,14 @@ Some influential environment variables: DF Override default value for DF CPIO Override default value for CPIO NICE Override default value for NICE + PANDOC Override default value for PANDOC MAKE Override default value for MAKE UNZIP Override default value for UNZIP ZIPEXE Override default value for ZIPEXE LDD Override default value for LDD OTOOL Override default value for OTOOL READELF Override default value for READELF + DOT Override default value for DOT HG Override default value for HG STAT Override default value for STAT TIME Override default value for TIME @@ -4887,6 +4901,8 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom" + + #%%% Build and target systems %%% @@ -5043,7 +5059,7 @@ TOOLCHAIN_MINIMUM_VERSION_xlc="" # # $1 = compiler to test (CC or CXX) # $2 = human readable name of compiler (C or C++) -# $3 = list of compiler names to search for +# $3 = compiler name to search for # Detect the core components of the toolchain, i.e. the compilers (CC and CXX), @@ -5170,7 +5186,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=1486175373 +DATE_WHEN_GENERATED=1496926402 ############################################################################### # @@ -15358,6 +15374,203 @@ $as_echo "$tool_specified" >&6; } + # Publish this variable in the help. + + + if [ -z "${PANDOC+x}" ]; then + # The variable is not set by user, try to locate tool using the code snippet + for ac_prog in pandoc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_PANDOC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PANDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_PANDOC="$PANDOC" # 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_PANDOC="$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 +PANDOC=$ac_cv_path_PANDOC +if test -n "$PANDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5 +$as_echo "$PANDOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PANDOC" && break +done + + else + # The variable is set, but is it from the command line or the environment? + + # Try to remove the string !PANDOC! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/} + 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 "xPANDOC" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;} + fi + # Try to locate tool using the code snippet + for ac_prog in pandoc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_PANDOC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PANDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_PANDOC="$PANDOC" # 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_PANDOC="$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 +PANDOC=$ac_cv_path_PANDOC +if test -n "$PANDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5 +$as_echo "$PANDOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PANDOC" && break +done + + 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$PANDOC" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5 +$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5 +$as_echo_n "checking for PANDOC... " >&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="$PANDOC" + 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 PANDOC=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool PANDOC=$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_PANDOC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PANDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_PANDOC="$PANDOC" # 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_PANDOC="$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 +PANDOC=$ac_cv_path_PANDOC +if test -n "$PANDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5 +$as_echo "$PANDOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$PANDOC" = 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 PANDOC=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5 +$as_echo_n "checking for PANDOC... " >&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 PANDOC=$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 + + + + # Now we can determine OpenJDK build and target platforms. This is required to # have early on. # Make sure we can run config.sub. @@ -15821,30 +16034,38 @@ $as_echo_n "checking compilation type... " >&6; } $as_echo "$COMPILE_TYPE" >&6; } + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + OPENJDK_MODULE_TARGET_OS_NAME="macos" + else + OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS" + fi + + if test "x$OPENJDK_TARGET_CPU" = xx86_64; then + OPENJDK_MODULE_TARGET_OS_ARCH="amd64" + else + OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU" + fi + + OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}" + + + if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then - REQUIRED_OS_NAME=SunOS - REQUIRED_OS_VERSION=5.10 + RELEASE_FILE_OS_NAME=SunOS fi if test "x$OPENJDK_TARGET_OS" = "xlinux"; then - REQUIRED_OS_NAME=Linux - REQUIRED_OS_VERSION=2.6 + RELEASE_FILE_OS_NAME=Linux fi if test "x$OPENJDK_TARGET_OS" = "xwindows"; then - REQUIRED_OS_NAME=Windows - if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then - REQUIRED_OS_VERSION=5.2 - else - REQUIRED_OS_VERSION=5.1 - fi + RELEASE_FILE_OS_NAME=Windows fi - if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then - REQUIRED_OS_NAME=Darwin - REQUIRED_OS_VERSION=11.2 + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + RELEASE_FILE_OS_NAME="Darwin" fi if test "x$OPENJDK_TARGET_OS" = "xaix"; then - REQUIRED_OS_NAME=AIX - REQUIRED_OS_VERSION=7.1 + RELEASE_FILE_OS_NAME="AIX" fi + RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU} @@ -16200,8 +16421,8 @@ $as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but a fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; } - # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away - cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"` + # The cmd output ends with Windows line endings (CR/LF) + cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'` # Force cygpath to report the proper root by including a trailing space, and then stripping it off again. CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5 @@ -22267,6 +22488,203 @@ $as_echo "$tool_specified" >&6; } + # Publish this variable in the help. + + + if [ -z "${DOT+x}" ]; then + # The variable is not set by user, try to locate tool using the code snippet + for ac_prog in dot +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_DOT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DOT in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOT="$DOT" # 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_DOT="$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 +DOT=$ac_cv_path_DOT +if test -n "$DOT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5 +$as_echo "$DOT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DOT" && break +done + + else + # The variable is set, but is it from the command line or the environment? + + # Try to remove the string !DOT! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/} + 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 "xDOT" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;} + fi + # Try to locate tool using the code snippet + for ac_prog in dot +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_DOT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DOT in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOT="$DOT" # 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_DOT="$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 +DOT=$ac_cv_path_DOT +if test -n "$DOT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5 +$as_echo "$DOT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DOT" && break +done + + 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$DOT" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5 +$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5 +$as_echo_n "checking for DOT... " >&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="$DOT" + 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 DOT=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool DOT=$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_DOT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DOT in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOT="$DOT" # 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_DOT="$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 +DOT=$ac_cv_path_DOT +if test -n "$DOT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5 +$as_echo "$DOT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$DOT" = 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 DOT=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5 +$as_echo_n "checking for DOT... " >&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 DOT=$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 + + + + # Publish this variable in the help. @@ -24092,6 +24510,20 @@ $as_echo "$tool_specified" >&6; } fi + # Check bash version + # Extra [ ] to stop m4 mangling + BASH_VER=`$BASH --version | $SED -n -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5 +$as_echo_n "checking bash version... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5 +$as_echo "$BASH_VER" >&6; } + + BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1` + BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2` + if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then + as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5 + fi + # Test if bash supports pipefail. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5 $as_echo_n "checking if bash supports pipefail... " >&6; } @@ -24306,6 +24738,101 @@ $as_echo "no" >&6; } + # Should we build the complete docs, or just a lightweight version? + # Check whether --enable-full-docs was given. +if test "${enable_full_docs+set}" = set; then : + enableval=$enable_full_docs; +fi + + + # Verify dependencies + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5 +$as_echo_n "checking for graphviz dot... " >&6; } + if test "x$DOT" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5 +$as_echo "no, cannot generate full docs" >&6; } + FULL_DOCS_DEP_MISSING=true + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5 +$as_echo_n "checking for pandoc... " >&6; } + if test "x$PANDOC" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5 +$as_echo "no, cannot generate full docs" >&6; } + FULL_DOCS_DEP_MISSING=true + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5 +$as_echo_n "checking full docs... " >&6; } + if test "x$enable_full_docs" = xyes; then + if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5 +$as_echo "no, missing dependencies" >&6; } + + # Print a helpful message on how to acquire the necessary build dependency. + # dot is the help tag: freetype, cups, alsa etc + MISSING_DEPENDENCY=dot + + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + cygwin_help $MISSING_DEPENDENCY + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + msys_help $MISSING_DEPENDENCY + else + PKGHANDLER_COMMAND= + + case $PKGHANDLER in + apt-get) + apt_help $MISSING_DEPENDENCY ;; + yum) + yum_help $MISSING_DEPENDENCY ;; + brew) + brew_help $MISSING_DEPENDENCY ;; + port) + port_help $MISSING_DEPENDENCY ;; + pkgutil) + pkgutil_help $MISSING_DEPENDENCY ;; + pkgadd) + pkgadd_help $MISSING_DEPENDENCY ;; + esac + + if test "x$PKGHANDLER_COMMAND" != x; then + HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." + fi + fi + + as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5 + else + ENABLE_FULL_DOCS=true + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5 +$as_echo "yes, forced" >&6; } + fi + elif test "x$enable_full_docs" = xno; then + ENABLE_FULL_DOCS=false + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5 +$as_echo "no, forced" >&6; } + elif test "x$enable_full_docs" = x; then + # Check for prerequisites + if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then + ENABLE_FULL_DOCS=false + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5 +$as_echo "no, missing dependencies" >&6; } + else + ENABLE_FULL_DOCS=true + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5 +$as_echo "yes, dependencies present" >&6; } + fi + else + as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5 + fi + + + # Choose cacerts source file # Check whether --with-cacerts-file was given. @@ -33124,10 +33651,9 @@ done if test -n "$TOOLCHAIN_PATH"; then PATH_save="$PATH" PATH="$TOOLCHAIN_PATH" - for ac_prog in $SEARCH_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args. +set dummy ${ac_tool_prefix}$SEARCH_LIST; 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_TOOLCHAIN_PATH_CC+:} false; then : @@ -33166,20 +33692,73 @@ $as_echo "no" >&6; } fi - test -n "$TOOLCHAIN_PATH_CC" && break +fi +if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then + ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC + # Extract the first word of "$SEARCH_LIST", so it can be a program name with args. +set dummy $SEARCH_LIST; 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_ac_pt_TOOLCHAIN_PATH_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_TOOLCHAIN_PATH_CC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # 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_ac_pt_TOOLCHAIN_PATH_CC="$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 +ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC +if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5 +$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then + TOOLCHAIN_PATH_CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC + fi +else + TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC" +fi CC=$TOOLCHAIN_PATH_CC PATH="$PATH_save" fi - # AC_PATH_PROGS can't be run multiple times with the same variable, + # AC_PATH_TOOL can't be run multiple times with the same variable, # so create a new name for this run. if test "x$CC" = x; then - for ac_prog in $SEARCH_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args. +set dummy ${ac_tool_prefix}$SEARCH_LIST; 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_POTENTIAL_CC+:} false; then : @@ -33218,8 +33797,62 @@ $as_echo "no" >&6; } fi - test -n "$POTENTIAL_CC" && break +fi +if test -z "$ac_cv_path_POTENTIAL_CC"; then + ac_pt_POTENTIAL_CC=$POTENTIAL_CC + # Extract the first word of "$SEARCH_LIST", so it can be a program name with args. +set dummy $SEARCH_LIST; 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_ac_pt_POTENTIAL_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_POTENTIAL_CC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # 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_ac_pt_POTENTIAL_CC="$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 +ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC +if test -n "$ac_pt_POTENTIAL_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5 +$as_echo "$ac_pt_POTENTIAL_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_POTENTIAL_CC" = x; then + POTENTIAL_CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + POTENTIAL_CC=$ac_pt_POTENTIAL_CC + fi +else + POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC" +fi CC=$POTENTIAL_CC fi @@ -34425,10 +35058,9 @@ done if test -n "$TOOLCHAIN_PATH"; then PATH_save="$PATH" PATH="$TOOLCHAIN_PATH" - for ac_prog in $SEARCH_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args. +set dummy ${ac_tool_prefix}$SEARCH_LIST; 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_TOOLCHAIN_PATH_CXX+:} false; then : @@ -34467,20 +35099,73 @@ $as_echo "no" >&6; } fi - test -n "$TOOLCHAIN_PATH_CXX" && break +fi +if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then + ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX + # Extract the first word of "$SEARCH_LIST", so it can be a program name with args. +set dummy $SEARCH_LIST; 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_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_TOOLCHAIN_PATH_CXX in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # 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_ac_pt_TOOLCHAIN_PATH_CXX="$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 +ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX +if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5 +$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then + TOOLCHAIN_PATH_CXX="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX + fi +else + TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX" +fi CXX=$TOOLCHAIN_PATH_CXX PATH="$PATH_save" fi - # AC_PATH_PROGS can't be run multiple times with the same variable, + # AC_PATH_TOOL can't be run multiple times with the same variable, # so create a new name for this run. if test "x$CXX" = x; then - for ac_prog in $SEARCH_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args. +set dummy ${ac_tool_prefix}$SEARCH_LIST; 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_POTENTIAL_CXX+:} false; then : @@ -34519,8 +35204,62 @@ $as_echo "no" >&6; } fi - test -n "$POTENTIAL_CXX" && break +fi +if test -z "$ac_cv_path_POTENTIAL_CXX"; then + ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX + # Extract the first word of "$SEARCH_LIST", so it can be a program name with args. +set dummy $SEARCH_LIST; 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_ac_pt_POTENTIAL_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_POTENTIAL_CXX in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # 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_ac_pt_POTENTIAL_CXX="$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 +ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX +if test -n "$ac_pt_POTENTIAL_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5 +$as_echo "$ac_pt_POTENTIAL_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_POTENTIAL_CXX" = x; then + POTENTIAL_CXX="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX + fi +else + POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX" +fi CXX=$POTENTIAL_CXX fi @@ -47875,173 +48614,63 @@ $as_echo "yes" >&6; } # Check whether --with-jtreg was given. if test "${with_jtreg+set}" = set; then : withval=$with_jtreg; -else - with_jtreg=no fi if test "x$with_jtreg" = xno; then # jtreg disabled - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5 -$as_echo_n "checking for jtreg... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5 +$as_echo_n "checking for jtreg test harness... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5 +$as_echo "no, disabled" >&6; } + elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then + # An explicit path is specified, use it. + JT_HOME="$with_jtreg" + if test ! -d "$JT_HOME"; then + as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5 + fi + + if test ! -e "$JT_HOME/lib/jtreg.jar"; then + as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5 + fi + + JTREGEXE="$JT_HOME/bin/jtreg" + if test ! -x "$JTREGEXE"; then + as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5 + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5 +$as_echo_n "checking for jtreg test harness... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5 +$as_echo "$JT_HOME" >&6; } else - if test "x$with_jtreg" != xyes; then - # with path specified. - JT_HOME="$with_jtreg" - fi - + # Try to locate jtreg if test "x$JT_HOME" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5 -$as_echo_n "checking for jtreg... " >&6; } - - # use JT_HOME enviroment var. - - # Only process if variable expands to non-empty - - if test "x$JT_HOME" != x; then - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - - # Input might be given as Windows format, start by converting to - # unix format. - path="$JT_HOME" - new_path=`$CYGPATH -u "$path"` - - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then - # "foo.exe" is OK but "foo" is an error. - # - # This test is therefore slightly more accurate than "test -f" to check for file precense. - # It is also a way to make sure we got the proper file name for the real test later on. - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` - if test "x$test_shortpath" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 -$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} - as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5 - fi - - # Call helper function which possibly converts this using DOS-style short mode. - # If so, the updated path is stored in $new_path. - - input_path="$new_path" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - shortmode_path=`$CYGPATH -s -m -a "$input_path"` - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then - # Going to short mode and back again did indeed matter. Since short mode is - # case insensitive, let's make it lowercase to improve readability. - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Now convert it back to Unix-style (cygpath) - input_path=`$CYGPATH -u "$shortmode_path"` - new_path="$input_path" - fi - fi - - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` - if test "x$test_cygdrive_prefix" = x; then - # As a simple fix, exclude /usr/bin since it's not a real path. - if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then - # The path is in a Cygwin special directory (e.g. /home). We need this converted to - # a path prefixed by /cygdrive for fixpath to work. - new_path="$CYGWIN_ROOT_PATH$input_path" - fi - fi - - - if test "x$path" != "x$new_path"; then - JT_HOME="$new_path" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 -$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} - fi - - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - - path="$JT_HOME" - has_colon=`$ECHO $path | $GREP ^.:` - new_path="$path" - if test "x$has_colon" = x; then - # Not in mixed or Windows style, start by that. - new_path=`cmd //c echo $path` - fi - - - input_path="$new_path" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - fi - - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - - if test "x$path" != "x$new_path"; then - JT_HOME="$new_path" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 -$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} - fi - - # Save the first 10 bytes of this path to the storage, so fixpath can work. - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") - - else - # We're on a unix platform. Hooray! :) - path="$JT_HOME" - has_space=`$ECHO "$path" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 -$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} - as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 - fi - - # Use eval to expand a potential ~ - eval path="$path" - if test ! -f "$path" && test ! -d "$path"; then - as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5 - fi - - if test -d "$path"; then - JT_HOME="`cd "$path"; $THEPWDCMD -L`" + # JT_HOME set in environment, use it + if test ! -d "$JT_HOME"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5 +$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;} + JT_HOME= else - dir="`$DIRNAME "$path"`" - base="`$BASENAME "$path"`" - JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base" + if test ! -e "$JT_HOME/lib/jtreg.jar"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5 +$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;} + JT_HOME= + elif test ! -x "$JT_HOME/bin/jtreg"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5 +$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;} + JT_HOME= + else + JTREGEXE="$JT_HOME/bin/jtreg" + { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5 +$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;} + fi fi fi - fi - - - # jtreg win32 script works for everybody - JTREGEXE="$JT_HOME/bin/jtreg" - - if test ! -f "$JTREGEXE"; then - as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5 - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 -$as_echo "$JTREGEXE" >&6; } - else - # try to find jtreg on path + if test "x$JT_HOME" = x; then + # JT_HOME is not set in environment, or was deemed invalid. + # Try to find jtreg on path # Publish this variable in the help. @@ -48239,13 +48868,451 @@ $as_echo "$tool_specified" >&6; } fi + if test "x$JTREGEXE" != x; then + # That's good, now try to derive JT_HOME + JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)` + if test ! -e "$JT_HOME/lib/jtreg.jar"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5 +$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;} + JT_HOME= + JTREGEXE= + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5 +$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;} + fi + fi + fi - if test "x$JTREGEXE" = x; then - as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5 +$as_echo_n "checking for jtreg test harness... " >&6; } + if test "x$JT_HOME" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5 +$as_echo "$JT_HOME" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5 +$as_echo "no, not found" >&6; } + + if test "x$with_jtreg" = xyes; then + as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5 + fi + fi fi - JT_HOME="`$DIRNAME $JTREGEXE`" + # Only process if variable expands to non-empty + + if test "x$JTREGEXE" != x; then + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + + # First separate the path from the arguments. This will split at the first + # space. + complete="$JTREGEXE" + path="${complete%% *}" + tmp="$complete EOL" + arguments="${tmp#* }" + + # Input might be given as Windows format, start by converting to + # unix format. + new_path=`$CYGPATH -u "$path"` + + # Now try to locate executable using which + new_path=`$WHICH "$new_path" 2> /dev/null` + # bat and cmd files are not always considered executable in cygwin causing which + # to not find them + if test "x$new_path" = x \ + && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ + && test "x`$LS \"$path\" 2>/dev/null`" != x; then + new_path=`$CYGPATH -u "$path"` + fi + if test "x$new_path" = x; then + # Oops. Which didn't find the executable. + # The splitting of arguments from the executable at a space might have been incorrect, + # since paths with space are more likely in Windows. Give it another try with the whole + # argument. + path="$complete" + arguments="EOL" + new_path=`$CYGPATH -u "$path"` + new_path=`$WHICH "$new_path" 2> /dev/null` + # bat and cmd files are not always considered executable in cygwin causing which + # to not find them + if test "x$new_path" = x \ + && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ + && test "x`$LS \"$path\" 2>/dev/null`" != x; then + new_path=`$CYGPATH -u "$path"` + fi + if test "x$new_path" = x; then + # It's still not found. Now this is an unrecoverable error. + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;} + has_space=`$ECHO "$complete" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 +$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} + fi + as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5 + fi + fi + + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then + # "foo.exe" is OK but "foo" is an error. + # + # This test is therefore slightly more accurate than "test -f" to check for file presence. + # It is also a way to make sure we got the proper file name for the real test later on. + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` + if test "x$test_shortpath" = x; then + # Short path failed, file does not exist as specified. + # Try adding .exe or .cmd + if test -f "${new_path}.exe"; then + input_to_shortpath="${new_path}.exe" + elif test -f "${new_path}.cmd"; then + input_to_shortpath="${new_path}.cmd" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 +$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} + as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5 + fi + else + input_to_shortpath="$new_path" + fi + + # Call helper function which possibly converts this using DOS-style short mode. + # If so, the updated path is stored in $new_path. + new_path="$input_to_shortpath" + + input_path="$input_to_shortpath" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + shortmode_path=`$CYGPATH -s -m -a "$input_path"` + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then + # Going to short mode and back again did indeed matter. Since short mode is + # case insensitive, let's make it lowercase to improve readability. + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Now convert it back to Unix-style (cygpath) + input_path=`$CYGPATH -u "$shortmode_path"` + new_path="$input_path" + fi + fi + + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` + if test "x$test_cygdrive_prefix" = x; then + # As a simple fix, exclude /usr/bin since it's not a real path. + if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then + # The path is in a Cygwin special directory (e.g. /home). We need this converted to + # a path prefixed by /cygdrive for fixpath to work. + new_path="$CYGWIN_ROOT_PATH$input_path" + fi + fi + + # remove trailing .exe if any + new_path="${new_path/%.exe/}" + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + # First separate the path from the arguments. This will split at the first + # space. + complete="$JTREGEXE" + path="${complete%% *}" + tmp="$complete EOL" + arguments="${tmp#* }" + + # Input might be given as Windows format, start by converting to + # unix format. + new_path="$path" + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + + # Now try to locate executable using which + new_path=`$WHICH "$new_path" 2> /dev/null` + + if test "x$new_path" = x; then + # Oops. Which didn't find the executable. + # The splitting of arguments from the executable at a space might have been incorrect, + # since paths with space are more likely in Windows. Give it another try with the whole + # argument. + path="$complete" + arguments="EOL" + new_path="$path" + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + + new_path=`$WHICH "$new_path" 2> /dev/null` + # bat and cmd files are not always considered executable in MSYS causing which + # to not find them + if test "x$new_path" = x \ + && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ + && test "x`$LS \"$path\" 2>/dev/null`" != x; then + new_path="$path" + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + fi + + if test "x$new_path" = x; then + # It's still not found. Now this is an unrecoverable error. + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;} + has_space=`$ECHO "$complete" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 +$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} + fi + as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5 + fi + fi + + # Now new_path has a complete unix path to the binary + if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then + # Keep paths in /bin as-is, but remove trailing .exe if any + new_path="${new_path/%.exe/}" + # Do not save /bin paths to all_fixpath_prefixes! + else + # Not in mixed or Windows style, start by that. + new_path=`cmd //c echo $new_path` + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + fi + + # Output is in $new_path + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + # remove trailing .exe if any + new_path="${new_path/%.exe/}" + + # Save the first 10 bytes of this path to the storage, so fixpath can work. + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") + fi + + else + # We're on a unix platform. Hooray! :) + # First separate the path from the arguments. This will split at the first + # space. + complete="$JTREGEXE" + path="${complete%% *}" + tmp="$complete EOL" + arguments="${tmp#* }" + + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + # This is an absolute path, we can use it without further modifications. + new_path="$path" + fi + + if test "x$new_path" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;} + has_space=`$ECHO "$complete" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 +$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} + fi + as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5 + fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi + + if test "x$complete" != "x$new_complete"; then + JTREGEXE="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;} + fi + fi + + + # Only process if variable expands to non-empty + + if test "x$JT_HOME" != x; then + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + + # Input might be given as Windows format, start by converting to + # unix format. + path="$JT_HOME" + new_path=`$CYGPATH -u "$path"` + + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then + # "foo.exe" is OK but "foo" is an error. + # + # This test is therefore slightly more accurate than "test -f" to check for file precense. + # It is also a way to make sure we got the proper file name for the real test later on. + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` + if test "x$test_shortpath" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5 + fi + + # Call helper function which possibly converts this using DOS-style short mode. + # If so, the updated path is stored in $new_path. + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + shortmode_path=`$CYGPATH -s -m -a "$input_path"` + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then + # Going to short mode and back again did indeed matter. Since short mode is + # case insensitive, let's make it lowercase to improve readability. + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Now convert it back to Unix-style (cygpath) + input_path=`$CYGPATH -u "$shortmode_path"` + new_path="$input_path" + fi + fi + + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` + if test "x$test_cygdrive_prefix" = x; then + # As a simple fix, exclude /usr/bin since it's not a real path. + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then + # The path is in a Cygwin special directory (e.g. /home). We need this converted to + # a path prefixed by /cygdrive for fixpath to work. + new_path="$CYGWIN_ROOT_PATH$input_path" + fi + fi + + + if test "x$path" != "x$new_path"; then + JT_HOME="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$JT_HOME" + has_colon=`$ECHO $path | $GREP ^.:` + new_path="$path" + if test "x$has_colon" = x; then + # Not in mixed or Windows style, start by that. + new_path=`cmd //c echo $path` + fi + + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + fi + + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + if test "x$path" != "x$new_path"; then + JT_HOME="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} + fi + + # Save the first 10 bytes of this path to the storage, so fixpath can work. + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") + + else + # We're on a unix platform. Hooray! :) + path="$JT_HOME" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 + fi + + # Use eval to expand a potential ~ + eval path="$path" + if test ! -f "$path" && test ! -d "$path"; then + as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + if test -d "$path"; then + JT_HOME="`cd "$path"; $THEPWDCMD -L`" + else + dir="`$DIRNAME "$path"`" + base="`$BASENAME "$path"`" + JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base" + fi fi fi @@ -49060,7 +50127,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; } SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" JVM_CFLAGS="$JVM_CFLAGS $PICFLAG" fi - SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' + SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)' SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1' @@ -49080,7 +50147,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; } # Linking is different on MacOSX PICFLAG='' SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" - SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' + SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)' SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1' @@ -52629,12 +53696,12 @@ $as_echo "no, forced" >&6; } # Only enable AOT on linux-X64. if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then - if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then + if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then ENABLE_AOT="true" else ENABLE_AOT="false" if test "x$enable_aot" = "xyes"; then - as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5 + as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5 fi fi else @@ -56642,6 +57709,12 @@ if test "${enable_freetype_bundling+set}" = set; then : fi +# Check whether --with-freetype-license was given. +if test "${with_freetype_license+set}" = set; then : + withval=$with_freetype_license; +fi + + # Need to specify explicitly since it needs to be overridden on some versions of macosx FREETYPE_BASE_NAME=freetype FREETYPE_CFLAGS= @@ -62588,6 +63661,153 @@ $as_echo "$BUNDLE_FREETYPE" >&6; } fi # end freetype needed + FREETYPE_LICENSE="" + if test "x$with_freetype_license" = "xyes"; then + as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5 + elif test "x$with_freetype_license" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5 +$as_echo_n "checking for freetype license... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5 +$as_echo "$with_freetype_license" >&6; } + FREETYPE_LICENSE="$with_freetype_license" + + # Only process if variable expands to non-empty + + if test "x$FREETYPE_LICENSE" != x; then + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + + # Input might be given as Windows format, start by converting to + # unix format. + path="$FREETYPE_LICENSE" + new_path=`$CYGPATH -u "$path"` + + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then + # "foo.exe" is OK but "foo" is an error. + # + # This test is therefore slightly more accurate than "test -f" to check for file precense. + # It is also a way to make sure we got the proper file name for the real test later on. + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` + if test "x$test_shortpath" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5 + fi + + # Call helper function which possibly converts this using DOS-style short mode. + # If so, the updated path is stored in $new_path. + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + shortmode_path=`$CYGPATH -s -m -a "$input_path"` + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then + # Going to short mode and back again did indeed matter. Since short mode is + # case insensitive, let's make it lowercase to improve readability. + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Now convert it back to Unix-style (cygpath) + input_path=`$CYGPATH -u "$shortmode_path"` + new_path="$input_path" + fi + fi + + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` + if test "x$test_cygdrive_prefix" = x; then + # As a simple fix, exclude /usr/bin since it's not a real path. + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then + # The path is in a Cygwin special directory (e.g. /home). We need this converted to + # a path prefixed by /cygdrive for fixpath to work. + new_path="$CYGWIN_ROOT_PATH$input_path" + fi + fi + + + if test "x$path" != "x$new_path"; then + FREETYPE_LICENSE="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$FREETYPE_LICENSE" + has_colon=`$ECHO $path | $GREP ^.:` + new_path="$path" + if test "x$has_colon" = x; then + # Not in mixed or Windows style, start by that. + new_path=`cmd //c echo $path` + fi + + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + fi + + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + if test "x$path" != "x$new_path"; then + FREETYPE_LICENSE="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;} + fi + + # Save the first 10 bytes of this path to the storage, so fixpath can work. + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") + + else + # We're on a unix platform. Hooray! :) + path="$FREETYPE_LICENSE" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 + fi + + # Use eval to expand a potential ~ + eval path="$path" + if test ! -f "$path" && test ! -d "$path"; then + as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + if test -d "$path"; then + FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`" + else + dir="`$DIRNAME "$path"`" + base="`$BASENAME "$path"`" + FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base" + fi + fi + fi + + if test ! -f "$FREETYPE_LICENSE"; then + as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5 + fi + fi + + @@ -64365,8 +65585,8 @@ $as_echo "$JVM_FEATURES" >&6; } JVM_FEATURES_jvmci="" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5 -$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5 +$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; } if [[ " $JVM_FEATURES " =~ " graal " ]] ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5 $as_echo "yes, forced" >&6; } diff --git a/common/autoconf/hotspot.m4 b/common/autoconf/hotspot.m4 index b295b015a9f..acf2a5fe185 100644 --- a/common/autoconf/hotspot.m4 +++ b/common/autoconf/hotspot.m4 @@ -215,12 +215,12 @@ AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_AOT], # Only enable AOT on linux-X64. if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then - if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then + if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then ENABLE_AOT="true" else ENABLE_AOT="false" if test "x$enable_aot" = "xyes"; then - AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot.]) + AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot.]) fi fi else @@ -327,7 +327,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES], JVM_FEATURES_jvmci="" fi - AC_MSG_CHECKING([if jdk.vm.compiler should be built]) + AC_MSG_CHECKING([if jdk.internal.vm.compiler should be built]) if HOTSPOT_CHECK_JVM_FEATURE(graal); then AC_MSG_RESULT([yes, forced]) if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 index bb2a49f4980..73e2d74ecd5 100644 --- a/common/autoconf/jdk-options.m4 +++ b/common/autoconf/jdk-options.m4 @@ -154,6 +154,55 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], AC_SUBST(ENABLE_HEADLESS_ONLY) + # Should we build the complete docs, or just a lightweight version? + AC_ARG_ENABLE([full-docs], [AS_HELP_STRING([--enable-full-docs], + [build complete documentation @<:@enabled if all tools found@:>@])]) + + # Verify dependencies + AC_MSG_CHECKING([for graphviz dot]) + if test "x$DOT" != "x"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no, cannot generate full docs]) + FULL_DOCS_DEP_MISSING=true + fi + + AC_MSG_CHECKING([for pandoc]) + if test "x$PANDOC" != "x"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no, cannot generate full docs]) + FULL_DOCS_DEP_MISSING=true + fi + + AC_MSG_CHECKING([full docs]) + if test "x$enable_full_docs" = xyes; then + if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then + AC_MSG_RESULT([no, missing dependencies]) + HELP_MSG_MISSING_DEPENDENCY([dot]) + AC_MSG_ERROR([Cannot enable full docs with missing dependencies. See above. $HELP_MSG]) + else + ENABLE_FULL_DOCS=true + AC_MSG_RESULT([yes, forced]) + fi + elif test "x$enable_full_docs" = xno; then + ENABLE_FULL_DOCS=false + AC_MSG_RESULT([no, forced]) + elif test "x$enable_full_docs" = x; then + # Check for prerequisites + if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then + ENABLE_FULL_DOCS=false + AC_MSG_RESULT([no, missing dependencies]) + else + ENABLE_FULL_DOCS=true + AC_MSG_RESULT([yes, dependencies present]) + fi + else + AC_MSG_ERROR([--enable-full-docs can only take yes or no]) + fi + + AC_SUBST(ENABLE_FULL_DOCS) + # Choose cacerts source file AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file], [specify alternative cacerts file])]) diff --git a/common/autoconf/lib-freetype.m4 b/common/autoconf/lib-freetype.m4 index e7790caa64b..17dd726e54c 100644 --- a/common/autoconf/lib-freetype.m4 +++ b/common/autoconf/lib-freetype.m4 @@ -194,6 +194,8 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE], [specify directory with freetype sources to automatically build the library (experimental, Windows-only)])]) AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling], [disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])]) + AC_ARG_WITH(freetype-license, [AS_HELP_STRING([--with-freetype-license], + [if bundling freetype, also bundle this license file])]) # Need to specify explicitly since it needs to be overridden on some versions of macosx FREETYPE_BASE_NAME=freetype @@ -443,7 +445,21 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE], fi # end freetype needed + FREETYPE_LICENSE="" + if test "x$with_freetype_license" = "xyes"; then + AC_MSG_ERROR([--with-freetype-license must have a value]) + elif test "x$with_freetype_license" != "x"; then + AC_MSG_CHECKING([for freetype license]) + AC_MSG_RESULT([$with_freetype_license]) + FREETYPE_LICENSE="$with_freetype_license" + BASIC_FIXUP_PATH(FREETYPE_LICENSE) + if test ! -f "$FREETYPE_LICENSE"; then + AC_MSG_ERROR([$FREETYPE_LICENSE cannot be found]) + fi + fi + AC_SUBST(FREETYPE_BUNDLE_LIB_PATH) AC_SUBST(FREETYPE_CFLAGS) AC_SUBST(FREETYPE_LIBS) + AC_SUBST(FREETYPE_LICENSE) ]) diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4 index 61010279a0e..0dbf74cbe12 100644 --- a/common/autoconf/platform.m4 +++ b/common/autoconf/platform.m4 @@ -436,32 +436,42 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER], AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES], [ if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then - REQUIRED_OS_NAME=SunOS - REQUIRED_OS_VERSION=5.10 + RELEASE_FILE_OS_NAME=SunOS fi if test "x$OPENJDK_TARGET_OS" = "xlinux"; then - REQUIRED_OS_NAME=Linux - REQUIRED_OS_VERSION=2.6 + RELEASE_FILE_OS_NAME=Linux fi if test "x$OPENJDK_TARGET_OS" = "xwindows"; then - REQUIRED_OS_NAME=Windows - if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then - REQUIRED_OS_VERSION=5.2 - else - REQUIRED_OS_VERSION=5.1 - fi + RELEASE_FILE_OS_NAME=Windows fi - if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then - REQUIRED_OS_NAME=Darwin - REQUIRED_OS_VERSION=11.2 + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + RELEASE_FILE_OS_NAME="Darwin" fi if test "x$OPENJDK_TARGET_OS" = "xaix"; then - REQUIRED_OS_NAME=AIX - REQUIRED_OS_VERSION=7.1 + RELEASE_FILE_OS_NAME="AIX" + fi + RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU} + + AC_SUBST(RELEASE_FILE_OS_NAME) + AC_SUBST(RELEASE_FILE_OS_ARCH) +]) + +AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES], +[ + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + OPENJDK_MODULE_TARGET_OS_NAME="macos" + else + OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS" fi - AC_SUBST(REQUIRED_OS_NAME) - AC_SUBST(REQUIRED_OS_VERSION) + if test "x$OPENJDK_TARGET_CPU" = xx86_64; then + OPENJDK_MODULE_TARGET_OS_ARCH="amd64" + else + OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU" + fi + + OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}" + AC_SUBST(OPENJDK_MODULE_TARGET_PLATFORM) ]) #%%% Build and target systems %%% @@ -478,6 +488,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET], PLATFORM_EXTRACT_TARGET_AND_BUILD PLATFORM_SETUP_TARGET_CPU_BITS + PLATFORM_SET_MODULE_TARGET_OS_VALUES PLATFORM_SET_RELEASE_FILE_OS_VALUES PLATFORM_SETUP_LEGACY_VARS ]) diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index bb6d2209c41..877ede9d9b1 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -101,9 +101,12 @@ OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@ OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@ OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@ -# Legacy OS values for use in release file. -REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@ -REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@ +# Target platform value in ModuleTarget class file attribute. +OPENJDK_MODULE_TARGET_PLATFORM:=@OPENJDK_MODULE_TARGET_PLATFORM@ + +# OS_* properties in release file +RELEASE_FILE_OS_NAME:=@RELEASE_FILE_OS_NAME@ +RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@ LIBM:=@LIBM@ LIBDL:=@LIBDL@ @@ -244,6 +247,8 @@ USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@ # Only build headless support or not ENABLE_HEADLESS_ONLY := @ENABLE_HEADLESS_ONLY@ +ENABLE_FULL_DOCS := @ENABLE_FULL_DOCS@ + # JDK_OUTPUTDIR specifies where a working jvm is built. # You can run $(JDK_OUTPUTDIR)/bin/java # Though the layout of the contents of $(JDK_OUTPUTDIR) is not @@ -266,9 +271,6 @@ BUNDLES_OUTPUTDIR=$(BUILD_OUTPUT)/bundles TESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support -# By default, output javadoc directly into image -JAVADOC_OUTPUTDIR = $(DOCS_IMAGE_DIR) - # This does not get overridden in a bootcycle build CONFIGURESUPPORT_OUTPUTDIR:=@CONFIGURESUPPORT_OUTPUTDIR@ BUILDJDK_OUTPUTDIR=$(BUILD_OUTPUT)/buildjdk @@ -310,6 +312,7 @@ DEFAULT_MAKE_TARGET:=@DEFAULT_MAKE_TARGET@ FREETYPE_LIBS:=@FREETYPE_LIBS@ FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@ FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@ +FREETYPE_LICENSE=@FREETYPE_LICENSE@ CUPS_CFLAGS:=@CUPS_CFLAGS@ ALSA_LIBS:=@ALSA_LIBS@ ALSA_CFLAGS:=@ALSA_CFLAGS@ @@ -574,20 +577,31 @@ BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS) # Use ?= as this can be overridden from bootcycle-spec.gmk BOOT_JDK_MODULAR ?= @BOOT_JDK_MODULAR@ -INTERIM_OVERRIDE_MODULES := java.compiler jdk.compiler \ - jdk.jdeps jdk.javadoc jdk.rmic +INTERIM_LANGTOOLS_OVERRIDE_MODULES := java.compiler jdk.compiler \ + jdk.jdeps jdk.javadoc +INTERIM_RMIC_OVERRIDE_MODULES := jdk.rmic ifeq ($(BOOT_JDK_MODULAR), true) - INTERIM_OVERRIDE_MODULES_ARGS = $(foreach m, $(INTERIM_OVERRIDE_MODULES), \ + INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS = $(foreach m, \ + $(INTERIM_LANGTOOLS_OVERRIDE_MODULES), \ --patch-module $m=$(BUILDTOOLS_OUTPUTDIR)/override_modules/$m) - INTERIM_LANGTOOLS_ARGS = $(INTERIM_OVERRIDE_MODULES_ARGS) + INTERIM_RMIC_OVERRIDE_MODULES_ARGS = $(foreach m, \ + $(INTERIM_LANGTOOLS_OVERRIDE_MODULES) \ + $(INTERIM_RMIC_OVERRIDE_MODULES), \ + --patch-module $m=$(BUILDTOOLS_OUTPUTDIR)/override_modules/$m) + INTERIM_LANGTOOLS_ARGS = $(INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS) JAVAC_MAIN_CLASS = -m jdk.compiler/com.sun.tools.javac.Main JAVADOC_MAIN_CLASS = -m jdk.javadoc/jdk.javadoc.internal.tool.Main else - INTERIM_OVERRIDE_MODULES_ARGS = \ + INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS = \ -Xbootclasspath/p:$(call PathList, \ $(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \ - $(INTERIM_OVERRIDE_MODULES))) - INTERIM_LANGTOOLS_ARGS = $(INTERIM_OVERRIDE_MODULES_ARGS) \ + $(INTERIM_LANGTOOLS_OVERRIDE_MODULES))) + INTERIM_RMIC_OVERRIDE_MODULES_ARGS = \ + -Xbootclasspath/p:$(call PathList, \ + $(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \ + $(INTERIM_LANGTOOLS_OVERRIDE_MODULES) \ + $(INTERIM_RMIC_OVERRIDE_MODULES))) + INTERIM_LANGTOOLS_ARGS = $(INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS) \ -cp $(BUILDTOOLS_OUTPUTDIR)/override_modules/jdk.compiler JAVAC_MAIN_CLASS = com.sun.tools.javac.Main JAVADOC_MAIN_CLASS = jdk.javadoc.internal.tool.Main @@ -637,6 +651,7 @@ MKDIR:=@MKDIR@ MV:=@MV@ NAWK:=@NAWK@ NICE:=@NICE@ +PANDOC:=@FIXPATH@ @PANDOC@ PATCH:=@PATCH@ PRINTF:=@PRINTF@ RM:=@RM@ @@ -665,6 +680,7 @@ OTOOL:=@OTOOL@ READELF:=@READELF@ EXPR:=@EXPR@ FILE:=@FILE@ +DOT:=@DOT@ HG:=@HG@ OBJCOPY:=@OBJCOPY@ SETFILE:=@SETFILE@ @@ -800,6 +816,8 @@ INTERIM_IMAGE_DIR := $(SUPPORT_OUTPUTDIR)/interim-image # Docs image DOCS_IMAGE_SUBDIR := docs DOCS_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_IMAGE_SUBDIR) +# Output docs directly into image +DOCS_OUTPUTDIR := $(DOCS_IMAGE_DIR) # Macosx bundles directory definitions JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle @@ -828,11 +846,6 @@ JRE_COMPACT3_BUNDLE_NAME := \ jre-$(VERSION_SHORT)+$(VERSION_BUILD)-compact3_$(OPENJDK_TARGET_BUNDLE_PLATFORM)_bin$(DEBUG_PART).tar.gz JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz JRE_SYMBOLS_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz -ifeq ($(OPENJDK_TARGET_OS), windows) - DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_demo$(DEBUG_PART).zip -else - DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_demo$(DEBUG_PART).tar.gz -endif TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz @@ -840,7 +853,6 @@ JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME) JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME) JDK_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME) JRE_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_SYMBOLS_BUNDLE_NAME) -DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DEMOS_BUNDLE_NAME) TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME) DOCS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_BUNDLE_NAME) diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 index 16b0df04b4f..fca9b065aab 100644 --- a/common/autoconf/toolchain.m4 +++ b/common/autoconf/toolchain.m4 @@ -440,7 +440,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION], # # $1 = compiler to test (CC or CXX) # $2 = human readable name of compiler (C or C++) -# $3 = list of compiler names to search for +# $3 = compiler name to search for AC_DEFUN([TOOLCHAIN_FIND_COMPILER], [ COMPILER_NAME=$2 @@ -482,15 +482,15 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER], if test -n "$TOOLCHAIN_PATH"; then PATH_save="$PATH" PATH="$TOOLCHAIN_PATH" - AC_PATH_PROGS(TOOLCHAIN_PATH_$1, $SEARCH_LIST) + AC_PATH_TOOL(TOOLCHAIN_PATH_$1, $SEARCH_LIST) $1=$TOOLCHAIN_PATH_$1 PATH="$PATH_save" fi - # AC_PATH_PROGS can't be run multiple times with the same variable, + # AC_PATH_TOOL can't be run multiple times with the same variable, # so create a new name for this run. if test "x[$]$1" = x; then - AC_PATH_PROGS(POTENTIAL_$1, $SEARCH_LIST) + AC_PATH_TOOL(POTENTIAL_$1, $SEARCH_LIST) $1=$POTENTIAL_$1 fi @@ -926,41 +926,82 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS], AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG], [ AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg], - [Regression Test Harness @<:@probed@:>@])], - [], - [with_jtreg=no]) + [Regression Test Harness @<:@probed@:>@])]) if test "x$with_jtreg" = xno; then # jtreg disabled - AC_MSG_CHECKING([for jtreg]) - AC_MSG_RESULT(no) - else - if test "x$with_jtreg" != xyes; then - # with path specified. - JT_HOME="$with_jtreg" + AC_MSG_CHECKING([for jtreg test harness]) + AC_MSG_RESULT([no, disabled]) + elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then + # An explicit path is specified, use it. + JT_HOME="$with_jtreg" + if test ! -d "$JT_HOME"; then + AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not exist]) fi + if test ! -e "$JT_HOME/lib/jtreg.jar"; then + AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home]) + fi + + JTREGEXE="$JT_HOME/bin/jtreg" + if test ! -x "$JTREGEXE"; then + AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable]) + fi + + AC_MSG_CHECKING([for jtreg test harness]) + AC_MSG_RESULT([$JT_HOME]) + else + # Try to locate jtreg if test "x$JT_HOME" != x; then - AC_MSG_CHECKING([for jtreg]) - - # use JT_HOME enviroment var. - BASIC_FIXUP_PATH([JT_HOME]) - - # jtreg win32 script works for everybody - JTREGEXE="$JT_HOME/bin/jtreg" - - if test ! -f "$JTREGEXE"; then - AC_MSG_ERROR([JTReg executable does not exist: $JTREGEXE]) + # JT_HOME set in environment, use it + if test ! -d "$JT_HOME"; then + AC_MSG_WARN([Ignoring JT_HOME pointing to invalid directory: $JT_HOME]) + JT_HOME= + else + if test ! -e "$JT_HOME/lib/jtreg.jar"; then + AC_MSG_WARN([Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME]) + JT_HOME= + elif test ! -x "$JT_HOME/bin/jtreg"; then + AC_MSG_WARN([Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME]) + JT_HOME= + else + JTREGEXE="$JT_HOME/bin/jtreg" + AC_MSG_NOTICE([Located jtreg using JT_HOME from environment]) + fi fi + fi - AC_MSG_RESULT($JTREGEXE) + if test "x$JT_HOME" = x; then + # JT_HOME is not set in environment, or was deemed invalid. + # Try to find jtreg on path + BASIC_PATH_PROGS(JTREGEXE, jtreg) + if test "x$JTREGEXE" != x; then + # That's good, now try to derive JT_HOME + JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)` + if test ! -e "$JT_HOME/lib/jtreg.jar"; then + AC_MSG_WARN([Ignoring jtreg from path since a valid jtreg home cannot be found]) + JT_HOME= + JTREGEXE= + else + AC_MSG_NOTICE([Located jtreg using jtreg executable in path]) + fi + fi + fi + + AC_MSG_CHECKING([for jtreg test harness]) + if test "x$JT_HOME" != x; then + AC_MSG_RESULT([$JT_HOME]) else - # try to find jtreg on path - BASIC_REQUIRE_PROGS(JTREGEXE, jtreg) - JT_HOME="`$DIRNAME $JTREGEXE`" + AC_MSG_RESULT([no, not found]) + + if test "x$with_jtreg" = xyes; then + AC_MSG_ERROR([--with-jtreg was specified, but no jtreg found.]) + fi fi fi + BASIC_FIXUP_EXECUTABLE(JTREGEXE) + BASIC_FIXUP_PATH(JT_HOME) AC_SUBST(JT_HOME) AC_SUBST(JTREGEXE) ]) diff --git a/common/bin/compare_exceptions.sh.incl b/common/bin/compare_exceptions.sh.incl index 8aa1df11f8d..f3158f3b4e5 100644 --- a/common/bin/compare_exceptions.sh.incl +++ b/common/bin/compare_exceptions.sh.incl @@ -38,25 +38,9 @@ fi if [ "$OPENJDK_TARGET_OS" = "linux" ]; then STRIP_BEFORE_COMPARE=" - ./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so - ./demo/jvmti/gctest/lib/libgctest.so - ./demo/jvmti/heapTracker/lib/libheapTracker.so - ./demo/jvmti/heapViewer/lib/libheapViewer.so - ./demo/jvmti/minst/lib/libminst.so - ./demo/jvmti/mtrace/lib/libmtrace.so - ./demo/jvmti/versionCheck/lib/libversionCheck.so - ./demo/jvmti/waiters/lib/libwaiters.so " ACCEPTED_BIN_DIFF=" - ./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so - ./demo/jvmti/gctest/lib/libgctest.so - ./demo/jvmti/heapTracker/lib/libheapTracker.so - ./demo/jvmti/heapViewer/lib/libheapViewer.so - ./demo/jvmti/minst/lib/libminst.so - ./demo/jvmti/mtrace/lib/libmtrace.so - ./demo/jvmti/versionCheck/lib/libversionCheck.so - ./demo/jvmti/waiters/lib/libwaiters.so ./lib/client/libjsig.so ./lib/client/libjvm.so ./lib/libattach.so @@ -151,15 +135,6 @@ fi if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then STRIP_BEFORE_COMPARE=" - ./demo/jni/Poller/lib/libPoller.so - ./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so - ./demo/jvmti/gctest/lib/libgctest.so - ./demo/jvmti/heapTracker/lib/libheapTracker.so - ./demo/jvmti/heapViewer/lib/libheapViewer.so - ./demo/jvmti/minst/lib/libminst.so - ./demo/jvmti/mtrace/lib/libmtrace.so - ./demo/jvmti/versionCheck/lib/libversionCheck.so - ./demo/jvmti/waiters/lib/libwaiters.so " SORT_SYMBOLS=" @@ -174,15 +149,6 @@ if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; SKIP_BIN_DIFF="true" ACCEPTED_SMALL_SIZE_DIFF=" - ./demo/jni/Poller/lib/libPoller.so - ./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so - ./demo/jvmti/gctest/lib/libgctest.so - ./demo/jvmti/heapTracker/lib/libheapTracker.so - ./demo/jvmti/heapViewer/lib/libheapViewer.so - ./demo/jvmti/minst/lib/libminst.so - ./demo/jvmti/mtrace/lib/libmtrace.so - ./demo/jvmti/versionCheck/lib/libversionCheck.so - ./demo/jvmti/waiters/lib/libwaiters.so ./lib/jli/libjli.so ./lib/jspawnhelper ./lib/libJdbcOdbc.so @@ -279,19 +245,9 @@ fi if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparcv9" ]; then STRIP_BEFORE_COMPARE=" - ./demo/jni/Poller/lib/libPoller.so - ./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so - ./demo/jvmti/gctest/lib/libgctest.so - ./demo/jvmti/heapTracker/lib/libheapTracker.so - ./demo/jvmti/heapViewer/lib/libheapViewer.so - ./demo/jvmti/minst/lib/libminst.so - ./demo/jvmti/mtrace/lib/libmtrace.so - ./demo/jvmti/versionCheck/lib/libversionCheck.so - ./demo/jvmti/waiters/lib/libwaiters.so " SORT_SYMBOLS=" - ./demo/jvmti/waiters/lib/libwaiters.so ./lib/libjsig.so ./lib/libfontmanager.so ./lib/libjimage.so @@ -305,15 +261,6 @@ if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparcv9" ] SKIP_BIN_DIFF="true" ACCEPTED_SMALL_SIZE_DIFF=" - ./demo/jni/Poller/lib/libPoller.so - ./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so - ./demo/jvmti/gctest/lib/libgctest.so - ./demo/jvmti/heapTracker/lib/libheapTracker.so - ./demo/jvmti/heapViewer/lib/libheapViewer.so - ./demo/jvmti/minst/lib/libminst.so - ./demo/jvmti/mtrace/lib/libmtrace.so - ./demo/jvmti/versionCheck/lib/libversionCheck.so - ./demo/jvmti/waiters/lib/libwaiters.so ./lib/client/libjvm.so ./lib/jli/libjli.so ./lib/jspawnhelper @@ -438,9 +385,6 @@ if [ "$OPENJDK_TARGET_OS" = "windows" ]; then # Probably should add all libs here ACCEPTED_SMALL_SIZE_DIFF=" - ./demo/jvmti/gctest/lib/gctest.dll - ./demo/jvmti/heapTracker/lib/heapTracker.dll - ./demo/jvmti/minst/lib/minst.dll ./bin/attach.dll ./bin/jsoundds.dll ./bin/client/jvm.dll @@ -579,14 +523,6 @@ if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then ./bin/wsgen ./bin/wsimport ./bin/xjc - ./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.dylib - ./demo/jvmti/gctest/lib/libgctest.dylib - ./demo/jvmti/heapTracker/lib/libheapTracker.dylib - ./demo/jvmti/heapViewer/lib/libheapViewer.dylib - ./demo/jvmti/minst/lib/libminst.dylib - ./demo/jvmti/mtrace/lib/libmtrace.dylib - ./demo/jvmti/versionCheck/lib/libversionCheck.dylib - ./demo/jvmti/waiters/lib/libwaiters.dylib ./Contents/Home/bin/_javaws ./Contents/Home/bin/javaws ./Contents/Home/bin/idlj diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh index 5d4f8eb7156..b5d6a6c938c 100644 --- a/common/bin/hgforest.sh +++ b/common/bin/hgforest.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -183,7 +183,7 @@ trap 'nice_exit' EXIT subrepos="corba jaxp jaxws langtools jdk hotspot nashorn" jdk_subrepos_extra="closed jdk/src/closed jdk/make/closed jdk/test/closed hotspot/make/closed hotspot/src/closed hotspot/test/closed" -subrepos_extra="$jdk_subrepos_extra deploy install sponsors pubs" +subrepos_extra="$jdk_subrepos_extra deploy install sponsors" # Only look in specific locations for possible forests (avoids long searches) pull_default="" diff --git a/common/bin/unshuffle_list.txt b/common/bin/unshuffle_list.txt index e5fe5af121d..73ccb0a0136 100644 --- a/common/bin/unshuffle_list.txt +++ b/common/bin/unshuffle_list.txt @@ -361,8 +361,8 @@ jdk/src/java.base/share/native/libverify/check_code.c : jdk/src/share/native/com jdk/src/java.base/share/native/libverify/check_format.c : jdk/src/share/native/common/check_format.c jdk/src/java.base/share/native/libverify/opcodes.in_out : jdk/src/share/native/common/opcodes.in_out jdk/src/java.base/share/native/libzip : jdk/src/share/native/java/util/zip -jdk/src/java.base/share/native/libzip/zlib-1.2.8 : jdk/src/share/native/java/util/zip/zlib-1.2.8 -jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java : jdk/src/share/native/java/util/zip/zlib-1.2.8/patches/ChangeLog_java +jdk/src/java.base/share/native/libzip/zlib : jdk/src/share/native/java/util/zip/zlib +jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java : jdk/src/share/native/java/util/zip/zlib/patches/ChangeLog_java jdk/src/java.base/unix/classes/java/io : jdk/src/solaris/classes/java/io jdk/src/java.base/unix/classes/java/lang : jdk/src/solaris/classes/java/lang jdk/src/java.base/unix/classes/java/net : jdk/src/solaris/classes/java/net diff --git a/common/bin/update-build-readme.sh b/common/bin/update-build-readme.sh deleted file mode 100644 index 9d1968a4c60..00000000000 --- a/common/bin/update-build-readme.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# Get an absolute path to this script, since that determines the top-level -# directory. -this_script_dir=`dirname $0` -TOPDIR=`cd $this_script_dir/../.. > /dev/null && pwd` - -GREP=grep -MD_FILE=$TOPDIR/README-builds.md -HTML_FILE=$TOPDIR/README-builds.html - -# Locate the markdown processor tool and check that it is the correct version. -locate_markdown_processor() { - if [ -z "$MARKDOWN" ]; then - MARKDOWN=`which markdown 2> /dev/null` - if [ -z "$MARKDOWN" ]; then - echo "Error: Cannot locate markdown processor" 1>&2 - exit 1 - fi - fi - - # Test version - MARKDOWN_VERSION=`$MARKDOWN -version | $GREP version` - if [ "x$MARKDOWN_VERSION" != "xThis is Markdown, version 1.0.1." ]; then - echo "Error: Expected markdown version 1.0.1." 1>&2 - echo "Actual version found: $MARKDOWN_VERSION" 1>&2 - echo "Download markdown here: https://daringfireball.net/projects/markdown/" 1>&2 - exit 1 - fi - -} - -# Verify that the source markdown file looks sound. -verify_source_code() { - TOO_LONG_LINES=`$GREP -E -e '^.{80}.+$' $MD_FILE` - if [ "x$TOO_LONG_LINES" != x ]; then - echo "Warning: The following lines are longer than 80 characters:" - $GREP -E -e '^.{80}.+$' $MD_FILE - fi -} - -# Convert the markdown file to html format. -process_source() { - echo "Generating html file from markdown" - cat > $HTML_FILE << END - - - OpenJDK Build README - - -END - markdown $MD_FILE >> $HTML_FILE - cat >> $HTML_FILE < - -END - echo "Done" -} - -locate_markdown_processor -verify_source_code -process_source diff --git a/common/conf/jib-profiles.js b/common/conf/jib-profiles.js index ff86de23a31..54ccfcecd52 100644 --- a/common/conf/jib-profiles.js +++ b/common/conf/jib-profiles.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -231,18 +231,16 @@ var getJibProfilesCommon = function (input, data) { // List of the main profile names used for iteration common.main_profile_names = [ "linux-x64", "linux-x86", "macosx-x64", "solaris-x64", - "solaris-sparcv9", "windows-x64", "windows-x86" + "solaris-sparcv9", "windows-x64", "windows-x86", + "linux-arm64", "linux-arm-vfp-hflt", "linux-arm-vfp-hflt-dyn" ]; // These are the base setttings for all the main build profiles. common.main_profile_base = { dependencies: ["boot_jdk", "gnumake", "jtreg"], default_make_targets: ["product-bundles", "test-bundles"], - configure_args: [ - "--with-version-opt=" + common.build_id, - "--enable-jtreg-failure-handler", - "--with-version-build=" + common.build_number - ] + configure_args: concat(["--enable-jtreg-failure-handler"], + versionArgs(input, common)) }; // Extra settings for debug profiles common.debug_suffix = "-debug"; @@ -268,10 +266,12 @@ var getJibProfilesCommon = function (input, data) { /** * Define common artifacts template for all main profiles - * @param pf - Name of platform in bundle names - * @param demo_ext - Type of extension for demo bundle + * @param o - Object containing data for artifacts */ - common.main_profile_artifacts = function (pf, demo_ext) { + common.main_profile_artifacts = function (o) { + var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version); + var jre_subdir = (o.jre_subdir != null ? o.jre_subdir : "jre-" + data.version); + var pf = o.platform return { artifacts: { jdk: { @@ -280,7 +280,7 @@ var getJibProfilesCommon = function (input, data) { "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin.tar.gz", "bundles/" + pf + "/\\1" ], - subdir: "jdk-" + data.version, + subdir: jdk_subdir, exploded: "images/jdk" }, jre: { @@ -289,7 +289,7 @@ var getJibProfilesCommon = function (input, data) { "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin.tar.gz", "bundles/" + pf + "/\\1" ], - subdir: "jre-" + data.version, + subdir: jre_subdir, exploded: "images/jre" }, test: { @@ -306,7 +306,7 @@ var getJibProfilesCommon = function (input, data) { "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-symbols.tar.gz", "bundles/" + pf + "/\\1" ], - subdir: "jdk-" + data.version, + subdir: jdk_subdir, exploded: "images/jdk" }, jre_symbols: { @@ -315,15 +315,8 @@ var getJibProfilesCommon = function (input, data) { "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-symbols.tar.gz", "bundles/" + pf + "/\\1" ], - subdir: "jre-" + data.version, + subdir: jre_subdir, exploded: "images/jre" - }, - demo: { - local: "bundles/\\(jdk.*demo." + demo_ext + "\\)", - remote: [ - "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_demo." + demo_ext, - "bundles/" + pf + "/\\1" - ], } } }; @@ -332,9 +325,12 @@ var getJibProfilesCommon = function (input, data) { /** * Define common artifacts template for all debug profiles - * @param pf - Name of platform in bundle names + * @param o - Object containing data for artifacts */ - common.debug_profile_artifacts = function (pf) { + common.debug_profile_artifacts = function (o) { + var jdk_subdir = "jdk-" + data.version + "/fastdebug"; + var jre_subdir = "jre-" + data.version + "/fastdebug"; + var pf = o.platform return { artifacts: { jdk: { @@ -343,7 +339,7 @@ var getJibProfilesCommon = function (input, data) { "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug.tar.gz", "bundles/" + pf + "/\\1" ], - subdir: "jdk-" + data.version, + subdir: jdk_subdir, exploded: "images/jdk" }, jre: { @@ -352,7 +348,7 @@ var getJibProfilesCommon = function (input, data) { "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug.tar.gz", "bundles/" + pf + "/\\1" ], - subdir: "jre-" + data.version, + subdir: jre_subdir, exploded: "images/jre" }, test: { @@ -369,7 +365,7 @@ var getJibProfilesCommon = function (input, data) { "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz", "bundles/" + pf + "/\\1" ], - subdir: "jdk-" + data.version, + subdir: jdk_subdir, exploded: "images/jdk" }, jre_symbols: { @@ -378,7 +374,7 @@ var getJibProfilesCommon = function (input, data) { "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz", "bundles/" + pf + "/\\1" ], - subdir: "jre-" + data.version, + subdir: jre_subdir, exploded: "images/jre" } } @@ -391,7 +387,7 @@ var getJibProfilesCommon = function (input, data) { // on such hardware. if (input.build_cpu == "sparcv9") { var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\""); - if (cpu_brand.trim() == 'SPARC-M7') { + if (cpu_brand.trim().match('SPARC-.7')) { boot_jdk_revision = "8u20"; boot_jdk_subdirpart = "1.8.0_20"; } @@ -401,6 +397,8 @@ var getJibProfilesCommon = function (input, data) { common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk" + common.boot_jdk_subdirpart + (input.build_os == "macosx" ? ".jdk/Contents/Home" : ""); + common.boot_jdk_platform = input.build_os + "-" + + (input.build_cpu == "x86" ? "i586" : input.build_cpu); return common; }; @@ -419,8 +417,9 @@ var getJibProfilesProfiles = function (input, common, data) { "linux-x64": { target_os: "linux", target_cpu: "x64", - dependencies: ["devkit"], - configure_args: concat(common.configure_args_64bit, "--with-zlib=system"), + dependencies: ["devkit", "graphviz", "pandoc"], + configure_args: concat(common.configure_args_64bit, + "--enable-full-docs", "--with-zlib=system"), default_make_targets: ["docs-bundles"], }, @@ -469,8 +468,43 @@ var getJibProfilesProfiles = function (input, common, data) { build_cpu: "x64", dependencies: ["devkit", "freetype"], configure_args: concat(common.configure_args_32bit), + }, + + "linux-arm64": { + target_os: "linux", + target_cpu: "aarch64", + build_cpu: "x64", + dependencies: ["devkit", "build_devkit", "cups", "headless_stubs"], + configure_args: [ + "--with-cpu-port=arm64", + "--with-jvm-variants=server", + "--openjdk-target=aarch64-linux-gnu", + "--enable-headless-only" + ], + }, + + "linux-arm-vfp-hflt": { + target_os: "linux", + target_cpu: "arm", + build_cpu: "x64", + dependencies: ["devkit", "build_devkit", "cups"], + configure_args: [ + "--with-jvm-variants=minimal1,client", + "--with-x=" + input.get("devkit", "install_path") + "/arm-linux-gnueabihf/libc/usr/X11R6-PI", + "--openjdk-target=arm-linux-gnueabihf", + "--with-abi-profile=arm-vfp-hflt" + ], + }, + + // Special version of the SE profile adjusted to be testable on arm64 hardware. + "linux-arm-vfp-hflt-dyn": { + configure_args: "--with-stdc++lib=dynamic" } }; + // Let linux-arm-vfp-hflt-dyn inherit everything from linux-arm-vfp-hflt + profiles["linux-arm-vfp-hflt-dyn"] = concatObjects( + profiles["linux-arm-vfp-hflt-dyn"], profiles["linux-arm-vfp-hflt"]); + // Add the base settings to all the main profiles common.main_profile_names.forEach(function (name) { profiles[name] = concatObjects(common.main_profile_base, profiles[name]); @@ -582,7 +616,7 @@ var getJibProfilesProfiles = function (input, common, data) { var testOnlyProfilesPrebuilt = { "run-test-prebuilt": { src: "src.conf", - dependencies: [ "jtreg", "gnumake", testedProfile + ".jdk", + dependencies: [ "jtreg", "gnumake", "boot_jdk", testedProfile + ".jdk", testedProfile + ".test", "src.full" ], work_dir: input.get("src.full", "install_path") + "/test", @@ -626,49 +660,53 @@ var getJibProfilesProfiles = function (input, common, data) { // // Define artifacts for profiles // - // Macosx bundles are named osx and Windows demo bundles use zip instead of + // Macosx bundles are named osx // tar.gz. var artifactData = { "linux-x64": { platform: "linux-x64", - demo_ext: "tar.gz" }, "linux-x86": { platform: "linux-x86", - demo_ext: "tar.gz" }, "macosx-x64": { platform: "osx-x64", - demo_ext: "tar.gz" + jdk_subdir: "jdk-" + data.version + ".jdk/Contents/Home", + jre_subdir: "jre-" + data.version + ".jre/Contents/Home" }, "solaris-x64": { platform: "solaris-x64", - demo_ext: "tar.gz" }, "solaris-sparcv9": { platform: "solaris-sparcv9", - demo_ext: "tar.gz" }, "windows-x64": { platform: "windows-x64", - demo_ext: "zip" }, "windows-x86": { platform: "windows-x86", - demo_ext: "zip" + }, + "linux-arm64": { + platform: "linux-arm64-vfp-hflt", + }, + "linux-arm-vfp-hflt": { + platform: "linux-arm32-vfp-hflt", + }, + "linux-arm-vfp-hflt-dyn": { + platform: "linux-arm32-vfp-hflt-dyn", } } // Generate common artifacts for all main profiles - common.main_profile_names.forEach(function (name) { + Object.keys(artifactData).forEach(function (name) { profiles[name] = concatObjects(profiles[name], - common.main_profile_artifacts(artifactData[name].platform, artifactData[name].demo_ext)); + common.main_profile_artifacts(artifactData[name])); }); // Generate common artifacts for all debug profiles - common.main_profile_names.forEach(function (name) { + Object.keys(artifactData).forEach(function (name) { var debugName = name + common.debug_suffix; profiles[debugName] = concatObjects(profiles[debugName], - common.debug_profile_artifacts(artifactData[name].platform)); + common.debug_profile_artifacts(artifactData[name])); }); // Extra profile specific artifacts @@ -689,7 +727,12 @@ var getJibProfilesProfiles = function (input, common, data) { artifacts: { jdk: { local: "bundles/\\(jdk.*bin.tar.gz\\)", - remote: "bundles/openjdk/GPL/linux-x64/\\1", + remote: [ + "bundles/openjdk/GPL/linux-x64/jdk-" + data.version + + "_linux-x64_bin.tar.gz", + "bundles/openjdk/GPL/linux-x64/\\1" + ], + subdir: "jdk-" + data.version }, jre: { local: "bundles/\\(jre.*bin.tar.gz\\)", @@ -697,20 +740,25 @@ var getJibProfilesProfiles = function (input, common, data) { }, test: { local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", - remote: "bundles/openjdk/GPL/linux-x64/\\1", + remote: [ + "bundles/openjdk/GPL/linux-x64/jdk-" + data.version + + "_linux-x64_bin-tests.tar.gz", + "bundles/openjdk/GPL/linux-x64/\\1" + ] }, jdk_symbols: { local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", - remote: "bundles/openjdk/GPL/linux-x64/\\1", + remote: [ + "bundles/openjdk/GPL/linux-x64/jdk-" + data.version + + "_linux-x64_bin-symbols.tar.gz", + "bundles/openjdk/GPL/linux-x64/\\1" + ], + subdir: "jdk-" + data.version }, jre_symbols: { local: "bundles/\\(jre.*bin-symbols.tar.gz\\)", remote: "bundles/openjdk/GPL/linux-x64/\\1", }, - demo: { - local: "bundles/\\(jdk.*demo.tar.gz\\)", - remote: "bundles/openjdk/GPL/linux-x64/\\1", - }, doc_api_spec: { local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)", remote: "bundles/openjdk/GPL/linux-x64/\\1", @@ -722,11 +770,29 @@ var getJibProfilesProfiles = function (input, common, data) { artifacts: { jdk: { local: "bundles/\\(jdk.*bin.tar.gz\\)", - remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", + remote: [ + "bundles/openjdk/GPL/linux-x86/jdk-" + data.version + + "_linux-x86_bin.tar.gz", + "bundles/openjdk/GPL/linux-x86/\\1" + ], + subdir: "jdk-" + data.version }, jdk_symbols: { local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", - remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", + remote: [ + "bundles/openjdk/GPL/linux-x86/jdk-" + data.version + + "_linux-x86_bin-symbols.tar.gz", + "bundles/openjdk/GPL/linux-x86/\\1" + ], + subdir: "jdk-" + data.version + }, + test: { + local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", + remote: [ + "bundles/openjdk/GPL/linux-x86/jdk-" + data.version + + "_linux-x86_bin-tests.tar.gz", + "bundles/openjdk/GPL/linux-x86/\\1" + ] }, jre: { // This regexp needs to not match the compact* files below @@ -752,7 +818,12 @@ var getJibProfilesProfiles = function (input, common, data) { artifacts: { jdk: { local: "bundles/\\(jdk.*bin.tar.gz\\)", - remote: "bundles/openjdk/GPL/windows-x86/\\1", + remote: [ + "bundles/openjdk/GPL/windows-x86/jdk-" + data.version + + "_windows-x86_bin.tar.gz", + "bundles/openjdk/GPL/windows-x86/\\1" + ], + subdir: "jdk-" + data.version }, jre: { local: "bundles/\\(jre.*bin.tar.gz\\)", @@ -760,19 +831,24 @@ var getJibProfilesProfiles = function (input, common, data) { }, test: { local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", - remote: "bundles/openjdk/GPL/windows-x86/\\1", + remote: [ + "bundles/openjdk/GPL/windows-x86/jdk-" + data.version + + "_windows-x86_bin-tests.tar.gz", + "bundles/openjdk/GPL/windows-x86/\\1" + ] }, jdk_symbols: { local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", - remote: "bundles/openjdk/GPL/windows-x86/\\1" + remote: [ + "bundles/openjdk/GPL/windows-x86/jdk-" + data.version + + "_windows-x86_bin-symbols.tar.gz", + "bundles/openjdk/GPL/windows-x86/\\1" + ], + subdir: "jdk-" + data.version }, jre_symbols: { local: "bundles/\\(jre.*bin-symbols.tar.gz\\)", remote: "bundles/openjdk/GPL/windows-x86/\\1", - }, - demo: { - local: "bundles/\\(jdk.*demo.zip\\)", - remote: "bundles/openjdk/GPL/windows-x86/\\1", } } }, @@ -817,6 +893,16 @@ var getJibProfilesProfiles = function (input, common, data) { } }); + // The windows ri profile needs to add the freetype license file + profilesRiFreetype = { + "windows-x86-ri": { + configure_args: "--with-freetype-license=" + + input.get("freetype", "install_path") + + "/freetype-2.7.1-v120-x86/freetype.md" + } + }; + profiles = concatObjects(profiles, profilesRiFreetype); + // Generate the missing platform attributes profiles = generatePlatformAttributes(profiles); profiles = generateDefaultMakeTargetsConfigureArg(common, profiles); @@ -832,15 +918,16 @@ var getJibProfilesProfiles = function (input, common, data) { */ var getJibProfilesDependencies = function (input, common) { - var boot_jdk_platform = input.build_os + "-" - + (input.build_cpu == "x86" ? "i586" : input.build_cpu); - var devkit_platform_revisions = { linux_x64: "gcc4.9.2-OEL6.4+1.1", macosx_x64: "Xcode6.3-MacOSX10.9+1.0", solaris_x64: "SS12u4-Solaris11u1+1.0", solaris_sparcv9: "SS12u4-Solaris11u1+1.0", - windows_x64: "VS2013SP4+1.0" + windows_x64: "VS2013SP4+1.0", + linux_aarch64: "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0", + linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0 + ? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0" + : "arm-linaro-4.7+1.0") }; var devkit_platform = (input.target_cpu == "x86" @@ -853,9 +940,9 @@ var getJibProfilesDependencies = function (input, common) { server: "javare", module: "jdk", revision: common.boot_jdk_revision, - checksum_file: boot_jdk_platform + "/MD5_VALUES", - file: boot_jdk_platform + "/jdk-" + common.boot_jdk_revision - + "-" + boot_jdk_platform + ".tar.gz", + checksum_file: common.boot_jdk_platform + "/MD5_VALUES", + file: common.boot_jdk_platform + "/jdk-" + common.boot_jdk_revision + + "-" + common.boot_jdk_platform + ".tar.gz", configure_args: "--with-boot-jdk=" + common.boot_jdk_home, environment_path: common.boot_jdk_home + "/bin" }, @@ -883,7 +970,7 @@ var getJibProfilesDependencies = function (input, common) { jtreg: { server: "javare", revision: "4.2", - build_number: "b05", + build_number: "b07", checksum_file: "MD5_VALUES", file: "jtreg_bin-4.2.zip", environment_name: "JT_HOME", @@ -911,9 +998,27 @@ var getJibProfilesDependencies = function (input, common) { freetype: { organization: common.organization, ext: "tar.gz", - revision: "2.3.4+1.0", + revision: "2.7.1-v120+1.0", module: "freetype-" + input.target_platform - } + }, + + graphviz: { + organization: common.organization, + ext: "tar.gz", + revision: "2.38.0-1+1.1", + module: "graphviz-" + input.target_platform, + configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot", + environment_path: input.get("graphviz", "install_path") + }, + + pandoc: { + organization: common.organization, + ext: "tar.gz", + revision: "1.17.2+1.0", + module: "pandoc-" + input.target_platform, + configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc", + environment_path: input.get("pandoc", "install_path") + "/pandoc" + }, }; return dependencies; @@ -1080,12 +1185,29 @@ var getVersion = function (major, minor, security, patch) { + "." + (minor != null ? minor : version_numbers.get("DEFAULT_VERSION_MINOR")) + "." + (security != null ? security : version_numbers.get("DEFAULT_VERSION_SECURITY")) + "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH")); - while (version.match(".*\.0$")) { + while (version.match(".*\\.0$")) { version = version.substring(0, version.length - 2); } return version; }; +/** + * Constructs the common version configure args based on build type and + * other version inputs + */ +var versionArgs = function(input, common) { + var args = ["--with-version-build=" + common.build_number]; + if (input.build_type == "promoted") { + args = concat(args, + // This needs to be changed when we start building release candidates + "--with-version-pre=ea", + "--without-version-opt"); + } else { + args = concat(args, "--with-version-opt=" + common.build_id); + } + return args; +} + // Properties representation of the common/autoconf/version-numbers file. Lazily // initiated by the function below. var version_numbers; diff --git a/common/doc/building.html b/common/doc/building.html new file mode 100644 index 00000000000..48ddbc1c6f4 --- /dev/null +++ b/common/doc/building.html @@ -0,0 +1,960 @@ + + + + + + + Building OpenJDK + + + + + + +
+

Building OpenJDK

+
+ +

TL;DR (Instructions for the Impatient)

+

If you are eager to try out building OpenJDK, these simple steps works most of the time. They assume that you have installed Mercurial (and Cygwin if running on Windows) and cloned the top-level OpenJDK repository that you want to build.

+
    +
  1. Get the complete source code:
    +bash get_source.sh

  2. +
  3. Run configure:
    +bash configure

    +

    If configure fails due to missing dependencies (to either the toolchain, external libraries or the boot JDK), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running bash configure again.

  4. +
  5. Run make:
    +make images

  6. +
  7. Verify your newly built JDK:
    +./build/*/images/jdk/bin/java -version

  8. +
  9. Run basic tests:
    +make run-test-tier1

  10. +
+

If any of these steps failed, or if you want to know more about build requirements or build functionality, please continue reading this document.

+

Introduction

+

OpenJDK is a complex software project. Building it requires a certain amount of technical expertise, a fair number of dependencies on external software, and reasonably powerful hardware.

+

If you just want to use OpenJDK and not build it yourself, this document is not for you. See for instance OpenJDK installation for some methods of installing a prebuilt OpenJDK.

+

Getting the Source Code

+

OpenJDK uses Mercurial for source control. The source code is contained not in a single Mercurial repository, but in a tree ("forest") of interrelated repositories. You will need to check out all of the repositories to be able to build OpenJDK. To assist you in dealing with this somewhat unusual arrangement, there are multiple tools available, which are explained below.

+

In any case, make sure you are getting the correct version. At the OpenJDK Mercurial server you can see a list of all available forests. If you want to build an older version, e.g. JDK 8, it is recommended that you get the jdk8u forest, which contains incremental updates, instead of the jdk8 forest, which was frozen at JDK 8 GA.

+

If you are new to Mercurial, a good place to start is the Mercurial Beginner's Guide. The rest of this document assumes a working knowledge of Mercurial.

+

Special Considerations

+

For a smooth building experience, it is recommended that you follow these rules on where and how to check out the source code.

+
    +
  • Do not check out the source code in a path which contains spaces. Chances are the build will not work. This is most likely to be an issue on Windows systems.

  • +
  • Do not check out the source code in a path which has a very long name or is nested many levels deep. Chances are you will hit an OS limitation during the build.

  • +
  • Put the source code on a local disk, not a network share. If possible, use an SSD. The build process is very disk intensive, and having slow disk access will significantly increase build times. If you need to use a network share for the source code, see below for suggestions on how to keep the build artifacts on a local disk.

  • +
  • On Windows, extra care must be taken to make sure the Cygwin environment is consistent. It is recommended that you follow this procedure:

    +
      +
    • Create the directory that is going to contain the top directory of the OpenJDK clone by using the mkdir command in the Cygwin bash shell. That is, do not create it using Windows Explorer. This will ensure that it will have proper Cygwin attributes, and that it's children will inherit those attributes.

    • +
    • Do not put the OpenJDK clone in a path under your Cygwin home directory. This is especially important if your user name contains spaces and/or mixed upper and lower case letters.

    • +
    • Clone the OpenJDK repository using the Cygwin command line hg client as instructed in this document. That is, do not use another Mercurial client such as TortoiseHg.

    • +
    +

    Failure to follow this procedure might result in hard-to-debug build problems.

  • +
+

Using get_source.sh

+

The simplest way to get the entire forest is probably to clone the top-level repository and then run the get_source.sh script, like this:

+
hg clone http://hg.openjdk.java.net/jdk9/jdk9
+cd jdk9
+bash get_source.sh
+

The first time this is run, it will clone all the sub-repositories. Any subsequent execution of the script will update all sub-repositories to the latest revision.

+

Using hgforest.sh

+

The hgforest.sh script is more expressive than get_source.sh. It takes any number of arguments, and runs hg with those arguments on each sub-repository in the forest. The get_source.sh script is basically a simple wrapper that runs either hgforest.sh clone or hgforest.sh pull -u.

+
    +
  • Cloning the forest:

    +
    hg clone http://hg.openjdk.java.net/jdk9/jdk9
    +cd jdk9
    +bash common/bin/hgforest.sh clone
  • +
  • Pulling and updating the forest:

    +
    bash common/bin/hgforest.sh pull -u
  • +
  • Merging over the entire forest:

    +
    bash common/bin/hgforest.sh merge
  • +
+

Using the Trees Extension

+

The trees extension is a Mercurial add-on that helps you deal with the forest. More information is available on the Code Tools trees page.

+

Installing the Extension

+

Install the extension by cloning http://hg.openjdk.java.net/code-tools/trees and updating your .hgrc file. Here's one way to do this:

+
cd ~
+mkdir hg-ext
+cd hg-ext
+hg clone http://hg.openjdk.java.net/code-tools/trees
+cat << EOT >> ~/.hgrc
+[extensions]
+trees=~/hg-ext/trees/trees.py
+EOT
+

Initializing the Tree

+

The trees extension needs to know the structure of the forest. If you have already cloned the entire forest using another method, you can initialize the forest like this:

+
hg tconf --set --walk --depth
+

Or you can clone the entire forest at once, if you substitute clone with tclone when cloning the top-level repository, e.g. like this:

+
hg tclone http://hg.openjdk.java.net/jdk9/jdk9
+

In this case, the forest will be properly initialized from the start.

+

Other Operations

+

The trees extensions supplement many common operations with a trees version by prefixing a t to the normal Mercurial command, e.g. tcommit, tstatus or tmerge. For instance, to update the entire forest:

+
hg tpull -u
+

Build Hardware Requirements

+

OpenJDK is a massive project, and require machines ranging from decent to powerful to be able to build in a reasonable amount of time, or to be able to complete a build at all.

+

We strongly recommend usage of an SSD disk for the build, since disk speed is one of the limiting factors for build performance.

+

Building on x86

+

At a minimum, a machine with 2-4 cores is advisable, as well as 2-4 GB of RAM. (The more cores to use, the more memory you need.) At least 6 GB of free disk space is required (8 GB minimum for building on Solaris).

+

Even for 32-bit builds, it is recommended to use a 64-bit build machine, and instead create a 32-bit target using --with-target-bits=32.

+

Building on sparc

+

At a minimum, a machine with 4 cores is advisable, as well as 4 GB of RAM. (The more cores to use, the more memory you need.) At least 8 GB of free disk space is required.

+

Building on arm/aarch64

+

This is not recommended. Instead, see the section on Cross-compiling.

+

Operating System Requirements

+

The mainline OpenJDK project supports Linux, Solaris, macOS, AIX and Windows. Support for other operating system, e.g. BSD, exists in separate "port" projects.

+

In general, OpenJDK can be built on a wide range of versions of these operating systems, but the further you deviate from what is tested on a daily basis, the more likely you are to run into problems.

+

This table lists the OS versions used by Oracle when building JDK 9. Such information is always subject to change, but this table is up to date at the time of writing.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Operating systemVendor/version used
LinuxOracle Enterprise Linux 6.4 / 7.1 (using kernel 3.8.13)
SolarisSolaris 11.1 SRU 21.4.1 / 11.2 SRU 5.5
macOSMac OS X 10.9 (Mavericks) / 10.10 (Yosemite)
WindowsWindows Server 2012 R2
+

The double version numbers for Linux, Solaris and macOS is due to the hybrid model used at Oracle, where header files and external libraries from an older version is used when building on a more modern version of the OS.

+

The Build Group has a wiki page with Supported Build Platforms. From time to time, this is updated by the community to list successes or failures of building on different platforms.

+

Windows

+

Windows XP is not a supported platform, but all newer Windows should be able to build OpenJDK.

+

On Windows, it is important that you pay attention to the instructions in the Special Considerations.

+

Windows is the only non-POSIX OS supported by OpenJDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. For OpenJDK 9, the only supported such layer is Cygwin. (Msys is no longer supported due to a too old bash; msys2 and the new Windows Subsystem for Linux (WSL) would likely be possible to support in a future version but that would require a community effort to implement.)

+

Internally in the build system, all paths are represented as Unix-style paths, e.g. /cygdrive/c/hg/jdk9/Makefile rather than C:\hg\jdk9\Makefile. This rule also applies to input to the build system, e.g. in arguments to configure. So, use --with-freetype=/cygdrive/c/freetype rather than --with-freetype=c:\freetype. For details on this conversion, see the section on Fixpath.

+

Cygwin

+

A functioning Cygwin environment is thus required for building OpenJDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.

+

Note: Cygwin has a model of continuously updating all packages without any easy way to install or revert to a specific version of a package. This means that whenever you add or update a package in Cygwin, you might (inadvertently) update tools that are used by the OpenJDK build process, and that can cause unexpected build problems.

+

OpenJDK requires GNU Make 4.0 or greater on Windows. This is usually not a problem, since Cygwin currently only distributes GNU Make at a version above 4.0.

+

Apart from the basic Cygwin installation, the following packages must also be installed:

+
    +
  • make
  • +
  • zip
  • +
  • unzip
  • +
+

Often, you can install these packages using the following command line:

+
<path to Cygwin setup>/setup-x86_64 -q -P make -P unzip -P zip
+

Unfortunately, Cygwin can be unreliable in certain circumstances. If you experience build tool crashes or strange issues when building on Windows, please check the Cygwin FAQ on the "BLODA" list and the section on fork() failures.

+

Solaris

+

See make/devkit/solaris11.1-package-list.txt for a list of recommended packages to install when building on Solaris. The versions specified in this list is the versions used by the daily builds at Oracle, and is likely to work properly.

+

Older versions of Solaris shipped a broken version of objcopy. At least version 2.21.1 is needed, which is provided by Solaris 11 Update 1. Objcopy is needed if you want to have external debug symbols. Please make sure you are using at least version 2.21.1 of objcopy, or that you disable external debug symbols.

+

macOS

+

Apple is using a quite aggressive scheme of pushing OS updates, and coupling these updates with required updates of Xcode. Unfortunately, this makes it difficult for a project like OpenJDK to keep pace with a continuously updated machine running macOS. See the section on Apple Xcode on some strategies to deal with this.

+

It is recommended that you use at least Mac OS X 10.9 (Mavericks). At the time of writing, OpenJDK has been successfully compiled on macOS versions up to 10.12.5 (Sierra), using XCode 8.3.2 and --disable-warnings-as-errors.

+

The standard macOS environment contains the basic tooling needed to build, but for external libraries a package manager is recommended. OpenJDK uses homebrew in the examples, but feel free to use whatever manager you want (or none).

+

Linux

+

It is often not much problem to build OpenJDK on Linux. The only general advice is to try to use the compilers, external libraries and header files as provided by your distribution.

+

The basic tooling is provided as part of the core operating system, but you will most likely need to install developer packages.

+

For apt-based distributions (Debian, Ubuntu, etc), try this:

+
sudo apt-get install build-essential
+

For rpm-based distributions (Fedora, Red Hat, etc), try this:

+
sudo yum groupinstall "Development Tools"
+

AIX

+

The regular builds by SAP is using AIX version 7.1, but AIX 5.3 is also supported. See the OpenJDK PowerPC Port Status Page for details.

+

Native Compiler (Toolchain) Requirements

+

Large portions of OpenJDK consists of native code, that needs to be compiled to be able to run on the target platform. In theory, toolchain and operating system should be independent factors, but in practice there's more or less a one-to-one correlation between target operating system and toolchain.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Operating systemSupported toolchain
Linuxgcc, clang
macOSApple Xcode (using clang)
SolarisOracle Solaris Studio
AIXIBM XL C/C++
WindowsMicrosoft Visual Studio
+

Please see the individual sections on the toolchains for version recommendations. As a reference, these versions of the toolchains are used, at the time of writing, by Oracle for the daily builds of OpenJDK. It should be possible to compile OpenJDK with both older and newer versions, but the closer you stay to this list, the more likely you are to compile successfully without issues.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Operating systemToolchain version
Linuxgcc 4.9.2
macOSApple Xcode 6.3 (using clang 6.1.0)
SolarisOracle Solaris Studio 12.4 (with compiler version 5.13)
WindowsMicrosoft Visual Studio 2013 update 4
+

gcc

+

The minimum accepted version of gcc is 4.3. Older versions will not be accepted by configure.

+

However, gcc 4.3 is quite old and OpenJDK is not regularly tested on this version, so it is recommended to use a more modern gcc.

+

OpenJDK 9 includes patches that should allow gcc 6 to compile, but this should be considered experimental.

+

In general, any version between these two should be usable.

+

clang

+

The minimum accepted version of clang is 3.2. Older versions will not be accepted by configure.

+

To use clang instead of gcc on Linux, use --with-toolchain-type=clang.

+

Apple Xcode

+

The oldest supported version of Xcode is 5.

+

You will need the Xcode command lines developers tools to be able to build OpenJDK. (Actually, only the command lines tools are needed, not the IDE.) The simplest way to install these is to run:

+
xcode-select --install
+

It is advisable to keep an older version of Xcode for building OpenJDK when updating Xcode. This blog page has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use xcode-select -s before running configure, or use --with-toolchain-path to point to the version of Xcode to use, e.g. configure --with-toolchain-path=/Applications/Xcode5.app/Contents/Developer/usr/bin

+

If you have recently (inadvertently) updated your OS and/or Xcode version, and OpenJDK can no longer be built, please see the section on Problems with the Build Environment, and Getting Help to find out if there are any recent, non-merged patches available for this update.

+

Oracle Solaris Studio

+

The minimum accepted version of the Solaris Studio compilers is 5.13 (corresponding to Solaris Studio 12.4). Older versions will not be accepted by configure.

+

The Solaris Studio installation should contain at least these packages:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PackageVersion
developer/solarisstudio-124/backend12.4-1.0.6.0
developer/solarisstudio-124/c++12.4-1.0.10.0
developer/solarisstudio-124/cc12.4-1.0.4.0
developer/solarisstudio-124/library/c++-libs12.4-1.0.10.0
developer/solarisstudio-124/library/math-libs12.4-1.0.0.1
developer/solarisstudio-124/library/studio-gccrt12.4-1.0.0.1
developer/solarisstudio-124/studio-common12.4-1.0.0.1
developer/solarisstudio-124/studio-ja12.4-1.0.0.1
developer/solarisstudio-124/studio-legal12.4-1.0.0.1
developer/solarisstudio-124/studio-zhCN12.4-1.0.0.1
+

Compiling with Solaris Studio can sometimes be finicky. This is the exact version used by Oracle, which worked correctly at the time of writing:

+
$ cc -V
+cc: Sun C 5.13 SunOS_i386 2014/10/20
+$ CC -V
+CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30
+

Microsoft Visual Studio

+

The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by configure. The maximum accepted version of Visual Studio is 2013.

+

If you have multiple versions of Visual Studio installed, configure will by default pick the latest. You can request a specific version to be used by setting --with-toolchain-version, e.g. --with-toolchain-version=2010.

+

If you get LINK: fatal error LNK1123: failure during conversion to COFF: file invalid when building using Visual Studio 2010, you have encountered KB2757355, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See this stackoverflow discussion for other suggestions.

+

IBM XL C/C++

+

The regular builds by SAP is using version 12.1, described as IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017.

+

See the OpenJDK PowerPC Port Status Page for details.

+

Boot JDK Requirements

+

Paradoxically, building OpenJDK requires a pre-existing JDK. This is called the "boot JDK". The boot JDK does not have to be OpenJDK, though. If you are porting OpenJDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.

+

The rule of thumb is that the boot JDK for building JDK major version N should be an JDK of major version N-1, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, OpenJDK should be able to "build itself", so an up-to-date build of the current OpenJDK source is an acceptable alternative. If you are following the N-1 rule, make sure you got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.

+

If the Boot JDK is not automatically detected, or the wrong JDK is picked, use --with-boot-jdk to point to the JDK to use.

+

JDK 8 on Linux

+

On apt-based distros (like Debian and Ubuntu), sudo apt-get install openjdk-8-jdk is typically enough to install OpenJDK 8. On rpm-based distros (like Fedora and Red Hat), try sudo yum install java-1.8.0-openjdk-devel.

+

JDK 8 on Windows

+

No pre-compiled binaries of OpenJDK 8 are readily available for Windows at the time of writing. An alternative is to download the Oracle JDK. Another is the Adopt OpenJDK Project, which publishes experimental prebuilt binaries for Windows.

+

JDK 8 on macOS

+

No pre-compiled binaries of OpenJDK 8 are readily available for macOS at the time of writing. An alternative is to download the Oracle JDK, or to install it using brew cask install java. Another option is the Adopt OpenJDK Project, which publishes experimental prebuilt binaries for macOS.

+

JDK 8 on AIX

+

No pre-compiled binaries of OpenJDK 8 are readily available for AIX at the time of writing. A starting point for working with OpenJDK on AIX is the PowerPC/AIX Port Project.

+

External Library Requirements

+

Different platforms require different external libraries. In general, libraries are not optional - that is, they are either required or not used.

+

If a required library is not detected by configure, you need to provide the path to it. There are two forms of the configure arguments to point to an external library: --with-<LIB>=<path> or --with-<LIB>-include=<path to include> --with-<LIB>-lib=<path to lib>. The first variant is more concise, but require the include files an library files to reside in a default hierarchy under this directory. In most cases, it works fine.

+

As a fallback, the second version allows you to point to the include directory and the lib directory separately.

+

FreeType

+

FreeType2 from The FreeType Project is required on all platforms. At least version 2.3 is required.

+
    +
  • To install on an apt-based Linux, try running sudo apt-get install libcups2-dev.
  • +
  • To install on an rpm-based Linux, try running sudo yum install cups-devel.
  • +
  • To install on Solaris, try running pkg install system/library/freetype-2.
  • +
  • To install on macOS, try running brew install freetype.
  • +
  • To install on Windows, see below.
  • +
+

Use --with-freetype=<path> if configure does not properly locate your FreeType files.

+

Building FreeType on Windows

+

On Windows, there is no readily available compiled version of FreeType. OpenJDK can help you compile FreeType from source. Download the FreeType sources and unpack them into an arbitrary directory:

+
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
+tar -xzf freetype-2.5.3.tar.gz
+

Then run configure with --with-freetype-src=<freetype_src>. This will automatically build the freetype library into <freetype_src>/lib64 for 64-bit builds or into <freetype_src>/lib32 for 32-bit builds. Afterwards you can always use --with-freetype-include=<freetype_src>/include and --with-freetype-lib=<freetype_src>/lib[32|64] for other builds.

+

Alternatively you can unpack the sources like this to use the default directory:

+
tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz
+

CUPS

+

CUPS, Common UNIX Printing System header files are required on all platforms, except Windows. Often these files are provided by your operating system.

+
    +
  • To install on an apt-based Linux, try running sudo apt-get install libcups2-dev.
  • +
  • To install on an rpm-based Linux, try running sudo yum install cups-devel.
  • +
  • To install on Solaris, try running pkg install print/cups.
  • +
+

Use --with-cups=<path> if configure does not properly locate your CUPS files.

+

X11

+

Certain X11 libraries and include files are required on Linux and Solaris.

+
    +
  • To install on an apt-based Linux, try running sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev.
  • +
  • To install on an rpm-based Linux, try running sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel.
  • +
  • To install on Solaris, try running pkg install x11/header/x11-protocols x11/library/libice x11/library/libpthread-stubs x11/library/libsm x11/library/libx11 x11/library/libxau x11/library/libxcb x11/library/libxdmcp x11/library/libxevie x11/library/libxext x11/library/libxrender x11/library/libxscrnsaver x11/library/libxtst x11/library/toolkit/libxt.
  • +
+

Use --with-x=<path> if configure does not properly locate your X11 files.

+

ALSA

+

ALSA, Advanced Linux Sound Architecture is required on Linux. At least version 0.9.1 of ALSA is required.

+
    +
  • To install on an apt-based Linux, try running sudo apt-get install libasound2-dev.
  • +
  • To install on an rpm-based Linux, try running sudo yum install alsa-lib-devel.
  • +
+

Use --with-alsa=<path> if configure does not properly locate your ALSA files.

+

libffi

+

libffi, the Portable Foreign Function Interface Library is required when building the Zero version of Hotspot.

+
    +
  • To install on an apt-based Linux, try running sudo apt-get install libffi-dev.
  • +
  • To install on an rpm-based Linux, try running sudo yum install libffi-devel.
  • +
+

Use --with-libffi=<path> if configure does not properly locate your libffi files.

+

libelf

+

libelf from the elfutils project is required when building the AOT feature of Hotspot.

+
    +
  • To install on an apt-based Linux, try running sudo apt-get install libelf-dev.
  • +
  • To install on an rpm-based Linux, try running sudo yum install elfutils-libelf-devel.
  • +
+

Use --with-libelf=<path> if configure does not properly locate your libelf files.

+

Other Tooling Requirements

+

GNU Make

+

OpenJDK requires GNU Make. No other flavors of make are supported.

+

At least version 3.81 of GNU Make must be used. For distributions supporting GNU Make 4.0 or above, we strongly recommend it. GNU Make 4.0 contains useful functionality to handle parallel building (supported by --with-output-sync) and speed and stability improvements.

+

Note that configure locates and verifies a properly functioning version of make and stores the path to this make binary in the configuration. If you start a build using make on the command line, you will be using the version of make found first in your PATH, and not necessarily the one stored in the configuration. This initial make will be used as "bootstrap make", and in a second stage, the make located by configure will be called. Normally, this will present no issues, but if you have a very old make, or a non-GNU Make make in your path, this might cause issues.

+

If you want to override the default make found by configure, use the MAKE configure variable, e.g. configure MAKE=/opt/gnu/make.

+

On Solaris, it is common to call the GNU version of make by using gmake.

+

GNU Bash

+

OpenJDK requires GNU Bash. No other shells are supported.

+

At least version 3.2 of GNU Bash must be used.

+

Autoconf

+

If you want to modify the build system itself, you need to install Autoconf.

+

However, if you only need to build OpenJDK or if you only edit the actual OpenJDK source files, there is no dependency on autoconf, since the source distribution includes a pre-generated configure shell script.

+

See the section on Autoconf Details for details on how OpenJDK uses autoconf. This is especially important if you plan to contribute changes to OpenJDK that modifies the build system.

+

Running Configure

+

To build OpenJDK, you need a "configuration", which consists of a directory where to store the build output, coupled with information about the platform, the specific build machine, and choices that affect how OpenJDK is built.

+

The configuration is created by the configure script. The basic invocation of the configure script looks like this:

+
bash configure [options]
+

This will create an output directory containing the configuration and setup an area for the build result. This directory typically looks like build/linux-x64-normal-server-release, but the actual name depends on your specific configuration. (It can also be set directly, see Using Multiple Configurations). This directory is referred to as $BUILD in this documentation.

+

configure will try to figure out what system you are running on and where all necessary build components are. If you have all prerequisites for building installed, it should find everything. If it fails to detect any component automatically, it will exit and inform you about the problem.

+

Some command line examples:

+
    +
  • Create a 32-bit build for Windows with FreeType2 in C:\freetype-i586:

    +
    bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32
  • +
  • Create a debug build with the server JVM and DTrace enabled:

    +
    bash configure --enable-debug --with-jvm-variants=server --enable-dtrace
  • +
+

Common Configure Arguments

+

Here follows some of the most common and important configure argument.

+

To get up-to-date information on all available configure argument, please run:

+
bash configure --help
+

(Note that this help text also include general autoconf options, like --dvidir, that is not relevant to OpenJDK. To list only OpenJDK specific features, use bash configure --help=short instead.)

+

Configure Arguments for Tailoring the Build

+
    +
  • --enable-debug - Set the debug level to fastdebug (this is a shorthand for --with-debug-level=fastdebug)
  • +
  • --with-debug-level=<level> - Set the debug level, which can be release, fastdebug, slowdebug or optimized. Default is release. optimized is variant of release with additional Hotspot debug code.
  • +
  • --with-native-debug-symbols=<method> - Specify if and how native debug symbols should be built. Available methods are none, internal, external, zipped. Default behavior depends on platform. See Native Debug Symbols for more details.
  • +
  • --with-version-string=<string> - Specify the version string this build will be identified with.
  • +
  • --with-version-<part>=<value> - A group of options, where <part> can be any of pre, opt, build, major, minor, security or patch. Use these options to modify just the corresponding part of the version string from the default, or the value provided by --with-version-string.
  • +
  • --with-jvm-variants=<variant>[,<variant>...] - Build the specified variant (or variants) of Hotspot. Valid variants are: server, client, minimal, core, zero, zeroshark, custom. Note that not all variants are possible to combine in a single build.
  • +
  • --with-jvm-features=<feature>[,<feature>...] - Use the specified JVM features when building Hotspot. The list of features will be enabled on top of the default list. For the custom JVM variant, this default list is empty. A complete list of available JVM features can be found using bash configure --help.
  • +
  • --with-target-bits=<bits> - Create a target binary suitable for running on a <bits> platform. Use this to create 32-bit output on a 64-bit build platform, instead of doing a full cross-compile. (This is known as a reduced build.)
  • +
+

Configure Arguments for Native Compilation

+
    +
  • --with-devkit=<path> - Use this devkit for compilers, tools and resources
  • +
  • --with-sysroot=<path> - Use this directory as sysroot
  • +
  • --with-extra-path=<path>[;<path>] - Prepend these directories to the default path when searching for all kinds of binaries
  • +
  • --with-toolchain-path=<path>[;<path>] - Prepend these directories when searching for toolchain binaries (compilers etc)
  • +
  • --with-extra-cflags=<flags> - Append these flags when compiling JDK C files
  • +
  • --with-extra-cxxflags=<flags> - Append these flags when compiling JDK C++ files
  • +
  • --with-extra-ldflags=<flags> - Append these flags when linking JDK libraries
  • +
+

Configure Arguments for External Dependencies

+
    +
  • --with-boot-jdk=<path> - Set the path to the Boot JDK
  • +
  • --with-freetype=<path> - Set the path to FreeType
  • +
  • --with-cups=<path> - Set the path to CUPS
  • +
  • --with-x=<path> - Set the path to X11
  • +
  • --with-alsa=<path> - Set the path to ALSA
  • +
  • --with-libffi=<path> - Set the path to libffi
  • +
  • --with-libelf=<path> - Set the path to libelf
  • +
  • --with-jtreg=<path> - Set the path to JTReg. See Running Tests
  • +
+

Certain third-party libraries used by OpenJDK (libjpeg, giflib, libpng, lcms and zlib) are included in the OpenJDK repository. The default behavior of the OpenJDK build is to use this version of these libraries, but they might be replaced by an external version. To do so, specify system as the <source> option in these arguments. (The default is bundled).

+
    +
  • --with-libjpeg=<source> - Use the specified source for libjpeg
  • +
  • --with-giflib=<source> - Use the specified source for giflib
  • +
  • --with-libpng=<source> - Use the specified source for libpng
  • +
  • --with-lcms=<source> - Use the specified source for lcms
  • +
  • --with-zlib=<source> - Use the specified source for zlib
  • +
+

On Linux, it is possible to select either static or dynamic linking of the C++ runtime. The default is static linking, with dynamic linking as fallback if the static library is not found.

+
    +
  • --with-stdc++lib=<method> - Use the specified method (static, dynamic or default) for linking the C++ runtime.
  • +
+

Configure Control Variables

+

It is possible to control certain aspects of configure by overriding the value of configure variables, either on the command line or in the environment.

+

Normally, this is not recommended. If used improperly, it can lead to a broken configuration. Unless you're well versed in the build system, this is hard to use properly. Therefore, configure will print a warning if this is detected.

+

However, there are a few configure variables, known as control variables that are supposed to be overriden on the command line. These are variables that describe the location of tools needed by the build, like MAKE or GREP. If any such variable is specified, configure will use that value instead of trying to autodetect the tool. For instance, bash configure MAKE=/opt/gnumake4.0/bin/make.

+

If a configure argument exists, use that instead, e.g. use --with-jtreg instead of setting JTREGEXE.

+

Also note that, despite what autoconf claims, setting CFLAGS will not accomplish anything. Instead use --with-extra-cflags (and similar for cxxflags and ldflags).

+

Running Make

+

When you have a proper configuration, all you need to do to build OpenJDK is to run make. (But see the warning at GNU Make about running the correct version of make.)

+

When running make without any arguments, the default target is used, which is the same as running make default or make jdk. This will build a minimal (or roughly minimal) set of compiled output (known as an "exploded image") needed for a developer to actually execute the newly built JDK. The idea is that in an incremental development fashion, when doing a normal make, you should only spend time recompiling what's changed (making it purely incremental) and only do the work that's needed to actually run and test your code.

+

The output of the exploded image resides in $BUILD/jdk. You can test the newly built JDK like this: $BUILD/jdk/bin/java -version.

+

Common Make Targets

+

Apart from the default target, here are some common make targets:

+
    +
  • hotspot - Build all of hotspot (but only hotspot)
  • +
  • hotspot-<variant> - Build just the specified jvm variant
  • +
  • images or product-images - Build the JRE and JDK images
  • +
  • docs or docs-image - Build the documentation image
  • +
  • test-image - Build the test image
  • +
  • all or all-images - Build all images (product, docs and test)
  • +
  • bootcycle-images - Build images twice, second time with newly built JDK (good for testing)
  • +
  • clean - Remove all files generated by make, but not those generated by configure
  • +
  • dist-clean - Remove all files, including configuration
  • +
+

Run make help to get an up-to-date list of important make targets and make control variables.

+

It is possible to build just a single module, a single phase, or a single phase of a single module, by creating make targets according to these followin patterns. A phase can be either of gensrc, gendata, copy, java, launchers, libs or rmic. See Using Fine-Grained Make Targets for more details about this functionality.

+
    +
  • <phase> - Build the specified phase and everything it depends on
  • +
  • <module> - Build the specified module and everything it depends on
  • +
  • <module>-<phase> - Compile the specified phase for the specified module and everything it depends on
  • +
+

Similarly, it is possible to clean just a part of the build by creating make targets according to these patterns:

+
    +
  • clean-<outputdir> - Remove the subdir in the output dir with the name
  • +
  • clean-<phase> - Remove all build results related to a certain build phase
  • +
  • clean-<module> - Remove all build results related to a certain module
  • +
  • clean-<module>-<phase> - Remove all build results related to a certain module and phase
  • +
+

Make Control Variables

+

It is possible to control make behavior by overriding the value of make variables, either on the command line or in the environment.

+

Normally, this is not recommended. If used improperly, it can lead to a broken build. Unless you're well versed in the build system, this is hard to use properly. Therefore, make will print a warning if this is detected.

+

However, there are a few make variables, known as control variables that are supposed to be overriden on the command line. These make up the "make time" configuration, as opposed to the "configure time" configuration.

+

General Make Control Variables

+ +

Test Make Control Variables

+

These make control variables only make sense when running tests. Please see Testing OpenJDK for details.

+
    +
  • TEST
  • +
  • TEST_JOBS
  • +
  • JTREG
  • +
  • GTEST
  • +
+

Advanced Make Control Variables

+

These advanced make control variables can be potentially unsafe. See Hints and Suggestions for Advanced Users and Understanding the Build System for details.

+
    +
  • SPEC
  • +
  • CONF_CHECK
  • +
  • COMPARE_BUILD
  • +
  • JDK_FILTER
  • +
+

Running Tests

+

Most of the OpenJDK tests are using the JTReg test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the --with-jtreg=<path to jtreg home> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing lib/jtreg.jar etc.

+

To execute the most basic tests (tier 1), use:

+
make run-test-tier1
+

For more details on how to run tests, please see the Testing OpenJDK document.

+

Cross-compiling

+

Cross-compiling means using one platform (the build platform) to generate output that can ran on another platform (the target platform).

+

The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of build and target systems.

+

This requires a more complex setup and build procedure. This section assumes you are familiar with cross-compiling in general, and will only deal with the particularities of cross-compiling OpenJDK. If you are new to cross-compiling, please see the external links at Wikipedia for a good start on reading materials.

+

Cross-compiling OpenJDK requires you to be able to build both for the build platform and for the target platform. The reason for the former is that we need to build and execute tools during the build process, both native tools and Java tools.

+

If all you want to do is to compile a 32-bit version, for the same OS, on a 64-bit machine, consider using --with-target-bits=32 instead of doing a full-blown cross-compilation. (While this surely is possible, it's a lot more work and will take much longer to build.)

+

Boot JDK and Build JDK

+

When cross-compiling, make sure you use a boot JDK that runs on the build system, and not on the target system.

+

To be able to build, we need a "Build JDK", which is a JDK built from the current sources (that is, the same as the end result of the entire build process), but able to run on the build system, and not the target system. (In contrast, the Boot JDK should be from an older release, e.g. JDK 8 when building JDK 9.)

+

The build process will create a minimal Build JDK for you, as part of building. To speed up the build, you can use --with-build-jdk to configure to point to a pre-built Build JDK. Please note that the build result is unpredictable, and can possibly break in subtle ways, if the Build JDK does not exactly match the current sources.

+

Specifying the Target Platform

+

You must specify the target platform when cross-compiling. Doing so will also automatically turn the build into a cross-compiling mode. The simplest way to do this is to use the --openjdk-target argument, e.g. --openjdk-target=arm-linux-gnueabihf. or --openjdk-target=aarch64-oe-linux. This will automatically set the --build, --host and --target options for autoconf, which can otherwise be confusing. (In autoconf terminology, the "target" is known as "host", and "target" is used for building a Canadian cross-compiler.)

+

Toolchain Considerations

+

You will need two copies of your toolchain, one which generates output that can run on the target system (the normal, or target, toolchain), and one that generates output that can run on the build system (the build toolchain). Note that cross-compiling is only supported for gcc at the time being. The gcc standard is to prefix cross-compiling toolchains with the target denominator. If you follow this standard, configure is likely to pick up the toolchain correctly.

+

The build toolchain will be autodetected just the same way the normal build/target toolchain will be autodetected when not cross-compiling. If this is not what you want, or if the autodetection fails, you can specify a devkit containing the build toolchain using --with-build-devkit to configure, or by giving BUILD_CC and BUILD_CXX arguments.

+

It is often helpful to locate the cross-compilation tools, headers and libraries in a separate directory, outside the normal path, and point out that directory to configure. Do this by setting the sysroot (--with-sysroot) and appending the directory when searching for cross-compilations tools (--with-toolchain-path). As a compact form, you can also use --with-devkit to point to a single directory, if it is correctly setup. (See basics.m4 for details.)

+

If you are unsure what toolchain and versions to use, these have been proved working at the time of writing:

+ +

Native Libraries

+

You will need copies of external native libraries for the target system, present on the build machine while building.

+

Take care not to replace the build system's version of these libraries by mistake, since that can render the build machine unusable.

+

Make sure that the libraries you point to (ALSA, X11, etc) are for the target, not the build, platform.

+

ALSA

+

You will need alsa libraries suitable for your target system. For most cases, using Debian's pre-built libraries work fine.

+

Note that alsa is needed even if you only want to build a headless JDK.

+
    +
  • Go to Debian Package Search and search for the libasound2 and libasound2-dev packages for your target system. Download them to /tmp.

  • +
  • Install the libraries into the cross-compilation toolchain. For instance:

    +
    cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc
    +dpkg-deb -x /tmp/libasound2_1.0.25-4_armhf.deb .
    +dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .
  • +
  • If alsa is not properly detected by configure, you can point it out by --with-alsa.

  • +
+

X11

+

You will need X11 libraries suitable for your target system. For most cases, using Debian's pre-built libraries work fine.

+

Note that X11 is needed even if you only want to build a headless JDK.

+
    +
  • Go to Debian Package Search, search for the following packages for your target system, and download them to /tmp/target-x11: +
      +
    • libxi
    • +
    • libxi-dev
    • +
    • x11proto-core-dev
    • +
    • x11proto-input-dev
    • +
    • x11proto-kb-dev
    • +
    • x11proto-render-dev
    • +
    • x11proto-xext-dev
    • +
    • libice-dev
    • +
    • libxrender
    • +
    • libxrender-dev
    • +
    • libsm-dev
    • +
    • libxt-dev
    • +
    • libx11
    • +
    • libx11-dev
    • +
    • libxtst
    • +
    • libxtst-dev
    • +
    • libxext
    • +
    • libxext-dev
    • +
  • +
  • Install the libraries into the cross-compilation toolchain. For instance:

    +
    cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc/usr
    +mkdir X11R6
    +cd X11R6
    +for deb in /tmp/target-x11/*.deb ; do dpkg-deb -x $deb . ; done
    +mv usr/* .
    +cd lib
    +cp arm-linux-gnueabihf/* .
    +

    You can ignore the following messages. These libraries are not needed to successfully complete a full JDK build.

    +
    cp: cannot stat `arm-linux-gnueabihf/libICE.so': No such file or directory
    +cp: cannot stat `arm-linux-gnueabihf/libSM.so': No such file or directory
    +cp: cannot stat `arm-linux-gnueabihf/libXt.so': No such file or directory
  • +
  • If the X11 libraries are not properly detected by configure, you can point them out by --with-x.

  • +
+

Building for ARM/aarch64

+

A common cross-compilation target is the ARM CPU. When building for ARM, it is useful to set the ABI profile. A number of pre-defined ABI profiles are available using --with-abi-profile: arm-vfp-sflt, arm-vfp-hflt, arm-sflt, armv5-vfp-sflt, armv6-vfp-hflt. Note that soft-float ABIs are no longer properly supported on OpenJDK.

+

OpenJDK contains two different ports for the aarch64 platform, one is the original aarch64 port from the AArch64 Port Project and one is a 64-bit version of the Oracle contributed ARM port. When targeting aarch64, by the default the original aarch64 port is used. To select the Oracle ARM 64 port, use --with-cpu-port=arm64. Also set the corresponding value (aarch64 or arm64) to --with-abi-profile, to ensure a consistent build.

+

Verifying the Build

+

The build will end up in a directory named like build/linux-arm-normal-server-release.

+

Inside this build output directory, the images/jdk and images/jre will contain the newly built JDK and JRE, respectively, for your target system.

+

Copy these folders to your target system. Then you can run e.g. images/jdk/bin/java -version.

+

Build Performance

+

Building OpenJDK requires a lot of horsepower. Some of the build tools can be adjusted to utilize more or less of resources such as parallel threads and memory. The configure script analyzes your system and selects reasonable values for such options based on your hardware. If you encounter resource problems, such as out of memory conditions, you can modify the detected values with:

+
    +
  • --with-num-cores -- number of cores in the build system, e.g. --with-num-cores=8.

  • +
  • --with-memory-size -- memory (in MB) available in the build system, e.g. --with-memory-size=1024

  • +
+

You can also specify directly the number of build jobs to use with --with-jobs=N to configure, or JOBS=N to make. Do not use the -j flag to make. In most cases it will be ignored by the makefiles, but it can cause problems for some make targets.

+

It might also be necessary to specify the JVM arguments passed to the Boot JDK, using e.g. --with-boot-jdk-jvmargs="-Xmx8G". Doing so will override the default JVM arguments passed to the Boot JDK.

+

At the end of a successful execution of configure, you will get a performance summary, indicating how well the build will perform. Here you will also get performance hints. If you want to build fast, pay attention to those!

+

If you want to tweak build performance, run with make LOG=info to get a build time summary at the end of the build process.

+

Disk Speed

+

If you are using network shares, e.g. via NFS, for your source code, make sure the build directory is situated on local disk (e.g. by ln -s /localdisk/jdk-build $JDK-SHARE/build). The performance penalty is extremely high for building on a network share; close to unusable.

+

Also, make sure that your build tools (including Boot JDK and toolchain) is located on a local disk and not a network share.

+

As has been stressed elsewhere, do use SSD for source code and build directory, as well as (if possible) the build tools.

+

Virus Checking

+

The use of virus checking software, especially on Windows, can significantly slow down building of OpenJDK. If possible, turn off such software, or exclude the directory containing the OpenJDK source code from on-the-fly checking.

+

Ccache

+

The OpenJDK build supports building with ccache when using gcc or clang. Using ccache can radically speed up compilation of native code if you often rebuild the same sources. Your milage may vary however, so we recommend evaluating it for yourself. To enable it, make sure it's on the path and configure with --enable-ccache.

+

Precompiled Headers

+

By default, the Hotspot build uses preccompiled headers (PCH) on the toolchains were it is properly supported (clang, gcc, and Visual Studio). Normally, this speeds up the build process, but in some circumstances, it can actually slow things down.

+

You can experiment by disabling precompiled headers using --disable-precompiled-headers.

+

Icecc / icecream

+

icecc/icecream is a simple way to setup a distributed compiler network. If you have multiple machines available for building OpenJDK, you can drastically cut individual build times by utilizing it.

+

To use, setup an icecc network, and install icecc on the build machine. Then run configure using --enable-icecc.

+

Using sjavac

+

To speed up Java compilation, especially incremental compilations, you can try the experimental sjavac compiler by using --enable-sjavac.

+

Building the Right Target

+

Selecting the proper target to build can have dramatic impact on build time. For normal usage, jdk or the default target is just fine. You only need to build images for shipping, or if your tests require it.

+

See also Using Fine-Grained Make Targets on how to build an even smaller subset of the product.

+

Troubleshooting

+

If your build fails, it can sometimes be difficult to pinpoint the problem or find a proper solution.

+

Locating the Source of the Error

+

When a build fails, it can be hard to pinpoint the actual cause of the error. In a typical build process, different parts of the product build in parallel, with the output interlaced.

+

Build Failure Summary

+

To help you, the build system will print a failure summary at the end. It looks like this:

+
ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code 2)
+
+=== Output from failing command(s) repeated here ===
+* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
+/localhome/hg/jdk9-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
+   ... (rest of output omitted)
+
+* All command lines available in /localhome/hg/jdk9-sandbox/build/linux-x64/make-support/failure-logs.
+=== End of repeated output ===
+
+=== Make failed targets repeated here ===
+lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
+make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
+=== End of repeated output ===
+
+Hint: Try searching the build log for the name of the first failed target.
+Hint: If caused by a warning, try configure --disable-warnings-as-errors.
+

Let's break it down! First, the selected configuration, and the top-level target you entered on the command line that caused the failure is printed.

+

Then, between the Output from failing command(s) repeated here and End of repeated output the first lines of output (stdout and stderr) from the actual failing command is repeated. In most cases, this is the error message that caused the build to fail. If multiple commands were failing (this can happen in a parallel build), output from all failed commands will be printed here.

+

The path to the failure-logs directory is printed. In this file you will find a <target>.log file that contains the output from this command in its entirety, and also a <target>.cmd, which contain the complete command line used for running this command. You can re-run the failing command by executing . <path to failure-logs>/<target>.cmd in your shell.

+

Another way to trace the failure is to follow the chain of make targets, from top-level targets to individual file targets. Between Make failed targets repeated here and End of repeated output the output from make showing this chain is repeated. The first failed recipe will typically contain the full path to the file in question that failed to compile. Following lines will show a trace of make targets why we ended up trying to compile that file.

+

Finally, some hints are given on how to locate the error in the complete log. In this example, we would try searching the log file for "psMemoryPool.o". Another way to quickly locate make errors in the log is to search for "] Error" or "***".

+

Note that the build failure summary will only help you if the issue was a compilation failure or similar. If the problem is more esoteric, or is due to errors in the build machinery, you will likely get empty output logs, and No indication of failed target found instead of the make target chain.

+

Checking the Build Log File

+

The output (stdout and stderr) from the latest build is always stored in $BUILD/build.log. The previous build log is stored as build.log.old. This means that it is not necessary to redirect the build output yourself if you want to process it.

+

You can increase the verbosity of the log file, by the LOG control variable to make. If you want to see the command lines used in compilations, use LOG=cmdlines. To increase the general verbosity, use LOG=info, LOG=debug or LOG=trace. Both of these can be combined with cmdlines, e.g. LOG=info,cmdlines. The debug log level will show most shell commands executed by make, and trace will show all. Beware that both these log levels will produce a massive build log!

+

Fixing Unexpected Build Failures

+

Most of the time, the build will fail due to incorrect changes in the source code.

+

Sometimes the build can fail with no apparent changes that have caused the failure. If this is the first time you are building OpenJDK on this particular computer, and the build fails, the problem is likely with your build environment. But even if you have previously built OpenJDK with success, and it now fails, your build environment might have changed (perhaps due to OS upgrades or similar). But most likely, such failures are due to problems with the incremental rebuild.

+

Problems with the Build Environment

+

Make sure your configuration is correct. Re-run configure, and look for any warnings. Warnings that appear in the middle of the configure output is also repeated at the end, after the summary. The entire log is stored in $BUILD/configure.log.

+

Verify that the summary at the end looks correct. Are you indeed using the Boot JDK and native toolchain that you expect?

+

By default, OpenJDK has a strict approach where warnings from the compiler is considered errors which fail the build. For very new or very old compiler versions, this can trigger new classes of warnings, which thus fails the build. Run configure with --disable-warnings-as-errors to turn of this behavior. (The warnings will still show, but not make the build fail.)

+

Problems with Incremental Rebuilds

+

Incremental rebuilds mean that when you modify part of the product, only the affected parts get rebuilt. While this works great in most cases, and significantly speed up the development process, from time to time complex interdependencies will result in an incorrect build result. This is the most common cause for unexpected build problems, together with inconsistencies between the different Mercurial repositories in the forest.

+

Here are a suggested list of things to try if you are having unexpected build problems. Each step requires more time than the one before, so try them in order. Most issues will be solved at step 1 or 2.

+
    +
  1. Make sure your forest is up-to-date

    +

    Run bash get_source.sh to make sure you have the latest version of all repositories.

  2. +
  3. Clean build results

    +

    The simplest way to fix incremental rebuild issues is to run make clean. This will remove all build results, but not the configuration or any build system support artifacts. In most cases, this will solve build errors resulting from incremental build mismatches.

  4. +
  5. Completely clean the build directory.

    +

    If this does not work, the next step is to run make dist-clean, or removing the build output directory ($BUILD). This will clean all generated output, including your configuration. You will need to re-run configure after this step. A good idea is to run make print-configuration before running make dist-clean, as this will print your current configure command line. Here's a way to do this:

    +
    make print-configuration > current-configuration
    +make dist-clean
    +bash configure $(cat current-configuration)
    +make
  6. +
  7. Re-clone the Mercurial forest

    +

    Sometimes the Mercurial repositories themselves gets in a state that causes the product to be un-buildable. In such a case, the simplest solution is often the "sledgehammer approach": delete the entire forest, and re-clone it. If you have local changes, save them first to a different location using hg export.

  8. +
+

Specific Build Issues

+

Clock Skew

+

If you get an error message like this:

+
File 'xxx' has modification time in the future.
+Clock skew detected. Your build may be incomplete.
+

then the clock on your build machine is out of sync with the timestamps on the source files. Other errors, apparently unrelated but in fact caused by the clock skew, can occur along with the clock skew warnings. These secondary errors may tend to obscure the fact that the true root cause of the problem is an out-of-sync clock.

+

If you see these warnings, reset the clock on the build machine, run make clean and restart the build.

+

Out of Memory Errors

+

On Solaris, you might get an error message like this:

+
Trouble writing out table to disk
+

To solve this, increase the amount of swap space on your build machine.

+

On Windows, you might get error messages like this:

+
fatal error - couldn't allocate heap
+cannot create ... Permission denied
+spawn failed
+

This can be a sign of a Cygwin problem. See the information about solving problems in the Cygwin section. Rebooting the computer might help temporarily.

+

Getting Help

+

If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to build-dev@openjdk.java.net. Please include the relevant parts of the configure and/or build log.

+

If you need general help or advice about developing for OpenJDK, you can also contact the Adoption Group. See the section on Contributing to OpenJDK for more information.

+

Hints and Suggestions for Advanced Users

+

Setting Up a Forest for Pushing Changes (defpath)

+

To help you prepare a proper push path for a Mercurial repository, there exists a useful tool known as defpath. It will help you setup a proper push path for pushing changes to OpenJDK.

+

Install the extension by cloning http://hg.openjdk.java.net/code-tools/defpath and updating your .hgrc file. Here's one way to do this:

+
cd ~
+mkdir hg-ext
+cd hg-ext
+hg clone http://hg.openjdk.java.net/code-tools/defpath
+cat << EOT >> ~/.hgrc
+[extensions]
+defpath=~/hg-ext/defpath/defpath.py
+EOT
+

You can now setup a proper push path using:

+
hg defpath -d -u <your OpenJDK username>
+

If you also have the trees extension installed in Mercurial, you will automatically get a tdefpath command, which is even more useful. By running hg tdefpath -du <username> in the top repository of your forest, all repos will get setup automatically. This is the recommended usage.

+

Bash Completion

+

The configure and make commands tries to play nice with bash command-line completion (using <tab> or <tab><tab>). To use this functionality, make sure you enable completion in your ~/.bashrc (see instructions for bash in your operating system).

+

Make completion will work out of the box, and will complete valid make targets. For instance, typing make jdk-i<tab> will complete to make jdk-image.

+

The configure script can get completion for options, but for this to work you need to help bash on the way. The standard way of running the script, bash configure, will not be understood by bash completion. You need configure to be the command to run. One way to achieve this is to add a simple helper script to your path:

+
cat << EOT > /tmp/configure
+#!/bin/bash
+if [ \$(pwd) = \$(cd \$(dirname \$0); pwd) ] ; then
+  echo >&2 "Abort: Trying to call configure helper recursively"
+  exit 1
+fi
+
+bash \$PWD/configure "\$@"
+EOT
+chmod +x /tmp/configure
+sudo mv /tmp/configure /usr/local/bin
+

Now configure --en<tab>-dt<tab> will result in configure --enable-dtrace.

+

Using Multiple Configurations

+

You can have multiple configurations for a single source forest. When you create a new configuration, run configure --with-conf-name=<name> to create a configuration with the name <name>. Alternatively, you can create a directory under build and run configure from there, e.g. mkdir build/<name> && cd build/<name> && bash ../../configure.

+

Then you can build that configuration using make CONF_NAME=<name> or make CONF=<pattern>, where <pattern> is a substring matching one or several configurations, e.g. CONF=debug. The special empty pattern (CONF=) will match all available configuration, so make CONF= hotspot will build the hotspot target for all configurations. Alternatively, you can execute make in the configuration directory, e.g. cd build/<name> && make.

+

Handling Reconfigurations

+

If you update the forest and part of the configure script has changed, the build system will force you to re-run configure.

+

Most of the time, you will be fine by running configure again with the same arguments as the last time, which can easily be performed by make reconfigure. To simplify this, you can use the CONF_CHECK make control variable, either as make CONF_CHECK=auto, or by setting an environment variable. For instance, if you add export CONF_CHECK=auto to your .bashrc file, make will always run reconfigure automatically whenever the configure script has changed.

+

You can also use CONF_CHECK=ignore to skip the check for a needed configure update. This might speed up the build, but comes at the risk of an incorrect build result. This is only recommended if you know what you're doing.

+

From time to time, you will also need to modify the command line to configure due to changes. Use make print-configure to show the command line used for your current configuration.

+

Using Fine-Grained Make Targets

+

The default behavior for make is to create consistent and correct output, at the expense of build speed, if necessary.

+

If you are prepared to take some risk of an incorrect build, and know enough of the system to understand how things build and interact, you can speed up the build process considerably by instructing make to only build a portion of the product.

+

Building Individual Modules

+

The safe way to use fine-grained make targets is to use the module specific make targets. All source code in JDK 9 is organized so it belongs to a module, e.g. java.base or jdk.jdwp.agent. You can build only a specific module, by giving it as make target: make jdk.jdwp.agent. If the specified module depends on other modules (e.g. java.base), those modules will be built first.

+

You can also specify a set of modules, just as you can always specify a set of make targets: make jdk.crypto.cryptoki jdk.crypto.ec jdk.crypto.mscapi jdk.crypto.ucrypto

+

Building Individual Module Phases

+

The build process for each module is divided into separate phases. Not all modules need all phases. Which are needed depends on what kind of source code and other artifact the module consists of. The phases are:

+
    +
  • gensrc (Generate source code to compile)
  • +
  • gendata (Generate non-source code artifacts)
  • +
  • copy (Copy resource artifacts)
  • +
  • java (Compile Java code)
  • +
  • launchers (Compile native executables)
  • +
  • libs (Compile native libraries)
  • +
  • rmic (Run the rmic tool)
  • +
+

You can build only a single phase for a module by using the notation $MODULE-$PHASE. For instance, to build the gensrc phase for java.base, use make java.base-gensrc.

+

Note that some phases may depend on others, e.g. java depends on gensrc (if present). Make will build all needed prerequisites before building the requested phase.

+

Skipping the Dependency Check

+

When using an iterative development style with frequent quick rebuilds, the dependency check made by make can take up a significant portion of the time spent on the rebuild. In such cases, it can be useful to bypass the dependency check in make.

+
+

Note that if used incorrectly, this can lead to a broken build!

+
+

To achieve this, append -only to the build target. For instance, make jdk.jdwp.agent-java-only will only build the java phase of the jdk.jdwp.agent module. If the required dependencies are not present, the build can fail. On the other hand, the execution time measures in milliseconds.

+

A useful pattern is to build the first time normally (e.g. make jdk.jdwp.agent) and then on subsequent builds, use the -only make target.

+

Rebuilding Part of java.base (JDK_FILTER)

+

If you are modifying files in java.base, which is the by far largest module in OpenJDK, then you need to rebuild all those files whenever a single file has changed. (This inefficiency will hopefully be addressed in JDK 10.)

+

As a hack, you can use the make control variable JDK_FILTER to specify a pattern that will be used to limit the set of files being recompiled. For instance, make java.base JDK_FILTER=javax/crypto (or, to combine methods, make java.base-java-only JDK_FILTER=javax/crypto) will limit the compilation to files in the javax.crypto package.

+

Learn About Mercurial

+

To become an efficient OpenJDK developer, it is recommended that you invest in learning Mercurial properly. Here are some links that can get you started:

+ +

Understanding the Build System

+

This section will give you a more technical description on the details of the build system.

+

Configurations

+

The build system expects to find one or more configuration. These are technically defined by the spec.gmk in a subdirectory to the build subdirectory. The spec.gmk file is generated by configure, and contains in principle the configuration (directly or by files included by spec.gmk).

+

You can, in fact, select a configuration to build by pointing to the spec.gmk file with the SPEC make control variable, e.g. make SPEC=$BUILD/spec.gmk. While this is not the recommended way to call make as a user, it is what is used under the hood by the build system.

+

Build Output Structure

+

The build output for a configuration will end up in build/<configuration name>, which we refer to as $BUILD in this document. The $BUILD directory contains the following important directories:

+
buildtools/
+configure-support/
+hotspot/
+images/
+jdk/
+make-support/
+support/
+test-results/
+test-support/
+

This is what they are used for:

+
    +
  • images: This is the directory were the output of the *-image make targets end up. For instance, make jdk-image ends up in images/jdk.

  • +
  • jdk: This is the "exploded image". After make jdk, you will be able to launch the newly built JDK by running $BUILD/jdk/bin/java.

  • +
  • test-results: This directory contains the results from running tests.

  • +
  • support: This is an area for intermediate files needed during the build, e.g. generated source code, object files and class files. Some noteworthy directories in support is gensrc, which contains the generated source code, and the modules_* directories, which contains the files in a per-module hierarchy that will later be collapsed into the jdk directory of the exploded image.

  • +
  • buildtools: This is an area for tools compiled for the build platform that are used during the rest of the build.

  • +
  • hotspot: This is an area for intermediate files needed when building hotspot.

  • +
  • configure-support, make-support and test-support: These directories contain files that are needed by the build system for configure, make and for running tests.

  • +
+

Fixpath

+

Windows path typically look like C:\User\foo, while Unix paths look like /home/foo. Tools with roots from Unix often experience issues related to this mismatch when running on Windows.

+

In the OpenJDK build, we always use Unix paths internally, and only just before calling a tool that does not understand Unix paths do we convert them to Windows paths.

+

This conversion is done by the fixpath tool, which is a small wrapper that modifies unix-style paths to Windows-style paths in command lines. Fixpath is compiled automatically by configure.

+

Native Debug Symbols

+

Native libraries and executables can have debug symbol (and other debug information) associated with them. How this works is very much platform dependent, but a common problem is that debug symbol information takes a lot of disk space, but is rarely needed by the end user.

+

The OpenJDK supports different methods on how to handle debug symbols. The method used is selected by --with-native-debug-symbols, and available methods are none, internal, external, zipped.

+
    +
  • none means that no debug symbols will be generated during the build.

  • +
  • internal means that debug symbols will be generated during the build, and they will be stored in the generated binary.

  • +
  • external means that debug symbols will be generated during the build, and after the compilation, they will be moved into a separate .debuginfo file. (This was previously known as FDS, Full Debug Symbols).

  • +
  • zipped is like external, but the .debuginfo file will also be zipped into a .diz file.

  • +
+

When building for distribution, zipped is a good solution. Binaries built with internal is suitable for use by developers, since they facilitate debugging, but should be stripped before distributed to end users.

+

Autoconf Details

+

The configure script is based on the autoconf framework, but in some details deviate from a normal autoconf configure script.

+

The configure script in the top level directory of OpenJDK is just a thin wrapper that calls common/autoconf/configure. This in turn provides functionality that is not easily expressed in the normal Autoconf framework, and then calls into the core of the configure script, which is the common/autoconf/generated-configure.sh file.

+

As the name implies, this file is generated by Autoconf. It is checked in after regeneration, to alleviate the common user to have to install Autoconf.

+

The build system will detect if the Autoconf source files have changed, and will trigger a regeneration of common/autoconf/generated-configure.sh if needed. You can also manually request such an update by bash common/autoconf/autogen.sh.

+

If you make changes to the build system that requires a re-generation, note the following:

+
    +
  • You must use exactly version 2.69 of autoconf for your patch to be accepted. This is to avoid spurious changes in the generated file. Note that Ubuntu 16.04 ships a patched version of autoconf which claims to be 2.69, but is not.

  • +
  • You do not need to include the generated file in reviews.

  • +
  • If the generated file needs updating, the Oracle JDK closed counter-part will also need to be updated. It is very much appreciated if you ask for an Oracle engineer to sponsor your push so this can be made in tandem.

  • +
+

Developing the Build System Itself

+

This section contains a few remarks about how to develop for the build system itself. It is not relevant if you are only making changes in the product source code.

+

While technically using make, the make source files of the OpenJDK does not resemble most other Makefiles. Instead of listing specific targets and actions (perhaps using patterns), the basic modus operandi is to call a high-level function (or properly, macro) from the API in make/common. For instance, to compile all classes in the jdk.internal.foo package in the jdk.foo module, a call like this would be made:

+
$(eval $(call SetupJavaCompilation, BUILD_FOO_CLASSES, \
+    SETUP := GENERATE_OLDBYTECODE, \
+    SRC := $(JDK_TOPDIR)/src/jkd.foo/share/classes, \
+    INCLUDES := jdk/internal/foo, \
+    BIN := $(SUPPORT_OUTPUTDIR)/foo_classes, \
+))
+

By encapsulating and expressing the high-level knowledge of what should be done, rather than how it should be done (as is normal in Makefiles), we can build a much more powerful and flexible build system.

+

Correct dependency tracking is paramount. Sloppy dependency tracking will lead to improper parallelization, or worse, race conditions.

+

To test for/debug race conditions, try running make JOBS=1 and make JOBS=100 and see if it makes any difference. (It shouldn't).

+

To compare the output of two different builds and see if, and how, they differ, run $BUILD1/compare.sh -o $BUILD2, where $BUILD1 and $BUILD2 are the two builds you want to compare.

+

To automatically build two consecutive versions and compare them, use COMPARE_BUILD. The value of COMPARE_BUILD is a set of variable=value assignments, like this:

+
make COMPARE_BUILD=CONF=--enable-new-hotspot-feature:MAKE=hotspot
+

See make/InitSupport.gmk for details on how to use COMPARE_BUILD.

+

To analyze build performance, run with LOG=trace and check $BUILD/build-trace-time.log. Use JOBS=1 to avoid parallelism.

+

Please check that you adhere to the Code Conventions for the Build System before submitting patches. Also see the section in Autoconf Details about the generated configure script.

+

Contributing to OpenJDK

+

So, now you've build your OpenJDK, and made your first patch, and want to contribute it back to the OpenJDK community.

+

First of all: Thank you! We gladly welcome your contribution to the OpenJDK. However, please bear in mind that OpenJDK is a massive project, and we must ask you to follow our rules and guidelines to be able to accept your contribution.

+

The official place to start is the 'How to contribute' page. There is also an official (but somewhat outdated and skimpy on details) Developer's Guide.

+

If this seems overwhelming to you, the Adoption Group is there to help you! A good place to start is their 'New Contributor' page, or start reading the comprehensive Getting Started Kit. The Adoption Group will also happily answer any questions you have about contributing. Contact them by mail or IRC.

+ + diff --git a/common/doc/building.md b/common/doc/building.md new file mode 100644 index 00000000000..a6dd2a6c96c --- /dev/null +++ b/common/doc/building.md @@ -0,0 +1,1883 @@ +% Building OpenJDK + +## TL;DR (Instructions for the Impatient) + +If you are eager to try out building OpenJDK, these simple steps works most of +the time. They assume that you have installed Mercurial (and Cygwin if running +on Windows) and cloned the top-level OpenJDK repository that you want to build. + + 1. [Get the complete source code](#getting-the-source-code): \ + `bash get_source.sh` + + 2. [Run configure](#running-configure): \ + `bash configure` + + If `configure` fails due to missing dependencies (to either the + [toolchain](#native-compiler-toolchain-requirements), [external libraries]( + #external-library-requirements) or the [boot JDK](#boot-jdk-requirements)), + most of the time it prints a suggestion on how to resolve the situation on + your platform. Follow the instructions, and try running `bash configure` + again. + + 3. [Run make](#running-make): \ + `make images` + + 4. Verify your newly built JDK: \ + `./build/*/images/jdk/bin/java -version` + + 5. [Run basic tests](##running-tests): \ + `make run-test-tier1` + +If any of these steps failed, or if you want to know more about build +requirements or build functionality, please continue reading this document. + +## Introduction + +OpenJDK is a complex software project. Building it requires a certain amount of +technical expertise, a fair number of dependencies on external software, and +reasonably powerful hardware. + +If you just want to use OpenJDK and not build it yourself, this document is not +for you. See for instance [OpenJDK installation]( +http://openjdk.java.net/install) for some methods of installing a prebuilt +OpenJDK. + +## Getting the Source Code + +OpenJDK uses [Mercurial](http://www.mercurial-scm.org) for source control. The +source code is contained not in a single Mercurial repository, but in a tree +("forest") of interrelated repositories. You will need to check out all of the +repositories to be able to build OpenJDK. To assist you in dealing with this +somewhat unusual arrangement, there are multiple tools available, which are +explained below. + +In any case, make sure you are getting the correct version. At the [OpenJDK +Mercurial server](http://hg.openjdk.java.net/) you can see a list of all +available forests. If you want to build an older version, e.g. JDK 8, it is +recommended that you get the `jdk8u` forest, which contains incremental +updates, instead of the `jdk8` forest, which was frozen at JDK 8 GA. + +If you are new to Mercurial, a good place to start is the [Mercurial Beginner's +Guide](http://www.mercurial-scm.org/guide). The rest of this document assumes a +working knowledge of Mercurial. + +### Special Considerations + +For a smooth building experience, it is recommended that you follow these rules +on where and how to check out the source code. + + * Do not check out the source code in a path which contains spaces. Chances + are the build will not work. This is most likely to be an issue on Windows + systems. + + * Do not check out the source code in a path which has a very long name or is + nested many levels deep. Chances are you will hit an OS limitation during + the build. + + * Put the source code on a local disk, not a network share. If possible, use + an SSD. The build process is very disk intensive, and having slow disk + access will significantly increase build times. If you need to use a + network share for the source code, see below for suggestions on how to keep + the build artifacts on a local disk. + + * On Windows, extra care must be taken to make sure the [Cygwin](#cygwin) + environment is consistent. It is recommended that you follow this + procedure: + + * Create the directory that is going to contain the top directory of the + OpenJDK clone by using the `mkdir` command in the Cygwin bash shell. + That is, do *not* create it using Windows Explorer. This will ensure + that it will have proper Cygwin attributes, and that it's children will + inherit those attributes. + + * Do not put the OpenJDK clone in a path under your Cygwin home + directory. This is especially important if your user name contains + spaces and/or mixed upper and lower case letters. + + * Clone the OpenJDK repository using the Cygwin command line `hg` client + as instructed in this document. That is, do *not* use another Mercurial + client such as TortoiseHg. + + Failure to follow this procedure might result in hard-to-debug build + problems. + +### Using get\_source.sh + +The simplest way to get the entire forest is probably to clone the top-level +repository and then run the `get_source.sh` script, like this: + +``` +hg clone http://hg.openjdk.java.net/jdk9/jdk9 +cd jdk9 +bash get_source.sh +``` + +The first time this is run, it will clone all the sub-repositories. Any +subsequent execution of the script will update all sub-repositories to the +latest revision. + +### Using hgforest.sh + +The `hgforest.sh` script is more expressive than `get_source.sh`. It takes any +number of arguments, and runs `hg` with those arguments on each sub-repository +in the forest. The `get_source.sh` script is basically a simple wrapper that +runs either `hgforest.sh clone` or `hgforest.sh pull -u`. + + * Cloning the forest: + ``` + hg clone http://hg.openjdk.java.net/jdk9/jdk9 + cd jdk9 + bash common/bin/hgforest.sh clone + ``` + + * Pulling and updating the forest: + ``` + bash common/bin/hgforest.sh pull -u + ``` + + * Merging over the entire forest: + ``` + bash common/bin/hgforest.sh merge + ``` + +### Using the Trees Extension + +The trees extension is a Mercurial add-on that helps you deal with the forest. +More information is available on the [Code Tools trees page]( +http://openjdk.java.net/projects/code-tools/trees). + +#### Installing the Extension + +Install the extension by cloning `http://hg.openjdk.java.net/code-tools/trees` +and updating your `.hgrc` file. Here's one way to do this: + +``` +cd ~ +mkdir hg-ext +cd hg-ext +hg clone http://hg.openjdk.java.net/code-tools/trees +cat << EOT >> ~/.hgrc +[extensions] +trees=~/hg-ext/trees/trees.py +EOT +``` + +#### Initializing the Tree + +The trees extension needs to know the structure of the forest. If you have +already cloned the entire forest using another method, you can initialize the +forest like this: + +``` +hg tconf --set --walk --depth +``` + +Or you can clone the entire forest at once, if you substitute `clone` with +`tclone` when cloning the top-level repository, e.g. like this: + +``` +hg tclone http://hg.openjdk.java.net/jdk9/jdk9 +``` + +In this case, the forest will be properly initialized from the start. + +#### Other Operations + +The trees extensions supplement many common operations with a trees version by +prefixing a `t` to the normal Mercurial command, e.g. `tcommit`, `tstatus` or +`tmerge`. For instance, to update the entire forest: + +``` +hg tpull -u +``` + +## Build Hardware Requirements + +OpenJDK is a massive project, and require machines ranging from decent to +powerful to be able to build in a reasonable amount of time, or to be able to +complete a build at all. + +We *strongly* recommend usage of an SSD disk for the build, since disk speed is +one of the limiting factors for build performance. + +### Building on x86 + +At a minimum, a machine with 2-4 cores is advisable, as well as 2-4 GB of RAM. +(The more cores to use, the more memory you need.) At least 6 GB of free disk +space is required (8 GB minimum for building on Solaris). + +Even for 32-bit builds, it is recommended to use a 64-bit build machine, and +instead create a 32-bit target using `--with-target-bits=32`. + +### Building on sparc + +At a minimum, a machine with 4 cores is advisable, as well as 4 GB of RAM. (The +more cores to use, the more memory you need.) At least 8 GB of free disk space +is required. + +### Building on arm/aarch64 + +This is not recommended. Instead, see the section on [Cross-compiling]( +#cross-compiling). + +## Operating System Requirements + +The mainline OpenJDK project supports Linux, Solaris, macOS, AIX and Windows. +Support for other operating system, e.g. BSD, exists in separate "port" +projects. + +In general, OpenJDK can be built on a wide range of versions of these operating +systems, but the further you deviate from what is tested on a daily basis, the +more likely you are to run into problems. + +This table lists the OS versions used by Oracle when building JDK 9. Such +information is always subject to change, but this table is up to date at the +time of writing. + + Operating system Vendor/version used + ----------------- ------------------------------------------------------- + Linux Oracle Enterprise Linux 6.4 / 7.1 (using kernel 3.8.13) + Solaris Solaris 11.1 SRU 21.4.1 / 11.2 SRU 5.5 + macOS Mac OS X 10.9 (Mavericks) / 10.10 (Yosemite) + Windows Windows Server 2012 R2 + +The double version numbers for Linux, Solaris and macOS is due to the hybrid +model used at Oracle, where header files and external libraries from an older +version is used when building on a more modern version of the OS. + +The Build Group has a wiki page with [Supported Build Platforms]( +https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms). From +time to time, this is updated by the community to list successes or failures of +building on different platforms. + +### Windows + +Windows XP is not a supported platform, but all newer Windows should be able to +build OpenJDK. + +On Windows, it is important that you pay attention to the instructions in the +[Special Considerations](#special-considerations). + +Windows is the only non-POSIX OS supported by OpenJDK, and as such, requires +some extra care. A POSIX support layer is required to build on Windows. For +OpenJDK 9, the only supported such layer is Cygwin. (Msys is no longer +supported due to a too old bash; msys2 and the new Windows Subsystem for Linux +(WSL) would likely be possible to support in a future version but that would +require a community effort to implement.) + +Internally in the build system, all paths are represented as Unix-style paths, +e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This +rule also applies to input to the build system, e.g. in arguments to +`configure`. So, use `--with-freetype=/cygdrive/c/freetype` rather than +`--with-freetype=c:\freetype`. For details on this conversion, see the section +on [Fixpath](#fixpath). + +#### Cygwin + +A functioning [Cygwin](http://www.cygwin.com/) environment is thus required for +building OpenJDK on Windows. If you have a 64-bit OS, we strongly recommend +using the 64-bit version of Cygwin. + +**Note:** Cygwin has a model of continuously updating all packages without any +easy way to install or revert to a specific version of a package. This means +that whenever you add or update a package in Cygwin, you might (inadvertently) +update tools that are used by the OpenJDK build process, and that can cause +unexpected build problems. + +OpenJDK requires GNU Make 4.0 or greater on Windows. This is usually not a +problem, since Cygwin currently only distributes GNU Make at a version above +4.0. + +Apart from the basic Cygwin installation, the following packages must also be +installed: + + * `make` + * `zip` + * `unzip` + +Often, you can install these packages using the following command line: +``` +/setup-x86_64 -q -P make -P unzip -P zip +``` + +Unfortunately, Cygwin can be unreliable in certain circumstances. If you +experience build tool crashes or strange issues when building on Windows, +please check the Cygwin FAQ on the ["BLODA" list]( +https://cygwin.com/faq/faq.html#faq.using.bloda) and the section on [fork() +failures](https://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures). + +### Solaris + +See `make/devkit/solaris11.1-package-list.txt` for a list of recommended +packages to install when building on Solaris. The versions specified in this +list is the versions used by the daily builds at Oracle, and is likely to work +properly. + +Older versions of Solaris shipped a broken version of `objcopy`. At least +version 2.21.1 is needed, which is provided by Solaris 11 Update 1. Objcopy is +needed if you want to have external debug symbols. Please make sure you are +using at least version 2.21.1 of objcopy, or that you disable external debug +symbols. + +### macOS + +Apple is using a quite aggressive scheme of pushing OS updates, and coupling +these updates with required updates of Xcode. Unfortunately, this makes it +difficult for a project like OpenJDK to keep pace with a continuously updated +machine running macOS. See the section on [Apple Xcode](#apple-xcode) on some +strategies to deal with this. + +It is recommended that you use at least Mac OS X 10.9 (Mavericks). At the time +of writing, OpenJDK has been successfully compiled on macOS versions up to +10.12.5 (Sierra), using XCode 8.3.2 and `--disable-warnings-as-errors`. + +The standard macOS environment contains the basic tooling needed to build, but +for external libraries a package manager is recommended. OpenJDK uses +[homebrew](https://brew.sh/) in the examples, but feel free to use whatever +manager you want (or none). + +### Linux + +It is often not much problem to build OpenJDK on Linux. The only general advice +is to try to use the compilers, external libraries and header files as provided +by your distribution. + +The basic tooling is provided as part of the core operating system, but you +will most likely need to install developer packages. + +For apt-based distributions (Debian, Ubuntu, etc), try this: +``` +sudo apt-get install build-essential +``` + +For rpm-based distributions (Fedora, Red Hat, etc), try this: +``` +sudo yum groupinstall "Development Tools" +``` + +### AIX + +The regular builds by SAP is using AIX version 7.1, but AIX 5.3 is also +supported. See the [OpenJDK PowerPC Port Status Page]( +http://cr.openjdk.java.net/~simonis/ppc-aix-port) for details. + +## Native Compiler (Toolchain) Requirements + +Large portions of OpenJDK consists of native code, that needs to be compiled to +be able to run on the target platform. In theory, toolchain and operating +system should be independent factors, but in practice there's more or less a +one-to-one correlation between target operating system and toolchain. + + Operating system Supported toolchain + ------------------ ------------------------- + Linux gcc, clang + macOS Apple Xcode (using clang) + Solaris Oracle Solaris Studio + AIX IBM XL C/C++ + Windows Microsoft Visual Studio + +Please see the individual sections on the toolchains for version +recommendations. As a reference, these versions of the toolchains are used, at +the time of writing, by Oracle for the daily builds of OpenJDK. It should be +possible to compile OpenJDK with both older and newer versions, but the closer +you stay to this list, the more likely you are to compile successfully without +issues. + + Operating system Toolchain version + ------------------ ------------------------------------------------------- + Linux gcc 4.9.2 + macOS Apple Xcode 6.3 (using clang 6.1.0) + Solaris Oracle Solaris Studio 12.4 (with compiler version 5.13) + Windows Microsoft Visual Studio 2013 update 4 + +### gcc + +The minimum accepted version of gcc is 4.3. Older versions will not be accepted +by `configure`. + +However, gcc 4.3 is quite old and OpenJDK is not regularly tested on this +version, so it is recommended to use a more modern gcc. + +OpenJDK 9 includes patches that should allow gcc 6 to compile, but this should +be considered experimental. + +In general, any version between these two should be usable. + +### clang + +The minimum accepted version of clang is 3.2. Older versions will not be +accepted by `configure`. + +To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`. + +### Apple Xcode + +The oldest supported version of Xcode is 5. + +You will need the Xcode command lines developers tools to be able to build +OpenJDK. (Actually, *only* the command lines tools are needed, not the IDE.) +The simplest way to install these is to run: +``` +xcode-select --install +``` + +It is advisable to keep an older version of Xcode for building OpenJDK when +updating Xcode. This [blog page]( +http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html) has +good suggestions on managing multiple Xcode versions. To use a specific version +of Xcode, use `xcode-select -s` before running `configure`, or use +`--with-toolchain-path` to point to the version of Xcode to use, e.g. +`configure --with-toolchain-path=/Applications/Xcode5.app/Contents/Developer/usr/bin` + +If you have recently (inadvertently) updated your OS and/or Xcode version, and +OpenJDK can no longer be built, please see the section on [Problems with the +Build Environment](#problems-with-the-build-environment), and [Getting +Help](#getting-help) to find out if there are any recent, non-merged patches +available for this update. + +### Oracle Solaris Studio + +The minimum accepted version of the Solaris Studio compilers is 5.13 +(corresponding to Solaris Studio 12.4). Older versions will not be accepted by +configure. + +The Solaris Studio installation should contain at least these packages: + + Package Version + -------------------------------------------------- ------------- + developer/solarisstudio-124/backend 12.4-1.0.6.0 + developer/solarisstudio-124/c++ 12.4-1.0.10.0 + developer/solarisstudio-124/cc 12.4-1.0.4.0 + developer/solarisstudio-124/library/c++-libs 12.4-1.0.10.0 + developer/solarisstudio-124/library/math-libs 12.4-1.0.0.1 + developer/solarisstudio-124/library/studio-gccrt 12.4-1.0.0.1 + developer/solarisstudio-124/studio-common 12.4-1.0.0.1 + developer/solarisstudio-124/studio-ja 12.4-1.0.0.1 + developer/solarisstudio-124/studio-legal 12.4-1.0.0.1 + developer/solarisstudio-124/studio-zhCN 12.4-1.0.0.1 + +Compiling with Solaris Studio can sometimes be finicky. This is the exact +version used by Oracle, which worked correctly at the time of writing: +``` +$ cc -V +cc: Sun C 5.13 SunOS_i386 2014/10/20 +$ CC -V +CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30 +``` + +### Microsoft Visual Studio + +The minimum accepted version of Visual Studio is 2010. Older versions will not +be accepted by `configure`. The maximum accepted version of Visual Studio is +2013. + +If you have multiple versions of Visual Studio installed, `configure` will by +default pick the latest. You can request a specific version to be used by +setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2010`. + +If you get `LINK: fatal error LNK1123: failure during conversion to COFF: file +invalid` when building using Visual Studio 2010, you have encountered +[KB2757355](http://support.microsoft.com/kb/2757355), a bug triggered by a +specific installation order. However, the solution suggested by the KB article +does not always resolve the problem. See [this stackoverflow discussion]( +https://stackoverflow.com/questions/10888391) for other suggestions. + +### IBM XL C/C++ + +The regular builds by SAP is using version 12.1, described as `IBM XL C/C++ for +AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017`. + +See the [OpenJDK PowerPC Port Status Page]( +http://cr.openjdk.java.net/~simonis/ppc-aix-port) for details. + +## Boot JDK Requirements + +Paradoxically, building OpenJDK requires a pre-existing JDK. This is called the +"boot JDK". The boot JDK does not have to be OpenJDK, though. If you are +porting OpenJDK to a new platform, chances are that there already exists +another JDK for that platform that is usable as boot JDK. + +The rule of thumb is that the boot JDK for building JDK major version *N* +should be an JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be +suitable as boot JDK. However, OpenJDK should be able to "build itself", so an +up-to-date build of the current OpenJDK source is an acceptable alternative. If +you are following the *N-1* rule, make sure you got the latest update version, +since JDK 8 GA might not be able to build JDK 9 on all platforms. + +If the Boot JDK is not automatically detected, or the wrong JDK is picked, use +`--with-boot-jdk` to point to the JDK to use. + +### JDK 8 on Linux + +On apt-based distros (like Debian and Ubuntu), `sudo apt-get install +openjdk-8-jdk` is typically enough to install OpenJDK 8. On rpm-based distros +(like Fedora and Red Hat), try `sudo yum install java-1.8.0-openjdk-devel`. + +### JDK 8 on Windows + +No pre-compiled binaries of OpenJDK 8 are readily available for Windows at the +time of writing. An alternative is to download the [Oracle JDK]( +http://www.oracle.com/technetwork/java/javase/downloads). Another is the [Adopt +OpenJDK Project](https://adoptopenjdk.net/), which publishes experimental +prebuilt binaries for Windows. + +### JDK 8 on macOS + +No pre-compiled binaries of OpenJDK 8 are readily available for macOS at the +time of writing. An alternative is to download the [Oracle JDK]( +http://www.oracle.com/technetwork/java/javase/downloads), or to install it +using `brew cask install java`. Another option is the [Adopt OpenJDK Project]( +https://adoptopenjdk.net/), which publishes experimental prebuilt binaries for +macOS. + +### JDK 8 on AIX + +No pre-compiled binaries of OpenJDK 8 are readily available for AIX at the +time of writing. A starting point for working with OpenJDK on AIX is +the [PowerPC/AIX Port Project](http://openjdk.java.net/projects/ppc-aix-port/). + +## External Library Requirements + +Different platforms require different external libraries. In general, libraries +are not optional - that is, they are either required or not used. + +If a required library is not detected by `configure`, you need to provide the +path to it. There are two forms of the `configure` arguments to point to an +external library: `--with-=` or `--with--include= --with--lib=`. The first variant is more concise, +but require the include files an library files to reside in a default hierarchy +under this directory. In most cases, it works fine. + +As a fallback, the second version allows you to point to the include directory +and the lib directory separately. + +### FreeType + +FreeType2 from [The FreeType Project](http://www.freetype.org/) is required on +all platforms. At least version 2.3 is required. + + * To install on an apt-based Linux, try running `sudo apt-get install + libcups2-dev`. + * To install on an rpm-based Linux, try running `sudo yum install + cups-devel`. + * To install on Solaris, try running `pkg install system/library/freetype-2`. + * To install on macOS, try running `brew install freetype`. + * To install on Windows, see [below](#building-freetype-on-windows). + +Use `--with-freetype=` if `configure` does not properly locate your +FreeType files. + +#### Building FreeType on Windows + +On Windows, there is no readily available compiled version of FreeType. OpenJDK +can help you compile FreeType from source. Download the FreeType sources and +unpack them into an arbitrary directory: + +``` +wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz +tar -xzf freetype-2.5.3.tar.gz +``` + +Then run `configure` with `--with-freetype-src=`. This will +automatically build the freetype library into `/lib64` for 64-bit +builds or into `/lib32` for 32-bit builds. Afterwards you can +always use `--with-freetype-include=/include` and +`--with-freetype-lib=/lib[32|64]` for other builds. + +Alternatively you can unpack the sources like this to use the default +directory: + +``` +tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz +``` + +### CUPS + +CUPS, [Common UNIX Printing System](http://www.cups.org) header files are +required on all platforms, except Windows. Often these files are provided by +your operating system. + + * To install on an apt-based Linux, try running `sudo apt-get install + libcups2-dev`. + * To install on an rpm-based Linux, try running `sudo yum install + cups-devel`. + * To install on Solaris, try running `pkg install print/cups`. + +Use `--with-cups=` if `configure` does not properly locate your CUPS +files. + +### X11 + +Certain [X11](http://www.x.org/) libraries and include files are required on +Linux and Solaris. + + * To install on an apt-based Linux, try running `sudo apt-get install + libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev`. + * To install on an rpm-based Linux, try running `sudo yum install + libXtst-devel libXt-devel libXrender-devel libXi-devel`. + * To install on Solaris, try running `pkg install x11/header/x11-protocols + x11/library/libice x11/library/libpthread-stubs x11/library/libsm + x11/library/libx11 x11/library/libxau x11/library/libxcb + x11/library/libxdmcp x11/library/libxevie x11/library/libxext + x11/library/libxrender x11/library/libxscrnsaver x11/library/libxtst + x11/library/toolkit/libxt`. + +Use `--with-x=` if `configure` does not properly locate your X11 files. + +### ALSA + +ALSA, [Advanced Linux Sound Architecture](https://www.alsa-project.org/) is +required on Linux. At least version 0.9.1 of ALSA is required. + + * To install on an apt-based Linux, try running `sudo apt-get install + libasound2-dev`. + * To install on an rpm-based Linux, try running `sudo yum install + alsa-lib-devel`. + +Use `--with-alsa=` if `configure` does not properly locate your ALSA +files. + +### libffi + +libffi, the [Portable Foreign Function Interface Library]( +http://sourceware.org/libffi) is required when building the Zero version of +Hotspot. + + * To install on an apt-based Linux, try running `sudo apt-get install + libffi-dev`. + * To install on an rpm-based Linux, try running `sudo yum install + libffi-devel`. + +Use `--with-libffi=` if `configure` does not properly locate your libffi +files. + +### libelf + +libelf from the [elfutils project](http://sourceware.org/elfutils) is required +when building the AOT feature of Hotspot. + + * To install on an apt-based Linux, try running `sudo apt-get install + libelf-dev`. + * To install on an rpm-based Linux, try running `sudo yum install + elfutils-libelf-devel`. + +Use `--with-libelf=` if `configure` does not properly locate your libelf +files. + +## Other Tooling Requirements + +### GNU Make + +OpenJDK requires [GNU Make](http://www.gnu.org/software/make). No other flavors +of make are supported. + +At least version 3.81 of GNU Make must be used. For distributions supporting +GNU Make 4.0 or above, we strongly recommend it. GNU Make 4.0 contains useful +functionality to handle parallel building (supported by `--with-output-sync`) +and speed and stability improvements. + +Note that `configure` locates and verifies a properly functioning version of +`make` and stores the path to this `make` binary in the configuration. If you +start a build using `make` on the command line, you will be using the version +of make found first in your `PATH`, and not necessarily the one stored in the +configuration. This initial make will be used as "bootstrap make", and in a +second stage, the make located by `configure` will be called. Normally, this +will present no issues, but if you have a very old `make`, or a non-GNU Make +`make` in your path, this might cause issues. + +If you want to override the default make found by `configure`, use the `MAKE` +configure variable, e.g. `configure MAKE=/opt/gnu/make`. + +On Solaris, it is common to call the GNU version of make by using `gmake`. + +### GNU Bash + +OpenJDK requires [GNU Bash](http://www.gnu.org/software/bash). No other shells +are supported. + +At least version 3.2 of GNU Bash must be used. + +### Autoconf + +If you want to modify the build system itself, you need to install [Autoconf]( +http://www.gnu.org/software/autoconf). + +However, if you only need to build OpenJDK or if you only edit the actual +OpenJDK source files, there is no dependency on autoconf, since the source +distribution includes a pre-generated `configure` shell script. + +See the section on [Autoconf Details](#autoconf-details) for details on how +OpenJDK uses autoconf. This is especially important if you plan to contribute +changes to OpenJDK that modifies the build system. + +## Running Configure + +To build OpenJDK, you need a "configuration", which consists of a directory +where to store the build output, coupled with information about the platform, +the specific build machine, and choices that affect how OpenJDK is built. + +The configuration is created by the `configure` script. The basic invocation of +the `configure` script looks like this: + +``` +bash configure [options] +``` + +This will create an output directory containing the configuration and setup an +area for the build result. This directory typically looks like +`build/linux-x64-normal-server-release`, but the actual name depends on your +specific configuration. (It can also be set directly, see [Using Multiple +Configurations](#using-multiple-configurations)). This directory is referred to +as `$BUILD` in this documentation. + +`configure` will try to figure out what system you are running on and where all +necessary build components are. If you have all prerequisites for building +installed, it should find everything. If it fails to detect any component +automatically, it will exit and inform you about the problem. + +Some command line examples: + + * Create a 32-bit build for Windows with FreeType2 in `C:\freetype-i586`: + ``` + bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32 + ``` + + * Create a debug build with the `server` JVM and DTrace enabled: + ``` + bash configure --enable-debug --with-jvm-variants=server --enable-dtrace + ``` + +### Common Configure Arguments + +Here follows some of the most common and important `configure` argument. + +To get up-to-date information on *all* available `configure` argument, please +run: +``` +bash configure --help +``` + +(Note that this help text also include general autoconf options, like +`--dvidir`, that is not relevant to OpenJDK. To list only OpenJDK specific +features, use `bash configure --help=short` instead.) + +#### Configure Arguments for Tailoring the Build + + * `--enable-debug` - Set the debug level to `fastdebug` (this is a shorthand + for `--with-debug-level=fastdebug`) + * `--with-debug-level=` - Set the debug level, which can be `release`, + `fastdebug`, `slowdebug` or `optimized`. Default is `release`. `optimized` + is variant of `release` with additional Hotspot debug code. + * `--with-native-debug-symbols=` - Specify if and how native debug + symbols should be built. Available methods are `none`, `internal`, + `external`, `zipped`. Default behavior depends on platform. See [Native + Debug Symbols](#native-debug-symbols) for more details. + * `--with-version-string=` - Specify the version string this build + will be identified with. + * `--with-version-=` - A group of options, where `` can be + any of `pre`, `opt`, `build`, `major`, `minor`, `security` or `patch`. Use + these options to modify just the corresponding part of the version string + from the default, or the value provided by `--with-version-string`. + * `--with-jvm-variants=[,...]` - Build the specified variant + (or variants) of Hotspot. Valid variants are: `server`, `client`, + `minimal`, `core`, `zero`, `zeroshark`, `custom`. Note that not all + variants are possible to combine in a single build. + * `--with-jvm-features=[,...]` - Use the specified JVM + features when building Hotspot. The list of features will be enabled on top + of the default list. For the `custom` JVM variant, this default list is + empty. A complete list of available JVM features can be found using `bash + configure --help`. + * `--with-target-bits=` - Create a target binary suitable for running + on a `` platform. Use this to create 32-bit output on a 64-bit build + platform, instead of doing a full cross-compile. (This is known as a + *reduced* build.) + +#### Configure Arguments for Native Compilation + + * `--with-devkit=` - Use this devkit for compilers, tools and resources + * `--with-sysroot=` - Use this directory as sysroot + * `--with-extra-path=[;]` - Prepend these directories to the + default path when searching for all kinds of binaries + * `--with-toolchain-path=[;]` - Prepend these directories when + searching for toolchain binaries (compilers etc) + * `--with-extra-cflags=` - Append these flags when compiling JDK C + files + * `--with-extra-cxxflags=` - Append these flags when compiling JDK C++ + files + * `--with-extra-ldflags=` - Append these flags when linking JDK + libraries + +#### Configure Arguments for External Dependencies + + * `--with-boot-jdk=` - Set the path to the [Boot JDK]( + #boot-jdk-requirements) + * `--with-freetype=` - Set the path to [FreeType](#freetype) + * `--with-cups=` - Set the path to [CUPS](#cups) + * `--with-x=` - Set the path to [X11](#x11) + * `--with-alsa=` - Set the path to [ALSA](#alsa) + * `--with-libffi=` - Set the path to [libffi](#libffi) + * `--with-libelf=` - Set the path to [libelf](#libelf) + * `--with-jtreg=` - Set the path to JTReg. See [Running Tests]( + #running-tests) + +Certain third-party libraries used by OpenJDK (libjpeg, giflib, libpng, lcms +and zlib) are included in the OpenJDK repository. The default behavior of the +OpenJDK build is to use this version of these libraries, but they might be +replaced by an external version. To do so, specify `system` as the `` +option in these arguments. (The default is `bundled`). + + * `--with-libjpeg=` - Use the specified source for libjpeg + * `--with-giflib=` - Use the specified source for giflib + * `--with-libpng=` - Use the specified source for libpng + * `--with-lcms=` - Use the specified source for lcms + * `--with-zlib=` - Use the specified source for zlib + +On Linux, it is possible to select either static or dynamic linking of the C++ +runtime. The default is static linking, with dynamic linking as fallback if the +static library is not found. + + * `--with-stdc++lib=` - Use the specified method (`static`, `dynamic` + or `default`) for linking the C++ runtime. + +### Configure Control Variables + +It is possible to control certain aspects of `configure` by overriding the +value of `configure` variables, either on the command line or in the +environment. + +Normally, this is **not recommended**. If used improperly, it can lead to a +broken configuration. Unless you're well versed in the build system, this is +hard to use properly. Therefore, `configure` will print a warning if this is +detected. + +However, there are a few `configure` variables, known as *control variables* +that are supposed to be overriden on the command line. These are variables that +describe the location of tools needed by the build, like `MAKE` or `GREP`. If +any such variable is specified, `configure` will use that value instead of +trying to autodetect the tool. For instance, `bash configure +MAKE=/opt/gnumake4.0/bin/make`. + +If a configure argument exists, use that instead, e.g. use `--with-jtreg` +instead of setting `JTREGEXE`. + +Also note that, despite what autoconf claims, setting `CFLAGS` will not +accomplish anything. Instead use `--with-extra-cflags` (and similar for +`cxxflags` and `ldflags`). + +## Running Make + +When you have a proper configuration, all you need to do to build OpenJDK is to +run `make`. (But see the warning at [GNU Make](#gnu-make) about running the +correct version of make.) + +When running `make` without any arguments, the default target is used, which is +the same as running `make default` or `make jdk`. This will build a minimal (or +roughly minimal) set of compiled output (known as an "exploded image") needed +for a developer to actually execute the newly built JDK. The idea is that in an +incremental development fashion, when doing a normal make, you should only +spend time recompiling what's changed (making it purely incremental) and only +do the work that's needed to actually run and test your code. + +The output of the exploded image resides in `$BUILD/jdk`. You can test the +newly built JDK like this: `$BUILD/jdk/bin/java -version`. + +### Common Make Targets + +Apart from the default target, here are some common make targets: + + * `hotspot` - Build all of hotspot (but only hotspot) + * `hotspot-` - Build just the specified jvm variant + * `images` or `product-images` - Build the JRE and JDK images + * `docs` or `docs-image` - Build the documentation image + * `test-image` - Build the test image + * `all` or `all-images` - Build all images (product, docs and test) + * `bootcycle-images` - Build images twice, second time with newly built JDK + (good for testing) + * `clean` - Remove all files generated by make, but not those generated by + configure + * `dist-clean` - Remove all files, including configuration + +Run `make help` to get an up-to-date list of important make targets and make +control variables. + +It is possible to build just a single module, a single phase, or a single phase +of a single module, by creating make targets according to these followin +patterns. A phase can be either of `gensrc`, `gendata`, `copy`, `java`, +`launchers`, `libs` or `rmic`. See [Using Fine-Grained Make Targets]( +#using-fine-grained-make-targets) for more details about this functionality. + + * `` - Build the specified phase and everything it depends on + * `` - Build the specified module and everything it depends on + * `-` - Compile the specified phase for the specified module + and everything it depends on + +Similarly, it is possible to clean just a part of the build by creating make +targets according to these patterns: + + * `clean-` - Remove the subdir in the output dir with the name + * `clean-` - Remove all build results related to a certain build + phase + * `clean-` - Remove all build results related to a certain module + * `clean--` - Remove all build results related to a certain + module and phase + +### Make Control Variables + +It is possible to control `make` behavior by overriding the value of `make` +variables, either on the command line or in the environment. + +Normally, this is **not recommended**. If used improperly, it can lead to a +broken build. Unless you're well versed in the build system, this is hard to +use properly. Therefore, `make` will print a warning if this is detected. + +However, there are a few `make` variables, known as *control variables* that +are supposed to be overriden on the command line. These make up the "make time" +configuration, as opposed to the "configure time" configuration. + +#### General Make Control Variables + + * `JOBS` - Specify the number of jobs to build with. See [Build + Performance](#build-performance). + * `LOG` - Specify the logging level and functionality. See [Checking the + Build Log File](#checking-the-build-log-file) + * `CONF` and `CONF_NAME` - Selecting the configuration(s) to use. See [Using + Multiple Configurations](#using-multiple-configurations) + +#### Test Make Control Variables + +These make control variables only make sense when running tests. Please see +[Testing OpenJDK](testing.html) for details. + + * `TEST` + * `TEST_JOBS` + * `JTREG` + * `GTEST` + +#### Advanced Make Control Variables + +These advanced make control variables can be potentially unsafe. See [Hints and +Suggestions for Advanced Users](#hints-and-suggestions-for-advanced-users) and +[Understanding the Build System](#understanding-the-build-system) for details. + + * `SPEC` + * `CONF_CHECK` + * `COMPARE_BUILD` + * `JDK_FILTER` + +## Running Tests + +Most of the OpenJDK tests are using the [JTReg](http://openjdk.java.net/jtreg) +test framework. Make sure that your configuration knows where to find your +installation of JTReg. If this is not picked up automatically, use the +`--with-jtreg=` option to point to the JTReg framework. +Note that this option should point to the JTReg home, i.e. the top directory, +containing `lib/jtreg.jar` etc. + +To execute the most basic tests (tier 1), use: +``` +make run-test-tier1 +``` + +For more details on how to run tests, please see the [Testing +OpenJDK](testing.html) document. + +## Cross-compiling + +Cross-compiling means using one platform (the *build* platform) to generate +output that can ran on another platform (the *target* platform). + +The typical reason for cross-compiling is that the build is performed on a more +powerful desktop computer, but the resulting binaries will be able to run on a +different, typically low-performing system. Most of the complications that +arise when building for embedded is due to this separation of *build* and +*target* systems. + +This requires a more complex setup and build procedure. This section assumes +you are familiar with cross-compiling in general, and will only deal with the +particularities of cross-compiling OpenJDK. If you are new to cross-compiling, +please see the [external links at Wikipedia]( +https://en.wikipedia.org/wiki/Cross_compiler#External_links) for a good start +on reading materials. + +Cross-compiling OpenJDK requires you to be able to build both for the build +platform and for the target platform. The reason for the former is that we need +to build and execute tools during the build process, both native tools and Java +tools. + +If all you want to do is to compile a 32-bit version, for the same OS, on a +64-bit machine, consider using `--with-target-bits=32` instead of doing a +full-blown cross-compilation. (While this surely is possible, it's a lot more +work and will take much longer to build.) + +### Boot JDK and Build JDK + +When cross-compiling, make sure you use a boot JDK that runs on the *build* +system, and not on the *target* system. + +To be able to build, we need a "Build JDK", which is a JDK built from the +current sources (that is, the same as the end result of the entire build +process), but able to run on the *build* system, and not the *target* system. +(In contrast, the Boot JDK should be from an older release, e.g. JDK 8 when +building JDK 9.) + +The build process will create a minimal Build JDK for you, as part of building. +To speed up the build, you can use `--with-build-jdk` to `configure` to point +to a pre-built Build JDK. Please note that the build result is unpredictable, +and can possibly break in subtle ways, if the Build JDK does not **exactly** +match the current sources. + +### Specifying the Target Platform + +You *must* specify the target platform when cross-compiling. Doing so will also +automatically turn the build into a cross-compiling mode. The simplest way to +do this is to use the `--openjdk-target` argument, e.g. +`--openjdk-target=arm-linux-gnueabihf`. or `--openjdk-target=aarch64-oe-linux`. +This will automatically set the `--build`, `--host` and `--target` options for +autoconf, which can otherwise be confusing. (In autoconf terminology, the +"target" is known as "host", and "target" is used for building a Canadian +cross-compiler.) + +### Toolchain Considerations + +You will need two copies of your toolchain, one which generates output that can +run on the target system (the normal, or *target*, toolchain), and one that +generates output that can run on the build system (the *build* toolchain). Note +that cross-compiling is only supported for gcc at the time being. The gcc +standard is to prefix cross-compiling toolchains with the target denominator. +If you follow this standard, `configure` is likely to pick up the toolchain +correctly. + +The *build* toolchain will be autodetected just the same way the normal +*build*/*target* toolchain will be autodetected when not cross-compiling. If +this is not what you want, or if the autodetection fails, you can specify a +devkit containing the *build* toolchain using `--with-build-devkit` to +`configure`, or by giving `BUILD_CC` and `BUILD_CXX` arguments. + +It is often helpful to locate the cross-compilation tools, headers and +libraries in a separate directory, outside the normal path, and point out that +directory to `configure`. Do this by setting the sysroot (`--with-sysroot`) and +appending the directory when searching for cross-compilations tools +(`--with-toolchain-path`). As a compact form, you can also use `--with-devkit` +to point to a single directory, if it is correctly setup. (See `basics.m4` for +details.) + +If you are unsure what toolchain and versions to use, these have been proved +working at the time of writing: + + * [aarch64]( +https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux.tar.xz) + * [arm 32-bit hardware floating point]( +https://launchpad.net/linaro-toolchain-unsupported/trunk/2012.09/+download/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux.tar.bz2) + +### Native Libraries + +You will need copies of external native libraries for the *target* system, +present on the *build* machine while building. + +Take care not to replace the *build* system's version of these libraries by +mistake, since that can render the *build* machine unusable. + +Make sure that the libraries you point to (ALSA, X11, etc) are for the +*target*, not the *build*, platform. + +#### ALSA + +You will need alsa libraries suitable for your *target* system. For most cases, +using Debian's pre-built libraries work fine. + +Note that alsa is needed even if you only want to build a headless JDK. + + * Go to [Debian Package Search](https://www.debian.org/distrib/packages) and + search for the `libasound2` and `libasound2-dev` packages for your *target* + system. Download them to /tmp. + + * Install the libraries into the cross-compilation toolchain. For instance: +``` +cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc +dpkg-deb -x /tmp/libasound2_1.0.25-4_armhf.deb . +dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb . +``` + + * If alsa is not properly detected by `configure`, you can point it out by + `--with-alsa`. + +#### X11 + +You will need X11 libraries suitable for your *target* system. For most cases, +using Debian's pre-built libraries work fine. + +Note that X11 is needed even if you only want to build a headless JDK. + + * Go to [Debian Package Search](https://www.debian.org/distrib/packages), + search for the following packages for your *target* system, and download them + to /tmp/target-x11: + * libxi + * libxi-dev + * x11proto-core-dev + * x11proto-input-dev + * x11proto-kb-dev + * x11proto-render-dev + * x11proto-xext-dev + * libice-dev + * libxrender + * libxrender-dev + * libsm-dev + * libxt-dev + * libx11 + * libx11-dev + * libxtst + * libxtst-dev + * libxext + * libxext-dev + + * Install the libraries into the cross-compilation toolchain. For instance: + ``` + cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc/usr + mkdir X11R6 + cd X11R6 + for deb in /tmp/target-x11/*.deb ; do dpkg-deb -x $deb . ; done + mv usr/* . + cd lib + cp arm-linux-gnueabihf/* . + ``` + + You can ignore the following messages. These libraries are not needed to + successfully complete a full JDK build. + ``` + cp: cannot stat `arm-linux-gnueabihf/libICE.so': No such file or directory + cp: cannot stat `arm-linux-gnueabihf/libSM.so': No such file or directory + cp: cannot stat `arm-linux-gnueabihf/libXt.so': No such file or directory + ``` + + * If the X11 libraries are not properly detected by `configure`, you can + point them out by `--with-x`. + +### Building for ARM/aarch64 + +A common cross-compilation target is the ARM CPU. When building for ARM, it is +useful to set the ABI profile. A number of pre-defined ABI profiles are +available using `--with-abi-profile`: arm-vfp-sflt, arm-vfp-hflt, arm-sflt, +armv5-vfp-sflt, armv6-vfp-hflt. Note that soft-float ABIs are no longer +properly supported on OpenJDK. + +OpenJDK contains two different ports for the aarch64 platform, one is the +original aarch64 port from the [AArch64 Port Project]( +http://openjdk.java.net/projects/aarch64-port) and one is a 64-bit version of +the Oracle contributed ARM port. When targeting aarch64, by the default the +original aarch64 port is used. To select the Oracle ARM 64 port, use +`--with-cpu-port=arm64`. Also set the corresponding value (`aarch64` or +`arm64`) to --with-abi-profile, to ensure a consistent build. + +### Verifying the Build + +The build will end up in a directory named like +`build/linux-arm-normal-server-release`. + +Inside this build output directory, the `images/jdk` and `images/jre` will +contain the newly built JDK and JRE, respectively, for your *target* system. + +Copy these folders to your *target* system. Then you can run e.g. +`images/jdk/bin/java -version`. + +## Build Performance + +Building OpenJDK requires a lot of horsepower. Some of the build tools can be +adjusted to utilize more or less of resources such as parallel threads and +memory. The `configure` script analyzes your system and selects reasonable +values for such options based on your hardware. If you encounter resource +problems, such as out of memory conditions, you can modify the detected values +with: + + * `--with-num-cores` -- number of cores in the build system, e.g. + `--with-num-cores=8`. + + * `--with-memory-size` -- memory (in MB) available in the build system, e.g. + `--with-memory-size=1024` + +You can also specify directly the number of build jobs to use with +`--with-jobs=N` to `configure`, or `JOBS=N` to `make`. Do not use the `-j` flag +to `make`. In most cases it will be ignored by the makefiles, but it can cause +problems for some make targets. + +It might also be necessary to specify the JVM arguments passed to the Boot JDK, +using e.g. `--with-boot-jdk-jvmargs="-Xmx8G"`. Doing so will override the +default JVM arguments passed to the Boot JDK. + +At the end of a successful execution of `configure`, you will get a performance +summary, indicating how well the build will perform. Here you will also get +performance hints. If you want to build fast, pay attention to those! + +If you want to tweak build performance, run with `make LOG=info` to get a build +time summary at the end of the build process. + +### Disk Speed + +If you are using network shares, e.g. via NFS, for your source code, make sure +the build directory is situated on local disk (e.g. by `ln -s +/localdisk/jdk-build $JDK-SHARE/build`). The performance penalty is extremely +high for building on a network share; close to unusable. + +Also, make sure that your build tools (including Boot JDK and toolchain) is +located on a local disk and not a network share. + +As has been stressed elsewhere, do use SSD for source code and build directory, +as well as (if possible) the build tools. + +### Virus Checking + +The use of virus checking software, especially on Windows, can *significantly* +slow down building of OpenJDK. If possible, turn off such software, or exclude +the directory containing the OpenJDK source code from on-the-fly checking. + +### Ccache + +The OpenJDK build supports building with ccache when using gcc or clang. Using +ccache can radically speed up compilation of native code if you often rebuild +the same sources. Your milage may vary however, so we recommend evaluating it +for yourself. To enable it, make sure it's on the path and configure with +`--enable-ccache`. + +### Precompiled Headers + +By default, the Hotspot build uses preccompiled headers (PCH) on the toolchains +were it is properly supported (clang, gcc, and Visual Studio). Normally, this +speeds up the build process, but in some circumstances, it can actually slow +things down. + +You can experiment by disabling precompiled headers using +`--disable-precompiled-headers`. + +### Icecc / icecream + +[icecc/icecream](http://github.com/icecc/icecream) is a simple way to setup a +distributed compiler network. If you have multiple machines available for +building OpenJDK, you can drastically cut individual build times by utilizing +it. + +To use, setup an icecc network, and install icecc on the build machine. Then +run `configure` using `--enable-icecc`. + +### Using sjavac + +To speed up Java compilation, especially incremental compilations, you can try +the experimental sjavac compiler by using `--enable-sjavac`. + +### Building the Right Target + +Selecting the proper target to build can have dramatic impact on build time. +For normal usage, `jdk` or the default target is just fine. You only need to +build `images` for shipping, or if your tests require it. + +See also [Using Fine-Grained Make Targets](#using-fine-grained-make-targets) on +how to build an even smaller subset of the product. + +## Troubleshooting + +If your build fails, it can sometimes be difficult to pinpoint the problem or +find a proper solution. + +### Locating the Source of the Error + +When a build fails, it can be hard to pinpoint the actual cause of the error. +In a typical build process, different parts of the product build in parallel, +with the output interlaced. + +#### Build Failure Summary + +To help you, the build system will print a failure summary at the end. It looks +like this: + +``` +ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code 2) + +=== Output from failing command(s) repeated here === +* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o: +/localhome/hg/jdk9-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type + ... (rest of output omitted) + +* All command lines available in /localhome/hg/jdk9-sandbox/build/linux-x64/make-support/failure-logs. +=== End of repeated output === + +=== Make failed targets repeated here === +lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed +make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed +=== End of repeated output === + +Hint: Try searching the build log for the name of the first failed target. +Hint: If caused by a warning, try configure --disable-warnings-as-errors. +``` + +Let's break it down! First, the selected configuration, and the top-level +target you entered on the command line that caused the failure is printed. + +Then, between the `Output from failing command(s) repeated here` and `End of +repeated output` the first lines of output (stdout and stderr) from the actual +failing command is repeated. In most cases, this is the error message that +caused the build to fail. If multiple commands were failing (this can happen in +a parallel build), output from all failed commands will be printed here. + +The path to the `failure-logs` directory is printed. In this file you will find +a `.log` file that contains the output from this command in its +entirety, and also a `.cmd`, which contain the complete command line +used for running this command. You can re-run the failing command by executing +`. /.cmd` in your shell. + +Another way to trace the failure is to follow the chain of make targets, from +top-level targets to individual file targets. Between `Make failed targets +repeated here` and `End of repeated output` the output from make showing this +chain is repeated. The first failed recipe will typically contain the full path +to the file in question that failed to compile. Following lines will show a +trace of make targets why we ended up trying to compile that file. + +Finally, some hints are given on how to locate the error in the complete log. +In this example, we would try searching the log file for "`psMemoryPool.o`". +Another way to quickly locate make errors in the log is to search for "`] +Error`" or "`***`". + +Note that the build failure summary will only help you if the issue was a +compilation failure or similar. If the problem is more esoteric, or is due to +errors in the build machinery, you will likely get empty output logs, and `No +indication of failed target found` instead of the make target chain. + +#### Checking the Build Log File + +The output (stdout and stderr) from the latest build is always stored in +`$BUILD/build.log`. The previous build log is stored as `build.log.old`. This +means that it is not necessary to redirect the build output yourself if you +want to process it. + +You can increase the verbosity of the log file, by the `LOG` control variable +to `make`. If you want to see the command lines used in compilations, use +`LOG=cmdlines`. To increase the general verbosity, use `LOG=info`, `LOG=debug` +or `LOG=trace`. Both of these can be combined with `cmdlines`, e.g. +`LOG=info,cmdlines`. The `debug` log level will show most shell commands +executed by make, and `trace` will show all. Beware that both these log levels +will produce a massive build log! + +### Fixing Unexpected Build Failures + +Most of the time, the build will fail due to incorrect changes in the source +code. + +Sometimes the build can fail with no apparent changes that have caused the +failure. If this is the first time you are building OpenJDK on this particular +computer, and the build fails, the problem is likely with your build +environment. But even if you have previously built OpenJDK with success, and it +now fails, your build environment might have changed (perhaps due to OS +upgrades or similar). But most likely, such failures are due to problems with +the incremental rebuild. + +#### Problems with the Build Environment + +Make sure your configuration is correct. Re-run `configure`, and look for any +warnings. Warnings that appear in the middle of the `configure` output is also +repeated at the end, after the summary. The entire log is stored in +`$BUILD/configure.log`. + +Verify that the summary at the end looks correct. Are you indeed using the Boot +JDK and native toolchain that you expect? + +By default, OpenJDK has a strict approach where warnings from the compiler is +considered errors which fail the build. For very new or very old compiler +versions, this can trigger new classes of warnings, which thus fails the build. +Run `configure` with `--disable-warnings-as-errors` to turn of this behavior. +(The warnings will still show, but not make the build fail.) + +#### Problems with Incremental Rebuilds + +Incremental rebuilds mean that when you modify part of the product, only the +affected parts get rebuilt. While this works great in most cases, and +significantly speed up the development process, from time to time complex +interdependencies will result in an incorrect build result. This is the most +common cause for unexpected build problems, together with inconsistencies +between the different Mercurial repositories in the forest. + +Here are a suggested list of things to try if you are having unexpected build +problems. Each step requires more time than the one before, so try them in +order. Most issues will be solved at step 1 or 2. + + 1. Make sure your forest is up-to-date + + Run `bash get_source.sh` to make sure you have the latest version of all + repositories. + + 2. Clean build results + + The simplest way to fix incremental rebuild issues is to run `make clean`. + This will remove all build results, but not the configuration or any build + system support artifacts. In most cases, this will solve build errors + resulting from incremental build mismatches. + + 3. Completely clean the build directory. + + If this does not work, the next step is to run `make dist-clean`, or + removing the build output directory (`$BUILD`). This will clean all + generated output, including your configuration. You will need to re-run + `configure` after this step. A good idea is to run `make + print-configuration` before running `make dist-clean`, as this will print + your current `configure` command line. Here's a way to do this: + + ``` + make print-configuration > current-configuration + make dist-clean + bash configure $(cat current-configuration) + make + ``` + + 4. Re-clone the Mercurial forest + + Sometimes the Mercurial repositories themselves gets in a state that causes + the product to be un-buildable. In such a case, the simplest solution is + often the "sledgehammer approach": delete the entire forest, and re-clone + it. If you have local changes, save them first to a different location + using `hg export`. + +### Specific Build Issues + +#### Clock Skew + +If you get an error message like this: +``` +File 'xxx' has modification time in the future. +Clock skew detected. Your build may be incomplete. +``` +then the clock on your build machine is out of sync with the timestamps on the +source files. Other errors, apparently unrelated but in fact caused by the +clock skew, can occur along with the clock skew warnings. These secondary +errors may tend to obscure the fact that the true root cause of the problem is +an out-of-sync clock. + +If you see these warnings, reset the clock on the build machine, run `make +clean` and restart the build. + +#### Out of Memory Errors + +On Solaris, you might get an error message like this: +``` +Trouble writing out table to disk +``` +To solve this, increase the amount of swap space on your build machine. + +On Windows, you might get error messages like this: +``` +fatal error - couldn't allocate heap +cannot create ... Permission denied +spawn failed +``` +This can be a sign of a Cygwin problem. See the information about solving +problems in the [Cygwin](#cygwin) section. Rebooting the computer might help +temporarily. + +### Getting Help + +If none of the suggestions in this document helps you, or if you find what you +believe is a bug in the build system, please contact the Build Group by sending +a mail to [build-dev@openjdk.java.net](mailto:build-dev@openjdk.java.net). +Please include the relevant parts of the configure and/or build log. + +If you need general help or advice about developing for OpenJDK, you can also +contact the Adoption Group. See the section on [Contributing to OpenJDK]( +#contributing-to-openjdk) for more information. + +## Hints and Suggestions for Advanced Users + +### Setting Up a Forest for Pushing Changes (defpath) + +To help you prepare a proper push path for a Mercurial repository, there exists +a useful tool known as [defpath]( +http://openjdk.java.net/projects/code-tools/defpath). It will help you setup a +proper push path for pushing changes to OpenJDK. + +Install the extension by cloning +`http://hg.openjdk.java.net/code-tools/defpath` and updating your `.hgrc` file. +Here's one way to do this: + +``` +cd ~ +mkdir hg-ext +cd hg-ext +hg clone http://hg.openjdk.java.net/code-tools/defpath +cat << EOT >> ~/.hgrc +[extensions] +defpath=~/hg-ext/defpath/defpath.py +EOT +``` + +You can now setup a proper push path using: +``` +hg defpath -d -u +``` + +If you also have the `trees` extension installed in Mercurial, you will +automatically get a `tdefpath` command, which is even more useful. By running +`hg tdefpath -du ` in the top repository of your forest, all repos +will get setup automatically. This is the recommended usage. + +### Bash Completion + +The `configure` and `make` commands tries to play nice with bash command-line +completion (using `` or ``). To use this functionality, make +sure you enable completion in your `~/.bashrc` (see instructions for bash in +your operating system). + +Make completion will work out of the box, and will complete valid make targets. +For instance, typing `make jdk-i` will complete to `make jdk-image`. + +The `configure` script can get completion for options, but for this to work you +need to help `bash` on the way. The standard way of running the script, `bash +configure`, will not be understood by bash completion. You need `configure` to +be the command to run. One way to achieve this is to add a simple helper script +to your path: + +``` +cat << EOT > /tmp/configure +#!/bin/bash +if [ \$(pwd) = \$(cd \$(dirname \$0); pwd) ] ; then + echo >&2 "Abort: Trying to call configure helper recursively" + exit 1 +fi + +bash \$PWD/configure "\$@" +EOT +chmod +x /tmp/configure +sudo mv /tmp/configure /usr/local/bin +``` + +Now `configure --en-dt` will result in `configure --enable-dtrace`. + +### Using Multiple Configurations + +You can have multiple configurations for a single source forest. When you +create a new configuration, run `configure --with-conf-name=` to create a +configuration with the name ``. Alternatively, you can create a directory +under `build` and run `configure` from there, e.g. `mkdir build/ && cd +build/ && bash ../../configure`. + +Then you can build that configuration using `make CONF_NAME=` or `make +CONF=`, where `` is a substring matching one or several +configurations, e.g. `CONF=debug`. The special empty pattern (`CONF=`) will +match *all* available configuration, so `make CONF= hotspot` will build the +`hotspot` target for all configurations. Alternatively, you can execute `make` +in the configuration directory, e.g. `cd build/ && make`. + +### Handling Reconfigurations + +If you update the forest and part of the configure script has changed, the +build system will force you to re-run `configure`. + +Most of the time, you will be fine by running `configure` again with the same +arguments as the last time, which can easily be performed by `make +reconfigure`. To simplify this, you can use the `CONF_CHECK` make control +variable, either as `make CONF_CHECK=auto`, or by setting an environment +variable. For instance, if you add `export CONF_CHECK=auto` to your `.bashrc` +file, `make` will always run `reconfigure` automatically whenever the configure +script has changed. + +You can also use `CONF_CHECK=ignore` to skip the check for a needed configure +update. This might speed up the build, but comes at the risk of an incorrect +build result. This is only recommended if you know what you're doing. + +From time to time, you will also need to modify the command line to `configure` +due to changes. Use `make print-configure` to show the command line used for +your current configuration. + +### Using Fine-Grained Make Targets + +The default behavior for make is to create consistent and correct output, at +the expense of build speed, if necessary. + +If you are prepared to take some risk of an incorrect build, and know enough of +the system to understand how things build and interact, you can speed up the +build process considerably by instructing make to only build a portion of the +product. + +#### Building Individual Modules + +The safe way to use fine-grained make targets is to use the module specific +make targets. All source code in JDK 9 is organized so it belongs to a module, +e.g. `java.base` or `jdk.jdwp.agent`. You can build only a specific module, by +giving it as make target: `make jdk.jdwp.agent`. If the specified module +depends on other modules (e.g. `java.base`), those modules will be built first. + +You can also specify a set of modules, just as you can always specify a set of +make targets: `make jdk.crypto.cryptoki jdk.crypto.ec jdk.crypto.mscapi +jdk.crypto.ucrypto` + +#### Building Individual Module Phases + +The build process for each module is divided into separate phases. Not all +modules need all phases. Which are needed depends on what kind of source code +and other artifact the module consists of. The phases are: + + * `gensrc` (Generate source code to compile) + * `gendata` (Generate non-source code artifacts) + * `copy` (Copy resource artifacts) + * `java` (Compile Java code) + * `launchers` (Compile native executables) + * `libs` (Compile native libraries) + * `rmic` (Run the `rmic` tool) + +You can build only a single phase for a module by using the notation +`$MODULE-$PHASE`. For instance, to build the `gensrc` phase for `java.base`, +use `make java.base-gensrc`. + +Note that some phases may depend on others, e.g. `java` depends on `gensrc` (if +present). Make will build all needed prerequisites before building the +requested phase. + +#### Skipping the Dependency Check + +When using an iterative development style with frequent quick rebuilds, the +dependency check made by make can take up a significant portion of the time +spent on the rebuild. In such cases, it can be useful to bypass the dependency +check in make. + +> **Note that if used incorrectly, this can lead to a broken build!** + +To achieve this, append `-only` to the build target. For instance, `make +jdk.jdwp.agent-java-only` will *only* build the `java` phase of the +`jdk.jdwp.agent` module. If the required dependencies are not present, the +build can fail. On the other hand, the execution time measures in milliseconds. + +A useful pattern is to build the first time normally (e.g. `make +jdk.jdwp.agent`) and then on subsequent builds, use the `-only` make target. + +#### Rebuilding Part of java.base (JDK\_FILTER) + +If you are modifying files in `java.base`, which is the by far largest module +in OpenJDK, then you need to rebuild all those files whenever a single file has +changed. (This inefficiency will hopefully be addressed in JDK 10.) + +As a hack, you can use the make control variable `JDK_FILTER` to specify a +pattern that will be used to limit the set of files being recompiled. For +instance, `make java.base JDK_FILTER=javax/crypto` (or, to combine methods, +`make java.base-java-only JDK_FILTER=javax/crypto`) will limit the compilation +to files in the `javax.crypto` package. + +### Learn About Mercurial + +To become an efficient OpenJDK developer, it is recommended that you invest in +learning Mercurial properly. Here are some links that can get you started: + + * [Mercurial for git users](http://www.mercurial-scm.org/wiki/GitConcepts) + * [The official Mercurial tutorial](http://www.mercurial-scm.org/wiki/Tutorial) + * [hg init](http://hginit.com/) + * [Mercurial: The Definitive Guide](http://hgbook.red-bean.com/read/) + +## Understanding the Build System + +This section will give you a more technical description on the details of the +build system. + +### Configurations + +The build system expects to find one or more configuration. These are +technically defined by the `spec.gmk` in a subdirectory to the `build` +subdirectory. The `spec.gmk` file is generated by `configure`, and contains in +principle the configuration (directly or by files included by `spec.gmk`). + +You can, in fact, select a configuration to build by pointing to the `spec.gmk` +file with the `SPEC` make control variable, e.g. `make SPEC=$BUILD/spec.gmk`. +While this is not the recommended way to call `make` as a user, it is what is +used under the hood by the build system. + +### Build Output Structure + +The build output for a configuration will end up in `build/`, which we refer to as `$BUILD` in this document. The `$BUILD` directory +contains the following important directories: + +``` +buildtools/ +configure-support/ +hotspot/ +images/ +jdk/ +make-support/ +support/ +test-results/ +test-support/ +``` + +This is what they are used for: + + * `images`: This is the directory were the output of the `*-image` make + targets end up. For instance, `make jdk-image` ends up in `images/jdk`. + + * `jdk`: This is the "exploded image". After `make jdk`, you will be able to + launch the newly built JDK by running `$BUILD/jdk/bin/java`. + + * `test-results`: This directory contains the results from running tests. + + * `support`: This is an area for intermediate files needed during the build, + e.g. generated source code, object files and class files. Some noteworthy + directories in `support` is `gensrc`, which contains the generated source + code, and the `modules_*` directories, which contains the files in a + per-module hierarchy that will later be collapsed into the `jdk` directory + of the exploded image. + + * `buildtools`: This is an area for tools compiled for the build platform + that are used during the rest of the build. + + * `hotspot`: This is an area for intermediate files needed when building + hotspot. + + * `configure-support`, `make-support` and `test-support`: These directories + contain files that are needed by the build system for `configure`, `make` + and for running tests. + +### Fixpath + +Windows path typically look like `C:\User\foo`, while Unix paths look like +`/home/foo`. Tools with roots from Unix often experience issues related to this +mismatch when running on Windows. + +In the OpenJDK build, we always use Unix paths internally, and only just before +calling a tool that does not understand Unix paths do we convert them to +Windows paths. + +This conversion is done by the `fixpath` tool, which is a small wrapper that +modifies unix-style paths to Windows-style paths in command lines. Fixpath is +compiled automatically by `configure`. + +### Native Debug Symbols + +Native libraries and executables can have debug symbol (and other debug +information) associated with them. How this works is very much platform +dependent, but a common problem is that debug symbol information takes a lot of +disk space, but is rarely needed by the end user. + +The OpenJDK supports different methods on how to handle debug symbols. The +method used is selected by `--with-native-debug-symbols`, and available methods +are `none`, `internal`, `external`, `zipped`. + + * `none` means that no debug symbols will be generated during the build. + + * `internal` means that debug symbols will be generated during the build, and + they will be stored in the generated binary. + + * `external` means that debug symbols will be generated during the build, and + after the compilation, they will be moved into a separate `.debuginfo` file. + (This was previously known as FDS, Full Debug Symbols). + + * `zipped` is like `external`, but the .debuginfo file will also be zipped + into a `.diz` file. + +When building for distribution, `zipped` is a good solution. Binaries built +with `internal` is suitable for use by developers, since they facilitate +debugging, but should be stripped before distributed to end users. + +### Autoconf Details + +The `configure` script is based on the autoconf framework, but in some details +deviate from a normal autoconf `configure` script. + +The `configure` script in the top level directory of OpenJDK is just a thin +wrapper that calls `common/autoconf/configure`. This in turn provides +functionality that is not easily expressed in the normal Autoconf framework, +and then calls into the core of the `configure` script, which is the +`common/autoconf/generated-configure.sh` file. + +As the name implies, this file is generated by Autoconf. It is checked in after +regeneration, to alleviate the common user to have to install Autoconf. + +The build system will detect if the Autoconf source files have changed, and +will trigger a regeneration of `common/autoconf/generated-configure.sh` if +needed. You can also manually request such an update by `bash +common/autoconf/autogen.sh`. + +If you make changes to the build system that requires a re-generation, note the +following: + + * You must use *exactly* version 2.69 of autoconf for your patch to be + accepted. This is to avoid spurious changes in the generated file. Note + that Ubuntu 16.04 ships a patched version of autoconf which claims to be + 2.69, but is not. + + * You do not need to include the generated file in reviews. + + * If the generated file needs updating, the Oracle JDK closed counter-part + will also need to be updated. It is very much appreciated if you ask for an + Oracle engineer to sponsor your push so this can be made in tandem. + +### Developing the Build System Itself + +This section contains a few remarks about how to develop for the build system +itself. It is not relevant if you are only making changes in the product source +code. + +While technically using `make`, the make source files of the OpenJDK does not +resemble most other Makefiles. Instead of listing specific targets and actions +(perhaps using patterns), the basic modus operandi is to call a high-level +function (or properly, macro) from the API in `make/common`. For instance, to +compile all classes in the `jdk.internal.foo` package in the `jdk.foo` module, +a call like this would be made: + +``` +$(eval $(call SetupJavaCompilation, BUILD_FOO_CLASSES, \ + SETUP := GENERATE_OLDBYTECODE, \ + SRC := $(JDK_TOPDIR)/src/jkd.foo/share/classes, \ + INCLUDES := jdk/internal/foo, \ + BIN := $(SUPPORT_OUTPUTDIR)/foo_classes, \ +)) +``` + +By encapsulating and expressing the high-level knowledge of *what* should be +done, rather than *how* it should be done (as is normal in Makefiles), we can +build a much more powerful and flexible build system. + +Correct dependency tracking is paramount. Sloppy dependency tracking will lead +to improper parallelization, or worse, race conditions. + +To test for/debug race conditions, try running `make JOBS=1` and `make +JOBS=100` and see if it makes any difference. (It shouldn't). + +To compare the output of two different builds and see if, and how, they differ, +run `$BUILD1/compare.sh -o $BUILD2`, where `$BUILD1` and `$BUILD2` are the two +builds you want to compare. + +To automatically build two consecutive versions and compare them, use +`COMPARE_BUILD`. The value of `COMPARE_BUILD` is a set of variable=value +assignments, like this: +``` +make COMPARE_BUILD=CONF=--enable-new-hotspot-feature:MAKE=hotspot +``` +See `make/InitSupport.gmk` for details on how to use `COMPARE_BUILD`. + +To analyze build performance, run with `LOG=trace` and check `$BUILD/build-trace-time.log`. +Use `JOBS=1` to avoid parallelism. + +Please check that you adhere to the [Code Conventions for the Build System]( +http://openjdk.java.net/groups/build/doc/code-conventions.html) before +submitting patches. Also see the section in [Autoconf Details]( +#autoconf-details) about the generated configure script. + +## Contributing to OpenJDK + +So, now you've build your OpenJDK, and made your first patch, and want to +contribute it back to the OpenJDK community. + +First of all: Thank you! We gladly welcome your contribution to the OpenJDK. +However, please bear in mind that OpenJDK is a massive project, and we must ask +you to follow our rules and guidelines to be able to accept your contribution. + +The official place to start is the ['How to contribute' page]( +http://openjdk.java.net/contribute/). There is also an official (but somewhat +outdated and skimpy on details) [Developer's Guide]( +http://openjdk.java.net/guide/). + +If this seems overwhelming to you, the Adoption Group is there to help you! A +good place to start is their ['New Contributor' page]( +https://wiki.openjdk.java.net/display/Adoption/New+Contributor), or start +reading the comprehensive [Getting Started Kit]( +https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/en/). The +Adoption Group will also happily answer any questions you have about +contributing. Contact them by [mail]( +http://mail.openjdk.java.net/mailman/listinfo/adoption-discuss) or [IRC]( +http://openjdk.java.net/irc/). + +--- +# Override styles from the base CSS file that are not ideal for this document. +header-includes: + - '' +--- diff --git a/common/doc/testing.html b/common/doc/testing.html new file mode 100644 index 00000000000..6ddc6924d5a --- /dev/null +++ b/common/doc/testing.html @@ -0,0 +1,118 @@ + + + + + + + Testing OpenJDK + + + + + + +
+

Testing OpenJDK

+
+ +

Using the run-test framework

+

This new way of running tests is developer-centric. It assumes that you have built a jdk locally and want to test it. Running common test targets is simple, and more complex ad-hoc combination of tests is possible. The user interface is forgiving, and clearly report errors it cannot resolve.

+

Some example command-lines:

+
$ make run-test-tier1
+$ make run-test-jdk_lang JTREG="JOBS=8"
+$ make run-test TEST=jdk_lang
+$ make run-test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1"
+$ make run-test TEST="hotspot/test:hotspot_gc" JTREG="JOBS=1;TIMEOUT=8;VM_OTIONS=-XshowSettings -Xlog:gc+ref=debug"
+$ make run-test TEST="jtreg:hotspot/test:hotspot_gc hotspot/test/native_sanity/JniVersion.java"
+

Configuration

+

To be able to run JTReg tests, configure needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the --with-jtreg=<path to jtreg home> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing lib/jtreg.jar etc. (An alternative is to set the JT_HOME environment variable to point to the JTReg home before running configure.)

+

Test selection

+

All functionality is available using the run-test make target. In this use case, the test or tests to be executed is controlled using the TEST variable. To speed up subsequent test runs with no source code changes, run-test-only can be used instead, which do not depend on the source and test image build.

+

For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that make run-test-tier1 is equivalent to make run-test TEST="tier1", but the latter is more tab-completion friendly. For more complex test runs, the run-test TEST="x" solution needs to be used.

+

The test specifications given in TEST is parsed into fully qualified test descriptors, which clearly and unambigously show which tests will be run. As an example, :tier1 will expand to jtreg:jdk/test:tier1 jtreg:langtools/test:tier1 jtreg:nashorn/test:tier1 jtreg:jaxp/test:tier1. You can always submit a list of fully qualified test descriptors in the TEST variable if you want to shortcut the parser.

+

JTReg

+

JTReg test groups can be specified either without a test root, e.g. :tier1 (or tier1, the initial colon is optional), or with, e.g. hotspot/test:tier1, jdk/test:jdk_util.

+

When specified without a test root, all matching groups from all tests roots will be added. Otherwise, only the group from the specified test root will be added.

+

Individual JTReg tests or directories containing JTReg tests can also be specified, like hotspot/test/native_sanity/JniVersion.java or hotspot/test/native_sanity. You can also specify an absolute path, to point to a JTReg test outside the source tree.

+

As long as the test groups or test paths can be uniquely resolved, you do not need to enter the jtreg: prefix. If this is not possible, or if you want to use a fully qualified test descriptor, add jtreg:, e.g. jtreg:hotspot/test/native_sanity.

+

Gtest

+

Since the Hotspot Gtest suite is so quick, the default is to run all tests. This is specified by just gtest, or as a fully qualified test descriptor gtest:all.

+

If you want, you can single out an individual test or a group of tests, for instance gtest:LogDecorations or gtest:LogDecorations.level_test_vm. This can be particularly useful if you want to run a shaky test repeatedly.

+

Test results and summary

+

At the end of the test run, a summary of all tests run will be presented. This will have a consistent look, regardless of what test suites were used. This is a sample summary:

+
==============================
+Test summary
+==============================
+   TEST                                          TOTAL  PASS  FAIL ERROR
+>> jtreg:jdk/test:tier1                           1867  1865     2     0 <<
+   jtreg:langtools/test:tier1                     4711  4711     0     0
+   jtreg:nashorn/test:tier1                        133   133     0     0
+==============================
+TEST FAILURE
+

Tests where the number of TOTAL tests does not equal the number of PASSed tests will be considered a test failure. These are marked with the >> ... << marker for easy identification.

+

The classification of non-passed tests differs a bit between test suites. In the summary, ERROR is used as a catch-all for tests that neither passed nor are classified as failed by the framework. This might indicate test framework error, timeout or other problems.

+

In case of test failures, make run-test will exit with a non-zero exit value.

+

All tests have their result stored in build/$BUILD/test-results/$TEST_ID, where TEST_ID is a path-safe conversion from the fully qualified test descriptor, e.g. for jtreg:jdk/test:tier1 the TEST_ID is jtreg_jdk_test_tier1. This path is also printed in the log at the end of the test run.

+

Additional work data is stored in build/$BUILD/test-support/$TEST_ID. For some frameworks, this directory might contain information that is useful in determining the cause of a failed test.

+

Test suite control

+

It is possible to control various aspects of the test suites using make control variables.

+

These variables use a keyword=value approach to allow multiple values to be set. So, for instance, JTREG="JOBS=1;TIMEOUT=8" will set the JTReg concurrency level to 1 and the timeout factor to 8. This is equivalent to setting JTREG_JOBS=1 JTREG_TIMEOUT=8, but using the keyword format means that the JTREG variable is parsed and verified for correctness, so JTREG="TMIEOUT=8" would give an error, while JTREG_TMIEOUT=8 would just pass unnoticed.

+

To separate multiple keyword=value pairs, use ; (semicolon). Since the shell normally eats ;, the recommended usage is to write the assignment inside qoutes, e.g. JTREG="...;...". This will also make sure spaces are preserved, as in JTREG="VM_OTIONS=-XshowSettings -Xlog:gc+ref=debug".

+

(Other ways are possible, e.g. using backslash: JTREG=JOBS=1\;TIMEOUT=8. Also, as a special technique, the string %20 will be replaced with space for certain options, e.g. JTREG=VM_OTIONS=-XshowSettings%20-Xlog:gc+ref=debug. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)

+

As far as possible, the names of the keywords have been standardized between test suites.

+

JTReg keywords

+

JOBS

+

The test concurrency (-concurrency).

+

Defaults to TEST_JOBS (if set by --with-test-jobs=), otherwise it defaults to JOBS, except for Hotspot, where the default is number of CPU cores/2, but never more than 12.

+

TIMEOUT

+

The timeout factor (-timeoutFactor).

+

Defaults to 4.

+

TEST_MODE

+

The test mode (-agentvm, -samevm or -othervm).

+

Defaults to -agentvm.

+

ASSERT

+

Enable asserts (-ea -esa, or none).

+

Set to true or false. If true, adds -ea -esa. Defaults to true, except for hotspot.

+

VERBOSE

+

The verbosity level (-verbose).

+

Defaults to fail,error,summary.

+

RETAIN

+

What test data to retain (-retain).

+

Defaults to fail,error.

+

MAX_MEM

+

Limit memory consumption (-Xmx and -vmoption:-Xmx, or none).

+

Limit memory consumption for JTReg test framework and VM under test. Set to 0 to disable the limits.

+

Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).

+

OPTIONS

+

Additional options to the JTReg test framework.

+

Use JTREG="OPTIONS=--help all" to see all available JTReg options.

+

JAVA_OPTIONS

+

Additional Java options to JTReg (-javaoption).

+

VM_OPTIONS

+

Additional VM options to JTReg (-vmoption).

+

Gtest keywords

+

REPEAT

+

The number of times to repeat the tests (--gtest_repeat).

+

Default is 1. Set to -1 to repeat indefinitely. This can be especially useful combined with OPTIONS=--gtest_break_on_failure to reproduce an intermittent problem.

+

OPTIONS

+

Additional options to the Gtest test framework.

+

Use GTEST="OPTIONS=--help" to see all available Gtest options.

+ + diff --git a/common/doc/testing.md b/common/doc/testing.md new file mode 100644 index 00000000000..db570f4cd5c --- /dev/null +++ b/common/doc/testing.md @@ -0,0 +1,215 @@ +% Testing OpenJDK + +## Using the run-test framework + +This new way of running tests is developer-centric. It assumes that you have +built a jdk locally and want to test it. Running common test targets is simple, +and more complex ad-hoc combination of tests is possible. The user interface is +forgiving, and clearly report errors it cannot resolve. + +Some example command-lines: + + $ make run-test-tier1 + $ make run-test-jdk_lang JTREG="JOBS=8" + $ make run-test TEST=jdk_lang + $ make run-test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1" + $ make run-test TEST="hotspot/test:hotspot_gc" JTREG="JOBS=1;TIMEOUT=8;VM_OTIONS=-XshowSettings -Xlog:gc+ref=debug" + $ make run-test TEST="jtreg:hotspot/test:hotspot_gc hotspot/test/native_sanity/JniVersion.java" + +### Configuration + +To be able to run JTReg tests, `configure` needs to know where to find the +JTReg test framework. If it is not picked up automatically by configure, use +the `--with-jtreg=` option to point to the JTReg framework. +Note that this option should point to the JTReg home, i.e. the top directory, +containing `lib/jtreg.jar` etc. (An alternative is to set the `JT_HOME` +environment variable to point to the JTReg home before running `configure`.) + +## Test selection + +All functionality is available using the run-test make target. In this use +case, the test or tests to be executed is controlled using the `TEST` variable. +To speed up subsequent test runs with no source code changes, run-test-only can +be used instead, which do not depend on the source and test image build. + +For some common top-level tests, direct make targets have been generated. This +includes all JTReg test groups, the hotspot gtest, and custom tests (if +present). This means that `make run-test-tier1` is equivalent to `make run-test +TEST="tier1"`, but the latter is more tab-completion friendly. For more complex +test runs, the `run-test TEST="x"` solution needs to be used. + +The test specifications given in `TEST` is parsed into fully qualified test +descriptors, which clearly and unambigously show which tests will be run. As an +example, `:tier1` will expand to `jtreg:jdk/test:tier1 +jtreg:langtools/test:tier1 jtreg:nashorn/test:tier1 jtreg:jaxp/test:tier1`. You +can always submit a list of fully qualified test descriptors in the `TEST` +variable if you want to shortcut the parser. + +### JTReg + +JTReg test groups can be specified either without a test root, e.g. `:tier1` +(or `tier1`, the initial colon is optional), or with, e.g. +`hotspot/test:tier1`, `jdk/test:jdk_util`. + +When specified without a test root, all matching groups from all tests roots +will be added. Otherwise, only the group from the specified test root will be +added. + +Individual JTReg tests or directories containing JTReg tests can also be +specified, like `hotspot/test/native_sanity/JniVersion.java` or +`hotspot/test/native_sanity`. You can also specify an absolute path, to point +to a JTReg test outside the source tree. + +As long as the test groups or test paths can be uniquely resolved, you do not +need to enter the `jtreg:` prefix. If this is not possible, or if you want to +use a fully qualified test descriptor, add `jtreg:`, e.g. +`jtreg:hotspot/test/native_sanity`. + +### Gtest + +Since the Hotspot Gtest suite is so quick, the default is to run all tests. +This is specified by just `gtest`, or as a fully qualified test descriptor +`gtest:all`. + +If you want, you can single out an individual test or a group of tests, for +instance `gtest:LogDecorations` or `gtest:LogDecorations.level_test_vm`. This +can be particularly useful if you want to run a shaky test repeatedly. + +## Test results and summary + +At the end of the test run, a summary of all tests run will be presented. This +will have a consistent look, regardless of what test suites were used. This is +a sample summary: + + ============================== + Test summary + ============================== + TEST TOTAL PASS FAIL ERROR + >> jtreg:jdk/test:tier1 1867 1865 2 0 << + jtreg:langtools/test:tier1 4711 4711 0 0 + jtreg:nashorn/test:tier1 133 133 0 0 + ============================== + TEST FAILURE + +Tests where the number of TOTAL tests does not equal the number of PASSed tests +will be considered a test failure. These are marked with the `>> ... <<` marker +for easy identification. + +The classification of non-passed tests differs a bit between test suites. In +the summary, ERROR is used as a catch-all for tests that neither passed nor are +classified as failed by the framework. This might indicate test framework +error, timeout or other problems. + +In case of test failures, `make run-test` will exit with a non-zero exit value. + +All tests have their result stored in `build/$BUILD/test-results/$TEST_ID`, +where TEST_ID is a path-safe conversion from the fully qualified test +descriptor, e.g. for `jtreg:jdk/test:tier1` the TEST_ID is +`jtreg_jdk_test_tier1`. This path is also printed in the log at the end of the +test run. + +Additional work data is stored in `build/$BUILD/test-support/$TEST_ID`. For +some frameworks, this directory might contain information that is useful in +determining the cause of a failed test. + +## Test suite control + +It is possible to control various aspects of the test suites using make control +variables. + +These variables use a keyword=value approach to allow multiple values to be +set. So, for instance, `JTREG="JOBS=1;TIMEOUT=8"` will set the JTReg +concurrency level to 1 and the timeout factor to 8. This is equivalent to +setting `JTREG_JOBS=1 JTREG_TIMEOUT=8`, but using the keyword format means that +the `JTREG` variable is parsed and verified for correctness, so +`JTREG="TMIEOUT=8"` would give an error, while `JTREG_TMIEOUT=8` would just +pass unnoticed. + +To separate multiple keyword=value pairs, use `;` (semicolon). Since the shell +normally eats `;`, the recommended usage is to write the assignment inside +qoutes, e.g. `JTREG="...;..."`. This will also make sure spaces are preserved, +as in `JTREG="VM_OTIONS=-XshowSettings -Xlog:gc+ref=debug"`. + +(Other ways are possible, e.g. using backslash: `JTREG=JOBS=1\;TIMEOUT=8`. +Also, as a special technique, the string `%20` will be replaced with space for +certain options, e.g. `JTREG=VM_OTIONS=-XshowSettings%20-Xlog:gc+ref=debug`. +This can be useful if you have layers of scripts and have trouble getting +proper quoting of command line arguments through.) + +As far as possible, the names of the keywords have been standardized between +test suites. + +### JTReg keywords + +#### JOBS +The test concurrency (`-concurrency`). + +Defaults to TEST_JOBS (if set by `--with-test-jobs=`), otherwise it defaults to +JOBS, except for Hotspot, where the default is *number of CPU cores/2*, but +never more than 12. + +#### TIMEOUT +The timeout factor (`-timeoutFactor`). + +Defaults to 4. + +#### TEST_MODE +The test mode (`-agentvm`, `-samevm` or `-othervm`). + +Defaults to `-agentvm`. + +#### ASSERT +Enable asserts (`-ea -esa`, or none). + +Set to `true` or `false`. If true, adds `-ea -esa`. Defaults to true, except +for hotspot. + +#### VERBOSE +The verbosity level (`-verbose`). + +Defaults to `fail,error,summary`. + +#### RETAIN +What test data to retain (`-retain`). + +Defaults to `fail,error`. + +#### MAX_MEM +Limit memory consumption (`-Xmx` and `-vmoption:-Xmx`, or none). + +Limit memory consumption for JTReg test framework and VM under test. Set to 0 +to disable the limits. + +Defaults to 512m, except for hotspot, where it defaults to 0 (no limit). + +#### OPTIONS +Additional options to the JTReg test framework. + +Use `JTREG="OPTIONS=--help all"` to see all available JTReg options. + +#### JAVA_OPTIONS +Additional Java options to JTReg (`-javaoption`). + +#### VM_OPTIONS +Additional VM options to JTReg (`-vmoption`). + +### Gtest keywords + +#### REPEAT +The number of times to repeat the tests (`--gtest_repeat`). + +Default is 1. Set to -1 to repeat indefinitely. This can be especially useful +combined with `OPTIONS=--gtest_break_on_failure` to reproduce an intermittent +problem. + +#### OPTIONS +Additional options to the Gtest test framework. + +Use `GTEST="OPTIONS=--help"` to see all available Gtest options. + +--- +# Override some definitions in the global css file that are not optimal for +# this document. +header-includes: + - '' +--- diff --git a/common/nb_native/nbproject/configurations.xml b/common/nb_native/nbproject/configurations.xml index 170dc36b3b8..5aebfbd85a4 100644 --- a/common/nb_native/nbproject/configurations.xml +++ b/common/nb_native/nbproject/configurations.xml @@ -982,52 +982,6 @@ - - - - - agent_util.c - - - compiledMethodLoad.c - - - gctest.c - - - heapTracker.c - - - heapViewer.c - - - java_crw_demo.c - - - minst.c - - - mtrace.c - - - versionCheck.c - - - Agent.cpp - Monitor.cpp - Thread.cpp - waiters.cpp - - - - - - - Poller.c - - - - @@ -1223,7 +1177,7 @@ check_format.c - + compress.c deflate.c gzclose.c @@ -21533,89 +21487,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DEBUG - - - - - ../../jdk/src/java.base/share/native/include - ../../jdk/src/demo/share/jvmti/waiters - ../../jdk/src/java.base/macosx/native/include - ../../jdk/make - - - DEBUG - - - - - - - ../../jdk/src/java.base/share/native/include - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/java.base/macosx/native/include - ../../jdk/make - - - - - - - ../../jdk/src/demo/share/jvmti/compiledMethodLoad - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/macosx/native/include - ../../jdk/make - - - - - - - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/macosx/native/include - ../../jdk/src/demo/share/jvmti/gctest - ../../jdk/make - - - - - - - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/macosx/native/include - ../../jdk/src/demo/share/jvmti/heapTracker - ../../jdk/make - - - - - - - ../../jdk/src/java.base/share/native/include - ../../jdk/src/demo/share/jvmti/heapViewer - ../../jdk/src/java.base/macosx/native/include - ../../jdk/make - - - - - - - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/make - - - - - - - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/macosx/native/include - ../../jdk/src/demo/share/jvmti/minst - ../../jdk/make - - - - - - - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/macosx/native/include - ../../jdk/src/demo/share/jvmti/mtrace - ../../jdk/make - - - - - - - ../../jdk/src/java.base/share/native/include - ../../jdk/src/demo/share/jvmti/versionCheck - ../../jdk/src/java.base/macosx/native/include - ../../jdk/make - - - @@ -36906,106 +36670,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIS_FILE="Monitor.cpp" - - - - - - - THIS_FILE="Thread.cpp" - - - - - - - THIS_FILE="waiters.cpp" - - - ../../jdk/src/java.base/unix/native/include ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../build/support/headers/java.base ../../make @@ -38304,7 +37968,7 @@ ../../jdk/src/java.base/unix/native/include ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../build/support/headers/java.base ../../make @@ -38325,7 +37989,7 @@ ../../jdk/src/java.base/unix/native/include ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../build/support/headers/java.base ../../make @@ -38346,7 +38010,7 @@ ../../jdk/src/java.base/unix/native/include ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../build/support/headers/java.base ../../make @@ -38367,7 +38031,7 @@ ../../jdk/src/java.base/unix/native/include ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../build/support/headers/java.base ../../make @@ -38377,14 +38041,14 @@ - - @@ -38394,7 +38058,7 @@ - @@ -38404,7 +38068,7 @@ - @@ -38414,7 +38078,7 @@ - @@ -38424,7 +38088,7 @@ - @@ -38434,7 +38098,7 @@ - @@ -38444,7 +38108,7 @@ - @@ -38454,7 +38118,7 @@ - @@ -38464,7 +38128,7 @@ - @@ -38474,7 +38138,7 @@ - @@ -38484,7 +38148,7 @@ - @@ -38494,7 +38158,7 @@ - @@ -38504,7 +38168,7 @@ - @@ -38514,7 +38178,7 @@ - @@ -41203,7 +40867,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41232,7 +40896,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41261,7 +40925,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41290,7 +40954,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41319,7 +40983,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41348,7 +41012,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41377,7 +41041,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41406,7 +41070,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41435,7 +41099,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41464,7 +41128,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41493,7 +41157,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41522,7 +41186,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41551,7 +41215,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41580,7 +41244,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41609,7 +41273,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41638,7 +41302,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41667,7 +41331,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41696,7 +41360,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41725,7 +41389,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41754,7 +41418,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41783,7 +41447,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41812,7 +41476,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41841,7 +41505,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41870,7 +41534,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41899,7 +41563,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41928,7 +41592,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41957,7 +41621,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41986,7 +41650,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42015,7 +41679,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42044,7 +41708,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42073,7 +41737,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42102,7 +41766,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42131,7 +41795,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42160,7 +41824,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42189,7 +41853,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42218,7 +41882,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42247,7 +41911,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42276,7 +41940,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42305,7 +41969,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42334,7 +41998,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42363,7 +42027,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42413,7 +42077,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42442,7 +42106,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42471,7 +42135,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -46197,183 +45861,6 @@ - - - - DEBUG - - - - - ../../jdk/src/demo/share/jvmti/waiters - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/linux/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - DEBUG - - - - - - - ../../jdk/src/demo/share/jvmti/heapTracker - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/linux/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - - - - - ../../jdk/src/demo/share/jvmti/compiledMethodLoad - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/linux/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="compiledMethodLoad.c" - - - - - - - ../../jdk/src/demo/share/jvmti/gctest - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/linux/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="gctest.c" - - - - - - - ../../jdk/src/demo/share/jvmti/heapTracker - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/linux/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="heapTracker.c" - - - - - - - ../../jdk/src/demo/share/jvmti/heapViewer - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/linux/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="heapViewer.c" - - - - - - - ../../jdk/src/demo/share/jvmti/heapTracker - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/linux/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="java_crw_demo.c" - - - - - - - ../../jdk/src/demo/share/jvmti/minst - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/linux/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="minst.c" - - - - - - - ../../jdk/src/demo/share/jvmti/mtrace - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/linux/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="mtrace.c" - - - - - - - ../../jdk/src/demo/share/jvmti/versionCheck - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/linux/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="versionCheck.c" - - - @@ -46557,7 +46044,7 @@ ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/unix/native/libjli ../../jdk/src/java.base/share/native/libjli - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../make @@ -46639,7 +46126,7 @@ - + ../../jdk/src/java.desktop/share/native/libsplashscreen/giflib @@ -46647,7 +46134,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -46712,7 +46199,7 @@ ../../jdk/src/java.base/unix/native/libjli ../../jdk/src/java.base/share/native/libjli - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../make @@ -47250,7 +46737,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -47598,7 +47085,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -47996,7 +47483,7 @@ ../../jdk/src/jdk.pack/share/native/common-unpack ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/share/native/include ../../jdk/src/java.base/linux/native/include ../../jdk/src/java.base/unix/native/include @@ -55235,113 +54722,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIS_FILE="Monitor.cpp" - - - - - - - THIS_FILE="Thread.cpp" - - - - - - - THIS_FILE="waiters.cpp" - - - - - - - - ../../jdk/src/demo/share/jvmti/waiters - ../../jdk/src/demo/share/jvmti/agent_util ../../jdk/src/java.base/share/native/include ../../jdk/src/java.base/solaris/native/include ../../jdk/src/java.base/unix/native/include @@ -64699,189 +64077,6 @@ - - - - DEBUG - - - - - DEBUG - - - - - - - ../../jdk/src/demo/share/jvmti/heapTracker - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/solaris/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - - - - - ../../jdk/src/demo/share/jvmti/compiledMethodLoad - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/solaris/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="compiledMethodLoad.c" - - - - - - - ../../jdk/src/demo/share/jvmti/gctest - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/solaris/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="gctest.c" - - - - - - - ../../jdk/src/demo/share/jvmti/heapTracker - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/solaris/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="heapTracker.c" - - - - - - - ../../jdk/src/demo/share/jvmti/heapViewer - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/solaris/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="heapViewer.c" - - - - - - - ../../jdk/src/demo/share/jvmti/heapTracker - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/solaris/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="java_crw_demo.c" - - - - - - - ../../jdk/src/demo/share/jvmti/minst - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/solaris/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="minst.c" - - - - - - - ../../jdk/src/demo/share/jvmti/mtrace - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/demo/share/jvmti/java_crw_demo - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/solaris/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="mtrace.c" - - - - - - - ../../jdk/src/demo/share/jvmti/versionCheck - ../../jdk/src/demo/share/jvmti/agent_util - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/solaris/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../jdk/make - - - THIS_FILE="versionCheck.c" - - - - - - - ../../jdk/src/java.base/share/native/include - ../../jdk/src/java.base/solaris/native/include - ../../jdk/src/java.base/unix/native/include - ../../jdk/src/java.base/share/native/libjava - ../../jdk/src/java.base/unix/native/libjava - ../../build/support/demos/classes/jni/Poller - ../../jdk/make - - - THIS_FILE="Poller.c" - - - diff --git a/corba/.hgtags b/corba/.hgtags index 7a24e3f5f23..6bb7df9a6e8 100644 --- a/corba/.hgtags +++ b/corba/.hgtags @@ -398,3 +398,25 @@ ff8cb43c07c069b1debdee44cb88ca22db1ec757 jdk-9+152 68a8e8658511093b322a46ed04b2a321e1da2a43 jdk-9+153 078ebe23b584466dc8346e620d7821d91751e5a9 jdk-9+154 a545f54babfa31aa7eb611f36031609acd617cbc jdk-9+155 +907c26240cd481579e919bfd23740797ff8ce1c8 jdk-9+156 +9383da04b385cca46b7ca67f3a39ac1b673e09fe jdk-9+157 +de6bdf38935fa753183ca288bed5c06a23c0bb12 jdk-9+158 +6feea77d2083c99e44aa3e272d07b7fb3b801683 jdk-9+159 +c7688f2fa07936b089ca0e9a0a0eff68ff37a542 jdk-9+160 +18f02bc43fe96aef36791d0df7aca748485210cc jdk-9+161 +18ffcf99a3b4a10457853d94190e825bdf07e39b jdk-9+162 +493011dee80e51c2a2b064d049183c047df36d80 jdk-9+163 +965bbae3072702f7c0d95c240523b65e6bb19261 jdk-9+164 +a510b2201154abdd12ede42788086b5283bfb9a6 jdk-9+165 +934c18145915b06d3fcc0de1a30f91f5aab8a192 jdk-9+166 +43de67f51801b9e16507865fcb7e8344f4ca4aa9 jdk-9+167 +03a2cc9c8a1e8f87924c9863e917bc8b91770d5f jdk-9+168 +b2218d41edef02ee8f94bb438f885b2ba79bfa08 jdk-9+169 +8a4ab3b0ab9a86df73d9a1e337134f2dbe006725 jdk-9+170 +c62e5964cfcf144d8f72e9ba69757897785349a9 jdk-9+171 +95ed14547ca9246baed34f90ef3ca13217538a8c jdk-9+172 +534ba4f8cfcf12accc5b9adb943103f2ff79fe16 jdk-9+173 +3615768c12904e29bb2ec1b506cd4633cd8a9ced jdk-9+174 +dc78a3dd6b3a4f11cdae8a3e3d160e6a78bc7838 jdk-9+175 +40fb9f229471ef357d493813d34b15afcce9f32b jdk-9+176 +c72e9d3823f04cb3ef3166646dfea9e4c2769133 jdk-9+177 diff --git a/corba/README b/corba/README deleted file mode 100644 index 56825f5ca08..00000000000 --- a/corba/README +++ /dev/null @@ -1,14 +0,0 @@ -README: - This file should be located at the top of the corba Mercurial repository. - - See http://openjdk.java.net/ for more information about the OpenJDK. - - See ../README-builds.html for complete details on build machine requirements. - -Simple Build Instructions: - - cd make && gnumake - - The files that will be imported into the jdk build will be in the "dist" - directory. - diff --git a/corba/src/java.corba/share/classes/com/sun/corba/se/spi/monitoring/package.html b/corba/src/java.corba/share/classes/com/sun/corba/se/spi/monitoring/package.html index 4a72719c0cf..f73b0cbb907 100644 --- a/corba/src/java.corba/share/classes/com/sun/corba/se/spi/monitoring/package.html +++ b/corba/src/java.corba/share/classes/com/sun/corba/se/spi/monitoring/package.html @@ -1,4 +1,4 @@ - + @@ -6,7 +6,7 @@ package - -Provides the mapping of the OMG CORBA APIs to the JavaTM + +Provides the mapping of the OMG CORBA APIs to the Java™ programming language, including the class ORB, which is implemented so that a programmer can use it as a fully-functional Object Request Broker (ORB). @@ -147,9 +147,7 @@ resolve initial object references. These are: register_initial_reference(String id, org.omg.CORBA.Object obj) -

An example that uses some of these methods is -Getting Started with Java IDL. +

An example that uses some of these methods is {@extLink idl_getting_started Getting Started with Java IDL}.

Exceptions

@@ -158,9 +156,8 @@ Java programming language. If a method is defined to throw an exception, then any code using that method must have a try/catch block and handle that exception when it is thrown. -

The documentation on Java -IDL exceptions has more information and explains the difference between +

The documentation on {@extLink jidlexception Java IDL exceptions } +has more information and explains the difference between system exceptions and user-defined exceptions.

The following is a list of the system exceptions (which are unchecked @@ -427,7 +424,7 @@ will contain the static methods needed for manipulating instances of the type, in this case, Account objects. - +

The narrow Method

When an object is the return value for a method, it is returned in the form of a generic object, either an org.omg.CORBA.Object object @@ -447,8 +444,8 @@ object, whereas the narrow method for an interface that is abstract will take an object in the Java programming language. The helper class for a non-abstract interface that has at least one abstract base interface will provide both versions of the narrow method. -

The Hello World -tutorial uses a narrow method that looks like this: +

The {@extLink idl_guides Hello World tutorial} +uses a narrow method that looks like this:

         // create and initialize the ORB
         ORB orb = ORB.init(args, null);
@@ -465,7 +462,7 @@ tutorial uses a narrow method that looks like this:
         helloImpl = HelloHelper.narrow(ncRef.resolve_str(name));
 
- +

Example of a Basic Helper Class

A basic helper class, for purposes of this explanation, is one with the methods that are provided by every helper class, plus a narrow @@ -548,6 +545,7 @@ abstract public class AccountHelper } +

Value Type Helper Classes

A helper class for a value type includes different renderings of the same methods generated for non-value type methods. The main difference @@ -671,7 +669,7 @@ abstract public class AddressHelper      WStringSeqHelper      WStringValueHelper - +

Other Classes

The other classes and interfaces in the CORBA package, which are @@ -861,24 +859,24 @@ ValueMember Related Documentation For overviews, guides, and a tutorial, please see:
    -
  • -Java IDL home page +
  • {@extLink idl_guides Java IDL tutorial page}.
  • +
  • {@extLink rmi_iiop_guides RMI-IIOP developer's guide}.
-

+

CORBA Features Not Implemented in Java IDL

Some of the API included in org.omg subpackages is provided for conformance with the current OMG CORBA specification but is not implemented -in Sun's release of the JDKTM. This enables +in Sun's release of the JDK™. This enables other JDK licensees to provide implementations of this API in standard extensions and products. -

+

Features That Throw NO_IMPLEMENT

Some of the API included in org.omg subpackages throw diff --git a/corba/src/java.corba/share/classes/org/omg/CORBA/portable/package.html b/corba/src/java.corba/share/classes/org/omg/CORBA/portable/package.html index c8f6b33ae37..e0f5cbb0372 100644 --- a/corba/src/java.corba/share/classes/org/omg/CORBA/portable/package.html +++ b/corba/src/java.corba/share/classes/org/omg/CORBA/portable/package.html @@ -1,8 +1,8 @@ - + - + Provides a portability layer, that is, a set of ORB APIs that makes it possible for code generated @@ -38,7 +38,7 @@ can call into these ORB APIs.

- +


CORBA Features Throwing NO_IMPLEMENT() Exceptions


diff --git a/corba/src/java.corba/share/classes/org/omg/CORBA_2_3/package.html b/corba/src/java.corba/share/classes/org/omg/CORBA_2_3/package.html index c1869b1c512..7a82edb9275 100644 --- a/corba/src/java.corba/share/classes/org/omg/CORBA_2_3/package.html +++ b/corba/src/java.corba/share/classes/org/omg/CORBA_2_3/package.html @@ -1,4 +1,4 @@ - + @@ -6,7 +6,7 @@ package - + The CORBA_2_3 package defines additions to existing CORBA interfaces in the Java[tm] Standard Edition 6.   These changes occurred in recent revisions to the CORBA API defined by the OMG.  The new methods were @@ -46,7 +46,7 @@ the Java[tm] Platform, Standard Edition 6, ORB complies, see Official Specifications for CORBA support in Java[tm] SE 6.

- + The following methods in the abstract class org.omg.CORBA_2_3.ORB are unimplemented:

    diff --git a/corba/src/java.corba/share/classes/org/omg/CosNaming/package.html b/corba/src/java.corba/share/classes/org/omg/CosNaming/package.html index 3e13aef2342..265485464f1 100644 --- a/corba/src/java.corba/share/classes/org/omg/CosNaming/package.html +++ b/corba/src/java.corba/share/classes/org/omg/CosNaming/package.html @@ -3,7 +3,7 @@ - + Provides a mechanism to register ORB hooks through which ORB services can intercept the normal flow of execution of the ORB. @@ -52,7 +52,7 @@ See the javadocs for class {@link org.omg.PortableInterceptor.ORBInitializer ORBInitializer} for how to go about registering interceptors. - +

    Known limitations / unimplemented methods in package org.omg.PortableInterceptor

    diff --git a/corba/src/java.corba/share/classes/org/omg/PortableServer/package.html b/corba/src/java.corba/share/classes/org/omg/PortableServer/package.html index cabb3b46055..ab441f9cee8 100644 --- a/corba/src/java.corba/share/classes/org/omg/PortableServer/package.html +++ b/corba/src/java.corba/share/classes/org/omg/PortableServer/package.html @@ -1,9 +1,9 @@ - + - + Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs. @@ -157,10 +157,10 @@ follows exactly the same pattern as the other holder classes for basic types.

    Related Documentation

    For an overview of Java IDL, please see: -Java IDL home page. +{@extLink idl_guides Java IDL home page}.

    Example Code

    - +

    Example Server Code

     import javax.naming.InitialContext;
    diff --git a/corba/src/java.corba/share/classes/sun/corba/Bridge.java b/corba/src/java.corba/share/classes/sun/corba/Bridge.java
    index 1b3a086c088..e22240e2a9f 100644
    --- a/corba/src/java.corba/share/classes/sun/corba/Bridge.java
    +++ b/corba/src/java.corba/share/classes/sun/corba/Bridge.java
    @@ -59,10 +59,10 @@ import sun.reflect.ReflectionFactory;
      * 
* The code that calls Bridge.get() must have the following Permissions: *
    - *
  • RuntimePermission "reflectionFactoryAccess"
  • *
  • BridgePermission "getBridge"
  • *
  • ReflectPermission "suppressAccessChecks"
  • - *
  • StackFramePermission "retainClassReference"
  • + *
  • RuntimePermission "getStackWalkerWithClassReference"
  • + *
  • RuntimePermission "reflectionFactoryAccess"
  • *
*

* All of these permissions are required to obtain and correctly initialize @@ -105,10 +105,10 @@ public final class Bridge /** Fetch the Bridge singleton. This requires the following * permissions: *

    - *
  • RuntimePermission "reflectionFactoryAccess"
  • *
  • BridgePermission "getBridge"
  • *
  • ReflectPermission "suppressAccessChecks"
  • - *
  • StackFramePermission "retainClassReference"
  • + *
  • RuntimePermission "getStackWalkerWithClassReference"
  • + *
  • RuntimePermission "reflectionFactoryAccess"
  • *
* @return The singleton instance of the Bridge class * @throws SecurityException if the caller does not have the diff --git a/hotspot/.hgignore b/hotspot/.hgignore index 0c053adb87c..db11ccf9c54 100644 --- a/hotspot/.hgignore +++ b/hotspot/.hgignore @@ -15,10 +15,10 @@ ^\.mx.jvmci/hotspot/eclipse/.* ^\.idea/ ^workingsets.xml -^src/jdk.vm.ci/share/classes/\w[\w\.]*/.*\.xml -^src/jdk.vm.ci/share/classes/\w[\w\.]*/.*\.iml -^src/jdk.vm.ci/share/classes/\w[\w\.]*/nbproject -^src/jdk.vm.ci/share/classes/\w[\w\.]*/\..* +^src/jdk.internal.vm.ci/share/classes/\w[\w\.]*/.*\.xml +^src/jdk.internal.vm.ci/share/classes/\w[\w\.]*/.*\.iml +^src/jdk.internal.vm.ci/share/classes/\w[\w\.]*/nbproject +^src/jdk.internal.vm.ci/share/classes/\w[\w\.]*/\..* ^test/compiler/jvmci/\w[\w\.]*/.*\.xml ^test/compiler/jvmci/\w[\w\.]*/.*\.iml ^test/compiler/jvmci/\w[\w\.]*/nbproject @@ -27,15 +27,15 @@ ^test/compiler/aot/\w[\w\.]*/.*\.iml ^test/compiler/aot/\w[\w\.]*/nbproject ^test/compiler/aot/\w[\w\.]*/\..* -^src/jdk.vm.compiler/\.mx.graal/env -^src/jdk.vm.compiler/\.mx.graal/.*\.pyc -^src/jdk.vm.compiler/\.mx.graal/eclipse-launches/.* +^src/jdk.internal.vm.compiler/\.mx.graal/env +^src/jdk.internal.vm.compiler/\.mx.graal/.*\.pyc +^src/jdk.internal.vm.compiler/\.mx.graal/eclipse-launches/.* ^src/jdk.aot/share/classes/\w[\w\.]*/.*\.xml ^src/jdk.aot/share/classes/\w[\w\.]*/.*\.iml ^src/jdk.aot/share/classes/\w[\w\.]*/nbproject ^src/jdk.aot/share/classes/\w[\w\.]*/\..* -^src/jdk.vm.compiler/share/classes/\w[\w\.]*/.*\.xml -^src/jdk.vm.compiler/share/classes/\w[\w\.]*/.*\.iml -^src/jdk.vm.compiler/share/classes/\w[\w\.]*/nbproject -^src/jdk.vm.compiler/share/classes/\w[\w\.]*/\..* +^src/jdk.internal.vm.compiler/share/classes/\w[\w\.]*/.*\.xml +^src/jdk.internal.vm.compiler/share/classes/\w[\w\.]*/.*\.iml +^src/jdk.internal.vm.compiler/share/classes/\w[\w\.]*/nbproject +^src/jdk.internal.vm.compiler/share/classes/\w[\w\.]*/\..* diff --git a/hotspot/.hgtags b/hotspot/.hgtags index 66afb5ed54b..4cef58700ee 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -558,3 +558,25 @@ a82cb5350cad96a0b4de496afebe3ded89f27efa jdk-9+146 217ba81b9a4ce8698200370175aa2db86a39f66c jdk-9+153 a9fdfd55835ef9dccb7f317b07249bd66653b874 jdk-9+154 f3b3d77a1751897413aae43ac340a130b6fa2ae1 jdk-9+155 +43139c588ea48b6504e52b6c3dec530b17b1fdb4 jdk-9+156 +b2d0a906afd73dcf27f572217eb1be0f196ec16c jdk-9+157 +4e78f30935229f13ce7c43089621cf7169f5abac jdk-9+158 +9211c2e89c1cd11ec2d5752b0f97131a7d7525c7 jdk-9+159 +94b4e2e5331d38eab6a3639c3511b2e0715df0e9 jdk-9+160 +191ffbdb3d7b734288daa7fb76b37a0a85dfe7eb jdk-9+161 +b01c519b715ef6f785d0631adee0a6537cf6c12e jdk-9+162 +983fe207555724d98f4876991e1cbafbcf2733e8 jdk-9+163 +0af429be8bbaeaaf0cb838e9af28c953dda6a9c8 jdk-9+164 +c92c6416ca03b1464d5ed99cf6201e52b5ba0a70 jdk-9+165 +560d7aa083a24b6a56443feb8de0f40435d33aa9 jdk-9+166 +1ca7ed1b17b5776930d641d1379834f3140a74e4 jdk-9+167 +fbb9c802649585d19f6d7e81b4a519d44806225a jdk-9+168 +16d692be099c5c38eb48cc9aca78b0c900910d5b jdk-9+169 +38a240fd58a287acb1963920b92ed4d9c2fd39e3 jdk-9+170 +d53171650a2cc6c6f699c966c533b914ca9c0602 jdk-9+171 +1ae9e84f68b359420d2d153ecfe5ee2903e33a2e jdk-9+172 +e64b1cb48d6e7703928a9d1da106fc27f8cb65fd jdk-9+173 +944791f8160185bffa13fbb821fc09b6198f1f25 jdk-9+174 +8f04d457168b9f1f4a1b2c37f49e0513ca9d33a7 jdk-9+175 +2ab74e5dbdc2b6a962c865500cafd23cf387dc60 jdk-9+176 +1ca8f038fceb88c640badf9bd18905205bc63b43 jdk-9+177 diff --git a/hotspot/.mx.jvmci/.pydevproject b/hotspot/.mx.jvmci/.pydevproject index b127d241c79..3f852ee834a 100644 --- a/hotspot/.mx.jvmci/.pydevproject +++ b/hotspot/.mx.jvmci/.pydevproject @@ -3,7 +3,7 @@ Default python 2.7 -/.mx.jvmci +/mx.jvmci /mx diff --git a/hotspot/.mx.jvmci/mx_jvmci.py b/hotspot/.mx.jvmci/mx_jvmci.py index daa27f5d607..37a9baff97e 100644 --- a/hotspot/.mx.jvmci/mx_jvmci.py +++ b/hotspot/.mx.jvmci/mx_jvmci.py @@ -158,8 +158,8 @@ To build hotspot and import it into the JDK: "mx make hotspot import-hotspot" # JDK9 must be bootstrapped with a JDK8 compliance = mx.JavaCompliance('8') jdk8 = mx.get_jdk(compliance.exactMatch, versionDescription=compliance.value) - cmd = ['sh', 'configure', '--with-debug-level=' + _vm.debugLevel, '--with-native-debug-symbols=external', '--disable-precompiled-headers', - '--with-jvm-variants=' + _vm.jvmVariant, '--disable-warnings-as-errors', '--with-boot-jdk=' + jdk8.home] + cmd = ['sh', 'configure', '--with-debug-level=' + _vm.debugLevel, '--with-native-debug-symbols=external', '--disable-precompiled-headers', '--with-jvm-features=graal', + '--with-jvm-variants=' + _vm.jvmVariant, '--disable-warnings-as-errors', '--with-boot-jdk=' + jdk8.home, '--with-jvm-features=graal'] mx.run(cmd, cwd=_jdkSourceRoot) cmd = [mx.gmake_cmd(), 'CONF=' + _vm.debugLevel] if mx.get_opts().verbose: @@ -176,66 +176,6 @@ To build hotspot and import it into the JDK: "mx make hotspot import-hotspot" mx.run(cmd, cwd=_jdkSourceRoot) - if 'images' in cmd: - jdkImageDir = join(jdkBuildDir, 'images', 'jdk') - - # The OpenJDK build creates an empty cacerts file so copy one from - # the default JDK (which is assumed to be an OracleJDK) - srcCerts = join(mx.get_jdk(tag='default').home, 'lib', 'security', 'cacerts') - if not exists(srcCerts): - # Might be building with JDK8 which has cacerts under jre/ - srcCerts = join(mx.get_jdk(tag='default').home, 'jre', 'lib', 'security', 'cacerts') - dstCerts = join(jdkImageDir, 'lib', 'security', 'cacerts') - if srcCerts != dstCerts: - shutil.copyfile(srcCerts, dstCerts) - - _create_jdk_bundle(jdkBuildDir, _vm.debugLevel, jdkImageDir) - -def _get_jdk_bundle_arches(): - """ - Gets a list of names that will be the part of a JDK bundle's file name denoting the architecture. - The first element in the list is the canonical name. Symlinks should be created for the - remaining names. - """ - cpu = mx.get_arch() - if cpu == 'amd64': - return ['x64', 'x86_64', 'amd64'] - elif cpu == 'sparcv9': - return ['sparcv9'] - mx.abort('Unsupported JDK bundle arch: ' + cpu) - -def _create_jdk_bundle(jdkBuildDir, debugLevel, jdkImageDir): - """ - Creates a tar.gz JDK archive, an accompanying tar.gz.sha1 file with its - SHA1 signature plus symlinks to the archive for non-canonical architecture names. - """ - - arches = _get_jdk_bundle_arches() - jdkTgzPath = join(_suite.get_output_root(), 'jdk-bundles', 'jdk9-{}-{}-{}.tar.gz'.format(debugLevel, _get_openjdk_os(), arches[0])) - with mx.Archiver(jdkTgzPath, kind='tgz') as arc: - mx.log('Creating ' + jdkTgzPath) - for root, _, filenames in os.walk(jdkImageDir): - for name in filenames: - f = join(root, name) - arcname = 'jdk1.9.0/' + os.path.relpath(f, jdkImageDir) - arc.zf.add(name=f, arcname=arcname, recursive=False) - - with open(jdkTgzPath + '.sha1', 'w') as fp: - mx.log('Creating ' + jdkTgzPath + '.sha1') - fp.write(mx.sha1OfFile(jdkTgzPath)) - - def _create_link(source, link_name): - if exists(link_name): - os.remove(link_name) - mx.log('Creating ' + link_name + ' -> ' + source) - os.symlink(source, link_name) - - for arch in arches[1:]: - link_name = join(_suite.get_output_root(), 'jdk-bundles', 'jdk9-{}-{}-{}.tar.gz'.format(debugLevel, _get_openjdk_os(), arch)) - jdkTgzName = os.path.basename(jdkTgzPath) - _create_link(jdkTgzName, link_name) - _create_link(jdkTgzName + '.sha1', link_name + '.sha1') - def _runmultimake(args): """run the JDK make process for one or more configurations""" @@ -363,9 +303,9 @@ class HotSpotProject(mx.NativeProject): out.close('link') out.open('link') - out.element('name', data='generated') + out.element('name', data='gensrc') out.element('type', data='2') - generated = join(_get_hotspot_build_dir(jvmVariant, debugLevel), 'generated') + generated = join(_get_hotspot_build_dir(jvmVariant, debugLevel), 'gensrc') out.element('locationURI', data=mx.get_eclipse_project_rel_locationURI(generated, eclProjectDir)) out.close('link') @@ -680,18 +620,12 @@ _jvmci_bootclasspath_prepends = [] def _get_hotspot_build_dir(jvmVariant=None, debugLevel=None): """ Gets the directory in which a particular HotSpot configuration is built - (e.g., /build/macosx-x86_64-normal-server-release/hotspot/bsd_amd64_compiler2) + (e.g., /build/macosx-x86_64-normal-server-release/hotspot/variant-) """ if jvmVariant is None: jvmVariant = _vm.jvmVariant - os = mx.get_os() - if os == 'darwin': - os = 'bsd' - arch = mx.get_arch() - buildname = {'client': 'compiler1', 'server': 'compiler2'}.get(jvmVariant, jvmVariant) - - name = '{}_{}_{}'.format(os, arch, buildname) + name = 'variant-{}'.format(jvmVariant) return join(_get_jdk_build_dir(debugLevel=debugLevel), 'hotspot', name) class JVMCI9JDKConfig(mx.JDKConfig): diff --git a/hotspot/.mx.jvmci/suite.py b/hotspot/.mx.jvmci/suite.py index 359c2b2ae3a..9415623d92b 100644 --- a/hotspot/.mx.jvmci/suite.py +++ b/hotspot/.mx.jvmci/suite.py @@ -43,7 +43,7 @@ suite = { # ------------- JVMCI:Service ------------- "jdk.vm.ci.services" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "javaCompliance" : "9", "workingSets" : "API,JVMCI", @@ -52,7 +52,7 @@ suite = { # ------------- JVMCI:API ------------- "jdk.vm.ci.common" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "checkstyle" : "jdk.vm.ci.services", "javaCompliance" : "9", @@ -60,7 +60,7 @@ suite = { }, "jdk.vm.ci.meta" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "checkstyle" : "jdk.vm.ci.services", "javaCompliance" : "9", @@ -68,7 +68,7 @@ suite = { }, "jdk.vm.ci.code" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : ["jdk.vm.ci.meta"], "checkstyle" : "jdk.vm.ci.services", @@ -92,7 +92,7 @@ suite = { }, "jdk.vm.ci.runtime" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : [ "jdk.vm.ci.code", @@ -119,7 +119,7 @@ suite = { # ------------- JVMCI:HotSpot ------------- "jdk.vm.ci.aarch64" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : ["jdk.vm.ci.code"], "checkstyle" : "jdk.vm.ci.services", @@ -128,7 +128,7 @@ suite = { }, "jdk.vm.ci.amd64" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : ["jdk.vm.ci.code"], "checkstyle" : "jdk.vm.ci.services", @@ -137,7 +137,7 @@ suite = { }, "jdk.vm.ci.sparc" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : ["jdk.vm.ci.code"], "checkstyle" : "jdk.vm.ci.services", @@ -146,7 +146,7 @@ suite = { }, "jdk.vm.ci.hotspot" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : [ "jdk.vm.ci.common", @@ -175,7 +175,7 @@ suite = { }, "jdk.vm.ci.hotspot.aarch64" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : [ "jdk.vm.ci.aarch64", @@ -187,7 +187,7 @@ suite = { }, "jdk.vm.ci.hotspot.amd64" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : [ "jdk.vm.ci.amd64", @@ -199,7 +199,7 @@ suite = { }, "jdk.vm.ci.hotspot.sparc" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : [ "jdk.vm.ci.sparc", @@ -221,12 +221,12 @@ suite = { # ------------- Distributions ------------- "JVMCI_SERVICES" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "dependencies" : ["jdk.vm.ci.services"], }, "JVMCI_API" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "dependencies" : [ "jdk.vm.ci.runtime", "jdk.vm.ci.common", @@ -240,7 +240,7 @@ suite = { }, "JVMCI_HOTSPOT" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "dependencies" : [ "jdk.vm.ci.hotspot.aarch64", "jdk.vm.ci.hotspot.amd64", diff --git a/hotspot/README b/hotspot/README deleted file mode 100644 index 19afb261fc3..00000000000 --- a/hotspot/README +++ /dev/null @@ -1,14 +0,0 @@ -README: - This file should be located at the top of the hotspot Mercurial repository. - - See http://openjdk.java.net/ for more information about the OpenJDK. - - See ../README-builds.html for complete details on build machine requirements. - -Simple Build Instructions: - - cd make && gnumake - - The files that will be imported into the jdk build will be in the "build" - directory. - diff --git a/hotspot/make/CompileTools.gmk b/hotspot/make/CompileTools.gmk index ea6c504e283..c80632226cf 100644 --- a/hotspot/make/CompileTools.gmk +++ b/hotspot/make/CompileTools.gmk @@ -38,9 +38,9 @@ TARGETS := $(eval $(call IncludeCustomExtension, hotspot, CompileTools.gmk)) ifeq ($(INCLUDE_GRAAL), true) - VM_CI_SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.vm.ci/share/classes + VM_CI_SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.internal.vm.ci/share/classes - SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.vm.compiler/share/classes + SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.internal.vm.compiler/share/classes ############################################################################## # Compile the annotation processors diff --git a/hotspot/make/gensrc/Gensrc-jdk.vm.compiler.gmk b/hotspot/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk similarity index 77% rename from hotspot/make/gensrc/Gensrc-jdk.vm.compiler.gmk rename to hotspot/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk index f12a2e9a5a2..a8e60309b1c 100644 --- a/hotspot/make/gensrc/Gensrc-jdk.vm.compiler.gmk +++ b/hotspot/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk @@ -28,7 +28,7 @@ default: all include $(SPEC) include MakeBase.gmk -$(eval $(call IncludeCustomExtension, hotspot, gensrc/Gensrc-jdk.vm.compiler.gmk)) +$(eval $(call IncludeCustomExtension, hotspot, gensrc/Gensrc-jdk.internal.vm.compiler.gmk)) GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE) SRC_DIR := $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes @@ -81,23 +81,24 @@ PROCESSOR_JARS := \ PROCESSOR_PATH := $(call PathList, $(PROCESSOR_JARS)) ADD_EXPORTS := \ - --add-exports jdk.vm.ci/jdk.vm.ci.aarch64=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.amd64=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.code=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.code.site=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.code.stack=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.common=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspot=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspot.aarch64=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspot.amd64=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspot.events=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspot.sparc=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspotvmconfig=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.inittimer=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.runtime=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.services=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.sparc=ALL-UNNAMED \ + --add-modules jdk.internal.vm.ci \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.events=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspotvmconfig=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.inittimer=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.services=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=ALL-UNNAMED \ # $(GENSRC_DIR)/_gensrc_proc_done: $(PROC_SRCS) $(PROCESSOR_JARS) @@ -138,7 +139,7 @@ $(GENSRC_DIR)/module-info.java.extra: $(GENSRC_DIR)/_gensrc_proc_done $(ECHO) "uses org.graalvm.compiler.options.OptionDescriptors;" >> $@; \ $(ECHO) "provides org.graalvm.compiler.options.OptionDescriptors with" >> $@; \ for i in $$($(FIND) $(GENSRC_DIR) -name '*_OptionDescriptors.java'); do \ - c=$$($(ECHO) $$i | $(SED) 's:.*/jdk\.vm\.compiler/\(.*\)\.java:\1:' | $(TR) '/' '.'); \ + c=$$($(ECHO) $$i | $(SED) 's:.*/jdk\.internal\.vm\.compiler/\(.*\)\.java:\1:' | $(TR) '/' '.'); \ $(ECHO) " $$c," >> $@; \ done; \ $(ECHO) " ;" >> $@; diff --git a/hotspot/make/ide/CreateVSProject.gmk b/hotspot/make/ide/CreateVSProject.gmk index db0aca87e28..2a9da913ab7 100644 --- a/hotspot/make/ide/CreateVSProject.gmk +++ b/hotspot/make/ide/CreateVSProject.gmk @@ -112,8 +112,10 @@ ifeq ($(OPENJDK_TARGET_OS), windows) -relativeSrcInclude src \ -hidePath .hg \ -hidePath .jcheck \ + -hidePath jdk.aot \ -hidePath jdk.hotspot.agent \ - -hidePath jdk.vm.ci \ + -hidePath jdk.internal.vm.ci \ + -hidePath jdk.internal.vm.compiler \ -hidePath jdk.jfr \ -compiler VC10 \ -jdkTargetRoot $(call FixPath, $(JDK_OUTPUTDIR)) \ diff --git a/hotspot/make/lib/CompileJvm.gmk b/hotspot/make/lib/CompileJvm.gmk index 36d955807ad..4eb2cbc1013 100644 --- a/hotspot/make/lib/CompileJvm.gmk +++ b/hotspot/make/lib/CompileJvm.gmk @@ -118,6 +118,12 @@ ifeq ($(OPENJDK_TARGET_CPU), x86_64) OPENJDK_TARGET_CPU_VM_VERSION := amd64 else ifeq ($(OPENJDK_TARGET_CPU), sparcv9) OPENJDK_TARGET_CPU_VM_VERSION := sparc +else ifeq ($(HOTSPOT_TARGET_CPU_ARCH), arm) + ifeq ($(OPENJDK_TARGET_CPU), aarch64) + # This sets the Oracle Aarch64 port to use arm64 + # while the original Aarch64 port uses aarch64 + OPENJDK_TARGET_CPU_VM_VERSION := arm64 + endif else OPENJDK_TARGET_CPU_VM_VERSION := $(OPENJDK_TARGET_CPU) endif diff --git a/hotspot/make/symbols/symbols-unix b/hotspot/make/symbols/symbols-unix index 11add06efac..7828c830b4b 100644 --- a/hotspot/make/symbols/symbols-unix +++ b/hotspot/make/symbols/symbols-unix @@ -188,7 +188,6 @@ JVM_Yield JVM_AddModuleExports JVM_AddModuleExportsToAll JVM_AddModuleExportsToAllUnnamed -JVM_AddModulePackage JVM_AddReadsModule JVM_DefineModule JVM_SetBootLoaderUnnamedModule diff --git a/hotspot/make/templates/gpl-cp-header b/hotspot/make/templates/gpl-cp-header deleted file mode 100644 index f5b3943c4c9..00000000000 --- a/hotspot/make/templates/gpl-cp-header +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) %YEARS%, 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. diff --git a/hotspot/make/templates/gpl-header b/hotspot/make/templates/gpl-header deleted file mode 100644 index 9eadb48b613..00000000000 --- a/hotspot/make/templates/gpl-header +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) %YEARS%, 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. diff --git a/hotspot/make/test/JtregNative.gmk b/hotspot/make/test/JtregNative.gmk index 7223733367a..19faa10ad3d 100644 --- a/hotspot/make/test/JtregNative.gmk +++ b/hotspot/make/test/JtregNative.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2016, 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 @@ -48,12 +48,15 @@ BUILD_HOTSPOT_JTREG_NATIVE_SRC := \ $(HOTSPOT_TOPDIR)/test/runtime/jni/PrivateInterfaceMethods \ $(HOTSPOT_TOPDIR)/test/runtime/jni/ToStringInInterfaceTest \ $(HOTSPOT_TOPDIR)/test/runtime/jni/CalleeSavedRegisters \ + $(HOTSPOT_TOPDIR)/test/runtime/jni/CallWithJNIWeak \ + $(HOTSPOT_TOPDIR)/test/runtime/jni/ReturnJNIWeak \ $(HOTSPOT_TOPDIR)/test/runtime/modules/getModuleJNI \ $(HOTSPOT_TOPDIR)/test/runtime/SameObject \ $(HOTSPOT_TOPDIR)/test/runtime/BoolReturn \ $(HOTSPOT_TOPDIR)/test/compiler/floatingpoint/ \ $(HOTSPOT_TOPDIR)/test/compiler/calls \ $(HOTSPOT_TOPDIR)/test/serviceability/jvmti/GetNamedModule \ + $(HOTSPOT_TOPDIR)/test/serviceability/jvmti/IsModifiableModule \ $(HOTSPOT_TOPDIR)/test/serviceability/jvmti/AddModuleReads \ $(HOTSPOT_TOPDIR)/test/serviceability/jvmti/AddModuleExportsAndOpens \ $(HOTSPOT_TOPDIR)/test/serviceability/jvmti/AddModuleUsesAndProvides \ @@ -83,6 +86,7 @@ ifeq ($(TOOLCHAIN_TYPE), solstudio) BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liboverflow := -lc BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSimpleClassFileLoadHook := -lc BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetNamedModuleTest := -lc + BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libIsModifiableModuleTest := -lc BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleReadsTest := -lc BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleExportsAndOpensTest := -lc BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleUsesAndProvidesTest := -lc diff --git a/hotspot/src/cpu/aarch64/vm/aarch64.ad b/hotspot/src/cpu/aarch64/vm/aarch64.ad index 37e63dc9aba..4360e8caac8 100644 --- a/hotspot/src/cpu/aarch64/vm/aarch64.ad +++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad @@ -15501,7 +15501,7 @@ instruct string_compareLU(iRegP_R1 str1, iRegI_R2 cnt1, iRegP_R3 str2, iRegI_R4 %} instruct string_indexofUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2, - iRegI_R0 result, iRegI tmp1, iRegI tmp2, iRegI tmp3, iRegI tmp4, rFlagsReg cr) + iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2))); @@ -15520,7 +15520,7 @@ instruct string_indexofUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 %} instruct string_indexofLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2, - iRegI_R0 result, iRegI tmp1, iRegI tmp2, iRegI tmp3, iRegI tmp4, rFlagsReg cr) + iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2))); @@ -15539,7 +15539,7 @@ instruct string_indexofLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 %} instruct string_indexofUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2, - iRegI_R0 result, iRegI tmp1, iRegI tmp2, iRegI tmp3, iRegI tmp4, rFlagsReg cr) + iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2))); @@ -15558,7 +15558,7 @@ instruct string_indexofUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 %} instruct string_indexofLU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2, - iRegI_R0 result, iRegI tmp1, iRegI tmp2, iRegI tmp3, iRegI tmp4, rFlagsReg cr) + iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LU); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2))); @@ -15577,8 +15577,8 @@ instruct string_indexofLU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 %} instruct string_indexof_conUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, - immI_le_4 int_cnt2, iRegI_R0 result, iRegI tmp1, iRegI tmp2, - iRegI tmp3, iRegI tmp4, rFlagsReg cr) + immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, + iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2))); @@ -15598,8 +15598,8 @@ instruct string_indexof_conUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, %} instruct string_indexof_conLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, - immI_le_4 int_cnt2, iRegI_R0 result, iRegI tmp1, iRegI tmp2, - iRegI tmp3, iRegI tmp4, rFlagsReg cr) + immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, + iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2))); @@ -15619,8 +15619,8 @@ instruct string_indexof_conLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, %} instruct string_indexof_conUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, - immI_1 int_cnt2, iRegI_R0 result, iRegI tmp1, iRegI tmp2, - iRegI tmp3, iRegI tmp4, rFlagsReg cr) + immI_1 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, + iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2))); @@ -15640,8 +15640,8 @@ instruct string_indexof_conUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, %} instruct string_indexof_conLU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, - immI_1 int_cnt2, iRegI_R0 result, iRegI tmp1, iRegI tmp2, - iRegI tmp3, iRegI tmp4, rFlagsReg cr) + immI_1 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, + iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LU); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2))); @@ -15661,8 +15661,8 @@ instruct string_indexof_conLU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, %} instruct string_indexofU_char(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch, - iRegI_R0 result, iRegI tmp1, iRegI tmp2, - iRegI tmp3, rFlagsReg cr) + iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, + iRegINoSp tmp3, rFlagsReg cr) %{ match(Set result (StrIndexOfChar (Binary str1 cnt1) ch)); effect(USE_KILL str1, USE_KILL cnt1, USE_KILL ch, @@ -16101,7 +16101,7 @@ instruct replicate2D(vecX dst, vRegD src) // ====================REDUCTION ARITHMETIC==================================== -instruct reduce_add2I(iRegINoSp dst, iRegIorL2I src1, vecD src2, iRegI tmp, iRegI tmp2) +instruct reduce_add2I(iRegINoSp dst, iRegIorL2I src1, vecD src2, iRegINoSp tmp, iRegINoSp tmp2) %{ match(Set dst (AddReductionVI src1 src2)); ins_cost(INSN_COST); @@ -16120,7 +16120,7 @@ instruct reduce_add2I(iRegINoSp dst, iRegIorL2I src1, vecD src2, iRegI tmp, iReg ins_pipe(pipe_class_default); %} -instruct reduce_add4I(iRegINoSp dst, iRegIorL2I src1, vecX src2, vecX tmp, iRegI tmp2) +instruct reduce_add4I(iRegINoSp dst, iRegIorL2I src1, vecX src2, vecX tmp, iRegINoSp tmp2) %{ match(Set dst (AddReductionVI src1 src2)); ins_cost(INSN_COST); @@ -16138,7 +16138,7 @@ instruct reduce_add4I(iRegINoSp dst, iRegIorL2I src1, vecX src2, vecX tmp, iRegI ins_pipe(pipe_class_default); %} -instruct reduce_mul2I(iRegINoSp dst, iRegIorL2I src1, vecD src2, iRegI tmp) +instruct reduce_mul2I(iRegINoSp dst, iRegIorL2I src1, vecD src2, iRegINoSp tmp) %{ match(Set dst (MulReductionVI src1 src2)); ins_cost(INSN_COST); @@ -16157,7 +16157,7 @@ instruct reduce_mul2I(iRegINoSp dst, iRegIorL2I src1, vecD src2, iRegI tmp) ins_pipe(pipe_class_default); %} -instruct reduce_mul4I(iRegINoSp dst, iRegIorL2I src1, vecX src2, vecX tmp, iRegI tmp2) +instruct reduce_mul4I(iRegINoSp dst, iRegIorL2I src1, vecX src2, vecX tmp, iRegINoSp tmp2) %{ match(Set dst (MulReductionVI src1 src2)); ins_cost(INSN_COST); diff --git a/hotspot/src/cpu/aarch64/vm/abstractInterpreter_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/abstractInterpreter_aarch64.cpp index adb30aa0d1d..49a266e5480 100644 --- a/hotspot/src/cpu/aarch64/vm/abstractInterpreter_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/abstractInterpreter_aarch64.cpp @@ -109,9 +109,15 @@ int AbstractInterpreter::size_activation(int max_stack, // for the callee's params we only need to account for the extra // locals. int size = overhead + - (callee_locals - callee_params)*Interpreter::stackElementWords + + (callee_locals - callee_params) + monitors * frame::interpreter_frame_monitor_size() + - temps* Interpreter::stackElementWords + extra_args; + // On the top frame, at all times SP <= ESP, and SP is + // 16-aligned. We ensure this by adjusting SP on method + // entry and re-entry to allow room for the maximum size of + // the expression stack. When we call another method we bump + // SP so that no stack space is wasted. So, only on the top + // frame do we need to allow max_stack words. + (is_top_frame ? max_stack : temps + extra_args); // On AArch64 we always keep the stack pointer 16-aligned, so we // must round up here. diff --git a/hotspot/src/cpu/aarch64/vm/assembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/assembler_aarch64.cpp index ceaec5d53ec..57bc7b2d340 100644 --- a/hotspot/src/cpu/aarch64/vm/assembler_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/assembler_aarch64.cpp @@ -1,8 +1,7 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. - * reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE - * HEADER. + * 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 @@ -21,7 +20,6 @@ * 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 diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp index b139a44f9a1..0016aa9ba6a 100644 --- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp @@ -1922,12 +1922,17 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, } if (opr2->is_constant()) { + bool is_32bit = false; // width of register operand jlong imm; + switch(opr2->type()) { + case T_INT: + imm = opr2->as_constant_ptr()->as_jint(); + is_32bit = true; + break; case T_LONG: imm = opr2->as_constant_ptr()->as_jlong(); break; - case T_INT: case T_ADDRESS: imm = opr2->as_constant_ptr()->as_jint(); break; @@ -1942,14 +1947,14 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, } if (Assembler::operand_valid_for_add_sub_immediate(imm)) { - if (type2aelembytes(opr1->type()) <= 4) + if (is_32bit) __ cmpw(reg1, imm); else __ cmp(reg1, imm); return; } else { __ mov(rscratch1, imm); - if (type2aelembytes(opr1->type()) <= 4) + if (is_32bit) __ cmpw(reg1, rscratch1); else __ cmp(reg1, rscratch1); diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp index 96793e632b9..1a612b9bac2 100644 --- a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp @@ -598,12 +598,12 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) { } else { assert (x->op() == Bytecodes::_imul, "expect imul"); if (right.is_constant()) { - int c = right.get_jint_constant(); - if (! is_power_of_2(c) && ! is_power_of_2(c + 1) && ! is_power_of_2(c - 1)) { - // Cannot use constant op. - right.load_item(); + jint c = right.get_jint_constant(); + if (c > 0 && c < max_jint && (is_power_of_2(c) || is_power_of_2(c - 1) || is_power_of_2(c + 1))) { + right_arg->dont_load_item(); } else { - right.dont_load_item(); + // Cannot use constant op. + right_arg->load_item(); } } else { right.load_item(); @@ -1221,12 +1221,19 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { obj.load_item(); // info for exceptions - CodeEmitInfo* info_for_exception = state_for(x); + CodeEmitInfo* info_for_exception = + (x->needs_exception_state() ? state_for(x) : + state_for(x, x->state_before(), true /*ignore_xhandler*/)); CodeStub* stub; if (x->is_incompatible_class_change_check()) { assert(patching_info == NULL, "can't patch this"); stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception); + } else if (x->is_invokespecial_receiver_check()) { + assert(patching_info == NULL, "can't patch this"); + stub = new DeoptimizeStub(info_for_exception, + Deoptimization::Reason_class_check, + Deoptimization::Action_none); } else { stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception); } @@ -1340,6 +1347,16 @@ void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address, void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, CodeEmitInfo* info) { + // 8179954: We need to make sure that the code generated for + // volatile accesses forms a sequentially-consistent set of + // operations when combined with STLR and LDAR. Without a leading + // membar it's possible for a simple Dekker test to fail if loads + // use LD;DMB but stores use STLR. This can happen if C2 compiles + // the stores in one method and C1 compiles the loads in another. + if (! UseBarriersForVolatile) { + __ membar(); + } + __ volatile_load_mem_reg(address, result, info); } diff --git a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp index 9a16dd76967..69c8cc09795 100644 --- a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp +++ b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp @@ -50,12 +50,11 @@ define_pd_global(intx, ConditionalMoveLimit, 3); define_pd_global(intx, FLOATPRESSURE, 64); define_pd_global(intx, FreqInlineSize, 325); define_pd_global(intx, MinJumpTableSize, 10); -define_pd_global(intx, INTPRESSURE, 25); +define_pd_global(intx, INTPRESSURE, 24); define_pd_global(intx, InteriorEntryAlignment, 16); define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K)); define_pd_global(intx, LoopUnrollLimit, 60); define_pd_global(intx, LoopPercentProfileLimit, 10); -define_pd_global(intx, PostLoopMultiversioning, false); // InitialCodeCacheSize derived from specjbb2000 run. define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize define_pd_global(intx, CodeCacheExpansionSize, 64*K); diff --git a/hotspot/src/cpu/aarch64/vm/jniFastGetField_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/jniFastGetField_aarch64.cpp index b2f21031f18..a09c5230dc4 100644 --- a/hotspot/src/cpu/aarch64/vm/jniFastGetField_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/jniFastGetField_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -82,6 +82,11 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { __ eor(robj, robj, rcounter); // obj, since // robj ^ rcounter ^ rcounter == robj // robj is address dependent on rcounter. + + // If mask changes we need to ensure that the inverse is still encodable as an immediate + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1); + __ andr(robj, robj, ~JNIHandles::weak_tag_mask); + __ ldr(robj, Address(robj, 0)); // *obj __ lsr(roffset, c_rarg2, 2); // offset diff --git a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp index 01e0eeb1fc1..a286102e7b1 100644 --- a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -2052,13 +2052,31 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(false); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve result. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ cbz(r0, L); - __ ldr(r0, Address(r0, 0)); - __ bind(L); - __ verify_oop(r0); + Label done, not_weak; + __ cbz(r0, done); // Use NULL as-is. + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); + __ tbz(r0, 0, not_weak); // Test for jweak tag. + // Resolve jweak. + __ ldr(r0, Address(r0, -JNIHandles::weak_tag_value)); + __ verify_oop(r0); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + __ g1_write_barrier_pre(noreg /* obj */, + r0 /* pre_val */, + rthread /* thread */, + rscratch1 /* tmp */, + true /* tosca_live */, + true /* expand_call */); + } +#endif // INCLUDE_ALL_GCS + __ b(done); + __ bind(not_weak); + // Resolve (untagged) jobject. + __ ldr(r0, Address(r0, 0)); + __ verify_oop(r0); + __ bind(done); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp index 90dcd6c1a2c..6f44292c55a 100644 --- a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -1399,13 +1399,32 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // and result handler will pick it up { - Label no_oop, store_result; + Label no_oop, not_weak, store_result; __ adr(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT))); __ cmp(t, result_handler); __ br(Assembler::NE, no_oop); - // retrieve result + // Unbox oop result, e.g. JNIHandles::resolve result. __ pop(ltos); - __ cbz(r0, store_result); + __ cbz(r0, store_result); // Use NULL as-is. + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); + __ tbz(r0, 0, not_weak); // Test for jweak tag. + // Resolve jweak. + __ ldr(r0, Address(r0, -JNIHandles::weak_tag_value)); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + __ enter(); // Barrier may call runtime. + __ g1_write_barrier_pre(noreg /* obj */, + r0 /* pre_val */, + rthread /* thread */, + t /* tmp */, + true /* tosca_live */, + true /* expand_call */); + __ leave(); + } +#endif // INCLUDE_ALL_GCS + __ b(store_result); + __ bind(not_weak); + // Resolve (untagged) jobject. __ ldr(r0, Address(r0, 0)); __ bind(store_result); __ str(r0, Address(rfp, frame::interpreter_frame_oop_temp_offset*wordSize)); diff --git a/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp index 471a94511ad..f0f0f5a6ee5 100644 --- a/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp @@ -2389,17 +2389,31 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr const Register obj = r4; const Register off = r19; const Register flags = r0; + const Register raw_flags = r6; const Register bc = r4; // uses same reg as obj, so don't mix them resolve_cache_and_index(byte_no, cache, index, sizeof(u2)); jvmti_post_field_access(cache, index, is_static, false); - load_field_cp_cache_entry(obj, cache, index, off, flags, is_static); + load_field_cp_cache_entry(obj, cache, index, off, raw_flags, is_static); if (!is_static) { // obj is on the stack pop_and_check_object(obj); } + // 8179954: We need to make sure that the code generated for + // volatile accesses forms a sequentially-consistent set of + // operations when combined with STLR and LDAR. Without a leading + // membar it's possible for a simple Dekker test to fail if loads + // use LDR;DMB but stores use STLR. This can happen if C2 compiles + // the stores in one method and we interpret the loads in another. + if (! UseBarriersForVolatile) { + Label notVolatile; + __ tbz(raw_flags, ConstantPoolCacheEntry::is_volatile_shift, notVolatile); + __ membar(MacroAssembler::AnyAny); + __ bind(notVolatile); + } + const Address field(obj, off); Label Done, notByte, notBool, notInt, notShort, notChar, @@ -2407,7 +2421,8 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr // x86 uses a shift and mask or wings it with a shift plus assert // the mask is not needed. aarch64 just uses bitfield extract - __ ubfxw(flags, flags, ConstantPoolCacheEntry::tos_state_shift, ConstantPoolCacheEntry::tos_state_bits); + __ ubfxw(flags, raw_flags, ConstantPoolCacheEntry::tos_state_shift, + ConstantPoolCacheEntry::tos_state_bits); assert(btos == 0, "change code, btos != 0"); __ cbnz(flags, notByte); @@ -2529,9 +2544,11 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr #endif __ bind(Done); - // It's really not worth bothering to check whether this field - // really is volatile in the slow case. + + Label notVolatile; + __ tbz(raw_flags, ConstantPoolCacheEntry::is_volatile_shift, notVolatile); __ membar(MacroAssembler::LoadLoad | MacroAssembler::LoadStore); + __ bind(notVolatile); } @@ -2979,6 +2996,19 @@ void TemplateTable::fast_accessfield(TosState state) __ null_check(r0); const Address field(r0, r1); + // 8179954: We need to make sure that the code generated for + // volatile accesses forms a sequentially-consistent set of + // operations when combined with STLR and LDAR. Without a leading + // membar it's possible for a simple Dekker test to fail if loads + // use LDR;DMB but stores use STLR. This can happen if C2 compiles + // the stores in one method and we interpret the loads in another. + if (! UseBarriersForVolatile) { + Label notVolatile; + __ tbz(r3, ConstantPoolCacheEntry::is_volatile_shift, notVolatile); + __ membar(MacroAssembler::AnyAny); + __ bind(notVolatile); + } + // access field switch (bytecode()) { case Bytecodes::_fast_agetfield: @@ -3027,6 +3057,22 @@ void TemplateTable::fast_xaccess(TosState state) __ get_cache_and_index_at_bcp(r2, r3, 2); __ ldr(r1, Address(r2, in_bytes(ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::f2_offset()))); + + // 8179954: We need to make sure that the code generated for + // volatile accesses forms a sequentially-consistent set of + // operations when combined with STLR and LDAR. Without a leading + // membar it's possible for a simple Dekker test to fail if loads + // use LDR;DMB but stores use STLR. This can happen if C2 compiles + // the stores in one method and we interpret the loads in another. + if (! UseBarriersForVolatile) { + Label notVolatile; + __ ldrw(r3, Address(r2, in_bytes(ConstantPoolCache::base_offset() + + ConstantPoolCacheEntry::flags_offset()))); + __ tbz(r3, ConstantPoolCacheEntry::is_volatile_shift, notVolatile); + __ membar(MacroAssembler::AnyAny); + __ bind(notVolatile); + } + // make sure exception is reported in correct bcp range (getfield is // next instruction) __ increment(rbcp); diff --git a/hotspot/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp index 223f1810a6f..9301f687169 100644 --- a/hotspot/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp @@ -51,6 +51,11 @@ extern "C" void bad_compiled_vtable_index(JavaThread* thread, VtableStub* VtableStubs::create_vtable_stub(int vtable_index) { const int aarch64_code_length = VtableStub::pd_code_size_limit(true); VtableStub* s = new(aarch64_code_length) VtableStub(true, vtable_index); + // Can be NULL if there is no free space in the code cache. + if (s == NULL) { + return NULL; + } + ResourceMark rm; CodeBuffer cb(s->entry_point(), aarch64_code_length); MacroAssembler* masm = new MacroAssembler(&cb); diff --git a/hotspot/src/cpu/arm/vm/c1_LIRAssembler_arm.cpp b/hotspot/src/cpu/arm/vm/c1_LIRAssembler_arm.cpp index 4d45cfb0481..caf00718656 100644 --- a/hotspot/src/cpu/arm/vm/c1_LIRAssembler_arm.cpp +++ b/hotspot/src/cpu/arm/vm/c1_LIRAssembler_arm.cpp @@ -1453,10 +1453,11 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) { ciKlass* k = op->klass(); assert_different_registers(res, k_RInfo, klass_RInfo, Rtemp); + if (stub->is_simple_exception_stub()) { // TODO: ARM - Late binding is used to prevent confusion of register allocator assert(stub->is_exception_throw_stub(), "must be"); ((SimpleExceptionStub*)stub)->set_obj(op->result_opr()); - + } ciMethodData* md; ciProfileData* data; int mdo_offset_bias = 0; diff --git a/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp b/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp index 539a8faf880..742705f1681 100644 --- a/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp +++ b/hotspot/src/cpu/arm/vm/c1_LIRGenerator_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -923,8 +923,8 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) { } else { left_arg->load_item(); if (x->op() == Bytecodes::_imul && right_arg->is_constant()) { - int c = right_arg->get_jint_constant(); - if (c > 0 && (is_power_of_2(c) || is_power_of_2(c - 1) || is_power_of_2(c + 1))) { + jint c = right_arg->get_jint_constant(); + if (c > 0 && c < max_jint && (is_power_of_2(c) || is_power_of_2(c - 1) || is_power_of_2(c + 1))) { right_arg->dont_load_item(); } else { right_arg->load_item(); @@ -1412,12 +1412,20 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { obj.load_item(); - CodeEmitInfo* info_for_exception = state_for(x); + CodeEmitInfo* info_for_exception = + (x->needs_exception_state() ? state_for(x) : + state_for(x, x->state_before(), true /*ignore_xhandler*/)); + CodeStub* stub; if (x->is_incompatible_class_change_check()) { assert(patching_info == NULL, "can't patch this"); stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception); + } else if (x->is_invokespecial_receiver_check()) { + assert(patching_info == NULL, "can't patch this"); + stub = new DeoptimizeStub(info_for_exception, + Deoptimization::Reason_class_check, + Deoptimization::Action_none); } else { stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, LIR_OprFact::illegalOpr, info_for_exception); diff --git a/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp b/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp index 9f17c8fc810..5e793e16bd7 100644 --- a/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp +++ b/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp @@ -618,7 +618,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { Address buffer(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + DirtyCardQueue::byte_offset_of_buf())); - AddressLiteral cardtable((address)ct->byte_map_base); + AddressLiteral cardtable((address)ct->byte_map_base, relocInfo::none); assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); // save at least the registers that need saving if the runtime is called @@ -645,7 +645,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { // Note: there is a comment in x86 code about not using // ExternalAddress / lea, due to relocation not working // properly for that address. Should be OK for arm, where we - // explicitly specify that 'cartable' has a relocInfo::none + // explicitly specify that 'cardtable' has a relocInfo::none // type. __ lea(r_card_base_1, cardtable); __ add(r_card_addr_0, r_card_base_1, AsmOperand(r_obj_0, lsr, CardTableModRefBS::card_shift)); diff --git a/hotspot/src/cpu/arm/vm/c2_globals_arm.hpp b/hotspot/src/cpu/arm/vm/c2_globals_arm.hpp index 4b424ed0af1..2c0919660b9 100644 --- a/hotspot/src/cpu/arm/vm/c2_globals_arm.hpp +++ b/hotspot/src/cpu/arm/vm/c2_globals_arm.hpp @@ -70,7 +70,6 @@ define_pd_global(bool, UseTLAB, true); define_pd_global(bool, ResizeTLAB, true); define_pd_global(intx, LoopUnrollLimit, 60); // Design center runs on 1.3.1 define_pd_global(intx, LoopPercentProfileLimit, 10); -define_pd_global(intx, PostLoopMultiversioning, false); define_pd_global(intx, MinJumpTableSize, 16); // Peephole and CISC spilling both break the graph, and so makes the diff --git a/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp b/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp index de7249f277a..abbd673b6ba 100644 --- a/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp +++ b/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp @@ -85,17 +85,17 @@ address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) } #undef __ -// size of C2 call stub, compiled java to interpretor -int CompiledStaticCall::to_interp_stub_size() { - return 8 * NativeInstruction::instruction_size; -} - // Relocation entries for call stub, compiled java to interpreter. int CompiledStaticCall::reloc_to_interp_stub() { return 10; // 4 in emit_to_interp_stub + 1 in Java_Static_Call } #endif // COMPILER2 || JVMCI +// size of C2 call stub, compiled java to interpretor +int CompiledStaticCall::to_interp_stub_size() { + return 8 * NativeInstruction::instruction_size; +} + void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) { address stub = find_stub(/*is_aot*/ false); guarantee(stub != NULL, "stub not found"); @@ -125,6 +125,8 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad method_holder->set_data((intptr_t)callee()); jump->set_jump_destination(entry); + ICache::invalidate_range(stub, to_interp_stub_size()); + // Update jump to call. set_destination_mt_safe(stub); } diff --git a/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp b/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp index 2f41b102a85..96df37c275e 100644 --- a/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp +++ b/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp @@ -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 @@ -476,185 +476,6 @@ void InterpreterMacroAssembler::set_card(Register card_table_base, Address card_ } ////////////////////////////////////////////////////////////////////////////////// -#if INCLUDE_ALL_GCS - -// G1 pre-barrier. -// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). -// If store_addr != noreg, then previous value is loaded from [store_addr]; -// in such case store_addr and new_val registers are preserved; -// otherwise pre_val register is preserved. -void InterpreterMacroAssembler::g1_write_barrier_pre(Register store_addr, - Register new_val, - Register pre_val, - Register tmp1, - Register tmp2) { - Label done; - Label runtime; - - if (store_addr != noreg) { - assert_different_registers(store_addr, new_val, pre_val, tmp1, tmp2, noreg); - } else { - assert (new_val == noreg, "should be"); - assert_different_registers(pre_val, tmp1, tmp2, noreg); - } - - Address in_progress(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_active())); - Address index(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_index())); - Address buffer(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_buf())); - - // Is marking active? - assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "adjust this code"); - ldrb(tmp1, in_progress); - cbz(tmp1, done); - - // Do we need to load the previous value? - if (store_addr != noreg) { - load_heap_oop(pre_val, Address(store_addr, 0)); - } - - // Is the previous value null? - cbz(pre_val, done); - - // Can we store original value in the thread's buffer? - // Is index == 0? - // (The index field is typed as size_t.) - - ldr(tmp1, index); // tmp1 := *index_adr - ldr(tmp2, buffer); - - subs(tmp1, tmp1, wordSize); // tmp1 := tmp1 - wordSize - b(runtime, lt); // If negative, goto runtime - - str(tmp1, index); // *index_adr := tmp1 - - // Record the previous value - str(pre_val, Address(tmp2, tmp1)); - b(done); - - bind(runtime); - - // save the live input values -#ifdef AARCH64 - if (store_addr != noreg) { - raw_push(store_addr, new_val); - } else { - raw_push(pre_val, ZR); - } -#else - if (store_addr != noreg) { - // avoid raw_push to support any ordering of store_addr and new_val - push(RegisterSet(store_addr) | RegisterSet(new_val)); - } else { - push(pre_val); - } -#endif // AARCH64 - - if (pre_val != R0) { - mov(R0, pre_val); - } - mov(R1, Rthread); - - call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), R0, R1); - -#ifdef AARCH64 - if (store_addr != noreg) { - raw_pop(store_addr, new_val); - } else { - raw_pop(pre_val, ZR); - } -#else - if (store_addr != noreg) { - pop(RegisterSet(store_addr) | RegisterSet(new_val)); - } else { - pop(pre_val); - } -#endif // AARCH64 - - bind(done); -} - -// G1 post-barrier. -// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). -void InterpreterMacroAssembler::g1_write_barrier_post(Register store_addr, - Register new_val, - Register tmp1, - Register tmp2, - Register tmp3) { - - Address queue_index(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + - DirtyCardQueue::byte_offset_of_index())); - Address buffer(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + - DirtyCardQueue::byte_offset_of_buf())); - - BarrierSet* bs = Universe::heap()->barrier_set(); - CardTableModRefBS* ct = (CardTableModRefBS*)bs; - Label done; - Label runtime; - - // Does store cross heap regions? - - eor(tmp1, store_addr, new_val); -#ifdef AARCH64 - logical_shift_right(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes); - cbz(tmp1, done); -#else - movs(tmp1, AsmOperand(tmp1, lsr, HeapRegion::LogOfHRGrainBytes)); - b(done, eq); -#endif - - // crosses regions, storing NULL? - - cbz(new_val, done); - - // storing region crossing non-NULL, is card already dirty? - const Register card_addr = tmp1; - assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); - - mov_address(tmp2, (address)ct->byte_map_base, symbolic_Relocation::card_table_reference); - add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTableModRefBS::card_shift)); - - ldrb(tmp2, Address(card_addr)); - cmp(tmp2, (int)G1SATBCardTableModRefBS::g1_young_card_val()); - b(done, eq); - - membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreLoad), tmp2); - - assert(CardTableModRefBS::dirty_card_val() == 0, "adjust this code"); - ldrb(tmp2, Address(card_addr)); - cbz(tmp2, done); - - // storing a region crossing, non-NULL oop, card is clean. - // dirty card and log. - - strb(zero_register(tmp2), Address(card_addr)); - - ldr(tmp2, queue_index); - ldr(tmp3, buffer); - - subs(tmp2, tmp2, wordSize); - b(runtime, lt); // go to runtime if now negative - - str(tmp2, queue_index); - - str(card_addr, Address(tmp3, tmp2)); - b(done); - - bind(runtime); - - if (card_addr != R0) { - mov(R0, card_addr); - } - mov(R1, Rthread); - call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), R0, R1); - - bind(done); -} - -#endif // INCLUDE_ALL_GCS -////////////////////////////////////////////////////////////////////////////////// // Java Expression Stack diff --git a/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp b/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp index 5c753753f95..39e60226bf6 100644 --- a/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp +++ b/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp @@ -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 @@ -146,27 +146,6 @@ class InterpreterMacroAssembler: public MacroAssembler { void set_card(Register card_table_base, Address card_table_addr, Register tmp); -#if INCLUDE_ALL_GCS - // G1 pre-barrier. - // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). - // If store_addr != noreg, then previous value is loaded from [store_addr]; - // in such case store_addr and new_val registers are preserved; - // otherwise pre_val register is preserved. - void g1_write_barrier_pre(Register store_addr, - Register new_val, - Register pre_val, - Register tmp1, - Register tmp2); - - // G1 post-barrier. - // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). - void g1_write_barrier_post(Register store_addr, - Register new_val, - Register tmp1, - Register tmp2, - Register tmp3); -#endif // INCLUDE_ALL_GCS - void pop_ptr(Register r); void pop_i(Register r = R0_tos); #ifdef AARCH64 diff --git a/hotspot/src/cpu/arm/vm/jniFastGetField_arm.cpp b/hotspot/src/cpu/arm/vm/jniFastGetField_arm.cpp index f9bd9f37970..65f929b1025 100644 --- a/hotspot/src/cpu/arm/vm/jniFastGetField_arm.cpp +++ b/hotspot/src/cpu/arm/vm/jniFastGetField_arm.cpp @@ -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 @@ -119,6 +119,14 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { __ ldr_s32(Rsafept_cnt, Address(Rsafepoint_counter_addr)); __ tbnz(Rsafept_cnt, 0, slow_case); +#ifdef AARCH64 + // If mask changes we need to ensure that the inverse is still encodable as an immediate + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1); + __ andr(R1, R1, ~JNIHandles::weak_tag_mask); +#else + __ bic(R1, R1, JNIHandles::weak_tag_mask); +#endif + if (os::is_MP()) { // Address dependency restricts memory access ordering. It's cheaper than explicit LoadLoad barrier __ andr(Rtmp1, Rsafept_cnt, (unsigned)1); diff --git a/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp b/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp index ada7d3fc485..2eb2a551002 100644 --- a/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp +++ b/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp @@ -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 @@ -2211,6 +2211,219 @@ void MacroAssembler::biased_locking_exit(Register obj_reg, Register tmp_reg, Lab b(done, eq); } + +void MacroAssembler::resolve_jobject(Register value, + Register tmp1, + Register tmp2) { + assert_different_registers(value, tmp1, tmp2); + Label done, not_weak; + cbz(value, done); // Use NULL as-is. + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); + tbz(value, 0, not_weak); // Test for jweak tag. + // Resolve jweak. + ldr(value, Address(value, -JNIHandles::weak_tag_value)); + verify_oop(value); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + g1_write_barrier_pre(noreg, // store_addr + noreg, // new_val + value, // pre_val + tmp1, // tmp1 + tmp2); // tmp2 + } +#endif // INCLUDE_ALL_GCS + b(done); + bind(not_weak); + // Resolve (untagged) jobject. + ldr(value, Address(value)); + verify_oop(value); + bind(done); +} + + +////////////////////////////////////////////////////////////////////////////////// + +#if INCLUDE_ALL_GCS + +// G1 pre-barrier. +// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). +// If store_addr != noreg, then previous value is loaded from [store_addr]; +// in such case store_addr and new_val registers are preserved; +// otherwise pre_val register is preserved. +void MacroAssembler::g1_write_barrier_pre(Register store_addr, + Register new_val, + Register pre_val, + Register tmp1, + Register tmp2) { + Label done; + Label runtime; + + if (store_addr != noreg) { + assert_different_registers(store_addr, new_val, pre_val, tmp1, tmp2, noreg); + } else { + assert (new_val == noreg, "should be"); + assert_different_registers(pre_val, tmp1, tmp2, noreg); + } + + Address in_progress(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_active())); + Address index(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_index())); + Address buffer(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_buf())); + + // Is marking active? + assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "adjust this code"); + ldrb(tmp1, in_progress); + cbz(tmp1, done); + + // Do we need to load the previous value? + if (store_addr != noreg) { + load_heap_oop(pre_val, Address(store_addr, 0)); + } + + // Is the previous value null? + cbz(pre_val, done); + + // Can we store original value in the thread's buffer? + // Is index == 0? + // (The index field is typed as size_t.) + + ldr(tmp1, index); // tmp1 := *index_adr + ldr(tmp2, buffer); + + subs(tmp1, tmp1, wordSize); // tmp1 := tmp1 - wordSize + b(runtime, lt); // If negative, goto runtime + + str(tmp1, index); // *index_adr := tmp1 + + // Record the previous value + str(pre_val, Address(tmp2, tmp1)); + b(done); + + bind(runtime); + + // save the live input values +#ifdef AARCH64 + if (store_addr != noreg) { + raw_push(store_addr, new_val); + } else { + raw_push(pre_val, ZR); + } +#else + if (store_addr != noreg) { + // avoid raw_push to support any ordering of store_addr and new_val + push(RegisterSet(store_addr) | RegisterSet(new_val)); + } else { + push(pre_val); + } +#endif // AARCH64 + + if (pre_val != R0) { + mov(R0, pre_val); + } + mov(R1, Rthread); + + call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), R0, R1); + +#ifdef AARCH64 + if (store_addr != noreg) { + raw_pop(store_addr, new_val); + } else { + raw_pop(pre_val, ZR); + } +#else + if (store_addr != noreg) { + pop(RegisterSet(store_addr) | RegisterSet(new_val)); + } else { + pop(pre_val); + } +#endif // AARCH64 + + bind(done); +} + +// G1 post-barrier. +// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). +void MacroAssembler::g1_write_barrier_post(Register store_addr, + Register new_val, + Register tmp1, + Register tmp2, + Register tmp3) { + + Address queue_index(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + + DirtyCardQueue::byte_offset_of_index())); + Address buffer(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + + DirtyCardQueue::byte_offset_of_buf())); + + BarrierSet* bs = Universe::heap()->barrier_set(); + CardTableModRefBS* ct = (CardTableModRefBS*)bs; + Label done; + Label runtime; + + // Does store cross heap regions? + + eor(tmp1, store_addr, new_val); +#ifdef AARCH64 + logical_shift_right(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes); + cbz(tmp1, done); +#else + movs(tmp1, AsmOperand(tmp1, lsr, HeapRegion::LogOfHRGrainBytes)); + b(done, eq); +#endif + + // crosses regions, storing NULL? + + cbz(new_val, done); + + // storing region crossing non-NULL, is card already dirty? + const Register card_addr = tmp1; + assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); + + mov_address(tmp2, (address)ct->byte_map_base, symbolic_Relocation::card_table_reference); + add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTableModRefBS::card_shift)); + + ldrb(tmp2, Address(card_addr)); + cmp(tmp2, (int)G1SATBCardTableModRefBS::g1_young_card_val()); + b(done, eq); + + membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreLoad), tmp2); + + assert(CardTableModRefBS::dirty_card_val() == 0, "adjust this code"); + ldrb(tmp2, Address(card_addr)); + cbz(tmp2, done); + + // storing a region crossing, non-NULL oop, card is clean. + // dirty card and log. + + strb(zero_register(tmp2), Address(card_addr)); + + ldr(tmp2, queue_index); + ldr(tmp3, buffer); + + subs(tmp2, tmp2, wordSize); + b(runtime, lt); // go to runtime if now negative + + str(tmp2, queue_index); + + str(card_addr, Address(tmp3, tmp2)); + b(done); + + bind(runtime); + + if (card_addr != R0) { + mov(R0, card_addr); + } + mov(R1, Rthread); + call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), R0, R1); + + bind(done); +} + +#endif // INCLUDE_ALL_GCS + +////////////////////////////////////////////////////////////////////////////////// + #ifdef AARCH64 void MacroAssembler::load_sized_value(Register dst, Address src, size_t size_in_bytes, bool is_signed) { diff --git a/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp b/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp index 770bba6c8a1..e6f73353cb9 100644 --- a/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp +++ b/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp @@ -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 @@ -402,6 +402,29 @@ public: void biased_locking_enter_with_cas(Register obj_reg, Register old_mark_reg, Register new_mark_reg, Register tmp, Label& slow_case, int* counter_addr); + void resolve_jobject(Register value, Register tmp1, Register tmp2); + +#if INCLUDE_ALL_GCS + // G1 pre-barrier. + // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). + // If store_addr != noreg, then previous value is loaded from [store_addr]; + // in such case store_addr and new_val registers are preserved; + // otherwise pre_val register is preserved. + void g1_write_barrier_pre(Register store_addr, + Register new_val, + Register pre_val, + Register tmp1, + Register tmp2); + + // G1 post-barrier. + // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). + void g1_write_barrier_post(Register store_addr, + Register new_val, + Register tmp1, + Register tmp2, + Register tmp3); +#endif // INCLUDE_ALL_GCS + #ifndef AARCH64 void nop() { mov(R0, R0); diff --git a/hotspot/src/cpu/arm/vm/relocInfo_arm.cpp b/hotspot/src/cpu/arm/vm/relocInfo_arm.cpp index e17c5843cae..3eed9f846a2 100644 --- a/hotspot/src/cpu/arm/vm/relocInfo_arm.cpp +++ b/hotspot/src/cpu/arm/vm/relocInfo_arm.cpp @@ -139,7 +139,7 @@ void metadata_Relocation::pd_fix_value(address x) { #ifdef AARCH64 #ifdef COMPILER2 NativeMovConstReg* ni = nativeMovConstReg_at(addr()); - if (ni->is_movz()) { + if (ni->is_mov_slow()) { return; } #endif diff --git a/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp b/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp index 9b37b4fe6dc..48f096473c3 100644 --- a/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp +++ b/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp @@ -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 @@ -1732,14 +1732,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, case T_FLOAT : // fall through case T_DOUBLE : /* nothing to do */ break; case T_OBJECT : // fall through - case T_ARRAY : { - Label L; - __ cbz(R0, L); - __ ldr(R0, Address(R0)); - __ verify_oop(R0); - __ bind(L); - break; - } + case T_ARRAY : break; // See JNIHandles::resolve below default: ShouldNotReachHere(); } @@ -1748,14 +1741,15 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, if (CheckJNICalls) { __ str(__ zero_register(Rtemp), Address(Rthread, JavaThread::pending_jni_exception_check_fn_offset())); } - - // Unhandle the result - if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - __ cmp(R0, 0); - __ ldr(R0, Address(R0), ne); - } #endif // AARCH64 + // Unbox oop result, e.g. JNIHandles::resolve value in R0. + if (ret_type == T_OBJECT || ret_type == T_ARRAY) { + __ resolve_jobject(R0, // value + Rtemp, // tmp1 + R1_tmp); // tmp2 + } + // Any exception pending? __ ldr(Rtemp, Address(Rthread, Thread::pending_exception_offset())); __ mov(SP, FP); diff --git a/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp b/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp index 743510e09a7..7fda747ad48 100644 --- a/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp +++ b/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp @@ -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 @@ -1240,28 +1240,25 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { __ str(__ zero_register(Rtemp), Address(Rthread, JavaThread::pending_jni_exception_check_fn_offset())); } - // Unbox if the result is non-zero object -#ifdef AARCH64 + // Unbox oop result, e.g. JNIHandles::resolve result if it's an oop. { - Label L, Lnull; + Label Lnot_oop; +#ifdef AARCH64 __ mov_slow(Rtemp, AbstractInterpreter::result_handler(T_OBJECT)); __ cmp(Rresult_handler, Rtemp); - __ b(L, ne); - __ cbz(Rsaved_result, Lnull); - __ ldr(Rsaved_result, Address(Rsaved_result)); - __ bind(Lnull); - // Store oop on the stack for GC - __ str(Rsaved_result, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize)); - __ bind(L); + __ b(Lnot_oop, ne); +#else // !AARCH64 + // For ARM32, Rresult_handler is -1 for oop result, 0 otherwise. + __ cbz(Rresult_handler, Lnot_oop); +#endif // !AARCH64 + Register value = AARCH64_ONLY(Rsaved_result) NOT_AARCH64(Rsaved_result_lo); + __ resolve_jobject(value, // value + Rtemp, // tmp1 + R1_tmp); // tmp2 + // Store resolved result in frame for GC visibility. + __ str(value, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize)); + __ bind(Lnot_oop); } -#else - __ tst(Rsaved_result_lo, Rresult_handler); - __ ldr(Rsaved_result_lo, Address(Rsaved_result_lo), ne); - - // Store oop on the stack for GC - __ cmp(Rresult_handler, 0); - __ str(Rsaved_result_lo, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize), ne); -#endif // AARCH64 #ifdef AARCH64 // Restore SP (drop native parameters area), to keep SP in sync with extended_sp in frame diff --git a/hotspot/src/cpu/ppc/vm/c1_LIRGenerator_ppc.cpp b/hotspot/src/cpu/ppc/vm/c1_LIRGenerator_ppc.cpp index 86eacda77f1..5bcd457e7e0 100644 --- a/hotspot/src/cpu/ppc/vm/c1_LIRGenerator_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/c1_LIRGenerator_ppc.cpp @@ -1131,12 +1131,19 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { obj.load_item(); LIR_Opr out_reg = rlock_result(x); CodeStub* stub; - CodeEmitInfo* info_for_exception = state_for(x); + CodeEmitInfo* info_for_exception = + (x->needs_exception_state() ? state_for(x) : + state_for(x, x->state_before(), true /*ignore_xhandler*/)); if (x->is_incompatible_class_change_check()) { assert(patching_info == NULL, "can't patch this"); stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception); + } else if (x->is_invokespecial_receiver_check()) { + assert(patching_info == NULL, "can't patch this"); + stub = new DeoptimizeStub(info_for_exception, + Deoptimization::Reason_class_check, + Deoptimization::Action_none); } else { stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception); } diff --git a/hotspot/src/cpu/ppc/vm/c2_globals_ppc.hpp b/hotspot/src/cpu/ppc/vm/c2_globals_ppc.hpp index e755e982b9e..fd61e5ddb56 100644 --- a/hotspot/src/cpu/ppc/vm/c2_globals_ppc.hpp +++ b/hotspot/src/cpu/ppc/vm/c2_globals_ppc.hpp @@ -55,7 +55,6 @@ define_pd_global(bool, UseTLAB, true); define_pd_global(bool, ResizeTLAB, true); define_pd_global(intx, LoopUnrollLimit, 60); define_pd_global(intx, LoopPercentProfileLimit, 10); -define_pd_global(intx, PostLoopMultiversioning, false); // Peephole and CISC spilling both break the graph, and so make the // scheduler sick. diff --git a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp index 131a931c2c1..b6a538681f6 100644 --- a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 SAP SE. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. 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 @@ -171,10 +171,7 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) switch (method->result_type()) { case T_OBJECT: case T_ARRAY: { - oop* obj_p = *(oop**)lresult; - oop obj = (obj_p == NULL) ? (oop)NULL : *obj_p; - assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check"); - *oop_result = obj; + *oop_result = JNIHandles::resolve(*(jobject*)lresult); break; } // We use std/stfd to store the values. diff --git a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp index a5d5613a414..6eb27c78f17 100644 --- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 SAP SE. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. 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 @@ -3033,6 +3033,34 @@ void MacroAssembler::card_table_write(jbyte* byte_map_base, Register Rtmp, Regis stbx(R0, Rtmp, Robj); } +// Kills R31 if value is a volatile register. +void MacroAssembler::resolve_jobject(Register value, Register tmp1, Register tmp2, bool needs_frame) { + Label done; + cmpdi(CCR0, value, 0); + beq(CCR0, done); // Use NULL as-is. + + clrrdi(tmp1, value, JNIHandles::weak_tag_size); +#if INCLUDE_ALL_GCS + if (UseG1GC) { andi_(tmp2, value, JNIHandles::weak_tag_mask); } +#endif + ld(value, 0, tmp1); // Resolve (untagged) jobject. + +#if INCLUDE_ALL_GCS + if (UseG1GC) { + Label not_weak; + beq(CCR0, not_weak); // Test for jweak tag. + verify_oop(value); + g1_write_barrier_pre(noreg, // obj + noreg, // offset + value, // pre_val + tmp1, tmp2, needs_frame); + bind(not_weak); + } +#endif // INCLUDE_ALL_GCS + verify_oop(value); + bind(done); +} + #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. // Goal: record the previous value if it is not null. @@ -3094,7 +3122,7 @@ void MacroAssembler::g1_write_barrier_pre(Register Robj, RegisterOrConstant offs bind(runtime); - // VM call need frame to access(write) O register. + // May need to preserve LR. Also needed if current frame is not compatible with C calling convention. if (needs_frame) { save_LR_CR(Rtmp1); push_frame_reg_args(0, Rtmp2); diff --git a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp index 11b966a82c9..0b1b2a0befa 100644 --- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp +++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 SAP SE. All rights reserved. + * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. 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 @@ -649,6 +649,8 @@ class MacroAssembler: public Assembler { void card_write_barrier_post(Register Rstore_addr, Register Rnew_val, Register Rtmp); void card_table_write(jbyte* byte_map_base, Register Rtmp, Register Robj); + void resolve_jobject(Register value, Register tmp1, Register tmp2, bool needs_frame); + #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. void g1_write_barrier_pre(Register Robj, RegisterOrConstant offset, Register Rpre_val, diff --git a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp index 784595f11be..dc36aa77da2 100644 --- a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 SAP SE. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. 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 @@ -2477,16 +2477,11 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, __ reset_last_Java_frame(); - // Unpack oop result. + // Unbox oop result, e.g. JNIHandles::resolve value. // -------------------------------------------------------------------------- if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label skip_unboxing; - __ cmpdi(CCR0, R3_RET, 0); - __ beq(CCR0, skip_unboxing); - __ ld(R3_RET, 0, R3_RET); - __ bind(skip_unboxing); - __ verify_oop(R3_RET); + __ resolve_jobject(R3_RET, r_temp_1, r_temp_2, /* needs_frame */ false); // kills R31 } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp b/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp index 56810938a53..ab87c204018 100644 --- a/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2015, 2016 SAP SE. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017 SAP SE. 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 @@ -401,11 +401,8 @@ address TemplateInterpreterGenerator::generate_result_handler_for(BasicType type case T_LONG: break; case T_OBJECT: - // unbox result if not null - __ cmpdi(CCR0, R3_RET, 0); - __ beq(CCR0, done); - __ ld(R3_RET, 0, R3_RET); - __ verify_oop(R3_RET); + // JNIHandles::resolve result. + __ resolve_jobject(R3_RET, R11_scratch1, R12_scratch2, /* needs_frame */ true); // kills R31 break; case T_FLOAT: break; diff --git a/hotspot/src/cpu/s390/vm/c1_LIRGenerator_s390.cpp b/hotspot/src/cpu/s390/vm/c1_LIRGenerator_s390.cpp index 98489aa7371..0ec97da6230 100644 --- a/hotspot/src/cpu/s390/vm/c1_LIRGenerator_s390.cpp +++ b/hotspot/src/cpu/s390/vm/c1_LIRGenerator_s390.cpp @@ -993,12 +993,19 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { obj.load_item(); // info for exceptions - CodeEmitInfo* info_for_exception = state_for (x); + CodeEmitInfo* info_for_exception = + (x->needs_exception_state() ? state_for(x) : + state_for(x, x->state_before(), true /*ignore_xhandler*/)); CodeStub* stub; if (x->is_incompatible_class_change_check()) { assert(patching_info == NULL, "can't patch this"); stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception); + } else if (x->is_invokespecial_receiver_check()) { + assert(patching_info == NULL, "can't patch this"); + stub = new DeoptimizeStub(info_for_exception, + Deoptimization::Reason_class_check, + Deoptimization::Action_none); } else { stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception); } diff --git a/hotspot/src/cpu/s390/vm/c1_Runtime1_s390.cpp b/hotspot/src/cpu/s390/vm/c1_Runtime1_s390.cpp index 7b65476212f..4f3c0950ad2 100644 --- a/hotspot/src/cpu/s390/vm/c1_Runtime1_s390.cpp +++ b/hotspot/src/cpu/s390/vm/c1_Runtime1_s390.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/hotspot/src/cpu/s390/vm/c2_globals_s390.hpp b/hotspot/src/cpu/s390/vm/c2_globals_s390.hpp index 2c00ec86521..86a1d102e21 100644 --- a/hotspot/src/cpu/s390/vm/c2_globals_s390.hpp +++ b/hotspot/src/cpu/s390/vm/c2_globals_s390.hpp @@ -56,7 +56,6 @@ define_pd_global(bool, UseTLAB, true); define_pd_global(bool, ResizeTLAB, true); define_pd_global(intx, LoopUnrollLimit, 60); define_pd_global(intx, LoopPercentProfileLimit, 10); -define_pd_global(intx, PostLoopMultiversioning, false); define_pd_global(intx, MinJumpTableSize, 18); // Peephole and CISC spilling both break the graph, and so makes the diff --git a/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp b/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp index 0f78e5a6250..d5776117436 100644 --- a/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp +++ b/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp @@ -3439,6 +3439,34 @@ void MacroAssembler::card_write_barrier_post(Register store_addr, Register tmp) z_mvi(0, store_addr, 0); // Store byte 0. } +void MacroAssembler::resolve_jobject(Register value, Register tmp1, Register tmp2) { + NearLabel Ldone; + z_ltgr(tmp1, value); + z_bre(Ldone); // Use NULL result as-is. + + z_nill(value, ~JNIHandles::weak_tag_mask); + z_lg(value, 0, value); // Resolve (untagged) jobject. + +#if INCLUDE_ALL_GCS + if (UseG1GC) { + NearLabel Lnot_weak; + z_tmll(tmp1, JNIHandles::weak_tag_mask); // Test for jweak tag. + z_braz(Lnot_weak); + verify_oop(value); + g1_write_barrier_pre(noreg /* obj */, + noreg /* offset */, + value /* pre_val */, + noreg /* val */, + tmp1 /* tmp1 */, + tmp2 /* tmp2 */, + true /* pre_val_needed */); + bind(Lnot_weak); + } +#endif // INCLUDE_ALL_GCS + verify_oop(value); + bind(Ldone); +} + #if INCLUDE_ALL_GCS //------------------------------------------------------ diff --git a/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp b/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp index 588bde6207e..2b4002a3bf4 100644 --- a/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp +++ b/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp @@ -726,6 +726,8 @@ class MacroAssembler: public Assembler { // Write to card table for modification at store_addr - register is destroyed afterwards. void card_write_barrier_post(Register store_addr, Register tmp); + void resolve_jobject(Register value, Register tmp1, Register tmp2); + #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. // Purpose: record the previous value if it is not null. diff --git a/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp b/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp index ea498e3399c..89c3ae4032a 100644 --- a/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp +++ b/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016 SAP SE. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017 SAP SE. 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 @@ -2272,13 +2272,9 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, __ reset_last_Java_frame(); - // Unpack oop result + // Unpack oop result, e.g. JNIHandles::resolve result. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - NearLabel L; - __ compare64_and_branch(Z_RET, (RegisterOrConstant)0L, Assembler::bcondEqual, L); - __ z_lg(Z_RET, 0, Z_RET); - __ bind(L); - __ verify_oop(Z_RET); + __ resolve_jobject(Z_RET, /* tmp1 */ Z_R13, /* tmp2 */ Z_R7); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp b/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp index 2084f36006f..20a9a3e9571 100644 --- a/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp +++ b/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016 SAP SE. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017 SAP SE. 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 @@ -1695,14 +1695,11 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // from the jni handle to z_ijava_state.oop_temp. This is // necessary, because we reset the jni handle block below. // NOTE: frame::interpreter_frame_result() depends on this, too. - { NearLabel no_oop_result, store_oop_result; + { NearLabel no_oop_result; __ load_absolute_address(Z_R1, AbstractInterpreter::result_handler(T_OBJECT)); __ compareU64_and_branch(Z_R1, Rresult_handler, Assembler::bcondNotEqual, no_oop_result); - __ compareU64_and_branch(Rlresult, (intptr_t)0L, Assembler::bcondEqual, store_oop_result); - __ z_lg(Rlresult, 0, Rlresult); // unbox - __ bind(store_oop_result); + __ resolve_jobject(Rlresult, /* tmp1 */ Rmethod, /* tmp2 */ Z_R1); __ z_stg(Rlresult, oop_tmp_offset, Z_fp); - __ verify_oop(Rlresult); __ bind(no_oop_result); } diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp index 36d3059739c..069b9a2f46e 100644 --- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @@ -1196,11 +1196,18 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { obj.load_item(); LIR_Opr out_reg = rlock_result(x); CodeStub* stub; - CodeEmitInfo* info_for_exception = state_for(x); + CodeEmitInfo* info_for_exception = + (x->needs_exception_state() ? state_for(x) : + state_for(x, x->state_before(), true /*ignore_xhandler*/)); if (x->is_incompatible_class_change_check()) { assert(patching_info == NULL, "can't patch this"); stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception); + } else if (x->is_invokespecial_receiver_check()) { + assert(patching_info == NULL, "can't patch this"); + stub = new DeoptimizeStub(info_for_exception, + Deoptimization::Reason_class_check, + Deoptimization::Action_none); } else { stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception); } diff --git a/hotspot/src/cpu/sparc/vm/c2_globals_sparc.hpp b/hotspot/src/cpu/sparc/vm/c2_globals_sparc.hpp index 10e6799f21e..7e7cddc54da 100644 --- a/hotspot/src/cpu/sparc/vm/c2_globals_sparc.hpp +++ b/hotspot/src/cpu/sparc/vm/c2_globals_sparc.hpp @@ -53,7 +53,6 @@ define_pd_global(bool, UseTLAB, true); define_pd_global(bool, ResizeTLAB, true); define_pd_global(intx, LoopUnrollLimit, 60); // Design center runs on 1.3.1 define_pd_global(intx, LoopPercentProfileLimit, 10); -define_pd_global(intx, PostLoopMultiversioning, false); define_pd_global(intx, MinJumpTableSize, 5); // Peephole and CISC spilling both break the graph, and so makes the diff --git a/hotspot/src/cpu/sparc/vm/jniFastGetField_sparc.cpp b/hotspot/src/cpu/sparc/vm/jniFastGetField_sparc.cpp index 6d3f05a2aab..ff9fcd69472 100644 --- a/hotspot/src/cpu/sparc/vm/jniFastGetField_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/jniFastGetField_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -68,6 +68,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { __ andcc (G4, 1, G0); __ br (Assembler::notZero, false, Assembler::pn, label1); __ delayed()->srl (O2, 2, O4); + __ andn (O1, JNIHandles::weak_tag_mask, O1); __ ld_ptr (O1, 0, O5); assert(count < LIST_CAPACITY, "LIST_CAPACITY too small"); @@ -147,6 +148,7 @@ address JNI_FastGetField::generate_fast_get_long_field() { __ andcc (G4, 1, G0); __ br (Assembler::notZero, false, Assembler::pn, label1); __ delayed()->srl (O2, 2, O4); + __ andn (O1, JNIHandles::weak_tag_mask, O1); __ ld_ptr (O1, 0, O5); __ add (O5, O4, O5); @@ -219,6 +221,7 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) { __ andcc (G4, 1, G0); __ br (Assembler::notZero, false, Assembler::pn, label1); __ delayed()->srl (O2, 2, O4); + __ andn (O1, JNIHandles::weak_tag_mask, O1); __ ld_ptr (O1, 0, O5); assert(count < LIST_CAPACITY, "LIST_CAPACITY too small"); diff --git a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp index 7b4dcf193d3..613e662d65c 100644 --- a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -2754,15 +2754,30 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ verify_thread(); // G2_thread must be correct __ reset_last_Java_frame(); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve value in I0. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ addcc(G0, I0, G0); - __ brx(Assembler::notZero, true, Assembler::pt, L); - __ delayed()->ld_ptr(I0, 0, I0); - __ mov(G0, I0); - __ bind(L); - __ verify_oop(I0); + Label done, not_weak; + __ br_null(I0, false, Assembler::pn, done); // Use NULL as-is. + __ delayed()->andcc(I0, JNIHandles::weak_tag_mask, G0); // Test for jweak + __ brx(Assembler::zero, true, Assembler::pt, not_weak); + __ delayed()->ld_ptr(I0, 0, I0); // Maybe resolve (untagged) jobject. + // Resolve jweak. + __ ld_ptr(I0, -JNIHandles::weak_tag_value, I0); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + // Copy to O0 because macro doesn't allow pre_val in input reg. + __ mov(I0, O0); + __ g1_write_barrier_pre(noreg /* obj */, + noreg /* index */, + 0 /* offset */, + O0 /* pre_val */, + G3_scratch /* tmp */, + true /* preserve_o_regs */); + } +#endif // INCLUDE_ALL_GCS + __ bind(not_weak); + __ verify_oop(I0); + __ bind(done); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp index b677a1dd662..fd4e3ffd149 100644 --- a/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1516,11 +1516,23 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { __ set((intptr_t)AbstractInterpreter::result_handler(T_OBJECT), G3_scratch); __ cmp_and_brx_short(G3_scratch, Lscratch, Assembler::notEqual, Assembler::pt, no_oop); - __ addcc(G0, O0, O0); - __ brx(Assembler::notZero, true, Assembler::pt, store_result); // if result is not NULL: - __ delayed()->ld_ptr(O0, 0, O0); // unbox it - __ mov(G0, O0); - + // Unbox oop result, e.g. JNIHandles::resolve value in O0. + __ br_null(O0, false, Assembler::pn, store_result); // Use NULL as-is. + __ delayed()->andcc(O0, JNIHandles::weak_tag_mask, G0); // Test for jweak + __ brx(Assembler::zero, true, Assembler::pt, store_result); + __ delayed()->ld_ptr(O0, 0, O0); // Maybe resolve (untagged) jobject. + // Resolve jweak. + __ ld_ptr(O0, -JNIHandles::weak_tag_value, O0); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + __ g1_write_barrier_pre(noreg /* obj */, + noreg /* index */, + 0 /* offset */, + O0 /* pre_val */, + G3_scratch /* tmp */, + true /* preserve_o_regs */); + } +#endif // INCLUDE_ALL_GCS __ bind(store_result); // Store it where gc will look for it and result handler expects it. __ st_ptr(O0, FP, (frame::interpreter_frame_oop_temp_offset*wordSize) + STACK_BIAS); diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.cpp b/hotspot/src/cpu/x86/vm/assembler_x86.cpp index c819ffe9462..3c6d7b5cdd6 100644 --- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp @@ -917,7 +917,7 @@ address Assembler::locate_operand(address inst, WhichOperand which) { break; case 0x62: // EVEX_4bytes - assert((UseAVX > 0), "shouldn't have EVEX prefix"); + assert(VM_Version::supports_evex(), "shouldn't have EVEX prefix"); assert(ip == inst+1, "no prefixes allowed"); // no EVEX collisions, all instructions that have 0x62 opcodes // have EVEX versions and are subopcodes of 0x66 diff --git a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp index c5bec4b7e0b..95ee2d54beb 100644 --- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp @@ -234,8 +234,8 @@ void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr bas } -bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, int c, LIR_Opr result, LIR_Opr tmp) { - if (tmp->is_valid()) { +bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, jint c, LIR_Opr result, LIR_Opr tmp) { + if (tmp->is_valid() && c > 0 && c < max_jint) { if (is_power_of_2(c + 1)) { __ move(left, tmp); __ shift_left(left, log2_intptr(c + 1), left); @@ -603,8 +603,8 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) { bool use_constant = false; bool use_tmp = false; if (right_arg->is_constant()) { - int iconst = right_arg->get_jint_constant(); - if (iconst > 0) { + jint iconst = right_arg->get_jint_constant(); + if (iconst > 0 && iconst < max_jint) { if (is_power_of_2(iconst)) { use_constant = true; } else if (is_power_of_2(iconst - 1) || is_power_of_2(iconst + 1)) { @@ -1429,12 +1429,17 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { obj.load_item(); // info for exceptions - CodeEmitInfo* info_for_exception = state_for(x); + CodeEmitInfo* info_for_exception = + (x->needs_exception_state() ? state_for(x) : + state_for(x, x->state_before(), true /*ignore_xhandler*/)); CodeStub* stub; if (x->is_incompatible_class_change_check()) { assert(patching_info == NULL, "can't patch this"); stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception); + } else if (x->is_invokespecial_receiver_check()) { + assert(patching_info == NULL, "can't patch this"); + stub = new DeoptimizeStub(info_for_exception, Deoptimization::Reason_class_check, Deoptimization::Action_none); } else { stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception); } diff --git a/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp b/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp index c193029ea73..e805cad0c1a 100644 --- a/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp +++ b/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp @@ -47,7 +47,6 @@ define_pd_global(intx, ConditionalMoveLimit, 3); define_pd_global(intx, FreqInlineSize, 325); define_pd_global(intx, MinJumpTableSize, 10); define_pd_global(intx, LoopPercentProfileLimit, 30); -define_pd_global(intx, PostLoopMultiversioning, true); #ifdef AMD64 define_pd_global(intx, INTPRESSURE, 13); define_pd_global(intx, FLOATPRESSURE, 14); diff --git a/hotspot/src/cpu/x86/vm/globals_x86.hpp b/hotspot/src/cpu/x86/vm/globals_x86.hpp index 5673abb4448..748a1af0326 100644 --- a/hotspot/src/cpu/x86/vm/globals_x86.hpp +++ b/hotspot/src/cpu/x86/vm/globals_x86.hpp @@ -116,7 +116,7 @@ define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong); product(bool, UseStoreImmI16, true, \ "Use store immediate 16-bits value instruction on x86") \ \ - product(intx, UseAVX, 99, \ + product(intx, UseAVX, 2, \ "Highest supported AVX instructions set on x86/x64") \ range(0, 99) \ \ diff --git a/hotspot/src/cpu/x86/vm/jniFastGetField_x86_32.cpp b/hotspot/src/cpu/x86/vm/jniFastGetField_x86_32.cpp index a45e0eb9aa3..719bf8ce560 100644 --- a/hotspot/src/cpu/x86/vm/jniFastGetField_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/jniFastGetField_x86_32.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -85,6 +85,9 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { __ movptr (rdx, Address(rsp, 2*wordSize)); // obj } __ movptr(rax, Address(rsp, 3*wordSize)); // jfieldID + + __ clear_jweak_tag(rdx); + __ movptr(rdx, Address(rdx, 0)); // *obj __ shrptr (rax, 2); // offset @@ -202,6 +205,9 @@ address JNI_FastGetField::generate_fast_get_long_field() { __ movptr(rdx, Address(rsp, 3*wordSize)); // obj } __ movptr(rsi, Address(rsp, 4*wordSize)); // jfieldID + + __ clear_jweak_tag(rdx); + __ movptr(rdx, Address(rdx, 0)); // *obj __ shrptr(rsi, 2); // offset @@ -291,6 +297,9 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) { __ movptr(rdx, Address(rsp, 2*wordSize)); // obj } __ movptr(rax, Address(rsp, 3*wordSize)); // jfieldID + + __ clear_jweak_tag(rdx); + __ movptr(rdx, Address(rdx, 0)); // *obj __ shrptr(rax, 2); // offset diff --git a/hotspot/src/cpu/x86/vm/jniFastGetField_x86_64.cpp b/hotspot/src/cpu/x86/vm/jniFastGetField_x86_64.cpp index 7286fd124b8..f18aa684266 100644 --- a/hotspot/src/cpu/x86/vm/jniFastGetField_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/jniFastGetField_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -80,6 +80,9 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { // robj ^ rcounter ^ rcounter == robj // robj is data dependent on rcounter. } + + __ clear_jweak_tag(robj); + __ movptr(robj, Address(robj, 0)); // *obj __ mov (roffset, c_rarg2); __ shrptr(roffset, 2); // offset @@ -178,6 +181,9 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) { // robj ^ rcounter ^ rcounter == robj // robj is data dependent on rcounter. } + + __ clear_jweak_tag(robj); + __ movptr(robj, Address(robj, 0)); // *obj __ mov (roffset, c_rarg2); __ shrptr(roffset, 2); // offset diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp index b6d32631582..6b7f947de6b 100644 --- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -4134,28 +4134,33 @@ void MacroAssembler::vabsss(XMMRegister dst, XMMRegister nds, XMMRegister src, A if ((dst_enc < 16) && (nds_enc < 16)) { vandps(dst, nds, negate_field, vector_len); } else if ((src_enc < 16) && (dst_enc < 16)) { - movss(src, nds); + evmovdqul(src, nds, Assembler::AVX_512bit); vandps(dst, src, negate_field, vector_len); } else if (src_enc < 16) { - movss(src, nds); + evmovdqul(src, nds, Assembler::AVX_512bit); vandps(src, src, negate_field, vector_len); - movss(dst, src); + evmovdqul(dst, src, Assembler::AVX_512bit); } else if (dst_enc < 16) { - movdqu(src, xmm0); - movss(xmm0, nds); + evmovdqul(src, xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, nds, Assembler::AVX_512bit); vandps(dst, xmm0, negate_field, vector_len); - movdqu(xmm0, src); - } else if (nds_enc < 16) { - movdqu(src, xmm0); - vandps(xmm0, nds, negate_field, vector_len); - movss(dst, xmm0); - movdqu(xmm0, src); + evmovdqul(xmm0, src, Assembler::AVX_512bit); } else { - movdqu(src, xmm0); - movss(xmm0, nds); - vandps(xmm0, xmm0, negate_field, vector_len); - movss(dst, xmm0); - movdqu(xmm0, src); + if (src_enc != dst_enc) { + evmovdqul(src, xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, nds, Assembler::AVX_512bit); + vandps(xmm0, xmm0, negate_field, vector_len); + evmovdqul(dst, xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, src, Assembler::AVX_512bit); + } else { + subptr(rsp, 64); + evmovdqul(Address(rsp, 0), xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, nds, Assembler::AVX_512bit); + vandps(xmm0, xmm0, negate_field, vector_len); + evmovdqul(dst, xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, Address(rsp, 0), Assembler::AVX_512bit); + addptr(rsp, 64); + } } } @@ -4166,28 +4171,33 @@ void MacroAssembler::vabssd(XMMRegister dst, XMMRegister nds, XMMRegister src, A if ((dst_enc < 16) && (nds_enc < 16)) { vandpd(dst, nds, negate_field, vector_len); } else if ((src_enc < 16) && (dst_enc < 16)) { - movsd(src, nds); + evmovdqul(src, nds, Assembler::AVX_512bit); vandpd(dst, src, negate_field, vector_len); } else if (src_enc < 16) { - movsd(src, nds); + evmovdqul(src, nds, Assembler::AVX_512bit); vandpd(src, src, negate_field, vector_len); - movsd(dst, src); + evmovdqul(dst, src, Assembler::AVX_512bit); } else if (dst_enc < 16) { - movdqu(src, xmm0); - movsd(xmm0, nds); + evmovdqul(src, xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, nds, Assembler::AVX_512bit); vandpd(dst, xmm0, negate_field, vector_len); - movdqu(xmm0, src); - } else if (nds_enc < 16) { - movdqu(src, xmm0); - vandpd(xmm0, nds, negate_field, vector_len); - movsd(dst, xmm0); - movdqu(xmm0, src); + evmovdqul(xmm0, src, Assembler::AVX_512bit); } else { - movdqu(src, xmm0); - movsd(xmm0, nds); - vandpd(xmm0, xmm0, negate_field, vector_len); - movsd(dst, xmm0); - movdqu(xmm0, src); + if (src_enc != dst_enc) { + evmovdqul(src, xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, nds, Assembler::AVX_512bit); + vandpd(xmm0, xmm0, negate_field, vector_len); + evmovdqul(dst, xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, src, Assembler::AVX_512bit); + } else { + subptr(rsp, 64); + evmovdqul(Address(rsp, 0), xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, nds, Assembler::AVX_512bit); + vandpd(xmm0, xmm0, negate_field, vector_len); + evmovdqul(dst, xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, Address(rsp, 0), Assembler::AVX_512bit); + addptr(rsp, 64); + } } } @@ -4934,6 +4944,24 @@ void MacroAssembler::punpcklbw(XMMRegister dst, XMMRegister src) { } } +void MacroAssembler::pshufd(XMMRegister dst, Address src, int mode) { + if (VM_Version::supports_avx512vl()) { + Assembler::pshufd(dst, src, mode); + } else { + int dst_enc = dst->encoding(); + if (dst_enc < 16) { + Assembler::pshufd(dst, src, mode); + } else { + subptr(rsp, 64); + evmovdqul(Address(rsp, 0), xmm0, Assembler::AVX_512bit); + Assembler::pshufd(xmm0, src, mode); + evmovdqul(dst, xmm0, Assembler::AVX_512bit); + evmovdqul(xmm0, Address(rsp, 0), Assembler::AVX_512bit); + addptr(rsp, 64); + } + } +} + // This instruction exists within macros, ergo we cannot control its input // when emitted through those patterns. void MacroAssembler::pshuflw(XMMRegister dst, XMMRegister src, int mode) { @@ -5129,6 +5157,43 @@ void MacroAssembler::vxorps(XMMRegister dst, XMMRegister nds, AddressLiteral src } +void MacroAssembler::resolve_jobject(Register value, + Register thread, + Register tmp) { + assert_different_registers(value, thread, tmp); + Label done, not_weak; + testptr(value, value); + jcc(Assembler::zero, done); // Use NULL as-is. + testptr(value, JNIHandles::weak_tag_mask); // Test for jweak tag. + jcc(Assembler::zero, not_weak); + // Resolve jweak. + movptr(value, Address(value, -JNIHandles::weak_tag_value)); + verify_oop(value); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + g1_write_barrier_pre(noreg /* obj */, + value /* pre_val */, + thread /* thread */, + tmp /* tmp */, + true /* tosca_live */, + true /* expand_call */); + } +#endif // INCLUDE_ALL_GCS + jmp(done); + bind(not_weak); + // Resolve (untagged) jobject. + movptr(value, Address(value, 0)); + verify_oop(value); + bind(done); +} + +void MacroAssembler::clear_jweak_tag(Register possibly_jweak) { + const int32_t inverted_jweak_mask = ~static_cast(JNIHandles::weak_tag_mask); + STATIC_ASSERT(inverted_jweak_mask == -2); // otherwise check this code + // The inverted mask is sign-extended + andptr(possibly_jweak, inverted_jweak_mask); +} + ////////////////////////////////////////////////////////////////////////////////// #if INCLUDE_ALL_GCS diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp index a3e81e58dc5..2c2b17c06ad 100644 --- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp +++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -297,6 +297,9 @@ class MacroAssembler: public Assembler { void store_check(Register obj); // store check for obj - register is destroyed afterwards void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed) + void resolve_jobject(Register value, Register thread, Register tmp); + void clear_jweak_tag(Register possibly_jweak); + #if INCLUDE_ALL_GCS void g1_write_barrier_pre(Register obj, @@ -1229,6 +1232,9 @@ public: void punpcklbw(XMMRegister dst, XMMRegister src); void punpcklbw(XMMRegister dst, Address src) { Assembler::punpcklbw(dst, src); } + void pshufd(XMMRegister dst, Address src, int mode); + void pshufd(XMMRegister dst, XMMRegister src, int mode) { Assembler::pshufd(dst, src, mode); } + void pshuflw(XMMRegister dst, XMMRegister src, int mode); void pshuflw(XMMRegister dst, Address src, int mode) { Assembler::pshuflw(dst, src, mode); } diff --git a/hotspot/src/cpu/x86/vm/nativeInst_x86.cpp b/hotspot/src/cpu/x86/vm/nativeInst_x86.cpp index cb8c08f4652..fc7fcba2fc7 100644 --- a/hotspot/src/cpu/x86/vm/nativeInst_x86.cpp +++ b/hotspot/src/cpu/x86/vm/nativeInst_x86.cpp @@ -365,6 +365,10 @@ int NativeMovRegMem::instruction_start() const { NOT_LP64(assert((0xC0 & ubyte_at(1)) == 0xC0, "shouldn't have LDS and LES instructions")); return 3; } + if (instr_0 == instruction_EVEX_prefix_4bytes) { + assert(VM_Version::supports_evex(), "shouldn't have EVEX prefix"); + return 4; + } // First check to see if we have a (prefixed or not) xor if (instr_0 >= instruction_prefix_wide_lo && // 0x40 diff --git a/hotspot/src/cpu/x86/vm/nativeInst_x86.hpp b/hotspot/src/cpu/x86/vm/nativeInst_x86.hpp index 7db3ccb9d3c..ef87c17807c 100644 --- a/hotspot/src/cpu/x86/vm/nativeInst_x86.hpp +++ b/hotspot/src/cpu/x86/vm/nativeInst_x86.hpp @@ -356,6 +356,7 @@ class NativeMovRegMem: public NativeInstruction { instruction_VEX_prefix_2bytes = Assembler::VEX_2bytes, instruction_VEX_prefix_3bytes = Assembler::VEX_3bytes, + instruction_EVEX_prefix_4bytes = Assembler::EVEX_4bytes, instruction_size = 4, instruction_offset = 0, diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp index ed317550e08..47b9fe5c627 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -2226,14 +2226,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(thread, false); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve value. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ cmpptr(rax, (int32_t)NULL_WORD); - __ jcc(Assembler::equal, L); - __ movptr(rax, Address(rax, 0)); - __ bind(L); - __ verify_oop(rax); + __ resolve_jobject(rax /* value */, + thread /* thread */, + rcx /* tmp */); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp index 4587b8caba6..d81e965d05d 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -2579,14 +2579,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(false); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve value. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ testptr(rax, rax); - __ jcc(Assembler::zero, L); - __ movptr(rax, Address(rax, 0)); - __ bind(L); - __ verify_oop(rax); + __ resolve_jobject(rax /* value */, + r15_thread /* thread */, + rcx /* tmp */); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp index eb5661bee00..9c02d44cdb8 100644 --- a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp +++ b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -1193,16 +1193,16 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // and result handler will pick it up { - Label no_oop, store_result; + Label no_oop, not_weak, store_result; __ lea(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT))); __ cmpptr(t, Address(rbp, frame::interpreter_frame_result_handler_offset*wordSize)); __ jcc(Assembler::notEqual, no_oop); // retrieve result __ pop(ltos); - __ testptr(rax, rax); - __ jcc(Assembler::zero, store_result); - __ movptr(rax, Address(rax, 0)); - __ bind(store_result); + // Unbox oop result, e.g. JNIHandles::resolve value. + __ resolve_jobject(rax /* value */, + thread /* thread */, + t /* tmp */); __ movptr(Address(rbp, frame::interpreter_frame_oop_temp_offset*wordSize), rax); // keep stack depth as expected by pushing oop which will eventually be discarded __ push(ltos); diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86.cpp index 5f1c935f944..3d2f57f37bc 100644 --- a/hotspot/src/cpu/x86/vm/templateTable_x86.cpp +++ b/hotspot/src/cpu/x86/vm/templateTable_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -2210,7 +2210,6 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) { // Out-of-line code to allocate method data oop. __ bind(profile_method); __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::profile_method)); - __ load_unsigned_byte(rbx, Address(rbcp, 0)); // restore target bytecode __ set_method_data_pointer_for_bcp(); __ jmp(dispatch); } @@ -2225,10 +2224,8 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) { CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), rdx); - __ load_unsigned_byte(rbx, Address(rbcp, 0)); // restore target bytecode // rax: osr nmethod (osr ok) or NULL (osr not possible) - // rbx: target bytecode // rdx: scratch // r14: locals pointer // r13: bcp @@ -2238,12 +2235,13 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) { __ cmpb(Address(rax, nmethod::state_offset()), nmethod::in_use); __ jcc(Assembler::notEqual, dispatch); - // We have the address of an on stack replacement routine in rax - // We need to prepare to execute the OSR method. First we must - // migrate the locals and monitors off of the stack. + // We have the address of an on stack replacement routine in rax. + // In preparation of invoking it, first we must migrate the locals + // and monitors from off the interpreter frame on the stack. + // Ensure to save the osr nmethod over the migration call, + // it will be preserved in rbx. + __ mov(rbx, rax); - LP64_ONLY(__ mov(r13, rax)); // save the nmethod - NOT_LP64(__ mov(rbx, rax)); // save the nmethod NOT_LP64(__ get_thread(rcx)); call_VM(noreg, CAST_FROM_FN_PTR(address, SharedRuntime::OSR_migration_begin)); @@ -2258,7 +2256,6 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) { const Register retaddr = LP64_ONLY(j_rarg2) NOT_LP64(rdi); const Register sender_sp = LP64_ONLY(j_rarg1) NOT_LP64(rdx); - // pop the interpreter frame __ movptr(sender_sp, Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize)); // get sender sp __ leave(); // remove frame anchor @@ -2274,8 +2271,7 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) { __ push(retaddr); // and begin the OSR nmethod - LP64_ONLY(__ jmp(Address(r13, nmethod::osr_entry_point_offset()))); - NOT_LP64(__ jmp(Address(rbx, nmethod::osr_entry_point_offset()))); + __ jmp(Address(rbx, nmethod::osr_entry_point_offset())); } } } diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp index 7bed10749f7..197079ba1c7 100644 --- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp +++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -763,12 +763,11 @@ void VM_Version::get_processor_features() { FLAG_SET_DEFAULT(UseCRC32Intrinsics, false); } - if (supports_sse4_2()) { + if (supports_sse4_2() && supports_clmul()) { if (FLAG_IS_DEFAULT(UseCRC32CIntrinsics)) { UseCRC32CIntrinsics = true; } - } - else if (UseCRC32CIntrinsics) { + } else if (UseCRC32CIntrinsics) { if (!FLAG_IS_DEFAULT(UseCRC32CIntrinsics)) { warning("CRC32C intrinsics are not available on this CPU"); } @@ -850,6 +849,12 @@ void VM_Version::get_processor_features() { #if INCLUDE_RTM_OPT if (UseRTMLocking) { + if (is_client_compilation_mode_vm()) { + // Only C2 does RTM locking optimization. + // Can't continue because UseRTMLocking affects UseBiasedLocking flag + // setting during arguments processing. See use_biased_locking(). + vm_exit_during_initialization("RTM locking optimization is not supported in emulated client VM"); + } if (is_intel_family_core()) { if ((_model == CPU_MODEL_HASWELL_E3) || (_model == CPU_MODEL_HASWELL_E7 && _stepping < 3) || diff --git a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp index 1fcf7d9984b..f7c51092c82 100644 --- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -406,10 +406,12 @@ int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) { // oop_temp where the garbage collector can see it before // we release the handle it might be protected by. if (handler->result_type() == &ffi_type_pointer) { - if (result[0]) - istate->set_oop_temp(*(oop *) result[0]); - else + if (result[0] == 0) { istate->set_oop_temp(NULL); + } else { + jobject handle = reinterpret_cast(result[0]); + istate->set_oop_temp(JNIHandles::resolve(handle)); + } } // Reset handle block diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTStub.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTStub.java index b7ba5e87e72..1eabbdc3a78 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTStub.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTStub.java @@ -25,6 +25,7 @@ package jdk.tools.jaotc; import org.graalvm.compiler.code.CompilationResult; import org.graalvm.compiler.core.target.Backend; +import org.graalvm.compiler.hotspot.HotSpotCompiledCodeBuilder; import org.graalvm.compiler.hotspot.stubs.Stub; import jdk.vm.ci.hotspot.HotSpotCompiledCode; @@ -48,7 +49,7 @@ public class AOTStub implements JavaMethodInfo { } public HotSpotCompiledCode compiledCode(CompilationResult result) { - return stub.getCompiledCode(backend); + return HotSpotCompiledCodeBuilder.createCompiledCode(null, null, result); } } diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CallSiteRelocationSymbol.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CallSiteRelocationSymbol.java index 68f86ef65e3..5fce078a470 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CallSiteRelocationSymbol.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CallSiteRelocationSymbol.java @@ -59,12 +59,6 @@ abstract class CallSiteRelocationSymbol { addExternalPltToGotRelocation(binaryContainer, symbol, relocationOffset); } - protected static void addMetaspaceGotRelocation(BinaryContainer binaryContainer, String symbolName, int symbolOffset, int relocationOffset) { - ByteContainer container = binaryContainer.getMetaspaceGotContainer(); - Symbol symbol = container.createGotSymbol(symbolOffset, symbolName); - addExternalPltToGotRelocation(binaryContainer, symbol, relocationOffset); - } - /** * Add an {@link RelocType#EXTERNAL_GOT_TO_PLT} relocation to the * {@link BinaryContainer#getExtLinkageGOTContainer()}. diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/DataBuilder.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/DataBuilder.java index 350ee46921a..159955c6bda 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/DataBuilder.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/DataBuilder.java @@ -70,8 +70,8 @@ class DataBuilder { */ private void fillVMAddresses(HotSpotVMConfigStore config) { for (VMField vmField : config.getFields().values()) { - if (vmField.value != null) { - final long address = vmField.value; + if (vmField.value != null && vmField.value instanceof Long) { + final long address = (Long) vmField.value; String value = vmField.name; /* * Some fields don't contain addresses but integer values. At least don't add zero diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaCallSiteRelocationSymbol.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaCallSiteRelocationSymbol.java index a14049dd87f..f589610ded8 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaCallSiteRelocationSymbol.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaCallSiteRelocationSymbol.java @@ -37,6 +37,7 @@ import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod; final class JavaCallSiteRelocationSymbol extends CallSiteRelocationSymbol { private static final byte[] zeroSlot = new byte[8]; + // -1 represents Universe::non_oop_word() value private static final byte[] minusOneSlot = {-1, -1, -1, -1, -1, -1, -1, -1}; public JavaCallSiteRelocationSymbol(CompiledMethodInfo mi, Call call, CallSiteRelocationInfo callSiteRelocation, BinaryContainer binaryContainer) { @@ -79,30 +80,39 @@ final class JavaCallSiteRelocationSymbol extends CallSiteRelocationSymbol { } // Add relocation to GOT cell for call resolution jump. + // This GOT cell will be initialized during JVM startup with address + // of JVM runtime call resolution function. String gotSymbolName = "got." + getResolveSymbolName(binaryContainer, mi, call); Symbol gotSymbol = binaryContainer.getGotSymbol(gotSymbolName); addExternalPltToGotRelocation(binaryContainer, gotSymbol, stub.getResolveJumpOffset()); // Add relocation to resolve call jump instruction address for GOT cell. + // This GOT cell will be initialized with address of resolution jump instruction and + // will be updated with call destination address by JVM runtime call resolution code. String pltJmpSymbolName = relocationSymbolName("plt.jmp", mi, call, callSiteRelocation); addCodeContainerRelocation(binaryContainer, pltJmpSymbolName, stub.getResolveJumpStart(), gotStartOffset); // Add relocation to GOT cell for dispatch jump. + // The dispatch jump loads destination address from this GOT cell. String gotEntrySymbolName = relocationSymbolName("got.entry", mi, call, callSiteRelocation); addExtLinkageGotContainerRelocation(binaryContainer, gotEntrySymbolName, gotStartOffset, stub.getDispatchJumpOffset()); - // Virtual call needs initial -1 value. + // Virtual call needs initial -1 value for Klass pointer. + // Non virtual call needs initial 0 value for Method pointer to call c2i adapter. byte[] slot = isVirtualCall ? minusOneSlot : zeroSlot; - final int gotMetaOffset = binaryContainer.appendMetaspaceGotBytes(slot, 0, slot.length); + final int gotMetaOffset = binaryContainer.appendExtLinkageGotBytes(slot, 0, slot.length); // Add relocation to GOT cell for move instruction (Klass* for virtual, Method* otherwise). String gotMoveSymbolName = relocationSymbolName("got.move", mi, call, callSiteRelocation); - addMetaspaceGotRelocation(binaryContainer, gotMoveSymbolName, gotMetaOffset, stub.getMovOffset()); + addExtLinkageGotContainerRelocation(binaryContainer, gotMoveSymbolName, gotMetaOffset, stub.getMovOffset()); if (isVirtualCall) { // Nothing. } else { // Add relocation to GOT cell for c2i adapter jump. + // The c2i jump instruction loads destination address from this GOT cell. + // This GOT cell is initialized with -1 and will be updated + // by JVM runtime call resolution code. String gotC2ISymbolName = relocationSymbolName("got.c2i", mi, call, callSiteRelocation); addExtLinkageGotContainerRelocation(binaryContainer, gotC2ISymbolName, gotStartOffset + 8, stub.getC2IJumpOffset()); } diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java index a98dc8d2d81..933e91acaf4 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java @@ -625,7 +625,9 @@ public class Main implements LogPrinter { private void reportError(Throwable e) { log.println("Error: " + e.getMessage()); - e.printStackTrace(log); + if (options.info) { + e.printStackTrace(log); + } log.flush(); } diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassSearch.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassSearch.java index 3fd63b2c0b8..603da038e80 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassSearch.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassSearch.java @@ -77,7 +77,7 @@ public class ClassSearch { } if (found == null) { - throw new InternalError("Failed to find: " + searchFor.toString()); + throw new InternalError("Failed to find " + searchFor.getType() + " file: " + searchFor.getName()); } return found; } diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/SearchFor.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/SearchFor.java index 49e0cdd9945..cf6a583ae61 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/SearchFor.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/SearchFor.java @@ -27,7 +27,7 @@ public class SearchFor { private final String type; public SearchFor(String name) { - this(name, "unknown"); + this(name, ""); } public SearchFor(String name, String type) { @@ -36,7 +36,7 @@ public class SearchFor { } public boolean isUnknown() { - return "unknown".equals(type); + return "".equals(type); } public String getType() { @@ -49,6 +49,6 @@ public class SearchFor { @Override public String toString() { - return type + ":" + name; + return type + ": " + name; } } diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java index b5bc2804ed4..e46060848fa 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java @@ -31,7 +31,7 @@ import java.nio.file.Path; import java.nio.file.Paths; public class ClassNameSourceProvider implements SourceProvider { - public final static String TYPE = "classname"; + public final static String TYPE = "class"; private final ClassLoader classLoader; public ClassNameSourceProvider(FileSupport fileSupport) { @@ -47,6 +47,10 @@ public class ClassNameSourceProvider implements SourceProvider { @Override public ClassSource findSource(String name, SearchPath searchPath) { + Path path = Paths.get(name); + if (ClassSource.pathIsClassFile(path)) { + name = ClassSource.makeClassName(path); + } try { classLoader.loadClass(name); return new ClassNameSource(name, classLoader); diff --git a/hotspot/src/jdk.aot/share/classes/module-info.java b/hotspot/src/jdk.aot/share/classes/module-info.java index 3105d8b6bef..ced0bf61cfd 100644 --- a/hotspot/src/jdk.aot/share/classes/module-info.java +++ b/hotspot/src/jdk.aot/share/classes/module-info.java @@ -23,8 +23,15 @@ * questions. */ +/** + * Defines the Ahead-of-Time (AOT) compiler, {@index jaotc jaotc tool}, + * for compiling Java classes into AOT library. + * + * @moduleGraph + * @since 9 + */ module jdk.aot { + requires jdk.internal.vm.ci; + requires jdk.internal.vm.compiler; requires jdk.management; - requires jdk.vm.ci; - requires jdk.vm.compiler; } diff --git a/hotspot/src/jdk.aot/unix/native/libjelfshim/jdk_tools_jaotc_jnilibelf_JNILibELFAPI.c b/hotspot/src/jdk.aot/unix/native/libjelfshim/jdk_tools_jaotc_jnilibelf_JNILibELFAPI.c index d6d69cb439a..b64bc2dfdbc 100644 --- a/hotspot/src/jdk.aot/unix/native/libjelfshim/jdk_tools_jaotc_jnilibelf_JNILibELFAPI.c +++ b/hotspot/src/jdk.aot/unix/native/libjelfshim/jdk_tools_jaotc_jnilibelf_JNILibELFAPI.c @@ -70,18 +70,17 @@ JNIEXPORT jint JNICALL Java_jdk_tools_jaotc_jnilibelf_JNILibELFAPI_elf_1version */ static jlong getNativeAddress(JNIEnv* env, jobject ptrObj) { - jclass ptrClass; - jfieldID fidNumber; jlong nativeAddress = -1; - assert (ptrObj != NULL); + assert (ptrObj != NULL); // Get a reference to ptr object's class - ptrClass = (*env)->GetObjectClass(env, ptrObj); - - // Get the Field ID of the instance variables "address" - fidNumber = (*env)->GetFieldID(env, ptrClass, "address", "J"); - if (fidNumber != NULL) { - // Get the long given the Field ID - nativeAddress = (*env)->GetLongField(env, ptrObj, fidNumber); + jclass ptrClass = (*env)->GetObjectClass(env, ptrObj); + if (ptrClass != NULL) { + // Get the Field ID of the instance variables "address" + jfieldID fidNumber = (*env)->GetFieldID(env, ptrClass, "address", "J"); + if (fidNumber != NULL) { + // Get the long given the Field ID + nativeAddress = (*env)->GetLongField(env, ptrObj, fidNumber); + } } // fprintf(stderr, "Native address : %lx\n", nativeAddress); return nativeAddress; @@ -91,10 +90,15 @@ static jlong getNativeAddress(JNIEnv* env, jobject ptrObj) { * Box the nativeAddress as a Pointer object. */ static jobject makePointerObject(JNIEnv* env, jlong nativeAddr) { + jobject retObj = NULL; jclass ptrClass = (*env)->FindClass(env, "jdk/tools/jaotc/jnilibelf/Pointer"); - // Call back constructor to allocate a Pointer object, with an int argument - jmethodID constructorId = (*env)->GetMethodID(env, ptrClass, "", "(J)V"); - jobject retObj = (*env)->NewObject(env, ptrClass, constructorId, nativeAddr); + if (ptrClass != NULL) { + // Call back constructor to allocate a Pointer object, with an int argument + jmethodID constructorId = (*env)->GetMethodID(env, ptrClass, "", "(J)V"); + if (constructorId != NULL) { + retObj = (*env)->NewObject(env, ptrClass, constructorId, nativeAddr); + } + } return retObj; } diff --git a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/elfmacros.h b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/elfmacros.h index 15bf64032f7..2dc0b611c2e 100644 --- a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/elfmacros.h +++ b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/elfmacros.h @@ -33,6 +33,7 @@ #define ELF_NHDR Elf64_Nhdr #define ELF_DYN Elf64_Dyn #define ELF_ADDR Elf64_Addr +#define ELF_AUXV Elf64_auxv_t #define ELF_ST_TYPE ELF64_ST_TYPE @@ -45,6 +46,7 @@ #define ELF_NHDR Elf32_Nhdr #define ELF_DYN Elf32_Dyn #define ELF_ADDR Elf32_Addr +#define ELF_AUXV Elf32_auxv_t #define ELF_ST_TYPE ELF32_ST_TYPE diff --git a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c index c12f82d1bf6..3e3758b0cf6 100644 --- a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c +++ b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -50,7 +50,7 @@ int pathmap_open(const char* name) { } - if (strlen(alt_root) + strlen(name) < PATH_MAX) { + if (strlen(alt_root) + strlen(name) > PATH_MAX) { // Buffer too small. return -1; } diff --git a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c index 6c39d0c43f5..12a6347b366 100644 --- a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c +++ b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c @@ -642,6 +642,18 @@ static bool core_handle_note(struct ps_prochandle* ph, ELF_PHDR* note_phdr) { if (core_handle_prstatus(ph, descdata, notep->n_descsz) != true) { return false; } + } else if (notep->n_type == NT_AUXV) { + // Get first segment from entry point + ELF_AUXV *auxv = (ELF_AUXV *)descdata; + while (auxv->a_type != AT_NULL) { + if (auxv->a_type == AT_ENTRY) { + // Set entry point address to address of dynamic section. + // We will adjust it in read_exec_segments(). + ph->core->dynamic_addr = auxv->a_un.a_val; + break; + } + auxv++; + } } p = descdata + ROUNDUP(notep->n_descsz, 4); } @@ -832,7 +844,13 @@ static bool read_exec_segments(struct ps_prochandle* ph, ELF_EHDR* exec_ehdr) { // from PT_DYNAMIC we want to read address of first link_map addr case PT_DYNAMIC: { - ph->core->dynamic_addr = exec_php->p_vaddr; + if (exec_ehdr->e_type == ET_EXEC) { + ph->core->dynamic_addr = exec_php->p_vaddr; + } else { // ET_DYN + // dynamic_addr has entry point of executable. + // Thus we should substract it. + ph->core->dynamic_addr += exec_php->p_vaddr - exec_ehdr->e_entry; + } print_debug("address of _DYNAMIC is 0x%lx\n", ph->core->dynamic_addr); break; } @@ -1030,8 +1048,9 @@ struct ps_prochandle* Pgrab_core(const char* exec_file, const char* core_file) { goto err; } - if (read_elf_header(ph->core->exec_fd, &exec_ehdr) != true || exec_ehdr.e_type != ET_EXEC) { - print_debug("executable file is not a valid ELF ET_EXEC file\n"); + if (read_elf_header(ph->core->exec_fd, &exec_ehdr) != true || + ((exec_ehdr.e_type != ET_EXEC) && (exec_ehdr.e_type != ET_DYN))) { + print_debug("executable file is not a valid ELF file\n"); goto err; } diff --git a/hotspot/src/jdk.hotspot.agent/share/classes/module-info.java b/hotspot/src/jdk.hotspot.agent/share/classes/module-info.java index dbf9587b307..2c9f4f26da5 100644 --- a/hotspot/src/jdk.hotspot.agent/share/classes/module-info.java +++ b/hotspot/src/jdk.hotspot.agent/share/classes/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -23,6 +23,21 @@ * questions. */ +/** + * Defines the implementation of the HotSpot Serviceability Agent. + * + *

This module includes the {@index jhsdb jhsdb tool} tool to + * attach to a running Java Virtual Machine (JVM) or launch a postmortem + * debugger to analyze the content of a core-dump from a crashed JVM. + * + *

+ *
Tool Guides:
+ *
{@extLink jhsdb_tool_reference jhsdb}
+ *
+ * + * @moduleGraph + * @since 9 + */ module jdk.hotspot.agent { requires java.datatransfer; requires java.desktop; diff --git a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64RegisterMap.java b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64RegisterMap.java index ca06fc413e2..abe5e0c6730 100644 --- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64RegisterMap.java +++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64RegisterMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 20014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java index 5dbf8984158..eb3aad9495a 100644 --- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java +++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -114,6 +114,8 @@ public abstract class AbstractHeapGraphWriter implements HeapGraphWriter { } }); + writeHeapRecordPrologue(); + // write JavaThreads writeJavaThreads(); diff --git a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java index 9da43745388..5d23da01d51 100644 --- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java +++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -45,8 +45,8 @@ import sun.jvm.hotspot.classfile.*; * WARNING: This format is still under development, and is subject to * change without notice. * - * header "JAVA PROFILE 1.0.1" or "JAVA PROFILE 1.0.2" (0-terminated) - * u4 size of identifiers. Identifiers are used to represent + * header "JAVA PROFILE 1.0.2" (0-terminated) + * u4 size of identifiers. Identifiers are used to represent * UTF8 strings, objects, stack traces, etc. They usually * have the same size as host pointers. For example, on * Solaris and Win32, the size is 4. @@ -294,10 +294,9 @@ import sun.jvm.hotspot.classfile.*; * u2 stack trace depth * * - * When the header is "JAVA PROFILE 1.0.2" a heap dump can optionally - * be generated as a sequence of heap dump segments. This sequence is - * terminated by an end record. The additional tags allowed by format - * "JAVA PROFILE 1.0.2" are: + * A heap dump can optionally be generated as a sequence of heap dump + * segments. This sequence is terminated by an end record. The additional + * tags allowed by format "JAVA PROFILE 1.0.2" are: * * HPROF_HEAP_DUMP_SEGMENT denote a heap dump segment * @@ -310,8 +309,6 @@ import sun.jvm.hotspot.classfile.*; public class HeapHprofBinWriter extends AbstractHeapGraphWriter { - // The heap size threshold used to determine if segmented format - // ("JAVA PROFILE 1.0.2") should be used. private static final long HPROF_SEGMENTED_HEAP_DUMP_THRESHOLD = 2L * 0x40000000; // The approximate size of a heap segment. Used to calculate when to create @@ -319,7 +316,6 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter { private static final long HPROF_SEGMENTED_HEAP_DUMP_SEGMENT_SIZE = 1L * 0x40000000; // hprof binary file header - private static final String HPROF_HEADER_1_0_1 = "JAVA PROFILE 1.0.1"; private static final String HPROF_HEADER_1_0_2 = "JAVA PROFILE 1.0.2"; // constants in enum HprofTag @@ -380,6 +376,7 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter { private static final int JVM_SIGNATURE_ARRAY = '['; private static final int JVM_SIGNATURE_CLASS = 'L'; + private static final long MAX_U4_VALUE = 0xFFFFFFFFL; int serialNum = 1; public synchronized void write(String fileName) throws IOException { @@ -469,7 +466,6 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter { // length later - hprof format requires length. out.flush(); currentSegmentStart = fos.getChannel().position(); - // write dummy length of 0 and we'll fix it later. out.writeInt(0); } @@ -479,7 +475,7 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter { protected void writeHeapRecordEpilogue() throws IOException { if (useSegmentedHeapDump) { out.flush(); - if ((fos.getChannel().position() - currentSegmentStart - 4) >= HPROF_SEGMENTED_HEAP_DUMP_SEGMENT_SIZE) { + if ((fos.getChannel().position() - currentSegmentStart - 4L) >= HPROF_SEGMENTED_HEAP_DUMP_SEGMENT_SIZE) { fillInHeapRecordLength(); currentSegmentStart = 0; } @@ -488,14 +484,14 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter { private void fillInHeapRecordLength() throws IOException { - // now get current position to calculate length + // now get the current position to calculate length long dumpEnd = fos.getChannel().position(); - // calculate length of heap data + // calculate the length of heap data long dumpLenLong = (dumpEnd - currentSegmentStart - 4L); // Check length boundary, overflow could happen but is _very_ unlikely - if(dumpLenLong >= (4L * 0x40000000)){ + if (dumpLenLong >= (4L * 0x40000000)) { throw new RuntimeException("Heap segment size overflow."); } @@ -517,6 +513,71 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter { fos.getChannel().position(currentPosition); } + // get the size in bytes for the requested type + private long getSizeForType(int type) throws IOException { + switch (type) { + case TypeArrayKlass.T_BOOLEAN: + return BOOLEAN_SIZE; + case TypeArrayKlass.T_INT: + return INT_SIZE; + case TypeArrayKlass.T_CHAR: + return CHAR_SIZE; + case TypeArrayKlass.T_SHORT: + return SHORT_SIZE; + case TypeArrayKlass.T_BYTE: + return BYTE_SIZE; + case TypeArrayKlass.T_LONG: + return LONG_SIZE; + case TypeArrayKlass.T_FLOAT: + return FLOAT_SIZE; + case TypeArrayKlass.T_DOUBLE: + return DOUBLE_SIZE; + default: + throw new RuntimeException( + "Should not reach here: Unknown type: " + type); + } + } + + private int getArrayHeaderSize(boolean isObjectAarray) { + return isObjectAarray? + ((int) BYTE_SIZE + 2 * (int) INT_SIZE + 2 * (int) OBJ_ID_SIZE): + (2 * (int) BYTE_SIZE + 2 * (int) INT_SIZE + (int) OBJ_ID_SIZE); + } + + // Check if we need to truncate an array + private int calculateArrayMaxLength(long originalArrayLength, + int headerSize, + long typeSize, + String typeName) throws IOException { + + long length = originalArrayLength; + + // now get the current position to calculate length + long dumpEnd = fos.getChannel().position(); + long originalLengthInBytes = originalArrayLength * typeSize; + + // calculate the length of heap data + long currentRecordLength = (dumpEnd - currentSegmentStart - 4L); + if (currentRecordLength > 0 && + (currentRecordLength + headerSize + originalLengthInBytes) > MAX_U4_VALUE) { + fillInHeapRecordLength(); + currentSegmentStart = 0; + writeHeapRecordPrologue(); + currentRecordLength = 0; + } + + // Calculate the max bytes we can use. + long maxBytes = (MAX_U4_VALUE - (headerSize + currentRecordLength)); + + if (originalLengthInBytes > maxBytes) { + length = maxBytes/typeSize; + System.err.println("WARNING: Cannot dump array of type " + typeName + + " with length " + originalArrayLength + + "; truncating to length " + length); + } + return (int) length; + } + private void writeClassDumpRecords() throws IOException { SystemDictionary sysDict = VM.getVM().getSystemDictionary(); ClassLoaderDataGraph cldGraph = VM.getVM().getClassLoaderDataGraph(); @@ -694,12 +755,16 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter { } protected void writeObjectArray(ObjArray array) throws IOException { + int headerSize = getArrayHeaderSize(true); + final int length = calculateArrayMaxLength(array.getLength(), + headerSize, + OBJ_ID_SIZE, + "Object"); out.writeByte((byte) HPROF_GC_OBJ_ARRAY_DUMP); writeObjectID(array); out.writeInt(DUMMY_STACK_TRACE_ID); - out.writeInt((int) array.getLength()); + out.writeInt(length); writeObjectID(array.getKlass().getJavaMirror()); - final int length = (int) array.getLength(); for (int index = 0; index < length; index++) { OopHandle handle = array.getOopHandleAt(index); writeObjectID(getAddressValue(handle)); @@ -707,101 +772,101 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter { } protected void writePrimitiveArray(TypeArray array) throws IOException { + int headerSize = getArrayHeaderSize(false); + TypeArrayKlass tak = (TypeArrayKlass) array.getKlass(); + final int type = (int) tak.getElementType(); + final String typeName = tak.getElementTypeName(); + final long typeSize = getSizeForType(type); + final int length = calculateArrayMaxLength(array.getLength(), + headerSize, + typeSize, + typeName); out.writeByte((byte) HPROF_GC_PRIM_ARRAY_DUMP); writeObjectID(array); out.writeInt(DUMMY_STACK_TRACE_ID); - out.writeInt((int) array.getLength()); - TypeArrayKlass tak = (TypeArrayKlass) array.getKlass(); - final int type = (int) tak.getElementType(); + out.writeInt(length); out.writeByte((byte) type); switch (type) { case TypeArrayKlass.T_BOOLEAN: - writeBooleanArray(array); + writeBooleanArray(array, length); break; case TypeArrayKlass.T_CHAR: - writeCharArray(array); + writeCharArray(array, length); break; case TypeArrayKlass.T_FLOAT: - writeFloatArray(array); + writeFloatArray(array, length); break; case TypeArrayKlass.T_DOUBLE: - writeDoubleArray(array); + writeDoubleArray(array, length); break; case TypeArrayKlass.T_BYTE: - writeByteArray(array); + writeByteArray(array, length); break; case TypeArrayKlass.T_SHORT: - writeShortArray(array); + writeShortArray(array, length); break; case TypeArrayKlass.T_INT: - writeIntArray(array); + writeIntArray(array, length); break; case TypeArrayKlass.T_LONG: - writeLongArray(array); + writeLongArray(array, length); break; default: - throw new RuntimeException("should not reach here"); + throw new RuntimeException( + "Should not reach here: Unknown type: " + type); } } - private void writeBooleanArray(TypeArray array) throws IOException { - final int length = (int) array.getLength(); + private void writeBooleanArray(TypeArray array, int length) throws IOException { for (int index = 0; index < length; index++) { long offset = BOOLEAN_BASE_OFFSET + index * BOOLEAN_SIZE; out.writeBoolean(array.getHandle().getJBooleanAt(offset)); } } - private void writeByteArray(TypeArray array) throws IOException { - final int length = (int) array.getLength(); + private void writeByteArray(TypeArray array, int length) throws IOException { for (int index = 0; index < length; index++) { long offset = BYTE_BASE_OFFSET + index * BYTE_SIZE; out.writeByte(array.getHandle().getJByteAt(offset)); } } - private void writeShortArray(TypeArray array) throws IOException { - final int length = (int) array.getLength(); + private void writeShortArray(TypeArray array, int length) throws IOException { for (int index = 0; index < length; index++) { long offset = SHORT_BASE_OFFSET + index * SHORT_SIZE; out.writeShort(array.getHandle().getJShortAt(offset)); } } - private void writeIntArray(TypeArray array) throws IOException { - final int length = (int) array.getLength(); + private void writeIntArray(TypeArray array, int length) throws IOException { for (int index = 0; index < length; index++) { long offset = INT_BASE_OFFSET + index * INT_SIZE; out.writeInt(array.getHandle().getJIntAt(offset)); } } - private void writeLongArray(TypeArray array) throws IOException { - final int length = (int) array.getLength(); + private void writeLongArray(TypeArray array, int length) throws IOException { for (int index = 0; index < length; index++) { long offset = LONG_BASE_OFFSET + index * LONG_SIZE; out.writeLong(array.getHandle().getJLongAt(offset)); } } - private void writeCharArray(TypeArray array) throws IOException { - final int length = (int) array.getLength(); + private void writeCharArray(TypeArray array, int length) throws IOException { for (int index = 0; index < length; index++) { long offset = CHAR_BASE_OFFSET + index * CHAR_SIZE; out.writeChar(array.getHandle().getJCharAt(offset)); } } - private void writeFloatArray(TypeArray array) throws IOException { - final int length = (int) array.getLength(); + private void writeFloatArray(TypeArray array, int length) throws IOException { for (int index = 0; index < length; index++) { long offset = FLOAT_BASE_OFFSET + index * FLOAT_SIZE; out.writeFloat(array.getHandle().getJFloatAt(offset)); } } - private void writeDoubleArray(TypeArray array) throws IOException { - final int length = (int) array.getLength(); + private void writeDoubleArray(TypeArray array, int length) throws IOException { for (int index = 0; index < length; index++) { long offset = DOUBLE_BASE_OFFSET + index * DOUBLE_SIZE; out.writeDouble(array.getHandle().getJDoubleAt(offset)); @@ -996,12 +1061,7 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter { // writes hprof binary file header private void writeFileHeader() throws IOException { // version string - if(useSegmentedHeapDump) { - out.writeBytes(HPROF_HEADER_1_0_2); - } - else { - out.writeBytes(HPROF_HEADER_1_0_1); - } + out.writeBytes(HPROF_HEADER_1_0_2); out.writeByte((byte)'\0'); // write identifier size. we use pointers as identifiers. diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64Kind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64Kind.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64Kind.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64Kind.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/overview.html b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/overview.html similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/overview.html rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/overview.html diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BailoutException.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BailoutException.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BailoutException.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BailoutException.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodeFrame.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodeFrame.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodeFrame.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodeFrame.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CallingConvention.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CallingConvention.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CallingConvention.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CallingConvention.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeCacheProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeCacheProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeCacheProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeCacheProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeUtil.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeUtil.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeUtil.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeUtil.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequest.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequest.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequest.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequest.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompiledCode.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompiledCode.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompiledCode.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompiledCode.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/DebugInfo.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/DebugInfo.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/DebugInfo.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/DebugInfo.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InvalidInstalledCodeException.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InvalidInstalledCodeException.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InvalidInstalledCodeException.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InvalidInstalledCodeException.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/MemoryBarriers.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/MemoryBarriers.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/MemoryBarriers.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/MemoryBarriers.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ReferenceMap.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ReferenceMap.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ReferenceMap.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ReferenceMap.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Register.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Register.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Register.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Register.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterArray.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterArray.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterArray.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterArray.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterAttributes.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterAttributes.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterAttributes.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterAttributes.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterSaveLayout.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterSaveLayout.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterSaveLayout.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterSaveLayout.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterValue.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterValue.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterValue.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterValue.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackLockValue.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackLockValue.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackLockValue.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackLockValue.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackSlot.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackSlot.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackSlot.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackSlot.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/SuppressFBWarnings.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/SuppressFBWarnings.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/SuppressFBWarnings.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/SuppressFBWarnings.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/TargetDescription.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/TargetDescription.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/TargetDescription.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/TargetDescription.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueKindFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueKindFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueKindFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueKindFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueUtil.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueUtil.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueUtil.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueUtil.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/VirtualObject.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/VirtualObject.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/VirtualObject.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/VirtualObject.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Call.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Call.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Call.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Call.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ConstantReference.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ConstantReference.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ConstantReference.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ConstantReference.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ExceptionHandler.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ExceptionHandler.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ExceptionHandler.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ExceptionHandler.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Infopoint.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Infopoint.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Infopoint.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Infopoint.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/InfopointReason.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/InfopointReason.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/InfopointReason.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/InfopointReason.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Reference.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Reference.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Reference.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Reference.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Site.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Site.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Site.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Site.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrame.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrame.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrame.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrame.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrameVisitor.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrameVisitor.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrameVisitor.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrameVisitor.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/StackIntrospection.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/StackIntrospection.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/StackIntrospection.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/StackIntrospection.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/JVMCIError.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/JVMCIError.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/JVMCIError.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/JVMCIError.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/SuppressFBWarnings.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/SuppressFBWarnings.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/SuppressFBWarnings.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/SuppressFBWarnings.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotRegisterConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotRegisterConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotRegisterConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotRegisterConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotRegisterConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotRegisterConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotRegisterConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotRegisterConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java similarity index 97% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java index e0b5acb426f..450c1dfc4dd 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java @@ -278,8 +278,10 @@ final class CompilerToVM { * {@code info} are: * *
-     *     [(int) flags,   // only valid if field is resolved
-     *      (int) offset]  // only valid if field is resolved
+     *     [ flags,  // fieldDescriptor::access_flags()
+     *       offset, // fieldDescriptor::offset()
+     *       index   // fieldDescriptor::index()
+     *     ]
      * 
* * The behavior of this method is undefined if {@code cpi} does not denote a @@ -288,7 +290,7 @@ final class CompilerToVM { * @param info an array in which the details of the field are returned * @return the type defining the field if resolution is successful, 0 otherwise */ - native HotSpotResolvedObjectTypeImpl resolveFieldInPool(HotSpotConstantPool constantPool, int cpi, HotSpotResolvedJavaMethodImpl method, byte opcode, long[] info); + native HotSpotResolvedObjectTypeImpl resolveFieldInPool(HotSpotConstantPool constantPool, int cpi, HotSpotResolvedJavaMethodImpl method, byte opcode, int[] info); /** * Converts {@code cpci} from an index into the cache for {@code constantPool} to an index @@ -631,4 +633,20 @@ final class CompilerToVM { * {@code lambdaForm} (which must be a {@code java.lang.invoke.LambdaForm} instance). */ native void compileToBytecode(Object lambdaForm); + + /** + * Gets the value of the VM flag named {@code name}. + * + * @param name name of a VM option + * @return {@code this} if the named VM option doesn't exist, a {@link String} or {@code null} + * if its type is {@code ccstr} or {@code ccstrlist}, a {@link Double} if its type is + * {@code double}, a {@link Boolean} if its type is {@code bool} otherwise a + * {@link Long} + */ + native Object getFlagValue(String name); + + /** + * Gets the host class for {@code type}. + */ + native HotSpotResolvedObjectTypeImpl getHostClass(HotSpotResolvedObjectTypeImpl type); } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EmptyEventProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EmptyEventProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EmptyEventProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EmptyEventProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java similarity index 98% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java index 0f46e5e4a07..2aa77349734 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java @@ -24,7 +24,6 @@ package jdk.vm.ci.hotspot; import jdk.vm.ci.hotspot.EmptyEventProvider.EmptyCompilationEvent; import jdk.vm.ci.hotspot.EmptyEventProvider.EmptyCompilerFailureEvent; -import jdk.vm.ci.services.JVMCIPermission; /** * Service-provider class for logging compiler related events. diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCallingConventionType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCallingConventionType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCallingConventionType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCallingConventionType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java similarity index 99% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java index f5489fb18c5..b77ed14ca8e 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java @@ -76,7 +76,7 @@ public class HotSpotCodeCacheProvider implements CodeCacheProvider { HotSpotVMConfigStore store = runtime.getConfigStore(); for (Map.Entry e : store.getFields().entrySet()) { VMField field = e.getValue(); - if (field.isStatic() && field.value != null && field.value == address) { + if (field.isStatic() && field.value != null && field.value instanceof Long && ((Long) field.value) == address) { return e.getValue() + ":0x" + Long.toHexString(address); } } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequest.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequest.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequest.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequest.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequestResult.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequestResult.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequestResult.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequestResult.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompressedNullConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompressedNullConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompressedNullConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompressedNullConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java similarity index 98% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java index 957f66516b9..d88a8468e73 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java @@ -298,7 +298,7 @@ final class HotSpotConstantPool implements ConstantPool, MetaspaceWrapperObject * @param index constant pool index * @return constant pool entry */ - private long getEntryAt(int index) { + long getEntryAt(int index) { assert checkBounds(index); int offset = index * runtime().getHostJVMCIBackend().getTarget().wordSize; return UNSAFE.getAddress(getMetaspaceConstantPool() + config().constantPoolSize + offset); @@ -605,8 +605,6 @@ final class HotSpotConstantPool implements ConstantPool, MetaspaceWrapperObject public JavaField lookupField(int cpi, ResolvedJavaMethod method, int opcode) { final int index = rawIndexToConstantPoolIndex(cpi, opcode); final int nameAndTypeIndex = getNameAndTypeRefIndexAt(index); - final int nameIndex = getNameRefIndexAt(nameAndTypeIndex); - String name = lookupUtf8(nameIndex); final int typeIndex = getSignatureRefIndexAt(nameAndTypeIndex); String typeName = lookupUtf8(typeIndex); JavaType type = runtime().lookupType(typeName, getHolder(), false); @@ -615,7 +613,7 @@ final class HotSpotConstantPool implements ConstantPool, MetaspaceWrapperObject JavaType holder = lookupType(holderIndex, opcode); if (holder instanceof HotSpotResolvedObjectTypeImpl) { - long[] info = new long[2]; + int[] info = new int[3]; HotSpotResolvedObjectTypeImpl resolvedHolder; try { resolvedHolder = compilerToVM().resolveFieldInPool(this, index, (HotSpotResolvedJavaMethodImpl) method, (byte) opcode, info); @@ -624,14 +622,15 @@ final class HotSpotConstantPool implements ConstantPool, MetaspaceWrapperObject * If there was an exception resolving the field we give up and return an unresolved * field. */ - return new HotSpotUnresolvedField(holder, name, type); + return new HotSpotUnresolvedField(holder, lookupUtf8(getNameRefIndexAt(nameAndTypeIndex)), type); } - final int flags = (int) info[0]; - final long offset = info[1]; - HotSpotResolvedJavaField result = resolvedHolder.createField(name, type, offset, flags); + final int flags = info[0]; + final int offset = info[1]; + final int fieldIndex = info[2]; + HotSpotResolvedJavaField result = resolvedHolder.createField(type, offset, flags, fieldIndex); return result; } else { - return new HotSpotUnresolvedField(holder, name, type); + return new HotSpotUnresolvedField(holder, lookupUtf8(getNameRefIndexAt(nameAndTypeIndex)), type); } } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java similarity index 94% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java index e74027f2dd1..1256cf02584 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java @@ -179,11 +179,14 @@ public class HotSpotConstantReflectionProvider implements ConstantReflectionProv if (hotspotField.isStatic()) { HotSpotResolvedJavaType holder = (HotSpotResolvedJavaType) hotspotField.getDeclaringClass(); if (holder.isInitialized()) { - return memoryAccess.readUnsafeConstant(hotspotField.getJavaKind(), HotSpotObjectConstantImpl.forObject(holder.mirror()), hotspotField.offset()); + return memoryAccess.readFieldValue(hotspotField, holder.mirror()); } } else { - if (receiver.isNonNull() && hotspotField.isInObject(((HotSpotObjectConstantImpl) receiver).object())) { - return memoryAccess.readUnsafeConstant(hotspotField.getJavaKind(), receiver, hotspotField.offset()); + if (receiver.isNonNull()) { + Object object = ((HotSpotObjectConstantImpl) receiver).object(); + if (hotspotField.isInObject(object)) { + return memoryAccess.readFieldValue(hotspotField, object); + } } } return null; diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotForeignCallTarget.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotForeignCallTarget.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotForeignCallTarget.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotForeignCallTarget.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIBackendFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIBackendFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIBackendFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java similarity index 83% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java index 366fe5f25a9..3f04f6ec2fe 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java @@ -28,9 +28,9 @@ import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option; import jdk.vm.ci.runtime.JVMCICompiler; import jdk.vm.ci.runtime.JVMCICompilerFactory; import jdk.vm.ci.runtime.JVMCIRuntime; -import jdk.vm.ci.services.JVMCIServiceLocator; import jdk.vm.ci.services.JVMCIPermission; -import jdk.vm.ci.services.Services; +import jdk.vm.ci.services.JVMCIServiceLocator; +import jdk.vm.ci.services.internal.ReflectionAccessJDK; final class HotSpotJVMCICompilerConfig { @@ -47,7 +47,7 @@ final class HotSpotJVMCICompilerConfig { @Override public String getCompilerName() { - return ""; + return "null"; } @Override @@ -73,19 +73,23 @@ final class HotSpotJVMCICompilerConfig { JVMCICompilerFactory factory = null; String compilerName = Option.Compiler.getString(); if (compilerName != null) { - for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) { - if (f.getCompilerName().equals(compilerName)) { - factory = f; + if (compilerName.isEmpty() || compilerName.equals("null")) { + factory = new DummyCompilerFactory(); + } else { + for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) { + if (f.getCompilerName().equals(compilerName)) { + factory = f; + } + } + if (factory == null) { + throw new JVMCIError("JVMCI compiler '%s' not found", compilerName); } - } - if (factory == null) { - throw new JVMCIError("JVMCI compiler '%s' not found", compilerName); } } else { // Auto select a single available compiler for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) { if (factory == null) { - Services.exportJVMCITo(f.getClass()); + ReflectionAccessJDK.openJVMCITo(f.getClass()); factory = f; } else { // Multiple factories seen - cancel auto selection diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java similarity index 88% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java index 529a561eb5e..cf5ef10ccf2 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java @@ -27,8 +27,6 @@ import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import java.util.Arrays; import java.util.Iterator; -import java.util.Map; -import java.util.WeakHashMap; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.ResolvedJavaType; @@ -147,21 +145,34 @@ public class HotSpotJVMCIMetaAccessContext { } } - private final Map, WeakReference> typeMap = new WeakHashMap<>(); + private final ClassValue> resolvedJavaType = new ClassValue>() { + @Override + protected WeakReference computeValue(Class type) { + return new WeakReference<>(createClass(type)); + } + }; /** * Gets the JVMCI mirror for a {@link Class} object. * * @return the {@link ResolvedJavaType} corresponding to {@code javaClass} */ - public synchronized ResolvedJavaType fromClass(Class javaClass) { - WeakReference typeRef = typeMap.get(javaClass); - ResolvedJavaType type = typeRef != null ? typeRef.get() : null; - if (type == null) { - type = createClass(javaClass); - typeMap.put(javaClass, new WeakReference<>(type)); + public ResolvedJavaType fromClass(Class javaClass) { + ResolvedJavaType javaType = null; + while (javaType == null) { + WeakReference type = resolvedJavaType.get(javaClass); + javaType = type.get(); + if (javaType == null) { + /* + * If the referent has become null, clear out the current value + * and let computeValue above create a new value. Reload the + * value in a loop because in theory the WeakReference referent + * can be reclaimed at any point. + */ + resolvedJavaType.remove(javaClass); + } } - return type; + return javaType; } /** diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java similarity index 96% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java index f6c97ecb07f..ab7dba465cc 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java @@ -32,6 +32,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.ServiceLoader; import java.util.TreeMap; import jdk.internal.misc.VM; @@ -50,7 +51,6 @@ import jdk.vm.ci.runtime.JVMCIBackend; import jdk.vm.ci.runtime.JVMCICompiler; import jdk.vm.ci.runtime.JVMCICompilerFactory; import jdk.vm.ci.services.JVMCIServiceLocator; -import jdk.vm.ci.services.Services; /** * HotSpot implementation of a JVMCI runtime. @@ -88,7 +88,10 @@ public final class HotSpotJVMCIRuntime implements HotSpotJVMCIRuntimeProvider { */ public enum Option { // @formatter:off - Compiler(String.class, null, "Selects the system compiler."), + Compiler(String.class, null, "Selects the system compiler. This must match the getCompilerName() value returned " + + "by a jdk.vm.ci.runtime.JVMCICompilerFactory provider. " + + "An empty string or the value \"null\" selects a compiler " + + "that will raise an exception upon receiving a compilation request."), // Note: The following one is not used (see InitTimer.ENABLED). It is added here // so that -XX:+JVMCIPrintProperties shows the option. InitTimer(Boolean.class, false, "Specifies if initialization timing is enabled."), @@ -208,7 +211,7 @@ public final class HotSpotJVMCIRuntime implements HotSpotJVMCIRuntimeProvider { } public static HotSpotJVMCIBackendFactory findFactory(String architecture) { - for (HotSpotJVMCIBackendFactory factory : Services.load(HotSpotJVMCIBackendFactory.class)) { + for (HotSpotJVMCIBackendFactory factory : ServiceLoader.load(HotSpotJVMCIBackendFactory.class, ClassLoader.getSystemClassLoader())) { if (factory.getArchitecture().equalsIgnoreCase(architecture)) { return factory; } @@ -497,7 +500,7 @@ public final class HotSpotJVMCIRuntime implements HotSpotJVMCIRuntimeProvider { if (!field.isStatic()) { printConfigLine(vm, "[vmconfig:instance field] %s %s {offset=%d[0x%x]}%n", field.type, field.name, field.offset, field.offset); } else { - String value = field.value == null ? "null" : String.format("%d[0x%x]", field.value, field.value); + String value = field.value == null ? "null" : field.value instanceof Boolean ? field.value.toString() : String.format("%d[0x%x]", field.value, field.value); printConfigLine(vm, "[vmconfig:static field] %s %s = %s {address=0x%x}%n", field.type, field.name, value, field.address); } } @@ -513,10 +516,6 @@ public final class HotSpotJVMCIRuntime implements HotSpotJVMCIRuntimeProvider { for (Map.Entry e : constants.entrySet()) { printConfigLine(vm, "[vmconfig:constant] %s = %d[0x%x]%n", e.getKey(), e.getValue(), e.getValue()); } - TreeMap typeSizes = new TreeMap<>(store.getTypeSizes()); - for (Map.Entry e : typeSizes.entrySet()) { - printConfigLine(vm, "[vmconfig:type size] %s = %d%n", e.getKey(), e.getValue()); - } for (VMIntrinsicMethod e : store.getIntrinsics()) { printConfigLine(vm, "[vmconfig:intrinsic] %d = %s.%s %s%n", e.id, e.declaringClass, e.name, e.descriptor); } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJavaType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJavaType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJavaType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJavaType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java similarity index 89% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java index a4d68b56f19..15250e2c7d1 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java @@ -31,6 +31,10 @@ import jdk.vm.ci.meta.MemoryAccessProvider; */ public interface HotSpotMemoryAccessProvider extends MemoryAccessProvider { + /** + * @throws IllegalArgumentException if the address computed from {@code base} and + * {@code displacement} does not denote a location holding a narrow oop + */ JavaConstant readNarrowOopConstant(Constant base, long displacement); Constant readKlassPointerConstant(Constant base, long displacement); diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java similarity index 55% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java index be8e3a32067..e3ad9c834c2 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java @@ -22,13 +22,21 @@ */ package jdk.vm.ci.hotspot; +import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset; +import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayIndexScale; import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE; +import java.lang.reflect.Array; + +import jdk.vm.ci.common.JVMCIError; import jdk.vm.ci.meta.Constant; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.MemoryAccessProvider; +import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.PrimitiveConstant; +import jdk.vm.ci.meta.ResolvedJavaField; +import jdk.vm.ci.meta.ResolvedJavaType; /** * HotSpot implementation of {@link MemoryAccessProvider}. @@ -41,12 +49,93 @@ class HotSpotMemoryAccessProviderImpl implements HotSpotMemoryAccessProvider { this.runtime = runtime; } - private static Object asObject(Constant base) { + /** + * Gets the object boxed by {@code base} that is about to have a value of kind {@code kind} read + * from it at the offset {@code displacement}. + * + * @param base constant value containing the base address for a pending read + * @return {@code null} if {@code base} does not box an object otherwise the object boxed in + * {@code base} + */ + private Object asObject(Constant base, JavaKind kind, long displacement) { if (base instanceof HotSpotObjectConstantImpl) { - return ((HotSpotObjectConstantImpl) base).object(); - } else { - return null; + HotSpotObjectConstantImpl constant = (HotSpotObjectConstantImpl) base; + HotSpotResolvedObjectType type = constant.getType(); + Object object = constant.object(); + checkRead(kind, displacement, type, object); + return object; } + return null; + } + + /** + * Offset of injected {@code java.lang.Class::oop_size} field. No need to make {@code volatile} + * as initialization is idempotent. + */ + private long oopSizeOffset; + + private static int computeOopSizeOffset(HotSpotJVMCIRuntimeProvider runtime) { + MetaAccessProvider metaAccess = runtime.getHostJVMCIBackend().getMetaAccess(); + ResolvedJavaType staticType = metaAccess.lookupJavaType(Class.class); + for (ResolvedJavaField f : staticType.getInstanceFields(false)) { + if (f.getName().equals("oop_size")) { + int offset = ((HotSpotResolvedJavaField) f).offset(); + assert offset != 0 : "not expecting offset of java.lang.Class::oop_size to be 0"; + return offset; + } + } + throw new JVMCIError("Could not find injected java.lang.Class::oop_size field"); + } + + private boolean checkRead(JavaKind kind, long displacement, HotSpotResolvedObjectType type, Object object) { + if (type.isArray()) { + ResolvedJavaType componentType = type.getComponentType(); + JavaKind componentKind = componentType.getJavaKind(); + final int headerSize = getArrayBaseOffset(componentKind); + int sizeOfElement = getArrayIndexScale(componentKind); + int length = Array.getLength(object); + long arrayEnd = headerSize + (sizeOfElement * length); + boolean aligned = ((displacement - headerSize) % sizeOfElement) == 0; + if (displacement < 0 || displacement > (arrayEnd - sizeOfElement) || (kind == JavaKind.Object && !aligned)) { + int index = (int) ((displacement - headerSize) / sizeOfElement); + throw new IllegalArgumentException("Unsafe array access: reading element of kind " + kind + + " at offset " + displacement + " (index ~ " + index + ") in " + + type.toJavaName() + " object of length " + length); + } + } else if (kind != JavaKind.Object) { + long size; + if (object instanceof Class) { + if (oopSizeOffset == 0) { + oopSizeOffset = computeOopSizeOffset(runtime); + } + int wordSize = runtime.getHostJVMCIBackend().getCodeCache().getTarget().wordSize; + size = UNSAFE.getInt(object, oopSizeOffset) * wordSize; + } else { + size = Math.abs(type.instanceSize()); + } + int bytesToRead = kind.getByteCount(); + if (displacement + bytesToRead > size || displacement < 0) { + throw new IllegalArgumentException("Unsafe access: reading " + bytesToRead + " bytes at offset " + displacement + " in " + + type.toJavaName() + " object of size " + size); + } + } else { + ResolvedJavaField field = type.findInstanceFieldWithOffset(displacement, JavaKind.Object); + if (field == null && object instanceof Class) { + // Read of a static field + MetaAccessProvider metaAccess = runtime.getHostJVMCIBackend().getMetaAccess(); + HotSpotResolvedObjectTypeImpl staticFieldsHolder = (HotSpotResolvedObjectTypeImpl) metaAccess.lookupJavaType((Class) object); + field = staticFieldsHolder.findStaticFieldWithOffset(displacement, JavaKind.Object); + } + if (field == null) { + throw new IllegalArgumentException("Unsafe object access: field not found for read of kind Object" + + " at offset " + displacement + " in " + type.toJavaName() + " object"); + } + if (field.getJavaKind() != JavaKind.Object) { + throw new IllegalArgumentException("Unsafe object access: field " + field.format("%H.%n:%T") + " not of expected kind Object" + + " at offset " + displacement + " in " + type.toJavaName() + " object"); + } + } + return true; } private boolean isValidObjectFieldDisplacement(Constant base, long displacement) { @@ -77,8 +166,8 @@ class HotSpotMemoryAccessProviderImpl implements HotSpotMemoryAccessProvider { throw new IllegalArgumentException(String.valueOf(base)); } - private static long readRawValue(Constant baseConstant, long displacement, int bits) { - Object base = asObject(baseConstant); + private long readRawValue(Constant baseConstant, long displacement, JavaKind kind, int bits) { + Object base = asObject(baseConstant, kind, displacement); if (base != null) { switch (bits) { case Byte.SIZE: @@ -123,9 +212,8 @@ class HotSpotMemoryAccessProviderImpl implements HotSpotMemoryAccessProvider { private Object readRawObject(Constant baseConstant, long initialDisplacement, boolean compressed) { long displacement = initialDisplacement; - Object ret; - Object base = asObject(baseConstant); + Object base = asObject(baseConstant, JavaKind.Object, displacement); if (base == null) { assert !compressed; displacement += asRawPointer(baseConstant); @@ -138,34 +226,43 @@ class HotSpotMemoryAccessProviderImpl implements HotSpotMemoryAccessProvider { return ret; } - /** - * Reads a value of this kind using a base address and a displacement. No bounds checking or - * type checking is performed. Returns {@code null} if the value is not available at this point. - * - * @param baseConstant the base address from which the value is read. - * @param displacement the displacement within the object in bytes - * @return the read value encapsulated in a {@link JavaConstant} object, or {@code null} if the - * value cannot be read. - * @throws IllegalArgumentException if {@code kind} is {@code null}, {@link JavaKind#Void}, not - * {@link JavaKind#Object} or not {@linkplain JavaKind#isPrimitive() primitive} kind - */ - JavaConstant readUnsafeConstant(JavaKind kind, JavaConstant baseConstant, long displacement) { - if (kind == null) { - throw new IllegalArgumentException("null JavaKind"); - } - if (kind == JavaKind.Object) { - Object o = readRawObject(baseConstant, displacement, runtime.getConfig().useCompressedOops); + JavaConstant readFieldValue(HotSpotResolvedJavaField field, Object obj) { + assert obj != null; + assert !field.isStatic() || obj instanceof Class; + long displacement = field.offset(); + assert checkRead(field.getJavaKind(), displacement, (HotSpotResolvedObjectType) runtime.getHostJVMCIBackend().getMetaAccess().lookupJavaType(obj.getClass()), obj); + if (field.getJavaKind() == JavaKind.Object) { + Object o = UNSAFE.getObject(obj, displacement); return HotSpotObjectConstantImpl.forObject(o); } else { - int bits = kind.getByteCount() * Byte.SIZE; - return readPrimitiveConstant(kind, baseConstant, displacement, bits); + JavaKind kind = field.getJavaKind(); + switch (kind) { + case Boolean: + return JavaConstant.forBoolean(UNSAFE.getBoolean(obj, displacement)); + case Byte: + return JavaConstant.forByte(UNSAFE.getByte(obj, displacement)); + case Char: + return JavaConstant.forChar(UNSAFE.getChar(obj, displacement)); + case Short: + return JavaConstant.forShort(UNSAFE.getShort(obj, displacement)); + case Int: + return JavaConstant.forInt(UNSAFE.getInt(obj, displacement)); + case Long: + return JavaConstant.forLong(UNSAFE.getLong(obj, displacement)); + case Float: + return JavaConstant.forFloat(UNSAFE.getFloat(obj, displacement)); + case Double: + return JavaConstant.forDouble(UNSAFE.getDouble(obj, displacement)); + default: + throw new IllegalArgumentException("Unsupported kind: " + kind); + } } } @Override public JavaConstant readPrimitiveConstant(JavaKind kind, Constant baseConstant, long initialDisplacement, int bits) { try { - long rawValue = readRawValue(baseConstant, initialDisplacement, bits); + long rawValue = readRawValue(baseConstant, initialDisplacement, kind, bits); switch (kind) { case Boolean: return JavaConstant.forBoolean(rawValue != 0); @@ -193,6 +290,10 @@ class HotSpotMemoryAccessProviderImpl implements HotSpotMemoryAccessProvider { @Override public JavaConstant readObjectConstant(Constant base, long displacement) { + if (base instanceof HotSpotObjectConstantImpl) { + Object o = readRawObject(base, displacement, runtime.getConfig().useCompressedOops); + return HotSpotObjectConstantImpl.forObject(o); + } if (!isValidObjectFieldDisplacement(base, displacement)) { return null; } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java similarity index 94% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java index da04107bc1a..aca3b3ddb4d 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java @@ -59,23 +59,12 @@ abstract class HotSpotMethod implements JavaMethod, Formattable { return res; } - protected String name; - /** * Controls whether {@link #toString()} includes the qualified or simple name of the class in * which the method is declared. */ public static final boolean FULLY_QUALIFIED_METHOD_NAME = false; - protected HotSpotMethod(String name) { - this.name = name; - } - - @Override - public final String getName() { - return name; - } - @Override public final String toString() { char h = FULLY_QUALIFIED_METHOD_NAME ? 'H' : 'h'; diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodHandleAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodHandleAccessProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodHandleAccessProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodHandleAccessProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java similarity index 94% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java index e68c7fef8c1..7eb437929c3 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java @@ -31,15 +31,21 @@ import jdk.vm.ci.meta.Signature; */ final class HotSpotMethodUnresolved extends HotSpotMethod { + private final String name; private final Signature signature; protected JavaType holder; HotSpotMethodUnresolved(String name, Signature signature, JavaType holder) { - super(name); + this.name = name; this.holder = holder; this.signature = signature; } + @Override + public String getName() { + return name; + } + @Override public Signature getSignature() { return signature; diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotModifiers.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotModifiers.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotModifiers.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotModifiers.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotNmethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotNmethod.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotNmethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotNmethod.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstantImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstantImpl.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstantImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstantImpl.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaField.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaField.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaField.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaField.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java similarity index 91% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java index 24287261984..737135a8e52 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java @@ -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 @@ -38,19 +38,20 @@ import jdk.vm.ci.meta.ResolvedJavaType; class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField { private final HotSpotResolvedObjectTypeImpl holder; - private final String name; private JavaType type; private final int offset; + private final short index; /** * This value contains all flags as stored in the VM including internal ones. */ private final int modifiers; - HotSpotResolvedJavaFieldImpl(HotSpotResolvedObjectTypeImpl holder, String name, JavaType type, long offset, int modifiers) { + HotSpotResolvedJavaFieldImpl(HotSpotResolvedObjectTypeImpl holder, JavaType type, long offset, int modifiers, int index) { this.holder = holder; - this.name = name; this.type = type; + this.index = (short) index; + assert this.index == index; assert offset != -1; assert offset == (int) offset : "offset larger than int"; this.offset = (int) offset; @@ -67,7 +68,6 @@ class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField { if (that.offset != this.offset || that.isStatic() != this.isStatic()) { return false; } else if (this.holder.equals(that.holder)) { - assert this.name.equals(that.name) && this.type.equals(that.type); return true; } } @@ -76,7 +76,7 @@ class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField { @Override public int hashCode() { - return name.hashCode(); + return offset ^ modifiers; } @Override @@ -109,7 +109,7 @@ class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField { @Override public String getName() { - return name; + return holder.createFieldInfo(index).getName(); } @Override @@ -178,18 +178,12 @@ class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField { return null; } - private Field toJavaCache; - private Field toJava() { - if (toJavaCache != null) { - return toJavaCache; - } - if (isInternal()) { return null; } try { - return toJavaCache = holder.mirror().getDeclaredField(name); + return holder.mirror().getDeclaredField(getName()); } catch (NoSuchFieldException | NoClassDefFoundError e) { return null; } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java similarity index 95% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java index 393b740a71e..f831db4c5f9 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java @@ -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 @@ -75,6 +75,12 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp private byte[] code; private Executable toJavaCache; + /** + * Only 30% of {@link HotSpotResolvedJavaMethodImpl}s have their name accessed so compute it + * lazily and cache it. + */ + private String nameCache; + /** * Gets the holder of a HotSpot metaspace method native object. * @@ -106,8 +112,6 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp } HotSpotResolvedJavaMethodImpl(HotSpotResolvedObjectTypeImpl holder, long metaspaceMethod) { - // It would be too much work to get the method name here so we fill it in later. - super(null); this.metaspaceMethod = metaspaceMethod; this.holder = holder; @@ -126,9 +130,6 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp this.constantPool = compilerToVM().getConstantPool(this); } - final int nameIndex = UNSAFE.getChar(constMethod + config.constMethodNameIndexOffset); - this.name = constantPool.lookupUtf8(nameIndex); - final int signatureIndex = UNSAFE.getChar(constMethod + config.constMethodSignatureIndexOffset); this.signature = (HotSpotSignature) constantPool.lookupSignature(signatureIndex); } @@ -146,6 +147,15 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp return UNSAFE.getAddress(metaspaceMethod + config().methodConstMethodOffset); } + @Override + public String getName() { + if (nameCache == null) { + final int nameIndex = UNSAFE.getChar(getConstMethod() + config().constMethodNameIndexOffset); + nameCache = constantPool.lookupUtf8(nameIndex); + } + return nameCache; + } + @Override public boolean equals(Object obj) { if (this == obj) { @@ -326,12 +336,24 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp @Override public boolean isClassInitializer() { - return "".equals(name) && isStatic(); + if (isStatic()) { + final int nameIndex = UNSAFE.getChar(getConstMethod() + config().constMethodNameIndexOffset); + long nameSymbol = constantPool.getEntryAt(nameIndex); + long clinitSymbol = config().symbolClinit; + return nameSymbol == clinitSymbol; + } + return false; } @Override public boolean isConstructor() { - return "".equals(name) && !isStatic(); + if (!isStatic()) { + final int nameIndex = UNSAFE.getChar(getConstMethod() + config().constMethodNameIndexOffset); + long nameSymbol = constantPool.getEntryAt(nameIndex); + long initSymbol = config().symbolInit; + return nameSymbol == initSymbol; + } + return false; } @Override @@ -472,7 +494,7 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp @Override public Annotation[][] getParameterAnnotations() { Executable javaMethod = toJava(); - return javaMethod == null ? null : javaMethod.getParameterAnnotations(); + return javaMethod == null ? new Annotation[signature.getParameterCount(false)][0] : javaMethod.getParameterAnnotations(); } @Override @@ -513,9 +535,6 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp } public boolean isDefault() { - if (isConstructor()) { - return false; - } // Copied from java.lang.Method.isDefault() int mask = Modifier.ABSTRACT | Modifier.PUBLIC | Modifier.STATIC; return ((getModifiers() & mask) == Modifier.PUBLIC) && getDeclaringClass().isInterface(); @@ -562,7 +581,7 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp } else { // Do not use Method.getDeclaredMethod() as it can return a bridge method // when this.isBridge() is false and vice versa. - result = searchMethods(holder.mirror().getDeclaredMethods(), name, returnType, parameterTypes); + result = searchMethods(holder.mirror().getDeclaredMethods(), getName(), returnType, parameterTypes); } toJavaCache = result; return result; diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java similarity index 84% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java index a0a3bc7a7a5..3b424770ca1 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java @@ -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 @@ -36,8 +36,6 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import jdk.vm.ci.common.JVMCIError; @@ -59,12 +57,15 @@ import jdk.vm.ci.meta.ResolvedJavaType; */ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implements HotSpotResolvedObjectType, MetaspaceWrapperObject { + private static final HotSpotResolvedJavaField[] NO_FIELDS = new HotSpotResolvedJavaField[0]; + private static final int METHOD_CACHE_ARRAY_CAPACITY = 8; + /** * The Java class this type represents. */ private final Class javaClass; - private HashMap fieldCache; - private HashMap methodCache; + private HotSpotResolvedJavaMethodImpl[] methodCacheArray; + private HashMap methodCacheHashMap; private HotSpotResolvedJavaField[] instanceFields; private HotSpotResolvedObjectTypeImpl[] interfaces; private HotSpotConstantPool constantPool; @@ -255,7 +256,7 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem * @return true if the type is a leaf class */ private boolean isLeafClass() { - return getSubklass() == null; + return UNSAFE.getLong(this.getMetaspaceKlass() + config().subklassOffset) == 0; } /** @@ -410,6 +411,14 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem return false; } + @Override + public ResolvedJavaType getHostClass() { + if (isArray()) { + return null; + } + return compilerToVM().getHostClass(this); + } + @Override public boolean isJavaLangObject() { return javaClass.equals(Object.class); @@ -484,18 +493,38 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem } synchronized HotSpotResolvedJavaMethod createMethod(long metaspaceMethod) { - HotSpotResolvedJavaMethodImpl method = null; - if (methodCache == null) { - methodCache = new HashMap<>(8); + // Maintain cache as array. + if (methodCacheArray == null) { + methodCacheArray = new HotSpotResolvedJavaMethodImpl[METHOD_CACHE_ARRAY_CAPACITY]; + } + + int i = 0; + for (; i < methodCacheArray.length; ++i) { + HotSpotResolvedJavaMethodImpl curMethod = methodCacheArray[i]; + if (curMethod == null) { + HotSpotResolvedJavaMethodImpl newMethod = new HotSpotResolvedJavaMethodImpl(this, metaspaceMethod); + methodCacheArray[i] = newMethod; + context.add(newMethod); + return newMethod; + } else if (curMethod.getMetaspacePointer() == metaspaceMethod) { + return curMethod; + } + } + + // Fall-back to hash table. + if (methodCacheHashMap == null) { + methodCacheHashMap = new HashMap<>(); + } + + HotSpotResolvedJavaMethodImpl lookupResult = methodCacheHashMap.get(metaspaceMethod); + if (lookupResult == null) { + HotSpotResolvedJavaMethodImpl newMethod = new HotSpotResolvedJavaMethodImpl(this, metaspaceMethod); + methodCacheHashMap.put(metaspaceMethod, newMethod); + context.add(lookupResult); + return newMethod; } else { - method = methodCache.get(metaspaceMethod); + return lookupResult; } - if (method == null) { - method = new HotSpotResolvedJavaMethodImpl(this, metaspaceMethod); - methodCache.put(metaspaceMethod, method); - context.add(method); - } - return method; } public int getVtableLength() { @@ -509,37 +538,8 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem return result; } - synchronized HotSpotResolvedJavaField createField(String fieldName, JavaType type, long offset, int rawFlags) { - HotSpotResolvedJavaField result = null; - - final int flags = rawFlags & HotSpotModifiers.jvmFieldModifiers(); - - final long id = offset + ((long) flags << 32); - - // Must cache the fields, because the local load elimination only works if the - // objects from two field lookups are identical. - if (fieldCache == null) { - fieldCache = new HashMap<>(8); - } else { - result = fieldCache.get(id); - } - - if (result == null) { - result = new HotSpotResolvedJavaFieldImpl(this, fieldName, type, offset, rawFlags); - fieldCache.put(id, result); - } else { - assert result.getName().equals(fieldName); - /* - * Comparing the types directly is too strict, because the type in the cache could be - * resolved while the incoming type is unresolved. The name comparison is sufficient - * because the type will always be resolved in the context of the holder. - */ - assert result.getType().getName().equals(type.getName()); - assert result.offset() == offset; - assert result.getModifiers() == flags; - } - - return result; + synchronized HotSpotResolvedJavaField createField(JavaType type, long offset, int rawFlags, int index) { + return new HotSpotResolvedJavaFieldImpl(this, type, offset, rawFlags, index); } @Override @@ -577,11 +577,15 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem return null; } + FieldInfo createFieldInfo(int index) { + return new FieldInfo(index); + } + /** * This class represents the field information for one field contained in the fields array of an * {@code InstanceKlass}. The implementation is similar to the native {@code FieldInfo} class. */ - private class FieldInfo { + class FieldInfo { /** * Native pointer into the array of Java shorts. */ @@ -666,61 +670,31 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem } } - @SuppressFBWarnings(value = "SE_COMPARATOR_SHOULD_BE_SERIALIZABLE", justification = "comparator is only used transiently") - private static class OffsetComparator implements java.util.Comparator { - @Override - public int compare(HotSpotResolvedJavaField o1, HotSpotResolvedJavaField o2) { - return o1.offset() - o2.offset(); - } - } - @Override public ResolvedJavaField[] getInstanceFields(boolean includeSuperclasses) { if (instanceFields == null) { if (isArray() || isInterface()) { - instanceFields = new HotSpotResolvedJavaField[0]; + instanceFields = NO_FIELDS; } else { - final int fieldCount = getFieldCount(); - ArrayList fieldsArray = new ArrayList<>(fieldCount); - - for (int i = 0; i < fieldCount; i++) { - FieldInfo field = new FieldInfo(i); - - // We are only interested in instance fields. - if (!field.isStatic()) { - HotSpotResolvedJavaField resolvedJavaField = createField(field.getName(), field.getType(), field.getOffset(), field.getAccessFlags()); - fieldsArray.add(resolvedJavaField); - } + HotSpotResolvedJavaField[] prepend = NO_FIELDS; + if (getSuperclass() != null) { + prepend = (HotSpotResolvedJavaField[]) getSuperclass().getInstanceFields(true); } - - fieldsArray.sort(new OffsetComparator()); - - HotSpotResolvedJavaField[] myFields = fieldsArray.toArray(new HotSpotResolvedJavaField[0]); - - if (mirror() != Object.class) { - HotSpotResolvedJavaField[] superFields = (HotSpotResolvedJavaField[]) getSuperclass().getInstanceFields(true); - HotSpotResolvedJavaField[] fields = Arrays.copyOf(superFields, superFields.length + myFields.length); - System.arraycopy(myFields, 0, fields, superFields.length, myFields.length); - instanceFields = fields; - } else { - assert myFields.length == 0 : "java.lang.Object has fields!"; - instanceFields = myFields; - } - + instanceFields = getFields(false, prepend); } } - if (!includeSuperclasses) { - int myFieldsStart = 0; - while (myFieldsStart < instanceFields.length && !instanceFields[myFieldsStart].getDeclaringClass().equals(this)) { - myFieldsStart++; + if (!includeSuperclasses && getSuperclass() != null) { + int superClassFieldCount = getSuperclass().getInstanceFields(true).length; + if (superClassFieldCount == instanceFields.length) { + // This class does not have any instance fields of its own. + return NO_FIELDS; + } else if (superClassFieldCount != 0) { + HotSpotResolvedJavaField[] result = new HotSpotResolvedJavaField[instanceFields.length - superClassFieldCount]; + System.arraycopy(instanceFields, superClassFieldCount, result, 0, result.length); + return result; + } else { + // The super classes of this class do not have any instance fields. } - if (myFieldsStart == 0) { - return instanceFields; - } - if (myFieldsStart == instanceFields.length) { - return new HotSpotResolvedJavaField[0]; - } - return Arrays.copyOfRange(instanceFields, myFieldsStart, instanceFields.length); } return instanceFields; } @@ -730,45 +704,63 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem if (isArray()) { return new HotSpotResolvedJavaField[0]; } else { - final int fieldCount = getFieldCount(); - ArrayList fieldsArray = new ArrayList<>(fieldCount); - - for (int i = 0; i < fieldCount; i++) { - FieldInfo field = new FieldInfo(i); - - // We are only interested in static fields. - if (field.isStatic()) { - HotSpotResolvedJavaField resolvedJavaField = createField(field.getName(), field.getType(), field.getOffset(), field.getAccessFlags()); - fieldsArray.add(resolvedJavaField); - } - } - - fieldsArray.sort(new OffsetComparator()); - return fieldsArray.toArray(new HotSpotResolvedJavaField[fieldsArray.size()]); + return getFields(true, NO_FIELDS); } } /** - * Returns the actual field count of this class's internal {@code InstanceKlass::_fields} array - * by walking the array and discounting the generic signature slots at the end of the array. + * Gets the instance or static fields of this class. * - *

- * See {@code FieldStreamBase::init_generic_signature_start_slot} + * @param retrieveStaticFields specifies whether to return instance or static fields + * @param prepend an array to be prepended to the returned result */ - private int getFieldCount() { + private HotSpotResolvedJavaField[] getFields(boolean retrieveStaticFields, HotSpotResolvedJavaField[] prepend) { HotSpotVMConfig config = config(); final long metaspaceFields = UNSAFE.getAddress(getMetaspaceKlass() + config.instanceKlassFieldsOffset); int metaspaceFieldsLength = UNSAFE.getInt(metaspaceFields + config.arrayU1LengthOffset); - int fieldCount = 0; - - for (int i = 0, index = 0; i < metaspaceFieldsLength; i += config.fieldInfoFieldSlots, index++) { + int resultCount = 0; + int index = 0; + for (int i = 0; i < metaspaceFieldsLength; i += config.fieldInfoFieldSlots, index++) { FieldInfo field = new FieldInfo(index); if (field.hasGenericSignature()) { metaspaceFieldsLength--; } - fieldCount++; + + if (field.isStatic() == retrieveStaticFields) { + resultCount++; + } } - return fieldCount; + + if (resultCount == 0) { + return prepend; + } + + int prependLength = prepend.length; + resultCount += prependLength; + + HotSpotResolvedJavaField[] result = new HotSpotResolvedJavaField[resultCount]; + if (prependLength != 0) { + System.arraycopy(prepend, 0, result, 0, prependLength); + } + + int resultIndex = prependLength; + for (int i = 0; i < index; ++i) { + FieldInfo field = new FieldInfo(i); + if (field.isStatic() == retrieveStaticFields) { + int offset = field.getOffset(); + HotSpotResolvedJavaField resolvedJavaField = createField(field.getType(), offset, field.getAccessFlags(), i); + + // Make sure the result is sorted by offset. + int j; + for (j = resultIndex - 1; j >= prependLength && result[j].offset() > offset; j--) { + result[j + 1] = result[j]; + } + result[j + 1] = resolvedJavaField; + resultIndex++; + } + } + + return result; } @Override @@ -817,8 +809,7 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem } if (elementType.getName().startsWith("Ljava/")) { // Classes in a java.* package can only be defined by the - // boot class loader. This is enforced by ClassLoader.preDefineClass() - assert mirror().getClassLoader() == null; + // boot or platform class loader. return true; } ClassLoader thisCl = mirror().getClassLoader(); @@ -863,6 +854,15 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem @Override public ResolvedJavaField findInstanceFieldWithOffset(long offset, JavaKind expectedEntryKind) { ResolvedJavaField[] declaredFields = getInstanceFields(true); + return findFieldWithOffset(offset, expectedEntryKind, declaredFields); + } + + public ResolvedJavaField findStaticFieldWithOffset(long offset, JavaKind expectedEntryKind) { + ResolvedJavaField[] declaredFields = getStaticFields(); + return findFieldWithOffset(offset, expectedEntryKind, declaredFields); + } + + private static ResolvedJavaField findFieldWithOffset(long offset, JavaKind expectedEntryKind, ResolvedJavaField[] declaredFields) { for (ResolvedJavaField field : declaredFields) { HotSpotResolvedJavaField resolvedField = (HotSpotResolvedJavaField) field; long resolvedFieldOffset = resolvedField.offset(); diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java similarity index 98% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java index 9c32e8d0894..784c9aa184e 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java @@ -153,6 +153,11 @@ public final class HotSpotResolvedPrimitiveType extends HotSpotResolvedJavaType return other.equals(this); } + @Override + public ResolvedJavaType getHostClass() { + return null; + } + @Override public JavaKind getJavaKind() { return kind; diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotRuntimeStub.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotRuntimeStub.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotRuntimeStub.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotRuntimeStub.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSentinelConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSentinelConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSentinelConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSentinelConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackFrameReference.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackFrameReference.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackFrameReference.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackFrameReference.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackIntrospection.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackIntrospection.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackIntrospection.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackIntrospection.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedField.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedField.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedField.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedField.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedJavaType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedJavaType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedJavaType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedJavaType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java similarity index 96% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java index c598f8a6f3f..25f6153f54e 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java @@ -85,7 +85,7 @@ class HotSpotVMConfig extends HotSpotVMConfigAccess { final int klassLayoutHelperNeutralValue = getConstant("Klass::_lh_neutral_value", Integer.class); final int klassLayoutHelperInstanceSlowPathBit = getConstant("Klass::_lh_instance_slow_path_bit", Integer.class); - final int vtableEntrySize = getTypeSize("vtableEntry"); + final int vtableEntrySize = getFieldValue("CompilerToVM::Data::sizeof_vtableEntry", Integer.class, "int"); final int vtableEntryMethodOffset = getFieldOffset("vtableEntry::_method", Integer.class, "Method*"); final int instanceKlassSourceFileNameIndexOffset = getFieldOffset("InstanceKlass::_source_file_name_index", Integer.class, "u2"); @@ -192,20 +192,20 @@ class HotSpotVMConfig extends HotSpotVMConfigAccess { final int constMethodHasLocalVariableTable = getConstant("ConstMethod::_has_localvariable_table", Integer.class); final int constMethodHasExceptionTable = getConstant("ConstMethod::_has_exception_table", Integer.class); - final int exceptionTableElementSize = getTypeSize("ExceptionTableElement"); + final int exceptionTableElementSize = getFieldValue("CompilerToVM::Data::sizeof_ExceptionTableElement", Integer.class, "int"); final int exceptionTableElementStartPcOffset = getFieldOffset("ExceptionTableElement::start_pc", Integer.class, "u2"); final int exceptionTableElementEndPcOffset = getFieldOffset("ExceptionTableElement::end_pc", Integer.class, "u2"); final int exceptionTableElementHandlerPcOffset = getFieldOffset("ExceptionTableElement::handler_pc", Integer.class, "u2"); final int exceptionTableElementCatchTypeIndexOffset = getFieldOffset("ExceptionTableElement::catch_type_index", Integer.class, "u2"); - final int localVariableTableElementSize = getTypeSize("LocalVariableTableElement"); + final int localVariableTableElementSize = getFieldValue("CompilerToVM::Data::sizeof_LocalVariableTableElement", Integer.class, "int"); final int localVariableTableElementStartBciOffset = getFieldOffset("LocalVariableTableElement::start_bci", Integer.class, "u2"); final int localVariableTableElementLengthOffset = getFieldOffset("LocalVariableTableElement::length", Integer.class, "u2"); final int localVariableTableElementNameCpIndexOffset = getFieldOffset("LocalVariableTableElement::name_cp_index", Integer.class, "u2"); final int localVariableTableElementDescriptorCpIndexOffset = getFieldOffset("LocalVariableTableElement::descriptor_cp_index", Integer.class, "u2"); final int localVariableTableElementSlotOffset = getFieldOffset("LocalVariableTableElement::slot", Integer.class, "u2"); - final int constantPoolSize = getTypeSize("ConstantPool"); + final int constantPoolSize = getFieldValue("CompilerToVM::Data::sizeof_ConstantPool", Integer.class, "int"); final int constantPoolTagsOffset = getFieldOffset("ConstantPool::_tags", Integer.class, "Array*"); final int constantPoolHolderOffset = getFieldOffset("ConstantPool::_pool_holder", Integer.class, "InstanceKlass*"); final int constantPoolLengthOffset = getFieldOffset("ConstantPool::_length", Integer.class, "int"); @@ -237,12 +237,15 @@ class HotSpotVMConfig extends HotSpotVMConfigAccess { final int heapWordSize = getConstant("HeapWordSize", Integer.class); - final int symbolPointerSize = getTypeSize("Symbol*"); + final int symbolPointerSize = getFieldValue("CompilerToVM::Data::sizeof_SymbolPointer", Integer.class, "int"); final long vmSymbolsSymbols = getFieldAddress("vmSymbols::_symbols[0]", "Symbol*"); final int vmSymbolsFirstSID = getConstant("vmSymbols::FIRST_SID", Integer.class); final int vmSymbolsSIDLimit = getConstant("vmSymbols::SID_LIMIT", Integer.class); + final long symbolInit = getFieldValue("CompilerToVM::Data::symbol_init", Long.class); + final long symbolClinit = getFieldValue("CompilerToVM::Data::symbol_clinit", Long.class); + /** * Returns the symbol in the {@code vmSymbols} table at position {@code index} as a * {@link String}. diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java similarity index 94% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java index 9bb538d587b..33a07bcb9a9 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java @@ -66,21 +66,6 @@ public class HotSpotVMConfigAccess { return getAddress(name, null); } - /** - * Gets the size of a C++ type. - * - * @param name name of the type - * @return the size in bytes of the requested field - * @throws JVMCIError if the field is not present and {@code notPresent} is null - */ - public int getTypeSize(String name) { - Long entry = store.vmTypeSizes.get(name); - if (entry == null) { - throw new JVMCIError("expected VM type not found: " + name); - } - return (int) (long) entry; - } - /** * Gets the value of a C++ constant. * @@ -291,13 +276,24 @@ public class HotSpotVMConfigAccess { */ public T getFlag(String name, Class type, T notPresent) { VMFlag entry = store.vmFlags.get(name); + Object value; + String cppType; if (entry == null) { - if (notPresent != null) { - return notPresent; + // Fall back to VM call + value = store.compilerToVm.getFlagValue(name); + if (value == store.compilerToVm) { + if (notPresent != null) { + return notPresent; + } + throw new JVMCIError("expected VM flag not found: " + name); + } else { + cppType = null; } - throw new JVMCIError("expected VM flag not found: " + name); + } else { + value = entry.value; + cppType = entry.type; } - return type.cast(convertValue(name, type, entry.value, entry.type)); + return type.cast(convertValue(name, type, value, cppType)); } private static Object convertValue(String name, Class toType, Object value, String cppType) throws JVMCIError { @@ -319,6 +315,10 @@ public class HotSpotVMConfigAccess { } else if (value instanceof Long) { return (int) (long) value; } + } else if (toType == String.class) { + if (value == null || value instanceof String) { + return value; + } } else if (toType == Long.class) { return value; } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java similarity index 83% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java index e6f074d948f..c388bbfa7c4 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java @@ -46,15 +46,6 @@ public final class HotSpotVMConfigStore { return Collections.unmodifiableMap(vmAddresses); } - /** - * Gets the C++ type sizes exposed by this object. - * - * @return an unmodifiable map from C++ type names to their sizes in bytes - */ - public Map getTypeSizes() { - return Collections.unmodifiableMap(vmTypeSizes); - } - /** * Gets the C++ constants exposed by this object. * @@ -90,11 +81,11 @@ public final class HotSpotVMConfigStore { } final HashMap vmFields; - final HashMap vmTypeSizes; final HashMap vmConstants; final HashMap vmAddresses; final HashMap vmFlags; final List vmIntrinsics; + final CompilerToVM compilerToVm; /** * Reads the database of VM info. The return value encodes the info in a nested object array @@ -103,7 +94,6 @@ public final class HotSpotVMConfigStore { *

      *     info = [
      *         VMField[] vmFields,
-     *         [String name, Long size, ...] vmTypeSizes,
      *         [String name, Long value, ...] vmConstants,
      *         [String name, Long value, ...] vmAddresses,
      *         VMFlag[] vmFlags
@@ -113,25 +103,24 @@ public final class HotSpotVMConfigStore {
      */
     @SuppressWarnings("try")
     HotSpotVMConfigStore(CompilerToVM compilerToVm) {
+        this.compilerToVm = compilerToVm;
         Object[] data;
         try (InitTimer t = timer("CompilerToVm readConfiguration")) {
             data = compilerToVm.readConfiguration();
         }
-        assert data.length == 6 : data.length;
+        assert data.length == 5 : data.length;
 
         // @formatter:off
         VMField[] vmFieldsInfo    = (VMField[]) data[0];
-        Object[] vmTypesSizesInfo = (Object[])  data[1];
-        Object[] vmConstantsInfo  = (Object[])  data[2];
-        Object[] vmAddressesInfo  = (Object[])  data[3];
-        VMFlag[] vmFlagsInfo      = (VMFlag[])  data[4];
+        Object[] vmConstantsInfo  = (Object[])  data[1];
+        Object[] vmAddressesInfo  = (Object[])  data[2];
+        VMFlag[] vmFlagsInfo      = (VMFlag[])  data[3];
 
         vmFields     = new HashMap<>(vmFieldsInfo.length);
-        vmTypeSizes  = new HashMap<>(vmTypesSizesInfo.length);
         vmConstants  = new HashMap<>(vmConstantsInfo.length);
         vmAddresses  = new HashMap<>(vmAddressesInfo.length);
         vmFlags      = new HashMap<>(vmFlagsInfo.length);
-        vmIntrinsics = Arrays.asList((VMIntrinsicMethod[]) data[5]);
+        vmIntrinsics = Arrays.asList((VMIntrinsicMethod[]) data[4]);
         // @formatter:on
 
         try (InitTimer t = timer("HotSpotVMConfigStore fill maps")) {
@@ -139,12 +128,6 @@ public final class HotSpotVMConfigStore {
                 vmFields.put(vmField.name, vmField);
             }
 
-            for (int i = 0; i < vmTypesSizesInfo.length / 2; i++) {
-                String name = (String) vmTypesSizesInfo[i * 2];
-                Long size = (Long) vmTypesSizesInfo[i * 2 + 1];
-                vmTypeSizes.put(name, size);
-            }
-
             for (int i = 0; i < vmConstantsInfo.length / 2; i++) {
                 String name = (String) vmConstantsInfo[i * 2];
                 Long value = (Long) vmConstantsInfo[i * 2 + 1];
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMEventListener.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMEventListener.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMEventListener.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMEventListener.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/MetaspaceWrapperObject.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/MetaspaceWrapperObject.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/MetaspaceWrapperObject.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/MetaspaceWrapperObject.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SuppressFBWarnings.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SuppressFBWarnings.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SuppressFBWarnings.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SuppressFBWarnings.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java
similarity index 81%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java
index 094d92cdd32..ce8b54139df 100644
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java
+++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java
@@ -38,22 +38,22 @@ public final class VMField {
     public final String type;
 
     /**
-     * If represented field is non-static, this is its offset within the containing structure.
+     * If the represented field is non-static, this is its offset within the containing structure.
      */
     public final long offset;
 
     /**
-     * If represented field is static, this is its address. Otherwise, this field is 0.
+     * If the represented field is static, this is its address. Otherwise, this is 0.
      */
     public final long address;
 
     /**
-     * Value of the field represented as a boxed long; only valid for non-oop static fields. This
-     * value is only captured once, during JVMCI initialization. If {@link #type} cannot be
-     * meaningfully (e.g., a struct) or safely (e.g., an oop) expressed as a boxed long, this is
-     * {@code null}.
+     * Value of the field represented as a boxed boolean if its C++ type is bool otherwise as a
+     * boxed long; only valid for non-oop static fields. This value is only captured once, during
+     * JVMCI initialization. If {@link #type} cannot be meaningfully (e.g., a struct) or safely
+     * (e.g., an oop) expressed as a boxed object, this is {@code null}.
      */
-    public final Long value;
+    public final Object value;
 
     /**
      * Determines if the represented field is static.
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMFlag.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMFlag.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMFlag.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMFlag.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMIntrinsicMethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMIntrinsicMethod.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMIntrinsicMethod.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMIntrinsicMethod.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/overview.html b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/overview.html
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/overview.html
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/overview.html
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractJavaProfile.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractJavaProfile.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractJavaProfile.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractJavaProfile.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractProfiledItem.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractProfiledItem.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractProfiledItem.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractProfiledItem.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AllocatableValue.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AllocatableValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AllocatableValue.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AllocatableValue.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Constant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Constant.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Constant.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Constant.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DefaultProfilingInfo.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DefaultProfilingInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DefaultProfilingInfo.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DefaultProfilingInfo.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationAction.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationAction.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationAction.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationAction.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationReason.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationReason.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationReason.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationReason.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ExceptionHandler.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ExceptionHandler.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ExceptionHandler.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ExceptionHandler.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/InvokeTarget.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/InvokeTarget.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/InvokeTarget.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/InvokeTarget.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaConstant.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaConstant.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaKind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaKind.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaKind.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaKind.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethodProfile.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethodProfile.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethodProfile.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethodProfile.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaTypeProfile.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaTypeProfile.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaTypeProfile.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaTypeProfile.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaValue.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaValue.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaValue.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LineNumberTable.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LineNumberTable.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LineNumberTable.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LineNumberTable.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Local.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Local.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Local.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Local.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java
similarity index 82%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java
index 81c5f395549..9eba9d0f8ac 100644
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java
+++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java
@@ -35,9 +35,9 @@ public interface MemoryAccessProvider {
      * @param displacement the displacement within the object in bytes
      * @param bits the number of bits to read from memory
      * @return the read value encapsulated in a {@link JavaConstant} object of {@link JavaKind} kind
-     * @throws IllegalArgumentException if {@code kind} is {@link JavaKind#Void} or not
-     *             {@linkplain JavaKind#isPrimitive() primitive} kind or {@code bits} is not 8, 16,
-     *             32 or 64
+     * @throws IllegalArgumentException if the read is out of bounds of the object or {@code kind}
+     *             is {@link JavaKind#Void} or not {@linkplain JavaKind#isPrimitive() primitive}
+     *             kind or {@code bits} is not 8, 16, 32 or 64
      */
     JavaConstant readPrimitiveConstant(JavaKind kind, Constant base, long displacement, int bits) throws IllegalArgumentException;
 
@@ -46,9 +46,9 @@ public interface MemoryAccessProvider {
      *
      * @param base the base address from which the value is read
      * @param displacement the displacement within the object in bytes
-     * @return the read value encapsulated in a {@link Constant} object or {@code null} if the
-     *         address computed from {@code base} and {@code displacement} does not denote a
-     *         location holding an {@code Object} value
+     * @return the read value encapsulated in a {@link Constant} object
+     * @throws IllegalArgumentException if the address computed from {@code base} and
+     *             {@code displacement} does not denote a location holding an {@code Object} value
      */
     JavaConstant readObjectConstant(Constant base, long displacement);
 }
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaAccessProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaAccessProvider.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaAccessProvider.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/NullConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/NullConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/NullConstant.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/NullConstant.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PlatformKind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PlatformKind.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PlatformKind.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PlatformKind.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PrimitiveConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PrimitiveConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PrimitiveConstant.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PrimitiveConstant.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ProfilingInfo.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ProfilingInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ProfilingInfo.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ProfilingInfo.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/RawConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/RawConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/RawConstant.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/RawConstant.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaField.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaField.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaField.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaField.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java
similarity index 97%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java
index 891e7943de3..593d4f36eb9 100644
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java
+++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java
@@ -104,6 +104,13 @@ public interface ResolvedJavaType extends JavaType, ModifiersProvider, Annotated
      */
     boolean isAssignableFrom(ResolvedJavaType other);
 
+    /**
+     * Returns the {@link ResolvedJavaType} object representing the host class of this VM anonymous
+     * class (as opposed to the unrelated concept specified by {@link Class#isAnonymousClass()}) or
+     * {@code null} if this object does not represent a VM anonymous class.
+     */
+    ResolvedJavaType getHostClass();
+
     /**
      * Returns true if this type is exactly the type {@link java.lang.Object}.
      */
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SerializableConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SerializableConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SerializableConstant.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SerializableConstant.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Signature.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Signature.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Signature.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Signature.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SuppressFBWarnings.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SuppressFBWarnings.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SuppressFBWarnings.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SuppressFBWarnings.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TriState.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TriState.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TriState.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TriState.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/VMConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/VMConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/VMConstant.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/VMConstant.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Value.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Value.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Value.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Value.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ValueKind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ValueKind.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ValueKind.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ValueKind.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIBackend.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIBackend.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIBackend.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIBackend.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompiler.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompiler.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompiler.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompiler.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIRuntime.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIRuntime.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIRuntime.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIRuntime.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIPermission.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIPermission.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIPermission.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIPermission.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java
similarity index 72%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java
index 7d695ea27d7..530d6e0a033 100644
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java
+++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java
@@ -24,12 +24,15 @@ package jdk.vm.ci.services;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.ServiceLoader;
+
+import jdk.vm.ci.services.internal.ReflectionAccessJDK;
 
 /**
  * Service-provider class for the runtime to locate providers of JVMCI services where the latter are
- * not in packages exported by the JVMCI module. As part of instantiating
- * {@link JVMCIServiceLocator}, all JVMCI packages will be {@linkplain Services#exportJVMCITo(Class)
- * exported} to the module defining the class of the instantiated object.
+ * not in packages exported by the JVMCI module. As part of instantiating a
+ * {@link JVMCIServiceLocator}, all JVMCI packages will be opened to the module defining the class
+ * of the instantiated object.
  *
  * While the {@link #getProvider(Class)} method can be used directly, it's usually easier to use
  * {@link #getProviders(Class)}.
@@ -49,30 +52,39 @@ public abstract class JVMCIServiceLocator {
     }
 
     /**
-     * Creates a capability for accessing JVMCI. Once successfully instantiated, JVMCI exports all
-     * its packages to the module defining the type of this object.
+     * Creates a capability for accessing JVMCI. Once successfully instantiated, JVMCI opens all its
+     * packages to the module defining the type of this object.
      *
      * @throws SecurityException if a security manager has been installed and it denies
      *             {@link JVMCIPermission}
      */
     protected JVMCIServiceLocator() {
         this(checkPermission());
-        Services.exportJVMCITo(getClass());
+        Services.checkJVMCIEnabled();
+        ReflectionAccessJDK.openJVMCITo(getClass());
     }
 
     /**
      * Gets the provider of the service defined by {@code service} or {@code null} if this object
      * does not have a provider for {@code service}.
      */
-    public abstract  S getProvider(Class service);
+    protected abstract  S getProvider(Class service);
 
     /**
-     * Gets the providers of the service defined by {@code service} by querying the
-     * {@link JVMCIServiceLocator} providers obtained by {@link Services#load(Class)}.
+     * Gets the providers of the service defined by {@code service} by querying the available
+     * {@link JVMCIServiceLocator} providers.
+     *
+     * @throws SecurityException if a security manager is present and it denies
+     *             {@link JVMCIPermission}
      */
     public static  List getProviders(Class service) {
+        Services.checkJVMCIEnabled();
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkPermission(new JVMCIPermission());
+        }
         List providers = new ArrayList<>();
-        for (JVMCIServiceLocator access : Services.load(JVMCIServiceLocator.class)) {
+        for (JVMCIServiceLocator access : ServiceLoader.load(JVMCIServiceLocator.class, ClassLoader.getSystemClassLoader())) {
             S provider = access.getProvider(service);
             if (provider != null) {
                 providers.add(provider);
diff --git a/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java
new file mode 100644
index 00000000000..6d59fe6eef9
--- /dev/null
+++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.vm.ci.services;
+
+import java.lang.reflect.Method;
+import java.util.Map;
+
+/**
+ * Provides utilities needed by JVMCI clients.
+ */
+public final class Services {
+
+    // This class must be compilable and executable on JDK 8 since it's used in annotation
+    // processors while building JDK 9 so use of API added in JDK 9 is made via reflection.
+
+    private Services() {
+    }
+
+    @SuppressWarnings("unchecked")
+    private static Map initSavedProperties() throws InternalError {
+        try {
+            Class vmClass = Class.forName("jdk.internal.misc.VM");
+            Method m = vmClass.getMethod("getSavedProperties");
+            return (Map) m.invoke(null);
+        } catch (Exception e) {
+            throw new InternalError(e);
+        }
+    }
+
+    static final Map SAVED_PROPERTIES = initSavedProperties();
+    static final boolean JVMCI_ENABLED = Boolean.parseBoolean(SAVED_PROPERTIES.get("jdk.internal.vm.ci.enabled"));
+
+    /**
+     * Checks that JVMCI is enabled in the VM and throws an error if it isn't.
+     */
+    static void checkJVMCIEnabled() {
+        if (!JVMCI_ENABLED) {
+            throw new Error("The EnableJVMCI VM option must be true (i.e., -XX:+EnableJVMCI) to use JVMCI");
+        }
+    }
+
+    /**
+     * Gets an unmodifiable copy of the system properties saved when {@link System} is initialized.
+     */
+    public static Map getSavedProperties() {
+        checkJVMCIEnabled();
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkPermission(new JVMCIPermission());
+        }
+        return SAVED_PROPERTIES;
+    }
+
+    /**
+     * Causes the JVMCI subsystem to be initialized if it isn't already initialized.
+     */
+    public static void initializeJVMCI() {
+        checkJVMCIEnabled();
+        try {
+            Class.forName("jdk.vm.ci.runtime.JVMCI");
+        } catch (ClassNotFoundException e) {
+            throw new InternalError(e);
+        }
+    }
+}
diff --git a/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/internal/ReflectionAccessJDK.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/internal/ReflectionAccessJDK.java
new file mode 100644
index 00000000000..6cbf12273ab
--- /dev/null
+++ b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/internal/ReflectionAccessJDK.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.vm.ci.services.internal;
+
+import java.lang.reflect.Method;
+import java.util.Set;
+
+import jdk.vm.ci.services.Services;
+
+/**
+ * Reflection based access to API introduced in JDK 9. This allows the API to be used in code that
+ * must be compiled (but not executed) on JDK 8.
+ */
+public final class ReflectionAccessJDK {
+
+    /**
+     * {@code Class.getModule()}.
+     */
+    private static final Method getModule;
+
+    /**
+     * {@code java.lang.Module.addOpens(String, Module)}.
+     */
+    private static final Method addOpens;
+
+    /**
+     * {@code java.lang.Module.getPackages(Module, String, Module)}.
+     */
+    private static final Method getPackages;
+
+    /**
+     * {@code java.lang.Module.isOpen(String, Module)}.
+     */
+    private static final Method isOpenTo;
+
+    /**
+     * Opens all JVMCI packages to the module of a given class.
+     *
+     * @param other all JVMCI packages will be opened to the module of this class
+     */
+    @SuppressWarnings("unchecked")
+    public static void openJVMCITo(Class other) {
+        try {
+            Object jvmci = getModule.invoke(Services.class);
+            Object otherModule = getModule.invoke(other);
+            if (jvmci != otherModule) {
+                Set packages = (Set) getPackages.invoke(jvmci);
+                for (String pkg : packages) {
+                    boolean opened = (Boolean) isOpenTo.invoke(jvmci, pkg, otherModule);
+                    if (!opened) {
+                        addOpens.invoke(jvmci, pkg, otherModule);
+                    }
+                }
+            }
+        } catch (Exception e) {
+            throw new InternalError(e);
+        }
+    }
+
+    static {
+        try {
+            getModule = Class.class.getMethod("getModule");
+            Class moduleClass = getModule.getReturnType();
+            getPackages = moduleClass.getMethod("getPackages");
+            isOpenTo = moduleClass.getMethod("isOpen", String.class, moduleClass);
+            addOpens = moduleClass.getDeclaredMethod("addOpens", String.class, moduleClass);
+        } catch (NoSuchMethodException | SecurityException e) {
+            throw new InternalError(e);
+        }
+    }
+}
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARC.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARC.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARC.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARC.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARCKind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARCKind.java
similarity index 100%
rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARCKind.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARCKind.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/module-info.java b/hotspot/src/jdk.internal.vm.ci/share/classes/module-info.java
similarity index 63%
rename from hotspot/src/jdk.vm.ci/share/classes/module-info.java
rename to hotspot/src/jdk.internal.vm.ci/share/classes/module-info.java
index 744442b1cdb..e6001b18f37 100644
--- a/hotspot/src/jdk.vm.ci/share/classes/module-info.java
+++ b/hotspot/src/jdk.internal.vm.ci/share/classes/module-info.java
@@ -23,8 +23,8 @@
  * questions.
  */
 
-module jdk.vm.ci {
-    exports jdk.vm.ci.services;
+module jdk.internal.vm.ci {
+    exports jdk.vm.ci.services to jdk.internal.vm.compiler;
 
     uses jdk.vm.ci.services.JVMCIServiceLocator;
     uses jdk.vm.ci.hotspot.HotSpotJVMCIBackendFactory;
@@ -33,37 +33,4 @@ module jdk.vm.ci {
         jdk.vm.ci.hotspot.aarch64.AArch64HotSpotJVMCIBackendFactory,
         jdk.vm.ci.hotspot.amd64.AMD64HotSpotJVMCIBackendFactory,
         jdk.vm.ci.hotspot.sparc.SPARCHotSpotJVMCIBackendFactory;
-
-    exports jdk.vm.ci.aarch64 to
-        jdk.vm.compiler;
-    exports jdk.vm.ci.amd64 to
-        jdk.aot,
-        jdk.vm.compiler;
-    exports jdk.vm.ci.code to
-        jdk.aot,
-        jdk.vm.compiler;
-    exports jdk.vm.ci.code.site to
-        jdk.aot,
-        jdk.vm.compiler;
-    exports jdk.vm.ci.code.stack to
-        jdk.vm.compiler;
-    exports jdk.vm.ci.common to
-        jdk.vm.compiler;
-    exports jdk.vm.ci.hotspot to
-        jdk.aot,
-        jdk.vm.compiler;
-    exports jdk.vm.ci.hotspot.aarch64 to
-        jdk.vm.compiler;
-    exports jdk.vm.ci.hotspot.amd64 to
-        jdk.vm.compiler;
-    exports jdk.vm.ci.hotspot.sparc to
-        jdk.vm.compiler;
-    exports jdk.vm.ci.meta to
-        jdk.aot,
-        jdk.vm.compiler;
-    exports jdk.vm.ci.runtime to
-        jdk.aot,
-        jdk.vm.compiler;
-    exports jdk.vm.ci.sparc to
-        jdk.vm.compiler;
 }
diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/.project b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/.project
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/.mx.graal/.project
rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/.project
diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/.pydevproject b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/.pydevproject
similarity index 84%
rename from hotspot/src/jdk.vm.compiler/.mx.graal/.pydevproject
rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/.pydevproject
index c2a81b0a6a5..10c514a61b2 100644
--- a/hotspot/src/jdk.vm.compiler/.mx.graal/.pydevproject
+++ b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/.pydevproject
@@ -3,9 +3,9 @@
 Default
 python 2.7
 
-/mx.graal
-/mx.graal
-/mx.graal
+/.mx.graal
+/.mx.graal
+/.mx.graal
 
 
 
diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/eclipse-settings/org.eclipse.jdt.core.prefs b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/eclipse-settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/.mx.graal/eclipse-settings/org.eclipse.jdt.core.prefs
rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/eclipse-settings/org.eclipse.jdt.core.prefs
diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal.py
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal.py
rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal.py
diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal_9.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal_9.py
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal_9.py
rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal_9.py
diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal_bench.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal_bench.py
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal_bench.py
rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal_bench.py
diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/outputparser.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/outputparser.py
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/.mx.graal/outputparser.py
rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/outputparser.py
diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/sanitycheck.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/sanitycheck.py
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/.mx.graal/sanitycheck.py
rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/sanitycheck.py
diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/suite.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/suite.py
similarity index 95%
rename from hotspot/src/jdk.vm.compiler/.mx.graal/suite.py
rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/suite.py
index dda989acedf..b7f897c0862 100644
--- a/hotspot/src/jdk.vm.compiler/.mx.graal/suite.py
+++ b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/suite.py
@@ -8,6 +8,36 @@ suite = {
   # (e.g., macosx-x86_64-normal-server-release).
   "outputRoot" : "../../../build/mx/hotspot",
 
+  "jdklibraries" : {
+    "JVMCI_SERVICES" : {
+      "path" : "lib/jvmci-services.jar",
+      "sourcePath" : "lib/jvmci-services.src.zip",
+      "optional" : False,
+      "jdkStandardizedSince" : "9",
+      "module" : "jdk.internal.vm.ci"
+    },
+    "JVMCI_API" : {
+      "path" : "lib/jvmci/jvmci-api.jar",
+      "sourcePath" : "lib/jvmci/jvmci-api.src.zip",
+      "dependencies" : [
+        "JVMCI_SERVICES",
+      ],
+      "optional" : False,
+      "jdkStandardizedSince" : "9",
+      "module" : "jdk.internal.vm.ci"
+    },
+    "JVMCI_HOTSPOT" : {
+      "path" : "lib/jvmci/jvmci-hotspot.jar",
+      "sourcePath" : "lib/jvmci/jvmci-hotspot.src.zip",
+      "dependencies" : [
+        "JVMCI_API",
+      ],
+      "optional" : False,
+      "jdkStandardizedSince" : "9",
+      "module" : "jdk.internal.vm.ci"
+    },
+  },
+
   "libraries" : {
 
     # ------------- Libraries -------------
@@ -17,6 +47,16 @@ suite = {
       "sha1" : "476d9a44cd19d6b55f81571077dfa972a4f8a083",
       "bootClassPathAgent" : "true",
     },
+    "ASM5" : {
+      "sha1" : "0da08b8cce7bbf903602a25a3a163ae252435795",
+      "urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/asm-5.0.4.jar"],
+    },
+
+    "ASM_TREE5" : {
+      "sha1" : "396ce0c07ba2b481f25a70195c7c94922f0d1b0b",
+      "urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/asm-tree-5.0.4.jar"],
+      "dependencies" : ["ASM5"],
+    },
   },
 
   "projects" : {
@@ -32,6 +72,7 @@ suite = {
 
     "org.graalvm.compiler.serviceprovider" : {
       "subDir" : "share/classes",
+      "dependencies" : ["JVMCI_SERVICES"],
       "sourceDirs" : ["src"],
       "checkstyle" : "org.graalvm.compiler.graph",
       "javaCompliance" : "1.8",
@@ -49,6 +90,7 @@ suite = {
 
     "org.graalvm.compiler.options" : {
       "subDir" : "share/classes",
+      "dependencies" : ["JVMCI_SERVICES", "JVMCI_API"],
       "sourceDirs" : ["src"],
       "checkstyle" : "org.graalvm.compiler.graph",
       "javaCompliance" : "1.8",
@@ -83,6 +125,7 @@ suite = {
       "sourceDirs" : ["src"],
       "checkstyle" : "org.graalvm.compiler.graph",
       "dependencies" : [
+        "JVMCI_API",
         "org.graalvm.compiler.serviceprovider",
         "org.graalvm.compiler.options"
       ],
@@ -137,6 +180,7 @@ suite = {
       "sourceDirs" : ["src"],
       "checkstyle" : "org.graalvm.compiler.graph",
       "dependencies" : [
+        "JVMCI_HOTSPOT",
         "org.graalvm.compiler.core.test",
       ],
       "javaCompliance" : "1.8",
@@ -146,6 +190,9 @@ suite = {
     "org.graalvm.compiler.api.runtime" : {
       "subDir" : "share/classes",
       "sourceDirs" : ["src"],
+      "dependencies" : [
+        "JVMCI_API",
+      ],
       "checkstyle" : "org.graalvm.compiler.graph",
       "javaCompliance" : "1.8",
       "workingSets" : "API,Graal",
@@ -156,6 +203,7 @@ suite = {
       "sourceDirs" : ["src"],
       "dependencies" : [
         "mx:JUNIT",
+        "JVMCI_SERVICES",
         "org.graalvm.compiler.api.runtime",
       ],
       "checkstyle" : "org.graalvm.compiler.graph",
@@ -166,6 +214,7 @@ suite = {
     "org.graalvm.compiler.api.replacements" : {
       "subDir" : "share/classes",
       "sourceDirs" : ["src"],
+      "dependencies" : ["JVMCI_API"],
       "checkstyle" : "org.graalvm.compiler.graph",
       "javaCompliance" : "1.8",
       "workingSets" : "API,Graal,Replacements",
@@ -175,6 +224,7 @@ suite = {
       "subDir" : "share/classes",
       "sourceDirs" : ["src"],
       "dependencies" : [
+        "JVMCI_HOTSPOT",
         "org.graalvm.compiler.api.runtime",
         "org.graalvm.compiler.replacements",
         "org.graalvm.compiler.runtime",
@@ -261,6 +311,8 @@ suite = {
         "org.graalvm.compiler.hotspot",
         "org.graalvm.compiler.lir.jtt",
         "org.graalvm.compiler.lir.test",
+        "JVMCI_API",
+        "JVMCI_HOTSPOT",
       ],
       "checkstyle" : "org.graalvm.compiler.graph",
       "javaCompliance" : "1.8",
@@ -347,6 +399,9 @@ suite = {
     "org.graalvm.compiler.asm" : {
       "subDir" : "share/classes",
       "sourceDirs" : ["src"],
+      "dependencies" : [
+        "JVMCI_API",
+      ],
       "checkstyle" : "org.graalvm.compiler.graph",
       "javaCompliance" : "1.8",
       "workingSets" : "Graal,Assembler",
@@ -403,6 +458,7 @@ suite = {
     "org.graalvm.compiler.bytecode" : {
       "subDir" : "share/classes",
       "sourceDirs" : ["src"],
+      "dependencies" : ["JVMCI_API"],
       "checkstyle" : "org.graalvm.compiler.graph",
       "javaCompliance" : "1.8",
       "workingSets" : "Graal,Java",
@@ -774,6 +830,7 @@ suite = {
       "dependencies" : [
         "org.graalvm.compiler.lir.jtt",
         "org.graalvm.compiler.lir.aarch64",
+        "JVMCI_HOTSPOT"
       ],
       "checkstyle" : "org.graalvm.compiler.graph",
       "javaCompliance" : "1.8",
@@ -803,6 +860,7 @@ suite = {
       "dependencies" : [
         "org.graalvm.compiler.lir.jtt",
         "org.graalvm.compiler.lir.amd64",
+        "JVMCI_HOTSPOT"
       ],
       "checkstyle" : "org.graalvm.compiler.graph",
       "javaCompliance" : "1.8",
@@ -831,6 +889,7 @@ suite = {
       "sourceDirs" : ["src"],
       "dependencies" : [
         "org.graalvm.compiler.lir.jtt",
+        "JVMCI_HOTSPOT"
       ],
       "checkstyle" : "org.graalvm.compiler.graph",
       "javaCompliance" : "1.8",
@@ -908,6 +967,7 @@ suite = {
         "org.graalvm.compiler.graph.test",
         "org.graalvm.compiler.printer",
         "JAVA_ALLOCATION_INSTRUMENTER",
+        "ASM_TREE5",
       ],
       "annotationProcessors" : ["GRAAL_NODEINFO_PROCESSOR"],
       "checkstyle" : "org.graalvm.compiler.graph",
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/module-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/module-info.java
similarity index 96%
rename from hotspot/src/jdk.vm.compiler/share/classes/module-info.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/module-info.java
index 7c456485659..0c96fff59a4 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/module-info.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/module-info.java
@@ -23,14 +23,12 @@
  * questions.
  */
 
-module jdk.vm.compiler {
+module jdk.internal.vm.compiler {
     requires java.instrument;
     requires java.management;
+    requires jdk.internal.vm.ci;
     requires jdk.management;
-    requires jdk.vm.ci;
-
-    // sun.misc.Unsafe is used
-    requires jdk.unsupported;
+    requires jdk.unsupported;   // sun.misc.Unsafe is used
 
     uses org.graalvm.compiler.code.DisassemblerProvider;
     uses org.graalvm.compiler.core.match.MatchStatementSet;
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/CollectionsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/CollectionsProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/CollectionsProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/CollectionsProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/DefaultCollectionsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/DefaultCollectionsProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/DefaultCollectionsProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/DefaultCollectionsProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/AllocationInstrumentationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/AllocationInstrumentationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/AllocationInstrumentationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/AllocationInstrumentationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ControlFlowAnchorDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ControlFlowAnchorDirectiveTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ControlFlowAnchorDirectiveTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ControlFlowAnchorDirectiveTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/DeoptimizeDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/DeoptimizeDirectiveTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/DeoptimizeDirectiveTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/DeoptimizeDirectiveTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IsMethodInlineDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IsMethodInlineDirectiveTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IsMethodInlineDirectiveTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IsMethodInlineDirectiveTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IterationDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IterationDirectiveTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IterationDirectiveTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IterationDirectiveTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/LockInstrumentationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/LockInstrumentationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/LockInstrumentationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/LockInstrumentationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ProbabilityDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ProbabilityDirectiveTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ProbabilityDirectiveTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ProbabilityDirectiveTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/RootNameDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/RootNameDirectiveTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/RootNameDirectiveTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/RootNameDirectiveTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/TinyInstrumentor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/TinyInstrumentor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/TinyInstrumentor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/TinyInstrumentor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives/src/org/graalvm/compiler/api/directives/GraalDirectives.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives/src/org/graalvm/compiler/api/directives/GraalDirectives.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives/src/org/graalvm/compiler/api/directives/GraalDirectives.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives/src/org/graalvm/compiler/api/directives/GraalDirectives.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/ClassSubstitution.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/ClassSubstitution.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/ClassSubstitution.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/ClassSubstitution.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Fold.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Fold.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Fold.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Fold.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitutionRegistry.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitutionRegistry.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitutionRegistry.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitutionRegistry.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Snippet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Snippet.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Snippet.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Snippet.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetReflectionProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetReflectionProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetReflectionProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetReflectionProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetTemplateCache.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetTemplateCache.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetTemplateCache.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetTemplateCache.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalJVMCICompiler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalJVMCICompiler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalJVMCICompiler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalJVMCICompiler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalRuntime.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalRuntime.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalRuntime.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalRuntime.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java
similarity index 98%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java
index 01746c74bf8..82268194cbd 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java
@@ -40,7 +40,7 @@ public class Graal {
     private static final GraalRuntime runtime = initializeRuntime();
 
     private static GraalRuntime initializeRuntime() {
-        Services.exportJVMCITo(Graal.class);
+        Services.initializeJVMCI();
         JVMCICompiler compiler = JVMCI.getRuntime().getCompiler();
         if (compiler instanceof GraalJVMCICompiler) {
             GraalJVMCICompiler graal = (GraalJVMCICompiler) compiler;
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/GraalAPITest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/GraalAPITest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/GraalAPITest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/GraalAPITest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/AArch64MacroAssemblerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/AArch64MacroAssemblerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/AArch64MacroAssemblerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/AArch64MacroAssemblerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/TestProtectedAssembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/TestProtectedAssembler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/TestProtectedAssembler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/TestProtectedAssembler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Address.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Address.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Address.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Address.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/BitOpsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/BitOpsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/BitOpsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/BitOpsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/IncrementDecrementMacroTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/IncrementDecrementMacroTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/IncrementDecrementMacroTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/IncrementDecrementMacroTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/SimpleAssemblerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/SimpleAssemblerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/SimpleAssemblerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/SimpleAssemblerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Address.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Address.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Address.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Address.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64AsmOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64AsmOptions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64AsmOptions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64AsmOptions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64InstructionAttr.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64InstructionAttr.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64InstructionAttr.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64InstructionAttr.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64MacroAssembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64MacroAssembler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64MacroAssembler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64MacroAssembler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/BitSpecTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/BitSpecTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/BitSpecTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/BitSpecTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/SPARCAssemblerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/SPARCAssemblerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/SPARCAssemblerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/SPARCAssemblerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAddress.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAddress.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAddress.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAddress.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAssembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAssembler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAssembler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAssembler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCInstructionCounter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCInstructionCounter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCInstructionCounter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCInstructionCounter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCMacroAssembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCMacroAssembler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCMacroAssembler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCMacroAssembler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.test/src/org/graalvm/compiler/asm/test/AssemblerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.test/src/org/graalvm/compiler/asm/test/AssemblerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.test/src/org/graalvm/compiler/asm/test/AssemblerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.test/src/org/graalvm/compiler/asm/test/AssemblerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AbstractAddress.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AbstractAddress.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AbstractAddress.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AbstractAddress.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AsmOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AsmOptions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AsmOptions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AsmOptions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Assembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Assembler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Assembler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Assembler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Buffer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Buffer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Buffer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Buffer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Label.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Label.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Label.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Label.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/NumUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/NumUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/NumUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/NumUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BridgeMethodUtils.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BridgeMethodUtils.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BridgeMethodUtils.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BridgeMethodUtils.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeDisassembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeDisassembler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeDisassembler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeDisassembler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeLookupSwitch.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeLookupSwitch.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeLookupSwitch.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeLookupSwitch.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeStream.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeStream.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeStream.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeStream.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeSwitch.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeSwitch.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeSwitch.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeSwitch.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeTableSwitch.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeTableSwitch.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeTableSwitch.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeTableSwitch.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecodes.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecodes.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecodes.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecodes.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytes.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytes.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytes.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytes.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecodeProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecodeProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecodeProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecodeProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DataSection.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DataSection.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DataSection.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DataSection.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DisassemblerProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DisassemblerProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DisassemblerProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DisassemblerProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFile.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFile.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFile.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFile.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFileDisassemblerProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFileDisassemblerProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFileDisassemblerProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFileDisassemblerProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceMapping.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceMapping.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceMapping.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceMapping.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceStackTraceBailoutException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceStackTraceBailoutException.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceStackTraceBailoutException.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceStackTraceBailoutException.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/PermanentBailoutException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/PermanentBailoutException.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/PermanentBailoutException.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/PermanentBailoutException.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/RetryableBailoutException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/RetryableBailoutException.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/RetryableBailoutException.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/RetryableBailoutException.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressLowering.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressLowering.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressLowering.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressLowering.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64FloatConvertOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64FloatConvertOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64FloatConvertOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64FloatConvertOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64MoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64MoveFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64MoveFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64MoveFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeLIRBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeLIRBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeLIRBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64SuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64SuitesProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64SuitesProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64SuitesProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64AllocatorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64AllocatorTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64AllocatorTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64AllocatorTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/ConstantStackMoveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/ConstantStackMoveTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/ConstantStackMoveTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/ConstantStackMoveTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/StackStoreTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/StackStoreTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/StackStoreTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/StackStoreTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressLowering.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressLowering.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressLowering.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressLowering.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64ArithmeticLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64ArithmeticLIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64ArithmeticLIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64ArithmeticLIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRKindTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRKindTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRKindTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactoryBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactoryBase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactoryBase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactoryBase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeLIRBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeLIRBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeLIRBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64SuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64SuitesProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64SuitesProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64SuitesProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CollectionsFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CollectionsFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CollectionsFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CollectionsFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationIdentifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationIdentifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationIdentifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationIdentifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationRequestIdentifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationRequestIdentifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationRequestIdentifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationRequestIdentifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldIntrospection.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldIntrospection.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldIntrospection.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldIntrospection.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/Fields.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/Fields.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/Fields.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/Fields.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldsScanner.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldsScanner.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldsScanner.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldsScanner.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LinkedIdentityHashMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LinkedIdentityHashMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LinkedIdentityHashMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LinkedIdentityHashMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LocationIdentity.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LocationIdentity.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LocationIdentity.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LocationIdentity.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/SuppressFBWarnings.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/SuppressFBWarnings.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/SuppressFBWarnings.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/SuppressFBWarnings.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/UnsafeAccess.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/UnsafeAccess.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/UnsafeAccess.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/BiDirectionalTraceBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/BiDirectionalTraceBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/BiDirectionalTraceBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/BiDirectionalTraceBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/ComputeBlockOrder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/ComputeBlockOrder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/ComputeBlockOrder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/ComputeBlockOrder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/RegisterAllocationConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/RegisterAllocationConfig.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/RegisterAllocationConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/RegisterAllocationConfig.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/SingleBlockTraceBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/SingleBlockTraceBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/SingleBlockTraceBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/SingleBlockTraceBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/Trace.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/Trace.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/Trace.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/Trace.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceBuilderResult.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceBuilderResult.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceBuilderResult.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceBuilderResult.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceStatisticsPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceStatisticsPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceStatisticsPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceStatisticsPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/UniDirectionalTraceBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/UniDirectionalTraceBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/UniDirectionalTraceBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/UniDirectionalTraceBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/Condition.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/Condition.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/Condition.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/Condition.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/FloatConvert.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/FloatConvert.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/FloatConvert.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/FloatConvert.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/UnsignedMath.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/UnsignedMath.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/UnsignedMath.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/UnsignedMath.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/BlockMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/BlockMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/BlockMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/BlockMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/CFGVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/CFGVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/CFGVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/CFGVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/DominatorOptimizationProblem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/DominatorOptimizationProblem.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/DominatorOptimizationProblem.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/DominatorOptimizationProblem.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableCFG.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableCFG.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableCFG.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableCFG.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableDominatorOptimizationProblem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableDominatorOptimizationProblem.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableDominatorOptimizationProblem.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableDominatorOptimizationProblem.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PropertyConsumable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PropertyConsumable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PropertyConsumable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PropertyConsumable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/CodeGenProviders.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/CodeGenProviders.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/CodeGenProviders.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/CodeGenProviders.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ConstantFieldProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ConstantFieldProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ConstantFieldProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ConstantFieldProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallDescriptor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallDescriptor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallDescriptor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallDescriptor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallLinkage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallLinkage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallLinkage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallLinkage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallsProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallsProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallsProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/JavaConstantFieldProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/JavaConstantFieldProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/JavaConstantFieldProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/JavaConstantFieldProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/LIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/LIRKindTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/LIRKindTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/LIRKindTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractObjectStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractObjectStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractObjectStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractObjectStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractPointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractPointerStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractPointerStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractPointerStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/DataPointerConstant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/DataPointerConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/DataPointerConstant.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/DataPointerConstant.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/FloatStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/FloatStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/FloatStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/FloatStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IllegalStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IllegalStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IllegalStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IllegalStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ObjectStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ObjectStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ObjectStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ObjectStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/PrimitiveStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/PrimitiveStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/PrimitiveStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/PrimitiveStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/RawPointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/RawPointerStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/RawPointerStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/RawPointerStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/Stamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/Stamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/Stamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/Stamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampPair.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampPair.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampPair.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampPair.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/TypeReference.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/TypeReference.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/TypeReference.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/TypeReference.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/VoidStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/VoidStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/VoidStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/VoidStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArrayMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArrayMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArrayMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArrayMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArraySet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArraySet.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArraySet.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArraySet.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/BitMap2D.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/BitMap2D.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/BitMap2D.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/BitMap2D.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/FrequencyEncoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/FrequencyEncoder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/FrequencyEncoder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/FrequencyEncoder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/IntList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/IntList.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/IntList.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/IntList.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java
similarity index 83%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java
index 240fdc07fb6..86e1bac530a 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -53,27 +53,22 @@ public final class ModuleAPI {
     public static final ModuleAPI getModule;
 
     /**
-     * {@code jdk.internal.module.Modules.addExports(Module, String, Module)}.
-     */
-    public static final ModuleAPI addExports;
-
-    /**
-     * {@code java.lang.reflect.Module.getResourceAsStream(String)}.
+     * {@code java.lang.Module.getResourceAsStream(String)}.
      */
     public static final ModuleAPI getResourceAsStream;
 
     /**
-     * {@code java.lang.reflect.Module.canRead(Module)}.
+     * {@code java.lang.Module.canRead(Module)}.
      */
     public static final ModuleAPI canRead;
 
     /**
-     * {@code java.lang.reflect.Module.isExported(String)}.
+     * {@code java.lang.Module.isExported(String)}.
      */
     public static final ModuleAPI isExported;
 
     /**
-     * {@code java.lang.reflect.Module.isExported(String, Module)}.
+     * {@code java.lang.Module.isExported(String, Module)}.
      */
     public static final ModuleAPI isExportedTo;
 
@@ -116,13 +111,11 @@ public final class ModuleAPI {
             try {
                 getModule = new ModuleAPI(Class.class.getMethod("getModule"));
                 Class moduleClass = getModule.method.getReturnType();
-                Class modulesClass = Class.forName("jdk.internal.module.Modules");
                 getResourceAsStream = new ModuleAPI(moduleClass.getMethod("getResourceAsStream", String.class));
                 canRead = new ModuleAPI(moduleClass.getMethod("canRead", moduleClass));
                 isExported = new ModuleAPI(moduleClass.getMethod("isExported", String.class));
                 isExportedTo = new ModuleAPI(moduleClass.getMethod("isExported", String.class, moduleClass));
-                addExports = new ModuleAPI(modulesClass.getDeclaredMethod("addExports", moduleClass, String.class, moduleClass));
-            } catch (NoSuchMethodException | SecurityException | ClassNotFoundException e) {
+            } catch (NoSuchMethodException | SecurityException e) {
                 throw new InternalError(e);
             }
         } else {
@@ -132,8 +125,6 @@ public final class ModuleAPI {
             canRead = unavailable;
             isExported = unavailable;
             isExportedTo = unavailable;
-            addExports = unavailable;
         }
-
     }
 }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeConversion.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeConversion.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeConversion.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeConversion.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeReader.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeReader.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeReader.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeReader.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeWriter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeWriter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeWriter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeWriter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeAccess.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeAccess.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeAccess.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeReader.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeReader.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeReader.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeReader.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeWriter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeWriter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeWriter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeWriter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/Util.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/Util.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/Util.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/Util.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/META-INF/services/javax.annotation.processing.Processor b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/META-INF/services/javax.annotation.processing.Processor
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/META-INF/services/javax.annotation.processing.Processor
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/META-INF/services/javax.annotation.processing.Processor
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc.test/src/org/graalvm/compiler/core/sparc/test/SPARCAllocatorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc.test/src/org/graalvm/compiler/core/sparc/test/SPARCAllocatorTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc.test/src/org/graalvm/compiler/core/sparc/test/SPARCAllocatorTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc.test/src/org/graalvm/compiler/core/sparc/test/SPARCAllocatorTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCAddressLowering.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCAddressLowering.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCAddressLowering.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCAddressLowering.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCArithmeticLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCArithmeticLIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCArithmeticLIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCArithmeticLIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCImmediateAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCImmediateAddressNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCImmediateAddressNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCImmediateAddressNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIndexedAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIndexedAddressNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIndexedAddressNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIndexedAddressNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIntegerCompareCanonicalizationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIntegerCompareCanonicalizationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIntegerCompareCanonicalizationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIntegerCompareCanonicalizationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCMoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCMoveFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCMoveFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCMoveFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeLIRBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeLIRBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeLIRBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCSuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCSuitesProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCSuitesProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCSuitesProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/AllocSpy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/AllocSpy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/AllocSpy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/AllocSpy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java
similarity index 99%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java
index 8c8c74f3442..405652ed1e3 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java
@@ -127,7 +127,7 @@ public class CheckGraalInvariants extends GraalTest {
         MetaAccessProvider metaAccess = providers.getMetaAccess();
 
         PhaseSuite graphBuilderSuite = new PhaseSuite<>();
-        Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
+        Plugins plugins = new Plugins(new InvocationPlugins());
         GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
         graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
         HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CommonedConstantsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CommonedConstantsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CommonedConstantsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CommonedConstantsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConcreteSubtypeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConcreteSubtypeTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConcreteSubtypeTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConcreteSubtypeTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationLoadFieldConstantFoldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationLoadFieldConstantFoldTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationLoadFieldConstantFoldTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationLoadFieldConstantFoldTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest11.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest11.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest11.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest11.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest4.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest4.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest4.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest5.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest5.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest5.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest5.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest6.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest6.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest6.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest6.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest7.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest7.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest7.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest7.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest8.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest8.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest8.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest8.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest9.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest9.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest9.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest9.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConstantArrayReadFoldingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConstantArrayReadFoldingTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConstantArrayReadFoldingTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConstantArrayReadFoldingTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CopyOfVirtualizationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CopyOfVirtualizationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CopyOfVirtualizationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CopyOfVirtualizationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DontReuseArgumentSpaceTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DontReuseArgumentSpaceTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DontReuseArgumentSpaceTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DontReuseArgumentSpaceTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueConcreteMethodBugTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueConcreteMethodBugTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueConcreteMethodBugTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueConcreteMethodBugTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueDefaultMethodTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueDefaultMethodTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueDefaultMethodTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueDefaultMethodTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatOptimizationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatOptimizationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatOptimizationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatOptimizationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerAssumptionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerAssumptionsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerAssumptionsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerAssumptionsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphScheduleTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphScheduleTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphScheduleTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphScheduleTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardEliminationCornerCasesTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardEliminationCornerCasesTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardEliminationCornerCasesTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardEliminationCornerCasesTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardedIntrinsicTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardedIntrinsicTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardedIntrinsicTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardedIntrinsicTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashCodeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashCodeTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashCodeTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashCodeTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfReorderTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfReorderTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfReorderTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfReorderTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InfopointReasonTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InfopointReasonTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InfopointReasonTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InfopointReasonTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InstalledCodeInvalidationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InstalledCodeInvalidationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InstalledCodeInvalidationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InstalledCodeInvalidationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerStampMulFoldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerStampMulFoldTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerStampMulFoldTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerStampMulFoldTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java
similarity index 97%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java
index f580313a3fd..601fc26ad90 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java
@@ -26,15 +26,14 @@ import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
 
-import org.junit.Test;
-
 import org.graalvm.compiler.code.CompilationResult;
 import org.graalvm.compiler.test.ExportingClassLoader;
+import org.junit.Test;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
 
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.Label;
-import jdk.internal.org.objectweb.asm.MethodVisitor;
-import jdk.internal.org.objectweb.asm.Opcodes;
 import jdk.vm.ci.code.InstalledCode;
 import jdk.vm.ci.meta.ResolvedJavaMethod;
 
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryArithmeticTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryArithmeticTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryArithmeticTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryArithmeticTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MethodHandleEagerResolution.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MethodHandleEagerResolution.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MethodHandleEagerResolution.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MethodHandleEagerResolution.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NestedLoopTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NestedLoopTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NestedLoopTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NestedLoopTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePosIteratorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePosIteratorTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePosIteratorTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePosIteratorTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OnStackReplacementTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OnStackReplacementTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OnStackReplacementTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OnStackReplacementTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java
similarity index 97%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java
index ea1de661d3f..ccd10019b0d 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java
@@ -44,19 +44,17 @@ import java.util.Objects;
 import java.util.ServiceLoader;
 import java.util.Set;
 
-import org.junit.Test;
-
 import org.graalvm.compiler.options.OptionDescriptor;
 import org.graalvm.compiler.options.OptionDescriptors;
 import org.graalvm.compiler.options.OptionValue;
 import org.graalvm.compiler.test.GraalTest;
-
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.ClassVisitor;
-import jdk.internal.org.objectweb.asm.Label;
-import jdk.internal.org.objectweb.asm.MethodVisitor;
-import jdk.internal.org.objectweb.asm.Opcodes;
-import jdk.internal.org.objectweb.asm.Type;
+import org.junit.Test;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.Type;
 
 /**
  * Verifies a class declaring one or more {@linkplain OptionValue options} has a class initializer
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PhiCreationTests.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PhiCreationTests.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PhiCreationTests.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PhiCreationTests.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ProfilingInfoTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ProfilingInfoTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ProfilingInfoTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ProfilingInfoTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReentrantBlockIteratorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReentrantBlockIteratorTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReentrantBlockIteratorTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReentrantBlockIteratorTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReferenceGetLoopTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReferenceGetLoopTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReferenceGetLoopTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReferenceGetLoopTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ShortCircuitNodeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ShortCircuitNodeTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ShortCircuitNodeTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ShortCircuitNodeTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SimpleCFGTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SimpleCFGTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SimpleCFGTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SimpleCFGTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java
similarity index 98%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java
index 235f31292e6..27af889f90a 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java
@@ -83,7 +83,7 @@ public class StaticInterfaceFieldTest extends GraalTest {
         MetaAccessProvider metaAccess = providers.getMetaAccess();
 
         PhaseSuite graphBuilderSuite = new PhaseSuite<>();
-        Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
+        Plugins plugins = new Plugins(new InvocationPlugins());
         GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
         graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
         HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeWriterTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeWriterTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeWriterTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeWriterTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java
similarity index 98%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java
index 2c96072aa48..633441b981d 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java
@@ -24,10 +24,10 @@ package org.graalvm.compiler.core.test;
 
 import jdk.vm.ci.code.BailoutException;
 import jdk.vm.ci.meta.ResolvedJavaMethod;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.Label;
-import jdk.internal.org.objectweb.asm.MethodVisitor;
-import jdk.internal.org.objectweb.asm.Opcodes;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
 
 import static org.graalvm.compiler.core.common.CompilationIdentifier.INVALID_COMPILATION_ID;
 
@@ -86,7 +86,7 @@ public class UnbalancedMonitorsTest extends GraalCompilerTest implements Opcodes
         ResolvedJavaMethod method = getResolvedJavaMethod(LOADER.findClass(INNER_CLASS_NAME), name);
         try {
             StructuredGraph graph = new StructuredGraph(method, AllowAssumptions.NO, INVALID_COMPILATION_ID);
-            Plugins plugins = new Plugins(new InvocationPlugins(getMetaAccess()));
+            Plugins plugins = new Plugins(new InvocationPlugins());
             GraphBuilderConfiguration graphBuilderConfig = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
             OptimisticOptimizations optimisticOpts = OptimisticOptimizations.NONE;
 
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java
similarity index 98%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java
index 0a50d9192cf..ff82e1aabf2 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java
@@ -122,7 +122,7 @@ public class VerifyBailoutUsageTest {
         Providers providers = rt.getHostBackend().getProviders();
         MetaAccessProvider metaAccess = providers.getMetaAccess();
         PhaseSuite graphBuilderSuite = new PhaseSuite<>();
-        Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
+        Plugins plugins = new Plugins(new InvocationPlugins());
         GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
         graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
         HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java
similarity index 99%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java
index 00df7430a07..47aba0895c8 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java
@@ -300,7 +300,7 @@ public class VerifyDebugUsageTest {
         Providers providers = rt.getHostBackend().getProviders();
         MetaAccessProvider metaAccess = providers.getMetaAccess();
         PhaseSuite graphBuilderSuite = new PhaseSuite<>();
-        Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
+        Plugins plugins = new Plugins(new InvocationPlugins());
         GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
         graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
         HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java
similarity index 99%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java
index 855be893315..0b6669b70a5 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java
@@ -267,7 +267,7 @@ public class VerifyVirtualizableTest {
         Providers providers = rt.getHostBackend().getProviders();
         MetaAccessProvider metaAccess = providers.getMetaAccess();
         PhaseSuite graphBuilderSuite = new PhaseSuite<>();
-        Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
+        Plugins plugins = new Plugins(new InvocationPlugins());
         GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
         graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
         HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest4.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest4.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest4.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest5.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest5.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest5.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest5.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest6.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest6.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest6.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest6.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java
similarity index 99%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java
index ccfc04fd822..69826384295 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java
@@ -249,7 +249,7 @@ public class VerifyMethodMetricsTest {
         Providers providers = rt.getHostBackend().getProviders();
         MetaAccessProvider metaAccess = providers.getMetaAccess();
         PhaseSuite graphBuilderSuite = new PhaseSuite<>();
-        Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
+        Plugins plugins = new Plugins(new InvocationPlugins());
         GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
         graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
         HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/MonitorDeoptTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/MonitorDeoptTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/MonitorDeoptTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/MonitorDeoptTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SafepointRethrowDeoptTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SafepointRethrowDeoptTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SafepointRethrowDeoptTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SafepointRethrowDeoptTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SynchronizedMethodDeoptimizationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SynchronizedMethodDeoptimizationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SynchronizedMethodDeoptimizationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SynchronizedMethodDeoptimizationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EAMergingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EAMergingTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EAMergingTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EAMergingTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/NestedBoxingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/NestedBoxingTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/NestedBoxingTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/NestedBoxingTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAAssertionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAAssertionsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAAssertionsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAAssertionsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/RecursiveInliningTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/RecursiveInliningTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/RecursiveInliningTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/RecursiveInliningTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/GraalTutorial.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/GraalTutorial.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/GraalTutorial.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/GraalTutorial.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/InvokeGraal.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/InvokeGraal.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/InvokeGraal.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/InvokeGraal.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java
similarity index 99%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java
index 92898acf01e..4f8a61e1901 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java
@@ -253,7 +253,7 @@ public class StaticAnalysis {
                      * the code before static analysis, the classes would otherwise be not loaded
                      * yet and the bytecode parser would only create a graph.
                      */
-                    Plugins plugins = new Plugins(new InvocationPlugins(metaAccess));
+                    Plugins plugins = new Plugins(new InvocationPlugins());
                     GraphBuilderConfiguration graphBuilderConfig = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true);
                     /*
                      * For simplicity, we ignore all exception handling during the static analysis.
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysisTests.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysisTests.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysisTests.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysisTests.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThread.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThread.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThread.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThread.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThreadFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThreadFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThreadFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThreadFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompiler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompiler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompiler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompiler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompilerOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompilerOptions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompilerOptions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompilerOptions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalDebugInitializationParticipant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalDebugInitializationParticipant.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalDebugInitializationParticipant.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalDebugInitializationParticipant.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/LIRGenerationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/LIRGenerationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/LIRGenerationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/LIRGenerationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/BytecodeParserTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/BytecodeParserTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/BytecodeParserTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/BytecodeParserTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/DebugInfoBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/DebugInfoBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/DebugInfoBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/DebugInfoBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/InstructionPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/InstructionPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/InstructionPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/InstructionPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/package-info.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/package-info.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/package-info.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchResult.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchResult.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchResult.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchResult.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchPattern.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchPattern.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchPattern.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchPattern.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRule.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRule.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRule.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRule.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRuleRegistry.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRuleRegistry.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRuleRegistry.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRuleRegistry.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRules.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRules.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRules.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRules.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatement.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatement.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatement.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatement.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatementSet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatementSet.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatementSet.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatementSet.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNodes.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNodes.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNodes.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNodes.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/package-info.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/package-info.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/package-info.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/CoreCompilerConfiguration.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/CoreCompilerConfiguration.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/CoreCompilerConfiguration.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/CoreCompilerConfiguration.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyCompilerConfiguration.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyCompilerConfiguration.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyCompilerConfiguration.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyCompilerConfiguration.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/GraphChangeMonitoringPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/GraphChangeMonitoringPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/GraphChangeMonitoringPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/GraphChangeMonitoringPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/target/Backend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/target/Backend.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/target/Backend.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/target/Backend.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugHistogramTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugHistogramTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugHistogramTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugHistogramTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugTimerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugTimerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugTimerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugTimerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/CSVUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/CSVUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/CSVUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/CSVUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Debug.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Debug.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Debug.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Debug.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCloseable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCloseable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCloseable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCloseable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfig.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfig.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigCustomizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigCustomizer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigCustomizer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigCustomizer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigScope.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigScope.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigScope.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigScope.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCounter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCounter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCounter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCounter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpHandler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpHandler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpHandler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpScope.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpScope.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpScope.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpScope.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugEnvironment.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugEnvironment.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugEnvironment.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugEnvironment.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugFilter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugFilter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugFilter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugFilter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugHistogram.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugHistogram.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugHistogram.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugHistogram.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugInitializationParticipant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugInitializationParticipant.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugInitializationParticipant.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugInitializationParticipant.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMemUseTracker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMemUseTracker.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMemUseTracker.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMemUseTracker.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMethodMetrics.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMethodMetrics.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMethodMetrics.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMethodMetrics.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugTimer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugTimer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugTimer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugTimer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugValueFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugValueFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugValueFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugValueFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugVerifyHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugVerifyHandler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugVerifyHandler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugVerifyHandler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DelegatingDebugConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DelegatingDebugConfig.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DelegatingDebugConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DelegatingDebugConfig.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Fingerprint.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Fingerprint.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Fingerprint.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Fingerprint.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalDebugConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalDebugConfig.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalDebugConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalDebugConfig.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalError.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalError.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalError.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalError.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Indent.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Indent.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Indent.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Indent.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/JavaMethodContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/JavaMethodContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/JavaMethodContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/JavaMethodContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/LogStream.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/LogStream.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/LogStream.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/LogStream.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Management.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Management.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Management.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Management.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/MethodFilter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/MethodFilter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/MethodFilter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/MethodFilter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTY.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTY.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTY.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTY.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTYStreamProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTYStreamProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTYStreamProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTYStreamProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TimeSource.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TimeSource.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TimeSource.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TimeSource.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TopLevelDebugConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TopLevelDebugConfig.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TopLevelDebugConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TopLevelDebugConfig.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/AccumulatedDebugValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/AccumulatedDebugValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/AccumulatedDebugValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/AccumulatedDebugValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CloseableCounterImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CloseableCounterImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CloseableCounterImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CloseableCounterImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CounterImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CounterImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CounterImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CounterImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramAsciiPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramAsciiPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramAsciiPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramAsciiPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramRPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramRPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramRPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramRPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValueMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValueMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValueMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValuesPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValuesPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValuesPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValuesPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/KeyRegistry.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/KeyRegistry.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/KeyRegistry.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/KeyRegistry.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/MemUseTrackerImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/MemUseTrackerImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/MemUseTrackerImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/MemUseTrackerImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/TimerImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/TimerImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/TimerImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/TimerImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsInlineeScopeInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsInlineeScopeInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsInlineeScopeInfo.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsInlineeScopeInfo.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsRootScopeInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsRootScopeInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsRootScopeInfo.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsRootScopeInfo.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeUsagesTests.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeUsagesTests.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeUsagesTests.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeUsagesTests.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeValidationChecksTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeValidationChecksTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeValidationChecksTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeValidationChecksTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TestNodeInterface.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TestNodeInterface.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TestNodeInterface.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TestNodeInterface.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableContains.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableContains.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableContains.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableContains.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableCount.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableCount.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableCount.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableCount.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableIsEmpty.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableIsEmpty.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableIsEmpty.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableIsEmpty.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/.checkstyle_checks.xml b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/.checkstyle_checks.xml
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/.checkstyle_checks.xml
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/.checkstyle_checks.xml
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/CachedGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/CachedGraph.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/CachedGraph.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/CachedGraph.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/DefaultNodeCollectionsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/DefaultNodeCollectionsProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/DefaultNodeCollectionsProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/DefaultNodeCollectionsProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Edges.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Edges.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Edges.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Edges.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraalGraphError.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraalGraphError.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraalGraphError.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraalGraphError.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraphNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraphNodeIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraphNodeIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraphNodeIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/InputEdges.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/InputEdges.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/InputEdges.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/InputEdges.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/IterableNodeType.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/IterableNodeType.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/IterableNodeType.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/IterableNodeType.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeBitMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeBitMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeBitMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeBitMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeClass.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeClass.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeClass.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeClass.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeCollectionsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeCollectionsProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeCollectionsProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeCollectionsProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeFlood.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeFlood.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeFlood.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeFlood.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeIdAccessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeIdAccessor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeIdAccessor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeIdAccessor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInputList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInputList.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInputList.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInputList.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInterface.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInterface.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInterface.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInterface.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeList.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeList.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeList.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeNodeMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeNodeMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeNodeMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeNodeMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSourcePosition.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSourcePosition.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSourcePosition.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSourcePosition.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeStack.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeStack.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeStack.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeStack.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSuccessorList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSuccessorList.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSuccessorList.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSuccessorList.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUnionFind.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUnionFind.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUnionFind.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUnionFind.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageWithModCountIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageWithModCountIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageWithModCountIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageWithModCountIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeWorkList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeWorkList.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeWorkList.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeWorkList.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Position.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Position.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Position.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Position.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/SuccessorEdges.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/SuccessorEdges.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/SuccessorEdges.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/SuccessorEdges.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/TypedGraphNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/TypedGraphNodeIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/TypedGraphNodeIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/TypedGraphNodeIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/UnsafeAccess.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/UnsafeAccess.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/UnsafeAccess.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/VerificationError.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/VerificationError.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/VerificationError.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/VerificationError.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/FilteredNodeIterable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/FilteredNodeIterable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/FilteredNodeIterable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/FilteredNodeIterable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicate.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicate.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicate.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicate.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicates.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicates.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicates.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicates.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/PredicatedProxyNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/PredicatedProxyNodeIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/PredicatedProxyNodeIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/PredicatedProxyNodeIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/package-info.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/package-info.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/package-info.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Canonicalizable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Canonicalizable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Canonicalizable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Canonicalizable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/CanonicalizerTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/CanonicalizerTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/CanonicalizerTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/CanonicalizerTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Simplifiable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Simplifiable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Simplifiable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Simplifiable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/SimplifierTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/SimplifierTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/SimplifierTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/SimplifierTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackend.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackend.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackend.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallEpilogueOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallEpilogueOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallEpilogueOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallPrologueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallPrologueOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallPrologueOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallPrologueOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeCallerOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeCallerOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeCallerOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectStaticCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectStaticCallOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectStaticCallOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectStaticCallOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectVirtualCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectVirtualCallOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectVirtualCallOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectVirtualCallOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotEpilogueOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotEpilogueOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotEpilogueOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotJumpToExceptionHandlerInCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotJumpToExceptionHandlerInCallerOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotJumpToExceptionHandlerInCallerOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotJumpToExceptionHandlerInCallerOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRKindTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRKindTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRKindTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLoweringProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLoweringProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLoweringProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMove.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMove.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMove.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMove.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMoveFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMoveFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMoveFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotNodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotNodeLIRBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotNodeLIRBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotNodeLIRBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotPatchReturnAddressOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotPatchReturnAddressOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotPatchReturnAddressOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotPatchReturnAddressOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotRegisterAllocationConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotRegisterAllocationConfig.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotRegisterAllocationConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotRegisterAllocationConfig.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotReturnOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotReturnOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotReturnOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotReturnOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotStrategySwitchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotStrategySwitchOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotStrategySwitchOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotStrategySwitchOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotUnwindOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotUnwindOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotUnwindOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotUnwindOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64IndirectCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64IndirectCallOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64IndirectCallOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64IndirectCallOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArchHotSpotNodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArchHotSpotNodeCostProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArchHotSpotNodeCostProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArchHotSpotNodeCostProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/AMD64HotSpotFrameOmissionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/AMD64HotSpotFrameOmissionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/AMD64HotSpotFrameOmissionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/AMD64HotSpotFrameOmissionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/CompressedNullCheckTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/CompressedNullCheckTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/CompressedNullCheckTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/CompressedNullCheckTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/DataPatchInConstantsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/DataPatchInConstantsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/DataPatchInConstantsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/DataPatchInConstantsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/StubAVXTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/StubAVXTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/StubAVXTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/StubAVXTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizationStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizationStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizationStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizationStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizeOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizeOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizeOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizeOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotAddressLowering.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotAddressLowering.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotAddressLowering.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotAddressLowering.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotArithmeticLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotArithmeticLIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotArithmeticLIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotArithmeticLIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackend.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackend.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackend.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallEpilogueOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallEpilogueOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallEpilogueOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallPrologueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallPrologueOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallPrologueOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallPrologueOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotConstantRetrievalOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotConstantRetrievalOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotConstantRetrievalOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotConstantRetrievalOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCounterOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCounterOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCounterOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCounterOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDeoptimizeCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDeoptimizeCallerOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDeoptimizeCallerOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDeoptimizeCallerOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDirectStaticCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDirectStaticCallOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDirectStaticCallOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDirectStaticCallOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEnterUnpackFramesStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEnterUnpackFramesStackFrameOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEnterUnpackFramesStackFrameOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEnterUnpackFramesStackFrameOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueBlockEndOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueBlockEndOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueBlockEndOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueBlockEndOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java
similarity index 99%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java
index 850faa1c525..bd87349a2d4 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -497,9 +497,8 @@ public class AMD64HotSpotLIRGenerator extends AMD64LIRGenerator implements HotSp
     }
 
     @Override
-    public Value emitLoadConfigValue(int markId) {
-        // Globals are always full-pointer width.
-        Variable result = newVariable(LIRKind.value(target().arch.getWordKind()));
+    public Value emitLoadConfigValue(int markId, LIRKind kind) {
+        Variable result = newVariable(kind);
         append(new AMD64HotSpotLoadConfigValueOp(markId, result));
         return result;
     }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveCurrentStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveCurrentStackFrameOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveCurrentStackFrameOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveCurrentStackFrameOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveDeoptimizedStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveDeoptimizedStackFrameOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveDeoptimizedStackFrameOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveDeoptimizedStackFrameOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveUnpackFramesStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveUnpackFramesStackFrameOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveUnpackFramesStackFrameOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveUnpackFramesStackFrameOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadAddressOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadAddressOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadAddressOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadAddressOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java
similarity index 70%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java
index 28e2c0d6ba6..24b11237bda 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java
@@ -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
@@ -24,8 +24,12 @@ package org.graalvm.compiler.hotspot.amd64;
 
 import static org.graalvm.compiler.core.common.GraalOptions.GeneratePIC;
 import static jdk.vm.ci.code.ValueUtil.asRegister;
+
+import jdk.vm.ci.amd64.AMD64Kind;
+import jdk.vm.ci.code.Register;
 import jdk.vm.ci.meta.AllocatableValue;
 
+import org.graalvm.compiler.asm.amd64.AMD64Address;
 import org.graalvm.compiler.asm.amd64.AMD64MacroAssembler;
 import org.graalvm.compiler.debug.GraalError;
 import org.graalvm.compiler.lir.LIRInstructionClass;
@@ -48,7 +52,25 @@ public final class AMD64HotSpotLoadConfigValueOp extends AMD64LIRInstruction {
     @Override
     public void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler masm) {
         if (GeneratePIC.getValue()) {
-            masm.movq(asRegister(result), masm.getPlaceholder(-1));
+            AMD64Kind kind = (AMD64Kind) result.getPlatformKind();
+            Register reg = asRegister(result);
+            AMD64Address placeholder = masm.getPlaceholder(-1);
+            switch (kind) {
+                case BYTE:
+                    masm.movsbl(reg, placeholder);
+                    break;
+                case WORD:
+                    masm.movswl(reg, placeholder);
+                    break;
+                case DWORD:
+                    masm.movl(reg, placeholder);
+                    break;
+                case QWORD:
+                    masm.movq(reg, placeholder);
+                    break;
+                default:
+                    throw GraalError.unimplemented();
+            }
         } else {
             throw GraalError.unimplemented();
         }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoweringProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoweringProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoweringProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMathIntrinsicOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMathIntrinsicOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMathIntrinsicOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMathIntrinsicOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMove.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMove.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMove.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMove.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMoveFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMoveFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMoveFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeCostProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeCostProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeCostProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPatchReturnAddressOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPatchReturnAddressOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPatchReturnAddressOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPatchReturnAddressOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPushInterpreterFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPushInterpreterFrameOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPushInterpreterFrameOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPushInterpreterFrameOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRestoreRbpOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRestoreRbpOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRestoreRbpOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRestoreRbpOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotReturnOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotReturnOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotReturnOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotReturnOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSafepointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSafepointOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSafepointOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSafepointOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotStrategySwitchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotStrategySwitchOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotStrategySwitchOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotStrategySwitchOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSuitesProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSuitesProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSuitesProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotUnwindOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotUnwindOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotUnwindOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotUnwindOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64IndirectCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64IndirectCallOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64IndirectCallOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64IndirectCallOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64MathStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64MathStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64MathStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64MathStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64RawNativeCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64RawNativeCallNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64RawNativeCallNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64RawNativeCallNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64TailcallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64TailcallOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64TailcallOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64TailcallOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64UncommonTrapStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64UncommonTrapStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64UncommonTrapStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64UncommonTrapStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.lir.test/src/org/graalvm/compiler/hotspot/lir/test/ExceedMaxOopMapStackOffset.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.lir.test/src/org/graalvm/compiler/hotspot/lir/test/ExceedMaxOopMapStackOffset.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.lir.test/src/org/graalvm/compiler/hotspot/lir/test/ExceedMaxOopMapStackOffset.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.lir.test/src/org/graalvm/compiler/hotspot/lir/test/ExceedMaxOopMapStackOffset.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizationStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizationStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizationStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizationStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizeOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizeOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizeOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizeOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackend.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackend.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackend.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallEpilogueOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallEpilogueOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallEpilogueOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallPrologueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallPrologueOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallPrologueOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallPrologueOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCounterOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCounterOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCounterOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCounterOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotDeoptimizeCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotDeoptimizeCallerOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotDeoptimizeCallerOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotDeoptimizeCallerOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEnterUnpackFramesStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEnterUnpackFramesStackFrameOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEnterUnpackFramesStackFrameOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEnterUnpackFramesStackFrameOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEpilogueOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEpilogueOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEpilogueOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRKindTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRKindTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRKindTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveCurrentStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveCurrentStackFrameOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveCurrentStackFrameOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveCurrentStackFrameOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveDeoptimizedStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveDeoptimizedStackFrameOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveDeoptimizedStackFrameOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveDeoptimizedStackFrameOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveUnpackFramesStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveUnpackFramesStackFrameOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveUnpackFramesStackFrameOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveUnpackFramesStackFrameOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLoweringProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLoweringProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLoweringProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMove.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMove.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMove.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMove.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMoveFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMoveFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMoveFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeCostProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeCostProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeCostProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPatchReturnAddressOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPatchReturnAddressOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPatchReturnAddressOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPatchReturnAddressOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPushInterpreterFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPushInterpreterFrameOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPushInterpreterFrameOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPushInterpreterFrameOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotReturnOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotReturnOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotReturnOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotReturnOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotSafepointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotSafepointOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotSafepointOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotSafepointOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotStrategySwitchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotStrategySwitchOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotStrategySwitchOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotStrategySwitchOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotUnwindOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotUnwindOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotUnwindOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotUnwindOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCIndirectCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCIndirectCallOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCIndirectCallOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCIndirectCallOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCUncommonTrapStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCUncommonTrapStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCUncommonTrapStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCUncommonTrapStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/AheadOfTimeCompilationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/AheadOfTimeCompilationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/AheadOfTimeCompilationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/AheadOfTimeCompilationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32SubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32SubstitutionsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32SubstitutionsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32SubstitutionsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java
similarity index 89%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java
index 42d4dd453c4..9a73893a4f5 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, 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
@@ -29,15 +29,12 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
 import java.util.stream.Collectors;
 
-import org.junit.Test;
-
 import org.graalvm.compiler.api.test.Graal;
 import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
 import org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider;
@@ -45,12 +42,15 @@ import org.graalvm.compiler.hotspot.meta.HotSpotProviders;
 import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins;
 import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
 import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins;
+import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.Binding;
 import org.graalvm.compiler.runtime.RuntimeProvider;
 import org.graalvm.compiler.test.GraalTest;
+import org.junit.Test;
 
 import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
 import jdk.vm.ci.hotspot.VMIntrinsicMethod;
 import jdk.vm.ci.meta.MetaAccessProvider;
+import jdk.vm.ci.meta.MetaUtil;
 import jdk.vm.ci.meta.MethodHandleAccessProvider.IntrinsicMethod;
 import jdk.vm.ci.meta.ResolvedJavaMethod;
 
@@ -63,11 +63,10 @@ import jdk.vm.ci.meta.ResolvedJavaMethod;
  */
 public class CheckGraalIntrinsics extends GraalTest {
 
-    public static boolean match(ResolvedJavaMethod method, VMIntrinsicMethod intrinsic) {
-        if (intrinsic.name.equals(method.getName())) {
-            if (intrinsic.descriptor.equals(method.getSignature().toMethodDescriptor())) {
-                String declaringClass = method.getDeclaringClass().toClassName().replace('.', '/');
-                if (declaringClass.equals(intrinsic.declaringClass)) {
+    public static boolean match(String type, Binding binding, VMIntrinsicMethod intrinsic) {
+        if (intrinsic.name.equals(binding.name)) {
+            if (intrinsic.descriptor.startsWith(binding.argumentsDescriptor)) {
+                if (type.equals(intrinsic.declaringClass)) {
                     return true;
                 }
             }
@@ -75,16 +74,20 @@ public class CheckGraalIntrinsics extends GraalTest {
         return false;
     }
 
-    private static ResolvedJavaMethod findMethod(Set methods, VMIntrinsicMethod intrinsic) {
-        for (ResolvedJavaMethod method : methods) {
-            if (match(method, intrinsic)) {
-                return method;
+    public static InvocationPlugin findPlugin(Map> bindings, VMIntrinsicMethod intrinsic) {
+        for (Map.Entry> e : bindings.entrySet()) {
+            // Match format of VMIntrinsicMethod.declaringClass
+            String type = MetaUtil.internalNameToJava(e.getKey(), true, false).replace('.', '/');
+            for (Binding binding : e.getValue()) {
+                if (match(type, binding, intrinsic)) {
+                    return binding.plugin;
+                }
             }
         }
         return null;
     }
 
-    private static ResolvedJavaMethod resolveIntrinsic(MetaAccessProvider metaAccess, VMIntrinsicMethod intrinsic) throws ClassNotFoundException {
+    public static ResolvedJavaMethod resolveIntrinsic(MetaAccessProvider metaAccess, VMIntrinsicMethod intrinsic) throws ClassNotFoundException {
         Class c = Class.forName(intrinsic.declaringClass.replace('/', '.'), false, CheckGraalIntrinsics.class.getClassLoader());
         for (Method javaMethod : c.getDeclaredMethods()) {
             if (javaMethod.getName().equals(intrinsic.name)) {
@@ -243,21 +246,21 @@ public class CheckGraalIntrinsics extends GraalTest {
                         "jdk/internal/misc/Unsafe.allocateUninitializedArray0(Ljava/lang/Class;I)Ljava/lang/Object;",
                         "jdk/internal/misc/Unsafe.compareAndExchangeByteAcquire(Ljava/lang/Object;JBB)B",
                         "jdk/internal/misc/Unsafe.compareAndExchangeByteRelease(Ljava/lang/Object;JBB)B",
-                        "jdk/internal/misc/Unsafe.compareAndExchangeByteVolatile(Ljava/lang/Object;JBB)B",
+                        "jdk/internal/misc/Unsafe.compareAndExchangeByte(Ljava/lang/Object;JBB)B",
                         "jdk/internal/misc/Unsafe.compareAndExchangeIntAcquire(Ljava/lang/Object;JII)I",
                         "jdk/internal/misc/Unsafe.compareAndExchangeIntRelease(Ljava/lang/Object;JII)I",
-                        "jdk/internal/misc/Unsafe.compareAndExchangeIntVolatile(Ljava/lang/Object;JII)I",
+                        "jdk/internal/misc/Unsafe.compareAndExchangeInt(Ljava/lang/Object;JII)I",
                         "jdk/internal/misc/Unsafe.compareAndExchangeLongAcquire(Ljava/lang/Object;JJJ)J",
                         "jdk/internal/misc/Unsafe.compareAndExchangeLongRelease(Ljava/lang/Object;JJJ)J",
-                        "jdk/internal/misc/Unsafe.compareAndExchangeLongVolatile(Ljava/lang/Object;JJJ)J",
+                        "jdk/internal/misc/Unsafe.compareAndExchangeLong(Ljava/lang/Object;JJJ)J",
                         "jdk/internal/misc/Unsafe.compareAndExchangeObjectAcquire(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;",
                         "jdk/internal/misc/Unsafe.compareAndExchangeObjectRelease(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;",
-                        "jdk/internal/misc/Unsafe.compareAndExchangeObjectVolatile(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;",
+                        "jdk/internal/misc/Unsafe.compareAndExchangeObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;",
                         "jdk/internal/misc/Unsafe.compareAndExchangeShortAcquire(Ljava/lang/Object;JSS)S",
                         "jdk/internal/misc/Unsafe.compareAndExchangeShortRelease(Ljava/lang/Object;JSS)S",
-                        "jdk/internal/misc/Unsafe.compareAndExchangeShortVolatile(Ljava/lang/Object;JSS)S",
-                        "jdk/internal/misc/Unsafe.compareAndSwapByte(Ljava/lang/Object;JBB)Z",
-                        "jdk/internal/misc/Unsafe.compareAndSwapShort(Ljava/lang/Object;JSS)Z",
+                        "jdk/internal/misc/Unsafe.compareAndExchangeShort(Ljava/lang/Object;JSS)S",
+                        "jdk/internal/misc/Unsafe.compareAndSetByte(Ljava/lang/Object;JBB)Z",
+                        "jdk/internal/misc/Unsafe.compareAndSetShort(Ljava/lang/Object;JSS)Z",
                         "jdk/internal/misc/Unsafe.copyMemory0(Ljava/lang/Object;JLjava/lang/Object;JJ)V",
                         "jdk/internal/misc/Unsafe.getAndAddByte(Ljava/lang/Object;JB)B",
                         "jdk/internal/misc/Unsafe.getAndAddShort(Ljava/lang/Object;JS)S",
@@ -292,26 +295,26 @@ public class CheckGraalIntrinsics extends GraalTest {
                         "jdk/internal/misc/Unsafe.putObjectOpaque(Ljava/lang/Object;JLjava/lang/Object;)V",
                         "jdk/internal/misc/Unsafe.putShortOpaque(Ljava/lang/Object;JS)V",
                         "jdk/internal/misc/Unsafe.unpark(Ljava/lang/Object;)V",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapByte(Ljava/lang/Object;JBB)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapByteAcquire(Ljava/lang/Object;JBB)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapByteRelease(Ljava/lang/Object;JBB)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapByteVolatile(Ljava/lang/Object;JBB)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapInt(Ljava/lang/Object;JII)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapIntAcquire(Ljava/lang/Object;JII)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapIntRelease(Ljava/lang/Object;JII)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapIntVolatile(Ljava/lang/Object;JII)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapLong(Ljava/lang/Object;JJJ)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapLongAcquire(Ljava/lang/Object;JJJ)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapLongRelease(Ljava/lang/Object;JJJ)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapLongVolatile(Ljava/lang/Object;JJJ)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapObjectAcquire(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapObjectRelease(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapObjectVolatile(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapShort(Ljava/lang/Object;JSS)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapShortAcquire(Ljava/lang/Object;JSS)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapShortRelease(Ljava/lang/Object;JSS)Z",
-                        "jdk/internal/misc/Unsafe.weakCompareAndSwapShortVolatile(Ljava/lang/Object;JSS)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetBytePlain(Ljava/lang/Object;JBB)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetByteAcquire(Ljava/lang/Object;JBB)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetByteRelease(Ljava/lang/Object;JBB)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetByte(Ljava/lang/Object;JBB)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetIntPlain(Ljava/lang/Object;JII)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetIntAcquire(Ljava/lang/Object;JII)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetIntRelease(Ljava/lang/Object;JII)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetInt(Ljava/lang/Object;JII)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetLongPlain(Ljava/lang/Object;JJJ)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetLongAcquire(Ljava/lang/Object;JJJ)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetLongRelease(Ljava/lang/Object;JJJ)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetLong(Ljava/lang/Object;JJJ)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetObjectPlain(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetObjectAcquire(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetObjectRelease(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetShortPlain(Ljava/lang/Object;JSS)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetShortAcquire(Ljava/lang/Object;JSS)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetShortRelease(Ljava/lang/Object;JSS)Z",
+                        "jdk/internal/misc/Unsafe.weakCompareAndSetShort(Ljava/lang/Object;JSS)Z",
                         "jdk/internal/util/Preconditions.checkIndex(IILjava/util/function/BiFunction;)I",
                         "jdk/jfr/internal/JVM.counterTime()J",
                         "jdk/jfr/internal/JVM.getBufferWriter()Ljava/lang/Object;",
@@ -425,28 +428,20 @@ public class CheckGraalIntrinsics extends GraalTest {
     public void test() throws ClassNotFoundException {
         HotSpotGraalRuntimeProvider rt = (HotSpotGraalRuntimeProvider) Graal.getRequiredCapability(RuntimeProvider.class);
         HotSpotProviders providers = rt.getHostBackend().getProviders();
-        Map impl = new HashMap<>();
         Plugins graphBuilderPlugins = providers.getGraphBuilderPlugins();
         InvocationPlugins invocationPlugins = graphBuilderPlugins.getInvocationPlugins();
-        for (ResolvedJavaMethod method : invocationPlugins.getMethods()) {
-            InvocationPlugin plugin = invocationPlugins.lookupInvocation(method);
-            assert plugin != null;
-            impl.put(method, plugin);
-        }
 
-        Set methods = invocationPlugins.getMethods();
         HotSpotVMConfigStore store = rt.getVMConfig().getStore();
         List intrinsics = store.getIntrinsics();
 
         List missing = new ArrayList<>();
+        Map> bindings = invocationPlugins.getBindings(true);
         for (VMIntrinsicMethod intrinsic : intrinsics) {
-            ResolvedJavaMethod method = findMethod(methods, intrinsic);
-            if (method == null) {
-                method = resolveIntrinsic(providers.getMetaAccess(), intrinsic);
-
-                IntrinsicMethod intrinsicMethod = null;
+            InvocationPlugin plugin = findPlugin(bindings, intrinsic);
+            if (plugin == null) {
+                ResolvedJavaMethod method = resolveIntrinsic(providers.getMetaAccess(), intrinsic);
                 if (method != null) {
-                    intrinsicMethod = providers.getConstantReflection().getMethodHandleAccess().lookupMethodHandleIntrinsic(method);
+                    IntrinsicMethod intrinsicMethod = providers.getConstantReflection().getMethodHandleAccess().lookupMethodHandleIntrinsic(method);
                     if (intrinsicMethod != null) {
                         continue;
                     }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ClassSubstitutionsTests.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ClassSubstitutionsTests.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ClassSubstitutionsTests.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ClassSubstitutionsTests.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorldTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorldTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorldTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompressedOopTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompressedOopTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompressedOopTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompressedOopTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java
similarity index 98%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java
index 2585d36f861..3edc637a362 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java
@@ -39,9 +39,9 @@ import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.MethodVisitor;
-import jdk.internal.org.objectweb.asm.Opcodes;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
 import jdk.vm.ci.meta.ResolvedJavaMethod;
 
 public class ConstantPoolSubstitutionsTests extends GraalCompilerTest implements Opcodes {
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DataPatchTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DataPatchTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DataPatchTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DataPatchTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ForeignCallDeoptimizeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ForeignCallDeoptimizeTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ForeignCallDeoptimizeTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ForeignCallDeoptimizeTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRLockTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRLockTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRLockTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRLockTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTestBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTestBase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTestBase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTestBase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotGraalCompilerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotGraalCompilerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotGraalCompilerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotGraalCompilerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMonitorValueTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMonitorValueTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMonitorValueTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMonitorValueTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNmethodTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNmethodTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNmethodTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNmethodTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNodeSubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNodeSubstitutionsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNodeSubstitutionsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNodeSubstitutionsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedJavaFieldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedJavaFieldTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedJavaFieldTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedJavaFieldTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedObjectTypeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedObjectTypeTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedObjectTypeTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedObjectTypeTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/InstalledCodeExecuteHelperTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/InstalledCodeExecuteHelperTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/InstalledCodeExecuteHelperTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/InstalledCodeExecuteHelperTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/LoadJavaMirrorWithKlassTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/LoadJavaMirrorWithKlassTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/LoadJavaMirrorWithKlassTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/LoadJavaMirrorWithKlassTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java
similarity index 66%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java
index 3185b44d826..0333f9a973f 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java
@@ -22,13 +22,12 @@
  */
 package org.graalvm.compiler.hotspot.test;
 
-import java.util.List;
-import java.util.Set;
+import static org.graalvm.compiler.core.common.CompilationIdentifier.INVALID_COMPILATION_ID;
 
-import org.junit.Test;
+import java.util.List;
+import java.util.Map;
 
 import org.graalvm.compiler.api.test.Graal;
-import org.graalvm.compiler.core.common.CompilationIdentifier;
 import org.graalvm.compiler.core.test.GraalCompilerTest;
 import org.graalvm.compiler.hotspot.HotSpotGraalCompiler;
 import org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider;
@@ -37,8 +36,10 @@ import org.graalvm.compiler.nodes.StructuredGraph;
 import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins;
 import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
 import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins;
+import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.Binding;
 import org.graalvm.compiler.nodes.graphbuilderconf.MethodSubstitutionPlugin;
 import org.graalvm.compiler.runtime.RuntimeProvider;
+import org.junit.Test;
 
 import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
 import jdk.vm.ci.hotspot.VMIntrinsicMethod;
@@ -50,46 +51,27 @@ import jdk.vm.ci.runtime.JVMCI;
  */
 public class TestIntrinsicCompiles extends GraalCompilerTest {
 
-    private static boolean match(ResolvedJavaMethod method, VMIntrinsicMethod intrinsic) {
-        if (intrinsic.name.equals(method.getName())) {
-            if (intrinsic.descriptor.equals(method.getSignature().toMethodDescriptor())) {
-                String declaringClass = method.getDeclaringClass().toClassName().replace('.', '/');
-                if (declaringClass.equals(intrinsic.declaringClass)) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    private static ResolvedJavaMethod findMethod(Set methods, VMIntrinsicMethod intrinsic) {
-        for (ResolvedJavaMethod method : methods) {
-            if (match(method, intrinsic)) {
-                return method;
-            }
-        }
-        return null;
-    }
-
     @Test
     @SuppressWarnings("try")
-    public void test() {
+    public void test() throws ClassNotFoundException {
         HotSpotGraalCompiler compiler = (HotSpotGraalCompiler) JVMCI.getRuntime().getCompiler();
         HotSpotGraalRuntimeProvider rt = (HotSpotGraalRuntimeProvider) Graal.getRequiredCapability(RuntimeProvider.class);
         HotSpotProviders providers = rt.getHostBackend().getProviders();
         Plugins graphBuilderPlugins = providers.getGraphBuilderPlugins();
         InvocationPlugins invocationPlugins = graphBuilderPlugins.getInvocationPlugins();
 
-        Set pluginMethods = invocationPlugins.getMethods();
+        Map> bindings = invocationPlugins.getBindings(true);
         HotSpotVMConfigStore store = rt.getVMConfig().getStore();
         List intrinsics = store.getIntrinsics();
         for (VMIntrinsicMethod intrinsic : intrinsics) {
-            ResolvedJavaMethod method = findMethod(pluginMethods, intrinsic);
-            if (method != null) {
-                InvocationPlugin plugin = invocationPlugins.lookupInvocation(method);
-                if (plugin instanceof MethodSubstitutionPlugin && !method.isNative()) {
-                    StructuredGraph graph = compiler.getIntrinsicGraph(method, providers, CompilationIdentifier.INVALID_COMPILATION_ID);
-                    getCode(method, graph);
+            InvocationPlugin plugin = CheckGraalIntrinsics.findPlugin(bindings, intrinsic);
+            if (plugin != null) {
+                if (plugin instanceof MethodSubstitutionPlugin) {
+                    ResolvedJavaMethod method = CheckGraalIntrinsics.resolveIntrinsic(getMetaAccess(), intrinsic);
+                    if (!method.isNative()) {
+                        StructuredGraph graph = compiler.getIntrinsicGraph(method, providers, INVALID_COMPILATION_ID);
+                        getCode(method, graph);
+                    }
                 }
             }
         }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierVerificationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierVerificationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierVerificationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierVerificationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/AOTGraalHotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/AOTGraalHotSpotVMConfig.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/AOTGraalHotSpotVMConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/AOTGraalHotSpotVMConfig.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/BootstrapWatchDog.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/BootstrapWatchDog.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/BootstrapWatchDog.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/BootstrapWatchDog.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationCounters.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationCounters.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationCounters.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationCounters.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationStatistics.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationStatistics.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationStatistics.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationStatistics.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationWatchDog.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationWatchDog.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationWatchDog.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationWatchDog.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java
similarity index 99%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java
index fae52a2f352..b2542607a3f 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java
@@ -102,7 +102,6 @@ import jdk.vm.ci.meta.ConstantPool;
 import jdk.vm.ci.meta.MetaAccessProvider;
 import jdk.vm.ci.runtime.JVMCI;
 import jdk.vm.ci.runtime.JVMCICompiler;
-import jdk.vm.ci.services.Services;
 
 /**
  * This class implements compile-the-world functionality with JVMCI.
@@ -785,7 +784,6 @@ public final class CompileTheWorld {
     }
 
     public static void main(String[] args) throws Throwable {
-        Services.exportJVMCITo(CompileTheWorld.class);
         HotSpotGraalCompiler compiler = (HotSpotGraalCompiler) HotSpotJVMCIRuntime.runtime().getCompiler();
         compiler.compileTheWorld();
     }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorldOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorldOptions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorldOptions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorldOptions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerConfigurationFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerConfigurationFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerConfigurationFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerConfigurationFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerRuntimeHotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerRuntimeHotSpotVMConfig.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerRuntimeHotSpotVMConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerRuntimeHotSpotVMConfig.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompressEncoding.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompressEncoding.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompressEncoding.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompressEncoding.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CoreCompilerConfigurationFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CoreCompilerConfigurationFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CoreCompilerConfigurationFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CoreCompilerConfigurationFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/EconomyCompilerConfigurationFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/EconomyCompilerConfigurationFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/EconomyCompilerConfigurationFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/EconomyCompilerConfigurationFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/FingerprintUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/FingerprintUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/FingerprintUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/FingerprintUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
similarity index 98%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
index 898d688747d..40cd58ce8c2 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
@@ -244,7 +244,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
         return (int) (Math.log(objectAlignment) / Math.log(2));
     }
 
-    public final int narrowKlassSize = getTypeSize("narrowKlass");
+    public final int narrowKlassSize = getFieldValue("CompilerToVM::Data::sizeof_narrowKlass", Integer.class, "int");
     public final long narrowKlassBase = getFieldValue("CompilerToVM::Data::Universe_narrow_klass_base", Long.class, "address");
     public final int narrowKlassShift = getFieldValue("CompilerToVM::Data::Universe_narrow_klass_shift", Integer.class, "int");
     public final int logKlassAlignment = getConstant("LogKlassAlignmentInBytes", Integer.class);
@@ -290,7 +290,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
         return (layoutHelperArrayTagTypeValue & ~layoutHelperArrayTagObjectValue) << layoutHelperArrayTagShift;
     }
 
-    public final int vtableEntrySize = getTypeSize("vtableEntry");
+    public final int vtableEntrySize = getFieldValue("CompilerToVM::Data::sizeof_vtableEntry", Integer.class, "int");
     public final int vtableEntryMethodOffset = getFieldOffset("vtableEntry::_method", Integer.class, "Method*");
 
     public final int instanceKlassInitStateOffset = getFieldOffset("InstanceKlass::_init_state", Integer.class, "u1");
@@ -302,7 +302,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
     public final int instanceKlassStateLinked = getConstant("InstanceKlass::linked", Integer.class);
     public final int instanceKlassStateFullyInitialized = getConstant("InstanceKlass::fully_initialized", Integer.class);
 
-    public final int arrayOopDescSize = getTypeSize("arrayOopDesc");
+    public final int arrayOopDescSize = getFieldValue("CompilerToVM::Data::sizeof_arrayOopDesc", Integer.class, "int");
 
     /**
      * The offset of the array length word in an array object's header.
@@ -496,7 +496,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
     public final int compilationLevelFullOptimization = getConstant("CompLevel_full_optimization",
                     Integer.class);
 
-    public final int constantPoolSize = getTypeSize("ConstantPool");
+    public final int constantPoolSize = getFieldValue("CompilerToVM::Data::sizeof_ConstantPool", Integer.class, "int");
     public final int constantPoolLengthOffset = getFieldOffset("ConstantPool::_length",
                     Integer.class, "int");
 
@@ -553,7 +553,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
     public final int klassOffset = getFieldValue("java_lang_Class::_klass_offset", Integer.class, "int");
     public final int arrayKlassOffset = getFieldValue("java_lang_Class::_array_klass_offset", Integer.class, "int");
 
-    public final int basicLockSize = getTypeSize("BasicLock");
+    public final int basicLockSize = getFieldValue("CompilerToVM::Data::sizeof_BasicLock", Integer.class, "int");
     public final int basicLockDisplacedHeaderOffset = getFieldOffset("BasicLock::_displaced_header", Integer.class, "markOop");
 
     public final int threadAllocatedBytesOffset = getFieldOffset("Thread::_allocated_bytes", Integer.class, "jlong");
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackendFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackendFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackendFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackendFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompilationIdentifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompilationIdentifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompilationIdentifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompilationIdentifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCounterOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCounterOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCounterOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCounterOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDataBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDataBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDataBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDataBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDebugInfoBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDebugInfoBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDebugInfoBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDebugInfoBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkageImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkageImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkageImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkageImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java
similarity index 92%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java
index e7ca2262368..cab5141f0ad 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java
@@ -22,21 +22,19 @@
  */
 package org.graalvm.compiler.hotspot;
 
-import static org.graalvm.compiler.core.common.util.Util.Java8OrEarlier;
-import static org.graalvm.compiler.options.OptionValue.PROFILE_OPTIONVALUE_PROPERTY_NAME;
 import static jdk.vm.ci.common.InitTimer.timer;
+import static org.graalvm.compiler.options.OptionValue.PROFILE_OPTIONVALUE_PROPERTY_NAME;
 
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.PrintStream;
-import java.lang.reflect.Field;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.ServiceLoader;
 
-import org.graalvm.compiler.debug.GraalError;
 import org.graalvm.compiler.debug.MethodFilter;
 import org.graalvm.compiler.options.Option;
 import org.graalvm.compiler.options.OptionDescriptors;
@@ -46,10 +44,11 @@ import org.graalvm.compiler.options.OptionsParser;
 import org.graalvm.compiler.phases.tiers.CompilerConfiguration;
 
 import jdk.vm.ci.common.InitTimer;
+import jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory;
 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
 import jdk.vm.ci.hotspot.HotSpotSignature;
-import jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory;
 import jdk.vm.ci.runtime.JVMCIRuntime;
+import jdk.vm.ci.services.Services;
 
 public final class HotSpotGraalCompilerFactory extends HotSpotJVMCICompilerFactory {
 
@@ -135,8 +134,8 @@ public final class HotSpotGraalCompilerFactory extends HotSpotJVMCICompilerFacto
         if (allOptionsSettings == null) {
             try (InitTimer t = timer("InitializeOptions")) {
                 ServiceLoader loader = ServiceLoader.load(OptionDescriptors.class, OptionDescriptors.class.getClassLoader());
-                Properties savedProps = getSavedProperties(Java8OrEarlier);
-                String optionsFile = savedProps.getProperty(GRAAL_OPTIONS_FILE_PROPERTY_NAME);
+                Map savedProps = Services.getSavedProperties();
+                String optionsFile = savedProps.get(GRAAL_OPTIONS_FILE_PROPERTY_NAME);
 
                 if (optionsFile != null) {
                     File graalOptions = new File(optionsFile);
@@ -165,15 +164,15 @@ public final class HotSpotGraalCompilerFactory extends HotSpotJVMCICompilerFacto
                 }
 
                 Map optionSettings = new HashMap<>();
-                for (Map.Entry e : savedProps.entrySet()) {
-                    String name = (String) e.getKey();
+                for (Entry e : savedProps.entrySet()) {
+                    String name = e.getKey();
                     if (name.startsWith(GRAAL_OPTION_PROPERTY_PREFIX)) {
                         if (name.equals("graal.PrintFlags") || name.equals("graal.ShowFlags")) {
                             System.err.println("The " + name + " option has been removed and will be ignored. Use -XX:+JVMCIPrintProperties instead.");
                         } else if (name.equals(GRAAL_OPTIONS_FILE_PROPERTY_NAME) || name.equals(GRAAL_VERSION_PROPERTY_NAME) || name.equals(PROFILE_OPTIONVALUE_PROPERTY_NAME)) {
                             // Ignore well known properties that do not denote an option
                         } else {
-                            String value = (String) e.getValue();
+                            String value = e.getValue();
                             optionSettings.put(name.substring(GRAAL_OPTION_PROPERTY_PREFIX.length()), value);
                         }
                     }
@@ -206,18 +205,6 @@ public final class HotSpotGraalCompilerFactory extends HotSpotJVMCICompilerFacto
         }
     }
 
-    private static Properties getSavedProperties(boolean jdk8OrEarlier) {
-        try {
-            String vmClassName = jdk8OrEarlier ? "sun.misc.VM" : "jdk.internal.misc.VM";
-            Class vmClass = Class.forName(vmClassName);
-            Field savedPropsField = vmClass.getDeclaredField("savedProps");
-            savedPropsField.setAccessible(true);
-            return (Properties) savedPropsField.get(null);
-        } catch (Exception e) {
-            throw new GraalError(e);
-        }
-    }
-
     @Override
     public HotSpotGraalCompiler createCompiler(JVMCIRuntime runtime) {
         HotSpotGraalCompiler compiler = createCompiler(runtime, CompilerConfigurationFactory.selectFactory(null));
diff --git a/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java
new file mode 100644
index 00000000000..7dbda3a164f
--- /dev/null
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.graalvm.compiler.hotspot;
+
+import org.graalvm.compiler.serviceprovider.ServiceProvider;
+
+import jdk.vm.ci.hotspot.HotSpotVMEventListener;
+import jdk.vm.ci.runtime.JVMCICompilerFactory;
+import jdk.vm.ci.services.JVMCIServiceLocator;
+
+@ServiceProvider(JVMCIServiceLocator.class)
+public final class HotSpotGraalJVMCIServiceLocator extends JVMCIServiceLocator {
+
+    /**
+     * Holds the state shared between all {@link HotSpotGraalJVMCIServiceLocator} instances. This is
+     * necessary as a service provider instance is created each time the service is loaded.
+     */
+    private static final class Shared {
+        static final Shared SINGLETON = new Shared();
+
+         T getProvider(Class service, HotSpotGraalJVMCIServiceLocator locator) {
+            if (service == JVMCICompilerFactory.class) {
+                return service.cast(new HotSpotGraalCompilerFactory(locator));
+            } else if (service == HotSpotVMEventListener.class) {
+                if (graalRuntime != null) {
+                    return service.cast(new HotSpotGraalVMEventListener(graalRuntime));
+                }
+            }
+            return null;
+        }
+
+        private HotSpotGraalRuntime graalRuntime;
+
+        /**
+         * Notifies this object of the compiler created via {@link HotSpotGraalJVMCIServiceLocator}.
+         */
+        void onCompilerCreation(HotSpotGraalCompiler compiler) {
+            assert this.graalRuntime == null : "only expect a single JVMCICompiler to be created";
+            this.graalRuntime = (HotSpotGraalRuntime) compiler.getGraalRuntime();
+        }
+    }
+
+    @Override
+    public  T getProvider(Class service) {
+        return Shared.SINGLETON.getProvider(service, this);
+    }
+
+    /**
+     * Notifies this object of the compiler created via {@link HotSpotGraalJVMCIServiceLocator}.
+     */
+    @SuppressWarnings("static-method")
+    void onCompilerCreation(HotSpotGraalCompiler compiler) {
+        Shared.SINGLETON.onCompilerCreation(compiler);
+    }
+}
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotInstructionProfiling.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotInstructionProfiling.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotInstructionProfiling.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotInstructionProfiling.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerationResult.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerationResult.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerationResult.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerationResult.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java
similarity index 92%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java
index d2c61d89a9d..f2f45e24fec 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java
@@ -22,6 +22,7 @@
  */
 package org.graalvm.compiler.hotspot;
 
+import org.graalvm.compiler.core.common.LIRKind;
 import org.graalvm.compiler.debug.GraalError;
 import org.graalvm.compiler.hotspot.meta.HotSpotConstantLoadAction;
 import org.graalvm.compiler.hotspot.meta.HotSpotProviders;
@@ -141,10 +142,10 @@ public interface HotSpotLIRGenerator extends LIRGeneratorTool {
     /**
      * Emits code for a {@link LoadConstantIndirectlyNode}.
      *
-     * @param constant
+     * @param constant original constant
+     * @param action action to perform on the metaspace object
      * @return Value of loaded address in register
      */
-    @SuppressWarnings("unused")
     default Value emitLoadMetaspaceAddress(Constant constant, HotSpotConstantLoadAction action) {
         throw GraalError.unimplemented();
     }
@@ -152,21 +153,23 @@ public interface HotSpotLIRGenerator extends LIRGeneratorTool {
     /**
      * Emits code for a {@link GraalHotSpotVMConfigNode}.
      *
-     * @param markId type of address to load
+     * @param markId id of the value to load
+     * @param kind type of the value to load
      * @return value of loaded global in register
      */
-    default Value emitLoadConfigValue(int markId) {
+    default Value emitLoadConfigValue(int markId, LIRKind kind) {
         throw GraalError.unimplemented();
     }
 
     /**
      * Emits code for a {@link ResolveConstantNode} to resolve a {@link HotSpotObjectConstant}.
      *
+     * @param constant original constant
      * @param constantDescription a description of the string that need to be materialized (and
      *            interned) as java.lang.String, generated with {@link EncodedSymbolConstant}
+     * @param frameState frame state for the runtime call
      * @return Returns the address of the requested constant.
      */
-    @SuppressWarnings("unused")
     default Value emitObjectConstantRetrieval(Constant constant, Value constantDescription, LIRFrameState frameState) {
         throw GraalError.unimplemented();
     }
@@ -174,11 +177,12 @@ public interface HotSpotLIRGenerator extends LIRGeneratorTool {
     /**
      * Emits code for a {@link ResolveConstantNode} to resolve a {@link HotSpotMetaspaceConstant}.
      *
+     * @param constant original constant
      * @param constantDescription a symbolic description of the {@link HotSpotMetaspaceConstant}
      *            generated by {@link EncodedSymbolConstant}
+     * @param frameState frame state for the runtime call
      * @return Returns the address of the requested constant.
      */
-    @SuppressWarnings("unused")
     default Value emitMetaspaceConstantRetrieval(Constant constant, Value constantDescription, LIRFrameState frameState) {
         throw GraalError.unimplemented();
     }
@@ -188,12 +192,13 @@ public interface HotSpotLIRGenerator extends LIRGeneratorTool {
      * {@link HotSpotMetaspaceConstant} that represents a {@link ResolvedJavaMethod} and return the
      * corresponding MethodCounters object.
      *
+     * @param method original constant
      * @param klassHint a klass in which the method is declared
      * @param methodDescription is symbolic description of the constant generated by
      *            {@link EncodedSymbolConstant}
+     * @param frameState frame state for the runtime call
      * @return Returns the address of the requested constant.
      */
-    @SuppressWarnings("unused")
     default Value emitResolveMethodAndLoadCounters(Constant method, Value klassHint, Value methodDescription, LIRFrameState frameState) {
         throw GraalError.unimplemented();
     }
@@ -202,11 +207,13 @@ public interface HotSpotLIRGenerator extends LIRGeneratorTool {
      * Emits code for a {@link ResolveConstantNode} to resolve a klass
      * {@link HotSpotMetaspaceConstant} and run static initializer.
      *
+     *
+     * @param constant original constant
      * @param constantDescription a symbolic description of the {@link HotSpotMetaspaceConstant}
      *            generated by {@link EncodedSymbolConstant}
+     * @param frameState frame state for the runtime call
      * @return Returns the address of the requested constant.
      */
-    @SuppressWarnings("unused")
     default Value emitKlassInitializationAndRetrieval(Constant constant, Value constantDescription, LIRFrameState frameState) {
         throw GraalError.unimplemented();
     }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLockStack.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLockStack.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLockStack.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLockStack.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotNodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotNodeLIRBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotNodeLIRBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotNodeLIRBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotTTYStreamProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotTTYStreamProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotTTYStreamProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotTTYStreamProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java
similarity index 67%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java
index abae7a39549..ba759b73abb 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java
@@ -23,6 +23,7 @@
 package org.graalvm.compiler.hotspot;
 
 import java.util.Formatter;
+import java.util.Objects;
 
 /**
  * Mechanism for checking that the current Java runtime environment supports the minimum JVMCI API
@@ -37,10 +38,11 @@ import java.util.Formatter;
 class JVMCIVersionCheck {
 
     private static final int JVMCI8_MIN_MAJOR_VERSION = 0;
-    private static final int JVMCI8_MIN_MINOR_VERSION = 23;
+    private static final int JVMCI8_MIN_MINOR_VERSION = 26;
 
-    // Will be updated once an ea build with the required JVMCI API is available.
-    private static final int JVMCI9_MIN_EA_BUILD = 143;
+    // MAX_VALUE indicates that no current EA version is compatible with Graal.
+    // Note: Keep README.md in sync with the EA version support checked here.
+    private static final int JVMCI9_MIN_EA_BUILD = 176;
 
     private static void failVersionCheck(boolean exit, String reason, Object... args) {
         Formatter errorMessage = new Formatter().format(reason, args);
@@ -77,13 +79,27 @@ class JVMCIVersionCheck {
                 start += "-jvmci-".length();
                 int end = vmVersion.indexOf('.', start);
                 if (end > 0) {
-                    int major = Integer.parseInt(vmVersion.substring(start, end));
+                    int major;
+                    try {
+                        major = Integer.parseInt(vmVersion.substring(start, end));
+                    } catch (NumberFormatException e) {
+                        failVersionCheck(exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal.%n" +
+                                        "Cannot read JVMCI major version from java.vm.version property: %s.%n", vmVersion);
+                        return;
+                    }
                     start = end + 1;
                     end = start;
                     while (end < vmVersion.length() && Character.isDigit(vmVersion.charAt(end))) {
                         end++;
                     }
-                    int minor = Integer.parseInt(vmVersion.substring(start, end));
+                    int minor;
+                    try {
+                        minor = Integer.parseInt(vmVersion.substring(start, end));
+                    } catch (NumberFormatException e) {
+                        failVersionCheck(exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal.%n" +
+                                        "Cannot read JVMCI minor version from java.vm.version property: %s.%n", vmVersion);
+                        return;
+                    }
                     if (major >= JVMCI8_MIN_MAJOR_VERSION && minor >= JVMCI8_MIN_MINOR_VERSION) {
                         return;
                     }
@@ -96,7 +112,7 @@ class JVMCIVersionCheck {
                             "Cannot read JVMCI version from java.vm.version property: %s.%n", vmVersion);
         } else {
             if (vmVersion.contains("SNAPSHOT")) {
-                // The snapshot of http://hg.openjdk.java.net/jdk9/hs tip is expected to work
+                // The snapshot of http://hg.openjdk.java.net/jdk9/dev tip is expected to work
                 return;
             }
             if (vmVersion.contains("internal")) {
@@ -104,23 +120,36 @@ class JVMCIVersionCheck {
                 return;
             }
             // http://openjdk.java.net/jeps/223
-            // Only support EA builds until GA is available
-            if (vmVersion.startsWith("9-ea+")) {
-                int start = "9-ea+".length();
+            if (vmVersion.startsWith("9+")) {
+                int start = "9+".length();
                 int end = start;
                 end = start;
                 while (end < vmVersion.length() && Character.isDigit(vmVersion.charAt(end))) {
                     end++;
                 }
-                int build = Integer.parseInt(vmVersion.substring(start, end));
+                int build;
+                try {
+                    build = Integer.parseInt(vmVersion.substring(start, end));
+                } catch (NumberFormatException e) {
+                    failVersionCheck(exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal.%n" +
+                                    "Cannot read JDK9 EA build number from java.vm.version property: %s.%n", vmVersion);
+                    return;
+                }
                 if (build >= JVMCI9_MIN_EA_BUILD) {
                     return;
                 }
-                failVersionCheck(exitOnFailure, "The VM is an insufficiently recent EA JDK9 build for Graal: %d < %d.%n", build, JVMCI9_MIN_EA_BUILD);
+                // Using Object.equals suppresses Eclipse's "Dead code" warning.
+                // Unfortunately @SuppressWarnings("unused") can only be applied at method level.
+                if (Objects.equals(JVMCI9_MIN_EA_BUILD, Integer.MAX_VALUE)) {
+                    failVersionCheck(exitOnFailure, "This version of Graal is not compatible with any JDK 9 Early Access build.%n");
+                } else {
+                    failVersionCheck(exitOnFailure, "The VM is an insufficiently recent EA JDK9 build for Graal: %d < %d.%n", build, JVMCI9_MIN_EA_BUILD);
+                }
                 return;
+            } else {
+                // Graal will be compatible with all JDK versions as of 9 GA
+                // until a JVMCI API change is made in a 9u or later release.
             }
-            failVersionCheck(exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal.%n" +
-                            "Cannot read JDK9 EA build number from java.vm.version property: %s.%n", vmVersion);
         }
     }
 
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/PrintStreamOption.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/PrintStreamOption.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/PrintStreamOption.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/PrintStreamOption.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/debug/BenchmarkCounters.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/debug/BenchmarkCounters.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/debug/BenchmarkCounters.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/debug/BenchmarkCounters.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/lir/HotSpotZapRegistersPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/lir/HotSpotZapRegistersPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/lir/HotSpotZapRegistersPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/lir/HotSpotZapRegistersPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotAOTProfilingPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotAOTProfilingPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotAOTProfilingPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotAOTProfilingPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotClassInitializationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotClassInitializationPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotClassInitializationPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotClassInitializationPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantFieldProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantFieldProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantFieldProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantFieldProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantLoadAction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantLoadAction.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantLoadAction.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantLoadAction.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotDisassemblerProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotDisassemblerProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotDisassemblerProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotDisassemblerProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraalConstantFieldProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraalConstantFieldProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraalConstantFieldProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraalConstantFieldProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java
similarity index 99%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java
index 0fc8323be99..3f50151d1a0 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java
@@ -128,7 +128,7 @@ public class HotSpotGraphBuilderPlugins {
      */
     public static Plugins create(GraalHotSpotVMConfig config, HotSpotWordTypes wordTypes, MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection,
                     SnippetReflectionProvider snippetReflection, ForeignCallsProvider foreignCalls, StampProvider stampProvider, ReplacementsImpl replacements) {
-        InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(config, metaAccess);
+        InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(config);
 
         Plugins plugins = new Plugins(invocationPlugins);
         NodeIntrinsificationProvider nodeIntrinsificationProvider = new NodeIntrinsificationProvider(metaAccess, snippetReflection, foreignCalls, wordTypes);
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java
similarity index 96%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java
index 6c7f0088cd5..244579972dd 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java
@@ -38,7 +38,6 @@ import org.graalvm.compiler.nodes.type.StampTool;
 import org.graalvm.compiler.replacements.nodes.MacroNode;
 
 import jdk.vm.ci.meta.JavaKind;
-import jdk.vm.ci.meta.MetaAccessProvider;
 import jdk.vm.ci.meta.ResolvedJavaType;
 
 /**
@@ -47,8 +46,7 @@ import jdk.vm.ci.meta.ResolvedJavaType;
 final class HotSpotInvocationPlugins extends InvocationPlugins {
     final GraalHotSpotVMConfig config;
 
-    HotSpotInvocationPlugins(GraalHotSpotVMConfig config, MetaAccessProvider metaAccess) {
-        super(metaAccess);
+    HotSpotInvocationPlugins(GraalHotSpotVMConfig config) {
         this.config = config;
     }
 
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotLoweringProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotLoweringProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotLoweringProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotNodePlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotNodePlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotNodePlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotNodePlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProfilingPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProfilingPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProfilingPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProfilingPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProviders.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProviders.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProviders.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProviders.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegisters.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegisters.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegisters.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegisters.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegistersProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegistersProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegistersProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegistersProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSnippetReflectionProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSnippetReflectionProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSnippetReflectionProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSnippetReflectionProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotStampProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotStampProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotStampProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotStampProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotWordOperationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotWordOperationPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotWordOperationPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotWordOperationPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AcquiredCASLockNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AcquiredCASLockNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AcquiredCASLockNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AcquiredCASLockNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AllocaNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AllocaNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AllocaNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AllocaNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CompressionNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CompressionNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CompressionNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CompressionNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ComputeObjectAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ComputeObjectAddressNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ComputeObjectAddressNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ComputeObjectAddressNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentJavaThreadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentJavaThreadNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentJavaThreadNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentJavaThreadNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentLockNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentLockNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentLockNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentLockNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizationFetchUnrollInfoCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizationFetchUnrollInfoCallNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizationFetchUnrollInfoCallNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizationFetchUnrollInfoCallNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizeCallerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizeCallerNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizeCallerNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizeCallerNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizingStubCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizingStubCall.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizingStubCall.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizingStubCall.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DimensionsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DimensionsNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DimensionsNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DimensionsNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DirectCompareAndSwapNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DirectCompareAndSwapNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DirectCompareAndSwapNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DirectCompareAndSwapNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EnterUnpackFramesStackFrameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EnterUnpackFramesStackFrameNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EnterUnpackFramesStackFrameNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EnterUnpackFramesStackFrameNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/FastAcquireBiasedLockNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/FastAcquireBiasedLockNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/FastAcquireBiasedLockNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/FastAcquireBiasedLockNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GetObjectAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GetObjectAddressNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GetObjectAddressNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GetObjectAddressNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java
similarity index 76%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java
index cdb8160632e..8d0575fe6b5 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java
@@ -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
@@ -55,62 +55,86 @@ public class GraalHotSpotVMConfigNode extends FloatingNode implements LIRLowerab
     private final GraalHotSpotVMConfig config;
     protected final int markId;
 
+    /**
+     * Constructor for {@link #areConfigValuesConstant()}.
+     *
+     * @param config
+     */
+    public GraalHotSpotVMConfigNode(@InjectedNodeParameter GraalHotSpotVMConfig config) {
+        super(TYPE, StampFactory.forKind(JavaKind.Boolean));
+        this.config = config;
+        this.markId = 0;
+    }
+
+    /**
+     * Constructor for node intrinsics below.
+     *
+     * @param config
+     * @param markId id of the config value
+     */
+    public GraalHotSpotVMConfigNode(@InjectedNodeParameter GraalHotSpotVMConfig config, int markId) {
+        super(TYPE, StampFactory.forNodeIntrinsic());
+        this.config = config;
+        this.markId = markId;
+    }
+
+    /**
+     * Constructor with explicit type specification.
+     *
+     * @param config
+     * @param markId id of the config value
+     * @param kind explicit type of the node
+     */
     public GraalHotSpotVMConfigNode(@InjectedNodeParameter GraalHotSpotVMConfig config, int markId, JavaKind kind) {
         super(TYPE, StampFactory.forKind(kind));
         this.config = config;
         this.markId = markId;
     }
 
-    /**
-     * Constructor selected by {@link #loadConfigValue(int, JavaKind)}.
-     *
-     * @param config
-     * @param markId
-     */
-    public GraalHotSpotVMConfigNode(@InjectedNodeParameter GraalHotSpotVMConfig config, int markId) {
-        super(TYPE, StampFactory.forKind(JavaKind.Boolean));
-        this.config = config;
-        this.markId = 0;
-    }
-
     @Override
     public void generate(NodeLIRBuilderTool generator) {
-        Value res = ((HotSpotLIRGenerator) generator.getLIRGeneratorTool()).emitLoadConfigValue(markId);
+        Value res = ((HotSpotLIRGenerator) generator.getLIRGeneratorTool()).emitLoadConfigValue(markId, generator.getLIRGeneratorTool().getLIRKind(stamp));
         generator.setResult(this, res);
     }
 
     @NodeIntrinsic
-    private static native boolean isConfigValueConstant(@ConstantNodeParameter int markId);
+    private static native boolean areConfigValuesConstant();
 
-    @NodeIntrinsic
-    private static native long loadConfigValue(@ConstantNodeParameter int markId, @ConstantNodeParameter JavaKind kind);
+    @NodeIntrinsic(setStampFromReturnType = true)
+    private static native long loadLongConfigValue(@ConstantNodeParameter int markId);
+
+    @NodeIntrinsic(setStampFromReturnType = true)
+    private static native int loadIntConfigValue(@ConstantNodeParameter int markId);
+
+    @NodeIntrinsic(setStampFromReturnType = true)
+    private static native byte loadByteConfigValue(@ConstantNodeParameter int markId);
 
     public static long cardTableAddress() {
-        return loadConfigValue(cardTableAddressMark(INJECTED_VMCONFIG), JavaKind.Long);
+        return loadLongConfigValue(cardTableAddressMark(INJECTED_VMCONFIG));
     }
 
     public static boolean isCardTableAddressConstant() {
-        return isConfigValueConstant(cardTableAddressMark(INJECTED_VMCONFIG));
+        return areConfigValuesConstant();
     }
 
     public static long heapTopAddress() {
-        return loadConfigValue(heapTopAddressMark(INJECTED_VMCONFIG), JavaKind.Long);
+        return loadLongConfigValue(heapTopAddressMark(INJECTED_VMCONFIG));
     }
 
     public static long heapEndAddress() {
-        return loadConfigValue(heapEndAddressMark(INJECTED_VMCONFIG), JavaKind.Long);
+        return loadLongConfigValue(heapEndAddressMark(INJECTED_VMCONFIG));
     }
 
     public static long crcTableAddress() {
-        return loadConfigValue(crcTableAddressMark(INJECTED_VMCONFIG), JavaKind.Long);
+        return loadLongConfigValue(crcTableAddressMark(INJECTED_VMCONFIG));
     }
 
     public static int logOfHeapRegionGrainBytes() {
-        return (int) loadConfigValue(logOfHeapRegionGrainBytesMark(INJECTED_VMCONFIG), JavaKind.Byte);
+        return loadIntConfigValue(logOfHeapRegionGrainBytesMark(INJECTED_VMCONFIG));
     }
 
     public static boolean inlineContiguousAllocationSupported() {
-        return loadConfigValue(inlineContiguousAllocationSupportedMark(INJECTED_VMCONFIG), JavaKind.Byte) > 0;
+        return loadByteConfigValue(inlineContiguousAllocationSupportedMark(INJECTED_VMCONFIG)) != 0;
     }
 
     @Fold
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotDirectCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotDirectCallTargetNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotDirectCallTargetNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotDirectCallTargetNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotIndirectCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotIndirectCallTargetNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotIndirectCallTargetNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotIndirectCallTargetNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotNodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotNodeCostProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotNodeCostProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotNodeCostProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerInCallerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerInCallerNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerInCallerNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerInCallerNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveCurrentStackFrameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveCurrentStackFrameNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveCurrentStackFrameNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveCurrentStackFrameNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveDeoptimizedStackFrameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveDeoptimizedStackFrameNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveDeoptimizedStackFrameNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveDeoptimizedStackFrameNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveUnpackFramesStackFrameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveUnpackFramesStackFrameNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveUnpackFramesStackFrameNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveUnpackFramesStackFrameNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LoadIndexedPointerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LoadIndexedPointerNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LoadIndexedPointerNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LoadIndexedPointerNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/MonitorCounterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/MonitorCounterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/MonitorCounterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/MonitorCounterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PatchReturnAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PatchReturnAddressNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PatchReturnAddressNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PatchReturnAddressNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PushInterpreterFrameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PushInterpreterFrameNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PushInterpreterFrameNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PushInterpreterFrameNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SaveAllRegistersNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SaveAllRegistersNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SaveAllRegistersNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SaveAllRegistersNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetAnchorNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetAnchorNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetAnchorNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetLocationProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetLocationProxyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetLocationProxyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetLocationProxyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubStartNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubStartNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubStartNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubStartNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/UncommonTrapCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/UncommonTrapCallNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/UncommonTrapCallNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/UncommonTrapCallNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/VMErrorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/VMErrorNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/VMErrorNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/VMErrorNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/WriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/WriteBarrier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/WriteBarrier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/WriteBarrier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/EncodedSymbolNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/EncodedSymbolNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/EncodedSymbolNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/EncodedSymbolNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyFixedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyFixedNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyFixedNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyFixedNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersIndirectlyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersIndirectlyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersIndirectlyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersIndirectlyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantStubCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantStubCall.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantStubCall.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantStubCall.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersStubCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersStubCall.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersStubCall.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersStubCall.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileBranchNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileBranchNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileBranchNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileBranchNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileInvokeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileInvokeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileInvokeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileInvokeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileWithNotificationNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileWithNotificationNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileWithNotificationNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileWithNotificationNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/RandomSeedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/RandomSeedNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/RandomSeedNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/RandomSeedNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/HotSpotLIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/HotSpotLIRKindTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/HotSpotLIRKindTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/HotSpotLIRKindTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/KlassPointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/KlassPointerStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/KlassPointerStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/KlassPointerStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MetaspacePointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MetaspacePointerStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MetaspacePointerStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MetaspacePointerStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodCountersPointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodCountersPointerStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodCountersPointerStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodCountersPointerStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodPointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodPointerStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodPointerStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodPointerStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/NarrowOopStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/NarrowOopStamp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/NarrowOopStamp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/NarrowOopStamp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/package-info.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/package-info.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/package-info.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/LoadJavaMirrorWithKlassPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/LoadJavaMirrorWithKlassPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/LoadJavaMirrorWithKlassPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/LoadJavaMirrorWithKlassPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/OnStackReplacementPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/OnStackReplacementPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/OnStackReplacementPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/OnStackReplacementPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierAdditionPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierAdditionPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierAdditionPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierAdditionPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierVerificationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierVerificationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierVerificationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierVerificationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/AOTInliningPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/AOTInliningPolicy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/AOTInliningPolicy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/AOTInliningPolicy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java
similarity index 99%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java
index 46d8be12171..caa04c2c979 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java
@@ -28,9 +28,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map.Entry;
 
-import jdk.vm.ci.hotspot.HotSpotMetaspaceConstant;
-import jdk.vm.ci.meta.JavaConstant;
-
 import org.graalvm.compiler.graph.Node;
 import org.graalvm.compiler.graph.iterators.NodeIterable;
 import org.graalvm.compiler.hotspot.nodes.aot.InitializeKlassNode;
@@ -43,6 +40,9 @@ import org.graalvm.compiler.nodes.cfg.ControlFlowGraph;
 import org.graalvm.compiler.phases.BasePhase;
 import org.graalvm.compiler.phases.tiers.PhaseContext;
 
+import jdk.vm.ci.hotspot.HotSpotMetaspaceConstant;
+import jdk.vm.ci.meta.Constant;
+
 public class EliminateRedundantInitializationPhase extends BasePhase {
     /**
      * Find blocks with class initializing nodes for the class identified the by the constant node.
@@ -202,7 +202,7 @@ public class EliminateRedundantInitializationPhase extends BasePhase redundantInits = new ArrayList<>();
         for (ConstantNode node : getConstantNodes(graph)) {
-            JavaConstant constant = node.asJavaConstant();
+            Constant constant = node.asConstant();
             if (constant instanceof HotSpotMetaspaceConstant) {
                 redundantInits.addAll(processConstantNode(cfg, node));
             }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/ReplaceConstantNodesPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/ReplaceConstantNodesPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/ReplaceConstantNodesPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/ReplaceConstantNodesPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/profiling/FinalizeProfileNodesPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/profiling/FinalizeProfileNodesPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/profiling/FinalizeProfileNodesPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/profiling/FinalizeProfileNodesPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java
similarity index 94%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java
index 3dfb4210356..2240b335ed3 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java
@@ -29,8 +29,6 @@ import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.VERY_SLO
 import static org.graalvm.compiler.nodes.extended.BranchProbabilityNode.probability;
 import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
 
-import java.lang.reflect.Field;
-
 import org.graalvm.compiler.api.replacements.ClassSubstitution;
 import org.graalvm.compiler.api.replacements.MethodSubstitution;
 import org.graalvm.compiler.core.common.LocationIdentity;
@@ -61,7 +59,7 @@ public class AESCryptSubstitutions {
     static final long kOffset;
     static final long lastKeyOffset;
     static final Class AESCryptClass;
-    static final int AES_BLOCK_SIZE;
+    static final int AES_BLOCK_SIZE_IN_BYTES;
 
     static {
         try {
@@ -72,9 +70,9 @@ public class AESCryptSubstitutions {
             AESCryptClass = Class.forName("com.sun.crypto.provider.AESCrypt", true, cl);
             kOffset = UnsafeAccess.UNSAFE.objectFieldOffset(AESCryptClass.getDeclaredField("K"));
             lastKeyOffset = UnsafeAccess.UNSAFE.objectFieldOffset(AESCryptClass.getDeclaredField("lastKey"));
-            Field aesBlockSizeField = Class.forName("com.sun.crypto.provider.AESConstants", true, cl).getDeclaredField("AES_BLOCK_SIZE");
-            aesBlockSizeField.setAccessible(true);
-            AES_BLOCK_SIZE = aesBlockSizeField.getInt(null);
+            // Thankfully the AES block size is a constant (128 bits) and so we don't need to
+            // reflect on com.sun.crypto.provider.AESConstants.AES_BLOCK_SIZE.
+            AES_BLOCK_SIZE_IN_BYTES = 16;
         } catch (Exception ex) {
             throw new GraalError(ex);
         }
@@ -141,7 +139,7 @@ public class AESCryptSubstitutions {
      * Perform null and array bounds checks for arguments to a cipher operation.
      */
     static void checkArgs(byte[] in, int inOffset, byte[] out, int outOffset) {
-        if (probability(VERY_SLOW_PATH_PROBABILITY, inOffset < 0 || in.length - AES_BLOCK_SIZE < inOffset || outOffset < 0 || out.length - AES_BLOCK_SIZE < outOffset)) {
+        if (probability(VERY_SLOW_PATH_PROBABILITY, inOffset < 0 || in.length - AES_BLOCK_SIZE_IN_BYTES < inOffset || outOffset < 0 || out.length - AES_BLOCK_SIZE_IN_BYTES < outOffset)) {
             DeoptimizeNode.deopt(DeoptimizationAction.None, DeoptimizationReason.RuntimeConstraint);
         }
     }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AssertionSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AssertionSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AssertionSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AssertionSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/BigIntegerSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/BigIntegerSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/BigIntegerSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/BigIntegerSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java
similarity index 97%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java
index 218b4f0508e..1c1447d913a 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java
@@ -57,7 +57,7 @@ public class CRC32Substitutions {
         return config.crcTableAddress;
     }
 
-    @MethodSubstitution
+    @MethodSubstitution(optional = true)
     static int update(int crc, int b) {
         final long crcTableRawAddress = GraalHotSpotVMConfigNode.crcTableAddress();
 
@@ -69,7 +69,7 @@ public class CRC32Substitutions {
         return ~result;
     }
 
-    @MethodSubstitution
+    @MethodSubstitution(optional = true)
     static int updateBytes(int crc, byte[] buf, int off, int len) {
         Word bufAddr = Word.unsigned(ComputeObjectAddressNode.get(buf, arrayBaseOffset(JavaKind.Byte) + off));
         return updateBytesCRC32(UPDATE_BYTES_CRC32, crc, bufAddr, len);
@@ -84,7 +84,7 @@ public class CRC32Substitutions {
         return updateBytesCRC32(UPDATE_BYTES_CRC32, crc, bufAddr, len);
     }
 
-    @MethodSubstitution
+    @MethodSubstitution(optional = true)
     static int updateByteBuffer(int crc, long addr, int off, int len) {
         Word bufAddr = Word.unsigned(addr).add(off);
         return updateBytesCRC32(UPDATE_BYTES_CRC32, crc, bufAddr, len);
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CallSiteTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CallSiteTargetNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CallSiteTargetNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CallSiteTargetNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CipherBlockChainingSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CipherBlockChainingSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CipherBlockChainingSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CipherBlockChainingSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ClassGetHubNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ClassGetHubNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ClassGetHubNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ClassGetHubNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/EncodedSymbolConstant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/EncodedSymbolConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/EncodedSymbolConstant.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/EncodedSymbolConstant.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HashCodeSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HashCodeSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HashCodeSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HashCodeSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotClassSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotClassSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotClassSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotClassSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotspotSnippetsOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotspotSnippetsOptions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotspotSnippetsOptions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotspotSnippetsOptions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HubGetClassNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HubGetClassNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HubGetClassNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HubGetClassNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/InstanceOfSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/InstanceOfSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/InstanceOfSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/InstanceOfSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/KlassLayoutHelperNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/KlassLayoutHelperNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/KlassLayoutHelperNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/KlassLayoutHelperNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/LoadExceptionObjectSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/LoadExceptionObjectSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/LoadExceptionObjectSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/LoadExceptionObjectSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionGetCallerClassNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionGetCallerClassNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionGetCallerClassNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionGetCallerClassNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/StringToBytesSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/StringToBytesSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/StringToBytesSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/StringToBytesSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java
similarity index 98%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java
index 99fb04dde2d..e80bb98c19d 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java
@@ -45,7 +45,7 @@ import org.graalvm.compiler.word.Word;
 @ClassSubstitution(Thread.class)
 public class ThreadSubstitutions {
 
-    @MethodSubstitution(isStatic = false)
+    @MethodSubstitution(isStatic = false, optional = true)
     public static boolean isInterrupted(final Thread thisObject, boolean clearInterrupted) {
         Word javaThread = CurrentJavaThreadNode.get();
         Object thread = javaThread.readObject(threadObjectOffset(INJECTED_VMCONFIG), JAVA_THREAD_THREAD_OBJECT_LOCATION);
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/TypeCheckSnippetUtils.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/TypeCheckSnippetUtils.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/TypeCheckSnippetUtils.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/TypeCheckSnippetUtils.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeAccess.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeAccess.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeAccess.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeLoadSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeLoadSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeLoadSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeLoadSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/WriteBarrierSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/WriteBarrierSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/WriteBarrierSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/WriteBarrierSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/aot/ResolveConstantSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/aot/ResolveConstantSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/aot/ResolveConstantSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/aot/ResolveConstantSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyCallNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyCallNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyCallNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySlowPathNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySlowPathNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySlowPathNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySlowPathNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyUnrollNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyUnrollNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyUnrollNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyUnrollNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopySnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopySnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopySnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopySnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProbabilisticProfileSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProbabilisticProfileSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProbabilisticProfileSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProbabilisticProfileSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProfileSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProfileSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProfileSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProfileSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ArrayStoreExceptionStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ArrayStoreExceptionStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ArrayStoreExceptionStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ArrayStoreExceptionStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ClassCastExceptionStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ClassCastExceptionStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ClassCastExceptionStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ClassCastExceptionStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/CreateExceptionStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/CreateExceptionStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/CreateExceptionStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/CreateExceptionStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/DeoptimizationStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/DeoptimizationStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/DeoptimizationStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/DeoptimizationStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ExceptionHandlerStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ExceptionHandlerStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ExceptionHandlerStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ExceptionHandlerStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewInstanceStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewInstanceStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewInstanceStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewInstanceStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NullPointerExceptionStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NullPointerExceptionStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NullPointerExceptionStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NullPointerExceptionStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/OutOfBoundsExceptionStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/OutOfBoundsExceptionStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/OutOfBoundsExceptionStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/OutOfBoundsExceptionStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java
similarity index 81%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java
index 5d2eb3ee74b..8857bd417a6 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java
@@ -89,18 +89,11 @@ public abstract class Stub {
      */
     protected InstalledCode code;
 
-    /**
-     * Compilation result from which {@link #code} was created.
-     */
-    protected CompilationResult compResult;
-
     /**
      * The registers destroyed by this stub (from the caller's perspective).
      */
     private Set destroyedCallerRegisters;
 
-    private HotSpotCompiledCode compiledCode;
-
     public void initDestroyedCallerRegisters(Set registers) {
         assert registers != null;
         assert destroyedCallerRegisters == null || registers.equals(destroyedCallerRegisters) : "cannot redefine";
@@ -184,35 +177,13 @@ public abstract class Stub {
     public synchronized InstalledCode getCode(final Backend backend) {
         if (code == null) {
             try (Scope d = Debug.sandbox("CompilingStub", DebugScope.getConfig(), providers.getCodeCache(), debugScopeContext())) {
-                final StructuredGraph graph = getGraph(getStubCompilationId());
-
-                // Stubs cannot be recompiled so they cannot be compiled with assumptions
-                assert graph.getAssumptions() == null;
-
-                if (!(graph.start() instanceof StubStartNode)) {
-                    StubStartNode newStart = graph.add(new StubStartNode(Stub.this));
-                    newStart.setStateAfter(graph.start().stateAfter());
-                    graph.replaceFixed(graph.start(), newStart);
-                }
-
                 CodeCacheProvider codeCache = providers.getCodeCache();
-
-                compResult = new CompilationResult(toString(), GeneratePIC.getValue());
-                try (Scope s0 = Debug.scope("StubCompilation", graph, providers.getCodeCache())) {
-                    Suites suites = createSuites();
-                    emitFrontEnd(providers, backend, graph, providers.getSuites().getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, DefaultProfilingInfo.get(TriState.UNKNOWN), suites);
-                    LIRSuites lirSuites = createLIRSuites();
-                    emitBackEnd(graph, Stub.this, getInstalledCodeOwner(), backend, compResult, CompilationResultBuilderFactory.Default, getRegisterConfig(), lirSuites);
-                    assert checkStubInvariants();
-                } catch (Throwable e) {
-                    throw Debug.handle(e);
-                }
-
-                assert destroyedCallerRegisters != null;
+                CompilationResult compResult = buildCompilationResult(backend);
                 try (Scope s = Debug.scope("CodeInstall", compResult)) {
+                    assert destroyedCallerRegisters != null;
                     // Add a GeneratePIC check here later, we don't want to install
                     // code if we don't have a corresponding VM global symbol.
-                    compiledCode = HotSpotCompiledCodeBuilder.createCompiledCode(null, null, compResult);
+                    HotSpotCompiledCode compiledCode = HotSpotCompiledCodeBuilder.createCompiledCode(null, null, compResult);
                     code = codeCache.installCode(null, compiledCode, null, null, false);
                 } catch (Throwable e) {
                     throw Debug.handle(e);
@@ -226,6 +197,44 @@ public abstract class Stub {
         return code;
     }
 
+    @SuppressWarnings("try")
+    private CompilationResult buildCompilationResult(final Backend backend) {
+        CompilationResult compResult = new CompilationResult(toString(), GeneratePIC.getValue());
+        final StructuredGraph graph = getGraph(getStubCompilationId());
+
+        // Stubs cannot be recompiled so they cannot be compiled with assumptions
+        assert graph.getAssumptions() == null;
+
+        if (!(graph.start() instanceof StubStartNode)) {
+            StubStartNode newStart = graph.add(new StubStartNode(Stub.this));
+            newStart.setStateAfter(graph.start().stateAfter());
+            graph.replaceFixed(graph.start(), newStart);
+        }
+
+        try (Scope s0 = Debug.scope("StubCompilation", graph, providers.getCodeCache())) {
+            Suites suites = createSuites();
+            emitFrontEnd(providers, backend, graph, providers.getSuites().getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, DefaultProfilingInfo.get(TriState.UNKNOWN), suites);
+            LIRSuites lirSuites = createLIRSuites();
+            emitBackEnd(graph, Stub.this, getInstalledCodeOwner(), backend, compResult, CompilationResultBuilderFactory.Default, getRegisterConfig(), lirSuites);
+            assert checkStubInvariants(compResult);
+        } catch (Throwable e) {
+            throw Debug.handle(e);
+        }
+        return compResult;
+    }
+
+    /**
+     * Gets a {@link CompilationResult} that can be used for code generation. Required for AOT.
+     */
+    @SuppressWarnings("try")
+    public CompilationResult getCompilationResult(final Backend backend) {
+        try (Scope d = Debug.sandbox("CompilingStub", DebugScope.getConfig(), providers.getCodeCache(), debugScopeContext())) {
+            return buildCompilationResult(backend);
+        } catch (Throwable e) {
+            throw Debug.handle(e);
+        }
+    }
+
     public CompilationIdentifier getStubCompilationId() {
         return new StubCompilationIdentifier(this);
     }
@@ -233,7 +242,7 @@ public abstract class Stub {
     /**
      * Checks the conditions a compilation must satisfy to be installed as a RuntimeStub.
      */
-    private boolean checkStubInvariants() {
+    private boolean checkStubInvariants(CompilationResult compResult) {
         assert compResult.getExceptionHandlers().isEmpty() : this;
 
         // Stubs cannot be recompiled so they cannot be compiled with
@@ -278,24 +287,4 @@ public abstract class Stub {
         }
         return lirSuites;
     }
-
-    /**
-     * Gets the HotSpotCompiledCode that was created during installation.
-     */
-    public synchronized HotSpotCompiledCode getCompiledCode(final Backend backend) {
-        getCompilationResult(backend);
-        assert compiledCode != null;
-        return compiledCode;
-    }
-
-    /**
-     * Gets the compilation result for this stub, compiling it first if necessary, and installing it
-     * in code.
-     */
-    public synchronized CompilationResult getCompilationResult(final Backend backend) {
-        if (code == null) {
-            getCode(backend);
-        }
-        return compResult;
-    }
 }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubCompilationIdentifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubCompilationIdentifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubCompilationIdentifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubCompilationIdentifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubOptions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubOptions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubOptions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UncommonTrapStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UncommonTrapStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UncommonTrapStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UncommonTrapStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UnwindExceptionToCallerStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UnwindExceptionToCallerStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UnwindExceptionToCallerStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UnwindExceptionToCallerStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/VerifyOopStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/VerifyOopStub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/VerifyOopStub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/VerifyOopStub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotOperation.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotOperation.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotOperation.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotOperation.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotWordTypes.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotWordTypes.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotWordTypes.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotWordTypes.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/KlassPointer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/KlassPointer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/KlassPointer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/KlassPointer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MetaspacePointer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MetaspacePointer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MetaspacePointer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MetaspacePointer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodCountersPointer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodCountersPointer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodCountersPointer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodCountersPointer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodPointer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodPointer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodPointer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodPointer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/PointerCastNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/PointerCastNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/PointerCastNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/PointerCastNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BciBlockMapping.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BciBlockMapping.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BciBlockMapping.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BciBlockMapping.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParserOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParserOptions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParserOptions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParserOptions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/ComputeLoopFrequenciesClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/ComputeLoopFrequenciesClosure.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/ComputeLoopFrequenciesClosure.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/ComputeLoopFrequenciesClosure.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/DefaultSuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/DefaultSuitesProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/DefaultSuitesProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/DefaultSuitesProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/GraphBuilderPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/GraphBuilderPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/GraphBuilderPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/GraphBuilderPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrNotSupportedBailout.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrNotSupportedBailout.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrNotSupportedBailout.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrNotSupportedBailout.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrScope.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrScope.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrScope.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrScope.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LargeLocalLiveness.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LargeLocalLiveness.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LargeLocalLiveness.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LargeLocalLiveness.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LocalLiveness.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LocalLiveness.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LocalLiveness.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LocalLiveness.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SmallLocalLiveness.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SmallLocalLiveness.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SmallLocalLiveness.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SmallLocalLiveness.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SuitesProviderBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SuitesProviderBase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SuitesProviderBase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SuitesProviderBase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/JTTTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/JTTTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/JTTTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/JTTTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/ConstantPhiTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/ConstantPhiTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/ConstantPhiTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/ConstantPhiTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/EmptyMethodTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/EmptyMethodTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/EmptyMethodTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/EmptyMethodTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload_1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload_1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload_1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_0.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_0.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_0.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_anewarray.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_anewarray.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_anewarray.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_anewarray.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_areturn.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_areturn.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_areturn.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_areturn.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_arraylength.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_arraylength.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_arraylength.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_arraylength.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_athrow.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_athrow.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_athrow.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_athrow.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_baload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_baload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_baload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_baload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_bastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_bastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_bastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_bastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_caload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_caload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_caload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_caload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_castore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_castore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_castore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_castore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2f.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2f.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2f.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2f.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dadd.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dadd.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dadd.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dadd.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_daload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_daload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_daload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_daload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp06.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp06.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp06.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp07.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp07.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp07.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp08.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp08.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp08.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp08.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp09.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp09.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp09.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp09.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp10.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp10.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp10.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp10.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ddiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ddiv.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ddiv.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ddiv.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dmul.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dmul.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dmul.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dmul.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_double_base.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_double_base.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_double_base.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_double_base.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_drem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_drem.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_drem.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_drem.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dreturn.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dreturn.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dreturn.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dreturn.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2d.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2d.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2d.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2d.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fadd.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fadd.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fadd.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fadd.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_faload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_faload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_faload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_faload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp06.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp06.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp06.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp07.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp07.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp07.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp08.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp08.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp08.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp08.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp09.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp09.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp09.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp09.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp10.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp10.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp10.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp10.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fdiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fdiv.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fdiv.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fdiv.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_float_base.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_float_base.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_float_base.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_float_base.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fmul.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fmul.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fmul.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fmul.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fneg.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fneg.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fneg.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fneg.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_frem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_frem.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_frem.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_frem.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_freturn.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_freturn.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_freturn.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_freturn.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fsub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fsub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fsub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fsub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_b.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_b.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_b.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_b.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_c.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_c.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_c.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_c.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_d.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_d.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_d.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_d.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_f.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_f.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_f.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_f.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_i.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_i.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_i.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_i.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_l.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_l.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_l.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_l.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_o.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_o.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_o.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_o.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_s.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_s.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_s.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_s.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_z.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_z.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_z.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_z.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_b.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_b.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_b.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_b.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_c.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_c.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_c.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_c.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_d.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_d.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_d.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_d.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_f.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_f.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_f.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_f.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_i.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_i.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_i.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_i.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_l.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_l.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_l.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_l.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_s.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_s.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_s.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_s.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_z.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_z.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_z.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_z.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2b.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2b.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2b.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2b.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2c.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2c.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2c.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2c.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2d.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2d.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2d.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2d.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2f.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2f.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2f.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2f.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2l.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2l.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2l.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2l.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2s.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2s.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2s.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2s.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const0.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const0.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const0.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iaload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iaload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iaload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iaload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iand.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iand.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iand.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iand.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iconst.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iconst.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iconst.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iconst.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifgt.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifgt.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifgt.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifgt.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifle.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifle.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifle.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifle.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iflt.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iflt.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iflt.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iflt.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifne.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifne.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifne.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifne.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_4.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_4.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_4.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1_1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1_1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1_1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_imul.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_imul.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_imul.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_imul.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ineg.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ineg.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ineg.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ineg.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokeinterface.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokeinterface.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokeinterface.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokeinterface.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokestatic.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokestatic.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokestatic.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokestatic.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokevirtual.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokevirtual.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokevirtual.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokevirtual.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ior.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ior.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ior.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ior.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ireturn.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ireturn.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ireturn.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ireturn.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishr.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishr.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishr.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishr.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_isub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_isub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_isub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_isub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iushr.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iushr.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iushr.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iushr.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ixor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ixor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ixor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ixor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2d.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2d.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2d.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2d.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2f.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2f.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2f.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2f.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_laload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_laload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_laload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_laload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_land.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_land.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_land.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_land.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lcmp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lcmp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lcmp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lcmp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_06.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_06.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_06.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_0.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_0.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_0.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lmul.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lmul.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lmul.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lmul.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lneg.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lneg.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lneg.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lneg.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lreturn.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lreturn.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lreturn.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lreturn.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lsub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lsub.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lsub.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lsub.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lushr.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lushr.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lushr.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lushr.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lxor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lxor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lxor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lxor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_new.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_new.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_new.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_new.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_newarray.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_newarray.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_newarray.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_newarray.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putstatic.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putstatic.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putstatic.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putstatic.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_saload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_saload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_saload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_saload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_sastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_sastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_sastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_sastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch4.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch4.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch4.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload0.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload0.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload0.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore0.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore0.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore0.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_anewarray.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_anewarray.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_anewarray.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_anewarray.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_arraylength.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_arraylength.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_arraylength.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_arraylength.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow0.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow0.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow0.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_baload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_baload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_baload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_baload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_bastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_bastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_bastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_bastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_caload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_caload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_caload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_caload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_castore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_castore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_castore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_castore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast3.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast3.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast3.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast4.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast4.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast4.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast5.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast5.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast5.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast5.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast6.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast6.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast6.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast6.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_daload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_daload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_daload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_daload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_dastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_dastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_dastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_dastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_faload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_faload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_faload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_faload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_fastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_fastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_fastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_fastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iaload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iaload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iaload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iaload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokespecial01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokespecial01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokespecial01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokespecial01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_irem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_irem.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_irem.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_irem.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_laload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_laload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_laload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_laload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lrem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lrem.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lrem.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lrem.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_monitorenter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_monitorenter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_monitorenter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_monitorenter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_multianewarray.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_multianewarray.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_multianewarray.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_multianewarray.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_newarray.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_newarray.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_newarray.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_newarray.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_putfield.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_putfield.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_putfield.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_putfield.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_saload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_saload.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_saload.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_saload.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_sastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_sastore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_sastore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_sastore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_00.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_00.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_00.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_00.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_06.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_06.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_06.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_07.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_07.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_07.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_08.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_08.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_08.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_08.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_09.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_09.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_09.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_09.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_10.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_10.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_10.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_10.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_11.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_11.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_11.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_11.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Locals.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Locals.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Locals.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Locals.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_AIOOBE_00.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_AIOOBE_00.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_AIOOBE_00.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_AIOOBE_00.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_CCE_00.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_CCE_00.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_CCE_00.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_CCE_00.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_00.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_00.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_00.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_00.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InNested.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InNested.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InNested.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InNested.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_NPE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_NPE_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_NPE_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_NPE_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_convert01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_convert01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_convert01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_convert01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_count.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_count.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_count.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_count.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_dead01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_dead01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_dead01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_dead01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_demo01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_demo01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_demo01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_demo01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_idea.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_idea.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_idea.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_idea.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_invoke01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_invoke01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_invoke01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_invoke01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_life.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_life.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_life.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_life.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_series.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_series.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_series.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_series.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_trees01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_trees01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_trees01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_trees01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6186134.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6186134.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6186134.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6186134.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6196102.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6196102.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6196102.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6196102.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6753639.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6753639.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6753639.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6753639.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6823354.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6823354.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6823354.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6823354.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6850611.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6850611.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6850611.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6850611.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6959129.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6959129.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6959129.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6959129.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test7005594.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test7005594.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test7005594.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test7005594.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/CharacterBits.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/CharacterBits.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/CharacterBits.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/CharacterBits.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Class_getName.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Class_getName.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Class_getName.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Class_getName.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/DivideUnsigned.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/DivideUnsigned.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/DivideUnsigned.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/DivideUnsigned.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/IntegerBits.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/IntegerBits.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/IntegerBits.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/IntegerBits.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/LongBits.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/LongBits.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/LongBits.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/LongBits.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/ShortBits.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/ShortBits.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/ShortBits.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/ShortBits.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_setOut.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_setOut.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_setOut.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_setOut.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Thread_setName.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Thread_setName.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Thread_setName.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Thread_setName.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAccess01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAccess01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAccess01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAccess01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAllocateInstance01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAllocateInstance01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAllocateInstance01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAllocateInstance01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwapNullCheck.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwapNullCheck.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwapNullCheck.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwapNullCheck.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Boxed_TYPE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Boxed_TYPE_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Boxed_TYPE_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Boxed_TYPE_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Bridge_method01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Bridge_method01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Bridge_method01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Bridge_method01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ClassLoader_loadClass01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ClassLoader_loadClass01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ClassLoader_loadClass01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ClassLoader_loadClass01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_Literal01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_Literal01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_Literal01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_Literal01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_asSubclass01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_asSubclass01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_asSubclass01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_asSubclass01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getComponentType01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getComponentType01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getComponentType01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getComponentType01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getInterfaces01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getInterfaces01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getInterfaces01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getInterfaces01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSuperClass01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSuperClass01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSuperClass01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSuperClass01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isArray01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isArray01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isArray01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isArray01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance06.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance06.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance06.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance07.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance07.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance07.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInterface01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInterface01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInterface01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInterface01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isPrimitive01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isPrimitive01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isPrimitive01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isPrimitive01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_conditional.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_conditional.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_conditional.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_conditional.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_toString.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_toString.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_toString.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_toString.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_conditional.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_conditional.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_conditional.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_conditional.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/LambdaEagerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/LambdaEagerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/LambdaEagerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/LambdaEagerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_abs.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_abs.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_abs.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_abs.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_cos.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_cos.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_cos.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_cos.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exact.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exact.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exact.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exact.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log10.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log10.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log10.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log10.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_pow.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_pow.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_pow.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_pow.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_round.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_round.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_round.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_round.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sqrt.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sqrt.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sqrt.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sqrt.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_tan.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_tan.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_tan.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_tan.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_equals01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_equals01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_equals01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_equals01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_getClass01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_getClass01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_getClass01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_getClass01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ProcessEnvironment_init.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ProcessEnvironment_init.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ProcessEnvironment_init.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ProcessEnvironment_init.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/StringCoding_Scale.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/StringCoding_Scale.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/StringCoding_Scale.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/StringCoding_Scale.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_valueOf01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_valueOf01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_valueOf01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_valueOf01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/System_identityHashCode01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/System_identityHashCode01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/System_identityHashCode01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/System_identityHashCode01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/DegeneratedLoop.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/DegeneratedLoop.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/DegeneratedLoop.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/DegeneratedLoop.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop06.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop06.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop06.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop08.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop08.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop08.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop08.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09_2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09_2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09_2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop11.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop11.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop11.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop11.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop12.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop12.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop12.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop12.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop13.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop13.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop13.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop13.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop14.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop14.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop14.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop14.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop15.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop15.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop15.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop15.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop16.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop16.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop16.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop17.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop17.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop17.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop17.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopEscape.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopEscape.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopEscape.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopEscape.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopInline.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopInline.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopInline.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopInline.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopLastIndexOf.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopLastIndexOf.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopLastIndexOf.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopLastIndexOf.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopNewInstance.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopNewInstance.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopNewInstance.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopNewInstance.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopParseLong.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopParseLong.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopParseLong.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopParseLong.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhi.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhi.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhi.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhi.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhiResolutionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhiResolutionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhiResolutionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhiResolutionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSpilling.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSpilling.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSpilling.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSpilling.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSwitch01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSwitch01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSwitch01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSwitch01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopUnroll.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopUnroll.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopUnroll.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopUnroll.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/SpillLoopPhiVariableAtDefinition.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/SpillLoopPhiVariableAtDefinition.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/SpillLoopPhiVariableAtDefinition.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/SpillLoopPhiVariableAtDefinition.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BC_invokevirtual2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BC_invokevirtual2.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BC_invokevirtual2.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BC_invokevirtual2.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigByteParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigByteParams01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigByteParams01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigByteParams01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigDoubleParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigDoubleParams02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigDoubleParams02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigDoubleParams02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigInterfaceParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigInterfaceParams01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigInterfaceParams01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigInterfaceParams01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigLongParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigLongParams02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigLongParams02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigLongParams02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigParamsAlignment.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigParamsAlignment.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigParamsAlignment.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigParamsAlignment.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigShortParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigShortParams01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigShortParams01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigShortParams01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigVirtualParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigVirtualParams01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigVirtualParams01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigVirtualParams01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Bubblesort.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Bubblesort.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Bubblesort.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Bubblesort.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ConstantLoadTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ConstantLoadTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ConstantLoadTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ConstantLoadTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Fibonacci.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Fibonacci.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Fibonacci.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Fibonacci.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/FloatingReads.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/FloatingReads.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/FloatingReads.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/FloatingReads.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Matrix01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Matrix01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Matrix01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Matrix01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ReferenceMap01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ReferenceMap01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ReferenceMap01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ReferenceMap01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/StrangeFrames.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/StrangeFrames.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/StrangeFrames.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/StrangeFrames.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_String01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_String01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_String01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_String01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_Unroll.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_Unroll.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_Unroll.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_Unroll.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_boolean01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_boolean01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_boolean01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_boolean01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_byte01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_byte01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_byte01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_byte01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_char01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_char01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_char01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_char01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_double01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_double01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_double01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_double01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_float01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_float01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_float01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_float01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_int01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_int01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_int01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_int01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_long01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_long01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_long01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_long01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_short01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_short01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_short01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_short01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy06.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy06.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy06.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopyGeneric.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopyGeneric.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopyGeneric.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopyGeneric.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayLength01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayLength01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayLength01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayLength01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_16.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_16.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_16.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_4.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_4.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_4.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_16.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_16.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_16.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_4.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_4.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_4.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_16.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_16.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_16.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_4.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_4.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_4.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_16.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_16.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_16.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_4.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_4.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_4.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C16.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C16.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C16.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C24.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C24.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C24.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C24.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C32.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C32.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C32.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C32.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BlockSkip01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BlockSkip01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BlockSkip01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BlockSkip01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BoxingIdentity.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BoxingIdentity.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BoxingIdentity.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BoxingIdentity.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Conditional01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Conditional01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Conditional01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Conditional01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConvertCompare.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConvertCompare.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConvertCompare.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConvertCompare.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Cast01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Cast01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Cast01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Cast01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_InstanceOf01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_InstanceOf01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_InstanceOf01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_InstanceOf01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Math01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Math01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Math01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Math01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/InferStamp01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/InferStamp01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/InferStamp01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/InferStamp01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LLE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LLE_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LLE_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LLE_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/List_reorder_bug.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/List_reorder_bug.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/List_reorder_bug.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/List_reorder_bug.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Logic0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Logic0.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Logic0.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Logic0.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LongToSomethingArray01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LongToSomethingArray01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LongToSomethingArray01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LongToSomethingArray01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ReassociateConstants.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ReassociateConstants.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ReassociateConstants.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ReassociateConstants.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Convert01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Convert01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Convert01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Convert01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Double01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Double01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Double01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Double01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Float01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Float01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Float01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Float01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SchedulingBug_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SchedulingBug_01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SchedulingBug_01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SchedulingBug_01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SignExtendShort.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SignExtendShort.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SignExtendShort.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SignExtendShort.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TypeCastElem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TypeCastElem.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TypeCastElem.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TypeCastElem.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/UnsafeDeopt.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/UnsafeDeopt.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/UnsafeDeopt.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/UnsafeDeopt.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Loop01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Loop01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Loop01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Loop01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getBoolean01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getBoolean01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getBoolean01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getBoolean01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getByte01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getByte01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getByte01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getByte01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getChar01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getChar01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getChar01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getChar01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getDouble01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getDouble01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getDouble01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getDouble01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getFloat01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getFloat01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getFloat01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getFloat01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getInt01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getInt01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getInt01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getInt01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLength01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLength01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLength01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLength01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLong01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLong01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLong01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLong01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getShort01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getShort01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getShort01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getShort01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance06.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance06.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance06.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setBoolean01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setBoolean01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setBoolean01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setBoolean01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setByte01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setByte01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setByte01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setByte01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setChar01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setChar01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setChar01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setChar01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setDouble01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setDouble01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setDouble01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setDouble01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setFloat01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setFloat01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setFloat01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setFloat01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setInt01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setInt01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setInt01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setInt01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setLong01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setLong01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setLong01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setLong01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setShort01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setShort01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setShort01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setShort01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredField01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredField01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredField01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredField01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredMethod01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredMethod01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredMethod01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredMethod01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance06.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance06.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance06.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance07.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance07.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance07.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_getType01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_getType01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_getType01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_getType01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_except01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_except01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_except01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_except01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_virtual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_virtual01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_virtual01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_virtual01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getParameterTypes01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getParameterTypes01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getParameterTypes01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getParameterTypes01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getReturnType01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getReturnType01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getReturnType01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getReturnType01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_contended01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_contended01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_contended01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_contended01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_notowner01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_notowner01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_notowner01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_notowner01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/SynchronizedLoopExit01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/SynchronizedLoopExit01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/SynchronizedLoopExit01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/SynchronizedLoopExit01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_currentThread01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_currentThread01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_currentThread01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_currentThread01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_holdsLock01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_holdsLock01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_holdsLock01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_holdsLock01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isAlive01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isAlive01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isAlive01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isAlive01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted04.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted04.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted04.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted05.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted05.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted05.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join03.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join03.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join03.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new02.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new02.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new02.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_setPriority01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_setPriority01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_setPriority01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_setPriority01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_sleep01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_sleep01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_sleep01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_sleep01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_yield01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_yield01.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_yield01.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_yield01.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AddressValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AddressValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AddressValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AddressValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticLIRGeneratorTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticLIRGeneratorTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticLIRGeneratorTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticLIRGeneratorTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BitManipulationOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BitManipulationOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BitManipulationOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BitManipulationOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BlockEndOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BlockEndOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BlockEndOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BlockEndOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BreakpointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BreakpointOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BreakpointOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BreakpointOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Call.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Call.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Call.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Call.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Compare.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Compare.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Compare.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Compare.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMapBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMapBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMapBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64LIRInstruction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64LIRInstruction.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64LIRInstruction.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64LIRInstruction.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PauseOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PauseOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PauseOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PauseOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PrefetchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PrefetchOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PrefetchOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PrefetchOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ReinterpretOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ReinterpretOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ReinterpretOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ReinterpretOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64SignExtendOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64SignExtendOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64SignExtendOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64SignExtendOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64AddressValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64AddressValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64AddressValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64AddressValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Arithmetic.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Arithmetic.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Arithmetic.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Arithmetic.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArithmeticLIRGeneratorTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArithmeticLIRGeneratorTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArithmeticLIRGeneratorTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArithmeticLIRGeneratorTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayEqualsOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayEqualsOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayEqualsOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayEqualsOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Binary.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Binary.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Binary.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Binary.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BinaryConsumer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BinaryConsumer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BinaryConsumer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BinaryConsumer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BlockEndOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BlockEndOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BlockEndOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BlockEndOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BreakpointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BreakpointOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BreakpointOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BreakpointOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ByteSwapOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ByteSwapOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ByteSwapOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ByteSwapOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64CCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64CCall.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64CCall.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64CCall.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Call.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Call.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Call.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Call.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ClearRegisterOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ClearRegisterOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ClearRegisterOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ClearRegisterOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ControlFlow.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ControlFlow.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ControlFlow.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ControlFlow.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMapBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMapBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMapBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64LIRInstruction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64LIRInstruction.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64LIRInstruction.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64LIRInstruction.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicBinaryOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicBinaryOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicBinaryOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicBinaryOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicUnaryOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicUnaryOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicUnaryOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicUnaryOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MulDivOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MulDivOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MulDivOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MulDivOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PauseOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PauseOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PauseOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PauseOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PrefetchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PrefetchOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PrefetchOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PrefetchOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ReadTimestampCounter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ReadTimestampCounter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ReadTimestampCounter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ReadTimestampCounter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64RestoreRegistersOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64RestoreRegistersOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64RestoreRegistersOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64RestoreRegistersOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SaveRegistersOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SaveRegistersOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SaveRegistersOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SaveRegistersOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ShiftOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ShiftOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ShiftOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ShiftOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SignExtendOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SignExtendOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SignExtendOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SignExtendOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Unary.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Unary.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Unary.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Unary.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64VZeroUpper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64VZeroUpper.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64VZeroUpper.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64VZeroUpper.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapRegistersOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapRegistersOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapRegistersOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapRegistersOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapStackOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapStackOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapStackOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapStackOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/phases/StackMoveOptimizationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/phases/StackMoveOptimizationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/phases/StackMoveOptimizationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/phases/StackMoveOptimizationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/ConstantStackCastTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/ConstantStackCastTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/ConstantStackCastTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/ConstantStackCastTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestSpecification.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestSpecification.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestSpecification.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestSpecification.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/SPARCBranchBailoutTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/SPARCBranchBailoutTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/SPARCBranchBailoutTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/SPARCBranchBailoutTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/StackMoveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/StackMoveTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/StackMoveTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/StackMoveTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCAddressValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCAddressValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCAddressValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCAddressValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArithmetic.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArithmetic.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArithmetic.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArithmetic.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArrayEqualsOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArrayEqualsOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArrayEqualsOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArrayEqualsOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBitManipulationOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBitManipulationOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBitManipulationOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBitManipulationOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBlockEndOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBlockEndOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBlockEndOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBlockEndOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBreakpointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBreakpointOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBreakpointOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBreakpointOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCByteSwapOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCByteSwapOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCByteSwapOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCByteSwapOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCCall.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCCall.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCCall.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCDelayedControlTransfer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCDelayedControlTransfer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCDelayedControlTransfer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCDelayedControlTransfer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFloatCompareOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFloatCompareOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFloatCompareOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFloatCompareOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMapBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMapBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMapBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCImmediateAddressValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCImmediateAddressValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCImmediateAddressValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCImmediateAddressValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCIndexedAddressValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCIndexedAddressValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCIndexedAddressValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCIndexedAddressValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCJumpOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCJumpOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCJumpOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCJumpOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstruction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstruction.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstruction.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstruction.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstructionMixin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstructionMixin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstructionMixin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstructionMixin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLoadConstantTableBaseOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLoadConstantTableBaseOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLoadConstantTableBaseOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLoadConstantTableBaseOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCMove.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCMove.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCMove.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCMove.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOP3Op.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOP3Op.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOP3Op.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOP3Op.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOPFOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOPFOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOPFOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOPFOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPauseOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPauseOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPauseOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPauseOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPrefetchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPrefetchOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPrefetchOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPrefetchOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCSaveRegistersOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCSaveRegistersOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCSaveRegistersOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCSaveRegistersOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCTailDelayedLIRInstruction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCTailDelayedLIRInstruction.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCTailDelayedLIRInstruction.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCTailDelayedLIRInstruction.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/CompositeValueReplacementTest1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/CompositeValueReplacementTest1.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/CompositeValueReplacementTest1.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/CompositeValueReplacementTest1.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/GenericValueMapTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/GenericValueMapTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/GenericValueMapTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/GenericValueMapTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/alloc/trace/TraceGlobalMoveResolutionMappingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/alloc/trace/TraceGlobalMoveResolutionMappingTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/alloc/trace/TraceGlobalMoveResolutionMappingTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/alloc/trace/TraceGlobalMoveResolutionMappingTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/BailoutAndRestartBackendException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/BailoutAndRestartBackendException.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/BailoutAndRestartBackendException.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/BailoutAndRestartBackendException.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValueClass.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValueClass.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValueClass.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValueClass.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ConstantValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ConstantValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ConstantValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ConstantValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ControlFlowOptimizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ControlFlowOptimizer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ControlFlowOptimizer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ControlFlowOptimizer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/EdgeMoveOptimizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/EdgeMoveOptimizer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/EdgeMoveOptimizer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/EdgeMoveOptimizer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/FullInfopointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/FullInfopointOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/FullInfopointOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/FullInfopointOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionStateProcedure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionStateProcedure.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionStateProcedure.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionStateProcedure.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueConsumer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueConsumer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueConsumer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueConsumer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueProcedure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueProcedure.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueProcedure.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueProcedure.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIR.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIR.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIR.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIR.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRFrameState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRFrameState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRFrameState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRFrameState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInsertionBuffer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInsertionBuffer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInsertionBuffer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInsertionBuffer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstruction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstruction.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstruction.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstruction.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstructionClass.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstructionClass.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstructionClass.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstructionClass.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRValueUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRValueUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRValueUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRValueUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LabelRef.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LabelRef.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LabelRef.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LabelRef.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/NullCheckOptimizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/NullCheckOptimizer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/NullCheckOptimizer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/NullCheckOptimizer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Opcode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Opcode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Opcode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Opcode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/RedundantMoveElimination.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/RedundantMoveElimination.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/RedundantMoveElimination.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/RedundantMoveElimination.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StandardOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StandardOp.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StandardOp.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StandardOp.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StateProcedure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StateProcedure.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StateProcedure.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StateProcedure.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/SwitchStrategy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/SwitchStrategy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/SwitchStrategy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/SwitchStrategy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueConsumer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueConsumer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueConsumer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueConsumer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueProcedure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueProcedure.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueProcedure.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueProcedure.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Variable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Variable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Variable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Variable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/VirtualStackSlot.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/VirtualStackSlot.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/VirtualStackSlot.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/VirtualStackSlot.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/AllocationStageVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/AllocationStageVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/AllocationStageVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/AllocationStageVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/OutOfRegistersException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/OutOfRegistersException.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/OutOfRegistersException.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/OutOfRegistersException.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/SaveCalleeSaveRegisters.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/SaveCalleeSaveRegisters.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/SaveCalleeSaveRegisters.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/SaveCalleeSaveRegisters.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Interval.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Interval.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Interval.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Interval.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/IntervalWalker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/IntervalWalker.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/IntervalWalker.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/IntervalWalker.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScan.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScan.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScan.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScan.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanAssignLocationsPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanAssignLocationsPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanAssignLocationsPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanAssignLocationsPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanEliminateSpillMovePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanEliminateSpillMovePhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanEliminateSpillMovePhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanEliminateSpillMovePhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanIntervalDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanIntervalDumper.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanIntervalDumper.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanIntervalDumper.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanOptimizeSpillPositionPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanOptimizeSpillPositionPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanOptimizeSpillPositionPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanOptimizeSpillPositionPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanRegisterAllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanRegisterAllocationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanRegisterAllocationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanRegisterAllocationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanResolveDataFlowPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanResolveDataFlowPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanResolveDataFlowPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanResolveDataFlowPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanWalker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanWalker.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanWalker.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanWalker.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/MoveResolver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/MoveResolver.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/MoveResolver.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/MoveResolver.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/OptimizingLinearScanWalker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/OptimizingLinearScanWalker.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/OptimizingLinearScanWalker.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/OptimizingLinearScanWalker.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Range.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Range.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Range.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Range.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/RegisterVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/RegisterVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/RegisterVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/RegisterVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScan.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScan.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScan.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScan.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanEliminateSpillMovePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanEliminateSpillMovePhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanEliminateSpillMovePhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanEliminateSpillMovePhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanLifetimeAnalysisPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanLifetimeAnalysisPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanLifetimeAnalysisPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanLifetimeAnalysisPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanResolveDataFlowPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanResolveDataFlowPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanResolveDataFlowPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanResolveDataFlowPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSAMoveResolver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSAMoveResolver.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSAMoveResolver.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSAMoveResolver.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/DefaultTraceRegisterAllocationPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/DefaultTraceRegisterAllocationPolicy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/DefaultTraceRegisterAllocationPolicy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/DefaultTraceRegisterAllocationPolicy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/ShadowedRegisterValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/ShadowedRegisterValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/ShadowedRegisterValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/ShadowedRegisterValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceBuilderPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceBuilderPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceBuilderPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceBuilderPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolutionPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolutionPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolutionPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolutionPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolver.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolver.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolver.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPolicy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPolicy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPolicy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TrivialTraceAllocator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TrivialTraceAllocator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TrivialTraceAllocator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TrivialTraceAllocator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/bu/BottomUpAllocator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/bu/BottomUpAllocator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/bu/BottomUpAllocator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/bu/BottomUpAllocator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedInterval.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedInterval.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedInterval.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedInterval.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedRange.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedRange.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedRange.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedRange.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/IntervalHint.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/IntervalHint.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/IntervalHint.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/IntervalHint.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/RegisterVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/RegisterVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/RegisterVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/RegisterVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceInterval.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceInterval.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceInterval.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceInterval.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceIntervalWalker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceIntervalWalker.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceIntervalWalker.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceIntervalWalker.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAllocationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAllocationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAllocationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAssignLocationsPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAssignLocationsPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAssignLocationsPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAssignLocationsPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanEliminateSpillMovePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanEliminateSpillMovePhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanEliminateSpillMovePhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanEliminateSpillMovePhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanLifetimeAnalysisPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanLifetimeAnalysisPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanLifetimeAnalysisPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanLifetimeAnalysisPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanRegisterAllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanRegisterAllocationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanRegisterAllocationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanRegisterAllocationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanResolveDataFlowPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanResolveDataFlowPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanResolveDataFlowPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanResolveDataFlowPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanWalker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanWalker.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanWalker.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanWalker.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLocalMoveResolver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLocalMoveResolver.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLocalMoveResolver.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLocalMoveResolver.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/ArrayDataPointerConstant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/ArrayDataPointerConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/ArrayDataPointerConstant.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/ArrayDataPointerConstant.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilderFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilderFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilderFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilderFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/DataBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/DataBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/DataBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/DataBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/FrameContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/FrameContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/FrameContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/FrameContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantLoadOptimization.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantLoadOptimization.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantLoadOptimization.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantLoadOptimization.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTree.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTree.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTree.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTree.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTreeAnalyzer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTreeAnalyzer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTreeAnalyzer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTreeAnalyzer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/DefUseTree.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/DefUseTree.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/DefUseTree.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/DefUseTree.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/UseEntry.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/UseEntry.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/UseEntry.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/UseEntry.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/VariableMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/VariableMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/VariableMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/VariableMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/IntervalDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/IntervalDumper.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/IntervalDumper.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/IntervalDumper.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/LIRGenerationDebugContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/LIRGenerationDebugContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/LIRGenerationDebugContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/LIRGenerationDebugContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarker.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarker.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarker.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarkerPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarkerPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarkerPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarkerPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/MarkBasePointersPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/MarkBasePointersPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/MarkBasePointersPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/MarkBasePointersPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/RegStackValueSet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/RegStackValueSet.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/RegStackValueSet.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/RegStackValueSet.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/UniqueWorkList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/UniqueWorkList.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/UniqueWorkList.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/UniqueWorkList.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/ReferenceMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/ReferenceMapBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/ReferenceMapBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/ReferenceMapBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/SimpleVirtualStackSlot.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/SimpleVirtualStackSlot.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/SimpleVirtualStackSlot.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/SimpleVirtualStackSlot.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/VirtualStackSlotRange.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/VirtualStackSlotRange.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/VirtualStackSlotRange.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/VirtualStackSlotRange.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGeneratorTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGeneratorTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGeneratorTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGeneratorTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/BlockValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/BlockValueMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/BlockValueMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/BlockValueMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/DiagnosticLIRGeneratorTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/DiagnosticLIRGeneratorTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/DiagnosticLIRGeneratorTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/DiagnosticLIRGeneratorTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerationResult.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerationResult.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerationResult.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerationResult.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/PhiResolver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/PhiResolver.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/PhiResolver.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/PhiResolver.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/VerifyingMoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/VerifyingMoveFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/VerifyingMoveFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/VerifyingMoveFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationStage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationStage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationStage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyAllocationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyAllocationStage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyAllocationStage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyAllocationStage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPostAllocationOptimizationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPostAllocationOptimizationStage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPostAllocationOptimizationStage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPostAllocationOptimizationStage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPreAllocationOptimizationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPreAllocationOptimizationStage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPreAllocationOptimizationStage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPreAllocationOptimizationStage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/GenericContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/GenericContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/GenericContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/GenericContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhaseSuite.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhaseSuite.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhaseSuite.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhaseSuite.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRSuites.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRSuites.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRSuites.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRSuites.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationStage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationStage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationStage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationStage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationStage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationStage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MethodProfilingPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MethodProfilingPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MethodProfilingPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MethodProfilingPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfiler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfiler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfiler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfiler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfilingPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfilingPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfilingPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfilingPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveType.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveType.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveType.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveType.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/FastSSIBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/FastSSIBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/FastSSIBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/FastSSIBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilderBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilderBase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilderBase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilderBase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIConstructionPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIConstructionPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIConstructionPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIConstructionPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/FixPointIntervalBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/FixPointIntervalBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/FixPointIntervalBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/FixPointIntervalBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/LSStackSlotAllocator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/LSStackSlotAllocator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/LSStackSlotAllocator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/LSStackSlotAllocator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/SimpleStackSlotAllocator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/SimpleStackSlotAllocator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/SimpleStackSlotAllocator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/SimpleStackSlotAllocator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackInterval.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackInterval.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackInterval.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackInterval.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackIntervalDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackIntervalDumper.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackIntervalDumper.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackIntervalDumper.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackSlotAllocatorUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackSlotAllocatorUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackSlotAllocatorUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackSlotAllocatorUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/GenericValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/GenericValueMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/GenericValueMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/GenericValueMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/IndexedValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/IndexedValueMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/IndexedValueMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/IndexedValueMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/RegisterMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/RegisterMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/RegisterMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/RegisterMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueSet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueSet.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueSet.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueSet.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/VariableVirtualStackValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/VariableVirtualStackValueMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/VariableVirtualStackValueMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/VariableVirtualStackValueMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ContextlessLoopPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ContextlessLoopPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ContextlessLoopPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ContextlessLoopPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopFullUnrollPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopFullUnrollPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopFullUnrollPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopFullUnrollPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopSafepointEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopSafepointEliminationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopSafepointEliminationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopSafepointEliminationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopUnswitchingPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopUnswitchingPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopUnswitchingPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopUnswitchingPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ReassociateInvariantPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ReassociateInvariantPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ReassociateInvariantPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ReassociateInvariantPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/BasicInductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/BasicInductionVariable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/BasicInductionVariable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/BasicInductionVariable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedConvertedInductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedConvertedInductionVariable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedConvertedInductionVariable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedConvertedInductionVariable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedInductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedInductionVariable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedInductionVariable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedInductionVariable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedOffsetInductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedOffsetInductionVariable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedOffsetInductionVariable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedOffsetInductionVariable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedScaledInductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedScaledInductionVariable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedScaledInductionVariable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedScaledInductionVariable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/InductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/InductionVariable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/InductionVariable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/InductionVariable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideBefore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideBefore.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideBefore.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideBefore.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideFrom.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideFrom.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideFrom.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideFrom.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentWhole.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentWhole.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentWhole.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentWhole.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopsData.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopsData.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopsData.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopsData.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/ArrayDuplicationBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/ArrayDuplicationBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/ArrayDuplicationBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/ArrayDuplicationBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/GuardedIntrinsicBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/GuardedIntrinsicBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/GuardedIntrinsicBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/GuardedIntrinsicBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/MathFunctionBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/MathFunctionBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/MathFunctionBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/MathFunctionBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/SimpleSyncBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/SimpleSyncBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/SimpleSyncBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/SimpleSyncBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/package-info.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/package-info.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/package-info.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/ConditionalEliminationBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/ConditionalEliminationBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/ConditionalEliminationBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/ConditionalEliminationBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/FrameStateAssigmentPhaseBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/FrameStateAssigmentPhaseBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/FrameStateAssigmentPhaseBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/FrameStateAssigmentPhaseBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraphCopyBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraphCopyBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraphCopyBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraphCopyBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/NodeBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/NodeBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/NodeBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/NodeBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/SchedulePhaseBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/SchedulePhaseBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/SchedulePhaseBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/SchedulePhaseBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMH.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMH.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMH.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMH.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/FrameStateAssignmentState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/FrameStateAssignmentState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/FrameStateAssignmentState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/FrameStateAssignmentState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/MethodSpec.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/MethodSpec.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/MethodSpec.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/MethodSpec.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/NodesState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/NodesState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/NodesState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/NodesState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/ScheduleState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/ScheduleState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/ScheduleState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/ScheduleState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/CompileTimeBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/CompileTimeBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/CompileTimeBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/CompileTimeBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/GraalCompilerState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/GraalCompilerState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/GraalCompilerState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/GraalCompilerState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/RegisterAllocationTimeBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/RegisterAllocationTimeBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/RegisterAllocationTimeBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/RegisterAllocationTimeBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/ControlFlowGraphState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/ControlFlowGraphState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/ControlFlowGraphState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/ControlFlowGraphState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceBuilderBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceBuilderBenchmark.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceBuilderBenchmark.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceBuilderBenchmark.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceLSRAIntervalBuildingBench.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceLSRAIntervalBuildingBench.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceLSRAIntervalBuildingBench.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceLSRAIntervalBuildingBench.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/META-INF/services/javax.annotation.processing.Processor b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/META-INF/services/javax.annotation.processing.Processor
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/META-INF/services/javax.annotation.processing.Processor
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/META-INF/services/javax.annotation.processing.Processor
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/ElementException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/ElementException.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/ElementException.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/ElementException.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeProcessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeProcessor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeProcessor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeProcessor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/InputType.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/InputType.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/InputType.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/InputType.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeCycles.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeCycles.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeCycles.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeCycles.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeInfo.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeInfo.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeSize.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeSize.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeSize.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeSize.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/StructuralInput.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/StructuralInput.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/StructuralInput.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/StructuralInput.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/Verbosity.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/Verbosity.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/Verbosity.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/Verbosity.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/AbstractObjectStampTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/AbstractObjectStampTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/AbstractObjectStampTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/AbstractObjectStampTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IntegerStampTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IntegerStampTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IntegerStampTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IntegerStampTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopLivenessTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopLivenessTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopLivenessTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopLivenessTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/NegateNodeCanonicalizationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/NegateNodeCanonicalizationTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/NegateNodeCanonicalizationTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/NegateNodeCanonicalizationTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampJoinTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampJoinTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampJoinTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampJoinTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampMeetTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampMeetTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampMeetTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampMeetTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampDoubleToLongTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampDoubleToLongTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampDoubleToLongTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampDoubleToLongTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampFloatToIntTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampFloatToIntTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampFloatToIntTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampFloatToIntTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampIntToFloatTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampIntToFloatTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampIntToFloatTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampIntToFloatTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampLongToDoubleTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampLongToDoubleTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampLongToDoubleTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampLongToDoubleTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractBeginNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractBeginNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractBeginNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractBeginNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractDeoptimizeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractDeoptimizeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractDeoptimizeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractDeoptimizeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractEndNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractEndNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractEndNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractEndNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractFixedGuardNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractFixedGuardNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractFixedGuardNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractFixedGuardNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractLocalNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractLocalNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractLocalNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractLocalNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractMergeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractMergeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractMergeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractMergeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractStateSplit.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractStateSplit.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractStateSplit.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractStateSplit.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ArithmeticOperation.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ArithmeticOperation.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ArithmeticOperation.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ArithmeticOperation.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginStateSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginStateSplitNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginStateSplitNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginStateSplitNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BinaryOpLogicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BinaryOpLogicNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BinaryOpLogicNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BinaryOpLogicNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BreakpointNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BreakpointNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BreakpointNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BreakpointNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CallTargetNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CallTargetNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CallTargetNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CanonicalizableLocation.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CanonicalizableLocation.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CanonicalizableLocation.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CanonicalizableLocation.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConditionAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConditionAnchorNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConditionAnchorNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConditionAnchorNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConstantNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConstantNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConstantNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConstantNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSinkNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSinkNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSinkNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSinkNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSplitNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSplitNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSplitNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingFixedWithNextNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingFixedWithNextNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingFixedWithNextNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingFixedWithNextNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingGuard.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingGuard.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingGuard.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingGuard.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DirectCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DirectCallTargetNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DirectCallTargetNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DirectCallTargetNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicDeoptimizeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicDeoptimizeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicDeoptimizeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicDeoptimizeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicPiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicPiNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicPiNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicPiNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EndNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EndNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EndNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EndNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryMarkerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryMarkerNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryMarkerNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryMarkerNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryProxyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryProxyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryProxyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FieldLocationIdentity.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FieldLocationIdentity.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FieldLocationIdentity.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FieldLocationIdentity.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNodeInterface.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNodeInterface.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNodeInterface.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNodeInterface.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedWithNextNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedWithNextNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedWithNextNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedWithNextNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingAnchoredNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingAnchoredNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingAnchoredNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingAnchoredNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingGuardedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingGuardedNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingGuardedNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingGuardedNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FullInfopointNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FullInfopointNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FullInfopointNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FullInfopointNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphEncoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphEncoder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphEncoder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphEncoder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardPhiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardPhiNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardPhiNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardPhiNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardedValueNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardedValueNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardedValueNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardedValueNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IndirectCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IndirectCallTargetNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IndirectCallTargetNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IndirectCallTargetNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/Invoke.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/Invoke.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/Invoke.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/Invoke.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicConstantNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicConstantNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicConstantNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicConstantNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNegationNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNegationNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNegationNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNegationNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopEndNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopEndNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopEndNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopEndNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopExitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopExitNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopExitNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopExitNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoweredCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoweredCallTargetNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoweredCallTargetNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoweredCallTargetNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/MergeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/MergeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/MergeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/MergeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/NamedLocationIdentity.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/NamedLocationIdentity.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/NamedLocationIdentity.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/NamedLocationIdentity.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ParameterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ParameterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ParameterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ParameterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PauseNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PauseNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PauseNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PauseNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PhiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PhiNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PhiNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PhiNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiArrayNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiArrayNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiArrayNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PrefetchAllocateNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PrefetchAllocateNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PrefetchAllocateNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PrefetchAllocateNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ReturnNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ReturnNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ReturnNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ReturnNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SafepointNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SafepointNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SafepointNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SafepointNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ShortCircuitOrNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ShortCircuitOrNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ShortCircuitOrNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ShortCircuitOrNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SimplifyingGraphDecoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SimplifyingGraphDecoder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SimplifyingGraphDecoder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SimplifyingGraphDecoder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StateSplit.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StateSplit.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StateSplit.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StateSplit.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/TypeCheckHints.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/TypeCheckHints.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/TypeCheckHints.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/TypeCheckHints.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnaryOpLogicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnaryOpLogicNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnaryOpLogicNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnaryOpLogicNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnwindNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnwindNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnwindNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnwindNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeInterface.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeInterface.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeInterface.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeInterface.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValuePhiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValuePhiNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValuePhiNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValuePhiNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/VirtualState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/VirtualState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/VirtualState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/VirtualState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AbsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AbsNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AbsNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AbsNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AddNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AddNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AddNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AddNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConditionalNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConditionalNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConditionalNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConditionalNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConvertNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConvertNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConvertNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConvertNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/DivNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/DivNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/DivNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/DivNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FixedBinaryNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FixedBinaryNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FixedBinaryNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FixedBinaryNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatConvertNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatConvertNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatConvertNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatConvertNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatEqualsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatEqualsNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatEqualsNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatEqualsNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatLessThanNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatLessThanNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatLessThanNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatLessThanNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatingNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatingNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatingNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatingNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerBelowNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerBelowNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerBelowNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerBelowNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerConvertNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerConvertNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerConvertNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerConvertNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerEqualsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerEqualsNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerEqualsNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerEqualsNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerLessThanNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerLessThanNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerLessThanNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerLessThanNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerTestNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerTestNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerTestNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerTestNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IsNullNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IsNullNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IsNullNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IsNullNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/LeftShiftNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/LeftShiftNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/LeftShiftNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/LeftShiftNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/MulNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/MulNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/MulNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/MulNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowableArithmeticNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowableArithmeticNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowableArithmeticNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowableArithmeticNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NegateNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NegateNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NegateNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NegateNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NormalizeCompareNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NormalizeCompareNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NormalizeCompareNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NormalizeCompareNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NotNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NotNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NotNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NotNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ObjectEqualsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ObjectEqualsNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ObjectEqualsNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ObjectEqualsNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/PointerEqualsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/PointerEqualsNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/PointerEqualsNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/PointerEqualsNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ReinterpretNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ReinterpretNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ReinterpretNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ReinterpretNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RemNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RemNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RemNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RemNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RightShiftNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RightShiftNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RightShiftNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RightShiftNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ShiftNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ShiftNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ShiftNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ShiftNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignExtendNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignExtendNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignExtendNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignExtendNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedDivNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedDivNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedDivNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedDivNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedRemNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedRemNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedRemNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedRemNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SqrtNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SqrtNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SqrtNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SqrtNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SubNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SubNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SubNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SubNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryArithmeticNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryArithmeticNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryArithmeticNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryArithmeticNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedDivNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedDivNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedDivNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedDivNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRemNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRemNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRemNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRemNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRightShiftNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRightShiftNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRightShiftNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRightShiftNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ZeroExtendNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ZeroExtendNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ZeroExtendNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ZeroExtendNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/HIRLoop.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/HIRLoop.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/HIRLoop.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/HIRLoop.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/LocationSet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/LocationSet.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/LocationSet.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/LocationSet.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BindToRegisterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BindToRegisterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BindToRegisterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BindToRegisterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BlackholeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BlackholeNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BlackholeNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BlackholeNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchorNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchorNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchorNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchored.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchored.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchored.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchored.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/DynamicCounterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/DynamicCounterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/DynamicCounterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/DynamicCounterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/OpaqueNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/OpaqueNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/OpaqueNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/OpaqueNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/SpillRegistersNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/SpillRegistersNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/SpillRegistersNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/SpillRegistersNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/VerifyHeapNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/VerifyHeapNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/VerifyHeapNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/VerifyHeapNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/WeakCounterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/WeakCounterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/WeakCounterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/WeakCounterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationBeginNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationBeginNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationBeginNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationBeginNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationEndNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationEndNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationEndNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationEndNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationInliningCallback.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationInliningCallback.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationInliningCallback.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationInliningCallback.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/IsMethodInlinedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/IsMethodInlinedNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/IsMethodInlinedNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/IsMethodInlinedNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/MonitorProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/MonitorProxyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/MonitorProxyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/MonitorProxyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/RootNameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/RootNameNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/RootNameNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/RootNameNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/AnchoringNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/AnchoringNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/AnchoringNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/AnchoringNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ArrayRangeWriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ArrayRangeWriteNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ArrayRangeWriteNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ArrayRangeWriteNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BoxNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BoxNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BoxNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BoxNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BranchProbabilityNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BranchProbabilityNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BranchProbabilityNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BranchProbabilityNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/FixedValueAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/FixedValueAnchorNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/FixedValueAnchorNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/FixedValueAnchorNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GetClassNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GetClassNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GetClassNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GetClassNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedUnsafeLoadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedUnsafeLoadNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedUnsafeLoadNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedUnsafeLoadNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardingNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardingNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardingNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardingNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/IntegerSwitchNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/IntegerSwitchNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/IntegerSwitchNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/IntegerSwitchNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaReadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaReadNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaReadNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaReadNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadHubNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadHubNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadHubNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadHubNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadMethodNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadMethodNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadMethodNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadMethodNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorEnter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorEnter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorEnter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorEnter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorExit.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorExit.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorExit.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorExit.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/NullCheckNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/NullCheckNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/NullCheckNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/NullCheckNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRLocalNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRLocalNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRLocalNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRLocalNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRStartNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRStartNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRStartNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRStartNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/StoreHubNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/StoreHubNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/StoreHubNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/StoreHubNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnboxNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnboxNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnboxNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnboxNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeCopyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeCopyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeCopyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeCopyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeLoadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeLoadNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeLoadNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeLoadNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryLoadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryLoadNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryLoadNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryLoadNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeStoreNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeStoreNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeStoreNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeStoreNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ValueAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ValueAnchorNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ValueAnchorNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ValueAnchorNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ClassInitializationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ClassInitializationPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ClassInitializationPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ClassInitializationPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ForeignCallPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ForeignCallPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ForeignCallPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ForeignCallPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GeneratedInvocationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GeneratedInvocationPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GeneratedInvocationPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GeneratedInvocationPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InlineInvokePlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InlineInvokePlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InlineInvokePlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InlineInvokePlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/IntrinsicContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/IntrinsicContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/IntrinsicContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/IntrinsicContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java
similarity index 98%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java
index b2f6910c404..dac1acd0c94 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java
@@ -40,8 +40,7 @@ public interface InvocationPlugin extends GraphBuilderPlugin {
 
     /**
      * The receiver in a non-static method. The class literal for this interface must be used with
-     * {@link InvocationPlugins#put(InvocationPlugin, boolean, boolean, boolean, Class, String, Class...)}
-     * to denote the receiver argument for such a non-static method.
+     * {@link InvocationPlugins#put} to denote the receiver argument for such a non-static method.
      */
     public interface Receiver {
         /**
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java
similarity index 52%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java
index 74562c4a031..bc1686ae126 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java
@@ -23,8 +23,9 @@
 package org.graalvm.compiler.nodes.graphbuilderconf;
 
 import static java.lang.String.format;
+import static org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.LateClassPlugins.CLOSED_LATE_CLASS_PLUGIN;
 
-import java.lang.reflect.Executable;
+import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
@@ -32,10 +33,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.graalvm.compiler.api.replacements.MethodSubstitution;
 import org.graalvm.compiler.api.replacements.MethodSubstitutionRegistry;
@@ -46,12 +45,24 @@ import org.graalvm.compiler.graph.iterators.NodeIterable;
 import org.graalvm.compiler.nodes.ValueNode;
 import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.Receiver;
 
-import jdk.vm.ci.meta.MetaAccessProvider;
 import jdk.vm.ci.meta.MetaUtil;
 import jdk.vm.ci.meta.ResolvedJavaMethod;
+import jdk.vm.ci.meta.ResolvedJavaType;
+import jdk.vm.ci.meta.Signature;
 
 /**
  * Manages a set of {@link InvocationPlugin}s.
+ *
+ * Most plugins are registered during initialization (i.e., before
+ * {@link #lookupInvocation(ResolvedJavaMethod)} or {@link #getBindings} is called). These
+ * registrations can be made with {@link Registration},
+ * {@link #register(InvocationPlugin, String, String, Type...)},
+ * {@link #register(InvocationPlugin, Type, String, Type...)} or
+ * {@link #registerOptional(InvocationPlugin, Type, String, Type...)}. Initialization is not
+ * thread-safe and so must only be performed by a single thread.
+ *
+ * Plugins that are not guaranteed to be made during initialization must use
+ * {@link LateRegistration}.
  */
 public class InvocationPlugins {
 
@@ -259,6 +270,26 @@ public class InvocationPlugins {
             plugins.register(plugin, false, allowOverwrite, declaringType, name, arg1, arg2, arg3, arg4, arg5);
         }
 
+        /**
+         * Registers a plugin for a method with 6 arguments.
+         *
+         * @param name the name of the method
+         * @param plugin the plugin to be registered
+         */
+        public void register6(String name, Type arg1, Type arg2, Type arg3, Type arg4, Type arg5, Type arg6, InvocationPlugin plugin) {
+            plugins.register(plugin, false, allowOverwrite, declaringType, name, arg1, arg2, arg3, arg4, arg5, arg6);
+        }
+
+        /**
+         * Registers a plugin for a method with 7 arguments.
+         *
+         * @param name the name of the method
+         * @param plugin the plugin to be registered
+         */
+        public void register7(String name, Type arg1, Type arg2, Type arg3, Type arg4, Type arg5, Type arg6, Type arg7, InvocationPlugin plugin) {
+            plugins.register(plugin, false, allowOverwrite, declaringType, name, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+        }
+
         /**
          * Registers a plugin for an optional method with no arguments.
          *
@@ -337,168 +368,151 @@ public class InvocationPlugins {
          */
         @Override
         public void registerMethodSubstitution(Class substituteDeclaringClass, String name, String substituteName, Type... argumentTypes) {
-            assert methodSubstitutionBytecodeProvider != null : "Registration used for method substitutions requires a non-null methodSubstitutionBytecodeProvider";
-            MethodSubstitutionPlugin plugin = new MethodSubstitutionPlugin(methodSubstitutionBytecodeProvider, substituteDeclaringClass, substituteName, argumentTypes);
+            MethodSubstitutionPlugin plugin = createMethodSubstitution(substituteDeclaringClass, substituteName, argumentTypes);
             plugins.register(plugin, false, allowOverwrite, declaringType, name, argumentTypes);
         }
+
+        public MethodSubstitutionPlugin createMethodSubstitution(Class substituteDeclaringClass, String substituteName, Type... argumentTypes) {
+            assert methodSubstitutionBytecodeProvider != null : "Registration used for method substitutions requires a non-null methodSubstitutionBytecodeProvider";
+            MethodSubstitutionPlugin plugin = new MethodSubstitutionPlugin(methodSubstitutionBytecodeProvider, substituteDeclaringClass, substituteName, argumentTypes);
+            return plugin;
+        }
+
     }
 
     /**
-     * Key for a {@linkplain ClassPlugins#entries resolved} plugin registration. Due to the
-     * possibility of class redefinition, we cannot directly use {@link ResolvedJavaMethod}s as
-     * keys. A {@link ResolvedJavaMethod} implementation might implement {@code equals()} and
-     * {@code hashCode()} based on internal representation subject to change by class redefinition.
+     * Utility for registering plugins after Graal may have been initialized. Registrations made via
+     * this class are not finalized until {@link #close} is called.
      */
-    static final class ResolvedJavaMethodKey {
-        private final ResolvedJavaMethod method;
+    public static class LateRegistration implements AutoCloseable {
 
-        ResolvedJavaMethodKey(ResolvedJavaMethod method) {
-            this.method = method;
+        private InvocationPlugins plugins;
+        private final List bindings = new ArrayList<>();
+        private final Type declaringType;
+
+        /**
+         * Creates an object for registering {@link InvocationPlugin}s for methods declared by a
+         * given class.
+         *
+         * @param plugins where to register the plugins
+         * @param declaringType the class declaring the methods for which plugins will be registered
+         *            via this object
+         */
+        public LateRegistration(InvocationPlugins plugins, Type declaringType) {
+            this.plugins = plugins;
+            this.declaringType = declaringType;
         }
 
-        @Override
-        public boolean equals(Object obj) {
-            if (obj instanceof ResolvedJavaMethodKey) {
-                ResolvedJavaMethodKey that = (ResolvedJavaMethodKey) obj;
-                if (this.method.isStatic() == that.method.isStatic()) {
-                    if (this.method.getDeclaringClass().equals(that.method.getDeclaringClass())) {
-                        if (this.method.getName().equals(that.method.getName())) {
-                            if (this.method.getSignature().equals(that.method.getSignature())) {
-                                return true;
-                            }
-                        }
-                    }
-                }
+        /**
+         * Registers an invocation plugin for a given method. There must be no plugin currently
+         * registered for {@code method}.
+         *
+         * @param argumentTypes the argument types of the method. Element 0 of this array must be
+         *            the {@link Class} value for {@link InvocationPlugin.Receiver} iff the method
+         *            is non-static. Upon returning, element 0 will have been rewritten to
+         *            {@code declaringClass}
+         */
+        public void register(InvocationPlugin plugin, String name, Type... argumentTypes) {
+            boolean isStatic = argumentTypes.length == 0 || argumentTypes[0] != InvocationPlugin.Receiver.class;
+            if (!isStatic) {
+                argumentTypes[0] = declaringType;
             }
-            return false;
+
+            assert isStatic || argumentTypes[0] == declaringType;
+            Binding binding = new Binding(plugin, isStatic, name, argumentTypes);
+            bindings.add(binding);
+
+            assert Checks.check(this.plugins, declaringType, binding);
+            assert Checks.checkResolvable(false, declaringType, binding);
         }
 
         @Override
-        public int hashCode() {
-            return this.method.getName().hashCode();
-        }
-
-        @Override
-        public String toString() {
-            return "ResolvedJavaMethodKey<" + method + ">";
+        public void close() {
+            assert plugins != null : String.format("Late registrations of invocation plugins for %s is already closed", declaringType);
+            plugins.registerLate(declaringType, bindings);
+            plugins = null;
         }
     }
 
     /**
-     * Key for {@linkplain ClassPlugins#registrations registering} an {@link InvocationPlugin} for a
-     * specific method.
+     * Associates an {@link InvocationPlugin} with the details of a method it substitutes.
      */
-    static class MethodKey {
-        final boolean isStatic;
+    public static class Binding {
+        /**
+         * The plugin this binding is for.
+         */
+        public final InvocationPlugin plugin;
 
         /**
-         * This method is optional. This is used for new API methods not present in previous JDK
-         * versions.
+         * Specifies if the associated method is static.
          */
-        final boolean isOptional;
-
-        final String name;
-        final Type[] argumentTypes;
-        final InvocationPlugin value;
+        public final boolean isStatic;
 
         /**
-         * Used to lazily initialize {@link #resolved}.
+         * The name of the associated method.
          */
-        private final MetaAccessProvider metaAccess;
+        public final String name;
 
-        private volatile ResolvedJavaMethod resolved;
+        /**
+         * A partial
+         * method
+         * descriptor for the associated method. The descriptor includes enclosing {@code '('}
+         * and {@code ')'} characters but omits the return type suffix.
+         */
+        public final String argumentsDescriptor;
 
-        MethodKey(MetaAccessProvider metaAccess, InvocationPlugin data, boolean isStatic, boolean isOptional, String name, Type... argumentTypes) {
-            this.metaAccess = metaAccess;
-            this.value = data;
+        /**
+         * Link in a list of bindings.
+         */
+        private Binding next;
+
+        Binding(InvocationPlugin data, boolean isStatic, String name, Type... argumentTypes) {
+            this.plugin = data;
             this.isStatic = isStatic;
-            this.isOptional = isOptional;
             this.name = name;
-            this.argumentTypes = argumentTypes;
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (obj instanceof MethodKey) {
-                MethodKey that = (MethodKey) obj;
-                boolean res = this.name.equals(that.name) && areEqual(this.argumentTypes, that.argumentTypes);
-                assert !res || this.isStatic == that.isStatic;
-                return res;
+            StringBuilder buf = new StringBuilder();
+            buf.append('(');
+            for (int i = isStatic ? 0 : 1; i < argumentTypes.length; i++) {
+                buf.append(MetaUtil.toInternalName(argumentTypes[i].getTypeName()));
             }
-            return false;
+            buf.append(')');
+            this.argumentsDescriptor = buf.toString();
+            assert !name.equals("") || !isStatic : this;
         }
 
-        private static boolean areEqual(Type[] args1, Type[] args2) {
-            if (args1.length == args2.length) {
-                for (int i = 0; i < args1.length; i++) {
-                    if (!args1[i].getTypeName().equals(args2[i].getTypeName())) {
-                        return false;
-                    }
-                }
-                return true;
-            }
-            return false;
-        }
-
-        public int getDeclaredParameterCount() {
-            return isStatic ? argumentTypes.length : argumentTypes.length - 1;
-        }
-
-        @Override
-        public int hashCode() {
-            return name.hashCode();
-        }
-
-        private ResolvedJavaMethod resolve(Class declaringClass) {
-            if (resolved == null) {
-                Executable method = resolveJava(declaringClass);
-                if (method == null) {
-                    return null;
-                }
-                resolved = metaAccess.lookupJavaMethod(method);
-            }
-            return resolved;
-        }
-
-        private Executable resolveJava(Class declaringClass) {
-            try {
-                Executable res;
-                Class[] parameterTypes = resolveTypes(argumentTypes, isStatic ? 0 : 1, argumentTypes.length);
-                if (name.equals("")) {
-                    res = declaringClass.getDeclaredConstructor(parameterTypes);
-                } else {
-                    res = declaringClass.getDeclaredMethod(name, parameterTypes);
-                }
-                assert Modifier.isStatic(res.getModifiers()) == isStatic : res;
-                return res;
-            } catch (NoSuchMethodException | SecurityException e) {
-                if (isOptional) {
-                    return null;
-                }
-                throw new InternalError(e);
-            }
+        Binding(ResolvedJavaMethod resolved, InvocationPlugin data) {
+            this.plugin = data;
+            this.isStatic = resolved.isStatic();
+            this.name = resolved.getName();
+            Signature sig = resolved.getSignature();
+            String desc = sig.toMethodDescriptor();
+            assert desc.indexOf(')') != -1 : desc;
+            this.argumentsDescriptor = desc.substring(0, desc.indexOf(')') + 1);
+            assert !name.equals("") || !isStatic : this;
         }
 
         @Override
         public String toString() {
-            StringBuilder sb = new StringBuilder(name).append('(');
-            for (Type p : argumentTypes) {
-                if (sb.charAt(sb.length() - 1) != '(') {
-                    sb.append(", ");
-                }
-                sb.append(p.getTypeName());
-            }
-            return sb.append(')').toString();
+            return name + argumentsDescriptor;
         }
     }
 
-    private final MetaAccessProvider metaAccess;
-
-    private final Map registrations = new HashMap<>();
+    /**
+     * Plugin registrations for already resolved methods. If non-null, then {@link #registrations}
+     * is null and no further registrations can be made.
+     */
+    private final Map resolvedRegistrations;
 
     /**
-     * Deferred registrations as well as guard for initialization. The guard uses double-checked
-     * locking which is why this field is {@code volatile}.
+     * Map from class names in {@linkplain MetaUtil#toInternalName(String) internal} form to the
+     * invocation plugin bindings for the class. Tf non-null, then {@link #resolvedRegistrations}
+     * will be null.
+     */
+    private final Map registrations;
+
+    /**
+     * Deferred registrations as well as the guard for delimiting the initial registration phase.
+     * The guard uses double-checked locking which is why this field is {@code volatile}.
      */
     private volatile List deferredRegistrations = new ArrayList<>();
 
@@ -512,119 +526,159 @@ public class InvocationPlugins {
     }
 
     /**
-     * Per-class invocation plugins.
+     * Support for registering plugins once this object may be accessed by multiple threads.
      */
-    protected static class ClassPlugins {
-        private final Type declaringType;
+    private volatile LateClassPlugins lateRegistrations;
 
-        private final List registrations = new ArrayList<>();
-
-        public ClassPlugins(Type declaringClass) {
-            this.declaringType = declaringClass;
-        }
+    /**
+     * Per-class bindings.
+     */
+    static class ClassPlugins {
 
         /**
-         * Entry map that is initialized upon first call to {@link #get(ResolvedJavaMethod)}.
-         *
-         * Note: this must be volatile as threads may race to initialize it.
+         * Maps method names to binding lists.
          */
-        private volatile Map entries;
+        private final Map bindings = new HashMap<>();
 
-        void initializeMap() {
-            if (!isClosed()) {
-                if (registrations.isEmpty()) {
-                    entries = Collections.emptyMap();
-                } else {
-                    Class declaringClass = resolveType(declaringType, true);
-                    if (declaringClass == null) {
-                        // An optional type that could not be resolved
-                        entries = Collections.emptyMap();
-                    } else {
-                        Map newEntries = new HashMap<>();
-                        for (MethodKey methodKey : registrations) {
-                            ResolvedJavaMethod m = methodKey.resolve(declaringClass);
-                            if (m != null) {
-                                newEntries.put(new ResolvedJavaMethodKey(m), methodKey.value);
-                                if (entries != null) {
-                                    // Another thread finished initializing entries first
-                                    return;
-                                }
-                            }
-                        }
-                        entries = newEntries;
+        /**
+         * Gets the invocation plugin for a given method.
+         *
+         * @return the invocation plugin for {@code method} or {@code null}
+         */
+        InvocationPlugin get(ResolvedJavaMethod method) {
+            assert !method.isBridge();
+            Binding binding = bindings.get(method.getName());
+            while (binding != null) {
+                if (method.isStatic() == binding.isStatic) {
+                    if (method.getSignature().toMethodDescriptor().startsWith(binding.argumentsDescriptor)) {
+                        return binding.plugin;
                     }
                 }
+                binding = binding.next;
             }
+            return null;
         }
 
-        public InvocationPlugin get(ResolvedJavaMethod method) {
-            if (!isClosed()) {
-                initializeMap();
-            }
-            return entries.get(new ResolvedJavaMethodKey(method));
-        }
-
-        public void register(MethodKey methodKey, boolean allowOverwrite) {
-            assert !isClosed() : "registration is closed: " + methodKey + " " + Arrays.toString(entries.keySet().toArray());
+        public void register(Binding binding, boolean allowOverwrite) {
             if (allowOverwrite) {
-                int index = registrations.indexOf(methodKey);
-                if (index >= 0) {
-                    registrations.set(index, methodKey);
+                if (lookup(binding) != null) {
+                    register(binding);
                     return;
                 }
             } else {
-                assert !registrations.contains(methodKey) : "a value is already registered for " + declaringType + "." + methodKey;
+                assert lookup(binding) == null : "a value is already registered for " + binding;
             }
-            registrations.add(methodKey);
+            register(binding);
         }
 
-        public boolean isClosed() {
-            return entries != null;
+        InvocationPlugin lookup(Binding binding) {
+            Binding b = bindings.get(binding.name);
+            while (b != null) {
+                if (b.isStatic == binding.isStatic && b.argumentsDescriptor.equals(binding.argumentsDescriptor)) {
+                    return b.plugin;
+                }
+                b = b.next;
+            }
+            return null;
+        }
+
+        /**
+         * Registers {@code binding}.
+         */
+        void register(Binding binding) {
+            Binding head = bindings.get(binding.name);
+            assert binding.next == null;
+            binding.next = head;
+            bindings.put(binding.name, binding);
+        }
+    }
+
+    static class LateClassPlugins extends ClassPlugins {
+        static final String CLOSED_LATE_CLASS_PLUGIN = "-----";
+        private final String className;
+        private final LateClassPlugins next;
+
+        LateClassPlugins(LateClassPlugins next, String className) {
+            assert next == null || next.className != CLOSED_LATE_CLASS_PLUGIN : "Late registration of invocation plugins is closed";
+            this.next = next;
+            this.className = className;
         }
     }
 
     /**
-     * Adds an entry to this map for a specified method.
+     * Registers a binding of a method to an invocation plugin.
      *
-     * @param value value to be associated with the specified method
+     * @param plugin invocation plugin to be associated with the specified method
      * @param isStatic specifies if the method is static
-     * @param isOptional specifies if the method is optional
      * @param declaringClass the class declaring the method
      * @param name the name of the method
      * @param argumentTypes the argument types of the method. Element 0 of this array must be
      *            {@code declaringClass} iff the method is non-static.
      * @return an object representing the method
      */
-    MethodKey put(InvocationPlugin value, boolean isStatic, boolean isOptional, boolean allowOverwrite, Type declaringClass, String name, Type... argumentTypes) {
-        assert isStatic || argumentTypes[0] == declaringClass;
-
+    Binding put(InvocationPlugin plugin, boolean isStatic, boolean allowOverwrite, Type declaringClass, String name, Type... argumentTypes) {
+        assert resolvedRegistrations == null : "registration is closed";
         String internalName = MetaUtil.toInternalName(declaringClass.getTypeName());
+        assert isStatic || argumentTypes[0] == declaringClass;
+        assert deferredRegistrations != null : "initial registration is closed - use " + LateRegistration.class.getName() + " for late registrations";
+
         ClassPlugins classPlugins = registrations.get(internalName);
         if (classPlugins == null) {
-            classPlugins = new ClassPlugins(declaringClass);
+            classPlugins = new ClassPlugins();
             registrations.put(internalName, classPlugins);
         }
-        assert isStatic || argumentTypes[0] == declaringClass;
-        MethodKey methodKey = new MethodKey(metaAccess, value, isStatic, isOptional, name, argumentTypes);
-        classPlugins.register(methodKey, allowOverwrite);
-        return methodKey;
-    }
-
-    /**
-     * Determines if a method denoted by a given {@link MethodKey} is in this map.
-     */
-    boolean containsKey(Type declaringType, MethodKey key) {
-        String internalName = MetaUtil.toInternalName(declaringType.getTypeName());
-        ClassPlugins classPlugins = registrations.get(internalName);
-        return classPlugins != null && classPlugins.registrations.contains(key);
+        Binding binding = new Binding(plugin, isStatic, name, argumentTypes);
+        classPlugins.register(binding, allowOverwrite);
+        return binding;
     }
 
     InvocationPlugin get(ResolvedJavaMethod method) {
-        flushDeferrables();
-        String internalName = method.getDeclaringClass().getName();
-        ClassPlugins classPlugins = registrations.get(internalName);
-        if (classPlugins != null) {
-            return classPlugins.get(method);
+        if (resolvedRegistrations != null) {
+            return resolvedRegistrations.get(method);
+        } else {
+            if (!method.isBridge()) {
+                ResolvedJavaType declaringClass = method.getDeclaringClass();
+                flushDeferrables();
+                String internalName = declaringClass.getName();
+                ClassPlugins classPlugins = registrations.get(internalName);
+                InvocationPlugin res = null;
+                if (classPlugins != null) {
+                    res = classPlugins.get(method);
+                }
+                if (res == null) {
+                    LateClassPlugins lcp = findLateClassPlugins(internalName);
+                    if (lcp != null) {
+                        res = lcp.get(method);
+                    }
+                }
+                if (res != null) {
+                    if (canBeIntrinsified(declaringClass)) {
+                        return res;
+                    }
+                }
+            } else {
+                // Supporting plugins for bridge methods would require including
+                // the return type in the registered signature. Until needed,
+                // this extra complexity is best avoided.
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Determines if methods in a given class can have invocation plugins.
+     *
+     * @param declaringClass the class to test
+     */
+    protected boolean canBeIntrinsified(ResolvedJavaType declaringClass) {
+        return true;
+    }
+
+    LateClassPlugins findLateClassPlugins(String internalClassName) {
+        for (LateClassPlugins lcp = lateRegistrations; lcp != null; lcp = lcp.next) {
+            if (lcp.className.equals(internalClassName)) {
+                return lcp;
+            }
         }
         return null;
     }
@@ -639,25 +693,39 @@ public class InvocationPlugins {
                     deferredRegistrations = null;
                 }
             }
-            for (Map.Entry e : registrations.entrySet()) {
-                e.getValue().initializeMap();
-            }
         }
     }
 
+    synchronized void registerLate(Type declaringType, List bindings) {
+        String internalName = MetaUtil.toInternalName(declaringType.getTypeName());
+        assert findLateClassPlugins(internalName) == null : "Cannot have more than one late registration of invocation plugins for " + internalName;
+        LateClassPlugins lateClassPlugins = new LateClassPlugins(lateRegistrations, internalName);
+        for (Binding b : bindings) {
+            lateClassPlugins.register(b);
+        }
+        lateRegistrations = lateClassPlugins;
+    }
+
+    private synchronized boolean closeLateRegistrations() {
+        if (lateRegistrations == null || lateRegistrations.className != CLOSED_LATE_CLASS_PLUGIN) {
+            lateRegistrations = new LateClassPlugins(lateRegistrations, CLOSED_LATE_CLASS_PLUGIN);
+        }
+        return true;
+    }
+
     /**
-     * Disallows new registrations of new plugins, and creates the internal tables for method
-     * lookup.
+     * Processes deferred registrations and then closes this object for future registration.
      */
     public void closeRegistration() {
+        assert closeLateRegistrations();
         flushDeferrables();
-        for (Map.Entry e : registrations.entrySet()) {
-            e.getValue().initializeMap();
-        }
     }
 
-    public int size() {
-        return registrations.size();
+    public boolean isEmpty() {
+        if (resolvedRegistrations != null) {
+            return resolvedRegistrations.isEmpty();
+        }
+        return registrations.size() == 0 && lateRegistrations == null;
     }
 
     /**
@@ -666,47 +734,39 @@ public class InvocationPlugins {
      */
     protected final InvocationPlugins parent;
 
-    private InvocationPlugins(InvocationPlugins parent, MetaAccessProvider metaAccess) {
-        this.metaAccess = metaAccess;
-        InvocationPlugins p = parent;
-        this.parent = p;
+    /**
+     * Creates a set of invocation plugins with no parent.
+     */
+    public InvocationPlugins() {
+        this(null);
     }
 
     /**
-     * Creates a set of invocation plugins with a non-null {@linkplain #getParent() parent}.
+     * Creates a set of invocation plugins.
+     *
+     * @param parent if non-null, this object will be searched first when looking up plugins
      */
     public InvocationPlugins(InvocationPlugins parent) {
-        this(parent, parent.getMetaAccess());
+        InvocationPlugins p = parent;
+        this.parent = p;
+        this.registrations = new HashMap<>();
+        this.resolvedRegistrations = null;
     }
 
-    public InvocationPlugins(Map plugins, InvocationPlugins parent, MetaAccessProvider metaAccess) {
-        this.metaAccess = metaAccess;
+    /**
+     * Creates a closed set of invocation plugins for a set of resolved methods. Such an object
+     * cannot have further plugins registered.
+     */
+    public InvocationPlugins(Map plugins, InvocationPlugins parent) {
         this.parent = parent;
-
+        this.registrations = null;
         this.deferredRegistrations = null;
+        Map map = new HashMap<>(plugins.size());
 
         for (Map.Entry entry : plugins.entrySet()) {
-            ResolvedJavaMethod method = entry.getKey();
-            InvocationPlugin plugin = entry.getValue();
-
-            String internalName = method.getDeclaringClass().getName();
-            ClassPlugins classPlugins = registrations.get(internalName);
-            if (classPlugins == null) {
-                classPlugins = new ClassPlugins(null);
-                registrations.put(internalName, classPlugins);
-                classPlugins.entries = new HashMap<>();
-            }
-
-            classPlugins.entries.put(new ResolvedJavaMethodKey(method), plugin);
+            map.put(entry.getKey(), entry.getValue());
         }
-    }
-
-    public MetaAccessProvider getMetaAccess() {
-        return metaAccess;
-    }
-
-    public InvocationPlugins(MetaAccessProvider metaAccess) {
-        this(null, metaAccess);
+        this.resolvedRegistrations = map;
     }
 
     protected void register(InvocationPlugin plugin, boolean isOptional, boolean allowOverwrite, Type declaringClass, String name, Type... argumentTypes) {
@@ -714,8 +774,9 @@ public class InvocationPlugins {
         if (!isStatic) {
             argumentTypes[0] = declaringClass;
         }
-        MethodKey methodKey = put(plugin, isStatic, isOptional, allowOverwrite, declaringClass, name, argumentTypes);
-        assert Checker.check(this, declaringClass, methodKey, plugin);
+        Binding binding = put(plugin, isStatic, allowOverwrite, declaringClass, name, argumentTypes);
+        assert Checks.check(this, declaringClass, binding);
+        assert Checks.checkResolvable(isOptional, declaringClass, binding);
     }
 
     /**
@@ -765,23 +826,56 @@ public class InvocationPlugins {
     }
 
     /**
-     * Gets the set of methods for which invocation plugins have been registered. Once this method
-     * is called, no further registrations can be made.
+     * Gets the set of registered invocation plugins.
+     *
+     * @return a map from class names in {@linkplain MetaUtil#toInternalName(String) internal} form
+     *         to the invocation plugin bindings for methods in the class
      */
-    public Set getMethods() {
-        Set res = new HashSet<>();
-        if (parent != null) {
-            res.addAll(parent.getMethods());
+    public Map> getBindings(boolean includeParents) {
+        Map> res = new HashMap<>();
+        if (parent != null && includeParents) {
+            res.putAll(parent.getBindings(true));
         }
-        flushDeferrables();
-        for (ClassPlugins cp : registrations.values()) {
-            for (ResolvedJavaMethodKey key : cp.entries.keySet()) {
-                res.add(key.method);
+        if (resolvedRegistrations != null) {
+            for (Map.Entry e : resolvedRegistrations.entrySet()) {
+                ResolvedJavaMethod method = e.getKey();
+                InvocationPlugin plugin = e.getValue();
+                String type = method.getDeclaringClass().getName();
+                List bindings = res.get(type);
+                if (bindings == null) {
+                    bindings = new ArrayList<>();
+                    res.put(type, bindings);
+                }
+                bindings.add(new Binding(method, plugin));
+            }
+        } else {
+            flushDeferrables();
+            for (Map.Entry e : registrations.entrySet()) {
+                String type = e.getKey();
+                ClassPlugins cp = e.getValue();
+                collectBindingsTo(res, type, cp);
+            }
+            for (LateClassPlugins lcp = lateRegistrations; lcp != null; lcp = lcp.next) {
+                String type = lcp.className;
+                collectBindingsTo(res, type, lcp);
             }
         }
         return res;
     }
 
+    private static void collectBindingsTo(Map> res, String type, ClassPlugins cp) {
+        for (Map.Entry e : cp.bindings.entrySet()) {
+            List bindings = res.get(type);
+            if (bindings == null) {
+                bindings = new ArrayList<>();
+                res.put(type, bindings);
+            }
+            for (Binding b = e.getValue(); b != null; b = b.next) {
+                bindings.add(b);
+            }
+        }
+    }
+
     /**
      * Gets the invocation plugins {@linkplain #lookupInvocation(ResolvedJavaMethod) searched}
      * before searching in this object.
@@ -792,17 +886,36 @@ public class InvocationPlugins {
 
     @Override
     public String toString() {
-        StringBuilder buf = new StringBuilder();
-        registrations.forEach((name, cp) -> buf.append(name).append('.').append(cp).append(", "));
-        String s = buf.toString();
-        if (buf.length() != 0) {
-            s = s.substring(buf.length() - ", ".length());
+        List all = new ArrayList<>();
+        for (Map.Entry> e : getBindings(false).entrySet()) {
+            String c = MetaUtil.internalNameToJava(e.getKey(), true, false);
+            for (Binding b : e.getValue()) {
+                all.add(c + '.' + b);
+            }
         }
-        return s + " / parent: " + this.parent;
+        Collections.sort(all);
+        StringBuilder buf = new StringBuilder();
+        String nl = String.format("%n");
+        for (String s : all) {
+            if (buf.length() != 0) {
+                buf.append(nl);
+            }
+            buf.append(s);
+        }
+        if (parent != null) {
+            if (buf.length() != 0) {
+                buf.append(nl);
+            }
+            buf.append("// parent").append(nl).append(parent);
+        }
+        return buf.toString();
     }
 
-    private static class Checker {
-        private static final int MAX_ARITY = 5;
+    /**
+     * Code only used in assertions. Putting this in a separate class reduces class load time.
+     */
+    private static class Checks {
+        private static final int MAX_ARITY = 7;
         /**
          * The set of all {@link InvocationPlugin#apply} method signatures.
          */
@@ -828,10 +941,17 @@ public class InvocationPlugins {
             SIGS = sigs.toArray(new Class[sigs.size()][]);
         }
 
-        public static boolean check(InvocationPlugins plugins, Type declaringType, MethodKey method, InvocationPlugin plugin) {
+        static boolean containsBinding(InvocationPlugins p, Type declaringType, Binding key) {
+            String internalName = MetaUtil.toInternalName(declaringType.getTypeName());
+            ClassPlugins classPlugins = p.registrations.get(internalName);
+            return classPlugins != null && classPlugins.lookup(key) != null;
+        }
+
+        public static boolean check(InvocationPlugins plugins, Type declaringType, Binding binding) {
+            InvocationPlugin plugin = binding.plugin;
             InvocationPlugins p = plugins.parent;
             while (p != null) {
-                assert !p.containsKey(declaringType, method) : "a plugin is already registered for " + method;
+                assert !containsBinding(p, declaringType, binding) : "a plugin is already registered for " + binding;
                 p = p.parent;
             }
             if (plugin instanceof ForeignCallPlugin || plugin instanceof GeneratedInvocationPlugin) {
@@ -843,8 +963,8 @@ public class InvocationPlugins {
                 assert substitute.getAnnotation(MethodSubstitution.class) != null : format("Substitute method must be annotated with @%s: %s", MethodSubstitution.class.getSimpleName(), substitute);
                 return true;
             }
-            int arguments = method.getDeclaredParameterCount();
-            assert arguments < SIGS.length : format("need to extend %s to support method with %d arguments: %s", InvocationPlugin.class.getSimpleName(), arguments, method);
+            int arguments = parseParameters(binding.argumentsDescriptor).size();
+            assert arguments < SIGS.length : format("need to extend %s to support method with %d arguments: %s", InvocationPlugin.class.getSimpleName(), arguments, binding);
             for (Method m : plugin.getClass().getDeclaredMethods()) {
                 if (m.getName().equals("apply")) {
                     Class[] parameterTypes = m.getParameterTypes();
@@ -853,7 +973,24 @@ public class InvocationPlugins {
                     }
                 }
             }
-            throw new AssertionError(format("graph builder plugin for %s not found", method));
+            throw new AssertionError(format("graph builder plugin for %s not found", binding));
+        }
+
+        static boolean checkResolvable(boolean isOptional, Type declaringType, Binding binding) {
+            Class declaringClass = InvocationPlugins.resolveType(declaringType, isOptional);
+            if (declaringClass == null) {
+                return true;
+            }
+            if (binding.name.equals("")) {
+                if (resolveConstructor(declaringClass, binding) == null && !isOptional) {
+                    throw new AssertionError(String.format("Constructor not found: %s%s", declaringClass.getName(), binding.argumentsDescriptor));
+                }
+            } else {
+                if (resolveMethod(declaringClass, binding) == null && !isOptional) {
+                    throw new AssertionError(String.format("Method not found: %s.%s%s", declaringClass.getName(), binding.name, binding.argumentsDescriptor));
+                }
+            }
+            return true;
         }
     }
 
@@ -904,31 +1041,119 @@ public class InvocationPlugins {
         if (type instanceof Class) {
             return (Class) type;
         }
-        if (optional && type instanceof OptionalLazySymbol) {
+        if (type instanceof OptionalLazySymbol) {
             return ((OptionalLazySymbol) type).resolve();
         }
         return resolveClass(type.getTypeName(), optional);
     }
 
-    private static final Class[] NO_CLASSES = {};
+    private static List toInternalTypeNames(Class[] types) {
+        String[] res = new String[types.length];
+        for (int i = 0; i < types.length; i++) {
+            res[i] = MetaUtil.toInternalName(types[i].getTypeName());
+        }
+        return Arrays.asList(res);
+    }
 
     /**
-     * Resolves an array of {@link Type}s to an array of {@link Class}es.
+     * Resolves a given binding to a method in a given class. If more than one method with the
+     * parameter types matching {@code binding} is found and the return types of all the matching
+     * methods form an inheritance chain, the one with the most specific type is returned; otherwise
+     * {@link NoSuchMethodError} is thrown.
      *
-     * @param types the types to resolve
-     * @param from the initial index of the range to be resolved, inclusive
-     * @param to the final index of the range to be resolved, exclusive
-     * @return the resolved class or null if resolution fails and {@code optional} is true
+     * @param declaringClass the class to search for a method matching {@code binding}
+     * @return the method (if any) in {@code declaringClass} matching binding
      */
-    public static Class[] resolveTypes(Type[] types, int from, int to) {
-        int length = to - from;
-        if (length <= 0) {
-            return NO_CLASSES;
+    public static Method resolveMethod(Class declaringClass, Binding binding) {
+        if (binding.name.equals("")) {
+            return null;
         }
-        Class[] classes = new Class[length];
-        for (int i = 0; i < length; i++) {
-            classes[i] = resolveType(types[i + from], false);
+        Method[] methods = declaringClass.getDeclaredMethods();
+        List parameterTypeNames = parseParameters(binding.argumentsDescriptor);
+        for (int i = 0; i < methods.length; ++i) {
+            Method m = methods[i];
+            if (binding.isStatic == Modifier.isStatic(m.getModifiers()) && m.getName().equals(binding.name)) {
+                if (parameterTypeNames.equals(toInternalTypeNames(m.getParameterTypes()))) {
+                    for (int j = i + 1; j < methods.length; ++j) {
+                        Method other = methods[j];
+                        if (binding.isStatic == Modifier.isStatic(other.getModifiers()) && other.getName().equals(binding.name)) {
+                            if (parameterTypeNames.equals(toInternalTypeNames(other.getParameterTypes()))) {
+                                if (m.getReturnType().isAssignableFrom(other.getReturnType())) {
+                                    // `other` has a more specific return type - choose it
+                                    // (m is most likely a bridge method)
+                                    m = other;
+                                } else {
+                                    if (!other.getReturnType().isAssignableFrom(m.getReturnType())) {
+                                        throw new NoSuchMethodError(String.format(
+                                                        "Found 2 methods with same name and parameter types but unrelated return types:%n %s%n %s", m, other));
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    return m;
+                }
+            }
         }
-        return classes;
+        return null;
+    }
+
+    /**
+     * Resolves a given binding to a constructor in a given class.
+     *
+     * @param declaringClass the class to search for a constructor matching {@code binding}
+     * @return the constructor (if any) in {@code declaringClass} matching binding
+     */
+    public static Constructor resolveConstructor(Class declaringClass, Binding binding) {
+        if (!binding.name.equals("")) {
+            return null;
+        }
+        Constructor[] constructors = declaringClass.getDeclaredConstructors();
+        List parameterTypeNames = parseParameters(binding.argumentsDescriptor);
+        for (int i = 0; i < constructors.length; ++i) {
+            Constructor c = constructors[i];
+            if (parameterTypeNames.equals(toInternalTypeNames(c.getParameterTypes()))) {
+                return c;
+            }
+        }
+        return null;
+    }
+
+    private static List parseParameters(String argumentsDescriptor) {
+        assert argumentsDescriptor.startsWith("(") && argumentsDescriptor.endsWith(")") : argumentsDescriptor;
+        List res = new ArrayList<>();
+        int cur = 1;
+        int end = argumentsDescriptor.length() - 1;
+        while (cur != end) {
+            char first;
+            int start = cur;
+            do {
+                first = argumentsDescriptor.charAt(cur++);
+            } while (first == '[');
+
+            switch (first) {
+                case 'L':
+                    int endObject = argumentsDescriptor.indexOf(';', cur);
+                    if (endObject == -1) {
+                        throw new GraalError("Invalid object type at index %d in signature: %s", cur, argumentsDescriptor);
+                    }
+                    cur = endObject + 1;
+                    break;
+                case 'V':
+                case 'I':
+                case 'B':
+                case 'C':
+                case 'D':
+                case 'F':
+                case 'J':
+                case 'S':
+                case 'Z':
+                    break;
+                default:
+                    throw new GraalError("Invalid character at index %d in signature: %s", cur, argumentsDescriptor);
+            }
+            res.add(argumentsDescriptor.substring(start, cur));
+        }
+        return res;
     }
 }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/LoopExplosionPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/LoopExplosionPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/LoopExplosionPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/LoopExplosionPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodeIntrinsicPluginFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodeIntrinsicPluginFactory.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodeIntrinsicPluginFactory.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodeIntrinsicPluginFactory.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodePlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodePlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodePlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodePlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ParameterPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ParameterPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ParameterPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ParameterPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ProfilingPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ProfilingPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ProfilingPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ProfilingPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/TypePlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/TypePlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/TypePlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/TypePlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewArrayNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewArrayNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewArrayNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewObjectNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewObjectNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewObjectNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewObjectNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessArrayNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessArrayNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessArrayNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessFieldNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessFieldNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessFieldNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessFieldNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessIndexedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessIndexedNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessIndexedNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessIndexedNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessMonitorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessMonitorNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessMonitorNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessMonitorNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ArrayLengthNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ArrayLengthNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ArrayLengthNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ArrayLengthNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ClassIsAssignableFromNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ClassIsAssignableFromNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ClassIsAssignableFromNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ClassIsAssignableFromNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/CompareAndSwapNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/CompareAndSwapNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/CompareAndSwapNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/CompareAndSwapNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewArrayNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewArrayNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewArrayNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewInstanceNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewInstanceNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewInstanceNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewInstanceNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/FinalFieldBarrierNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/FinalFieldBarrierNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/FinalFieldBarrierNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/FinalFieldBarrierNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ForeignCallDescriptors.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ForeignCallDescriptors.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ForeignCallDescriptors.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ForeignCallDescriptors.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfDynamicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfDynamicNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfDynamicNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfDynamicNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadExceptionObjectNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadExceptionObjectNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadExceptionObjectNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadExceptionObjectNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadFieldNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadFieldNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadFieldNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadFieldNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadIndexedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadIndexedNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadIndexedNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadIndexedNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredCompareAndSwapNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredCompareAndSwapNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredCompareAndSwapNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredCompareAndSwapNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MethodCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MethodCallTargetNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MethodCallTargetNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MethodCallTargetNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorIdNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorIdNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorIdNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorIdNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewArrayNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewArrayNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewArrayNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewMultiArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewMultiArrayNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewMultiArrayNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewMultiArrayNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RegisterFinalizerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RegisterFinalizerNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RegisterFinalizerNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RegisterFinalizerNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreFieldNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreFieldNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreFieldNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreFieldNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreIndexedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreIndexedNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreIndexedNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreIndexedNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/TypeSwitchNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/TypeSwitchNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/TypeSwitchNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/TypeSwitchNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractMemoryCheckpoint.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractMemoryCheckpoint.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractMemoryCheckpoint.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractMemoryCheckpoint.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractWriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractWriteNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractWriteNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractWriteNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/Access.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/Access.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/Access.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/Access.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatableAccessNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatableAccessNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatableAccessNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatableAccessNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingAccessNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingAccessNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingAccessNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingAccessNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingReadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingReadNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingReadNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingReadNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/HeapAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/HeapAccess.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/HeapAccess.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/HeapAccess.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAccess.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAccess.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAccess.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAnchorNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAnchorNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAnchorNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMapNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMapNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMapNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMapNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryPhiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryPhiNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryPhiNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryPhiNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/ReadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/ReadNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/ReadNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/ReadNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/AddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/AddressNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/AddressNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/AddressNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/OffsetAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/OffsetAddressNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/OffsetAddressNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/OffsetAddressNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/RawAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/RawAddressNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/RawAddressNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/RawAddressNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArithmeticLIRLowerable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArithmeticLIRLowerable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArithmeticLIRLowerable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArithmeticLIRLowerable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArrayLengthProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArrayLengthProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArrayLengthProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArrayLengthProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DefaultNodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DefaultNodeCostProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DefaultNodeCostProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DefaultNodeCostProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LIRLowerable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LIRLowerable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LIRLowerable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LIRLowerable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LimitedValueProxy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LimitedValueProxy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LimitedValueProxy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LimitedValueProxy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Lowerable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Lowerable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Lowerable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Lowerable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/MemoryProxy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/MemoryProxy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/MemoryProxy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/MemoryProxy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeCostProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeCostProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeCostProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeLIRBuilderTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeLIRBuilderTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeLIRBuilderTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeLIRBuilderTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeValueMap.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeValueMap.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeValueMap.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeWithState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeWithState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeWithState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeWithState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/PiPushable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/PiPushable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/PiPushable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/PiPushable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Proxy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Proxy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Proxy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Proxy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/StampProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/StampProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/StampProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/StampProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/UncheckedInterfaceProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/UncheckedInterfaceProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/UncheckedInterfaceProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/UncheckedInterfaceProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ValueProxy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ValueProxy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ValueProxy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ValueProxy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Virtualizable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Virtualizable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Virtualizable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Virtualizable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizableAllocation.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizableAllocation.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizableAllocation.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizableAllocation.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizerTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizerTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizerTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizerTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/type/StampTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/type/StampTool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/type/StampTool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/type/StampTool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/ConstantFoldUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/ConstantFoldUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/ConstantFoldUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/ConstantFoldUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EnsureVirtualizedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EnsureVirtualizedNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EnsureVirtualizedNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EnsureVirtualizedNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EscapeObjectState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EscapeObjectState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EscapeObjectState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EscapeObjectState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/LockState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/LockState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/LockState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/LockState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualArrayNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualArrayNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualArrayNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualBoxingNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualBoxingNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualBoxingNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualBoxingNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualInstanceNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualInstanceNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualInstanceNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualInstanceNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualObjectNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualObjectNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualObjectNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualObjectNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/META-INF/services/javax.annotation.processing.Processor b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/META-INF/services/javax.annotation.processing.Processor
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/META-INF/services/javax.annotation.processing.Processor
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/META-INF/services/javax.annotation.processing.Processor
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/NestedBooleanOptionValueTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/NestedBooleanOptionValueTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/NestedBooleanOptionValueTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/NestedBooleanOptionValueTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/TestOptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/TestOptionValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/TestOptionValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/TestOptionValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/DerivedOptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/DerivedOptionValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/DerivedOptionValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/DerivedOptionValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/EnumOptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/EnumOptionValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/EnumOptionValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/EnumOptionValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/NestedBooleanOptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/NestedBooleanOptionValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/NestedBooleanOptionValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/NestedBooleanOptionValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/Option.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/Option.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/Option.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/Option.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptors.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptors.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptors.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptors.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionType.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionType.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionType.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionType.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionsParser.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionsParser.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionsParser.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionsParser.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/StableOptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/StableOptionValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/StableOptionValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/StableOptionValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/UniquePathUtilities.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/UniquePathUtilities.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/UniquePathUtilities.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/UniquePathUtilities.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common.test/src/org/graalvm/compiler/phases/common/test/StampFactoryTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common.test/src/org/graalvm/compiler/phases/common/test/StampFactoryTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common.test/src/org/graalvm/compiler/phases/common/test/StampFactoryTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common.test/src/org/graalvm/compiler/phases/common/test/StampFactoryTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AbstractInliningPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AbstractInliningPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AbstractInliningPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AbstractInliningPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AddressLoweringPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AddressLoweringPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AddressLoweringPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AddressLoweringPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeadCodeEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeadCodeEliminationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeadCodeEliminationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeadCodeEliminationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeoptimizationGroupingPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeoptimizationGroupingPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeoptimizationGroupingPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeoptimizationGroupingPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DominatorConditionalEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DominatorConditionalEliminationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DominatorConditionalEliminationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DominatorConditionalEliminationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ExpandLogicPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ExpandLogicPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ExpandLogicPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ExpandLogicPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FrameStateAssignmentPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FrameStateAssignmentPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FrameStateAssignmentPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FrameStateAssignmentPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IncrementalCanonicalizerPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IncrementalCanonicalizerPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IncrementalCanonicalizerPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IncrementalCanonicalizerPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IterativeConditionalEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IterativeConditionalEliminationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IterativeConditionalEliminationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IterativeConditionalEliminationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LazyValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LazyValue.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LazyValue.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LazyValue.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LockEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LockEliminationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LockEliminationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LockEliminationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoopSafepointInsertionPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoopSafepointInsertionPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoopSafepointInsertionPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoopSafepointInsertionPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/NonNullParametersPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/NonNullParametersPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/NonNullParametersPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/NonNullParametersPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/OptimizeGuardAnchorsPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/OptimizeGuardAnchorsPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/OptimizeGuardAnchorsPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/OptimizeGuardAnchorsPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/PushThroughPiPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/PushThroughPiPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/PushThroughPiPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/PushThroughPiPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/RemoveValueProxyPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/RemoveValueProxyPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/RemoveValueProxyPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/RemoveValueProxyPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/UseTrappingNullChecksPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/UseTrappingNullChecksPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/UseTrappingNullChecksPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/UseTrappingNullChecksPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ValueAnchorCleanupPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ValueAnchorCleanupPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ValueAnchorCleanupPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ValueAnchorCleanupPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/VerifyHeapAtReturnPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/VerifyHeapAtReturnPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/VerifyHeapAtReturnPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/VerifyHeapAtReturnPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AbstractInlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AbstractInlineInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AbstractInlineInfo.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AbstractInlineInfo.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AssumptionInlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AssumptionInlineInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AssumptionInlineInfo.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AssumptionInlineInfo.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/ExactInlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/ExactInlineInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/ExactInlineInfo.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/ExactInlineInfo.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/InlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/InlineInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/InlineInfo.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/InlineInfo.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/TypeGuardInlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/TypeGuardInlineInfo.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/TypeGuardInlineInfo.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/TypeGuardInlineInfo.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/Inlineable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/Inlineable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/Inlineable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/Inlineable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/InlineableGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/InlineableGraph.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/InlineableGraph.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/InlineableGraph.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/AbstractInliningPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/AbstractInliningPolicy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/AbstractInliningPolicy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/AbstractInliningPolicy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/GreedyInliningPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/GreedyInliningPolicy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/GreedyInliningPolicy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/GreedyInliningPolicy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineEverythingPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineEverythingPolicy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineEverythingPolicy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineEverythingPolicy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineMethodSubstitutionsPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineMethodSubstitutionsPolicy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineMethodSubstitutionsPolicy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineMethodSubstitutionsPolicy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InliningPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InliningPolicy.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InliningPolicy.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InliningPolicy.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolderExplorable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolderExplorable.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolderExplorable.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolderExplorable.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/ComputeInliningRelevance.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/ComputeInliningRelevance.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/ComputeInliningRelevance.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/ComputeInliningRelevance.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningData.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningData.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningData.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningData.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/MethodInvocation.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/MethodInvocation.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/MethodInvocation.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/MethodInvocation.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/ExtractInstrumentationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/ExtractInstrumentationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/ExtractInstrumentationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/ExtractInstrumentationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/HighTierReconcileInstrumentationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/HighTierReconcileInstrumentationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/HighTierReconcileInstrumentationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/HighTierReconcileInstrumentationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/InlineInstrumentationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/InlineInstrumentationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/InlineInstrumentationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/InlineInstrumentationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/MidTierReconcileInstrumentationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/MidTierReconcileInstrumentationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/MidTierReconcileInstrumentationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/MidTierReconcileInstrumentationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/util/HashSetNodeEventListener.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/util/HashSetNodeEventListener.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/util/HashSetNodeEventListener.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/util/HashSetNodeEventListener.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/BasePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/BasePhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/BasePhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/BasePhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/LazyName.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/LazyName.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/LazyName.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/LazyName.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/OptimisticOptimizations.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/OptimisticOptimizations.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/OptimisticOptimizations.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/OptimisticOptimizations.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/Phase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/Phase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/Phase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/Phase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/PhaseSuite.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/PhaseSuite.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/PhaseSuite.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/PhaseSuite.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/VerifyPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/VerifyPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/VerifyPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/VerifyPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/NodeCostUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/NodeCostUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/NodeCostUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/NodeCostUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/PhaseSizeContract.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/PhaseSizeContract.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/PhaseSizeContract.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/PhaseSizeContract.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/FixedNodeProbabilityCache.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/FixedNodeProbabilityCache.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/FixedNodeProbabilityCache.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/FixedNodeProbabilityCache.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/InferStamps.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/InferStamps.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/InferStamps.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/InferStamps.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/MergeableState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/MergeableState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/MergeableState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/MergeableState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/PostOrderNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/PostOrderNodeIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/PostOrderNodeIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/PostOrderNodeIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantBlockIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantBlockIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantBlockIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantBlockIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantNodeIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantNodeIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantNodeIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScheduledNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScheduledNodeIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScheduledNodeIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScheduledNodeIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScopedPostOrderNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScopedPostOrderNodeIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScopedPostOrderNodeIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScopedPostOrderNodeIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/SinglePassNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/SinglePassNodeIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/SinglePassNodeIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/SinglePassNodeIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/StatelessPostOrderNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/StatelessPostOrderNodeIterator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/StatelessPostOrderNodeIterator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/StatelessPostOrderNodeIterator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/package-info.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/package-info.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/package-info.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/package-info.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/package-info.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/package-info.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/BlockClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/BlockClosure.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/BlockClosure.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/BlockClosure.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/MemoryScheduleVerification.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/MemoryScheduleVerification.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/MemoryScheduleVerification.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/MemoryScheduleVerification.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/CompilerConfiguration.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/CompilerConfiguration.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/CompilerConfiguration.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/CompilerConfiguration.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/HighTierContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/HighTierContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/HighTierContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/HighTierContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/LowTierContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/LowTierContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/LowTierContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/LowTierContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/MidTierContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/MidTierContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/MidTierContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/MidTierContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/PhaseContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/PhaseContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/PhaseContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/PhaseContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/Suites.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/Suites.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/Suites.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/Suites.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesCreator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesCreator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesCreator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesCreator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/TargetProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/TargetProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/TargetProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/TargetProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/BlockWorkList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/BlockWorkList.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/BlockWorkList.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/BlockWorkList.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/GraphOrder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/GraphOrder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/GraphOrder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/GraphOrder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/MethodDebugValueName.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/MethodDebugValueName.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/MethodDebugValueName.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/MethodDebugValueName.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyBailoutUsage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyBailoutUsage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyBailoutUsage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyBailoutUsage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyCallerSensitiveMethods.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyCallerSensitiveMethods.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyCallerSensitiveMethods.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyCallerSensitiveMethods.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyDebugUsage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyDebugUsage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyDebugUsage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyDebugUsage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUpdateUsages.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUpdateUsages.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUpdateUsages.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUpdateUsages.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUsageWithEquals.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUsageWithEquals.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUsageWithEquals.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUsageWithEquals.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyVirtualizableUsage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyVirtualizableUsage.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyVirtualizableUsage.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyVirtualizableUsage.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BasicIdealGraphPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BasicIdealGraphPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BasicIdealGraphPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BasicIdealGraphPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BinaryGraphPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BinaryGraphPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BinaryGraphPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BinaryGraphPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinterObserver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinterObserver.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinterObserver.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinterObserver.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CanonicalStringGraphPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CanonicalStringGraphPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CanonicalStringGraphPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CanonicalStringGraphPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CompilationPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CompilationPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CompilationPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CompilationPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraalDebugConfigCustomizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraalDebugConfigCustomizer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraalDebugConfigCustomizer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraalDebugConfigCustomizer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java
similarity index 98%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java
index 6ef7a6143a3..a88c564b7c2 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java
@@ -69,8 +69,7 @@ interface GraphPrinter extends Closeable {
     void close();
 
     /**
-     * A JVMCI package {@linkplain Services#exportJVMCITo(Class) dynamically exported} to trusted
-     * modules.
+     * A JVMCI package dynamically exported to trusted modules.
      */
     String JVMCI_RUNTIME_PACKAGE = JVMCI.class.getPackage().getName();
 
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinterDumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinterDumpHandler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinterDumpHandler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinterDumpHandler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/IdealGraphPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/IdealGraphPrinter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/IdealGraphPrinter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/IdealGraphPrinter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/NoDeadCodeVerifyHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/NoDeadCodeVerifyHandler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/NoDeadCodeVerifyHandler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/NoDeadCodeVerifyHandler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64CountLeadingZerosNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64CountLeadingZerosNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64CountLeadingZerosNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64CountLeadingZerosNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64FloatArithmeticSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64FloatArithmeticSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64FloatArithmeticSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64FloatArithmeticSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerArithmeticSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerArithmeticSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerArithmeticSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerArithmeticSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64LongSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64LongSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64LongSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64LongSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64ConvertSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64ConvertSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64ConvertSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64ConvertSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64FloatConvertNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64FloatConvertNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64FloatConvertNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64FloatConvertNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64RoundNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64RoundNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64RoundNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64RoundNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArrayStoreBytecodeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArrayStoreBytecodeExceptionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArrayStoreBytecodeExceptionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArrayStoreBytecodeExceptionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BytecodeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BytecodeExceptionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BytecodeExceptionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BytecodeExceptionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ClassCastBytecodeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ClassCastBytecodeExceptionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ClassCastBytecodeExceptionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ClassCastBytecodeExceptionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledExceptionHandlerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledExceptionHandlerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledExceptionHandlerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledExceptionHandlerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledNullPointerExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledNullPointerExceptionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledNullPointerExceptionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledNullPointerExceptionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java
similarity index 96%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java
index 783c276711c..29d9e330654 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java
@@ -30,10 +30,10 @@ import org.graalvm.compiler.test.ExportingClassLoader;
 import org.junit.Assert;
 import org.junit.Test;
 
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.Label;
-import jdk.internal.org.objectweb.asm.MethodVisitor;
-import jdk.internal.org.objectweb.asm.Opcodes;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
 import jdk.vm.ci.meta.ResolvedJavaMethod;
 
 /**
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DerivedOopTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DerivedOopTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DerivedOopTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DerivedOopTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DynamicNewArrayTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DynamicNewArrayTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DynamicNewArrayTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DynamicNewArrayTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IndexOobBytecodeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IndexOobBytecodeExceptionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IndexOobBytecodeExceptionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IndexOobBytecodeExceptionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfDynamicTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfDynamicTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfDynamicTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfDynamicTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerMulExactFoldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerMulExactFoldTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerMulExactFoldTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerMulExactFoldTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerSubOverflowsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerSubOverflowsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerSubOverflowsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerSubOverflowsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InvokeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InvokeTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InvokeTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InvokeTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MonitorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MonitorTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MonitorTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MonitorTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewArrayTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewArrayTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewArrayTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewArrayTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewInstanceTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewInstanceTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewInstanceTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewInstanceTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewMultiArrayTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewMultiArrayTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewMultiArrayTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewMultiArrayTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NullBytecodeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NullBytecodeExceptionTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NullBytecodeExceptionTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NullBytecodeExceptionTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTrackingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTrackingTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTrackingTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTrackingTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringEqualsConstantTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringEqualsConstantTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringEqualsConstantTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringEqualsConstantTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringHashConstantTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringHashConstantTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringHashConstantTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringHashConstantTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringSubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringSubstitutionsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringSubstitutionsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringSubstitutionsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/TypeCheckTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/TypeCheckTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/TypeCheckTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/TypeCheckTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsafeSubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsafeSubstitutionsTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsafeSubstitutionsTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsafeSubstitutionsTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedIntegerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedIntegerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedIntegerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedIntegerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedMathTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedMathTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedMathTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedMathTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnwindExceptionToCallerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnwindExceptionToCallerTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnwindExceptionToCallerTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnwindExceptionToCallerTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/WordTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/WordTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/WordTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/WordTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/META-INF/services/javax.annotation.processing.Processor b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/META-INF/services/javax.annotation.processing.Processor
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/META-INF/services/javax.annotation.processing.Processor
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/META-INF/services/javax.annotation.processing.Processor
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/APHotSpotSignature.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/APHotSpotSignature.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/APHotSpotSignature.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/APHotSpotSignature.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/AbstractVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/AbstractVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/AbstractVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/AbstractVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/ClassSubstitutionVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/ClassSubstitutionVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/ClassSubstitutionVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/ClassSubstitutionVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/FoldVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/FoldVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/FoldVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/FoldVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedFoldPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedFoldPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedFoldPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedFoldPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedNodeIntrinsicPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedNodeIntrinsicPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedNodeIntrinsicPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedNodeIntrinsicPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/InjectedDependencies.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/InjectedDependencies.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/InjectedDependencies.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/InjectedDependencies.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/MethodSubstitutionVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/MethodSubstitutionVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/MethodSubstitutionVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/MethodSubstitutionVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/NodeIntrinsicVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/NodeIntrinsicVerifier.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/NodeIntrinsicVerifier.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/NodeIntrinsicVerifier.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/PluginGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/PluginGenerator.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/PluginGenerator.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/PluginGenerator.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/VerifierAnnotationProcessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/VerifierAnnotationProcessor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/VerifierAnnotationProcessor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/VerifierAnnotationProcessor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraySubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraySubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraySubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraySubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraysSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraysSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraysSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraysSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/BoxingSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/BoxingSnippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/BoxingSnippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/BoxingSnippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ConstantBindingParameterPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ConstantBindingParameterPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ConstantBindingParameterPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ConstantBindingParameterPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/GraphKit.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/GraphKit.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/GraphKit.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/GraphKit.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineDuringParsingPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineDuringParsingPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineDuringParsingPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineDuringParsingPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineGraalDirectivesPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineGraalDirectivesPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineGraalDirectivesPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineGraalDirectivesPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InstanceOfSnippetsTemplates.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InstanceOfSnippetsTemplates.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InstanceOfSnippetsTemplates.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InstanceOfSnippetsTemplates.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntegerSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntegerSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntegerSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntegerSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/JavacBug.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/JavacBug.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/JavacBug.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/JavacBug.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Log.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Log.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Log.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Log.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/LongSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/LongSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/LongSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/LongSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/MethodHandlePlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/MethodHandlePlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/MethodHandlePlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/MethodHandlePlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/PEGraphDecoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/PEGraphDecoder.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/PEGraphDecoder.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/PEGraphDecoder.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Snippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Snippets.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Snippets.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Snippets.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java
similarity index 99%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java
index 8a45e457eda..ccc89420c7a 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java
@@ -251,7 +251,13 @@ public class StandardGraphBuilderPlugins {
 
         for (JavaKind kind : new JavaKind[]{JavaKind.Int, JavaKind.Long, JavaKind.Object}) {
             Class javaClass = kind == JavaKind.Object ? Object.class : kind.toJavaClass();
-            r.register5("compareAndSwap" + kind.name(), Receiver.class, Object.class, long.class, javaClass, javaClass, new InvocationPlugin() {
+            String casName;
+            if (Java8OrEarlier) {
+                casName = "compareAndSwap";
+            } else {
+                casName = "compareAndSet";
+            }
+            r.register5(casName + kind.name(), Receiver.class, Object.class, long.class, javaClass, javaClass, new InvocationPlugin() {
                 @Override
                 public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver unsafe, ValueNode object, ValueNode offset, ValueNode expected, ValueNode x) {
                     // Emits a null-check for the otherwise unused receiver
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StringSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StringSubstitutions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StringSubstitutions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StringSubstitutions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/WordOperationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/WordOperationPlugin.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/WordOperationPlugin.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/WordOperationPlugin.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecodeProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecodeProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecodeProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecodeProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstant.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstant.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstantPool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstantPool.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstantPool.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstantPool.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ArrayEqualsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ArrayEqualsNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ArrayEqualsNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ArrayEqualsNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/AssertionNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/AssertionNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/AssertionNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/AssertionNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicObjectCloneNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicObjectCloneNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicObjectCloneNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicObjectCloneNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BinaryMathIntrinsicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BinaryMathIntrinsicNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BinaryMathIntrinsicNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BinaryMathIntrinsicNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitCountNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitCountNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitCountNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitCountNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanForwardNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanForwardNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanForwardNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanForwardNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanReverseNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanReverseNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanReverseNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanReverseNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/CStringConstant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/CStringConstant.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/CStringConstant.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/CStringConstant.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectObjectStoreNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectObjectStoreNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectObjectStoreNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectObjectStoreNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectStoreNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectStoreNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectStoreNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectStoreNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ExplodeLoopNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ExplodeLoopNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ExplodeLoopNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ExplodeLoopNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/LoadSnippetVarargParameterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/LoadSnippetVarargParameterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/LoadSnippetVarargParameterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/LoadSnippetVarargParameterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MethodHandleNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MethodHandleNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MethodHandleNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MethodHandleNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/PureFunctionMacroNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/PureFunctionMacroNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/PureFunctionMacroNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/PureFunctionMacroNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReadRegisterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReadRegisterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReadRegisterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReadRegisterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ResolvedMethodHandleCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ResolvedMethodHandleCallTargetNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ResolvedMethodHandleCallTargetNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ResolvedMethodHandleCallTargetNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReverseBytesNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReverseBytesNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReverseBytesNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReverseBytesNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/UnaryMathIntrinsicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/UnaryMathIntrinsicNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/UnaryMathIntrinsicNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/UnaryMathIntrinsicNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/VirtualizableInvokeMacroNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/VirtualizableInvokeMacroNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/VirtualizableInvokeMacroNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/VirtualizableInvokeMacroNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/WriteRegisterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/WriteRegisterNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/WriteRegisterNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/WriteRegisterNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactSplitNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactSplitNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactSplitNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticSplitNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticSplitNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticSplitNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactSplitNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactSplitNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactSplitNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactSplitNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactSplitNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactSplitNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/UnsignedMulHighNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/UnsignedMulHighNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/UnsignedMulHighNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/UnsignedMulHighNode.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.runtime/src/org/graalvm/compiler/runtime/RuntimeProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.runtime/src/org/graalvm/compiler/runtime/RuntimeProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.runtime/src/org/graalvm/compiler/runtime/RuntimeProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.runtime/src/org/graalvm/compiler/runtime/RuntimeProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/Salver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/Salver.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/Salver.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/Salver.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverDebugConfigCustomizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverDebugConfigCustomizer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverDebugConfigCustomizer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverDebugConfigCustomizer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverOptions.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverOptions.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverOptions.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataDict.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataDict.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataDict.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataDict.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataList.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataList.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataList.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractGraalDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractGraalDumper.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractGraalDumper.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractGraalDumper.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractMethodScopeDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractMethodScopeDumper.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractMethodScopeDumper.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractMethodScopeDumper.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractSerializerDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractSerializerDumper.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractSerializerDumper.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractSerializerDumper.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/Dumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/Dumper.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/Dumper.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/Dumper.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/GraphDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/GraphDumper.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/GraphDumper.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/GraphDumper.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractDumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractDumpHandler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractDumpHandler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractDumpHandler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractGraalDumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractGraalDumpHandler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractGraalDumpHandler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractGraalDumpHandler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/DumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/DumpHandler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/DumpHandler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/DumpHandler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/GraphDumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/GraphDumpHandler.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/GraphDumpHandler.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/GraphDumpHandler.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/package-info.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/package-info.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/package-info.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/AbstractSerializer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/AbstractSerializer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/AbstractSerializer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/AbstractSerializer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/JSONSerializer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/JSONSerializer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/JSONSerializer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/JSONSerializer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/Serializer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/Serializer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/Serializer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/Serializer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/ECIDUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/ECIDUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/ECIDUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/ECIDUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/MethodContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/MethodContext.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/MethodContext.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/MethodContext.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/ChannelDumpWriter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/ChannelDumpWriter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/ChannelDumpWriter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/ChannelDumpWriter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/DumpWriter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/DumpWriter.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/DumpWriter.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/DumpWriter.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/META-INF/services/javax.annotation.processing.Processor b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/META-INF/services/javax.annotation.processing.Processor
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/META-INF/services/javax.annotation.processing.Processor
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/META-INF/services/javax.annotation.processing.Processor
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/org/graalvm/compiler/serviceprovider/processor/ServiceProviderProcessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/org/graalvm/compiler/serviceprovider/processor/ServiceProviderProcessor.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/org/graalvm/compiler/serviceprovider/processor/ServiceProviderProcessor.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/org/graalvm/compiler/serviceprovider/processor/ServiceProviderProcessor.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java
similarity index 65%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java
index 483cf774822..1f0a4483b4b 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java
@@ -22,9 +22,17 @@
  */
 package org.graalvm.compiler.serviceprovider;
 
+import static org.graalvm.compiler.serviceprovider.JDK9Method.Java8OrEarlier;
+import static org.graalvm.compiler.serviceprovider.JDK9Method.addOpens;
+import static org.graalvm.compiler.serviceprovider.JDK9Method.getModule;
+import static org.graalvm.compiler.serviceprovider.JDK9Method.getPackages;
+import static org.graalvm.compiler.serviceprovider.JDK9Method.isOpenTo;
+
+import java.lang.reflect.Method;
 import java.util.Iterator;
 import java.util.ServiceConfigurationError;
 import java.util.ServiceLoader;
+import java.util.Set;
 
 import jdk.vm.ci.services.JVMCIPermission;
 import jdk.vm.ci.services.Services;
@@ -32,14 +40,32 @@ import jdk.vm.ci.services.Services;
 /**
  * A mechanism for accessing service providers that abstracts over whether Graal is running on
  * JVMCI-8 or JVMCI-9. In JVMCI-8, a JVMCI specific mechanism is used to lookup services via the
- * hidden JVMCI class loader. in JVMCI-9, the standard {@link ServiceLoader} mechanism is used.
+ * hidden JVMCI class loader. In JVMCI-9, the standard {@link ServiceLoader} mechanism is used.
  */
 public final class GraalServices {
 
     private GraalServices() {
     }
 
-    public static final boolean Java8OrEarlier = System.getProperty("java.specification.version").compareTo("1.9") < 0;
+    /**
+     * Opens all JVMCI packages to the module of a given class. This relies on JVMCI already having
+     * opened all its packages to the module defining {@link GraalServices}.
+     *
+     * @param other all JVMCI packages will be opened to the module defining this class
+     */
+    public static void openJVMCITo(Class other) {
+        Object jvmci = getModule.invoke(Services.class);
+        Object otherModule = getModule.invoke(other);
+        if (jvmci != otherModule) {
+            Set packages = getPackages.invoke(jvmci);
+            for (String pkg : packages) {
+                boolean opened = isOpenTo.invoke(jvmci, pkg, otherModule);
+                if (!opened) {
+                    addOpens.invoke(jvmci, pkg, otherModule);
+                }
+            }
+        }
+    }
 
     /**
      * Gets an {@link Iterable} of the providers available for a given service.
@@ -50,9 +76,9 @@ public final class GraalServices {
     public static  Iterable load(Class service) {
         assert !service.getName().startsWith("jdk.vm.ci") : "JVMCI services must be loaded via " + Services.class.getName();
         if (Java8OrEarlier) {
-            return Services.load(service);
+            return load8(service);
         }
-        ServiceLoader iterable = ServiceLoader.load(service);
+        Iterable iterable = ServiceLoader.load(service);
         return new Iterable() {
             @Override
             public Iterator iterator() {
@@ -66,8 +92,8 @@ public final class GraalServices {
                     @Override
                     public S next() {
                         S provider = iterator.next();
-                        // Allow Graal extensions to access JVMCI assuming they have JVMCIPermission
-                        Services.exportJVMCITo(provider.getClass());
+                        // Allow Graal extensions to access JVMCI
+                        openJVMCITo(provider.getClass());
                         return provider;
                     }
 
@@ -80,6 +106,23 @@ public final class GraalServices {
         };
     }
 
+    /**
+     * {@code Services.load(Class)} is only defined in JVMCI-8.
+     */
+    private static volatile Method loadMethod;
+
+    @SuppressWarnings("unchecked")
+    private static  Iterable load8(Class service) throws InternalError {
+        try {
+            if (loadMethod == null) {
+                loadMethod = Services.class.getMethod("load", Class.class);
+            }
+            return (Iterable) loadMethod.invoke(null, service);
+        } catch (Exception e) {
+            throw new InternalError(e);
+        }
+    }
+
     /**
      * Gets the provider for a given service for which at most one provider must be available.
      *
@@ -92,16 +135,14 @@ public final class GraalServices {
      */
     public static  S loadSingle(Class service, boolean required) {
         assert !service.getName().startsWith("jdk.vm.ci") : "JVMCI services must be loaded via " + Services.class.getName();
-        if (Java8OrEarlier) {
-            return Services.loadSingle(service, required);
-        }
-        Iterable providers = ServiceLoader.load(service);
+        Iterable providers = load(service);
         S singleProvider = null;
         try {
             for (Iterator it = providers.iterator(); it.hasNext();) {
                 singleProvider = it.next();
                 if (it.hasNext()) {
-                    throw new InternalError(String.format("Multiple %s providers found", service.getName()));
+                    S other = it.next();
+                    throw new InternalError(String.format("Multiple %s providers found: %s, %s", service.getName(), singleProvider.getClass().getName(), other.getClass().getName()));
                 }
             }
         } catch (ServiceConfigurationError e) {
@@ -111,9 +152,6 @@ public final class GraalServices {
             if (required) {
                 throw new InternalError(String.format("No provider for %s found", service.getName()));
             }
-        } else {
-            // Allow Graal extensions to access JVMCI assuming they have JVMCIPermission
-            Services.exportJVMCITo(singleProvider.getClass());
         }
         return singleProvider;
     }
diff --git a/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/JDK9Method.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/JDK9Method.java
new file mode 100644
index 00000000000..17c8ae0dbbb
--- /dev/null
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/JDK9Method.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.graalvm.compiler.serviceprovider;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+/**
+ * Reflection based access to API introduced by JDK 9. This allows the API to be used in code that
+ * must be compiled on a JDK prior to 9.
+ */
+public final class JDK9Method {
+
+    private static int getJavaSpecificationVersion() {
+        String value = System.getProperty("java.specification.version");
+        if (value.startsWith("1.")) {
+            value = value.substring(2);
+        }
+        return Integer.parseInt(value);
+    }
+
+    /**
+     * The integer value corresponding to the value of the {@code java.specification.version} system
+     * property after any leading {@code "1."} has been stripped.
+     */
+    public static final int JAVA_SPECIFICATION_VERSION = getJavaSpecificationVersion();
+
+    public JDK9Method(Class declaringClass, String name, Class... parameterTypes) {
+        try {
+            this.method = declaringClass.getMethod(name, parameterTypes);
+        } catch (Exception e) {
+            throw new InternalError(e);
+        }
+    }
+
+    /**
+     * Determines if the Java runtime is version 8 or earlier.
+     */
+    public static final boolean Java8OrEarlier = JAVA_SPECIFICATION_VERSION <= 8;
+
+    public final Method method;
+
+    public Class getReturnType() {
+        return method.getReturnType();
+    }
+
+    /**
+     * {@code Class.getModule()}.
+     */
+    public static final JDK9Method getModule;
+
+    /**
+     * {@code java.lang.Module.getPackages()}.
+     */
+    public static final JDK9Method getPackages;
+
+    /**
+     * {@code java.lang.Module.getResourceAsStream(String)}.
+     */
+    public static final JDK9Method getResourceAsStream;
+
+    /**
+     * {@code java.lang.Module.addOpens(String, Module)}.
+     */
+    public static final JDK9Method addOpens;
+
+    /**
+     * {@code java.lang.Module.isOpen(String, Module)}.
+     */
+    public static final JDK9Method isOpenTo;
+
+    /**
+     * Invokes the static Module API method represented by this object.
+     */
+    @SuppressWarnings("unchecked")
+    public  T invokeStatic(Object... args) {
+        checkAvailability();
+        assert Modifier.isStatic(method.getModifiers());
+        try {
+            return (T) method.invoke(null, args);
+        } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+            throw new InternalError(e);
+        }
+    }
+
+    /**
+     * Invokes the non-static Module API method represented by this object.
+     */
+    @SuppressWarnings("unchecked")
+    public  T invoke(Object receiver, Object... args) {
+        checkAvailability();
+        assert !Modifier.isStatic(method.getModifiers());
+        try {
+            return (T) method.invoke(receiver, args);
+        } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+            throw new InternalError(e);
+        }
+    }
+
+    private void checkAvailability() throws InternalError {
+        if (method == null) {
+            throw new InternalError("Cannot use Module API on JDK " + JAVA_SPECIFICATION_VERSION);
+        }
+    }
+
+    static {
+        if (JAVA_SPECIFICATION_VERSION >= 9) {
+            getModule = new JDK9Method(Class.class, "getModule");
+            Class moduleClass = getModule.getReturnType();
+            getPackages = new JDK9Method(moduleClass, "getPackages");
+            addOpens = new JDK9Method(moduleClass, "addOpens", String.class, moduleClass);
+            getResourceAsStream = new JDK9Method(moduleClass, "getResourceAsStream", String.class);
+            isOpenTo = new JDK9Method(moduleClass, "isOpen", String.class, moduleClass);
+        } else {
+            JDK9Method unavailable = new JDK9Method();
+            getModule = unavailable;
+            getPackages = unavailable;
+            addOpens = unavailable;
+            getResourceAsStream = unavailable;
+            isOpenTo = unavailable;
+        }
+    }
+
+    private JDK9Method() {
+        method = null;
+    }
+}
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/ServiceProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/ServiceProvider.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/ServiceProvider.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/ServiceProvider.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java
similarity index 88%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java
index e139b19c971..1c08964c696 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java
@@ -29,14 +29,14 @@ package org.graalvm.compiler.test;
 public class ExportingClassLoader extends ClassLoader {
     public ExportingClassLoader() {
         if (!GraalTest.Java8OrEarlier) {
-            JLRModule.fromClass(getClass()).exportAllPackagesTo(JLRModule.getUnnamedModuleFor(this));
+            JLModule.fromClass(getClass()).exportAllPackagesTo(JLModule.getUnnamedModuleFor(this));
         }
     }
 
     public ExportingClassLoader(ClassLoader parent) {
         super(parent);
         if (!GraalTest.Java8OrEarlier) {
-            JLRModule.fromClass(getClass()).exportAllPackagesTo(JLRModule.getUnnamedModuleFor(this));
+            JLModule.fromClass(getClass()).exportAllPackagesTo(JLModule.getUnnamedModuleFor(this));
         }
     }
 }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLRModule.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLModule.java
similarity index 79%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLRModule.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLModule.java
index caa32231bd6..9f8c6e2014c 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLRModule.java
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLModule.java
@@ -23,22 +23,23 @@
 package org.graalvm.compiler.test;
 
 import java.lang.reflect.Method;
+import java.util.Set;
 
 /**
- * Facade for the {@code java.lang.reflect.Module} class introduced in JDK9 that allows tests to be
+ * Facade for the {@code java.lang.Module} class introduced in JDK9 that allows tests to be
  * developed against JDK8 but use module logic if deployed on JDK9.
  */
-public class JLRModule {
+public class JLModule {
 
     static {
         if (GraalTest.Java8OrEarlier) {
-            throw new AssertionError("Use of " + JLRModule.class + " only allowed if " + GraalTest.class.getName() + ".JDK8OrEarlier is false");
+            throw new AssertionError("Use of " + JLModule.class + " only allowed if " + GraalTest.class.getName() + ".JDK8OrEarlier is false");
         }
     }
 
     private final Object realModule;
 
-    public JLRModule(Object module) {
+    public JLModule(Object module) {
         this.realModule = module;
     }
 
@@ -51,7 +52,7 @@ public class JLRModule {
     private static final Method addExportsMethod;
     static {
         try {
-            moduleClass = Class.forName("java.lang.reflect.Module");
+            moduleClass = Class.forName("java.lang.Module");
             getModuleMethod = Class.class.getMethod("getModule");
             getUnnamedModuleMethod = ClassLoader.class.getMethod("getUnnamedModule");
             getPackagesMethod = moduleClass.getMethod("getPackages");
@@ -63,17 +64,17 @@ public class JLRModule {
         }
     }
 
-    public static JLRModule fromClass(Class cls) {
+    public static JLModule fromClass(Class cls) {
         try {
-            return new JLRModule(getModuleMethod.invoke(cls));
+            return new JLModule(getModuleMethod.invoke(cls));
         } catch (Exception e) {
             throw new AssertionError(e);
         }
     }
 
-    public static JLRModule getUnnamedModuleFor(ClassLoader cl) {
+    public static JLModule getUnnamedModuleFor(ClassLoader cl) {
         try {
-            return new JLRModule(getUnnamedModuleMethod.invoke(cl));
+            return new JLModule(getUnnamedModuleMethod.invoke(cl));
         } catch (Exception e) {
             throw new AssertionError(e);
         }
@@ -82,7 +83,7 @@ public class JLRModule {
     /**
      * Exports all packages in this module to a given module.
      */
-    public void exportAllPackagesTo(JLRModule module) {
+    public void exportAllPackagesTo(JLModule module) {
         if (this != module) {
             for (String pkg : getPackages()) {
                 // Export all JVMCI packages dynamically instead
@@ -95,9 +96,10 @@ public class JLRModule {
         }
     }
 
-    public String[] getPackages() {
+    @SuppressWarnings("unchecked")
+    public Set getPackages() {
         try {
-            return (String[]) getPackagesMethod.invoke(realModule);
+            return (Set) getPackagesMethod.invoke(realModule);
         } catch (Exception e) {
             throw new AssertionError(e);
         }
@@ -111,7 +113,7 @@ public class JLRModule {
         }
     }
 
-    public boolean isExported(String pn, JLRModule other) {
+    public boolean isExported(String pn, JLModule other) {
         try {
             return (Boolean) isExported2Method.invoke(realModule, pn, other.realModule);
         } catch (Exception e) {
@@ -119,7 +121,7 @@ public class JLRModule {
         }
     }
 
-    public void addExports(String pn, JLRModule other) {
+    public void addExports(String pn, JLModule other) {
         try {
             addExportsMethod.invoke(realModule, pn, other.realModule);
         } catch (Exception e) {
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/SubprocessUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/SubprocessUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/SubprocessUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/SubprocessUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/.checkstyle.exclude b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/.checkstyle.exclude
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/.checkstyle.exclude
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/.checkstyle.exclude
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/src/org/graalvm/compiler/virtual/bench/PartialEscapeBench.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/src/org/graalvm/compiler/virtual/bench/PartialEscapeBench.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/src/org/graalvm/compiler/virtual/bench/PartialEscapeBench.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/src/org/graalvm/compiler/virtual/bench/PartialEscapeBench.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/MaterializedObjectState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/MaterializedObjectState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/MaterializedObjectState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/MaterializedObjectState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/VirtualObjectState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/VirtualObjectState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/VirtualObjectState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/VirtualObjectState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EarlyReadEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EarlyReadEliminationPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EarlyReadEliminationPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EarlyReadEliminationPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectList.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectList.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectList.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsBlockState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsBlockState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsBlockState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsBlockState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsClosure.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsClosure.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsClosure.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsPhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsPhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsPhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ObjectState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ObjectState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ObjectState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ObjectState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationBlockState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationBlockState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationBlockState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationBlockState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeBlockState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeBlockState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeBlockState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeBlockState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeClosure.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeClosure.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeClosure.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapePhase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapePhase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapePhase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualUtil.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualUtil.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualUtil.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualizerToolImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualizerToolImpl.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualizerToolImpl.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualizerToolImpl.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicUnsigned.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicUnsigned.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicUnsigned.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicUnsigned.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicWord.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicWord.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicWord.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicWord.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/BarrieredAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/BarrieredAccess.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/BarrieredAccess.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/BarrieredAccess.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ComparableWord.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ComparableWord.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ComparableWord.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ComparableWord.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ObjectAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ObjectAccess.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ObjectAccess.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ObjectAccess.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Pointer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Pointer.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Pointer.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Pointer.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerBase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerBase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerBase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerUtils.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerUtils.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerUtils.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerUtils.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Signed.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Signed.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Signed.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Signed.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsafeAccess.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsafeAccess.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsafeAccess.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Unsigned.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Unsigned.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Unsigned.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Unsigned.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsignedUtils.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsignedUtils.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsignedUtils.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsignedUtils.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Word.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Word.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Word.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Word.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordBase.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordBase.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordBase.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordTypes.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordTypes.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordTypes.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordTypes.java
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/nodes/WordCastNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/nodes/WordCastNode.java
similarity index 100%
rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/nodes/WordCastNode.java
rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/nodes/WordCastNode.java
diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java
deleted file mode 100644
index dbeb7fbf6b0..00000000000
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.vm.ci.services;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Formatter;
-import java.util.Iterator;
-import java.util.ServiceConfigurationError;
-import java.util.ServiceLoader;
-
-/**
- * A mechanism for accessing service providers via JVMCI.
- */
-public final class Services {
-
-    private Services() {
-    }
-
-    private static int getJavaSpecificationVersion() {
-        String value = System.getProperty("java.specification.version");
-        if (value.startsWith("1.")) {
-            value = value.substring(2);
-        }
-        return Integer.parseInt(value);
-    }
-
-    /**
-     * The integer value corresponding to the value of the {@code java.specification.version} system
-     * property after any leading {@code "1."} has been stripped.
-     */
-    public static final int JAVA_SPECIFICATION_VERSION = getJavaSpecificationVersion();
-
-    // Use reflection so that this compiles on Java 8
-    private static final Method getModule;
-    private static final Method getPackages;
-    private static final Method addUses;
-    private static final Method isExported;
-    private static final Method addExports;
-
-    static {
-        if (JAVA_SPECIFICATION_VERSION >= 9) {
-            try {
-                getModule = Class.class.getMethod("getModule");
-                Class moduleClass = getModule.getReturnType();
-                getPackages = moduleClass.getMethod("getPackages");
-                addUses = moduleClass.getMethod("addUses", Class.class);
-                isExported = moduleClass.getMethod("isExported", String.class, moduleClass);
-                addExports = moduleClass.getMethod("addExports", String.class, moduleClass);
-            } catch (NoSuchMethodException | SecurityException e) {
-                throw new InternalError(e);
-            }
-        } else {
-            getModule = null;
-            getPackages = null;
-            addUses = null;
-            isExported = null;
-            addExports = null;
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    static  T invoke(Method method, Object receiver, Object... args) {
-        try {
-            return (T) method.invoke(receiver, args);
-        } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
-            throw new InternalError(e);
-        }
-    }
-
-    /**
-     * Performs any required security checks and dynamic reconfiguration to allow the module of a
-     * given class to access the classes in the JVMCI module.
-     *
-     * Note: This API uses {@link Class} instead of {@code Module} to provide backwards
-     * compatibility for JVMCI clients compiled against a JDK release earlier than 9.
-     *
-     * @param requestor a class requesting access to the JVMCI module for its module
-     * @throws SecurityException if a security manager is present and it denies
-     *             {@link JVMCIPermission}
-     */
-    public static void exportJVMCITo(Class requestor) {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) {
-            sm.checkPermission(new JVMCIPermission());
-        }
-        if (JAVA_SPECIFICATION_VERSION >= 9) {
-            Object jvmci = invoke(getModule, Services.class);
-            Object requestorModule = invoke(getModule, requestor);
-            if (jvmci != requestorModule) {
-                String[] packages = invoke(getPackages, jvmci);
-                for (String pkg : packages) {
-                    // Export all JVMCI packages dynamically instead
-                    // of requiring a long list of --add-exports
-                    // options on the JVM command line.
-                    boolean exported = invoke(isExported, jvmci, pkg, requestorModule);
-                    if (!exported) {
-                        invoke(addExports, jvmci, pkg, requestorModule);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Gets an {@link Iterable} of the JVMCI providers available for a given service.
-     *
-     * @throws SecurityException if a security manager is present and it denies
-     *             {@link JVMCIPermission}
-     */
-    public static  Iterable load(Class service) {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) {
-            sm.checkPermission(new JVMCIPermission());
-        }
-        if (JAVA_SPECIFICATION_VERSION >= 9) {
-            Object jvmci = invoke(getModule, Services.class);
-            invoke(addUses, jvmci, service);
-        }
-
-        // Restrict JVMCI clients to be on the class path or module path
-        return ServiceLoader.load(service, ClassLoader.getSystemClassLoader());
-    }
-
-    /**
-     * Gets the JVMCI provider for a given service for which at most one provider must be available.
-     *
-     * @param service the service whose provider is being requested
-     * @param required specifies if an {@link InternalError} should be thrown if no provider of
-     *            {@code service} is available
-     * @throws SecurityException if a security manager is present and it denies
-     *             {@link JVMCIPermission}
-     */
-    public static  S loadSingle(Class service, boolean required) {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) {
-            sm.checkPermission(new JVMCIPermission());
-        }
-        if (JAVA_SPECIFICATION_VERSION >= 9) {
-            Object jvmci = invoke(getModule, Services.class);
-            invoke(addUses, jvmci, service);
-        }
-        // Restrict JVMCI clients to be on the class path or module path
-        Iterable providers = ServiceLoader.load(service, ClassLoader.getSystemClassLoader());
-        S singleProvider = null;
-        try {
-            for (Iterator it = providers.iterator(); it.hasNext();) {
-                singleProvider = it.next();
-                if (it.hasNext()) {
-                    throw new InternalError(String.format("Multiple %s providers found", service.getName()));
-                }
-            }
-        } catch (ServiceConfigurationError e) {
-            // If the service is required we will bail out below.
-        }
-        if (singleProvider == null && required) {
-            String javaHome = System.getProperty("java.home");
-            String vmName = System.getProperty("java.vm.name");
-            Formatter errorMessage = new Formatter();
-            errorMessage.format("The VM does not expose required service %s.%n", service.getName());
-            errorMessage.format("Currently used Java home directory is %s.%n", javaHome);
-            errorMessage.format("Currently used VM configuration is: %s", vmName);
-            throw new UnsupportedOperationException(errorMessage.toString());
-        }
-        return singleProvider;
-    }
-}
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java
deleted file mode 100644
index b33b0cf437f..00000000000
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package org.graalvm.compiler.hotspot;
-
-import static org.graalvm.compiler.core.common.util.ModuleAPI.addExports;
-import static org.graalvm.compiler.core.common.util.ModuleAPI.getModule;
-import static org.graalvm.compiler.core.common.util.Util.JAVA_SPECIFICATION_VERSION;
-
-import org.graalvm.compiler.serviceprovider.ServiceProvider;
-
-import jdk.vm.ci.hotspot.HotSpotVMEventListener;
-import jdk.vm.ci.runtime.JVMCICompilerFactory;
-import jdk.vm.ci.services.JVMCIServiceLocator;
-
-@ServiceProvider(JVMCIServiceLocator.class)
-public final class HotSpotGraalJVMCIServiceLocator extends JVMCIServiceLocator {
-
-    private boolean exportsAdded;
-
-    /**
-     * Dynamically exports various internal JDK packages to the Graal module. This requires only
-     * {@code --add-exports=java.base/jdk.internal.module=org.graalvm.compiler.graal_core} on the VM
-     * command line instead of a {@code --add-exports} instance for each JDK internal package used
-     * by Graal.
-     */
-    private void addExports() {
-        if (JAVA_SPECIFICATION_VERSION >= 9 && !exportsAdded) {
-            Object javaBaseModule = getModule.invoke(String.class);
-            Object graalModule = getModule.invoke(getClass());
-            addExports.invokeStatic(javaBaseModule, "jdk.internal.misc", graalModule);
-            addExports.invokeStatic(javaBaseModule, "jdk.internal.jimage", graalModule);
-            addExports.invokeStatic(javaBaseModule, "com.sun.crypto.provider", graalModule);
-            exportsAdded = true;
-        }
-    }
-
-    private HotSpotGraalRuntime graalRuntime;
-
-    @Override
-    public  T getProvider(Class service) {
-        if (service == JVMCICompilerFactory.class) {
-            addExports();
-            return service.cast(new HotSpotGraalCompilerFactory(this));
-        } else if (service == HotSpotVMEventListener.class) {
-            if (graalRuntime != null) {
-                addExports();
-                return service.cast(new HotSpotGraalVMEventListener(graalRuntime));
-            }
-        }
-        return null;
-    }
-
-    public void onCompilerCreation(HotSpotGraalCompiler compiler) {
-        assert this.graalRuntime == null : "only expect a single JVMCICompiler to be created";
-        this.graalRuntime = (HotSpotGraalRuntime) compiler.getGraalRuntime();
-    }
-}
diff --git a/hotspot/src/share/vm/Xusage.txt b/hotspot/src/share/vm/Xusage.txt
index 3849f8f8e2c..8c8eba19ace 100644
--- a/hotspot/src/share/vm/Xusage.txt
+++ b/hotspot/src/share/vm/Xusage.txt
@@ -12,7 +12,7 @@
     -Xms        set initial Java heap size
     -Xmx        set maximum Java heap size
     -Xss        set java thread stack size
-    -Xprof            output cpu profiling data
+    -Xprof            output cpu profiling data (deprecated)
     -Xfuture          enable strictest checks, anticipating future default
     -Xrs              reduce use of OS signals by Java/VM (see documentation)
     -Xcheck:jni       perform additional checks for JNI functions
diff --git a/hotspot/src/share/vm/aot/aotCodeHeap.cpp b/hotspot/src/share/vm/aot/aotCodeHeap.cpp
index 52e2c8d55b1..87d41f80777 100644
--- a/hotspot/src/share/vm/aot/aotCodeHeap.cpp
+++ b/hotspot/src/share/vm/aot/aotCodeHeap.cpp
@@ -830,38 +830,19 @@ void AOTCodeHeap::oops_do(OopClosure* f) {
   }
 }
 
-// Yes, this is faster than going through the relocations,
-// but there are two problems:
-// 1) GOT slots are sometimes patched with non-Metadata values
-// 2) We don't want to scan metadata for dead methods
-// Unfortunately we don't know if the metadata belongs to
-// live aot methods or not, so process them all.  If this
-// is for mark_on_stack, some old methods may stick around
-// forever instead of getting cleaned up.
+// Scan only metaspace_got cells which should have only Klass*,
+// metadata_got cells are scanned only for alive AOT methods
+// by AOTCompiledMethod::metadata_do().
 void AOTCodeHeap::got_metadata_do(void f(Metadata*)) {
   for (int i = 1; i < _metaspace_got_size; i++) {
     Metadata** p = &_metaspace_got[i];
     Metadata* md = *p;
     if (md == NULL)  continue;  // skip non-oops
-    intptr_t meta = (intptr_t)md;
-    if (meta == -1)  continue;  // skip non-oops
     if (Metaspace::contains(md)) {
       f(md);
-    }
-  }
-  for (int i = 1; i < _metadata_got_size; i++) {
-    Metadata** p = &_metadata_got[i];
-    Metadata* md = *p;
-    intptr_t meta = (intptr_t)md;
-    if ((meta & 1) == 1) {
-      // already resolved
-      md = (Metadata*)(meta & ~1);
     } else {
-      continue;
-    }
-    if (md == NULL)  continue;  // skip non-oops
-    if (Metaspace::contains(md)) {
-      f(md);
+      intptr_t meta = (intptr_t)md;
+      fatal("Invalid value in _metaspace_got[%d] = " INTPTR_FORMAT, i, meta);
     }
   }
 }
@@ -910,8 +891,6 @@ void AOTCodeHeap::metadata_do(void f(Metadata*)) {
       aot->metadata_do(f);
     }
   }
-#if 0
-  // With the marking above, this call doesn't seem to be needed
+  // Scan metaspace_got cells.
   got_metadata_do(f);
-#endif
 }
diff --git a/hotspot/src/share/vm/aot/aotCodeHeap.hpp b/hotspot/src/share/vm/aot/aotCodeHeap.hpp
index 0e0d0038d10..5c803cc0903 100644
--- a/hotspot/src/share/vm/aot/aotCodeHeap.hpp
+++ b/hotspot/src/share/vm/aot/aotCodeHeap.hpp
@@ -240,6 +240,11 @@ public:
     assert(result == CodeHeap::contains(p), "");
     return result;
   }
+
+  bool contains_blob(const CodeBlob* blob) const {
+    return CodeHeap::contains(blob->code_begin());
+  }
+
   AOTCompiledMethod* find_aot(address p) const;
 
   virtual void* find_start(void* p)     const;
diff --git a/hotspot/src/share/vm/aot/aotCompiledMethod.cpp b/hotspot/src/share/vm/aot/aotCompiledMethod.cpp
index 1f40284da7e..c501ce12e69 100644
--- a/hotspot/src/share/vm/aot/aotCompiledMethod.cpp
+++ b/hotspot/src/share/vm/aot/aotCompiledMethod.cpp
@@ -71,15 +71,6 @@ static void metadata_oops_do(Metadata** metadata_begin, Metadata **metadata_end,
 }
 #endif
 
-void AOTCompiledMethod::oops_do(OopClosure* f) {
-  if (_oop != NULL) {
-    f->do_oop(&_oop);
-  }
-#if 0
-  metadata_oops_do(metadata_begin(), metadata_end(), f);
-#endif
-}
-
 bool AOTCompiledMethod::do_unloading_oops(address low_boundary, BoolObjectClosure* is_alive, bool unloading_occurred) {
   return false;
 }
@@ -161,9 +152,6 @@ Metadata* AOTCompiledMethod::metadata_at(int index) const {
       *entry = (Metadata*)meta; // Should be atomic on x64
       return (Metadata*)m;
     }
-    // need to resolve it here..., patching of GOT need to be CAS or atomic operation.
-    // FIXIT: need methods for debuginfo.
-    // return _method;
   }
   ShouldNotReachHere(); return NULL;
 }
@@ -288,11 +276,19 @@ void AOTCompiledMethod::metadata_do(void f(Metadata*)) {
           f(cichk->holder_method());
           f(cichk->holder_klass());
         } else {
+          // Get Klass* or NULL (if value is -1) from GOT cell of virtual call PLT stub.
           Metadata* ic_oop = ic->cached_metadata();
           if (ic_oop != NULL) {
             f(ic_oop);
           }
         }
+      } else if (iter.type() == relocInfo::static_call_type ||
+                 iter.type() == relocInfo::opt_virtual_call_type){
+        // Check Method* in AOT c2i stub for other calls.
+        Metadata* meta = (Metadata*)nativeLoadGot_at(nativePltCall_at(iter.addr())->plt_c2i_stub())->data();
+        if (meta != NULL) {
+          f(meta);
+        }
       }
     }
   }
@@ -332,7 +328,12 @@ void AOTCompiledMethod::print_on(outputStream* st, const char* msg) const {
     st->print("%4d ", _aot_id);    // print compilation number
     st->print("    aot[%2d]", _heap->dso_id());
     // Stubs have _method == NULL
-    st->print("   %s", (_method == NULL ? _name : _method->name_and_sig_as_C_string()));
+    if (_method == NULL) {
+      st->print("   %s", _name);
+    } else {
+      ResourceMark m;
+      st->print("   %s", _method->name_and_sig_as_C_string());
+    }
     if (Verbose) {
       st->print(" entry at " INTPTR_FORMAT, p2i(_code));
     }
diff --git a/hotspot/src/share/vm/aot/aotCompiledMethod.hpp b/hotspot/src/share/vm/aot/aotCompiledMethod.hpp
index 7fef6fdb433..723bbdb8d30 100644
--- a/hotspot/src/share/vm/aot/aotCompiledMethod.hpp
+++ b/hotspot/src/share/vm/aot/aotCompiledMethod.hpp
@@ -257,8 +257,6 @@ private:
     return (int) (*_state_adr);
   }
 
-  virtual void oops_do(OopClosure* f);
-
   // inlined and non-virtual for AOTCodeHeap::oops_do
   void do_oops(OopClosure* f) {
     assert(_is_alive(), "");
diff --git a/hotspot/src/share/vm/aot/aotLoader.cpp b/hotspot/src/share/vm/aot/aotLoader.cpp
index 0dbf9ff72e4..bd2cc8f58f0 100644
--- a/hotspot/src/share/vm/aot/aotLoader.cpp
+++ b/hotspot/src/share/vm/aot/aotLoader.cpp
@@ -113,8 +113,8 @@ static const char* modules[] = {
   "java.logging",
   "jdk.compiler",
   "jdk.scripting.nashorn",
-  "jdk.vm.ci",
-  "jdk.vm.compiler"
+  "jdk.internal.vm.ci",
+  "jdk.internal.vm.compiler"
 };
 
 void AOTLoader::initialize() {
diff --git a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
index e3a7af67742..095ac876292 100644
--- a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
+++ b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
@@ -248,7 +248,9 @@ void Canonicalizer::do_ArrayLength    (ArrayLength*     x) {
   } else if ((lf = x->array()->as_LoadField()) != NULL) {
     ciField* field = lf->field();
     if (field->is_static_constant()) {
-      assert(PatchALot || ScavengeRootsInCode < 2, "Constant field loads are folded during parsing");
+      // Constant field loads are usually folded during parsing.
+      // But it doesn't happen with PatchALot, ScavengeRootsInCode < 2, or when
+      // holder class is being initialized during parsing (for static fields).
       ciObject* c = field->constant_value().as_object();
       if (!c->is_null_object()) {
         set_constant(c->as_array()->length());
diff --git a/hotspot/src/share/vm/c1/c1_CodeStubs.hpp b/hotspot/src/share/vm/c1/c1_CodeStubs.hpp
index 457c9cc14eb..3f2dbde1939 100644
--- a/hotspot/src/share/vm/c1/c1_CodeStubs.hpp
+++ b/hotspot/src/share/vm/c1/c1_CodeStubs.hpp
@@ -58,6 +58,7 @@ class CodeStub: public CompilationResourceObj {
   virtual bool is_exception_throw_stub() const   { return false; }
   virtual bool is_range_check_stub() const       { return false; }
   virtual bool is_divbyzero_stub() const         { return false; }
+  virtual bool is_simple_exception_stub() const  { return false; }
 #ifndef PRODUCT
   virtual void print_name(outputStream* out) const = 0;
 #endif
@@ -483,6 +484,7 @@ class SimpleExceptionStub: public CodeStub {
   virtual void emit_code(LIR_Assembler* e);
   virtual CodeEmitInfo* info() const             { return _info; }
   virtual bool is_exception_throw_stub() const   { return true; }
+  virtual bool is_simple_exception_stub() const  { return true; }
   virtual void visit(LIR_OpVisitState* visitor) {
     if (_obj->is_valid()) visitor->do_input(_obj);
     visitor->do_slow_case(_info);
diff --git a/hotspot/src/share/vm/c1/c1_Compiler.cpp b/hotspot/src/share/vm/c1/c1_Compiler.cpp
index 731b9efc96c..416f0f38fc8 100644
--- a/hotspot/src/share/vm/c1/c1_Compiler.cpp
+++ b/hotspot/src/share/vm/c1/c1_Compiler.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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,7 @@ bool Compiler::is_intrinsic_supported(const methodHandle& method) {
   }
 
   switch (id) {
-  case vmIntrinsics::_compareAndSwapLong:
+  case vmIntrinsics::_compareAndSetLong:
     if (!VM_Version::supports_cx8()) return false;
     break;
   case vmIntrinsics::_getAndAddInt:
@@ -217,8 +217,8 @@ bool Compiler::is_intrinsic_supported(const methodHandle& method) {
   case vmIntrinsics::_updateDirectByteBufferCRC32C:
 #endif
   case vmIntrinsics::_vectorizedMismatch:
-  case vmIntrinsics::_compareAndSwapInt:
-  case vmIntrinsics::_compareAndSwapObject:
+  case vmIntrinsics::_compareAndSetInt:
+  case vmIntrinsics::_compareAndSetObject:
   case vmIntrinsics::_getCharStringU:
   case vmIntrinsics::_putCharStringU:
 #ifdef TRACE_HAVE_INTRINSICS
diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
index 1a0a5f63687..d4400483912 100644
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -1540,7 +1540,7 @@ void GraphBuilder::method_return(Value x, bool ignore_return) {
         ciMethod* caller = state()->scope()->method();
         ciMethodData* md = caller->method_data_or_null();
         ciProfileData* data = md->bci_to_data(invoke_bci);
-        if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
+        if (data != NULL && (data->is_CallTypeData() || data->is_VirtualCallTypeData())) {
           bool has_return = data->is_CallTypeData() ? ((ciCallTypeData*)data)->has_return() : ((ciVirtualCallTypeData*)data)->has_return();
           // May not be true in case of an inlined call through a method handle intrinsic.
           if (has_return) {
@@ -1758,7 +1758,7 @@ Values* GraphBuilder::args_list_for_profiling(ciMethod* target, int& start, bool
   start = has_receiver ? 1 : 0;
   if (profile_arguments()) {
     ciProfileData* data = method()->method_data()->bci_to_data(bci());
-    if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
+    if (data != NULL && (data->is_CallTypeData() || data->is_VirtualCallTypeData())) {
       n = data->is_CallTypeData() ? data->as_CallTypeData()->number_of_arguments() : data->as_VirtualCallTypeData()->number_of_arguments();
     }
   }
@@ -1829,6 +1829,20 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
                 log->identify(target),
                 Bytecodes::name(code));
 
+  // invoke-special-super
+  if (bc_raw == Bytecodes::_invokespecial && !target->is_object_initializer()) {
+    ciInstanceKlass* sender_klass =
+          calling_klass->is_anonymous() ? calling_klass->host_klass() :
+                                          calling_klass;
+    if (sender_klass->is_interface()) {
+      int index = state()->stack_size() - (target->arg_size_no_receiver() + 1);
+      Value receiver = state()->stack_at(index);
+      CheckCast* c = new CheckCast(sender_klass, receiver, copy_state_before());
+      c->set_invokespecial_receiver_check();
+      state()->stack_at_put(index, append_split(c));
+    }
+  }
+
   // Some methods are obviously bindable without any type checks so
   // convert them directly to an invokespecial or invokestatic.
   if (target->is_loaded() && !target->is_abstract() && target->can_be_statically_bound()) {
@@ -3486,9 +3500,9 @@ void GraphBuilder::build_graph_for_intrinsic(ciMethod* callee, bool ignore_retur
   case vmIntrinsics::_putLongVolatile    : append_unsafe_put_obj(callee, T_LONG,    true); return;
   case vmIntrinsics::_putFloatVolatile   : append_unsafe_put_obj(callee, T_FLOAT,   true); return;
   case vmIntrinsics::_putDoubleVolatile  : append_unsafe_put_obj(callee, T_DOUBLE,  true); return;
-  case vmIntrinsics::_compareAndSwapLong:
-  case vmIntrinsics::_compareAndSwapInt:
-  case vmIntrinsics::_compareAndSwapObject: append_unsafe_CAS(callee); return;
+  case vmIntrinsics::_compareAndSetLong:
+  case vmIntrinsics::_compareAndSetInt:
+  case vmIntrinsics::_compareAndSetObject: append_unsafe_CAS(callee); return;
   case vmIntrinsics::_getAndAddInt:
   case vmIntrinsics::_getAndAddLong      : append_unsafe_get_and_set_obj(callee, true); return;
   case vmIntrinsics::_getAndSetInt       :
@@ -3995,10 +4009,14 @@ bool GraphBuilder::try_method_handle_inline(ciMethod* callee, bool ignore_return
         ciMethod* target = type->as_ObjectType()->constant_value()->as_method_handle()->get_vmtarget();
         // We don't do CHA here so only inline static and statically bindable methods.
         if (target->is_static() || target->can_be_statically_bound()) {
-          Bytecodes::Code bc = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokevirtual;
-          ignore_return = ignore_return || (callee->return_type()->is_void() && !target->return_type()->is_void());
-          if (try_inline(target, /*holder_known*/ true, ignore_return, bc)) {
-            return true;
+          if (ciMethod::is_consistent_info(callee, target)) {
+            Bytecodes::Code bc = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokevirtual;
+            ignore_return = ignore_return || (callee->return_type()->is_void() && !target->return_type()->is_void());
+            if (try_inline(target, /*holder_known*/ true, ignore_return, bc)) {
+              return true;
+            }
+          } else {
+            print_inlining(target, "signatures mismatch", /*success*/ false);
           }
         } else {
           print_inlining(target, "not static or statically bindable", /*success*/ false);
@@ -4026,6 +4044,8 @@ bool GraphBuilder::try_method_handle_inline(ciMethod* callee, bool ignore_return
           if (try_method_handle_inline(target, ignore_return)) {
             return true;
           }
+        } else if (!ciMethod::is_consistent_info(callee, target)) {
+          print_inlining(target, "signatures mismatch", /*success*/ false);
         } else {
           ciSignature* signature = target->signature();
           const int receiver_skip = target->is_static() ? 0 : 1;
@@ -4343,7 +4363,7 @@ void GraphBuilder::profile_return_type(Value ret, ciMethod* callee, ciMethod* m,
   }
   ciMethodData* md = m->method_data_or_null();
   ciProfileData* data = md->bci_to_data(invoke_bci);
-  if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
+  if (data != NULL && (data->is_CallTypeData() || data->is_VirtualCallTypeData())) {
     append(new ProfileReturnType(m , invoke_bci, callee, ret));
   }
 }
diff --git a/hotspot/src/share/vm/c1/c1_Instruction.hpp b/hotspot/src/share/vm/c1/c1_Instruction.hpp
index 4b01069498c..c71b5619147 100644
--- a/hotspot/src/share/vm/c1/c1_Instruction.hpp
+++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp
@@ -372,6 +372,7 @@ class Instruction: public CompilationResourceObj {
     UnorderedIsTrueFlag,
     NeedsPatchingFlag,
     ThrowIncompatibleClassChangeErrorFlag,
+    InvokeSpecialReceiverCheckFlag,
     ProfileMDOFlag,
     IsLinkedInBlockFlag,
     NeedsRangeCheckFlag,
@@ -1454,6 +1455,16 @@ LEAF(CheckCast, TypeCheck)
   bool is_incompatible_class_change_check() const {
     return check_flag(ThrowIncompatibleClassChangeErrorFlag);
   }
+  void set_invokespecial_receiver_check() {
+    set_flag(InvokeSpecialReceiverCheckFlag, true);
+  }
+  bool is_invokespecial_receiver_check() const {
+    return check_flag(InvokeSpecialReceiverCheckFlag);
+  }
+
+  virtual bool needs_exception_state() const {
+    return !is_invokespecial_receiver_check();
+  }
 
   ciType* declared_type() const;
 };
diff --git a/hotspot/src/share/vm/c1/c1_LIR.cpp b/hotspot/src/share/vm/c1/c1_LIR.cpp
index 05f39476849..e6cdb5e7c03 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.cpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.cpp
@@ -1413,6 +1413,17 @@ void LIR_List::store_check(LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr
   append(c);
 }
 
+void LIR_List::null_check(LIR_Opr opr, CodeEmitInfo* info, bool deoptimize_on_null) {
+  if (deoptimize_on_null) {
+    // Emit an explicit null check and deoptimize if opr is null
+    CodeStub* deopt = new DeoptimizeStub(info, Deoptimization::Reason_null_check, Deoptimization::Action_none);
+    cmp(lir_cond_equal, opr, LIR_OprFact::oopConst(NULL));
+    branch(lir_cond_equal, T_OBJECT, deopt);
+  } else {
+    // Emit an implicit null check
+    append(new LIR_Op1(lir_null_check, opr, info));
+  }
+}
 
 void LIR_List::cas_long(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
                         LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
diff --git a/hotspot/src/share/vm/c1/c1_LIR.hpp b/hotspot/src/share/vm/c1/c1_LIR.hpp
index 79d298d4cdf..a9c073d32b0 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.hpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.hpp
@@ -613,7 +613,7 @@ class LIR_OprFact: public AllStatic {
   // Platform dependant.
   static LIR_Opr double_fpu(int reg1, int reg2 = -1 /*fnoreg*/);
 
-#ifdef __SOFTFP__
+#ifdef ARM32
   static LIR_Opr single_softfp(int reg) {
     return (LIR_Opr)(intptr_t)((reg  << LIR_OprDesc::reg1_shift) |
                                LIR_OprDesc::float_type           |
@@ -627,7 +627,7 @@ class LIR_OprFact: public AllStatic {
                                LIR_OprDesc::cpu_register         |
                                LIR_OprDesc::double_size);
   }
-#endif // __SOFTFP__
+#endif // ARM32
 
 #if defined(X86)
   static LIR_Opr single_xmm(int reg) {
@@ -2113,7 +2113,7 @@ class LIR_List: public CompilationResourceObj {
   void   pack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_pack64,   src, dst, T_LONG, lir_patch_none, NULL)); }
   void unpack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_unpack64, src, dst, T_LONG, lir_patch_none, NULL)); }
 
-  void null_check(LIR_Opr opr, CodeEmitInfo* info)         { append(new LIR_Op1(lir_null_check, opr, info)); }
+  void null_check(LIR_Opr opr, CodeEmitInfo* info, bool deoptimize_on_null = false);
   void throw_exception(LIR_Opr exceptionPC, LIR_Opr exceptionOop, CodeEmitInfo* info) {
     append(new LIR_Op2(lir_throw, exceptionPC, exceptionOop, LIR_OprFact::illegalOpr, info));
   }
diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
index 0c10e864e3f..cfb9cbc997d 100644
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -545,11 +545,11 @@ void LIRGenerator::arithmetic_op(Bytecodes::Code code, LIR_Opr result, LIR_Opr l
 
     case Bytecodes::_imul:
       {
-        bool    did_strength_reduce = false;
+        bool did_strength_reduce = false;
 
         if (right->is_constant()) {
-          int c = right->as_jint();
-          if (is_power_of_2(c)) {
+          jint c = right->as_jint();
+          if (c > 0 && is_power_of_2(c)) {
             // do not need tmp here
             __ shift_left(left_op, exact_log2(c), result_op);
             did_strength_reduce = true;
@@ -1752,8 +1752,10 @@ void LIRGenerator::do_StoreField(StoreField* x) {
   if (x->needs_null_check() &&
       (needs_patching ||
        MacroAssembler::needs_explicit_null_check(x->offset()))) {
-    // emit an explicit null check because the offset is too large
-    __ null_check(object.result(), new CodeEmitInfo(info));
+    // Emit an explicit null check because the offset is too large.
+    // If the class is not loaded and the object is NULL, we need to deoptimize to throw a
+    // NoClassDefFoundError in the interpreter instead of an implicit NPE from compiled code.
+    __ null_check(object.result(), new CodeEmitInfo(info), /* deoptimize */ needs_patching);
   }
 
   LIR_Address* address;
@@ -1838,8 +1840,10 @@ void LIRGenerator::do_LoadField(LoadField* x) {
       obj = new_register(T_OBJECT);
       __ move(LIR_OprFact::oopConst(NULL), obj);
     }
-    // emit an explicit null check because the offset is too large
-    __ null_check(obj, new CodeEmitInfo(info));
+    // Emit an explicit null check because the offset is too large.
+    // If the class is not loaded and the object is NULL, we need to deoptimize to throw a
+    // NoClassDefFoundError in the interpreter instead of an implicit NPE from compiled code.
+    __ null_check(obj, new CodeEmitInfo(info), /* deoptimize */ needs_patching);
   }
 
   LIR_Opr reg = rlock_result(x, field_type);
@@ -3208,13 +3212,13 @@ void LIRGenerator::do_Intrinsic(Intrinsic* x) {
   // java.nio.Buffer.checkIndex
   case vmIntrinsics::_checkIndex:     do_NIOCheckIndex(x); break;
 
-  case vmIntrinsics::_compareAndSwapObject:
+  case vmIntrinsics::_compareAndSetObject:
     do_CompareAndSwap(x, objectType);
     break;
-  case vmIntrinsics::_compareAndSwapInt:
+  case vmIntrinsics::_compareAndSetInt:
     do_CompareAndSwap(x, intType);
     break;
-  case vmIntrinsics::_compareAndSwapLong:
+  case vmIntrinsics::_compareAndSetLong:
     do_CompareAndSwap(x, longType);
     break;
 
@@ -3258,50 +3262,52 @@ void LIRGenerator::profile_arguments(ProfileCall* x) {
     int bci = x->bci_of_invoke();
     ciMethodData* md = x->method()->method_data_or_null();
     ciProfileData* data = md->bci_to_data(bci);
-    if ((data->is_CallTypeData() && data->as_CallTypeData()->has_arguments()) ||
-        (data->is_VirtualCallTypeData() && data->as_VirtualCallTypeData()->has_arguments())) {
-      ByteSize extra = data->is_CallTypeData() ? CallTypeData::args_data_offset() : VirtualCallTypeData::args_data_offset();
-      int base_offset = md->byte_offset_of_slot(data, extra);
-      LIR_Opr mdp = LIR_OprFact::illegalOpr;
-      ciTypeStackSlotEntries* args = data->is_CallTypeData() ? ((ciCallTypeData*)data)->args() : ((ciVirtualCallTypeData*)data)->args();
+    if (data != NULL) {
+      if ((data->is_CallTypeData() && data->as_CallTypeData()->has_arguments()) ||
+          (data->is_VirtualCallTypeData() && data->as_VirtualCallTypeData()->has_arguments())) {
+        ByteSize extra = data->is_CallTypeData() ? CallTypeData::args_data_offset() : VirtualCallTypeData::args_data_offset();
+        int base_offset = md->byte_offset_of_slot(data, extra);
+        LIR_Opr mdp = LIR_OprFact::illegalOpr;
+        ciTypeStackSlotEntries* args = data->is_CallTypeData() ? ((ciCallTypeData*)data)->args() : ((ciVirtualCallTypeData*)data)->args();
 
-      Bytecodes::Code bc = x->method()->java_code_at_bci(bci);
-      int start = 0;
-      int stop = data->is_CallTypeData() ? ((ciCallTypeData*)data)->number_of_arguments() : ((ciVirtualCallTypeData*)data)->number_of_arguments();
-      if (x->callee()->is_loaded() && x->callee()->is_static() && Bytecodes::has_receiver(bc)) {
-        // first argument is not profiled at call (method handle invoke)
-        assert(x->method()->raw_code_at_bci(bci) == Bytecodes::_invokehandle, "invokehandle expected");
-        start = 1;
-      }
-      ciSignature* callee_signature = x->callee()->signature();
-      // method handle call to virtual method
-      bool has_receiver = x->callee()->is_loaded() && !x->callee()->is_static() && !Bytecodes::has_receiver(bc);
-      ciSignatureStream callee_signature_stream(callee_signature, has_receiver ? x->callee()->holder() : NULL);
-
-      bool ignored_will_link;
-      ciSignature* signature_at_call = NULL;
-      x->method()->get_method_at_bci(bci, ignored_will_link, &signature_at_call);
-      ciSignatureStream signature_at_call_stream(signature_at_call);
-
-      // if called through method handle invoke, some arguments may have been popped
-      for (int i = 0; i < stop && i+start < x->nb_profiled_args(); i++) {
-        int off = in_bytes(TypeEntriesAtCall::argument_type_offset(i)) - in_bytes(TypeEntriesAtCall::args_data_offset());
-        ciKlass* exact = profile_type(md, base_offset, off,
-                                      args->type(i), x->profiled_arg_at(i+start), mdp,
-                                      !x->arg_needs_null_check(i+start),
-                                      signature_at_call_stream.next_klass(), callee_signature_stream.next_klass());
-        if (exact != NULL) {
-          md->set_argument_type(bci, i, exact);
+        Bytecodes::Code bc = x->method()->java_code_at_bci(bci);
+        int start = 0;
+        int stop = data->is_CallTypeData() ? ((ciCallTypeData*)data)->number_of_arguments() : ((ciVirtualCallTypeData*)data)->number_of_arguments();
+        if (x->callee()->is_loaded() && x->callee()->is_static() && Bytecodes::has_receiver(bc)) {
+          // first argument is not profiled at call (method handle invoke)
+          assert(x->method()->raw_code_at_bci(bci) == Bytecodes::_invokehandle, "invokehandle expected");
+          start = 1;
         }
-      }
-    } else {
+        ciSignature* callee_signature = x->callee()->signature();
+        // method handle call to virtual method
+        bool has_receiver = x->callee()->is_loaded() && !x->callee()->is_static() && !Bytecodes::has_receiver(bc);
+        ciSignatureStream callee_signature_stream(callee_signature, has_receiver ? x->callee()->holder() : NULL);
+
+        bool ignored_will_link;
+        ciSignature* signature_at_call = NULL;
+        x->method()->get_method_at_bci(bci, ignored_will_link, &signature_at_call);
+        ciSignatureStream signature_at_call_stream(signature_at_call);
+
+        // if called through method handle invoke, some arguments may have been popped
+        for (int i = 0; i < stop && i+start < x->nb_profiled_args(); i++) {
+          int off = in_bytes(TypeEntriesAtCall::argument_type_offset(i)) - in_bytes(TypeEntriesAtCall::args_data_offset());
+          ciKlass* exact = profile_type(md, base_offset, off,
+              args->type(i), x->profiled_arg_at(i+start), mdp,
+              !x->arg_needs_null_check(i+start),
+              signature_at_call_stream.next_klass(), callee_signature_stream.next_klass());
+          if (exact != NULL) {
+            md->set_argument_type(bci, i, exact);
+          }
+        }
+      } else {
 #ifdef ASSERT
-      Bytecodes::Code code = x->method()->raw_code_at_bci(x->bci_of_invoke());
-      int n = x->nb_profiled_args();
-      assert(MethodData::profile_parameters() && (MethodData::profile_arguments_jsr292_only() ||
-                                                  (x->inlined() && ((code == Bytecodes::_invokedynamic && n <= 1) || (code == Bytecodes::_invokehandle && n <= 2)))),
-             "only at JSR292 bytecodes");
+        Bytecodes::Code code = x->method()->raw_code_at_bci(x->bci_of_invoke());
+        int n = x->nb_profiled_args();
+        assert(MethodData::profile_parameters() && (MethodData::profile_arguments_jsr292_only() ||
+            (x->inlined() && ((code == Bytecodes::_invokedynamic && n <= 1) || (code == Bytecodes::_invokehandle && n <= 2)))),
+            "only at JSR292 bytecodes");
 #endif
+      }
     }
   }
 }
@@ -3392,24 +3398,26 @@ void LIRGenerator::do_ProfileReturnType(ProfileReturnType* x) {
   int bci = x->bci_of_invoke();
   ciMethodData* md = x->method()->method_data_or_null();
   ciProfileData* data = md->bci_to_data(bci);
-  assert(data->is_CallTypeData() || data->is_VirtualCallTypeData(), "wrong profile data type");
-  ciReturnTypeEntry* ret = data->is_CallTypeData() ? ((ciCallTypeData*)data)->ret() : ((ciVirtualCallTypeData*)data)->ret();
-  LIR_Opr mdp = LIR_OprFact::illegalOpr;
+  if (data != NULL) {
+    assert(data->is_CallTypeData() || data->is_VirtualCallTypeData(), "wrong profile data type");
+    ciReturnTypeEntry* ret = data->is_CallTypeData() ? ((ciCallTypeData*)data)->ret() : ((ciVirtualCallTypeData*)data)->ret();
+    LIR_Opr mdp = LIR_OprFact::illegalOpr;
 
-  bool ignored_will_link;
-  ciSignature* signature_at_call = NULL;
-  x->method()->get_method_at_bci(bci, ignored_will_link, &signature_at_call);
+    bool ignored_will_link;
+    ciSignature* signature_at_call = NULL;
+    x->method()->get_method_at_bci(bci, ignored_will_link, &signature_at_call);
 
-  // The offset within the MDO of the entry to update may be too large
-  // to be used in load/store instructions on some platforms. So have
-  // profile_type() compute the address of the profile in a register.
-  ciKlass* exact = profile_type(md, md->byte_offset_of_slot(data, ret->type_offset()), 0,
-                                ret->type(), x->ret(), mdp,
-                                !x->needs_null_check(),
-                                signature_at_call->return_type()->as_klass(),
-                                x->callee()->signature()->return_type()->as_klass());
-  if (exact != NULL) {
-    md->set_return_type(bci, exact);
+    // The offset within the MDO of the entry to update may be too large
+    // to be used in load/store instructions on some platforms. So have
+    // profile_type() compute the address of the profile in a register.
+    ciKlass* exact = profile_type(md, md->byte_offset_of_slot(data, ret->type_offset()), 0,
+        ret->type(), x->ret(), mdp,
+        !x->needs_null_check(),
+        signature_at_call->return_type()->as_klass(),
+        x->callee()->signature()->return_type()->as_klass());
+    if (exact != NULL) {
+      md->set_return_type(bci, exact);
+    }
   }
 }
 
diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp
index 3a7e26a8562..322be3595c0 100644
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp
@@ -313,7 +313,7 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure {
   // is_strictfp is only needed for mul and div (and only generates different code on i486)
   void arithmetic_op(Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, bool is_strictfp, LIR_Opr tmp, CodeEmitInfo* info = NULL);
   // machine dependent.  returns true if it emitted code for the multiply
-  bool strength_reduce_multiply(LIR_Opr left, int constant, LIR_Opr result, LIR_Opr tmp);
+  bool strength_reduce_multiply(LIR_Opr left, jint constant, LIR_Opr result, LIR_Opr tmp);
 
   void store_stack_parameter (LIR_Opr opr, ByteSize offset_from_sp_in_bytes);
 
diff --git a/hotspot/src/share/vm/c1/c1_ValueMap.hpp b/hotspot/src/share/vm/c1/c1_ValueMap.hpp
index e2e1c1b15fe..5b1342ede66 100644
--- a/hotspot/src/share/vm/c1/c1_ValueMap.hpp
+++ b/hotspot/src/share/vm/c1/c1_ValueMap.hpp
@@ -157,6 +157,12 @@ class ValueNumberingVisitor: public InstructionVisitor {
   void do_UnsafePutRaw   (UnsafePutRaw*    x) { kill_memory(); }
   void do_UnsafePutObject(UnsafePutObject* x) { kill_memory(); }
   void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) { kill_memory(); }
+  void do_UnsafeGetRaw   (UnsafeGetRaw*    x) { /* nothing to do */ }
+  void do_UnsafeGetObject(UnsafeGetObject* x) {
+    if (x->is_volatile()) { // the JMM requires this
+      kill_memory();
+    }
+  }
   void do_Intrinsic      (Intrinsic*       x) { if (!x->preserves_state()) kill_memory(); }
 
   void do_Phi            (Phi*             x) { /* nothing to do */ }
@@ -197,8 +203,6 @@ class ValueNumberingVisitor: public InstructionVisitor {
   void do_OsrEntry       (OsrEntry*        x) { /* nothing to do */ }
   void do_ExceptionObject(ExceptionObject* x) { /* nothing to do */ }
   void do_RoundFP        (RoundFP*         x) { /* nothing to do */ }
-  void do_UnsafeGetRaw   (UnsafeGetRaw*    x) { /* nothing to do */ }
-  void do_UnsafeGetObject(UnsafeGetObject* x) { /* nothing to do */ }
   void do_ProfileCall    (ProfileCall*     x) { /* nothing to do */ }
   void do_ProfileReturnType (ProfileReturnType*  x) { /* nothing to do */ }
   void do_ProfileInvoke  (ProfileInvoke*   x) { /* nothing to do */ };
diff --git a/hotspot/src/share/vm/ci/ciEnv.cpp b/hotspot/src/share/vm/ci/ciEnv.cpp
index 024909b1cbc..c7801a12dc4 100644
--- a/hotspot/src/share/vm/ci/ciEnv.cpp
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp
@@ -101,6 +101,7 @@ ciEnv::ciEnv(CompileTask* task, int system_dictionary_modification_counter)
   _debug_info = NULL;
   _dependencies = NULL;
   _failure_reason = NULL;
+  _inc_decompile_count_on_failure = true;
   _compilable = MethodCompilable;
   _break_at_compile = false;
   _compiler_data = NULL;
@@ -161,6 +162,7 @@ ciEnv::ciEnv(Arena* arena) : _ciEnv_arena(mtCompiler) {
   _debug_info = NULL;
   _dependencies = NULL;
   _failure_reason = NULL;
+  _inc_decompile_count_on_failure = true;
   _compilable = MethodCompilable_never;
   _break_at_compile = false;
   _compiler_data = NULL;
@@ -702,16 +704,17 @@ ciField* ciEnv::get_field_by_index(ciInstanceKlass* accessor,
 //
 // Perform an appropriate method lookup based on accessor, holder,
 // name, signature, and bytecode.
-Method* ciEnv::lookup_method(InstanceKlass*  accessor,
-                               InstanceKlass*  holder,
-                               Symbol*       name,
-                               Symbol*       sig,
-                               Bytecodes::Code bc,
-                               constantTag    tag) {
-  EXCEPTION_CONTEXT;
-  KlassHandle h_accessor(THREAD, accessor);
-  KlassHandle h_holder(THREAD, holder);
-  LinkResolver::check_klass_accessability(h_accessor, h_holder, KILL_COMPILE_ON_FATAL_(NULL));
+Method* ciEnv::lookup_method(ciInstanceKlass* accessor,
+                             ciKlass*         holder,
+                             Symbol*          name,
+                             Symbol*          sig,
+                             Bytecodes::Code  bc,
+                             constantTag      tag) {
+  // Accessibility checks are performed in ciEnv::get_method_by_index_impl.
+  assert(check_klass_accessibility(accessor, holder->get_Klass()), "holder not accessible");
+
+  KlassHandle h_accessor(accessor->get_instanceKlass());
+  KlassHandle h_holder(holder->get_Klass());
   methodHandle dest_method;
   LinkInfo link_info(h_holder, name, sig, h_accessor, LinkInfo::needs_access_check, tag);
   switch (bc) {
@@ -770,7 +773,6 @@ ciMethod* ciEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
     const int holder_index = cpool->klass_ref_index_at(index);
     bool holder_is_accessible;
     ciKlass* holder = get_klass_by_index_impl(cpool, holder_index, holder_is_accessible, accessor);
-    ciInstanceKlass* declared_holder = get_instance_klass_for_declared_method_holder(holder);
 
     // Get the method's name and signature.
     Symbol* name_sym = cpool->name_ref_at(index);
@@ -798,10 +800,9 @@ ciMethod* ciEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
     }
 
     if (holder_is_accessible) {  // Our declared holder is loaded.
-      InstanceKlass* lookup = declared_holder->get_instanceKlass();
       constantTag tag = cpool->tag_ref_at(index);
       assert(accessor->get_instanceKlass() == cpool->pool_holder(), "not the pool holder?");
-      Method* m = lookup_method(accessor->get_instanceKlass(), lookup, name_sym, sig_sym, bc, tag);
+      Method* m = lookup_method(accessor, holder, name_sym, sig_sym, bc, tag);
       if (m != NULL &&
           (bc == Bytecodes::_invokestatic
            ?  m->method_holder()->is_not_initialized()
@@ -824,7 +825,7 @@ ciMethod* ciEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
     // lookup.
     ciSymbol* name      = get_symbol(name_sym);
     ciSymbol* signature = get_symbol(sig_sym);
-    return get_unloaded_method(declared_holder, name, signature, accessor);
+    return get_unloaded_method(holder, name, signature, accessor);
   }
 }
 
@@ -902,7 +903,12 @@ void ciEnv::validate_compile_task_dependencies(ciMethod* target) {
     if (deps.is_klass_type())  continue;  // skip klass dependencies
     Klass* witness = deps.check_dependency();
     if (witness != NULL) {
-      record_failure("invalid non-klass dependency");
+      if (deps.type() == Dependencies::call_site_target_value) {
+        _inc_decompile_count_on_failure = false;
+        record_failure("call site target change");
+      } else {
+        record_failure("invalid non-klass dependency");
+      }
       return;
     }
   }
@@ -1017,7 +1023,7 @@ void ciEnv::register_method(ciMethod* target,
     if (failing()) {
       // While not a true deoptimization, it is a preemptive decompile.
       MethodData* mdo = method()->method_data();
-      if (mdo != NULL) {
+      if (mdo != NULL && _inc_decompile_count_on_failure) {
         mdo->inc_decompile_count();
       }
 
diff --git a/hotspot/src/share/vm/ci/ciEnv.hpp b/hotspot/src/share/vm/ci/ciEnv.hpp
index e5a99e1a96a..a7fbe0bd843 100644
--- a/hotspot/src/share/vm/ci/ciEnv.hpp
+++ b/hotspot/src/share/vm/ci/ciEnv.hpp
@@ -55,6 +55,7 @@ private:
   DebugInformationRecorder* _debug_info;
   Dependencies*    _dependencies;
   const char*      _failure_reason;
+  bool             _inc_decompile_count_on_failure;
   int              _compilable;
   bool             _break_at_compile;
   int              _num_inlined_bytecodes;
@@ -152,12 +153,12 @@ private:
   // Helper methods
   bool       check_klass_accessibility(ciKlass* accessing_klass,
                                       Klass* resolved_klass);
-  Method*    lookup_method(InstanceKlass*  accessor,
-                           InstanceKlass*  holder,
-                           Symbol*         name,
-                           Symbol*         sig,
-                           Bytecodes::Code bc,
-                           constantTag     tag);
+  Method*    lookup_method(ciInstanceKlass* accessor,
+                           ciKlass*         holder,
+                           Symbol*          name,
+                           Symbol*          sig,
+                           Bytecodes::Code  bc,
+                           constantTag      tag);
 
   // Get a ciObject from the object factory.  Ensures uniqueness
   // of ciObjects.
@@ -226,11 +227,12 @@ private:
   // Get a ciMethod representing either an unfound method or
   // a method with an unloaded holder.  Ensures uniqueness of
   // the result.
-  ciMethod* get_unloaded_method(ciInstanceKlass* holder,
+  ciMethod* get_unloaded_method(ciKlass*         holder,
                                 ciSymbol*        name,
                                 ciSymbol*        signature,
                                 ciInstanceKlass* accessor) {
-    return _factory->get_unloaded_method(holder, name, signature, accessor);
+    ciInstanceKlass* declared_holder = get_instance_klass_for_declared_method_holder(holder);
+    return _factory->get_unloaded_method(declared_holder, name, signature, accessor);
   }
 
   // Get a ciKlass representing an unloaded klass.
diff --git a/hotspot/src/share/vm/ci/ciInstanceKlass.cpp b/hotspot/src/share/vm/ci/ciInstanceKlass.cpp
index b8133ab754e..9715b2987a1 100644
--- a/hotspot/src/share/vm/ci/ciInstanceKlass.cpp
+++ b/hotspot/src/share/vm/ci/ciInstanceKlass.cpp
@@ -595,6 +595,16 @@ ciInstanceKlass* ciInstanceKlass::implementor() {
   return impl;
 }
 
+ciInstanceKlass* ciInstanceKlass::host_klass() {
+  assert(is_loaded(), "must be loaded");
+  if (is_anonymous()) {
+    VM_ENTRY_MARK
+    Klass* host_klass = get_instanceKlass()->host_klass();
+    return CURRENT_ENV->get_instance_klass(host_klass);
+  }
+  return NULL;
+}
+
 // Utility class for printing of the contents of the static fields for
 // use by compilation replay.  It only prints out the information that
 // could be consumed by the compiler, so for primitive types it prints
diff --git a/hotspot/src/share/vm/ci/ciInstanceKlass.hpp b/hotspot/src/share/vm/ci/ciInstanceKlass.hpp
index 1215c089ff4..02bf4b4641b 100644
--- a/hotspot/src/share/vm/ci/ciInstanceKlass.hpp
+++ b/hotspot/src/share/vm/ci/ciInstanceKlass.hpp
@@ -260,6 +260,8 @@ public:
     return NULL;
   }
 
+  ciInstanceKlass* host_klass();
+
   bool can_be_instantiated() {
     assert(is_loaded(), "must be loaded");
     return !is_interface() && !is_abstract();
diff --git a/hotspot/src/share/vm/ci/ciMethod.cpp b/hotspot/src/share/vm/ci/ciMethod.cpp
index 4860427786f..4590061166b 100644
--- a/hotspot/src/share/vm/ci/ciMethod.cpp
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp
@@ -951,6 +951,13 @@ bool ciMethod::is_compiled_lambda_form() const {
   return iid == vmIntrinsics::_compiledLambdaForm;
 }
 
+// ------------------------------------------------------------------
+// ciMethod::is_object_initializer
+//
+bool ciMethod::is_object_initializer() const {
+   return name() == ciSymbol::object_initializer_name();
+}
+
 // ------------------------------------------------------------------
 // ciMethod::has_member_arg
 //
@@ -1409,6 +1416,97 @@ void ciMethod::print_impl(outputStream* st) {
   }
 }
 
+// ------------------------------------------------------------------
+
+static BasicType erase_to_word_type(BasicType bt) {
+  if (is_subword_type(bt)) return T_INT;
+  if (bt == T_ARRAY)       return T_OBJECT;
+  return bt;
+}
+
+static bool basic_types_match(ciType* t1, ciType* t2) {
+  if (t1 == t2)  return true;
+  return erase_to_word_type(t1->basic_type()) == erase_to_word_type(t2->basic_type());
+}
+
+bool ciMethod::is_consistent_info(ciMethod* declared_method, ciMethod* resolved_method) {
+  bool invoke_through_mh_intrinsic = declared_method->is_method_handle_intrinsic() &&
+                                  !resolved_method->is_method_handle_intrinsic();
+
+  if (!invoke_through_mh_intrinsic) {
+    // Method name & descriptor should stay the same.
+    // Signatures may reference unloaded types and thus they may be not strictly equal.
+    ciSymbol* declared_signature = declared_method->signature()->as_symbol();
+    ciSymbol* resolved_signature = resolved_method->signature()->as_symbol();
+
+    return (declared_method->name()->equals(resolved_method->name())) &&
+           (declared_signature->equals(resolved_signature));
+  }
+
+  ciMethod* linker = declared_method;
+  ciMethod* target = resolved_method;
+  // Linkers have appendix argument which is not passed to callee.
+  int has_appendix = MethodHandles::has_member_arg(linker->intrinsic_id()) ? 1 : 0;
+  if (linker->arg_size() != (target->arg_size() + has_appendix)) {
+    return false; // argument slot count mismatch
+  }
+
+  ciSignature* linker_sig = linker->signature();
+  ciSignature* target_sig = target->signature();
+
+  if (linker_sig->count() + (linker->is_static() ? 0 : 1) !=
+      target_sig->count() + (target->is_static() ? 0 : 1) + has_appendix) {
+    return false; // argument count mismatch
+  }
+
+  int sbase = 0, rbase = 0;
+  switch (linker->intrinsic_id()) {
+    case vmIntrinsics::_linkToVirtual:
+    case vmIntrinsics::_linkToInterface:
+    case vmIntrinsics::_linkToSpecial: {
+      if (target->is_static()) {
+        return false;
+      }
+      if (linker_sig->type_at(0)->is_primitive_type()) {
+        return false;  // receiver should be an oop
+      }
+      sbase = 1; // skip receiver
+      break;
+    }
+    case vmIntrinsics::_linkToStatic: {
+      if (!target->is_static()) {
+        return false;
+      }
+      break;
+    }
+    case vmIntrinsics::_invokeBasic: {
+      if (target->is_static()) {
+        if (target_sig->type_at(0)->is_primitive_type()) {
+          return false; // receiver should be an oop
+        }
+        rbase = 1; // skip receiver
+      }
+      break;
+    }
+  }
+  assert(target_sig->count() - rbase == linker_sig->count() - sbase - has_appendix, "argument count mismatch");
+  int arg_count = target_sig->count() - rbase;
+  for (int i = 0; i < arg_count; i++) {
+    if (!basic_types_match(linker_sig->type_at(sbase + i), target_sig->type_at(rbase + i))) {
+      return false;
+    }
+  }
+  // Only check the return type if the symbolic info has non-void return type.
+  // I.e. the return value of the resolved method can be dropped.
+  if (!linker->return_type()->is_void() &&
+      !basic_types_match(linker->return_type(), target->return_type())) {
+    return false;
+  }
+  return true; // no mismatch found
+}
+
+// ------------------------------------------------------------------
+
 #if INCLUDE_TRACE
 TraceStructCalleeMethod ciMethod::to_trace_struct() const {
   TraceStructCalleeMethod result;
diff --git a/hotspot/src/share/vm/ci/ciMethod.hpp b/hotspot/src/share/vm/ci/ciMethod.hpp
index f16948e71d7..2b81e682544 100644
--- a/hotspot/src/share/vm/ci/ciMethod.hpp
+++ b/hotspot/src/share/vm/ci/ciMethod.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -337,6 +337,7 @@ class ciMethod : public ciMetadata {
   bool has_reserved_stack_access() const         { return _has_reserved_stack_access; }
   bool is_boxing_method() const;
   bool is_unboxing_method() const;
+  bool is_object_initializer() const;
 
   // Replay data methods
   void dump_name_as_ascii(outputStream* st);
@@ -353,6 +354,8 @@ class ciMethod : public ciMetadata {
   void print_name(outputStream* st = tty);
   void print_short_name(outputStream* st = tty);
 
+  static bool is_consistent_info(ciMethod* declared_method, ciMethod* resolved_method);
+
 #if INCLUDE_TRACE
   TraceStructCalleeMethod to_trace_struct() const;
 #endif
diff --git a/hotspot/src/share/vm/ci/ciMethodData.cpp b/hotspot/src/share/vm/ci/ciMethodData.cpp
index 0ede3dfc31e..1e773c93062 100644
--- a/hotspot/src/share/vm/ci/ciMethodData.cpp
+++ b/hotspot/src/share/vm/ci/ciMethodData.cpp
@@ -408,11 +408,13 @@ void ciMethodData::set_argument_type(int bci, int i, ciKlass* k) {
   MethodData* mdo = get_MethodData();
   if (mdo != NULL) {
     ProfileData* data = mdo->bci_to_data(bci);
-    if (data->is_CallTypeData()) {
-      data->as_CallTypeData()->set_argument_type(i, k->get_Klass());
-    } else {
-      assert(data->is_VirtualCallTypeData(), "no arguments!");
-      data->as_VirtualCallTypeData()->set_argument_type(i, k->get_Klass());
+    if (data != NULL) {
+      if (data->is_CallTypeData()) {
+        data->as_CallTypeData()->set_argument_type(i, k->get_Klass());
+      } else {
+        assert(data->is_VirtualCallTypeData(), "no arguments!");
+        data->as_VirtualCallTypeData()->set_argument_type(i, k->get_Klass());
+      }
     }
   }
 }
@@ -430,11 +432,13 @@ void ciMethodData::set_return_type(int bci, ciKlass* k) {
   MethodData* mdo = get_MethodData();
   if (mdo != NULL) {
     ProfileData* data = mdo->bci_to_data(bci);
-    if (data->is_CallTypeData()) {
-      data->as_CallTypeData()->set_return_type(k->get_Klass());
-    } else {
-      assert(data->is_VirtualCallTypeData(), "no arguments!");
-      data->as_VirtualCallTypeData()->set_return_type(k->get_Klass());
+    if (data != NULL) {
+      if (data->is_CallTypeData()) {
+        data->as_CallTypeData()->set_return_type(k->get_Klass());
+      } else {
+        assert(data->is_VirtualCallTypeData(), "no arguments!");
+        data->as_VirtualCallTypeData()->set_return_type(k->get_Klass());
+      }
     }
   }
 }
diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp
index 96ffac10af0..db813adf834 100644
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -105,6 +105,12 @@
 
 #define JAVA_9_VERSION                    53
 
+void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
+  assert((bad_constant == 19 || bad_constant == 20) && _major_version >= JAVA_9_VERSION,
+         "Unexpected bad constant pool entry");
+  if (_bad_constant_seen == 0) _bad_constant_seen = bad_constant;
+}
+
 void ClassFileParser::parse_constant_pool_entries(const ClassFileStream* const stream,
                                                   ConstantPool* cp,
                                                   const int length,
@@ -302,6 +308,18 @@ void ClassFileParser::parse_constant_pool_entries(const ClassFileStream* const s
         }
         break;
       }
+      case 19:
+      case 20: {
+        // Record that an error occurred in these two cases but keep parsing so
+        // that ACC_Module can be checked for in the access_flags.  Need to
+        // throw NoClassDefFoundError in that case.
+        if (_major_version >= JAVA_9_VERSION) {
+          cfs->guarantee_more(3, CHECK);
+          cfs->get_u2_fast();
+          set_class_bad_constant_seen(tag);
+          break;
+        }
+      }
       default: {
         classfile_parse_error("Unknown constant tag %u in class file %s",
                               tag,
@@ -359,14 +377,18 @@ PRAGMA_DIAG_POP
 #endif
 
 void ClassFileParser::parse_constant_pool(const ClassFileStream* const stream,
-                                          ConstantPool* const cp,
-                                          const int length,
-                                          TRAPS) {
+                                         ConstantPool* const cp,
+                                         const int length,
+                                         TRAPS) {
   assert(cp != NULL, "invariant");
   assert(stream != NULL, "invariant");
 
   // parsing constant pool entries
   parse_constant_pool_entries(stream, cp, length, CHECK);
+  if (class_bad_constant_seen() != 0) {
+    // a bad CP entry has been detected previously so stop parsing and just return.
+    return;
+  }
 
   int index = 1;  // declared outside of loops for portability
 
@@ -1244,6 +1266,10 @@ void ClassFileParser::parse_field_attributes(const ClassFileStream* const cfs,
       }
     } else if (_major_version >= JAVA_1_5_VERSION) {
       if (attribute_name == vmSymbols::tag_signature()) {
+        if (generic_signature_index != 0) {
+          classfile_parse_error(
+            "Multiple Signature attributes for field in class file %s", CHECK);
+        }
         if (attribute_length != 2) {
           classfile_parse_error(
             "Wrong size %u for field's Signature attribute in class file %s",
@@ -2565,6 +2591,11 @@ Method* ClassFileParser::parse_method(const ClassFileStream* const cfs,
       }
     } else if (_major_version >= JAVA_1_5_VERSION) {
       if (method_attribute_name == vmSymbols::tag_signature()) {
+        if (generic_signature_index != 0) {
+          classfile_parse_error(
+            "Multiple Signature attributes for method in class file %s",
+            CHECK_NULL);
+        }
         if (method_attribute_length != 2) {
           classfile_parse_error(
             "Invalid Signature attribute length %u in class file %s",
@@ -3052,7 +3083,13 @@ u2 ClassFileParser::parse_classfile_inner_classes_attribute(const ClassFileStrea
                          "Class is both outer and inner class in class file %s", CHECK_0);
     }
     // Access flags
-    jint flags = cfs->get_u2_fast() & RECOGNIZED_INNER_CLASS_MODIFIERS;
+    jint flags;
+    // JVM_ACC_MODULE is defined in JDK-9 and later.
+    if (_major_version >= JAVA_9_VERSION) {
+      flags = cfs->get_u2_fast() & (RECOGNIZED_INNER_CLASS_MODIFIERS | JVM_ACC_MODULE);
+    } else {
+      flags = cfs->get_u2_fast() & RECOGNIZED_INNER_CLASS_MODIFIERS;
+    }
     if ((flags & JVM_ACC_INTERFACE) && _major_version < JAVA_6_VERSION) {
       // Set abstract bit for old class files for backward compatibility
       flags |= JVM_ACC_ABSTRACT;
@@ -3278,6 +3315,10 @@ void ClassFileParser::parse_classfile_attributes(const ClassFileStream* const cf
       }
     } else if (_major_version >= JAVA_1_5_VERSION) {
       if (tag == vmSymbols::tag_signature()) {
+        if (_generic_signature_index != 0) {
+          classfile_parse_error(
+            "Multiple Signature attributes in class file %s", CHECK);
+        }
         if (attribute_length != 2) {
           classfile_parse_error(
             "Wrong Signature attribute length %u in class file %s",
@@ -4524,6 +4565,18 @@ static void check_illegal_static_method(const InstanceKlass* this_klass, TRAPS)
 // utility methods for format checking
 
 void ClassFileParser::verify_legal_class_modifiers(jint flags, TRAPS) const {
+  const bool is_module = (flags & JVM_ACC_MODULE) != 0;
+  assert(_major_version >= JAVA_9_VERSION || !is_module, "JVM_ACC_MODULE should not be set");
+  if (is_module) {
+    ResourceMark rm(THREAD);
+    Exceptions::fthrow(
+      THREAD_AND_LOCATION,
+      vmSymbols::java_lang_NoClassDefFoundError(),
+      "%s is not a class because access_flag ACC_MODULE is set",
+      _class_name->as_C_string());
+    return;
+  }
+
   if (!_need_verify) { return; }
 
   const bool is_interface  = (flags & JVM_ACC_INTERFACE)  != 0;
@@ -4532,14 +4585,12 @@ void ClassFileParser::verify_legal_class_modifiers(jint flags, TRAPS) const {
   const bool is_super      = (flags & JVM_ACC_SUPER)      != 0;
   const bool is_enum       = (flags & JVM_ACC_ENUM)       != 0;
   const bool is_annotation = (flags & JVM_ACC_ANNOTATION) != 0;
-  const bool is_module_info= (flags & JVM_ACC_MODULE)     != 0;
   const bool major_gte_15  = _major_version >= JAVA_1_5_VERSION;
 
   if ((is_abstract && is_final) ||
       (is_interface && !is_abstract) ||
       (is_interface && major_gte_15 && (is_super || is_enum)) ||
-      (!is_interface && major_gte_15 && is_annotation) ||
-      is_module_info) {
+      (!is_interface && major_gte_15 && is_annotation)) {
     ResourceMark rm(THREAD);
     Exceptions::fthrow(
       THREAD_AND_LOCATION,
@@ -5355,7 +5406,7 @@ void ClassFileParser::fill_instance_klass(InstanceKlass* ik, bool changed_by_loa
   ModuleEntry* module_entry = ik->module();
   assert(module_entry != NULL, "module_entry should always be set");
 
-  // Obtain java.lang.reflect.Module
+  // Obtain java.lang.Module
   Handle module_handle(THREAD, JNIHandles::resolve(module_entry->module()));
 
   // Allocate mirror and initialize static fields
@@ -5542,6 +5593,7 @@ ClassFileParser::ClassFileParser(ClassFileStream* stream,
   _protection_domain(protection_domain),
   _access_flags(),
   _pub_level(pub_level),
+  _bad_constant_seen(0),
   _synthetic_flag(false),
   _sde_length(false),
   _sde_buffer(NULL),
@@ -5734,16 +5786,29 @@ void ClassFileParser::parse_stream(const ClassFileStream* const stream,
   stream->guarantee_more(8, CHECK);  // flags, this_class, super_class, infs_len
 
   // Access flags
-  jint flags = stream->get_u2_fast() & JVM_RECOGNIZED_CLASS_MODIFIERS;
+  jint flags;
+  // JVM_ACC_MODULE is defined in JDK-9 and later.
+  if (_major_version >= JAVA_9_VERSION) {
+    flags = stream->get_u2_fast() & (JVM_RECOGNIZED_CLASS_MODIFIERS | JVM_ACC_MODULE);
+  } else {
+    flags = stream->get_u2_fast() & JVM_RECOGNIZED_CLASS_MODIFIERS;
+  }
 
   if ((flags & JVM_ACC_INTERFACE) && _major_version < JAVA_6_VERSION) {
     // Set abstract bit for old class files for backward compatibility
     flags |= JVM_ACC_ABSTRACT;
   }
 
-  _access_flags.set_flags(flags);
+  verify_legal_class_modifiers(flags, CHECK);
 
-  verify_legal_class_modifiers((jint)_access_flags.as_int(), CHECK);
+  short bad_constant = class_bad_constant_seen();
+  if (bad_constant != 0) {
+    // Do not throw CFE until after the access_flags are checked because if
+    // ACC_MODULE is set in the access flags, then NCDFE must be thrown, not CFE.
+    classfile_parse_error("Unknown constant tag %u in class file %s", bad_constant, CHECK);
+  }
+
+  _access_flags.set_flags(flags);
 
   // This class and superclass
   _this_class_index = stream->get_u2_fast();
diff --git a/hotspot/src/share/vm/classfile/classFileParser.hpp b/hotspot/src/share/vm/classfile/classFileParser.hpp
index df9ff6848ab..031a7142375 100644
--- a/hotspot/src/share/vm/classfile/classFileParser.hpp
+++ b/hotspot/src/share/vm/classfile/classFileParser.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -122,6 +122,15 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
   // for tracing and notifications
   Publicity _pub_level;
 
+  // Used to keep track of whether a constant pool item 19 or 20 is found.  These
+  // correspond to CONSTANT_Module and CONSTANT_Package tags and are not allowed
+  // in regular class files.  For class file version >= 53, a CFE cannot be thrown
+  // immediately when these are seen because a NCDFE must be thrown if the class's
+  // access_flags have ACC_MODULE set.  But, the access_flags haven't been looked
+  // at yet.  So, the bad constant pool item is cached here.  A value of zero
+  // means that no constant pool item 19 or 20 was found.
+  short _bad_constant_seen;
+
   // class attributes parsed before the instance klass is created:
   bool _synthetic_flag;
   int _sde_length;
@@ -161,6 +170,8 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
   void fill_instance_klass(InstanceKlass* ik, bool cf_changed_in_CFLH, TRAPS);
   void set_klass(InstanceKlass* instance);
 
+  void set_class_bad_constant_seen(short bad_constant);
+  short class_bad_constant_seen() { return  _bad_constant_seen; }
   void set_class_synthetic_flag(bool x)        { _synthetic_flag = x; }
   void set_class_sourcefile_index(u2 x)        { _sourcefile_index = x; }
   void set_class_generic_signature_index(u2 x) { _generic_signature_index = x; }
diff --git a/hotspot/src/share/vm/classfile/classLoaderData.cpp b/hotspot/src/share/vm/classfile/classLoaderData.cpp
index d1e37d82761..c7b26613d07 100644
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -93,7 +93,7 @@ ClassLoaderData::ClassLoaderData(Handle h_class_loader, bool is_anonymous, Depen
   _keep_alive((is_anonymous || h_class_loader.is_null()) ? 1 : 0),
   _metaspace(NULL), _unloading(false), _klasses(NULL),
   _modules(NULL), _packages(NULL),
-  _claimed(0), _jmethod_ids(NULL), _handles(NULL), _deallocate_list(NULL),
+  _claimed(0), _jmethod_ids(NULL), _handles(), _deallocate_list(NULL),
   _next(NULL), _dependencies(dependencies),
   _metaspace_lock(new Mutex(Monitor::leaf+1, "Metaspace allocation lock", true,
                             Monitor::_safepoint_check_never)) {
@@ -112,6 +112,76 @@ void ClassLoaderData::Dependencies::init(TRAPS) {
   _list_head = oopFactory::new_objectArray(2, CHECK);
 }
 
+ClassLoaderData::ChunkedHandleList::~ChunkedHandleList() {
+  Chunk* c = _head;
+  while (c != NULL) {
+    Chunk* next = c->_next;
+    delete c;
+    c = next;
+  }
+}
+
+oop* ClassLoaderData::ChunkedHandleList::add(oop o) {
+  if (_head == NULL || _head->_size == Chunk::CAPACITY) {
+    Chunk* next = new Chunk(_head);
+    OrderAccess::release_store_ptr(&_head, next);
+  }
+  oop* handle = &_head->_data[_head->_size];
+  *handle = o;
+  OrderAccess::release_store(&_head->_size, _head->_size + 1);
+  return handle;
+}
+
+inline void ClassLoaderData::ChunkedHandleList::oops_do_chunk(OopClosure* f, Chunk* c, const juint size) {
+  for (juint i = 0; i < size; i++) {
+    if (c->_data[i] != NULL) {
+      f->do_oop(&c->_data[i]);
+    }
+  }
+}
+
+void ClassLoaderData::ChunkedHandleList::oops_do(OopClosure* f) {
+  Chunk* head = (Chunk*) OrderAccess::load_ptr_acquire(&_head);
+  if (head != NULL) {
+    // Must be careful when reading size of head
+    oops_do_chunk(f, head, OrderAccess::load_acquire(&head->_size));
+    for (Chunk* c = head->_next; c != NULL; c = c->_next) {
+      oops_do_chunk(f, c, c->_size);
+    }
+  }
+}
+
+#ifdef ASSERT
+class VerifyContainsOopClosure : public OopClosure {
+  oop* _target;
+  bool _found;
+
+ public:
+  VerifyContainsOopClosure(oop* target) : _target(target), _found(false) {}
+
+  void do_oop(oop* p) {
+    if (p == _target) {
+      _found = true;
+    }
+  }
+
+  void do_oop(narrowOop* p) {
+    // The ChunkedHandleList should not contain any narrowOop
+    ShouldNotReachHere();
+  }
+
+  bool found() const {
+    return _found;
+  }
+};
+
+bool ClassLoaderData::ChunkedHandleList::contains(oop* p) {
+  VerifyContainsOopClosure cl(p);
+  oops_do(&cl);
+  return cl.found();
+}
+#endif
+
 bool ClassLoaderData::claim() {
   if (_claimed == 1) {
     return false;
@@ -146,9 +216,9 @@ void ClassLoaderData::oops_do(OopClosure* f, KlassClosure* klass_closure, bool m
 
   f->do_oop(&_class_loader);
   _dependencies.oops_do(f);
-  if (_handles != NULL) {
-    _handles->oops_do(f);
-  }
+
+  _handles.oops_do(f);
+
   if (klass_closure != NULL) {
     classes_do(klass_closure);
   }
@@ -484,12 +554,6 @@ ClassLoaderData::~ClassLoaderData() {
     _metaspace = NULL;
     delete m;
   }
-  // release the handles
-  if (_handles != NULL) {
-    JNIHandleBlock::release_block(_handles);
-    _handles = NULL;
-  }
-
   // Clear all the JNI handles for methods
   // These aren't deallocated and are going to look like a leak, but that's
   // needed because we can't really get rid of jmethodIDs because we don't
@@ -563,19 +627,14 @@ Metaspace* ClassLoaderData::metaspace_non_null() {
   return metaspace;
 }
 
-JNIHandleBlock* ClassLoaderData::handles() const           { return _handles; }
-void ClassLoaderData::set_handles(JNIHandleBlock* handles) { _handles = handles; }
-
 jobject ClassLoaderData::add_handle(Handle h) {
   MutexLockerEx ml(metaspace_lock(),  Mutex::_no_safepoint_check_flag);
-  if (handles() == NULL) {
-    set_handles(JNIHandleBlock::allocate_block());
-  }
-  return handles()->allocate_handle(h());
+  return (jobject) _handles.add(h());
 }
 
-void ClassLoaderData::remove_handle(jobject h) {
-  _handles->release_handle(h);
+void ClassLoaderData::remove_handle_unsafe(jobject h) {
+  assert(_handles.contains((oop*) h), "Got unexpected handle " PTR_FORMAT, p2i((oop*) h));
+  *((oop*) h) = NULL;
 }
 
 // Add this metadata pointer to be freed when it's safe.  This is only during
@@ -645,7 +704,6 @@ void ClassLoaderData::dump(outputStream * const out) {
       p2i(class_loader() != NULL ? class_loader()->klass() : NULL), loader_name());
   if (claimed()) out->print(" claimed ");
   if (is_unloading()) out->print(" unloading ");
-  out->print(" handles " INTPTR_FORMAT, p2i(handles()));
   out->cr();
   if (metaspace_or_null() != NULL) {
     out->print_cr("metaspace: " INTPTR_FORMAT, p2i(metaspace_or_null()));
diff --git a/hotspot/src/share/vm/classfile/classLoaderData.hpp b/hotspot/src/share/vm/classfile/classLoaderData.hpp
index 8c8df5187a7..3c0aba64992 100644
--- a/hotspot/src/share/vm/classfile/classLoaderData.hpp
+++ b/hotspot/src/share/vm/classfile/classLoaderData.hpp
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -52,7 +52,6 @@
 
 class ClassLoaderData;
 class JNIMethodBlock;
-class JNIHandleBlock;
 class Metadebug;
 class ModuleEntry;
 class PackageEntry;
@@ -160,6 +159,34 @@ class ClassLoaderData : public CHeapObj {
     void oops_do(OopClosure* f);
   };
 
+  class ChunkedHandleList VALUE_OBJ_CLASS_SPEC {
+    struct Chunk : public CHeapObj {
+      static const size_t CAPACITY = 32;
+
+      oop _data[CAPACITY];
+      volatile juint _size;
+      Chunk* _next;
+
+      Chunk(Chunk* c) : _next(c), _size(0) { }
+    };
+
+    Chunk* _head;
+
+    void oops_do_chunk(OopClosure* f, Chunk* c, const juint size);
+
+   public:
+    ChunkedHandleList() : _head(NULL) {}
+    ~ChunkedHandleList();
+
+    // Only one thread at a time can add, guarded by ClassLoaderData::metaspace_lock().
+    // However, multiple threads can execute oops_do concurrently with add.
+    oop* add(oop o);
+#ifdef ASSERT
+    bool contains(oop* p);
+#endif
+    void oops_do(OopClosure* f);
+  };
+
   friend class ClassLoaderDataGraph;
   friend class ClassLoaderDataGraphKlassIteratorAtomic;
   friend class ClassLoaderDataGraphMetaspaceIterator;
@@ -185,8 +212,8 @@ class ClassLoaderData : public CHeapObj {
   volatile int _claimed;   // true if claimed, for example during GC traces.
                            // To avoid applying oop closure more than once.
                            // Has to be an int because we cas it.
-  JNIHandleBlock* _handles; // Handles to constant pool arrays, Modules, etc, which
-                            // have the same life cycle of the corresponding ClassLoader.
+  ChunkedHandleList _handles; // Handles to constant pool arrays, Modules, etc, which
+                              // have the same life cycle of the corresponding ClassLoader.
 
   Klass* volatile _klasses;              // The classes defined by the class loader.
   PackageEntryTable* volatile _packages; // The packages defined by the class loader.
@@ -217,9 +244,6 @@ class ClassLoaderData : public CHeapObj {
   ClassLoaderData(Handle h_class_loader, bool is_anonymous, Dependencies dependencies);
   ~ClassLoaderData();
 
-  JNIHandleBlock* handles() const;
-  void set_handles(JNIHandleBlock* handles);
-
   // GC interface.
   void clear_claimed()          { _claimed = 0; }
   bool claimed() const          { return _claimed == 1; }
@@ -312,7 +336,7 @@ class ClassLoaderData : public CHeapObj {
   const char* loader_name();
 
   jobject add_handle(Handle h);
-  void remove_handle(jobject h);
+  void remove_handle_unsafe(jobject h);
   void add_class(Klass* k, bool publicize = true);
   void remove_class(Klass* k);
   bool contains_klass(Klass* k);
diff --git a/hotspot/src/share/vm/classfile/javaClasses.cpp b/hotspot/src/share/vm/classfile/javaClasses.cpp
index b7fe590eee1..22c1e6cc34e 100644
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -773,13 +773,13 @@ void java_lang_Class::initialize_mirror_fields(KlassHandle k,
   InstanceKlass::cast(k())->do_local_static_fields(&initialize_static_field, mirror, CHECK);
 }
 
-// Set the java.lang.reflect.Module module field in the java_lang_Class mirror
+// Set the java.lang.Module module field in the java_lang_Class mirror
 void java_lang_Class::set_mirror_module_field(KlassHandle k, Handle mirror, Handle module, TRAPS) {
   if (module.is_null()) {
     // During startup, the module may be NULL only if java.base has not been defined yet.
-    // Put the class on the fixup_module_list to patch later when the java.lang.reflect.Module
+    // Put the class on the fixup_module_list to patch later when the java.lang.Module
     // for java.base is known.
-    assert(!Universe::is_module_initialized(), "Incorrect java.lang.reflect.Module pre module system initialization");
+    assert(!Universe::is_module_initialized(), "Incorrect java.lang.Module pre module system initialization");
 
     bool javabase_was_defined = false;
     {
@@ -810,7 +810,7 @@ void java_lang_Class::set_mirror_module_field(KlassHandle k, Handle mirror, Hand
     assert(Universe::is_module_initialized() ||
            (ModuleEntryTable::javabase_defined() &&
             (module() == JNIHandles::resolve(ModuleEntryTable::javabase_moduleEntry()->module()))),
-           "Incorrect java.lang.reflect.Module specification while creating mirror");
+           "Incorrect java.lang.Module specification while creating mirror");
     set_module(mirror(), module());
   }
 }
@@ -2269,6 +2269,7 @@ void java_lang_LiveStackFrameInfo::compute_offsets() {
   compute_offset(_monitors_offset,   k, vmSymbols::monitors_name(),    vmSymbols::object_array_signature());
   compute_offset(_locals_offset,     k, vmSymbols::locals_name(),      vmSymbols::object_array_signature());
   compute_offset(_operands_offset,   k, vmSymbols::operands_name(),    vmSymbols::object_array_signature());
+  compute_offset(_mode_offset,       k, vmSymbols::mode_name(),        vmSymbols::int_signature());
 }
 
 void java_lang_reflect_AccessibleObject::compute_offsets() {
@@ -2803,28 +2804,28 @@ void java_lang_reflect_Parameter::set_executable(oop param, oop value) {
 }
 
 
-int java_lang_reflect_Module::loader_offset;
-int java_lang_reflect_Module::name_offset;
-int java_lang_reflect_Module::_module_entry_offset = -1;
+int java_lang_Module::loader_offset;
+int java_lang_Module::name_offset;
+int java_lang_Module::_module_entry_offset = -1;
 
-Handle java_lang_reflect_Module::create(Handle loader, Handle module_name, TRAPS) {
+Handle java_lang_Module::create(Handle loader, Handle module_name, TRAPS) {
   assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem");
 
-  Symbol* name = vmSymbols::java_lang_reflect_Module();
+  Symbol* name = vmSymbols::java_lang_Module();
   Klass* k = SystemDictionary::resolve_or_fail(name, true, CHECK_NH);
   instanceKlassHandle klass (THREAD, k);
 
-  Handle jlrmh = klass->allocate_instance_handle(CHECK_NH);
+  Handle jlmh = klass->allocate_instance_handle(CHECK_NH);
   JavaValue result(T_VOID);
-  JavaCalls::call_special(&result, jlrmh, KlassHandle(THREAD, klass()),
+  JavaCalls::call_special(&result, jlmh, KlassHandle(THREAD, klass()),
                           vmSymbols::object_initializer_name(),
-                          vmSymbols::java_lang_reflect_module_init_signature(),
+                          vmSymbols::java_lang_module_init_signature(),
                           loader, module_name, CHECK_NH);
-  return jlrmh;
+  return jlmh;
 }
 
-void java_lang_reflect_Module::compute_offsets() {
-  Klass* k = SystemDictionary::reflect_Module_klass();
+void java_lang_Module::compute_offsets() {
+  Klass* k = SystemDictionary::Module_klass();
   if(NULL != k) {
     compute_offset(loader_offset,  k, vmSymbols::loader_name(),  vmSymbols::classloader_signature());
     compute_offset(name_offset,    k, vmSymbols::name_name(),    vmSymbols::string_signature());
@@ -2833,27 +2834,27 @@ void java_lang_reflect_Module::compute_offsets() {
 }
 
 
-oop java_lang_reflect_Module::loader(oop module) {
+oop java_lang_Module::loader(oop module) {
   assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem");
   return module->obj_field(loader_offset);
 }
 
-void java_lang_reflect_Module::set_loader(oop module, oop value) {
+void java_lang_Module::set_loader(oop module, oop value) {
   assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem");
   module->obj_field_put(loader_offset, value);
 }
 
-oop java_lang_reflect_Module::name(oop module) {
+oop java_lang_Module::name(oop module) {
   assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem");
   return module->obj_field(name_offset);
 }
 
-void java_lang_reflect_Module::set_name(oop module, oop value) {
+void java_lang_Module::set_name(oop module, oop value) {
   assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem");
   module->obj_field_put(name_offset, value);
 }
 
-ModuleEntry* java_lang_reflect_Module::module_entry(oop module, TRAPS) {
+ModuleEntry* java_lang_Module::module_entry(oop module, TRAPS) {
   assert(_module_entry_offset != -1, "Uninitialized module_entry_offset");
   assert(module != NULL, "module can't be null");
   assert(module->is_oop(), "module must be oop");
@@ -2862,7 +2863,7 @@ ModuleEntry* java_lang_reflect_Module::module_entry(oop module, TRAPS) {
   if (module_entry == NULL) {
     // If the inject field containing the ModuleEntry* is null then return the
     // class loader's unnamed module.
-    oop loader = java_lang_reflect_Module::loader(module);
+    oop loader = java_lang_Module::loader(module);
     Handle h_loader = Handle(THREAD, loader);
     ClassLoaderData* loader_cld = SystemDictionary::register_loader(h_loader, CHECK_NULL);
     return loader_cld->modules()->unnamed_module();
@@ -2870,7 +2871,7 @@ ModuleEntry* java_lang_reflect_Module::module_entry(oop module, TRAPS) {
   return module_entry;
 }
 
-void java_lang_reflect_Module::set_module_entry(oop module, ModuleEntry* module_entry) {
+void java_lang_Module::set_module_entry(oop module, ModuleEntry* module_entry) {
   assert(_module_entry_offset != -1, "Uninitialized module_entry_offset");
   assert(module != NULL, "module can't be null");
   assert(module->is_oop(), "module must be oop");
@@ -3246,6 +3247,15 @@ void java_lang_invoke_MemberName::set_vmindex(oop mname, intptr_t index) {
   mname->address_field_put(_vmindex_offset, (address) index);
 }
 
+bool java_lang_invoke_MemberName::equals(oop mn1, oop mn2) {
+  if (mn1 == mn2) {
+     return true;
+  }
+  return (vmtarget(mn1) == vmtarget(mn2) && flags(mn1) == flags(mn2) &&
+          vmindex(mn1) == vmindex(mn2) &&
+          clazz(mn1) == clazz(mn2));
+}
+
 oop java_lang_invoke_LambdaForm::vmentry(oop lform) {
   assert(is_instance(lform), "wrong type");
   return lform->obj_field(_vmentry_offset);
@@ -3658,6 +3668,7 @@ int java_lang_StackFrameInfo::_version_offset;
 int java_lang_LiveStackFrameInfo::_monitors_offset;
 int java_lang_LiveStackFrameInfo::_locals_offset;
 int java_lang_LiveStackFrameInfo::_operands_offset;
+int java_lang_LiveStackFrameInfo::_mode_offset;
 int java_lang_AssertionStatusDirectives::classes_offset;
 int java_lang_AssertionStatusDirectives::classEnabled_offset;
 int java_lang_AssertionStatusDirectives::packages_offset;
@@ -3728,6 +3739,10 @@ void java_lang_LiveStackFrameInfo::set_operands(oop element, oop value) {
   element->obj_field_put(_operands_offset, value);
 }
 
+void java_lang_LiveStackFrameInfo::set_mode(oop element, int value) {
+  element->int_field_put(_mode_offset, value);
+}
+
 // Support for java Assertions - java_lang_AssertionStatusDirectives.
 
 void java_lang_AssertionStatusDirectives::set_classes(oop o, oop val) {
@@ -3862,7 +3877,7 @@ void JavaClasses::compute_offsets() {
   reflect_ConstantPool::compute_offsets();
   reflect_UnsafeStaticFieldAccessorImpl::compute_offsets();
   java_lang_reflect_Parameter::compute_offsets();
-  java_lang_reflect_Module::compute_offsets();
+  java_lang_Module::compute_offsets();
   java_lang_StackFrameInfo::compute_offsets();
   java_lang_LiveStackFrameInfo::compute_offsets();
 
diff --git a/hotspot/src/share/vm/classfile/javaClasses.hpp b/hotspot/src/share/vm/classfile/javaClasses.hpp
index f05db4c79b7..da5d4a67f2c 100644
--- a/hotspot/src/share/vm/classfile/javaClasses.hpp
+++ b/hotspot/src/share/vm/classfile/javaClasses.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -755,9 +755,9 @@ class java_lang_reflect_Parameter {
 };
 
 #define MODULE_INJECTED_FIELDS(macro)                            \
-  macro(java_lang_reflect_Module, module_entry, intptr_signature, false)
+  macro(java_lang_Module, module_entry, intptr_signature, false)
 
-class java_lang_reflect_Module {
+class java_lang_Module {
   private:
     static int loader_offset;
     static int name_offset;
@@ -1086,6 +1086,8 @@ class java_lang_invoke_MemberName: AllStatic {
   static int flags_offset_in_bytes()            { return _flags_offset; }
   static int vmtarget_offset_in_bytes()         { return _vmtarget_offset; }
   static int vmindex_offset_in_bytes()          { return _vmindex_offset; }
+
+  static bool equals(oop mt1, oop mt2);
 };
 
 
@@ -1380,11 +1382,13 @@ class java_lang_LiveStackFrameInfo: AllStatic {
   static int _monitors_offset;
   static int _locals_offset;
   static int _operands_offset;
+  static int _mode_offset;
 
  public:
   static void set_monitors(oop info, oop value);
   static void set_locals(oop info, oop value);
   static void set_operands(oop info, oop value);
+  static void set_mode(oop info, int value);
 
   static void compute_offsets();
 
diff --git a/hotspot/src/share/vm/classfile/javaClasses.inline.hpp b/hotspot/src/share/vm/classfile/javaClasses.inline.hpp
index b388bb157d3..a50113d1c61 100644
--- a/hotspot/src/share/vm/classfile/javaClasses.inline.hpp
+++ b/hotspot/src/share/vm/classfile/javaClasses.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -162,8 +162,8 @@ inline bool java_lang_invoke_DirectMethodHandle::is_instance(oop obj) {
   return obj != NULL && is_subclass(obj->klass());
 }
 
-inline bool java_lang_reflect_Module::is_instance(oop obj) {
-  return obj != NULL && obj->klass() == SystemDictionary::reflect_Module_klass();
+inline bool java_lang_Module::is_instance(oop obj) {
+  return obj != NULL && obj->klass() == SystemDictionary::Module_klass();
 }
 
 inline int Backtrace::merge_bci_and_version(int bci, int version) {
diff --git a/hotspot/src/share/vm/classfile/moduleEntry.cpp b/hotspot/src/share/vm/classfile/moduleEntry.cpp
index 9402f5d91e1..f9941c014e2 100644
--- a/hotspot/src/share/vm/classfile/moduleEntry.cpp
+++ b/hotspot/src/share/vm/classfile/moduleEntry.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -87,11 +87,11 @@ Handle ModuleEntry::shared_protection_domain() {
 // Set the shared ProtectionDomain atomically
 void ModuleEntry::set_shared_protection_domain(ClassLoaderData *loader_data,
                                                Handle pd_h) {
-  // Create a JNI handle for the shared ProtectionDomain and save it atomically.
-  // If someone beats us setting the _pd cache, the created JNI handle is destroyed.
+  // Create a handle for the shared ProtectionDomain and save it atomically.
+  // If someone beats us setting the _pd cache, the created handle is destroyed.
   jobject obj = loader_data->add_handle(pd_h);
   if (Atomic::cmpxchg_ptr(obj, &_pd, NULL) != NULL) {
-    loader_data->remove_handle(obj);
+    loader_data->remove_handle_unsafe(obj);
   }
 }
 
@@ -158,10 +158,10 @@ void ModuleEntry::set_read_walk_required(ClassLoaderData* m_loader_data) {
       loader_data() != m_loader_data &&
       !m_loader_data->is_builtin_class_loader_data()) {
     _must_walk_reads = true;
-    if (log_is_enabled(Trace, modules)) {
+    if (log_is_enabled(Trace, module)) {
       ResourceMark rm;
-      log_trace(modules)("ModuleEntry::set_read_walk_required(): module %s reads list must be walked",
-                         (name() != NULL) ? name()->as_C_string() : UNNAMED_MODULE);
+      log_trace(module)("ModuleEntry::set_read_walk_required(): module %s reads list must be walked",
+                        (name() != NULL) ? name()->as_C_string() : UNNAMED_MODULE);
     }
   }
 }
@@ -180,10 +180,10 @@ void ModuleEntry::purge_reads() {
     // on the remaining live modules on the reads list.
     _must_walk_reads = false;
 
-    if (log_is_enabled(Trace, modules)) {
+    if (log_is_enabled(Trace, module)) {
       ResourceMark rm;
-      log_trace(modules)("ModuleEntry::purge_reads(): module %s reads list being walked",
-                         (name() != NULL) ? name()->as_C_string() : UNNAMED_MODULE);
+      log_trace(module)("ModuleEntry::purge_reads(): module %s reads list being walked",
+                        (name() != NULL) ? name()->as_C_string() : UNNAMED_MODULE);
     }
 
     // Go backwards because this removes entries that are dead.
@@ -236,8 +236,11 @@ ModuleEntryTable::~ModuleEntryTable() {
       m = m->next();
 
       ResourceMark rm;
-      log_debug(modules)("ModuleEntryTable: deleting module: %s", to_remove->name() != NULL ?
-                         to_remove->name()->as_C_string() : UNNAMED_MODULE);
+      if (to_remove->name() != NULL) {
+        log_info(module, unload)("unloading module %s", to_remove->name()->as_C_string());
+      }
+      log_debug(module)("ModuleEntryTable: deleting module: %s", to_remove->name() != NULL ?
+                        to_remove->name()->as_C_string() : UNNAMED_MODULE);
 
       // Clean out the C heap allocated reads list first before freeing the entry
       to_remove->delete_reads();
@@ -266,19 +269,19 @@ void ModuleEntryTable::create_unnamed_module(ClassLoaderData* loader_data) {
 
   // Each ModuleEntryTable has exactly one unnamed module
   if (loader_data->is_the_null_class_loader_data()) {
-    // For the boot loader, the java.lang.reflect.Module for the unnamed module
+    // For the boot loader, the java.lang.Module for the unnamed module
     // is not known until a call to JVM_SetBootLoaderUnnamedModule is made. At
     // this point initially create the ModuleEntry for the unnamed module.
     _unnamed_module = new_entry(0, Handle(NULL), NULL, NULL, NULL, loader_data);
   } else {
-    // For all other class loaders the java.lang.reflect.Module for their
+    // For all other class loaders the java.lang.Module for their
     // corresponding unnamed module can be found in the java.lang.ClassLoader object.
     oop module = java_lang_ClassLoader::unnamedModule(loader_data->class_loader());
     _unnamed_module = new_entry(0, Handle(module), NULL, NULL, NULL, loader_data);
 
-    // Store pointer to the ModuleEntry in the unnamed module's java.lang.reflect.Module
+    // Store pointer to the ModuleEntry in the unnamed module's java.lang.Module
     // object.
-    java_lang_reflect_Module::set_module_entry(module, _unnamed_module);
+    java_lang_Module::set_module_entry(module, _unnamed_module);
   }
 
   // Add to bucket 0, no name to hash on
@@ -315,9 +318,9 @@ ModuleEntry* ModuleEntryTable::new_entry(unsigned int hash, Handle module_handle
 
   if (ClassLoader::is_in_patch_mod_entries(name)) {
     entry->set_is_patched();
-    if (log_is_enabled(Trace, modules, patch)) {
+    if (log_is_enabled(Trace, module, patch)) {
       ResourceMark rm;
-      log_trace(modules, patch)("Marked module %s as patched from --patch-module", name->as_C_string());
+      log_trace(module, patch)("Marked module %s as patched from --patch-module", name->as_C_string());
     }
   }
 
@@ -388,27 +391,27 @@ void ModuleEntryTable::finalize_javabase(Handle module_handle, Symbol* version,
     fatal("Unable to finalize module definition for " JAVA_BASE_NAME);
   }
 
-  // Set java.lang.reflect.Module, version and location for java.base
+  // Set java.lang.Module, version and location for java.base
   ModuleEntry* jb_module = javabase_moduleEntry();
   assert(jb_module != NULL, JAVA_BASE_NAME " ModuleEntry not defined");
   jb_module->set_version(version);
   jb_module->set_location(location);
   // Once java.base's ModuleEntry _module field is set with the known
-  // java.lang.reflect.Module, java.base is considered "defined" to the VM.
+  // java.lang.Module, java.base is considered "defined" to the VM.
   jb_module->set_module(boot_loader_data->add_handle(module_handle));
 
-  // Store pointer to the ModuleEntry for java.base in the java.lang.reflect.Module object.
-  java_lang_reflect_Module::set_module_entry(module_handle(), jb_module);
+  // Store pointer to the ModuleEntry for java.base in the java.lang.Module object.
+  java_lang_Module::set_module_entry(module_handle(), jb_module);
 }
 
-// Within java.lang.Class instances there is a java.lang.reflect.Module field
-// that must be set with the defining module.  During startup, prior to java.base's
-// definition, classes needing their module field set are added to the fixup_module_list.
-// Their module field is set once java.base's java.lang.reflect.Module is known to the VM.
+// Within java.lang.Class instances there is a java.lang.Module field that must
+// be set with the defining module.  During startup, prior to java.base's definition,
+// classes needing their module field set are added to the fixup_module_list.
+// Their module field is set once java.base's java.lang.Module is known to the VM.
 void ModuleEntryTable::patch_javabase_entries(Handle module_handle) {
   if (module_handle.is_null()) {
     fatal("Unable to patch the module field of classes loaded prior to "
-          JAVA_BASE_NAME "'s definition, invalid java.lang.reflect.Module");
+          JAVA_BASE_NAME "'s definition, invalid java.lang.Module");
   }
 
   // Do the fixups for the basic primitive types
diff --git a/hotspot/src/share/vm/classfile/moduleEntry.hpp b/hotspot/src/share/vm/classfile/moduleEntry.hpp
index 85e898ea861..c50441a1739 100644
--- a/hotspot/src/share/vm/classfile/moduleEntry.hpp
+++ b/hotspot/src/share/vm/classfile/moduleEntry.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -36,8 +36,8 @@
 #include "utilities/ostream.hpp"
 
 #define UNNAMED_MODULE "Unnamed Module"
-#define JAVAPKG "java/"
-#define JAVAPKG_LEN 5
+#define JAVAPKG "java"
+#define JAVAPKG_LEN 4
 #define JAVA_BASE_NAME "java.base"
 
 class ModuleClosure;
@@ -45,7 +45,7 @@ class ModuleClosure;
 // A ModuleEntry describes a module that has been defined by a call to JVM_DefineModule.
 // It contains:
 //   - Symbol* containing the module's name.
-//   - pointer to the java.lang.reflect.Module for this module.
+//   - pointer to the java.lang.Module for this module.
 //   - pointer to the java.security.ProtectionDomain shared by classes defined to this module.
 //   - ClassLoaderData*, class loader of this module.
 //   - a growable array containg other module entries that this module can read.
@@ -55,7 +55,7 @@ class ModuleClosure;
 // data structure.
 class ModuleEntry : public HashtableEntry {
 private:
-  jobject _module;                     // java.lang.reflect.Module
+  jobject _module;                     // java.lang.Module
   jobject _pd;                         // java.security.ProtectionDomain, cached
                                        // for shared classes from this module
   ClassLoaderData* _loader_data;
diff --git a/hotspot/src/share/vm/classfile/modules.cpp b/hotspot/src/share/vm/classfile/modules.cpp
index afa3553af1c..614986d164b 100644
--- a/hotspot/src/share/vm/classfile/modules.cpp
+++ b/hotspot/src/share/vm/classfile/modules.cpp
@@ -62,7 +62,7 @@ bool Modules::verify_package_name(const char* package_name) {
 }
 
 static char* get_module_name(oop module, TRAPS) {
-  oop name_oop = java_lang_reflect_Module::name(module);
+  oop name_oop = java_lang_Module::name(module);
   if (name_oop == NULL) {
     THROW_MSG_NULL(vmSymbols::java_lang_NullPointerException(), "Null module name");
   }
@@ -98,11 +98,11 @@ static PackageEntryTable* get_package_entry_table(Handle h_loader, TRAPS) {
 
 static ModuleEntry* get_module_entry(jobject module, TRAPS) {
   Handle module_h(THREAD, JNIHandles::resolve(module));
-  if (!java_lang_reflect_Module::is_instance(module_h())) {
+  if (!java_lang_Module::is_instance(module_h())) {
     THROW_MSG_NULL(vmSymbols::java_lang_IllegalArgumentException(),
-                   "module is not an instance of type java.lang.reflect.Module");
+                   "module is not an instance of type java.lang.Module");
   }
-  return java_lang_reflect_Module::module_entry(module_h(), CHECK_NULL);
+  return java_lang_Module::module_entry(module_h(), CHECK_NULL);
 }
 
 static PackageEntry* get_package_entry(ModuleEntry* module_entry, const char* package_name, TRAPS) {
@@ -181,7 +181,7 @@ static void define_javabase_module(jobject module, jstring version,
   }
 
   // Validate java_base's loader is the boot loader.
-  oop loader = java_lang_reflect_Module::loader(module_handle());
+  oop loader = java_lang_Module::loader(module_handle());
   if (loader != NULL) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
               "Class loader must be the boot class loader");
@@ -234,19 +234,21 @@ static void define_javabase_module(jobject module, jstring version,
   // Only the thread that actually defined the base module will get here,
   // so no locking is needed.
 
-  // Patch any previously loaded class's module field with java.base's java.lang.reflect.Module.
+  // Patch any previously loaded class's module field with java.base's java.lang.Module.
   ModuleEntryTable::patch_javabase_entries(module_handle);
 
-  log_debug(modules)("define_javabase_module(): Definition of module: "
-                     JAVA_BASE_NAME ", version: %s, location: %s, package #: %d",
-                     module_version != NULL ? module_version : "NULL",
-                     module_location != NULL ? module_location : "NULL",
-                     pkg_list->length());
+  log_info(module, load)(JAVA_BASE_NAME " location: %s",
+                         module_location != NULL ? module_location : "NULL");
+  log_debug(module)("define_javabase_module(): Definition of module: "
+                    JAVA_BASE_NAME ", version: %s, location: %s, package #: %d",
+                    module_version != NULL ? module_version : "NULL",
+                    module_location != NULL ? module_location : "NULL",
+                    pkg_list->length());
 
   // packages defined to java.base
   for (int x = 0; x < pkg_list->length(); x++) {
-    log_trace(modules)("define_javabase_module(): creation of package %s for module " JAVA_BASE_NAME,
-                       (pkg_list->at(x))->as_C_string());
+    log_trace(module)("define_javabase_module(): creation of package %s for module " JAVA_BASE_NAME,
+                      (pkg_list->at(x))->as_C_string());
   }
 }
 
@@ -284,9 +286,9 @@ void Modules::define_module(jobject module, jstring version,
   }
 
   Handle module_handle(THREAD, JNIHandles::resolve(module));
-  if (!java_lang_reflect_Module::is_instance(module_handle())) {
+  if (!java_lang_Module::is_instance(module_handle())) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
-              "module is not an instance of type java.lang.reflect.Module");
+              "module is not an instance of type java.lang.Module");
   }
 
   char* module_name = get_module_name(module_handle(), CHECK);
@@ -303,7 +305,7 @@ void Modules::define_module(jobject module, jstring version,
 
   const char* module_version = get_module_version(version);
 
-  oop loader = java_lang_reflect_Module::loader(module_handle());
+  oop loader = java_lang_Module::loader(module_handle());
   // Make sure loader is not the jdk.internal.reflect.DelegatingClassLoader.
   if (loader != java_lang_ClassLoader::non_reflection_class_loader(loader)) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
@@ -325,7 +327,8 @@ void Modules::define_module(jobject module, jstring version,
     // Only modules defined to either the boot or platform class loader, can define a "java/" package.
     if (!h_loader.is_null() &&
         !SystemDictionary::is_platform_class_loader(h_loader) &&
-        strncmp(package_name, JAVAPKG, JAVAPKG_LEN) == 0) {
+        (strncmp(package_name, JAVAPKG, JAVAPKG_LEN) == 0 &&
+          (package_name[JAVAPKG_LEN] == '/' || package_name[JAVAPKG_LEN] == '\0'))) {
       const char* class_loader_name = SystemDictionary::loader_name(h_loader());
       size_t pkg_len = strlen(package_name);
       char* pkg_name = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, pkg_len);
@@ -423,8 +426,8 @@ void Modules::define_module(jobject module, jstring version,
           pkg_list->at(y)->decrement_refcount();
         }
 
-        // Store pointer to ModuleEntry record in java.lang.reflect.Module object.
-        java_lang_reflect_Module::set_module_entry(module_handle(), module_entry);
+        // Store pointer to ModuleEntry record in java.lang.Module object.
+        java_lang_Module::set_module_entry(module_handle(), module_entry);
       }
     }
   }  // Release the lock
@@ -437,23 +440,24 @@ void Modules::define_module(jobject module, jstring version,
       throw_dup_pkg_exception(module_name, existing_pkg, CHECK);
   }
 
-  if (log_is_enabled(Debug, modules)) {
-    outputStream* logst = Log(modules)::debug_stream();
+  log_info(module, load)("%s location: %s", module_name,
+                         module_location != NULL ? module_location : "NULL");
+  if (log_is_enabled(Debug, module)) {
+    outputStream* logst = Log(module)::debug_stream();
     logst->print("define_module(): creation of module: %s, version: %s, location: %s, ",
                  module_name, module_version != NULL ? module_version : "NULL",
                  module_location != NULL ? module_location : "NULL");
     loader_data->print_value_on(logst);
     logst->print_cr(", package #: %d", pkg_list->length());
     for (int y = 0; y < pkg_list->length(); y++) {
-      log_trace(modules)("define_module(): creation of package %s for module %s",
-                         (pkg_list->at(y))->as_C_string(), module_name);
+      log_trace(module)("define_module(): creation of package %s for module %s",
+                        (pkg_list->at(y))->as_C_string(), module_name);
     }
   }
 
   // If the module is defined to the boot loader and an exploded build is being
   // used, prepend /modules/modules_name, if it exists, to the system boot class path.
   if (loader == NULL &&
-      !Universe::is_module_initialized() &&
       !ClassLoader::has_jrt_entry()) {
     ClassLoader::add_to_exploded_build_list(module_symbol, CHECK);
   }
@@ -466,37 +470,37 @@ void Modules::set_bootloader_unnamed_module(jobject module, TRAPS) {
     THROW_MSG(vmSymbols::java_lang_NullPointerException(), "Null module object");
   }
   Handle module_handle(THREAD, JNIHandles::resolve(module));
-  if (!java_lang_reflect_Module::is_instance(module_handle())) {
+  if (!java_lang_Module::is_instance(module_handle())) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
-              "module is not an instance of type java.lang.reflect.Module");
+              "module is not an instance of type java.lang.Module");
   }
 
   // Ensure that this is an unnamed module
-  oop name = java_lang_reflect_Module::name(module_handle());
+  oop name = java_lang_Module::name(module_handle());
   if (name != NULL) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
-              "boot loader's unnamed module's java.lang.reflect.Module has a name");
+              "boot loader's unnamed module's java.lang.Module has a name");
   }
 
   // Validate java_base's loader is the boot loader.
-  oop loader = java_lang_reflect_Module::loader(module_handle());
+  oop loader = java_lang_Module::loader(module_handle());
   if (loader != NULL) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
               "Class loader must be the boot class loader");
   }
   Handle h_loader = Handle(THREAD, loader);
 
-  log_debug(modules)("set_bootloader_unnamed_module(): recording unnamed module for boot loader");
+  log_debug(module)("set_bootloader_unnamed_module(): recording unnamed module for boot loader");
 
   // Ensure the boot loader's PackageEntryTable has been created
   ModuleEntryTable* module_table = get_module_entry_table(h_loader, CHECK);
 
-  // Set java.lang.reflect.Module for the boot loader's unnamed module
+  // Set java.lang.Module for the boot loader's unnamed module
   ModuleEntry* unnamed_module = module_table->unnamed_module();
   assert(unnamed_module != NULL, "boot loader's unnamed ModuleEntry not defined");
   unnamed_module->set_module(ClassLoaderData::the_null_class_loader_data()->add_handle(module_handle));
-  // Store pointer to the ModuleEntry in the unnamed module's java.lang.reflect.Module object.
-  java_lang_reflect_Module::set_module_entry(module_handle(), unnamed_module);
+  // Store pointer to the ModuleEntry in the unnamed module's java.lang.Module object.
+  java_lang_Module::set_module_entry(module_handle(), unnamed_module);
 }
 
 void Modules::add_module_exports(jobject from_module, const char* package_name, jobject to_module, TRAPS) {
@@ -544,10 +548,10 @@ void Modules::add_module_exports(jobject from_module, const char* package_name,
                       from_module_entry->name()->as_C_string()));
   }
 
-  log_debug(modules)("add_module_exports(): package %s in module %s is exported to module %s",
-                     package_entry->name()->as_C_string(),
-                     from_module_entry->name()->as_C_string(),
-                     to_module_entry == NULL ? "NULL" :
+  log_debug(module)("add_module_exports(): package %s in module %s is exported to module %s",
+                    package_entry->name()->as_C_string(),
+                    from_module_entry->name()->as_C_string(),
+                    to_module_entry == NULL ? "NULL" :
                       to_module_entry->is_named() ?
                         to_module_entry->name()->as_C_string() : UNNAMED_MODULE);
 
@@ -591,12 +595,12 @@ void Modules::add_reads_module(jobject from_module, jobject to_module, TRAPS) {
   }
 
   ResourceMark rm(THREAD);
-  log_debug(modules)("add_reads_module(): Adding read from module %s to module %s",
-                     from_module_entry->is_named() ?
-                     from_module_entry->name()->as_C_string() : UNNAMED_MODULE,
-                     to_module_entry == NULL ? "all unnamed" :
-                       (to_module_entry->is_named() ?
-                        to_module_entry->name()->as_C_string() : UNNAMED_MODULE));
+  log_debug(module)("add_reads_module(): Adding read from module %s to module %s",
+                    from_module_entry->is_named() ?
+                    from_module_entry->name()->as_C_string() : UNNAMED_MODULE,
+                    to_module_entry == NULL ? "all unnamed" :
+                      (to_module_entry->is_named() ?
+                       to_module_entry->name()->as_C_string() : UNNAMED_MODULE));
 
   // if modules are the same or if from_module is unnamed then no need to add the read.
   if (from_module_entry != to_module_entry && from_module_entry->is_named()) {
@@ -615,7 +619,7 @@ jobject Modules::get_module(jclass clazz, TRAPS) {
   }
   oop mirror = JNIHandles::resolve_non_null(clazz);
   if (mirror == NULL) {
-    log_debug(modules)("get_module(): no mirror, returning NULL");
+    log_debug(module)("get_module(): no mirror, returning NULL");
     return NULL;
   }
   if (!java_lang_Class::is_instance(mirror)) {
@@ -626,13 +630,13 @@ jobject Modules::get_module(jclass clazz, TRAPS) {
   oop module = java_lang_Class::module(mirror);
 
   assert(module != NULL, "java.lang.Class module field not set");
-  assert(java_lang_reflect_Module::is_instance(module), "module is not an instance of type java.lang.reflect.Module");
+  assert(java_lang_Module::is_instance(module), "module is not an instance of type java.lang.Module");
 
-  if (log_is_enabled(Debug, modules)) {
+  if (log_is_enabled(Debug, module)) {
     ResourceMark rm(THREAD);
-    outputStream* logst = Log(modules)::debug_stream();
+    outputStream* logst = Log(module)::debug_stream();
     Klass* klass = java_lang_Class::as_Klass(mirror);
-    oop module_name = java_lang_reflect_Module::name(module);
+    oop module_name = java_lang_Module::name(module);
     if (module_name != NULL) {
       logst->print("get_module(): module ");
       java_lang_String::print(module_name, tty);
@@ -718,73 +722,6 @@ jobject Modules::get_module(Symbol* package_name, Handle h_loader, TRAPS) {
   return NULL;
 }
 
-void Modules::add_module_package(jobject module, const char* package_name, TRAPS) {
-  ResourceMark rm(THREAD);
-
-  if (module == NULL) {
-    THROW_MSG(vmSymbols::java_lang_NullPointerException(),
-              "module is null");
-  }
-  if (package_name == NULL) {
-    THROW_MSG(vmSymbols::java_lang_NullPointerException(),
-              "package is null");
-  }
-  ModuleEntry* module_entry = get_module_entry(module, CHECK);
-  if (module_entry == NULL) {
-    THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
-              "module is invalid");
-  }
-  if (!module_entry->is_named()) {
-    THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
-              "module cannot be an unnamed module");
-  }
-  if (!verify_package_name(package_name)) {
-    THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
-              err_msg("Invalid package name: %s", package_name));
-  }
-
-  ClassLoaderData *loader_data = module_entry->loader_data();
-
-  // Only modules defined to either the boot or platform class loader, can define a "java/" package.
-  if (!loader_data->is_the_null_class_loader_data() &&
-      !loader_data->is_platform_class_loader_data() &&
-      strncmp(package_name, JAVAPKG, JAVAPKG_LEN) == 0) {
-    const char* class_loader_name = SystemDictionary::loader_name(loader_data);
-    size_t pkg_len = strlen(package_name);
-    char* pkg_name = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, pkg_len);
-    strncpy(pkg_name, package_name, pkg_len);
-    StringUtils::replace_no_expand(pkg_name, "/", ".");
-    const char* msg_text1 = "Class loader (instance of): ";
-    const char* msg_text2 = " tried to define prohibited package name: ";
-    size_t len = strlen(msg_text1) + strlen(class_loader_name) + strlen(msg_text2) + pkg_len + 1;
-    char* message = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, len);
-    jio_snprintf(message, len, "%s%s%s%s", msg_text1, class_loader_name, msg_text2, pkg_name);
-    THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), message);
-  }
-
-  log_debug(modules)("add_module_package(): Adding package %s to module %s",
-                     package_name, module_entry->name()->as_C_string());
-
-  TempNewSymbol pkg_symbol = SymbolTable::new_symbol(package_name, CHECK);
-  PackageEntryTable* package_table = loader_data->packages();
-  assert(package_table != NULL, "Missing package_table");
-
-  PackageEntry* existing_pkg = NULL;
-  {
-    MutexLocker ml(Module_lock, THREAD);
-
-    // Check that the package does not exist in the class loader's package table.
-    existing_pkg = package_table->lookup_only(pkg_symbol);
-    if (existing_pkg == NULL) {
-      PackageEntry* pkg = package_table->locked_create_entry_or_null(pkg_symbol, module_entry);
-      assert(pkg != NULL, "Unable to create a module's package entry");
-    }
-  }
-  if (existing_pkg != NULL) {
-    throw_dup_pkg_exception(module_entry->name()->as_C_string(), existing_pkg, CHECK);
-  }
-}
-
 // Export package in module to all unnamed modules.
 void Modules::add_module_exports_to_all_unnamed(jobject module, const char* package_name, TRAPS) {
   if (module == NULL) {
@@ -818,8 +755,8 @@ void Modules::add_module_exports_to_all_unnamed(jobject module, const char* pack
                         module_entry->name()->as_C_string()));
     }
 
-    log_debug(modules)("add_module_exports_to_all_unnamed(): package %s in module"
-                       " %s is exported to all unnamed modules",
+    log_debug(module)("add_module_exports_to_all_unnamed(): package %s in module"
+                      " %s is exported to all unnamed modules",
                        package_entry->name()->as_C_string(),
                        module_entry->name()->as_C_string());
 
diff --git a/hotspot/src/share/vm/classfile/modules.hpp b/hotspot/src/share/vm/classfile/modules.hpp
index 4f5e089a065..ae9781c313e 100644
--- a/hotspot/src/share/vm/classfile/modules.hpp
+++ b/hotspot/src/share/vm/classfile/modules.hpp
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2016, 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
@@ -55,12 +55,12 @@ public:
                             jstring location, const char* const* packages,
                             jsize num_packages, TRAPS);
 
-  // Provides the java.lang.reflect.Module for the unnamed module defined
+  // Provides the java.lang.Module for the unnamed module defined
   // to the boot loader.
   //
   //  IllegalArgumentExceptions are thrown for the following :
   //  * Module has a name
-  //  * Module is not a subclass of java.lang.reflect.Module
+  //  * Module is not a subclass of java.lang.Module
   //  * Module's class loader is not the boot loader
   //  NullPointerExceptions are thrown if module is null.
   static void set_bootloader_unnamed_module(jobject module, TRAPS);
@@ -96,10 +96,10 @@ public:
   // module does not exist.
   static void add_reads_module(jobject from_module, jobject to_module, TRAPS);
 
-  // Return the java.lang.reflect.Module object for this class object.
+  // Return the java.lang.Module object for this class object.
   static jobject get_module(jclass clazz, TRAPS);
 
-  // Return the java.lang.reflect.Module object for this class loader and package.
+  // Return the java.lang.Module object for this class loader and package.
   // Returns NULL if the class loader has not loaded any classes in the package.
   // The package should contain /'s, not .'s, as in java/lang, not java.lang.
   // NullPointerException is thrown if package is null.
@@ -109,18 +109,10 @@ public:
   static jobject get_named_module(Handle h_loader, const char* package, TRAPS);
 
   // If package is defined by loader, return the
-  // java.lang.reflect.Module object for the module in which the package is defined.
+  // java.lang.Module object for the module in which the package is defined.
   // Returns NULL if package is invalid or not defined by loader.
   static jobject get_module(Symbol* package_name, Handle h_loader, TRAPS);
 
-  // This adds package to module.
-  // It throws IllegalArgumentException if:
-  // * Module is bad
-  // * Module is unnamed
-  // * Package is not syntactically correct
-  // * Package is already defined for module's class loader.
-  static void add_module_package(jobject module, const char* package, TRAPS);
-
   // Marks the specified package as exported to all unnamed modules.
   // If either module or package is null then NullPointerException is thrown.
   // If module or package is bad, or module is unnamed, or package is not in
diff --git a/hotspot/src/share/vm/classfile/packageEntry.cpp b/hotspot/src/share/vm/classfile/packageEntry.cpp
index ab80fcb732b..aec61c0c75a 100644
--- a/hotspot/src/share/vm/classfile/packageEntry.cpp
+++ b/hotspot/src/share/vm/classfile/packageEntry.cpp
@@ -77,13 +77,13 @@ void PackageEntry::set_export_walk_required(ClassLoaderData* m_loader_data) {
       (this_pkg_mod == NULL || this_pkg_mod->loader_data() != m_loader_data) &&
       !m_loader_data->is_builtin_class_loader_data()) {
     _must_walk_exports = true;
-    if (log_is_enabled(Trace, modules)) {
+    if (log_is_enabled(Trace, module)) {
       ResourceMark rm;
       assert(name() != NULL, "PackageEntry without a valid name");
-      log_trace(modules)("PackageEntry::set_export_walk_required(): package %s defined in module %s, exports list must be walked",
-                         name()->as_C_string(),
-                         (this_pkg_mod == NULL || this_pkg_mod->name() == NULL) ?
-                           UNNAMED_MODULE : this_pkg_mod->name()->as_C_string());
+      log_trace(module)("PackageEntry::set_export_walk_required(): package %s defined in module %s, exports list must be walked",
+                        name()->as_C_string(),
+                        (this_pkg_mod == NULL || this_pkg_mod->name() == NULL) ?
+                          UNNAMED_MODULE : this_pkg_mod->name()->as_C_string());
     }
   }
 }
@@ -132,13 +132,13 @@ void PackageEntry::purge_qualified_exports() {
     // on the remaining live modules on the exports list.
     _must_walk_exports = false;
 
-    if (log_is_enabled(Trace, modules)) {
+    if (log_is_enabled(Trace, module)) {
       ResourceMark rm;
       assert(name() != NULL, "PackageEntry without a valid name");
       ModuleEntry* pkg_mod = module();
-      log_trace(modules)("PackageEntry::purge_qualified_exports(): package %s defined in module %s, exports list being walked",
-                         name()->as_C_string(),
-                         (pkg_mod == NULL || pkg_mod->name() == NULL) ? UNNAMED_MODULE : pkg_mod->name()->as_C_string());
+      log_trace(module)("PackageEntry::purge_qualified_exports(): package %s defined in module %s, exports list being walked",
+                        name()->as_C_string(),
+                        (pkg_mod == NULL || pkg_mod->name() == NULL) ? UNNAMED_MODULE : pkg_mod->name()->as_C_string());
     }
 
     // Go backwards because this removes entries that are dead.
diff --git a/hotspot/src/share/vm/classfile/stringTable.cpp b/hotspot/src/share/vm/classfile/stringTable.cpp
index 24c72b7ccf1..731cba8a8a6 100644
--- a/hotspot/src/share/vm/classfile/stringTable.cpp
+++ b/hotspot/src/share/vm/classfile/stringTable.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -96,10 +96,14 @@ CompactHashtable StringTable::_shared_table;
 
 // Pick hashing algorithm
 unsigned int StringTable::hash_string(const jchar* s, int len) {
-  return use_alternate_hashcode() ? AltHashing::murmur3_32(seed(), s, len) :
+  return use_alternate_hashcode() ? alt_hash_string(s, len) :
                                     java_lang_String::hash_code(s, len);
 }
 
+unsigned int StringTable::alt_hash_string(const jchar* s, int len) {
+  return AltHashing::murmur3_32(seed(), s, len);
+}
+
 unsigned int StringTable::hash_string(oop string) {
   EXCEPTION_MARK;
   if (string == NULL) {
@@ -117,11 +121,10 @@ unsigned int StringTable::hash_string(oop string) {
   }
 }
 
-oop StringTable::lookup_shared(jchar* name, int len) {
-  // java_lang_String::hash_code() was used to compute hash values in the shared table. Don't
-  // use the hash value from StringTable::hash_string() as it might use alternate hashcode.
-  return _shared_table.lookup((const char*)name,
-                              java_lang_String::hash_code(name, len), len);
+oop StringTable::lookup_shared(jchar* name, int len, unsigned int hash) {
+  assert(hash == java_lang_String::hash_code(name, len),
+         "hash must be computed using java_lang_String::hash_code");
+  return _shared_table.lookup((const char*)name, hash, len);
 }
 
 oop StringTable::lookup_in_main_table(int index, jchar* name,
@@ -156,7 +159,7 @@ oop StringTable::basic_add(int index_arg, Handle string, jchar* name,
   unsigned int hashValue;
   int index;
   if (use_alternate_hashcode()) {
-    hashValue = hash_string(name, len);
+    hashValue = alt_hash_string(name, len);
     index = hash_to_index(hashValue);
   } else {
     hashValue = hashValue_arg;
@@ -199,12 +202,15 @@ static void ensure_string_alive(oop string) {
 }
 
 oop StringTable::lookup(jchar* name, int len) {
-  oop string = lookup_shared(name, len);
+  // shared table always uses java_lang_String::hash_code
+  unsigned int hash = java_lang_String::hash_code(name, len);
+  oop string = lookup_shared(name, len, hash);
   if (string != NULL) {
     return string;
   }
-
-  unsigned int hash = hash_string(name, len);
+  if (use_alternate_hashcode()) {
+    hash = alt_hash_string(name, len);
+  }
   int index = the_table()->hash_to_index(hash);
   string = the_table()->lookup_in_main_table(index, name, len, hash);
 
@@ -215,12 +221,15 @@ oop StringTable::lookup(jchar* name, int len) {
 
 oop StringTable::intern(Handle string_or_null, jchar* name,
                         int len, TRAPS) {
-  oop found_string = lookup_shared(name, len);
+  // shared table always uses java_lang_String::hash_code
+  unsigned int hashValue = java_lang_String::hash_code(name, len);
+  oop found_string = lookup_shared(name, len, hashValue);
   if (found_string != NULL) {
     return found_string;
   }
-
-  unsigned int hashValue = hash_string(name, len);
+  if (use_alternate_hashcode()) {
+    hashValue = alt_hash_string(name, len);
+  }
   int index = the_table()->hash_to_index(hashValue);
   found_string = the_table()->lookup_in_main_table(index, name, len, hashValue);
 
@@ -305,7 +314,11 @@ oop StringTable::intern(const char* utf8_string, TRAPS) {
 }
 
 void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) {
-  buckets_unlink_or_oops_do(is_alive, f, 0, the_table()->table_size(), processed, removed);
+  BucketUnlinkContext context;
+  buckets_unlink_or_oops_do(is_alive, f, 0, the_table()->table_size(), &context);
+  _the_table->bulk_free_entries(&context);
+  *processed = context._num_processed;
+  *removed = context._num_removed;
 }
 
 void StringTable::possibly_parallel_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) {
@@ -314,6 +327,7 @@ void StringTable::possibly_parallel_unlink_or_oops_do(BoolObjectClosure* is_aliv
   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
   const int limit = the_table()->table_size();
 
+  BucketUnlinkContext context;
   for (;;) {
     // Grab next set of buckets to scan
     int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize;
@@ -323,8 +337,11 @@ void StringTable::possibly_parallel_unlink_or_oops_do(BoolObjectClosure* is_aliv
     }
 
     int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
-    buckets_unlink_or_oops_do(is_alive, f, start_idx, end_idx, processed, removed);
+    buckets_unlink_or_oops_do(is_alive, f, start_idx, end_idx, &context);
   }
+  _the_table->bulk_free_entries(&context);
+  *processed = context._num_processed;
+  *removed = context._num_removed;
 }
 
 void StringTable::buckets_oops_do(OopClosure* f, int start_idx, int end_idx) {
@@ -350,7 +367,7 @@ void StringTable::buckets_oops_do(OopClosure* f, int start_idx, int end_idx) {
   }
 }
 
-void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed) {
+void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, BucketUnlinkContext* context) {
   const int limit = the_table()->table_size();
 
   assert(0 <= start_idx && start_idx <= limit,
@@ -374,10 +391,9 @@ void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClos
         p = entry->next_addr();
       } else {
         *p = entry->next();
-        the_table()->free_entry(entry);
-        (*removed)++;
+        context->free_entry(entry);
       }
-      (*processed)++;
+      context->_num_processed++;
       entry = *p;
     }
   }
diff --git a/hotspot/src/share/vm/classfile/stringTable.hpp b/hotspot/src/share/vm/classfile/stringTable.hpp
index 397cbbd6f9e..0ef225f1c54 100644
--- a/hotspot/src/share/vm/classfile/stringTable.hpp
+++ b/hotspot/src/share/vm/classfile/stringTable.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -56,14 +56,25 @@ private:
                 unsigned int hashValue, TRAPS);
 
   oop lookup_in_main_table(int index, jchar* chars, int length, unsigned int hashValue);
-  static oop lookup_shared(jchar* name, int len);
+  static oop lookup_shared(jchar* name, int len, unsigned int hash);
 
   // Apply the give oop closure to the entries to the buckets
   // in the range [start_idx, end_idx).
   static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx);
+
+  typedef StringTable::BucketUnlinkContext BucketUnlinkContext;
   // Unlink or apply the give oop closure to the entries to the buckets
-  // in the range [start_idx, end_idx).
-  static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed);
+  // in the range [start_idx, end_idx). Unlinked bucket entries are collected in the given
+  // context to be freed later.
+  // This allows multiple threads to work on the table at once.
+  static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, BucketUnlinkContext* context);
+
+  // Hashing algorithm, used as the hash value used by the
+  //     StringTable for bucket selection and comparison (stored in the
+  //     HashtableEntry structures).  This is used in the String.intern() method.
+  static unsigned int hash_string(const jchar* s, int len);
+  static unsigned int hash_string(oop string);
+  static unsigned int alt_hash_string(const jchar* s, int len);
 
   StringTable() : RehashableHashtable((int)StringTableSize,
                               sizeof (HashtableEntry)) {}
@@ -109,12 +120,6 @@ public:
   }
   static void possibly_parallel_oops_do(OopClosure* f);
 
-  // Hashing algorithm, used as the hash value used by the
-  //     StringTable for bucket selection and comparison (stored in the
-  //     HashtableEntry structures).  This is used in the String.intern() method.
-  static unsigned int hash_string(const jchar* s, int len);
-  static unsigned int hash_string(oop string);
-
   // Internal test.
   static void test_alt_hash() PRODUCT_RETURN;
 
diff --git a/hotspot/src/share/vm/classfile/symbolTable.cpp b/hotspot/src/share/vm/classfile/symbolTable.cpp
index 5121fdbcd64..548be92bcad 100644
--- a/hotspot/src/share/vm/classfile/symbolTable.cpp
+++ b/hotspot/src/share/vm/classfile/symbolTable.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -98,7 +98,7 @@ int SymbolTable::_symbols_removed = 0;
 int SymbolTable::_symbols_counted = 0;
 volatile int SymbolTable::_parallel_claimed_idx = 0;
 
-void SymbolTable::buckets_unlink(int start_idx, int end_idx, int* processed, int* removed) {
+void SymbolTable::buckets_unlink(int start_idx, int end_idx, BucketUnlinkContext* context) {
   for (int i = start_idx; i < end_idx; ++i) {
     HashtableEntry** p = the_table()->bucket_addr(i);
     HashtableEntry* entry = the_table()->bucket(i);
@@ -111,15 +111,14 @@ void SymbolTable::buckets_unlink(int start_idx, int end_idx, int* processed, int
         break;
       }
       Symbol* s = entry->literal();
-      (*processed)++;
+      context->_num_processed++;
       assert(s != NULL, "just checking");
       // If reference count is zero, remove.
       if (s->refcount() == 0) {
         assert(!entry->is_shared(), "shared entries should be kept live");
         delete s;
-        (*removed)++;
         *p = entry->next();
-        the_table()->free_entry(entry);
+        context->free_entry(entry);
       } else {
         p = entry->next_addr();
       }
@@ -132,17 +131,20 @@ void SymbolTable::buckets_unlink(int start_idx, int end_idx, int* processed, int
 // Remove unreferenced symbols from the symbol table
 // This is done late during GC.
 void SymbolTable::unlink(int* processed, int* removed) {
-  size_t memory_total = 0;
-  buckets_unlink(0, the_table()->table_size(), processed, removed);
-  _symbols_removed += *removed;
-  _symbols_counted += *processed;
+  BucketUnlinkContext context;
+  buckets_unlink(0, the_table()->table_size(), &context);
+  _the_table->bulk_free_entries(&context);
+  *processed = context._num_processed;
+  *removed = context._num_removed;
+
+  _symbols_removed = context._num_removed;
+  _symbols_counted = context._num_processed;
 }
 
 void SymbolTable::possibly_parallel_unlink(int* processed, int* removed) {
   const int limit = the_table()->table_size();
 
-  size_t memory_total = 0;
-
+  BucketUnlinkContext context;
   for (;;) {
     // Grab next set of buckets to scan
     int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize;
@@ -152,10 +154,15 @@ void SymbolTable::possibly_parallel_unlink(int* processed, int* removed) {
     }
 
     int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
-    buckets_unlink(start_idx, end_idx, processed, removed);
+    buckets_unlink(start_idx, end_idx, &context);
   }
-  Atomic::add(*processed, &_symbols_counted);
-  Atomic::add(*removed, &_symbols_removed);
+
+  _the_table->bulk_free_entries(&context);
+  *processed = context._num_processed;
+  *removed = context._num_removed;
+
+  Atomic::add(context._num_processed, &_symbols_counted);
+  Atomic::add(context._num_removed, &_symbols_removed);
 }
 
 // Create a new table and using alternate hash code, populate the new table
diff --git a/hotspot/src/share/vm/classfile/symbolTable.hpp b/hotspot/src/share/vm/classfile/symbolTable.hpp
index e45ec753ef1..8e7b1362fff 100644
--- a/hotspot/src/share/vm/classfile/symbolTable.hpp
+++ b/hotspot/src/share/vm/classfile/symbolTable.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -154,8 +154,11 @@ private:
 
   static volatile int _parallel_claimed_idx;
 
-  // Release any dead symbols
-  static void buckets_unlink(int start_idx, int end_idx, int* processed, int* removed);
+  typedef SymbolTable::BucketUnlinkContext BucketUnlinkContext;
+  // Release any dead symbols. Unlinked bucket entries are collected in the given
+  // context to be freed later.
+  // This allows multiple threads to work on the table at once.
+  static void buckets_unlink(int start_idx, int end_idx, BucketUnlinkContext* context);
 public:
   enum {
     symbol_alloc_batch_size = 8,
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
index e29fd131432..fd410851d33 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp
@@ -1152,21 +1152,26 @@ Klass* SystemDictionary::resolve_from_stream(Symbol* class_name,
   Symbol* h_name = k->name();
   assert(class_name == NULL || class_name == h_name, "name mismatch");
 
-  bool define_succeeded = false;
   // Add class just loaded
   // If a class loader supports parallel classloading handle parallel define requests
   // find_or_define_instance_class may return a different InstanceKlass
   if (is_parallelCapable(class_loader)) {
-    instanceKlassHandle defined_k = find_or_define_instance_class(h_name, class_loader, k, CHECK_NULL);
-    if (k() == defined_k()) {
-      // we have won over other concurrent threads (if any) that are
-      // competing to define the same class.
-      define_succeeded = true;
+    instanceKlassHandle defined_k = find_or_define_instance_class(h_name, class_loader, k, THREAD);
+    if (!HAS_PENDING_EXCEPTION && defined_k() != k()) {
+      // If a parallel capable class loader already defined this class, register 'k' for cleanup.
+      assert(defined_k.not_null(), "Should have a klass if there's no exception");
+      loader_data->add_to_deallocate_list(k());
+      k = defined_k;
     }
-    k = defined_k;
   } else {
-    define_instance_class(k, CHECK_NULL);
-    define_succeeded = true;
+    define_instance_class(k, THREAD);
+  }
+
+  // If defining the class throws an exception register 'k' for cleanup.
+  if (HAS_PENDING_EXCEPTION) {
+    assert(k.not_null(), "Must have an instance klass here!");
+    loader_data->add_to_deallocate_list(k());
+    return NULL;
   }
 
   // Make sure we have an entry in the SystemDictionary on success
@@ -1518,8 +1523,16 @@ instanceKlassHandle SystemDictionary::load_instance_class(Symbol* class_name, Ha
     // find_or_define_instance_class may return a different InstanceKlass
     if (!k.is_null()) {
       instanceKlassHandle defined_k =
-        find_or_define_instance_class(class_name, class_loader, k, CHECK_(nh));
-      k = defined_k;
+        find_or_define_instance_class(class_name, class_loader, k, THREAD);
+      if (!HAS_PENDING_EXCEPTION && defined_k() != k()) {
+        // If a parallel capable class loader already defined this class, register 'k' for cleanup.
+        assert(defined_k.not_null(), "Should have a klass if there's no exception");
+        loader_data->add_to_deallocate_list(k());
+        k = defined_k;
+      } else if (HAS_PENDING_EXCEPTION) {
+        loader_data->add_to_deallocate_list(k());
+        return nh;
+      }
     }
     return k;
   } else {
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.hpp b/hotspot/src/share/vm/classfile/systemDictionary.hpp
index 4cd5e40ffa8..f6ad7a4b347 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.hpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -133,9 +133,9 @@ class SymbolPropertyTable;
   do_klass(Thread_klass,                                java_lang_Thread,                          Pre                 ) \
   do_klass(ThreadGroup_klass,                           java_lang_ThreadGroup,                     Pre                 ) \
   do_klass(Properties_klass,                            java_util_Properties,                      Pre                 ) \
+  do_klass(Module_klass,                                java_lang_Module,                          Pre                 ) \
   do_klass(reflect_AccessibleObject_klass,              java_lang_reflect_AccessibleObject,        Pre                 ) \
   do_klass(reflect_Field_klass,                         java_lang_reflect_Field,                   Pre                 ) \
-  do_klass(reflect_Module_klass,                        java_lang_reflect_Module,                  Pre                 ) \
   do_klass(reflect_Parameter_klass,                     java_lang_reflect_Parameter,               Opt                 ) \
   do_klass(reflect_Method_klass,                        java_lang_reflect_Method,                  Pre                 ) \
   do_klass(reflect_Constructor_klass,                   java_lang_reflect_Constructor,             Pre                 ) \
diff --git a/hotspot/src/share/vm/classfile/vmSymbols.cpp b/hotspot/src/share/vm/classfile/vmSymbols.cpp
index ad17837fb0d..e56b4e95d6c 100644
--- a/hotspot/src/share/vm/classfile/vmSymbols.cpp
+++ b/hotspot/src/share/vm/classfile/vmSymbols.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -632,25 +632,28 @@ bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) {
   case vmIntrinsics::_loadFence:
   case vmIntrinsics::_storeFence:
   case vmIntrinsics::_fullFence:
-  case vmIntrinsics::_compareAndSwapLong:
-  case vmIntrinsics::_weakCompareAndSwapLong:
-  case vmIntrinsics::_weakCompareAndSwapLongAcquire:
-  case vmIntrinsics::_weakCompareAndSwapLongRelease:
-  case vmIntrinsics::_compareAndSwapInt:
-  case vmIntrinsics::_weakCompareAndSwapInt:
-  case vmIntrinsics::_weakCompareAndSwapIntAcquire:
-  case vmIntrinsics::_weakCompareAndSwapIntRelease:
-  case vmIntrinsics::_compareAndSwapObject:
-  case vmIntrinsics::_weakCompareAndSwapObject:
-  case vmIntrinsics::_weakCompareAndSwapObjectAcquire:
-  case vmIntrinsics::_weakCompareAndSwapObjectRelease:
-  case vmIntrinsics::_compareAndExchangeIntVolatile:
+  case vmIntrinsics::_compareAndSetLong:
+  case vmIntrinsics::_weakCompareAndSetLong:
+  case vmIntrinsics::_weakCompareAndSetLongPlain:
+  case vmIntrinsics::_weakCompareAndSetLongAcquire:
+  case vmIntrinsics::_weakCompareAndSetLongRelease:
+  case vmIntrinsics::_compareAndSetInt:
+  case vmIntrinsics::_weakCompareAndSetInt:
+  case vmIntrinsics::_weakCompareAndSetIntPlain:
+  case vmIntrinsics::_weakCompareAndSetIntAcquire:
+  case vmIntrinsics::_weakCompareAndSetIntRelease:
+  case vmIntrinsics::_compareAndSetObject:
+  case vmIntrinsics::_weakCompareAndSetObject:
+  case vmIntrinsics::_weakCompareAndSetObjectPlain:
+  case vmIntrinsics::_weakCompareAndSetObjectAcquire:
+  case vmIntrinsics::_weakCompareAndSetObjectRelease:
+  case vmIntrinsics::_compareAndExchangeInt:
   case vmIntrinsics::_compareAndExchangeIntAcquire:
   case vmIntrinsics::_compareAndExchangeIntRelease:
-  case vmIntrinsics::_compareAndExchangeLongVolatile:
+  case vmIntrinsics::_compareAndExchangeLong:
   case vmIntrinsics::_compareAndExchangeLongAcquire:
   case vmIntrinsics::_compareAndExchangeLongRelease:
-  case vmIntrinsics::_compareAndExchangeObjectVolatile:
+  case vmIntrinsics::_compareAndExchangeObject:
   case vmIntrinsics::_compareAndExchangeObjectAcquire:
   case vmIntrinsics::_compareAndExchangeObjectRelease:
     if (!InlineUnsafeOps) return true;
diff --git a/hotspot/src/share/vm/classfile/vmSymbols.hpp b/hotspot/src/share/vm/classfile/vmSymbols.hpp
index 0ef86447c4e..15aa3613422 100644
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -56,6 +56,7 @@
   template(java_lang_Object,                          "java/lang/Object")                         \
   template(java_lang_Class,                           "java/lang/Class")                          \
   template(java_lang_Package,                         "java/lang/Package")                        \
+  template(java_lang_Module,                          "java/lang/Module")                         \
   template(java_lang_String,                          "java/lang/String")                         \
   template(java_lang_StringLatin1,                    "java/lang/StringLatin1")                   \
   template(java_lang_StringUTF16,                     "java/lang/StringUTF16")                    \
@@ -90,7 +91,6 @@
   template(java_lang_reflect_Method,                  "java/lang/reflect/Method")                 \
   template(java_lang_reflect_Constructor,             "java/lang/reflect/Constructor")            \
   template(java_lang_reflect_Field,                   "java/lang/reflect/Field")                  \
-  template(java_lang_reflect_Module,                  "java/lang/reflect/Module")                 \
   template(java_lang_reflect_Parameter,               "java/lang/reflect/Parameter")              \
   template(java_lang_reflect_Array,                   "java/lang/reflect/Array")                  \
   template(java_lang_StringBuffer,                    "java/lang/StringBuffer")                   \
@@ -136,7 +136,7 @@
   template(initPhase1_name,                           "initPhase1")                               \
   template(initPhase2_name,                           "initPhase2")                               \
   template(initPhase3_name,                           "initPhase3")                               \
-  template(java_lang_reflect_module_init_signature,   "(Ljava/lang/ClassLoader;Ljava/lang/String;)V") \
+  template(java_lang_module_init_signature,           "(Ljava/lang/ClassLoader;Ljava/lang/String;)V") \
                                                                                                   \
   /* class file format tags */                                                                    \
   template(tag_source_file,                           "SourceFile")                               \
@@ -325,14 +325,8 @@
   template(java_lang_StackStreamFactory_AbstractStackWalker, "java/lang/StackStreamFactory$AbstractStackWalker") \
   template(doStackWalk_signature,                     "(JIIII)Ljava/lang/Object;")                \
   template(asPrimitive_name,                          "asPrimitive")                              \
-  template(asPrimitive_int_signature,                 "(I)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_long_signature,                "(J)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_short_signature,               "(S)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_byte_signature,                "(B)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_char_signature,                "(C)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_float_signature,               "(F)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_double_signature,              "(D)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_boolean_signature,             "(Z)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
+  template(asPrimitive_int_signature,                 "(I)Ljava/lang/LiveStackFrame$PrimitiveSlot;") \
+  template(asPrimitive_long_signature,                "(J)Ljava/lang/LiveStackFrame$PrimitiveSlot;") \
                                                                                                   \
   /* common method and field names */                                                             \
   template(object_initializer_name,                   "")                                   \
@@ -444,6 +438,7 @@
   template(monitors_name,                             "monitors")                                 \
   template(locals_name,                               "locals")                                   \
   template(operands_name,                             "operands")                                 \
+  template(mode_name,                                 "mode")                                     \
   template(oop_size_name,                             "oop_size")                                 \
   template(static_oop_field_count_name,               "static_oop_field_count")                   \
   template(protection_domain_name,                    "protection_domain")                        \
@@ -455,7 +450,7 @@
   template(getModule_name,                            "getModule")                                \
   template(input_stream_void_signature,               "(Ljava/io/InputStream;)V")                 \
   template(definePackage_name,                        "definePackage")                            \
-  template(definePackage_signature,                   "(Ljava/lang/String;Ljava/lang/reflect/Module;)Ljava/lang/Package;") \
+  template(definePackage_signature,                   "(Ljava/lang/String;Ljava/lang/Module;)Ljava/lang/Package;") \
   template(defineOrCheckPackage_name,                 "defineOrCheckPackage")                     \
   template(defineOrCheckPackage_signature,            "(Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)Ljava/lang/Package;") \
   template(fileToEncodedURL_name,                     "fileToEncodedURL")                         \
@@ -537,7 +532,7 @@
   template(void_class_signature,                      "()Ljava/lang/Class;")                                      \
   template(void_class_array_signature,                "()[Ljava/lang/Class;")                                     \
   template(void_string_signature,                     "()Ljava/lang/String;")                                     \
-  template(void_module_signature,                     "()Ljava/lang/reflect/Module;")                             \
+  template(void_module_signature,                     "()Ljava/lang/Module;")                                     \
   template(object_array_object_signature,             "([Ljava/lang/Object;)Ljava/lang/Object;")                  \
   template(object_object_array_object_signature,      "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;")\
   template(exception_void_signature,                  "(Ljava/lang/Exception;)V")                                 \
@@ -557,7 +552,7 @@
   template(reference_signature,                       "Ljava/lang/ref/Reference;")                                \
   template(sun_misc_Cleaner_signature,                "Lsun/misc/Cleaner;")                                       \
   template(executable_signature,                      "Ljava/lang/reflect/Executable;")                           \
-  template(module_signature,                          "Ljava/lang/reflect/Module;")                               \
+  template(module_signature,                          "Ljava/lang/Module;")                                       \
   template(concurrenthashmap_signature,               "Ljava/util/concurrent/ConcurrentHashMap;")                 \
   template(String_StringBuilder_signature,            "(Ljava/lang/String;)Ljava/lang/StringBuilder;")            \
   template(int_StringBuilder_signature,               "(I)Ljava/lang/StringBuilder;")                             \
@@ -566,6 +561,7 @@
   template(int_StringBuffer_signature,                "(I)Ljava/lang/StringBuffer;")                              \
   template(char_StringBuffer_signature,               "(C)Ljava/lang/StringBuffer;")                              \
   template(int_String_signature,                      "(I)Ljava/lang/String;")                                    \
+  template(boolean_boolean_int_signature,             "(ZZ)I")                                                    \
   template(codesource_permissioncollection_signature, "(Ljava/security/CodeSource;Ljava/security/PermissionCollection;)V") \
   /* signature symbols needed by intrinsics */                                                                    \
   VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, template, VM_ALIAS_IGNORE)            \
@@ -646,16 +642,18 @@
   template(jdk_internal_module_Modules,                "jdk/internal/module/Modules")                             \
   template(jdk_internal_vm_VMSupport,                  "jdk/internal/vm/VMSupport")                               \
   template(addReads_name,                              "addReads")                                                \
-  template(addReads_signature,                         "(Ljava/lang/reflect/Module;Ljava/lang/reflect/Module;)V") \
+  template(addReads_signature,                         "(Ljava/lang/Module;Ljava/lang/Module;)V")                 \
   template(addExports_name,                            "addExports")                                              \
   template(addOpens_name,                              "addOpens")                                                \
-  template(addExports_signature,                       "(Ljava/lang/reflect/Module;Ljava/lang/String;Ljava/lang/reflect/Module;)V") \
+  template(addExports_signature,                       "(Ljava/lang/Module;Ljava/lang/String;Ljava/lang/Module;)V") \
   template(addUses_name,                               "addUses")                                                 \
-  template(addUses_signature,                          "(Ljava/lang/reflect/Module;Ljava/lang/Class;)V")          \
+  template(addUses_signature,                          "(Ljava/lang/Module;Ljava/lang/Class;)V")                  \
   template(addProvides_name,                           "addProvides")                                             \
-  template(addProvides_signature,                      "(Ljava/lang/reflect/Module;Ljava/lang/Class;Ljava/lang/Class;)V") \
+  template(addProvides_signature,                      "(Ljava/lang/Module;Ljava/lang/Class;Ljava/lang/Class;)V") \
+  template(loadModule_name,                            "loadModule")                                              \
+  template(loadModule_signature,                       "(Ljava/lang/String;)Ljava/lang/Module;")                  \
   template(transformedByAgent_name,                    "transformedByAgent")                                      \
-  template(transformedByAgent_signature,               "(Ljava/lang/reflect/Module;)V")                           \
+  template(transformedByAgent_signature,               "(Ljava/lang/Module;)V")                                   \
   template(appendToClassPathForInstrumentation_name,   "appendToClassPathForInstrumentation")                     \
   do_alias(appendToClassPathForInstrumentation_signature, string_void_signature)                                  \
   template(serializePropertiesToByteArray_name,        "serializePropertiesToByteArray")                          \
@@ -1246,100 +1244,100 @@
   do_intrinsic(_putIntUnaligned,           jdk_internal_misc_Unsafe,    putIntUnaligned_name, putInt_signature,         F_R)  \
   do_intrinsic(_putLongUnaligned,          jdk_internal_misc_Unsafe,    putLongUnaligned_name, putLong_signature,       F_R)  \
                                                                                                                         \
-  do_signature(compareAndSwapObject_signature,     "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z")        \
+  do_signature(compareAndSetObject_signature,      "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z")        \
   do_signature(compareAndExchangeObject_signature, "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \
-  do_signature(compareAndSwapLong_signature,       "(Ljava/lang/Object;JJJ)Z")                                          \
+  do_signature(compareAndSetLong_signature,        "(Ljava/lang/Object;JJJ)Z")                                          \
   do_signature(compareAndExchangeLong_signature,   "(Ljava/lang/Object;JJJ)J")                                          \
-  do_signature(compareAndSwapInt_signature,        "(Ljava/lang/Object;JII)Z")                                          \
+  do_signature(compareAndSetInt_signature,         "(Ljava/lang/Object;JII)Z")                                          \
   do_signature(compareAndExchangeInt_signature,    "(Ljava/lang/Object;JII)I")                                          \
-  do_signature(compareAndSwapByte_signature,       "(Ljava/lang/Object;JBB)Z")                                          \
+  do_signature(compareAndSetByte_signature,        "(Ljava/lang/Object;JBB)Z")                                          \
   do_signature(compareAndExchangeByte_signature,   "(Ljava/lang/Object;JBB)B")                                          \
-  do_signature(compareAndSwapShort_signature,      "(Ljava/lang/Object;JSS)Z")                                          \
+  do_signature(compareAndSetShort_signature,       "(Ljava/lang/Object;JSS)Z")                                          \
   do_signature(compareAndExchangeShort_signature,  "(Ljava/lang/Object;JSS)S")                                          \
                                                                                                                         \
-  do_name(compareAndSwapObject_name,             "compareAndSwapObject")                                                \
-  do_name(compareAndExchangeObjectVolatile_name, "compareAndExchangeObjectVolatile")                                    \
+  do_name(compareAndSetObject_name,              "compareAndSetObject")                                                 \
+  do_name(compareAndExchangeObject_name,         "compareAndExchangeObject")                                            \
   do_name(compareAndExchangeObjectAcquire_name,  "compareAndExchangeObjectAcquire")                                     \
   do_name(compareAndExchangeObjectRelease_name,  "compareAndExchangeObjectRelease")                                     \
-  do_name(compareAndSwapLong_name,               "compareAndSwapLong")                                                  \
-  do_name(compareAndExchangeLongVolatile_name,   "compareAndExchangeLongVolatile")                                      \
+  do_name(compareAndSetLong_name,                "compareAndSetLong")                                                   \
+  do_name(compareAndExchangeLong_name,           "compareAndExchangeLong")                                              \
   do_name(compareAndExchangeLongAcquire_name,    "compareAndExchangeLongAcquire")                                       \
   do_name(compareAndExchangeLongRelease_name,    "compareAndExchangeLongRelease")                                       \
-  do_name(compareAndSwapInt_name,                "compareAndSwapInt")                                                   \
-  do_name(compareAndExchangeIntVolatile_name,    "compareAndExchangeIntVolatile")                                       \
+  do_name(compareAndSetInt_name,                 "compareAndSetInt")                                                    \
+  do_name(compareAndExchangeInt_name,            "compareAndExchangeInt")                                               \
   do_name(compareAndExchangeIntAcquire_name,     "compareAndExchangeIntAcquire")                                        \
   do_name(compareAndExchangeIntRelease_name,     "compareAndExchangeIntRelease")                                        \
-  do_name(compareAndSwapByte_name,               "compareAndSwapByte")                                                  \
-  do_name(compareAndExchangeByteVolatile_name,   "compareAndExchangeByteVolatile")                                      \
+  do_name(compareAndSetByte_name,                "compareAndSetByte")                                                   \
+  do_name(compareAndExchangeByte_name,           "compareAndExchangeByte")                                              \
   do_name(compareAndExchangeByteAcquire_name,    "compareAndExchangeByteAcquire")                                       \
   do_name(compareAndExchangeByteRelease_name,    "compareAndExchangeByteRelease")                                       \
-  do_name(compareAndSwapShort_name,              "compareAndSwapShort")                                                 \
-  do_name(compareAndExchangeShortVolatile_name,  "compareAndExchangeShortVolatile")                                     \
+  do_name(compareAndSetShort_name,               "compareAndSetShort")                                                  \
+  do_name(compareAndExchangeShort_name,          "compareAndExchangeShort")                                             \
   do_name(compareAndExchangeShortAcquire_name,   "compareAndExchangeShortAcquire")                                      \
   do_name(compareAndExchangeShortRelease_name,   "compareAndExchangeShortRelease")                                      \
                                                                                                                         \
-  do_name(weakCompareAndSwapObject_name,         "weakCompareAndSwapObject")                                            \
-  do_name(weakCompareAndSwapObjectAcquire_name,  "weakCompareAndSwapObjectAcquire")                                     \
-  do_name(weakCompareAndSwapObjectRelease_name,  "weakCompareAndSwapObjectRelease")                                     \
-  do_name(weakCompareAndSwapObjectVolatile_name, "weakCompareAndSwapObjectVolatile")                                    \
-  do_name(weakCompareAndSwapLong_name,           "weakCompareAndSwapLong")                                              \
-  do_name(weakCompareAndSwapLongAcquire_name,    "weakCompareAndSwapLongAcquire")                                       \
-  do_name(weakCompareAndSwapLongRelease_name,    "weakCompareAndSwapLongRelease")                                       \
-  do_name(weakCompareAndSwapLongVolatile_name,   "weakCompareAndSwapLongVolatile")                                      \
-  do_name(weakCompareAndSwapInt_name,            "weakCompareAndSwapInt")                                               \
-  do_name(weakCompareAndSwapIntAcquire_name,     "weakCompareAndSwapIntAcquire")                                        \
-  do_name(weakCompareAndSwapIntRelease_name,     "weakCompareAndSwapIntRelease")                                        \
-  do_name(weakCompareAndSwapIntVolatile_name,    "weakCompareAndSwapIntVolatile")                                       \
-  do_name(weakCompareAndSwapByte_name,           "weakCompareAndSwapByte")                                              \
-  do_name(weakCompareAndSwapByteAcquire_name,    "weakCompareAndSwapByteAcquire")                                       \
-  do_name(weakCompareAndSwapByteRelease_name,    "weakCompareAndSwapByteRelease")                                       \
-  do_name(weakCompareAndSwapByteVolatile_name,   "weakCompareAndSwapByteVolatile")                                      \
-  do_name(weakCompareAndSwapShort_name,          "weakCompareAndSwapShort")                                             \
-  do_name(weakCompareAndSwapShortAcquire_name,   "weakCompareAndSwapShortAcquire")                                      \
-  do_name(weakCompareAndSwapShortRelease_name,   "weakCompareAndSwapShortRelease")                                      \
-  do_name(weakCompareAndSwapShortVolatile_name,  "weakCompareAndSwapShortVolatile")                                     \
+  do_name(weakCompareAndSetObjectPlain_name,     "weakCompareAndSetObjectPlain")                                        \
+  do_name(weakCompareAndSetObjectAcquire_name,   "weakCompareAndSetObjectAcquire")                                      \
+  do_name(weakCompareAndSetObjectRelease_name,   "weakCompareAndSetObjectRelease")                                      \
+  do_name(weakCompareAndSetObject_name,          "weakCompareAndSetObject")                                             \
+  do_name(weakCompareAndSetLongPlain_name,       "weakCompareAndSetLongPlain")                                          \
+  do_name(weakCompareAndSetLongAcquire_name,     "weakCompareAndSetLongAcquire")                                        \
+  do_name(weakCompareAndSetLongRelease_name,     "weakCompareAndSetLongRelease")                                        \
+  do_name(weakCompareAndSetLong_name,            "weakCompareAndSetLong")                                               \
+  do_name(weakCompareAndSetIntPlain_name,        "weakCompareAndSetIntPlain")                                           \
+  do_name(weakCompareAndSetIntAcquire_name,      "weakCompareAndSetIntAcquire")                                         \
+  do_name(weakCompareAndSetIntRelease_name,      "weakCompareAndSetIntRelease")                                         \
+  do_name(weakCompareAndSetInt_name,             "weakCompareAndSetInt")                                                \
+  do_name(weakCompareAndSetBytePlain_name,       "weakCompareAndSetBytePlain")                                          \
+  do_name(weakCompareAndSetByteAcquire_name,     "weakCompareAndSetByteAcquire")                                        \
+  do_name(weakCompareAndSetByteRelease_name,     "weakCompareAndSetByteRelease")                                        \
+  do_name(weakCompareAndSetByte_name,            "weakCompareAndSetByte")                                               \
+  do_name(weakCompareAndSetShortPlain_name,      "weakCompareAndSetShortPlain")                                         \
+  do_name(weakCompareAndSetShortAcquire_name,    "weakCompareAndSetShortAcquire")                                       \
+  do_name(weakCompareAndSetShortRelease_name,    "weakCompareAndSetShortRelease")                                       \
+  do_name(weakCompareAndSetShort_name,           "weakCompareAndSetShort")                                              \
                                                                                                                         \
-  do_intrinsic(_compareAndSwapObject,             jdk_internal_misc_Unsafe,  compareAndSwapObject_name,             compareAndSwapObject_signature,     F_RN) \
-  do_intrinsic(_compareAndExchangeObjectVolatile, jdk_internal_misc_Unsafe,  compareAndExchangeObjectVolatile_name, compareAndExchangeObject_signature, F_RN) \
+  do_intrinsic(_compareAndSetObject,              jdk_internal_misc_Unsafe,  compareAndSetObject_name,              compareAndSetObject_signature,      F_RN) \
+  do_intrinsic(_compareAndExchangeObject,         jdk_internal_misc_Unsafe,  compareAndExchangeObject_name,         compareAndExchangeObject_signature, F_RN) \
   do_intrinsic(_compareAndExchangeObjectAcquire,  jdk_internal_misc_Unsafe,  compareAndExchangeObjectAcquire_name,  compareAndExchangeObject_signature, F_R)  \
   do_intrinsic(_compareAndExchangeObjectRelease,  jdk_internal_misc_Unsafe,  compareAndExchangeObjectRelease_name,  compareAndExchangeObject_signature, F_R)  \
-  do_intrinsic(_compareAndSwapLong,               jdk_internal_misc_Unsafe,  compareAndSwapLong_name,               compareAndSwapLong_signature,       F_RN) \
-  do_intrinsic(_compareAndExchangeLongVolatile,   jdk_internal_misc_Unsafe,  compareAndExchangeLongVolatile_name,   compareAndExchangeLong_signature,   F_RN) \
+  do_intrinsic(_compareAndSetLong,                jdk_internal_misc_Unsafe,  compareAndSetLong_name,                compareAndSetLong_signature,        F_RN) \
+  do_intrinsic(_compareAndExchangeLong,           jdk_internal_misc_Unsafe,  compareAndExchangeLong_name,           compareAndExchangeLong_signature,   F_RN) \
   do_intrinsic(_compareAndExchangeLongAcquire,    jdk_internal_misc_Unsafe,  compareAndExchangeLongAcquire_name,    compareAndExchangeLong_signature,   F_R)  \
   do_intrinsic(_compareAndExchangeLongRelease,    jdk_internal_misc_Unsafe,  compareAndExchangeLongRelease_name,    compareAndExchangeLong_signature,   F_R)  \
-  do_intrinsic(_compareAndSwapInt,                jdk_internal_misc_Unsafe,  compareAndSwapInt_name,                compareAndSwapInt_signature,        F_RN) \
-  do_intrinsic(_compareAndExchangeIntVolatile,    jdk_internal_misc_Unsafe,  compareAndExchangeIntVolatile_name,    compareAndExchangeInt_signature,    F_RN) \
+  do_intrinsic(_compareAndSetInt,                 jdk_internal_misc_Unsafe,  compareAndSetInt_name,                 compareAndSetInt_signature,         F_RN) \
+  do_intrinsic(_compareAndExchangeInt,            jdk_internal_misc_Unsafe,  compareAndExchangeInt_name,            compareAndExchangeInt_signature,    F_RN) \
   do_intrinsic(_compareAndExchangeIntAcquire,     jdk_internal_misc_Unsafe,  compareAndExchangeIntAcquire_name,     compareAndExchangeInt_signature,    F_R)  \
   do_intrinsic(_compareAndExchangeIntRelease,     jdk_internal_misc_Unsafe,  compareAndExchangeIntRelease_name,     compareAndExchangeInt_signature,    F_R)  \
-  do_intrinsic(_compareAndSwapByte,               jdk_internal_misc_Unsafe,  compareAndSwapByte_name,               compareAndSwapByte_signature,       F_R)  \
-  do_intrinsic(_compareAndExchangeByteVolatile,   jdk_internal_misc_Unsafe,  compareAndExchangeByteVolatile_name,   compareAndExchangeByte_signature,   F_R)  \
+  do_intrinsic(_compareAndSetByte,                jdk_internal_misc_Unsafe,  compareAndSetByte_name,                compareAndSetByte_signature,        F_R)  \
+  do_intrinsic(_compareAndExchangeByte,           jdk_internal_misc_Unsafe,  compareAndExchangeByte_name,           compareAndExchangeByte_signature,   F_R)  \
   do_intrinsic(_compareAndExchangeByteAcquire,    jdk_internal_misc_Unsafe,  compareAndExchangeByteAcquire_name,    compareAndExchangeByte_signature,   F_R)  \
   do_intrinsic(_compareAndExchangeByteRelease,    jdk_internal_misc_Unsafe,  compareAndExchangeByteRelease_name,    compareAndExchangeByte_signature,   F_R)  \
-  do_intrinsic(_compareAndSwapShort,              jdk_internal_misc_Unsafe,  compareAndSwapShort_name,              compareAndSwapShort_signature,      F_R)  \
-  do_intrinsic(_compareAndExchangeShortVolatile,  jdk_internal_misc_Unsafe,  compareAndExchangeShortVolatile_name,  compareAndExchangeShort_signature,  F_R)  \
+  do_intrinsic(_compareAndSetShort,               jdk_internal_misc_Unsafe,  compareAndSetShort_name,               compareAndSetShort_signature,       F_R)  \
+  do_intrinsic(_compareAndExchangeShort,          jdk_internal_misc_Unsafe,  compareAndExchangeShort_name,          compareAndExchangeShort_signature,  F_R)  \
   do_intrinsic(_compareAndExchangeShortAcquire,   jdk_internal_misc_Unsafe,  compareAndExchangeShortAcquire_name,   compareAndExchangeShort_signature,  F_R)  \
   do_intrinsic(_compareAndExchangeShortRelease,   jdk_internal_misc_Unsafe,  compareAndExchangeShortRelease_name,   compareAndExchangeShort_signature,  F_R)  \
                                                                                                                                                              \
-  do_intrinsic(_weakCompareAndSwapObject,         jdk_internal_misc_Unsafe,  weakCompareAndSwapObject_name,         compareAndSwapObject_signature,     F_R) \
-  do_intrinsic(_weakCompareAndSwapObjectAcquire,  jdk_internal_misc_Unsafe,  weakCompareAndSwapObjectAcquire_name,  compareAndSwapObject_signature,     F_R) \
-  do_intrinsic(_weakCompareAndSwapObjectRelease,  jdk_internal_misc_Unsafe,  weakCompareAndSwapObjectRelease_name,  compareAndSwapObject_signature,     F_R) \
-  do_intrinsic(_weakCompareAndSwapObjectVolatile, jdk_internal_misc_Unsafe,  weakCompareAndSwapObjectVolatile_name, compareAndSwapObject_signature,     F_R) \
-  do_intrinsic(_weakCompareAndSwapLong,           jdk_internal_misc_Unsafe,  weakCompareAndSwapLong_name,           compareAndSwapLong_signature,       F_R) \
-  do_intrinsic(_weakCompareAndSwapLongAcquire,    jdk_internal_misc_Unsafe,  weakCompareAndSwapLongAcquire_name,    compareAndSwapLong_signature,       F_R) \
-  do_intrinsic(_weakCompareAndSwapLongRelease,    jdk_internal_misc_Unsafe,  weakCompareAndSwapLongRelease_name,    compareAndSwapLong_signature,       F_R) \
-  do_intrinsic(_weakCompareAndSwapLongVolatile,   jdk_internal_misc_Unsafe,  weakCompareAndSwapLongVolatile_name,   compareAndSwapLong_signature,       F_R) \
-  do_intrinsic(_weakCompareAndSwapInt,            jdk_internal_misc_Unsafe,  weakCompareAndSwapInt_name,            compareAndSwapInt_signature,        F_R) \
-  do_intrinsic(_weakCompareAndSwapIntAcquire,     jdk_internal_misc_Unsafe,  weakCompareAndSwapIntAcquire_name,     compareAndSwapInt_signature,        F_R) \
-  do_intrinsic(_weakCompareAndSwapIntRelease,     jdk_internal_misc_Unsafe,  weakCompareAndSwapIntRelease_name,     compareAndSwapInt_signature,        F_R) \
-  do_intrinsic(_weakCompareAndSwapIntVolatile,    jdk_internal_misc_Unsafe,  weakCompareAndSwapIntVolatile_name,    compareAndSwapInt_signature,        F_R) \
-  do_intrinsic(_weakCompareAndSwapByte,           jdk_internal_misc_Unsafe,  weakCompareAndSwapByte_name,           compareAndSwapByte_signature,       F_R) \
-  do_intrinsic(_weakCompareAndSwapByteAcquire,    jdk_internal_misc_Unsafe,  weakCompareAndSwapByteAcquire_name,    compareAndSwapByte_signature,       F_R) \
-  do_intrinsic(_weakCompareAndSwapByteRelease,    jdk_internal_misc_Unsafe,  weakCompareAndSwapByteRelease_name,    compareAndSwapByte_signature,       F_R) \
-  do_intrinsic(_weakCompareAndSwapByteVolatile,   jdk_internal_misc_Unsafe,  weakCompareAndSwapByteVolatile_name,   compareAndSwapByte_signature,       F_R) \
-  do_intrinsic(_weakCompareAndSwapShort,          jdk_internal_misc_Unsafe,  weakCompareAndSwapShort_name,          compareAndSwapShort_signature,      F_R) \
-  do_intrinsic(_weakCompareAndSwapShortAcquire,   jdk_internal_misc_Unsafe,  weakCompareAndSwapShortAcquire_name,   compareAndSwapShort_signature,      F_R) \
-  do_intrinsic(_weakCompareAndSwapShortRelease,   jdk_internal_misc_Unsafe,  weakCompareAndSwapShortRelease_name,   compareAndSwapShort_signature,      F_R) \
-  do_intrinsic(_weakCompareAndSwapShortVolatile,  jdk_internal_misc_Unsafe,  weakCompareAndSwapShortVolatile_name,  compareAndSwapShort_signature,      F_R) \
+  do_intrinsic(_weakCompareAndSetObjectPlain,     jdk_internal_misc_Unsafe,  weakCompareAndSetObjectPlain_name,     compareAndSetObject_signature,      F_R) \
+  do_intrinsic(_weakCompareAndSetObjectAcquire,   jdk_internal_misc_Unsafe,  weakCompareAndSetObjectAcquire_name,   compareAndSetObject_signature,      F_R) \
+  do_intrinsic(_weakCompareAndSetObjectRelease,   jdk_internal_misc_Unsafe,  weakCompareAndSetObjectRelease_name,   compareAndSetObject_signature,      F_R) \
+  do_intrinsic(_weakCompareAndSetObject,          jdk_internal_misc_Unsafe,  weakCompareAndSetObject_name,          compareAndSetObject_signature,      F_R) \
+  do_intrinsic(_weakCompareAndSetLongPlain,       jdk_internal_misc_Unsafe,  weakCompareAndSetLongPlain_name,       compareAndSetLong_signature,        F_R) \
+  do_intrinsic(_weakCompareAndSetLongAcquire,     jdk_internal_misc_Unsafe,  weakCompareAndSetLongAcquire_name,     compareAndSetLong_signature,        F_R) \
+  do_intrinsic(_weakCompareAndSetLongRelease,     jdk_internal_misc_Unsafe,  weakCompareAndSetLongRelease_name,     compareAndSetLong_signature,        F_R) \
+  do_intrinsic(_weakCompareAndSetLong,            jdk_internal_misc_Unsafe,  weakCompareAndSetLong_name,            compareAndSetLong_signature,        F_R) \
+  do_intrinsic(_weakCompareAndSetIntPlain,        jdk_internal_misc_Unsafe,  weakCompareAndSetIntPlain_name,        compareAndSetInt_signature,         F_R) \
+  do_intrinsic(_weakCompareAndSetIntAcquire,      jdk_internal_misc_Unsafe,  weakCompareAndSetIntAcquire_name,      compareAndSetInt_signature,         F_R) \
+  do_intrinsic(_weakCompareAndSetIntRelease,      jdk_internal_misc_Unsafe,  weakCompareAndSetIntRelease_name,      compareAndSetInt_signature,         F_R) \
+  do_intrinsic(_weakCompareAndSetInt,             jdk_internal_misc_Unsafe,  weakCompareAndSetInt_name,             compareAndSetInt_signature,         F_R) \
+  do_intrinsic(_weakCompareAndSetBytePlain,       jdk_internal_misc_Unsafe,  weakCompareAndSetBytePlain_name,       compareAndSetByte_signature,        F_R) \
+  do_intrinsic(_weakCompareAndSetByteAcquire,     jdk_internal_misc_Unsafe,  weakCompareAndSetByteAcquire_name,     compareAndSetByte_signature,        F_R) \
+  do_intrinsic(_weakCompareAndSetByteRelease,     jdk_internal_misc_Unsafe,  weakCompareAndSetByteRelease_name,     compareAndSetByte_signature,        F_R) \
+  do_intrinsic(_weakCompareAndSetByte,            jdk_internal_misc_Unsafe,  weakCompareAndSetByte_name,            compareAndSetByte_signature,        F_R) \
+  do_intrinsic(_weakCompareAndSetShortPlain,      jdk_internal_misc_Unsafe,  weakCompareAndSetShortPlain_name,      compareAndSetShort_signature,       F_R) \
+  do_intrinsic(_weakCompareAndSetShortAcquire,    jdk_internal_misc_Unsafe,  weakCompareAndSetShortAcquire_name,    compareAndSetShort_signature,       F_R) \
+  do_intrinsic(_weakCompareAndSetShortRelease,    jdk_internal_misc_Unsafe,  weakCompareAndSetShortRelease_name,    compareAndSetShort_signature,       F_R) \
+  do_intrinsic(_weakCompareAndSetShort,           jdk_internal_misc_Unsafe,  weakCompareAndSetShort_name,           compareAndSetShort_signature,       F_R) \
                            \
   do_intrinsic(_getAndAddInt,             jdk_internal_misc_Unsafe,     getAndAddInt_name, getAndAddInt_signature, F_R)       \
    do_name(     getAndAddInt_name,                                      "getAndAddInt")                                       \
diff --git a/hotspot/src/share/vm/code/codeCache.cpp b/hotspot/src/share/vm/code/codeCache.cpp
index bfe643ab683..3765d129b3b 100644
--- a/hotspot/src/share/vm/code/codeCache.cpp
+++ b/hotspot/src/share/vm/code/codeCache.cpp
@@ -130,6 +130,7 @@ class CodeBlob_sizes {
 // Iterate over all CodeHeaps
 #define FOR_ALL_HEAPS(heap) for (GrowableArrayIterator heap = _heaps->begin(); heap != _heaps->end(); ++heap)
 #define FOR_ALL_NMETHOD_HEAPS(heap) for (GrowableArrayIterator heap = _nmethod_heaps->begin(); heap != _nmethod_heaps->end(); ++heap)
+#define FOR_ALL_ALLOCABLE_HEAPS(heap) for (GrowableArrayIterator heap = _allocable_heaps->begin(); heap != _allocable_heaps->end(); ++heap)
 
 // Iterate over all CodeBlobs (cb) on the given CodeHeap
 #define FOR_ALL_BLOBS(cb, heap) for (CodeBlob* cb = first_blob(heap); cb != NULL; cb = next_blob(heap, cb))
@@ -140,10 +141,11 @@ int CodeCache::_number_of_nmethods_with_dependencies = 0;
 bool CodeCache::_needs_cache_clean = false;
 nmethod* CodeCache::_scavenge_root_nmethods = NULL;
 
-// Initialize array of CodeHeaps
+// Initialize arrays of CodeHeap subsets
 GrowableArray* CodeCache::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray (CodeBlobType::All, true);
 GrowableArray* CodeCache::_compiled_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray (CodeBlobType::All, true);
 GrowableArray* CodeCache::_nmethod_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray (CodeBlobType::All, true);
+GrowableArray* CodeCache::_allocable_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray (CodeBlobType::All, true);
 
 void CodeCache::check_heap_sizes(size_t non_nmethod_size, size_t profiled_size, size_t non_profiled_size, size_t cache_size, bool all_set) {
   size_t total_size = non_nmethod_size + profiled_size + non_profiled_size;
@@ -338,6 +340,7 @@ ReservedCodeSpace CodeCache::reserve_heap_memory(size_t size) {
   return rs;
 }
 
+// Heaps available for allocation
 bool CodeCache::heap_available(int code_blob_type) {
   if (!SegmentedCodeCache) {
     // No segmentation: use a single code heap
@@ -391,6 +394,9 @@ void CodeCache::add_heap(CodeHeap* heap) {
   if (code_blob_type_accepts_nmethod(type)) {
     _nmethod_heaps->insert_sorted(heap);
   }
+  if (code_blob_type_accepts_allocable(type)) {
+    _allocable_heaps->insert_sorted(heap);
+  }
 }
 
 void CodeCache::add_heap(ReservedSpace rs, const char* name, int code_blob_type) {
@@ -417,7 +423,7 @@ void CodeCache::add_heap(ReservedSpace rs, const char* name, int code_blob_type)
 CodeHeap* CodeCache::get_code_heap(const CodeBlob* cb) {
   assert(cb != NULL, "CodeBlob is null");
   FOR_ALL_HEAPS(heap) {
-    if ((*heap)->contains(cb->code_begin())) {
+    if ((*heap)->contains_blob(cb)) {
       return *heap;
     }
   }
@@ -620,7 +626,7 @@ nmethod* CodeCache::find_nmethod(void* start) {
 
 void CodeCache::blobs_do(void f(CodeBlob* nm)) {
   assert_locked_or_safepoint(CodeCache_lock);
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_HEAPS(heap) {
     FOR_ALL_BLOBS(cb, *heap) {
       f(cb);
     }
@@ -663,7 +669,7 @@ void CodeCache::do_unloading(BoolObjectClosure* is_alive, bool unloading_occurre
 
 void CodeCache::blobs_do(CodeBlobClosure* f) {
   assert_locked_or_safepoint(CodeCache_lock);
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_ALLOCABLE_HEAPS(heap) {
     FOR_ALL_BLOBS(cb, *heap) {
       if (cb->is_alive()) {
         f->do_code_blob(cb);
@@ -960,7 +966,7 @@ address CodeCache::high_bound(int code_blob_type) {
 
 size_t CodeCache::capacity() {
   size_t cap = 0;
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_ALLOCABLE_HEAPS(heap) {
     cap += (*heap)->capacity();
   }
   return cap;
@@ -973,7 +979,7 @@ size_t CodeCache::unallocated_capacity(int code_blob_type) {
 
 size_t CodeCache::unallocated_capacity() {
   size_t unallocated_cap = 0;
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_ALLOCABLE_HEAPS(heap) {
     unallocated_cap += (*heap)->unallocated_capacity();
   }
   return unallocated_cap;
@@ -981,7 +987,7 @@ size_t CodeCache::unallocated_capacity() {
 
 size_t CodeCache::max_capacity() {
   size_t max_cap = 0;
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_ALLOCABLE_HEAPS(heap) {
     max_cap += (*heap)->max_capacity();
   }
   return max_cap;
@@ -1007,7 +1013,7 @@ double CodeCache::reverse_free_ratio(int code_blob_type) {
 
 size_t CodeCache::bytes_allocated_in_freelists() {
   size_t allocated_bytes = 0;
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_ALLOCABLE_HEAPS(heap) {
     allocated_bytes += (*heap)->allocated_in_freelist();
   }
   return allocated_bytes;
@@ -1015,7 +1021,7 @@ size_t CodeCache::bytes_allocated_in_freelists() {
 
 int CodeCache::allocated_segments() {
   int number_of_segments = 0;
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_ALLOCABLE_HEAPS(heap) {
     number_of_segments += (*heap)->allocated_segments();
   }
   return number_of_segments;
@@ -1023,7 +1029,7 @@ int CodeCache::allocated_segments() {
 
 size_t CodeCache::freelists_length() {
   size_t length = 0;
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_ALLOCABLE_HEAPS(heap) {
     length += (*heap)->freelist_length();
   }
   return length;
@@ -1211,7 +1217,7 @@ void CodeCache::make_marked_nmethods_not_entrant() {
   CompiledMethodIterator iter;
   while(iter.next_alive()) {
     CompiledMethod* nm = iter.method();
-    if (nm->is_marked_for_deoptimization()) {
+    if (nm->is_marked_for_deoptimization() && !nm->is_not_entrant()) {
       nm->make_not_entrant();
     }
   }
@@ -1354,7 +1360,7 @@ void CodeCache::report_codemem_full(int code_blob_type, bool print) {
 
 void CodeCache::print_memory_overhead() {
   size_t wasted_bytes = 0;
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_ALLOCABLE_HEAPS(heap) {
       CodeHeap* curr_heap = *heap;
       for (CodeBlob* cb = (CodeBlob*)curr_heap->first(); cb != NULL; cb = (CodeBlob*)curr_heap->next(cb)) {
         HeapBlock* heap_block = ((HeapBlock*)cb) - 1;
@@ -1400,7 +1406,7 @@ void CodeCache::print_internals() {
   ResourceMark rm;
 
   int i = 0;
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_ALLOCABLE_HEAPS(heap) {
     if ((_nmethod_heaps->length() >= 1) && Verbose) {
       tty->print_cr("-- %s --", (*heap)->name());
     }
@@ -1497,7 +1503,7 @@ void CodeCache::print() {
   CodeBlob_sizes live;
   CodeBlob_sizes dead;
 
-  FOR_ALL_NMETHOD_HEAPS(heap) {
+  FOR_ALL_ALLOCABLE_HEAPS(heap) {
     FOR_ALL_BLOBS(cb, *heap) {
       if (!cb->is_alive()) {
         dead.add(cb);
@@ -1523,7 +1529,7 @@ void CodeCache::print() {
     int number_of_blobs = 0;
     int number_of_oop_maps = 0;
     int map_size = 0;
-    FOR_ALL_NMETHOD_HEAPS(heap) {
+    FOR_ALL_ALLOCABLE_HEAPS(heap) {
       FOR_ALL_BLOBS(cb, *heap) {
         if (cb->is_alive()) {
           number_of_blobs++;
diff --git a/hotspot/src/share/vm/code/codeCache.hpp b/hotspot/src/share/vm/code/codeCache.hpp
index 99209dc3c66..e3b506b9a6a 100644
--- a/hotspot/src/share/vm/code/codeCache.hpp
+++ b/hotspot/src/share/vm/code/codeCache.hpp
@@ -85,6 +85,7 @@ class CodeCache : AllStatic {
   static GrowableArray* _heaps;
   static GrowableArray* _compiled_heaps;
   static GrowableArray* _nmethod_heaps;
+  static GrowableArray* _allocable_heaps;
 
   static address _low_bound;                            // Lower bound of CodeHeap addresses
   static address _high_bound;                           // Upper bound of CodeHeap addresses
@@ -237,6 +238,11 @@ class CodeCache : AllStatic {
     return type == CodeBlobType::All || type <= CodeBlobType::MethodProfiled;
   }
 
+  static bool code_blob_type_accepts_allocable(int type) {
+    return type <= CodeBlobType::All;
+  }
+
+
   // Returns the CodeBlobType for the given compilation level
   static int get_code_blob_type(int comp_level) {
     if (comp_level == CompLevel_none ||
@@ -304,11 +310,10 @@ template  class CodeBlobIterator : public StackObj {
     // If set to NULL, initialized by first call to next()
     _code_blob = (CodeBlob*)nm;
     if (nm != NULL) {
-      address start = nm->code_begin();
-      while(!(*_heap)->contains(start)) {
+      while(!(*_heap)->contains_blob(_code_blob)) {
         ++_heap;
       }
-      assert((*_heap)->contains(start), "match not found");
+      assert((*_heap)->contains_blob(_code_blob), "match not found");
     }
   }
 
diff --git a/hotspot/src/share/vm/code/nmethod.cpp b/hotspot/src/share/vm/code/nmethod.cpp
index 71420040970..f82872baf1c 100644
--- a/hotspot/src/share/vm/code/nmethod.cpp
+++ b/hotspot/src/share/vm/code/nmethod.cpp
@@ -1146,6 +1146,14 @@ bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
   assert(state == zombie || state == not_entrant, "must be zombie or not_entrant");
   assert(!is_zombie(), "should not already be a zombie");
 
+  if (_state == state) {
+    // Avoid taking the lock if already in required state.
+    // This is safe from races because the state is an end-state,
+    // which the nmethod cannot back out of once entered.
+    // No need for fencing either.
+    return false;
+  }
+
   // Make sure neither the nmethod nor the method is flushed in case of a safepoint in code below.
   nmethodLocker nml(this);
   methodHandle the_method(method());
diff --git a/hotspot/src/share/vm/code/relocInfo.cpp b/hotspot/src/share/vm/code/relocInfo.cpp
index d9c095e4413..03c706b9ac4 100644
--- a/hotspot/src/share/vm/code/relocInfo.cpp
+++ b/hotspot/src/share/vm/code/relocInfo.cpp
@@ -129,9 +129,9 @@ void RelocIterator::initialize(CompiledMethod* nm, address begin, address limit)
   if (nm == NULL && begin != NULL) {
     // allow nmethod to be deduced from beginning address
     CodeBlob* cb = CodeCache::find_blob(begin);
-    nm = cb->as_compiled_method_or_null();
+    nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL;
   }
-  assert(nm != NULL, "must be able to deduce nmethod from other arguments");
+  guarantee(nm != NULL, "must be able to deduce nmethod from other arguments");
 
   _code    = nm;
   _current = nm->relocation_begin() - 1;
diff --git a/hotspot/src/share/vm/compiler/compileBroker.cpp b/hotspot/src/share/vm/compiler/compileBroker.cpp
index 62433c1c088..df101a0a571 100644
--- a/hotspot/src/share/vm/compiler/compileBroker.cpp
+++ b/hotspot/src/share/vm/compiler/compileBroker.cpp
@@ -1557,7 +1557,7 @@ void CompileBroker::compiler_thread_loop() {
 
   // First thread to get here will initialize the compiler interface
 
-  if (!ciObjectFactory::is_initialized()) {
+  {
     ASSERT_IN_VM;
     MutexLocker only_one (CompileThread_lock, thread);
     if (!ciObjectFactory::is_initialized()) {
diff --git a/hotspot/src/share/vm/compiler/compilerDefinitions.cpp b/hotspot/src/share/vm/compiler/compilerDefinitions.cpp
index 00c2e64f851..bcec3ffa20d 100644
--- a/hotspot/src/share/vm/compiler/compilerDefinitions.cpp
+++ b/hotspot/src/share/vm/compiler/compilerDefinitions.cpp
@@ -100,7 +100,9 @@ void set_client_compilation_mode() {
     FLAG_SET_ERGO(size_t, MetaspaceSize, 12*M);
   }
   if (FLAG_IS_DEFAULT(MaxRAM)) {
-    FLAG_SET_ERGO(uint64_t, MaxRAM, 1ULL*G);
+    // Do not use FLAG_SET_ERGO to update MaxRAM, as this will impact
+    // heap setting done based on available phys_mem (see Arguments::set_heap_size).
+    FLAG_SET_DEFAULT(MaxRAM, 1ULL*G);
   }
   if (FLAG_IS_DEFAULT(CompileThreshold)) {
     FLAG_SET_ERGO(intx, CompileThreshold, 1500);
diff --git a/hotspot/src/share/vm/compiler/oopMap.cpp b/hotspot/src/share/vm/compiler/oopMap.cpp
index 378198ecb9b..fd94440d3f2 100644
--- a/hotspot/src/share/vm/compiler/oopMap.cpp
+++ b/hotspot/src/share/vm/compiler/oopMap.cpp
@@ -350,16 +350,14 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map,
         omv = oms.current();
         oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
         guarantee(loc != NULL, "missing saved register");
-        oop *base_loc    = fr->oopmapreg_to_location(omv.content_reg(), reg_map);
         oop *derived_loc = loc;
-        oop val = *base_loc;
-        if (val == (oop)NULL || Universe::is_narrow_oop_base(val)) {
-          // Ignore NULL oops and decoded NULL narrow oops which
-          // equal to Universe::narrow_oop_base when a narrow oop
-          // implicit null check is used in compiled code.
-          // The narrow_oop_base could be NULL or be the address
-          // of the page below heap depending on compressed oops mode.
-        } else {
+        oop *base_loc    = fr->oopmapreg_to_location(omv.content_reg(), reg_map);
+        // Ignore NULL oops and decoded NULL narrow oops which
+        // equal to Universe::narrow_oop_base when a narrow oop
+        // implicit null check is used in compiled code.
+        // The narrow_oop_base could be NULL or be the address
+        // of the page below heap depending on compressed oops mode.
+        if (base_loc != NULL && *base_loc != (oop)NULL && !Universe::is_narrow_oop_base(*base_loc)) {
           derived_oop_fn(base_loc, derived_loc);
         }
         oms.next();
diff --git a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp
index 7967d6cf001..6015b16c3e2 100644
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -711,29 +711,6 @@ void HeapRegionRemSet::setup_remset_size() {
   guarantee(G1RSetSparseRegionEntries > 0 && G1RSetRegionEntries > 0 , "Sanity");
 }
 
-#ifndef PRODUCT
-void HeapRegionRemSet::print() {
-  HeapRegionRemSetIterator iter(this);
-  size_t card_index;
-  while (iter.has_next(card_index)) {
-    HeapWord* card_start = _bot->address_for_index(card_index);
-    tty->print_cr("  Card " PTR_FORMAT, p2i(card_start));
-  }
-  if (iter.n_yielded() != occupied()) {
-    tty->print_cr("Yielded disagrees with occupied:");
-    tty->print_cr("  " SIZE_FORMAT_W(6) " yielded (" SIZE_FORMAT_W(6)
-                  " coarse, " SIZE_FORMAT_W(6) " fine).",
-                  iter.n_yielded(),
-                  iter.n_yielded_coarse(), iter.n_yielded_fine());
-    tty->print_cr("  " SIZE_FORMAT_W(6) " occ     (" SIZE_FORMAT_W(6)
-                           " coarse, " SIZE_FORMAT_W(6) " fine).",
-                  occupied(), occ_coarse(), occ_fine());
-  }
-  guarantee(iter.n_yielded() == occupied(),
-            "We should have yielded all the represented cards.");
-}
-#endif
-
 void HeapRegionRemSet::cleanup() {
   SparsePRT::cleanup_all();
 }
@@ -917,10 +894,6 @@ bool HeapRegionRemSetIterator::has_next(size_t& card_index) {
     // Otherwise...
     break;
   }
-  assert(ParallelGCThreads > 1 ||
-         n_yielded() == _hrrs->occupied(),
-         "Should have yielded all the cards in the rem set "
-         "(in the non-par case).");
   return false;
 }
 
diff --git a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp
index 7f740b692c8..97c7e0643ea 100644
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -290,8 +290,6 @@ public:
   // consumed by the strong code roots.
   size_t strong_code_roots_mem_size();
 
-  void print() PRODUCT_RETURN;
-
   // Called during a stop-world phase to perform any deferred cleanups.
   static void cleanup();
 
diff --git a/hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp b/hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp
index 48eb3c4163d..e300f8c2309 100644
--- a/hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp
+++ b/hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp
@@ -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
@@ -54,8 +54,26 @@ GCTaskThread::~GCTaskThread() {
   }
 }
 
+void GCTaskThread::add_task_timestamp(const char* name, jlong t_entry, jlong t_exit) {
+  if (_time_stamp_index < GCTaskTimeStampEntries) {
+    GCTaskTimeStamp* time_stamp = time_stamp_at(_time_stamp_index);
+    time_stamp->set_name(name);
+    time_stamp->set_entry_time(t_entry);
+    time_stamp->set_exit_time(t_exit);
+  } else {
+    if (_time_stamp_index ==  GCTaskTimeStampEntries) {
+      log_warning(gc, task, time)("GC-thread %u: Too many timestamps, ignoring future ones. "
+                                  "Increase GCTaskTimeStampEntries to get more info.",
+                                  id());
+    }
+    // Let _time_stamp_index keep counting to give the user an idea about how many
+    // are needed.
+  }
+  _time_stamp_index++;
+}
+
 GCTaskTimeStamp* GCTaskThread::time_stamp_at(uint index) {
-  guarantee(index < GCTaskTimeStampEntries, "increase GCTaskTimeStampEntries");
+  assert(index < GCTaskTimeStampEntries, "Precondition");
   if (_time_stamps == NULL) {
     // We allocate the _time_stamps array lazily since logging can be enabled dynamically
     GCTaskTimeStamp* time_stamps = NEW_C_HEAP_ARRAY(GCTaskTimeStamp, GCTaskTimeStampEntries, mtGC);
@@ -65,7 +83,6 @@ GCTaskTimeStamp* GCTaskThread::time_stamp_at(uint index) {
       FREE_C_HEAP_ARRAY(GCTaskTimeStamp, time_stamps);
     }
   }
-
   return &(_time_stamps[index]);
 }
 
@@ -75,8 +92,11 @@ void GCTaskThread::print_task_time_stamps() {
   // Since _time_stamps is now lazily allocated we need to check that it
   // has in fact been allocated when calling this function.
   if (_time_stamps != NULL) {
-    log_debug(gc, task, time)("GC-Thread %u entries: %d", id(), _time_stamp_index);
-    for(uint i=0; i<_time_stamp_index; i++) {
+    log_debug(gc, task, time)("GC-Thread %u entries: %d%s", id(),
+                              _time_stamp_index,
+                              _time_stamp_index >= GCTaskTimeStampEntries ? " (overflow)" : "");
+    const uint max_index = MIN2(_time_stamp_index, GCTaskTimeStampEntries);
+    for (uint i = 0; i < max_index; i++) {
       GCTaskTimeStamp* time_stamp = time_stamp_at(i);
       log_debug(gc, task, time)("\t[ %s " JLONG_FORMAT " " JLONG_FORMAT " ]",
                                 time_stamp->name(),
@@ -144,16 +164,7 @@ void GCTaskThread::run() {
 
         if (log_is_enabled(Debug, gc, task, time)) {
           timer.update();
-
-          GCTaskTimeStamp* time_stamp = time_stamp_at(_time_stamp_index);
-
-          time_stamp->set_name(name);
-          time_stamp->set_entry_time(entry_time);
-          time_stamp->set_exit_time(timer.ticks());
-
-          // Update the index after we have set up the entry correctly since
-          // GCTaskThread::print_task_time_stamps() may read this value concurrently.
-          _time_stamp_index++;
+          add_task_timestamp(name, entry_time, timer.ticks());
         }
       } else {
         // idle tasks complete outside the normal accounting
diff --git a/hotspot/src/share/vm/gc/parallel/gcTaskThread.hpp b/hotspot/src/share/vm/gc/parallel/gcTaskThread.hpp
index 59e6286f26e..d4fbe4b96b7 100644
--- a/hotspot/src/share/vm/gc/parallel/gcTaskThread.hpp
+++ b/hotspot/src/share/vm/gc/parallel/gcTaskThread.hpp
@@ -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
@@ -45,6 +45,7 @@ private:
   uint _time_stamp_index;
 
   GCTaskTimeStamp* time_stamp_at(uint index);
+  void add_task_timestamp(const char* name, jlong t_entry, jlong t_exit);
 
   bool _is_working;                     // True if participating in GC tasks
 
@@ -92,16 +93,16 @@ class GCTaskTimeStamp : public CHeapObj
  private:
   jlong  _entry_time;
   jlong  _exit_time;
-  char*  _name;
+  const char*  _name;
 
  public:
   jlong entry_time()              { return _entry_time; }
   jlong exit_time()               { return _exit_time; }
-  const char* name() const        { return (const char*)_name; }
+  const char* name() const        { return _name; }
 
   void set_entry_time(jlong time) { _entry_time = time; }
   void set_exit_time(jlong time)  { _exit_time = time; }
-  void set_name(char* name)       { _name = name; }
+  void set_name(const char* name) { _name = name; }
 };
 
 #endif // SHARE_VM_GC_PARALLEL_GCTASKTHREAD_HPP
diff --git a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
index 573529f8cec..d053786f031 100644
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
@@ -720,7 +720,8 @@ void InterpreterRuntime::resolve_invoke(JavaThread* thread, Bytecodes::Code byte
   Thread* THREAD = thread;
   // extract receiver from the outgoing argument list if necessary
   Handle receiver(thread, NULL);
-  if (bytecode == Bytecodes::_invokevirtual || bytecode == Bytecodes::_invokeinterface) {
+  if (bytecode == Bytecodes::_invokevirtual || bytecode == Bytecodes::_invokeinterface ||
+      bytecode == Bytecodes::_invokespecial) {
     ResourceMark rm(thread);
     methodHandle m (thread, method(thread));
     Bytecode_invoke call(m, bci(thread));
@@ -783,16 +784,25 @@ void InterpreterRuntime::resolve_invoke(JavaThread* thread, Bytecodes::Code byte
       int index = info.resolved_method()->itable_index();
       assert(info.itable_index() == index, "");
     }
+  } else if (bytecode == Bytecodes::_invokespecial) {
+    assert(info.call_kind() == CallInfo::direct_call, "must be direct call");
   } else {
     assert(info.call_kind() == CallInfo::direct_call ||
            info.call_kind() == CallInfo::vtable_call, "");
   }
 #endif
+  // Get sender or sender's host_klass, and only set cpCache entry to resolved if
+  // it is not an interface.  The receiver for invokespecial calls within interface
+  // methods must be checked for every call.
+  InstanceKlass* sender = pool->pool_holder();
+  sender = sender->is_anonymous() ? sender->host_klass() : sender;
+
   switch (info.call_kind()) {
   case CallInfo::direct_call:
     cp_cache_entry->set_direct_call(
       bytecode,
-      info.resolved_method());
+      info.resolved_method(),
+      sender->is_interface());
     break;
   case CallInfo::vtable_call:
     cp_cache_entry->set_vtable_call(
diff --git a/hotspot/src/share/vm/interpreter/linkResolver.cpp b/hotspot/src/share/vm/interpreter/linkResolver.cpp
index b062f2cc4bd..d7ae64effe6 100644
--- a/hotspot/src/share/vm/interpreter/linkResolver.cpp
+++ b/hotspot/src/share/vm/interpreter/linkResolver.cpp
@@ -1057,12 +1057,14 @@ methodHandle LinkResolver::linktime_resolve_static_method(const LinkInfo& link_i
 
 
 void LinkResolver::resolve_special_call(CallInfo& result,
+                                        Handle recv,
                                         const LinkInfo& link_info,
                                         TRAPS) {
   methodHandle resolved_method = linktime_resolve_special_method(link_info, CHECK);
   runtime_resolve_special_method(result, resolved_method,
                                  link_info.resolved_klass(),
                                  link_info.current_klass(),
+                                 recv,
                                  link_info.check_access(), CHECK);
 }
 
@@ -1149,6 +1151,7 @@ void LinkResolver::runtime_resolve_special_method(CallInfo& result,
                                                   const methodHandle& resolved_method,
                                                   KlassHandle resolved_klass,
                                                   KlassHandle current_klass,
+                                                  Handle recv,
                                                   bool check_access, TRAPS) {
 
   // resolved method is selected method unless we have an old-style lookup
@@ -1157,21 +1160,19 @@ void LinkResolver::runtime_resolve_special_method(CallInfo& result,
   // no checks for shadowing
   methodHandle sel_method(THREAD, resolved_method());
 
-  // check if this is an old-style super call and do a new lookup if so
-  { KlassHandle method_klass  = KlassHandle(THREAD,
-                                            resolved_method->method_holder());
+  if (check_access &&
+      // check if the method is not 
+      resolved_method->name() != vmSymbols::object_initializer_name()) {
 
-    if (check_access &&
+  // check if this is an old-style super call and do a new lookup if so
         // a) check if ACC_SUPER flag is set for the current class
-        (current_klass->is_super() || !AllowNonVirtualCalls) &&
+    if ((current_klass->is_super() || !AllowNonVirtualCalls) &&
         // b) check if the class of the resolved_klass is a superclass
         // (not supertype in order to exclude interface classes) of the current class.
         // This check is not performed for super.invoke for interface methods
         // in super interfaces.
         current_klass->is_subclass_of(resolved_klass()) &&
-        current_klass() != resolved_klass() &&
-        // c) check if the method is not 
-        resolved_method->name() != vmSymbols::object_initializer_name()) {
+        current_klass() != resolved_klass()) {
       // Lookup super method
       KlassHandle super_klass(THREAD, current_klass->super());
       sel_method = lookup_instance_method_in_klasses(super_klass,
@@ -1186,6 +1187,27 @@ void LinkResolver::runtime_resolve_special_method(CallInfo& result,
                                             resolved_method->signature()));
       }
     }
+
+    // Check that the class of objectref (the receiver) is the current class or interface,
+    // or a subtype of the current class or interface (the sender), otherwise invokespecial
+    // throws IllegalAccessError.
+    // The verifier checks that the sender is a subtype of the class in the I/MR operand.
+    // The verifier also checks that the receiver is a subtype of the sender, if the sender is
+    // a class.  If the sender is an interface, the check has to be performed at runtime.
+    InstanceKlass* sender = InstanceKlass::cast(current_klass());
+    sender = sender->is_anonymous() ? sender->host_klass() : sender;
+    if (sender->is_interface() && recv.not_null()) {
+      Klass* receiver_klass = recv->klass();
+      if (!receiver_klass->is_subtype_of(sender)) {
+        ResourceMark rm(THREAD);
+        char buf[500];
+        jio_snprintf(buf, sizeof(buf),
+                     "Receiver class %s must be the current class or a subtype of interface %s",
+                     receiver_klass->name()->as_C_string(),
+                     sender->name()->as_C_string());
+        THROW_MSG(vmSymbols::java_lang_IllegalAccessError(), buf);
+      }
+    }
   }
 
   // check if not static
@@ -1518,7 +1540,7 @@ methodHandle LinkResolver::resolve_static_call_or_null(const LinkInfo& link_info
 methodHandle LinkResolver::resolve_special_call_or_null(const LinkInfo& link_info) {
   EXCEPTION_MARK;
   CallInfo info;
-  resolve_special_call(info, link_info, THREAD);
+  resolve_special_call(info, Handle(), link_info, THREAD);
   if (HAS_PENDING_EXCEPTION) {
     CLEAR_PENDING_EXCEPTION;
     return methodHandle();
@@ -1534,7 +1556,7 @@ methodHandle LinkResolver::resolve_special_call_or_null(const LinkInfo& link_inf
 void LinkResolver::resolve_invoke(CallInfo& result, Handle recv, const constantPoolHandle& pool, int index, Bytecodes::Code byte, TRAPS) {
   switch (byte) {
     case Bytecodes::_invokestatic   : resolve_invokestatic   (result,       pool, index, CHECK); break;
-    case Bytecodes::_invokespecial  : resolve_invokespecial  (result,       pool, index, CHECK); break;
+    case Bytecodes::_invokespecial  : resolve_invokespecial  (result, recv, pool, index, CHECK); break;
     case Bytecodes::_invokevirtual  : resolve_invokevirtual  (result, recv, pool, index, CHECK); break;
     case Bytecodes::_invokehandle   : resolve_invokehandle   (result,       pool, index, CHECK); break;
     case Bytecodes::_invokedynamic  : resolve_invokedynamic  (result,       pool, index, CHECK); break;
@@ -1563,7 +1585,7 @@ void LinkResolver::resolve_invoke(CallInfo& result, Handle& recv,
       resolve_static_call(result, link_info, /*initialize_class=*/false, CHECK);
       break;
     case Bytecodes::_invokespecial:
-      resolve_special_call(result, link_info, CHECK);
+      resolve_special_call(result, recv, link_info, CHECK);
       break;
     default:
       fatal("bad call: %s", Bytecodes::name(byte));
@@ -1576,9 +1598,10 @@ void LinkResolver::resolve_invokestatic(CallInfo& result, const constantPoolHand
 }
 
 
-void LinkResolver::resolve_invokespecial(CallInfo& result, const constantPoolHandle& pool, int index, TRAPS) {
+void LinkResolver::resolve_invokespecial(CallInfo& result, Handle recv,
+                                         const constantPoolHandle& pool, int index, TRAPS) {
   LinkInfo link_info(pool, index, CHECK);
-  resolve_special_call(result, link_info, CHECK);
+  resolve_special_call(result, recv, link_info, CHECK);
 }
 
 
diff --git a/hotspot/src/share/vm/interpreter/linkResolver.hpp b/hotspot/src/share/vm/interpreter/linkResolver.hpp
index 1c02898b42d..2f14496bb01 100644
--- a/hotspot/src/share/vm/interpreter/linkResolver.hpp
+++ b/hotspot/src/share/vm/interpreter/linkResolver.hpp
@@ -230,6 +230,7 @@ class LinkResolver: AllStatic {
                                                  const methodHandle& resolved_method,
                                                  KlassHandle resolved_klass,
                                                  KlassHandle current_klass,
+                                                 Handle recv,
                                                  bool check_access, TRAPS);
   static void runtime_resolve_virtual_method    (CallInfo& result,
                                                  const methodHandle& resolved_method,
@@ -256,7 +257,7 @@ class LinkResolver: AllStatic {
   // runtime resolving from constant pool
   static void resolve_invokestatic   (CallInfo& result,
                                       const constantPoolHandle& pool, int index, TRAPS);
-  static void resolve_invokespecial  (CallInfo& result,
+  static void resolve_invokespecial  (CallInfo& result, Handle recv,
                                       const constantPoolHandle& pool, int index, TRAPS);
   static void resolve_invokevirtual  (CallInfo& result, Handle recv,
                                       const constantPoolHandle& pool, int index, TRAPS);
@@ -289,6 +290,7 @@ class LinkResolver: AllStatic {
                                      const LinkInfo& link_info,
                                      bool initialize_klass, TRAPS);
   static void resolve_special_call  (CallInfo& result,
+                                     Handle recv,
                                      const LinkInfo& link_info,
                                      TRAPS);
   static void resolve_virtual_call  (CallInfo& result, Handle recv, KlassHandle recv_klass,
diff --git a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
index 2fe6b45b79e..1e554a3f4b6 100644
--- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
+++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
@@ -53,8 +53,34 @@
 #include "runtime/vframe.hpp"
 #include "runtime/vframe_hp.hpp"
 #include "runtime/vmStructs.hpp"
+#include "utilities/resourceHash.hpp"
 
 
+void JNIHandleMark::push_jni_handle_block() {
+  JavaThread* thread = JavaThread::current();
+  if (thread != NULL) {
+    // Allocate a new block for JNI handles.
+    // Inlined code from jni_PushLocalFrame()
+    JNIHandleBlock* java_handles = ((JavaThread*)thread)->active_handles();
+    JNIHandleBlock* compile_handles = JNIHandleBlock::allocate_block(thread);
+    assert(compile_handles != NULL && java_handles != NULL, "should not be NULL");
+    compile_handles->set_pop_frame_link(java_handles);
+    thread->set_active_handles(compile_handles);
+  }
+}
+
+void JNIHandleMark::pop_jni_handle_block() {
+  JavaThread* thread = JavaThread::current();
+  if (thread != NULL) {
+    // Release our JNI handle block
+    JNIHandleBlock* compile_handles = thread->active_handles();
+    JNIHandleBlock* java_handles = compile_handles->pop_frame_link();
+    thread->set_active_handles(java_handles);
+    compile_handles->set_pop_frame_link(NULL);
+    JNIHandleBlock::release_block(compile_handles, thread); // may block
+  }
+}
+
 // Entry to native method implementation that transitions current thread to '_thread_in_vm'.
 #define C2V_VMENTRY(result_type, name, signature) \
   JNIEXPORT result_type JNICALL c2v_ ## name signature { \
@@ -88,6 +114,7 @@ oop CompilerToVM::get_jvmci_type(KlassHandle klass, TRAPS) {
   return NULL;
 }
 
+
 int CompilerToVM::Data::Klass_vtable_start_offset;
 int CompilerToVM::Data::Klass_vtable_length_offset;
 
@@ -120,6 +147,15 @@ int CompilerToVM::Data::cardtable_shift;
 
 int CompilerToVM::Data::vm_page_size;
 
+int CompilerToVM::Data::sizeof_vtableEntry = sizeof(vtableEntry);
+int CompilerToVM::Data::sizeof_ExceptionTableElement = sizeof(ExceptionTableElement);
+int CompilerToVM::Data::sizeof_LocalVariableTableElement = sizeof(LocalVariableTableElement);
+int CompilerToVM::Data::sizeof_ConstantPool = sizeof(ConstantPool);
+int CompilerToVM::Data::sizeof_SymbolPointer = sizeof(Symbol*);
+int CompilerToVM::Data::sizeof_narrowKlass = sizeof(narrowKlass);
+int CompilerToVM::Data::sizeof_arrayOopDesc = sizeof(arrayOopDesc);
+int CompilerToVM::Data::sizeof_BasicLock = sizeof(BasicLock);
+
 address CompilerToVM::Data::dsin;
 address CompilerToVM::Data::dcos;
 address CompilerToVM::Data::dtan;
@@ -128,7 +164,10 @@ address CompilerToVM::Data::dlog;
 address CompilerToVM::Data::dlog10;
 address CompilerToVM::Data::dpow;
 
-void CompilerToVM::Data::initialize() {
+address CompilerToVM::Data::symbol_init;
+address CompilerToVM::Data::symbol_clinit;
+
+void CompilerToVM::Data::initialize(TRAPS) {
   Klass_vtable_start_offset = in_bytes(Klass::vtable_start_offset());
   Klass_vtable_length_offset = in_bytes(Klass::vtable_length_offset());
 
@@ -160,6 +199,9 @@ void CompilerToVM::Data::initialize() {
   assert(OopMapValue::legal_vm_reg_name(VMRegImpl::stack2reg(max_oop_map_stack_index)), "should be valid");
   assert(!OopMapValue::legal_vm_reg_name(VMRegImpl::stack2reg(max_oop_map_stack_index + 1)), "should be invalid");
 
+  symbol_init = (address) vmSymbols::object_initializer_name();
+  symbol_clinit = (address) vmSymbols::class_initializer_name();
+
   BarrierSet* bs = Universe::heap()->barrier_set();
   switch (bs->kind()) {
   case BarrierSet::CardTableModRef:
@@ -179,7 +221,7 @@ void CompilerToVM::Data::initialize() {
     // No post barriers
     break;
   default:
-    ShouldNotReachHere();
+    JVMCI_ERROR("Unsupported BarrierSet kind %d", bs->kind());
     break;
   }
 
@@ -237,13 +279,114 @@ objArrayHandle CompilerToVM::initialize_intrinsics(TRAPS) {
   return vmIntrinsics;
 }
 
-C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
-#define BOXED_LONG(name, value) oop name; do { jvalue p; p.j = (jlong) (value); name = java_lang_boxing_object::create(T_LONG, &p, CHECK_NULL);} while(0)
+/**
+ * The set of VM flags known to be used.
+ */
+#define PREDEFINED_CONFIG_FLAGS(do_bool_flag, do_intx_flag, do_uintx_flag) \
+  do_intx_flag(AllocateInstancePrefetchLines)                              \
+  do_intx_flag(AllocatePrefetchDistance)                                   \
+  do_intx_flag(AllocatePrefetchInstr)                                      \
+  do_intx_flag(AllocatePrefetchLines)                                      \
+  do_intx_flag(AllocatePrefetchStepSize)                                   \
+  do_intx_flag(AllocatePrefetchStyle)                                      \
+  do_intx_flag(BciProfileWidth)                                            \
+  do_bool_flag(BootstrapJVMCI)                                             \
+  do_bool_flag(CITime)                                                     \
+  do_bool_flag(CITimeEach)                                                 \
+  do_uintx_flag(CodeCacheSegmentSize)                                      \
+  do_intx_flag(CodeEntryAlignment)                                         \
+  do_bool_flag(CompactFields)                                              \
+  NOT_PRODUCT(do_intx_flag(CompileTheWorldStartAt))                        \
+  NOT_PRODUCT(do_intx_flag(CompileTheWorldStopAt))                         \
+  do_intx_flag(ContendedPaddingWidth)                                      \
+  do_bool_flag(DontCompileHugeMethods)                                     \
+  do_bool_flag(EnableContended)                                            \
+  do_intx_flag(FieldsAllocationStyle)                                      \
+  do_bool_flag(FoldStableValues)                                           \
+  do_bool_flag(ForceUnreachable)                                           \
+  do_intx_flag(HugeMethodLimit)                                            \
+  do_bool_flag(Inline)                                                     \
+  do_intx_flag(JVMCICounterSize)                                           \
+  do_bool_flag(JVMCIPrintProperties)                                       \
+  do_bool_flag(JVMCIUseFastLocking)                                        \
+  do_intx_flag(MethodProfileWidth)                                         \
+  do_intx_flag(ObjectAlignmentInBytes)                                     \
+  do_bool_flag(PrintInlining)                                              \
+  do_bool_flag(ReduceInitialCardMarks)                                     \
+  do_bool_flag(RestrictContended)                                          \
+  do_intx_flag(StackReservedPages)                                         \
+  do_intx_flag(StackShadowPages)                                           \
+  do_bool_flag(TLABStats)                                                  \
+  do_uintx_flag(TLABWasteIncrement)                                        \
+  do_intx_flag(TypeProfileWidth)                                           \
+  do_bool_flag(UseAESIntrinsics)                                           \
+  X86_ONLY(do_intx_flag(UseAVX))                                           \
+  do_bool_flag(UseBiasedLocking)                                           \
+  do_bool_flag(UseCRC32Intrinsics)                                         \
+  do_bool_flag(UseCompressedClassPointers)                                 \
+  do_bool_flag(UseCompressedOops)                                          \
+  do_bool_flag(UseConcMarkSweepGC)                                         \
+  X86_ONLY(do_bool_flag(UseCountLeadingZerosInstruction))                  \
+  X86_ONLY(do_bool_flag(UseCountTrailingZerosInstruction))                 \
+  do_bool_flag(UseG1GC)                                                    \
+  COMPILER2_PRESENT(do_bool_flag(UseMontgomeryMultiplyIntrinsic))          \
+  COMPILER2_PRESENT(do_bool_flag(UseMontgomerySquareIntrinsic))            \
+  COMPILER2_PRESENT(do_bool_flag(UseMulAddIntrinsic))                      \
+  COMPILER2_PRESENT(do_bool_flag(UseMultiplyToLenIntrinsic))               \
+  do_bool_flag(UsePopCountInstruction)                                     \
+  do_bool_flag(UseSHA1Intrinsics)                                          \
+  do_bool_flag(UseSHA256Intrinsics)                                        \
+  do_bool_flag(UseSHA512Intrinsics)                                        \
+  do_intx_flag(UseSSE)                                                     \
+  COMPILER2_PRESENT(do_bool_flag(UseSquareToLenIntrinsic))                 \
+  do_bool_flag(UseStackBanging)                                            \
+  do_bool_flag(UseTLAB)                                                    \
+  do_bool_flag(VerifyOops)                                                 \
+
+#define BOXED_BOOLEAN(name, value) oop name = ((jboolean)(value) ? boxedTrue() : boxedFalse())
 #define BOXED_DOUBLE(name, value) oop name; do { jvalue p; p.d = (jdouble) (value); name = java_lang_boxing_object::create(T_DOUBLE, &p, CHECK_NULL);} while(0)
+#define BOXED_LONG(name, value) \
+  oop name; \
+  do { \
+    jvalue p; p.j = (jlong) (value); \
+    Handle* e = longs.get(p.j); \
+    if (e == NULL) { \
+      Handle h = java_lang_boxing_object::create(T_LONG, &p, CHECK_NULL); \
+      longs.put(p.j, h); \
+      name = h(); \
+    } else { \
+      name = (*e)(); \
+    } \
+  } while (0)
+
+#define CSTRING_TO_JSTRING(name, value) \
+  Handle name; \
+  do { \
+    if (value != NULL) { \
+      Handle* e = strings.get(value); \
+      if (e == NULL) { \
+        Handle h = java_lang_String::create_from_str(value, CHECK_NULL); \
+        strings.put(value, h); \
+        name = h(); \
+      } else { \
+        name = (*e)(); \
+      } \
+    } \
+  } while (0)
+
+C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
   ResourceMark rm;
   HandleMark hm;
 
-  CompilerToVM::Data::initialize();
+  // Used to canonicalize Long and String values.
+  ResourceHashtable longs;
+  ResourceHashtable strings;
+
+  jvalue prim;
+  prim.z = true;  Handle boxedTrue =  java_lang_boxing_object::create(T_BOOLEAN, &prim, CHECK_NULL);
+  prim.z = false; Handle boxedFalse = java_lang_boxing_object::create(T_BOOLEAN, &prim, CHECK_NULL);
+
+  CompilerToVM::Data::initialize(CHECK_NULL);
 
   VMField::klass()->initialize(CHECK_NULL);
   VMFlag::klass()->initialize(CHECK_NULL);
@@ -257,31 +400,31 @@ C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
     size_t name_buf_len = strlen(vmField.typeName) + strlen(vmField.fieldName) + 2 /* "::" */;
     char* name_buf = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, name_buf_len + 1);
     sprintf(name_buf, "%s::%s", vmField.typeName, vmField.fieldName);
-    Handle name = java_lang_String::create_from_str(name_buf, CHECK_NULL);
-    Handle type = java_lang_String::create_from_str(vmField.typeString, CHECK_NULL);
+    CSTRING_TO_JSTRING(name, name_buf);
+    CSTRING_TO_JSTRING(type, vmField.typeString);
     VMField::set_name(vmFieldObj, name());
     VMField::set_type(vmFieldObj, type());
     VMField::set_offset(vmFieldObj, vmField.offset);
     VMField::set_address(vmFieldObj, (jlong) vmField.address);
-    if (vmField.isStatic) {
+    if (vmField.isStatic && vmField.typeString != NULL) {
       if (strcmp(vmField.typeString, "bool") == 0) {
-        BOXED_LONG(value, *(jbyte*) vmField.address);
-        VMField::set_value(vmFieldObj, value);
+        BOXED_BOOLEAN(box, *(jbyte*) vmField.address);
+        VMField::set_value(vmFieldObj, box);
       } else if (strcmp(vmField.typeString, "int") == 0 ||
                  strcmp(vmField.typeString, "jint") == 0) {
-        BOXED_LONG(value, *(jint*) vmField.address);
-        VMField::set_value(vmFieldObj, value);
+        BOXED_LONG(box, *(jint*) vmField.address);
+        VMField::set_value(vmFieldObj, box);
       } else if (strcmp(vmField.typeString, "uint64_t") == 0) {
-        BOXED_LONG(value, *(uint64_t*) vmField.address);
-        VMField::set_value(vmFieldObj, value);
+        BOXED_LONG(box, *(uint64_t*) vmField.address);
+        VMField::set_value(vmFieldObj, box);
       } else if (strcmp(vmField.typeString, "address") == 0 ||
                  strcmp(vmField.typeString, "intptr_t") == 0 ||
                  strcmp(vmField.typeString, "uintptr_t") == 0 ||
                  strcmp(vmField.typeString, "size_t") == 0 ||
                  // All foo* types are addresses.
                  vmField.typeString[strlen(vmField.typeString) - 1] == '*') {
-        BOXED_LONG(value, *((address*) vmField.address));
-        VMField::set_value(vmFieldObj, value);
+        BOXED_LONG(box, *((address*) vmField.address));
+        VMField::set_value(vmFieldObj, box);
       } else {
         JVMCI_ERROR_NULL("VM field %s has unsupported type %s", name_buf, vmField.typeString);
       }
@@ -289,16 +432,6 @@ C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
     vmFields->obj_at_put(i, vmFieldObj());
   }
 
-  len = JVMCIVMStructs::localHotSpotVMTypes_count();
-  objArrayHandle vmTypes = oopFactory::new_objArray(SystemDictionary::Object_klass(), len * 2, CHECK_NULL);
-  for (int i = 0; i < len ; i++) {
-    VMTypeEntry vmType = JVMCIVMStructs::localHotSpotVMTypes[i];
-    Handle name = java_lang_String::create_from_str(vmType.typeName, CHECK_NULL);
-    BOXED_LONG(size, vmType.size);
-    vmTypes->obj_at_put(i * 2, name());
-    vmTypes->obj_at_put(i * 2 + 1, size);
-  }
-
   int ints_len = JVMCIVMStructs::localHotSpotVMIntConstants_count();
   int longs_len = JVMCIVMStructs::localHotSpotVMLongConstants_count();
   len = ints_len + longs_len;
@@ -306,14 +439,14 @@ C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
   int insert = 0;
   for (int i = 0; i < ints_len ; i++) {
     VMIntConstantEntry c = JVMCIVMStructs::localHotSpotVMIntConstants[i];
-    Handle name = java_lang_String::create_from_str(c.name, CHECK_NULL);
+    CSTRING_TO_JSTRING(name, c.name);
     BOXED_LONG(value, c.value);
     vmConstants->obj_at_put(insert++, name());
     vmConstants->obj_at_put(insert++, value);
   }
   for (int i = 0; i < longs_len ; i++) {
     VMLongConstantEntry c = JVMCIVMStructs::localHotSpotVMLongConstants[i];
-    Handle name = java_lang_String::create_from_str(c.name, CHECK_NULL);
+    CSTRING_TO_JSTRING(name, c.name);
     BOXED_LONG(value, c.value);
     vmConstants->obj_at_put(insert++, name());
     vmConstants->obj_at_put(insert++, value);
@@ -324,69 +457,104 @@ C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
   objArrayHandle vmAddresses = oopFactory::new_objArray(SystemDictionary::Object_klass(), len * 2, CHECK_NULL);
   for (int i = 0; i < len ; i++) {
     VMAddressEntry a = JVMCIVMStructs::localHotSpotVMAddresses[i];
-    Handle name = java_lang_String::create_from_str(a.name, CHECK_NULL);
+    CSTRING_TO_JSTRING(name, a.name);
     BOXED_LONG(value, a.value);
     vmAddresses->obj_at_put(i * 2, name());
     vmAddresses->obj_at_put(i * 2 + 1, value);
   }
 
-  // The last entry is the null entry.
-  len = (int) Flag::numFlags - 1;
+#define COUNT_FLAG(ignore) +1
+#ifdef ASSERT
+#define CHECK_FLAG(type, name) { \
+  Flag* flag = Flag::find_flag(#name, strlen(#name), /*allow_locked*/ true, /* return_flag */ true); \
+  assert(flag != NULL, "No such flag named " #name); \
+  assert(flag->is_##type(), "Flag " #name " is not of type " #type); \
+}
+#else
+#define CHECK_FLAG(type, name)
+#endif
+
+#define ADD_FLAG(type, name, convert) { \
+  CHECK_FLAG(type, name) \
+  instanceHandle vmFlagObj = InstanceKlass::cast(VMFlag::klass())->allocate_instance_handle(CHECK_NULL); \
+  CSTRING_TO_JSTRING(fname, #name); \
+  CSTRING_TO_JSTRING(ftype, #type); \
+  VMFlag::set_name(vmFlagObj, fname()); \
+  VMFlag::set_type(vmFlagObj, ftype()); \
+  convert(value, name); \
+  VMFlag::set_value(vmFlagObj, value); \
+  vmFlags->obj_at_put(i++, vmFlagObj()); \
+}
+#define ADD_BOOL_FLAG(name)  ADD_FLAG(bool, name, BOXED_BOOLEAN)
+#define ADD_INTX_FLAG(name)  ADD_FLAG(intx, name, BOXED_LONG)
+#define ADD_UINTX_FLAG(name) ADD_FLAG(uintx, name, BOXED_LONG)
+
+  len = 0 + PREDEFINED_CONFIG_FLAGS(COUNT_FLAG, COUNT_FLAG, COUNT_FLAG);
   objArrayHandle vmFlags = oopFactory::new_objArray(VMFlag::klass(), len, CHECK_NULL);
-  for (int i = 0; i < len; i++) {
-    Flag* flag = &Flag::flags[i];
-    instanceHandle vmFlagObj = InstanceKlass::cast(VMFlag::klass())->allocate_instance_handle(CHECK_NULL);
-    Handle name = java_lang_String::create_from_str(flag->_name, CHECK_NULL);
-    Handle type = java_lang_String::create_from_str(flag->_type, CHECK_NULL);
-    VMFlag::set_name(vmFlagObj, name());
-    VMFlag::set_type(vmFlagObj, type());
-    if (flag->is_bool()) {
-      BOXED_LONG(value, flag->get_bool());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_ccstr()) {
-      Handle value = java_lang_String::create_from_str(flag->get_ccstr(), CHECK_NULL);
-      VMFlag::set_value(vmFlagObj, value());
-    } else if (flag->is_int()) {
-      BOXED_LONG(value, flag->get_int());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_intx()) {
-      BOXED_LONG(value, flag->get_intx());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_uint()) {
-      BOXED_LONG(value, flag->get_uint());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_uint64_t()) {
-      BOXED_LONG(value, flag->get_uint64_t());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_uintx()) {
-      BOXED_LONG(value, flag->get_uintx());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_double()) {
-      BOXED_DOUBLE(value, flag->get_double());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_size_t()) {
-      BOXED_LONG(value, flag->get_size_t());
-      VMFlag::set_value(vmFlagObj, value);
-    } else {
-      JVMCI_ERROR_NULL("VM flag %s has unsupported type %s", flag->_name, flag->_type);
-    }
-    vmFlags->obj_at_put(i, vmFlagObj());
-  }
+  int i = 0;
+  PREDEFINED_CONFIG_FLAGS(ADD_BOOL_FLAG, ADD_INTX_FLAG, ADD_UINTX_FLAG)
 
   objArrayHandle vmIntrinsics = CompilerToVM::initialize_intrinsics(CHECK_NULL);
 
-  objArrayOop data = oopFactory::new_objArray(SystemDictionary::Object_klass(), 6, CHECK_NULL);
+  objArrayOop data = oopFactory::new_objArray(SystemDictionary::Object_klass(), 5, CHECK_NULL);
   data->obj_at_put(0, vmFields());
-  data->obj_at_put(1, vmTypes());
-  data->obj_at_put(2, vmConstants());
-  data->obj_at_put(3, vmAddresses());
-  data->obj_at_put(4, vmFlags());
-  data->obj_at_put(5, vmIntrinsics());
+  data->obj_at_put(1, vmConstants());
+  data->obj_at_put(2, vmAddresses());
+  data->obj_at_put(3, vmFlags());
+  data->obj_at_put(4, vmIntrinsics());
 
   return (jobjectArray) JNIHandles::make_local(THREAD, data);
+#undef COUNT_FLAG
+#undef ADD_FLAG
+#undef ADD_BOOL_FLAG
+#undef ADD_INTX_FLAG
+#undef ADD_UINTX_FLAG
+#undef CHECK_FLAG
+C2V_END
+
+C2V_VMENTRY(jobject, getFlagValue, (JNIEnv *, jobject c2vm, jobject name_handle))
+#define RETURN_BOXED_LONG(value) oop box; jvalue p; p.j = (jlong) (value); box = java_lang_boxing_object::create(T_LONG, &p, CHECK_NULL); return JNIHandles::make_local(THREAD, box);
+#define RETURN_BOXED_DOUBLE(value) oop box; jvalue p; p.d = (jdouble) (value); box = java_lang_boxing_object::create(T_DOUBLE, &p, CHECK_NULL); return JNIHandles::make_local(THREAD, box);
+  Handle name = JNIHandles::resolve(name_handle);
+  if (name.is_null()) {
+    THROW_0(vmSymbols::java_lang_NullPointerException());
+  }
+  ResourceMark rm;
+  const char* cstring = java_lang_String::as_utf8_string(name());
+  Flag* flag = Flag::find_flag(cstring, strlen(cstring), /* allow_locked */ true, /* return_flag */ true);
+  if (flag == NULL) {
+    return c2vm;
+  }
+  if (flag->is_bool()) {
+    jvalue prim;
+    prim.z = flag->get_bool();
+    oop box = java_lang_boxing_object::create(T_BOOLEAN, &prim, CHECK_NULL);
+    return JNIHandles::make_local(THREAD, box);
+  } else if (flag->is_ccstr()) {
+    Handle value = java_lang_String::create_from_str(flag->get_ccstr(), CHECK_NULL);
+    return JNIHandles::make_local(THREAD, value());
+  } else if (flag->is_intx()) {
+    RETURN_BOXED_LONG(flag->get_intx());
+  } else if (flag->is_int()) {
+    RETURN_BOXED_LONG(flag->get_int());
+  } else if (flag->is_uint()) {
+    RETURN_BOXED_LONG(flag->get_uint());
+  } else if (flag->is_uint64_t()) {
+    RETURN_BOXED_LONG(flag->get_uint64_t());
+  } else if (flag->is_size_t()) {
+    RETURN_BOXED_LONG(flag->get_size_t());
+  } else if (flag->is_uintx()) {
+    RETURN_BOXED_LONG(flag->get_uintx());
+  } else if (flag->is_double()) {
+    RETURN_BOXED_DOUBLE(flag->get_double());
+  } else {
+    JVMCI_ERROR_NULL("VM flag %s has unsupported type %s", flag->_name, flag->_type);
+  }
+C2V_END
+
 #undef BOXED_LONG
 #undef BOXED_DOUBLE
-C2V_END
+#undef CSTRING_TO_JSTRING
 
 C2V_VMENTRY(jbyteArray, getBytecode, (JNIEnv *, jobject, jobject jvmci_method))
   methodHandle method = CompilerToVM::asMethod(jvmci_method);
@@ -593,9 +761,7 @@ C2V_END
 
 C2V_VMENTRY(jboolean, isCompilable,(JNIEnv *, jobject, jobject jvmci_method))
   methodHandle method = CompilerToVM::asMethod(jvmci_method);
-  // Ignore the not_compilable flags in hosted mode since they are never set by
-  // the JVMCI compiler.
-  return UseJVMCICompiler || !method->is_not_compilable(CompLevel_full_optimization);
+  return !method->is_not_compilable(CompLevel_full_optimization);
 C2V_END
 
 C2V_VMENTRY(jboolean, hasNeverInlineDirective,(JNIEnv *, jobject, jobject jvmci_method))
@@ -743,7 +909,7 @@ C2V_VMENTRY(jint, constantPoolRemapInstructionOperandFromCache, (JNIEnv*, jobjec
   return cp->remap_instruction_operand_from_cache(index);
 C2V_END
 
-C2V_VMENTRY(jobject, resolveFieldInPool, (JNIEnv*, jobject, jobject jvmci_constant_pool, jint index, jobject jvmci_method, jbyte opcode, jlongArray info_handle))
+C2V_VMENTRY(jobject, resolveFieldInPool, (JNIEnv*, jobject, jobject jvmci_constant_pool, jint index, jobject jvmci_method, jbyte opcode, jintArray info_handle))
   ResourceMark rm;
   constantPoolHandle cp = CompilerToVM::asConstantPool(jvmci_constant_pool);
   Bytecodes::Code code = (Bytecodes::Code)(((int) opcode) & 0xFF);
@@ -751,9 +917,12 @@ C2V_VMENTRY(jobject, resolveFieldInPool, (JNIEnv*, jobject, jobject jvmci_consta
   LinkInfo link_info(cp, index, (jvmci_method != NULL) ? CompilerToVM::asMethod(jvmci_method) : NULL, CHECK_0);
   LinkResolver::resolve_field(fd, link_info, Bytecodes::java_code(code), false, CHECK_0);
   typeArrayOop info = (typeArrayOop) JNIHandles::resolve(info_handle);
-  assert(info != NULL && info->length() == 2, "must be");
-  info->long_at_put(0, (jlong) fd.access_flags().as_int());
-  info->long_at_put(1, (jlong) fd.offset());
+  if (info == NULL || info->length() != 3) {
+    JVMCI_ERROR_NULL("info must not be null and have a length of 3");
+  }
+  info->int_at_put(0, fd.access_flags().as_int());
+  info->int_at_put(1, fd.offset());
+  info->int_at_put(2, fd.index());
   oop field_holder = CompilerToVM::get_jvmci_type(fd.field_holder(), CHECK_NULL);
   return JNIHandles::make_local(THREAD, field_holder);
 C2V_END
@@ -842,6 +1011,8 @@ C2V_END
 C2V_VMENTRY(jint, installCode, (JNIEnv *jniEnv, jobject, jobject target, jobject compiled_code, jobject installed_code, jobject speculation_log))
   ResourceMark rm;
   HandleMark hm;
+  JNIHandleMark jni_hm;
+
   Handle target_handle = JNIHandles::resolve(target);
   Handle compiled_code_handle = JNIHandles::resolve(compiled_code);
   CodeBlob* cb = NULL;
@@ -1516,6 +1687,13 @@ C2V_VMENTRY(jlong, getFingerprint, (JNIEnv*, jobject, jlong metaspace_klass))
   }
 C2V_END
 
+C2V_VMENTRY(jobject, getHostClass, (JNIEnv*, jobject, jobject jvmci_type))
+  InstanceKlass* k = InstanceKlass::cast(CompilerToVM::asKlass(jvmci_type));
+  InstanceKlass* host = k->host_klass();
+  oop result = CompilerToVM::get_jvmci_type(host, CHECK_NULL);
+  return JNIHandles::make_local(THREAD, result);
+C2V_END
+
 C2V_VMENTRY(int, interpreterFrameSize, (JNIEnv*, jobject, jobject bytecode_frame_handle))
   if (bytecode_frame_handle == NULL) {
     THROW_0(vmSymbols::java_lang_NullPointerException());
@@ -1610,7 +1788,7 @@ JNINativeMethod CompilerToVM::methods[] = {
   {CC "resolveConstantInPool",                        CC "(" HS_CONSTANT_POOL "I)" OBJECT,                                                  FN_PTR(resolveConstantInPool)},
   {CC "resolvePossiblyCachedConstantInPool",          CC "(" HS_CONSTANT_POOL "I)" OBJECT,                                                  FN_PTR(resolvePossiblyCachedConstantInPool)},
   {CC "resolveTypeInPool",                            CC "(" HS_CONSTANT_POOL "I)" HS_RESOLVED_KLASS,                                       FN_PTR(resolveTypeInPool)},
-  {CC "resolveFieldInPool",                           CC "(" HS_CONSTANT_POOL "I" HS_RESOLVED_METHOD "B[J)" HS_RESOLVED_KLASS,              FN_PTR(resolveFieldInPool)},
+  {CC "resolveFieldInPool",                           CC "(" HS_CONSTANT_POOL "I" HS_RESOLVED_METHOD "B[I)" HS_RESOLVED_KLASS,              FN_PTR(resolveFieldInPool)},
   {CC "resolveInvokeDynamicInPool",                   CC "(" HS_CONSTANT_POOL "I)V",                                                        FN_PTR(resolveInvokeDynamicInPool)},
   {CC "resolveInvokeHandleInPool",                    CC "(" HS_CONSTANT_POOL "I)V",                                                        FN_PTR(resolveInvokeHandleInPool)},
   {CC "resolveMethod",                                CC "(" HS_RESOLVED_KLASS HS_RESOLVED_METHOD HS_RESOLVED_KLASS ")" HS_RESOLVED_METHOD, FN_PTR(resolveMethod)},
@@ -1646,8 +1824,10 @@ JNINativeMethod CompilerToVM::methods[] = {
   {CC "flushDebugOutput",                             CC "()V",                                                                             FN_PTR(flushDebugOutput)},
   {CC "methodDataProfileDataSize",                    CC "(JI)I",                                                                           FN_PTR(methodDataProfileDataSize)},
   {CC "getFingerprint",                               CC "(J)J",                                                                            FN_PTR(getFingerprint)},
+  {CC "getHostClass",                                 CC "(" HS_RESOLVED_KLASS ")" HS_RESOLVED_KLASS,                                       FN_PTR(getHostClass)},
   {CC "interpreterFrameSize",                         CC "(" BYTECODE_FRAME ")I",                                                           FN_PTR(interpreterFrameSize)},
   {CC "compileToBytecode",                            CC "(" OBJECT ")V",                                                                   FN_PTR(compileToBytecode)},
+  {CC "getFlagValue",                                 CC "(" STRING ")" OBJECT,                                                             FN_PTR(getFlagValue)},
 };
 
 int CompilerToVM::methods_count() {
diff --git a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp
index c0f21e2b8c2..036ffdd3249 100644
--- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp
+++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp
@@ -66,6 +66,15 @@ class CompilerToVM {
 
     static int vm_page_size;
 
+    static int sizeof_vtableEntry;
+    static int sizeof_ExceptionTableElement;
+    static int sizeof_LocalVariableTableElement;
+    static int sizeof_ConstantPool;
+    static int sizeof_SymbolPointer;
+    static int sizeof_narrowKlass;
+    static int sizeof_arrayOopDesc;
+    static int sizeof_BasicLock;
+
     static address dsin;
     static address dcos;
     static address dtan;
@@ -74,8 +83,11 @@ class CompilerToVM {
     static address dlog10;
     static address dpow;
 
+    static address symbol_init;
+    static address symbol_clinit;
+
    public:
-    static void initialize();
+    static void initialize(TRAPS);
 
     static int max_oop_map_stack_offset() {
       assert(_max_oop_map_stack_offset > 0, "must be initialized");
@@ -83,6 +95,20 @@ class CompilerToVM {
     }
   };
 
+  static bool cstring_equals(const char* const& s0, const char* const& s1) {
+    return strcmp(s0, s1) == 0;
+  }
+
+  static unsigned cstring_hash(const char* const& s) {
+    int h = 0;
+    const char* p = s;
+    while (*p != '\0') {
+      h = 31 * h + *p;
+      p++;
+    }
+    return h;
+  }
+
   static JNINativeMethod methods[];
 
   static objArrayHandle initialize_intrinsics(TRAPS);
@@ -180,4 +206,14 @@ class JavaArgumentUnboxer : public SignatureIterator {
   inline void do_void()                     { }
 };
 
+class JNIHandleMark : public StackObj {
+  public:
+    JNIHandleMark() { push_jni_handle_block(); }
+    ~JNIHandleMark() { pop_jni_handle_block(); }
+
+  private:
+    static void push_jni_handle_block();
+    static void pop_jni_handle_block();
+};
+
 #endif // SHARE_VM_JVMCI_JVMCI_COMPILER_TO_VM_HPP
diff --git a/hotspot/src/share/vm/jvmci/jvmciEnv.cpp b/hotspot/src/share/vm/jvmci/jvmciEnv.cpp
index 9c5d98361e0..8fb1e8cbdbf 100644
--- a/hotspot/src/share/vm/jvmci/jvmciEnv.cpp
+++ b/hotspot/src/share/vm/jvmci/jvmciEnv.cpp
@@ -283,13 +283,14 @@ void JVMCIEnv::get_field_by_index(instanceKlassHandle accessor, fieldDescriptor&
 // Perform an appropriate method lookup based on accessor, holder,
 // name, signature, and bytecode.
 methodHandle JVMCIEnv::lookup_method(instanceKlassHandle h_accessor,
-                               instanceKlassHandle h_holder,
+                               KlassHandle   h_holder,
                                Symbol*       name,
                                Symbol*       sig,
                                Bytecodes::Code bc,
                                constantTag   tag) {
-  JVMCI_EXCEPTION_CONTEXT;
-  LinkResolver::check_klass_accessability(h_accessor, h_holder, KILL_COMPILE_ON_FATAL_(NULL));
+  // Accessibility checks are performed in JVMCIEnv::get_method_by_index_impl().
+  assert(check_klass_accessibility(h_accessor, h_holder), "holder not accessible");
+
   methodHandle dest_method;
   LinkInfo link_info(h_holder, name, sig, h_accessor, LinkInfo::needs_access_check, tag);
   switch (bc) {
@@ -363,9 +364,8 @@ methodHandle JVMCIEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
   }
 
   if (holder_is_accessible) { // Our declared holder is loaded.
-    instanceKlassHandle lookup = get_instance_klass_for_declared_method_holder(holder);
     constantTag tag = cpool->tag_ref_at(index);
-    methodHandle m = lookup_method(accessor, lookup, name_sym, sig_sym, bc, tag);
+    methodHandle m = lookup_method(accessor, holder, name_sym, sig_sym, bc, tag);
     if (!m.is_null() &&
         (bc == Bytecodes::_invokestatic
          ?  InstanceKlass::cast(m->method_holder())->is_not_initialized()
diff --git a/hotspot/src/share/vm/jvmci/jvmciEnv.hpp b/hotspot/src/share/vm/jvmci/jvmciEnv.hpp
index 2c884494db8..1154a95d567 100644
--- a/hotspot/src/share/vm/jvmci/jvmciEnv.hpp
+++ b/hotspot/src/share/vm/jvmci/jvmciEnv.hpp
@@ -127,7 +127,7 @@ private:
   // Helper methods
   static bool       check_klass_accessibility(KlassHandle accessing_klass, KlassHandle resolved_klass);
   static methodHandle  lookup_method(instanceKlassHandle  accessor,
-                           instanceKlassHandle  holder,
+                           KlassHandle     holder,
                            Symbol*         name,
                            Symbol*         sig,
                            Bytecodes::Code bc,
diff --git a/hotspot/src/share/vm/jvmci/jvmciJavaClasses.hpp b/hotspot/src/share/vm/jvmci/jvmciJavaClasses.hpp
index d6039fca4a3..58764147efa 100644
--- a/hotspot/src/share/vm/jvmci/jvmciJavaClasses.hpp
+++ b/hotspot/src/share/vm/jvmci/jvmciJavaClasses.hpp
@@ -117,7 +117,7 @@ class JVMCIJavaClasses : AllStatic {
     oop_field(VMField, type, "Ljava/lang/String;")                                                                                                             \
     long_field(VMField, offset)                                                                                                                                \
     long_field(VMField, address)                                                                                                                               \
-    oop_field(VMField, value, "Ljava/lang/Long;")                                                                                                              \
+    oop_field(VMField, value, "Ljava/lang/Object;")                                                                                                            \
   end_class                                                                                                                                                    \
   start_class(VMFlag)                                                                                                                                          \
     oop_field(VMFlag, name, "Ljava/lang/String;")                                                                                                              \
diff --git a/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp b/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp
index a01651f55aa..0ce9816890a 100644
--- a/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp
+++ b/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp
@@ -78,6 +78,15 @@
                                                                                                                                      \
   static_field(CompilerToVM::Data,             vm_page_size,                           int)                                          \
                                                                                                                                      \
+  static_field(CompilerToVM::Data,             sizeof_vtableEntry,                     int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_ExceptionTableElement,           int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_LocalVariableTableElement,       int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_ConstantPool,                    int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_SymbolPointer,                   int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_narrowKlass,                     int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_arrayOopDesc,                    int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_BasicLock,                       int)                                          \
+                                                                                                                                     \
   static_field(CompilerToVM::Data,             dsin,                                   address)                                      \
   static_field(CompilerToVM::Data,             dcos,                                   address)                                      \
   static_field(CompilerToVM::Data,             dtan,                                   address)                                      \
@@ -86,6 +95,9 @@
   static_field(CompilerToVM::Data,             dlog10,                                 address)                                      \
   static_field(CompilerToVM::Data,             dpow,                                   address)                                      \
                                                                                                                                      \
+  static_field(CompilerToVM::Data,             symbol_init,                            address)                                      \
+  static_field(CompilerToVM::Data,             symbol_clinit,                          address)                                      \
+                                                                                                                                     \
   static_field(Abstract_VM_Version,            _features,                              uint64_t)                                     \
                                                                                                                                      \
   nonstatic_field(Array,                  _length,                                int)                                          \
diff --git a/hotspot/src/share/vm/logging/logTag.hpp b/hotspot/src/share/vm/logging/logTag.hpp
index e262d074cfa..322e9030112 100644
--- a/hotspot/src/share/vm/logging/logTag.hpp
+++ b/hotspot/src/share/vm/logging/logTag.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -82,7 +82,7 @@
   LOG_TAG(metadata) \
   LOG_TAG(metaspace) \
   LOG_TAG(mmu) \
-  LOG_TAG(modules) \
+  LOG_TAG(module) \
   LOG_TAG(monitorinflation) \
   LOG_TAG(monitormismatch) \
   LOG_TAG(nmethod) \
diff --git a/hotspot/src/share/vm/memory/heap.cpp b/hotspot/src/share/vm/memory/heap.cpp
index 9d2179d5cf7..8db869ca8ce 100644
--- a/hotspot/src/share/vm/memory/heap.cpp
+++ b/hotspot/src/share/vm/memory/heap.cpp
@@ -190,6 +190,10 @@ void* CodeHeap::allocate(size_t instance_size) {
   if (block != NULL) {
     assert(block->length() >= number_of_segments && block->length() < number_of_segments + CodeCacheMinBlockLength, "sanity check");
     assert(!block->free(), "must be marked free");
+    guarantee((char*) block >= _memory.low_boundary() && (char*) block < _memory.high(),
+              "The newly allocated block " INTPTR_FORMAT " is not within the heap "
+              "starting with "  INTPTR_FORMAT " and ending with "  INTPTR_FORMAT,
+              p2i(block), p2i(_memory.low_boundary()), p2i(_memory.high()));
     DEBUG_ONLY(memset((void*)block->allocated_space(), badCodeHeapNewVal, instance_size));
     _max_allocated_capacity = MAX2(_max_allocated_capacity, allocated_capacity());
     _blob_count++;
@@ -204,6 +208,10 @@ void* CodeHeap::allocate(size_t instance_size) {
     HeapBlock* b =  block_at(_next_segment);
     b->initialize(number_of_segments);
     _next_segment += number_of_segments;
+    guarantee((char*) b >= _memory.low_boundary() && (char*) block < _memory.high(),
+              "The newly allocated block " INTPTR_FORMAT " is not within the heap "
+              "starting with "  INTPTR_FORMAT " and ending with " INTPTR_FORMAT,
+              p2i(b), p2i(_memory.low_boundary()), p2i(_memory.high()));
     DEBUG_ONLY(memset((void *)b->allocated_space(), badCodeHeapNewVal, instance_size));
     _max_allocated_capacity = MAX2(_max_allocated_capacity, allocated_capacity());
     _blob_count++;
@@ -219,6 +227,10 @@ void CodeHeap::deallocate(void* p) {
   // Find start of HeapBlock
   HeapBlock* b = (((HeapBlock *)p) - 1);
   assert(b->allocated_space() == p, "sanity check");
+  guarantee((char*) b >= _memory.low_boundary() && (char*) b < _memory.high(),
+            "The block to be deallocated " INTPTR_FORMAT " is not within the heap "
+            "starting with "  INTPTR_FORMAT " and ending with " INTPTR_FORMAT,
+            p2i(b), p2i(_memory.low_boundary()), p2i(_memory.high()));
   DEBUG_ONLY(memset((void *)b->allocated_space(), badCodeHeapFreeVal,
              segments_to_size(b->length()) - sizeof(HeapBlock)));
   add_to_freelist(b);
diff --git a/hotspot/src/share/vm/memory/heap.hpp b/hotspot/src/share/vm/memory/heap.hpp
index d75559695e1..6fe3391d6f0 100644
--- a/hotspot/src/share/vm/memory/heap.hpp
+++ b/hotspot/src/share/vm/memory/heap.hpp
@@ -153,7 +153,9 @@ class CodeHeap : public CHeapObj {
   char* high() const                             { return _memory.high(); }
   char* high_boundary() const                    { return _memory.high_boundary(); }
 
-  virtual bool  contains(const void* p) const    { return low_boundary() <= p && p < high(); }
+  virtual bool contains(const void* p) const     { return low_boundary() <= p && p < high(); }
+  virtual bool contains_blob(const CodeBlob* blob) const { return low_boundary() <= (char*) blob && (char*) blob < high(); }
+
   virtual void* find_start(void* p)     const;   // returns the block containing p or NULL
   virtual CodeBlob* find_blob_unsafe(void* start) const;
   size_t alignment_unit()       const;           // alignment of any block
diff --git a/hotspot/src/share/vm/oops/constMethod.cpp b/hotspot/src/share/vm/oops/constMethod.cpp
index 34fe9f9e8be..c26fe2d0904 100644
--- a/hotspot/src/share/vm/oops/constMethod.cpp
+++ b/hotspot/src/share/vm/oops/constMethod.cpp
@@ -407,8 +407,12 @@ void ConstMethod::print_on(outputStream* st) const {
   ResourceMark rm;
   assert(is_constMethod(), "must be constMethod");
   st->print_cr("%s", internal_name());
-  st->print(" - method:       " INTPTR_FORMAT " ", p2i((address)method()));
-  method()->print_value_on(st); st->cr();
+  Method* m = method();
+  st->print(" - method:       " INTPTR_FORMAT " ", p2i((address)m));
+  if (m != NULL) {
+    m->print_value_on(st);
+  }
+  st->cr();
   if (has_stackmap_table()) {
     st->print(" - stackmap data:       ");
     stackmap_data()->print_value_on(st);
@@ -421,7 +425,12 @@ void ConstMethod::print_on(outputStream* st) const {
 void ConstMethod::print_value_on(outputStream* st) const {
   assert(is_constMethod(), "must be constMethod");
   st->print(" const part of method " );
-  method()->print_value_on(st);
+  Method* m = method();
+  if (m != NULL) {
+    m->print_value_on(st);
+  } else {
+    st->print("NULL");
+  }
 }
 
 #if INCLUDE_SERVICES
@@ -461,7 +470,7 @@ void ConstMethod::verify_on(outputStream* st) {
 
   // Verification can occur during oop construction before the method or
   // other fields have been initialized.
-  guarantee(method()->is_method(), "should be method");
+  guarantee(method() != NULL && method()->is_method(), "should be method");
 
   address m_end = (address)((intptr_t) this + size());
   address compressed_table_start = code_end();
diff --git a/hotspot/src/share/vm/oops/constMethod.hpp b/hotspot/src/share/vm/oops/constMethod.hpp
index 45246ba209b..7453ecbf689 100644
--- a/hotspot/src/share/vm/oops/constMethod.hpp
+++ b/hotspot/src/share/vm/oops/constMethod.hpp
@@ -359,7 +359,9 @@ public:
   }
 
   // Sizing
-  static int header_size() { return sizeof(ConstMethod)/wordSize; }
+  static int header_size() {
+    return align_size_up(sizeof(ConstMethod), wordSize) / wordSize;
+  }
 
   // Size needed
   static int size(int code_size, InlineTableSizes* sizes);
diff --git a/hotspot/src/share/vm/oops/constantPool.hpp b/hotspot/src/share/vm/oops/constantPool.hpp
index 38a71f525d2..86cfa192171 100644
--- a/hotspot/src/share/vm/oops/constantPool.hpp
+++ b/hotspot/src/share/vm/oops/constantPool.hpp
@@ -705,7 +705,9 @@ class ConstantPool : public Metadata {
   }
 
   // Sizing (in words)
-  static int header_size()             { return sizeof(ConstantPool)/wordSize; }
+  static int header_size()             {
+    return align_size_up(sizeof(ConstantPool), wordSize) / wordSize;
+  }
   static int size(int length)          { return align_metadata_size(header_size() + length); }
   int size() const                     { return size(length()); }
 #if INCLUDE_SERVICES
diff --git a/hotspot/src/share/vm/oops/cpCache.cpp b/hotspot/src/share/vm/oops/cpCache.cpp
index a30d19dd685..b7522433bbf 100644
--- a/hotspot/src/share/vm/oops/cpCache.cpp
+++ b/hotspot/src/share/vm/oops/cpCache.cpp
@@ -140,7 +140,8 @@ void ConstantPoolCacheEntry::set_parameter_size(int value) {
 
 void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_code,
                                                        methodHandle method,
-                                                       int vtable_index) {
+                                                       int vtable_index,
+                                                       bool sender_is_interface) {
   bool is_vtable_call = (vtable_index >= 0);  // FIXME: split this method on this boolean
   assert(method->interpreter_entry() != NULL, "should have been set at this point");
   assert(!method->is_obsolete(),  "attempt to write obsolete method to cpCache");
@@ -204,7 +205,13 @@ void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_co
   if (byte_no == 1) {
     assert(invoke_code != Bytecodes::_invokevirtual &&
            invoke_code != Bytecodes::_invokeinterface, "");
+    // Don't mark invokespecial to method as resolved if sender is an interface.  The receiver
+    // has to be checked that it is a subclass of the current class every time this bytecode
+    // is executed.
+    if (invoke_code != Bytecodes::_invokespecial || !sender_is_interface ||
+        method->name() == vmSymbols::object_initializer_name()) {
     set_bytecode_1(invoke_code);
+    }
   } else if (byte_no == 2)  {
     if (change_to_virtual) {
       assert(invoke_code == Bytecodes::_invokeinterface, "");
@@ -234,17 +241,18 @@ void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_co
   NOT_PRODUCT(verify(tty));
 }
 
-void ConstantPoolCacheEntry::set_direct_call(Bytecodes::Code invoke_code, methodHandle method) {
+void ConstantPoolCacheEntry::set_direct_call(Bytecodes::Code invoke_code, methodHandle method,
+                                             bool sender_is_interface) {
   int index = Method::nonvirtual_vtable_index;
   // index < 0; FIXME: inline and customize set_direct_or_vtable_call
-  set_direct_or_vtable_call(invoke_code, method, index);
+  set_direct_or_vtable_call(invoke_code, method, index, sender_is_interface);
 }
 
 void ConstantPoolCacheEntry::set_vtable_call(Bytecodes::Code invoke_code, methodHandle method, int index) {
   // either the method is a miranda or its holder should accept the given index
   assert(method->method_holder()->is_interface() || method->method_holder()->verify_vtable_index(index), "");
   // index >= 0; FIXME: inline and customize set_direct_or_vtable_call
-  set_direct_or_vtable_call(invoke_code, method, index);
+  set_direct_or_vtable_call(invoke_code, method, index, false);
 }
 
 void ConstantPoolCacheEntry::set_itable_call(Bytecodes::Code invoke_code, const methodHandle& method, int index) {
diff --git a/hotspot/src/share/vm/oops/cpCache.hpp b/hotspot/src/share/vm/oops/cpCache.hpp
index e58d7c16ceb..9db57ffa033 100644
--- a/hotspot/src/share/vm/oops/cpCache.hpp
+++ b/hotspot/src/share/vm/oops/cpCache.hpp
@@ -230,13 +230,15 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
   void set_direct_or_vtable_call(
     Bytecodes::Code invoke_code,                 // the bytecode used for invoking the method
     methodHandle    method,                      // the method/prototype if any (NULL, otherwise)
-    int             vtable_index                 // the vtable index if any, else negative
+    int             vtable_index,                // the vtable index if any, else negative
+    bool            sender_is_interface
   );
 
  public:
   void set_direct_call(                          // sets entry to exact concrete method entry
     Bytecodes::Code invoke_code,                 // the bytecode used for invoking the method
-    methodHandle    method                       // the method to call
+    methodHandle    method,                      // the method to call
+    bool            sender_is_interface
   );
 
   void set_vtable_call(                          // sets entry to vtable index
@@ -359,7 +361,9 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
                                                    return (TosState)((_flags >> tos_state_shift) & tos_state_mask); }
 
   // Code generation support
-  static WordSize size()                         { return in_WordSize(sizeof(ConstantPoolCacheEntry) / wordSize); }
+  static WordSize size()                         {
+    return in_WordSize(align_size_up(sizeof(ConstantPoolCacheEntry), wordSize) / wordSize);
+  }
   static ByteSize size_in_bytes()                { return in_ByteSize(sizeof(ConstantPoolCacheEntry)); }
   static ByteSize indices_offset()               { return byte_offset_of(ConstantPoolCacheEntry, _indices); }
   static ByteSize f1_offset()                    { return byte_offset_of(ConstantPoolCacheEntry, _f1); }
diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp
index 41f5fd143a8..044d26e5219 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp
@@ -2331,21 +2331,21 @@ void InstanceKlass::set_package(ClassLoaderData* loader_data, TRAPS) {
              name()->as_C_string(), loader_data->loader_name());
     }
 
-    if (log_is_enabled(Debug, modules)) {
+    if (log_is_enabled(Debug, module)) {
       ResourceMark rm;
       ModuleEntry* m = _package_entry->module();
-      log_trace(modules)("Setting package: class: %s, package: %s, loader: %s, module: %s",
-                         external_name(),
-                         pkg_name->as_C_string(),
-                         loader_data->loader_name(),
-                         (m->is_named() ? m->name()->as_C_string() : UNNAMED_MODULE));
+      log_trace(module)("Setting package: class: %s, package: %s, loader: %s, module: %s",
+                        external_name(),
+                        pkg_name->as_C_string(),
+                        loader_data->loader_name(),
+                        (m->is_named() ? m->name()->as_C_string() : UNNAMED_MODULE));
     }
   } else {
     ResourceMark rm;
-    log_trace(modules)("Setting package: class: %s, package: unnamed, loader: %s, module: %s",
-                       external_name(),
-                       (loader_data != NULL) ? loader_data->loader_name() : "NULL",
-                       UNNAMED_MODULE);
+    log_trace(module)("Setting package: class: %s, package: unnamed, loader: %s, module: %s",
+                      external_name(),
+                      (loader_data != NULL) ? loader_data->loader_name() : "NULL",
+                      UNNAMED_MODULE);
   }
 }
 
@@ -2456,22 +2456,24 @@ Klass* InstanceKlass::compute_enclosing_class_impl(instanceKlassHandle self,
 void InstanceKlass::check_prohibited_package(Symbol* class_name,
                                              Handle class_loader,
                                              TRAPS) {
-  ResourceMark rm(THREAD);
   if (!class_loader.is_null() &&
       !SystemDictionary::is_platform_class_loader(class_loader) &&
-      class_name != NULL &&
-      strncmp(class_name->as_C_string(), JAVAPKG, JAVAPKG_LEN) == 0) {
-    TempNewSymbol pkg_name = InstanceKlass::package_from_name(class_name, CHECK);
-    assert(pkg_name != NULL, "Error in parsing package name starting with 'java/'");
-    char* name = pkg_name->as_C_string();
-    const char* class_loader_name = SystemDictionary::loader_name(class_loader());
-    StringUtils::replace_no_expand(name, "/", ".");
-    const char* msg_text1 = "Class loader (instance of): ";
-    const char* msg_text2 = " tried to load prohibited package name: ";
-    size_t len = strlen(msg_text1) + strlen(class_loader_name) + strlen(msg_text2) + strlen(name) + 1;
-    char* message = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, len);
-    jio_snprintf(message, len, "%s%s%s%s", msg_text1, class_loader_name, msg_text2, name);
-    THROW_MSG(vmSymbols::java_lang_SecurityException(), message);
+      class_name != NULL) {
+    ResourceMark rm(THREAD);
+    char* name = class_name->as_C_string();
+    if (strncmp(name, JAVAPKG, JAVAPKG_LEN) == 0 && name[JAVAPKG_LEN] == '/') {
+      TempNewSymbol pkg_name = InstanceKlass::package_from_name(class_name, CHECK);
+      assert(pkg_name != NULL, "Error in parsing package name starting with 'java/'");
+      name = pkg_name->as_C_string();
+      const char* class_loader_name = SystemDictionary::loader_name(class_loader());
+      StringUtils::replace_no_expand(name, "/", ".");
+      const char* msg_text1 = "Class loader (instance of): ";
+      const char* msg_text2 = " tried to load prohibited package name: ";
+      size_t len = strlen(msg_text1) + strlen(class_loader_name) + strlen(msg_text2) + strlen(name) + 1;
+      char* message = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, len);
+      jio_snprintf(message, len, "%s%s%s%s", msg_text1, class_loader_name, msg_text2, name);
+      THROW_MSG(vmSymbols::java_lang_SecurityException(), message);
+    }
   }
   return;
 }
@@ -2806,7 +2808,7 @@ nmethod* InstanceKlass::lookup_osr_nmethod(const Method* m, int bci, int comp_le
   return NULL;
 }
 
-bool InstanceKlass::add_member_name(Handle mem_name) {
+oop InstanceKlass::add_member_name(Handle mem_name, bool intern) {
   jweak mem_name_wref = JNIHandles::make_weak_global(mem_name);
   MutexLocker ml(MemberNameTable_lock);
   DEBUG_ONLY(NoSafepointVerifier nsv);
@@ -2816,7 +2818,7 @@ bool InstanceKlass::add_member_name(Handle mem_name) {
   // is called!
   Method* method = (Method*)java_lang_invoke_MemberName::vmtarget(mem_name());
   if (method->is_obsolete()) {
-    return false;
+    return NULL;
   } else if (method->is_old()) {
     // Replace method with redefined version
     java_lang_invoke_MemberName::set_vmtarget(mem_name(), method_with_idnum(method->method_idnum()));
@@ -2825,8 +2827,11 @@ bool InstanceKlass::add_member_name(Handle mem_name) {
   if (_member_names == NULL) {
     _member_names = new (ResourceObj::C_HEAP, mtClass) MemberNameTable(idnum_allocated_count());
   }
-  _member_names->add_member_name(mem_name_wref);
-  return true;
+  if (intern) {
+    return _member_names->find_or_add_member_name(mem_name_wref);
+  } else {
+    return _member_names->add_member_name(mem_name_wref);
+  }
 }
 
 // -----------------------------------------------------------------------------------------------------
diff --git a/hotspot/src/share/vm/oops/instanceKlass.hpp b/hotspot/src/share/vm/oops/instanceKlass.hpp
index 015a86c7e9c..1756b9fc86d 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -1359,7 +1359,7 @@ public:
   // JSR-292 support
   MemberNameTable* member_names() { return _member_names; }
   void set_member_names(MemberNameTable* member_names) { _member_names = member_names; }
-  bool add_member_name(Handle member_name);
+  oop add_member_name(Handle member_name, bool intern);
 
 public:
   // JVMTI support
diff --git a/hotspot/src/share/vm/oops/klass.cpp b/hotspot/src/share/vm/oops/klass.cpp
index ebc59953842..d8ec1ba8875 100644
--- a/hotspot/src/share/vm/oops/klass.cpp
+++ b/hotspot/src/share/vm/oops/klass.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -532,7 +532,7 @@ void Klass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protec
     } else {
       module_entry = ModuleEntryTable::javabase_moduleEntry();
     }
-    // Obtain java.lang.reflect.Module, if available
+    // Obtain java.lang.Module, if available
     Handle module_handle(THREAD, ((module_entry != NULL) ? JNIHandles::resolve(module_entry->module()) : (oop)NULL));
     java_lang_Class::create_mirror(this, loader, module_handle, protection_domain, CHECK);
   }
diff --git a/hotspot/src/share/vm/oops/metadata.hpp b/hotspot/src/share/vm/oops/metadata.hpp
index c42997292e2..b6d60e6a6ef 100644
--- a/hotspot/src/share/vm/oops/metadata.hpp
+++ b/hotspot/src/share/vm/oops/metadata.hpp
@@ -47,6 +47,7 @@ class Metadata : public MetaspaceObj {
   virtual bool is_method()             const volatile { return false; }
   virtual bool is_methodData()         const volatile { return false; }
   virtual bool is_constantPool()       const volatile { return false; }
+  virtual bool is_methodCounters()     const volatile { return false; }
 
   virtual const char* internal_name()  const = 0;
 
diff --git a/hotspot/src/share/vm/oops/method.hpp b/hotspot/src/share/vm/oops/method.hpp
index ebd5f0feef2..6675410db81 100644
--- a/hotspot/src/share/vm/oops/method.hpp
+++ b/hotspot/src/share/vm/oops/method.hpp
@@ -671,7 +671,9 @@ class Method : public Metadata {
 #endif
 
   // sizing
-  static int header_size()                       { return sizeof(Method)/wordSize; }
+  static int header_size()                       {
+    return align_size_up(sizeof(Method), wordSize) / wordSize;
+  }
   static int size(bool is_native);
   int size() const                               { return method_size(); }
 #if INCLUDE_SERVICES
diff --git a/hotspot/src/share/vm/oops/methodCounters.cpp b/hotspot/src/share/vm/oops/methodCounters.cpp
index b78b6e8046b..225573e5220 100644
--- a/hotspot/src/share/vm/oops/methodCounters.cpp
+++ b/hotspot/src/share/vm/oops/methodCounters.cpp
@@ -73,3 +73,11 @@ void MethodCounters::set_highest_osr_comp_level(int level) {
 #endif
 }
 
+
+void MethodCounters::print_value_on(outputStream* st) const {
+  assert(is_methodCounters(), "must be methodCounters");
+  st->print("method counters");
+  print_address_on(st);
+}
+
+
diff --git a/hotspot/src/share/vm/oops/methodCounters.hpp b/hotspot/src/share/vm/oops/methodCounters.hpp
index df96b638735..97ddc4b5406 100644
--- a/hotspot/src/share/vm/oops/methodCounters.hpp
+++ b/hotspot/src/share/vm/oops/methodCounters.hpp
@@ -30,7 +30,7 @@
 #include "interpreter/invocationCounter.hpp"
 #include "runtime/arguments.hpp"
 
-class MethodCounters: public MetaspaceObj {
+class MethodCounters : public Metadata {
  friend class VMStructs;
  friend class JVMCIVMStructs;
  private:
@@ -109,16 +109,17 @@ class MethodCounters: public MetaspaceObj {
   }
 
  public:
+  virtual bool is_methodCounters() const volatile { return true; }
+
   static MethodCounters* allocate(methodHandle mh, TRAPS);
 
   void deallocate_contents(ClassLoaderData* loader_data) {}
-  DEBUG_ONLY(bool on_stack() { return false; })  // for template
 
   AOT_ONLY(Method* method() const { return _method; })
 
-  static int size() { return sizeof(MethodCounters) / wordSize; }
-
-  bool is_klass() const { return false; }
+  static int size() {
+    return align_size_up(sizeof(MethodCounters), wordSize) / wordSize;
+  }
 
   void clear_counters();
 
@@ -251,5 +252,9 @@ class MethodCounters: public MetaspaceObj {
   static ByteSize backedge_mask_offset() {
     return byte_offset_of(MethodCounters, _backedge_mask);
   }
+
+  virtual const char* internal_name() const { return "{method counters}"; }
+  virtual void print_value_on(outputStream* st) const;
+
 };
 #endif //SHARE_VM_OOPS_METHODCOUNTERS_HPP
diff --git a/hotspot/src/share/vm/opto/arraycopynode.cpp b/hotspot/src/share/vm/opto/arraycopynode.cpp
index a81d7a96b8a..e61a053c3d8 100644
--- a/hotspot/src/share/vm/opto/arraycopynode.cpp
+++ b/hotspot/src/share/vm/opto/arraycopynode.cpp
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "opto/arraycopynode.hpp"
 #include "opto/graphKit.hpp"
+#include "runtime/sharedRuntime.hpp"
 
 ArrayCopyNode::ArrayCopyNode(Compile* C, bool alloc_tightly_coupled, bool has_negative_length_guard)
   : CallNode(arraycopy_type(), NULL, TypeRawPtr::BOTTOM),
@@ -225,7 +226,6 @@ bool ArrayCopyNode::prepare_array_copy(PhaseGVN *phase, bool can_reshape,
   Node* dest = in(ArrayCopyNode::Dest);
   const Type* src_type = phase->type(src);
   const TypeAryPtr* ary_src = src_type->isa_aryptr();
-  assert(ary_src != NULL, "should be an array copy/clone");
 
   if (is_arraycopy() || is_copyofrange() || is_copyof()) {
     const Type* dest_type = phase->type(dest);
@@ -286,7 +286,8 @@ bool ArrayCopyNode::prepare_array_copy(PhaseGVN *phase, bool can_reshape,
 
     copy_type = dest_elem;
   } else {
-    assert (is_clonebasic(), "should be");
+    assert(ary_src != NULL, "should be a clone");
+    assert(is_clonebasic(), "should be");
 
     disjoint_bases = true;
     assert(src->is_AddP(), "should be base + off");
@@ -631,42 +632,76 @@ bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase) {
   return CallNode::may_modify_arraycopy_helper(dest_t, t_oop, phase);
 }
 
-bool ArrayCopyNode::may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, ArrayCopyNode*& ac) {
-  if (n->Opcode() == Op_StoreCM ||
-      n->Opcode() == Op_StoreB) {
-    // Ignore card mark stores
-    n = n->in(MemNode::Memory);
-  }
-
-  if (n->is_Proj()) {
-    n = n->in(0);
-    if (n->is_Call() && n->as_Call()->may_modify(t_oop, phase)) {
-      if (n->isa_ArrayCopy() != NULL) {
-        ac = n->as_ArrayCopy();
-      }
-      return true;
-    }
+bool ArrayCopyNode::may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, CallNode*& call) {
+  if (n != NULL &&
+      n->is_Call() &&
+      n->as_Call()->may_modify(t_oop, phase) &&
+      (n->as_Call()->is_ArrayCopy() || n->as_Call()->is_call_to_arraycopystub())) {
+    call = n->as_Call();
+    return true;
   }
   return false;
 }
 
-bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac) {
-  Node* mem = mb->in(TypeFunc::Memory);
-
-  if (mem->is_MergeMem()) {
-    Node* n = mem->as_MergeMem()->memory_at(Compile::AliasIdxRaw);
-    if (may_modify_helper(t_oop, n, phase, ac)) {
-      return true;
-    } else if (n->is_Phi()) {
-      for (uint i = 1; i < n->req(); i++) {
-        if (n->in(i) != NULL) {
-          if (may_modify_helper(t_oop, n->in(i), phase, ac)) {
-            return true;
+static Node* step_over_gc_barrier(Node* c) {
+  if (UseG1GC && !GraphKit::use_ReduceInitialCardMarks() &&
+      c != NULL && c->is_Region() && c->req() == 3) {
+    for (uint i = 1; i < c->req(); i++) {
+      if (c->in(i) != NULL && c->in(i)->is_Region() &&
+          c->in(i)->req() == 3) {
+        Node* r = c->in(i);
+        for (uint j = 1; j < r->req(); j++) {
+          if (r->in(j) != NULL && r->in(j)->is_Proj() &&
+              r->in(j)->in(0) != NULL &&
+              r->in(j)->in(0)->Opcode() == Op_CallLeaf &&
+              r->in(j)->in(0)->as_Call()->entry_point() == CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post)) {
+            Node* call = r->in(j)->in(0);
+            c = c->in(i == 1 ? 2 : 1);
+            if (c != NULL) {
+              c = c->in(0);
+              if (c != NULL) {
+                c = c->in(0);
+                assert(call->in(0) == NULL ||
+                       call->in(0)->in(0) == NULL ||
+                       call->in(0)->in(0)->in(0) == NULL ||
+                       call->in(0)->in(0)->in(0)->in(0) == NULL ||
+                       call->in(0)->in(0)->in(0)->in(0)->in(0) == NULL ||
+                       c == call->in(0)->in(0)->in(0)->in(0)->in(0), "bad barrier shape");
+                return c;
+              }
+            }
           }
         }
       }
     }
   }
+  return c;
+}
+
+bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac) {
+
+  Node* c = mb->in(0);
+
+  // step over g1 gc barrier if we're at a clone with ReduceInitialCardMarks off
+  c = step_over_gc_barrier(c);
+
+  CallNode* call = NULL;
+  if (c != NULL && c->is_Region()) {
+    for (uint i = 1; i < c->req(); i++) {
+      if (c->in(i) != NULL) {
+        Node* n = c->in(i)->in(0);
+        if (may_modify_helper(t_oop, n, phase, call)) {
+          ac = call->isa_ArrayCopy();
+          assert(c == mb->in(0), "only for clone");
+          return true;
+        }
+      }
+    }
+  } else if (may_modify_helper(t_oop, c->in(0), phase, call)) {
+    ac = call->isa_ArrayCopy();
+    assert(c == mb->in(0) || (ac != NULL && ac->is_clonebasic() && !GraphKit::use_ReduceInitialCardMarks()), "only for clone");
+    return true;
+  }
 
   return false;
 }
@@ -677,37 +712,39 @@ bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTra
 // between offset_lo and offset_hi
 // if must_modify is true, return true if the copy is guaranteed to
 // write between offset_lo and offset_hi
-bool ArrayCopyNode::modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify) {
+bool ArrayCopyNode::modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify) const {
   assert(_kind == ArrayCopy || _kind == CopyOf || _kind == CopyOfRange, "only for real array copies");
 
-  Node* dest = in(ArrayCopyNode::Dest);
-  Node* src_pos = in(ArrayCopyNode::SrcPos);
-  Node* dest_pos = in(ArrayCopyNode::DestPos);
-  Node* len = in(ArrayCopyNode::Length);
+  Node* dest = in(Dest);
+  Node* dest_pos = in(DestPos);
+  Node* len = in(Length);
 
   const TypeInt *dest_pos_t = phase->type(dest_pos)->isa_int();
   const TypeInt *len_t = phase->type(len)->isa_int();
   const TypeAryPtr* ary_t = phase->type(dest)->isa_aryptr();
 
-  if (dest_pos_t != NULL && len_t != NULL && ary_t != NULL) {
-    BasicType ary_elem = ary_t->klass()->as_array_klass()->element_type()->basic_type();
-    uint header = arrayOopDesc::base_offset_in_bytes(ary_elem);
-    uint elemsize = type2aelembytes(ary_elem);
+  if (dest_pos_t == NULL || len_t == NULL || ary_t == NULL) {
+    return !must_modify;
+  }
 
-    jlong dest_pos_plus_len_lo = (((jlong)dest_pos_t->_lo) + len_t->_lo) * elemsize + header;
-    jlong dest_pos_plus_len_hi = (((jlong)dest_pos_t->_hi) + len_t->_hi) * elemsize + header;
-    jlong dest_pos_lo = ((jlong)dest_pos_t->_lo) * elemsize + header;
-    jlong dest_pos_hi = ((jlong)dest_pos_t->_hi) * elemsize + header;
+  BasicType ary_elem = ary_t->klass()->as_array_klass()->element_type()->basic_type();
+  uint header = arrayOopDesc::base_offset_in_bytes(ary_elem);
+  uint elemsize = type2aelembytes(ary_elem);
 
-    if (must_modify) {
-      if (offset_lo >= dest_pos_hi && offset_hi < dest_pos_plus_len_lo) {
-        return true;
-      }
-    } else {
-      if (offset_hi >= dest_pos_lo && offset_lo < dest_pos_plus_len_hi) {
-        return true;
-      }
+  jlong dest_pos_plus_len_lo = (((jlong)dest_pos_t->_lo) + len_t->_lo) * elemsize + header;
+  jlong dest_pos_plus_len_hi = (((jlong)dest_pos_t->_hi) + len_t->_hi) * elemsize + header;
+  jlong dest_pos_lo = ((jlong)dest_pos_t->_lo) * elemsize + header;
+  jlong dest_pos_hi = ((jlong)dest_pos_t->_hi) * elemsize + header;
+
+  if (must_modify) {
+    if (offset_lo >= dest_pos_hi && offset_hi < dest_pos_plus_len_lo) {
+      return true;
+    }
+  } else {
+    if (offset_hi >= dest_pos_lo && offset_lo < dest_pos_plus_len_hi) {
+      return true;
     }
   }
   return false;
 }
+
diff --git a/hotspot/src/share/vm/opto/arraycopynode.hpp b/hotspot/src/share/vm/opto/arraycopynode.hpp
index 58d641727d8..7b54458aa3b 100644
--- a/hotspot/src/share/vm/opto/arraycopynode.hpp
+++ b/hotspot/src/share/vm/opto/arraycopynode.hpp
@@ -108,7 +108,7 @@ private:
                             BasicType copy_type, const Type* value_type, int count);
   bool finish_transform(PhaseGVN *phase, bool can_reshape,
                         Node* ctl, Node *mem);
-  static bool may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, ArrayCopyNode*& ac);
+  static bool may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, CallNode*& call);
 
 public:
 
@@ -167,7 +167,7 @@ public:
   bool has_negative_length_guard() const { return _has_negative_length_guard; }
 
   static bool may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac);
-  bool modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify);
+  bool modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify) const;
 
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
diff --git a/hotspot/src/share/vm/opto/c2_globals.hpp b/hotspot/src/share/vm/opto/c2_globals.hpp
index 49bcbf42ae8..3ae2e20e146 100644
--- a/hotspot/src/share/vm/opto/c2_globals.hpp
+++ b/hotspot/src/share/vm/opto/c2_globals.hpp
@@ -181,7 +181,7 @@
            "Map number of unrolls for main loop via "                       \
            "Superword Level Parallelism analysis")                          \
                                                                             \
-  diagnostic_pd(bool, PostLoopMultiversioning,                              \
+  experimental(bool, PostLoopMultiversioning, false,                        \
            "Multi versioned post loops to eliminate range checks")          \
                                                                             \
   notproduct(bool, TraceSuperWordLoopUnrollAnalysis, false,                 \
diff --git a/hotspot/src/share/vm/opto/c2compiler.cpp b/hotspot/src/share/vm/opto/c2compiler.cpp
index ec7e03c5ff0..69106bbeaa2 100644
--- a/hotspot/src/share/vm/opto/c2compiler.cpp
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -244,8 +244,8 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
     if (!Matcher::match_rule_supported(Op_ReverseBytesL)) return false;
     break;
 
-  /* CompareAndSwap, Object: */
-  case vmIntrinsics::_compareAndSwapObject:
+  /* CompareAndSet, Object: */
+  case vmIntrinsics::_compareAndSetObject:
 #ifdef _LP64
     if ( UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapN)) return false;
     if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
@@ -253,10 +253,10 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
     if (!Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
 #endif
     break;
-  case vmIntrinsics::_weakCompareAndSwapObject:
-  case vmIntrinsics::_weakCompareAndSwapObjectAcquire:
-  case vmIntrinsics::_weakCompareAndSwapObjectRelease:
-  case vmIntrinsics::_weakCompareAndSwapObjectVolatile:
+  case vmIntrinsics::_weakCompareAndSetObjectPlain:
+  case vmIntrinsics::_weakCompareAndSetObjectAcquire:
+  case vmIntrinsics::_weakCompareAndSetObjectRelease:
+  case vmIntrinsics::_weakCompareAndSetObject:
 #ifdef _LP64
     if ( UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapN)) return false;
     if (!UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
@@ -264,52 +264,52 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
 #endif
     break;
-  /* CompareAndSwap, Long: */
-  case vmIntrinsics::_compareAndSwapLong:
+  /* CompareAndSet, Long: */
+  case vmIntrinsics::_compareAndSetLong:
     if (!Matcher::match_rule_supported(Op_CompareAndSwapL)) return false;
     break;
-  case vmIntrinsics::_weakCompareAndSwapLong:
-  case vmIntrinsics::_weakCompareAndSwapLongAcquire:
-  case vmIntrinsics::_weakCompareAndSwapLongRelease:
-  case vmIntrinsics::_weakCompareAndSwapLongVolatile:
+  case vmIntrinsics::_weakCompareAndSetLongPlain:
+  case vmIntrinsics::_weakCompareAndSetLongAcquire:
+  case vmIntrinsics::_weakCompareAndSetLongRelease:
+  case vmIntrinsics::_weakCompareAndSetLong:
     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
     break;
 
-  /* CompareAndSwap, Int: */
-  case vmIntrinsics::_compareAndSwapInt:
+  /* CompareAndSet, Int: */
+  case vmIntrinsics::_compareAndSetInt:
     if (!Matcher::match_rule_supported(Op_CompareAndSwapI)) return false;
     break;
-  case vmIntrinsics::_weakCompareAndSwapInt:
-  case vmIntrinsics::_weakCompareAndSwapIntAcquire:
-  case vmIntrinsics::_weakCompareAndSwapIntRelease:
-  case vmIntrinsics::_weakCompareAndSwapIntVolatile:
+  case vmIntrinsics::_weakCompareAndSetIntPlain:
+  case vmIntrinsics::_weakCompareAndSetIntAcquire:
+  case vmIntrinsics::_weakCompareAndSetIntRelease:
+  case vmIntrinsics::_weakCompareAndSetInt:
     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
     break;
 
-  /* CompareAndSwap, Byte: */
-  case vmIntrinsics::_compareAndSwapByte:
+  /* CompareAndSet, Byte: */
+  case vmIntrinsics::_compareAndSetByte:
     if (!Matcher::match_rule_supported(Op_CompareAndSwapB)) return false;
     break;
-  case vmIntrinsics::_weakCompareAndSwapByte:
-  case vmIntrinsics::_weakCompareAndSwapByteAcquire:
-  case vmIntrinsics::_weakCompareAndSwapByteRelease:
-  case vmIntrinsics::_weakCompareAndSwapByteVolatile:
+  case vmIntrinsics::_weakCompareAndSetBytePlain:
+  case vmIntrinsics::_weakCompareAndSetByteAcquire:
+  case vmIntrinsics::_weakCompareAndSetByteRelease:
+  case vmIntrinsics::_weakCompareAndSetByte:
     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapB)) return false;
     break;
 
-  /* CompareAndSwap, Short: */
-  case vmIntrinsics::_compareAndSwapShort:
+  /* CompareAndSet, Short: */
+  case vmIntrinsics::_compareAndSetShort:
     if (!Matcher::match_rule_supported(Op_CompareAndSwapS)) return false;
     break;
-  case vmIntrinsics::_weakCompareAndSwapShort:
-  case vmIntrinsics::_weakCompareAndSwapShortAcquire:
-  case vmIntrinsics::_weakCompareAndSwapShortRelease:
-  case vmIntrinsics::_weakCompareAndSwapShortVolatile:
+  case vmIntrinsics::_weakCompareAndSetShortPlain:
+  case vmIntrinsics::_weakCompareAndSetShortAcquire:
+  case vmIntrinsics::_weakCompareAndSetShortRelease:
+  case vmIntrinsics::_weakCompareAndSetShort:
     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapS)) return false;
     break;
 
   /* CompareAndExchange, Object: */
-  case vmIntrinsics::_compareAndExchangeObjectVolatile:
+  case vmIntrinsics::_compareAndExchangeObject:
   case vmIntrinsics::_compareAndExchangeObjectAcquire:
   case vmIntrinsics::_compareAndExchangeObjectRelease:
 #ifdef _LP64
@@ -321,28 +321,28 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
     break;
 
   /* CompareAndExchange, Long: */
-  case vmIntrinsics::_compareAndExchangeLongVolatile:
+  case vmIntrinsics::_compareAndExchangeLong:
   case vmIntrinsics::_compareAndExchangeLongAcquire:
   case vmIntrinsics::_compareAndExchangeLongRelease:
     if (!Matcher::match_rule_supported(Op_CompareAndExchangeL)) return false;
     break;
 
   /* CompareAndExchange, Int: */
-  case vmIntrinsics::_compareAndExchangeIntVolatile:
+  case vmIntrinsics::_compareAndExchangeInt:
   case vmIntrinsics::_compareAndExchangeIntAcquire:
   case vmIntrinsics::_compareAndExchangeIntRelease:
     if (!Matcher::match_rule_supported(Op_CompareAndExchangeI)) return false;
     break;
 
   /* CompareAndExchange, Byte: */
-  case vmIntrinsics::_compareAndExchangeByteVolatile:
+  case vmIntrinsics::_compareAndExchangeByte:
   case vmIntrinsics::_compareAndExchangeByteAcquire:
   case vmIntrinsics::_compareAndExchangeByteRelease:
     if (!Matcher::match_rule_supported(Op_CompareAndExchangeB)) return false;
     break;
 
   /* CompareAndExchange, Short: */
-  case vmIntrinsics::_compareAndExchangeShortVolatile:
+  case vmIntrinsics::_compareAndExchangeShort:
   case vmIntrinsics::_compareAndExchangeShortAcquire:
   case vmIntrinsics::_compareAndExchangeShortRelease:
     if (!Matcher::match_rule_supported(Op_CompareAndExchangeS)) return false;
diff --git a/hotspot/src/share/vm/opto/callGenerator.cpp b/hotspot/src/share/vm/opto/callGenerator.cpp
index de9f44c359d..a5aaa552fee 100644
--- a/hotspot/src/share/vm/opto/callGenerator.cpp
+++ b/hotspot/src/share/vm/opto/callGenerator.cpp
@@ -46,7 +46,7 @@ const TypeFunc* CallGenerator::tf() const {
   return TypeFunc::make(method());
 }
 
-bool CallGenerator::is_inlined_mh_linker(JVMState* jvms, ciMethod* callee) {
+bool CallGenerator::is_inlined_method_handle_intrinsic(JVMState* jvms, ciMethod* callee) {
   ciMethod* symbolic_info = jvms->method()->get_method_at_bci(jvms->bci());
   return symbolic_info->is_method_handle_intrinsic() && !callee->is_method_handle_intrinsic();
 }
@@ -142,7 +142,7 @@ JVMState* DirectCallGenerator::generate(JVMState* jvms) {
   }
 
   CallStaticJavaNode *call = new CallStaticJavaNode(kit.C, tf(), target, method(), kit.bci());
-  if (is_inlined_mh_linker(jvms, method())) {
+  if (is_inlined_method_handle_intrinsic(jvms, method())) {
     // To be able to issue a direct call and skip a call to MH.linkTo*/invokeBasic adapter,
     // additional information about the method being invoked should be attached
     // to the call site to make resolution logic work
@@ -241,7 +241,7 @@ JVMState* VirtualCallGenerator::generate(JVMState* jvms) {
   address target = SharedRuntime::get_resolve_virtual_call_stub();
   // Normal inline cache used for call
   CallDynamicJavaNode *call = new CallDynamicJavaNode(tf(), target, method(), _vtable_index, kit.bci());
-  if (is_inlined_mh_linker(jvms, method())) {
+  if (is_inlined_method_handle_intrinsic(jvms, method())) {
     // To be able to issue a direct call (optimized virtual or virtual)
     // and skip a call to MH.linkTo*/invokeBasic adapter, additional information
     // about the method being invoked should be attached to the call site to
@@ -785,8 +785,7 @@ JVMState* PredictedCallGenerator::generate(JVMState* jvms) {
 
 
 CallGenerator* CallGenerator::for_method_handle_call(JVMState* jvms, ciMethod* caller, ciMethod* callee, bool delayed_forbidden) {
-  assert(callee->is_method_handle_intrinsic() ||
-         callee->is_compiled_lambda_form(), "for_method_handle_call mismatch");
+  assert(callee->is_method_handle_intrinsic(), "for_method_handle_call mismatch");
   bool input_not_const;
   CallGenerator* cg = CallGenerator::for_method_handle_inline(jvms, caller, callee, input_not_const);
   Compile* C = Compile::current();
@@ -826,6 +825,13 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod*
         const TypeOopPtr* oop_ptr = receiver->bottom_type()->is_oopptr();
         ciMethod* target = oop_ptr->const_oop()->as_method_handle()->get_vmtarget();
         const int vtable_index = Method::invalid_vtable_index;
+
+        if (!ciMethod::is_consistent_info(callee, target)) {
+          print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(),
+                                 "signatures mismatch");
+          return NULL;
+        }
+
         CallGenerator* cg = C->call_generator(target, vtable_index,
                                               false /* call_does_dispatch */,
                                               jvms,
@@ -833,9 +839,8 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod*
                                               PROB_ALWAYS);
         return cg;
       } else {
-        const char* msg = "receiver not constant";
-        if (PrintInlining)  C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg);
-        C->log_inline_failure(msg);
+        print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(),
+                               "receiver not constant");
       }
     }
     break;
@@ -852,6 +857,12 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod*
         const TypeOopPtr* oop_ptr = member_name->bottom_type()->is_oopptr();
         ciMethod* target = oop_ptr->const_oop()->as_member_name()->get_vmtarget();
 
+        if (!ciMethod::is_consistent_info(callee, target)) {
+          print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(),
+                                 "signatures mismatch");
+          return NULL;
+        }
+
         // In lambda forms we erase signature types to avoid resolving issues
         // involving class loaders.  When we optimize a method handle invoke
         // to a direct call we must cast the receiver and arguments to its
@@ -912,9 +923,8 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod*
                                               speculative_receiver_type);
         return cg;
       } else {
-        const char* msg = "member_name not constant";
-        if (PrintInlining)  C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg);
-        C->log_inline_failure(msg);
+        print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(),
+                               "member_name not constant");
       }
     }
     break;
diff --git a/hotspot/src/share/vm/opto/callGenerator.hpp b/hotspot/src/share/vm/opto/callGenerator.hpp
index 58e8fe9c614..8b7ee546571 100644
--- a/hotspot/src/share/vm/opto/callGenerator.hpp
+++ b/hotspot/src/share/vm/opto/callGenerator.hpp
@@ -170,7 +170,12 @@ class CallGenerator : public ResourceObj {
     }
   }
 
-  static bool is_inlined_mh_linker(JVMState* jvms, ciMethod* m);
+  static void print_inlining_failure(Compile* C, ciMethod* callee, int inline_level, int bci, const char* msg) {
+    print_inlining(C, callee, inline_level, bci, msg);
+    C->log_inline_failure(msg);
+  }
+
+  static bool is_inlined_method_handle_intrinsic(JVMState* jvms, ciMethod* m);
 };
 
 
diff --git a/hotspot/src/share/vm/opto/callnode.cpp b/hotspot/src/share/vm/opto/callnode.cpp
index 66b2d086bbd..7def4ee721e 100644
--- a/hotspot/src/share/vm/opto/callnode.cpp
+++ b/hotspot/src/share/vm/opto/callnode.cpp
@@ -784,8 +784,8 @@ bool CallNode::may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase) {
       }
       // May modify (by reflection) if an boxing object is passed
       // as argument or returned.
-      if (returns_pointer() && (proj_out(TypeFunc::Parms) != NULL)) {
-        Node* proj = proj_out(TypeFunc::Parms);
+      Node* proj = returns_pointer() ? proj_out(TypeFunc::Parms) : NULL;
+      if (proj != NULL) {
         const TypeInstPtr* inst_t = phase->type(proj)->isa_instptr();
         if ((inst_t != NULL) && (!inst_t->klass_is_exact() ||
                                  (inst_t->klass() == boxing_klass))) {
diff --git a/hotspot/src/share/vm/opto/callnode.hpp b/hotspot/src/share/vm/opto/callnode.hpp
index 00979ae0d53..f5cc9bcf237 100644
--- a/hotspot/src/share/vm/opto/callnode.hpp
+++ b/hotspot/src/share/vm/opto/callnode.hpp
@@ -452,8 +452,8 @@ public:
   void delete_replaced_nodes() {
     _replaced_nodes.reset();
   }
-  void apply_replaced_nodes() {
-    _replaced_nodes.apply(this);
+  void apply_replaced_nodes(uint idx) {
+    _replaced_nodes.apply(this, idx);
   }
   void merge_replaced_nodes_with(SafePointNode* sfpt) {
     _replaced_nodes.merge_with(sfpt->_replaced_nodes);
diff --git a/hotspot/src/share/vm/opto/castnode.cpp b/hotspot/src/share/vm/opto/castnode.cpp
index 1184728add5..9f829a40008 100644
--- a/hotspot/src/share/vm/opto/castnode.cpp
+++ b/hotspot/src/share/vm/opto/castnode.cpp
@@ -225,7 +225,10 @@ Node *CastIINode::Ideal(PhaseGVN *phase, bool can_reshape) {
   }
 
   // Similar to ConvI2LNode::Ideal() for the same reasons
-  if (can_reshape && !phase->C->major_progress()) {
+  // Do not narrow the type of range check dependent CastIINodes to
+  // avoid corruption of the graph if a CastII is replaced by TOP but
+  // the corresponding range check is not removed.
+  if (can_reshape && !_range_check_dependency && !phase->C->major_progress()) {
     const TypeInt* this_type = this->type()->is_int();
     const TypeInt* in_type = phase->type(in(1))->isa_int();
     if (in_type != NULL && this_type != NULL &&
diff --git a/hotspot/src/share/vm/opto/cfgnode.cpp b/hotspot/src/share/vm/opto/cfgnode.cpp
index de85b1cb155..69e7659a877 100644
--- a/hotspot/src/share/vm/opto/cfgnode.cpp
+++ b/hotspot/src/share/vm/opto/cfgnode.cpp
@@ -1889,6 +1889,12 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     bool saw_self = false;
     for( uint i=1; iis_MergeMem()) {
         MergeMemNode* n = ii->as_MergeMem();
         merge_width = MAX2(merge_width, n->req());
diff --git a/hotspot/src/share/vm/opto/convertnode.cpp b/hotspot/src/share/vm/opto/convertnode.cpp
index bc111ccae7a..5d97a7330f2 100644
--- a/hotspot/src/share/vm/opto/convertnode.cpp
+++ b/hotspot/src/share/vm/opto/convertnode.cpp
@@ -294,8 +294,7 @@ Node *ConvI2LNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   }
 
 #ifdef _LP64
-  // Convert ConvI2L(AddI(x, y)) to AddL(ConvI2L(x), ConvI2L(y)) or
-  // ConvI2L(CastII(AddI(x, y))) to AddL(ConvI2L(CastII(x)), ConvI2L(CastII(y))),
+  // Convert ConvI2L(AddI(x, y)) to AddL(ConvI2L(x), ConvI2L(y))
   // but only if x and y have subranges that cannot cause 32-bit overflow,
   // under the assumption that x+y is in my own subrange this->type().
 
@@ -319,13 +318,6 @@ Node *ConvI2LNode::Ideal(PhaseGVN *phase, bool can_reshape) {
 
   Node* z = in(1);
   int op = z->Opcode();
-  Node* ctrl = NULL;
-  if (op == Op_CastII && z->as_CastII()->has_range_check()) {
-    // Skip CastII node but save control dependency
-    ctrl = z->in(0);
-    z = z->in(1);
-    op = z->Opcode();
-  }
   if (op == Op_AddI || op == Op_SubI) {
     Node* x = z->in(1);
     Node* y = z->in(2);
@@ -385,8 +377,8 @@ Node *ConvI2LNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     }
     assert(rxlo == (int)rxlo && rxhi == (int)rxhi, "x should not overflow");
     assert(rylo == (int)rylo && ryhi == (int)ryhi, "y should not overflow");
-    Node* cx = phase->C->constrained_convI2L(phase, x, TypeInt::make(rxlo, rxhi, widen), ctrl);
-    Node* cy = phase->C->constrained_convI2L(phase, y, TypeInt::make(rylo, ryhi, widen), ctrl);
+    Node* cx = phase->C->constrained_convI2L(phase, x, TypeInt::make(rxlo, rxhi, widen), NULL);
+    Node* cy = phase->C->constrained_convI2L(phase, y, TypeInt::make(rylo, ryhi, widen), NULL);
     switch (op) {
       case Op_AddI:  return new AddLNode(cx, cy);
       case Op_SubI:  return new SubLNode(cx, cy);
diff --git a/hotspot/src/share/vm/opto/doCall.cpp b/hotspot/src/share/vm/opto/doCall.cpp
index 97af80e61b0..3e9bdd53d07 100644
--- a/hotspot/src/share/vm/opto/doCall.cpp
+++ b/hotspot/src/share/vm/opto/doCall.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -400,92 +400,10 @@ bool Parse::can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass* kl
 }
 
 #ifdef ASSERT
-static bool check_type(ciType* t1, ciType* t2) {
-  // Either oop-oop or prim-prim pair.
-  if (t1->is_primitive_type() && t2->is_primitive_type()) {
-    return t1->size() == t2->size(); // argument sizes should match
-  } else {
-    return !t1->is_primitive_type() && !t2->is_primitive_type(); // oop-oop
-  }
-}
-
-static bool check_inlined_mh_linker_info(ciMethod* symbolic_info, ciMethod* resolved_method) {
-  assert(symbolic_info->is_method_handle_intrinsic(), "sanity");
-  assert(!resolved_method->is_method_handle_intrinsic(), "sanity");
-
-  if (!symbolic_info->is_loaded() || !resolved_method->is_loaded()) {
-    return true; // Don't compare unloaded methods.
-  }
-  // Linkers have appendix argument which is not passed to callee.
-  int has_appendix = MethodHandles::has_member_arg(symbolic_info->intrinsic_id()) ? 1 : 0;
-  if (symbolic_info->arg_size() != (resolved_method->arg_size() + has_appendix)) {
-    return false; // Total size of arguments on stack mismatch.
-  }
-  if (!symbolic_info->return_type()->is_void()) {
-    // Only check the return type if the symbolic method is not void
-    // i.e. the return value of the resolved method can be dropped
-    if (!check_type(symbolic_info->return_type(), resolved_method->return_type())) {
-      return false; // Return value size or type mismatch encountered.
-    }
-  }
-
-  switch (symbolic_info->intrinsic_id()) {
-    case vmIntrinsics::_linkToVirtual:
-    case vmIntrinsics::_linkToInterface:
-    case vmIntrinsics::_linkToSpecial: {
-      if (resolved_method->is_static())  return false;
-      break;
-    }
-    case vmIntrinsics::_linkToStatic: {
-      if (!resolved_method->is_static())  return false;
-      break;
-    }
-  }
-
-  ciSignature* symbolic_sig = symbolic_info->signature();
-  ciSignature* resolved_sig = resolved_method->signature();
-
-  if (symbolic_sig->count() + (symbolic_info->is_static() ? 0 : 1) !=
-      resolved_sig->count() + (resolved_method->is_static() ? 0 : 1) + has_appendix) {
-    return false; // Argument count mismatch
-  }
-
-  int sbase = 0, rbase = 0;
-  int arg_count = MIN2(symbolic_sig->count() - has_appendix, resolved_sig->count());
-  ciType* recv_type = NULL;
-  if (symbolic_info->is_static() && !resolved_method->is_static()) {
-    recv_type = symbolic_sig->type_at(0);
-    sbase = 1;
-  } else if (!symbolic_info->is_static() && resolved_method->is_static()) {
-    recv_type = resolved_sig->type_at(0);
-    rbase = 1;
-  }
-  if (recv_type != NULL && recv_type->is_primitive_type()) {
-    return false; // Receiver should be an oop.
-  }
-  for (int i = 0; i < arg_count; i++) {
-    if (!check_type(symbolic_sig->type_at(sbase + i), resolved_sig->type_at(rbase + i))) {
-      return false; // Argument size or type mismatch encountered.
-    }
-  }
-  return true;
-}
-
-static bool is_call_consistent_with_jvms(JVMState* jvms, CallGenerator* cg) {
+static bool check_call_consistency(JVMState* jvms, CallGenerator* cg) {
   ciMethod* symbolic_info = jvms->method()->get_method_at_bci(jvms->bci());
   ciMethod* resolved_method = cg->method();
-
-  if (CallGenerator::is_inlined_mh_linker(jvms, resolved_method)) {
-    return check_inlined_mh_linker_info(symbolic_info, resolved_method);
-  } else {
-    // Method name & descriptor should stay the same.
-    return (symbolic_info->get_Method()->name() == resolved_method->get_Method()->name()) &&
-           (symbolic_info->get_Method()->signature() == resolved_method->get_Method()->signature());
-  }
-}
-
-static bool check_call_consistency(JVMState* jvms, CallGenerator* cg) {
-  if (!is_call_consistent_with_jvms(jvms, cg)) {
+  if (!ciMethod::is_consistent_info(symbolic_info, resolved_method)) {
     tty->print_cr("JVMS:");
     jvms->dump();
     tty->print_cr("Bytecode info:");
@@ -587,6 +505,30 @@ void Parse::do_call() {
     speculative_receiver_type = receiver_type != NULL ? receiver_type->speculative_type() : NULL;
   }
 
+  // invoke-super-special
+  if (iter().cur_bc_raw() == Bytecodes::_invokespecial && !orig_callee->is_object_initializer()) {
+    ciInstanceKlass* calling_klass = method()->holder();
+    ciInstanceKlass* sender_klass =
+        calling_klass->is_anonymous() ? calling_klass->host_klass() :
+                                        calling_klass;
+    if (sender_klass->is_interface()) {
+      Node* receiver_node = stack(sp() - nargs);
+      Node* cls_node = makecon(TypeKlassPtr::make(sender_klass));
+      Node* bad_type_ctrl = NULL;
+      Node* casted_receiver = gen_checkcast(receiver_node, cls_node, &bad_type_ctrl);
+      if (bad_type_ctrl != NULL) {
+        PreserveJVMState pjvms(this);
+        set_control(bad_type_ctrl);
+        uncommon_trap(Deoptimization::Reason_class_check,
+                      Deoptimization::Action_none);
+      }
+      if (stopped()) {
+        return; // MUST uncommon-trap?
+      }
+      set_stack(sp() - nargs, casted_receiver);
+    }
+  }
+
   // Note:  It's OK to try to inline a virtual call.
   // The call generator will not attempt to inline a polymorphic call
   // unless it knows how to optimize the receiver dispatch.
diff --git a/hotspot/src/share/vm/opto/ifnode.cpp b/hotspot/src/share/vm/opto/ifnode.cpp
index 169146a607e..1f13554db40 100644
--- a/hotspot/src/share/vm/opto/ifnode.cpp
+++ b/hotspot/src/share/vm/opto/ifnode.cpp
@@ -249,6 +249,13 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) {
       predicate_proj = proj;
     }
   }
+
+  // If all the defs of the phi are the same constant, we already have the desired end state.
+  // Skip the split that would create empty phi and region nodes.
+  if((r->req() - req_c) == 1) {
+    return NULL;
+  }
+
   if (nb_predicate_proj > 1) {
     // Can happen in case of loop unswitching and when the loop is
     // optimized out: it's not a loop anymore so we don't care about
@@ -1458,8 +1465,9 @@ Node* IfNode::dominated_by(Node* prev_dom, PhaseIterGVN *igvn) {
   // be skipped. For example, range check predicate has two checks
   // for lower and upper bounds.
   ProjNode* unc_proj = proj_out(1 - prev_dom->as_Proj()->_con)->as_Proj();
-  if (unc_proj->is_uncommon_trap_proj(Deoptimization::Reason_predicate) != NULL)
-   prev_dom = idom;
+  if ((unc_proj != NULL) && (unc_proj->is_uncommon_trap_proj(Deoptimization::Reason_predicate) != NULL)) {
+    prev_dom = idom;
+  }
 
   // Now walk the current IfNode's projections.
   // Loop ends when 'this' has no more uses.
diff --git a/hotspot/src/share/vm/opto/lcm.cpp b/hotspot/src/share/vm/opto/lcm.cpp
index 87d6d92d5f6..0cad4dce650 100644
--- a/hotspot/src/share/vm/opto/lcm.cpp
+++ b/hotspot/src/share/vm/opto/lcm.cpp
@@ -254,10 +254,12 @@ void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allo
       const TypePtr *adr_type = NULL;  // Do not need this return value here
       const Node* base = mach->get_base_and_disp(offset, adr_type);
       if (base == NULL || base == NodeSentinel) {
-        // Narrow oop address doesn't have base, only index
-        if( val->bottom_type()->isa_narrowoop() &&
-            MacroAssembler::needs_explicit_null_check(offset) )
-          continue;             // Give up if offset is beyond page size
+        // Narrow oop address doesn't have base, only index.
+        // Give up if offset is beyond page size or if heap base is not protected.
+        if (val->bottom_type()->isa_narrowoop() &&
+            (MacroAssembler::needs_explicit_null_check(offset) ||
+             !Universe::narrow_oop_use_implicit_null_checks()))
+          continue;
         // cannot reason about it; is probably not implicit null exception
       } else {
         const TypePtr* tptr;
@@ -269,12 +271,17 @@ void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allo
           // only regular oops are expected here
           tptr = base->bottom_type()->is_ptr();
         }
-        // Give up if offset is not a compile-time constant
-        if( offset == Type::OffsetBot || tptr->_offset == Type::OffsetBot )
+        // Give up if offset is not a compile-time constant.
+        if (offset == Type::OffsetBot || tptr->_offset == Type::OffsetBot)
           continue;
         offset += tptr->_offset; // correct if base is offseted
-        if( MacroAssembler::needs_explicit_null_check(offset) )
-          continue;             // Give up is reference is beyond 4K page size
+        // Give up if reference is beyond page size.
+        if (MacroAssembler::needs_explicit_null_check(offset))
+          continue;
+        // Give up if base is a decode node and the heap base is not protected.
+        if (base->is_Mach() && base->as_Mach()->ideal_Opcode() == Op_DecodeN &&
+            !Universe::narrow_oop_use_implicit_null_checks())
+          continue;
       }
     }
 
diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp
index 5d837d6ecb0..ff65d68d8c1 100644
--- a/hotspot/src/share/vm/opto/library_call.cpp
+++ b/hotspot/src/share/vm/opto/library_call.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -277,7 +277,8 @@ class LibraryCallKit : public GraphKit {
   AllocateArrayNode* tightly_coupled_allocation(Node* ptr,
                                                 RegionNode* slow_region);
   JVMState* arraycopy_restore_alloc_state(AllocateArrayNode* alloc, int& saved_reexecute_sp);
-  void arraycopy_move_allocation_here(AllocateArrayNode* alloc, Node* dest, JVMState* saved_jvms, int saved_reexecute_sp);
+  void arraycopy_move_allocation_here(AllocateArrayNode* alloc, Node* dest, JVMState* saved_jvms, int saved_reexecute_sp,
+                                      uint new_idx);
 
   typedef enum { LS_get_add, LS_get_set, LS_cmp_swap, LS_cmp_swap_weak, LS_cmp_exchange } LoadStoreKind;
   MemNode::MemOrd access_kind_to_memord_LS(AccessKind access_kind, bool is_store);
@@ -648,46 +649,46 @@ bool LibraryCallKit::try_to_inline(int predicate) {
   case vmIntrinsics::_putFloatOpaque:           return inline_unsafe_access( is_store, T_FLOAT,    Opaque, false);
   case vmIntrinsics::_putDoubleOpaque:          return inline_unsafe_access( is_store, T_DOUBLE,   Opaque, false);
 
-  case vmIntrinsics::_compareAndSwapObject:             return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap,      Volatile);
-  case vmIntrinsics::_compareAndSwapByte:               return inline_unsafe_load_store(T_BYTE,   LS_cmp_swap,      Volatile);
-  case vmIntrinsics::_compareAndSwapShort:              return inline_unsafe_load_store(T_SHORT,  LS_cmp_swap,      Volatile);
-  case vmIntrinsics::_compareAndSwapInt:                return inline_unsafe_load_store(T_INT,    LS_cmp_swap,      Volatile);
-  case vmIntrinsics::_compareAndSwapLong:               return inline_unsafe_load_store(T_LONG,   LS_cmp_swap,      Volatile);
+  case vmIntrinsics::_compareAndSetObject:              return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap,      Volatile);
+  case vmIntrinsics::_compareAndSetByte:                return inline_unsafe_load_store(T_BYTE,   LS_cmp_swap,      Volatile);
+  case vmIntrinsics::_compareAndSetShort:               return inline_unsafe_load_store(T_SHORT,  LS_cmp_swap,      Volatile);
+  case vmIntrinsics::_compareAndSetInt:                 return inline_unsafe_load_store(T_INT,    LS_cmp_swap,      Volatile);
+  case vmIntrinsics::_compareAndSetLong:                return inline_unsafe_load_store(T_LONG,   LS_cmp_swap,      Volatile);
 
-  case vmIntrinsics::_weakCompareAndSwapObject:         return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Relaxed);
-  case vmIntrinsics::_weakCompareAndSwapObjectAcquire:  return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Acquire);
-  case vmIntrinsics::_weakCompareAndSwapObjectRelease:  return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Release);
-  case vmIntrinsics::_weakCompareAndSwapObjectVolatile: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Volatile);
-  case vmIntrinsics::_weakCompareAndSwapByte:           return inline_unsafe_load_store(T_BYTE,   LS_cmp_swap_weak, Relaxed);
-  case vmIntrinsics::_weakCompareAndSwapByteAcquire:    return inline_unsafe_load_store(T_BYTE,   LS_cmp_swap_weak, Acquire);
-  case vmIntrinsics::_weakCompareAndSwapByteRelease:    return inline_unsafe_load_store(T_BYTE,   LS_cmp_swap_weak, Release);
-  case vmIntrinsics::_weakCompareAndSwapByteVolatile:   return inline_unsafe_load_store(T_BYTE,   LS_cmp_swap_weak, Volatile);
-  case vmIntrinsics::_weakCompareAndSwapShort:          return inline_unsafe_load_store(T_SHORT,  LS_cmp_swap_weak, Relaxed);
-  case vmIntrinsics::_weakCompareAndSwapShortAcquire:   return inline_unsafe_load_store(T_SHORT,  LS_cmp_swap_weak, Acquire);
-  case vmIntrinsics::_weakCompareAndSwapShortRelease:   return inline_unsafe_load_store(T_SHORT,  LS_cmp_swap_weak, Release);
-  case vmIntrinsics::_weakCompareAndSwapShortVolatile:  return inline_unsafe_load_store(T_SHORT,  LS_cmp_swap_weak, Volatile);
-  case vmIntrinsics::_weakCompareAndSwapInt:            return inline_unsafe_load_store(T_INT,    LS_cmp_swap_weak, Relaxed);
-  case vmIntrinsics::_weakCompareAndSwapIntAcquire:     return inline_unsafe_load_store(T_INT,    LS_cmp_swap_weak, Acquire);
-  case vmIntrinsics::_weakCompareAndSwapIntRelease:     return inline_unsafe_load_store(T_INT,    LS_cmp_swap_weak, Release);
-  case vmIntrinsics::_weakCompareAndSwapIntVolatile:    return inline_unsafe_load_store(T_INT,    LS_cmp_swap_weak, Volatile);
-  case vmIntrinsics::_weakCompareAndSwapLong:           return inline_unsafe_load_store(T_LONG,   LS_cmp_swap_weak, Relaxed);
-  case vmIntrinsics::_weakCompareAndSwapLongAcquire:    return inline_unsafe_load_store(T_LONG,   LS_cmp_swap_weak, Acquire);
-  case vmIntrinsics::_weakCompareAndSwapLongRelease:    return inline_unsafe_load_store(T_LONG,   LS_cmp_swap_weak, Release);
-  case vmIntrinsics::_weakCompareAndSwapLongVolatile:   return inline_unsafe_load_store(T_LONG,   LS_cmp_swap_weak, Volatile);
+  case vmIntrinsics::_weakCompareAndSetObjectPlain:     return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Relaxed);
+  case vmIntrinsics::_weakCompareAndSetObjectAcquire:   return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Acquire);
+  case vmIntrinsics::_weakCompareAndSetObjectRelease:   return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Release);
+  case vmIntrinsics::_weakCompareAndSetObject:          return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Volatile);
+  case vmIntrinsics::_weakCompareAndSetBytePlain:       return inline_unsafe_load_store(T_BYTE,   LS_cmp_swap_weak, Relaxed);
+  case vmIntrinsics::_weakCompareAndSetByteAcquire:     return inline_unsafe_load_store(T_BYTE,   LS_cmp_swap_weak, Acquire);
+  case vmIntrinsics::_weakCompareAndSetByteRelease:     return inline_unsafe_load_store(T_BYTE,   LS_cmp_swap_weak, Release);
+  case vmIntrinsics::_weakCompareAndSetByte:            return inline_unsafe_load_store(T_BYTE,   LS_cmp_swap_weak, Volatile);
+  case vmIntrinsics::_weakCompareAndSetShortPlain:      return inline_unsafe_load_store(T_SHORT,  LS_cmp_swap_weak, Relaxed);
+  case vmIntrinsics::_weakCompareAndSetShortAcquire:    return inline_unsafe_load_store(T_SHORT,  LS_cmp_swap_weak, Acquire);
+  case vmIntrinsics::_weakCompareAndSetShortRelease:    return inline_unsafe_load_store(T_SHORT,  LS_cmp_swap_weak, Release);
+  case vmIntrinsics::_weakCompareAndSetShort:           return inline_unsafe_load_store(T_SHORT,  LS_cmp_swap_weak, Volatile);
+  case vmIntrinsics::_weakCompareAndSetIntPlain:        return inline_unsafe_load_store(T_INT,    LS_cmp_swap_weak, Relaxed);
+  case vmIntrinsics::_weakCompareAndSetIntAcquire:      return inline_unsafe_load_store(T_INT,    LS_cmp_swap_weak, Acquire);
+  case vmIntrinsics::_weakCompareAndSetIntRelease:      return inline_unsafe_load_store(T_INT,    LS_cmp_swap_weak, Release);
+  case vmIntrinsics::_weakCompareAndSetInt:             return inline_unsafe_load_store(T_INT,    LS_cmp_swap_weak, Volatile);
+  case vmIntrinsics::_weakCompareAndSetLongPlain:       return inline_unsafe_load_store(T_LONG,   LS_cmp_swap_weak, Relaxed);
+  case vmIntrinsics::_weakCompareAndSetLongAcquire:     return inline_unsafe_load_store(T_LONG,   LS_cmp_swap_weak, Acquire);
+  case vmIntrinsics::_weakCompareAndSetLongRelease:     return inline_unsafe_load_store(T_LONG,   LS_cmp_swap_weak, Release);
+  case vmIntrinsics::_weakCompareAndSetLong:            return inline_unsafe_load_store(T_LONG,   LS_cmp_swap_weak, Volatile);
 
-  case vmIntrinsics::_compareAndExchangeObjectVolatile: return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange,  Volatile);
+  case vmIntrinsics::_compareAndExchangeObject:         return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange,  Volatile);
   case vmIntrinsics::_compareAndExchangeObjectAcquire:  return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange,  Acquire);
   case vmIntrinsics::_compareAndExchangeObjectRelease:  return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange,  Release);
-  case vmIntrinsics::_compareAndExchangeByteVolatile:   return inline_unsafe_load_store(T_BYTE,   LS_cmp_exchange,  Volatile);
+  case vmIntrinsics::_compareAndExchangeByte:           return inline_unsafe_load_store(T_BYTE,   LS_cmp_exchange,  Volatile);
   case vmIntrinsics::_compareAndExchangeByteAcquire:    return inline_unsafe_load_store(T_BYTE,   LS_cmp_exchange,  Acquire);
   case vmIntrinsics::_compareAndExchangeByteRelease:    return inline_unsafe_load_store(T_BYTE,   LS_cmp_exchange,  Release);
-  case vmIntrinsics::_compareAndExchangeShortVolatile:  return inline_unsafe_load_store(T_SHORT,  LS_cmp_exchange,  Volatile);
+  case vmIntrinsics::_compareAndExchangeShort:          return inline_unsafe_load_store(T_SHORT,  LS_cmp_exchange,  Volatile);
   case vmIntrinsics::_compareAndExchangeShortAcquire:   return inline_unsafe_load_store(T_SHORT,  LS_cmp_exchange,  Acquire);
   case vmIntrinsics::_compareAndExchangeShortRelease:   return inline_unsafe_load_store(T_SHORT,  LS_cmp_exchange,  Release);
-  case vmIntrinsics::_compareAndExchangeIntVolatile:    return inline_unsafe_load_store(T_INT,    LS_cmp_exchange,  Volatile);
+  case vmIntrinsics::_compareAndExchangeInt:            return inline_unsafe_load_store(T_INT,    LS_cmp_exchange,  Volatile);
   case vmIntrinsics::_compareAndExchangeIntAcquire:     return inline_unsafe_load_store(T_INT,    LS_cmp_exchange,  Acquire);
   case vmIntrinsics::_compareAndExchangeIntRelease:     return inline_unsafe_load_store(T_INT,    LS_cmp_exchange,  Release);
-  case vmIntrinsics::_compareAndExchangeLongVolatile:   return inline_unsafe_load_store(T_LONG,   LS_cmp_exchange,  Volatile);
+  case vmIntrinsics::_compareAndExchangeLong:           return inline_unsafe_load_store(T_LONG,   LS_cmp_exchange,  Volatile);
   case vmIntrinsics::_compareAndExchangeLongAcquire:    return inline_unsafe_load_store(T_LONG,   LS_cmp_exchange,  Acquire);
   case vmIntrinsics::_compareAndExchangeLongRelease:    return inline_unsafe_load_store(T_LONG,   LS_cmp_exchange,  Release);
 
@@ -1667,6 +1668,9 @@ bool LibraryCallKit::inline_string_char_access(bool is_store) {
   }
 
   Node* adr = array_element_address(value, index, T_CHAR);
+  if (adr->is_top()) {
+    return false;
+  }
   if (is_store) {
     (void) store_to_memory(control(), adr, ch, T_CHAR, TypeAryPtr::BYTES, MemNode::unordered,
                            false, false, true /* mismatched */);
@@ -2371,10 +2375,10 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
   // the barriers get omitted and the unsafe reference begins to "pollute"
   // the alias analysis of the rest of the graph, either Compile::can_alias
   // or Compile::must_alias will throw a diagnostic assert.)
-  bool need_mem_bar;
+  bool need_mem_bar = false;
   switch (kind) {
       case Relaxed:
-          need_mem_bar = mismatched || can_access_non_heap;
+          need_mem_bar = mismatched && !adr_type->isa_aryptr();
           break;
       case Opaque:
           // Opaque uses CPUOrder membars for protection against code movement.
@@ -2583,23 +2587,26 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
 //
 // LS_cmp_swap:
 //
-//   boolean compareAndSwapObject(Object o, long offset, Object expected, Object x);
-//   boolean compareAndSwapInt(   Object o, long offset, int    expected, int    x);
-//   boolean compareAndSwapLong(  Object o, long offset, long   expected, long   x);
+//   boolean compareAndSetObject(Object o, long offset, Object expected, Object x);
+//   boolean compareAndSetInt(   Object o, long offset, int    expected, int    x);
+//   boolean compareAndSetLong(  Object o, long offset, long   expected, long   x);
 //
 // LS_cmp_swap_weak:
 //
-//   boolean weakCompareAndSwapObject(       Object o, long offset, Object expected, Object x);
-//   boolean weakCompareAndSwapObjectAcquire(Object o, long offset, Object expected, Object x);
-//   boolean weakCompareAndSwapObjectRelease(Object o, long offset, Object expected, Object x);
+//   boolean weakCompareAndSetObject(       Object o, long offset, Object expected, Object x);
+//   boolean weakCompareAndSetObjectPlain(  Object o, long offset, Object expected, Object x);
+//   boolean weakCompareAndSetObjectAcquire(Object o, long offset, Object expected, Object x);
+//   boolean weakCompareAndSetObjectRelease(Object o, long offset, Object expected, Object x);
 //
-//   boolean weakCompareAndSwapInt(          Object o, long offset, int    expected, int    x);
-//   boolean weakCompareAndSwapIntAcquire(   Object o, long offset, int    expected, int    x);
-//   boolean weakCompareAndSwapIntRelease(   Object o, long offset, int    expected, int    x);
+//   boolean weakCompareAndSetInt(          Object o, long offset, int    expected, int    x);
+//   boolean weakCompareAndSetIntPlain(     Object o, long offset, int    expected, int    x);
+//   boolean weakCompareAndSetIntAcquire(   Object o, long offset, int    expected, int    x);
+//   boolean weakCompareAndSetIntRelease(   Object o, long offset, int    expected, int    x);
 //
-//   boolean weakCompareAndSwapLong(         Object o, long offset, long   expected, long   x);
-//   boolean weakCompareAndSwapLongAcquire(  Object o, long offset, long   expected, long   x);
-//   boolean weakCompareAndSwapLongRelease(  Object o, long offset, long   expected, long   x);
+//   boolean weakCompareAndSetLong(         Object o, long offset, long   expected, long   x);
+//   boolean weakCompareAndSetLongPlain(    Object o, long offset, long   expected, long   x);
+//   boolean weakCompareAndSetLongAcquire(  Object o, long offset, long   expected, long   x);
+//   boolean weakCompareAndSetLongRelease(  Object o, long offset, long   expected, long   x);
 //
 // LS_cmp_exchange:
 //
@@ -3017,7 +3024,7 @@ bool LibraryCallKit::inline_unsafe_load_store(const BasicType type, const LoadSt
       load_store = _gvn.transform(new DecodeNNode(load_store, load_store->get_ptr_type()));
     }
 #endif
-    if (can_move_pre_barrier()) {
+    if (can_move_pre_barrier() && kind == LS_get_set) {
       // Don't need to load pre_val. The old value is returned by load_store.
       // The pre_barrier can execute after the xchg as long as no safepoint
       // gets inserted between them.
@@ -4882,7 +4889,8 @@ JVMState* LibraryCallKit::arraycopy_restore_alloc_state(AllocateArrayNode* alloc
 // deoptimize. This is possible because tightly_coupled_allocation()
 // guarantees there's no observer of the allocated array at this point
 // and the control flow is simple enough.
-void LibraryCallKit::arraycopy_move_allocation_here(AllocateArrayNode* alloc, Node* dest, JVMState* saved_jvms, int saved_reexecute_sp) {
+void LibraryCallKit::arraycopy_move_allocation_here(AllocateArrayNode* alloc, Node* dest, JVMState* saved_jvms,
+                                                    int saved_reexecute_sp, uint new_idx) {
   if (saved_jvms != NULL && !stopped()) {
     assert(alloc != NULL, "only with a tightly coupled allocation");
     // restore JVM state to the state at the arraycopy
@@ -4891,7 +4899,7 @@ void LibraryCallKit::arraycopy_move_allocation_here(AllocateArrayNode* alloc, No
     assert(saved_jvms->map()->i_o() == map()->i_o(), "IO state changed?");
     // If we've improved the types of some nodes (null check) while
     // emitting the guards, propagate them to the current state
-    map()->replaced_nodes().apply(saved_jvms->map());
+    map()->replaced_nodes().apply(saved_jvms->map(), new_idx);
     set_jvms(saved_jvms);
     _reexecute_sp = saved_reexecute_sp;
 
@@ -4949,6 +4957,7 @@ bool LibraryCallKit::inline_arraycopy() {
   Node* dest_offset = argument(3);  // type: int
   Node* length      = argument(4);  // type: int
 
+  uint new_idx = C->unique();
 
   // Check for allocation before we add nodes that would confuse
   // tightly_coupled_allocation()
@@ -4959,7 +4968,7 @@ bool LibraryCallKit::inline_arraycopy() {
   // See arraycopy_restore_alloc_state() comment
   // if alloc == NULL we don't have to worry about a tightly coupled allocation so we can emit all needed guards
   // if saved_jvms != NULL (then alloc != NULL) then we can handle guards and a tightly coupled allocation
-  // if saved_jvms == NULL and alloc != NULL, we can’t emit any guards
+  // if saved_jvms == NULL and alloc != NULL, we can't emit any guards
   bool can_emit_guards = (alloc == NULL || saved_jvms != NULL);
 
   // The following tests must be performed
@@ -5162,9 +5171,13 @@ bool LibraryCallKit::inline_arraycopy() {
                     Deoptimization::Action_make_not_entrant);
       assert(stopped(), "Should be stopped");
     }
+
+    const TypeKlassPtr* dest_klass_t = _gvn.type(dest_klass)->is_klassptr();
+    const Type *toop = TypeOopPtr::make_from_klass(dest_klass_t->klass());
+    src = _gvn.transform(new CheckCastPPNode(control(), src, toop));
   }
 
-  arraycopy_move_allocation_here(alloc, dest, saved_jvms, saved_reexecute_sp);
+  arraycopy_move_allocation_here(alloc, dest, saved_jvms, saved_reexecute_sp, new_idx);
 
   if (stopped()) {
     return true;
diff --git a/hotspot/src/share/vm/opto/loopTransform.cpp b/hotspot/src/share/vm/opto/loopTransform.cpp
index d35d71aebd4..7590ba66b5a 100644
--- a/hotspot/src/share/vm/opto/loopTransform.cpp
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp
@@ -3174,6 +3174,11 @@ bool PhaseIdealLoop::intrinsify_fill(IdealLoopTree* lpt) {
     return false;
   }
 
+  Node* exit = head->loopexit()->proj_out(0);
+  if (exit == NULL) {
+    return false;
+  }
+
 #ifndef PRODUCT
   if (TraceLoopOpts) {
     tty->print("ArrayFill    ");
@@ -3281,7 +3286,6 @@ bool PhaseIdealLoop::intrinsify_fill(IdealLoopTree* lpt) {
 */
 
   // Redirect the old control and memory edges that are outside the loop.
-  Node* exit = head->loopexit()->proj_out(0);
   // Sometimes the memory phi of the head is used as the outgoing
   // state of the loop.  It's safe in this case to replace it with the
   // result_mem.
diff --git a/hotspot/src/share/vm/opto/loopnode.cpp b/hotspot/src/share/vm/opto/loopnode.cpp
index 7909014b53e..f605e204668 100644
--- a/hotspot/src/share/vm/opto/loopnode.cpp
+++ b/hotspot/src/share/vm/opto/loopnode.cpp
@@ -1860,6 +1860,9 @@ void IdealLoopTree::dump_head( ) const {
   if (_required_safept != NULL && _required_safept->size() > 0) {
     tty->print(" req={"); _required_safept->dump_simple(); tty->print(" }");
   }
+  if (Verbose) {
+    tty->print(" body={"); _body.dump_simple(); tty->print(" }");
+  }
   tty->cr();
 }
 
diff --git a/hotspot/src/share/vm/opto/loopopts.cpp b/hotspot/src/share/vm/opto/loopopts.cpp
index bd00791aee0..6de29ab35af 100644
--- a/hotspot/src/share/vm/opto/loopopts.cpp
+++ b/hotspot/src/share/vm/opto/loopopts.cpp
@@ -913,7 +913,11 @@ Node *PhaseIdealLoop::split_if_with_blocks_pre( Node *n ) {
 
   if (n->is_ConstraintCast()) {
     Node* dom_cast = n->as_ConstraintCast()->dominating_cast(this);
-    if (dom_cast != NULL) {
+    // ConstraintCastNode::dominating_cast() uses node control input to determine domination.
+    // Node control inputs don't necessarily agree with loop control info (due to
+    // transformations happened in between), thus additional dominance check is needed
+    // to keep loop info valid.
+    if (dom_cast != NULL && is_dominator(get_ctrl(dom_cast), get_ctrl(n))) {
       _igvn.replace_node(n, dom_cast);
       return dom_cast;
     }
diff --git a/hotspot/src/share/vm/opto/macro.cpp b/hotspot/src/share/vm/opto/macro.cpp
index bd0a1b75c9a..ed3ef88aa65 100644
--- a/hotspot/src/share/vm/opto/macro.cpp
+++ b/hotspot/src/share/vm/opto/macro.cpp
@@ -1047,7 +1047,9 @@ void PhaseMacroExpand::process_users_of_allocation(CallNode *alloc) {
         // opportunities for allocation elimination
         Node* src = ac->in(ArrayCopyNode::Src);
         ac->replace_edge(src, top());
-        if (src->outcnt() == 0) {
+        // src can be top at this point if src and dest of the
+        // arraycopy were the same
+        if (src->outcnt() == 0 && !src->is_top()) {
           _igvn.remove_dead_node(src);
         }
 
diff --git a/hotspot/src/share/vm/opto/macroArrayCopy.cpp b/hotspot/src/share/vm/opto/macroArrayCopy.cpp
index fb55efedb95..cd6983f97a7 100644
--- a/hotspot/src/share/vm/opto/macroArrayCopy.cpp
+++ b/hotspot/src/share/vm/opto/macroArrayCopy.cpp
@@ -718,6 +718,15 @@ Node* PhaseMacroExpand::generate_arraycopy(ArrayCopyNode *ac, AllocateArrayNode*
   _igvn.replace_node(_ioproj_fallthrough, *io);
   _igvn.replace_node(_fallthroughcatchproj, *ctrl);
 
+#ifdef ASSERT
+  const TypeOopPtr* dest_t = _igvn.type(dest)->is_oopptr();
+  if (dest_t->is_known_instance()) {
+    ArrayCopyNode* ac = NULL;
+    assert(ArrayCopyNode::may_modify(dest_t, (*ctrl)->in(0)->as_MemBar(), &_igvn, ac), "dependency on arraycopy lost");
+    assert(ac == NULL, "no arraycopy anymore");
+  }
+#endif
+
   return out_mem;
 }
 
@@ -1139,8 +1148,25 @@ void PhaseMacroExpand::expand_arraycopy_node(ArrayCopyNode *ac) {
   const TypeAryPtr* top_src = src_type->isa_aryptr();
   const TypeAryPtr* top_dest = dest_type->isa_aryptr();
 
-  if (top_src  == NULL || top_src->klass()  == NULL ||
-      top_dest == NULL || top_dest->klass() == NULL) {
+  BasicType src_elem = T_CONFLICT;
+  BasicType dest_elem = T_CONFLICT;
+
+  if (top_dest != NULL && top_dest->klass() != NULL) {
+    dest_elem = top_dest->klass()->as_array_klass()->element_type()->basic_type();
+  }
+  if (top_src != NULL && top_src->klass() != NULL) {
+    src_elem = top_src->klass()->as_array_klass()->element_type()->basic_type();
+  }
+  if (src_elem  == T_ARRAY)  src_elem  = T_OBJECT;
+  if (dest_elem == T_ARRAY)  dest_elem = T_OBJECT;
+
+  if (ac->is_arraycopy_validated() &&
+      dest_elem != T_CONFLICT &&
+      src_elem == T_CONFLICT) {
+    src_elem = dest_elem;
+  }
+
+  if (src_elem == T_CONFLICT || dest_elem == T_CONFLICT) {
     // Conservatively insert a memory barrier on all memory slices.
     // Do not let writes into the source float below the arraycopy.
     {
@@ -1169,13 +1195,11 @@ void PhaseMacroExpand::expand_arraycopy_node(ArrayCopyNode *ac) {
     }
     return;
   }
+
+  assert(!ac->is_arraycopy_validated() || (src_elem == dest_elem && dest_elem != T_VOID), "validated but different basic types");
+
   // (2) src and dest arrays must have elements of the same BasicType
   // Figure out the size and type of the elements we will be copying.
-  BasicType src_elem  = top_src->klass()->as_array_klass()->element_type()->basic_type();
-  BasicType dest_elem = top_dest->klass()->as_array_klass()->element_type()->basic_type();
-  if (src_elem  == T_ARRAY)  src_elem  = T_OBJECT;
-  if (dest_elem == T_ARRAY)  dest_elem = T_OBJECT;
-
   if (src_elem != dest_elem || dest_elem == T_VOID) {
     // The component types are not the same or are not recognized.  Punt.
     // (But, avoid the native method wrapper to JVM_ArrayCopy.)
diff --git a/hotspot/src/share/vm/opto/matcher.cpp b/hotspot/src/share/vm/opto/matcher.cpp
index 698b0bae068..f58bc97cfc9 100644
--- a/hotspot/src/share/vm/opto/matcher.cpp
+++ b/hotspot/src/share/vm/opto/matcher.cpp
@@ -1000,7 +1000,7 @@ Node *Matcher::xform( Node *n, int max_stack ) {
             if (C->failing())  return NULL;
             if (m == NULL) { Matcher::soft_match_failure(); return NULL; }
           } else {                  // Nothing the matcher cares about
-            if( n->is_Proj() && n->in(0)->is_Multi()) {       // Projections?
+            if (n->is_Proj() && n->in(0) != NULL && n->in(0)->is_Multi()) {       // Projections?
               // Convert to machine-dependent projection
               m = n->in(0)->as_Multi()->match( n->as_Proj(), this );
 #ifdef ASSERT
@@ -1645,6 +1645,7 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) {
 
   // Build the object to represent this state & prepare for recursive calls
   MachNode *mach = s->MachNodeGenerator(rule);
+  guarantee(mach != NULL, "Missing MachNode");
   mach->_opnds[0] = s->MachOperGenerator(_reduceOp[rule]);
   assert( mach->_opnds[0] != NULL, "Missing result operand" );
   Node *leaf = s->_leaf;
diff --git a/hotspot/src/share/vm/opto/memnode.cpp b/hotspot/src/share/vm/opto/memnode.cpp
index 445192c1da4..740c5892666 100644
--- a/hotspot/src/share/vm/opto/memnode.cpp
+++ b/hotspot/src/share/vm/opto/memnode.cpp
@@ -61,6 +61,15 @@ const TypePtr *MemNode::adr_type() const {
   return calculate_adr_type(adr->bottom_type(), cross_check);
 }
 
+bool MemNode::check_if_adr_maybe_raw(Node* adr) {
+  if (adr != NULL) {
+    if (adr->bottom_type()->base() == Type::RawPtr || adr->bottom_type()->base() == Type::AnyPtr) {
+      return true;
+    }
+  }
+  return false;
+}
+
 #ifndef PRODUCT
 void MemNode::dump_spec(outputStream *st) const {
   if (in(Address) == NULL)  return; // node is dead
@@ -560,6 +569,7 @@ Node* MemNode::find_previous_store(PhaseTransform* phase) {
   if (offset == Type::OffsetBot)
     return NULL;            // cannot unalias unless there are precise offsets
 
+  const bool adr_maybe_raw = check_if_adr_maybe_raw(adr);
   const TypeOopPtr *addr_t = adr->bottom_type()->isa_oopptr();
 
   intptr_t size_in_bytes = memory_size();
@@ -577,6 +587,13 @@ Node* MemNode::find_previous_store(PhaseTransform* phase) {
       Node* st_base = AddPNode::Ideal_base_and_offset(st_adr, phase, st_offset);
       if (st_base == NULL)
         break;              // inscrutable pointer
+
+      // For raw accesses it's not enough to prove that constant offsets don't intersect.
+      // We need the bases to be the equal in order for the offset check to make sense.
+      if ((adr_maybe_raw || check_if_adr_maybe_raw(st_adr)) && st_base != base) {
+        break;
+      }
+
       if (st_offset != offset && st_offset != Type::OffsetBot) {
         const int MAX_STORE = BytesPerLong;
         if (st_offset >= offset + size_in_bytes ||
@@ -868,7 +885,7 @@ static bool skip_through_membars(Compile::AliasType* atp, const TypeInstPtr* tp,
 // Is the value loaded previously stored by an arraycopy? If so return
 // a load node that reads from the source array so we may be able to
 // optimize out the ArrayCopy node later.
-Node* LoadNode::can_see_arraycopy_value(Node* st, PhaseTransform* phase) const {
+Node* LoadNode::can_see_arraycopy_value(Node* st, PhaseGVN* phase) const {
   Node* ld_adr = in(MemNode::Address);
   intptr_t ld_off = 0;
   AllocateNode* ld_alloc = AllocateNode::Ideal_allocation(ld_adr, phase, ld_off);
@@ -876,25 +893,30 @@ Node* LoadNode::can_see_arraycopy_value(Node* st, PhaseTransform* phase) const {
   if (ac != NULL) {
     assert(ac->is_ArrayCopy(), "what kind of node can this be?");
 
-    Node* ld = clone();
+    Node* mem = ac->in(TypeFunc::Memory);
+    Node* ctl = ac->in(0);
+    Node* src = ac->in(ArrayCopyNode::Src);
+
+    if (!ac->as_ArrayCopy()->is_clonebasic() && !phase->type(src)->isa_aryptr()) {
+      return NULL;
+    }
+
+    LoadNode* ld = clone()->as_Load();
+    Node* addp = in(MemNode::Address)->clone();
     if (ac->as_ArrayCopy()->is_clonebasic()) {
       assert(ld_alloc != NULL, "need an alloc");
-      Node* addp = in(MemNode::Address)->clone();
       assert(addp->is_AddP(), "address must be addp");
       assert(addp->in(AddPNode::Base) == ac->in(ArrayCopyNode::Dest)->in(AddPNode::Base), "strange pattern");
       assert(addp->in(AddPNode::Address) == ac->in(ArrayCopyNode::Dest)->in(AddPNode::Address), "strange pattern");
-      addp->set_req(AddPNode::Base, ac->in(ArrayCopyNode::Src)->in(AddPNode::Base));
-      addp->set_req(AddPNode::Address, ac->in(ArrayCopyNode::Src)->in(AddPNode::Address));
-      ld->set_req(MemNode::Address, phase->transform(addp));
-      if (in(0) != NULL) {
-        assert(ld_alloc->in(0) != NULL, "alloc must have control");
-        ld->set_req(0, ld_alloc->in(0));
-      }
+      addp->set_req(AddPNode::Base, src->in(AddPNode::Base));
+      addp->set_req(AddPNode::Address, src->in(AddPNode::Address));
     } else {
-      Node* addp = in(MemNode::Address)->clone();
+      assert(ac->as_ArrayCopy()->is_arraycopy_validated() ||
+             ac->as_ArrayCopy()->is_copyof_validated() ||
+             ac->as_ArrayCopy()->is_copyofrange_validated(), "only supported cases");
       assert(addp->in(AddPNode::Base) == addp->in(AddPNode::Address), "should be");
-      addp->set_req(AddPNode::Base, ac->in(ArrayCopyNode::Src));
-      addp->set_req(AddPNode::Address, ac->in(ArrayCopyNode::Src));
+      addp->set_req(AddPNode::Base, src);
+      addp->set_req(AddPNode::Address, src);
 
       const TypeAryPtr* ary_t = phase->type(in(MemNode::Address))->isa_aryptr();
       BasicType ary_elem  = ary_t->klass()->as_array_klass()->element_type()->basic_type();
@@ -909,15 +931,17 @@ Node* LoadNode::can_see_arraycopy_value(Node* st, PhaseTransform* phase) const {
 
       Node* offset = phase->transform(new AddXNode(addp->in(AddPNode::Offset), diff));
       addp->set_req(AddPNode::Offset, offset);
-      ld->set_req(MemNode::Address, phase->transform(addp));
-
-      if (in(0) != NULL) {
-        assert(ac->in(0) != NULL, "alloc must have control");
-        ld->set_req(0, ac->in(0));
-      }
     }
+    addp = phase->transform(addp);
+#ifdef ASSERT
+    const TypePtr* adr_type = phase->type(addp)->is_ptr();
+    ld->_adr_type = adr_type;
+#endif
+    ld->set_req(MemNode::Address, addp);
+    ld->set_req(0, ctl);
+    ld->set_req(MemNode::Memory, mem);
     // load depends on the tests that validate the arraycopy
-    ld->as_Load()->_control_dependency = Pinned;
+    ld->_control_dependency = Pinned;
     return ld;
   }
   return NULL;
@@ -1106,6 +1130,9 @@ Node* LoadNode::Identity(PhaseGVN* phase) {
       // Use _idx of address base (could be Phi node) for boxed values.
       intptr_t   ignore = 0;
       Node*      base = AddPNode::Ideal_base_and_offset(in(Address), phase, ignore);
+      if (base == NULL) {
+        return this;
+      }
       this_iid = base->_idx;
     }
     const Type* this_type = bottom_type();
@@ -3930,9 +3957,10 @@ Node* InitializeNode::complete_stores(Node* rawctl, Node* rawmem, Node* rawptr,
     // if it is the last unused 4 bytes of an instance, forget about it
     intptr_t size_limit = phase->find_intptr_t_con(size_in_bytes, max_jint);
     if (zeroes_done + BytesPerLong >= size_limit) {
-      assert(allocation() != NULL, "");
-      if (allocation()->Opcode() == Op_Allocate) {
-        Node* klass_node = allocation()->in(AllocateNode::KlassNode);
+      AllocateNode* alloc = allocation();
+      assert(alloc != NULL, "must be present");
+      if (alloc != NULL && alloc->Opcode() == Op_Allocate) {
+        Node* klass_node = alloc->in(AllocateNode::KlassNode);
         ciKlass* k = phase->type(klass_node)->is_klassptr()->klass();
         if (zeroes_done == k->layout_helper())
           zeroes_done = size_limit;
diff --git a/hotspot/src/share/vm/opto/memnode.hpp b/hotspot/src/share/vm/opto/memnode.hpp
index f0608bc752d..eb421b86f7b 100644
--- a/hotspot/src/share/vm/opto/memnode.hpp
+++ b/hotspot/src/share/vm/opto/memnode.hpp
@@ -78,6 +78,7 @@ protected:
   }
 
   virtual Node* find_previous_arraycopy(PhaseTransform* phase, Node* ld_alloc, Node*& mem, bool can_see_stored_value) const { return NULL; }
+  static bool check_if_adr_maybe_raw(Node* adr);
 
 public:
   // Helpers for the optimizer.  Documented in memnode.cpp.
@@ -269,7 +270,7 @@ protected:
   const Type* load_array_final_field(const TypeKlassPtr *tkls,
                                      ciKlass* klass) const;
 
-  Node* can_see_arraycopy_value(Node* st, PhaseTransform* phase) const;
+  Node* can_see_arraycopy_value(Node* st, PhaseGVN* phase) const;
 
   // depends_only_on_test is almost always true, and needs to be almost always
   // true to enable key hoisting & commoning optimizations.  However, for the
diff --git a/hotspot/src/share/vm/opto/parse1.cpp b/hotspot/src/share/vm/opto/parse1.cpp
index be1d82d7554..35d099bdeda 100644
--- a/hotspot/src/share/vm/opto/parse1.cpp
+++ b/hotspot/src/share/vm/opto/parse1.cpp
@@ -1086,7 +1086,7 @@ void Parse::do_exits() {
         kit.make_dtrace_method_exit(method());
       }
       if (_replaced_nodes_for_exceptions) {
-        kit.map()->apply_replaced_nodes();
+        kit.map()->apply_replaced_nodes(_new_idx);
       }
       // Done with exception-path processing.
       ex_map = kit.make_exception_state(ex_oop);
@@ -1107,7 +1107,7 @@ void Parse::do_exits() {
       _exits.add_exception_state(ex_map);
     }
   }
-  _exits.map()->apply_replaced_nodes();
+  _exits.map()->apply_replaced_nodes(_new_idx);
 }
 
 //-----------------------------create_entry_map-------------------------------
diff --git a/hotspot/src/share/vm/opto/parse2.cpp b/hotspot/src/share/vm/opto/parse2.cpp
index c8553ce798b..51538767fde 100644
--- a/hotspot/src/share/vm/opto/parse2.cpp
+++ b/hotspot/src/share/vm/opto/parse2.cpp
@@ -826,6 +826,9 @@ float Parse::dynamic_branch_prediction(float &cnt, BoolTest::mask btest, Node* t
     ciMethodData* methodData = method()->method_data();
     if (!methodData->is_mature())  return PROB_UNKNOWN;
     ciProfileData* data = methodData->bci_to_data(bci());
+    if (data == NULL) {
+      return PROB_UNKNOWN;
+    }
     if (!data->is_JumpData())  return PROB_UNKNOWN;
 
     // get taken and not taken values
@@ -917,8 +920,8 @@ float Parse::branch_prediction(float& cnt,
         // of the OSR-ed method, and we want to deopt to gather more stats.
         // If you have ANY counts, then this loop is simply 'cold' relative
         // to the OSR loop.
-        if (data->as_BranchData()->taken() +
-            data->as_BranchData()->not_taken() == 0 ) {
+        if (data == NULL ||
+            (data->as_BranchData()->taken() +  data->as_BranchData()->not_taken() == 0)) {
           // This is the only way to return PROB_UNKNOWN:
           return PROB_UNKNOWN;
         }
diff --git a/hotspot/src/share/vm/opto/parse3.cpp b/hotspot/src/share/vm/opto/parse3.cpp
index ca571af0dd2..ee0997e6913 100644
--- a/hotspot/src/share/vm/opto/parse3.cpp
+++ b/hotspot/src/share/vm/opto/parse3.cpp
@@ -146,8 +146,16 @@ void Parse::do_field_access(bool is_get, bool is_field) {
 
 
 void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) {
+  BasicType bt = field->layout_type();
+
   // Does this field have a constant value?  If so, just push the value.
-  if (field->is_constant()) {
+  if (field->is_constant() &&
+      // Keep consistent with types found by ciTypeFlow: for an
+      // unloaded field type, ciTypeFlow::StateVector::do_getstatic()
+      // speculates the field is null. The code in the rest of this
+      // method does the same. We must not bypass it and use a non
+      // null constant here.
+      (bt != T_OBJECT || field->type()->is_loaded())) {
     // final or stable field
     Node* con = make_constant_from_field(field, obj);
     if (con != NULL) {
@@ -163,7 +171,6 @@ void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) {
   int offset = field->offset_in_bytes();
   const TypePtr* adr_type = C->alias_type(field)->adr_type();
   Node *adr = basic_plus_adr(obj, obj, offset);
-  BasicType bt = field->layout_type();
 
   // Build the resultant type of the load
   const Type *type;
diff --git a/hotspot/src/share/vm/opto/replacednodes.cpp b/hotspot/src/share/vm/opto/replacednodes.cpp
index e3f3c113572..68928fc1601 100644
--- a/hotspot/src/share/vm/opto/replacednodes.cpp
+++ b/hotspot/src/share/vm/opto/replacednodes.cpp
@@ -92,13 +92,17 @@ void ReplacedNodes::reset() {
 }
 
 // Perfom node replacement (used when returning to caller)
-void ReplacedNodes::apply(Node* n) {
+void ReplacedNodes::apply(Node* n, uint idx) {
   if (is_empty()) {
     return;
   }
   for (int i = 0; i < _replaced_nodes->length(); i++) {
     ReplacedNode replaced = _replaced_nodes->at(i);
-    n->replace_edge(replaced.initial(), replaced.improved());
+    // Only apply if improved node was created in a callee to avoid
+    // issues with irreducible loops in the caller
+    if (replaced.improved()->_idx >= idx) {
+      n->replace_edge(replaced.initial(), replaced.improved());
+    }
   }
 }
 
diff --git a/hotspot/src/share/vm/opto/replacednodes.hpp b/hotspot/src/share/vm/opto/replacednodes.hpp
index 0f68fe986d5..3c31d0de903 100644
--- a/hotspot/src/share/vm/opto/replacednodes.hpp
+++ b/hotspot/src/share/vm/opto/replacednodes.hpp
@@ -71,7 +71,7 @@ class ReplacedNodes VALUE_OBJ_CLASS_SPEC {
   void record(Node* initial, Node* improved);
   void transfer_from(const ReplacedNodes& other, uint idx);
   void reset();
-  void apply(Node* n);
+  void apply(Node* n, uint idx);
   void merge_with(const ReplacedNodes& other);
   bool is_empty() const;
   void dump(outputStream *st) const;
diff --git a/hotspot/src/share/vm/opto/stringopts.cpp b/hotspot/src/share/vm/opto/stringopts.cpp
index 85151b0b99e..889353dabfe 100644
--- a/hotspot/src/share/vm/opto/stringopts.cpp
+++ b/hotspot/src/share/vm/opto/stringopts.cpp
@@ -891,8 +891,9 @@ bool StringConcat::validate_control_flow() {
       ctrl_path.push(cn);
       ctrl_path.push(cn->proj_out(0));
       ctrl_path.push(cn->proj_out(0)->unique_out());
-      if (cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0) != NULL) {
-        ctrl_path.push(cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0));
+      Node* catchproj = cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0);
+      if (catchproj != NULL) {
+        ctrl_path.push(catchproj);
       }
     } else {
       ShouldNotReachHere();
diff --git a/hotspot/src/share/vm/opto/type.cpp b/hotspot/src/share/vm/opto/type.cpp
index a8c68006020..6411307c517 100644
--- a/hotspot/src/share/vm/opto/type.cpp
+++ b/hotspot/src/share/vm/opto/type.cpp
@@ -373,7 +373,7 @@ const Type* Type::make_constant_from_field(ciField* field, ciInstance* holder,
   if (con_type != NULL && field->is_call_site_target()) {
     ciCallSite* call_site = holder->as_call_site();
     if (!call_site->is_constant_call_site()) {
-      ciMethodHandle* target = call_site->get_target();
+      ciMethodHandle* target = con.as_object()->as_method_handle();
       Compile::current()->dependencies()->assert_call_site_target_value(call_site, target);
     }
   }
diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp
index f519e5e2788..acda443267a 100644
--- a/hotspot/src/share/vm/prims/jni.cpp
+++ b/hotspot/src/share/vm/prims/jni.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -935,8 +935,7 @@ class JNI_ArgumentPusherVaArg : public JNI_ArgumentPusher {
   inline void get_long()   { _arguments->push_long(va_arg(_ap, jlong)); }
   inline void get_float()  { _arguments->push_float((jfloat)va_arg(_ap, jdouble)); } // float is coerced to double w/ va_arg
   inline void get_double() { _arguments->push_double(va_arg(_ap, jdouble)); }
-  inline void get_object() { jobject l = va_arg(_ap, jobject);
-                             _arguments->push_oop(Handle((oop *)l, false)); }
+  inline void get_object() { _arguments->push_jobject(va_arg(_ap, jobject)); }
 
   inline void set_ap(va_list rap) {
     va_copy(_ap, rap);
@@ -1025,7 +1024,7 @@ class JNI_ArgumentPusherArray : public JNI_ArgumentPusher {
   inline void get_long()   { _arguments->push_long((_ap++)->j);  }
   inline void get_float()  { _arguments->push_float((_ap++)->f); }
   inline void get_double() { _arguments->push_double((_ap++)->d);}
-  inline void get_object() { _arguments->push_oop(Handle((oop *)(_ap++)->l, false)); }
+  inline void get_object() { _arguments->push_jobject((_ap++)->l); }
 
   inline void set_ap(const jvalue *rap) { _ap = rap; }
 
diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp
index 2955463852e..675506918cf 100644
--- a/hotspot/src/share/vm/prims/jvm.cpp
+++ b/hotspot/src/share/vm/prims/jvm.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -684,7 +684,7 @@ JVM_ENTRY(jobject, JVM_Clone(JNIEnv* env, jobject handle))
       // This can safepoint and redefine method, so need both new_obj and method
       // in a handle, for two different reasons.  new_obj can move, method can be
       // deleted if nothing is using it on the stack.
-      m->method_holder()->add_member_name(new_obj());
+      m->method_holder()->add_member_name(new_obj(), false);
     }
   }
 
@@ -1039,11 +1039,6 @@ JVM_ENTRY (void, JVM_AddReadsModule(JNIEnv *env, jobject from_module, jobject so
   Modules::add_reads_module(from_module, source_module, CHECK);
 JVM_END
 
-JVM_ENTRY (void, JVM_AddModulePackage(JNIEnv *env, jobject module, const char* package))
-  JVMWrapper("JVM_AddModulePackage");
-  Modules::add_module_package(module, package, CHECK);
-JVM_END
-
 // Reflection support //////////////////////////////////////////////////////////////////////////////
 
 JVM_ENTRY(jstring, JVM_GetClassName(JNIEnv *env, jclass cls))
diff --git a/hotspot/src/share/vm/prims/jvm.h b/hotspot/src/share/vm/prims/jvm.h
index e105c97766d..b25724a1c7d 100644
--- a/hotspot/src/share/vm/prims/jvm.h
+++ b/hotspot/src/share/vm/prims/jvm.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -466,14 +466,6 @@ JVM_AddModuleExportsToAll(JNIEnv *env, jobject from_module, const char* package)
 JNIEXPORT void JNICALL
 JVM_AddReadsModule(JNIEnv *env, jobject from_module, jobject source_module);
 
-/*
- * Add a package to a module.
- *  module:  module that will contain the package
- *  package: package to add to the module
- */
-JNIEXPORT void JNICALL
-JVM_AddModulePackage(JNIEnv* env,  jobject module, const char* package);
-
 /*
  * Reflection support functions
  */
diff --git a/hotspot/src/share/vm/prims/jvmti.xml b/hotspot/src/share/vm/prims/jvmti.xml
index 7a0515c2bc4..571d8dd13b4 100644
--- a/hotspot/src/share/vm/prims/jvmti.xml
+++ b/hotspot/src/share/vm/prims/jvmti.xml
@@ -24,11 +24,11 @@
 -->
 
 
-   
 
    
@@ -41,13 +41,13 @@
    
    
 
-   
    
 
    
    
 
    
    
 
@@ -107,7 +107,7 @@
 
    
    
 
@@ -292,16 +292,16 @@
    
 
    
-   
+
    
-   
+
    
-   
+
    
 
    
    
-   
+
    
    
     JVM Tool Interface
   
-  
+
   
-    The JVM Tool Interface () 
-    is a programming interface used by development and monitoring tools. 
-    It provides both a way to inspect the state and 
+    The JVM Tool Interface ()
+    is a programming interface used by development and monitoring tools.
+    It provides both a way to inspect the state and
     to control the execution of applications running in the
     Java virtual machine (VM).
     

@@ -376,21 +376,21 @@ may not be available in all implementations of the Java virtual machine.

- is a two-way interface. + is a two-way interface. A client of , hereafter called an agent, can be notified of - interesting occurrences through events. + interesting occurrences through events. - can query and control the application through many - functions, - either in response to events or + can query and control the application through many + functions, + either in response to events or independent of them.

- Agents run in the same process with and communicate directly with + Agents run in the same process with and communicate directly with the virtual machine executing the application being examined. This communication is through a native interface (). The native in-process interface allows - maximal control with minimal intrusion on the part of a tool. + maximal control with minimal intrusion on the part of a tool. Typically, agents are relatively compact. They can be controlled by a separate process which implements the bulk of a tool's function without interfering with the target application's normal execution. @@ -400,12 +400,12 @@ Tools can be written directly to or indirectly through higher level interfaces. The Java Platform Debugger Architecture includes , but also - contains higher-level, out-of-process debugger interfaces. The higher-level - interfaces are more appropriate than for many tools. - For more information on the Java Platform Debugger Architecture, - see the - Java - Platform Debugger Architecture website. + contains higher-level, out-of-process debugger interfaces. The higher-level + interfaces are more appropriate than for many tools. + For more information on the Java Platform Debugger Architecture, + see the + Java + Platform Debugger Architecture website. @@ -424,16 +424,16 @@ - An agent is deployed in a platform specific manner but is typically the - platform equivalent of a dynamic library. On the Windows operating - system, for example, an agent library is a "Dynamic Linked Library" (DLL). + An agent is deployed in a platform specific manner but is typically the + platform equivalent of a dynamic library. On the Windows operating + system, for example, an agent library is a "Dynamic Linked Library" (DLL). On the Solaris Operating Environment, an agent library is a shared object (.so file).

An agent may be started at VM startup by specifying the agent library name using a command line option. - Some implementations may support a mechanism to + Some implementations may support a mechanism to start agents in the live phase. The details of how this is initiated are implementation specific. @@ -460,7 +460,7 @@ a function is exported, at the same point during VM execution as it would have called the dynamic entry point Agent_OnUnLoad. A statically loaded agent cannot be unloaded. The Agent_OnUnload_L function will still be - called to do any other agent shutdown related tasks. + called to do any other agent shutdown related tasks. If a statically linked agent L exports a function called Agent_OnUnLoad_L and a function called Agent_OnUnLoad, the Agent_OnUnLoad function will be ignored. @@ -472,19 +472,19 @@ Agent_OnAttach_L and a function called Agent_OnAttach, the Agent_OnAttach function will be ignored. - + The term "command-line option" is used below to mean options supplied in the JavaVMInitArgs argument to the JNI_CreateJavaVM function of the JNI Invocation API.

- One of the two following - command-line options is used on VM startup to + One of the two following + command-line options is used on VM startup to properly load and run agents. - These arguments identify the library containing + These arguments identify the library containing the agent as well as an options - string to be passed in at startup. + string to be passed in at startup.

-agentlib:<agent-lib-name>=<options>
@@ -494,10 +494,10 @@ Typically, the <agent-lib-name> is expanded to an operating system specific file name. The <options> will be passed to the agent on start-up. - For example, if the option - -agentlib:foo=opt1,opt2 is specified, the VM will attempt to + For example, if the option + -agentlib:foo=opt1,opt2 is specified, the VM will attempt to load the shared library foo.dll from the system PATH - under Windows or libfoo.so from the + under Windows or libfoo.so from the LD_LIBRARY_PATH under the Solaris operating environment. If the agent library is statically linked into the executable @@ -510,8 +510,8 @@ to load the library. No library name expansion will occur. The <options> will be passed to the agent on start-up. - For example, if the option - -agentpath:c:\myLibs\foo.dll=opt1,opt2 is specified, the VM will attempt to + For example, if the option + -agentpath:c:\myLibs\foo.dll=opt1,opt2 is specified, the VM will attempt to load the shared library c:\myLibs\foo.dll. If the agent library is statically linked into the executable then no actual loading takes place. @@ -523,13 +523,13 @@ in the library will be invoked. If the agent library is statically linked into the executable then the system will attempt to invoke the Agent_OnLoad_<agent-lib-name> entry point where - <agent-lib-name> is the basename of the + <agent-lib-name> is the basename of the agent. In the above example -agentpath:c:\myLibs\foo.dll=opt1,opt2, the system will attempt to find and call the Agent_OnLoad_foo start-up routine.

Libraries loaded with -agentlib: or -agentpath: will be searched for JNI native method implementations to facilitate the - use of Java programming language code in tools, as is needed for + use of Java programming language code in tools, as is needed for bytecode instrumentation.

The agent libraries will be searched after all other libraries have been @@ -537,11 +537,11 @@ implementations of non-agent methods can use the NativeMethodBind event).

- These switches do the above and nothing more - they do not change the - state of the VM or . No command line options are needed - to enable + These switches do the above and nothing more - they do not change the + state of the VM or . No command line options are needed + to enable or aspects of , this is handled programmatically - by the use of + by the use of capabilities. @@ -557,29 +557,29 @@ Agent_OnAttach or Agent_OnAttach_L for statically linked agents will be invoked. - Exactly one call to a start-up function is made per agent. + Exactly one call to a start-up function is made per agent. If an agent is started during the OnLoad phase then its agent library must export a start-up function with the following prototype: -JNIEXPORT jint JNICALL +JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM *vm, char *options, void *reserved) Or for a statically linked agent named 'L': -JNIEXPORT jint JNICALL +JNIEXPORT jint JNICALL Agent_OnLoad_L(JavaVM *vm, char *options, void *reserved) - The VM will start the agent by calling this function. + The VM will start the agent by calling this function. It will be called early enough in VM initialization that:

  • system properties may be set before they have been used in the start-up of the VM
  • -
  • the full set of +
  • the full set of capabilities is still available (note that capabilities that configure the VM - may only be available at this time--see the + may only be available at this time--see the Capability function section)
  • no bytecodes have executed
  • no classes have been loaded
  • @@ -588,13 +588,13 @@ Agent_OnLoad_L(JavaVM *vm, char *options, void *reserved)

    The VM will call the Agent_OnLoad or Agent_OnLoad_<agent-lib-name> function with - <options> as the second argument - + <options> as the second argument - that is, using the command-line option examples, - "opt1,opt2" will be passed to the char *options + "opt1,opt2" will be passed to the char *options argument of Agent_OnLoad. The options argument is encoded as a modified UTF-8 string. - If =<options> is not specified, + If =<options> is not specified, a zero length string is passed to options. The lifespan of the options string is the Agent_OnLoad or Agent_OnLoad_<agent-lib-name> @@ -602,26 +602,26 @@ Agent_OnLoad_L(JavaVM *vm, char *options, void *reserved) be copied. The period between when Agent_OnLoad is called and when it returns is called the OnLoad phase. - Since the VM is not initialized during the OnLoad + Since the VM is not initialized during the OnLoad phase, - the set of allowed operations + the set of allowed operations inside Agent_OnLoad is restricted (see the function descriptions for the - functionality available at this time). - The agent can safely process the options and set - event callbacks with . Once - the VM initialization event is received - (that is, the VMInit + functionality available at this time). + The agent can safely process the options and set + event callbacks with . Once + the VM initialization event is received + (that is, the VMInit callback is invoked), the agent can complete its initialization. Early startup is required so that agents can set the desired capabilities, many of which must be set before the VM is initialized. - In JVMDI, the -Xdebug command-line option provided - very coarse-grain control of capabilities. + In JVMDI, the -Xdebug command-line option provided + very coarse-grain control of capabilities. JVMPI implementations use various tricks to provide a single "JVMPI on" switch. - No reasonable command-line + No reasonable command-line option could provide the fine-grain of control required to balance needed capabilities vs - performance impact. + performance impact. Early startup is also needed so that agents can control the execution environment - modifying the file system and system properties to install their functionality. @@ -631,75 +631,75 @@ Agent_OnLoad_L(JavaVM *vm, char *options, void *reserved) Agent_OnLoad_<agent-lib-name> is used to indicate an error. Any value other than zero indicates an error and causes termination of the VM. - + - A VM may support a mechanism that allows agents to be started in the VM during the live + A VM may support a mechanism that allows agents to be started in the VM during the live phase. The details of how this is supported, - are implementation specific. For example, a tool may use some platform specific mechanism, + are implementation specific. For example, a tool may use some platform specific mechanism, or implementation specific API, to attach to the running VM, and request it start a given agent.

    If an agent is started during the live phase then its agent library - must export a start-up function + must export a start-up function with the following prototype: -JNIEXPORT jint JNICALL +JNIEXPORT jint JNICALL Agent_OnAttach(JavaVM* vm, char *options, void *reserved) Or for a statically linked agent named 'L': -JNIEXPORT jint JNICALL +JNIEXPORT jint JNICALL Agent_OnAttach_L(JavaVM* vm, char *options, void *reserved) -

    - The VM will start the agent by calling this function. +

    + The VM will start the agent by calling this function. It will be called in the context of a thread that is attached to the VM. The first argument <vm> is the Java VM. The <options> argument is the startup options provided to the agent. <options> is encoded as a modified UTF-8 string. - If startup options were not provided, a zero length string is passed to - options. The lifespan of the options string is the + If startup options were not provided, a zero length string is passed to + options. The lifespan of the options string is the Agent_OnAttach or Agent_OnAttach_<agent-lib-name> call. If needed beyond this time the string or parts of the string must be copied.

    - Note that some capabilities + Note that some capabilities may not be available in the live phase.

    The Agent_OnAttach or Agent_OnAttach_<agent-lib-name > function initializes the agent and returns a value - to the VM to indicate if an error occurred. Any value other than zero indicates an error. - An error does not cause the VM to terminate. Instead the VM ignores the error, or takes - some implementation specific action -- for example it might print an error to standard error, + to the VM to indicate if an error occurred. Any value other than zero indicates an error. + An error does not cause the VM to terminate. Instead the VM ignores the error, or takes + some implementation specific action -- for example it might print an error to standard error, or record the error in a system log. - The library may optionally export a + The library may optionally export a shutdown function with the following prototype: -JNIEXPORT void JNICALL +JNIEXPORT void JNICALL Agent_OnUnload(JavaVM *vm) Or for a statically linked agent named 'L': -JNIEXPORT void JNICALL +JNIEXPORT void JNICALL Agent_OnUnload_L(JavaVM *vm) This function will be called by the VM when the library is about to be unloaded. The library will be unloaded (unless it is statically linked into the - executable) and this function will be called if some platform specific + executable) and this function will be called if some platform specific mechanism causes the unload (an unload mechanism is not specified in this document) - or the library is (in effect) unloaded by the termination of the VM whether through + or the library is (in effect) unloaded by the termination of the VM whether through normal termination or VM failure, including start-up failure. Uncontrolled shutdown is, of couse, an exception to this rule. - Note the distinction between this function and the + Note the distinction between this function and the VM Death event: for the VM Death event - to be sent, the VM must have run at least to the point of initialization and a valid + to be sent, the VM must have run at least to the point of initialization and a valid environment must exist which has set a callback for VMDeath and enabled the event. None of these are required for Agent_OnUnload or Agent_OnUnload_<agent-lib-name> and this function is also called if the library is unloaded for other reasons. - In the case that a VM Death event is sent, it will be sent before this + In the case that a VM Death event is sent, it will be sent before this function is called (assuming this function is called due to VM termination). This function can be used to clean-up resources allocated by the agent. @@ -709,17 +709,17 @@ Agent_OnUnload_L(JavaVM *vm) or simply VMs launched deep within scripts, a JAVA_TOOL_OPTIONS variable is provided so that agents may be launched in these cases.

    - Platforms which support environment variables or other named strings, may support the - JAVA_TOOL_OPTIONS variable. This variable will be broken into options at white-space - boundaries. White-space characters include space, tab, carriage-return, new-line, - vertical-tab, and form-feed. Sequences of white-space characters are considered - equivalent to a single white-space character. No white-space is included in the options + Platforms which support environment variables or other named strings, may support the + JAVA_TOOL_OPTIONS variable. This variable will be broken into options at white-space + boundaries. White-space characters include space, tab, carriage-return, new-line, + vertical-tab, and form-feed. Sequences of white-space characters are considered + equivalent to a single white-space character. No white-space is included in the options unless quoted. Quoting is as follows:

      -
    • All characters enclosed between a pair of single quote marks (''), except a single +
    • All characters enclosed between a pair of single quote marks (''), except a single quote, are quoted.
    • Double quote characters have no special meaning inside a pair of single quote marks.
    • -
    • All characters enclosed between a pair of double quote marks (""), except a double +
    • All characters enclosed between a pair of double quote marks (""), except a double quote, are quoted.
    • Single quote characters have no special meaning inside a pair of double quote marks.
    • A quoted part can start or end anywhere in the variable.
    • @@ -727,24 +727,24 @@ Agent_OnUnload_L(JavaVM *vm) the option like any other character and do not mark white-space boundaries.
    • The pair of quote marks is not included in the option.
    - JNI_CreateJavaVM (in the JNI Invocation API) will prepend these options to the options supplied - in its JavaVMInitArgs argument. Platforms may disable this feature in cases where security is - a concern; for example, the Reference Implementation disables this feature on Unix systems when - the effective user or group ID differs from the real ID. - This feature is intended to support the initialization of tools -- specifically including the - launching of native or Java programming language agents. Multiple tools may wish to use this - feature, so the variable should not be overwritten, instead, options should be appended to - the variable. Note that since the variable is processed at the time of the JNI Invocation + JNI_CreateJavaVM (in the JNI Invocation API) will prepend these options to the options supplied + in its JavaVMInitArgs argument. Platforms may disable this feature in cases where security is + a concern; for example, the Reference Implementation disables this feature on Unix systems when + the effective user or group ID differs from the real ID. + This feature is intended to support the initialization of tools -- specifically including the + launching of native or Java programming language agents. Multiple tools may wish to use this + feature, so the variable should not be overwritten, instead, options should be appended to + the variable. Note that since the variable is processed at the time of the JNI Invocation API create VM call, options processed by a launcher (e.g., VM selection options) will not be handled. The specification supports the use of multiple simultaneous agents. - Each agent has its own environment. + Each agent has its own environment. That is, the state is separate for each agent - changes to one environment do not affect the - others. The state of a + others. The state of a environment includes:
    • the event callbacks
    • @@ -752,7 +752,7 @@ Agent_OnUnload_L(JavaVM *vm)
    • the capabilities
    • the memory allocation/deallocation hooks
    - Although their state + Although their state is separate, agents inspect and modify the shared state of the VM, they also share the native environment in which they execute. As such, an agent can perturb the results of other agents or cause them @@ -761,30 +761,30 @@ Agent_OnUnload_L(JavaVM *vm) of preventing destructive interactions between agents. Techniques to reduce the likelihood of these occurrences are beyond the scope of this document.

    - An agent creates a environment - by passing a version - as the interface ID to the JNI Invocation API function - + An agent creates a environment + by passing a version + as the interface ID to the JNI Invocation API function + GetEnv. See Accessing Functions - for more details on the creation and use of + for more details on the creation and use of environments. - Typically, environments are created by calling GetEnv from + Typically, environments are created by calling GetEnv from Agent_OnLoad. This interface does not include some events that one might expect in an interface with profiling support. Some examples include object allocation events and full speed - method enter and exit events. The interface instead provides support for + method enter and exit events. The interface instead provides support for bytecode instrumentation, the ability to alter the Java virtual machine bytecode instructions which comprise the target program. Typically, these alterations are to add "events" to the code of a method - for example, to add, at the beginning of a method, - a call to MyProfiler.methodEntered(). + a call to MyProfiler.methodEntered(). Since the changes are purely additive, they do not modify application state or behavior. Because the inserted agent code is standard bytecodes, the VM can run at full speed, - optimizing not only the target program but also the instrumentation. If the + optimizing not only the target program but also the instrumentation. If the instrumentation does not involve switching from bytecode execution, no expensive state transitions are needed. The result is high performance events. This approach also provides complete control to the agent: instrumentation can be @@ -792,14 +792,14 @@ Agent_OnUnload_L(JavaVM *vm) can be conditional. Instrumentation can run entirely in Java programming language code or can call into the native agent. Instrumentation can simply maintain counters or can statistically sample events. -

    +

    Instrumentation can be inserted in one of three ways:

    • Static Instrumentation: The class file is instrumented before it is loaded into the VM - for example, by creating a duplicate directory of *.class files which have been modified to add the instrumentation. - This method is extremely awkward and, in general, an agent cannot know + This method is extremely awkward and, in general, an agent cannot know the origin of the class files which will be loaded.
    • @@ -817,21 +817,21 @@ Agent_OnUnload_L(JavaVM *vm) function. Classes can be modified multiple times and can be returned to their original state. - The mechanism allows instrumentation which changes during the + The mechanism allows instrumentation which changes during the course of execution.
    -

    +

    The class modification functionality provided in this interface is intended to provide a mechanism for instrumentation (the event and the function) and, during development, for fix-and-continue debugging (the function). -

    - Care must be taken to avoid perturbing dependencies, especially when +

    + Care must be taken to avoid perturbing dependencies, especially when instrumenting core classes. For example, an approach to getting notification - of every object allocation is to instrument the constructor on + of every object allocation is to instrument the constructor on Object. Assuming that the constructor is initially empty, the constructor could be changed to: @@ -839,15 +839,15 @@ Agent_OnUnload_L(JavaVM *vm) MyProfiler.allocationTracker(this); } - However, if this change was made using the + However, if this change was made using the - event then this might impact a typical VM as follows: + event then this might impact a typical VM as follows: the first created object will call the constructor causing a class load of MyProfiler; which will then cause object creation, and since MyProfiler isn't loaded yet, infinite recursion; resulting in a stack overflow. A refinement of this would be to delay invoking the tracking method until a safe time. For - example, trackAllocations could be set in the + example, trackAllocations could be set in the handler for the VMInit event. static boolean trackAllocations = false; @@ -881,17 +881,17 @@ Agent_OnUnload_L(JavaVM *vm) uses modified UTF-8 to encode character strings. This is the same encoding used by JNI. - Modified UTF-8 differs - from standard UTF-8 in the representation of supplementary characters + Modified UTF-8 differs + from standard UTF-8 in the representation of supplementary characters and of the null character. See the - + Modified UTF-8 Strings section of the JNI specification for details. Since this interface provides access to the state of applications running in the - Java virtual machine; + Java virtual machine; terminology refers to the Java platform and not the native platform (unless stated otherwise). For example:

      @@ -903,20 +903,20 @@ Agent_OnUnload_L(JavaVM *vm)

    Sun, Sun Microsystems, the Sun logo, Java, and JVM - are trademarks or registered trademarks of Oracle + are trademarks or registered trademarks of Oracle and/or its affiliates, in the U.S. and other countries. - Native code accesses features - by calling functions. + Native code accesses features + by calling functions. Access to functions is by use of an interface pointer - in the same manner as - Java + in the same manner as + Java Native Interface (JNI) functions are accessed. - The interface pointer is called the + The interface pointer is called the environment pointer.

    An environment pointer is a pointer to an environment and has @@ -924,8 +924,8 @@ Agent_OnUnload_L(JavaVM *vm) An environment has information about its connection. The first value in the environment is a pointer to the function table. The function table is an array of pointers to functions. - Every function pointer is at a predefined offset inside the - array. + Every function pointer is at a predefined offset inside the + array.

    When used from the C language: double indirection is used to access the functions; @@ -945,7 +945,7 @@ jvmtiEnv *jvmti; ... jvmtiError err = jvmti->GetLoadedClasses(&class_count, &classes); - Unless otherwise stated, all examples and declarations in this + Unless otherwise stated, all examples and declarations in this specification use the C language.

    A environment can be obtained through the JNI Invocation API @@ -955,24 +955,24 @@ jvmtiEnv *jvmti; ... (*jvm)->GetEnv(jvm, &jvmti, JVMTI_VERSION_1_0); - Each call to GetEnv + Each call to GetEnv creates a new connection and thus - a new environment. + a new environment. The version argument of GetEnv must be a version. The returned environment may have a different version than the requested version but the returned environment must be compatible. - GetEnv will return JNI_EVERSION if a + GetEnv will return JNI_EVERSION if a compatible version is not available, if is not supported or is not supported in the current VM configuration. Other interfaces may be added for creating environments in specific contexts. Each environment has its own state (for example, - desired events, - event handling functions, and - capabilities). - An environment is released with - . + desired events, + event handling functions, and + capabilities). + An environment is released with + . Thus, unlike JNI which has one environment per thread, environments work across threads and are created dynamically. @@ -980,12 +980,12 @@ jvmtiEnv *jvmti; functions always return an error code via the - function return value. + function return value. Some functions can return additional - values through pointers provided by the calling function. + values through pointers provided by the calling function. In some cases, functions allocate memory that your program must explicitly deallocate. This is indicated in the individual - function descriptions. Empty lists, arrays, sequences, etc are + function descriptions. Empty lists, arrays, sequences, etc are returned as NULL.

    In the event that the function encounters @@ -996,26 +996,26 @@ jvmtiEnv *jvmti; - functions identify objects with JNI references + functions identify objects with JNI references ( and ) and their derivatives ( and ). - References passed to - functions can be either global or local, but they must be - strong references. All references returned by functions are - local references--these local references are created + References passed to + functions can be either global or local, but they must be + strong references. All references returned by functions are + local references--these local references are created during the call. - Local references are a resource that must be managed (see the - - JNI Documentation). + Local references are a resource that must be managed (see the + + JNI Documentation). When threads return from native code all local references are freed. Note that some threads, including typical agent threads, will never return from native code. - A thread is ensured the ability to create sixteen local + A thread is ensured the ability to create sixteen local references without the need for any explicit management. For threads executing a limited number of calls before returning from native code - (for example, threads processing events), + (for example, threads processing events), it may be determined that no explicit management is needed. However, long running agent threads will need explicit @@ -1023,7 +1023,7 @@ jvmtiEnv *jvmti; PushLocalFrame and PopLocalFrame. Conversely, to preserve references beyond the return from native code, they must be converted to global references. - These rules do not apply to and + These rules do not apply to and as they are not s. @@ -1035,21 +1035,21 @@ jvmtiEnv *jvmti; - functions never throw exceptions; error conditions are - communicated via the + functions never throw exceptions; error conditions are + communicated via the function return value. - Any existing exception state is preserved across a call to a + Any existing exception state is preserved across a call to a function. See the - Java Exceptions section of the JNI specification for information on handling exceptions. - These functions provide for the allocation and deallocation of + These functions provide for the allocation and deallocation of memory used by functionality and can be used to provide working memory for agents. Memory managed by is not compatible with other memory @@ -1059,7 +1059,7 @@ jvmtiEnv *jvmti; Allocate - Allocate an area of memory through the allocator. + Allocate an area of memory through the allocator. The allocated memory should be freed with . @@ -1097,9 +1097,9 @@ jvmtiEnv *jvmti; Deallocate - Deallocate mem using the allocator. + Deallocate mem using the allocator. This function should - be used to deallocate any memory allocated and returned + be used to deallocate any memory allocated and returned by a function (including memory allocated with ). All allocated memory must be deallocated @@ -1143,60 +1143,60 @@ jvmtiEnv *jvmti;

  • Why not alive?
    • New.
    • -
    • Terminated (Terminated (JVMTI_THREAD_STATE_TERMINATED)
-
  • Alive (Alive (JVMTI_THREAD_STATE_ALIVE)
    • Suspended?
        -
      • Suspended (Suspended (JVMTI_THREAD_STATE_SUSPENDED)
      • Not suspended
    • Interrupted?
        -
      • Interrupted (Interrupted (JVMTI_THREAD_STATE_INTERRUPTED)
      • Not interrupted.
    • In native?
        -
      • In native code (In native code (JVMTI_THREAD_STATE_IN_NATIVE)
      • In Java programming language code
    • What alive state?
        -
      • Runnable (Runnable (JVMTI_THREAD_STATE_RUNNABLE)
      • -
      • Blocked (Blocked (JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER)
      • -
      • Waiting (Waiting (JVMTI_THREAD_STATE_WAITING)
        • Timed wait?
            -
          • Indefinite (Indefinite (JVMTI_THREAD_STATE_WAITING_INDEFINITELY
          • -
          • Timed (Timed (JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT)
        • Why waiting?
            -
          • Object.wait (Object.wait (JVMTI_THREAD_STATE_IN_OBJECT_WAIT)
          • -
          • LockSupport.park (LockSupport.park (JVMTI_THREAD_STATE_PARKED)
          • -
          • Sleeping (Sleeping (JVMTI_THREAD_STATE_SLEEPING)
        • @@ -1210,7 +1210,7 @@ jvmtiEnv *jvmti;

        - The answers are represented by the following bit vector. + The answers are represented by the following bit vector. Thread is alive. Zero if thread is new (not started) or terminated. @@ -1223,7 +1223,7 @@ jvmtiEnv *jvmti; Thread is waiting to enter a synchronization block/method or, - after an Object.wait(), waiting to re-enter a + after an Object.wait(), waiting to re-enter a synchronization block/method. @@ -1250,8 +1250,8 @@ jvmtiEnv *jvmti; Thread suspended. java.lang.Thread.suspend() - or a suspend function - (such as ) + or a suspend function + (such as ) has been called on the thread. If this bit is set, the other bits refer to the thread state before suspension. @@ -1313,7 +1313,7 @@ jvmtiEnv *jvmti; Rules

        There can be no more than one answer to a question, although there can be no - answer (because the answer is unknown, does not apply, or none of the answers is + answer (because the answer is unknown, does not apply, or none of the answers is correct). An answer is set only when the enclosing answers match. That is, no more than one of

          @@ -1322,32 +1322,32 @@ jvmtiEnv *jvmti;
        • JVMTI_THREAD_STATE_WAITING
        can be set (a J2SE compliant implementation will always set - one of these if JVMTI_THREAD_STATE_ALIVE is set). - And if any of these are set, the enclosing answer - JVMTI_THREAD_STATE_ALIVE is set. + one of these if JVMTI_THREAD_STATE_ALIVE is set). + And if any of these are set, the enclosing answer + JVMTI_THREAD_STATE_ALIVE is set. No more than one of
        • JVMTI_THREAD_STATE_WAITING_INDEFINITELY
        • JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
        can be set (a J2SE compliant implementation will always set - one of these if JVMTI_THREAD_STATE_WAITING is set). - And if either is set, the enclosing answers - JVMTI_THREAD_STATE_ALIVE and - JVMTI_THREAD_STATE_WAITING are set. + one of these if JVMTI_THREAD_STATE_WAITING is set). + And if either is set, the enclosing answers + JVMTI_THREAD_STATE_ALIVE and + JVMTI_THREAD_STATE_WAITING are set. No more than one of
        • JVMTI_THREAD_STATE_IN_OBJECT_WAIT
        • JVMTI_THREAD_STATE_PARKED
        • JVMTI_THREAD_STATE_SLEEPING
        - can be set. And if any of these is set, the enclosing answers - JVMTI_THREAD_STATE_ALIVE and - JVMTI_THREAD_STATE_WAITING are set. + can be set. And if any of these is set, the enclosing answers + JVMTI_THREAD_STATE_ALIVE and + JVMTI_THREAD_STATE_WAITING are set. Also, if JVMTI_THREAD_STATE_SLEEPING is set, then JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT is set. - If a state A is implemented using the mechanism of - state B then it is state A which + If a state A is implemented using the mechanism of + state B then it is state A which is returned by this function. For example, if Thread.sleep(long) is implemented using Object.wait(long) @@ -1364,16 +1364,16 @@ jvmtiEnv *jvmti;

        And finally, JVMTI_THREAD_STATE_TERMINATED cannot be set unless - JVMTI_THREAD_STATE_ALIVE is not set. + JVMTI_THREAD_STATE_ALIVE is not set.

        The thread state representation is designed for extension in future versions of the specification; thread state values should be used accordingly, that is - they should not be used as ordinals. + they should not be used as ordinals. Most queries can be made by testing a single bit, if use in a switch statement is desired, the state bits should be masked with the interesting bits. - All bits not defined above are reserved for future use. + All bits not defined above are reserved for future use. A VM, compliant to the current specification, must set reserved bits to zero. - An agent should ignore reserved bits -- + An agent should ignore reserved bits -- they should not be assumed to be zero and thus should not be included in comparisons.

        Examples @@ -1390,8 +1390,8 @@ jvmtiEnv *jvmti; The state of a thread at a Object.wait(3000) would be: - JVMTI_THREAD_STATE_ALIVE + JVMTI_THREAD_STATE_WAITING + - JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT + + JVMTI_THREAD_STATE_ALIVE + JVMTI_THREAD_STATE_WAITING + + JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT + JVMTI_THREAD_STATE_MONITOR_WAITING The state of a thread suspended while runnable would be: @@ -1423,7 +1423,7 @@ jvmtiEnv *jvmti; To distinguish timed from untimed Object.wait: - if (state & JVMTI_THREAD_STATE_IN_OBJECT_WAIT) { + if (state & JVMTI_THREAD_STATE_IN_OBJECT_WAIT) { if (state & JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT) { printf("in Object.wait(long timeout)\n"); } else { @@ -1436,7 +1436,7 @@ jvmtiEnv *jvmti;

        The thread state represented by java.lang.Thread.State returned from java.lang.Thread.getState() is a subset of the - information returned from this function. + information returned from this function. The corresponding java.lang.Thread.State can be determined by using the provided conversion masks. For example, this returns the name of the java.lang.Thread.State thread state: @@ -1466,7 +1466,7 @@ jvmtiEnv *jvmti; - The thread to query. + The thread to query. @@ -1484,11 +1484,15 @@ jvmtiEnv *jvmti; Get Current Thread - Get the current thread. + Get the current thread. The current thread is the Java programming language thread which has called the function. + The function may return NULL in the start phase if the + + can_generate_early_vmstart capability is enabled + and the java.lang.Thread class has not been initialized yet.

        - Note that most functions that take a thread - as an argument will accept NULL to mean + Note that most functions that take a thread + as an argument will accept NULL to mean the current thread. new @@ -1498,7 +1502,7 @@ jvmtiEnv *jvmti; - On return, points to the current thread. + On return, points to the current thread, or NULL. @@ -1512,12 +1516,12 @@ jvmtiEnv *jvmti; Get all live threads. The threads are Java programming language threads; that is, threads that are attached to the VM. - A thread is live if java.lang.Thread.isAlive() + A thread is live if java.lang.Thread.isAlive() would return true, that is, the thread has been started and has not yet died. The universe of threads is determined by the context of the environment, which typically is all threads attached to the VM. - Note that this includes agent threads + Note that this includes agent threads (see ). jvmdi @@ -1545,8 +1549,8 @@ jvmtiEnv *jvmti; Suspend Thread - Suspend the specified thread. If the calling thread is specified, - this function will not return until some other thread calls + Suspend the specified thread. If the calling thread is specified, + this function will not return until some other thread calls . If the thread is currently suspended, this function does nothing and returns an error. @@ -1559,7 +1563,7 @@ jvmtiEnv *jvmti; - The thread to suspend. + The thread to suspend. @@ -1588,22 +1592,22 @@ jvmtiEnv *jvmti; The threads are Java programming language threads; native threads which are not attached to the VM are not Java programming language threads. - A thread is live if java.lang.Thread.isAlive() + A thread is live if java.lang.Thread.isAlive() would return true, that is, the thread has been started and has not yet died. - The universe of threads is determined + The universe of threads is determined by the context of the environment, which, typically, is all threads attached to the VM, - except critical VM internal threads and agent threads + except critical VM internal threads and agent threads (see ).

        - If the calling thread is specified, + If the calling thread is specified, all other threads are suspended first then the caller thread is suspended - - this function will not return until some other thread calls + this function will not return until some other thread calls .

        The list of actually - suspended threads is returned in + suspended threads is returned in . Suspension is as defined in . @@ -1658,13 +1662,13 @@ jvmtiEnv *jvmti; Suspend Thread List - Suspend the - threads specified in the - array. + Suspend the + threads specified in the + array. Threads may be resumed with or . - If the calling thread is specified in the + If the calling thread is specified in the array, this function will not return until some other thread resumes it. Errors encountered in the suspension of a thread @@ -1692,11 +1696,11 @@ jvmtiEnv *jvmti; jvmtiError - An agent supplied array of + An agent supplied array of elements. On return, filled with the error code for the suspend of the corresponding thread. - The error code will be + The error code will be if the thread was suspended by this call. Possible error codes are those specified @@ -1711,12 +1715,12 @@ jvmtiEnv *jvmti; Resume Thread - Resume a suspended thread. + Resume a suspended thread. Any threads currently suspended through a suspend function (eg. - ) + ) or java.lang.Thread.suspend() - will resume execution; + will resume execution; all other threads are unaffected. jvmdi @@ -1736,7 +1740,7 @@ jvmtiEnv *jvmti; Thread was not suspended. - The state of the thread has been modified, and is now inconsistent. + The state of the thread has been modified, and is now inconsistent. @@ -1744,12 +1748,12 @@ jvmtiEnv *jvmti; Resume Thread List - Resume the - threads specified in the - array. + Resume the + threads specified in the + array. Any thread suspended through a suspend function (eg. - ) + ) or java.lang.Thread.suspend() will resume execution. @@ -1773,11 +1777,11 @@ jvmtiEnv *jvmti; jvmtiError - An agent supplied array of + An agent supplied array of elements. On return, filled with the error code for the resume of the corresponding thread. - The error code will be + The error code will be if the thread was suspended by this call. Possible error codes are those specified @@ -1792,9 +1796,9 @@ jvmtiEnv *jvmti; Stop Thread - Send the specified asynchronous exception to the specified thread + Send the specified asynchronous exception to the specified thread (similar to java.lang.Thread.stop). - Normally, this function is used to kill the specified thread with an + Normally, this function is used to kill the specified thread with an instance of the exception ThreadDeath. jvmdi @@ -1879,7 +1883,7 @@ jvmtiEnv *jvmti; - Get thread information. The fields of the structure + Get thread information. The fields of the structure are filled in with details of the specified thread. jvmdi @@ -1906,8 +1910,8 @@ jvmtiEnv *jvmti; Get Owned Monitor Info - Get information about the monitors owned by the - specified thread. + Get information about the monitors owned by the + specified thread. jvmdiClone @@ -1939,7 +1943,7 @@ jvmtiEnv *jvmti; Get Owned Monitor Stack Depth Info - @@ -1950,18 +1954,18 @@ jvmtiEnv *jvmti; - The stack depth. Corresponds to the stack depth used in the + The stack depth. Corresponds to the stack depth used in the Stack Frame functions. That is, zero is the current frame, one is the frame which - called the current frame. And it is negative one if the - implementation cannot determine the stack depth (e.g., for + called the current frame. And it is negative one if the + implementation cannot determine the stack depth (e.g., for monitors acquired by JNI MonitorEnter). - Get information about the monitors owned by the - specified thread and the depth of the stack frame which locked them. + Get information about the monitors owned by the + specified thread and the depth of the stack frame which locked them. new @@ -1996,7 +2000,7 @@ jvmtiEnv *jvmti; Get Current Contended Monitor - Get the object, if any, whose monitor the specified thread is waiting to + Get the object, if any, whose monitor the specified thread is waiting to enter or waiting to regain through java.lang.Object.wait. jvmdi @@ -2053,7 +2057,7 @@ jvmtiEnv *jvmti; - The arg parameter passed to + The arg parameter passed to . @@ -2067,13 +2071,13 @@ jvmtiEnv *jvmti; The parameter is forwarded on to the start function (specified with ) as its single argument. - This function allows the creation of agent threads - for handling communication with another process or for handling events - without the need to load a special subclass of java.lang.Thread or - implementer of java.lang.Runnable. + This function allows the creation of agent threads + for handling communication with another process or for handling events + without the need to load a special subclass of java.lang.Thread or + implementer of java.lang.Runnable. Instead, the created thread can run entirely in native code. However, the created thread does require a newly created instance - of java.lang.Thread (referenced by the argument thread) to + of java.lang.Thread (referenced by the argument thread) to which it will be associated. The thread object can be created with JNI calls.

        @@ -2101,14 +2105,14 @@ jvmtiEnv *jvmti; added to the thread group and the thread is not seen on queries of the thread group at either the Java programming language or levels.

        - The thread is not visible to Java programming language queries but is - included in queries (for example, + The thread is not visible to Java programming language queries but is + included in queries (for example, and ).

        Upon execution of proc, the new thread will be attached to the - VM -- see the JNI documentation on - Attaching to the VM. jvmdiClone @@ -2148,8 +2152,8 @@ jvmtiEnv *jvmti; - - is less than + + is less than or greater than @@ -2165,7 +2169,7 @@ jvmtiEnv *jvmti; This value is NULL unless set with this function. Agents can allocate memory in which they store thread specific information. By setting thread-local storage it can then be - accessed with + accessed with .

        This function is called by the agent to set the value of the @@ -2184,10 +2188,10 @@ jvmtiEnv *jvmti; - - - value is set to NULL - + + + value is set to NULL + The value to be entered into the thread-local storage. @@ -2201,7 +2205,7 @@ jvmtiEnv *jvmti; Get Thread Local Storage Called by the agent to get the value of the thread-local - storage. + storage. jvmpi @@ -2216,10 +2220,10 @@ jvmtiEnv *jvmti; - Pointer through which the value of the thread local + Pointer through which the value of the thread local storage is returned. If thread-local storage has not been set with - the returned + the returned pointer is NULL. @@ -2290,8 +2294,8 @@ jvmtiEnv *jvmti; - Get information about the thread group. The fields of the - structure + Get information about the thread group. The fields of the + structure are filled in with details of the specified thread group. jvmdi @@ -2308,7 +2312,7 @@ jvmtiEnv *jvmti; jvmtiThreadGroupInfo On return, filled with information describing the specified - thread group. + thread group. @@ -2369,15 +2373,15 @@ jvmtiEnv *jvmti;

        Stack frames are as described in , - That is, they correspond to method - invocations (including native methods) but do not correspond to platform native or + That is, they correspond to method + invocations (including native methods) but do not correspond to platform native or VM internal frames.

        A implementation may use method invocations to launch a thread and the corresponding frames may be included in the stack as presented by these functions -- that is, there may be frames shown deeper than main() and run(). - However this presentation must be consistent across all functionality which + However this presentation must be consistent across all functionality which uses stack frames or stack depth. @@ -2421,16 +2425,16 @@ jvmtiEnv *jvmti; jvmtiFrameInfo - On return, this agent allocated buffer is filled - with stack frame information. + On return, this agent allocated buffer is filled + with stack frame information. - On return, the number of records filled into + On return, the number of records filled into frame_buffer. - This will be + This will be min(max_frame_count, stackDepth). @@ -2441,7 +2445,7 @@ jvmtiEnv *jvmti; Get information about the stack of a thread. If is less than the depth of the stack, - the topmost frames are returned, + the topmost frames are returned, otherwise the entire stack is returned. The topmost frames, those most recently invoked, are at the beginning of the returned buffer.

        @@ -2453,23 +2457,23 @@ jvmtiFrameInfo frames[5]; jint count; jvmtiError err; -err = (*jvmti)->GetStackTrace(jvmti, aThread, 0, 5, +err = (*jvmti)->GetStackTrace(jvmti, aThread, 0, 5, frames, &count); if (err == JVMTI_ERROR_NONE && count >= 1) { char *methodName; - err = (*jvmti)->GetMethodName(jvmti, frames[0].method, + err = (*jvmti)->GetMethodName(jvmti, frames[0].method, &methodName, NULL, NULL); if (err == JVMTI_ERROR_NONE) { printf("Executing method: %s", methodName); } } - + check example code.

        The need not be suspended - to call this function. + to call this function.

        The function can be used to map locations to line numbers. Note that @@ -2488,15 +2492,15 @@ if (err == JVMTI_ERROR_NONE && count >= 1) { - Begin retrieving frames at this depth. - If non-negative, count from the current frame, - the first frame retrieved is at depth start_depth. + Begin retrieving frames at this depth. + If non-negative, count from the current frame, + the first frame retrieved is at depth start_depth. For example, if zero, start from the current frame; if one, start from the caller of the current frame; if two, start from the caller of the caller of the current frame; and so on. If negative, count from below the oldest frame, - the first frame retrieved is at depth stackDepth + start_depth, - where stackDepth is the count of frames on the stack. + the first frame retrieved is at depth stackDepth + start_depth, + where stackDepth is the count of frames on the stack. For example, if negative one, only the oldest frame is retrieved; if negative two, start from the frame called by the oldest frame. @@ -2512,17 +2516,17 @@ if (err == JVMTI_ERROR_NONE && count >= 1) { jvmtiFrameInfo - On return, this agent allocated buffer is filled - with stack frame information. + On return, this agent allocated buffer is filled + with stack frame information. On return, points to the number of records filled in. - For non-negative start_depth, this will be + For non-negative start_depth, this will be min(max_frame_count, stackDepth - start_depth). - For negative start_depth, this will be + For negative start_depth, this will be min(max_frame_count, -start_depth). @@ -2542,23 +2546,23 @@ if (err == JVMTI_ERROR_NONE && count >= 1) { Get information about the stacks of all live threads (including agent threads). If is less than the depth of a stack, - the topmost frames are returned for that thread, + the topmost frames are returned for that thread, otherwise the entire stack is returned. The topmost frames, those most recently invoked, are at the beginning of the returned buffer.

        - All stacks are collected simultaneously, that is, no changes will occur to the + All stacks are collected simultaneously, that is, no changes will occur to the thread state or stacks between the sampling of one thread and the next. The threads need not be suspended. - + jvmtiStackInfo *stack_info; jint thread_count; int ti; jvmtiError err; -err = (*jvmti)->GetAllStackTraces(jvmti, MAX_FRAMES, &stack_info, &thread_count); +err = (*jvmti)->GetAllStackTraces(jvmti, MAX_FRAMES, &stack_info, &thread_count); if (err != JVMTI_ERROR_NONE) { - ... + ... } for (ti = 0; ti < thread_count; ++ti) { jvmtiStackInfo *infop = &stack_info[ti]; @@ -2573,9 +2577,9 @@ for (ti = 0; ti < thread_count; ++ti) { } } /* this one Deallocate call frees all data allocated by GetAllStackTraces */ -err = (*jvmti)->Deallocate(jvmti, stack_info); +err = (*jvmti)->Deallocate(jvmti, stack_info); - + check example code. @@ -2595,12 +2599,12 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); jvmtiStackInfo - On return, this buffer is filled - with stack information for each thread. - The number of records is determined + On return, this buffer is filled + with stack information for each thread. + The number of records is determined by .

        - Note that this buffer is allocated to include the + Note that this buffer is allocated to include the buffers pointed to by . These buffers must not be separately deallocated. @@ -2621,11 +2625,11 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Get information about the stacks of the supplied threads. If is less than the depth of a stack, - the topmost frames are returned for that thread, + the topmost frames are returned for that thread, otherwise the entire stack is returned. The topmost frames, those most recently invoked, are at the beginning of the returned buffer.

        - All stacks are collected simultaneously, that is, no changes will occur to the + All stacks are collected simultaneously, that is, no changes will occur to the thread state or stacks between the sampling one thread and the next. The threads need not be suspended.

        @@ -2663,12 +2667,12 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); jvmtiStackInfo - On return, this buffer is filled - with stack information for each thread. - The number of records is determined + On return, this buffer is filled + with stack information for each thread. + The number of records is determined by .

        - Note that this buffer is allocated to include the + Note that this buffer is allocated to include the buffers pointed to by . These buffers must not be separately deallocated. @@ -2699,8 +2703,8 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); - If false, - + If false, + must be false. @@ -2709,7 +2713,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Return the stack showing - model of the stack; + model of the stack; otherwise, show the internal representation of the stack with inlined and optimized methods missing. If the virtual machine is using the Java Virtual Machine Specification stack model @@ -2730,9 +2734,9 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); The agent passes in a buffer - large enough to hold max_count records of + large enough to hold max_count records of . This buffer must be - pre-allocated by the agent. + pre-allocated by the agent. @@ -2784,27 +2788,27 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Pop Frame Pop the current frame of thread's stack. - Popping a frame takes you to the previous frame. - When the thread is resumed, the execution + Popping a frame takes you to the previous frame. + When the thread is resumed, the execution state of the thread is reset to the state immediately before the called method was invoked. That is (using terminology):

        • the current frame is discarded as the previous frame becomes the current one
        • the operand stack is restored--the argument values are added back - and if the invoke was not invokestatic, + and if the invoke was not invokestatic, objectref is added back as well
        • the Java virtual machine PC is restored to the opcode of the invoke instruction
        Note however, that any changes to the arguments, which - occurred in the called method, remain; - when execution continues, the first instruction to - execute will be the invoke. + occurred in the called method, remain; + when execution continues, the first instruction to + execute will be the invoke.

        - Between calling PopFrame and resuming the - thread the state of the stack is undefined. - To pop frames beyond the first, + Between calling PopFrame and resuming the + thread the state of the stack is undefined. + To pop frames beyond the first, these three steps must be repeated:

        • suspend the thread via an event (step, breakpoint, ...)
        • @@ -2812,11 +2816,11 @@ err = (*jvmti)->Deallocate(jvmti, stack_info);
        • resume the thread

        - A lock acquired by calling the called method - (if it is a synchronized method) + A lock acquired by calling the called method + (if it is a synchronized method) and locks acquired by entering synchronized - blocks within the called method are released. - Note: this does not apply to native locks or + blocks within the called method are released. + Note: this does not apply to native locks or java.util.concurrent.locks locks.

        Finally blocks are not executed. @@ -2825,7 +2829,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info);

        The specified thread must be suspended (which implies it cannot be the current thread).

        - Both the called method and calling method must be non-native Java programming + Both the called method and calling method must be non-native Java programming language methods.

        No events are generated by this function. @@ -2888,7 +2892,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); - On return, points to the index of the currently + On return, points to the index of the currently executing instruction. Is set to -1 if the frame is executing a native method. @@ -2902,11 +2906,11 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Notify Frame Pop - When the frame that is currently at + When the frame that is currently at is popped from the stack, generate a - event. See the + event. See the event for details. - Only frames corresponding to non-native Java programming language + Only frames corresponding to non-native Java programming language methods can receive notification.

        The specified thread must either be the current thread @@ -2918,7 +2922,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); - + The thread of the frame for which the frame pop event will be generated. @@ -2931,7 +2935,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); - + The frame at depth is executing a native method. @@ -2950,7 +2954,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); The method which will return early is referred to as the called method. The called method is the current method (as defined by - ) + ) for the specified thread at the time the function is called.

        @@ -2958,17 +2962,17 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); The return occurs when execution of Java programming language code is resumed on this thread. Between calling one of these functions and resumption - of thread execution, the state of the stack is undefined. + of thread execution, the state of the stack is undefined.

        - No further instructions are executed in the called method. + No further instructions are executed in the called method. Specifically, finally blocks are not executed. Note: this can cause inconsistent states in the application.

        - A lock acquired by calling the called method - (if it is a synchronized method) + A lock acquired by calling the called method + (if it is a synchronized method) and locks acquired by entering synchronized - blocks within the called method are released. - Note: this does not apply to native locks or + blocks within the called method are released. + Note: this does not apply to native locks or java.util.concurrent.locks locks.

        Events, such as , @@ -2985,7 +2989,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); This function can be used to return from a method whose result type is Object - or a subclass of Object. + or a subclass of Object. new @@ -3001,7 +3005,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); - The return value for the called frame. + The return value for the called frame. An object or NULL. @@ -3013,12 +3017,12 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Or the implementation is unable to provide this functionality on this frame. - - The result type of the called method is not + + The result type of the called method is not Object or a subclass of Object. - - The supplied is not compatible with the + + The supplied is not compatible with the result type of the called method. @@ -3035,8 +3039,8 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); This function can be used to return from a method whose result type is int, short, - char, byte, or - boolean. + char, byte, or + boolean. new @@ -3063,10 +3067,10 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Or the implementation is unable to provide this functionality on this frame. - - The result type of the called method is not + + The result type of the called method is not int, short, - char, byte, or + char, byte, or boolean. @@ -3109,7 +3113,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Or the implementation is unable to provide this functionality on this frame. - + The result type of the called method is not long. @@ -3152,7 +3156,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Or the implementation is unable to provide this functionality on this frame. - + The result type of the called method is not float. @@ -3193,7 +3197,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Attempted to return early from a frame corresponding to a native method. Or the implementation is unable to provide this functionality on this frame. - + The result type of the called method is not double. @@ -3230,8 +3234,8 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Or the implementation is unable to provide this functionality on this frame. - - The called method has a result type. + + The called method has a result type. Thread was not the current thread and was not suspended. @@ -3250,12 +3254,12 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Functionality includes the ability to view the objects in the heap and to tag these objects. - + A tag is a value associated with an object. Tags are explicitly set by the agent using the function or by - callback functions such as . + callback functions such as .

        Tags are local to the environment; that is, the tags of one environment are not visible in another. @@ -3263,10 +3267,10 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Tags are jlong values which can be used simply to mark an object or to store a pointer to more detailed information. Objects which have not been tagged have a - tag of zero. + tag of zero. Setting a tag to zero makes the object untagged. - + Heap functions which iterate through the heap and recursively follow object references use agent supplied callback functions @@ -3274,7 +3278,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info);

        These heap callback functions must adhere to the following restrictions -- These callbacks must not use JNI functions. - These callbacks must not use functions except + These callbacks must not use functions except callback safe functions which specifically allow such use (see the raw monitor, memory management, and environment local storage functions). @@ -3285,7 +3289,7 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); be invoked at a time.

        The Heap Filter Flags can be used to prevent reporting - based on the tag status of an object or its class. + based on the tag status of an object or its class. If no flags are set (the jint is zero), objects will not be filtered out. @@ -3306,43 +3310,43 @@ err = (*jvmti)->Deallocate(jvmti, stack_info);

        The Heap Visit Control Flags are returned by the heap callbacks - and can be used to abort the iteration. For the - Heap - Reference Callback, it can also be used + and can be used to abort the iteration. For the + Heap + Reference Callback, it can also be used to prune the graph of traversed references (JVMTI_VISIT_OBJECTS is not set). - If we are visiting an object and if this callback - was initiated by , + was initiated by , traverse the references of this object. Otherwise ignored. - + Abort the iteration. Ignore all other bits.

        - The Heap Reference Enumeration is provided by the - Heap - Reference Callback and - Primitive Field - Callback to + The Heap Reference Enumeration is provided by the + Heap + Reference Callback and + Primitive Field + Callback to describe the kind of reference being reported. - Reference from an object to its class. - + Reference from an object to the value of one of its instance fields. @@ -3357,11 +3361,11 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Reference from a class to its protection domain. - + - Reference from a class to one of its interfaces. + Reference from a class to one of its interfaces. Note: interfaces are defined via a constant pool reference, - so the referenced interfaces may also be reported with a + so the referenced interfaces may also be reported with a JVMTI_HEAP_REFERENCE_CONSTANT_POOL reference kind. @@ -3371,10 +3375,10 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Reference from a class to a resolved entry in the constant pool. - Reference from a class to its superclass. + Reference from a class to its superclass. A callback is not sent if the superclass is java.lang.Object. Note: loaded classes define superclasses via a constant pool - reference, so the referenced superclass may also be reported with + reference, so the referenced superclass may also be reported with a JVMTI_HEAP_REFERENCE_CONSTANT_POOL reference kind. @@ -3404,88 +3408,88 @@ err = (*jvmti)->Deallocate(jvmti, stack_info); Definitions for the single character type descriptors of primitive types. - 'Z' - Java programming language boolean - JNI jboolean - + 'B' - Java programming language byte - JNI jbyte - + 'C' - Java programming language char - JNI jchar - + 'S' - Java programming language short - JNI jshort - + 'I' - Java programming language int - JNI jint - + 'J' - Java programming language long - JNI jlong - + 'F' - Java programming language float - JNI jfloat - + 'D' - Java programming language double - JNI jdouble - + - - Reference information returned for - and + Reference information returned for + and references. - - For , the - referrer object is not a class or an inteface. - In this case, index is the index of the field - in the class of the referrer object. + + For , the + referrer object is not a class or an inteface. + In this case, index is the index of the field + in the class of the referrer object. This class is referred to below as C.

        For , the referrer object is a class (referred to below as C) or an interface (referred to below as I). - In this case, index is the index of the field in + In this case, index is the index of the field in that class or interface.

        - If the referrer object is not an interface, then the field - indices are determined as follows: + If the referrer object is not an interface, then the field + indices are determined as follows:

        • make a list of all the fields in C and its - superclasses, starting with all the fields in + superclasses, starting with all the fields in java.lang.Object and ending with all the fields in C.
        • -
        • Within this list, put +
        • Within this list, put the fields for a given class in the order returned by .
        • -
        • Assign the fields in this list indices - n, n+1, ..., in order, where n +
        • Assign the fields in this list indices + n, n+1, ..., in order, where n is the count of the fields in all the interfaces - implemented by C. - Note that C implements all interfaces + implemented by C. + Note that C implements all interfaces directly implemented by its superclasses; as well as all superinterfaces of these interfaces.
        - If the referrer object is an interface, then the field + If the referrer object is an interface, then the field indices are determined as follows:
          -
        • make a list of the fields directly declared in +
        • make a list of the fields directly declared in I.
        • -
        • Within this list, put +
        • Within this list, put the fields in the order returned by .
        • -
        • Assign the fields in this list indices - n, n+1, ..., in order, where n +
        • Assign the fields in this list indices + n, n+1, ..., in order, where n is the count of the fields in all the superinterfaces of I.
        @@ -3518,7 +3522,7 @@ class C2 extends C1 implements I2 { Assume that called on C1 returns the fields of C1 in the - order: a, b; and that the fields of C2 are + order: a, b; and that the fields of C2 are returned in the order: q, r. An instance of class C1 will have the following field indices: @@ -3565,7 +3569,7 @@ class C2 extends C1 implements I2 { The count of the fields in the interfaces implemented by C2 is three (n=3): p of I0, - x of I1 and y of I2 + x of I1 and y of I2 (an interface of C2). Note that the field p of I0 is only included once. @@ -3607,7 +3611,7 @@ class C2 extends C1 implements I2 { The class C2 will have the same field indices. Note that a field may have a different index depending on the object that is viewing it -- for example field "a" above. - Note also: not all field indices may be visible from the + Note also: not all field indices may be visible from the callbacks, but all indices are shown for illustrative purposes.

        The interface I1 will have the @@ -3627,46 +3631,46 @@ class C2 extends C1 implements I2 {

  • - + - - Reference information returned for + Reference information returned for references. - + The array index. - - Reference information returned for + Reference information returned for references. - - The index into the constant pool of the class. See the description in + + The index into the constant pool of the class. See the description in . - - Reference information returned for + Reference information returned for references. @@ -3684,7 +3688,7 @@ class C2 extends C1 implements I2 { - The depth of the frame. + The depth of the frame. @@ -3707,11 +3711,11 @@ class C2 extends C1 implements I2 { - - Reference information returned for + Reference information returned for references. @@ -3729,7 +3733,7 @@ class C2 extends C1 implements I2 { - The depth of the frame. + The depth of the frame. @@ -3740,8 +3744,8 @@ class C2 extends C1 implements I2 { - Reference information returned for other references. @@ -3796,8 +3800,8 @@ class C2 extends C1 implements I2 { - The information returned about referrers. @@ -3805,50 +3809,50 @@ class C2 extends C1 implements I2 { jvmtiHeapReferenceInfoField - - The referrer information for - + + The referrer information for + and references. jvmtiHeapReferenceInfoArray - - The referrer information for + + The referrer information for For references. jvmtiHeapReferenceInfoConstantPool - - The referrer information for + + The referrer information for For references. jvmtiHeapReferenceInfoStackLocal - - The referrer information for + + The referrer information for For references. jvmtiHeapReferenceInfoJniLocal - - The referrer information for + + The referrer information for For references. jvmtiHeapReferenceInfoReserved - + reserved for future use. - @@ -3856,22 +3860,22 @@ class C2 extends C1 implements I2 { The callback to be called to describe an - object in the heap. Used by the + object in the heap. Used by the function, ignored by the function. - + jvmtiHeapReferenceCallback The callback to be called to describe an - object reference. Used by the + object reference. Used by the function, ignored by the function. - + jvmtiPrimitiveFieldCallback @@ -3880,7 +3884,7 @@ class C2 extends C1 implements I2 { The callback to be called to describe a primitive field. - + jvmtiArrayPrimitiveValueCallback @@ -3889,7 +3893,7 @@ class C2 extends C1 implements I2 { The callback to be called to describe an array of primitive values. - + jvmtiStringPrimitiveValueCallback @@ -3897,7 +3901,7 @@ class C2 extends C1 implements I2 { The callback to be called to describe a String value. - + jvmtiReservedCallback @@ -3905,7 +3909,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + jvmtiReservedCallback @@ -3913,7 +3917,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + jvmtiReservedCallback @@ -3921,7 +3925,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + jvmtiReservedCallback @@ -3929,7 +3933,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + jvmtiReservedCallback @@ -3937,7 +3941,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + jvmtiReservedCallback @@ -3945,7 +3949,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + jvmtiReservedCallback @@ -3953,7 +3957,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + jvmtiReservedCallback @@ -3961,7 +3965,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + jvmtiReservedCallback @@ -3969,7 +3973,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + jvmtiReservedCallback @@ -3977,7 +3981,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + jvmtiReservedCallback @@ -3985,7 +3989,7 @@ class C2 extends C1 implements I2 { Reserved for future use.. - + @@ -4029,10 +4033,10 @@ class C2 extends C1 implements I2 { - The tag of the class of object (zero if the class is not tagged). - If the object represents a runtime class, - the class_tag is the tag - associated with java.lang.Class + The tag of the class of object (zero if the class is not tagged). + If the object represents a runtime class, + the class_tag is the tag + associated with java.lang.Class (zero if java.lang.Class is not tagged). @@ -4047,7 +4051,7 @@ class C2 extends C1 implements I2 { The object tag value, or zero if the object is not tagged. To set the tag value to be associated with the object - the agent sets the jlong pointed to by the parameter. + the agent sets the jlong pointed to by the parameter. @@ -4059,17 +4063,17 @@ class C2 extends C1 implements I2 { - The user supplied data that was passed into the iteration function. + The user supplied data that was passed into the iteration function. - + Heap Reference Callback - Agent supplied callback function. + Agent supplied callback function. Describes a reference from an object or the VM (the referrer) to another object (the referree) or a heap root to a referree.

    @@ -4093,12 +4097,12 @@ class C2 extends C1 implements I2 { jvmtiHeapReferenceInfo - Details about the reference. + Details about the reference. Set when the reference_kind is , , , - , + , , or . Otherwise NULL. @@ -4107,9 +4111,9 @@ class C2 extends C1 implements I2 { - The tag of the class of referree object (zero if the class is not tagged). - If the referree object represents a runtime class, - the class_tag is the tag + The tag of the class of referree object (zero if the class is not tagged). + If the referree object represents a runtime class, + the class_tag is the tag associated with java.lang.Class (zero if java.lang.Class is not tagged). @@ -4127,14 +4131,14 @@ class C2 extends C1 implements I2 { - Size of the referree object (in bytes). + Size of the referree object (in bytes). See . - Points to the referree object tag value, or zero if the object is not + Points to the referree object tag value, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter. @@ -4143,14 +4147,14 @@ class C2 extends C1 implements I2 { - Points to the tag of the referrer object, or + Points to the tag of the referrer object, or points to the zero if the referrer - object is not tagged. + object is not tagged. NULL if the referrer in not an object (that is, this callback is reporting a heap root). To set the tag value to be associated with the referrer object the agent sets the jlong pointed to by the parameter. - If this callback is reporting a reference from an object to itself, + If this callback is reporting a reference from an object to itself, referrer_tag_ptr == tag_ptr. @@ -4163,7 +4167,7 @@ class C2 extends C1 implements I2 { - The user supplied data that was passed into the iteration function. + The user supplied data that was passed into the iteration function. @@ -4173,7 +4177,7 @@ class C2 extends C1 implements I2 { Primitive Field Callback - Agent supplied callback function which + Agent supplied callback function which describes a primitive field of an object (the object). A primitive field is a field whose type is a primitive type. This callback will describe a static field if the object is a class, @@ -4191,7 +4195,7 @@ class C2 extends C1 implements I2 { jvmtiHeapReferenceKind - The kind of field -- instance or static ( or + The kind of field -- instance or static ( or ). @@ -4206,17 +4210,17 @@ class C2 extends C1 implements I2 { - The tag of the class of the object (zero if the class is not tagged). - If the object represents a runtime class, the - object_class_tag is the tag - associated with java.lang.Class + The tag of the class of the object (zero if the class is not tagged). + If the object represents a runtime class, the + object_class_tag is the tag + associated with java.lang.Class (zero if java.lang.Class is not tagged). - Points to the tag of the object, or zero if the object is not + Points to the tag of the object, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter. @@ -4237,7 +4241,7 @@ class C2 extends C1 implements I2 { - The user supplied data that was passed into the iteration function. + The user supplied data that was passed into the iteration function. @@ -4247,7 +4251,7 @@ class C2 extends C1 implements I2 { Array Primitive Value Callback - Agent supplied callback function. + Agent supplied callback function. Describes the values in an array of a primitive type.

    This function should return a bit vector of the desired @@ -4262,20 +4266,20 @@ class C2 extends C1 implements I2 { - The tag of the class of the array object (zero if the class is not tagged). + The tag of the class of the array object (zero if the class is not tagged). - Size of the array (in bytes). + Size of the array (in bytes). See . - Points to the tag of the array object, or zero if the object is not + Points to the tag of the array object, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter. @@ -4303,7 +4307,7 @@ class C2 extends C1 implements I2 { - The user supplied data that was passed into the iteration function. + The user supplied data that was passed into the iteration function. @@ -4313,7 +4317,7 @@ class C2 extends C1 implements I2 { String Primitive Value Callback - Agent supplied callback function. + Agent supplied callback function. Describes the value of a java.lang.String.

    This function should return a bit vector of the desired @@ -4328,21 +4332,21 @@ class C2 extends C1 implements I2 { - The tag of the class of the String class (zero if the class is not tagged). + The tag of the class of the String class (zero if the class is not tagged). Is this needed? - Size of the string (in bytes). + Size of the string (in bytes). See . - Points to the tag of the String object, or zero if the object is not + Points to the tag of the String object, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter. @@ -4357,15 +4361,15 @@ class C2 extends C1 implements I2 { - The length of the string. - The length is equal to the number of 16-bit Unicode + The length of the string. + The length is equal to the number of 16-bit Unicode characters in the string. - The user supplied data that was passed into the iteration function. + The user supplied data that was passed into the iteration function. @@ -4384,27 +4388,27 @@ class C2 extends C1 implements I2 { Follow References - - This function initiates a traversal over the objects that are + + This function initiates a traversal over the objects that are directly and indirectly reachable from the specified object or, - if initial_object is not specified, all objects + if initial_object is not specified, all objects reachable from the heap roots. - The heap root are the set of system classes, - JNI globals, references from thread stacks, and other objects used as roots - for the purposes of garbage collection. + The heap root are the set of system classes, + JNI globals, references from thread stacks, and other objects used as roots + for the purposes of garbage collection.

    This function operates by traversing the reference graph. Let A, B, ... represent objects. When a reference from A to B is traversed, - when a reference from a heap root to B is traversed, - or when B is specified as the , + when a reference from a heap root to B is traversed, + or when B is specified as the , then B is said to be visited. - A reference from A to B is not traversed until A + A reference from A to B is not traversed until A is visited. References are reported in the same order that the references are traversed. - Object references are reported by invoking the agent supplied + Object references are reported by invoking the agent supplied callback function . - In a reference from A to B, A is known + In a reference from A to B, A is known as the referrer and B as the referree. The callback is invoked exactly once for each reference from a referrer; this is true even if there are reference cycles or multiple paths to @@ -4412,10 +4416,10 @@ class C2 extends C1 implements I2 { There may be more than one reference between a referrer and a referree, each reference is reported. These references may be distinguished by examining the - reference_kind and - reference_info parameters of the callback.

    @@ -4452,10 +4456,10 @@ class C2 extends C1 implements I2 { whether the callback will be invoked, it does not influence which objects are visited nor does it influence whether other callbacks will be invoked. - However, the + However, the visit control flags returned by - do determine if the objects referenced by the + do determine if the objects referenced by the current object as visited. The heap filter flags and provided as parameters to this function @@ -4464,7 +4468,7 @@ class C2 extends C1 implements I2 { For example, if the only callback that was set is and klass is set to the array of bytes class, then only arrays of byte will be - reported. + reported. The table below summarizes this:

    @@ -4543,22 +4547,22 @@ class C2 extends C1 implements I2 {

    During the execution of this function the state of the heap does not change: no objects are allocated, no objects are - garbage collected, and the state of objects (including - held values) does not change. - As a result, threads executing Java + garbage collected, and the state of objects (including + held values) does not change. + As a result, threads executing Java programming language code, threads attempting to resume the - execution of Java programming language code, and threads + execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled. new - + - This bit vector of + This bit vector of heap filter flags. restricts the objects for which the callback function is called. This applies to both the object and primitive callbacks. @@ -4571,7 +4575,7 @@ class C2 extends C1 implements I2 { class - Callbacks are only reported when the object is an instance of + Callbacks are only reported when the object is an instance of this class. Objects which are instances of a subclass of klass are not reported. @@ -4595,14 +4599,14 @@ class C2 extends C1 implements I2 { Structure defining the set of callback functions. - + NULL is passed as the user supplied data - User supplied data to be passed to the callback. + User supplied data to be passed to the callback. @@ -4619,12 +4623,12 @@ class C2 extends C1 implements I2 { Iterate Through Heap - - Initiate an iteration over all objects in the heap. - This includes both reachable and + + Initiate an iteration over all objects in the heap. + This includes both reachable and unreachable objects. Objects are visited in no particular order.

    - Heap objects are reported by invoking the agent supplied + Heap objects are reported by invoking the agent supplied callback function . References between objects are not reported. If only reachable objects are desired, or if object reference information @@ -4638,7 +4642,7 @@ class C2 extends C1 implements I2 { . A primitive field is reported after the object with that field is visited; - it is reported by invoking the agent supplied + it is reported by invoking the agent supplied callback function .

    @@ -4656,7 +4660,7 @@ class C2 extends C1 implements I2 { For example, if the only callback that was set is and klass is set to the array of bytes class, then only arrays of byte will be - reported. The table below summarizes this (contrast this with + reported. The table below summarizes this (contrast this with ):

    @@ -4735,11 +4739,11 @@ class C2 extends C1 implements I2 {

    During the execution of this function the state of the heap does not change: no objects are allocated, no objects are - garbage collected, and the state of objects (including - held values) does not change. - As a result, threads executing Java + garbage collected, and the state of objects (including + held values) does not change. + As a result, threads executing Java programming language code, threads attempting to resume the - execution of Java programming language code, and threads + execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled. new @@ -4750,7 +4754,7 @@ class C2 extends C1 implements I2 { - This bit vector of + This bit vector of heap filter flags. restricts the objects for which the callback function is called. This applies to both the object and primitive callbacks. @@ -4762,7 +4766,7 @@ class C2 extends C1 implements I2 { callbacks are not limited to instances of a particular class - Callbacks are only reported when the object is an instance of + Callbacks are only reported when the object is an instance of this class. Objects which are instances of a subclass of klass are not reported. @@ -4777,14 +4781,14 @@ class C2 extends C1 implements I2 { Structure defining the set callback functions. - + NULL is passed as the user supplied data - User supplied data to be passed to the callback. + User supplied data to be passed to the callback. @@ -4799,7 +4803,7 @@ class C2 extends C1 implements I2 { Get Tag Retrieve the tag associated with an object. - The tag is a long value typically used to store a + The tag is a long value typically used to store a unique identifier or pointer to object information. The tag is set with . @@ -4820,7 +4824,7 @@ class C2 extends C1 implements I2 { - On return, the referenced long is set to the value + On return, the referenced long is set to the value of the tag. @@ -4833,7 +4837,7 @@ class C2 extends C1 implements I2 { Set Tag Set the tag associated with an object. - The tag is a long value typically used to store a + The tag is a long value typically used to store a unique identifier or pointer to object information. The tag is visible with . @@ -4891,7 +4895,7 @@ class C2 extends C1 implements I2 { - Return the number of objects with any of the tags + Return the number of objects with any of the tags in . @@ -4901,7 +4905,7 @@ class C2 extends C1 implements I2 { this information is not returned - Returns the array of objects with any of the tags + Returns the array of objects with any of the tags in . @@ -4932,13 +4936,13 @@ class C2 extends C1 implements I2 { This function does not return until the garbage collection is finished.

    - Although garbage collection is as complete - as possible there is no guarantee that all + Although garbage collection is as complete + as possible there is no guarantee that all - events will have been - sent by the time that this function - returns. In particular, an object may be - prevented from being freed because it + events will have been + sent by the time that this function + returns. In particular, an object may be + prevented from being freed because it is awaiting finalization. new @@ -4956,7 +4960,7 @@ class C2 extends C1 implements I2 { - These functions and data types were introduced in the original + These functions and data types were introduced in the original version 1.0 and have been superseded by more powerful and flexible versions @@ -4966,7 +4970,7 @@ class C2 extends C1 implements I2 {

    • - Allow access to primitive values (the value of Strings, arrays, + Allow access to primitive values (the value of Strings, arrays, and primitive fields)
    • @@ -5030,13 +5034,13 @@ class C2 extends C1 implements I2 { Reference from an object to its class. - + Reference from an object to the value of one of its instance fields. For references of this kind the referrer_index parameter to the jvmtiObjectReferenceCallback is the index of the - the instance field. The index is based on the order of all the + the instance field. The index is based on the order of all the object's fields. This includes all fields of the directly declared static and instance fields in the class, and includes all fields (both public and private) fields declared in superclasses and superinterfaces. @@ -5059,7 +5063,7 @@ class C2 extends C1 implements I2 { Reference from a class to its protection domain. - + Reference from a class to one of its interfaces. @@ -5068,7 +5072,7 @@ class C2 extends C1 implements I2 { For references of this kind the referrer_index parameter to the jvmtiObjectReferenceCallback is the index of the - the static field. The index is based on the order of all the + the static field. The index is based on the order of all the object's fields. This includes all fields of the directly declared static and instance fields in the class, and includes all fields (both public and private) fields declared in superclasses and superinterfaces. @@ -5091,11 +5095,11 @@ class C2 extends C1 implements I2 { - Continue the iteration. + Continue the iteration. If this is a reference iteration, follow the references of this object. - + - Continue the iteration. + Continue the iteration. If this is a reference iteration, ignore the references of this object. @@ -5121,9 +5125,9 @@ class C2 extends C1 implements I2 { - The tag of the class of object (zero if the class is not tagged). - If the object represents a runtime class, - the class_tag is the tag + The tag of the class of object (zero if the class is not tagged). + If the object represents a runtime class, + the class_tag is the tag associated with java.lang.Class (zero if java.lang.Class is not tagged). @@ -5134,60 +5138,6 @@ class C2 extends C1 implements I2 { Size of the object (in bytes). See . - - - - The object tag value, or zero if the object is not tagged. - To set the tag value to be associated with the object - the agent sets the jlong pointed to by the parameter. - - - - - - The user supplied data that was passed into the iteration function. - - - - - - - jvmtiIterationControl - Heap Root Object Callback - - Agent supplied callback function. - Describes (but does not pass in) an object that is a root for the purposes - of garbage collection. -

      - Return value should be JVMTI_ITERATION_CONTINUE to continue iteration, - JVMTI_ITERATION_IGNORE to continue iteration without pursuing - references from referree object or JVMTI_ITERATION_ABORT to stop iteration. -

      - See the heap callback - function restrictions. - - - - jvmtiHeapRootKind - - The kind of heap root. - - - - - - The tag of the class of object (zero if the class is not tagged). - If the object represents a runtime class, the class_tag is the tag - associated with java.lang.Class - (zero if java.lang.Class is not tagged). - - - - - - Size of the object (in bytes). See . - - @@ -5199,22 +5149,76 @@ class C2 extends C1 implements I2 { - The user supplied data that was passed into the iteration function. + The user supplied data that was passed into the iteration function. - + + + + jvmtiIterationControl + Heap Root Object Callback + + Agent supplied callback function. + Describes (but does not pass in) an object that is a root for the purposes + of garbage collection. +

      + Return value should be JVMTI_ITERATION_CONTINUE to continue iteration, + JVMTI_ITERATION_IGNORE to continue iteration without pursuing + references from referree object or JVMTI_ITERATION_ABORT to stop iteration. +

      + See the heap callback + function restrictions. + + + + jvmtiHeapRootKind + + The kind of heap root. + + + + + + The tag of the class of object (zero if the class is not tagged). + If the object represents a runtime class, the class_tag is the tag + associated with java.lang.Class + (zero if java.lang.Class is not tagged). + + + + + + Size of the object (in bytes). See . + + + + + + The object tag value, or zero if the object is not tagged. + To set the tag value to be associated with the object + the agent sets the jlong pointed to by the parameter. + + + + + + The user supplied data that was passed into the iteration function. + + + + jvmtiIterationControl Stack Reference Object Callback Agent supplied callback function. - Describes (but does not pass in) an object on the stack that is a root for + Describes (but does not pass in) an object on the stack that is a root for the purposes of garbage collection.

      Return value should be JVMTI_ITERATION_CONTINUE to continue iteration, - JVMTI_ITERATION_IGNORE to continue iteration without pursuing + JVMTI_ITERATION_IGNORE to continue iteration without pursuing references from referree object or JVMTI_ITERATION_ABORT to stop iteration.

      See the heap callback @@ -5231,9 +5235,9 @@ class C2 extends C1 implements I2 { - The tag of the class of object (zero if the class is not tagged). - If the object represents a runtime class, the class_tag is the tag - associated with java.lang.Class + The tag of the class of object (zero if the class is not tagged). + If the object represents a runtime class, the class_tag is the tag + associated with java.lang.Class (zero if java.lang.Class is not tagged). @@ -5260,7 +5264,7 @@ class C2 extends C1 implements I2 { - The depth of the frame. + The depth of the frame. @@ -5278,7 +5282,7 @@ class C2 extends C1 implements I2 { - The user supplied data that was passed into the iteration function. + The user supplied data that was passed into the iteration function. @@ -5288,12 +5292,12 @@ class C2 extends C1 implements I2 { jvmtiIterationControl Object Reference Callback - Agent supplied callback function. + Agent supplied callback function. Describes a reference from an object (the referrer) to another object (the referree).

      Return value should be JVMTI_ITERATION_CONTINUE to continue iteration, - JVMTI_ITERATION_IGNORE to continue iteration without pursuing + JVMTI_ITERATION_IGNORE to continue iteration without pursuing references from referree object or JVMTI_ITERATION_ABORT to stop iteration.

      See the heap callback @@ -5309,24 +5313,24 @@ class C2 extends C1 implements I2 { - The tag of the class of referree object (zero if the class is not tagged). + The tag of the class of referree object (zero if the class is not tagged). If the referree object represents a runtime class, - the class_tag is the tag - associated with java.lang.Class + the class_tag is the tag + associated with java.lang.Class (zero if java.lang.Class is not tagged). - Size of the referree object (in bytes). + Size of the referree object (in bytes). See . - The referree object tag value, or zero if the object is not + The referree object tag value, or zero if the object is not tagged. To set the tag value to be associated with the object the agent sets the jlong pointed to by the parameter. @@ -5341,11 +5345,11 @@ class C2 extends C1 implements I2 { - + For references of type JVMTI_REFERENCE_FIELD or JVMTI_REFERENCE_STATIC_FIELD the index - of the field in the referrer object. The index is based on the - order of all the object's fields - see JVMTI_REFERENCE_FIELD or JVMTI_REFERENCE_STATIC_FIELD @@ -5358,7 +5362,7 @@ class C2 extends C1 implements I2 { For references of type JVMTI_REFERENCE_CONSTANT_POOL the index into the constant pool of the class - see - JVMTI_REFERENCE_CONSTANT_POOL for further + JVMTI_REFERENCE_CONSTANT_POOL for further description.

      For references of other kinds the referrer_index is @@ -5368,7 +5372,7 @@ class C2 extends C1 implements I2 { - The user supplied data that was passed into the iteration function. + The user supplied data that was passed into the iteration function. @@ -5376,17 +5380,17 @@ class C2 extends C1 implements I2 { Iterate Over Objects Reachable From Object - + This function iterates over all objects that are directly and indirectly reachable from the specified object. For each object A (known - as the referrer) with a reference to object B the specified + as the referrer) with a reference to object B the specified callback function is called to describe the object reference. The callback is called exactly once for each reference from a referrer; this is true even if there are reference cycles or multiple paths to the referrer. There may be more than one reference between a referrer and a referree, - These may be distinguished by the + These may be distinguished by the and . The callback for an object will always occur after the callback for @@ -5397,18 +5401,18 @@ class C2 extends C1 implements I2 {

      During the execution of this function the state of the heap does not change: no objects are allocated, no objects are - garbage collected, and the state of objects (including - held values) does not change. - As a result, threads executing Java + garbage collected, and the state of objects (including + held values) does not change. + As a result, threads executing Java programming language code, threads attempting to resume the - execution of Java programming language code, and threads + execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled. new - + @@ -5423,14 +5427,14 @@ class C2 extends C1 implements I2 { The callback to be called to describe each object reference. - + NULL is passed as the user supplied data - User supplied data to be passed to the callback. + User supplied data to be passed to the callback. @@ -5443,9 +5447,9 @@ class C2 extends C1 implements I2 { This function iterates over the root objects and all objects that are directly and indirectly reachable from the root objects. - The root objects comprise the set of system classes, - JNI globals, references from thread stacks, and other objects used as roots - for the purposes of garbage collection. + The root objects comprise the set of system classes, + JNI globals, references from thread stacks, and other objects used as roots + for the purposes of garbage collection.

      For each root the or callback is called. @@ -5458,7 +5462,7 @@ class C2 extends C1 implements I2 { this is true even if there are reference cycles or multiple paths to the referrer. There may be more than one reference between a referrer and a referree, - These may be distinguished by the + These may be distinguished by the and . The callback for an object will always occur after the callback for @@ -5468,26 +5472,26 @@ class C2 extends C1 implements I2 { references which are reported.

      Roots are always reported to the profiler before any object references - are reported. In other words, the + are reported. In other words, the callback will not be called until the appropriate callback has been called - for all roots. If the callback is + for all roots. If the callback is specified as NULL then this function returns after reporting the root objects to the profiler.

      During the execution of this function the state of the heap does not change: no objects are allocated, no objects are - garbage collected, and the state of objects (including - held values) does not change. - As a result, threads executing Java + garbage collected, and the state of objects (including + held values) does not change. + As a result, threads executing Java programming language code, threads attempting to resume the - execution of Java programming language code, and threads + execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled. new - + jvmtiHeapRootCallback @@ -5498,7 +5502,7 @@ class C2 extends C1 implements I2 { JVMTI_HEAP_ROOT_JNI_GLOBAL, JVMTI_HEAP_ROOT_SYSTEM_CLASS, JVMTI_HEAP_ROOT_MONITOR, - JVMTI_HEAP_ROOT_THREAD, or + JVMTI_HEAP_ROOT_THREAD, or JVMTI_HEAP_ROOT_OTHER. @@ -5528,7 +5532,7 @@ class C2 extends C1 implements I2 { NULL is passed as the user supplied data - User supplied data to be passed to the callback. + User supplied data to be passed to the callback. @@ -5538,14 +5542,14 @@ class C2 extends C1 implements I2 { Iterate Over Heap - - Iterate over all objects in the heap. This includes both reachable and + + Iterate over all objects in the heap. This includes both reachable and unreachable objects.

      The parameter indicates the objects for which the callback function is called. If this parameter - is JVMTI_HEAP_OBJECT_TAGGED then the callback will only be - called for every object that is tagged. If the parameter is + is JVMTI_HEAP_OBJECT_TAGGED then the callback will only be + called for every object that is tagged. If the parameter is JVMTI_HEAP_OBJECT_UNTAGGED then the callback will only be for objects that are not tagged. If the parameter is JVMTI_HEAP_OBJECT_EITHER then the callback will be @@ -5554,11 +5558,11 @@ class C2 extends C1 implements I2 {

      During the execution of this function the state of the heap does not change: no objects are allocated, no objects are - garbage collected, and the state of objects (including - held values) does not change. - As a result, threads executing Java + garbage collected, and the state of objects (including + held values) does not change. + As a result, threads executing Java programming language code, threads attempting to resume the - execution of Java programming language code, and threads + execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled. new @@ -5587,7 +5591,7 @@ class C2 extends C1 implements I2 { NULL is passed as the user supplied data - User supplied data to be passed to the callback. + User supplied data to be passed to the callback. @@ -5598,15 +5602,15 @@ class C2 extends C1 implements I2 { Iterate Over Instances Of Class - Iterate over all objects in the heap that are instances of the specified class. - This includes direct instances of the specified class and + Iterate over all objects in the heap that are instances of the specified class. + This includes direct instances of the specified class and instances of all subclasses of the specified class. This includes both reachable and unreachable objects.

      The parameter indicates the objects for which the callback function is called. If this parameter - is JVMTI_HEAP_OBJECT_TAGGED then the callback will only be - called for every object that is tagged. If the parameter is + is JVMTI_HEAP_OBJECT_TAGGED then the callback will only be + called for every object that is tagged. If the parameter is JVMTI_HEAP_OBJECT_UNTAGGED then the callback will only be called for objects that are not tagged. If the parameter is JVMTI_HEAP_OBJECT_EITHER then the callback will be @@ -5615,11 +5619,11 @@ class C2 extends C1 implements I2 {

      During the execution of this function the state of the heap does not change: no objects are allocated, no objects are - garbage collected, and the state of objects (including - held values) does not change. - As a result, threads executing Java + garbage collected, and the state of objects (including + held values) does not change. + As a result, threads executing Java programming language code, threads attempting to resume the - execution of Java programming language code, and threads + execution of Java programming language code, and threads attempting to execute JNI functions are typically stalled. new @@ -5645,7 +5649,7 @@ class C2 extends C1 implements I2 { The iterator function to be called for each - instance matching + instance matching the . @@ -5655,7 +5659,7 @@ class C2 extends C1 implements I2 { NULL is passed as the user supplied data - User supplied data to be passed to the callback. + User supplied data to be passed to the callback. @@ -5668,19 +5672,19 @@ class C2 extends C1 implements I2 { - These functions are used to retrieve or set the value of a local variable. + These functions are used to retrieve or set the value of a local variable. The variable is identified by the depth of the frame containing its - value and the variable's slot number within that frame. - The mapping of variables to - slot numbers can be obtained with the function + value and the variable's slot number within that frame. + The mapping of variables to + slot numbers can be obtained with the function . Get Local Variable - Object - This function can be used to retrieve the value of a local - variable whose type is Object or a subclass of Object. + This function can be used to retrieve the value of a local + variable whose type is Object or a subclass of Object. jvmdi @@ -5708,7 +5712,7 @@ class C2 extends C1 implements I2 { - On return, points to the variable's value. + On return, points to the variable's value. @@ -5716,11 +5720,11 @@ class C2 extends C1 implements I2 { Invalid slot. - + The variable type is not Object or a subclass of Object. - + Not a visible frame @@ -5732,7 +5736,7 @@ class C2 extends C1 implements I2 { This function can be used to retrieve the value of the local object variable at slot 0 (the "this" object) from non-static frames. This function can retrieve the "this" object from - native method frames, whereas GetLocalObject() would + native method frames, whereas GetLocalObject() would return JVMTI_ERROR_OPAQUE_FRAME in those cases. new @@ -5755,7 +5759,7 @@ class C2 extends C1 implements I2 { - On return, points to the variable's value. + On return, points to the variable's value. @@ -5768,10 +5772,10 @@ class C2 extends C1 implements I2 { Get Local Variable - Int - This function can be used to retrieve the value of a local + This function can be used to retrieve the value of a local variable whose type is int, - short, char, byte, or - boolean. + short, char, byte, or + boolean. jvmdi @@ -5799,7 +5803,7 @@ class C2 extends C1 implements I2 { - On return, points to the variable's value. + On return, points to the variable's value. @@ -5807,13 +5811,13 @@ class C2 extends C1 implements I2 { Invalid slot. - - The variable type is not + + The variable type is not int, short, - char, byte, or + char, byte, or boolean. - + Not a visible frame @@ -5822,8 +5826,8 @@ class C2 extends C1 implements I2 { Get Local Variable - Long - This function can be used to retrieve the value of a local - variable whose type is long. + This function can be used to retrieve the value of a local + variable whose type is long. jvmdi @@ -5851,7 +5855,7 @@ class C2 extends C1 implements I2 { - On return, points to the variable's value. + On return, points to the variable's value. @@ -5859,10 +5863,10 @@ class C2 extends C1 implements I2 { Invalid slot. - + The variable type is not long. - + Not a visible frame @@ -5871,8 +5875,8 @@ class C2 extends C1 implements I2 { Get Local Variable - Float - This function can be used to retrieve the value of a local - variable whose type is float. + This function can be used to retrieve the value of a local + variable whose type is float. jvmdi @@ -5900,7 +5904,7 @@ class C2 extends C1 implements I2 { - On return, points to the variable's value. + On return, points to the variable's value. @@ -5908,10 +5912,10 @@ class C2 extends C1 implements I2 { Invalid slot. - + The variable type is not float. - + Not a visible frame @@ -5920,8 +5924,8 @@ class C2 extends C1 implements I2 { Get Local Variable - Double - This function can be used to retrieve the value of a local - variable whose type is long. + This function can be used to retrieve the value of a local + variable whose type is long. jvmdi @@ -5949,7 +5953,7 @@ class C2 extends C1 implements I2 { - On return, points to the variable's value. + On return, points to the variable's value. @@ -5957,10 +5961,10 @@ class C2 extends C1 implements I2 { Invalid slot. - + The variable type is not double. - + Not a visible frame @@ -5969,8 +5973,8 @@ class C2 extends C1 implements I2 { Set Local Variable - Object - This function can be used to set the value of a local - variable whose type is Object or a subclass of Object. + This function can be used to set the value of a local + variable whose type is Object or a subclass of Object. jvmdi @@ -6011,7 +6015,7 @@ class C2 extends C1 implements I2 { Object or a subclass of Object. - The supplied is not compatible + The supplied is not compatible with the variable type. @@ -6023,10 +6027,10 @@ class C2 extends C1 implements I2 { Set Local Variable - Int - This function can be used to set the value of a local + This function can be used to set the value of a local variable whose type is int, - short, char, byte, or - boolean. + short, char, byte, or + boolean. jvmdi @@ -6062,10 +6066,10 @@ class C2 extends C1 implements I2 { Invalid slot. - - The variable type is not + + The variable type is not int, short, - char, byte, or + char, byte, or boolean. @@ -6077,8 +6081,8 @@ class C2 extends C1 implements I2 { Set Local Variable - Long - This function can be used to set the value of a local - variable whose type is long. + This function can be used to set the value of a local + variable whose type is long. jvmdi @@ -6114,7 +6118,7 @@ class C2 extends C1 implements I2 { Invalid slot. - + The variable type is not long. @@ -6126,8 +6130,8 @@ class C2 extends C1 implements I2 { Set Local Variable - Float - This function can be used to set the value of a local - variable whose type is float. + This function can be used to set the value of a local + variable whose type is float. jvmdi @@ -6163,7 +6167,7 @@ class C2 extends C1 implements I2 { Invalid slot. - + The variable type is not float. @@ -6175,8 +6179,8 @@ class C2 extends C1 implements I2 { Set Local Variable - Double - This function can be used to set the value of a local - variable whose type is double. + This function can be used to set the value of a local + variable whose type is double. jvmdi @@ -6212,7 +6216,7 @@ class C2 extends C1 implements I2 { Invalid slot. - + The variable type is not double. @@ -6263,7 +6267,7 @@ class C2 extends C1 implements I2 { - + The designated bytecode already has a breakpoint. @@ -6300,7 +6304,7 @@ class C2 extends C1 implements I2 { - + There's no breakpoint at the designated bytecode. @@ -6321,14 +6325,14 @@ class C2 extends C1 implements I2 { by klass and field is about to be accessed. An event will be generated for each access of the field - until it is canceled with + until it is canceled with . Field accesses from Java programming language code or from JNI code are watched, fields modified by other means are not watched. Note that users should be aware that their own field accesses will trigger the watch. A field can only have one field access watch set. - Modification of a field is not considered an access--use + Modification of a field is not considered an access--use to monitor modifications. @@ -6352,7 +6356,7 @@ class C2 extends C1 implements I2 { - + The designated field is already being watched for accesses. @@ -6361,8 +6365,8 @@ class C2 extends C1 implements I2 { Clear Field Access Watch - Cancel a field access watch previously set by - , on the + Cancel a field access watch previously set by + , on the field specified by klass and field. @@ -6387,7 +6391,7 @@ class C2 extends C1 implements I2 { - + The designated field is not being watched for accesses. @@ -6401,7 +6405,7 @@ class C2 extends C1 implements I2 { by klass and field is about to be modified. An event will be generated for each modification of the field - until it is canceled with + until it is canceled with . Field modifications from Java programming language code or from JNI code are watched, fields modified by other means are not watched. @@ -6429,7 +6433,7 @@ class C2 extends C1 implements I2 { - + The designated field is already being watched for modifications. @@ -6439,8 +6443,8 @@ class C2 extends C1 implements I2 { Clear Field Modification Watch - Cancel a field modification watch previously set by - , on the + Cancel a field modification watch previously set by + , on the field specified by klass and field. @@ -6465,7 +6469,7 @@ class C2 extends C1 implements I2 { - + The designated field is not being watched for modifications. @@ -6512,7 +6516,7 @@ class C2 extends C1 implements I2 { Get Named Module - Return the java.lang.reflect.Module object for a named + Return the java.lang.Module object for a named module defined to a class loader that contains a given package. The module is returned via module_ptr.

      @@ -6550,7 +6554,7 @@ class C2 extends C1 implements I2 { - On return, points to a java.lang.reflect.Module object + On return, points to a java.lang.Module object or points to NULL. @@ -6595,6 +6599,10 @@ class C2 extends C1 implements I2 { If is not a module object. + + if the module cannot be modified. + See . + @@ -6629,7 +6637,7 @@ class C2 extends C1 implements I2 { The module the package is exported to. If the to_module is not a subclass of - java.lang.reflect.Module this function returns + java.lang.Module this function returns . @@ -6645,6 +6653,10 @@ class C2 extends C1 implements I2 { If the package does not belong to the module. + + if the module cannot be modified. + See . + @@ -6680,7 +6692,7 @@ class C2 extends C1 implements I2 { The module with the package to open. If the to_module is not a subclass of - java.lang.reflect.Module this function returns + java.lang.Module this function returns . @@ -6696,6 +6708,10 @@ class C2 extends C1 implements I2 { If the package does not belong to the module. + + if the module cannot be modified. + See . + @@ -6733,6 +6749,10 @@ class C2 extends C1 implements I2 { If is not a class object. + + if the module cannot be modified. + See . + @@ -6779,6 +6799,46 @@ class C2 extends C1 implements I2 { If is not a class object. + + if the module cannot be modified. + See . + + + + + + Is Modifiable Module + + Determines whether a module is modifiable. + If a module is modifiable then this module can be updated with + , , + , , + and . If a module is not modifiable + then the module can not be updated with these functions. The result of + this function is always JNI_TRUE when called to determine + if an unnamed module is modifiable. + + new + + + + + + + The module to query. + + + + + + On return, points to the boolean result of this function. + + + + + + If is not a module object. + @@ -6797,9 +6857,9 @@ class C2 extends C1 implements I2 { class_count_ptr, and the array itself via classes_ptr.

      - Array classes of all types (including arrays of primitive types) are - included in the returned list. Primitive classes (for example, - java.lang.Integer.TYPE) are not included in this list. + Array classes of all types (including arrays of primitive types) are + included in the returned list. Primitive classes (for example, + java.lang.Integer.TYPE) are not included in this list. jvmdi @@ -6827,8 +6887,8 @@ class C2 extends C1 implements I2 { Get Classloader Classes Returns an array of those classes for which this class loader has - been recorded as an initiating loader. Each - class in the returned array was created by this class loader, + been recorded as an initiating loader. Each + class in the returned array was created by this class loader, either by defining it directly or by delegation to another class loader. See .

      @@ -6870,14 +6930,14 @@ class C2 extends C1 implements I2 { Get Class Signature - For the class indicated by klass, return the - JNI - type signature + For the class indicated by klass, return the + JNI + type signature and the generic signature of the class. For example, java.util.List is "Ljava/util/List;" and int[] is "[I" The returned name for primitive classes - is the type signature character of the corresponding primitive type. + is the type signature character of the corresponding primitive type. For example, java.lang.Integer.TYPE is "I". jvmdiClone @@ -6892,7 +6952,7 @@ class C2 extends C1 implements I2 { - + the signature is not returned @@ -6902,14 +6962,14 @@ class C2 extends C1 implements I2 { - + the generic signature is not returned On return, points to the generic signature of the class, encoded as a modified UTF-8 string. If there is no generic signature attribute for the class, then, - on return, points to NULL. + on return, points to NULL. @@ -6920,7 +6980,7 @@ class C2 extends C1 implements I2 { Get Class Status - Get the status of the class. Zero or more of the following bits can be + Get the status of the class. Zero or more of the following bits can be set. @@ -6939,7 +6999,7 @@ class C2 extends C1 implements I2 { Class is an array. If set, all other bits are zero. - Class is a primitive class (for example, java.lang.Integer.TYPE). + Class is a primitive class (for example, java.lang.Integer.TYPE). If set, all other bits are zero. @@ -6957,7 +7017,7 @@ class C2 extends C1 implements I2 { - On return, points to the current state of this class as one or + On return, points to the current state of this class as one or more of the class status flags. @@ -6970,11 +7030,11 @@ class C2 extends C1 implements I2 { Get Source File Name For the class indicated by klass, return the source file - name via source_name_ptr. The returned string - is a file name only and never contains a directory name. + name via source_name_ptr. The returned string + is a file name only and never contains a directory name.

      - For primitive classes (for example, java.lang.Integer.TYPE) - and for arrays this function returns + For primitive classes (for example, java.lang.Integer.TYPE) + and for arrays this function returns . jvmdi @@ -6997,7 +7057,7 @@ class C2 extends C1 implements I2 { - + Class information does not include a source file name. This includes cases where the class is an array class or primitive class. @@ -7012,17 +7072,17 @@ class C2 extends C1 implements I2 { via modifiers_ptr. Access flags are defined in .

      - If the class is an array class, then its public, private, and protected - modifiers are the same as those of its component type. For arrays of - primitives, this component type is represented by one of the primitive - classes (for example, java.lang.Integer.TYPE). + If the class is an array class, then its public, private, and protected + modifiers are the same as those of its component type. For arrays of + primitives, this component type is represented by one of the primitive + classes (for example, java.lang.Integer.TYPE).

      - If the class is a primitive class, its public modifier is always true, - and its protected and private modifiers are always false. + If the class is a primitive class, its public modifier is always true, + and its protected and private modifiers are always false.

      - If the class is an array class or a primitive class then its final - modifier is always true and its interface modifier is always false. - The values of its other modifiers are not determined by this specification. + If the class is an array class or a primitive class then its final + modifier is always true and its interface modifier is always false. + The values of its other modifiers are not determined by this specification. jvmdi @@ -7052,7 +7112,7 @@ class C2 extends C1 implements I2 { For the class indicated by klass, return a count of methods via method_count_ptr and a list of - method IDs via methods_ptr. The method list contains + method IDs via methods_ptr. The method list contains constructors and static initializers as well as true methods. Only directly declared methods are returned (not inherited methods). An empty method list is returned for array classes and primitive classes @@ -7125,7 +7185,7 @@ class C2 extends C1 implements I2 { - + is not prepared. @@ -7134,7 +7194,7 @@ class C2 extends C1 implements I2 { Get Implemented Interfaces - Return the direct super-interfaces of this class. For a class, this + Return the direct super-interfaces of this class. For a class, this function returns the interfaces declared in its implements clause. For an interface, this function returns the interfaces declared in its extends clause. @@ -7165,7 +7225,7 @@ class C2 extends C1 implements I2 { - + is not prepared. @@ -7174,10 +7234,10 @@ class C2 extends C1 implements I2 { Get Class Version Numbers - For the class indicated by klass, + For the class indicated by klass, return the minor and major version numbers, as defined in - . + . new @@ -7193,7 +7253,7 @@ class C2 extends C1 implements I2 { On return, points to the value of the - minor_version item of the + minor_version item of the Class File Format. Note: to be consistent with the Class File Format, the minor version number is the first parameter. @@ -7203,13 +7263,13 @@ class C2 extends C1 implements I2 { On return, points to the value of the - major_version item of the + major_version item of the Class File Format. - + The class is a primitive or array class. @@ -7218,13 +7278,13 @@ class C2 extends C1 implements I2 { Get Constant Pool - For the class indicated by klass, + For the class indicated by klass, return the raw bytes of the constant pool in the format of the - constant_pool item of + constant_pool item of . The format of the constant pool may differ between versions - of the Class File Format, so, the - minor and major + of the Class File Format, so, the + minor and major class version numbers should be checked for compatibility.

      @@ -7234,17 +7294,17 @@ class C2 extends C1 implements I2 { more or fewer entries than the defining constant pool. Entries may be in a different order. The constant pool returned by GetConstantPool() will match the - constant pool used by + constant pool used by GetBytecodes(). That is, the bytecodes returned by GetBytecodes() will have constant pool indices which refer to constant pool entries returned by GetConstantPool(). - Note that since - and can change + Note that since + and can change the constant pool, the constant pool returned by this function - can change accordingly. Thus, the correspondence between + can change accordingly. Thus, the correspondence between GetConstantPool() and GetBytecodes() does not hold if there - is an intervening class retransformation or redefinition. + is an intervening class retransformation or redefinition. The value of a constant pool entry used by a given bytecode will match that of the defining class file (even if the indices don't match). Constant pool entries which are not used directly or indirectly by @@ -7282,13 +7342,13 @@ class C2 extends C1 implements I2 { On return, points to the raw constant pool, that is the bytes - defined by the constant_pool item of the + defined by the constant_pool item of the Class File Format - + The class is a primitive or array class. @@ -7300,7 +7360,7 @@ class C2 extends C1 implements I2 { Determines whether a class object reference represents an interface. The jboolean result is JNI_TRUE if the "class" is actually an interface, - JNI_FALSE otherwise. + JNI_FALSE otherwise. jvmdi @@ -7330,7 +7390,7 @@ class C2 extends C1 implements I2 { Determines whether a class object reference represents an array. The jboolean result is JNI_TRUE if the class is an array, - JNI_FALSE otherwise. + JNI_FALSE otherwise. jvmdi @@ -7360,11 +7420,11 @@ class C2 extends C1 implements I2 { Determines whether a class is modifiable. If a class is modifiable ( returns JNI_TRUE) the class can be - redefined with (assuming + redefined with (assuming the agent possesses the capability) or - retransformed with (assuming + retransformed with (assuming the agent possesses the capability). @@ -7373,7 +7433,7 @@ class C2 extends C1 implements I2 { redefined nor retransformed.

      Primitive classes (for example, java.lang.Integer.TYPE), - array classes, and some implementation defined classes are never modifiable. + array classes, and some implementation defined classes are never modifiable.

      new @@ -7451,11 +7511,11 @@ class C2 extends C1 implements I2 { Get Source Debug Extension - For the class indicated by klass, return the debug + For the class indicated by klass, return the debug extension via source_debug_extension_ptr. - The returned string + The returned string contains exactly the debug extension information present in the - class file of klass. + class file of klass. jvmdi @@ -7477,7 +7537,7 @@ class C2 extends C1 implements I2 { - + Class information does not include a debug extension. @@ -7486,15 +7546,15 @@ class C2 extends C1 implements I2 { Retransform Classes - This function facilitates the + This function facilitates the bytecode instrumentation of already loaded classes. To replace the class definition without reference to the existing - bytecodes, as one might do when recompiling from source for + bytecodes, as one might do when recompiling from source for fix-and-continue debugging, function should be used instead.

      - When classes are initially loaded or when they are + When classes are initially loaded or when they are redefined, the initial class file bytes can be transformed with the event. @@ -7502,16 +7562,16 @@ class C2 extends C1 implements I2 { (whether or not a transformation has previously occurred). This retransformation follows these steps:

        -
      • starting from the initial class file bytes +
      • starting from the initial class file bytes
      • for each retransformation incapable agent which received a ClassFileLoadHook event during the previous - load or redefine, the bytes it returned + load or redefine, the bytes it returned (via the new_class_data parameter) - are reused as the output of the transformation; + are reused as the output of the transformation; note that this is equivalent to reapplying the previous transformation, unaltered. except that the ClassFileLoadHook event @@ -7529,7 +7589,7 @@ class C2 extends C1 implements I2 {
      See the event for more details.

      - The initial class file bytes represent the bytes passed to + The initial class file bytes represent the bytes passed to ClassLoader.defineClass or RedefineClasses (before any transformations were applied), however they may not exactly match them. @@ -7541,13 +7601,13 @@ class C2 extends C1 implements I2 { order may not be preserved.

      Retransformation can cause new versions of methods to be installed. - Old method versions may become + Old method versions may become obsolete - The new method version will be used on new invokes. + The new method version will be used on new invokes. If a method has active stack frames, those active frames continue to - run the bytecodes of the original method version. + run the bytecodes of the original method version.

      - This function does not cause any initialization except that which + This function does not cause any initialization except that which would occur under the customary JVM semantics. In other words, retransforming a class does not cause its initializers to be run. The values of static fields will remain as they were @@ -7560,7 +7620,7 @@ class C2 extends C1 implements I2 { All attributes are updated.

      Instances of the retransformed class are not affected -- fields retain their - previous values. + previous values. Tags on the instances are also unaffected.

      @@ -7569,8 +7629,8 @@ class C2 extends C1 implements I2 { will be sent.

      The retransformation may change method bodies, the constant pool and attributes. - The retransformation must not add, remove or rename fields or methods, change the - signatures of methods, change modifiers, or change inheritance. + The retransformation must not add, remove or rename fields or methods, change the + signatures of methods, change modifiers, or change inheritance. These restrictions may be lifted in future versions. See the error return description below for information on error codes returned if an unsupported retransformation is attempted. @@ -7580,7 +7640,7 @@ class C2 extends C1 implements I2 { If any error code is returned other than JVMTI_ERROR_NONE, none of the classes to be retransformed will have a new definition installed. When this function returns (with the error code of JVMTI_ERROR_NONE) - all of the classes to be retransformed will have their new definitions installed. + all of the classes to be retransformed will have their new definitions installed. new @@ -7603,7 +7663,7 @@ class C2 extends C1 implements I2 { - One of the cannot be modified. + One of the cannot be modified. See . @@ -7616,7 +7676,7 @@ class C2 extends C1 implements I2 { A retransformed class file is malformed (The VM would return a ClassFormatError). - The retransformed class file definitions would lead to a circular definition + The retransformed class file definitions would lead to a circular definition (the VM would return a ClassCircularityError). @@ -7679,22 +7739,22 @@ class C2 extends C1 implements I2 { This function is used to replace the definition of a class with a new definition, as might be needed in fix-and-continue debugging. - Where the existing class file bytes are to be transformed, for + Where the existing class file bytes are to be transformed, for example in bytecode instrumentation, should be used.

      Redefinition can cause new versions of methods to be installed. - Old method versions may become + Old method versions may become obsolete - The new method version will be used on new invokes. + The new method version will be used on new invokes. If a method has active stack frames, those active frames continue to - run the bytecodes of the original method version. - If resetting of stack frames is desired, use + run the bytecodes of the original method version. + If resetting of stack frames is desired, use to pop frames with obsolete method versions.

      - This function does not cause any initialization except that which + This function does not cause any initialization except that which would occur under the customary JVM semantics. In other words, redefining a class does not cause its initializers to be run. The values of static fields will remain as they were @@ -7707,7 +7767,7 @@ class C2 extends C1 implements I2 { All attributes are updated.

      Instances of the redefined class are not affected -- fields retain their - previous values. + previous values. Tags on the instances are also unaffected.

      @@ -7716,8 +7776,8 @@ class C2 extends C1 implements I2 { will be sent (if enabled), but no other events will be sent.

      The redefinition may change method bodies, the constant pool and attributes. - The redefinition must not add, remove or rename fields or methods, change the - signatures of methods, change modifiers, or change inheritance. + The redefinition must not add, remove or rename fields or methods, change the + signatures of methods, change modifiers, or change inheritance. These restrictions may be lifted in future versions. See the error return description below for information on error codes returned if an unsupported redefinition is attempted. @@ -7728,7 +7788,7 @@ class C2 extends C1 implements I2 { If any error code is returned other than JVMTI_ERROR_NONE, none of the classes to be redefined will have a new definition installed. When this function returns (with the error code of JVMTI_ERROR_NONE) - all of the classes to be redefined will have their new definitions installed. + all of the classes to be redefined will have their new definitions installed. jvmdi @@ -7767,7 +7827,7 @@ class C2 extends C1 implements I2 { A new class file is malformed (The VM would return a ClassFormatError). - The new class file definitions would lead to a circular definition + The new class file definitions would lead to a circular definition (the VM would return a ClassCircularityError). @@ -7799,6 +7859,10 @@ class C2 extends C1 implements I2 { A method in the new class version has different modifiers than its counterpart in the old class version. + + A module cannot be modified. + See . + @@ -7812,7 +7876,7 @@ class C2 extends C1 implements I2 { For the object indicated by object, return via size_ptr the size of the object. This size is an implementation-specific approximation of - the amount of storage consumed by this object. + the amount of storage consumed by this object. It may include some or all of the object's overhead, and thus is useful for comparison within an implementation but not between implementations. @@ -7845,11 +7909,11 @@ class C2 extends C1 implements I2 { For the object indicated by object, return via hash_code_ptr a hash code. This hash code could be used to maintain a hash table of object references, - however, on some implementations this can cause significant performance - impacts--in most cases - tags + however, on some implementations this can cause significant performance + impacts--in most cases + tags will be a more efficient means of associating information with objects. - This function guarantees + This function guarantees the same hash code value for a particular object throughout its life jvmdi @@ -7915,7 +7979,7 @@ class C2 extends C1 implements I2 { Get information about the object's monitor. - The fields of the structure + The fields of the structure are filled in with information about usage of the monitor. Decide and then clarify suspend requirements. @@ -7935,7 +7999,7 @@ class C2 extends C1 implements I2 { jvmtiMonitorUsage - On return, filled with monitor information for the + On return, filled with monitor information for the specified object. @@ -7950,7 +8014,7 @@ class C2 extends C1 implements I2 { Return the list of object monitors.

      - Note: details about each monitor can be examined with + Note: details about each monitor can be examined with . new @@ -7961,7 +8025,7 @@ class C2 extends C1 implements I2 { - On return, pointer to the number + On return, pointer to the number of monitors returned in monitors_ptr. @@ -7992,7 +8056,7 @@ class C2 extends C1 implements I2 { .

      Field signatures are defined in the - JNI Specification + JNI Specification and are referred to as field descriptors in . @@ -8034,14 +8098,14 @@ class C2 extends C1 implements I2 { - + the generic signature is not returned On return, points to the generic signature of the field, encoded as a modified UTF-8 string. If there is no generic signature attribute for the field, then, - on return, points to NULL. + on return, points to NULL. @@ -8123,7 +8187,7 @@ class C2 extends C1 implements I2 { For the field indicated by klass and field, return a value indicating whether the field is synthetic via is_synthetic_ptr. - Synthetic fields are generated by the compiler but not present in the + Synthetic fields are generated by the compiler but not present in the original source code. jvmdi @@ -8177,7 +8241,7 @@ class C2 extends C1 implements I2 { An original method version which is not equivalent to the new method version is called obsolete and is assigned a new method ID; the original method ID now refers to the new method version. - A method ID can be tested for obsolescence with + A method ID can be tested for obsolescence with . @@ -8189,8 +8253,8 @@ class C2 extends C1 implements I2 { signature_ptr.

      Method signatures are defined in the - JNI Specification - and are referred to as method descriptors in + JNI Specification + and are referred to as method descriptors in . Note this is different than method signatures as defined in the Java Language Specification. @@ -8227,14 +8291,14 @@ class C2 extends C1 implements I2 { - + the generic signature is not returned On return, points to the generic signature of the method, encoded as a modified UTF-8 string. If there is no generic signature attribute for the method, then, - on return, points to NULL. + on return, points to NULL. @@ -8315,7 +8379,7 @@ class C2 extends C1 implements I2 { For the method indicated by method, return the number of local variable slots used by the method, including the local variables used to pass parameters to the - method on its invocation. + method on its invocation.

      See max_locals in . @@ -8401,7 +8465,7 @@ class C2 extends C1 implements I2 { For the method indicated by method, return a table of source line number entries. The size of the table is returned via entry_count_ptr and the table itself is - returned via table_ptr. + returned via table_ptr. jvmdi @@ -8434,7 +8498,7 @@ class C2 extends C1 implements I2 { - + Class information does not include line numbers. @@ -8446,10 +8510,10 @@ class C2 extends C1 implements I2 { For the method indicated by method, return the beginning and ending addresses through start_location_ptr and end_location_ptr. In a - conventional byte code indexing scheme, + conventional byte code indexing scheme, start_location_ptr will always point to zero - and end_location_ptr - will always point to the byte code count minus one. + and end_location_ptr + will always point to the byte code count minus one. jvmdi @@ -8470,9 +8534,9 @@ class C2 extends C1 implements I2 { - On return, points to the first location, or + On return, points to the first location, or -1 if location information is not available. - If the information is available and + If the information is available and returns then this will always be zero. @@ -8487,7 +8551,7 @@ class C2 extends C1 implements I2 { - + Class information does not include method sizes. @@ -8507,7 +8571,7 @@ class C2 extends C1 implements I2 { The length of the valid section for this local variable. - The last code array index where the local variable is valid + The last code array index where the local variable is valid is start_location + length. @@ -8532,7 +8596,7 @@ class C2 extends C1 implements I2 { The local variable's generic signature, encoded as a modified UTF-8 string. - The value of this field will be NULL for any local + The value of this field will be NULL for any local variable which does not have a generic type. @@ -8658,7 +8722,7 @@ class C2 extends C1 implements I2 { For the method indicated by method, return a value indicating whether the method is synthetic via is_synthetic_ptr. - Synthetic methods are generated by the compiler but not present in the + Synthetic methods are generated by the compiler but not present in the original source code. jvmdi @@ -8729,7 +8793,7 @@ class C2 extends C1 implements I2 { This function modifies the failure handling of native method resolution by allowing retry with a prefix applied to the name. - When used with the + When used with the ClassFileLoadHook event, it enables native methods to be instrumented. @@ -8741,7 +8805,7 @@ class C2 extends C1 implements I2 { native boolean foo(int x);

      - We could transform the class file (with the + We could transform the class file (with the ClassFileLoadHook event) so that this becomes: boolean foo(int x) { @@ -8759,28 +8823,28 @@ native boolean wrapped_foo(int x); better but would make these examples less readable.

      The wrapper will allow data to be collected on the native - method call, but now the problem becomes linking up the - wrapped method with the native implementation. - That is, the method wrapped_foo needs to be + method call, but now the problem becomes linking up the + wrapped method with the native implementation. + That is, the method wrapped_foo needs to be resolved to the native implementation of foo, which might be: Java_somePackage_someClass_foo(JNIEnv* env, jint x)

      This function allows the prefix to be specified and the - proper resolution to occur. + proper resolution to occur. Specifically, when the standard resolution fails, the resolution is retried taking the prefix into consideration. There are two ways that resolution occurs, explicit resolution with the JNI function RegisterNatives - and the normal automatic resolution. For - RegisterNatives, the VM will attempt this + and the normal automatic resolution. For + RegisterNatives, the VM will attempt this association: method(foo) -> nativeImplementation(foo)

      When this fails, the resolution will be retried with - the specified prefix prepended to the method name, + the specified prefix prepended to the method name, yielding the correct resolution: method(wrapped_foo) -> nativeImplementation(foo) @@ -8790,7 +8854,7 @@ method(wrapped_foo) -> nativeImplementation(foo) method(wrapped_foo) -> nativeImplementation(wrapped_foo)

      When this fails, the resolution will be retried with - the specified prefix deleted from the implementation name, + the specified prefix deleted from the implementation name, yielding the correct resolution: method(wrapped_foo) -> nativeImplementation(foo) @@ -8799,7 +8863,7 @@ method(wrapped_foo) -> nativeImplementation(foo) resolution fails, native methods can be wrapped selectively.

      Since each environment is independent and - can do its own transformation of the bytecodes, more + can do its own transformation of the bytecodes, more than one layer of wrappers may be applied. Thus each environment needs its own prefix. Since transformations are applied in order, the prefixes, if applied, will @@ -8807,21 +8871,21 @@ method(wrapped_foo) -> nativeImplementation(foo) The order of transformation application is described in the event. Thus if three environments applied - wrappers, foo might become + wrappers, foo might become $env3_$env2_$env1_foo. But if, say, the second environment did not apply a wrapper to - foo it would be just - $env3_$env1_foo. To be able to + foo it would be just + $env3_$env1_foo. To be able to efficiently determine the sequence of prefixes, an intermediate prefix is only applied if its non-native - wrapper exists. Thus, in the last example, even though + wrapper exists. Thus, in the last example, even though $env1_foo is not a native method, the - $env1_ prefix is applied since + $env1_ prefix is applied since $env1_foo exists.

      Since the prefixes are used at resolution time and since resolution may be arbitrarily delayed, a - native method prefix must remain set as long as there + native method prefix must remain set as long as there are corresponding prefixed native methods. new @@ -8854,7 +8918,7 @@ method(wrapped_foo) -> nativeImplementation(foo) For a meta-agent that performs multiple independent class file transformations (for example as a proxy for another layer of agents) this function allows each transformation - to have its own prefix. + to have its own prefix. The prefixes are applied in the order supplied and are processed in the same manor as described for the application of prefixes from multiple environments @@ -8865,13 +8929,13 @@ method(wrapped_foo) -> nativeImplementation(foo) disables prefixing in this environment.

      and this function - are the two ways to set the prefixes. - Calling SetNativeMethodPrefix with - a prefix is the same as calling this function with - of 1. - Calling SetNativeMethodPrefix with - NULL is the same as calling this function with - of 0. + are the two ways to set the prefixes. + Calling SetNativeMethodPrefix with + a prefix is the same as calling this function with + of 1. + Calling SetNativeMethodPrefix with + NULL is the same as calling this function with + of 0. new @@ -8950,16 +9014,16 @@ method(wrapped_foo) -> nativeImplementation(foo) - + Not monitor owner - + Raw Monitor Enter - Gain exclusive ownership of a raw monitor. + Gain exclusive ownership of a raw monitor. The same thread may enter a monitor more then once. The thread must exit @@ -9000,7 +9064,7 @@ method(wrapped_foo) -> nativeImplementation(foo) - + Not monitor owner @@ -9011,9 +9075,9 @@ method(wrapped_foo) -> nativeImplementation(foo) Wait for notification of the raw monitor.

      - Causes the current thread to wait until either another thread calls - or - + Causes the current thread to wait until either another thread calls + or + for the specified raw monitor, or the specified timeout has elapsed. @@ -9038,10 +9102,10 @@ method(wrapped_foo) -> nativeImplementation(foo) - + Not monitor owner - + Wait was interrupted, try again @@ -9087,7 +9151,7 @@ method(wrapped_foo) -> nativeImplementation(foo) - + Not monitor owner @@ -9097,7 +9161,7 @@ method(wrapped_foo) -> nativeImplementation(foo) Get Raw Monitor Use - The fields of the structure + The fields of the structure are filled in with information about usage of the raw monitor. new @@ -9114,7 +9178,7 @@ method(wrapped_foo) -> nativeImplementation(foo) jvmtiMonitorUsage - On return, filled with monitor information for the + On return, filled with monitor information for the specified raw monitor. @@ -9128,7 +9192,7 @@ method(wrapped_foo) -> nativeImplementation(foo) Return the list of raw monitors.

      - Note: details about each monitor can be examined with + Note: details about each monitor can be examined with . new @@ -9139,7 +9203,7 @@ method(wrapped_foo) -> nativeImplementation(foo) - On return, pointer to the number + On return, pointer to the number of monitors returned in monitors_ptr. @@ -9159,13 +9223,13 @@ method(wrapped_foo) -> nativeImplementation(foo) - Provides the ability to intercept and resend + Provides the ability to intercept and resend Java Native Interface (JNI) function calls by manipulating the JNI function table. - See JNI + See JNI Functions in the Java Native Interface Specification.

      - The following example illustrates intercepting the + The following example illustrates intercepting the NewGlobalRef JNI call in order to count reference creation. @@ -9210,19 +9274,19 @@ myInit() { check that the example compiles and executes. - + Set JNI Function Table - Set the JNI function table + Set the JNI function table in all current and future JNI environments. As a result, all future JNI calls are directed to the specified functions. Use to get the function table to pass to this function. - For this function to take effect the the updated table entries must be + For this function to take effect the the updated table entries must be used by the JNI clients. Since the table is defined const some compilers may optimize - away the access to the table, thus preventing this function from taking + away the access to the table, thus preventing this function from taking effect. The table is copied--changes to the local copy of the table have no effect. @@ -9246,16 +9310,16 @@ myInit() { - + Get JNI Function Table Get the JNI function table. The JNI function table is copied into allocated memory. - If + If has been called, the modified (not the original) function table is returned. - Only the function table is copied, no other aspects of the environment + Only the function table is copied, no other aspects of the environment are copied. See the examples above. @@ -9268,7 +9332,7 @@ myInit() { jniNativeInterface - On return, *function_table + On return, *function_table points a newly allocated copy of the JNI function table. @@ -9290,13 +9354,13 @@ myInit() { table have no effect. This is an atomic action, all callbacks are set at once. No events are sent before this function is called. - When an entry is NULL or when the event is beyond + When an entry is NULL or when the event is beyond no event is sent. - Details on events are + Details on events are described later in this document. An event must be enabled and have a callback in order to be - sent--the order in which this function and - + sent--the order in which this function and + are called does not affect the result. new @@ -9327,28 +9391,28 @@ myInit() { Set Event Notification Mode - Control the generation of events. + Control the generation of events. - If is JVMTI_ENABLE, + If is JVMTI_ENABLE, the event will be enabled - If is JVMTI_DISABLE, + If is JVMTI_DISABLE, the event will be disabled If thread is NULL, - the event is enabled or disabled globally; otherwise, it is - enabled or disabled for a particular thread. - An event is generated for + the event is enabled or disabled globally; otherwise, it is + enabled or disabled for a particular thread. + An event is generated for a particular thread if it is enabled either at the thread or global - levels. + levels.

      See below for information on specific events.

      The following events cannot be controlled at the thread - level through this function. + level through this function.

      • @@ -9360,13 +9424,13 @@ myInit() {

      - Initially, no events are enabled at either the thread level + Initially, no events are enabled at either the thread level or the global level.

      Any needed capabilities (see Event Enabling Capabilities below) must be possessed before calling this function.

      - Details on events are + Details on events are described below. jvmdiClone @@ -9408,10 +9472,10 @@ myInit() { is non-NULL and is not live (has not been started or is now dead). - thread level control was attempted on events which do not + thread level control was attempted on events which do not permit thread level control. - + The Required Event Enabling Capability is not possessed. @@ -9420,14 +9484,14 @@ myInit() { Generate Events - Generate events to represent the current state of the VM. - For example, if is + Generate events to represent the current state of the VM. + For example, if is JVMTI_EVENT_COMPILED_METHOD_LOAD, a event will be sent for each currently compiled method. Methods that were loaded and now have been unloaded are not sent. - The history of what events have previously been sent does not - effect what events are sent by this function--for example, + The history of what events have previously been sent does not + effect what events are sent by this function--for example, all currently compiled methods will be sent each time this function is called.

      @@ -9438,14 +9502,14 @@ myInit() { Attempts to execute Java programming language code or JNI functions may be paused until this function returns - so neither should be called from the thread sending the event. - This function returns only after the missed events have been + This function returns only after the missed events have been sent, processed and have returned. The event may be sent on a different thread than the thread on which the event occurred. - The callback for the event must be set with - + The callback for the event must be set with + and the event must be enabled with - + or the events will not occur. If the VM no longer has the information to generate some or all of the requested events, the events are simply not sent - @@ -9474,13 +9538,13 @@ myInit() { - - is + + is JVMTI_EVENT_COMPILED_METHOD_LOAD and is false. - + is other than JVMTI_EVENT_COMPILED_METHOD_LOAD or JVMTI_EVENT_DYNAMIC_CODE_GENERATED. @@ -9502,63 +9566,63 @@ myInit() { - Java programming language primitive type - byte. + Java programming language primitive type - byte. JNI type jbyte. - Java programming language primitive type - char. + Java programming language primitive type - char. JNI type jchar. - Java programming language primitive type - short. + Java programming language primitive type - short. JNI type jshort. - Java programming language primitive type - int. + Java programming language primitive type - int. JNI type . - Java programming language primitive type - long. + Java programming language primitive type - long. JNI type . - Java programming language primitive type - float. + Java programming language primitive type - float. JNI type . - Java programming language primitive type - double. + Java programming language primitive type - double. JNI type . - Java programming language primitive type - boolean. + Java programming language primitive type - boolean. JNI type . - Java programming language object type - java.lang.Object. + Java programming language object type - java.lang.Object. JNI type . Returned values are JNI local references and must be managed. - Java programming language object type - java.lang.Thread. + Java programming language object type - java.lang.Thread. type . Returned values are JNI local references and must be managed. - Java programming language object type - java.lang.Class. + Java programming language object type - java.lang.Class. JNI type . Returned values are JNI local references and must be managed. - Union of all Java programming language primitive and object types - + Union of all Java programming language primitive and object types - JNI type . Returned values which represent object types are JNI local references and must be managed. - Java programming language field identifier - + Java programming language field identifier - JNI type . - Java programming language method identifier - + Java programming language method identifier - JNI type . @@ -9693,7 +9757,7 @@ myInit() { jvmtiParamInfo - Array of + Array of parameters (jvmtiEnv *jvmti_env excluded) @@ -9776,7 +9840,7 @@ myInit() { jvmtiParamInfo - Array of + Array of parameters (jvmtiEnv *jvmti_env excluded) @@ -9812,7 +9876,7 @@ myInit() { Extension Event This is the implementation-specific event. - The event handler is set with + The event handler is set with .

      Event handlers for extension events must be declared varargs to match this definition. @@ -9863,9 +9927,9 @@ myInit() { Identifies which callback to set. - This index is the + This index is the - field of + field of . @@ -9875,18 +9939,18 @@ myInit() { disable the event - If callback is non-NULL, + If callback is non-NULL, set callback to be the event callback function and enable the event. - + is not an - - returned by + returned by @@ -9898,30 +9962,30 @@ myInit() { The capabilities functions allow you to change the - functionality available to --that is, - which + functionality available to --that is, + which functions can be called, what events can be generated, and what functionality these events and functions can provide.

      - The "Capabilities" section of each function and event describe which + The "Capabilities" section of each function and event describe which capabilities, if any, they are associated with. "Required Functionality" means it is available for use and no capabilities must be added to use it. "Optional Functionality" means the agent must possess the capability - before it can be used. + before it can be used. To possess a capability, the agent must add the capability. "Optional Features" describe capabilities which, if added, extend the feature set.

      - The potentially available capabilities of each implementation are different. + The potentially available capabilities of each implementation are different. Depending on the implementation, a capability:

      • may never be added
      • may be added in either the OnLoad or live phase in any environment
      • may be added only during the OnLoad phase
      • may be possessed by only one environment at a time
      • -
      • may be possessed by only one environment at a time, +
      • may be possessed by only one environment at a time, and only during the OnLoad phase
      • and so on ...
      @@ -9929,24 +9993,24 @@ myInit() { time, and/or memory footprint. Note that the overhead of using a capability is completely different than the overhead of possessing a capability. Take single stepping as an example. When single stepping is on (that - is, when the event is enabled and thus actively sending events) - the overhead of sending and processing an event - on each instruction is huge in any implementation. - However, the overhead of possessing the capability may be small or large, + is, when the event is enabled and thus actively sending events) + the overhead of sending and processing an event + on each instruction is huge in any implementation. + However, the overhead of possessing the capability may be small or large, depending on the implementation. Also, when and if a capability is potentially available depends on the implementation. Some examples:
        -
      • One VM might perform all execution by compiling bytecodes into +
      • One VM might perform all execution by compiling bytecodes into native code and be unable to generate single step instructions. In this implementation the capability can not be added.
      • Another VM may be able to switch execution to a single stepping - interpreter at any time. In this implementation, having the capability has no + interpreter at any time. In this implementation, having the capability has no overhead and could be added at any time.
      • Yet another VM might be able to choose a bytecode compiling or single stepping capable interpreted execution engine at start up, but be unable to switch between them. - In this implementation the capability would need to be added + In this implementation the capability would need to be added during the OnLoad phase (before bytecode - execution begins) and would have a large impact on execution speed + execution begins) and would have a large impact on execution speed even if single stepping was never used.
      • Still another VM might be able to add an "is single stepping on" check into compiled bytecodes or a generated interpreter. Again in this implementation @@ -9955,30 +10019,30 @@ myInit() {

      Each environment - has its own set of capabilities. + has its own set of capabilities. Initially, that set is empty. Any desired capability must be added. - If possible, capabilities should be added during the OnLoad phase. For most - virtual machines certain capabilities require special set up for + If possible, capabilities should be added during the OnLoad phase. For most + virtual machines certain capabilities require special set up for the virtual machine and this set up must happen - during the OnLoad phase, before the virtual machine begins execution. + during the OnLoad phase, before the virtual machine begins execution. Once a capability is added, it can only be removed if explicitly relinquished by the environment.

      - The agent can, + The agent can, determine what capabilities this VM can potentially provide, add the capabilities to be used, release capabilities which are no longer needed, and - examine the currently available + examine the currently available capabilities. For example, a freshly started agent (in the OnLoad function) - wants to enable all possible capabilities. + wants to enable all possible capabilities. Note that, in general, this is not advisable as the agent may suffer a performance penalty for functionality it is not using. The code might look like this in C: @@ -9991,9 +10055,9 @@ myInit() { err = (*jvmti)->AddCapabilities(jvmti, &capa); For example, if an agent wants to check if it can get - the bytecodes of a method (that is, it wants to check - if it previously added this capability and has not - relinquished it), the code might + the bytecodes of a method (that is, it wants to check + if it previously added this capability and has not + relinquished it), the code might look like this in C: jvmtiCapabilities capa; @@ -10001,13 +10065,13 @@ myInit() { err = (*jvmti)->GetCapabilities(jvmti, &capa); if (err == JVMTI_ERROR_NONE) { - if (capa.can_get_bytecodes) { ... } } + if (capa.can_get_bytecodes) { ... } } - The functions in this category use this capabilities structure + The functions in this category use this capabilities structure which contains boolean flags corresponding to each capability: @@ -10035,14 +10099,14 @@ myInit() { - Can test if a field or method is synthetic - + Can test if a field or method is synthetic - and - Can get information about ownership of monitors - + Can get information about ownership of monitors - @@ -10103,19 +10167,19 @@ myInit() { - Can get exception thrown and + Can get exception thrown and exception catch events - Can set and thus get + Can set and thus get events - Can set and thus get + Can set and thus get events @@ -10142,65 +10206,65 @@ myInit() { thread CPU time - Can generate method entry events on entering a method - Can generate method exit events on leaving a method - Can generate ClassFileLoadHook events for every loaded class. - Can generate events when a method is compiled or unloaded - Can generate events on monitor activity - Can generate events on VM allocation of an object - Can generate events when a native method is bound to its implementation - Can generate events when garbage collection begins or ends - Can generate events when the garbage collector frees an object @@ -10234,16 +10298,16 @@ myInit() { Can retransform classes with . - In addition to the restrictions imposed by the specific + In addition to the restrictions imposed by the specific implementation on this capability (see the Capability section), - this capability must be set before the + this capability must be set before the event is enabled for the first time in this environment. - An environment that possesses this capability at the time that + An environment that possesses this capability at the time that ClassFileLoadHook is enabled for the first time is said to be retransformation capable. - An environment that does not possess this capability at the time that + An environment that does not possess this capability at the time that ClassFileLoadHook is enabled for the first time is said to be retransformation incapable. @@ -10258,7 +10322,7 @@ myInit() { - Can generate events when the VM is unable to allocate memory from + Can generate events when the VM is unable to allocate memory from the Java platform heap. See . @@ -10291,11 +10355,11 @@ myInit() { Get Potential Capabilities - Returns via the + Returns via the features that can potentially be possessed by this environment at this time. The returned capabilities differ from the complete set of capabilities - implemented by the VM in two cases: another environment possesses + implemented by the VM in two cases: another environment possesses capabilities that can only be possessed by one environment, or the current phase is live, and certain capabilities can only be added during the OnLoad phase. @@ -10338,7 +10402,7 @@ myInit() { conditional implementations would be used or are even a good idea. The thought is that release documentation for the implementation would be the best means of exposing this information. - Unless new arguments are presented, I intend to remove this + Unless new arguments are presented, I intend to remove this function in the next revision.

      @@ -10348,15 +10412,15 @@ myInit() { . The returned estimates are in percentage of additional overhead, thus a time impact of 100 mean the application might run - at half the speed. + at half the speed. The estimates are very rough approximations and are not guaranteed. Note also, that the estimates are of the impact of having the capability available--when and if it is used the impact may be much greater. - Estimates can be for a single capability or for a set of + Estimates can be for a single capability or for a set of capabilities. Note that the costs are not necessarily additive, - adding support for one capability might make another available - for free or conversely having two capabilities at once may + adding support for one capability might make another available + for free or conversely having two capabilities at once may have multiplicative impact. Estimates are relative to the current set of capabilities - that is, how much more impact given the currently possessed capabilities. @@ -10396,7 +10460,7 @@ myInit() { - + The desired capabilities are not even potentially available. @@ -10406,7 +10470,7 @@ myInit() { Add Capabilities - Set new capabilities by adding the capabilities + Set new capabilities by adding the capabilities whose values are set to one (1) in *. All previous capabilities are retained. @@ -10429,7 +10493,7 @@ myInit() { - + The desired capabilities are not even potentially available. @@ -10483,7 +10547,7 @@ myInit() { Get Capabilities - Returns via the optional + Returns via the optional features which this environment currently possesses. Each possessed capability is indicated by a one (1) in the corresponding field of the capabilities @@ -10514,16 +10578,16 @@ myInit() { - - + + These functions provide timing information. - The resolution at which the time is updated is not specified. - They provides nanosecond precision, but not necessarily nanosecond accuracy. + The resolution at which the time is updated is not specified. + They provides nanosecond precision, but not necessarily nanosecond accuracy. Details about the timers, such as their maximum values, can be accessed with - the timer information functions. + the timer information functions. @@ -10557,7 +10621,7 @@ myInit() { jvmtiTimerKind The kind of timer. - On a platform that does not distinguish between user and system time, JVMTI_TIMER_TOTAL_CPU is returned. @@ -10595,12 +10659,12 @@ myInit() { Get Current Thread CPU Timer Information - Get information about the - timer. - The fields of the structure + Get information about the + timer. + The fields of the structure are filled in with details about the timer. This information is specific to the platform and the implementation of - and thus + and thus does not vary by thread nor does it vary during a particular invocation of the VM.

      @@ -10632,15 +10696,15 @@ myInit() { Get Current Thread CPU Time - Return the CPU time utilized by the current thread. + Return the CPU time utilized by the current thread.

      Note that the function provides CPU time for any thread, including - the current thread. GetCurrentThreadCpuTime + the current thread. GetCurrentThreadCpuTime exists to support platforms which cannot - supply CPU time for threads other than the current + supply CPU time for threads other than the current thread or which have more accurate information for - the current thread (see + the current thread (see vs ). On many platforms this call will be equivalent to: @@ -10653,13 +10717,13 @@ myInit() { Can get current thread CPU time.

      - If this capability is enabled after threads have started, + If this capability is enabled after threads have started, the implementation may choose any time up - to and including the time that the capability is enabled + to and including the time that the capability is enabled as the point where CPU time collection starts.

      - This capability must be potentially available on any - platform where + This capability must be potentially available on any + platform where can_get_thread_cpu_time is potentially available. @@ -10669,7 +10733,7 @@ myInit() { On return, points to the CPU time used by this thread - in nanoseconds. + in nanoseconds. This is an unsigned value. If tested or printed as a jlong (signed value) it may appear to be a negative number. @@ -10682,12 +10746,12 @@ myInit() { Get Thread CPU Timer Information - Get information about the - timer. - The fields of the structure + Get information about the + timer. + The fields of the structure are filled in with details about the timer. This information is specific to the platform and the implementation of - and thus + and thus does not vary by thread nor does it vary during a particular invocation of the VM.

      @@ -10719,19 +10783,19 @@ myInit() { Get Thread CPU Time - Return the CPU time utilized by the specified thread. + Return the CPU time utilized by the specified thread.

      Get information about this timer with - . + . new Can get thread CPU time.

      - If this capability is enabled after threads have started, + If this capability is enabled after threads have started, the implementation may choose any time up - to and including the time that the capability is enabled + to and including the time that the capability is enabled as the point where CPU time collection starts. @@ -10746,7 +10810,7 @@ myInit() { On return, points to the CPU time used by the specified thread - in nanoseconds. + in nanoseconds. This is an unsigned value. If tested or printed as a jlong (signed value) it may appear to be a negative number. @@ -10759,9 +10823,9 @@ myInit() { Get Timer Information - Get information about the - timer. - The fields of the structure + Get information about the + timer. + The fields of the structure are filled in with details about the timer. This information will not change during a particular invocation of the VM. @@ -10784,7 +10848,7 @@ myInit() { Get Time - Return the current value of the system timer, in nanoseconds. + Return the current value of the system timer, in nanoseconds.

      The value returned represents nanoseconds since some fixed but arbitrary time (perhaps in the future, so values may be @@ -10793,7 +10857,7 @@ myInit() { how frequently values change.

      Get information about this timer with - . + . new @@ -10802,7 +10866,7 @@ myInit() { - On return, points to the time in nanoseconds. + On return, points to the time in nanoseconds. This is an unsigned value. If tested or printed as a jlong (signed value) it may appear to be a negative number. @@ -10817,7 +10881,7 @@ myInit() { Returns the number of processors available to the Java virtual machine.

      - This value may change during a particular invocation of the virtual machine. + This value may change during a particular invocation of the virtual machine. Applications that are sensitive to the number of available processors should therefore occasionally poll this property. @@ -10829,7 +10893,7 @@ myInit() { On return, points to the maximum number of processors available to the - virtual machine; never smaller than one. + virtual machine; never smaller than one. @@ -10850,18 +10914,18 @@ myInit() { Add To Bootstrap Class Loader Search - This function can be used to cause instrumentation classes to be defined by the + This function can be used to cause instrumentation classes to be defined by the bootstrap class loader. See . After the bootstrap - class loader unsuccessfully searches for a class, the specified platform-dependent - search path will be searched as well. Only one segment may be specified in - the . This function may be called multiple times to add multiple segments, + class loader unsuccessfully searches for a class, the specified platform-dependent + search path will be searched as well. Only one segment may be specified in + the . This function may be called multiple times to add multiple segments, the segments will be searched in the order that this function was called.

      - In the OnLoad phase the function may be used to specify any platform-dependent + In the OnLoad phase the function may be used to specify any platform-dependent search path segment to be searched after the bootstrap class loader unsuccessfully searches for a class. The segment is typically a directory or JAR file. -

      +

      In the live phase the may be used to specify any platform-dependent path to a JAR file. The agent should take care that the JAR file does not @@ -10889,7 +10953,7 @@ myInit() { - + is an invalid path. In the live phase, anything other than an existing JAR file is an invalid path. @@ -10901,15 +10965,15 @@ myInit() { This function can be used to cause instrumentation classes to be defined by the system class loader. See . - After the class loader unsuccessfully searches for a class, the specified platform-dependent search - path will be searched as well. Only one segment may be specified in the - . This function may be called multiple times to add multiple segments, the + After the class loader unsuccessfully searches for a class, the specified platform-dependent search + path will be searched as well. Only one segment may be specified in the + . This function may be called multiple times to add multiple segments, the segments will be searched in the order that this function was called.

      - In the OnLoad phase the function may be used to specify any platform-dependent + In the OnLoad phase the function may be used to specify any platform-dependent search path segment to be searched after the system class loader unsuccessfully searches for a class. The segment is typically a directory or JAR file. -

      +

      In the live phase the is a platform-dependent path to a JAR file to be searched after the system class loader unsuccessfully searches for a class. The agent should @@ -10917,9 +10981,9 @@ myInit() { defined by the system class loader for the purposes of instrumentation.

      In the live phase the system class loader supports adding a JAR file to be searched if - the system class loader implements a method name appendToClassPathForInstrumentation - which takes a single parameter of type java.lang.String. The method is not required - to have public access. + the system class loader implements a method name appendToClassPathForInstrumentation + which takes a single parameter of type java.lang.String. The method is not required + to have public access.

      specifies that a subsequent attempt to resolve a symbolic reference that the Java virtual machine has previously unsuccessfully attempted @@ -10948,7 +11012,7 @@ myInit() { Operation not supported by the system class loader. - + @@ -10964,7 +11028,7 @@ myInit() { Get System Properties - The list of VM system property keys which may be used with + The list of VM system property keys which may be used with is returned. It is strongly recommended that virtual machines provide the following property keys: @@ -10979,15 +11043,15 @@ myInit() { Provides access to system properties defined by and used by the VM. Properties set on the command-line are included. - This allows getting and setting of these properties + This allows getting and setting of these properties before the VM even begins executing bytecodes. - Since this is a VM view of system properties, the set of available + Since this is a VM view of system properties, the set of available properties will usually be different than that in java.lang.System.getProperties. - JNI method invocation may be used to access + JNI method invocation may be used to access java.lang.System.getProperties.

      - The set of properties may grow during execution. + The set of properties may grow during execution. new @@ -11002,7 +11066,7 @@ myInit() { - On return, points to an array of property keys, encoded as + On return, points to an array of property keys, encoded as modified UTF-8 strings. @@ -11014,25 +11078,25 @@ myInit() { Get System Property - Return a VM system property value given the property key. + Return a VM system property value given the property key.

      The function returns the set of property keys which may be used. The properties which can be retrieved may grow during execution.

      - Since this is a VM view of system properties, the values - of properties may differ from that returned by + Since this is a VM view of system properties, the values + of properties may differ from that returned by java.lang.System.getProperty(String). - A typical VM might copy the values of the VM system + A typical VM might copy the values of the VM system properties into the Properties held by java.lang.System during the initialization of that class. Thereafter any changes to the VM system - properties (with ) + properties (with ) or the java.lang.System system properties (with java.lang.System.setProperty(String,String)) would cause the values to diverge. - JNI method invocation may be used to access + JNI method invocation may be used to access java.lang.System.getProperty(String). new @@ -11055,7 +11119,7 @@ myInit() { - + This property is not available. Use to find available properties. @@ -11065,7 +11129,7 @@ myInit() { Set System Property - Set a VM system property value. + Set a VM system property value.

      The function returns the set of property keys, some of these may be settable. @@ -11097,7 +11161,7 @@ myInit() { - + This property is not available or is not writeable. @@ -11113,7 +11177,7 @@ myInit() { Get Phase - Return the current phase of VM execution. + Return the current phase of VM execution. The phases proceed in sequence: @@ -11129,7 +11193,7 @@ myInit() { VMStart event. - Start phase: when the VMStart event + Start phase: when the VMStart event is sent and until the VMInit event is sent. @@ -11158,8 +11222,8 @@ myInit() {

      Most events are sent only in the live phase. The following events operate in others phases: - - + + new @@ -11181,7 +11245,7 @@ myInit() { Shutdown a connection created with JNI GetEnv (see Environments). - Dispose of any resources held by the environment. + Dispose of any resources held by the environment. What resources are reclaimed? What is undone? Breakpoints,watchpoints removed? @@ -11191,7 +11255,7 @@ myInit() { Memory allocated by this environment via calls to functions is not released, this can be done explicitly by the agent by calling . - Raw monitors created by this environment are not destroyed, + Raw monitors created by this environment are not destroyed, this can be done explicitly by the agent by calling . The state of threads waiting on raw monitors created by this environment @@ -11230,7 +11294,7 @@ myInit() { This value is NULL unless set with this function. Agents can allocate memory in which they store environment specific information. By setting environment-local storage it can then be - accessed with + accessed with .

      Called by the agent to set the value of the @@ -11243,10 +11307,10 @@ myInit() { - - - value is set to NULL - + + + value is set to NULL + The value to be entered into the environment-local storage. @@ -11260,7 +11324,7 @@ myInit() { Get Environment Local Storage Called by the agent to get the value of the environment-local - storage. + storage. new @@ -11269,10 +11333,10 @@ myInit() { - Pointer through which the value of the environment local + Pointer through which the value of the environment local storage is returned. If environment-local storage has not been set with - returned + returned pointer is NULL. @@ -11285,7 +11349,7 @@ myInit() { Get Version Number Return the version via version_ptr. - The return value is the version identifier. + The return value is the version identifier. The version identifier includes major, minor and micro version as well as the interface type. @@ -11298,10 +11362,10 @@ myInit() { - Mask to extract interface type. + Mask to extract interface type. The value of the version returned by this function masked with JVMTI_VERSION_MASK_INTERFACE_TYPE is always - JVMTI_VERSION_INTERFACE_JVMTI + JVMTI_VERSION_INTERFACE_JVMTI since this is a function. @@ -11345,11 +11409,11 @@ myInit() { Get Error Name - Return the symbolic name for an - error code. + Return the symbolic name for an + error code.

      - For example - GetErrorName(env, JVMTI_ERROR_NONE, &err_name) + For example + GetErrorName(env, JVMTI_ERROR_NONE, &err_name) would return in err_name the string "JVMTI_ERROR_NONE". @@ -11395,7 +11459,7 @@ myInit() { Control verbose output. - This is the output which typically is sent to stderr. + This is the output which typically is sent to stderr. new @@ -11424,18 +11488,18 @@ myInit() { Although the greatest functionality is achieved with location information referencing the virtual machine bytecode index, the definition of - jlocation has intentionally been left unconstrained to allow VM + jlocation has intentionally been left unconstrained to allow VM implementations that do not have this information.

      This function describes the representation of jlocation used in this VM. - If the returned format is , + If the returned format is , jlocations can be used as in indices into the array returned by - . + . - jlocation values represent virtual machine - bytecode indices--that is, offsets into the + jlocation values represent virtual machine + bytecode indices--that is, offsets into the virtual machine code for a method. @@ -11470,16 +11534,16 @@ myInit() { Every function returns a jvmtiError error code.

      - It is the responsibility of the agent to call functions with + It is the responsibility of the agent to call functions with valid parameters and in the proper context (calling thread is attached, - phase is correct, etc.). - Detecting some error conditions may be difficult, inefficient, or + phase is correct, etc.). + Detecting some error conditions may be difficult, inefficient, or impossible for an implementation. - The errors listed in + The errors listed in Function Specific Required Errors must be detected by the implementation. All other errors represent the recommended response to the error - condition. + condition. @@ -11495,7 +11559,7 @@ myInit() { Pointer is unexpectedly NULL. - The function attempted to allocate memory and no more memory was + The function attempted to allocate memory and no more memory was available for allocation. @@ -11563,6 +11627,9 @@ myInit() { The class cannot be modified. + + The module cannot be modified. + The functionality is not available in this virtual machine. @@ -11584,7 +11651,7 @@ myInit() { The following errors are returned by some functions. They are returned in the event of invalid parameters passed by the - agent or usage in an invalid context. + agent or usage in an invalid context. An implementation is not required to detect these errors. @@ -11659,7 +11726,7 @@ myInit() { declared in the old class version. - The class name defined in the new class file is + The class name defined in the new class file is different from the name in the old class object. @@ -11678,33 +11745,33 @@ myInit() { programs.

      To handle events, designate a set of callback functions with - . - For each event the corresponding callback function will be + . + For each event the corresponding callback function will be called. Arguments to the callback function provide additional - information about the event. + information about the event.

      - The callback function is usually called from within an application - thread. The implementation does not + The callback function is usually called from within an application + thread. The implementation does not queue events in any way. This means - that event callback functions must be written - carefully. Here are some general guidelines. See + that event callback functions must be written + carefully. Here are some general guidelines. See the individual event descriptions for further suggestions.

        -
      • Any exception thrown during the execution of an event callback can +
      • Any exception thrown during the execution of an event callback can overwrite any current pending exception in the current application thread. Care must be taken to preserve a pending exception when an event callback makes a JNI call that might generate an exception.
      • Event callback functions must be re-entrant. The implementation does - not queue events. If an agent needs to process events one at a time, it - can use a raw monitor inside the + not queue events. If an agent needs to process events one at a time, it + can use a raw monitor inside the event callback functions to serialize event processing.
      • Event callback functions that execute JNI's FindClass function to load - classes need to note that FindClass locates the class loader associated + classes need to note that FindClass locates the class loader associated with the current native method. For the purposes of class loading, an event callback that includes a JNI environment as a parameter to the callback will treated as if it is a native call, where the native method @@ -11712,8 +11779,8 @@ myInit() {

      - Some events identify objects with JNI references. - All references + Some events identify objects with JNI references. + All references in events are JNI local references and will become invalid after the event callback returns. Unless stated otherwise, memory referenced by pointers sent in event @@ -11724,13 +11791,13 @@ myInit() { Events are sent at the time they occur. The specification for each event includes the set of phases in which it can be sent; - if an event triggering activity occurs during another phase, no event - is sent. + if an event triggering activity occurs during another phase, no event + is sent.

      A thread that generates an event does not change its execution status (for example, the event does not cause the thread to be suspended). If an agent wishes the event to result in suspension, then the agent - is responsible for explicitly suspending the thread with + is responsible for explicitly suspending the thread with .

      If an event is enabled in multiple environments, the event will be sent @@ -11743,26 +11810,26 @@ myInit() {

      • If the event requires a capability, that capability must - be added with + be added with .
      • - A callback for the event must be set with + A callback for the event must be set with .
      • The event must be enabled with - . + .
      - In many situations it is possible for multiple events to occur - at the same location in one thread. When this happens, all the events + In many situations it is possible for multiple events to occur + at the same location in one thread. When this happens, all the events are reported through the event callbacks in the order specified in this section.

      - If the current location is at the entry point of a method, the + If the current location is at the entry point of a method, the event is reported before any other event at the current location in the same thread.

      @@ -11772,39 +11839,39 @@ myInit() { exceptionCatch event is reported before any other event at the current location in the same thread.

      - If a singleStep event or - breakpoint event is triggered at the - current location, the event is defined to occur - immediately before the code at the current location is executed. - These events are reported before any events which are triggered - by the execution of code at the current location in the same - thread (specifically: + If a singleStep event or + breakpoint event is triggered at the + current location, the event is defined to occur + immediately before the code at the current location is executed. + These events are reported before any events which are triggered + by the execution of code at the current location in the same + thread (specifically: exception, fieldAccess, and fieldModification). - If both a step and breakpoint event are triggered for the same thread and + If both a step and breakpoint event are triggered for the same thread and location, the step event is reported before the breakpoint event.

      If the current location is the exit point of a method (that is, the last - location before returning to the caller), the - event and + location before returning to the caller), the + event and the event (if requested) are reported after all other events at the current location in the same - thread. There is no specified ordering of these two events + thread. There is no specified ordering of these two events with respect to each other.

      Co-located events can be triggered during the processing of some other event by the agent at the same location in the same thread. - If such an event, of type y, is triggered during the processing of - an event of type x, and if x - precedes y in the ordering specified above, the co-located event + If such an event, of type y, is triggered during the processing of + an event of type x, and if x + precedes y in the ordering specified above, the co-located event y is reported for the current thread and location. If x does not precede y, y is not reported for the current thread and location. - For example, if a breakpoint is set at the current location + For example, if a breakpoint is set at the current location during the processing of , - that breakpoint will be reported before the thread moves off the current + that breakpoint will be reported before the thread moves off the current location. -

      The following events are never considered to be co-located with +

      The following events are never considered to be co-located with other events.

      • @@ -11820,7 +11887,7 @@ myInit() { The event callback structure below is used to specify the handler function for events. It is set with the - function. + function. Single step events allow the agent to trace thread execution at the finest granularity allowed by the VM. A single step event is - generated whenever a thread reaches a new location. - Typically, single step events represent the completion of one VM - instruction as defined in . However, some implementations - may define locations differently. In any case the + generated whenever a thread reaches a new location. + Typically, single step events represent the completion of one VM + instruction as defined in . However, some implementations + may define locations differently. In any case the method and location parameters uniquely identify the current location and allow - the mapping to source file and line number when that information is + the mapping to source file and line number when that information is available.

        No single step events are generated from within native methods. @@ -11843,7 +11910,7 @@ myInit() { - + JNIEnv @@ -11886,14 +11953,14 @@ myInit() { designated as a breakpoint with . The method and location parameters uniquely identify the current location and allow - the mapping to source file and line number when that information is + the mapping to source file and line number when that information is available. jvmdi - + JNIEnv @@ -11933,18 +12000,18 @@ myInit() { id="FieldAccess" const="JVMTI_EVENT_FIELD_ACCESS" filtered="thread" num="63"> Field access events are generated whenever a thread accesses - a field that was designated as a watchpoint + a field that was designated as a watchpoint with . - The method and location + The method and location parameters uniquely identify the current location and allow - the mapping to source file and line number when that information is - available. + the mapping to source file and line number when that information is + available. jvmdi - + JNIEnv @@ -12003,18 +12070,18 @@ myInit() { id="FieldModification" const="JVMTI_EVENT_FIELD_MODIFICATION" filtered="thread" num="64"> Field modification events are generated whenever a thread modifies - a field that was designated as a watchpoint + a field that was designated as a watchpoint with . - The method and location + The method and location parameters uniquely identify the current location and allow - the mapping to source file and line number when that information is - available. + the mapping to source file and line number when that information is + available. jvmdi - + JNIEnv @@ -12084,25 +12151,25 @@ myInit() { - Frame pop events are generated upon exit from a single method + Frame pop events are generated upon exit from a single method in a single frame as specified in a call to . This is true whether termination is caused by executing its return instruction - or by throwing an exception to its caller + or by throwing an exception to its caller (see ). - However, frame pops caused by the + However, frame pops caused by the function are not reported.

        The location reported by - identifies the executable location in the returning method, - immediately prior to the return. + identifies the executable location in the returning method, + immediately prior to the return. jvmdi - + JNIEnv @@ -12142,24 +12209,24 @@ myInit() { - Method entry events are generated upon entry of Java + Method entry events are generated upon entry of Java programming language methods (including native methods).

        The location reported by identifies the initial executable location in - the method. + the method.

        Enabling method entry or exit events will significantly degrade performance on many platforms and is thus not advised for performance critical usage (such as profiling). - Bytecode instrumentation should be + Bytecode instrumentation should be used in these cases. jvmdi - + JNIEnv @@ -12192,25 +12259,25 @@ myInit() { - Method exit events are generated upon exit from Java + Method exit events are generated upon exit from Java programming language methods (including native methods). This is true whether termination is caused by executing its return instruction - or by throwing an exception to its caller + or by throwing an exception to its caller (see ).

        The method field uniquely identifies the - method being entered or exited. The frame field provides + method being entered or exited. The frame field provides access to the stack frame for the method.

        The location reported by - identifies the executable location in the returning method - immediately prior to the return. + identifies the executable location in the returning method + immediately prior to the return.

        Enabling method entry or exit events will significantly degrade performance on many platforms and is thus not advised for performance critical usage (such as profiling). - Bytecode instrumentation should be + Bytecode instrumentation should be used in these cases. jvmdi @@ -12255,7 +12322,7 @@ myInit() { The return value of the method being exited. - Undefined and should not be used if + Undefined and should not be used if is true. @@ -12266,18 +12333,18 @@ myInit() { - A Native Method Bind event is sent when a VM binds a + A Native Method Bind event is sent when a VM binds a Java programming language native method - to the address of a function that implements the native method. + to the address of a function that implements the native method. This will occur when the native method is called for the first time and also occurs when the JNI function RegisterNatives is called. This event allows the bind to be redirected to an agent-specified - proxy function. + proxy function. This event is not sent when the native method is unbound. - Typically, this proxy function will need to be specific to a + Typically, this proxy function will need to be specific to a particular method or, to handle the general case, automatically - generated assembly code, since after instrumentation code is - executed the function at the original binding + generated assembly code, since after instrumentation code is + executed the function at the original binding address will usually be invoked. The original binding can be restored or the redirection changed by use of the JNI function RegisterNatives. @@ -12296,7 +12363,7 @@ myInit() { The JNI environment of the event (current) thread - Will be NULL if sent during the primordial + Will be NULL if sent during the primordial phase. @@ -12340,7 +12407,7 @@ myInit() { id="Exception" const="JVMTI_EVENT_EXCEPTION" filtered="thread" num="58"> Exception events are generated whenever an exception is first detected - in a Java programming language method. + in a Java programming language method. Where "exception" means any java.lang.Throwable. The exception may have been thrown by a Java programming language or native method, but in the case of native methods, the event is not generated @@ -12349,20 +12416,20 @@ myInit() { no exception event is generated.

        The method and location - parameters uniquely identify the current location + parameters uniquely identify the current location (where the exception was detected) and allow - the mapping to source file and line number when that information is + the mapping to source file and line number when that information is available. The exception field identifies the thrown exception object. The catch_method and catch_location identify the location of the catch clause, if any, that handles the thrown exception. If there is no such catch clause, each field is set to 0. There is no guarantee that the thread will ever reach this catch clause. If there are native methods on the call stack - between the throw location and the catch clause, the exception may + between the throw location and the catch clause, the exception may be reset by one of those native methods. Similarly, exceptions that are reported as uncaught (catch_klass et al. set to 0) may in fact be caught by native code. - Agents can check for these occurrences by monitoring + Agents can check for these occurrences by monitoring events. Note that finally clauses are implemented as catch and re-throw. Therefore they will be reported in the catch location. @@ -12371,7 +12438,7 @@ myInit() { - + JNIEnv @@ -12438,18 +12505,18 @@ myInit() { Where "exception" means any java.lang.Throwable. If the exception is caught in a Java programming language method, the event is generated when the catch clause is reached. If the exception is caught in a native - method, the event is generated as soon as control is returned to a Java programming language + method, the event is generated as soon as control is returned to a Java programming language method. Exception catch events are generated for any exception for which a throw was detected in a Java programming language method. Note that finally clauses are implemented as catch and re-throw. Therefore they will generate exception catch events.

        The method and location - parameters uniquely identify the current location - and allow the mapping to source file and line number when that information is - available. For exceptions caught in a Java programming language method, the + parameters uniquely identify the current location + and allow the mapping to source file and line number when that information is + available. For exceptions caught in a Java programming language method, the exception object identifies the exception object. Exceptions - caught in native methods are not necessarily available by the time the + caught in native methods are not necessarily available by the time the exception catch is reported, so the exception field is set to NULL. @@ -12457,7 +12524,7 @@ myInit() { - + JNIEnv @@ -12503,11 +12570,11 @@ myInit() { id="ThreadStart" const="JVMTI_EVENT_THREAD_START" num="52" phase="start"> Thread start events are generated by a new thread before its initial - method executes. + method executes.

        A thread may be listed in the array returned by - before its thread start event is generated. + before its thread start event is generated. It is possible for other events to be generated on a thread before its thread start event.

        @@ -12516,7 +12583,7 @@ myInit() { jvmdi - + JNIEnv @@ -12535,14 +12602,14 @@ myInit() { + id="ThreadEnd" const="JVMTI_EVENT_THREAD_END" filtered="thread" num="53" phase="start"> Thread end events are generated by a terminating thread - after its initial method has finished execution. + after its initial method has finished execution.

        A thread may be listed in the array returned by - after its thread end event is generated. + after its thread end event is generated. No events are generated on a thread after its thread end event.

        @@ -12551,7 +12618,7 @@ myInit() { jvmdi - + JNIEnv @@ -12574,15 +12641,15 @@ myInit() { A class load event is generated when a class is first loaded. The order of class load events generated by a particular thread are guaranteed - to match the order of class loading within that thread. + to match the order of class loading within that thread. Array class creation does not generate a class load event. - The creation of a primitive class (for example, java.lang.Integer.TYPE) + The creation of a primitive class (for example, java.lang.Integer.TYPE) does not generate a class load event.

        This event is sent at an early stage in loading the class. As a result the class should be used carefully. Note, for example, that methods and fields are not yet loaded, so queries for methods, - fields, subclasses, and so on will not give correct results. + fields, subclasses, and so on will not give correct results. See "Loading of Classes and Interfaces" in the Java Language Specification. For most purposes the event will @@ -12591,7 +12658,7 @@ myInit() { jvmdi - + JNIEnv @@ -12620,7 +12687,7 @@ myInit() { id="ClassUnload" const="JVMTI_EVENT_CLASS_UNLOAD" num="57"> A class unload event is generated when the class is about to be unloaded. - Class unload events take place during garbage collection and must be + Class unload events take place during garbage collection and must be handled extremely carefully. The garbage collector holds many locks and has suspended all other threads, so the event handler cannot depend on the ability to acquire any locks. The class unload event handler should @@ -12637,7 +12704,7 @@ myInit() { jvmdi - + JNIEnv @@ -12666,16 +12733,16 @@ myInit() { id="ClassPrepare" const="JVMTI_EVENT_CLASS_PREPARE" filtered="thread" phase="start" num="56"> A class prepare event is generated when class preparation is complete. - At this point, class fields, methods, and implemented interfaces are - available, and no code from the class has been executed. Since array - classes never have fields or methods, class prepare events are not - generated for them. Class prepare events are not generated for - primitive classes (for example, java.lang.Integer.TYPE). + At this point, class fields, methods, and implemented interfaces are + available, and no code from the class has been executed. Since array + classes never have fields or methods, class prepare events are not + generated for them. Class prepare events are not generated for + primitive classes (for example, java.lang.Integer.TYPE). jvmdi - + JNIEnv @@ -12704,14 +12771,14 @@ myInit() { This event is sent when the VM obtains class file data, but before it constructs - the in-memory representation for that class. - This event is also sent when the class is being modified by the + the in-memory representation for that class. + This event is also sent when the class is being modified by the function or the function, called in any environment. The agent can instrument the existing class file data sent by the VM to include profiling/debugging hooks. - See the description of + See the description of bytecode instrumentation for usage information.

        @@ -12721,28 +12788,28 @@ myInit() { can_generate_all_class_hook_events are enabled then this event may be sent in the primordial phase. - Otherwise, this event may be sent before the VM is initialized (the start + Otherwise, this event may be sent before the VM is initialized (the start phase). Some classes might not be compatible with the function (eg. ROMized classes or implementation defined classes) and this event will not be generated for these classes.

        - The agent must allocate the space for the modified + The agent must allocate the space for the modified class file data buffer - using the memory allocation function + using the memory allocation function because the VM is responsible for freeing the new class file data buffer using .

        - If the agent wishes to modify the class file, it must set + If the agent wishes to modify the class file, it must set new_class_data to point to the newly instrumented class file data buffer and set - new_class_data_len to the length of that + new_class_data_len to the length of that buffer before returning from this call. If no modification is desired, the agent simply does not set new_class_data. If multiple agents have enabled this event the results are chained. That is, if - new_class_data has been set, it becomes the + new_class_data has been set, it becomes the class_data for the next agent.

        When handling a class load in the live phase, then the @@ -12760,13 +12827,13 @@ myInit() {

      • retransformation incapable - environments, in the + environments, in the order in which they were created
      • retransformation capable - environments, in the + environments, in the order in which they were created
      @@ -12802,7 +12869,7 @@ myInit() { - The class loader loading the class. + The class loader loading the class. NULL if the bootstrap class loader. @@ -12905,7 +12972,7 @@ myInit() { with other events, but the preceding events should be handled carefully, if at all, because the VM has not completed its initialization. The thread start event for the - main application thread is guaranteed not to occur until after the + main application thread is guaranteed not to occur until after the handler for the VM initialization event returns.

      In the case of VM start-up failure, this event will not be sent. @@ -12934,7 +13001,7 @@ myInit() { - The VM death event notifies the agent of the termination of the VM. + The VM death event notifies the agent of the termination of the VM. No events will occur after the VMDeath event.

      In the case of VM start-up failure, this event will not be sent. @@ -12965,7 +13032,7 @@ myInit() { followed by a new CompiledMethodLoad event. Note that a single method may have multiple compiled forms, and that this event will be sent for each form. - Note also that several methods may be inlined into a single + Note also that several methods may be inlined into a single address range, and that this event will be sent for each method.

      These events can be sent after their initial occurrence with @@ -12982,7 +13049,7 @@ myInit() { - Corresponding location. See + Corresponding location. See for the meaning of location. @@ -13028,7 +13095,7 @@ myInit() { jvmtiAddrLocationMap Map from native addresses to location. - The native address range of each entry is from + The native address range of each entry is from to start_address-1 of the next entry. NULL if mapping information cannot be supplied. @@ -13037,10 +13104,10 @@ myInit() { - VM-specific compilation information. + VM-specific compilation information. The referenced compile information is managed by the VM and must not depend on the agent for collection. - A VM implementation defines the content and lifetime + A VM implementation defines the content and lifetime of the information. @@ -13052,9 +13119,9 @@ myInit() { Sent when a compiled method is unloaded from memory. This event might not be sent on the thread which performed the unload. - This event may be sent sometime after the unload occurs, but + This event may be sent sometime after the unload occurs, but will be sent before the memory is reused - by a newly generated compiled method. This event may be sent after + by a newly generated compiled method. This event may be sent after the class is unloaded. jvmpi @@ -13072,7 +13139,7 @@ myInit() { Compiled method being unloaded. - For identification of the compiled method only -- the class + For identification of the compiled method only -- the class may be unloaded and therefore the method should not be used as an argument to further JNI or functions. @@ -13081,7 +13148,7 @@ myInit() { Address where compiled method code was loaded. - For identification of the compiled method only -- + For identification of the compiled method only -- the space may have been reclaimed. @@ -13169,7 +13236,7 @@ myInit() { - JNI local reference to the thread + JNI local reference to the thread attempting to enter the monitor @@ -13300,28 +13367,28 @@ myInit() { since="1.1"> Sent when a VM resource needed by a running application has been exhausted. - Except as required by the optional capabilities, the set of resources + Except as required by the optional capabilities, the set of resources which report exhaustion is implementation dependent.

      The following bit flags define the properties of the resource exhaustion: - After this event returns, the VM will throw a java.lang.OutOfMemoryError. - + - The VM was unable to allocate memory from the Java + The VM was unable to allocate memory from the Java platform heap. The heap is the runtime data area from which memory for all class instances and arrays are allocated. - + The VM was unable to create a thread. - + new @@ -13331,7 +13398,7 @@ myInit() { heap. - Can generate events when the VM is unable to + Can generate events when the VM is unable to create a thread. @@ -13349,8 +13416,8 @@ myInit() { Flags defining the properties of the of resource exhaustion - as specified by the - Resource + as specified by the + Resource Exhaustion Flags. @@ -13373,16 +13440,16 @@ myInit() { - Sent when a method causes the virtual machine to allocate an + Sent when a method causes the virtual machine to allocate an Object visible to Java programming language code and the allocation is not detectable by other intrumentation mechanisms. Generally object allocation should be detected by instrumenting the bytecodes of allocating methods. Object allocation generated in native code by JNI function - calls should be detected using + calls should be detected using JNI function interception. - Some methods might not have associated bytecodes and are not - native methods, they instead are executed directly by the + Some methods might not have associated bytecodes and are not + native methods, they instead are executed directly by the VM. These methods should send this event. Virtual machines which are incapable of bytecode instrumentation for some or all of their methods can send this event. @@ -13472,7 +13539,7 @@ myInit() { - A Garbage Collection Start event is sent when a + A Garbage Collection Start event is sent when a garbage collection pause begins. Only stop-the-world collections are reported--that is, collections during which all threads cease to modify the state of the Java virtual machine. @@ -13483,8 +13550,8 @@ myInit() { specifically allow such use (see the raw monitor, memory management, and environment local storage functions).

      - This event is always sent as a matched pair with - + This event is always sent as a matched pair with + (assuming both events are enabled) and no garbage collection events will occur between them. @@ -13513,11 +13580,11 @@ myInit() { and the handler for the Garbage Collection Finish event simply notifies the raw monitor

      - This event is always sent as a matched pair with + This event is always sent as a matched pair with (assuming both events are enabled). The most important use of this event is to provide timing information, - and thus additional information is not required. However, + and thus additional information is not required. However, information about the collection which is "free" should be included - what that information is needs to be determined. @@ -13546,7 +13613,7 @@ myInit() {

    - Though this seemed trivial to implement. + Though this seemed trivial to implement. In the RI it appears this will be quite complex. @@ -13592,54 +13659,54 @@ myInit() { - Holds a Java programming language int. + Holds a Java programming language int. Signed 32 bits. - Holds a Java programming language long. + Holds a Java programming language long. Signed 64 bits. - Holds a Java programming language float. + Holds a Java programming language float. 32 bits. - Holds a Java programming language double. + Holds a Java programming language double. 64 bits. - Holds a Java programming language object. + Holds a Java programming language object. - Holds a Java programming language class. + Holds a Java programming language class. - Is a union of all primitive types and jobject. Thus, holds any Java - programming language value. + Is a union of all primitive types and jobject. Thus, holds any Java + programming language value. - Identifies a Java programming language field. + Identifies a Java programming language field. jfieldIDs returned by functions and events may be safely stored. - Identifies a Java programming language method, initializer, or constructor. + Identifies a Java programming language method, initializer, or constructor. jmethodIDs returned by functions and events may be safely stored. However, if the class is unloaded, they become invalid and must not be used. @@ -13648,7 +13715,7 @@ myInit() { Pointer to the JNI function table. Pointer to this (JNIEnv *) - is a JNI environment. + is a JNI environment. @@ -13656,9 +13723,9 @@ myInit() { - The environment pointer. + The environment pointer. See the Function Section. - jvmtiEnv points to the + jvmtiEnv points to the function table pointer. @@ -13677,8 +13744,8 @@ myInit() { typedef jlong jlocation; - A 64 bit value, representing a monotonically increasing - executable position within a method. + A 64 bit value, representing a monotonically increasing + executable position within a method. -1 indicates a native method. See for the format on a given VM. @@ -13696,10 +13763,10 @@ typedef struct _jrawMonitorID *jrawMonitorID; Holds an error return code. See the Error section for possible values. -typedef enum { - JVMTI_ERROR_NONE = 0, +typedef enum { + JVMTI_ERROR_NONE = 0, JVMTI_ERROR_INVALID_THREAD = 10, - ... + ... } jvmtiError; @@ -13708,13 +13775,13 @@ typedef enum { An identifier for an event type. See the Event section for possible values. - It is guaranteed that future versions of this specification will + It is guaranteed that future versions of this specification will never assign zero as an event type identifier. -typedef enum { - JVMTI_EVENT_SINGLE_STEP = 1, - JVMTI_EVENT_BREAKPOINT = 2, - ... +typedef enum { + JVMTI_EVENT_SINGLE_STEP = 1, + JVMTI_EVENT_BREAKPOINT = 2, + ... } jvmtiEvent; @@ -13726,16 +13793,16 @@ typedef enum { typedef struct { jvmtiEventVMInit VMInit; jvmtiEventVMDeath VMDeath; - ... + ... } jvmtiEventCallbacks; - See event callbacks + See event callbacks for the complete structure.

    Where, for example, the VM initialization callback is defined: typedef void (JNICALL *jvmtiEventVMInit) - (jvmtiEnv *jvmti_env, + (jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread); @@ -13746,8 +13813,8 @@ typedef void (JNICALL *jvmtiEventVMInit) typedef struct JNINativeInterface_ jniNativeInterface; Typedef for the JNI function table JNINativeInterface - defined in the - + defined in the + JNI Specification. The JNI reference implementation defines this with an underscore. @@ -13759,13 +13826,13 @@ typedef void (JNICALL *jvmtiEventVMInit) JVMDI requires that the agent suspend threads before calling - certain sensitive functions. JVMPI requires garbage collection to be - disabled before calling certain sensitive functions. + certain sensitive functions. JVMPI requires garbage collection to be + disabled before calling certain sensitive functions. It was suggested that rather than have this requirement, that VM place itself in a suitable state before performing an operation. This makes considerable sense since each VM knows its requirements and can most easily arrange a - safe state. + safe state.

    The ability to externally suspend/resume threads will, of course, remain. The ability to enable/disable garbage collection will not. @@ -13773,19 +13840,19 @@ typedef void (JNICALL *jvmtiEventVMInit) This issue is resolved--suspend will not be required. The spec has been updated to reflect this. - + There are a variety of approaches to sampling call stacks. The biggest bifurcation is between VM controlled and agent - controlled. + controlled.

    This issue is resolved--agent controlled sampling will be the approach. - + JVMDI represents threads as jthread. JVMPI primarily - uses JNIEnv* to represent threads. + uses JNIEnv* to represent threads.

    The Expert Group has chosen jthread as the representation for threads in . @@ -13796,26 +13863,26 @@ typedef void (JNICALL *jvmtiEventVMInit) The JNI spec allows an implementation to depend on jclass/jmethodID - pairs, rather than simply a jmethodID, to reference a method. - JVMDI, for consistency, choose the same representation. + pairs, rather than simply a jmethodID, to reference a method. + JVMDI, for consistency, choose the same representation. JVMPI, however, specifies that a jmethodID alone maps to a method. Both of the Sun J2SE virtual machines (Classic and HotSpot) store pointers in jmethodIDs, and as a result, a jmethodID is sufficient. In fact, any JVM implementation that supports JVMPI must have - such a representation. + such a representation. will use jmethodID as a unique representation of a method (no jclass is used). - There should be efficiency gains, particularly in + There should be efficiency gains, particularly in functionality like stack dumping, to this representation.

    Note that fields were not used in JVMPI and that the access profile - of fields differs from methods--for implementation efficiency - reasons, a jclass/jfieldID pair will still be needed for field + of fields differs from methods--for implementation efficiency + reasons, a jclass/jfieldID pair will still be needed for field reference. - Functions return local references. + Functions return local references. @@ -13833,37 +13900,37 @@ typedef void (JNICALL *jvmtiEventVMInit) - A hint of the percentage of objects that will be tagged would + A hint of the percentage of objects that will be tagged would help the VM pick a good implementation. - How difficult or easy would be to extend the monitor_info category to include + How difficult or easy would be to extend the monitor_info category to include

    -  - current number of monitors 
    -  - enumeration of monitors 
    -  - enumeration of threads waiting on a given monitor 
    +  - current number of monitors
    +  - enumeration of monitors
    +  - enumeration of threads waiting on a given monitor
         
    - The reason for my question is the fact that current get_monitor_info support - requires the agent to specify a given thread to get the info which is probably - OK in the profiling/debugging space, while in the monitoring space the agent - could be watching the monitor list and then decide which thread to ask for - the info. You might ask why is this important for monitoring .... I think it + The reason for my question is the fact that current get_monitor_info support + requires the agent to specify a given thread to get the info which is probably + OK in the profiling/debugging space, while in the monitoring space the agent + could be watching the monitor list and then decide which thread to ask for + the info. You might ask why is this important for monitoring .... I think it can aid in the detection/prediction of application contention caused by hot-locks. - The specification is an evolving document with major, minor, + The specification is an evolving document with major, minor, and micro version numbers. A released version of the specification is uniquely identified by its major and minor version. - The functions, events, and capabilities in this specification + The functions, events, and capabilities in this specification indicate a "Since" value which is the major and minor version in which it was introduced. - The version of the specification implemented by the VM can - be retrieved at runtime with the + The version of the specification implemented by the VM can + be retrieved at runtime with the function. @@ -13957,9 +14024,9 @@ typedef void (JNICALL *jvmtiEventVMInit) get/set annotation, iterate live objects/heap. Add heap profiling functions place holder added: heap roots. - Heap profiling event added: object free. - Heap profiling event redesigned: vm object allocation. - Heap profiling event placeholders added: garbage collection start/finish. + Heap profiling event added: object free. + Heap profiling event redesigned: vm object allocation. + Heap profiling event placeholders added: garbage collection start/finish. Native method bind event added. @@ -14091,7 +14158,7 @@ typedef void (JNICALL *jvmtiEventVMInit) One character XML fix. - Change function parameter names to be consistent with + Change function parameter names to be consistent with event parameters (fooBarBaz becomes foo_bar_baz). @@ -14148,8 +14215,8 @@ typedef void (JNICALL *jvmtiEventVMInit) Define the data type jvmtiEventCallbacks. - Zero length allocations return NULL. - Keep SetAllocationHooks in JVMDI, but remove from . + Zero length allocations return NULL. + Keep SetAllocationHooks in JVMDI, but remove from . Add JVMTI_THREAD_STATUS_FLAG_INTERRUPTED. @@ -14167,7 +14234,7 @@ typedef void (JNICALL *jvmtiEventVMInit) Changes per June 11th Expert Group meeting -- - Overhaul Heap functionality: single callback, + Overhaul Heap functionality: single callback, remove GetHeapRoots, add reachable iterators, and rename "annotation" to "tag". NULL thread parameter on most functions is current @@ -14183,8 +14250,8 @@ typedef void (JNICALL *jvmtiEventVMInit) Clean up issues sections. Rename GetClassName back to GetClassSignature and fix description. - Add generic signature to GetClassSignature, - GetFieldSignature, GetMethodSignature, and + Add generic signature to GetClassSignature, + GetFieldSignature, GetMethodSignature, and GetLocalVariableTable. Elide EstimateCostOfCapabilities. Clarify that the system property functions operate @@ -14271,7 +14338,7 @@ typedef void (JNICALL *jvmtiEventVMInit) Split can_get_source_info into can_get_source_file_name, can_get_line_numbers, and can_get_source_debug_extension. PopFrame cannot have a native calling method. - Removed incorrect statement in GetClassloaderClasses + Removed incorrect statement in GetClassloaderClasses (see ). @@ -14303,7 +14370,7 @@ typedef void (JNICALL *jvmtiEventVMInit) Rename JVMTI_REFERENCE_ARRAY to JVMTI_REFERENCE_ARRAY_ELEMENT. - Steal java.lang.Runtime.availableProcessors() wording for + Steal java.lang.Runtime.availableProcessors() wording for AvailableProcessors(). Guarantee that zero will never be an event ID. Remove some issues which are no longer issues. @@ -14328,7 +14395,7 @@ typedef void (JNICALL *jvmtiEventVMInit) Remove the ClassUnload event. - Heap reference iterator callbacks return an enum that + Heap reference iterator callbacks return an enum that allows outgoing object references to be ignored. Allow JNIEnv as a param type to extension events/functions. @@ -14336,23 +14403,23 @@ typedef void (JNICALL *jvmtiEventVMInit) Fix a typo. - Remove all metadata functions: GetClassMetadata, + Remove all metadata functions: GetClassMetadata, GetFieldMetadata, and GetMethodMetadata. - Mark the functions Allocate. Deallocate, RawMonitor*, - SetEnvironmentLocalStorage, and GetEnvironmentLocalStorage + Mark the functions Allocate. Deallocate, RawMonitor*, + SetEnvironmentLocalStorage, and GetEnvironmentLocalStorage as safe for use in heap callbacks and GC events. - Add pass through opaque user data pointer to heap iterate + Add pass through opaque user data pointer to heap iterate functions and callbacks. In the CompiledMethodUnload event, send the code address. Add GarbageCollectionOccurred event. Add constant pool reference kind. Mark the functions CreateRawMonitor and DestroyRawMonitor as safe for use in heap callbacks and GC events. - Clarify: VMDeath, GetCurrentThreadCpuTimerInfo, + Clarify: VMDeath, GetCurrentThreadCpuTimerInfo, GetThreadCpuTimerInfo, IterateOverReachableObjects, IterateOverObjectsReachableFromObject, GetTime and JVMTI_ERROR_NULL_POINTER. @@ -14367,8 +14434,8 @@ typedef void (JNICALL *jvmtiEventVMInit) SetEventNotificationMode, add: error attempted inappropriate thread level control. Remove jvmtiExceptionHandlerEntry. - Fix handling of native methods on the stack -- - location_ptr param of GetFrameLocation, remove + Fix handling of native methods on the stack -- + location_ptr param of GetFrameLocation, remove JVMTI_ERROR_OPAQUE_FRAME from GetFrameLocation, jvmtiFrameInfo.location, and jlocation. Remove typo (from JVMPI) implying that the MonitorWaited @@ -14389,7 +14456,7 @@ typedef void (JNICALL *jvmtiEventVMInit) Remove MonitorContendedExit. Added JNIEnv parameter to VMObjectAlloc. - Clarified definition of class_tag and referrer_index + Clarified definition of class_tag and referrer_index parameters to heap callbacks. @@ -14416,13 +14483,13 @@ typedef void (JNICALL *jvmtiEventVMInit) Require NotifyFramePop to act on suspended threads. - Add capabilities + Add capabilities (can_redefine_any_class - and + and can_generate_all_class_hook_events) - and an error () + >can_generate_all_class_hook_events) + and an error () which allow some classes to be unmodifiable. @@ -14506,11 +14573,11 @@ typedef void (JNICALL *jvmtiEventVMInit) Bump major.minor version numbers to "1.0". - Clarify interaction between ForceGarbageCollection + Clarify interaction between ForceGarbageCollection and ObjectFree. - Restrict AddToBootstrapClassLoaderSearch and + Restrict AddToBootstrapClassLoaderSearch and SetSystemProperty to the OnLoad phase only. @@ -14537,8 +14604,8 @@ typedef void (JNICALL *jvmtiEventVMInit) Add "since" version marker. Add AddToSystemClassLoaderSearch. Allow AddToBootstrapClassLoaderSearch be used in live phase. - Fix historic rubbish in the descriptions of the heap_object_callback - parameter of IterateOverHeap and IterateOverInstancesOfClass functions; + Fix historic rubbish in the descriptions of the heap_object_callback + parameter of IterateOverHeap and IterateOverInstancesOfClass functions; disallow NULL for this parameter. Clarify, correct and make consistent: wording about current thread, opaque frames and insufficient number of frames in PopFrame. @@ -14562,19 +14629,19 @@ typedef void (JNICALL *jvmtiEventVMInit) Allow agents be started in the live phase. - Added paragraph about deploying agents. + Added paragraph about deploying agents. Add specification description to SetNativeMethodPrefix(es). - Better define the conditions on GetConstantPool. + Better define the conditions on GetConstantPool. Break out the GetClassVersionNumber function from GetConstantPool. - Clean-up the references to the VM Spec. + Clean-up the references to the VM Spec. Allow SetNativeMethodPrefix(es) in any phase. - Add clarifications about the impact of redefinition on GetConstantPool. + Add clarifications about the impact of redefinition on GetConstantPool. Various clarifications to SetNativeMethodPrefix(es). @@ -14588,7 +14655,7 @@ typedef void (JNICALL *jvmtiEventVMInit) Add . Revamp the bytecode instrumentation documentation. - Change to no longer + Change to no longer require the can_redefine_classes capability. @@ -14601,7 +14668,7 @@ typedef void (JNICALL *jvmtiEventVMInit) Add new heap functionity which supports reporting primitive values, allows setting the referrer tag, and has more powerful filtering: - FollowReferences, IterateThroughHeap, and their associated + FollowReferences, IterateThroughHeap, and their associated callbacks, structs, enums, and constants. @@ -14670,10 +14737,10 @@ typedef void (JNICALL *jvmtiEventVMInit) Better phrasing. - Match the referrer_index for static fields in Object Reference Callback + Match the referrer_index for static fields in Object Reference Callback with the Reference Implementation (and all other known implementations); that is, make it match the definition for instance fields. - In GetThreadListStackTraces, add JVMTI_ERROR_INVALID_THREAD to cover + In GetThreadListStackTraces, add JVMTI_ERROR_INVALID_THREAD to cover an invalid thread in the list; and specify that not started threads return empty stacks. @@ -14689,10 +14756,10 @@ typedef void (JNICALL *jvmtiEventVMInit) Changed spec to return -1 for monitor stack depth for the - implementation which can not determine stack depth. + implementation which can not determine stack depth. - Corrections for readability and accuracy courtesy of Alan Pratt of IBM. + Corrections for readability and accuracy courtesy of Alan Pratt of IBM. List the object relationships reported in FollowReferences. @@ -14732,9 +14799,15 @@ typedef void (JNICALL *jvmtiEventVMInit) - Add new functions: - GetAllModules - AddModuleReads, AddModuleExports, AddModuleOpens, AddModuleUses, AddModuleProvides + - IsModifiableModule Clarified can_redefine_any_classes, can_retransform_any_classes and IsModifiableClass API to disallow some implementation defined classes. + + Minor update for GetCurrentThread function: + - The function may return NULL in the start phase if the + can_generate_early_vmstart capability is enabled. + diff --git a/hotspot/src/share/vm/prims/jvmtiEnv.cpp b/hotspot/src/share/vm/prims/jvmtiEnv.cpp index f9dc315a552..491eeddd1d5 100644 --- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp +++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -235,12 +235,12 @@ JvmtiEnv::AddModuleReads(jobject module, jobject to_module) { // check module Handle h_module(THREAD, JNIHandles::resolve(module)); - if (!java_lang_reflect_Module::is_instance(h_module())) { + if (!java_lang_Module::is_instance(h_module())) { return JVMTI_ERROR_INVALID_MODULE; } // check to_module Handle h_to_module(THREAD, JNIHandles::resolve(to_module)); - if (!java_lang_reflect_Module::is_instance(h_to_module())) { + if (!java_lang_Module::is_instance(h_to_module())) { return JVMTI_ERROR_INVALID_MODULE; } return JvmtiExport::add_module_reads(h_module, h_to_module, THREAD); @@ -257,12 +257,12 @@ JvmtiEnv::AddModuleExports(jobject module, const char* pkg_name, jobject to_modu // check module Handle h_module(THREAD, JNIHandles::resolve(module)); - if (!java_lang_reflect_Module::is_instance(h_module())) { + if (!java_lang_Module::is_instance(h_module())) { return JVMTI_ERROR_INVALID_MODULE; } // check to_module Handle h_to_module(THREAD, JNIHandles::resolve(to_module)); - if (!java_lang_reflect_Module::is_instance(h_to_module())) { + if (!java_lang_Module::is_instance(h_to_module())) { return JVMTI_ERROR_INVALID_MODULE; } return JvmtiExport::add_module_exports(h_module, h_pkg, h_to_module, THREAD); @@ -279,12 +279,12 @@ JvmtiEnv::AddModuleOpens(jobject module, const char* pkg_name, jobject to_module // check module Handle h_module(THREAD, JNIHandles::resolve(module)); - if (!java_lang_reflect_Module::is_instance(h_module())) { + if (!java_lang_Module::is_instance(h_module())) { return JVMTI_ERROR_INVALID_MODULE; } // check to_module Handle h_to_module(THREAD, JNIHandles::resolve(to_module)); - if (!java_lang_reflect_Module::is_instance(h_to_module())) { + if (!java_lang_Module::is_instance(h_to_module())) { return JVMTI_ERROR_INVALID_MODULE; } return JvmtiExport::add_module_opens(h_module, h_pkg, h_to_module, THREAD); @@ -299,7 +299,7 @@ JvmtiEnv::AddModuleUses(jobject module, jclass service) { // check module Handle h_module(THREAD, JNIHandles::resolve(module)); - if (!java_lang_reflect_Module::is_instance(h_module())) { + if (!java_lang_Module::is_instance(h_module())) { return JVMTI_ERROR_INVALID_MODULE; } // check service @@ -321,7 +321,7 @@ JvmtiEnv::AddModuleProvides(jobject module, jclass service, jclass impl_class) { // check module Handle h_module(THREAD, JNIHandles::resolve(module)); - if (!java_lang_reflect_Module::is_instance(h_module())) { + if (!java_lang_Module::is_instance(h_module())) { return JVMTI_ERROR_INVALID_MODULE; } // check service @@ -339,6 +339,22 @@ JvmtiEnv::AddModuleProvides(jobject module, jclass service, jclass impl_class) { return JvmtiExport::add_module_provides(h_module, h_service, h_impl_class, THREAD); } /* end AddModuleProvides */ +// module - pre-checked for NULL +// is_modifiable_class_ptr - pre-checked for NULL +jvmtiError +JvmtiEnv::IsModifiableModule(jobject module, jboolean* is_modifiable_module_ptr) { + JavaThread* THREAD = JavaThread::current(); + + // check module + Handle h_module(THREAD, JNIHandles::resolve(module)); + if (!java_lang_Module::is_instance(h_module())) { + return JVMTI_ERROR_INVALID_MODULE; + } + + *is_modifiable_module_ptr = JNI_TRUE; + return JVMTI_ERROR_NONE; +} /* end IsModifiableModule */ + // // Class functions @@ -1796,6 +1812,13 @@ JvmtiEnv::FollowReferences(jint heap_filter, jclass klass, jobject initial_objec } } + if (initial_object != NULL) { + oop init_obj = JNIHandles::resolve_external_guard(initial_object); + if (init_obj == NULL) { + return JVMTI_ERROR_INVALID_OBJECT; + } + } + Thread *thread = Thread::current(); HandleMark hm(thread); KlassHandle kh (thread, k_oop); diff --git a/hotspot/src/share/vm/prims/jvmtiExport.cpp b/hotspot/src/share/vm/prims/jvmtiExport.cpp index 52350da0cde..8ac9e1bc822 100644 --- a/hotspot/src/share/vm/prims/jvmtiExport.cpp +++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -54,7 +54,6 @@ #include "runtime/os.inline.hpp" #include "runtime/thread.inline.hpp" #include "runtime/vframe.hpp" -#include "services/attachListener.hpp" #include "services/serviceUtil.hpp" #include "utilities/macros.hpp" #if INCLUDE_ALL_GCS @@ -1230,8 +1229,12 @@ void JvmtiExport::post_class_unload(Klass* klass) { assert(thread->is_VM_thread(), "wrong thread"); // get JavaThread for whom we are proxy - JavaThread *real_thread = - (JavaThread *)((VMThread *)thread)->vm_operation()->calling_thread(); + Thread *calling_thread = ((VMThread *)thread)->vm_operation()->calling_thread(); + if (!calling_thread->is_Java_thread()) { + // cannot post an event to a non-JavaThread + return; + } + JavaThread *real_thread = (JavaThread *)calling_thread; JvmtiEnvIterator it; for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) { @@ -2475,15 +2478,6 @@ extern "C" { typedef jint (JNICALL *OnAttachEntry_t)(JavaVM*, char *, void *); } -jint JvmtiExport::load_agent_library(AttachOperation* op, outputStream* st) { - // get agent name and options - const char* agent = op->arg(0); - const char* absParam = op->arg(1); - const char* options = op->arg(2); - - return load_agent_library(agent, absParam, options, st); -} - jint JvmtiExport::load_agent_library(const char *agent, const char *absParam, const char *options, outputStream* st) { char ebuf[1024]; diff --git a/hotspot/src/share/vm/prims/jvmtiExport.hpp b/hotspot/src/share/vm/prims/jvmtiExport.hpp index 8599656ab7d..666ab62709b 100644 --- a/hotspot/src/share/vm/prims/jvmtiExport.hpp +++ b/hotspot/src/share/vm/prims/jvmtiExport.hpp @@ -45,7 +45,6 @@ class JvmtiEventControllerPrivate; class JvmtiManageCapabilities; class JvmtiEnv; class JvmtiThreadState; -class AttachOperation; #define JVMTI_SUPPORT_FLAG(key) \ private: \ @@ -396,7 +395,6 @@ class JvmtiExport : public AllStatic { #if INCLUDE_SERVICES // attach support static jint load_agent_library(const char *agent, const char *absParam, const char *options, outputStream* out) NOT_JVMTI_RETURN_(JNI_ERR); - static jint load_agent_library(AttachOperation* op, outputStream* out) NOT_JVMTI_RETURN_(JNI_ERR); #endif // SetNativeMethodPrefix support diff --git a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp index b2cf5660865..e90420d03b8 100644 --- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp +++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -51,6 +51,7 @@ #include "services/serviceUtil.hpp" #include "utilities/macros.hpp" #if INCLUDE_ALL_GCS +#include "gc/g1/g1SATBCardTableModRefBS.hpp" #include "gc/parallel/parallelScavengeHeap.hpp" #endif // INCLUDE_ALL_GCS @@ -1534,6 +1535,14 @@ class TagObjectCollector : public JvmtiTagHashmapEntryClosure { if (_tags[i] == entry->tag()) { oop o = entry->object(); assert(o != NULL && Universe::heap()->is_in_reserved(o), "sanity check"); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + // The reference in this tag map could be the only (implicitly weak) + // reference to that object. If we hand it out, we need to keep it live wrt + // SATB marking similar to other j.l.ref.Reference referents. + G1SATBCardTableModRefBS::enqueue(o); + } +#endif jobject ref = JNIHandles::make_local(JavaThread::current(), o); _object_results->append(ref); _tag_results->append((uint64_t)entry->tag()); diff --git a/hotspot/src/share/vm/prims/methodHandles.cpp b/hotspot/src/share/vm/prims/methodHandles.cpp index 717c1fe00ad..1ddc306d4a0 100644 --- a/hotspot/src/share/vm/prims/methodHandles.cpp +++ b/hotspot/src/share/vm/prims/methodHandles.cpp @@ -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 @@ -176,7 +176,7 @@ oop MethodHandles::init_MemberName(Handle mname, Handle target) { return NULL; } -oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info) { +oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info, bool intern) { assert(info.resolved_appendix().is_null(), "only normal methods here"); methodHandle m = info.resolved_method(); assert(m.not_null(), "null method handle"); @@ -277,13 +277,7 @@ oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info) { // If relevant, the vtable or itable value is stored as vmindex. // This is done eagerly, since it is readily available without // constructing any new objects. - // TO DO: maybe intern mname_oop - if (m->method_holder()->add_member_name(mname)) { - return mname(); - } else { - // Redefinition caused this to fail. Return NULL (and an exception?) - return NULL; - } + return m->method_holder()->add_member_name(mname, intern); } oop MethodHandles::init_field_MemberName(Handle mname, fieldDescriptor& fd, bool is_setter) { @@ -733,7 +727,7 @@ Handle MethodHandles::resolve_MemberName(Handle mname, KlassHandle caller, TRAPS assert(!is_signature_polymorphic_static(mh_invoke_id), ""); LinkResolver::resolve_handle_call(result, link_info, THREAD); } else if (ref_kind == JVM_REF_invokeSpecial) { - LinkResolver::resolve_special_call(result, + LinkResolver::resolve_special_call(result, Handle(), link_info, THREAD); } else if (ref_kind == JVM_REF_invokeVirtual) { LinkResolver::resolve_virtual_call(result, Handle(), defc, @@ -761,7 +755,7 @@ Handle MethodHandles::resolve_MemberName(Handle mname, KlassHandle caller, TRAPS { assert(!HAS_PENDING_EXCEPTION, ""); if (name == vmSymbols::object_initializer_name()) { - LinkResolver::resolve_special_call(result, link_info, THREAD); + LinkResolver::resolve_special_call(result, Handle(), link_info, THREAD); } else { break; // will throw after end of switch } @@ -973,7 +967,9 @@ int MethodHandles::find_MemberNames(KlassHandle k, if (!java_lang_invoke_MemberName::is_instance(result())) return -99; // caller bug! CallInfo info(m); - oop saved = MethodHandles::init_method_MemberName(result, info); + // Since this is going through the methods to create MemberNames, don't search + // for matching methods already in the table + oop saved = MethodHandles::init_method_MemberName(result, info, /*intern*/false); if (saved != result()) results->obj_at_put(rfill-1, saved); // show saved instance to user } else if (++overflow >= overflow_limit) { @@ -1054,9 +1050,34 @@ MemberNameTable::~MemberNameTable() { } } -void MemberNameTable::add_member_name(jweak mem_name_wref) { +oop MemberNameTable::add_member_name(jweak mem_name_wref) { assert_locked_or_safepoint(MemberNameTable_lock); this->push(mem_name_wref); + return JNIHandles::resolve(mem_name_wref); +} + +oop MemberNameTable::find_or_add_member_name(jweak mem_name_wref) { + assert_locked_or_safepoint(MemberNameTable_lock); + oop new_mem_name = JNIHandles::resolve(mem_name_wref); + + // Find matching member name in the list. + // This is linear because these are short lists. + int len = this->length(); + int new_index = len; + for (int idx = 0; idx < len; idx++) { + oop mname = JNIHandles::resolve(this->at(idx)); + if (mname == NULL) { + new_index = idx; + continue; + } + if (java_lang_invoke_MemberName::equals(new_mem_name, mname)) { + JNIHandles::destroy_weak_global(mem_name_wref); + return mname; + } + } + // Not found, push the new one, or reuse empty slot + this->at_put_grow(new_index, mem_name_wref); + return new_mem_name; } #if INCLUDE_JVMTI @@ -1208,9 +1229,10 @@ JVM_ENTRY(jobject, MHN_resolve_Mem(JNIEnv *env, jobject igcls, jobject mname_jh, if (reference_klass != NULL && reference_klass->is_instance_klass()) { // Emulate LinkResolver::check_klass_accessability. Klass* caller = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(caller_jh)); - if (Reflection::verify_class_access(caller, - reference_klass, - true) != Reflection::ACCESS_OK) { + if (caller != SystemDictionary::Object_klass() + && Reflection::verify_class_access(caller, + reference_klass, + true) != Reflection::ACCESS_OK) { THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), reference_klass->external_name()); } } diff --git a/hotspot/src/share/vm/prims/methodHandles.hpp b/hotspot/src/share/vm/prims/methodHandles.hpp index 4a825464fb8..3a5e90305fe 100644 --- a/hotspot/src/share/vm/prims/methodHandles.hpp +++ b/hotspot/src/share/vm/prims/methodHandles.hpp @@ -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 @@ -66,7 +66,7 @@ class MethodHandles: AllStatic { static Handle new_MemberName(TRAPS); // must be followed by init_MemberName static oop init_MemberName(Handle mname_h, Handle target_h); // compute vmtarget/vmindex from target static oop init_field_MemberName(Handle mname_h, fieldDescriptor& fd, bool is_setter = false); - static oop init_method_MemberName(Handle mname_h, CallInfo& info); + static oop init_method_MemberName(Handle mname_h, CallInfo& info, bool intern = true); static int method_ref_kind(Method* m, bool do_dispatch_if_possible = true); static int find_MemberNames(KlassHandle k, Symbol* name, Symbol* sig, int mflags, KlassHandle caller, @@ -235,7 +235,8 @@ class MemberNameTable : public GrowableArray { public: MemberNameTable(int methods_cnt); ~MemberNameTable(); - void add_member_name(jweak mem_name_ref); + oop add_member_name(jweak mem_name_ref); + oop find_or_add_member_name(jweak mem_name_ref); #if INCLUDE_JVMTI // RedefineClasses() API support: diff --git a/hotspot/src/share/vm/prims/stackwalk.cpp b/hotspot/src/share/vm/prims/stackwalk.cpp index e130127318a..9e3fc9a8464 100644 --- a/hotspot/src/share/vm/prims/stackwalk.cpp +++ b/hotspot/src/share/vm/prims/stackwalk.cpp @@ -173,7 +173,11 @@ void JavaFrameStream::fill_frame(int index, objArrayHandle frames_array, } } -oop LiveFrameStream::create_primitive_value_instance(StackValueCollection* values, int i, TRAPS) { +// Create and return a LiveStackFrame.PrimitiveSlot (if needed) for the +// StackValue at the given index. 'type' is expected to be T_INT, T_LONG, +// T_OBJECT, or T_CONFLICT. +oop LiveFrameStream::create_primitive_slot_instance(StackValueCollection* values, + int i, BasicType type, TRAPS) { Klass* k = SystemDictionary::resolve_or_null(vmSymbols::java_lang_LiveStackFrameInfo(), CHECK_NULL); instanceKlassHandle ik (THREAD, k); @@ -182,8 +186,8 @@ oop LiveFrameStream::create_primitive_value_instance(StackValueCollection* value Symbol* signature = NULL; // ## TODO: type is only available in LocalVariable table, if present. - // ## StackValue type is T_INT or T_OBJECT. - switch (values->at(i)->type()) { + // ## StackValue type is T_INT or T_OBJECT (or converted to T_LONG on 64-bit) + switch (type) { case T_INT: args.push_int(values->int_at(i)); signature = vmSymbols::asPrimitive_int_signature(); @@ -195,42 +199,26 @@ oop LiveFrameStream::create_primitive_value_instance(StackValueCollection* value break; case T_FLOAT: - args.push_float(values->float_at(i)); - signature = vmSymbols::asPrimitive_float_signature(); - break; - case T_DOUBLE: - args.push_double(values->double_at(i)); - signature = vmSymbols::asPrimitive_double_signature(); - break; - case T_BYTE: - args.push_int(values->int_at(i)); - signature = vmSymbols::asPrimitive_byte_signature(); - break; - case T_SHORT: - args.push_int(values->int_at(i)); - signature = vmSymbols::asPrimitive_short_signature(); - break; - case T_CHAR: - args.push_int(values->int_at(i)); - signature = vmSymbols::asPrimitive_char_signature(); - break; - case T_BOOLEAN: - args.push_int(values->int_at(i)); - signature = vmSymbols::asPrimitive_boolean_signature(); - break; + THROW_MSG_(vmSymbols::java_lang_InternalError(), "Unexpected StackValue type", NULL); case T_OBJECT: return values->obj_at(i)(); case T_CONFLICT: // put a non-null slot - args.push_int(0); - signature = vmSymbols::asPrimitive_int_signature(); + #ifdef _LP64 + args.push_long(0); + signature = vmSymbols::asPrimitive_long_signature(); + #else + args.push_int(0); + signature = vmSymbols::asPrimitive_int_signature(); + #endif + break; default: ShouldNotReachHere(); @@ -252,9 +240,19 @@ objArrayHandle LiveFrameStream::values_to_object_array(StackValueCollection* val objArrayHandle array_h(THREAD, array_oop); for (int i = 0; i < values->size(); i++) { StackValue* st = values->at(i); - oop obj = create_primitive_value_instance(values, i, CHECK_(empty)); - if (obj != NULL) + BasicType type = st->type(); + int index = i; +#ifdef _LP64 + if (type != T_OBJECT && type != T_CONFLICT) { + intptr_t ret = st->get_int(); // read full 64-bit slot + type = T_LONG; // treat as long + index--; // undo +1 in StackValueCollection::long_at + } +#endif + oop obj = create_primitive_slot_instance(values, index, type, CHECK_(empty)); + if (obj != NULL) { array_h->obj_at_put(i, obj); + } } return array_h; } @@ -286,6 +284,13 @@ void LiveFrameStream::fill_live_stackframe(Handle stackFrame, StackValueCollection* expressions = _jvf->expressions(); GrowableArray* monitors = _jvf->monitors(); + int mode = 0; + if (_jvf->is_interpreted_frame()) { + mode = MODE_INTERPRETED; + } else if (_jvf->is_compiled_frame()) { + mode = MODE_COMPILED; + } + if (!locals->is_empty()) { objArrayHandle locals_h = values_to_object_array(locals, CHECK); java_lang_LiveStackFrameInfo::set_locals(stackFrame(), locals_h()); @@ -298,6 +303,7 @@ void LiveFrameStream::fill_live_stackframe(Handle stackFrame, objArrayHandle monitors_h = monitors_to_object_array(monitors, CHECK); java_lang_LiveStackFrameInfo::set_monitors(stackFrame(), monitors_h()); } + java_lang_LiveStackFrameInfo::set_mode(stackFrame(), mode); } } diff --git a/hotspot/src/share/vm/prims/stackwalk.hpp b/hotspot/src/share/vm/prims/stackwalk.hpp index 161a74599c3..a0c4bede64a 100644 --- a/hotspot/src/share/vm/prims/stackwalk.hpp +++ b/hotspot/src/share/vm/prims/stackwalk.hpp @@ -92,11 +92,16 @@ public: class LiveFrameStream : public BaseFrameStream { private: + enum { + MODE_INTERPRETED = 0x01, + MODE_COMPILED = 0x02 + }; + javaVFrame* _jvf; void fill_live_stackframe(Handle stackFrame, const methodHandle& method, TRAPS); - static oop create_primitive_value_instance(StackValueCollection* values, - int i, TRAPS); + static oop create_primitive_slot_instance(StackValueCollection* values, + int i, BasicType type, TRAPS); static objArrayHandle monitors_to_object_array(GrowableArray* monitors, TRAPS); static objArrayHandle values_to_object_array(StackValueCollection* values, TRAPS); diff --git a/hotspot/src/share/vm/prims/unsafe.cpp b/hotspot/src/share/vm/prims/unsafe.cpp index 1c98add775b..2f096378201 100644 --- a/hotspot/src/share/vm/prims/unsafe.cpp +++ b/hotspot/src/share/vm/prims/unsafe.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -378,7 +378,7 @@ UNSAFE_ENTRY(jobject, Unsafe_GetUncompressedObject(JNIEnv *env, jobject unsafe, // On platforms which do not support atomic compare-and-swap of jlong (8 byte) // values we have to use a lock-based scheme to enforce atomicity. This has to be // applied to all Unsafe operations that set the value of a jlong field. Even so -// the compareAndSwapLong operation will not be atomic with respect to direct stores +// the compareAndSetLong operation will not be atomic with respect to direct stores // to the field from Java code. It is important therefore that any Java code that // utilizes these Unsafe jlong operations does not perform direct stores. To permit // direct loads of the field from Java code we must also use Atomic::store within the @@ -1013,7 +1013,7 @@ UNSAFE_ENTRY(jlong, Unsafe_CompareAndExchangeLong(JNIEnv *env, jobject unsafe, j #endif } UNSAFE_END -UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject e_h, jobject x_h)) { +UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject e_h, jobject x_h)) { oop x = JNIHandles::resolve(x_h); oop e = JNIHandles::resolve(e_h); oop p = JNIHandles::resolve(obj); @@ -1028,14 +1028,14 @@ UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapObject(JNIEnv *env, jobject unsafe, return true; } UNSAFE_END -UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) { +UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) { oop p = JNIHandles::resolve(obj); jint* addr = (jint *)index_oop_from_field_offset_long(p, offset); return (jint)(Atomic::cmpxchg(x, addr, e)) == e; } UNSAFE_END -UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x)) { +UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x)) { Handle p(THREAD, JNIHandles::resolve(obj)); jlong* addr = (jlong*)index_oop_from_field_offset_long(p(), offset); @@ -1194,12 +1194,12 @@ static JNINativeMethod jdk_internal_misc_Unsafe_methods[] = { {CC "defineClass0", CC "(" DC_Args ")" CLS, FN_PTR(Unsafe_DefineClass0)}, {CC "allocateInstance", CC "(" CLS ")" OBJ, FN_PTR(Unsafe_AllocateInstance)}, {CC "throwException", CC "(" THR ")V", FN_PTR(Unsafe_ThrowException)}, - {CC "compareAndSwapObject", CC "(" OBJ "J" OBJ "" OBJ ")Z", FN_PTR(Unsafe_CompareAndSwapObject)}, - {CC "compareAndSwapInt", CC "(" OBJ "J""I""I"")Z", FN_PTR(Unsafe_CompareAndSwapInt)}, - {CC "compareAndSwapLong", CC "(" OBJ "J""J""J"")Z", FN_PTR(Unsafe_CompareAndSwapLong)}, - {CC "compareAndExchangeObjectVolatile", CC "(" OBJ "J" OBJ "" OBJ ")" OBJ, FN_PTR(Unsafe_CompareAndExchangeObject)}, - {CC "compareAndExchangeIntVolatile", CC "(" OBJ "J""I""I"")I", FN_PTR(Unsafe_CompareAndExchangeInt)}, - {CC "compareAndExchangeLongVolatile", CC "(" OBJ "J""J""J"")J", FN_PTR(Unsafe_CompareAndExchangeLong)}, + {CC "compareAndSetObject",CC "(" OBJ "J" OBJ "" OBJ ")Z", FN_PTR(Unsafe_CompareAndSetObject)}, + {CC "compareAndSetInt", CC "(" OBJ "J""I""I"")Z", FN_PTR(Unsafe_CompareAndSetInt)}, + {CC "compareAndSetLong", CC "(" OBJ "J""J""J"")Z", FN_PTR(Unsafe_CompareAndSetLong)}, + {CC "compareAndExchangeObject", CC "(" OBJ "J" OBJ "" OBJ ")" OBJ, FN_PTR(Unsafe_CompareAndExchangeObject)}, + {CC "compareAndExchangeInt", CC "(" OBJ "J""I""I"")I", FN_PTR(Unsafe_CompareAndExchangeInt)}, + {CC "compareAndExchangeLong", CC "(" OBJ "J""J""J"")J", FN_PTR(Unsafe_CompareAndExchangeLong)}, {CC "park", CC "(ZJ)V", FN_PTR(Unsafe_Park)}, {CC "unpark", CC "(" OBJ ")V", FN_PTR(Unsafe_Unpark)}, diff --git a/hotspot/src/share/vm/prims/whitebox.cpp b/hotspot/src/share/vm/prims/whitebox.cpp index 513dfc8b985..952aa5fa47c 100644 --- a/hotspot/src/share/vm/prims/whitebox.cpp +++ b/hotspot/src/share/vm/prims/whitebox.cpp @@ -1,5 +1,5 @@ /* - * 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 @@ -1457,15 +1457,6 @@ WB_ENTRY(void, WB_AddReadsModule(JNIEnv* env, jobject o, jobject from_module, jo Modules::add_reads_module(from_module, source_module, CHECK); WB_END -WB_ENTRY(void, WB_AddModulePackage(JNIEnv* env, jobject o, jclass module, jstring package)) - ResourceMark rm(THREAD); - char* package_name = NULL; - if (package != NULL) { - package_name = java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(package)); - } - Modules::add_module_package(module, package_name, CHECK); -WB_END - WB_ENTRY(jobject, WB_GetModuleByPackageName(JNIEnv* env, jobject o, jobject loader, jstring package)) ResourceMark rm(THREAD); char* package_name = NULL; @@ -1910,8 +1901,6 @@ static JNINativeMethod methods[] = { (void*)&WB_AddModuleExports }, {CC"AddReadsModule", CC"(Ljava/lang/Object;Ljava/lang/Object;)V", (void*)&WB_AddReadsModule }, - {CC"AddModulePackage", CC"(Ljava/lang/Object;Ljava/lang/String;)V", - (void*)&WB_AddModulePackage }, {CC"GetModuleByPackageName", CC"(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", (void*)&WB_GetModuleByPackageName }, {CC"AddModuleExportsToAllUnnamed", CC"(Ljava/lang/Object;Ljava/lang/String;)V", diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index b57cb96839f..92f18dd42ef 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -375,6 +375,7 @@ static SpecialFlag const special_jvm_flags[] = { // -------------- Deprecated Flags -------------- // --- Non-alias flags - sorted by obsolete_in then expired_in: { "MaxGCMinorPauseMillis", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() }, + { "UseConcMarkSweepGC", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() }, { "AutoGCSelectPauseMillis", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, { "UseAutoGCSelectPolicy", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, { "UseParNewGC", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, @@ -1894,6 +1895,11 @@ void Arguments::set_jvmci_specific_flags() { if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) { FLAG_SET_DEFAULT(NewSizeThreadIncrease, 4*K); } + if (TieredStopAtLevel != CompLevel_full_optimization) { + // Currently JVMCI compiler can only work at the full optimization level + warning("forcing TieredStopAtLevel to full optimization because JVMCI is enabled"); + TieredStopAtLevel = CompLevel_full_optimization; + } if (FLAG_IS_DEFAULT(TypeProfileLevel)) { FLAG_SET_DEFAULT(TypeProfileLevel, 0); } @@ -2299,8 +2305,6 @@ jint Arguments::set_aggressive_heap_flags() { if (FLAG_SET_CMDLINE(bool, UseParallelGC, true) != Flag::SUCCESS) { return JNI_EINVAL; } - FLAG_SET_DEFAULT(ParallelGCThreads, - Abstract_VM_Version::parallel_worker_threads()); // Encourage steady state memory management if (FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100) != Flag::SUCCESS) { @@ -2506,11 +2510,14 @@ bool Arguments::check_vm_args_consistency() { } #endif } -#if INCLUDE_JVMCI +#if INCLUDE_JVMCI status = status && check_jvmci_args_consistency(); if (EnableJVMCI) { + PropertyList_unique_add(&_system_properties, "jdk.internal.vm.ci.enabled", "true", + AddProperty, UnwriteableProperty, InternalProperty); + if (!ScavengeRootsInCode) { warning("forcing ScavengeRootsInCode non-zero because JVMCI is enabled"); ScavengeRootsInCode = 1; @@ -2831,11 +2838,14 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m build_jvm_args(option->optionString); } - // -verbose:[class/gc/jni] + // -verbose:[class/module/gc/jni] if (match_option(option, "-verbose", &tail)) { if (!strcmp(tail, ":class") || !strcmp(tail, "")) { LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, load)); LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, unload)); + } else if (!strcmp(tail, ":module")) { + LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(module, load)); + LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(module, unload)); } else if (!strcmp(tail, ":gc")) { LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(gc)); } else if (!strcmp(tail, ":jni")) { @@ -2927,6 +2937,10 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m if (res != JNI_OK) { return res; } + } else if (match_option(option, "--illegal-access=", &tail)) { + if (!create_property("jdk.module.illegalAccess", tail, ExternalProperty)) { + return JNI_ENOMEM; + } // -agentlib and -agentpath } else if (match_option(option, "-agentlib:", &tail) || (is_absolute_path = match_option(option, "-agentpath:", &tail))) { @@ -3169,6 +3183,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m // -Xprof } else if (match_option(option, "-Xprof")) { #if INCLUDE_FPROF + log_warning(arguments)("Option -Xprof was deprecated in version 9 and will likely be removed in a future release."); _has_profile = true; #else // INCLUDE_FPROF jio_fprintf(defaultStream::error_stream(), @@ -3700,7 +3715,7 @@ jint Arguments::finalize_vm_init_args() { #if INCLUDE_JVMCI if (EnableJVMCI && - !create_numbered_property("jdk.module.addmods", "jdk.vm.ci", addmods_count++)) { + !create_numbered_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) { return JNI_ENOMEM; } #endif diff --git a/hotspot/src/share/vm/runtime/commandLineFlagConstraintsRuntime.cpp b/hotspot/src/share/vm/runtime/commandLineFlagConstraintsRuntime.cpp index abcf73ca3a7..9911ffb4e9e 100644 --- a/hotspot/src/share/vm/runtime/commandLineFlagConstraintsRuntime.cpp +++ b/hotspot/src/share/vm/runtime/commandLineFlagConstraintsRuntime.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/commandLineFlagConstraintsRuntime.hpp b/hotspot/src/share/vm/runtime/commandLineFlagConstraintsRuntime.hpp index 3bfb2825b74..776685ee95b 100644 --- a/hotspot/src/share/vm/runtime/commandLineFlagConstraintsRuntime.hpp +++ b/hotspot/src/share/vm/runtime/commandLineFlagConstraintsRuntime.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/deoptimization.cpp b/hotspot/src/share/vm/runtime/deoptimization.cpp index e3b88640768..cebdcfc9124 100644 --- a/hotspot/src/share/vm/runtime/deoptimization.cpp +++ b/hotspot/src/share/vm/runtime/deoptimization.cpp @@ -189,19 +189,6 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread assert(vf->is_compiled_frame(), "Wrong frame type"); chunk->push(compiledVFrame::cast(vf)); - ScopeDesc* trap_scope = chunk->at(0)->scope(); - Handle exceptionObject; - if (trap_scope->rethrow_exception()) { - if (PrintDeoptimizationDetails) { - tty->print_cr("Exception to be rethrown in the interpreter for method %s::%s at bci %d", trap_scope->method()->method_holder()->name()->as_C_string(), trap_scope->method()->name()->as_C_string(), trap_scope->bci()); - } - GrowableArray* expressions = trap_scope->expressions(); - guarantee(expressions != NULL && expressions->length() > 0, "must have exception to throw"); - ScopeValue* topOfStack = expressions->top(); - exceptionObject = StackValue::create_stack_value(&deoptee, &map, topOfStack)->get_obj(); - assert(exceptionObject() != NULL, "exception oop can not be null"); - } - bool realloc_failures = false; #if defined(COMPILER2) || INCLUDE_JVMCI @@ -221,8 +208,9 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread // It is not guaranteed that we can get such information here only // by analyzing bytecode in deoptimized frames. This is why this flag // is set during method compilation (see Compile::Process_OopMap_Node()). - // If the previous frame was popped, we don't have a result. - bool save_oop_result = chunk->at(0)->scope()->return_oop() && !thread->popframe_forcing_deopt_reexecution(); + // If the previous frame was popped or if we are dispatching an exception, + // we don't have an oop result. + bool save_oop_result = chunk->at(0)->scope()->return_oop() && !thread->popframe_forcing_deopt_reexecution() && (exec_mode == Unpack_deopt); Handle return_value; if (save_oop_result) { // Reallocation may trigger GC. If deoptimization happened on return from @@ -295,6 +283,19 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread #endif // INCLUDE_JVMCI #endif // COMPILER2 || INCLUDE_JVMCI + ScopeDesc* trap_scope = chunk->at(0)->scope(); + Handle exceptionObject; + if (trap_scope->rethrow_exception()) { + if (PrintDeoptimizationDetails) { + tty->print_cr("Exception to be rethrown in the interpreter for method %s::%s at bci %d", trap_scope->method()->method_holder()->name()->as_C_string(), trap_scope->method()->name()->as_C_string(), trap_scope->bci()); + } + GrowableArray* expressions = trap_scope->expressions(); + guarantee(expressions != NULL && expressions->length() > 0, "must have exception to throw"); + ScopeValue* topOfStack = expressions->top(); + exceptionObject = StackValue::create_stack_value(&deoptee, &map, topOfStack)->get_obj(); + guarantee(exceptionObject() != NULL, "exception oop can not be null"); + } + // Ensure that no safepoint is taken after pointers have been stored // in fields of rematerialized objects. If a safepoint occurs from here on // out the java state residing in the vframeArray will be missed. @@ -1596,9 +1597,9 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* thread, jint tra get_method_data(thread, profiled_method, create_if_missing); // Log a message - Events::log_deopt_message(thread, "Uncommon trap: reason=%s action=%s pc=" INTPTR_FORMAT " method=%s @ %d", + Events::log_deopt_message(thread, "Uncommon trap: reason=%s action=%s pc=" INTPTR_FORMAT " method=%s @ %d %s", trap_reason_name(reason), trap_action_name(action), p2i(fr.pc()), - trap_method->name_and_sig_as_C_string(), trap_bci); + trap_method->name_and_sig_as_C_string(), trap_bci, nm->compiler_name()); // Print a bunch of diagnostics, if requested. if (TraceDeoptimization || LogCompilation) { @@ -1812,7 +1813,7 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* thread, jint tra // aggressive optimization. bool inc_recompile_count = false; ProfileData* pdata = NULL; - if (ProfileTraps && update_trap_state && trap_mdo != NULL) { + if (ProfileTraps && !is_client_compilation_mode_vm() && update_trap_state && trap_mdo != NULL) { assert(trap_mdo == get_method_data(thread, profiled_method, false), "sanity"); uint this_trap_count = 0; bool maybe_prior_trap = false; diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 90b274e58a2..16ce96b8a65 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -657,14 +657,13 @@ public: range(0, 99) \ \ product(bool, UseAES, false, \ - "Control whether AES instructions can be used on x86/x64") \ + "Control whether AES instructions are used when available") \ \ product(bool, UseFMA, false, \ - "Control whether FMA instructions can be used") \ + "Control whether FMA instructions are used when available") \ \ product(bool, UseSHA, false, \ - "Control whether SHA instructions can be used " \ - "on SPARC, on ARM and on x86") \ + "Control whether SHA instructions are used when available") \ \ diagnostic(bool, UseGHASHIntrinsics, false, \ "Use intrinsics for GHASH versions of crypto") \ @@ -1458,9 +1457,9 @@ public: "Number of threads concurrent gc will use") \ constraint(ConcGCThreadsConstraintFunc,AfterErgo) \ \ - product(uintx, GCTaskTimeStampEntries, 200, \ + product(uint, GCTaskTimeStampEntries, 200, \ "Number of time stamp entries per gc worker thread") \ - range(1, max_uintx) \ + range(1, max_jint) \ \ product(bool, AlwaysTenure, false, \ "Always tenure objects in eden (ParallelGC only)") \ @@ -3375,7 +3374,7 @@ public: "Code cache expansion size (in bytes)") \ range(0, max_uintx) \ \ - develop_pd(uintx, CodeCacheMinBlockLength, \ + diagnostic_pd(uintx, CodeCacheMinBlockLength, \ "Minimum number of segments in a code cache block") \ range(1, 100) \ \ @@ -3875,6 +3874,9 @@ public: product(bool, StartAttachListener, false, \ "Always start Attach Listener at VM startup") \ \ + product(bool, EnableDynamicAgentLoading, true, \ + "Allow tools to load agents with the attach mechanism") \ + \ manageable(bool, PrintConcurrentLocks, false, \ "Print java.util.concurrent locks in thread dump") \ \ diff --git a/hotspot/src/share/vm/runtime/java.cpp b/hotspot/src/share/vm/runtime/java.cpp index 0c7187cf745..9223f12b764 100644 --- a/hotspot/src/share/vm/runtime/java.cpp +++ b/hotspot/src/share/vm/runtime/java.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -621,6 +621,13 @@ void vm_notify_during_shutdown(const char* error, const char* message) { } } +void vm_exit_during_initialization() { + vm_notify_during_shutdown(NULL, NULL); + + // Failure during initialization, we don't want to dump core + vm_abort(false); +} + void vm_exit_during_initialization(Handle exception) { tty->print_cr("Error occurred during initialization of VM"); // If there are exceptions on this thread it must be cleared diff --git a/hotspot/src/share/vm/runtime/java.hpp b/hotspot/src/share/vm/runtime/java.hpp index e1e982e3824..3b3a714ee8a 100644 --- a/hotspot/src/share/vm/runtime/java.hpp +++ b/hotspot/src/share/vm/runtime/java.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -45,6 +45,7 @@ extern void vm_abort(bool dump_core=true); extern void notify_vm_shutdown(); // VM exit if error occurs during initialization of VM +extern void vm_exit_during_initialization(); extern void vm_exit_during_initialization(Handle exception); extern void vm_exit_during_initialization(Symbol* exception_name, const char* message); extern void vm_exit_during_initialization(const char* error, const char* message = NULL); diff --git a/hotspot/src/share/vm/runtime/javaCalls.cpp b/hotspot/src/share/vm/runtime/javaCalls.cpp index 5874699a1fc..d83f45cba41 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.cpp +++ b/hotspot/src/share/vm/runtime/javaCalls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -221,7 +221,7 @@ void JavaCalls::call_virtual(JavaValue* result, Handle receiver, KlassHandle spe void JavaCalls::call_special(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, JavaCallArguments* args, TRAPS) { CallInfo callinfo; LinkInfo link_info(klass, name, signature); - LinkResolver::resolve_special_call(callinfo, link_info, CHECK); + LinkResolver::resolve_special_call(callinfo, args->receiver(), link_info, CHECK); methodHandle method = callinfo.selected_method(); assert(method.not_null(), "should have thrown exception"); @@ -328,9 +328,9 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC // Verify the arguments if (CheckJNICalls) { - args->verify(method, result->get_type(), thread); + args->verify(method, result->get_type()); } - else debug_only(args->verify(method, result->get_type(), thread)); + else debug_only(args->verify(method, result->get_type())); #if INCLUDE_JVMCI } #else @@ -442,12 +442,43 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC //-------------------------------------------------------------------------------------- // Implementation of JavaCallArguments +inline bool is_value_state_indirect_oop(uint state) { + assert(state != JavaCallArguments::value_state_oop, + "Checking for handles after removal"); + assert(state < JavaCallArguments::value_state_limit, + "Invalid value state %u", state); + return state != JavaCallArguments::value_state_primitive; +} + +inline oop resolve_indirect_oop(intptr_t value, uint state) { + switch (state) { + case JavaCallArguments::value_state_handle: + { + oop* ptr = reinterpret_cast(value); + return Handle::raw_resolve(ptr); + } + + case JavaCallArguments::value_state_jobject: + { + jobject obj = reinterpret_cast(value); + return JNIHandles::resolve(obj); + } + + default: + ShouldNotReachHere(); + return NULL; + } +} + intptr_t* JavaCallArguments::parameters() { // First convert all handles to oops for(int i = 0; i < _size; i++) { - if (_is_oop[i]) { - // Handle conversion - _value[i] = cast_from_oop(Handle::raw_resolve((oop *)_value[i])); + uint state = _value_state[i]; + assert(state != value_state_oop, "Multiple handle conversions"); + if (is_value_state_indirect_oop(state)) { + oop obj = resolve_indirect_oop(_value[i], state); + _value[i] = cast_from_oop(obj); + _value_state[i] = value_state_oop; } } // Return argument vector @@ -457,30 +488,42 @@ intptr_t* JavaCallArguments::parameters() { class SignatureChekker : public SignatureIterator { private: - bool *_is_oop; - int _pos; + int _pos; BasicType _return_type; - intptr_t* _value; - Thread* _thread; + u_char* _value_state; + intptr_t* _value; public: bool _is_return; - SignatureChekker(Symbol* signature, BasicType return_type, bool is_static, bool* is_oop, intptr_t* value, Thread* thread) : SignatureIterator(signature) { - _is_oop = is_oop; - _is_return = false; - _return_type = return_type; - _pos = 0; - _value = value; - _thread = thread; - + SignatureChekker(Symbol* signature, + BasicType return_type, + bool is_static, + u_char* value_state, + intptr_t* value) : + SignatureIterator(signature), + _pos(0), + _return_type(return_type), + _value_state(value_state), + _value(value), + _is_return(false) + { if (!is_static) { check_value(true); // Receiver must be an oop } } void check_value(bool type) { - guarantee(_is_oop[_pos++] == type, "signature does not match pushed arguments"); + uint state = _value_state[_pos++]; + if (type) { + guarantee(is_value_state_indirect_oop(state), + "signature does not match pushed arguments: %u at %d", + state, _pos - 1); + } else { + guarantee(state == JavaCallArguments::value_state_primitive, + "signature does not match pushed arguments: %u at %d", + state, _pos - 1); + } } void check_doing_return(bool state) { _is_return = state; } @@ -515,24 +558,20 @@ class SignatureChekker : public SignatureIterator { return; } - // verify handle and the oop pointed to by handle - int p = _pos; - bool bad = false; - // If argument is oop - if (_is_oop[p]) { - intptr_t v = _value[p]; - if (v != 0 ) { - size_t t = (size_t)v; - bad = (t < (size_t)os::vm_page_size() ) || !Handle::raw_resolve((oop *)v)->is_oop_or_null(true); - if (CheckJNICalls && bad) { - ReportJNIFatalError((JavaThread*)_thread, "Bad JNI oop argument"); - } - } - // for the regular debug case. - assert(!bad, "Bad JNI oop argument"); + intptr_t v = _value[_pos]; + if (v != 0) { + // v is a "handle" referring to an oop, cast to integral type. + // There shouldn't be any handles in very low memory. + guarantee((size_t)v >= (size_t)os::vm_page_size(), + "Bad JNI oop argument %d: " PTR_FORMAT, _pos, v); + // Verify the pointee. + oop vv = resolve_indirect_oop(v, _value_state[_pos]); + guarantee(vv->is_oop_or_null(true), + "Bad JNI oop argument %d: " PTR_FORMAT " -> " PTR_FORMAT, + _pos, v, p2i(vv)); } - check_value(true); + check_value(true); // Verify value state. } void do_bool() { check_int(T_BOOLEAN); } @@ -549,8 +588,7 @@ class SignatureChekker : public SignatureIterator { }; -void JavaCallArguments::verify(const methodHandle& method, BasicType return_type, - Thread *thread) { +void JavaCallArguments::verify(const methodHandle& method, BasicType return_type) { guarantee(method->size_of_parameters() == size_of_parameters(), "wrong no. of arguments pushed"); // Treat T_OBJECT and T_ARRAY as the same @@ -559,7 +597,11 @@ void JavaCallArguments::verify(const methodHandle& method, BasicType return_type // Check that oop information is correct Symbol* signature = method->signature(); - SignatureChekker sc(signature, return_type, method->is_static(),_is_oop, _value, thread); + SignatureChekker sc(signature, + return_type, + method->is_static(), + _value_state, + _value); sc.iterate_parameters(); sc.check_doing_return(true); sc.iterate_returntype(); diff --git a/hotspot/src/share/vm/runtime/javaCalls.hpp b/hotspot/src/share/vm/runtime/javaCalls.hpp index efe1f8b9813..e77abf7d36b 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.hpp +++ b/hotspot/src/share/vm/runtime/javaCalls.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -80,11 +80,11 @@ class JavaCallArguments : public StackObj { _default_size = 8 // Must be at least # of arguments in JavaCalls methods }; - intptr_t _value_buffer [_default_size + 1]; - bool _is_oop_buffer[_default_size + 1]; + intptr_t _value_buffer [_default_size + 1]; + u_char _value_state_buffer[_default_size + 1]; intptr_t* _value; - bool* _is_oop; + u_char* _value_state; int _size; int _max_size; bool _start_at_zero; // Support late setting of receiver @@ -92,8 +92,8 @@ class JavaCallArguments : public StackObj { void initialize() { // Starts at first element to support set_receiver. - _value = &_value_buffer[1]; - _is_oop = &_is_oop_buffer[1]; + _value = &_value_buffer[1]; + _value_state = &_value_state_buffer[1]; _max_size = _default_size; _size = 0; @@ -101,6 +101,23 @@ class JavaCallArguments : public StackObj { JVMCI_ONLY(_alternative_target = NULL;) } + // Helper for push_oop and the like. The value argument is a + // "handle" that refers to an oop. We record the address of the + // handle rather than the designated oop. The handle is later + // resolved to the oop by parameters(). This delays the exposure of + // naked oops until it is GC-safe. + template + inline int push_oop_impl(T handle, int size) { + // JNITypes::put_obj expects an oop value, so we play fast and + // loose with the type system. The cast from handle type to oop + // *must* use a C-style cast. In a product build it performs a + // reinterpret_cast. In a debug build (more accurately, in a + // CHECK_UNHANDLED_OOPS build) it performs a static_cast, invoking + // the debug-only oop class's conversion from void* constructor. + JNITypes::put_obj((oop)handle, _value, size); // Updates size. + return size; // Return the updated size. + } + public: JavaCallArguments() { initialize(); } @@ -111,11 +128,12 @@ class JavaCallArguments : public StackObj { JavaCallArguments(int max_size) { if (max_size > _default_size) { - _value = NEW_RESOURCE_ARRAY(intptr_t, max_size + 1); - _is_oop = NEW_RESOURCE_ARRAY(bool, max_size + 1); + _value = NEW_RESOURCE_ARRAY(intptr_t, max_size + 1); + _value_state = NEW_RESOURCE_ARRAY(u_char, max_size + 1); - // Reserve room for potential receiver in value and is_oop - _value++; _is_oop++; + // Reserve room for potential receiver in value and state + _value++; + _value_state++; _max_size = max_size; _size = 0; @@ -136,25 +154,52 @@ class JavaCallArguments : public StackObj { } #endif - inline void push_oop(Handle h) { _is_oop[_size] = true; - JNITypes::put_obj((oop)h.raw_value(), _value, _size); } + // The possible values for _value_state elements. + enum { + value_state_primitive, + value_state_oop, + value_state_handle, + value_state_jobject, + value_state_limit + }; - inline void push_int(int i) { _is_oop[_size] = false; - JNITypes::put_int(i, _value, _size); } + inline void push_oop(Handle h) { + _value_state[_size] = value_state_handle; + _size = push_oop_impl(h.raw_value(), _size); + } - inline void push_double(double d) { _is_oop[_size] = false; _is_oop[_size + 1] = false; - JNITypes::put_double(d, _value, _size); } + inline void push_jobject(jobject h) { + _value_state[_size] = value_state_jobject; + _size = push_oop_impl(h, _size); + } - inline void push_long(jlong l) { _is_oop[_size] = false; _is_oop[_size + 1] = false; - JNITypes::put_long(l, _value, _size); } + inline void push_int(int i) { + _value_state[_size] = value_state_primitive; + JNITypes::put_int(i, _value, _size); + } - inline void push_float(float f) { _is_oop[_size] = false; - JNITypes::put_float(f, _value, _size); } + inline void push_double(double d) { + _value_state[_size] = value_state_primitive; + _value_state[_size + 1] = value_state_primitive; + JNITypes::put_double(d, _value, _size); + } + + inline void push_long(jlong l) { + _value_state[_size] = value_state_primitive; + _value_state[_size + 1] = value_state_primitive; + JNITypes::put_long(l, _value, _size); + } + + inline void push_float(float f) { + _value_state[_size] = value_state_primitive; + JNITypes::put_float(f, _value, _size); + } // receiver Handle receiver() { assert(_size > 0, "must at least be one argument"); - assert(_is_oop[0], "first argument must be an oop"); + assert(_value_state[0] == value_state_handle, + "first argument must be an oop"); assert(_value[0] != 0, "receiver must be not-null"); return Handle((oop*)_value[0], false); } @@ -162,11 +207,11 @@ class JavaCallArguments : public StackObj { void set_receiver(Handle h) { assert(_start_at_zero == false, "can only be called once"); _start_at_zero = true; - _is_oop--; + _value_state--; _value--; _size++; - _is_oop[0] = true; - _value[0] = (intptr_t)h.raw_value(); + _value_state[0] = value_state_handle; + push_oop_impl(h.raw_value(), 0); } // Converts all Handles to oops, and returns a reference to parameter vector @@ -174,7 +219,7 @@ class JavaCallArguments : public StackObj { int size_of_parameters() const { return _size; } // Verify that pushed arguments fits a given method - void verify(const methodHandle& method, BasicType return_type, Thread *thread); + void verify(const methodHandle& method, BasicType return_type); }; // All calls to Java have to go via JavaCalls. Sets up the stack frame diff --git a/hotspot/src/share/vm/runtime/jniHandles.cpp b/hotspot/src/share/vm/runtime/jniHandles.cpp index 679ade0eaca..f4aae3c20bf 100644 --- a/hotspot/src/share/vm/runtime/jniHandles.cpp +++ b/hotspot/src/share/vm/runtime/jniHandles.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,9 @@ #include "runtime/jniHandles.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/thread.inline.hpp" +#if INCLUDE_ALL_GCS +#include "gc/g1/g1SATBCardTableModRefBS.hpp" +#endif JNIHandleBlock* JNIHandles::_global_handles = NULL; JNIHandleBlock* JNIHandles::_weak_global_handles = NULL; @@ -92,28 +95,48 @@ jobject JNIHandles::make_weak_global(Handle obj) { jobject res = NULL; if (!obj.is_null()) { // ignore null handles - MutexLocker ml(JNIGlobalHandle_lock); - assert(Universe::heap()->is_in_reserved(obj()), "sanity check"); - res = _weak_global_handles->allocate_handle(obj()); + { + MutexLocker ml(JNIGlobalHandle_lock); + assert(Universe::heap()->is_in_reserved(obj()), "sanity check"); + res = _weak_global_handles->allocate_handle(obj()); + } + // Add weak tag. + assert(is_ptr_aligned(res, weak_tag_alignment), "invariant"); + char* tptr = reinterpret_cast(res) + weak_tag_value; + res = reinterpret_cast(tptr); } else { CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops()); } return res; } +template +oop JNIHandles::resolve_jweak(jweak handle) { + assert(is_jweak(handle), "precondition"); + oop result = jweak_ref(handle); + result = guard_value(result); +#if INCLUDE_ALL_GCS + if (result != NULL && UseG1GC) { + G1SATBCardTableModRefBS::enqueue(result); + } +#endif // INCLUDE_ALL_GCS + return result; +} + +template oop JNIHandles::resolve_jweak(jweak); +template oop JNIHandles::resolve_jweak(jweak); void JNIHandles::destroy_global(jobject handle) { if (handle != NULL) { assert(is_global_handle(handle), "Invalid delete of global JNI handle"); - *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it + jobject_ref(handle) = deleted_handle(); } } void JNIHandles::destroy_weak_global(jobject handle) { if (handle != NULL) { - assert(!CheckJNICalls || is_weak_global_handle(handle), "Invalid delete of weak global JNI handle"); - *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it + jweak_ref(handle) = deleted_handle(); } } diff --git a/hotspot/src/share/vm/runtime/jniHandles.hpp b/hotspot/src/share/vm/runtime/jniHandles.hpp index ce37d940d7c..13e0e155740 100644 --- a/hotspot/src/share/vm/runtime/jniHandles.hpp +++ b/hotspot/src/share/vm/runtime/jniHandles.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,28 @@ class JNIHandles : AllStatic { static JNIHandleBlock* _weak_global_handles; // First weak global handle block static oop _deleted_handle; // Sentinel marking deleted handles + inline static bool is_jweak(jobject handle); + inline static oop& jobject_ref(jobject handle); // NOT jweak! + inline static oop& jweak_ref(jobject handle); + + template inline static oop guard_value(oop value); + template inline static oop resolve_impl(jobject handle); + template static oop resolve_jweak(jweak handle); + public: + // Low tag bit in jobject used to distinguish a jweak. jweak is + // type equivalent to jobject, but there are places where we need to + // be able to distinguish jweak values from other jobjects, and + // is_weak_global_handle is unsuitable for performance reasons. To + // provide such a test we add weak_tag_value to the (aligned) byte + // address designated by the jobject to produce the corresponding + // jweak. Accessing the value of a jobject must account for it + // being a possibly offset jweak. + static const uintptr_t weak_tag_size = 1; + static const uintptr_t weak_tag_alignment = (1u << weak_tag_size); + static const uintptr_t weak_tag_mask = weak_tag_alignment - 1; + static const int weak_tag_value = 1; + // Resolve handle into oop inline static oop resolve(jobject handle); // Resolve externally provided handle into oop with some guards @@ -176,36 +197,85 @@ class JNIHandleBlock : public CHeapObj { #endif }; +inline bool JNIHandles::is_jweak(jobject handle) { + STATIC_ASSERT(weak_tag_size == 1); + STATIC_ASSERT(weak_tag_value == 1); + return (reinterpret_cast(handle) & weak_tag_mask) != 0; +} + +inline oop& JNIHandles::jobject_ref(jobject handle) { + assert(!is_jweak(handle), "precondition"); + return *reinterpret_cast(handle); +} + +inline oop& JNIHandles::jweak_ref(jobject handle) { + assert(is_jweak(handle), "precondition"); + char* ptr = reinterpret_cast(handle) - weak_tag_value; + return *reinterpret_cast(ptr); +} + +// external_guard is true if called from resolve_external_guard. +// Treat deleted (and possibly zapped) as NULL for external_guard, +// else as (asserted) error. +template +inline oop JNIHandles::guard_value(oop value) { + if (!external_guard) { + assert(value != badJNIHandle, "Pointing to zapped jni handle area"); + assert(value != deleted_handle(), "Used a deleted global handle"); + } else if ((value == badJNIHandle) || (value == deleted_handle())) { + value = NULL; + } + return value; +} + +// external_guard is true if called from resolve_external_guard. +template +inline oop JNIHandles::resolve_impl(jobject handle) { + assert(handle != NULL, "precondition"); + oop result; + if (is_jweak(handle)) { // Unlikely + result = resolve_jweak(handle); + } else { + result = jobject_ref(handle); + // Construction of jobjects canonicalize a null value into a null + // jobject, so for non-jweak the pointee should never be null. + assert(external_guard || result != NULL, + "Invalid value read from jni handle"); + result = guard_value(result); + } + return result; +} inline oop JNIHandles::resolve(jobject handle) { - oop result = (handle == NULL ? (oop)NULL : *(oop*)handle); - assert(result != NULL || (handle == NULL || !CheckJNICalls || is_weak_global_handle(handle)), "Invalid value read from jni handle"); - assert(result != badJNIHandle, "Pointing to zapped jni handle area"); + oop result = NULL; + if (handle != NULL) { + result = resolve_impl(handle); + } return result; -}; - +} +// Resolve some erroneous cases to NULL, rather than treating them as +// possibly unchecked errors. In particular, deleted handles are +// treated as NULL (though a deleted and later reallocated handle +// isn't detected). inline oop JNIHandles::resolve_external_guard(jobject handle) { - if (handle == NULL) return NULL; - oop result = *(oop*)handle; - if (result == NULL || result == badJNIHandle) return NULL; + oop result = NULL; + if (handle != NULL) { + result = resolve_impl(handle); + } return result; -}; - +} inline oop JNIHandles::resolve_non_null(jobject handle) { assert(handle != NULL, "JNI handle should not be null"); - oop result = *(oop*)handle; - assert(result != NULL, "Invalid value read from jni handle"); - assert(result != badJNIHandle, "Pointing to zapped jni handle area"); - // Don't let that private _deleted_handle object escape into the wild. - assert(result != deleted_handle(), "Used a deleted global handle."); + oop result = resolve_impl(handle); + assert(result != NULL, "NULL read from jni handle"); return result; -}; +} inline void JNIHandles::destroy_local(jobject handle) { if (handle != NULL) { - *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it + jobject_ref(handle) = deleted_handle(); } } diff --git a/hotspot/src/share/vm/runtime/mutexLocker.cpp b/hotspot/src/share/vm/runtime/mutexLocker.cpp index 29ad520e1f0..8c47a1c308a 100644 --- a/hotspot/src/share/vm/runtime/mutexLocker.cpp +++ b/hotspot/src/share/vm/runtime/mutexLocker.cpp @@ -181,13 +181,13 @@ void mutex_init() { } if (UseG1GC) { - def(SATB_Q_FL_lock , PaddedMutex , special, true, Monitor::_safepoint_check_never); - def(SATB_Q_CBL_mon , PaddedMonitor, nonleaf, true, Monitor::_safepoint_check_never); - def(Shared_SATB_Q_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_never); + def(SATB_Q_FL_lock , PaddedMutex , special , true, Monitor::_safepoint_check_never); + def(SATB_Q_CBL_mon , PaddedMonitor, leaf - 1 , true, Monitor::_safepoint_check_never); + def(Shared_SATB_Q_lock , PaddedMutex , leaf - 1 , true, Monitor::_safepoint_check_never); - def(DirtyCardQ_FL_lock , PaddedMutex , special, true, Monitor::_safepoint_check_never); - def(DirtyCardQ_CBL_mon , PaddedMonitor, nonleaf, true, Monitor::_safepoint_check_never); - def(Shared_DirtyCardQ_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_never); + def(DirtyCardQ_FL_lock , PaddedMutex , special , true, Monitor::_safepoint_check_never); + def(DirtyCardQ_CBL_mon , PaddedMonitor, leaf - 1 , true, Monitor::_safepoint_check_never); + def(Shared_DirtyCardQ_lock , PaddedMutex , leaf - 1 , true, Monitor::_safepoint_check_never); def(FreeList_lock , PaddedMutex , leaf , true, Monitor::_safepoint_check_never); def(SecondaryFreeList_lock , PaddedMonitor, leaf , true, Monitor::_safepoint_check_never); diff --git a/hotspot/src/share/vm/runtime/os_ext.hpp b/hotspot/src/share/vm/runtime/os_ext.hpp index 3aa733a322a..5fcaae13728 100644 --- a/hotspot/src/share/vm/runtime/os_ext.hpp +++ b/hotspot/src/share/vm/runtime/os_ext.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/reflection.cpp b/hotspot/src/share/vm/runtime/reflection.cpp index fb4b2ee63cc..68b895c5f05 100644 --- a/hotspot/src/share/vm/runtime/reflection.cpp +++ b/hotspot/src/share/vm/runtime/reflection.cpp @@ -594,9 +594,9 @@ char* Reflection::verify_class_access_msg(const Klass* current_class, current_class_name, module_from_name, new_class_name, module_to_name, module_from_name, module_to_name); } else { - jobject jlrm = module_to->module(); - assert(jlrm != NULL, "Null jlrm in module_to ModuleEntry"); - intptr_t identity_hash = JNIHandles::resolve(jlrm)->identity_hash(); + jobject jlm = module_to->module(); + assert(jlm != NULL, "Null jlm in module_to ModuleEntry"); + intptr_t identity_hash = JNIHandles::resolve(jlm)->identity_hash(); size_t len = 160 + strlen(current_class_name) + 2*strlen(module_from_name) + strlen(new_class_name) + 2*sizeof(uintx); msg = NEW_RESOURCE_ARRAY(char, len); @@ -621,9 +621,9 @@ char* Reflection::verify_class_access_msg(const Klass* current_class, current_class_name, module_from_name, new_class_name, module_to_name, module_to_name, package_name, module_from_name); } else { - jobject jlrm = module_from->module(); - assert(jlrm != NULL, "Null jlrm in module_from ModuleEntry"); - intptr_t identity_hash = JNIHandles::resolve(jlrm)->identity_hash(); + jobject jlm = module_from->module(); + assert(jlm != NULL, "Null jlm in module_from ModuleEntry"); + intptr_t identity_hash = JNIHandles::resolve(jlm)->identity_hash(); size_t len = 170 + strlen(current_class_name) + strlen(new_class_name) + 2*strlen(module_to_name) + strlen(package_name) + 2*sizeof(uintx); msg = NEW_RESOURCE_ARRAY(char, len); diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp index c854e4ad84f..b244bb70f18 100644 --- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp +++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp @@ -549,7 +549,7 @@ address SharedRuntime::get_poll_stub(address pc) { CodeBlob *cb = CodeCache::find_blob(pc); // Should be an nmethod - assert(cb && cb->is_compiled(), "safepoint polling: pc must refer to an nmethod"); + guarantee(cb != NULL && cb->is_compiled(), "safepoint polling: pc must refer to an nmethod"); // Look up the relocation information assert(((CompiledMethod*)cb)->is_at_poll_or_poll_return(pc), @@ -1802,7 +1802,7 @@ bool SharedRuntime::should_fixup_call_destination(address destination, address e if (destination != entry_point) { CodeBlob* callee = CodeCache::find_blob(destination); // callee == cb seems weird. It means calling interpreter thru stub. - if (callee == cb || callee->is_adapter_blob()) { + if (callee != NULL && (callee == cb || callee->is_adapter_blob())) { // static call or optimized virtual if (TraceCallFixup) { tty->print("fixup callsite at " INTPTR_FORMAT " to compiled code for", p2i(caller_pc)); @@ -1851,7 +1851,7 @@ IRT_LEAF(void, SharedRuntime::fixup_callers_callsite(Method* method, address cal // ask me how I know this... CodeBlob* cb = CodeCache::find_blob(caller_pc); - if (!cb->is_compiled() || entry_point == moop->get_c2i_entry()) { + if (cb == NULL || !cb->is_compiled() || entry_point == moop->get_c2i_entry()) { return; } diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index abdcab5684c..758020a7c77 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -3404,14 +3404,21 @@ static void call_initPhase1(TRAPS) { // // After phase 2, The VM will begin search classes from -Xbootclasspath/a. static void call_initPhase2(TRAPS) { - TraceTime timer("Phase2 initialization", TRACETIME_LOG(Info, modules, startuptime)); + TraceTime timer("Phase2 initialization", TRACETIME_LOG(Info, module, startuptime)); Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_System(), true, CHECK); instanceKlassHandle klass (THREAD, k); - JavaValue result(T_VOID); + JavaValue result(T_INT); + JavaCallArguments args; + args.push_int(DisplayVMOutputToStderr); + args.push_int(log_is_enabled(Debug, init)); // print stack trace if exception thrown JavaCalls::call_static(&result, klass, vmSymbols::initPhase2_name(), - vmSymbols::void_method_signature(), CHECK); + vmSymbols::boolean_boolean_int_signature(), &args, CHECK); + if (result.get_jint() != JNI_OK) { + vm_exit_during_initialization(); // no message or exception + } + universe_post_module_init(); } @@ -3458,7 +3465,7 @@ void Threads::initialize_java_lang_classes(JavaThread* main_thread, TRAPS) { java_lang_Thread::RUNNABLE); // The VM creates objects of this class. - initialize_class(vmSymbols::java_lang_reflect_Module(), CHECK); + initialize_class(vmSymbols::java_lang_Module(), CHECK); // The VM preresolves methods to these classes. Make sure that they get initialized initialize_class(vmSymbols::java_lang_reflect_Method(), CHECK); diff --git a/hotspot/src/share/vm/runtime/vframe.cpp b/hotspot/src/share/vm/runtime/vframe.cpp index 7d9a7b39e6e..1759e31dd64 100644 --- a/hotspot/src/share/vm/runtime/vframe.cpp +++ b/hotspot/src/share/vm/runtime/vframe.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -463,14 +463,15 @@ void interpretedVFrame::set_locals(StackValueCollection* values) const { entryVFrame::entryVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread) : externalVFrame(fr, reg_map, thread) {} - -void vframeStreamCommon::found_bad_method_frame() { +#ifdef ASSERT +void vframeStreamCommon::found_bad_method_frame() const { // 6379830 Cut point for an assertion that occasionally fires when // we are using the performance analyzer. // Disable this assert when testing the analyzer with fastdebug. // -XX:SuppressErrorAt=vframe.cpp:XXX (XXX=following line number) - assert(false, "invalid bci or invalid scope desc"); + fatal("invalid bci or invalid scope desc"); } +#endif // top-frame will be skipped vframeStream::vframeStream(JavaThread* thread, frame top_frame, diff --git a/hotspot/src/share/vm/runtime/vframe.hpp b/hotspot/src/share/vm/runtime/vframe.hpp index de7d510fc2d..40c43ad1824 100644 --- a/hotspot/src/share/vm/runtime/vframe.hpp +++ b/hotspot/src/share/vm/runtime/vframe.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -297,14 +297,14 @@ class vframeStreamCommon : StackObj { void fill_from_compiled_frame(int decode_offset); void fill_from_compiled_native_frame(); - void found_bad_method_frame(); - void fill_from_interpreter_frame(); bool fill_from_frame(); // Helper routine for security_get_caller_frame void skip_prefixed_method_and_wrappers(); + DEBUG_ONLY(void found_bad_method_frame() const;) + public: // Constructor vframeStreamCommon(JavaThread* thread) : _reg_map(thread, false) { @@ -407,9 +407,9 @@ inline void vframeStreamCommon::fill_from_compiled_frame(int decode_offset) { nm()->print_code(); nm()->print_pcs(); } + found_bad_method_frame(); #endif // Provide a cheap fallback in product mode. (See comment above.) - found_bad_method_frame(); fill_from_compiled_native_frame(); return; } @@ -523,7 +523,7 @@ inline void vframeStreamCommon::fill_from_interpreter_frame() { // In this scenario, pretend that the interpreter is at the point // of entering the method. if (bci < 0) { - found_bad_method_frame(); + DEBUG_ONLY(found_bad_method_frame();) bci = 0; } _mode = interpreted_mode; diff --git a/hotspot/src/share/vm/runtime/vmStructs.cpp b/hotspot/src/share/vm/runtime/vmStructs.cpp index d5b9e3db03c..0d973ca5ee8 100644 --- a/hotspot/src/share/vm/runtime/vmStructs.cpp +++ b/hotspot/src/share/vm/runtime/vmStructs.cpp @@ -673,7 +673,7 @@ typedef CompactHashtable SymbolCompactHashTable; \ nonstatic_field(BasicHashtable, _table_size, int) \ nonstatic_field(BasicHashtable, _buckets, HashtableBucket*) \ - nonstatic_field(BasicHashtable, _free_list, BasicHashtableEntry*) \ + volatile_nonstatic_field(BasicHashtable, _free_list, BasicHashtableEntry*) \ nonstatic_field(BasicHashtable, _first_free_entry, char*) \ nonstatic_field(BasicHashtable, _end_block, char*) \ nonstatic_field(BasicHashtable, _entry_size, int) \ diff --git a/hotspot/src/share/vm/services/attachListener.cpp b/hotspot/src/share/vm/services/attachListener.cpp index 0de704d6913..99ba58b5200 100644 --- a/hotspot/src/share/vm/services/attachListener.cpp +++ b/hotspot/src/share/vm/services/attachListener.cpp @@ -100,6 +100,36 @@ static jint get_properties(AttachOperation* op, outputStream* out, Symbol* seria return JNI_OK; } +// Implementation of "load" command. +static jint load_agent(AttachOperation* op, outputStream* out) { + // get agent name and options + const char* agent = op->arg(0); + const char* absParam = op->arg(1); + const char* options = op->arg(2); + + // If loading a java agent then need to ensure that the java.instrument module is loaded + if (strcmp(agent, "instrument") == 0) { + Thread* THREAD = Thread::current(); + ResourceMark rm(THREAD); + HandleMark hm(THREAD); + JavaValue result(T_OBJECT); + Handle h_module_name = java_lang_String::create_from_str("java.instrument", THREAD); + JavaCalls::call_static(&result, + SystemDictionary::module_Modules_klass(), + vmSymbols::loadModule_name(), + vmSymbols::loadModule_signature(), + h_module_name, + THREAD); + if (HAS_PENDING_EXCEPTION) { + java_lang_Throwable::print(PENDING_EXCEPTION, out); + CLEAR_PENDING_EXCEPTION; + return JNI_ERR; + } + } + + return JvmtiExport::load_agent_library(agent, absParam, options, out); +} + // Implementation of "properties" command. // See also: PrintSystemPropertiesDCmd class static jint get_system_properties(AttachOperation* op, outputStream* out) { @@ -282,7 +312,7 @@ static AttachOperationFunctionInfo funcs[] = { { "agentProperties", get_agent_properties }, { "datadump", data_dump }, { "dumpheap", dump_heap }, - { "load", JvmtiExport::load_agent_library }, + { "load", load_agent }, { "properties", get_system_properties }, { "threaddump", thread_dump }, { "inspectheap", heap_inspection }, @@ -321,6 +351,10 @@ static void attach_listener_thread_entry(JavaThread* thread, TRAPS) { // handle special detachall operation if (strcmp(op->name(), AttachOperation::detachall_operation_name()) == 0) { AttachListener::detachall(); + } else if (!EnableDynamicAgentLoading && strcmp(op->name(), "load") == 0) { + st.print("Dynamic agent loading is not enabled. " + "Use -XX:+EnableDynamicAgentLoading to launch target VM."); + res = JNI_ERR; } else { // find the function to dispatch too AttachOperationFunctionInfo* info = NULL; diff --git a/hotspot/src/share/vm/services/diagnosticCommand.cpp b/hotspot/src/share/vm/services/diagnosticCommand.cpp index 29aa08daf94..fab6990214a 100644 --- a/hotspot/src/share/vm/services/diagnosticCommand.cpp +++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp @@ -42,6 +42,21 @@ #include "utilities/macros.hpp" #include "oops/objArrayOop.inline.hpp" + +static void loadAgentModule(TRAPS) { + ResourceMark rm(THREAD); + HandleMark hm(THREAD); + + JavaValue result(T_OBJECT); + Handle h_module_name = java_lang_String::create_from_str("jdk.management.agent", CHECK); + JavaCalls::call_static(&result, + SystemDictionary::module_Modules_klass(), + vmSymbols::loadModule_name(), + vmSymbols::loadModule_signature(), + h_module_name, + THREAD); +} + void DCmdRegistrant::register_dcmds(){ // Registration of the diagnostic commands // First argument specifies which interfaces will export the command @@ -753,6 +768,7 @@ void JMXStartRemoteDCmd::execute(DCmdSource source, TRAPS) { // the remote management server. // throw java.lang.NoSuchMethodError if the method doesn't exist + loadAgentModule(CHECK); Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK); instanceKlassHandle ik (THREAD, k); @@ -826,6 +842,7 @@ void JMXStartLocalDCmd::execute(DCmdSource source, TRAPS) { // the local management server // throw java.lang.NoSuchMethodError if method doesn't exist + loadAgentModule(CHECK); Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK); instanceKlassHandle ik (THREAD, k); @@ -843,6 +860,7 @@ void JMXStopRemoteDCmd::execute(DCmdSource source, TRAPS) { // management server // throw java.lang.NoSuchMethodError if method doesn't exist + loadAgentModule(CHECK); Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK); instanceKlassHandle ik (THREAD, k); @@ -864,6 +882,7 @@ void JMXStatusDCmd::execute(DCmdSource source, TRAPS) { // invoke getManagementAgentStatus() method to generate the status info // throw java.lang.NoSuchMethodError if method doesn't exist + loadAgentModule(CHECK); Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK); instanceKlassHandle ik (THREAD, k); diff --git a/hotspot/src/share/vm/services/lowMemoryDetector.cpp b/hotspot/src/share/vm/services/lowMemoryDetector.cpp index 33e1f45957b..f7553f562cc 100644 --- a/hotspot/src/share/vm/services/lowMemoryDetector.cpp +++ b/hotspot/src/share/vm/services/lowMemoryDetector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -296,19 +296,41 @@ void SensorInfo::trigger(int count, TRAPS) { Klass* k = Management::sun_management_Sensor_klass(CHECK); instanceKlassHandle sensorKlass (THREAD, k); Handle sensor_h(THREAD, _sensor_obj); - Handle usage_h = MemoryService::create_MemoryUsage_obj(_usage, CHECK); + + Symbol* trigger_method_signature; JavaValue result(T_VOID); JavaCallArguments args(sensor_h); args.push_int((int) count); - args.push_oop(usage_h); + + Handle usage_h = MemoryService::create_MemoryUsage_obj(_usage, THREAD); + // Call Sensor::trigger(int, MemoryUsage) to send notification to listeners. + // When OOME occurs and fails to allocate MemoryUsage object, call + // Sensor::trigger(int) instead. The pending request will be processed + // but no notification will be sent. + if (HAS_PENDING_EXCEPTION) { + assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOME here"); + CLEAR_PENDING_EXCEPTION; + trigger_method_signature = vmSymbols::int_void_signature(); + } else { + trigger_method_signature = vmSymbols::trigger_method_signature(); + args.push_oop(usage_h); + } JavaCalls::call_virtual(&result, - sensorKlass, - vmSymbols::trigger_name(), - vmSymbols::trigger_method_signature(), - &args, - CHECK); + sensorKlass, + vmSymbols::trigger_name(), + trigger_method_signature, + &args, + THREAD); + + if (HAS_PENDING_EXCEPTION) { + // We just clear the OOM pending exception that we might have encountered + // in Java's tiggerAction(), and continue with updating the counters since + // the Java counters have been updated too. + assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOME here"); + CLEAR_PENDING_EXCEPTION; + } } { diff --git a/hotspot/src/share/vm/shark/sharkIntrinsics.cpp b/hotspot/src/share/vm/shark/sharkIntrinsics.cpp index 51b813f4b8d..15b6679bf4e 100644 --- a/hotspot/src/share/vm/shark/sharkIntrinsics.cpp +++ b/hotspot/src/share/vm/shark/sharkIntrinsics.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -66,7 +66,7 @@ bool SharkIntrinsics::is_intrinsic(ciMethod *target) { return true; // Unsafe - case vmIntrinsics::_compareAndSwapInt: + case vmIntrinsics::_compareAndSetInt: return true; default: @@ -140,8 +140,8 @@ void SharkIntrinsics::do_intrinsic() { break; // Unsafe - case vmIntrinsics::_compareAndSwapInt: - do_Unsafe_compareAndSwapInt(); + case vmIntrinsics::_compareAndSetInt: + do_Unsafe_compareAndSetInt(); break; default: @@ -241,7 +241,7 @@ void SharkIntrinsics::do_Thread_currentThread() { true)); } -void SharkIntrinsics::do_Unsafe_compareAndSwapInt() { +void SharkIntrinsics::do_Unsafe_compareAndSetInt() { // Pop the arguments Value *x = state()->pop()->jint_value(); Value *e = state()->pop()->jint_value(); diff --git a/hotspot/src/share/vm/shark/sharkIntrinsics.hpp b/hotspot/src/share/vm/shark/sharkIntrinsics.hpp index f0699f8948e..8a5d60f17b9 100644 --- a/hotspot/src/share/vm/shark/sharkIntrinsics.hpp +++ b/hotspot/src/share/vm/shark/sharkIntrinsics.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -58,7 +58,7 @@ class SharkIntrinsics : public SharkTargetInvariants { void do_Object_getClass(); void do_System_currentTimeMillis(); void do_Thread_currentThread(); - void do_Unsafe_compareAndSwapInt(); + void do_Unsafe_compareAndSetInt(); }; #endif // SHARE_VM_SHARK_SHARKINTRINSICS_HPP diff --git a/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp b/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp index 53fea3154b8..b9ac6a3ebf5 100644 --- a/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp +++ b/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -300,6 +300,7 @@ void SharkNativeWrapper::initialize(const char *name) { not_null, merge); builder()->SetInsertPoint(not_null); +#error Needs to be updated for tagged jweak; see JNIHandles. Value *unboxed_result = builder()->CreateLoad(result); builder()->CreateBr(merge); diff --git a/hotspot/src/share/vm/utilities/debug.hpp b/hotspot/src/share/vm/utilities/debug.hpp index 3a4483e681e..dbb5dc63bfc 100644 --- a/hotspot/src/share/vm/utilities/debug.hpp +++ b/hotspot/src/share/vm/utilities/debug.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -140,6 +140,9 @@ do { \ // For backward compatibility. #define assert(p, ...) vmassert(p, __VA_ARGS__) +#ifndef ASSERT +#define vmassert_status(p, status, msg) +#else // This version of vmassert is for use with checking return status from // library calls that return actual error values eg. EINVAL, // ENOMEM etc, rather than returning -1 and setting errno. @@ -155,6 +158,7 @@ do { \ BREAKPOINT; \ } \ } while (0) +#endif // For backward compatibility. #define assert_status(p, status, msg) vmassert_status(p, status, msg) diff --git a/hotspot/src/share/vm/utilities/globalDefinitions.hpp b/hotspot/src/share/vm/utilities/globalDefinitions.hpp index e07ed31678d..dbb080ef6e3 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1095,8 +1095,11 @@ inline intptr_t bitfield(intptr_t x, int start_bit_no, int field_length) { #undef min #endif -#define max(a,b) Do_not_use_max_use_MAX2_instead -#define min(a,b) Do_not_use_min_use_MIN2_instead +// The following defines serve the purpose of preventing use of accidentally +// included min max macros from compiling, while continuing to allow innocent +// min and max identifiers in the code to compile as intended. +#define max max +#define min min // It is necessary to use templates here. Having normal overloaded // functions does not work because it is necessary to provide both 32- diff --git a/hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp b/hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp index 623a8cbe6cf..1b216359d4c 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 SAP SE. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. 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 @@ -153,6 +153,9 @@ inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); } // offset_of as it is defined for gcc. #define offset_of(klass,field) (size_t)((intx)&(((klass*)16)->field) - 16) +// AIX 5.3 has buggy __thread support. (see JDK-8176442). +#define USE_LIBRARY_BASED_TLS_ONLY 1 + #ifndef USE_LIBRARY_BASED_TLS_ONLY #define THREAD_LOCAL_DECL __thread #endif diff --git a/hotspot/src/share/vm/utilities/hashtable.cpp b/hotspot/src/share/vm/utilities/hashtable.cpp index f5d37f45fa9..5fce98e2694 100644 --- a/hotspot/src/share/vm/utilities/hashtable.cpp +++ b/hotspot/src/share/vm/utilities/hashtable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -173,6 +173,35 @@ template void BasicHashtable::reverse() { } } +template void BasicHashtable::BucketUnlinkContext::free_entry(BasicHashtableEntry* entry) { + entry->set_next(_removed_head); + _removed_head = entry; + if (_removed_tail == NULL) { + _removed_tail = entry; + } + _num_removed++; +} + +template void BasicHashtable::bulk_free_entries(BucketUnlinkContext* context) { + if (context->_num_removed == 0) { + assert(context->_removed_head == NULL && context->_removed_tail == NULL, + "Zero entries in the unlink context, but elements linked from " PTR_FORMAT " to " PTR_FORMAT, + p2i(context->_removed_head), p2i(context->_removed_tail)); + return; + } + + // MT-safe add of the list of BasicHashTableEntrys from the context to the free list. + BasicHashtableEntry* current = _free_list; + while (true) { + context->_removed_tail->set_next(current); + BasicHashtableEntry* old = (BasicHashtableEntry*)Atomic::cmpxchg_ptr(context->_removed_head, &_free_list, current); + if (old == current) { + break; + } + current = old; + } + Atomic::add(-context->_num_removed, &_number_of_entries); +} // Copy the table to the shared space. diff --git a/hotspot/src/share/vm/utilities/hashtable.hpp b/hotspot/src/share/vm/utilities/hashtable.hpp index 51324a18c62..76e8005c260 100644 --- a/hotspot/src/share/vm/utilities/hashtable.hpp +++ b/hotspot/src/share/vm/utilities/hashtable.hpp @@ -173,11 +173,11 @@ private: // Instance variables int _table_size; HashtableBucket* _buckets; - BasicHashtableEntry* _free_list; + BasicHashtableEntry* volatile _free_list; char* _first_free_entry; char* _end_block; int _entry_size; - int _number_of_entries; + volatile int _number_of_entries; protected: @@ -225,6 +225,24 @@ protected: // Free the buckets in this hashtable void free_buckets(); + // Helper data structure containing context for the bucket entry unlink process, + // storing the unlinked buckets in a linked list. + // Also avoids the need to pass around these four members as parameters everywhere. + struct BucketUnlinkContext { + int _num_processed; + int _num_removed; + // Head and tail pointers for the linked list of removed entries. + BasicHashtableEntry* _removed_head; + BasicHashtableEntry* _removed_tail; + + BucketUnlinkContext() : _num_processed(0), _num_removed(0), _removed_head(NULL), _removed_tail(NULL) { + } + + void free_entry(BasicHashtableEntry* entry); + }; + // Add of bucket entries linked together in the given context to the global free list. This method + // is mt-safe wrt. to other calls of this method. + void bulk_free_entries(BucketUnlinkContext* context); public: int table_size() { return _table_size; } void set_entry(int index, BasicHashtableEntry* entry); diff --git a/hotspot/test/ProblemList.txt b/hotspot/test/ProblemList.txt index bf6811efb15..8101e62a587 100644 --- a/hotspot/test/ProblemList.txt +++ b/hotspot/test/ProblemList.txt @@ -64,21 +64,20 @@ gc/g1/logging/TestG1LoggingFailure.java 8169634 generic-all runtime/CompressedOops/UseCompressedOops.java 8079353 generic-all # This test is disabled since it will stress NMT and timeout during normal testing runtime/NMT/MallocStressTest.java 8166548 generic-all -runtime/SharedArchiveFile/BootAppendTests.java 8150683 generic-all +runtime/SharedArchiveFile/BootAppendTests.java 8179103 generic-all runtime/SharedArchiveFile/DefaultUseWithClient.java 8154204 generic-all ############################################################################# # :hotspot_serviceability -serviceability/jdwp/AllModulesCommandTest.java 8168478 generic-all +serviceability/jdwp/AllModulesCommandTest.java 8170541 generic-all serviceability/sa/sadebugd/SADebugDTest.java 8163805 generic-all +serviceability/jvmti/ModuleAwareAgents/ClassFileLoadHook/MAAClassFileLoadHook.java 8173936 generic-all ############################################################################# # :hotspot_misc -testlibrary_tests/ctw/JarDirTest.java 8172457 windows-all - ############################################################################# diff --git a/hotspot/test/TEST.ROOT b/hotspot/test/TEST.ROOT index 54b61ac1406..fabc5e42672 100644 --- a/hotspot/test/TEST.ROOT +++ b/hotspot/test/TEST.ROOT @@ -50,8 +50,8 @@ requires.properties= \ vm.cpu.features \ vm.debug -# Tests using jtreg 4.2 b04 features -requiredVersion=4.2 b04 +# Tests using jtreg 4.2 b07 features +requiredVersion=4.2 b07 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../ notation to reach them @@ -59,3 +59,6 @@ external.lib.roots = ../../ # Use new module options useNewOptions=true + +# Use --patch-module instead of -Xmodule: +useNewPatchModule=true diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSearchTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSearchTest.java index b212fc3139c..18983b351c6 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSearchTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSearchTest.java @@ -20,10 +20,19 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * @run junit/othervm jdk.tools.jaotc.test.collect.ClassSearchTest + */ + package jdk.tools.jaotc.test.collect; import jdk.tools.jaotc.LoadedClass; +import jdk.tools.jaotc.collect.*; import org.junit.Assert; import org.junit.Test; @@ -32,45 +41,90 @@ import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.function.BiConsumer; +import java.util.function.BiFunction; public class ClassSearchTest { @Test(expected = InternalError.class) public void itShouldThrowExceptionIfNoProvidersAvailable() { ClassSearch target = new ClassSearch(); SearchPath searchPath = new SearchPath(); - target.search(list("foo"), searchPath); + target.search(list(new SearchFor("foo")), searchPath); } @Test public void itShouldFindAProviderForEachEntry() { Set searched = new HashSet<>(); ClassSearch target = new ClassSearch(); - target.addProvider(new SourceProvider() { - @Override - public ClassSource findSource(String name, SearchPath searchPath) { + target.addProvider(provider("", (name, searchPath) -> { searched.add(name); return new NoopSource(); - } - }); - target.search(list("foo", "bar", "foobar"), null); + })); + target.search(searchForList("foo", "bar", "foobar"), null); Assert.assertEquals(hashset("foo", "bar", "foobar"), searched); } + private SourceProvider provider(String supports, BiFunction fn) { + return new SourceProvider() { + @Override + public ClassSource findSource(String name, SearchPath searchPath) { + return fn.apply(name, searchPath); + } + + @Override + public boolean supports(String type) { + return supports.equals(type); + } + }; + } + @Test - public void itShouldSearchAllProviders() { + public void itShouldOnlySearchSupportedProvidersForKnownType() { Set visited = new HashSet<>(); ClassSearch target = new ClassSearch(); - target.addProvider((name, searchPath) -> { - visited.add("1"); + + target.addProvider(provider("jar", (name, searchPath) -> { + visited.add("jar"); return null; - }); - target.addProvider((name, searchPath) -> { - visited.add("2"); + })); + + target.addProvider(provider("dir", (name, searchPath) -> { + visited.add("dir"); return null; - }); + })); try { - target.search(list("foo"), null); + target.search(list(new SearchFor("some", "dir")), null); + } catch (InternalError e) { + // throws because no provider gives a source + } + + Assert.assertEquals(hashset("dir"), visited); + } + + @Test(expected = InternalError.class) + public void itShouldThrowErrorIfMultipleSourcesAreAvailable() { + ClassSearch target = new ClassSearch(); + target.addProvider(provider("", (name, searchPath) -> consumer -> Assert.fail())); + target.addProvider(provider("", (name, searchPath) -> consumer -> Assert.fail())); + + target.search(searchForList("somethign"), null); + } + + @Test + public void itShouldSearchAllProvidersForUnknownType() { + Set visited = new HashSet<>(); + ClassSearch target = new ClassSearch(); + target.addProvider(provider("", (name, searchPath) -> { + visited.add("1"); + return null; + })); + target.addProvider(provider("", (name, searchPath) -> { + visited.add("2"); + return null; + })); + + try { + target.search(searchForList("foo"), null); } catch (InternalError e) { // throws because no provider gives a source } @@ -84,6 +138,11 @@ public class ClassSearchTest { ClassSearch target = new ClassSearch(); target.addProvider(new SourceProvider() { + @Override + public boolean supports(String type) { + return true; + } + @Override public ClassSource findSource(String name, SearchPath searchPath) { return new ClassSource() { @@ -101,7 +160,7 @@ public class ClassSearchTest { } }); - java.util.List search = target.search(list("/tmp/something"), null); + java.util.List search = target.search(searchForList("/tmp/something"), null); Assert.assertEquals(list(new LoadedClass("foo.Bar", null)), search); } @@ -115,8 +174,16 @@ public class ClassSearchTest { }; ClassSearch target = new ClassSearch(); - target.addProvider((name, searchPath) -> consumer -> consumer.accept("foo.Bar", classLoader)); - target.search(list("foobar"), null); + target.addProvider(provider("", (name, searchPath) -> consumer -> consumer.accept("foo.Bar", classLoader))); + target.search(searchForList("foobar"), null); + } + + private List searchForList(String... entries) { + List list = new ArrayList<>(); + for (String entry : entries) { + list.add(new SearchFor(entry)); + } + return list; } private List list(T... entries) { diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSourceTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSourceTest.java index 5fad5f57d76..ac9b8c9d12a 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSourceTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSourceTest.java @@ -20,6 +20,14 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * @run junit/othervm jdk.tools.jaotc.test.collect.ClassSourceTest + */ + package jdk.tools.jaotc.test.collect; import org.junit.Assert; diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeFileSupport.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeFileSupport.java index 178c3d47353..0e9011ac4f3 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeFileSupport.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeFileSupport.java @@ -27,6 +27,8 @@ import java.nio.file.Path; import java.util.HashSet; import java.util.Set; +import jdk.tools.jaotc.collect.FileSupport; + public class FakeFileSupport extends FileSupport { private final Set exists = new HashSet<>(); private final Set directories = new HashSet<>(); diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeSearchPath.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeSearchPath.java index 9a7873ccf96..899d89f6228 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeSearchPath.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeSearchPath.java @@ -22,6 +22,8 @@ */ package jdk.tools.jaotc.test.collect; +import jdk.tools.jaotc.collect.SearchPath; + import java.nio.file.FileSystem; import java.nio.file.Path; import java.nio.file.Paths; diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/SearchPathTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/SearchPathTest.java index 8ceca8dc5cf..f3d3f56051d 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/SearchPathTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/SearchPathTest.java @@ -20,6 +20,17 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * + * @build jdk.tools.jaotc.test.collect.Utils + * @build jdk.tools.jaotc.test.collect.FakeFileSupport + * @run junit/othervm jdk.tools.jaotc.test.collect.SearchPathTest + */ + package jdk.tools.jaotc.test.collect; import org.junit.Before; @@ -30,6 +41,8 @@ import java.nio.file.FileSystems; import java.nio.file.Path; import java.nio.file.Paths; +import jdk.tools.jaotc.collect.*; + import static jdk.tools.jaotc.test.collect.Utils.set; import static org.junit.Assert.*; diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/directory/DirectorySourceProviderTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/directory/DirectorySourceProviderTest.java index 6608c01ab50..66ed4e234e2 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/directory/DirectorySourceProviderTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/directory/DirectorySourceProviderTest.java @@ -21,11 +21,22 @@ * questions. */ +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * jdk.aot/jdk.tools.jaotc.collect.directory + * @compile ../Utils.java + * @compile ../FakeFileSupport.java + * @run junit/othervm jdk.tools.jaotc.test.collect.directory.DirectorySourceProviderTest + */ + package jdk.tools.jaotc.test.collect.directory; import jdk.tools.jaotc.collect.ClassSource; +import jdk.tools.jaotc.collect.directory.DirectorySourceProvider; import jdk.tools.jaotc.test.collect.FakeFileSupport; -import jdk.tools.jaotc.test.collect.FileSupport; +import jdk.tools.jaotc.collect.FileSupport; import org.junit.Assert; import org.junit.Test; diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/jar/JarSourceProviderTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/jar/JarSourceProviderTest.java index 14059883538..a6b687fdad4 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/jar/JarSourceProviderTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/jar/JarSourceProviderTest.java @@ -20,9 +20,23 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * jdk.aot/jdk.tools.jaotc.collect.jar + * @compile ../Utils.java + * @compile ../FakeFileSupport.java + * @compile ../FakeSearchPath.java + * + * @run junit/othervm jdk.tools.jaotc.test.collect.jar.JarSourceProviderTest + */ + package jdk.tools.jaotc.test.collect.jar; import jdk.tools.jaotc.collect.ClassSource; +import jdk.tools.jaotc.collect.jar.JarSourceProvider; import jdk.tools.jaotc.test.collect.FakeFileSupport; import jdk.tools.jaotc.test.collect.FakeSearchPath; import org.junit.Assert; diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/module/ModuleSourceProviderTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/module/ModuleSourceProviderTest.java index 80f06913269..b8a44041b19 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/module/ModuleSourceProviderTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/module/ModuleSourceProviderTest.java @@ -20,15 +20,31 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * jdk.aot/jdk.tools.jaotc.collect.module + * @compile ../Utils.java + * @run junit/othervm jdk.tools.jaotc.test.collect.module.ModuleSourceProviderTest + */ + package jdk.tools.jaotc.test.collect.module; -import jdk.tools.jaotc.*; -import jdk.tools.jaotc.test.collect.FakeSearchPath; +import jdk.tools.jaotc.collect.FileSupport; +import jdk.tools.jaotc.collect.module.ModuleSource; +import jdk.tools.jaotc.collect.module.ModuleSourceProvider; import jdk.tools.jaotc.test.collect.Utils; import org.junit.Before; import org.junit.Test; +import java.io.IOException; +import java.nio.file.FileSystem; import java.nio.file.FileSystems; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.function.BiFunction; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -36,28 +52,42 @@ import static org.junit.Assert.assertNull; public class ModuleSourceProviderTest { private ClassLoader classLoader; private ModuleSourceProvider target; + private FileSupport fileSupport; + private BiFunction getSubDirectory = null; @Before public void setUp() { classLoader = new FakeClassLoader(); - target = new ModuleSourceProvider(FileSystems.getDefault(), classLoader); + fileSupport = new FileSupport() { + + @Override + public boolean isDirectory(Path path) { + return true; + } + + @Override + public Path getSubDirectory(FileSystem fileSystem, Path root, Path path) throws IOException { + if (getSubDirectory == null) { + throw new IOException("Nope"); + } + return getSubDirectory.apply(root, path); + } + }; + target = new ModuleSourceProvider(FileSystems.getDefault(), classLoader, fileSupport); } @Test - public void itShouldUseSearchPath() { - FakeSearchPath searchPath = new FakeSearchPath("blah/java.base"); - ModuleSource source = (ModuleSource) target.findSource("java.base", searchPath); - assertEquals(Utils.set("java.base"), searchPath.entries); - assertEquals("blah/java.base", source.getModulePath().toString()); - assertEquals("module:blah/java.base", source.toString()); - } + public void itShouldUseFileSupport() { + getSubDirectory = (root, path) -> { + if (root.toString().equals("modules") && path.toString().equals("test.module")) { + return Paths.get("modules/test.module"); + } + return null; + }; - @Test - public void itShouldReturnNullIfSearchPathReturnsNull() { - FakeSearchPath searchPath = new FakeSearchPath(null); - ModuleSource source = (ModuleSource) target.findSource("jdk.base", searchPath); - assertEquals(Utils.set("jdk.base"), searchPath.entries); - assertNull(source); + ModuleSource source = (ModuleSource) target.findSource("test.module", null); + assertEquals("modules/test.module", source.getModulePath().toString()); + assertEquals("module:modules/test.module", source.toString()); } private static class FakeClassLoader extends ClassLoader { diff --git a/hotspot/test/compiler/arraycopy/TestACSameSrcDst.java b/hotspot/test/compiler/arraycopy/TestACSameSrcDst.java new file mode 100644 index 00000000000..f85bcf27d74 --- /dev/null +++ b/hotspot/test/compiler/arraycopy/TestACSameSrcDst.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2017, Red Hat, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8179678 + * @summary ArrayCopy with same src and dst can cause incorrect execution or compiler crash + * + * @run main/othervm -XX:CompileCommand=compileonly,TestACSameSrcDst::test* TestACSameSrcDst + * + */ + +public class TestACSameSrcDst { + + static int test1(int[] src, int[] dst) { + System.arraycopy(src, 5, dst, 0, 10); + // this shouldn't be transformed to src[5] because the copy + // can modify src[5] if src and dst are the same. + return dst[0]; + } + + static int test2(int[] src) { + System.arraycopy(src, 0, src, 0, 10); + // same source and destination. If load from destination is + // transformed to load of source, the compiler performs that + // optimization in an infinite loop. + return src[0]; + } + + static int test3() { + int[] src = new int[15]; + src[5] = 0x42; + System.arraycopy(src, 5, src, 0, 10); + // That load can't bypass the arraycopy + return src[0]; + } + + static int test4() { + int[] src = new int[15]; + System.arraycopy(src, 0, src, 5, 10); + return src[0]; + } + + // The dst[0] load can't bypass the arraycopy. After ArrayCopyNode + // is expanded, C2 looks for a stub call on the control paths of + // the array copy subgraph to decide whether the load's memory + // input can bypass the arraycopy. This test verifies the case of + // a source array that's not declared as an array. + static int test5(Object src, int l, boolean flag) { + int[] dst = new int[10]; + if (flag) { + dst[0] = 0x42; + System.arraycopy(src, 0, dst, 0, l); + return dst[0]; + } + return 0; + } + + public static void main(String[] args) { + int[] array = new int[15]; + for (int i = 0; i < 20000; i++) { + int res; + for (int j = 0; j < array.length; j++) { + array[j] = j; + } + int expected = array[5]; + res = test1(array, array); + if (res != expected) { + throw new RuntimeException("bad result: " + res + " != " + expected); + } + test2(array); + res = test3(); + if (res != 0x42) { + throw new RuntimeException("bad result: " + res + " != " + 0x42); + } + test4(); + for (int j = 0; j < array.length; j++) { + array[j] = j; + } + res = test5(array, 10, (i%2) == 0); + if (res != 0) { + throw new RuntimeException("bad result: " + res + " != " + 0); + } + } + } +} diff --git a/hotspot/test/compiler/arraycopy/TestDefaultMethodArrayCloneDeoptC2.java b/hotspot/test/compiler/arraycopy/TestDefaultMethodArrayCloneDeoptC2.java new file mode 100644 index 00000000000..c4100ad2f80 --- /dev/null +++ b/hotspot/test/compiler/arraycopy/TestDefaultMethodArrayCloneDeoptC2.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8170455 + * @summary C2: Access to [].clone from interfaces fails. + * @library /test/lib / + * + * @requires vm.flavor == "server" & !vm.emulatedClient + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xcomp -Xbatch -Xbootclasspath/a:. -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -XX:CompileCommand=compileonly,*TestDefaultMethodArrayCloneDeoptC2Interface::test + * compiler.arraycopy.TestDefaultMethodArrayCloneDeoptC2 + */ + +package compiler.arraycopy; + +import sun.hotspot.WhiteBox; +import java.lang.reflect.Method; +import compiler.whitebox.CompilerWhiteBoxTest; + + + +interface TestDefaultMethodArrayCloneDeoptC2Interface { + default int[] test(int[] arr) { + return arr.clone(); + } + + default TDMACDC2InterfaceTypeTest[] test(TDMACDC2InterfaceTypeTest[] arr) { + return arr.clone(); + } + + default TDMACDC2ClassTypeTest[] test(TDMACDC2ClassTypeTest[] arr) { + return arr.clone(); + } +} + +public class TestDefaultMethodArrayCloneDeoptC2 implements TestDefaultMethodArrayCloneDeoptC2Interface { + private static final WhiteBox WB = WhiteBox.getWhiteBox(); + public static TestDefaultMethodArrayCloneDeoptC2 a = new TestDefaultMethodArrayCloneDeoptC2(); + + public static void main(String[] args) throws Exception { + testPrimitiveArr(); + testIntfArr(); + testClassArr(); + } + + public static void testPrimitiveArr() throws Exception { + Method m = TestDefaultMethodArrayCloneDeoptC2Interface.class.getMethod("test", int[].class); + a.test(new int[1]); // Compiled + a.test(new int[1]); + if (!WB.isMethodCompiled(m)) { + WB.enqueueMethodForCompilation(m, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION); + } + a.test(new int[1]); + if (!WB.isMethodCompiled(m)) { + throw new Exception("Method should be compiled"); + } + } + + public static void testIntfArr() throws Exception { + Method m = TestDefaultMethodArrayCloneDeoptC2Interface.class.getMethod("test", TDMACDC2InterfaceTypeTest[].class); + a.test(new TDMACDC2InterfaceTypeTest[1]); // Compiled, Decompile unloaded + a.test(new TDMACDC2InterfaceTypeTest[1]); // Compiled + a.test(new TDMACDC2InterfaceTypeTest[1]); + if (!WB.isMethodCompiled(m)) { + WB.enqueueMethodForCompilation(m, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION); + } + a.test(new TDMACDC2InterfaceTypeTest[1]); + if (!WB.isMethodCompiled(m)) { + throw new Exception("Method should be compiled"); + } + } + + public static void testClassArr() throws Exception { + Method m = TestDefaultMethodArrayCloneDeoptC2Interface.class.getMethod("test", TDMACDC2ClassTypeTest[].class); + a.test(new TDMACDC2ClassTypeTest[1]); // Compiled, Decompile unloaded + a.test(new TDMACDC2ClassTypeTest[1]); // Compiled + a.test(new TDMACDC2ClassTypeTest[1]); + if (!WB.isMethodCompiled(m)) { + WB.enqueueMethodForCompilation(m, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION); + } + a.test(new TDMACDC2ClassTypeTest[1]); + if (!WB.isMethodCompiled(m)) { + throw new Exception("Method should be compiled"); + } + } +} + +interface TDMACDC2InterfaceTypeTest { +} + +class TDMACDC2ClassTypeTest { +} + diff --git a/hotspot/test/compiler/arraycopy/TestLoadBypassACWithWrongMem.java b/hotspot/test/compiler/arraycopy/TestLoadBypassACWithWrongMem.java new file mode 100644 index 00000000000..14670002614 --- /dev/null +++ b/hotspot/test/compiler/arraycopy/TestLoadBypassACWithWrongMem.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2017, Red Hat, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8181742 + * @summary Loads that bypass arraycopy ends up with wrong memory state + * + * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+StressGCM -XX:+StressLCM TestLoadBypassACWithWrongMem + * + */ + +import java.util.Arrays; + +public class TestLoadBypassACWithWrongMem { + + static int test1(int[] src) { + int[] dst = new int[10]; + System.arraycopy(src, 0, dst, 0, 10); + src[1] = 0x42; + // dst[1] is transformed to src[1], src[1] must use the + // correct memory state (not the store above). + return dst[1]; + } + + static int test2(int[] src) { + int[] dst = (int[])src.clone(); + src[1] = 0x42; + // Same as above for clone + return dst[1]; + } + + static Object test5_src = null; + static int test3() { + int[] dst = new int[10]; + System.arraycopy(test5_src, 0, dst, 0, 10); + ((int[])test5_src)[1] = 0x42; + System.arraycopy(test5_src, 0, dst, 0, 10); + // dst[1] is transformed to test5_src[1]. test5_src is Object + // but test5_src[1] must be on the slice for int[] not + // Object+some offset. + return dst[1]; + } + + static public void main(String[] args) { + int[] src = new int[10]; + for (int i = 0; i < 20000; i++) { + Arrays.fill(src, 0); + int res = test1(src); + if (res != 0) { + throw new RuntimeException("bad result: " + res + " != " + 0); + } + Arrays.fill(src, 0); + res = test2(src); + if (res != 0) { + throw new RuntimeException("bad result: " + res + " != " + 0); + } + Arrays.fill(src, 0); + test5_src = src; + res = test3(); + if (res != 0x42) { + throw new RuntimeException("bad result: " + res + " != " + 0x42); + } + } + } +} diff --git a/hotspot/test/compiler/arraycopy/TestObjectArrayCopy.java b/hotspot/test/compiler/arraycopy/TestObjectArrayCopy.java new file mode 100644 index 00000000000..0cc8475692b --- /dev/null +++ b/hotspot/test/compiler/arraycopy/TestObjectArrayCopy.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2017, SAP SE and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8176505 + * @summary Wrong assertion 'should be an array copy/clone' in arraycopynode.cpp + * + * @run main/othervm -Xbatch -XX:-UseOnStackReplacement compiler.arraycopy.TestObjectArrayCopy + * + * @author Volker Simonis + */ + +package compiler.arraycopy; + +public class TestObjectArrayCopy { + + public static boolean crash(Object src) { + String[] dst = new String[1]; + System.arraycopy(src, 0, dst, 0, 1); + return dst[0] == null; + } + + public static void main(String[] args) { + String[] sa = new String[1]; + for (int i = 0; i < 20_000; i++) { + crash(sa); + } + } +} diff --git a/hotspot/test/compiler/c1/MultiplyByMaxInt.java b/hotspot/test/compiler/c1/MultiplyByMaxInt.java new file mode 100644 index 00000000000..f03c2dce199 --- /dev/null +++ b/hotspot/test/compiler/c1/MultiplyByMaxInt.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8181872 + * + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions + * -XX:CompileThreshold=100 -XX:+TieredCompilation -XX:TieredStopAtLevel=1 + * -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,compiler.c1.MultiplyByMaxInt::test + * compiler.c1.MultiplyByMaxInt + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-BackgroundCompilation + * -XX:CompileThreshold=100 -XX:+TieredCompilation -XX:TieredStopAtLevel=3 + * -XX:CompileCommand=dontinline,compiler.c1.MultiplyByMaxInt::test + * compiler.c1.MultiplyByMaxInt + */ +package compiler.c1; + +public class MultiplyByMaxInt { + static int test(int x) { + int loops = (x >>> 4) & 7; + while (loops-- > 0) { + x = (x * 2147483647) % 16807; + } + return x; + } + + public static void main(String[] args) { + for (int i = 0; i < 20000; i++) { + test(i); + } + } +} diff --git a/hotspot/test/compiler/c1/TestUnresolvedField.jasm b/hotspot/test/compiler/c1/TestUnresolvedField.jasm new file mode 100644 index 00000000000..e6c2ae4de2b --- /dev/null +++ b/hotspot/test/compiler/c1/TestUnresolvedField.jasm @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +public class compiler/c1/TestUnresolvedField version 52:0 { + public static Method testGetField:"()V" stack 1 locals 1 { + aconst_null; + getfield Field T.f:I; // T does not exist + return; + } + + public static Method testPutField:"()V" stack 2 locals 1 { + aconst_null; + iconst_0; + putfield Field T.f:I; // T does not exist + return; + } +} diff --git a/jdk/test/sun/security/krb5/auto/BadKdc3.java b/hotspot/test/compiler/c1/TestUnresolvedFieldMain.java similarity index 61% rename from jdk/test/sun/security/krb5/auto/BadKdc3.java rename to hotspot/test/compiler/c1/TestUnresolvedFieldMain.java index 4bafd9a2ffe..040f1b17be6 100644 --- a/jdk/test/sun/security/krb5/auto/BadKdc3.java +++ b/hotspot/test/compiler/c1/TestUnresolvedFieldMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,28 +23,26 @@ /* * @test - * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc3 - * @summary krb5 should not try to access unavailable kdc too often + * @bug 8173373 + * @compile TestUnresolvedField.jasm + * @run main/othervm -XX:TieredStopAtLevel=1 -Xcomp + * -XX:CompileCommand=compileonly,compiler.c1.TestUnresolvedField::test* + * compiler.c1.TestUnresolvedFieldMain */ -import java.io.*; -import java.security.Security; +package compiler.c1; -public class BadKdc3 { - - public static void main(String[] args) - throws Exception { - Security.setProperty("krb5.kdc.bad.policy", "tryLast"); - BadKdc.go( - "121212222222(32){2,4}", // 1 2 - "(32){2,4}", // 1 2 - // refresh - "121212222222(32){2,4}", // 1 2 - // k3 off k2 on - "323232121212(22){2,4}", // 1 3 - // k1 on - "(22){2,4}" // 1 3 - ); +public class TestUnresolvedFieldMain { + public static void main(String[] args) { + try { + TestUnresolvedField.testGetField(); + } catch (java.lang.NoClassDefFoundError error) { + // Expected + } + try { + TestUnresolvedField.testPutField(); + } catch (java.lang.NoClassDefFoundError error) { + // Expected + } } } diff --git a/hotspot/test/compiler/c1/UnsafeVolatileGuardTest.java b/hotspot/test/compiler/c1/UnsafeVolatileGuardTest.java new file mode 100644 index 00000000000..b10c4a6285c --- /dev/null +++ b/hotspot/test/compiler/c1/UnsafeVolatileGuardTest.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2017, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.lang.reflect.Field; + +/** + * @test + * @bug 8175887 + * @summary C1 value numbering handling of Unsafe.get*Volatile is incorrect + * @modules java.base/jdk.internal.misc + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:TieredStopAtLevel=1 UnsafeVolatileGuardTest + */ +public class UnsafeVolatileGuardTest { + volatile static private int a; + static private int b; + + static final jdk.internal.misc.Unsafe UNSAFE = jdk.internal.misc.Unsafe.getUnsafe(); + + static final Object BASE; + static final long OFFSET; + + static { + try { + Field f = UnsafeVolatileGuardTest.class.getDeclaredField("a"); + BASE = UNSAFE.staticFieldBase(f); + OFFSET = UNSAFE.staticFieldOffset(f); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + static void test() { + int tt = b; // makes the JVM CSE the value of b + + while (UNSAFE.getIntVolatile(BASE, OFFSET) == 0) {} // burn + if (b == 0) { + System.err.println("wrong value of b"); + System.exit(1); // fail hard to report the error + } + } + + public static void main(String [] args) throws Exception { + for (int i = 0; i < 10; i++) { + new Thread(UnsafeVolatileGuardTest::test).start(); + } + b = 1; + a = 1; + } +} diff --git a/jdk/test/demo/jvmti/waiters/WaitersTest.java b/hotspot/test/compiler/c1/VolatileGuardTest.java similarity index 55% rename from jdk/test/demo/jvmti/waiters/WaitersTest.java rename to hotspot/test/compiler/c1/VolatileGuardTest.java index 323615414a7..44b603160ad 100644 --- a/jdk/test/demo/jvmti/waiters/WaitersTest.java +++ b/hotspot/test/compiler/c1/VolatileGuardTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,32 +21,32 @@ * questions. */ - -/* @test - * @bug 5027764 - * @summary Test jvmti demo waiters +/** + * @test + * @bug 8175887 + * @summary C1 doesn't respect the JMM with volatile field loads * - * @compile ../DemoRun.java - * @compile ../Context.java - * @build WaitersTest - * @run main WaitersTest Context + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:TieredStopAtLevel=1 VolatileGuardTest */ +public class VolatileGuardTest { + volatile static private int a; + static private int b; -public class WaitersTest { + static void test() { + int tt = b; // makes the JVM CSE the value of b - public static void main(String args[]) throws Exception { - DemoRun demo; - - /* Run demo that uses JVMTI waiters agent (no options) */ - demo = new DemoRun("waiters", "" /* options to waiters */ ); - demo.runit(args[0]); - - /* Make sure patterns in output look ok */ - if (demo.output_contains("ERROR")) { - throw new RuntimeException("Test failed - ERROR seen in output"); + while (a == 0) {} // burn + if (b == 0) { + System.err.println("wrong value of b"); + System.exit(1); // fail hard to report the error } + } - /* Must be a pass. */ - System.out.println("Test passed - cleanly terminated"); + public static void main(String [] args) throws Exception { + for (int i = 0; i < 10; i++) { + new Thread(VolatileGuardTest::test).start(); + } + b = 1; + a = 1; } } diff --git a/hotspot/test/compiler/c2/TestNPEHeapBased.java b/hotspot/test/compiler/c2/TestNPEHeapBased.java new file mode 100644 index 00000000000..0fdb5d3da37 --- /dev/null +++ b/hotspot/test/compiler/c2/TestNPEHeapBased.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017 SAP SE. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8176518 + * @summary Invalid ImplicitNullChecks when heap base not protected + * + * @run main/othervm -XX:ObjectAlignmentInBytes=16 -XX:HeapBaseMinAddress=64g + * -XX:-TieredCompilation -Xbatch + * compiler.c2.TestNPEHeapBased + * @requires vm.bits == "64" + */ + +package compiler.c2; +public class TestNPEHeapBased { + + TestNPEHeapBased instance = null; + int i = 0; + + public void set_i(int value) { + instance.i = value; + } + + + static final int loop_cnt = 200000; + + public static void main(String args[]){ + TestNPEHeapBased xyz = new TestNPEHeapBased(); + xyz.instance = xyz; + for (int x = 0; x < loop_cnt; x++) xyz.set_i(x); + xyz.instance = null; + try { + xyz.set_i(0); + } catch (NullPointerException npe) { + System.out.println("Got expected NullPointerException:"); + npe.printStackTrace(); + return; + } + throw new InternalError("NullPointerException is missing!"); + } + +} diff --git a/hotspot/test/compiler/c2/TestReplacedNodesOSR.java b/hotspot/test/compiler/c2/TestReplacedNodesOSR.java new file mode 100644 index 00000000000..926295e496e --- /dev/null +++ b/hotspot/test/compiler/c2/TestReplacedNodesOSR.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2017, Red Hat, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8174164 + * @summary SafePointNode::_replaced_nodes breaks with irreducible loops + * @run main/othervm -XX:-BackgroundCompilation TestReplacedNodesOSR + * + */ + +public class TestReplacedNodesOSR { + + static Object dummy; + + static interface I { + } + + static class A implements I { + } + + static final class MyException extends Exception { + } + + static final A obj = new A(); + static I static_field() { return obj; } + + // When OSR compiled, this method has an irreducible loop + static void test(int v, MyException e) { + int i = 0; + for (;;) { + if (i == 1000) { + break; + } + try { + if ((i%2) == 0) { + int j = 0; + for (;;) { + j++; + if (i+j != v) { + if (j == 1000) { + break; + } + } else { + A a = (A)static_field(); + // replaced node recorded here + throw e; + } + } + } + } catch(MyException ex) { + } + i++; + // replaced node applied on return of the method + // replaced node used here + dummy = static_field(); + } + } + + + static public void main(String[] args) { + for (int i = 0; i < 1000; i++) { + test(1100, new MyException()); + } + } +} diff --git a/hotspot/test/compiler/c2/cr8004867/TestIntUnsafeCAS.java b/hotspot/test/compiler/c2/cr8004867/TestIntUnsafeCAS.java index f7838dd6c97..e0c43b05529 100644 --- a/hotspot/test/compiler/c2/cr8004867/TestIntUnsafeCAS.java +++ b/hotspot/test/compiler/c2/cr8004867/TestIntUnsafeCAS.java @@ -773,221 +773,221 @@ public class TestIntUnsafeCAS { static void test_ci(int[] a) { for (int i = 0; i < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), -1, -123); + unsafe.compareAndSetInt(a, byte_offset(i), -1, -123); } } static void test_vi(int[] a, int b, int old) { for (int i = 0; i < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), old, b); + unsafe.compareAndSetInt(a, byte_offset(i), old, b); } } static void test_cp(int[] a, int[] b) { for (int i = 0; i < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), -123, b[i]); + unsafe.compareAndSetInt(a, byte_offset(i), -123, b[i]); } } static void test_2ci(int[] a, int[] b) { for (int i = 0; i < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), 123, -123); - unsafe.compareAndSwapInt(b, byte_offset(i), 123, -103); + unsafe.compareAndSetInt(a, byte_offset(i), 123, -123); + unsafe.compareAndSetInt(b, byte_offset(i), 123, -103); } } static void test_2vi(int[] a, int[] b, int c, int d) { for (int i = 0; i < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), -123, c); - unsafe.compareAndSwapInt(b, byte_offset(i), -103, d); + unsafe.compareAndSetInt(a, byte_offset(i), -123, c); + unsafe.compareAndSetInt(b, byte_offset(i), -103, d); } } static void test_ci_neg(int[] a, int old) { for (int i = ARRLEN-1; i >= 0; i-=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), old, -123); + unsafe.compareAndSetInt(a, byte_offset(i), old, -123); } } static void test_vi_neg(int[] a, int b, int old) { for (int i = ARRLEN-1; i >= 0; i-=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), old, b); + unsafe.compareAndSetInt(a, byte_offset(i), old, b); } } static void test_cp_neg(int[] a, int[] b) { for (int i = ARRLEN-1; i >= 0; i-=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), -123, b[i]); + unsafe.compareAndSetInt(a, byte_offset(i), -123, b[i]); } } static void test_2ci_neg(int[] a, int[] b) { for (int i = ARRLEN-1; i >= 0; i-=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), 123, -123); - unsafe.compareAndSwapInt(b, byte_offset(i), 123, -103); + unsafe.compareAndSetInt(a, byte_offset(i), 123, -123); + unsafe.compareAndSetInt(b, byte_offset(i), 123, -103); } } static void test_2vi_neg(int[] a, int[] b, int c, int d) { for (int i = ARRLEN-1; i >= 0; i-=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), -123, c); - unsafe.compareAndSwapInt(b, byte_offset(i), -103, d); + unsafe.compareAndSetInt(a, byte_offset(i), -123, c); + unsafe.compareAndSetInt(b, byte_offset(i), -103, d); } } static void test_ci_oppos(int[] a, int old) { int limit = ARRLEN-1; for (int i = 0; i < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(limit-i), old, -123); + unsafe.compareAndSetInt(a, byte_offset(limit-i), old, -123); } } static void test_vi_oppos(int[] a, int b, int old) { int limit = ARRLEN-1; for (int i = limit; i >= 0; i-=1) { - unsafe.compareAndSwapInt(a, byte_offset(limit-i), old, b); + unsafe.compareAndSetInt(a, byte_offset(limit-i), old, b); } } static void test_cp_oppos(int[] a, int[] b) { int limit = ARRLEN-1; for (int i = 0; i < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), -123, b[limit-i]); + unsafe.compareAndSetInt(a, byte_offset(i), -123, b[limit-i]); } } static void test_2ci_oppos(int[] a, int[] b) { int limit = ARRLEN-1; for (int i = 0; i < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(limit-i), 123, -123); - unsafe.compareAndSwapInt(b, byte_offset(i), 123, -103); + unsafe.compareAndSetInt(a, byte_offset(limit-i), 123, -123); + unsafe.compareAndSetInt(b, byte_offset(i), 123, -103); } } static void test_2vi_oppos(int[] a, int[] b, int c, int d) { int limit = ARRLEN-1; for (int i = limit; i >= 0; i-=1) { - unsafe.compareAndSwapInt(a, byte_offset(i), -123, c); - unsafe.compareAndSwapInt(b, byte_offset(limit-i), -103, d); + unsafe.compareAndSetInt(a, byte_offset(i), -123, c); + unsafe.compareAndSetInt(b, byte_offset(limit-i), -103, d); } } static void test_ci_off(int[] a, int old) { for (int i = 0; i < ARRLEN-OFFSET; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+OFFSET), old, -123); + unsafe.compareAndSetInt(a, byte_offset(i+OFFSET), old, -123); } } static void test_vi_off(int[] a, int b, int old) { for (int i = 0; i < ARRLEN-OFFSET; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+OFFSET), old, b); + unsafe.compareAndSetInt(a, byte_offset(i+OFFSET), old, b); } } static void test_cp_off(int[] a, int[] b) { for (int i = 0; i < ARRLEN-OFFSET; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+OFFSET), -123, b[i+OFFSET]); + unsafe.compareAndSetInt(a, byte_offset(i+OFFSET), -123, b[i+OFFSET]); } } static void test_2ci_off(int[] a, int[] b) { for (int i = 0; i < ARRLEN-OFFSET; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+OFFSET), 123, -123); - unsafe.compareAndSwapInt(b, byte_offset(i+OFFSET), 123, -103); + unsafe.compareAndSetInt(a, byte_offset(i+OFFSET), 123, -123); + unsafe.compareAndSetInt(b, byte_offset(i+OFFSET), 123, -103); } } static void test_2vi_off(int[] a, int[] b, int c, int d) { for (int i = 0; i < ARRLEN-OFFSET; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+OFFSET), -123, c); - unsafe.compareAndSwapInt(b, byte_offset(i+OFFSET), -103, d); + unsafe.compareAndSetInt(a, byte_offset(i+OFFSET), -123, c); + unsafe.compareAndSetInt(b, byte_offset(i+OFFSET), -103, d); } } static void test_ci_inv(int[] a, int k, int old) { for (int i = 0; i < ARRLEN-k; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+k), old, -123); + unsafe.compareAndSetInt(a, byte_offset(i+k), old, -123); } } static void test_vi_inv(int[] a, int b, int k, int old) { for (int i = 0; i < ARRLEN-k; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+k), old, b); + unsafe.compareAndSetInt(a, byte_offset(i+k), old, b); } } static void test_cp_inv(int[] a, int[] b, int k) { for (int i = 0; i < ARRLEN-k; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+k), -123, b[i+k]); + unsafe.compareAndSetInt(a, byte_offset(i+k), -123, b[i+k]); } } static void test_2ci_inv(int[] a, int[] b, int k) { for (int i = 0; i < ARRLEN-k; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+k), 123, -123); - unsafe.compareAndSwapInt(b, byte_offset(i+k), 123, -103); + unsafe.compareAndSetInt(a, byte_offset(i+k), 123, -123); + unsafe.compareAndSetInt(b, byte_offset(i+k), 123, -103); } } static void test_2vi_inv(int[] a, int[] b, int c, int d, int k) { for (int i = 0; i < ARRLEN-k; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+k), -123, c); - unsafe.compareAndSwapInt(b, byte_offset(i+k), -103, d); + unsafe.compareAndSetInt(a, byte_offset(i+k), -123, c); + unsafe.compareAndSetInt(b, byte_offset(i+k), -103, d); } } static void test_ci_scl(int[] a, int old) { for (int i = 0; i*SCALE < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i*SCALE), old, -123); + unsafe.compareAndSetInt(a, byte_offset(i*SCALE), old, -123); } } static void test_vi_scl(int[] a, int b, int old) { for (int i = 0; i*SCALE < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i*SCALE), old, b); + unsafe.compareAndSetInt(a, byte_offset(i*SCALE), old, b); } } static void test_cp_scl(int[] a, int[] b) { for (int i = 0; i*SCALE < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i*SCALE), -123, b[i*SCALE]); + unsafe.compareAndSetInt(a, byte_offset(i*SCALE), -123, b[i*SCALE]); } } static void test_2ci_scl(int[] a, int[] b) { for (int i = 0; i*SCALE < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i*SCALE), 123, -123); - unsafe.compareAndSwapInt(b, byte_offset(i*SCALE), 123, -103); + unsafe.compareAndSetInt(a, byte_offset(i*SCALE), 123, -123); + unsafe.compareAndSetInt(b, byte_offset(i*SCALE), 123, -103); } } static void test_2vi_scl(int[] a, int[] b, int c, int d) { for (int i = 0; i*SCALE < ARRLEN; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i*SCALE), -123, c); - unsafe.compareAndSwapInt(b, byte_offset(i*SCALE), -103, d); + unsafe.compareAndSetInt(a, byte_offset(i*SCALE), -123, c); + unsafe.compareAndSetInt(b, byte_offset(i*SCALE), -103, d); } } static void test_cp_alndst(int[] a, int[] b) { for (int i = 0; i < ARRLEN-ALIGN_OFF; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+ALIGN_OFF), -1, b[i]); + unsafe.compareAndSetInt(a, byte_offset(i+ALIGN_OFF), -1, b[i]); } } static void test_cp_alnsrc(int[] a, int[] b) { for (int i = 0; i < ARRLEN-ALIGN_OFF; i+=1) { int old = unsafe.getIntVolatile(a, byte_offset(i)); - unsafe.compareAndSwapInt(a, byte_offset(i), old, b[i+ALIGN_OFF]); + unsafe.compareAndSetInt(a, byte_offset(i), old, b[i+ALIGN_OFF]); } } static void test_2ci_aln(int[] a, int[] b) { for (int i = 0; i < ARRLEN-ALIGN_OFF; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+ALIGN_OFF), -1, -123); + unsafe.compareAndSetInt(a, byte_offset(i+ALIGN_OFF), -1, -123); int old = unsafe.getIntVolatile(b, byte_offset(i)); - unsafe.compareAndSwapInt(b, byte_offset(i), old, -103); + unsafe.compareAndSetInt(b, byte_offset(i), old, -103); } } static void test_2vi_aln(int[] a, int[] b, int c, int d) { for (int i = 0; i < ARRLEN-ALIGN_OFF; i+=1) { int old = unsafe.getIntVolatile(a, byte_offset(i)); - unsafe.compareAndSwapInt(a, byte_offset(i), old, c); + unsafe.compareAndSetInt(a, byte_offset(i), old, c); old = unsafe.getIntVolatile(b, byte_offset(i+ALIGN_OFF)); - unsafe.compareAndSwapInt(b, byte_offset(i+ALIGN_OFF), old, d); + unsafe.compareAndSetInt(b, byte_offset(i+ALIGN_OFF), old, d); } } static void test_cp_unalndst(int[] a, int[] b) { for (int i = 0; i < ARRLEN-UNALIGN_OFF; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+UNALIGN_OFF), -1, b[i]); + unsafe.compareAndSetInt(a, byte_offset(i+UNALIGN_OFF), -1, b[i]); } } static void test_cp_unalnsrc(int[] a, int[] b) { for (int i = 0; i < ARRLEN-UNALIGN_OFF; i+=1) { int old = unsafe.getIntVolatile(a, byte_offset(i)); - unsafe.compareAndSwapInt(a, byte_offset(i), old, b[i+UNALIGN_OFF]); + unsafe.compareAndSetInt(a, byte_offset(i), old, b[i+UNALIGN_OFF]); } } static void test_2ci_unaln(int[] a, int[] b) { for (int i = 0; i < ARRLEN-UNALIGN_OFF; i+=1) { - unsafe.compareAndSwapInt(a, byte_offset(i+UNALIGN_OFF), -1, -123); + unsafe.compareAndSetInt(a, byte_offset(i+UNALIGN_OFF), -1, -123); int old = unsafe.getIntVolatile(b, byte_offset(i)); - unsafe.compareAndSwapInt(b, byte_offset(i), old, -103); + unsafe.compareAndSetInt(b, byte_offset(i), old, -103); } } static void test_2vi_unaln(int[] a, int[] b, int c, int d) { for (int i = 0; i < ARRLEN-UNALIGN_OFF; i+=1) { int old = unsafe.getIntVolatile(a, byte_offset(i)); - unsafe.compareAndSwapInt(a, byte_offset(i), old, c); + unsafe.compareAndSetInt(a, byte_offset(i), old, c); old = unsafe.getIntVolatile(b, byte_offset(i+UNALIGN_OFF)); - unsafe.compareAndSwapInt(b, byte_offset(i+UNALIGN_OFF), old, d); + unsafe.compareAndSetInt(b, byte_offset(i+UNALIGN_OFF), old, d); } } diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java index 4c81223b565..5009ba634bf 100644 --- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java +++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java @@ -32,10 +32,10 @@ * @run main compiler.calls.common.InvokeDynamicPatcher * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeDynamic * -compileCaller 1 -checkCallerCompileLevel 1 -nativeCallee - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeDynamic * -compileCaller 4 -checkCallerCompileLevel 4 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java index 2544b4cc3d8..3387d3e800d 100644 --- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java +++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeInterface * -compileCaller 1 -checkCallerCompileLevel 1 -nativeCallee - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeInterface * -compileCaller 4 -checkCallerCompileLevel 4 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java index 301811399c2..4948890a985 100644 --- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java +++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeSpecial * -compileCaller 1 -checkCallerCompileLevel 1 -nativeCallee - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeSpecial * -compileCaller 4 -checkCallerCompileLevel 4 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java index a40d9d41090..563c4c4091f 100644 --- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java +++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeStatic * -compileCaller 1 -checkCallerCompileLevel 1 -nativeCallee - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeStatic * -compileCaller 4 -checkCallerCompileLevel 4 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java index c82f056bd24..4a1f046583e 100644 --- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java +++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeVirtual * -compileCaller 1 -checkCallerCompileLevel 1 -nativeCallee - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeVirtual * -compileCaller 4 -checkCallerCompileLevel 4 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java index 1d5ac09b6c1..b59a4f96ff9 100644 --- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java +++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java @@ -32,7 +32,7 @@ * @run main compiler.calls.common.InvokeDynamicPatcher * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeDynamic::caller compiler.calls.common.InvokeDynamic * -checkCallerCompileLevel 0 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java index b03e5bd5ec2..63ab11a5a47 100644 --- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java +++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeInterface::caller compiler.calls.common.InvokeInterface * -checkCallerCompileLevel 0 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java index 8593ebc2551..c7dda1f3faa 100644 --- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java +++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java @@ -30,7 +30,7 @@ * @build compiler.calls.common.InvokeSpecial * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeSpecial::caller compiler.calls.common.InvokeSpecial * -checkCallerCompileLevel 0 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java index a17e9c5c2a7..ca2613b14a2 100644 --- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java +++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeStatic::caller compiler.calls.common.InvokeStatic * -checkCallerCompileLevel 0 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java index 9ebf7a359c8..c983efd890f 100644 --- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java +++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeVirtual::caller compiler.calls.common.InvokeVirtual * -checkCallerCompileLevel 0 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java index 74007716168..1ddea48c639 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeSpecial * -nativeCaller -compileCallee 1 -checkCalleeCompileLevel 1 - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeSpecial * -nativeCaller -compileCallee 4 -checkCalleeCompileLevel 4 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java index 4efd098904d..961daf545bd 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeSpecial::callee compiler.calls.common.InvokeSpecial * -nativeCaller -checkCalleeCompileLevel 0 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java index 1005783754c..bde00f6da43 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * compiler.calls.common.InvokeSpecial * -nativeCaller -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java index f1f0634e9f0..f86ca89896c 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeStatic * -nativeCaller -compileCallee 1 -checkCalleeCompileLevel 1 - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeStatic * -nativeCaller -compileCallee 4 -checkCalleeCompileLevel 4 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java index fc0a0592072..fff52824542 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeStatic::callee compiler.calls.common.InvokeStatic * -nativeCaller -checkCalleeCompileLevel 0 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java index f9da3d65c98..3d106fdf12b 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * compiler.calls.common.InvokeStatic * -nativeCaller -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java index b6cce29b413..7b744249c3c 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeVirtual * -nativeCaller -compileCallee 1 -checkCalleeCompileLevel 1 - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeVirtual * -nativeCaller -compileCallee 4 -checkCalleeCompileLevel 4 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java index 270ecfa6f35..43be4d49c4e 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java @@ -30,7 +30,7 @@ * * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeVirtual::callee compiler.calls.common.InvokeVirtual * -nativeCaller -checkCalleeCompileLevel 0 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java index 83564c143b2..9b9fe1a44df 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * compiler.calls.common.InvokeVirtual * -nativeCaller -nativeCallee */ diff --git a/hotspot/test/compiler/ciReplay/SABase.java b/hotspot/test/compiler/ciReplay/SABase.java index 0354835b8f9..57690848489 100644 --- a/hotspot/test/compiler/ciReplay/SABase.java +++ b/hotspot/test/compiler/ciReplay/SABase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -141,7 +141,7 @@ public class SABase extends CiReplayBase { if (Platform.isSolaris()) { try { OutputAnalyzer oa = ProcessTools.executeProcess("coreadm", "-p", "core", - "" + ProcessHandle.current().getPid()); + "" + ProcessHandle.current().pid()); oa.shouldHaveExitValue(0); } catch (Throwable t) { throw new Error("Can't launch coreadm: " + t, t); diff --git a/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java b/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java index 9f34a8681de..24ec37b89d4 100644 --- a/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java +++ b/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java @@ -23,7 +23,7 @@ package compiler.codecache.stress; -import jdk.test.lib.wrappers.TimeLimitedRunner; +import jdk.test.lib.TimeLimitedRunner; import jdk.test.lib.Utils; public class CodeCacheStressRunner { diff --git a/hotspot/test/compiler/codecache/stress/Helper.java b/hotspot/test/compiler/codecache/stress/Helper.java index d9fb8d3a843..e759378ffda 100644 --- a/hotspot/test/compiler/codecache/stress/Helper.java +++ b/hotspot/test/compiler/codecache/stress/Helper.java @@ -25,7 +25,7 @@ package compiler.codecache.stress; import jdk.test.lib.Asserts; import jdk.test.lib.ByteCodeLoader; -import jdk.test.lib.wrappers.InfiniteLoop; +import jdk.test.lib.InfiniteLoop; import jdk.test.lib.Utils; import sun.hotspot.WhiteBox; diff --git a/hotspot/test/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java b/hotspot/test/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java new file mode 100644 index 00000000000..52ccab6aff8 --- /dev/null +++ b/hotspot/test/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test ReturnBlobToWrongHeapTest + * @key stress + * @summary Test if VM attempts to return code blobs to an incorrect code heap or to outside of the code cache. + * @library /test/lib / + * @modules java.base/jdk.internal.misc + * java.management + * + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -XX:+WhiteBoxAPI + * -XX:CompileCommand=dontinline,compiler.codecache.stress.Helper$TestCase::method + * -XX:+SegmentedCodeCache + * -XX:ReservedCodeCacheSize=16M + * -XX:CodeCacheMinBlockLength=1 + * compiler.codecache.stress.ReturnBlobToWrongHeapTest + */ + +package compiler.codecache.stress; + +import sun.hotspot.code.BlobType; + +import java.util.ArrayList; + +public class ReturnBlobToWrongHeapTest { + private static final long largeBlobSize = Helper.WHITE_BOX.getUintxVMFlag("ReservedCodeCacheSize") >> 6; + private static final long codeCacheMinBlockLength = Helper.WHITE_BOX.getUintxVMFlag("CodeCacheMinBlockLength"); + private static final BlobType[] BLOB_TYPES = BlobType.getAvailable().toArray(new BlobType[0]); + + // Allocate blob in first code heap (the code heap with index 0). + private static long allocate(int size) { + return Helper.WHITE_BOX.allocateCodeBlob(size, BLOB_TYPES[0].id); + } + + // Free blob. + private static void free(long address) { + Helper.WHITE_BOX.freeCodeBlob(address); + } + + public static void main(String[] args) { + if (codeCacheMinBlockLength == 1) { + // Fill first code heap with large blobs until allocation fails. + long address; + while ((address = allocate((int)largeBlobSize)) != 0) { + } + + // Allocate segment-sized blocks in first code heap. + long lastSegmentSizedAddress = 0; // Address of the last segment-sized blob allocated + while ((address = allocate(0)) != 0) { + lastSegmentSizedAddress = address; + } + + if (lastSegmentSizedAddress == 0) { + throw new RuntimeException("Test failed: Not possible to allocate segment-sized blob"); + } + + // Remove last segment-sized block from the first code heap. + free(lastSegmentSizedAddress); + } else { + throw new RuntimeException("Test requires CodeCacheMinBlockLength==1; CodeCacheMinBlockLength is " + + codeCacheMinBlockLength); + } + } +} diff --git a/hotspot/test/compiler/compilercontrol/jcmd/StressAddJcmdBase.java b/hotspot/test/compiler/compilercontrol/jcmd/StressAddJcmdBase.java index 30baaed7684..cfd9e1c4bb0 100644 --- a/hotspot/test/compiler/compilercontrol/jcmd/StressAddJcmdBase.java +++ b/hotspot/test/compiler/compilercontrol/jcmd/StressAddJcmdBase.java @@ -29,7 +29,7 @@ import compiler.compilercontrol.share.method.MethodDescriptor; import compiler.compilercontrol.share.pool.PoolHelper; import compiler.compilercontrol.share.scenario.Executor; import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.wrappers.TimeLimitedRunner; +import jdk.test.lib.TimeLimitedRunner; import jdk.test.lib.Utils; import java.util.ArrayList; diff --git a/hotspot/test/compiler/intrinsics/string/TestStringUTF16IntrinsicRangeChecks.java b/hotspot/test/compiler/intrinsics/string/TestStringUTF16IntrinsicRangeChecks.java new file mode 100644 index 00000000000..86de75132ea --- /dev/null +++ b/hotspot/test/compiler/intrinsics/string/TestStringUTF16IntrinsicRangeChecks.java @@ -0,0 +1,320 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8158168 + * @summary Verifies that callers of StringUTF16 intrinsics throw array out of bounds exceptions. + * @library /compiler/patches /test/lib + * @build java.base/java.lang.Helper + * @run main/othervm -Xbatch -XX:CompileThreshold=100 -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_getCharStringU,_putCharStringU compiler.intrinsics.string.TestStringUTF16IntrinsicRangeChecks + * @run main/othervm -Xbatch -XX:CompileThreshold=100 -esa -ea -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_getCharStringU,_putCharStringU compiler.intrinsics.string.TestStringUTF16IntrinsicRangeChecks + */ +package compiler.intrinsics.string; + +import java.lang.reflect.Field; +import java.util.Arrays; + +public class TestStringUTF16IntrinsicRangeChecks { + + public static void main(String[] args) throws Exception { + byte[] val = new byte[2]; + byte[] b4 = new byte[4]; + char[] c4 = new char[4]; + String s4 = new String(c4); + byte[] valHigh = new byte[2]; + byte[] valLow = new byte[2]; + Helper.putCharSB(valHigh, 0, Character.MIN_HIGH_SURROGATE); + Helper.putCharSB(valLow, 0, Character.MIN_LOW_SURROGATE); + + for (int i = 0; i < 1000; ++i) { + getChars((int)1234, -5, -5 + 4, val); + getChars((int)1234, -1, -1 + 4, val); + getChars((int)1234, 0, 0 + 4, val); + getChars((int)1234, 1, 1 + 4, val); + + getChars((long)1234, -5, -5 + 4, val); + getChars((long)1234, -1, -1 + 4, val); + getChars((long)1234, 0, 0 + 4, val); + getChars((long)1234, 1, 1 + 4, val); + + byte[] val2 = Arrays.copyOf(val, val.length); + putCharSB(val2, -1, '!'); + putCharSB(val2, 1, '!'); + + byte[] val4 = Arrays.copyOf(b4, b4.length); + char[] c2 = new char[2]; + String s2 = new String(c2); + + putCharsSB(val4, -3, c2, 0, 2); + putCharsSB(val4, -1, c2, 0, 2); + putCharsSB(val4, 0, c4, 0, 4); + putCharsSB(val4, 1, c2, 0, 2); + putCharsSB(val4, -3, s2, 0, 2); + putCharsSB(val4, -1, s2, 0, 2); + putCharsSB(val4, 0, s4, 0, 4); + putCharsSB(val4, 1, s2, 0, 2); + + codePointAtSB(valHigh, -1, 1); + codePointAtSB(valHigh, -1, 2); + codePointAtSB(valHigh, 0, 2); + codePointAtSB(valHigh, 1, 2); + + codePointBeforeSB(valLow, 0); + codePointBeforeSB(valLow, -1); + codePointBeforeSB(valLow, 2); + + if (Helper.codePointCountSB(valHigh, 0, 1) != 1) { + throw new AssertionError("codePointCountSB"); + } + if (Helper.codePointCountSB(valLow, 0, 1) != 1) { + throw new AssertionError("codePointCountSB"); + } + codePointCountSB(valHigh, -1, 0); + codePointCountSB(valHigh, -1, 2); + codePointCountSB(valHigh, 0, 2); + + charAt(val, -1); + charAt(val, 1); + + contentEquals(b4, val, -1); + contentEquals(b4, val, 2); + contentEquals(val, s4, 2); + contentEquals(val, s4, -1); + + StringBuilder sb = new StringBuilder(); + sb.append((String)null).append(true).append(false); + if (!sb.toString().equals("nulltruefalse")) { + throw new AssertionError("append"); + } + + putCharsAt(val2, -1, '1', '2', '3', '4'); + putCharsAt(val2, 0, '1', '2', '3', '4'); + putCharsAt(val2, 2, '1', '2', '3', '4'); + putCharsAt(val2, -1, '1', '2', '3', '4', '5'); + putCharsAt(val2, 0, '1', '2', '3', '4', '5'); + putCharsAt(val2, 2, '1', '2', '3', '4', '5'); + + reverse(valHigh, -1); + reverse(valHigh, 2); + reverse(valLow, -1); + reverse(valLow, 2); + + byte[] d4 = new byte[4]; + inflate(b4, 0, d4, -1, 2); + inflate(b4, 0, d4, 3, 2); + inflate(b4, 0, d4, 4, 1); + + byte[] b0 = new byte[0]; + byte[] b1 = new byte[1]; + byte[] b2 = new byte[2]; + byte[] t1 = new byte[] {1}; + byte[] t2 = new byte[] {1, 2}; + byte[] t4 = new byte[] {1, 2, 3, 4}; + indexOf(b1, 1, t2, 1, 0); + indexOf(b2, 1, t1, 1, 0); + indexOf(b2, 2, t2, 1, 0); + indexOf(b2, 1, t2, 2, 0); + indexOf(b2, -1, t2, 1, 0); + indexOf(b2, 1, t2, -1, 0); + indexOf(b2, 1, t2, 1, 1); + + indexOfLatin1(b1, 1, t1, 1, 0); + indexOfLatin1(b2, 2, t1, 1, 0); + indexOfLatin1(b2, 1, b0, 1, 0); + indexOfLatin1(b2, 1, t1, 2, 0); + indexOfLatin1(b2, -1, t1, 1, 0); + indexOfLatin1(b2, 2, t1, 1, 0); + indexOfLatin1(b2, 1, t1, -1, 0); + indexOfLatin1(b2, 1, t1, 2, 0); + + lastIndexOf(b1, t2, 1, 0); + lastIndexOf(b2, t4, 2, 0); + lastIndexOf(b2, t2, 1, 0); + lastIndexOf(b2, t2, 1, 1); + + lastIndexOfLatin1(b1, t1, 1, 0); + lastIndexOfLatin1(b2, t2, 2, 0); + lastIndexOfLatin1(b2, t1, 1, 0); + lastIndexOfLatin1(b2, t1, 1, 1); + } + } + + static void getChars(int i, int begin, int end, byte[] value) { + try { + Helper.getChars(i, begin, end, value); + throw new AssertionError("getChars"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void getChars(long l, int begin, int end, byte[] value) { + try { + Helper.getChars(l, begin, end, value); + throw new AssertionError("getChars"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void putCharSB(byte[] val, int index, int c) { + try { + Helper.putCharSB(val, index, c); + throw new AssertionError("putCharSB"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void putCharsSB(byte[] val, int index, char[] ca, int off, int end) { + try { + Helper.putCharsSB(val, index, ca, off, end); + throw new AssertionError("putCharsSB"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void putCharsSB(byte[] val, int index, CharSequence s, int off, int end) { + try { + Helper.putCharsSB(val, index, s, off, end); + throw new AssertionError("putCharsSB"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void codePointAtSB(byte[] val, int index, int end) { + try { + Helper.codePointAtSB(val, index, end); + throw new AssertionError("codePointAtSB"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void codePointBeforeSB(byte[] val, int index) { + try { + Helper.codePointBeforeSB(val, index); + throw new AssertionError("codePointBeforeSB"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void codePointCountSB(byte[] val, int beginIndex, int endIndex) { + try { + Helper.codePointCountSB(val, beginIndex, endIndex); + throw new AssertionError("codePointCountSB"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void charAt(byte[] v, int index) { + try { + Helper.charAt(v, index); + throw new AssertionError("charAt"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void contentEquals(byte[] v1, byte[] v2, int len) { + try { + Helper.contentEquals(v1, v2, len); + throw new AssertionError("contentEquals"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void contentEquals(byte[] v, CharSequence cs, int len) { + try { + Helper.contentEquals(v, cs, len); + throw new AssertionError("contentEquals"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void putCharsAt(byte[] v, int i, char c1, char c2, char c3, char c4) { + try { + Helper.putCharsAt(v, i, c1, c2, c3, c4); + throw new AssertionError("putCharsAt"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void putCharsAt(byte[] v, int i, char c1, char c2, char c3, char c4, char c5) { + try { + Helper.putCharsAt(v, i, c1, c2, c3, c4, c5); + throw new AssertionError("putCharsAt"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void reverse(byte[] v, int len) { + try { + Helper.reverse(v, len); + throw new AssertionError("reverse"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void inflate(byte[] v1, int o1, byte[] v2, int o2, int len) { + try { + Helper.inflate(v1, o1, v2, o2, len); + throw new AssertionError("inflate"); + } catch (IndexOutOfBoundsException io) { + } + } + + static void indexOf(byte[] v1, int l1, byte[] v2, int l2, int from) { + try { + if (Helper.indexOf(v1, l1, v2, l2, from) != -1) { + throw new AssertionError("indexOf"); + } + } catch (IndexOutOfBoundsException io) { + } + } + + static void lastIndexOf(byte[] v1, byte[] v2, int l2, int from) { + try { + if (Helper.lastIndexOf(v1, v2, l2, from) != -1) { + throw new AssertionError("lastIndexOf"); + } + } catch (IndexOutOfBoundsException io) { + } + } + + static void indexOfLatin1(byte[] v1, int l1, byte[] v2, int l2, int from) { + try { + if (Helper.indexOfLatin1(v1, l1, v2, l2, from) != -1) { + throw new AssertionError("indexOfLatin1"); + } + } catch (IndexOutOfBoundsException io) { + } + } + + static void lastIndexOfLatin1(byte[] v1, byte[] v2, int l2, int from) { + try { + if (Helper.lastIndexOfLatin1(v1, v2, l2, from) != -1) { + throw new AssertionError("lastIndexOfLatin1"); + } + } catch (IndexOutOfBoundsException io) { + } + } +} diff --git a/hotspot/test/compiler/intrinsics/unsafe/TestCAEAntiDep.java b/hotspot/test/compiler/intrinsics/unsafe/TestCAEAntiDep.java index 5bec829dddd..353c73e43ba 100644 --- a/hotspot/test/compiler/intrinsics/unsafe/TestCAEAntiDep.java +++ b/hotspot/test/compiler/intrinsics/unsafe/TestCAEAntiDep.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, Red Hat, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -53,7 +54,7 @@ public class TestCAEAntiDep { } static int m(TestCAEAntiDep test, Object expected, Object x) { - C old = (C)UNSAFE.compareAndExchangeObjectVolatile(test, O_OFFSET, expected, x); + C old = (C)UNSAFE.compareAndExchangeObject(test, O_OFFSET, expected, x); int res = old.f1; old.f1 = 0x42; return res; diff --git a/hotspot/test/compiler/intrinsics/unsafe/UnsafeTwoCASLong.java b/hotspot/test/compiler/intrinsics/unsafe/UnsafeTwoCASLong.java index 8f65f1d5e04..772b44b60e4 100644 --- a/hotspot/test/compiler/intrinsics/unsafe/UnsafeTwoCASLong.java +++ b/hotspot/test/compiler/intrinsics/unsafe/UnsafeTwoCASLong.java @@ -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 @@ -72,9 +72,8 @@ public class UnsafeTwoCASLong { } static void testAccess(Object base, long offset) { - UNSAFE.compareAndSwapLong(base, offset, 1L, 2L); - UNSAFE.compareAndSwapLong(base, offset, 2L, 1L); + UNSAFE.compareAndSetLong(base, offset, 1L, 2L); + UNSAFE.compareAndSetLong(base, offset, 2L, 1L); } } - diff --git a/hotspot/test/compiler/intrinsics/zip/TestCRC32.java b/hotspot/test/compiler/intrinsics/zip/TestCRC32.java index 626f506e48c..cacffd98ce2 100644 --- a/hotspot/test/compiler/intrinsics/zip/TestCRC32.java +++ b/hotspot/test/compiler/intrinsics/zip/TestCRC32.java @@ -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 @@ -36,7 +36,22 @@ import java.util.zip.CRC32; import java.util.zip.Checksum; public class TestCRC32 { - public static void main(String[] args) { + // standard CRC32 polynomial + // coefficients in different forms + // normal: polyBits = 0x04c11db7 = 0b0000 0100 1100 0001 0001 1101 1011 0111 + // reversed: polybits = 0xedb88320 = 0b1110 1101 1011 1000 1000 0011 0010 0000 + // reversed reciprocal polybits = 0x82608edb = 0b1000 0010 0110 0000 1000 1110 1101 1011 + // + // 0 5 9 13 17 21 25 29 + // | | | | | | | | + // reversed shiftL 1 polyBits = 0x1db710641L = 0b1 1101 1011 0111 0001 0000 0110 0100 0001 + final static long polyBits = (1L<<(32-32)) + (1L<<(32-26)) + (1L<<(32-23)) + (1L<<(32-22)) + + (1L<<(32-16)) + (1L<<(32-12)) + (1L<<(32-11)) + (1L<<(32-10)) + + (1L<<(32-8)) + (1L<<(32-7)) + (1L<<(32-5)) + (1L<<(32-4)) + + (1L<<(32-2)) + (1L<<(32-1)) + (1L<<(32-0)); + final static long polyBitsShifted = polyBits>>1; + + public static void main(String[] args) throws Exception { int offset = Integer.getInteger("offset", 0); int msgSize = Integer.getInteger("msgSize", 512); boolean multi = false; @@ -65,11 +80,14 @@ public class TestCRC32 { byte[] b = initializedBytes(msgSize, offset); + final long crcReference = update_byteLoop(0, b, offset); + CRC32 crc0 = new CRC32(); CRC32 crc1 = new CRC32(); CRC32 crc2 = new CRC32(); crc0.update(b, offset, msgSize); + check(crc0, crcReference); System.out.println("-------------------------------------------------------"); @@ -77,27 +95,35 @@ public class TestCRC32 { for (int i = 0; i < warmupIters; i++) { crc1.reset(); crc1.update(b, offset, msgSize); + check(crc1, crcReference); } - /* measure performance */ + /* check correctness + * Do that before measuring performance + * to even better heat up involved methods. + */ + for (int i = 0; i < iters; i++) { + crc1.reset(); + crc1.update(b, offset, msgSize); + check(crc1, crcReference); + } + report("CRCs", crc1, crcReference); + + /* measure performance + * Don't spoil times with error checking. + */ long start = System.nanoTime(); for (int i = 0; i < iters; i++) { crc1.reset(); crc1.update(b, offset, msgSize); } long end = System.nanoTime(); + double total = (double)(end - start)/1e9; // in seconds double thruput = (double)msgSize*iters/1e6/total; // in MB/s System.out.println("CRC32.update(byte[]) runtime = " + total + " seconds"); System.out.println("CRC32.update(byte[]) throughput = " + thruput + " MB/s"); - - /* check correctness */ - for (int i = 0; i < iters; i++) { - crc1.reset(); - crc1.update(b, offset, msgSize); - if (!check(crc0, crc1)) break; - } - report("CRCs", crc0, crc1); + report("CRCs", crc1, crcReference); System.out.println("-------------------------------------------------------"); @@ -110,9 +136,24 @@ public class TestCRC32 { crc2.reset(); crc2.update(buf); buf.rewind(); + check(crc2, crcReference); } - /* measure performance */ + /* check correctness + * Do that before measuring performance + * to even better heat up involved methods. + */ + for (int i = 0; i < iters; i++) { + crc2.reset(); + crc2.update(buf); + buf.rewind(); + check(crc2, crcReference); + } + report("CRCs", crc2, crcReference); + + /* measure performance + * Don't spoil times with error checking. + */ start = System.nanoTime(); for (int i = 0; i < iters; i++) { crc2.reset(); @@ -124,31 +165,57 @@ public class TestCRC32 { thruput = (double)msgSize*iters/1e6/total; // in MB/s System.out.println("CRC32.update(ByteBuffer) runtime = " + total + " seconds"); System.out.println("CRC32.update(ByteBuffer) throughput = " + thruput + " MB/s"); - - /* check correctness */ - for (int i = 0; i < iters; i++) { - crc2.reset(); - crc2.update(buf); - buf.rewind(); - if (!check(crc0, crc2)) break; - } - report("CRCs", crc0, crc2); + report("CRCs", crc2, crcReference); System.out.println("-------------------------------------------------------"); } - private static void report(String s, Checksum crc0, Checksum crc1) { - System.out.printf("%s: crc0 = %08x, crc1 = %08x\n", - s, crc0.getValue(), crc1.getValue()); + // Just a loop over a byte array, updating the CRC byte by byte. + public static long update_byteLoop(long crc, byte[] buf, int offset) { + return update_byteLoop(crc, buf, offset, buf.length-offset); } - private static boolean check(Checksum crc0, Checksum crc1) { - if (crc0.getValue() != crc1.getValue()) { - System.err.printf("ERROR: crc0 = %08x, crc1 = %08x\n", - crc0.getValue(), crc1.getValue()); - return false; + // Just a loop over a byte array, with given length, updating the CRC byte by byte. + public static long update_byteLoop(long crc, byte[] buf, int offset, int length) { + int end = length+offset; + for (int i = offset; i < end; i++) { + crc = update_singlebyte(crc, polyBitsShifted, buf[i]); + } + return crc; + } + + // Straight-forward implementation of CRC update by one byte. + // We use this very basic implementation to calculate reference + // results. It is necessary to have full control over how the + // reference results are calculated. It is not sufficient to rely + // on the interpreter (or c1, or c2) to do the right thing. + public static long update_singlebyte(long crc, long polynomial, int val) { + crc = (crc ^ -1L) & 0x00000000ffffffffL; // use 1's complement of crc + crc = crc ^ (val&0xff); // XOR in next byte from stream + for (int i = 0; i < 8; i++) { + boolean bitset = (crc & 0x01L) != 0; + + crc = crc>>1; + if (bitset) { + crc = crc ^ polynomial; + crc = crc & 0x00000000ffffffffL; + } + } + crc = (crc ^ -1L) & 0x00000000ffffffffL; // revert taking 1's complement + return crc; + } + + private static void report(String s, Checksum crc, long crcReference) { + System.out.printf("%s: crc = %08x, crcReference = %08x\n", + s, crc.getValue(), crcReference); + } + + private static void check(Checksum crc, long crcReference) throws Exception { + if (crc.getValue() != crcReference) { + System.err.printf("ERROR: crc = %08x, crcReference = %08x\n", + crc.getValue(), crcReference); + throw new Exception("TestCRC32 Error"); } - return true; } private static byte[] initializedBytes(int M, int offset) { @@ -162,7 +229,7 @@ public class TestCRC32 { return bytes; } - private static void test_multi(int iters) { + private static void test_multi(int iters) throws Exception { int len1 = 8; // the 8B/iteration loop int len2 = 32; // the 32B/iteration loop int len3 = 4096; // the 4KB/iteration loop @@ -185,37 +252,31 @@ public class TestCRC32 { (len1+len2+len3)*2+5, (len1+len2+len3)*2+7, (len1+len2+len3)*3, (len1+len2+len3)*3-1, (len1+len2+len3)*3-3, (len1+len2+len3)*3-5, (len1+len2+len3)*3-7 }; - CRC32[] crc0 = new CRC32[offsets.length*sizes.length]; CRC32[] crc1 = new CRC32[offsets.length*sizes.length]; + long[] crcReference = new long[offsets.length*sizes.length]; int i, j, k; System.out.printf("testing %d cases ...\n", offsets.length*sizes.length); - /* set the result from interpreter as reference */ + // Initialize CRC32 result arrays, CRC32 reference array. + // Reference is calculated using a very basic Java implementation. for (i = 0; i < offsets.length; i++) { for (j = 0; j < sizes.length; j++) { - crc0[i*sizes.length + j] = new CRC32(); crc1[i*sizes.length + j] = new CRC32(); - crc0[i*sizes.length + j].update(b, offsets[i], sizes[j]); + crcReference[i*sizes.length + j] = update_byteLoop(0, b, offsets[i], sizes[j]); } } - /* warm up the JIT compiler and get result */ + // Warm up the JIT compiler. Over time, all methods involved will + // be executed by the interpreter, then get compiled by c1 and + // finally by c2. Each calculated CRC value must, in each iteration, + // be equal to the precalculated reference value for the test to pass. for (k = 0; k < iters; k++) { for (i = 0; i < offsets.length; i++) { for (j = 0; j < sizes.length; j++) { crc1[i*sizes.length + j].reset(); crc1[i*sizes.length + j].update(b, offsets[i], sizes[j]); - } - } - } - - /* check correctness */ - for (i = 0; i < offsets.length; i++) { - for (j = 0; j < sizes.length; j++) { - if (!check(crc0[i*sizes.length + j], crc1[i*sizes.length + j])) { - System.out.printf("offsets[%d] = %d", i, offsets[i]); - System.out.printf("\tsizes[%d] = %d\n", j, sizes[j]); + check(crc1[i*sizes.length + j], crcReference[i*sizes.length + j]); } } } diff --git a/hotspot/test/compiler/intrinsics/zip/TestCRC32C.java b/hotspot/test/compiler/intrinsics/zip/TestCRC32C.java index 2f280aa1254..2955af3478c 100644 --- a/hotspot/test/compiler/intrinsics/zip/TestCRC32C.java +++ b/hotspot/test/compiler/intrinsics/zip/TestCRC32C.java @@ -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 @@ -36,7 +36,23 @@ import java.util.zip.CRC32C; import java.util.zip.Checksum; public class TestCRC32C { - public static void main(String[] args) { + // CRC32C (Castagnoli) polynomial + // coefficients in different forms + // normal: polyBits = 0x1edc6f41 = 0b0001 1110 1101 1100 0110 1111 0100 0001 + // reversed: polybits = 0x82f63b78 = 0b1000 0010 1111 0110 0011 1011 0111 1000 + // reversed reciprocal polybits = 0x8f6e37a0 = 0b1000 1111 0110 1110 0011 0111 1010 0000 + // + // 0 5 9 13 17 21 25 29 + // | | | | | | | | + // reversed shiftL 1 polyBits = 0x105ec76f1L = 0b1 0000 0101 1110 1100 0111 0110 1111 0001 + final static long polyBits = (1L<<(32-32)) + (1L<<(32-28)) + (1L<<(32-27)) + + (1L<<(32-26)) + (1L<<(32-25)) + (1L<<(32-23)) + (1L<<(32-22)) + + (1L<<(32-20)) + (1L<<(32-19)) + (1L<<(32-18)) + (1L<<(32-14)) + + (1L<<(32-13)) + (1L<<(32-11)) + (1L<<(32-10)) + (1L<<(32-9)) + + (1L<<(32-8)) + (1L<<(32-6)) + (1L<<(32-0)); + final static long polyBitsShifted = polyBits>>1; + + public static void main(String[] args) throws Exception { int offset = Integer.getInteger("offset", 0); int msgSize = Integer.getInteger("msgSize", 512); boolean multi = false; @@ -65,11 +81,14 @@ public class TestCRC32C { byte[] b = initializedBytes(msgSize, offset); + final long crcReference = update_byteLoop(0, b, offset); + CRC32C crc0 = new CRC32C(); CRC32C crc1 = new CRC32C(); CRC32C crc2 = new CRC32C(); crc0.update(b, offset, msgSize); + check(crc0, crcReference); System.out.println("-------------------------------------------------------"); @@ -77,27 +96,35 @@ public class TestCRC32C { for (int i = 0; i < warmupIters; i++) { crc1.reset(); crc1.update(b, offset, msgSize); + check(crc1, crcReference); } - /* measure performance */ + /* check correctness + * Do that before measuring performance + * to even better heat up involved methods. + */ + for (int i = 0; i < iters; i++) { + crc1.reset(); + crc1.update(b, offset, msgSize); + check(crc1, crcReference); + } + report("CRCs", crc1, crcReference); + + /* measure performance + * Don't spoil times with error checking. + */ long start = System.nanoTime(); for (int i = 0; i < iters; i++) { crc1.reset(); crc1.update(b, offset, msgSize); } long end = System.nanoTime(); + double total = (double)(end - start)/1e9; // in seconds double thruput = (double)msgSize*iters/1e6/total; // in MB/s System.out.println("CRC32C.update(byte[]) runtime = " + total + " seconds"); System.out.println("CRC32C.update(byte[]) throughput = " + thruput + " MB/s"); - - /* check correctness */ - for (int i = 0; i < iters; i++) { - crc1.reset(); - crc1.update(b, offset, msgSize); - if (!check(crc0, crc1)) break; - } - report("CRCs", crc0, crc1); + report("CRCs", crc1, crcReference); System.out.println("-------------------------------------------------------"); @@ -110,9 +137,24 @@ public class TestCRC32C { crc2.reset(); crc2.update(buf); buf.rewind(); + check(crc2, crcReference); } - /* measure performance */ + /* check correctness + * Do that before measuring performance + * to even better heat up involved methods. + */ + for (int i = 0; i < iters; i++) { + crc2.reset(); + crc2.update(buf); + buf.rewind(); + check(crc2, crcReference); + } + report("CRCs", crc2, crcReference); + + /* measure performance + * Don't spoil times with error checking. + */ start = System.nanoTime(); for (int i = 0; i < iters; i++) { crc2.reset(); @@ -124,31 +166,57 @@ public class TestCRC32C { thruput = (double)msgSize*iters/1e6/total; // in MB/s System.out.println("CRC32C.update(ByteBuffer) runtime = " + total + " seconds"); System.out.println("CRC32C.update(ByteBuffer) throughput = " + thruput + " MB/s"); - - /* check correctness */ - for (int i = 0; i < iters; i++) { - crc2.reset(); - crc2.update(buf); - buf.rewind(); - if (!check(crc0, crc2)) break; - } - report("CRCs", crc0, crc2); + report("CRCs", crc2, crcReference); System.out.println("-------------------------------------------------------"); } - private static void report(String s, Checksum crc0, Checksum crc1) { - System.out.printf("%s: crc0 = %08x, crc1 = %08x\n", - s, crc0.getValue(), crc1.getValue()); + // Just a loop over a byte array, updating the CRC byte by byte. + public static long update_byteLoop(long crc, byte[] buf, int offset) { + return update_byteLoop(crc, buf, offset, buf.length-offset); } - private static boolean check(Checksum crc0, Checksum crc1) { - if (crc0.getValue() != crc1.getValue()) { - System.err.printf("ERROR: crc0 = %08x, crc1 = %08x\n", - crc0.getValue(), crc1.getValue()); - return false; + // Just a loop over a byte array, with given length, updating the CRC byte by byte. + public static long update_byteLoop(long crc, byte[] buf, int offset, int length) { + int end = length+offset; + for (int i = offset; i < end; i++) { + crc = update_singlebyte(crc, polyBitsShifted, buf[i]); + } + return crc; + } + + // Straight-forward implementation of CRC update by one byte. + // We use this very basic implementation to calculate reference + // results. It is necessary to have full control over how the + // reference results are calculated. It is not sufficient to rely + // on the interpreter (or c1, or c2) to do the right thing. + public static long update_singlebyte(long crc, long polynomial, int val) { + crc = (crc ^ -1L) & 0x00000000ffffffffL; // use 1's complement of crc + crc = crc ^ (val&0xff); // XOR in next byte from stream + for (int i = 0; i < 8; i++) { + boolean bitset = (crc & 0x01L) != 0; + + crc = crc>>1; + if (bitset) { + crc = crc ^ polynomial; + crc = crc & 0x00000000ffffffffL; + } + } + crc = (crc ^ -1L) & 0x00000000ffffffffL; // revert taking 1's complement + return crc; + } + + private static void report(String s, Checksum crc, long crcReference) { + System.out.printf("%s: crc = %08x, crcReference = %08x\n", + s, crc.getValue(), crcReference); + } + + private static void check(Checksum crc, long crcReference) throws Exception { + if (crc.getValue() != crcReference) { + System.err.printf("ERROR: crc = %08x, crcReference = %08x\n", + crc.getValue(), crcReference); + throw new Exception("TestCRC32C Error"); } - return true; } private static byte[] initializedBytes(int M, int offset) { @@ -162,7 +230,7 @@ public class TestCRC32C { return bytes; } - private static void test_multi(int iters) { + private static void test_multi(int iters) throws Exception { int len1 = 8; // the 8B/iteration loop int len2 = 32; // the 32B/iteration loop int len3 = 4096; // the 4KB/iteration loop @@ -185,37 +253,31 @@ public class TestCRC32C { (len1+len2+len3)*2+5, (len1+len2+len3)*2+7, (len1+len2+len3)*3, (len1+len2+len3)*3-1, (len1+len2+len3)*3-3, (len1+len2+len3)*3-5, (len1+len2+len3)*3-7 }; - CRC32C[] crc0 = new CRC32C[offsets.length*sizes.length]; CRC32C[] crc1 = new CRC32C[offsets.length*sizes.length]; + long[] crcReference = new long[offsets.length*sizes.length]; int i, j, k; System.out.printf("testing %d cases ...\n", offsets.length*sizes.length); - /* set the result from interpreter as reference */ + // Initialize CRC32C result arrays, CRC32C reference array. + // Reference is calculated using a very basic Java implementation. for (i = 0; i < offsets.length; i++) { for (j = 0; j < sizes.length; j++) { - crc0[i*sizes.length + j] = new CRC32C(); crc1[i*sizes.length + j] = new CRC32C(); - crc0[i*sizes.length + j].update(b, offsets[i], sizes[j]); + crcReference[i*sizes.length + j] = update_byteLoop(0, b, offsets[i], sizes[j]); } } - /* warm up the JIT compiler and get result */ + // Warm up the JIT compiler. Over time, all methods involved will + // be executed by the interpreter, then get compiled by c1 and + // finally by c2. Each calculated CRC value must, in each iteration, + // be equal to the precalculated reference value for the test to pass. for (k = 0; k < iters; k++) { for (i = 0; i < offsets.length; i++) { for (j = 0; j < sizes.length; j++) { crc1[i*sizes.length + j].reset(); crc1[i*sizes.length + j].update(b, offsets[i], sizes[j]); - } - } - } - - /* check correctness */ - for (i = 0; i < offsets.length; i++) { - for (j = 0; j < sizes.length; j++) { - if (!check(crc0[i*sizes.length + j], crc1[i*sizes.length + j])) { - System.out.printf("offsets[%d] = %d", i, offsets[i]); - System.out.printf("\tsizes[%d] = %d\n", j, sizes[j]); + check(crc1[i*sizes.length + j], crcReference[i*sizes.length + j]); } } } diff --git a/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java b/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java index d9f2ddb1721..7fdd282033d 100644 --- a/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java +++ b/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java @@ -23,7 +23,6 @@ /** * @test - * @modules java.base/jdk.internal.misc * @library /test/lib / * * @run driver compiler.jsr292.ContinuousCallSiteTargetChange @@ -31,6 +30,7 @@ package compiler.jsr292; +import jdk.test.lib.Asserts; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; @@ -39,15 +39,26 @@ import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.lang.invoke.MutableCallSite; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; public class ContinuousCallSiteTargetChange { - static void testServer() throws Exception { + static final int ITERATIONS = Integer.parseInt(System.getProperty("iterations", "50")); + + static void runTest(Class test, String... extraArgs) throws Exception { + List argsList = new ArrayList<>( + List.of("-XX:+IgnoreUnrecognizedVMOptions", + "-XX:PerBytecodeRecompilationCutoff=10", "-XX:PerMethodRecompilationCutoff=10", + "-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining")); + + argsList.addAll(Arrays.asList(extraArgs)); + + argsList.add(test.getName()); + argsList.add(Integer.toString(ITERATIONS)); + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "-XX:+IgnoreUnrecognizedVMOptions", - "-server", "-XX:-TieredCompilation", "-Xbatch", - "-XX:PerBytecodeRecompilationCutoff=10", "-XX:PerMethodRecompilationCutoff=10", - "-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining", - Test.class.getName(), "100"); + argsList.toArray(new String[argsList.size()])); OutputAnalyzer analyzer = new OutputAnalyzer(pb.start()); @@ -55,30 +66,42 @@ public class ContinuousCallSiteTargetChange { analyzer.shouldNotContain("made not compilable"); analyzer.shouldNotContain("decompile_count > PerMethodRecompilationCutoff"); + } - static void testClient() throws Exception { - ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "-XX:+IgnoreUnrecognizedVMOptions", - "-client", "-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "-Xbatch", - "-XX:PerBytecodeRecompilationCutoff=10", "-XX:PerMethodRecompilationCutoff=10", - "-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining", - Test.class.getName(), "100"); + static void testServer(Class test, String... args) throws Exception { + List extraArgsList = new ArrayList<>( + List.of("-server", "-XX:-TieredCompilation")); + extraArgsList.addAll(Arrays.asList(args)); - OutputAnalyzer analyzer = new OutputAnalyzer(pb.start()); + runTest(test, extraArgsList.toArray(new String[extraArgsList.size()])); + } - analyzer.shouldHaveExitValue(0); + static void testClient(Class test, String... args) throws Exception { + List extraArgsList = new ArrayList<>( + List.of("-client", "-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1")); + extraArgsList.addAll(Arrays.asList(args)); - analyzer.shouldNotContain("made not compilable"); - analyzer.shouldNotContain("decompile_count > PerMethodRecompilationCutoff"); + runTest(test, extraArgsList.toArray(new String[extraArgsList.size()])); } public static void main(String[] args) throws Exception { - testServer(); - testClient(); + testServer(RecompilationTest.class, "-Xbatch"); + testClient(RecompilationTest.class, "-Xbatch"); + + testServer(PingPongTest.class); + testClient(PingPongTest.class); } - static class Test { + static MethodHandle findStatic(Class cls, String name, MethodType mt) { + try { + return MethodHandles.lookup().findStatic(cls, name, mt); + } catch (Exception e) { + throw new Error(e); + } + } + + static class RecompilationTest { static final MethodType mt = MethodType.methodType(void.class); static final CallSite cs = new MutableCallSite(mt); @@ -96,7 +119,7 @@ public class ContinuousCallSiteTargetChange { } static void iteration() throws Throwable { - MethodHandle mh1 = MethodHandles.lookup().findStatic(ContinuousCallSiteTargetChange.Test.class, "f", mt); + MethodHandle mh1 = findStatic(RecompilationTest.class, "f", mt); cs.setTarget(mh1); for (int i = 0; i < 20_000; i++) { test1(); @@ -111,4 +134,38 @@ public class ContinuousCallSiteTargetChange { } } } + + static class PingPongTest { + static final MethodType mt = MethodType.methodType(void.class); + static final CallSite cs = new MutableCallSite(mt); + + static final MethodHandle mh = cs.dynamicInvoker(); + + static final MethodHandle ping = findStatic(PingPongTest.class, "ping", mt); + static final MethodHandle pong = findStatic(PingPongTest.class, "pong", mt); + + static void ping() { + Asserts.assertEQ(cs.getTarget(), ping, "wrong call site target"); + cs.setTarget(pong); + } + + static void pong() { + Asserts.assertEQ(cs.getTarget(), pong, "wrong call site target"); + cs.setTarget(ping); + } + + static void iteration() throws Throwable { + cs.setTarget(ping); + for (int i = 0; i < 20_000; i++) { + mh.invokeExact(); + } + } + + public static void main(String[] args) throws Throwable { + int iterations = Integer.parseInt(args[0]); + for (int i = 0; i < iterations; i++) { + iteration(); + } + } + } } diff --git a/hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java b/hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java new file mode 100644 index 00000000000..dbd9e0101fc --- /dev/null +++ b/hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java @@ -0,0 +1,56 @@ +package compiler.jsr292; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; +import java.lang.invoke.MethodHandleHelper; +import jdk.internal.vm.annotation.ForceInline; + +/* + * @test + * @bug 8166110 + * @library /test/lib / patches + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.vm.annotation + * + * @build java.base/java.lang.invoke.MethodHandleHelper + * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions -Xbatch -XX:-TieredCompilation + * compiler.jsr292.InvokerSignatureMismatch + */ +public class InvokerSignatureMismatch { + + static final MethodHandle INT_MH; + + static { + MethodHandle mhI = null; + try { + mhI = MethodHandles.lookup().findStatic(InvokerSignatureMismatch.class, "bodyI", MethodType.methodType(void.class, int.class)); + } catch (Throwable e) { + } + INT_MH = mhI; + } + + public static void main(String[] args) throws Throwable { + for (int i = 0; i < 50_000; i++) { // OSR + mainLink(i); + mainInvoke(i); + } + } + + static void mainLink(int i) throws Throwable { + Object name = MethodHandleHelper.internalMemberName(INT_MH); + MethodHandleHelper.linkToStatic(INT_MH, (float) i, name); + } + + static void mainInvoke(int i) throws Throwable { + MethodHandleHelper.invokeBasicV(INT_MH, (float) i); + } + + static int cnt = 0; + static void bodyI(int x) { + if ((x & 1023) == 0) { // already optimized x % 1024 == 0 + ++cnt; + } + } + +} diff --git a/hotspot/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java b/hotspot/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java index e923258e480..e792ad170c9 100644 --- a/hotspot/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java +++ b/hotspot/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java @@ -32,7 +32,7 @@ * java.management * jdk.attach * - * @run main/othervm compiler.jsr292.RedefineMethodUsedByMultipleMethodHandles + * @run main/othervm -Djdk.attach.allowAttachSelf compiler.jsr292.RedefineMethodUsedByMultipleMethodHandles */ package compiler.jsr292; diff --git a/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java b/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java index a4732624a3a..f19244b8388 100644 --- a/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java +++ b/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java @@ -43,6 +43,21 @@ public class MethodHandleHelper { mh.customize(); } + @ForceInline + public static Object internalMemberName(MethodHandle mh) throws Throwable { + return mh.internalMemberName(); + } + + @ForceInline + public static void linkToStatic(MethodHandle mh, float arg, Object name) throws Throwable { + MethodHandle.linkToStatic(mh, arg, name); + } + + @ForceInline + public static void invokeBasicV(MethodHandle mh, float arg) throws Throwable { + mh.invokeBasic(arg); + } + @ForceInline public static Object invokeBasicL(MethodHandle mh) throws Throwable { return mh.invokeBasic(); diff --git a/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java b/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java index 481334f4ca4..3d01b4adbd9 100644 --- a/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java +++ b/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java @@ -27,10 +27,10 @@ * @requires vm.jvmci * @library /test/lib / * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.runtime * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=true - * -XX:+EnableJVMCI + * -XX:+EnableJVMCI -Djvmci.Compiler=null * compiler.jvmci.JVM_GetJVMCIRuntimeTest * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=false @@ -39,7 +39,7 @@ * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=true * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.threaded=true - * -XX:+EnableJVMCI + * -XX:+EnableJVMCI -Djvmci.Compiler=null * compiler.jvmci.JVM_GetJVMCIRuntimeTest * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=false diff --git a/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java b/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java index b86cfbf6dd9..a52e19b3817 100644 --- a/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java +++ b/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java @@ -28,8 +28,8 @@ * @library /test/lib / * @library common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions * -XX:+EnableJVMCI * compiler.jvmci.SecurityRestrictionsTest diff --git a/hotspot/test/compiler/jvmci/TestJVMCIPrintProperties.java b/hotspot/test/compiler/jvmci/TestJVMCIPrintProperties.java index 4f40c5b8a2d..2779db7b213 100644 --- a/hotspot/test/compiler/jvmci/TestJVMCIPrintProperties.java +++ b/hotspot/test/compiler/jvmci/TestJVMCIPrintProperties.java @@ -36,11 +36,11 @@ public class TestJVMCIPrintProperties { public static void main(String[] args) throws Exception { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "-XX:+UnlockExperimentalVMOptions", - "-XX:+EnableJVMCI", + "-XX:+EnableJVMCI", "-Djvmci.Compiler=null", "-XX:+JVMCIPrintProperties"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldContain("[JVMCI properties]"); // expected message - output.shouldContain("jvmci.Compiler = null"); // expected message + output.shouldContain("jvmci.Compiler := \"null\""); // expected message output.shouldContain("jvmci.InitTimer = false"); // expected message output.shouldContain("jvmci.PrintConfig = false"); // expected message output.shouldContain("jvmci.TraceMethodDataFilter = null"); // expected message diff --git a/hotspot/test/compiler/jvmci/common/CTVMUtilities.java b/hotspot/test/compiler/jvmci/common/CTVMUtilities.java index 7ba6d00debf..7f32d95855d 100644 --- a/hotspot/test/compiler/jvmci/common/CTVMUtilities.java +++ b/hotspot/test/compiler/jvmci/common/CTVMUtilities.java @@ -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 @@ -41,7 +41,6 @@ import java.lang.reflect.Executable; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.lang.reflect.Parameter; import java.util.HashMap; import java.util.Map; diff --git a/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java b/hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java similarity index 98% rename from hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java rename to hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java index fc03353f76a..1cdee2d2974 100644 --- a/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java +++ b/hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java @@ -48,6 +48,10 @@ public class CompilerToVMHelper { return CTVM.getExceptionTableStart((HotSpotResolvedJavaMethodImpl)method); } + public static Object getFlagValue(String name) { + return CTVM.getFlagValue(name); + } + public static boolean isCompilable(HotSpotResolvedJavaMethod method) { return CTVM.isCompilable((HotSpotResolvedJavaMethodImpl)method); } @@ -128,7 +132,7 @@ public class CompilerToVMHelper { } public static HotSpotResolvedObjectType resolveFieldInPool( - ConstantPool constantPool, int cpi, ResolvedJavaMethod method, byte opcode, long[] info) { + ConstantPool constantPool, int cpi, ResolvedJavaMethod method, byte opcode, int[] info) { return CTVM.resolveFieldInPool((HotSpotConstantPool) constantPool, cpi, (HotSpotResolvedJavaMethodImpl) method, opcode, info); } diff --git a/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/MetaAccessWrapper.java b/hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/MetaAccessWrapper.java similarity index 100% rename from hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/MetaAccessWrapper.java rename to hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/MetaAccessWrapper.java diff --git a/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/PublicMetaspaceWrapperObject.java b/hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/PublicMetaspaceWrapperObject.java similarity index 100% rename from hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/PublicMetaspaceWrapperObject.java rename to hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/PublicMetaspaceWrapperObject.java diff --git a/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java b/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java index adfece82f94..7aaf6bd4cb9 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/AsResolvedJavaMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/AsResolvedJavaMethodTest.java index 09e8f0e2b5b..92b00bd48a6 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/AsResolvedJavaMethodTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/AsResolvedJavaMethodTest.java @@ -30,11 +30,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.AsResolvedJavaMethodTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java b/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java index 507c56987d7..f729894dd55 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java @@ -28,8 +28,8 @@ * @library / /test/lib/ * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run main/othervm -XX:+UnlockExperimentalVMOptions * -XX:+EnableJVMCI * -XX:JVMCICounterSize=0 diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestCase.java b/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestCase.java index 6f2ccb0f3c0..f799f0c2734 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestCase.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestCase.java @@ -202,13 +202,13 @@ public class ConstantPoolTestCase { public final String type; public final ResolvedJavaMethod[] methods; public final byte[] opcodes; - public final long accFlags; + public final int accFlags; - public TestedCPEntry(String klass, String name, String type, byte[] opcodes, long accFlags) { + public TestedCPEntry(String klass, String name, String type, byte[] opcodes, int accFlags) { this(klass, name, type, null, opcodes, accFlags); } - public TestedCPEntry(String klass, String name, String type, ResolvedJavaMethod[] methods, byte[] opcodes, long accFlags) { + public TestedCPEntry(String klass, String name, String type, ResolvedJavaMethod[] methods, byte[] opcodes, int accFlags) { this.klass = klass; this.name = name; this.type = type; diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java b/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java index e0bb9d41c8e..0ac7f3d6a6f 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java @@ -206,7 +206,7 @@ public class ConstantPoolTestsHelper { "stringFieldEmpty", "Ljava/lang/String;", new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD}, - 0L), + 0), } ); CP_MAP_FOR_CLASS.put(CONSTANT_METHODREF, @@ -362,7 +362,7 @@ public class ConstantPoolTestsHelper { "stringFieldEmpty", "Ljava/lang/String;", new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD}, - 0L), + 0), } ); CP_MAP_FOR_ABS_CLASS.put(CONSTANT_METHODREF, diff --git a/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java b/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java index 806c2e7e349..a66a448b5b1 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java @@ -28,8 +28,8 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm compiler.jvmci.compilerToVM.DebugOutputTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java b/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java index 9101d2a66e5..09f9b94d426 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build sun.hotspot.WhiteBox * compiler.jvmci.compilerToVM.DisassembleCodeBlobTest * @run driver ClassFileInstaller sun.hotspot.WhiteBox diff --git a/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java b/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java index 57e2e1fea1c..e8c9a086253 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java @@ -30,15 +30,16 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.DoNotInlineOrCompileTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java index 5d7c4d376ba..02e4b68c938 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java @@ -21,6 +21,26 @@ * questions. */ +/* + * @test + * @bug 8136421 + * @requires vm.jvmci + * @library /test/lib / + * @library ../common/patches + * @modules java.base/jdk.internal.misc + * @modules java.base/jdk.internal.org.objectweb.asm + * java.base/jdk.internal.org.objectweb.asm.tree + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xbootclasspath/a:. + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * compiler.jvmci.compilerToVM.ExecuteInstalledCodeTest + */ + package compiler.jvmci.compilerToVM; import jdk.test.lib.Asserts; @@ -36,26 +56,6 @@ import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List; -/* - * @test - * @bug 8136421 - * @requires vm.jvmci - * @library /test/lib / - * @library ../common/patches - * @modules java.base/jdk.internal.misc - * @modules java.base/jdk.internal.org.objectweb.asm - * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox - * @run driver ClassFileInstaller sun.hotspot.WhiteBox - * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -Xbootclasspath/a:. - * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * compiler.jvmci.compilerToVM.ExecuteInstalledCodeTest - */ - public class ExecuteInstalledCodeTest { public static void main(String[] args) { diff --git a/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java index 4f39cf05c6c..82d5d10d46c 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java @@ -30,12 +30,13 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.FindUniqueConcreteMethodTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java index e959482d0f1..0cdcbc9f88b 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java @@ -30,10 +30,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetBytecodeTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java index 5dcc9f4e7e7..51cc6392cec 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java @@ -28,9 +28,10 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetClassInitializerTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java index 2aa39371567..7b51c257da0 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java @@ -29,15 +29,16 @@ * @library ../common/patches * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm - java.base/jdk.internal.org.objectweb.asm.tree - jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code + * java.base/jdk.internal.org.objectweb.asm.tree + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetConstantPoolTest */ package compiler.jvmci.compilerToVM; diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java index af7c9bb8985..66386522965 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java @@ -30,10 +30,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetExceptionTableTest */ @@ -137,4 +138,3 @@ public class GetExceptionTableTest { } } } - diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java new file mode 100644 index 00000000000..b074ca8140d --- /dev/null +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173912 + * @requires vm.jvmci + * @library / /test/lib + * @library ../common/patches + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:+open + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * compiler.jvmci.compilerToVM.GetFlagValueTest + */ + +package compiler.jvmci.compilerToVM; + +import jdk.test.lib.Asserts; +import jdk.vm.ci.hotspot.CompilerToVMHelper; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import java.math.BigInteger; +import java.util.Arrays; +import java.util.regex.Pattern; +import java.util.regex.Matcher; +import sun.hotspot.WhiteBox; + +public class GetFlagValueTest { + public static void main(String[] args) throws Exception { + try { + CompilerToVMHelper.getFlagValue(null); + Asserts.fail("Expected NullPointerException when calling getFlagValue(null)"); + } catch (NullPointerException e) { + // expected + } + + Object missing = CompilerToVMHelper.getFlagValue("this is surely not a flag"); + Asserts.assertEquals(CompilerToVMHelper.CTVM, missing); + + ProcessBuilder pb; + OutputAnalyzer out; + + String[] arguments = {"-XX:+UnlockExperimentalVMOptions", "-XX:+EnableJVMCI", "-XX:+PrintFlagsFinal", "-version"}; + pb = ProcessTools.createJavaProcessBuilder(arguments); + out = new OutputAnalyzer(pb.start()); + + out.shouldHaveExitValue(0); + String[] lines = out.getStdout().split("\\r?\\n"); + Asserts.assertTrue(lines.length > 1, "Expected output from -XX:+PrintFlagsFinal"); + + final WhiteBox wb = WhiteBox.getWhiteBox(); + + // Line example: ccstr PrintIdealGraphAddress = 127.0.0.1 {C2 notproduct} {default} + Pattern flagLine = Pattern.compile("(\\w+)\\s+(\\w+)\\s+:?= (?:(.+))\\{[^}]+\\}\\s+\\{[^}]+\\}"); + for (String line : lines) { + if (line.indexOf('=') != -1) { + line = line.trim(); + Matcher m = flagLine.matcher(line); + Asserts.assertTrue(m.matches(), "Unexpected line in -XX:+PrintFlagsFinal output: " + line); + String type = m.group(1); + String name = m.group(2); + String expect = m.group(3).trim(); + Object value = CompilerToVMHelper.getFlagValue(name); + Object wbValue = wb.getVMFlag(name); + Asserts.assertEquals(value, wbValue, "Value of flag " + name); + } + } + } +} diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java index 3811c74abf6..9b33cc6fb48 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java @@ -28,9 +28,10 @@ * @library / /test/lib/ * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetImplementorTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java index 33b20f2f4bb..b6518820926 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java @@ -31,10 +31,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetLineNumberTableTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java index 8202d1260c1..53d0ce5c2da 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java @@ -30,14 +30,15 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * @clean compiler.jvmci.compilerToVM.* * @compile -g DummyInterface.java * @compile -g DummyAbstractClass.java * @compile -g DummyClass.java - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetLocalVariableTableTest * @clean compiler.jvmci.compilerToVM.* */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java index 0923e10c9b7..bf43ca431b6 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java @@ -28,8 +28,8 @@ * @library / /test/lib/ * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetMaxCallTargetOffsetTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java index 0b079f3741f..10a75a81402 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java @@ -30,11 +30,12 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetNextStackFrameTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java index b50dd8e1e2e..b7d4b5d0ae7 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java @@ -28,16 +28,17 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc:+open - * @modules jdk.vm.ci/jdk.vm.ci.hotspot:+open + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:+open * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper - * jdk.vm.ci/jdk.vm.ci.hotspot.PublicMetaspaceWrapperObject + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot.PublicMetaspaceWrapperObject * sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetResolvedJavaMethodTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java index 483f1416e93..39a40d39a9d 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java @@ -28,11 +28,11 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper - * jdk.vm.ci/jdk.vm.ci.hotspot.PublicMetaspaceWrapperObject + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot.PublicMetaspaceWrapperObject * sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission @@ -44,7 +44,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * -XX:-UseCompressedOops + * -XX:-UseCompressedOops -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetResolvedJavaTypeTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java index 0c3e4ba92cc..d24806720ea 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java @@ -30,10 +30,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetStackTraceElementTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java index 87c40534e7b..bde201af7ab 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java @@ -30,11 +30,12 @@ * @modules java.base/jdk.internal.misc:+open * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * @modules jdk.vm.ci/jdk.vm.ci.hotspot:+open - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:+open + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetSymbolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java index 8cfc1d89cf9..fbe44716b71 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java @@ -30,10 +30,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.GetVtableIndexForInterfaceTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java b/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java index 969a7f6d5ff..f9e50cb69f8 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java @@ -30,16 +30,16 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * -XX:-BackgroundCompilation + * -XX:-BackgroundCompilation -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.HasCompiledCodeForOSRTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java b/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java index 57ec63acd3e..ad4319de20e 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java @@ -28,10 +28,11 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * compiler.jvmci.compilerToVM.HasFinalizableSubclassTest + * -Djvmci.Compiler=null + * compiler.jvmci.compilerToVM.HasFinalizableSubclassTest */ package compiler.jvmci.compilerToVM; diff --git a/hotspot/test/compiler/jvmci/compilerToVM/HasNeverInlineDirectiveTest.java b/hotspot/test/compiler/jvmci/compilerToVM/HasNeverInlineDirectiveTest.java index 7efd8d2d994..12b808f072f 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/HasNeverInlineDirectiveTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/HasNeverInlineDirectiveTest.java @@ -30,15 +30,16 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.HasNeverInlineDirectiveTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java index 828dc7788d5..de6f2f6f1a3 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java @@ -30,11 +30,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.runtime * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build compiler.jvmci.compilerToVM.InvalidateInstalledCodeTest * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox @@ -42,6 +42,7 @@ * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.InvalidateInstalledCodeTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java index 02436906636..ce0f5335270 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java @@ -30,19 +30,21 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.IsCompilableTest * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.IsCompilableTest */ @@ -69,20 +71,17 @@ public class IsCompilableTest { } private static void runSanityTest(Executable aMethod) { - boolean UseJVMCICompiler = (Boolean) WB.getVMFlag("UseJVMCICompiler"); HotSpotResolvedJavaMethod method = CTVMUtilities .getResolvedMethod(aMethod); boolean isCompilable = CompilerToVMHelper.isCompilable(method); - boolean expected = UseJVMCICompiler || WB.isMethodCompilable(aMethod); + boolean expected = WB.isMethodCompilable(aMethod); Asserts.assertEQ(isCompilable, expected, "Unexpected initial " + "value of property 'compilable'"); - if (!UseJVMCICompiler) { - WB.makeMethodNotCompilable(aMethod); - isCompilable = CompilerToVMHelper.isCompilable(method); - Asserts.assertFalse(isCompilable, aMethod + "Unexpected value of " + - "property 'isCompilable' after setting 'compilable' to false"); - } + WB.makeMethodNotCompilable(aMethod); + isCompilable = CompilerToVMHelper.isCompilable(method); + Asserts.assertFalse(isCompilable, aMethod + "Unexpected value of " + + "property 'isCompilable' after setting 'compilable' to false"); } private static List createTestCases() { diff --git a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java index e1427d0becb..329990e2a7d 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java @@ -28,9 +28,9 @@ * @library / /test/lib * ../common/patches * @modules java.base/jdk.internal.misc - * jdk.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.hotspot * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission diff --git a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java new file mode 100644 index 00000000000..b748403c2b0 --- /dev/null +++ b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8136421 + * @requires vm.jvmci + * @library / /test/lib + * ../common/patches + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.org.objectweb.asm + * java.base/jdk.internal.org.objectweb.asm.tree + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbatch + * -Djvmci.Compiler=null + * compiler.jvmci.compilerToVM.IsMatureVsReprofileTest + */ + +package compiler.jvmci.compilerToVM; + +import compiler.jvmci.common.CTVMUtilities; +import compiler.jvmci.common.testcases.SimpleClass; +import jdk.vm.ci.hotspot.CompilerToVMHelper; +import jdk.test.lib.Asserts; +import sun.hotspot.WhiteBox; +import compiler.whitebox.CompilerWhiteBoxTest; +import java.lang.reflect.Executable; +import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod; +import jdk.test.lib.Platform; + +public class IsMatureVsReprofileTest { + private static final WhiteBox WB = WhiteBox.getWhiteBox(); + private static final boolean TIERED = WB.getBooleanVMFlag("TieredCompilation"); + private static final boolean IS_XCOMP = Platform.isComp(); + + public static void main(String[] args) throws Exception { + new IsMatureVsReprofileTest().test(); + } + + public void test() throws Exception { + SimpleClass sclass = new SimpleClass(); + Executable method = SimpleClass.class.getDeclaredMethod("testMethod"); + long metaspaceMethodData = WB.getMethodData(method); + Asserts.assertEQ(metaspaceMethodData, 0L, "MDO should be null for a " + + "never invoked method"); + boolean isMature = CompilerToVMHelper.isMature(metaspaceMethodData); + Asserts.assertFalse(isMature, "null MDO can't be mature"); + for (int i = 0; i < CompilerWhiteBoxTest.THRESHOLD; i++) { + sclass.testMethod(); + } + Asserts.assertTrue(WB.isMethodCompiled(method), + "Method should be compiled"); + metaspaceMethodData = WB.getMethodData(method); + Asserts.assertNE(metaspaceMethodData, 0L, + "Multiple times invoked method should have MDO"); + isMature = CompilerToVMHelper.isMature(metaspaceMethodData); + /* a method is not mature for -Xcomp and -Tiered, + see NonTieredCompPolicy::is_mature */ + Asserts.assertEQ(!IS_XCOMP || TIERED, isMature, + "Unexpected isMature state for compiled method"); + HotSpotResolvedJavaMethod resolvedMethod + = CTVMUtilities.getResolvedMethod(method); + CompilerToVMHelper.reprofile(resolvedMethod); + Asserts.assertFalse(WB.isMethodCompiled(method), + "Unexpected method compilation state after reprofile"); + metaspaceMethodData = WB.getMethodData(method); + isMature = CompilerToVMHelper.isMature(metaspaceMethodData); + Asserts.assertNE(metaspaceMethodData, 0L, + "Got null MDO after reprofile"); + Asserts.assertEQ(TIERED && IS_XCOMP, isMature, + "Got unexpected isMature state after reprofiling"); + } +} diff --git a/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java b/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java index 826868ae54d..0c0e60bfd39 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java @@ -27,8 +27,8 @@ * @requires vm.jvmci * @library /test/lib / * @modules java.base/jdk.internal.misc:open - * @modules jdk.vm.ci/jdk.vm.ci.hotspot:open - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:open + * jdk.internal.vm.ci/jdk.vm.ci.runtime * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.compilerToVM.JVM_RegisterJVMCINatives.positive=true * -XX:+EnableJVMCI diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java index 690ef34b195..4b7e81e4b80 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java @@ -32,16 +32,17 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupKlassInPoolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java index e53d695161d..d952505718a 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java @@ -31,15 +31,16 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupKlassRefIndexInPoolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java index f6d139c3b05..42bd66cd30f 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java @@ -31,15 +31,16 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupMethodInPoolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java index ed376e04e41..e75a531b4e4 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java @@ -31,15 +31,16 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupNameAndTypeRefIndexInPoolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java index e01f023f716..91b7867d6a2 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java @@ -31,16 +31,17 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupNameInPoolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java index 3dc8a64bdd2..0953363e67e 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java @@ -31,16 +31,17 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupSignatureInPoolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java index 225da6983e4..2b838bc0bd8 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java @@ -28,9 +28,10 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.LookupTypeTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java index dee13cfef8d..8e919fb5ba9 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java @@ -32,28 +32,60 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -Xmixed -Xbootclasspath/a:. + * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * -XX:CompileCommand=exclude,*::check + * -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 + * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay - * -Xbatch + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest - * @run main/othervm -Xmixed -Xbootclasspath/a:. + * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * -XX:CompileCommand=exclude,*::check + * -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 + * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay - * -Xbatch + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false + * -Djvmci.Compiler=null + * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest + * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 + * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse + * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true + * -Djvmci.Compiler=null + * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest + * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 + * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse + * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest */ @@ -72,25 +104,41 @@ import java.lang.reflect.Method; public class MaterializeVirtualObjectTest { private static final WhiteBox WB; - private static final Method METHOD; - private static final ResolvedJavaMethod RESOLVED_METHOD; private static final boolean INVALIDATE; private static final int COMPILE_THRESHOLD; + private static final Method MATERIALIZED_METHOD; + private static final Method NOT_MATERIALIZED_METHOD; + private static final ResolvedJavaMethod MATERIALIZED_RESOLVED; + private static final ResolvedJavaMethod NOT_MATERIALIZED_RESOLVED; + private static final boolean MATERIALIZE_FIRST; static { + Method method1; + Method method2; WB = WhiteBox.getWhiteBox(); try { - METHOD = MaterializeVirtualObjectTest.class.getDeclaredMethod( - "testFrame", String.class, int.class); + method1 = MaterializeVirtualObjectTest.class.getDeclaredMethod("testFrame", + String.class, int.class); + method2 = MaterializeVirtualObjectTest.class.getDeclaredMethod("testFrame2", + String.class, int.class); } catch (NoSuchMethodException e) { throw new Error("Can't get executable for test method", e); } - RESOLVED_METHOD = CTVMUtilities.getResolvedMethod(METHOD); + ResolvedJavaMethod resolved1; + ResolvedJavaMethod resolved2; + resolved1 = CTVMUtilities.getResolvedMethod(method1); + resolved2 = CTVMUtilities.getResolvedMethod(method2); INVALIDATE = Boolean.getBoolean( "compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate"); COMPILE_THRESHOLD = WB.getBooleanVMFlag("TieredCompilation") ? CompilerWhiteBoxTest.THRESHOLD : CompilerWhiteBoxTest.THRESHOLD * 2; + MATERIALIZE_FIRST = Boolean.getBoolean( + "compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst"); + MATERIALIZED_RESOLVED = MATERIALIZE_FIRST ? resolved1 : resolved2; + NOT_MATERIALIZED_RESOLVED = MATERIALIZE_FIRST ? resolved2 : resolved1; + MATERIALIZED_METHOD = MATERIALIZE_FIRST ? method1 : method2; + NOT_MATERIALIZED_METHOD = MATERIALIZE_FIRST ? method2 : method1; } public static void main(String[] args) { @@ -105,47 +153,87 @@ public class MaterializeVirtualObjectTest { } private static String getName() { - return "CASE: invalidate=" + INVALIDATE; + return "CASE: invalidate=" + INVALIDATE + ", materializedMethod=" + + (MATERIALIZE_FIRST ? "testFrame" : "testFrame2") + + ", notMaterializedMethod=" + + (MATERIALIZE_FIRST ? "testFrame2" : "testFrame"); } private void test() { System.out.println(getName()); - Asserts.assertFalse(WB.isMethodCompiled(METHOD), getName() - + " : method unexpectedly compiled"); - /* need to trigger compilation by multiple method invocations - in order to have method profile data to be gathered */ - for (int i = 0; i < COMPILE_THRESHOLD; i++) { + Asserts.assertFalse(WB.isMethodCompiled(MATERIALIZED_METHOD), + getName() + " : materialized method is compiled"); + Asserts.assertFalse(WB.isMethodCompiled(NOT_MATERIALIZED_METHOD), + getName() + " : not materialized method is compiled"); + for (int i = 0; i < CompilerWhiteBoxTest.THRESHOLD; i++) { testFrame("someString", i); } - Asserts.assertTrue(WB.isMethodCompiled(METHOD), getName() - + "Method unexpectedly not compiled"); - testFrame("someString", COMPILE_THRESHOLD); + Asserts.assertTrue(WB.isMethodCompiled(MATERIALIZED_METHOD), getName() + + " : materialized method not compiled"); + Asserts.assertTrue(WB.isMethodCompiled(NOT_MATERIALIZED_METHOD), + getName() + " : not materialized method not compiled"); + testFrame("someString", /* materialize */ CompilerWhiteBoxTest.THRESHOLD); } private void testFrame(String str, int iteration) { Helper helper = new Helper(str); - check(iteration); + testFrame2(str, iteration); Asserts.assertTrue((helper.string != null) && (this != null) - && (helper != null), getName() + " : some locals are null"); + && (helper != null), String.format("%s : some locals are null", getName())); + } + + private void testFrame2(String str, int iteration) { + Helper helper = new Helper(str); + recurse(2, iteration); + Asserts.assertTrue((helper.string != null) && (this != null) + && (helper != null), String.format("%s : some locals are null", getName())); + } + + private void recurse(int depth, int iteration) { + if (depth == 0) { + check(iteration); + } else { + Integer s = new Integer(depth); + recurse(depth - 1, iteration); + Asserts.assertEQ(s.intValue(), depth, + String.format("different values: %s != %s", s.intValue(), depth)); + } } private void check(int iteration) { // Materialize virtual objects on last invocation if (iteration == COMPILE_THRESHOLD) { - HotSpotStackFrameReference hsFrame = CompilerToVMHelper - .getNextStackFrame(/* topmost frame */ null, - new ResolvedJavaMethod[]{ - RESOLVED_METHOD}, /* don't skip any */ 0); - Asserts.assertNotNull(hsFrame, getName() + " : got null frame"); - Asserts.assertTrue(WB.isMethodCompiled(METHOD), getName() - + "Test method should be compiled"); - Asserts.assertTrue(hsFrame.hasVirtualObjects(), getName() - + ": has no virtual object before materialization"); - CompilerToVMHelper.materializeVirtualObjects(hsFrame, INVALIDATE); - Asserts.assertFalse(hsFrame.hasVirtualObjects(), getName() - + " : has virtual object after materialization"); - Asserts.assertEQ(WB.isMethodCompiled(METHOD), !INVALIDATE, getName() - + " : unexpected compiled status"); + // get frames and check not-null + HotSpotStackFrameReference materialized = CompilerToVMHelper.getNextStackFrame( + /* topmost frame */ null, new ResolvedJavaMethod[]{MATERIALIZED_RESOLVED}, + /* don't skip any */ 0); + Asserts.assertNotNull(materialized, getName() + + " : got null frame for materialized method"); + HotSpotStackFrameReference notMaterialized = CompilerToVMHelper.getNextStackFrame( + /* topmost frame */ null, new ResolvedJavaMethod[]{NOT_MATERIALIZED_RESOLVED}, + /* don't skip any */ 0); + Asserts.assertNE(materialized, notMaterialized, + "Got same frame pointer for both tested frames"); + Asserts.assertNotNull(notMaterialized, getName() + + " : got null frame for not materialized method"); + // check that frames has virtual objects before materialization stage + Asserts.assertTrue(materialized.hasVirtualObjects(), getName() + + ": materialized frame has no virtual object before materialization"); + Asserts.assertTrue(notMaterialized.hasVirtualObjects(), getName() + + ": notMaterialized frame has no virtual object before materialization"); + // materialize + CompilerToVMHelper.materializeVirtualObjects(materialized, INVALIDATE); + // check that only not materialized frame has virtual objects + Asserts.assertFalse(materialized.hasVirtualObjects(), getName() + + " : materialized has virtual object after materialization"); + Asserts.assertTrue(notMaterialized.hasVirtualObjects(), getName() + + " : notMaterialized has no virtual object after materialization"); + // check that materialized frame was deoptimized in case invalidate=true + Asserts.assertEQ(WB.isMethodCompiled(MATERIALIZED_METHOD), !INVALIDATE, getName() + + " : materialized method has unexpected compiled status"); + // check that not materialized frame wasn't deoptimized + Asserts.assertTrue(WB.isMethodCompiled(NOT_MATERIALIZED_METHOD), getName() + + " : not materialized method has unexpected compiled status"); } } diff --git a/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java b/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java index 6f87bcfcd2d..a854c6e798a 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java @@ -31,10 +31,11 @@ * @modules java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.MethodIsIgnoredBySecurityStackWalkTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java index 866756c5b42..080e0e81c9c 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java @@ -28,16 +28,18 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build compiler.jvmci.compilerToVM.ReadConfigurationTest * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ReadConfigurationTest */ package compiler.jvmci.compilerToVM; import jdk.test.lib.Asserts; +import jdk.vm.ci.hotspot.VMField; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; import jdk.vm.ci.hotspot.HotSpotVMConfigAccess; import jdk.vm.ci.hotspot.HotSpotVMConfigStore; @@ -49,10 +51,19 @@ public class ReadConfigurationTest { } private void runTest() { - TestHotSpotVMConfig config = new TestHotSpotVMConfig(HotSpotJVMCIRuntime.runtime().getConfigStore()); + HotSpotVMConfigStore store = HotSpotJVMCIRuntime.runtime().getConfigStore(); + TestHotSpotVMConfig config = new TestHotSpotVMConfig(store); Asserts.assertNE(config.codeCacheHighBound, 0L, "Got null address"); Asserts.assertNE(config.stubRoutineJintArrayCopy, 0L, "Got null address"); + for (VMField field : store.getFields().values()) { + Object value = field.value; + if (value != null) { + Asserts.assertTrue(value instanceof Long || value instanceof Boolean, + "Got unexpected value type for VM field " + field.name + ": " + value.getClass()); + } + } + for (VMIntrinsicMethod m : config.getStore().getIntrinsics()) { Asserts.assertNotNull(m); Asserts.assertNotNull(m.declaringClass); diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java index 9953d4c596a..c9e24fe4f2b 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java @@ -30,17 +30,17 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * -Xmixed -Xbatch + * -Xmixed -Xbatch -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ReprofileTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java index 63aef07deee..68709ee2d67 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java @@ -30,16 +30,17 @@ * @modules java.base/jdk.internal.misc * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ResolveConstantInPoolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java index 2ee506ba4f9..38e9ede8f7b 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java @@ -31,15 +31,16 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ResolveFieldInPoolTest */ @@ -103,7 +104,7 @@ public class ResolveFieldInPoolTest { cached = "cached "; } for (int j = 0; j < entry.opcodes.length; j++) { - long[] info = new long[2]; + int[] info = new int[3]; HotSpotResolvedObjectType fieldToVerify = CompilerToVMHelper.resolveFieldInPool(constantPoolCTVM, index, @@ -147,11 +148,11 @@ public class ResolveFieldInPoolTest { } catch (Exception ex) { throw new Error("Unexpected exception", ex); } - long offsetToRefer; + int offsetToRefer; if ((entry.accFlags & Opcodes.ACC_STATIC) != 0) { - offsetToRefer = UNSAFE.staticFieldOffset(fieldToRefer); + offsetToRefer = (int) UNSAFE.staticFieldOffset(fieldToRefer); } else { - offsetToRefer = UNSAFE.objectFieldOffset(fieldToRefer); + offsetToRefer = (int) UNSAFE.objectFieldOffset(fieldToRefer); } msg = String.format("Field offset returned by resolveFieldInPool" + " method is wrong for the field %s.%s" diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java index 248077d615e..99ac158f3c5 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java @@ -30,10 +30,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ResolveMethodTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java index ca91e75011f..1aa57ca8cc5 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java @@ -31,15 +31,16 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ResolvePossiblyCachedConstantInPoolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java index 3f48fd2f7b0..593ea7aa6e0 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java @@ -31,16 +31,17 @@ * @modules java.base/jdk.internal.misc * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ResolveTypeInPoolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java index 18a571ba660..0cefb66e711 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java @@ -28,8 +28,8 @@ * @library / /test/lib/ * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * -XX:+UnlockDiagnosticVMOptions * -XX:+DebugNonSafepoints diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java index 675a1364041..89801842a09 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java @@ -30,15 +30,16 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null * compiler.jvmci.compilerToVM.ShouldInlineMethodTest */ diff --git a/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java b/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java index 7ef5f8e4800..e9670786c9e 100644 --- a/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java +++ b/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java @@ -24,14 +24,15 @@ /** * @test * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common * @compile CodeInstallerTest.java - * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidCompilationResult + * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null compiler.jvmci.errors.TestInvalidCompilationResult */ package compiler.jvmci.errors; diff --git a/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java b/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java index 8d3e92b1912..0d3a583141c 100644 --- a/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java +++ b/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java @@ -24,14 +24,15 @@ /** * @test * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common * @compile CodeInstallerTest.java - * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidDebugInfo + * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null compiler.jvmci.errors.TestInvalidDebugInfo */ package compiler.jvmci.errors; diff --git a/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java b/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java index 2e3f5f65e97..ddab47481d8 100644 --- a/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java +++ b/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java @@ -24,14 +24,15 @@ /** * @test * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common * @compile CodeInstallerTest.java - * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidOopMap + * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null compiler.jvmci.errors.TestInvalidOopMap */ package compiler.jvmci.errors; diff --git a/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java b/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java index 84a4c90938b..f9e3392384a 100644 --- a/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java +++ b/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java @@ -30,12 +30,13 @@ * @modules java.base/jdk.internal.misc * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.services * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build compiler.jvmci.common.JVMCIHelpers * @run driver jdk.test.lib.FileInstaller ./JvmciNotifyBootstrapFinishedEventTest.config * ./META-INF/services/jdk.vm.ci.services.JVMCIServiceLocator diff --git a/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java b/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java index bb888c36a00..4e661d25b6d 100644 --- a/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java +++ b/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java @@ -30,13 +30,14 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.services * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build compiler.jvmci.common.JVMCIHelpers * @run driver jdk.test.lib.FileInstaller ./JvmciNotifyInstallEventTest.config * ./META-INF/services/jdk.vm.ci.services.JVMCIServiceLocator @@ -48,21 +49,14 @@ * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Xbootclasspath/a:. -Xmixed * -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI - * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=false * compiler.jvmci.events.JvmciNotifyInstallEventTest * @run main/othervm -XX:+UnlockExperimentalVMOptions - * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed + * -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed * -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI - * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=false * compiler.jvmci.events.JvmciNotifyInstallEventTest * @run main/othervm -XX:+UnlockExperimentalVMOptions - * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed + * -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed * -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI -XX:JVMCINMethodSizeLimit=0 - * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=false - * compiler.jvmci.events.JvmciNotifyInstallEventTest - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-EnableJVMCI - * -Djvmci.compiler=EmptyCompiler -Xbootclasspath/a:. -Xmixed - * -Dcompiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit=true * compiler.jvmci.events.JvmciNotifyInstallEventTest */ @@ -90,8 +84,6 @@ import java.lang.reflect.Method; public class JvmciNotifyInstallEventTest extends JVMCIServiceLocator implements HotSpotVMEventListener { private static final String METHOD_NAME = "testMethod"; - private static final boolean FAIL_ON_INIT = !Boolean.getBoolean( - "compiler.jvmci.events.JvmciNotifyInstallEventTest.failoninit"); private static volatile int gotInstallNotification = 0; public static void main(String args[]) { @@ -115,16 +107,9 @@ public class JvmciNotifyInstallEventTest extends JVMCIServiceLocator implements codeCache = (HotSpotCodeCacheProvider) HotSpotJVMCIRuntime.runtime() .getHostJVMCIBackend().getCodeCache(); } catch (InternalError ie) { - if (FAIL_ON_INIT) { - throw new AssertionError( - "Got unexpected InternalError trying to get code cache", - ie); - } // passed return; } - Asserts.assertTrue(FAIL_ON_INIT, - "Haven't caught InternalError in negative case"); Method testMethod; try { testMethod = SimpleClass.class.getDeclaredMethod(METHOD_NAME); diff --git a/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java b/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java index 76f6538bac6..40069651d59 100644 --- a/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java +++ b/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java @@ -27,10 +27,11 @@ * @requires vm.jvmci * @library /test/lib / * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.services * * @build compiler.jvmci.common.JVMCIHelpers * compiler.jvmci.events.JvmciShutdownEventListener diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java index 10a968f696c..135bb9284d1 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java @@ -25,15 +25,15 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.DataPatchTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.DataPatchTest */ package jdk.vm.ci.code.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java index 05d8bdb9c44..75d0748da52 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java @@ -24,16 +24,16 @@ /** * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.InterpreterFrameSizeTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.InterpreterFrameSizeTest */ package jdk.vm.ci.code.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java index 78965574ff2..a67fa2c1dfe 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java @@ -25,16 +25,16 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.common - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.common + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.MaxOopMapStackOffsetTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.MaxOopMapStackOffsetTest */ package jdk.vm.ci.code.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java index 49a52f8c01e..61f0e729fa4 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java @@ -25,14 +25,14 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library /test/lib / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java TestHotSpotVMConfig.java NativeCallTest.java TestAssembler.java sparc/SPARCTestAssembler.java amd64/AMD64TestAssembler.java * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbootclasspath/a:. jdk.vm.ci.code.test.NativeCallTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java index 908eaf6e79a..9b921140553 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java @@ -25,15 +25,15 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.SimpleCodeInstallationTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.SimpleCodeInstallationTest */ package jdk.vm.ci.code.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java index 6f3833ed9fd..5b2204868c4 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java @@ -25,15 +25,15 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.SimpleDebugInfoTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.SimpleDebugInfoTest */ package jdk.vm.ci.code.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java index c0dadbbc99e..a10e90acdaf 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java @@ -25,15 +25,15 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.VirtualObjectDebugInfoTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.code.test.VirtualObjectDebugInfoTest */ package jdk.vm.ci.code.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java index b3ee6312348..a9bba4a4bb6 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java @@ -24,9 +24,9 @@ /* * @test jdk.vm.ci.hotspot.test.HotSpotConstantReflectionProviderTest * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.hotspot + * @modules jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot * java.base/jdk.internal.vm.annotation * java.base/jdk.internal.misc * @library /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src @@ -34,7 +34,7 @@ * @run driver ClassFileInstaller jdk.vm.ci.hotspot.test.DummyClass * @run testng/othervm/timeout=300 -Xbootclasspath/a:. * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * jdk.vm.ci.hotspot.test.HotSpotConstantReflectionProviderTest + * -Djvmci.Compiler=null jdk.vm.ci.hotspot.test.HotSpotConstantReflectionProviderTest */ package jdk.vm.ci.hotspot.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderData.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderData.java index fcbc721caa8..1122bd7eb5d 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderData.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderData.java @@ -27,6 +27,7 @@ import java.lang.reflect.Field; import org.testng.annotations.DataProvider; +import sun.hotspot.WhiteBox; import jdk.internal.misc.Unsafe; import jdk.vm.ci.hotspot.HotSpotConstantReflectionProvider; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider; @@ -36,6 +37,10 @@ import jdk.vm.ci.meta.Constant; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.runtime.JVMCI; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; public class MemoryAccessProviderData { private static final Unsafe UNSAFE = Unsafe.getUnsafe(); @@ -43,6 +48,18 @@ public class MemoryAccessProviderData { private static final TestClass TEST_OBJECT = new TestClass(); private static final JavaConstant TEST_CONSTANT = CONSTANT_REFLECTION.forObject(TEST_OBJECT); private static final JavaConstant TEST_CLASS_CONSTANT = CONSTANT_REFLECTION.forObject(TestClass.class); + private static KindData[] PRIMITIVE_KIND_DATA = { + new KindData(JavaKind.Boolean, TEST_OBJECT), + new KindData(JavaKind.Byte, TEST_OBJECT), + new KindData(JavaKind.Char, TEST_OBJECT), + new KindData(JavaKind.Short, TEST_OBJECT), + new KindData(JavaKind.Int, TEST_OBJECT), + new KindData(JavaKind.Float, TEST_OBJECT), + new KindData(JavaKind.Long, TEST_OBJECT), + new KindData(JavaKind.Double, TEST_OBJECT) + }; + private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); + @DataProvider(name = "positiveObject") public static Object[][] getPositiveObjectJavaKind() { @@ -54,51 +71,40 @@ public class MemoryAccessProviderData { @DataProvider(name = "positivePrimitive") public static Object[][] getPositivePrimitiveJavaKinds() { - Field booleanField; - Field byteField; - Field shortField; - Field intField; - Field longField; - Field floatField; - Field doubleField; - Field charField; - try { - booleanField = MemoryAccessProviderData.TestClass.class.getDeclaredField("booleanField"); - byteField = MemoryAccessProviderData.TestClass.class.getDeclaredField("byteField"); - shortField = MemoryAccessProviderData.TestClass.class.getDeclaredField("shortField"); - intField = MemoryAccessProviderData.TestClass.class.getDeclaredField("intField"); - longField = MemoryAccessProviderData.TestClass.class.getDeclaredField("longField"); - floatField = MemoryAccessProviderData.TestClass.class.getDeclaredField("floatField"); - doubleField = MemoryAccessProviderData.TestClass.class.getDeclaredField("doubleField"); - charField = MemoryAccessProviderData.TestClass.class.getDeclaredField("charField"); - } catch (NoSuchFieldException e) { - throw new Error("TESTBUG: can't find test field " + e, e); + List result = new ArrayList<>(); + for (KindData k : PRIMITIVE_KIND_DATA) { + result.add(new Object[] {k.kind, TEST_CONSTANT, k.instanceFieldOffset, k.instanceFieldValue, Math.max(8, k.kind.getBitCount())}); + result.add(new Object[] {k.kind, TEST_CLASS_CONSTANT, k.staticFieldOffset, k.staticFieldValue, Math.max(8, k.kind.getBitCount())}); } - long booleanFieldOffset = UNSAFE.objectFieldOffset(booleanField); - long byteFieldOffset = UNSAFE.objectFieldOffset(byteField); - long shortFieldOffset = UNSAFE.objectFieldOffset(shortField); - long intFieldOffset = UNSAFE.objectFieldOffset(intField); - long longFieldOffset = UNSAFE.objectFieldOffset(longField); - long floatFieldOffset = UNSAFE.objectFieldOffset(floatField); - long doubleFieldOffset = UNSAFE.objectFieldOffset(doubleField); - long charFieldOffset = UNSAFE.objectFieldOffset(charField); - return new Object[][]{ - new Object[]{JavaKind.Boolean, TEST_CONSTANT, booleanFieldOffset, - JavaConstant.forBoolean(TEST_OBJECT.booleanField), 8}, - new Object[]{JavaKind.Byte, TEST_CONSTANT, byteFieldOffset, - JavaConstant.forByte(TEST_OBJECT.byteField), 8}, - new Object[]{JavaKind.Short, TEST_CONSTANT, shortFieldOffset, - JavaConstant.forShort(TEST_OBJECT.shortField), 16}, - new Object[]{JavaKind.Int, TEST_CONSTANT, intFieldOffset, - JavaConstant.forInt(TEST_OBJECT.intField), 32}, - new Object[]{JavaKind.Long, TEST_CONSTANT, longFieldOffset, - JavaConstant.forLong(TEST_OBJECT.longField), 64}, - new Object[]{JavaKind.Float, TEST_CONSTANT, floatFieldOffset, - JavaConstant.forFloat(TEST_OBJECT.floatField), 32}, - new Object[]{JavaKind.Double, TEST_CONSTANT, doubleFieldOffset, - JavaConstant.forDouble(TEST_OBJECT.doubleField), 64}, - new Object[]{JavaKind.Char, TEST_CONSTANT, charFieldOffset, - JavaConstant.forChar(TEST_OBJECT.charField), 16}}; + return result.toArray(new Object[result.size()][]); + } + + @DataProvider(name = "outOfBoundsInstanceFields") + public static Object[][] getOutOfBoundsStaticFieldReads() { + long instanceSize = WHITE_BOX.getObjectSize(TEST_OBJECT); + List result = new ArrayList<>(); + for (KindData k : PRIMITIVE_KIND_DATA) { + long lastValidOffset = instanceSize - (k.kind.getByteCount()); + result.add(new Object[] {k.kind, TEST_CONSTANT, lastValidOffset, false}); + result.add(new Object[] {k.kind, TEST_CONSTANT, (long) -1, true}); + result.add(new Object[] {k.kind, TEST_CONSTANT, lastValidOffset + 1, true}); + result.add(new Object[] {k.kind, TEST_CONSTANT, lastValidOffset + 100, true}); + } + return result.toArray(new Object[result.size()][]); + } + + @DataProvider(name = "outOfBoundsStaticFields") + public static Object[][] getOutOfBoundsInstanceFieldReads() { + long staticsSize = WHITE_BOX.getObjectSize(TEST_OBJECT.getClass()); + List result = new ArrayList<>(); + for (KindData k : PRIMITIVE_KIND_DATA) { + long lastValidOffset = staticsSize - (k.kind.getByteCount()); + result.add(new Object[] {k.kind, TEST_CLASS_CONSTANT, lastValidOffset, false}); + result.add(new Object[] {k.kind, TEST_CLASS_CONSTANT, (long) -1, true}); + result.add(new Object[] {k.kind, TEST_CLASS_CONSTANT, lastValidOffset + 1, true}); + result.add(new Object[] {k.kind, TEST_CLASS_CONSTANT, lastValidOffset + 100, true}); + } + return result.toArray(new Object[result.size()][]); } @DataProvider(name = "negative") @@ -108,6 +114,7 @@ public class MemoryAccessProviderData { new Object[]{JavaKind.Illegal, JavaConstant.INT_1}}; } + private static class TestClass { public final boolean booleanField = true; public final byte byteField = 2; @@ -117,6 +124,43 @@ public class MemoryAccessProviderData { public final double doubleField = 6.0d; public final float floatField = 7.0f; public final char charField = 'a'; - public final String stringField = "abc"; + public final String objectField = "abc"; + + public static final boolean booleanStaticField = true; + public static final byte byteStaticField = 2; + public static final short shortStaticField = 3; + public static final int intStaticField = 4; + public static final long longStaticField = 5L; + public static final double doubleStaticField = 6.0d; + public static final float floatStaticField = 7.0f; + public static final char charStaticField = 'a'; + public static final String objectStaticField = "abc"; + } + + + static class KindData { + final JavaKind kind; + final Field instanceField; + final Field staticField; + final long instanceFieldOffset; + final long staticFieldOffset; + final JavaConstant instanceFieldValue; + final JavaConstant staticFieldValue; + KindData(JavaKind kind, Object testObject) { + this.kind = kind; + try { + Class c = testObject.getClass(); + instanceField = c.getDeclaredField(kind.getJavaName() + "Field"); + staticField = c.getDeclaredField(kind.getJavaName() + "StaticField"); + instanceField.setAccessible(true); + staticField.setAccessible(true); + instanceFieldOffset = UNSAFE.objectFieldOffset(instanceField); + staticFieldOffset = UNSAFE.staticFieldOffset(staticField); + instanceFieldValue = JavaConstant.forBoxedPrimitive(instanceField.get(testObject)); + staticFieldValue = JavaConstant.forBoxedPrimitive(staticField.get(null)); + } catch (Exception e) { + throw new Error("TESTBUG for kind " + kind, e); + } + } } } diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java index bbf4c3a1ab9..d119a2bca06 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java @@ -26,17 +26,24 @@ * @bug 8152341 * @requires vm.jvmci * @library /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.common - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.hotspot + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.common + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot * java.base/jdk.internal.misc - * @run testng/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * jdk.vm.ci.hotspot.test.MemoryAccessProviderTest + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission + * @run testng/othervm -Xbootclasspath/a:. + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -Djvmci.Compiler=null jdk.vm.ci.hotspot.test.MemoryAccessProviderTest */ package jdk.vm.ci.hotspot.test; +import sun.hotspot.WhiteBox; + import jdk.vm.ci.meta.Constant; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.MemoryAccessProvider; @@ -59,7 +66,27 @@ public class MemoryAccessProviderTest { @Test(dataProvider = "negative", dataProviderClass = MemoryAccessProviderData.class, expectedExceptions = {IllegalArgumentException.class}) public void testNegativeReadPrimitiveConstant(JavaKind kind, Constant base) { - PROVIDER.readPrimitiveConstant(kind, base, 0L, kind == null ? 0 : kind.getBitCount()); + PROVIDER.readPrimitiveConstant(kind, base, 0L, kind == null ? 0 : kind.getByteCount() / 8); + } + + @Test(dataProvider = "outOfBoundsInstanceFields", dataProviderClass = MemoryAccessProviderData.class) + public void testReadPrimitiveInstanceFieldOutOfBounds(JavaKind kind, Constant base, Long offset, boolean isOutOfBounds) { + try { + PROVIDER.readPrimitiveConstant(kind, base, offset, kind.getByteCount() * 8); + Assert.assertFalse(isOutOfBounds); + } catch (IllegalArgumentException iae) { + Assert.assertTrue(isOutOfBounds); + } + } + + @Test(dataProvider = "outOfBoundsStaticFields", dataProviderClass = MemoryAccessProviderData.class) + public void testReadPrimitiveStaticFieldOutOFBounds(JavaKind kind, Constant base, Long offset, boolean isOutOfBounds) { + try { + PROVIDER.readPrimitiveConstant(kind, base, offset, kind.getByteCount() * 8); + Assert.assertFalse(isOutOfBounds); + } catch (IllegalArgumentException iae) { + Assert.assertTrue(isOutOfBounds); + } } @Test(dataProvider = "positiveObject", dataProviderClass = MemoryAccessProviderData.class, expectedExceptions = {IllegalArgumentException.class}) @@ -87,7 +114,7 @@ public class MemoryAccessProviderTest { Assert.assertNull(PROVIDER.readObjectConstant(base, offset + 1), "Expected null"); } - @Test(dataProvider = "positivePrimitive", dataProviderClass = MemoryAccessProviderData.class) + @Test(dataProvider = "positivePrimitive", dataProviderClass = MemoryAccessProviderData.class, expectedExceptions = {IllegalArgumentException.class}) public void testNegativeReadObjectConstantPrimitiveBase(JavaKind kind, Constant base, Long offset, Object expected, int bitsCount) { Assert.assertNull(PROVIDER.readObjectConstant(base, offset), "Expected null"); } diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java index 153cfc9698e..a1fea7d8f0f 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java @@ -28,11 +28,11 @@ * @requires vm.jvmci * @library /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src * @modules java.base/java.lang.invoke:+open - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * @modules jdk.vm.ci/jdk.vm.ci.hotspot:+open + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:+open * @run testng/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * jdk.vm.ci.hotspot.test.MethodHandleAccessProviderTest + * -Djvmci.Compiler=null jdk.vm.ci.hotspot.test.MethodHandleAccessProviderTest */ package jdk.vm.ci.hotspot.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java index fb0f1a2bd80..a0a9218b220 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java @@ -25,10 +25,10 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ConstantTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.ConstantTest */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java index 8f0ce0c2cc9..c9e027a8807 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java @@ -25,11 +25,11 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * jdk.attach * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.RedefineClassTest + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null -Djdk.attach.allowAttachSelf jdk.vm.ci.runtime.test.RedefineClassTest */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java index 78c5a79f81c..20bb4d872c6 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java @@ -24,9 +24,9 @@ /** * @test * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveConcreteMethodTest + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveConcreteMethodTest */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java index f4b15b2dc82..1d754b1f381 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java @@ -24,9 +24,9 @@ /** * @test * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveMethodTest + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveMethodTest */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java index 43cd69f0352..6f11bd5d5de 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java @@ -25,10 +25,10 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestConstantReflectionProvider + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestConstantReflectionProvider */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java index 792901898a3..4d4313981c5 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java @@ -25,10 +25,10 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaField + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestJavaField */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java index a8edfec11e5..357d1097597 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java @@ -25,10 +25,10 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaMethod + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestJavaMethod */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java index 669b579d51b..45aa1b73dbd 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java @@ -25,10 +25,10 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaType + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestJavaType */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java index 37d7d5233da..fc7cecdaba2 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java @@ -25,10 +25,10 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestMetaAccessProvider + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestMetaAccessProvider */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java index 48a6dc8613e..20800d4478b 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java @@ -25,10 +25,10 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaField + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestResolvedJavaField */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java index 5087814bdaf..3a27644ab6a 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java @@ -25,10 +25,10 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaMethod + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestResolvedJavaMethod */ package jdk.vm.ci.runtime.test; diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java index e8f9f9ba082..516e793749c 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java @@ -26,11 +26,11 @@ * @requires vm.jvmci * @library ../../../../../ * @modules java.base/jdk.internal.reflect - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common * java.base/jdk.internal.misc - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaType + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null jdk.vm.ci.runtime.test.TestResolvedJavaType */ package jdk.vm.ci.runtime.test; @@ -54,6 +54,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.Collections; +import java.util.function.Supplier; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -142,6 +143,27 @@ public class TestResolvedJavaType extends TypeUniverse { } } + @Test + public void getHostClassTest() { + for (Class c : classes) { + ResolvedJavaType type = metaAccess.lookupJavaType(c); + ResolvedJavaType host = type.getHostClass(); + assertNull(host); + } + + class LocalClass {} + Cloneable clone = new Cloneable() {}; + assertNull(metaAccess.lookupJavaType(LocalClass.class).getHostClass()); + assertNull(metaAccess.lookupJavaType(clone.getClass()).getHostClass()); + + Supplier lambda = () -> () -> System.out.println("run"); + ResolvedJavaType lambdaType = metaAccess.lookupJavaType(lambda.getClass()); + ResolvedJavaType nestedLambdaType = metaAccess.lookupJavaType(lambda.get().getClass()); + assertNotNull(lambdaType.getHostClass()); + assertNotNull(nestedLambdaType.getHostClass()); + assertEquals(lambdaType.getHostClass(), nestedLambdaType.getHostClass()); + } + @Test public void getModifiersTest() { for (Class c : classes) { diff --git a/hotspot/test/compiler/jvmci/meta/StableFieldTest.java b/hotspot/test/compiler/jvmci/meta/StableFieldTest.java index 147811f6b6f..05849847603 100644 --- a/hotspot/test/compiler/jvmci/meta/StableFieldTest.java +++ b/hotspot/test/compiler/jvmci/meta/StableFieldTest.java @@ -28,13 +28,13 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.vm.annotation - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * * @compile StableFieldTest.java * @run driver ClassFileInstaller compiler.jvmci.meta.StableFieldTest - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbootclasspath/a:. compiler.jvmci.meta.StableFieldTest + * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djvmci.Compiler=null -Xbootclasspath/a:. compiler.jvmci.meta.StableFieldTest */ package compiler.jvmci.meta; diff --git a/hotspot/test/compiler/loopopts/TestLoopPeeling.java b/hotspot/test/compiler/loopopts/TestLoopPeeling.java index 3627ff5726c..a32f3cb851a 100644 --- a/hotspot/test/compiler/loopopts/TestLoopPeeling.java +++ b/hotspot/test/compiler/loopopts/TestLoopPeeling.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 8078262 + * @bug 8078262 8177095 * @summary Tests correct dominator information after loop peeling. * * @run main/othervm -Xcomp @@ -40,14 +40,16 @@ public class TestLoopPeeling { public static void main(String args[]) { TestLoopPeeling test = new TestLoopPeeling(); try { - test.testArrayAccess(0, 1); + test.testArrayAccess1(0, 1); + test.testArrayAccess2(0); + test.testArrayAccess3(0, false); test.testArrayAllocation(0, 1); } catch (Exception e) { // Ignore exceptions } } - public void testArrayAccess(int index, int inc) { + public void testArrayAccess1(int index, int inc) { int storeIndex = -1; for (; index < 10; index += inc) { @@ -63,7 +65,7 @@ public class TestLoopPeeling { if (index == 42) { // This store and the corresponding range check are moved out of the - // loop and both used after old loop and the peeled iteration exit. + // loop and both used after main loop and the peeled iteration exit. // For the peeled iteration, storeIndex is always -1 and the ConvI2L // is replaced by TOP. However, the range check is not folded because // we don't do the split if optimization in PhaseIdealLoop2. @@ -77,6 +79,44 @@ public class TestLoopPeeling { } } + public int testArrayAccess2(int index) { + // Load1 and the corresponding range check are moved out of the loop + // and both are used after the main loop and the peeled iteration exit. + // For the peeled iteration, storeIndex is always Integer.MIN_VALUE and + // for the main loop it is 0. Hence, the merging phi has type int:<=0. + // Load1 reads the array at index ConvI2L(CastII(AddI(storeIndex, -1))) + // where the CastII is range check dependent and has type int:>=0. + // The CastII gets pushed through the AddI and its type is changed to int:>=1 + // which does not overlap with the input type of storeIndex (int:<=0). + // The CastII is replaced by TOP causing a cascade of other eliminations. + // Since the control path through the range check CmpU(AddI(storeIndex, -1)) + // is not eliminated, the graph is in a corrupted state. We fail once we merge + // with the result of Load2 because we get data from a non-dominating region. + int storeIndex = Integer.MIN_VALUE; + for (; index < 10; ++index) { + if (index == 42) { + return array[storeIndex-1]; // Load1 + } + storeIndex = 0; + } + return array[42]; // Load2 + } + + public int testArrayAccess3(int index, boolean b) { + // Same as testArrayAccess2 but manifests as crash in register allocator. + int storeIndex = Integer.MIN_VALUE; + for (; index < 10; ++index) { + if (b) { + return 0; + } + if (index == 42) { + return array[storeIndex-1]; // Load1 + } + storeIndex = 0; + } + return array[42]; // Load2 + } + public byte[] testArrayAllocation(int index, int inc) { int allocationCount = -1; byte[] result; @@ -88,7 +128,7 @@ public class TestLoopPeeling { if (index == 42) { // This allocation and the corresponding size check are moved out of the - // loop and both used after old loop and the peeled iteration exit. + // loop and both used after main loop and the peeled iteration exit. // For the peeled iteration, allocationCount is always -1 and the ConvI2L // is replaced by TOP. However, the size check is not folded because // we don't do the split if optimization in PhaseIdealLoop2. diff --git a/hotspot/test/compiler/patches/java.base/java/lang/Helper.java b/hotspot/test/compiler/patches/java.base/java/lang/Helper.java index 65347c87b1b..b38bebba309 100644 --- a/hotspot/test/compiler/patches/java.base/java/lang/Helper.java +++ b/hotspot/test/compiler/patches/java.base/java/lang/Helper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -73,4 +73,84 @@ public class Helper { StringUTF16.getChars(value, srcBegin, srcEnd, dst, dstBegin); return dst; } + + public static void putCharSB(byte[] val, int index, int c) { + StringUTF16.putCharSB(val, index, c); + } + + public static void putCharsSB(byte[] val, int index, char[] ca, int off, int end) { + StringUTF16.putCharsSB(val, index, ca, off, end); + } + + public static void putCharsSB(byte[] val, int index, CharSequence s, int off, int end) { + StringUTF16.putCharsSB(val, index, s, off, end); + } + + public static int codePointAtSB(byte[] val, int index, int end) { + return StringUTF16.codePointAtSB(val, index, end); + } + + public static int codePointBeforeSB(byte[] val, int index) { + return StringUTF16.codePointBeforeSB(val, index); + } + + public static int codePointCountSB(byte[] val, int beginIndex, int endIndex) { + return StringUTF16.codePointCountSB(val, beginIndex, endIndex); + } + + public static int getChars(int i, int begin, int end, byte[] value) { + return StringUTF16.getChars(i, begin, end, value); + } + + public static int getChars(long l, int begin, int end, byte[] value) { + return StringUTF16.getChars(l, begin, end, value); + } + + public static boolean contentEquals(byte[] v1, byte[] v2, int len) { + return StringUTF16.contentEquals(v1, v2, len); + } + + public static boolean contentEquals(byte[] value, CharSequence cs, int len) { + return StringUTF16.contentEquals(value, cs, len); + } + + public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4) { + return StringUTF16.putCharsAt(value, i, c1, c2, c3, c4); + } + + public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4, char c5) { + return StringUTF16.putCharsAt(value, i, c1, c2, c3, c4, c5); + } + + public static char charAt(byte[] value, int index) { + return StringUTF16.charAt(value, index); + } + + public static void reverse(byte[] value, int count) { + StringUTF16.reverse(value, count); + } + + public static void inflate(byte[] src, int srcOff, byte[] dst, int dstOff, int len) { + StringUTF16.inflate(src, srcOff, dst, dstOff, len); + } + + public static int indexOf(byte[] src, int srcCount, + byte[] tgt, int tgtCount, int fromIndex) { + return StringUTF16.indexOf(src, srcCount, tgt, tgtCount, fromIndex); + } + + public static int indexOfLatin1(byte[] src, int srcCount, + byte[] tgt, int tgtCount, int fromIndex) { + return StringUTF16.indexOfLatin1(src, srcCount, tgt, tgtCount, fromIndex); + } + public static int lastIndexOf(byte[] src, byte[] tgt, int tgtCount, int fromIndex) { + int srcCount = StringUTF16.length(src); // ignored + return StringUTF16.lastIndexOf(src, srcCount, tgt, tgtCount, fromIndex); + } + + public static int lastIndexOfLatin1(byte[] src, byte[] tgt, int tgtCount, int fromIndex) { + int srcCount = StringUTF16.length(src); // ignored + return StringUTF16.lastIndexOfLatin1(src, srcCount, tgt, tgtCount, fromIndex); + } + } diff --git a/hotspot/test/compiler/profiling/UnsafeAccess.java b/hotspot/test/compiler/profiling/UnsafeAccess.java index 5118101454b..eeda6d47241 100644 --- a/hotspot/test/compiler/profiling/UnsafeAccess.java +++ b/hotspot/test/compiler/profiling/UnsafeAccess.java @@ -64,7 +64,7 @@ public class UnsafeAccess { static Object helperUnsafeLoadStore(Object o, boolean isObjArray) { if (isObjArray) { Object o1 = U.getObject(o, off); - U.compareAndSwapObject(o, off, o1, new Object()); + U.compareAndSetObject(o, off, o1, new Object()); } return o; } diff --git a/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java b/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java index 9ca9ba0283b..d2e1b136980 100644 --- a/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java +++ b/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java @@ -33,7 +33,7 @@ * @run driver compiler.profiling.spectrapredefineclass.Launcher * @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation * -XX:-UseOnStackReplacement -XX:TypeProfileLevel=222 - * -XX:ReservedCodeCacheSize=3M + * -XX:ReservedCodeCacheSize=3M -Djdk.attach.allowAttachSelf * compiler.profiling.spectrapredefineclass.Agent */ diff --git a/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java index 857fbbbbd84..cea5a477d1d 100644 --- a/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java +++ b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java @@ -36,7 +36,7 @@ * @run driver compiler.profiling.spectrapredefineclass_classloaders.Launcher * @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation * -XX:-UseOnStackReplacement -XX:TypeProfileLevel=222 - * -XX:ReservedCodeCacheSize=3M + * -XX:ReservedCodeCacheSize=3M -Djdk.attach.allowAttachSelf * compiler.profiling.spectrapredefineclass_classloaders.Agent */ diff --git a/hotspot/test/compiler/rangechecks/TestRangeCheckEliminationDisabled.java b/hotspot/test/compiler/rangechecks/TestRangeCheckEliminationDisabled.java index 2c1b5e99bbf..c55a9add80f 100644 --- a/hotspot/test/compiler/rangechecks/TestRangeCheckEliminationDisabled.java +++ b/hotspot/test/compiler/rangechecks/TestRangeCheckEliminationDisabled.java @@ -26,7 +26,7 @@ * @bug 8154763 * @summary Tests PostLoopMultiversioning with RangeCheckElimination disabled. * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions - * -XX:+PostLoopMultiversioning -XX:-RangeCheckElimination + * -XX:+UnlockExperimentalVMOptions -XX:+PostLoopMultiversioning -XX:-RangeCheckElimination * compiler.rangechecks.TestRangeCheckEliminationDisabled */ diff --git a/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedVM.java b/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedVM.java index f4958a607c2..fee36b9e5c1 100644 --- a/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedVM.java +++ b/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedVM.java @@ -30,6 +30,6 @@ import java.util.function.BooleanSupplier; public class SupportedVM implements BooleanSupplier { @Override public boolean getAsBoolean() { - return Platform.isServer(); + return Platform.isServer() && !Platform.isEmulatedClient(); } } diff --git a/hotspot/test/compiler/types/correctness/OffTest.java b/hotspot/test/compiler/types/correctness/OffTest.java index 7593fc68a0d..5a8fe5953ac 100644 --- a/hotspot/test/compiler/types/correctness/OffTest.java +++ b/hotspot/test/compiler/types/correctness/OffTest.java @@ -24,6 +24,7 @@ /* * @test CorrectnessTest * @bug 8038418 + * @requires vm.flavor == "server" & !vm.emulatedClient * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management diff --git a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestBoolean.java b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestBoolean.java index 50e505bd840..75c33c9984c 100644 --- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestBoolean.java +++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestBoolean.java @@ -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 @@ -151,32 +151,32 @@ public class JdkInternalMiscUnsafeAccessTestBoolean { // Compare { - boolean r = UNSAFE.compareAndSwapBoolean(base, offset, true, false); - assertEquals(r, true, "success compareAndSwap boolean"); + boolean r = UNSAFE.compareAndSetBoolean(base, offset, true, false); + assertEquals(r, true, "success compareAndSet boolean"); boolean x = UNSAFE.getBoolean(base, offset); - assertEquals(x, false, "success compareAndSwap boolean value"); + assertEquals(x, false, "success compareAndSet boolean value"); } { - boolean r = UNSAFE.compareAndSwapBoolean(base, offset, true, false); - assertEquals(r, false, "failing compareAndSwap boolean"); + boolean r = UNSAFE.compareAndSetBoolean(base, offset, true, false); + assertEquals(r, false, "failing compareAndSet boolean"); boolean x = UNSAFE.getBoolean(base, offset); - assertEquals(x, false, "failing compareAndSwap boolean value"); + assertEquals(x, false, "failing compareAndSet boolean value"); } // Advanced compare { - boolean r = UNSAFE.compareAndExchangeBooleanVolatile(base, offset, false, true); - assertEquals(r, false, "success compareAndExchangeVolatile boolean"); + boolean r = UNSAFE.compareAndExchangeBoolean(base, offset, false, true); + assertEquals(r, false, "success compareAndExchange boolean"); boolean x = UNSAFE.getBoolean(base, offset); - assertEquals(x, true, "success compareAndExchangeVolatile boolean value"); + assertEquals(x, true, "success compareAndExchange boolean value"); } { - boolean r = UNSAFE.compareAndExchangeBooleanVolatile(base, offset, false, false); - assertEquals(r, true, "failing compareAndExchangeVolatile boolean"); + boolean r = UNSAFE.compareAndExchangeBoolean(base, offset, false, false); + assertEquals(r, true, "failing compareAndExchange boolean"); boolean x = UNSAFE.getBoolean(base, offset); - assertEquals(x, true, "failing compareAndExchangeVolatile boolean value"); + assertEquals(x, true, "failing compareAndExchange boolean value"); } { @@ -210,41 +210,41 @@ public class JdkInternalMiscUnsafeAccessTestBoolean { { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapBoolean(base, offset, true, false); + success = UNSAFE.weakCompareAndSetBooleanPlain(base, offset, true, false); } - assertEquals(success, true, "weakCompareAndSwap boolean"); + assertEquals(success, true, "weakCompareAndSetPlain boolean"); boolean x = UNSAFE.getBoolean(base, offset); - assertEquals(x, false, "weakCompareAndSwap boolean value"); + assertEquals(x, false, "weakCompareAndSetPlain boolean value"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapBooleanAcquire(base, offset, false, true); + success = UNSAFE.weakCompareAndSetBooleanAcquire(base, offset, false, true); } - assertEquals(success, true, "weakCompareAndSwapAcquire boolean"); + assertEquals(success, true, "weakCompareAndSetAcquire boolean"); boolean x = UNSAFE.getBoolean(base, offset); - assertEquals(x, true, "weakCompareAndSwapAcquire boolean"); + assertEquals(x, true, "weakCompareAndSetAcquire boolean"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapBooleanRelease(base, offset, true, false); + success = UNSAFE.weakCompareAndSetBooleanRelease(base, offset, true, false); } - assertEquals(success, true, "weakCompareAndSwapRelease boolean"); + assertEquals(success, true, "weakCompareAndSetRelease boolean"); boolean x = UNSAFE.getBoolean(base, offset); - assertEquals(x, false, "weakCompareAndSwapRelease boolean"); + assertEquals(x, false, "weakCompareAndSetRelease boolean"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapBooleanVolatile(base, offset, false, true); + success = UNSAFE.weakCompareAndSetBoolean(base, offset, false, true); } - assertEquals(success, true, "weakCompareAndSwapVolatile boolean"); + assertEquals(success, true, "weakCompareAndSet boolean"); boolean x = UNSAFE.getBoolean(base, offset); - assertEquals(x, true, "weakCompareAndSwapVolatile boolean"); + assertEquals(x, true, "weakCompareAndSet boolean"); } UNSAFE.putBoolean(base, offset, false); @@ -260,4 +260,3 @@ public class JdkInternalMiscUnsafeAccessTestBoolean { } } - diff --git a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestByte.java b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestByte.java index e35e5904d93..30ffae395df 100644 --- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestByte.java +++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestByte.java @@ -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 @@ -180,32 +180,32 @@ public class JdkInternalMiscUnsafeAccessTestByte { // Compare { - boolean r = UNSAFE.compareAndSwapByte(base, offset, (byte)0x01, (byte)0x23); - assertEquals(r, true, "success compareAndSwap byte"); + boolean r = UNSAFE.compareAndSetByte(base, offset, (byte)0x01, (byte)0x23); + assertEquals(r, true, "success compareAndSet byte"); byte x = UNSAFE.getByte(base, offset); - assertEquals(x, (byte)0x23, "success compareAndSwap byte value"); + assertEquals(x, (byte)0x23, "success compareAndSet byte value"); } { - boolean r = UNSAFE.compareAndSwapByte(base, offset, (byte)0x01, (byte)0x45); - assertEquals(r, false, "failing compareAndSwap byte"); + boolean r = UNSAFE.compareAndSetByte(base, offset, (byte)0x01, (byte)0x45); + assertEquals(r, false, "failing compareAndSet byte"); byte x = UNSAFE.getByte(base, offset); - assertEquals(x, (byte)0x23, "failing compareAndSwap byte value"); + assertEquals(x, (byte)0x23, "failing compareAndSet byte value"); } // Advanced compare { - byte r = UNSAFE.compareAndExchangeByteVolatile(base, offset, (byte)0x23, (byte)0x01); - assertEquals(r, (byte)0x23, "success compareAndExchangeVolatile byte"); + byte r = UNSAFE.compareAndExchangeByte(base, offset, (byte)0x23, (byte)0x01); + assertEquals(r, (byte)0x23, "success compareAndExchange byte"); byte x = UNSAFE.getByte(base, offset); - assertEquals(x, (byte)0x01, "success compareAndExchangeVolatile byte value"); + assertEquals(x, (byte)0x01, "success compareAndExchange byte value"); } { - byte r = UNSAFE.compareAndExchangeByteVolatile(base, offset, (byte)0x23, (byte)0x45); - assertEquals(r, (byte)0x01, "failing compareAndExchangeVolatile byte"); + byte r = UNSAFE.compareAndExchangeByte(base, offset, (byte)0x23, (byte)0x45); + assertEquals(r, (byte)0x01, "failing compareAndExchange byte"); byte x = UNSAFE.getByte(base, offset); - assertEquals(x, (byte)0x01, "failing compareAndExchangeVolatile byte value"); + assertEquals(x, (byte)0x01, "failing compareAndExchange byte value"); } { @@ -239,41 +239,41 @@ public class JdkInternalMiscUnsafeAccessTestByte { { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapByte(base, offset, (byte)0x01, (byte)0x23); + success = UNSAFE.weakCompareAndSetBytePlain(base, offset, (byte)0x01, (byte)0x23); } - assertEquals(success, true, "weakCompareAndSwap byte"); + assertEquals(success, true, "weakCompareAndSetPlain byte"); byte x = UNSAFE.getByte(base, offset); - assertEquals(x, (byte)0x23, "weakCompareAndSwap byte value"); + assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapByteAcquire(base, offset, (byte)0x23, (byte)0x01); + success = UNSAFE.weakCompareAndSetByteAcquire(base, offset, (byte)0x23, (byte)0x01); } - assertEquals(success, true, "weakCompareAndSwapAcquire byte"); + assertEquals(success, true, "weakCompareAndSetAcquire byte"); byte x = UNSAFE.getByte(base, offset); - assertEquals(x, (byte)0x01, "weakCompareAndSwapAcquire byte"); + assertEquals(x, (byte)0x01, "weakCompareAndSetAcquire byte"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapByteRelease(base, offset, (byte)0x01, (byte)0x23); + success = UNSAFE.weakCompareAndSetByteRelease(base, offset, (byte)0x01, (byte)0x23); } - assertEquals(success, true, "weakCompareAndSwapRelease byte"); + assertEquals(success, true, "weakCompareAndSetRelease byte"); byte x = UNSAFE.getByte(base, offset); - assertEquals(x, (byte)0x23, "weakCompareAndSwapRelease byte"); + assertEquals(x, (byte)0x23, "weakCompareAndSetRelease byte"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapByteVolatile(base, offset, (byte)0x23, (byte)0x01); + success = UNSAFE.weakCompareAndSetByte(base, offset, (byte)0x23, (byte)0x01); } - assertEquals(success, true, "weakCompareAndSwapVolatile byte"); + assertEquals(success, true, "weakCompareAndSet byte"); byte x = UNSAFE.getByte(base, offset); - assertEquals(x, (byte)0x01, "weakCompareAndSwapVolatile byte"); + assertEquals(x, (byte)0x01, "weakCompareAndSet byte"); } UNSAFE.putByte(base, offset, (byte)0x23); @@ -306,4 +306,3 @@ public class JdkInternalMiscUnsafeAccessTestByte { } } } - diff --git a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java index 0bb36c898bc..817af4b18c1 100644 --- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java +++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java @@ -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 @@ -198,32 +198,32 @@ public class JdkInternalMiscUnsafeAccessTestChar { // Compare { - boolean r = UNSAFE.compareAndSwapChar(base, offset, '\u0123', '\u4567'); - assertEquals(r, true, "success compareAndSwap char"); + boolean r = UNSAFE.compareAndSetChar(base, offset, '\u0123', '\u4567'); + assertEquals(r, true, "success compareAndSet char"); char x = UNSAFE.getChar(base, offset); - assertEquals(x, '\u4567', "success compareAndSwap char value"); + assertEquals(x, '\u4567', "success compareAndSet char value"); } { - boolean r = UNSAFE.compareAndSwapChar(base, offset, '\u0123', '\u89AB'); - assertEquals(r, false, "failing compareAndSwap char"); + boolean r = UNSAFE.compareAndSetChar(base, offset, '\u0123', '\u89AB'); + assertEquals(r, false, "failing compareAndSet char"); char x = UNSAFE.getChar(base, offset); - assertEquals(x, '\u4567', "failing compareAndSwap char value"); + assertEquals(x, '\u4567', "failing compareAndSet char value"); } // Advanced compare { - char r = UNSAFE.compareAndExchangeCharVolatile(base, offset, '\u4567', '\u0123'); - assertEquals(r, '\u4567', "success compareAndExchangeVolatile char"); + char r = UNSAFE.compareAndExchangeChar(base, offset, '\u4567', '\u0123'); + assertEquals(r, '\u4567', "success compareAndExchange char"); char x = UNSAFE.getChar(base, offset); - assertEquals(x, '\u0123', "success compareAndExchangeVolatile char value"); + assertEquals(x, '\u0123', "success compareAndExchange char value"); } { - char r = UNSAFE.compareAndExchangeCharVolatile(base, offset, '\u4567', '\u89AB'); - assertEquals(r, '\u0123', "failing compareAndExchangeVolatile char"); + char r = UNSAFE.compareAndExchangeChar(base, offset, '\u4567', '\u89AB'); + assertEquals(r, '\u0123', "failing compareAndExchange char"); char x = UNSAFE.getChar(base, offset); - assertEquals(x, '\u0123', "failing compareAndExchangeVolatile char value"); + assertEquals(x, '\u0123', "failing compareAndExchange char value"); } { @@ -257,41 +257,41 @@ public class JdkInternalMiscUnsafeAccessTestChar { { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapChar(base, offset, '\u0123', '\u4567'); + success = UNSAFE.weakCompareAndSetCharPlain(base, offset, '\u0123', '\u4567'); } - assertEquals(success, true, "weakCompareAndSwap char"); + assertEquals(success, true, "weakCompareAndSetPlain char"); char x = UNSAFE.getChar(base, offset); - assertEquals(x, '\u4567', "weakCompareAndSwap char value"); + assertEquals(x, '\u4567', "weakCompareAndSetPlain char value"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapCharAcquire(base, offset, '\u4567', '\u0123'); + success = UNSAFE.weakCompareAndSetCharAcquire(base, offset, '\u4567', '\u0123'); } - assertEquals(success, true, "weakCompareAndSwapAcquire char"); + assertEquals(success, true, "weakCompareAndSetAcquire char"); char x = UNSAFE.getChar(base, offset); - assertEquals(x, '\u0123', "weakCompareAndSwapAcquire char"); + assertEquals(x, '\u0123', "weakCompareAndSetAcquire char"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapCharRelease(base, offset, '\u0123', '\u4567'); + success = UNSAFE.weakCompareAndSetCharRelease(base, offset, '\u0123', '\u4567'); } - assertEquals(success, true, "weakCompareAndSwapRelease char"); + assertEquals(success, true, "weakCompareAndSetRelease char"); char x = UNSAFE.getChar(base, offset); - assertEquals(x, '\u4567', "weakCompareAndSwapRelease char"); + assertEquals(x, '\u4567', "weakCompareAndSetRelease char"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapCharVolatile(base, offset, '\u4567', '\u0123'); + success = UNSAFE.weakCompareAndSetChar(base, offset, '\u4567', '\u0123'); } - assertEquals(success, true, "weakCompareAndSwapVolatile char"); + assertEquals(success, true, "weakCompareAndSet char"); char x = UNSAFE.getChar(base, offset); - assertEquals(x, '\u0123', "weakCompareAndSwapVolatile char"); + assertEquals(x, '\u0123', "weakCompareAndSet char"); } UNSAFE.putChar(base, offset, '\u4567'); @@ -324,4 +324,3 @@ public class JdkInternalMiscUnsafeAccessTestChar { } } } - diff --git a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestDouble.java b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestDouble.java index 48a98c619fd..37c15e57a6a 100644 --- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestDouble.java +++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestDouble.java @@ -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 @@ -180,32 +180,32 @@ public class JdkInternalMiscUnsafeAccessTestDouble { // Compare { - boolean r = UNSAFE.compareAndSwapDouble(base, offset, 1.0d, 2.0d); - assertEquals(r, true, "success compareAndSwap double"); + boolean r = UNSAFE.compareAndSetDouble(base, offset, 1.0d, 2.0d); + assertEquals(r, true, "success compareAndSet double"); double x = UNSAFE.getDouble(base, offset); - assertEquals(x, 2.0d, "success compareAndSwap double value"); + assertEquals(x, 2.0d, "success compareAndSet double value"); } { - boolean r = UNSAFE.compareAndSwapDouble(base, offset, 1.0d, 3.0d); - assertEquals(r, false, "failing compareAndSwap double"); + boolean r = UNSAFE.compareAndSetDouble(base, offset, 1.0d, 3.0d); + assertEquals(r, false, "failing compareAndSet double"); double x = UNSAFE.getDouble(base, offset); - assertEquals(x, 2.0d, "failing compareAndSwap double value"); + assertEquals(x, 2.0d, "failing compareAndSet double value"); } // Advanced compare { - double r = UNSAFE.compareAndExchangeDoubleVolatile(base, offset, 2.0d, 1.0d); - assertEquals(r, 2.0d, "success compareAndExchangeVolatile double"); + double r = UNSAFE.compareAndExchangeDouble(base, offset, 2.0d, 1.0d); + assertEquals(r, 2.0d, "success compareAndExchange double"); double x = UNSAFE.getDouble(base, offset); - assertEquals(x, 1.0d, "success compareAndExchangeVolatile double value"); + assertEquals(x, 1.0d, "success compareAndExchange double value"); } { - double r = UNSAFE.compareAndExchangeDoubleVolatile(base, offset, 2.0d, 3.0d); - assertEquals(r, 1.0d, "failing compareAndExchangeVolatile double"); + double r = UNSAFE.compareAndExchangeDouble(base, offset, 2.0d, 3.0d); + assertEquals(r, 1.0d, "failing compareAndExchange double"); double x = UNSAFE.getDouble(base, offset); - assertEquals(x, 1.0d, "failing compareAndExchangeVolatile double value"); + assertEquals(x, 1.0d, "failing compareAndExchange double value"); } { @@ -239,41 +239,41 @@ public class JdkInternalMiscUnsafeAccessTestDouble { { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapDouble(base, offset, 1.0d, 2.0d); + success = UNSAFE.weakCompareAndSetDoublePlain(base, offset, 1.0d, 2.0d); } - assertEquals(success, true, "weakCompareAndSwap double"); + assertEquals(success, true, "weakCompareAndSetPlain double"); double x = UNSAFE.getDouble(base, offset); - assertEquals(x, 2.0d, "weakCompareAndSwap double value"); + assertEquals(x, 2.0d, "weakCompareAndSetPlain double value"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapDoubleAcquire(base, offset, 2.0d, 1.0d); + success = UNSAFE.weakCompareAndSetDoubleAcquire(base, offset, 2.0d, 1.0d); } - assertEquals(success, true, "weakCompareAndSwapAcquire double"); + assertEquals(success, true, "weakCompareAndSetAcquire double"); double x = UNSAFE.getDouble(base, offset); - assertEquals(x, 1.0d, "weakCompareAndSwapAcquire double"); + assertEquals(x, 1.0d, "weakCompareAndSetAcquire double"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapDoubleRelease(base, offset, 1.0d, 2.0d); + success = UNSAFE.weakCompareAndSetDoubleRelease(base, offset, 1.0d, 2.0d); } - assertEquals(success, true, "weakCompareAndSwapRelease double"); + assertEquals(success, true, "weakCompareAndSetRelease double"); double x = UNSAFE.getDouble(base, offset); - assertEquals(x, 2.0d, "weakCompareAndSwapRelease double"); + assertEquals(x, 2.0d, "weakCompareAndSetRelease double"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapDoubleVolatile(base, offset, 2.0d, 1.0d); + success = UNSAFE.weakCompareAndSetDouble(base, offset, 2.0d, 1.0d); } - assertEquals(success, true, "weakCompareAndSwapVolatile double"); + assertEquals(success, true, "weakCompareAndSet double"); double x = UNSAFE.getDouble(base, offset); - assertEquals(x, 1.0d, "weakCompareAndSwapVolatile double"); + assertEquals(x, 1.0d, "weakCompareAndSet double"); } UNSAFE.putDouble(base, offset, 2.0d); @@ -306,4 +306,3 @@ public class JdkInternalMiscUnsafeAccessTestDouble { } } } - diff --git a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestFloat.java b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestFloat.java index 2a91a7c20c3..0ac9fa1e55a 100644 --- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestFloat.java +++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestFloat.java @@ -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 @@ -180,32 +180,32 @@ public class JdkInternalMiscUnsafeAccessTestFloat { // Compare { - boolean r = UNSAFE.compareAndSwapFloat(base, offset, 1.0f, 2.0f); - assertEquals(r, true, "success compareAndSwap float"); + boolean r = UNSAFE.compareAndSetFloat(base, offset, 1.0f, 2.0f); + assertEquals(r, true, "success compareAndSet float"); float x = UNSAFE.getFloat(base, offset); - assertEquals(x, 2.0f, "success compareAndSwap float value"); + assertEquals(x, 2.0f, "success compareAndSet float value"); } { - boolean r = UNSAFE.compareAndSwapFloat(base, offset, 1.0f, 3.0f); - assertEquals(r, false, "failing compareAndSwap float"); + boolean r = UNSAFE.compareAndSetFloat(base, offset, 1.0f, 3.0f); + assertEquals(r, false, "failing compareAndSet float"); float x = UNSAFE.getFloat(base, offset); - assertEquals(x, 2.0f, "failing compareAndSwap float value"); + assertEquals(x, 2.0f, "failing compareAndSet float value"); } // Advanced compare { - float r = UNSAFE.compareAndExchangeFloatVolatile(base, offset, 2.0f, 1.0f); - assertEquals(r, 2.0f, "success compareAndExchangeVolatile float"); + float r = UNSAFE.compareAndExchangeFloat(base, offset, 2.0f, 1.0f); + assertEquals(r, 2.0f, "success compareAndExchange float"); float x = UNSAFE.getFloat(base, offset); - assertEquals(x, 1.0f, "success compareAndExchangeVolatile float value"); + assertEquals(x, 1.0f, "success compareAndExchange float value"); } { - float r = UNSAFE.compareAndExchangeFloatVolatile(base, offset, 2.0f, 3.0f); - assertEquals(r, 1.0f, "failing compareAndExchangeVolatile float"); + float r = UNSAFE.compareAndExchangeFloat(base, offset, 2.0f, 3.0f); + assertEquals(r, 1.0f, "failing compareAndExchange float"); float x = UNSAFE.getFloat(base, offset); - assertEquals(x, 1.0f, "failing compareAndExchangeVolatile float value"); + assertEquals(x, 1.0f, "failing compareAndExchange float value"); } { @@ -239,41 +239,41 @@ public class JdkInternalMiscUnsafeAccessTestFloat { { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapFloat(base, offset, 1.0f, 2.0f); + success = UNSAFE.weakCompareAndSetFloatPlain(base, offset, 1.0f, 2.0f); } - assertEquals(success, true, "weakCompareAndSwap float"); + assertEquals(success, true, "weakCompareAndSetPlain float"); float x = UNSAFE.getFloat(base, offset); - assertEquals(x, 2.0f, "weakCompareAndSwap float value"); + assertEquals(x, 2.0f, "weakCompareAndSetPlain float value"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapFloatAcquire(base, offset, 2.0f, 1.0f); + success = UNSAFE.weakCompareAndSetFloatAcquire(base, offset, 2.0f, 1.0f); } - assertEquals(success, true, "weakCompareAndSwapAcquire float"); + assertEquals(success, true, "weakCompareAndSetAcquire float"); float x = UNSAFE.getFloat(base, offset); - assertEquals(x, 1.0f, "weakCompareAndSwapAcquire float"); + assertEquals(x, 1.0f, "weakCompareAndSetAcquire float"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapFloatRelease(base, offset, 1.0f, 2.0f); + success = UNSAFE.weakCompareAndSetFloatRelease(base, offset, 1.0f, 2.0f); } - assertEquals(success, true, "weakCompareAndSwapRelease float"); + assertEquals(success, true, "weakCompareAndSetRelease float"); float x = UNSAFE.getFloat(base, offset); - assertEquals(x, 2.0f, "weakCompareAndSwapRelease float"); + assertEquals(x, 2.0f, "weakCompareAndSetRelease float"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapFloatVolatile(base, offset, 2.0f, 1.0f); + success = UNSAFE.weakCompareAndSetFloat(base, offset, 2.0f, 1.0f); } - assertEquals(success, true, "weakCompareAndSwapVolatile float"); + assertEquals(success, true, "weakCompareAndSet float"); float x = UNSAFE.getFloat(base, offset); - assertEquals(x, 1.0f, "weakCompareAndSwapVolatile float"); + assertEquals(x, 1.0f, "weakCompareAndSet float"); } UNSAFE.putFloat(base, offset, 2.0f); @@ -306,4 +306,3 @@ public class JdkInternalMiscUnsafeAccessTestFloat { } } } - diff --git a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestInt.java b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestInt.java index b55e3672427..0f0f1f101d3 100644 --- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestInt.java +++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestInt.java @@ -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 @@ -198,32 +198,32 @@ public class JdkInternalMiscUnsafeAccessTestInt { // Compare { - boolean r = UNSAFE.compareAndSwapInt(base, offset, 0x01234567, 0x89ABCDEF); - assertEquals(r, true, "success compareAndSwap int"); + boolean r = UNSAFE.compareAndSetInt(base, offset, 0x01234567, 0x89ABCDEF); + assertEquals(r, true, "success compareAndSet int"); int x = UNSAFE.getInt(base, offset); - assertEquals(x, 0x89ABCDEF, "success compareAndSwap int value"); + assertEquals(x, 0x89ABCDEF, "success compareAndSet int value"); } { - boolean r = UNSAFE.compareAndSwapInt(base, offset, 0x01234567, 0xCAFEBABE); - assertEquals(r, false, "failing compareAndSwap int"); + boolean r = UNSAFE.compareAndSetInt(base, offset, 0x01234567, 0xCAFEBABE); + assertEquals(r, false, "failing compareAndSet int"); int x = UNSAFE.getInt(base, offset); - assertEquals(x, 0x89ABCDEF, "failing compareAndSwap int value"); + assertEquals(x, 0x89ABCDEF, "failing compareAndSet int value"); } // Advanced compare { - int r = UNSAFE.compareAndExchangeIntVolatile(base, offset, 0x89ABCDEF, 0x01234567); - assertEquals(r, 0x89ABCDEF, "success compareAndExchangeVolatile int"); + int r = UNSAFE.compareAndExchangeInt(base, offset, 0x89ABCDEF, 0x01234567); + assertEquals(r, 0x89ABCDEF, "success compareAndExchange int"); int x = UNSAFE.getInt(base, offset); - assertEquals(x, 0x01234567, "success compareAndExchangeVolatile int value"); + assertEquals(x, 0x01234567, "success compareAndExchange int value"); } { - int r = UNSAFE.compareAndExchangeIntVolatile(base, offset, 0x89ABCDEF, 0xCAFEBABE); - assertEquals(r, 0x01234567, "failing compareAndExchangeVolatile int"); + int r = UNSAFE.compareAndExchangeInt(base, offset, 0x89ABCDEF, 0xCAFEBABE); + assertEquals(r, 0x01234567, "failing compareAndExchange int"); int x = UNSAFE.getInt(base, offset); - assertEquals(x, 0x01234567, "failing compareAndExchangeVolatile int value"); + assertEquals(x, 0x01234567, "failing compareAndExchange int value"); } { @@ -257,41 +257,41 @@ public class JdkInternalMiscUnsafeAccessTestInt { { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapInt(base, offset, 0x01234567, 0x89ABCDEF); + success = UNSAFE.weakCompareAndSetIntPlain(base, offset, 0x01234567, 0x89ABCDEF); } - assertEquals(success, true, "weakCompareAndSwap int"); + assertEquals(success, true, "weakCompareAndSetPlain int"); int x = UNSAFE.getInt(base, offset); - assertEquals(x, 0x89ABCDEF, "weakCompareAndSwap int value"); + assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapIntAcquire(base, offset, 0x89ABCDEF, 0x01234567); + success = UNSAFE.weakCompareAndSetIntAcquire(base, offset, 0x89ABCDEF, 0x01234567); } - assertEquals(success, true, "weakCompareAndSwapAcquire int"); + assertEquals(success, true, "weakCompareAndSetAcquire int"); int x = UNSAFE.getInt(base, offset); - assertEquals(x, 0x01234567, "weakCompareAndSwapAcquire int"); + assertEquals(x, 0x01234567, "weakCompareAndSetAcquire int"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapIntRelease(base, offset, 0x01234567, 0x89ABCDEF); + success = UNSAFE.weakCompareAndSetIntRelease(base, offset, 0x01234567, 0x89ABCDEF); } - assertEquals(success, true, "weakCompareAndSwapRelease int"); + assertEquals(success, true, "weakCompareAndSetRelease int"); int x = UNSAFE.getInt(base, offset); - assertEquals(x, 0x89ABCDEF, "weakCompareAndSwapRelease int"); + assertEquals(x, 0x89ABCDEF, "weakCompareAndSetRelease int"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapIntVolatile(base, offset, 0x89ABCDEF, 0x01234567); + success = UNSAFE.weakCompareAndSetInt(base, offset, 0x89ABCDEF, 0x01234567); } - assertEquals(success, true, "weakCompareAndSwapVolatile int"); + assertEquals(success, true, "weakCompareAndSet int"); int x = UNSAFE.getInt(base, offset); - assertEquals(x, 0x01234567, "weakCompareAndSwapVolatile int"); + assertEquals(x, 0x01234567, "weakCompareAndSet int"); } UNSAFE.putInt(base, offset, 0x89ABCDEF); @@ -324,4 +324,3 @@ public class JdkInternalMiscUnsafeAccessTestInt { } } } - diff --git a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestLong.java b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestLong.java index fc78b375071..69a51bb698b 100644 --- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestLong.java +++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestLong.java @@ -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 @@ -198,32 +198,32 @@ public class JdkInternalMiscUnsafeAccessTestLong { // Compare { - boolean r = UNSAFE.compareAndSwapLong(base, offset, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); - assertEquals(r, true, "success compareAndSwap long"); + boolean r = UNSAFE.compareAndSetLong(base, offset, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + assertEquals(r, true, "success compareAndSet long"); long x = UNSAFE.getLong(base, offset); - assertEquals(x, 0xCAFEBABECAFEBABEL, "success compareAndSwap long value"); + assertEquals(x, 0xCAFEBABECAFEBABEL, "success compareAndSet long value"); } { - boolean r = UNSAFE.compareAndSwapLong(base, offset, 0x0123456789ABCDEFL, 0xDEADBEEFDEADBEEFL); - assertEquals(r, false, "failing compareAndSwap long"); + boolean r = UNSAFE.compareAndSetLong(base, offset, 0x0123456789ABCDEFL, 0xDEADBEEFDEADBEEFL); + assertEquals(r, false, "failing compareAndSet long"); long x = UNSAFE.getLong(base, offset); - assertEquals(x, 0xCAFEBABECAFEBABEL, "failing compareAndSwap long value"); + assertEquals(x, 0xCAFEBABECAFEBABEL, "failing compareAndSet long value"); } // Advanced compare { - long r = UNSAFE.compareAndExchangeLongVolatile(base, offset, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); - assertEquals(r, 0xCAFEBABECAFEBABEL, "success compareAndExchangeVolatile long"); + long r = UNSAFE.compareAndExchangeLong(base, offset, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + assertEquals(r, 0xCAFEBABECAFEBABEL, "success compareAndExchange long"); long x = UNSAFE.getLong(base, offset); - assertEquals(x, 0x0123456789ABCDEFL, "success compareAndExchangeVolatile long value"); + assertEquals(x, 0x0123456789ABCDEFL, "success compareAndExchange long value"); } { - long r = UNSAFE.compareAndExchangeLongVolatile(base, offset, 0xCAFEBABECAFEBABEL, 0xDEADBEEFDEADBEEFL); - assertEquals(r, 0x0123456789ABCDEFL, "failing compareAndExchangeVolatile long"); + long r = UNSAFE.compareAndExchangeLong(base, offset, 0xCAFEBABECAFEBABEL, 0xDEADBEEFDEADBEEFL); + assertEquals(r, 0x0123456789ABCDEFL, "failing compareAndExchange long"); long x = UNSAFE.getLong(base, offset); - assertEquals(x, 0x0123456789ABCDEFL, "failing compareAndExchangeVolatile long value"); + assertEquals(x, 0x0123456789ABCDEFL, "failing compareAndExchange long value"); } { @@ -257,41 +257,41 @@ public class JdkInternalMiscUnsafeAccessTestLong { { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapLong(base, offset, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + success = UNSAFE.weakCompareAndSetLongPlain(base, offset, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); } - assertEquals(success, true, "weakCompareAndSwap long"); + assertEquals(success, true, "weakCompareAndSetPlain long"); long x = UNSAFE.getLong(base, offset); - assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSwap long value"); + assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapLongAcquire(base, offset, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + success = UNSAFE.weakCompareAndSetLongAcquire(base, offset, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); } - assertEquals(success, true, "weakCompareAndSwapAcquire long"); + assertEquals(success, true, "weakCompareAndSetAcquire long"); long x = UNSAFE.getLong(base, offset); - assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSwapAcquire long"); + assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetAcquire long"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapLongRelease(base, offset, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); + success = UNSAFE.weakCompareAndSetLongRelease(base, offset, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL); } - assertEquals(success, true, "weakCompareAndSwapRelease long"); + assertEquals(success, true, "weakCompareAndSetRelease long"); long x = UNSAFE.getLong(base, offset); - assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSwapRelease long"); + assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetRelease long"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapLongVolatile(base, offset, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); + success = UNSAFE.weakCompareAndSetLong(base, offset, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL); } - assertEquals(success, true, "weakCompareAndSwapVolatile long"); + assertEquals(success, true, "weakCompareAndSet long"); long x = UNSAFE.getLong(base, offset); - assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSwapVolatile long"); + assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long"); } UNSAFE.putLong(base, offset, 0xCAFEBABECAFEBABEL); @@ -324,4 +324,3 @@ public class JdkInternalMiscUnsafeAccessTestLong { } } } - diff --git a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestObject.java b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestObject.java index 039b472ccf7..b2e5fc57e1e 100644 --- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestObject.java +++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestObject.java @@ -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 @@ -151,32 +151,32 @@ public class JdkInternalMiscUnsafeAccessTestObject { // Compare { - boolean r = UNSAFE.compareAndSwapObject(base, offset, "foo", "bar"); - assertEquals(r, true, "success compareAndSwap Object"); + boolean r = UNSAFE.compareAndSetObject(base, offset, "foo", "bar"); + assertEquals(r, true, "success compareAndSet Object"); Object x = UNSAFE.getObject(base, offset); - assertEquals(x, "bar", "success compareAndSwap Object value"); + assertEquals(x, "bar", "success compareAndSet Object value"); } { - boolean r = UNSAFE.compareAndSwapObject(base, offset, "foo", "baz"); - assertEquals(r, false, "failing compareAndSwap Object"); + boolean r = UNSAFE.compareAndSetObject(base, offset, "foo", "baz"); + assertEquals(r, false, "failing compareAndSet Object"); Object x = UNSAFE.getObject(base, offset); - assertEquals(x, "bar", "failing compareAndSwap Object value"); + assertEquals(x, "bar", "failing compareAndSet Object value"); } // Advanced compare { - Object r = UNSAFE.compareAndExchangeObjectVolatile(base, offset, "bar", "foo"); - assertEquals(r, "bar", "success compareAndExchangeVolatile Object"); + Object r = UNSAFE.compareAndExchangeObject(base, offset, "bar", "foo"); + assertEquals(r, "bar", "success compareAndExchange Object"); Object x = UNSAFE.getObject(base, offset); - assertEquals(x, "foo", "success compareAndExchangeVolatile Object value"); + assertEquals(x, "foo", "success compareAndExchange Object value"); } { - Object r = UNSAFE.compareAndExchangeObjectVolatile(base, offset, "bar", "baz"); - assertEquals(r, "foo", "failing compareAndExchangeVolatile Object"); + Object r = UNSAFE.compareAndExchangeObject(base, offset, "bar", "baz"); + assertEquals(r, "foo", "failing compareAndExchange Object"); Object x = UNSAFE.getObject(base, offset); - assertEquals(x, "foo", "failing compareAndExchangeVolatile Object value"); + assertEquals(x, "foo", "failing compareAndExchange Object value"); } { @@ -210,41 +210,41 @@ public class JdkInternalMiscUnsafeAccessTestObject { { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapObject(base, offset, "foo", "bar"); + success = UNSAFE.weakCompareAndSetObjectPlain(base, offset, "foo", "bar"); } - assertEquals(success, true, "weakCompareAndSwap Object"); + assertEquals(success, true, "weakCompareAndSetPlain Object"); Object x = UNSAFE.getObject(base, offset); - assertEquals(x, "bar", "weakCompareAndSwap Object value"); + assertEquals(x, "bar", "weakCompareAndSetPlain Object value"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapObjectAcquire(base, offset, "bar", "foo"); + success = UNSAFE.weakCompareAndSetObjectAcquire(base, offset, "bar", "foo"); } - assertEquals(success, true, "weakCompareAndSwapAcquire Object"); + assertEquals(success, true, "weakCompareAndSetAcquire Object"); Object x = UNSAFE.getObject(base, offset); - assertEquals(x, "foo", "weakCompareAndSwapAcquire Object"); + assertEquals(x, "foo", "weakCompareAndSetAcquire Object"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapObjectRelease(base, offset, "foo", "bar"); + success = UNSAFE.weakCompareAndSetObjectRelease(base, offset, "foo", "bar"); } - assertEquals(success, true, "weakCompareAndSwapRelease Object"); + assertEquals(success, true, "weakCompareAndSetRelease Object"); Object x = UNSAFE.getObject(base, offset); - assertEquals(x, "bar", "weakCompareAndSwapRelease Object"); + assertEquals(x, "bar", "weakCompareAndSetRelease Object"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapObjectVolatile(base, offset, "bar", "foo"); + success = UNSAFE.weakCompareAndSetObject(base, offset, "bar", "foo"); } - assertEquals(success, true, "weakCompareAndSwapVolatile Object"); + assertEquals(success, true, "weakCompareAndSet Object"); Object x = UNSAFE.getObject(base, offset); - assertEquals(x, "foo", "weakCompareAndSwapVolatile Object"); + assertEquals(x, "foo", "weakCompareAndSet Object"); } UNSAFE.putObject(base, offset, "bar"); @@ -260,4 +260,3 @@ public class JdkInternalMiscUnsafeAccessTestObject { } } - diff --git a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java index f854979c73f..a6b845eec6b 100644 --- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java +++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java @@ -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 @@ -198,32 +198,32 @@ public class JdkInternalMiscUnsafeAccessTestShort { // Compare { - boolean r = UNSAFE.compareAndSwapShort(base, offset, (short)0x0123, (short)0x4567); - assertEquals(r, true, "success compareAndSwap short"); + boolean r = UNSAFE.compareAndSetShort(base, offset, (short)0x0123, (short)0x4567); + assertEquals(r, true, "success compareAndSet short"); short x = UNSAFE.getShort(base, offset); - assertEquals(x, (short)0x4567, "success compareAndSwap short value"); + assertEquals(x, (short)0x4567, "success compareAndSet short value"); } { - boolean r = UNSAFE.compareAndSwapShort(base, offset, (short)0x0123, (short)0x89AB); - assertEquals(r, false, "failing compareAndSwap short"); + boolean r = UNSAFE.compareAndSetShort(base, offset, (short)0x0123, (short)0x89AB); + assertEquals(r, false, "failing compareAndSet short"); short x = UNSAFE.getShort(base, offset); - assertEquals(x, (short)0x4567, "failing compareAndSwap short value"); + assertEquals(x, (short)0x4567, "failing compareAndSet short value"); } // Advanced compare { - short r = UNSAFE.compareAndExchangeShortVolatile(base, offset, (short)0x4567, (short)0x0123); - assertEquals(r, (short)0x4567, "success compareAndExchangeVolatile short"); + short r = UNSAFE.compareAndExchangeShort(base, offset, (short)0x4567, (short)0x0123); + assertEquals(r, (short)0x4567, "success compareAndExchange short"); short x = UNSAFE.getShort(base, offset); - assertEquals(x, (short)0x0123, "success compareAndExchangeVolatile short value"); + assertEquals(x, (short)0x0123, "success compareAndExchange short value"); } { - short r = UNSAFE.compareAndExchangeShortVolatile(base, offset, (short)0x4567, (short)0x89AB); - assertEquals(r, (short)0x0123, "failing compareAndExchangeVolatile short"); + short r = UNSAFE.compareAndExchangeShort(base, offset, (short)0x4567, (short)0x89AB); + assertEquals(r, (short)0x0123, "failing compareAndExchange short"); short x = UNSAFE.getShort(base, offset); - assertEquals(x, (short)0x0123, "failing compareAndExchangeVolatile short value"); + assertEquals(x, (short)0x0123, "failing compareAndExchange short value"); } { @@ -257,41 +257,41 @@ public class JdkInternalMiscUnsafeAccessTestShort { { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapShort(base, offset, (short)0x0123, (short)0x4567); + success = UNSAFE.weakCompareAndSetShortPlain(base, offset, (short)0x0123, (short)0x4567); } - assertEquals(success, true, "weakCompareAndSwap short"); + assertEquals(success, true, "weakCompareAndSetPlain short"); short x = UNSAFE.getShort(base, offset); - assertEquals(x, (short)0x4567, "weakCompareAndSwap short value"); + assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapShortAcquire(base, offset, (short)0x4567, (short)0x0123); + success = UNSAFE.weakCompareAndSetShortAcquire(base, offset, (short)0x4567, (short)0x0123); } - assertEquals(success, true, "weakCompareAndSwapAcquire short"); + assertEquals(success, true, "weakCompareAndSetAcquire short"); short x = UNSAFE.getShort(base, offset); - assertEquals(x, (short)0x0123, "weakCompareAndSwapAcquire short"); + assertEquals(x, (short)0x0123, "weakCompareAndSetAcquire short"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapShortRelease(base, offset, (short)0x0123, (short)0x4567); + success = UNSAFE.weakCompareAndSetShortRelease(base, offset, (short)0x0123, (short)0x4567); } - assertEquals(success, true, "weakCompareAndSwapRelease short"); + assertEquals(success, true, "weakCompareAndSetRelease short"); short x = UNSAFE.getShort(base, offset); - assertEquals(x, (short)0x4567, "weakCompareAndSwapRelease short"); + assertEquals(x, (short)0x4567, "weakCompareAndSetRelease short"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwapShortVolatile(base, offset, (short)0x4567, (short)0x0123); + success = UNSAFE.weakCompareAndSetShort(base, offset, (short)0x4567, (short)0x0123); } - assertEquals(success, true, "weakCompareAndSwapVolatile short"); + assertEquals(success, true, "weakCompareAndSet short"); short x = UNSAFE.getShort(base, offset); - assertEquals(x, (short)0x0123, "weakCompareAndSwapVolatile short"); + assertEquals(x, (short)0x0123, "weakCompareAndSet short"); } UNSAFE.putShort(base, offset, (short)0x4567); @@ -324,4 +324,3 @@ public class JdkInternalMiscUnsafeAccessTestShort { } } } - diff --git a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestBoolean.java b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestBoolean.java index 7200bf754c8..a1b68c7305d 100644 --- a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestBoolean.java +++ b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestBoolean.java @@ -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 @@ -138,4 +138,3 @@ public class SunMiscUnsafeAccessTestBoolean { } } - diff --git a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestByte.java b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestByte.java index a30c01ff0f6..c086315cb8a 100644 --- a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestByte.java +++ b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestByte.java @@ -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 @@ -175,4 +175,3 @@ public class SunMiscUnsafeAccessTestByte { } } } - diff --git a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestChar.java b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestChar.java index 12dbb25030b..3a55939826d 100644 --- a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestChar.java +++ b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestChar.java @@ -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 @@ -175,4 +175,3 @@ public class SunMiscUnsafeAccessTestChar { } } } - diff --git a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestDouble.java b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestDouble.java index 5fedde71510..52bde3f08d6 100644 --- a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestDouble.java +++ b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestDouble.java @@ -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 @@ -175,4 +175,3 @@ public class SunMiscUnsafeAccessTestDouble { } } } - diff --git a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestFloat.java b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestFloat.java index 621e4ae3863..478efa4dbc3 100644 --- a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestFloat.java +++ b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestFloat.java @@ -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 @@ -175,4 +175,3 @@ public class SunMiscUnsafeAccessTestFloat { } } } - diff --git a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestInt.java b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestInt.java index 1e49aacb287..0bf8b641066 100644 --- a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestInt.java +++ b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestInt.java @@ -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 @@ -216,4 +216,3 @@ public class SunMiscUnsafeAccessTestInt { } } } - diff --git a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestLong.java b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestLong.java index e484bcec291..64014df3340 100644 --- a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestLong.java +++ b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestLong.java @@ -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 @@ -216,4 +216,3 @@ public class SunMiscUnsafeAccessTestLong { } } } - diff --git a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestObject.java b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestObject.java index 1241f0fbcd4..0145124c7bd 100644 --- a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestObject.java +++ b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestObject.java @@ -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 @@ -170,4 +170,3 @@ public class SunMiscUnsafeAccessTestObject { } } - diff --git a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestShort.java b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestShort.java index d1d7b632389..9a815670595 100644 --- a/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestShort.java +++ b/hotspot/test/compiler/unsafe/SunMiscUnsafeAccessTestShort.java @@ -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 @@ -175,4 +175,3 @@ public class SunMiscUnsafeAccessTestShort { } } } - diff --git a/hotspot/test/compiler/unsafe/TestRawAliasing.java b/hotspot/test/compiler/unsafe/TestRawAliasing.java new file mode 100644 index 00000000000..c4042b81e2c --- /dev/null +++ b/hotspot/test/compiler/unsafe/TestRawAliasing.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8178047 + * @run main/othervm -XX:CompileCommand=exclude,*.main -XX:-TieredCompilation -XX:-BackgroundCompilation compiler.unsafe.TestRawAliasing + * @modules java.base/jdk.internal.misc:+open + */ + +package compiler.unsafe; + +import java.lang.reflect.Field; + +public class TestRawAliasing { + static private final jdk.internal.misc.Unsafe UNSAFE; + static { + try { + Field f = jdk.internal.misc.Unsafe.class.getDeclaredField("theUnsafe"); + f.setAccessible(true); + UNSAFE = (jdk.internal.misc.Unsafe) f.get(null); + } catch (Exception e) { + throw new RuntimeException("Unable to get Unsafe instance.", e); + } + } + + static private final int OFFSET_X = 50; + static private final int OFFSET_Y = 100; + + private static int test(long base_plus_offset_x, long base_plus_offset_y, int magic_value) { + // write 0 to a location + UNSAFE.putByte(base_plus_offset_x - OFFSET_X, (byte)0); + // write unfoldable value to really the same location with another base + UNSAFE.putByte(base_plus_offset_y - OFFSET_Y, (byte)magic_value); + // read the value back, should be equal to "unfoldable_value" + return UNSAFE.getByte(base_plus_offset_x - OFFSET_X); + } + + private static final int OFF_HEAP_AREA_SIZE = 128; + private static final byte MAGIC = 123; + + // main is excluded from compilation since we don't want the test method to inline and make base values fold + public static void main(String... args) { + long base = UNSAFE.allocateMemory(OFF_HEAP_AREA_SIZE); + for (int i = 0; i < 100_000; i++) { + if (test(base + OFFSET_X, base + OFFSET_Y, MAGIC) != MAGIC) { + throw new RuntimeException("Unexpected magic value"); + } + } + } +} diff --git a/hotspot/test/compiler/unsafe/X-UnsafeAccessTest.java.template b/hotspot/test/compiler/unsafe/X-UnsafeAccessTest.java.template index 55ed81fc059..f28791765a1 100644 --- a/hotspot/test/compiler/unsafe/X-UnsafeAccessTest.java.template +++ b/hotspot/test/compiler/unsafe/X-UnsafeAccessTest.java.template @@ -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 @@ -26,7 +26,11 @@ * @bug 8143628 * @summary Test unsafe access for $type$ * +#if[JdkInternalMisc] + * @modules $module$/$package$:+open +#else[JdkInternalMisc] * @modules $module$/$package$ +#end[JdkInternalMisc] * @run testng/othervm -Diters=100 -Xint compiler.unsafe.$Qualifier$UnsafeAccessTest$Type$ * @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 compiler.unsafe.$Qualifier$UnsafeAccessTest$Type$ * @run testng/othervm -Diters=20000 -XX:-TieredCompilation compiler.unsafe.$Qualifier$UnsafeAccessTest$Type$ @@ -219,33 +223,51 @@ public class $Qualifier$UnsafeAccessTest$Type$ { // Compare { +#if[JdkInternalMisc] + boolean r = UNSAFE.compareAndSet$Type$(base, offset, $value1$, $value2$); + assertEquals(r, true, "success compareAndSet $type$"); +#else[JdkInternalMisc] boolean r = UNSAFE.compareAndSwap$Type$(base, offset, $value1$, $value2$); assertEquals(r, true, "success compareAndSwap $type$"); +#end[JdkInternalMisc] $type$ x = UNSAFE.get$Type$(base, offset); +#if[JdkInternalMisc] + assertEquals(x, $value2$, "success compareAndSet $type$ value"); +#else[JdkInternalMisc] assertEquals(x, $value2$, "success compareAndSwap $type$ value"); +#end[JdkInternalMisc] } { +#if[JdkInternalMisc] + boolean r = UNSAFE.compareAndSet$Type$(base, offset, $value1$, $value3$); + assertEquals(r, false, "failing compareAndSet $type$"); +#else[JdkInternalMisc] boolean r = UNSAFE.compareAndSwap$Type$(base, offset, $value1$, $value3$); assertEquals(r, false, "failing compareAndSwap $type$"); +#end[JdkInternalMisc] $type$ x = UNSAFE.get$Type$(base, offset); +#if[JdkInternalMisc] + assertEquals(x, $value2$, "failing compareAndSet $type$ value"); +#else[JdkInternalMisc] assertEquals(x, $value2$, "failing compareAndSwap $type$ value"); +#end[JdkInternalMisc] } #if[JdkInternalMisc] // Advanced compare { - $type$ r = UNSAFE.compareAndExchange$Type$Volatile(base, offset, $value2$, $value1$); - assertEquals(r, $value2$, "success compareAndExchangeVolatile $type$"); + $type$ r = UNSAFE.compareAndExchange$Type$(base, offset, $value2$, $value1$); + assertEquals(r, $value2$, "success compareAndExchange $type$"); $type$ x = UNSAFE.get$Type$(base, offset); - assertEquals(x, $value1$, "success compareAndExchangeVolatile $type$ value"); + assertEquals(x, $value1$, "success compareAndExchange $type$ value"); } { - $type$ r = UNSAFE.compareAndExchange$Type$Volatile(base, offset, $value2$, $value3$); - assertEquals(r, $value1$, "failing compareAndExchangeVolatile $type$"); + $type$ r = UNSAFE.compareAndExchange$Type$(base, offset, $value2$, $value3$); + assertEquals(r, $value1$, "failing compareAndExchange $type$"); $type$ x = UNSAFE.get$Type$(base, offset); - assertEquals(x, $value1$, "failing compareAndExchangeVolatile $type$ value"); + assertEquals(x, $value1$, "failing compareAndExchange $type$ value"); } { @@ -279,41 +301,41 @@ public class $Qualifier$UnsafeAccessTest$Type$ { { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwap$Type$(base, offset, $value1$, $value2$); + success = UNSAFE.weakCompareAndSet$Type$Plain(base, offset, $value1$, $value2$); } - assertEquals(success, true, "weakCompareAndSwap $type$"); + assertEquals(success, true, "weakCompareAndSetPlain $type$"); $type$ x = UNSAFE.get$Type$(base, offset); - assertEquals(x, $value2$, "weakCompareAndSwap $type$ value"); + assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwap$Type$Acquire(base, offset, $value2$, $value1$); + success = UNSAFE.weakCompareAndSet$Type$Acquire(base, offset, $value2$, $value1$); } - assertEquals(success, true, "weakCompareAndSwapAcquire $type$"); + assertEquals(success, true, "weakCompareAndSetAcquire $type$"); $type$ x = UNSAFE.get$Type$(base, offset); - assertEquals(x, $value1$, "weakCompareAndSwapAcquire $type$"); + assertEquals(x, $value1$, "weakCompareAndSetAcquire $type$"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwap$Type$Release(base, offset, $value1$, $value2$); + success = UNSAFE.weakCompareAndSet$Type$Release(base, offset, $value1$, $value2$); } - assertEquals(success, true, "weakCompareAndSwapRelease $type$"); + assertEquals(success, true, "weakCompareAndSetRelease $type$"); $type$ x = UNSAFE.get$Type$(base, offset); - assertEquals(x, $value2$, "weakCompareAndSwapRelease $type$"); + assertEquals(x, $value2$, "weakCompareAndSetRelease $type$"); } { boolean success = false; for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) { - success = UNSAFE.weakCompareAndSwap$Type$Volatile(base, offset, $value2$, $value1$); + success = UNSAFE.weakCompareAndSet$Type$(base, offset, $value2$, $value1$); } - assertEquals(success, true, "weakCompareAndSwapVolatile $type$"); + assertEquals(success, true, "weakCompareAndSet $type$"); $type$ x = UNSAFE.get$Type$(base, offset); - assertEquals(x, $value1$, "weakCompareAndSwapVolatile $type$"); + assertEquals(x, $value1$, "weakCompareAndSet $type$"); } #end[JdkInternalMisc] @@ -354,4 +376,3 @@ public class $Qualifier$UnsafeAccessTest$Type$ { #end[!boolean] #end[!Object] } - diff --git a/hotspot/test/compiler/whitebox/AllocationCodeBlobTest.java b/hotspot/test/compiler/whitebox/AllocationCodeBlobTest.java index 0f323a8c52e..80d89d33de7 100644 --- a/hotspot/test/compiler/whitebox/AllocationCodeBlobTest.java +++ b/hotspot/test/compiler/whitebox/AllocationCodeBlobTest.java @@ -44,7 +44,7 @@ package compiler.whitebox; import jdk.test.lib.Asserts; -import jdk.test.lib.wrappers.InfiniteLoop; +import jdk.test.lib.InfiniteLoop; import sun.hotspot.WhiteBox; import sun.hotspot.code.BlobType; diff --git a/hotspot/test/gc/arguments/TestAggressiveHeap.java b/hotspot/test/gc/arguments/TestAggressiveHeap.java new file mode 100644 index 00000000000..417e98090ea --- /dev/null +++ b/hotspot/test/gc/arguments/TestAggressiveHeap.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test TestAggressiveHeap + * @key gc + * @bug 8179084 + * @requires vm.gc.Parallel + * @summary Test argument processing for -XX:+AggressiveHeap. + * @library /test/lib + * @modules java.base java.management + * @run driver TestAggressiveHeap + */ + +import java.lang.management.ManagementFactory; +import javax.management.MBeanServer; +import javax.management.ObjectName; + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +public class TestAggressiveHeap { + + public static void main(String args[]) throws Exception { + if (canUseAggressiveHeapOption()) { + testFlag(); + } + } + + // Note: Not a normal boolean flag; -XX:-AggressiveHeap is invalid. + private static final String option = "-XX:+AggressiveHeap"; + + // Option requires at least 256M, else error during option processing. + private static final long minMemory = 256 * 1024 * 1024; + + // bool UseParallelGC = true {product} {command line} + private static final String parallelGCPattern = + " *bool +UseParallelGC *= *true +\\{product\\} *\\{command line\\}"; + + private static void testFlag() throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + option, "-XX:+PrintFlagsFinal", "-version"); + + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + + output.shouldHaveExitValue(0); + + String value = output.firstMatch(parallelGCPattern); + if (value == null) { + throw new RuntimeException( + option + " didn't set UseParallelGC as if from command line"); + } + } + + private static boolean haveRequiredMemory() throws Exception { + MBeanServer server = ManagementFactory.getPlatformMBeanServer(); + ObjectName os = new ObjectName("java.lang", "type", "OperatingSystem"); + Object attr = server.getAttribute(os, "TotalPhysicalMemorySize"); + String value = attr.toString(); + long memory = Long.parseLong(value); + return memory >= minMemory; + } + + private static boolean canUseAggressiveHeapOption() throws Exception { + if (!haveRequiredMemory()) { + System.out.println( + "Skipping test of " + option + " : insufficient memory"); + return false; + } + return true; + } +} + diff --git a/hotspot/test/gc/arguments/TestDynMaxHeapFreeRatio.java b/hotspot/test/gc/arguments/TestDynMaxHeapFreeRatio.java index c6d2b547357..4b7fd30ab41 100644 --- a/hotspot/test/gc/arguments/TestDynMaxHeapFreeRatio.java +++ b/hotspot/test/gc/arguments/TestDynMaxHeapFreeRatio.java @@ -24,7 +24,7 @@ import static jdk.test.lib.Asserts.assertEQ; import static jdk.test.lib.Asserts.assertFalse; import static jdk.test.lib.Asserts.assertTrue; -import jdk.test.lib.DynamicVMOption; +import jdk.test.lib.management.DynamicVMOption; /** * @test TestDynMaxHeapFreeRatio diff --git a/hotspot/test/gc/arguments/TestDynMinHeapFreeRatio.java b/hotspot/test/gc/arguments/TestDynMinHeapFreeRatio.java index e21f066b0a0..09f24e7af35 100644 --- a/hotspot/test/gc/arguments/TestDynMinHeapFreeRatio.java +++ b/hotspot/test/gc/arguments/TestDynMinHeapFreeRatio.java @@ -38,7 +38,7 @@ import static jdk.test.lib.Asserts.assertEQ; import static jdk.test.lib.Asserts.assertFalse; import static jdk.test.lib.Asserts.assertTrue; -import jdk.test.lib.DynamicVMOption; +import jdk.test.lib.management.DynamicVMOption; public class TestDynMinHeapFreeRatio { diff --git a/hotspot/test/gc/class_unloading/TestClassUnloadingDisabled.java b/hotspot/test/gc/class_unloading/TestClassUnloadingDisabled.java index 96f10bbcd60..6d1c2d602cb 100644 --- a/hotspot/test/gc/class_unloading/TestClassUnloadingDisabled.java +++ b/hotspot/test/gc/class_unloading/TestClassUnloadingDisabled.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reqserved. + * 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 diff --git a/hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java b/hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java index 06be649608d..f648be9f484 100644 --- a/hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java +++ b/hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java @@ -26,7 +26,7 @@ import java.util.List; import java.util.ArrayList; import jdk.test.lib.ByteCodeLoader; -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.Platform; import sun.management.ManagementFactoryHelper; diff --git a/hotspot/test/gc/parallel/TestDynShrinkHeap.java b/hotspot/test/gc/parallel/TestDynShrinkHeap.java index f5e78ab7346..78c5946c4b7 100644 --- a/hotspot/test/gc/parallel/TestDynShrinkHeap.java +++ b/hotspot/test/gc/parallel/TestDynShrinkHeap.java @@ -31,7 +31,7 @@ * @library /test/lib / * @run main/othervm -XX:+UseAdaptiveSizePolicyWithSystemGC -XX:+UseParallelGC -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 -Xmx1g -verbose:gc TestDynShrinkHeap */ -import jdk.test.lib.DynamicVMOption; +import jdk.test.lib.management.DynamicVMOption; import java.lang.management.ManagementFactory; import java.lang.management.MemoryUsage; import java.util.ArrayList; diff --git a/hotspot/test/gc/parallel/TestPrintGCDetailsVerbose.java b/hotspot/test/gc/parallel/TestPrintGCDetailsVerbose.java index 1069b417d47..ccba8fcb8d5 100644 --- a/hotspot/test/gc/parallel/TestPrintGCDetailsVerbose.java +++ b/hotspot/test/gc/parallel/TestPrintGCDetailsVerbose.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -23,12 +23,13 @@ /* * @test TestPrintGCDetailsVerbose - * @bug 8016740 + * @bug 8016740 8177963 * @summary Tests that jvm with maximally verbose GC logging does not crash when ParOldGC has no memory * @key gc * @requires vm.gc.Parallel * @modules java.base/jdk.internal.misc * @run main/othervm -Xmx50m -XX:+UseParallelGC -Xlog:gc*=trace TestPrintGCDetailsVerbose + * @run main/othervm -Xmx50m -XX:+UseParallelGC -XX:GCTaskTimeStampEntries=1 -Xlog:gc*=trace TestPrintGCDetailsVerbose */ public class TestPrintGCDetailsVerbose { diff --git a/hotspot/test/gc/startup_warnings/TestCMS.java b/hotspot/test/gc/startup_warnings/TestCMS.java index d51a3ded1c0..a5b7cc9fc89 100644 --- a/hotspot/test/gc/startup_warnings/TestCMS.java +++ b/hotspot/test/gc/startup_warnings/TestCMS.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -24,8 +24,8 @@ /* * @test TestCMS * @key gc -* @bug 8006398 8155948 -* @summary Test that CMS prints a warning message only for a commercial build +* @bug 8006398 8155948 8179013 +* @summary Test that CMS prints a warning message * @library /test/lib * @modules java.base/jdk.internal.misc * java.management @@ -33,19 +33,13 @@ import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.BuildHelper; public class TestCMS { public static void runTest(String[] args) throws Exception { - boolean isCommercial = BuildHelper.isCommercialBuild(); ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args); OutputAnalyzer output = new OutputAnalyzer(pb.start()); - if (isCommercial) { - output.shouldContain("deprecated"); - } else { - output.shouldNotContain("deprecated"); - } + output.shouldContain("deprecated"); output.shouldNotContain("error"); output.shouldHaveExitValue(0); } diff --git a/hotspot/test/native/logging/test_logTagSetDescriptions.cpp b/hotspot/test/native/logging/test_logTagSetDescriptions.cpp index 77c0a3191dc..b0e9364c525 100644 --- a/hotspot/test/native/logging/test_logTagSetDescriptions.cpp +++ b/hotspot/test/native/logging/test_logTagSetDescriptions.cpp @@ -10,7 +10,7 @@ * 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 - * ac_heapanied this code). + * 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, diff --git a/hotspot/test/native/memory/test_metachunk.cpp b/hotspot/test/native/memory/test_metachunk.cpp index e99bf42a121..9a4c6dae3a1 100644 --- a/hotspot/test/native/memory/test_metachunk.cpp +++ b/hotspot/test/native/memory/test_metachunk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/native/runtime/test_globals.cpp b/hotspot/test/native/runtime/test_globals.cpp index 2b6a99771d2..3a84f2ce714 100644 --- a/hotspot/test/native/runtime/test_globals.cpp +++ b/hotspot/test/native/runtime/test_globals.cpp @@ -53,7 +53,7 @@ TEST_VM(FlagGuard, uint_flag) { } TEST_VM(FlagGuard, uintx_flag) { - TEST_FLAG(GCTaskTimeStampEntries, uintx, 1337); + TEST_FLAG(GCTaskTimeStampEntries, uint, 1337); } TEST_VM(FlagGuard, size_t_flag) { diff --git a/hotspot/test/runtime/BadObjectClass/BootstrapRedefine.java b/hotspot/test/runtime/BadObjectClass/BootstrapRedefine.java index 186b235f0de..249993961b2 100644 --- a/hotspot/test/runtime/BadObjectClass/BootstrapRedefine.java +++ b/hotspot/test/runtime/BadObjectClass/BootstrapRedefine.java @@ -31,7 +31,7 @@ * @run main BootstrapRedefine */ -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; diff --git a/hotspot/test/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java b/hotspot/test/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java index d15d536b751..1a46eb01877 100644 --- a/hotspot/test/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java +++ b/hotspot/test/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java @@ -34,7 +34,7 @@ */ import jdk.test.lib.Asserts; -import jdk.test.lib.DynamicVMOption; +import jdk.test.lib.management.DynamicVMOption; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.dcmd.PidJcmdExecutor; diff --git a/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRangesDynamic.java b/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRangesDynamic.java index d5f20b5d4d2..4fb53dfe1ea 100644 --- a/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRangesDynamic.java +++ b/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRangesDynamic.java @@ -28,7 +28,7 @@ * @modules java.base/jdk.internal.misc * jdk.attach/sun.tools.attach * java.management - * @run main/othervm -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 TestOptionsWithRangesDynamic + * @run main/othervm -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 -Djdk.attach.allowAttachSelf TestOptionsWithRangesDynamic */ import java.util.List; diff --git a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java index b10ac75c56e..dd19e352d32 100644 --- a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java +++ b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java @@ -29,7 +29,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; -import jdk.test.lib.DynamicVMOption; +import jdk.test.lib.management.DynamicVMOption; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.dcmd.CommandExecutor; diff --git a/hotspot/test/runtime/CommandLine/PermGenFlagsTest.java b/hotspot/test/runtime/CommandLine/PermGenFlagsTest.java index 9a821e0059e..3ce993f57d4 100644 --- a/hotspot/test/runtime/CommandLine/PermGenFlagsTest.java +++ b/hotspot/test/runtime/CommandLine/PermGenFlagsTest.java @@ -8,7 +8,7 @@ * * 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 + * 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). * diff --git a/hotspot/test/runtime/CommandLine/VMOptionsFile/TestVMOptionsFile.java b/hotspot/test/runtime/CommandLine/VMOptionsFile/TestVMOptionsFile.java index 865fb9b8556..b88c50683b2 100644 --- a/hotspot/test/runtime/CommandLine/VMOptionsFile/TestVMOptionsFile.java +++ b/hotspot/test/runtime/CommandLine/VMOptionsFile/TestVMOptionsFile.java @@ -51,7 +51,7 @@ import java.util.List; import java.util.Properties; import java.util.Set; import jdk.test.lib.Asserts; -import jdk.test.lib.DynamicVMOption; +import jdk.test.lib.management.DynamicVMOption; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff --git a/hotspot/test/runtime/LocalLong/LocalLongHelper.java b/hotspot/test/runtime/LocalLong/LocalLongHelper.java index 2134aee069e..065d7d8cbcb 100644 --- a/hotspot/test/runtime/LocalLong/LocalLongHelper.java +++ b/hotspot/test/runtime/LocalLong/LocalLongHelper.java @@ -30,10 +30,10 @@ import java.lang.StackWalker.StackFrame; public class LocalLongHelper { static StackWalker sw; - static Method intValue; + static Method longValue; static Method getLocals; static Class primitiveValueClass; - static Method primitiveType; + static Method primitiveSize; static Method getMethodType; static Field memberName; static Field offset; @@ -43,27 +43,29 @@ public class LocalLongHelper { new LocalLongHelper().longArg(0xC0FFEE, 0x1234567890ABCDEFL); } - // locals[2] contains the high byte of the long argument. + // locals[2] contains the unused slot of the long argument. public long longArg(int i, long l) throws Throwable { List frames = sw.walk(s -> s.collect(Collectors.toList())); Object[] locals = (Object[]) getLocals.invoke(frames.get(0)); - int locals_2 = (int) intValue.invoke(locals[2]); - if (locals_2 != 0){ - throw new RuntimeException("Expected locals_2 == 0"); + if (8 == (int) primitiveSize.invoke(locals[2])) { // Only test 64-bit + long locals_2 = (long) longValue.invoke(locals[2]); + if (locals_2 != 0){ + throw new RuntimeException("Expected locals_2 == 0"); + } } return l; // Don't want l to become a dead var } private static void setupReflectionStatics() throws Throwable { Class liveStackFrameClass = Class.forName("java.lang.LiveStackFrame"); - primitiveValueClass = Class.forName("java.lang.LiveStackFrame$PrimitiveValue"); + primitiveValueClass = Class.forName("java.lang.LiveStackFrame$PrimitiveSlot"); getLocals = liveStackFrameClass.getDeclaredMethod("getLocals"); getLocals.setAccessible(true); - intValue = primitiveValueClass.getDeclaredMethod("intValue"); - intValue.setAccessible(true); + longValue = primitiveValueClass.getDeclaredMethod("longValue"); + longValue.setAccessible(true); Class stackFrameInfoClass = Class.forName("java.lang.StackFrameInfo"); memberName = stackFrameInfoClass.getDeclaredField("memberName"); @@ -80,20 +82,8 @@ public class LocalLongHelper { f.setAccessible(true); Object localsAndOperandsOption = f.get(null); - primitiveType = primitiveValueClass.getDeclaredMethod("type"); - primitiveType.setAccessible(true); - + primitiveSize = primitiveValueClass.getDeclaredMethod("size"); + primitiveSize.setAccessible(true); sw = (StackWalker) ewsNI.invoke(null, java.util.Collections.emptySet(), localsAndOperandsOption); } - - private static String type(Object o) throws Throwable { - if (primitiveValueClass.isInstance(o)) { - final char c = (char) primitiveType.invoke(o); - return String.valueOf(c); - } else if (o != null) { - return o.getClass().getName(); - } else { - return "null"; - } - } } diff --git a/hotspot/test/runtime/Metaspace/DefineClass.java b/hotspot/test/runtime/Metaspace/DefineClass.java new file mode 100644 index 00000000000..6225e1555fc --- /dev/null +++ b/hotspot/test/runtime/Metaspace/DefineClass.java @@ -0,0 +1,381 @@ +/* + * Copyright (c) 2017 SAP SE. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8173743 + * @requires vm.compMode != "Xcomp" + * @summary Failures during class definition can lead to memory leaks in metaspace + * @library /test/lib + * @run main/othervm test.DefineClass defineClass + * @run main/othervm test.DefineClass defineSystemClass + * @run main/othervm -XX:+UnlockDiagnosticVMOptions + -XX:+UnsyncloadClass -XX:+AllowParallelDefineClass + test.DefineClass defineClassParallel + * @run main/othervm -XX:+UnlockDiagnosticVMOptions + -XX:+UnsyncloadClass -XX:-AllowParallelDefineClass + test.DefineClass defineClassParallel + * @run main/othervm -XX:+UnlockDiagnosticVMOptions + -XX:-UnsyncloadClass -XX:+AllowParallelDefineClass + test.DefineClass defineClassParallel + * @run main/othervm -XX:+UnlockDiagnosticVMOptions + -XX:-UnsyncloadClass -XX:-AllowParallelDefineClass + test.DefineClass defineClassParallel + * @run main/othervm -Djdk.attach.allowAttachSelf test.DefineClass redefineClass + * @run main/othervm -Djdk.attach.allowAttachSelf test.DefineClass redefineClassWithError + * @author volker.simonis@gmail.com + */ + +package test; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.lang.instrument.ClassDefinition; +import java.lang.instrument.Instrumentation; +import java.lang.management.ManagementFactory; +import java.util.Scanner; +import java.util.concurrent.CountDownLatch; +import java.util.jar.Attributes; +import java.util.jar.JarEntry; +import java.util.jar.JarOutputStream; +import java.util.jar.Manifest; + +import javax.management.MBeanServer; +import javax.management.ObjectName; + +import com.sun.tools.attach.VirtualMachine; + +import jdk.test.lib.process.ProcessTools; + +public class DefineClass { + + private static Instrumentation instrumentation; + + public void getID(CountDownLatch start, CountDownLatch stop) { + String id = "AAAAAAAA"; + System.out.println(id); + try { + // Signal that we've entered the activation.. + start.countDown(); + //..and wait until we can leave it. + stop.await(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + System.out.println(id); + return; + } + + private static class MyThread extends Thread { + private DefineClass dc; + private CountDownLatch start, stop; + + public MyThread(DefineClass dc, CountDownLatch start, CountDownLatch stop) { + this.dc = dc; + this.start = start; + this.stop = stop; + } + + public void run() { + dc.getID(start, stop); + } + } + + private static class ParallelLoadingThread extends Thread { + private MyParallelClassLoader pcl; + private CountDownLatch stop; + private byte[] buf; + + public ParallelLoadingThread(MyParallelClassLoader pcl, byte[] buf, CountDownLatch stop) { + this.pcl = pcl; + this.stop = stop; + this.buf = buf; + } + + public void run() { + try { + stop.await(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + try { + @SuppressWarnings("unchecked") + Class dc = (Class) pcl.myDefineClass(DefineClass.class.getName(), buf, 0, buf.length); + } + catch (LinkageError jle) { + // Expected with a parallel capable class loader and + // -XX:+UnsyncloadClass or -XX:+AllowParallelDefineClass + pcl.incrementLinkageErrors(); + } + + } + } + + static private class MyClassLoader extends ClassLoader { + public Class myDefineClass(String name, byte[] b, int off, int len) throws ClassFormatError { + return defineClass(name, b, off, len, null); + } + } + + static private class MyParallelClassLoader extends ClassLoader { + static { + System.out.println("parallelCapable : " + registerAsParallelCapable()); + } + public Class myDefineClass(String name, byte[] b, int off, int len) throws ClassFormatError { + return defineClass(name, b, off, len, null); + } + public synchronized void incrementLinkageErrors() { + linkageErrors++; + } + public int getLinkageErrors() { + return linkageErrors; + } + private volatile int linkageErrors; + } + + public static void agentmain(String args, Instrumentation inst) { + System.out.println("Loading Java Agent."); + instrumentation = inst; + } + + + private static void loadInstrumentationAgent(String myName, byte[] buf) throws Exception { + // Create agent jar file on the fly + Manifest m = new Manifest(); + m.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); + m.getMainAttributes().put(new Attributes.Name("Agent-Class"), myName); + m.getMainAttributes().put(new Attributes.Name("Can-Redefine-Classes"), "true"); + File jarFile = File.createTempFile("agent", ".jar"); + jarFile.deleteOnExit(); + JarOutputStream jar = new JarOutputStream(new FileOutputStream(jarFile), m); + jar.putNextEntry(new JarEntry(myName.replace('.', '/') + ".class")); + jar.write(buf); + jar.close(); + String pid = Long.toString(ProcessTools.getProcessId()); + System.out.println("Our pid is = " + pid); + VirtualMachine vm = VirtualMachine.attach(pid); + vm.loadAgent(jarFile.getAbsolutePath()); + } + + private static byte[] getBytecodes(String myName) throws Exception { + InputStream is = DefineClass.class.getResourceAsStream(myName + ".class"); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] buf = new byte[4096]; + int len; + while ((len = is.read(buf)) != -1) baos.write(buf, 0, len); + buf = baos.toByteArray(); + System.out.println("sizeof(" + myName + ".class) == " + buf.length); + return buf; + } + + private static int getStringIndex(String needle, byte[] buf) { + return getStringIndex(needle, buf, 0); + } + + private static int getStringIndex(String needle, byte[] buf, int offset) { + outer: + for (int i = offset; i < buf.length - offset - needle.length(); i++) { + for (int j = 0; j < needle.length(); j++) { + if (buf[i + j] != (byte)needle.charAt(j)) continue outer; + } + return i; + } + return 0; + } + + private static void replaceString(byte[] buf, String name, int index) { + for (int i = index; i < index + name.length(); i++) { + buf[i] = (byte)name.charAt(i - index); + } + } + + private static MBeanServer mbserver = ManagementFactory.getPlatformMBeanServer(); + + private static int getClassStats(String pattern) { + try { + ObjectName diagCmd = new ObjectName("com.sun.management:type=DiagnosticCommand"); + + String result = (String)mbserver.invoke(diagCmd , "gcClassStats" , new Object[] { null }, new String[] {String[].class.getName()}); + int count = 0; + try (Scanner s = new Scanner(result)) { + if (s.hasNextLine()) { + System.out.println(s.nextLine()); + } + while (s.hasNextLine()) { + String l = s.nextLine(); + if (l.endsWith(pattern)) { + count++; + System.out.println(l); + } + } + } + return count; + } + catch (Exception e) { + throw new RuntimeException("Test failed because we can't read the class statistics!", e); + } + } + + private static void printClassStats(int expectedCount, boolean reportError) { + int count = getClassStats("DefineClass"); + String res = "Should have " + expectedCount + + " DefineClass instances and we have: " + count; + System.out.println(res); + if (reportError && count != expectedCount) { + throw new RuntimeException(res); + } + } + + public static final int ITERATIONS = 10; + + public static void main(String[] args) throws Exception { + String myName = DefineClass.class.getName(); + byte[] buf = getBytecodes(myName.substring(myName.lastIndexOf(".") + 1)); + int iterations = (args.length > 1 ? Integer.parseInt(args[1]) : ITERATIONS); + + if (args.length == 0 || "defineClass".equals(args[0])) { + MyClassLoader cl = new MyClassLoader(); + for (int i = 0; i < iterations; i++) { + try { + @SuppressWarnings("unchecked") + Class dc = (Class) cl.myDefineClass(myName, buf, 0, buf.length); + System.out.println(dc); + } + catch (LinkageError jle) { + // Can only define once! + if (i == 0) throw new Exception("Should succeed the first time."); + } + } + // We expect to have two instances of DefineClass here: the initial version in which we are + // executing and another version which was loaded into our own classloader 'MyClassLoader'. + // All the subsequent attempts to reload DefineClass into our 'MyClassLoader' should have failed. + printClassStats(2, false); + System.gc(); + System.out.println("System.gc()"); + // At least after System.gc() the failed loading attempts should leave no instances around! + printClassStats(2, true); + } + else if ("defineSystemClass".equals(args[0])) { + MyClassLoader cl = new MyClassLoader(); + int index = getStringIndex("test/DefineClass", buf); + replaceString(buf, "java/DefineClass", index); + while ((index = getStringIndex("Ltest/DefineClass;", buf, index + 1)) != 0) { + replaceString(buf, "Ljava/DefineClass;", index); + } + index = getStringIndex("test.DefineClass", buf); + replaceString(buf, "java.DefineClass", index); + + for (int i = 0; i < iterations; i++) { + try { + @SuppressWarnings("unchecked") + Class dc = (Class) cl.myDefineClass(null, buf, 0, buf.length); + throw new RuntimeException("Defining a class in the 'java' package should fail!"); + } + catch (java.lang.SecurityException jlse) { + // Expected, because we're not allowed to define a class in the 'java' package + } + } + // We expect to stay with one (the initial) instances of DefineClass. + // All the subsequent attempts to reload DefineClass into the 'java' package should have failed. + printClassStats(1, false); + System.gc(); + System.out.println("System.gc()"); + // At least after System.gc() the failed loading attempts should leave no instances around! + printClassStats(1, true); + } + else if ("defineClassParallel".equals(args[0])) { + MyParallelClassLoader pcl = new MyParallelClassLoader(); + CountDownLatch stop = new CountDownLatch(1); + + Thread[] threads = new Thread[iterations]; + for (int i = 0; i < iterations; i++) { + (threads[i] = new ParallelLoadingThread(pcl, buf, stop)).start(); + } + stop.countDown(); // start parallel class loading.. + // ..and wait until all threads loaded the class + for (int i = 0; i < iterations; i++) { + threads[i].join(); + } + System.out.print("Counted " + pcl.getLinkageErrors() + " LinkageErrors "); + System.out.println(pcl.getLinkageErrors() == 0 ? + "" : "(use -XX:+UnsyncloadClass and/or -XX:+AllowParallelDefineClass to avoid this)"); + System.gc(); + System.out.println("System.gc()"); + // After System.gc() we expect to remain with two instances: one is the initial version which is + // kept alive by this main method and another one in the parallel class loader. + printClassStats(2, true); + } + else if ("redefineClass".equals(args[0])) { + loadInstrumentationAgent(myName, buf); + int index = getStringIndex("AAAAAAAA", buf); + CountDownLatch stop = new CountDownLatch(1); + + Thread[] threads = new Thread[iterations]; + for (int i = 0; i < iterations; i++) { + buf[index] = (byte) ('A' + i + 1); // Change string constant in getID() which is legal in redefinition + instrumentation.redefineClasses(new ClassDefinition(DefineClass.class, buf)); + DefineClass dc = DefineClass.class.newInstance(); + CountDownLatch start = new CountDownLatch(1); + (threads[i] = new MyThread(dc, start, stop)).start(); + start.await(); // Wait until the new thread entered the getID() method + } + // We expect to have one instance for each redefinition because they are all kept alive by an activation + // plus the initial version which is kept active by this main method. + printClassStats(iterations + 1, false); + stop.countDown(); // Let all threads leave the DefineClass.getID() activation.. + // ..and wait until really all of them returned from DefineClass.getID() + for (int i = 0; i < iterations; i++) { + threads[i].join(); + } + System.gc(); + System.out.println("System.gc()"); + // After System.gc() we expect to remain with two instances: one is the initial version which is + // kept alive by this main method and another one which is the latest redefined version. + printClassStats(2, true); + } + else if ("redefineClassWithError".equals(args[0])) { + loadInstrumentationAgent(myName, buf); + int index = getStringIndex("getID", buf); + + for (int i = 0; i < iterations; i++) { + buf[index] = (byte) 'X'; // Change getID() to XetID() which is illegal in redefinition + try { + instrumentation.redefineClasses(new ClassDefinition(DefineClass.class, buf)); + throw new RuntimeException("Class redefinition isn't allowed to change method names!"); + } + catch (UnsupportedOperationException uoe) { + // Expected because redefinition can't change the name of methods + } + } + // We expect just a single DefineClass instance because failed redefinitions should + // leave no garbage around. + printClassStats(1, false); + System.gc(); + System.out.println("System.gc()"); + // At least after a System.gc() we should definitely stay with a single instance! + printClassStats(1, true); + } + } +} diff --git a/hotspot/test/runtime/MinimalVM/JMX.java b/hotspot/test/runtime/MinimalVM/JMX.java index e57325ebaa7..5a9dc20abf0 100644 --- a/hotspot/test/runtime/MinimalVM/JMX.java +++ b/hotspot/test/runtime/MinimalVM/JMX.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -47,9 +47,8 @@ public class JMX { .shouldContain("-Dcom.sun.management is not supported in this VM.") .shouldHaveExitValue(1); - pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), Long.toString(ProcessTools.getProcessId()), "VM.print_threads"}); + pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), "-l"}); new OutputAnalyzer(pb.start()) - .shouldContain("Could not find any processes matching ") - .shouldHaveExitValue(1); + .shouldNotMatch("^" + Long.toString(ProcessTools.getProcessId()) + "\\s+.*$"); } } diff --git a/hotspot/test/runtime/RedefineTests/ModifyAnonymous.java b/hotspot/test/runtime/RedefineTests/ModifyAnonymous.java index 700a8f04e93..3eeb96e4a0a 100644 --- a/hotspot/test/runtime/RedefineTests/ModifyAnonymous.java +++ b/hotspot/test/runtime/RedefineTests/ModifyAnonymous.java @@ -34,15 +34,14 @@ import java.io.FileNotFoundException; import java.io.PrintWriter; -import java.lang.NoSuchFieldException; -import java.lang.NoSuchMethodException; import java.lang.RuntimeException; import java.lang.instrument.ClassDefinition; import java.lang.instrument.ClassFileTransformer; import java.lang.instrument.IllegalClassFormatException; import java.lang.instrument.Instrumentation; import java.security.ProtectionDomain; -import jdk.test.lib.*; + +import jdk.test.lib.compiler.InMemoryJavaCompiler; public class ModifyAnonymous { diff --git a/hotspot/test/runtime/Unsafe/DefineClass.java b/hotspot/test/runtime/Unsafe/DefineClass.java index 5973f666122..1c48d95b49b 100644 --- a/hotspot/test/runtime/Unsafe/DefineClass.java +++ b/hotspot/test/runtime/Unsafe/DefineClass.java @@ -32,8 +32,8 @@ */ import java.security.ProtectionDomain; -import java.io.InputStream; -import jdk.test.lib.InMemoryJavaCompiler; + +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.internal.misc.Unsafe; import static jdk.test.lib.Asserts.*; diff --git a/hotspot/test/runtime/Unsafe/NestedUnsafe.java b/hotspot/test/runtime/Unsafe/NestedUnsafe.java index a1a995ab636..ec63bf271f6 100644 --- a/hotspot/test/runtime/Unsafe/NestedUnsafe.java +++ b/hotspot/test/runtime/Unsafe/NestedUnsafe.java @@ -31,12 +31,9 @@ * @run main NestedUnsafe */ -import java.security.ProtectionDomain; -import java.io.InputStream; import java.lang.*; -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.internal.misc.Unsafe; -import static jdk.test.lib.Asserts.*; // package p; diff --git a/hotspot/test/runtime/classFileParserBug/AccModuleTest.java b/hotspot/test/runtime/classFileParserBug/AccModuleTest.java new file mode 100644 index 00000000000..2adc1e3db43 --- /dev/null +++ b/hotspot/test/runtime/classFileParserBug/AccModuleTest.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8174725 + * @summary Throw NoClassDefFoundError if class access_flags have ACC_MODULE set + * @compile BadAccModule.jcod BadAccModInrClss.jcod + * @run main AccModuleTest + */ + +// Test that classes with access_flags containing ACC_MODULE cause ClassDefNotFoundErrors. +public class AccModuleTest { + public static void main(String args[]) throws Throwable { + + System.out.println("Regression test for bug 8174725"); + try { + Class newClass = Class.forName("BadAccModule"); + throw new RuntimeException("Expected NoClassDefFoundError exception not thrown"); + } catch (java.lang.NoClassDefFoundError e) { + if (!e.getMessage().contains("BadAccModule is not a class because access_flag ACC_MODULE is set")) { + throw new RuntimeException("Wrong NoClassDefFoundError exception for AccModuleTest: " + e.getMessage()); + } + } + try { + Class newClass = Class.forName("BadAccModInrClss"); + throw new RuntimeException("Expected NoClassDefFoundError exception not thrown"); + } catch (java.lang.NoClassDefFoundError e) { + if (!e.getMessage().contains("BadAccModInrClss is not a class because access_flag ACC_MODULE is set")) { + throw new RuntimeException("Wrong NoClassDefFoundError exception for BadAccModInrClss: " + e.getMessage()); + } + } + } +} diff --git a/hotspot/test/runtime/classFileParserBug/BadAccModInrClss.jcod b/hotspot/test/runtime/classFileParserBug/BadAccModInrClss.jcod new file mode 100644 index 00000000000..bba5d08794b --- /dev/null +++ b/hotspot/test/runtime/classFileParserBug/BadAccModInrClss.jcod @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This tests that a class in an InnerClasses attribute with ACC_MODULE set + * causes a NoClassDefFoundError exception to get thrown. + */ + +class BadAccModInrClss { + 0xCAFEBABE; + 0; // minor version + 53; // version + [22] { // Constant Pool + ; // first element is empty + Field #3 #14; // #1 at 0x0A + Method #4 #15; // #2 at 0x0F + class #16; // #3 at 0x14 + class #19; // #4 at 0x17 + Utf8 "this$0"; // #5 at 0x1A + Utf8 "La;"; // #6 at 0x23 + Utf8 "Synthetic"; // #7 at 0x29 + Utf8 ""; // #8 at 0x35 + Utf8 "(Ljava/lang/Object;)V"; // #9 at 0x3E + Utf8 "Code"; // #10 at 0x56 + Utf8 "LineNumberTable"; // #11 at 0x5D + Utf8 "SourceFile"; // #12 at 0x6F + Utf8 "a.java"; // #13 at 0x7C + NameAndType #5 #6; // #14 at 0x85 + NameAndType #8 #20; // #15 at 0x8A + Utf8 "BadAccModInrClss"; // #16 at 0x8F + Utf8 "Loc"; // #17 at 0x9E + Utf8 "InnerClasses"; // #18 at 0xA4 + Utf8 "java/lang/Object"; // #19 at 0xB3 + Utf8 "()V"; // #20 at 0xC6 + Utf8 "EnclosingMethod"; // #21 at 0xCC + } // Constant Pool + + 0x0000; // access + #3;// this_cpx + #4;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [1] { // fields + { // Member at 0xE8 + 0x0000; // access + #5; // name_cpx + #6; // sig_cpx + [1] { // Attributes + Attr(#7, 0) { // Synthetic at 0xF0 + } // end Synthetic + } // Attributes + } // Member + } // fields + + [1] { // methods + { // Member at 0xF8 + 0x0001; // access + #8; // name_cpx + #20; // sig_cpx + [1] { // Attributes + Attr(#10, 17) { // Code at 0x0100 + 2; // max_stack + 2; // max_locals + Bytes[5]{ + 0x2AB70002B1; + }; + [0] { // Traps + } // end Traps + [0] { // Attributes + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [3] { // Attributes + Attr(#12, 2) { // SourceFile at 0x0119 + #13; + } // end SourceFile + ; + Attr(#18, 10) { // InnerClasses at 0x0121 + [1] { // InnerClasses + #3 #0 #17 0x8000; // at 0x0131 + } + } // end InnerClasses + ; + Attr(#21, 4) { // EnclosingMethod at 0x0131 + 0x0004000F; + } // end EnclosingMethod + } // Attributes +} // end class BadAccModInrClss diff --git a/hotspot/test/runtime/classFileParserBug/BadAccModule.jcod b/hotspot/test/runtime/classFileParserBug/BadAccModule.jcod new file mode 100644 index 00000000000..6d7d1ec1211 --- /dev/null +++ b/hotspot/test/runtime/classFileParserBug/BadAccModule.jcod @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +// This is a .jcod file for a simple "Hello World" program with ACC_MODULE added +// to its access_flags. (See line 67.) This should cause a NoClassDefFoundError +// when loading the class. +class BadAccModule { + 0xCAFEBABE; + 0; // minor version + 53; // version + [32] { // Constant Pool + ; // first element is empty + Method #6 #17; // #1 at 0x0A + Field #18 #19; // #2 at 0x0F + String #20; // #3 at 0x14 + Method #21 #22; // #4 at 0x17 + class #23; // #5 at 0x1C + class #24; // #6 at 0x1F + Utf8 ""; // #7 at 0x22 + Utf8 "()V"; // #8 at 0x2B + Utf8 "Code"; // #9 at 0x31 + Utf8 "LineNumberTable"; // #10 at 0x38 + Utf8 "main"; // #11 at 0x4A + Utf8 "([Ljava/lang/String;)V"; // #12 at 0x51 + Utf8 "Exceptions"; // #13 at 0x6A + class #25; // #14 at 0x77 + Utf8 "SourceFile"; // #15 at 0x7A + Utf8 "BadAccModule.java"; // #16 at 0x87 + NameAndType #7 #8; // #17 at 0x9B + class #26; // #18 at 0xA0 + NameAndType #27 #28; // #19 at 0xA3 + Utf8 "Hello World"; // #20 at 0xA8 + class #29; // #21 at 0xB6 + NameAndType #30 #31; // #22 at 0xB9 + Utf8 "BadAccModule"; // #23 at 0xBE + Utf8 "java/lang/Object"; // #24 at 0xCD + Utf8 "java/lang/Throwable"; // #25 at 0xE0 + Utf8 "java/lang/System"; // #26 at 0xF6 + Utf8 "out"; // #27 at 0x0109 + Utf8 "Ljava/io/PrintStream;"; // #28 at 0x010F + Utf8 "java/io/PrintStream"; // #29 at 0x0127 + Utf8 "println"; // #30 at 0x013D + Utf8 "(Ljava/lang/String;)V"; // #31 at 0x0147 + } // Constant Pool + + 0x8021; // access Added ACC_MODULE (0x8000) !!! + #5;// this_cpx + #6;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [0] { // fields + } // fields + + [2] { // methods + { // Member at 0x016B + 0x0001; // access + #7; // name_cpx + #8; // sig_cpx + [1] { // Attributes + Attr(#9, 29) { // Code at 0x0173 + 1; // max_stack + 1; // max_locals + Bytes[5]{ + 0x2AB70001B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#10, 6) { // LineNumberTable at 0x018A + [1] { // LineNumberTable + 0 1; // at 0x0196 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0196 + 0x0009; // access + #11; // name_cpx + #12; // sig_cpx + [2] { // Attributes + Attr(#9, 37) { // Code at 0x019E + 2; // max_stack + 1; // max_locals + Bytes[9]{ + 0xB200021203B60004; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#10, 10) { // LineNumberTable at 0x01B9 + [2] { // LineNumberTable + 0 4; // at 0x01C5 + 8 5; // at 0x01C9 + } + } // end LineNumberTable + } // Attributes + } // end Code + ; + Attr(#13, 4) { // Exceptions at 0x01C9 + [1] { // Exceptions + #14; // at 0x01D3 + } + } // end Exceptions + } // Attributes + } // Member + } // methods + + [1] { // Attributes + Attr(#15, 2) { // SourceFile at 0x01D5 + #16; + } // end SourceFile + } // Attributes +} // end class BadAccModule diff --git a/hotspot/test/runtime/classFileParserBug/fakeMethodAccessor.jasm b/hotspot/test/runtime/classFileParserBug/fakeMethodAccessor.jasm index 36cebcb5049..207438a59a7 100644 --- a/hotspot/test/runtime/classFileParserBug/fakeMethodAccessor.jasm +++ b/hotspot/test/runtime/classFileParserBug/fakeMethodAccessor.jasm @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -26,7 +26,6 @@ // to create a sub-type of jdk.internal.reflect.MethodAccessorImpl in order // to bypass Reflection.getCallerClass. That should fail with an IAE. // - import java.lang.reflect.Module; class fakeMethodAccessor extends jdk.internal.reflect.MethodAccessorImpl { public static void main(String[] a) throws Exception { fakeMethodAccessor f = new fakeMethodAccessor(); @@ -60,11 +59,11 @@ public static Method main:"([Ljava/lang/String;)V" astore_1; getstatic Field java/lang/System.out:"Ljava/io/PrintStream;"; ldc class java/lang/String; - invokevirtual Method java/lang/Class.getModule:"()Ljava/lang/reflect/Module;"; + invokevirtual Method java/lang/Class.getModule:"()Ljava/lang/Module;"; ldc String "jdk.internal.misc"; ldc class FakeMethodAccessor; - invokevirtual Method java/lang/Class.getModule:"()Ljava/lang/reflect/Module;"; - invokevirtual Method java/lang/reflect/Module.isExported:"(Ljava/lang/String;Ljava/lang/reflect/Module;)Z"; + invokevirtual Method java/lang/Class.getModule:"()Ljava/lang/Module;"; + invokevirtual Method java/lang/Module.isExported:"(Ljava/lang/String;Ljava/lang/Module;)Z"; invokevirtual Method java/io/PrintStream.println:"(Z)V"; return; } diff --git a/hotspot/test/runtime/constantPool/ACCModule52.java b/hotspot/test/runtime/constantPool/ACCModule52.java new file mode 100644 index 00000000000..241425076ca --- /dev/null +++ b/hotspot/test/runtime/constantPool/ACCModule52.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.internal.org.objectweb.asm.*; + +/* + * @test + * @summary Test that the JVM ignores ACC_MODULE if it is set for a version + * 52 class file. + * @bug 8175383 + * @library /test/lib + * @modules java.base/jdk.internal.org.objectweb.asm + * @compile -XDignore.symbol.file ACCModule52.java + * @run main ACCModule52 + */ + +public class ACCModule52 { + + static final String CLASS_NAME = "ACCModule52Pkg"; + + public static void main(String[] args) throws Exception { + int ACC_MODULE = 0x8000; + ClassWriter cw = new ClassWriter(0); + cw.visit(Opcodes.V1_8, + Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT + Opcodes.ACC_SYNTHETIC + ACC_MODULE, + CLASS_NAME, + null, + "java/lang/Object", + null); + + cw.visitEnd(); + byte[] bytes = cw.toByteArray(); + + + ClassLoader loader = new ClassLoader(ACCModule52.class.getClassLoader()) { + @Override + protected Class findClass(String cn)throws ClassNotFoundException { + if (cn.equals(CLASS_NAME)) { + Class superClass = super.defineClass(cn, bytes, 0, bytes.length); + } else { + throw new ClassNotFoundException(cn); + } + return null; + } + }; + + Class clazz = loader.loadClass(CLASS_NAME); + } +} diff --git a/hotspot/test/runtime/constantPool/ConstModule.java b/hotspot/test/runtime/constantPool/ConstModule.java new file mode 100644 index 00000000000..94e577a29ef --- /dev/null +++ b/hotspot/test/runtime/constantPool/ConstModule.java @@ -0,0 +1,255 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.internal.org.objectweb.asm.*; + +/* + * @test + * @summary Test scenarios for constant pool CONSTANT_Module and CONSTANT_Package + * types, for class file versions 53 and 52, when ACC_MODULE is set and + * not set in the access_flags. + * @bug 8175383 + * @library /test/lib + * @modules java.base/jdk.internal.org.objectweb.asm + * @compile -XDignore.symbol.file ConstModule.java + * @run main ConstModule + */ + +public class ConstModule { + + static final int ACC_MODULE = 0x8000; + static final boolean MODULE_TEST = true; + static final boolean PACKAGE_TEST = false; + static final boolean CFE_EXCEPTION = true; + static final boolean NCDFE_EXCEPTION = false; + + public static void main(String[] args) throws Exception { + + // Test that the JVM throws CFE for constant pool CONSTANT_Module type, for + // class file version 53, when ACC_MODULE is not set in the access_flags. + ConstModule.write_and_load(Opcodes.V1_9, + Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT + Opcodes.ACC_SYNTHETIC, + "jdk.fooMod", "FooMod", MODULE_TEST, CFE_EXCEPTION); + + // Test that the JVM throws NCDFE for constant pool CONSTANT_Module type, + // for class file version 53, when ACC_MODULE is set in the access_flags. + ConstModule.write_and_load(Opcodes.V1_9, + Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT + Opcodes.ACC_SYNTHETIC + ACC_MODULE, + "jdk.fooModACC", "FooModACC", MODULE_TEST, NCDFE_EXCEPTION); + + // Test that the JVM throws CFE for constant pool CONSTANT_Module type, for + // class file version 52, even when ACC_MODULE is set in the access_flags. + ConstModule.write_and_load(Opcodes.V1_8, + Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT + Opcodes.ACC_SYNTHETIC + ACC_MODULE, + "jdk.fooModACC52", "FooModACC52", MODULE_TEST, CFE_EXCEPTION); + + // Test that the JVM throws CFE for constant pool CONSTANT_Package type, for + // class file version 53, when ACC_MODULE is not set in the access_flags. + ConstModule.write_and_load(Opcodes.V1_9, + Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT + Opcodes.ACC_SYNTHETIC, + "jdk.fooPkg", "FooPkg", PACKAGE_TEST, CFE_EXCEPTION); + + // Test that the JVM throws NCDFE for constant pool CONSTANT_Package type, + // for class file version 53, when ACC_MODULE is set in the access_flags. + ConstModule.write_and_load(Opcodes.V1_9, + Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT + Opcodes.ACC_SYNTHETIC + ACC_MODULE, + "jdk.fooModACC", "FooModACC", PACKAGE_TEST, NCDFE_EXCEPTION); + + // Test that the JVM throws CFE for constant pool CONSTANT_Package type, for + // class file version 52, even when ACC_MODULE is set in the access_flags. + ConstModule.write_and_load(Opcodes.V1_8, + Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT + Opcodes.ACC_SYNTHETIC + ACC_MODULE, + "jdk.fooModACC52", "FooModACC52", PACKAGE_TEST, CFE_EXCEPTION); + + } + + public static void write_and_load(int version, + int access_flags, + String attr, + String class_name, + boolean module_test, + boolean throwCFE) throws Exception { + ClassWriter cw = new ClassWriter(0); + cw.visit(version, + access_flags, + class_name, + null, + "java/lang/Object", + null); + + if (module_test) + cw.visitAttribute(new TestModuleAttribute(attr)); + else + cw.visitAttribute(new TestPackageAttribute(attr)); + + cw.visitEnd(); + byte[] bytes = cw.toByteArray(); + + + ClassLoader loader = new ClassLoader(ConstModule.class.getClassLoader()) { + @Override + protected Class findClass(String cn)throws ClassNotFoundException { + if (cn.equals(class_name)) { + try { + Class superClass = super.defineClass(cn, bytes, 0, bytes.length); + throw new RuntimeException("Expected ClassFormatError not thrown"); + } catch (java.lang.ClassFormatError e) { + if (!throwCFE) { + throw new RuntimeException("Unexpected ClassFormatError exception: " + e.getMessage()); + } + if (module_test && !e.getMessage().contains( + "Unknown constant tag 19 in class file")) { + throw new RuntimeException("Wrong ClassFormatError exception: " + e.getMessage()); + } else if (!module_test && !e.getMessage().contains( + "Unknown constant tag 20 in class file")) { + throw new RuntimeException("Wrong ClassFormatError exception: " + e.getMessage()); + } + } catch (java.lang.NoClassDefFoundError f) { + if (throwCFE) { + throw new RuntimeException("Unexpected NoClassDefFoundError exception: " + f.getMessage()); + } + if (!f.getMessage().contains( + "is not a class because access_flag ACC_MODULE is set")) { + throw new RuntimeException("Wrong NoClassDefFoundError exception: " + f.getMessage()); + } + } + } else { + throw new ClassNotFoundException(cn); + } + return null; + } + }; + + Class clazz = loader.loadClass(class_name); + } + + /** + * ConstModuleAttr attribute. + * + *
     {@code
    +     *
    +     * MainClass_attribute {
    +     *   // index to CONSTANT_utf8_info structure in constant pool representing
    +     *   // the string "ConstModuleAttr"
    +     *   u2 attribute_name_index;
    +     *   u4 attribute_length;
    +     *
    +     *   // index to CONSTANT_Module_info structure
    +     *   u2 module_name_index
    +     * }
    +     *
    +     * } 
    + */ + public static class TestModuleAttribute extends Attribute { + private final String moduleName; + + public TestModuleAttribute(String moduleName) { + super("ConstModuleAttr"); + this.moduleName = moduleName; + } + + public TestModuleAttribute() { + this(null); + } + + @Override + protected Attribute read(ClassReader cr, + int off, + int len, + char[] buf, + int codeOff, + Label[] labels) + { + String mn = cr.readModule(off, buf); + off += 2; + return new TestModuleAttribute(mn); + } + + @Override + protected ByteVector write(ClassWriter cw, + byte[] code, + int len, + int maxStack, + int maxLocals) + { + ByteVector attr = new ByteVector(); + attr.putShort(cw.newModule(moduleName)); + return attr; + } + } + + /** + * ConstPackageAttr attribute. + * + *
     {@code
    +     *
    +     * MainClass_attribute {
    +     *   // index to CONSTANT_utf8_info structure in constant pool representing
    +     *   // the string "ConstPackageAttr"
    +     *   u2 attribute_name_index;
    +     *   u4 attribute_length;
    +     *
    +     *   // index to CONSTANT_Package_info structure
    +     *   u2 module_name_index
    +     * }
    +     *
    +     * } 
    + */ + public static class TestPackageAttribute extends Attribute { + private final String packageName; + + public TestPackageAttribute(String packageName) { + super("ConstPackageAttr"); + this.packageName = packageName; + } + + public TestPackageAttribute() { + this(null); + } + + @Override + protected Attribute read(ClassReader cr, + int off, + int len, + char[] buf, + int codeOff, + Label[] labels) + { + String mn = cr.readPackage(off, buf); + off += 2; + return new TestPackageAttribute(mn); + } + + @Override + protected ByteVector write(ClassWriter cw, + byte[] code, + int len, + int maxStack, + int maxLocals) + { + ByteVector attr = new ByteVector(); + attr.putShort(cw.newPackage(packageName)); + return attr; + } + } +} diff --git a/hotspot/test/runtime/defineAnonClass/NestedUnsafe.java b/hotspot/test/runtime/defineAnonClass/NestedUnsafe.java index f4a80a61a59..247a42c4291 100644 --- a/hotspot/test/runtime/defineAnonClass/NestedUnsafe.java +++ b/hotspot/test/runtime/defineAnonClass/NestedUnsafe.java @@ -34,11 +34,10 @@ package p; -import java.security.ProtectionDomain; -import java.io.InputStream; import java.lang.*; -import jdk.test.lib.*; + import jdk.internal.misc.Unsafe; +import jdk.test.lib.compiler.InMemoryJavaCompiler; // Test that an anonymous class in package 'p' cannot define its own anonymous class diff --git a/hotspot/test/runtime/defineAnonClass/NestedUnsafe2.java b/hotspot/test/runtime/defineAnonClass/NestedUnsafe2.java index 0d773a56feb..459b9f704b4 100644 --- a/hotspot/test/runtime/defineAnonClass/NestedUnsafe2.java +++ b/hotspot/test/runtime/defineAnonClass/NestedUnsafe2.java @@ -34,11 +34,10 @@ package p; -import java.security.ProtectionDomain; -import java.io.InputStream; import java.lang.*; -import jdk.test.lib.*; + import jdk.internal.misc.Unsafe; +import jdk.test.lib.compiler.InMemoryJavaCompiler; // Test that an anonymous class that gets put in its host's package cannot define diff --git a/hotspot/test/runtime/duplAttributes/DupSignatureAttrs.jcod b/hotspot/test/runtime/duplAttributes/DupSignatureAttrs.jcod new file mode 100644 index 00000000000..b43db02f5b5 --- /dev/null +++ b/hotspot/test/runtime/duplAttributes/DupSignatureAttrs.jcod @@ -0,0 +1,615 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// Class containing duplicate Signature attributes. Loading it should cause a +// ClassFormatError exception. +class DupClassSigAttrs { + 0xCAFEBABE; + 0; // minor version + 53; // version + [33] { // Constant Pool + ; // first element is empty + Method #6 #17; // #1 at 0x0A + Field #18 #19; // #2 at 0x0F + String #20; // #3 at 0x14 + Method #21 #22; // #4 at 0x17 + class #23; // #5 at 0x1C + class #24; // #6 at 0x1F + Utf8 ""; // #7 at 0x22 + Utf8 "()V"; // #8 at 0x2B + Utf8 "Code"; // #9 at 0x31 + Utf8 "LineNumberTable"; // #10 at 0x38 + Utf8 "main"; // #11 at 0x4A + Utf8 "([Ljava/lang/String;)V"; // #12 at 0x51 + Utf8 "Exceptions"; // #13 at 0x6A + class #25; // #14 at 0x77 + Utf8 "SourceFile"; // #15 at 0x7A + Utf8 "DupClassSigAttrs.java"; // #16 at 0x87 + NameAndType #7 #8; // #17 at 0x9F + class #26; // #18 at 0xA4 + NameAndType #27 #28; // #19 at 0xA7 + Utf8 "hi"; // #20 at 0xAC + class #29; // #21 at 0xB1 + NameAndType #30 #31; // #22 at 0xB4 + Utf8 "DupClassSigAttrs"; // #23 at 0xB9 + Utf8 "java/lang/Object"; // #24 at 0xCC + Utf8 "java/lang/Throwable"; // #25 at 0xDF + Utf8 "java/lang/System"; // #26 at 0xF5 + Utf8 "out"; // #27 at 0x0108 + Utf8 "Ljava/io/PrintStream;"; // #28 at 0x010E + Utf8 "java/io/PrintStream"; // #29 at 0x0126 + Utf8 "println"; // #30 at 0x013C + Utf8 "(Ljava/lang/String;)V"; // #31 at 0x0146 + Utf8 "Signature"; // #32 at 0x015E + } // Constant Pool + + 0x0021; // access + #5;// this_cpx + #6;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [0] { // fields + } // fields + + [2] { // methods + { // Member at 0x0176 + 0x0001; // access + #7; // name_cpx + #8; // sig_cpx + [1] { // Attributes + Attr(#9, 29) { // Code at 0x017E + 1; // max_stack + 1; // max_locals + Bytes[5]{ + 0x2AB70001B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#10, 6) { // LineNumberTable at 0x0195 + [1] { // LineNumberTable + 0 1; // at 0x01A1 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x01A1 + 0x0009; // access + #11; // name_cpx + #12; // sig_cpx + [2] { // Attributes + Attr(#9, 37) { // Code at 0x01A9 + 2; // max_stack + 1; // max_locals + Bytes[9]{ + 0xB200021203B60004; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#10, 10) { // LineNumberTable at 0x01C4 + [2] { // LineNumberTable + 0 4; // at 0x01D0 + 8 5; // at 0x01D4 + } + } // end LineNumberTable + } // Attributes + } // end Code + ; + Attr(#13, 4) { // Exceptions at 0x01D4 + [1] { // Exceptions + #14; // at 0x01DE + } + } // end Exceptions + } // Attributes + } // Member + } // methods + + [3] { // Attributes + Attr(#15, 2) { // SourceFile at 0x01E0 + #16; + } // end SourceFile + ; + Attr(#32, 2) { // Signature at 0x01E8 + #16; + } // end Signature + ; + Attr(#32, 2) { // *** Duplicate *** Signature at 0x01F0 + #16; + } // end Signature + } // Attributes +} // end class DupClassSigAttrs + + +// Class containing a method with duplicate Signature attributes. Loading it +// should cause a ClassFormatError exception. +class DupMthSigAttrs { + 0xCAFEBABE; + 0; // minor version + 53; // version + [33] { // Constant Pool + ; // first element is empty + Method #6 #17; // #1 at 0x0A + Field #18 #19; // #2 at 0x0F + String #20; // #3 at 0x14 + Method #21 #22; // #4 at 0x17 + class #23; // #5 at 0x1C + class #24; // #6 at 0x1F + Utf8 ""; // #7 at 0x22 + Utf8 "()V"; // #8 at 0x2B + Utf8 "Code"; // #9 at 0x31 + Utf8 "LineNumberTable"; // #10 at 0x38 + Utf8 "main"; // #11 at 0x4A + Utf8 "([Ljava/lang/String;)V"; // #12 at 0x51 + Utf8 "Exceptions"; // #13 at 0x6A + class #25; // #14 at 0x77 + Utf8 "SourceFile"; // #15 at 0x7A + Utf8 "DupMthSigAttrs.java"; // #16 at 0x87 + NameAndType #7 #8; // #17 at 0x9D + class #26; // #18 at 0xA2 + NameAndType #27 #28; // #19 at 0xA5 + Utf8 "hi"; // #20 at 0xAA + class #29; // #21 at 0xAF + NameAndType #30 #31; // #22 at 0xB2 + Utf8 "DupMthSigAttrs"; // #23 at 0xB7 + Utf8 "java/lang/Object"; // #24 at 0xC8 + Utf8 "java/lang/Throwable"; // #25 at 0xDB + Utf8 "java/lang/System"; // #26 at 0xF1 + Utf8 "out"; // #27 at 0x0104 + Utf8 "Ljava/io/PrintStream;"; // #28 at 0x010A + Utf8 "java/io/PrintStream"; // #29 at 0x0122 + Utf8 "println"; // #30 at 0x0138 + Utf8 "(Ljava/lang/String;)V"; // #31 at 0x0142 + Utf8 "Signature"; // #32 at 0x015A + } // Constant Pool + + 0x0021; // access + #5;// this_cpx + #6;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [0] { // fields + } // fields + + [2] { // methods + { // Member at 0x0172 + 0x0001; // access + #7; // name_cpx + #8; // sig_cpx + [1] { // Attributes + Attr(#9, 29) { // Code at 0x017A + 1; // max_stack + 1; // max_locals + Bytes[5]{ + 0x2AB70001B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#10, 6) { // LineNumberTable at 0x0191 + [1] { // LineNumberTable + 0 1; // at 0x019D + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x019D + 0x0009; // access + #11; // name_cpx + #12; // sig_cpx + [4] { // Attributes + Attr(#9, 37) { // Code at 0x01A5 + 2; // max_stack + 1; // max_locals + Bytes[9]{ + 0xB200021203B60004; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#10, 10) { // LineNumberTable at 0x01C0 + [2] { // LineNumberTable + 0 4; // at 0x01CC + 8 5; // at 0x01D0 + } + } // end LineNumberTable + } // Attributes + } // end Code + ; + Attr(#32, 2) { // Signature at 0x01D0 + #16; + } // end Signature + ; + Attr(#13, 4) { // Exceptions at 0x01D8 + [1] { // Exceptions + #14; // at 0x01E2 + } + } // end Exceptions + ; + Attr(#32, 2) { // *** Duplicate *** Signature at 0x01E2 + #16; + } // end Signature + } // Attributes + } // Member + } // methods + + [1] { // Attributes + Attr(#15, 2) { // SourceFile at 0x01EC + #16; + } // end SourceFile + } // Attributes +} // end class DupMthSigAttrs + + +// Class containing a field with duplicate Signature attributes. Loading it +// should cause a ClassFormatError exception. +class DupFldSigAttrs { + 0xCAFEBABE; + 0; // minor version + 53; // version + [42] { // Constant Pool + ; // first element is empty + Method #9 #23; // #1 at 0x0A + Field #24 #25; // #2 at 0x0F + Field #8 #26; // #3 at 0x14 + Method #27 #28; // #4 at 0x19 + class #29; // #5 at 0x1E + String #30; // #6 at 0x21 + Method #5 #31; // #7 at 0x24 + class #32; // #8 at 0x29 + class #33; // #9 at 0x2C + Utf8 "str"; // #10 at 0x2F + Utf8 "Ljava/lang/String;"; // #11 at 0x35 + Utf8 ""; // #12 at 0x4A + Utf8 "()V"; // #13 at 0x53 + Utf8 "Code"; // #14 at 0x59 + Utf8 "LineNumberTable"; // #15 at 0x60 + Utf8 "main"; // #16 at 0x72 + Utf8 "([Ljava/lang/String;)V"; // #17 at 0x79 + Utf8 "Exceptions"; // #18 at 0x92 + class #34; // #19 at 0x9F + Utf8 ""; // #20 at 0xA2 + Utf8 "SourceFile"; // #21 at 0xAD + Utf8 "DupFldSigAttrs.java"; // #22 at 0xBA + NameAndType #12 #13; // #23 at 0xD0 + class #35; // #24 at 0xD5 + NameAndType #36 #37; // #25 at 0xD8 + NameAndType #10 #11; // #26 at 0xDD + class #38; // #27 at 0xE2 + NameAndType #39 #40; // #28 at 0xE5 + Utf8 "java/lang/String"; // #29 at 0xEA + Utf8 "Hi"; // #30 at 0xFD + NameAndType #12 #40; // #31 at 0x0102 + Utf8 "DupFldSigAttrs"; // #32 at 0x0107 + Utf8 "java/lang/Object"; // #33 at 0x0118 + Utf8 "java/lang/Throwable"; // #34 at 0x012B + Utf8 "java/lang/System"; // #35 at 0x0141 + Utf8 "out"; // #36 at 0x0154 + Utf8 "Ljava/io/PrintStream;"; // #37 at 0x015A + Utf8 "java/io/PrintStream"; // #38 at 0x0172 + Utf8 "println"; // #39 at 0x0188 + Utf8 "(Ljava/lang/String;)V"; // #40 at 0x0192 + Utf8 "Signature"; // #41 at 0x01AA + } // Constant Pool + + 0x0021; // access + #8;// this_cpx + #9;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [1] { // fields + { // Member at 0x01C0 + 0x0008; // access + #10; // name_cpx + #11; // sig_cpx + [2] { // Attributes + Attr(#41, 2) { // Signature at 0x01C8 + #16; + } // end Signature + ; + Attr(#41, 2) { // *** Duplicate *** Signature at 0x01D0 + #16; + } // end Signature + } // Attributes + } // Member + } // fields + + [3] { // methods + { // Member at 0x01DA + 0x0001; // access + #12; // name_cpx + #13; // sig_cpx + [1] { // Attributes + Attr(#14, 29) { // Code at 0x01E2 + 1; // max_stack + 1; // max_locals + Bytes[5]{ + 0x2AB70001B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#15, 6) { // LineNumberTable at 0x01F9 + [1] { // LineNumberTable + 0 1; // at 0x0205 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0205 + 0x0009; // access + #16; // name_cpx + #17; // sig_cpx + [2] { // Attributes + Attr(#14, 38) { // Code at 0x020D + 2; // max_stack + 1; // max_locals + Bytes[10]{ + 0xB20002B20003B600; + 0x04B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#15, 10) { // LineNumberTable at 0x0229 + [2] { // LineNumberTable + 0 6; // at 0x0235 + 9 7; // at 0x0239 + } + } // end LineNumberTable + } // Attributes + } // end Code + ; + Attr(#18, 4) { // Exceptions at 0x0239 + [1] { // Exceptions + #19; // at 0x0243 + } + } // end Exceptions + } // Attributes + } // Member + ; + { // Member at 0x0243 + 0x0008; // access + #20; // name_cpx + #13; // sig_cpx + [1] { // Attributes + Attr(#14, 37) { // Code at 0x024B + 3; // max_stack + 0; // max_locals + Bytes[13]{ + 0xBB0005591206B700; + 0x07B30003B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#15, 6) { // LineNumberTable at 0x026A + [1] { // LineNumberTable + 0 3; // at 0x0276 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [1] { // Attributes + Attr(#21, 2) { // SourceFile at 0x0278 + #22; + } // end SourceFile + } // Attributes +} // end class DupFldSigAttrs + + +// Class containing a Signature attribute and a field and methods with Signature +// attributes. Since neither the class nor any of its fields or methods have +// duplicate Signature attributes, loading this class should not cause a +// ClassFormatError exception. +class OkaySigAttrs { + 0xCAFEBABE; + 0; // minor version + 53; // version + [42] { // Constant Pool + ; // first element is empty + Method #9 #23; // #1 at 0x0A + Field #24 #25; // #2 at 0x0F + Field #8 #26; // #3 at 0x14 + Method #27 #28; // #4 at 0x19 + class #29; // #5 at 0x1E + String #30; // #6 at 0x21 + Method #5 #31; // #7 at 0x24 + class #32; // #8 at 0x29 + class #33; // #9 at 0x2C + Utf8 "str"; // #10 at 0x2F + Utf8 "Ljava/lang/String;"; // #11 at 0x35 + Utf8 ""; // #12 at 0x4A + Utf8 "()V"; // #13 at 0x53 + Utf8 "Code"; // #14 at 0x59 + Utf8 "LineNumberTable"; // #15 at 0x60 + Utf8 "main"; // #16 at 0x72 + Utf8 "([Ljava/lang/String;)V"; // #17 at 0x79 + Utf8 "Exceptions"; // #18 at 0x92 + class #34; // #19 at 0x9F + Utf8 ""; // #20 at 0xA2 + Utf8 "SourceFile"; // #21 at 0xAD + Utf8 "OkaySigAttrs.java"; // #22 at 0xBA + NameAndType #12 #13; // #23 at 0xCE + class #35; // #24 at 0xD3 + NameAndType #36 #37; // #25 at 0xD6 + NameAndType #10 #11; // #26 at 0xDB + class #38; // #27 at 0xE0 + NameAndType #39 #40; // #28 at 0xE3 + Utf8 "java/lang/String"; // #29 at 0xE8 + Utf8 "Hi"; // #30 at 0xFB + NameAndType #12 #40; // #31 at 0x0100 + Utf8 "OkaySigAttrs"; // #32 at 0x0105 + Utf8 "java/lang/Object"; // #33 at 0x0114 + Utf8 "java/lang/Throwable"; // #34 at 0x0127 + Utf8 "java/lang/System"; // #35 at 0x013D + Utf8 "out"; // #36 at 0x0150 + Utf8 "Ljava/io/PrintStream;"; // #37 at 0x0156 + Utf8 "java/io/PrintStream"; // #38 at 0x016E + Utf8 "println"; // #39 at 0x0184 + Utf8 "(Ljava/lang/String;)V"; // #40 at 0x018E + Utf8 "Signature"; // #41 at 0x01A6 + } // Constant Pool + + 0x0021; // access + #8;// this_cpx + #9;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [1] { // fields + { // Member at 0x01BC + 0x0008; // access + #10; // name_cpx + #11; // sig_cpx + [1] { // Attributes + Attr(#41, 2) { // Signature at 0x01C4 + #16; + } // end Signature + } // Attributes + } // Member + } // fields + + [3] { // methods + { // Member at 0x01CE + 0x0001; // access + #12; // name_cpx + #13; // sig_cpx + [2] { // Attributes + Attr(#14, 29) { // Code at 0x01D6 + 1; // max_stack + 1; // max_locals + Bytes[5]{ + 0x2AB70001B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#15, 6) { // LineNumberTable at 0x01ED + [1] { // LineNumberTable + 0 1; // at 0x01F9 + } + } // end LineNumberTable + } // Attributes + } // end Code + ; + Attr(#41, 2) { // Signature at 0x01F9 + #16; + } // end Signature + } // Attributes + } // Member + ; + { // Member at 0x0201 + 0x0009; // access + #16; // name_cpx + #17; // sig_cpx + [3] { // Attributes + Attr(#14, 38) { // Code at 0x0209 + 2; // max_stack + 1; // max_locals + Bytes[10]{ + 0xB20002B20003B600; + 0x04B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#15, 10) { // LineNumberTable at 0x0225 + [2] { // LineNumberTable + 0 6; // at 0x0231 + 9 7; // at 0x0235 + } + } // end LineNumberTable + } // Attributes + } // end Code + ; + Attr(#41, 2) { // Signature at 0x0235 + #16; + } // end Signature + ; + Attr(#18, 4) { // Exceptions at 0x023D + [1] { // Exceptions + #19; // at 0x0247 + } + } // end Exceptions + } // Attributes + } // Member + ; + { // Member at 0x0247 + 0x0008; // access + #20; // name_cpx + #13; // sig_cpx + [1] { // Attributes + Attr(#14, 37) { // Code at 0x024F + 3; // max_stack + 0; // max_locals + Bytes[13]{ + 0xBB0005591206B700; + 0x07B30003B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#15, 6) { // LineNumberTable at 0x026E + [1] { // LineNumberTable + 0 3; // at 0x027A + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [2] { // Attributes + Attr(#21, 2) { // SourceFile at 0x027C + #22; + } // end SourceFile + ; + Attr(#41, 2) { // Signature at 0x0284 + #16; + } // end Signature + } // Attributes +} // end class OkaySigAttrs diff --git a/hotspot/test/runtime/duplAttributes/TestDupSignatureAttr.java b/hotspot/test/runtime/duplAttributes/TestDupSignatureAttr.java new file mode 100644 index 00000000000..856d0617d59 --- /dev/null +++ b/hotspot/test/runtime/duplAttributes/TestDupSignatureAttr.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8176147 + * @summary Throw ClassFormatError exception for multiple Signature attributes + * @compile DupSignatureAttrs.jcod + * @run main TestDupSignatureAttr + */ + +public class TestDupSignatureAttr { + public static void main(String args[]) throws Throwable { + + System.out.println("Regression test for bug 8176147"); + + String[] badClasses = new String[] { + "DupClassSigAttrs", + "DupMthSigAttrs", + "DupFldSigAttrs", + }; + String[] messages = new String[] { + "Multiple Signature attributes in class file", + "Multiple Signature attributes for method", + "Multiple Signature attributes for field", + }; + + for (int x = 0; x < badClasses.length; x++) { + try { + Class newClass = Class.forName(badClasses[x]); + throw new RuntimeException("Expected ClassFormatError exception not thrown"); + } catch (java.lang.ClassFormatError e) { + if (!e.getMessage().contains(messages[x])) { + throw new RuntimeException("Wrong ClassFormatError exception thrown: " + + e.getMessage()); + } + } + } + + // Multiple Signature attributes but no duplicates. + Class newClass = Class.forName("OkaySigAttrs"); + } +} diff --git a/hotspot/test/runtime/getSysPackage/GetSysPkgTest.java b/hotspot/test/runtime/getSysPackage/GetSysPkgTest.java index d3f3ca700d6..75360e2e394 100644 --- a/hotspot/test/runtime/getSysPackage/GetSysPkgTest.java +++ b/hotspot/test/runtime/getSysPackage/GetSysPkgTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -33,7 +33,7 @@ import java.io.File; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; @@ -55,7 +55,7 @@ public class GetSysPkgTest { return m; } } - throw new RuntimeException("Failed to find method " + name + " in java.lang.reflect.Module"); + throw new RuntimeException("Failed to find method " + name + " in java.lang.Module"); } // Throw RuntimeException if getSystemPackageLocation() does not return diff --git a/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java b/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java new file mode 100644 index 00000000000..3aaec5e4fd5 --- /dev/null +++ b/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8166188 + * @summary Test call of native function with JNI weak global ref. + * @modules java.base + * @run main/othervm/native CallWithJNIWeak + */ + +public class CallWithJNIWeak { + static { + System.loadLibrary("CallWithJNIWeak"); + } + + private static native void testJNIFieldAccessors(CallWithJNIWeak o); + + // The field initializations must be kept in sync with the JNI code + // which reads verifies the values of these fields. + private int i = 1; + private long j = 2; + private boolean z = true; + private char c = 'a'; + private short s = 3; + private float f = 1.0f; + private double d = 2.0; + private Object l; + + private CallWithJNIWeak() { + this.l = this; + } + + private native void weakReceiverTest0(); + private void weakReceiverTest() { + weakReceiverTest0(); + } + + private synchronized void synchonizedWeakReceiverTest() { + this.notifyAll(); + } + + + private static native void runTests(CallWithJNIWeak o); + + public static void main(String[] args) { + CallWithJNIWeak w = new CallWithJNIWeak(); + for (int i = 0; i < 20000; i++) { + runTests(w); + } + } +} diff --git a/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c b/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c new file mode 100644 index 00000000000..83a5784c1e8 --- /dev/null +++ b/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include + +/* + * Class: CallWithJNIWeak + * Method: testJNIFieldAccessors + * Signature: (LCallWithJNIWeak;)V + */ +JNIEXPORT void JNICALL +Java_CallWithJNIWeak_testJNIFieldAccessors(JNIEnv *env, jclass clazz, jobject this) { + // Make sure that we have a weak reference to the receiver + + jweak self = (*env)->NewWeakGlobalRef(env, this); + + jclass this_class = (*env)->GetObjectClass(env, self); + + jclass exception = (*env)->FindClass(env, "java/lang/RuntimeException"); + + jfieldID id_i = (*env)->GetFieldID(env, this_class, "i", "I"); + jfieldID id_j = (*env)->GetFieldID(env, this_class, "j", "J"); + jfieldID id_z = (*env)->GetFieldID(env, this_class, "z", "Z"); + jfieldID id_c = (*env)->GetFieldID(env, this_class, "c", "C"); + jfieldID id_s = (*env)->GetFieldID(env, this_class, "s", "S"); + jfieldID id_f = (*env)->GetFieldID(env, this_class, "f", "F"); + jfieldID id_d = (*env)->GetFieldID(env, this_class, "d", "D"); + jfieldID id_l = (*env)->GetFieldID(env, this_class, "l", "Ljava/lang/Object;"); + jvalue v; + +#define CHECK(variable, expected) \ + do { \ + if ((variable) != (expected)) { \ + (*env)->ThrowNew(env, exception, #variable" != " #expected); \ + return; \ + } \ + } while(0) + + // The values checked below must be kept in sync with the Java source file. + + v.i = (*env)->GetIntField(env, self, id_i); + CHECK(v.i, 1); + + v.j = (*env)->GetLongField(env, self, id_j); + CHECK(v.j, 2); + + v.z = (*env)->GetBooleanField(env, self, id_z); + CHECK(v.z, JNI_TRUE); + + v.c = (*env)->GetCharField(env, self, id_c); + CHECK(v.c, 'a'); + + v.s = (*env)->GetShortField(env, self, id_s); + CHECK(v.s, 3); + + v.f = (*env)->GetFloatField(env, self, id_f); + CHECK(v.f, 1.0f); + + v.d = (*env)->GetDoubleField(env, self, id_d); + CHECK(v.d, 2.0); + +#undef CHECK + + v.l = (*env)->GetObjectField(env, self, id_l); + if (v.l == NULL) { + (*env)->ThrowNew(env, exception, "Object field was null"); + return; + } + { + jclass clz = (*env)->GetObjectClass(env, v.l); + if (!(*env)->IsSameObject(env, clazz, clz)) { + (*env)->ThrowNew(env, exception, "Bad object class"); + } + } + + (*env)->DeleteWeakGlobalRef(env, self); +} + +/* + * Class: CallWithJNIWeak + * Method: runTests + * Signature: (LCallWithJNIWeak;)V + */ +JNIEXPORT void JNICALL +Java_CallWithJNIWeak_runTests(JNIEnv *env, jclass clazz, jobject this) { + jweak that = (*env)->NewWeakGlobalRef(env, this); + { + jmethodID method = (*env)->GetStaticMethodID(env, + clazz, "testJNIFieldAccessors", "(LCallWithJNIWeak;)V"); + (*env)->CallStaticVoidMethod(env, clazz, method, that); + if ((*env)->ExceptionCheck(env)) { + return; + } + } + + { + jmethodID method = (*env)->GetMethodID(env, clazz, "weakReceiverTest", "()V"); + (*env)->CallVoidMethod(env, that, method); + if ((*env)->ExceptionCheck(env)) { + return; + } + } + + { + jmethodID method = (*env)->GetMethodID(env, clazz, "synchonizedWeakReceiverTest", "()V"); + (*env)->CallVoidMethod(env, that, method); + if ((*env)->ExceptionCheck(env)) { + return; + } + } + (*env)->DeleteWeakGlobalRef(env, that); +} + +/* + * Class: CallWithJNIWeak + * Method: weakReceiverTest0 + * Signature: ()V + */ +JNIEXPORT void JNICALL +Java_CallWithJNIWeak_weakReceiverTest0(JNIEnv *env, jobject obj) { + (*env)->GetObjectClass(env, obj); +} diff --git a/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java b/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java new file mode 100644 index 00000000000..6d581000fb8 --- /dev/null +++ b/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 8166188 + * @requires vm.opt.ExplicitGCInvokesConcurrent != true + * @summary Test return of JNI weak global refs from native calls. + * @modules java.base + * @run main/othervm/native -Xint ReturnJNIWeak + * @run main/othervm/native -Xcomp ReturnJNIWeak + */ + +public final class ReturnJNIWeak { + + static { + System.loadLibrary("ReturnJNIWeak"); + } + + private static final class TestObject { + public final int value; + + public TestObject(int value) { + this.value = value; + } + } + + private static volatile TestObject testObject = null; + + private static native void registerObject(Object o); + private static native void unregisterObject(); + private static native Object getObject(); + + // Create the test object and record it both strongly and weakly. + private static void remember(int value) { + TestObject o = new TestObject(value); + registerObject(o); + testObject = o; + } + + // Remove both strong and weak references to the current test object. + private static void forget() { + unregisterObject(); + testObject = null; + } + + // Verify the weakly recorded object + private static void checkValue(int value) throws Exception { + Object o = getObject(); + if (o == null) { + throw new RuntimeException("Weak reference unexpectedly null"); + } + TestObject t = (TestObject)o; + if (t.value != value) { + throw new RuntimeException("Incorrect value"); + } + } + + // Verify we can create a weak reference and get it back. + private static void testSanity() throws Exception { + System.out.println("running testSanity"); + int value = 5; + try { + remember(value); + checkValue(value); + } finally { + forget(); + } + } + + // Verify weak ref value survives across collection if strong ref exists. + private static void testSurvival() throws Exception { + System.out.println("running testSurvival"); + int value = 10; + try { + remember(value); + checkValue(value); + System.gc(); + // Verify weak ref still has expected value. + checkValue(value); + } finally { + forget(); + } + } + + // Verify weak ref cleared if no strong ref exists. + private static void testClear() throws Exception { + System.out.println("running testClear"); + int value = 15; + try { + remember(value); + checkValue(value); + // Verify still good. + checkValue(value); + // Drop reference. + testObject = null; + System.gc(); + // Verify weak ref cleared as expected. + Object recorded = getObject(); + if (recorded != null) { + throw new RuntimeException("expected clear"); + } + } finally { + forget(); + } + } + + public static void main(String[] args) throws Exception { + testSanity(); + testSurvival(); + testClear(); + } +} diff --git a/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c b/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c new file mode 100644 index 00000000000..12d7ae92e6e --- /dev/null +++ b/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Native support for ReturnJNIWeak test. + */ + +#include "jni.h" + +static jweak registered = NULL; + +JNIEXPORT void JNICALL +Java_ReturnJNIWeak_registerObject(JNIEnv* env, + jclass jclazz, + jobject value) { + // assert registered == NULL + registered = (*env)->NewWeakGlobalRef(env, value); +} + +JNIEXPORT void JNICALL +Java_ReturnJNIWeak_unregisterObject(JNIEnv* env, jclass jclazz) { + if (registered != NULL) { + (*env)->DeleteWeakGlobalRef(env, registered); + registered = NULL; + } +} + +JNIEXPORT jobject JNICALL +Java_ReturnJNIWeak_getObject(JNIEnv* env, jclass jclazz) { + // assert registered != NULL + return registered; +} diff --git a/hotspot/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java b/hotspot/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java index 9d744f22f40..1c3220333d4 100644 --- a/hotspot/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java +++ b/hotspot/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -67,7 +67,7 @@ public class Testlibadimalloc { // Start the process, get the pid and then wait for the test to finish Process process = builder.start(); - long pid = process.getPid(); + long pid = process.pid(); int retval = process.waitFor(); // make sure the SEGVOverflow test crashed diff --git a/hotspot/test/runtime/logging/ModulesTest.java b/hotspot/test/runtime/logging/ModulesTest.java index 58b94cc3579..0a469d30fec 100644 --- a/hotspot/test/runtime/logging/ModulesTest.java +++ b/hotspot/test/runtime/logging/ModulesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @summary modules=debug should have logging from statements in the code + * @summary -Xlog:module should emit logging output * @library /test/lib * @modules java.base/jdk.internal.misc * java.management @@ -35,9 +35,16 @@ import jdk.test.lib.process.ProcessTools; public class ModulesTest { public static void main(String[] args) throws Exception { - ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "-Xlog:modules=trace", "-version"); - OutputAnalyzer output = new OutputAnalyzer(pb.start()); + testModuleTrace("-Xlog:module=trace", "-version"); + testModuleLoad("-Xlog:module+load", "-version"); + testModuleUnload("-Xlog:module+unload", "-version"); + + // same as -Xlog:module+load -Xlog:module+unload + testModuleLoad("-verbose:module", "-version"); + } + + static void testModuleTrace(String... args) throws Exception { + OutputAnalyzer output = run(args); output.shouldContain("define_javabase_module(): Definition of module:"); output.shouldContain("define_javabase_module(): creation of package"); output.shouldContain("define_module(): creation of module"); @@ -48,5 +55,22 @@ public class ModulesTest { output.shouldContain("Setting package: class:"); output.shouldHaveExitValue(0); } + + static void testModuleLoad(String... args) throws Exception { + OutputAnalyzer output = run(args); + output.shouldContain("java.base location:"); + output.shouldContain("java.management location:"); + output.shouldHaveExitValue(0); + } + + static void testModuleUnload(String... args) throws Exception { + OutputAnalyzer output = run(args); + output.shouldHaveExitValue(0); + } + + static OutputAnalyzer run(String... args) throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args); + return new OutputAnalyzer(pb.start()); + } } diff --git a/hotspot/test/runtime/logging/StartupTimeTest.java b/hotspot/test/runtime/logging/StartupTimeTest.java index 4448caeac07..4069b02401e 100644 --- a/hotspot/test/runtime/logging/StartupTimeTest.java +++ b/hotspot/test/runtime/logging/StartupTimeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -57,7 +57,7 @@ public class StartupTimeTest { static void analyzeModulesOutputOff(ProcessBuilder pb) throws Exception { OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldNotContain("[modules,startuptime]"); + output.shouldNotContain("[module,startuptime]"); output.shouldHaveExitValue(0); } @@ -70,11 +70,11 @@ public class StartupTimeTest { InnerClass.class.getName()); analyzeOutputOff(pb); - pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime+modules", + pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime+module", InnerClass.class.getName()); analyzeModulesOutputOn(pb); - pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime+modules=off", + pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime+module=off", InnerClass.class.getName()); analyzeModulesOutputOff(pb); } diff --git a/hotspot/test/runtime/logging/ThreadLoggingTest.java b/hotspot/test/runtime/logging/ThreadLoggingTest.java index 1f06e0594d9..80b8cc6e3d8 100644 --- a/hotspot/test/runtime/logging/ThreadLoggingTest.java +++ b/hotspot/test/runtime/logging/ThreadLoggingTest.java @@ -9,7 +9,7 @@ * * 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 + * 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). * diff --git a/hotspot/test/runtime/logging/p2/B.jcod b/hotspot/test/runtime/logging/p2/B.jcod index 724c180aa16..b30d1e32876 100644 --- a/hotspot/test/runtime/logging/p2/B.jcod +++ b/hotspot/test/runtime/logging/p2/B.jcod @@ -8,7 +8,7 @@ * * 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 + * 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). * diff --git a/hotspot/test/runtime/modules/AccModuleTest.java b/hotspot/test/runtime/modules/AccModuleTest.java index 8deac7f327e..84e2de3552f 100644 --- a/hotspot/test/runtime/modules/AccModuleTest.java +++ b/hotspot/test/runtime/modules/AccModuleTest.java @@ -28,8 +28,6 @@ * @run main AccModuleTest */ -import java.io.File; - public class AccModuleTest { public static void main(String args[]) throws Throwable { diff --git a/hotspot/test/runtime/modules/AccessCheck/AccessExportTwice.java b/hotspot/test/runtime/modules/AccessCheck/AccessExportTwice.java index a1eb2cce85d..465c709fd86 100644 --- a/hotspot/test/runtime/modules/AccessCheck/AccessExportTwice.java +++ b/hotspot/test/runtime/modules/AccessCheck/AccessExportTwice.java @@ -39,8 +39,6 @@ import static jdk.test.lib.Asserts.*; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -58,7 +56,7 @@ import myloaders.MySameClassLoader; public class AccessExportTwice { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publicly defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { @@ -68,7 +66,7 @@ public class AccessExportTwice { // Packages: none // Packages exported: none ModuleDescriptor descriptor_first_mod = - ModuleDescriptor.module("first_mod") + ModuleDescriptor.newModule("first_mod") .requires("java.base") .requires("second_mod") .build(); @@ -78,7 +76,7 @@ public class AccessExportTwice { // Packages: p2 // Packages exported: p2 is exported to first_mod ModuleDescriptor descriptor_second_mod = - ModuleDescriptor.module("second_mod") + ModuleDescriptor.newModule("second_mod") .requires("java.base") .exports("p2", Set.of("first_mod")) .build(); @@ -87,17 +85,17 @@ public class AccessExportTwice { ModuleFinder finder = ModuleLibrary.of(descriptor_first_mod, descriptor_second_mod); // Resolves "first_mod" - Configuration cf = Layer.boot() + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("first_mod")); + .resolve(finder, ModuleFinder.of(), Set.of("first_mod")); // Map each module to the same class loader Map map = new HashMap<>(); map.put("first_mod", MySameClassLoader.loader1); map.put("second_mod", MySameClassLoader.loader1); - // Create Layer that contains first_mod & second_mod - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains first_mod & second_mod + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); assertTrue(layer.findLoader("first_mod") == MySameClassLoader.loader1); assertTrue(layer.findLoader("second_mod") == MySameClassLoader.loader1); diff --git a/hotspot/test/runtime/modules/AccessCheck/AccessReadTwice.java b/hotspot/test/runtime/modules/AccessCheck/AccessReadTwice.java index 5d1a690a740..74752d3d136 100644 --- a/hotspot/test/runtime/modules/AccessCheck/AccessReadTwice.java +++ b/hotspot/test/runtime/modules/AccessCheck/AccessReadTwice.java @@ -39,8 +39,6 @@ import static jdk.test.lib.Asserts.*; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -56,7 +54,7 @@ import java.util.Set; public class AccessReadTwice { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publicly defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { @@ -66,9 +64,9 @@ public class AccessReadTwice { // Packages: p1, p4 // Packages exported: none ModuleDescriptor descriptor_first_mod = - ModuleDescriptor.module("first_mod") + ModuleDescriptor.newModule("first_mod") .requires("java.base") - .contains(Set.of("p1", "p4")) + .packages(Set.of("p1", "p4")) .build(); // Define module: second_mod @@ -76,7 +74,7 @@ public class AccessReadTwice { // Packages: p2 // Packages exported: p2 is exported to first_mod ModuleDescriptor descriptor_second_mod = - ModuleDescriptor.module("second_mod") + ModuleDescriptor.newModule("second_mod") .requires("java.base") .exports("p2", Set.of("first_mod")) .build(); @@ -85,9 +83,9 @@ public class AccessReadTwice { ModuleFinder finder = ModuleLibrary.of(descriptor_first_mod, descriptor_second_mod); // Resolves "first_mod" and "second_mod" - Configuration cf = Layer.boot() + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("first_mod", "second_mod")); + .resolve(finder, ModuleFinder.of(), Set.of("first_mod", "second_mod")); // Map each module to this class loader Map map = new HashMap<>(); @@ -95,8 +93,8 @@ public class AccessReadTwice { map.put("first_mod", loader); map.put("second_mod", loader); - // Create Layer that contains first_mod & second_mod - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains first_mod & second_mod + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); assertTrue(layer.findLoader("first_mod") == loader); assertTrue(layer.findLoader("second_mod") == loader); diff --git a/hotspot/test/runtime/modules/AccessCheck/CheckRead.java b/hotspot/test/runtime/modules/AccessCheck/CheckRead.java index 6143f0b94b0..bc8aaeed8bd 100644 --- a/hotspot/test/runtime/modules/AccessCheck/CheckRead.java +++ b/hotspot/test/runtime/modules/AccessCheck/CheckRead.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can not read module m2, then class p1.c1 - * in module m1 can not access p2.c2 in module m2. + * @summary Test that if module m1x can not read module m2x, then class p1.c1 + * in module m1x can not access p2.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,82 +46,82 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// defines m2 --> packages p2 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> packages p1 +// defines m2x --> packages p2 +// defines m3x --> packages p3 // -// m1 can not read m2 -// package p2 in m2 is exported to m1 +// m1x can not read m2x +// package p2 in m2x is exported to m1x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2. -// Access denied since m1 can not read m2. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x. +// Access denied since m1x can not read m2x. // public class CheckRead { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publicly defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m3 + // Define module: m1x + // Can read: java.base, m3x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m3") + .requires("m3x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: p2 is exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); - // Define module: m3 - // Can read: java.base, m2 + // Define module: m3x + // Can read: java.base, m2x // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") - .requires("m2") - .contains("p3") + .requires("m2x") + .packages(Set.of("p3")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); - map.put("m3", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); + map.put("m3x", MySameClassLoader.loader1); - // Create Layer that contains m1, m2 and m3 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x, m2x and m3x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m3") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m3x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m1 but m2 is not readable from m1)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m1x but m2x is not readable from m1x)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("cannot access")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java index b0b64a46d95..732c326ccc1 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can not read module m2, then class p1.c1 - * in module m1 can not access p2.c2 in module m2. + * @summary Test that if module m1x can not read module m2x, then class p1.c1 + * in module m1x can not access p2.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,82 +46,82 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 +// defines m3x --> packages p3 // -// m1 can not read m2 -// package p2 in m2 is exported to m1 +// m1x can not read m2x +// package p2 in m2x is exported to m1x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2. -// Access denied since m1 can not read m2. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x. +// Access denied since m1x can not read m2x. // public class DiffCL_CheckRead { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publicly defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m3 + // Define module: m1x + // Can read: java.base, m3x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m3") + .requires("m3x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: p2 is exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); - // Define module: m3 - // Can read: java.base, m2 + // Define module: m3x + // Can read: java.base, m2x // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") - .requires("m2") - .contains("p3") + .requires("m2x") + .packages(Set.of("p3")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); - map.put("m3", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); + map.put("m3x", MyDiffClassLoader.loader2); - // Create Layer that contains m1, m2 and m3 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x, m2x and m3x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); - assertTrue(layer.findLoader("m3") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m3x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m1 but m2 is not readable from m1)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m1x but m2x is not readable from m1x)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("cannot access")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java index b7088553bad..66062c4a2d9 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,9 +25,9 @@ /* * @test - * @summary Test that if module m1 can read module m2, but package p2 in m2 - * is exported specifically to module m3, then class p1.c1 in m1 can not - * access p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, but package p2 in m2x + * is exported specifically to module m3x, then class p1.c1 in m1x can not + * access p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -38,7 +38,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -48,83 +47,83 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 +// defines m3x --> packages p3 // -// m1 can read m2 -// package p2 in m2 is exported to m3 +// m1x can read m2x +// package p2 in m2x is exported to m3x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access denied since although m1 can read m2, p2 is exported only to m3. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access denied since although m1x can read m2x, p2 is exported only to m3x. // public class DiffCL_ExpQualOther { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2, m3 + // Define module: m1x + // Can read: java.base, m2x, m3x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") - .requires("m3") + .requires("m2x") + .requires("m3x") .exports("p1") .build(); - // Define module: m2 - // Can read: java.base, m3 + // Define module: m2x + // Can read: java.base, m3x // Packages: p2 - // Packages exported: p2 is exported to m3 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported to m3x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m3")) + .exports("p2", Set.of("m3x")) .build(); - // Define module: m3 - // Can read: java.base, m2 + // Define module: m3x + // Can read: java.base, m2x // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") - .requires("m2") - .contains("p3") + .requires("m2x") + .packages(Set.of("p3")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); - map.put("m3", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); + map.put("m3x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); - assertTrue(layer.findLoader("m3") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m3x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m3 not to m1)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m3x not to m1x)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java index 8ca888b312f..3088a972803 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in m2. - * Access allowed since m1 can read m2 and package p2 is exported to m1. + * @summary class p1.c1 defined in m1x tries to access p2.c2 defined in m2x. + * Access allowed since m1x can read m2x and package p2 is exported to m1x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,61 +46,61 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported to m1 +// m1x can read m2x +// package p2 in m2x is exported to m1x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access allowed since m1 can read m2 and package p2 is exported to m1. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access allowed since m1x can read m2x and package p2 is exported to m1x. // public class DiffCL_ExpQualToM1 { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported to unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: package p2 is exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: package p2 is exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -109,7 +108,7 @@ public class DiffCL_ExpQualToM1 { try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1"); + throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1x"); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java index e38d54166ed..6cb7ea9bdcb 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can read module m2, and package p2 in m2 is - * exported unqualifiedly, then class p1.c1 in m1 can read p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, and package p2 in m2x is + * exported unqualifiedly, then class p1.c1 in m1x can read p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,62 +46,62 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported to m1 +// m1x can read m2x +// package p2 in m2x is exported to m1x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access allowed since m1 can read m2 and package p2 is exported +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access allowed since m1x can read m2x and package p2 is exported // unqualifiedly. // public class DiffCL_ExpUnqual { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: package p2 is exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: package p2 is exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") .exports("p2") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -110,7 +109,7 @@ public class DiffCL_ExpUnqual { try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1"); + throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1x"); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java index 0cc88f7a69b..e235d895751 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can read module m2, but package p2 in m2 is not - * exported, then class p1.c1 in m1 can not read p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, but package p2 in m2x is not + * exported, then class p1.c1 in m1x can not read p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,68 +46,68 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is not exported +// m1x can read m2x +// package p2 in m2x is not exported // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x // Access denied since p2 is not exported. // public class DiffCL_PkgNotExp { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p2") + .packages(Set.of("p2")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java index 2a5c723c76f..fafd41af3fa 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,7 +25,7 @@ /* * @test - * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in unnamed module. + * @summary class p1.c1 defined in m1x tries to access p2.c2 defined in unnamed module. * @library /test/lib * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.module @@ -42,18 +42,16 @@ import static jdk.test.lib.Asserts.*; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.util.HashMap; import java.util.Map; import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// package p1 in m1 is exported unqualifiedly +// ClassLoader1 --> defines m1x --> packages p1 +// package p1 in m1x is exported unqualifiedly // -// class p1.c1 defined in m1 tries to access p2.c2 defined in +// class p1.c1 defined in m1x tries to access p2.c2 defined in // in unnamed module. // // Three access attempts occur in this test: @@ -62,50 +60,50 @@ import myloaders.MyDiffClassLoader; // 2. In this scenario a strict module establishes readability // to the particular unnamed module it is trying to access. // Access is allowed. -// 3. Module m1 in the test_looseModuleLayer() method +// 3. Module m1x in the test_looseModuleLayer() method // is transitioned to a loose module, access // to all unnamed modules is allowed. // public class DiffCL_Umod { - // Create Layers over the boot layer to test different + // Create layers over the boot layer to test different // accessing scenarios of a named module to an unnamed module. - // Module m1 is a strict module and has not established + // Module m1x is a strict module and has not established // readability to an unnamed module that p2.c2 is defined in. public void test_strictModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MyDiffClassLoader.loader1 = new MyDiffClassLoader(); MyDiffClassLoader.loader2 = new MyDiffClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader2 // to achieve differing class loaders. Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); + map.put("m1x", MyDiffClassLoader.loader1); - // Create Layer that contains m1 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -114,109 +112,109 @@ public class DiffCL_Umod { // Attempt access try { p1_c1_class.newInstance(); - throw new RuntimeException("Test Failed, strict module m1 should not be able " + + throw new RuntimeException("Test Failed, strict module m1x should not be able " + "to access public type p2.c2 defined in unnamed module"); } catch (IllegalAccessError e) { } } - // Module m1 is a strict module and has established + // Module m1x is a strict module and has established // readability to an unnamed module that p2.c2 is defined in. public void test_strictModuleUnnamedReadableLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MyDiffClassLoader.loader1 = new MyDiffClassLoader(); MyDiffClassLoader.loader2 = new MyDiffClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader2 // to achieve differing class loaders. Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); + map.put("m1x", MyDiffClassLoader.loader1); - // Create Layer that contains m1 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1ReadEdgeDiffLoader Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1ReadEdgeDiffLoader"); try { - // Read edge between m1 and the unnamed module that loads p2.c2 is established in + // Read edge between m1x and the unnamed module that loads p2.c2 is established in // c1ReadEdgeDiffLoader's ctor before attempting access. p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, module m1 has established readability to p2/c2 loader's " + + throw new RuntimeException("Test Failed, module m1x has established readability to p2/c2 loader's " + "unnamed module, access should be allowed: " + e.getMessage()); } } - // Module m1 is a loose module and thus can read all unnamed modules. + // Module m1x is a loose module and thus can read all unnamed modules. public void test_looseModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MyDiffClassLoader.loader1 = new MyDiffClassLoader(); MyDiffClassLoader.loader2 = new MyDiffClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader2 // to achieve differing class loaders. Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); + map.put("m1x", MyDiffClassLoader.loader1); - // Create Layer that contains m1 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1Loose Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1Loose"); - // change m1 to read all unnamed modules - Module m1 = layer.findModule("m1").get(); - jdk.internal.module.Modules.addReadsAllUnnamed(m1); + // change m1x to read all unnamed modules + Module m1x = layer.findModule("m1x").get(); + jdk.internal.module.Modules.addReadsAllUnnamed(m1x); try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, loose module m1 should be able to access " + + throw new RuntimeException("Test Failed, loose module m1x should be able to access " + "public type p2.c2 defined in unnamed module: " + e.getMessage()); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java index b8420c2e5c6..8a0d6a35af9 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,7 +25,7 @@ /* * @test - * @summary class p3.c3 defined in module m1 tries to access c4 defined in an unnamed package + * @summary class p3.c3 defined in module m1x tries to access c4 defined in an unnamed package * and an unnamed module. * @modules java.base/jdk.internal.misc * @library /test/lib @@ -38,7 +38,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -48,10 +47,10 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p3 -// package p3 in m1 is exported unqualifiedly +// ClassLoader1 --> defines m1x --> packages p3 +// package p3 in m1x is exported unqualifiedly // -// class p3.c3 defined in m1 tries to access c4 defined in +// class p3.c3 defined in m1x tries to access c4 defined in // in unnamed module. // // Two access attempts occur in this test: @@ -63,44 +62,44 @@ import myloaders.MyDiffClassLoader; // public class DiffCL_UmodUpkg { - // Create Layers over the boot layer to test different + // Create layers over the boot layer to test different // accessing scenarios of a named module to an unnamed module. - // Module m1 is a strict module and has not established + // Module m1x is a strict module and has not established // readability to an unnamed module that c4 is defined in. public void test_strictModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p3 // Packages exported: p3 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p3") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MyDiffClassLoader.loader1 = new MyDiffClassLoader(); MyDiffClassLoader.loader2 = new MyDiffClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader2 // to achieve differing class loaders. Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); + map.put("m1x", MyDiffClassLoader.loader1); - // Create Layer that contains m1 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p3.c3 @@ -109,58 +108,58 @@ public class DiffCL_UmodUpkg { // Attempt access try { p3_c3_class.newInstance(); - throw new RuntimeException("Test Failed, strict module m1 should not be able to access " + + throw new RuntimeException("Test Failed, strict module m1x should not be able to access " + "public type c4 defined in unnamed module"); } catch (IllegalAccessError e) { } } - // Module m1 is a strict module and has established + // Module m1x is a strict module and has established // readability to an unnamed module that c4 is defined in. public void test_strictModuleUnnamedReadableLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p3 // Packages exported: p3 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p3") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MyDiffClassLoader.loader1 = new MyDiffClassLoader(); MyDiffClassLoader.loader2 = new MyDiffClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader2 // to achieve differing class loaders. Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); + map.put("m1x", MyDiffClassLoader.loader1); - // Create Layer that contains m1 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p3.c3ReadEdgeDiffLoader Class p3_c3_class = MyDiffClassLoader.loader1.loadClass("p3.c3ReadEdgeDiffLoader"); try { - // Read edge between m1 and the unnamed module that loads c4 is established in + // Read edge between m1x and the unnamed module that loads c4 is established in // C3ReadEdgeDiffLoader's ctor before attempting access. p3_c3_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, module m1 has established readability to " + + throw new RuntimeException("Test Failed, module m1x has established readability to " + "c4 loader's unnamed module, access should be allowed: " + e.getMessage()); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java index 330d7239f3a..d3d8395b13a 100644 --- a/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,9 +25,9 @@ /* * @test - * @summary Test that if module m1 can read module m2, but package p2 in m2 - * is exported specifically to module m3, then class p1.c1 in m1 can not - * access p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, but package p2 in m2x + * is exported specifically to module m3x, then class p1.c1 in m1x can not + * access p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -38,7 +38,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -48,83 +47,83 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// defines m2 --> packages p2 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> packages p1 +// defines m2x --> packages p2 +// defines m3x --> packages p3 // -// m1 can read m2 -// package p2 in m2 is exported to m3 +// m1x can read m2x +// package p2 in m2x is exported to m3x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access denied since although m1 can read m2, p2 is exported only to m3. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access denied since although m1x can read m2x, p2 is exported only to m3x. // public class ExpQualOther { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2, m3 + // Define module: m1x + // Can read: java.base, m2x, m3x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") - .requires("m3") + .requires("m2x") + .requires("m3x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: p2 is exported to m3 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported to m3x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m3")) + .exports("p2", Set.of("m3x")) .build(); - // Define module: m3 - // Can read: java.base, m2 + // Define module: m3x + // Can read: java.base, m2x // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") - .requires("m2") - .contains("p3") + .requires("m2x") + .packages(Set.of("p3")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); - map.put("m3", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); + map.put("m3x", MySameClassLoader.loader1); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m3") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m3x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m3 not to m1)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m3x not to m1x)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java b/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java index 31de4576d90..1545bcb50e5 100644 --- a/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java +++ b/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can read module m2, AND package p2 in m2 is - * exported qualifiedly to m1, then class p1.c1 in m1 can read p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, AND package p2 in m2x is + * exported qualifiedly to m1x, then class p1.c1 in m1x can read p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -48,57 +47,57 @@ import myloaders.MySameClassLoader; public class ExpQualToM1 { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: p2 is exported qualifiedly to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported qualifiedly to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1"); + throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1x"); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java index 03a377027de..0daba28d73e 100644 --- a/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java +++ b/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can read module m2, AND package p2 in module2 is - * exported unqualifiedly, then class p1.c1 in m1 can read p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, AND package p2 in module_two is + * exported unqualifiedly, then class p1.c1 in m1x can read p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -48,50 +47,50 @@ import myloaders.MySameClassLoader; public class ExpUnqual { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: p2 is exported unqualifiedly - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") .exports("p2") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); diff --git a/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java b/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java index c9a89c8ba9f..69f2ca14869 100644 --- a/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java +++ b/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test if package p2 in module m2 is exported to all unnamed, - * then class p1.c1 in an unnamed module can read p2.c2 in module m2. + * @summary Test if package p2 in module m2x is exported to all unnamed, + * then class p1.c1 in an unnamed module can read p2.c2 in module m2x. * @library /test/lib * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.module @@ -41,76 +41,74 @@ import static jdk.test.lib.Asserts.*; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.util.HashMap; import java.util.Map; import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported unqualifiedly +// m1x can read m2x +// package p2 in m2x is exported unqualifiedly // -// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x // Access allowed, an unnamed module can read all modules and p2 in module -// m2 is exported to all unnamed modules. +// m2x is exported to all unnamed modules. public class ExportAllUnnamed { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: p2 is exported unqualifiedly - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); Class p2_c2_class = MySameClassLoader.loader1.loadClass("p2.c2"); - Module m2 = p2_c2_class.getModule(); + Module m2x = p2_c2_class.getModule(); - // Export m2/p2 to all unnamed modules. - jdk.internal.module.Modules.addExportsToAllUnnamed(m2, "p2"); + // Export m2x/p2 to all unnamed modules. + jdk.internal.module.Modules.addExportsToAllUnnamed(m2x, "p2"); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); diff --git a/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java index 4f592a19002..baabe54cd85 100644 --- a/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can read module m2, but package p2 in m2 is not - * exported, then class p1.c1 in m1 can not read p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, but package p2 in m2x is not + * exported, then class p1.c1 in m1x can not read p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,67 +46,67 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> packages p1 +// defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is not exported +// m1x can read m2x +// package p2 in m2x is not exported // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x // Access denied since p2 is not exported. // public class PkgNotExp { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p2") + .packages(Set.of("p2")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 and m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x and m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod.java b/hotspot/test/runtime/modules/AccessCheck/Umod.java index 255950c7f37..20b97edd11e 100644 --- a/hotspot/test/runtime/modules/AccessCheck/Umod.java +++ b/hotspot/test/runtime/modules/AccessCheck/Umod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,7 +25,7 @@ /* * @test - * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in unnamed module. + * @summary class p1.c1 defined in m1x tries to access p2.c2 defined in unnamed module. * @library /test/lib * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.module @@ -39,21 +39,19 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; -import java.lang.reflect.Module; import java.util.HashMap; import java.util.Map; import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// package p1 in m1 is exported unqualifiedly +// ClassLoader1 --> defines m1x --> packages p1 +// package p1 in m1x is exported unqualifiedly // -// class p1.c1 defined in m1 tries to access p2.c2 defined in +// class p1.c1 defined in m1x tries to access p2.c2 defined in // in unnamed module. // // Three access attempts occur in this test: @@ -62,47 +60,47 @@ import myloaders.MySameClassLoader; // 2. In this scenario a strict module establishes readability // to the particular unnamed module it is trying to access. // Access is allowed. -// 3. Module m1 in the test_looseModuleLayer() method +// 3. Module m1x in the test_looseModuleLayer() method // is transitioned to a loose module, access // to all unnamed modules is allowed. // public class Umod { - // Create Layers over the boot layer to test different + // Create layers over the boot layer to test different // accessing scenarios of a named module to an unnamed module. - // Module m1 is a strict module and has not established + // Module m1x is a strict module and has not established // readability to an unnamed module that p2.c2 is defined in. public void test_strictModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader. MySameClassLoader loader = new MySameClassLoader(); Map map = new HashMap<>(); - map.put("m1", loader); + map.put("m1x", loader); - // Create Layer that contains m1 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == loader); + assertTrue(layer.findLoader("m1x") == loader); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -111,103 +109,103 @@ public class Umod { // Attempt access try { p1_c1_class.newInstance(); - throw new RuntimeException("Test Failed, strict module m1, type p1.c1, should not be able " + + throw new RuntimeException("Test Failed, strict module m1x, type p1.c1, should not be able " + "to access public type p2.c2 defined in unnamed module"); } catch (IllegalAccessError e) { } } - // Module m1 is a strict module and has established + // Module m1x is a strict module and has established // readability to an unnamed module that p2.c2 is defined in. public void test_strictModuleUnnamedReadableLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MySameClassLoader loader = new MySameClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader. Map map = new HashMap<>(); - map.put("m1", loader); + map.put("m1x", loader); - // Create Layer that contains m1 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == loader); + assertTrue(layer.findLoader("m1x") == loader); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1ReadEdge Class p1_c1_class = loader.loadClass("p1.c1ReadEdge"); try { - // Read edge between m1 and the unnamed module that loads p2.c2 is established in + // Read edge between m1x and the unnamed module that loads p2.c2 is established in // c1ReadEdge's ctor before attempting access. p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, strict module m1, type p1.c1ReadEdge, should be able to acccess public type " + + throw new RuntimeException("Test Failed, strict module m1x, type p1.c1ReadEdge, should be able to acccess public type " + "p2.c2 defined in unnamed module: " + e.getMessage()); } } - // Module m1 is a loose module and thus can read all unnamed modules. + // Module m1x is a loose module and thus can read all unnamed modules. public void test_looseModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MySameClassLoader loader = new MySameClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader. Map map = new HashMap<>(); - map.put("m1", loader); + map.put("m1x", loader); - // Create Layer that contains m1 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == loader); + assertTrue(layer.findLoader("m1x") == loader); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1Loose Class p1_c1_class = loader.loadClass("p1.c1Loose"); - // change m1 to read all unnamed modules - Module m1 = layer.findModule("m1").get(); - jdk.internal.module.Modules.addReadsAllUnnamed(m1); + // change m1x to read all unnamed modules + Module m1x = layer.findModule("m1x").get(); + jdk.internal.module.Modules.addReadsAllUnnamed(m1x); try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, strict module m1, type p1.c1Loose, should be able to acccess public type " + + throw new RuntimeException("Test Failed, strict module m1x, type p1.c1Loose, should be able to acccess public type " + "p2.c2 defined in unnamed module: " + e.getMessage()); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java index 5fcc629096c..a017c9f74b6 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,9 +25,9 @@ /* * @test - * @summary class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2. + * @summary class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x. * Access is denied, since an unnamed module can read all modules but p2 in module - * m2 is exported specifically to module m1, not to all modules. + * m2x is exported specifically to module m1x, not to all modules. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -38,7 +38,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -48,70 +47,70 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is not exported +// m1x can read m2x +// package p2 in m2x is not exported // -// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x // Access denied, an unnamed module can read all modules but p2 in module -// m2 is exported specifically to module m1 not to all modules. +// m2x is exported specifically to module m1x not to all modules. // public class UmodDiffCL_ExpQualOther { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 - // NOTE: module m1 does not define a package named p1. + // NOTE: module m1x does not define a package named p1. // p1 will be loaded in an unnamed module. Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m1, not unqualifiedly"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m1x, not unqualifiedly"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java index ade483acd46..724a92d7748 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2. - * Access allowed, an unnamed module can read all modules and p2 in module m2 + * @summary class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x. + * Access allowed, an unnamed module can read all modules and p2 in module m2x * which is exported unqualifiedly. * @modules java.base/jdk.internal.misc * @library /test/lib @@ -38,7 +38,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -48,70 +47,70 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported unqualifiedly. +// m1x can read m2x +// package p2 in m2x is exported unqualifiedly. // -// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x // Access allowed, an unnamed module can read all modules and p2 in module -// m2 which is exported unqualifiedly. +// m2x which is exported unqualifiedly. // public class UmodDiffCL_ExpUnqual { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") .exports("p2") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); - // NOTE: module m1 does not define a package named p1. + // NOTE: module m1x does not define a package named p1. // p1 will be loaded in an unnamed module. Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, p1.c1 defined in unnamed module can access p2.c2 in module m2"); + throw new RuntimeException("Test Failed, p1.c1 defined in unnamed module can access p2.c2 in module m2x"); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java index b5ec6c6a6b0..c95ab7fb031 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,9 +25,9 @@ /* * @test - * @summary class p1.c1 defined in unnamed module tries to access p2.c2 defined in m2. + * @summary class p1.c1 defined in unnamed module tries to access p2.c2 defined in m2x. * Access is denied since even though unnamed module can read all modules, p2 - * in module m2 is not exported at all. + * in module m2x is not exported at all. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,70 +46,70 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is not exported +// m1x can read m2x +// package p2 in m2x is not exported // -// class p1.c1 defined in unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in unnamed module tries to access p2.c2 defined in m2x // Access denied since even though unnamed module can read all modules, p2 -// in module m2 is not exported at all. +// in module m2x is not exported at all. // public class UmodDiffCL_PkgNotExp { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p2") + .packages(Set.of("p2")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 - // NOTE: module m1 does not define a package named p1. + // NOTE: module m1x does not define a package named p1. // p1 will be loaded in an unnamed module. Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported to an unnamed module)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported to an unnamed module)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java b/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java index 7cfcdabe42b..f84425ba4a6 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,7 +25,7 @@ /* * @test - * @summary class p3.c3 defined in module m1 tries to access c4 defined in unnamed module. + * @summary class p3.c3 defined in module m1x tries to access c4 defined in unnamed module. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -40,18 +40,16 @@ import static jdk.test.lib.Asserts.*; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.util.HashMap; import java.util.Map; import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> packages p3 -// package p3 in m1 is exported unqualifiedly +// ClassLoader1 --> defines m1x --> packages p3 +// package p3 in m1x is exported unqualifiedly // -// class p3.c3 defined in m1 tries to access c4 defined in +// class p3.c3 defined in m1x tries to access c4 defined in // in unnamed module. // // Two access attempts occur in this test: @@ -63,41 +61,41 @@ import myloaders.MySameClassLoader; // public class UmodUPkg { - // Create Layers over the boot layer to test different + // Create layers over the boot layer to test different // accessing scenarios of a named module to an unnamed module. - // Module m1 is a strict module and has not established + // Module m1x is a strict module and has not established // readability to an unnamed module that c4 is defined in. public void test_strictModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p3 // Packages exported: p3 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p3") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); - // map module m1 to class loader. + // map module m1x to class loader. // class c4 will be loaded in an unnamed module/loader. MySameClassLoader loader = new MySameClassLoader(); Map map = new HashMap<>(); - map.put("m1", loader); + map.put("m1x", loader); - // Create Layer that contains m1 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == loader); + assertTrue(layer.findLoader("m1x") == loader); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p3.c3 @@ -106,55 +104,55 @@ public class UmodUPkg { // Attempt access try { p3_c3_class.newInstance(); - throw new RuntimeException("Test Failed, strict module m1, type p3.c3, should not be able to access " + + throw new RuntimeException("Test Failed, strict module m1x, type p3.c3, should not be able to access " + "public type c4 defined in unnamed module"); } catch (IllegalAccessError e) { } } - // Module m1 is a strict module and has established + // Module m1x is a strict module and has established // readability to an unnamed module that c4 is defined in. public void test_strictModuleUnnamedReadableLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p3 // Packages exported: p3 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p3") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MySameClassLoader loader = new MySameClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c4 will be loaded in an unnamed module/loader. Map map = new HashMap<>(); - map.put("m1", loader); + map.put("m1x", loader); - // Create Layer that contains m1 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == loader); + assertTrue(layer.findLoader("m1x") == loader); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p3.c3ReadEdge Class p3_c3_class = loader.loadClass("p3.c3ReadEdge"); try { - // Read edge between m1 and the unnamed module that loads c4 is established in + // Read edge between m1x and the unnamed module that loads c4 is established in // c3ReadEdge's ctor before attempting access. p3_c3_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, module m1, type p3.c3ReadEdge, has established readability to " + + throw new RuntimeException("Test Failed, module m1x, type p3.c3ReadEdge, has established readability to " + "c4 loader's unnamed module, access should be allowed: " + e.getMessage()); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java index 01ec39aa1a5..85ecface508 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,9 +25,9 @@ /* * @test - * @summary class c5 defined in an unnamed module tries to access p6.c6 defined in m2. + * @summary class c5 defined in an unnamed module tries to access p6.c6 defined in m2x. * Access is denied, since an unnamed module can read all modules but p6 in module - * m2 is exported specifically to module m1, not to all modules. + * m2x is exported specifically to module m1x, not to all modules. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -38,7 +38,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -48,68 +47,68 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// ClassLoader2 --> defines m2 --> packages p6 +// ClassLoader1 --> defines m1x --> no packages +// ClassLoader2 --> defines m2x --> packages p6 // -// m1 can read m2 -// package p6 in m2 is not exported +// m1x can read m2x +// package p6 in m2x is not exported // -// class c5 defined in an unnamed module tries to access p6.c6 defined in m2 +// class c5 defined in an unnamed module tries to access p6.c6 defined in m2x // Access denied, an unnamed module can read all modules but p6 in module -// m2 is exported specifically to module m1 not to all modules. +// m2x is exported specifically to module m1x not to all modules. // public class UmodUpkgDiffCL_ExpQualOther { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p6 - // Packages exported: p6 exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p6 exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p6", Set.of("m1")) + .exports("p6", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class c5 Class c5_class = MyDiffClassLoader.loader1.loadClass("c5"); try { c5_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p6 in m2 is exported to m1, not unqualifiedly"); + throw new RuntimeException("Failed to get IAE (p6 in m2x is exported to m1x, not unqualifiedly"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java index 68dd3778b5c..b55a19ea1b5 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary class c5 in an unnamed module can read module m2, but package p6 in module m2 is not exported. - * Access denied since even though unnamed module can read all modules, p6 in module m2 is not exported at all. + * @summary class c5 in an unnamed module can read module m2x, but package p6 in module m2x is not exported. + * Access denied since even though unnamed module can read all modules, p6 in module m2x is not exported at all. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,70 +46,70 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// ClassLoader2 --> defines m2 --> packages p6 +// ClassLoader1 --> defines m1x --> no packages +// ClassLoader2 --> defines m2x --> packages p6 // -// m1 can read m2 -// package p6 in m2 is not exported +// m1x can read m2x +// package p6 in m2x is not exported // -// class c5 defined in unnamed module tries to access p6.c6 defined in m2 +// class c5 defined in unnamed module tries to access p6.c6 defined in m2x // Access denied since even though unnamed module can read all modules, p6 -// in module m2 is not exported at all. +// in module m2x is not exported at all. // public class UmodUpkgDiffCL_NotExp { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p6 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p6") + .packages(Set.of("p6")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class c5 - // NOTE: module m1 does not define any packages. + // NOTE: module m1x does not define any packages. // c5 will be loaded in an unnamed module. Class c5_class = MyDiffClassLoader.loader1.loadClass("c5"); try { c5_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p6 in m2 is not exported to " + + throw new RuntimeException("Failed to get IAE (p6 in m2x is not exported to " + "an unnamed module that c5 is defined within)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java index 68abe56b7a1..081dc0a2ba2 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if class c5 in an unnamed module can read package p6 in module m2, but package p6 in module m2 is - * exported qualifiedly to module m3, then class c5 in an unnamed module can not read p6.c6 in module m2. + * @summary Test that if class c5 in an unnamed module can read package p6 in module m2x, but package p6 in module m2x is + * exported qualifiedly to module m3x, then class c5 in an unnamed module can not read p6.c6 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,80 +46,80 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p6 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p6 +// defines m3x --> packages p3 // -// m1 can read m2 -// package p6 in m2 is exported to m3 +// m1x can read m2x +// package p6 in m2x is exported to m3x // -// class c5 defined in m1 tries to access p6.c6 defined in m2 -// Access denied since although m1 can read m2, p6 is exported only to m3. +// class c5 defined in m1x tries to access p6.c6 defined in m2x +// Access denied since although m1x can read m2x, p6 is exported only to m3x. // public class UmodUpkg_ExpQualOther { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 (need to define m1 to establish the Layer successfully) - // Can read: java.base, m2, m3 + // Define module: m1x (need to define m1x to establish the layer successfully) + // Can read: java.base, m2x, m3x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") - .requires("m3") + .requires("m2x") + .requires("m3x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p6 - // Packages exported: p6 is exported to m3 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p6 is exported to m3x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p6", Set.of("m3")) + .exports("p6", Set.of("m3x")) .build(); - // Define module: m3 + // Define module: m3x // Can read: java.base // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); - map.put("m3", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); + map.put("m3x", MySameClassLoader.loader1); - // Create Layer that contains m1, m2 and m3 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x, m2x and m3x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m3") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m3x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class c5 Class c5_class = MySameClassLoader.loader1.loadClass("c5"); try { c5_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p6 in m2 is exported to m3, not unqualifiedly to everyone)"); + throw new RuntimeException("Failed to get IAE (p6 in m2x is exported to m3x, not unqualifiedly to everyone)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java index da69805e580..d7e3287ac9d 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test if package p6 in module m2 is not exported, then class c5 - * in an unnamed module can not access p6.c2 in module m2. + * @summary Test if package p6 in module m2x is not exported, then class c5 + * in an unnamed module can not access p6.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -46,67 +45,67 @@ import java.util.Map; import java.util.Set; import myloaders.MySameClassLoader; -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p6 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p6 // -// m1 can read m2 -// package p6 in m2 is not exported +// m1x can read m2x +// package p6 in m2x is not exported // -// class c5 defined in an unnamed module tries to access p6.c2 defined in m2 +// class c5 defined in an unnamed module tries to access p6.c2 defined in m2x // Access denied since p6 is not exported. // public class UmodUpkg_NotExp { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p6 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p6") + .packages(Set.of("p6")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 and m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x and m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class c5 Class c5_class = MySameClassLoader.loader1.loadClass("c5"); try { c5_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p6 in m2 is not exported)"); + throw new RuntimeException("Failed to get IAE (p6 in m2x is not exported)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java index 0f5aaf21585..1032eecb27f 100644 --- a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if package p2 in module m2 is exported to module m3, - * then class p1.c1 in an unnamed module can not read p2.c2 in module m2. + * @summary Test that if package p2 in module m2x is exported to module m3x, + * then class p1.c1 in an unnamed module can not read p2.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,80 +46,80 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p2 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p2 +// defines m3x --> packages p3 // -// m1 can read m2 -// package p2 in m2 is exported to m3 +// m1x can read m2x +// package p2 in m2x is exported to m3x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access denied since although m1 can read m2, p2 is exported only to m3. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access denied since although m1x can read m2x, p2 is exported only to m3x. // public class Umod_ExpQualOther { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 (need to define m1 to establish the Layer successfully) - // Can read: java.base, m2, m3 + // Define module: m1x (need to define m1x to establish the layer successfully) + // Can read: java.base, m2x, m3x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") - .requires("m3") + .requires("m2x") + .requires("m3x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: p2 is exported to m3 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported to m3x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m3")) + .exports("p2", Set.of("m3x")) .build(); - // Define module: m3 + // Define module: m3x // Can read: java.base // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); - map.put("m3", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); + map.put("m3x", MySameClassLoader.loader1); - // Create Layer that contains m1, m2 and m3 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x, m2x and m3x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m3") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m3x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m3, not unqualifiedly to everyone)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m3x, not unqualifiedly to everyone)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java index db90a08bd44..05971cec727 100644 --- a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java +++ b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test if package p2 in module m2 is exported unqualifiedly, - * then class p1.c1 in an unnamed module can read p2.c2 in module m2. + * @summary Test if package p2 in module m2x is exported unqualifiedly, + * then class p1.c1 in an unnamed module can read p2.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -47,61 +46,61 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported unqualifiedly +// m1x can read m2x +// package p2 in m2x is exported unqualifiedly // -// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x // Access allowed, an unnamed module can read all modules and p2 in module -// m2 which is exported unqualifiedly. +// m2x which is exported unqualifiedly. public class Umod_ExpUnqual { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: p2 is exported unqualifiedly - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") .exports("p2") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java index d140cf84d69..46e692934c6 100644 --- a/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,8 +25,8 @@ /* * @test - * @summary Test if package p2 in module m2 is not exported, then class p1.c1 - * in an unnamed module can not access p2.c2 in module m2. + * @summary Test if package p2 in module m2x is not exported, then class p1.c1 + * in an unnamed module can not access p2.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -37,7 +37,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -46,67 +45,67 @@ import java.util.Map; import java.util.Set; import myloaders.MySameClassLoader; -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is not exported +// m1x can read m2x +// package p2 in m2x is not exported // -// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x // Access denied since p2 is not exported. // public class Umod_PkgNotExp { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p2") + .packages(Set.of("p2")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 and m2 - Layer layer = Layer.boot().defineModules(cf, map::get); + // Create layer that contains m1x and m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/p1/c1Loose.java b/hotspot/test/runtime/modules/AccessCheck/p1/c1Loose.java index 3722927e1b4..ab03e5de9c0 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p1/c1Loose.java +++ b/hotspot/test/runtime/modules/AccessCheck/p1/c1Loose.java @@ -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 @@ -26,7 +26,7 @@ import p2.c2; public class c1Loose { public c1Loose() { - // Attempt access - access should succeed since m1 is a loose module + // Attempt access - access should succeed since m1x is a loose module p2.c2 c2_obj = new p2.c2(); c2_obj.method2(); } diff --git a/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdge.java b/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdge.java index 55d4a8b7d13..40b31cc49f6 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdge.java +++ b/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdge.java @@ -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 @@ -22,17 +22,16 @@ */ package p1; -import java.lang.reflect.*; import p2.c2; public class c1ReadEdge { public c1ReadEdge() { - // Establish read edge from module m1, where c1ReadEdge is defined, + // Establish read edge from module m1x, where c1ReadEdge is defined, // to the unnamed module, where p2.c2 will be defined. - Module m1 = c1ReadEdge.class.getModule(); + Module m1x = c1ReadEdge.class.getModule(); ClassLoader loader = c1ReadEdge.class.getClassLoader(); Module unnamed_module = loader.getUnnamedModule(); - m1.addReads(unnamed_module); + m1x.addReads(unnamed_module); // Attempt access - access should succeed p2.c2 c2_obj = new p2.c2(); diff --git a/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java b/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java index daaee5843c8..51b8955673e 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java +++ b/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java @@ -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 @@ -22,38 +22,37 @@ */ package p1; -import java.lang.reflect.*; import myloaders.MyDiffClassLoader; import p2.c2; public class c1ReadEdgeDiffLoader { public c1ReadEdgeDiffLoader() { - // The goal is to establish a read edge between module m1 + // The goal is to establish a read edge between module m1x // which is the module where p1.c1ReadEdgeDiffLoader is defined, // and the unnamed module that defines p2.c2. This must be // done in 2 steps: // - // Step #1: Establish a read edge between m1, where c1ReadEdgeDiffLoader + // Step #1: Establish a read edge between m1x, where c1ReadEdgeDiffLoader // is defined, and the System ClassLoader's unnamed module, // where MyDiffClassLoader is defined. This read edge // is needed before we can obtain MyDiffClassLoader.loader2's unnamed module. // - // Step #2: Establish a read edge between m1, where c1ReadEdgeDiffLoader + // Step #2: Establish a read edge between m1x, where c1ReadEdgeDiffLoader // is defined, and the MyDiffClassLoader.loader2's unnamed module, // where p2.c2 will be defined. - // Step #1: read edge m1 -> System ClassLoader's unnamed module - Module m1 = c1ReadEdgeDiffLoader.class.getModule(); + // Step #1: read edge m1x -> System ClassLoader's unnamed module + Module m1x = c1ReadEdgeDiffLoader.class.getModule(); ClassLoader system_loader = ClassLoader.getSystemClassLoader(); - Module unnamed_module1 = system_loader.getUnnamedModule(); - m1.addReads(unnamed_module1); + Module unnamed_module_one = system_loader.getUnnamedModule(); + m1x.addReads(unnamed_module_one); - // Step #2: read edge m1 -> MyDiffClassLoader.loader2's unnamed module + // Step #2: read edge m1x -> MyDiffClassLoader.loader2's unnamed module ClassLoader loader2 = MyDiffClassLoader.loader2; - Module unnamed_module2 = loader2.getUnnamedModule(); - m1.addReads(unnamed_module2); + Module unnamed_module_two = loader2.getUnnamedModule(); + m1x.addReads(unnamed_module_two); - // Attempt access - access should succeed since m1 can read + // Attempt access - access should succeed since m1x can read // MyDiffClassLoader.loader2's unnamed module p2.c2 c2_obj = new p2.c2(); c2_obj.method2(); diff --git a/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod b/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod index 50df6180233..cc529395226 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod +++ b/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod @@ -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 @@ -23,15 +23,14 @@ /* * package p3; - * import java.lang.reflect.*; * public class c3ReadEdge { * public c3ReadEdge() { - * // Establish read edge from module m1, where c3ReadEdge is defined, + * // Establish read edge from module m1x, where c3ReadEdge is defined, * // to the unnamed module, where c4 will be defined. - * Module m1 = c3ReadEdge.class.getModule(); + * Module m1x = c3ReadEdge.class.getModule(); * ClassLoader loader = c3ReadEdge.class.getClassLoader(); * Module unnamed_module = loader.getUnnamedModule(); - * m1.addReads(unnamed_module); + * m1x.addReads(unnamed_module); * // Attempt access - access should succeed * c4 c4_obj = new c4(); * c4_obj.method4(); @@ -75,14 +74,14 @@ class p3/c3ReadEdge { Utf8 "java/lang/Object"; // #28 at 0xBC Utf8 "java/lang/Class"; // #29 at 0xCF Utf8 "getModule"; // #30 at 0xE1 - Utf8 "()Ljava/lang/reflect/Module;"; // #31 at 0xED + Utf8 "()Ljava/lang/Module;"; // #31 at 0xED Utf8 "getClassLoader"; // #32 at 0x010C Utf8 "()Ljava/lang/ClassLoader;"; // #33 at 0x011D Utf8 "java/lang/ClassLoader"; // #34 at 0x0139 Utf8 "getUnnamedModule"; // #35 at 0x0151 - Utf8 "java/lang/reflect/Module"; // #36 at 0x0164 + Utf8 "java/lang/Module"; // #36 at 0x0164 Utf8 "addReads"; // #37 at 0x017F - Utf8 "(Ljava/lang/reflect/Module;)Ljava/lang/reflect/Module;"; // #38 at 0x018A + Utf8 "(Ljava/lang/Module;)Ljava/lang/Module;"; // #38 at 0x018A Utf8 "method4"; // #39 at 0x01C3 } // Constant Pool diff --git a/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod b/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod index 103f7eea2c7..e1602cdf9fb 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod +++ b/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod @@ -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 @@ -23,37 +23,36 @@ /* * package p3; - * import java.lang.reflect.*; * import myloaders.MyDiffClassLoader; * * public class c3ReadEdgeDiffLoader { * public c3ReadEdgeDiffLoader() { - * // The goal is to establish a read edge between module m1 + * // The goal is to establish a read edge between module m1x * // which is the module where p3.c3ReadEdgeDiffLoader is defined, * // and the unnamed module that defines c4. This must be * // done in 2 steps: * // - * // Step #1: Establish a read edge between m1, where c3ReadEdgeDiffLoader + * // Step #1: Establish a read edge between m1x, where c3ReadEdgeDiffLoader * // is defined, and the System ClassLoader's unnamed module, * // where MyDiffClassLoader is defined. This read edge * // is needed before we can obtain MyDiffClassLoader.loader2's unnamed module. * // - * // Step #2: Establish a read edge between m1, where c3ReadEdgeDiffLoader + * // Step #2: Establish a read edge between m1x, where c3ReadEdgeDiffLoader * // is defined, and the MyDiffClassLoader.loader2's unnamed module, * // where c4 will be defined. * - * // Step #1: read edge m1 -> System ClassLoader's unnamed module - * Module m1 = c3ReadEdgeDiffLoader.class.getModule(); + * // Step #1: read edge m1x -> System ClassLoader's unnamed module + * Module m1x = c3ReadEdgeDiffLoader.class.getModule(); * ClassLoader system_loader = ClassLoader.getSystemClassLoader(); - * Module unnamed_module1 = system_loader.getUnnamedModule(); - * m1.addReads(unnamed_module1); + * Module unnamed_module_one = system_loader.getUnnamedModule(); + * m1x.addReads(unnamed_module_one); * - * // Step #2: read edge m1 -> MyDiffClassLoader.loader2's unnamed module + * // Step #2: read edge m1x -> MyDiffClassLoader.loader2's unnamed module * ClassLoader loader2 = MyDiffClassLoader.loader2; - * Module unnamed_module2 = loader2.getUnnamedModule(); - * m1.addReads(unnamed_module2); + * Module unnamed_module_two = loader2.getUnnamedModule(); + * m1x.addReads(unnamed_module_two); * - * // Attempt access - should succeed since m1 can read + * // Attempt access - should succeed since m1x can read * // MyDiffClassLoader.loader2's unnamed module * c4 c4_obj = new c4(); * c4_obj.method4(); @@ -100,14 +99,14 @@ class p3/c3ReadEdgeDiffLoader { Utf8 "java/lang/Object"; // #31 at 0xDD Utf8 "java/lang/Class"; // #32 at 0xF0 Utf8 "getModule"; // #33 at 0x0102 - Utf8 "()Ljava/lang/reflect/Module;"; // #34 at 0x010E + Utf8 "()Ljava/lang/Module;"; // #34 at 0x010E Utf8 "java/lang/ClassLoader"; // #35 at 0x012D Utf8 "getSystemClassLoader"; // #36 at 0x0145 Utf8 "()Ljava/lang/ClassLoader;"; // #37 at 0x015C Utf8 "getUnnamedModule"; // #38 at 0x0178 - Utf8 "java/lang/reflect/Module"; // #39 at 0x018B + Utf8 "java/lang/Module"; // #39 at 0x018B Utf8 "addReads"; // #40 at 0x01A6 - Utf8 "(Ljava/lang/reflect/Module;)Ljava/lang/reflect/Module;"; // #41 at 0x01B1 + Utf8 "(Ljava/lang/Module;)Ljava/lang/Module;"; // #41 at 0x01B1 Utf8 "myloaders/MyDiffClassLoader"; // #42 at 0x01EA Utf8 "loader2"; // #43 at 0x0208 Utf8 "Lmyloaders/MyDiffClassLoader;"; // #44 at 0x0212 diff --git a/hotspot/test/runtime/modules/AccessCheck/p4/c4.java b/hotspot/test/runtime/modules/AccessCheck/p4/c4.java index d0098674672..8df98a646f8 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p4/c4.java +++ b/hotspot/test/runtime/modules/AccessCheck/p4/c4.java @@ -25,8 +25,6 @@ package p4; -import java.lang.reflect.Module; - public class c4 { // Add a read edge from c4's module to given module m public void addReads(Module m) { diff --git a/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java b/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java index 7872d0d3306..69ee6d6cf31 100644 --- a/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java +++ b/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -21,7 +21,6 @@ * questions. */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; /* @@ -31,7 +30,7 @@ import static jdk.test.lib.Asserts.*; * @compile p2/c2.java * @compile p1/c1.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckAllUnnamed @@ -43,28 +42,28 @@ public class AccessCheckAllUnnamed { // and then test that a class in the unnamed module can access a package in a // named module that has been exported to all unnamed modules. public static void main(String args[]) throws Throwable { - Object m1, m2; + Object m1x, m2x; - // Get the java.lang.reflect.Module object for module java.base. + // Get the java.lang.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); - Object jlObject_jlrM = jlObject.getModule(); - assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null"); + Object jlM = jlObject.getModule(); + assertNotNull(jlM, "jlModule object of java.lang.Object should not be null"); // Get the class loader for AccessCheckWorks and assume it's also used to // load class p2.c2. ClassLoader this_cldr = AccessCheckAllUnnamed.class.getClassLoader(); // Define a module for p3. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p3" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/there", new String[] { "p3" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p3" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/there", new String[] { "p3" }); + ModuleHelper.AddReadsModule(m1x, jlM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlM); try { ModuleHelper.AddModuleExportsToAllUnnamed((Module)null, "p2"); @@ -74,7 +73,7 @@ public class AccessCheckAllUnnamed { } try { - ModuleHelper.AddModuleExportsToAllUnnamed(m2, null); + ModuleHelper.AddModuleExportsToAllUnnamed(m2x, null); throw new RuntimeException("Failed to get the expected NPE for null package"); } catch(NullPointerException e) { // Expected @@ -88,21 +87,21 @@ public class AccessCheckAllUnnamed { } try { - ModuleHelper.AddModuleExportsToAllUnnamed(m2, "p3"); + ModuleHelper.AddModuleExportsToAllUnnamed(m2x, "p3"); throw new RuntimeException("Failed to get the expected IAE for package in other module"); } catch(IllegalArgumentException e) { // Expected } try { - ModuleHelper.AddModuleExportsToAllUnnamed(m2, "p4"); + ModuleHelper.AddModuleExportsToAllUnnamed(m2x, "p4"); throw new RuntimeException("Failed to get the expected IAE for package not in module"); } catch(IllegalArgumentException e) { // Expected } - // Export package p2 in m2 to allUnnamed. - ModuleHelper.AddModuleExportsToAllUnnamed(m2, "p2"); + // Export package p2 in m2x to allUnnamed. + ModuleHelper.AddModuleExportsToAllUnnamed(m2x, "p2"); // p1.c1's ctor tries to call a method in p2.c2. This should succeed because // p1 is in an unnamed module and p2.c2 is exported to all unnamed modules. diff --git a/hotspot/test/runtime/modules/AccessCheckExp.java b/hotspot/test/runtime/modules/AccessCheckExp.java index fa624b0783a..18c02937a82 100644 --- a/hotspot/test/runtime/modules/AccessCheckExp.java +++ b/hotspot/test/runtime/modules/AccessCheckExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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,54 +28,53 @@ * @compile p2/c2.java * @compile p1/c1.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckExp */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; public class AccessCheckExp { - // Test that if module1 can read module2, but package p2 in module2 is not - // exported then class p1.c1 in module1 can not read p2.c2 in module2. + // Test that if module_one can read module_two, but package p2 in module_two is not + // exported then class p1.c1 in module_one can not read p2.c2 in module_two. public static void main(String args[]) throws Throwable { - Object m1, m2; + Object m1x, m2x; - // Get the java.lang.reflect.Module object for module java.base. + // Get the java.lang.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); - Object jlObject_jlrM = jlObject.getModule(); - assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null"); + Object jlObject_jlM = jlObject.getModule(); + assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null"); // Get the class loader for AccessCheckExp and assume it's also used to // load classes p1.c1 and p2.c2. ClassLoader this_cldr = AccessCheckExp.class.getClassLoader(); // Define a module for p1. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p1" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/here", new String[] { "p1" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlM); - // Make package p1 in m1 visible to everyone. - ModuleHelper.AddModuleExportsToAll(m1, "p1"); + // Make package p1 in m1x visible to everyone. + ModuleHelper.AddModuleExportsToAll(m1x, "p1"); // p1.c1's ctor tries to call a method in p2.c2, but p2.c2 is not // exported. So should get IllegalAccessError. - ModuleHelper.AddReadsModule(m1, m2); + ModuleHelper.AddReadsModule(m1x, m2x); Class p1_c1_class = Class.forName("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported"); } catch (IllegalAccessError f) { System.out.println(f.getMessage()); if (!f.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheckJavaBase.java b/hotspot/test/runtime/modules/AccessCheckJavaBase.java index 24f2f77e115..0402f129658 100644 --- a/hotspot/test/runtime/modules/AccessCheckJavaBase.java +++ b/hotspot/test/runtime/modules/AccessCheckJavaBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -27,27 +27,26 @@ * @library /test/lib .. * @compile p2/c2.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckJavaBase */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; public class AccessCheckJavaBase { - // Test that a class defined to module2 always can read java.base. + // Test that a class defined to module_two always can read java.base. public static void main(String args[]) throws Throwable { // Get the class loader for AccessCheckJavaBase and assume it's also used to // load class p2.c2. ClassLoader this_cldr = AccessCheckJavaBase.class.getClassLoader(); // Define a module for p2. - Object m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); + Object m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); // p2.c2 can read its superclass java.lang.Object defined within java.base try { diff --git a/hotspot/test/runtime/modules/AccessCheckRead.java b/hotspot/test/runtime/modules/AccessCheckRead.java index a36268ace02..c25c33a61da 100644 --- a/hotspot/test/runtime/modules/AccessCheckRead.java +++ b/hotspot/test/runtime/modules/AccessCheckRead.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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,45 +28,44 @@ * @compile p2/c2.java * @compile p1/c1.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckRead */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; public class AccessCheckRead { - // Test that a class in a package in module1 cannot access a class in - // a package n module2 if module1 cannot read module2. + // Test that a class in a package in module_one cannot access a class in + // a package in module_two if module_one cannot read module_two. public static void main(String args[]) throws Throwable { - Object m1, m2; + Object m1x, m2x; - // Get the java.lang.reflect.Module object for module java.base. + // Get the java.lang.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); - Object jlObject_jlrM = jlObject.getModule(); - assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null"); + Object jlObject_jlM = jlObject.getModule(); + assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null"); // Get the class loader for AccessCheckRead and assume it's also used to // load classes p1.c1 and p2.c2. ClassLoader this_cldr = AccessCheckRead.class.getClassLoader(); // Define a module for p1. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p1" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/here", new String[] { "p1" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlM); - // Make package p1 in m1 visible to everyone. - ModuleHelper.AddModuleExportsToAll(m1, "p1"); + // Make package p1 in m1x visible to everyone. + ModuleHelper.AddModuleExportsToAll(m1x, "p1"); Class p1_c1_class = Class.forName("p1.c1"); @@ -74,7 +73,7 @@ public class AccessCheckRead { // cannot read p2's module. So should get IllegalAccessError. try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (m1 can't read m2)"); + throw new RuntimeException("Failed to get IAE (m1x can't read m2x)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not read") || diff --git a/hotspot/test/runtime/modules/AccessCheckSuper.java b/hotspot/test/runtime/modules/AccessCheckSuper.java index 594c1921e0f..c227db254a1 100644 --- a/hotspot/test/runtime/modules/AccessCheckSuper.java +++ b/hotspot/test/runtime/modules/AccessCheckSuper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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,13 +28,12 @@ * @compile p2/c2.java * @compile p3/c3.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckSuper */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; public class AccessCheckSuper { @@ -48,17 +47,17 @@ public class AccessCheckSuper { ClassLoader this_cldr = AccessCheckSuper.class.getClassLoader(); // Define a module for p2. - Object m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); + Object m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); // Define a module for p3. - Object m3 = ModuleHelper.ModuleObject("module3", this_cldr, new String[] { "p3" }); - assertNotNull(m3, "Module should not be null"); - ModuleHelper.DefineModule(m3, "9.0", "m3/there", new String[] { "p3" }); + Object m3x = ModuleHelper.ModuleObject("module_three", this_cldr, new String[] { "p3" }); + assertNotNull(m3x, "Module should not be null"); + ModuleHelper.DefineModule(m3x, "9.0", "m3x/there", new String[] { "p3" }); - // Since a readability edge has not been established between module2 - // and module3, p3.c3 cannot read its superclass p2.c2. + // Since a readability edge has not been established between module_two + // and module_three, p3.c3 cannot read its superclass p2.c2. try { Class p3_c3_class = Class.forName("p3.c3"); throw new RuntimeException("Failed to get IAE (can't read superclass)"); diff --git a/hotspot/test/runtime/modules/AccessCheckUnnamed.java b/hotspot/test/runtime/modules/AccessCheckUnnamed.java index 4a2ab3e4951..14b48b107b6 100644 --- a/hotspot/test/runtime/modules/AccessCheckUnnamed.java +++ b/hotspot/test/runtime/modules/AccessCheckUnnamed.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -21,7 +21,6 @@ * questions. */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; /* @@ -31,7 +30,7 @@ import static jdk.test.lib.Asserts.*; * @compile p2/c2.java * @compile p1/c1.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckUnnamed @@ -42,29 +41,29 @@ public class AccessCheckUnnamed { // Test that a class in the unnamed module can not access a package in a // named module that has not been unqualifiedly exported. public static void main(String args[]) throws Throwable { - Object m1, m2; + Object m1x, m2x; - // Get the java.lang.reflect.Module object for module java.base. + // Get the java.lang.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); - Object jlObject_jlrM = jlObject.getModule(); - assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null"); + Object jlObject_jlM = jlObject.getModule(); + assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null"); // Get the class loader for AccessCheckWorks and assume it's also used to // load class p2.c2. ClassLoader this_cldr = AccessCheckUnnamed.class.getClassLoader(); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlM); // p1.c1's ctor tries to call a method in p2.c2. This should fail because // p1 is in the unnamed module and p2.c2 is not unqualifiedly exported. Class p1_c1_class = Class.forName("p1.c1"); try { Object c1_obj = p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported to unnamed module)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported to unnamed module)"); } catch (IllegalAccessError f) { System.out.println(f.getMessage()); if (!f.getMessage().contains("does not export p2 to unnamed module")) { diff --git a/hotspot/test/runtime/modules/AccessCheckWorks.java b/hotspot/test/runtime/modules/AccessCheckWorks.java index 48d6660f195..9cb638ade3a 100644 --- a/hotspot/test/runtime/modules/AccessCheckWorks.java +++ b/hotspot/test/runtime/modules/AccessCheckWorks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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,51 +28,50 @@ * @compile p2/c2.java * @compile p1/c1.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckWorks */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; public class AccessCheckWorks { - // Check that a class in a package in module1 can successfully access a - // class in module2 when module1 can read module2 and the class's package + // Check that a class in a package in module_one can successfully access a + // class in module_two when module_one can read module_two and the class's package // has been exported. public static void main(String args[]) throws Throwable { - Object m1, m2; + Object m1x, m2x; - // Get the java.lang.reflect.Module object for module java.base. + // Get the java.lang.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); - Object jlObject_jlrM = jlObject.getModule(); - assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null"); + Object jlObject_jlM = jlObject.getModule(); + assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null"); // Get the class loader for AccessCheckWorks and assume it's also used to // load classes p1.c1 and p2.c2. ClassLoader this_cldr = AccessCheckWorks.class.getClassLoader(); // Define a module for p1. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p1" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/here", new String[] { "p1" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlM); - // Make package p1 in m1 visible to everyone. - ModuleHelper.AddModuleExportsToAll(m1, "p1"); + // Make package p1 in m1x visible to everyone. + ModuleHelper.AddModuleExportsToAll(m1x, "p1"); // p1.c1's ctor tries to call a method in p2.c2. This should work because // p1's module can read p2's module and p2 is exported to p1's module. - ModuleHelper.AddReadsModule(m1, m2); - ModuleHelper.AddModuleExports(m2, "p2", m1); + ModuleHelper.AddReadsModule(m1x, m2x); + ModuleHelper.AddModuleExports(m2x, "p2", m1x); Class p1_c1_class = Class.forName("p1.c1"); p1_c1_class.newInstance(); } diff --git a/hotspot/test/runtime/modules/CCE_module_msg.java b/hotspot/test/runtime/modules/CCE_module_msg.java index 38ff41fde2d..7e593dfcee9 100644 --- a/hotspot/test/runtime/modules/CCE_module_msg.java +++ b/hotspot/test/runtime/modules/CCE_module_msg.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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,14 +28,13 @@ * @compile p2/c2.java * @compile p4/c4.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CCE_module_msg */ import java.io.*; -import java.lang.reflect.Module; import java.net.URL; import java.net.URLClassLoader; import java.nio.file.Path; @@ -73,31 +72,31 @@ public class CCE_module_msg { } public static void invalidClassToString() throws Throwable { - // Get the java.lang.reflect.Module object for module java.base. + // Get the java.lang.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); - Object jlObject_jlrM = jlObject.getModule(); - assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null"); + Object jlObject_jlM = jlObject.getModule(); + assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null"); // Get the class loader for CCE_module_msg and assume it's also used to // load classes p1.c1 and p2.c2. ClassLoader this_cldr = CCE_module_msg.class.getClassLoader(); // Define a module for p2. - Object m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + Object m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlM); try { - ModuleHelper.AddModuleExportsToAll(m2, "p2"); + ModuleHelper.AddModuleExportsToAll(m2x, "p2"); Object p2Obj = new p2.c2(); System.out.println((String)p2Obj); throw new RuntimeException("ClassCastException wasn't thrown, test failed."); } catch (ClassCastException cce) { String exception = cce.getMessage(); System.out.println(exception); - if (exception.contains("module2/p2.c2") || - !(exception.contains("module2@") && + if (exception.contains("module_two/p2.c2") || + !(exception.contains("module_two@") && exception.contains("/p2.c2 cannot be cast to java.base/java.lang.String"))) { throw new RuntimeException("Wrong message: " + exception); } @@ -105,10 +104,10 @@ public class CCE_module_msg { } public static void invalidClassToStringCustomLoader() throws Throwable { - // Get the java.lang.reflect.Module object for module java.base. + // Get the java.lang.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); - Object jlObject_jlrM = jlObject.getModule(); - assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null"); + Object jlObject_jlM = jlObject.getModule(); + assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null"); // Create a customer class loader to load class p4/c4. URL[] urls = new URL[] { CLASSES_DIR.toUri().toURL() }; diff --git a/hotspot/test/runtime/modules/ExportTwice.java b/hotspot/test/runtime/modules/ExportTwice.java index 538c65926c0..abdad3a7822 100644 --- a/hotspot/test/runtime/modules/ExportTwice.java +++ b/hotspot/test/runtime/modules/ExportTwice.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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,13 +28,12 @@ * @compile p2/c2.java * @compile p1/c1.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI ExportTwice */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; public class ExportTwice { @@ -44,49 +43,49 @@ public class ExportTwice { // Also, check that a package can be exported to a specific package and then // exported unqualifiedly. public static void main(String args[]) throws Throwable { - Object m1, m2, m3; + Object m1x, m2x, m3x; - // Get the java.lang.reflect.Module object for module java.base. + // Get the java.lang.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); - Object jlObject_jlrM = jlObject.getModule(); - assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null"); + Object jlObject_jlM = jlObject.getModule(); + assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null"); // Get the class loader for ExportTwice and assume it's also used to // load classes p1.c1 and p2.c2. ClassLoader this_cldr = ExportTwice.class.getClassLoader(); // Define a module for p1. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p1" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/here", new String[] { "p1" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlM); // Define a module for p3. - m3 = ModuleHelper.ModuleObject("module3", this_cldr, new String[] { "p3" }); - assertNotNull(m3, "Module should not be null"); - ModuleHelper.DefineModule(m3, "9.0", "m3/there", new String[] { "p3" }); - ModuleHelper.AddReadsModule(m3, jlObject_jlrM); + m3x = ModuleHelper.ModuleObject("module_three", this_cldr, new String[] { "p3" }); + assertNotNull(m3x, "Module should not be null"); + ModuleHelper.DefineModule(m3x, "9.0", "m3x/there", new String[] { "p3" }); + ModuleHelper.AddReadsModule(m3x, jlObject_jlM); - // Make package p1 in m1 visible to everyone. - ModuleHelper.AddModuleExportsToAll(m1, "p1"); + // Make package p1 in m1x visible to everyone. + ModuleHelper.AddModuleExportsToAll(m1x, "p1"); - // Try to export p1 only to m2 after it was exported unqualifiedly. It + // Try to export p1 only to m2x after it was exported unqualifiedly. It // should silently succeed. - ModuleHelper.AddModuleExports(m1, "p1", m2); + ModuleHelper.AddModuleExports(m1x, "p1", m2x); - // Export p2 to m3 then export it again unqualifiedly. - ModuleHelper.AddModuleExports(m2, "p2", m3); - ModuleHelper.AddModuleExportsToAll(m2, "p2"); + // Export p2 to m3x then export it again unqualifiedly. + ModuleHelper.AddModuleExports(m2x, "p2", m3x); + ModuleHelper.AddModuleExportsToAll(m2x, "p2"); // p1.c1's ctor tries to call a method in p2.c2. This should work because // p1's module can read p2's module and p2 is now exported unqualifiedly. - ModuleHelper.AddReadsModule(m1, m2); + ModuleHelper.AddReadsModule(m1x, m2x); Class p1_c1_class = Class.forName("p1.c1"); p1_c1_class.newInstance(); } diff --git a/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java b/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java index e3748530fa7..0d7b2f60e14 100644 --- a/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java +++ b/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -44,7 +44,7 @@ public class IgnoreModulePropertiesTest { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "-D" + prop + "=" + value, "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldContain("java version "); + output.shouldContain(" version "); output.shouldHaveExitValue(0); // Ensure that the property and its value aren't available. @@ -67,8 +67,8 @@ public class IgnoreModulePropertiesTest { } public static void main(String[] args) throws Exception { - testOption("--add-modules", "java.sqlx", "jdk.module.addmods.0", "java.lang.module.ResolutionException"); - testOption("--limit-modules", "java.sqlx", "jdk.module.limitmods", "java.lang.module.ResolutionException"); + testOption("--add-modules", "java.sqlx", "jdk.module.addmods.0", "java.lang.module.FindException"); + testOption("--limit-modules", "java.sqlx", "jdk.module.limitmods", "java.lang.module.FindException"); testOption("--add-reads", "xyzz=yyzd", "jdk.module.addreads.0", "WARNING: Unknown module: xyzz"); testOption("--add-exports", "java.base/xyzz=yyzd", "jdk.module.addexports.0", "WARNING: package xyzz not in java.base"); diff --git a/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java b/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java index 7a08787c696..71fba9816f2 100644 --- a/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java +++ b/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -30,37 +30,36 @@ * @build sun.hotspot.WhiteBox * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMAddModuleExportToAllUnnamed */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; public class JVMAddModuleExportToAllUnnamed { - // Check that a class in a package in module1 cannot access a class + // Check that a class in a package in module_one cannot access a class // that is in the unnamed module if the accessing package is strict. public static void main(String args[]) throws Throwable { - Object m1; + Object m1x; - // Get the java.lang.reflect.Module object for module java.base. + // Get the java.lang.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); - Object jlObject_jlrM = jlObject.getModule(); - assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null"); + Object jlObject_jlM = jlObject.getModule(); + assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null"); // Get the class loader for JVMAddModuleExportToAllUnnamed and assume it's also used to // load class p1.c1. ClassLoader this_cldr = JVMAddModuleExportToAllUnnamed.class.getClassLoader(); // Define a module for p1. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p1" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/here", new String[] { "p1" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlM); - // Make package p1 in m1 visible to everyone. - ModuleHelper.AddModuleExportsToAll(m1, "p1"); + // Make package p1 in m1x visible to everyone. + ModuleHelper.AddModuleExportsToAll(m1x, "p1"); // p1.c1's ctor tries to call a method in p2.c2. This should not work // because p2 is in the unnamed module and p1.c1 is strict. diff --git a/hotspot/test/runtime/modules/JVMAddModuleExports.java b/hotspot/test/runtime/modules/JVMAddModuleExports.java index 689523639f4..da839829610 100644 --- a/hotspot/test/runtime/modules/JVMAddModuleExports.java +++ b/hotspot/test/runtime/modules/JVMAddModuleExports.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -26,13 +26,12 @@ * @modules java.base/jdk.internal.misc * @library /test/lib .. * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMAddModuleExports */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; public class JVMAddModuleExports { @@ -42,12 +41,12 @@ public class JVMAddModuleExports { MyClassLoader to_cl = new MyClassLoader(); Module from_module, to_module; - from_module = ModuleHelper.ModuleObject("from_module", from_cl, new String[] { "mypackage", "this/package" }); + from_module = ModuleHelper.ModuleObject("from_module", from_cl, new String[] { "mypackage", "x/apackage" }); assertNotNull(from_module, "Module should not be null"); - ModuleHelper.DefineModule(from_module, "9.0", "from_module/here", new String[] { "mypackage", "this/package" }); - to_module = ModuleHelper.ModuleObject("to_module", to_cl, new String[] { "yourpackage", "that/package" }); + ModuleHelper.DefineModule(from_module, "9.0", "from_module/here", new String[] { "mypackage", "x/apackage" }); + to_module = ModuleHelper.ModuleObject("to_module", to_cl, new String[] { "yourpackage", "that/apackage" }); assertNotNull(to_module, "Module should not be null"); - ModuleHelper.DefineModule(to_module, "9.0", "to_module/here", new String[] { "yourpackage", "that/package" }); + ModuleHelper.DefineModule(to_module, "9.0", "to_module/here", new String[] { "yourpackage", "that/apackage" }); // Null from_module argument, expect an NPE try { @@ -118,19 +117,19 @@ public class JVMAddModuleExports { // Export a package, that is not in from_module, to from_module try { - ModuleHelper.AddModuleExports(from_module, "that/package", from_module); + ModuleHelper.AddModuleExports(from_module, "that/apackage", from_module); throw new RuntimeException("Failed to get the expected IAE"); } catch(IllegalArgumentException e) { // Expected } // Export the same package twice to the same module - ModuleHelper.AddModuleExports(from_module, "this/package", to_module); - ModuleHelper.AddModuleExports(from_module, "this/package", to_module); + ModuleHelper.AddModuleExports(from_module, "x/apackage", to_module); + ModuleHelper.AddModuleExports(from_module, "x/apackage", to_module); // Export a package, using '.' instead of '/' try { - ModuleHelper.AddModuleExports(from_module, "this.package", to_module); + ModuleHelper.AddModuleExports(from_module, "x.apackage", to_module); throw new RuntimeException("Failed to get the expected IAE"); } catch(IllegalArgumentException e) { // Expected @@ -138,8 +137,8 @@ public class JVMAddModuleExports { // Export a package to the unnamed module and then to a specific module. // The qualified export should be ignored. - ModuleHelper.AddModuleExportsToAll(to_module, "that/package"); - ModuleHelper.AddModuleExports(to_module, "that/package", from_module); + ModuleHelper.AddModuleExportsToAll(to_module, "that/apackage"); + ModuleHelper.AddModuleExports(to_module, "that/apackage", from_module); } static class MyClassLoader extends ClassLoader { } diff --git a/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java b/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java index 80db658a99d..f6499644b48 100644 --- a/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java +++ b/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -21,7 +21,6 @@ * questions. */ -import java.lang.reflect.Module; import static jdk.test.lib.Asserts.*; /* @@ -31,7 +30,7 @@ import static jdk.test.lib.Asserts.*; * @compile p2/c2.java * @compile p1/c1.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMAddModuleExportsToAll @@ -43,28 +42,28 @@ public class JVMAddModuleExportsToAll { // and then test that a class in the unnamed module can access a package in // a named module that has been exported unqualifiedly. public static void main(String args[]) throws Throwable { - Object m1, m2, m3; + Object m1x, m2x, m3x; - // Get the java.lang.reflect.Module object for module java.base. + // Get the java.lang.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); - Object jlObject_jlrM = jlObject.getModule(); - assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null"); + Object jlObject_jlM = jlObject.getModule(); + assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null"); // Get the class loader for JVMAddModuleExportsToAll and assume it's also used to // load class p2.c2. ClassLoader this_cldr = JVMAddModuleExportsToAll.class.getClassLoader(); // Define a module for p3. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p3" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/there", new String[] { "p3" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p3" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/there", new String[] { "p3" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlM); try { ModuleHelper.AddModuleExportsToAll((Module)null, "p2"); @@ -74,13 +73,13 @@ public class JVMAddModuleExportsToAll { } try { - ModuleHelper.AddModuleExportsToAll(m2, null); + ModuleHelper.AddModuleExportsToAll(m2x, null); throw new RuntimeException("Failed to get the expected NPE for null package"); } catch(NullPointerException e) { // Expected } - try { // Expect IAE when passing a ClassLoader object instead of a java.lang.reflect.Module object. + try { // Expect IAE when passing a ClassLoader object instead of a java.lang.Module object. ModuleHelper.AddModuleExportsToAll(this_cldr, "p2"); throw new RuntimeException("Failed to get the expected IAE for bad module"); } catch(IllegalArgumentException e) { @@ -88,26 +87,26 @@ public class JVMAddModuleExportsToAll { } try { - ModuleHelper.AddModuleExportsToAll(m2, "p3"); + ModuleHelper.AddModuleExportsToAll(m2x, "p3"); throw new RuntimeException("Failed to get the expected IAE for package that is in another module"); } catch(IllegalArgumentException e) { // Expected } try { - ModuleHelper.AddModuleExportsToAll(m2, "p4"); + ModuleHelper.AddModuleExportsToAll(m2x, "p4"); throw new RuntimeException("Failed to get the expected IAE for package not in any module"); } catch(IllegalArgumentException e) { // Expected } - // Export package p2 in m2 unqualifiedly. Then, do a qualified export - // of p2 in m2 to m3. This should not affect the unqualified export. - m3 = ModuleHelper.ModuleObject("module3", this_cldr, new String[] { "p4" }); - assertNotNull(m3, "Module m3 should not be null"); - ModuleHelper.DefineModule(m3, "9.0", "m3/there", new String[] { "p4" }); - ModuleHelper.AddModuleExportsToAll(m2, "p2"); - ModuleHelper.AddModuleExports(m2, "p2", m3); + // Export package p2 in m2x unqualifiedly. Then, do a qualified export + // of p2 in m2x to m3x. This should not affect the unqualified export. + m3x = ModuleHelper.ModuleObject("module_three", this_cldr, new String[] { "p4" }); + assertNotNull(m3x, "Module m3x should not be null"); + ModuleHelper.DefineModule(m3x, "9.0", "m3x/there", new String[] { "p4" }); + ModuleHelper.AddModuleExportsToAll(m2x, "p2"); + ModuleHelper.AddModuleExports(m2x, "p2", m3x); // p1.c1's ctor tries to call a method in p2.c2. This should succeed because // p1 is in an unnamed module and p2.c2 is exported unqualifiedly. diff --git a/hotspot/test/runtime/modules/JVMAddModulePackage.java b/hotspot/test/runtime/modules/JVMAddModulePackage.java deleted file mode 100644 index 3f7f2fd29a0..00000000000 --- a/hotspot/test/runtime/modules/JVMAddModulePackage.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @modules java.base/jdk.internal.misc - * @library /test/lib .. - * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java - * @run main ClassFileInstaller sun.hotspot.WhiteBox - * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMAddModulePackage - */ - -import static jdk.test.lib.Asserts.*; -import java.sql.Time; - -public class JVMAddModulePackage { - - public static void main(String args[]) throws Throwable { - MyClassLoader cl1 = new MyClassLoader(); - MyClassLoader cl3 = new MyClassLoader(); - Object module1, module2, module3; - boolean result; - - module1 = ModuleHelper.ModuleObject("module1", cl1, new String[] { "mypackage" }); - assertNotNull(module1, "Module should not be null"); - ModuleHelper.DefineModule(module1, "9.0", "module1/here", new String[] { "mypackage" }); - module2 = ModuleHelper.ModuleObject("module2", cl1, new String[] { "yourpackage" }); - assertNotNull(module2, "Module should not be null"); - ModuleHelper.DefineModule(module2, "9.0", "module2/here", new String[] { "yourpackage" }); - module3 = ModuleHelper.ModuleObject("module3", cl3, new String[] { "package/num3" }); - assertNotNull(module3, "Module should not be null"); - ModuleHelper.DefineModule(module3, "9.0", "module3/here", new String[] { "package/num3" }); - - // Simple call - ModuleHelper.AddModulePackage(module1, "new_package"); - - // Add a package and export it - ModuleHelper.AddModulePackage(module1, "package/num3"); - ModuleHelper.AddModuleExportsToAll(module1, "package/num3"); - - // Null module argument, expect an NPE - try { - ModuleHelper.AddModulePackage(null, "new_package"); - throw new RuntimeException("Failed to get the expected NPE"); - } catch(NullPointerException e) { - // Expected - } - - // Bad module argument, expect an IAE - try { - ModuleHelper.AddModulePackage(cl1, "new_package"); - throw new RuntimeException("Failed to get the expected IAE"); - } catch(IllegalArgumentException e) { - // Expected - } - - // Null package argument, expect an NPE - try { - ModuleHelper.AddModulePackage(module1, null); - throw new RuntimeException("Failed to get the expected NPE"); - } catch(NullPointerException e) { - // Expected - } - - // Existing package, expect an ISE - try { - ModuleHelper.AddModulePackage(module1, "yourpackage"); - throw new RuntimeException("Failed to get the expected ISE"); - } catch(IllegalStateException e) { - // Expected - } - - // Invalid package name, expect an IAE - try { - ModuleHelper.AddModulePackage(module1, "your.package"); - throw new RuntimeException("Failed to get the expected IAE"); - } catch(IllegalArgumentException e) { - // Expected - } - - // Invalid package name, expect an IAE - try { - ModuleHelper.AddModulePackage(module1, ";your/package"); - throw new RuntimeException("Failed to get the expected IAE"); - } catch(IllegalArgumentException e) { - // Expected - } - - // Invalid package name, expect an IAE - try { - ModuleHelper.AddModulePackage(module1, "7[743"); - throw new RuntimeException("Failed to get the expected IAE"); - } catch(IllegalArgumentException e) { - // Expected - } - - // Empty package name, expect an IAE - try { - ModuleHelper.AddModulePackage(module1, ""); - throw new RuntimeException("Failed to get the expected IAE"); - } catch(IllegalArgumentException e) { - // Expected - } - - // Add package named "java" to an module defined to a class loader other than the boot or platform loader. - try { - // module1 is defined to a MyClassLoader class loader. - ModuleHelper.AddModulePackage(module1, "java/foo"); - throw new RuntimeException("Failed to get the expected IAE"); - } catch(IllegalArgumentException e) { - if (!e.getMessage().contains("prohibited package name")) { - throw new RuntimeException("Failed to get expected IAE message for prohibited package name: " + e.getMessage()); - } - } - - // Package "javabar" should be ok - ModuleHelper.AddModulePackage(module1, "javabar"); - - // Package named "java" defined to the boot class loader, should be ok - Object module_javabase = module1.getClass().getModule(); - ModuleHelper.AddModulePackage(module_javabase, "java/foo"); - - // Package named "java" defined to the platform class loader, should be ok - // The module java.sql is defined to the platform class loader. - java.sql.Time jst = new java.sql.Time(45000); // milliseconds - Object module_javasql = jst.getClass().getModule(); - ModuleHelper.AddModulePackage(module_javasql, "java/foo"); - } - - static class MyClassLoader extends ClassLoader { } -} - diff --git a/hotspot/test/runtime/modules/JVMAddReadsModule.java b/hotspot/test/runtime/modules/JVMAddReadsModule.java index a25bcfc64f6..bf0b838403e 100644 --- a/hotspot/test/runtime/modules/JVMAddReadsModule.java +++ b/hotspot/test/runtime/modules/JVMAddReadsModule.java @@ -26,7 +26,7 @@ * @modules java.base/jdk.internal.misc * @library /test/lib .. * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMAddReadsModule diff --git a/hotspot/test/runtime/modules/JVMDefineModule.java b/hotspot/test/runtime/modules/JVMDefineModule.java index 9e44878490d..3c40f026100 100644 --- a/hotspot/test/runtime/modules/JVMDefineModule.java +++ b/hotspot/test/runtime/modules/JVMDefineModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -26,7 +26,7 @@ * @modules java.base/jdk.internal.misc * @library /test/lib .. * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMDefineModule @@ -49,7 +49,7 @@ public class JVMDefineModule { /* Invalid test, won't compile. // Invalid classloader argument, expect an IAE try { - m = ModuleHelper.ModuleObject("mymodule1", new Object(), new String[] { "mypackage1" }); + m = ModuleHelper.ModuleObject("mymodule_one", new Object(), new String[] { "mypackage1" }); ModuleHelper.DefineModule(m, "9.0", "mymodule/here", new String[] { "mypackage1" }); throw new RuntimeException("Failed to get expected IAE for bad loader"); } catch(IllegalArgumentException e) { @@ -78,7 +78,7 @@ public class JVMDefineModule { ModuleHelper.DefineModule(new Object(), "9.0", "mymodule/here", new String[] { "mypackage1" }); throw new RuntimeException("Failed to get expected IAE or NPE for bad module"); } catch(IllegalArgumentException e) { - if (!e.getMessage().contains("module is not an instance of type java.lang.reflect.Module")) { + if (!e.getMessage().contains("module is not an instance of type java.lang.Module")) { throw new RuntimeException("Failed to get expected IAE message for bad module: " + e.getMessage()); } } @@ -207,10 +207,10 @@ public class JVMDefineModule { ModuleHelper.DefineModule(m, "9.0", "module.name/here", new String[] { }); // Invalid package name, expect an IAE - m = ModuleHelper.ModuleObject("moduleFive", cl, new String[] { "your.package" }); + m = ModuleHelper.ModuleObject("moduleFive", cl, new String[] { "your.apackage" }); try { - ModuleHelper.DefineModule(m, "9.0", "module.name/here", new String[] { "your.package" }); - throw new RuntimeException("Failed to get expected IAE for your.package"); + ModuleHelper.DefineModule(m, "9.0", "module.name/here", new String[] { "your.apackage" }); + throw new RuntimeException("Failed to get expected IAE for your.apackage"); } catch(IllegalArgumentException e) { if (!e.getMessage().contains("Invalid package name")) { throw new RuntimeException("Failed to get expected IAE message for bad package name: " + e.getMessage()); @@ -220,8 +220,8 @@ public class JVMDefineModule { // Invalid package name, expect an IAE m = ModuleHelper.ModuleObject("moduleSix", cl, new String[] { "foo" }); // Name irrelevant try { - ModuleHelper.DefineModule(m, "9.0", "module.name/here", new String[] { ";your/package" }); - throw new RuntimeException("Failed to get expected IAE for ;your.package"); + ModuleHelper.DefineModule(m, "9.0", "module.name/here", new String[] { ";your/apackage" }); + throw new RuntimeException("Failed to get expected IAE for ;your.apackage"); } catch(IllegalArgumentException e) { if (!e.getMessage().contains("Invalid package name")) { throw new RuntimeException("Failed to get expected IAE message for bad package name: " + e.getMessage()); diff --git a/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java b/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java index 1f58193c676..da3224826eb 100644 --- a/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java +++ b/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -27,7 +27,7 @@ * @library /test/lib .. * @compile p2/c2.java * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMGetModuleByPkgName @@ -35,7 +35,6 @@ import static jdk.test.lib.Asserts.*; import java.lang.ClassLoader; -import java.lang.reflect.Module; public class JVMGetModuleByPkgName { @@ -79,10 +78,10 @@ public class JVMGetModuleByPkgName { } MyClassLoader cl1 = new MyClassLoader(); - Module module1 = (Module)ModuleHelper.ModuleObject("module1", cl1, new String[] { "mypackage" }); - assertNotNull(module1, "Module should not be null"); - ModuleHelper.DefineModule(module1, "9.0", "module1/here", new String[] { "mypackage" }); - if (ModuleHelper.GetModuleByPackageName(cl1, "mypackage") != module1) { + Module module_one = (Module)ModuleHelper.ModuleObject("module_one", cl1, new String[] { "mypackage" }); + assertNotNull(module_one, "Module should not be null"); + ModuleHelper.DefineModule(module_one, "9.0", "module_one/here", new String[] { "mypackage" }); + if (ModuleHelper.GetModuleByPackageName(cl1, "mypackage") != module_one) { throw new RuntimeException("Wrong module returned for cl1 mypackage"); } } diff --git a/hotspot/test/runtime/modules/LoadUnloadModuleStress.java b/hotspot/test/runtime/modules/LoadUnloadModuleStress.java index 1f27ba9b432..20cde3a5f60 100644 --- a/hotspot/test/runtime/modules/LoadUnloadModuleStress.java +++ b/hotspot/test/runtime/modules/LoadUnloadModuleStress.java @@ -27,7 +27,7 @@ * @modules java.base/jdk.internal.misc * @library /test/lib .. * @build sun.hotspot.WhiteBox - * @compile/module=java.base java/lang/reflect/ModuleHelper.java + * @compile/module=java.base java/lang/ModuleHelper.java * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx64m -Xmx64m LoadUnloadModuleStress 15000 diff --git a/hotspot/test/runtime/modules/ModuleHelper.java b/hotspot/test/runtime/modules/ModuleHelper.java index 2f0d7f6ec11..584eb3e3c88 100644 --- a/hotspot/test/runtime/modules/ModuleHelper.java +++ b/hotspot/test/runtime/modules/ModuleHelper.java @@ -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 @@ -23,7 +23,6 @@ import java.net.URI; import java.lang.module.ModuleDescriptor; -import java.lang.reflect.Module; import java.util.Collections; import java.util.HashSet; import java.util.Set; @@ -41,19 +40,13 @@ public class ModuleHelper { public static void AddModuleExports(Object from, String pkg, Object to) throws Throwable { WhiteBox wb = WhiteBox.getWhiteBox(); wb.AddModuleExports(from, pkg, to); - java.lang.reflect.ModuleHelper.addExportsNoSync((Module)from, pkg, (Module)to); + java.lang.ModuleHelper.addExportsNoSync((Module)from, pkg, (Module)to); } public static void AddReadsModule(Object from, Object to) throws Throwable { WhiteBox wb = WhiteBox.getWhiteBox(); wb.AddReadsModule(from, to); - java.lang.reflect.ModuleHelper.addReadsNoSync((Module)from, (Module)to); - } - - public static void AddModulePackage(Object m, String pkg) throws Throwable { - WhiteBox wb = WhiteBox.getWhiteBox(); - wb.AddModulePackage(m, pkg); - java.lang.reflect.ModuleHelper.addPackageNoSync((Module)m, pkg); + java.lang.ModuleHelper.addReadsNoSync((Module)from, (Module)to); } public static Module GetModuleByPackageName(Object ldr, String pkg) throws Throwable { @@ -64,13 +57,13 @@ public class ModuleHelper { public static void AddModuleExportsToAllUnnamed(Object m, String pkg) throws Throwable { WhiteBox wb = WhiteBox.getWhiteBox(); wb.AddModuleExportsToAllUnnamed(m, pkg); - //java.lang.reflect.ModuleHelper.addExportsToAllUnnamedNoSync((Module)m, pkg); + //java.lang.ModuleHelper.addExportsToAllUnnamedNoSync((Module)m, pkg); } public static void AddModuleExportsToAll(Object m, String pkg) throws Throwable { WhiteBox wb = WhiteBox.getWhiteBox(); wb.AddModuleExportsToAll(m, pkg); - java.lang.reflect.ModuleHelper.addExportsNoSync((Module)m, pkg, (Module)null); + java.lang.ModuleHelper.addExportsNoSync((Module)m, pkg, (Module)null); } public static Module ModuleObject(String name, ClassLoader loader, String[] pkgs) throws Throwable { @@ -84,10 +77,10 @@ public class ModuleHelper { } ModuleDescriptor descriptor = - ModuleDescriptor.module(name).contains(pkg_set).build(); + ModuleDescriptor.newModule(name).packages(pkg_set).build(); URI uri = URI.create("module:/" + name); - return java.lang.reflect.ModuleHelper.newModule(loader, descriptor); + return java.lang.ModuleHelper.newModule(loader, descriptor); } } diff --git a/hotspot/test/runtime/modules/ModuleOptionsTest.java b/hotspot/test/runtime/modules/ModuleOptionsTest.java index 28064bddc27..e526e06abe1 100644 --- a/hotspot/test/runtime/modules/ModuleOptionsTest.java +++ b/hotspot/test/runtime/modules/ModuleOptionsTest.java @@ -43,7 +43,7 @@ public class ModuleOptionsTest { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "--add-modules=i_dont_exist", "--add-modules=java.base", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldContain("ResolutionException"); + output.shouldContain("FindException"); output.shouldContain("i_dont_exist"); output.shouldHaveExitValue(1); diff --git a/hotspot/test/runtime/modules/ModuleStress/CustomSystemClassLoader.java b/hotspot/test/runtime/modules/ModuleStress/CustomSystemClassLoader.java index dca359f6458..643e4bfd547 100644 --- a/hotspot/test/runtime/modules/ModuleStress/CustomSystemClassLoader.java +++ b/hotspot/test/runtime/modules/ModuleStress/CustomSystemClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -22,7 +22,7 @@ */ /** - * A custom system ClassLoader to define the module "m2" to during iterations of + * A custom system ClassLoader to define the module "m2x" to during iterations of * differing test runs within the test ModuleStress.java */ public class CustomSystemClassLoader extends ClassLoader { diff --git a/hotspot/test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java b/hotspot/test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java index 79e56f2a457..772293f91a8 100644 --- a/hotspot/test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java +++ b/hotspot/test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,7 +25,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -35,79 +34,79 @@ import java.util.Map; import java.util.Set; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 -// Java System Class Loader --> defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 +// Java System Class Loader --> defines m3x --> packages p3 // -// m1 can read m2 -// package p2 in m2 is exported to m1 and m3 +// m1x can read m2x +// package p2 in m2x is exported to m1x and m3x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access allowed since m1 can read m2 and package p2 is exported to m1. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access allowed since m1x can read m2x and package p2 is exported to m1x. // public class ModuleNonBuiltinCLMain { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported to unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 - // Can read: java.base, m3 + // Define module: m2x + // Can read: java.base, m3x // Packages: p2 - // Packages exported: package p2 is exported to m1 and m3 + // Packages exported: package p2 is exported to m1x and m3x Set targets = new HashSet<>(); - targets.add("m1"); - targets.add("m3"); - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + targets.add("m1x"); + targets.add("m3x"); + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .requires("m3") + .requires("m3x") .exports("p2", targets) .build(); - // Define module: m3 + // Define module: m3x // Can read: java.base // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing user defined class loaders for this test Map map = new HashMap<>(); Loader1 cl1 = new Loader1(); Loader2 cl2 = new Loader2(); ClassLoader cl3 = ClassLoader.getSystemClassLoader(); - map.put("m1", cl1); - map.put("m2", cl2); - map.put("m3", cl3); + map.put("m1x", cl1); + map.put("m2x", cl2); + map.put("m3x", cl3); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == cl1); - assertTrue(layer.findLoader("m2") == cl2); - assertTrue(layer.findLoader("m3") == cl3); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); + assertTrue(layer.findLoader("m1x") == cl1); + assertTrue(layer.findLoader("m2x") == cl2); + assertTrue(layer.findLoader("m3x") == cl3); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -115,7 +114,7 @@ public class ModuleNonBuiltinCLMain { try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1"); + throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1x"); } } diff --git a/hotspot/test/runtime/modules/ModuleStress/ModuleSameCLMain.java b/hotspot/test/runtime/modules/ModuleStress/ModuleSameCLMain.java index cdbc9002405..1eab8308495 100644 --- a/hotspot/test/runtime/modules/ModuleStress/ModuleSameCLMain.java +++ b/hotspot/test/runtime/modules/ModuleStress/ModuleSameCLMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,7 +25,6 @@ import static jdk.test.lib.Asserts.*; -import java.lang.reflect.Layer; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -34,61 +33,61 @@ import java.util.Map; import java.util.Set; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader1 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader1 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported to m1 +// m1x can read m2x +// package p2 in m2x is exported to m1x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access allowed since m1 can read m2 and package p2 is exported to m1. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access allowed since m1x can read m2x and package p2 is exported to m1x. // public class ModuleSameCLMain { - // Create a Layer over the boot layer. + // Create a layer over the boot layer. // Define modules within this layer to test access between // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported to unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: package p2 is exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: package p2 is exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" - Configuration cf = Layer.boot() + // Resolves "m1x" + Configuration cf = ModuleLayer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); Loader1 cl1 = new Loader1(); - map.put("m1", cl1); - map.put("m2", cl1); + map.put("m1x", cl1); + map.put("m2x", cl1); - // Create Layer that contains m1 & m2 - Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == cl1); - assertTrue(layer.findLoader("m2") == cl1); + // Create layer that contains m1x & m2x + ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get); + assertTrue(layer.findLoader("m1x") == cl1); + assertTrue(layer.findLoader("m2x") == cl1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -96,7 +95,7 @@ public class ModuleSameCLMain { try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1"); + throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1x"); } } diff --git a/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java b/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java index 2da921d4d8c..bc6341aa9cb 100644 --- a/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java +++ b/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -38,8 +38,7 @@ import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.InMemoryJavaCompiler; -import java.io.File; +import jdk.test.lib.compiler.InMemoryJavaCompiler; public class ModuleStress { @@ -53,7 +52,7 @@ public class ModuleStress { // those loaders never die. ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "-Xbootclasspath/a:.", - "-Xlog:modules=trace", + "-Xlog:module=trace", "-version"); OutputAnalyzer oa = new OutputAnalyzer(pb.start()); @@ -83,12 +82,12 @@ public class ModuleStress { InMemoryJavaCompiler.compile("p1.c1", source1), System.getProperty("test.classes")); // Test #2: Load two modules defined to the same customer class loader. - // m1's module readability list and package p2's exportability should + // m1x's module readability list and package p2's exportability should // not be walked at a GC safepoint since both modules are defined to // the same loader and thus have the exact same life cycle. pb = ProcessTools.createJavaProcessBuilder( "-Xbootclasspath/a:.", - "-Xlog:modules=trace", + "-Xlog:module=trace", "ModuleSameCLMain"); oa = new OutputAnalyzer(pb.start()); @@ -97,35 +96,35 @@ public class ModuleStress { .shouldHaveExitValue(0); // Test #3: Load two modules in differing custom class loaders. - // m1's module readability list and package p2's exportability list must + // m1x's module readability list and package p2's exportability list must // be walked at a GC safepoint since both modules are defined to non-builtin // class loaders which could die and thus be unloaded. pb = ProcessTools.createJavaProcessBuilder( "-Xbootclasspath/a:.", - "-Xlog:modules=trace", + "-Xlog:module=trace", "ModuleNonBuiltinCLMain"); oa = new OutputAnalyzer(pb.start()); - oa.shouldContain("module m1 reads list must be walked") - .shouldContain("package p2 defined in module m2, exports list must be walked") - .shouldNotContain("module m2 reads list must be walked") + oa.shouldContain("module m1x reads list must be walked") + .shouldContain("package p2 defined in module m2x, exports list must be walked") + .shouldNotContain("module m2x reads list must be walked") .shouldHaveExitValue(0); // Test #4: Load two modules in differing custom class loaders, // of which one has been designated as the custom system class loader // via -Djava.system.class.loader=CustomSystemClassLoader. Since - // m3 is defined to the system class loader, m2's module readability + // m3x is defined to the system class loader, m2x's module readability // list does not have to be walked at a GC safepoint, but package p2's // exportability list does. pb = ProcessTools.createJavaProcessBuilder( "-Djava.system.class.loader=CustomSystemClassLoader", "-Xbootclasspath/a:.", - "-Xlog:modules=trace", + "-Xlog:module=trace", "ModuleNonBuiltinCLMain"); oa = new OutputAnalyzer(pb.start()); - oa.shouldContain("package p2 defined in module m2, exports list must be walked") - .shouldNotContain("module m2 reads list must be walked") + oa.shouldContain("package p2 defined in module m2x, exports list must be walked") + .shouldNotContain("module m2x reads list must be walked") .shouldHaveExitValue(0); } diff --git a/hotspot/test/runtime/modules/ModuleStress/ModuleStressGC.java b/hotspot/test/runtime/modules/ModuleStress/ModuleStressGC.java index 9db70d4b137..dacc0189280 100644 --- a/hotspot/test/runtime/modules/ModuleStress/ModuleStressGC.java +++ b/hotspot/test/runtime/modules/ModuleStress/ModuleStressGC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -73,7 +73,7 @@ public class ModuleStressGC { // test's, defined to module jdk.translet, export list at // GC safepoints. ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "-Xlog:modules=trace", + "-Xlog:module=trace", "-p", MODS_DIR.toString(), "-m", "jdk.test/test.MainGC"); OutputAnalyzer oa = new OutputAnalyzer(pb.start()); diff --git a/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java b/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java index 16e8dbc79e1..3c6c84794ab 100644 --- a/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java +++ b/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,9 +25,7 @@ package test; import java.lang.module.Configuration; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; import java.lang.reflect.Method; -import java.lang.reflect.Module; import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; @@ -44,11 +42,11 @@ public class Main { public static void main(String[] args) throws Exception { ModuleFinder finder = ModuleFinder.of(MODS_DIR); - Layer layerBoot = Layer.boot(); + ModuleLayer layerBoot = ModuleLayer.boot(); Configuration cf = layerBoot .configuration() - .resolveRequires(ModuleFinder.of(), finder, Set.of(MODULE_NAME)); + .resolve(ModuleFinder.of(), finder, Set.of(MODULE_NAME)); Module testModule = Main.class.getModule(); ClassLoader scl = ClassLoader.getSystemClassLoader(); @@ -58,7 +56,7 @@ public class Main { Callable task = new Callable() { @Override public Void call() throws Exception { - Layer layer = Layer.boot().defineModulesWithOneLoader(cf, scl); + ModuleLayer layer = ModuleLayer.boot().defineModulesWithOneLoader(cf, scl); Module transletModule = layer.findModule(MODULE_NAME).get(); testModule.addExports("test", transletModule); Class c = layer.findLoader(MODULE_NAME).loadClass("translet.Main"); diff --git a/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java b/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java index 25c121d3625..ddc4bdc4792 100644 --- a/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java +++ b/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,9 +25,7 @@ package test; import java.lang.module.Configuration; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; import java.lang.reflect.Method; -import java.lang.reflect.Module; import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; @@ -44,11 +42,11 @@ public class MainGC { public static void main(String[] args) throws Exception { ModuleFinder finder = ModuleFinder.of(MODS_DIR); - Layer layerBoot = Layer.boot(); + ModuleLayer layerBoot = ModuleLayer.boot(); Configuration cf = layerBoot .configuration() - .resolveRequires(ModuleFinder.of(), finder, Set.of(MODULE_NAME)); + .resolve(ModuleFinder.of(), finder, Set.of(MODULE_NAME)); Module testModule = MainGC.class.getModule(); ClassLoader scl = ClassLoader.getSystemClassLoader(); @@ -59,7 +57,7 @@ public class MainGC { Callable task = new Callable() { @Override public Void call() throws Exception { - Layer layer = Layer.boot().defineModulesWithOneLoader(cf, scl); + ModuleLayer layer = ModuleLayer.boot().defineModulesWithOneLoader(cf, scl); Module transletModule = layer.findModule(MODULE_NAME).get(); testModule.addExports("test", transletModule); testModule.addReads(transletModule); diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModule2Dirs.java b/hotspot/test/runtime/modules/PatchModule/PatchModule2Dirs.java index 5af477b5c30..4c49e6613ce 100644 --- a/hotspot/test/runtime/modules/PatchModule/PatchModule2Dirs.java +++ b/hotspot/test/runtime/modules/PatchModule/PatchModule2Dirs.java @@ -30,10 +30,9 @@ * @run main PatchModule2Dirs */ -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import java.io.File; public class PatchModule2Dirs { diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java index cd9a66e49ab..2ebc75ec2db 100644 --- a/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java +++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java @@ -31,8 +31,7 @@ * @run main PatchModuleCDS */ -import java.io.File; -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleClassList.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleClassList.java index e590e63a3fc..ec9776f20a8 100644 --- a/hotspot/test/runtime/modules/PatchModule/PatchModuleClassList.java +++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleClassList.java @@ -33,7 +33,7 @@ import java.nio.file.Files; import java.nio.file.Paths; -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java index f87a582d30a..75489a665fb 100644 --- a/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java +++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -38,8 +38,8 @@ public class PatchModuleDupModule { public static void main(String args[]) throws Exception { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "--patch-module=module1=module1_dir", - "--patch-module=module1=module1_dir", + "--patch-module=module_one=module_one_dir", + "--patch-module=module_one=module_one_dir", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldContain("java.lang.ExceptionInInitializerError"); diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleJavaBase.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleJavaBase.java index e43325703e9..e7fe2da1705 100644 --- a/hotspot/test/runtime/modules/PatchModule/PatchModuleJavaBase.java +++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleJavaBase.java @@ -31,7 +31,7 @@ * @run main PatchModuleJavaBase */ -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleTest.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleTest.java index a5eb563a230..d58ca4240ef 100644 --- a/hotspot/test/runtime/modules/PatchModule/PatchModuleTest.java +++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleTest.java @@ -31,7 +31,7 @@ * @run main PatchModuleTest */ -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJar.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJar.java index c7775c0c136..5979da68a5c 100644 --- a/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJar.java +++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJar.java @@ -31,7 +31,7 @@ * @run main PatchModuleTestJar */ -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJarDir.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJarDir.java index 18cc2597c2b..5c5a12e7c4b 100644 --- a/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJarDir.java +++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJarDir.java @@ -32,8 +32,8 @@ */ import java.io.File; -import java.nio.file.Files; -import jdk.test.lib.InMemoryJavaCompiler; + +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleTraceCL.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleTraceCL.java index 7dda4a51d55..d1255d61e68 100644 --- a/hotspot/test/runtime/modules/PatchModule/PatchModuleTraceCL.java +++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleTraceCL.java @@ -32,8 +32,7 @@ * @run main PatchModuleTraceCL */ -import java.io.File; -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff --git a/hotspot/test/runtime/modules/Visibility/PatchModuleVisibility.java b/hotspot/test/runtime/modules/Visibility/PatchModuleVisibility.java index 95fbce1b125..124fd7a5665 100644 --- a/hotspot/test/runtime/modules/Visibility/PatchModuleVisibility.java +++ b/hotspot/test/runtime/modules/Visibility/PatchModuleVisibility.java @@ -36,7 +36,7 @@ import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff --git a/hotspot/test/runtime/modules/Visibility/XbootcpNoVisibility.java b/hotspot/test/runtime/modules/Visibility/XbootcpNoVisibility.java index 5f56b2573eb..4ea90f03b2c 100644 --- a/hotspot/test/runtime/modules/Visibility/XbootcpNoVisibility.java +++ b/hotspot/test/runtime/modules/Visibility/XbootcpNoVisibility.java @@ -31,7 +31,7 @@ * @run main/othervm XbootcpNoVisibility */ -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; diff --git a/hotspot/test/runtime/modules/Visibility/XbootcpVisibility.java b/hotspot/test/runtime/modules/Visibility/XbootcpVisibility.java index 1530d8bed13..4b36695c29d 100644 --- a/hotspot/test/runtime/modules/Visibility/XbootcpVisibility.java +++ b/hotspot/test/runtime/modules/Visibility/XbootcpVisibility.java @@ -36,7 +36,7 @@ import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; diff --git a/hotspot/test/runtime/modules/acc_module.jcod b/hotspot/test/runtime/modules/acc_module.jcod index 573c7dde2a6..09b21bc0484 100644 --- a/hotspot/test/runtime/modules/acc_module.jcod +++ b/hotspot/test/runtime/modules/acc_module.jcod @@ -23,7 +23,8 @@ /* * This class consists of the following java code, but has an illegal class - * access_flags value of 0x8000, that should be ignored by the JVM. + * access_flags value of 0x8000, that should be ignored by the JVM because + * the class file version is < 53. * * public class acc_module { * public static void main(String[] args) { diff --git a/hotspot/test/runtime/modules/getModuleJNI/GetModule.java b/hotspot/test/runtime/modules/getModuleJNI/GetModule.java index 01d00648cd9..182632ac9e2 100644 --- a/hotspot/test/runtime/modules/getModuleJNI/GetModule.java +++ b/hotspot/test/runtime/modules/getModuleJNI/GetModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -26,7 +26,6 @@ * @run main/native GetModule */ -import java.lang.reflect.Module; import java.lang.management.LockInfo; public class GetModule { diff --git a/hotspot/test/runtime/modules/java.base/java/lang/reflect/ModuleHelper.java b/hotspot/test/runtime/modules/java.base/java/lang/ModuleHelper.java similarity index 81% rename from hotspot/test/runtime/modules/java.base/java/lang/reflect/ModuleHelper.java rename to hotspot/test/runtime/modules/java.base/java/lang/ModuleHelper.java index 19bbff48a76..f310a26f22f 100644 --- a/hotspot/test/runtime/modules/java.base/java/lang/reflect/ModuleHelper.java +++ b/hotspot/test/runtime/modules/java.base/java/lang/ModuleHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -21,14 +21,14 @@ * questions. */ -package java.lang.reflect; +package java.lang; import java.lang.module.ModuleDescriptor; /** - * A helper class intended to be injected into java.lang.reflect using the + * A helper class intended to be injected into java.lang using the * java --patch-module option. The helper class provides access to package private - * methods in java.lang.reflect.Module. + * methods in java.lang.Module. */ public final class ModuleHelper { @@ -56,14 +56,11 @@ public final class ModuleHelper { * {@code null} then the package is exported unconditionally. */ public static void addExportsNoSync(Module from, String pkg, Module to) { - from.implAddExportsNoSync(pkg, to); - } - - /** - * Adds a package to a module without notifying the VM. - */ - public static void addPackageNoSync(Module m, String pkg) { - m.implAddPackageNoSync(pkg); + if (to == null) { + from.implAddExportsNoSync(pkg); + } else { + from.implAddExportsNoSync(pkg, to); + } } } diff --git a/hotspot/test/serviceability/attach/AttachSetGetFlag.java b/hotspot/test/serviceability/attach/AttachSetGetFlag.java index 2d6a28cfce3..8ec530e19c3 100644 --- a/hotspot/test/serviceability/attach/AttachSetGetFlag.java +++ b/hotspot/test/serviceability/attach/AttachSetGetFlag.java @@ -80,7 +80,7 @@ public class AttachSetGetFlag { try { waitForReady(target); - int pid = (int)target.getPid(); + int pid = (int)target.pid(); HotSpotVirtualMachine vm = (HotSpotVirtualMachine)VirtualMachine.attach(((Integer)pid).toString()); @@ -116,7 +116,7 @@ public class AttachSetGetFlag { try { waitForReady(target); - int pid = (int)target.getPid(); + int pid = (int)target.pid(); HotSpotVirtualMachine vm = (HotSpotVirtualMachine)VirtualMachine.attach(((Integer)pid).toString()); diff --git a/hotspot/test/serviceability/jdwp/AllModulesCommandTest.java b/hotspot/test/serviceability/jdwp/AllModulesCommandTest.java index 92a2aa4e003..76a6aa4a3e3 100644 --- a/hotspot/test/serviceability/jdwp/AllModulesCommandTest.java +++ b/hotspot/test/serviceability/jdwp/AllModulesCommandTest.java @@ -32,7 +32,6 @@ import static jdk.test.lib.Asserts.assertTrue; * @test * @summary Tests the modules-related JDWP commands * @library /test/lib - * @ignore 8170541 * @modules jdk.jdwp.agent * @modules java.base/jdk.internal.misc * @compile AllModulesCommandTestDebuggee.java diff --git a/hotspot/test/serviceability/jdwp/AllModulesCommandTestDebuggee.java b/hotspot/test/serviceability/jdwp/AllModulesCommandTestDebuggee.java index 1b686ec9ae4..5c919f40c49 100644 --- a/hotspot/test/serviceability/jdwp/AllModulesCommandTestDebuggee.java +++ b/hotspot/test/serviceability/jdwp/AllModulesCommandTestDebuggee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -21,8 +21,6 @@ * questions. */ -import java.lang.reflect.Module; -import java.lang.reflect.Layer; import java.util.Set; import java.util.HashSet; @@ -35,10 +33,10 @@ public class AllModulesCommandTestDebuggee { public static void main(String[] args) throws InterruptedException { - int modCount = Layer.boot().modules().size(); + int modCount = ModuleLayer.boot().modules().size(); // Send all modules names via the process output - for (Module mod : Layer.boot().modules()) { + for (Module mod : ModuleLayer.boot().modules()) { String info = String.format("module %s", mod.getName()); write(info); } diff --git a/hotspot/test/serviceability/jvmti/AddModuleExportsAndOpens/MyPackage/AddModuleExportsAndOpensTest.java b/hotspot/test/serviceability/jvmti/AddModuleExportsAndOpens/MyPackage/AddModuleExportsAndOpensTest.java index 04446a6c87d..94da0f081d4 100644 --- a/hotspot/test/serviceability/jvmti/AddModuleExportsAndOpens/MyPackage/AddModuleExportsAndOpensTest.java +++ b/hotspot/test/serviceability/jvmti/AddModuleExportsAndOpens/MyPackage/AddModuleExportsAndOpensTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -31,7 +31,6 @@ package MyPackage; */ import java.io.PrintStream; -import java.lang.reflect.Module; public class AddModuleExportsAndOpensTest { diff --git a/hotspot/test/serviceability/jvmti/AddModuleExportsAndOpens/libAddModuleExportsAndOpensTest.c b/hotspot/test/serviceability/jvmti/AddModuleExportsAndOpens/libAddModuleExportsAndOpensTest.c index e028ee50c9c..b5ccf258659 100644 --- a/hotspot/test/serviceability/jvmti/AddModuleExportsAndOpens/libAddModuleExportsAndOpensTest.c +++ b/hotspot/test/serviceability/jvmti/AddModuleExportsAndOpens/libAddModuleExportsAndOpensTest.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -47,7 +47,7 @@ extern "C" { #define FAILED 2 static const char *EXC_CNAME = "java/lang/Exception"; -static const char* MOD_CNAME = "Ljava/lang/reflect/Module;"; +static const char* MOD_CNAME = "Ljava/lang/Module;"; static jvmtiEnv *jvmti = NULL; static jint result = PASSED; @@ -97,7 +97,7 @@ void throw_exc(JNIEnv *env, char *msg) { } static -jclass jlrM(JNIEnv *env) { +jclass jlM(JNIEnv *env) { jclass cls = NULL; cls = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env, MOD_CNAME)); @@ -127,7 +127,7 @@ jboolean is_exported(JNIEnv *env, jobject module, const char* pkg, jboolean open if (mIsExported == NULL) { const char* sign = "(Ljava/lang/String;)Z"; const char* name = open ? "isOpen" : "isExported"; - mIsExported = get_method(env, jlrM(env), name, sign); + mIsExported = get_method(env, jlM(env), name, sign); } jstr = JNI_ENV_PTR(env)->NewStringUTF(JNI_ENV_ARG(env, pkg)); res = JNI_ENV_PTR(env)->CallBooleanMethod(JNI_ENV_ARG(env, module), @@ -143,9 +143,9 @@ jboolean is_exported_to(JNIEnv *env, jobject module, const char* pkg, jobject to jboolean res = JNI_FALSE; if (mIsExportedTo == NULL) { - const char* sign = "(Ljava/lang/String;Ljava/lang/reflect/Module;)Z"; + const char* sign = "(Ljava/lang/String;Ljava/lang/Module;)Z"; const char* name = open ? "isOpen" : "isExported"; - mIsExportedTo = get_method(env, jlrM(env), name, sign); + mIsExportedTo = get_method(env, jlM(env), name, sign); } jstr = JNI_ENV_PTR(env)->NewStringUTF(JNI_ENV_ARG(env, pkg)); res = JNI_ENV_PTR(env)->CallBooleanMethod(JNI_ENV_ARG(env, module), diff --git a/hotspot/test/serviceability/jvmti/AddModuleReads/MyPackage/AddModuleReadsTest.java b/hotspot/test/serviceability/jvmti/AddModuleReads/MyPackage/AddModuleReadsTest.java index 940172af807..a3915f72920 100644 --- a/hotspot/test/serviceability/jvmti/AddModuleReads/MyPackage/AddModuleReadsTest.java +++ b/hotspot/test/serviceability/jvmti/AddModuleReads/MyPackage/AddModuleReadsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -32,7 +32,6 @@ package MyPackage; import java.io.PrintStream; import java.lang.instrument.Instrumentation; -import java.lang.reflect.Module; public class AddModuleReadsTest { diff --git a/hotspot/test/serviceability/jvmti/AddModuleReads/libAddModuleReadsTest.c b/hotspot/test/serviceability/jvmti/AddModuleReads/libAddModuleReadsTest.c index 4863a4aa5c9..be259ff4821 100644 --- a/hotspot/test/serviceability/jvmti/AddModuleReads/libAddModuleReadsTest.c +++ b/hotspot/test/serviceability/jvmti/AddModuleReads/libAddModuleReadsTest.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -47,7 +47,7 @@ extern "C" { #define FAILED 2 static const char *EXC_CNAME = "java/lang/Exception"; -static const char* MOD_CNAME = "Ljava/lang/reflect/Module;"; +static const char* MOD_CNAME = "Ljava/lang/Module;"; static jvmtiEnv *jvmti = NULL; static jint result = PASSED; @@ -96,7 +96,7 @@ void throw_exc(JNIEnv *env, char *msg) { } static -jclass jlrM(JNIEnv *env) { +jclass jlM(JNIEnv *env) { jclass cls = NULL; cls = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env, MOD_CNAME)); @@ -123,8 +123,8 @@ jboolean can_module_read(JNIEnv *env, jobject module, jobject to_module) { jboolean res = JNI_FALSE; if (mCanRead == NULL) { - const char* sign = "(Ljava/lang/reflect/Module;)Z"; - mCanRead = get_method(env, jlrM(env), "canRead", sign); + const char* sign = "(Ljava/lang/Module;)Z"; + mCanRead = get_method(env, jlM(env), "canRead", sign); } res = JNI_ENV_PTR(env)->CallBooleanMethod(JNI_ENV_ARG(env, module), mCanRead, to_module); diff --git a/hotspot/test/serviceability/jvmti/AddModuleUsesAndProvides/MyPackage/AddModuleUsesAndProvidesTest.java b/hotspot/test/serviceability/jvmti/AddModuleUsesAndProvides/MyPackage/AddModuleUsesAndProvidesTest.java index e6d9d57c01d..634b2eaf57c 100644 --- a/hotspot/test/serviceability/jvmti/AddModuleUsesAndProvides/MyPackage/AddModuleUsesAndProvidesTest.java +++ b/hotspot/test/serviceability/jvmti/AddModuleUsesAndProvides/MyPackage/AddModuleUsesAndProvidesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -34,7 +34,6 @@ package MyPackage; import java.io.PrintStream; import java.lang.TestProvider; -import java.lang.reflect.Module; public class AddModuleUsesAndProvidesTest { diff --git a/hotspot/test/serviceability/jvmti/AddModuleUsesAndProvides/libAddModuleUsesAndProvidesTest.c b/hotspot/test/serviceability/jvmti/AddModuleUsesAndProvides/libAddModuleUsesAndProvidesTest.c index 5ce1bf46d4f..86f9993c703 100644 --- a/hotspot/test/serviceability/jvmti/AddModuleUsesAndProvides/libAddModuleUsesAndProvidesTest.c +++ b/hotspot/test/serviceability/jvmti/AddModuleUsesAndProvides/libAddModuleUsesAndProvidesTest.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -47,7 +47,7 @@ extern "C" { #define FAILED 2 static const char *EXC_CNAME = "java/lang/Exception"; -static const char* MOD_CNAME = "Ljava/lang/reflect/Module;"; +static const char* MOD_CNAME = "Ljava/lang/Module;"; static jvmtiEnv *jvmti = NULL; static jint result = PASSED; @@ -97,7 +97,7 @@ void throw_exc(JNIEnv *env, char *msg) { } static -jclass jlrM(JNIEnv *env) { +jclass jlM(JNIEnv *env) { jclass cls = NULL; cls = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env, MOD_CNAME)); @@ -125,7 +125,7 @@ jboolean can_use_service(JNIEnv *env, jobject module, jclass service) { if (mCanUse == NULL) { const char* sign = "(Ljava/lang/Class;)Z"; - mCanUse = get_method(env, jlrM(env), "canUse", sign); + mCanUse = get_method(env, jlM(env), "canUse", sign); } res = JNI_ENV_PTR(env)->CallBooleanMethod(JNI_ENV_ARG(env, module), mCanUse, service); diff --git a/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java b/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java index 7c682b5dfa0..4b700ef0b09 100644 --- a/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java +++ b/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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,8 +28,6 @@ * @run main/othervm -agentlib:JvmtiGetAllModulesTest JvmtiGetAllModulesTest * */ -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.lang.module.ModuleReference; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReader; @@ -79,16 +77,15 @@ public class JvmtiGetAllModulesTest { final String MY_MODULE_NAME = "myModule"; // Verify that JVMTI reports exactly the same info as Java regarding the named modules - Asserts.assertEquals(Layer.boot().modules(), getModulesJVMTI()); + Asserts.assertEquals(ModuleLayer.boot().modules(), getModulesJVMTI()); // Load a new named module - ModuleDescriptor descriptor - = ModuleDescriptor.module(MY_MODULE_NAME).build(); + ModuleDescriptor descriptor = ModuleDescriptor.newModule(MY_MODULE_NAME).build(); ModuleFinder finder = finderOf(descriptor); ClassLoader loader = new ClassLoader() {}; - Configuration parent = Layer.boot().configuration(); - Configuration cf = parent.resolveRequires(finder, ModuleFinder.of(), Set.of(MY_MODULE_NAME)); - Layer my = Layer.boot().defineModules(cf, m -> loader); + Configuration parent = ModuleLayer.boot().configuration(); + Configuration cf = parent.resolve(finder, ModuleFinder.of(), Set.of(MY_MODULE_NAME)); + ModuleLayer my = ModuleLayer.boot().defineModules(cf, m -> loader); // Verify that the loaded module is indeed reported by JVMTI Set jvmtiModules = getModulesJVMTI(); diff --git a/hotspot/test/serviceability/jvmti/GetModulesInfo/libJvmtiGetAllModulesTest.c b/hotspot/test/serviceability/jvmti/GetModulesInfo/libJvmtiGetAllModulesTest.c index ed83d19784c..fcabaa4bfb9 100644 --- a/hotspot/test/serviceability/jvmti/GetModulesInfo/libJvmtiGetAllModulesTest.c +++ b/hotspot/test/serviceability/jvmti/GetModulesInfo/libJvmtiGetAllModulesTest.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -53,7 +53,7 @@ extern "C" { return NULL; } - array = (*env)->NewObjectArray(env, modules_count, (*env)->FindClass(env, "java/lang/reflect/Module"), NULL); + array = (*env)->NewObjectArray(env, modules_count, (*env)->FindClass(env, "java/lang/Module"), NULL); for (i = 0; i < modules_count; ++i) { (*env)->SetObjectArrayElement(env, array, i, modules_ptr[i]); diff --git a/hotspot/test/serviceability/jvmti/GetNamedModule/MyPackage/GetNamedModuleTest.java b/hotspot/test/serviceability/jvmti/GetNamedModule/MyPackage/GetNamedModuleTest.java index 80fab0a2ee5..6004b449263 100644 --- a/hotspot/test/serviceability/jvmti/GetNamedModule/MyPackage/GetNamedModuleTest.java +++ b/hotspot/test/serviceability/jvmti/GetNamedModule/MyPackage/GetNamedModuleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -26,6 +26,7 @@ package MyPackage; /** * @test * @summary Verifies the JVMTI GetNamedModule API + * @modules jdk.jdi * @compile GetNamedModuleTest.java * @run main/othervm/native -agentlib:GetNamedModuleTest MyPackage.GetNamedModuleTest */ diff --git a/hotspot/test/serviceability/jvmti/GetNamedModule/libGetNamedModuleTest.c b/hotspot/test/serviceability/jvmti/GetNamedModule/libGetNamedModuleTest.c index 6e9b0300232..307fab0f2b0 100644 --- a/hotspot/test/serviceability/jvmti/GetNamedModule/libGetNamedModuleTest.c +++ b/hotspot/test/serviceability/jvmti/GetNamedModule/libGetNamedModuleTest.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -47,7 +47,7 @@ extern "C" { #define FAILED 2 static const char *EXC_CNAME = "java/lang/Exception"; -static const char* MOD_CNAME = "Ljava/lang/reflect/Module;"; +static const char* MOD_CNAME = "Ljava/lang/Module;"; static jvmtiEnv *jvmti = NULL; static jint result = PASSED; @@ -115,7 +115,7 @@ jobject get_class_loader(jclass cls) { } static -jclass jlrM(JNIEnv *env) { +jclass jlM(JNIEnv *env) { jclass cls = NULL; cls = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env, MOD_CNAME)); @@ -142,7 +142,7 @@ jobject get_module_loader(JNIEnv *env, jobject module) { jobject loader = NULL; if (cl_method == NULL) { - cl_method = get_method(env, jlrM(env), "getClassLoader", "()Ljava/lang/ClassLoader;"); + cl_method = get_method(env, jlM(env), "getClassLoader", "()Ljava/lang/ClassLoader;"); } loader = (jobject)JNI_ENV_PTR(env)->CallObjectMethod(JNI_ENV_ARG(env, module), cl_method); return loader; @@ -157,7 +157,7 @@ const char* get_module_name(JNIEnv *env, jobject module) { const char *nstr = NULL; if (method == NULL) { - method = get_method(env, jlrM(env), "getName", "()Ljava/lang/String;"); + method = get_method(env, jlM(env), "getName", "()Ljava/lang/String;"); } jstr = (jstring)JNI_ENV_PTR(env)->CallObjectMethod(JNI_ENV_ARG(env, module), method); if (jstr != NULL) { @@ -183,7 +183,7 @@ jvmtiError get_module(JNIEnv *env, err = (*jvmti)->GetNamedModule(jvmti, loader, pkg_name, module_ptr); if (err != JVMTI_ERROR_NONE) { printf(" Error in GetNamedModule for package \"%s\": %s (%d)\n", - pkg_name, TranslateError(err), err); + name, TranslateError(err), err); return err; } printf(" returned module: %p\n", *module_ptr); diff --git a/jdk/test/demo/jvmti/HeapUser.java b/hotspot/test/serviceability/jvmti/IsModifiableModule/MyPackage/IsModifiableModuleTest.java similarity index 53% rename from jdk/test/demo/jvmti/HeapUser.java rename to hotspot/test/serviceability/jvmti/IsModifiableModule/MyPackage/IsModifiableModuleTest.java index ea99979dd69..376d9264851 100644 --- a/jdk/test/demo/jvmti/HeapUser.java +++ b/hotspot/test/serviceability/jvmti/IsModifiableModule/MyPackage/IsModifiableModuleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,52 +21,37 @@ * questions. */ +package MyPackage; -/* - * - * Sample target application - * +/** + * @test + * @summary Verifies the JVMTI IsModifiableModule API + * @modules jdk.jdi + * @compile IsModifiableModuleTest.java + * @run main/othervm/native -agentlib:IsModifiableModuleTest MyPackage.IsModifiableModuleTest */ -class Animal { - int category; - int age; -} +import java.io.PrintStream; -class Pet extends Animal { - String owner; - String name; - String vet; - String records; - String address; - Pet(String name) { this.name = name; } -} +public class IsModifiableModuleTest { -class Dog extends Pet { - int breed; - int barks; - Dog(String name) { super(name); } -} + static { + try { + System.loadLibrary("IsModifiableModuleTest"); + } catch (UnsatisfiedLinkError ule) { + System.err.println("Could not load IsModifiableModuleTest library"); + System.err.println("java.library.path: " + + System.getProperty("java.library.path")); + throw ule; + } + } -class Cat extends Pet { - int breed; - int claws; - Cat(String name) { super(name); } -} + native static int check(); -public class HeapUser { - private static Dog dogs[]; - private static Cat cats[]; public static void main(String args[]) { - System.out.println("HeapUser start, 101 dogs, 1000 cats"); - dogs = new Dog[101]; - for(int i=0; i<101; i++) { - dogs[i] = new Dog("fido " + i); + int status = check(); + if (status != 0) { + throw new RuntimeException("Non-zero status returned from the agent: " + status); } - cats = new Cat[1000]; - for(int i=0; i<1000; i++) { - cats[i] = new Cat("feefee " + i); - } - System.out.println("HeapUser end"); } } diff --git a/hotspot/test/serviceability/jvmti/IsModifiableModule/libIsModifiableModuleTest.c b/hotspot/test/serviceability/jvmti/IsModifiableModule/libIsModifiableModuleTest.c new file mode 100644 index 00000000000..2e35e0d5aca --- /dev/null +++ b/hotspot/test/serviceability/jvmti/IsModifiableModule/libIsModifiableModuleTest.c @@ -0,0 +1,215 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include +#include +#include "jvmti.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef JNI_ENV_ARG + +#ifdef __cplusplus +#define JNI_ENV_ARG(x, y) y +#define JNI_ENV_PTR(x) x +#else +#define JNI_ENV_ARG(x,y) x, y +#define JNI_ENV_PTR(x) (*x) +#endif + +#endif + +#define TranslateError(err) "JVMTI error" + +#define PASSED 0 +#define FAILED 2 + +static const char *EXC_CNAME = "java/lang/AssertionError"; + +static jvmtiEnv *jvmti = NULL; +static jint result = PASSED; +static jboolean printdump = JNI_FALSE; + +static jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved); + +JNIEXPORT +jint JNICALL Agent_OnLoad(JavaVM *jvm, char *options, void *reserved) { + return Agent_Initialize(jvm, options, reserved); +} + +JNIEXPORT +jint JNICALL Agent_OnAttach(JavaVM *jvm, char *options, void *reserved) { + return Agent_Initialize(jvm, options, reserved); +} + +JNIEXPORT +jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) { + return JNI_VERSION_1_8; +} + +static +jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { + jint res; + + if (options != NULL && strcmp(options, "printdump") == 0) { + printdump = JNI_TRUE; + } + + res = JNI_ENV_PTR(jvm)->GetEnv(JNI_ENV_ARG(jvm, (void **) &jvmti), + JVMTI_VERSION_9); + if (res != JNI_OK || jvmti == NULL) { + printf(" Error: wrong result of a valid call to GetEnv!\n"); + return JNI_ERR; + } + + return JNI_OK; +} + +static +jclass find_class(JNIEnv *env, const char* cname) { + jclass cls = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env, cname)); + + if (cls == NULL) { + printf("find_class: Error: FindClass(env, \"%s\") returned NULL\n", cname); + } + return cls; +} + +static +jint throw_exc(JNIEnv *env, char *msg) { + jclass exc_class = find_class(env, EXC_CNAME); + + if (exc_class == NULL) { + printf("throw_exc: Error in find_class(env, \"%s\")\n", EXC_CNAME); + return -1; + } + return JNI_ENV_PTR(env)->ThrowNew(JNI_ENV_ARG(env, exc_class), msg); +} + +static jobject get_module_by_class_name(JNIEnv *env, const char* cname) { + jobject module = NULL; + jclass cls = find_class(env, cname); + + printf(">>> getting module by class name: \"%s\"\n", cname); + if (cls == NULL) { + printf("get_module_by_class_name: Error in find_class(env, \"%s\")\n", cname); + return NULL; + } + module = JNI_ENV_PTR(env)->GetModule(JNI_ENV_ARG(env, cls)); + if (module == NULL) { + printf("get_module_by_class_name: Error in GetModule for class \"%s\"\n", cname); + } + return module; +} + +static +jint check_is_modifiable_error_codes(jobject module, jobject not_a_module) { + jvmtiError err = JVMTI_ERROR_NONE; + jboolean is_modifiable = JNI_FALSE; + + printf(">>> passing a bad module argument to JVMTI IsModifiableModule\n"); + err = (*jvmti)->IsModifiableModule(jvmti, not_a_module, &is_modifiable); + if (err != JVMTI_ERROR_INVALID_MODULE) { + printf(" Error #EC0: Did not get expected INVALID_MODULE error code from" + " IsModifiableModule: %s (%d)\n", TranslateError(err), err); + return FAILED; + } + printf(">>> passing NULL module argument to JVMTI IsModifiableModule\n"); + err = (*jvmti)->IsModifiableModule(jvmti, NULL, &is_modifiable); + if (err != JVMTI_ERROR_NULL_POINTER) { + printf(" Error #EC1: Did not get expected NULL_POINTER error code from" + " IsModifiableModule: %s (%d)\n", TranslateError(err), err); + return FAILED; + } + printf(">>> passing NULL status pointer to JVMTI IsModifiableModule\n"); + err = (*jvmti)->IsModifiableModule(jvmti, module, NULL); + if (err != JVMTI_ERROR_NULL_POINTER) { + printf(" Error #EC2: Did not get expected NULL_POINTER error code from" + " IsModifiableModule: %s (%d)\n", TranslateError(err), err); + return FAILED; + } + return PASSED; +} + +static +jint check_is_modifiable(jobject module) { + jvmtiError err = JVMTI_ERROR_NONE; + jboolean is_modifiable = JNI_FALSE; + + printf(">>> checking module %p is modifiable\n", module); + err = (*jvmti)->IsModifiableModule(jvmti, module, &is_modifiable); + if (err != JVMTI_ERROR_NONE) { + printf(" Error in IsModifiableModule for module %p: %s (%d)\n", + module, TranslateError(err), err); + return FAILED; + } + if (is_modifiable == JNI_FALSE) { + printf(" unexpected non-modifiable status for module: %p\n", module); + return FAILED; + } + return PASSED; +} + +JNIEXPORT jint JNICALL +Java_MyPackage_IsModifiableModuleTest_check(JNIEnv *env, jclass cls) { + jobject module = NULL; + + if (jvmti == NULL) { + throw_exc(env, "JVMTI client was not properly loaded!\n"); + return FAILED; + } + + printf("\n*** Testing IsModifiableModule ***\n\n"); + + if (check_is_modifiable_error_codes(module, cls) == FAILED) { + throw_exc(env, "check #MM0: failed to return expected error code from " + "a bad call to JVMTI IsModifiableModule"); + return FAILED; + } + + module = get_module_by_class_name(env, "java/lang/Class"); + if (check_is_modifiable(module) == FAILED) { + throw_exc(env, "check #MM1: failed to return modifiable module status"); + return FAILED; + } + + module = get_module_by_class_name(env, "com/sun/jdi/VirtualMachine"); + if (check_is_modifiable(module) == FAILED) { + throw_exc(env, "check #MM2: failed to return modifiable module status"); + return FAILED; + } + + module = get_module_by_class_name(env, "MyPackage/IsModifiableModuleTest"); + if (check_is_modifiable(module) == FAILED) { + throw_exc(env, "check #MM3: failed to return modifiable module status"); + return FAILED; + } + + return PASSED; +} + +#ifdef __cplusplus +} +#endif diff --git a/hotspot/test/serviceability/sa/LingeredAppWithInterface.java b/hotspot/test/serviceability/sa/LingeredAppWithInterface.java new file mode 100644 index 00000000000..4b65bf1f637 --- /dev/null +++ b/hotspot/test/serviceability/sa/LingeredAppWithInterface.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.test.lib.apps.LingeredApp; + +interface Language { + static final long nbrOfWords = 99999; + public abstract long getNbrOfWords(); +} + +class ParselTongue implements Language { + public long getNbrOfWords() { + return nbrOfWords * 4; + } +} + +public class LingeredAppWithInterface extends LingeredApp { + + public static void main(String args[]) { + ParselTongue lang = new ParselTongue(); + Language muggleSpeak = new Language() { + public long getNbrOfWords() { + return nbrOfWords * 8; + } + }; + + // Not tested at this point. The test needs to be enhanced + // later to test for the sizes of the Lambda MetaFactory + // generated anonymous classes too. (After JDK-8160228 gets + // fixed.) + Runnable r2 = () -> System.out.println("Hello world!"); + r2.run(); + + System.out.println(lang.getNbrOfWords() + muggleSpeak.getNbrOfWords()); + + LingeredApp.main(args); + } +} diff --git a/hotspot/test/serviceability/sa/LingeredAppWithLargeArray.java b/hotspot/test/serviceability/sa/LingeredAppWithLargeArray.java new file mode 100644 index 00000000000..44929f05b15 --- /dev/null +++ b/hotspot/test/serviceability/sa/LingeredAppWithLargeArray.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.test.lib.apps.LingeredApp; + +public class LingeredAppWithLargeArray extends LingeredApp { + public static void main(String args[]) { + int[] hugeArray = new int[Integer.MAX_VALUE/2]; + LingeredApp.main(args); + } + } diff --git a/hotspot/test/serviceability/sa/TestCpoolForInvokeDynamic.java b/hotspot/test/serviceability/sa/TestCpoolForInvokeDynamic.java index e8f1fd86703..901fbab83ef 100644 --- a/hotspot/test/serviceability/sa/TestCpoolForInvokeDynamic.java +++ b/hotspot/test/serviceability/sa/TestCpoolForInvokeDynamic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -51,7 +51,6 @@ import jdk.test.lib.Asserts; * jdk.hotspot.agent/sun.jvm.hotspot.oops * jdk.hotspot.agent/sun.jvm.hotspot.debugger * jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser - * @ignore 8169232 * @run main/othervm TestCpoolForInvokeDynamic */ diff --git a/hotspot/test/serviceability/sa/TestHeapDumpForLargeArray.java b/hotspot/test/serviceability/sa/TestHeapDumpForLargeArray.java new file mode 100644 index 00000000000..70f26fb48eb --- /dev/null +++ b/hotspot/test/serviceability/sa/TestHeapDumpForLargeArray.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.ArrayList; +import java.util.List; +import java.io.File; +import java.nio.file.Files; +import java.io.IOException; +import java.io.BufferedInputStream; +import java.util.stream.Collectors; +import java.io.FileInputStream; + +import sun.jvm.hotspot.HotSpotAgent; +import sun.jvm.hotspot.debugger.*; + +import jdk.test.lib.apps.LingeredApp; +import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.JDKToolFinder; +import jdk.test.lib.Platform; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.Utils; +import jdk.test.lib.Asserts; + +/* + * @test + * @library /test/lib + * @bug 8171084 + * @requires (vm.bits == "64" & os.maxMemory > 8g) + * @modules java.base/jdk.internal.misc + * jdk.hotspot.agent/sun.jvm.hotspot + * jdk.hotspot.agent/sun.jvm.hotspot.utilities + * jdk.hotspot.agent/sun.jvm.hotspot.oops + * jdk.hotspot.agent/sun.jvm.hotspot.debugger + * @run main/timeout=1800/othervm -Xmx8g TestHeapDumpForLargeArray + */ + +public class TestHeapDumpForLargeArray { + + private static LingeredAppWithLargeArray theApp = null; + + private static void attachAndDump(String heapDumpFileName, + long lingeredAppPid) throws Exception { + + JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jhsdb"); + launcher.addToolArg("jmap"); + launcher.addToolArg("--binaryheap"); + launcher.addToolArg("--dumpfile"); + launcher.addToolArg(heapDumpFileName); + launcher.addToolArg("--pid"); + launcher.addToolArg(Long.toString(lingeredAppPid)); + + ProcessBuilder processBuilder = new ProcessBuilder(); + processBuilder.command(launcher.getCommand()); + System.out.println( + processBuilder.command().stream().collect(Collectors.joining(" "))); + + OutputAnalyzer SAOutput = ProcessTools.executeProcess(processBuilder); + SAOutput.shouldHaveExitValue(0); + SAOutput.shouldNotContain("Heap segment size overflow"); + SAOutput.shouldContain("truncating to"); + SAOutput.shouldContain("heap written to"); + SAOutput.shouldContain(heapDumpFileName); + System.out.println(SAOutput.getOutput()); + + } + + public static void main (String... args) throws Exception { + + String heapDumpFileName = "LargeArrayHeapDump.bin"; + + if (!Platform.shouldSAAttach()) { + System.out.println( + "SA attach not expected to work - test skipped."); + return; + } + + File heapDumpFile = new File(heapDumpFileName); + if (heapDumpFile.exists()) { + heapDumpFile.delete(); + } + + try { + List vmArgs = new ArrayList(); + vmArgs.add("-XX:+UsePerfData"); + vmArgs.add("-Xmx8g"); + vmArgs.addAll(Utils.getVmOptions()); + + theApp = new LingeredAppWithLargeArray(); + LingeredApp.startApp(vmArgs, theApp); + attachAndDump(heapDumpFileName, theApp.getPid()); + } finally { + LingeredApp.stopApp(theApp); + heapDumpFile.delete(); + } + } +} diff --git a/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java b/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java index 5369c761073..d660249ecd2 100644 --- a/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java +++ b/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -21,11 +21,15 @@ * questions. */ +import java.util.ArrayList; +import java.util.List; + import sun.jvm.hotspot.HotSpotAgent; import sun.jvm.hotspot.utilities.SystemDictionaryHelper; import sun.jvm.hotspot.oops.InstanceKlass; import sun.jvm.hotspot.debugger.*; +import jdk.test.lib.apps.LingeredApp; import jdk.test.lib.JDKToolLauncher; import jdk.test.lib.JDKToolFinder; import jdk.test.lib.Platform; @@ -45,29 +49,20 @@ import jdk.test.lib.Asserts; * @run main/othervm TestInstanceKlassSizeForInterface */ -interface Language { - static final long nbrOfWords = 99999; - public abstract long getNbrOfWords(); -} - -class ParselTongue implements Language { - public long getNbrOfWords() { - return nbrOfWords * 4; - } -} - public class TestInstanceKlassSizeForInterface { - private static void SAInstanceKlassSize(int pid, + private static LingeredAppWithInterface theApp = null; + + private static void SAInstanceKlassSize(int lingeredAppPid, String[] instanceKlassNames) { HotSpotAgent agent = new HotSpotAgent(); try { - agent.attach((int)pid); + agent.attach(lingeredAppPid); } catch (DebuggerException e) { System.out.println(e.getMessage()); - System.err.println("Unable to connect to process ID: " + pid); + System.err.println("Unable to connect to process ID: " + lingeredAppPid); agent.detach(); e.printStackTrace(); @@ -98,11 +93,9 @@ public class TestInstanceKlassSizeForInterface { } private static void createAnotherToAttach( - String[] instanceKlassNames) throws Exception { + String[] instanceKlassNames, + int lingeredAppPid) throws Exception { - ProcessBuilder pb = new ProcessBuilder(); - - // Grab the pid from the current java process and pass it String[] toolArgs = { "--add-modules=jdk.hotspot.agent", "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED", @@ -110,23 +103,26 @@ public class TestInstanceKlassSizeForInterface { "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.oops=ALL-UNNAMED", "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.debugger=ALL-UNNAMED", "TestInstanceKlassSizeForInterface", - Long.toString(ProcessTools.getProcessId()) + Integer.toString(lingeredAppPid) }; + // Start a new process to attach to the LingeredApp process + ProcessBuilder processBuilder = ProcessTools + .createJavaProcessBuilder(toolArgs); + OutputAnalyzer SAOutput = ProcessTools.executeProcess(processBuilder); + SAOutput.shouldHaveExitValue(0); + System.out.println(SAOutput.getOutput()); + + // Run jcmd on the LingeredApp process + ProcessBuilder pb = new ProcessBuilder(); pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), - Long.toString(ProcessTools.getProcessId()), + Long.toString(lingeredAppPid), "GC.class_stats", "VTab,ITab,OopMap,KlassBytes" } ); - // Start a new process to attach to the current process - ProcessBuilder processBuilder = ProcessTools - .createJavaProcessBuilder(toolArgs); - OutputAnalyzer SAOutput = ProcessTools.executeProcess(processBuilder); - System.out.println(SAOutput.getOutput()); - OutputAnalyzer jcmdOutput = new OutputAnalyzer(pb.start()); System.out.println(jcmdOutput.getOutput()); @@ -153,7 +149,7 @@ public class TestInstanceKlassSizeForInterface { String[] instanceKlassNames = new String[] { "Language", "ParselTongue", - "TestInstanceKlassSizeForInterface$1" + "LingeredAppWithInterface$1" }; if (!Platform.shouldSAAttach()) { @@ -163,22 +159,17 @@ public class TestInstanceKlassSizeForInterface { } if (args == null || args.length == 0) { - ParselTongue lang = new ParselTongue(); + try { + List vmArgs = new ArrayList(); + vmArgs.addAll(Utils.getVmOptions()); - Language ventro = new Language() { - public long getNbrOfWords() { - return nbrOfWords * 8; - } - }; - - // Not tested at this point. The test needs to be enhanced - // later to test for the sizes of the Lambda MetaFactory - // generated anonymous classes too. (After JDK-8160228 gets - // fixed.) - Runnable r2 = () -> System.out.println("Hello world!"); - r2.run(); - - createAnotherToAttach(instanceKlassNames); + theApp = new LingeredAppWithInterface(); + LingeredApp.startApp(vmArgs, theApp); + createAnotherToAttach(instanceKlassNames, + (int)theApp.getPid()); + } finally { + LingeredApp.stopApp(theApp); + } } else { SAInstanceKlassSize(Integer.parseInt(args[0]), instanceKlassNames); } diff --git a/hotspot/test/serviceability/sa/TestPrintMdo.java b/hotspot/test/serviceability/sa/TestPrintMdo.java new file mode 100644 index 00000000000..48b0b0840b8 --- /dev/null +++ b/hotspot/test/serviceability/sa/TestPrintMdo.java @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.ArrayList; +import java.util.Scanner; +import java.util.List; +import java.io.File; +import java.io.IOException; +import java.util.stream.Collectors; +import java.io.OutputStream; +import jdk.test.lib.apps.LingeredApp; +import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.Platform; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.Utils; +import jdk.test.lib.Asserts; + +/* + * @test + * @library /test/lib + * @requires vm.flavor == "server" & !vm.emulatedClient & !(vm.opt.TieredStopAtLevel == 1) + * @build jdk.test.lib.apps.* + * @run main/othervm TestPrintMdo + */ + +public class TestPrintMdo { + + private static final String PRINTMDO_OUT_FILE = "printmdo_out.txt"; + + private static void verifyPrintMdoOutput() throws Exception { + + Exception unexpected = null; + File printMdoFile = new File(PRINTMDO_OUT_FILE); + Asserts.assertTrue(printMdoFile.exists() && printMdoFile.isFile(), + "File with printmdo output not created: " + + printMdoFile.getAbsolutePath()); + try { + Scanner scanner = new Scanner(printMdoFile); + + String unexpectedMsg = + "One or more of 'VirtualCallData', 'CounterData', " + + "'ReceiverTypeData', 'bci', 'MethodData' " + + "or 'java/lang/Object' not found"; + boolean knownClassFound = false; + boolean knownProfileDataTypeFound = false; + boolean knownTokensFound = false; + + while (scanner.hasNextLine()) { + String line = scanner.nextLine(); + line = line.trim(); + System.out.println(line); + + if (line.contains("missing reason for ")) { + unexpected = new RuntimeException("Unexpected msg: missing reason for "); + break; + } + if (line.contains("VirtualCallData") || + line.contains("CounterData") || + line.contains("ReceiverTypeData")) { + knownProfileDataTypeFound = true; + } + if (line.contains("bci") || + line.contains("MethodData")) { + knownTokensFound = true; + } + if (line.contains("java/lang/Object")) { + knownClassFound = true; + } + } + if ((knownClassFound == false) || + (knownTokensFound == false) || + (knownProfileDataTypeFound == false)) { + unexpected = new RuntimeException(unexpectedMsg); + } + if (unexpected != null) { + throw unexpected; + } + } catch (Exception ex) { + throw new RuntimeException("Test ERROR " + ex, ex); + } finally { + printMdoFile.delete(); + } + } + + private static void startClhsdbForPrintMdo(long lingeredAppPid) throws Exception { + + Process p; + JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jhsdb"); + launcher.addToolArg("clhsdb"); + launcher.addToolArg("--pid"); + launcher.addToolArg(Long.toString(lingeredAppPid)); + + ProcessBuilder pb = new ProcessBuilder(); + pb.command(launcher.getCommand()); + System.out.println( + pb.command().stream().collect(Collectors.joining(" "))); + + try { + p = pb.start(); + } catch (Exception attachE) { + throw new Error("Couldn't start jhsdb or attach to LingeredApp : " + attachE); + } + + // Issue the 'printmdo' input at the clhsdb prompt. + OutputStream input = p.getOutputStream(); + String str = "printmdo -a > " + PRINTMDO_OUT_FILE + "\nquit\n"; + try { + input.write(str.getBytes()); + input.flush(); + } catch (IOException ioe) { + throw new Error("Problem issuing the printmdo command: " + str, ioe); + } + + try { + p.waitFor(); + } catch (InterruptedException ie) { + throw new Error("Problem awaiting the child process: " + ie, ie); + } + + int exitValue = p.exitValue(); + if (exitValue != 0) { + String output; + try { + output = new OutputAnalyzer(p).getOutput(); + } catch (IOException ioe) { + throw new Error("Can't get failed clhsdb process output: " + ioe, ioe); + } + throw new AssertionError("clhsdb wasn't run successfully: " + output); + } + } + + public static void main (String... args) throws Exception { + + LingeredApp app = null; + + if (!Platform.shouldSAAttach()) { + System.out.println( + "SA attach not expected to work - test skipped."); + return; + } + + try { + List vmArgs = new ArrayList(); + vmArgs.add("-XX:+ProfileInterpreter"); + vmArgs.addAll(Utils.getVmOptions()); + + app = LingeredApp.startApp(vmArgs); + System.out.println ("Started LingeredApp with pid " + app.getPid()); + startClhsdbForPrintMdo(app.getPid()); + verifyPrintMdoOutput(); + } finally { + LingeredApp.stopApp(app); + } + } +} diff --git a/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java index 2a46621d118..50531949002 100644 --- a/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java +++ b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java @@ -53,7 +53,6 @@ import jdk.test.lib.process.ProcessTools; public class JMapHProfLargeHeapTest { private static final String HEAP_DUMP_FILE_NAME = "heap.bin"; - private static final String HPROF_HEADER_1_0_1 = "JAVA PROFILE 1.0.1"; private static final String HPROF_HEADER_1_0_2 = "JAVA PROFILE 1.0.2"; private static final long M = 1024L; private static final long G = 1024L * M; @@ -65,9 +64,7 @@ public class JMapHProfLargeHeapTest { } // All heap dumps should create 1.0.2 file format - // Hotspot internal heapdumper always use HPROF_HEADER_1_0_2 format, - // but SA heapdumper still use HPROF_HEADER_1_0_1 for small heaps - testHProfFileFormat("-Xmx1g", 22 * M, HPROF_HEADER_1_0_1); + testHProfFileFormat("-Xmx1g", 22 * M, HPROF_HEADER_1_0_2); /** * This test was deliberately commented out since the test system lacks diff --git a/hotspot/test/serviceability/sa/sadebugd/SADebugDTest.java b/hotspot/test/serviceability/sa/sadebugd/SADebugDTest.java index 80b45ecb6fd..0bbb42d4f58 100644 --- a/hotspot/test/serviceability/sa/sadebugd/SADebugDTest.java +++ b/hotspot/test/serviceability/sa/sadebugd/SADebugDTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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,7 @@ public class SADebugDTest { return; } - long ourPid = ProcessHandle.current().getPid(); + long ourPid = ProcessHandle.current().pid(); // The string we are expecting in the debugd ouput String golden = String.format(GOLDEN, ourPid); diff --git a/hotspot/test/serviceability/tmtools/jstack/DaemonThreadTest.java b/hotspot/test/serviceability/tmtools/jstack/DaemonThreadTest.java index 23bba681fc1..29251d80378 100644 --- a/hotspot/test/serviceability/tmtools/jstack/DaemonThreadTest.java +++ b/hotspot/test/serviceability/tmtools/jstack/DaemonThreadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -78,7 +78,7 @@ public class DaemonThreadTest { thread.start(); // Run jstack tool and collect the output - JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid()); + JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid()); ToolResults results = jstackTool.measure(); // Analyze the jstack output for the correct thread type diff --git a/hotspot/test/serviceability/tmtools/jstack/SpreadLockTest.java b/hotspot/test/serviceability/tmtools/jstack/SpreadLockTest.java index 8f3be8153c6..e3928d03731 100644 --- a/hotspot/test/serviceability/tmtools/jstack/SpreadLockTest.java +++ b/hotspot/test/serviceability/tmtools/jstack/SpreadLockTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -96,7 +96,7 @@ public class SpreadLockTest { debuggee.start(); // Collect output from the jstack tool - JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid()); + JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid()); ToolResults results1 = jstackTool.measure(); // Go to method b() diff --git a/hotspot/test/serviceability/tmtools/jstack/ThreadNamesTest.java b/hotspot/test/serviceability/tmtools/jstack/ThreadNamesTest.java index 6402c2265c4..e0b6f06d125 100644 --- a/hotspot/test/serviceability/tmtools/jstack/ThreadNamesTest.java +++ b/hotspot/test/serviceability/tmtools/jstack/ThreadNamesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -61,7 +61,7 @@ public class ThreadNamesTest { thread.start(); // Run jstack tool and collect the output - JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid()); + JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid()); ToolResults results = jstackTool.measure(); // Analyze the jstack output for the strange thread name diff --git a/hotspot/test/serviceability/tmtools/jstack/TraveledLockTest.java b/hotspot/test/serviceability/tmtools/jstack/TraveledLockTest.java index 9a87d6bdc13..ac765997fa7 100644 --- a/hotspot/test/serviceability/tmtools/jstack/TraveledLockTest.java +++ b/hotspot/test/serviceability/tmtools/jstack/TraveledLockTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ public class TraveledLockTest { debuggee.start(); // Collect output from the jstack tool - JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid()); + JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid()); ToolResults results1 = jstackTool.measure(); // Go to method b() diff --git a/hotspot/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java b/hotspot/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java index 9b5a5449326..c4fe1cc8ba9 100644 --- a/hotspot/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java +++ b/hotspot/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -105,7 +105,7 @@ public class WaitNotifyThreadTest { waitThread.start(); // Collect output from the jstack tool - JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid()); + JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid()); ToolResults results = jstackTool.measure(); // Analyze the jstack output for the patterns needed diff --git a/hotspot/test/serviceability/tmtools/jstat/GarbageProducerTest.java b/hotspot/test/serviceability/tmtools/jstat/GarbageProducerTest.java new file mode 100644 index 00000000000..dfe1a8f12dc --- /dev/null +++ b/hotspot/test/serviceability/tmtools/jstat/GarbageProducerTest.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.lang.management.ManagementFactory; +import utils.GarbageProducer; +import common.TmTool; +import utils.JstatResults; + +/** + * Base class for jstat testing which uses GarbageProducer to allocate garbage. + */ +public class GarbageProducerTest { + + // Iterations of measurement to get consistent value of counters and jstat. + private final static int ITERATIONS = 10; + private final static float TARGET_MEMORY_USAGE = 0.7f; + private final static float MEASUREMENT_TOLERANCE = 0.05f; + private final GarbageProducer garbageProducer; + private final TmTool jstatTool; + + public GarbageProducerTest(TmTool tool) { + garbageProducer = new GarbageProducer(TARGET_MEMORY_USAGE); + // We will be running jstat tool + jstatTool = tool; + } + + public void run() throws Exception { + // Run once and get the results asserting that they are reasonable + JstatResults measurement1 = jstatTool.measure(); + measurement1.assertConsistency(); + // Eat metaspace and heap then run the tool again and get the results asserting that they are reasonable + System.gc(); + garbageProducer.allocateMetaspaceAndHeap(); + // Collect garbage. Also update VM statistics + System.gc(); + int i = 0; + long collectionCountBefore = getCollectionCount(); + JstatResults measurement2 = jstatTool.measure(); + do { + System.out.println("Measurement #" + i); + long currentCounter = getCollectionCount(); + // Check if GC cycle occured during measurement + if (currentCounter == collectionCountBefore) { + measurement2.assertConsistency(); + checkOldGenMeasurement(measurement2); + return; + } else { + System.out.println("GC happened during measurement."); + } + collectionCountBefore = getCollectionCount(); + measurement2 = jstatTool.measure(); + + } while (i++ < ITERATIONS); + // Checking will be performed without consistency guarantee. + checkOldGenMeasurement(measurement2); + } + + private void checkOldGenMeasurement(JstatResults measurement2) { + float oldGenAllocationRatio = garbageProducer.getOldGenAllocationRatio() - MEASUREMENT_TOLERANCE; + // Assert that space has been utilized accordingly + JstatResults.assertSpaceUtilization(measurement2, TARGET_MEMORY_USAGE, oldGenAllocationRatio); + } + + private static long getCollectionCount() { + return ManagementFactory.getGarbageCollectorMXBeans().stream() + .mapToLong(b -> b.getCollectionCount()) + .sum(); + } +} diff --git a/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java b/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java index 6723e6e02d1..820c8dab35d 100644 --- a/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java +++ b/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -38,7 +38,7 @@ public class GcCapacityTest { public static void main(String[] args) throws Exception { // We will be running "jstat -gc" tool - JstatGcCapacityTool jstatGcTool = new JstatGcCapacityTool(ProcessHandle.current().getPid()); + JstatGcCapacityTool jstatGcTool = new JstatGcCapacityTool(ProcessHandle.current().pid()); // Run once and get the results asserting that they are reasonable JstatGcCapacityResults measurement1 = jstatGcTool.measure(); diff --git a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest01.java b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest01.java index 9e4c5eb2e64..96f0728a349 100644 --- a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest01.java +++ b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest01.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -41,7 +41,7 @@ public class GcCauseTest01 { public static void main(String[] args) throws Exception { // We will be running "jstat -gc" tool - JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().getPid()); + JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().pid()); // Run once and get the results asserting that they are reasonable JstatGcCauseResults measurement1 = jstatGcTool.measure(); diff --git a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java index 2bdf04d39c2..b92ea57d0a8 100644 --- a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java +++ b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -25,39 +25,19 @@ * @test * @summary Test checks output displayed with jstat -gccause. * Test scenario: - * tests forces debuggee application eat ~70% of heap and runs jstat. - * jstat should show that ~70% of heap (OC/OU ~= 70%). + * test forces debuggee application eat ~70% of heap and runs jstat. + * jstat should show actual usage of old gen (OC/OU ~= old gen usage). * @requires vm.opt.ExplicitGCInvokesConcurrent != true * @modules java.base/jdk.internal.misc * @library /test/lib * @library ../share - * @run main/othervm -XX:+UsePerfData -XX:InitialHeapSize=128M -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcCauseTest02 + * @run main/othervm -XX:+UsePerfData -XX:MaxNewSize=4m -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcCauseTest02 */ import utils.*; public class GcCauseTest02 { - private final static float targetMemoryUsagePercent = 0.7f; - public static void main(String[] args) throws Exception { - - // We will be running "jstat -gc" tool - JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().getPid()); - - // Run once and get the results asserting that they are reasonable - JstatGcCauseResults measurement1 = jstatGcTool.measure(); - measurement1.assertConsistency(); - - GcProvoker gcProvoker = new GcProvoker(); - - // Eat metaspace and heap then run the tool again and get the results asserting that they are reasonable - gcProvoker.allocateAvailableMetaspaceAndHeap(targetMemoryUsagePercent); - // Collect garbage. Also update VM statistics - System.gc(); - JstatGcCauseResults measurement2 = jstatGcTool.measure(); - measurement2.assertConsistency(); - - // Assert that space has been utilized acordingly - JstatResults.assertSpaceUtilization(measurement2, targetMemoryUsagePercent); + new GarbageProducerTest(new JstatGcCauseTool(ProcessHandle.current().pid())).run(); } } diff --git a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest03.java b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest03.java index 91ebd0ffcee..13bd73b5303 100644 --- a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest03.java +++ b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest03.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -41,7 +41,7 @@ public class GcCauseTest03 { public static void main(String[] args) throws Exception { // We will be running "jstat -gc" tool - JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().getPid()); + JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().pid()); System.gc(); diff --git a/hotspot/test/serviceability/tmtools/jstat/GcNewTest.java b/hotspot/test/serviceability/tmtools/jstat/GcNewTest.java index 8e1d6ae364a..4719baa6239 100644 --- a/hotspot/test/serviceability/tmtools/jstat/GcNewTest.java +++ b/hotspot/test/serviceability/tmtools/jstat/GcNewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -40,7 +40,7 @@ public class GcNewTest { public static void main(String[] args) throws Exception { // We will be running "jstat -gc" tool - JstatGcNewTool jstatGcTool = new JstatGcNewTool(ProcessHandle.current().getPid()); + JstatGcNewTool jstatGcTool = new JstatGcNewTool(ProcessHandle.current().pid()); // Run once and get the results asserting that they are reasonable JstatGcNewResults measurement1 = jstatGcTool.measure(); diff --git a/hotspot/test/serviceability/tmtools/jstat/GcTest01.java b/hotspot/test/serviceability/tmtools/jstat/GcTest01.java index cc0bf5261e2..6ee18f3f3bb 100644 --- a/hotspot/test/serviceability/tmtools/jstat/GcTest01.java +++ b/hotspot/test/serviceability/tmtools/jstat/GcTest01.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -44,7 +44,7 @@ public class GcTest01 { public static void main(String[] args) throws Exception { // We will be running "jstat -gc" tool - JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().getPid()); + JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().pid()); // Run once and get the results asserting that they are reasonable JstatGcResults measurement1 = jstatGcTool.measure(); diff --git a/hotspot/test/serviceability/tmtools/jstat/GcTest02.java b/hotspot/test/serviceability/tmtools/jstat/GcTest02.java index 91406fa3838..a0e0cb4fcac 100644 --- a/hotspot/test/serviceability/tmtools/jstat/GcTest02.java +++ b/hotspot/test/serviceability/tmtools/jstat/GcTest02.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -21,43 +21,23 @@ * questions. */ -import utils.*; /* * @test * @summary Test checks output displayed with jstat -gc. * Test scenario: - * tests forces debuggee application eat ~70% of heap and runs jstat. - * jstat should show that ~70% of heap is utilized (OC/OU ~= 70%). + * test forces debuggee application eat ~70% of heap and runs jstat. + * jstat should show actual usage of old gen (OC/OU ~= old gen usage). * @requires vm.opt.ExplicitGCInvokesConcurrent != true * @modules java.base/jdk.internal.misc * @library /test/lib * @library ../share - * @run main/othervm -XX:+UsePerfData -XX:InitialHeapSize=128M -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcTest02 + * @run main/othervm -XX:+UsePerfData -XX:MaxNewSize=4m -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcTest02 */ +import utils.*; public class GcTest02 { - private final static float targetMemoryUsagePercent = 0.7f; - public static void main(String[] args) throws Exception { - - // We will be running "jstat -gc" tool - JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().getPid()); - - // Run once and get the results asserting that they are reasonable - JstatGcResults measurement1 = jstatGcTool.measure(); - measurement1.assertConsistency(); - - GcProvoker gcProvoker = new GcProvoker(); - - // Eat metaspace and heap then run the tool again and get the results asserting that they are reasonable - gcProvoker.allocateAvailableMetaspaceAndHeap(targetMemoryUsagePercent); - // Collect garbage. Also updates VM statistics - System.gc(); - JstatGcResults measurement2 = jstatGcTool.measure(); - measurement2.assertConsistency(); - - // Assert that space has been utilized acordingly - JstatResults.assertSpaceUtilization(measurement2, targetMemoryUsagePercent); + new GarbageProducerTest(new JstatGcTool(ProcessHandle.current().pid())).run(); } } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/GarbageProducer.java b/hotspot/test/serviceability/tmtools/jstat/utils/GarbageProducer.java new file mode 100644 index 00000000000..0dd7c858482 --- /dev/null +++ b/hotspot/test/serviceability/tmtools/jstat/utils/GarbageProducer.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package utils; + +import java.lang.management.ManagementFactory; +import java.lang.management.MemoryMXBean; +import java.lang.management.MemoryPoolMXBean; +import java.lang.management.MemoryUsage; +import java.util.ArrayList; +import java.util.List; + +/** + * This is an class used to allocate specified amount of metaspace and heap. + */ +public class GarbageProducer { + + // Uses fixed small objects to avoid Humongous objects allocation with G1 GC. + private static final int MEMORY_CHUNK = 2048; + + public static List allocatedMetaspace; + public static List allocatedMemory; + + private final MemoryMXBean memoryMXBean; + private final float targetMemoryUsagePercent; + private final long targetMemoryUsage; + + /** + * @param targetMemoryUsagePercent how many percent of metaspace and heap to + * allocate + */ + public GarbageProducer(float targetMemoryUsagePercent) { + memoryMXBean = ManagementFactory.getMemoryMXBean(); + this.targetMemoryUsagePercent = targetMemoryUsagePercent; + targetMemoryUsage = (long) (memoryMXBean.getHeapMemoryUsage().getMax() * targetMemoryUsagePercent); + } + + /** + * Allocates heap and metaspace upon exit targetMemoryUsagePercent percents + * of heap and metaspace have been consumed. + */ + public void allocateMetaspaceAndHeap() { + // Metaspace should be filled before Java Heap to prevent unexpected OOME + // in the Java Heap while filling Metaspace + allocatedMetaspace = eatMetaspace(targetMemoryUsagePercent); + allocatedMemory = allocateGarbage(targetMemoryUsage); + } + + private List eatMetaspace(float targetUsage) { + List list = new ArrayList<>(); + MemoryPoolMXBean metaspacePool = getMatchedMemoryPool(".*Metaspace.*"); + float currentUsage; + GeneratedClassProducer gp = new GeneratedClassProducer(); + do { + try { + list.add(gp.create(0)); + } catch (OutOfMemoryError oome) { + list = null; + throw new RuntimeException("Unexpected OOME '" + oome.getMessage() + "' while eating " + targetUsage + " of Metaspace."); + } + MemoryUsage memoryUsage = metaspacePool.getUsage(); + currentUsage = (((float) memoryUsage.getUsed()) / memoryUsage.getMax()); + } while (currentUsage < targetUsage); + return list; + } + + private MemoryPoolMXBean getMatchedMemoryPool(String patternPoolName) { + return ManagementFactory.getMemoryPoolMXBeans().stream() + .filter(bean -> bean.getName().matches(patternPoolName)) + .findFirst() + .orElseThrow(() -> new RuntimeException("Cannot find '" + patternPoolName + "' memory pool.")); + } + + private List allocateGarbage(long targetMemoryUsage) { + List list = new ArrayList<>(); + do { + try { + list.add(new byte[MEMORY_CHUNK]); + } catch (OutOfMemoryError e) { + list = null; + throw new RuntimeException("Unexpected OOME '" + e.getMessage() + "'"); + } + } while (memoryMXBean.getHeapMemoryUsage().getUsed() < targetMemoryUsage); + return list; + } + + /** + * Returns allocation rate for old gen based on appropriate MemoryPoolMXBean + * memory usage. + * + * @return allocation rate + */ + public float getOldGenAllocationRatio() { + MemoryPoolMXBean oldGenBean = getMatchedMemoryPool(".*Old.*|.*Tenured.*"); + MemoryUsage usage = oldGenBean.getUsage(); + System.out.format("Memory usage for %1s.\n", oldGenBean.getName()); + System.out.format("Used: %1d\n", usage.getUsed()); + System.out.format("Commited: %1d\n", usage.getCommitted()); + System.out.format("Max: %1d\n", usage.getMax()); + return ((float) usage.getUsed()) / usage.getCommitted(); + } +} diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/GcProvoker.java b/hotspot/test/serviceability/tmtools/jstat/utils/GcProvoker.java index f2111fa5724..8457091800c 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/GcProvoker.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/GcProvoker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -22,9 +22,6 @@ */ package utils; -import java.lang.management.ManagementFactory; -import java.lang.management.MemoryPoolMXBean; -import java.lang.management.MemoryUsage; import java.util.ArrayList; import java.util.List; @@ -36,11 +33,7 @@ import java.util.List; public class GcProvoker{ // Uses fixed small objects to avoid Humongous objects allocation in G1 - public static final int MEMORY_CHUNK = 2048; - public static final float ALLOCATION_TOLERANCE = 0.05f; - - public static List allocatedMetaspace; - public static List allocatedMemory; + private static final int MEMORY_CHUNK = 2048; private final Runtime runtime; @@ -61,21 +54,6 @@ public class GcProvoker{ return list; } - private List allocateAvailableHeap(float targetUsage) { - // Calculates size of free memory after allocation with small tolerance. - long minFreeMemory = (long) ((1.0 - (targetUsage + ALLOCATION_TOLERANCE)) * runtime.maxMemory()); - List list = new ArrayList<>(); - do { - try { - list.add(new byte[MEMORY_CHUNK]); - } catch (OutOfMemoryError e) { - list = null; - throw new RuntimeException("Unexpected OOME '" + e.getMessage() + "' while eating " + targetUsage + " of heap memory."); - } - } while (runtime.freeMemory() > minFreeMemory); - return list; - } - /** * This method provokes a GC */ @@ -93,65 +71,7 @@ public class GcProvoker{ } } - /** - * Allocates heap and metaspace upon exit not less than targetMemoryUsagePercent percents - * of heap and metaspace have been consumed. - * - * @param targetMemoryUsagePercent how many percent of heap and metaspace to - * allocate - */ - - public void allocateMetaspaceAndHeap(float targetMemoryUsagePercent) { - // Metaspace should be filled before Java Heap to prevent unexpected OOME - // in the Java Heap while filling Metaspace - allocatedMetaspace = eatMetaspace(targetMemoryUsagePercent); - allocatedMemory = allocateHeap(targetMemoryUsagePercent); - } - - /** - * Allocates heap and metaspace upon exit targetMemoryUsagePercent percents - * of heap and metaspace have been consumed. - * - * @param targetMemoryUsagePercent how many percent of heap and metaspace to - * allocate - */ - public void allocateAvailableMetaspaceAndHeap(float targetMemoryUsagePercent) { - // Metaspace should be filled before Java Heap to prevent unexpected OOME - // in the Java Heap while filling Metaspace - allocatedMetaspace = eatMetaspace(targetMemoryUsagePercent); - allocatedMemory = allocateAvailableHeap(targetMemoryUsagePercent); - } - - private List eatMetaspace(float targetUsage) { - List list = new ArrayList<>(); - final String metaspacePoolName = "Metaspace"; - MemoryPoolMXBean metaspacePool = null; - for (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) { - if (pool.getName().contains(metaspacePoolName)) { - metaspacePool = pool; - break; - } - } - if (metaspacePool == null) { - throw new RuntimeException("MXBean for Metaspace pool wasn't found"); - } - float currentUsage; - GeneratedClassProducer gp = new GeneratedClassProducer(); - do { - try { - list.add(gp.create(0)); - } catch (OutOfMemoryError oome) { - list = null; - throw new RuntimeException("Unexpected OOME '" + oome.getMessage() + "' while eating " + targetUsage + " of Metaspace."); - } - MemoryUsage memoryUsage = metaspacePool.getUsage(); - currentUsage = (((float) memoryUsage.getUsed()) / memoryUsage.getMax()); - } while (currentUsage < targetUsage); - return list; - } - public GcProvoker() { runtime = Runtime.getRuntime(); } - } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/GcProvokerImpl.java b/hotspot/test/serviceability/tmtools/jstat/utils/GcProvokerImpl.java deleted file mode 100644 index 565d86cf377..00000000000 --- a/hotspot/test/serviceability/tmtools/jstat/utils/GcProvokerImpl.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package utils; - -import java.lang.management.ManagementFactory; -import java.lang.management.MemoryPoolMXBean; -import java.lang.management.MemoryUsage; -import java.util.ArrayList; -import java.util.List; - -/** - * - * Utilities to provoke GC in various ways - */ -public class GcProvokerImpl implements GcProvoker { - - private static List eatenMetaspace; - private static List eatenMemory; - - static List eatHeapMemory(float targetUsage) { - long maxMemory = Runtime.getRuntime().maxMemory(); - // uses fixed small objects to avoid Humongous objects allocation in G1 - int memoryChunk = 2048; - List list = new ArrayList<>(); - long used = 0; - long target = (long) (maxMemory * targetUsage); - while (used < target) { - try { - list.add(new byte[memoryChunk]); - used += memoryChunk; - } catch (OutOfMemoryError e) { - list = null; - throw new RuntimeException("Unexpected OOME '" + e.getMessage() + "' while eating " + targetUsage + " of heap memory."); - } - } - return list; - } - - @Override - public void provokeGc() { - for (int i = 0; i < 3; i++) { - long edenSize = Pools.getEdenCommittedSize(); - long heapSize = Pools.getHeapCommittedSize(); - float targetPercent = ((float) edenSize) / (heapSize); - if ((targetPercent < 0) || (targetPercent > 1.0)) { - throw new RuntimeException("Error in the percent calculation" + " (eden size: " + edenSize + ", heap size: " + heapSize + ", calculated eden percent: " + targetPercent + ")"); - } - eatHeapMemory(targetPercent); - eatHeapMemory(targetPercent); - System.gc(); - } - } - - @Override - public void eatMetaspaceAndHeap(float targetMemoryUsagePercent) { - // Metaspace should be filled before Java Heap to prevent unexpected OOME - // in the Java Heap while filling Metaspace - eatenMetaspace = eatMetaspace(targetMemoryUsagePercent); - eatenMemory = eatHeapMemory(targetMemoryUsagePercent); - } - - private static List eatMetaspace(float targetUsage) { - List list = new ArrayList<>(); - final String metaspacePoolName = "Metaspace"; - MemoryPoolMXBean metaspacePool = null; - for (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) { - if (pool.getName().contains(metaspacePoolName)) { - metaspacePool = pool; - break; - } - } - if (metaspacePool == null) { - throw new RuntimeException("MXBean for Metaspace pool wasn't found"); - } - float currentUsage; - GeneratedClassProducer gp = new GeneratedClassProducer(); - do { - try { - list.add(gp.create(0)); - } catch (OutOfMemoryError oome) { - list = null; - throw new RuntimeException("Unexpected OOME '" + oome.getMessage() + "' while eating " + targetUsage + " of Metaspace."); - } - MemoryUsage memoryUsage = metaspacePool.getUsage(); - currentUsage = (((float) memoryUsage.getUsed()) / memoryUsage.getMax()); - } while (currentUsage < targetUsage); - return list; - } - - public GcProvokerImpl() { - } - -} diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java index 6ac62fa48ef..350a2a6470d 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -62,6 +62,7 @@ public class JstatGcCapacityResults extends JstatResults { /** * Checks the overall consistency of the results reported by the tool */ + @Override public void assertConsistency() { // Check exit code @@ -117,8 +118,6 @@ public class JstatGcCapacityResults extends JstatResults { float MC = getFloatValue("MC"); assertThat(MC >= MCMN, "MC < MCMN (generation capacity < min generation capacity)"); assertThat(MC <= MCMX, "MGC > MCMX (generation capacity > max generation capacity)"); - - } /** @@ -139,21 +138,4 @@ public class JstatGcCapacityResults extends JstatResults { } return false; } - - private static final float FLOAT_COMPARISON_TOLERANCE = 0.0011f; - - private static boolean checkFloatIsSum(float sum, float... floats) { - for (float f : floats) { - sum -= f; - } - - return Math.abs(sum) <= FLOAT_COMPARISON_TOLERANCE; - } - - private void assertThat(boolean b, String message) { - if (!b) { - throw new RuntimeException(message); - } - } - } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java index 3bb708dd7ba..cf435f8dba7 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java @@ -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 @@ -56,6 +56,7 @@ public class JstatGcCauseResults extends JstatResults { /** * Checks the overall consistency of the results reported by the tool */ + @Override public void assertConsistency() { assertThat(getExitCode() == 0, "Unexpected exit code: " + getExitCode()); @@ -83,21 +84,4 @@ public class JstatGcCauseResults extends JstatResults { assertThat(checkFloatIsSum(GCT, YGCT, FGCT), "GCT != (YGCT + FGCT) " + "(GCT = " + GCT + ", YGCT = " + YGCT + ", FGCT = " + FGCT + ", (YCGT + FGCT) = " + (YGCT + FGCT) + ")"); } - - private static final float FLOAT_COMPARISON_TOLERANCE = 0.0011f; - - private static boolean checkFloatIsSum(float sum, float... floats) { - for (float f : floats) { - sum -= f; - } - - return Math.abs(sum) <= FLOAT_COMPARISON_TOLERANCE; - } - - private void assertThat(boolean b, String message) { - if (!b) { - throw new RuntimeException(message); - } - } - } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcNewResults.java b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcNewResults.java index 24ff4490b80..ca3c04af67c 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcNewResults.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcNewResults.java @@ -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 @@ -54,6 +54,7 @@ public class JstatGcNewResults extends JstatResults { /** * Checks the overall consistency of the results reported by the tool */ + @Override public void assertConsistency() { assertThat(getExitCode() == 0, "Unexpected exit code: " + getExitCode()); @@ -84,10 +85,4 @@ public class JstatGcNewResults extends JstatResults { int MTT = getIntValue("MTT"); assertThat(TT <= MTT, "TT > MTT (tenuring threshold > maximum tenuring threshold)"); } - - private void assertThat(boolean b, String message) { - if (!b) { - throw new RuntimeException(message); - } - } } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcResults.java b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcResults.java index 95905418a37..7b736d9f071 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcResults.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcResults.java @@ -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 @@ -61,6 +61,7 @@ public class JstatGcResults extends JstatResults { /** * Checks the overall consistency of the results reported by the tool */ + @Override public void assertConsistency() { assertThat(getExitCode() == 0, "Unexpected exit code: " + getExitCode()); @@ -112,21 +113,4 @@ public class JstatGcResults extends JstatResults { assertThat(checkFloatIsSum(GCT, YGCT, FGCT), "GCT != (YGCT + FGCT) " + "(GCT = " + GCT + ", YGCT = " + YGCT + ", FGCT = " + FGCT + ", (YCGT + FGCT) = " + (YGCT + FGCT) + ")"); } - - private static final float FLOAT_COMPARISON_TOLERANCE = 0.0011f; - - private static boolean checkFloatIsSum(float sum, float... floats) { - for (float f : floats) { - sum -= f; - } - - return Math.abs(sum) <= FLOAT_COMPARISON_TOLERANCE; - } - - private void assertThat(boolean b, String message) { - if (!b) { - throw new RuntimeException(message); - } - } - } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/JstatResults.java b/hotspot/test/serviceability/tmtools/jstat/utils/JstatResults.java index d4f961051f8..f628a27d1de 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/JstatResults.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/JstatResults.java @@ -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 @@ -30,6 +30,8 @@ import common.ToolResults; */ abstract public class JstatResults extends ToolResults { + private static final float FLOAT_COMPARISON_TOLERANCE = 0.0011f; + public JstatResults(ToolResults rawResults) { super(rawResults); } @@ -110,38 +112,61 @@ abstract public class JstatResults extends ToolResults { * space has been utilized */ public static void assertSpaceUtilization(JstatResults measurement, float targetMemoryUsagePercent) { + assertSpaceUtilization(measurement, targetMemoryUsagePercent, targetMemoryUsagePercent); + } + + /** + * Helper function to assert the utilization of the space + * + * @param measurement - measurement results to analyze + * @param targetMetaspaceUsagePercent -assert that not less than this amount + * of metaspace has been utilized + * @param targetOldSpaceUsagePercent -assert that not less than this amount + * of old space has been utilized + */ + public static void assertSpaceUtilization(JstatResults measurement, float targetMetaspaceUsagePercent, + float targetOldSpaceUsagePercent) { if (measurement.valueExists("OU")) { float OC = measurement.getFloatValue("OC"); float OU = measurement.getFloatValue("OU"); - assertThat((OU / OC) > targetMemoryUsagePercent, "Old space utilization should be > " - + (targetMemoryUsagePercent * 100) + "%, actually OU / OC = " + (OU / OC)); + assertThat((OU / OC) > targetOldSpaceUsagePercent, "Old space utilization should be > " + + (targetOldSpaceUsagePercent * 100) + "%, actually OU / OC = " + (OU / OC)); } if (measurement.valueExists("MU")) { float MC = measurement.getFloatValue("MC"); float MU = measurement.getFloatValue("MU"); - assertThat((MU / MC) > targetMemoryUsagePercent, "Metaspace utilization should be > " - + (targetMemoryUsagePercent * 100) + "%, actually MU / MC = " + (MU / MC)); + assertThat((MU / MC) > targetMetaspaceUsagePercent, "Metaspace utilization should be > " + + (targetMetaspaceUsagePercent * 100) + "%, actually MU / MC = " + (MU / MC)); } if (measurement.valueExists("O")) { float O = measurement.getFloatValue("O"); - assertThat(O > targetMemoryUsagePercent * 100, "Old space utilization should be > " - + (targetMemoryUsagePercent * 100) + "%, actually O = " + O); + assertThat(O > targetOldSpaceUsagePercent * 100, "Old space utilization should be > " + + (targetOldSpaceUsagePercent * 100) + "%, actually O = " + O); } if (measurement.valueExists("M")) { float M = measurement.getFloatValue("M"); - assertThat(M > targetMemoryUsagePercent * 100, "Metaspace utilization should be > " - + (targetMemoryUsagePercent * 100) + "%, actually M = " + M); + assertThat(M > targetMetaspaceUsagePercent * 100, "Metaspace utilization should be > " + + (targetMetaspaceUsagePercent * 100) + "%, actually M = " + M); } } - private static void assertThat(boolean result, String message) { + public static void assertThat(boolean result, String message) { if (!result) { throw new RuntimeException(message); } } + public static boolean checkFloatIsSum(float sum, float... floats) { + for (float f : floats) { + sum -= f; + } + + return Math.abs(sum) <= FLOAT_COMPARISON_TOLERANCE; + } + + abstract public void assertConsistency(); } diff --git a/hotspot/test/test_env.sh b/hotspot/test/test_env.sh index 43d1a76ed92..0c300d4fd96 100644 --- a/hotspot/test/test_env.sh +++ b/hotspot/test/test_env.sh @@ -214,6 +214,11 @@ if [ $? = 0 ] then VM_CPU="aarch64" fi +grep "arm64" vm_version.out > ${NULL} +if [ $? = 0 ] +then + VM_CPU="aarch64" +fi export VM_TYPE VM_BITS VM_OS VM_CPU echo "VM_TYPE=${VM_TYPE}" echo "VM_BITS=${VM_BITS}" diff --git a/hotspot/test/testlibrary/ctw/Makefile b/hotspot/test/testlibrary/ctw/Makefile index db7204b1f12..3b521188daf 100644 --- a/hotspot/test/testlibrary/ctw/Makefile +++ b/hotspot/test/testlibrary/ctw/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2016. Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 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 diff --git a/hotspot/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java b/hotspot/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java index 36e6ddea8be..f5347cd8242 100644 --- a/hotspot/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java +++ b/hotspot/test/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -151,8 +151,9 @@ public abstract class PathHandler { if (id >= Utils.COMPILE_THE_WORLD_START_AT) { try { Class aClass = loader.loadClass(name); - if (name != "sun.reflect.misc.Trampoline" - && name != "sun.tools.jconsole.OutputViewer") { // workaround for JDK-8159155 + if (!"sun.reflect.misc.Trampoline".equals(name) + // workaround for JDK-8159155 + && !"sun.tools.jconsole.OutputViewer".equals(name)) { UNSAFE.ensureClassInitialized(aClass); } CompileTheWorld.OUT.printf("[%d]\t%s%n", id, name); diff --git a/hotspot/test/testlibrary/jittester/Makefile b/hotspot/test/testlibrary/jittester/Makefile index 14f0cb3fba1..e4dd97cff23 100644 --- a/hotspot/test/testlibrary/jittester/Makefile +++ b/hotspot/test/testlibrary/jittester/Makefile @@ -108,7 +108,7 @@ INIT: $(DIST_DIR) $(shell if [ ! -d $(CLASSES_DIR) ]; then mkdir -p $(CLASSES_DIR); fi) install: clean_testbase testgroup testroot copytestlibrary copyaot JAR cleantmp - $(JAVA) --add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED -ea -jar $(DIST_JAR) $(APPLICATION_ARGS) + $(JAVA) --add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED -ea -jar $(DIST_JAR) $(APPLICATION_ARGS) clean_testbase: @rm -rf $(TESTBASE_DIR) diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java index 3974f078d7b..952e34182a3 100644 --- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java +++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java @@ -43,6 +43,7 @@ public abstract class TestsGenerator implements BiConsumer { protected final Path generatorDir; protected final Function preRunActions; protected final String jtDriverOptions; + private static final String DISABLE_WARNINGS = "-XX:-PrintWarnings"; protected TestsGenerator(String suffix) { this(suffix, s -> new String[0], ""); @@ -57,8 +58,8 @@ public abstract class TestsGenerator implements BiConsumer { protected void generateGoldenOut(String mainClassName) { String classPath = getRoot() + File.pathSeparator + generatorDir; - ProcessBuilder pb = new ProcessBuilder(JAVA, "-Xint", "-Xverify", "-cp", classPath, - mainClassName); + ProcessBuilder pb = new ProcessBuilder(JAVA, "-Xint", DISABLE_WARNINGS, "-Xverify", + "-cp", classPath, mainClassName); String goldFile = mainClassName + ".gold"; try { runProcess(pb, generatorDir.resolve(goldFile).toString()); @@ -128,6 +129,8 @@ public abstract class TestsGenerator implements BiConsumer { .append("\n"); } header.append(" * @run driver jdk.test.lib.jittester.jtreg.JitTesterDriver ") + .append(DISABLE_WARNINGS) + .append(" ") .append(jtDriverOptions) .append(" ") .append(mainClassName) diff --git a/hotspot/test/testlibrary_tests/ctw/CtwTest.java b/hotspot/test/testlibrary_tests/ctw/CtwTest.java index eb6aedc1fbe..514df0e5cd0 100644 --- a/hotspot/test/testlibrary_tests/ctw/CtwTest.java +++ b/hotspot/test/testlibrary_tests/ctw/CtwTest.java @@ -37,6 +37,7 @@ import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.nio.charset.Charset; +import jdk.test.lib.Platform; import jdk.test.lib.JDKToolFinder; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; @@ -93,7 +94,12 @@ public abstract class CtwTest { // concat CTW_COMMAND and args w/o 0th element String[] cmd = Arrays.copyOf(CTW_COMMAND, CTW_COMMAND.length + args.length - 1); System.arraycopy(args, 1, cmd, CTW_COMMAND.length, args.length - 1); - + if (Platform.isWindows()) { + // '*' has to be escaped on windows + for (int i = 0; i < cmd.length; ++i) { + cmd[i] = cmd[i].replace("*", "\"*\""); + } + } ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmd); OutputAnalyzer output = new OutputAnalyzer(pb.start()); dump(output, "compile"); diff --git a/jaxp/.hgtags b/jaxp/.hgtags index 9804e10e82f..f62d9a855b6 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -398,3 +398,25 @@ f85154af719f99a3b4d81b67a8b4c18a650d10f9 jdk-9+150 1384504d2cd0e55c5e0becaeaf40ab05cae959d6 jdk-9+153 7fa738305436d14c0926df0f04892890cacc766b jdk-9+154 48fa77af153288b08ba794e1616a7b0685f3b67e jdk-9+155 +e930c373aaa4e0e712c9a25ba4b03d473b48c294 jdk-9+156 +412df235a8a229469a2cb9e7bb274d43277077d2 jdk-9+157 +60e670a65e07cc309951bd838b484401e6dd7847 jdk-9+158 +5695854e8831d0c088ab0ecf83b367ec16c9760a jdk-9+159 +fb8f2c8e15295120ff0f281dc057cfffb309e90e jdk-9+160 +51b63f1b8001a48a16805b43babc3af7b314d501 jdk-9+161 +d02b6fbcab06c59a5f5a4a6736bd4ec6d2567855 jdk-9+162 +92a38c75cd277d8b11f4382511a62087044659a1 jdk-9+163 +6dc790a4e8310c86712cfdf7561a9820818546e6 jdk-9+164 +55419603989707ec50c84bb379bbdc1adeec3ab2 jdk-9+165 +8d3febd5c9d82e49f3e6e5f8eb10f959e7b50f83 jdk-9+166 +646567dcfa64b9a39b33d71330427737d1c1a0d5 jdk-9+167 +23a87f409371fb8ce7b764cccb3a74c3f6b29900 jdk-9+168 +5d9d2a65fb26aa183019346c11d9314819621665 jdk-9+169 +6e78f902f477a093afca85a1042f97410d01eb69 jdk-9+170 +c27321c889cf4c8e465a61b84572c00ef7ee6004 jdk-9+171 +eedb6e54c8bd6197ecba5fc0d8568bac8ae852dd jdk-9+172 +9788347e0629d0cb3a0e55a903494ff741d4fa15 jdk-9+173 +b9c0b105002272d7414c8b34af9aded151f9cad6 jdk-9+174 +736412a8dccee9d439044e6b1af2e7470d0a3563 jdk-9+175 +38cf34e2328070cc691c4f136e6dde1a44c04171 jdk-9+176 +332ad9f92632f56f337b8c40edef9a95a42b26bc jdk-9+177 diff --git a/jaxp/README b/jaxp/README deleted file mode 100644 index 4d65125b34c..00000000000 --- a/jaxp/README +++ /dev/null @@ -1,19 +0,0 @@ -README: - - This file should be located at the top of the Mercurial repository. - - See http://openjdk.java.net/ for more information about the OpenJDK. - - See ../README-builds.html for complete details on build machine requirements. - -Simple Build Instructions: - This repository can be loaded as a NetBeans project, built with ant, or - built with GNU make, e.g. - ant - -OR- - cd make && gnumake - - The built files that will be imported into the jdk build will be in the - "dist" directory. - Help information is available by running "ant -projecthelp" or "make help". - diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Constants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Constants.java index d7fc6bcedf0..a5e02cafa5e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Constants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Constants.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Constants for the project, mostly defined in the JVM specification. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConstants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConstants.java index 8fd320424f1..da004ea462d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConstants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConstants.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Exception constants. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Repository.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Repository.java index 6549b8a7650..14a935f1bb8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Repository.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Repository.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.JavaClass; import com.sun.org.apache.bcel.internal.util.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AccessFlags.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AccessFlags.java index ad50a97b501..c779c942301 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AccessFlags.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AccessFlags.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java index 204bb2506bb..3ca3d9adc01 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AttributeReader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AttributeReader.java index d1f395180aa..ec9593932ee 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AttributeReader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AttributeReader.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Unknown (non-standard) attributes may be read via user-defined factory diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassFormatException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassFormatException.java index 203faf3c101..6ab8dfa4f2b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassFormatException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassFormatException.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Thrown when the BCEL attempts to read a class file and determines diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java index d8f32fc5a43..354891d0181 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java index f7ace6f5480..5f02da73349 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java index 4cf1725a9d6..0fd1040bb10 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java index 931b8e27c79..18554f0f649 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantCP.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantCP.java index b12d752c2cb..7494c56336f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantCP.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantCP.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.Constants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantClass.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantClass.java index e047ca88db5..faabc476376 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantClass.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantClass.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java index 74e7ef8129d..0471f684863 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFieldref.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFieldref.java index 5d76e11fdd9..b6cea00cbc3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFieldref.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFieldref.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java index e18eb14f973..693ed70c13b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java index a1e811e9b5e..5e8e098c0ef 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java @@ -2,62 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInterfaceMethodref.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInterfaceMethodref.java index 46b742651b8..a242396d2a0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInterfaceMethodref.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInterfaceMethodref.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java index e29a7c9c1a3..d1d1ab30a89 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodref.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodref.java index 044c99be955..f879d0ac875 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodref.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantMethodref.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantNameAndType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantNameAndType.java index 19ad468d7f3..018adb8dfa5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantNameAndType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantNameAndType.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantObject.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantObject.java index 61440e54a5c..fbe7d4a6719 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantObject.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantObject.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * This interface denotes those constants that have a "natural" value, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java index 091e70cbfbf..8308d1adfdf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantString.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantString.java index 40ea5299f43..30744dc695f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantString.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantString.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantUtf8.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantUtf8.java index 32e9555e1b1..59df746065f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantUtf8.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantUtf8.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java index e16d47b2fbd..a3b754ec498 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Deprecated.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Deprecated.java index 096f77f3b7a..a48fd812345 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Deprecated.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Deprecated.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java index 763eca6e1e5..a21586c8c9e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.util.Stack; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EmptyVisitor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EmptyVisitor.java index 32a1cc144cf..11b5b22a30b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EmptyVisitor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EmptyVisitor.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.*; import com.sun.org.apache.bcel.internal.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java index 0a9e1dcf155..6780e9f534b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Field.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Field.java index 6bc42ee48be..a9089fcb1bb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Field.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Field.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.generic.Type; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/FieldOrMethod.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/FieldOrMethod.java index 86b7da20be7..78fa6e837ed 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/FieldOrMethod.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/FieldOrMethod.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java index 8693fa6a1f0..32372eb7458 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java index da320361327..ee12da6f781 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java index db83c73b299..2ccb0646231 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.util.SyntheticRepository; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java index ec8b4728036..55caded5352 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java index 1fa9bfeaf3e..a05331b4c01 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariable.java index a80bc3bb6c4..f33140ff3ef 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariable.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java index db0631f5b89..88e51f662e3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Method.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Method.java index 63d7689e5f0..dadd64c2a12 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Method.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Method.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.generic.Type; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Node.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Node.java index 8d239c4949a..61e1ab7e1a1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Node.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Node.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denote class to have an accept method(); diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java index 999d876bb3b..ebe72756070 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java index e0b9cc50c50..60bb1ca779e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java index 5120cd6b2bc..4942152a5e6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java index 4d44a6f3107..01106aa207d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java index 5b5c46fffb7..8d09356d8cb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java index 357d53d825d..f57fba91d12 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Synthetic.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Synthetic.java index 4b743a66c87..737067f94cc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Synthetic.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Synthetic.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Unknown.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Unknown.java index 16fc4760fd4..d5b13965842 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Unknown.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Unknown.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java index 9e4cddc3f37..2641b1f62ef 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Visitor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Visitor.java index a076768700c..2e7b855f72c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Visitor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Visitor.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.classfile; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Interface to make use of the Visitor pattern programming style. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AALOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AALOAD.java index 914d5b3e699..fe68c2fecfb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AALOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AALOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * AALOAD - Load reference from array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AASTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AASTORE.java index e8a2ddd0c2a..e68c8b853fc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AASTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AASTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * AASTORE - Store into reference array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ACONST_NULL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ACONST_NULL.java index 7d1003519ee..777580befe6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ACONST_NULL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ACONST_NULL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ACONST_NULL - Push null reference diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ALOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ALOAD.java index 2d0a1137740..2b9d3d2ee3c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ALOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ALOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ALOAD - Load reference from local variable diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ANEWARRAY.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ANEWARRAY.java index 4ab55505ee5..71571a1bb19 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ANEWARRAY.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ANEWARRAY.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.ExceptionConstants; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARETURN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARETURN.java index b0c738972ab..ec37dae4d3d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARETURN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARETURN.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ARETURN - Return reference from method diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java index 33f10e65cbf..fdd575e2ea3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ARRAYLENGTH - Get length of array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ASTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ASTORE.java index 4b15efe1d84..d2cc7f5e18d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ASTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ASTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ASTORE - Store reference into local variable diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java index f0afea7d316..226bf2c6ec9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ATHROW - Throw exception diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AllocationInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AllocationInstruction.java index 10064407592..4944d892cdb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AllocationInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AllocationInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denote family of instructions that allocates space in the heap. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArithmeticInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArithmeticInstruction.java index 5b35a8c2607..becf27342d0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArithmeticInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArithmeticInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; /** * Super class for the family of arithmetic instructions. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayInstruction.java index 5b902c3c899..62e90a44b01 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Super class for instructions dealing with array access such as IALOAD. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java index 54bd83a0a0b..035602d8351 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BALOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BALOAD.java index 9ed9afa204e..b198401b455 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BALOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BALOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * BALOAD - Load byte or boolean from array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BASTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BASTORE.java index 300719e1693..67a5fab11a3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BASTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BASTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * BASTORE - Store into byte or boolean array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BIPUSH.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BIPUSH.java index 0ed9962e756..b1859d5ae0f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BIPUSH.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BIPUSH.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BREAKPOINT.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BREAKPOINT.java index 0490be623f7..9715ea5324e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BREAKPOINT.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BREAKPOINT.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * BREAKPOINT, JVM dependent, ignored by default diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BasicType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BasicType.java index c7340a62b15..00a5def2646 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BasicType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BasicType.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchHandle.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchHandle.java index 1f7cbb0d1c7..3ab01f5d821 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchHandle.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchHandle.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * BranchHandle is returned by specialized InstructionList.append() whenever a diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchInstruction.java index 36960f8438f..77f5a86af57 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CALOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CALOAD.java index f738f000fb7..e0cd6aac454 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CALOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CALOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * CALOAD - Load char from array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CASTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CASTORE.java index 94187cceab3..2bb7678b3bb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CASTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CASTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * CASTORE - Store into char array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CHECKCAST.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CHECKCAST.java index 20302f907cc..02ebaf3a20f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CHECKCAST.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CHECKCAST.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.ExceptionConstants; /** * CHECKCAST - Check whether object is of given type diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CPInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CPInstruction.java index 5f9650bcdaf..84ac4ef0de1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CPInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CPInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java index 005a50b2834..2e1b4d37e73 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.classfile.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGenException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGenException.java index bc4bb71e189..6bc4ee6c534 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGenException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGenException.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Thrown on internal errors. Extends RuntimeException so it hasn't to be declared diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassObserver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassObserver.java index 3ef714df85a..a01e5b6288c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassObserver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassObserver.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Implement this interface if you're interested in changes to a ClassGen object diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java index 0fb252ba576..96bd2124f37 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CompoundInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CompoundInstruction.java index b543a2e3b89..b54af3aacf4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CompoundInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CompoundInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Wrapper class for `compound' operations, virtual instructions that diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPoolGen.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPoolGen.java index 1b53aeb5b65..4eb12e2e693 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPoolGen.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPoolGen.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.classfile.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPushInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPushInstruction.java index e7ad698ecef..f5fdaa11541 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPushInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConstantPushInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denotes a push instruction that produces a literal on the stack diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConversionInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConversionInstruction.java index 8227ab01d74..2a1d8b6c2c3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConversionInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ConversionInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; /** * Super class for the x2y family of instructions. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2F.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2F.java index b19d59fb565..1d5cda8ae83 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2F.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2F.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * D2F - Convert double to float diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2I.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2I.java index 9aff1f148c6..cdc20b64f0e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2I.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2I.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * D2I - Convert double to int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2L.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2L.java index 9cb87a2af30..3774d4826fa 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2L.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/D2L.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * D2L - Convert double to long diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DADD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DADD.java index 190790bbb12..af23bf2c94f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DADD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DADD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DADD - Add doubles diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DALOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DALOAD.java index ab3b36180ae..a414eb01432 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DALOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DALOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DALOAD - Load double from array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DASTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DASTORE.java index b615479a296..c100ead3e54 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DASTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DASTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DASTORE - Store into double array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCMPG.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCMPG.java index 3ea2fd89824..1d447c93062 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCMPG.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCMPG.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DCMPG - Compare doubles: value1 > value2 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCMPL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCMPL.java index 1b9c5bd2084..3874a682fe6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCMPL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCMPL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DCMPL - Compare doubles: value1 < value2 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCONST.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCONST.java index 8d43e0926ab..e3c69483137 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCONST.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCONST.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DCONST - Push 0.0 or 1.0, other values cause an exception diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DDIV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DDIV.java index 103bcc3cf4d..1c91493800f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DDIV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DDIV.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DDIV - Divide doubles diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DLOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DLOAD.java index 0da6a5b372a..3e83f1edb30 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DLOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DLOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DLOAD - Load double from local variable diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DMUL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DMUL.java index ff31fad323e..908dec0da4f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DMUL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DMUL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DMUL - Multiply doubles diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DNEG.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DNEG.java index 7bf5917345e..48becc3d66a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DNEG.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DNEG.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DNEG - Negate double diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DREM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DREM.java index 5ccd5634f44..d1f0bd09d03 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DREM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DREM.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DREM - Remainder of doubles diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DRETURN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DRETURN.java index 68329eb15e2..7c4906e8c5d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DRETURN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DRETURN.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DRETURN - Return double from method diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DSTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DSTORE.java index f9c41f8be17..ada5407136f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DSTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DSTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DSTORE - Store double into local variable diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DSUB.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DSUB.java index e9042572f8f..8d6a311d6aa 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DSUB.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DSUB.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DSUB - Substract doubles diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP.java index 161dfe476c6..2d61cf06218 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DUP - Duplicate top operand stack word diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2.java index cbd1972381c..a44f07814e6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DUP2 - Duplicate two top operand stack words diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2_X1.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2_X1.java index 6362c07993a..b0b6d4c6fe2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2_X1.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2_X1.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DUP2_X1 - Duplicate two top operand stack words and put three down diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2_X2.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2_X2.java index d806b12b1f3..4e394bc4012 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2_X2.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP2_X2.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DUP2_X2 - Duplicate two top operand stack words and put four down diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP_X1.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP_X1.java index 7f5b9b70edb..ee895c6571c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP_X1.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP_X1.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DUP_X1 - Duplicate top operand stack word and put two down diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP_X2.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP_X2.java index 94c3608a24b..5d86a30169b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP_X2.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DUP_X2.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * DUP_X2 - Duplicate top operand stack word and put three down diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EmptyVisitor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EmptyVisitor.java index fdc77b1191d..275af64d69f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EmptyVisitor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EmptyVisitor.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Supplies empty method bodies to be overridden by subclasses. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ExceptionThrower.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ExceptionThrower.java index 23b84907f81..d41af1032c8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ExceptionThrower.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ExceptionThrower.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denote an instruction that may throw a run-time or a linking diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2D.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2D.java index 49b1ae65d1d..417b429c682 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2D.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2D.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * F2D - Convert float to double diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2I.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2I.java index 471a9f43cb7..a8d75d1389f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2I.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2I.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * F2I - Convert float to int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2L.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2L.java index 67425079747..2f58b563fd5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2L.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/F2L.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * F2L - Convert float to long diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FADD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FADD.java index 3daab6215bd..6460c871037 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FADD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FADD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FADD - Add floats diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FALOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FALOAD.java index f82001545f9..c3e67ab8f26 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FALOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FALOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FALOAD - Load float from array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FASTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FASTORE.java index 48336d10ffe..231eb319684 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FASTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FASTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FASTORE - Store into float array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCMPG.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCMPG.java index c1926e12102..761df11e7e9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCMPG.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCMPG.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FCMPG - Compare floats: value1 > value2 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCMPL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCMPL.java index 4ed62bf00a0..a6aa1780681 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCMPL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCMPL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FCMPL - Compare floats: value1 < value2 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCONST.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCONST.java index 12e8bcd9b0c..e54a8c0d576 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCONST.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCONST.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FCONST - Push 0.0, 1.0 or 2.0, other values cause an exception diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FDIV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FDIV.java index 639ea5bbac1..8c7da046dfe 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FDIV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FDIV.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FDIV - Divide floats diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FLOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FLOAD.java index 6ffb86dcf52..afd730cf528 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FLOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FLOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FLOAD - Load float from local variable diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FMUL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FMUL.java index f8fc49eb331..fbba7f71f34 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FMUL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FMUL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FMUL - Multiply floats diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FNEG.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FNEG.java index 6428fb61d94..33fe74faa22 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FNEG.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FNEG.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FNEG - Negate float diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FREM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FREM.java index 6ec99a03ed0..ad0f94de62d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FREM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FREM.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FREM - Remainder of floats diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FRETURN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FRETURN.java index 32e9a80ae04..d2198f82162 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FRETURN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FRETURN.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FRETURN - Return float from method diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FSTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FSTORE.java index bf80791f3cf..124e8b347f1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FSTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FSTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FSTORE - Store float into local variable diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FSUB.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FSUB.java index da59fcf3552..213c802a23f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FSUB.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FSUB.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * FSUB - Substract floats diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java index 290a3c03eee..eb139241b91 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.classfile.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java index e75d8d8e4a2..677dba091df 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java @@ -2,62 +2,26 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; import com.sun.org.apache.bcel.internal.Constants; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.*; import java.util.ArrayList; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldInstruction.java index 1c9f6e394fb..30224f1e20d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.ConstantPool; import com.sun.org.apache.bcel.internal.classfile.ConstantUtf8; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldObserver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldObserver.java index e4d7ba50c4b..b2ee9d1a957 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldObserver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldObserver.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Imnplement this interface if you're interested in changes to a FieldGen object diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldOrMethod.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldOrMethod.java index ac4e83b91a2..5d32603ac5c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldOrMethod.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldOrMethod.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.*; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GETFIELD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GETFIELD.java index 139f139cbc3..2f2ae53ae31 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GETFIELD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GETFIELD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.ExceptionConstants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GETSTATIC.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GETSTATIC.java index 1968ce39ff0..d66b2ddef0c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GETSTATIC.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GETSTATIC.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.ExceptionConstants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GOTO.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GOTO.java index cfdb421a5b0..64707b27532 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GOTO.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GOTO.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GOTO_W.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GOTO_W.java index b4944820f9c..95e1727d205 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GOTO_W.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GOTO_W.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GotoInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GotoInstruction.java index 2beaea57404..aa5ac98971c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GotoInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/GotoInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Super class for GOTO diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2B.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2B.java index c933cf479a3..4bc35f44a9e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2B.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2B.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * I2B - Convert int to byte diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2C.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2C.java index 7da43e4292f..704001a96f7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2C.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2C.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * I2C - Convert int to char diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2D.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2D.java index a75907a812e..c35511dc17d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2D.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2D.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * I2D - Convert int to double diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2F.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2F.java index 7ec7befddb8..567e4b08cd3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2F.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2F.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * I2F - Convert int to float diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2L.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2L.java index 4663588b302..f087d4507e7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2L.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2L.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * I2L - Convert int to long diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2S.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2S.java index 52a71a6828e..e917e3e6a70 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2S.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/I2S.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * I2S - Convert int to short diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IADD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IADD.java index ac804e5c808..71127939b4d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IADD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IADD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IADD - Add ints diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IALOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IALOAD.java index 0e999344d2c..e957e6c19b8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IALOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IALOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IALOAD - Load int from array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IAND.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IAND.java index 69826858e33..f62d301c2a5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IAND.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IAND.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IAND - Bitwise AND int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IASTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IASTORE.java index cf1277f73b4..a5f0aa2499d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IASTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IASTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IASTORE - Store into int array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java index 52d1eeceff7..e7668d186f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ICONST - Push value between -1, ..., 5, other values cause an exception diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java index fba149b0e05..7043f0408a3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IDIV - Divide ints diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFEQ.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFEQ.java index 73496cb48d5..87c2bb61e2a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFEQ.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFEQ.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IFEQ - Branch if int comparison with zero succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFGE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFGE.java index 73a14a4e2d6..90636622e7f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFGE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFGE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IFGE - Branch if int comparison with zero succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFGT.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFGT.java index 167826c3163..0195733021f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFGT.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFGT.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IFGT - Branch if int comparison with zero succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFLE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFLE.java index 84b7fa374e9..b5fd9fec1c8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFLE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFLE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IFLE - Branch if int comparison with zero succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFLT.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFLT.java index 5f904cd7ac1..124e874bbfb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFLT.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFLT.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IFLT - Branch if int comparison with zero succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNE.java index 0baf4a87cdf..1d99492a6d0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IFNE - Branch if int comparison with zero succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNONNULL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNONNULL.java index 9131bb25ec7..9b519f5e129 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNONNULL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNONNULL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IFNONNULL - Branch if reference is not null diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNULL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNULL.java index 1a5ccaf5ccf..45b15c22b4f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNULL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IFNULL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IFNULL - Branch if reference is not null diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ACMPEQ.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ACMPEQ.java index 7c0920f6e5d..c18b9c84329 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ACMPEQ.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ACMPEQ.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IF_ACMPEQ - Branch if reference comparison succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ACMPNE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ACMPNE.java index 2813007c97a..5a3df6d8a43 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ACMPNE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ACMPNE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IF_ACMPNE - Branch if reference comparison doesn't succeed diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPEQ.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPEQ.java index a14573653f9..f14a5b88217 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPEQ.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPEQ.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IF_ICMPEQ - Branch if int comparison succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPGE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPGE.java index c629f2c9e66..9b978416da1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPGE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPGE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IF_ICMPGE - Branch if int comparison succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPGT.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPGT.java index 013a72ef721..f0de3fc407d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPGT.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPGT.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IF_ICMPGT - Branch if int comparison succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPLE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPLE.java index 7ada1323c0a..3c13250cafb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPLE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPLE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IF_ICMPLE - Branch if int comparison succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPLT.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPLT.java index 833f06c9e30..849951cf548 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPLT.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPLT.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IF_ICMPLT - Branch if int comparison succeeds diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPNE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPNE.java index ae5ae87bc3a..f1de6f641a3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPNE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IF_ICMPNE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IF_ICMPNE - Branch if int comparison doesn't succeed diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IINC.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IINC.java index 92860079800..897d426a549 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IINC.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IINC.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ILOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ILOAD.java index 05989d93e1d..748da0b860f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ILOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ILOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ILOAD - Load int from local variable onto stack diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMPDEP1.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMPDEP1.java index 281f0878e85..20555243e3d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMPDEP1.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMPDEP1.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IMPDEP1 - Implementation dependent diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMPDEP2.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMPDEP2.java index ba5789be6d5..9caa3523bde 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMPDEP2.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMPDEP2.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IMPDEP2 - Implementation dependent diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMUL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMUL.java index 1df780f199b..8c8e150c725 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMUL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IMUL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IMUL - Multiply ints diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INEG.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INEG.java index fa8931d39b9..c874e95c440 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INEG.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INEG.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * INEG - Negate int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INSTANCEOF.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INSTANCEOF.java index ed1c491c95c..c67ffeb3fd9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INSTANCEOF.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INSTANCEOF.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * INSTANCEOF - Determine if object is of given type diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEINTERFACE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEINTERFACE.java index aed34bde497..bda3a357a46 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEINTERFACE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEINTERFACE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.ConstantPool; import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.ExceptionConstants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKESPECIAL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKESPECIAL.java index d40deed9225..566f58e2112 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKESPECIAL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKESPECIAL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.ExceptionConstants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKESTATIC.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKESTATIC.java index 2a32c69b1b7..2946d477a73 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKESTATIC.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKESTATIC.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.ExceptionConstants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEVIRTUAL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEVIRTUAL.java index a4ffe5b93ca..9e7d7e2622a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEVIRTUAL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEVIRTUAL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.ExceptionConstants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IOR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IOR.java index 8cf0f092a14..3b030d9f34d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IOR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IOR.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IOR - Bitwise OR int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java index 650f7730e66..472ce73bde8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IREM - Remainder of int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IRETURN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IRETURN.java index 9678b5bb41c..53d9384a1aa 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IRETURN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IRETURN.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IRETURN - Return int from method diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISHL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISHL.java index 5f26b9a0b3c..577e3b204a7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISHL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISHL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ISHL - Arithmetic shift left int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISHR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISHR.java index 6a3cb3e0625..e9b121f00c3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISHR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISHR.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ISHR - Arithmetic shift right int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISTORE.java index 22cd14dbfba..fd270fd4d65 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ISTORE - Store int from stack into local variable diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISUB.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISUB.java index 413e9d48915..824b0e3bc60 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISUB.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ISUB.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * ISUB - Substract ints diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IUSHR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IUSHR.java index 917ad39e89b..b9fe7308803 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IUSHR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IUSHR.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IUSHR - Logical shift right int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IXOR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IXOR.java index d51ad6cbc77..27545563dc2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IXOR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IXOR.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * IXOR - Bitwise XOR int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IfInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IfInstruction.java index e5fa48460bf..d677f220b66 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IfInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IfInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Super class for the IFxxx family of instructions. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IndexedInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IndexedInstruction.java index db8e05f4b1e..5c6fb7bc618 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IndexedInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IndexedInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denote entity that refers to an index, e.g. local variable instructions, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java index ed58b5dec60..889d6f8ca79 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.classfile.Utility; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionComparator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionComparator.java index 5a42652a52b..03589cb2dbc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionComparator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionComparator.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Equality of instructions isn't clearly to be defined. You might diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionConstants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionConstants.java index 1ff55ddfdf4..4b624d7cf0a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionConstants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionConstants.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java index f7378aaaf4d..bc4420961ed 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java index 6594e01be08..c490f3550f3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.Utility; import java.util.HashSet; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionList.java index 235950f7d7d..c5bf9b46555 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionList.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.classfile.Constant; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionListObserver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionListObserver.java index 91ad321a5e0..e9721ed6c42 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionListObserver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionListObserver.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Implement this interface if you're interested in changes to an InstructionList object diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionTargeter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionTargeter.java index 3eaeb3a2f96..1d8d25a6a68 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionTargeter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionTargeter.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denote that a class targets InstructionHandles within an InstructionList. Namely diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InvokeInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InvokeInstruction.java index cae2bd59c36..592d11d6ecc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InvokeInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InvokeInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.classfile.*; import java.util.StringTokenizer; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JSR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JSR.java index d5b563bce10..babfc422dba 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JSR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JSR.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JSR_W.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JSR_W.java index 32ceb29b2cc..2776c513e5f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JSR_W.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JSR_W.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JsrInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JsrInstruction.java index f71e1650faf..a67702e7aa0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JsrInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/JsrInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Super class for JSR - Jump to subroutine diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2D.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2D.java index 8d14914bd01..fb0926faa9f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2D.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2D.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * L2D - Convert long to double diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2F.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2F.java index 36571d6db54..afc5b0016b5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2F.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2F.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * L2F - Convert long to float diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2I.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2I.java index cacf3adec9b..be9615f20dd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2I.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/L2I.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * L2I - Convert long to int diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LADD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LADD.java index 6ab1f426cca..999c39c77f8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LADD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LADD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LADD - Add longs diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LALOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LALOAD.java index e7185ac5ce1..7068be8f28e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LALOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LALOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LALOAD - Load long from array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LAND.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LAND.java index c225cac93be..a5fa96c1b17 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LAND.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LAND.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LAND - Bitwise AND longs diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LASTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LASTORE.java index c0e928a7405..04d25d20181 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LASTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LASTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LASTORE - Store into long array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCMP.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCMP.java index 05c1aee26e2..cb2fb4f8404 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCMP.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCMP.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LCMP - Compare longs: diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCONST.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCONST.java index 7fe94a23fb1..a209eadb939 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCONST.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCONST.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LCONST - Push 0 or 1, other values cause an exception diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java index 001d80e804b..7dc55289e7b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC2_W.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC2_W.java index 4a97a2054a4..f06c2cf46b7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC2_W.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC2_W.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LDC2_W - Push long or double from constant pool diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC_W.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC_W.java index 640554e4831..be3f5693f0e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC_W.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC_W.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.IOException; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java index 754696eb05a..55f82cab10e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LDIV - Divide longs diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LLOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LLOAD.java index 1276d37149c..b36e57549e2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LLOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LLOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LLOAD - Load long from local variable diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LMUL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LMUL.java index 16cb083a1d6..aa746fb623a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LMUL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LMUL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LMUL - Multiply longs diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LNEG.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LNEG.java index 61df1bb81ab..b08f303bf55 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LNEG.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LNEG.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LNEG - Negate long diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LOOKUPSWITCH.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LOOKUPSWITCH.java index 19188849fd7..1b026df5289 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LOOKUPSWITCH.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LOOKUPSWITCH.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LOR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LOR.java index baf79332314..19a25deaf8c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LOR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LOR.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LOR - Bitwise OR long diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java index 293684a4778..7f2892d25e7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LREM - Remainder of long diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LRETURN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LRETURN.java index 480ba01f9ce..b09344aee5d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LRETURN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LRETURN.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LRETURN - Return long from method diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSHL.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSHL.java index 780ef7a2556..ae677302842 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSHL.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSHL.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LSHL - Arithmetic shift left long diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSHR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSHR.java index b4993b57e9c..f6a520b2831 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSHR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSHR.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LSHR - Arithmetic shift right long diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSTORE.java index 41d348169b9..3b560d28b03 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LSTORE - Store long into local variable diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSUB.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSUB.java index 38ea67d1791..789c47fe143 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSUB.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LSUB.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LSUB - Substract longs diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LUSHR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LUSHR.java index 6d89c272147..19d83c8f7b7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LUSHR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LUSHR.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LUSHR - Logical shift right long diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LXOR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LXOR.java index 6ebd5da7bdf..56f680125f6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LXOR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LXOR.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * LXOR - Bitwise XOR long diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LineNumberGen.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LineNumberGen.java index a8427a8c812..ebda36320c0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LineNumberGen.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LineNumberGen.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LoadClass.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LoadClass.java index e40190429c8..0cf2b23509c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LoadClass.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LoadClass.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denotes that an instruction may start the process of loading and resolving diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LoadInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LoadInstruction.java index a35e020c2de..6d663263e58 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LoadInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LoadInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denotes an unparameterized instruction to load a value from a local diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableGen.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableGen.java index 1f2fd868e40..92ae424b8cc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableGen.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableGen.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.classfile.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableInstruction.java index f10b91d10e7..26e14a3787f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; import com.sun.org.apache.bcel.internal.classfile.Utility; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java index e50dde4bf65..5fd6d61692c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * MONITORENTER - Enter monitor for object diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java index c088aa89176..d6a87fd64b5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * MONITOREXIT - Exit monitor for object diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MULTIANEWARRAY.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MULTIANEWARRAY.java index 6a490116578..54c9d8b11df 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MULTIANEWARRAY.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MULTIANEWARRAY.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; import com.sun.org.apache.bcel.internal.classfile.ConstantPool; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java index 69345824091..61a3daf61ea 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.classfile.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodObserver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodObserver.java index 1135984dc40..c50acc69558 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodObserver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodObserver.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Implement this interface if you're interested in changes to a MethodGen object diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEW.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEW.java index de0e2f831c0..9fd3014caa1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEW.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEW.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.ExceptionConstants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java index b6d716e3d06..dbf157d847a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NOP.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NOP.java index 1e6ee0aeaf6..8dec0dafbff 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NOP.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NOP.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * NOP - Do nothing diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NamedAndTyped.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NamedAndTyped.java index a1501f45c68..006d6dffd70 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NamedAndTyped.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NamedAndTyped.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denote entity that has both name and type. This is true for local variables, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ObjectType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ObjectType.java index a506edd9540..d3af662a1fc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ObjectType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ObjectType.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.Repository; import com.sun.org.apache.bcel.internal.classfile.JavaClass; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/POP.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/POP.java index 300a6be5452..76c460a21d5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/POP.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/POP.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * POP - Pop top operand stack word diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/POP2.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/POP2.java index aebcadab39e..f63925841f6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/POP2.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/POP2.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * POP2 - Pop two top operand stack words diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUSH.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUSH.java index 31a7884fbfe..da73c7fd6af 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUSH.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUSH.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUTFIELD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUTFIELD.java index 95725545774..9f7b42f108c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUTFIELD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUTFIELD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.ExceptionConstants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUTSTATIC.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUTSTATIC.java index a4116b66558..ffb7a626bc2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUTSTATIC.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PUTSTATIC.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.ExceptionConstants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PopInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PopInstruction.java index 4168d2f9d13..f195a83477d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PopInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PopInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denotes an unparameterized instruction to pop a value on top from the stack, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PushInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PushInstruction.java index f143c978a46..bb702276412 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PushInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/PushInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denotes an unparameterized instruction to produce a value on top of the stack, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RET.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RET.java index 27e242a433f..093a870d27f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RET.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RET.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RETURN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RETURN.java index f937e50fc16..c9b6621152d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RETURN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RETURN.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * RETURN - Return from void method diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java index 0956b58008e..1bd3b61887a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.Repository; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java index 63181d01a4f..12906a06391 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.ExceptionConstants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnaddressType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnaddressType.java index 501efdd09ec..f62f6db9ccf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnaddressType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnaddressType.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import java.util.Objects; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SALOAD.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SALOAD.java index 06d03ac7cc2..126f599a38d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SALOAD.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SALOAD.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * SALOAD - Load short from array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SASTORE.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SASTORE.java index 9b20b93f34a..10e4f215abf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SASTORE.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SASTORE.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * SASTORE - Store into short array diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SIPUSH.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SIPUSH.java index e1717310b26..b0413b6fd3f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SIPUSH.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SIPUSH.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWAP.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWAP.java index 625cbdb5435..a85e91da980 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWAP.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWAP.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * SWAP - Swa top operand stack word diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java index df1fd81eac3..fb4dce327ea 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * SWITCH - Branch depending on int value, generates either LOOKUPSWITCH or diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Select.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Select.java index 0cf47f634ca..94d20cba11a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Select.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Select.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackConsumer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackConsumer.java index efea4a6858c..1dd12439cfb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackConsumer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackConsumer.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denote an instruction that may consume a value from the stack. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackInstruction.java index b6a0c39b936..82fdd2c89e3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Super class for stack operations like DUP and POP. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackProducer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackProducer.java index dc1231c3680..9aa3795c040 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackProducer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StackProducer.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denote an instruction that may produce a value on top of the stack diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StoreInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StoreInstruction.java index ed3197a48b9..3f27a250cc5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StoreInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/StoreInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denotes an unparameterized instruction to store a value into a local variable, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TABLESWITCH.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TABLESWITCH.java index 5fb9075b5fd..13d91c825c5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TABLESWITCH.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TABLESWITCH.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import com.sun.org.apache.bcel.internal.util.ByteSequence; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TargetLostException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TargetLostException.java index fcac0fe3753..2acd713f3a1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TargetLostException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TargetLostException.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Thrown by InstructionList.remove() when one or multiple disposed instruction diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Type.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Type.java index b496ed85edc..e936ca9b891 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Type.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Type.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.Constants; import com.sun.org.apache.bcel.internal.classfile.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TypedInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TypedInstruction.java index 09ddae4b979..6332a4e5747 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TypedInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TypedInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Get the type associated with an instruction, int for ILOAD, or the type diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/UnconditionalBranch.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/UnconditionalBranch.java index c310a46e171..5c96001f0c2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/UnconditionalBranch.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/UnconditionalBranch.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denotes an instruction to perform an unconditional branch, i.e., GOTO, JSR. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/VariableLengthInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/VariableLengthInstruction.java index 9026a16b2fe..6395b8d9ec0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/VariableLengthInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/VariableLengthInstruction.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Denotes an instruction to be a variable length instruction, such as diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Visitor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Visitor.java index 97c4469d657..0a1eb5ee1d5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Visitor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Visitor.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.generic; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Interface implementing the Visitor pattern programming style. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/AttributeHTML.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/AttributeHTML.java index 3cafcba3780..15417bdd19a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/AttributeHTML.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/AttributeHTML.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.*; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java index a3b2543707b..084fc7bbd7f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java @@ -2,6 +2,23 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; import com.sun.org.apache.bcel.internal.generic.*; @@ -10,59 +27,6 @@ import com.sun.org.apache.bcel.internal.Constants; import java.io.PrintWriter; import java.util.*; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ /** * Factory creates il.append() statements, and sets instruction targets. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELifier.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELifier.java index 87a82447a67..de157f0d345 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELifier.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELifier.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.*; import com.sun.org.apache.bcel.internal.generic.*; import com.sun.org.apache.bcel.internal.Repository; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ByteSequence.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ByteSequence.java index e0dacd7c59b..f1ea3f9c108 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ByteSequence.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ByteSequence.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Class2HTML.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Class2HTML.java index 52b9df945c7..1ecbb71d632 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Class2HTML.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Class2HTML.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; import java.util.BitSet; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassLoader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassLoader.java index 1be5b3b2a51..12708ad89f3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassLoader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassLoader.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.util.Hashtable; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassLoaderRepository.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassLoaderRepository.java index eec10f4e3a3..80e844216d6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassLoaderRepository.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassLoaderRepository.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassQueue.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassQueue.java index 2817094ff19..a4dda645d10 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassQueue.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassQueue.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.util.LinkedList; import com.sun.org.apache.bcel.internal.classfile.JavaClass; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassSet.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassSet.java index e7ea2e437d0..27dd9b7ce82 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassSet.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassSet.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.util.HashMap; import java.util.Collection; import com.sun.org.apache.bcel.internal.classfile.JavaClass; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassStack.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassStack.java index 87029e2f6fe..52275dda1f1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassStack.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassStack.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.util.Stack; import com.sun.org.apache.bcel.internal.classfile.JavaClass; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassVector.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassVector.java index 28c4789dbe6..f95ef244dce 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassVector.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassVector.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.util.ArrayList; import com.sun.org.apache.bcel.internal.classfile.JavaClass; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/CodeHTML.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/CodeHTML.java index cae2ea62312..eb9d4bf65ec 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/CodeHTML.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/CodeHTML.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.*; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ConstantHTML.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ConstantHTML.java index 52f359188d8..ac1d8501783 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ConstantHTML.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ConstantHTML.java @@ -2,62 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.*; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/MethodHTML.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/MethodHTML.java index d6d5429471f..b2c6725c1e1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/MethodHTML.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/MethodHTML.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.*; import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Repository.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Repository.java index d588ba9e37d..f38198a236b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Repository.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Repository.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import com.sun.org.apache.bcel.internal.classfile.JavaClass; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SecuritySupport.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SecuritySupport.java index 059a5cd1915..c33995983f7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SecuritySupport.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SecuritySupport.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SyntheticRepository.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SyntheticRepository.java index f1cb8913b01..42fa078a37c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SyntheticRepository.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SyntheticRepository.java @@ -2,61 +2,25 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.sun.org.apache.bcel.internal.util; -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ import java.io.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/extensions/ExpressionContext.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/extensions/ExpressionContext.java index 703e2af54e7..b6f5a7ff50a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/extensions/ExpressionContext.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/extensions/ExpressionContext.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExpressionContext.java,v 1.2.4.1 2005/09/10 19:34:03 jeffsuttor Exp $ - */ + package com.sun.org.apache.xalan.internal.extensions; import javax.xml.transform.ErrorListener; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltBase.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltBase.java index 31f80b86c97..0b99ee44713 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltBase.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltBase.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExsltBase.java,v 1.1.2.1 2005/08/01 02:08:51 jeffsuttor Exp $ - */ + package com.sun.org.apache.xalan.internal.lib; import com.sun.org.apache.xml.internal.dtm.ref.DTMNodeProxy; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltCommon.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltCommon.java index b4493c06d0e..e272192ec7b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltCommon.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltCommon.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExsltCommon.java,v 1.2.4.1 2005/09/15 02:45:24 jeffsuttor Exp $ - */ + package com.sun.org.apache.xalan.internal.lib; import com.sun.org.apache.xalan.internal.extensions.ExpressionContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDatetime.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDatetime.java index d717d8d1fa2..479f152813c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDatetime.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDatetime.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExsltDatetime.java,v 1.2.4.1 2005/09/10 18:50:49 jeffsuttor Exp $ - */ package com.sun.org.apache.xalan.internal.lib; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDynamic.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDynamic.java index 7f55d89180d..9446b332867 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDynamic.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDynamic.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExsltDynamic.java,v 1.1.2.1 2005/08/01 02:08:51 jeffsuttor Exp $ - */ + package com.sun.org.apache.xalan.internal.lib; import javax.xml.parsers.DocumentBuilder; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltMath.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltMath.java index 6066832a2a6..25cf7249184 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltMath.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltMath.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExsltMath.java,v 1.1.2.1 2005/08/01 02:08:50 jeffsuttor Exp $ - */ + package com.sun.org.apache.xalan.internal.lib; import com.sun.org.apache.xpath.internal.NodeSet; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java index aa8bea5b0ce..31fb531a90d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExsltStrings.java,v 1.1.2.1 2005/08/01 02:08:48 jeffsuttor Exp $ - */ + package com.sun.org.apache.xalan.internal.lib; import java.util.StringTokenizer; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/Extensions.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/Extensions.java index 17ff0567cd6..02ed1c06ebb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/Extensions.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/Extensions.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Extensions.java,v 1.2.4.1 2005/09/10 18:53:32 jeffsuttor Exp $ - */ + package com.sun.org.apache.xalan.internal.lib; import java.util.StringTokenizer; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/NodeInfo.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/NodeInfo.java index 05caa00aba2..ed7b9ca1e67 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/NodeInfo.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/NodeInfo.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeInfo.java,v 1.2.4.1 2005/09/10 18:54:37 jeffsuttor Exp $ - */ package com.sun.org.apache.xalan.internal.lib; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLMessages.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLMessages.java index 00d11e97f51..63df7798fbe 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLMessages.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLMessages.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XSLMessages.java,v 1.2.4.1 2005/09/09 07:41:10 pvedula Exp $ - */ + package com.sun.org.apache.xalan.internal.res; import com.sun.org.apache.xalan.internal.utils.SecuritySupport; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java index 5ef374f3fae..7418ea04aec 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java index d1a408f6762..b8ded8c6389 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_en.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_en.java index fb5348b52e5..0748aa37948 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_en.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_en.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XSLTErrorResources_en.java,v 1.2.4.1 2005/09/13 10:18:30 pvedula Exp $ - */ + package com.sun.org.apache.xalan.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java index ef0b0f6af22..cf3c5faa5e6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java index 2ffbbba856b..d64ada6237c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java index aae3c36dfc8..0cf4dcfd4d0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; @@ -1013,7 +1015,7 @@ public class XSLTErrorResources_it extends ListResourceBundle "Propriet\u00E0 di sistema org.xml.sax.parser non specificata"}, { ER_PARSER_ARG_CANNOT_BE_NULL, - "L''argomento del parser non deve essere nullo"}, + "L'argomento del parser non deve essere nullo"}, { ER_FEATURE, "Funzione: {0}"}, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java index 7460d3efef8..88984432a1e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java index fe292ee08d6..b2de7530d2c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; @@ -1013,7 +1015,7 @@ public class XSLTErrorResources_ko extends ListResourceBundle "\uC2DC\uC2A4\uD15C \uC18D\uC131 org.xml.sax.parser\uAC00 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, { ER_PARSER_ARG_CANNOT_BE_NULL, - "\uAD6C\uBB38 \uBD84\uC11D\uAE30 \uC778\uC218\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, + "\uAD6C\uBB38\uBD84\uC11D\uAE30 \uC778\uC218\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, { ER_FEATURE, "\uAE30\uB2A5: {0}"}, @@ -1250,7 +1252,7 @@ public class XSLTErrorResources_ko extends ListResourceBundle "\uD2B9\uC218 \uCDA9\uB3CC\uC774 \uBC1C\uACAC\uB428: {0}. \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC5D0\uC11C \uBC1C\uACAC\uB41C \uB9C8\uC9C0\uB9C9 \uD56D\uBAA9\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."}, { WG_PARSING_AND_PREPARING, - "========= \uAD6C\uBB38 \uBD84\uC11D \uD6C4 {0} \uC900\uBE44 \uC911 =========="}, + "========= \uAD6C\uBB38\uBD84\uC11D \uD6C4 {0} \uC900\uBE44 \uC911 =========="}, { WG_ATTR_TEMPLATE, "\uC18D\uC131 \uD15C\uD50C\uB9AC\uD2B8, {0}"}, @@ -1355,7 +1357,7 @@ public class XSLTErrorResources_ko extends ListResourceBundle { "optionOUT", " [-OUT outputFileName]"}, { "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"}, { "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"}, - { "optionPARSER", " [-PARSER \uAD6C\uBB38 \uBD84\uC11D\uAE30 \uC5F0\uACB0\uC758 \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984]"}, + { "optionPARSER", " [-PARSER \uAD6C\uBB38\uBD84\uC11D\uAE30 \uC5F0\uACB0\uC758 \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984]"}, { "optionE", " [-E(\uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uD655\uC7A5 \uC548\uD568)]"}, { "optionV", " [-E(\uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uD655\uC7A5 \uC548\uD568)]"}, { "optionQC", " [-QC(\uC790\uB3D9 \uD328\uD134 \uCDA9\uB3CC \uACBD\uACE0)]"}, @@ -1376,9 +1378,9 @@ public class XSLTErrorResources_ko extends ListResourceBundle { "optionHTML", " [-HTML(HTML \uD3EC\uB9F7\uD130 \uC0AC\uC6A9)]"}, { "optionPARAM", " [-PARAM \uC774\uB984 \uD45C\uD604\uC2DD(\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uB9E4\uAC1C\uBCC0\uC218 \uC124\uC815)]"}, { "noParsermsg1", "XSL \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - { "noParsermsg2", "** \uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"}, + { "noParsermsg2", "** \uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"}, { "noParsermsg3", "\uD074\uB798\uC2A4 \uACBD\uB85C\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624."}, - { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, + { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, { "noParsermsg5", "IBM AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, { "optionURIRESOLVER", " [-URIRESOLVER \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984(URI \uBD84\uC11D\uC5D0 \uC0AC\uC6A9\uD560 URIResolver)]"}, { "optionENTITYRESOLVER", " [-ENTITYRESOLVER \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984(\uC5D4\uD2F0\uD2F0 \uBD84\uC11D\uC5D0 \uC0AC\uC6A9\uD560 EntityResolver)]"}, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java index 7eedeb87ff9..59df2cd2fd6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java index 183697b5025..0e6c8b9f714 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; @@ -480,7 +482,7 @@ public class XSLTErrorResources_sv extends ListResourceBundle {"ER0000" , "{0}" }, { ER_NO_CURLYBRACE, - "Fel: Uttryck kan inte inneh\u00E5lla '{'"}, + "Fel: Uttryck f\u00E5r inte inneh\u00E5lla '{'"}, { ER_ILLEGAL_ATTRIBUTE , "{0} har ett otill\u00E5tet attribut: {1}"}, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java index bd8f9a5dd67..265addb5bff 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java index ee8a11b35f6..b195cdfd1c0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xalan.internal.res; import java.util.ListResourceBundle; @@ -1022,7 +1024,7 @@ public class XSLTErrorResources_zh_TW extends ListResourceBundle "\u5C6C\u6027: {0}"}, { ER_NULL_ENTITY_RESOLVER, - "\u7A7A\u503C\u500B\u9AD4\u89E3\u6790\u5668"}, + "\u7A7A\u503C\u5BE6\u9AD4\u89E3\u6790\u5668"}, { ER_NULL_DTD_HANDLER, "\u7A7A\u503C DTD \u8655\u7406\u7A0B\u5F0F"}, @@ -1356,8 +1358,8 @@ public class XSLTErrorResources_zh_TW extends ListResourceBundle { "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"}, { "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"}, { "optionPARSER", " [-PARSER \u5256\u6790\u5668\u806F\u7D61\u7684\u5B8C\u6574\u985E\u5225\u540D\u7A31]"}, - { "optionE", " [-E (\u52FF\u5C55\u958B\u500B\u9AD4\u53C3\u7167)]"}, - { "optionV", " [-E (\u52FF\u5C55\u958B\u500B\u9AD4\u53C3\u7167)]"}, + { "optionE", " [-E (\u52FF\u5C55\u958B\u5BE6\u9AD4\u53C3\u7167)]"}, + { "optionV", " [-E (\u52FF\u5C55\u958B\u5BE6\u9AD4\u53C3\u7167)]"}, { "optionQC", " [-QC (\u975C\u97F3\u6A23\u5F0F\u885D\u7A81\u8B66\u544A)]"}, { "optionQ", " [-Q (\u975C\u97F3\u6A21\u5F0F)]"}, { "optionLF", " [-LF (\u8F38\u51FA\u4E0A\u50C5\u4F7F\u7528\u63DB\u884C\u5B57\u5143 {\u9810\u8A2D\u70BA CR/LF})]"}, @@ -1381,7 +1383,7 @@ public class XSLTErrorResources_zh_TW extends ListResourceBundle { "noParsermsg4", "\u82E5\u7121 IBM \u7684 XML Parser for Java\uFF0C\u53EF\u4E0B\u8F09\u81EA"}, { "noParsermsg5", "IBM \u7684 AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, { "optionURIRESOLVER", " [-URIRESOLVER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u89E3\u6790 URI \u7684 URIResolver)]"}, - { "optionENTITYRESOLVER", " [-ENTITYRESOLVER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u89E3\u6790\u500B\u9AD4\u7684 EntityResolver )]"}, + { "optionENTITYRESOLVER", " [-ENTITYRESOLVER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u89E3\u6790\u5BE6\u9AD4\u7684 EntityResolver )]"}, { "optionCONTENTHANDLER", " [-CONTENTHANDLER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u5E8F\u5217\u5316\u8F38\u51FA\u7684 ContentHandler)]"}, { "optionLINENUMBERS", " [-L \u4F7F\u7528\u884C\u865F\u65BC\u4F86\u6E90\u6587\u4EF6]"}, { "optionSECUREPROCESSING", " [-SECURE (\u5C07\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u3002)]"}, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/templates/Constants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/templates/Constants.java index e4c75393649..6fe0f26014f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/templates/Constants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/templates/Constants.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Constants.java,v 1.2.4.1 2005/09/10 19:50:56 jeffsuttor Exp $ - */ + package com.sun.org.apache.xalan.internal.templates; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ConfigurationError.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ConfigurationError.java index 5832f82868b..26438e437c8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ConfigurationError.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ConfigurationError.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ObjectFactory.java,v 1.2.4.1 2005/09/15 02:39:54 jeffsuttor Exp $ - */ package com.sun.org.apache.xalan.internal.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java index 0908e205173..e858ac47b63 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ObjectFactory.java,v 1.2.4.1 2005/09/15 02:39:54 jeffsuttor Exp $ - */ package com.sun.org.apache.xalan.internal.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java index 0f486f482dc..d1ad28ac9c1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SecuritySupport.java,v 1.1.2.1 2005/08/01 02:08:48 jeffsuttor Exp $ - */ package com.sun.org.apache.xalan.internal.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/CollatorFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/CollatorFactory.java index a45c3538eb2..318485d427e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/CollatorFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/CollatorFactory.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CollatorFactory.java,v 1.2.4.1 2005/08/31 10:16:33 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/DOMCache.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/DOMCache.java index 1a8efb1be18..6d37efb0348 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/DOMCache.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/DOMCache.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOMCache.java,v 1.2.4.1 2005/08/31 10:23:55 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/DOMEnhancedForDTM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/DOMEnhancedForDTM.java index f7e1b30e84f..0194201bb42 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/DOMEnhancedForDTM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/DOMEnhancedForDTM.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOMEnhancedForDTM.java,v 1.2.4.1 2005/08/31 10:25:13 pvedula Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/NodeIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/NodeIterator.java index 65039f475db..a8eba9135b0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/NodeIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/NodeIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeIterator.java,v 1.2.4.1 2005/08/31 10:26:27 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/ProcessorVersion.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/ProcessorVersion.java index f3d8e4d507f..dcfab47dc8e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/ProcessorVersion.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/ProcessorVersion.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ProcessorVersion.java,v 1.2.4.1 2005/08/31 10:30:36 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/StripFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/StripFilter.java index ed5b878eae0..53393019c5e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/StripFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/StripFilter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StripFilter.java,v 1.2.4.1 2005/08/31 10:43:36 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java index ca6ff50ef0f..5eb07d04e24 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Translet.java,v 1.2.4.1 2005/08/31 10:46:27 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/TransletException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/TransletException.java index 19e12fe024d..d330f6b1c1b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/TransletException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/TransletException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: TransletException.java,v 1.2.4.1 2005/08/31 10:47:50 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsoluteLocationPath.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsoluteLocationPath.java index 8bfe6cb9907..ca9ca3e397a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsoluteLocationPath.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsoluteLocationPath.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AbsoluteLocationPath.java,v 1.2.4.1 2005/09/12 09:44:03 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsolutePathPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsolutePathPattern.java index c25bae43675..9de660708f1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsolutePathPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsolutePathPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AbsolutePathPattern.java,v 1.2.4.1 2005/09/01 09:17:09 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AlternativePattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AlternativePattern.java index 7adcb483fcb..9a727f9607b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AlternativePattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AlternativePattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AlternativePattern.java,v 1.2.4.1 2005/09/01 09:18:46 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AncestorPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AncestorPattern.java index 10bfa7d5b9a..bda61123c45 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AncestorPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AncestorPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AncestorPattern.java,v 1.2.4.1 2005/09/01 09:19:41 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyImports.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyImports.java index ceba568e279..ac19717af58 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyImports.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyImports.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ApplyImports.java,v 1.2.4.1 2005/09/13 12:22:02 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ArgumentList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ArgumentList.java index 6c1757c11b4..ce654252e81 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ArgumentList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ArgumentList.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ArgumentList.java,v 1.2.4.1 2005/09/01 10:18:19 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Attribute.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Attribute.java index 25f6b56a97f..a659d2e5ed8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Attribute.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Attribute.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Attribute.java,v 1.2.4.1 2005/09/01 10:20:59 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValue.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValue.java index bd1a3179a94..3130ee9cb49 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValue.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValue.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AttributeValue.java,v 1.2.4.1 2005/09/01 10:25:49 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java index 8185d11d3d4..0b6f593c568 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: BinOpExpr.java,v 1.2.4.1 2005/09/01 11:42:27 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java index 16eb6d412b5..4f18bdcf3ee 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: BooleanCall.java,v 1.2.4.1 2005/09/01 11:43:50 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanExpr.java index 27fe966b692..5d66ff4d7ce 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanExpr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: BooleanExpr.java,v 1.2.4.1 2005/09/01 11:44:57 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java index 2e2ca146e84..93a2b2cbf44 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java @@ -2,13 +2,14 @@ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java index c1131f3b9c4..06862ee0dd0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CastCall.java,v 1.2.4.1 2005/09/01 11:47:58 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java index b0b9de9d7ad..1b5ee13d6f1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CeilingCall.java,v 1.2.4.1 2005/09/01 11:59:19 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Closure.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Closure.java index 06d7801a407..b89b9dfbe4a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Closure.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Closure.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Closure.java,v 1.2.4.1 2005/09/01 12:01:23 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Comment.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Comment.java index 0b25a453073..37ce5a1fd46 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Comment.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Comment.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Comment.java,v 1.2.4.1 2005/09/01 12:02:37 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CompilerException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CompilerException.java index c8f673e2fdf..76786aa471d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CompilerException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CompilerException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CompilerException.java,v 1.2.4.1 2005/09/01 12:04:22 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java index 4b3ac6a08a5..040320d3eff 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ConcatCall.java,v 1.2.4.1 2005/09/01 12:07:31 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Constants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Constants.java index def384b8c48..22bc7616a2c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Constants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Constants.java @@ -99,7 +99,7 @@ public interface Constants extends InstructionConstants { = com.sun.org.apache.bcel.internal.Constants.ACC_STATIC; public static final String MODULE_SIG - = "Ljava/lang/reflect/Module;"; + = "Ljava/lang/Module;"; public static final String CLASS_SIG = "Ljava/lang/Class;"; public static final String STRING_SIG @@ -255,7 +255,7 @@ public interface Constants extends InstructionConstants { public static final String CLASS_CLASS = "java.lang.Class"; public static final String MODULE_CLASS - = "java.lang.reflect.Module"; + = "java.lang.Module"; public static final String STRING_CLASS = "java.lang.String"; public static final String OBJECT_CLASS diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java index e0cd56c0728..18610a49c4a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ContainsCall.java,v 1.2.4.1 2005/09/01 12:12:06 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Copy.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Copy.java index 6c921bb8383..f485275783e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Copy.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Copy.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Copy.java,v 1.2.4.1 2005/09/01 12:14:32 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CopyOf.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CopyOf.java index ed60f4fec8e..5cc06737a0c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CopyOf.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CopyOf.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CopyOf.java,v 1.2.4.1 2005/09/01 12:16:22 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CurrentCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CurrentCall.java index cca6ea3147f..9cdae02c6fb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CurrentCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CurrentCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CurrentCall.java,v 1.2.4.1 2005/09/01 12:23:16 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DecimalFormatting.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DecimalFormatting.java index 8c89eaef400..0e82c7f196d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DecimalFormatting.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DecimalFormatting.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DecimalFormatting.java,v 1.2.4.1 2005/09/12 10:14:32 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java index 44063a3d6a9..f2b9312b0a4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DocumentCall.java,v 1.2.4.1 2005/09/01 14:10:13 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java index 4b49f1cb83d..74abd4f1e0b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ElementAvailableCall.java,v 1.2.4.1 2005/09/01 14:13:01 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/EqualityExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/EqualityExpr.java index e1d9b0a25cd..e6fe7ee3052 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/EqualityExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/EqualityExpr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: EqualityExpr.java,v 1.2.4.1 2005/09/12 10:16:52 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java index 64e440d9863..6067dc3ac61 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Expression.java,v 1.2.4.1 2005/09/01 14:17:51 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Fallback.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Fallback.java index d04eb9af615..f509a8bc40e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Fallback.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Fallback.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Fallback.java,v 1.2.4.1 2005/09/01 14:22:25 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java index c4842835537..733159cacf5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FilterExpr.java,v 1.2.4.1 2005/09/12 10:22:50 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterParentPath.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterParentPath.java index 2d3b75dc4ec..f2971ae8621 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterParentPath.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterParentPath.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FilterParentPath.java,v 1.2.4.1 2005/09/12 10:24:55 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilteredAbsoluteLocationPath.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilteredAbsoluteLocationPath.java index 82174b58834..6602b9a0db1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilteredAbsoluteLocationPath.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilteredAbsoluteLocationPath.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FilteredAbsoluteLocationPath.java,v 1.2.4.1 2005/09/12 10:26:50 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java index bd39136cc3e..085cd22098e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FloorCall.java,v 1.2.4.1 2005/09/01 15:16:15 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java index 43244b378bf..ae5459a5fc4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FlowList.java,v 1.2.4.1 2005/09/01 15:21:43 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java index 4aa9311bf2f..c41a050cf80 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FormatNumberCall.java,v 1.2.4.1 2005/09/01 15:26:46 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java index 8cad4275a5b..fc3d1d93752 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FunctionAvailableCall.java,v 1.2.4.1 2005/09/01 15:30:25 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java index 9ffae4186aa..f686218e919 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: GenerateIdCall.java,v 1.2.4.1 2005/09/01 15:33:17 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IdKeyPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IdKeyPattern.java index 845117d9680..cf32ae16814 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IdKeyPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IdKeyPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IdKeyPattern.java,v 1.5 2005/09/28 13:48:10 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IdPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IdPattern.java index ef3362c6437..c9e9847815d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IdPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IdPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IdPattern.java,v 1.2.4.1 2005/09/01 15:37:33 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/If.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/If.java index a92a6a0dd8f..dd8f82752e4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/If.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/If.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: If.java,v 1.2.4.1 2005/09/01 15:39:47 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IllegalCharException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IllegalCharException.java index 62271b2ae2b..353dd3b4df6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IllegalCharException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IllegalCharException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IllegalCharException.java,v 1.2.4.1 2005/09/13 12:39:15 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Instruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Instruction.java index 50624cfe47f..1275fcd460e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Instruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Instruction.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Instruction.java,v 1.2.4.1 2005/09/01 15:45:11 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IntExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IntExpr.java index 06a581cffa5..658d306f580 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IntExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/IntExpr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IntExpr.java,v 1.2.4.1 2005/09/01 15:46:32 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java index e85c8edfd8b..e47d6c9626c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2006 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: KeyCall.java,v 1.7 2006/06/19 19:49:04 spericas Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyPattern.java index 5a8abdb4145..77ead97efba 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: KeyPattern.java,v 1.2.4.1 2005/09/01 15:50:14 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java index ceb6bbf16bf..212c74ffd2f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LangCall.java,v 1.2.4.1 2005/09/01 15:54:25 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LastCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LastCall.java index 7159ece439c..84614a4429f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LastCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LastCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LastCall.java,v 1.2.4.1 2005/09/01 15:55:34 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralAttribute.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralAttribute.java index dc99a8d7b68..67ee1a88df9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralAttribute.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralAttribute.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LiteralAttribute.java,v 1.2.4.1 2005/09/12 10:38:03 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralExpr.java index d97001c1fb6..da84c2e1b25 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralExpr.java @@ -2,15 +2,15 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ - /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LiteralExpr.java,v 1.2.4.1 2005/09/01 15:58:53 pvedula Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java index 8a9fcae0417..7581eeae21c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LocalNameCall.java,v 1.2.4.1 2005/09/01 16:00:21 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocationPathPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocationPathPattern.java index 391809d3e48..d3f68348a82 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocationPathPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocationPathPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LocationPathPattern.java,v 1.2.4.1 2005/09/12 10:42:42 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java index 6e295ba79dd..3144d2a11ac 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LogicalExpr.java,v 1.2.4.1 2005/09/01 16:03:31 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Message.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Message.java index 034a26782ef..cda255f0fca 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Message.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Message.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Message.java,v 1.2.4.1 2005/09/02 06:47:02 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java index fc94c15cb73..fb977d1c832 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NameBase.java,v 1.2.4.1 2005/09/02 10:17:31 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java index cb169d03388..712f5adde8a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NameCall.java,v 1.2.4.1 2005/09/02 10:19:11 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceAlias.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceAlias.java index 8d480998eea..2ac30482c47 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceAlias.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceAlias.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NamespaceAlias.java,v 1.2.4.1 2005/09/02 10:20:55 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java index 2fe7f3fafb9..9a398a79517 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NamespaceUriCall.java,v 1.2.4.1 2005/09/02 10:25:26 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NodeTest.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NodeTest.java index 5ae7c898d4e..26c8b929622 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NodeTest.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NodeTest.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeTest.java,v 1.2.4.1 2005/09/02 10:31:14 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java index bcc2463e5d5..b4e1a0d7e63 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NotCall.java,v 1.2.4.1 2005/09/02 10:32:18 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java index 9b586ac265a..20aff53298a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Number.java,v 1.2.4.1 2005/09/21 09:40:51 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java index d621bf20ab7..619bb38f22f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NumberCall.java,v 1.2.4.1 2005/09/02 10:39:10 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Otherwise.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Otherwise.java index b1358905ea1..fa0a4d9962c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Otherwise.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Otherwise.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Otherwise.java,v 1.2.4.1 2005/09/02 10:58:56 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Output.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Output.java index 0f183b95272..90f1e5f766c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Output.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Output.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Output.java,v 1.2.4.1 2005/09/12 10:53:00 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Param.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Param.java index 41c8ff356cd..031ff811f19 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Param.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Param.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Param.java,v 1.2.4.1 2005/09/02 11:03:42 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParameterRef.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParameterRef.java index ed051fa6607..2ce8e5939eb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParameterRef.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParameterRef.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ParameterRef.java,v 1.2.4.1 2005/09/02 11:05:08 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentLocationPath.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentLocationPath.java index 9ecd74a5aab..50106da2eb2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentLocationPath.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentLocationPath.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ParentLocationPath.java,v 1.2.4.1 2005/09/12 10:56:30 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentPattern.java index 26b01a21980..4743f1b4919 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ParentPattern.java,v 1.2.4.1 2005/09/02 11:10:09 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Pattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Pattern.java index 79b2e0e88fa..06cdab30e37 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Pattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Pattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Pattern.java,v 1.2.4.1 2005/09/12 11:00:31 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/PositionCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/PositionCall.java index f656aece747..680ce56fda8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/PositionCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/PositionCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: PositionCall.java,v 1.2.4.1 2005/09/02 11:17:10 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java index 4327f0de939..709815e2eac 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Predicate.java,v 1.2.4.1 2005/09/12 11:02:18 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstruction.java index 53971c91bef..6780980a82d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstruction.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ProcessingInstruction.java,v 1.2.4.1 2005/09/12 11:03:05 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java index 9fcdf1c6c6e..9dc13cba95f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ProcessingInstructionPattern.java,v 1.2.4.1 2005/09/12 11:04:08 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/QName.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/QName.java index 896b216a428..087eaeb66dd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/QName.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/QName.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: QName.java,v 1.2.4.1 2005/09/02 11:45:56 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RealExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RealExpr.java index 5471fe59487..bec4e47cebc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RealExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RealExpr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: RealExpr.java,v 1.2 2005/08/16 22:30:35 jeffsuttor Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java index fca7e67fcdf..a4e9b9b6226 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: RelationalExpr.java,v 1.2.4.1 2005/09/12 11:05:00 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelativeLocationPath.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelativeLocationPath.java index 3b68004544f..8e4aee4da48 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelativeLocationPath.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelativeLocationPath.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: RelativeLocationPath.java,v 1.2.4.1 2005/09/02 11:59:22 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelativePathPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelativePathPattern.java index 90bc2d90046..6ab96a9b14e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelativePathPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelativePathPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: RelativePathPattern.java,v 1.2.4.1 2005/09/02 12:09:38 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java index 4a0d1fb1263..ea6df8ffefe 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: RoundCall.java,v 1.2.4.1 2005/09/02 12:12:35 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SimpleAttributeValue.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SimpleAttributeValue.java index 131ed310bf7..2b95b13c471 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SimpleAttributeValue.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SimpleAttributeValue.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SimpleAttributeValue.java,v 1.2.4.1 2005/09/05 08:58:46 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java index f7309e50125..0fa119006e7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java @@ -2,13 +2,14 @@ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. */ /* - * Copyright 2001-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SourceLoader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SourceLoader.java index cc07708cba3..47f998bd8c1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SourceLoader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SourceLoader.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SourceLoader.java,v 1.2.4.1 2005/09/05 09:02:30 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java index 5b946c9b330..6de4ccce03c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StartsWithCall.java,v 1.2.4.1 2005/09/05 09:05:28 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java index cca28f90a9d..0490aeabc3b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Step.java,v 1.6 2006/06/06 22:34:34 spericas Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java index 82582ae24bc..e8ed0e1da56 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StepPattern.java,v 1.2.4.1 2005/09/12 11:13:19 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java index ce2d98afb0d..f4303edc4f7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringCall.java,v 1.2.4.1 2005/09/05 09:08:15 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java index 212a6d86a54..3beda444414 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringLengthCall.java,v 1.2.4.1 2005/09/05 09:08:46 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Text.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Text.java index 3c62f2b926d..db3a6231cbd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Text.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Text.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Text.java,v 1.2.4.1 2005/09/12 11:33:09 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java index d1676840fbf..b1b14c15bf0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: TopLevelElement.java,v 1.5 2005/09/28 13:48:17 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java index 367b13bf053..6d96e14c0e5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: UnaryOpExpr.java,v 1.2.4.1 2005/09/05 09:21:00 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java index 5cb06be3477..ce9dd64fe23 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: UnionPathExpr.java,v 1.2.4.1 2005/09/12 11:34:14 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java index b55edcfe001..205d6ceaa45 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: UnparsedEntityUriCall.java,v 1.2.4.1 2005/09/05 09:22:36 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnresolvedRef.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnresolvedRef.java index 963e3c8dba6..53976480f43 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnresolvedRef.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnresolvedRef.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: UnresolvedRef.java,v 1.5 2005/09/28 13:48:17 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java index 3751ae3ce7a..79055959743 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: UseAttributeSets.java,v 1.5 2005/09/28 13:48:17 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ValueOf.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ValueOf.java index 9873edd6e0e..5cee916a961 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ValueOf.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ValueOf.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ValueOf.java,v 1.2.4.1 2005/09/05 09:30:04 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Variable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Variable.java index 3226a36a898..fdc1bd3f2e4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Variable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Variable.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Variable.java,v 1.2.4.1 2005/09/12 11:36:46 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java index 02e1a5f3ef4..660952efc9a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java @@ -2,13 +2,14 @@ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableRef.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableRef.java index fe918b0011a..ab39e9ae622 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableRef.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableRef.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: VariableRef.java,v 1.2.4.1 2005/09/05 09:33:50 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableRefBase.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableRefBase.java index 76cee04a87a..a6267113c7f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableRefBase.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableRefBase.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: VariableRefBase.java,v 1.5 2005/09/28 13:48:18 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/When.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/When.java index 9efe14283cc..19f34f1a8bb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/When.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/When.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: When.java,v 1.2.4.1 2005/09/05 09:36:58 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java index edfa5a8d3dd..86e3e24bcc9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Whitespace.java,v 1.5 2005/09/28 13:48:18 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/WithParam.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/WithParam.java index 37d4cf93a2a..d802a5fa2ae 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/WithParam.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/WithParam.java @@ -2,13 +2,14 @@ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java index ecdd00f1e41..c5dc46865d3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: xpath.lex,v 1.12 2005/08/02 02:59:03 mcnamara Exp $ - */ /* * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java index f33b34b29cf..fbc5a603afc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java @@ -1,8 +1,27 @@ - -//---------------------------------------------------- -// The following code was generated by CUP v0.10j -// Thu Oct 06 10:09:26 PDT 2005 -//---------------------------------------------------- +/* + * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ package com.sun.org.apache.xalan.internal.xsltc.compiler; @@ -16,8 +35,10 @@ import com.sun.org.apache.xml.internal.dtm.Axis; import com.sun.org.apache.xalan.internal.xsltc.runtime.Operators; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; -/** CUP v0.10j generated parser. - */ +/** + * CUP v0.10j generated parser. + * This class was generated by CUP v0.10j on Thu Oct 06 10:09:26 PDT 2005. + */ public class XPathParser extends com.sun.java_cup.internal.runtime.lr_parser { /** Default constructor. */ diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/sym.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/sym.java index d64dc3fd046..843521e419a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/sym.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/sym.java @@ -1,12 +1,34 @@ - -//---------------------------------------------------- -// The following code was generated by CUP v0.10j -// Fri Feb 27 13:01:50 PST 2004 -//---------------------------------------------------- +/* + * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ package com.sun.org.apache.xalan.internal.xsltc.compiler; -/** CUP generated class containing symbol constants. */ +/** + * CUP generated class containing symbol constants. + * This class was generated by CUP v0.10j on Fri Feb 27 13:01:50 PST 2004. + */ public class sym { /* terminals */ public static final int Literal = 26; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/AttributeSetMethodGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/AttributeSetMethodGenerator.java index 82af0b84db5..79c4aad1996 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/AttributeSetMethodGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/AttributeSetMethodGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AttributeSetMethodGenerator.java,v 1.5 2005/09/28 13:48:24 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java index 1feca890e42..c29304fd83f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: BooleanType.java,v 1.2.4.1 2005/09/05 11:03:37 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ClassGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ClassGenerator.java index d747075ea8f..c5297e79e27 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ClassGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ClassGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ClassGenerator.java,v 1.2.4.1 2005/09/05 11:07:09 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/CompareGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/CompareGenerator.java index bb40dc1a072..5dbc6851992 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/CompareGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/CompareGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CompareGenerator.java,v 1.2.4.1 2005/09/05 11:08:02 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ca.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ca.java index 708f7444b89..3af790e444e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ca.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ca.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ErrorMessages_ca.java,v 1.1.6.1 2005/09/05 11:52:59 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_cs.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_cs.java index f172643766d..83587915afe 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_cs.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_cs.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ErrorMessages_cs.java,v 1.1.6.1 2005/09/05 11:52:59 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java index 1de0bb1e5aa..92ff7e1de48 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -417,7 +417,7 @@ public class ErrorMessages_ko extends ListResourceBundle { * XSLTC to process the XML input document had a configuration problem. */ {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "JAXP \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC81C\uB300\uB85C \uAD6C\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, + "JAXP \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC81C\uB300\uB85C \uAD6C\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, /* * Note to translators: The substitution text names the internal error diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sk.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sk.java index 17646e9c51d..27c81236a12 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sk.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sk.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ErrorMessages_sk.java,v 1.1.6.1 2005/09/05 11:53:00 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/FilterGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/FilterGenerator.java index 96f680fe4a1..1e8f00fc8a8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/FilterGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/FilterGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FilterGenerator.java,v 1.2.4.1 2005/09/05 11:13:52 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java index 247e6e2b3aa..a1f81ed6f0e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IntType.java,v 1.2.4.1 2005/09/05 11:14:44 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/InternalError.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/InternalError.java index 2bb0c3df3c5..406e78d9864 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/InternalError.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/InternalError.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +19,7 @@ * limitations under the License. */ -/* - * $Id: InternalError.java,v 1.0 2011-08-18 04:34:19 joehw Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.compiler.util; /** * Marks a class of errors in which XSLTC has reached some incorrect internal diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MarkerInstruction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MarkerInstruction.java index e76a3fe500f..929a8dca4d2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MarkerInstruction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MarkerInstruction.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +19,7 @@ * limitations under the License. */ -/* - * $Id: MethodGenerator.java,v 1.10 2010-11-01 04:34:19 joehw Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.compiler.util; import java.io.DataOutputStream; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MatchGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MatchGenerator.java index 5972bebb5d0..9db88e8d991 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MatchGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MatchGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: MatchGenerator.java,v 1.2.4.1 2005/09/05 11:15:21 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodType.java index 8cd03083084..9c076a97b08 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: MethodType.java,v 1.2.4.1 2005/09/05 11:18:05 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NamedMethodGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NamedMethodGenerator.java index 0913a7bc1e5..0c5fc69afc8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NamedMethodGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NamedMethodGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NamedMethodGenerator.java,v 1.2.4.1 2005/09/05 11:19:56 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeCounterGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeCounterGenerator.java index 68ddc8999dc..aa4ba8264dd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeCounterGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeCounterGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeCounterGenerator.java,v 1.2.4.1 2005/09/05 11:20:48 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSetType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSetType.java index 616fd706b59..f599fb2c543 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSetType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSetType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeSetType.java,v 1.2.4.1 2005/09/05 11:21:45 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSortRecordFactGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSortRecordFactGenerator.java index bacccac2724..21d726b3a04 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSortRecordFactGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSortRecordFactGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeSortRecordFactGenerator.java,v 1.2.4.1 2005/09/05 11:23:07 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSortRecordGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSortRecordGenerator.java index 0e533388e81..7e90d4fc191 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSortRecordGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSortRecordGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeSortRecordGenerator.java,v 1.2.4.1 2005/09/05 11:23:42 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeType.java index e48a092055e..ebf18b307f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeType.java,v 1.2.4.1 2005/09/05 11:24:25 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NumberType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NumberType.java index c50e153709d..9d109a32816 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NumberType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NumberType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NumberType.java,v 1.2.4.1 2005/09/05 11:25:11 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java index 206b59efe62..acf2bc3c984 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ObjectType.java,v 1.2.4.1 2005/09/12 11:45:54 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkEnd.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkEnd.java index b2daff35cf0..26543d29beb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkEnd.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkEnd.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +19,7 @@ * limitations under the License. */ -/* - * $Id: OutlineableChunkEnd.java,v 1.10 2010-11-01 04:34:19 joehw Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.compiler.util; import com.sun.org.apache.bcel.internal.generic.Instruction; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkStart.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkStart.java index 9b54cac0f22..d6d83db22d5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkStart.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkStart.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +19,7 @@ * limitations under the License. */ -/* - * $Id: MethodGenerator.java,v 1.10 2010-11-01 04:34:19 joehw Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.compiler.util; import com.sun.org.apache.bcel.internal.generic.Instruction; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java index f70a210c0ab..4a2e034afc9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: RealType.java,v 1.2.4.1 2005/09/05 11:28:45 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ReferenceType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ReferenceType.java index 1ceccf26a92..aafeba1b7d1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ReferenceType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ReferenceType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ReferenceType.java,v 1.2.4.1 2005/09/05 11:29:12 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java index e61f7cbc87a..eb7f6d28fe5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ResultTreeType.java,v 1.2.4.1 2005/09/05 11:30:01 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RtMethodGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RtMethodGenerator.java index a31dec64598..f104f78ad05 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RtMethodGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RtMethodGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: RtMethodGenerator.java,v 1.2.4.1 2005/09/05 11:30:49 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/SlotAllocator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/SlotAllocator.java index 0bd7387f169..960bf5f12c6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/SlotAllocator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/SlotAllocator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SlotAllocator.java,v 1.2.4.1 2005/09/05 11:32:51 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringStack.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringStack.java index 4cd2b576f63..46cafd86958 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringStack.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringStack.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringStack.java,v 1.2.4.1 2005/09/05 11:33:32 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringType.java index 784482ba8db..0fb1dac60d5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringType.java,v 1.2.4.1 2005/09/05 11:35:57 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/TestGenerator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/TestGenerator.java index f6a62c061b6..b5452e91ffd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/TestGenerator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/TestGenerator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: TestGenerator.java,v 1.2.4.1 2005/09/05 11:36:49 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java index b0829dc9ed3..a2bcb312473 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Type.java,v 1.8 2007/03/28 16:51:19 joehw Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/TypeCheckError.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/TypeCheckError.java index 74aed6412a8..dd34d69a6de 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/TypeCheckError.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/TypeCheckError.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: TypeCheckError.java,v 1.2.4.1 2005/09/05 11:42:57 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java index f1f92221072..ef012cec5d5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Util.java,v 1.2.4.1 2005/09/12 11:47:15 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/VoidType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/VoidType.java index cb904f190be..6e4918eb14f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/VoidType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/VoidType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: VoidType.java,v 1.2.4.1 2005/09/05 11:45:26 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/AbsoluteIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/AbsoluteIterator.java index c7962e7a82c..1884d4885be 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/AbsoluteIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/AbsoluteIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AbsoluteIterator.java,v 1.2.4.1 2005/09/06 05:46:46 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/AnyNodeCounter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/AnyNodeCounter.java index ebae63dfd51..6e79e3174da 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/AnyNodeCounter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/AnyNodeCounter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AnyNodeCounter.java,v 1.2.4.1 2005/09/06 05:54:53 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ArrayNodeListIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ArrayNodeListIterator.java index d7cf3a54fd0..780ed2e5ceb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ArrayNodeListIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ArrayNodeListIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +19,7 @@ * limitations under the License. */ -/* - * $Id: ArrayNodeListIterator.java,v 1.0 2009-11-25 04:34:24 joehw Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.dom; import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/BitArray.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/BitArray.java index aadfb5495d5..b218a921402 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/BitArray.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/BitArray.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: BitArray.java,v 1.2.4.1 2005/09/06 05:56:52 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CachedNodeListIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CachedNodeListIterator.java index 3a3ed93359d..7270d1618de 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CachedNodeListIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CachedNodeListIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CachedNodeListIterator.java,v 1.2.4.1 2005/09/06 05:57:47 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ClonedNodeListIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ClonedNodeListIterator.java index 71d59495935..0d803e6e0a9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ClonedNodeListIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ClonedNodeListIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ClonedNodeListIterator.java,v 1.2.4.1 2005/09/06 06:02:12 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CollatorFactoryBase.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CollatorFactoryBase.java index 83d394e86db..ce509409620 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CollatorFactoryBase.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CollatorFactoryBase.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CollatorFactoryBase.java,v 1.2.4.1 2005/09/06 06:03:08 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CurrentNodeListFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CurrentNodeListFilter.java index 5457be51e6c..022b0e6dfc3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CurrentNodeListFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CurrentNodeListFilter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CurrentNodeListFilter.java,v 1.2.4.1 2005/09/06 06:04:06 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CurrentNodeListIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CurrentNodeListIterator.java index 512e1e9310f..ba868a32b66 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CurrentNodeListIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CurrentNodeListIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CurrentNodeListIterator.java,v 1.2.4.1 2005/09/06 06:04:45 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DOMBuilder.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DOMBuilder.java index 4f163667cb1..e80313b9a87 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DOMBuilder.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DOMBuilder.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOMBuilder.java,v 1.2.4.1 2005/09/06 06:08:23 pvedula Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DupFilterIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DupFilterIterator.java index 8ba00f4c6bf..955b40aaa4b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DupFilterIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DupFilterIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DupFilterIterator.java,v 1.2.4.1 2005/09/06 06:16:11 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/EmptyFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/EmptyFilter.java index 57420ff89d3..dc7f2ab8806 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/EmptyFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/EmptyFilter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: EmptyFilter.java,v 1.2.4.1 2005/09/06 06:17:05 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ExtendedSAX.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ExtendedSAX.java index 2eb927d82be..a720d49f0a4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ExtendedSAX.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ExtendedSAX.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExtendedSAX.java,v 1.2.4.1 2005/09/06 06:17:46 pvedula Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.dom; import org.xml.sax.ContentHandler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/Filter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/Filter.java index 245ebff1cba..5408a01bc9a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/Filter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/Filter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Filter.java,v 1.2.4.1 2005/09/06 06:18:58 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/FilterIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/FilterIterator.java index d27c7599cf8..d20f6e6db8d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/FilterIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/FilterIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FilterIterator.java,v 1.2.4.1 2005/09/06 06:21:10 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/FilteredStepIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/FilteredStepIterator.java index 704ebb42058..f4785f24a2f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/FilteredStepIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/FilteredStepIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FilteredStepIterator.java,v 1.2.4.1 2005/09/06 06:20:13 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ForwardPositionIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ForwardPositionIterator.java index f902df9c281..aa08175f5d9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ForwardPositionIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ForwardPositionIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ForwardPositionIterator.java,v 1.2.4.1 2005/09/06 06:22:05 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/LoadDocument.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/LoadDocument.java index f3e28791a2f..347f4f192b8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/LoadDocument.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/LoadDocument.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LoadDocument.java,v 1.2.4.1 2005/09/06 07:14:12 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MatchingIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MatchingIterator.java index d0bc39c4d27..7e8c24bae16 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MatchingIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MatchingIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: MatchingIterator.java,v 1.2.4.1 2005/09/06 09:22:07 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MultiValuedNodeHeapIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MultiValuedNodeHeapIterator.java index efc22514853..46aecfdc137 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MultiValuedNodeHeapIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MultiValuedNodeHeapIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2006 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MultipleNodeCounter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MultipleNodeCounter.java index 44ff62c77d2..64644f39705 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MultipleNodeCounter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MultipleNodeCounter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: MultipleNodeCounter.java,v 1.2.4.1 2005/09/12 11:49:56 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeCounter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeCounter.java index cad02f51c41..5fd120ef797 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeCounter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeCounter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeCounter.java,v 1.2.4.1 2005/09/12 11:52:36 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeIteratorBase.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeIteratorBase.java index d51354a400e..e06ad14be0f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeIteratorBase.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeIteratorBase.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeIteratorBase.java,v 1.2.4.1 2005/09/06 09:37:02 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java index aaf997a726c..3d9fdf04fa5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeSortRecord.java,v 1.5 2005/09/28 13:48:36 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java index 1cc464c4937..ec83b5471c5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeSortRecordFactory.java,v 1.2.4.1 2005/09/06 09:53:40 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NthIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NthIterator.java index 612188f03f1..a98632400ba 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NthIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NthIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NthIterator.java,v 1.2.4.1 2005/09/06 09:57:04 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SimpleResultTreeImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SimpleResultTreeImpl.java index 812258a8f76..14a280bffb4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SimpleResultTreeImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SimpleResultTreeImpl.java @@ -2,13 +2,14 @@ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SingleNodeCounter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SingleNodeCounter.java index 2042e4aa4d8..0906a53e425 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SingleNodeCounter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SingleNodeCounter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SingleNodeCounter.java,v 1.2.4.1 2005/09/12 11:58:23 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SingletonIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SingletonIterator.java index 0e8dacadf71..3fad0b8f93c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SingletonIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SingletonIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SingletonIterator.java,v 1.2.4.1 2005/09/06 10:15:18 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SortSettings.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SortSettings.java index 631c5e7bbf2..759210d50ab 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SortSettings.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SortSettings.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SortSettings.java,v 1.2.4.1 2005/09/06 10:19:22 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SortingIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SortingIterator.java index eff263a5df8..bc17490a646 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SortingIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SortingIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SortingIterator.java,v 1.2.4.1 2005/09/06 10:23:32 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/StepIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/StepIterator.java index 3acec748a90..3896547bdb7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/StepIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/StepIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StepIterator.java,v 1.2.4.1 2005/09/06 10:26:47 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/StripWhitespaceFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/StripWhitespaceFilter.java index 8218009a3e9..02b0b7021af 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/StripWhitespaceFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/StripWhitespaceFilter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StripWhitespaceFilter.java,v 1.2.4.1 2005/09/06 10:32:05 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/UnionIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/UnionIterator.java index d054c7ed1d0..597c445cfb6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/UnionIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/UnionIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2006 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: UnionIterator.java,v 1.5 2005/09/28 13:48:38 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.dom; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.java index 0cc6d073164..0de66e3ae58 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XSLTCDTMManager.java,v 1.2 2005/08/16 22:32:54 jeffsuttor Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.dom; import javax.xml.stream.XMLEventReader; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Attributes.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Attributes.java index 62e57a6cf91..a3aba1cecd7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Attributes.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Attributes.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Attributes.java,v 1.2.4.1 2005/09/06 10:53:04 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Constants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Constants.java index 74a87a737e4..da7fc74415b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Constants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Constants.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Constants.java,v 1.2.4.1 2005/09/06 11:01:29 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages.java index fe98ae968c0..54ecd80e55e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ca.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ca.java index a2b2ba14caa..20bd7af3dc4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ca.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ca.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ErrorMessages_ca.java,v 1.1.6.1 2005/09/06 10:45:37 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_cs.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_cs.java index 88409e1a507..35c3af49c7b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_cs.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_cs.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ErrorMessages_cs.java,v 1.1.6.1 2005/09/06 10:45:37 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java index b86e7dedcca..6b44ace762d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_es.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_es.java index 350d75fae40..375173c9189 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_es.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_es.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_fr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_fr.java index f60f2a52ec9..40b2c11bc11 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_fr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_fr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_it.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_it.java index e4a7b2d18f5..9229c7593f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_it.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_it.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ja.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ja.java index 3cd3712c611..8108e8f7218 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ja.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ja.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java index e24a7c103be..b21265791db 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -209,7 +210,7 @@ public class ErrorMessages_ko extends ListResourceBundle { * DTD. */ {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 DTD \uC120\uC5B8 \uC774\uBCA4\uD2B8\uB97C \uCC98\uB9AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, + "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 DTD \uC120\uC5B8 \uC774\uBCA4\uD2B8\uB97C \uCC98\uB9AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, /* * Note to translators: The following message indicates that the XML @@ -218,7 +219,7 @@ public class ErrorMessages_ko extends ListResourceBundle { * declarations. */ {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 XML \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, + "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 XML \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, /* * Note to translators: The substitution text is the URI that was in diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java index 45e2654bf1f..0449d56d528 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sk.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sk.java index 6ee58b7c614..cdaae51704c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sk.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sk.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ErrorMessages_sk.java,v 1.1.6.1 2005/09/06 10:45:39 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java index 2c2b40eca2b..214c20c5e28 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_CN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_CN.java index a34d42c933e..076b06d50db 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_CN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_CN.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_TW.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_TW.java index 67e3831f810..92736a4154c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_TW.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_TW.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/InternalRuntimeError.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/InternalRuntimeError.java index 1f11788021e..d51e8457c2d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/InternalRuntimeError.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/InternalRuntimeError.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +19,7 @@ * limitations under the License. */ -/* - * $Id: InternalRuntimeError.java,v 1.0 2009-11-25 04:34:28 joehw Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.runtime; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/MessageHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/MessageHandler.java index da227f5d9b9..f7b47713a6c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/MessageHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/MessageHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: MessageHandler.java,v 1.2.4.1 2005/09/06 11:06:49 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Node.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Node.java index add4114ad5b..69c8292ea13 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Node.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Node.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Node.java,v 1.2.4.1 2005/09/06 11:10:29 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Operators.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Operators.java index da71f8c096b..3ba86c1fdc1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Operators.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Operators.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Operators.java,v 1.2.4.1 2005/09/12 12:02:15 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Parameter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Parameter.java index e3b682dfed0..6a32cdd48a8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Parameter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Parameter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Parameter.java,v 1.2.4.1 2005/09/06 11:21:58 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/StringValueHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/StringValueHandler.java index 83083527203..06b81511b2d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/StringValueHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/StringValueHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringValueHandler.java,v 1.2.4.1 2005/09/06 11:33:25 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/OutputBuffer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/OutputBuffer.java index 01f1ca9bc2e..997b71af886 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/OutputBuffer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/OutputBuffer.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: OutputBuffer.java,v 1.2.4.1 2005/09/06 11:35:23 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime.output; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/StringOutputBuffer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/StringOutputBuffer.java index 2f9c43e3193..b76ccb035c9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/StringOutputBuffer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/StringOutputBuffer.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringOutputBuffer.java,v 1.2.4.1 2005/09/06 11:36:16 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime.output; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java index 8b76f3a68b0..6ebdc780edb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: TransletOutputHandlerFactory.java,v 1.2.4.2 2005/09/15 19:12:05 jeffsuttor Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime.output; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/WriterOutputBuffer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/WriterOutputBuffer.java index 2b04e01fea4..bbff564ae41 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/WriterOutputBuffer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/WriterOutputBuffer.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WriterOutputBuffer.java,v 1.2.4.1 2005/09/06 11:43:01 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.runtime.output; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/DOM2TO.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/DOM2TO.java index 053773df2ce..233cf326f89 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/DOM2TO.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/DOM2TO.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOM2TO.java,v 1.5 2005/09/28 13:48:44 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.trax; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/OutputSettings.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/OutputSettings.java index cd30df3561f..d397641da92 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/OutputSettings.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/OutputSettings.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: OutputSettings.java,v 1.2.4.1 2005/09/06 11:59:11 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.trax; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java index 8cf62c05fa0..c54fa5188c4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SAX2DOM.java,v 1.8.2.1 2006/12/04 18:45:41 spericas Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.trax; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java index e5fac8b7395..bdbdca9137e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java @@ -43,8 +43,6 @@ import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; import java.lang.module.ModuleReader; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.security.AccessController; import java.security.CodeSigner; import java.security.CodeSource; @@ -435,13 +433,13 @@ public final class TemplatesImpl implements Templates, Serializable { } }; - Layer bootLayer = Layer.boot(); + ModuleLayer bootLayer = ModuleLayer.boot(); Configuration cf = bootLayer.configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of(mn)); + .resolve(finder, ModuleFinder.of(), Set.of(mn)); - PrivilegedAction pa = () -> bootLayer.defineModules(cf, name -> loader); - Layer layer = AccessController.doPrivileged(pa); + PrivilegedAction pa = () -> bootLayer.defineModules(cf, name -> loader); + ModuleLayer layer = AccessController.doPrivileged(pa); Module m = layer.findModule(mn).get(); assert m.getLayer() == layer; @@ -483,10 +481,11 @@ public final class TemplatesImpl implements Templates, Serializable { String pn = _tfactory.getPackageName(); assert pn != null && pn.length() > 0; - ModuleDescriptor descriptor = ModuleDescriptor.module(mn) - .requires("java.xml") - .exports(pn) - .build(); + ModuleDescriptor descriptor = + ModuleDescriptor.newModule(mn, Set.of(ModuleDescriptor.Modifier.SYNTHETIC)) + .requires("java.xml") + .exports(pn, Set.of("java.xml")) + .build(); Module m = createModule(descriptor, loader); diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java index 172907e7af0..77e68d43010 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: TrAXFilter.java,v 1.2.4.1 2005/09/06 12:23:19 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.trax; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerHandlerImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerHandlerImpl.java index cd4b4be14e2..05d38640a16 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerHandlerImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerHandlerImpl.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: TransformerHandlerImpl.java,v 1.2.4.1 2005/09/15 06:25:12 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.trax; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/XSLTCSource.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/XSLTCSource.java index 4d96b597fa8..5237868d42e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/XSLTCSource.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/XSLTCSource.java @@ -2,15 +2,15 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ - /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XSLTCSource.java,v 1.2.4.1 2005/09/06 12:43:28 pvedula Exp $ - */ + package com.sun.org.apache.xalan.internal.xsltc.trax; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/util/IntegerArray.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/util/IntegerArray.java index 4b9d3414f44..f99e9d5005e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/util/IntegerArray.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/util/IntegerArray.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IntegerArray.java,v 1.2.4.1 2005/09/06 11:44:56 pvedula Exp $ - */ package com.sun.org.apache.xalan.internal.xsltc.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttrImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttrImpl.java index 873f7be9842..71c404359a9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttrImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttrImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttrNSImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttrNSImpl.java index 34de50dccde..0eba0744c27 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttrNSImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttrNSImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttributeMap.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttributeMap.java index 5f7f4e17340..0ad1a07e258 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttributeMap.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttributeMap.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CDATASectionImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CDATASectionImpl.java index 0a495601454..f2ea4c3cb37 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CDATASectionImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CDATASectionImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CharacterDataImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CharacterDataImpl.java index 6f3e5a3dcf7..93443e75523 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CharacterDataImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CharacterDataImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ChildNode.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ChildNode.java index 3dab9c9eea8..c8c2f3e2f83 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ChildNode.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ChildNode.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CommentImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CommentImpl.java index 418e2cc4824..d2b469b5bd4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CommentImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CommentImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMErrorImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMErrorImpl.java index 90dec38e2f6..a496d412ef2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMErrorImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMErrorImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationImpl.java index 3875a8329d7..ac520b79401 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java index 15791a36f8c..8ad9cff4880 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationSourceImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationSourceImpl.java index 6c2a9b75257..7620eafc060 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationSourceImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationSourceImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMInputImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMInputImpl.java index bb6abf968fb..49874b5b965 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMInputImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMInputImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMLocatorImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMLocatorImpl.java index 2a421b5201f..8b0ca5e6ff9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMLocatorImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMLocatorImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMMessageFormatter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMMessageFormatter.java index 1d30c9e76b4..ab48b8dddd0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMMessageFormatter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMMessageFormatter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java index c2f33916772..2b1b8000081 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004, 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMOutputImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMOutputImpl.java index c9249163ee4..11e1b316672 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMOutputImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMOutputImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMXSImplementationSourceImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMXSImplementationSourceImpl.java index 34a311a34d1..1874e28fa44 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMXSImplementationSourceImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMXSImplementationSourceImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeepNodeListImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeepNodeListImpl.java index 1acf62ee67e..85cdef30b26 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeepNodeListImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeepNodeListImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredAttrImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredAttrImpl.java index c3e134296f9..20fa9a23c2c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredAttrImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredAttrImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredAttrNSImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredAttrNSImpl.java index 3b4052146cd..917254cda3a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredAttrNSImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredAttrNSImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredCDATASectionImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredCDATASectionImpl.java index 52132f0567c..e3be7863b6f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredCDATASectionImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredCDATASectionImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredCommentImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredCommentImpl.java index 3f80492959a..4c808190f6c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredCommentImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredCommentImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDOMImplementationImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDOMImplementationImpl.java index 2ba1c9e9abf..0b6c7970b3c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDOMImplementationImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDOMImplementationImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.dom; import org.w3c.dom.DOMImplementation; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentTypeImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentTypeImpl.java index b7d303855ab..abdc94054a3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentTypeImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentTypeImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementDefinitionImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementDefinitionImpl.java index 09b03c03f43..fd988ac1886 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementDefinitionImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementDefinitionImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementImpl.java index 657a635cb5a..0c977efe4ac 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementNSImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementNSImpl.java index fd54fe6fb66..a6b51ece9e5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementNSImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredElementNSImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredEntityImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredEntityImpl.java index 2b9e8cc0980..74f90b13dd1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredEntityImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredEntityImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredEntityReferenceImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredEntityReferenceImpl.java index 7f3836aa238..cb695026b92 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredEntityReferenceImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredEntityReferenceImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredNode.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredNode.java index 3dba91dd221..37abd62072b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredNode.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredNode.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredNotationImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredNotationImpl.java index 46e06f7dec6..c978fbb3f0f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredNotationImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredNotationImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredProcessingInstructionImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredProcessingInstructionImpl.java index 178cd13c56a..e8f4f0d3cac 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredProcessingInstructionImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredProcessingInstructionImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredTextImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredTextImpl.java index 37d559ab561..d2c6c2db328 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredTextImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredTextImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DocumentFragmentImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DocumentFragmentImpl.java index 64248e21d0a..54ed7066a78 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DocumentFragmentImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DocumentFragmentImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ElementDefinitionImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ElementDefinitionImpl.java index 6c56a691638..9f19c921c20 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ElementDefinitionImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ElementDefinitionImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ElementNSImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ElementNSImpl.java index 042835e7ce6..6a76152555d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ElementNSImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ElementNSImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/EntityImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/EntityImpl.java index 51d76c4b7a0..6da6d24c12b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/EntityImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/EntityImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/EntityReferenceImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/EntityReferenceImpl.java index bbc52878445..9ab58161670 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/EntityReferenceImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/EntityReferenceImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java index f3e0c942758..67f91f45b28 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NodeIteratorImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NodeIteratorImpl.java index 1f17d473ab8..d2b9232f38b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NodeIteratorImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NodeIteratorImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NodeListCache.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NodeListCache.java index 585c41e6364..7c6017754c3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NodeListCache.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NodeListCache.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001,2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NotationImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NotationImpl.java index a8827f41124..b37d7f6c370 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NotationImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NotationImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIDOMImplementationImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIDOMImplementationImpl.java index 07271f17d09..2fae8652ef5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIDOMImplementationImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIDOMImplementationImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIDocumentImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIDocumentImpl.java index 61d4bf921fd..23e71c73a2a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIDocumentImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIDocumentImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ProcessingInstructionImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ProcessingInstructionImpl.java index a236576f9a8..38dcb0ba85d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ProcessingInstructionImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/ProcessingInstructionImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeExceptionImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeExceptionImpl.java index 9f391f29b77..46e6deee4e7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeExceptionImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeExceptionImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.dom; import org.w3c.dom.ranges.RangeException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeImpl.java index 31c631d1c81..adbec81ac82 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/TextImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/TextImpl.java index 367ae65c58e..19cb05dd0fc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/TextImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/TextImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/TreeWalkerImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/TreeWalkerImpl.java index 20533dd3e85..5077bb6b116 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/TreeWalkerImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/TreeWalkerImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/events/EventImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/events/EventImpl.java index 83a085e9abc..2950f5f5afc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/events/EventImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/events/EventImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.dom.events; import org.w3c.dom.events.Event; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/events/MutationEventImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/events/MutationEventImpl.java index 32870347596..b10e93d7f4e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/events/MutationEventImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/events/MutationEventImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/ExternalSubsetResolver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/ExternalSubsetResolver.java index e845a7c930e..b31e104c5cf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/ExternalSubsetResolver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/ExternalSubsetResolver.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/RevalidationHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/RevalidationHandler.java index d537d02837a..ff605b8ebb1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/RevalidationHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/RevalidationHandler.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2001, 2002 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 2002, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java index e1e788af633..12daf8acc40 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java @@ -1,13 +1,13 @@ /* * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. */ - /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -18,6 +18,7 @@ * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl; import java.io.IOException; @@ -135,7 +136,7 @@ public class XML11NSDocumentScannerImpl extends XML11DocumentScannerImpl { if (DEBUG_START_END_ELEMENT) System.out.println(">>> scanStartElementNS()"); // Note: namespace processing is on by default - fEntityScanner.scanQName(fElementQName, NameType.ATTRIBUTE); + fEntityScanner.scanQName(fElementQName, NameType.ELEMENTSTART); // REVISIT - [Q] Why do we need this local variable? -- mrglavas String rawname = fElementQName.rawname; if (fBindNamespaces) { @@ -345,7 +346,7 @@ public class XML11NSDocumentScannerImpl extends XML11DocumentScannerImpl { protected void scanStartElementName () throws IOException, XNIException { // Note: namespace processing is on by default - fEntityScanner.scanQName(fElementQName, NameType.ATTRIBUTE); + fEntityScanner.scanQName(fElementQName, NameType.ELEMENTSTART); // Must skip spaces here because the DTD scanner // would consume them at the end of the external subset. fSawSpace = fEntityScanner.skipSpaces(); @@ -571,7 +572,7 @@ public class XML11NSDocumentScannerImpl extends XML11DocumentScannerImpl { System.out.println(">>> scanAttribute()"); // name - fEntityScanner.scanQName(fAttributeQName, NameType.ATTRIBUTE); + fEntityScanner.scanQName(fAttributeQName, NameType.ATTRIBUTENAME); // equals fEntityScanner.skipSpaces(); diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NamespaceBinder.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NamespaceBinder.java index 87e66c30850..1c203d4b9c5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NamespaceBinder.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NamespaceBinder.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java index 6e3547cdc83..e90608fff80 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java @@ -1215,7 +1215,7 @@ implements XMLDTDScanner, XMLComponent, XMLEntityHandler { // definitions while (!fEntityScanner.skipChar('>', null)) { - String name = fEntityScanner.scanName(NameType.ATTRIBUTE); + String name = fEntityScanner.scanName(NameType.ATTRIBUTENAME); if (name == null) { reportFatalError("AttNameRequiredInAttDef", new Object[]{elName}); @@ -1359,7 +1359,7 @@ implements XMLDTDScanner, XMLComponent, XMLEntityHandler { fMarkUpDepth++; do { skipSeparator(false, !scanningInternalSubset()); - String aName = fEntityScanner.scanName(NameType.ATTRIBUTE); + String aName = fEntityScanner.scanName(NameType.ATTRIBUTENAME); if (aName == null) { reportFatalError("MSG_NAME_REQUIRED_IN_NOTATIONTYPE", new Object[]{elName, atName}); diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java index 1226fe319ff..d6d73ca56a5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. */ /* @@ -743,7 +743,7 @@ public class XMLDocumentScannerImpl // scan XMLDecl try { if (fEntityScanner.skipString(XMLDECL)) { - if (fEntityScanner.peekChar() == ' ') { + if (XMLChar.isSpace(fEntityScanner.peekChar())) { fMarkupDepth++; scanXMLDeclOrTextDecl(false); } else { diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityDescription.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityDescription.java index b94e08aba5a..af3603f7966 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityDescription.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityDescription.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityHandler.java index a99a749d1c2..c9921418d57 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityHandler.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java index c94eea8ed9e..138181db602 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java @@ -1,13 +1,13 @@ /* * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. */ - /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -18,6 +18,7 @@ * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl; import java.io.IOException; @@ -404,7 +405,7 @@ public class XMLNSDocumentScannerImpl if (DEBUG_START_END_ELEMENT) System.out.println(this.getClass().toString() +">>> scanAttribute()"); // name - fEntityScanner.scanQName(fAttributeQName, NameType.ATTRIBUTE); + fEntityScanner.scanQName(fAttributeQName, NameType.ATTRIBUTENAME); // equals fEntityScanner.skipSpaces(); diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNamespaceBinder.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNamespaceBinder.java index 33a18a84444..da21add63e7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNamespaceBinder.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNamespaceBinder.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java index d937f53c6a0..747bd9bc4f7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -610,6 +610,14 @@ public class XMLStreamReaderImpl implements javax.xml.stream.XMLStreamReader { switchToXML11Scanner(); } + if (fEventType == XMLStreamConstants.CHARACTERS || + fEventType == XMLStreamConstants.ENTITY_REFERENCE || + fEventType == XMLStreamConstants.PROCESSING_INSTRUCTION || + fEventType == XMLStreamConstants.COMMENT || + fEventType == XMLStreamConstants.CDATA) { + fEntityScanner.checkNodeCount(fEntityScanner.fCurrentEntity); + } + return fEventType; } catch (IOException ex) { // if this error occured trying to resolve the external DTD subset diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDProcessor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDProcessor.java index 407498627bd..98f0e2f61eb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDProcessor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDProcessor.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDValidator.java index a39ba0bfcd3..3dad4522134 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDValidator.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2003 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11NSDTDValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11NSDTDValidator.java index fc6dc9148ee..50ff80b622a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11NSDTDValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XML11NSDTDValidator.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2003 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 2002, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLAttributeDecl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLAttributeDecl.java index a068fdc991d..67c0e9d7a92 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLAttributeDecl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLAttributeDecl.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLContentSpec.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLContentSpec.java index 39f51c82e12..bc2978c5624 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLContentSpec.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLContentSpec.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java index 90a55affe91..48b7303ed90 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java index eea1b94613f..310726bbf52 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2003 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java index 85bdb7f74c5..ae78586807a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidatorFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidatorFilter.java index f05aba531d8..c689ccf3f86 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidatorFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidatorFilter.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2001, 2002 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 2002, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLElementDecl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLElementDecl.java index 287d10d7bc3..50c05fd97bd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLElementDecl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLElementDecl.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLEntityDecl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLEntityDecl.java index 8496dc1d1a7..f1725f0a90f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLEntityDecl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLEntityDecl.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLNSDTDValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLNSDTDValidator.java index bf4ecf84e1d..c1e5261ad73 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLNSDTDValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLNSDTDValidator.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLNotationDecl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLNotationDecl.java index 7541875aca7..65e1b0f475c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLNotationDecl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLNotationDecl.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLSimpleType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLSimpleType.java index c757e39b938..c046243add8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLSimpleType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLSimpleType.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMAny.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMAny.java index 5c47d2e74d6..6f62534cc91 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMAny.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMAny.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd.models; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMBinOp.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMBinOp.java index 51df88d10aa..56b413e618e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMBinOp.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMBinOp.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd.models; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMLeaf.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMLeaf.java index 0cc5dfbd3e0..dbeb99066da 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMLeaf.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMLeaf.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd.models; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMStateSet.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMStateSet.java index d20a3a98c08..3332c059dd1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMStateSet.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMStateSet.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd.models; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMUniOp.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMUniOp.java index 97f50c1af61..2f844bc89c9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMUniOp.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMUniOp.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd.models; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/ContentModelValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/ContentModelValidator.java index b81f5c1a13f..4cec148d426 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/ContentModelValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/ContentModelValidator.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd.models; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java index 008bd6ff8fe..1b62b231135 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd.models; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/MixedContentModel.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/MixedContentModel.java index 8d4cda28213..6f3c513a504 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/MixedContentModel.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/MixedContentModel.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd.models; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/SimpleContentModel.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/SimpleContentModel.java index 73ae37d3a51..0243023b8bd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/SimpleContentModel.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/SimpleContentModel.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dtd.models; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DVFactoryException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DVFactoryException.java index 149d7177ced..f621211cc33 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DVFactoryException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DVFactoryException.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeException.java index 363b26844f3..17efe6aa09e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeException.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeValidator.java index 68cd396871c..40743f8cfba 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/InvalidDatatypeFacetException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/InvalidDatatypeFacetException.java index 22be4b55937..e5af751d9c8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/InvalidDatatypeFacetException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/InvalidDatatypeFacetException.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/InvalidDatatypeValueException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/InvalidDatatypeValueException.java index 648dd1ed692..7557eaef5f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/InvalidDatatypeValueException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/InvalidDatatypeValueException.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2001, 2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dv; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/SchemaDVFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/SchemaDVFactory.java index 47646f2dad2..f81b7cf41ee 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/SchemaDVFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/SchemaDVFactory.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/ValidationContext.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/ValidationContext.java index da8d550a84a..0eebab57879 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/ValidationContext.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/ValidationContext.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSFacets.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSFacets.java index 4baeaf1f340..b207501f494 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSFacets.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSFacets.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSSimpleType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSSimpleType.java index 5e242796565..8753a08aa21 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSSimpleType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSSimpleType.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/ENTITYDatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/ENTITYDatatypeValidator.java index 52f39b03f0b..b44bd6893f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/ENTITYDatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/ENTITYDatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/IDDatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/IDDatatypeValidator.java index 54fac1ad5b3..ad806374f7d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/IDDatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/IDDatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/IDREFDatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/IDREFDatatypeValidator.java index 4fa2a1c7c52..3c99c8b6c02 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/IDREFDatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/IDREFDatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/ListDatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/ListDatatypeValidator.java index 28a3fd06117..3c562f5949c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/ListDatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/ListDatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/NMTOKENDatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/NMTOKENDatatypeValidator.java index 94eb90104ca..ca9b53ffa1b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/NMTOKENDatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/NMTOKENDatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/NOTATIONDatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/NOTATIONDatatypeValidator.java index 87d95cc1326..c10adeb0e73 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/NOTATIONDatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/NOTATIONDatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/StringDatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/StringDatatypeValidator.java index edc5c5584c1..23397fed540 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/StringDatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/StringDatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11IDDatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11IDDatatypeValidator.java index e429625d8f6..5323c2033f1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11IDDatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11IDDatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11IDREFDatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11IDREFDatatypeValidator.java index 0d8bbf64753..5345ab88acb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11IDREFDatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11IDREFDatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11NMTOKENDatatypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11NMTOKENDatatypeValidator.java index 1a7296bd913..d670ae636be 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11NMTOKENDatatypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/dtd/XML11NMTOKENDatatypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/Base64.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/Base64.java index 1ab0752cbfa..1d7462ab692 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/Base64.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/Base64.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/HexBin.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/HexBin.java index fb477acfaa5..7f1aa344e84 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/HexBin.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/HexBin.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AbstractDateTimeDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AbstractDateTimeDV.java index 64242a5cf95..caceec47090 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AbstractDateTimeDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AbstractDateTimeDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnyAtomicDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnyAtomicDV.java index e7dbf96458a..046cdf784f9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnyAtomicDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnyAtomicDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnySimpleDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnySimpleDV.java index 0a8bf002ae0..de36cface35 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnySimpleDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnySimpleDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnyURIDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnyURIDV.java index 3458dac6d6d..740edc722fc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnyURIDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/AnyURIDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/Base64BinaryDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/Base64BinaryDV.java index 47185b1725d..ee14472995a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/Base64BinaryDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/Base64BinaryDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BaseDVFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BaseDVFactory.java index 715b0ee040c..84d13c4719c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BaseDVFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BaseDVFactory.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002, 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BooleanDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BooleanDV.java index 90857ef96b8..8e0cdaf992c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BooleanDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BooleanDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DateDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DateDV.java index d302e22fd1a..5d0b437128d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DateDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DateDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DateTimeDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DateTimeDV.java index 2a19f8cec9f..c55df7e43e6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DateTimeDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DateTimeDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DayDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DayDV.java index d0e6ce6021e..f80ceac225e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DayDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DayDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DayTimeDurationDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DayTimeDurationDV.java index 8488503acee..841e639dac1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DayTimeDurationDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DayTimeDurationDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl.dv.xs; import java.math.BigDecimal; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DecimalDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DecimalDV.java index 622042b37cf..7799cfaffcf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DecimalDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DecimalDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001,2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DoubleDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DoubleDV.java index a25d6d7243e..3c50032b567 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DoubleDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DoubleDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DurationDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DurationDV.java index 9ad95cc77b4..f48c13b051d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DurationDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/DurationDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/EntityDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/EntityDV.java index 1a62ac9053e..61fce4846ee 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/EntityDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/EntityDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FloatDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FloatDV.java index f2478233564..d7ad5d42052 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FloatDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FloatDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FullDVFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FullDVFactory.java index d003c48f335..9df965f0d91 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FullDVFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FullDVFactory.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002, 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/HexBinaryDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/HexBinaryDV.java index 99bc19709dc..c9aca67647b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/HexBinaryDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/HexBinaryDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IDDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IDDV.java index 91621d437bb..eada84dec0e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IDDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IDDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IDREFDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IDREFDV.java index ff0fdfdeba6..9faf08510f3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IDREFDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IDREFDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IntegerDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IntegerDV.java index a1a0c4b5a60..b478bfaee7f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IntegerDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/IntegerDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ListDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ListDV.java index 07d49b0988c..e44848611c1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ListDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ListDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001,2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/MonthDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/MonthDV.java index 175c5ebf2d9..6ab2e5f7128 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/MonthDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/MonthDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/MonthDayDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/MonthDayDV.java index 0edc0006ad7..a73400dc324 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/MonthDayDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/MonthDayDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/PrecisionDecimalDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/PrecisionDecimalDV.java index a75f03a03ea..3f313cf8677 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/PrecisionDecimalDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/PrecisionDecimalDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl.dv.xs; import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/QNameDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/QNameDV.java index 347e1043aab..9fa2ce59f34 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/QNameDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/QNameDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDVFactoryImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDVFactoryImpl.java index 5bb8a4350ed..daa130d233e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDVFactoryImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDVFactoryImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDateTimeException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDateTimeException.java index 917ec5982b4..435bde29b2e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDateTimeException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDateTimeException.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/StringDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/StringDV.java index 010bc1b86d5..1ced6aded25 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/StringDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/StringDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TimeDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TimeDV.java index 4c7bb4dd46d..460da68ec0d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TimeDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TimeDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TypeValidator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TypeValidator.java index 989902de5d5..a6061e04f85 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TypeValidator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/TypeValidator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/UnionDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/UnionDV.java index 0a29639666e..8bf4032452d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/UnionDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/UnionDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearDV.java index 02c5058f55c..079455eb853 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearMonthDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearMonthDV.java index b9fde68ca18..58eb63745c3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearMonthDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearMonthDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearMonthDurationDV.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearMonthDurationDV.java index c11413097ec..0162940dd44 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearMonthDurationDV.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/YearMonthDurationDV.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl.dv.xs; import java.math.BigInteger; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/ASCIIReader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/ASCIIReader.java index 0698c5806ad..5d73b8f843b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/ASCIIReader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/ASCIIReader.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/MalformedByteSequenceException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/MalformedByteSequenceException.java index d6851778173..50e51c5dbf7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/MalformedByteSequenceException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/MalformedByteSequenceException.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/UCSReader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/UCSReader.java index 74db5f630af..d19e303eb48 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/UCSReader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/UCSReader.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/UTF8Reader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/UTF8Reader.java index 46242056cd9..19baa9c920b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/UTF8Reader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/UTF8Reader.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties index d3221c5fa92..0b8ee27b51e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_de.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/13 06:43:54 gmolloy Exp $ BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties index 26f25eb9db9..cfbb9cb547d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties index cd1aed4acdc..ef9b325fd5a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties index 35b5be5ea63..c000e23df50 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $ BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties index 4b0b83dfa96..e2f923e6181 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties index d5b3b15eeba..bf3c87915fc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_ko.properties /st_wptg_1.9.dev.jdk/3 2016/07/14 00:25:31 gmolloy Exp $ BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties index 5054b344d37..ed9e73aa53f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $ BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties index 2558ec3a5ed..e97789688fe 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_sv.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 00:46:23 gmolloy Exp $ BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties index ccc991a6e16..c59decb1b3d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties index 4ae403e235f..05a943d80a2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties index 14baff4c0cf..1d9f1a082fa 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_de.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:16:51 gmolloy Exp $ BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties index 73bfbc7af94..e9dcc900a04 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties index e45255b69b2..231b13d8952 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties index e08b8e0870c..4793921f9d4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $ BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties index 1cfe77062cc..84d90d0fd41 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties index bbc91843e32..837faae29cb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $ BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties index 8f836ee7b0e..e617790c015 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $ BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties index 4778bdabbc6..122e0add0b7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_sv.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 00:46:23 gmolloy Exp $ BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties index 19950952522..21a3e3c9919 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties index 43873ec65ec..cb23f872a1b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_zh_TW.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/11 20:46:43 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties index 51417ac6a21..d9a740adbd8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_de.properties /st_wptg_1.8.0.0.0jdk/4 2013/11/10 07:44:26 gmolloy Exp $ # Messages for message reporting BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties index 9c02b32abf9..0bac87ccbf3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ # Messages for message reporting BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties index 9e12758e6bb..a48dd9437df 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ # Messages for message reporting BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties index 53c2ae00f51..8829cf1e019 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_it.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/16 07:02:00 gmolloy Exp $ # Messages for message reporting BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties index 122feead430..86120a72476 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties index 8f01010d5d1..bfdcfcb8e60 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $ # Messages for message reporting BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties index 0ec9da84643..47ba42f6d4d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $ # Messages for message reporting BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties index 83884aeb7c8..22556779bfc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_sv.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 00:46:23 gmolloy Exp $ # Messages for message reporting BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties index 757845f41ba..9cc5ccb25f2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties index 4d78213a044..f0ee4f06be3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties index 78add948a60..2b99e3461e1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_de.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:16:51 gmolloy Exp $ BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties index 60d5cfe3f74..5493f01cfc0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties index 97e7f3d98c1..17cecded65e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties index 773b9a2d8d9..c779be68515 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $ BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties index 5301c2f2ca7..21978c587cb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties index 032a96d1e5a..8661c80776d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $ BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. @@ -51,11 +49,11 @@ jaxp-secureprocessing-feature = FEATURE_SECURE_PROCESSING: \uBCF4\uC548 \uAD00\u property-not-supported = ''{0}'' \uC18D\uC131\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. property-not-recognized = ''{0}'' \uC18D\uC131\uC744 \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. property-read-only = ''{0}'' \uC18D\uC131\uC740 \uC77D\uAE30 \uC804\uC6A9\uC785\uB2C8\uB2E4. -property-not-parsing-supported = \uAD6C\uBB38 \uBD84\uC11D \uC911 ''{0}'' \uC18D\uC131\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +property-not-parsing-supported = \uAD6C\uBB38\uBD84\uC11D \uC911 ''{0}'' \uC18D\uC131\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. dom-node-read-not-supported = DOM \uB178\uB4DC \uC18D\uC131\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. DOM \uD2B8\uB9AC\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. incompatible-class = ''{0}'' \uC18D\uC131\uC5D0 \uB300\uD574 \uC9C0\uC815\uB41C \uAC12\uC758 \uB370\uC774\uD130\uD615\uC744 {1}(\uC73C)\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. start-document-not-called="{0}" \uC18D\uC131\uC740 startDocument \uC774\uBCA4\uD2B8\uAC00 \uBC1C\uC0DD\uB41C \uD6C4 \uD638\uCD9C\uD574\uC57C \uD569\uB2C8\uB2E4. nullparameter="{0}"\uC5D0 \uB300\uD55C \uC774\uB984 \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4. -errorHandlerNotSet=\uACBD\uACE0: \uAC80\uC99D\uC774 \uC124\uC815\uB418\uC5C8\uC9C0\uB9CC org.xml.sax.ErrorHandler\uAC00 \uC801\uC808\uD788 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uAE30\uBCF8 ErrorHandler\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCC98\uC74C {0}\uAC1C\uC758 \uC624\uB958\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4. \uC774 \uC624\uB958\uB97C \uC218\uC815\uD558\uB824\uBA74 ''setErrorHandler'' \uBA54\uC18C\uB4DC\uB97C \uD638\uCD9C\uD558\uC2ED\uC2DC\uC624. +errorHandlerNotSet=\uACBD\uACE0: \uAC80\uC99D\uC774 \uC124\uC815\uB418\uC5C8\uC9C0\uB9CC org.xml.sax.ErrorHandler\uAC00 \uC801\uC808\uD788 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uAE30\uBCF8 ErrorHandler\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCC98\uC74C {0}\uAC1C\uC758 \uC624\uB958\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4. \uC774 \uC624\uB958\uB97C \uC218\uC815\uD558\uB824\uBA74 ''setErrorHandler'' \uBA54\uC18C\uB4DC\uB97C \uD638\uCD9C\uD558\uC2ED\uC2DC\uC624. errorHandlerDebugMsg=\uC624\uB958: URI = "{0}", \uD589 = "{1}", : {2} diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties index 3641fecd907..6e708459485 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_pt_BR.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/12 18:01:34 gmolloy Exp $ BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties index b4f1f001afe..5088946e609 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_sv.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/14 01:57:20 gmolloy Exp $ BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties index 4c425d1705d..cc07506f888 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties index 7ee58dcddbf..91902b973b7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties index c75a115c60e..39c17b93689 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -58,4 +58,4 @@ XPointerResolutionUnsuccessful = XPointer-matchningen utf\u00F6rdes inte. # Messages from erroneous set-up IncompatibleNamespaceContext = Typ av NamespaceContext \u00E4r inkompatibel med XInclude; det kr\u00E4vs en instans av XIncludeNamespaceSupport -ExpandedSystemId = Kunde inte ut\u00F6ka system-ID:t f\u00F6r inkluderad resurs +ExpandedSystemId = Kunde inte ut\u00F6ka system-id:t f\u00F6r inkluderad resurs diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter.java index 0f7ed95d5a8..8b43cd8eea3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_de.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_de.java index 24c5e41d4d7..1143ec50d59 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_de.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_de.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_es.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_es.java index 5dab448b1fb..f8736142b5c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_es.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_es.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_fr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_fr.java index 1b4974a2e8c..44e4b81e634 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_fr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_fr.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_it.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_it.java index 66d1b90951c..a51cf7ff21c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_it.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_it.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ja.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ja.java index 14363761574..cb937402da3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ja.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ja.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ko.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ko.java index a042bdd9afe..7c01962539d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ko.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ko.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_pt_BR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_pt_BR.java index 053445dc06a..1ca2c852391 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_pt_BR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_pt_BR.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_sv.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_sv.java index bb4d9531d38..154c8da8e6f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_sv.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_sv.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_CN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_CN.java index 13f6be55cb6..4b51f3566bf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_CN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_CN.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_TW.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_TW.java index 1965d571783..24508579774 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_TW.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_TW.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties index a7ab6af1571..06c2fafbe3e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties @@ -295,7 +295,7 @@ # Implementation limits - EntityExpansionLimit=JAXP00010001: \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774 \uBB38\uC11C\uC5D0\uC11C "{0}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. \uC774\uB294 JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4. + EntityExpansionLimit=JAXP00010001: \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC774 \uBB38\uC11C\uC5D0\uC11C "{0}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. \uC774\uB294 JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4. ElementAttributeLimit=JAXP00010002: "{0}" \uC694\uC18C\uC5D0 "{1}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC18D\uC131\uC774 \uC788\uC2B5\uB2C8\uB2E4. "{1}"\uC740(\uB294) JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4. MaxEntitySizeLimit=JAXP00010003: "{0}" \uC5D4\uD2F0\uD2F0\uC758 \uAE38\uC774\uAC00 "{3}"\uC5D0\uC11C \uC124\uC815\uB41C "{2}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD558\uB294 "{1}"\uC785\uB2C8\uB2E4. TotalEntitySizeLimit=JAXP00010004: \uC5D4\uD2F0\uD2F0\uC758 \uB204\uC801 \uD06C\uAE30\uAC00 "{2}"\uC5D0\uC11C \uC124\uC815\uD55C "{1}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD558\uB294 "{0}"\uC785\uB2C8\uB2E4. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties index dd6e309b21a..7c864068a94 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_de.properties /st_wptg_1.9.dev.jdk/2 2016/06/08 01:51:09 gmolloy Exp $ BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties index edbc9c3460c..3d2f34114f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_es.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/14 05:09:25 gmolloy Exp $ BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties index 5a539598eec..8c56325eaac 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_fr.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/12 05:13:35 gmolloy Exp $ BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties index 06c792ea58d..00ae985aef6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_it.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/12 03:53:19 gmolloy Exp $ BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n @@ -137,7 +135,7 @@ src-element.2.2 = src-element.2.2: poich\u00E9 ''{0}'' contiene l''attributo ''ref'', il suo contenuto deve corrispondere a (annotation?), ma \u00E8 stato trovato ''{1}''. src-element.3 = src-element.3: l''elemento "{0}" ha sia un attributo ''type'' che un elemento figlio "anonymous type". \u00C8 consentito uno solo di questi valori per un elemento. src-import.1.1 = src-import.1.1: l''attributo "{0}" dello spazio di nomi di una voce di informazioni di elemento non deve essere uguale al targetNamespace dello schema in cui esiste. - src-import.1.2 = src-import.1.2: se l''attributo dello spazio di nomi non \u00E8 presente in una voce di informazioni di elemento , lo schema che lo contiene deve avere un targetNamespace. + src-import.1.2 = src-import.1.2: se l'attributo dello spazio di nomi non \u00E8 presente in una voce di informazioni di elemento , lo schema che lo contiene deve avere un targetNamespace. src-import.2 = src-import.2: l''elemento radice del documento "{0}" deve avere lo spazio di nomi denominato ''http://www.w3.org/2001/XMLSchema'' e il nome locale ''schema''. src-import.3.1 = src-import.3.1: l''attributo "{0}" dello spazio di nomi di una voce di informazioni di elemento deve essere uguale all''attributo targetNamespace ''{1}'' del documento importato. src-import.3.2 = src-import.3.2: non esiste alcun attributo dello spazio di nomi nella voce di informazioni di elemento , pertanto il documento importato non pu\u00F2 avere alcun attributo targetNamespace. tuttavia, \u00E8 stato trovato targetNamespace ''{1}'' nel documento importato. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties index 63997f8fe22..cd27296e8ef 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_ja.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/12 00:37:07 gmolloy Exp $ BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties index 52ab2b4df2c..84874334eb4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_ko.properties /st_wptg_1.9.dev.jdk/3 2016/07/14 00:25:31 gmolloy Exp $ BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n @@ -218,7 +216,7 @@ e-props-correct.2 = e-props-correct.2: ''{0}'' \uC694\uC18C\uC758 \uAC12 \uC81C\uC57D \uC870\uAC74 \uAC12 ''{1}''\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. e-props-correct.4 = e-props-correct.4: ''{0}'' \uC694\uC18C\uC758 '{'type definition'}'\uC774 substitutionHead ''{1}''\uC758 '{'type definition'}'\uC5D0\uC11C \uC801\uD569\uD558\uAC8C \uD30C\uC0DD\uB41C \uAC83\uC774 \uC544\uB2C8\uAC70\uB098 ''{1}''\uC758 '{'substitution group exclusions'}' \uC18D\uC131\uC774 \uC774 \uD30C\uC0DD\uC744 \uD5C8\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. e-props-correct.5 = e-props-correct.5: \uC694\uC18C\uC758 '{'type definition'}' \uB610\uB294 '{'type definition'}'\uC758 '{'content type'}'\uC774 ID\uC774\uAC70\uB098 ID\uC5D0\uC11C \uD30C\uC0DD\uB41C \uAC83\uC774\uBBC0\uB85C '{'value constraint'}'\uB294 ''{0}'' \uC694\uC18C\uC5D0 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4. - e-props-correct.6 = e-props-correct.6: ''{0}'' \uC694\uC18C\uC5D0 \uB300\uD55C \uC21C\uD658 \uB300\uCCB4 \uADF8\uB8F9\uC774 \uAC10\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4.. + e-props-correct.6 = e-props-correct.6: ''{0}'' \uC694\uC18C\uC5D0 \uB300\uD55C \uC21C\uD658 \uB300\uCCB4 \uADF8\uB8F9\uC774 \uAC10\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4. fractionDigits-valid-restriction = fractionDigits-valid-restriction: {2}\uC758 \uC815\uC758\uC5D0\uC11C ''fractionDigits'' \uBA74\uC5D0 \uB300\uD55C ''{0}'' \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uC774 \uAC12\uC740 \uC870\uC0C1 \uC720\uD615 \uC911 \uD558\uB098\uC5D0\uC11C ''{1}''(\uC73C)\uB85C \uC124\uC815\uB41C ''fractionDigits''\uC5D0 \uB300\uD55C \uAC12\uBCF4\uB2E4 \uC791\uAC70\uB098 \uAC19\uC544\uC57C \uD569\uB2C8\uB2E4. fractionDigits-totalDigits = fractionDigits-totalDigits: {2}\uC758 \uC815\uC758\uC5D0\uC11C ''fractionDigits'' \uBA74\uC5D0 \uB300\uD55C ''{0}'' \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uC774 \uAC12\uC740 ''totalDigits''\uC5D0 \uB300\uD55C \uAC12\uC778 ''{1}''\uBCF4\uB2E4 \uC791\uAC70\uB098 \uAC19\uC544\uC57C \uD569\uB2C8\uB2E4. length-minLength-maxLength.1.1 = length-minLength-maxLength.1.1: {0} \uC720\uD615\uC758 \uACBD\uC6B0 length ''{1}''\uC758 \uAC12\uC740 minLength ''{2}''\uC758 \uAC12\uBCF4\uB2E4 \uC791\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. @@ -314,7 +312,7 @@ FacetValueFromBase = FacetValueFromBase: ''{0}'' \uC720\uD615\uC758 \uC120\uC5B8\uC5D0\uC11C ''{2}'' \uBA74\uC758 ''{1}'' \uAC12\uC740 \uAE30\uBCF8 \uC720\uD615 ''{3}''\uC758 \uAC12 \uACF5\uBC31\uC5D0\uC11C \uC640\uC57C \uD569\uB2C8\uB2E4. FixedFacetValue = FixedFacetValue: {3}\uC758 \uC815\uC758\uC5D0\uC11C ''{0}'' \uBA74\uC5D0 \uB300\uD55C ''{1}'' \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. ''{0}''\uC5D0 \uB300\uD55C \uAC12\uC774 \uC870\uC0C1 \uC720\uD615 \uC911 \uD558\uB098\uC5D0\uC11C ''{2}''(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC73C\uBA70 '{'fixed'}' = true\uC774\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. InvalidRegex = InvalidRegex: \uD328\uD134 \uAC12 ''{0}''\uC740(\uB294) \uC801\uD569\uD55C \uC815\uADDC \uD45C\uD604\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4. ''{2}'' \uC5F4\uC5D0\uC11C ''{1}'' \uC624\uB958\uAC00 \uBCF4\uACE0\uB418\uC5C8\uC2B5\uB2C8\uB2E4. - MaxOccurLimit = \uAD6C\uBB38 \uBD84\uC11D\uAE30\uC758 \uD604\uC7AC \uAD6C\uC131\uC5D0\uC11C maxOccurs \uC18D\uC131\uAC12\uC744 {0} \uAC12\uBCF4\uB2E4 \uD06C\uAC8C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + MaxOccurLimit = \uAD6C\uBB38\uBD84\uC11D\uAE30\uC758 \uD604\uC7AC \uAD6C\uC131\uC5D0\uC11C maxOccurs \uC18D\uC131\uAC12\uC744 {0} \uAC12\uBCF4\uB2E4 \uD06C\uAC8C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. PublicSystemOnNotation = PublicSystemOnNotation: \uD558\uB098 \uC774\uC0C1\uC758 ''public''\uACFC ''system''\uC774 ''notation'' \uC694\uC18C\uC5D0 \uB098\uD0C0\uB098\uC57C \uD569\uB2C8\uB2E4. SchemaLocation = SchemaLocation: schemaLocation \uAC12 = ''{0}''\uC5D0\uB294 \uC9DD\uC218 \uAC1C\uC758 URI\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. TargetNamespace.1 = TargetNamespace.1: ''{0}'' \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \uC2A4\uD0A4\uB9C8 \uBB38\uC11C\uC758 \uB300\uC0C1 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 ''{1}''\uC785\uB2C8\uB2E4. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties index 0abad5e3812..ac226e02e25 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_pt_BR.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/12 18:01:34 gmolloy Exp $ BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties index eeaf7782718..dd04e72f5ae 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_sv.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/14 01:57:20 gmolloy Exp $ BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n @@ -111,7 +109,7 @@ cvc-totalDigits-valid = cvc-totalDigits-valid: V\u00E4rdet ''{0}'' har {1} siffror, men det totala antalet siffror \u00E4r begr\u00E4nsat till {2}. cvc-type.1 = cvc-type.1: Typdefinitionen ''{0}'' hittades inte. cvc-type.2 = cvc-type.2: Typdefinitionen kan inte vara abstrakt f\u00F6r elementet {0}. - cvc-type.3.1.1 = cvc-type.3.1.1: Elementet ''{0}'' har enkel typ och kan inte inneh\u00E5lla attribut, ut\u00F6ver s\u00E5dana vars namnrymd \u00E4r identisk med ''http://www.w3.org/2001/XMLSchema-instance'' och vars [lokala namn] har n\u00E5gotdera av ''type'', ''nil'', ''schemaLocation'' eller ''noNamespaceSchemaLocation''. Hittade dock attributet ''{1}''. + cvc-type.3.1.1 = cvc-type.3.1.1: Elementet ''{0}'' har enkel typ och f\u00E5r inte inneh\u00E5lla attribut, ut\u00F6ver s\u00E5dana vars namnrymd \u00E4r identisk med ''http://www.w3.org/2001/XMLSchema-instance'' och vars [lokala namn] har n\u00E5gotdera av ''type'', ''nil'', ''schemaLocation'' eller ''noNamespaceSchemaLocation''. Hittade dock attributet ''{1}''. cvc-type.3.1.2 = cvc-type.3.1.2: Elementet ''{0}'' har enkel typ och f\u00E5r inte inneh\u00E5lla [underordnade] med elementinformation. cvc-type.3.1.3 = cvc-type.3.1.3: V\u00E4rdet ''{1}'' i elementet ''{0}'' \u00E4r ogiltigt. @@ -282,7 +280,7 @@ rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: Det finns ingen fullst\u00E4ndigt fungerande mappning mellan partiklarna. # We're using sch-props-correct.2 instead of the old src-redefine.1 # src-redefine.1 = src-redefine.1: The component ''{0}'' is begin redefined, but its corresponding component isn't in the schema document being redefined (with namespace ''{2}''), but in a different document, with namespace ''{1}''. - sch-props-correct.2 = sch-props-correct.2: Ett schema kan inte inneh\u00E5lla tv\u00E5 globala komponenter med samma namn. Detta schema har tv\u00E5 f\u00F6rekomster av ''{0}''. + sch-props-correct.2 = sch-props-correct.2: Ett schema f\u00E5r inte inneh\u00E5lla tv\u00E5 globala komponenter med samma namn. Detta schema har tv\u00E5 f\u00F6rekomster av ''{0}''. st-props-correct.2 = st-props-correct.2: Cirkul\u00E4ra definitioner har identifierats f\u00F6r enkel typ ''{0}''. Detta inneb\u00E4r att ''{0}'' ing\u00E5r i sin egen typhierarki, vilket \u00E4r fel. st-props-correct.3 = st-props-correct.3: Ett fel intr\u00E4ffade f\u00F6r typ ''{0}''. V\u00E4rdet f\u00F6r '{'slutgiltigt'}' i '{'bastypdefinitionen'}', ''{1}'', f\u00F6rbjuder h\u00E4rledning med begr\u00E4nsning. totalDigits-valid-restriction = totalDigits-valid-restriction: I definitionen f\u00F6r {2} \u00E4r v\u00E4rdet ''{0}'' f\u00F6r ''totalDigits'' ogiltigt eftersom det m\u00E5ste vara mindre \u00E4n eller lika med v\u00E4rdet f\u00F6r ''totalDigits'' som har angetts som ''{1}'' i n\u00E5gon typ f\u00F6r \u00F6verordnad. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties index bf51b628471..d3e03337546 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_zh_CN.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/13 05:10:27 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties index 747036b9576..925a97306e0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_zh_TW.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/11 20:46:43 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties index a279e879bd4..3c1d9d8282c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_de.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:16:51 gmolloy Exp $ BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties index a06a1613092..4e6c0c62ed3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ BadMessageKey = No se ha encontrado el mensaje de error que corresponde a la clave de mensaje. FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties index a274f4be731..535f97ecc5b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. FormatFailed = Une erreur interne est survenue lors de la mise en forme du message suivant :\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties index 114f1f47125..2798c1a2c17 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $ BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties index c604e087580..341497c9a6f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties index 0ff73562f3d..c09651c4e99 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $ BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties index e842306d2bb..29991ad2fc3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $ BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties index 68ad3bf3b8e..4f39063a0e6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_sv.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/14 01:57:20 gmolloy Exp $ BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties index c9888263168..d8b2eb0bba5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties index c6dfc1606d2..28af1b88d66 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties index 72d3bba7381..dc787a6cd3d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_de.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:16:51 gmolloy Exp $ # Messages for message reporting BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties index baa0b0d6fd4..3495022fe75 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ # Messages for message reporting BadMessageKey = No se ha encontrado el mensaje de error que corresponde a la clave de mensaje. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties index 9eb7cf0d3fc..a9fe2c41407 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ # Messages for message reporting BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties index d59616ea2d6..549797ba81e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,15 +26,13 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $ # Messages for message reporting BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n # XPointer Framework Error Messages -XPointerProcessingError = XPointerProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell''espressione XPointer. +XPointerProcessingError = XPointerProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell'espressione XPointer. InvalidXPointerToken = InvalidXPointerToken: l''espressione XPointer contiene il token non valido ''{0}''. InvalidXPointerExpression = InvalidXPointerExpression: l''espressione XPointer ''{0}'' non \u00E8 valida. MultipleShortHandPointers = MultipleShortHandPointers: l''espressione XPointer ''{0}'' non \u00E8 valida. Contiene pi\u00F9 puntatori ShortHand. @@ -47,6 +45,6 @@ InvalidSchemeDataInXPointer = InvalidSchemeDataInXPointer: l''espressione XPoint # XPointer Element Scheme Error Messages InvalidElementSchemeToken = InvalidElementSchemeToken: l''espressione XPointer dello schema element() contiene il token non valido ''{0}''. InvalidElementSchemeXPointer = InvalidElementSchemeXPointer: l''espressione XPointer ''{0}'' dello schema di elemento non \u00E8 valida. -XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell''espressione di schema element() XPointer. +XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell'espressione di schema element() XPointer. InvalidNCNameInElementSchemeData = InvalidNCNameInElementSchemeData: lo schema element() contiene un puntatore ShortHand ''{0}'' con NCName non valido. InvalidChildSequenceCharacter = InvalidChildSequenceCharacter: lo schema element() contiene un carattere di sequenza secondaria ''{0}'' non valido. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties index 26a2a3eec83..e12a67655f8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties index 3f43bbd67bd..c86ecf6264c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $ # Messages for message reporting BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties index a4076986da3..34584b802ca 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $ # Messages for message reporting BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties index 8444e131b9b..0e822f523f2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_sv.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 00:46:23 gmolloy Exp $ # Messages for message reporting BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties index d2c2dc3220f..cbbaad08e7b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties index 6c9bf142532..5b30e236a2e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/EntityState.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/EntityState.java index 86a921599bb..43b127db599 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/EntityState.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/EntityState.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationManager.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationManager.java index 67e9535e1e1..664f13b5094 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationManager.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationManager.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaNamespaceSupport.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaNamespaceSupport.java index 59098752d48..aca31d1e770 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaNamespaceSupport.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaNamespaceSupport.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaSymbols.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaSymbols.java index 2e8205c3c25..f49a1aa8595 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaSymbols.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaSymbols.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaException.java index 48bc733d7fe..73a1cfdace8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaException.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl.xs; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAnnotationImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAnnotationImpl.java index e6e933c0586..cc1d1fc9af3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAnnotationImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAnnotationImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl.xs; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeGroupDecl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeGroupDecl.java index fda0899f9da..17466ca2139 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeGroupDecl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeGroupDecl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSDDescription.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSDDescription.java index 2e25ec81fe3..c7c145f3378 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSDDescription.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSDDescription.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002, 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSDeclarationPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSDeclarationPool.java index 604f50da504..6f1e6e8a171 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSDeclarationPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSDeclarationPool.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSGroupDecl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSGroupDecl.java index 3c51b0c5004..09af982f797 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSGroupDecl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSGroupDecl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSImplementationImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSImplementationImpl.java index 8cf0c4ab84c..222e0fb6c3b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSImplementationImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSImplementationImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSLoaderImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSLoaderImpl.java index 1740d758e4a..c525762ce7b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSLoaderImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSLoaderImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSMessageFormatter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSMessageFormatter.java index 236b7962373..1a5f092b7ff 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSMessageFormatter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSMessageFormatter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSModelGroupImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSModelGroupImpl.java index 8f63830c7a6..3366f5c98f9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSModelGroupImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSModelGroupImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSNotationDecl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSNotationDecl.java index c34f16b8f88..bf744909beb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSNotationDecl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSNotationDecl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSParticleDecl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSParticleDecl.java index cb2ba9a5066..71674fd5b61 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSParticleDecl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSParticleDecl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSWildcardDecl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSWildcardDecl.java index b56db22ba14..f9b181d1200 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSWildcardDecl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSWildcardDecl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/IdentityConstraint.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/IdentityConstraint.java index d62dc05102d..51c9e09f82c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/IdentityConstraint.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/IdentityConstraint.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/KeyRef.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/KeyRef.java index 4058b505cb3..42000756643 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/KeyRef.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/KeyRef.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/Selector.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/Selector.java index 283e6c1f153..6bda1ea4c97 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/Selector.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/Selector.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/UniqueOrKey.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/UniqueOrKey.java index a86c6648790..57ff9d0f74f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/UniqueOrKey.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/UniqueOrKey.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/XPathMatcher.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/XPathMatcher.java index d8789329b93..48f0cb3c8ed 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/XPathMatcher.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/XPathMatcher.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java index db1d0b7adeb..bde742b5303 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java @@ -2,11 +2,12 @@ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. */ /* - * Copyright 2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMBinOp.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMBinOp.java index be62f389c5a..a0bb375a0dc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMBinOp.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMBinOp.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMLeaf.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMLeaf.java index 9359d21e33e..a11458a6029 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMLeaf.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMLeaf.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMUniOp.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMUniOp.java index 87b05964c8d..8fcd9bcdc31 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMUniOp.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMUniOp.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/AttrImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/AttrImpl.java index 89c70ebc0fa..e1a330bdc6b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/AttrImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/AttrImpl.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2001, 2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 2001, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.xs.opti; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultDocument.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultDocument.java index 8322e871e5f..e3cd700ab55 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultDocument.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultDocument.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultElement.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultElement.java index c4db6d8d508..ae9a1bd2b9b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultElement.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultElement.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultNode.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultNode.java index 1509663c119..d424f7c7178 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultNode.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultNode.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultText.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultText.java index 4f750b11888..fc370dcb505 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultText.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultText.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultXMLDocumentHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultXMLDocumentHandler.java index dd0ac9b33c7..84aaf912ff9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultXMLDocumentHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultXMLDocumentHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/ElementImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/ElementImpl.java index 28a6bd678b2..7b17e2b6efa 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/ElementImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/ElementImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/NamedNodeMapImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/NamedNodeMapImpl.java index d332999c4ea..df56eca250d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/NamedNodeMapImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/NamedNodeMapImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/NodeImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/NodeImpl.java index 5562c9f91a0..6b46b9da7b9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/NodeImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/NodeImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java index 52ed98f24d9..e37e56d5812 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOMParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOMParser.java index b8e1d54959e..aa94cf2590a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOMParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOMParser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/TextImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/TextImpl.java index 3476e648dd0..2af2c6d2fcf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/TextImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/TextImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/SchemaContentHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/SchemaContentHandler.java index 1a7ca147680..f603ddf6d61 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/SchemaContentHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/SchemaContentHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAnnotationInfo.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAnnotationInfo.java index 1ec7741e199..b197eb0bf76 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAnnotationInfo.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAnnotationInfo.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl.xs.traversers; import org.w3c.dom.Element; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java index 816cdaa4757..ddd4558aaba 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractIDConstraintTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractIDConstraintTraverser.java index af38b2f73f6..aa863a5f4e7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractIDConstraintTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractIDConstraintTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractParticleTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractParticleTraverser.java index 0a0569a1fc2..8b15fece6a2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractParticleTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractParticleTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractTraverser.java index 7af4c66754d..c493ac2587a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeGroupTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeGroupTraverser.java index 14d15309ea9..5ad2deeb7d5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeGroupTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeGroupTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl.xs.traversers; import com.sun.org.apache.xerces.internal.impl.xs.SchemaGrammar; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeTraverser.java index 6174a7b5ec3..1988e70ba7d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDComplexTypeTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDComplexTypeTraverser.java index b786158ac7c..0c7d663363f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDComplexTypeTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDComplexTypeTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl.xs.traversers; import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeFacetException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDElementTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDElementTraverser.java index e0e4c464c21..9ee9159cbb9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDElementTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDElementTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDGroupTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDGroupTraverser.java index 99e2ec99319..06d51f8aa55 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDGroupTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDGroupTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.impl.xs.traversers; import com.sun.org.apache.xerces.internal.impl.xs.SchemaGrammar; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDKeyrefTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDKeyrefTraverser.java index 7d590acf55f..a70bb70a119 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDKeyrefTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDKeyrefTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDNotationTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDNotationTraverser.java index 27acd055d2f..fd562173fb4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDNotationTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDNotationTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDUniqueOrKeyTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDUniqueOrKeyTraverser.java index 2e36be5745e..c3382725541 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDUniqueOrKeyTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDUniqueOrKeyTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDWildcardTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDWildcardTraverser.java index c368b74ccfd..36a04c322a4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDWildcardTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDWildcardTraverser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDocumentInfo.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDocumentInfo.java index b941ea90236..c2ea37b7073 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDocumentInfo.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDocumentInfo.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java index 9dc0641ef26..0491444b6d3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/SimpleLocator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/SimpleLocator.java index a38405eb056..55a4d6674a2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/SimpleLocator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/SimpleLocator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002, 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/StringListImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/StringListImpl.java index cf3d46a494e..e8df031747a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/StringListImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/StringListImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XInt.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XInt.java index 68aa63c326a..53c4950c47c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XInt.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XInt.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XIntPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XIntPool.java index 821f3996217..3d9b7aa9908 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XIntPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XIntPool.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSGrammarPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSGrammarPool.java index a3f0bc71a37..1bbcb92e453 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSGrammarPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSGrammarPool.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMap4Types.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMap4Types.java index a2c6b29df41..d44ae32f704 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMap4Types.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMap4Types.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java index b15f1ed47b3..8484b2f3444 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java index 7c5b4f7c40f..732cdae4bb7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DefaultValidationErrorHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DefaultValidationErrorHandler.java index 0c8d0a84db2..56b4ca2f844 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DefaultValidationErrorHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DefaultValidationErrorHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/JAXPConstants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/JAXPConstants.java index 5f2c563e211..0f5842d4911 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/JAXPConstants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/JAXPConstants.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/JAXPValidatorComponent.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/JAXPValidatorComponent.java index d447574d0f1..97234b99f34 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/JAXPValidatorComponent.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/JAXPValidatorComponent.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SchemaValidatorConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SchemaValidatorConfiguration.java index f919ec08a81..081ea6b9a26 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SchemaValidatorConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SchemaValidatorConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/TeeXMLDocumentFilterImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/TeeXMLDocumentFilterImpl.java index 696717a8a21..4893b4709ca 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/TeeXMLDocumentFilterImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/TeeXMLDocumentFilterImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/UnparsedEntityHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/UnparsedEntityHandler.java index 8129066eb3d..124babffa4f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/UnparsedEntityHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/UnparsedEntityHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DatatypeFactoryImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DatatypeFactoryImpl.java index a9baeac29ef..04f27e20020 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DatatypeFactoryImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DatatypeFactoryImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java index 2d06bc0555a..620a0ec56d1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMDocumentHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMDocumentHandler.java index 9f514a97e62..b540b1b1360 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMDocumentHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMDocumentHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultAugmentor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultAugmentor.java index 06d75ebe055..950fbe837b9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultAugmentor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultAugmentor.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultBuilder.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultBuilder.java index f78f1f4354d..1469dace33b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultBuilder.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultBuilder.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java index fe006533b1d..6c5c562f844 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DraconianErrorHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DraconianErrorHandler.java index 171a4b596c7..721060dfe1f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DraconianErrorHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DraconianErrorHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java index ba50c5175b8..2a63e83e5e4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ErrorHandlerAdaptor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ErrorHandlerAdaptor.java index 124bcbc44c2..6b15b937af6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ErrorHandlerAdaptor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ErrorHandlerAdaptor.java @@ -3,61 +3,22 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package com.sun.org.apache.xerces.internal.jaxp.validation; import com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/JAXPValidationMessageFormatter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/JAXPValidationMessageFormatter.java index 8c50c4d477b..70fc95d97cc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/JAXPValidationMessageFormatter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/JAXPValidationMessageFormatter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ReadOnlyGrammarPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ReadOnlyGrammarPool.java index f177a1123d5..075f86416f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ReadOnlyGrammarPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ReadOnlyGrammarPool.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SimpleXMLSchema.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SimpleXMLSchema.java index 9b7b67db72f..dff20e5bd94 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SimpleXMLSchema.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SimpleXMLSchema.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SoftReferenceGrammarPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SoftReferenceGrammarPool.java index 2eeb5534f59..213b58be5d4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SoftReferenceGrammarPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SoftReferenceGrammarPool.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/Util.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/Util.java index 40782abb378..1f4f872eda4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/Util.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/Util.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHelper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHelper.java index aac3c6d1059..332cf319387 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHelper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHelper.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WeakReferenceXMLSchema.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WeakReferenceXMLSchema.java index 8399c9fd421..6180c8c3ba1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WeakReferenceXMLSchema.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WeakReferenceXMLSchema.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WrappedSAXException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WrappedSAXException.java index 106117c0872..ebed5682552 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WrappedSAXException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WrappedSAXException.java @@ -3,61 +3,22 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package com.sun.org.apache.xerces.internal.jaxp.validation; import org.xml.sax.SAXException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java index 431a0f21f01..fe094fcfac1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java index 5e6c5773fba..68c3acd3fbb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java index 3f6b43df132..ab289f875d8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractXMLDocumentParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractXMLDocumentParser.java index 545997c2f28..c80cec39d9f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractXMLDocumentParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractXMLDocumentParser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java index c41f27d5a3f..679b0e7b820 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/CachingParserPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/CachingParserPool.java index a9f52290ce4..218c71327f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/CachingParserPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/CachingParserPool.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DOMParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DOMParser.java index d0f84188c5f..7d4511910b3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DOMParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DOMParser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DTDParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DTDParser.java index 3c7624c6b29..c77968c900f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DTDParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DTDParser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/IntegratedParserConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/IntegratedParserConfiguration.java index f90598c15a5..9f0c1e39d12 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/IntegratedParserConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/IntegratedParserConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/SAXParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/SAXParser.java index 811d957686e..b61d12e551a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/SAXParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/SAXParser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java index 7eba8746e59..039043d8ecf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XIncludeAwareParserConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XIncludeAwareParserConfiguration.java index 9ef0b52222c..07a5498a712 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XIncludeAwareParserConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XIncludeAwareParserConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XIncludeParserConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XIncludeParserConfiguration.java index 29c18fa51d6..9c47d8eebf5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XIncludeParserConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XIncludeParserConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.parsers; import com.sun.org.apache.xerces.internal.impl.Constants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configurable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configurable.java index 7b5387a4a35..3c7d2ea6306 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configurable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configurable.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java index f56467532b6..109e4b69e46 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java @@ -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. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -415,9 +415,15 @@ public class XML11Configuration extends ParserConfigurationSettings /** Current DTD scanner. */ protected XMLDTDScanner fCurrentDTDScanner; - /** Flag indiciating whether XML11 components have been initialized. */ + /** Flag indicating whether XML11 components have been initialized. */ private boolean f11Initialized = false; + /** Flag indicating whether the symbol table instance was specified during construction **/ + private boolean fSymbolTableProvided = false; + + /** Flag indicating if the symbol table was initialized and never used before that **/ + private boolean fSymbolTableJustInitialized = true; + // // Constructors // @@ -500,7 +506,8 @@ public class XML11Configuration extends ParserConfigurationSettings EXTERNAL_PARAMETER_ENTITIES, PARSER_SETTINGS, XMLConstants.FEATURE_SECURE_PROCESSING, - XMLConstants.USE_CATALOG + XMLConstants.USE_CATALOG, + JdkXmlUtils.RESET_SYMBOL_TABLE }; addRecognizedFeatures(recognizedFeatures); // set state for default features @@ -526,6 +533,7 @@ public class XML11Configuration extends ParserConfigurationSettings fFeatures.put(PARSER_SETTINGS, Boolean.TRUE); fFeatures.put(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); fFeatures.put(XMLConstants.USE_CATALOG, JdkXmlUtils.USE_CATALOG_DEFAULT); + fFeatures.put(JdkXmlUtils.RESET_SYMBOL_TABLE, JdkXmlUtils.RESET_SYMBOL_TABLE_DEFAULT); // add default recognized properties final String[] recognizedProperties = @@ -566,15 +574,18 @@ public class XML11Configuration extends ParserConfigurationSettings }; addRecognizedProperties(recognizedProperties); - if (symbolTable == null) { - symbolTable = new SymbolTable(); + // Remember if symbolTable was provided from outside + fSymbolTableProvided = symbolTable != null; + if (!fSymbolTableProvided) { + fSymbolTable = new SymbolTable(); + } else { + fSymbolTable = symbolTable; } - fSymbolTable = symbolTable; fProperties.put(SYMBOL_TABLE, fSymbolTable); fGrammarPool = grammarPool; if (fGrammarPool != null) { - fProperties.put(XMLGRAMMAR_POOL, fGrammarPool); + fProperties.put(XMLGRAMMAR_POOL, fGrammarPool); } fEntityManager = new XMLEntityManager(); @@ -840,6 +851,7 @@ public class XML11Configuration extends ParserConfigurationSettings fValidationManager.reset(); fVersionDetector.reset(this); fConfigUpdated = true; + resetSymbolTable(); resetCommon(); short version = fVersionDetector.determineDocVersion(fInputSource); @@ -858,15 +870,7 @@ public class XML11Configuration extends ParserConfigurationSettings // resets and sets the pipeline. fVersionDetector.startDocumentParsing((XMLEntityHandler) fCurrentScanner, version); fInputSource = null; - } catch (XNIException ex) { - if (PRINT_EXCEPTION_STACK_TRACE) - ex.printStackTrace(); - throw ex; - } catch (IOException ex) { - if (PRINT_EXCEPTION_STACK_TRACE) - ex.printStackTrace(); - throw ex; - } catch (RuntimeException ex) { + } catch (IOException | RuntimeException ex) { if (PRINT_EXCEPTION_STACK_TRACE) ex.printStackTrace(); throw ex; @@ -879,15 +883,7 @@ public class XML11Configuration extends ParserConfigurationSettings try { return fCurrentScanner.scanDocument(complete); - } catch (XNIException ex) { - if (PRINT_EXCEPTION_STACK_TRACE) - ex.printStackTrace(); - throw ex; - } catch (IOException ex) { - if (PRINT_EXCEPTION_STACK_TRACE) - ex.printStackTrace(); - throw ex; - } catch (RuntimeException ex) { + } catch (IOException | RuntimeException ex) { if (PRINT_EXCEPTION_STACK_TRACE) ex.printStackTrace(); throw ex; @@ -1589,6 +1585,24 @@ public class XML11Configuration extends ParserConfigurationSettings } } + + /** + * Reset the symbol table if it wasn't provided during construction, + * its not the first time when parse is called after initialization + * and RESET_SYMBOL_TABLE feature is set to true + */ + private void resetSymbolTable() { + if (fFeatures.get(JdkXmlUtils.RESET_SYMBOL_TABLE) && !fSymbolTableProvided) { + if (fSymbolTableJustInitialized) { + // Skip symbol table reallocation for the first parsing process + fSymbolTableJustInitialized = false; + } else { + fSymbolTable = new SymbolTable(); + fProperties.put(SYMBOL_TABLE, fSymbolTable); + } + } + } + /** * Returns the state of a feature. This method calls getFeature() * on ParserConfigurationSettings, bypassing getFeature() on this diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java index f7591ae608e..892fb28c8ea 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java index 36a284239f3..8f526211db5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLDocumentParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLDocumentParser.java index eba49fbad92..80ed4b0138b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLDocumentParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLDocumentParser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarCachingConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarCachingConfiguration.java index 72c055dbdf1..2b4314bc25a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarCachingConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarCachingConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarParser.java index 1089493f2eb..d0e0e68fc1b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarParser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLParser.java index fe7801fcbb3..636b25761d6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLParser.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XPointerParserConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XPointerParserConfiguration.java index cacd68c68a2..2249811b14d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XPointerParserConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XPointerParserConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.parsers; import com.sun.org.apache.xerces.internal.impl.Constants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AttributesProxy.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AttributesProxy.java index 2c7b827eb17..e3a7746d3ad 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AttributesProxy.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AttributesProxy.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMEntityResolverWrapper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMEntityResolverWrapper.java index 8a4bbb5d852..07288981e89 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMEntityResolverWrapper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMEntityResolverWrapper.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMInputSource.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMInputSource.java index bfa95727b0a..af3cfdb035b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMInputSource.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMInputSource.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DatatypeMessageFormatter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DatatypeMessageFormatter.java index 500769db59a..0097ec8f7b7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DatatypeMessageFormatter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DatatypeMessageFormatter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DefaultErrorHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DefaultErrorHandler.java index ca5e039981d..945c9d3f2e5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DefaultErrorHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DefaultErrorHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DraconianErrorHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DraconianErrorHandler.java index 89b38a55ab9..0850c698509 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DraconianErrorHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DraconianErrorHandler.java @@ -3,61 +3,22 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package com.sun.org.apache.xerces.internal.util; import org.xml.sax.ErrorHandler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/EntityResolver2Wrapper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/EntityResolver2Wrapper.java index 53fdfde802a..4c4405a9796 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/EntityResolver2Wrapper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/EntityResolver2Wrapper.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ErrorHandlerProxy.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ErrorHandlerProxy.java index 8b3ae9b075a..cc12f30d107 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ErrorHandlerProxy.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ErrorHandlerProxy.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ErrorHandlerWrapper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ErrorHandlerWrapper.java index 2455fe38a77..c8bc5e989e9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ErrorHandlerWrapper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ErrorHandlerWrapper.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/FeatureState.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/FeatureState.java index e78b30c3773..36e56879d18 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/FeatureState.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/FeatureState.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,14 +23,6 @@ * questions. */ -/* - * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved. - */ - -/* - * $Id: FeatureState.java 3024 2011-03-01 03:46:13Z joehw $ - */ - package com.sun.org.apache.xerces.internal.util; public class FeatureState { diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/IntStack.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/IntStack.java index 541d17a4915..49cf1c8c7e7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/IntStack.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/IntStack.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/LocatorProxy.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/LocatorProxy.java index 69c78a11654..759fca13cca 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/LocatorProxy.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/LocatorProxy.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/LocatorWrapper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/LocatorWrapper.java index d4445e6dc92..9a606c176f8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/LocatorWrapper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/LocatorWrapper.java @@ -3,61 +3,22 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package com.sun.org.apache.xerces.internal.util; import com.sun.org.apache.xerces.internal.xni.XMLLocator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/MessageFormatter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/MessageFormatter.java index f55ba5e35fc..7eaa9218ba5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/MessageFormatter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/MessageFormatter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/NamespaceSupport.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/NamespaceSupport.java index 2cd632c778d..9ba36621fba 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/NamespaceSupport.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/NamespaceSupport.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ParserConfigurationSettings.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ParserConfigurationSettings.java index 36ef62a6da1..7eca1d312da 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ParserConfigurationSettings.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ParserConfigurationSettings.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/PropertyState.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/PropertyState.java index 5e133cae65c..5788b64ab12 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/PropertyState.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/PropertyState.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,13 +23,6 @@ * questions. */ -/* - * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved. - */ - -/* - * $Id: PropertyState.java 3024 2011-03-01 03:46:13Z joehw $ - */ package com.sun.org.apache.xerces.internal.util; public class PropertyState { diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAX2XNI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAX2XNI.java index b0017e67f89..11218972feb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAX2XNI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAX2XNI.java @@ -3,61 +3,22 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package com.sun.org.apache.xerces.internal.util; import com.sun.org.apache.xerces.internal.impl.xs.util.SimpleLocator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXInputSource.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXInputSource.java index cabd2d5653b..8ea1ba2d06a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXInputSource.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXInputSource.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXLocatorWrapper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXLocatorWrapper.java index 5733845c454..be1494b1a59 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXLocatorWrapper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXLocatorWrapper.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXMessageFormatter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXMessageFormatter.java index 5c87f4ba497..a62242eaebc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXMessageFormatter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXMessageFormatter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.util; import com.sun.org.apache.xerces.internal.utils.SecuritySupport; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SecurityManager.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SecurityManager.java index d916f5bc516..a5df3999748 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SecurityManager.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SecurityManager.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2003 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ShadowedSymbolTable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ShadowedSymbolTable.java index 0550c505d7f..36f5c71febb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ShadowedSymbolTable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ShadowedSymbolTable.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/Status.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/Status.java index 5fdcc5e19c1..b6d169eaa3d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/Status.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/Status.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,13 +23,6 @@ * questions. */ -/* - * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved. - */ - -/* - * $Id: Status.java 3024 2011-03-01 03:46:13Z joehw $ - */ package com.sun.org.apache.xerces.internal.util; public enum Status { diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SynchronizedSymbolTable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SynchronizedSymbolTable.java index 02086ef0f32..4eda3f33a50 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SynchronizedSymbolTable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SynchronizedSymbolTable.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/TeeXMLDocumentFilterImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/TeeXMLDocumentFilterImpl.java index a7da70624f5..8675333bc04 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/TeeXMLDocumentFilterImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/TeeXMLDocumentFilterImpl.java @@ -3,61 +3,22 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package com.sun.org.apache.xerces.internal.util; import com.sun.org.apache.xerces.internal.xni.Augmentations; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/URI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/URI.java index a92cd20e399..b08388224d7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/URI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/URI.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XML11Char.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XML11Char.java index 8c9e3412e7d..7335fc92f25 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XML11Char.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XML11Char.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLCatalogResolver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLCatalogResolver.java index c488a9fa63e..56ad116a1ae 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLCatalogResolver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLCatalogResolver.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLChar.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLChar.java index b649c34efa8..36ae45337fd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLChar.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLChar.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLDocumentFilterImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLDocumentFilterImpl.java index bde6fd2a87f..a4a347169fd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLDocumentFilterImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLDocumentFilterImpl.java @@ -3,61 +3,22 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package com.sun.org.apache.xerces.internal.util; import com.sun.org.apache.xerces.internal.xni.Augmentations; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLEntityDescriptionImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLEntityDescriptionImpl.java index 0a653a96c55..91d73e842c9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLEntityDescriptionImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLEntityDescriptionImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLErrorCode.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLErrorCode.java index 8d173afef05..0e0abcc26ea 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLErrorCode.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLErrorCode.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLGrammarPoolImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLGrammarPoolImpl.java index 277d3a3d56d..2559c510983 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLGrammarPoolImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLGrammarPoolImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLInputSourceAdaptor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLInputSourceAdaptor.java index 7352625d893..a1a2729d117 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLInputSourceAdaptor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLInputSourceAdaptor.java @@ -3,61 +3,22 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package com.sun.org.apache.xerces.internal.util; import javax.xml.transform.Source; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLResourceIdentifierImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLResourceIdentifierImpl.java index 049d412fb68..deeeae4cb47 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLResourceIdentifierImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLResourceIdentifierImpl.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002, 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLStringBuffer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLStringBuffer.java index 17f46715aef..9e915738423 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLStringBuffer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLStringBuffer.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.util; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLSymbols.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLSymbols.java index 85f83e0346d..3fe863a2920 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLSymbols.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLSymbols.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ConfigurationError.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ConfigurationError.java index 9cd86732f32..097a5d47e69 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ConfigurationError.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ConfigurationError.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java index f7ed5d07333..b8ee53ad3cc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/MultipleScopeNamespaceSupport.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/MultipleScopeNamespaceSupport.java index 27ac8eee8f4..fce1b364883 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/MultipleScopeNamespaceSupport.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/MultipleScopeNamespaceSupport.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.xinclude; import java.util.Enumeration; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/SecuritySupport.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/SecuritySupport.java index fc86a3ac6df..ea00756d8d1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/SecuritySupport.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/SecuritySupport.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XInclude11TextReader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XInclude11TextReader.java index 7ff7ecbb7c0..4aadfad64c8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XInclude11TextReader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XInclude11TextReader.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.xinclude; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeMessageFormatter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeMessageFormatter.java index 4420e29934d..8c0ac541462 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeMessageFormatter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeMessageFormatter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeNamespaceSupport.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeNamespaceSupport.java index 3c36d144999..d457cd4a702 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeNamespaceSupport.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeNamespaceSupport.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.xinclude; import com.sun.org.apache.xerces.internal.xni.NamespaceContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeTextReader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeTextReader.java index 1ddc1b185f5..b700710dcb5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeTextReader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeTextReader.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.xinclude; import java.io.BufferedInputStream; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XPointerElementHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XPointerElementHandler.java deleted file mode 100644 index cccafcfd072..00000000000 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XPointerElementHandler.java +++ /dev/null @@ -1,763 +0,0 @@ -/* - * reserved comment block - * DO NOT REMOVE OR ALTER! - */ -/* - * The Apache Software License, Version 1.1 - * - * - * Copyright (c) 2001-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . - */ -package com.sun.org.apache.xerces.internal.xinclude; - - -import java.util.Enumeration; -import java.util.StringTokenizer; -import java.util.Stack; - -import com.sun.org.apache.xerces.internal.impl.Constants; -import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; -import com.sun.org.apache.xerces.internal.impl.dtd.DTDGrammar; -import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; -import com.sun.org.apache.xerces.internal.xni.Augmentations; -import com.sun.org.apache.xerces.internal.xni.NamespaceContext; -import com.sun.org.apache.xerces.internal.xni.QName; -import com.sun.org.apache.xerces.internal.xni.XMLAttributes; -import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler; -import com.sun.org.apache.xerces.internal.xni.XMLLocator; -import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier; -import com.sun.org.apache.xerces.internal.xni.XMLString; -import com.sun.org.apache.xerces.internal.xni.XNIException; -import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription; -import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; -import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; -import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException; -import com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentSource; -import com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver; -import com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator; -/** - * @author Arun Yadav, Sun Microsystem - */ -public class XPointerElementHandler implements XPointerSchema { - - - // recognized features and properties - - /** Property identifier: error handler. */ - protected static final String ERROR_REPORTER = - Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY; - - /** Property identifier: grammar pool . */ - protected static final String GRAMMAR_POOL = - Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY; - - /** Property identifier: grammar pool . */ - protected static final String ENTITY_RESOLVER = - Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY; - - protected static final String XPOINTER_SCHEMA = - Constants.XERCES_PROPERTY_PREFIX + Constants.XPOINTER_SCHEMA_PROPERTY; - - /** Recognized features. */ - private static final String[] RECOGNIZED_FEATURES = { - }; - - /** Feature defaults. */ - private static final Boolean[] FEATURE_DEFAULTS = { - }; - - /** Recognized properties. */ - - private static final String[] RECOGNIZED_PROPERTIES = - { ERROR_REPORTER, GRAMMAR_POOL, ENTITY_RESOLVER, XPOINTER_SCHEMA }; - - /** Property defaults. */ - private static final Object[] PROPERTY_DEFAULTS = { null, null, null,null }; - - // Data - - protected XMLDocumentHandler fDocumentHandler; - protected XMLDocumentSource fDocumentSource; - - protected XIncludeHandler fParentXIncludeHandler; - - protected XMLLocator fDocLocation; - protected XIncludeNamespaceSupport fNamespaceContext; - protected XMLErrorReporter fErrorReporter; - protected XMLGrammarPool fGrammarPool; - protected XMLGrammarDescription fGrammarDesc; - protected DTDGrammar fDTDGrammar; - protected XMLEntityResolver fEntityResolver; - protected ParserConfigurationSettings fSettings; - //protected String fPointerSchema; - protected StringBuffer fPointer; - private int elemCount = 0; - - - // The current element depth. - // This is used to access the appropriate level of the following stacks. - private int fDepth; - - // The depth of the first element to actually be part of the result infoset. - // This will normally be 1, but it could be larger when the top-level item - // is an include, and processing goes to the fallback. - private int fRootDepth; - - // this value must be at least 1 - private static final int INITIAL_SIZE = 8; - - - // Used to ensure that fallbacks are always children of include elements, - // and that include elements are never children of other include elements. - // An index contains true if the ancestor of the current element which resides - // at that depth was an include element. - private boolean[] fSawInclude = new boolean[INITIAL_SIZE]; - - - // Ensures that only one fallback element can be at a single depth. - // An index contains true if we have seen any fallback elements at that depth, - // and it is only reset to false when the end tag of the parent is encountered. - private boolean[] fSawFallback = new boolean[INITIAL_SIZE]; - - - // The state of the processor at each given depth. - private int[] fState = new int[INITIAL_SIZE]; - - QName foundElement = null; - boolean skip = false; - // Constructors - - public XPointerElementHandler() { - - - fDepth = 0; - fRootDepth = 0; - fSawFallback[fDepth] = false; - fSawInclude[fDepth] = false; - fSchemaName="element"; - - - } - - // START OF IMPLEMENTATION OF XMLComponent methods ////// - - public void reset(){ - elemCount =0; - fPointerToken = null; - fCurrentTokenint=0; - fCurrentTokenString=null; - fCurrentTokenType=0 ; - fElementCount =0; - fCurrentToken =0; - includeElement = false; - foundElement = null; - skip = false; - fSubResourceIdentified=false; - } - - public void reset(XMLComponentManager componentManager) - throws XNIException { - fNamespaceContext = null; - elemCount =0; - fDepth = 0; - fRootDepth = 0; - fPointerToken = null; - fCurrentTokenint=0; - fCurrentTokenString=null; - fCurrentTokenType=0 ; - foundElement = null; - includeElement = false; - skip = false; - fSubResourceIdentified=false; - - - - - try { - setErrorReporter( - (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER)); - } - catch (XMLConfigurationException e) { - fErrorReporter = null; - } - try { - fGrammarPool = - (XMLGrammarPool)componentManager.getProperty(GRAMMAR_POOL); - } - catch (XMLConfigurationException e) { - fGrammarPool = null; - } - try { - fEntityResolver = - (XMLEntityResolver)componentManager.getProperty( - ENTITY_RESOLVER); - } - catch (XMLConfigurationException e) { - fEntityResolver = null; - } - - fSettings = new ParserConfigurationSettings(); - - Enumeration xercesFeatures = Constants.getXercesFeatures(); - while (xercesFeatures.hasMoreElements()) { - String featureId = (String)xercesFeatures.nextElement(); - fSettings.addRecognizedFeatures(new String[] { featureId }); - try { - fSettings.setFeature( - featureId, - componentManager.getFeature(featureId)); - } - catch (XMLConfigurationException e) { - // componentManager doesn't support this feature, - // so we won't worry about it - } - } -/* try{ - dtdValidator = (XMLDTDValidator)componentManager.getProperty( Constants.XERCES_PROPERTY_PREFIX + Constants.DTD_VALIDATOR_PROPERTY); - }Catch(Exception ex){ - ex.printStackTrace(); - }*/ - - } // reset(XMLComponentManager) - - /** - * Returns a list of feature identifiers that are recognized by - * this component. This method may return null if no features - * are recognized by this component. - */ - public String[] getRecognizedFeatures() { - return RECOGNIZED_FEATURES; - } // getRecognizedFeatures():String[] - - /** - * Sets the state of a feature. This method is called by the component - * manager any time after reset when a feature changes state. - *

    - * Note: Components should silently ignore features - * that do not affect the operation of the component. - * - * @param featureId The feature identifier. - * @param state The state of the feature. - * - * @throws SAXNotRecognizedException The component should not throw - * this exception. - * @throws SAXNotSupportedException The component should not throw - * this exception. - */ - public void setFeature(String featureId, boolean state) - throws XMLConfigurationException { - if (fSettings != null) { - fSettings.setFeature(featureId, state); - } - - } // setFeature(String,boolean) - - /** - * Returns a list of property identifiers that are recognized by - * this component. This method may return null if no properties - * are recognized by this component. - */ - public String[] getRecognizedProperties() { - return RECOGNIZED_PROPERTIES; - } // getRecognizedProperties():String[] - - /** - * Sets the value of a property. This method is called by the component - * manager any time after reset when a property changes value. - *

    - * Note: Components should silently ignore properties - * that do not affect the operation of the component. - * - * @param propertyId The property identifier. - * @param value The value of the property. - * - * @throws SAXNotRecognizedException The component should not throw - * this exception. - * @throws SAXNotSupportedException The component should not throw - * this exception. - */ - public void setProperty(String propertyId, Object value) - throws XMLConfigurationException { - if (propertyId.equals(ERROR_REPORTER)) { - setErrorReporter((XMLErrorReporter)value); - } - if (propertyId.equals(GRAMMAR_POOL)) { - fGrammarPool = (XMLGrammarPool)value; - } - if (propertyId.equals(ENTITY_RESOLVER)) { - fEntityResolver = (XMLEntityResolver)value; - } - - } // setProperty(String,Object) - - /** - * Returns the default state for a feature, or null if this - * component does not want to report a default value for this - * feature. - * - * @param featureId The feature identifier. - * - * @since Xerces 2.2.0 - */ - public Boolean getFeatureDefault(String featureId) { - for (int i = 0; i < RECOGNIZED_FEATURES.length; i++) { - if (RECOGNIZED_FEATURES[i].equals(featureId)) { - return FEATURE_DEFAULTS[i]; - } - } - return null; - } // getFeatureDefault(String):Boolean - - /** - * Returns the default state for a property, or null if this - * component does not want to report a default value for this - * property. - * - * @param propertyId The property identifier. - * - * @since Xerces 2.2.0 - */ - public Object getPropertyDefault(String propertyId) { - for (int i = 0; i < RECOGNIZED_PROPERTIES.length; i++) { - if (RECOGNIZED_PROPERTIES[i].equals(propertyId)) { - return PROPERTY_DEFAULTS[i]; - } - } - return null; - } // getPropertyDefault(String):Object - - private void setErrorReporter(XMLErrorReporter reporter) { - fErrorReporter = reporter; - if (fErrorReporter != null) { - fErrorReporter.putMessageFormatter( - XIncludeMessageFormatter.XINCLUDE_DOMAIN, - new XIncludeMessageFormatter()); - } - } - ///////// END OF IMPLEMENTATION OF XMLComponents methods. ////////// - - - - //////// START OF IMPLEMENTATION OF XMLDOCUMENTSOURCE INTERFACE ///////// - - public void setDocumentHandler(XMLDocumentHandler handler) { - fDocumentHandler = handler; - } - - public XMLDocumentHandler getDocumentHandler() { - return fDocumentHandler; - } - - /////// END OF IMPLENTATION OF XMLDOCUMENTSOURCE INTERFACE /////////// - - - - - /////////////// Implementation of XPointerSchema Methods ////////////////////// - - String fSchemaName; - String fSchemaPointer; - boolean fSubResourceIdentified; - /** - * set the Schema Name eg element , xpointer - */ - public void setXPointerSchemaName(String schemaName){ - fSchemaName = schemaName; - } - - /** - * Return Schema Name eg element , xpointer - * - */ - public String getXpointerSchemaName(){ - return fSchemaName; - } - - /** - * Parent Contenhandler for the this contenthandler. - * // not sure about the parameter type. It can be Contenthandler instead of Object type. - */ - public void setParent(Object parent){ - fParentXIncludeHandler = (XIncludeHandler)parent; - } - - - /** - * return the Parent Contenthandler - */ - public Object getParent(){ - return fParentXIncludeHandler; - } - - /** - * Content of the XPointer Schema. Xpath to be resolved. - */ - public void setXPointerSchemaPointer(String content){ - fSchemaPointer = content; - } - - /** - * Return the XPointer Schema. - */ - public String getXPointerSchemaPointer(){ - return fSchemaPointer; - } - - public boolean isSubResourceIndentified(){ - return fSubResourceIdentified; - } - - ///////////End Implementation of XPointerSchema Methods ////////////////////// - - - - //////////// Tokens Playground /////////////////// - - Stack fPointerToken = new Stack(); - int fCurrentTokenint=0; - String fCurrentTokenString=null; - int fCurrentTokenType=0 ;// 0 Notype; 1 for integer; 2 for string. - - public void getTokens(){ - fSchemaPointer = fSchemaPointer.substring(fSchemaPointer.indexOf("(")+1, fSchemaPointer.length()); - StringTokenizer st = new StringTokenizer(fSchemaPointer, "/"); - String tempToken; - Integer integerToken =null; - Stack tempPointerToken = new Stack(); - if(fPointerToken == null){ - fPointerToken = new Stack(); - } - while(st.hasMoreTokens()){ - tempToken=st.nextToken(); - try { - integerToken = Integer.valueOf(tempToken); - tempPointerToken.push(integerToken); - }catch(NumberFormatException e){ - tempPointerToken.push(tempToken); - } - } - while(!tempPointerToken.empty()){ - fPointerToken.push(tempPointerToken.pop()); - } - }//getTokens - - - public boolean hasMoreToken(){ - if(fPointerToken.isEmpty()) - return false; - else - return true; - } - - public boolean getNextToken(){ - Object currentToken; - if (!fPointerToken.isEmpty()){ - currentToken = fPointerToken.pop(); - if(currentToken instanceof Integer){ - fCurrentTokenint = ((Integer)currentToken).intValue(); - fCurrentTokenType = 1; - } - else{ - fCurrentTokenString = ((String)currentToken).toString(); - fCurrentTokenType = 2; - } - return true; - } - else { - return false; - } - } - - private boolean isIdAttribute(XMLAttributes attributes,Augmentations augs, int index) { - Object o = augs.getItem(Constants.ID_ATTRIBUTE); - if( o instanceof Boolean ) - return ((Boolean)o).booleanValue(); - return "ID".equals(attributes.getType(index)); - } - - public boolean checkStringToken(QName element, XMLAttributes attributes){ - QName cacheQName = null; - String id =null; - String rawname =null; - QName attrName = new QName(); - String attrType = null; - String attrValue = null; - int attrCount = attributes.getLength(); - for (int i = 0; i < attrCount; i++) { - Augmentations aaugs = attributes.getAugmentations(i); - attributes.getName(i,attrName); - attrType = attributes.getType(i); - attrValue = attributes.getValue(i); - if(attrType != null && attrValue!= null && isIdAttribute(attributes,aaugs,i) && attrValue.equals(fCurrentTokenString)){ - if(hasMoreToken()){ - fCurrentTokenType = 0; - fCurrentTokenString = null; - return true; - } - else{ - foundElement = element; - includeElement = true; - fCurrentTokenType = 0; - fCurrentTokenString = null; - fSubResourceIdentified = true; - return true; - } - } - } - return false; - } - - public boolean checkIntegerToken(QName element){ - if(!skip){ - fElementCount++; - if(fCurrentTokenint == fElementCount){ - if(hasMoreToken()){ - fElementCount=0; - fCurrentTokenType = 0; - return true; - } - else{ - foundElement = element; - includeElement = true; - fCurrentTokenType = 0; - fElementCount=0; - fSubResourceIdentified =true; - return true; - } - }else{ - addQName(element); - skip = true; - return false; - } - } - return false; - } - - public void addQName(QName element){ - QName cacheQName = new QName(element); - ftempCurrentElement.push(cacheQName); - } - - /////////// END TOKEN PLAYGROUND /////////////// - - - ///// START OF IMPLEMTATION OF XMLDocumentHandler methods ////////// - - - public void startDocument(XMLLocator locator, String encoding, - NamespaceContext namespaceContext, Augmentations augs) - throws XNIException { - - getTokens(); - } - - public void doctypeDecl(String rootElement, String publicId, String systemId, - Augmentations augs)throws XNIException { - } - - public void xmlDecl(String version, String encoding, String standalone, - Augmentations augs) throws XNIException { - } - - - public void comment(XMLString text, Augmentations augs) - throws XNIException { - if (fDocumentHandler != null && includeElement) { - fDocumentHandler.comment(text, augs); - } - } - - public void processingInstruction(String target, XMLString data, - Augmentations augs) throws XNIException { - if (fDocumentHandler != null && includeElement) { - fDocumentHandler.processingInstruction(target, data, augs); - - } - } - - Stack ftempCurrentElement = new Stack(); - int fElementCount =0; - int fCurrentToken ; - boolean includeElement; - - - public void startElement(QName element, XMLAttributes attributes, - Augmentations augs)throws XNIException { - - boolean requiredToken=false; - if(fCurrentTokenType == 0) - getNextToken(); - if(fCurrentTokenType ==1) - requiredToken = checkIntegerToken(element); - else if (fCurrentTokenType ==2) - requiredToken = checkStringToken(element, attributes); - if(requiredToken && hasMoreToken()) - getNextToken(); - if(fDocumentHandler != null && includeElement){ - elemCount++; - fDocumentHandler.startElement(element, attributes, augs); - } - - } - - - public void endElement(QName element, Augmentations augs) - throws XNIException { - if(includeElement && foundElement != null ){ - if(elemCount >0 )elemCount --; - fDocumentHandler.endElement(element, augs); - if(elemCount == 0)includeElement = false; - - }else if(!ftempCurrentElement.empty()){ - QName name = (QName)ftempCurrentElement.peek(); - if(name.equals(element)){ - ftempCurrentElement.pop(); - skip = false; - } - } - } - - public void emptyElement(QName element, XMLAttributes attributes, - Augmentations augs)throws XNIException { - if(fDocumentHandler != null && includeElement){ - fDocumentHandler.emptyElement(element, attributes, augs); - } - } - - public void startGeneralEntity(String name, XMLResourceIdentifier resId, - String encoding, - Augmentations augs) - throws XNIException { - if (fDocumentHandler != null && includeElement) { - fDocumentHandler.startGeneralEntity(name, resId, encoding, augs); - } - } - - public void textDecl(String version, String encoding, Augmentations augs) - throws XNIException { - if (fDocumentHandler != null && includeElement) { - fDocumentHandler.textDecl(version, encoding, augs); - } - } - - public void endGeneralEntity(String name, Augmentations augs) - throws XNIException { - if (fDocumentHandler != null) { - fDocumentHandler.endGeneralEntity(name, augs); - } - } - - public void characters(XMLString text, Augmentations augs) - throws XNIException { - if (fDocumentHandler != null && includeElement) { - fDocumentHandler.characters(text, augs); - } - } - - public void ignorableWhitespace(XMLString text, Augmentations augs) - throws XNIException { - if (fDocumentHandler != null && includeElement) { - fDocumentHandler.ignorableWhitespace(text, augs); - } - } - - public void startCDATA(Augmentations augs) throws XNIException { - if (fDocumentHandler != null && includeElement) { - fDocumentHandler.startCDATA(augs); - } - } - - public void endCDATA(Augmentations augs) throws XNIException { - if (fDocumentHandler != null && includeElement) { - fDocumentHandler.endCDATA(augs); - } - } - - public void endDocument(Augmentations augs) throws XNIException { - } - - public void setDocumentSource(XMLDocumentSource source) { - fDocumentSource = source; - } - - public XMLDocumentSource getDocumentSource() { - return fDocumentSource; - } - - - protected void reportFatalError(String key) { - this.reportFatalError(key, null); - } - - protected void reportFatalError(String key, Object[] args) { - if (fErrorReporter != null) { - fErrorReporter.reportError( - fDocLocation, - XIncludeMessageFormatter.XINCLUDE_DOMAIN, - key, - args, - XMLErrorReporter.SEVERITY_FATAL_ERROR); - } - // we won't worry about when error reporter is null, since there should always be - // at least the default error reporter - } - - - - // used to know whether to pass declarations to the document handler - protected boolean isRootDocument() { - return this.fParentXIncludeHandler == null; - } - - -} // class XPointerElementhandler diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XPointerFramework.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XPointerFramework.java deleted file mode 100644 index abe514e24ab..00000000000 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XPointerFramework.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * reserved comment block - * DO NOT REMOVE OR ALTER! - */ -/* - * The Apache Software License, Version 1.1 - * - * - * Copyright (c) 2001-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . - */ -package com.sun.org.apache.xerces.internal.xinclude; - -import java.util.Stack; -import com.sun.org.apache.xerces.internal.xinclude.XPointerSchema; - -public class XPointerFramework{ - - /* - Todo's by next integration. - While constructing schema names and uris use a dynamic datastructure. - */ - - XPointerSchema [] fXPointerSchema; - String [] fSchemaPointerName; - String [] fSchemaPointerURI; - String fSchemaPointer; - String fCurrentSchemaPointer; - Stack fSchemaNotAvailable; - int fCountSchemaName = 0; - int schemaLength = 0; - XPointerSchema fDefaultXPointerSchema; - - public XPointerFramework(){ - this(null); - } - - public XPointerFramework(XPointerSchema [] xpointerschema){ - fXPointerSchema = xpointerschema; - fSchemaNotAvailable = new Stack(); - } - - public void reset(){ - fXPointerSchema = null; - fXPointerSchema = null; - fCountSchemaName = 0; - schemaLength = 0; - fSchemaPointerName = null; - fSchemaPointerURI = null; - fDefaultXPointerSchema = null; - fCurrentSchemaPointer = null; - } - - public void setXPointerSchema(XPointerSchema [] xpointerschema){ - fXPointerSchema = xpointerschema; - } - - public void setSchemaPointer(String schemaPointer){ - fSchemaPointer = schemaPointer; - } - - public XPointerSchema getNextXPointerSchema(){ - int i=fCountSchemaName; - if(fSchemaPointerName == null){ - getSchemaNames(); - } - if(fDefaultXPointerSchema == null){ - getDefaultSchema(); - } - if(fDefaultXPointerSchema.getXpointerSchemaName().equalsIgnoreCase(fSchemaPointerName[i])){ - fDefaultXPointerSchema.reset(); - fDefaultXPointerSchema.setXPointerSchemaPointer(fSchemaPointerURI[i]); - fCountSchemaName = ++i; - return getDefaultSchema(); - } - if(fXPointerSchema == null){ - fCountSchemaName = ++i; - return null; - } - - int fschemalength = fXPointerSchema.length; - - for(;fSchemaPointerName[i] != null; i++){ - for(int j=0; j. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.xni; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLAttributes.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLAttributes.java index 4d4b93a3997..9ff29751d93 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLAttributes.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLAttributes.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.xni; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDTDContentModelHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDTDContentModelHandler.java index 062825e4460..a8147a05635 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDTDContentModelHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDTDContentModelHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDTDHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDTDHandler.java index 73877660376..8691bdd2cab 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDTDHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDTDHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDocumentFragmentHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDocumentFragmentHandler.java index 5efbfcac8f0..09a3d9c2dce 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDocumentFragmentHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDocumentFragmentHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDocumentHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDocumentHandler.java index 18d0c1c7e07..12395d12712 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDocumentHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLDocumentHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLLocator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLLocator.java index 7ab0f869625..393d8a904e8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLLocator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLLocator.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLResourceIdentifier.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLResourceIdentifier.java index f748d62809d..66880c6da8a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLResourceIdentifier.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLResourceIdentifier.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLString.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLString.java index dd4240d8ead..f63e1d20aa6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLString.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XMLString.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XNIException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XNIException.java index 98b9d40abad..ba97277dee0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XNIException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/XNIException.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/Grammar.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/Grammar.java index 95adbcd7e88..dc749289ab9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/Grammar.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/Grammar.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLDTDDescription.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLDTDDescription.java index 2b72668d2df..d34b137e47f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLDTDDescription.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLDTDDescription.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarDescription.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarDescription.java index e5c83f291a2..9a291ecead3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarDescription.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarDescription.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarLoader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarLoader.java index b8d32042d98..97e31988421 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarLoader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarLoader.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarPool.java index bd947b5c85e..f4e68377596 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarPool.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.xni.grammars; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLSchemaDescription.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLSchemaDescription.java index bc38a2f68a1..88b48d50d6b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLSchemaDescription.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XMLSchemaDescription.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XSGrammar.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XSGrammar.java index 44559517d69..2da3d88ee05 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XSGrammar.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/grammars/XSGrammar.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLComponent.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLComponent.java index 68b2faad870..00c9e0329da 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLComponent.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLComponent.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLComponentManager.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLComponentManager.java index 1ea05c6babd..3d41d436f2e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLComponentManager.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLComponentManager.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLConfigurationException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLConfigurationException.java index 3f1280d1fb8..aed00c89356 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLConfigurationException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLConfigurationException.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDContentModelFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDContentModelFilter.java index 77e71f005ad..19271288023 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDContentModelFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDContentModelFilter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDContentModelSource.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDContentModelSource.java index dca3bd9a19c..823d0e5108f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDContentModelSource.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDContentModelSource.java @@ -3,60 +3,20 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 2001, 2002 The Apache Software Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xerces" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.org.apache.xerces.internal.xni.parser; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDFilter.java index f30932fc4fa..d36eb0a601e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDFilter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java index 189152dd217..9d6c3205f8e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDSource.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDSource.java index 1f2c312818c..848d61f581c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDSource.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDSource.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentFilter.java index 1eb55f4bb76..f4e8086f28b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentFilter.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentScanner.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentScanner.java index 9fa5248749d..93dd95cafdc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentScanner.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentScanner.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentSource.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentSource.java index 217b515992d..4caeddd25de 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentSource.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLDocumentSource.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLEntityResolver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLEntityResolver.java index c39671f6ce8..9c8562a77bc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLEntityResolver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLEntityResolver.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLErrorHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLErrorHandler.java index 47b77bab34a..2c3f0ee0b0c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLErrorHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLErrorHandler.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLInputSource.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLInputSource.java index 4a59086d5f6..54c8ed59f31 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLInputSource.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLInputSource.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLParseException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLParseException.java index 1abb9ac041f..27e933b1782 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLParseException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLParseException.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLParserConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLParserConfiguration.java index b42712ec254..57c8dd08795 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLParserConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLParserConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLPullParserConfiguration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLPullParserConfiguration.java index f3db0a3e676..2f991227417 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLPullParserConfiguration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLPullParserConfiguration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001, 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/AttributePSVI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/AttributePSVI.java index 5b0979bf52d..d68073efc6c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/AttributePSVI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/AttributePSVI.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ElementPSVI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ElementPSVI.java index f3a68ac5a1d..8608e05bce7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ElementPSVI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ElementPSVI.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/LSInputList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/LSInputList.java index 6459631533b..8b26f6a8d2b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/LSInputList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/LSInputList.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/PSVIProvider.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/PSVIProvider.java index 1dca0ddc1c5..69ba27cf03d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/PSVIProvider.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/PSVIProvider.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ShortList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ShortList.java index a10e122139f..e993d6393ed 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ShortList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ShortList.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/StringList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/StringList.java index f8e34e147c8..32d26205f44 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/StringList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/StringList.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAnnotation.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAnnotation.java index d04f3313df2..2a8b378eaa8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAnnotation.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAnnotation.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAttributeGroupDefinition.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAttributeGroupDefinition.java index 71d90b07f27..97826ca76db 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAttributeGroupDefinition.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAttributeGroupDefinition.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSComplexTypeDefinition.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSComplexTypeDefinition.java index 104dbb6c942..1456d57c99f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSComplexTypeDefinition.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSComplexTypeDefinition.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSConstants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSConstants.java index cbe1a469693..75e76d416b3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSConstants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSConstants.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSException.java index d0918250366..b4d3a13f2b1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSException.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSIDCDefinition.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSIDCDefinition.java index c26cec7912f..cf4e91f8b6a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSIDCDefinition.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSIDCDefinition.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSImplementation.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSImplementation.java index 2d7a37f27fb..cc5c9a3b247 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSImplementation.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSImplementation.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSLoader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSLoader.java index aabf95ffff9..ea476addb01 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSLoader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSLoader.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSModelGroup.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSModelGroup.java index 265ecf3cff3..2fc5f77f8ae 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSModelGroup.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSModelGroup.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSModelGroupDefinition.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSModelGroupDefinition.java index fb6d5949f6f..39a58c57d8e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSModelGroupDefinition.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSModelGroupDefinition.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamedMap.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamedMap.java index 976680bd3fd..ac63fed8c21 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamedMap.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamedMap.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamespaceItemList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamespaceItemList.java index 8a8ee992859..57275e41b20 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamespaceItemList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamespaceItemList.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNotationDeclaration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNotationDeclaration.java index b1c03d26d8e..b956069c040 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNotationDeclaration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNotationDeclaration.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObject.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObject.java index 176ae7926f4..30ab34fff24 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObject.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObject.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObjectList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObjectList.java index 5e60a1ef576..7117e6640fa 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObjectList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObjectList.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSParticle.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSParticle.java index e6456259fcc..97a3c839d0a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSParticle.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSParticle.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSTerm.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSTerm.java index 12878392ae1..3718f333201 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSTerm.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSTerm.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSTypeDefinition.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSTypeDefinition.java index 3c4cc966598..27489f2d5b3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSTypeDefinition.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSTypeDefinition.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSWildcard.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSWildcard.java index ee68f4995bf..50529fbd100 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSWildcard.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSWildcard.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java index 141fb0a7b26..1ec21047e86 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.xs.datatypes; import java.util.List; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDateTime.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDateTime.java index d08329050d7..53e97581ea5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDateTime.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDateTime.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.xs.datatypes; import javax.xml.datatype.Duration; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDecimal.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDecimal.java index 2170992f403..ba0f5a68be4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDecimal.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDecimal.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.xs.datatypes; import java.math.BigDecimal; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDouble.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDouble.java index d3cb7153c57..1c136413c99 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDouble.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSDouble.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.xs.datatypes; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSFloat.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSFloat.java index b7f8d6bea3c..e31128e9cf6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSFloat.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSFloat.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004,2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xerces.internal.xs.datatypes; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSQName.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSQName.java index f780a61a70a..eba64efeb68 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSQName.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/XSQName.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/Axis.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/Axis.java index 9239715f3c2..d3c344bd065 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/Axis.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/Axis.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Axis.java,v 1.2.4.1 2005/09/15 08:14:51 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTM.java index 9182833ae89..84121c26504 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTM.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTM.java,v 1.2.4.1 2005/09/15 08:14:51 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; import javax.xml.transform.SourceLocator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMAxisIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMAxisIterator.java index f2934aeb1cd..338c5289e34 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMAxisIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMAxisIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMAxisIterator.java,v 1.2.4.1 2005/09/15 08:14:52 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMAxisTraverser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMAxisTraverser.java index e4ba08676a1..9600f9ce882 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMAxisTraverser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMAxisTraverser.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMAxisTraverser.java,v 1.2.4.1 2005/09/15 08:14:52 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMConfigurationException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMConfigurationException.java index c58397df3fd..dffbc9891a0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMConfigurationException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMConfigurationException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMConfigurationException.java,v 1.2.4.1 2005/09/15 08:14:52 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; import javax.xml.transform.SourceLocator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMDOMException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMDOMException.java index 616fa0b5864..9ebba449e2b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMDOMException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMDOMException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMDOMException.java,v 1.2.4.1 2005/09/15 08:14:52 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMException.java index 7711ce73f88..9e8f68ecb46 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMException.java,v 1.3 2005/09/28 13:48:50 pvedula Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMFilter.java index 331e753d47a..2d6f1df5bb7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMFilter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMFilter.java,v 1.2.4.1 2005/09/15 08:14:53 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMIterator.java index 64d01bea6be..998a0901a40 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMIterator.java,v 1.2.4.1 2005/09/15 08:14:54 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMManager.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMManager.java index d629b9fd8db..052dea8cf97 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMManager.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMManager.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMManager.java,v 1.2.4.1 2005/09/15 08:14:54 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; import com.sun.org.apache.xml.internal.res.XMLErrorResources; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMWSFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMWSFilter.java index 29864b01b67..a476c25b17d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMWSFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMWSFilter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMWSFilter.java,v 1.2.4.1 2005/09/15 08:14:55 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ChunkedIntArray.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ChunkedIntArray.java index 85aebf7523d..c029dcbf606 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ChunkedIntArray.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ChunkedIntArray.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ChunkedIntArray.java,v 1.2.4.1 2005/09/15 08:14:58 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.res.XMLErrorResources; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineManager.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineManager.java index 6323b038290..2d393886c1d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineManager.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineManager.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CoroutineManager.java,v 1.2.4.1 2005/09/15 08:14:58 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import java.util.BitSet; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineParser.java index 57c77241519..d4c635a8a54 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineParser.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CoroutineParser.java,v 1.2.4.1 2005/09/15 08:14:59 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.dtm.ref; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIterNodeList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIterNodeList.java index 1993bd6b9c6..3fe1fcab5f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIterNodeList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIterNodeList.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMAxisIterNodeList.java,v 1.2.4.1 2005/09/15 08:14:59 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIteratorBase.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIteratorBase.java index b9eecc2cb13..7555044127d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIteratorBase.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIteratorBase.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMAxisIteratorBase.java,v 1.2.4.1 2005/09/15 08:14:59 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMChildIterNodeList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMChildIterNodeList.java index 3d26b53be8d..28004a6ebc8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMChildIterNodeList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMChildIterNodeList.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMChildIterNodeList.java,v 1.2.4.1 2005/09/15 08:15:00 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java index 58fae690c92..ce91bc21b59 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMDefaultBase.java,v 1.3 2005/09/28 13:48:52 pvedula Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseIterators.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseIterators.java index 31c059cd126..f73a4e8de3e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseIterators.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseIterators.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMDefaultBaseIterators.java,v 1.2.4.1 2005/09/15 08:15:00 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseTraversers.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseTraversers.java index c33545482ac..bc96dd55124 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseTraversers.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseTraversers.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMDefaultBaseTraversers.java,v 1.2.4.1 2005/09/15 08:15:00 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.*; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDocumentImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDocumentImpl.java index b9bb3ace02a..999c3fc01b3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDocumentImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDocumentImpl.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMDocumentImpl.java,v 1.2.4.1 2005/09/15 08:15:01 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import javax.xml.transform.SourceLocator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java index 1eadf3a5950..1cb76b8923d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMManagerDefault.java,v 1.2.4.1 2005/09/15 08:15:02 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xalan.internal.utils.FactoryImpl; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNamedNodeMap.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNamedNodeMap.java index 8c8d1d9ae40..ef81b6e0bf5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNamedNodeMap.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNamedNodeMap.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMNamedNodeMap.java,v 1.2.4.1 2005/09/15 08:15:03 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeIterator.java index b5a7bb617de..869a478a335 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMNodeIterator.java,v 1.2.4.1 2005/09/15 08:15:03 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeList.java index 3a933c832ff..daab88859dc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeList.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMNodeList.java,v 1.2.4.1 2005/09/15 08:15:04 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeListBase.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeListBase.java index d21f090d31a..1ae677e3ac2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeListBase.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeListBase.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMNodeListBase.java,v 1.2.4.1 2005/09/15 08:15:04 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import org.w3c.dom.Node; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java index 5fdf6535a51..1b66359fb5d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +21,7 @@ /* * $Id: DTMNodeProxy.java,v */ + package com.sun.org.apache.xml.internal.dtm.ref; import java.util.Vector; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMSafeStringPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMSafeStringPool.java index e22402d675d..91ebda0e84c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMSafeStringPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMSafeStringPool.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMSafeStringPool.java,v 1.2.4.1 2005/09/15 08:15:04 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.dtm.ref; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMStringPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMStringPool.java index d49b62a29ce..cb8bb877dd9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMStringPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMStringPool.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMStringPool.java,v 1.2.4.1 2005/09/15 08:15:05 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.dtm.ref; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMTreeWalker.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMTreeWalker.java index 37c72d172d8..85e3e16bf88 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMTreeWalker.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMTreeWalker.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DTMTreeWalker.java,v 1.2.4.1 2005/09/15 08:15:05 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/EmptyIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/EmptyIterator.java index 978ed926486..287636317fe 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/EmptyIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/EmptyIterator.java @@ -2,15 +2,15 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ - /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +18,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: EmptyIterator.java,v 1.2.4.1 2005/09/15 08:15:05 suresh_emailid Exp $ - */ + + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ExpandedNameTable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ExpandedNameTable.java index 8d4c7a34a22..099b1ec7ecb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ExpandedNameTable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ExpandedNameTable.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExpandedNameTable.java,v 1.2.4.1 2005/09/15 08:15:06 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ExtendedType.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ExtendedType.java index 682986c8a91..2b7696ac98e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ExtendedType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/ExtendedType.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExtendedType.java,v 1.2.4.1 2005/09/15 08:15:06 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource.java index 417454f8e40..1e7efeffd65 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IncrementalSAXSource.java,v 1.2.4.1 2005/09/15 08:15:06 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.dtm.ref; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Filter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Filter.java index 2d97451a853..3d8dcfb67a7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Filter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Filter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IncrementalSAXSource_Filter.java,v 1.2.4.1 2005/09/15 08:15:07 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.dtm.ref; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java index 963ccf02c5a..205a4b320c2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IncrementalSAXSource_Xerces.java,v 1.2.4.1 2005/09/15 08:15:08 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.dtm.ref; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/NodeLocator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/NodeLocator.java index 2987dfd5bd9..4ac0e374e5b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/NodeLocator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/NodeLocator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeLocator.java,v 1.2.4.1 2005/09/15 08:15:08 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.dtm.ref; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java index 0e871e071e4..ec91b1dd9d0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOM2DTM.java,v 1.2.4.1 2005/09/15 08:15:10 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref.dom2dtm; import java.util.Vector; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java index 68cafdd4a1c..a37254bf499 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOM2DTMdefaultNamespaceDeclarationNode.java,v 1.2.4.1 2005/09/15 08:15:11 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.dtm.ref.dom2dtm; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2RTFDTM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2RTFDTM.java index c09968f8486..d8206f9e203 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2RTFDTM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2RTFDTM.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SAX2RTFDTM.java,v 1.2.4.1 2005/09/15 08:15:13 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.dtm.ref.sax2dtm; import javax.xml.transform.Source; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources.java index 1c83bc50917..9b87c228a99 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ca.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ca.java index 5dcb27c62c5..b5af9d464cb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ca.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ca.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLErrorResources_ca.java,v 1.1.6.2 2005/09/15 07:45:37 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_cs.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_cs.java index f3e3c3ec756..d659883015b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_cs.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_cs.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLErrorResources_cs.java,v 1.1.6.2 2005/09/15 07:45:38 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java index 3492aefc9df..5b859177598 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_en.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_en.java index 78c9b13db18..b13b612edf8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_en.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_en.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLErrorResources_en.java,v 1.2.4.1 2005/09/15 07:45:40 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java index 471473283d8..7f1fbfe4b4d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java index 8155bf4889c..26a80d2e161 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java index a86b206b956..2f14e3d3b26 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java index dfa387b18de..cce9b42e61f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java index 4936488bbd9..71bbc951a5b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; @@ -209,10 +211,10 @@ public class XMLErrorResources_ko extends ListResourceBundle "Coroutine \uB9E4\uAC1C\uBCC0\uC218 \uC624\uB958({0})"}, { ER_PARSER_DOTERMINATE_ANSWERS, - "\n\uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958: \uAD6C\uBB38 \uBD84\uC11D\uAE30 doTerminate\uAC00 {0}\uC5D0 \uC751\uB2F5\uD569\uB2C8\uB2E4."}, + "\n\uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958: \uAD6C\uBB38\uBD84\uC11D\uAE30 doTerminate\uAC00 {0}\uC5D0 \uC751\uB2F5\uD569\uB2C8\uB2E4."}, { ER_NO_PARSE_CALL_WHILE_PARSING, - "\uAD6C\uBB38 \uBD84\uC11D \uC911 parse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, + "\uAD6C\uBB38\uBD84\uC11D \uC911 parse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, "\uC624\uB958: {0} \uCD95\uC5D0 \uB300\uD574 \uC785\uB825\uB41C \uC774\uD130\uB808\uC774\uD130\uAC00 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, @@ -242,13 +244,13 @@ public class XMLErrorResources_ko extends ListResourceBundle "\uB178\uB4DC\uB97C \uD578\uB4E4\uB85C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, { ER_STARTPARSE_WHILE_PARSING, - "\uAD6C\uBB38 \uBD84\uC11D \uC911 startParse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, + "\uAD6C\uBB38\uBD84\uC11D \uC911 startParse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, { ER_STARTPARSE_NEEDS_SAXPARSER, "startParse\uC5D0\uB294 \uB110\uC774 \uC544\uB2CC SAXParser\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."}, { ER_COULD_NOT_INIT_PARSER, - "\uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, + "\uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, { ER_EXCEPTION_CREATING_POOL, "\uD480\uC5D0 \uB300\uD55C \uC0C8 \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD558\uB294 \uC911 \uC608\uC678\uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."}, @@ -293,10 +295,10 @@ public class XMLErrorResources_ko extends ListResourceBundle "\uBD80\uBD84\uC5D0 \uBD80\uC801\uD569\uD55C \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."}, { ER_PARSER_IN_USE, - "\uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774\uBBF8 \uC0AC\uC6A9\uB418\uACE0 \uC788\uC2B5\uB2C8\uB2E4."}, + "\uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC774\uBBF8 \uC0AC\uC6A9\uB418\uACE0 \uC788\uC2B5\uB2C8\uB2E4."}, { ER_CANNOT_CHANGE_WHILE_PARSING, - "\uAD6C\uBB38 \uBD84\uC11D \uC911 {0} {1}\uC744(\uB97C) \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, + "\uAD6C\uBB38\uBD84\uC11D \uC911 {0} {1}\uC744(\uB97C) \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, { ER_SELF_CAUSATION_NOT_PERMITTED, "\uC790\uCCB4 \uC778\uACFC \uAD00\uACC4\uB294 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java index 814b19c283f..37ef50ab4b0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sk.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sk.java index 1e4b293c59b..5f7eb31248a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sk.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sk.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLErrorResources_sk.java,v 1.1.6.2 2005/09/15 07:45:45 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java index 7be3c6ccf0f..417d3543bc5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; @@ -230,7 +232,7 @@ public class XMLErrorResources_sv extends ListResourceBundle "Axeltravers underst\u00F6ds inte: {0}"}, { ER_NO_DTMIDS_AVAIL, - "Inga fler DTM-ID:n \u00E4r tillg\u00E4ngliga"}, + "Inga fler DTM-id:n \u00E4r tillg\u00E4ngliga"}, { ER_NOT_SUPPORTED, "Underst\u00F6ds inte: {0}"}, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_tr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_tr.java index 58973c6af99..12a64e74b91 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_tr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_tr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLErrorResources_tr.java,v 1.1.6.2 2005/09/15 07:45:46 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java index c500135f6c1..166cf7c0858 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_HK.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_HK.java index 1a0d14acf90..b495ca3d6ab 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_HK.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_HK.java @@ -3,61 +3,22 @@ * DO NOT REMOVE OR ALTER! */ /* - * The Apache Software License, Version 1.1 + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 * - * Copyright (c) 1999-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xalan" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, Lotus - * Development Corporation., http://www.lotus.com. For more - * information on the Apache Software Foundation, please see - * . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java index e1d1976fe1c..fee39804b4c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xml.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLMessages.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLMessages.java index bb2f9bb4062..59abced5939 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLMessages.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLMessages.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLMessages.java,v 1.2.4.1 2005/09/15 07:45:48 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.res; import com.sun.org.apache.xalan.internal.utils.SecuritySupport; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SecuritySupport.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SecuritySupport.java index 02d8a01a443..f9294958150 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SecuritySupport.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SecuritySupport.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XHTMLSerializer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XHTMLSerializer.java index 5925a250b14..30325d1815b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XHTMLSerializer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XHTMLSerializer.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/CharInfo.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/CharInfo.java index 04e77d6bc62..c60c29bab1f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/CharInfo.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/CharInfo.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CharInfo.java,v 1.2.4.1 2005/09/15 08:15:14 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import com.sun.org.apache.xalan.internal.utils.SecuritySupport; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/DOMSerializer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/DOMSerializer.java index e87c2c2a339..971569dbc81 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/DOMSerializer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/DOMSerializer.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOMSerializer.java,v 1.2.4.1 2005/09/15 08:15:15 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ElemContext.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ElemContext.java index 805d7c77b3d..e4cebb5a2e1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ElemContext.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ElemContext.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ElemContext.java,v 1.2.4.1 2005/09/15 08:15:15 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ElemDesc.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ElemDesc.java index 5670952b8f8..85af27ddfbf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ElemDesc.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ElemDesc.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ElemDesc.java,v 1.2.4.1 2005/09/15 08:15:15 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import com.sun.org.apache.xml.internal.serializer.utils.StringToIntTable; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/EncodingInfo.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/EncodingInfo.java index 60d503d0b36..fc4f11a3fca 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/EncodingInfo.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/EncodingInfo.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: EncodingInfo.java,v 1.2.4.2 2005/09/15 12:01:24 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.io.UnsupportedEncodingException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java index 18e76134891..50bad3d7a59 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Encodings.java,v 1.3 2005/09/28 13:49:04 pvedula Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.io.InputStream; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ExtendedContentHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ExtendedContentHandler.java index 6deefb27b09..a1b957ed7e9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ExtendedContentHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ExtendedContentHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExtendedContentHandler.java,v 1.2.4.1 2005/09/15 08:15:17 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import javax.xml.transform.SourceLocator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ExtendedLexicalHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ExtendedLexicalHandler.java index 4983dbef301..bf3126851c8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ExtendedLexicalHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ExtendedLexicalHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExtendedLexicalHandler.java,v 1.2.4.1 2005/09/15 08:15:18 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import org.xml.sax.SAXException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Method.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Method.java index cecacc1238f..fd1468e3c0b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Method.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Method.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Method.java,v 1.2.4.1 2005/09/15 08:15:19 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java index 5df83c16871..f917470dd50 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NamespaceMappings.java,v 1.2.4.1 2005/09/15 08:15:19 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.util.HashMap; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java index 0d91b7aeb3c..86736b95489 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: OutputPropertiesFactory.java,v 1.2.4.1 2005/09/15 08:15:21 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import com.sun.org.apache.xalan.internal.utils.SecuritySupport; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertyUtils.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertyUtils.java index 7e4ccb99ae3..364fb9965bb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertyUtils.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertyUtils.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: OutputPropertyUtils.java,v 1.2.4.1 2005/09/15 08:15:21 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.util.Properties; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerConstants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerConstants.java index c8a4fce96af..ad08ecec9b1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerConstants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerConstants.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SerializerConstants.java,v 1.2.4.1 2005/09/15 08:15:23 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java index d4ce9cf772e..10d6d19ee31 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SerializerFactory.java,v 1.2.4.1 2005/09/15 08:15:24 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.util.Properties; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerTrace.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerTrace.java index 0710412f10a..048bba1ed17 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerTrace.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerTrace.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SerializerTrace.java,v 1.2.4.1 2005/09/15 08:15:24 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import org.xml.sax.Attributes; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerTraceWriter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerTraceWriter.java index 482faad9ab2..49de2d95db3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerTraceWriter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerTraceWriter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SerializerTraceWriter.java,v 1.2.4.1 2005/09/15 08:15:25 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLSAXHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLSAXHandler.java index 596a6418e53..41fcec8002c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLSAXHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLSAXHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ToHTMLSAXHandler.java,v 1.3 2005/09/28 13:49:07 pvedula Exp $ - */ package com.sun.org.apache.xml.internal.serializer; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java index 502a8b8debb..c9358da0678 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -717,7 +717,9 @@ public final class ToHTMLStream extends ToStream */ public final void endDocument() throws org.xml.sax.SAXException { - flushCharactersBuffer(); + if (m_doIndent) { + flushCharactersBuffer(); + } flushPending(); if (m_doIndent && !m_isprevtext) { @@ -776,9 +778,11 @@ public final class ToHTMLStream extends ToStream Attributes atts) throws SAXException { - // will add extra one if having namespace but no matter - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + // will add extra one if having namespace but no matter + m_childNodeNum++; + flushCharactersBuffer(); + } ElemContext elemContext = m_elemContext; // clean up any pending things first @@ -839,8 +843,10 @@ public final class ToHTMLStream extends ToStream writer.write('<'); writer.write(name); - m_childNodeNumStack.push(m_childNodeNum); - m_childNodeNum = 0; + if (m_doIndent) { + m_childNodeNumStack.add(m_childNodeNum); + m_childNodeNum = 0; + } if (m_tracer != null) firePseudoAttributes(); @@ -915,7 +921,9 @@ public final class ToHTMLStream extends ToStream final String name) throws org.xml.sax.SAXException { - flushCharactersBuffer(); + if (m_doIndent) { + flushCharactersBuffer(); + } // deal with any pending issues if (m_cdataTagOpen) closeCDATA(); @@ -997,12 +1005,11 @@ public final class ToHTMLStream extends ToStream } } - m_childNodeNum = m_childNodeNumStack.pop(); - // clean up because the element has ended - if ((elemFlags & ElemDesc.WHITESPACESENSITIVE) != 0) - m_ispreserve = true; - m_isprevtext = false; - + if (m_doIndent) { + m_childNodeNum = m_childNodeNumStack.remove(m_childNodeNumStack.size() - 1); + // clean up because the element has ended + m_isprevtext = false; + } // fire off the end element event if (m_tracer != null) super.fireEndElem(name); @@ -1018,11 +1025,6 @@ public final class ToHTMLStream extends ToStream } // some more clean because the element has ended. - if (!elemContext.m_startTagOpen) - { - if (m_doIndent && !m_preserves.isEmpty()) - m_preserves.pop(); - } m_elemContext = elemContext.m_prev; // m_isRawStack.pop(); } @@ -1525,7 +1527,6 @@ public final class ToHTMLStream extends ToStream closeStartTag(); m_elemContext.m_startTagOpen = false; } - m_ispreserve = true; // With m_ispreserve just set true it looks like shouldIndent() // will always return false, so drop any possible indentation. @@ -1602,8 +1603,6 @@ public final class ToHTMLStream extends ToStream m_elemContext.m_startTagOpen = false; } - m_ispreserve = true; - if (shouldIndent()) indent(); @@ -1640,8 +1639,10 @@ public final class ToHTMLStream extends ToStream public void processingInstruction(String target, String data) throws org.xml.sax.SAXException { - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + m_childNodeNum++; + flushCharactersBuffer(); + } // Process any pending starDocument and startElement first. flushPending(); @@ -1790,11 +1791,6 @@ public final class ToHTMLStream extends ToStream */ if (m_StringOfCDATASections != null) m_elemContext.m_isCdataSection = isCdataSection(); - if (m_doIndent) - { - m_isprevtext = false; - m_preserves.push(m_ispreserve); - } } catch(IOException e) diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java index 994a7800d97..ae14a4922b1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java @@ -20,34 +20,36 @@ package com.sun.org.apache.xml.internal.serializer; -import com.sun.org.apache.xalan.internal.utils.SecuritySupport; -import com.sun.org.apache.xml.internal.serializer.utils.MsgKey; -import com.sun.org.apache.xml.internal.serializer.utils.Utils; -import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.io.Writer; -import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; -import java.util.Deque; import java.util.EmptyStackException; import java.util.Enumeration; +import java.util.Iterator; +import java.util.List; import java.util.Properties; -import java.util.Queue; import java.util.Set; import java.util.StringTokenizer; + import javax.xml.transform.ErrorListener; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; + import org.w3c.dom.Node; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; +import com.sun.org.apache.xalan.internal.utils.SecuritySupport; +import com.sun.org.apache.xml.internal.serializer.utils.MsgKey; +import com.sun.org.apache.xml.internal.serializer.utils.Utils; +import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException; + /** * This abstract class is a base class for other stream * serializers (xml, html, text ...) that write output to a stream. @@ -103,7 +105,7 @@ abstract public class ToStream extends SerializerBase { * If m_childNodeNum > 1, the text node will be indented. * */ - protected Deque m_childNodeNumStack = new ArrayDeque<>(); + protected List m_childNodeNumStack = new ArrayList<>(); protected int m_childNodeNum = 0; @@ -115,26 +117,6 @@ abstract public class ToStream extends SerializerBase { protected boolean m_ispreserveSpace = false; - /** - * Stack to keep track of whether or not we need to - * preserve whitespace. - * - * Used to push/pop values used for the field m_ispreserve, but - * m_ispreserve is only relevant if m_doIndent is true. - * If m_doIndent is false this field has no impact. - * - */ - protected BoolStack m_preserves = new BoolStack(); - - /** - * State flag to tell if preservation of whitespace - * is important. - * - * Used only in shouldIndent() but only if m_doIndent is true. - * If m_doIndent is false this flag has no impact. - * - */ - protected boolean m_ispreserve = false; /** * State flag that tells if the previous node processed @@ -1267,7 +1249,6 @@ abstract public class ToStream extends SerializerBase { closeStartTag(); m_elemContext.m_startTagOpen = false; } - m_ispreserve = true; if (shouldIndent()) indent(); @@ -1357,8 +1338,6 @@ abstract public class ToStream extends SerializerBase { m_elemContext.m_startTagOpen = false; } - m_ispreserve = true; - m_writer.write(ch, start, length); } catch (IOException e) @@ -1405,8 +1384,8 @@ abstract public class ToStream extends SerializerBase { if (length == 0 || (isInEntityRef())) return; - final boolean shouldFormat = shouldFormatOutput(); - if (m_elemContext.m_startTagOpen && !shouldFormat) + final boolean shouldNotFormat = !shouldFormatOutput(); + if (m_elemContext.m_startTagOpen) { closeStartTag(); m_elemContext.m_startTagOpen = false; @@ -1432,8 +1411,12 @@ abstract public class ToStream extends SerializerBase { if (m_disableOutputEscapingStates.peekOrFalse() || (!m_escaping)) { - charactersRaw(chars, start, length); - m_isprevtext = true; + if (shouldNotFormat) { + charactersRaw(chars, start, length); + m_isprevtext = true; + } else { + m_charactersBuffer.addRawText(chars, start, length); + } // time to fire off characters generation event if (m_tracer != null) super.fireCharEvent(chars, start, length); @@ -1441,16 +1424,16 @@ abstract public class ToStream extends SerializerBase { return; } - if (m_elemContext.m_startTagOpen && !shouldFormat) + if (m_elemContext.m_startTagOpen) { closeStartTag(); m_elemContext.m_startTagOpen = false; } - if (shouldFormat) { - m_charactersBuffer.addText(chars, start, length); - } else { + if (shouldNotFormat) { outputCharacters(chars, start, length); + } else { + m_charactersBuffer.addText(chars, start, length); } // time to fire off characters generation event @@ -1465,7 +1448,14 @@ abstract public class ToStream extends SerializerBase { * @return True if the content should be formatted. */ protected boolean shouldFormatOutput() { - return !m_ispreserveSpace && m_doIndent; + return m_doIndent && !m_ispreserveSpace; + } + + /** + * @return True if the content in current element should be formatted. + */ + public boolean getIndent() { + return shouldFormatOutput(); } /** @@ -1506,12 +1496,6 @@ abstract public class ToStream extends SerializerBase { i = lastDirty; } } - /* If there is some non-whitespace, mark that we may need - * to preserve this. This is only important if we have indentation on. - */ - if (i < end) - m_ispreserve = true; - // int lengthClean; // number of clean characters in a row // final boolean[] isAsciiClean = m_charInfo.getASCIIClean(); @@ -1577,12 +1561,7 @@ abstract public class ToStream extends SerializerBase { */ final protected void flushCharactersBuffer() throws SAXException { try { - if (shouldFormatOutput() && m_charactersBuffer.hasContent()) { - if (m_elemContext.m_startTagOpen) { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - + if (shouldFormatOutput() && m_charactersBuffer.isAnyCharactersBuffered()) { if (m_elemContext.m_isCdataSection) { /* * due to cdata-section-elements atribute, we need this as @@ -1594,11 +1573,16 @@ abstract public class ToStream extends SerializerBase { } m_childNodeNum++; + boolean skipBeginningNewlines = false; if (shouldIndentForText()) { indent(); m_startNewLine = true; + // newline has always been added here because if this is the + // text before the first element, shouldIndent() won't + // return true. + skipBeginningNewlines = true; } - m_charactersBuffer.flush(); + m_charactersBuffer.flush(skipBeginningNewlines); } } catch (IOException e) { throw new SAXException(e); @@ -1858,8 +1842,10 @@ abstract public class ToStream extends SerializerBase { if (isInEntityRef()) return; - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + m_childNodeNum++; + flushCharactersBuffer(); + } if (m_needToCallStartDocument) { @@ -1890,8 +1876,6 @@ abstract public class ToStream extends SerializerBase { if (namespaceURI != null) ensurePrefixIsDeclared(namespaceURI, name); - m_ispreserve = false; - if (shouldIndent() && m_startNewLine) { indent(); @@ -1912,11 +1896,13 @@ abstract public class ToStream extends SerializerBase { if (atts != null) addAttributes(atts); - m_ispreserveSpace = m_preserveSpaces.peekOrFalse(); - m_preserveSpaces.push(m_ispreserveSpace); + if (m_doIndent) { + m_ispreserveSpace = m_preserveSpaces.peekOrFalse(); + m_preserveSpaces.push(m_ispreserveSpace); - m_childNodeNumStack.push(m_childNodeNum); - m_childNodeNum = 0; + m_childNodeNumStack.add(m_childNodeNum); + m_childNodeNum = 0; + } m_elemContext = m_elemContext.push(namespaceURI,localName,name); m_isprevtext = false; @@ -2128,7 +2114,9 @@ abstract public class ToStream extends SerializerBase { if (isInEntityRef()) return; - flushCharactersBuffer(); + if (m_doIndent) { + flushCharactersBuffer(); + } // namespaces declared at the current depth are no longer valid // so get rid of them m_prefixMap.popNamespaces(m_elemContext.m_currentElemDepth, null); @@ -2175,16 +2163,13 @@ abstract public class ToStream extends SerializerBase { throw new SAXException(e); } - if (!m_elemContext.m_startTagOpen && m_doIndent) - { - m_ispreserve = m_preserves.isEmpty() ? false : m_preserves.pop(); + if (m_doIndent) { + m_ispreserveSpace = m_preserveSpaces.popAndTop(); + m_childNodeNum = m_childNodeNumStack.remove(m_childNodeNumStack.size() - 1); + + m_isprevtext = false; } - m_ispreserveSpace = m_preserveSpaces.popAndTop(); - m_childNodeNum = m_childNodeNumStack.pop(); - - m_isprevtext = false; - // fire off the end element event if (m_tracer != null) super.fireEndElem(name); @@ -2320,8 +2305,10 @@ abstract public class ToStream extends SerializerBase { int start_old = start; if (isInEntityRef()) return; - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + m_childNodeNum++; + flushCharactersBuffer(); + } if (m_elemContext.m_startTagOpen) { closeStartTag(); @@ -2501,8 +2488,10 @@ abstract public class ToStream extends SerializerBase { */ public void startCDATA() throws org.xml.sax.SAXException { - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + m_childNodeNum++; + flushCharactersBuffer(); + } m_cdataStartCalled = true; } @@ -2588,12 +2577,6 @@ abstract public class ToStream extends SerializerBase { */ if (m_StringOfCDATASections != null) m_elemContext.m_isCdataSection = isCdataSection(); - - if (m_doIndent) - { - m_isprevtext = false; - m_preserves.push(m_ispreserve); - } } } @@ -2943,7 +2926,9 @@ abstract public class ToStream extends SerializerBase { String value, boolean xslAttribute) { - if (m_charactersBuffer.isAnyCharactersBuffered()) { + if (!m_charactersBuffer.isAnyCharactersBuffered()) { + return doAddAttributeAlways(uri, localName, rawName, type, value, xslAttribute); + } else { /* * If stylesheet includes xsl:copy-of an attribute node, XSLTC will * fire an addAttribute event. When a text node is handling in @@ -2954,8 +2939,6 @@ abstract public class ToStream extends SerializerBase { * */ return m_attributes.getIndex(rawName) < 0; - } else { - return doAddAttributeAlways(uri, localName, rawName, type, value, xslAttribute); } } @@ -3086,7 +3069,7 @@ abstract public class ToStream extends SerializerBase { } } - if (rawName.equals("xml:space")) { + if (m_doIndent && rawName.equals("xml:space")) { if (value.equals("preserve")) { m_ispreserveSpace = true; if (m_preserveSpaces.size() > 0) @@ -3227,8 +3210,6 @@ abstract public class ToStream extends SerializerBase { // Leave m_format alone for now - Brian M. // this.m_format = null; this.m_inDoctype = false; - this.m_ispreserve = false; - this.m_preserves.clear(); this.m_ispreserveSpace = false; this.m_preserveSpaces.clear(); this.m_childNodeNum = 0; @@ -3411,6 +3392,7 @@ abstract public class ToStream extends SerializerBase { } } + /** * This inner class is used to buffer the text nodes and the entity * reference nodes if indentation is on. There is only one CharacterBuffer @@ -3425,20 +3407,21 @@ abstract public class ToStream extends SerializerBase { */ private abstract class GenericCharacters { /** - * @return True if having any character other than whitespace or - * line feed. + * @return True if all characters in this Text are newlines. */ - abstract boolean hasContent(); - - abstract void flush() throws SAXException; + abstract boolean flush(boolean skipBeginningNewlines) throws SAXException; /** - * Converts this GenericCharacters to a new character array. + * Converts this GenericCharacters to a new character array. This + * method is used to handle cdata-section-elements attribute in + * xsl:output. Therefore it doesn't need to consider + * skipBeginningNewlines because the text will be involved with CDATA + * tag. */ abstract char[] toChars(); } - private Queue bufferedCharacters = new ArrayDeque<>(); + private List bufferedCharacters = new ArrayList<>(); /** * Append a text node to the buffer. @@ -3451,27 +3434,21 @@ abstract public class ToStream extends SerializerBase { text = Arrays.copyOfRange(chars, start, start + length); } - boolean hasContent() { - for (int i = 0; i < text.length; i++) { - if (!isWhiteSpace(text[i])) { + boolean flush(boolean skipBeginningNewlines) throws SAXException { + int start = 0; + while (skipBeginningNewlines && text[start] == '\n') { + start++; + if (start == text.length) { return true; } } + outputCharacters(text, start, text.length - start); return false; } - void flush() throws SAXException { - outputCharacters(text, 0, text.length); - } - char[] toChars() { return text; } - - boolean isWhiteSpace(char ch) { - return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'; - } - }); } @@ -3480,12 +3457,22 @@ abstract public class ToStream extends SerializerBase { */ public void addEntityReference(String entityName) { bufferedCharacters.add(new GenericCharacters() { - boolean hasContent() { - return true; - } - - void flush() throws SAXException { - outputEntityReference(entityName); + boolean flush(boolean skipBeginningNewlines) throws SAXException { + if (m_elemContext.m_startTagOpen) + { + closeStartTag(); + m_elemContext.m_startTagOpen = false; + } + if (m_cdataTagOpen) + closeCDATA(); + char[] cs = toChars(); + try { + m_writer.write(cs, 0, cs.length); + m_isprevtext = true; + } catch (IOException e) { + throw new SAXException(e); + } + return false; } char[] toChars() { @@ -3495,35 +3482,69 @@ abstract public class ToStream extends SerializerBase { } /** - * @return True if any GenericCharacters is already buffered. + * Append a raw text to the buffer. Used to handle raw characters event. */ - public boolean isAnyCharactersBuffered() { - return !bufferedCharacters.isEmpty(); + public void addRawText(final char chars[], final int start, final int length) { + bufferedCharacters.add(new GenericCharacters() { + char[] text; + + { + text = Arrays.copyOfRange(chars, start, start + length); + } + + boolean flush(boolean skipBeginningNewlines) throws SAXException { + try { + int start = 0; + while (skipBeginningNewlines && text[start] == '\n') { + start++; + if (start == text.length) { + return true; + } + } + m_writer.write(text, start, text.length - start); + m_isprevtext = true; + } catch (IOException e) { + throw new SAXException(e); + } + return false; + } + + char[] toChars() { + return text; + } + }); } /** - * @return True if any buffered GenericCharacters has content. + * @return True if any GenericCharacters are buffered. */ - public boolean hasContent() { - return bufferedCharacters.stream().anyMatch(GenericCharacters::hasContent); + public boolean isAnyCharactersBuffered() { + return bufferedCharacters.size() > 0; } /** * Flush all buffered GenericCharacters. */ - public void flush() throws SAXException { - GenericCharacters element; - while ((element = bufferedCharacters.poll()) != null) - element.flush(); + public void flush(boolean skipBeginningNewlines) throws SAXException { + Iterator itr = bufferedCharacters.iterator(); + + boolean continueSkipBeginningNewlines = skipBeginningNewlines; + while (itr.hasNext()) { + GenericCharacters element = itr.next(); + continueSkipBeginningNewlines = element.flush(continueSkipBeginningNewlines); + itr.remove(); + } } /** * Converts all buffered GenericCharacters to a new character array. */ public char[] toChars() { - return bufferedCharacters.stream().map(GenericCharacters::toChars) - .collect(StringBuilder::new, StringBuilder::append, StringBuilder::append).toString() - .toCharArray(); + StringBuilder sb = new StringBuilder(); + for (GenericCharacters element : bufferedCharacters) { + sb.append(element.toChars()); + } + return sb.toString().toCharArray(); } /** @@ -3534,6 +3555,7 @@ abstract public class ToStream extends SerializerBase { } } + // Implement DTDHandler /** * If this method is called, the serializer is used as a diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToTextSAXHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToTextSAXHandler.java index f76c55227da..2aa6c440577 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToTextSAXHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToTextSAXHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ToTextSAXHandler.java,v 1.3 2005/09/28 13:49:08 pvedula Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToTextStream.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToTextStream.java index 9e39b89f7ab..f4d7823c296 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToTextStream.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToTextStream.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ToTextStream.java,v 1.2.4.1 2005/09/21 10:35:34 pvedula Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLSAXHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLSAXHandler.java index 7b165e4116f..d0551594d43 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLSAXHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLSAXHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ToXMLSAXHandler.java,v 1.3 2005/09/28 13:49:08 pvedula Exp $ - */ package com.sun.org.apache.xml.internal.serializer; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java index 681737ebc88..adc85a365e5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -88,8 +88,6 @@ public final class ToXMLStream extends ToStream setOmitXMLDeclaration(xmlListener.getOmitXMLDeclaration()); - m_ispreserve = xmlListener.m_ispreserve; - m_preserves = xmlListener.m_preserves; m_ispreserveSpace = xmlListener.m_ispreserveSpace; m_preserveSpaces = xmlListener.m_preserveSpaces; m_childNodeNum = xmlListener.m_childNodeNum; @@ -201,7 +199,9 @@ public final class ToXMLStream extends ToStream */ public void endDocument() throws org.xml.sax.SAXException { - flushCharactersBuffer(); + if (m_doIndent) { + flushCharactersBuffer(); + } flushPending(); if (m_doIndent && !m_isprevtext) { @@ -235,11 +235,6 @@ public final class ToXMLStream extends ToStream */ public void startPreserving() throws org.xml.sax.SAXException { - - // Not sure this is really what we want. -sb - m_preserves.push(true); - - m_ispreserve = true; } /** @@ -251,9 +246,6 @@ public final class ToXMLStream extends ToStream */ public void endPreserving() throws org.xml.sax.SAXException { - - // Not sure this is really what we want. -sb - m_ispreserve = m_preserves.isEmpty() ? false : m_preserves.pop(); } /** @@ -273,8 +265,10 @@ public final class ToXMLStream extends ToStream if (isInEntityRef()) return; - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + m_childNodeNum++; + flushCharactersBuffer(); + } flushPending(); if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING)) diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/TransformStateSetter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/TransformStateSetter.java index cb8d4e57b1b..37bc0e5302b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/TransformStateSetter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/TransformStateSetter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: TransformStateSetter.java,v 1.2.4.1 2005/09/15 08:15:29 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import javax.xml.transform.Transformer; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Version.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Version.java index dfdde0ceac6..fed129f29a9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Version.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Version.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Version.java,v 1.2 2005/09/28 13:49:09 pvedula Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/WriterChain.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/WriterChain.java index bf5d466892c..addfbde3c50 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/WriterChain.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/WriterChain.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WriterChain.java,v 1.1.4.1 2005/09/08 10:58:44 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/WriterToASCI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/WriterToASCI.java index cfbbd9ca719..1abadb92ed4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/WriterToASCI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/WriterToASCI.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WriterToASCI.java,v 1.2.4.1 2005/09/15 08:15:31 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3SerializerImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3SerializerImpl.java index 0d4509c2a97..4fe5c93c302 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3SerializerImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3SerializerImpl.java @@ -1,3 +1,7 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java index 68864ca7800..400741e330f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -1024,7 +1024,8 @@ final class DOM3TreeWalker { return; } - if (bDispatch) { + if (bDispatch + && (!fSerializer.getIndent() || !node.getData().replace('\n', ' ').trim().isEmpty())) { dispatachChars(node); } } diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMConstants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMConstants.java index 07f19b29d1f..c50cdf66c8d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMConstants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMConstants.java @@ -1,3 +1,7 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -15,9 +19,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: $ - */ package com.sun.org.apache.xml.internal.serializer.dom3; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorHandlerImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorHandlerImpl.java index e1b577ffaa9..e74896adc48 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorHandlerImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorHandlerImpl.java @@ -1,3 +1,7 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -15,9 +19,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: $ - */ package com.sun.org.apache.xml.internal.serializer.dom3; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorImpl.java index a143f65491e..9566b3f4f85 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMErrorImpl.java @@ -1,3 +1,7 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -15,9 +19,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: $ - */ package com.sun.org.apache.xml.internal.serializer.dom3; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMLocatorImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMLocatorImpl.java index f0e87c340f4..e5b0124dd64 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMLocatorImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMLocatorImpl.java @@ -1,3 +1,7 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -15,9 +19,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: $ - */ package com.sun.org.apache.xml.internal.serializer.dom3; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMOutputImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMOutputImpl.java index d6c0a5d59a8..6b4682e5eac 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMOutputImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMOutputImpl.java @@ -1,3 +1,7 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -15,9 +19,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: $ - */ package com.sun.org.apache.xml.internal.serializer.dom3; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMStringListImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMStringListImpl.java index 11eac2aa2e8..7ebee3ca4b3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMStringListImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMStringListImpl.java @@ -1,3 +1,7 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -15,9 +19,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: $ - */ + package com.sun.org.apache.xml.internal.serializer.dom3; import java.util.Vector; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/LSSerializerImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/LSSerializerImpl.java index bf6e5e1867f..897ef03ef7e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/LSSerializerImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/LSSerializerImpl.java @@ -1,3 +1,7 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -15,9 +19,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: $ - */ package com.sun.org.apache.xml.internal.serializer.dom3; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/NamespaceSupport.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/NamespaceSupport.java index 611b984f05a..f7edf05bef3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/NamespaceSupport.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/NamespaceSupport.java @@ -1,3 +1,7 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -15,9 +19,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: $ - */ package com.sun.org.apache.xml.internal.serializer.dom3; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/AttList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/AttList.java index 94b4422c1ca..3547dc3f00c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/AttList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/AttList.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AttList.java,v 1.1.4.1 2005/09/08 11:03:08 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer.utils; import org.w3c.dom.Attr; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/BoolStack.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/BoolStack.java index d20d4d5e553..985d613c252 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/BoolStack.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/BoolStack.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: BoolStack.java,v 1.1.4.1 2005/09/08 11:03:08 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/DOM2Helper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/DOM2Helper.java index 73959030b2b..e66fc7d745c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/DOM2Helper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/DOM2Helper.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOM2Helper.java,v 1.1.4.1 2005/09/08 11:03:09 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer.utils; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/Messages.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/Messages.java index 84f4c9840bb..2ecedaf735f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/Messages.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/Messages.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Messages.java,v 1.1.4.1 2005/09/08 11:03:10 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer.utils; import com.sun.org.apache.xalan.internal.utils.SecuritySupport; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_en.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_en.java index 3789a17b547..b3c020ad3f1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_en.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_en.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SerializerMessages_en.java,v 1.1.4.1 2005/09/08 11:03:13 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/StringToIntTable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/StringToIntTable.java index 04140ffd6f9..47f157240a7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/StringToIntTable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/StringToIntTable.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringToIntTable.java,v 1.1.4.1 2005/09/08 11:03:19 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SystemIDResolver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SystemIDResolver.java index e5c38eb1081..f2c198c9f09 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SystemIDResolver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SystemIDResolver.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SystemIDResolver.java,v 1.1.4.1 2005/09/08 11:03:20 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer.utils; import java.io.File; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/URI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/URI.java index 4d5375a59c8..320ad7f7067 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/URI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/URI.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: URI.java,v 1.1.4.1 2005/09/08 11:03:20 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer.utils; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/WrappedRuntimeException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/WrappedRuntimeException.java index 758e30f4869..48ea8e24825 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/WrappedRuntimeException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/WrappedRuntimeException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WrappedRuntimeException.java,v 1.1.4.1 2005/09/08 11:03:21 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.serializer.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/AttList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/AttList.java index 8437ffd635d..eceeb4622f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/AttList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/AttList.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AttList.java,v 1.2.4.1 2005/09/15 08:15:35 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import org.w3c.dom.Attr; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/BoolStack.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/BoolStack.java index b47dc5c95c5..ac54b7e9079 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/BoolStack.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/BoolStack.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: BoolStack.java,v 1.2.4.1 2005/09/15 08:15:35 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/CharKey.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/CharKey.java index 64c940607b5..f6f2dd4d073 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/CharKey.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/CharKey.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CharKey.java,v 1.3 2005/09/28 13:49:18 pvedula Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/Constants.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/Constants.java index c027234cc0e..b90ad86ae83 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/Constants.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/Constants.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Constants.java,v 1.2.4.1 2005/09/15 08:15:37 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOM2Helper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOM2Helper.java index c23f08eec16..c2967058c17 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOM2Helper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOM2Helper.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOM2Helper.java,v 1.2.4.1 2005/09/15 08:15:37 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMBuilder.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMBuilder.java index 9dadac99b45..adf503d79ad 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMBuilder.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMBuilder.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOMBuilder.java,v 1.2.4.1 2005/09/15 08:15:39 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.util.Stack; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMOrder.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMOrder.java index ca74f77d60a..dcbf836ee35 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMOrder.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMOrder.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DOMOrder.java,v 1.2.4.1 2005/09/15 08:15:41 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DefaultErrorHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DefaultErrorHandler.java index c08fbe8ef39..bd5ab9c7668 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DefaultErrorHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DefaultErrorHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DefaultErrorHandler.java,v 1.2.4.1 2005/09/15 08:15:43 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.io.PrintStream; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/FastStringBuffer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/FastStringBuffer.java index b8b9a518961..35d134bd37b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/FastStringBuffer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/FastStringBuffer.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FastStringBuffer.java,v 1.2.4.1 2005/09/15 08:15:44 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/IntStack.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/IntStack.java index eb18b3ad699..b6af0474e37 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/IntStack.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/IntStack.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IntStack.java,v 1.2.4.1 2005/09/15 08:15:45 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.util.EmptyStackException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/IntVector.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/IntVector.java index d8748c4bbcc..d05be12ecc0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/IntVector.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/IntVector.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IntVector.java,v 1.2.4.1 2005/09/15 08:15:45 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ListingErrorHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ListingErrorHandler.java index 5ddf139d6d3..21fe4995377 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ListingErrorHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ListingErrorHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2000-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ListingErrorHandler.java,v 1.2.4.1 2005/09/15 08:15:46 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/LocaleUtility.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/LocaleUtility.java index 0a5c3594b8d..d63e26aafd4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/LocaleUtility.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/LocaleUtility.java @@ -2,16 +2,15 @@ * reserved comment block * DO NOT REMOVE OR ALTER! */ - - /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,9 +18,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LocaleUtility.java,v 1.2.4.1 2005/09/15 08:15:47 suresh_emailid Exp $ - */ + + package com.sun.org.apache.xml.internal.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/MutableAttrListImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/MutableAttrListImpl.java index e44d8b09193..58e731f3699 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/MutableAttrListImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/MutableAttrListImpl.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: MutableAttrListImpl.java,v 1.2.4.1 2005/09/15 08:15:47 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.io.Serializable; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NSInfo.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NSInfo.java index 73886eaaf3e..e4b6f406103 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NSInfo.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NSInfo.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NSInfo.java,v 1.2.4.1 2005/09/15 08:15:48 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NameSpace.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NameSpace.java index b262e433348..83145f9d215 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NameSpace.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NameSpace.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NameSpace.java,v 1.2.4.1 2005/09/15 08:15:49 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.io.Serializable; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NodeConsumer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NodeConsumer.java index f0b36bc71a9..85a119550f6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NodeConsumer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NodeConsumer.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeConsumer.java,v 1.2.4.1 2005/09/15 08:15:50 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import org.w3c.dom.Node; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NodeVector.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NodeVector.java index 8bba6d5d0bf..6f54e22d4dd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NodeVector.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/NodeVector.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeVector.java,v 1.2.4.1 2005/09/15 08:15:50 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.io.Serializable; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java index fb75bc46dc1..5c24bb4afea 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ObjectPool.java,v 1.2.4.1 2005/09/15 08:15:50 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.util.ArrayList; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectStack.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectStack.java index f8051b81736..7e89a833d70 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectStack.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectStack.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ObjectStack.java,v 1.2.4.1 2005/09/15 08:15:51 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.util.EmptyStackException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectVector.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectVector.java index 19c5af876db..f694da4fb83 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectVector.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectVector.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ObjectVector.java,v 1.2.4.1 2005/09/15 08:15:51 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/PrefixResolver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/PrefixResolver.java index f00de59e112..45e60d4b925 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/PrefixResolver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/PrefixResolver.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: PrefixResolver.java,v 1.2.4.1 2005/09/15 08:15:51 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/PrefixResolverDefault.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/PrefixResolverDefault.java index d89a83eb817..185647be356 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/PrefixResolverDefault.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/PrefixResolverDefault.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: PrefixResolverDefault.java,v 1.2.4.1 2005/09/15 08:15:51 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import org.w3c.dom.NamedNodeMap; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/QName.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/QName.java index 474b7610380..ed9c5d000ae 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/QName.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/QName.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: QName.java,v 1.2.4.1 2005/09/15 08:15:52 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.util.Stack; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/RawCharacterHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/RawCharacterHandler.java index d01ce86fc05..8b61deb9551 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/RawCharacterHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/RawCharacterHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: RawCharacterHandler.java,v 1.2.4.1 2005/09/15 08:15:52 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SAXSourceLocator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SAXSourceLocator.java index c9f75749322..d0b4c4a3fe3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SAXSourceLocator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SAXSourceLocator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SAXSourceLocator.java,v 1.2.4.1 2005/09/15 08:15:52 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.io.Serializable; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SerializableLocatorImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SerializableLocatorImpl.java index 1bb007d25cc..533d868999f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SerializableLocatorImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SerializableLocatorImpl.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SerializableLocatorImpl.java,v 1.2.4.1 2005/09/15 08:15:54 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StopParseException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StopParseException.java index bc29bd26f5f..2159b538196 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StopParseException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StopParseException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StopParseException.java,v 1.2.4.1 2005/09/15 08:15:54 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringBufferPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringBufferPool.java index 29904802f16..4815dc712d0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringBufferPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringBufferPool.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringBufferPool.java,v 1.2.4.1 2005/09/15 08:15:54 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringComparable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringComparable.java index 81cc838a99b..d6f28fe254e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringComparable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringComparable.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringComparable.java,v 1.2.4.1 2005/09/15 08:15:55 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToIntTable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToIntTable.java index 0e9984ddfb4..9cbeacd4980 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToIntTable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToIntTable.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringToIntTable.java,v 1.2.4.1 2005/09/15 08:15:55 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToStringTable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToStringTable.java index 02fe9cd6807..5e3251bd3a8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToStringTable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToStringTable.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringToStringTable.java,v 1.2.4.1 2005/09/15 08:15:56 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToStringTableVector.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToStringTableVector.java index 1eeec4c02fd..fa5f886f7d3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToStringTableVector.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringToStringTableVector.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringToStringTableVector.java,v 1.2.4.1 2005/09/15 08:15:56 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringVector.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringVector.java index 0acbbc13f06..0ab704c48c8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringVector.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringVector.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringVector.java,v 1.2.4.1 2005/09/15 08:15:56 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StylesheetPIHandler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StylesheetPIHandler.java index 812730f3a9d..7602d38adbf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StylesheetPIHandler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StylesheetPIHandler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StylesheetPIHandler.java,v 1.2.4.1 2005/09/15 08:15:57 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.util.StringTokenizer; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SuballocatedByteVector.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SuballocatedByteVector.java index 563886e8534..71e61f193b8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SuballocatedByteVector.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SuballocatedByteVector.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SuballocatedByteVector.java,v 1.2.4.1 2005/09/15 08:15:57 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SuballocatedIntVector.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SuballocatedIntVector.java index 40323022b42..b23458dc460 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SuballocatedIntVector.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SuballocatedIntVector.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SuballocatedIntVector.java,v 1.3 2005/09/28 13:49:22 pvedula Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SystemIDResolver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SystemIDResolver.java index 7b6f53b0d48..de383ca3e9d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SystemIDResolver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SystemIDResolver.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SystemIDResolver.java,v 1.2.4.1 2005/09/15 08:15:58 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.io.File; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/Trie.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/Trie.java index 96b21385e81..21fe8171aaf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/Trie.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/Trie.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Trie.java,v 1.2.4.1 2005/09/15 08:15:59 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/URI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/URI.java index f9e67ab663c..18cf1b42d4c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/URI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/URI.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: URI.java,v 1.2.4.1 2005/09/15 08:16:00 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/UnImplNode.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/UnImplNode.java index dfe27664eb4..174f879096c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/UnImplNode.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/UnImplNode.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +21,7 @@ /* * $Id: UnImplNode.java,v */ + package com.sun.org.apache.xml.internal.utils; import com.sun.org.apache.xml.internal.res.XMLErrorResources; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/WrappedRuntimeException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/WrappedRuntimeException.java index 9de632b5356..235964cd718 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/WrappedRuntimeException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/WrappedRuntimeException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WrappedRuntimeException.java,v 1.2.4.1 2005/09/15 08:16:00 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/WrongParserException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/WrongParserException.java index 0fe93103efb..26e409c90af 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/WrongParserException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/WrongParserException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WrongParserException.java,v 1.2.4.1 2005/09/15 08:16:00 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XML11Char.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XML11Char.java index 05bb315e279..22fef35afee 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XML11Char.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XML11Char.java @@ -3,11 +3,12 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLChar.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLChar.java index 45d754c238f..51ff2859496 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLChar.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLChar.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLChar.java,v 1.2.4.1 2005/09/15 08:16:01 suresh_emailid Exp $ - */ package com.sun.org.apache.xml.internal.utils; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLCharacterRecognizer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLCharacterRecognizer.java index fa137dc5f5b..fae1a395938 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLCharacterRecognizer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLCharacterRecognizer.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLCharacterRecognizer.java,v 1.2.4.1 2005/09/15 08:16:01 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLString.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLString.java index e8de6f35191..2bd5846bca9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLString.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLString.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLString.java,v 1.2.4.1 2005/09/15 08:16:02 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.util.Locale; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringDefault.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringDefault.java index 3953c863cc4..45d7d04dcd6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringDefault.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringDefault.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLStringDefault.java,v 1.2.4.1 2005/09/15 08:16:02 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; import java.util.Locale; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringFactory.java index 21cab32ce42..89abd40a2ba 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringFactory.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLStringFactory.java,v 1.2.4.1 2005/09/15 08:16:03 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringFactoryDefault.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringFactoryDefault.java index 639aea70767..0956be6553b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringFactoryDefault.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLStringFactoryDefault.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLStringFactoryDefault.java,v 1.2.4.1 2005/09/15 08:16:03 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/CharArrayWrapper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/CharArrayWrapper.java index c5b6abad5e8..65564ac75b0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/CharArrayWrapper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/CharArrayWrapper.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CharArrayWrapper.java,v 1.1.4.1 2005/09/08 11:39:32 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/IntArrayWrapper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/IntArrayWrapper.java index 7fc22f5720a..34fae9bbf56 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/IntArrayWrapper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/IntArrayWrapper.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IntArrayWrapper.java,v 1.1.4.1 2005/09/08 11:39:32 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/LongArrayWrapper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/LongArrayWrapper.java index 53240334c4b..bded6158971 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/LongArrayWrapper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/LongArrayWrapper.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LongArrayWrapper.java,v 1.1.4.1 2005/09/08 11:39:32 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/StringArrayWrapper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/StringArrayWrapper.java index 00b1c41648e..103fca2eb3b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/StringArrayWrapper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/StringArrayWrapper.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StringArrayWrapper.java,v 1.1.4.1 2005/09/08 11:39:33 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundle.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundle.java index 708fbb47400..def8cec86ce 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundle.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundle.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResourceBundle.java,v 1.2.4.1 2005/09/15 08:16:04 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; import java.security.AccessController; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundleBase.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundleBase.java index c559dd44397..154fd002b19 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundleBase.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResourceBundleBase.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResourceBundleBase.java,v 1.2.4.1 2005/09/15 08:16:05 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_de.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_de.java index 2b2cdaebfa0..43f77b978ec 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_de.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_de.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_de.java,v 1.2.4.1 2005/09/15 08:16:05 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_en.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_en.java index c1de0b49145..3b818a49700 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_en.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_en.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_en.java,v 1.2.4.1 2005/09/15 08:16:06 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_es.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_es.java index cd2bb804579..4e7ae9a90ac 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_es.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_es.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_es.java,v 1.2.4.1 2005/09/15 08:16:06 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_fr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_fr.java index 76d09936102..bb2fcfc0acc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_fr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_fr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_fr.java,v 1.2.4.1 2005/09/15 08:16:06 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_it.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_it.java index 2d95de3e1eb..57f9255dd05 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_it.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_it.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_it.java,v 1.2.4.1 2005/09/15 08:16:07 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_A.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_A.java index b27785d0fee..019191dbc33 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_A.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_A.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_ja_JP_A.java,v 1.2.4.1 2005/09/15 08:16:07 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_HA.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_HA.java index 2fc877b04de..d437d7c74d2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_HA.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_HA.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_ja_JP_HA.java,v 1.2.4.1 2005/09/15 08:16:07 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_HI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_HI.java index a1a5f53cf16..5355c8f5ae5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_HI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_HI.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_ja_JP_HI.java,v 1.2.4.1 2005/09/15 08:16:07 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_I.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_I.java index 1f53e93566b..6076922ccb3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_I.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_I.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_ja_JP_I.java,v 1.2.4.1 2005/09/15 08:16:07 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ko.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ko.java index 981d9a929ae..8afeeafff53 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ko.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_ko.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_ko.java,v 1.2.4.1 2005/09/15 08:16:08 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_sv.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_sv.java index 2d04a641f79..b60b170ea65 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_sv.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_sv.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_sv.java,v 1.2.4.1 2005/09/15 08:16:09 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_zh_CN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_zh_CN.java index 8fd840feb4d..87b6f3db54f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_zh_CN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_zh_CN.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_zh_CN.java,v 1.2.4.1 2005/09/15 08:16:10 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_zh_TW.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_zh_TW.java index 3397329ac31..98f501cbbdd 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_zh_TW.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/res/XResources_zh_TW.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XResources_zh_TW.java,v 1.2.4.1 2005/09/15 08:16:10 suresh_emailid Exp $ - */ + package com.sun.org.apache.xml.internal.utils.res; // diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Arg.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Arg.java index 311d07efca2..31a33163c1c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Arg.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Arg.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Arg.java,v 1.1.2.1 2005/08/01 01:30:11 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import com.sun.org.apache.xml.internal.utils.QName; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/CachedXPathAPI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/CachedXPathAPI.java index 219591c445c..a262cb10e18 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/CachedXPathAPI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/CachedXPathAPI.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: CachedXPathAPI.java,v 1.2.4.1 2005/09/10 03:47:42 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import javax.xml.transform.TransformerException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Expression.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Expression.java index a16d1377e50..ae122348d22 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Expression.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Expression.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Expression.java,v 1.2.4.2 2005/09/14 19:50:20 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import javax.xml.transform.ErrorListener; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExpressionNode.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExpressionNode.java index 591cc5e3f51..c890b718a21 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExpressionNode.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExpressionNode.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExpressionNode.java,v 1.1.2.1 2005/08/01 01:30:15 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import javax.xml.transform.SourceLocator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExpressionOwner.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExpressionOwner.java index dfca47c23e0..887a5840b27 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExpressionOwner.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExpressionOwner.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExpressionOwner.java,v 1.1.2.1 2005/08/01 01:30:12 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExtensionsProvider.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExtensionsProvider.java index b94938572c7..616595939c7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExtensionsProvider.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExtensionsProvider.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ExtensionsProvider.java,v 1.1.2.1 2005/08/01 01:30:08 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import java.util.Vector; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/FoundIndex.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/FoundIndex.java index a6f2a47089c..a4e03d66b1e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/FoundIndex.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/FoundIndex.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FoundIndex.java,v 1.2.4.1 2005/09/14 19:50:20 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSet.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSet.java index 3409e7f7923..03db1523bee 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSet.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSet.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeSet.java,v 1.2.4.1 2005/09/10 17:39:49 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSetDTM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSetDTM.java index cc987d8a643..03a802c8a62 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSetDTM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSetDTM.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeSetDTM.java,v 1.2.4.2 2005/09/14 20:30:06 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTree.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTree.java index 7a1cc0a06fd..b32c2d52cf5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTree.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTree.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SourceTree.java,v 1.1.2.1 2005/08/01 01:30:15 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java index b9c47708dea..4abd7716c34 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SourceTreeManager.java,v 1.2.4.1 2005/09/10 18:14:09 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/VariableStack.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/VariableStack.java index d219a18b7ac..0d56c00263e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/VariableStack.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/VariableStack.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: VariableStack.java,v 1.2.4.1 2005/09/10 18:16:22 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import javax.xml.transform.TransformerException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/WhitespaceStrippingElementMatcher.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/WhitespaceStrippingElementMatcher.java index dc5d97595a7..8d9862f865b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/WhitespaceStrippingElementMatcher.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/WhitespaceStrippingElementMatcher.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WhitespaceStrippingElementMatcher.java,v 1.1.2.1 2005/08/01 01:30:15 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import javax.xml.transform.TransformerException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPath.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPath.java index 1601ae15dcc..efc2fbdc5e9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPath.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPath.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPath.java,v 1.2.4.1 2005/09/15 01:41:57 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import java.io.Serializable; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathAPI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathAPI.java index fb91d900154..2c8f12713fe 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathAPI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathAPI.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPathAPI.java,v 1.2.4.1 2005/09/10 18:18:23 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import javax.xml.transform.TransformerException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java index fd5db6f011e..82aa7da9413 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPathContext.java,v 1.2.4.2 2005/09/15 01:37:55 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import com.sun.org.apache.xalan.internal.extensions.ExpressionContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathException.java index ef1f8bb039f..48f662001ec 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPathException.java,v 1.3 2005/09/28 13:49:30 pvedula Exp $ - */ + package com.sun.org.apache.xpath.internal; import javax.xml.transform.TransformerException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathFactory.java index bb5061b6901..f620d146d03 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathFactory.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPathFactory.java,v 1.1.2.1 2005/08/01 01:30:14 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import javax.xml.transform.SourceLocator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathProcessorException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathProcessorException.java index f7728ee27a6..f6d4f753e86 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathProcessorException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathProcessorException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPathProcessorException.java,v 1.2.4.1 2005/09/15 01:42:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathVisitable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathVisitable.java index bfa847093d4..ae5e3d0dded 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathVisitable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathVisitable.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPathVisitable.java,v 1.1.2.1 2005/08/01 01:30:13 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathVisitor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathVisitor.java index 8a909eb2c71..8e9db3279a1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathVisitor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathVisitor.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPathVisitor.java,v 1.1.2.1 2005/08/01 01:30:11 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal; import com.sun.org.apache.xpath.internal.axes.LocPathIterator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AttributeIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AttributeIterator.java index 8f08afa5795..c6fa947f3a1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AttributeIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AttributeIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AttributeIterator.java,v 1.2.4.1 2005/09/14 19:45:22 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AxesWalker.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AxesWalker.java index 1834264de50..112df896cde 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AxesWalker.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AxesWalker.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: AxesWalker.java,v 1.2.4.1 2005/09/14 19:45:22 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import java.util.Vector; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/BasicTestIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/BasicTestIterator.java index cbea6db7e0b..40ebcc1481e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/BasicTestIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/BasicTestIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: BasicTestIterator.java,v 1.2.4.1 2005/09/14 19:45:20 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ChildIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ChildIterator.java index be5320056dd..2a5dac1ab96 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ChildIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ChildIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ChildIterator.java,v 1.2.4.2 2005/09/14 19:45:20 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ChildTestIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ChildTestIterator.java index ebbf9b69c0a..16d9437c600 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ChildTestIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ChildTestIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ChildTestIterator.java,v 1.2.4.2 2005/09/14 19:45:20 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.Axis; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ContextNodeList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ContextNodeList.java index 0c4924cabbc..51c65189b50 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ContextNodeList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ContextNodeList.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ContextNodeList.java,v 1.1.2.1 2005/08/01 01:30:20 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import org.w3c.dom.Node; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/DescendantIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/DescendantIterator.java index 729f89d629f..bcfb61019d6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/DescendantIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/DescendantIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: DescendantIterator.java,v 1.2.4.2 2005/09/14 19:45:21 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.Axis; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIterator.java index d749273f4aa..7334a81d47c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FilterExprIterator.java,v 1.2.4.2 2005/09/14 19:45:22 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIteratorSimple.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIteratorSimple.java index 29b064e45de..feb986c4309 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIteratorSimple.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIteratorSimple.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FilterExprIteratorSimple.java,v 1.2.4.2 2005/09/14 19:45:21 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.Axis; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprWalker.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprWalker.java index 40638e6e693..9d6961fc18b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprWalker.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprWalker.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FilterExprWalker.java,v 1.2.4.2 2005/09/14 19:45:23 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.Axis; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/HasPositionalPredChecker.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/HasPositionalPredChecker.java index b089ec09b4c..c70279642a6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/HasPositionalPredChecker.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/HasPositionalPredChecker.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: HasPositionalPredChecker.java,v 1.1.2.1 2005/08/01 01:30:24 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xpath.internal.Expression; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/IteratorPool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/IteratorPool.java index ccaca31daef..c127ebd4bb8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/IteratorPool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/IteratorPool.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: IteratorPool.java,v 1.2.4.1 2005/09/14 19:45:19 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import java.util.ArrayList; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/LocPathIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/LocPathIterator.java index 400e69ddae6..e89d406b261 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/LocPathIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/LocPathIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: LocPathIterator.java,v 1.2.4.2 2005/09/14 19:45:22 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java index edba3a272a4..7a4a5934ee5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: MatchPatternIterator.java,v 1.2.4.2 2005/09/14 19:45:22 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.Axis; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/NodeSequence.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/NodeSequence.java index 53e5287c070..4159e379874 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/NodeSequence.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/NodeSequence.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeSequence.java,v 1.6 2007/01/12 19:26:42 spericas Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import java.util.Vector; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/OneStepIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/OneStepIterator.java index 539068498dc..de78d2354da 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/OneStepIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/OneStepIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: OneStepIterator.java,v 1.2.4.2 2005/09/14 19:45:22 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/OneStepIteratorForward.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/OneStepIteratorForward.java index ea1a8291414..3a567ad8845 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/OneStepIteratorForward.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/OneStepIteratorForward.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: OneStepIteratorForward.java,v 1.2.4.2 2005/09/14 19:45:22 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PathComponent.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PathComponent.java index a72829d7bc6..951879993b7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PathComponent.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PathComponent.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: PathComponent.java,v 1.1.2.1 2005/08/01 01:30:27 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PredicatedNodeTest.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PredicatedNodeTest.java index 965f3f3aed2..869ef39c8fa 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PredicatedNodeTest.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PredicatedNodeTest.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: PredicatedNodeTest.java,v 1.2.4.2 2005/09/14 19:45:20 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/RTFIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/RTFIterator.java index 1f02064b8ef..72b73ef76ba 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/RTFIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/RTFIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: RTFIterator.java,v 1.2.4.1 2005/09/14 19:45:16 jeffsuttor Exp $ - */ /** * This class implements an RTF Iterator. Currently exists for sole diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ReverseAxesWalker.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ReverseAxesWalker.java index 419d6ef8343..da4944f6a22 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ReverseAxesWalker.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/ReverseAxesWalker.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ReverseAxesWalker.java,v 1.2.4.1 2005/09/14 19:45:21 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/SelfIteratorNoPredicate.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/SelfIteratorNoPredicate.java index f15c69f3539..66ce31b3a55 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/SelfIteratorNoPredicate.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/SelfIteratorNoPredicate.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SelfIteratorNoPredicate.java,v 1.2.4.2 2005/09/14 19:45:21 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/SubContextList.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/SubContextList.java index e1697434b6a..f604ec5fd8d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/SubContextList.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/SubContextList.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: SubContextList.java,v 1.1.2.1 2005/08/01 01:30:28 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionChildIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionChildIterator.java index 9afc2cf8de9..b67c5f97003 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionChildIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionChildIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: UnionChildIterator.java,v 1.2.4.1 2005/09/14 19:45:20 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTMIterator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java index c83f4e5ed7b..bd9257df9fa 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: UnionPathIterator.java,v 1.2.4.1 2005/09/14 19:43:25 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.Axis; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java index 2f055354618..2f20645a847 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WalkerFactory.java,v 1.2.4.1 2005/09/10 03:42:19 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java index 08502fe68d2..1d958b6a9ac 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WalkingIterator.java,v 1.2.4.2 2005/09/14 19:45:19 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIteratorSorted.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIteratorSorted.java index 1a1fe94d3b1..3d4d740bb03 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIteratorSorted.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIteratorSorted.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WalkingIteratorSorted.java,v 1.2.4.1 2005/09/14 19:45:23 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.axes; import com.sun.org.apache.xml.internal.dtm.Axis; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Compiler.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Compiler.java index fd2fbae2fe6..4d0c68f315b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Compiler.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Compiler.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Compiler.java,v 1.2.4.1 2005/09/14 19:47:10 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.compiler; import javax.xml.transform.ErrorListener; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FuncLoader.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FuncLoader.java index 683472a423a..3c780205d41 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FuncLoader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FuncLoader.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncLoader.java,v 1.1.2.1 2005/08/01 01:30:35 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.compiler; import javax.xml.transform.TransformerException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Lexer.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Lexer.java index 82c78aec437..c03eea5404f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Lexer.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Lexer.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Lexer.java,v 1.2.4.1 2005/09/10 03:55:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.compiler; import java.util.Vector; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpCodes.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpCodes.java index 1384c2a248e..3d4375cf02e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpCodes.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpCodes.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: OpCodes.java,v 1.1.2.1 2005/08/01 01:30:33 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.compiler; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMap.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMap.java index f0cfa94c20c..5b6db23621b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMap.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMap.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: OpMap.java,v 1.1.2.1 2005/08/01 01:30:31 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.compiler; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMapVector.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMapVector.java index 7cfa86ed817..f4e965136bc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMapVector.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMapVector.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2002-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: OpMapVector.java,v 1.2.4.1 2005/09/10 03:57:14 jeffsuttor Exp $ - */ package com.sun.org.apache.xpath.internal.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/PsuedoNames.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/PsuedoNames.java index e603cbfa901..d7739222fc3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/PsuedoNames.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/PsuedoNames.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: PsuedoNames.java,v 1.1.2.1 2005/08/01 01:30:33 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.compiler; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathDumper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathDumper.java index e5266cb3cb9..bb1b86ad19f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathDumper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathDumper.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPathDumper.java,v 1.1.2.1 2005/08/01 01:30:31 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.compiler; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathParser.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathParser.java index bfaa2bb0205..a1d2587e040 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathParser.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathParser.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPathParser.java,v 1.2.4.1 2005/09/14 19:46:02 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.compiler; import javax.xml.transform.ErrorListener; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncBoolean.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncBoolean.java index 628bf22c20e..7730becd23b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncBoolean.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncBoolean.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncBoolean.java,v 1.2.4.1 2005/09/14 19:53:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCeiling.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCeiling.java index 82cd45c9bdf..c8499f064cc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCeiling.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCeiling.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncCeiling.java,v 1.2.4.1 2005/09/14 19:53:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncConcat.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncConcat.java index 6f2a173a646..f6c0e5ee08b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncConcat.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncConcat.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncConcat.java,v 1.2.4.1 2005/09/14 19:53:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncContains.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncContains.java index e7ca3aa3533..5f680e92fef 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncContains.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncContains.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncContains.java,v 1.2.4.1 2005/09/14 19:53:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCount.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCount.java index b9b1326afc3..02c0af1d5c3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCount.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCount.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncCount.java,v 1.2.4.1 2005/09/14 19:53:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTMIterator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCurrent.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCurrent.java index b384549e90a..220bb0972be 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCurrent.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCurrent.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncCurrent.java,v 1.2.4.1 2005/09/14 19:53:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncDoclocation.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncDoclocation.java index 1217af76dce..0016692cd3f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncDoclocation.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncDoclocation.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncDoclocation.java,v 1.2.4.1 2005/09/14 19:53:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtElementAvailable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtElementAvailable.java index bc4585a1ef0..8feba4a57eb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtElementAvailable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtElementAvailable.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncExtElementAvailable.java,v 1.2.4.1 2005/09/14 19:58:32 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xalan.internal.templates.Constants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunction.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunction.java index 5eaa4c4df0a..29a1eaa3d4a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunction.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunction.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncExtFunction.java,v 1.2.4.2 2005/09/14 20:18:43 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import java.util.Vector; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunctionAvailable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunctionAvailable.java index f4749019a0b..83283d40f86 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunctionAvailable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunctionAvailable.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncExtFunctionAvailable.java,v 1.2.4.1 2005/09/14 20:05:08 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xalan.internal.templates.Constants; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFalse.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFalse.java index 7f1c9753d80..d0acbf3ea1c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFalse.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFalse.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncFalse.java,v 1.2.4.1 2005/09/14 20:18:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFloor.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFloor.java index 1e9c3355ca7..d71e5f6cdae 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFloor.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFloor.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncFloor.java,v 1.2.4.1 2005/09/14 20:18:42 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncGenerateId.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncGenerateId.java index c06ea8237a7..f116db3d777 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncGenerateId.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncGenerateId.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncGenerateId.java,v 1.2.4.1 2005/09/14 20:18:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncId.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncId.java index 10cfa688ecf..088183cb8c3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncId.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncId.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncId.java,v 1.2.4.1 2005/09/14 20:18:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import java.util.StringTokenizer; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLang.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLang.java index 869b08f0793..afca05ce897 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLang.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLang.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncLang.java,v 1.2.4.1 2005/09/14 20:18:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLast.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLast.java index 91728553a45..494b140e97d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLast.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLast.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncLast.java,v 1.2.4.1 2005/09/14 20:18:43 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTMIterator; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLocalPart.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLocalPart.java index b4e1a973f4b..b1b893c5252 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLocalPart.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLocalPart.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncLocalPart.java,v 1.2.4.1 2005/09/14 20:18:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNamespace.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNamespace.java index 9e85e260c25..0ea1bd795ac 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNamespace.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNamespace.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncNamespace.java,v 1.2.4.1 2005/09/14 20:18:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNormalizeSpace.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNormalizeSpace.java index 9be62594c76..17df25c0a09 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNormalizeSpace.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNormalizeSpace.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncNormalizeSpace.java,v 1.2.4.1 2005/09/14 20:18:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNot.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNot.java index 476d432e2aa..daef4208d0d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNot.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNot.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncNot.java,v 1.2.4.1 2005/09/14 20:18:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNumber.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNumber.java index 87c38085daa..c11b9e82059 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNumber.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncNumber.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncNumber.java,v 1.2.4.1 2005/09/14 20:18:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncPosition.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncPosition.java index 719cece340b..592837d242d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncPosition.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncPosition.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncPosition.java,v 1.2.4.1 2005/09/14 20:18:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncQname.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncQname.java index 834d73f298d..98477ebfb39 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncQname.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncQname.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncQname.java,v 1.2.4.1 2005/09/14 20:18:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncRound.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncRound.java index ef23eccf3c4..022c5820120 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncRound.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncRound.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncRound.java,v 1.2.4.1 2005/09/14 20:18:42 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncStartsWith.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncStartsWith.java index 43b766135a2..af4a6a02b62 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncStartsWith.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncStartsWith.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncStartsWith.java,v 1.2.4.1 2005/09/14 20:18:43 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncString.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncString.java index 75b1085947b..7fa4881a57d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncString.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncString.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncString.java,v 1.2.4.1 2005/09/14 20:18:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncStringLength.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncStringLength.java index 5d69ba3c610..cd1b2fbc862 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncStringLength.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncStringLength.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncStringLength.java,v 1.2.4.1 2005/09/14 20:18:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstring.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstring.java index 98aedf701df..7846c4a6d70 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstring.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstring.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncSubstring.java,v 1.2.4.1 2005/09/14 20:18:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstringAfter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstringAfter.java index 9ab89061331..3e31fb925ea 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstringAfter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstringAfter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncSubstringAfter.java,v 1.2.4.1 2005/09/14 20:18:43 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.utils.XMLString; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstringBefore.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstringBefore.java index dccc868cb74..2475419c638 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstringBefore.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSubstringBefore.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncSubstringBefore.java,v 1.2.4.1 2005/09/14 20:18:47 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSum.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSum.java index f1a6d1d8f34..e69b4a0346b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSum.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSum.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncSum.java,v 1.2.4.1 2005/09/14 20:18:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java index 9a3dc3a37f5..d4f0529f657 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncSystemProperty.java,v 1.2.4.2 2005/09/14 20:18:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import java.io.BufferedInputStream; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTranslate.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTranslate.java index 9878195dea1..f6143ba98f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTranslate.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTranslate.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncTranslate.java,v 1.2.4.1 2005/09/14 20:18:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTrue.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTrue.java index 9c09bc5647d..b253f364c27 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTrue.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTrue.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncTrue.java,v 1.2.4.1 2005/09/14 20:18:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncUnparsedEntityURI.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncUnparsedEntityURI.java index a2a587d3362..db0236b842c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncUnparsedEntityURI.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncUnparsedEntityURI.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FuncUnparsedEntityURI.java,v 1.2.4.1 2005/09/14 20:18:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function.java index 3aab9ef7208..2df6909b589 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Function.java,v 1.2.4.1 2005/09/14 20:18:43 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function2Args.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function2Args.java index 64f8e7fef70..bb3eb9c5c01 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function2Args.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function2Args.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Function2Args.java,v 1.2.4.1 2005/09/14 20:18:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function3Args.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function3Args.java index fd75784131b..42d5d50304e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function3Args.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function3Args.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Function3Args.java,v 1.2.4.1 2005/09/14 20:18:42 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionDef1Arg.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionDef1Arg.java index 01574fa630b..524742b353e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionDef1Arg.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionDef1Arg.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FunctionDef1Arg.java,v 1.2.4.1 2005/09/14 20:18:42 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionMultiArgs.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionMultiArgs.java index c78f3a6230f..cc8afd77fdf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionMultiArgs.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionMultiArgs.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FunctionMultiArgs.java,v 1.2.4.1 2005/09/14 20:18:43 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionOneArg.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionOneArg.java index 12debe611d0..250d5d1ff9a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionOneArg.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionOneArg.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FunctionOneArg.java,v 1.2.4.1 2005/09/14 20:18:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/WrongNumberArgsException.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/WrongNumberArgsException.java index f16347e6010..ed66312803b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/WrongNumberArgsException.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/WrongNumberArgsException.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: WrongNumberArgsException.java,v 1.2.4.1 2005/09/14 20:27:04 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.functions; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPPrefixResolver.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPPrefixResolver.java index 20c66781c1c..3eb16dbc945 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPPrefixResolver.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPPrefixResolver.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// $Id: JAXPPrefixResolver.java,v 1.1.2.1 2005/08/01 01:30:18 jeffsuttor Exp $ package com.sun.org.apache.xpath.internal.jaxp; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPVariableStack.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPVariableStack.java index 9d9f19d0cde..72824f97f1a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPVariableStack.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPVariableStack.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// $Id: JAXPVariableStack.java,v 1.1.2.1 2005/08/01 01:30:17 jeffsuttor Exp $ package com.sun.org.apache.xpath.internal.jaxp; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java index 96da574b1c3..0f111e4024c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// $Id: XPathFactoryImpl.java,v 1.2 2005/08/16 22:41:13 jeffsuttor Exp $ package com.sun.org.apache.xpath.internal.jaxp; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java index e1b424af45b..0608cf4975a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java @@ -2,13 +2,14 @@ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,7 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// $Id: XPathImpl.java,v 1.2 2005/08/16 22:41:08 jeffsuttor Exp $ package com.sun.org.apache.xpath.internal.jaxp; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/DTMXRTreeFrag.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/DTMXRTreeFrag.java index 2b321a95ebe..dcb7b3794f6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/DTMXRTreeFrag.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/DTMXRTreeFrag.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBoolean.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBoolean.java index 61caef40133..e7c60643fbc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBoolean.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBoolean.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XBoolean.java,v 1.2.4.2 2005/09/14 20:34:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBooleanStatic.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBooleanStatic.java index 7168f08e9af..699669902c1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBooleanStatic.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBooleanStatic.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XBooleanStatic.java,v 1.2.4.2 2005/09/14 20:34:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XMLStringFactoryImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XMLStringFactoryImpl.java index f475e7d68ad..af30ea023e0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XMLStringFactoryImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XMLStringFactoryImpl.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XMLStringFactoryImpl.java,v 1.2.4.1 2005/09/10 17:44:29 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import com.sun.org.apache.xml.internal.utils.FastStringBuffer; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSet.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSet.java index 07dabc343c3..2a7fe81ae48 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSet.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSet.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XNodeSet.java,v 1.2.4.2 2005/09/14 20:34:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSetForDOM.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSetForDOM.java index c7aac43657f..a3bfea65fc9 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSetForDOM.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSetForDOM.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XNodeSetForDOM.java,v 1.2.4.1 2005/09/14 20:34:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import com.sun.org.apache.xml.internal.dtm.DTMManager; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNull.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNull.java index 3b9138786ba..ae59ec23378 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNull.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNull.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XNull.java,v 1.2.4.1 2005/09/14 20:34:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNumber.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNumber.java index 5b6c6f211cc..df98cd5658d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNumber.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNumber.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XNumber.java,v 1.2.4.2 2005/09/14 20:34:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import com.sun.org.apache.xpath.internal.ExpressionOwner; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java index 80d22505087..f678d7c1e7b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XObject.java,v 1.2.4.1 2005/09/14 20:34:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import java.io.Serializable; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObjectFactory.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObjectFactory.java index bfd83034245..3e5591f2daf 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObjectFactory.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObjectFactory.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XObjectFactory.java,v 1.1.2.1 2005/08/01 01:29:30 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import com.sun.org.apache.xml.internal.dtm.Axis; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFrag.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFrag.java index af776fc2575..852aad55e07 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFrag.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFrag.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XRTreeFrag.java,v 1.2.4.1 2005/09/14 20:44:48 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFragSelectWrapper.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFragSelectWrapper.java index e618f75423d..b8da0588eba 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFragSelectWrapper.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFragSelectWrapper.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XRTreeFragSelectWrapper.java,v 1.2.4.1 2005/09/15 02:02:35 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XString.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XString.java index 0ff2b553eb4..80caacfafbe 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XString.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XString.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XString.java,v 1.2.4.1 2005/09/14 20:47:20 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import java.util.Locale; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XStringForChars.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XStringForChars.java index 4fb736374a1..d5d8bafb319 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XStringForChars.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XStringForChars.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XStringForChars.java,v 1.2.4.1 2005/09/14 20:46:27 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XStringForFSB.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XStringForFSB.java index d631064576a..16659c7d7c4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XStringForFSB.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XStringForFSB.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XStringForFSB.java,v 1.2.4.2 2005/09/14 20:46:27 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.objects; import com.sun.org.apache.xalan.internal.res.XSLMessages; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/And.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/And.java index f6fa0c854fc..aa6a8bf3587 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/And.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/And.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: And.java,v 1.2.4.1 2005/09/14 21:31:42 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Bool.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Bool.java index fc65e5a8cdf..09b26576fde 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Bool.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Bool.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Bool.java,v 1.2.4.1 2005/09/14 21:31:43 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Div.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Div.java index aa68598cd21..fe1ca3e6359 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Div.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Div.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Div.java,v 1.2.4.1 2005/09/14 21:31:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Equals.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Equals.java index d8acef6939e..a868498a17e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Equals.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Equals.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Equals.java,v 1.2.4.1 2005/09/14 21:31:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Gt.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Gt.java index b458d164cf0..d315d6ff09f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Gt.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Gt.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Gt.java,v 1.2.4.1 2005/09/14 21:31:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.objects.XBoolean; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Gte.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Gte.java index 0f7b063a250..52d59af7add 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Gte.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Gte.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Gte.java,v 1.2.4.1 2005/09/14 21:31:42 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.objects.XBoolean; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Lt.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Lt.java index fb287649ee6..91b299aba5b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Lt.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Lt.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Lt.java,v 1.2.4.1 2005/09/14 21:31:41 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.objects.XBoolean; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Lte.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Lte.java index dd278e11611..5852591396f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Lte.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Lte.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Lte.java,v 1.2.4.1 2005/09/14 21:31:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.objects.XBoolean; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Minus.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Minus.java index db404cd56a3..2790e24d799 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Minus.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Minus.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Minus.java,v 1.2.4.1 2005/09/14 21:31:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Mod.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Mod.java index f3a5d8b30ec..9cad5ac6c78 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Mod.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Mod.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Mod.java,v 1.2.4.1 2005/09/14 21:31:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Mult.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Mult.java index b9e4c2bdded..374ba864543 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Mult.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Mult.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Mult.java,v 1.2.4.1 2005/09/14 21:31:46 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Neg.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Neg.java index df4c06ea9ac..cb0ccb03b8a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Neg.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Neg.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Neg.java,v 1.2.4.1 2005/09/14 21:31:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/NotEquals.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/NotEquals.java index 1880803d017..cbf2337b38d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/NotEquals.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/NotEquals.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NotEquals.java,v 1.2.4.1 2005/09/14 21:31:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.objects.XBoolean; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Number.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Number.java index 244a1dbca5b..7f536fb561b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Number.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Number.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Number.java,v 1.2.4.1 2005/09/14 21:31:42 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Operation.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Operation.java index 84bdd32a34f..dafbb91d52d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Operation.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Operation.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Operation.java,v 1.2.4.1 2005/09/14 21:31:42 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.Expression; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Or.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Or.java index 26e5b8245ba..bfdbbb42208 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Or.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Or.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Or.java,v 1.2.4.1 2005/09/14 21:31:41 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Plus.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Plus.java index e5b9853d945..708d280fa84 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Plus.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Plus.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Plus.java,v 1.2.4.1 2005/09/14 21:31:43 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Quo.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Quo.java index db6b8825bed..785143ca028 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Quo.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Quo.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Quo.java,v 1.2.4.2 2005/09/14 21:31:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.objects.XNumber; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/String.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/String.java index 03714be854a..4c71f501ea8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/String.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/String.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: String.java,v 1.2.4.1 2005/09/14 21:31:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.objects.XObject; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/UnaryOperation.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/UnaryOperation.java index fd066a306a9..02ebc6215ef 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/UnaryOperation.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/UnaryOperation.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: UnaryOperation.java,v 1.2.4.1 2005/09/14 21:31:44 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.Expression; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Variable.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Variable.java index 78554b73813..094ad3a8c1f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Variable.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Variable.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: Variable.java,v 1.2.4.1 2005/09/14 21:24:33 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import javax.xml.transform.TransformerException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/VariableSafeAbsRef.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/VariableSafeAbsRef.java index d85978dd0b6..3a9171c17aa 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/VariableSafeAbsRef.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/VariableSafeAbsRef.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: VariableSafeAbsRef.java,v 1.2.4.1 2005/09/14 21:31:45 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xml.internal.dtm.DTMManager; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/ContextMatchStepPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/ContextMatchStepPattern.java index f57f722d1fc..19976d1c3a5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/ContextMatchStepPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/ContextMatchStepPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: ContextMatchStepPattern.java,v 1.2.4.2 2005/09/15 00:21:15 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.patterns; import com.sun.org.apache.xml.internal.dtm.Axis; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/FunctionPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/FunctionPattern.java index 3d02023e3d7..7f4bced382b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/FunctionPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/FunctionPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: FunctionPattern.java,v 1.2.4.2 2005/09/15 00:21:15 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.patterns; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTest.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTest.java index 5bb95fbf557..a44c532e987 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTest.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTest.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeTest.java,v 1.2.4.2 2005/09/15 00:21:14 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.patterns; import com.sun.org.apache.xml.internal.dtm.DTM; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTestFilter.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTestFilter.java index c532937ec40..5cb56d558a1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTestFilter.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTestFilter.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: NodeTestFilter.java,v 1.1.2.1 2005/08/01 01:30:30 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.patterns; /** diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/StepPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/StepPattern.java index ce4b3af293a..38943a43957 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/StepPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/StepPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: StepPattern.java,v 1.2.4.2 2005/09/15 00:21:16 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.patterns; import com.sun.org.apache.xml.internal.dtm.Axis; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/UnionPattern.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/UnionPattern.java index 0199156f498..4b04ceed2d8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/UnionPattern.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/UnionPattern.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: UnionPattern.java,v 1.2.4.1 2005/09/15 00:21:15 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.patterns; import com.sun.org.apache.xpath.internal.Expression; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java index 0c084ecaf2d..5fca3457283 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java index d5221305e48..db9a3fdbc2e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_en.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_en.java index 33f24bda449..52bdedd4d70 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_en.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_en.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPATHErrorResources_en.java,v 1.1.2.1 2005/08/01 01:29:50 jeffsuttor Exp $ - */ + package com.sun.org.apache.xpath.internal.res; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java index fd72d0fd837..b59ad0b1198 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java index ec738603e07..bd704ccd73f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java index ad4df661a69..dc09b940276 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java index fc35ad604a2..79a4d301cb1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java index 6e6097dfb36..7489d353f74 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; @@ -856,7 +858,7 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = "{0}\uC5D0\uC11C URL\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, { WG_EXPAND_ENTITIES_NOT_SUPPORTED, - "DTM \uAD6C\uBB38 \uBD84\uC11D\uAE30\uC5D0 \uB300\uD574\uC11C\uB294 -E \uC635\uC158\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, + "DTM \uAD6C\uBB38\uBD84\uC11D\uAE30\uC5D0 \uB300\uD574\uC11C\uB294 -E \uC635\uC158\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, { WG_ILLEGAL_VARIABLE_REFERENCE, "\uBCC0\uC218\uC5D0 \uB300\uD574 \uC81C\uACF5\uB41C VariableReference\uAC00 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C \uBC97\uC5B4\uB098\uAC70\uB098 \uC815\uC758\uB97C \uD3EC\uD568\uD558\uC9C0 \uC5C6\uC2B5\uB2C8\uB2E4! \uC774\uB984 = {0}"}, @@ -884,9 +886,9 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = { "optionMatch", " [-match \uC77C\uCE58 \uD328\uD134(\uC77C\uCE58 \uC9C4\uB2E8\uC758 \uACBD\uC6B0)]"}, { "optionAnyExpr", "\uB610\uB294 XPath \uD45C\uD604\uC2DD\uC774 \uC9C4\uB2E8 \uB364\uD504\uB97C \uC218\uD589\uD569\uB2C8\uB2E4."}, { "noParsermsg1", "XSL \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - { "noParsermsg2", "** \uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"}, + { "noParsermsg2", "** \uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"}, { "noParsermsg3", "\uD074\uB798\uC2A4 \uACBD\uB85C\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624."}, - { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, + { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, { "noParsermsg5", "IBM AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, { "gtone", ">1" }, { "zero", "0" }, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java index 259d5a92de3..3b5c79c4d81 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java index 880336d0b28..d78fb2c4093 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java index 6cdaea4f9b2..29e45603345 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java index 531eb0250ba..de1464500c7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.sun.org.apache.xpath.internal.res; import java.util.ListResourceBundle; diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHMessages.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHMessages.java index 1d0fe6ff49c..cdc4268d47e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHMessages.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHMessages.java @@ -3,13 +3,14 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +18,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * $Id: XPATHMessages.java,v 1.2.4.1 2005/09/01 14:57:34 pvedula Exp $ - */ + package com.sun.org.apache.xpath.internal.res; import com.sun.org.apache.bcel.internal.util.SecuritySupport; diff --git a/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/Entity.java b/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/Entity.java index a11218436a9..69508b50384 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/Entity.java +++ b/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/Entity.java @@ -1,13 +1,13 @@ /* * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. */ - /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -18,6 +18,7 @@ * limitations under the License. */ + package com.sun.xml.internal.stream; import java.io.InputStream; diff --git a/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLEntityReader.java b/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLEntityReader.java index 521c0098b41..9d7d671b8ca 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLEntityReader.java +++ b/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLEntityReader.java @@ -1,13 +1,13 @@ /* * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. */ - /* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -18,6 +18,7 @@ * limitations under the License. */ + package com.sun.xml.internal.stream; import java.io.IOException; diff --git a/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/dtd/nonvalidating/XMLSimpleType.java b/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/dtd/nonvalidating/XMLSimpleType.java index 31ae534390e..6d0763ef3a4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/dtd/nonvalidating/XMLSimpleType.java +++ b/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/dtd/nonvalidating/XMLSimpleType.java @@ -1,32 +1,21 @@ /* * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC. */ - /* - * Copyright 2005 The Apache Software Foundation. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.sun.xml.internal.stream.dtd.nonvalidating; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogFeatures.java b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogFeatures.java index 01d0b533055..5fca3130cf6 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogFeatures.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogFeatures.java @@ -34,9 +34,9 @@ import jdk.xml.internal.SecuritySupport; * The CatalogFeatures holds a collection of features and properties. *

    * - *

    Catalog Features

    * - *
    + *
    + * * * * @@ -44,7 +44,7 @@ import jdk.xml.internal.SecuritySupport; * * * - * + * * * * @@ -55,7 +55,7 @@ import jdk.xml.internal.SecuritySupport; * * * - * + * * @@ -71,7 +71,7 @@ import jdk.xml.internal.SecuritySupport; * * * - * + * * * @@ -89,7 +89,7 @@ import jdk.xml.internal.SecuritySupport; * * * - * + * * @@ -107,7 +107,7 @@ import jdk.xml.internal.SecuritySupport; * * * - * + * * * @@ -241,9 +241,10 @@ import jdk.xml.internal.SecuritySupport; * supports a resolver. The following table lists all such processes. * *

    - *

    Processes with Catalog Support

    + *

    Processes with Catalog Support

    * - *
    Catalog Features
    FeatureProperty NameSystem Property [1]jaxp.properties [1]Value [2]Value [2]Action
    FILESFILESA semicolon-delimited list of URIs to locate the catalog files. * The URIs must be absolute and have a URL protocol handler for the URI scheme. *
    PREFERPREFERIndicates the preference between the public and system * identifiers. The default value is public [3].javax.xml.catalog.prefer
    DEFERDEFERIndicates that the alternative catalogs including those * specified in delegate entries or nextCatalog are not read until they are * needed. The default value is true.
    RESOLVERESOLVEDetermines the action if there is no matching entry found after * all of the specified catalogs are exhausted. The default is strict.javax.xml.catalog.resolve [4]
    + *
    + * * * * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java index cbf77e5c9c0..db0f2b7f1f8 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java @@ -88,6 +88,7 @@ class CatalogImpl extends GroupEntry implements Catalog { /** * Construct a Catalog with specified URI. * + * @param f the features object * @param uris the uri(s) to one or more catalogs * @throws CatalogException If an error happens while parsing the specified * catalog file. @@ -100,6 +101,7 @@ class CatalogImpl extends GroupEntry implements Catalog { * Construct a Catalog with specified URI. * * @param parent The parent catalog + * @param f the features object * @param uris the uri(s) to one or more catalogs * @throws CatalogException If an error happens while parsing the specified * catalog file. @@ -137,7 +139,7 @@ class CatalogImpl extends GroupEntry implements Catalog { for (String temp : catalogFile) { uri = URI.create(temp); start++; - if (verifyCatalogFile(uri)) { + if (verifyCatalogFile(null, uri)) { systemId = temp; try { baseURI = new URL(systemId); @@ -169,12 +171,14 @@ class CatalogImpl extends GroupEntry implements Catalog { parse(systemId); } + setCatalog(this); + //save this catalog before loading the next loadedCatalogs.put(systemId, this); //Load delegate and alternative catalogs if defer is false. if (!isDeferred()) { - loadDelegateCatalogs(); + loadDelegateCatalogs(this); loadNextCatalogs(); } } @@ -365,14 +369,16 @@ class CatalogImpl extends GroupEntry implements Catalog { //Check those specified in nextCatalogs if (nextCatalogs != null) { while (c == null && nextCatalogIndex < nextCatalogs.size()) { - c = getCatalog(nextCatalogs.get(nextCatalogIndex++).getCatalogURI()); + c = getCatalog(catalog, + nextCatalogs.get(nextCatalogIndex++).getCatalogURI()); } } //Check the input list if (c == null && inputFiles != null) { while (c == null && inputFilesIndex < inputFiles.size()) { - c = getCatalog(URI.create(inputFiles.get(inputFilesIndex++))); + c = getCatalog(null, + URI.create(inputFiles.get(inputFilesIndex++))); } } @@ -408,14 +414,14 @@ class CatalogImpl extends GroupEntry implements Catalog { //loads catalogs specified in nextCatalogs if (nextCatalogs != null) { nextCatalogs.stream().forEach((next) -> { - getCatalog(next.getCatalogURI()); + getCatalog(this, next.getCatalogURI()); }); } //loads catalogs from the input list if (inputFiles != null) { inputFiles.stream().forEach((uri) -> { - getCatalog(URI.create(uri)); + getCatalog(null, URI.create(uri)); }); } } @@ -423,17 +429,19 @@ class CatalogImpl extends GroupEntry implements Catalog { /** * Returns a Catalog object by the specified path. * - * @param path the path to a catalog + * @param parent the parent catalog for the alternative catalogs to be loaded. + * It will be null if the ones to be loaded are from the input list. + * @param uri the path to a catalog * @return a Catalog object */ - Catalog getCatalog(URI uri) { + Catalog getCatalog(CatalogImpl parent, URI uri) { if (uri == null) { return null; } CatalogImpl c = null; - if (verifyCatalogFile(uri)) { + if (verifyCatalogFile(parent, uri)) { c = getLoadedCatalog(uri.toASCIIString()); if (c == null) { c = new CatalogImpl(this, features, uri); @@ -459,6 +467,6 @@ class CatalogImpl extends GroupEntry implements Catalog { * @return a count of all loaded catalogs */ int loadedCatalogCount() { - return loadedCatalogs.size() + delegateCatalogs.size(); + return loadedCatalogs.size(); } } diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages.properties index a1133ca9da5..cd6b2d3f909 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,25 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = The error message corresponding to the message key can not be found. -FormatFailed = An internal error occurred while formatting the following message:\n +# General errors +BadMessageKey = JAXP09000001: The error message corresponding to the message key can not be found. +FormatFailed = JAXP09000002: An internal error occurred while formatting the following message:\n +OtherError = JAXP09000003: Unexpected error. -#invalid catalog file -InvalidCatalog = The document element of a catalog must be catalog. -InvalidEntryType = The entry type ''{0}'' is not valid. -CircularReference = Circular reference is not allowed: ''{0}''. +# Implementation restriction +CircularReference = JAXP09010001: Circular reference is not allowed: ''{0}''. + +# Input or configuration errors +InvalidCatalog = JAXP09020001: The document element of a catalog must be catalog. +InvalidEntryType = JAXP09020002: The entry type ''{0}'' is not valid. +UriNotAbsolute = JAXP09020003: The specified URI ''{0}'' is not absolute. +UriNotValidUrl = JAXP09020004: The specified URI ''{0}'' is not a valid URL. +InvalidArgument = JAXP09020005: The specified argument ''{0}'' (case sensitive) for ''{1}'' is not valid. +NullArgument = JAXP09020006: The argument ''{0}'' can not be null. +InvalidPath = JAXP09020007: The path ''{0}'' is invalid. + + +# Parsing errors +ParserConf = JAXP09030001: Unexpected error while configuring a SAX parser. +ParsingFailed = JAXP09030002: Failed to parse the catalog file. +NoCatalogFound = JAXP09030003: No Catalog is specified. + + +# Resolving errors +NoMatchFound = JAXP09040001: No match found for publicId ''{0}'' and systemId ''{1}''. +NoMatchURIFound = JAXP09040002: No match found for href ''{0}'' and base ''{1}''. +FailedCreatingURI = JAXP09040003: Can not construct URI using href ''{0}'' and base ''{1}''. -#errors -UriNotAbsolute = The specified URI ''{0}'' is not absolute. -UriNotValidUrl = The specified URI ''{0}'' is not a valid URL. -InvalidArgument = The specified argument ''{0}'' (case sensitive) for ''{1}'' is not valid. -NullArgument = The argument ''{0}'' can not be null. -InvalidPath = The path ''{0}'' is invalid. -ParserConf = Unexpected error while configuring a SAX parser. -ParsingFailed = Failed to parse the catalog file. -NoCatalogFound = No Catalog is specified. -NoMatchFound = No match found for publicId ''{0}'' and systemId ''{1}''. -NoMatchURIFound = No match found for href ''{0}'' and base ''{1}''. -FailedCreatingURI = Can not construct URI using href ''{0}'' and base ''{1}''. -OtherError = Unexpected error. \ No newline at end of file diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_de.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_de.properties index dc5e23ea133..8cd117e3489 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_de.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,23 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. -FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n +# General errors +BadMessageKey = JAXP09000001: Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. +FormatFailed = JAXP09000002: Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n +OtherError = JAXP09000003: Unerwarteter Fehler. -#invalid catalog file -InvalidCatalog = Das Dokumentelement eines Katalogs muss ein Katalog sein. -InvalidEntryType = Der Eintragstyp "{0}" ist ung\u00FCltig. -CircularReference = Zirkelbezug ist nicht zul\u00E4ssig: "{0}". +# Implementation restriction +CircularReference = JAXP09010001: Zirkelbezug ist nicht zul\u00E4ssig: "{0}". + +# Input or configuration errors +InvalidCatalog = JAXP09020001: Das Dokumentelement eines Katalogs muss ein Katalog sein. +InvalidEntryType = JAXP09020002: Der Eintragstyp "{0}" ist nicht g\u00FCltig. +UriNotAbsolute = JAXP09020003: Die angegebene URI "{0}" ist nicht absolut. +UriNotValidUrl = JAXP09020004: Die angegebene URI "{0}" ist keine g\u00FCltige URL. +InvalidArgument = JAXP09020005: Das angegebene Argument "{0}" (unter Beachtung der Gro\u00DF-/Kleinschreibung) f\u00FCr "{1}" ist nicht g\u00FCltig. +NullArgument = JAXP09020006: Das Argument "{0}" darf nicht null sein. +InvalidPath = JAXP09020007: Der Pfad "{0}" ist ung\u00FCltig. + + +# Parsing errors +ParserConf = JAXP09030001: Unerwarteter Fehler bei der Konfiguration eines SAX-Parsers. +ParsingFailed = JAXP09030002: Die Katalogdatei konnte nicht geparst werden. +NoCatalogFound = JAXP09030003: Kein Katalog angegeben. + + +# Resolving errors +NoMatchFound = JAXP09040001: Keine \u00DCbereinstimmung f\u00FCr publicId "{0}" und systemId "{1}" gefunden. +NoMatchURIFound = JAXP09040002: Keine \u00DCbereinstimmung f\u00FCr href "{0}" und base "{1}" gefunden. +FailedCreatingURI = JAXP09040003: URI kann nicht mit href "{0}" und base "{1}" erstellt werden. -#errors -InvalidArgument = Das angegebene Argument "{0}" (unter Beachtung der Gro\u00DF-/Kleinschreibung) f\u00FCr "{1}" ist nicht g\u00FCltig. -NullArgument = Das Argument "{0}" darf nicht null sein. -InvalidPath = Der Pfad "{0}" ist ung\u00FCltig. -ParserConf = Unerwarteter Fehler bei der Konfiguration eines SAX-Parsers. -ParsingFailed = Die Katalogdatei konnte nicht geparst werden. -NoCatalogFound = Kein Katalog angegeben. -NoMatchFound = Keine \u00DCbereinstimmung f\u00FCr publicId "{0}" und systemId "{1}" gefunden. -NoMatchURIFound = Keine \u00DCbereinstimmung f\u00FCr href "{0}" und base "{1}" gefunden. -FailedCreatingURI = URI kann nicht mit href "{0}" und base "{1}" erstellt werden. -OtherError = Unerwarteter Fehler. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties index fa364803cf0..cd535d6aa6c 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,23 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = No se ha encontrado el mensaje de error que corresponde a la clave de mensaje. -FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n +# General errors +BadMessageKey = JAXP09000001: No se ha encontrado el mensaje de error que corresponde a la clave de mensaje. +FormatFailed = JAXP09000002: Se ha producido un error interno al formatear el siguiente mensaje:\n +OtherError = JAXP09000003: Error inesperado. -#invalid catalog file -InvalidCatalog = El elemento de documento de un cat\u00E1logo debe ser un cat\u00E1logo. -InvalidEntryType = El tipo de entrada ''{0}'' no es v\u00E1lido. -CircularReference = No est\u00E1 permitida la referencia circular: ''{0}''. +# Implementation restriction +CircularReference = JAXP09010001: No est\u00E1 permitida la referencia circular: ''{0}''. + +# Input or configuration errors +InvalidCatalog = JAXP09020001: El elemento de documento de un cat\u00E1logo debe ser un cat\u00E1logo. +InvalidEntryType = JAXP09020002: El tipo de entrada ''{0}'' no es v\u00E1lido. +UriNotAbsolute = JAXP09020003: El URI especificado ''{0}'' no es absoluto. +UriNotValidUrl = JAXP09020004: El URI especificado ''{0}'' no es una URL v\u00E1lida. +InvalidArgument = JAXP09020005: El argumento especificado ''{0}'' (sensible a may\u00FAsculas y min\u00FAsculas) para ''{1}'' no es v\u00E1lido. +NullArgument = JAXP09020006: El argumento ''{0}'' no puede ser nulo. +InvalidPath = JAXP09020007: La ruta ''{0}'' no es v\u00E1lida. + + +# Parsing errors +ParserConf = JAXP09030001: Error inesperado al configurar el analizador SAX. +ParsingFailed = JAXP09030002: Fallo al analizar el archivo de cat\u00E1logo. +NoCatalogFound = JAXP09030003: No se ha especificado ning\u00FAn cat\u00E1logo. + + +# Resolving errors +NoMatchFound = JAXP09040001: No se ha encontrado ninguna coincidencia para publicId ''{0}'' y systemId ''{1}''. +NoMatchURIFound = JAXP09040002: No se ha encontrado ninguna coincidencia para href ''{0}'' y base ''{1}''. +FailedCreatingURI = JAXP09040003: No se puede crear el URI con href ''{0}'' y base ''{1}''. -#errors -InvalidArgument = El argumento especificado ''{0}'' (sensible a may\u00FAsculas y min\u00FAsculas) para ''{1}'' no es v\u00E1lido. -NullArgument = El argumento ''{0}'' no puede ser nulo. -InvalidPath = La ruta ''{0}'' no es v\u00E1lida. -ParserConf = Error inesperado al configurar el analizador SAX. -ParsingFailed = Fallo al analizar el archivo de cat\u00E1logo. -NoCatalogFound = No se ha especificado ning\u00FAn cat\u00E1logo. -NoMatchFound = No se ha encontrado ninguna coincidencia para publicId ''{0}'' y systemId ''{1}''. -NoMatchURIFound = No se ha encontrado ninguna coincidencia para href ''{0}'' y base ''{1}''. -FailedCreatingURI = No se puede crear el URI con href ''{0}'' y base ''{1}''. -OtherError = Error inesperado. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties index 3cddf0ddc67..ceb50f651d5 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,23 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. -FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n +# General errors +BadMessageKey = JAXP09000001 : Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. +FormatFailed = JAXP09000002 : Une erreur interne est survenue lors du formatage du message suivant :\n +OtherError = JAXP09000003 : Erreur inattendue. -#invalid catalog file -InvalidCatalog = L'\u00E9l\u00E9ment de document d'un catalogue doit \u00EAtre un catalogue. -InvalidEntryType = Le type d''entr\u00E9e ''{0}'' n''est pas valide. -CircularReference = La r\u00E9f\u00E9rence circulaire n''est pas autoris\u00E9e : ''{0}''. +# Implementation restriction +CircularReference = JAXP09010001 : La r\u00E9f\u00E9rence circulaire n''est pas autoris\u00E9e : ''{0}''. + +# Input or configuration errors +InvalidCatalog = JAXP09020001 : L'\u00E9l\u00E9ment de document d'un catalogue doit \u00EAtre un catalogue. +InvalidEntryType = JAXP09020002 : Le type d''entr\u00E9e ''{0}'' n''est pas valide. +UriNotAbsolute = JAXP09020003 : L''URI indiqu\u00E9 ''{0}'' n''est pas absolu. +UriNotValidUrl = JAXP09020004 : L''URI indiqu\u00E9 ''{0}'' n''est pas une URL valide. +InvalidArgument = JAXP09020005 : L''argument indiqu\u00E9 ''{0}'' (respect maj./min.) pour ''{1}'' n''est pas valide. +NullArgument = JAXP09020006 : L''argument ''{0}'' ne peut pas \u00EAtre NULL. +InvalidPath = JAXP09020007 : Le chemin ''{0}'' n''est pas valide. + + +# Parsing errors +ParserConf = JAXP09030001 : Erreur inattendue lors de la configuration d'un analyseur SAX. +ParsingFailed = JAXP09030002 : Echec de l'analyse du fichier de catalogue. +NoCatalogFound = JAXP09030003 : Aucun catalogue n'est indiqu\u00E9. + + +# Resolving errors +NoMatchFound = JAXP09040001 : Aucune correspondance trouv\u00E9e pour publicId ''{0}'' et systemId ''{1}''. +NoMatchURIFound = JAXP09040002 : Aucune correspondance trouv\u00E9e pour l''\u00E9l\u00E9ment href ''{0}'' et la base ''{1}''. +FailedCreatingURI = JAXP09040003 : Impossible de construire l''URI \u00E0 l''aide de l''\u00E9l\u00E9ment href ''{0}'' et de la base ''{1}''. -#errors -InvalidArgument = L''argument indiqu\u00E9 ''{0}'' (respect maj./min.) pour ''{1}'' n''est pas valide. -NullArgument = L''argument ''{0}'' ne peut pas \u00EAtre NULL. -InvalidPath = Le chemin ''{0}'' n''est pas valide. -ParserConf = Erreur inattendue lors de la configuration d'un analyseur SAX. -ParsingFailed = Echec de l'analyse du fichier de catalogue. -NoCatalogFound = Aucun catalogue n'est indiqu\u00E9. -NoMatchFound = Aucune correspondance trouv\u00E9e pour publicId ''{0}'' et systemId ''{1}''. -NoMatchURIFound = Aucune correspondance trouv\u00E9e pour l''\u00E9l\u00E9ment href ''{0}'' et la base ''{1}''. -FailedCreatingURI = Impossible de construire l''URI \u00E0 l''aide de l''\u00E9l\u00E9ment href ''{0}'' et de la base ''{1}''. -OtherError = Erreur inattendue. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties index 05bb803d2bc..b6417ba07a7 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,23 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. -FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n +# General errors +BadMessageKey = JAXP09000001: impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. +FormatFailed = JAXP09000002: si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n +OtherError = JAXP09000003: errore imprevisto. -#invalid catalog file -InvalidCatalog = L'elemento documento di un catalogo deve essere un catalogo. -InvalidEntryType = Il tipo di voce ''{0}'' non \u00E8 valido. -CircularReference = La dipendenza circolare non \u00E8 consentita: ''{0}''. +# Implementation restriction +CircularReference = JAXP09010001: il riferimento circolare non \u00E8 consentito: ''{0}''. + +# Input or configuration errors +InvalidCatalog = JAXP09020001: l'elemento documento di un catalogo deve essere un catalogo. +InvalidEntryType = JAXP09020002: il tipo di voce ''{0}'' non \u00E8 valido. +UriNotAbsolute = JAXP09020003: l''URI specificato ''{0}'' non \u00E8 assoluto. +UriNotValidUrl = JAXP09020004: l''URI specificato ''{0}'' non \u00E8 valido. +InvalidArgument = JAXP09020005: l''argomento specificato ''{0}'' (con distinzione tra maiuscole e minuscole) per ''{1}'' non \u00E8 valido. +NullArgument = JAXP09020006: l''argomento ''{0}'' non pu\u00F2 essere nullo. +InvalidPath = JAXP09020007: il percorso ''{0}'' non \u00E8 valido. + + +# Parsing errors +ParserConf = JAXP09030001: errore imprevisto durante la configurazione di un parser SAX. +ParsingFailed = JAXP09030002: analisi del file catalogo non riuscita. +NoCatalogFound = JAXP09030003: nessun catalogo specificato. + + +# Resolving errors +NoMatchFound = JAXP09040001: nessuna corrispondenza trovata per publicId ''{0}'' e systemId ''{1}''. +NoMatchURIFound = JAXP09040002: nessuna corrispondenza trovata per href ''{0}'' e base ''{1}''. +FailedCreatingURI = JAXP09040003: impossibile creare l''URI utilizzando href ''{0}'' e base ''{1}''. -#errors -InvalidArgument = L''argomento specificato ''{0}'' (con distinzione tra maiuscole e minuscole) per ''{1}'' non \u00E8 valido. -NullArgument = L''argomento ''{0}'' non pu\u00F2 essere nullo. -InvalidPath = Il percorso ''{0}'' non \u00E8 valido. -ParserConf = Errore imprevisto durante la configurazione di un parser SAX. -ParsingFailed = Analisi del file catalogo non riuscita. -NoCatalogFound = Nessun catalogo specificato. -NoMatchFound = Nessuna corrispondenza trovata per publicId ''{0}'' e systemId ''{1}''. -NoMatchURIFound = Nessuna corrispondenza trovata per href ''{0}'' e base ''{1}''. -FailedCreatingURI = Impossibile creare l''URI utilizzando href ''{0}'' e base ''{1}''. -OtherError = Errore imprevisto. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties index d58bc2283c9..f806d287ea6 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,23 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 -FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n +# General errors +BadMessageKey = JAXP09000001: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 +FormatFailed = JAXP09000002: \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n +OtherError = JAXP09000003: \u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 -#invalid catalog file -InvalidCatalog = \u30AB\u30BF\u30ED\u30B0\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u8981\u7D20\u306Fcatalog\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 -InvalidEntryType = \u30A8\u30F3\u30C8\u30EA\u30FB\u30BF\u30A4\u30D7''{0}''\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 -CircularReference = \u5FAA\u74B0\u53C2\u7167\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: ''{0}''\u3002 +# Implementation restriction +CircularReference = JAXP09010001: \u5FAA\u74B0\u53C2\u7167\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: ''{0}''\u3002 + +# Input or configuration errors +InvalidCatalog = JAXP09020001: \u30AB\u30BF\u30ED\u30B0\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u8981\u7D20\u306Fcatalog\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +InvalidEntryType = JAXP09020002: \u30A8\u30F3\u30C8\u30EA\u30FB\u30BF\u30A4\u30D7''{0}''\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 +UriNotAbsolute = JAXP09020003: \u6307\u5B9A\u3055\u308C\u305FURI ''{0}''\u304C\u7D76\u5BFEURI\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 +UriNotValidUrl = JAXP09020004: \u6307\u5B9A\u3057\u305FURI ''{0}''\u306F\u6709\u52B9\u306AURL\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 +InvalidArgument = JAXP09020005: ''{1}''\u306B\u6307\u5B9A\u3055\u308C\u305F\u5F15\u6570''{0}'' (\u5927/\u5C0F\u6587\u5B57\u3092\u533A\u5225)\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 +NullArgument = JAXP09020006: \u5F15\u6570''{0}''\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002 +InvalidPath = JAXP09020007: \u30D1\u30B9''{0}''\u306F\u7121\u52B9\u3067\u3059\u3002 + + +# Parsing errors +ParserConf = JAXP09030001: SAX\u30D1\u30FC\u30B5\u30FC\u306E\u69CB\u6210\u4E2D\u306B\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 +ParsingFailed = JAXP09030002: \u30AB\u30BF\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +NoCatalogFound = JAXP09030003: \u30AB\u30BF\u30ED\u30B0\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 + + +# Resolving errors +NoMatchFound = JAXP09040001: publicId ''{0}''\u304A\u3088\u3073systemId ''{1}''\u306B\u4E00\u81F4\u3059\u308B\u3082\u306E\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 +NoMatchURIFound = JAXP09040002: href ''{0}''\u304A\u3088\u3073base ''{1}''\u306B\u4E00\u81F4\u3059\u308B\u3082\u306E\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 +FailedCreatingURI = JAXP09040003: href ''{0}''\u304A\u3088\u3073base ''{1}''\u3092\u4F7F\u7528\u3057\u3066URI\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002 -#errors -InvalidArgument = ''{1}''\u306B\u6307\u5B9A\u3055\u308C\u305F\u5F15\u6570''{0}'' (\u5927/\u5C0F\u6587\u5B57\u3092\u533A\u5225)\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 -NullArgument = \u5F15\u6570''{0}''\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002 -InvalidPath = \u30D1\u30B9''{0}''\u306F\u7121\u52B9\u3067\u3059\u3002 -ParserConf = SAX\u30D1\u30FC\u30B5\u30FC\u306E\u69CB\u6210\u4E2D\u306B\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 -ParsingFailed = \u30AB\u30BF\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 -NoCatalogFound = \u30AB\u30BF\u30ED\u30B0\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 -NoMatchFound = publicId ''{0}''\u304A\u3088\u3073systemId ''{1}''\u306B\u4E00\u81F4\u3059\u308B\u3082\u306E\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 -NoMatchURIFound = href ''{0}''\u304A\u3088\u3073base ''{1}''\u306B\u4E00\u81F4\u3059\u308B\u3082\u306E\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 -FailedCreatingURI = href ''{0}''\u304A\u3088\u3073base ''{1}''\u3092\u4F7F\u7528\u3057\u3066URI\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002 -OtherError = \u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties index 03334135cc4..c3645fb8791 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,23 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. -FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n +# General errors +BadMessageKey = JAXP09000001: \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +FormatFailed = JAXP09000002: \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n +OtherError = JAXP09000003: \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uC785\uB2C8\uB2E4. -#invalid catalog file -InvalidCatalog = \uCE74\uD0C8\uB85C\uADF8\uC758 \uBB38\uC11C \uC694\uC18C\uB294 \uCE74\uD0C8\uB85C\uADF8\uC5EC\uC57C \uD569\uB2C8\uB2E4. -InvalidEntryType = \uD56D\uBAA9 \uC720\uD615 ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. -CircularReference = \uC21C\uD658 \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC74C: ''{0}''. +# Implementation restriction +CircularReference = JAXP09010001: \uC21C\uD658 \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC74C: ''{0}''. + +# Input or configuration errors +InvalidCatalog = JAXP09020001: Catalog\uC758 \uBB38\uC11C \uC694\uC18C\uB294 \uCE74\uD0C8\uB85C\uADF8\uC5EC\uC57C \uD569\uB2C8\uB2E4. +InvalidEntryType = JAXP09020002: \uD56D\uBAA9 \uC720\uD615 ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. +UriNotAbsolute = JAXP09020003: \uC9C0\uC815\uB41C URI ''{0}''\uC774(\uAC00) \uC808\uB300 \uACBD\uB85C\uAC00 \uC544\uB2D9\uB2C8\uB2E4. +UriNotValidUrl = JAXP09020004: \uC9C0\uC815\uB41C URI ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD55C URL\uC785\uB2C8\uB2E4. +InvalidArgument = JAXP09020005: ''{1}''\uC5D0 \uB300\uD574 \uC9C0\uC815\uB41C \uC778\uC218 ''{0}''(\uB300\uC18C\uBB38\uC790 \uAD6C\uBD84)\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. +NullArgument = JAXP09020006: ''{0}'' \uC778\uC218\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +InvalidPath = JAXP09020007: ''{0}'' \uACBD\uB85C\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. + + +# Parsing errors +ParserConf = JAXP09030001: SAX \uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uAD6C\uC131\uD558\uB294 \uC911 \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. +ParsingFailed = JAXP09030002: Catalog \uD30C\uC77C\uC758 \uAD6C\uBB38\uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +NoCatalogFound = JAXP09030003: \uC9C0\uC815\uB41C catalog\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. + + +# Resolving errors +NoMatchFound = JAXP09040001: publicId ''{0}'', systemId ''{1}''\uC5D0 \uB300\uD55C \uC77C\uCE58 \uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +NoMatchURIFound = JAXP09040002: href ''{0}'', base ''{1}''\uC5D0 \uB300\uD55C \uC77C\uCE58 \uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +FailedCreatingURI = JAXP09040003: href ''{0}'', base ''{1}''\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC URI\uB97C \uAD6C\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. -#errors -InvalidArgument = ''{1}''\uC5D0 \uB300\uD574 \uC9C0\uC815\uB41C \uC778\uC218 ''{0}''(\uB300\uC18C\uBB38\uC790 \uAD6C\uBD84)\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. -NullArgument = ''{0}'' \uC778\uC218\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. -InvalidPath = ''{0}'' \uACBD\uB85C\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. -ParserConf = SAX \uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uAD6C\uC131\uD558\uB294 \uC911 \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. -ParsingFailed = \uCE74\uD0C8\uB85C\uADF8 \uD30C\uC77C\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. -NoCatalogFound = \uC9C0\uC815\uB41C \uCE74\uD0C8\uB85C\uADF8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. -NoMatchFound = publicId ''{0}'', systemId ''{1}''\uC5D0 \uB300\uD55C \uC77C\uCE58 \uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. -NoMatchURIFound = href ''{0}'', base ''{1}''\uC5D0 \uB300\uD55C \uC77C\uCE58 \uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. -FailedCreatingURI = href ''{0}'', base ''{1}''\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC URI\uB97C \uAD6C\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. -OtherError = \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uC785\uB2C8\uB2E4. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties index 18434b91fea..d87155085ce 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,23 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. -FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n +# General errors +BadMessageKey = JAXP09000001: N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. +FormatFailed = JAXP09000002: Ocorreu um erro interno ao formatar a mensagem a seguir:\n +OtherError = JAXP09000003: Erro inesperado. -#invalid catalog file -InvalidCatalog = O elemento de documento de um cat\u00E1logo deve ser o cat\u00E1logo. -InvalidEntryType = O tipo de entrada "{0}" n\u00E3o \u00E9 v\u00E1lido. -CircularReference = A refer\u00EAncia circular n\u00E3o \u00E9 permitida: ''{0}''. +# Implementation restriction +CircularReference = JAXP09010001: A refer\u00EAncia circular n\u00E3o \u00E9 permitida: ''{0}''. + +# Input or configuration errors +InvalidCatalog = JAXP09020001: O elemento de documento de um cat\u00E1logo deve ser o cat\u00E1logo. +InvalidEntryType = JAXP09020002: O tipo de entrada "{0}" n\u00E3o \u00E9 v\u00E1lido. +UriNotAbsolute = JAXP09020003: O URI especificado ''{0}'' n\u00E3o \u00E9 absoluto. +UriNotValidUrl = JAXP09020004: O URI especificado ''{0}'' n\u00E3o \u00E9 um URL v\u00E1lido. +InvalidArgument = JAXP09020005: O argumento especificado ''{0}'' (distingue mai\u00FAsculas de min\u00FAsculas) para ''{1}'' n\u00E3o \u00E9 v\u00E1lido. +NullArgument = JAXP09020006: O argumento ''{0}'' n\u00E3o pode ser nulo. +InvalidPath = JAXP09020007: O caminho ''{0}'' \u00E9 inv\u00E1lido. + + +# Parsing errors +ParserConf = JAXP09030001: Erro inesperado ao configurar um parser SAX. +ParsingFailed = JAXP09030002: Falha ao fazer parsing do arquivo de cat\u00E1logo. +NoCatalogFound = JAXP09030003: Nenhum Cat\u00E1logo foi especificado. + + +# Resolving errors +NoMatchFound = JAXP09040001: Nenhuma correspond\u00EAncia foi encontrada para publicId ''{0}'' e systemId ''{1}''. +NoMatchURIFound = JAXP09040002: Nenhuma correspond\u00EAncia foi encontrada para href ''{0}'' e base ''{1}''. +FailedCreatingURI = JAXP09040003: N\u00E3o \u00E9 poss\u00EDvel construir o URI usando href ''{0}'' e base ''{1}''. -#errors -InvalidArgument = O argumento especificado ''{0}'' (distingue mai\u00FAsculas de min\u00FAsculas) para ''{1}'' n\u00E3o \u00E9 v\u00E1lido. -NullArgument = O argumento ''{0}'' n\u00E3o pode ser nulo. -InvalidPath = O caminho ''{0}'' \u00E9 inv\u00E1lido. -ParserConf = Erro inesperado ao configurar um parser SAX. -ParsingFailed = Falha ao fazer parsing do arquivo de cat\u00E1logo. -NoCatalogFound = Nenhum arquivo do Cat\u00E1logo foi especificado. -NoMatchFound = Nenhuma correspond\u00EAncia foi encontrada para publicId ''{0}'' e systemId ''{1}''. -NoMatchURIFound = Nenhuma correspond\u00EAncia foi encontrada para href ''{0}'' e base ''{1}''. -FailedCreatingURI = N\u00E3o \u00E9 poss\u00EDvel construir o URI usando href ''{0}'' e base ''{1}''. -OtherError = Erro inesperado. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties index 6f52f5e5125..afd29faa1ee 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,23 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. -FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n +# General errors +BadMessageKey = JAXP09000001: Det felmeddelande som motsvarar meddelandenyckeln kan inte hittas. +FormatFailed = JAXP09000002: Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n +OtherError = JAXP09000003: Ov\u00E4ntat fel. -#invalid catalog file -InvalidCatalog = Dokumentelementet f\u00F6r en katalog m\u00E5ste vara "catalog". -InvalidEntryType = Posttypen ''{0}'' \u00E4r inte giltig. -CircularReference = Cirkul\u00E4r referens \u00E4r inte till\u00E5ten: ''{0}''. +# Implementation restriction +CircularReference = JAXP09010001: Cirkul\u00E4r referens \u00E4r inte till\u00E5ten: ''{0}''. + +# Input or configuration errors +InvalidCatalog = JAXP09020001: Dokumentelementet f\u00F6r en katalog m\u00E5ste vara "catalog". +InvalidEntryType = JAXP09020002: Posttypen ''{0}'' \u00E4r inte giltig. +UriNotAbsolute = JAXP09020003: Den angivna URI:n, ''{0}'', \u00E4r inte absolut. +UriNotValidUrl = JAXP09020004: Den angivna URI:n, ''{0}'', \u00E4r inte en giltig URL. +InvalidArgument = JAXP09020005: Det angivna argumentet, ''{0}'' (skiftl\u00E4gesk\u00E4nsligt), f\u00F6r ''{1}'' \u00E4r inte giltigt. +NullArgument = JAXP09020006: Argumentet ''{0}'' kan inte vara null. +InvalidPath = JAXP09020007: S\u00F6kv\u00E4gen ''{0}'' \u00E4r ogiltig. + + +# Parsing errors +ParserConf = JAXP09030001: Ov\u00E4ntat fel vid konfiguration av en SAX-parser. +ParsingFailed = JAXP09030002: Kunde inte tolka katalogfilen. +NoCatalogFound = JAXP09030003: Ingen katalog har angetts. + + +# Resolving errors +NoMatchFound = JAXP09040001: Ingen matchning hittades f\u00F6r publicId = ''{0}'' och systemId = ''{1}''. +NoMatchURIFound = JAXP09040002: Ingen matchning hittades f\u00F6r href = ''{0}'' och bas = ''{1}''. +FailedCreatingURI = JAXP09040003: Kan inte skapa URI med href = ''{0}'' och bas = ''{1}''. -#errors -InvalidArgument = Det angivna argumentet, ''{0}'' (skiftl\u00E4gesk\u00E4nsligt), f\u00F6r ''{1}'' \u00E4r inte giltigt. -NullArgument = Argumentet ''{0}'' kan inte vara null. -InvalidPath = S\u00F6kv\u00E4gen ''{0}'' \u00E4r ogiltig. -ParserConf = Ov\u00E4ntat fel vid konfiguration av en SAX-parser. -ParsingFailed = Kunde inte tolka katalogfilen. -NoCatalogFound = Ingen katalog har angetts. -NoMatchFound = Ingen matchning hittades f\u00F6r publicId = ''{0}'' och systemId = ''{1}''. -NoMatchURIFound = Ingen matchning hittades f\u00F6r href = ''{0}'' och bas = ''{1}''. -FailedCreatingURI = Kan inte skapa URI med href = ''{0}'' och bas = ''{1}''. -OtherError = Ov\u00E4ntat fel. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_CN.properties index c91492239d0..09b9122d4ba 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_CN.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,23 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 -FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n +# General errors +BadMessageKey = JAXP09000001: \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 +FormatFailed = JAXP09000002: \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n +OtherError = JAXP09000003: \u610F\u5916\u9519\u8BEF\u3002 -#invalid catalog file -InvalidCatalog = \u76EE\u5F55\u7684\u6587\u6863\u5143\u7D20\u5FC5\u987B\u662F\u76EE\u5F55\u3002 -InvalidEntryType = \u6761\u76EE\u7C7B\u578B ''{0}'' \u65E0\u6548\u3002 -CircularReference = \u4E0D\u5141\u8BB8\u5FAA\u73AF\u5F15\u7528: ''{0}''\u3002 +# Implementation restriction +CircularReference = JAXP09010001: \u4E0D\u5141\u8BB8\u5FAA\u73AF\u5F15\u7528: ''{0}''\u3002 + +# Input or configuration errors +InvalidCatalog = JAXP09020001: catalog \u7684\u6587\u6863\u5143\u7D20\u5FC5\u987B\u662F catalog\u3002 +InvalidEntryType = JAXP09020002: \u6761\u76EE\u7C7B\u578B ''{0}'' \u65E0\u6548\u3002 +UriNotAbsolute = JAXP09020003: \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u7EDD\u5BF9\u7684\u3002 +UriNotValidUrl = JAXP09020004: \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u6709\u6548\u7684 URL\u3002 +InvalidArgument = JAXP09020005: \u4E3A ''{1}'' \u6307\u5B9A\u7684\u53C2\u6570 ''{0}'' (\u533A\u5206\u5927\u5C0F\u5199) \u65E0\u6548\u3002 +NullArgument = JAXP09020006: \u53C2\u6570 ''{0}'' \u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002 +InvalidPath = JAXP09020007: \u8DEF\u5F84 ''{0}'' \u65E0\u6548\u3002 + + +# Parsing errors +ParserConf = JAXP09030001: \u914D\u7F6E SAX \u89E3\u6790\u5668\u65F6\u51FA\u73B0\u610F\u5916\u9519\u8BEF\u3002 +ParsingFailed = JAXP09030002: \u65E0\u6CD5\u5BF9 catalog \u6587\u4EF6\u8FDB\u884C\u89E3\u6790\u3002 +NoCatalogFound = JAXP09030003: \u672A\u6307\u5B9A catalog\u3002 + + +# Resolving errors +NoMatchFound = JAXP09040001: \u5BF9\u4E8E publicId ''{0}'' \u548C systemId ''{1}'', \u672A\u627E\u5230\u5339\u914D\u9879\u3002 +NoMatchURIFound = JAXP09040002: \u5BF9\u4E8E href ''{0}'' \u548C base ''{1}'', \u672A\u627E\u5230\u5339\u914D\u9879\u3002 +FailedCreatingURI = JAXP09040003: \u65E0\u6CD5\u4F7F\u7528 href ''{0}'' \u548C base ''{1}'' \u6784\u9020 URI\u3002 -#errors -InvalidArgument = \u4E3A ''{1}'' \u6307\u5B9A\u7684\u53C2\u6570 ''{0}'' (\u533A\u5206\u5927\u5C0F\u5199) \u65E0\u6548\u3002 -NullArgument = \u53C2\u6570 ''{0}'' \u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002 -InvalidPath = \u8DEF\u5F84 ''{0}'' \u65E0\u6548\u3002 -ParserConf = \u914D\u7F6E SAX \u89E3\u6790\u5668\u65F6\u51FA\u73B0\u610F\u5916\u9519\u8BEF\u3002 -ParsingFailed = \u65E0\u6CD5\u5BF9\u76EE\u5F55\u6587\u4EF6\u8FDB\u884C\u89E3\u6790\u3002 -NoCatalogFound = \u672A\u6307\u5B9A\u76EE\u5F55\u3002 -NoMatchFound = \u5BF9\u4E8E publicId ''{0}'' \u548C systemId ''{1}'', \u672A\u627E\u5230\u5339\u914D\u9879\u3002 -NoMatchURIFound = \u5BF9\u4E8E href ''{0}'' \u548C base ''{1}'', \u672A\u627E\u5230\u5339\u914D\u9879\u3002 -FailedCreatingURI = \u65E0\u6CD5\u4F7F\u7528 href ''{0}'' \u548C base ''{1}'' \u6784\u9020 URI\u3002 -OtherError = \u610F\u5916\u9519\u8BEF\u3002 diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties index 49ea45d1c70..8181d04b3d6 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties @@ -1,4 +1,4 @@ -# 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 @@ -21,23 +21,32 @@ # or visit www.oracle.com if you need additional information or have any # questions. -# Messages for message reporting -BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 -FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n +# General errors +BadMessageKey = JAXP09000001: \u627E\u4E0D\u5230\u76F8\u5C0D\u61C9\u65BC\u6B64\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 +FormatFailed = JAXP09000002: \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n +OtherError = JAXP09000003: \u672A\u9810\u671F\u7684\u932F\u8AA4\u3002 -#invalid catalog file -InvalidCatalog = \u76EE\u9304\u7684\u6587\u4EF6\u5143\u7D20\u5FC5\u9808\u662F\u76EE\u9304\u3002 -InvalidEntryType = \u9805\u76EE\u985E\u578B ''{0}'' \u7121\u6548\u3002 -CircularReference = \u4E0D\u5141\u8A31\u5FAA\u74B0\u53C3\u7167: ''{0}''\u3002 +# Implementation restriction +CircularReference = JAXP09010001: \u4E0D\u5141\u8A31\u5FAA\u74B0\u53C3\u7167: ''{0}''\u3002 + +# Input or configuration errors +InvalidCatalog = JAXP09020001: Catalog \u7684\u6587\u4EF6\u5143\u7D20\u5FC5\u9808\u662F Catalog\u3002 +InvalidEntryType = JAXP09020002: \u9805\u76EE\u985E\u578B ''{0}'' \u7121\u6548\u3002 +UriNotAbsolute = JAXP09020003: \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u7D55\u5C0D\u8DEF\u5F91\u3002 +UriNotValidUrl = JAXP09020004: \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u6709\u6548\u7684 URL\u3002 +InvalidArgument = JAXP09020005: \u70BA ''{1}'' \u6307\u5B9A\u7684\u5F15\u6578 ''{0}'' (\u6709\u5927\u5C0F\u5BEB\u4E4B\u5206) \u7121\u6548\u3002 +NullArgument = JAXP09020006: \u5F15\u6578''{0}'' \u4E0D\u53EF\u70BA\u7A7A\u503C\u3002 +InvalidPath = JAXP09020007: \u8DEF\u5F91 ''{0}'' \u7121\u6548\u3002 + + +# Parsing errors +ParserConf = JAXP09030001: \u8A2D\u5B9A SAX \u5256\u6790\u5668\u6642\u767C\u751F\u672A\u9810\u671F\u7684\u932F\u8AA4\u3002 +ParsingFailed = JAXP09030002: \u7121\u6CD5\u5256\u6790 Catalog \u6A94\u6848\u3002 +NoCatalogFound = JAXP09030003: \u672A\u6307\u5B9A Catalog\u3002 + + +# Resolving errors +NoMatchFound = JAXP09040001: \u627E\u4E0D\u5230\u7B26\u5408 publicId ''{0}'' \u548C systemId ''{1}'' \u7684\u9805\u76EE\u3002 +NoMatchURIFound = JAXP09040002: \u627E\u4E0D\u5230\u7B26\u5408 href ''{0}'' \u548C\u57FA\u790E ''{1}'' \u7684\u9805\u76EE\u3002 +FailedCreatingURI = JAXP09040003: \u7121\u6CD5\u4F7F\u7528 href ''{0}'' \u548C\u57FA\u790E ''{1}'' \u5EFA\u69CB URI\u3002 -#errors -InvalidArgument = ''{1}'' \u7684\u6307\u5B9A\u5F15\u6578 ''{0}'' (\u6709\u5927\u5C0F\u5BEB\u4E4B\u5206) \u7121\u6548\u3002 -NullArgument = \u5F15\u6578''{0}'' \u4E0D\u53EF\u70BA\u7A7A\u503C\u3002 -InvalidPath = \u8DEF\u5F91 ''{0}'' \u7121\u6548\u3002 -ParserConf = \u8A2D\u5B9A SAX \u5256\u6790\u5668\u6642\u767C\u751F\u672A\u9810\u671F\u7684\u932F\u8AA4\u3002 -ParsingFailed = \u7121\u6CD5\u5256\u6790\u76EE\u9304\u6A94\u6848\u3002 -NoCatalogFound = \u672A\u6307\u5B9A\u4EFB\u4F55\u76EE\u9304\u3002 -NoMatchFound = \u627E\u4E0D\u5230\u76F8\u7B26\u7684 publicId ''{0}'' \u548C systemId ''{1}''\u3002 -NoMatchURIFound = \u627E\u4E0D\u5230\u76F8\u7B26\u7684 href ''{0}'' \u548C\u57FA\u790E ''{1}''\u3002 -FailedCreatingURI = \u7121\u6CD5\u4F7F\u7528 href ''{0}'' \u548C\u57FA\u790E ''{1}'' \u5EFA\u69CB URI\u3002 -OtherError = \u672A\u9810\u671F\u7684\u932F\u8AA4\u3002 diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java b/jaxp/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java index b0dd80c733f..3f52a7bd8f6 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java @@ -135,7 +135,8 @@ class GroupEntry extends BaseEntry { /** * Constructs a GroupEntry * - * @param type The type of the entry + * @param type the type of the entry + * @param parent the parent Catalog */ public GroupEntry(CatalogEntryType type, CatalogImpl parent) { super(type); @@ -165,9 +166,9 @@ class GroupEntry extends BaseEntry { } /** * Constructs a group entry. - * @param catalog The catalog this GroupEntry belongs - * @param base The baseURI attribute - * @param attributes The attributes + * @param catalog the catalog this GroupEntry belongs to + * @param base the baseURI attribute + * @param attributes the attributes */ public GroupEntry(CatalogImpl catalog, String base, String... attributes) { super(CatalogEntryType.GROUP, base); @@ -175,6 +176,15 @@ class GroupEntry extends BaseEntry { this.catalog = catalog; } + /** + * Sets the catalog for this GroupEntry. + * + * @param catalog the catalog this GroupEntry belongs to + */ + void setCatalog(CatalogImpl catalog) { + this.catalog = catalog; + } + /** * Adds an entry. * @@ -382,10 +392,9 @@ class GroupEntry extends BaseEntry { /** * Matches delegatePublic or delegateSystem against the specified id * - * @param isSystem The flag to indicate whether the delegate is system or - * public - * @param id The system or public id to be matched - * @return The URI string if a mapping is found, or null otherwise. + * @param type the type of the Catalog entry + * @param id the system or public id to be matched + * @return the URI string if a mapping is found, or null otherwise. */ private String matchDelegate(CatalogEntryType type, String id) { String match = null; @@ -412,7 +421,7 @@ class GroupEntry extends BaseEntry { //Check delegate Catalogs if (catalogId != null) { - Catalog delegateCatalog = loadCatalog(catalogId); + Catalog delegateCatalog = loadDelegateCatalog(catalog, catalogId); if (delegateCatalog != null) { if (type == CatalogEntryType.DELEGATESYSTEM) { @@ -430,30 +439,34 @@ class GroupEntry extends BaseEntry { /** * Loads all delegate catalogs. + * + * @param parent the parent catalog of the delegate catalogs */ - void loadDelegateCatalogs() { + void loadDelegateCatalogs(CatalogImpl parent) { entries.stream() .filter((entry) -> (entry.type == CatalogEntryType.DELEGATESYSTEM || entry.type == CatalogEntryType.DELEGATEPUBLIC || entry.type == CatalogEntryType.DELEGATEURI)) .map((entry) -> (AltCatalog)entry) .forEach((altCatalog) -> { - loadCatalog(altCatalog.getCatalogURI()); + loadDelegateCatalog(parent, altCatalog.getCatalogURI()); }); } /** * Loads a delegate catalog by the catalogId specified. - * @param catalogId the catalog Id + * + * @param parent the parent catalog of the delegate catalog + * @param catalogURI the URI to the catalog */ - Catalog loadCatalog(URI catalogURI) { + Catalog loadDelegateCatalog(CatalogImpl parent, URI catalogURI) { CatalogImpl delegateCatalog = null; if (catalogURI != null) { String catalogId = catalogURI.toASCIIString(); - delegateCatalog = getLoadedCatalog(catalogId); - if (delegateCatalog == null) { - if (verifyCatalogFile(catalogURI)) { - delegateCatalog = new CatalogImpl(catalog, features, catalogURI); + if (verifyCatalogFile(parent, catalogURI)) { + delegateCatalog = getLoadedCatalog(catalogId); + if (delegateCatalog == null) { + delegateCatalog = new CatalogImpl(parent, features, catalogURI); delegateCatalog.load(); delegateCatalogs.put(catalogId, delegateCatalog); } @@ -473,7 +486,7 @@ class GroupEntry extends BaseEntry { CatalogImpl getLoadedCatalog(String catalogId) { CatalogImpl c = null; - //checl delegate Catalogs + //check delegate Catalogs c = delegateCatalogs.get(catalogId); if (c == null) { //check other loaded Catalogs @@ -492,11 +505,12 @@ class GroupEntry extends BaseEntry { * Verifies that the catalog represented by the catalogId has not been * searched or is not circularly referenced. * - * @param catalogId The URI to a catalog + * @param parent the parent of the catalog to be loaded + * @param catalogURI the URI to the catalog * @throws CatalogException if circular reference is found. * @return true if the catalogId passed verification, false otherwise */ - final boolean verifyCatalogFile(URI catalogURI) { + final boolean verifyCatalogFile(CatalogImpl parent, URI catalogURI) { if (catalogURI == null) { return false; } @@ -508,7 +522,7 @@ class GroupEntry extends BaseEntry { } String catalogId = catalogURI.toASCIIString(); - if (catalogsSearched.contains(catalogId) || isCircular(catalogId)) { + if (catalogsSearched.contains(catalogId) || isCircular(parent, catalogId)) { CatalogMessages.reportRunTimeError(CatalogMessages.ERR_CIRCULAR_REFERENCE, new Object[]{CatalogMessages.sanitize(catalogId)}); } @@ -518,10 +532,13 @@ class GroupEntry extends BaseEntry { /** * Checks whether the catalog is circularly referenced + * + * @param parent the parent of the catalog to be loaded * @param systemId the system identifier of the catalog to be loaded * @return true if is circular, false otherwise */ - boolean isCircular(String systemId) { + boolean isCircular(CatalogImpl parent, String systemId) { + // first, check the parent of the catalog to be loaded if (parent == null) { return false; } @@ -530,6 +547,7 @@ class GroupEntry extends BaseEntry { return true; } - return parent.isCircular(systemId); + // next, check parent's parent + return parent.isCircular(parent.parent, systemId); } } diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/catalog/package-info.java new file mode 100644 index 00000000000..b727bca77ef --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/package-info.java @@ -0,0 +1,71 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * + * Provides the classes for implementing + * + * XML Catalogs OASIS Standard V1.1, 7 October 2005. + * + *

    + * The Catalog API defines a standard solution for resolving external resources + * referenced by XML documents. It is fully supported by the XML Processors + * allowing application developers to configure a catalog through an XML processor + * or system property or the jaxp.properties file to take advantage of the feature. + *

    + * The XML Catalog API defines the following interfaces: + *

      + *
    • {@link Catalog} -- The {@link Catalog} interface represents an entity + * catalog as defined by the Catalog standard. A {@link Catalog} object + * is immutable. Once created, it can be used to find matches in a + * {@code system}, {@code public} or {@code uri} entry. + * A custom resolver implementation may find it useful for locating local + * resources through a catalog. + *
    • + *
    • {@link CatalogFeatures} -- The {@link CatalogFeatures} class holds all + * of the features and properties the Catalog API supports, including + * {@code javax.xml.catalog.files}, {@code javax.xml.catalog.defer}, + * {@code javax.xml.catalog.prefer}, and {@code javax.xml.catalog.resolve}. + *
    • + *
    • {@link CatalogManager} -- The {@link CatalogManager} class manages the + * creation of XML catalogs and catalog resolvers. + *
    • + *
    • {@link CatalogResolver} -- The {@link CatalogResolver} class is a + * {@code Catalog} resolver that implements {@link org.xml.sax.EntityResolver}, + * {@link javax.xml.stream.XMLResolver}, {@link org.w3c.dom.ls.LSResourceResolver}, + * and {@link javax.xml.transform.URIResolver}, and resolves external + * references using catalogs. + *
    • + *
    + *

    + * Unless otherwise noted, passing a null argument to + * a constructor or method in any class or interface in this package will + * cause a {@code NullPointerException} to be thrown. + * + * @since 9 + * + */ + +package javax.xml.catalog; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/package.html b/jaxp/src/java.xml/share/classes/javax/xml/catalog/package.html deleted file mode 100644 index 8e6e42836bf..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/package.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - Provides the classes for implementing - - XML Catalogs OASIS Standard V1.1, 7 October 2005. - -

    - Unless otherwise noted, passing a null argument to - a constructor or method in any class or interface in this package will - cause a NullPointerException to be thrown. -

    - -@since 9 - - - diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java index a53f93df2ee..ebd600eb196 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -774,15 +774,11 @@ public abstract class DatatypeFactory { /** * Create an {@code XMLGregorianCalendar} from a {@link GregorianCalendar}. * - *
    Processes with Catalog Support
    Process
    + *
    + * * * - * - * - * * * * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java b/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java index 90f016edfed..1caf4508a48 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -120,26 +120,22 @@ public abstract class Duration { * maps to. Type is computed based on fields that are set, * i.e. {@link #isSet(DatatypeConstants.Field field)} == {@code true}. * - *
    Field by Field Conversion from + * {@link GregorianCalendar} to an {@link XMLGregorianCalendar}
    - * Field by Field Conversion from - * {@link GregorianCalendar} to an {@link XMLGregorianCalendar} - *
    {@code java.util.GregorianCalendar} field{@code javax.xml.datatype.XMLGregorianCalendar} field
    + *
    + * * * - * + * + * + * + * + * + * + * * * * * - * - * - * - * - * - * - * - * - * * * * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java b/jaxp/src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java index 82ea2e17329..cc25c17a3e4 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -53,25 +53,21 @@ import java.util.GregorianCalendar; * W3C XML Schema 1.0 Part 2, Appendix D, * ISO 8601 Date and Time Formats. * - * - *
    Required fields for XML Schema 1.0 Date/Time Datatypes.
    + * (timezone is optional for all date/time datatypes)
    - * Required fields for XML Schema 1.0 Date/Time Datatypes.
    - * (timezone is optional for all date/time datatypes) - *
    Datatypeyearmonthdayhourminutesecond
    Datatypeyearmonthdayhourminutesecond
    {@link DatatypeConstants#DURATION}XX
    + * + *
    + * * * - * - * - * - * - * * * * * + * + * * - * + * * @@ -89,12 +85,12 @@ import java.util.GregorianCalendar; * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * - * + * * *
    Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation
    - * Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation - *
    XML Schema 1.0
    * datatype
    * field
    Related
    XMLGregorianCalendar
    Accessor(s)
    Value Range
    yearyear {@link #getYear()} + {@link #getEon()} or
    * {@link #getEonAndYear} *
    monthmonth {@link #getMonth()} 1 to 12 or {@link DatatypeConstants#FIELD_UNDEFINED}
    dayday {@link #getDay()} Independent of month, max range is 1 to 31 or {@link DatatypeConstants#FIELD_UNDEFINED}.
    * The normative value constraint stated relative to month @@ -102,7 +98,7 @@ import java.util.GregorianCalendar; *
    hourhour{@link #getHour()} * 0 to 23 or {@link DatatypeConstants#FIELD_UNDEFINED}. @@ -114,12 +110,12 @@ import java.util.GregorianCalendar; *
    minuteminute {@link #getMinute()} 0 to 59 or {@link DatatypeConstants#FIELD_UNDEFINED}
    secondsecond * {@link #getSecond()} + {@link #getMillisecond()}/1000 or
    * {@link #getSecond()} + {@link #getFractionalSecond()} @@ -135,7 +131,7 @@ import java.util.GregorianCalendar; *
    timezonetimezone {@link #getTimezone()} Number of minutes or {@link DatatypeConstants#FIELD_UNDEFINED}. * Value range from -14 hours (-14 * 60 minutes) to 14 hours (14 * 60 minutes). @@ -748,26 +744,22 @@ public abstract class XMLGregorianCalendar * Return the name of the XML Schema date/time type that this instance * maps to. Type is computed based on fields that are set. * - * + *
    + * * * - * + * + * + * + * + * + * + * * * * * - * - * - * - * - * - * - * - * - * * * * @@ -911,21 +903,17 @@ public abstract class XMLGregorianCalendar * instance, see * {@link #toGregorianCalendar(TimeZone, Locale, XMLGregorianCalendar)}. * - *
    Required fields for XML Schema 1.0 Date/Time Datatypes.
    + * (timezone is optional for all date/time datatypes)
    - * Required fields for XML Schema 1.0 Date/Time Datatypes.
    - * (timezone is optional for all date/time datatypes) - *
    Datatypeyearmonthdayhourminutesecond
    Datatypeyearmonthdayhourminutesecond
    {@link DatatypeConstants#DATETIME}XX
    + *
    + * * * - * + * + * * * * * - * - * - * - * * * * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/datatype/package-info.java new file mode 100644 index 00000000000..9f943d7f653 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/package-info.java @@ -0,0 +1,172 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * + *

    + * Defines XML/Java Type Mappings. + * + *

    + * This API provides XML/Java type mappings. + * + *

    + * The following XML standards apply: + * + *

    + * + *
    + * + *
    Field by Field Conversion from this class to + * {@code java.util.GregorianCalendar}
    - * Field by Field Conversion from this class to - * {@code java.util.GregorianCalendar} - * {@code java.util.GregorianCalendar} field{@code javax.xml.datatype.XMLGregorianCalendar} field
    {@code java.util.GregorianCalendar} field{@code javax.xml.datatype.XMLGregorianCalendar} field
    {@code ERA}{@link #getEonAndYear()}{@code .signum() < 0 ? GregorianCalendar.BC : GregorianCalendar.AD}
    + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    W3C XML Schema/Java Type Mappings
    W3C XML Schema Data TypeJava Data Type
    xs:date{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:dateTime{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:duration{@link javax.xml.datatype.Duration}
    xs:gDay{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:gMonth {@link javax.xml.datatype.XMLGregorianCalendar}
    xs:gMonthDay{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:gYear{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:gYearMonth{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:time{@link javax.xml.datatype.XMLGregorianCalendar}
    + * + *
    + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    XQuery and XPath/Java Type Mappings
    XQuery 1.0 and XPath 2.0 Data ModelJava Data Type
    xdt:dayTimeDuration{@link javax.xml.datatype.Duration}
    xdt:yearMonthDuration{@link javax.xml.datatype.Duration}
    + * + *
    + * + *

    + * W3C XML Schema data types that have a "natural" mapping to Java types are defined by + * JSR 31: Java™ Architecture for XML Binding (JAXB) Specification, Binding XML Schema to Java Representations. + * JAXB defined mappings for XML Schema built-in data types include: + * + *

      + *
    • xs:anySimpleType
    • + *
    • xs:base64Binary
    • + *
    • xs:boolean
    • + *
    • xs:byte
    • + *
    • xs:decimal
    • + *
    • xs:double
    • + *
    • xs:float
    • + *
    • xs:hexBinary
    • + *
    • xs:int
    • + *
    • xs:integer
    • + *
    • xs:long
    • + *
    • xs:QName
    • + *
    • xs:short
    • + *
    • xs:string
    • + *
    • xs:unsignedByte
    • + *
    • xs:unsignedInt
    • + *
    • xs:unsignedShort
    • + *
    + * + *
    + * + * + * + *
    + * @since 1.5 + */ + +package javax.xml.datatype; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/package.html b/jaxp/src/java.xml/share/classes/javax/xml/datatype/package.html deleted file mode 100644 index de065acc664..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/package.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - javax.xml.xpath - - - - - - - - - - -

    XML/Java Type Mappings.

    - -

    javax.xml.datatypeAPI provides XML/Java type mappings.

    - -

    The following XML standards apply:

    - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    W3C XML Schema Data TypeJava Data Type
    xs:date{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:dateTime{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:duration{@link javax.xml.datatype.Duration}
    xs:gDay{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:gMonth {@link javax.xml.datatype.XMLGregorianCalendar}
    xs:gMonthDay{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:gYear{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:gYearMonth{@link javax.xml.datatype.XMLGregorianCalendar}
    xs:time{@link javax.xml.datatype.XMLGregorianCalendar}
    - -
    - - - - - - - - - - - - - - - - - - - - -
    XQuery 1.0 and XPath 2.0 Data ModelJava Data Type
    xdt:dayTimeDuration{@link javax.xml.datatype.Duration}
    xdt:yearMonthDuration{@link javax.xml.datatype.Duration}
    - -
    - -

    - W3C XML Schema data types that have a "natural" mapping to Java types are defined by - JSR 31: Java™ Architecture for XML Binding (JAXB) Specification, Binding XML Schema to Java Representations. - JAXB defined mappings for XML Schema built-in data types include: -

    -
      -
    • xs:anySimpleType
    • -
    • xs:base64Binary
    • -
    • xs:boolean
    • -
    • xs:byte
    • -
    • xs:decimal
    • -
    • xs:double
    • -
    • xs:float
    • -
    • xs:hexBinary
    • -
    • xs:int
    • -
    • xs:integer
    • -
    • xs:long
    • -
    • xs:QName
    • -
    • xs:short
    • -
    • xs:string
    • -
    • xs:unsignedByte
    • -
    • xs:unsignedInt
    • -
    • xs:unsignedShort
    • -
    - -
    - - - - -
    - - - - diff --git a/jaxp/src/java.xml/share/classes/javax/xml/namespace/NamespaceContext.java b/jaxp/src/java.xml/share/classes/javax/xml/namespace/NamespaceContext.java index 09e46e7dfbf..1ad999acb14 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/namespace/NamespaceContext.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/namespace/NamespaceContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -88,17 +88,12 @@ public interface NamespaceContext { * table describes the returned Namespace URI value for all * possible prefix values: * - * + *
    + * * * - * - * - * - * - * + * + * * * * @@ -158,15 +153,10 @@ public interface NamespaceContext { * table describes the returned prefix value for all Namespace URI * values: * - *
    Return value for specified prefixes
    - * {@code getNamespaceURI(prefix)} - * return value for specified prefixes - *
    prefix parameterNamespace URI return valueprefix parameterNamespace URI return value
    + *
    + * * * - * - * - * * * * @@ -230,14 +220,10 @@ public interface NamespaceContext { * table describes the returned prefixes value for all Namespace * URI values: * - *
    Return value for specified Namespace URIs
    - * {@code getPrefix(namespaceURI)} return value for - * specified Namespace URIs - *
    Namespace URI parameterprefix value returned
    + *
    + * * * - * - * - * * * * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/namespace/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/namespace/package-info.java new file mode 100644 index 00000000000..bc34407349e --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/namespace/package-info.java @@ -0,0 +1,49 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * + *

    + * Defines XML Namespace processing. + * + *

    + * The following XML standards apply: + * + *

    + * + * @since 1.5 + */ + +package javax.xml.namespace; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/namespace/package.html b/jaxp/src/java.xml/share/classes/javax/xml/namespace/package.html deleted file mode 100644 index b5b02ede5be..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/namespace/package.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - javax.xml.namespace - - - - - - - -

    XML Namespace processing.

    - -

    The following XML standards apply:

    - - - - diff --git a/jaxp/src/java.xml/share/classes/javax/xml/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/package-info.java new file mode 100644 index 00000000000..b267667bb79 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/package-info.java @@ -0,0 +1,34 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * + * Defines constants for XML processing. + * + * @since 1.5 + * + */ + +package javax.xml; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/parsers/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/parsers/package-info.java new file mode 100644 index 00000000000..251b97d7595 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/package-info.java @@ -0,0 +1,36 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + *

    + * Provides the classes for processing XML documents with a SAX (Simple API for XML) + * parser or a DOM (Document Object Model) Document builder. The JAXP Plugability + * layer allows an application programmer to specify an implementation and + * configure where to locate it. + * + * @since 1.4 + */ + +package javax.xml.parsers; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/parsers/package.html b/jaxp/src/java.xml/share/classes/javax/xml/parsers/package.html deleted file mode 100644 index 52092114cd4..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/package.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - javax.xml.parsers - - - - - -

    - Provides classes allowing the processing of XML documents. Two types - of plugable parsers are supported: -

    -
      -
    • SAX (Simple API for XML)
    • -
    • DOM (Document Object Model)
    • -
    - - diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java index 2496e208705..c5b05ffe8ff 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -270,7 +270,7 @@ class FactoryFinder { "Failed to read factoryId '" + factoryId + "'", se); } - // Try read $java.home/lib/stax.properties followed by + // Try read $java.home/conf/stax.properties followed by // $java.home/conf/jaxp.properties if former not present String configFile = null; try { @@ -278,7 +278,7 @@ class FactoryFinder { synchronized (cacheProps) { if (firstTime) { configFile = ss.getSystemProperty("java.home") + File.separator + - "lib" + File.separator + "stax.properties"; + "conf" + File.separator + "stax.properties"; final File fStax = new File(configFile); firstTime = false; if (ss.doesFileExist(fStax)) { diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java index 9428a2ef0c4..82389cba0d2 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java @@ -155,7 +155,7 @@ public abstract class XMLEventFactory { * #newFactory(java.lang.String, java.lang.ClassLoader)} * method defines no changes in behavior. */ - @Deprecated(since="7") + @Deprecated(since="1.7") public static XMLEventFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError { diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventWriter.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventWriter.java index e94feaec309..0df399bb5d0 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventWriter.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -64,21 +64,17 @@ public interface XMLEventWriter extends XMLEventConsumer { * Add an event to the output stream * Adding a START_ELEMENT will open a new namespace scope that * will be closed when the corresponding END_ELEMENT is written. - *
    Return value for specified Namespace URIs
    {@code - * getPrefixes(namespaceURI)} return value for - * specified Namespace URIs
    Namespace URI parameterprefixes value returned
    + *
    + * * * - * - * - * - * - * * * * * * + * + * * * * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLInputFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLInputFactory.java index 717dee5a9a9..4a25f8fc33e 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLInputFactory.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLInputFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -36,22 +36,18 @@ import javax.xml.transform.Source; * Each property varies in the level of support required by each implementation. * The level of support required is described in the 'Required' column. * - *
    Required and optional fields for events added to the writer
    - * Required and optional fields for events added to the writer - *
    Event TypeRequired FieldsOptional FieldsRequired Behavior
    START_ELEMENT QName name
    + *
    + * * * - * - * - * - * - * * * * * * * + * + * * * * @@ -222,7 +218,7 @@ public abstract class XMLInputFactory { * java.util.ServiceConfigurationError service configuration error} or if * the implementation is not available or cannot be instantiated. */ - @Deprecated(since="7") + @Deprecated(since="1.7") public static XMLInputFactory newFactory() throws FactoryConfigurationError { @@ -244,7 +240,7 @@ public abstract class XMLInputFactory { * #newFactory(java.lang.String, java.lang.ClassLoader)} method * defines no changes in behavior. */ - @Deprecated(since="7") + @Deprecated(since="1.7") public static XMLInputFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError { diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLOutputFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLOutputFactory.java index 50b6ba79c0a..0203273256c 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLOutputFactory.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLOutputFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -36,22 +36,18 @@ import javax.xml.transform.Result; * Each property varies in the level of support required by each implementation. * The level of support required is described in the 'Required' column. * - *
    Configuration Parameters
    - * Configuration parameters - *
    Property NameBehaviorReturn typeDefault ValueRequired
    javax.xml.stream.isValidatingTurns on/off implementation specific DTD validationBooleanFalseNo
    javax.xml.stream.isNamespaceAwareTurns on/off namespace processing for XML 1.0 supportBooleanTrueTrue (required) / False (optional)
    javax.xml.stream.isCoalescingRequires the processor to coalesce adjacent character dataBooleanFalseYes
    + *
    + * * * - * - * - * - * - * * * * * * * + * + * * * @@ -222,7 +218,7 @@ public abstract class XMLOutputFactory { * Use the new method {@link #newFactory(java.lang.String, * java.lang.ClassLoader)} instead. */ - @Deprecated(since="7") + @Deprecated(since="1.7") public static XMLInputFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError { diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamReader.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamReader.java index 23322b995db..06c44f9b532 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamReader.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -71,19 +71,15 @@ import javax.xml.namespace.QName; * If a method is called in an invalid state the method will throw a * java.lang.IllegalStateException. * - *
    Configuration Parameters
    - * Configuration parameters - *
    Property NameBehaviorReturn typeDefault ValueRequired
    javax.xml.stream.isRepairingNamespacesdefaults prefixes * on the output sideBooleanFalseYes
    + *
    + * * * - * - * - * - * - * * * * + * + * * * *
    Valid methods for each state
    - * Valid methods for each state - *
    Event TypeValid Methods
    All States getProperty(), hasNext(), require(), close(), diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java index 6fc1722c9a0..1f0a3c34577 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -38,12 +38,10 @@ import javax.xml.namespace.NamespaceContext; * Each NAMESPACE * and ATTRIBUTE must be individually written. * - * + *
    + * * - * - * - * - * + * * * * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/events/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/events/package-info.java new file mode 100644 index 00000000000..dd3b4da5b8e --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/events/package-info.java @@ -0,0 +1,32 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Defines event interfaces for the Streaming API for XML (StAX). + * + * @since 1.6 + */ + +package javax.xml.stream.events; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/package-info.java new file mode 100644 index 00000000000..9abed31ca51 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/package-info.java @@ -0,0 +1,51 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + *

    + * Defines interfaces and classes for the Streaming API for XML (StAX). + * + *

    + * StAX provides two basic functions: the cursor API allowing users to + * read and write XML efficiently, and the event iterator API promoting + * ease of use that is event based, easy to extend and pipeline. + * The event iterator API is intended to layer on top of the cursor API. + * + *

    + * The cursor API defines two interfaces: {@link XMLStreamReader} + * and {@link XMLStreamWriter}, while the event iterator API defines: + * {@link XMLEventReader} and {@link XMLEventWriter}. + * + *

    + * StAX supports plugability with {@link XMLInputFactory} and + * {@link XMLOutputFactory} that define how an implementation is + * located through a process as described in the {@link newFactory} + * method. + * + * + * @since 1.6 + */ + +package javax.xml.stream; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/util/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/util/package-info.java new file mode 100644 index 00000000000..074f9e0c208 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/util/package-info.java @@ -0,0 +1,32 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides utility classes for the Streaming API for XML (StAX). + * + * @since 1.6 + */ + +package javax.xml.stream.util; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/package-info.java new file mode 100644 index 00000000000..6a121ce46c1 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/package-info.java @@ -0,0 +1,61 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides DOM specific transformation classes. + *

    + * The {@link javax.xml.transform.dom.DOMSource} class allows the + * client of the implementation of this API to specify a DOM + * {@link org.w3c.dom.Node} as the source of the input tree. The model of + * how the Transformer deals with the DOM tree in terms of mismatches with the + * XSLT data model or + * other data models is beyond the scope of this document. Any of the nodes + * derived from {@link org.w3c.dom.Node} are legal input. + *

    + * The {@link javax.xml.transform.dom.DOMResult} class allows + * a {@link org.w3c.dom.Node} to be specified to which result DOM nodes will + * be appended. If an output node is not specified, the transformer will use + * {@link javax.xml.parsers.DocumentBuilder#newDocument} to create an + * output {@link org.w3c.dom.Document} node. If a node is specified, it + * should be one of the following: {@link org.w3c.dom.Document}, + * {@link org.w3c.dom.Element}, or + * {@link org.w3c.dom.DocumentFragment}. Specification of any other node + * type is implementation dependent and undefined by this API. If the result is a + * {@link org.w3c.dom.Document}, the output of the transformation must have + * a single element root to set as the document element. + *

    + * The {@link javax.xml.transform.dom.DOMLocator} node may be passed + * to {@link javax.xml.transform.TransformerException} objects, and + * retrieved by trying to cast the result of the + * {@link javax.xml.transform.TransformerException#getLocator()} method. + * The implementation has no responsibility to use a DOMLocator instead of a + * {@link javax.xml.transform.SourceLocator} (though line numbers and the + * like do not make much sense for a DOM), so the result of getLocator must always + * be tested with an instanceof. + * + * @since 1.5 + */ + +package javax.xml.transform.dom; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/package.html b/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/package.html deleted file mode 100644 index 09cb8123d50..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/package.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - javax.xml.transform.dom - - - - - -

    This package implements DOM-specific transformation APIs.

    -

    The {@link javax.xml.transform.dom.DOMSource} class allows the -client of the implementation of this API to specify a DOM -{@link org.w3c.dom.Node} as the source of the input tree. The model of -how the Transformer deals with the DOM tree in terms of mismatches with the -XSLT data model or -other data models is beyond the scope of this document. Any of the nodes -derived from {@link org.w3c.dom.Node} are legal input.

    -

    The {@link javax.xml.transform.dom.DOMResult} class allows -a {@link org.w3c.dom.Node} to be specified to which result DOM nodes will -be appended. If an output node is not specified, the transformer will use -{@link javax.xml.parsers.DocumentBuilder#newDocument} to create an -output {@link org.w3c.dom.Document} node. If a node is specified, it -should be one of the following: {@link org.w3c.dom.Document}, -{@link org.w3c.dom.Element}, or -{@link org.w3c.dom.DocumentFragment}. Specification of any other node -type is implementation dependent and undefined by this API. If the result is a -{@link org.w3c.dom.Document}, the output of the transformation must have -a single element root to set as the document element.

    -

    The {@link javax.xml.transform.dom.DOMLocator} node may be passed -to {@link javax.xml.transform.TransformerException} objects, and -retrieved by trying to cast the result of the -{@link javax.xml.transform.TransformerException#getLocator()} method. -The implementation has no responsibility to use a DOMLocator instead of a -{@link javax.xml.transform.SourceLocator} (though line numbers and the -like do not make much sense for a DOM), so the result of getLocator must always -be tested with an instanceof.

    - - diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/package-info.java new file mode 100644 index 00000000000..2afa0406642 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/package-info.java @@ -0,0 +1,216 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Defines the generic APIs for processing transformation instructions, + * and performing a transformation from source to result. These interfaces have no + * dependencies on SAX or the DOM standard, and try to make as few assumptions as + * possible about the details of the source and result of a transformation. It + * achieves this by defining {@link javax.xml.transform.Source} and + * {@link javax.xml.transform.Result} interfaces. + * + *

    + * To provide concrete classes for the user, the API defines specializations + * of the interfaces found at the root level. These interfaces are found in + * {@link javax.xml.transform.sax}, {@link javax.xml.transform.dom}, + * {@link javax.xml.transform.stax}, and {@link javax.xml.transform.stream}. + * + * + *

    Creating Objects

    + * + *

    + * The API allows a concrete {@link javax.xml.transform.TransformerFactory} + * object to be created from the static function + * {@link javax.xml.transform.TransformerFactory#newInstance}. + * + * + *

    Specification of Inputs and Outputs

    + * + *

    + * This API defines two interface objects called {@link javax.xml.transform.Source} + * and {@link javax.xml.transform.Result}. In order to pass Source and Result + * objects to the interfaces, concrete classes must be used. The following concrete + * representations are defined for each of these objects: + * {@link javax.xml.transform.stream.StreamSource} and + * {@link javax.xml.transform.stream.StreamResult}, + * {@link javax.xml.transform.stax.StAXSource} and + * {@link javax.xml.transform.stax.StAXResult}, and + * {@link javax.xml.transform.sax.SAXSource} and + * {@link javax.xml.transform.sax.SAXResult}, and + * {@link javax.xml.transform.dom.DOMSource} and + * {@link javax.xml.transform.dom.DOMResult}. Each of these objects defines a + * FEATURE string (which is in the form of a URL), which can be passed into + * {@link javax.xml.transform.TransformerFactory#getFeature} to see if the given + * type of Source or Result object is supported. For instance, to test if a + * DOMSource and a StreamResult is supported, you can apply the following test. + * + *

    + * 
    + * TransformerFactory tfactory = TransformerFactory.newInstance();
    + * if (tfactory.getFeature(DOMSource.FEATURE) &&
    + *     tfactory.getFeature(StreamResult.FEATURE)) {
    + *     ...
    + * }
    + * 
    + * 
    + * + * + *

    + * Qualified Name Representation + *

    + * + *

    + * Namespaces present something + * of a problem area when dealing with XML objects. Qualified Names appear in XML + * markup as prefixed names. But the prefixes themselves do not hold identity. + * Rather, it is the URIs that they contextually map to that hold the identity. + * Therefore, when passing a Qualified Name like "xyz:foo" among Java programs, + * one must provide a means to map "xyz" to a namespace. + * + *

    + * One solution has been to create a "QName" object that holds the namespace URI, + * as well as the prefix and local name, but this is not always an optimal solution, + * as when, for example, you want to use unique strings as keys in a dictionary + * object. Not having a string representation also makes it difficult to specify + * a namespaced identity outside the context of an XML document. + * + *

    + * In order to pass namespaced values to transformations, for instance when setting + * a property or a parameter on a {@link javax.xml.transform.Transformer} object, + * this specification defines that a String "qname" object parameter be passed as + * two-part string, the namespace URI enclosed in curly braces ({}), followed by + * the local name. If the qname has a null URI, then the String object only + * contains the local name. An application can safely check for a non-null URI by + * testing to see if the first character of the name is a '{' character. + * + *

    + * For example, if a URI and local name were obtained from an element defined with + * <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the + * Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that the + * prefix is lost. + * + * + *

    Result Tree Serialization

    + * + *

    + * Serialization of the result tree to a stream can be controlled with the + * {@link javax.xml.transform.Transformer#setOutputProperties} and the + * {@link javax.xml.transform.Transformer#setOutputProperty} methods. + * These properties only apply to stream results, they have no effect when + * the result is a DOM tree or SAX event stream. + * + *

    + * Strings that match the XSLT + * specification for xsl:output attributes can be referenced from the + * {@link javax.xml.transform.OutputKeys} class. Other strings can be + * specified as well. + * If the transformer does not recognize an output key, a + * {@link java.lang.IllegalArgumentException} is thrown, unless the key name + * is namespace qualified. Output key names + * that are namespace qualified are always allowed, although they may be + * ignored by some implementations. + * + *

    + * If all that is desired is the simple identity transformation of a + * source to a result, then {@link javax.xml.transform.TransformerFactory} + * provides a + * {@link javax.xml.transform.TransformerFactory#newTransformer()} method + * with no arguments. This method creates a Transformer that effectively copies + * the source to the result. This method may be used to create a DOM from SAX + * events or to create an XML or HTML stream from a DOM or SAX events. + * + *

    Exceptions and Error Reporting

    + * + *

    + * The transformation API throw three types of specialized exceptions. A + * {@link javax.xml.transform.TransformerFactoryConfigurationError} is parallel to + * the {@link javax.xml.parsers.FactoryConfigurationError}, and is thrown + * when a configuration problem with the TransformerFactory exists. This error + * will typically be thrown when the transformation factory class specified with + * the "javax.xml.transform.TransformerFactory" system property cannot be found or + * instantiated. + * + *

    + * A {@link javax.xml.transform.TransformerConfigurationException} + * may be thrown if for any reason a Transformer can not be created. A + * TransformerConfigurationException may be thrown if there is a syntax error in + * the transformation instructions, for example when + * {@link javax.xml.transform.TransformerFactory#newTransformer} is + * called. + * + *

    + * {@link javax.xml.transform.TransformerException} is a general + * exception that occurs during the course of a transformation. A transformer + * exception may wrap another exception, and if any of the + * {@link javax.xml.transform.TransformerException#printStackTrace()} + * methods are called on it, it will produce a list of stack dumps, starting from + * the most recent. The transformer exception also provides a + * {@link javax.xml.transform.SourceLocator} object which indicates where + * in the source tree or transformation instructions the error occurred. + * {@link javax.xml.transform.TransformerException#getMessageAndLocation()} + * may be called to get an error message with location info, and + * {@link javax.xml.transform.TransformerException#getLocationAsString()} + * may be called to get just the location string. + * + *

    + * Transformation warnings and errors are sent to an + * {@link javax.xml.transform.ErrorListener}, at which point the application may + * decide to report the error or warning, and may decide to throw an + * Exception for a non-fatal error. The ErrorListener + * may be set via {@link javax.xml.transform.TransformerFactory#setErrorListener} + * for reporting errors that have to do with syntax errors in the transformation + * instructions, or via {@link javax.xml.transform.Transformer#setErrorListener} + * to report errors that occur during the transformation. The ErrorListener + * on both objects will always be valid and non-null, whether set by + * the application or a default implementation provided by the processor. + * The default implementation provided by the processor will report all warnings + * and errors to System.err and does not throw any Exceptions. + * Applications are strongly encouraged to register and use + * ErrorListeners that insure proper behavior for warnings and + * errors. + * + * + *

    Resolution of URIs within a transformation

    + * + *

    + * The API provides a way for URIs referenced from within the stylesheet + * instructions or within the transformation to be resolved by the calling + * application. This can be done by creating a class that implements the + * {@link javax.xml.transform.URIResolver} interface, with its one method, + * {@link javax.xml.transform.URIResolver#resolve}, and use this class to + * set the URI resolution for the transformation instructions or transformation + * with {@link javax.xml.transform.TransformerFactory#setURIResolver} or + * {@link javax.xml.transform.Transformer#setURIResolver}. The + * URIResolver.resolve method takes two String arguments, the URI + * found in the stylesheet instructions or built as part of the transformation + * process, and the base URI against which the first argument will be made absolute + * if the absolute URI is required. + * The returned {@link javax.xml.transform.Source} object must be usable by + * the transformer, as specified in its implemented features. + * + * @since 1.5 + */ + +package javax.xml.transform; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/package.html b/jaxp/src/java.xml/share/classes/javax/xml/transform/package.html deleted file mode 100644 index 45c2d78faf4..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/transform/package.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - javax.xml.transform - - - - - - -

    This package defines the generic APIs for processing transformation -instructions, and performing a transformation from source to result. These -interfaces have no dependencies on SAX or the DOM standard, and try to make as -few assumptions as possible about the details of the source and result of a -transformation. It achieves this by defining -{@link javax.xml.transform.Source} and -{@link javax.xml.transform.Result} interfaces. -

    - -

    To define concrete classes for the user, the API defines specializations -of the interfaces found at the root level. These interfaces are found in -{@link javax.xml.transform.sax}, {@link javax.xml.transform.dom}, -and {@link javax.xml.transform.stream}. -

    - - -

    Creating Objects

    - -

    The API allows a concrete -{@link javax.xml.transform.TransformerFactory} object to be created from -the static function -{@link javax.xml.transform.TransformerFactory#newInstance}. -

    - - -

    Specification of Inputs and Outputs

    - -

    This API defines two interface objects called -{@link javax.xml.transform.Source} and -{@link javax.xml.transform.Result}. In order to pass Source and Result -objects to the interfaces, concrete classes must be used. -Three concrete representations are defined for each of these -objects: -{@link javax.xml.transform.stream.StreamSource} and -{@link javax.xml.transform.stream.StreamResult}, -{@link javax.xml.transform.sax.SAXSource} and -{@link javax.xml.transform.sax.SAXResult}, and -{@link javax.xml.transform.dom.DOMSource} and -{@link javax.xml.transform.dom.DOMResult}. Each of these objects defines -a FEATURE string (which is i the form of a URL), which can be passed into -{@link javax.xml.transform.TransformerFactory#getFeature} to see if the -given type of Source or Result object is supported. For instance, to test if a -DOMSource and a StreamResult is supported, you can apply the following -test. -

    - -
    -
    -TransformerFactory tfactory = TransformerFactory.newInstance();
    -if (tfactory.getFeature(DOMSource.FEATURE) && tfactory.getFeature(StreamResult.FEATURE)) {
    -...
    -}
    -
    -
    - - -

    -Qualified Name Representation -

    - -

    Namespaces -present something of a problem area when dealing with XML objects. Qualified -Names appear in XML markup as prefixed names. But the prefixes themselves do -not hold identity. Rather, it is the URIs that they contextually map to that -hold the identity. Therefore, when passing a Qualified Name like "xyz:foo" -among Java programs, one must provide a means to map "xyz" to a namespace. -

    - -

    One solution has been to create a "QName" object that holds the -namespace URI, as well as the prefix and local name, but this is not always an -optimal solution, as when, for example, you want to use unique strings as keys -in a dictionary object. Not having a string representation also makes it -difficult to specify a namespaced identity outside the context of an XML -document. -

    - -

    In order to pass namespaced values to transformations, -for -instance when setting a property or a parameter on a -{@link javax.xml.transform.Transformer} object, -this specification defines that a -String "qname" object parameter be passed as two-part string, the namespace URI -enclosed in curly braces ({}), followed by the local name. If the qname has a -null URI, then the String object only contains the local name. An application -can safely check for a non-null URI by testing to see if the first character of -the name is a '{' character. -

    - -

    For example, if a URI and local name were obtained from an element -defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, -then the Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo". -Note that the prefix is lost. -

    - - -

    Result Tree Serialization

    - -

    Serialization of the result tree to a stream can be controlled with -the {@link javax.xml.transform.Transformer#setOutputProperties} and the -{@link javax.xml.transform.Transformer#setOutputProperty} methods. -These properties only apply to stream results, they have no effect when -the result is a DOM tree or SAX event stream.

    - -

    Strings that match the XSLT -specification for xsl:output attributes can be referenced from the -{@link javax.xml.transform.OutputKeys} class. Other strings can be -specified as well. -If the transformer does not recognize an output key, a -{@link java.lang.IllegalArgumentException} is thrown, unless the -key name is namespace qualified. Output key names -that are namespace qualified are always allowed, although they may be -ignored by some implementations.

    - -

    If all that is desired is the simple identity transformation of a -source to a result, then {@link javax.xml.transform.TransformerFactory} -provides a -{@link javax.xml.transform.TransformerFactory#newTransformer()} method -with no arguments. This method creates a Transformer that effectively copies -the source to the result. This method may be used to create a DOM from SAX -events or to create an XML or HTML stream from a DOM or SAX events.

    - -

    Exceptions and Error Reporting

    - -

    The transformation API throw three types of specialized exceptions. A -{@link javax.xml.transform.TransformerFactoryConfigurationError} is parallel to -the {@link javax.xml.parsers.FactoryConfigurationError}, and is thrown -when a configuration problem with the TransformerFactory exists. This error -will typically be thrown when the transformation factory class specified with -the "javax.xml.transform.TransformerFactory" system property cannot be found or -instantiated.

    - -

    A {@link javax.xml.transform.TransformerConfigurationException} -may be thrown if for any reason a Transformer can not be created. A -TransformerConfigurationException may be thrown if there is a syntax error in -the transformation instructions, for example when -{@link javax.xml.transform.TransformerFactory#newTransformer} is -called.

    - -

    {@link javax.xml.transform.TransformerException} is a general -exception that occurs during the course of a transformation. A transformer -exception may wrap another exception, and if any of the -{@link javax.xml.transform.TransformerException#printStackTrace()} -methods are called on it, it will produce a list of stack dumps, starting from -the most recent. The transformer exception also provides a -{@link javax.xml.transform.SourceLocator} object which indicates where -in the source tree or transformation instructions the error occurred. -{@link javax.xml.transform.TransformerException#getMessageAndLocation()} -may be called to get an error message with location info, and -{@link javax.xml.transform.TransformerException#getLocationAsString()} -may be called to get just the location string.

    - -

    Transformation warnings and errors are sent to an -{@link javax.xml.transform.ErrorListener}, at which point the -application may decide to report the error or warning, and may decide to throw -an Exception for a non-fatal error. The ErrorListener may be set via -{@link javax.xml.transform.TransformerFactory#setErrorListener} for -reporting errors that have to do with syntax errors in the transformation -instructions, or via -{@link javax.xml.transform.Transformer#setErrorListener} to report -errors that occur during the transformation. The ErrorListener on both objects -will always be valid and non-null, whether set by the application or a default -implementation provided by the processor. -The default implementation provided by the processor will report all warnings and errors to System.err -and does not throw any Exceptions. -Applications are strongly encouraged to register and use -ErrorListeners that insure proper behavior for warnings and -errors. -

    - - -

    Resolution of URIs within a transformation

    - -

    The API provides a way for URIs referenced from within the stylesheet -instructions or within the transformation to be resolved by the calling -application. This can be done by creating a class that implements the -{@link javax.xml.transform.URIResolver} interface, with its one method, -{@link javax.xml.transform.URIResolver#resolve}, and use this class to -set the URI resolution for the transformation instructions or transformation -with {@link javax.xml.transform.TransformerFactory#setURIResolver} or -{@link javax.xml.transform.Transformer#setURIResolver}. The -URIResolver.resolve method takes two String arguments, the URI found in the -stylesheet instructions or built as part of the transformation process, and the -base URI -against which the first argument will be made absolute if the -absolute URI is required. -The returned {@link javax.xml.transform.Source} object must be usable by -the transformer, as specified in its implemented features.

    - - - - diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/sax/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/sax/package-info.java new file mode 100644 index 00000000000..04b3e266fa0 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/sax/package-info.java @@ -0,0 +1,88 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides SAX specific transformation classes. + * + *

    + * The {@link javax.xml.transform.sax.SAXSource} class allows the + * setting of an {@link org.xml.sax.XMLReader} to be used for pulling + * parse events, and an {@link org.xml.sax.InputSource} that may be used to + * specify the SAX source. + *

    + * The {@link javax.xml.transform.sax.SAXResult} class allows the + * setting of a {@link org.xml.sax.ContentHandler} to be the receiver of + * SAX2 events from the transformation. + *

    + * The {@link javax.xml.transform.sax.SAXTransformerFactory} extends + * {@link javax.xml.transform.TransformerFactory} to provide factory + * methods for creating {@link javax.xml.transform.sax.TemplatesHandler}, + * {@link javax.xml.transform.sax.TransformerHandler}, and + * {@link org.xml.sax.XMLReader} instances. + *

    + * To obtain a {@link javax.xml.transform.sax.SAXTransformerFactory}, + * the caller must cast the {@link javax.xml.transform.TransformerFactory} + * instance returned from + * {@link javax.xml.transform.TransformerFactory#newInstance}. + * + *

    + * The {@link javax.xml.transform.sax.TransformerHandler} interface + * allows a transformation to be created from SAX2 parse events, which is a "push" + * model rather than the "pull" model that normally occurs for a transformation. + * Normal parse events are received through the + * {@link org.xml.sax.ContentHandler} interface, lexical events such as + * startCDATA and endCDATA are received through the + * {@link org.xml.sax.ext.LexicalHandler} interface, and events that signal + * the start or end of disabling output escaping are received via + * {@link org.xml.sax.ContentHandler#processingInstruction}, with the + * target parameter being + * {@link javax.xml.transform.Result#PI_DISABLE_OUTPUT_ESCAPING} and + * {@link javax.xml.transform.Result#PI_ENABLE_OUTPUT_ESCAPING}. If + * parameters, output properties, or other features need to be set on the + * Transformer handler, a {@link javax.xml.transform.Transformer} reference + * will need to be obtained from + * {@link javax.xml.transform.sax.TransformerHandler#getTransformer}, and + * the methods invoked from that reference. + * + *

    + * The {@link javax.xml.transform.sax.TemplatesHandler} interface + * allows the creation of {@link javax.xml.transform.Templates} objects + * from SAX2 parse events. Once the {@link org.xml.sax.ContentHandler} + * events are complete, the Templates object may be obtained from + * {@link javax.xml.transform.sax.TemplatesHandler#getTemplates}. Note that + * {@link javax.xml.transform.sax.TemplatesHandler#setSystemId} should + * normally be called in order to establish a base system ID from which relative + * URLs may be resolved. + *

    + * The {@link javax.xml.transform.sax.SAXTransformerFactory#newXMLFilter} + * method allows the creation of a {@link org.xml.sax.XMLFilter}, which + * encapsulates the SAX2 notion of a "pull" transformation. The resulting + * {@code XMLFilters} can be chained together so that a series of transformations + * can happen with one's output becoming another's input. + * + * @since 1.5 + */ + +package javax.xml.transform.sax; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/sax/package.html b/jaxp/src/java.xml/share/classes/javax/xml/transform/sax/package.html deleted file mode 100644 index 97dce462bdb..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/transform/sax/package.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - javax.xml.transform.sax - - - - - - -

    This package implements SAX2-specific transformation APIs. It provides - classes which allow input from {@link org.xml.sax.ContentHandler} - events, and also classes that produce org.xml.sax.ContentHandler events. It - also provides methods to set the input source as an - {@link org.xml.sax.XMLReader}, or to use a - {@link org.xml.sax.InputSource} as the source. It also allows the - creation of a {@link org.xml.sax.XMLFilter}, which enables - transformations to "pull" from other transformations, and lets the transformer - to be used polymorphically as an {@link org.xml.sax.XMLReader}.

    -

    The {@link javax.xml.transform.sax.SAXSource} class allows the - setting of an {@link org.xml.sax.XMLReader} to be used for "pulling" - parse events, and an {@link org.xml.sax.InputSource} that may be used to - specify the SAX source.

    -

    The {@link javax.xml.transform.sax.SAXResult} class allows the - setting of a {@link org.xml.sax.ContentHandler} to be the receiver of - SAX2 events from the transformation. -

    The {@link javax.xml.transform.sax.SAXTransformerFactory} extends - {@link javax.xml.transform.TransformerFactory} to provide factory - methods for creating {@link javax.xml.transform.sax.TemplatesHandler}, - {@link javax.xml.transform.sax.TransformerHandler}, and - {@link org.xml.sax.XMLReader} instances.

    -

    To obtain a {@link javax.xml.transform.sax.SAXTransformerFactory}, - the caller must cast the {@link javax.xml.transform.TransformerFactory} - instance returned from - {@link javax.xml.transform.TransformerFactory#newInstance}. - -

    The {@link javax.xml.transform.sax.TransformerHandler} interface - allows a transformation to be created from SAX2 parse events, which is a "push" - model rather than the "pull" model that normally occurs for a transformation. - Normal parse events are received through the - {@link org.xml.sax.ContentHandler} interface, lexical events such as - startCDATA and endCDATA are received through the - {@link org.xml.sax.ext.LexicalHandler} interface, and events that signal - the start or end of disabling output escaping are received via - {@link org.xml.sax.ContentHandler#processingInstruction}, with the - target parameter being - {@link javax.xml.transform.Result#PI_DISABLE_OUTPUT_ESCAPING} and - {@link javax.xml.transform.Result#PI_ENABLE_OUTPUT_ESCAPING}. If - parameters, output properties, or other features need to be set on the - Transformer handler, a {@link javax.xml.transform.Transformer} reference - will need to be obtained from - {@link javax.xml.transform.sax.TransformerHandler#getTransformer}, and - the methods invoked from that reference. - -

    The {@link javax.xml.transform.sax.TemplatesHandler} interface - allows the creation of {@link javax.xml.transform.Templates} objects - from SAX2 parse events. Once the {@link org.xml.sax.ContentHandler} - events are complete, the Templates object may be obtained from - {@link javax.xml.transform.sax.TemplatesHandler#getTemplates}. Note that - {@link javax.xml.transform.sax.TemplatesHandler#setSystemId} should - normally be called in order to establish a base system ID from which relative - URLs may be resolved. -

    The - {@link javax.xml.transform.sax.SAXTransformerFactory#newXMLFilter} - method allows the creation of a {@link org.xml.sax.XMLFilter}, which - encapsulates the SAX2 notion of a "pull" transformation. The following - illustrates several transformations chained together. Each filter points to a - parent {@link org.xml.sax.XMLReader}, and the final transformation is - caused by invoking {@link org.xml.sax.XMLReader#parse} on the final - reader in the chain.

    - - diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package-info.java new file mode 100644 index 00000000000..a17343f9985 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package-info.java @@ -0,0 +1,45 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides StAX specific transformation classes. + * + *

    + * The {@link javax.xml.transform.stax.StAXSource} class encapsulates a + * {@link javax.xml.stream.XMLStreamReader} or {@link javax.xml.stream.XMLEventReader} + * and can be used as an input where a {@link javax.xml.transform.Source} + * object is accepted. + * + *

    + * The {@link javax.xml.transform.stax.StAXResult} class encapsulates a + * {@link javax.xml.stream.XMLStreamWriter} or {@link javax.xml.stream.XMLEventWriter} + * and can be used as an output where a {@link javax.xml.transform.Result} + * object is accepted. + * + * + * @since 1.6 + */ + +package javax.xml.transform.stax; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package.html b/jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package.html deleted file mode 100644 index abdd5ecd846..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - javax.xml.transform.stax - - - - - - -

    - Provides for StAX-specific transformation APIs. - TODO: better description(s). -

    - -

    Package Specification

    - - -

    Related Documentation

    - -

    For overviews, tutorials, examples, guides, and tool documentation, please see:

    - - - -
      -
    • @see XMLStreamReader
    • -
    • @see XMLEventReader
    • -
    - - @since 1.6 - - diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/stream/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/stream/package-info.java new file mode 100644 index 00000000000..9534e621efb --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/stream/package-info.java @@ -0,0 +1,56 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides stream and URI specific transformation classes. + * + *

    + * The {@link javax.xml.transform.stream.StreamSource} class + * provides methods for specifying {@link java.io.InputStream} input, + * {@link java.io.Reader} input, and URL input in the form of strings. Even + * if an input stream or reader is specified as the source, + * {@link javax.xml.transform.stream.StreamSource#setSystemId} should still + * be called, so that the transformer can know from where it should resolve + * relative URIs. The public identifier is always optional: if the application + * writer includes one, it will be provided as part of the + * {@link javax.xml.transform.SourceLocator} information. + *

    + * The {@link javax.xml.transform.stream.StreamResult} class + * provides methods for specifying {@link java.io.OutputStream}, + * {@link java.io.Writer}, or an output system ID, as the output of the + * transformation result. + *

    + * Normally streams should be used rather than readers or writers, for + * both the Source and Result, since readers and writers already have the encoding + * established to and from the internal Unicode format. However, there are times + * when it is useful to write to a character stream, such as when using a + * StringWriter in order to write to a String, or in the case of reading source + * XML from a StringReader. + * + * + * @since 1.5 + */ + +package javax.xml.transform.stream; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/stream/package.html b/jaxp/src/java.xml/share/classes/javax/xml/transform/stream/package.html deleted file mode 100644 index ea52ecb692e..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/transform/stream/package.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - javax.xml.transform.stream - - - - - -

    This package implements stream- and URI- specific transformation APIs. -

    -

    The {@link javax.xml.transform.stream.StreamSource} class - provides methods for specifying {@link java.io.InputStream} input, - {@link java.io.Reader} input, and URL input in the form of strings. Even - if an input stream or reader is specified as the source, - {@link javax.xml.transform.stream.StreamSource#setSystemId} should still - be called, so that the transformer can know from where it should resolve - relative URIs. The public identifier is always optional: if the application - writer includes one, it will be provided as part of the - {@link javax.xml.transform.SourceLocator} information.

    -

    The {@link javax.xml.transform.stream.StreamResult} class - provides methods for specifying {@link java.io.OutputStream}, - {@link java.io.Writer}, or an output system ID, as the output of the - transformation result.

    -

    Normally streams should be used rather than readers or writers, for - both the Source and Result, since readers and writers already have the encoding - established to and from the internal Unicode format. However, there are times - when it is useful to write to a character stream, such as when using a - StringWriter in order to write to a String, or in the case of reading source - XML from a StringReader.

    - - diff --git a/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java index 2bcc73e1be1..aafa5cd844b 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -58,7 +58,7 @@ import org.xml.sax.SAXParseException; * may not attempt to recursively invoke the {@code newSchema} method, * even from the same thread. * - *

    Schema Language

    + *

    Schema Language

    *

    * This spec uses a namespace URI to designate a schema language. * The following table shows the values defined by this specification. @@ -84,7 +84,8 @@ import org.xml.sax.SAXParseException; * validation implemented on this interface necessarily deviate from * the XML DTD semantics as defined in the XML 1.0. * - *

    XML Namespaces, {@code javax.xml.stream.isRepairingNamespaces} and write method behaviour
    XML Namespaces, {@code javax.xml.stream.isRepairingNamespaces} and write method behaviour
    Method {@code isRepairingNamespaces} == true{@code isRepairingNamespaces} == false
    + *
    + * * * * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactoryLoader.java b/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactoryLoader.java index f617d99ae51..051d496415b 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactoryLoader.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactoryLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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,7 @@ public abstract class SchemaFactoryLoader { * the list of available schema languages. * * @throws NullPointerException - * If the schemaLanguage parameter is null. + * If the schemaLanguage parameter is null. * * @return null if the callee fails to create one. */ diff --git a/jaxp/src/java.xml/share/classes/javax/xml/validation/Validator.java b/jaxp/src/java.xml/share/classes/javax/xml/validation/Validator.java index bd746b40e84..b71319c8023 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/validation/Validator.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/validation/Validator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -131,12 +131,10 @@ public abstract class Validator { *

    This method places the following restrictions on the types of * the {@link Source}/{@link Result} accepted. * - *

    URIs for Supported Schema languages
    value
    + *
    + * * * - * - * - * * * * @@ -144,7 +142,7 @@ public abstract class Validator { * * * - * + * * * * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/validation/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/validation/package-info.java new file mode 100644 index 00000000000..b4fb61b26ae --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/validation/package-info.java @@ -0,0 +1,133 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + *

    + * Provides an API for validation of XML documents. Validation is the + * process of verifying that an XML document is an instance of a specified XML + * schema. An XML schema defines the content model (also called a + * grammar or vocabulary) that its instance documents will + * represent. + * + *

    + * There are a number of popular technologies available for creating an XML schema. + * Some of the most popular ones include: + * + *

      + *
    • Document Type Definition (DTD) + * - XML's built-in schema language. + *
    • + *
    • W3C XML Schema (WXS) - + * an object-oriented XML schema language. WXS also provides a type system + * for constraining the character data of an XML document. WXS is maintained + * by the World Wide Web Consortium (W3C) + * and is a W3C Recommendation (that is, a ratified W3C standard specification). + *
    • + *
    • RELAX NG (RNG) - + * a pattern-based, user-friendly XML schema language. RNG schemas may + * also use types to constrain XML character data. RNG is maintained by + * the Organization for the Advancement + * of Structured Information Standards (OASIS) and is both an OASIS + * and an ISO (International Organization + * for Standardization) standard. + *
    • + *
    • Schematron - + * a rules-based XML schema language. Whereas DTD, WXS, and RNG are designed + * to express the structure of a content model, Schematron is designed to + * enforce individual rules that are difficult or impossible to express + * with other schema languages. Schematron is intended to supplement a + * schema written in structural schema language such as the aforementioned. + * Schematron is in the process of becoming an ISO standard. + *
    • + *
    + *

    + * While JAXP supports validation as a feature of an XML parser, represented by + * either a {@link javax.xml.parsers.SAXParser} or {@link javax.xml.parsers.DocumentBuilder} + * instance, the {@code Validation} API is preferred. + * + *

    + * The JAXP validation API decouples the validation of an instance document from + * the parsing of an XML document. This is advantageous for several reasons, + * some of which are: + * + *

      + *
    • Support for additional schema langauges. + * The JAXP parser implementations support only a subset of the available + * XML schema languages. The Validation API provides a standard mechanism + * through which applications may take of advantage of specialization + * validation libraries which support additional schema languages. + *
    • + *
    • Easy runtime coupling of an XML instance and schema. + * Specifying the location of a schema to use for validation with JAXP + * parsers can be confusing. The Validation API makes this process simple + * (see example below). + *
    • + *
    + *

    + * Usage example. The following example + * demonstrates validating an XML document with the Validation API + * (for readability, some exception handling is not shown): + * + *

    + *
    + *     // parse an XML document into a DOM tree
    + *     DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    + *     Document document = parser.parse(new File("instance.xml"));
    + *
    + *     // create a SchemaFactory capable of understanding WXS schemas
    + *     SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    + *
    + *     // load a WXS schema, represented by a Schema instance
    + *     Source schemaFile = new StreamSource(new File("mySchema.xsd"));
    + *     Schema schema = factory.newSchema(schemaFile);
    + *
    + *     // create a Validator instance, which can be used to validate an instance document
    + *     Validator validator = schema.newValidator();
    + *
    + *     // validate the DOM tree
    + *     try {
    + *         validator.validate(new DOMSource(document));
    + *     } catch (SAXException e) {
    + *         // instance document is invalid!
    + *     }
    + * 
    + *

    + * The JAXP parsing API has been integrated with the Validation API. Applications + * may create a {@link javax.xml.validation.Schema} with the validation API + * and associate it with a {@link javax.xml.parsers.DocumentBuilderFactory} or + * a {@link javax.xml.parsers.SAXParserFactory} instance by using the + * {@link javax.xml.parsers.DocumentBuilderFactory#setSchema(Schema)} and + * {@link javax.xml.parsers.SAXParserFactory#setSchema(Schema)} methods. + * You should not both set a schema and call setValidating(true) + * on a parser factory. The former technique will cause parsers to use the new + * validation API; the latter will cause parsers to use their own internal validation + * facilities. Turning on both of these options simultaneously will cause + * either redundant behavior or error conditions. + * + * + * @since 1.5 + */ + +package javax.xml.validation; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/validation/package.html b/jaxp/src/java.xml/share/classes/javax/xml/validation/package.html deleted file mode 100644 index 2dd06b3175e..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/validation/package.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - javax.xml.validation - - - - - -

    - This package provides an API for validation of XML documents. Validation is the process of verifying - that an XML document is an instance of a specified XML schema. An XML schema defines the - content model (also called a grammar or vocabulary) that its instance documents - will represent. -

    -

    - There are a number of popular technologies available for creating an XML schema. Some of the most - popular include: -

    -
      -
    • Document Type Definition (DTD) - XML's built-in schema language.
    • -
    • W3C XML Schema (WXS) - an object-oriented XML schema - language. WXS also provides a type system for constraining the character data of an XML document. - WXS is maintained by the World Wide Web Consortium (W3C) and is a W3C - Recommendation (that is, a ratified W3C standard specification).
    • -
    • RELAX NG (RNG) - a pattern-based, - user-friendly XML schema language. RNG schemas may also use types to constrain XML character data. - RNG is maintained by the Organization for the Advancement of - Structured Information Standards (OASIS) and is both an OASIS and an - ISO (International Organization for Standardization) standard.
    • -
    • Schematron - a rules-based XML schema - language. Whereas DTD, WXS, and RNG are designed to express the structure of a content model, - Schematron is designed to enforce individual rules that are difficult or impossible to express - with other schema languages. Schematron is intended to supplement a schema written in - structural schema language such as the aforementioned. Schematron is in the process - of becoming an ISO standard.
    • -
    -

    - Previous versions of JAXP supported validation as a feature of an XML parser, represented by - either a {@link javax.xml.parsers.SAXParser} or {@link javax.xml.parsers.DocumentBuilder} instance. -

    -

    - The JAXP validation API decouples the validation of an instance document from the parsing of an - XML document. This is advantageous for several reasons, some of which are: -

    -
      -
    • Support for additional schema langauges. As of JDK 1.5, the two most - popular JAXP parser implementations, Crimson and Xerces, only support a subset of the available - XML schema languages. The Validation API provides a standard mechanism through which applications - may take of advantage of specialization validation libraries which support additional schema - languages.
    • -
    • Easy runtime coupling of an XML instance and schema. Specifying the location - of a schema to use for validation with JAXP parsers can be confusing. The Validation API makes this - process simple (see example below).
    • -
    -

    - Usage example. The following example demonstrates validating - an XML document with the Validation API (for readability, some exception handling is not shown): -

    -
    -            
    -    // parse an XML document into a DOM tree
    -    DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    -    Document document = parser.parse(new File("instance.xml"));
    -
    -    // create a SchemaFactory capable of understanding WXS schemas
    -    SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    -
    -    // load a WXS schema, represented by a Schema instance
    -    Source schemaFile = new StreamSource(new File("mySchema.xsd"));
    -    Schema schema = factory.newSchema(schemaFile);
    -
    -    // create a Validator instance, which can be used to validate an instance document
    -    Validator validator = schema.newValidator();
    -
    -    // validate the DOM tree
    -    try {
    -        validator.validate(new DOMSource(document));
    -    } catch (SAXException e) {
    -        // instance document is invalid!
    -    }
    -
    -

    - The JAXP parsing API has been integrated with the Validation API. Applications may create a {@link javax.xml.validation.Schema} with the validation API - and associate it with a {@link javax.xml.parsers.DocumentBuilderFactory} or a {@link javax.xml.parsers.SAXParserFactory} instance - by using the {@link javax.xml.parsers.DocumentBuilderFactory#setSchema(Schema)} and {@link javax.xml.parsers.SAXParserFactory#setSchema(Schema)} - methods. You should not both set a schema and call setValidating(true) on a parser factory. The former technique - will cause parsers to use the new validation API; the latter will cause parsers to use their own internal validation - facilities. Turning on both of these options simultaneously will cause either redundant behavior or error conditions. -

    - - diff --git a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPath.java b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPath.java index d7c0a44bf95..8270231254c 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPath.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -31,14 +31,18 @@ import org.xml.sax.InputSource; /** * {@code XPath} provides access to the XPath evaluation environment and expressions. + * The XPath evaluation is affected by the factors described in the following table. * - * - *
    {@code Source} / {@code Result} Accepted
    {@code Source} / {@code Result} Accepted
    {@link javax.xml.transform.stream.StreamSource}{@link javax.xml.transform.sax.SAXSource}{@link javax.xml.transform.stax.StAXSource}
    {@code null}OK
    + * + *
    + * * * - * + * + * * * + * * * * * + * *
    Evaluation of XPath Expressions
    Evaluation of XPath Expressions.FactorBehavior
    context @@ -84,6 +88,7 @@ import org.xml.sax.InputSource; * Conversion to the return type follows XPath conversion rules. *
    * *

    An XPath object is not thread-safe and not reentrant. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathExpression.java b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathExpression.java index 697745e92d5..b6616685231 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathExpression.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathExpression.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -30,14 +30,18 @@ import org.xml.sax.InputSource; /** * {@code XPathExpression} provides access to compiled XPath expressions. + * The XPath evaluation is affected by the factors described in the following table. * - * - * + * + *
    + * * * - * + * + * * * + * * * *
    Evaluation of XPath Expressions
    Evaluation of XPath Expressions.FactorBehavior
    context diff --git a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryFinder.java b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryFinder.java index 97c923e15d1..9db2556ea54 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryFinder.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -176,9 +176,9 @@ class XPathFactoryFinder { String javah = ss.getSystemProperty( "java.home" ); String configFile = javah + File.separator + - "lib" + File.separator + "jaxp.properties"; + "conf" + File.separator + "jaxp.properties"; - // try to read from $java.home/lib/jaxp.properties + // try to read from $java.home/conf/jaxp.properties try { if(firstTime){ synchronized(cacheProps){ @@ -193,7 +193,7 @@ class XPathFactoryFinder { } } final String factoryClassName = cacheProps.getProperty(propertyName); - debugPrintln(()->"found " + factoryClassName + " in $java.home/jaxp.properties"); + debugPrintln(()->"found " + factoryClassName + " in $java.home/conf/jaxp.properties"); if (factoryClassName != null) { xpathFactory = createInstance(factoryClassName, true); diff --git a/jaxp/src/java.xml/share/classes/javax/xml/xpath/package-info.java b/jaxp/src/java.xml/share/classes/javax/xml/xpath/package-info.java new file mode 100644 index 00000000000..b700c969b63 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/package-info.java @@ -0,0 +1,401 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * + * Provides an object-model neutral API for the + * evaluation of XPath expressions and access to the evaluation + * environment. + * + *

    + * The XPath API supports + * XML Path Language (XPath) Version 1.0 + * + *


    + * + * + *

    + * + *

    1. XPath Overview

    + * + *

    + * The XPath language provides a simple, concise syntax for selecting + * nodes from an XML document. XPath also provides rules for converting a + * node in an XML document object model (DOM) tree to a boolean, double, + * or string value. XPath is a W3C-defined language and an official W3C + * recommendation; the W3C hosts the XML Path Language (XPath) Version + * 1.0 specification. + * + * + *

    + * XPath started in life in 1999 as a supplement to the XSLT and + * XPointer languages, but has more recently become popular as a + * stand-alone language, as a single XPath expression can be used to + * replace many lines of DOM API code. + * + * + * + *

    2. XPath Expressions

    + * + *

    + * An XPath expression is composed of a location + * path and one or more optional predicates. Expressions + * may also include XPath variables. + * + * + *

    + * The following is an example of a simple XPath expression: + * + *

    + *
    + *     /foo/bar
    + * 
    + *
    + * + *

    + * This example would select the <bar> element in + * an XML document such as the following: + * + *

    + *
    + *     <foo>
    + *         <bar/>
    + *     </foo>
    + * 
    + *
    + * + *

    The expression /foo/bar is an example of a location + * path. While XPath location paths resemble Unix-style file system + * paths, an important distinction is that XPath expressions return + * all nodes that match the expression. Thus, all three + * <bar> elements in the following document would be + * selected by the /foo/bar expression: + * + *

    + *
    + *     <foo>
    + *         <bar/>
    + *         <bar/>
    + *         <bar/>
    + *     </foo>
    + * 
    + *
    + * + *

    + * A special location path operator, //, selects nodes at + * any depth in an XML document. The following example selects all + * <bar> elements regardless of their location in a + * document: + * + *

    + *
    + *     //bar
    + * 
    + *
    + * + *

    + * A wildcard operator, *, causes all element nodes to be selected. + * The following example selects all children elements of a + * <foo> element: + * + *

    + *
    + *     /foo/*
    + * 
    + *
    + * + *

    + * In addition to element nodes, XPath location paths may also address + * attribute nodes, text nodes, comment nodes, and processing instruction + * nodes. The following table gives examples of location paths for each + * of these node types: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Examples of Location Path
    Location PathDescription
    + * /foo/bar/@id + * + * Selects the attribute id of the <bar> element + *
    /foo/bar/text() + * + * Selects the text nodes of the <bar> element. No + * distinction is made between escaped and non-escaped character data. + *
    /foo/bar/comment() + * + * Selects all comment nodes contained in the <bar> element. + *
    /foo/bar/processing-instruction() + * + * Selects all processing-instruction nodes contained in the + * <bar> element. + *
    + * + *

    + * Predicates allow for refining the nodes selected by an XPath + * location path. Predicates are of the form + * [expression]. The following example selects all + * <foo> elements that contain an include + * attribute with the value of true: + * + *

    + *
    + *     //foo[@include='true']
    + * 
    + *
    + * + *

    + * Predicates may be appended to each other to further refine an + * expression, such as: + * + *

    + *
    + *     //foo[@include='true'][@mode='bar']
    + * 
    + *
    + * + * + *

    3. XPath Data Types

    + * + *

    + * While XPath expressions select nodes in the XML document, the XPath + * API allows the selected nodes to be coalesced into one of the + * following data types: + * + *

      + *
    • Boolean
    • + *
    • Number
    • + *
    • String
    • + *
    + * + * + *

    3.1 QName types

    + * The XPath API defines the following {@link javax.xml.namespace.QName} types to + * represent return types of an XPath evaluation: + *
      + *
    • {@link javax.xml.xpath.XPathConstants#NODESET}
    • + *
    • {@link javax.xml.xpath.XPathConstants#NODE}
    • + *
    • {@link javax.xml.xpath.XPathConstants#STRING}
    • + *
    • {@link javax.xml.xpath.XPathConstants#BOOLEAN}
    • + *
    • {@link javax.xml.xpath.XPathConstants#NUMBER}
    • + *
    + * + *

    + * The return type is specified by a {@link javax.xml.namespace.QName} parameter + * in method call used to evaluate the expression, which is either a call to + * XPathExpression.evalute(...) or XPath.evaluate(...) + * methods. + * + *

    + * When a Boolean return type is requested, + * Boolean.TRUE is returned if one or more nodes were + * selected; otherwise, Boolean.FALSE is returned. + * + *

    + * The String return type is a convenience for retrieving + * the character data from a text node, attribute node, comment node, or + * processing-instruction node. When used on an element node, the value + * of the child text nodes is returned. + * + *

    + * The Number return type attempts to coalesce the text + * of a node to a double data type. + * + * + *

    3.2 Class types

    + * In addition to the QName types, the XPath API supports the use of Class types + * through the XPathExpression.evaluteExpression(...) or + * XPath.evaluateExpression(...) methods. + * + * The XPath data types are mapped to Class types as follows: + *
      + *
    • Boolean -- Boolean.class
    • + *
    • Number -- Number.class
    • + *
    • String -- String.class
    • + *
    • Nodeset -- XPathNodes.class
    • + *
    • Node -- Node.class
    • + *
    + * + *

    + * Of the subtypes of Number, only Double, Integer and Long are supported. + * + * + *

    3.3 Enum types

    + * Enum types are defined in {@link javax.xml.xpath.XPathEvaluationResult.XPathResultType} + * that provide mappings between the QName and Class types above. The result of + * evaluating an expression using the XPathExpression.evaluteExpression(...) + * or XPath.evaluateExpression(...) methods will be of one of these types. + * + * + *

    4. XPath Context

    + * + *

    + * XPath location paths may be relative to a particular node in the + * document, known as the context. A context consists of: + *

      + *
    • a node (the context node)
    • + *
    • a pair of non-zero positive integers (the context position and the context size)
    • + *
    • a set of variable bindings
    • + *
    • a function library
    • + *
    • the set of namespace declarations in scope for the expression
    • + *
    + * + *

    + * It is an XML document tree represented as a hierarchy of nodes, a + * {@link org.w3c.dom.Node} for example, in the JDK implementation. + * + * + *

    5. Using the XPath API

    + * + * Consider the following XML document: + *
    + *
    + * <widgets>
    + * <widget>
    + * <manufacturer/>
    + * <dimensions/>
    + * </widget>
    + * </widgets>
    + * 
    + *
    + * + *

    + * The <widget> element can be selected with the following process: + * + *

    + *
    + *     // parse the XML as a W3C Document
    + *     DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    + *     Document document = builder.parse(new File("/widgets.xml"));
    + *
    + *     //Get an XPath object and evaluate the expression
    + *     XPath xpath = XPathFactory.newInstance().newXPath();
    + *     String expression = "/widgets/widget";
    + *     Node widgetNode = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);
    + *
    + *     //or using the evaluateExpression method
    + *     Node widgetNode = xpath.evaluateExpression(expression, document, Node.class);
    + * 
    + *
    + * + *

    + * With a reference to the <widget> element, a + * relative XPath expression can be written to select the + * <manufacturer> child element: + * + *

    + *
    + *     XPath xpath = XPathFactory.newInstance().newXPath();
    + *     String expression = "manufacturer";
    + *     Node manufacturerNode = (Node) xpath.evaluate(expression, widgetNode, XPathConstants.NODE);
    + *
    + *     //or using the evaluateExpression method
    + *     Node manufacturerNode = xpath.evaluateExpression(expression, widgetNode, Node.class);
    + * 
    + *
    + * + *

    + * In the above example, the XML file is read into a DOM Document before being passed + * to the XPath API. The following code demonstrates the use of InputSource to + * leave it to the XPath implementation to process it: + * + *

    + *
    + *     XPath xpath = XPathFactory.newInstance().newXPath();
    + *     String expression = "/widgets/widget";
    + *     InputSource inputSource = new InputSource("widgets.xml");
    + *     NodeList nodes = (NodeList) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);
    + *
    + *     //or using the evaluateExpression method
    + *     XPathNodes nodes = xpath.evaluate(expression, inputSource, XPathNodes.class);
    + * 
    + *
    + * + *

    + * In the above cases, the type of the expected results are known. In case where + * the result type is unknown or any type, the {@link javax.xml.xpath.XPathEvaluationResult} + * may be used to determine the return type. The following code demonstrates the usage: + *

    + *
    + *     XPathEvaluationResult<?> result = xpath.evaluateExpression(expression, document);
    + *     switch (result.type()) {
    + *         case NODESET:
    + *             XPathNodes nodes = (XPathNodes)result.value();
    + *             ...
    + *             break;
    + *     }
    + * 
    + *
    + * + *

    + * The XPath 1.0 Number data type is defined as a double. However, the XPath + * specification also provides functions that returns Integer type. To facilitate + * such operations, the XPath API allows Integer and Long to be used in + * {@code evaluateExpression} method such as the following code: + *

    + *
    + *     int count = xpath.evaluate("count(/widgets/widget)", document, Integer.class);
    + * 
    + *
    + * + * @since 1.5 + * + */ + +package javax.xml.xpath; diff --git a/jaxp/src/java.xml/share/classes/javax/xml/xpath/package.html b/jaxp/src/java.xml/share/classes/javax/xml/xpath/package.html deleted file mode 100644 index 585160a726e..00000000000 --- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/package.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - -This package provides an object-model neutral API for the -evaluation of XPath expressions and access to the evaluation -environment. - -

    -The XPath API supports - XML Path Language (XPath) Version 1.0 - -


    - - -

    - -

    1. XPath Overview

    - -

    The XPath language provides a simple, concise syntax for selecting -nodes from an XML document. XPath also provides rules for converting a -node in an XML document object model (DOM) tree to a boolean, double, -or string value. XPath is a W3C-defined language and an official W3C -recommendation; the W3C hosts the XML Path Language (XPath) Version -1.0 specification. -

    - -

    XPath started in life in 1999 as a supplement to the XSLT and -XPointer languages, but has more recently become popular as a -stand-alone language, as a single XPath expression can be used to -replace many lines of DOM API code. -

    - - -

    2. XPath Expressions

    - -

    An XPath expression is composed of a location -path and one or more optional predicates. Expressions -may also include XPath variables. -

    - -

    The following is an example of a simple XPath expression:

    - -
    -
    -/foo/bar
    -
    -
    - -

    This example would select the <bar> element in -an XML document such as the following:

    - -
    -
    -<foo>
    -    <bar/>
    -</foo>
    -
    -
    - -

    The expression /foo/bar is an example of a location -path. While XPath location paths resemble Unix-style file system -paths, an important distinction is that XPath expressions return -all nodes that match the expression. Thus, all three -<bar> elements in the following document would be -selected by the /foo/bar expression:

    - -
    -
    -<foo>
    -    <bar/>
    -    <bar/>
    -    <bar/>
    -</foo>
    -
    -
    - -

    A special location path operator, //, selects nodes at -any depth in an XML document. The following example selects all -<bar> elements regardless of their location in a -document:

    - -
    -
    -//bar
    -
    -
    - -

    A wildcard operator, *, causes all element nodes to be selected. -The following example selects all children elements of a -<foo> element: - -

    -
    -/foo/*
    -
    -
    - -

    In addition to element nodes, XPath location paths may also address -attribute nodes, text nodes, comment nodes, and processing instruction -nodes. The following table gives examples of location paths for each -of these node types:

    - - - - - - - - - - - - - - - - - - - - - - -
    Location PathDescription
    -/foo/bar/@id -Selects the attribute id of the <bar> element -
    /foo/bar/text() -Selects the text nodes of the <bar> element. No -distinction is made between escaped and non-escaped character data. -
    /foo/bar/comment() -Selects all comment nodes contained in the <bar> element. -
    /foo/bar/processing-instruction() -Selects all processing-instruction nodes contained in the -<bar> element. -
    - -

    Predicates allow for refining the nodes selected by an XPath -location path. Predicates are of the form -[expression]. The following example selects all -<foo> elements that contain an include -attribute with the value of true:

    - -
    -
    -//foo[@include='true']
    -
    -
    - -

    Predicates may be appended to each other to further refine an -expression, such as:

    - -
    -
    -//foo[@include='true'][@mode='bar']
    -
    -
    - - -

    3. XPath Data Types

    - -

    While XPath expressions select nodes in the XML document, the XPath -API allows the selected nodes to be coalesced into one of the -following data types:

    - -
      -
    • Boolean
    • -
    • Number
    • -
    • String
    • -
    - - -

    3.1 QName types

    -The XPath API defines the following {@link javax.xml.namespace.QName} types to -represent return types of an XPath evaluation: -
      -
    • {@link javax.xml.xpath.XPathConstants#NODESET}
    • -
    • {@link javax.xml.xpath.XPathConstants#NODE}
    • -
    • {@link javax.xml.xpath.XPathConstants#STRING}
    • -
    • {@link javax.xml.xpath.XPathConstants#BOOLEAN}
    • -
    • {@link javax.xml.xpath.XPathConstants#NUMBER}
    • -
    - -

    The return type is specified by a {@link javax.xml.namespace.QName} parameter -in method call used to evaluate the expression, which is either a call to -XPathExpression.evalute(...) or XPath.evaluate(...) -methods. - -

    When a Boolean return type is requested, -Boolean.TRUE is returned if one or more nodes were -selected; otherwise, Boolean.FALSE is returned. - -

    The String return type is a convenience for retrieving -the character data from a text node, attribute node, comment node, or -processing-instruction node. When used on an element node, the value -of the child text nodes is returned. - -

    The Number return type attempts to coalesce the text -of a node to a double data type. - - -

    3.2 Class types

    -In addition to the QName types, the XPath API supports the use of Class types -through the XPathExpression.evaluteExpression(...) or -XPath.evaluateExpression(...) methods. - -The XPath data types are mapped to Class types as follows: -
      -
    • Boolean -- Boolean.class
    • -
    • Number -- Number.class
    • -
    • String -- String.class
    • -
    • Nodeset -- XPathNodes.class
    • -
    • Node -- Node.class
    • -
    - -

    -Of the subtypes of Number, only Double, Integer and Long are supported. - - -

    3.3 Enum types

    -Enum types are defined in {@link javax.xml.xpath.XPathEvaluationResult.XPathResultType} -that provide mappings between the QName and Class types above. The result of -evaluating an expression using the XPathExpression.evaluteExpression(...) -or XPath.evaluateExpression(...) methods will be of one of these types. - - -

    4. XPath Context

    - -

    XPath location paths may be relative to a particular node in the -document, known as the context. A context consists of: -

      -
    • a node (the context node)
    • -
    • a pair of non-zero positive integers (the context position and the context size)
    • -
    • a set of variable bindings
    • -
    • a function library
    • -
    • the set of namespace declarations in scope for the expression
    • -
    - -

    -It is an XML document tree represented as a hierarchy of nodes, a -{@link org.w3c.dom.Node} for example, in the JDK implementation. - - -

    5. Using the XPath API

    - -Consider the following XML document: -
    -
    -<widgets>
    -<widget>
    -<manufacturer/>
    -<dimensions/>
    -</widget>
    -</widgets>
    -
    -
    - -

    -The <widget> element can be selected with the following process: - -

    -
    -// parse the XML as a W3C Document
    -DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    -Document document = builder.parse(new File("/widgets.xml"));
    -
    -//Get an XPath object and evaluate the expression
    -XPath xpath = XPathFactory.newInstance().newXPath();
    -String expression = "/widgets/widget";
    -Node widgetNode = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);
    -
    -//or using the evaluateExpression method
    -Node widgetNode = xpath.evaluateExpression(expression, document, Node.class);
    -
    -
    - -

    With a reference to the <widget> element, a -relative XPath expression can be written to select the -<manufacturer> child element:

    - -
    -
    -XPath xpath = XPathFactory.newInstance().newXPath();
    -String expression = "manufacturer";
    -Node manufacturerNode = (Node) xpath.evaluate(expression, widgetNode, XPathConstants.NODE);
    -
    -//or using the evaluateExpression method
    -Node manufacturerNode = xpath.evaluateExpression(expression, widgetNode, Node.class);
    -
    -
    - -

    -In the above example, the XML file is read into a DOM Document before being passed -to the XPath API. The following code demonstrates the use of InputSource to -leave it to the XPath implementation to process it: - -

    -
    -XPath xpath = XPathFactory.newInstance().newXPath();
    -String expression = "/widgets/widget";
    -InputSource inputSource = new InputSource("widgets.xml");
    -NodeList nodes = (NodeList) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);
    -
    -//or using the evaluateExpression method
    -XPathNodes nodes = xpath.evaluate(expression, inputSource, XPathNodes.class);
    -
    -
    - -

    -In the above cases, the type of the expected results are known. In case where -the result type is unknown or any type, the {@link javax.xml.xpath.XPathEvaluationResult} -may be used to determine the return type. The following code demonstrates the usage: -

    -
    -XPathEvaluationResult<?> result = xpath.evaluateExpression(expression, document);
    -switch (result.type()) {
    -    case NODESET:
    -        XPathNodes nodes = (XPathNodes)result.value();
    -        ...
    -        break;
    -}
    -
    -
    - -

    -The XPath 1.0 Number data type is defined as a double. However, the XPath -specification also provides functions that returns Integer type. To facilitate -such operations, the XPath API allows Integer and Long to be used in -{@code evaluateExpression} method such as the following code: -

    -
    -int count = xpath.evaluate("count(/widgets/widget)", document, Integer.class);
    -
    -
    - -@since 1.5 - - - diff --git a/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlFeatures.java b/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlFeatures.java index 240c386bf56..79e78865415 100644 --- a/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlFeatures.java +++ b/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlFeatures.java @@ -27,6 +27,7 @@ package jdk.xml.internal; import javax.xml.XMLConstants; import static jdk.xml.internal.JdkXmlUtils.SP_USE_CATALOG; +import static jdk.xml.internal.JdkXmlUtils.RESET_SYMBOL_TABLE; /** * This class manages JDK's XML Features. Previously added features and properties @@ -61,7 +62,13 @@ public class JdkXmlFeatures { * The {@link javax.xml.XMLConstants.USE_CATALOG} feature. * FSP: USE_CATALOG is not enforced by FSP. */ - USE_CATALOG(PROPERTY_USE_CATALOG, SP_USE_CATALOG, true, false, true, false); + USE_CATALOG(PROPERTY_USE_CATALOG, SP_USE_CATALOG, true, false, true, false), + + /** + * Feature resetSymbolTable + * FSP: RESET_SYMBOL_TABLE_FEATURE is not enforced by FSP. + */ + RESET_SYMBOL_TABLE_FEATURE(RESET_SYMBOL_TABLE, RESET_SYMBOL_TABLE, false, false, true, false); private final String name; private final String nameSP; diff --git a/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java b/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java index 7611ceb2b75..dfc973161d0 100644 --- a/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java +++ b/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java @@ -51,6 +51,12 @@ public class JdkXmlUtils { public final static String CATALOG_PREFER = CatalogFeatures.Feature.PREFER.getPropertyName(); public final static String CATALOG_RESOLVE = CatalogFeatures.Feature.RESOLVE.getPropertyName(); + /** + * Reset SymbolTable feature + * System property name is identical to feature name + */ + public final static String RESET_SYMBOL_TABLE = "jdk.xml.resetSymbolTable"; + /** * Values for a feature */ @@ -63,6 +69,13 @@ public class JdkXmlUtils { public static final boolean USE_CATALOG_DEFAULT = SecuritySupport.getJAXPSystemProperty(Boolean.class, SP_USE_CATALOG, "true"); + /** + * Default value of RESET_SYMBOL_TABLE. This will read the System property + */ + public static final boolean RESET_SYMBOL_TABLE_DEFAULT + = SecuritySupport.getJAXPSystemProperty(Boolean.class, RESET_SYMBOL_TABLE, "false"); + + /** * JDK features (will be consolidated in the next major feature revamp */ diff --git a/jaxp/src/java.xml/share/classes/module-info.java b/jaxp/src/java.xml/share/classes/module-info.java index d9259677564..53f166f8a82 100644 --- a/jaxp/src/java.xml/share/classes/module-info.java +++ b/jaxp/src/java.xml/share/classes/module-info.java @@ -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 @@ -26,6 +26,20 @@ /** * Defines the Java API for XML Processing (JAXP), the Streaming API for XML (StAX), * the Simple API for XML (SAX), and the W3C Document Object Model (DOM) API. + * + * @uses javax.xml.datatype.DatatypeFactory + * @uses javax.xml.parsers.DocumentBuilderFactory + * @uses javax.xml.parsers.SAXParserFactory + * @uses javax.xml.stream.XMLEventFactory + * @uses javax.xml.stream.XMLInputFactory + * @uses javax.xml.stream.XMLOutputFactory + * @uses javax.xml.transform.TransformerFactory + * @uses javax.xml.validation.SchemaFactory + * @uses javax.xml.xpath.XPathFactory + * @uses org.xml.sax.XMLReader + * + * @moduleGraph + * @since 9 */ module java.xml { exports javax.xml; @@ -53,12 +67,7 @@ module java.xml { exports org.xml.sax; exports org.xml.sax.ext; exports org.xml.sax.helpers; - exports com.sun.org.apache.xerces.internal.dom to - java.xml.ws; - exports com.sun.org.apache.xerces.internal.jaxp to - java.xml.ws; - exports com.sun.org.apache.xerces.internal.util to - java.xml.ws; + exports com.sun.org.apache.xml.internal.dtm to java.xml.crypto; exports com.sun.org.apache.xml.internal.utils to @@ -73,8 +82,7 @@ module java.xml { java.xml.crypto; exports com.sun.org.apache.xpath.internal.res to java.xml.crypto; - // reflection access from com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory - exports com.sun.xml.internal.stream.writers to java.xml.ws; + uses javax.xml.datatype.DatatypeFactory; uses javax.xml.parsers.DocumentBuilderFactory; uses javax.xml.parsers.SAXParserFactory; diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/Attr.java b/jaxp/src/java.xml/share/classes/org/w3c/dom/Attr.java index 8db99e9a6a1..7b125dedb8e 100644 --- a/jaxp/src/java.xml/share/classes/org/w3c/dom/Attr.java +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/Attr.java @@ -111,7 +111,9 @@ package org.w3c.dom; *

    The following table gives some examples of the relations between the * attribute value in the original document (parsed attribute), the value as * exposed in the DOM, and the serialization of the value: - * + *
    + * + * * * * * * + * + * * * @@ -126,7 +130,7 @@ package org.w3c.dom; *
    "x&#178;=5"
    * * * * * + * *
    Examples of the Original, Normalized and Serialized Values
    ExamplesParsed @@ -119,6 +121,8 @@ package org.w3c.dom; * Initial Attr.valueSerialized attribute value
    * Character reference - *
    "x\u00b2=5"
    + *
    "x²=5"
    *
    *
    "x&#178;=5"
    @@ -180,6 +184,7 @@ package org.w3c.dom; *
    Dependent on Implementation and Load OptionsDependent on Implementation and Load/Save Options
    *

    See also the Document Object Model (DOM) Level 3 Core Specification. */ diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/Document.java b/jaxp/src/java.xml/share/classes/org/w3c/dom/Document.java index ab2d6e4f17e..c489fade718 100644 --- a/jaxp/src/java.xml/share/classes/org/w3c/dom/Document.java +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/Document.java @@ -353,37 +353,42 @@ public interface Document extends Node { * instantiate. * @return A new Element object with the following * attributes: - * + *
    + * + * * * * * + * + * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * + * *
    Attributes of the {@code Element} object
    AttributeValue
    Node.nodeName + * Node.nodeName * qualifiedName
    Node.namespaceURI + * Node.namespaceURI * namespaceURI
    Node.prefixprefix, extracted + * Node.prefixprefix, extracted * from qualifiedName, or null if there is * no prefix
    Node.localNamelocal name, extracted from + * Node.localNamelocal name, extracted from * qualifiedName
    Element.tagName + * Element.tagName * qualifiedName
    * @exception DOMException * INVALID_CHARACTER_ERR: Raised if the specified @@ -417,43 +422,48 @@ public interface Document extends Node { * @param qualifiedName The qualified name of the attribute to * instantiate. * @return A new Attr object with the following attributes: - * + *
    + * + * * * * * + * + * * - * - * + * + * * * - * - * + * * * - * - * * * - * - * + * * * - * - * + * * * - * - * + * * + * *
    Attributes of the {@code Attr} object
    * AttributeValue
    Node.nodeNamequalifiedNameNode.nodeNamequalifiedName
    + * * Node.namespaceURInamespaceURInamespaceURI
    + * * Node.prefixprefix, extracted from + * prefix, extracted from * qualifiedName, or null if there is no * prefix
    Node.localNamelocal name, extracted from + * Node.localNamelocal name, extracted from * qualifiedName
    Attr.name + * Attr.name * qualifiedName
    Node.nodeValuethe empty + * Node.nodeValuethe empty * string
    * @exception DOMException * INVALID_CHARACTER_ERR: Raised if the specified diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/Node.java b/jaxp/src/java.xml/share/classes/org/w3c/dom/Node.java index a62ad94d91e..79cbada7935 100644 --- a/jaxp/src/java.xml/share/classes/org/w3c/dom/Node.java +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/Node.java @@ -61,104 +61,109 @@ package org.w3c.dom; *

    The values of nodeName, * nodeValue, and attributes vary according to the * node type as follows: - * + *
    + * + * * * * * * * + * + * * - * - * - * + * - * + * * * - * - * + * - * - * + * * * - * - * + * - * - * + * * * - * - * + * - * - * + * + * * * - * - * - * + * - * + * * * - * - * + * - * - * + * + * * * - * - * - * - * + * + * * * - * - * - * - * + * + * + * * * - * - * - * + * + * - * + * * * - * - * - * + * + * - * + * * * - * - * + * - * - * + * * * - * - * + * - * - * + * * + * *
    Interface table
    InterfacenodeNamenodeValueattributes
    + * * Attrsame as Attr.namesame as + * same as Attr.namesame as * Attr.valuenullnull
    CDATASection + * CDATASection * "#cdata-section"same as CharacterData.data, the + * same as CharacterData.data, the * content of the CDATA Sectionnullnull
    Comment + * Comment * "#comment"same as CharacterData.data, the + * same as CharacterData.data, the * content of the commentnullnull
    Document + * Document * "#document"nullnullnullnull
    + * * DocumentFragment"#document-fragment" + * "#document-fragment" * nullnullnull
    DocumentTypesame as + * DocumentTypesame as * DocumentType.namenullnullnullnull
    + * * Elementsame as Element.tagNamenull + * same as Element.tagNamenull * NamedNodeMap
    Entityentity namenull + * Entityentity namenull * null
    EntityReferencename of entity referenced + * EntityReferencename of entity referenced * nullnullnull
    Notationnotation name + * Notationnotation name * nullnullnull
    ProcessingInstructionsame + * ProcessingInstructionsame * as ProcessingInstruction.targetsame as + * same as * ProcessingInstruction.datanullnull
    Text + * Text * "#text"same as CharacterData.data, the content + * same as CharacterData.data, the content * of the text nodenullnull
    *

    See also the Document Object Model (DOM) Level 3 Core Specification. */ @@ -687,30 +692,35 @@ public interface Node { * textual content. *
    The string returned is made of the text content of this node * depending on its type, as defined below: - * + *
    + * + * * * * * + * + * * - * - * * * - * - * + * * * - * - * + * * + * *
    Node/Content table
    Node typeContent
    + * * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, * DOCUMENT_FRAGMENT_NODEconcatenation of the textContent + * concatenation of the textContent * attribute value of every child node, excluding COMMENT_NODE and * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the * node has no children.
    TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, + * TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, * PROCESSING_INSTRUCTION_NODEnodeValuenodeValue
    DOCUMENT_NODE, + * DOCUMENT_NODE, * DOCUMENT_TYPE_NODE, NOTATION_NODEnullnull
    * @exception DOMException * DOMSTRING_SIZE_ERR: Raised when it would return more characters than @@ -737,30 +747,35 @@ public interface Node { * textual content. *
    The string returned is made of the text content of this node * depending on its type, as defined below: - * + *
    + * + * * * * * + * + * * - * - * * * - * - * + * * * - * - * + * * + * *
    Node/Content table
    Node typeContent
    + * * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, * DOCUMENT_FRAGMENT_NODEconcatenation of the textContent + * concatenation of the textContent * attribute value of every child node, excluding COMMENT_NODE and * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the * node has no children.
    TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, + * TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, * PROCESSING_INSTRUCTION_NODEnodeValuenodeValue
    DOCUMENT_NODE, + * DOCUMENT_NODE, * DOCUMENT_TYPE_NODE, NOTATION_NODEnullnull
    * @exception DOMException * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/bootstrap/package-info.java b/jaxp/src/java.xml/share/classes/org/w3c/dom/bootstrap/package-info.java new file mode 100644 index 00000000000..e05d14562af --- /dev/null +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/bootstrap/package-info.java @@ -0,0 +1,32 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides a factory for obtaining instances of DOMImplementation. + * + * @since 1.5 + */ + +package org.w3c.dom.bootstrap; diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/events/package-info.java b/jaxp/src/java.xml/share/classes/org/w3c/dom/events/package-info.java new file mode 100644 index 00000000000..2792c7c3d3e --- /dev/null +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/events/package-info.java @@ -0,0 +1,42 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + *

    + * Provides interfaces for DOM Level 2 Events. Refer to the + * + * Document Object Model (DOM) Level 2 Events Specification + * , the DOM Events module builds on + * + * DOM Level 2 Core Specification and + * + * DOM Level 2 Views Specification + * that gives to programs and scripts a generic event system. + * + * + * @since 1.5 + */ + +package org.w3c.dom.events; diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/ls/package-info.java b/jaxp/src/java.xml/share/classes/org/w3c/dom/ls/package-info.java new file mode 100644 index 00000000000..b1369d3ccc8 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/ls/package-info.java @@ -0,0 +1,39 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + *

    + * Provides interfaces for DOM Level 3 Load and Save. Refer to the + * + * Document Object Model (DOM) Level 3 Load and Save Specification, + * the Load and Save interface allows programs and scripts to dynamically + * load the content of an XML document into a DOM document and serialize a DOM + * document into an XML document. + * + * + * @since 1.5 + */ + +package org.w3c.dom.ls; diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/package-info.java b/jaxp/src/java.xml/share/classes/org/w3c/dom/package-info.java new file mode 100644 index 00000000000..e092bbebe40 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/package-info.java @@ -0,0 +1,38 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +/** + * Provides the interfaces for the Document Object Model (DOM). Supports the + * + * Document Object Model (DOM) Level 2 Core Specification, + * + * Document Object Model (DOM) Level 3 Core Specification, + * and + * Document Object Model (DOM) Level 3 Load and Save Specification. + * + * + * @since 1.4 + */ + +package org.w3c.dom; diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/package.html b/jaxp/src/java.xml/share/classes/org/w3c/dom/package.html deleted file mode 100644 index 673366bf326..00000000000 --- a/jaxp/src/java.xml/share/classes/org/w3c/dom/package.html +++ /dev/null @@ -1,13 +0,0 @@ - - -org.w3c.dom package - - -Provides the interfaces for the Document Object Model (DOM). Supports the -Document Object Model (DOM) Level 2 Core Specification, -Document Object Model (DOM) Level 3 Core Specification, -and Document Object Model (DOM) Level 3 Load and Save Specification. - -@since 1.4 - - diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package-info.java b/jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package-info.java new file mode 100644 index 00000000000..ff5d00dfe7c --- /dev/null +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package-info.java @@ -0,0 +1,37 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +/** + *

    + * Provides interfaces for DOM Level 2 Range. Refer to the + * + * Document Object Model (DOM) Level 2 Traversal and Range Specification, + * the Range module defines specialized interfaces for identifying + * and manipulating a range in a document. + * + * + * @since 1.5 + */ + +package org.w3c.dom.ranges; diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package.html b/jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package.html deleted file mode 100644 index 83a1a986ae5..00000000000 --- a/jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package.html +++ /dev/null @@ -1,111 +0,0 @@ - - - W3C IPR SOFTWARE NOTICE - - -

    - Document Object Model Level 2 Traversal and Range is a - platform and language-neutral interfaces that allow programs - and scripts to dynamically traverse and identify a range of - content in a document. The Document Object Model Level 2 - Traversal and Range build on the Document Object Model Level 2 - Core. -

    -

    - The DOM Level 2 Traversal and Range specification is composed - of two modules. The two modules contain specialized interfaces - dedicated to traversing the document structure and identifying - and manipulating a range in a document. -

    -

    - W3C IPR SOFTWARE NOTICE -

    -

    - Copyright © 2000 World Wide Web - Consortium, (Massachusetts - Institute of Technology, Institut - National de Recherche en Informatique et en Automatique, Keio University). All Rights - Reserved. -

    -

    - The DOM bindings are published under the W3C Software Copyright Notice - and License. The software license requires "Notice of any changes or - modifications to the W3C files, including the date changes were made." - Consequently, modified versions of the DOM bindings must document that - they do not conform to the W3C standard; in the case of the IDL binding, - the pragma prefix can no longer be 'w3c.org'; in the case of the Java - binding, the package names can no longer be in the 'org.w3c' package. -

    -

    - Note: The original version of the W3C Software Copyright Notice - and License could be found at http://www.w3.org/Consortium/Legal/copyright-software-19980720 -

    -

    - Copyright © 1994-2000 World Wide Web - Consortium, (Massachusetts - Institute of Technology, Institut - National de Recherche en Informatique et en Automatique, Keio University). All Rights - Reserved. http://www.w3.org/Consortium/Legal/ -

    -

    - This W3C work (including software, documents, or other related items) is - being provided by the copyright holders under the following license. By - obtaining, using and/or copying this work, you (the licensee) agree that - you have read, understood, and will comply with the following terms and - conditions: -

    -

    - Permission to use, copy, and modify this software and its documentation, - with or without modification,  for any purpose and without fee or - royalty is hereby granted, provided that you include the following on ALL - copies of the software and documentation or portions thereof, including - modifications, that you make: -

    -
      -
    1. - The full text of this NOTICE in a location viewable to users of the - redistributed or derivative work. -
    2. -
    3. - Any pre-existing intellectual property disclaimers, notices, or terms - and conditions. If none exist, a short notice of the following form - (hypertext is preferred, text is permitted) should be used within the - body of any redistributed or derivative code: "Copyright © - [$date-of-software] World Wide Web - Consortium, (Massachusetts - Institute of Technology, Institut - National de Recherche en Informatique et en Automatique, Keio University). All Rights - Reserved. http://www.w3.org/Consortium/Legal/" -
    4. -
    5. - Notice of any changes or modifications to the W3C files, including the - date changes were made. (We recommend you provide URIs to the location - from which the code is derived.) -
    6. -
    -

    - THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT - HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS - FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR - DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, - TRADEMARKS OR OTHER RIGHTS. -

    -

    - COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR - CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR - DOCUMENTATION. -

    -

    - The name and trademarks of copyright holders may NOT be used in - advertising or publicity pertaining to the software without specific, - written prior permission. Title to copyright in this software and any - associated documentation will at all times remain with copyright - holders. -

    - - diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/traversal/package-info.java b/jaxp/src/java.xml/share/classes/org/w3c/dom/traversal/package-info.java new file mode 100644 index 00000000000..c532be864e7 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/traversal/package-info.java @@ -0,0 +1,36 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +/** + *

    + * Provides interfaces for DOM Level 2 Traversal. Refer to the + * + * Document Object Model (DOM) Level 2 Traversal and Range Specification, + * the Traversal module contains specialized interfaces dedicated to + * traversing the document structure. + * + * @since 1.5 + */ + +package org.w3c.dom.traversal; diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/views/package-info.java b/jaxp/src/java.xml/share/classes/org/w3c/dom/views/package-info.java new file mode 100644 index 00000000000..a2b59efb1c4 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/views/package-info.java @@ -0,0 +1,37 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces for DOM Level 2 Views. Refer to the + * + * Document Object Model (DOM) Level 2 Views Specification, + * the Views module allows programs and scripts to dynamically access and update + * the content of a representation of a document. + * + * + * @since 1.8 + */ + +package org.w3c.dom.views; diff --git a/jaxp/src/java.xml/share/classes/org/xml/sax/AttributeList.java b/jaxp/src/java.xml/share/classes/org/xml/sax/AttributeList.java index f79d5067c31..4a8c0b8394f 100644 --- a/jaxp/src/java.xml/share/classes/org/xml/sax/AttributeList.java +++ b/jaxp/src/java.xml/share/classes/org/xml/sax/AttributeList.java @@ -93,7 +93,7 @@ package org.xml.sax; * @see org.xml.sax.DocumentHandler#startElement startElement * @see org.xml.sax.helpers.AttributeListImpl AttributeListImpl */ -@Deprecated(since="5") +@Deprecated(since="1.5") public interface AttributeList { diff --git a/jaxp/src/java.xml/share/classes/org/xml/sax/DocumentHandler.java b/jaxp/src/java.xml/share/classes/org/xml/sax/DocumentHandler.java index 91cdac156ca..ef1093daeb3 100644 --- a/jaxp/src/java.xml/share/classes/org/xml/sax/DocumentHandler.java +++ b/jaxp/src/java.xml/share/classes/org/xml/sax/DocumentHandler.java @@ -68,7 +68,7 @@ package org.xml.sax; * @see org.xml.sax.Locator * @see org.xml.sax.HandlerBase */ -@Deprecated(since="5") +@Deprecated(since="1.5") public interface DocumentHandler { diff --git a/jaxp/src/java.xml/share/classes/org/xml/sax/Parser.java b/jaxp/src/java.xml/share/classes/org/xml/sax/Parser.java index fef6e44843b..5da78c5164e 100644 --- a/jaxp/src/java.xml/share/classes/org/xml/sax/Parser.java +++ b/jaxp/src/java.xml/share/classes/org/xml/sax/Parser.java @@ -73,7 +73,7 @@ import java.util.Locale; * @see org.xml.sax.HandlerBase * @see org.xml.sax.InputSource */ -@Deprecated(since="5") +@Deprecated(since="1.5") public interface Parser { diff --git a/jaxp/src/java.xml/share/classes/org/xml/sax/ext/package-info.java b/jaxp/src/java.xml/share/classes/org/xml/sax/ext/package-info.java new file mode 100644 index 00000000000..a583af72e2d --- /dev/null +++ b/jaxp/src/java.xml/share/classes/org/xml/sax/ext/package-info.java @@ -0,0 +1,72 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces to SAX2 facilities that + * conformant SAX drivers won't necessarily support. + * + *

    + * See http://www.saxproject.org + * for more information about SAX. + * + *

    + * This package is independent of the SAX2 core, though the functionality + * exposed generally needs to be implemented within a parser core. + * That independence has several consequences: + * + *

      + * + *
    • SAX2 drivers are not required to recognize these handlers. + *
    • + * + *
    • You cannot assume that the class files will be present in every SAX2 + * installation.
    • + * + *
    • This package may be updated independently of SAX2 (i.e. new + * handlers and classes may be added without updating SAX2 itself).
    • + * + *
    • The new handlers are not implemented by the SAX2 + * org.xml.sax.helpers.DefaultHandler or + * org.xml.sax.helpers.XMLFilterImpl classes. + * You can subclass these if you need such behavior, or + * use the helper classes found here.
    • + * + *
    • The handlers need to be registered differently than core SAX2 + * handlers.
    • + * + *
    + * + *

    This package, SAX2-ext, is a standardized extension to SAX2. It is + * designed both to allow SAX parsers to pass certain types of information + * to applications, and to serve as a simple model for other SAX2 parser + * extension packages. Not all such extension packages should need to + * be recognized directly by parsers, however. + * As an example, most validation systems can be cleanly layered on top + * of parsers supporting the standardized SAX2 interfaces. + * + * @since 1.4 + */ + +package org.xml.sax.ext; diff --git a/jaxp/src/java.xml/share/classes/org/xml/sax/ext/package.html b/jaxp/src/java.xml/share/classes/org/xml/sax/ext/package.html deleted file mode 100644 index 74d63a5fba3..00000000000 --- a/jaxp/src/java.xml/share/classes/org/xml/sax/ext/package.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - -

    -This package contains interfaces to SAX2 facilities that -conformant SAX drivers won't necessarily support. - -

    See http://www.saxproject.org -for more information about SAX.

    - -

    This package is independent of the SAX2 core, though the functionality -exposed generally needs to be implemented within a parser core. -That independence has several consequences:

    - -
      - -
    • SAX2 drivers are not required to recognize these handlers. -
    • - -
    • You cannot assume that the class files will be present in every SAX2 -installation.
    • - -
    • This package may be updated independently of SAX2 (i.e. new -handlers and classes may be added without updating SAX2 itself).
    • - -
    • The new handlers are not implemented by the SAX2 -org.xml.sax.helpers.DefaultHandler or -org.xml.sax.helpers.XMLFilterImpl classes. -You can subclass these if you need such behavior, or -use the helper classes found here.
    • - -
    • The handlers need to be registered differently than core SAX2 -handlers.
    • - -
    - -

    This package, SAX2-ext, is a standardized extension to SAX2. It is -designed both to allow SAX parsers to pass certain types of information -to applications, and to serve as a simple model for other SAX2 parser -extension packages. Not all such extension packages should need to -be recognized directly by parsers, however. -As an example, most validation systems can be cleanly layered on top -of parsers supporting the standardized SAX2 interfaces.

    - - diff --git a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/ParserFactory.java b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/ParserFactory.java index 6e658867220..d3a30e87cb9 100644 --- a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/ParserFactory.java +++ b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/ParserFactory.java @@ -64,7 +64,7 @@ package org.xml.sax.helpers; * @version 2.0.1 (sax2r2) */ @SuppressWarnings( "deprecation" ) -@Deprecated(since="5") +@Deprecated(since="1.5") public class ParserFactory { private static SecuritySupport ss = new SecuritySupport(); diff --git a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/package-info.java b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/package-info.java new file mode 100644 index 00000000000..6c1cbff3865 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/package-info.java @@ -0,0 +1,38 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * + * Provides helper classes, including + * support for bootstrapping SAX-based applications. + * + *

    + * See http://www.saxproject.org + * for more information about SAX. + * + * @since 1.4 + */ + +package org.xml.sax.helpers; diff --git a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/package.html b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/package.html deleted file mode 100644 index 001f0e277aa..00000000000 --- a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/package.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - -

    This package contains "helper" classes, including -support for bootstrapping SAX-based applications. - -

    See http://www.saxproject.org -for more information about SAX.

    - - diff --git a/jaxp/src/java.xml/share/classes/org/xml/sax/package-info.java b/jaxp/src/java.xml/share/classes/org/xml/sax/package-info.java new file mode 100644 index 00000000000..419f3e7ab50 --- /dev/null +++ b/jaxp/src/java.xml/share/classes/org/xml/sax/package-info.java @@ -0,0 +1,327 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides the core SAX APIs. + * Some SAX1 APIs are deprecated to encourage integration of + * namespace-awareness into designs of new applications + * and into maintenance of existing infrastructure. + * + *

    + * See http://www.saxproject.org + * for more information about SAX. + * + * + *

    SAX2 Standard Feature Flags

    + * + *

    + * One of the essential characteristics of SAX2 is that it added + * feature flags which can be used to examine and perhaps modify + * parser modes, in particular modes such as validation. + * Since features are identified by (absolute) URIs, anyone + * can define such features. + * Currently defined standard feature URIs have the prefix + * http://xml.org/sax/features/ before an identifier such as + * validation. Turn features on or off using + * setFeature. Those standard identifiers are: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Feature IDAccessDefaultDescription
    external-general-entitiesread/writeunspecified Reports whether this parser processes external + * general entities; always true if validating. + *
    external-parameter-entitiesread/writeunspecified Reports whether this parser processes external + * parameter entities; always true if validating. + *
    is-standalone(parsing) read-only, (not parsing) nonenot applicable May be examined only during a parse, after the + * startDocument() callback has been completed; read-only. + * The value is true if the document specified standalone="yes" in + * its XML declaration, and otherwise is false. + *
    lexical-handler/parameter-entitiesread/writeunspecified A value of "true" indicates that the LexicalHandler will report + * the beginning and end of parameter entities. + *
    namespacesread/writetrue A value of "true" indicates namespace URIs and unprefixed local names + * for element and attribute names will be available. + *
    namespace-prefixesread/writefalse A value of "true" indicates that XML qualified names (with prefixes) and + * attributes (including xmlns* attributes) will be available. + *
    resolve-dtd-urisread/writetrue A value of "true" indicates that system IDs in declarations will + * be absolutized (relative to their base URIs) before reporting. + * (That is the default behavior for all SAX2 XML parsers.) + * A value of "false" indicates those IDs will not be absolutized; + * parsers will provide the base URI from + * Locator.getSystemId(). + * This applies to system IDs passed in
      + *
    • DTDHandler.notationDecl(), + *
    • DTDHandler.unparsedEntityDecl(), and + *
    • DeclHandler.externalEntityDecl(). + *
    + * It does not apply to EntityResolver.resolveEntity(), + * which is not used to report declarations, or to + * LexicalHandler.startDTD(), which already provides + * the non-absolutized URI. + *
    string-interningread/writeunspecified Has a value of "true" if all XML names (for elements, prefixes, + * attributes, entities, notations, and local names), + * as well as Namespace URIs, will have been interned + * using java.lang.String.intern. This supports fast + * testing of equality/inequality against string constants, + * rather than forcing slower calls to String.equals(). + *
    unicode-normalization-checkingread/writefalse Controls whether the parser reports Unicode normalization + * errors as described in section 2.13 and Appendix B of the + * XML 1.1 Recommendation. If true, Unicode normalization + * errors are reported using the ErrorHandler.error() callback. + * Such errors are not fatal in themselves (though, obviously, + * other Unicode-related encoding errors may be). + *
    use-attributes2read-onlynot applicable Returns "true" if the Attributes objects passed by + * this parser in ContentHandler.startElement() + * implement the org.xml.sax.ext.Attributes2 interface. + * That interface exposes additional DTD-related information, + * such as whether the attribute was specified in the + * source text rather than defaulted. + *
    use-locator2read-onlynot applicable Returns "true" if the Locator objects passed by + * this parser in ContentHandler.setDocumentLocator() + * implement the org.xml.sax.ext.Locator2 interface. + * That interface exposes additional entity information, + * such as the character encoding and XML version used. + *
    use-entity-resolver2read/writetrue Returns "true" if, when setEntityResolver is given + * an object implementing the org.xml.sax.ext.EntityResolver2 interface, + * those new methods will be used. + * Returns "false" to indicate that those methods will not be used. + *
    validationread/writeunspecified Controls whether the parser is reporting all validity + * errors; if true, all external entities will be read. + *
    xmlns-urisread/writefalse Controls whether, when the namespace-prefixes feature + * is set, the parser treats namespace declaration attributes as + * being in the http://www.w3.org/2000/xmlns/ namespace. + * By default, SAX2 conforms to the original "Namespaces in XML" + * Recommendation, which explicitly states that such attributes are + * not in any namespace. + * Setting this optional flag to "true" makes the SAX2 events conform to + * a later backwards-incompatible revision of that recommendation, + * placing those attributes in a namespace. + *
    xml-1.1read-onlynot applicable Returns "true" if the parser supports both XML 1.1 and XML 1.0. + * Returns "false" if the parser supports only XML 1.0. + *
    + * + *

    + * Support for the default values of the + * namespaces and namespace-prefixes + * properties is required. + * Support for any other feature flags is entirely optional. + * + * + *

    + * For default values not specified by SAX2, + * each XMLReader implementation specifies its default, + * or may choose not to expose the feature flag. + * Unless otherwise specified here, + * implementations may support changing current values + * of these standard feature flags, but not while parsing. + * + * + *

    SAX2 Standard Handler and Property IDs

    + * + *

    + * For parser interface characteristics that are described + * as objects, a separate namespace is defined. The + * objects in this namespace are again identified by URI, and + * the standard property URIs have the prefix + * http://xml.org/sax/properties/ before an identifier such as + * lexical-handler or + * dom-node. Manage those properties using + * setProperty(). Those identifiers are: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Property IDDescription
    declaration-handler Used to see most DTD declarations except those treated + * as lexical ("document element name is ...") or which are + * mandatory for all SAX parsers (DTDHandler). + * The Object must implement org.xml.sax.ext.DeclHandler. + *
    document-xml-version May be examined only during a parse, after the startDocument() + * callback has been completed; read-only. This property is a + * literal string describing the actual XML version of the document, + * such as "1.0" or "1.1". + *
    dom-node For "DOM Walker" style parsers, which ignore their + * parser.parse() parameters, this is used to + * specify the DOM (sub)tree being walked by the parser. + * The Object must implement the + * org.w3c.dom.Node interface. + *
    lexical-handler Used to see some syntax events that are essential in some + * applications: comments, CDATA delimiters, selected general + * entity inclusions, and the start and end of the DTD + * (and declaration of document element name). + * The Object must implement org.xml.sax.ext.LexicalHandler. + *
    xml-string Readable only during a parser callback, this exposes a TBS + * chunk of characters responsible for the current event. + *
    + * + *

    + * All of these standard properties are optional. + * XMLReader implementations are not required to support them. + * + * + * @since 1.4 + */ + +package org.xml.sax; diff --git a/jaxp/src/java.xml/share/classes/org/xml/sax/package.html b/jaxp/src/java.xml/share/classes/org/xml/sax/package.html deleted file mode 100644 index 2af5e4cd47d..00000000000 --- a/jaxp/src/java.xml/share/classes/org/xml/sax/package.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - -

    This package provides the core SAX APIs. -Some SAX1 APIs are deprecated to encourage integration of -namespace-awareness into designs of new applications -and into maintenance of existing infrastructure.

    - -

    See http://www.saxproject.org -for more information about SAX.

    - - -

    SAX2 Standard Feature Flags

    - -

    One of the essential characteristics of SAX2 is that it added -feature flags which can be used to examine and perhaps modify -parser modes, in particular modes such as validation. -Since features are identified by (absolute) URIs, anyone -can define such features. -Currently defined standard feature URIs have the prefix -http://xml.org/sax/features/ before an identifier such as -validation. Turn features on or off using -setFeature. Those standard identifiers are:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Feature IDAccessDefaultDescription
    external-general-entitiesread/writeunspecified Reports whether this parser processes external - general entities; always true if validating. -
    external-parameter-entitiesread/writeunspecified Reports whether this parser processes external - parameter entities; always true if validating. -
    is-standalone(parsing) read-only, (not parsing) nonenot applicable May be examined only during a parse, after the - startDocument() callback has been completed; read-only. - The value is true if the document specified standalone="yes" in - its XML declaration, and otherwise is false. -
    lexical-handler/parameter-entitiesread/writeunspecified A value of "true" indicates that the LexicalHandler will report - the beginning and end of parameter entities. -
    namespacesread/writetrue A value of "true" indicates namespace URIs and unprefixed local names - for element and attribute names will be available. -
    namespace-prefixesread/writefalse A value of "true" indicates that XML qualified names (with prefixes) and - attributes (including xmlns* attributes) will be available. -
    resolve-dtd-urisread/writetrue A value of "true" indicates that system IDs in declarations will - be absolutized (relative to their base URIs) before reporting. - (That is the default behavior for all SAX2 XML parsers.) - A value of "false" indicates those IDs will not be absolutized; - parsers will provide the base URI from - Locator.getSystemId(). - This applies to system IDs passed in
      -
    • DTDHandler.notationDecl(), -
    • DTDHandler.unparsedEntityDecl(), and -
    • DeclHandler.externalEntityDecl(). -
    - It does not apply to EntityResolver.resolveEntity(), - which is not used to report declarations, or to - LexicalHandler.startDTD(), which already provides - the non-absolutized URI. -
    string-interningread/writeunspecified Has a value of "true" if all XML names (for elements, prefixes, - attributes, entities, notations, and local names), - as well as Namespace URIs, will have been interned - using java.lang.String.intern. This supports fast - testing of equality/inequality against string constants, - rather than forcing slower calls to String.equals(). -
    unicode-normalization-checkingread/writefalse Controls whether the parser reports Unicode normalization - errors as described in section 2.13 and Appendix B of the - XML 1.1 Recommendation. If true, Unicode normalization - errors are reported using the ErrorHandler.error() callback. - Such errors are not fatal in themselves (though, obviously, - other Unicode-related encoding errors may be). -
    use-attributes2read-onlynot applicable Returns "true" if the Attributes objects passed by - this parser in ContentHandler.startElement() - implement the org.xml.sax.ext.Attributes2 interface. - That interface exposes additional DTD-related information, - such as whether the attribute was specified in the - source text rather than defaulted. -
    use-locator2read-onlynot applicable Returns "true" if the Locator objects passed by - this parser in ContentHandler.setDocumentLocator() - implement the org.xml.sax.ext.Locator2 interface. - That interface exposes additional entity information, - such as the character encoding and XML version used. -
    use-entity-resolver2read/writetrue Returns "true" if, when setEntityResolver is given - an object implementing the org.xml.sax.ext.EntityResolver2 interface, - those new methods will be used. - Returns "false" to indicate that those methods will not be used. -
    validationread/writeunspecified Controls whether the parser is reporting all validity - errors; if true, all external entities will be read. -
    xmlns-urisread/writefalse Controls whether, when the namespace-prefixes feature - is set, the parser treats namespace declaration attributes as - being in the http://www.w3.org/2000/xmlns/ namespace. - By default, SAX2 conforms to the original "Namespaces in XML" - Recommendation, which explicitly states that such attributes are - not in any namespace. - Setting this optional flag to "true" makes the SAX2 events conform to - a later backwards-incompatible revision of that recommendation, - placing those attributes in a namespace. -
    xml-1.1read-onlynot applicable Returns "true" if the parser supports both XML 1.1 and XML 1.0. - Returns "false" if the parser supports only XML 1.0. -
    - -

    Support for the default values of the -namespaces and namespace-prefixes -properties is required. -Support for any other feature flags is entirely optional. -

    - -

    For default values not specified by SAX2, -each XMLReader implementation specifies its default, -or may choose not to expose the feature flag. -Unless otherwise specified here, -implementations may support changing current values -of these standard feature flags, but not while parsing. -

    - -

    SAX2 Standard Handler and Property IDs

    - -

    For parser interface characteristics that are described -as objects, a separate namespace is defined. The -objects in this namespace are again identified by URI, and -the standard property URIs have the prefix -http://xml.org/sax/properties/ before an identifier such as -lexical-handler or -dom-node. Manage those properties using -setProperty(). Those identifiers are:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Property IDDescription
    declaration-handler Used to see most DTD declarations except those treated - as lexical ("document element name is ...") or which are - mandatory for all SAX parsers (DTDHandler). - The Object must implement org.xml.sax.ext.DeclHandler. -
    document-xml-version May be examined only during a parse, after the startDocument() - callback has been completed; read-only. This property is a - literal string describing the actual XML version of the document, - such as "1.0" or "1.1". -
    dom-node For "DOM Walker" style parsers, which ignore their - parser.parse() parameters, this is used to - specify the DOM (sub)tree being walked by the parser. - The Object must implement the - org.w3c.dom.Node interface. -
    lexical-handler Used to see some syntax events that are essential in some - applications: comments, CDATA delimiters, selected general - entity inclusions, and the start and end of the DTD - (and declaration of document element name). - The Object must implement org.xml.sax.ext.LexicalHandler. -
    xml-string Readable only during a parser callback, this exposes a TBS - chunk of characters responsible for the current event.
    - -

    All of these standard properties are optional; -XMLReader implementations need not support them. -

    - - diff --git a/jaxp/src/java.xml/share/legal/bcel.md b/jaxp/src/java.xml/share/legal/bcel.md index 3ac4532e1f6..8c6a3cf0e40 100644 --- a/jaxp/src/java.xml/share/legal/bcel.md +++ b/jaxp/src/java.xml/share/legal/bcel.md @@ -1,6 +1,6 @@ -## Apache Byte Code Engineering Library v5.2 +## Apache Byte Code Engineering Library (BCEL) v5.2 -### Notice +### Apache BCEL Notice
     
         =========================================================================
    diff --git a/jaxp/src/java.xml/share/legal/dom.md b/jaxp/src/java.xml/share/legal/dom.md
    index de63edd485c..b0fb1ae76d4 100644
    --- a/jaxp/src/java.xml/share/legal/dom.md
    +++ b/jaxp/src/java.xml/share/legal/dom.md
    @@ -1,6 +1,6 @@
    -## DOM Level 3 core specification, v1.0
    +## DOM Level 3 Core Specification v1.0
     
    -## W3C License
    +### W3C License
     
     
     W3C SOFTWARE NOTICE AND LICENSE
    diff --git a/jaxp/src/java.xml/share/legal/xalan.md b/jaxp/src/java.xml/share/legal/xalan.md
    index 5c1749b3721..94b293164df 100644
    --- a/jaxp/src/java.xml/share/legal/xalan.md
    +++ b/jaxp/src/java.xml/share/legal/xalan.md
    @@ -1,6 +1,6 @@
     ## Apache Xalan v2.7.1
     
    -### Notice
    +### Apache Xalan Notice
     
     
         ======================================================================================
    diff --git a/jaxp/src/java.xml/share/legal/xerces.md b/jaxp/src/java.xml/share/legal/xerces.md
    index 438419b13c9..ff0167bc835 100644
    --- a/jaxp/src/java.xml/share/legal/xerces.md
    +++ b/jaxp/src/java.xml/share/legal/xerces.md
    @@ -1,7 +1,7 @@
     ## Apache Xerces v2.11.0
     
    -### Notice
    -
    +### Apache Xerces Notice
    +
         =========================================================================
         == NOTICE file corresponding to section 4(d) of the Apache License, ==
         == Version 2.0, in this case for the Apache Xerces Java distribution. ==
    @@ -17,6 +17,7 @@
         - voluntary contributions made by Paul Eng on behalf of the
         Apache Software Foundation that were originally developed at iClick, Inc.,
         software copyright (c) 1999.
    +
    ### Apache 2.0 License
    diff --git a/jaxp/src/java.xml/share/legal/xmlresolver.md b/jaxp/src/java.xml/share/legal/xmlresolver.md
    index cf18bb439b3..696f8d3e148 100644
    --- a/jaxp/src/java.xml/share/legal/xmlresolver.md
    +++ b/jaxp/src/java.xml/share/legal/xmlresolver.md
    @@ -1,6 +1,6 @@
     ## Apache XML Resolver Library v1.2
     
    -### Notice
    +### Apache XML Resolver Notice
     
     
     Apache XML Commons Resolver
    diff --git a/jaxp/src/jdk.xml.dom/share/classes/module-info.java b/jaxp/src/jdk.xml.dom/share/classes/module-info.java
    index 6828629b489..d033c2a76a6 100644
    --- a/jaxp/src/jdk.xml.dom/share/classes/module-info.java
    +++ b/jaxp/src/jdk.xml.dom/share/classes/module-info.java
    @@ -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
    @@ -23,8 +23,16 @@
      * questions.
      */
     
    +/**
    + * Defines the subset of the W3C Document Object Model (DOM) API that is not part
    + * of the Java SE API.
    + *
    + * @moduleGraph
    + * @since 9
    + */
     module jdk.xml.dom {
         requires transitive java.xml;
    +
         exports org.w3c.dom.css;
         exports org.w3c.dom.html;
         exports org.w3c.dom.stylesheets;
    diff --git a/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/package-info.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/package-info.java
    new file mode 100644
    index 00000000000..ae2acd8116b
    --- /dev/null
    +++ b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/package-info.java
    @@ -0,0 +1,38 @@
    +/*
    + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
    + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    + *
    + * This code is free software; you can redistribute it and/or modify it
    + * under the terms of the GNU General Public License version 2 only, as
    + * published by the Free Software Foundation.  Oracle designates this
    + * particular file as subject to the "Classpath" exception as provided
    + * by Oracle in the LICENSE file that accompanied this code.
    + *
    + * This code is distributed in the hope that it will be useful, but WITHOUT
    + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    + * version 2 for more details (a copy is included in the LICENSE file that
    + * accompanied this code).
    + *
    + * You should have received a copy of the GNU General Public License version
    + * 2 along with this work; if not, write to the Free Software Foundation,
    + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    + *
    + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    + * or visit www.oracle.com if you need additional information or have any
    + * questions.
    + */
    +
    +/**
    + * Provides interfaces for DOM Level 2 Style Specification. Refer to the
    + * 
    + *     Document Object Model (DOM) Level 2 Style Specification,
    + * the CSS and stylesheets modules define the Document Object Model Level 2 Style
    + * Sheets and Cascading Style Sheets (CSS) that allow programs and scripts to
    + * dynamically access and update the content of style sheets documents.
    + *
    + *
    + * @since 1.4
    + */
    +
    +package org.w3c.dom.css;
    diff --git a/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/package-info.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/package-info.java
    new file mode 100644
    index 00000000000..3cc7ddd9a0a
    --- /dev/null
    +++ b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/package-info.java
    @@ -0,0 +1,39 @@
    +/*
    + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
    + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    + *
    + * This code is free software; you can redistribute it and/or modify it
    + * under the terms of the GNU General Public License version 2 only, as
    + * published by the Free Software Foundation.  Oracle designates this
    + * particular file as subject to the "Classpath" exception as provided
    + * by Oracle in the LICENSE file that accompanied this code.
    + *
    + * This code is distributed in the hope that it will be useful, but WITHOUT
    + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    + * version 2 for more details (a copy is included in the LICENSE file that
    + * accompanied this code).
    + *
    + * You should have received a copy of the GNU General Public License version
    + * 2 along with this work; if not, write to the Free Software Foundation,
    + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    + *
    + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    + * or visit www.oracle.com if you need additional information or have any
    + * questions.
    + */
    +
    +/**
    + * Provides interfaces for DOM Level 2 HTML Specification. Refer to the
    + * 
    + * Document Object Model (DOM) Level 2 Specification,
    + * the HTML module extends the Core API to describe objects and methods specific
    + * to HTML documents that comply with
    + * 
    + * HTML 4.0 Specification.
    + *
    + *
    + * @since 1.4
    + */
    +
    +package org.w3c.dom.html;
    diff --git a/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/package-info.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/package-info.java
    new file mode 100644
    index 00000000000..d4c8037c5c9
    --- /dev/null
    +++ b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/package-info.java
    @@ -0,0 +1,38 @@
    +/*
    + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
    + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    + *
    + * This code is free software; you can redistribute it and/or modify it
    + * under the terms of the GNU General Public License version 2 only, as
    + * published by the Free Software Foundation.  Oracle designates this
    + * particular file as subject to the "Classpath" exception as provided
    + * by Oracle in the LICENSE file that accompanied this code.
    + *
    + * This code is distributed in the hope that it will be useful, but WITHOUT
    + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    + * version 2 for more details (a copy is included in the LICENSE file that
    + * accompanied this code).
    + *
    + * You should have received a copy of the GNU General Public License version
    + * 2 along with this work; if not, write to the Free Software Foundation,
    + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    + *
    + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    + * or visit www.oracle.com if you need additional information or have any
    + * questions.
    + */
    +
    +/**
    + * Provides interfaces for DOM Level 2 Style Specification. Refer to the
    + * 
    + *     Document Object Model (DOM) Level 2 Style Specification,
    + * the CSS and stylesheets modules define the Document Object Model Level 2 Style
    + * Sheets and Cascading Style Sheets (CSS) that allow programs and scripts to
    + * dynamically access and update the content of style sheets documents.
    + *
    + *
    + * @since 1.4
    + */
    +
    +package org.w3c.dom.stylesheets;
    diff --git a/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/package-info.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/package-info.java
    new file mode 100644
    index 00000000000..ed8004e226a
    --- /dev/null
    +++ b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/package-info.java
    @@ -0,0 +1,43 @@
    +/*
    + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
    + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    + *
    + * This code is free software; you can redistribute it and/or modify it
    + * under the terms of the GNU General Public License version 2 only, as
    + * published by the Free Software Foundation.  Oracle designates this
    + * particular file as subject to the "Classpath" exception as provided
    + * by Oracle in the LICENSE file that accompanied this code.
    + *
    + * This code is distributed in the hope that it will be useful, but WITHOUT
    + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    + * version 2 for more details (a copy is included in the LICENSE file that
    + * accompanied this code).
    + *
    + * You should have received a copy of the GNU General Public License version
    + * 2 along with this work; if not, write to the Free Software Foundation,
    + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    + *
    + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    + * or visit www.oracle.com if you need additional information or have any
    + * questions.
    + */
    +
    +/**
    + * Provides interfaces for DOM Level 3 XPath Specification. The XPath module
    + * provides simple functionalities to access a DOM tree using
    + * XPath 1.0.
    + * 

    + * The interfaces and classes in this package came from + * Document Object Model (DOM) Level 3 XPath Specification, + * Working Draft 20 August 2002. Refer to + * + * Document Object Model (DOM) Level 3 XPath Specification, Version 1.0, + * W3C Working Group Note 26 February 2004 except that the values of + * {@link XPathException#INVALID_EXPRESSION_ERR} and {@link XPathException#TYPE_ERR} + * are 1 and 2 respectively (instead of 51 and 52). + * + * @since 1.4 + */ + +package org.w3c.dom.xpath; diff --git a/jaxp/test/TEST.ROOT b/jaxp/test/TEST.ROOT index 5f7295efea1..8414a382c8a 100644 --- a/jaxp/test/TEST.ROOT +++ b/jaxp/test/TEST.ROOT @@ -23,7 +23,10 @@ modules=java.xml groups=TEST.groups # Minimum jtreg version -requiredVersion=4.2 b04 +requiredVersion=4.2 b07 # Use new module options useNewOptions=true + +# Use --patch-module instead of -Xmodule: +useNewPatchModule=true diff --git a/jaxp/test/javax/xml/jaxp/functional/catalog/DeferFeatureTest.java b/jaxp/test/javax/xml/jaxp/functional/catalog/DeferFeatureTest.java index f9e25de8bd6..2ee5dafa901 100644 --- a/jaxp/test/javax/xml/jaxp/functional/catalog/DeferFeatureTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/catalog/DeferFeatureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -27,14 +27,16 @@ import static catalog.CatalogTestUtils.DEFER_FALSE; import static catalog.CatalogTestUtils.DEFER_TRUE; import static catalog.CatalogTestUtils.getCatalogPath; import static javax.xml.catalog.CatalogFeatures.Feature.DEFER; -import static javax.xml.catalog.CatalogManager.catalog; import static jaxp.library.JAXPTestUtilities.runWithAllPerm; import static jaxp.library.JAXPTestUtilities.tryRunWithAllPerm; import java.lang.reflect.Method; import javax.xml.catalog.Catalog; +import javax.xml.catalog.CatalogException; import javax.xml.catalog.CatalogFeatures; +import javax.xml.catalog.CatalogManager; +import javax.xml.catalog.CatalogResolver; import org.testng.Assert; import org.testng.annotations.DataProvider; @@ -43,7 +45,7 @@ import org.testng.annotations.Test; /* * @test - * @bug 8077931 + * @bug 8077931 8176405 * @library /javax/xml/jaxp/libs * @modules java.xml/javax.xml.catalog:open * @run testng/othervm -DrunSecMngr=true catalog.DeferFeatureTest @@ -61,6 +63,18 @@ public class DeferFeatureTest { Assert.assertEquals(loadedCatalogCount(catalog), catalogCount); } + @Test(dataProvider = "testDeferFeatureByResolve") + public void testDeferFeatureByResolve(Catalog catalog, int catalogCount) + throws Exception { + CatalogResolver cr = createResolver(catalog); + // trigger loading alternative catalogs + try { + cr.resolveEntity("-//REMOTE//DTD ALICE DOCALICE", "http://remote/dtd/alice/"); + } catch (CatalogException ce) {} + + Assert.assertEquals(loadedCatalogCount(catalog), catalogCount); + } + @DataProvider(name = "catalog-countOfLoadedCatalogFile") public Object[][] data() { return new Object[][]{ @@ -73,12 +87,23 @@ public class DeferFeatureTest { {createCatalog(createDeferFeature(DEFER_FALSE)), 4}}; } + @DataProvider(name = "testDeferFeatureByResolve") + public Object[][] getData() { + return new Object[][]{ + {createCatalog(createDeferFeature(DEFER_TRUE)), 4} + }; + } + private CatalogFeatures createDeferFeature(String defer) { return CatalogFeatures.builder().with(DEFER, defer).build(); } private Catalog createCatalog(CatalogFeatures feature) { - return catalog(feature, getCatalogPath("deferFeature.xml")); + return CatalogManager.catalog(feature, getCatalogPath("deferFeature.xml")); + } + + private CatalogResolver createResolver(Catalog catalog) { + return CatalogManager.catalogResolver(catalog); } private int loadedCatalogCount(Catalog catalog) throws Exception { diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java index bb4d6b3574a..264ad06a95f 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java @@ -22,6 +22,7 @@ */ package org.w3c.dom.ptests; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.compareWithGold; import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission; import static org.testng.Assert.assertEquals; @@ -157,7 +158,7 @@ public class NodeTest { Element element = (Element) document.getElementsByTagName("sender").item(0); parentElement.insertBefore(createTestDocumentFragment(document), element); - String outputfile = "InsertBefore.out"; + String outputfile = USER_DIR + "InsertBefore.out"; String goldfile = GOLDEN_DIR + "InsertBeforeGF.out"; tryRunWithTmpPermission(() -> outputXml(document, outputfile), new PropertyPermission("user.dir", "read")); assertTrue(compareWithGold(goldfile, outputfile)); @@ -175,7 +176,7 @@ public class NodeTest { Element element = (Element) document.getElementsByTagName("sender").item(0); parentElement.replaceChild(createTestDocumentFragment(document), element); - String outputfile = "ReplaceChild3.out"; + String outputfile = USER_DIR + "ReplaceChild3.out"; String goldfile = GOLDEN_DIR + "ReplaceChild3GF.out"; tryRunWithTmpPermission(() -> outputXml(document, outputfile), new PropertyPermission("user.dir", "read")); assertTrue(compareWithGold(goldfile, outputfile)); diff --git a/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java b/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java index acfe988c13a..673674b9e65 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java @@ -22,6 +22,7 @@ */ package test.astro; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.filenameToURL; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -130,7 +131,7 @@ public class DocumentLSTest { impl = (DOMImplementationLS) db.getDOMImplementation(); LSSerializer domSerializer = impl.createLSSerializer(); MyDOMOutput mydomoutput = new MyDOMOutput(); - try (OutputStream os = new FileOutputStream("test.out")) { + try (OutputStream os = new FileOutputStream(USER_DIR + "test.out")) { mydomoutput.setByteStream(os); mydomoutput.setEncoding("UTF-8"); assertTrue(domSerializer.write(doc, mydomoutput)); diff --git a/jaxp/test/javax/xml/jaxp/libs/jdk/testlibrary/ProcessTools.java b/jaxp/test/javax/xml/jaxp/libs/jdk/testlibrary/ProcessTools.java index 35cffc1c994..c3abe5936d8 100644 --- a/jaxp/test/javax/xml/jaxp/libs/jdk/testlibrary/ProcessTools.java +++ b/jaxp/test/javax/xml/jaxp/libs/jdk/testlibrary/ProcessTools.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -256,7 +256,7 @@ public final class ProcessTools { * @return Process id */ public static long getProcessId() { - return ProcessHandle.current().getPid(); + return ProcessHandle.current().pid(); } /** @@ -542,8 +542,8 @@ public final class ProcessTools { } @Override - public long getPid() { - return p.getPid(); + public long pid() { + return p.pid(); } @Override diff --git a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/DefaultFactoryWrapperTest.java b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/DefaultFactoryWrapperTest.java index 0e16d9b5db3..18e4e76cee8 100644 --- a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/DefaultFactoryWrapperTest.java +++ b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/DefaultFactoryWrapperTest.java @@ -27,8 +27,6 @@ import static org.testng.Assert.assertSame; import java.io.StringReader; import java.io.StringWriter; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import javax.xml.datatype.DatatypeFactory; import javax.xml.parsers.DocumentBuilderFactory; @@ -52,7 +50,7 @@ import org.testng.annotations.Test; * @summary test customized provider wraps the built-in system-default implementation of JAXP factories */ public class DefaultFactoryWrapperTest { - private static final Module XML_MODULE = Layer.boot().findModule("java.xml").get(); + private static final Module XML_MODULE = ModuleLayer.boot().findModule("java.xml").get(); private static final String PROVIDER_PACKAGE = "xwp"; diff --git a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java index 74f051ac04d..306b9ee973a 100644 --- a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java +++ b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java @@ -29,9 +29,7 @@ import java.lang.String; import java.lang.System; import java.lang.module.Configuration; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; import java.lang.reflect.Method; -import java.lang.reflect.Module; import java.nio.file.Paths; import java.nio.file.Path; import java.util.Collections; @@ -95,23 +93,23 @@ public class LayerModularXMLParserTest { */ public void testOneLayer() throws Exception { ModuleFinder finder1 = ModuleFinder.of(MOD_DIR1); - Configuration cf1 = Layer.boot().configuration() - .resolveRequiresAndUses(finder1, ModuleFinder.of(), Set.of("test")); + Configuration cf1 = ModuleLayer.boot().configuration() + .resolveAndBind(finder1, ModuleFinder.of(), Set.of("test")); ClassLoader scl = ClassLoader.getSystemClassLoader(); - Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, scl); + ModuleLayer layer1 = ModuleLayer.boot().defineModulesWithManyLoaders(cf1, scl); ClassLoader cl1 = layer1.findLoader("test"); Method m = cl1.loadClass("test.XMLFactoryHelper").getMethod("instantiateXMLService", String.class); for (String service : services1) { Object o = m.invoke(null, service); - Layer providerLayer = o.getClass().getModule().getLayer(); + ModuleLayer providerLayer = o.getClass().getModule().getLayer(); assertSame(providerLayer, layer1); } for (String service : services2) { Object o = m.invoke(null, service); - Layer providerLayer = o.getClass().getModule().getLayer(); - assertSame(providerLayer, Layer.boot()); + ModuleLayer providerLayer = o.getClass().getModule().getLayer(); + assertSame(providerLayer, ModuleLayer.boot()); } } @@ -125,26 +123,26 @@ public class LayerModularXMLParserTest { */ public void testTwoLayer() throws Exception { ModuleFinder finder1 = ModuleFinder.of(MOD_DIR1); - Configuration cf1 = Layer.boot().configuration() - .resolveRequiresAndUses(finder1, ModuleFinder.of(), Set.of("test")); + Configuration cf1 = ModuleLayer.boot().configuration() + .resolveAndBind(finder1, ModuleFinder.of(), Set.of("test")); ClassLoader scl = ClassLoader.getSystemClassLoader(); - Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, scl); + ModuleLayer layer1 = ModuleLayer.boot().defineModulesWithManyLoaders(cf1, scl); ModuleFinder finder2 = ModuleFinder.of(MOD_DIR2); - Configuration cf2 = cf1.resolveRequiresAndUses(finder2, ModuleFinder.of(), Set.of("test")); - Layer layer2 = layer1.defineModulesWithOneLoader(cf2, layer1.findLoader("test")); + Configuration cf2 = cf1.resolveAndBind(finder2, ModuleFinder.of(), Set.of("test")); + ModuleLayer layer2 = layer1.defineModulesWithOneLoader(cf2, layer1.findLoader("test")); ClassLoader cl2 = layer2.findLoader("test"); Method m = cl2.loadClass("test.XMLFactoryHelper").getMethod("instantiateXMLService", String.class); for (String service : services1) { Object o = m.invoke(null, service); - Layer providerLayer = o.getClass().getModule().getLayer(); + ModuleLayer providerLayer = o.getClass().getModule().getLayer(); assertSame(providerLayer, layer1); } for (String service : services2) { Object o = m.invoke(null, service); - Layer providerLayer = o.getClass().getModule().getLayer(); + ModuleLayer providerLayer = o.getClass().getModule().getLayer(); assertSame(providerLayer, layer2); } @@ -159,26 +157,26 @@ public class LayerModularXMLParserTest { */ public void testTwoLayerWithDuplicate() throws Exception { ModuleFinder finder1 = ModuleFinder.of(MOD_DIR1, MOD_DIR2); - Configuration cf1 = Layer.boot().configuration() - .resolveRequiresAndUses(finder1, ModuleFinder.of(), Set.of("test")); + Configuration cf1 = ModuleLayer.boot().configuration() + .resolveAndBind(finder1, ModuleFinder.of(), Set.of("test")); ClassLoader scl = ClassLoader.getSystemClassLoader(); - Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, scl); + ModuleLayer layer1 = ModuleLayer.boot().defineModulesWithManyLoaders(cf1, scl); ModuleFinder finder2 = ModuleFinder.of(MOD_DIR2); - Configuration cf2 = cf1.resolveRequiresAndUses(finder2, ModuleFinder.of(), Set.of("test")); - Layer layer2 = layer1.defineModulesWithOneLoader(cf2, layer1.findLoader("test")); + Configuration cf2 = cf1.resolveAndBind(finder2, ModuleFinder.of(), Set.of("test")); + ModuleLayer layer2 = layer1.defineModulesWithOneLoader(cf2, layer1.findLoader("test")); ClassLoader cl2 = layer2.findLoader("test"); Method m = cl2.loadClass("test.XMLFactoryHelper").getMethod("instantiateXMLService", String.class); for (String service : services1) { Object o = m.invoke(null, service); - Layer providerLayer = o.getClass().getModule().getLayer(); + ModuleLayer providerLayer = o.getClass().getModule().getLayer(); assertSame(providerLayer, layer1); } for (String service : services2) { Object o = m.invoke(null, service); - Layer providerLayer = o.getClass().getModule().getLayer(); + ModuleLayer providerLayer = o.getClass().getModule().getLayer(); assertSame(providerLayer, layer2); } diff --git a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/unnamed/Main.java b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/unnamed/Main.java index 35d210369b2..971b5f350bf 100644 --- a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/unnamed/Main.java +++ b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/unnamed/Main.java @@ -24,8 +24,6 @@ import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI; import java.lang.module.ModuleDescriptor.Provides; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.util.Arrays; import java.util.HashSet; import java.util.Set; @@ -38,7 +36,7 @@ public class Main { * @param args, the names of provider modules, which have been loaded */ public static void main(String[] args) throws Exception { - Module xml = Layer.boot().findModule("java.xml").get(); + Module xml = ModuleLayer.boot().findModule("java.xml").get(); Set allServices = new HashSet<>(Arrays.asList(expectedAllServices)); if (!allServices.equals(xml.getDescriptor().uses())) @@ -46,7 +44,7 @@ public class Main { + xml.getDescriptor().uses()); long violationCount = Stream.of(args) - .map(xmlProviderName -> Layer.boot().findModule(xmlProviderName).get()) + .map(xmlProviderName -> ModuleLayer.boot().findModule(xmlProviderName).get()) .mapToLong( // services provided by the implementation in provider module provider -> provider.getDescriptor().provides().stream() diff --git a/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogTest.java b/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogTest.java index 937de0ba0e1..9972328e102 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogTest.java @@ -87,35 +87,6 @@ public class CatalogTest extends CatalogSupportBase { super.setUp(); } - /* - * @bug 8162431 - * Verifies that circular references are caught and - * CatalogException is thrown. - */ - @Test(dataProvider = "getFeatures", expectedExceptions = CatalogException.class) - public void testCircularRef(CatalogFeatures cf, String xml) throws Exception { - CatalogResolver catalogResolver = CatalogManager.catalogResolver( - cf, - getClass().getResource(xml).toURI()); - catalogResolver.resolve("anyuri", ""); - } - - /* - DataProvider: used to verify circular reference - Data columns: CatalogFeatures, catalog - */ - @DataProvider(name = "getFeatures") - public Object[][] getFeatures() { - String self = "catalogReferCircle-itself.xml"; - String left = "catalogReferCircle-left.xml"; - return new Object[][]{ - {CatalogFeatures.builder().with(CatalogFeatures.Feature.DEFER, "false").build(), self}, - {CatalogFeatures.defaults(), self}, - {CatalogFeatures.builder().with(CatalogFeatures.Feature.DEFER, "false").build(), left}, - {CatalogFeatures.defaults(), left} - }; - } - /* * @bug 8163232 * Verifies that the CatalogResolver supports the following XML Resolvers: @@ -437,7 +408,10 @@ public class CatalogTest extends CatalogSupportBase { public void resolveWithPrefer(String prefer, String cfile, String publicId, String systemId, String expected) throws Exception { URI catalogFile = getClass().getResource(cfile).toURI(); - CatalogFeatures f = CatalogFeatures.builder().with(CatalogFeatures.Feature.PREFER, prefer).with(CatalogFeatures.Feature.RESOLVE, "ignore").build(); + CatalogFeatures f = CatalogFeatures.builder() + .with(CatalogFeatures.Feature.PREFER, prefer) + .with(CatalogFeatures.Feature.RESOLVE, "ignore") + .build(); CatalogResolver catalogResolver = CatalogManager.catalogResolver(f, catalogFile); String result = catalogResolver.resolveEntity(publicId, systemId).getSystemId(); Assert.assertEquals(expected, result); @@ -452,7 +426,9 @@ public class CatalogTest extends CatalogSupportBase { @Test(dataProvider = "invalidAltCatalogs", expectedExceptions = CatalogException.class) public void testDeferAltCatalogs(String file) throws Exception { URI catalogFile = getClass().getResource(file).toURI(); - CatalogFeatures features = CatalogFeatures.builder().with(CatalogFeatures.Feature.DEFER, "true").build(); + CatalogFeatures features = CatalogFeatures.builder(). + with(CatalogFeatures.Feature.DEFER, "true") + .build(); /* Since the defer attribute is set to false in the specified catalog file, the parent catalog will try to load the alt catalog, which will fail @@ -471,11 +447,17 @@ public class CatalogTest extends CatalogSupportBase { URI catalogFile = getClass().getResource("JDK8146237_catalog.xml").toURI(); try { - CatalogFeatures features = CatalogFeatures.builder().with(CatalogFeatures.Feature.PREFER, "system").build(); + CatalogFeatures features = CatalogFeatures.builder() + .with(CatalogFeatures.Feature.PREFER, "system") + .build(); Catalog catalog = CatalogManager.catalog(features, catalogFile); CatalogResolver catalogResolver = CatalogManager.catalogResolver(catalog); - String actualSystemId = catalogResolver.resolveEntity("-//FOO//DTD XML Dummy V0.0//EN", "http://www.oracle.com/alt1sys.dtd").getSystemId(); - Assert.assertTrue(actualSystemId.contains("dummy.dtd"), "Resulting id should contain dummy.dtd, indicating a match by publicId"); + String actualSystemId = catalogResolver.resolveEntity( + "-//FOO//DTD XML Dummy V0.0//EN", + "http://www.oracle.com/alt1sys.dtd") + .getSystemId(); + Assert.assertTrue(actualSystemId.contains("dummy.dtd"), + "Resulting id should contain dummy.dtd, indicating a match by publicId"); } catch (Exception e) { Assert.fail(e.getMessage()); @@ -572,20 +554,21 @@ public class CatalogTest extends CatalogSupportBase { */ @Test public void testInvalidCatalog() throws Exception { + String expectedMsgId = "JAXP09040001"; URI catalog = getClass().getResource("catalog_invalid.xml").toURI(); - String test = "testInvalidCatalog"; try { - CatalogResolver resolver = CatalogManager.catalogResolver(CatalogFeatures.defaults(), catalog); - String actualSystemId = resolver.resolveEntity(null, "http://remote/xml/dtd/sys/alice/docAlice.dtd").getSystemId(); + CatalogResolver resolver = CatalogManager.catalogResolver( + CatalogFeatures.defaults(), catalog); + String actualSystemId = resolver.resolveEntity( + null, + "http://remote/xml/dtd/sys/alice/docAlice.dtd") + .getSystemId(); } catch (Exception e) { String msg = e.getMessage(); if (msg != null) { - if (msg.contains("No match found for publicId")) { - Assert.assertEquals(msg, "No match found for publicId 'null' and systemId 'http://remote/xml/dtd/sys/alice/docAlice.dtd'."); - System.out.println(test + ": expected [No match found for publicId 'null' and systemId 'http://remote/xml/dtd/sys/alice/docAlice.dtd'.]"); - System.out.println("actual [" + msg + "]"); - } + Assert.assertTrue(msg.contains(expectedMsgId), + "Message shall contain the corrent message ID " + expectedMsgId); } } } @@ -607,7 +590,10 @@ public class CatalogTest extends CatalogSupportBase { String test = "testInvalidCatalog"; try { CatalogResolver resolver = CatalogManager.catalogResolver(f); - String actualSystemId = resolver.resolveEntity(null, "http://remote/xml/dtd/sys/alice/docAlice.dtd").getSystemId(); + String actualSystemId = resolver.resolveEntity( + null, + "http://remote/xml/dtd/sys/alice/docAlice.dtd") + .getSystemId(); System.out.println("testIgnoreInvalidCatalog: expected [null]"); System.out.println("testIgnoreInvalidCatalog: expected [null]"); System.out.println("actual [" + actualSystemId + "]"); @@ -628,7 +614,11 @@ public class CatalogTest extends CatalogSupportBase { @DataProvider(name = "resolveUri") public Object[][] getDataForUriResolver() { return new Object[][]{ - {"uri.xml", "urn:publicid:-:Acme,+Inc.:DTD+Book+Version+1.0", null, "http://local/base/dtd/book.dtd", "Uri in publicId namespace is incorrectly unwrapped"}, + {"uri.xml", + "urn:publicid:-:Acme,+Inc.:DTD+Book+Version+1.0", + null, + "http://local/base/dtd/book.dtd", + "Uri in publicId namespace is incorrectly unwrapped"}, }; } @@ -654,7 +644,13 @@ public class CatalogTest extends CatalogSupportBase { public Object[][] getDataForMatchingBothIds() { String expected = "http://www.groupxmlbase.com/dtds/rewrite.dtd"; return new Object[][]{ - {"rewriteSystem_id.xml", "system", "http://www.sys00test.com/rewrite.dtd", "PUB-404", expected, expected, "Relative rewriteSystem with xml:base at group level failed"}, + {"rewriteSystem_id.xml", + "system", + "http://www.sys00test.com/rewrite.dtd", + "PUB-404", + expected, + expected, + "Relative rewriteSystem with xml:base at group level failed"}, }; } diff --git a/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-itself.xml b/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-itself.xml deleted file mode 100644 index c3cfaa66443..00000000000 --- a/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-itself.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-left.xml b/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-left.xml deleted file mode 100644 index 852b1a56ac3..00000000000 --- a/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-left.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-right.xml b/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-right.xml deleted file mode 100644 index 0c556a4b123..00000000000 --- a/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-right.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java index be54c6c2e05..da4ff787589 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java @@ -60,7 +60,7 @@ import org.xml.sax.SAXException; /* * @test - * @bug 6439439 8087303 + * @bug 6439439 8087303 8174025 * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest * @run testng/othervm -DrunSecMngr=true common.prettyprint.PrettyPrintTest * @run testng/othervm common.prettyprint.PrettyPrintTest @@ -69,29 +69,30 @@ import org.xml.sax.SAXException; @Listeners({jaxp.library.FilePolicy.class}) public class PrettyPrintTest { /* - * test CDATA, elements only, text and element, whitespace and element, - * xml:space property and nested xml:space property, mixed node types. + * test CDATA, elements only, text and element, xml:space property, mixed + * node types. */ @DataProvider(name = "xml-data") public Object[][] xmlData() throws Exception { return new Object[][] { - { read("xmltest1.xml"), read("xmltest1.out") }, - { read("xmltest2.xml"), read("xmltest2.out") }, - { read("xmltest3.xml"), read("xmltest3.out") }, - { read("xmltest4.xml"), read("xmltest4.out") }, - { read("xmltest5.xml"), read("xmltest5.out") }, - { read("xmltest6.xml"), read("xmltest6.out") }, - { read("xmltest7.xml"), read("xmltest7.out") }, - { read("xmltest8.xml"), read("xmltest8.out") } }; + { "xmltest1.xml", "xmltest1.out" }, + { "xmltest2.xml", "xmltest2.out" }, + { "xmltest3.xml", "xmltest3.out" }, + { "xmltest4.xml", "xmltest4.out" }, + { "xmltest6.xml", "xmltest6.out" }, + { "xmltest8.xml", "xmltest8.out" } }; } /* * @bug 8087303 - * Test the whitespace text nodes are serialized with pretty-print by LSSerializer and transformer correctly + * Test the xml document are serialized with pretty-print by + * LSSerializer and transformer correctly * */ @Test(dataProvider = "xml-data") - public void testXMLPrettyPrint(String source, String expected) throws Exception { + public void testXMLPrettyPrint(String sourceFile, String expectedFile) throws Exception { + String source = read(sourceFile); + String expected = read(expectedFile); // test it's no change if no pretty-print String result = serializerWrite(toXmlDocument(source), false); assertTrue(toXmlDocument(source).isEqualNode(toXmlDocument(result)), "The actual is: " + result); @@ -104,40 +105,116 @@ public class PrettyPrintTest { assertEquals(transform(toXmlDocument(source), true).replaceAll("\r\n", "\n"), expected); } + /* - * test pure text content, and sequent Text nodes. + * @bug 8087303 + * Test a single text node is serialized with pretty-print by + * LSSerializer and transformer correctly + * */ - @DataProvider(name = "xml-node-data") - public Object[][] xmlNodeData() throws Exception { - return new Object[][] { - { newTextNode(read("nodetest1.txt")), read("nodetest1.out") }, - { createDocWithSequentTextNodes(), read("nodetest2.out") } }; + @Test + public void testSingleTextNode() throws Exception { + Node xml = newTextNode(read("nodetest1.txt")); + String expected = read("nodetest1.out"); + assertEquals(serializerWrite(xml, true), expected); + assertEquals(transform(xml, true).replaceAll("\r\n", "\n"), expected); } /* * @bug 8087303 - * Test the whitespace text nodes are serialized with pretty-print by LSSerializer and transformer correctly, - * doesn't compare with the source because the test data is Node object + * Test the transformer shall keep all whitespace text node in + * sequent text nodes * */ - @Test(dataProvider = "xml-node-data") - public void testXMLNodePrettyPrint(Node xml, String expected) throws Exception { - assertEquals(serializerWrite(xml, true), expected); + @Test + public void testSequentTextNodesWithTransformer() throws Exception { + Node xml = createDocWithSequentTextNodes(); + String expected = read("nodetest2.out"); assertEquals(transform(xml, true).replaceAll("\r\n", "\n"), expected); } + /* + * @bug 8087303 + * Test LSSerializer shall eliminate the whitespace text node + * in sequent text nodes + * + */ + @Test + public void testSequentTextNodesWithLSSerializer() throws Exception { + Node xml = createDocWithSequentTextNodes(); + String expected = read("nodetest2ls.out"); + assertEquals(serializerWrite(xml, true), expected); + } + + + /* + * test whitespace and element, nested xml:space property. + */ + @DataProvider(name = "xml-data-whitespace-ls") + public Object[][] whitespaceLS() throws Exception { + return new Object[][] { + { "xmltest5.xml", "xmltest5ls.out" }, + { "xmltest7.xml", "xmltest7ls.out" } }; + } + + /* + * @bug 8087303 + * Test LSSerializer shall eliminate the whitespace text node + * unless xml:space="preserve" + * + */ + @Test(dataProvider = "xml-data-whitespace-ls") + public void testWhitespaceWithLSSerializer(String sourceFile, String expectedFile) throws Exception { + String source = read(sourceFile); + String expected = read(expectedFile); + // test it's no change if no pretty-print + String result = serializerWrite(toXmlDocument(source), false); + assertTrue(toXmlDocument(source).isEqualNode(toXmlDocument(result)), "The actual is: " + result); + // test pretty-print + assertEquals(serializerWrite(toXmlDocument(source), true), expected); + } + + /* + * test whitespace and element, nested xml:space property. + */ + @DataProvider(name = "xml-data-whitespace-xslt") + public Object[][] whitespaceXSLT() throws Exception { + return new Object[][] { + { "xmltest5.xml", "xmltest5xslt.out" }, + { "xmltest7.xml", "xmltest7xslt.out" } }; + } + + /* + * @bug 8087303 + * Test the transformer shall format the output but keep all + * whitespace text node even if xml:space="preserve" + * + */ + @Test(dataProvider = "xml-data-whitespace-xslt") + public void testWhitespaceWithTransformer(String sourceFile, String expectedFile) throws Exception { + String source = read(sourceFile); + String expected = read(expectedFile); + // test it's no change if no pretty-print + String result = transform(toXmlDocument(source), false); + assertTrue(toXmlDocument(source).isEqualNode(toXmlDocument(result)), "The actual is: " + result); + // test pretty-print + assertEquals(transform(toXmlDocument(source), true).replaceAll("\r\n", "\n"), expected); + } + /* * test block element, inline element, text, and mixed elements. */ @DataProvider(name = "html-data") public Object[][] htmlData() throws Exception { return new Object[][] { - { read("htmltest1.xml"), read("htmltest1.out") }, - { read("htmltest2.xml"), read("htmltest2.out") }, - { read("htmltest3.xml"), read("htmltest3.out") }, - { read("htmltest4.xml"), read("htmltest4.out") }, - { read("htmltest5.xml"), read("htmltest5.out") }, - { read("htmltest6.xml"), read("htmltest6.out") } }; + { "htmltest1.xml", "htmltest1.out" }, + { "htmltest2.xml", "htmltest2.out" }, + { "htmltest3.xml", "htmltest3.out" }, + { "htmltest4.xml", "htmltest4.out" }, + { "htmltest5.xml", "htmltest5.out" }, + { "htmltest6.xml", "htmltest6.out" }, + /* @bug 8174025, test whitespace between inline elements */ + { "htmltest7.xml", "htmltest7.out" } }; } /* @@ -146,7 +223,9 @@ public class PrettyPrintTest { * */ @Test(dataProvider = "html-data") - public void testTransformToHTML(String source, String expected) throws Exception { + public void testTransformToHTML(String sourceFile, String expectedFile) throws Exception { + String source = read(sourceFile); + String expected = read(expectedFile); // test it's no change if no pretty-print StringWriter writer = new StringWriter(); getTransformer(true, false).transform(new StreamSource(new StringReader(source)), new StreamResult(writer)); @@ -158,6 +237,27 @@ public class PrettyPrintTest { assertEquals(writer.toString().replaceAll("\r\n", "\n"), expected); } + /* + * @bug 8174025 + * Test the serializer can handle correctly. + * + */ + @Test + public void testDisableOutputEscaping() throws Exception { + final String xsl ="generate-catalog.xsl"; + final String xml ="simple-entity-resolver-config.xml"; + final String expectedOutput ="simple-entity-resolver-config-transformed.xml"; + TransformerFactory factory = TransformerFactory.newInstance(); + Transformer transformer = factory.newTemplates(new StreamSource(new StringReader(read(xsl)))).newTransformer(); + + String key = "schemaBase"; + String value = "schemas"; + transformer.setParameter(key, value); + StringWriter writer = new StringWriter(); + transformer.transform(new StreamSource(new StringReader(read(xml))), new StreamResult(writer)); + assertEquals(writer.toString().replaceAll("\r\n", "\n"), read(expectedOutput)); + } + @Test public void testLSSerializerFormatPrettyPrint() { @@ -298,6 +398,9 @@ public class PrettyPrintTest { Document doc = db.newDocument(); Node root = doc.createElement("root"); doc.appendChild(root); + root.appendChild(doc.createTextNode("\n")); + root.appendChild(doc.createTextNode("\n")); + root.appendChild(doc.createTextNode("\n")); root.appendChild(doc.createTextNode(" ")); root.appendChild(doc.createTextNode("t")); root.appendChild(doc.createTextNode("\n")); diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/generate-catalog.xsl b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/generate-catalog.xsl new file mode 100644 index 00000000000..e1b8e75171a --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/generate-catalog.xsl @@ -0,0 +1,23 @@ + + + + + + + + + + + + + <system systemId=" + + " uri=" + + " /> + + + + \ No newline at end of file diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest1.xml b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest1.xml index 50460626a7b..c0959b46dc8 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest1.xml +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest1.xml @@ -1 +1 @@ -Java Tutorials and Examples 1 en-us \ No newline at end of file +Java Tutorials and Examples 1en-us \ No newline at end of file diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.out new file mode 100644 index 00000000000..2ce8445a6dc --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.out @@ -0,0 +1,7 @@ + + +

    + this is a whitespace inline element test +

    + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.xml b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.xml new file mode 100644 index 00000000000..f1480607ef8 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.xml @@ -0,0 +1 @@ +

    this is a whitespace inline element test

    \ No newline at end of file diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2.out index a0d94368a3d..8a7d8fb0d18 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2.out +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2.out @@ -1,19 +1,30 @@ t t - + + t - - - + + + + + + t + t + t + + + + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2ls.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2ls.out new file mode 100644 index 00000000000..92e2d1f41e0 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2ls.out @@ -0,0 +1,18 @@ + + tt + + t + + + + + t + + t + + t + + + + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config-transformed.xml b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config-transformed.xml new file mode 100644 index 00000000000..238b5e2a2ac --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config-transformed.xml @@ -0,0 +1,3 @@ + + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config.xml b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config.xml new file mode 100644 index 00000000000..9156728e13d --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config.xml @@ -0,0 +1,20 @@ + + + + + Example 1 Schema Type library 10.0 + >-//Oracle//Example 1 Schema Type library 10.0//EN + http://www.example.test/oracle/schema/example1.xsd + META-INF/example1.xsd + + + Example 2 Schema Type library 10.0 + >-//Oracle//Example 2 Schema Type library 10.0//EN + http://www.example.test/oracle/schema/example2.xsd + META-INF/example2.xsd + + \ No newline at end of file diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5ls.out similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5.out rename to jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5ls.out diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5xslt.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5xslt.out new file mode 100644 index 00000000000..4178e8ea9c2 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5xslt.out @@ -0,0 +1,15 @@ + + + + Java Tutorials and Examples 1 + + en-us + + + + + + + + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7ls.out similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7.out rename to jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7ls.out diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7xslt.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7xslt.out new file mode 100644 index 00000000000..06296cddd1d --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7xslt.out @@ -0,0 +1,17 @@ + + Java + + 5 + + + + + + + + + + + + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.out index 621263fbe19..b62fff27a78 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.out +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.out @@ -1,25 +1,20 @@ - - t + t - -t + t - - t + t - - t + t t - - t + t diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.xml b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.xml index e9c1c477d3a..6b9c54af8ed 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.xml +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.xml @@ -2,14 +2,7 @@ t t - t - - - t - - t - + t + tt t - - - + diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java index 9068969b318..50c79a962a6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java @@ -279,11 +279,11 @@ public class LSSerializerTest { "\n" + " &name1;Jo Smith\n" + " b &name2;Jo Smith &name1;Jo Smith b\n" + - " &name;Jo Smith \n" + + " &name;Jo Smith \n" + " &ele1;d\n" + - " &ele2;eee \n" + + " &ele2;eee \n" + " <att>\n" + - " &ele; g\n" + + " &ele; g\n" + " &ele2;\n" + "\n"); @@ -301,7 +301,7 @@ public class LSSerializerTest { "\n" + " &name;Jo Smith\n" + " b &name;Jo Smith &name;Jo Smith b\n" + - " &name;Jo Smith \n" + + " &name;Jo Smith \n" + " \n" + " \n" + " text\n" + diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/BaseParsingTest.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/BaseParsingTest.java new file mode 100644 index 00000000000..2d15fda1b0e --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/BaseParsingTest.java @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package parsers; + +import java.io.StringReader; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamReader; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; +import org.xml.sax.InputSource; + +/** + * @test + * @bug 8169450 + * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest + * @run testng/othervm -DrunSecMngr=true parsers.BaseParsingTest + * @run testng/othervm parsers.BaseParsingTest + * @summary Tests that verify base parsing + */ +@Listeners({jaxp.library.BasePolicy.class}) +public class BaseParsingTest { + + @DataProvider(name = "xmlDeclarations") + public static Object[][] xmlDeclarations() { + return new Object[][]{ + {"t"}, + {"t"}, + {"t"}, + {"\n" + + "\n" + + " t\n" + + ""}, + {"\n" + + "\n" + + " t\n" + + ""}, + {"\n" + + "\n" + + " t\n" + + ""}, + {"\n" + + "\n" + + " t\n" + + ""}, + {"t"}, + {"t"}, + {"t"}, + {"\n" + + "\n" + + " t\n" + + ""}, + {"\n" + + "\n" + + " t\n" + + ""}, + {"\n" + + "\n" + + " t\n" + + ""}, + {"\n" + + "\n" + + " t\n" + + ""} + }; + } + + /** + * @bug 8169450 + * Verifies that the parser successfully parses the declarations provided in + * xmlDeclarations. Exception would otherwise be thrown as reported in 8169450. + * + * XML Declaration according to https://www.w3.org/TR/REC-xml/#NT-XMLDecl + * [23] XMLDecl ::= '' + * [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"') + * [25] Eq ::= S? '=' S? [26] VersionNum ::= '1.' [0-9]+ + * + * @param xml the test xml + * @throws Exception if the parser fails to parse the xml + */ + @Test(dataProvider = "xmlDeclarations") + public void test(String xml) throws Exception { + XMLInputFactory xif = XMLInputFactory.newDefaultFactory(); + XMLStreamReader xsr = xif.createXMLStreamReader(new StringReader(xml)); + while (xsr.hasNext()) { + xsr.next(); + } + } + + /** + * @bug 8169450 + * This particular issue does not appear in DOM parsing since the spaces are + * normalized during version detection. This test case then serves as a guard + * against such an issue from occuring in the version detection. + * + * @param xml the test xml + * @throws Exception if the parser fails to parse the xml + */ + @Test(dataProvider = "xmlDeclarations") + public void testWithDOM(String xml) throws Exception { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setValidating(true); + DocumentBuilder db = dbf.newDocumentBuilder(); + db.parse(new InputSource(new StringReader(xml))); + } +} diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java index 942e7ffaed8..1bf27aa09a0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java @@ -23,6 +23,7 @@ package parsers; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission; import java.io.File; @@ -61,7 +62,7 @@ public class Bug6341770 { return; } try { - File dir = new File(ALPHA); + File dir = new File(USER_DIR + ALPHA); dir.delete(); dir.mkdir(); File main = new File(dir, "main.xml"); diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java index 4bd69f09765..be6dbc986f8 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java @@ -23,6 +23,7 @@ package sax; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.getSystemProperty; import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission; @@ -69,7 +70,7 @@ public class Bug7057778Test { @Test public void testParse() { File src = new File(getClass().getResource(xml).getFile()); - File dst = new File(xml1); + File dst = new File(USER_DIR + xml1); try { copyFile(src, dst); SAXParserFactory spf = SAXParserFactory.newInstance(); diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/SymbolTableResetTest.java b/jaxp/test/javax/xml/jaxp/unittest/sax/SymbolTableResetTest.java new file mode 100644 index 00000000000..b56eb7ec9a9 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/SymbolTableResetTest.java @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sax; + +import static jaxp.library.JAXPTestUtilities.runWithAllPerm; + +import java.io.StringReader; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.testng.Assert; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; +import org.xml.sax.InputSource; +import org.xml.sax.helpers.DefaultHandler; + +/* + * @test + * @bug 8173390 8176168 + * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest + * @run testng/othervm -Djdk.xml.resetSymbolTable=false sax.SymbolTableResetTest + * @run testng/othervm -Djdk.xml.resetSymbolTable=true sax.SymbolTableResetTest + * @run testng/othervm -Djdk.xml.resetSymbolTable=false -DrunSecMngr=true sax.SymbolTableResetTest + * @run testng/othervm -Djdk.xml.resetSymbolTable=true -DrunSecMngr=true sax.SymbolTableResetTest + * @summary Test that SAXParser reallocates symbol table during + * subsequent parse operations + */ +@Listeners({jaxp.library.BasePolicy.class}) +public class SymbolTableResetTest { + + /* + * Test verifies the following use cases when the parser feature is not set: + * a) Reset symbol table is requested via the system property + * b) Reset symbol table is not requested via the system property + * and therefore the default value should be used - reset + * operation should not occur. + */ + @Test + public void testNoFeatureSet() throws Exception { + parseAndCheckReset(false, false); + } + + + /* + * Test that when symbol table reset is requested through parser + * feature it is not affected by the system property value + */ + @Test + public void testResetEnabled() throws Exception { + parseAndCheckReset(true, true); + } + + /* + * Test that when symbol table reset is disabled through parser + * feature it is not affected by the system property value + */ + @Test + public void testResetDisabled() throws Exception { + parseAndCheckReset(true, false); + } + + /* + * Test mimics the SAXParser usage in SAAJ-RI that reuses the + * parsers from the internal pool. To avoid memory leaks, symbol + * table associated with the parser should be reallocated during each + * parse() operation. + */ + private void parseAndCheckReset(boolean setFeature, boolean value) throws Exception { + // Expected result based on system property and feature + boolean resetExpected = setFeature && value; + // Indicates if system property is set + boolean spSet = runWithAllPerm(() -> System.getProperty(RESET_FEATURE)) != null; + // Dummy xml input for parser + String input = "Test"; + + // Check if system property is set only when feature setting is not requested + // and estimate if reset of symbol table is expected + if (!setFeature && spSet) { + resetExpected = runWithAllPerm(() -> Boolean.getBoolean(RESET_FEATURE)); + } + + // Create SAXParser and set feature if it is requested + SAXParserFactory spf = SAXParserFactory.newInstance(); + if (setFeature) { + spf.setFeature(RESET_FEATURE, value); + } + SAXParser p = spf.newSAXParser(); + + // First parse iteration + p.parse(new InputSource(new StringReader(input)), new DefaultHandler()); + // Get first symbol table reference + Object symTable1 = p.getProperty(SYMBOL_TABLE_PROPERTY); + + // reset parser + p.reset(); + + // Second parse iteration + p.parse(new InputSource(new StringReader(input)), new DefaultHandler()); + // Get second symbol table reference + Object symTable2 = p.getProperty(SYMBOL_TABLE_PROPERTY); + + // Check symbol table references after two subsequent parse operations + if (resetExpected) { + Assert.assertNotSame(symTable1, symTable2, "Symbol table references"); + } else { + Assert.assertSame(symTable1, symTable2, "Symbol table references"); + } + } + + // Reset symbol table feature + private static final String RESET_FEATURE = "jdk.xml.resetSymbolTable"; + + // Symbol table property + private static final String SYMBOL_TABLE_PROPERTY = "http://apache.org/xml/properties/internal/symbol-table"; +} diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java index 1c4ac758575..1d1f728009d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java @@ -23,6 +23,8 @@ package stream; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; @@ -67,15 +69,15 @@ public class Bug6688002Test { } public class MyRunnable implements Runnable { - final int no; + final String no; MyRunnable(int no) { - this.no = no; + this.no = String.valueOf(no); } public void run() { try { - FileOutputStream fos = new FileOutputStream("" + no); + FileOutputStream fos = new FileOutputStream(USER_DIR + no); XMLStreamWriter w = getWriter(fos); // System.out.println("Writer="+w+" Thread="+Thread.currentThread()); w.writeStartDocument(); @@ -89,7 +91,7 @@ public class Bug6688002Test { w.close(); fos.close(); - FileInputStream fis = new FileInputStream("" + no); + FileInputStream fis = new FileInputStream(USER_DIR + no); XMLStreamReader r = getReader(fis); while (r.hasNext()) { r.next(); diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java index 3bd3ca25296..28b871afcd9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java @@ -23,6 +23,8 @@ package stream.XMLEventWriterTest; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; @@ -58,7 +60,7 @@ public class ReaderToWriterTest { private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newInstance(); private static final String INPUT_FILE = "W2JDLR4002TestService.wsdl.data"; - private static final String OUTPUT_FILE = "Encoded.wsdl"; + private static final String OUTPUT_FILE = USER_DIR + "Encoded.wsdl"; /** * Unit test for writing namespaces when namespaceURI == null. @@ -126,7 +128,7 @@ public class ReaderToWriterTest { try { InputStream in = getClass().getResourceAsStream("ReaderToWriterTest.wsdl"); - OutputStream out = new FileOutputStream("ReaderToWriterTest-out.xml"); + OutputStream out = new FileOutputStream(USER_DIR + "ReaderToWriterTest-out.xml"); XMLEventReader reader = XML_INPUT_FACTORY.createXMLEventReader(in); XMLEventWriter writer = XML_OUTPUT_FACTORY.createXMLEventWriter(out, "UTF-8"); diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java index 7e681e343c4..abb9957a256 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java @@ -23,6 +23,8 @@ package stream.XMLStreamWriterTest; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; @@ -84,7 +86,7 @@ public class WriterTest { System.out.println("Test StreamWriter with out any namespace functionality"); try { - String outputFile = files[0] + ".out"; + String outputFile = USER_DIR + files[0] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -98,7 +100,7 @@ public class WriterTest { xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[0] + ".out", files[0] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[0] + ".org")); } catch (Exception ex) { Assert.fail("testOne Failed " + ex); @@ -113,7 +115,7 @@ public class WriterTest { System.out.println("Test StreamWriter's Namespace Context"); try { - String outputFile = files[1] + ".out"; + String outputFile = USER_DIR + files[1] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(System.out); @@ -157,7 +159,7 @@ public class WriterTest { System.out.println("Test StreamWriter for proper element sequence."); try { - String outputFile = files[2] + ".out"; + String outputFile = USER_DIR + files[2] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -172,7 +174,7 @@ public class WriterTest { xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[2] + ".out", files[2] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[2] + ".org")); } catch (Exception ex) { Assert.fail("testThree Failed " + ex); @@ -188,7 +190,7 @@ public class WriterTest { try { - String outputFile = files[3] + ".out"; + String outputFile = USER_DIR + files[3] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -205,7 +207,7 @@ public class WriterTest { xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[3] + ".out", files[3] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[3] + ".org")); } catch (Exception ex) { Assert.fail("testFour Failed " + ex); @@ -221,7 +223,7 @@ public class WriterTest { try { - String outputFile = files[4] + ".out"; + String outputFile = USER_DIR + files[4] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(System.out); @@ -265,7 +267,7 @@ public class WriterTest { xtw.writeEndDocument(); xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[4] + ".out", files[4] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[4] + ".org")); System.out.println("Done"); } catch (Exception ex) { Assert.fail("testFive Failed " + ex); @@ -281,7 +283,7 @@ public class WriterTest { try { - String outputFile = files[5] + ".out"; + String outputFile = USER_DIR + files[5] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(System.out); @@ -325,7 +327,7 @@ public class WriterTest { xtw.writeEndDocument(); xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[5] + ".out", files[5] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[5] + ".org")); System.out.println("Done"); } catch (Exception ex) { Assert.fail("testSix Failed " + ex); @@ -341,7 +343,7 @@ public class WriterTest { try { - String outputFile = files[6] + ".out"; + String outputFile = USER_DIR + files[6] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -374,7 +376,7 @@ public class WriterTest { xtw.writeEndDocument(); xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[6] + ".out", files[6] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[6] + ".org")); System.out.println("Done"); } catch (Exception ex) { Assert.fail("testSeven Failed " + ex); @@ -390,7 +392,7 @@ public class WriterTest { try { - String outputFile = files[7] + ".out"; + String outputFile = USER_DIR + files[7] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -424,7 +426,7 @@ public class WriterTest { xtw.flush(); xtw.close(); // check against testSeven.xml.org - Assert.assertTrue(checkResults(files[7] + ".out", files[7] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[7] + ".org")); System.out.println("Done"); } catch (Exception ex) { ex.printStackTrace(); @@ -442,7 +444,7 @@ public class WriterTest { try { - String outputFile = files[8] + ".out"; + String outputFile = USER_DIR + files[8] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -476,7 +478,7 @@ public class WriterTest { xtw.flush(); xtw.close(); // check against testSeven.xml.org - Assert.assertTrue(checkResults(files[8] + ".out", files[7] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[7] + ".org")); System.out.println("Done"); } catch (Exception ex) { Assert.fail("testNine Failed " + ex); @@ -491,7 +493,7 @@ public class WriterTest { System.out.println("Test StreamWriter supplied with no namespace information and" + "isRepairingNamespace is set to true."); try { - String outputFile = files[9] + ".out"; + String outputFile = USER_DIR + files[9] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -542,7 +544,7 @@ public class WriterTest { System.out.println("Test StreamWriter supplied with namespace information passed through startElement and" + "isRepairingNamespace is set to true."); try { - String outputFile = files[10] + ".out"; + String outputFile = USER_DIR + files[10] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -576,7 +578,7 @@ public class WriterTest { xtw.flush(); xtw.close(); // check against testSeven.xml.org - Assert.assertTrue(checkResults(files[10] + ".out", files[7] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[7] + ".org")); System.out.println("Done"); } catch (Exception ex) { Assert.fail("testEleven Failed " + ex); @@ -592,7 +594,7 @@ public class WriterTest { try { - String outputFile = files[11] + ".out"; + String outputFile = USER_DIR + files[11] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -643,7 +645,7 @@ public class WriterTest { try { - String outputFile = files[12] + ".out"; + String outputFile = USER_DIR + files[12] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -695,7 +697,7 @@ public class WriterTest { try { - String outputFile = files[14] + ".out"; + String outputFile = USER_DIR + files[14] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java index 2b2a1e94506..1e4266d65e7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java @@ -23,6 +23,8 @@ package transform; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -55,7 +57,7 @@ public class Bug4693341Test { // save dtd file to current working directory to avoid writing into source repository public void copyDTDtoWorkDir() throws IOException { try (FileInputStream dtdres = new FileInputStream(getClass().getResource("Bug4693341.dtd").getPath()); - FileOutputStream dtdwork = new FileOutputStream("Bug4693341.dtd");) { + FileOutputStream dtdwork = new FileOutputStream(USER_DIR + "Bug4693341.dtd");) { int n; byte[] buffer = new byte[1024]; while((n = dtdres.read(buffer)) > -1) { @@ -71,7 +73,7 @@ public class Bug4693341Test { copyDTDtoWorkDir(); - File outf = new File("Bug4693341.out"); + File outf = new File(USER_DIR + "Bug4693341.out"); StreamResult result = new StreamResult(new FileOutputStream(outf)); String in = getClass().getResource("Bug4693341.xml").getPath(); diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java index cb92eb762ed..0419c1cf8bc 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java @@ -23,6 +23,8 @@ package transform; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.File; import javax.xml.transform.Source; @@ -58,7 +60,7 @@ public class Bug4892774 { private final String XML_FILE = "catalog.xml"; private final String XML10_FILE = "catalog_10.xml"; // 1.0 version document - private final String TEMP_FILE = "tmp.xml"; + private final String TEMP_FILE = USER_DIR + "tmp.xml"; private final String EXPECTED_VERSION = "1.1"; static private Transformer idTransform = null; diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java index 7031585a864..9ba16dbc9c1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java @@ -23,6 +23,7 @@ package transform; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.runWithTmpPermission; import java.io.File; @@ -52,7 +53,7 @@ public class Bug6216226Test { @Test public final void test() { try { - File test = new File("bug6216226.txt"); + File test = new File(USER_DIR + "bug6216226.txt"); TransformerFactory tf = TransformerFactory.newInstance(); Transformer xformer = tf.newTransformer(); StringReader st = new StringReader(""); diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java index db8d8721d2e..fe65ee0e7a9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java @@ -23,6 +23,8 @@ package transform; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.FileOutputStream; import javax.xml.transform.Result; @@ -65,7 +67,7 @@ public class CR6935697Test { Transformer xformer = template.newTransformer(); // Prepare the input and output files Source source = new StreamSource(getClass().getResourceAsStream(inFilename)); - Result result = new StreamResult(new FileOutputStream(outFilename)); + Result result = new StreamResult(new FileOutputStream(USER_DIR + outFilename)); // Apply the xsl file to the source file and write the result to the // output file xformer.transform(source, result); diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java index 87360daf486..3f99410869b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java @@ -23,6 +23,7 @@ package transform; +import java.io.FilePermission; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; @@ -46,6 +47,7 @@ import static org.testng.Assert.assertEquals; import static jaxp.library.JAXPTestUtilities.runWithAllPerm; import static jaxp.library.JAXPTestUtilities.clearSystemProperty; import static jaxp.library.JAXPTestUtilities.setSystemProperty; +import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission; import static jaxp.library.JAXPTestUtilities.getSystemProperty; /* @@ -77,7 +79,9 @@ public class XSLTFunctionsTest { Transformer t = tf.newTransformer(new StreamSource(new StringReader(xsl))); //Transform the xml - t.transform(new StreamSource(new StringReader(xml)), new StreamResult(new StringWriter())); + tryRunWithTmpPermission( + () -> t.transform(new StreamSource(new StringReader(xml)), new StreamResult(new StringWriter())), + new FilePermission(output, "write"), new FilePermission(redirect, "write")); // Verifies that the output is redirected successfully String userDir = getSystemProperty("user.dir"); diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java index 61d7bfe09db..3294aeb93ae 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java @@ -23,6 +23,8 @@ package transform.util; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; @@ -34,7 +36,7 @@ public abstract class TransformerUtil { protected String type; - protected final String TEMP_FILE = "tmp.xml"; + protected final String TEMP_FILE = USER_DIR + "tmp.xml"; public abstract Source prepareSource(InputStream is) throws Exception; diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java index d3a0f1ef40c..71f55a4f3c4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java @@ -23,6 +23,8 @@ package validation; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.File; import java.io.FileWriter; @@ -122,7 +124,7 @@ public class CR6708840Test { Validator schemaValidator = schemaGrammar.newValidator(); Source staxSrc = new StAXSource(staxReader); - File resultFile = new File("gMonths.result.xml"); + File resultFile = new File(USER_DIR + "gMonths.result.xml"); if (resultFile.exists()) { resultFile.delete(); } diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java index 40ca0cc8d3a..22317b325bb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java @@ -23,6 +23,7 @@ package validation; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.runWithTmpPermission; import java.io.File; @@ -61,7 +62,7 @@ public class ValidatorTest { File resultFile = null; try { - resultFile = new File("stax.result"); + resultFile = new File(USER_DIR + "stax.result"); if (resultFile.exists()) { resultFile.delete(); } @@ -88,7 +89,7 @@ public class ValidatorTest { File resultFile = null; try { - resultFile = new File("stax.result"); + resultFile = new File(USER_DIR + "stax.result"); if (resultFile.exists()) { resultFile.delete(); } @@ -117,7 +118,7 @@ public class ValidatorTest { // test valid gMonths File resultFile = null; try { - resultFile = new File("gMonths.result.xml"); + resultFile = new File(USER_DIR + "gMonths.result.xml"); if (resultFile.exists()) { resultFile.delete(); } @@ -144,7 +145,7 @@ public class ValidatorTest { // test invalid gMonths File invalidResultFile = null; try { - invalidResultFile = new File("gMonths-invalid.result.xml"); + invalidResultFile = new File(USER_DIR + "gMonths-invalid.result.xml"); if (invalidResultFile.exists()) { invalidResultFile.delete(); } diff --git a/jaxws/.hgtags b/jaxws/.hgtags index b130a70170d..a70a115ee06 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -401,3 +401,25 @@ c48b4d4768b1c2b8fe5d1a844ca13732e5dfbe2a jdk-9+151 7a532a9a227137155b905341d4b99939db51220e jdk-9+153 34af95c7dbff74f3448fcdb7d745524e8a1cc88a jdk-9+154 9b9918656c97724fd89c04a8547043bbd37f5935 jdk-9+155 +7c829eba781409b4fe15392639289af1553dcf63 jdk-9+156 +b7e70e1e0154e1d2c69f814e03a8800ef8634fe0 jdk-9+157 +e53b322357382209fb553b9a1541ccfd12cbcb6c jdk-9+158 +0ea34706c7fa5cd71accd493eb4f54262e4a5f4e jdk-9+159 +6bff08fd5d217549aec10a20007378e52099be6c jdk-9+160 +7d5352c54fc802b3301d8433b6b2b2a92b616630 jdk-9+161 +b8aebe5292f23689f97cb8e66a9f327834dd43e6 jdk-9+162 +3890f96e8995be8c84f330d1f65269b03ac36b24 jdk-9+163 +1a52de2da827459e866fd736f9e9c62eb2ecd6bb jdk-9+164 +a987401bac0d528475e57732c9d5d93f4405804c jdk-9+165 +b1f30c27367bd286fa4eb8a767335e917a5b5b82 jdk-9+166 +1c610f1b4097c64cdd722a7fb59f5a4d9cc15ca9 jdk-9+167 +2746716dcc5a8c28ccf41df0c8fb620b1a1e7098 jdk-9+168 +912cf69806d518c5af7fba30b340c4cb5458dd22 jdk-9+169 +e75d3abe579a7b39b762fc0a1a337c49eb072d82 jdk-9+170 +139e7c786ee4885efe53eb650b72c7b5a2d3b964 jdk-9+171 +8c615099f3e3ca137325be34bf566b767d9e3c64 jdk-9+172 +2bd967aa452c1e0e87a6173bef6fbb96ef1c521b jdk-9+173 +c2296642010f1b215ac35da89e92c3ce44104e32 jdk-9+174 +a5d361b9d1f7f78a675f3baef0d1fd32deee9ea2 jdk-9+175 +ea819b6009d33a72e6672bab6c101d51db0cfb4c jdk-9+176 +b44a721aee3d3b2537754e559fe9ecccadea548b jdk-9+177 diff --git a/jaxws/README b/jaxws/README deleted file mode 100644 index 4d65125b34c..00000000000 --- a/jaxws/README +++ /dev/null @@ -1,19 +0,0 @@ -README: - - This file should be located at the top of the Mercurial repository. - - See http://openjdk.java.net/ for more information about the OpenJDK. - - See ../README-builds.html for complete details on build machine requirements. - -Simple Build Instructions: - This repository can be loaded as a NetBeans project, built with ant, or - built with GNU make, e.g. - ant - -OR- - cd make && gnumake - - The built files that will be imported into the jdk build will be in the - "dist" directory. - Help information is available by running "ant -projecthelp" or "make help". - diff --git a/jaxws/src/java.activation/share/classes/META-INF/mimetypes.default b/jaxws/src/java.activation/share/classes/META-INF/mimetypes.default index 0c22eb2efb8..1b4056b194f 100644 --- a/jaxws/src/java.activation/share/classes/META-INF/mimetypes.default +++ b/jaxws/src/java.activation/share/classes/META-INF/mimetypes.default @@ -7,6 +7,7 @@ image/gif gif GIF image/ief ief image/jpeg jpeg jpg jpe JPG image/tiff tiff tif +image/png png PNG image/x-xwindowdump xwd application/postscript ai eps ps application/rtf rtf diff --git a/jaxws/src/java.activation/share/classes/javax/activation/CommandInfo.java b/jaxws/src/java.activation/share/classes/javax/activation/CommandInfo.java index b6312e0c253..5e8d3d35dd0 100644 --- a/jaxws/src/java.activation/share/classes/javax/activation/CommandInfo.java +++ b/jaxws/src/java.activation/share/classes/javax/activation/CommandInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -118,6 +118,9 @@ public class CommandInfo { * passed to the command. * @param loader The ClassLoader to be used to instantiate the bean. * @return The bean + * @exception IOException for failures reading data + * @exception ClassNotFoundException if command object class can't + * be found * @see java.beans.Beans#instantiate * @see javax.activation.CommandObject */ diff --git a/jaxws/src/java.activation/share/classes/javax/activation/CommandObject.java b/jaxws/src/java.activation/share/classes/javax/activation/CommandObject.java index 7dda0239819..1ec5849b38b 100644 --- a/jaxws/src/java.activation/share/classes/javax/activation/CommandObject.java +++ b/jaxws/src/java.activation/share/classes/javax/activation/CommandObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -48,6 +48,7 @@ public interface CommandObject { * * @param verb The Command Verb this object refers to. * @param dh The DataHandler. + * @exception IOException for failures accessing data */ public void setCommandContext(String verb, DataHandler dh) throws IOException; diff --git a/jaxws/src/java.activation/share/classes/javax/activation/DataHandler.java b/jaxws/src/java.activation/share/classes/javax/activation/DataHandler.java index 27f72484f69..59503997eb4 100644 --- a/jaxws/src/java.activation/share/classes/javax/activation/DataHandler.java +++ b/jaxws/src/java.activation/share/classes/javax/activation/DataHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -326,6 +326,7 @@ public class DataHandler implements Transferable { * Otherwise, {@code null} is returned. * * @return the OutputStream + * @exception IOException for failures creating the OutputStream * * @see javax.activation.DataSource#getOutputStream * @see javax.activation.URLDataSource diff --git a/jaxws/src/java.activation/share/classes/javax/activation/DataSource.java b/jaxws/src/java.activation/share/classes/javax/activation/DataSource.java index 8439eb19787..cee1018d1fd 100644 --- a/jaxws/src/java.activation/share/classes/javax/activation/DataSource.java +++ b/jaxws/src/java.activation/share/classes/javax/activation/DataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -49,6 +49,7 @@ public interface DataSource { * positioned at the beginning of the data. * * @return an InputStream + * @exception IOException for failures creating the InputStream */ public InputStream getInputStream() throws IOException; @@ -60,6 +61,7 @@ public interface DataSource { * be positioned at the location the data is to be written. * * @return an OutputStream + * @exception IOException for failures creating the OutputStream */ public OutputStream getOutputStream() throws IOException; diff --git a/jaxws/src/java.activation/share/classes/javax/activation/MailcapCommandMap.java b/jaxws/src/java.activation/share/classes/javax/activation/MailcapCommandMap.java index 29bc9ad0a44..d88a4405166 100644 --- a/jaxws/src/java.activation/share/classes/javax/activation/MailcapCommandMap.java +++ b/jaxws/src/java.activation/share/classes/javax/activation/MailcapCommandMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,6 +29,8 @@ package javax.activation; import java.util.*; import java.io.*; import java.net.*; +import java.security.AccessController; +import java.security.PrivilegedAction; import com.sun.activation.registries.MailcapFile; import com.sun.activation.registries.LogSupport; @@ -48,12 +50,19 @@ import com.sun.activation.registries.LogSupport; *
      *
    1. Programatically added entries to the MailcapCommandMap instance. *
    2. The file {@code .mailcap} in the user's home directory. - *
    3. The file {@literal <}java.home{@literal >}{@code /lib/mailcap}. + *
    4. The file {@code mailcap} in the Java runtime. *
    5. The file or resources named {@code META-INF/mailcap}. *
    6. The file or resource named {@code META-INF/mailcap.default} * (usually found only in the {@code activation.jar} file). *
    *

    + * (The current implementation looks for the {@code mailcap} file + * in the Java runtime in the directory java.home{@code /conf} + * if it exists, and otherwise in the directory + * java.home{@code /lib}, where java.home is the value + * of the "java.home" System property. Note that the "conf" directory was + * introduced in JDK 9.) + *

    * Mailcap file format:

    * * Mailcap files must conform to the mailcap @@ -120,6 +129,29 @@ public class MailcapCommandMap extends CommandMap { private MailcapFile[] DB; private static final int PROG = 0; // programmatically added entries + private static final String confDir; + + static { + String dir = null; + try { + dir = (String)AccessController.doPrivileged( + new PrivilegedAction() { + public Object run() { + String home = System.getProperty("java.home"); + String newdir = home + File.separator + "conf"; + File conf = new File(newdir); + if (conf.exists()) + return newdir + File.separator; + else + return home + File.separator + "lib" + File.separator; + } + }); + } catch (Exception ex) { + // ignore any exceptions + } + confDir = dir; + } + /** * The default Constructor. */ @@ -144,11 +176,11 @@ public class MailcapCommandMap extends CommandMap { LogSupport.log("MailcapCommandMap: load SYS"); try { // check system's home - String system_mailcap = System.getProperty("java.home") + - File.separator + "lib" + File.separator + "mailcap"; - mf = loadFile(system_mailcap); - if (mf != null) - dbv.add(mf); + if (confDir != null) { + mf = loadFile(confDir + "mailcap"); + if (mf != null) + dbv.add(mf); + } } catch (SecurityException ex) {} LogSupport.log("MailcapCommandMap: load JAR"); @@ -633,6 +665,7 @@ public class MailcapCommandMap extends CommandMap { * entries that specify a view command for the specified * MIME type are returned. * + * @param mimeType the MIME type * @return array of native command entries * @since 1.6, JAF 1.1 */ diff --git a/jaxws/src/java.activation/share/classes/javax/activation/MimeType.java b/jaxws/src/java.activation/share/classes/javax/activation/MimeType.java index 7f751fab98c..d96f454270a 100644 --- a/jaxws/src/java.activation/share/classes/javax/activation/MimeType.java +++ b/jaxws/src/java.activation/share/classes/javax/activation/MimeType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -58,6 +58,7 @@ public class MimeType implements Externalizable { * Constructor that builds a MimeType from a String. * * @param rawdata the MIME type string + * @exception MimeTypeParseException if the MIME type can't be parsed */ public MimeType(String rawdata) throws MimeTypeParseException { parse(rawdata); @@ -258,6 +259,7 @@ public class MimeType implements Externalizable { * * @param rawdata the MIME type string to compare with * @return true if they match + * @exception MimeTypeParseException if the MIME type can't be parsed */ public boolean match(String rawdata) throws MimeTypeParseException { return match(new MimeType(rawdata)); diff --git a/jaxws/src/java.activation/share/classes/javax/activation/MimeTypeParameterList.java b/jaxws/src/java.activation/share/classes/javax/activation/MimeTypeParameterList.java index 869dcfa6752..83822fa5a66 100644 --- a/jaxws/src/java.activation/share/classes/javax/activation/MimeTypeParameterList.java +++ b/jaxws/src/java.activation/share/classes/javax/activation/MimeTypeParameterList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -58,6 +58,7 @@ public class MimeTypeParameterList { * Constructs a new MimeTypeParameterList with the passed in data. * * @param parameterList an RFC 2045, 2046 compliant parameter list. + * @exception MimeTypeParseException if the MIME type can't be parsed */ public MimeTypeParameterList(String parameterList) throws MimeTypeParseException { @@ -71,6 +72,7 @@ public class MimeTypeParameterList { * A routine for parsing the parameter list out of a String. * * @param parameterList an RFC 2045, 2046 compliant parameter list. + * @exception MimeTypeParseException if the MIME type can't be parsed */ protected void parse(String parameterList) throws MimeTypeParseException { if (parameterList == null) diff --git a/jaxws/src/java.activation/share/classes/javax/activation/MimetypesFileTypeMap.java b/jaxws/src/java.activation/share/classes/javax/activation/MimetypesFileTypeMap.java index 430b43b1ed7..d2494634410 100644 --- a/jaxws/src/java.activation/share/classes/javax/activation/MimetypesFileTypeMap.java +++ b/jaxws/src/java.activation/share/classes/javax/activation/MimetypesFileTypeMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +28,8 @@ package javax.activation; import java.io.*; import java.net.*; import java.util.*; +import java.security.AccessController; +import java.security.PrivilegedAction; import com.sun.activation.registries.MimeTypeFile; import com.sun.activation.registries.LogSupport; @@ -43,12 +45,19 @@ import com.sun.activation.registries.LogSupport; *

      *
    1. Programmatically added entries to the MimetypesFileTypeMap instance. *
    2. The file {@code .mime.types} in the user's home directory. - *
    3. The file {@literal <}java.home{@literal >}{@code /lib/mime.types}. + *
    4. The file {@code mime.types} in the Java runtime. *
    5. The file or resources named {@code META-INF/mime.types}. *
    6. The file or resource named {@code META-INF/mimetypes.default} * (usually found only in the {@code activation.jar} file). *
    *

    + * (The current implementation looks for the {@code mime.types} file + * in the Java runtime in the directory java.home{@code /conf} + * if it exists, and otherwise in the directory + * java.home{@code /lib}, where java.home is the value + * of the "java.home" System property. Note that the "conf" directory was + * introduced in JDK 9.) + *

    * MIME types file format: * *

    {@code
    @@ -72,7 +81,30 @@ public class MimetypesFileTypeMap extends FileTypeMap {
         private MimeTypeFile[] DB;
         private static final int PROG = 0;  // programmatically added entries
     
    -    private static String defaultType = "application/octet-stream";
    +    private static final String defaultType = "application/octet-stream";
    +
    +    private static final String confDir;
    +
    +    static {
    +        String dir = null;
    +        try {
    +            dir = (String)AccessController.doPrivileged(
    +                new PrivilegedAction() {
    +                    public Object run() {
    +                        String home = System.getProperty("java.home");
    +                        String newdir = home + File.separator + "conf";
    +                        File conf = new File(newdir);
    +                        if (conf.exists())
    +                            return newdir + File.separator;
    +                        else
    +                            return home + File.separator + "lib" + File.separator;
    +                    }
    +                });
    +        } catch (Exception ex) {
    +            // ignore any exceptions
    +        }
    +        confDir = dir;
    +    }
     
         /**
          * The default constructor.
    @@ -97,11 +129,11 @@ public class MimetypesFileTypeMap extends FileTypeMap {
             LogSupport.log("MimetypesFileTypeMap: load SYS");
             try {
                 // check system's home
    -            String system_mimetypes = System.getProperty("java.home") +
    -                File.separator + "lib" + File.separator + "mime.types";
    -            mf = loadFile(system_mimetypes);
    -            if (mf != null)
    -                dbv.addElement(mf);
    +            if (confDir != null) {
    +                mf = loadFile(confDir + "mime.types");
    +                if (mf != null)
    +                    dbv.addElement(mf);
    +            }
             } catch (SecurityException ex) {}
     
             LogSupport.log("MimetypesFileTypeMap: load JAR");
    @@ -239,6 +271,7 @@ public class MimetypesFileTypeMap extends FileTypeMap {
          * added from the named file.
          *
          * @param mimeTypeFileName  the file name
    +     * @exception       IOException     for errors reading the file
          */
         public MimetypesFileTypeMap(String mimeTypeFileName) throws IOException {
             this();
    diff --git a/jaxws/src/java.activation/share/classes/module-info.java b/jaxws/src/java.activation/share/classes/module-info.java
    index 00d40e18550..c575883a67c 100644
    --- a/jaxws/src/java.activation/share/classes/module-info.java
    +++ b/jaxws/src/java.activation/share/classes/module-info.java
    @@ -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
    @@ -25,11 +25,18 @@
     
     /**
      * Defines the JavaBeans Activation Framework (JAF) API.
    + *
    + * 

    This module is upgradeable. + * + * @moduleGraph + * @since 9 */ +@Deprecated(since="9", forRemoval=true) module java.activation { - requires transitive java.datatransfer; requires java.logging; + requires transitive java.datatransfer; + exports javax.activation; } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java index 2f4da84f319..0406d5b4c6b 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -54,9 +54,7 @@ public interface Localizable { public Object[] getArguments(); public String getResourceBundleName(); - public default ResourceBundle getResourceBundle(Locale locale) { - return null; - } + public ResourceBundle getResourceBundle(Locale locale); /** * Special constant that represents a message that diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java index 1d7ace5146c..747110e350f 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -31,6 +31,7 @@ import java.util.Arrays; import java.util.Locale; import java.util.ResourceBundle; + /** * @author WS Development Team */ @@ -42,13 +43,9 @@ public final class LocalizableMessage implements Localizable { private final String _key; private final Object[] _args; + @Deprecated public LocalizableMessage(String bundlename, String key, Object... args) { - _bundlename = bundlename; - _rbSupplier = null; - _key = key; - if(args==null) - args = new Object[0]; - _args = args; + this(bundlename, null, key, args); } public LocalizableMessage(String bundlename, ResourceBundleSupplier rbSupplier, @@ -61,15 +58,17 @@ public final class LocalizableMessage implements Localizable { _args = args; } - + @Override public String getKey() { return _key; } + @Override public Object[] getArguments() { return Arrays.copyOf(_args, _args.length); } + @Override public String getResourceBundleName() { return _bundlename; } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java index bf8a28b76f3..e4d5a126962 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -36,6 +36,7 @@ public class LocalizableMessageFactory { private final String _bundlename; private final ResourceBundleSupplier _rbSupplier; + @Deprecated public LocalizableMessageFactory(String bundlename) { _bundlename = bundlename; _rbSupplier = null; @@ -58,4 +59,5 @@ public class LocalizableMessageFactory { */ ResourceBundle getResourceBundle(Locale locale); } + } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java index 2f78673eab0..a0436beafa1 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,7 +25,6 @@ package com.sun.istack.internal.localization; -import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; import java.text.MessageFormat; import java.util.HashMap; import java.util.Locale; @@ -41,7 +40,7 @@ import java.util.ResourceBundle; public class Localizer { private final Locale _locale; - private final HashMap _resourceBundles; + private final HashMap _resourceBundles; public Localizer() { this(Locale.getDefault()); @@ -49,7 +48,7 @@ public class Localizer { public Localizer(Locale l) { _locale = l; - _resourceBundles = new HashMap(); + _resourceBundles = new HashMap<>(); } public Locale getLocale() { diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/NullLocalizable.java b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/NullLocalizable.java index e0fb44621f4..f9f0b7abe09 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/NullLocalizable.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/NullLocalizable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,6 +25,9 @@ package com.sun.istack.internal.localization; +import java.util.Locale; +import java.util.ResourceBundle; + /** * {@link Localizable} that wraps a non-localizable string. * @@ -39,13 +42,20 @@ public final class NullLocalizable implements Localizable { this.msg = msg; } + @Override public String getKey() { return Localizable.NOT_LOCALIZABLE; } + @Override public Object[] getArguments() { return new Object[]{msg}; } + @Override public String getResourceBundleName() { return ""; } + @Override + public ResourceBundle getResourceBundle(Locale locale) { + return null; + } } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java index a27f0825fe8..fcf907d88ee 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -533,4 +533,14 @@ public abstract class JAXBRIContext extends JAXBContext { * @since 2.2.6 */ public static final String DISABLE_XML_SECURITY = "com.sun.xml.internal.bind.disableXmlSecurity"; + + /** + * If true and element namespace is not specified, namespace of parent element will be used. + * The default value is false. + * + * Boolean + * @since 2.3.0 + */ + public static final String BACKUP_WITH_PARENT_NAMESPACE = "com.sun.xml.internal.bind.backupWithParentNamespace"; + } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/MinimumEscapeHandler.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/MinimumEscapeHandler.java index d993fd6f5d1..fb83399f496 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/MinimumEscapeHandler.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/MinimumEscapeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -48,10 +48,10 @@ public class MinimumEscapeHandler implements CharacterEscapeHandler { int limit = start+length; for (int i = start; i < limit; i++) { char c = ch[i]; - if(c == '&' || c == '<' || c == '>' || c == '\r' || (c == '\"' && isAttVal) ) { - if(i!=start) - out.write(ch,start,i-start); - start = i+1; + if (c == '&' || c == '<' || c == '>' || c == '\r' || (c == '\n' && isAttVal) || (c == '\"' && isAttVal)) { + if (i != start) + out.write(ch, start, i - start); + start = i + 1; switch (ch[i]) { case '&': out.write("&"); @@ -65,6 +65,14 @@ public class MinimumEscapeHandler implements CharacterEscapeHandler { case '\"': out.write("""); break; + case '\n': + case '\r': + out.write("&#"); + out.write(Integer.toString(c)); + out.write(';'); + break; + default: + throw new IllegalArgumentException("Cannot escape: '" + c + "'"); } } } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/NoEscapeHandler.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/NoEscapeHandler.java new file mode 100644 index 00000000000..5edfb0c3aa0 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/marshaller/NoEscapeHandler.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.bind.marshaller; + +import java.io.IOException; +import java.io.Writer; + +/** + * Performs no character escaping. + * + * @author + * Roman Grigoriadi (roman.grigoriadi@oracle.com) + */ +public class NoEscapeHandler implements CharacterEscapeHandler { + + public static final NoEscapeHandler theInstance = new NoEscapeHandler(); + + @Override + public void escape(char[] ch, int start, int length, boolean isAttVal, Writer out) throws IOException { + out.write(ch, start, length); + } +} diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java index a18f79e1d58..73fe277419f 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -112,6 +112,8 @@ public class ContextFactory { "is not active. Using JAXB's implementation"); } + Boolean backupWithParentNamespace = getPropertyValue(properties, JAXBRIContext.BACKUP_WITH_PARENT_NAMESPACE, Boolean.class); + RuntimeAnnotationReader ar = getPropertyValue(properties,JAXBRIContext.ANNOTATION_READER,RuntimeAnnotationReader.class); Collection tr = getPropertyValue(properties, JAXBRIContext.TYPE_REFERENCES, Collection.class); @@ -144,6 +146,7 @@ public class ContextFactory { builder.setSupressAccessorWarnings(supressAccessorWarnings); builder.setImprovedXsiTypeHandling(improvedXsiTypeHandling); builder.setDisableSecurityProcessing(disablesecurityProcessing); + builder.setBackupWithParentNamespace(backupWithParentNamespace); return builder.build(); } diff --git a/jdk/src/jdk.desktop/share/classes/module-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package-info.java similarity index 86% rename from jdk/src/jdk.desktop/share/classes/module-info.java rename to jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package-info.java index 2aac00da299..848316f6c53 100644 --- a/jdk/src/jdk.desktop/share/classes/module-info.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,7 @@ * questions. */ -/* - * Provides non-SE desktop APIs. +/** + * Code that deals with low level byte code manipulation. */ - -module jdk.desktop { - requires transitive java.desktop; - - exports jdk.awt; -} +package com.sun.xml.internal.bind.v2.bytecode; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package.html deleted file mode 100644 index 092f6f3e5d2..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - Code that deals with low level byte code manipulation. - - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package-info.java new file mode 100644 index 00000000000..40328931c18 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Abstraction around reading annotations, to support internal/external annotations. + */ +package com.sun.xml.internal.bind.v2.model.annotation; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package.html deleted file mode 100644 index acc9be725ab..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Abstraction around reading annotations, to support internal/external annotations. - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java index 5b97093d3fd..c584056f611 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,24 +29,25 @@ import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException; /** * listen to static errors found during building a JAXB model from a set of classes. - * Implemented by the client of {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder}. + * Implemented by the client of {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI}. * *

    * All the static errors have to be reported while constructing a - * model, not when a model is used (IOW, until the {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder#link} completes. - * Internally, {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder} wraps an {@link ErrorHandler} and all the model + * model, not when a model is used (IOW, until the {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI} completes. + * Internally, {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI} wraps an {@link ErrorHandler} and all the model * components should report errors through it. * *

    * {@link IllegalAnnotationException} is a checked exception to remind * the model classes to report it rather than to throw it. * - * @see com.sun.xml.internal.bind.v2.model.impl.ModelBuilder + * @see com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI * @author Kohsuke Kawaguchi */ public interface ErrorHandler { /** * Receives a notification for an error in the annotated code. + * @param e */ void error( IllegalAnnotationException e ); } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java index c3406b7da6f..83caf8f4f04 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -57,7 +57,7 @@ public enum PropertyKind { public final boolean isOrdered; /** - * {@link com.sun.xml.internal.bind.v2.runtime.property.PropertyFactory} benefits from having index numbers assigned to + * {@code com.sun.xml.internal.bind.v2.runtime.property.PropertyFactory} benefits from having index numbers assigned to * {@link #ELEMENT}, {@link #REFERENCE}, and {@link #MAP} in this order. */ public final int propertyIndex; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java index 794c3396d25..9bfe5e04209 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -34,18 +34,22 @@ import javax.xml.bind.annotation.XmlRegistry; * *

    * This interface is only meant to be used as a return type from - * {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder}. + * {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI}. * * @author Kohsuke Kawaguchi + * @param + * @param */ public interface RegistryInfo { /** * Returns all the references to other types in this registry. + * @return */ Set> getReferences(); /** * Returns the class with {@link XmlRegistry}. + * @return */ C getClazz(); } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package-info.java new file mode 100644 index 00000000000..68abc10902c --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Implementation of the com.sun.xml.internal.bind.j2s.model package. + */ +package com.sun.xml.internal.bind.v2.model.impl; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package.html deleted file mode 100644 index e37eebd2ac4..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -Implementation of the com.sun.xml.internal.bind.j2s.model package. - - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package-info.java new file mode 100644 index 00000000000..ea3b945f33c --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Abstraction around the reflection library, to support various reflection models (such as java.lang.reflect and Annotation Processing). + */ +package com.sun.xml.internal.bind.v2.model.nav; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package.html deleted file mode 100644 index 319f86c97b9..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Abstraction around the reflection library, to support various reflection models (such as java.lang.reflect and Annotation Processing). - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/BridgeImpl.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/BridgeImpl.java index 21420097f63..86742930830 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/BridgeImpl.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/BridgeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,7 @@ final class BridgeImpl extends InternalBridge { public void marshal(Marshaller _m, T t, XMLStreamWriter output) throws JAXBException { MarshallerImpl m = (MarshallerImpl)_m; - m.write(tagName,bi,t,XMLStreamWriterOutput.create(output,context),new StAXPostInitAction(output,m.serializer)); + m.write(tagName,bi,t,XMLStreamWriterOutput.create(output,context, m.getEscapeHandler()),new StAXPostInitAction(output,m.serializer)); } public void marshal(Marshaller _m, T t, OutputStream output, NamespaceContext nsContext) throws JAXBException { diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java index 3c918598348..5a03996782a 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -241,6 +241,16 @@ public final class JAXBContextImpl extends JAXBRIContext { private Set xmlNsSet = null; + /** + * If true, despite the specification, unmarshall child element with parent namespace, if child namespace is not specified. + * The default value is null for System {code}com.sun.xml.internal.bind.backupWithParentNamespace{code} property to be used, + * and false is assumed if it's not set either. + * + * Boolean + * @since 2.3.0 + */ + public Boolean backupWithParentNamespace = null; + /** * Returns declared XmlNs annotations (from package-level annotation XmlSchema * @@ -263,6 +273,7 @@ public final class JAXBContextImpl extends JAXBRIContext { this.supressAccessorWarnings = builder.supressAccessorWarnings; this.improvedXsiTypeHandling = builder.improvedXsiTypeHandling; this.disableSecurityProcessing = builder.disableSecurityProcessing; + this.backupWithParentNamespace = builder.backupWithParentNamespace; Collection typeRefs = builder.typeRefs; @@ -1024,6 +1035,7 @@ public final class JAXBContextImpl extends JAXBRIContext { private boolean allNillable; private boolean improvedXsiTypeHandling = true; private boolean disableSecurityProcessing = true; + private Boolean backupWithParentNamespace = null; // null for System property to be used public JAXBContextBuilder() {}; @@ -1039,6 +1051,7 @@ public final class JAXBContextImpl extends JAXBRIContext { this.xmlAccessorFactorySupport = baseImpl.xmlAccessorFactorySupport; this.allNillable = baseImpl.allNillable; this.disableSecurityProcessing = baseImpl.disableSecurityProcessing; + this.backupWithParentNamespace = baseImpl.backupWithParentNamespace; } public JAXBContextBuilder setRetainPropertyInfo(boolean val) { @@ -1101,6 +1114,11 @@ public final class JAXBContextImpl extends JAXBRIContext { return this; } + public JAXBContextBuilder setBackupWithParentNamespace(Boolean backupWithParentNamespace) { + this.backupWithParentNamespace = backupWithParentNamespace; + return this; + } + public JAXBContextImpl build() throws JAXBException { // fool-proof diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java index 4891984195b..5796b019954 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -165,7 +165,7 @@ public /*to make unit tests happy*/ final class MarshallerImpl extends AbstractM @Override public void marshal(Object obj, XMLStreamWriter writer) throws JAXBException { - write(obj, XMLStreamWriterOutput.create(writer,context), new StAXPostInitAction(writer,serializer)); + write(obj, XMLStreamWriterOutput.create(writer,context, escapeHandler), new StAXPostInitAction(writer,serializer)); } @Override @@ -371,6 +371,15 @@ public /*to make unit tests happy*/ final class MarshallerImpl extends AbstractM } + /** + * Returns escape handler provided with JAXB context parameters. + * + * @return escape handler + */ + CharacterEscapeHandler getEscapeHandler() { + return escapeHandler; + } + // // // create XMLWriter by specifing various type of output. @@ -436,13 +445,14 @@ public /*to make unit tests happy*/ final class MarshallerImpl extends AbstractM if(encoding.equals("UTF-8")) { Encoded[] table = context.getUTF8NameTable(); final UTF8XmlOutput out; + CharacterEscapeHandler ceh = createEscapeHandler(encoding); if(isFormattedOutput()) - out = new IndentingUTF8XmlOutput(os, indent, table, escapeHandler); + out = new IndentingUTF8XmlOutput(os, indent, table, ceh); else { if(c14nSupport) - out = new C14nXmlOutput(os, table, context.c14nSupport, escapeHandler); + out = new C14nXmlOutput(os, table, context.c14nSupport, ceh); else - out = new UTF8XmlOutput(os, table, escapeHandler); + out = new UTF8XmlOutput(os, table, ceh); } if(header!=null) out.setHeader(header); diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/FastInfosetStreamWriterOutput.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/FastInfosetStreamWriterOutput.java index 2e1ca69389f..4a1de635539 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/FastInfosetStreamWriterOutput.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/FastInfosetStreamWriterOutput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,21 +25,22 @@ package com.sun.xml.internal.bind.v2.runtime.output; +import com.sun.xml.internal.bind.marshaller.NoEscapeHandler; import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; import com.sun.xml.internal.bind.v2.runtime.Name; import com.sun.xml.internal.bind.v2.runtime.XMLSerializer; -import javax.xml.stream.XMLStreamException; - import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data; import com.sun.xml.internal.fastinfoset.EncodingConstants; import com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer; +import com.sun.xml.internal.org.jvnet.fastinfoset.VocabularyApplicationData; +import org.xml.sax.SAXException; + +import javax.xml.bind.JAXBContext; +import javax.xml.stream.XMLStreamException; import java.io.IOException; import java.util.Collection; import java.util.Map; import java.util.WeakHashMap; -import javax.xml.bind.JAXBContext; -import com.sun.xml.internal.org.jvnet.fastinfoset.VocabularyApplicationData; -import org.xml.sax.SAXException; /** * {@link XmlOutput} for {@link StAXDocumentSerializer}. @@ -220,7 +221,7 @@ public final class FastInfosetStreamWriterOutput extends XMLStreamWriterOutput { public FastInfosetStreamWriterOutput(StAXDocumentSerializer out, JAXBContextImpl context) { - super(out); + super(out, NoEscapeHandler.theInstance); this.fiout = out; this.localNames = context.getUTF8NameTable(); diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/StAXExStreamWriterOutput.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/StAXExStreamWriterOutput.java index 67d7fb40d44..c39199f814d 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/StAXExStreamWriterOutput.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/StAXExStreamWriterOutput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -27,6 +27,7 @@ package com.sun.xml.internal.bind.v2.runtime.output; import javax.xml.stream.XMLStreamException; +import com.sun.xml.internal.bind.marshaller.NoEscapeHandler; import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data; import com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx; @@ -40,7 +41,7 @@ public final class StAXExStreamWriterOutput extends XMLStreamWriterOutput { private final XMLStreamWriterEx out; public StAXExStreamWriterOutput(XMLStreamWriterEx out) { - super(out); + super(out, NoEscapeHandler.theInstance); this.out = out; } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java index c4721fd5ea8..892adcd1d1f 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -26,15 +26,16 @@ package com.sun.xml.internal.bind.v2.runtime.output; import java.io.IOException; +import java.io.Writer; import java.lang.reflect.Constructor; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; +import com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler; import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; import com.sun.xml.internal.bind.v2.runtime.XMLSerializer; -import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl; import org.xml.sax.SAXException; /** @@ -53,7 +54,7 @@ public class XMLStreamWriterOutput extends XmlOutputAbstractImpl { * Creates a new {@link XmlOutput} from a {@link XMLStreamWriter}. * This method recognizes an FI StAX writer. */ - public static XmlOutput create(XMLStreamWriter out, JAXBContextImpl context) { + public static XmlOutput create(XMLStreamWriter out, JAXBContextImpl context, CharacterEscapeHandler escapeHandler) { // try optimized path final Class writerClass = out.getClass(); if (writerClass==FI_STAX_WRITER_CLASS) { @@ -69,17 +70,26 @@ public class XMLStreamWriterOutput extends XmlOutputAbstractImpl { } } + CharacterEscapeHandler xmlStreamEscapeHandler = escapeHandler != null ? + escapeHandler : NewLineEscapeHandler.theInstance; + // otherwise the normal writer. - return new XMLStreamWriterOutput(out); + return new XMLStreamWriterOutput(out, xmlStreamEscapeHandler); } private final XMLStreamWriter out; + private final CharacterEscapeHandler escapeHandler; + + private final XmlStreamOutWriterAdapter writerWrapper; + protected final char[] buf = new char[256]; - protected XMLStreamWriterOutput(XMLStreamWriter out) { + protected XMLStreamWriterOutput(XMLStreamWriter out, CharacterEscapeHandler escapeHandler) { this.out = out; + this.escapeHandler = escapeHandler; + this.writerWrapper = new XmlStreamOutWriterAdapter(out); } // not called if we are generating fragments @@ -137,7 +147,7 @@ public class XMLStreamWriterOutput extends XmlOutputAbstractImpl { public void text(String value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException { if(needsSeparatingWhitespace) out.writeCharacters(" "); - out.writeCharacters(value); + escapeHandler.escape(value.toCharArray(), 0, value.length(), false, writerWrapper); } public void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException { @@ -207,4 +217,81 @@ public class XMLStreamWriterOutput extends XmlOutputAbstractImpl { } } + /** + * Performs character escaping only for new lines. + */ + private static class NewLineEscapeHandler implements CharacterEscapeHandler { + + public static final NewLineEscapeHandler theInstance = new NewLineEscapeHandler(); + + @Override + public void escape(char[] ch, int start, int length, boolean isAttVal, Writer out) throws IOException { + int limit = start+length; + int lastEscaped = start; + for (int i = start; i < limit; i++) { + char c = ch[i]; + if (c == '\r' || c == '\n') { + if (i != lastEscaped) { + out.write(ch, lastEscaped, i - lastEscaped); + } + lastEscaped = i + 1; + if (out instanceof XmlStreamOutWriterAdapter) { + try { + ((XmlStreamOutWriterAdapter)out).writeEntityRef("#x" + Integer.toHexString(c)); + } catch (XMLStreamException e) { + throw new IOException("Error writing xml stream", e); + } + } else { + out.write("&#x"); + out.write(Integer.toHexString(c)); + out.write(';'); + } + } + } + + if (lastEscaped != limit) { + out.write(ch, lastEscaped, length - lastEscaped); + } + } + } + + private static final class XmlStreamOutWriterAdapter extends Writer { + + private final XMLStreamWriter writer; + + private XmlStreamOutWriterAdapter(XMLStreamWriter writer) { + this.writer = writer; + } + + @Override + public void write(char[] cbuf, int off, int len) throws IOException { + try { + writer.writeCharacters(cbuf, off, len); + } catch (XMLStreamException e) { + throw new IOException("Error writing XML stream", e); + } + } + + public void writeEntityRef(String entityReference) throws XMLStreamException { + writer.writeEntityRef(entityReference); + } + + @Override + public void flush() throws IOException { + try { + writer.flush(); + } catch (XMLStreamException e) { + throw new IOException("Error flushing XML stream", e); + } + } + + @Override + public void close() throws IOException { + try { + writer.close(); + } catch (XMLStreamException e) { + throw new IOException("Error closing XML stream", e); + } + } + } } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package-info.java new file mode 100644 index 00000000000..3ae977b9d19 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Code that implements JAXBContext, Unmarshaller, and Marshaller. + */ +package com.sun.xml.internal.bind.v2.runtime; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package.html deleted file mode 100644 index 2c45e53176e..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -Code that implements JAXBContext, Unmarshaller, and Marshaller. - - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java index 1be59952231..d2154319c48 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -39,7 +39,7 @@ class AccessorInjector { private static final Logger logger = Util.getClassLogger(); - protected static final boolean noOptimize = Runtime.version().major() >= 9 || + protected static final boolean noOptimize = Util.getSystemProperty(ClassTailor.class.getName()+".noOptimize")!=null; static { diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java index 17c99557d9f..9e00016d7e9 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -40,6 +40,11 @@ import java.util.logging.Logger; import com.sun.xml.internal.bind.Util; import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; +import java.lang.reflect.Field; +import java.security.CodeSource; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; +import java.security.ProtectionDomain; /** * A {@link ClassLoader} used to "inject" optimized accessor classes @@ -131,7 +136,7 @@ final class Injector { /** * Injected classes keyed by their names. */ - private final Map classes = new HashMap(); + private final Map classes = new HashMap<>(); private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock(); private final Lock r = rwl.readLock(); private final Lock w = rwl.writeLock(); @@ -141,26 +146,59 @@ final class Injector { * False otherwise, which happens if this classloader can't see {@link Accessor}. */ private final boolean loadable; - private static final Method defineClass; - private static final Method resolveClass; - private static final Method findLoadedClass; + private static Method defineClass; + private static Method resolveClass; + private static Method findLoadedClass; + private static Object U; static { - Method[] m = AccessController.doPrivileged( - new PrivilegedAction() { - @Override - public Method[] run() { - return new Method[]{ - getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE), - getMethod(ClassLoader.class, "resolveClass", Class.class), - getMethod(ClassLoader.class, "findLoadedClass", String.class) - }; - } + try { + Method[] m = AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public Method[] run() { + return new Method[]{ + getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE), + getMethod(ClassLoader.class, "resolveClass", Class.class), + getMethod(ClassLoader.class, "findLoadedClass", String.class) + }; } - ); - defineClass = m[0]; - resolveClass = m[1]; - findLoadedClass = m[2]; + } + ); + defineClass = m[0]; + resolveClass = m[1]; + findLoadedClass = m[2]; + } catch (Throwable t) { + try { + U = AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public Object run() throws Exception { + Class u = Class.forName("sun.misc.Unsafe"); + Field theUnsafe = u.getDeclaredField("theUnsafe"); + theUnsafe.setAccessible(true); + return theUnsafe.get(null); + } + }); + defineClass = AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public Method run() throws Exception { + try { + return U.getClass().getMethod("defineClass", + new Class[]{String.class, + byte[].class, + Integer.TYPE, + Integer.TYPE, + ClassLoader.class, + ProtectionDomain.class}); + } catch (NoSuchMethodException | SecurityException ex) { + throw ex; + } + } + }); + } catch (SecurityException | PrivilegedActionException ex) { + Logger.getLogger(Injector.class.getName()).log(Level.SEVERE, null, ex); + } + } } private static Method getMethod(final Class c, final String methodname, final Class... params) { @@ -210,13 +248,11 @@ final class Injector { rlocked = false; //find loaded class from classloader - if (c == null) { + if (c == null && findLoadedClass != null) { try { c = (Class) findLoadedClass.invoke(parent, className.replace('/', '.')); - } catch (IllegalArgumentException e) { - logger.log(Level.FINE, "Unable to find " + className, e); - } catch (IllegalAccessException e) { + } catch (IllegalArgumentException | IllegalAccessException e) { logger.log(Level.FINE, "Unable to find " + className, e); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); @@ -253,9 +289,13 @@ final class Injector { // we need to inject a class into the try { - c = (Class) defineClass.invoke(parent, className.replace('/', '.'), image, 0, image.length); - resolveClass.invoke(parent, c); - } catch (IllegalAccessException e) { + if (resolveClass != null) { + c = (Class) defineClass.invoke(parent, className.replace('/', '.'), image, 0, image.length); + resolveClass.invoke(parent, c); + } else { + c = (Class) defineClass.invoke(U, className.replace('/', '.'), image, 0, image.length, parent, Injector.class.getProtectionDomain()); + } + } catch (IllegalAccessException e) { logger.log(Level.FINE, "Unable to inject " + className, e); return null; } catch (InvocationTargetException e) { diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package-info.java new file mode 100644 index 00000000000..70ae20ccdd9 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package-info.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Hosts optimized + * {@link com.sun.xml.internal.bind.v2.runtime.reflect.Accessor}, + * {@link com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor}, and {@link com.sun.xml.internal.bind.v2.runtime.Transducer}. + * + *

    How it works

    + *

    + * Most of the classes in this package are "templates." At run-time, A template class file is slightly modified to match + * the target Java Bean, then it will be loaded into the VM. + */ +package com.sun.xml.internal.bind.v2.runtime.reflect.opt; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html deleted file mode 100644 index 9039ffafb01..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - -Hosts optimized -{@link com.sun.xml.internal.bind.v2.runtime.reflect.Accessor}, -{@link com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor}, and -{@link com.sun.xml.internal.bind.v2.runtime.Transducer}. - -

    How it works

    -

    - Most of the classes in this package are "templates." At run-time, - A template class file is slightly modified to match the target Java Bean, - then it will be loaded into the VM. - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package-info.java new file mode 100644 index 00000000000..35dfd4abe9d --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Abstraction around accessing data of actual objects. + */ +package com.sun.xml.internal.bind.v2.runtime.reflect; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html deleted file mode 100644 index 36c5c915cf8..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Abstraction around accessing data of actual objects. - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java index d1e67292e4e..8ae68be34c0 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -33,7 +33,7 @@ import org.xml.sax.Locator; import org.w3c.dom.Node; /** - * Object that returns the current location that the {@link com.sun.xml.internal.bind.v2.runtime.unmarshaller.XmlVisitor} + * Object that returns the current location that the {@code com.sun.xml.internal.bind.v2.runtime.unmarshaller.XmlVisitor} * is parsing. * * @author Kohsuke Kawaguchi @@ -41,6 +41,7 @@ import org.w3c.dom.Node; public interface LocatorEx extends Locator { /** * Gets the current location in a {@link ValidationEventLocator} object. + * @return */ ValidationEventLocator getLocation(); diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java index 9becb9dd086..8141e4e5178 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -31,7 +31,9 @@ import java.util.Map; import javax.xml.namespace.QName; +import com.sun.xml.internal.bind.Util; import com.sun.xml.internal.bind.api.AccessorException; +import com.sun.xml.internal.bind.api.JAXBRIContext; import com.sun.xml.internal.bind.v2.WellKnownNamespace; import com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl; import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; @@ -231,11 +233,26 @@ public final class StructureLoader extends Loader { @Override public void childElement(UnmarshallingContext.State state, TagName arg) throws SAXException { ChildLoader child = childUnmarshallers.get(arg.uri,arg.local); - if (child == null) { - child = catchAll; - if (child==null) { - super.childElement(state,arg); - return; + if(child == null) { + Boolean backupWithParentNamespace = ((JAXBContextImpl) state.getContext().getJAXBContext()).backupWithParentNamespace; + backupWithParentNamespace = backupWithParentNamespace != null + ? backupWithParentNamespace + : Boolean.parseBoolean(Util.getSystemProperty(JAXBRIContext.BACKUP_WITH_PARENT_NAMESPACE)); + if ((beanInfo != null) && (beanInfo.getTypeNames() != null) && backupWithParentNamespace) { + Iterator typeNamesIt = beanInfo.getTypeNames().iterator(); + QName parentQName = null; + if ((typeNamesIt != null) && (typeNamesIt.hasNext()) && (catchAll == null)) { + parentQName = (QName) typeNamesIt.next(); + String parentUri = parentQName.getNamespaceURI(); + child = childUnmarshallers.get(parentUri, arg.local); + } + } + if (child == null) { + child = catchAll; + if(child==null) { + super.childElement(state,arg); + return; + } } } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java index fbe7ff55cb5..f7b434e49d8 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -23,5 +23,8 @@ * questions. */ +/** + * XML Schema writer generated by TXW. + */ @com.sun.xml.internal.txw2.annotation.XmlNamespace("http://www.w3.org/2001/XMLSchema") package com.sun.xml.internal.bind.v2.schemagen.xmlschema; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html deleted file mode 100644 index cce3c1b8ebf..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -XML Schema writer generated by TXW. - - diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java index d31a1cbe0d7..278756423e0 100644 --- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -150,15 +150,16 @@ class ContextFinder { * Create an instance of a class using the specified ClassLoader */ static JAXBContext newInstance(String contextPath, + Class[] contextPathClasses, String className, ClassLoader classLoader, Map properties) throws JAXBException { try { Class spFactory = ServiceLoaderUtil.safeLoadClass(className, PLATFORM_DEFAULT_FACTORY_CLASS, classLoader); - return newInstance(contextPath, spFactory, classLoader, properties); + return newInstance(contextPath, contextPathClasses, spFactory, classLoader, properties); } catch (ClassNotFoundException x) { - throw new JAXBException(Messages.format(Messages.PROVIDER_NOT_FOUND, className), x); + throw new JAXBException(Messages.format(Messages.DEFAULT_PROVIDER_NOT_FOUND), x); } catch (RuntimeException | JAXBException x) { // avoid wrapping RuntimeException to JAXBException, @@ -175,6 +176,7 @@ class ContextFinder { } static JAXBContext newInstance(String contextPath, + Class[] contextPathClasses, Class spFactory, ClassLoader classLoader, Map properties) throws JAXBException { @@ -212,6 +214,9 @@ class ContextFinder { // the cast would fail, so generate an exception with a nice message throw handleClassCastException(context.getClass(), JAXBContext.class); } + + ModuleUtil.delegateAddOpensToImplModule(contextPathClasses, spFactory); + return (JAXBContext) context; } catch (InvocationTargetException x) { // throw if it is exception not to be wrapped @@ -228,7 +233,7 @@ class ContextFinder { } } - private static Object instantiateProviderIfNecessary(Class implClass) throws JAXBException { + private static Object instantiateProviderIfNecessary(final Class implClass) throws JAXBException { try { if (JAXBContextFactory.class.isAssignableFrom(implClass)) { return AccessController.doPrivileged(new PrivilegedExceptionAction() { @@ -254,7 +259,7 @@ class ContextFinder { try { spi = ServiceLoaderUtil.safeLoadClass(className, PLATFORM_DEFAULT_FACTORY_CLASS, getContextClassLoader()); } catch (ClassNotFoundException e) { - throw new JAXBException(e); + throw new JAXBException(Messages.format(Messages.DEFAULT_PROVIDER_NOT_FOUND), e); } if (logger.isLoggable(Level.FINE)) { @@ -277,6 +282,7 @@ class ContextFinder { // the cast would fail, so generate an exception with a nice message throw handleClassCastException(context.getClass(), JAXBContext.class); } + ModuleUtil.delegateAddOpensToImplModule(classes, spFactory); return (JAXBContext) context; } catch (NoSuchMethodException | IllegalAccessException e) { @@ -295,50 +301,52 @@ class ContextFinder { ClassLoader classLoader, Map properties) throws JAXBException { - StringTokenizer packages = new StringTokenizer(contextPath, ":"); - if (!packages.hasMoreTokens()) { + if (contextPath == null || contextPath.isEmpty()) { // no context is specified throw new JAXBException(Messages.format(Messages.NO_PACKAGE_IN_CONTEXTPATH)); } - // search for jaxb.properties in the class loader of each class first - logger.fine("Searching jaxb.properties"); - while (packages.hasMoreTokens()) { - // com.acme.foo - > com/acme/foo/jaxb.properties - String factoryClassName = - classNameFromPackageProperties( - classLoader, - packages.nextToken(":").replace('.', '/'), - factoryId, - JAXB_CONTEXT_FACTORY_DEPRECATED); + //ModuleUtil is mr-jar class, scans context path for jaxb classes on jdk9 and higher + Class[] contextPathClasses = ModuleUtil.getClassesFromContextPath(contextPath, classLoader); - if (factoryClassName != null) { - return newInstance(contextPath, factoryClassName, classLoader, properties); - } + //first try with classloader#getResource + String factoryClassName = jaxbProperties(contextPath, classLoader, factoryId); + if (factoryClassName == null && contextPathClasses != null) { + //try with class#getResource + factoryClassName = jaxbProperties(contextPathClasses, factoryId); } + if (factoryClassName != null) { + return newInstance(contextPath, contextPathClasses, factoryClassName, classLoader, properties); + } + + String factoryName = classNameFromSystemProperties(); - if (factoryName != null) return newInstance(contextPath, factoryName, classLoader, properties); + if (factoryName != null) return newInstance(contextPath, contextPathClasses, factoryName, classLoader, properties); JAXBContextFactory obj = ServiceLoaderUtil.firstByServiceLoader( JAXBContextFactory.class, logger, EXCEPTION_HANDLER); - if (obj != null) return obj.createContext(contextPath, classLoader, properties); + if (obj != null) { + JAXBContext context = obj.createContext(contextPath, classLoader, properties); + ModuleUtil.delegateAddOpensToImplModule(contextPathClasses, obj.getClass()); + return context; + } // to ensure backwards compatibility factoryName = firstByServiceLoaderDeprecated(JAXBContext.class, classLoader); - if (factoryName != null) return newInstance(contextPath, factoryName, classLoader, properties); + if (factoryName != null) return newInstance(contextPath, contextPathClasses, factoryName, classLoader, properties); Class ctxFactory = (Class) ServiceLoaderUtil.lookupUsingOSGiServiceLoader( "javax.xml.bind.JAXBContext", logger); if (ctxFactory != null) { - return newInstance(contextPath, ctxFactory, classLoader, properties); + return newInstance(contextPath, contextPathClasses, ctxFactory, classLoader, properties); } // else no provider found logger.fine("Trying to create the platform default provider"); - return newInstance(contextPath, PLATFORM_DEFAULT_FACTORY_CLASS, classLoader, properties); + return newInstance(contextPath, contextPathClasses, PLATFORM_DEFAULT_FACTORY_CLASS, classLoader, properties); } static JAXBContext find(Class[] classes, Map properties) throws JAXBException { @@ -356,13 +364,18 @@ class ContextFinder { // TODO: it's easier to look things up from the class // c.getResourceAsStream("jaxb.properties"); - String factoryClassName = - classNameFromPackageProperties( - getClassClassLoader(c), - c.getPackage().getName().replace('.', '/'), - JAXBContext.JAXB_CONTEXT_FACTORY, JAXB_CONTEXT_FACTORY_DEPRECATED); + URL jaxbPropertiesUrl = getResourceUrl(c, "jaxb.properties"); + + if (jaxbPropertiesUrl != null) { + + String factoryClassName = + classNameFromPackageProperties( + jaxbPropertiesUrl, + JAXBContext.JAXB_CONTEXT_FACTORY, JAXB_CONTEXT_FACTORY_DEPRECATED); + + return newInstance(classes, properties, factoryClassName); + } - if (factoryClassName != null) return newInstance(classes, properties, factoryClassName); } String factoryClassName = classNameFromSystemProperties(); @@ -371,7 +384,11 @@ class ContextFinder { JAXBContextFactory factory = ServiceLoaderUtil.firstByServiceLoader(JAXBContextFactory.class, logger, EXCEPTION_HANDLER); - if (factory != null) return factory.createContext(classes, properties); + if (factory != null) { + JAXBContext context = factory.createContext(classes, properties); + ModuleUtil.delegateAddOpensToImplModule(classes, factory.getClass()); + return context; + } // to ensure backwards compatibility String className = firstByServiceLoaderDeprecated(JAXBContext.class, getContextClassLoader()); @@ -395,22 +412,20 @@ class ContextFinder { * first factoryId should be the preferred one, * more of those can be provided to support backwards compatibility */ - private static String classNameFromPackageProperties(ClassLoader classLoader, - String packageName, + private static String classNameFromPackageProperties(URL packagePropertiesUrl, String ... factoryIds) throws JAXBException { - String resourceName = packageName + "/jaxb.properties"; - logger.log(Level.FINE, "Trying to locate {0}", resourceName); - Properties props = loadJAXBProperties(classLoader, resourceName); - if (props != null) { - for(String factoryId : factoryIds) { - if (props.containsKey(factoryId)) { - return props.getProperty(factoryId); - } + logger.log(Level.FINE, "Trying to locate {0}", packagePropertiesUrl.toString()); + Properties props = loadJAXBProperties(packagePropertiesUrl); + for(String factoryId : factoryIds) { + if (props.containsKey(factoryId)) { + return props.getProperty(factoryId); } - throw new JAXBException(Messages.format(Messages.MISSING_PROPERTY, packageName, factoryIds[0])); } - return null; + //Factory key not found + String propertiesUrl = packagePropertiesUrl.toExternalForm(); + String packageName = propertiesUrl.substring(0, propertiesUrl.indexOf("/jaxb.properties")); + throw new JAXBException(Messages.format(Messages.MISSING_PROPERTY, packageName, factoryIds[0])); } private static String classNameFromSystemProperties() throws JAXBException { @@ -452,30 +467,40 @@ class ContextFinder { return value; } - private static Properties loadJAXBProperties(ClassLoader classLoader, - String propFileName) throws JAXBException { + private static Properties loadJAXBProperties(URL url) throws JAXBException { - Properties props = null; try { - URL url; - if (classLoader == null) - url = ClassLoader.getSystemResource(propFileName); - else - url = classLoader.getResource(propFileName); - - if (url != null) { - logger.log(Level.FINE, "loading props from {0}", url); - props = new Properties(); - InputStream is = url.openStream(); - props.load(is); - is.close(); - } + Properties props; + logger.log(Level.FINE, "loading props from {0}", url); + props = new Properties(); + InputStream is = url.openStream(); + props.load(is); + is.close(); + return props; } catch (IOException ioe) { - logger.log(Level.FINE, "Unable to load " + propFileName, ioe); + logger.log(Level.FINE, "Unable to load " + url.toString(), ioe); throw new JAXBException(ioe.toString(), ioe); } + } - return props; + /** + * If run on JPMS package containing resource must be open unconditionally. + * + * @param classLoader classloader to load resource with + * @param resourceName qualified name of the resource + * @return resource url if found + */ + private static URL getResourceUrl(ClassLoader classLoader, String resourceName) { + URL url; + if (classLoader == null) + url = ClassLoader.getSystemResource(resourceName); + else + url = classLoader.getResource(resourceName); + return url; + } + + private static URL getResourceUrl(Class clazz, String resourceName) { + return clazz.getResource(resourceName); } @@ -525,6 +550,7 @@ class ContextFinder { } else { return (ClassLoader) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public java.lang.Object run() { return Thread.currentThread().getContextClassLoader(); } @@ -539,6 +565,7 @@ class ContextFinder { } else { return (ClassLoader) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public java.lang.Object run() { return c.getClassLoader(); } @@ -552,6 +579,7 @@ class ContextFinder { } else { return (ClassLoader) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public java.lang.Object run() { return ClassLoader.getSystemClassLoader(); } @@ -603,4 +631,28 @@ class ContextFinder { } } + private static String jaxbProperties(String contextPath, ClassLoader classLoader, String factoryId) throws JAXBException { + String[] packages = contextPath.split(":"); + + for (String pkg : packages) { + String pkgUrl = pkg.replace('.', '/'); + URL jaxbPropertiesUrl = getResourceUrl(classLoader, pkgUrl + "/jaxb.properties"); + if (jaxbPropertiesUrl != null) { + return classNameFromPackageProperties(jaxbPropertiesUrl, + factoryId, JAXB_CONTEXT_FACTORY_DEPRECATED); + } + } + return null; + } + + private static String jaxbProperties(Class[] classesFromContextPath, String factoryId) throws JAXBException { + for (Class c : classesFromContextPath) { + URL jaxbPropertiesUrl = getResourceUrl(c, "jaxb.properties"); + if (jaxbPropertiesUrl != null) { + return classNameFromPackageProperties(jaxbPropertiesUrl, factoryId, JAXB_CONTEXT_FACTORY_DEPRECATED); + } + } + return null; + } + } diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/JAXBContext.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/JAXBContext.java index 4b4f6e55c46..9bb4ceae18f 100644 --- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/JAXBContext.java +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/JAXBContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -27,11 +27,11 @@ package javax.xml.bind; import org.w3c.dom.Node; +import java.io.IOException; +import java.io.InputStream; import java.util.Collections; import java.util.Map; import java.util.Properties; -import java.io.IOException; -import java.io.InputStream; /** * The {@code JAXBContext} class provides the client's entry point to the @@ -227,6 +227,9 @@ import java.io.InputStream; * This phase of the look up allows some packages to force the use of a certain JAXB implementation. * (For example, perhaps the schema compiler has generated some vendor extension in the code.) * + *

    + * This configuration method is deprecated. + * *

  • * If the system property {@link #JAXB_CONTEXT_FACTORY} exists, then its value is assumed to be the provider * factory class. If no such property exists, properties {@code "javax.xml.bind.context.factory"} and @@ -332,7 +335,14 @@ public abstract class JAXBContext { * the context class loader of the current thread. * * @throws JAXBException if an error was encountered while creating the - * {@code JAXBContext}. See {@link JAXBContext#newInstance(String, ClassLoader, Map)} for details. + * {@code JAXBContext} such as + *
      + *
    1. failure to locate either ObjectFactory.class or jaxb.index in the packages
    2. + *
    3. an ambiguity among global elements contained in the contextPath
    4. + *
    5. failure to locate a value for the context factory provider property
    6. + *
    7. mixing schema derived packages from different providers on the same contextPath
    8. + *
    9. packages are not open to {@code java.xml.bind} module
    10. + *
    */ public static JAXBContext newInstance( String contextPath ) throws JAXBException { @@ -414,16 +424,26 @@ public abstract class JAXBContext { *

    * The steps involved in discovering the JAXB implementation is discussed in the class javadoc. * - * @param contextPath list of java package names that contain schema - * derived class and/or java to schema (JAXB-annotated) - * mapped classes + * @param contextPath + * List of java package names that contain schema + * derived class and/or java to schema (JAXB-annotated) + * mapped classes. + * Packages in {@code contextPath} that are in named modules must be + * {@linkplain java.lang.Module#isOpen open} to at least the {@code java.xml.bind} module. * @param classLoader * This class loader will be used to locate the implementation * classes. * * @return a new instance of a {@code JAXBContext} * @throws JAXBException if an error was encountered while creating the - * {@code JAXBContext}. See {@link JAXBContext#newInstance(String, ClassLoader, Map)} for details. + * {@code JAXBContext} such as + *

      + *
    1. failure to locate either ObjectFactory.class or jaxb.index in the packages
    2. + *
    3. an ambiguity among global elements contained in the contextPath
    4. + *
    5. failure to locate a value for the context factory provider property
    6. + *
    7. mixing schema derived packages from different providers on the same contextPath
    8. + *
    9. packages are not open to {@code java.xml.bind} module
    10. + *
    */ public static JAXBContext newInstance( String contextPath, ClassLoader classLoader ) throws JAXBException { @@ -442,7 +462,12 @@ public abstract class JAXBContext { * The interpretation of properties is up to implementations. Implementations must * throw {@code JAXBException} if it finds properties that it doesn't understand. * - * @param contextPath list of java package names that contain schema derived classes + * @param contextPath + * List of java package names that contain schema + * derived class and/or java to schema (JAXB-annotated) + * mapped classes. + * Packages in {@code contextPath} that are in named modules must be + * {@linkplain java.lang.Module#isOpen open} to at least the {@code java.xml.bind} module. * @param classLoader * This class loader will be used to locate the implementation classes. * @param properties @@ -457,6 +482,7 @@ public abstract class JAXBContext { *
  • an ambiguity among global elements contained in the contextPath
  • *
  • failure to locate a value for the context factory provider property
  • *
  • mixing schema derived packages from different providers on the same contextPath
  • + *
  • packages are not open to {@code java.xml.bind} module
  • * * @since 1.6, JAXB 2.0 */ @@ -588,15 +614,27 @@ public abstract class JAXBContext { * The steps involved in discovering the JAXB implementation is discussed in the class javadoc. * * @param classesToBeBound - * list of java classes to be recognized by the new {@link JAXBContext}. + * List of java classes to be recognized by the new {@link JAXBContext}. + * Classes in {@code classesToBeBound} that are in named modules must be in a package + * that is {@linkplain java.lang.Module#isOpen open} to at least the {@code java.xml.bind} module. * Can be empty, in which case a {@link JAXBContext} that only knows about * spec-defined classes will be returned. * * @return * A new instance of a {@code JAXBContext}. * - * @throws JAXBException if an error was encountered while creating the - * {@code JAXBContext}. See {@link JAXBContext#newInstance(Class[], Map)} for details. + * @throws JAXBException + * if an error was encountered while creating the + * {@code JAXBContext}, such as (but not limited to): + *
      + *
    1. No JAXB implementation was discovered + *
    2. Classes use JAXB annotations incorrectly + *
    3. Classes have colliding annotations (i.e., two classes with the same type name) + *
    4. The JAXB implementation was unable to locate + * provider-specific out-of-band information (such as additional + * files generated at the development time.) + *
    5. {@code classesToBeBound} are not open to {@code java.xml.bind} module + *
    * * @throws IllegalArgumentException * if the parameter contains {@code null} (i.e., {@code newInstance(null);}) @@ -621,7 +659,9 @@ public abstract class JAXBContext { * throw {@code JAXBException} if it finds properties that it doesn't understand. * * @param classesToBeBound - * list of java classes to be recognized by the new {@link JAXBContext}. + * List of java classes to be recognized by the new {@link JAXBContext}. + * Classes in {@code classesToBeBound} that are in named modules must be in a package + * that is {@linkplain java.lang.Module#isOpen open} to at least the {@code java.xml.bind} module. * Can be empty, in which case a {@link JAXBContext} that only knows about * spec-defined classes will be returned. * @param properties @@ -641,6 +681,7 @@ public abstract class JAXBContext { *
  • The JAXB implementation was unable to locate * provider-specific out-of-band information (such as additional * files generated at the development time.) + *
  • {@code classesToBeBound} are not open to {@code java.xml.bind} module * * * @throws IllegalArgumentException @@ -702,6 +743,7 @@ public abstract class JAXBContext { * {@code Validator} object * @deprecated since JAXB2.0 */ + @Deprecated public abstract Validator createValidator() throws JAXBException; /** diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/JAXBContextFactory.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/JAXBContextFactory.java index ef98dc61e4f..90fad73aea8 100644 --- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/JAXBContextFactory.java +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/JAXBContextFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -44,7 +44,9 @@ public interface JAXBContextFactory { * For semantics see {@link javax.xml.bind.JAXBContext#newInstance(Class[], java.util.Map)} * * @param classesToBeBound - * list of java classes to be recognized by the new {@link JAXBContext}. + * List of java classes to be recognized by the new {@link JAXBContext}. + * Classes in {@code classesToBeBound} that are in named modules must be in a package + * that is {@linkplain java.lang.Module#isOpen open} to at least the {@code java.xml.bind} module. * Can be empty, in which case a {@link JAXBContext} that only knows about * spec-defined classes will be returned. * @param properties @@ -56,7 +58,16 @@ public interface JAXBContextFactory { * * @throws JAXBException * if an error was encountered while creating the - * {@code JAXBContext}. See {@link JAXBContext#newInstance(Class[], Map)} for details. + * {@code JAXBContext}, such as (but not limited to): + *
      + *
    1. No JAXB implementation was discovered + *
    2. Classes use JAXB annotations incorrectly + *
    3. Classes have colliding annotations (i.e., two classes with the same type name) + *
    4. The JAXB implementation was unable to locate + * provider-specific out-of-band information (such as additional + * files generated at the development time.) + *
    5. {@code classesToBeBound} are not open to {@code java.xml.bind} module + *
    * * @throws IllegalArgumentException * if the parameter contains {@code null} (i.e., {@code newInstance(null,someMap);}) @@ -77,7 +88,10 @@ public interface JAXBContextFactory { * The interpretation of properties is up to implementations. Implementations must * throw {@code JAXBException} if it finds properties that it doesn't understand. * - * @param contextPath list of java package names that contain schema derived classes + * @param contextPath + * List of java package names that contain schema derived classes. + * Classes in {@code classesToBeBound} that are in named modules must be in a package + * that is {@linkplain java.lang.Module#isOpen open} to at least the {@code java.xml.bind} module. * @param classLoader * This class loader will be used to locate the implementation classes. * @param properties @@ -86,7 +100,14 @@ public interface JAXBContextFactory { * * @return a new instance of a {@code JAXBContext} * @throws JAXBException if an error was encountered while creating the - * {@code JAXBContext}. See {@link JAXBContext#newInstance(String, ClassLoader, Map)} for details. + * {@code JAXBContext} such as + *
      + *
    1. failure to locate either ObjectFactory.class or jaxb.index in the packages
    2. + *
    3. an ambiguity among global elements contained in the contextPath
    4. + *
    5. failure to locate a value for the context factory provider property
    6. + *
    7. mixing schema derived packages from different providers on the same contextPath
    8. + *
    9. packages are not open to {@code java.xml.bind} module
    10. + *
    * * @since 9, JAXB 2.3 */ diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.java index a1ebb81f4ab..cbde96f86e2 100644 --- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.java +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -65,6 +65,9 @@ class Messages static final String PROVIDER_NOT_FOUND = // 1 arg "ContextFinder.ProviderNotFound"; + static final String DEFAULT_PROVIDER_NOT_FOUND = // 0 args + "ContextFinder.DefaultProviderNotFound"; + static final String COULD_NOT_INSTANTIATE = // 2 args "ContextFinder.CouldNotInstantiate"; @@ -88,4 +91,10 @@ class Messages static final String ILLEGAL_CAST = // 2 args "JAXBContext.IllegalCast"; + + static final String ERROR_LOAD_CLASS = // 2 args + "ContextFinder.ErrorLoadClass"; + + static final String JAXB_CLASSES_NOT_OPEN = // 1 arg + "JAXBClasses.notOpen"; } diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.properties b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.properties index e6a930d67d4..8ea89d31487 100644 --- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.properties +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 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 @@ -26,6 +26,9 @@ ContextFinder.ProviderNotFound = \ Provider {0} not found +ContextFinder.DefaultProviderNotFound = \ + Implementation of JAXB-API has not been found on module path or classpath. + ContextFinder.CouldNotInstantiate = \ Provider {0} could not be instantiated: {1} @@ -41,6 +44,11 @@ ContextFinder.MissingProperty = \ ContextFinder.NoPackageInContextPath = \ No package name is given +ContextFinder.ErrorLoadClass = \ + Error loading class {0} listed in {1}, make sure that entries are accessable \ + on CLASSPATH and of the form ClassName or OuterClass.InnerClass \ + not ClassName.class or fully.qualified.ClassName + PropertyException.NameValue = \ name: {0} value: {1} @@ -49,3 +57,6 @@ DatatypeConverter.ConverterMustNotBeNull = \ JAXBContext.IllegalCast = \ ClassCastException: attempting to cast {0} to {1}. Please make sure that you are specifying the proper ClassLoader. + +JAXBClasses.notOpen = \ + Package {0} with JAXB class {1} defined in a module {2} must be open to at least java.xml.bind module. diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ModuleUtil.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ModuleUtil.java new file mode 100644 index 00000000000..d78441ca835 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ModuleUtil.java @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.bind; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.lang.Module; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Propagates openness of JAXB annottated classess packages to JAXB impl module. + * + * @author Roman Grigoriadi + */ +class ModuleUtil { + + private static Logger logger = Logger.getLogger("javax.xml.bind"); + + /** + * Resolves classes from context path. + * Only one class per package is needed to access its {@link java.lang.Module} + */ + static Class[] getClassesFromContextPath(String contextPath, ClassLoader classLoader) throws JAXBException { + List classes = new ArrayList<>(); + if (contextPath == null || contextPath.isEmpty()){ + return classes.toArray(new Class[]{}); + } + + String [] tokens = contextPath.split(":"); + for (String pkg : tokens){ + + // look for ObjectFactory and load it + final Class o; + try { + o = classLoader.loadClass(pkg+".ObjectFactory"); + classes.add(o); + continue; + } catch (ClassNotFoundException e) { + // not necessarily an error + } + + // look for jaxb.index and load the list of classes + try { + final Class firstByJaxbIndex = findFirstByJaxbIndex(pkg, classLoader); + if (firstByJaxbIndex != null) { + classes.add(firstByJaxbIndex); + } + } catch (IOException e) { + throw new JAXBException(e); + } + } + + if (logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, "Resolved classes from context path: {0}", classes); + } + return classes.toArray(new Class[]{}); + } + + /** + * Find first class in package by {@code jaxb.index} file. + */ + static Class findFirstByJaxbIndex(String pkg, ClassLoader classLoader) throws IOException, JAXBException { + final String resource = pkg.replace('.', '/') + "/jaxb.index"; + final InputStream resourceAsStream = classLoader.getResourceAsStream(resource); + + if (resourceAsStream == null) { + return null; + } + + BufferedReader in = + new BufferedReader(new InputStreamReader(resourceAsStream, "UTF-8")); + try { + String className = in.readLine(); + while (className != null) { + className = className.trim(); + if (className.startsWith("#") || (className.length() == 0)) { + className = in.readLine(); + continue; + } + + try { + return classLoader.loadClass(pkg + '.' + className); + } catch (ClassNotFoundException e) { + throw new JAXBException(Messages.format(Messages.ERROR_LOAD_CLASS, className, pkg), e); + } + + } + } finally { + in.close(); + } + return null; + } + + /** + * Implementation may be defined in other module than {@code java.xml.bind}. In that case openness + * {@linkplain Module#isOpen open} of classes should be delegated to implementation module. + * + * @param classes used to resolve module for {@linkplain Module#addOpens(String, Module)} + * @param factorySPI used to resolve {@link Module} of the implementation. + * + * @throws JAXBException if ony of a classes package is not open to {@code java.xml.bind} module. + */ + static void delegateAddOpensToImplModule(Class[] classes, Class factorySPI) throws JAXBException { + final Module implModule = factorySPI.getModule(); + if (!implModule.isNamed()) { + return; + } + + Module jaxbModule = JAXBContext.class.getModule(); + + for (Class cls : classes) { + final Module classModule = cls.getModule(); + final String packageName = cls.getPackageName(); + //no need for unnamed + if (!classModule.isNamed()) { + continue; + } + //report error if they are not open to java.xml.bind + if (!classModule.isOpen(packageName, jaxbModule)) { + throw new JAXBException(Messages.format(Messages.JAXB_CLASSES_NOT_OPEN, + packageName, cls.getName(), classModule.getName())); + } + //propagate openness to impl module + classModule.addOpens(packageName, implModule); + if (logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, "Propagating openness of package {0} in {1} to {2}.", + new String[]{ packageName, classModule.getName(), implModule.getName() }); + } + } + } + +} diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Unmarshaller.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Unmarshaller.java index f075443bdfa..f8424dd1881 100644 --- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Unmarshaller.java +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Unmarshaller.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -23,6 +23,8 @@ * questions. */ + + package javax.xml.bind; import javax.xml.bind.annotation.adapters.XmlAdapter; @@ -975,7 +977,6 @@ public interface Unmarshaller { * {@link #isValidating()} API as well as access to the Schema object. * To determine if the Unmarshaller has validation enabled, simply * test the return type for null: - *

    *

    {@code
          *   boolean isValidating = u.getSchema()!=null;
          * }
    diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/adapters/package-info.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/adapters/package-info.java new file mode 100644 index 00000000000..d52ab7fa2bd --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/adapters/package-info.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * {@link javax.xml.bind.annotation.adapters.XmlAdapter} and its spec-defined + * sub-classes to allow arbitrary Java classes to be used with JAXB. + *

    + *

    Package Specification

    + *

    + *

    + *

    + *

    Related Documentation

    + *

    + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + *

    + * + * @see JAXB Website + */ +package javax.xml.bind.annotation.adapters; diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/helpers/package-info.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/helpers/package-info.java new file mode 100644 index 00000000000..c5c0bec28f1 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/helpers/package-info.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * JAXB Provider Use Only: Provides partial default implementations for + * some of the javax.xml.bind interfaces. + *

    + *

    + * JAXB Providers can extend these classes and implement the abstract + * methods. + *

    + *

    Package Specification

    + *

    + *

    + *

    + *

    Related Documentation

    + *

    + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + *

    + * + * @see JAXB Website + */ +package javax.xml.bind.helpers; diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/package-info.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/package-info.java new file mode 100644 index 00000000000..aa6ff577e52 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/package-info.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides a runtime binding framework for client applications including + * unmarshalling, marshalling, and validation capabilities. + *

    + *

    + * JAXBContext is the client-entry point to the runtime binding + * framework. + *

    + *

    + *

    Package Specification

    + *

    + *

    + *

    + *

    Related Documentation

    + *

    + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + *

    + * + * @see JAXB Website + */ +package javax.xml.bind; diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/util/package-info.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/util/package-info.java new file mode 100644 index 00000000000..229d4343fc2 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/util/package-info.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Useful client utility classes. + *

    + *

    Package Specification

    + *

    + *

    + *

    + *

    Related Documentation

    + *

    + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + *

    + * + * @see JAXB Website + */ +package javax.xml.bind.util; diff --git a/jaxws/src/java.xml.bind/share/classes/module-info.java b/jaxws/src/java.xml.bind/share/classes/module-info.java index 1a6abaf0bf0..34ff29794b7 100644 --- a/jaxws/src/java.xml.bind/share/classes/module-info.java +++ b/jaxws/src/java.xml.bind/share/classes/module-info.java @@ -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 @@ -25,15 +25,23 @@ /** * Defines the Java Architecture for XML Binding (JAXB) API. + * + *

    This module is upgradeable. + * + * @uses javax.xml.bind.JAXBContextFactory + * + * @moduleGraph + * @since 9 */ +@Deprecated(since="9", forRemoval=true) module java.xml.bind { - requires transitive java.activation; - requires transitive java.xml; requires java.compiler; requires java.desktop; requires java.logging; + requires jdk.unsupported; - uses javax.xml.bind.JAXBContextFactory; + requires transitive java.activation; + requires transitive java.xml; exports javax.xml.bind; exports javax.xml.bind.annotation; @@ -41,6 +49,7 @@ module java.xml.bind { exports javax.xml.bind.attachment; exports javax.xml.bind.helpers; exports javax.xml.bind.util; + exports com.sun.istack.internal to java.xml.ws, jdk.xml.bind, @@ -140,4 +149,7 @@ module java.xml.bind { java.xml.ws, jdk.xml.bind, jdk.xml.ws; + + uses javax.xml.bind.JAXBContextFactory; + } diff --git a/jaxws/src/java.xml.ws.annotation/share/classes/module-info.java b/jaxws/src/java.xml.ws.annotation/share/classes/module-info.java index 58a625918fe..fdf5e66b636 100644 --- a/jaxws/src/java.xml.ws.annotation/share/classes/module-info.java +++ b/jaxws/src/java.xml.ws.annotation/share/classes/module-info.java @@ -26,7 +26,13 @@ /** * Defines a subset of the Common Annotations API to support programs running * on the Java SE Platform. + * + *

    This module is upgradeable. + * + * @moduleGraph + * @since 9 */ +@Deprecated(since="9", forRemoval=true) module java.xml.ws.annotation { exports javax.annotation; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java index 151ae98e1fe..9136b3eb128 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java @@ -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 @@ -39,8 +39,7 @@ import javax.xml.stream.XMLStreamWriter; public interface LazyEnvelopeSource extends javax.xml.transform.Source { /** * Retrieve payload qname without materializing its contents - * @return - * @throws SOAPException + * @return payload QName */ public QName getPayloadQName(); public XMLStreamReader readToBodyStarTag() throws XMLStreamException; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java index 7adf460cbb6..2d98512528e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -86,6 +86,7 @@ public class SOAPExceptionImpl extends SOAPException { /** * Constructs a SOAPExceptionImpl object initialized * with the given Throwable object. + * @param cause cause */ public SOAPExceptionImpl(Throwable cause) { super (cause.toString()); @@ -106,6 +107,7 @@ public class SOAPExceptionImpl extends SOAPException { * message of the embedded Throwable object, * if there is one */ + @Override public String getMessage() { String message = super.getMessage (); if (message == null && cause != null) { @@ -124,6 +126,7 @@ public class SOAPExceptionImpl extends SOAPException { * if there is none */ + @Override public Throwable getCause() { return cause; } @@ -157,6 +160,7 @@ public class SOAPExceptionImpl extends SOAPException { * method has already been called on this SOAPExceptionImpl * object */ + @Override public synchronized Throwable initCause(Throwable cause) { if(this.cause != null) { @@ -170,6 +174,7 @@ public class SOAPExceptionImpl extends SOAPException { return this; } + @Override public void printStackTrace() { super.printStackTrace(); if (cause != null) { @@ -178,6 +183,7 @@ public class SOAPExceptionImpl extends SOAPException { } } + @Override public void printStackTrace(PrintStream s) { super.printStackTrace(s); if (cause != null) { @@ -186,6 +192,7 @@ public class SOAPExceptionImpl extends SOAPException { } } + @Override public void printStackTrace(PrintWriter s) { super.printStackTrace(s); if (cause != null) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java index 4ff655a0051..aadf04a996d 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +76,7 @@ class HttpSOAPConnection extends SOAPConnection { } } + @Override public void close() throws SOAPException { if (closed) { log.severe("SAAJ0002.p2p.close.already.closed.conn"); @@ -86,6 +87,7 @@ class HttpSOAPConnection extends SOAPConnection { closed = true; } + @Override public SOAPMessage call(SOAPMessage message, Object endPoint) throws SOAPException { if (closed) { @@ -348,6 +350,7 @@ class HttpSOAPConnection extends SOAPConnection { // Object identifies where the request should be sent. // It is required to support objects of type String and java.net.URL. + @Override public SOAPMessage get(Object endPoint) throws SOAPException { if (closed) { log.severe("SAAJ0011.p2p.get.already.closed.conn"); @@ -512,9 +515,13 @@ class HttpSOAPConnection extends SOAPConnection { : httpConnection.getInputStream()); // If no reply message is returned, // content-Length header field value is expected to be zero. - // InputStream#available() can't be used here - it just says no data *YET*! + // java SE 6 documentation says : + // available() : an estimate of the number of bytes that can be read + //(or skipped over) from this input stream without blocking + //or 0 when it reaches the end of the input stream. if ((httpIn == null ) - || (httpConnection.getContentLength() == 0)) { + || (httpConnection.getContentLength() == 0) + || (httpIn.available() == 0)) { response = null; log.warning("SAAJ0014.p2p.content.zero"); } else { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java index d2e626a045b..c22b8e45e55 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -34,6 +34,7 @@ import javax.xml.soap.*; */ public class HttpSOAPConnectionFactory extends SOAPConnectionFactory { + @Override public SOAPConnection createConnection() throws SOAPException { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java index df55da3dac3..eab9cc35d38 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -116,6 +116,7 @@ public class MessagingException extends Exception { * Produce the message, include the message from the nested * exception if there is one. */ + @Override public String getMessage() { if (next == null) return super.getMessage(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java index ee23205714b..f21f3d02398 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -69,7 +69,7 @@ public interface MultipartDataSource extends DataSource { * @return the MimeBodyPart * @exception IndexOutOfBoundsException if the given index * is out of range. - * @exception MessagingException + * @exception MessagingException thrown in case of error */ public MimeBodyPart getBodyPart(int index) throws MessagingException; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java index 34066fc32ac..d6bd51371a4 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,18 +28,20 @@ */ - package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; -import java.io.*; -import java.util.BitSet; +import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; +import com.sun.xml.internal.messaging.saaj.packaging.mime.util.ASCIIUtility; +import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil; +import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; import javax.activation.DataSource; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.*; -import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*; - -import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; +import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.BitSet; /** * The MimeMultipart class is an implementation of the abstract Multipart @@ -67,11 +69,10 @@ import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; * subtype by using the MimeMultipart(String subtype) * constructor. For example, to create a "multipart/alternative" object, * use new MimeMultipart("alternative"). - * */ //TODO: cleanup the SharedInputStream handling -public class BMMimeMultipart extends MimeMultipart { +public class BMMimeMultipart extends MimeMultipart { /* * When true it indicates parsing hasnt been done at all @@ -115,15 +116,17 @@ public class BMMimeMultipart extends MimeMultipart { * contentType field.

    * * MimeBodyParts may be added later. + * + * @param subtype subtype. */ public BMMimeMultipart(String subtype) { super(subtype); - /* - * Compute a boundary string. - String boundary = UniqueValue.getUniqueBoundaryValue(); - ContentType cType = new ContentType("multipart", subtype, null); + /* + * Compute a boundary string. + String boundary = UniqueValue.getUniqueBoundaryValue(); + ContentType cType = new ContentType("multipart", subtype, null); contentType.setParameter("boundary", boundary); - */ + */ } /** @@ -142,23 +145,25 @@ public class BMMimeMultipart extends MimeMultipart { * skips the 'preamble' and reads bytes till the terminating * boundary and creates MimeBodyParts for each part of the stream. * - * @param ds DataSource, can be a MultipartDataSource + * @param ct content type. + * @param ds DataSource, can be a MultipartDataSource. + * @throws MessagingException in case of error. */ public BMMimeMultipart(DataSource ds, ContentType ct) - throws MessagingException { - super(ds,ct); + throws MessagingException { + super(ds, ct); boundary = ct.getParameter("boundary"); /* - if (ds instanceof MultipartDataSource) { - // ask super to do this for us. - setMultipartDataSource((MultipartDataSource)ds); - return; - } + if (ds instanceof MultipartDataSource) { + // ask super to do this for us. + setMultipartDataSource((MultipartDataSource)ds); + return; + } - // 'ds' was not a MultipartDataSource, we have - // to parse this ourself. - parsed = false; - this.ds = ds; + // 'ds' was not a MultipartDataSource, we have + // to parse this ourself. + parsed = false; + this.ds = ds; if (ct==null) contentType = new ContentType(ds.getContentType()); else @@ -173,8 +178,8 @@ public class BMMimeMultipart extends MimeMultipart { try { in = ds.getInputStream(); if (!(in instanceof ByteArrayInputStream) && - !(in instanceof BufferedInputStream) && - !(in instanceof SharedInputStream)) + !(in instanceof BufferedInputStream) && + !(in instanceof SharedInputStream)) in = new BufferedInputStream(in); } catch (Exception ex) { throw new MessagingException("No inputstream from datasource"); @@ -182,7 +187,7 @@ public class BMMimeMultipart extends MimeMultipart { if (!in.markSupported()) { throw new MessagingException( - "InputStream does not support Marking"); + "InputStream does not support Marking"); } } return in; @@ -195,9 +200,10 @@ public class BMMimeMultipart extends MimeMultipart { * method is called by all other methods that need data for * the body parts, to make sure the data has been parsed. * - * @since JavaMail 1.2 + * @since JavaMail 1.2 */ - protected void parse() throws MessagingException { + @Override + protected void parse() throws MessagingException { if (parsed) return; @@ -205,7 +211,7 @@ public class BMMimeMultipart extends MimeMultipart { SharedInputStream sin = null; if (in instanceof SharedInputStream) { - sin = (SharedInputStream)in; + sin = (SharedInputStream) in; } String bnd = "--" + boundary; @@ -226,8 +232,8 @@ public class BMMimeMultipart extends MimeMultipart { } public MimeBodyPart getNextPart( - InputStream stream, byte[] pattern, SharedInputStream sin) - throws Exception { + InputStream stream, byte[] pattern, SharedInputStream sin) + throws Exception { if (!stream.markSupported()) { throw new Exception("InputStream does not support Marking"); @@ -237,7 +243,7 @@ public class BMMimeMultipart extends MimeMultipart { compile(pattern); if (!skipPreamble(stream, pattern, sin)) { throw new Exception( - "Missing Start Boundary, or boundary does not start on a new line"); + "Missing Start Boundary, or boundary does not start on a new line"); } begining = false; } @@ -251,7 +257,7 @@ public class BMMimeMultipart extends MimeMultipart { b = readHeaders(stream); if (b == -1) { throw new Exception( - "End of Stream encountered while reading part headers"); + "End of Stream encountered while reading part headers"); } long[] v = new long[1]; v[0] = -1; // just to ensure the code later sets it correctly @@ -271,7 +277,7 @@ public class BMMimeMultipart extends MimeMultipart { } else { InternetHeaders headers = createInternetHeaders(stream); ByteOutputStream baos = new ByteOutputStream(); - b = readBody(stream, pattern, null,baos, null); + b = readBody(stream, pattern, null, baos, null); // looks like this check has to be disabled // in the old impl it is allowed to have Mime Package // without closing boundary @@ -281,7 +287,7 @@ public class BMMimeMultipart extends MimeMultipart { } } MimeBodyPart mbp = createMimeBodyPart( - headers, baos.getBytes(), baos.getCount()); + headers, baos.getBytes(), baos.getCount()); addBodyPart(mbp); return mbp; } @@ -289,11 +295,11 @@ public class BMMimeMultipart extends MimeMultipart { } public boolean parse( - InputStream stream, byte[] pattern, SharedInputStream sin) - throws Exception { + InputStream stream, byte[] pattern, SharedInputStream sin) + throws Exception { while (!lastPartFound.get(0) && (b != -1)) { - getNextPart(stream, pattern, sin); + getNextPart(stream, pattern, sin); } return true; } @@ -302,7 +308,7 @@ public class BMMimeMultipart extends MimeMultipart { // if the headers are to end properly then there has to be CRLF // actually we just need to mark the start and end positions int b = is.read(); - while(b != -1) { + while (b != -1) { // when it is a shared input stream no need to copy if (b == '\r') { b = is.read(); @@ -311,7 +317,7 @@ public class BMMimeMultipart extends MimeMultipart { if (b == '\r') { b = is.read(); if (b == '\n') { - return b; + return b; } else { continue; } @@ -326,43 +332,43 @@ public class BMMimeMultipart extends MimeMultipart { } if (b == -1) { throw new Exception( - "End of inputstream while reading Mime-Part Headers"); + "End of inputstream while reading Mime-Part Headers"); } return b; } private int readBody( - InputStream is, byte[] pattern, long[] posVector, - ByteOutputStream baos, SharedInputStream sin) - throws Exception { + InputStream is, byte[] pattern, long[] posVector, + ByteOutputStream baos, SharedInputStream sin) + throws Exception { if (!find(is, pattern, posVector, baos, sin)) { throw new Exception( - "Missing boundary delimitier while reading Body Part"); + "Missing boundary delimitier while reading Body Part"); } return b; } private boolean skipPreamble( - InputStream is, byte[] pattern, SharedInputStream sin) - throws Exception { + InputStream is, byte[] pattern, SharedInputStream sin) + throws Exception { if (!find(is, pattern, sin)) { return false; } if (lastPartFound.get(0)) { throw new Exception( - "Found closing boundary delimiter while trying to skip preamble"); + "Found closing boundary delimiter while trying to skip preamble"); } return true; } - public int readNext(InputStream is, byte[] buff, int patternLength, - BitSet eof, long[] posVector, SharedInputStream sin) - throws Exception { + public int readNext(InputStream is, byte[] buff, int patternLength, + BitSet eof, long[] posVector, SharedInputStream sin) + throws Exception { int bufferLength = is.read(buffer, 0, patternLength); if (bufferLength == -1) { - eof.flip(0); + eof.flip(0); } else if (bufferLength < patternLength) { //repeatedly read patternLength - bufferLength int temp = 0; @@ -380,18 +386,18 @@ public class BMMimeMultipart extends MimeMultipart { } break; } - buffer[i] = (byte)temp; + buffer[i] = (byte) temp; } - bufferLength=i; + bufferLength = i; } return bufferLength; } public boolean find(InputStream is, byte[] pattern, SharedInputStream sin) - throws Exception { + throws Exception { int i; int l = pattern.length; - int lx = l -1; + int lx = l - 1; BitSet eof = new BitSet(1); long[] posVector = new long[1]; @@ -404,12 +410,12 @@ public class BMMimeMultipart extends MimeMultipart { } /* - if (bufferLength < l) { - //is.reset(); - return false; - }*/ + if (bufferLength < l) { + //is.reset(); + return false; + }*/ - for(i = lx; i >= 0; i--) { + for (i = lx; i >= 0; i--) { if (buffer[i] != pattern[i]) { break; } @@ -430,11 +436,11 @@ public class BMMimeMultipart extends MimeMultipart { } public boolean find( - InputStream is, byte[] pattern, long[] posVector, - ByteOutputStream out, SharedInputStream sin) throws Exception { + InputStream is, byte[] pattern, long[] posVector, + ByteOutputStream out, SharedInputStream sin) throws Exception { int i; int l = pattern.length; - int lx = l -1; + int lx = l - 1; int bufferLength = 0; int s = 0; long endPos = -1; @@ -461,7 +467,7 @@ public class BMMimeMultipart extends MimeMultipart { // looks like it is allowed to not have a closing boundary //return false; //if (sin != null) { - // posVector[0] = endPos; + // posVector[0] = endPos; //} b = -1; if ((s == l) && (sin == null)) { @@ -477,7 +483,7 @@ public class BMMimeMultipart extends MimeMultipart { } else { // looks like it is allowed to not have a closing boundary // in the old implementation - out.write(buffer, 0, bufferLength); + out.write(buffer, 0, bufferLength); } // looks like it is allowed to not have a closing boundary // in the old implementation @@ -486,7 +492,7 @@ public class BMMimeMultipart extends MimeMultipart { return true; } - for(i = lx; i >= 0; i--) { + for (i = lx; i >= 0; i--) { if (buffer[i] != pattern[i]) { break; } @@ -502,7 +508,7 @@ public class BMMimeMultipart extends MimeMultipart { if (s == 2) { if (prevBuffer[1] == '\n') { if (prevBuffer[0] != '\r' && prevBuffer[0] != '\n') { - out.write(prevBuffer,0,1); + out.write(prevBuffer, 0, 1); } if (sin != null) { posVector[0] = endPos; @@ -511,15 +517,15 @@ public class BMMimeMultipart extends MimeMultipart { } else { throw new Exception( "Boundary characters encountered in part Body " + - "without a preceeding CRLF"); + "without a preceeding CRLF"); } - } else if (s==1) { + } else if (s == 1) { if (prevBuffer[0] != '\n') { throw new Exception( "Boundary characters encountered in part Body " + - "without a preceeding CRLF"); - }else { + "without a preceeding CRLF"); + } else { if (sin != null) { posVector[0] = endPos; } @@ -527,13 +533,13 @@ public class BMMimeMultipart extends MimeMultipart { } } else if (s > 2) { - if ((prevBuffer[s-2] == '\r') && (prevBuffer[s-1] == '\n')) { + if ((prevBuffer[s - 2] == '\r') && (prevBuffer[s - 1] == '\n')) { if (sin != null) { posVector[0] = endPos - 2; } else { out.write(prevBuffer, 0, s - 2); } - } else if (prevBuffer[s-1] == '\n') { + } else if (prevBuffer[s - 1] == '\n') { //old impl allowed just a \n if (sin != null) { posVector[0] = endPos - 1; @@ -542,8 +548,8 @@ public class BMMimeMultipart extends MimeMultipart { } } else { throw new Exception( - "Boundary characters encountered in part Body " + - "without a preceeding CRLF"); + "Boundary characters encountered in part Body " + + "without a preceeding CRLF"); } } } @@ -556,22 +562,22 @@ public class BMMimeMultipart extends MimeMultipart { } if ((s > 0) && (sin == null)) { - if (prevBuffer[s-1] == (byte)13) { + if (prevBuffer[s - 1] == (byte) 13) { // if buffer[0] == (byte)10 - if (buffer[0] == (byte)10) { + if (buffer[0] == (byte) 10) { int j; - for(j = lx-1; j > 0; j--) { - if (buffer[j+1] != pattern[j]) { + for (j = lx - 1; j > 0; j--) { + if (buffer[j + 1] != pattern[j]) { break; - } - } - if (j == 0) { - // matched the pattern excluding the last char of the pattern - // so dont write the CR into stream - out.write(prevBuffer,0,s-1); - } else { - out.write(prevBuffer,0,s); - } + } + } + if (j == 0) { + // matched the pattern excluding the last char of the pattern + // so dont write the CR into stream + out.write(prevBuffer, 0, s - 1); + } else { + out.write(prevBuffer, 0, s); + } } else { out.write(prevBuffer, 0, s); } @@ -607,20 +613,20 @@ public class BMMimeMultipart extends MimeMultipart { return true; } else { throw new Exception( - "transport padding after a Mime Boundary should end in a CRLF, found CR only"); + "transport padding after a Mime Boundary should end in a CRLF, found CR only"); } } if (b == '-') { b = is.read(); if (b != '-') { - throw new Exception( - "Unexpected singular '-' character after Mime Boundary"); + throw new Exception( + "Unexpected singular '-' character after Mime Boundary"); } else { //System.out.println("Last Part Found"); lastPartFound.flip(0); // read the next char - b = is.read(); + b = is.read(); } } @@ -636,7 +642,7 @@ public class BMMimeMultipart extends MimeMultipart { b = is.read(); } if (b == '\n') { - return true; + return true; } } } @@ -668,7 +674,8 @@ public class BMMimeMultipart extends MimeMultipart { // Initialise Good Suffix Shift table gss = new int[l]; - NEXT: for (i = l; i > 0; i--) { + NEXT: + for (i = l; i > 0; i--) { // j is the beginning index of suffix being considered for (j = l - 1; j >= i; j--) { // Testing for good suffix @@ -676,9 +683,9 @@ public class BMMimeMultipart extends MimeMultipart { // pattern[j..len] is a good suffix gss[j - 1] = i; } else { - // No match. The array has already been - // filled up with correct values before. - continue NEXT; + // No match. The array has already been + // filled up with correct values before. + continue NEXT; } } while (j > 0) { @@ -694,6 +701,7 @@ public class BMMimeMultipart extends MimeMultipart { * separated by a boundary. */ + @Override public void writeTo(OutputStream os) throws IOException, MessagingException { @@ -750,6 +758,7 @@ public class BMMimeMultipart extends MimeMultipart { this.contentType.setParameter("boundary", bnd); } } + public String getBoundary() { return this.boundary; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java index 448cb04777c..eab91196564 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -100,6 +100,7 @@ public class ContentDisposition { /** * Return the specified parameter value. Returns null * if this parameter is absent. + * @param name parameter name. * @return parameter value * @since JavaMail 1.2 */ @@ -123,7 +124,7 @@ public class ContentDisposition { /** * Set the primary type. Overrides existing primary type. - * @param primaryType primary type + * @param disposition disposition value * @since JavaMail 1.2 */ public void setDisposition(String disposition) { @@ -162,6 +163,7 @@ public class ContentDisposition { * @return RFC2045 style string * @since JavaMail 1.2 */ + @Override public String toString() { if (disposition == null) return null; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java index 4cbbae3e33d..1fc677d68d9 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -136,6 +136,7 @@ public final class ContentType { /** * Return the specified parameter value. Returns null * if this parameter is absent. + * @param name parameter name * @return parameter value */ public String getParameter(String name) { @@ -200,6 +201,7 @@ public final class ContentType { * * @return RFC2045 style string */ + @Override public String toString() { if (primaryType == null || subType == null) // need both return null; @@ -218,7 +220,7 @@ public final class ContentType { /** * Match with the specified ContentType object. This method * compares only the primaryType and - * subType . The parameters of both operands + * primaryType . The parameters of both operands * are ignored.

    * * For example, this method will return true when @@ -232,6 +234,8 @@ public final class ContentType { * and "text/*" * * @param cType to compare this against + * @return true if primaryType and subType + * match specified content type. */ public boolean match(ContentType cType) { // Match primaryType @@ -266,6 +270,10 @@ public final class ContentType { * For example, this method will return true when * comparing the ContentType for "text/plain" * with "text/*" + * + * @param s content type + * @return true if primaryType and subType + * match specified content type. */ public boolean match(String s) { try { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java index 4620bb0d484..0d9ee4ed3a5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,14 +95,15 @@ public class HeaderTokenizer { * one of the following: *

      *
    • ATOM A sequence of ASCII characters - * delimited by either SPACE, CTL, "(", <"> or the - * specified SPECIALS + * delimited by either SPACE, CTL, "(", <"> or the + * specified SPECIALS
    • *
    • QUOTEDSTRING A sequence of ASCII characters - * within quotes + * within quotes
    • *
    • COMMENT A sequence of ASCII characters - * within "(" and ")". - *
    • EOF End of header + * within "(" and ")".
    • + *
    • EOF End of header
    • *
    + * @return type */ public int getType() { return type; @@ -176,6 +177,7 @@ public class HeaderTokenizer { * Constructor. The RFC822 defined delimiters - RFC822 - are * used to delimit ATOMS. Also comments are skipped and not * returned as tokens + * @param header The header that is tokenized. */ public HeaderTokenizer(String header) { this(header, RFC822); @@ -317,7 +319,7 @@ public class HeaderTokenizer { currentPos++; // re-position currentPos char ch[] = new char[1]; ch[0] = c; - return new Token((int)c, new String(ch)); + return new Token(c, new String(ch)); } // Check for ATOM diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java index bf39ee7540b..0c724613b7d 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -48,13 +48,12 @@ import java.util.NoSuchElementException; * until the blank line that indicates end of header. The input stream * is positioned at the start of the body. The lines are stored * within the object and can be extracted as either Strings or - * {@link Header} objects.

    - *

    + * {@link Header} objects. + *

    * This class is mostly intended for service providers. MimeMessage - * and MimeBody use this class for holding their headers.

    - *

    - *


    A note on RFC822 and MIME headers

    - *

    + * and MimeBody use this class for holding their headers. + *


    A note on RFC822 and MIME headers + *

    * RFC822 and MIME header fields must contain only * US-ASCII characters. If a header contains non US-ASCII characters, * it must be encoded as per the rules in RFC 2047. The MimeUtility @@ -65,7 +64,7 @@ import java.util.NoSuchElementException; * header fields must be folded (wrapped) before being sent if they * exceed the line length limitation for the transport (1000 bytes for * SMTP). Received headers may have been folded. The application is - * responsible for folding and unfolding headers as appropriate.

    + * responsible for folding and unfolding headers as appropriate. * * @author John Mani * @author Bill Shannon @@ -90,12 +89,13 @@ public final class InternetHeaders { * Read and parse the given RFC822 message stream till the * blank line separating the header from the body. The input * stream is left positioned at the start of the body. The - * header lines are stored internally.

    - *

    + * header lines are stored internally. + *

    * For efficiency, wrap a BufferedInputStream around the actual * input stream and pass it as the parameter. * * @param is RFC822 input stream + * @exception MessagingException in case of error */ public InternetHeaders(InputStream is) throws MessagingException { load(is); @@ -104,13 +104,14 @@ public final class InternetHeaders { /** * Read and parse the given RFC822 message stream till the * blank line separating the header from the body. Store the - * header lines inside this InternetHeaders object.

    - *

    + * header lines inside this InternetHeaders object. + *

    * Note that the header lines are added into this InternetHeaders * object, so any existing headers in this object will not be * affected. * * @param is RFC822 input stream + * @exception MessagingException in case of error */ public void load(InputStream is) throws MessagingException { // Read header lines until a blank line. It is valid @@ -208,9 +209,9 @@ public final class InternetHeaders { /** * Change the first header line that matches name * to have value, adding a new header if no existing header - * matches. Remove all matching headers but the first.

    - *

    - * Note that RFC822 headers can only contain US-ASCII characters + * matches. Remove all matching headers but the first. + *

    + * Note that RFC822 headers can only contain US-ASCII characters. * * @param name header name * @param value header value @@ -242,8 +243,7 @@ public final class InternetHeaders { } /** - * Add a header with the specified name and value to the header list.

    - *

    + * Add a header with the specified name and value to the header list. * Note that RFC822 headers can only contain US-ASCII characters. * * @param name header name @@ -285,15 +285,15 @@ public final class InternetHeaders { * * @return Header objects */ - public List getAllHeaders() { + public FinalArrayList getAllHeaders() { return headers; // conceptually it should be read-only, but for performance reason I'm not wrapping it here } /** * Add an RFC822 header line to the header store. * If the line starts with a space or tab (a continuation line), - * add it to the last header line in the list.

    - *

    + * add it to the last header line in the list. + *

    * Note that RFC822 headers can only contain US-ASCII characters * * @param line raw RFC822 header line @@ -316,14 +316,18 @@ public final class InternetHeaders { /** * Return all the header lines as a collection + * + * @return list of header lines. */ public List getAllHeaderLines() { - if(headerValueView==null) + if (headerValueView == null) headerValueView = new AbstractList() { + @Override public String get(int index) { return headers.get(index).line; } + @Override public int size() { return headers.size(); } @@ -368,6 +372,7 @@ class hdr implements Header { /* * Return the "name" part of the header line. */ + @Override public String getName() { return name; } @@ -375,6 +380,7 @@ class hdr implements Header { /* * Return the "value" part of the header line. */ + @Override public String getValue() { int i = line.indexOf(':'); if (i < 0) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java index 6642dfa19ce..8aa7fe3f864 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -32,7 +32,6 @@ package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; -import com.sun.xml.internal.messaging.saaj.packaging.mime.Header; import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil; import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; @@ -52,12 +51,12 @@ import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart; /** * This class represents a MIME body part. * MimeBodyParts are contained in MimeMultipart - * objects.

    - * + * objects. + *

    * MimeBodyPart uses the InternetHeaders class to parse - * and store the headers of that body part.

    + * and store the headers of that body part. * - *


    A note on RFC 822 and MIME headers

    + *


    A note on RFC 822 and MIME headers * * RFC 822 header fields must contain only * US-ASCII characters. MIME allows non ASCII characters to be present @@ -70,7 +69,7 @@ import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart; * header fields must be folded (wrapped) before being sent if they * exceed the line length limitation for the transport (1000 bytes for * SMTP). Received headers may have been folded. The application is - * responsible for folding and unfolding headers as appropriate.

    + * responsible for folding and unfolding headers as appropriate. * * @author John Mani * @author Bill Shannon @@ -179,6 +178,8 @@ public final class MimeBodyPart { * the delimiter strings. * * @param is the body part Input Stream + * + * @exception MessagingException in case of error */ public MimeBodyPart(InputStream is) throws MessagingException { if (!(is instanceof ByteArrayInputStream) && @@ -216,6 +217,7 @@ public final class MimeBodyPart { * * @param headers The header of this part * @param content bytes representing the body of this part. + * @param len content length. */ public MimeBodyPart(InternetHeaders headers, byte[] content, int len) { this.headers = headers; @@ -242,6 +244,7 @@ public final class MimeBodyPart { /** * Return the containing MimeMultipart object, * or null if not known. + * @return parent part. */ public MimeMultipart getParent() { return parent; @@ -253,6 +256,7 @@ public final class MimeBodyPart { * addBodyPart method. parent may be * null if the MimeBodyPart is being removed * from its containing MimeMultipart. + * @param parent parent part * @since JavaMail 1.1 */ public void setParent(MimeMultipart parent) { @@ -351,6 +355,9 @@ public final class MimeBodyPart { * If the subType of mimeType is the * special character '*', then the subtype is ignored during the * comparison. + * + * @param mimeType string + * @return true if it is valid mime type */ public boolean isMimeType(String mimeType) { boolean result; @@ -375,6 +382,9 @@ public final class MimeBodyPart { * This implementation uses getHeader(name) * to obtain the requisite header field. * + * @return content disposition + * @exception MessagingException in case of error + * * @see #headers */ public String getDisposition() throws MessagingException { @@ -392,6 +402,9 @@ public final class MimeBodyPart { * If the disposition is null, any existing "Content-Disposition" * header field is removed. * + * @param disposition value + * + * @exception MessagingException in case of error * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. */ @@ -423,6 +436,9 @@ public final class MimeBodyPart { * This implementation uses getHeader(name) * to obtain the requisite header field. * + * @return encoding + * @exception MessagingException in case of error + * * @see #headers */ public String getEncoding() throws MessagingException { @@ -465,6 +481,8 @@ public final class MimeBodyPart { * * This implementation uses getHeader(name) * to obtain the requisite header field. + * + * @return conent id */ public String getContentID() { return getHeader("Content-ID", null); @@ -475,6 +493,7 @@ public final class MimeBodyPart { * If the cid parameter is null, any existing * "Content-ID" is removed. * + * @param cid content id * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. * @since JavaMail 1.3 @@ -493,6 +512,8 @@ public final class MimeBodyPart { * * This implementation uses getHeader(name) * to obtain the requisite header field. + * + * @return content MD5 sum */ public String getContentMD5() { return getHeader("Content-MD5", null); @@ -501,6 +522,8 @@ public final class MimeBodyPart { /** * Set the "Content-MD5" header field of this body part. * + * @param md5 content md5 sum + * * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. */ @@ -516,6 +539,9 @@ public final class MimeBodyPart { * * This implementation uses getHeader(name) * to obtain the requisite header field. + * + * @return array of language tags + * @exception MessagingException in case of error */ public String[] getContentLanguage() throws MessagingException { String s = getHeader("Content-Language", null); @@ -663,6 +689,7 @@ public final class MimeBodyPart { * Returns null if both are absent. * * @return filename + * @exception MessagingException in case of error */ public String getFileName() throws MessagingException { String filename = null; @@ -692,6 +719,9 @@ public final class MimeBodyPart { * Sets the "filename" parameter of the "Content-Disposition" * header field of this body part. * + * @param filename filename + * + * @exception MessagingException in case of error * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. */ @@ -769,9 +799,14 @@ public final class MimeBodyPart { * This implementation simply calls the getContentStream * method. * + * @return input stream + * + * @exception MessagingException in case of error + * * @see #getInputStream * @see #getContentStream * @since JavaMail 1.2 + * */ public InputStream getRawInputStream() throws MessagingException { return getContentStream(); @@ -782,24 +817,30 @@ public final class MimeBodyPart { * * The implementation provided here works just like the * the implementation in MimeMessage. + * + * @return data handler */ public DataHandler getDataHandler() { if (mimePart != null) { //return an inputstream return new DataHandler(new DataSource() { + @Override public InputStream getInputStream() throws IOException { return mimePart.read(); } + @Override public OutputStream getOutputStream() throws IOException { throw new UnsupportedOperationException("getOutputStream cannot be supported : You have enabled LazyAttachments Option"); } + @Override public String getContentType() { return mimePart.getContentType(); } + @Override public String getName() { return "MIMEPart Wrapped DataSource"; } @@ -890,6 +931,8 @@ public final class MimeBodyPart { * If the charset is already known, use the * setText() version that takes the charset parameter. * + * @param text string + * * @see #setText(String text, String charset) */ public void setText(String text) { @@ -902,6 +945,9 @@ public final class MimeBodyPart { * charset. The given Unicode string will be charset-encoded * using the specified charset. The charset is also used to set * the "charset" parameter. + * + * @param text string + * @param charset character set */ public void setText(String text, String charset) { if (charset == null) { @@ -932,7 +978,9 @@ public final class MimeBodyPart { /** * Output the body part as an RFC 822 format stream. * - * @exception MessagingException + * @param os output stream + * + * @exception MessagingException in case of error * @exception IOException if an error occurs writing to the * stream or if an error is generated * by the javax.activation layer. @@ -1033,6 +1081,8 @@ public final class MimeBodyPart { /** * Remove all headers with this name. + * + * @param name header name */ public void removeHeader(String name) { headers.removeHeader(name); @@ -1041,14 +1091,18 @@ public final class MimeBodyPart { /** * Return all the headers from this Message as an Enumeration of * Header objects. + * + * @return all headers */ - public List getAllHeaders() { + public FinalArrayList getAllHeaders() { return headers.getAllHeaders(); } /** * Add a header line to this body part + * + * @param line header line to add */ public void addHeaderLine(String line) { headers.addHeaderLine(line); @@ -1075,6 +1129,8 @@ public final class MimeBodyPart { *
    * In both cases this method is typically called by the * Message.saveChanges method. + * + * @exception MessagingException in case of error. */ protected void updateHeaders() throws MessagingException { DataHandler dh = getDataHandler(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java index c9bc1170f0f..02437053265 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -31,15 +31,21 @@ package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; -import java.io.*; +import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; +import com.sun.xml.internal.messaging.saaj.packaging.mime.MultipartDataSource; +import com.sun.xml.internal.messaging.saaj.packaging.mime.util.ASCIIUtility; +import com.sun.xml.internal.messaging.saaj.packaging.mime.util.LineInputStream; +import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil; +import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; +import com.sun.xml.internal.messaging.saaj.util.FinalArrayList; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; import javax.activation.DataSource; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.*; -import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*; -import com.sun.xml.internal.messaging.saaj.util.FinalArrayList; -import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; -import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; +import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; /** * The MimeMultipart class is an implementation @@ -133,6 +139,7 @@ public class MimeMultipart { * contentType field.

    * * MimeBodyParts may be added later. + * @param subtype subtype. */ public MimeMultipart(String subtype) { //super(); @@ -163,6 +170,8 @@ public class MimeMultipart { * This must be the same information as {@link DataSource#getContentType()}. * All the callers of this method seem to have this object handy, so * for performance reason this method accepts it. Can be null. + * + * @exception MessagingException in case of error */ public MimeMultipart(DataSource ds, ContentType ct) throws MessagingException { // 'ds' was not a MultipartDataSource, we have @@ -189,7 +198,8 @@ public class MimeMultipart { /** * Return the number of enclosed MimeBodyPart objects. * - * @return number of parts + * @return number of parts. + * @throws MessagingException in case of error. */ public int getCount() throws MessagingException { parse(); @@ -202,12 +212,12 @@ public class MimeMultipart { /** * Get the specified MimeBodyPart. BodyParts are numbered starting at 0. * - * @param index the index of the desired MimeBodyPart - * @return the MimeBodyPart + * @param index the index of the desired MimeBodyPart. + * @return the MimeBodyPart. * @exception MessagingException if no such MimeBodyPart exists */ public MimeBodyPart getBodyPart(int index) - throws MessagingException { + throws MessagingException { parse(); if (parts == null) throw new IndexOutOfBoundsException("No such BodyPart"); @@ -221,21 +231,22 @@ public class MimeMultipart { * * @param CID the ContentID of the desired part * @return the MimeBodyPart + * @exception MessagingException if no such MimeBodyPart exists. */ public MimeBodyPart getBodyPart(String CID) - throws MessagingException { + throws MessagingException { parse(); int count = getCount(); for (int i = 0; i < count; i++) { MimeBodyPart part = getBodyPart(i); String s = part.getContentID(); - // Old versions of AXIS2 put angle brackets around the content - // id but not the start param - String sNoAngle = (s!= null) ? s.replaceFirst("^<", "").replaceFirst(">$", "") - :null; + // Old versions of AXIS2 put angle brackets around the content + // id but not the start param + String sNoAngle = (s!= null) ? s.replaceFirst("^<", "").replaceFirst(">$", "") + :null; if (s != null && (s.equals(CID) || CID.equals(sNoAngle))) - return part; + return part; } return null; } @@ -256,6 +267,8 @@ public class MimeMultipart { * expensive for a specific MimeMultipart subclass, then it * might itself want to track whether its internal state actually * did change, and do the header updating only if necessary. + * + * @exception MessagingException in case of error. */ protected void updateHeaders() throws MessagingException { for (int i = 0; i < parts.size(); i++) @@ -265,6 +278,11 @@ public class MimeMultipart { /** * Iterates through all the parts and outputs each Mime part * separated by a boundary. + * + * @param os output stream. + * + * @exception IOException if an I/O Error occurs. + * @exception MessagingException in case of error. */ public void writeTo(OutputStream os) throws IOException, MessagingException { @@ -291,6 +309,8 @@ public class MimeMultipart { * method is called by all other methods that need data for * the body parts, to make sure the data has been parsed. * + * @exception MessagingException in case of error. + * * @since JavaMail 1.2 */ protected void parse() throws MessagingException { @@ -305,14 +325,14 @@ public class MimeMultipart { try { in = ds.getInputStream(); if (!(in instanceof ByteArrayInputStream) && - !(in instanceof BufferedInputStream) && - !(in instanceof SharedInputStream)) + !(in instanceof BufferedInputStream) && + !(in instanceof SharedInputStream)) in = new BufferedInputStream(in); } catch (Exception ex) { throw new MessagingException("No inputstream from datasource"); } if (in instanceof SharedInputStream) - sin = (SharedInputStream)in; + sin = (SharedInputStream) in; String boundary = "--" + contentType.getParameter("boundary"); byte[] bndbytes = ASCIIUtility.getBytes(boundary); @@ -324,12 +344,12 @@ public class MimeMultipart { LineInputStream lin = new LineInputStream(in); String line; while ((line = lin.readLine()) != null) { - /* - * Strip trailing whitespace. Can't use trim method - * because it's too aggressive. Some bogus MIME - * messages will include control characters in the - * boundary string. - */ + /* + * Strip trailing whitespace. Can't use trim method + * because it's too aggressive. Some bogus MIME + * messages will include control characters in the + * boundary string. + */ int i; for (i = line.length() - 1; i >= 0; i--) { char c = line.charAt(i); @@ -343,12 +363,12 @@ public class MimeMultipart { if (line == null) throw new MessagingException("Missing start boundary"); - /* - * Read and process body parts until we see the - * terminating boundary line (or EOF). - */ + /* + * Read and process body parts until we see the + * terminating boundary line (or EOF). + */ boolean done = false; - getparts: + getparts: while (!done) { InternetHeaders headers = null; if (sin != null) { @@ -358,7 +378,7 @@ public class MimeMultipart { ; if (line == null) { if (!ignoreMissingEndBoundary) { - throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers"); + throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers"); } // assume there's just a missing end boundary break getparts; @@ -383,7 +403,7 @@ public class MimeMultipart { /* * Read and save the content bytes in buf. */ - for (;;) { + for (; ; ) { if (bol) { /* * At the beginning of a line, check whether the @@ -402,7 +422,7 @@ public class MimeMultipart { if (in.read() == '-') { done = true; foundClosingBoundary = true; - break; // ignore trailing text + break; // ignore trailing text } } // skip linear whitespace @@ -410,12 +430,12 @@ public class MimeMultipart { b2 = in.read(); // check for end of line if (b2 == '\n') - break; // got it! break out of the loop + break; // got it! break out of the loop if (b2 == '\r') { in.mark(1); if (in.read() != '\n') in.reset(); - break; // got it! break out of the loop + break; // got it! break out of the loop } } // failed to match, reset and proceed normally @@ -477,7 +497,7 @@ public class MimeMultipart { buf.close(); } - if (!ignoreMissingEndBoundary && !foundClosingBoundary && sin== null) { + if (!ignoreMissingEndBoundary && !foundClosingBoundary && sin == null) { throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers"); } parsed = true; @@ -490,12 +510,13 @@ public class MimeMultipart { * necessary. This implementation simply constructs and returns * an InternetHeaders object. * - * @param is the InputStream to read the headers from - * @exception MessagingException + * @param is the InputStream to read the headers from. + * @return headers. + * @exception MessagingException in case of error. * @since JavaMail 1.2 */ protected InternetHeaders createInternetHeaders(InputStream is) - throws MessagingException { + throws MessagingException { return new InternetHeaders(is); } @@ -506,12 +527,14 @@ public class MimeMultipart { * necessary. This implementation simply constructs and returns * a MimeBodyPart object. * - * @param headers the headers for the body part - * @param content the content of the body part + * @param headers the headers for the body part. + * @param content the content of the body part. + * @param len the content length. + * @return MimeBodyPart * @since JavaMail 1.2 */ protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] content, int len) { - return new MimeBodyPart(headers, content,len); + return new MimeBodyPart(headers, content,len); } /** @@ -521,12 +544,13 @@ public class MimeMultipart { * necessary. This implementation simply constructs and returns * a MimeBodyPart object. * - * @param is InputStream containing the body part - * @exception MessagingException + * @param is InputStream containing the body part. + * @return MimeBodyPart. + * @exception MessagingException in case of error. * @since JavaMail 1.2 */ protected MimeBodyPart createMimeBodyPart(InputStream is) throws MessagingException { - return new MimeBodyPart(is); + return new MimeBodyPart(is); } /** @@ -543,10 +567,10 @@ public class MimeMultipart { * a specific multipart subtype. * * @param mp MimeMultipart datasource + * @exception MessagingException in case of error. */ - protected void setMultipartDataSource(MultipartDataSource mp) - throws MessagingException { + throws MessagingException { contentType = new ContentType(mp.getContentType()); int count = mp.getCount(); @@ -564,7 +588,7 @@ public class MimeMultipart { * @see #contentType */ public ContentType getContentType() { - return contentType; + return contentType; } /** diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java index 8d08e39e1eb..786a1f7dd83 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,21 +28,21 @@ */ - package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; -import java.io.*; -import java.net.UnknownServiceException; +import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; import javax.activation.DataSource; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.UnknownServiceException; /** * A utility class that implements a DataSource out of * a MimeBodyPart. This class is primarily meant for service providers. * - * @author John Mani + * @author John Mani */ public final class MimePartDataSource implements DataSource { @@ -50,6 +50,8 @@ public final class MimePartDataSource implements DataSource { /** * Constructor, that constructs a DataSource from a MimeBodyPart. + * + * @param part body part */ public MimePartDataSource(MimeBodyPart part) { this.part = part; @@ -66,12 +68,13 @@ public final class MimePartDataSource implements DataSource { * using the getContentStream() method and decodes * it using the MimeUtility.decode() method. * - * @return decoded input stream + * @return decoded input stream */ + @Override public InputStream getInputStream() throws IOException { try { - InputStream is = part.getContentStream(); + InputStream is = part.getContentStream(); String encoding = part.getEncoding(); if (encoding != null) @@ -88,6 +91,7 @@ public final class MimePartDataSource implements DataSource { * * This implementation throws the UnknownServiceException. */ + @Override public OutputStream getOutputStream() throws IOException { throw new UnknownServiceException(); } @@ -98,6 +102,7 @@ public final class MimePartDataSource implements DataSource { * This implementation just invokes the getContentType * method on the MimeBodyPart. */ + @Override public String getContentType() { return part.getContentType(); } @@ -107,11 +112,12 @@ public final class MimePartDataSource implements DataSource { * * This implementation just returns an empty string. */ + @Override public String getName() { try { - return part.getFileName(); + return part.getFileName(); } catch (MessagingException mex) { - return ""; + return ""; } } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java index 76f4c78ac29..40589ed30ce 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -113,6 +113,7 @@ public class MimePullMultipart extends MimeMultipart { parsed = true; } + @Override protected void parse() throws MessagingException { parseAll(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java index 45f6cea11c1..87bdd6e6f5f 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -65,11 +65,11 @@ import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; *

    * Note that to get the actual bytes of a mail-safe String (say, * for sending over SMTP), one must do - *

    + * 
      *
      *      byte[] bytes = string.getBytes("iso-8859-1");
      *
    - * 

    + *

    * * The setHeader and addHeader methods * on MimeMessage and MimeBodyPart assume that the given header values @@ -222,6 +222,10 @@ public class MimeUtility { * DataHandler uses a thread, a pair of pipe streams, * and the writeTo method to produce the data.

    * + * @param dh data handler + * + * @return encoding + * * @since JavaMail 1.2 */ public static String getEncoding(DataHandler dh) { @@ -294,6 +298,7 @@ public class MimeUtility { * @param is input stream * @param encoding the encoding of the stream. * @return decoded input stream. + * @exception MessagingException in case of error */ public static InputStream decode(InputStream is, String encoding) throws MessagingException { @@ -323,6 +328,7 @@ public class MimeUtility { * @param encoding the encoding of the stream. * @return output stream that applies the * specified encoding. + * @exception MessagingException in case of error */ public static OutputStream encode(OutputStream os, String encoding) throws MessagingException { @@ -358,6 +364,7 @@ public class MimeUtility { * with uuencode) * @return output stream that applies the * specified encoding. + * @exception MessagingException in case of error * @since JavaMail 1.2 */ public static OutputStream encode(OutputStream os, String encoding, @@ -397,7 +404,7 @@ public class MimeUtility { * "unstructured" RFC 822 headers.

    * * Example of usage: - *

    +     * 
          *
          *  MimeBodyPart part = ...
          *  String rawvalue = "FooBar Mailer, Japanese version 1.1"
    @@ -411,7 +418,7 @@ public class MimeUtility {
          *   // setHeader() failure
          *  }
          *
    -     * 

    + *

    * * @param text unicode string * @return Unicode string containing only US-ASCII characters @@ -446,6 +453,7 @@ public class MimeUtility { * encoded are in the ASCII charset, otherwise "B" encoding * is used. * @return Unicode string containing only US-ASCII characters + * @exception UnsupportedEncodingException in case of unsupported encoding */ public static String encodeText(String text, String charset, String encoding) @@ -464,7 +472,7 @@ public class MimeUtility { * returned as-is

    * * Example of usage: - *

    +     * 
          *
          *  MimeBodyPart part = ...
          *  String rawvalue = null;
    @@ -479,9 +487,10 @@ public class MimeUtility {
          *
          *  return value;
          *
    -     * 

    + *

    * * @param etext the possibly encoded value + * @return decoded text * @exception UnsupportedEncodingException if the charset * conversion failed. */ @@ -568,7 +577,7 @@ public class MimeUtility { * The InternetAddress class, for example, uses this to encode * it's 'phrase' component. * - * @param text unicode string + * @param word unicode string * @return Array of Unicode strings containing only US-ASCII * characters. * @exception UnsupportedEncodingException if the encoding fails @@ -590,7 +599,7 @@ public class MimeUtility { * The resulting bytes are then returned as a Unicode string * containing only ASCII characters.

    * - * @param text unicode string + * @param word unicode string * @param charset the MIME charset * @param encoding the encoding to be used. Currently supported * values are "B" and "Q". If this parameter is null, then @@ -720,6 +729,7 @@ public class MimeUtility { * fails, an UnsupportedEncodingException is thrown.

    * * @param eword the possibly encoded value + * @return deocoded word * @exception ParseException if the string is not an * encoded-word as per RFC 2047. * @exception UnsupportedEncodingException if the charset @@ -847,8 +857,8 @@ public class MimeUtility { * @param word word to be quoted * @param specials the set of special characters * @return the possibly quoted word - * @see javax.mail.internet.HeaderTokenizer#MIME - * @see javax.mail.internet.HeaderTokenizer#RFC822 + * @see com.sun.xml.internal.messaging.saaj.packaging.mime.internet.HeaderTokenizer#MIME + * @see com.sun.xml.internal.messaging.saaj.packaging.mime.internet.HeaderTokenizer#RFC822 */ public static String quote(String word, String specials) { int len = word.length(); @@ -1111,7 +1121,8 @@ public class MimeUtility { } catch (SecurityException sex) { class NullInputStream extends InputStream { - public int read() { + @Override + public int read() { return 0; } } @@ -1277,7 +1288,7 @@ public class MimeUtility { int l = s.length(); for (int i = 0; i < l; i++) { - if (nonascii((int)s.charAt(i))) // non-ascii + if (nonascii(s.charAt(i))) // non-ascii non_ascii++; else ascii++; @@ -1444,14 +1455,17 @@ class AsciiOutputStream extends OutputStream { checkEOL = encodeEolStrict && breakOnNonAscii; } + @Override public void write(int b) throws IOException { check(b); } + @Override public void write(byte b[]) throws IOException { write(b, 0, b.length); } + @Override public void write(byte b[], int off, int len) throws IOException { len += off; for (int i = off; i < len ; i++) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java index f1dcc12e143..e16ba612952 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -50,7 +50,7 @@ public final class ParameterList { * No-arg Constructor. */ public ParameterList() { - this.list = new HashMap(); + this.list = new HashMap<>(); } private ParameterList(HashMap m) { @@ -73,7 +73,7 @@ public final class ParameterList { int type; String name; - list = new HashMap(); + list = new HashMap<>(); while (true) { tk = h.next(); type = tk.getType(); @@ -171,6 +171,7 @@ public final class ParameterList { * * @return String */ + @Override public String toString() { return toString(0); } @@ -232,6 +233,6 @@ public final class ParameterList { } public ParameterList copy() { - return new ParameterList((HashMap)list.clone()); + return new ParameterList((HashMap)list.clone()); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java index c650b6b39cc..4619c4dcd87 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -73,6 +73,9 @@ public interface SharedInputStream { /** * Writes the specified region to another {@link OutputStream}. + * @param start the starting position + * @param end the ending position + 1 + * @param out output stream */ public void writeTo(long start,long end, OutputStream out); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java index 48a56e8068c..6e11534bee4 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -32,23 +32,31 @@ package com.sun.xml.internal.messaging.saaj.packaging.mime.util; import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; -import java.io.*; +import java.io.IOException; +import java.io.InputStream; public class ASCIIUtility { // Private constructor so that this class is not instantiated - private ASCIIUtility() { } + private ASCIIUtility() { + } /** * Convert the bytes within the specified range of the given byte * array into a signed integer in the given radix . The range extends - * from start till, but not including end.

    + * from start till, but not including end. * - * Based on java.lang.Integer.parseInt() + * Based on java.lang.Integer.parseInt(). + * + * @param b bytes to convert to integer. + * @param start start of the range. + * @param end end of the range (not including). + * @param radix radix. + * @return integer. */ public static int parseInt(byte[] b, int start, int end, int radix) - throws NumberFormatException { + throws NumberFormatException { if (b == null) throw new NumberFormatException("null"); @@ -69,18 +77,18 @@ public class ASCIIUtility { } multmin = limit / radix; if (i < end) { - digit = Character.digit((char)b[i++], radix); + digit = Character.digit((char) b[i++], radix); if (digit < 0) { throw new NumberFormatException( - "illegal number: " + toString(b, start, end) - ); + "illegal number: " + toString(b, start, end) + ); } else { result = -digit; } } while (i < end) { // Accumulating negatively avoids surprises near MAX_VALUE - digit = Character.digit((char)b[i++], radix); + digit = Character.digit((char) b[i++], radix); if (digit < 0) { throw new NumberFormatException("illegal number"); } @@ -110,36 +118,52 @@ public class ASCIIUtility { /** * Convert the bytes within the specified range of the given byte * array into a String. The range extends from start - * till, but not including end.

    + * till, but not including end. + * + * @param b bytes to convert to integer. + * @param start start of the range. + * @param end end of the range (not including). + * @return integer. */ public static String toString(byte[] b, int start, int end) { int size = end - start; char[] theChars = new char[size]; for (int i = 0, j = start; i < size; ) - theChars[i++] = (char)(b[j++]&0xff); + theChars[i++] = (char) (b[j++] & 0xff); return new String(theChars); } + /** + * Encodes specified String into a sequence of bytes using the platform's + * default charset, storing the result into a new byte array. + * + * @param s string to encode into byte array. + * @return byte array. + */ public static byte[] getBytes(String s) { - char [] chars= s.toCharArray(); + char[] chars = s.toCharArray(); int size = chars.length; byte[] bytes = new byte[size]; - for (int i = 0; i < size;) + for (int i = 0; i < size; ) bytes[i] = (byte) chars[i++]; return bytes; } /** + * Converts input stream to array. * - * @deprecated - * this is an expensive operation that require an additional - * buffer reallocation just to get the array of an exact size. - * Unless you absolutely need the exact size array, don't use this. - * Use {@link ByteOutputStream} and {@link ByteOutputStream#write(InputStream)}. + * @param is stream to convert to array. + * @return byte array. + * @throws IOException if an I/O error occurs. + * @deprecated this is an expensive operation that require an additional + * buffer reallocation just to get the array of an exact size. + * Unless you absolutely need the exact size array, don't use this. + * Use {@link ByteOutputStream} and {@link ByteOutputStream#write(InputStream)}. */ + @Deprecated public static byte[] getBytes(InputStream is) throws IOException { ByteOutputStream bos = null; try { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java index 31f3e3695a6..972ccd2dba0 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -70,6 +70,7 @@ public class BASE64DecoderStream extends FilterInputStream { * @exception IOException if an I/O error occurs. * @see java.io.FilterInputStream#in */ + @Override public int read() throws IOException { if (index >= bufsize) { decode(); // Fills up buffer @@ -94,6 +95,7 @@ public class BASE64DecoderStream extends FilterInputStream { * the stream has been reached. * @exception IOException if an I/O error occurs. */ + @Override public int read(byte[] buf, int off, int len) throws IOException { int i, c; for (i = 0; i < len; i++) { @@ -112,6 +114,7 @@ public class BASE64DecoderStream extends FilterInputStream { * Tests if this input stream supports marks. Currently this class * does not support marks */ + @Override public boolean markSupported() { return false; // Maybe later .. } @@ -122,6 +125,7 @@ public class BASE64DecoderStream extends FilterInputStream { * a close approximation in case the original encoded stream * contains embedded CRLFs; since the CRLFs are discarded, not decoded */ + @Override public int available() throws IOException { // This is only an estimate, since in.available() // might include CRLFs too .. @@ -200,6 +204,10 @@ public class BASE64DecoderStream extends FilterInputStream { * in the IMAP AUTHENTICATE protocol, but not to decode the * entire content of a MIME part. * + * @param inbuf byte array to decode + * + * @return decoded byte array + * * NOTE: inbuf may only contain valid base64 characters. * Whitespace is not ignored. */ diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java index d1c3350146b..843a334f933 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -80,6 +80,7 @@ public class BASE64EncoderStream extends FilterOutputStream { * @param len the number of bytes to write. * @exception IOException if an I/O error occurs. */ + @Override public void write(byte[] b, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(b[off + i]); @@ -90,6 +91,7 @@ public class BASE64EncoderStream extends FilterOutputStream { * @param b the data to be written. * @exception IOException if an I/O error occurs. */ + @Override public void write(byte[] b) throws IOException { write(b, 0, b.length); } @@ -99,6 +101,7 @@ public class BASE64EncoderStream extends FilterOutputStream { * @param c the byte. * @exception IOException if an I/O error occurs. */ + @Override public void write(int c) throws IOException { buffer[bufsize++] = (byte)c; if (bufsize == 3) { // Encoding unit = 3 bytes @@ -112,6 +115,7 @@ public class BASE64EncoderStream extends FilterOutputStream { * to be encoded out to the stream. * @exception IOException if an I/O error occurs. */ + @Override public void flush() throws IOException { if (bufsize > 0) { // If there's unencoded characters in the buffer .. encode(); // .. encode them @@ -124,6 +128,7 @@ public class BASE64EncoderStream extends FilterOutputStream { * Forces any buffered output bytes to be encoded out to the stream * and closes this output stream */ + @Override public void close() throws IOException { flush(); out.close(); @@ -186,6 +191,10 @@ public class BASE64EncoderStream extends FilterOutputStream { * This method is suitable for short strings, such as those * in the IMAP AUTHENTICATE protocol, but not to encode the * entire content of a MIME part. + * + * @param inbuf byte array to encode. + * + * @return encoded byte array. */ public static byte[] encode(byte[] inbuf) { if (inbuf.length == 0) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java index ec13f9e106d..a2a23d697b5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -55,6 +55,10 @@ public class BEncoderStream extends BASE64EncoderStream { /** * Returns the length of the encoded version of this byte array. + * + * @param b byte array. + * + * @return length of the byte array. */ public static int encodedLength(byte[] b) { return ((b.length + 2)/3) * 4; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java index 50390f56d2f..1d0533f5f43 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -64,6 +64,10 @@ public final class LineInputStream extends FilterInputStream { * * This class is similar to the deprecated * DataInputStream.readLine() + * + * @return line. + * + * @throws IOException if an I/O error occurs. */ public String readLine() throws IOException { InputStream in = this.in; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java index 92bd21eaa19..88239e07c19 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -54,6 +54,11 @@ public abstract class OutputUtil { /** * Writes a string as ASCII string. + * + * @param s string. + * @param out output stream. + * + * @throws IOException if an I/O error occurs. */ public static void writeAsAscii(String s,OutputStream out) throws IOException { int len = s.length(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java index 06ea9380930..ab8c3ab834a 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +63,7 @@ public class QDecoderStream extends QPDecoderStream { * stream is reached. * @exception IOException if an I/O error occurs. */ + @Override public int read() throws IOException { int c = in.read(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java index 2cf6e31e7c5..272806bd591 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -69,6 +69,7 @@ public class QEncoderStream extends QPEncoderStream { * @param c the byte. * @exception IOException if an I/O error occurs. */ + @Override public void write(int c) throws IOException { c = c & 0xff; // Turn off the MSB. if (c == ' ') @@ -82,6 +83,11 @@ public class QEncoderStream extends QPEncoderStream { /** * Returns the length of the encoded version of this byte array. + * + * @param b byte array. + * @param encodingWord whether use word or text specials. + * + * @return length. */ public static int encodedLength(byte[] b, boolean encodingWord) { int len = 0; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java index 1f60b1a7503..7184e002a96 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -67,6 +67,7 @@ public class QPDecoderStream extends FilterInputStream { * stream is reached. * @exception IOException if an I/O error occurs. */ + @Override public int read() throws IOException { if (spaces > 0) { // We have cached space characters, return one @@ -150,6 +151,7 @@ public class QPDecoderStream extends FilterInputStream { * the stream has been reached. * @exception IOException if an I/O error occurs. */ + @Override public int read(byte[] buf, int off, int len) throws IOException { int i, c; for (i = 0; i < len; i++) { @@ -167,6 +169,7 @@ public class QPDecoderStream extends FilterInputStream { * Tests if this input stream supports marks. Currently this class * does not support marks */ + @Override public boolean markSupported() { return false; } @@ -178,6 +181,7 @@ public class QPDecoderStream extends FilterInputStream { * this method just invokes the available method * of the original input stream. */ + @Override public int available() throws IOException { // This is bogus ! We don't really know how much // bytes are available *after* decoding diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java index 3f80d39ff09..74ac839646d 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -81,6 +81,7 @@ public class QPEncoderStream extends FilterOutputStream { * @param len the number of bytes to write. * @exception IOException if an I/O error occurs. */ + @Override public void write(byte[] b, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(b[off + i]); @@ -91,6 +92,7 @@ public class QPEncoderStream extends FilterOutputStream { * @param b the data to be written. * @exception IOException if an I/O error occurs. */ + @Override public void write(byte[] b) throws IOException { write(b, 0, b.length); } @@ -100,6 +102,7 @@ public class QPEncoderStream extends FilterOutputStream { * @param c the byte. * @exception IOException if an I/O error occurs. */ + @Override public void write(int c) throws IOException { c = c & 0xff; // Turn off the MSB. if (gotSpace) { // previous character was @@ -139,6 +142,7 @@ public class QPEncoderStream extends FilterOutputStream { * to be encoded out to the stream. * @exception IOException if an I/O error occurs. */ + @Override public void flush() throws IOException { out.flush(); } @@ -147,6 +151,7 @@ public class QPEncoderStream extends FilterOutputStream { * Forces any buffered output bytes to be encoded out to the stream * and closes this output stream */ + @Override public void close() throws IOException { out.close(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java index d012014bed5..1945aefa3cc 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -78,6 +78,7 @@ public class UUDecoderStream extends FilterInputStream { * @see java.io.FilterInputStream#in */ + @Override public int read() throws IOException { if (index >= bufsize) { readPrefix(); @@ -88,6 +89,7 @@ public class UUDecoderStream extends FilterInputStream { return buffer[index++] & 0xff; // return lower byte } + @Override public int read(byte[] buf, int off, int len) throws IOException { int i, c; for (i = 0; i < len; i++) { @@ -101,10 +103,12 @@ public class UUDecoderStream extends FilterInputStream { return i; } + @Override public boolean markSupported() { return false; } + @Override public int available() throws IOException { // This is only an estimate, since in.available() // might include CRLFs too .. diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java index 9cd0216291d..49d9ec7a6e8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -83,23 +83,29 @@ public class UUEncoderStream extends FilterOutputStream { /** * Set up the buffer name and permission mode. * This method has any effect only if it is invoked before - * you start writing into the output stream + * you start writing into the output stream. + * + * @param name name to set for the buffer. + * @param mode permission mode. */ public void setNameMode(String name, int mode) { this.name = name; this.mode = mode; } + @Override public void write(byte[] b, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(b[off + i]); } + @Override public void write(byte[] data) throws IOException { write(data, 0, data.length); } - public void write(int c) throws IOException { + @Override + public void write(int c) throws IOException { /* buffer up characters till we get a line's worth, then encode * and write them out. Max number of characters allowed per * line is 45. @@ -112,6 +118,7 @@ public class UUEncoderStream extends FilterOutputStream { } } + @Override public void flush() throws IOException { if (bufsize > 0) { // If there's unencoded characters in the buffer writePrefix(); @@ -121,6 +128,7 @@ public class UUEncoderStream extends FilterOutputStream { out.flush(); } + @Override public void close() throws IOException { flush(); out.close(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java index ada4a7de7be..d82c0284265 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -88,6 +88,7 @@ public class AttachmentPartImpl extends AttachmentPart { } } + @Override public int getSize() throws SOAPException { if (mimePart != null) { try { @@ -124,6 +125,7 @@ public class AttachmentPartImpl extends AttachmentPart { } } + @Override public void clearContent() { if (mimePart != null) { mimePart.close(); @@ -133,6 +135,7 @@ public class AttachmentPartImpl extends AttachmentPart { rawContent = null; } + @Override public Object getContent() throws SOAPException { try { if (mimePart != null) { @@ -153,6 +156,7 @@ public class AttachmentPartImpl extends AttachmentPart { } } + @Override public void setContent(Object object, String contentType) throws IllegalArgumentException { if (mimePart != null) { @@ -165,23 +169,28 @@ public class AttachmentPartImpl extends AttachmentPart { } + @Override public DataHandler getDataHandler() throws SOAPException { if (mimePart != null) { //return an inputstream return new DataHandler(new DataSource() { + @Override public InputStream getInputStream() throws IOException { return mimePart.read(); } + @Override public OutputStream getOutputStream() throws IOException { throw new UnsupportedOperationException("getOutputStream cannot be supported : You have enabled LazyAttachments Option"); } + @Override public String getContentType() { return mimePart.getContentType(); } + @Override public String getName() { return "MIMEPart Wrapper DataSource"; } @@ -197,6 +206,7 @@ public class AttachmentPartImpl extends AttachmentPart { return dataHandler; } + @Override public void setDataHandler(DataHandler dataHandler) throws IllegalArgumentException { if (mimePart != null) { @@ -216,35 +226,43 @@ public class AttachmentPartImpl extends AttachmentPart { setMimeHeader("Content-Type", dataHandler.getContentType()); } + @Override public void removeAllMimeHeaders() { headers.removeAllHeaders(); } + @Override public void removeMimeHeader(String header) { headers.removeHeader(header); } + @Override public String[] getMimeHeader(String name) { return headers.getHeader(name); } + @Override public void setMimeHeader(String name, String value) { headers.setHeader(name, value); } + @Override public void addMimeHeader(String name, String value) { headers.addHeader(name, value); } - public Iterator getAllMimeHeaders() { + @Override + public Iterator getAllMimeHeaders() { return headers.getAllHeaders(); } - public Iterator getMatchingMimeHeaders(String[] names) { + @Override + public Iterator getMatchingMimeHeaders(String[] names) { return headers.getMatchingHeaders(names); } - public Iterator getNonMatchingMimeHeaders(String[] names) { + @Override + public Iterator getNonMatchingMimeHeaders(String[] names) { return headers.getNonMatchingHeaders(names); } @@ -329,6 +347,7 @@ public class AttachmentPartImpl extends AttachmentPart { } } + @Override public void setBase64Content(InputStream content, String contentType) throws SOAPException { @@ -365,6 +384,7 @@ public class AttachmentPartImpl extends AttachmentPart { } } + @Override public InputStream getBase64Content() throws SOAPException { InputStream stream; if (mimePart != null) { @@ -425,6 +445,7 @@ public class AttachmentPartImpl extends AttachmentPart { } } + @Override public void setRawContent(InputStream content, String contentType) throws SOAPException { if (mimePart != null) { @@ -475,6 +496,7 @@ public class AttachmentPartImpl extends AttachmentPart { } } */ + @Override public void setRawContentBytes( byte[] content, int off, int len, String contentType) throws SOAPException { @@ -498,6 +520,7 @@ public class AttachmentPartImpl extends AttachmentPart { } } + @Override public InputStream getRawContent() throws SOAPException { if (mimePart != null) { return mimePart.read(); @@ -522,6 +545,7 @@ public class AttachmentPartImpl extends AttachmentPart { } } + @Override public byte[] getRawContentBytes() throws SOAPException { InputStream ret; if (mimePart != null) { @@ -556,12 +580,14 @@ public class AttachmentPartImpl extends AttachmentPart { } // attachments are equal if they are the same reference + @Override public boolean equals(Object o) { return (this == o); } // In JDK 8 we get a warning if we implement equals() but not hashCode(). // There is no intuitive value for this, the default one in Object is fine. + @Override public int hashCode() { return super.hashCode(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java index 22efd453799..09de9035f6e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java @@ -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 @@ -71,6 +71,7 @@ abstract class ContextClassloaderLocal { private static ClassLoader getContextClassLoader() { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public ClassLoader run() { ClassLoader cl = null; try { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java index 607e8c36c68..50ed0edaf98 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,16 +41,25 @@ import javax.xml.transform.Source; public interface Envelope extends SOAPEnvelope { /** * Get the content as a JAXP Source. + * + * @return source */ Source getContent(); /** * Output the content. + * + * @param out output stream. + * @exception IOException in case of an I/O error. */ void output(OutputStream out) throws IOException; /** * Output the content. + * + * @param out output stream + * @param isFastInfoset true if it is fast infoset. + * @exception IOException in case of an I/O error. */ void output(OutputStream out, boolean isFastInfoset) throws IOException; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java index e7223cca00e..4c8fb5a78f4 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -47,9 +47,10 @@ public class FastInfosetDataContentHandler implements DataContentHandler { } /** - * return the DataFlavors for this DataContentHandler + * Return the DataFlavors for this DataContentHandler * @return The DataFlavors. */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; DataFlavor flavors[] = new DataFlavor[1]; flavors[0] = new ActivationDataFlavor( @@ -59,11 +60,13 @@ public class FastInfosetDataContentHandler implements DataContentHandler { } /** - * return the Transfer Data of type DataFlavor from InputStream - * @param df The DataFlavor. - * @param ins The InputStream corresponding to the data. + * Return the Transfer Data of type DataFlavor from InputStream + * @param flavor The DataFlavor. + * @param dataSource DataSource. * @return The constructed Object. + * @exception IOException in case of an I/O error */ + @Override public Object getTransferData(DataFlavor flavor, DataSource dataSource) throws IOException { @@ -81,6 +84,7 @@ public class FastInfosetDataContentHandler implements DataContentHandler { return null; } + @Override public Object getContent(DataSource dataSource) throws IOException { try { return FastInfosetReflection.FastInfosetSource_new( @@ -92,10 +96,11 @@ public class FastInfosetDataContentHandler implements DataContentHandler { } /** - * construct an object from a byte stream + * Construct an object from a byte stream * (similar semantically to previous method, we are deciding * which one to support) */ + @Override public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java index 2ac41fcbe77..48ddb7a7d6e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +52,7 @@ public class GifDataContentHandler extends Component implements DataContentHandl * * @return The DataFlavors */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; return new DataFlavor[] { getDF()}; } @@ -60,9 +61,11 @@ public class GifDataContentHandler extends Component implements DataContentHandl * Return the Transfer Data of type DataFlavor from InputStream. * * @param df The DataFlavor - * @param ins The InputStream corresponding to the data + * @param ds The DataSource * @return String object + * @exception IOException in case of an I/O error */ + @Override public Object getTransferData(DataFlavor df, DataSource ds) throws IOException { // use myDF.equals to be sure to get ActivationDataFlavor.equals, @@ -73,6 +76,7 @@ public class GifDataContentHandler extends Component implements DataContentHandl return null; } + @Override public Object getContent(DataSource ds) throws IOException { InputStream is = ds.getInputStream(); int pos = 0; @@ -98,7 +102,11 @@ public class GifDataContentHandler extends Component implements DataContentHandl /** * Write the object to the output stream, using the specified MIME type. + * @param obj object to write + * @param type requested MIME type of the resulting byte stream + * @param os OutputStream */ + @Override public void writeTo(Object obj, String type, OutputStream os) throws IOException { if (obj != null && !(obj instanceof Image)) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java index b66cbbdfa6c..8f063f155c9 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -67,8 +67,9 @@ public class ImageDataContentHandler extends Component * * @return The DataFlavors. */ + @Override public DataFlavor[] getTransferDataFlavors() { - return (DataFlavor[]) Arrays.copyOf(flavor, flavor.length); + return Arrays.copyOf(flavor, flavor.length); } /** @@ -80,6 +81,7 @@ public class ImageDataContentHandler extends Component * @param ds The DataSource representing the data to be converted. * @return The constructed Object. */ + @Override public Object getTransferData(DataFlavor df, DataSource ds) throws IOException { for (int i=0; i < flavor.length; i++) { @@ -98,6 +100,7 @@ public class ImageDataContentHandler extends Component * @param ds The DataSource representing the data to be converted. * @return The constructed Object. */ + @Override public Object getContent(DataSource ds) throws IOException { return ImageIO.read(new BufferedInputStream(ds.getInputStream())); } @@ -107,11 +110,11 @@ public class ImageDataContentHandler extends Component * and write it to the output stream. * * @param obj The object to be converted. - * @param mimeType The requested MIME type of the resulting byte stream. + * @param type The requested MIME type of the resulting byte stream. * @param os The output stream into which to write the converted * byte stream. */ - + @Override public void writeTo(Object obj, String type, OutputStream os) throws IOException { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java index 083c1de6bf7..83cfbe55b48 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -47,9 +47,10 @@ public class JpegDataContentHandler public static final String STR_SRC = "java.awt.Image"; /** - * return the DataFlavors for this DataContentHandler + * Return the DataFlavors for this DataContentHandler * @return The DataFlavors. */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; DataFlavor flavors[] = new DataFlavor[1]; @@ -67,11 +68,12 @@ public class JpegDataContentHandler } /** - * return the Transfer Data of type DataFlavor from InputStream - * @param df The DataFlavor. - * @param ins The InputStream corresponding to the data. + * Return the Transfer Data of type DataFlavor from InputStream + * @param df The DataFlavor + * @param ds The DataSource * @return The constructed Object. */ + @Override public Object getTransferData(DataFlavor df, DataSource ds) { // this is sort of hacky, but will work for the @@ -98,6 +100,7 @@ public class JpegDataContentHandler /** * */ + @Override public Object getContent(DataSource ds) { // throws Exception; InputStream inputStream = null; BufferedImage jpegLoadImage = null; @@ -109,14 +112,18 @@ public class JpegDataContentHandler } catch (Exception e) { } - return (Image) jpegLoadImage; + return jpegLoadImage; } /** - * construct an object from a byte stream + * Construct an object from a byte stream * (similar semantically to previous method, we are deciding * which one to support) + * @param obj object to write + * @param mimeType requested MIME type of the resulting byte stream + * @param os OutputStream */ + @Override public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException { if (!mimeType.equals("image/jpeg")) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java index 1f83ca5cfde..5cf8b7addb7 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -38,24 +38,24 @@ public interface LazyEnvelope extends Envelope { /** * Retrieve payload qname without materializing its contents - * @return - * @throws SOAPException + * @return QName + * @throws SOAPException in case of an error */ public QName getPayloadQName() throws SOAPException; /** * Retrieve payload attribute value without materializing its contents - * @param localName - * @return - * @throws SOAPException + * @param localName local name + * @return payload attribute value + * @throws SOAPException in case of an error */ public String getPayloadAttributeValue(String localName) throws SOAPException; /** * Retrieve payload attribute value without materializing its contents - * @param qName - * @return - * @throws SOAPException + * @param qName QName + * @return payload attribute value + * @throws SOAPException in case of an error */ public String getPayloadAttributeValue(QName qName) throws SOAPException; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java index d7a0226671b..d2d5c6e3173 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +63,7 @@ public class MessageFactoryImpl extends MessageFactory { return oldListener; } + @Override public SOAPMessage createMessage() throws SOAPException { throw new UnsupportedOperationException(); } @@ -105,6 +106,7 @@ public class MessageFactoryImpl extends MessageFactory { "Unable to parse content type: " + e.getMessage()); } } + @Override public SOAPMessage createMessage(MimeHeaders headers, InputStream in) throws SOAPException, IOException { String contentTypeString = MessageImpl.getContentType(headers); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java index c760f4a8502..b7fab4715b8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -87,7 +87,7 @@ public abstract class MessageImpl protected boolean saved = false; protected byte[] messageBytes; protected int messageByteCount; - protected HashMap properties = new HashMap(); + protected Map properties = new HashMap<>(); // used for lazy attachment initialization protected MimeMultipart multiPart = null; @@ -95,7 +95,7 @@ public abstract class MessageImpl /** * True if this part is encoded using Fast Infoset. - * MIME -> application/fastinfoset + * MIME -> application/fastinfoset */ protected boolean isFastInfoset = false; @@ -202,6 +202,9 @@ public abstract class MessageImpl /** * Construct a new message. This will be invoked before message * sends. + * + * @param isFastInfoset whether it is fast infoset + * @param acceptFastInfoset whether to accept fast infoset */ protected MessageImpl(boolean isFastInfoset, boolean acceptFastInfoset) { this.isFastInfoset = isFastInfoset; @@ -214,6 +217,8 @@ public abstract class MessageImpl /** * Shallow copy. + * + * @param msg SoapMessage */ protected MessageImpl(SOAPMessage msg) { if (!(msg instanceof MessageImpl)) { @@ -233,14 +238,17 @@ public abstract class MessageImpl /** * @param stat * the mask value obtained from {@link #identifyContentType(ContentType)} + * @return true if SOAP 1.1 Content */ protected static boolean isSoap1_1Content(int stat) { return (stat & SOAP1_1_FLAG) != 0; } /** + * Check whether it is SOAP 1.2 content. * @param stat * the mask value obtained from {@link #identifyContentType(ContentType)} + * @return true if it is SOAP 1.2 content */ protected static boolean isSoap1_2Content(int stat) { return (stat & SOAP1_2_FLAG) != 0; @@ -298,6 +306,9 @@ public abstract class MessageImpl * Construct a message from an input stream. When messages are * received, there's two parts -- the transport headers and the * message content in a transport specific stream. + * @param headers MimeHeaders + * @param in InputStream + * @exception SOAPExceptionImpl in case of I/O error */ protected MessageImpl(MimeHeaders headers, final InputStream in) throws SOAPExceptionImpl { @@ -332,6 +343,7 @@ public abstract class MessageImpl * received, there's two parts -- the transport headers and the * message content in a transport specific stream. * + * @param headers headers * @param contentType * The parsed content type header from the headers variable. * This is redundant parameter, but it avoids reparsing this header again. @@ -339,6 +351,8 @@ public abstract class MessageImpl * The result of {@link #identifyContentType(ContentType)} over * the contentType parameter. This redundant parameter, but it avoids * recomputing this information again. + * @param in input stream + * @exception SOAPExceptionImpl in case of an error */ protected MessageImpl(MimeHeaders headers, final ContentType contentType, int stat, final InputStream in) throws SOAPExceptionImpl { init(headers, stat, contentType, in); @@ -425,18 +439,22 @@ public abstract class MessageImpl } else if ((stat & MIME_MULTIPART_FLAG) != 0) { final InputStream finalIn = in; DataSource ds = new DataSource() { + @Override public InputStream getInputStream() { return finalIn; } + @Override public OutputStream getOutputStream() { return null; } + @Override public String getContentType() { return contentType.toString(); } + @Override public String getName() { return ""; } @@ -591,10 +609,12 @@ public abstract class MessageImpl return Boolean.valueOf(lazyParsingProp.toString()); } } + @Override public Object getProperty(String property) { - return (String) properties.get(property); + return properties.get(property); } + @Override public void setProperty(String property, Object value) { verify(property, value); properties.put(property, value); @@ -722,6 +742,7 @@ public abstract class MessageImpl return "text/xml"; } + @Override public MimeHeaders getMimeHeaders() { return this.headers; } @@ -805,10 +826,12 @@ public abstract class MessageImpl saved = false; } + @Override public boolean saveRequired() { return saved != true; } + @Override public String getContentDescription() { String[] values = headers.getHeader("Content-Description"); if (values != null && values.length > 0) @@ -816,13 +839,16 @@ public abstract class MessageImpl return null; } + @Override public void setContentDescription(String description) { headers.setHeader("Content-Description", description); needsSave(); } + @Override public abstract SOAPPart getSOAPPart(); + @Override public void removeAllAttachments() { try { initializeAllAttachments(); @@ -836,6 +862,7 @@ public abstract class MessageImpl } } + @Override public int countAttachments() { try { initializeAllAttachments(); @@ -847,6 +874,7 @@ public abstract class MessageImpl return 0; } + @Override public void addAttachmentPart(AttachmentPart attachment) { try { initializeAllAttachments(); @@ -855,16 +883,17 @@ public abstract class MessageImpl throw new RuntimeException(e); } if (attachments == null) - attachments = new FinalArrayList(); + attachments = new FinalArrayList<>(); attachments.add(attachment); needsSave(); } - static private final Iterator nullIter = Collections.EMPTY_LIST.iterator(); + static private final Iterator nullIter = Collections.EMPTY_LIST.iterator(); - public Iterator getAttachments() { + @Override + public Iterator getAttachments() { try { initializeAllAttachments(); } catch (Exception e) { @@ -897,12 +926,14 @@ public abstract class MessageImpl private MimeHeaders headers; private AttachmentPart nextAttachment; + @Override public boolean hasNext() { if (nextAttachment == null) nextAttachment = nextMatch(); return nextAttachment != null; } + @Override public AttachmentPart next() { if (nextAttachment != null) { AttachmentPart ret = nextAttachment; @@ -925,12 +956,14 @@ public abstract class MessageImpl return null; } + @Override public void remove() { iter.remove(); } } - public Iterator getAttachments(MimeHeaders headers) { + @Override + public Iterator getAttachments(MimeHeaders headers) { try { initializeAllAttachments(); } catch (Exception e) { @@ -942,6 +975,7 @@ public abstract class MessageImpl return new MimeMatchingIterator(headers); } + @Override public void removeAttachments(MimeHeaders headers) { try { initializeAllAttachments(); @@ -966,10 +1000,12 @@ public abstract class MessageImpl // needsSave(); } + @Override public AttachmentPart createAttachmentPart() { return new AttachmentPartImpl(); } + @Override public AttachmentPart getAttachment(SOAPElement element) throws SOAPException { try { @@ -1187,6 +1223,7 @@ public abstract class MessageImpl } } + @Override public void saveChanges() throws SOAPException { // suck in all the data from the attachments and have it @@ -1340,6 +1377,7 @@ public abstract class MessageImpl } + @Override public void writeTo(OutputStream out) throws SOAPException, IOException { if (saveRequired()){ this.optimizeAttachmentProcessing = true; @@ -1397,6 +1435,7 @@ public abstract class MessageImpl needsSave(); } + @Override public SOAPBody getSOAPBody() throws SOAPException { SOAPBody body = getSOAPPart().getEnvelope().getBody(); /*if (body == null) { @@ -1405,6 +1444,7 @@ public abstract class MessageImpl return body; } + @Override public SOAPHeader getSOAPHeader() throws SOAPException { SOAPHeader hdr = getSOAPPart().getEnvelope().getHeader(); /*if (hdr == null) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java index fd31cd9533f..cc7696e5ee9 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -43,6 +43,7 @@ public class MultipartDataContentHandler implements DataContentHandler { * * @return The DataFlavors */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; return new DataFlavor[] { myDF }; } @@ -51,9 +52,10 @@ public class MultipartDataContentHandler implements DataContentHandler { * Return the Transfer Data of type DataFlavor from InputStream. * * @param df The DataFlavor - * @param ins The InputStream corresponding to the data + * @param ds The DataSource * @return String object */ + @Override public Object getTransferData(DataFlavor df, DataSource ds) { // use myDF.equals to be sure to get ActivationDataFlavor.equals, // which properly ignores Content-Type parameters in comparison @@ -65,7 +67,11 @@ public class MultipartDataContentHandler implements DataContentHandler { /** * Return the content. + * + * @param ds The DataSource + * @return content */ + @Override public Object getContent(DataSource ds) { try { return new MimeMultipart( @@ -78,6 +84,7 @@ public class MultipartDataContentHandler implements DataContentHandler { /** * Write the object to the output stream, using the specific MIME type. */ + @Override public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException { if (obj instanceof MimeMultipart) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java index 022741ee91f..d4faa0a6a25 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -42,6 +42,7 @@ public class SAAJMetaFactoryImpl extends SAAJMetaFactory { Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); + @Override protected MessageFactory newMessageFactory(String protocol) throws SOAPException { if (SOAPConstants.SOAP_1_1_PROTOCOL.equals(protocol)) { @@ -60,6 +61,7 @@ public class SAAJMetaFactoryImpl extends SAAJMetaFactory { } } + @Override protected SOAPFactory newSOAPFactory(String protocol) throws SOAPException { if (SOAPConstants.SOAP_1_1_PROTOCOL.equals(protocol)) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java index 1ffe4fffceb..84c6d69f9d5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,23 +23,212 @@ * questions. */ -/** -* -* @author SAAJ RI Development Team -*/ package com.sun.xml.internal.messaging.saaj.soap; -import com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl; -import com.sun.org.apache.xerces.internal.dom.DocumentFragmentImpl; +import com.sun.xml.internal.messaging.saaj.soap.impl.NodeListImpl; +import org.w3c.dom.*; -public class SOAPDocumentFragment extends DocumentFragmentImpl { +/** + * SAAJ wrapper for {@link DocumentFragment} + * + * @author Yan GAO. + */ +public class SOAPDocumentFragment implements DocumentFragment { - public SOAPDocumentFragment(CoreDocumentImpl ownerDoc) { - super(ownerDoc); + private SOAPDocumentImpl soapDocument; + private DocumentFragment documentFragment; + + public SOAPDocumentFragment(SOAPDocumentImpl ownerDoc) { + this.soapDocument = ownerDoc; + this.documentFragment = soapDocument.getDomDocument().createDocumentFragment(); } - public SOAPDocumentFragment() { - super(); + public SOAPDocumentFragment() {} + + @Override + public boolean hasAttributes() { + return documentFragment.hasAttributes(); } + @Override + public boolean isSameNode(Node other) { + return documentFragment.isSameNode(getDomNode(other)); + } + + @Override + public String lookupNamespaceURI(String prefix) { + return documentFragment.lookupNamespaceURI(prefix); + } + + @Override + public Node getParentNode() { + return soapDocument.findIfPresent(documentFragment.getParentNode()); + } + + @Override + public Node getFirstChild() { + return soapDocument.findIfPresent(documentFragment.getFirstChild()); + } + + @Override + public Object getUserData(String key) { + return documentFragment.getUserData(key); + } + + @Override + public String getTextContent() throws DOMException { + return documentFragment.getTextContent(); + } + @Override + public short getNodeType() { + return documentFragment.getNodeType(); + } + + public Node getDomNode(Node node) { + return soapDocument.getDomNode(node); + } + + @Override + public Node appendChild(Node newChild) throws DOMException { + Node node = soapDocument.importNode(newChild, true); + return soapDocument.findIfPresent(documentFragment.appendChild(getDomNode(node))); + } + + @Override + public Node removeChild(Node oldChild) throws DOMException { + return soapDocument.findIfPresent(documentFragment.removeChild(getDomNode(oldChild))); + } + + @Override + public NamedNodeMap getAttributes() { + return documentFragment.getAttributes(); + } + + @Override + public short compareDocumentPosition(Node other) throws DOMException { + return documentFragment.compareDocumentPosition(getDomNode(other)); + } + @Override + public void setTextContent(String textContent) throws DOMException { + documentFragment.setTextContent(textContent); + } + @Override + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + Node node = soapDocument.importNode(newChild, true); + return soapDocument.findIfPresent(documentFragment.insertBefore(getDomNode(node), getDomNode(refChild))); + } + @Override + public Object setUserData(String key, Object data, UserDataHandler handler) { + return documentFragment.setUserData(key, data, handler); + } + @Override + public boolean isDefaultNamespace(String namespaceURI) { + return documentFragment.isDefaultNamespace(namespaceURI); + } + + @Override + public Node getLastChild() { + return soapDocument.findIfPresent(documentFragment.getLastChild()); + } + + @Override + public void setPrefix(String prefix) throws DOMException { + documentFragment.setPrefix(prefix); + } + @Override + public String getNodeName() { + return documentFragment.getNodeName(); + } + + @Override + public void setNodeValue(String nodeValue) throws DOMException { + documentFragment.setNodeValue(nodeValue); + } + @Override + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + Node node = soapDocument.importNode(newChild, true); + return soapDocument.findIfPresent(documentFragment.replaceChild(getDomNode(node), getDomNode(oldChild))); + } + @Override + public String getLocalName() { + return documentFragment.getLocalName(); + } + + @Override + public void normalize() { + documentFragment.normalize(); + } + + @Override + public Node cloneNode(boolean deep) { + Node node= documentFragment.cloneNode(deep); + soapDocument.registerChildNodes(node, deep); + return soapDocument.findIfPresent(node); + } + + @Override + public boolean isSupported(String feature, String version) { + return documentFragment.isSupported(feature, version); + } + + @Override + public boolean isEqualNode(Node arg) { + return documentFragment.isEqualNode(getDomNode(arg)); + } + + @Override + public boolean hasChildNodes() { + return documentFragment.hasChildNodes(); + } + + @Override + public String lookupPrefix(String namespaceURI) { + return documentFragment.lookupPrefix(namespaceURI); + } + + @Override + public String getNodeValue() throws DOMException { + return documentFragment.getNodeValue(); + } + @Override + public Document getOwnerDocument() { + return documentFragment.getOwnerDocument(); + } + @Override + public Object getFeature(String feature, String version) { + return documentFragment.getFeature(feature, version); + } + + @Override + public Node getPreviousSibling() { + return soapDocument.findIfPresent(documentFragment.getPreviousSibling()); + } + + @Override + public NodeList getChildNodes() { + return new NodeListImpl(soapDocument, documentFragment.getChildNodes()); + } + + @Override + public String getBaseURI() { + return documentFragment.getBaseURI(); + } + + @Override + public Node getNextSibling() { + return soapDocument.findIfPresent(documentFragment.getNextSibling()); + } + + @Override + public String getPrefix() { + return documentFragment.getPrefix(); + } + + @Override + public String getNamespaceURI() { + return documentFragment.getNamespaceURI(); + } + public Document getSoapDocument() { + return soapDocument; + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java index 7dac69841a9..d08f01c876c 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,16 +29,47 @@ */ package com.sun.xml.internal.messaging.saaj.soap; -import java.util.logging.Logger; - -import com.sun.org.apache.xerces.internal.dom.DocumentImpl; -import org.w3c.dom.*; - -import com.sun.xml.internal.messaging.saaj.soap.impl.*; +import com.sun.xml.internal.messaging.saaj.soap.impl.CDATAImpl; +import com.sun.xml.internal.messaging.saaj.soap.impl.ElementFactory; +import com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl; +import com.sun.xml.internal.messaging.saaj.soap.impl.NamedNodeMapImpl; +import com.sun.xml.internal.messaging.saaj.soap.impl.NodeListImpl; +import com.sun.xml.internal.messaging.saaj.soap.impl.SOAPCommentImpl; +import com.sun.xml.internal.messaging.saaj.soap.impl.SOAPTextImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; +import org.w3c.dom.Attr; +import org.w3c.dom.CDATASection; +import org.w3c.dom.CharacterData; +import org.w3c.dom.Comment; +import org.w3c.dom.DOMConfiguration; +import org.w3c.dom.DOMException; +import org.w3c.dom.DOMImplementation; +import org.w3c.dom.Document; +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.DocumentType; +import org.w3c.dom.Element; +import org.w3c.dom.EntityReference; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.ProcessingInstruction; +import org.w3c.dom.Text; +import org.w3c.dom.UserDataHandler; -public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPException; +import java.lang.reflect.Constructor; +import java.text.MessageFormat; +import java.util.logging.Logger; + +public class SOAPDocumentImpl implements SOAPDocument, javax.xml.soap.Node, Document { + + public static final String SAAJ_NODE = "javax.xml.soap.Node"; private static final String XMLNS = "xmlns".intern(); protected static final Logger log = @@ -47,8 +78,22 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { SOAPPartImpl enclosingSOAPPart; + private Document document; + public SOAPDocumentImpl(SOAPPartImpl enclosingDocument) { + document = createDocument(); this.enclosingSOAPPart = enclosingDocument; + register(this); + } + + private Document createDocument() { + DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", SAAJUtil.getSystemClassLoader()); + try { + final DocumentBuilder documentBuilder = docFactory.newDocumentBuilder(); + return documentBuilder.newDocument(); + } catch (ParserConfigurationException e) { + throw new RuntimeException("Error creating xml document", e); + } } // public SOAPDocumentImpl(boolean grammarAccess) { @@ -63,6 +108,7 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { // super(doctype, grammarAccess); // } + @Override public SOAPPartImpl getSOAPPart() { if (enclosingSOAPPart == null) { log.severe("SAAJ0541.soap.fragment.not.bound.to.part"); @@ -71,19 +117,23 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { return enclosingSOAPPart; } + @Override public SOAPDocumentImpl getDocument() { return this; } + @Override public DocumentType getDoctype() { // SOAP means no DTD, No DTD means no doctype (SOAP 1.2 only?) return null; } + @Override public DOMImplementation getImplementation() { - return super.getImplementation(); + return document.getImplementation(); } + @Override public Element getDocumentElement() { // This had better be an Envelope! getSOAPPart().doGetDocumentElement(); @@ -91,9 +141,10 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { } protected Element doGetDocumentElement() { - return super.getDocumentElement(); + return document.getDocumentElement(); } + @Override public Element createElement(String tagName) throws DOMException { return ElementFactory.createElement( this, @@ -102,22 +153,27 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { null); } + @Override public DocumentFragment createDocumentFragment() { return new SOAPDocumentFragment(this); } + @Override public org.w3c.dom.Text createTextNode(String data) { return new SOAPTextImpl(this, data); } + @Override public Comment createComment(String data) { return new SOAPCommentImpl(this, data); } + @Override public CDATASection createCDATASection(String data) throws DOMException { return new CDATAImpl(this, data); } + @Override public ProcessingInstruction createProcessingInstruction( String target, String data) @@ -126,6 +182,7 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { throw new UnsupportedOperationException("Processing Instructions are not allowed in SOAP documents"); } + @Override public Attr createAttribute(String name) throws DOMException { boolean isQualifiedName = (name.indexOf(":") > 0); if (isQualifiedName) { @@ -139,24 +196,73 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { } } - return super.createAttribute(name); + return document.createAttribute(name); } + @Override public EntityReference createEntityReference(String name) throws DOMException { log.severe("SAAJ0543.soap.entity.refs.not.allowed.in.docs"); throw new UnsupportedOperationException("Entity References are not allowed in SOAP documents"); } + @Override public NodeList getElementsByTagName(String tagname) { - return super.getElementsByTagName(tagname); + return new NodeListImpl(this, document.getElementsByTagName(tagname)); } + @Override public org.w3c.dom.Node importNode(Node importedNode, boolean deep) throws DOMException { - return super.importNode(importedNode, deep); + Node domNode = getDomNode(importedNode); + final Node newNode = document.importNode(domNode, deep); + + if (importedNode instanceof javax.xml.soap.Node) { + Node newSoapNode = createSoapNode(importedNode.getClass(), newNode); + newNode.setUserData(SAAJ_NODE, newSoapNode, null); + if (deep && importedNode.hasChildNodes()) { + NodeList childNodes = importedNode.getChildNodes(); + for (int i = 0; i < childNodes.getLength(); i++) { + registerChildNodes(childNodes.item(i), deep); + } + } + return newSoapNode; + } + + registerChildNodes(newNode, deep); + return findIfPresent(newNode); } + //If the parentNode is not registered to domToSoap, create soap wapper for parentNode and register it to domToSoap + //If deep = true, also register all children of parentNode to domToSoap map. + public void registerChildNodes(Node parentNode, boolean deep) { + if (parentNode.getUserData(SAAJ_NODE) == null) { + if (parentNode instanceof Element) { + ElementFactory.createElement(this, (Element) parentNode); + } else if (parentNode instanceof CharacterData) { + switch (parentNode.getNodeType()) { + case CDATA_SECTION_NODE: + new CDATAImpl(this, (CharacterData) parentNode); + break; + case COMMENT_NODE: + new SOAPCommentImpl(this, (CharacterData) parentNode); + break; + case TEXT_NODE: + new SOAPTextImpl(this, (CharacterData) parentNode); + break; + } + } + } + if (deep) { + NodeList nodeList = parentNode.getChildNodes(); + for (int i = 0; i < nodeList.getLength(); i++) { + Node nextChild = nodeList.item(i); + registerChildNodes(nextChild, true); + } + } + } + + @Override public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException { return ElementFactory.createElement( @@ -166,28 +272,411 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { namespaceURI); } + @Override public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException { - return super.createAttributeNS(namespaceURI, qualifiedName); + return document.createAttributeNS(namespaceURI, qualifiedName); } + @Override public NodeList getElementsByTagNameNS( String namespaceURI, String localName) { - return super.getElementsByTagNameNS(namespaceURI, localName); + return new NodeListImpl(this, document.getElementsByTagNameNS(namespaceURI, localName)); } + @Override public Element getElementById(String elementId) { - return super.getElementById(elementId); + return (Element) findIfPresent(document.getElementById(elementId)); } + @Override + public String getInputEncoding() { + return document.getInputEncoding(); + } + + @Override + public String getXmlEncoding() { + return document.getXmlEncoding(); + } + + @Override + public boolean getXmlStandalone() { + return document.getXmlStandalone(); + } + + @Override + public void setXmlStandalone(boolean xmlStandalone) throws DOMException { + document.setXmlStandalone(xmlStandalone); + } + + @Override + public String getXmlVersion() { + return document.getXmlVersion(); + } + + @Override + public void setXmlVersion(String xmlVersion) throws DOMException { + document.setXmlVersion(xmlVersion); + } + + @Override + public boolean getStrictErrorChecking() { + return document.getStrictErrorChecking(); + } + + @Override + public void setStrictErrorChecking(boolean strictErrorChecking) { + document.setStrictErrorChecking(strictErrorChecking); + } + + @Override + public String getDocumentURI() { + return document.getDocumentURI(); + } + + @Override + public void setDocumentURI(String documentURI) { + document.setDocumentURI(documentURI); + } + + @Override + public Node adoptNode(Node source) throws DOMException { + return document.adoptNode(source); + } + + @Override + public DOMConfiguration getDomConfig() { + return document.getDomConfig(); + } + + @Override + public void normalizeDocument() { + document.normalizeDocument(); + } + + @Override + public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException { + return findIfPresent(document.renameNode(n, namespaceURI, qualifiedName)); + } + + @Override + public String getNodeName() { + return document.getNodeName(); + } + + @Override + public String getNodeValue() throws DOMException { + return document.getNodeValue(); + } + + @Override + public void setNodeValue(String nodeValue) throws DOMException { + document.setNodeValue(nodeValue); + } + + @Override + public short getNodeType() { + return document.getNodeType(); + } + + @Override + public Node getParentNode() { + return findIfPresent(document.getParentNode()); + } + + @Override + public NodeList getChildNodes() { + return new NodeListImpl(this, document.getChildNodes()); + } + + @Override + public Node getFirstChild() { + return findIfPresent(document.getFirstChild()); + } + + @Override + public Node getLastChild() { + return findIfPresent(document.getLastChild()); + } + + @Override + public Node getPreviousSibling() { + return findIfPresent(document.getPreviousSibling()); + } + + @Override + public Node getNextSibling() { + return findIfPresent(document.getNextSibling()); + } + + @Override + public NamedNodeMap getAttributes() { + return new NamedNodeMapImpl(document.getAttributes(), this); + } + + @Override + public Document getOwnerDocument() { + return document.getOwnerDocument(); + } + + @Override + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return document.insertBefore(getDomNode(newChild), getDomNode(refChild)); + } + + @Override + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return document.replaceChild(getDomNode(newChild), getDomNode(oldChild)); + } + + @Override + public Node removeChild(Node oldChild) throws DOMException { + return document.removeChild(getDomNode(oldChild)); + } + + @Override + public Node appendChild(Node newChild) throws DOMException { + return document.appendChild(getDomNode(newChild)); + } + + @Override + public boolean hasChildNodes() { + return document.hasChildNodes(); + } + + @Override public Node cloneNode(boolean deep) { - SOAPPartImpl newSoapPart = getSOAPPart().doCloneNode(); - super.cloneNode(newSoapPart.getDocument(), deep); - return newSoapPart; + Node node = document.cloneNode(deep); + registerChildNodes(node, deep); + return findIfPresent(node); } - public void cloneNode(SOAPDocumentImpl newdoc, boolean deep) { - super.cloneNode(newdoc, deep); + @Override + public void normalize() { + document.normalize(); + } + + @Override + public boolean isSupported(String feature, String version) { + return document.isSupported(feature, version); + } + + @Override + public String getNamespaceURI() { + return document.getNamespaceURI(); + } + + @Override + public String getPrefix() { + return document.getPrefix(); + } + + @Override + public void setPrefix(String prefix) throws DOMException { + document.setPrefix(prefix); + } + + @Override + public String getLocalName() { + return document.getLocalName(); + } + + @Override + public boolean hasAttributes() { + return document.hasAttributes(); + } + + @Override + public String getBaseURI() { + return document.getBaseURI(); + } + + @Override + public short compareDocumentPosition(Node other) throws DOMException { + return document.compareDocumentPosition(getDomNode(other)); + } + + @Override + public String getTextContent() throws DOMException { + return document.getTextContent(); + } + + @Override + public void setTextContent(String textContent) throws DOMException { + document.setTextContent(textContent); + } + + @Override + public boolean isSameNode(Node other) { + return document.isSameNode(getDomNode(other)); + } + + @Override + public String lookupPrefix(String namespaceURI) { + return document.lookupPrefix(namespaceURI); + } + + @Override + public boolean isDefaultNamespace(String namespaceURI) { + return document.isDefaultNamespace(namespaceURI); + } + + @Override + public String lookupNamespaceURI(String prefix) { + return document.lookupNamespaceURI(prefix); + } + + @Override + public boolean isEqualNode(Node arg) { + return document.isEqualNode(getDomNode(arg)); + } + + @Override + public Object getFeature(String feature, String version) { + return document.getFeature(feature, version); + } + + @Override + public Object setUserData(String key, Object data, UserDataHandler handler) { + return document.setUserData(key, data, handler); + } + + @Override + public Object getUserData(String key) { + return document.getUserData(key); + } + + public Document getDomDocument() { + return document; + } + + /** + * Insert a mapping information for {@link org.w3c.dom.Node} - {@link javax.xml.soap.Node}. + * + * In SAAJ, elements in DOM are expected to be interfaces of SAAJ, on the other hand in JDKs Xerces, + * they are casted to internal impl classes. After removal of SAAJ dependency + * to JDKs internal classes elements in DOM can never be both of them. + * + * @param node SAAJ wrapper node for w3c DOM node + */ + public void register(javax.xml.soap.Node node) { + final Node domElement = getDomNode(node); + if (domElement.getUserData(SAAJ_NODE) != null) { + throw new IllegalStateException("Element " + domElement.getNodeName() + + " is already registered"); + } + domElement.setUserData(SAAJ_NODE, node, null); + } + + /** + * Find a soap wrapper for w3c dom node. + * + * @param node w3c dom node nullable + * @return soap wrapper for w3c dom node + * + * @throws + */ + public javax.xml.soap.Node find(Node node) { + return find(node, true); + } + + private javax.xml.soap.Node find(Node node, boolean required) { + if (node == null) { + return null; + } + if (node instanceof javax.xml.soap.Node) { + return (javax.xml.soap.Node) node; + } + final javax.xml.soap.Node found = (javax.xml.soap.Node) node.getUserData(SAAJ_NODE); + if (found == null && required) { + throw new IllegalArgumentException(MessageFormat.format("Cannot find SOAP wrapper for element {0}", node)); + } + return found; + } + + /** + * If corresponding soap wrapper exists for w3c dom node it is returned, + * if not passed dom element is returned. + * + * @param node w3c dom node + * @return soap wrapper or passed w3c dom node if not found + */ + public Node findIfPresent(Node node) { + final javax.xml.soap.Node found = find(node, false); + return found != null ? found : node; + } + + /** + * Extracts w3c dom node from corresponding soap wrapper. + * + * @param node soap or dom nullable + * @return dom node + */ + public Node getDomNode(Node node) { + if (node instanceof SOAPDocumentImpl) { + return ((SOAPDocumentImpl)node).getDomElement(); + } else if (node instanceof ElementImpl) { + return ((ElementImpl) node).getDomElement(); + } else if (node instanceof SOAPTextImpl) { + return ((SOAPTextImpl)node).getDomElement(); + } else if (node instanceof SOAPCommentImpl) { + return ((SOAPCommentImpl)node).getDomElement(); + } else if (node instanceof CDATAImpl) { + return ((CDATAImpl) node).getDomElement(); + } + return node; + } + + + private Node createSoapNode(Class nodeType, Node node) { + if (SOAPTextImpl.class.isAssignableFrom(nodeType)) { + return new SOAPTextImpl(this, (Text) node); + } else if (SOAPCommentImpl.class.isAssignableFrom(nodeType)) { + return new SOAPCommentImpl(this, (Comment) node); + } else if (CDATAImpl.class.isAssignableFrom(nodeType)) { + return new CDATAImpl(this, (CDATASection) node); + } + try { + Constructor constructor = nodeType.getConstructor(SOAPDocumentImpl.class, Element.class); + return constructor.newInstance(this, node); + } catch (Exception e) { + throw new IllegalStateException(e); + } + } + + + public Document getDomElement() { + return document; + } + + @Override + public String getValue() { + throw new UnsupportedOperationException(); + } + + @Override + public void setValue(String value) { + throw new UnsupportedOperationException(); + } + + @Override + public void setParentElement(SOAPElement parent) throws SOAPException { + throw new UnsupportedOperationException(); + } + + @Override + public SOAPElement getParentElement() { + throw new UnsupportedOperationException(); + } + + @Override + public void detachNode() { + throw new UnsupportedOperationException(); + } + + @Override + public void recycleNode() { + throw new UnsupportedOperationException(); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java index fc97fa83488..ac5d9eec006 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -49,6 +49,7 @@ public abstract class SOAPFactoryImpl extends SOAPFactory { protected abstract SOAPDocumentImpl createDocument(); + @Override public SOAPElement createElement(String tagName) throws SOAPException { if (tagName == null) { log.log( @@ -60,6 +61,7 @@ public abstract class SOAPFactoryImpl extends SOAPFactory { NameImpl.createFromTagName(tagName)); } + @Override public SOAPElement createElement(Name name) throws SOAPException { // @since SAAJ 1.3 // If the Name was null it would cause a NullPointerException in earlier release @@ -71,6 +73,7 @@ public abstract class SOAPFactoryImpl extends SOAPFactory { return ElementFactory.createElement(createDocument(), name); } + @Override public SOAPElement createElement(QName qname) throws SOAPException { if (qname == null) { log.log(Level.SEVERE,"SAAJ0567.soap.null.input", @@ -80,6 +83,7 @@ public abstract class SOAPFactoryImpl extends SOAPFactory { return ElementFactory.createElement(createDocument(),qname); } + @Override public SOAPElement createElement( String localName, String prefix, @@ -96,6 +100,7 @@ public abstract class SOAPFactoryImpl extends SOAPFactory { return ElementFactory.createElement(createDocument(), localName, prefix, uri); } + @Override public Name createName(String localName, String prefix, String uri) throws SOAPException { // @since SAAJ 1.3 @@ -110,6 +115,7 @@ public abstract class SOAPFactoryImpl extends SOAPFactory { return NameImpl.create(localName, prefix, uri); } + @Override public Name createName(String localName) throws SOAPException { // @since SAAJ 1.3 // if localName==null, earlier impl would create Name with localName=null @@ -125,6 +131,7 @@ public abstract class SOAPFactoryImpl extends SOAPFactory { // Note: the child elements might still be org.w3c.dom.Element's, but the // getChildElements will do the conversion to SOAPElement when called. + @Override public SOAPElement createElement(Element domElement) throws SOAPException { if (domElement == null) { return null; @@ -163,14 +170,17 @@ public abstract class SOAPFactoryImpl extends SOAPFactory { return copy; } + @Override public Detail createDetail() throws SOAPException { throw new UnsupportedOperationException(); } + @Override public SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException { throw new UnsupportedOperationException(); } + @Override public SOAPFault createFault() throws SOAPException { throw new UnsupportedOperationException(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java index 772fcd5662f..90782ccbdad 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -64,6 +64,7 @@ public class SOAPIOException extends IOException { soapException.fillInStackTrace(); } + @Override public Throwable fillInStackTrace() { if (soapException != null) { soapException.fillInStackTrace(); @@ -71,26 +72,32 @@ public class SOAPIOException extends IOException { return this; } + @Override public String getLocalizedMessage() { return soapException.getLocalizedMessage(); } + @Override public String getMessage() { return soapException.getMessage(); } + @Override public void printStackTrace() { soapException.printStackTrace(); } + @Override public void printStackTrace(PrintStream s) { soapException.printStackTrace(s); } + @Override public void printStackTrace(PrintWriter s) { soapException.printStackTrace(s); } + @Override public String toString() { return soapException.toString(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java index 19cc1b4ec30..1410930bf74 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,29 +25,57 @@ package com.sun.xml.internal.messaging.saaj.soap; -import java.io.*; -import java.util.Iterator; -import java.util.logging.Logger; -import java.util.logging.Level; - -import javax.activation.DataHandler; -import javax.activation.DataSource; -import javax.xml.soap.*; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; - -import org.w3c.dom.*; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart; - import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; +import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart; import com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; -import com.sun.xml.internal.messaging.saaj.util.*; +import com.sun.xml.internal.messaging.saaj.util.ByteInputStream; +import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; +import com.sun.xml.internal.messaging.saaj.util.FastInfosetReflection; +import com.sun.xml.internal.messaging.saaj.util.JAXMStreamSource; +import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import com.sun.xml.internal.messaging.saaj.util.MimeHeadersUtil; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; +import com.sun.xml.internal.messaging.saaj.util.XMLDeclarationParser; +import org.w3c.dom.Attr; +import org.w3c.dom.CDATASection; +import org.w3c.dom.Comment; +import org.w3c.dom.DOMConfiguration; +import org.w3c.dom.DOMException; +import org.w3c.dom.DOMImplementation; +import org.w3c.dom.Document; +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.DocumentType; +import org.w3c.dom.Element; +import org.w3c.dom.EntityReference; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.NodeList; +import org.w3c.dom.ProcessingInstruction; +import org.w3c.dom.UserDataHandler; +import javax.activation.DataHandler; +import javax.activation.DataSource; +import javax.xml.soap.MimeHeaders; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPEnvelope; +import javax.xml.soap.SOAPException; +import javax.xml.soap.SOAPPart; +import javax.xml.transform.Source; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.sax.SAXSource; +import javax.xml.transform.stream.StreamSource; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PushbackReader; +import java.io.Reader; +import java.io.UnsupportedEncodingException; +import java.util.Iterator; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.xml.soap.MimeHeader; /** * SOAPPartImpl is the first attachment. This contains the XML/SOAP document. @@ -109,6 +137,7 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { return (message != null) ? message.isFastInfoset() : false; } + @Override public SOAPEnvelope getEnvelope() throws SOAPException { // If there is no SOAP envelope already created, then create @@ -128,20 +157,21 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { envelope = createEnvelopeFromSource(); } else { envelope = createEmptyEnvelope(null); - document.insertBefore(envelope, null); + document.insertBefore(((EnvelopeImpl) envelope).getDomElement(), null); } return envelope; } protected void lookForEnvelope() throws SOAPException { Element envelopeChildElement = document.doGetDocumentElement(); - if (envelopeChildElement == null || envelopeChildElement instanceof Envelope) { - envelope = (EnvelopeImpl) envelopeChildElement; - } else if (!(envelopeChildElement instanceof ElementImpl)) { + org.w3c.dom.Node soapEnvelope = document.findIfPresent(envelopeChildElement); + if (soapEnvelope == null || soapEnvelope instanceof Envelope) { + envelope = (EnvelopeImpl) soapEnvelope; + } else if (document.find(envelopeChildElement) == null) { log.severe("SAAJ0512.soap.incorrect.factory.used"); throw new SOAPExceptionImpl("Unable to create envelope: incorrect factory used during tree construction"); } else { - ElementImpl soapElement = (ElementImpl) envelopeChildElement; + ElementImpl soapElement = (ElementImpl) document.find(envelopeChildElement); if (soapElement.getLocalName().equalsIgnoreCase("Envelope")) { String prefix = soapElement.getPrefix(); String uri = (prefix == null) ? soapElement.getNamespaceURI() : soapElement.getNamespaceURI(prefix); @@ -157,38 +187,47 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } } + @Override public void removeAllMimeHeaders() { headers.removeAllHeaders(); } + @Override public void removeMimeHeader(String header) { headers.removeHeader(header); } + @Override public String[] getMimeHeader(String name) { return headers.getHeader(name); } + @Override public void setMimeHeader(String name, String value) { headers.setHeader(name, value); } + @Override public void addMimeHeader(String name, String value) { headers.addHeader(name, value); } - public Iterator getAllMimeHeaders() { + @Override + public Iterator getAllMimeHeaders() { return headers.getAllHeaders(); } - public Iterator getMatchingMimeHeaders(String[] names) { + @Override + public Iterator getMatchingMimeHeaders(String[] names) { return headers.getMatchingHeaders(names); } - public Iterator getNonMatchingMimeHeaders(String[] names) { + @Override + public Iterator getNonMatchingMimeHeaders(String[] names) { return headers.getNonMatchingHeaders(names); } + @Override public Source getContent() throws SOAPException { if (source != null) { InputStream bis = null; @@ -220,6 +259,7 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { return ((Envelope) getEnvelope()).getContent(); } + @Override public void setContent(Source source) throws SOAPException { try { if (source instanceof StreamSource) { @@ -348,18 +388,22 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { DataHandler getDataHandler() { DataSource ds = new DataSource() { + @Override public OutputStream getOutputStream() throws IOException { throw new IOException("Illegal Operation"); } + @Override public String getContentType() { return getContentTypeString(); } + @Override public String getName() { return getContentId(); } + @Override public InputStream getInputStream() throws IOException { return getContentAsStream(); } @@ -367,15 +411,18 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { return new DataHandler(ds); } + @Override public SOAPDocumentImpl getDocument() { handleNewSource(); return document; } + @Override public SOAPPartImpl getSOAPPart() { return this; } + @Override public DocumentType getDoctype() { return document.getDoctype(); } @@ -384,10 +431,12 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { // same way whether they are called from here or directly from the document. // If the document needs any help from this SOAPPart then // Make it use a call-back as in doGetDocumentElement() below + @Override public DOMImplementation getImplementation() { return document.getImplementation(); } + @Override public Element getDocumentElement() { // If there is no SOAP envelope already created, then create // one from a source if one exists. If there is a newer source @@ -407,26 +456,32 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } } + @Override public Element createElement(String tagName) throws DOMException { return document.createElement(tagName); } + @Override public DocumentFragment createDocumentFragment() { return document.createDocumentFragment(); } + @Override public org.w3c.dom.Text createTextNode(String data) { return document.createTextNode(data); } + @Override public Comment createComment(String data) { return document.createComment(data); } + @Override public CDATASection createCDATASection(String data) throws DOMException { return document.createCDATASection(data); } + @Override public ProcessingInstruction createProcessingInstruction( String target, String data) @@ -434,20 +489,24 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { return document.createProcessingInstruction(target, data); } + @Override public Attr createAttribute(String name) throws DOMException { return document.createAttribute(name); } + @Override public EntityReference createEntityReference(String name) throws DOMException { return document.createEntityReference(name); } + @Override public NodeList getElementsByTagName(String tagname) { handleNewSource(); return document.getElementsByTagName(tagname); } + @Override public org.w3c.dom.Node importNode( org.w3c.dom.Node importedNode, boolean deep) @@ -456,16 +515,19 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { return document.importNode(importedNode, deep); } + @Override public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException { return document.createElementNS(namespaceURI, qualifiedName); } + @Override public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException { return document.createAttributeNS(namespaceURI, qualifiedName); } + @Override public NodeList getElementsByTagNameNS( String namespaceURI, String localName) { @@ -473,16 +535,19 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { return document.getElementsByTagNameNS(namespaceURI, localName); } + @Override public Element getElementById(String elementId) { handleNewSource(); return document.getElementById(elementId); } + @Override public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws DOMException { handleNewSource(); return document.appendChild(newChild); } + @Override public org.w3c.dom.Node cloneNode(boolean deep) { handleNewSource(); return document.cloneNode(deep); @@ -497,75 +562,92 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { return newSoapPart; } + @Override public NamedNodeMap getAttributes() { - return document.getAttributes(); + return document.getDomDocument().getAttributes(); } + @Override public NodeList getChildNodes() { handleNewSource(); return document.getChildNodes(); } + @Override public org.w3c.dom.Node getFirstChild() { handleNewSource(); return document.getFirstChild(); } + @Override public org.w3c.dom.Node getLastChild() { handleNewSource(); return document.getLastChild(); } + @Override public String getLocalName() { - return document.getLocalName(); + return document.getDomDocument().getLocalName(); } + @Override public String getNamespaceURI() { - return document.getNamespaceURI(); + return document.getDomDocument().getNamespaceURI(); } + @Override public org.w3c.dom.Node getNextSibling() { handleNewSource(); return document.getNextSibling(); } + @Override public String getNodeName() { - return document.getNodeName(); + return document.getDomDocument().getNodeName(); } + @Override public short getNodeType() { - return document.getNodeType(); + return document.getDomDocument().getNodeType(); } + @Override public String getNodeValue() throws DOMException { return document.getNodeValue(); } + @Override public Document getOwnerDocument() { - return document.getOwnerDocument(); + return document.getDomDocument().getOwnerDocument(); } + @Override public org.w3c.dom.Node getParentNode() { - return document.getParentNode(); + return document.getDomDocument().getParentNode(); } + @Override public String getPrefix() { - return document.getPrefix(); + return document.getDomDocument().getPrefix(); } + @Override public org.w3c.dom.Node getPreviousSibling() { - return document.getPreviousSibling(); + return document.getDomDocument().getPreviousSibling(); } + @Override public boolean hasAttributes() { - return document.hasAttributes(); + return document.getDomDocument().hasAttributes(); } + @Override public boolean hasChildNodes() { handleNewSource(); return document.hasChildNodes(); } + @Override public org.w3c.dom.Node insertBefore( org.w3c.dom.Node arg0, org.w3c.dom.Node arg1) @@ -574,21 +656,25 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { return document.insertBefore(arg0, arg1); } + @Override public boolean isSupported(String arg0, String arg1) { - return document.isSupported(arg0, arg1); + return document.getDomDocument().isSupported(arg0, arg1); } + @Override public void normalize() { handleNewSource(); document.normalize(); } + @Override public org.w3c.dom.Node removeChild(org.w3c.dom.Node arg0) throws DOMException { handleNewSource(); return document.removeChild(arg0); } + @Override public org.w3c.dom.Node replaceChild( org.w3c.dom.Node arg0, org.w3c.dom.Node arg1) @@ -597,10 +683,12 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { return document.replaceChild(arg0, arg1); } + @Override public void setNodeValue(String arg0) throws DOMException { document.setNodeValue(arg0); } + @Override public void setPrefix(String arg0) throws DOMException { document.setPrefix(arg0); } @@ -675,141 +763,173 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { this.sourceCharsetEncoding = charset; } + @Override public org.w3c.dom.Node renameNode(org.w3c.dom.Node n, String namespaceURI, String qualifiedName) throws DOMException { handleNewSource(); return document.renameNode(n, namespaceURI, qualifiedName); } + @Override public void normalizeDocument() { document.normalizeDocument(); } + @Override public DOMConfiguration getDomConfig() { - return document.getDomConfig(); + return document.getDomDocument().getDomConfig(); } + @Override public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source) throws DOMException { handleNewSource(); return document.adoptNode(source); } + @Override public void setDocumentURI(String documentURI) { document.setDocumentURI(documentURI); } + @Override public String getDocumentURI() { - return document.getDocumentURI(); + return document.getDomDocument().getDocumentURI(); } + @Override public void setStrictErrorChecking(boolean strictErrorChecking) { document.setStrictErrorChecking(strictErrorChecking); } + @Override public String getInputEncoding() { - return document.getInputEncoding(); + return document.getDomDocument().getInputEncoding(); } + @Override public String getXmlEncoding() { - return document.getXmlEncoding(); + return document.getDomDocument().getXmlEncoding(); } + @Override public boolean getXmlStandalone() { - return document.getXmlStandalone(); + return document.getDomDocument().getXmlStandalone(); } + @Override public void setXmlStandalone(boolean xmlStandalone) throws DOMException { document.setXmlStandalone(xmlStandalone); } + @Override public String getXmlVersion() { - return document.getXmlVersion(); + return document.getDomDocument().getXmlVersion(); } + @Override public void setXmlVersion(String xmlVersion) throws DOMException { document.setXmlVersion(xmlVersion); } + @Override public boolean getStrictErrorChecking() { - return document.getStrictErrorChecking(); + return document.getDomDocument().getStrictErrorChecking(); } // DOM L3 methods from org.w3c.dom.Node + @Override public String getBaseURI() { - return document.getBaseURI(); + return document.getDomDocument().getBaseURI(); } + @Override public short compareDocumentPosition(org.w3c.dom.Node other) throws DOMException { return document.compareDocumentPosition(other); } + @Override public String getTextContent() throws DOMException { return document.getTextContent(); } + @Override public void setTextContent(String textContent) throws DOMException { document.setTextContent(textContent); } + @Override public boolean isSameNode(org.w3c.dom.Node other) { return document.isSameNode(other); } + @Override public String lookupPrefix(String namespaceURI) { - return document.lookupPrefix(namespaceURI); + return document.getDomDocument().lookupPrefix(namespaceURI); } + @Override public boolean isDefaultNamespace(String namespaceURI) { return document.isDefaultNamespace(namespaceURI); } + @Override public String lookupNamespaceURI(String prefix) { return document.lookupNamespaceURI(prefix); } + @Override public boolean isEqualNode(org.w3c.dom.Node arg) { - return document.isEqualNode(arg); + return document.getDomDocument().isEqualNode(arg); } + @Override public Object getFeature(String feature, String version) { return document.getFeature(feature,version); } + @Override public Object setUserData(String key, Object data, UserDataHandler handler) { return document.setUserData(key, data, handler); } + @Override public Object getUserData(String key) { - return document.getUserData(key); + return document.getDomDocument().getUserData(key); } + @Override public void recycleNode() { // Nothing seems to be required to be done here } + @Override public String getValue() { return null; } + @Override public void setValue(String value) { log.severe("SAAJ0571.soappart.setValue.not.defined"); throw new IllegalStateException("Setting value of a soap part is not defined"); } + @Override public void setParentElement(SOAPElement parent) throws SOAPException { log.severe("SAAJ0570.soappart.parent.element.not.defined"); throw new SOAPExceptionImpl("The parent element of a soap part is not defined"); } + @Override public SOAPElement getParentElement() { return null; } + @Override public void detachNode() { // Nothing seems to be required to be done here } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java index 96fcb591336..d4bd32cd9ef 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +63,9 @@ public class SOAPVersionMismatchException extends SOAPExceptionImpl { /** * Constructs a SOAPExceptionImpl object initialized * with the given Throwable object. + * + * @param cause a Throwable object that is to + * be embedded in this SOAPExceptionImpl object */ public SOAPVersionMismatchException(Throwable cause) { super(cause); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java index 751a014c163..cd78cdda2fe 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -42,38 +42,39 @@ import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWrit * @author shih-chang.chen@oracle.com */ public class StaxLazySourceBridge extends StaxBridge { - private LazyEnvelopeSource lazySource; + private LazyEnvelopeSource lazySource; - public StaxLazySourceBridge(LazyEnvelopeSource src, SOAPPartImpl soapPart) throws SOAPException { - super(soapPart); - lazySource = src; - final String soapEnvNS = soapPart.getSOAPNamespace(); - try { - breakpoint = new XMLStreamReaderToXMLStreamWriter.Breakpoint(src.readToBodyStarTag(), saajWriter) { - public boolean proceedAfterStartElement() { - if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){ - return false; - } else - return true; - } - }; - } catch (XMLStreamException e) { - throw new SOAPException(e); + public StaxLazySourceBridge(LazyEnvelopeSource src, SOAPPartImpl soapPart) throws SOAPException { + super(soapPart); + lazySource = src; + final String soapEnvNS = soapPart.getSOAPNamespace(); + try { + breakpoint = new XMLStreamReaderToXMLStreamWriter.Breakpoint(src.readToBodyStarTag(), saajWriter) { + @Override + public boolean proceedAfterStartElement() { + if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){ + return false; + } else + return true; } + }; + } catch (XMLStreamException e) { + throw new SOAPException(e); } + } - @Override + @Override public XMLStreamReader getPayloadReader() { return lazySource.readPayload(); // throw new UnsupportedOperationException(); } - @Override + @Override public QName getPayloadQName() { return lazySource.getPayloadQName(); } - @Override + @Override public String getPayloadAttributeValue(String attName) { if (lazySource.isPayloadStreamReader()) { XMLStreamReader reader = lazySource.readPayload(); @@ -84,7 +85,7 @@ public class StaxLazySourceBridge extends StaxBridge { return null; } - @Override + @Override public String getPayloadAttributeValue(QName attName) { if (lazySource.isPayloadStreamReader()) { XMLStreamReader reader = lazySource.readPayload(); @@ -95,12 +96,13 @@ public class StaxLazySourceBridge extends StaxBridge { return null; } - public void bridgePayload() throws XMLStreamException { - //Assuming out is at Body - writePayloadTo(saajWriter); - } + @Override + public void bridgePayload() throws XMLStreamException { + //Assuming out is at Body + writePayloadTo(saajWriter); + } - public void writePayloadTo(XMLStreamWriter writer) throws XMLStreamException { + public void writePayloadTo(XMLStreamWriter writer) throws XMLStreamException { lazySource.writePayloadTo(writer); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java index 753a26313e8..551de80d962 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -38,41 +38,46 @@ import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWrit * @author shih-chang.chen@oracle.com */ public class StaxReaderBridge extends StaxBridge { - private XMLStreamReader in; + private XMLStreamReader in; - public StaxReaderBridge(XMLStreamReader reader, SOAPPartImpl soapPart) throws SOAPException { - super(soapPart); - in = reader; - final String soapEnvNS = soapPart.getSOAPNamespace(); - breakpoint = new XMLStreamReaderToXMLStreamWriter.Breakpoint(reader, saajWriter) { - boolean seenBody = false; - boolean stopedAtBody = false; - public boolean proceedBeforeStartElement() { - if (stopedAtBody) return true; - if (seenBody) { - stopedAtBody = true; - return false; - } - if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){ - seenBody = true; - } - return true; + public StaxReaderBridge(XMLStreamReader reader, SOAPPartImpl soapPart) throws SOAPException { + super(soapPart); + in = reader; + final String soapEnvNS = soapPart.getSOAPNamespace(); + breakpoint = new XMLStreamReaderToXMLStreamWriter.Breakpoint(reader, saajWriter) { + boolean seenBody = false; + boolean stopedAtBody = false; + @Override + public boolean proceedBeforeStartElement() { + if (stopedAtBody) return true; + if (seenBody) { + stopedAtBody = true; + return false; } - }; - } + if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){ + seenBody = true; + } + return true; + } + }; + } + @Override public XMLStreamReader getPayloadReader() { return in; } + @Override public QName getPayloadQName() { return (in.getEventType() == XMLStreamConstants.START_ELEMENT) ? in.getName() : null; } + @Override public String getPayloadAttributeValue(String attName) { return (in.getEventType() == XMLStreamConstants.START_ELEMENT) ? in.getAttributeValue(null, attName) : null; } + @Override public String getPayloadAttributeValue(QName attName) { return (in.getEventType() == XMLStreamConstants.START_ELEMENT) ? in.getAttributeValue(attName.getNamespaceURI(), attName.getLocalPart()) : null; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java index 1ee09435fb7..491f9eac303 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -33,7 +33,7 @@ import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility; import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType; /** - * JAF data content handler for text/plain --> String + * JAF data content handler for text/plain --> String * */ public class StringDataContentHandler implements DataContentHandler { @@ -51,6 +51,7 @@ public class StringDataContentHandler implements DataContentHandler { * * @return The DataFlavors */ + @Override public DataFlavor[] getTransferDataFlavors() { return new DataFlavor[] { getDF() }; } @@ -62,6 +63,7 @@ public class StringDataContentHandler implements DataContentHandler { * @param ds The DataSource corresponding to the data * @return String object */ + @Override public Object getTransferData(DataFlavor df, DataSource ds) throws IOException { // use myDF.equals to be sure to get ActivationDataFlavor.equals, @@ -72,6 +74,7 @@ public class StringDataContentHandler implements DataContentHandler { return null; } + @Override public Object getContent(DataSource ds) throws IOException { String enc = null; InputStreamReader is = null; @@ -120,6 +123,7 @@ public class StringDataContentHandler implements DataContentHandler { /** * Write the object to the output stream, using the specified MIME type. */ + @Override public void writeTo(Object obj, String type, OutputStream os) throws IOException { if (!(obj instanceof String)) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java index dc5e06dca5b..5dea4672a3d 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -56,6 +56,7 @@ public class XmlDataContentHandler implements DataContentHandler { * return the DataFlavors for this DataContentHandler * @return The DataFlavors. */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; DataFlavor flavors[] = new DataFlavor[2]; @@ -69,10 +70,11 @@ public class XmlDataContentHandler implements DataContentHandler { /** * return the Transfer Data of type DataFlavor from InputStream - * @param df The DataFlavor. - * @param ins The InputStream corresponding to the data. + * @param flavor The DataFlavor. + * @param dataSource The DataSource. * @return The constructed Object. */ + @Override public Object getTransferData(DataFlavor flavor, DataSource dataSource) throws IOException { if (flavor.getMimeType().startsWith("text/xml") || @@ -87,6 +89,7 @@ public class XmlDataContentHandler implements DataContentHandler { /** * */ + @Override public Object getContent(DataSource dataSource) throws IOException { return new StreamSource(dataSource.getInputStream()); } @@ -96,6 +99,7 @@ public class XmlDataContentHandler implements DataContentHandler { * (similar semantically to previous method, we are deciding * which one to support) */ + @Override public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException { if (!mimeType.startsWith("text/xml") && !mimeType.startsWith("application/xml")) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java index 58136239bdf..d7a45dcc97e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -36,10 +36,12 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPFactoryImpl; public class SOAPFactoryDynamicImpl extends SOAPFactoryImpl { + @Override protected SOAPDocumentImpl createDocument() { return null; } + @Override public Detail createDetail() throws SOAPException { throw new UnsupportedOperationException( "createDetail() not supported for Dynamic Protocol"); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java index 2ea59f9d015..64b2678172a 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -35,6 +35,7 @@ import javax.xml.soap.*; import com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl; public class SOAPMessageFactoryDynamicImpl extends MessageFactoryImpl { + @Override public SOAPMessage createMessage() throws SOAPException { throw new UnsupportedOperationException( "createMessage() not supported for Dynamic Protocol"); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java index 30777a7ef03..10a45b7a93a 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,6 +29,7 @@ import javax.xml.namespace.QName; import javax.xml.soap.*; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; +import org.w3c.dom.Element; /** * All elements of the SOAP-ENV:BODY. @@ -47,6 +48,11 @@ public abstract class BodyElementImpl super(ownerDoc, qname); } + public BodyElementImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override public void setParentElement(SOAPElement element) throws SOAPException { if (! (element instanceof SOAPBody)) { log.severe("SAAJ0101.impl.parent.of.body.elem.mustbe.body"); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java index 8da4d8a59f8..d5885ea5d26 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -30,20 +30,30 @@ import java.util.Locale; import java.util.logging.Level; import javax.xml.namespace.QName; -import javax.xml.soap.*; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; -import org.w3c.dom.*; -import org.w3c.dom.Node; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.StaxBridge; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import javax.xml.soap.Name; +import javax.xml.soap.SOAPBody; +import javax.xml.soap.SOAPBodyElement; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPEnvelope; +import javax.xml.soap.SOAPException; +import javax.xml.soap.SOAPFault; +import org.w3c.dom.Document; +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; /** * The implementation of SOAP-ENV:BODY or the SOAPBody abstraction. @@ -60,6 +70,10 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { super(ownerDoc, bodyName); } + public BodyImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected abstract NameImpl getFaultName(String name); protected abstract boolean isFault(SOAPElement child); protected abstract SOAPBodyElement createBodyElement(Name name); @@ -67,6 +81,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { protected abstract SOAPFault createFaultElement(); protected abstract QName getDefaultFaultCode(); + @Override public SOAPFault addFault() throws SOAPException { if (hasFault()) { log.severe("SAAJ0110.impl.fault.already.exists"); @@ -83,6 +98,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { return fault; } + @Override public SOAPFault addFault( Name faultCode, String faultString, @@ -95,6 +111,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { return fault; } + @Override public SOAPFault addFault( QName faultCode, String faultString, @@ -107,6 +124,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { return fault; } + @Override public SOAPFault addFault(Name faultCode, String faultString) throws SOAPException { @@ -116,6 +134,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { return fault; } + @Override public SOAPFault addFault(QName faultCode, String faultString) throws SOAPException { @@ -142,6 +161,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { return null; } + @Override public boolean hasFault() { QName payloadQName = getPayloadQName(); return getFaultQName().equals(payloadQName); @@ -151,17 +171,19 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { return new QName(getNamespaceURI(), "Fault"); } + @Override public SOAPFault getFault() { if (hasFault()) { if (fault == null) { //initialize fault member - fault = (SOAPFault) getFirstChildElement(); + fault = (SOAPFault) getSoapDocument().find(getFirstChildElement()); } return fault; } return null; } + @Override public SOAPBodyElement addBodyElement(Name name) throws SOAPException { SOAPBodyElement newBodyElement = (SOAPBodyElement) ElementFactory.createNamedElement( @@ -176,6 +198,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { return newBodyElement; } + @Override public SOAPBodyElement addBodyElement(QName qname) throws SOAPException { SOAPBodyElement newBodyElement = (SOAPBodyElement) ElementFactory.createNamedElement( @@ -190,6 +213,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { return newBodyElement; } + @Override public void setParentElement(SOAPElement element) throws SOAPException { if (!(element instanceof SOAPEnvelope)) { @@ -199,10 +223,12 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { super.setParentElement(element); } + @Override protected SOAPElement addElement(Name name) throws SOAPException { return addBodyElement(name); } + @Override protected SOAPElement addElement(QName name) throws SOAPException { return addBodyElement(name); } @@ -221,6 +247,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { // return super.replaceChild(newElement, ref); // } + @Override public SOAPBodyElement addDocument(Document document) throws SOAPException { /* @@ -247,7 +274,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { org.w3c.dom.Node replacingNode = ownerDoc.importNode(docFrag, true); // Adding replacingNode at the last of the children list of body addNode(replacingNode); - Iterator i = + Iterator i = getChildElements(NameImpl.copyElementName(rootElement)); // Return the child element with the required name which is at the // end of the list @@ -258,12 +285,14 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { //*/ } + @Override protected SOAPElement convertToSoapElement(Element element) { - if ((element instanceof SOAPBodyElement) && + final Node soapNode = getSoapDocument().findIfPresent(element); + if ((soapNode instanceof SOAPBodyElement) && //this check is required because ElementImpl currently // implements SOAPBodyElement - !(element.getClass().equals(ElementImpl.class))) { - return (SOAPElement) element; + !(soapNode.getClass().equals(ElementImpl.class))) { + return (SOAPElement) soapNode; } else { return replaceElementWithSOAPElement( element, @@ -272,6 +301,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { } } + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { log.log(Level.SEVERE, "SAAJ0146.impl.invalid.name.change.requested", @@ -282,9 +312,10 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { + newName.getLocalPart()); } + @Override public Document extractContentAsDocument() throws SOAPException { - Iterator eachChild = getChildElements(); + Iterator eachChild = getChildElements(); javax.xml.soap.Node firstBodyElement = null; while (eachChild.hasNext() && @@ -314,7 +345,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { Document document = null; try { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", SAAJUtil.getSystemClassLoader()); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.newDocument(); @@ -440,7 +471,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { //not lazy -Just get first child element and return its attribute Element elem = getFirstChildElement(); if (elem != null) { - return elem.getAttribute(localName); + return elem.getAttribute(getLocalName()); } } return null; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java index c64e3f80772..975d2cc4a1a 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,21 +25,13 @@ package com.sun.xml.internal.messaging.saaj.soap.impl; -import java.util.logging.Logger; - -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPException; - import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; -import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import org.w3c.dom.CDATASection; +import org.w3c.dom.CharacterData; +import org.w3c.dom.DOMException; +import org.w3c.dom.Text; -public class CDATAImpl - extends com.sun.org.apache.xerces.internal.dom.CDATASectionImpl - implements javax.xml.soap.Text { - - protected static final Logger log = - Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, - "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); +public class CDATAImpl extends TextImpl implements CDATASection { static final String cdataUC = "() { + @Override + public Iterator getDetailEntries() { + return new Iterator() { Iterator eachNode = getChildElementNodes(); SOAPElement next = null; SOAPElement last = null; + @Override public boolean hasNext() { if (next == null) { while (eachNode.hasNext()) { @@ -95,15 +107,17 @@ public abstract class DetailImpl extends FaultElementImpl implements Detail { return next != null; } - public SOAPElement next() { + @Override + public DetailEntry next() { if (!hasNext()) { throw new NoSuchElementException(); } last = next; next = null; - return last; + return (DetailEntry) last; } + @Override public void remove() { if (last == null) { throw new IllegalStateException(); @@ -115,6 +129,7 @@ public abstract class DetailImpl extends FaultElementImpl implements Detail { }; } + @Override protected boolean isStandardFaultElement() { return true; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java index 948a9a01d87..b704bf32d66 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -30,8 +30,22 @@ import javax.xml.soap.*; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; -import com.sun.xml.internal.messaging.saaj.soap.ver1_1.*; -import com.sun.xml.internal.messaging.saaj.soap.ver1_2.*; +import com.sun.xml.internal.messaging.saaj.soap.ver1_1.Body1_1Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_1.Detail1_1Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_1.Envelope1_1Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_1.Fault1_1Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_1.FaultElement1_1Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_1.Header1_1Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_2.Body1_2Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_2.Detail1_2Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_2.Envelope1_2Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_2.Fault1_2Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_2.Header1_2Impl; +import com.sun.xml.internal.messaging.saaj.soap.ver1_2.SOAPPart1_2Impl; +import org.w3c.dom.Element; + +import java.util.Objects; public class ElementFactory { @@ -54,6 +68,72 @@ public class ElementFactory { name.getNamespaceURI()); } + /** + * Create element wrapper for existing DOM element. + * + * @param ownerDocument SOAP document wrapper not null + * @param element DOM element not null + * @return SOAP wrapper for DOM element + */ + public static SOAPElement createElement(SOAPDocumentImpl ownerDocument, Element element) { + Objects.requireNonNull(ownerDocument); + Objects.requireNonNull(element); + + String localName = element.getLocalName(); + String namespaceUri = element.getNamespaceURI(); + String prefix = element.getPrefix(); + + if ("Envelope".equalsIgnoreCase(localName)) { + if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { + return new Envelope1_1Impl(ownerDocument, element); + } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) { + return new Envelope1_2Impl(ownerDocument, element); + } + } + if ("Body".equalsIgnoreCase(localName)) { + if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { + return new Body1_1Impl(ownerDocument, element); + } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) { + return new Body1_2Impl(ownerDocument, element); + } + } + if ("Header".equalsIgnoreCase(localName)) { + if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { + return new Header1_1Impl(ownerDocument, element); + } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) { + return new Header1_2Impl(ownerDocument, element); + } + } + if ("Fault".equalsIgnoreCase(localName)) { + if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { + return new Fault1_1Impl(ownerDocument, element); + } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) { + return new Fault1_2Impl(ownerDocument, element); + } + + } + if ("Detail".equalsIgnoreCase(localName)) { + if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { + return new Detail1_1Impl(ownerDocument, element); + } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) { + return new Detail1_2Impl(ownerDocument, element); + } + } + if ("faultcode".equalsIgnoreCase(localName) + || "faultstring".equalsIgnoreCase(localName) + || "faultactor".equalsIgnoreCase(localName)) { + // SOAP 1.2 does not have fault(code/string/actor) + // So there is no else case required + if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { + return new FaultElement1_1Impl(ownerDocument, + localName, + prefix); + } + } + + return new ElementImpl(ownerDocument, element); + } + public static SOAPElement createElement( SOAPDocumentImpl ownerDocument, String localName, @@ -92,28 +172,28 @@ public class ElementFactory { prefix = NameImpl.SOAP_ENVELOPE_PREFIX; } - if (localName.equalsIgnoreCase("Envelope")) { + if ("Envelope".equalsIgnoreCase(localName)) { if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { return new Envelope1_1Impl(ownerDocument, prefix); } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) { return new Envelope1_2Impl(ownerDocument, prefix); } } - if (localName.equalsIgnoreCase("Body")) { + if ("Body".equalsIgnoreCase(localName)) { if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { return new Body1_1Impl(ownerDocument, prefix); } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) { return new Body1_2Impl(ownerDocument, prefix); } } - if (localName.equalsIgnoreCase("Header")) { + if ("Header".equalsIgnoreCase(localName)) { if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { return new Header1_1Impl(ownerDocument, prefix); } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) { return new Header1_2Impl(ownerDocument, prefix); } } - if (localName.equalsIgnoreCase("Fault")) { + if ("Fault".equalsIgnoreCase(localName)) { SOAPFault fault = null; if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { fault = new Fault1_1Impl(ownerDocument, prefix); @@ -139,16 +219,16 @@ public class ElementFactory { } } - if (localName.equalsIgnoreCase("Detail")) { + if ("Detail".equalsIgnoreCase(localName)) { if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { return new Detail1_1Impl(ownerDocument, prefix); } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) { return new Detail1_2Impl(ownerDocument, prefix); } } - if (localName.equalsIgnoreCase("faultcode") - || localName.equalsIgnoreCase("faultstring") - || localName.equalsIgnoreCase("faultactor")) { + if ("faultcode".equalsIgnoreCase(localName) + || "faultstring".equalsIgnoreCase(localName) + || "faultactor".equalsIgnoreCase(localName)) { // SOAP 1.2 does not have fault(code/string/actor) // So there is no else case required if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java index 10070cc7aa6..efbc0dffe1c 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java @@ -27,25 +27,39 @@ package com.sun.xml.internal.messaging.saaj.soap.impl; import java.net.URI; import java.net.URISyntaxException; -import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.namespace.QName; -import javax.xml.soap.*; -import org.w3c.dom.*; import org.w3c.dom.Node; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; -import com.sun.xml.internal.messaging.saaj.util.*; +import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import com.sun.xml.internal.messaging.saaj.util.NamespaceContextIterator; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.NoSuchElementException; +import javax.xml.soap.Name; +import javax.xml.soap.SOAPBodyElement; +import javax.xml.soap.SOAPConstants; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPException; +import org.w3c.dom.Attr; +import org.w3c.dom.CharacterData; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.NodeList; +import org.w3c.dom.TypeInfo; +import org.w3c.dom.UserDataHandler; -public class ElementImpl - extends com.sun.org.apache.xerces.internal.dom.ElementNSImpl - implements SOAPElement, SOAPBodyElement { +public class ElementImpl implements SOAPElement, SOAPBodyElement { public static final String DSIG_NS = "http://www.w3.org/2000/09/xmldsig#".intern(); public static final String XENC_NS = "http://www.w3.org/2001/04/xmlenc#".intern(); @@ -55,6 +69,69 @@ public class ElementImpl protected QName elementQName; + private Element element; + + private SOAPDocumentImpl soapDocument; + + @Override + public String getTagName() { + return element.getTagName(); + } + + @Override + public String getAttribute(String name) { + return element.getAttribute(name); + } + + @Override + public void setAttribute(String name, String value) throws DOMException { + boolean isQualifiedName = (name.indexOf(":") > 0); + //this is because of BugfixTest#testCR7020991, after removal internal dependencies + //SOAPDocumentImpl#createAttribute is not called anymore from xerces parent + if (isQualifiedName) { + String nsUri = null; + String prefix = name.substring(0, name.indexOf(":")); + //cannot do anything to resolve the URI if prefix is not + //XMLNS. + if (XMLNS.equals(prefix)) { + nsUri = ElementImpl.XMLNS_URI; + setAttributeNS(nsUri, name, value); + return; + } + } + element.setAttribute(name, value); + } + + @Override + public void removeAttribute(String name) throws DOMException { + element.removeAttribute(name); + } + + @Override + public Attr getAttributeNode(String name) { + return element.getAttributeNode(name); + } + + @Override + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return element.setAttributeNode(newAttr); + } + + @Override + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return element.removeAttributeNode(oldAttr); + } + + @Override + public NodeList getElementsByTagName(String name) { + return new NodeListImpl(soapDocument, element.getElementsByTagName(name)); + } + + @Override + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return element.getAttributeNS(namespaceURI, localName); + } + protected static final Logger log = Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); @@ -72,22 +149,27 @@ public class ElementImpl */ public final static String XML_URI = "http://www.w3.org/XML/1998/namespace".intern(); + private final static String XMLNS = "xmlns".intern(); + public ElementImpl(SOAPDocumentImpl ownerDoc, Name name) { - super( - ownerDoc, - name.getURI(), - name.getQualifiedName(), - name.getLocalName()); + this.soapDocument = ownerDoc; + this.element = ownerDoc.getDomDocument().createElementNS(name.getURI(), name.getQualifiedName()); elementQName = NameImpl.convertToQName(name); + soapDocument.register(this); } public ElementImpl(SOAPDocumentImpl ownerDoc, QName name) { - super( - ownerDoc, - name.getNamespaceURI(), - getQualifiedName(name), - name.getLocalPart()); + this.soapDocument = ownerDoc; + this.element = ownerDoc.getDomDocument().createElementNS(name.getNamespaceURI(), getQualifiedName(name)); elementQName = name; + soapDocument.register(this); + } + + public ElementImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + this.element = domElement; + this.soapDocument = ownerDoc; + this.elementQName = new QName(domElement.getNamespaceURI(), domElement.getLocalName()); + soapDocument.register(this); } public ElementImpl( @@ -95,9 +177,11 @@ public class ElementImpl String uri, String qualifiedName) { - super(ownerDoc, uri, qualifiedName); + this.soapDocument = ownerDoc; + this.element = ownerDoc.getDomDocument().createElementNS(uri, qualifiedName); elementQName = new QName(uri, getLocalPart(qualifiedName), getPrefix(qualifiedName)); + soapDocument.register(this); } public void ensureNamespaceIsDeclared(String prefix, String uri) { @@ -110,22 +194,149 @@ public class ElementImpl } } + @Override public Document getOwnerDocument() { - Document doc = super.getOwnerDocument(); - if (doc instanceof SOAPDocument) - return ((SOAPDocument) doc).getDocument(); - else - return doc; + return soapDocument; } + @Override + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return soapDocument.findIfPresent(element.insertBefore(soapDocument.getDomNode(newChild), soapDocument.getDomNode(refChild))); + } + + @Override + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return soapDocument.findIfPresent(element.replaceChild(soapDocument.getDomNode(newChild), soapDocument.getDomNode(oldChild))); + } + + @Override + public Node removeChild(Node oldChild) throws DOMException { + return soapDocument.findIfPresent(element.removeChild(soapDocument.getDomNode(oldChild))); + } + + @Override + public Node appendChild(Node newChild) throws DOMException { + return soapDocument.findIfPresent(element.appendChild(soapDocument.getDomNode(newChild))); + } + + @Override + public boolean hasChildNodes() { + return element.hasChildNodes(); + } + + @Override + public Node cloneNode(boolean deep) { + Node elementNSNode = element.cloneNode(deep); + soapDocument.registerChildNodes(elementNSNode, deep); + return soapDocument.findIfPresent(soapDocument.getDomNode(elementNSNode)); + } + + @Override + public void normalize() { + element.normalize(); + } + + @Override + public boolean isSupported(String feature, String version) { + return element.isSupported(feature, version); + } + + @Override + public String getNamespaceURI() { + return element.getNamespaceURI(); + } + + @Override + public String getPrefix() { + return element.getPrefix(); + } + + @Override + public void setPrefix(String prefix) throws DOMException { + element.setPrefix(prefix); + } + + @Override + public String getLocalName() { + return element.getLocalName(); + } + + @Override + public boolean hasAttributes() { + return element.hasAttributes(); + } + + @Override + public String getBaseURI() { + return element.getBaseURI(); + } + + @Override + public short compareDocumentPosition(Node other) throws DOMException { + return element.compareDocumentPosition(soapDocument.getDomNode(other)); + } + + @Override + public String getTextContent() throws DOMException { + return element.getTextContent(); + } + + @Override + public void setTextContent(String textContent) throws DOMException { + element.setTextContent(textContent); + } + + @Override + public boolean isSameNode(Node other) { + return element.isSameNode(soapDocument.getDomNode(other)); + } + + @Override + public String lookupPrefix(String namespaceURI) { + return element.lookupPrefix(namespaceURI); + } + + @Override + public boolean isDefaultNamespace(String namespaceURI) { + return element.isDefaultNamespace(namespaceURI); + } + + @Override + public String lookupNamespaceURI(String prefix) { + return element.lookupNamespaceURI(prefix); + } + + @Override + public boolean isEqualNode(Node arg) { + return element.isEqualNode(soapDocument.getDomNode(arg)); + } + + @Override + public Object getFeature(String feature, String version) { + return element.getFeature(feature, version); + } + + @Override + public Object setUserData(String key, Object data, UserDataHandler handler) { + return element.setUserData(key, data, handler); + } + + @Override + public Object getUserData(String key) { + return element.getUserData(key); + } + + @Override public SOAPElement addChildElement(Name name) throws SOAPException { return addElement(name); } + @Override public SOAPElement addChildElement(QName qname) throws SOAPException { return addElement(qname); } + @Override public SOAPElement addChildElement(String localName) throws SOAPException { String nsUri = getNamespaceURI(""); Name name = (nsUri == null || nsUri.isEmpty()) @@ -134,6 +345,7 @@ public class ElementImpl return addChildElement(name); } + @Override public SOAPElement addChildElement(String localName, String prefix) throws SOAPException { String uri = getNamespaceURI(prefix); @@ -148,6 +360,7 @@ public class ElementImpl return addChildElement(localName, prefix, uri); } + @Override public String getNamespaceURI(String prefix) { if ("xmlns".equals(prefix)) { @@ -226,12 +439,14 @@ public class ElementImpl return null; } + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { ElementImpl copy = new ElementImpl((SOAPDocumentImpl) getOwnerDocument(), newName); return replaceElementWithSOAPElement(this,copy); } + @Override public QName createQName(String localName, String prefix) throws SOAPException { String uri = getNamespaceURI(prefix); @@ -296,6 +511,7 @@ public class ElementImpl return new NamespaceContextIterator(this, traverseStack); } + @Override public SOAPElement addChildElement( String localName, String prefix, @@ -307,6 +523,7 @@ public class ElementImpl return convertToSoapElement(newElement); } + @Override public SOAPElement addChildElement(SOAPElement element) throws SOAPException { @@ -342,7 +559,7 @@ public class ElementImpl log.severe("SAAJ0158.impl.version.mismatch.fault"); throw new SOAPExceptionImpl("SOAP Version mismatch encountered when trying to add SOAPFault to SOAPBody"); } - Iterator it = this.getChildElements(); + Iterator it = this.getChildElements(); if (it.hasNext()) { log.severe("SAAJ0156.impl.adding.fault.error"); throw new SOAPExceptionImpl("Cannot add SOAPFault as a child of a non-Empty SOAPBody"); @@ -353,13 +570,15 @@ public class ElementImpl // preserve the encodingStyle attr as it may get lost in the import String encodingStyle = element.getEncodingStyle(); - ElementImpl importedElement = (ElementImpl) importElement(element); + final Element importedElement = importElement(element); addNode(importedElement); - if (encodingStyle != null) - importedElement.setEncodingStyle(encodingStyle); + final SOAPElement converted = convertToSoapElement(importedElement); - return convertToSoapElement(importedElement); + if (encodingStyle != null) + converted.setEncodingStyle(encodingStyle); + + return converted; } protected Element importElement(Element element) { @@ -374,7 +593,7 @@ public class ElementImpl protected SOAPElement addElement(Name name) throws SOAPException { SOAPElement newElement = createElement(name); - addNode(newElement); + addNode(((ElementImpl) newElement).getDomElement()); return newElement; } @@ -411,7 +630,7 @@ public class ElementImpl } protected void addNode(org.w3c.dom.Node newElement) throws SOAPException { - insertBefore(newElement, null); + insertBefore(soapDocument.getDomNode(newElement), null); if (getOwnerDocument() instanceof DocumentFragment) return; @@ -431,7 +650,7 @@ public class ElementImpl Node child = getFirstChild(); while (child != null) { if (child instanceof Element) { - return ((Element) child); + return (Element) soapDocument.find(child); } child = child.getNextSibling(); } @@ -441,10 +660,12 @@ public class ElementImpl protected SOAPElement findChild(NameImpl name) { Node eachChild = getFirstChild(); while (eachChild != null) { - if (eachChild instanceof SOAPElement) { - SOAPElement eachChildSoap = (SOAPElement) eachChild; - if (eachChildSoap.getElementName().equals(name)) { - return eachChildSoap; + if (eachChild instanceof Element) { + SOAPElement eachChildSoap = (SOAPElement) soapDocument.find(eachChild); + if (eachChildSoap != null) { + if (eachChildSoap.getElementName().equals(name)) { + return eachChildSoap; + } } } eachChild = eachChild.getNextSibling(); @@ -464,6 +685,7 @@ public class ElementImpl return null; } + @Override public SOAPElement addTextNode(String text) throws SOAPException { if (text.startsWith(CDATAImpl.cdataUC) || text.startsWith(CDATAImpl.cdataLC)) @@ -474,18 +696,19 @@ public class ElementImpl protected SOAPElement addCDATA(String text) throws SOAPException { org.w3c.dom.Text cdata = - (org.w3c.dom.Text) getOwnerDocument().createCDATASection(text); + getOwnerDocument().createCDATASection(text); addNode(cdata); return this; } protected SOAPElement addText(String text) throws SOAPException { org.w3c.dom.Text textNode = - (org.w3c.dom.Text) getOwnerDocument().createTextNode(text); + getOwnerDocument().createTextNode(text); addNode(textNode); return this; } + @Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { addAttributeBare(name, value); @@ -495,6 +718,7 @@ public class ElementImpl return this; } + @Override public SOAPElement addAttribute(QName qname, String value) throws SOAPException { addAttributeBare(qname, value); @@ -537,6 +761,7 @@ public class ElementImpl } } + @Override public SOAPElement addNamespaceDeclaration(String prefix, String uri) throws SOAPException { if (prefix.length() > 0) { @@ -549,10 +774,12 @@ public class ElementImpl return this; } + @Override public String getAttributeValue(Name name) { return getAttributeValueFrom(this, name); } + @Override public String getAttributeValue(QName qname) { return getAttributeValueFrom( this, @@ -562,9 +789,10 @@ public class ElementImpl getQualifiedName(qname)); } - public Iterator getAllAttributes() { + @Override + public Iterator getAllAttributes() { Iterator i = getAllAttributesFrom(this); - ArrayList list = new ArrayList(); + ArrayList list = new ArrayList<>(); while (i.hasNext()) { Name name = i.next(); if (!"xmlns".equalsIgnoreCase(name.getPrefix())) @@ -573,9 +801,10 @@ public class ElementImpl return list.iterator(); } - public Iterator getAllAttributesAsQNames() { + @Override + public Iterator getAllAttributesAsQNames() { Iterator i = getAllAttributesFrom(this); - ArrayList list = new ArrayList(); + ArrayList list = new ArrayList<>(); while (i.hasNext()) { Name name = i.next(); if (!"xmlns".equalsIgnoreCase(name.getPrefix())) { @@ -586,11 +815,13 @@ public class ElementImpl } - public Iterator getNamespacePrefixes() { + @Override + public Iterator getNamespacePrefixes() { return doGetNamespacePrefixes(false); } - public Iterator getVisibleNamespacePrefixes() { + @Override + public Iterator getVisibleNamespacePrefixes() { return doGetNamespacePrefixes(true); } @@ -611,11 +842,13 @@ public class ElementImpl } } + @Override public boolean hasNext() { findNext(); return next != null; } + @Override public String next() { findNext(); if (next == null) { @@ -627,6 +860,7 @@ public class ElementImpl return last; } + @Override public void remove() { if (last == null) { throw new IllegalStateException(); @@ -638,18 +872,22 @@ public class ElementImpl }; } + @Override public Name getElementName() { return NameImpl.convertToName(elementQName); } + @Override public QName getElementQName() { return elementQName; } + @Override public boolean removeAttribute(Name name) { return removeAttribute(name.getURI(), name.getLocalName()); } + @Override public boolean removeAttribute(QName name) { return removeAttribute(name.getNamespaceURI(), name.getLocalPart()); } @@ -666,6 +904,7 @@ public class ElementImpl return true; } + @Override public boolean removeNamespaceDeclaration(String prefix) { org.w3c.dom.Attr declaration = getNamespaceAttr(prefix); if (declaration == null) { @@ -679,13 +918,15 @@ public class ElementImpl return true; } - public Iterator getChildElements() { + @Override + public Iterator getChildElements() { return getChildElementsFrom(this); } protected SOAPElement convertToSoapElement(Element element) { - if (element instanceof SOAPElement) { - return (SOAPElement) element; + final Node soapNode = soapDocument.findIfPresent(element); + if (soapNode instanceof SOAPElement) { + return (SOAPElement) soapNode; } else { return replaceElementWithSOAPElement( element, @@ -693,7 +934,37 @@ public class ElementImpl } } - protected static SOAPElement replaceElementWithSOAPElement( + protected TextImpl convertToSoapText(CharacterData characterData) { + final Node soapNode = getSoapDocument().findIfPresent(characterData); + if (soapNode instanceof TextImpl) { + return (TextImpl) soapNode; + } else { + TextImpl t = null; + switch (characterData.getNodeType()) { + case CDATA_SECTION_NODE: + t = new CDATAImpl(getSoapDocument(), characterData.getData()); + break; + case COMMENT_NODE: + t = new SOAPCommentImpl(getSoapDocument(), characterData.getData()); + break; + case TEXT_NODE: + t = new SOAPTextImpl(getSoapDocument(), characterData.getData()); + break; + } + Node parent = getSoapDocument().find(characterData.getParentNode()); + if (parent != null) { + parent.replaceChild(t, characterData); + } // XXX else throw an exception? + + return t; + +// return replaceElementWithSOAPElement( +// element, +// (ElementImpl) createElement(NameImpl.copyElementName(element))); + } + } + + protected SOAPElement replaceElementWithSOAPElement( Element element, ElementImpl copy) { @@ -703,13 +974,13 @@ public class ElementImpl copy.addAttributeBare(name, getAttributeValueFrom(element, name)); } - Iterator eachChild = getChildElementsFrom(element); + Iterator eachChild = getChildElementsFromDOM(element); while (eachChild.hasNext()) { Node nextChild = eachChild.next(); copy.insertBefore(nextChild, null); } - Node parent = element.getParentNode(); + Node parent = soapDocument.find(element.getParentNode()); if (parent != null) { parent.replaceChild(copy, element); } // XXX else throw an exception? @@ -717,22 +988,22 @@ public class ElementImpl return copy; } - protected Iterator getChildElementNodes() { + private Iterator getChildElementsFromDOM(final Element el) { return new Iterator() { - Iterator eachNode = getChildElements(); - Node next = null; + Node next = el.getFirstChild(); + Node nextNext = null; Node last = null; + Node soapElement = getSoapDocument().findIfPresent(el); + @Override public boolean hasNext() { - if (next == null) { - while (eachNode.hasNext()) { - Node node = eachNode.next(); - if (node instanceof SOAPElement) { - next = node; - break; - } - } + if (next != null) { + return true; } + if (nextNext != null) { + next = nextNext; + } + return next != null; } @@ -740,11 +1011,66 @@ public class ElementImpl if (hasNext()) { last = next; next = null; + + if ((soapElement instanceof ElementImpl) + && (last instanceof Element)) { + last = + ((ElementImpl) soapElement).convertToSoapElement( + (Element) last); + } else if ((soapElement instanceof ElementImpl) && (last instanceof CharacterData)) { + last = ((ElementImpl) soapElement).convertToSoapText( + (CharacterData) last); + } + + nextNext = last.getNextSibling(); return last; } throw new NoSuchElementException(); } + @Override + public void remove() { + if (last == null) { + throw new IllegalStateException(); + } + Node target = last; + last = null; + el.removeChild(target); + } + }; + } + + protected Iterator getChildElementNodes() { + return new Iterator() { + Iterator eachNode = getChildElements(); + Node next = null; + Node last = null; + + @Override + public boolean hasNext() { + if (next == null) { + while (eachNode.hasNext()) { + Node node = eachNode.next(); + if (node instanceof Element) { + next = soapDocument.findIfPresent(node); + break; + } + } + } + return next != null; + } + + @Override + public javax.xml.soap.Node next() { + if (hasNext()) { + last = next; + next = null; + return (javax.xml.soap.Node) last; + } + throw new NoSuchElementException(); + } + + @Override public void remove() { if (last == null) { throw new IllegalStateException(); @@ -756,20 +1082,23 @@ public class ElementImpl }; } - public Iterator getChildElements(final Name name) { + @Override + public Iterator getChildElements(final Name name) { return getChildElements(name.getURI(), name.getLocalName()); } - public Iterator getChildElements(final QName qname) { + @Override + public Iterator getChildElements(final QName qname) { return getChildElements(qname.getNamespaceURI(), qname.getLocalPart()); } - private Iterator getChildElements(final String nameUri, final String nameLocal) { - return new Iterator() { + private Iterator getChildElements(final String nameUri, final String nameLocal) { + return new Iterator() { Iterator eachElement = getChildElementNodes(); Node next = null; Node last = null; + @Override public boolean hasNext() { if (next == null) { while (eachElement.hasNext()) { @@ -787,15 +1116,17 @@ public class ElementImpl return next != null; } - public Node next() { + @Override + public javax.xml.soap.Node next() { if (!hasNext()) { throw new NoSuchElementException(); } last = next; next = null; - return last; + return (javax.xml.soap.Node) last; } + @Override public void remove() { if (last == null) { throw new IllegalStateException(); @@ -807,6 +1138,7 @@ public class ElementImpl }; } + @Override public void removeContents() { Node currentChild = getFirstChild(); @@ -825,6 +1157,7 @@ public class ElementImpl } } + @Override public void setEncodingStyle(String encodingStyle) throws SOAPException { if (!"".equals(encodingStyle)) { try { @@ -842,6 +1175,7 @@ public class ElementImpl tryToFindEncodingStyleAttributeName(); } + @Override public String getEncodingStyle() { String encodingStyle = encodingStyleAttribute.getValue(); if (encodingStyle != null) @@ -863,11 +1197,13 @@ public class ElementImpl } // Node methods + @Override public String getValue() { javax.xml.soap.Node valueNode = getValueNode(); return valueNode == null ? null : valueNode.getValue(); } + @Override public void setValue(String value) { Node valueNode = getValueNodeStrict(); if (valueNode != null) { @@ -897,21 +1233,22 @@ public class ElementImpl } protected javax.xml.soap.Node getValueNode() { - Iterator i = getChildElements(); + Iterator i = getChildElements(); while (i.hasNext()) { - javax.xml.soap.Node n = (javax.xml.soap.Node) i.next(); + Node n = i.next(); if (n.getNodeType() == org.w3c.dom.Node.TEXT_NODE || n.getNodeType() == org.w3c.dom.Node.CDATA_SECTION_NODE) { // TODO: Hack to fix text node split into multiple lines. normalize(); // Should remove the normalization step when this gets fixed in // DOM/Xerces. - return (javax.xml.soap.Node) n; + return soapDocument.find(n); } } return null; } + @Override public void setParentElement(SOAPElement element) throws SOAPException { if (element == null) { log.severe("SAAJ0106.impl.no.null.to.parent.elem"); @@ -943,12 +1280,13 @@ public class ElementImpl encodingStyleAttribute.setName(encodingStyleAttributeName); } + @Override public SOAPElement getParentElement() { Node parentNode = getParentNode(); if (parentNode instanceof SOAPDocument) { return null; } - return (SOAPElement) parentNode; + return (SOAPElement) soapDocument.find(parentNode); } protected String getSOAPNamespace() { @@ -972,10 +1310,11 @@ public class ElementImpl return soapNamespace; } + @Override public void detachNode() { Node parent = getParentNode(); if (parent != null) { - parent.removeChild(this); + parent.removeChild(element); } encodingStyleAttribute.clearNameAndValue(); // Fix for CR: 6474641 @@ -989,6 +1328,7 @@ public class ElementImpl } } + @Override public void recycleNode() { detachNode(); // TBD @@ -1065,10 +1405,12 @@ public class ElementImpl int attributeIndex = 0; String currentName; + @Override public boolean hasNext() { return attributeIndex < attributesLength; } + @Override public Name next() { if (!hasNext()) { throw new NoSuchElementException(); @@ -1088,6 +1430,7 @@ public class ElementImpl } } + @Override public void remove() { if (currentName == null) { throw new IllegalStateException(); @@ -1136,41 +1479,45 @@ public class ElementImpl return attribute == null ? null : attribute.getValue(); } - protected static Iterator getChildElementsFrom(final Element element) { - return new Iterator() { + protected Iterator getChildElementsFrom(final Element element) { + return new Iterator() { Node next = element.getFirstChild(); Node nextNext = null; Node last = null; + Node soapElement = soapDocument.findIfPresent(element); + @Override public boolean hasNext() { if (next != null) { return true; } - if (next == null && nextNext != null) { + if (nextNext != null) { next = nextNext; } return next != null; } - public Node next() { + @Override + public javax.xml.soap.Node next() { if (hasNext()) { last = next; next = null; - if ((element instanceof ElementImpl) - && (last instanceof Element)) { + if ((soapElement instanceof ElementImpl) + && (last instanceof Element)) { last = - ((ElementImpl) element).convertToSoapElement( - (Element) last); + ((ElementImpl) soapElement).convertToSoapElement( + (Element) last); } nextNext = last.getNextSibling(); - return last; + return (javax.xml.soap.Node) soapDocument.findIfPresent(last); } throw new NoSuchElementException(); } + @Override public void remove() { if (last == null) { throw new IllegalStateException(); @@ -1232,6 +1579,7 @@ public class ElementImpl //TODO: This is a temporary SAAJ workaround for optimizing XWS // should be removed once the corresponding JAXP bug is fixed // It appears the bug will be fixed in JAXP 1.4 (not by Appserver 9 timeframe) + @Override public void setAttributeNS( String namespaceURI,String qualifiedName, String value) { int index = qualifiedName.indexOf(':'); @@ -1251,7 +1599,7 @@ public class ElementImpl // SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(value))) // return; - super.setAttributeNS(namespaceURI,qualifiedName,value); + element.setAttributeNS(namespaceURI,qualifiedName,value); //String tmpLocalName = this.getLocalName(); String tmpURI = this.getNamespaceURI(); boolean isIDNS = false; @@ -1270,4 +1618,116 @@ public class ElementImpl } + @Override + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + element.removeAttributeNS(namespaceURI, localName); + } + + @Override + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return element.getAttributeNodeNS(namespaceURI, localName); + } + + @Override + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return element.setAttributeNodeNS(newAttr); + } + + @Override + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return new NodeListImpl(soapDocument, element.getElementsByTagNameNS(namespaceURI, localName)); + } + + @Override + public boolean hasAttribute(String name) { + return element.hasAttribute(name); + } + + @Override + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return element.hasAttributeNS(namespaceURI, localName); + } + + @Override + public TypeInfo getSchemaTypeInfo() { + return element.getSchemaTypeInfo(); + } + + @Override + public void setIdAttribute(String name, boolean isId) throws DOMException { + element.setIdAttribute(name, isId); + } + + @Override + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + element.setIdAttributeNS(namespaceURI, localName, isId); + } + + @Override + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + element.setIdAttributeNode(idAttr, isId); + } + + @Override + public String getNodeName() { + return element.getNodeName(); + } + + @Override + public String getNodeValue() throws DOMException { + return element.getNodeValue(); + } + + @Override + public void setNodeValue(String nodeValue) throws DOMException { + element.setNodeValue(nodeValue); + } + + @Override + public short getNodeType() { + return element.getNodeType(); + } + + @Override + public Node getParentNode() { + return soapDocument.find(element.getParentNode()); + } + + @Override + public NodeList getChildNodes() { + return new NodeListImpl(soapDocument, element.getChildNodes()); + } + + @Override + public Node getFirstChild() { + return soapDocument.findIfPresent(element.getFirstChild()); + } + + @Override + public Node getLastChild() { + return soapDocument.findIfPresent(element.getLastChild()); + } + + @Override + public Node getPreviousSibling() { + return soapDocument.findIfPresent(element.getPreviousSibling()); + } + + @Override + public Node getNextSibling() { + return soapDocument.findIfPresent(element.getNextSibling()); + } + + @Override + public NamedNodeMap getAttributes() { + return new NamedNodeMapImpl(element.getAttributes(), soapDocument); + } + + public Element getDomElement() { + return element; + } + + public SOAPDocumentImpl getSoapDocument() { + return soapDocument; + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java index d73ba5b0cea..a1564b4a450 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +52,7 @@ import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTran import com.sun.xml.internal.org.jvnet.staxex.util.DOMStreamReader; import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter; +import org.w3c.dom.Element; /** * Our implementation of the SOAP envelope. @@ -92,9 +93,14 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { addBody(); } + public EnvelopeImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected abstract NameImpl getHeaderName(String prefix); protected abstract NameImpl getBodyName(String prefix); + @Override public SOAPHeader addHeader() throws SOAPException { return addHeader(null); } @@ -122,7 +128,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { } header = (HeaderImpl) createElement(headerName); - insertBefore(header, firstChild); + insertBefore(header.getDomElement(), firstChild); header.ensureNamespaceIsDeclared(headerName.getPrefix(), headerName.getURI()); return header; @@ -135,6 +141,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { header = hdr; } + @Override public SOAPHeader getHeader() throws SOAPException { lookForHeader(); return header; @@ -147,6 +154,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { body = bodyChildElement; } + @Override public SOAPBody addBody() throws SOAPException { return addBody(null); } @@ -161,7 +169,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { if (body == null) { NameImpl bodyName = getBodyName(prefix); body = (BodyImpl) createElement(bodyName); - insertBefore(body, null); + insertBefore(body.getDomElement(), null); body.ensureNamespaceIsDeclared(bodyName.getPrefix(), bodyName.getURI()); } else { log.severe("SAAJ0122.impl.body.already.exists"); @@ -171,6 +179,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { return body; } + @Override protected SOAPElement addElement(Name name) throws SOAPException { if (getBodyName(null).equals(name)) { return addBody(name.getPrefix()); @@ -182,6 +191,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { return super.addElement(name); } + @Override protected SOAPElement addElement(QName name) throws SOAPException { if (getBodyName(null).equals(NameImpl.convertToName(name))) { return addBody(name.getPrefix()); @@ -193,15 +203,18 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { return super.addElement(name); } + @Override public SOAPBody getBody() throws SOAPException { lookForBody(); return body; } + @Override public Source getContent() { return new DOMSource(getOwnerDocument()); } + @Override public Name createName(String localName, String prefix, String uri) throws SOAPException { @@ -236,6 +249,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { return NameImpl.create(localName, prefix, namespace); } + @Override public Name createName(String localName) throws SOAPException { return NameImpl.createFromUnqualifiedName(localName); } @@ -252,6 +266,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { charset = value; } + @Override public void output(OutputStream out) throws IOException { try { // materializeBody(); @@ -296,6 +311,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { /** * Serialize to FI if boolean parameter set. */ + @Override public void output(OutputStream out, boolean isFastInfoset) throws IOException { @@ -348,6 +364,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { // } + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { log.log(Level.SEVERE, "SAAJ0146.impl.invalid.name.change.requested", @@ -384,6 +401,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { final DOMStreamReader reader = new DOMStreamReader(this); XMLStreamReaderToXMLStreamWriter writingBridge = new XMLStreamReaderToXMLStreamWriter(); writingBridge.bridge( new XMLStreamReaderToXMLStreamWriter.Breakpoint(reader, writer) { + @Override public boolean proceedAfterStartElement() { if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){ return false; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java index 2cf604af0cc..07f25dfd8ba 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -34,6 +34,7 @@ import javax.xml.soap.SOAPFaultElement; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public abstract class FaultElementImpl extends ElementImpl @@ -47,8 +48,13 @@ public abstract class FaultElementImpl super(ownerDoc, qname); } + public FaultElementImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected abstract boolean isStandardFaultElement(); + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { log.log(Level.SEVERE, "SAAJ0146.impl.invalid.name.change.requested", diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java index 218ce0a7f5c..86fdfcf3314 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -31,6 +31,7 @@ import java.util.logging.Level; import javax.xml.namespace.QName; import javax.xml.soap.*; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; import org.w3c.dom.Element; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; @@ -53,6 +54,9 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { super(ownerDoc, name); } + public FaultImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } protected abstract NameImpl getDetailName(); protected abstract NameImpl getFaultCodeName(); @@ -83,6 +87,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { (SOAPFaultElement) findAndConvertChildElement(getFaultStringName()); } + @Override public void setFaultCode(String faultCode) throws SOAPException { setFaultCode( NameImpl.getLocalNameFromTagName(faultCode), @@ -131,6 +136,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { } } + @Override public void setFaultCode(Name faultCodeQName) throws SOAPException { setFaultCode( faultCodeQName.getLocalName(), @@ -138,6 +144,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { faultCodeQName.getURI()); } + @Override public void setFaultCode(QName faultCodeQName) throws SOAPException { setFaultCode( faultCodeQName.getLocalPart(), @@ -165,6 +172,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { detail = (Detail) findAndConvertChildElement(detailName); } + @Override public Detail getDetail() { if (detail == null) initializeDetail(); @@ -175,6 +183,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { return detail; } + @Override public Detail addDetail() throws SOAPException { if (detail == null) initializeDetail(); @@ -188,12 +197,15 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { } } + @Override public boolean hasDetail() { return (getDetail() != null); } + @Override public abstract void setFaultActor(String faultActor) throws SOAPException; + @Override public String getFaultActor() { if (this.faultActorElement == null) findFaultActorElement(); @@ -203,6 +215,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { return null; } + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { log.log( @@ -213,11 +226,13 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { "Cannot change name for " + elementQName.getLocalPart() + " to " + newName.getLocalPart()); } + @Override protected SOAPElement convertToSoapElement(Element element) { - if (element instanceof SOAPFaultElement) { - return (SOAPElement) element; - } else if (element instanceof SOAPElement) { - SOAPElement soapElement = (SOAPElement) element; + final org.w3c.dom.Node soapNode = getSoapDocument().findIfPresent(element); + if (soapNode instanceof SOAPFaultElement) { + return (SOAPElement) soapNode; + } else if (soapNode instanceof SOAPElement) { + SOAPElement soapElement = (SOAPElement) soapNode; if (getDetailName().equals(soapElement.getElementName())) { return replaceElementWithSOAPElement(element, createDetail()); } else { @@ -233,12 +248,12 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { Name elementName = NameImpl.copyElementName(element); ElementImpl newElement; if (getDetailName().equals(elementName)) { - newElement = (ElementImpl) createDetail(); + newElement = createDetail(); } else { String localName = elementName.getLocalName(); if (isStandardFaultElement(localName)) newElement = - (ElementImpl) createSOAPFaultElement(elementName); + createSOAPFaultElement(elementName); else newElement = (ElementImpl) createElement(elementName); } @@ -284,6 +299,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { } } + @Override protected SOAPElement addElement(Name name) throws SOAPException { if (getDetailName().equals(name)) { return addDetail(); @@ -297,6 +313,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { return super.addElement(name); } + @Override protected SOAPElement addElement(QName name) throws SOAPException { return addElement(NameImpl.convertToName(name)); } @@ -311,6 +328,8 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { /** * Convert an xml:lang attribute value into a Locale object + * @param xmlLang xml:lang attribute value + * @return Locale */ protected static Locale xmlLangToLocale(String xmlLang) { if (xmlLang == null) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java index c45594601fd..73b4725abf6 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -30,6 +30,7 @@ import javax.xml.soap.*; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public abstract class HeaderElementImpl extends ElementImpl @@ -47,6 +48,10 @@ public abstract class HeaderElementImpl super(ownerDoc, qname); } + public HeaderElementImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected abstract NameImpl getActorAttributeName(); protected abstract NameImpl getRoleAttributeName(); protected abstract NameImpl getMustunderstandAttributeName(); @@ -58,6 +63,7 @@ public abstract class HeaderElementImpl protected abstract String getActorOrRole(); + @Override public void setParentElement(SOAPElement element) throws SOAPException { if (!(element instanceof SOAPHeader)) { log.severe("SAAJ0130.impl.header.elem.parent.mustbe.header"); @@ -67,6 +73,7 @@ public abstract class HeaderElementImpl super.setParentElement(element); } + @Override public void setActor(String actorUri) { try { removeAttribute(getActorAttributeName()); @@ -76,6 +83,7 @@ public abstract class HeaderElementImpl } //SOAP 1.2 supports Role + @Override public void setRole(String roleUri) throws SOAPException { // runtime exception thrown if called for SOAP 1.1 removeAttribute(getRoleAttributeName()); @@ -85,6 +93,7 @@ public abstract class HeaderElementImpl Name actorAttNameWithoutNS = NameImpl.createFromTagName("actor"); + @Override public String getActor() { String actor = getAttributeValue(getActorAttributeName()); return actor; @@ -92,12 +101,14 @@ public abstract class HeaderElementImpl Name roleAttNameWithoutNS = NameImpl.createFromTagName("role"); + @Override public String getRole() { // runtime exception thrown for 1.1 String role = getAttributeValue(getRoleAttributeName()); return role; } + @Override public void setMustUnderstand(boolean mustUnderstand) { try { removeAttribute(getMustunderstandAttributeName()); @@ -108,6 +119,7 @@ public abstract class HeaderElementImpl } } + @Override public boolean getMustUnderstand() { String mu = getAttributeValue(getMustunderstandAttributeName()); @@ -117,6 +129,7 @@ public abstract class HeaderElementImpl return false; } + @Override public void setRelay(boolean relay) throws SOAPException { // runtime exception thrown for 1.1 removeAttribute(getRelayAttributeName()); @@ -125,6 +138,7 @@ public abstract class HeaderElementImpl getRelayLiteralValue(relay)); } + @Override public boolean getRelay() { String mu = getAttributeValue(getRelayAttributeName()); if (mu != null) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java index a9e4adb086d..aaf56be8d9a 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,11 +25,9 @@ package com.sun.xml.internal.messaging.saaj.soap.impl; -import java.util.*; import java.util.logging.Level; import javax.xml.namespace.QName; -import javax.xml.soap.*; import org.w3c.dom.Element; @@ -37,6 +35,15 @@ import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import javax.xml.soap.Name; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPEnvelope; +import javax.xml.soap.SOAPException; +import javax.xml.soap.SOAPHeader; +import javax.xml.soap.SOAPHeaderElement; public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { protected static final boolean MUST_UNDERSTAND_ONLY = false; @@ -45,6 +52,10 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { super(ownerDoc, name); } + public HeaderImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected abstract SOAPHeaderElement createHeaderElement(Name name) throws SOAPException; protected abstract SOAPHeaderElement createHeaderElement(QName name) @@ -53,6 +64,7 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { protected abstract NameImpl getUpgradeName(); protected abstract NameImpl getSupportedEnvelopeName(); + @Override public SOAPHeaderElement addHeaderElement(Name name) throws SOAPException { SOAPElement newHeaderElement = ElementFactory.createNamedElement( @@ -76,6 +88,7 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { return (SOAPHeaderElement) newHeaderElement; } + @Override public SOAPHeaderElement addHeaderElement(QName name) throws SOAPException { SOAPElement newHeaderElement = ElementFactory.createNamedElement( @@ -99,19 +112,23 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { return (SOAPHeaderElement) newHeaderElement; } + @Override protected SOAPElement addElement(Name name) throws SOAPException { return addHeaderElement(name); } + @Override protected SOAPElement addElement(QName name) throws SOAPException { return addHeaderElement(name); } - public Iterator examineHeaderElements(String actor) { + @Override + public Iterator examineHeaderElements(String actor) { return getHeaderElementsForActor(actor, false, false); } - public Iterator extractHeaderElements(String actor) { + @Override + public Iterator extractHeaderElements(String actor) { return getHeaderElementsForActor(actor, true, false); } @@ -130,9 +147,9 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { String actor, boolean detach, boolean mustUnderstand) { - List elementList = new ArrayList(); + List elementList = new ArrayList<>(); - Iterator eachChild = getChildElements(); + Iterator eachChild = getChildElements(); org.w3c.dom.Node currentChild = iterate(eachChild); while (currentChild != null) { @@ -176,6 +193,7 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { return each.hasNext() ? each.next() : null; } + @Override public void setParentElement(SOAPElement element) throws SOAPException { if (!(element instanceof SOAPEnvelope)) { log.severe("SAAJ0133.impl.header.parent.mustbe.envelope"); @@ -188,6 +206,7 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { // namespace qualified. Holds for both SOAP versions. // TODO - This check needs to be made for other addChildElement() methods // as well. + @Override public SOAPElement addChildElement(String localName) throws SOAPException { SOAPElement element = super.addChildElement(localName); @@ -200,19 +219,23 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { return element; } - public Iterator examineAllHeaderElements() { + @Override + public Iterator examineAllHeaderElements() { return getHeaderElements(null, false, MUST_UNDERSTAND_ONLY); } - public Iterator examineMustUnderstandHeaderElements(String actor) { + @Override + public Iterator examineMustUnderstandHeaderElements(String actor) { return getHeaderElements(actor, false, true); } - public Iterator extractAllHeaderElements() { + @Override + public Iterator extractAllHeaderElements() { return getHeaderElements(null, true, false); } + @Override public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSoapUris) throws SOAPException { if (supportedSoapUris == null) { @@ -236,18 +259,19 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { NameImpl.createFromUnqualifiedName("qname"), ns + ":Envelope"); subElement.addNamespaceDeclaration( - ns, - (String) supportedSoapUris.next()); + ns, (String) supportedSoapUris.next()); i ++; } return upgradeHeaderElement; } + @Override public SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri) throws SOAPException { return addUpgradeHeaderElement(new String[] {supportedSoapUri}); } + @Override public SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris) throws SOAPException { @@ -275,9 +299,11 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { return upgradeHeaderElement; } + @Override protected SOAPElement convertToSoapElement(Element element) { - if (element instanceof SOAPHeaderElement) { - return (SOAPElement) element; + final org.w3c.dom.Node soapNode = getSoapDocument().findIfPresent(element); + if (soapNode instanceof SOAPHeaderElement) { + return (SOAPElement) soapNode; } else { SOAPHeaderElement headerElement; try { @@ -292,6 +318,7 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { } } + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { log.log(Level.SEVERE, "SAAJ0146.impl.invalid.name.change.requested", diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties index b4b7b999748..87c0ec75bd9 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ SAAJ0122.impl.body.already.exists=SAAJ0122: Can't add a body when one is already SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: Cannot declare reserved xmlns prefix SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: Qualified name cannot be xmlns #SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null -SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Unable to locate namespace for prefix {0} +#SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Unable to locate namespace for prefix {0} SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: Cannot pass NULL to setParentElement SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: Parent of a SOAPHeaderElement has to be a SOAPHeader @@ -60,7 +60,7 @@ SAAJ0141.impl.detail.exists=SAAJ0141: Detail already exists SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: Fault/Reason/Text not supported by this SOAP version, try SOAP 1.2 or later SAAJ0143.impl.node.not.supported=SAAJ0143: Fault/Node not supported by this SOAP version, try SOAP 1.2 or later SAAJ0144.impl.role.not.supported=SAAJ0144: Fault/Role not supported by this SOAP version, try SOAP 1.2 or later -SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: Cannot pass NULL to setParentElement +#SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: Cannot pass NULL to setParentElement SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: Cannot change name of element {0} to {1} SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: Cannot change the URI for prefix {0} from {1} to {2} in setElementQName SAAJ0148.impl.invalid.prefix.for.uri=Non-empty namespace URI: {0} for an empty prefix in SetElementQName diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/NamedNodeMapImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/NamedNodeMapImpl.java new file mode 100644 index 00000000000..fb7f28d28ef --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/NamedNodeMapImpl.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.messaging.saaj.soap.impl; + +import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; +import org.w3c.dom.DOMException; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; + +/** + * {@link NamedNodeMap} wrapper, finding SOAP elements automatically when possible. + * + * @author Roman Grigoriadi + */ +public class NamedNodeMapImpl implements NamedNodeMap { + + private final NamedNodeMap namedNodeMap; + + private final SOAPDocumentImpl soapDocument; + + /** + * Create wrapper. + * + * @param namedNodeMap node map to wrap + * @param soapDocument soap document to find soap elements + */ + public NamedNodeMapImpl(NamedNodeMap namedNodeMap, SOAPDocumentImpl soapDocument) { + this.namedNodeMap = namedNodeMap; + this.soapDocument = soapDocument; + } + + @Override + public Node getNamedItem(String name) { + return soapDocument.findIfPresent(namedNodeMap.getNamedItem(name)); + } + + @Override + public Node setNamedItem(Node arg) throws DOMException { + return namedNodeMap.setNamedItem(arg); + } + + @Override + public Node removeNamedItem(String name) throws DOMException { + return namedNodeMap.removeNamedItem(name); + } + + @Override + public Node item(int index) { + return namedNodeMap.item(index); + } + + @Override + public int getLength() { + return namedNodeMap.getLength(); + } + + @Override + public Node getNamedItemNS(String namespaceURI, String localName) throws DOMException { + return namedNodeMap.getNamedItemNS(namespaceURI, localName); + } + + @Override + public Node setNamedItemNS(Node arg) throws DOMException { + return namedNodeMap.setNamedItemNS(arg); + } + + @Override + public Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException { + return namedNodeMap.removeNamedItemNS(namespaceURI, localName); + } +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/NodeListImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/NodeListImpl.java new file mode 100644 index 00000000000..141265ac20f --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/NodeListImpl.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.messaging.saaj.soap.impl; + +import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import java.util.Objects; + +/** + * Node list wrapper, finding SOAP elements automatically when possible. + * + * @author Roman Grigoriadi + */ +public class NodeListImpl implements NodeList { + + private final SOAPDocumentImpl soapDocument; + + private final NodeList nodeList; + + public NodeListImpl(SOAPDocumentImpl soapDocument, NodeList nodeList) { + Objects.requireNonNull(soapDocument); + Objects.requireNonNull(soapDocument); + this.soapDocument = soapDocument; + this.nodeList = nodeList; + } + + @Override + public Node item(int index) { + return soapDocument.findIfPresent(nodeList.item(index)); + } + + @Override + public int getLength() { + return nodeList.getLength(); + } +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java index c306beb74f9..b05af537243 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,87 +25,61 @@ package com.sun.xml.internal.messaging.saaj.soap.impl; -import java.util.ResourceBundle; -import java.util.logging.Logger; - -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPException; - +import org.w3c.dom.CharacterData; +import org.w3c.dom.Comment; import org.w3c.dom.DOMException; import org.w3c.dom.Text; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; -import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import static com.sun.xml.internal.messaging.saaj.soap.impl.TextImpl.log; -public class SOAPCommentImpl - extends com.sun.org.apache.xerces.internal.dom.CommentImpl - implements javax.xml.soap.Text, org.w3c.dom.Comment { - - protected static final Logger log = - Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, - "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); - protected static ResourceBundle rb = - log.getResourceBundle(); +public class SOAPCommentImpl extends TextImpl implements Comment { public SOAPCommentImpl(SOAPDocumentImpl ownerDoc, String text) { super(ownerDoc, text); } - public String getValue() { - String nodeValue = getNodeValue(); - return (nodeValue.equals("") ? null : nodeValue); + public SOAPCommentImpl(SOAPDocumentImpl ownerDoc, CharacterData data) { + super(ownerDoc, data); } - public void setValue(String text) { - setNodeValue(text); + @Override + protected Comment createN(SOAPDocumentImpl ownerDoc, String text) { + Comment c = ownerDoc.getDomDocument().createComment(text); +// ownerDoc.register(this); + return c; } - - public void setParentElement(SOAPElement element) throws SOAPException { - if (element == null) { - log.severe("SAAJ0112.impl.no.null.to.parent.elem"); - throw new SOAPException("Cannot pass NULL to setParentElement"); - } - ((ElementImpl) element).addNode(this); - } - - public SOAPElement getParentElement() { - return (SOAPElement) getParentNode(); - } - - public void detachNode() { - org.w3c.dom.Node parent = getParentNode(); - if (parent != null) { - parent.removeChild(this); - } - } - - public void recycleNode() { - detachNode(); - // TBD - // - add this to the factory so subsequent - // creations can reuse this object. + @Override + protected Comment createN(SOAPDocumentImpl ownerDoc, CharacterData data) { + Comment c = (Comment) data; + return c; } + @Override public boolean isComment() { return true; } + @Override public Text splitText(int offset) throws DOMException { log.severe("SAAJ0113.impl.cannot.split.text.from.comment"); throw new UnsupportedOperationException("Cannot split text from a Comment Node."); } + @Override public Text replaceWholeText(String content) throws DOMException { log.severe("SAAJ0114.impl.cannot.replace.wholetext.from.comment"); throw new UnsupportedOperationException("Cannot replace Whole Text from a Comment Node."); } + @Override public String getWholeText() { //TODO: maybe we have to implement this in future. throw new UnsupportedOperationException("Not Supported"); } + @Override public boolean isElementContentWhitespace() { //TODO: maybe we have to implement this in future. throw new UnsupportedOperationException("Not Supported"); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java index c088928ba90..63cb43a3bc0 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,62 +25,55 @@ package com.sun.xml.internal.messaging.saaj.soap.impl; -import java.util.logging.Logger; - -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPException; - import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; -import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import org.w3c.dom.CharacterData; +import org.w3c.dom.DOMException; +import org.w3c.dom.Text; -public class SOAPTextImpl - extends com.sun.org.apache.xerces.internal.dom.TextImpl - implements javax.xml.soap.Text, org.w3c.dom.Text { - - protected static final Logger log = - Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, - "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); +public class SOAPTextImpl extends TextImpl implements Text { public SOAPTextImpl(SOAPDocumentImpl ownerDoc, String text) { super(ownerDoc, text); } - public String getValue() { - String nodeValue = getNodeValue(); - return (nodeValue.equals("") ? null : nodeValue); + public SOAPTextImpl(SOAPDocumentImpl ownerDoc, CharacterData data) { + super(ownerDoc, data); } - public void setValue(String text) { - setNodeValue(text); + @Override + protected Text createN(SOAPDocumentImpl ownerDoc, String text) { + Text t = ownerDoc.getDomDocument().createTextNode(text); +// ownerDoc.register(this); + return t; } - public void setParentElement(SOAPElement parent) throws SOAPException { - if (parent == null) { - log.severe("SAAJ0126.impl.cannot.locate.ns"); - throw new SOAPException("Cannot pass NULL to setParentElement"); - } - ((ElementImpl) parent).addNode(this); + @Override + protected Text createN(SOAPDocumentImpl ownerDoc, CharacterData data) { + Text t = (Text) data; + return t; } - public SOAPElement getParentElement() { - return (SOAPElement) getParentNode(); + @Override + public Text splitText(int offset) throws DOMException { + return getDomElement().splitText(offset); } - - public void detachNode() { - org.w3c.dom.Node parent = getParentNode(); - if (parent != null) { - parent.removeChild(this); - } + @Override + public boolean isElementContentWhitespace() { + return getDomElement().isElementContentWhitespace(); } - public void recycleNode() { - detachNode(); - // TBD - // - add this to the factory so subsequent - // creations can reuse this object. + @Override + public String getWholeText() { + return getDomElement().getWholeText(); } + @Override + public Text replaceWholeText(String content) throws DOMException { + return getDomElement().replaceWholeText(content); + } + + @Override public boolean isComment() { String txt = getNodeValue(); if (txt == null) { @@ -88,4 +81,5 @@ public class SOAPTextImpl } return txt.startsWith(""); } + } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java new file mode 100644 index 00000000000..0a49b10a75e --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java @@ -0,0 +1,342 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.messaging.saaj.soap.impl; + +import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; +import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import java.util.logging.Logger; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPException; +import javax.xml.soap.Text; +import org.w3c.dom.CharacterData; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.UserDataHandler; + +/** + * + * @author lukas + * @param + */ +public abstract class TextImpl implements Text, CharacterData { + + protected static final Logger log + = Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, + "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); + private final T domNode; + + private final SOAPDocumentImpl soapDocument; + + protected TextImpl(SOAPDocumentImpl ownerDoc, String text) { + this.soapDocument = ownerDoc; + domNode = createN(ownerDoc, text); + ownerDoc.register(this); + } + + protected TextImpl(SOAPDocumentImpl ownerDoc, CharacterData data) { + this.soapDocument = ownerDoc; + domNode = createN(ownerDoc, data); + ownerDoc.register(this); + } + + protected abstract T createN(SOAPDocumentImpl ownerDoc, CharacterData data); + + protected abstract T createN(SOAPDocumentImpl ownerDoc, String text); + + public T getDomElement() { + return domNode; + } + + @Override + public String getValue() { + String nodeValue = getNodeValue(); + return (nodeValue.equals("") ? null : nodeValue); + } + + @Override + public void setValue(String text) { + setNodeValue(text); + } + + @Override + public void setParentElement(SOAPElement parent) throws SOAPException { + if (parent == null) { + log.severe("SAAJ0112.impl.no.null.to.parent.elem"); + throw new SOAPException("Cannot pass NULL to setParentElement"); + } + ((ElementImpl) parent).addNode(this); + } + + @Override + public SOAPElement getParentElement() { + return (SOAPElement) getParentNode(); + } + + @Override + public void detachNode() { + org.w3c.dom.Node parent = getParentNode(); + if (parent != null) { + parent.removeChild(getDomElement()); + } + } + + @Override + public void recycleNode() { + detachNode(); + // TBD + // - add this to the factory so subsequent + // creations can reuse this object. + } + + @Override + public String getNodeName() { + return domNode.getNodeName(); + } + + @Override + public String getNodeValue() throws DOMException { + return domNode.getNodeValue(); + } + + @Override + public void setNodeValue(String nodeValue) throws DOMException { + domNode.setNodeValue(nodeValue); + } + + @Override + public short getNodeType() { + return domNode.getNodeType(); + } + + @Override + public Node getParentNode() { + return domNode.getParentNode(); + } + + @Override + public NodeList getChildNodes() { + return domNode.getChildNodes(); + } + + @Override + public Node getFirstChild() { + return domNode.getFirstChild(); + } + + @Override + public Node getLastChild() { + return domNode.getLastChild(); + } + + @Override + public Node getPreviousSibling() { + return domNode.getPreviousSibling(); + } + + @Override + public Node getNextSibling() { + return domNode.getNextSibling(); + } + + @Override + public NamedNodeMap getAttributes() { + return domNode.getAttributes(); + } + + @Override + public Document getOwnerDocument() { + return domNode.getOwnerDocument(); + } + + @Override + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return domNode.insertBefore(newChild, refChild); + } + + @Override + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return domNode.replaceChild(newChild, oldChild); + } + + @Override + public Node removeChild(Node oldChild) throws DOMException { + return domNode.removeChild(oldChild); + } + + @Override + public Node appendChild(Node newChild) throws DOMException { + return domNode.appendChild(newChild); + } + + @Override + public boolean hasChildNodes() { + return domNode.hasChildNodes(); + } + + @Override + public Node cloneNode(boolean deep) { + return domNode.cloneNode(deep); + } + + @Override + public void normalize() { + domNode.normalize(); + } + + @Override + public boolean isSupported(String feature, String version) { + return domNode.isSupported(feature, version); + } + + @Override + public String getNamespaceURI() { + return domNode.getNamespaceURI(); + } + + @Override + public String getPrefix() { + return domNode.getPrefix(); + } + + @Override + public void setPrefix(String prefix) throws DOMException { + domNode.setPrefix(prefix); + } + + @Override + public String getLocalName() { + return domNode.getLocalName(); + } + + @Override + public boolean hasAttributes() { + return domNode.hasAttributes(); + } + + @Override + public String getBaseURI() { + return domNode.getBaseURI(); + } + + @Override + public short compareDocumentPosition(Node other) throws DOMException { + return domNode.compareDocumentPosition(other); + } + + @Override + public String getTextContent() throws DOMException { + return domNode.getTextContent(); + } + + @Override + public void setTextContent(String textContent) throws DOMException { + domNode.setTextContent(textContent);; + } + + @Override + public boolean isSameNode(Node other) { + return domNode.isSameNode(other); + } + + @Override + public String lookupPrefix(String namespaceURI) { + return domNode.lookupPrefix(namespaceURI); + } + + @Override + public boolean isDefaultNamespace(String namespaceURI) { + return domNode.isDefaultNamespace(namespaceURI); + } + + @Override + public String lookupNamespaceURI(String prefix) { + return domNode.lookupNamespaceURI(prefix); + } + + @Override + public boolean isEqualNode(Node arg) { + return domNode.isEqualNode(arg); + } + + @Override + public Object getFeature(String feature, String version) { + return domNode.getFeature(feature, version); + } + + @Override + public Object setUserData(String key, Object data, UserDataHandler handler) { + return domNode.setUserData(key, data, handler); + } + + @Override + public Object getUserData(String key) { + return domNode.getUserData(key); + } + + @Override + public String getData() throws DOMException { + return domNode.getData(); + } + + @Override + public void setData(String data) throws DOMException { + domNode.setData(data); + } + + @Override + public int getLength() { + return domNode.getLength(); + } + + @Override + public String substringData(int offset, int count) throws DOMException { + return domNode.substringData(offset, count); + } + + @Override + public void appendData(String arg) throws DOMException { + domNode.appendData(arg); + } + + @Override + public void insertData(int offset, String arg) throws DOMException { + domNode.insertData(offset, arg); + } + + @Override + public void deleteData(int offset, int count) throws DOMException { + domNode.deleteData(offset, count); + } + + @Override + public void replaceData(int offset, int count, String arg) throws DOMException { + domNode.replaceData(offset, count, arg); + } + +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java index 52399329148..86af99025eb 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -218,6 +218,7 @@ public class NameImpl implements Name { return prefix + ":" + localName; } + @Override public boolean equals(Object obj) { if (!(obj instanceof Name)) { return false; @@ -236,6 +237,7 @@ public class NameImpl implements Name { return true; } + @Override public int hashCode() { return localName.hashCode(); } @@ -245,6 +247,7 @@ public class NameImpl implements Name { * * @return a string for the local name. */ + @Override public String getLocalName() { return localName; } @@ -256,6 +259,7 @@ public class NameImpl implements Name { * * @return the prefix as a string. */ + @Override public String getPrefix() { return prefix; } @@ -265,6 +269,7 @@ public class NameImpl implements Name { * * @return the uri as a string. */ + @Override public String getURI() { return uri; } @@ -272,6 +277,7 @@ public class NameImpl implements Name { /** * Returns a String version of the name suitable for use in an XML document. */ + @Override public String getQualifiedName() { if (qualifiedName == null) { if (prefix != null && prefix.length() > 0) { @@ -285,6 +291,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.1 Envelope. + * + * @param prefix prefix + * @return Envelope Name */ public static NameImpl createEnvelope1_1Name(String prefix) { return new Envelope1_1Name(prefix); @@ -292,6 +301,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.2 Envelope. + * + * @param prefix prefix + * @return Envelope Name */ public static NameImpl createEnvelope1_2Name(String prefix) { return new Envelope1_2Name(prefix); @@ -299,6 +311,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.1 Header. + * + * @param prefix prefix + * @return Header Name */ public static NameImpl createHeader1_1Name(String prefix) { return new Header1_1Name(prefix); @@ -306,6 +321,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.2 Header. + * + * @param prefix prefix + * @return Header Name */ public static NameImpl createHeader1_2Name(String prefix) { return new Header1_2Name(prefix); @@ -313,6 +331,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.1 Body. + * + * @param prefix prefix + * @return Body Name */ public static NameImpl createBody1_1Name(String prefix) { return new Body1_1Name(prefix); @@ -320,6 +341,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.2 Body. + * + * @param prefix prefix + * @return Body Name */ public static NameImpl createBody1_2Name(String prefix) { return new Body1_2Name(prefix); @@ -327,20 +351,29 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.1 Fault. + * + * @param prefix prefix + * @return Fault Name */ public static NameImpl createFault1_1Name(String prefix) { return new Fault1_1Name(prefix); } /** - * Create a name object for a SOAP1.2 NotUnderstood element. - */ + * Create a name object for a SOAP1.2 NotUnderstood element. + * + * @param prefix prefix + * @return NotUnderstood Name + */ public static NameImpl createNotUnderstood1_2Name(String prefix) { return new NotUnderstood1_2Name(prefix); } /** * Create a name object for a SOAP1.2 Upgrade element. + * + * @param prefix prefix + * @return Upgrade Name */ public static NameImpl createUpgrade1_2Name(String prefix) { return new Upgrade1_2Name(prefix); @@ -348,6 +381,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.2 SupportedEnvelope Upgrade element. + * + * @param prefix prefix + * @return Supported Envelope Name */ public static NameImpl createSupportedEnvelope1_2Name(String prefix) { return new SupportedEnvelope1_2Name(prefix); @@ -358,6 +394,8 @@ public class NameImpl implements Name { * Fault, Reason or Detail. * * @param localName Local Name of element + * @param prefix prefix + * @return Fault Name */ public static NameImpl createFault1_2Name( String localName, @@ -369,6 +407,8 @@ public class NameImpl implements Name { * Create a name object for a SOAP1.2 Fault/Code or Subcode. * * @param localName Either "Code" or "Subcode" + * @param prefix prefix + * @return CodeSubcode Name */ public static NameImpl createCodeSubcode1_2Name( String prefix, @@ -378,6 +418,8 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.1 Fault Detail. + * + * @return Detail Name */ public static NameImpl createDetail1_1Name() { return new Detail1_1Name(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java index 12fb6d02a4e..f841bf72734 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -38,43 +38,54 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class Body1_1Impl extends BodyImpl { public Body1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) { super(ownerDocument, NameImpl.createBody1_1Name(prefix)); } + public Body1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + public SOAPFault addSOAP12Fault(QName faultCode, String faultReason, Locale locale) { // log message here throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } + @Override protected NameImpl getFaultName(String name) { // Ignore name return NameImpl.createFault1_1Name(null); } + @Override protected SOAPBodyElement createBodyElement(Name name) { return new BodyElement1_1Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), name); } + @Override protected SOAPBodyElement createBodyElement(QName name) { return new BodyElement1_1Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), name); } + @Override protected QName getDefaultFaultCode() { return new QName(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "Server"); } + @Override protected boolean isFault(SOAPElement child) { // SOAP 1.1 faults always use the default name return child.getElementName().equals(getFaultName(null)); } + @Override protected SOAPFault createFaultElement() { return new Fault1_1Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), getPrefix()); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java index 6cc387d5d79..9f6db55ca1a 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -36,6 +36,7 @@ import javax.xml.soap.SOAPException; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.BodyElementImpl; +import org.w3c.dom.Element; public class BodyElement1_1Impl extends BodyElementImpl { @@ -45,6 +46,12 @@ public class BodyElement1_1Impl extends BodyElementImpl { public BodyElement1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) { super(ownerDoc, qname); } + + public BodyElement1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { BodyElementImpl copy = new BodyElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java index 480ca25f8d2..6d4fe38f6b3 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -36,6 +36,7 @@ import javax.xml.soap.Name; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.DetailImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class Detail1_1Impl extends DetailImpl { @@ -45,11 +46,18 @@ public class Detail1_1Impl extends DetailImpl { public Detail1_1Impl(SOAPDocumentImpl ownerDoc) { super(ownerDoc, NameImpl.createDetail1_1Name()); } + + public Detail1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override protected DetailEntry createDetailEntry(Name name) { return new DetailEntry1_1Impl( (SOAPDocumentImpl) getOwnerDocument(), name); } + @Override protected DetailEntry createDetailEntry(QName name) { return new DetailEntry1_1Impl( (SOAPDocumentImpl) getOwnerDocument(), diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java index 6c9ea4efb7f..a0571e29005 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -36,6 +36,7 @@ import javax.xml.soap.SOAPException; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.DetailEntryImpl; +import org.w3c.dom.Element; public class DetailEntry1_1Impl extends DetailEntryImpl { @@ -45,6 +46,12 @@ public class DetailEntry1_1Impl extends DetailEntryImpl { public DetailEntry1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) { super(ownerDoc, qname); } + + public DetailEntry1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { DetailEntryImpl copy = new DetailEntry1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java index c517fab54f2..31429c7ef68 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -34,6 +34,7 @@ import javax.xml.soap.SOAPException; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class Envelope1_1Impl extends EnvelopeImpl { @@ -52,10 +53,17 @@ public class Envelope1_1Impl extends EnvelopeImpl { createHeader, createBody); } + + public Envelope1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override protected NameImpl getBodyName(String prefix) { return NameImpl.createBody1_1Name(prefix); } + @Override protected NameImpl getHeaderName(String prefix) { return NameImpl.createHeader1_1Name(prefix); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java index 00b8fb65618..c2cf2c05839 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +46,7 @@ import com.sun.xml.internal.messaging.saaj.soap.impl.*; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; +import org.w3c.dom.Element; public class Fault1_1Impl extends FaultImpl { @@ -59,33 +60,48 @@ public class Fault1_1Impl extends FaultImpl { super(ownerDocument, NameImpl.createFault1_1Name(prefix)); } + public Fault1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + public Fault1_1Impl(SOAPDocumentImpl ownerDoc) { + super(ownerDoc, NameImpl.createFault1_1Name(null)); + } + + @Override protected NameImpl getDetailName() { return NameImpl.createDetail1_1Name(); } + @Override protected NameImpl getFaultCodeName() { return NameImpl.createFromUnqualifiedName("faultcode"); } + @Override protected NameImpl getFaultStringName() { return NameImpl.createFromUnqualifiedName("faultstring"); } + @Override protected NameImpl getFaultActorName() { return NameImpl.createFromUnqualifiedName("faultactor"); } + @Override protected DetailImpl createDetail() { return new Detail1_1Impl( ((SOAPDocument) getOwnerDocument()).getDocument()); } + @Override protected FaultElementImpl createSOAPFaultElement(String localName) { return new FaultElement1_1Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), localName); } + @Override protected void checkIfStandardFaultCode(String faultCode, String uri) throws SOAPException { // SOAP 1.1 doesn't seem to mandate using faultcode from a particular @@ -93,16 +109,19 @@ public class Fault1_1Impl extends FaultImpl { // Also need to be backward compatible. } + @Override protected void finallySetFaultCode(String faultcode) throws SOAPException { this.faultCodeElement.addTextNode(faultcode); } + @Override public String getFaultCode() { if (this.faultCodeElement == null) findFaultCodeElement(); return this.faultCodeElement.getValue(); } + @Override public Name getFaultCodeAsName() { String faultcodeString = getFaultCode(); @@ -127,6 +146,7 @@ public class Fault1_1Impl extends FaultImpl { return NameImpl.createFromQualifiedName(faultcodeString, nsName); } + @Override public QName getFaultCodeAsQName() { String faultcodeString = getFaultCode(); if (faultcodeString == null) { @@ -137,6 +157,7 @@ public class Fault1_1Impl extends FaultImpl { return convertCodeToQName(faultcodeString, this.faultCodeElement); } + @Override public void setFaultString(String faultString) throws SOAPException { if (this.faultStringElement == null) @@ -153,6 +174,7 @@ public class Fault1_1Impl extends FaultImpl { this.faultStringElement.addTextNode(faultString); } + @Override public String getFaultString() { if (this.faultStringElement == null) findFaultStringElement(); @@ -160,6 +182,7 @@ public class Fault1_1Impl extends FaultImpl { } + @Override public Locale getFaultStringLocale() { if (this.faultStringElement == null) findFaultStringElement(); @@ -173,6 +196,7 @@ public class Fault1_1Impl extends FaultImpl { return null; } + @Override public void setFaultString(String faultString, Locale locale) throws SOAPException { setFaultString(faultString); @@ -181,6 +205,7 @@ public class Fault1_1Impl extends FaultImpl { localeToXmlLang(locale)); } + @Override protected boolean isStandardFaultElement(String localName) { if (localName.equalsIgnoreCase("detail") || localName.equalsIgnoreCase("faultcode") || @@ -191,6 +216,7 @@ public class Fault1_1Impl extends FaultImpl { return false; } + @Override public void appendFaultSubcode(QName subcode) { log.log( Level.SEVERE, @@ -199,6 +225,7 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } + @Override public void removeAllFaultSubcodes() { log.log( Level.SEVERE, @@ -207,7 +234,8 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } - public Iterator getFaultSubcodes() { + @Override + public Iterator getFaultSubcodes() { log.log( Level.SEVERE, "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1", @@ -215,6 +243,7 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } + @Override public String getFaultReasonText(Locale locale) { log.log( Level.SEVERE, @@ -223,7 +252,8 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } - public Iterator getFaultReasonTexts() { + @Override + public Iterator getFaultReasonTexts() { log.log( Level.SEVERE, "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1", @@ -231,7 +261,8 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } - public Iterator getFaultReasonLocales() { + @Override + public Iterator getFaultReasonLocales() { log.log( Level.SEVERE, "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1", @@ -239,6 +270,7 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } + @Override public void addFaultReasonText(String text, java.util.Locale locale) throws SOAPException { log.log( @@ -248,6 +280,7 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } + @Override public String getFaultRole() { log.log( Level.SEVERE, @@ -256,6 +289,7 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } + @Override public void setFaultRole(String uri) { log.log( Level.SEVERE, @@ -264,6 +298,7 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } + @Override public String getFaultNode() { log.log( Level.SEVERE, @@ -272,6 +307,7 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } + @Override public void setFaultNode(String uri) { log.log( Level.SEVERE, @@ -280,10 +316,12 @@ public class Fault1_1Impl extends FaultImpl { throw new UnsupportedOperationException("Not supported in SOAP 1.1"); } + @Override protected QName getDefaultFaultCode() { return new QName(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "Server"); } + @Override public SOAPElement addChildElement(SOAPElement element) throws SOAPException { String localName = element.getLocalName(); @@ -296,18 +334,21 @@ public class Fault1_1Impl extends FaultImpl { return super.addChildElement(element); } + @Override protected FaultElementImpl createSOAPFaultElement(QName qname) { return new FaultElement1_1Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), qname); } + @Override protected FaultElementImpl createSOAPFaultElement(Name qname) { return new FaultElement1_1Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), (NameImpl)qname); } + @Override public void setFaultCode(String faultCode, String prefix, String uri) throws SOAPException { if (prefix == null || "".equals(prefix)) { @@ -365,6 +406,7 @@ public class Fault1_1Impl extends FaultImpl { return false; } + @Override public void setFaultActor(String faultActor) throws SOAPException { if (this.faultActorElement == null) findFaultActorElement(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java index 22bcab053da..62f9c8c1909 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -59,6 +59,7 @@ public class FaultElement1_1Impl extends FaultElementImpl { NameImpl.createFaultElement1_1Name(localName, prefix)); } + @Override protected boolean isStandardFaultElement() { String localName = elementQName.getLocalPart(); if (localName.equalsIgnoreCase("faultcode") || @@ -69,6 +70,7 @@ public class FaultElement1_1Impl extends FaultElementImpl { return false; } + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { if (!isStandardFaultElement()) { FaultElement1_1Impl copy = diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java index a30911edbda..cff022a7609 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -40,6 +40,7 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import org.w3c.dom.Element; public class Header1_1Impl extends HeaderImpl { @@ -51,6 +52,11 @@ public class Header1_1Impl extends HeaderImpl { super(ownerDocument, NameImpl.createHeader1_1Name(prefix)); } + public Header1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override protected NameImpl getNotUnderstoodName() { log.log( Level.SEVERE, @@ -59,6 +65,7 @@ public class Header1_1Impl extends HeaderImpl { throw new UnsupportedOperationException("Not supported by SOAP 1.1"); } + @Override protected NameImpl getUpgradeName() { return NameImpl.create( "Upgrade", @@ -66,6 +73,7 @@ public class Header1_1Impl extends HeaderImpl { SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE); } + @Override protected NameImpl getSupportedEnvelopeName() { return NameImpl.create( "SupportedEnvelope", @@ -73,6 +81,7 @@ public class Header1_1Impl extends HeaderImpl { SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE); } + @Override public SOAPHeaderElement addNotUnderstoodHeaderElement(QName name) throws SOAPException { log.log( @@ -82,11 +91,13 @@ public class Header1_1Impl extends HeaderImpl { throw new UnsupportedOperationException("Not supported by SOAP 1.1"); } + @Override protected SOAPHeaderElement createHeaderElement(Name name) { return new HeaderElement1_1Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), name); } + @Override protected SOAPHeaderElement createHeaderElement(QName name) { return new HeaderElement1_1Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java index 8708ac933bb..7f256985bbc 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +41,7 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderElementImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import org.w3c.dom.Element; public class HeaderElement1_1Impl extends HeaderElementImpl { @@ -55,17 +56,24 @@ public class HeaderElement1_1Impl extends HeaderElementImpl { super(ownerDoc, qname); } + public HeaderElement1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { HeaderElementImpl copy = new HeaderElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName); return replaceElementWithSOAPElement(this,copy); } + @Override protected NameImpl getActorAttributeName() { return NameImpl.create("actor", null, NameImpl.SOAP11_NAMESPACE); } // role not supported by SOAP 1.1 + @Override protected NameImpl getRoleAttributeName() { log.log( Level.SEVERE, @@ -74,15 +82,18 @@ public class HeaderElement1_1Impl extends HeaderElementImpl { throw new UnsupportedOperationException("Role not supported by SOAP 1.1"); } + @Override protected NameImpl getMustunderstandAttributeName() { return NameImpl.create("mustUnderstand", null, NameImpl.SOAP11_NAMESPACE); } // mustUnderstand attribute has literal value "1" or "0" + @Override protected String getMustunderstandLiteralValue(boolean mustUnderstand) { return (mustUnderstand == true ? "1" : "0"); } + @Override protected boolean getMustunderstandAttributeValue(String mu) { if ("1".equals(mu) || "true".equalsIgnoreCase(mu)) return true; @@ -90,6 +101,7 @@ public class HeaderElement1_1Impl extends HeaderElementImpl { } // relay not supported by SOAP 1.1 + @Override protected NameImpl getRelayAttributeName() { log.log( Level.SEVERE, @@ -98,6 +110,7 @@ public class HeaderElement1_1Impl extends HeaderElementImpl { throw new UnsupportedOperationException("Relay not supported by SOAP 1.1"); } + @Override protected String getRelayLiteralValue(boolean relayAttr) { log.log( Level.SEVERE, @@ -106,6 +119,7 @@ public class HeaderElement1_1Impl extends HeaderElementImpl { throw new UnsupportedOperationException("Relay not supported by SOAP 1.1"); } + @Override protected boolean getRelayAttributeValue(String mu) { log.log( Level.SEVERE, @@ -114,6 +128,7 @@ public class HeaderElement1_1Impl extends HeaderElementImpl { throw new UnsupportedOperationException("Relay not supported by SOAP 1.1"); } + @Override protected String getActorOrRole() { return getActor(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java index e52640fc399..e7e2ab5ee57 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +76,7 @@ public class Message1_1Impl extends MessageImpl implements SOAPConstants { super(headers,ct,stat,reader); } + @Override public SOAPPart getSOAPPart() { if (soapPartImpl == null) { soapPartImpl = new SOAPPart1_1Impl(this); @@ -83,10 +84,12 @@ public class Message1_1Impl extends MessageImpl implements SOAPConstants { return soapPartImpl; } + @Override protected boolean isCorrectSoapVersion(int contentTypeId) { return (contentTypeId & SOAP1_1_FLAG) != 0; } + @Override public String getAction() { log.log( Level.SEVERE, @@ -95,6 +98,7 @@ public class Message1_1Impl extends MessageImpl implements SOAPConstants { throw new UnsupportedOperationException("Operation not supported by SOAP 1.1"); } + @Override public void setAction(String type) { log.log( Level.SEVERE, @@ -103,6 +107,7 @@ public class Message1_1Impl extends MessageImpl implements SOAPConstants { throw new UnsupportedOperationException("Operation not supported by SOAP 1.1"); } + @Override public String getCharset() { log.log( Level.SEVERE, @@ -111,6 +116,7 @@ public class Message1_1Impl extends MessageImpl implements SOAPConstants { throw new UnsupportedOperationException("Operation not supported by SOAP 1.1"); } + @Override public void setCharset(String charset) { log.log( Level.SEVERE, @@ -119,10 +125,12 @@ public class Message1_1Impl extends MessageImpl implements SOAPConstants { throw new UnsupportedOperationException("Operation not supported by SOAP 1.1"); } + @Override protected String getExpectedContentType() { return isFastInfoset ? "application/fastinfoset" : "text/xml"; } + @Override protected String getExpectedAcceptHeader() { String accept = "text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"; return acceptFastInfoset ? ("application/fastinfoset, " + accept) : accept; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java index 13448095cff..d3b27135810 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -39,14 +39,17 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPFactoryImpl; public class SOAPFactory1_1Impl extends SOAPFactoryImpl { + @Override protected SOAPDocumentImpl createDocument() { return (new SOAPPart1_1Impl()).getDocument(); } + @Override public Detail createDetail() throws SOAPException { return new Detail1_1Impl(createDocument()); } + @Override public SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException { if (faultCode == null) { @@ -55,14 +58,15 @@ public class SOAPFactory1_1Impl extends SOAPFactoryImpl { if (reasonText == null) { throw new IllegalArgumentException("reasonText argument for createFault was passed NULL"); } - Fault1_1Impl fault = new Fault1_1Impl(createDocument(), null); + Fault1_1Impl fault = new Fault1_1Impl(createDocument()); fault.setFaultCode(faultCode); fault.setFaultString(reasonText); return fault; } + @Override public SOAPFault createFault() throws SOAPException { - Fault1_1Impl fault = new Fault1_1Impl(createDocument(), null); + Fault1_1Impl fault = new Fault1_1Impl(createDocument()); fault.setFaultCode(fault.getDefaultFaultCode()); fault.setFaultString("Fault string, and possibly fault code, not set"); return fault; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java index 01ce1b8b4c8..e43c5fca686 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -40,16 +40,19 @@ import com.sun.xml.internal.messaging.saaj.soap.MessageImpl; public class SOAPMessageFactory1_1Impl extends MessageFactoryImpl { + @Override public SOAPMessage createMessage() throws SOAPException { return new Message1_1Impl(); } + @Override public SOAPMessage createMessage(boolean isFastInfoset, boolean acceptFastInfoset) throws SOAPException { return new Message1_1Impl(isFastInfoset, acceptFastInfoset); } + @Override public SOAPMessage createMessage(MimeHeaders headers, InputStream in) throws IOException, SOAPExceptionImpl { if (headers == null) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java index b2408ff3220..0e284bbb3c7 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -54,10 +54,12 @@ public class SOAPPart1_1Impl extends SOAPPartImpl implements SOAPConstants { super(message); } + @Override protected String getContentType() { return isFastInfoset() ? "application/fastinfoset" : "text/xml"; } + @Override protected Envelope createEnvelopeFromSource() throws SOAPException { // Record the presence of xml declaration before the envelope gets // created. @@ -80,11 +82,13 @@ public class SOAPPart1_1Impl extends SOAPPartImpl implements SOAPConstants { return envelope; } + @Override protected Envelope createEmptyEnvelope(String prefix) throws SOAPException { return new Envelope1_1Impl(getDocument(), prefix, true, true); } + @Override protected SOAPPartImpl duplicateType() { return new SOAPPart1_1Impl(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java index abef584186d..5fb3436ebd6 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -34,6 +34,7 @@ import java.util.logging.Logger; import javax.xml.namespace.QName; import javax.xml.soap.*; +import org.w3c.dom.Element; import org.w3c.dom.Node; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; @@ -52,25 +53,34 @@ public class Body1_2Impl extends BodyImpl { super(ownerDocument, NameImpl.createBody1_2Name(prefix)); } + public Body1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override protected NameImpl getFaultName(String name) { return NameImpl.createFault1_2Name(name, null); } + @Override protected SOAPBodyElement createBodyElement(Name name) { return new BodyElement1_2Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), name); } + @Override protected SOAPBodyElement createBodyElement(QName name) { return new BodyElement1_2Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), name); } + @Override protected QName getDefaultFaultCode() { return SOAPConstants.SOAP_RECEIVER_FAULT; } + @Override public SOAPFault addFault() throws SOAPException { if (hasAnyChildElement()) { log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body"); @@ -84,6 +94,7 @@ public class Body1_2Impl extends BodyImpl { * Override setEncodingStyle of ElementImpl to restrict adding encodingStyle * attribute to SOAP Body (SOAP 1.2 spec, part 1, section 5.1.1) */ + @Override public void setEncodingStyle(String encodingStyle) throws SOAPException { log.severe("SAAJ0401.ver1_2.no.encodingstyle.in.body"); throw new SOAPExceptionImpl("encodingStyle attribute cannot appear on Body"); @@ -93,6 +104,7 @@ public class Body1_2Impl extends BodyImpl { * Override addAttribute of ElementImpl to restrict adding encodingStyle * attribute to SOAP Body (SOAP 1.2 spec, part 1, section 5.1.1) */ + @Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { if (name.getLocalName().equals("encodingStyle") @@ -103,6 +115,7 @@ public class Body1_2Impl extends BodyImpl { return super.addAttribute(name, value); } + @Override public SOAPElement addAttribute(QName name, String value) throws SOAPException { if (name.getLocalPart().equals("encodingStyle") @@ -113,6 +126,7 @@ public class Body1_2Impl extends BodyImpl { return super.addAttribute(name, value); } + @Override protected boolean isFault(SOAPElement child) { return (child.getElementName().getURI().equals( SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE) && @@ -120,6 +134,7 @@ public class Body1_2Impl extends BodyImpl { "Fault")); } + @Override protected SOAPFault createFaultElement() { return new Fault1_2Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), getPrefix()); @@ -130,6 +145,7 @@ public class Body1_2Impl extends BodyImpl { * SOAP message MUST contain a single Fault element as the only * child element of the SOAP Body. */ + @Override public SOAPBodyElement addBodyElement(Name name) throws SOAPException { if (hasFault()) { log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body"); @@ -139,6 +155,7 @@ public class Body1_2Impl extends BodyImpl { return super.addBodyElement(name); } + @Override public SOAPBodyElement addBodyElement(QName name) throws SOAPException { if (hasFault()) { log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body"); @@ -148,6 +165,7 @@ public class Body1_2Impl extends BodyImpl { return super.addBodyElement(name); } + @Override protected SOAPElement addElement(Name name) throws SOAPException { if (hasFault()) { log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body"); @@ -157,6 +175,7 @@ public class Body1_2Impl extends BodyImpl { return super.addElement(name); } + @Override protected SOAPElement addElement(QName name) throws SOAPException { if (hasFault()) { log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body"); @@ -166,6 +185,7 @@ public class Body1_2Impl extends BodyImpl { return super.addElement(name); } + @Override public SOAPElement addChildElement(Name name) throws SOAPException { if (hasFault()) { log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body"); @@ -175,6 +195,7 @@ public class Body1_2Impl extends BodyImpl { return super.addChildElement(name); } + @Override public SOAPElement addChildElement(QName name) throws SOAPException { if (hasFault()) { log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body"); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java index 8e9d9d8a215..6038bc55eb6 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -36,6 +36,7 @@ import javax.xml.soap.SOAPElement; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.BodyElementImpl; +import org.w3c.dom.Element; public class BodyElement1_2Impl extends BodyElementImpl { @@ -47,6 +48,11 @@ public class BodyElement1_2Impl extends BodyElementImpl { super(ownerDoc, qname); } + public BodyElement1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { BodyElementImpl copy = new BodyElement1_2Impl((SOAPDocumentImpl) getOwnerDocument(), newName); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java index 32fb78ddfe4..a0cad1359ec 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -39,6 +39,7 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.DetailImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class Detail1_2Impl extends DetailImpl { @@ -54,12 +55,18 @@ public class Detail1_2Impl extends DetailImpl { super(ownerDocument, NameImpl.createSOAP12Name("Detail")); } + public Detail1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override protected DetailEntry createDetailEntry(Name name) { return new DetailEntry1_2Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), name); } + @Override protected DetailEntry createDetailEntry(QName name) { return new DetailEntry1_2Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), @@ -70,11 +77,13 @@ public class Detail1_2Impl extends DetailImpl { * Override setEncodingStyle of ElementImpl to restrict adding encodingStyle * attribute to SOAP Detail (SOAP 1.2 spec, part 1, section 5.1.1) */ + @Override public void setEncodingStyle(String encodingStyle) throws SOAPException { log.severe("SAAJ0403.ver1_2.no.encodingStyle.in.detail"); throw new SOAPExceptionImpl("EncodingStyle attribute cannot appear in Detail"); } + @Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { if (name.getLocalName().equals("encodingStyle") @@ -84,6 +93,7 @@ public class Detail1_2Impl extends DetailImpl { return super.addAttribute(name, value); } + @Override public SOAPElement addAttribute(QName name, String value) throws SOAPException { if (name.getLocalPart().equals("encodingStyle") diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java index 26f2b216e29..2f55421dc04 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -36,6 +36,7 @@ import javax.xml.soap.SOAPElement; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.DetailEntryImpl; +import org.w3c.dom.Element; public class DetailEntry1_2Impl extends DetailEntryImpl { @@ -47,6 +48,11 @@ public class DetailEntry1_2Impl extends DetailEntryImpl { super(ownerDoc, qname); } + public DetailEntry1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { DetailEntryImpl copy = new DetailEntry1_2Impl((SOAPDocumentImpl) getOwnerDocument(), newName); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java index 53840bccead..1d5a823b252 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -39,6 +39,7 @@ import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class Envelope1_2Impl extends EnvelopeImpl { @@ -50,6 +51,10 @@ public class Envelope1_2Impl extends EnvelopeImpl { super(ownerDoc, NameImpl.createEnvelope1_2Name(prefix)); } + public Envelope1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + public Envelope1_2Impl( SOAPDocumentImpl ownerDoc, String prefix, @@ -63,10 +68,12 @@ public class Envelope1_2Impl extends EnvelopeImpl { createBody); } + @Override protected NameImpl getBodyName(String prefix) { return NameImpl.createBody1_2Name(prefix); } + @Override protected NameImpl getHeaderName(String prefix) { return NameImpl.createHeader1_2Name(prefix); } @@ -75,6 +82,7 @@ public class Envelope1_2Impl extends EnvelopeImpl { * Override setEncodingStyle of ElementImpl to restrict adding encodingStyle * attribute to SOAP Envelope (SOAP 1.2 spec, part 1, section 5.1.1) */ + @Override public void setEncodingStyle(String encodingStyle) throws SOAPException { log.severe("SAAJ0404.ver1_2.no.encodingStyle.in.envelope"); throw new SOAPExceptionImpl("encodingStyle attribute cannot appear on Envelope"); @@ -84,6 +92,7 @@ public class Envelope1_2Impl extends EnvelopeImpl { * Override addAttribute of ElementImpl to restrict adding encodingStyle * attribute to SOAP Envelope (SOAP 1.2 spec, part 1, section 5.1.1) */ + @Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { if (name.getLocalName().equals("encodingStyle") @@ -93,6 +102,7 @@ public class Envelope1_2Impl extends EnvelopeImpl { return super.addAttribute(name, value); } + @Override public SOAPElement addAttribute(QName name, String value) throws SOAPException { if (name.getLocalPart().equals("encodingStyle") @@ -107,6 +117,7 @@ public class Envelope1_2Impl extends EnvelopeImpl { * Override addChildElement method to ensure that no element * is added after body in SOAP 1.2. */ + @Override public SOAPElement addChildElement(Name name) throws SOAPException { // check if body already exists if (getBody() != null) { @@ -117,6 +128,7 @@ public class Envelope1_2Impl extends EnvelopeImpl { return super.addChildElement(name); } + @Override public SOAPElement addChildElement(QName name) throws SOAPException { // check if body already exists if (getBody() != null) { @@ -137,6 +149,7 @@ public class Envelope1_2Impl extends EnvelopeImpl { * */ + @Override public SOAPElement addTextNode(String text) throws SOAPException { log.log( Level.SEVERE, diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java index 6d655f1ee12..55ba06ed585 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,12 +29,10 @@ */ package com.sun.xml.internal.messaging.saaj.soap.ver1_2; -import java.util.*; import java.util.logging.Logger; import java.util.logging.Level; import javax.xml.namespace.QName; -import javax.xml.soap.*; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; @@ -42,6 +40,15 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.*; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import javax.xml.soap.Name; +import javax.xml.soap.SOAPConstants; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPException; +import org.w3c.dom.Element; public class Fault1_2Impl extends FaultImpl { @@ -68,18 +75,30 @@ public class Fault1_2Impl extends FaultImpl { super(ownerDocument, NameImpl.createFault1_2Name(null, prefix)); } + public Fault1_2Impl(SOAPDocumentImpl ownerDocument) { + super(ownerDocument, NameImpl.createFault1_2Name(null, null)); + } + + public Fault1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override protected NameImpl getDetailName() { return NameImpl.createSOAP12Name("Detail", getPrefix()); } + @Override protected NameImpl getFaultCodeName() { return NameImpl.createSOAP12Name("Code", getPrefix()); } + @Override protected NameImpl getFaultStringName() { return getFaultReasonName(); } + @Override protected NameImpl getFaultActorName() { return getFaultRoleName(); } @@ -104,17 +123,20 @@ public class Fault1_2Impl extends FaultImpl { return NameImpl.createXmlName("lang"); } + @Override protected DetailImpl createDetail() { return new Detail1_2Impl( ((SOAPDocument) getOwnerDocument()).getDocument()); } + @Override protected FaultElementImpl createSOAPFaultElement(String localName) { return new FaultElement1_2Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), localName); } + @Override protected void checkIfStandardFaultCode(String faultCode, String uri) throws SOAPException { QName qname = new QName(uri, faultCode); @@ -131,6 +153,7 @@ public class Fault1_2Impl extends FaultImpl { throw new SOAPExceptionImpl(qname + " is not a standard Code value"); } + @Override protected void finallySetFaultCode(String faultcode) throws SOAPException { SOAPElement value = this.faultCodeElement.addChildElement(valueName); value.addTextNode(faultcode); @@ -140,13 +163,14 @@ public class Fault1_2Impl extends FaultImpl { findFaultStringElement(); } - public Iterator getFaultReasonTexts() throws SOAPException { + @Override + public Iterator getFaultReasonTexts() throws SOAPException { // Fault Reason has similar semantics as faultstring if (this.faultStringElement == null) findReasonElement(); Iterator eachTextElement = this.faultStringElement.getChildElements(textName); - List texts = new ArrayList(); + List texts = new ArrayList<>(); while (eachTextElement.hasNext()) { SOAPElement textElement = (SOAPElement) eachTextElement.next(); Locale thisLocale = getLocale(textElement); @@ -163,6 +187,7 @@ public class Fault1_2Impl extends FaultImpl { return texts.iterator(); } + @Override public void addFaultReasonText(String text, java.util.Locale locale) throws SOAPException { @@ -209,6 +234,7 @@ public class Fault1_2Impl extends FaultImpl { } } + @Override public String getFaultReasonText(Locale locale) throws SOAPException { if (locale == null) @@ -229,13 +255,14 @@ public class Fault1_2Impl extends FaultImpl { return null; } - public Iterator getFaultReasonLocales() throws SOAPException { + @Override + public Iterator getFaultReasonLocales() throws SOAPException { // Fault Reason has similar semantics as faultstring if (this.faultStringElement == null) findReasonElement(); Iterator eachTextElement = this.faultStringElement.getChildElements(textName); - List localeSet = new ArrayList(); + List localeSet = new ArrayList<>(); while (eachTextElement.hasNext()) { SOAPElement textElement = (SOAPElement) eachTextElement.next(); Locale thisLocale = getLocale(textElement); @@ -252,6 +279,7 @@ public class Fault1_2Impl extends FaultImpl { return localeSet.iterator(); } + @Override public Locale getFaultStringLocale() { Locale locale = null; try { @@ -283,6 +311,7 @@ public class Fault1_2Impl extends FaultImpl { return null; } + @Override public String getFaultNode() { SOAPElement faultNode = findAndConvertChildElement(getFaultNodeName()); if (faultNode == null) { @@ -291,6 +320,7 @@ public class Fault1_2Impl extends FaultImpl { return faultNode.getValue(); } + @Override public void setFaultNode(String uri) throws SOAPException { SOAPElement faultNode = findAndConvertChildElement(getFaultNodeName()); if (faultNode != null) { @@ -309,10 +339,12 @@ public class Fault1_2Impl extends FaultImpl { addNode(faultNode); } + @Override public String getFaultRole() { return getFaultActor(); } + @Override public void setFaultRole(String uri) throws SOAPException { if (this.faultActorElement == null) findFaultActorElement(); @@ -328,6 +360,7 @@ public class Fault1_2Impl extends FaultImpl { addNode(this.faultActorElement); } + @Override public String getFaultCode() { if (this.faultCodeElement == null) findFaultCodeElement(); @@ -336,6 +369,7 @@ public class Fault1_2Impl extends FaultImpl { return ((SOAPElement) codeValues.next()).getValue(); } + @Override public QName getFaultCodeAsQName() { String faultcode = getFaultCode(); if (faultcode == null) { @@ -350,6 +384,7 @@ public class Fault1_2Impl extends FaultImpl { (SOAPElement) valueElements.next()); } + @Override public Name getFaultCodeAsName() { String faultcode = getFaultCode(); if (faultcode == null) { @@ -365,6 +400,7 @@ public class Fault1_2Impl extends FaultImpl { (SOAPElement) valueElements.next())); } + @Override public String getFaultString() { String reason = null; try { @@ -375,10 +411,12 @@ public class Fault1_2Impl extends FaultImpl { return reason; } + @Override public void setFaultString(String faultString) throws SOAPException { addFaultReasonText(faultString, Locale.getDefault()); } + @Override public void setFaultString( String faultString, Locale locale) @@ -386,6 +424,7 @@ public class Fault1_2Impl extends FaultImpl { addFaultReasonText(faultString, locale); } + @Override public void appendFaultSubcode(QName subcode) throws SOAPException { if (subcode == null) { return; @@ -421,6 +460,7 @@ public class Fault1_2Impl extends FaultImpl { subcodeValueElement.addTextNode(prefix + ":" + subcode.getLocalPart()); } + @Override public void removeAllFaultSubcodes() { if (this.faultCodeElement == null) findFaultCodeElement(); @@ -432,10 +472,11 @@ public class Fault1_2Impl extends FaultImpl { } } - public Iterator getFaultSubcodes() { + @Override + public Iterator getFaultSubcodes() { if (this.faultCodeElement == null) findFaultCodeElement(); - final List subcodeList = new ArrayList(); + final List subcodeList = new ArrayList<>(); SOAPElement currentCodeElement = this.faultCodeElement; Iterator subcodeElements = currentCodeElement.getChildElements(subcodeName); @@ -452,14 +493,17 @@ public class Fault1_2Impl extends FaultImpl { return new Iterator() { Iterator subCodeIter = subcodeList.iterator(); + @Override public boolean hasNext() { return subCodeIter.hasNext(); } + @Override public QName next() { return subCodeIter.next(); } + @Override public void remove() { throw new UnsupportedOperationException( "Method remove() not supported on SubCodes Iterator"); @@ -475,11 +519,13 @@ public class Fault1_2Impl extends FaultImpl { * Override setEncodingStyle of ElementImpl to restrict adding encodingStyle * attribute to SOAP Fault (SOAP 1.2 spec, part 1, section 5.1.1) */ + @Override public void setEncodingStyle(String encodingStyle) throws SOAPException { log.severe("SAAJ0407.ver1_2.no.encodingStyle.in.fault"); throw new SOAPExceptionImpl("encodingStyle attribute cannot appear on Fault"); } + @Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { if (name.getLocalName().equals("encodingStyle") @@ -489,6 +535,7 @@ public class Fault1_2Impl extends FaultImpl { return super.addAttribute(name, value); } + @Override public SOAPElement addAttribute(QName name, String value) throws SOAPException { if (name.getLocalPart().equals("encodingStyle") @@ -498,6 +545,7 @@ public class Fault1_2Impl extends FaultImpl { return super.addAttribute(name, value); } + @Override public SOAPElement addTextNode(String text) throws SOAPException { log.log( Level.SEVERE, @@ -506,6 +554,7 @@ public class Fault1_2Impl extends FaultImpl { throw new SOAPExceptionImpl("Adding text to SOAP 1.2 Fault is not legal"); } + @Override public SOAPElement addChildElement(SOAPElement element) throws SOAPException { String localName = element.getLocalName(); @@ -521,13 +570,14 @@ public class Fault1_2Impl extends FaultImpl { } } if (element instanceof Detail1_2Impl) { - ElementImpl importedElement = (ElementImpl) importElement(element); + Element importedElement = importElement(element); addNode(importedElement); return convertToSoapElement(importedElement); } else return super.addChildElement(element); } + @Override protected boolean isStandardFaultElement(String localName) { if (localName.equalsIgnoreCase("code") || localName.equalsIgnoreCase("reason") || @@ -539,22 +589,26 @@ public class Fault1_2Impl extends FaultImpl { return false; } + @Override protected QName getDefaultFaultCode() { return SOAPConstants.SOAP_SENDER_FAULT; } + @Override protected FaultElementImpl createSOAPFaultElement(QName qname) { return new FaultElement1_2Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), qname); } + @Override protected FaultElementImpl createSOAPFaultElement(Name qname) { return new FaultElement1_2Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), (NameImpl)qname); } + @Override public void setFaultActor(String faultActor) throws SOAPException { this.setFaultRole(faultActor); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java index a65f172d3c7..0e34cf01cfb 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -38,6 +38,7 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.FaultElementImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; +import org.w3c.dom.Element; public class FaultElement1_2Impl extends FaultElementImpl { @@ -53,6 +54,11 @@ public class FaultElement1_2Impl extends FaultElementImpl { super(ownerDoc, NameImpl.createSOAP12Name(localName)); } + public FaultElement1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override protected boolean isStandardFaultElement() { String localName = elementQName.getLocalPart(); if (localName.equalsIgnoreCase("code") || @@ -64,6 +70,7 @@ public class FaultElement1_2Impl extends FaultElementImpl { return false; } + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { if (!isStandardFaultElement()) { FaultElement1_2Impl copy = @@ -74,11 +81,13 @@ public class FaultElement1_2Impl extends FaultElementImpl { } } + @Override public void setEncodingStyle(String encodingStyle) throws SOAPException { log.severe("SAAJ0408.ver1_2.no.encodingStyle.in.fault.child"); throw new SOAPExceptionImpl("encodingStyle attribute cannot appear on a Fault child element"); } + @Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { if (name.getLocalName().equals("encodingStyle") @@ -88,6 +97,7 @@ public class FaultElement1_2Impl extends FaultElementImpl { return super.addAttribute(name, value); } + @Override public SOAPElement addAttribute(QName name, String value) throws SOAPException { if (name.getLocalPart().equals("encodingStyle") diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java index e860c511885..295158b0394 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +41,7 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import org.w3c.dom.Element; public class Header1_2Impl extends HeaderImpl { @@ -54,18 +55,26 @@ public class Header1_2Impl extends HeaderImpl { super(ownerDocument, NameImpl.createHeader1_2Name(prefix)); } + public Header1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override protected NameImpl getNotUnderstoodName() { return NameImpl.createNotUnderstood1_2Name(null); } + @Override protected NameImpl getUpgradeName() { return NameImpl.createUpgrade1_2Name(null); } + @Override protected NameImpl getSupportedEnvelopeName() { return NameImpl.createSupportedEnvelope1_2Name(null); } + @Override public SOAPHeaderElement addNotUnderstoodHeaderElement(final QName sourceName) throws SOAPException { @@ -97,6 +106,7 @@ public class Header1_2Impl extends HeaderImpl { return notunderstoodHeaderElement; } + @Override public SOAPElement addTextNode(String text) throws SOAPException { log.log( Level.SEVERE, @@ -105,6 +115,7 @@ public class Header1_2Impl extends HeaderImpl { throw new SOAPExceptionImpl("Adding text to SOAP 1.2 Header is not legal"); } + @Override protected SOAPHeaderElement createHeaderElement(Name name) throws SOAPException { String uri = name.getURI(); @@ -117,6 +128,7 @@ public class Header1_2Impl extends HeaderImpl { name); } + @Override protected SOAPHeaderElement createHeaderElement(QName name) throws SOAPException { String uri = name.getNamespaceURI(); @@ -129,11 +141,13 @@ public class Header1_2Impl extends HeaderImpl { name); } + @Override public void setEncodingStyle(String encodingStyle) throws SOAPException { log.severe("SAAJ0409.ver1_2.no.encodingstyle.in.header"); throw new SOAPExceptionImpl("encodingStyle attribute cannot appear on Header"); } + @Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { if (name.getLocalName().equals("encodingStyle") @@ -144,6 +158,7 @@ public class Header1_2Impl extends HeaderImpl { return super.addAttribute(name, value); } + @Override public SOAPElement addAttribute(QName name, String value) throws SOAPException { if (name.getLocalPart().equals("encodingStyle") diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java index b2673a9f5fa..fdbcf0635a4 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +37,7 @@ import javax.xml.soap.SOAPException; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderElementImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class HeaderElement1_2Impl extends HeaderElementImpl { @@ -47,51 +48,65 @@ public class HeaderElement1_2Impl extends HeaderElementImpl { super(ownerDoc, qname); } + public HeaderElement1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { HeaderElementImpl copy = new HeaderElement1_2Impl((SOAPDocumentImpl)getOwnerDocument(), newName); return replaceElementWithSOAPElement(this,copy); } + @Override protected NameImpl getRoleAttributeName() { return NameImpl.create("role", null, NameImpl.SOAP12_NAMESPACE); } // Actor equivalent to Role in SOAP 1.2 + @Override protected NameImpl getActorAttributeName() { return getRoleAttributeName(); } + @Override protected NameImpl getMustunderstandAttributeName() { return NameImpl.create("mustUnderstand", null, NameImpl.SOAP12_NAMESPACE); } // mustUnderstand attribute has literal value "true" or "false" + @Override protected String getMustunderstandLiteralValue(boolean mustUnderstand) { return (mustUnderstand == true ? "true" : "false"); } + @Override protected boolean getMustunderstandAttributeValue(String mu) { if (mu.equals("true") || mu.equals("1")) return true; return false; } + @Override protected NameImpl getRelayAttributeName() { return NameImpl.create("relay", null, NameImpl.SOAP12_NAMESPACE); } //relay attribute has literal value "true" or "false" + @Override protected String getRelayLiteralValue(boolean relay) { return (relay == true ? "true" : "false"); } + @Override protected boolean getRelayAttributeValue(String relay) { if (relay.equals("true") || relay.equals("1")) return true; return false; } + @Override protected String getActorOrRole() { return getRole(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java index b63c8ed4f55..bf851c1299f 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -69,6 +69,7 @@ public class Message1_2Impl extends MessageImpl implements SOAPConstants{ super(headers,ct,stat,reader); } + @Override public SOAPPart getSOAPPart() { if (soapPartImpl == null) soapPartImpl = new SOAPPart1_2Impl(this); @@ -76,14 +77,17 @@ public class Message1_2Impl extends MessageImpl implements SOAPConstants{ return soapPartImpl; } + @Override protected boolean isCorrectSoapVersion(int contentTypeId) { return (contentTypeId & SOAP1_2_FLAG) != 0; } + @Override protected String getExpectedContentType() { return isFastInfoset ? "application/soap+fastinfoset" : "application/soap+xml"; } + @Override protected String getExpectedAcceptHeader() { String accept = "application/soap+xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"; return acceptFastInfoset ? ("application/soap+fastinfoset, " + accept) : accept; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java index af01e129e19..4f6ce887508 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -39,14 +39,17 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPFactoryImpl; public class SOAPFactory1_2Impl extends SOAPFactoryImpl { + @Override protected SOAPDocumentImpl createDocument() { return (new SOAPPart1_2Impl()).getDocument(); } + @Override public Detail createDetail() throws SOAPException { return new Detail1_2Impl(createDocument()); } + @Override public SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException { if (faultCode == null) { @@ -55,14 +58,15 @@ public class SOAPFactory1_2Impl extends SOAPFactoryImpl { if (reasonText == null) { throw new IllegalArgumentException("reasonText argument for createFault was passed NULL"); } - Fault1_2Impl fault = new Fault1_2Impl(createDocument(), null); + Fault1_2Impl fault = new Fault1_2Impl(createDocument()); fault.setFaultCode(faultCode); fault.setFaultString(reasonText); return fault; } + @Override public SOAPFault createFault() throws SOAPException { - Fault1_2Impl fault = new Fault1_2Impl(createDocument(), null); + Fault1_2Impl fault = new Fault1_2Impl(createDocument()); fault.setFaultCode(fault.getDefaultFaultCode()); fault.setFaultString("Fault string, and possibly fault code, not set"); return fault; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java index ac1152121f2..2736d5d9843 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -40,16 +40,19 @@ import com.sun.xml.internal.messaging.saaj.soap.MessageImpl; public class SOAPMessageFactory1_2Impl extends MessageFactoryImpl { + @Override public SOAPMessage createMessage() throws SOAPException { return new Message1_2Impl(); } + @Override public SOAPMessage createMessage(boolean isFastInfoset, boolean acceptFastInfoset) throws SOAPException { return new Message1_2Impl(isFastInfoset, acceptFastInfoset); } + @Override public SOAPMessage createMessage(MimeHeaders headers, InputStream in) throws IOException, SOAPExceptionImpl { if (headers == null) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java index 6f708b8e228..0331405b8ac 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -53,14 +53,17 @@ public class SOAPPart1_2Impl extends SOAPPartImpl implements SOAPConstants{ super(message); } + @Override protected String getContentType() { return "application/soap+xml"; } + @Override protected Envelope createEmptyEnvelope(String prefix) throws SOAPException { return new Envelope1_2Impl(getDocument(), prefix, true, true); } + @Override protected Envelope createEnvelopeFromSource() throws SOAPException { XMLDeclarationParser parser = lookForXmlDecl(); Source tmp = source; @@ -82,6 +85,7 @@ public class SOAPPart1_2Impl extends SOAPPartImpl implements SOAPConstants{ } + @Override protected SOAPPartImpl duplicateType() { return new SOAPPart1_2Impl(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java index 30243489e5c..6e8aa0bd5f5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,7 +37,6 @@ package com.sun.xml.internal.messaging.saaj.util; * This class is used by XML Schema binary format validation * * @author Jeffrey Rodriguez - * @version */ public final class Base64 { @@ -173,7 +172,7 @@ public final class Base64 { /** * Decodes Base64 data into octects * - * @param binaryData Byte array containing Base64 data + * @param base64Data Byte array containing Base64 data * @return Array containind decoded data. */ public byte[] decode( byte[] base64Data ) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java index 5722f117296..4e11155b8f7 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -53,6 +53,7 @@ public class ByteInputStream extends ByteArrayInputStream { return count; } + @Override public void close() throws IOException { reset(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java index c00da8308f6..5763bd78396 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -42,6 +42,7 @@ import java.io.ByteArrayInputStream; *

  • doesn't do synchronization *
  • allows access to the raw buffer *
  • almost no parameter check + * */ public final class ByteOutputStream extends OutputStream { /** @@ -64,6 +65,9 @@ public final class ByteOutputStream extends OutputStream { /** * Copies all the bytes from this input into this buffer. + * + * @param in input stream. + * @exception IOException in case of an I/O error. */ public void write(InputStream in) throws IOException { if (in instanceof ByteArrayInputStream) { @@ -84,6 +88,7 @@ public final class ByteOutputStream extends OutputStream { } } + @Override public void write(int b) { ensureCapacity(1); buf[count] = (byte) b; @@ -102,18 +107,22 @@ public final class ByteOutputStream extends OutputStream { } } + @Override public void write(byte[] b, int off, int len) { ensureCapacity(len); System.arraycopy(b, off, buf, count, len); count += len; } + @Override public void write(byte[] b) { write(b, 0, b.length); } /** * Writes a string as ASCII string. + * + * @param s string to write. */ public void writeAsAscii(String s) { int len = s.length(); @@ -138,9 +147,12 @@ public final class ByteOutputStream extends OutputStream { * Evil buffer reallocation method. * Don't use it unless you absolutely have to. * + * @return byte array + * * @deprecated * because this is evil! */ + @Deprecated public byte toByteArray()[] { byte[] newbuf = new byte[count]; System.arraycopy(buf, 0, newbuf, 0, count); @@ -162,10 +174,12 @@ public final class ByteOutputStream extends OutputStream { * @return String translated from the buffer's contents. * @since JDK1.1 */ + @Override public String toString() { return new String(buf, 0, count); } + @Override public void close() { } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java index df3508a6d60..fc9652e4f50 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -75,10 +75,12 @@ public class JAXMStreamSource extends StreamSource { this.reader = new CharArrayReader(cout.toCharArray(), 0, cout.size()); } + @Override public InputStream getInputStream() { return in; } + @Override public Reader getReader() { return reader; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java index 4d9178876b2..131f1f5e5c1 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -39,8 +39,9 @@ import java.io.Serializable; * string and fragment) that may constitute a URI. *

    * Parsing of a URI specification is done according to the URI -* syntax described in RFC 2396. -* Every URI consists of a scheme, followed by a colon (':'), followed by a scheme-specific +* syntax described in +* RFC 2396. Every URI consists +* of a scheme, followed by a colon (':'), followed by a scheme-specific * part. For URIs that follow the "generic URI" syntax, the scheme- * specific part begins with two slashes ("//") and may be followed * by an authority segment (comprised of user information, host, and @@ -60,8 +61,6 @@ import java.io.Serializable; * default port for a specific scheme). Rather, it only knows the * grammar and basic set of operations that can be applied to a URI. * -* @version -* **********************************************************************/ public class JaxmURI implements Serializable { @@ -1106,6 +1105,7 @@ import java.io.Serializable; * @return true if p_test is a URI with all values equal to this * URI, false otherwise */ + @Override public boolean equals(Object p_test) { if (p_test instanceof JaxmURI) { JaxmURI testURI = (JaxmURI) p_test; @@ -1134,6 +1134,7 @@ import java.io.Serializable; return false; } + @Override public int hashCode() { // No members safe to use, just default to a constant. return 153214; @@ -1144,6 +1145,7 @@ import java.io.Serializable; * * @return the URI string specification */ + @Override public String toString() { StringBuilder uriSpecString = new StringBuilder(); @@ -1173,6 +1175,8 @@ import java.io.Serializable; * A scheme is conformant if it starts with an alphanumeric, and * contains only alphanumerics, '+','-' and '.'. * + * @param p_scheme scheme name + * * @return true if the scheme is conformant, false otherwise */ public static boolean isConformantSchemeName(String p_scheme) { @@ -1202,7 +1206,9 @@ import java.io.Serializable; * IPv4 address consists of four decimal digit groups separated by a * '.'. A hostname consists of domain labels (each of which must * begin and end with an alphanumeric but may contain '-') separated - & by a '.'. See RFC 2396 Section 3.2.2. + * by a '.'. See RFC 2396 Section 3.2.2. + * + * @param p_address address * * @return true if the string is a syntactically valid IPv4 address * or hostname diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java index cac1817e59f..cffc2c4d806 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -89,11 +89,13 @@ public class NamespaceContextIterator implements Iterator { } } + @Override public boolean hasNext() { findNext(); return next != null; } + @Override public Object next() { return getNext(); } @@ -112,6 +114,7 @@ public class NamespaceContextIterator implements Iterator { return last; } + @Override public void remove() { if (last == null) { throw new IllegalStateException(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java index 5d3c2d4e0db..032abd18430 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -40,6 +40,10 @@ public class ParseUtil { * Returns a new String constructed from the specified String by replacing * the URL escape sequences and UTF8 encoding with the characters they * represent. + * + * @param s string + * + * @return decoded string */ public static String decode(String s) { StringBuilder sb = new StringBuilder(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java index b9c503c9f7f..9cfa57e00ee 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -45,8 +45,11 @@ public class ParserPool { public ParserPool(int capacity) { queue = new ArrayBlockingQueue(capacity); - //factory = SAXParserFactory.newInstance(); - factory = new com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl(); + factory = SAXParserFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl", SAAJUtil.getSystemClassLoader()); + try { + factory.setFeature("jdk.xml.resetSymbolTable", true); + } catch(SAXException | ParserConfigurationException e) { + } factory.setNamespaceAware(true); for (int i = 0; i < capacity; i++) { try { @@ -79,30 +82,7 @@ public class ParserPool { public void returnParser(SAXParser saxParser) { saxParser.reset(); - resetSaxParser(saxParser); put(saxParser); } - - /** - * SAAJ Issue 46 :https://saaj.dev.java.net/issues/show_bug.cgi?id=46 - * Xerces does not provide a way to reset the SymbolTable - * So we are trying to reset it using the proprietary code below. - * Temporary Until the bug : https://jaxp.dev.java.net/issues/show_bug.cgi?id=59 - * is fixed. - * @param parser the parser from the pool whose Symbol Table needs to be reset. - */ - private void resetSaxParser(SAXParser parser) { - try { - //Object obj = parser.getProperty("http://apache.org/xml/properties/internal/symbol-table"); - com.sun.org.apache.xerces.internal.util.SymbolTable table = new com.sun.org.apache.xerces.internal.util.SymbolTable(); - parser.setProperty("http://apache.org/xml/properties/internal/symbol-table", table); - //obj = parser.getProperty("http://apache.org/xml/properties/internal/symbol-table"); - } catch (SAXNotRecognizedException ex) { - //nothing to do - } catch (SAXNotSupportedException ex) { - //nothing to do - } - } - } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java index 649e206e3a5..e56fee4d102 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -96,6 +96,7 @@ public class RejectDoctypeSaxFilter extends XMLFilterImpl implements XMLReader, * Override setProperty() to capture any LexicalHandler that is set for * forwarding of events. */ + @Override public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { if (LEXICAL_HANDLER_PROP.equals(name)) { @@ -109,38 +110,45 @@ public class RejectDoctypeSaxFilter extends XMLFilterImpl implements XMLReader, // Beginning of SAX LexicalHandler callbacks... // + @Override public void startDTD(String name, String publicId, String systemId) throws SAXException { throw new SAXException("Document Type Declaration is not allowed"); } + @Override public void endDTD() throws SAXException { } + @Override public void startEntity(String name) throws SAXException { if (lexicalHandler != null) { lexicalHandler.startEntity(name); } } + @Override public void endEntity(String name) throws SAXException { if (lexicalHandler != null) { lexicalHandler.endEntity(name); } } + @Override public void startCDATA() throws SAXException { if (lexicalHandler != null) { lexicalHandler.startCDATA(); } } + @Override public void endCDATA() throws SAXException { if (lexicalHandler != null) { lexicalHandler.endCDATA(); } } + @Override public void comment(char[] ch, int start, int length) throws SAXException { if (lexicalHandler != null) { lexicalHandler.comment(ch, start, length); @@ -151,6 +159,7 @@ public class RejectDoctypeSaxFilter extends XMLFilterImpl implements XMLReader, // End of SAX LexicalHandler callbacks // + @Override public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException{ if(atts != null ){ diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java index 7f9cdc40a98..eafc1863f80 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, 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 @@ -26,6 +26,8 @@ package com.sun.xml.internal.messaging.saaj.util; import java.security.AccessControlException; +import java.security.AccessController; +import java.security.PrivilegedAction; /** * @@ -48,4 +50,13 @@ public final class SAAJUtil { return null; } } + + public static ClassLoader getSystemClassLoader() { + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + return ClassLoader.getSystemClassLoader(); + } + }); + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java index bbb4c832327..563f38d8c73 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,44 +46,53 @@ public class TeeInputStream extends InputStream { this.source = source; } + @Override public int read() throws IOException { int result = source.read(); copySink.write(result); return result; } + @Override public int available() throws IOException { return source.available(); } + @Override public void close() throws IOException { source.close(); } + @Override public synchronized void mark(int readlimit) { source.mark(readlimit); } + @Override public boolean markSupported() { return source.markSupported(); } + @Override public int read(byte[] b, int off, int len) throws IOException { int result = source.read(b, off, len); copySink.write(b, off, len); return result; } + @Override public int read(byte[] b) throws IOException { int result = source.read(b); copySink.write(b); return result; } + @Override public synchronized void reset() throws IOException { source.reset(); } + @Override public long skip(long n) throws IOException { return source.skip(n); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/LazyEnvelopeStaxReader.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/LazyEnvelopeStaxReader.java index c8765a4667c..1bf8da3572d 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/LazyEnvelopeStaxReader.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/LazyEnvelopeStaxReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -59,11 +59,13 @@ public class LazyEnvelopeStaxReader extends com.sun.xml.internal.org.jvnet.staxe } } + @Override public Object getProperty(String name) throws IllegalArgumentException { if (usePayloadReaderDelegate) return payloadReader.getProperty(name); return super.getProperty(name); } + @Override public int next() throws XMLStreamException { // boolean previouslyUsingPayloadReader = usePayloadReaderDelegate; //call checkReaderStatus to advance to payloadReader if needed @@ -78,22 +80,26 @@ public class LazyEnvelopeStaxReader extends com.sun.xml.internal.org.jvnet.staxe return getEventType(); } + @Override public void require(int type, String namespaceURI, String localName) throws XMLStreamException { if (usePayloadReaderDelegate) payloadReader.require(type, namespaceURI, localName); else super.require(type, namespaceURI, localName); } + @Override public String getElementText() throws XMLStreamException { if (usePayloadReaderDelegate) return payloadReader.getElementText(); return super.getElementText(); } + @Override public int nextTag() throws XMLStreamException { if (usePayloadReaderDelegate) return payloadReader.nextTag(); return super.nextTag(); } + @Override public boolean hasNext() throws XMLStreamException { checkReaderStatus(false); boolean hasNext; @@ -139,116 +145,139 @@ public class LazyEnvelopeStaxReader extends com.sun.xml.internal.org.jvnet.staxe } } + @Override public void close() throws XMLStreamException { if (usePayloadReaderDelegate) payloadReader.close(); else super.close(); } + @Override public String getNamespaceURI(String prefix) { if (usePayloadReaderDelegate) return payloadReader.getNamespaceURI(prefix); return super.getNamespaceURI(prefix); } + @Override public boolean isStartElement() { if (usePayloadReaderDelegate) return payloadReader.isStartElement(); return super.isStartElement(); } + @Override public boolean isEndElement() { if (usePayloadReaderDelegate) return payloadReader.isEndElement(); return super.isEndElement(); } + @Override public boolean isCharacters() { if (usePayloadReaderDelegate) return payloadReader.isCharacters(); return super.isEndElement(); } + @Override public boolean isWhiteSpace() { if (usePayloadReaderDelegate) return payloadReader.isWhiteSpace(); return super.isWhiteSpace(); } + @Override public String getAttributeValue(String namespaceURI, String localName) { if (usePayloadReaderDelegate) return payloadReader.getAttributeValue(namespaceURI, localName); return super.getAttributeValue(namespaceURI, localName); } + @Override public int getAttributeCount() { if (usePayloadReaderDelegate) return payloadReader.getAttributeCount(); return super.getAttributeCount(); } + @Override public QName getAttributeName(int index) { if (usePayloadReaderDelegate) return payloadReader.getAttributeName(index); return super.getAttributeName(index); } + @Override public String getAttributeNamespace(int index) { if (usePayloadReaderDelegate) return payloadReader.getAttributeNamespace(index); return super.getAttributeNamespace(index); } + @Override public String getAttributeLocalName(int index) { if (usePayloadReaderDelegate) return payloadReader.getAttributeLocalName(index); return super.getAttributeLocalName(index); } + @Override public String getAttributePrefix(int index) { if (usePayloadReaderDelegate) return payloadReader.getAttributePrefix(index); return super.getAttributePrefix(index); } + @Override public String getAttributeType(int index) { if (usePayloadReaderDelegate) return payloadReader.getAttributeType(index); return super.getAttributeType(index); } + @Override public String getAttributeValue(int index) { if (usePayloadReaderDelegate) return payloadReader.getAttributeValue(index); return super.getAttributeValue(index); } + @Override public boolean isAttributeSpecified(int index) { if (usePayloadReaderDelegate) return payloadReader.isAttributeSpecified(index); return super.isAttributeSpecified(index); } + @Override public int getNamespaceCount() { if (usePayloadReaderDelegate) return payloadReader.getNamespaceCount(); return super.getNamespaceCount(); } + @Override public String getNamespacePrefix(int index) { if (usePayloadReaderDelegate) return payloadReader.getNamespacePrefix(index); return super.getNamespacePrefix(index); } + @Override public String getNamespaceURI(int index) { if (usePayloadReaderDelegate) return payloadReader.getNamespaceURI(index); return super.getNamespaceURI(index); } + @Override public NamespaceContext getNamespaceContext() { if (usePayloadReaderDelegate) return payloadReader.getNamespaceContext(); return super.getNamespaceContext(); } + @Override public int getEventType() { if (usePayloadReaderDelegate) return payloadReader.getEventType(); return super.getEventType(); } + @Override public String getText() { if (usePayloadReaderDelegate) return payloadReader.getText(); return super.getText(); } + @Override public char[] getTextCharacters() { if (usePayloadReaderDelegate) return payloadReader.getTextCharacters(); return super.getTextCharacters(); } + @Override public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException { if (usePayloadReaderDelegate) return payloadReader.getTextCharacters(sourceStart, target, targetStart, @@ -256,81 +285,97 @@ public class LazyEnvelopeStaxReader extends com.sun.xml.internal.org.jvnet.staxe return super.getTextCharacters(sourceStart, target, targetStart, length); } + @Override public int getTextStart() { if (usePayloadReaderDelegate) return payloadReader.getTextStart(); return super.getTextStart(); } + @Override public int getTextLength() { if (usePayloadReaderDelegate) return payloadReader.getTextLength(); return super.getTextLength(); } + @Override public String getEncoding() { if (usePayloadReaderDelegate) return payloadReader.getEncoding(); return super.getEncoding(); } + @Override public boolean hasText() { if (usePayloadReaderDelegate) return payloadReader.hasText(); return super.hasText(); } + @Override public Location getLocation() { if (usePayloadReaderDelegate) return payloadReader.getLocation(); return super.getLocation(); } + @Override public QName getName() { if (usePayloadReaderDelegate) return payloadReader.getName(); return super.getName(); } + @Override public String getLocalName() { if (usePayloadReaderDelegate) return payloadReader.getLocalName(); return super.getLocalName(); } + @Override public boolean hasName() { if (usePayloadReaderDelegate) return payloadReader.hasName(); return super.hasName(); } + @Override public String getNamespaceURI() { if (usePayloadReaderDelegate) return payloadReader.getNamespaceURI(); return super.getNamespaceURI(); } + @Override public String getPrefix() { if (usePayloadReaderDelegate) return payloadReader.getPrefix(); return super.getPrefix(); } + @Override public String getVersion() { if (usePayloadReaderDelegate) return payloadReader.getVersion(); return super.getVersion(); } + @Override public boolean isStandalone() { if (usePayloadReaderDelegate) return payloadReader.isStandalone(); return super.isStandalone(); } + @Override public boolean standaloneSet() { if (usePayloadReaderDelegate) return payloadReader.standaloneSet(); return super.standaloneSet(); } + @Override public String getCharacterEncodingScheme() { if (usePayloadReaderDelegate) return payloadReader.getCharacterEncodingScheme(); return super.getCharacterEncodingScheme(); } + @Override public String getPITarget() { if (usePayloadReaderDelegate) return payloadReader.getPITarget(); return super.getPITarget(); } + @Override public String getPIData() { if (usePayloadReaderDelegate) return payloadReader.getPIData(); return super.getPIData(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java index a53cb79a7a1..ce9c1755f4b 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java @@ -335,24 +335,30 @@ public class SaajStaxWriter implements XMLStreamWriter { @Override public NamespaceContext getNamespaceContext() { return new NamespaceContext() { + @Override public String getNamespaceURI(final String prefix) { return currentElement.getNamespaceURI(prefix); } + @Override public String getPrefix(final String namespaceURI) { return currentElement.lookupPrefix(namespaceURI); } + @Override public Iterator getPrefixes(final String namespaceURI) { return new Iterator() { String prefix = getPrefix(namespaceURI); + @Override public boolean hasNext() { return (prefix != null); } + @Override public String next() { if (!hasNext()) throw new java.util.NoSuchElementException(); String next = prefix; prefix = null; return next; } + @Override public void remove() {} }; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java index 4048b296a48..b5745dc98d4 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -67,6 +67,7 @@ public class SaajStaxWriterEx extends SaajStaxWriter implements XMLStreamWriterE super(msg, uri); } + @Override public void writeStartElement(String prefix, String ln, String ns) throws XMLStreamException { if (xopNS.equals(ns) && Include.equals(ln)) { state = State.xopInclude; @@ -108,31 +109,41 @@ public class SaajStaxWriterEx extends SaajStaxWriter implements XMLStreamWriterE @Override public NamespaceContextEx getNamespaceContext() { return new NamespaceContextEx() { + @Override public String getNamespaceURI(String prefix) { return currentElement.getNamespaceURI(prefix); } + @Override public String getPrefix(String namespaceURI) { return currentElement.lookupPrefix(namespaceURI); } + @Override public Iterator getPrefixes(final String namespaceURI) { return new Iterator() { String prefix = getPrefix(namespaceURI); + @Override public boolean hasNext() { return (prefix != null); } + @Override public String next() { if (prefix == null) throw new java.util.NoSuchElementException(); String next = prefix; prefix = null; return next; } + @Override public void remove() {} }; } + @Override public Iterator iterator() { return new Iterator() { + @Override public boolean hasNext() { return false; } + @Override public Binding next() { return null; } + @Override public void remove() {} }; } @@ -208,6 +219,7 @@ public class SaajStaxWriterEx extends SaajStaxWriter implements XMLStreamWriterE return hrefOrCid; } + @Override public AttachmentMarshaller getAttachmentMarshaller() { return new AttachmentMarshaller() { @Override diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java index e11fb63f15d..94f4f3d67cf 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -107,11 +107,13 @@ public class EfficientStreamingTransformer } } + @Override public void clearParameters() { if (m_realTransformer != null) m_realTransformer.clearParameters(); } + @Override public javax.xml.transform.ErrorListener getErrorListener() { try { materialize(); @@ -122,6 +124,7 @@ public class EfficientStreamingTransformer return null; } + @Override public java.util.Properties getOutputProperties() { try { materialize(); @@ -132,6 +135,7 @@ public class EfficientStreamingTransformer return null; } + @Override public String getOutputProperty(String str) throws java.lang.IllegalArgumentException { try { @@ -143,6 +147,7 @@ public class EfficientStreamingTransformer return null; } + @Override public Object getParameter(String str) { try { materialize(); @@ -153,6 +158,7 @@ public class EfficientStreamingTransformer return null; } + @Override public javax.xml.transform.URIResolver getURIResolver() { try { materialize(); @@ -163,6 +169,7 @@ public class EfficientStreamingTransformer return null; } + @Override public void setErrorListener( javax.xml.transform.ErrorListener errorListener) throws java.lang.IllegalArgumentException { @@ -174,6 +181,7 @@ public class EfficientStreamingTransformer } } + @Override public void setOutputProperties(java.util.Properties properties) throws java.lang.IllegalArgumentException { try { @@ -184,6 +192,7 @@ public class EfficientStreamingTransformer } } + @Override public void setOutputProperty(String str, String str1) throws java.lang.IllegalArgumentException { try { @@ -194,6 +203,7 @@ public class EfficientStreamingTransformer } } + @Override public void setParameter(String str, Object obj) { try { materialize(); @@ -203,6 +213,7 @@ public class EfficientStreamingTransformer } } + @Override public void setURIResolver(javax.xml.transform.URIResolver uRIResolver) { try { materialize(); @@ -272,6 +283,7 @@ public class EfficientStreamingTransformer //------------------------------------------------------------------------ + @Override public void transform( javax.xml.transform.Source source, javax.xml.transform.Result result) @@ -409,6 +421,8 @@ public class EfficientStreamingTransformer * Return Transformer instance for this thread, allocating a new one if * necessary. Note that this method does not clear global parameters, * properties or any other data set on a previously used transformer. + * + * @return Transformer instance */ public static Transformer newTransformer() { //CR : 6813167 diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java index e1f39b91ea9..6321da30dcb 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java @@ -26,6 +26,7 @@ package com.sun.xml.internal.ws.addressing; import com.sun.xml.internal.ws.api.server.*; +import com.sun.xml.internal.ws.api.server.Module; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java index 220dd8ea343..db5defcbfd8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,6 +25,18 @@ package com.sun.xml.internal.ws.api.message.saaj; +import com.sun.xml.internal.ws.api.SOAPVersion; +import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.message.Header; +import com.sun.xml.internal.ws.api.message.MessageHeaders; +import com.sun.xml.internal.ws.binding.SOAPBindingImpl; +import com.sun.xml.internal.ws.message.saaj.SAAJHeader; + +import javax.xml.namespace.QName; +import javax.xml.soap.SOAPException; +import javax.xml.soap.SOAPHeader; +import javax.xml.soap.SOAPHeaderElement; +import javax.xml.soap.SOAPMessage; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -34,19 +46,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.xml.namespace.QName; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPHeader; -import javax.xml.soap.SOAPHeaderElement; -import javax.xml.soap.SOAPMessage; - -import com.sun.xml.internal.ws.api.SOAPVersion; -import com.sun.xml.internal.ws.api.WSBinding; -import com.sun.xml.internal.ws.api.message.Header; -import com.sun.xml.internal.ws.api.message.MessageHeaders; -import com.sun.xml.internal.ws.binding.SOAPBindingImpl; -import com.sun.xml.internal.ws.message.saaj.SAAJHeader; - public class SAAJMessageHeaders implements MessageHeaders { SOAPMessage sm; Map nonSAAJHeaders; @@ -330,7 +329,7 @@ public class SAAJMessageHeaders implements MessageHeaders { private void addNonSAAJHeader(SOAPHeaderElement headerElem, Header header) { if (nonSAAJHeaders == null) { - nonSAAJHeaders = new HashMap(); + nonSAAJHeaders = new HashMap<>(); } nonSAAJHeaders.put(headerElem, header); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/ThreadHelper.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/ThreadHelper.java index 25e0462c3bb..12fbb26e8bd 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/ThreadHelper.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/ThreadHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -68,9 +68,7 @@ final class ThreadHelper { Class cls = Class.forName(SAFE_THREAD_NAME); Constructor ctr = cls.getConstructor(Runnable.class); return new SunMiscThreadFactory(ctr); - } catch (ClassNotFoundException ignored) { - } catch (NoSuchMethodException ignored) { - } + } catch (ClassNotFoundException | NoSuchMethodException ignored) {} return new LegacyThreadFactory(); } } @@ -90,7 +88,9 @@ final class ThreadHelper { try { return ctr.newInstance(null, r, "toBeReplaced", 0, false); } catch (ReflectiveOperationException x) { - throw new InternalError(x); + InternalError ie = new InternalError(x.getMessage()); + ie.initCause(ie); + throw ie; } } } @@ -99,7 +99,7 @@ final class ThreadHelper { private static class SunMiscThreadFactory implements ThreadFactory { final Constructor ctr; SunMiscThreadFactory(Constructor ctr) { this.ctr = ctr; } - @Override public Thread newThread(Runnable r) { + @Override public Thread newThread(final Runnable r) { return AccessController.doPrivileged( new PrivilegedAction() { @Override diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/MethodUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/MethodUtil.java index c8497055678..b976434a7bd 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/MethodUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/MethodUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -31,7 +31,7 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks + * Utility class to invoke com.sun.xml.internal.ws.util.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks * to java.lang,reflect.Method.invoke() * * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! @@ -39,43 +39,17 @@ import java.util.logging.Logger; class MethodUtil { private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); - private static final Method INVOKE_METHOD; - - static { - Method method; - try { - Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); - method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); - } - } catch (Throwable t) { - method = null; - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); - } - } - INVOKE_METHOD = method; - } static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { - if (INVOKE_METHOD != null) { - // sun.reflect.misc.MethodUtil.invoke(method, owner, args) - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); - } - try { - return INVOKE_METHOD.invoke(null, method, target, args); - } catch (InvocationTargetException ite) { - // unwrap invocation exception added by reflection code ... - throw unwrapException(ite); - } - } else { - // other then Oracle JDK ... - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); - } - return method.invoke(target, args); + // com.sun.xml.internal.ws.util.MethodUtil.invoke(method, owner, args) + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Invoking method using com.sun.xml.internal.ws.util.MethodUtil"); + } + try { + return com.sun.xml.internal.ws.util.MethodUtil.invoke(method, target, args); + } catch (InvocationTargetException ite) { + // unwrap invocation exception added by reflection code ... + throw unwrapException(ite); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java index 0c774aa0308..02d22f134f8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -26,15 +26,16 @@ package com.sun.xml.internal.ws.api.server; import com.sun.xml.internal.stream.buffer.XMLStreamBuffer; +import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import com.sun.xml.internal.ws.server.ServerRtException; import com.sun.xml.internal.ws.streaming.TidyXMLStreamReader; -import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.IOException; import java.io.InputStream; +import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; @@ -42,7 +43,7 @@ import java.net.URL; * SPI that provides the source of {@link SDDocument}. * *

    - * This abstract class could be implemented by appliations, or one of the + * This abstract class could be implemented by applications, or one of the * {@link #create} methods can be used. * * @author Kohsuke Kawaguchi @@ -85,28 +86,44 @@ public abstract class SDDocumentSource { /** * System ID of this document. + * @return */ public abstract URL getSystemId(); + public static SDDocumentSource create(final Class implClass, final String wsdlLocation) { + ClassLoader cl = implClass.getClassLoader(); + URL url = cl.getResource(wsdlLocation); + if (url != null) { + return create(url); + } else { + return create(wsdlLocation, implClass); + } + } + /** * Creates {@link SDDocumentSource} from an URL. + * @param url + * @return */ public static SDDocumentSource create(final URL url) { return new SDDocumentSource() { private final URL systemId = url; + @Override public XMLStreamReader read(XMLInputFactory xif) throws IOException, XMLStreamException { InputStream is = url.openStream(); return new TidyXMLStreamReader( xif.createXMLStreamReader(systemId.toExternalForm(),is), is); } + @Override public XMLStreamReader read() throws IOException, XMLStreamException { InputStream is = url.openStream(); return new TidyXMLStreamReader( XMLStreamReaderFactory.create(systemId.toExternalForm(),is,false), is); } + @Override public URL getSystemId() { return systemId; } @@ -120,19 +137,22 @@ public abstract class SDDocumentSource { * @param resolvingClass class used to read resource * @param path resource path */ - public static SDDocumentSource create(final Class resolvingClass, final String path) { + private static SDDocumentSource create(final String path, final Class resolvingClass) { return new SDDocumentSource() { + @Override public XMLStreamReader read(XMLInputFactory xif) throws IOException, XMLStreamException { InputStream is = inputStream(); return new TidyXMLStreamReader(xif.createXMLStreamReader(path,is), is); } + @Override public XMLStreamReader read() throws IOException, XMLStreamException { InputStream is = inputStream(); return new TidyXMLStreamReader(XMLStreamReaderFactory.create(path,is,false), is); } + @Override public URL getSystemId() { try { return new URL("file://" + path); @@ -142,12 +162,10 @@ public abstract class SDDocumentSource { } private InputStream inputStream() throws IOException { - java.lang.reflect.Module module = resolvingClass.getModule(); - if (module != null) { - InputStream stream = module.getResourceAsStream(path); - if (stream != null) { - return stream; - } + java.lang.Module module = resolvingClass.getModule(); + InputStream stream = module.getResourceAsStream(path); + if (stream != null) { + return stream; } throw new ServerRtException("cannot.load.wsdl", path); } @@ -157,17 +175,23 @@ public abstract class SDDocumentSource { /** * Creates a {@link SDDocumentSource} from {@link XMLStreamBuffer}. + * @param systemId + * @param xsb + * @return */ public static SDDocumentSource create(final URL systemId, final XMLStreamBuffer xsb) { return new SDDocumentSource() { + @Override public XMLStreamReader read(XMLInputFactory xif) throws XMLStreamException { return xsb.readAsXMLStreamReader(); } + @Override public XMLStreamReader read() throws XMLStreamException { return xsb.readAsXMLStreamReader(); } + @Override public URL getSystemId() { return systemId; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java index d62cb623a86..6c76e261341 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java @@ -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 @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.api.streaming; +import com.sun.xml.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java index 68cccd1611c..9aab8d71600 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,6 +28,7 @@ package com.sun.xml.internal.ws.api.streaming; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.streaming.XMLReaderException; +import com.sun.xml.internal.ws.util.MrJarUtil; import com.sun.xml.internal.ws.util.xml.XmlUtil; import org.xml.sax.InputSource; @@ -79,7 +80,7 @@ public abstract class XMLStreamReaderFactory { // this system property can be used to disable the pooling altogether, // in case someone hits an issue with pooling in the production system. - if(!getProperty(XMLStreamReaderFactory.class.getName()+".noPool")) { + if(!MrJarUtil.getNoPoolProperty(XMLStreamReaderFactory.class.getName())) { f = Zephyr.newInstance(xif); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java index fa52778a9f1..2b34c2c6808 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -30,6 +30,7 @@ import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.encoding.HasEncoding; import com.sun.xml.internal.ws.encoding.SOAPBindingCodec; import com.sun.xml.internal.ws.streaming.XMLReaderException; +import com.sun.xml.internal.ws.util.MrJarUtil; import com.sun.xml.internal.ws.util.xml.XMLStreamWriterFilter; import javax.xml.stream.XMLOutputFactory; @@ -85,7 +86,7 @@ public abstract class XMLStreamWriterFactory { // this system property can be used to disable the pooling altogether, // in case someone hits an issue with pooling in the production system. - if (!Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".noPool")) { + if (!MrJarUtil.getNoPoolProperty(XMLStreamWriterFactory.class.getName())) { try { Class clazz = xof.createXMLStreamWriter(new StringWriter()).getClass(); if (clazz.getName().startsWith("com.sun.xml.internal.stream.")) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/BindingImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/BindingImpl.java index 927fad4d4b0..536e388a4e8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/BindingImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/BindingImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -75,7 +75,7 @@ public abstract class BindingImpl implements WSBinding { //This is reset when ever Binding.setHandlerChain() or SOAPBinding.setRoles() is called. private HandlerConfiguration handlerConfig; private final Set addedHeaders = new HashSet(); - private final Set knownHeaders = new HashSet(); + private final Set knownHeaders = Collections.synchronizedSet(new HashSet()); private final Set unmodKnownHeaders = Collections.unmodifiableSet(knownHeaders); private final BindingID bindingId; // Features that are set(enabled/disabled) on the binding diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java index 292ed73c135..f61114eb632 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -42,6 +42,8 @@ import javax.xml.ws.handler.Handler; import javax.xml.ws.soap.MTOMFeature; import javax.xml.ws.soap.SOAPBinding; import java.util.*; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; /** * @author WS Development Team @@ -57,6 +59,7 @@ public final class SOAPBindingImpl extends BindingImpl implements SOAPBinding { private Set portKnownHeaders = Collections.emptySet(); private Set bindingUnderstoodHeaders = new HashSet(); + private final Lock lock = new ReentrantLock(); /** * Use {@link BindingImpl#create(BindingID)} to create this. @@ -95,7 +98,13 @@ public final class SOAPBindingImpl extends BindingImpl implements SOAPBinding { * @param headers SOAP header names */ public void setPortKnownHeaders(@NotNull Set headers) { - this.portKnownHeaders = headers; + + try{ + lock.lock(); + this.portKnownHeaders = headers; + } finally { + lock.unlock(); + } } /** diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java index f0daea51faf..9194ce4ddd0 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -31,7 +31,7 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks + * Utility class to invoke com.sun.xml.internal.ws.util.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks * to java.lang,reflect.Method.invoke() *

    * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! @@ -39,43 +39,17 @@ import java.util.logging.Logger; class MethodUtil { private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); - private static final Method INVOKE_METHOD; - - static { - Method method; - try { - Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); - method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); - } - } catch (Throwable t) { - method = null; - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); - } - } - INVOKE_METHOD = method; - } static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { - if (INVOKE_METHOD != null) { - // sun.reflect.misc.MethodUtil.invoke(method, owner, args) - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); - } - try { - return INVOKE_METHOD.invoke(null, method, target, args); - } catch (InvocationTargetException ite) { - // unwrap invocation exception added by reflection code ... - throw unwrapException(ite); - } - } else { - // other then Oracle JDK ... - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); - } - return method.invoke(target, args); + // com.sun.xml.internal.ws.util.MethodUtil.invoke(method, owner, args) + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Invoking method using com.sun.xml.internal.ws.util.MethodUtil"); + } + try { + return com.sun.xml.internal.ws.util.MethodUtil.invoke(method, target, args); + } catch (InvocationTargetException ite) { + // unwrap invocation exception added by reflection code ... + throw unwrapException(ite); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java index 63809b00875..7ae8158bbf8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java @@ -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 @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.commons.xmlutil; +import com.sun.xml.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java index e7d0050e775..957607e8cae 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java @@ -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 @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.developer; +import com.sun.xml.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/Injector.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/Injector.java index 158e0a9f8ef..adbcb7967bf 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/Injector.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/Injector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2014, 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 @@ -25,12 +25,16 @@ package com.sun.xml.internal.ws.model; +import java.lang.reflect.Field; import javax.xml.ws.WebServiceException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; +import java.security.ProtectionDomain; import java.util.logging.Level; import java.util.logging.Logger; @@ -44,31 +48,68 @@ final class Injector { private static final Logger LOGGER = Logger.getLogger(Injector.class.getName()); - private static final Method defineClass; - private static final Method resolveClass; - private static final Method getPackage; - private static final Method definePackage; + private static Method defineClass; + private static Method resolveClass; + private static Method getPackage; + private static Method definePackage; + private static Object U; static { - Method[] m = AccessController.doPrivileged( - new PrivilegedAction() { - @Override - public Method[] run() { - return new Method[]{ - getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE), - getMethod(ClassLoader.class, "resolveClass", Class.class), - getMethod(ClassLoader.class, "getPackage", String.class), - getMethod(ClassLoader.class, "definePackage", - String.class, String.class, String.class, String.class, - String.class, String.class, String.class, URL.class) - }; - } + try { + Method[] m = AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public Method[] run() { + return new Method[]{ + getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE), + getMethod(ClassLoader.class, "resolveClass", Class.class), + getMethod(ClassLoader.class, "getPackage", String.class), + getMethod(ClassLoader.class, "definePackage", + String.class, String.class, String.class, String.class, + String.class, String.class, String.class, URL.class) + }; } - ); - defineClass = m[0]; - resolveClass = m[1]; - getPackage = m[2]; - definePackage = m[3]; + } + ); + defineClass = m[0]; + resolveClass = m[1]; + getPackage = m[2]; + definePackage = m[3]; + + } catch (Throwable t) { + try { + U = AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public Object run() throws Exception { + Class u = Class.forName("sun.misc.Unsafe"); + Field theUnsafe = u.getDeclaredField("theUnsafe"); + theUnsafe.setAccessible(true); + return theUnsafe.get(null); + } + }); + defineClass = AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public Method run() throws Exception { + try { + return U.getClass().getMethod("defineClass", + new Class[]{String.class, + byte[].class, + Integer.TYPE, + Integer.TYPE, + ClassLoader.class, + ProtectionDomain.class}); + } catch (NoSuchMethodException | SecurityException ex) { + throw ex; + } + } + }); + } catch (SecurityException | PrivilegedActionException ex) { + Logger.getLogger(Injector.class.getName()).log(Level.SEVERE, null, ex); + WebServiceException we = new WebServiceException(ex); + we.addSuppressed(t); + throw we; + } + } } private static Method getMethod(final Class c, final String methodname, final Class... params) { @@ -91,24 +132,26 @@ final class Injector { // nothing to do } try { + if (definePackage == null) { + return (Class) defineClass.invoke(U, className.replace('/', '.'), image, 0, image.length, cl, Injector.class.getProtectionDomain()); + } int packIndex = className.lastIndexOf('.'); if (packIndex != -1) { String pkgname = className.substring(0, packIndex); // Check if package already loaded. - Package pkg = (Package)getPackage.invoke(cl, pkgname); + Package pkg = (Package) getPackage.invoke(cl, pkgname); if (pkg == null) { definePackage.invoke(cl, pkgname, null, null, null, null, null, null, null); } } - Class c = (Class)defineClass.invoke(cl,className.replace('/','.'),image,0,image.length); + Class c = (Class) defineClass.invoke(cl, className.replace('/', '.'), image, 0, image.length); resolveClass.invoke(cl, c); return c; - } catch (IllegalAccessException e) { - LOGGER.log(Level.FINE,"Unable to inject "+className,e); - throw new WebServiceException(e); - } catch (InvocationTargetException e) { - LOGGER.log(Level.FINE,"Unable to inject "+className,e); + } catch (IllegalAccessException | InvocationTargetException e) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Unable to inject " + className, e); + } throw new WebServiceException(e); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/RuntimeModeler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/RuntimeModeler.java index 29f852ed033..3b2df620a7f 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/RuntimeModeler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/RuntimeModeler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -346,7 +346,6 @@ public class RuntimeModeler { } private boolean noWrapperGen() { - if (Runtime.version().major() >= 9) return true; Object o = config.properties().get(SuppressDocLitWrapperGeneration); return (o!= null && o instanceof Boolean) ? ((Boolean) o) : false; } @@ -1181,7 +1180,7 @@ public class RuntimeModeler { if(p == null) resRpcParams.put(resRpcParams.size()+10000, param); else - resRpcParams.put(param.getIndex(), param); + resRpcParams.put(p.getIndex(), param); } }else{ javaMethod.addParameter(param); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java index 6879a6062dc..4e72aac154b 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -33,6 +33,8 @@ import javax.xml.namespace.QName; import java.util.HashSet; import java.util.Iterator; import java.util.Set; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; /** * Creates SOAP specific RuntimeModel @@ -41,6 +43,8 @@ import java.util.Set; */ public class SOAPSEIModel extends AbstractSEIModelImpl { + private final Lock lock = new ReentrantLock(); + public SOAPSEIModel(WebServiceFeatureList features) { super(features); } @@ -72,15 +76,22 @@ public class SOAPSEIModel extends AbstractSEIModelImpl { public Set getKnownHeaders() { Set headers = new HashSet(); - for (JavaMethodImpl method : getJavaMethods()) { - // fill in request headers - Iterator params = method.getRequestParameters().iterator(); - fillHeaders(params, headers, Mode.IN); + + try{ + lock.lock(); + for (JavaMethodImpl method : getJavaMethods()) { + // fill in request headers + Iterator params = method.getRequestParameters().iterator(); + fillHeaders(params, headers, Mode.IN); // fill in response headers - params = method.getResponseParameters().iterator(); - fillHeaders(params, headers, Mode.OUT); - } + params = method.getResponseParameters().iterator(); + fillHeaders(params, headers, Mode.OUT); + } + }finally + { + lock.unlock(); + } return headers; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java index 1c6f1d6fdbd..a672ba5b294 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,30 +25,28 @@ package com.sun.xml.internal.ws.policy.privateutil; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class LocalizationMessages { - private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.policy.privateutil.Localization"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, LocalizationMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.policy.privateutil.Localization"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new LocalizationMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableWSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON", arg0, arg1); } /** @@ -57,11 +55,11 @@ public final class LocalizationMessages { * */ public static String WSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON(arg0, arg1)); } public static Localizable localizableWSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED(Object arg0) { - return messageFactory.getMessage("WSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED", arg0); } /** @@ -69,11 +67,11 @@ public final class LocalizationMessages { * */ public static String WSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED(Object arg0) { - return localizer.localize(localizableWSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED(arg0)); + return LOCALIZER.localize(localizableWSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED(arg0)); } public static Localizable localizableWSP_0081_UNABLE_TO_INSERT_CHILD(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0081_UNABLE_TO_INSERT_CHILD", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0081_UNABLE_TO_INSERT_CHILD", arg0, arg1); } /** @@ -81,11 +79,11 @@ public final class LocalizationMessages { * */ public static String WSP_0081_UNABLE_TO_INSERT_CHILD(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0081_UNABLE_TO_INSERT_CHILD(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0081_UNABLE_TO_INSERT_CHILD(arg0, arg1)); } public static Localizable localizableWSP_0096_ERROR_WHILE_COMBINE(Object arg0) { - return messageFactory.getMessage("WSP_0096_ERROR_WHILE_COMBINE", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0096_ERROR_WHILE_COMBINE", arg0); } /** @@ -93,11 +91,11 @@ public final class LocalizationMessages { * */ public static String WSP_0096_ERROR_WHILE_COMBINE(Object arg0) { - return localizer.localize(localizableWSP_0096_ERROR_WHILE_COMBINE(arg0)); + return LOCALIZER.localize(localizableWSP_0096_ERROR_WHILE_COMBINE(arg0)); } public static Localizable localizableWSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL(Object arg0) { - return messageFactory.getMessage("WSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL", arg0); } /** @@ -105,11 +103,11 @@ public final class LocalizationMessages { * */ public static String WSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL(Object arg0) { - return localizer.localize(localizableWSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL(arg0)); + return LOCALIZER.localize(localizableWSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL(arg0)); } public static Localizable localizableWSP_0090_UNEXPECTED_ELEMENT(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0090_UNEXPECTED_ELEMENT", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0090_UNEXPECTED_ELEMENT", arg0, arg1); } /** @@ -117,11 +115,11 @@ public final class LocalizationMessages { * */ public static String WSP_0090_UNEXPECTED_ELEMENT(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0090_UNEXPECTED_ELEMENT(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0090_UNEXPECTED_ELEMENT(arg0, arg1)); } public static Localizable localizableWSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL() { - return messageFactory.getMessage("WSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL"); } /** @@ -129,11 +127,11 @@ public final class LocalizationMessages { * */ public static String WSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL() { - return localizer.localize(localizableWSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL()); + return LOCALIZER.localize(localizableWSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL()); } public static Localizable localizableWSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED() { - return messageFactory.getMessage("WSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED"); + return MESSAGE_FACTORY.getMessage("WSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED"); } /** @@ -141,11 +139,11 @@ public final class LocalizationMessages { * */ public static String WSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED() { - return localizer.localize(localizableWSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED()); + return LOCALIZER.localize(localizableWSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED()); } public static Localizable localizableWSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED() { - return messageFactory.getMessage("WSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED"); + return MESSAGE_FACTORY.getMessage("WSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED"); } /** @@ -153,11 +151,11 @@ public final class LocalizationMessages { * */ public static String WSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED() { - return localizer.localize(localizableWSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED()); + return LOCALIZER.localize(localizableWSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED()); } public static Localizable localizableWSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL() { - return messageFactory.getMessage("WSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL"); + return MESSAGE_FACTORY.getMessage("WSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL"); } /** @@ -165,11 +163,11 @@ public final class LocalizationMessages { * */ public static String WSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL() { - return localizer.localize(localizableWSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL()); + return LOCALIZER.localize(localizableWSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL()); } public static Localizable localizableWSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED() { - return messageFactory.getMessage("WSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED"); + return MESSAGE_FACTORY.getMessage("WSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED"); } /** @@ -177,11 +175,11 @@ public final class LocalizationMessages { * */ public static String WSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED() { - return localizer.localize(localizableWSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED()); + return LOCALIZER.localize(localizableWSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED()); } public static Localizable localizableWSP_0061_METHOD_INVOCATION_FAILED(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("WSP_0061_METHOD_INVOCATION_FAILED", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("WSP_0061_METHOD_INVOCATION_FAILED", arg0, arg1, arg2); } /** @@ -189,11 +187,11 @@ public final class LocalizationMessages { * */ public static String WSP_0061_METHOD_INVOCATION_FAILED(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableWSP_0061_METHOD_INVOCATION_FAILED(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableWSP_0061_METHOD_INVOCATION_FAILED(arg0, arg1, arg2)); } public static Localizable localizableWSP_0048_POLICY_ELEMENT_EXPECTED_FIRST() { - return messageFactory.getMessage("WSP_0048_POLICY_ELEMENT_EXPECTED_FIRST"); + return MESSAGE_FACTORY.getMessage("WSP_0048_POLICY_ELEMENT_EXPECTED_FIRST"); } /** @@ -201,11 +199,11 @@ public final class LocalizationMessages { * */ public static String WSP_0048_POLICY_ELEMENT_EXPECTED_FIRST() { - return localizer.localize(localizableWSP_0048_POLICY_ELEMENT_EXPECTED_FIRST()); + return LOCALIZER.localize(localizableWSP_0048_POLICY_ELEMENT_EXPECTED_FIRST()); } public static Localizable localizableWSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION() { - return messageFactory.getMessage("WSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION"); + return MESSAGE_FACTORY.getMessage("WSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION"); } /** @@ -213,11 +211,11 @@ public final class LocalizationMessages { * */ public static String WSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION() { - return localizer.localize(localizableWSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION()); + return LOCALIZER.localize(localizableWSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION()); } public static Localizable localizableWSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("WSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("WSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL", arg0, arg1, arg2); } /** @@ -225,11 +223,11 @@ public final class LocalizationMessages { * */ public static String WSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableWSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableWSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL(arg0, arg1, arg2)); } public static Localizable localizableWSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL() { - return messageFactory.getMessage("WSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL"); } /** @@ -237,11 +235,11 @@ public final class LocalizationMessages { * */ public static String WSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL() { - return localizer.localize(localizableWSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL()); + return LOCALIZER.localize(localizableWSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL()); } public static Localizable localizableWSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE(Object arg0) { - return messageFactory.getMessage("WSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE", arg0); } /** @@ -249,11 +247,11 @@ public final class LocalizationMessages { * */ public static String WSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE(Object arg0) { - return localizer.localize(localizableWSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE(arg0)); + return LOCALIZER.localize(localizableWSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE(arg0)); } public static Localizable localizableWSP_0008_UNEXPECTED_CHILD_MODEL_TYPE(Object arg0) { - return messageFactory.getMessage("WSP_0008_UNEXPECTED_CHILD_MODEL_TYPE", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0008_UNEXPECTED_CHILD_MODEL_TYPE", arg0); } /** @@ -261,11 +259,11 @@ public final class LocalizationMessages { * */ public static String WSP_0008_UNEXPECTED_CHILD_MODEL_TYPE(Object arg0) { - return localizer.localize(localizableWSP_0008_UNEXPECTED_CHILD_MODEL_TYPE(arg0)); + return LOCALIZER.localize(localizableWSP_0008_UNEXPECTED_CHILD_MODEL_TYPE(arg0)); } public static Localizable localizableWSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE(Object arg0) { - return messageFactory.getMessage("WSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE", arg0); } /** @@ -273,11 +271,11 @@ public final class LocalizationMessages { * */ public static String WSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE(Object arg0) { - return localizer.localize(localizableWSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE(arg0)); + return LOCALIZER.localize(localizableWSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE(arg0)); } public static Localizable localizableWSP_0091_END_ELEMENT_NO_MATCH(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("WSP_0091_END_ELEMENT_NO_MATCH", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("WSP_0091_END_ELEMENT_NO_MATCH", arg0, arg1, arg2); } /** @@ -285,11 +283,11 @@ public final class LocalizationMessages { * */ public static String WSP_0091_END_ELEMENT_NO_MATCH(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableWSP_0091_END_ELEMENT_NO_MATCH(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableWSP_0091_END_ELEMENT_NO_MATCH(arg0, arg1, arg2)); } public static Localizable localizableWSP_0001_UNSUPPORTED_MODEL_NODE_TYPE(Object arg0) { - return messageFactory.getMessage("WSP_0001_UNSUPPORTED_MODEL_NODE_TYPE", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0001_UNSUPPORTED_MODEL_NODE_TYPE", arg0); } /** @@ -297,11 +295,11 @@ public final class LocalizationMessages { * */ public static String WSP_0001_UNSUPPORTED_MODEL_NODE_TYPE(Object arg0) { - return localizer.localize(localizableWSP_0001_UNSUPPORTED_MODEL_NODE_TYPE(arg0)); + return LOCALIZER.localize(localizableWSP_0001_UNSUPPORTED_MODEL_NODE_TYPE(arg0)); } public static Localizable localizableWSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE() { - return messageFactory.getMessage("WSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE"); + return MESSAGE_FACTORY.getMessage("WSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE"); } /** @@ -309,11 +307,11 @@ public final class LocalizationMessages { * */ public static String WSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE() { - return localizer.localize(localizableWSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE()); + return LOCALIZER.localize(localizableWSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE()); } public static Localizable localizableWSP_0087_UNKNOWN_EVENT(Object arg0) { - return messageFactory.getMessage("WSP_0087_UNKNOWN_EVENT", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0087_UNKNOWN_EVENT", arg0); } /** @@ -321,11 +319,11 @@ public final class LocalizationMessages { * */ public static String WSP_0087_UNKNOWN_EVENT(Object arg0) { - return localizer.localize(localizableWSP_0087_UNKNOWN_EVENT(arg0)); + return LOCALIZER.localize(localizableWSP_0087_UNKNOWN_EVENT(arg0)); } public static Localizable localizableWSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL(Object arg0) { - return messageFactory.getMessage("WSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL", arg0); } /** @@ -333,11 +331,11 @@ public final class LocalizationMessages { * */ public static String WSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL(Object arg0) { - return localizer.localize(localizableWSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL(arg0)); + return LOCALIZER.localize(localizableWSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL(arg0)); } public static Localizable localizableWSP_0032_SERVICE_CAN_NOT_BE_NULL() { - return messageFactory.getMessage("WSP_0032_SERVICE_CAN_NOT_BE_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0032_SERVICE_CAN_NOT_BE_NULL"); } /** @@ -345,11 +343,11 @@ public final class LocalizationMessages { * */ public static String WSP_0032_SERVICE_CAN_NOT_BE_NULL() { - return localizer.localize(localizableWSP_0032_SERVICE_CAN_NOT_BE_NULL()); + return LOCALIZER.localize(localizableWSP_0032_SERVICE_CAN_NOT_BE_NULL()); } public static Localizable localizableWSP_0093_INVALID_URI(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0093_INVALID_URI", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0093_INVALID_URI", arg0, arg1); } /** @@ -357,11 +355,11 @@ public final class LocalizationMessages { * */ public static String WSP_0093_INVALID_URI(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0093_INVALID_URI(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0093_INVALID_URI(arg0, arg1)); } public static Localizable localizableWSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL() { - return messageFactory.getMessage("WSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL"); } /** @@ -369,11 +367,11 @@ public final class LocalizationMessages { * */ public static String WSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL() { - return localizer.localize(localizableWSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL()); + return LOCALIZER.localize(localizableWSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL()); } public static Localizable localizableWSP_0079_ERROR_WHILE_RFC_2396_UNESCAPING(Object arg0) { - return messageFactory.getMessage("WSP_0079_ERROR_WHILE_RFC2396_UNESCAPING", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0079_ERROR_WHILE_RFC2396_UNESCAPING", arg0); } /** @@ -381,11 +379,11 @@ public final class LocalizationMessages { * */ public static String WSP_0079_ERROR_WHILE_RFC_2396_UNESCAPING(Object arg0) { - return localizer.localize(localizableWSP_0079_ERROR_WHILE_RFC_2396_UNESCAPING(arg0)); + return LOCALIZER.localize(localizableWSP_0079_ERROR_WHILE_RFC_2396_UNESCAPING(arg0)); } public static Localizable localizableWSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY() { - return messageFactory.getMessage("WSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY"); + return MESSAGE_FACTORY.getMessage("WSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY"); } /** @@ -393,11 +391,11 @@ public final class LocalizationMessages { * */ public static String WSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY() { - return localizer.localize(localizableWSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY()); + return LOCALIZER.localize(localizableWSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY()); } public static Localizable localizableWSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED() { - return messageFactory.getMessage("WSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED"); + return MESSAGE_FACTORY.getMessage("WSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED"); } /** @@ -405,11 +403,11 @@ public final class LocalizationMessages { * */ public static String WSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED() { - return localizer.localize(localizableWSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED()); + return LOCALIZER.localize(localizableWSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED()); } public static Localizable localizableWSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD() { - return messageFactory.getMessage("WSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD"); + return MESSAGE_FACTORY.getMessage("WSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD"); } /** @@ -417,11 +415,11 @@ public final class LocalizationMessages { * */ public static String WSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD() { - return localizer.localize(localizableWSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD()); + return LOCALIZER.localize(localizableWSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD()); } public static Localizable localizableWSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET() { - return messageFactory.getMessage("WSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET"); + return MESSAGE_FACTORY.getMessage("WSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET"); } /** @@ -429,11 +427,11 @@ public final class LocalizationMessages { * */ public static String WSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET() { - return localizer.localize(localizableWSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET()); + return LOCALIZER.localize(localizableWSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET()); } public static Localizable localizableWSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI() { - return messageFactory.getMessage("WSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI"); + return MESSAGE_FACTORY.getMessage("WSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI"); } /** @@ -441,11 +439,11 @@ public final class LocalizationMessages { * */ public static String WSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI() { - return localizer.localize(localizableWSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI()); + return LOCALIZER.localize(localizableWSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI()); } public static Localizable localizableWSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH", arg0, arg1); } /** @@ -453,11 +451,11 @@ public final class LocalizationMessages { * */ public static String WSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH(arg0, arg1)); } public static Localizable localizableWSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND(Object arg0) { - return messageFactory.getMessage("WSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND", arg0); } /** @@ -465,11 +463,11 @@ public final class LocalizationMessages { * */ public static String WSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND(Object arg0) { - return localizer.localize(localizableWSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND(arg0)); + return LOCALIZER.localize(localizableWSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND(arg0)); } public static Localizable localizableWSP_0086_FAILED_CREATE_READER(Object arg0) { - return messageFactory.getMessage("WSP_0086_FAILED_CREATE_READER", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0086_FAILED_CREATE_READER", arg0); } /** @@ -477,11 +475,11 @@ public final class LocalizationMessages { * */ public static String WSP_0086_FAILED_CREATE_READER(Object arg0) { - return localizer.localize(localizableWSP_0086_FAILED_CREATE_READER(arg0)); + return LOCALIZER.localize(localizableWSP_0086_FAILED_CREATE_READER(arg0)); } public static Localizable localizableWSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI(Object arg0) { - return messageFactory.getMessage("WSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI", arg0); } /** @@ -489,11 +487,11 @@ public final class LocalizationMessages { * */ public static String WSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI(Object arg0) { - return localizer.localize(localizableWSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI(arg0)); + return LOCALIZER.localize(localizableWSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI(arg0)); } public static Localizable localizableWSP_0082_NO_SUBJECT_TYPE() { - return messageFactory.getMessage("WSP_0082_NO_SUBJECT_TYPE"); + return MESSAGE_FACTORY.getMessage("WSP_0082_NO_SUBJECT_TYPE"); } /** @@ -501,11 +499,11 @@ public final class LocalizationMessages { * */ public static String WSP_0082_NO_SUBJECT_TYPE() { - return localizer.localize(localizableWSP_0082_NO_SUBJECT_TYPE()); + return LOCALIZER.localize(localizableWSP_0082_NO_SUBJECT_TYPE()); } public static Localizable localizableWSP_0089_EXPECTED_ELEMENT(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("WSP_0089_EXPECTED_ELEMENT", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("WSP_0089_EXPECTED_ELEMENT", arg0, arg1, arg2); } /** @@ -513,11 +511,11 @@ public final class LocalizationMessages { * */ public static String WSP_0089_EXPECTED_ELEMENT(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableWSP_0089_EXPECTED_ELEMENT(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableWSP_0089_EXPECTED_ELEMENT(arg0, arg1, arg2)); } public static Localizable localizableWSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL() { - return messageFactory.getMessage("WSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL"); } /** @@ -525,11 +523,11 @@ public final class LocalizationMessages { * */ public static String WSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL() { - return localizer.localize(localizableWSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL()); + return LOCALIZER.localize(localizableWSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL()); } public static Localizable localizableWSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1, Object arg2, Object arg3) { - return messageFactory.getMessage("WSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL", arg0, arg1, arg2, arg3); + return MESSAGE_FACTORY.getMessage("WSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL", arg0, arg1, arg2, arg3); } /** @@ -537,11 +535,11 @@ public final class LocalizationMessages { * */ public static String WSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1, Object arg2, Object arg3) { - return localizer.localize(localizableWSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL(arg0, arg1, arg2, arg3)); + return LOCALIZER.localize(localizableWSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL(arg0, arg1, arg2, arg3)); } public static Localizable localizableWSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND() { - return messageFactory.getMessage("WSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND"); + return MESSAGE_FACTORY.getMessage("WSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND"); } /** @@ -549,11 +547,11 @@ public final class LocalizationMessages { * */ public static String WSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND() { - return localizer.localize(localizableWSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND()); + return LOCALIZER.localize(localizableWSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND()); } public static Localizable localizableWSP_0034_REMOVE_OPERATION_NOT_SUPPORTED() { - return messageFactory.getMessage("WSP_0034_REMOVE_OPERATION_NOT_SUPPORTED"); + return MESSAGE_FACTORY.getMessage("WSP_0034_REMOVE_OPERATION_NOT_SUPPORTED"); } /** @@ -561,11 +559,11 @@ public final class LocalizationMessages { * */ public static String WSP_0034_REMOVE_OPERATION_NOT_SUPPORTED() { - return localizer.localize(localizableWSP_0034_REMOVE_OPERATION_NOT_SUPPORTED()); + return LOCALIZER.localize(localizableWSP_0034_REMOVE_OPERATION_NOT_SUPPORTED()); } public static Localizable localizableWSP_0084_MESSAGE_TYPE_NO_MESSAGE() { - return messageFactory.getMessage("WSP_0084_MESSAGE_TYPE_NO_MESSAGE"); + return MESSAGE_FACTORY.getMessage("WSP_0084_MESSAGE_TYPE_NO_MESSAGE"); } /** @@ -573,11 +571,11 @@ public final class LocalizationMessages { * */ public static String WSP_0084_MESSAGE_TYPE_NO_MESSAGE() { - return localizer.localize(localizableWSP_0084_MESSAGE_TYPE_NO_MESSAGE()); + return LOCALIZER.localize(localizableWSP_0084_MESSAGE_TYPE_NO_MESSAGE()); } public static Localizable localizableWSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE(Object arg0) { - return messageFactory.getMessage("WSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE", arg0); } /** @@ -585,11 +583,11 @@ public final class LocalizationMessages { * */ public static String WSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE(Object arg0) { - return localizer.localize(localizableWSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE(arg0)); + return LOCALIZER.localize(localizableWSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE(arg0)); } public static Localizable localizableWSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("WSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("WSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE", arg0, arg1, arg2); } /** @@ -597,11 +595,11 @@ public final class LocalizationMessages { * */ public static String WSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableWSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableWSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE(arg0, arg1, arg2)); } public static Localizable localizableWSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED(Object arg0) { - return messageFactory.getMessage("WSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED", arg0); } /** @@ -609,11 +607,11 @@ public final class LocalizationMessages { * */ public static String WSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED(Object arg0) { - return localizer.localize(localizableWSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED(arg0)); + return LOCALIZER.localize(localizableWSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED(arg0)); } public static Localizable localizableWSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL() { - return messageFactory.getMessage("WSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL"); } /** @@ -621,11 +619,11 @@ public final class LocalizationMessages { * */ public static String WSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL() { - return localizer.localize(localizableWSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL()); + return LOCALIZER.localize(localizableWSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL()); } public static Localizable localizableWSP_0067_ILLEGAL_CFG_FILE_SYNTAX() { - return messageFactory.getMessage("WSP_0067_ILLEGAL_CFG_FILE_SYNTAX"); + return MESSAGE_FACTORY.getMessage("WSP_0067_ILLEGAL_CFG_FILE_SYNTAX"); } /** @@ -633,11 +631,11 @@ public final class LocalizationMessages { * */ public static String WSP_0067_ILLEGAL_CFG_FILE_SYNTAX() { - return localizer.localize(localizableWSP_0067_ILLEGAL_CFG_FILE_SYNTAX()); + return LOCALIZER.localize(localizableWSP_0067_ILLEGAL_CFG_FILE_SYNTAX()); } public static Localizable localizableWSP_0085_MESSAGE_FAULT_NO_NAME() { - return messageFactory.getMessage("WSP_0085_MESSAGE_FAULT_NO_NAME"); + return MESSAGE_FACTORY.getMessage("WSP_0085_MESSAGE_FAULT_NO_NAME"); } /** @@ -645,11 +643,11 @@ public final class LocalizationMessages { * */ public static String WSP_0085_MESSAGE_FAULT_NO_NAME() { - return localizer.localize(localizableWSP_0085_MESSAGE_FAULT_NO_NAME()); + return LOCALIZER.localize(localizableWSP_0085_MESSAGE_FAULT_NO_NAME()); } public static Localizable localizableWSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE(Object arg0) { - return messageFactory.getMessage("WSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE", arg0); } /** @@ -657,11 +655,11 @@ public final class LocalizationMessages { * */ public static String WSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE(Object arg0) { - return localizer.localize(localizableWSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE(arg0)); + return LOCALIZER.localize(localizableWSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE(arg0)); } public static Localizable localizableWSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF(Object arg0) { - return messageFactory.getMessage("WSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF", arg0); } /** @@ -669,11 +667,11 @@ public final class LocalizationMessages { * */ public static String WSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF(Object arg0) { - return localizer.localize(localizableWSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF(arg0)); + return LOCALIZER.localize(localizableWSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF(arg0)); } public static Localizable localizableWSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE() { - return messageFactory.getMessage("WSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE"); + return MESSAGE_FACTORY.getMessage("WSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE"); } /** @@ -681,11 +679,11 @@ public final class LocalizationMessages { * */ public static String WSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE() { - return localizer.localize(localizableWSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE()); + return LOCALIZER.localize(localizableWSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE()); } public static Localizable localizableWSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP() { - return messageFactory.getMessage("WSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP"); + return MESSAGE_FACTORY.getMessage("WSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP"); } /** @@ -693,11 +691,11 @@ public final class LocalizationMessages { * */ public static String WSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP() { - return localizer.localize(localizableWSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP()); + return LOCALIZER.localize(localizableWSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP()); } public static Localizable localizableWSP_0083_MESSAGE_TYPE_NULL() { - return messageFactory.getMessage("WSP_0083_MESSAGE_TYPE_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0083_MESSAGE_TYPE_NULL"); } /** @@ -705,11 +703,11 @@ public final class LocalizationMessages { * */ public static String WSP_0083_MESSAGE_TYPE_NULL() { - return localizer.localize(localizableWSP_0083_MESSAGE_TYPE_NULL()); + return LOCALIZER.localize(localizableWSP_0083_MESSAGE_TYPE_NULL()); } public static Localizable localizableWSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED() { - return messageFactory.getMessage("WSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED"); + return MESSAGE_FACTORY.getMessage("WSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED"); } /** @@ -717,11 +715,11 @@ public final class LocalizationMessages { * */ public static String WSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED() { - return localizer.localize(localizableWSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED()); + return LOCALIZER.localize(localizableWSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED()); } public static Localizable localizableWSP_0025_SPI_FAIL_SERVICE_MSG(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0025_SPI_FAIL_SERVICE_MSG", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0025_SPI_FAIL_SERVICE_MSG", arg0, arg1); } /** @@ -729,11 +727,11 @@ public final class LocalizationMessages { * */ public static String WSP_0025_SPI_FAIL_SERVICE_MSG(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0025_SPI_FAIL_SERVICE_MSG(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0025_SPI_FAIL_SERVICE_MSG(arg0, arg1)); } public static Localizable localizableWSP_0094_INVALID_URN() { - return messageFactory.getMessage("WSP_0094_INVALID_URN"); + return MESSAGE_FACTORY.getMessage("WSP_0094_INVALID_URN"); } /** @@ -741,11 +739,11 @@ public final class LocalizationMessages { * */ public static String WSP_0094_INVALID_URN() { - return localizer.localize(localizableWSP_0094_INVALID_URN()); + return LOCALIZER.localize(localizableWSP_0094_INVALID_URN()); } public static Localizable localizableWSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED() { - return messageFactory.getMessage("WSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED"); + return MESSAGE_FACTORY.getMessage("WSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED"); } /** @@ -753,11 +751,11 @@ public final class LocalizationMessages { * */ public static String WSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED() { - return localizer.localize(localizableWSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED()); + return LOCALIZER.localize(localizableWSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED()); } public static Localizable localizableWSP_0078_ASSERTION_CREATOR_DISCOVERED(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0078_ASSERTION_CREATOR_DISCOVERED", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0078_ASSERTION_CREATOR_DISCOVERED", arg0, arg1); } /** @@ -765,11 +763,11 @@ public final class LocalizationMessages { * */ public static String WSP_0078_ASSERTION_CREATOR_DISCOVERED(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0078_ASSERTION_CREATOR_DISCOVERED(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0078_ASSERTION_CREATOR_DISCOVERED(arg0, arg1)); } public static Localizable localizableWSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT() { - return messageFactory.getMessage("WSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT"); + return MESSAGE_FACTORY.getMessage("WSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT"); } /** @@ -777,11 +775,11 @@ public final class LocalizationMessages { * */ public static String WSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT() { - return localizer.localize(localizableWSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT()); + return LOCALIZER.localize(localizableWSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT()); } public static Localizable localizableWSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL() { - return messageFactory.getMessage("WSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL"); } /** @@ -789,11 +787,11 @@ public final class LocalizationMessages { * */ public static String WSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL() { - return localizer.localize(localizableWSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL()); + return LOCALIZER.localize(localizableWSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL()); } public static Localizable localizableWSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR(Object arg0) { - return messageFactory.getMessage("WSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR", arg0); } /** @@ -801,11 +799,11 @@ public final class LocalizationMessages { * */ public static String WSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR(Object arg0) { - return localizer.localize(localizableWSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR(arg0)); + return LOCALIZER.localize(localizableWSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR(arg0)); } public static Localizable localizableWSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION() { - return messageFactory.getMessage("WSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION"); + return MESSAGE_FACTORY.getMessage("WSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION"); } /** @@ -813,11 +811,11 @@ public final class LocalizationMessages { * */ public static String WSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION() { - return localizer.localize(localizableWSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION()); + return LOCALIZER.localize(localizableWSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION()); } public static Localizable localizableWSP_0027_SERVICE_PROVIDER_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("WSP_0027_SERVICE_PROVIDER_NOT_FOUND", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0027_SERVICE_PROVIDER_NOT_FOUND", arg0); } /** @@ -825,11 +823,11 @@ public final class LocalizationMessages { * */ public static String WSP_0027_SERVICE_PROVIDER_NOT_FOUND(Object arg0) { - return localizer.localize(localizableWSP_0027_SERVICE_PROVIDER_NOT_FOUND(arg0)); + return LOCALIZER.localize(localizableWSP_0027_SERVICE_PROVIDER_NOT_FOUND(arg0)); } public static Localizable localizableWSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED() { - return messageFactory.getMessage("WSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED"); + return MESSAGE_FACTORY.getMessage("WSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED"); } /** @@ -837,11 +835,11 @@ public final class LocalizationMessages { * */ public static String WSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED() { - return localizer.localize(localizableWSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED()); + return LOCALIZER.localize(localizableWSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED()); } public static Localizable localizableWSP_0022_STORAGE_TYPE_NOT_SUPPORTED(Object arg0) { - return messageFactory.getMessage("WSP_0022_STORAGE_TYPE_NOT_SUPPORTED", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0022_STORAGE_TYPE_NOT_SUPPORTED", arg0); } /** @@ -849,11 +847,11 @@ public final class LocalizationMessages { * */ public static String WSP_0022_STORAGE_TYPE_NOT_SUPPORTED(Object arg0) { - return localizer.localize(localizableWSP_0022_STORAGE_TYPE_NOT_SUPPORTED(arg0)); + return LOCALIZER.localize(localizableWSP_0022_STORAGE_TYPE_NOT_SUPPORTED(arg0)); } public static Localizable localizableWSP_0095_INVALID_BOOLEAN_VALUE(Object arg0) { - return messageFactory.getMessage("WSP_0095_INVALID_BOOLEAN_VALUE", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0095_INVALID_BOOLEAN_VALUE", arg0); } /** @@ -861,11 +859,11 @@ public final class LocalizationMessages { * */ public static String WSP_0095_INVALID_BOOLEAN_VALUE(Object arg0) { - return localizer.localize(localizableWSP_0095_INVALID_BOOLEAN_VALUE(arg0)); + return LOCALIZER.localize(localizableWSP_0095_INVALID_BOOLEAN_VALUE(arg0)); } public static Localizable localizableWSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION", arg0, arg1); } /** @@ -873,11 +871,11 @@ public final class LocalizationMessages { * */ public static String WSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION(arg0, arg1)); } public static Localizable localizableWSP_0047_POLICY_IS_NULL_RETURNING() { - return messageFactory.getMessage("WSP_0047_POLICY_IS_NULL_RETURNING"); + return MESSAGE_FACTORY.getMessage("WSP_0047_POLICY_IS_NULL_RETURNING"); } /** @@ -885,11 +883,11 @@ public final class LocalizationMessages { * */ public static String WSP_0047_POLICY_IS_NULL_RETURNING() { - return localizer.localize(localizableWSP_0047_POLICY_IS_NULL_RETURNING()); + return LOCALIZER.localize(localizableWSP_0047_POLICY_IS_NULL_RETURNING()); } public static Localizable localizableWSP_0088_FAILED_PARSE(Object arg0) { - return messageFactory.getMessage("WSP_0088_FAILED_PARSE", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0088_FAILED_PARSE", arg0); } /** @@ -897,11 +895,11 @@ public final class LocalizationMessages { * */ public static String WSP_0088_FAILED_PARSE(Object arg0) { - return localizer.localize(localizableWSP_0088_FAILED_PARSE(arg0)); + return LOCALIZER.localize(localizableWSP_0088_FAILED_PARSE(arg0)); } public static Localizable localizableWSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM(Object arg0) { - return messageFactory.getMessage("WSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM", arg0); } /** @@ -909,11 +907,11 @@ public final class LocalizationMessages { * */ public static String WSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM(Object arg0) { - return localizer.localize(localizableWSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM(arg0)); + return LOCALIZER.localize(localizableWSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM(arg0)); } public static Localizable localizableWSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE", arg0, arg1); } /** @@ -921,11 +919,11 @@ public final class LocalizationMessages { * */ public static String WSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE(arg0, arg1)); } public static Localizable localizableWSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("WSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("WSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG", arg0, arg1, arg2); } /** @@ -933,11 +931,11 @@ public final class LocalizationMessages { * */ public static String WSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableWSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableWSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG(arg0, arg1, arg2)); } public static Localizable localizableWSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED", arg0, arg1); } /** @@ -945,11 +943,11 @@ public final class LocalizationMessages { * */ public static String WSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED(arg0, arg1)); } public static Localizable localizableWSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL() { - return messageFactory.getMessage("WSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL"); } /** @@ -957,11 +955,11 @@ public final class LocalizationMessages { * */ public static String WSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL() { - return localizer.localize(localizableWSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL()); + return LOCALIZER.localize(localizableWSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL()); } public static Localizable localizableWSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE", arg0, arg1, arg2); } /** @@ -969,11 +967,11 @@ public final class LocalizationMessages { * */ public static String WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableWSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableWSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(arg0, arg1, arg2)); } public static Localizable localizableWSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL() { - return messageFactory.getMessage("WSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL"); } /** @@ -981,11 +979,11 @@ public final class LocalizationMessages { * */ public static String WSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL() { - return localizer.localize(localizableWSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL()); + return LOCALIZER.localize(localizableWSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL()); } public static Localizable localizableWSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL", arg0, arg1); } /** @@ -993,11 +991,11 @@ public final class LocalizationMessages { * */ public static String WSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL(arg0, arg1)); } public static Localizable localizableWSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN(Object arg0) { - return messageFactory.getMessage("WSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN", arg0); } /** @@ -1005,11 +1003,11 @@ public final class LocalizationMessages { * */ public static String WSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN(Object arg0) { - return localizer.localize(localizableWSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN(arg0)); + return LOCALIZER.localize(localizableWSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN(arg0)); } public static Localizable localizableWSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT() { - return messageFactory.getMessage("WSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT"); + return MESSAGE_FACTORY.getMessage("WSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT"); } /** @@ -1017,11 +1015,11 @@ public final class LocalizationMessages { * */ public static String WSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT() { - return localizer.localize(localizableWSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT()); + return LOCALIZER.localize(localizableWSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT()); } public static Localizable localizableWSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED(Object arg0) { - return messageFactory.getMessage("WSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED", arg0); } /** @@ -1029,11 +1027,11 @@ public final class LocalizationMessages { * */ public static String WSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED(Object arg0) { - return localizer.localize(localizableWSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED(arg0)); + return LOCALIZER.localize(localizableWSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED(arg0)); } public static Localizable localizableWSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED", arg0, arg1); } /** @@ -1041,11 +1039,11 @@ public final class LocalizationMessages { * */ public static String WSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED(arg0, arg1)); } public static Localizable localizableWSP_0002_UNRECOGNIZED_SCOPE_TYPE(Object arg0) { - return messageFactory.getMessage("WSP_0002_UNRECOGNIZED_SCOPE_TYPE", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0002_UNRECOGNIZED_SCOPE_TYPE", arg0); } /** @@ -1053,11 +1051,11 @@ public final class LocalizationMessages { * */ public static String WSP_0002_UNRECOGNIZED_SCOPE_TYPE(Object arg0) { - return localizer.localize(localizableWSP_0002_UNRECOGNIZED_SCOPE_TYPE(arg0)); + return LOCALIZER.localize(localizableWSP_0002_UNRECOGNIZED_SCOPE_TYPE(arg0)); } public static Localizable localizableWSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL() { - return messageFactory.getMessage("WSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL"); } /** @@ -1065,11 +1063,11 @@ public final class LocalizationMessages { * */ public static String WSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL() { - return localizer.localize(localizableWSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL()); + return LOCALIZER.localize(localizableWSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL()); } public static Localizable localizableWSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION(Object arg0) { - return messageFactory.getMessage("WSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION", arg0); } /** @@ -1077,11 +1075,11 @@ public final class LocalizationMessages { * */ public static String WSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION(Object arg0) { - return localizer.localize(localizableWSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION(arg0)); + return LOCALIZER.localize(localizableWSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION(arg0)); } public static Localizable localizableWSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL", arg0, arg1); } /** @@ -1089,11 +1087,11 @@ public final class LocalizationMessages { * */ public static String WSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL(arg0, arg1)); } public static Localizable localizableWSP_0075_PROBLEMATIC_ASSERTION_STATE(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_0075_PROBLEMATIC_ASSERTION_STATE", arg0, arg1); + return MESSAGE_FACTORY.getMessage("WSP_0075_PROBLEMATIC_ASSERTION_STATE", arg0, arg1); } /** @@ -1101,11 +1099,11 @@ public final class LocalizationMessages { * */ public static String WSP_0075_PROBLEMATIC_ASSERTION_STATE(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_0075_PROBLEMATIC_ASSERTION_STATE(arg0, arg1)); + return LOCALIZER.localize(localizableWSP_0075_PROBLEMATIC_ASSERTION_STATE(arg0, arg1)); } public static Localizable localizableWSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES() { - return messageFactory.getMessage("WSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES"); + return MESSAGE_FACTORY.getMessage("WSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES"); } /** @@ -1113,11 +1111,11 @@ public final class LocalizationMessages { * */ public static String WSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES() { - return localizer.localize(localizableWSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES()); + return LOCALIZER.localize(localizableWSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES()); } public static Localizable localizableWSP_0092_CHARACTER_DATA_UNEXPECTED(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("WSP_0092_CHARACTER_DATA_UNEXPECTED", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("WSP_0092_CHARACTER_DATA_UNEXPECTED", arg0, arg1, arg2); } /** @@ -1125,11 +1123,11 @@ public final class LocalizationMessages { * */ public static String WSP_0092_CHARACTER_DATA_UNEXPECTED(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableWSP_0092_CHARACTER_DATA_UNEXPECTED(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableWSP_0092_CHARACTER_DATA_UNEXPECTED(arg0, arg1, arg2)); } public static Localizable localizableWSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY(Object arg0) { - return messageFactory.getMessage("WSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY", arg0); } /** @@ -1137,11 +1135,11 @@ public final class LocalizationMessages { * */ public static String WSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY(Object arg0) { - return localizer.localize(localizableWSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY(arg0)); + return LOCALIZER.localize(localizableWSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY(arg0)); } public static Localizable localizableWSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING(Object arg0) { - return messageFactory.getMessage("WSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING", arg0); } /** @@ -1149,11 +1147,11 @@ public final class LocalizationMessages { * */ public static String WSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING(Object arg0) { - return localizer.localize(localizableWSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING(arg0)); + return LOCALIZER.localize(localizableWSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING(arg0)); } public static Localizable localizableWSP_0035_RECONFIGURE_ALTERNATIVES(Object arg0) { - return messageFactory.getMessage("WSP_0035_RECONFIGURE_ALTERNATIVES", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0035_RECONFIGURE_ALTERNATIVES", arg0); } /** @@ -1161,11 +1159,11 @@ public final class LocalizationMessages { * */ public static String WSP_0035_RECONFIGURE_ALTERNATIVES(Object arg0) { - return localizer.localize(localizableWSP_0035_RECONFIGURE_ALTERNATIVES(arg0)); + return LOCALIZER.localize(localizableWSP_0035_RECONFIGURE_ALTERNATIVES(arg0)); } public static Localizable localizableWSP_0066_ILLEGAL_PROVIDER_CLASSNAME(Object arg0) { - return messageFactory.getMessage("WSP_0066_ILLEGAL_PROVIDER_CLASSNAME", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0066_ILLEGAL_PROVIDER_CLASSNAME", arg0); } /** @@ -1173,11 +1171,11 @@ public final class LocalizationMessages { * */ public static String WSP_0066_ILLEGAL_PROVIDER_CLASSNAME(Object arg0) { - return localizer.localize(localizableWSP_0066_ILLEGAL_PROVIDER_CLASSNAME(arg0)); + return LOCALIZER.localize(localizableWSP_0066_ILLEGAL_PROVIDER_CLASSNAME(arg0)); } public static Localizable localizableWSP_0076_NO_SERVICE_PROVIDERS_FOUND(Object arg0) { - return messageFactory.getMessage("WSP_0076_NO_SERVICE_PROVIDERS_FOUND", arg0); + return MESSAGE_FACTORY.getMessage("WSP_0076_NO_SERVICE_PROVIDERS_FOUND", arg0); } /** @@ -1185,11 +1183,11 @@ public final class LocalizationMessages { * */ public static String WSP_0076_NO_SERVICE_PROVIDERS_FOUND(Object arg0) { - return localizer.localize(localizableWSP_0076_NO_SERVICE_PROVIDERS_FOUND(arg0)); + return LOCALIZER.localize(localizableWSP_0076_NO_SERVICE_PROVIDERS_FOUND(arg0)); } public static Localizable localizableWSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED() { - return messageFactory.getMessage("WSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED"); + return MESSAGE_FACTORY.getMessage("WSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED"); } /** @@ -1197,7 +1195,18 @@ public final class LocalizationMessages { * */ public static String WSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED() { - return localizer.localize(localizableWSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED()); + return LOCALIZER.localize(localizableWSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED()); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java index ad2ad4a6ef5..127f74476b3 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -31,49 +31,22 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks + * Utility class to invoke com.sun.xml.internal.ws.policy.util.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks * to java.lang,reflect.Method.invoke() */ class MethodUtil { private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); - private static final Method INVOKE_METHOD; - - static { - Method method; - try { - Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); - method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); - } - } catch (Throwable t) { - method = null; - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); - } - } - INVOKE_METHOD = method; - } static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { - if (INVOKE_METHOD != null) { - // sun.reflect.misc.MethodUtil.invoke(method, owner, args) - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); - } - try { - return INVOKE_METHOD.invoke(null, method, target, args); - } catch (InvocationTargetException ite) { - // unwrap invocation exception added by reflection code ... - throw unwrapException(ite); - } - } else { - // other then Oracle JDK ... - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); - } - return method.invoke(target, args); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Invoking method using com.sun.xml.internal.ws.policy.util.MethodUtil"); + } + try { + return com.sun.xml.internal.ws.policy.util.MethodUtil.invoke(method, target, args); + } catch (InvocationTargetException ite) { + // unwrap invocation exception added by reflection code ... + throw unwrapException(ite); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java index f77560163cb..bbd7c328bbd 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java @@ -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 @@ -27,8 +27,6 @@ package com.sun.xml.internal.ws.policy.sourcemodel.attach; import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +34,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,25 +56,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { return AccessController.doPrivileged(new PrivilegedAction() { - public ClassLoader run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocalMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocalMessages.java new file mode 100644 index 00000000000..1b2322062c8 --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocalMessages.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.policy.sourcemodel.attach; + +import java.util.Locale; +import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; + + +/** + * Defines string formatting method for each constant in the resource file + * + */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") +public final class ContextClassloaderLocalMessages { + + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.policy.sourcemodel.attach.ContextClassloaderLocal"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ContextClassloaderLocalMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); + + public static Localizable localizableFAILED_TO_CREATE_NEW_INSTANCE(Object arg0) { + return MESSAGE_FACTORY.getMessage("FAILED_TO_CREATE_NEW_INSTANCE", arg0); + } + + /** + * Failed to create new instance of {0} + * + */ + public static String FAILED_TO_CREATE_NEW_INSTANCE(Object arg0) { + return LOCALIZER.localize(localizableFAILED_TO_CREATE_NEW_INSTANCE(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + + } + +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/util/MethodUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/util/MethodUtil.java new file mode 100644 index 00000000000..b8af4d28a37 --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/util/MethodUtil.java @@ -0,0 +1,293 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.policy.util; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.security.AccessController; +import java.security.AllPermission; +import java.security.CodeSource; +import java.security.PermissionCollection; +import java.security.PrivilegedExceptionAction; +import java.security.SecureClassLoader; +import java.util.Arrays; + +/* + * This copies from sun.reflect.misc.MethodUtil to implement the trampoline + * code such that when a Method is invoked, it will be called through + * the trampoline that is defined by this MethodUtil class loader. + */ +class Trampoline { + static { + if (Trampoline.class.getClassLoader() == null) { + throw new Error( + "Trampoline must not be defined by the bootstrap classloader"); + } + } + + private static void ensureInvocableMethod(Method m) + throws InvocationTargetException { + Class clazz = m.getDeclaringClass(); + if (clazz.equals(AccessController.class) || + clazz.equals(Method.class) || + clazz.getName().startsWith("java.lang.invoke.")) + throw new InvocationTargetException( + new UnsupportedOperationException("invocation not supported")); + } + + private static Object invoke(Method m, Object obj, Object[] params) + throws InvocationTargetException, IllegalAccessException { + ensureInvocableMethod(m); + return m.invoke(obj, params); + } +} + +/* + * Create a trampoline class. + */ +public final class MethodUtil extends SecureClassLoader { + private static final String WS_UTIL_POLICY_PKG = "com.sun.xml.internal.ws.policy.util."; + private static final String TRAMPOLINE = WS_UTIL_POLICY_PKG + "Trampoline"; + private static final Method bounce = getTrampoline(); + private static final int DEFAULT_BUFFER_SIZE = 8192; + private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8; + + + private MethodUtil() { + super(); + } + + /* + * Bounce through the trampoline. + */ + public static Object invoke(Method m, Object obj, Object[] params) + throws InvocationTargetException, IllegalAccessException { + try { + return bounce.invoke(null, m, obj, params); + } catch (InvocationTargetException ie) { + Throwable t = ie.getCause(); + + if (t instanceof InvocationTargetException) { + throw (InvocationTargetException) t; + } else if (t instanceof IllegalAccessException) { + throw (IllegalAccessException) t; + } else if (t instanceof RuntimeException) { + throw (RuntimeException) t; + } else if (t instanceof Error) { + throw (Error) t; + } else { + throw new Error("Unexpected invocation error", t); + } + } catch (IllegalAccessException iae) { + // this can't happen + throw new Error("Unexpected invocation error", iae); + } + } + + private static Method getTrampoline() { + try { + return AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public Method run() throws Exception { + Class t = getTrampolineClass(); + Method b = t.getDeclaredMethod("invoke", + Method.class, Object.class, Object[].class); + b.setAccessible(true); + return b; + } + }); + } catch (Exception e) { + throw new InternalError("bouncer cannot be found", e); + } + } + + + protected synchronized Class loadClass(String name, boolean resolve) + throws ClassNotFoundException { + // First, check if the class has already been loaded + checkPackageAccess(name); + Class c = findLoadedClass(name); + if (c == null) { + try { + c = findClass(name); + } catch (ClassNotFoundException e) { + // Fall through ... + } + if (c == null) { + c = getParent().loadClass(name); + } + } + if (resolve) { + resolveClass(c); + } + return c; + } + + + protected Class findClass(final String name) + throws ClassNotFoundException { + if (!name.startsWith(WS_UTIL_POLICY_PKG)) { + throw new ClassNotFoundException(name); + } + String path = "/".concat(name.replace('.', '/').concat(".class")); + try (InputStream in = MethodUtil.class.getResourceAsStream(path)) { + byte[] b = readAllBytes(in); + return defineClass(name, b); + } catch (IOException e) { + throw new ClassNotFoundException(name, e); + } + } + + /** + * JDK9 {@link InputStream#readAllBytes()} substitution. + */ + private byte[] readAllBytes(InputStream in) throws IOException { + byte[] buf = new byte[DEFAULT_BUFFER_SIZE]; + int capacity = buf.length; + int nread = 0; + int n; + for (; ; ) { + // read to EOF which may read more or less than initial buffer size + while ((n = in.read(buf, nread, capacity - 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) + throw new OutOfMemoryError("Required array size too large"); + capacity = MAX_BUFFER_SIZE; + } + buf = Arrays.copyOf(buf, capacity); + } + return (capacity == nread) ? buf : Arrays.copyOf(buf, nread); + } + + + /* + * Define the proxy classes + */ + private Class defineClass(String name, byte[] b) throws IOException { + CodeSource cs = new CodeSource(null, (java.security.cert.Certificate[]) null); + if (!name.equals(TRAMPOLINE)) { + throw new IOException("MethodUtil: bad name " + name); + } + return defineClass(name, b, 0, b.length, cs); + } + + protected PermissionCollection getPermissions(CodeSource codesource) { + PermissionCollection perms = super.getPermissions(codesource); + perms.add(new AllPermission()); + return perms; + } + + private static Class getTrampolineClass() { + try { + return Class.forName(TRAMPOLINE, true, new MethodUtil()); + } catch (ClassNotFoundException e) { + } + return null; + } + + /** + * Checks package access on the given classname. + * This method is typically called when the Class instance is not + * available and the caller attempts to load a class on behalf + * the true caller (application). + */ + private static void checkPackageAccess(String name) { + SecurityManager s = System.getSecurityManager(); + if (s != null) { + String cname = name.replace('/', '.'); + if (cname.startsWith("[")) { + int b = cname.lastIndexOf('[') + 2; + if (b > 1 && b < cname.length()) { + cname = cname.substring(b); + } + } + int i = cname.lastIndexOf('.'); + if (i != -1) { + s.checkPackageAccess(cname.substring(0, i)); + } + } + } + + /** + * Checks package access on the given class. + *

    + * If it is a {@link Proxy#isProxyClass(Class)} that implements + * a non-public interface (i.e. may be in a non-restricted package), + * also check the package access on the proxy interfaces. + */ + private static void checkPackageAccess(Class clazz) { + checkPackageAccess(clazz.getName()); + if (isNonPublicProxyClass(clazz)) { + checkProxyPackageAccess(clazz); + } + } + + // Note that bytecode instrumentation tools may exclude 'sun.*' + // classes but not generated proxy classes and so keep it in com.sun.* + private static final String PROXY_PACKAGE = "com.sun.proxy"; + + /** + * Test if the given class is a proxy class that implements + * non-public interface. Such proxy class may be in a non-restricted + * package that bypasses checkPackageAccess. + */ + private static boolean isNonPublicProxyClass(Class cls) { + String name = cls.getName(); + int i = name.lastIndexOf('.'); + String pkg = (i != -1) ? name.substring(0, i) : ""; + return Proxy.isProxyClass(cls) && !pkg.startsWith(PROXY_PACKAGE); + } + + /** + * Check package access on the proxy interfaces that the given proxy class + * implements. + * + * @param clazz Proxy class object + */ + private static void checkProxyPackageAccess(Class clazz) { + SecurityManager s = System.getSecurityManager(); + if (s != null) { + // check proxy interfaces if the given class is a proxy class + if (Proxy.isProxyClass(clazz)) { + for (Class intf : clazz.getInterfaces()) { + checkPackageAccess(intf); + } + } + } + } +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/AddressingMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/AddressingMessages.java index a1ae07c6944..e042a7efbe9 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/AddressingMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/AddressingMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,330 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class AddressingMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.addressing"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, AddressingMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableNON_ANONYMOUS_RESPONSE_ONEWAY() { - return messageFactory.getMessage("nonAnonymous.response.oneway"); - } - - /** - * Ignoring non-anonymous response for one-way message - * - */ - public static String NON_ANONYMOUS_RESPONSE_ONEWAY() { - return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_ONEWAY()); - } - - public static Localizable localizableNULL_WSA_HEADERS() { - return messageFactory.getMessage("null.wsa.headers"); - } - - /** - * No WS-Addressing headers found processing the server inbound request - * - */ - public static String NULL_WSA_HEADERS() { - return localizer.localize(localizableNULL_WSA_HEADERS()); - } - - public static Localizable localizableUNKNOWN_WSA_HEADER() { - return messageFactory.getMessage("unknown.wsa.header"); - } - - /** - * Unknown WS-Addressing header - * - */ - public static String UNKNOWN_WSA_HEADER() { - return localizer.localize(localizableUNKNOWN_WSA_HEADER()); - } - - public static Localizable localizableNULL_ACTION() { - return messageFactory.getMessage("null.action"); - } - - /** - * Populating request Addressing headers and found null Action - * - */ - public static String NULL_ACTION() { - return localizer.localize(localizableNULL_ACTION()); - } - - public static Localizable localizableINVALID_WSAW_ANONYMOUS(Object arg0) { - return messageFactory.getMessage("invalid.wsaw.anonymous", arg0); - } - - /** - * Invalid value obtained from wsaw:Anonymous: "{0}" - * - */ - public static String INVALID_WSAW_ANONYMOUS(Object arg0) { - return localizer.localize(localizableINVALID_WSAW_ANONYMOUS(arg0)); - } - - public static Localizable localizableNULL_SOAP_VERSION() { - return messageFactory.getMessage("null.soap.version"); - } - - /** - * Unexpected null SOAP version - * - */ - public static String NULL_SOAP_VERSION() { - return localizer.localize(localizableNULL_SOAP_VERSION()); - } - - public static Localizable localizableWSDL_BOUND_OPERATION_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("wsdlBoundOperation.notFound", arg0); - } - - /** - * Cannot find an operation in wsdl:binding for "{0}" - * - */ - public static String WSDL_BOUND_OPERATION_NOT_FOUND(Object arg0) { - return localizer.localize(localizableWSDL_BOUND_OPERATION_NOT_FOUND(arg0)); - } - - public static Localizable localizableNON_UNIQUE_OPERATION_SIGNATURE(Object arg0, Object arg1, Object arg2, Object arg3) { - return messageFactory.getMessage("non.unique.operation.signature", arg0, arg1, arg2, arg3); - } - - /** - * Operations in a port should have unique operation signature to successfuly identify a associated wsdl operation for a message. WSDL operation {0} and {1} have the same operation signature, wsa:Action "{2}" and request body block "{3}", Method dispatching may fail at runtime. Use unique wsa:Action for each operation - * - */ - public static String NON_UNIQUE_OPERATION_SIGNATURE(Object arg0, Object arg1, Object arg2, Object arg3) { - return localizer.localize(localizableNON_UNIQUE_OPERATION_SIGNATURE(arg0, arg1, arg2, arg3)); - } - - public static Localizable localizableNON_ANONYMOUS_RESPONSE() { - return messageFactory.getMessage("nonAnonymous.response"); - } - - /** - * Sending 202 and processing non-anonymous response - * - */ - public static String NON_ANONYMOUS_RESPONSE() { - return localizer.localize(localizableNON_ANONYMOUS_RESPONSE()); - } - - public static Localizable localizableVALIDATION_SERVER_NULL_ACTION() { - return messageFactory.getMessage("validation.server.nullAction"); - } - - /** - * Validating inbound Addressing headers on server and found null Action - * - */ - public static String VALIDATION_SERVER_NULL_ACTION() { - return localizer.localize(localizableVALIDATION_SERVER_NULL_ACTION()); - } - - public static Localizable localizableFAULT_TO_CANNOT_PARSE() { - return messageFactory.getMessage("faultTo.cannot.parse"); - } - - /** - * FaultTo header cannot be parsed - * - */ - public static String FAULT_TO_CANNOT_PARSE() { - return localizer.localize(localizableFAULT_TO_CANNOT_PARSE()); - } - - public static Localizable localizableVALIDATION_CLIENT_NULL_ACTION() { - return messageFactory.getMessage("validation.client.nullAction"); - } - - /** - * Validating inbound Addressing headers on client and found null Action - * - */ - public static String VALIDATION_CLIENT_NULL_ACTION() { - return localizer.localize(localizableVALIDATION_CLIENT_NULL_ACTION()); - } - - public static Localizable localizableNULL_MESSAGE() { - return messageFactory.getMessage("null.message"); - } - - /** - * Null message found when processing the server inbound request and WS-Addressing is required - * - */ - public static String NULL_MESSAGE() { - return localizer.localize(localizableNULL_MESSAGE()); - } - - public static Localizable localizableACTION_NOT_SUPPORTED_EXCEPTION(Object arg0) { - return messageFactory.getMessage("action.not.supported.exception", arg0); - } - - /** - * Action: "{0}" not supported - * - */ - public static String ACTION_NOT_SUPPORTED_EXCEPTION(Object arg0) { - return localizer.localize(localizableACTION_NOT_SUPPORTED_EXCEPTION(arg0)); - } - - public static Localizable localizableNON_ANONYMOUS_RESPONSE_NULL_HEADERS(Object arg0) { - return messageFactory.getMessage("nonAnonymous.response.nullHeaders", arg0); - } - - /** - * No response headers found in non-anonymous response from "{0}" - * - */ - public static String NON_ANONYMOUS_RESPONSE_NULL_HEADERS(Object arg0) { - return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_NULL_HEADERS(arg0)); - } - - public static Localizable localizableNON_ANONYMOUS_RESPONSE_SENDING(Object arg0) { - return messageFactory.getMessage("nonAnonymous.response.sending", arg0); - } - - /** - * Sending non-anonymous reply to "{0}" - * - */ - public static String NON_ANONYMOUS_RESPONSE_SENDING(Object arg0) { - return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_SENDING(arg0)); - } - - public static Localizable localizableREPLY_TO_CANNOT_PARSE() { - return messageFactory.getMessage("replyTo.cannot.parse"); - } - - /** - * ReplyTo header cannot be parsed - * - */ - public static String REPLY_TO_CANNOT_PARSE() { - return localizer.localize(localizableREPLY_TO_CANNOT_PARSE()); - } - - public static Localizable localizableINVALID_ADDRESSING_HEADER_EXCEPTION(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.addressing.header.exception", arg0, arg1); - } - - /** - * Invalid WS-Addressing header: "{0}",Reason: "{1}" - * - */ - public static String INVALID_ADDRESSING_HEADER_EXCEPTION(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_ADDRESSING_HEADER_EXCEPTION(arg0, arg1)); - } - - public static Localizable localizableWSAW_ANONYMOUS_PROHIBITED() { - return messageFactory.getMessage("wsaw.anonymousProhibited"); - } - - /** - * Operation has "prohibited" value for wsaw:anonymous in the WSDL, Addressing must be disabled and SOAP message need to be hand-crafted - * - */ - public static String WSAW_ANONYMOUS_PROHIBITED() { - return localizer.localize(localizableWSAW_ANONYMOUS_PROHIBITED()); - } - - public static Localizable localizableNULL_WSDL_PORT() { - return messageFactory.getMessage("null.wsdlPort"); - } - - /** - * Populating request Addressing headers and found null WSDLPort - * - */ - public static String NULL_WSDL_PORT() { - return localizer.localize(localizableNULL_WSDL_PORT()); - } - - public static Localizable localizableADDRESSING_SHOULD_BE_ENABLED() { - return messageFactory.getMessage("addressing.should.be.enabled."); - } - - /** - * Addressing is not enabled - * - */ - public static String ADDRESSING_SHOULD_BE_ENABLED() { - return localizer.localize(localizableADDRESSING_SHOULD_BE_ENABLED()); - } - - public static Localizable localizableNULL_ADDRESSING_VERSION() { - return messageFactory.getMessage("null.addressing.version"); - } - - /** - * Unexpected null Addressing version - * - */ - public static String NULL_ADDRESSING_VERSION() { - return localizer.localize(localizableNULL_ADDRESSING_VERSION()); - } - - public static Localizable localizableMISSING_HEADER_EXCEPTION(Object arg0) { - return messageFactory.getMessage("missing.header.exception", arg0); - } - - /** - * Missing WS-Addressing header: "{0}" - * - */ - public static String MISSING_HEADER_EXCEPTION(Object arg0) { - return localizer.localize(localizableMISSING_HEADER_EXCEPTION(arg0)); - } - - public static Localizable localizableNULL_PACKET() { - return messageFactory.getMessage("null.packet"); - } - - /** - * Populating request Addressing headers and found null Packet - * - */ - public static String NULL_PACKET() { - return localizer.localize(localizableNULL_PACKET()); - } - - public static Localizable localizableWRONG_ADDRESSING_VERSION(Object arg0, Object arg1) { - return messageFactory.getMessage("wrong.addressing.version", arg0, arg1); - } - - /** - * Expected "{0}" version of WS-Addressing but found "{1}" - * - */ - public static String WRONG_ADDRESSING_VERSION(Object arg0, Object arg1) { - return localizer.localize(localizableWRONG_ADDRESSING_VERSION(arg0, arg1)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new AddressingMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableADDRESSING_NOT_ENABLED(Object arg0) { - return messageFactory.getMessage("addressing.notEnabled", arg0); + return MESSAGE_FACTORY.getMessage("addressing.notEnabled", arg0); } /** @@ -356,23 +54,35 @@ public final class AddressingMessages { * */ public static String ADDRESSING_NOT_ENABLED(Object arg0) { - return localizer.localize(localizableADDRESSING_NOT_ENABLED(arg0)); + return LOCALIZER.localize(localizableADDRESSING_NOT_ENABLED(arg0)); } - public static Localizable localizableNON_ANONYMOUS_UNKNOWN_PROTOCOL(Object arg0) { - return messageFactory.getMessage("nonAnonymous.unknown.protocol", arg0); + public static Localizable localizableWSAW_ANONYMOUS_PROHIBITED() { + return MESSAGE_FACTORY.getMessage("wsaw.anonymousProhibited"); } /** - * Unknown protocol: "{0}" + * Operation has "prohibited" value for wsaw:anonymous in the WSDL, Addressing must be disabled and SOAP message need to be hand-crafted * */ - public static String NON_ANONYMOUS_UNKNOWN_PROTOCOL(Object arg0) { - return localizer.localize(localizableNON_ANONYMOUS_UNKNOWN_PROTOCOL(arg0)); + public static String WSAW_ANONYMOUS_PROHIBITED() { + return LOCALIZER.localize(localizableWSAW_ANONYMOUS_PROHIBITED()); + } + + public static Localizable localizableNULL_SOAP_VERSION() { + return MESSAGE_FACTORY.getMessage("null.soap.version"); + } + + /** + * Unexpected null SOAP version + * + */ + public static String NULL_SOAP_VERSION() { + return LOCALIZER.localize(localizableNULL_SOAP_VERSION()); } public static Localizable localizableNULL_HEADERS() { - return messageFactory.getMessage("null.headers"); + return MESSAGE_FACTORY.getMessage("null.headers"); } /** @@ -380,11 +90,167 @@ public final class AddressingMessages { * */ public static String NULL_HEADERS() { - return localizer.localize(localizableNULL_HEADERS()); + return LOCALIZER.localize(localizableNULL_HEADERS()); + } + + public static Localizable localizableFAULT_TO_CANNOT_PARSE() { + return MESSAGE_FACTORY.getMessage("faultTo.cannot.parse"); + } + + /** + * FaultTo header cannot be parsed + * + */ + public static String FAULT_TO_CANNOT_PARSE() { + return LOCALIZER.localize(localizableFAULT_TO_CANNOT_PARSE()); + } + + public static Localizable localizableNON_ANONYMOUS_RESPONSE_NULL_HEADERS(Object arg0) { + return MESSAGE_FACTORY.getMessage("nonAnonymous.response.nullHeaders", arg0); + } + + /** + * No response headers found in non-anonymous response from "{0}" + * + */ + public static String NON_ANONYMOUS_RESPONSE_NULL_HEADERS(Object arg0) { + return LOCALIZER.localize(localizableNON_ANONYMOUS_RESPONSE_NULL_HEADERS(arg0)); + } + + public static Localizable localizableUNKNOWN_WSA_HEADER() { + return MESSAGE_FACTORY.getMessage("unknown.wsa.header"); + } + + /** + * Unknown WS-Addressing header + * + */ + public static String UNKNOWN_WSA_HEADER() { + return LOCALIZER.localize(localizableUNKNOWN_WSA_HEADER()); + } + + public static Localizable localizableINVALID_ADDRESSING_HEADER_EXCEPTION(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("invalid.addressing.header.exception", arg0, arg1); + } + + /** + * Invalid WS-Addressing header: "{0}",Reason: "{1}" + * + */ + public static String INVALID_ADDRESSING_HEADER_EXCEPTION(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableINVALID_ADDRESSING_HEADER_EXCEPTION(arg0, arg1)); + } + + public static Localizable localizableNULL_WSDL_PORT() { + return MESSAGE_FACTORY.getMessage("null.wsdlPort"); + } + + /** + * Populating request Addressing headers and found null WSDLPort + * + */ + public static String NULL_WSDL_PORT() { + return LOCALIZER.localize(localizableNULL_WSDL_PORT()); + } + + public static Localizable localizableNON_ANONYMOUS_UNKNOWN_PROTOCOL(Object arg0) { + return MESSAGE_FACTORY.getMessage("nonAnonymous.unknown.protocol", arg0); + } + + /** + * Unknown protocol: "{0}" + * + */ + public static String NON_ANONYMOUS_UNKNOWN_PROTOCOL(Object arg0) { + return LOCALIZER.localize(localizableNON_ANONYMOUS_UNKNOWN_PROTOCOL(arg0)); + } + + public static Localizable localizableNON_ANONYMOUS_RESPONSE_SENDING(Object arg0) { + return MESSAGE_FACTORY.getMessage("nonAnonymous.response.sending", arg0); + } + + /** + * Sending non-anonymous reply to "{0}" + * + */ + public static String NON_ANONYMOUS_RESPONSE_SENDING(Object arg0) { + return LOCALIZER.localize(localizableNON_ANONYMOUS_RESPONSE_SENDING(arg0)); + } + + public static Localizable localizableNON_ANONYMOUS_RESPONSE() { + return MESSAGE_FACTORY.getMessage("nonAnonymous.response"); + } + + /** + * Sending 202 and processing non-anonymous response + * + */ + public static String NON_ANONYMOUS_RESPONSE() { + return LOCALIZER.localize(localizableNON_ANONYMOUS_RESPONSE()); + } + + public static Localizable localizableREPLY_TO_CANNOT_PARSE() { + return MESSAGE_FACTORY.getMessage("replyTo.cannot.parse"); + } + + /** + * ReplyTo header cannot be parsed + * + */ + public static String REPLY_TO_CANNOT_PARSE() { + return LOCALIZER.localize(localizableREPLY_TO_CANNOT_PARSE()); + } + + public static Localizable localizableINVALID_WSAW_ANONYMOUS(Object arg0) { + return MESSAGE_FACTORY.getMessage("invalid.wsaw.anonymous", arg0); + } + + /** + * Invalid value obtained from wsaw:Anonymous: "{0}" + * + */ + public static String INVALID_WSAW_ANONYMOUS(Object arg0) { + return LOCALIZER.localize(localizableINVALID_WSAW_ANONYMOUS(arg0)); + } + + public static Localizable localizableVALIDATION_CLIENT_NULL_ACTION() { + return MESSAGE_FACTORY.getMessage("validation.client.nullAction"); + } + + /** + * Validating inbound Addressing headers on client and found null Action + * + */ + public static String VALIDATION_CLIENT_NULL_ACTION() { + return LOCALIZER.localize(localizableVALIDATION_CLIENT_NULL_ACTION()); + } + + public static Localizable localizableWSDL_BOUND_OPERATION_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("wsdlBoundOperation.notFound", arg0); + } + + /** + * Cannot find an operation in wsdl:binding for "{0}" + * + */ + public static String WSDL_BOUND_OPERATION_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableWSDL_BOUND_OPERATION_NOT_FOUND(arg0)); + } + + public static Localizable localizableMISSING_HEADER_EXCEPTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("missing.header.exception", arg0); + } + + /** + * Missing WS-Addressing header: "{0}" + * + */ + public static String MISSING_HEADER_EXCEPTION(Object arg0) { + return LOCALIZER.localize(localizableMISSING_HEADER_EXCEPTION(arg0)); } public static Localizable localizableNULL_BINDING() { - return messageFactory.getMessage("null.binding"); + return MESSAGE_FACTORY.getMessage("null.binding"); } /** @@ -392,7 +258,150 @@ public final class AddressingMessages { * */ public static String NULL_BINDING() { - return localizer.localize(localizableNULL_BINDING()); + return LOCALIZER.localize(localizableNULL_BINDING()); + } + + public static Localizable localizableNULL_WSA_HEADERS() { + return MESSAGE_FACTORY.getMessage("null.wsa.headers"); + } + + /** + * No WS-Addressing headers found processing the server inbound request + * + */ + public static String NULL_WSA_HEADERS() { + return LOCALIZER.localize(localizableNULL_WSA_HEADERS()); + } + + public static Localizable localizableNON_ANONYMOUS_RESPONSE_ONEWAY() { + return MESSAGE_FACTORY.getMessage("nonAnonymous.response.oneway"); + } + + /** + * Ignoring non-anonymous response for one-way message + * + */ + public static String NON_ANONYMOUS_RESPONSE_ONEWAY() { + return LOCALIZER.localize(localizableNON_ANONYMOUS_RESPONSE_ONEWAY()); + } + + public static Localizable localizableVALIDATION_SERVER_NULL_ACTION() { + return MESSAGE_FACTORY.getMessage("validation.server.nullAction"); + } + + /** + * Validating inbound Addressing headers on server and found null Action + * + */ + public static String VALIDATION_SERVER_NULL_ACTION() { + return LOCALIZER.localize(localizableVALIDATION_SERVER_NULL_ACTION()); + } + + public static Localizable localizableWRONG_ADDRESSING_VERSION(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("wrong.addressing.version", arg0, arg1); + } + + /** + * Expected "{0}" version of WS-Addressing but found "{1}" + * + */ + public static String WRONG_ADDRESSING_VERSION(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableWRONG_ADDRESSING_VERSION(arg0, arg1)); + } + + public static Localizable localizableACTION_NOT_SUPPORTED_EXCEPTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("action.not.supported.exception", arg0); + } + + /** + * Action: "{0}" not supported + * + */ + public static String ACTION_NOT_SUPPORTED_EXCEPTION(Object arg0) { + return LOCALIZER.localize(localizableACTION_NOT_SUPPORTED_EXCEPTION(arg0)); + } + + public static Localizable localizableNULL_MESSAGE() { + return MESSAGE_FACTORY.getMessage("null.message"); + } + + /** + * Null message found when processing the server inbound request and WS-Addressing is required + * + */ + public static String NULL_MESSAGE() { + return LOCALIZER.localize(localizableNULL_MESSAGE()); + } + + public static Localizable localizableADDRESSING_SHOULD_BE_ENABLED() { + return MESSAGE_FACTORY.getMessage("addressing.should.be.enabled."); + } + + /** + * Addressing is not enabled + * + */ + public static String ADDRESSING_SHOULD_BE_ENABLED() { + return LOCALIZER.localize(localizableADDRESSING_SHOULD_BE_ENABLED()); + } + + public static Localizable localizableNULL_PACKET() { + return MESSAGE_FACTORY.getMessage("null.packet"); + } + + /** + * Populating request Addressing headers and found null Packet + * + */ + public static String NULL_PACKET() { + return LOCALIZER.localize(localizableNULL_PACKET()); + } + + public static Localizable localizableNULL_ADDRESSING_VERSION() { + return MESSAGE_FACTORY.getMessage("null.addressing.version"); + } + + /** + * Unexpected null Addressing version + * + */ + public static String NULL_ADDRESSING_VERSION() { + return LOCALIZER.localize(localizableNULL_ADDRESSING_VERSION()); + } + + public static Localizable localizableNULL_ACTION() { + return MESSAGE_FACTORY.getMessage("null.action"); + } + + /** + * Populating request Addressing headers and found null Action + * + */ + public static String NULL_ACTION() { + return LOCALIZER.localize(localizableNULL_ACTION()); + } + + public static Localizable localizableNON_UNIQUE_OPERATION_SIGNATURE(Object arg0, Object arg1, Object arg2, Object arg3) { + return MESSAGE_FACTORY.getMessage("non.unique.operation.signature", arg0, arg1, arg2, arg3); + } + + /** + * Operations in a port should have unique operation signature to successfuly identify a associated wsdl operation for a message. WSDL operation {0} and {1} have the same operation signature, wsa:Action "{2}" and request body block "{3}", Method dispatching may fail at runtime. Use unique wsa:Action for each operation + * + */ + public static String NON_UNIQUE_OPERATION_SIGNATURE(Object arg0, Object arg1, Object arg2, Object arg3) { + return LOCALIZER.localize(localizableNON_UNIQUE_OPERATION_SIGNATURE(arg0, arg1, arg2, arg3)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java index c044aca530e..4cd64ec6aff 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,30 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class BindingApiMessages { - private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.bindingApi"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, BindingApiMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.bindingApi"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new BindingApiMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableBINDING_API_NO_FAULT_MESSAGE_NAME() { - return messageFactory.getMessage("binding.api.no.fault.message.name"); + return MESSAGE_FACTORY.getMessage("binding.api.no.fault.message.name"); } /** @@ -56,7 +54,18 @@ public final class BindingApiMessages { * */ public static String BINDING_API_NO_FAULT_MESSAGE_NAME() { - return localizer.localize(localizableBINDING_API_NO_FAULT_MESSAGE_NAME()); + return LOCALIZER.localize(localizableBINDING_API_NO_FAULT_MESSAGE_NAME()); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ClientMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ClientMessages.java index 21228d5ee5d..c7182a12c17 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ClientMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ClientMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,115 +25,40 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class ClientMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.client"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, ClientMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ClientMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableFAILED_TO_PARSE(Object arg0, Object arg1) { - return messageFactory.getMessage("failed.to.parse", arg0, arg1); + public static Localizable localizableINVALID_WSDL_URL(Object arg0) { + return MESSAGE_FACTORY.getMessage("invalid.wsdl.url", arg0); } /** - * Failed to access the WSDL at: {0}. It failed with: - * {1}. + * Invalid WSDL URL: {0} * */ - public static String FAILED_TO_PARSE(Object arg0, Object arg1) { - return localizer.localize(localizableFAILED_TO_PARSE(arg0, arg1)); - } - - public static Localizable localizableINVALID_BINDING_ID(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.binding.id", arg0, arg1); - } - - /** - * Invalid binding id: {0}. Must be: {1} - * - */ - public static String INVALID_BINDING_ID(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_BINDING_ID(arg0, arg1)); - } - - public static Localizable localizableEPR_WITHOUT_ADDRESSING_ON() { - return messageFactory.getMessage("epr.without.addressing.on"); - } - - /** - * EPR is specified without enabling WS-Addressing support. - * - */ - public static String EPR_WITHOUT_ADDRESSING_ON() { - return localizer.localize(localizableEPR_WITHOUT_ADDRESSING_ON()); - } - - public static Localizable localizableINVALID_SERVICE_NO_WSDL(Object arg0) { - return messageFactory.getMessage("invalid.service.no.wsdl", arg0); - } - - /** - * No wsdl metadata for service: {0}, can't create proxy! Try creating Service by providing a WSDL URL - * - */ - public static String INVALID_SERVICE_NO_WSDL(Object arg0) { - return localizer.localize(localizableINVALID_SERVICE_NO_WSDL(arg0)); - } - - public static Localizable localizableINVALID_SOAP_ROLE_NONE() { - return messageFactory.getMessage("invalid.soap.role.none"); - } - - /** - * Cannot set SOAP 1.2 role "none" - * - */ - public static String INVALID_SOAP_ROLE_NONE() { - return localizer.localize(localizableINVALID_SOAP_ROLE_NONE()); - } - - public static Localizable localizableUNDEFINED_BINDING(Object arg0) { - return messageFactory.getMessage("undefined.binding", arg0); - } - - /** - * Undefined binding: {0} - * - */ - public static String UNDEFINED_BINDING(Object arg0) { - return localizer.localize(localizableUNDEFINED_BINDING(arg0)); - } - - public static Localizable localizableHTTP_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("http.not.found", arg0); - } - - /** - * HTTP Status-Code 404: Not Found - {0} - * - */ - public static String HTTP_NOT_FOUND(Object arg0) { - return localizer.localize(localizableHTTP_NOT_FOUND(arg0)); + public static String INVALID_WSDL_URL(Object arg0) { + return LOCALIZER.localize(localizableINVALID_WSDL_URL(arg0)); } public static Localizable localizableINVALID_EPR_PORT_NAME(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.epr.port.name", arg0, arg1); + return MESSAGE_FACTORY.getMessage("invalid.epr.port.name", arg0, arg1); } /** @@ -141,11 +66,35 @@ public final class ClientMessages { * */ public static String INVALID_EPR_PORT_NAME(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_EPR_PORT_NAME(arg0, arg1)); + return LOCALIZER.localize(localizableINVALID_EPR_PORT_NAME(arg0, arg1)); + } + + public static Localizable localizableINVALID_SOAP_ROLE_NONE() { + return MESSAGE_FACTORY.getMessage("invalid.soap.role.none"); + } + + /** + * Cannot set SOAP 1.2 role "none" + * + */ + public static String INVALID_SOAP_ROLE_NONE() { + return LOCALIZER.localize(localizableINVALID_SOAP_ROLE_NONE()); + } + + public static Localizable localizableEPR_WITHOUT_ADDRESSING_ON() { + return MESSAGE_FACTORY.getMessage("epr.without.addressing.on"); + } + + /** + * EPR is specified without enabling WS-Addressing support. + * + */ + public static String EPR_WITHOUT_ADDRESSING_ON() { + return LOCALIZER.localize(localizableEPR_WITHOUT_ADDRESSING_ON()); } public static Localizable localizableFAILED_TO_PARSE_WITH_MEX(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("failed.to.parseWithMEX", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("failed.to.parseWithMEX", arg0, arg1, arg2); } /** @@ -156,11 +105,11 @@ public final class ClientMessages { * */ public static String FAILED_TO_PARSE_WITH_MEX(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableFAILED_TO_PARSE_WITH_MEX(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableFAILED_TO_PARSE_WITH_MEX(arg0, arg1, arg2)); } public static Localizable localizableHTTP_STATUS_CODE(Object arg0, Object arg1) { - return messageFactory.getMessage("http.status.code", arg0, arg1); + return MESSAGE_FACTORY.getMessage("http.status.code", arg0, arg1); } /** @@ -168,155 +117,11 @@ public final class ClientMessages { * */ public static String HTTP_STATUS_CODE(Object arg0, Object arg1) { - return localizer.localize(localizableHTTP_STATUS_CODE(arg0, arg1)); - } - - public static Localizable localizableINVALID_ADDRESS(Object arg0) { - return messageFactory.getMessage("invalid.address", arg0); - } - - /** - * Invalid address: {0} - * - */ - public static String INVALID_ADDRESS(Object arg0) { - return localizer.localize(localizableINVALID_ADDRESS(arg0)); - } - - public static Localizable localizableUNDEFINED_PORT_TYPE(Object arg0) { - return messageFactory.getMessage("undefined.portType", arg0); - } - - /** - * Undefined port type: {0} - * - */ - public static String UNDEFINED_PORT_TYPE(Object arg0) { - return localizer.localize(localizableUNDEFINED_PORT_TYPE(arg0)); - } - - public static Localizable localizableWSDL_CONTAINS_NO_SERVICE(Object arg0) { - return messageFactory.getMessage("wsdl.contains.no.service", arg0); - } - - /** - * WSDL {0} contains no service definition. - * - */ - public static String WSDL_CONTAINS_NO_SERVICE(Object arg0) { - return localizer.localize(localizableWSDL_CONTAINS_NO_SERVICE(arg0)); - } - - public static Localizable localizableINVALID_SOAP_ACTION() { - return messageFactory.getMessage("invalid.soap.action"); - } - - /** - * A valid SOAPAction should be set in the RequestContext when Addressing is enabled, Use BindingProvider.SOAPACTION_URI_PROPERTY to set it. - * - */ - public static String INVALID_SOAP_ACTION() { - return localizer.localize(localizableINVALID_SOAP_ACTION()); - } - - public static Localizable localizableNON_LOGICAL_HANDLER_SET(Object arg0) { - return messageFactory.getMessage("non.logical.handler.set", arg0); - } - - /** - * Cannot set {0} on binding. Handler must be a LogicalHandler. - * - */ - public static String NON_LOGICAL_HANDLER_SET(Object arg0) { - return localizer.localize(localizableNON_LOGICAL_HANDLER_SET(arg0)); - } - - public static Localizable localizableLOCAL_CLIENT_FAILED(Object arg0) { - return messageFactory.getMessage("local.client.failed", arg0); - } - - /** - * local transport error: {0} - * - */ - public static String LOCAL_CLIENT_FAILED(Object arg0) { - return localizer.localize(localizableLOCAL_CLIENT_FAILED(arg0)); - } - - public static Localizable localizableRUNTIME_WSDLPARSER_INVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) { - return messageFactory.getMessage("runtime.wsdlparser.invalidWSDL", arg0, arg1, arg2, arg3); - } - - /** - * Invalid WSDL {0}, expected {1} found {2} at (line{3}) - * - */ - public static String RUNTIME_WSDLPARSER_INVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) { - return localizer.localize(localizableRUNTIME_WSDLPARSER_INVALID_WSDL(arg0, arg1, arg2, arg3)); - } - - public static Localizable localizableWSDL_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("wsdl.not.found", arg0); - } - - /** - * WSDL url {0} is not accessible. - * - */ - public static String WSDL_NOT_FOUND(Object arg0) { - return localizer.localize(localizableWSDL_NOT_FOUND(arg0)); - } - - public static Localizable localizableHTTP_CLIENT_FAILED(Object arg0) { - return messageFactory.getMessage("http.client.failed", arg0); - } - - /** - * HTTP transport error: {0} - * - */ - public static String HTTP_CLIENT_FAILED(Object arg0) { - return localizer.localize(localizableHTTP_CLIENT_FAILED(arg0)); - } - - public static Localizable localizableINVALID_SERVICE_NAME_NULL(Object arg0) { - return messageFactory.getMessage("invalid.service.name.null", arg0); - } - - /** - * {0} is not a valid service - * - */ - public static String INVALID_SERVICE_NAME_NULL(Object arg0) { - return localizer.localize(localizableINVALID_SERVICE_NAME_NULL(arg0)); - } - - public static Localizable localizableINVALID_WSDL_URL(Object arg0) { - return messageFactory.getMessage("invalid.wsdl.url", arg0); - } - - /** - * Invalid WSDL URL: {0} - * - */ - public static String INVALID_WSDL_URL(Object arg0) { - return localizer.localize(localizableINVALID_WSDL_URL(arg0)); - } - - public static Localizable localizableINVALID_PORT_NAME(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.port.name", arg0, arg1); - } - - /** - * {0} is not a valid port. Valid ports are: {1} - * - */ - public static String INVALID_PORT_NAME(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_PORT_NAME(arg0, arg1)); + return LOCALIZER.localize(localizableHTTP_STATUS_CODE(arg0, arg1)); } public static Localizable localizableINVALID_SERVICE_NAME(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.service.name", arg0, arg1); + return MESSAGE_FACTORY.getMessage("invalid.service.name", arg0, arg1); } /** @@ -324,11 +129,96 @@ public final class ClientMessages { * */ public static String INVALID_SERVICE_NAME(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_SERVICE_NAME(arg0, arg1)); + return LOCALIZER.localize(localizableINVALID_SERVICE_NAME(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_WSDLPARSER_INVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) { + return MESSAGE_FACTORY.getMessage("runtime.wsdlparser.invalidWSDL", arg0, arg1, arg2, arg3); + } + + /** + * Invalid WSDL {0}, expected {1} found {2} at (line{3}) + * + */ + public static String RUNTIME_WSDLPARSER_INVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) { + return LOCALIZER.localize(localizableRUNTIME_WSDLPARSER_INVALID_WSDL(arg0, arg1, arg2, arg3)); + } + + public static Localizable localizableNON_LOGICAL_HANDLER_SET(Object arg0) { + return MESSAGE_FACTORY.getMessage("non.logical.handler.set", arg0); + } + + /** + * Cannot set {0} on binding. Handler must be a LogicalHandler. + * + */ + public static String NON_LOGICAL_HANDLER_SET(Object arg0) { + return LOCALIZER.localize(localizableNON_LOGICAL_HANDLER_SET(arg0)); + } + + public static Localizable localizableINVALID_PORT_NAME(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("invalid.port.name", arg0, arg1); + } + + /** + * {0} is not a valid port. Valid ports are: {1} + * + */ + public static String INVALID_PORT_NAME(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableINVALID_PORT_NAME(arg0, arg1)); + } + + public static Localizable localizableINVALID_SOAP_ACTION() { + return MESSAGE_FACTORY.getMessage("invalid.soap.action"); + } + + /** + * A valid SOAPAction should be set in the RequestContext when Addressing is enabled, Use BindingProvider.SOAPACTION_URI_PROPERTY to set it. + * + */ + public static String INVALID_SOAP_ACTION() { + return LOCALIZER.localize(localizableINVALID_SOAP_ACTION()); + } + + public static Localizable localizableINVALID_ADDRESS(Object arg0) { + return MESSAGE_FACTORY.getMessage("invalid.address", arg0); + } + + /** + * Invalid address: {0} + * + */ + public static String INVALID_ADDRESS(Object arg0) { + return LOCALIZER.localize(localizableINVALID_ADDRESS(arg0)); + } + + public static Localizable localizableFAILED_TO_PARSE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("failed.to.parse", arg0, arg1); + } + + /** + * Failed to access the WSDL at: {0}. It failed with: + * {1}. + * + */ + public static String FAILED_TO_PARSE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableFAILED_TO_PARSE(arg0, arg1)); + } + + public static Localizable localizableHTTP_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("http.not.found", arg0); + } + + /** + * HTTP Status-Code 404: Not Found - {0} + * + */ + public static String HTTP_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableHTTP_NOT_FOUND(arg0)); } public static Localizable localizableUNSUPPORTED_OPERATION(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("unsupported.operation", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("unsupported.operation", arg0, arg1, arg2); } /** @@ -336,11 +226,47 @@ public final class ClientMessages { * */ public static String UNSUPPORTED_OPERATION(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableUNSUPPORTED_OPERATION(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableUNSUPPORTED_OPERATION(arg0, arg1, arg2)); + } + + public static Localizable localizableWSDL_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("wsdl.not.found", arg0); + } + + /** + * WSDL url {0} is not accessible. + * + */ + public static String WSDL_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableWSDL_NOT_FOUND(arg0)); + } + + public static Localizable localizableINVALID_SERVICE_NAME_NULL(Object arg0) { + return MESSAGE_FACTORY.getMessage("invalid.service.name.null", arg0); + } + + /** + * {0} is not a valid service + * + */ + public static String INVALID_SERVICE_NAME_NULL(Object arg0) { + return LOCALIZER.localize(localizableINVALID_SERVICE_NAME_NULL(arg0)); + } + + public static Localizable localizableHTTP_CLIENT_FAILED(Object arg0) { + return MESSAGE_FACTORY.getMessage("http.client.failed", arg0); + } + + /** + * HTTP transport error: {0} + * + */ + public static String HTTP_CLIENT_FAILED(Object arg0) { + return LOCALIZER.localize(localizableHTTP_CLIENT_FAILED(arg0)); } public static Localizable localizableFAILED_TO_PARSE_EPR(Object arg0) { - return messageFactory.getMessage("failed.to.parse.epr", arg0); + return MESSAGE_FACTORY.getMessage("failed.to.parse.epr", arg0); } /** @@ -348,7 +274,90 @@ public final class ClientMessages { * */ public static String FAILED_TO_PARSE_EPR(Object arg0) { - return localizer.localize(localizableFAILED_TO_PARSE_EPR(arg0)); + return LOCALIZER.localize(localizableFAILED_TO_PARSE_EPR(arg0)); + } + + public static Localizable localizableLOCAL_CLIENT_FAILED(Object arg0) { + return MESSAGE_FACTORY.getMessage("local.client.failed", arg0); + } + + /** + * local transport error: {0} + * + */ + public static String LOCAL_CLIENT_FAILED(Object arg0) { + return LOCALIZER.localize(localizableLOCAL_CLIENT_FAILED(arg0)); + } + + public static Localizable localizableUNDEFINED_BINDING(Object arg0) { + return MESSAGE_FACTORY.getMessage("undefined.binding", arg0); + } + + /** + * Undefined binding: {0} + * + */ + public static String UNDEFINED_BINDING(Object arg0) { + return LOCALIZER.localize(localizableUNDEFINED_BINDING(arg0)); + } + + public static Localizable localizableINVALID_SERVICE_NO_WSDL(Object arg0) { + return MESSAGE_FACTORY.getMessage("invalid.service.no.wsdl", arg0); + } + + /** + * No wsdl metadata for service: {0}, can't create proxy! Try creating Service by providing a WSDL URL + * + */ + public static String INVALID_SERVICE_NO_WSDL(Object arg0) { + return LOCALIZER.localize(localizableINVALID_SERVICE_NO_WSDL(arg0)); + } + + public static Localizable localizableWSDL_CONTAINS_NO_SERVICE(Object arg0) { + return MESSAGE_FACTORY.getMessage("wsdl.contains.no.service", arg0); + } + + /** + * WSDL {0} contains no service definition. + * + */ + public static String WSDL_CONTAINS_NO_SERVICE(Object arg0) { + return LOCALIZER.localize(localizableWSDL_CONTAINS_NO_SERVICE(arg0)); + } + + public static Localizable localizableINVALID_BINDING_ID(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("invalid.binding.id", arg0, arg1); + } + + /** + * Invalid binding id: {0}. Must be: {1} + * + */ + public static String INVALID_BINDING_ID(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableINVALID_BINDING_ID(arg0, arg1)); + } + + public static Localizable localizableUNDEFINED_PORT_TYPE(Object arg0) { + return MESSAGE_FACTORY.getMessage("undefined.portType", arg0); + } + + /** + * Undefined port type: {0} + * + */ + public static String UNDEFINED_PORT_TYPE(Object arg0) { + return LOCALIZER.localize(localizableUNDEFINED_PORT_TYPE(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocal.properties similarity index 94% rename from jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocal.properties index c0267b823ea..d79956811cb 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocal.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocalMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocalMessages.java new file mode 100644 index 00000000000..d52a1ab00d3 --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocalMessages.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.resources; + +import java.util.Locale; +import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; + + +/** + * Defines string formatting method for each constant in the resource file + * + */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") +public final class ContextClassloaderLocalMessages { + + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.ContextClassloaderLocal"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ContextClassloaderLocalMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); + + public static Localizable localizableFAILED_TO_CREATE_NEW_INSTANCE(Object arg0) { + return MESSAGE_FACTORY.getMessage("FAILED_TO_CREATE_NEW_INSTANCE", arg0); + } + + /** + * Failed to create new instance of {0} + * + */ + public static String FAILED_TO_CREATE_NEW_INSTANCE(Object arg0) { + return LOCALIZER.localize(localizableFAILED_TO_CREATE_NEW_INSTANCE(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + + } + +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/DispatchMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/DispatchMessages.java index 4d5c7fab190..f6179248ec1 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/DispatchMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/DispatchMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,138 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class DispatchMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.dispatch"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, DispatchMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableINVALID_NULLARG_XMLHTTP_REQUEST_METHOD(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.nullarg.xmlhttp.request.method", arg0, arg1); - } - - /** - * A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals {0} with a Null invocation Argument is not allowed. Must be: {1} - * - */ - public static String INVALID_NULLARG_XMLHTTP_REQUEST_METHOD(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_NULLARG_XMLHTTP_REQUEST_METHOD(arg0, arg1)); - } - - public static Localizable localizableINVALID_NULLARG_URI() { - return messageFactory.getMessage("invalid.nullarg.uri"); - } - - /** - * Endpoint address URI is not allowed with a null argument - * - */ - public static String INVALID_NULLARG_URI() { - return localizer.localize(localizableINVALID_NULLARG_URI()); - } - - public static Localizable localizableINVALID_SOAPMESSAGE_DISPATCH_MSGMODE(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.soapmessage.dispatch.msgmode", arg0, arg1); - } - - /** - * Can not create Dispatch of {0}. Must be {1}. - * - */ - public static String INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_SOAPMESSAGE_DISPATCH_MSGMODE(arg0, arg1)); - } - - public static Localizable localizableINVALID_RESPONSE_DESERIALIZATION() { - return messageFactory.getMessage("invalid.response.deserialization"); - } - - /** - * Failed to deserialize the response. - * - */ - public static String INVALID_RESPONSE_DESERIALIZATION() { - return localizer.localize(localizableINVALID_RESPONSE_DESERIALIZATION()); - } - - public static Localizable localizableINVALID_QUERY_LEADING_CHAR(Object arg0) { - return messageFactory.getMessage("invalid.query.leading.char", arg0); - } - - /** - * Leading '?' of MessageContext.QUERY_STRING: {0} is not valid. Remove '?' and run again. - * - */ - public static String INVALID_QUERY_LEADING_CHAR(Object arg0) { - return localizer.localize(localizableINVALID_QUERY_LEADING_CHAR(arg0)); - } - - public static Localizable localizableINVALID_QUERY_STRING(Object arg0) { - return messageFactory.getMessage("invalid.query.string", arg0); - } - - /** - * Unable to resolve endpoint address using the supplied query string: {0}. - * - */ - public static String INVALID_QUERY_STRING(Object arg0) { - return localizer.localize(localizableINVALID_QUERY_STRING(arg0)); - } - - public static Localizable localizableDUPLICATE_PORT(Object arg0) { - return messageFactory.getMessage("duplicate.port", arg0); - } - - /** - * WSDLPort {0} already exists. Can not create a port of the same QName. - * - */ - public static String DUPLICATE_PORT(Object arg0) { - return localizer.localize(localizableDUPLICATE_PORT(arg0)); - } - - public static Localizable localizableINVALID_DATASOURCE_DISPATCH_BINDING(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.datasource.dispatch.binding", arg0, arg1); - } - - /** - * Can not create Dispatch with {0}. Must be: {1} - * - */ - public static String INVALID_DATASOURCE_DISPATCH_BINDING(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_DATASOURCE_DISPATCH_BINDING(arg0, arg1)); - } - - public static Localizable localizableINVALID_DATASOURCE_DISPATCH_MSGMODE(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.datasource.dispatch.msgmode", arg0, arg1); - } - - /** - * Can not create Dispatch of Service.Mode.PAYLOAD{0}. Must be: {1} - * - */ - public static String INVALID_DATASOURCE_DISPATCH_MSGMODE(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_DATASOURCE_DISPATCH_MSGMODE(arg0, arg1)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new DispatchMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableINVALID_NULLARG_SOAP_MSGMODE(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.nullarg.soap.msgmode", arg0, arg1); + return MESSAGE_FACTORY.getMessage("invalid.nullarg.soap.msgmode", arg0, arg1); } /** @@ -164,71 +54,23 @@ public final class DispatchMessages { * */ public static String INVALID_NULLARG_SOAP_MSGMODE(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_NULLARG_SOAP_MSGMODE(arg0, arg1)); + return LOCALIZER.localize(localizableINVALID_NULLARG_SOAP_MSGMODE(arg0, arg1)); } - public static Localizable localizableINVALID_URI(Object arg0) { - return messageFactory.getMessage("invalid.uri", arg0); + public static Localizable localizableINVALID_QUERY_STRING(Object arg0) { + return MESSAGE_FACTORY.getMessage("invalid.query.string", arg0); } /** - * Endpoint String: {0} is and invalid URI. + * Unable to resolve endpoint address using the supplied query string: {0}. * */ - public static String INVALID_URI(Object arg0) { - return localizer.localize(localizableINVALID_URI(arg0)); - } - - public static Localizable localizableINVALID_SOAPMESSAGE_DISPATCH_BINDING(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.soapmessage.dispatch.binding", arg0, arg1); - } - - /** - * Can not create Dispatch with {0} Binding. Must be: {1} Binding. - * - */ - public static String INVALID_SOAPMESSAGE_DISPATCH_BINDING(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_SOAPMESSAGE_DISPATCH_BINDING(arg0, arg1)); - } - - public static Localizable localizableINVALID_URI_PATH_QUERY(Object arg0, Object arg1) { - return messageFactory.getMessage("invalid.uri.path.query", arg0, arg1); - } - - /** - * Unable to construct a URI with this path info {0} and this query string {1}. - * - */ - public static String INVALID_URI_PATH_QUERY(Object arg0, Object arg1) { - return localizer.localize(localizableINVALID_URI_PATH_QUERY(arg0, arg1)); - } - - public static Localizable localizableINVALID_RESPONSE() { - return messageFactory.getMessage("invalid.response"); - } - - /** - * No response returned. - * - */ - public static String INVALID_RESPONSE() { - return localizer.localize(localizableINVALID_RESPONSE()); - } - - public static Localizable localizableINVALID_URI_RESOLUTION(Object arg0) { - return messageFactory.getMessage("invalid.uri.resolution", arg0); - } - - /** - * Unable to resolve endpoint address using the supplied path: {0}. - * - */ - public static String INVALID_URI_RESOLUTION(Object arg0) { - return localizer.localize(localizableINVALID_URI_RESOLUTION(arg0)); + public static String INVALID_QUERY_STRING(Object arg0) { + return LOCALIZER.localize(localizableINVALID_QUERY_STRING(arg0)); } public static Localizable localizableINVALID_URI_DECODE() { - return messageFactory.getMessage("invalid.uri.decode"); + return MESSAGE_FACTORY.getMessage("invalid.uri.decode"); } /** @@ -236,7 +78,174 @@ public final class DispatchMessages { * */ public static String INVALID_URI_DECODE() { - return localizer.localize(localizableINVALID_URI_DECODE()); + return LOCALIZER.localize(localizableINVALID_URI_DECODE()); + } + + public static Localizable localizableINVALID_URI_RESOLUTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("invalid.uri.resolution", arg0); + } + + /** + * Unable to resolve endpoint address using the supplied path: {0}. + * + */ + public static String INVALID_URI_RESOLUTION(Object arg0) { + return LOCALIZER.localize(localizableINVALID_URI_RESOLUTION(arg0)); + } + + public static Localizable localizableINVALID_NULLARG_URI() { + return MESSAGE_FACTORY.getMessage("invalid.nullarg.uri"); + } + + /** + * Endpoint address URI is not allowed with a null argument + * + */ + public static String INVALID_NULLARG_URI() { + return LOCALIZER.localize(localizableINVALID_NULLARG_URI()); + } + + public static Localizable localizableINVALID_URI_PATH_QUERY(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("invalid.uri.path.query", arg0, arg1); + } + + /** + * Unable to construct a URI with this path info {0} and this query string {1}. + * + */ + public static String INVALID_URI_PATH_QUERY(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableINVALID_URI_PATH_QUERY(arg0, arg1)); + } + + public static Localizable localizableINVALID_URI(Object arg0) { + return MESSAGE_FACTORY.getMessage("invalid.uri", arg0); + } + + /** + * Endpoint String: {0} is and invalid URI. + * + */ + public static String INVALID_URI(Object arg0) { + return LOCALIZER.localize(localizableINVALID_URI(arg0)); + } + + public static Localizable localizableINVALID_DATASOURCE_DISPATCH_MSGMODE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("invalid.datasource.dispatch.msgmode", arg0, arg1); + } + + /** + * Can not create Dispatch of Service.Mode.PAYLOAD{0}. Must be: {1} + * + */ + public static String INVALID_DATASOURCE_DISPATCH_MSGMODE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableINVALID_DATASOURCE_DISPATCH_MSGMODE(arg0, arg1)); + } + + public static Localizable localizableDUPLICATE_PORT(Object arg0) { + return MESSAGE_FACTORY.getMessage("duplicate.port", arg0); + } + + /** + * WSDLPort {0} already exists. Can not create a port of the same QName. + * + */ + public static String DUPLICATE_PORT(Object arg0) { + return LOCALIZER.localize(localizableDUPLICATE_PORT(arg0)); + } + + public static Localizable localizableINVALID_SOAPMESSAGE_DISPATCH_BINDING(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("invalid.soapmessage.dispatch.binding", arg0, arg1); + } + + /** + * Can not create Dispatch with {0} Binding. Must be: {1} Binding. + * + */ + public static String INVALID_SOAPMESSAGE_DISPATCH_BINDING(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableINVALID_SOAPMESSAGE_DISPATCH_BINDING(arg0, arg1)); + } + + public static Localizable localizableINVALID_QUERY_LEADING_CHAR(Object arg0) { + return MESSAGE_FACTORY.getMessage("invalid.query.leading.char", arg0); + } + + /** + * Leading '?' of MessageContext.QUERY_STRING: {0} is not valid. Remove '?' and run again. + * + */ + public static String INVALID_QUERY_LEADING_CHAR(Object arg0) { + return LOCALIZER.localize(localizableINVALID_QUERY_LEADING_CHAR(arg0)); + } + + public static Localizable localizableINVALID_RESPONSE_DESERIALIZATION() { + return MESSAGE_FACTORY.getMessage("invalid.response.deserialization"); + } + + /** + * Failed to deserialize the response. + * + */ + public static String INVALID_RESPONSE_DESERIALIZATION() { + return LOCALIZER.localize(localizableINVALID_RESPONSE_DESERIALIZATION()); + } + + public static Localizable localizableINVALID_RESPONSE() { + return MESSAGE_FACTORY.getMessage("invalid.response"); + } + + /** + * No response returned. + * + */ + public static String INVALID_RESPONSE() { + return LOCALIZER.localize(localizableINVALID_RESPONSE()); + } + + public static Localizable localizableINVALID_SOAPMESSAGE_DISPATCH_MSGMODE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("invalid.soapmessage.dispatch.msgmode", arg0, arg1); + } + + /** + * Can not create Dispatch of {0}. Must be {1}. + * + */ + public static String INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableINVALID_SOAPMESSAGE_DISPATCH_MSGMODE(arg0, arg1)); + } + + public static Localizable localizableINVALID_DATASOURCE_DISPATCH_BINDING(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("invalid.datasource.dispatch.binding", arg0, arg1); + } + + /** + * Can not create Dispatch with {0}. Must be: {1} + * + */ + public static String INVALID_DATASOURCE_DISPATCH_BINDING(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableINVALID_DATASOURCE_DISPATCH_BINDING(arg0, arg1)); + } + + public static Localizable localizableINVALID_NULLARG_XMLHTTP_REQUEST_METHOD(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("invalid.nullarg.xmlhttp.request.method", arg0, arg1); + } + + /** + * A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals {0} with a Null invocation Argument is not allowed. Must be: {1} + * + */ + public static String INVALID_NULLARG_XMLHTTP_REQUEST_METHOD(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableINVALID_NULLARG_XMLHTTP_REQUEST_METHOD(arg0, arg1)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/EncodingMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/EncodingMessages.java index ecbf83bbcb7..a4d394d8752 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/EncodingMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/EncodingMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,54 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class EncodingMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.encoding"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, EncodingMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableFAILED_TO_READ_RESPONSE(Object arg0) { - return messageFactory.getMessage("failed.to.read.response", arg0); - } - - /** - * Failed to read a response: {0} - * - */ - public static String FAILED_TO_READ_RESPONSE(Object arg0) { - return localizer.localize(localizableFAILED_TO_READ_RESPONSE(arg0)); - } - - public static Localizable localizableEXCEPTION_INCORRECT_TYPE(Object arg0) { - return messageFactory.getMessage("exception.incorrectType", arg0); - } - - /** - * incorrect type. Expected java.lang.Exception, found {0} - * - */ - public static String EXCEPTION_INCORRECT_TYPE(Object arg0) { - return localizer.localize(localizableEXCEPTION_INCORRECT_TYPE(arg0)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new EncodingMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableEXCEPTION_NOTFOUND(Object arg0) { - return messageFactory.getMessage("exception.notfound", arg0); + return MESSAGE_FACTORY.getMessage("exception.notfound", arg0); } /** @@ -80,47 +54,11 @@ public final class EncodingMessages { * */ public static String EXCEPTION_NOTFOUND(Object arg0) { - return localizer.localize(localizableEXCEPTION_NOTFOUND(arg0)); - } - - public static Localizable localizableXSD_UNEXPECTED_ELEMENT_NAME(Object arg0, Object arg1) { - return messageFactory.getMessage("xsd.unexpectedElementName", arg0, arg1); - } - - /** - * unexpected element name: expected={0}, actual: {1} - * - */ - public static String XSD_UNEXPECTED_ELEMENT_NAME(Object arg0, Object arg1) { - return localizer.localize(localizableXSD_UNEXPECTED_ELEMENT_NAME(arg0, arg1)); - } - - public static Localizable localizableNESTED_DESERIALIZATION_ERROR(Object arg0) { - return messageFactory.getMessage("nestedDeserializationError", arg0); - } - - /** - * deserialization error: {0} - * - */ - public static String NESTED_DESERIALIZATION_ERROR(Object arg0) { - return localizer.localize(localizableNESTED_DESERIALIZATION_ERROR(arg0)); - } - - public static Localizable localizableNESTED_ENCODING_ERROR(Object arg0) { - return messageFactory.getMessage("nestedEncodingError", arg0); - } - - /** - * encoding error: {0} - * - */ - public static String NESTED_ENCODING_ERROR(Object arg0) { - return localizer.localize(localizableNESTED_ENCODING_ERROR(arg0)); + return LOCALIZER.localize(localizableEXCEPTION_NOTFOUND(arg0)); } public static Localizable localizableXSD_UNKNOWN_PREFIX(Object arg0) { - return messageFactory.getMessage("xsd.unknownPrefix", arg0); + return MESSAGE_FACTORY.getMessage("xsd.unknownPrefix", arg0); } /** @@ -128,11 +66,59 @@ public final class EncodingMessages { * */ public static String XSD_UNKNOWN_PREFIX(Object arg0) { - return localizer.localize(localizableXSD_UNKNOWN_PREFIX(arg0)); + return LOCALIZER.localize(localizableXSD_UNKNOWN_PREFIX(arg0)); + } + + public static Localizable localizableNESTED_ENCODING_ERROR(Object arg0) { + return MESSAGE_FACTORY.getMessage("nestedEncodingError", arg0); + } + + /** + * encoding error: {0} + * + */ + public static String NESTED_ENCODING_ERROR(Object arg0) { + return LOCALIZER.localize(localizableNESTED_ENCODING_ERROR(arg0)); + } + + public static Localizable localizableNESTED_DESERIALIZATION_ERROR(Object arg0) { + return MESSAGE_FACTORY.getMessage("nestedDeserializationError", arg0); + } + + /** + * deserialization error: {0} + * + */ + public static String NESTED_DESERIALIZATION_ERROR(Object arg0) { + return LOCALIZER.localize(localizableNESTED_DESERIALIZATION_ERROR(arg0)); + } + + public static Localizable localizableXSD_UNEXPECTED_ELEMENT_NAME(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("xsd.unexpectedElementName", arg0, arg1); + } + + /** + * unexpected element name: expected={0}, actual: {1} + * + */ + public static String XSD_UNEXPECTED_ELEMENT_NAME(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableXSD_UNEXPECTED_ELEMENT_NAME(arg0, arg1)); + } + + public static Localizable localizableFAILED_TO_READ_RESPONSE(Object arg0) { + return MESSAGE_FACTORY.getMessage("failed.to.read.response", arg0); + } + + /** + * Failed to read a response: {0} + * + */ + public static String FAILED_TO_READ_RESPONSE(Object arg0) { + return LOCALIZER.localize(localizableFAILED_TO_READ_RESPONSE(arg0)); } public static Localizable localizableNESTED_SERIALIZATION_ERROR(Object arg0) { - return messageFactory.getMessage("nestedSerializationError", arg0); + return MESSAGE_FACTORY.getMessage("nestedSerializationError", arg0); } /** @@ -140,11 +126,11 @@ public final class EncodingMessages { * */ public static String NESTED_SERIALIZATION_ERROR(Object arg0) { - return localizer.localize(localizableNESTED_SERIALIZATION_ERROR(arg0)); + return LOCALIZER.localize(localizableNESTED_SERIALIZATION_ERROR(arg0)); } public static Localizable localizableNO_SUCH_CONTENT_ID(Object arg0) { - return messageFactory.getMessage("noSuchContentId", arg0); + return MESSAGE_FACTORY.getMessage("noSuchContentId", arg0); } /** @@ -152,7 +138,30 @@ public final class EncodingMessages { * */ public static String NO_SUCH_CONTENT_ID(Object arg0) { - return localizer.localize(localizableNO_SUCH_CONTENT_ID(arg0)); + return LOCALIZER.localize(localizableNO_SUCH_CONTENT_ID(arg0)); + } + + public static Localizable localizableEXCEPTION_INCORRECT_TYPE(Object arg0) { + return MESSAGE_FACTORY.getMessage("exception.incorrectType", arg0); + } + + /** + * incorrect type. Expected java.lang.Exception, found {0} + * + */ + public static String EXCEPTION_INCORRECT_TYPE(Object arg0) { + return LOCALIZER.localize(localizableEXCEPTION_INCORRECT_TYPE(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HandlerMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HandlerMessages.java index 2582b89b0c3..6c983def174 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HandlerMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HandlerMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,90 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class HandlerMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.handler"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, HandlerMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableHANDLER_MESSAGE_CONTEXT_INVALID_CLASS(Object arg0, Object arg1) { - return messageFactory.getMessage("handler.messageContext.invalid.class", arg0, arg1); - } - - /** - * "{0}" is not an allowed value for the property "{1}" - * - */ - public static String HANDLER_MESSAGE_CONTEXT_INVALID_CLASS(Object arg0, Object arg1) { - return localizer.localize(localizableHANDLER_MESSAGE_CONTEXT_INVALID_CLASS(arg0, arg1)); - } - - public static Localizable localizableCANNOT_EXTEND_HANDLER_DIRECTLY(Object arg0) { - return messageFactory.getMessage("cannot.extend.handler.directly", arg0); - } - - /** - * Handler {0} must implement LogicalHandler or SOAPHandler. - * - */ - public static String CANNOT_EXTEND_HANDLER_DIRECTLY(Object arg0) { - return localizer.localize(localizableCANNOT_EXTEND_HANDLER_DIRECTLY(arg0)); - } - - public static Localizable localizableHANDLER_NOT_VALID_TYPE(Object arg0) { - return messageFactory.getMessage("handler.not.valid.type", arg0); - } - - /** - * {0} does not implement one of the handler interfaces. - * - */ - public static String HANDLER_NOT_VALID_TYPE(Object arg0) { - return localizer.localize(localizableHANDLER_NOT_VALID_TYPE(arg0)); - } - - public static Localizable localizableCANNOT_INSTANTIATE_HANDLER(Object arg0, Object arg1) { - return messageFactory.getMessage("cannot.instantiate.handler", arg0, arg1); - } - - /** - * Unable to instantiate handler: {0} because: {1} - * - */ - public static String CANNOT_INSTANTIATE_HANDLER(Object arg0, Object arg1) { - return localizer.localize(localizableCANNOT_INSTANTIATE_HANDLER(arg0, arg1)); - } - - public static Localizable localizableHANDLER_CHAIN_CONTAINS_HANDLER_ONLY(Object arg0) { - return messageFactory.getMessage("handler.chain.contains.handler.only", arg0); - } - - /** - * A HandlerChain can only contain Handler instances: {0} - * - */ - public static String HANDLER_CHAIN_CONTAINS_HANDLER_ONLY(Object arg0) { - return localizer.localize(localizableHANDLER_CHAIN_CONTAINS_HANDLER_ONLY(arg0)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new HandlerMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableHANDLER_NESTED_ERROR(Object arg0) { - return messageFactory.getMessage("handler.nestedError", arg0); + return MESSAGE_FACTORY.getMessage("handler.nestedError", arg0); } /** @@ -116,11 +54,47 @@ public final class HandlerMessages { * */ public static String HANDLER_NESTED_ERROR(Object arg0) { - return localizer.localize(localizableHANDLER_NESTED_ERROR(arg0)); + return LOCALIZER.localize(localizableHANDLER_NESTED_ERROR(arg0)); + } + + public static Localizable localizableCANNOT_EXTEND_HANDLER_DIRECTLY(Object arg0) { + return MESSAGE_FACTORY.getMessage("cannot.extend.handler.directly", arg0); + } + + /** + * Handler {0} must implement LogicalHandler or SOAPHandler. + * + */ + public static String CANNOT_EXTEND_HANDLER_DIRECTLY(Object arg0) { + return LOCALIZER.localize(localizableCANNOT_EXTEND_HANDLER_DIRECTLY(arg0)); + } + + public static Localizable localizableHANDLER_NOT_VALID_TYPE(Object arg0) { + return MESSAGE_FACTORY.getMessage("handler.not.valid.type", arg0); + } + + /** + * {0} does not implement one of the handler interfaces. + * + */ + public static String HANDLER_NOT_VALID_TYPE(Object arg0) { + return LOCALIZER.localize(localizableHANDLER_NOT_VALID_TYPE(arg0)); + } + + public static Localizable localizableHANDLER_MESSAGE_CONTEXT_INVALID_CLASS(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("handler.messageContext.invalid.class", arg0, arg1); + } + + /** + * "{0}" is not an allowed value for the property "{1}" + * + */ + public static String HANDLER_MESSAGE_CONTEXT_INVALID_CLASS(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableHANDLER_MESSAGE_CONTEXT_INVALID_CLASS(arg0, arg1)); } public static Localizable localizableHANDLER_PREDESTROY_IGNORE(Object arg0) { - return messageFactory.getMessage("handler.predestroy.ignore", arg0); + return MESSAGE_FACTORY.getMessage("handler.predestroy.ignore", arg0); } /** @@ -128,7 +102,42 @@ public final class HandlerMessages { * */ public static String HANDLER_PREDESTROY_IGNORE(Object arg0) { - return localizer.localize(localizableHANDLER_PREDESTROY_IGNORE(arg0)); + return LOCALIZER.localize(localizableHANDLER_PREDESTROY_IGNORE(arg0)); + } + + public static Localizable localizableHANDLER_CHAIN_CONTAINS_HANDLER_ONLY(Object arg0) { + return MESSAGE_FACTORY.getMessage("handler.chain.contains.handler.only", arg0); + } + + /** + * A HandlerChain can only contain Handler instances: {0} + * + */ + public static String HANDLER_CHAIN_CONTAINS_HANDLER_ONLY(Object arg0) { + return LOCALIZER.localize(localizableHANDLER_CHAIN_CONTAINS_HANDLER_ONLY(arg0)); + } + + public static Localizable localizableCANNOT_INSTANTIATE_HANDLER(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("cannot.instantiate.handler", arg0, arg1); + } + + /** + * Unable to instantiate handler: {0} because: {1} + * + */ + public static String CANNOT_INSTANTIATE_HANDLER(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableCANNOT_INSTANTIATE_HANDLER(arg0, arg1)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java index 0a21d3e9784..24f6efea9cb 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,30 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class HttpserverMessages { - private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.httpserver"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, HttpserverMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.httpserver"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new HttpserverMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableUNEXPECTED_HTTP_METHOD(Object arg0) { - return messageFactory.getMessage("unexpected.http.method", arg0); + return MESSAGE_FACTORY.getMessage("unexpected.http.method", arg0); } /** @@ -56,7 +54,18 @@ public final class HttpserverMessages { * */ public static String UNEXPECTED_HTTP_METHOD(Object arg0) { - return localizer.localize(localizableUNEXPECTED_HTTP_METHOD(arg0)); + return LOCALIZER.localize(localizableUNEXPECTED_HTTP_METHOD(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ManagementMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ManagementMessages.java index ee61ddbfca8..e4102c24ddc 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ManagementMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ManagementMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,30 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class ManagementMessages { - private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.management"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, ManagementMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.management"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ManagementMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableWSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(Object arg0) { - return messageFactory.getMessage("WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE", arg0); + return MESSAGE_FACTORY.getMessage("WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE", arg0); } /** @@ -56,83 +54,11 @@ public final class ManagementMessages { * */ public static String WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(Object arg0) { - return localizer.localize(localizableWSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(arg0)); - } - - public static Localizable localizableWSM_1004_EXPECTED_XML_TAG(Object arg0, Object arg1) { - return messageFactory.getMessage("WSM_1004_EXPECTED_XML_TAG", arg0, arg1); - } - - /** - * WSM1004: Expected tag <{0}> but instead read <{1}>. - * - */ - public static String WSM_1004_EXPECTED_XML_TAG(Object arg0, Object arg1) { - return localizer.localize(localizableWSM_1004_EXPECTED_XML_TAG(arg0, arg1)); - } - - public static Localizable localizableWSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION() { - return messageFactory.getMessage("WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION"); - } - - /** - * WSM1007: Failed to create a ModelTranslator instance. - * - */ - public static String WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION() { - return localizer.localize(localizableWSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION()); - } - - public static Localizable localizableWSM_1002_EXPECTED_MANAGEMENT_ASSERTION(Object arg0) { - return messageFactory.getMessage("WSM_1002_EXPECTED_MANAGEMENT_ASSERTION", arg0); - } - - /** - * WSM1002: Expected policy assertion {0} in this namespace. - * - */ - public static String WSM_1002_EXPECTED_MANAGEMENT_ASSERTION(Object arg0) { - return localizer.localize(localizableWSM_1002_EXPECTED_MANAGEMENT_ASSERTION(arg0)); - } - - public static Localizable localizableWSM_1006_CLIENT_MANAGEMENT_ENABLED() { - return messageFactory.getMessage("WSM_1006_CLIENT_MANAGEMENT_ENABLED"); - } - - /** - * WSM1006: The management property of the ManagedClient policy assertion is set to on. Clients cannot be managed and this setting will be ignored. - * - */ - public static String WSM_1006_CLIENT_MANAGEMENT_ENABLED() { - return localizer.localize(localizableWSM_1006_CLIENT_MANAGEMENT_ENABLED()); - } - - public static Localizable localizableWSM_1001_FAILED_ASSERTION(Object arg0) { - return messageFactory.getMessage("WSM_1001_FAILED_ASSERTION", arg0); - } - - /** - * WSM1001: Failed to get policy assertion {0}. - * - */ - public static String WSM_1001_FAILED_ASSERTION(Object arg0) { - return localizer.localize(localizableWSM_1001_FAILED_ASSERTION(arg0)); - } - - public static Localizable localizableWSM_1005_EXPECTED_COMMUNICATION_CHILD() { - return messageFactory.getMessage("WSM_1005_EXPECTED_COMMUNICATION_CHILD"); - } - - /** - * WSM1005: Expected to find a CommunicationServerImplementation tag as child node of CommunicationServerImplementations. - * - */ - public static String WSM_1005_EXPECTED_COMMUNICATION_CHILD() { - return localizer.localize(localizableWSM_1005_EXPECTED_COMMUNICATION_CHILD()); + return LOCALIZER.localize(localizableWSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(arg0)); } public static Localizable localizableWSM_1003_MANAGEMENT_ASSERTION_MISSING_ID(Object arg0) { - return messageFactory.getMessage("WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID", arg0); + return MESSAGE_FACTORY.getMessage("WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID", arg0); } /** @@ -140,7 +66,90 @@ public final class ManagementMessages { * */ public static String WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID(Object arg0) { - return localizer.localize(localizableWSM_1003_MANAGEMENT_ASSERTION_MISSING_ID(arg0)); + return LOCALIZER.localize(localizableWSM_1003_MANAGEMENT_ASSERTION_MISSING_ID(arg0)); + } + + public static Localizable localizableWSM_1005_EXPECTED_COMMUNICATION_CHILD() { + return MESSAGE_FACTORY.getMessage("WSM_1005_EXPECTED_COMMUNICATION_CHILD"); + } + + /** + * WSM1005: Expected to find a CommunicationServerImplementation tag as child node of CommunicationServerImplementations. + * + */ + public static String WSM_1005_EXPECTED_COMMUNICATION_CHILD() { + return LOCALIZER.localize(localizableWSM_1005_EXPECTED_COMMUNICATION_CHILD()); + } + + public static Localizable localizableWSM_1006_CLIENT_MANAGEMENT_ENABLED() { + return MESSAGE_FACTORY.getMessage("WSM_1006_CLIENT_MANAGEMENT_ENABLED"); + } + + /** + * WSM1006: The management property of the ManagedClient policy assertion is set to on. Clients cannot be managed and this setting will be ignored. + * + */ + public static String WSM_1006_CLIENT_MANAGEMENT_ENABLED() { + return LOCALIZER.localize(localizableWSM_1006_CLIENT_MANAGEMENT_ENABLED()); + } + + public static Localizable localizableWSM_1002_EXPECTED_MANAGEMENT_ASSERTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("WSM_1002_EXPECTED_MANAGEMENT_ASSERTION", arg0); + } + + /** + * WSM1002: Expected policy assertion {0} in this namespace. + * + */ + public static String WSM_1002_EXPECTED_MANAGEMENT_ASSERTION(Object arg0) { + return LOCALIZER.localize(localizableWSM_1002_EXPECTED_MANAGEMENT_ASSERTION(arg0)); + } + + public static Localizable localizableWSM_1001_FAILED_ASSERTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("WSM_1001_FAILED_ASSERTION", arg0); + } + + /** + * WSM1001: Failed to get policy assertion {0}. + * + */ + public static String WSM_1001_FAILED_ASSERTION(Object arg0) { + return LOCALIZER.localize(localizableWSM_1001_FAILED_ASSERTION(arg0)); + } + + public static Localizable localizableWSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION() { + return MESSAGE_FACTORY.getMessage("WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION"); + } + + /** + * WSM1007: Failed to create a ModelTranslator instance. + * + */ + public static String WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION() { + return LOCALIZER.localize(localizableWSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION()); + } + + public static Localizable localizableWSM_1004_EXPECTED_XML_TAG(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("WSM_1004_EXPECTED_XML_TAG", arg0, arg1); + } + + /** + * WSM1004: Expected tag <{0}> but instead read <{1}>. + * + */ + public static String WSM_1004_EXPECTED_XML_TAG(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableWSM_1004_EXPECTED_XML_TAG(arg0, arg1)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ModelerMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ModelerMessages.java index 30708d38829..50b2cbfe545 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ModelerMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ModelerMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,330 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class ModelerMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.modeler"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, ModelerMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableNESTED_MODELER_ERROR(Object arg0) { - return messageFactory.getMessage("nestedModelerError", arg0); - } - - /** - * runtime modeler error: {0} - * - */ - public static String NESTED_MODELER_ERROR(Object arg0) { - return localizer.localize(localizableNESTED_MODELER_ERROR(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.modeler.wsfeature.no.ftrconstructor", arg0, arg1); - } - - /** - * Annotation {0} is not recognizable, at least one constructor of {1} should be marked with @FeatureConstructor - * - */ - public static String RUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(arg0, arg1)); - } - - public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(Object arg0) { - return messageFactory.getMessage("runtime.modeler.external.metadata.unable.to.read", arg0); - } - - /** - * Unable to read metadata file {0}. Check configuration/deployment. - * - */ - public static String RUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(Object arg0) { - return messageFactory.getMessage("runtime.modeler.webmethod.must.be.public", arg0); - } - - /** - * @WebMethod is not allowed on a non-public method {0} - * - */ - public static String RUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_WRAPPER_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("runtime.modeler.wrapper.not.found", arg0); - } - - /** - * Wrapper class {0} is not found. Have you run annotation processing to generate them? - * - */ - public static String RUNTIME_MODELER_WRAPPER_NOT_FOUND(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_WRAPPER_NOT_FOUND(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_MTOM_CONFLICT(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.modeler.mtom.conflict", arg0, arg1); - } - - /** - * Error in @BindingType: MTOM Configuration in binding identifier {0} conflicts with feature @MTOM {1} - * - */ - public static String RUNTIME_MODELER_MTOM_CONFLICT(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_MODELER_MTOM_CONFLICT(arg0, arg1)); - } - - public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(Object arg0) { - return messageFactory.getMessage("runtime.modeler.external.metadata.generic", arg0); - } - - /** - * An error occurred while processing external WS metadata; check configuration/deployment. Nested error: {0}. - * - */ - public static String RUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_FEATURE_CONFLICT(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.modeler.feature.conflict", arg0, arg1); - } - - /** - * Feature {0} in implementation conflicts with {1} in WSDL configuration - * - */ - public static String RUNTIME_MODELER_FEATURE_CONFLICT(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_MODELER_FEATURE_CONFLICT(arg0, arg1)); - } - - public static Localizable localizableRUNTIME_MODELER_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.modeler.invalid.soapbinding.parameterstyle", arg0, arg1); - } - - /** - * Incorrect usage of Annotation {0} on {1}, ParameterStyle can only be WRAPPED with RPC Style Web service. - * - */ - public static String RUNTIME_MODELER_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_MODELER_INVALID_SOAPBINDING_PARAMETERSTYLE(arg0, arg1)); - } - - public static Localizable localizableRUNTIME_MODELER_WSFEATURE_MORETHANONE_FTRCONSTRUCTOR(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.modeler.wsfeature.morethanone.ftrconstructor", arg0, arg1); - } - - /** - * Annotation {0} is illegal, Only one constructor of {1} can be marked as @FeatureConstructor - * - */ - public static String RUNTIME_MODELER_WSFEATURE_MORETHANONE_FTRCONSTRUCTOR(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_MODELER_WSFEATURE_MORETHANONE_FTRCONSTRUCTOR(arg0, arg1)); - } - - public static Localizable localizableNOT_A_VALID_BARE_METHOD(Object arg0, Object arg1) { - return messageFactory.getMessage("not.a.valid.bare.method", arg0, arg1); - } - - /** - * SEI {0} has method {1} annotated as BARE but it has more than one parameter bound to body. This is invalid. Please annotate the method with annotation: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) - * - */ - public static String NOT_A_VALID_BARE_METHOD(Object arg0, Object arg1) { - return localizer.localize(localizableNOT_A_VALID_BARE_METHOD(arg0, arg1)); - } - - public static Localizable localizableRUNTIME_MODELER_NO_PACKAGE(Object arg0) { - return messageFactory.getMessage("runtime.modeler.no.package", arg0); - } - - /** - * A @WebService.targetNamespace must be specified on classes with no package. Class: {0} - * - */ - public static String RUNTIME_MODELER_NO_PACKAGE(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_NO_PACKAGE(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_NO_WEBSERVICE_ANNOTATION(Object arg0) { - return messageFactory.getMessage("runtime.modeler.no.webservice.annotation", arg0); - } - - /** - * A WebService annotation is not present on class: {0} - * - */ - public static String RUNTIME_MODELER_NO_WEBSERVICE_ANNOTATION(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_NO_WEBSERVICE_ANNOTATION(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(Object arg0) { - return messageFactory.getMessage("runtime.modeler.addressing.responses.nosuchmethod", arg0); - } - - /** - * JAX-WS 2.1 API is loaded from {0}, But JAX-WS runtime requires JAX-WS 2.2 API. Use the endorsed standards override mechanism to load JAX-WS 2.2 API - * - */ - public static String RUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(Object arg0) { - return messageFactory.getMessage("runtime.modeler.external.metadata.wrong.format", arg0); - } - - /** - * Unable to read metadata from {0}. Is the format correct? - * - */ - public static String RUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_OUT_PARAMETERS(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.modeler.oneway.operation.no.out.parameters", arg0, arg1); - } - - /** - * oneway operation should not have OUT parameters class: {0} method: {1} - * - */ - public static String RUNTIME_MODELER_ONEWAY_OPERATION_NO_OUT_PARAMETERS(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_OUT_PARAMETERS(arg0, arg1)); - } - - public static Localizable localizableUNABLE_TO_CREATE_JAXB_CONTEXT() { - return messageFactory.getMessage("unable.to.create.JAXBContext"); - } - - /** - * Unable to create JAXBContext - * - */ - public static String UNABLE_TO_CREATE_JAXB_CONTEXT() { - return localizer.localize(localizableUNABLE_TO_CREATE_JAXB_CONTEXT()); - } - - public static Localizable localizableRUNTIME_MODELER_NO_OPERATIONS(Object arg0) { - return messageFactory.getMessage("runtime.modeler.no.operations", arg0); - } - - /** - * The web service defined by the class {0} does not contain any valid WebMethods. - * - */ - public static String RUNTIME_MODELER_NO_OPERATIONS(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_NO_OPERATIONS(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_CHECKED_EXCEPTIONS(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("runtime.modeler.oneway.operation.no.checked.exceptions", arg0, arg1, arg2); - } - - /** - * Oneway operation should not throw any checked exceptions class: {0} method: {1} throws: {2} - * - */ - public static String RUNTIME_MODELER_ONEWAY_OPERATION_NO_CHECKED_EXCEPTIONS(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_CHECKED_EXCEPTIONS(arg0, arg1, arg2)); - } - - public static Localizable localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATIC(Object arg0) { - return messageFactory.getMessage("runtime.modeler.webmethod.must.be.nonstatic", arg0); - } - - /** - * @WebMethod is not allowed on a static method {0} - * - */ - public static String RUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATIC(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATIC(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_METHOD_NOT_FOUND(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.modeler.method.not.found", arg0, arg1); - } - - /** - * method: {0} could not be found on class: {1} - * - */ - public static String RUNTIME_MODELER_METHOD_NOT_FOUND(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_MODELER_METHOD_NOT_FOUND(arg0, arg1)); - } - - public static Localizable localizableRUNTIME_MODELER_CLASS_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("runtime.modeler.class.not.found", arg0); - } - - /** - * class: {0} could not be found - * - */ - public static String RUNTIME_MODELER_CLASS_NOT_FOUND(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_CLASS_NOT_FOUND(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_SOAPBINDING_CONFLICT(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("runtime.modeler.soapbinding.conflict", arg0, arg1, arg2); - } - - /** - * SOAPBinding Style {0} for method {1} conflicts with global SOAPBinding Style {2} - * - */ - public static String RUNTIME_MODELER_SOAPBINDING_CONFLICT(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableRUNTIME_MODELER_SOAPBINDING_CONFLICT(arg0, arg1, arg2)); - } - - public static Localizable localizableRUNTIME_MODELER_CANNOT_GET_SERVICE_NAME_FROM_INTERFACE(Object arg0) { - return messageFactory.getMessage("runtime.modeler.cannot.get.serviceName.from.interface", arg0); - } - - /** - * The serviceName cannot be retrieved from an interface. class {0} - * - */ - public static String RUNTIME_MODELER_CANNOT_GET_SERVICE_NAME_FROM_INTERFACE(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_CANNOT_GET_SERVICE_NAME_FROM_INTERFACE(arg0)); - } - - public static Localizable localizableRUNTIME_MODELER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) { - return messageFactory.getMessage("runtime.modeler.endpoint.interface.no.webservice", arg0); - } - - /** - * The Endpoint Interface: {0} does not have WebService Annotation - * - */ - public static String RUNTIME_MODELER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_ENDPOINT_INTERFACE_NO_WEBSERVICE(arg0)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ModelerMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNSUPPORTED_SCHEMA(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.modeler.external.metadata.unsupported.schema", arg0, arg1); + return MESSAGE_FACTORY.getMessage("runtime.modeler.external.metadata.unsupported.schema", arg0, arg1); } /** @@ -356,11 +54,59 @@ public final class ModelerMessages { * */ public static String RUNTIME_MODELER_EXTERNAL_METADATA_UNSUPPORTED_SCHEMA(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNSUPPORTED_SCHEMA(arg0, arg1)); + return LOCALIZER.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNSUPPORTED_SCHEMA(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_CHECKED_EXCEPTIONS(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.oneway.operation.no.checked.exceptions", arg0, arg1, arg2); + } + + /** + * Oneway operation should not throw any checked exceptions class: {0} method: {1} throws: {2} + * + */ + public static String RUNTIME_MODELER_ONEWAY_OPERATION_NO_CHECKED_EXCEPTIONS(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_CHECKED_EXCEPTIONS(arg0, arg1, arg2)); + } + + public static Localizable localizableRUNTIME_MODELER_NO_PACKAGE(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.no.package", arg0); + } + + /** + * A @WebService.targetNamespace must be specified on classes with no package. Class: {0} + * + */ + public static String RUNTIME_MODELER_NO_PACKAGE(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_NO_PACKAGE(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.external.metadata.unable.to.read", arg0); + } + + /** + * Unable to read metadata file {0}. Check configuration/deployment. + * + */ + public static String RUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATIC(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.webmethod.must.be.nonstatic", arg0); + } + + /** + * @WebMethod is not allowed on a static method {0} + * + */ + public static String RUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATIC(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATIC(arg0)); } public static Localizable localizableRUNTIMEMODELER_INVALID_SOAPBINDING_ON_METHOD(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("runtimemodeler.invalid.soapbindingOnMethod", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("runtimemodeler.invalid.soapbindingOnMethod", arg0, arg1, arg2); } /** @@ -368,23 +114,143 @@ public final class ModelerMessages { * */ public static String RUNTIMEMODELER_INVALID_SOAPBINDING_ON_METHOD(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableRUNTIMEMODELER_INVALID_SOAPBINDING_ON_METHOD(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableRUNTIMEMODELER_INVALID_SOAPBINDING_ON_METHOD(arg0, arg1, arg2)); } - public static Localizable localizableRUNTIME_MODELER_PORTNAME_SERVICENAME_NAMESPACE_MISMATCH(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.modeler.portname.servicename.namespace.mismatch", arg0, arg1); + public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.external.metadata.wrong.format", arg0); } /** - * The namespace of the serviceName "{0}" and the namespace of the portName "{1}" must match + * Unable to read metadata from {0}. Is the format correct? * */ - public static String RUNTIME_MODELER_PORTNAME_SERVICENAME_NAMESPACE_MISMATCH(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_MODELER_PORTNAME_SERVICENAME_NAMESPACE_MISMATCH(arg0, arg1)); + public static String RUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_NO_WEBSERVICE_ANNOTATION(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.no.webservice.annotation", arg0); + } + + /** + * A WebService annotation is not present on class: {0} + * + */ + public static String RUNTIME_MODELER_NO_WEBSERVICE_ANNOTATION(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_NO_WEBSERVICE_ANNOTATION(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_SOAPBINDING_CONFLICT(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.soapbinding.conflict", arg0, arg1, arg2); + } + + /** + * SOAPBinding Style {0} for method {1} conflicts with global SOAPBinding Style {2} + * + */ + public static String RUNTIME_MODELER_SOAPBINDING_CONFLICT(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_SOAPBINDING_CONFLICT(arg0, arg1, arg2)); + } + + public static Localizable localizableNESTED_MODELER_ERROR(Object arg0) { + return MESSAGE_FACTORY.getMessage("nestedModelerError", arg0); + } + + /** + * runtime modeler error: {0} + * + */ + public static String NESTED_MODELER_ERROR(Object arg0) { + return LOCALIZER.localize(localizableNESTED_MODELER_ERROR(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_METHOD_NOT_FOUND(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.method.not.found", arg0, arg1); + } + + /** + * method: {0} could not be found on class: {1} + * + */ + public static String RUNTIME_MODELER_METHOD_NOT_FOUND(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_METHOD_NOT_FOUND(arg0, arg1)); + } + + public static Localizable localizableUNABLE_TO_CREATE_JAXB_CONTEXT() { + return MESSAGE_FACTORY.getMessage("unable.to.create.JAXBContext"); + } + + /** + * Unable to create JAXBContext + * + */ + public static String UNABLE_TO_CREATE_JAXB_CONTEXT() { + return LOCALIZER.localize(localizableUNABLE_TO_CREATE_JAXB_CONTEXT()); + } + + public static Localizable localizableRUNTIME_MODELER_NO_OPERATIONS(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.no.operations", arg0); + } + + /** + * The web service defined by the class {0} does not contain any valid WebMethods. + * + */ + public static String RUNTIME_MODELER_NO_OPERATIONS(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_NO_OPERATIONS(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_WRAPPER_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.wrapper.not.found", arg0); + } + + /** + * Wrapper class {0} is not found. Have you run annotation processing to generate them? + * + */ + public static String RUNTIME_MODELER_WRAPPER_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_WRAPPER_NOT_FOUND(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.invalid.soapbinding.parameterstyle", arg0, arg1); + } + + /** + * Incorrect usage of Annotation {0} on {1}, ParameterStyle can only be WRAPPED with RPC Style Web service. + * + */ + public static String RUNTIME_MODELER_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_INVALID_SOAPBINDING_PARAMETERSTYLE(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.external.metadata.generic", arg0); + } + + /** + * An error occurred while processing external WS metadata; check configuration/deployment. Nested error: {0}. + * + */ + public static String RUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.addressing.responses.nosuchmethod", arg0); + } + + /** + * JAX-WS 2.1 API is loaded from {0}, But JAX-WS runtime requires JAX-WS 2.2 or newer API. Use the standard override mechanism to load JAX-WS 2.2 or newer API. + * + */ + public static String RUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(arg0)); } public static Localizable localizableRUNTIME_MODELER_WSFEATURE_ILLEGAL_FTRCONSTRUCTOR(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.modeler.wsfeature.illegal.ftrconstructor", arg0, arg1); + return MESSAGE_FACTORY.getMessage("runtime.modeler.wsfeature.illegal.ftrconstructor", arg0, arg1); } /** @@ -392,11 +258,107 @@ public final class ModelerMessages { * */ public static String RUNTIME_MODELER_WSFEATURE_ILLEGAL_FTRCONSTRUCTOR(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_MODELER_WSFEATURE_ILLEGAL_FTRCONSTRUCTOR(arg0, arg1)); + return LOCALIZER.localize(localizableRUNTIME_MODELER_WSFEATURE_ILLEGAL_FTRCONSTRUCTOR(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.webmethod.must.be.public", arg0); + } + + /** + * @WebMethod is not allowed on a non-public method {0} + * + */ + public static String RUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_OUT_PARAMETERS(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.oneway.operation.no.out.parameters", arg0, arg1); + } + + /** + * oneway operation should not have OUT parameters class: {0} method: {1} + * + */ + public static String RUNTIME_MODELER_ONEWAY_OPERATION_NO_OUT_PARAMETERS(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_OUT_PARAMETERS(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_MODELER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.endpoint.interface.no.webservice", arg0); + } + + /** + * The Endpoint Interface: {0} does not have WebService Annotation + * + */ + public static String RUNTIME_MODELER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_ENDPOINT_INTERFACE_NO_WEBSERVICE(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.wsfeature.no.ftrconstructor", arg0, arg1); + } + + /** + * Annotation {0} is not recognizable, at least one constructor of {1} should be marked with @FeatureConstructor + * + */ + public static String RUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_MODELER_MTOM_CONFLICT(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.mtom.conflict", arg0, arg1); + } + + /** + * Error in @BindingType: MTOM Configuration in binding identifier {0} conflicts with feature @MTOM {1} + * + */ + public static String RUNTIME_MODELER_MTOM_CONFLICT(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_MTOM_CONFLICT(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_MODELER_CLASS_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.class.not.found", arg0); + } + + /** + * class: {0} could not be found + * + */ + public static String RUNTIME_MODELER_CLASS_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_CLASS_NOT_FOUND(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_WSFEATURE_MORETHANONE_FTRCONSTRUCTOR(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.wsfeature.morethanone.ftrconstructor", arg0, arg1); + } + + /** + * Annotation {0} is illegal, Only one constructor of {1} can be marked as @FeatureConstructor + * + */ + public static String RUNTIME_MODELER_WSFEATURE_MORETHANONE_FTRCONSTRUCTOR(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_WSFEATURE_MORETHANONE_FTRCONSTRUCTOR(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_MODELER_FEATURE_CONFLICT(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.feature.conflict", arg0, arg1); + } + + /** + * Feature {0} in implementation conflicts with {1} in WSDL configuration + * + */ + public static String RUNTIME_MODELER_FEATURE_CONFLICT(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_FEATURE_CONFLICT(arg0, arg1)); } public static Localizable localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATICFINAL(Object arg0) { - return messageFactory.getMessage("runtime.modeler.webmethod.must.be.nonstaticfinal", arg0); + return MESSAGE_FACTORY.getMessage("runtime.modeler.webmethod.must.be.nonstaticfinal", arg0); } /** @@ -404,7 +366,54 @@ public final class ModelerMessages { * */ public static String RUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATICFINAL(Object arg0) { - return localizer.localize(localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATICFINAL(arg0)); + return LOCALIZER.localize(localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATICFINAL(arg0)); + } + + public static Localizable localizableRUNTIME_MODELER_CANNOT_GET_SERVICE_NAME_FROM_INTERFACE(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.cannot.get.serviceName.from.interface", arg0); + } + + /** + * The serviceName cannot be retrieved from an interface. class {0} + * + */ + public static String RUNTIME_MODELER_CANNOT_GET_SERVICE_NAME_FROM_INTERFACE(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_CANNOT_GET_SERVICE_NAME_FROM_INTERFACE(arg0)); + } + + public static Localizable localizableNOT_A_VALID_BARE_METHOD(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("not.a.valid.bare.method", arg0, arg1); + } + + /** + * SEI {0} has method {1} annotated as BARE but it has more than one parameter bound to body. This is invalid. Please annotate the method with annotation: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) + * + */ + public static String NOT_A_VALID_BARE_METHOD(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableNOT_A_VALID_BARE_METHOD(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_MODELER_PORTNAME_SERVICENAME_NAMESPACE_MISMATCH(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.modeler.portname.servicename.namespace.mismatch", arg0, arg1); + } + + /** + * The namespace of the serviceName "{0}" and the namespace of the portName "{1}" must match + * + */ + public static String RUNTIME_MODELER_PORTNAME_SERVICENAME_NAMESPACE_MISMATCH(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_MODELER_PORTNAME_SERVICENAME_NAMESPACE_MISMATCH(arg0, arg1)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/PolicyMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/PolicyMessages.java index bde32f27132..30e3facafc9 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/PolicyMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/PolicyMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,138 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class PolicyMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.policy"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, PolicyMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableWSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL() { - return messageFactory.getMessage("WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL"); - } - - /** - * WSP1007: Policy exception occurred when finishing WSDL parsing. - * - */ - public static String WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL() { - return localizer.localize(localizableWSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL()); - } - - public static Localizable localizableWSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE() { - return messageFactory.getMessage("WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE"); - } - - /** - * WSP1002: Unable to marshall policy or it's reference. See original exception for more details. - * - */ - public static String WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE() { - return localizer.localize(localizableWSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE()); - } - - public static Localizable localizableWSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED", arg0, arg1); - } - - /** - * WSP1015: Server side assertion validation failed for "{0}" assertion. Assertion was evaluated as "{1}". - * - */ - public static String WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(arg0, arg1)); - } - - public static Localizable localizableWSP_1017_MAP_UPDATE_FAILED() { - return messageFactory.getMessage("WSP_1017_MAP_UPDATE_FAILED"); - } - - /** - * WSP1048: Policy map setup failed - exception occurred while trying to modify policy map content. - * - */ - public static String WSP_1017_MAP_UPDATE_FAILED() { - return localizer.localize(localizableWSP_1017_MAP_UPDATE_FAILED()); - } - - public static Localizable localizableWSP_1010_NO_POLICIES_DEFINED() { - return messageFactory.getMessage("WSP_1010_NO_POLICIES_DEFINED"); - } - - /** - * WSP1010: No policies defined. - * - */ - public static String WSP_1010_NO_POLICIES_DEFINED() { - return localizer.localize(localizableWSP_1010_NO_POLICIES_DEFINED()); - } - - public static Localizable localizableWSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(Object arg0) { - return messageFactory.getMessage("WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL", arg0); - } - - /** - * WSP1008: Not marshalling policy, wsdl subject is null for "{0}". - * - */ - public static String WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(Object arg0) { - return localizer.localize(localizableWSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(arg0)); - } - - public static Localizable localizableWSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL() { - return messageFactory.getMessage("WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL"); - } - - /** - * WSP1009: Policy map was null, not marshalling any policies. - * - */ - public static String WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL() { - return localizer.localize(localizableWSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL()); - } - - public static Localizable localizableWSP_1020_DUPLICATE_ID(Object arg0) { - return messageFactory.getMessage("WSP_1020_DUPLICATE_ID", arg0); - } - - /** - * WSP1020: Found two policies in one document with the same id: "{0}". - * - */ - public static String WSP_1020_DUPLICATE_ID(Object arg0) { - return localizer.localize(localizableWSP_1020_DUPLICATE_ID(arg0)); - } - - public static Localizable localizableWSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(Object arg0, Object arg1) { - return messageFactory.getMessage("WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME", arg0, arg1); - } - - /** - * WSP1003: Unable to check element name for class "{0}" and WSDL name "{1}". - * - */ - public static String WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(Object arg0, Object arg1) { - return localizer.localize(localizableWSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(arg0, arg1)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new PolicyMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableWSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(Object arg0) { - return messageFactory.getMessage("WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT", arg0); + return MESSAGE_FACTORY.getMessage("WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT", arg0); } /** @@ -164,119 +54,11 @@ public final class PolicyMessages { * */ public static String WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(Object arg0) { - return localizer.localize(localizableWSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(arg0)); - } - - public static Localizable localizableWSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL() { - return messageFactory.getMessage("WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL"); - } - - /** - * WSP1006: Policy map extender can not be null. - * - */ - public static String WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL() { - return localizer.localize(localizableWSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL()); - } - - public static Localizable localizableWSP_1018_FAILED_TO_MARSHALL_POLICY(Object arg0) { - return messageFactory.getMessage("WSP_1018_FAILED_TO_MARSHALL_POLICY", arg0); - } - - /** - * WSP1018: Failed to marshal policy "{0}". - * - */ - public static String WSP_1018_FAILED_TO_MARSHALL_POLICY(Object arg0) { - return localizer.localize(localizableWSP_1018_FAILED_TO_MARSHALL_POLICY(arg0)); - } - - public static Localizable localizableWSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(Object arg0) { - return messageFactory.getMessage("WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST", arg0); - } - - /** - * WSP1005: Failed to find policy referenced by URI "{0}". - * - */ - public static String WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(Object arg0) { - return localizer.localize(localizableWSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(arg0)); - } - - public static Localizable localizableWSP_1016_POLICY_ID_NULL_OR_DUPLICATE(Object arg0) { - return messageFactory.getMessage("WSP_1016_POLICY_ID_NULL_OR_DUPLICATE", arg0); - } - - /** - * WSP1016: The policy is not added because it has no ID or a policy with the same ID was already added: {0}. - * - */ - public static String WSP_1016_POLICY_ID_NULL_OR_DUPLICATE(Object arg0) { - return localizer.localize(localizableWSP_1016_POLICY_ID_NULL_OR_DUPLICATE(arg0)); - } - - public static Localizable localizableWSP_1014_CAN_NOT_FIND_POLICY(Object arg0) { - return messageFactory.getMessage("WSP_1014_CAN_NOT_FIND_POLICY", arg0); - } - - /** - * WSP1014: Can not find policy "{0}" that is referenced in from the WSDL. Please, check your policy references in the WSDL. - * - */ - public static String WSP_1014_CAN_NOT_FIND_POLICY(Object arg0) { - return localizer.localize(localizableWSP_1014_CAN_NOT_FIND_POLICY(arg0)); - } - - public static Localizable localizableWSP_1012_FAILED_CONFIGURE_WSDL_MODEL() { - return messageFactory.getMessage("WSP_1012_FAILED_CONFIGURE_WSDL_MODEL"); - } - - /** - * WSP1012: Failed to configure wsdl model. - * - */ - public static String WSP_1012_FAILED_CONFIGURE_WSDL_MODEL() { - return localizer.localize(localizableWSP_1012_FAILED_CONFIGURE_WSDL_MODEL()); - } - - public static Localizable localizableWSP_1021_FAULT_NOT_BOUND(Object arg0) { - return messageFactory.getMessage("WSP_1021_FAULT_NOT_BOUND", arg0); - } - - /** - * WSP1021: Fault "{0}" not bound. Check names in port and binding definitions. - * - */ - public static String WSP_1021_FAULT_NOT_BOUND(Object arg0) { - return localizer.localize(localizableWSP_1021_FAULT_NOT_BOUND(arg0)); - } - - public static Localizable localizableWSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(Object arg0) { - return messageFactory.getMessage("WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT", arg0); - } - - /** - * WSP1011: Failed to retrieve effective policy for subject: {0}. - * - */ - public static String WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(Object arg0) { - return localizer.localize(localizableWSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(arg0)); - } - - public static Localizable localizableWSP_1019_CREATE_EMPTY_POLICY_MAP() { - return messageFactory.getMessage("WSP_1019_CREATE_EMPTY_POLICY_MAP"); - } - - /** - * WSP1019: Failed to find any configuration file. Creating new empty policy map. - * - */ - public static String WSP_1019_CREATE_EMPTY_POLICY_MAP() { - return localizer.localize(localizableWSP_1019_CREATE_EMPTY_POLICY_MAP()); + return LOCALIZER.localize(localizableWSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(arg0)); } public static Localizable localizableWSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE() { - return messageFactory.getMessage("WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE"); + return MESSAGE_FACTORY.getMessage("WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE"); } /** @@ -284,11 +66,155 @@ public final class PolicyMessages { * */ public static String WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE() { - return localizer.localize(localizableWSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE()); + return LOCALIZER.localize(localizableWSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE()); + } + + public static Localizable localizableWSP_1014_CAN_NOT_FIND_POLICY(Object arg0) { + return MESSAGE_FACTORY.getMessage("WSP_1014_CAN_NOT_FIND_POLICY", arg0); + } + + /** + * WSP1014: Can not find policy "{0}" that is referenced in from the WSDL. Please, check your policy references in the WSDL. + * + */ + public static String WSP_1014_CAN_NOT_FIND_POLICY(Object arg0) { + return LOCALIZER.localize(localizableWSP_1014_CAN_NOT_FIND_POLICY(arg0)); + } + + public static Localizable localizableWSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL() { + return MESSAGE_FACTORY.getMessage("WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL"); + } + + /** + * WSP1009: Policy map was null, not marshalling any policies. + * + */ + public static String WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL() { + return LOCALIZER.localize(localizableWSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL()); + } + + public static Localizable localizableWSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(Object arg0) { + return MESSAGE_FACTORY.getMessage("WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT", arg0); + } + + /** + * WSP1011: Failed to retrieve effective policy for subject: {0}. + * + */ + public static String WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(Object arg0) { + return LOCALIZER.localize(localizableWSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(arg0)); + } + + public static Localizable localizableWSP_1016_POLICY_ID_NULL_OR_DUPLICATE(Object arg0) { + return MESSAGE_FACTORY.getMessage("WSP_1016_POLICY_ID_NULL_OR_DUPLICATE", arg0); + } + + /** + * WSP1016: The policy is not added because it has no ID or a policy with the same ID was already added: {0}. + * + */ + public static String WSP_1016_POLICY_ID_NULL_OR_DUPLICATE(Object arg0) { + return LOCALIZER.localize(localizableWSP_1016_POLICY_ID_NULL_OR_DUPLICATE(arg0)); + } + + public static Localizable localizableWSP_1021_FAULT_NOT_BOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("WSP_1021_FAULT_NOT_BOUND", arg0); + } + + /** + * WSP1021: Fault "{0}" not bound. Check names in port and binding definitions. + * + */ + public static String WSP_1021_FAULT_NOT_BOUND(Object arg0) { + return LOCALIZER.localize(localizableWSP_1021_FAULT_NOT_BOUND(arg0)); + } + + public static Localizable localizableWSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME", arg0, arg1); + } + + /** + * WSP1003: Unable to check element name for class "{0}" and WSDL name "{1}". + * + */ + public static String WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableWSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(arg0, arg1)); + } + + public static Localizable localizableWSP_1019_CREATE_EMPTY_POLICY_MAP() { + return MESSAGE_FACTORY.getMessage("WSP_1019_CREATE_EMPTY_POLICY_MAP"); + } + + /** + * WSP1019: Failed to find any configuration file. Creating new empty policy map. + * + */ + public static String WSP_1019_CREATE_EMPTY_POLICY_MAP() { + return LOCALIZER.localize(localizableWSP_1019_CREATE_EMPTY_POLICY_MAP()); + } + + public static Localizable localizableWSP_1020_DUPLICATE_ID(Object arg0) { + return MESSAGE_FACTORY.getMessage("WSP_1020_DUPLICATE_ID", arg0); + } + + /** + * WSP1020: Found two policies in one document with the same id: "{0}". + * + */ + public static String WSP_1020_DUPLICATE_ID(Object arg0) { + return LOCALIZER.localize(localizableWSP_1020_DUPLICATE_ID(arg0)); + } + + public static Localizable localizableWSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE() { + return MESSAGE_FACTORY.getMessage("WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE"); + } + + /** + * WSP1002: Unable to marshall policy or it's reference. See original exception for more details. + * + */ + public static String WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE() { + return LOCALIZER.localize(localizableWSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE()); + } + + public static Localizable localizableWSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(Object arg0) { + return MESSAGE_FACTORY.getMessage("WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL", arg0); + } + + /** + * WSP1008: Not marshalling policy, wsdl subject is null for "{0}". + * + */ + public static String WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(Object arg0) { + return LOCALIZER.localize(localizableWSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(arg0)); + } + + public static Localizable localizableWSP_1017_MAP_UPDATE_FAILED() { + return MESSAGE_FACTORY.getMessage("WSP_1017_MAP_UPDATE_FAILED"); + } + + /** + * WSP1048: Policy map setup failed - exception occurred while trying to modify policy map content. + * + */ + public static String WSP_1017_MAP_UPDATE_FAILED() { + return LOCALIZER.localize(localizableWSP_1017_MAP_UPDATE_FAILED()); + } + + public static Localizable localizableWSP_1018_FAILED_TO_MARSHALL_POLICY(Object arg0) { + return MESSAGE_FACTORY.getMessage("WSP_1018_FAILED_TO_MARSHALL_POLICY", arg0); + } + + /** + * WSP1018: Failed to marshal policy "{0}". + * + */ + public static String WSP_1018_FAILED_TO_MARSHALL_POLICY(Object arg0) { + return LOCALIZER.localize(localizableWSP_1018_FAILED_TO_MARSHALL_POLICY(arg0)); } public static Localizable localizableWSP_1004_POLICY_URIS_CAN_NOT_BE_NULL() { - return messageFactory.getMessage("WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL"); + return MESSAGE_FACTORY.getMessage("WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL"); } /** @@ -296,7 +222,90 @@ public final class PolicyMessages { * */ public static String WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL() { - return localizer.localize(localizableWSP_1004_POLICY_URIS_CAN_NOT_BE_NULL()); + return LOCALIZER.localize(localizableWSP_1004_POLICY_URIS_CAN_NOT_BE_NULL()); + } + + public static Localizable localizableWSP_1010_NO_POLICIES_DEFINED() { + return MESSAGE_FACTORY.getMessage("WSP_1010_NO_POLICIES_DEFINED"); + } + + /** + * WSP1010: No policies defined. + * + */ + public static String WSP_1010_NO_POLICIES_DEFINED() { + return LOCALIZER.localize(localizableWSP_1010_NO_POLICIES_DEFINED()); + } + + public static Localizable localizableWSP_1012_FAILED_CONFIGURE_WSDL_MODEL() { + return MESSAGE_FACTORY.getMessage("WSP_1012_FAILED_CONFIGURE_WSDL_MODEL"); + } + + /** + * WSP1012: Failed to configure wsdl model. + * + */ + public static String WSP_1012_FAILED_CONFIGURE_WSDL_MODEL() { + return LOCALIZER.localize(localizableWSP_1012_FAILED_CONFIGURE_WSDL_MODEL()); + } + + public static Localizable localizableWSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED", arg0, arg1); + } + + /** + * WSP1015: Server side assertion validation failed for "{0}" assertion. Assertion was evaluated as "{1}". + * + */ + public static String WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableWSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(arg0, arg1)); + } + + public static Localizable localizableWSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(Object arg0) { + return MESSAGE_FACTORY.getMessage("WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST", arg0); + } + + /** + * WSP1005: Failed to find policy referenced by URI "{0}". + * + */ + public static String WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(Object arg0) { + return LOCALIZER.localize(localizableWSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(arg0)); + } + + public static Localizable localizableWSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL() { + return MESSAGE_FACTORY.getMessage("WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL"); + } + + /** + * WSP1006: Policy map extender can not be null. + * + */ + public static String WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL() { + return LOCALIZER.localize(localizableWSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL()); + } + + public static Localizable localizableWSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL() { + return MESSAGE_FACTORY.getMessage("WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL"); + } + + /** + * WSP1007: Policy exception occurred when finishing WSDL parsing. + * + */ + public static String WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL() { + return LOCALIZER.localize(localizableWSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL()); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java index 347dc7f1864..d20d7e2e18d 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,54 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class ProviderApiMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.providerApi"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, ProviderApiMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableNULL_ADDRESS_SERVICE_ENDPOINT() { - return messageFactory.getMessage("null.address.service.endpoint"); - } - - /** - * Address in an EPR cannot be null, when serviceName or portName is null - * - */ - public static String NULL_ADDRESS_SERVICE_ENDPOINT() { - return localizer.localize(localizableNULL_ADDRESS_SERVICE_ENDPOINT()); - } - - public static Localizable localizableNO_WSDL_NO_PORT(Object arg0) { - return messageFactory.getMessage("no.wsdl.no.port", arg0); - } - - /** - * WSDL Metadata not available to create the proxy, either Service instance or ServiceEndpointInterface {0} should have WSDL information - * - */ - public static String NO_WSDL_NO_PORT(Object arg0) { - return localizer.localize(localizableNO_WSDL_NO_PORT(arg0)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ProviderApiMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableNULL_SERVICE() { - return messageFactory.getMessage("null.service"); + return MESSAGE_FACTORY.getMessage("null.service"); } /** @@ -80,23 +54,23 @@ public final class ProviderApiMessages { * */ public static String NULL_SERVICE() { - return localizer.localize(localizableNULL_SERVICE()); + return LOCALIZER.localize(localizableNULL_SERVICE()); } - public static Localizable localizableNULL_ADDRESS() { - return messageFactory.getMessage("null.address"); + public static Localizable localizableNULL_ADDRESS_SERVICE_ENDPOINT() { + return MESSAGE_FACTORY.getMessage("null.address.service.endpoint"); } /** - * Address in an EPR cannot be null + * Address in an EPR cannot be null, when serviceName or portName is null * */ - public static String NULL_ADDRESS() { - return localizer.localize(localizableNULL_ADDRESS()); + public static String NULL_ADDRESS_SERVICE_ENDPOINT() { + return LOCALIZER.localize(localizableNULL_ADDRESS_SERVICE_ENDPOINT()); } public static Localizable localizableNULL_PORTNAME() { - return messageFactory.getMessage("null.portname"); + return MESSAGE_FACTORY.getMessage("null.portname"); } /** @@ -104,35 +78,11 @@ public final class ProviderApiMessages { * */ public static String NULL_PORTNAME() { - return localizer.localize(localizableNULL_PORTNAME()); - } - - public static Localizable localizableNOTFOUND_SERVICE_IN_WSDL(Object arg0, Object arg1) { - return messageFactory.getMessage("notfound.service.in.wsdl", arg0, arg1); - } - - /** - * Service: {0} not found in WSDL: {1} - * - */ - public static String NOTFOUND_SERVICE_IN_WSDL(Object arg0, Object arg1) { - return localizer.localize(localizableNOTFOUND_SERVICE_IN_WSDL(arg0, arg1)); - } - - public static Localizable localizableNULL_EPR() { - return messageFactory.getMessage("null.epr"); - } - - /** - * EndpointReference is null - * - */ - public static String NULL_EPR() { - return localizer.localize(localizableNULL_EPR()); + return LOCALIZER.localize(localizableNULL_PORTNAME()); } public static Localizable localizableNULL_WSDL() { - return messageFactory.getMessage("null.wsdl"); + return MESSAGE_FACTORY.getMessage("null.wsdl"); } /** @@ -140,11 +90,23 @@ public final class ProviderApiMessages { * */ public static String NULL_WSDL() { - return localizer.localize(localizableNULL_WSDL()); + return LOCALIZER.localize(localizableNULL_WSDL()); + } + + public static Localizable localizableNO_WSDL_NO_PORT(Object arg0) { + return MESSAGE_FACTORY.getMessage("no.wsdl.no.port", arg0); + } + + /** + * WSDL Metadata not available to create the proxy, either Service instance or ServiceEndpointInterface {0} should have WSDL information + * + */ + public static String NO_WSDL_NO_PORT(Object arg0) { + return LOCALIZER.localize(localizableNO_WSDL_NO_PORT(arg0)); } public static Localizable localizableNOTFOUND_PORT_IN_WSDL(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("notfound.port.in.wsdl", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("notfound.port.in.wsdl", arg0, arg1, arg2); } /** @@ -152,11 +114,47 @@ public final class ProviderApiMessages { * */ public static String NOTFOUND_PORT_IN_WSDL(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableNOTFOUND_PORT_IN_WSDL(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableNOTFOUND_PORT_IN_WSDL(arg0, arg1, arg2)); + } + + public static Localizable localizableNOTFOUND_SERVICE_IN_WSDL(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("notfound.service.in.wsdl", arg0, arg1); + } + + /** + * Service: {0} not found in WSDL: {1} + * + */ + public static String NOTFOUND_SERVICE_IN_WSDL(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableNOTFOUND_SERVICE_IN_WSDL(arg0, arg1)); + } + + public static Localizable localizableNULL_EPR() { + return MESSAGE_FACTORY.getMessage("null.epr"); + } + + /** + * EndpointReference is null + * + */ + public static String NULL_EPR() { + return LOCALIZER.localize(localizableNULL_EPR()); + } + + public static Localizable localizableNULL_ADDRESS() { + return MESSAGE_FACTORY.getMessage("null.address"); + } + + /** + * Address in an EPR cannot be null + * + */ + public static String NULL_ADDRESS() { + return LOCALIZER.localize(localizableNULL_ADDRESS()); } public static Localizable localizableERROR_WSDL(Object arg0) { - return messageFactory.getMessage("error.wsdl", arg0); + return MESSAGE_FACTORY.getMessage("error.wsdl", arg0); } /** @@ -164,7 +162,18 @@ public final class ProviderApiMessages { * */ public static String ERROR_WSDL(Object arg0) { - return localizer.localize(localizableERROR_WSDL(arg0)); + return LOCALIZER.localize(localizableERROR_WSDL(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SenderMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SenderMessages.java index c95550e9955..5e94841f005 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SenderMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SenderMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,66 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class SenderMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.sender"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, SenderMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableSENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(Object arg0) { - return messageFactory.getMessage("sender.request.illegalValueForContentNegotiation", arg0); - } - - /** - * illegal value for content negotiation property "{0}" - * - */ - public static String SENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(Object arg0) { - return localizer.localize(localizableSENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(arg0)); - } - - public static Localizable localizableSENDER_RESPONSE_CANNOT_DECODE_FAULT_DETAIL() { - return messageFactory.getMessage("sender.response.cannotDecodeFaultDetail"); - } - - /** - * fault detail cannot be decoded - * - */ - public static String SENDER_RESPONSE_CANNOT_DECODE_FAULT_DETAIL() { - return localizer.localize(localizableSENDER_RESPONSE_CANNOT_DECODE_FAULT_DETAIL()); - } - - public static Localizable localizableSENDER_NESTED_ERROR(Object arg0) { - return messageFactory.getMessage("sender.nestedError", arg0); - } - - /** - * sender error: {0} - * - */ - public static String SENDER_NESTED_ERROR(Object arg0) { - return localizer.localize(localizableSENDER_NESTED_ERROR(arg0)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new SenderMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableSENDER_REQUEST_MESSAGE_NOT_READY() { - return messageFactory.getMessage("sender.request.messageNotReady"); + return MESSAGE_FACTORY.getMessage("sender.request.messageNotReady"); } /** @@ -92,7 +54,54 @@ public final class SenderMessages { * */ public static String SENDER_REQUEST_MESSAGE_NOT_READY() { - return localizer.localize(localizableSENDER_REQUEST_MESSAGE_NOT_READY()); + return LOCALIZER.localize(localizableSENDER_REQUEST_MESSAGE_NOT_READY()); + } + + public static Localizable localizableSENDER_RESPONSE_CANNOT_DECODE_FAULT_DETAIL() { + return MESSAGE_FACTORY.getMessage("sender.response.cannotDecodeFaultDetail"); + } + + /** + * fault detail cannot be decoded + * + */ + public static String SENDER_RESPONSE_CANNOT_DECODE_FAULT_DETAIL() { + return LOCALIZER.localize(localizableSENDER_RESPONSE_CANNOT_DECODE_FAULT_DETAIL()); + } + + public static Localizable localizableSENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(Object arg0) { + return MESSAGE_FACTORY.getMessage("sender.request.illegalValueForContentNegotiation", arg0); + } + + /** + * illegal value for content negotiation property "{0}" + * + */ + public static String SENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(Object arg0) { + return LOCALIZER.localize(localizableSENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(arg0)); + } + + public static Localizable localizableSENDER_NESTED_ERROR(Object arg0) { + return MESSAGE_FACTORY.getMessage("sender.nestedError", arg0); + } + + /** + * sender error: {0} + * + */ + public static String SENDER_NESTED_ERROR(Object arg0) { + return LOCALIZER.localize(localizableSENDER_NESTED_ERROR(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ServerMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ServerMessages.java index 9059972ac0d..2c7f065fc93 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ServerMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ServerMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,30 +25,276 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class ServerMessages { - private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.server"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, ServerMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.server"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ServerMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); + + public static Localizable localizableDUPLICATE_ABSTRACT_WSDL(Object arg0) { + return MESSAGE_FACTORY.getMessage("duplicate.abstract.wsdl", arg0); + } + + /** + * Metadata has more than one WSDL that has PortType definition for the endpoint. WSDL={0} is one such WSDL. + * + */ + public static String DUPLICATE_ABSTRACT_WSDL(Object arg0) { + return LOCALIZER.localize(localizableDUPLICATE_ABSTRACT_WSDL(arg0)); + } + + public static Localizable localizableNOT_KNOW_HTTP_CONTEXT_TYPE(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("not.know.HttpContext.type", arg0, arg1, arg2); + } + + /** + * Doesn''t support Endpoint.publish({0}). Known context types are {1}, and {2} + * + */ + public static String NOT_KNOW_HTTP_CONTEXT_TYPE(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableNOT_KNOW_HTTP_CONTEXT_TYPE(arg0, arg1, arg2)); + } + + public static Localizable localizableUNSUPPORTED_CONTENT_TYPE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("unsupported.contentType", arg0, arg1); + } + + /** + * Unsupported Content-Type: {0} Supported ones are: {1} + * + */ + public static String UNSUPPORTED_CONTENT_TYPE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableUNSUPPORTED_CONTENT_TYPE(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_PARSER_WSDL_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.parser.wsdl.not.found", arg0); + } + + /** + * {0} is not found in the WAR file. Package it in the WAR file or correct it in sun-jaxws.xml. + * + */ + public static String RUNTIME_PARSER_WSDL_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_WSDL_NOT_FOUND(arg0)); + } + + public static Localizable localizableSOAPENCODER_ERR() { + return MESSAGE_FACTORY.getMessage("soapencoder.err"); + } + + /** + * Error in encoding SOAP Message + * + */ + public static String SOAPENCODER_ERR() { + return LOCALIZER.localize(localizableSOAPENCODER_ERR()); + } + + public static Localizable localizableWSDL_REQUIRED() { + return MESSAGE_FACTORY.getMessage("wsdl.required"); + } + + /** + * wsdl is required + * + */ + public static String WSDL_REQUIRED() { + return LOCALIZER.localize(localizableWSDL_REQUIRED()); + } + + public static Localizable localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.parser.wsdl.noservice.in.wsdlmodel", arg0); + } + + /** + * There is an error in processing the WSDL {0} and no valid services are found. + * + */ + public static String RUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(arg0)); + } + + public static Localizable localizableNULL_IMPLEMENTOR() { + return MESSAGE_FACTORY.getMessage("null.implementor"); + } + + /** + * Implementor cannot be null + * + */ + public static String NULL_IMPLEMENTOR() { + return LOCALIZER.localize(localizableNULL_IMPLEMENTOR()); + } + + public static Localizable localizableSERVER_RT_ERR(Object arg0) { + return MESSAGE_FACTORY.getMessage("server.rt.err", arg0); + } + + /** + * Server Runtime Error: {0} + * + */ + public static String SERVER_RT_ERR(Object arg0) { + return LOCALIZER.localize(localizableSERVER_RT_ERR(arg0)); + } + + public static Localizable localizableWRONG_PARAMETER_TYPE(Object arg0) { + return MESSAGE_FACTORY.getMessage("wrong.parameter.type", arg0); + } + + /** + * Incorrect argument types for method "{0}" + * + */ + public static String WRONG_PARAMETER_TYPE(Object arg0) { + return LOCALIZER.localize(localizableWRONG_PARAMETER_TYPE(arg0)); + } + + public static Localizable localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("runtime.parser.wsdl.incorrectserviceport", arg0, arg1, arg2); + } + + /** + * could not get binding from WSDL! service: {0} or port {1} not found in the WSDL {2}. + * It could be because service and port names do not match WSDL''s wsdl:service and wsdl:port names: + * 1. service and port names are not there in deployment descriptor OR + * 2. Either there is a typo in deployment descriptor''s service and port names OR + * 3. The computed names from @WebService do not match wsdl:service and wsdl:port names + * Suggest doing the following: + * 1. Add/Correct entries for service and port names in deployment descriptor OR + * 2. Specify targetNamespace, serviceName, portName in @WebService on the endpoint class + * + */ + public static String RUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(arg0, arg1, arg2)); + } + + public static Localizable localizableRUNTIME_PARSER_XML_READER(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.parser.xmlReader", arg0); + } + + /** + * error parsing runtime descriptor: {0} + * + */ + public static String RUNTIME_PARSER_XML_READER(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_XML_READER(arg0)); + } + + public static Localizable localizableDD_MTOM_CONFLICT(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("dd.mtom.conflict", arg0, arg1); + } + + /** + * Error in Deployment Descriptor : MTOM Configuration in binding {0} conflicts with enable-mtom attribute value {1} + * + */ + public static String DD_MTOM_CONFLICT(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableDD_MTOM_CONFLICT(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.parser.invalid.attribute.value", arg0, arg1); + } + + /** + * invalid attribute value "{1}" in runtime descriptor (line {0}) + * + */ + public static String RUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_SAXPARSER_EXCEPTION(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.saxparser.exception", arg0, arg1); + } + + /** + * {0} + * {1} + * + */ + public static String RUNTIME_SAXPARSER_EXCEPTION(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_SAXPARSER_EXCEPTION(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_PARSER_INVALID_VERSION_NUMBER() { + return MESSAGE_FACTORY.getMessage("runtime.parser.invalidVersionNumber"); + } + + /** + * unsupported runtime descriptor version: {2} + * + */ + public static String RUNTIME_PARSER_INVALID_VERSION_NUMBER() { + return LOCALIZER.localize(localizableRUNTIME_PARSER_INVALID_VERSION_NUMBER()); + } + + public static Localizable localizableWRONG_TNS_FOR_PORT(Object arg0) { + return MESSAGE_FACTORY.getMessage("wrong.tns.for.port", arg0); + } + + /** + * Port namespace {0} doesn't match Service namespace {1} + * + */ + public static String WRONG_TNS_FOR_PORT(Object arg0) { + return LOCALIZER.localize(localizableWRONG_TNS_FOR_PORT(arg0)); + } + + public static Localizable localizableANNOTATION_ONLY_ONCE(Object arg0) { + return MESSAGE_FACTORY.getMessage("annotation.only.once", arg0); + } + + /** + * Only one method should have the annotation "{0}" + * + */ + public static String ANNOTATION_ONLY_ONCE(Object arg0) { + return LOCALIZER.localize(localizableANNOTATION_ONLY_ONCE(arg0)); + } + + public static Localizable localizableSTATEFUL_COOKIE_HEADER_INCORRECT(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("stateful.cookie.header.incorrect", arg0, arg1); + } + + /** + * Invalid/expired {0} header value: {1} + * + */ + public static String STATEFUL_COOKIE_HEADER_INCORRECT(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableSTATEFUL_COOKIE_HEADER_INCORRECT(arg0, arg1)); + } + + public static Localizable localizableSERVICE_NAME_REQUIRED() { + return MESSAGE_FACTORY.getMessage("service.name.required"); + } + + /** + * Service QName is not found + * + */ + public static String SERVICE_NAME_REQUIRED() { + return LOCALIZER.localize(localizableSERVICE_NAME_REQUIRED()); } public static Localizable localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICE(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.parser.wsdl.incorrectservice", arg0, arg1); + return MESSAGE_FACTORY.getMessage("runtime.parser.wsdl.incorrectservice", arg0, arg1); } /** @@ -65,559 +311,11 @@ public final class ServerMessages { * */ public static String RUNTIME_PARSER_WSDL_INCORRECTSERVICE(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICE(arg0, arg1)); - } - - public static Localizable localizableRUNTIME_PARSER_MISSING_ATTRIBUTE_NO_LINE() { - return messageFactory.getMessage("runtime.parser.missing.attribute.no.line"); - } - - /** - * missing attribute "{2}" in element "{1}" of runtime descriptor - * - */ - public static String RUNTIME_PARSER_MISSING_ATTRIBUTE_NO_LINE() { - return localizer.localize(localizableRUNTIME_PARSER_MISSING_ATTRIBUTE_NO_LINE()); - } - - public static Localizable localizableSTATEFUL_COOKIE_HEADER_INCORRECT(Object arg0, Object arg1) { - return messageFactory.getMessage("stateful.cookie.header.incorrect", arg0, arg1); - } - - /** - * Invalid/expired {0} header value: {1} - * - */ - public static String STATEFUL_COOKIE_HEADER_INCORRECT(Object arg0, Object arg1) { - return localizer.localize(localizableSTATEFUL_COOKIE_HEADER_INCORRECT(arg0, arg1)); - } - - public static Localizable localizableNOT_IMPLEMENT_PROVIDER(Object arg0) { - return messageFactory.getMessage("not.implement.provider", arg0); - } - - /** - * "{0}" doesn't implement Provider - * - */ - public static String NOT_IMPLEMENT_PROVIDER(Object arg0) { - return localizer.localize(localizableNOT_IMPLEMENT_PROVIDER(arg0)); - } - - public static Localizable localizableSTATEFUL_REQURES_ADDRESSING(Object arg0) { - return messageFactory.getMessage("stateful.requres.addressing", arg0); - } - - /** - * Stateful web service {0} requires the WS-Addressing support to be enabled. Perhaps you are missing @Addressing - * - */ - public static String STATEFUL_REQURES_ADDRESSING(Object arg0) { - return localizer.localize(localizableSTATEFUL_REQURES_ADDRESSING(arg0)); - } - - public static Localizable localizableSOAPDECODER_ERR() { - return messageFactory.getMessage("soapdecoder.err"); - } - - /** - * Error in decoding SOAP Message - * - */ - public static String SOAPDECODER_ERR() { - return localizer.localize(localizableSOAPDECODER_ERR()); - } - - public static Localizable localizableGENERATE_NON_STANDARD_WSDL() { - return messageFactory.getMessage("generate.non.standard.wsdl"); - } - - /** - * Generating non-standard WSDL for the specified binding - * - */ - public static String GENERATE_NON_STANDARD_WSDL() { - return localizer.localize(localizableGENERATE_NON_STANDARD_WSDL()); - } - - public static Localizable localizableDISPATCH_CANNOT_FIND_METHOD(Object arg0) { - return messageFactory.getMessage("dispatch.cannotFindMethod", arg0); - } - - /** - * Cannot find dispatch method for {0} - * - */ - public static String DISPATCH_CANNOT_FIND_METHOD(Object arg0) { - return localizer.localize(localizableDISPATCH_CANNOT_FIND_METHOD(arg0)); - } - - public static Localizable localizableNO_CONTENT_TYPE() { - return messageFactory.getMessage("no.contentType"); - } - - /** - * Request doesn't have a Content-Type - * - */ - public static String NO_CONTENT_TYPE() { - return localizer.localize(localizableNO_CONTENT_TYPE()); - } - - public static Localizable localizableRUNTIME_PARSER_INVALID_VERSION_NUMBER() { - return messageFactory.getMessage("runtime.parser.invalidVersionNumber"); - } - - /** - * unsupported runtime descriptor version: {2} - * - */ - public static String RUNTIME_PARSER_INVALID_VERSION_NUMBER() { - return localizer.localize(localizableRUNTIME_PARSER_INVALID_VERSION_NUMBER()); - } - - public static Localizable localizablePROVIDER_INVALID_PARAMETER_TYPE(Object arg0, Object arg1) { - return messageFactory.getMessage("provider.invalid.parameterType", arg0, arg1); - } - - /** - * "{0}" implements Provider but its type parameter {1} is incorrect - * - */ - public static String PROVIDER_INVALID_PARAMETER_TYPE(Object arg0, Object arg1) { - return localizer.localize(localizablePROVIDER_INVALID_PARAMETER_TYPE(arg0, arg1)); - } - - public static Localizable localizableWRONG_NO_PARAMETERS(Object arg0) { - return messageFactory.getMessage("wrong.no.parameters", arg0); - } - - /** - * Incorrect no of arguments for method "{0}" - * - */ - public static String WRONG_NO_PARAMETERS(Object arg0) { - return localizer.localize(localizableWRONG_NO_PARAMETERS(arg0)); - } - - public static Localizable localizableANNOTATION_ONLY_ONCE(Object arg0) { - return messageFactory.getMessage("annotation.only.once", arg0); - } - - /** - * Only one method should have the annotation "{0}" - * - */ - public static String ANNOTATION_ONLY_ONCE(Object arg0) { - return localizer.localize(localizableANNOTATION_ONLY_ONCE(arg0)); - } - - public static Localizable localizableALREADY_HTTPS_SERVER(Object arg0) { - return messageFactory.getMessage("already.https.server", arg0); - } - - /** - * There is already a HTTPS server at : {0} - * - */ - public static String ALREADY_HTTPS_SERVER(Object arg0) { - return localizer.localize(localizableALREADY_HTTPS_SERVER(arg0)); - } - - public static Localizable localizableRUNTIME_PARSER_XML_READER(Object arg0) { - return messageFactory.getMessage("runtime.parser.xmlReader", arg0); - } - - /** - * error parsing runtime descriptor: {0} - * - */ - public static String RUNTIME_PARSER_XML_READER(Object arg0) { - return localizer.localize(localizableRUNTIME_PARSER_XML_READER(arg0)); - } - - public static Localizable localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("runtime.parser.wsdl.incorrectserviceport", arg0, arg1, arg2); - } - - /** - * could not get binding from WSDL! service: {0} or port {1} not found in the WSDL {2}. - * It could be because service and port names do not match WSDL''s wsdl:service and wsdl:port names: - * 1. service and port names are not there in deployment descriptor OR - * 2. Either there is a typo in deployment descriptor''s service and port names OR - * 3. The computed names from @WebService do not match wsdl:service and wsdl:port names - * Suggest doing the following: - * 1. Add/Correct entries for service and port names in deployment descriptor OR - * 2. Specify targetNamespace, serviceName, portName in @WebService on the endpoint class - * - */ - public static String RUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(arg0, arg1, arg2)); - } - - public static Localizable localizableSERVER_RT_ERR(Object arg0) { - return messageFactory.getMessage("server.rt.err", arg0); - } - - /** - * Server Runtime Error: {0} - * - */ - public static String SERVER_RT_ERR(Object arg0) { - return localizer.localize(localizableSERVER_RT_ERR(arg0)); - } - - public static Localizable localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("runtime.parser.invalidAttributeValue", arg0, arg1, arg2); - } - - /** - * invalid value for attribute "{2}" of element "{1}" in runtime descriptor (line {0}) - * - */ - public static String RUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(arg0, arg1, arg2)); - } - - public static Localizable localizableNO_CURRENT_PACKET() { - return messageFactory.getMessage("no.current.packet"); - } - - /** - * This thread is not currently processing any web service request. - * - */ - public static String NO_CURRENT_PACKET() { - return localizer.localize(localizableNO_CURRENT_PACKET()); - } - - public static Localizable localizableRUNTIME_PARSER_UNEXPECTED_CONTENT(Object arg0) { - return messageFactory.getMessage("runtime.parser.unexpectedContent", arg0); - } - - /** - * unexpected content in runtime descriptor (line {0}) - * - */ - public static String RUNTIME_PARSER_UNEXPECTED_CONTENT(Object arg0) { - return localizer.localize(localizableRUNTIME_PARSER_UNEXPECTED_CONTENT(arg0)); - } - - public static Localizable localizableSTATEFUL_COOKIE_HEADER_REQUIRED(Object arg0) { - return messageFactory.getMessage("stateful.cookie.header.required", arg0); - } - - /** - * This is a stateful web service and {0} header is required. - * - */ - public static String STATEFUL_COOKIE_HEADER_REQUIRED(Object arg0) { - return localizer.localize(localizableSTATEFUL_COOKIE_HEADER_REQUIRED(arg0)); - } - - public static Localizable localizableNULL_IMPLEMENTOR() { - return messageFactory.getMessage("null.implementor"); - } - - /** - * Implementor cannot be null - * - */ - public static String NULL_IMPLEMENTOR() { - return localizer.localize(localizableNULL_IMPLEMENTOR()); - } - - public static Localizable localizableRUNTIME_PARSER_WSDL(Object arg0) { - return messageFactory.getMessage("runtime.parser.wsdl", arg0); - } - - /** - * exception during WSDL parsing: {0} - * - */ - public static String RUNTIME_PARSER_WSDL(Object arg0) { - return localizer.localize(localizableRUNTIME_PARSER_WSDL(arg0)); - } - - public static Localizable localizableSOAPENCODER_ERR() { - return messageFactory.getMessage("soapencoder.err"); - } - - /** - * Error in encoding SOAP Message - * - */ - public static String SOAPENCODER_ERR() { - return localizer.localize(localizableSOAPENCODER_ERR()); - } - - public static Localizable localizableWSDL_REQUIRED() { - return messageFactory.getMessage("wsdl.required"); - } - - /** - * wsdl is required - * - */ - public static String WSDL_REQUIRED() { - return localizer.localize(localizableWSDL_REQUIRED()); - } - - public static Localizable localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(Object arg0) { - return messageFactory.getMessage("runtime.parser.wsdl.noservice.in.wsdlmodel", arg0); - } - - /** - * There is an error in processing the WSDL {0} and no valid services are found. - * - */ - public static String RUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(Object arg0) { - return localizer.localize(localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(arg0)); - } - - public static Localizable localizablePORT_NAME_REQUIRED() { - return messageFactory.getMessage("port.name.required"); - } - - /** - * Port QName is not found - * - */ - public static String PORT_NAME_REQUIRED() { - return localizer.localize(localizablePORT_NAME_REQUIRED()); - } - - public static Localizable localizableWRONG_TNS_FOR_PORT(Object arg0) { - return messageFactory.getMessage("wrong.tns.for.port", arg0); - } - - /** - * Port namespace {0} doesn't match Service namespace {1} - * - */ - public static String WRONG_TNS_FOR_PORT(Object arg0) { - return localizer.localize(localizableWRONG_TNS_FOR_PORT(arg0)); - } - - public static Localizable localizableRUNTIME_PARSER_WSDL_MULTIPLEBINDING(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("runtime.parser.wsdl.multiplebinding", arg0, arg1, arg2); - } - - /** - * multiple bindings found for binding ID {0} for service {1} in WSDL {2} - * - */ - public static String RUNTIME_PARSER_WSDL_MULTIPLEBINDING(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableRUNTIME_PARSER_WSDL_MULTIPLEBINDING(arg0, arg1, arg2)); - } - - public static Localizable localizableNOT_KNOW_HTTP_CONTEXT_TYPE(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("not.know.HttpContext.type", arg0, arg1, arg2); - } - - /** - * Doesn''t support Endpoint.publish({0}). Known context types are {1}, and {2} - * - */ - public static String NOT_KNOW_HTTP_CONTEXT_TYPE(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableNOT_KNOW_HTTP_CONTEXT_TYPE(arg0, arg1, arg2)); - } - - public static Localizable localizableNON_UNIQUE_DISPATCH_QNAME(Object arg0, Object arg1) { - return messageFactory.getMessage("non.unique.dispatch.qname", arg0, arg1); - } - - /** - * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. Methods {0} have the same request body block {1}. Method dispatching may fail, runtime will try to dispatch using SOAPAction. Another option is to enable AddressingFeature to enabled runtime to uniquely identify WSDL operation using wsa:Action header. - * - */ - public static String NON_UNIQUE_DISPATCH_QNAME(Object arg0, Object arg1) { - return localizer.localize(localizableNON_UNIQUE_DISPATCH_QNAME(arg0, arg1)); - } - - public static Localizable localizableALREADY_HTTP_SERVER(Object arg0) { - return messageFactory.getMessage("already.http.server", arg0); - } - - /** - * There is already a HTTP server at : {0}# {0} - probably URL/port of a server - * - */ - public static String ALREADY_HTTP_SERVER(Object arg0) { - return localizer.localize(localizableALREADY_HTTP_SERVER(arg0)); - } - - public static Localizable localizableCAN_NOT_GENERATE_WSDL(Object arg0) { - return messageFactory.getMessage("can.not.generate.wsdl", arg0); - } - - /** - * Cannot generate WSDL for binding "{0}" - * - */ - public static String CAN_NOT_GENERATE_WSDL(Object arg0) { - return localizer.localize(localizableCAN_NOT_GENERATE_WSDL(arg0)); - } - - public static Localizable localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.parser.invalid.attribute.value", arg0, arg1); - } - - /** - * invalid attribute value "{1}" in runtime descriptor (line {0}) - * - */ - public static String RUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(arg0, arg1)); - } - - public static Localizable localizableRUNTIME_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("runtime.parser.wrong.element", arg0, arg1, arg2); - } - - /** - * found element "{1}", expected "{2}" in runtime descriptor (line {0}) - * - */ - public static String RUNTIME_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableRUNTIME_PARSER_WRONG_ELEMENT(arg0, arg1, arg2)); - } - - public static Localizable localizableRUNTIMEMODELER_INVALIDANNOTATION_ON_IMPL(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("runtimemodeler.invalidannotationOnImpl", arg0, arg1, arg2); - } - - /** - * Invalid annotation: {0} on endpoint implementation class "{1}" - will be ignored. "{1}" is annotated with @WebService(endpointInterface="{2}"}, it must not be annotated with {0}, to fix it - put this annotation on the SEI {2}. - * - */ - public static String RUNTIMEMODELER_INVALIDANNOTATION_ON_IMPL(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableRUNTIMEMODELER_INVALIDANNOTATION_ON_IMPL(arg0, arg1, arg2)); - } - - public static Localizable localizableSERVICE_NAME_REQUIRED() { - return messageFactory.getMessage("service.name.required"); - } - - /** - * Service QName is not found - * - */ - public static String SERVICE_NAME_REQUIRED() { - return localizer.localize(localizableSERVICE_NAME_REQUIRED()); - } - - public static Localizable localizablePROVIDER_NOT_PARAMETERIZED(Object arg0) { - return messageFactory.getMessage("provider.not.parameterized", arg0); - } - - /** - * "{0}" implements Provider but doesn't specify the type parameter - * - */ - public static String PROVIDER_NOT_PARAMETERIZED(Object arg0) { - return localizer.localize(localizablePROVIDER_NOT_PARAMETERIZED(arg0)); - } - - public static Localizable localizableRUNTIME_WSDL_PATCHER() { - return messageFactory.getMessage("runtime.wsdl.patcher"); - } - - /** - * error while patching WSDL related document - * - */ - public static String RUNTIME_WSDL_PATCHER() { - return localizer.localize(localizableRUNTIME_WSDL_PATCHER()); - } - - public static Localizable localizableRUNTIME_SAXPARSER_EXCEPTION(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.saxparser.exception", arg0, arg1); - } - - /** - * {0} - * {1} - * - */ - public static String RUNTIME_SAXPARSER_EXCEPTION(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_SAXPARSER_EXCEPTION(arg0, arg1)); - } - - public static Localizable localizableWRONG_PARAMETER_TYPE(Object arg0) { - return messageFactory.getMessage("wrong.parameter.type", arg0); - } - - /** - * Incorrect argument types for method "{0}" - * - */ - public static String WRONG_PARAMETER_TYPE(Object arg0) { - return localizer.localize(localizableWRONG_PARAMETER_TYPE(arg0)); - } - - public static Localizable localizableRUNTIME_PARSER_WSDL_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("runtime.parser.wsdl.not.found", arg0); - } - - /** - * {0} is not found in the WAR file. Package it in the WAR file or correct it in sun-jaxws.xml. - * - */ - public static String RUNTIME_PARSER_WSDL_NOT_FOUND(Object arg0) { - return localizer.localize(localizableRUNTIME_PARSER_WSDL_NOT_FOUND(arg0)); - } - - public static Localizable localizableRUNTIME_PARSER_CLASS_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("runtime.parser.classNotFound", arg0); - } - - /** - * class not found in runtime descriptor: {0} - * - */ - public static String RUNTIME_PARSER_CLASS_NOT_FOUND(Object arg0) { - return localizer.localize(localizableRUNTIME_PARSER_CLASS_NOT_FOUND(arg0)); - } - - public static Localizable localizableUNSUPPORTED_CHARSET(Object arg0) { - return messageFactory.getMessage("unsupported.charset", arg0); - } - - /** - * Unsupported charset "{0}" in the received message''s Content-Type - * - */ - public static String UNSUPPORTED_CHARSET(Object arg0) { - return localizer.localize(localizableUNSUPPORTED_CHARSET(arg0)); - } - - public static Localizable localizableSTATIC_RESOURCE_INJECTION_ONLY(Object arg0, Object arg1) { - return messageFactory.getMessage("static.resource.injection.only", arg0, arg1); - } - - /** - * Static resource {0} cannot be injected to non-static "{1}" - * - */ - public static String STATIC_RESOURCE_INJECTION_ONLY(Object arg0, Object arg1) { - return localizer.localize(localizableSTATIC_RESOURCE_INJECTION_ONLY(arg0, arg1)); - } - - public static Localizable localizableNOT_ZERO_PARAMETERS(Object arg0) { - return messageFactory.getMessage("not.zero.parameters", arg0); - } - - /** - * Method "{0}" shouldn''t have any arguments - * - */ - public static String NOT_ZERO_PARAMETERS(Object arg0) { - return localizer.localize(localizableNOT_ZERO_PARAMETERS(arg0)); + return LOCALIZER.localize(localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICE(arg0, arg1)); } public static Localizable localizableDUPLICATE_PRIMARY_WSDL(Object arg0) { - return messageFactory.getMessage("duplicate.primary.wsdl", arg0); + return MESSAGE_FACTORY.getMessage("duplicate.primary.wsdl", arg0); } /** @@ -625,59 +323,35 @@ public final class ServerMessages { * */ public static String DUPLICATE_PRIMARY_WSDL(Object arg0) { - return localizer.localize(localizableDUPLICATE_PRIMARY_WSDL(arg0)); + return LOCALIZER.localize(localizableDUPLICATE_PRIMARY_WSDL(arg0)); } - public static Localizable localizableDUPLICATE_ABSTRACT_WSDL(Object arg0) { - return messageFactory.getMessage("duplicate.abstract.wsdl", arg0); + public static Localizable localizableGENERATE_NON_STANDARD_WSDL() { + return MESSAGE_FACTORY.getMessage("generate.non.standard.wsdl"); } /** - * Metadata has more than one WSDL that has PortType definition for the endpoint. WSDL={0} is one such WSDL. + * Generating non-standard WSDL for the specified binding * */ - public static String DUPLICATE_ABSTRACT_WSDL(Object arg0) { - return localizer.localize(localizableDUPLICATE_ABSTRACT_WSDL(arg0)); + public static String GENERATE_NON_STANDARD_WSDL() { + return LOCALIZER.localize(localizableGENERATE_NON_STANDARD_WSDL()); } - public static Localizable localizableSTATEFUL_INVALID_WEBSERVICE_CONTEXT(Object arg0) { - return messageFactory.getMessage("stateful.invalid.webservice.context", arg0); + public static Localizable localizableRUNTIME_PARSER_MISSING_ATTRIBUTE_NO_LINE() { + return MESSAGE_FACTORY.getMessage("runtime.parser.missing.attribute.no.line"); } /** - * Not a WebServiceContext from JAX-WS RI: {0} + * missing attribute "{2}" in element "{1}" of runtime descriptor * */ - public static String STATEFUL_INVALID_WEBSERVICE_CONTEXT(Object arg0) { - return localizer.localize(localizableSTATEFUL_INVALID_WEBSERVICE_CONTEXT(arg0)); - } - - public static Localizable localizableRUNTIME_PARSER_INVALID_ELEMENT(Object arg0, Object arg1) { - return messageFactory.getMessage("runtime.parser.invalidElement", arg0, arg1); - } - - /** - * invalid element "{1}" in runtime descriptor (line {0}) - * - */ - public static String RUNTIME_PARSER_INVALID_ELEMENT(Object arg0, Object arg1) { - return localizer.localize(localizableRUNTIME_PARSER_INVALID_ELEMENT(arg0, arg1)); - } - - public static Localizable localizableRUNTIME_PARSER_MISSING_ATTRIBUTE(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("runtime.parser.missing.attribute", arg0, arg1, arg2); - } - - /** - * missing attribute "{2}" in element "{1}" of runtime descriptor (line {0}) - * - */ - public static String RUNTIME_PARSER_MISSING_ATTRIBUTE(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableRUNTIME_PARSER_MISSING_ATTRIBUTE(arg0, arg1, arg2)); + public static String RUNTIME_PARSER_MISSING_ATTRIBUTE_NO_LINE() { + return LOCALIZER.localize(localizableRUNTIME_PARSER_MISSING_ATTRIBUTE_NO_LINE()); } public static Localizable localizableWRONG_FIELD_TYPE(Object arg0) { - return messageFactory.getMessage("wrong.field.type", arg0); + return MESSAGE_FACTORY.getMessage("wrong.field.type", arg0); } /** @@ -685,35 +359,11 @@ public final class ServerMessages { * */ public static String WRONG_FIELD_TYPE(Object arg0) { - return localizer.localize(localizableWRONG_FIELD_TYPE(arg0)); - } - - public static Localizable localizableDUPLICATE_PORT_KNOWN_HEADER(Object arg0) { - return messageFactory.getMessage("duplicate.portKnownHeader", arg0); - } - - /** - * Received SOAP message contains duplicate header: {0} for a bound parameter - * - */ - public static String DUPLICATE_PORT_KNOWN_HEADER(Object arg0) { - return localizer.localize(localizableDUPLICATE_PORT_KNOWN_HEADER(arg0)); - } - - public static Localizable localizableUNSUPPORTED_CONTENT_TYPE(Object arg0, Object arg1) { - return messageFactory.getMessage("unsupported.contentType", arg0, arg1); - } - - /** - * Unsupported Content-Type: {0} Supported ones are: {1} - * - */ - public static String UNSUPPORTED_CONTENT_TYPE(Object arg0, Object arg1) { - return localizer.localize(localizableUNSUPPORTED_CONTENT_TYPE(arg0, arg1)); + return LOCALIZER.localize(localizableWRONG_FIELD_TYPE(arg0)); } public static Localizable localizableFAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("failed.to.instantiate.instanceResolver", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("failed.to.instantiate.instanceResolver", arg0, arg1, arg2); } /** @@ -721,19 +371,378 @@ public final class ServerMessages { * */ public static String FAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableFAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableFAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(arg0, arg1, arg2)); } - public static Localizable localizableDD_MTOM_CONFLICT(Object arg0, Object arg1) { - return messageFactory.getMessage("dd.mtom.conflict", arg0, arg1); + public static Localizable localizablePROVIDER_NOT_PARAMETERIZED(Object arg0) { + return MESSAGE_FACTORY.getMessage("provider.not.parameterized", arg0); } /** - * Error in Deployment Descriptor : MTOM Configuration in binding {0} conflicts with enable-mtom attribute value {1} + * "{0}" implements Provider but doesn't specify the type parameter * */ - public static String DD_MTOM_CONFLICT(Object arg0, Object arg1) { - return localizer.localize(localizableDD_MTOM_CONFLICT(arg0, arg1)); + public static String PROVIDER_NOT_PARAMETERIZED(Object arg0) { + return LOCALIZER.localize(localizablePROVIDER_NOT_PARAMETERIZED(arg0)); + } + + public static Localizable localizableDISPATCH_CANNOT_FIND_METHOD(Object arg0) { + return MESSAGE_FACTORY.getMessage("dispatch.cannotFindMethod", arg0); + } + + /** + * Cannot find dispatch method for {0} + * + */ + public static String DISPATCH_CANNOT_FIND_METHOD(Object arg0) { + return LOCALIZER.localize(localizableDISPATCH_CANNOT_FIND_METHOD(arg0)); + } + + public static Localizable localizableRUNTIME_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("runtime.parser.wrong.element", arg0, arg1, arg2); + } + + /** + * found element "{1}", expected "{2}" in runtime descriptor (line {0}) + * + */ + public static String RUNTIME_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_WRONG_ELEMENT(arg0, arg1, arg2)); + } + + public static Localizable localizableUNSUPPORTED_CHARSET(Object arg0) { + return MESSAGE_FACTORY.getMessage("unsupported.charset", arg0); + } + + /** + * Unsupported charset "{0}" in the received message''s Content-Type + * + */ + public static String UNSUPPORTED_CHARSET(Object arg0) { + return LOCALIZER.localize(localizableUNSUPPORTED_CHARSET(arg0)); + } + + public static Localizable localizableSTATEFUL_COOKIE_HEADER_REQUIRED(Object arg0) { + return MESSAGE_FACTORY.getMessage("stateful.cookie.header.required", arg0); + } + + /** + * This is a stateful web service and {0} header is required. + * + */ + public static String STATEFUL_COOKIE_HEADER_REQUIRED(Object arg0) { + return LOCALIZER.localize(localizableSTATEFUL_COOKIE_HEADER_REQUIRED(arg0)); + } + + public static Localizable localizableRUNTIME_WSDL_PATCHER() { + return MESSAGE_FACTORY.getMessage("runtime.wsdl.patcher"); + } + + /** + * error while patching WSDL related document + * + */ + public static String RUNTIME_WSDL_PATCHER() { + return LOCALIZER.localize(localizableRUNTIME_WSDL_PATCHER()); + } + + public static Localizable localizableSTATEFUL_REQURES_ADDRESSING(Object arg0) { + return MESSAGE_FACTORY.getMessage("stateful.requres.addressing", arg0); + } + + /** + * Stateful web service {0} requires the WS-Addressing support to be enabled. Perhaps you are missing @Addressing + * + */ + public static String STATEFUL_REQURES_ADDRESSING(Object arg0) { + return LOCALIZER.localize(localizableSTATEFUL_REQURES_ADDRESSING(arg0)); + } + + public static Localizable localizableNON_UNIQUE_DISPATCH_QNAME(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("non.unique.dispatch.qname", arg0, arg1); + } + + /** + * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. Methods {0} have the same request body block {1}. Method dispatching may fail, runtime will try to dispatch using SOAPAction. Another option is to enable AddressingFeature to enabled runtime to uniquely identify WSDL operation using wsa:Action header. + * + */ + public static String NON_UNIQUE_DISPATCH_QNAME(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableNON_UNIQUE_DISPATCH_QNAME(arg0, arg1)); + } + + public static Localizable localizableALREADY_HTTP_SERVER(Object arg0) { + return MESSAGE_FACTORY.getMessage("already.http.server", arg0); + } + + /** + * There is already a HTTP server at : {0}# {0} - probably URL/port of a server + * + */ + public static String ALREADY_HTTP_SERVER(Object arg0) { + return LOCALIZER.localize(localizableALREADY_HTTP_SERVER(arg0)); + } + + public static Localizable localizableWRONG_NO_PARAMETERS(Object arg0) { + return MESSAGE_FACTORY.getMessage("wrong.no.parameters", arg0); + } + + /** + * Incorrect no of arguments for method "{0}" + * + */ + public static String WRONG_NO_PARAMETERS(Object arg0) { + return LOCALIZER.localize(localizableWRONG_NO_PARAMETERS(arg0)); + } + + public static Localizable localizableNOT_ZERO_PARAMETERS(Object arg0) { + return MESSAGE_FACTORY.getMessage("not.zero.parameters", arg0); + } + + /** + * Method "{0}" shouldn''t have any arguments + * + */ + public static String NOT_ZERO_PARAMETERS(Object arg0) { + return LOCALIZER.localize(localizableNOT_ZERO_PARAMETERS(arg0)); + } + + public static Localizable localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("runtime.parser.invalidAttributeValue", arg0, arg1, arg2); + } + + /** + * invalid value for attribute "{2}" of element "{1}" in runtime descriptor (line {0}) + * + */ + public static String RUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(arg0, arg1, arg2)); + } + + public static Localizable localizableRUNTIME_PARSER_MISSING_ATTRIBUTE(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("runtime.parser.missing.attribute", arg0, arg1, arg2); + } + + /** + * missing attribute "{2}" in element "{1}" of runtime descriptor (line {0}) + * + */ + public static String RUNTIME_PARSER_MISSING_ATTRIBUTE(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_MISSING_ATTRIBUTE(arg0, arg1, arg2)); + } + + public static Localizable localizableRUNTIME_PARSER_UNEXPECTED_CONTENT(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.parser.unexpectedContent", arg0); + } + + /** + * unexpected content in runtime descriptor (line {0}) + * + */ + public static String RUNTIME_PARSER_UNEXPECTED_CONTENT(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_UNEXPECTED_CONTENT(arg0)); + } + + public static Localizable localizableRUNTIME_PARSER_CLASS_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.parser.classNotFound", arg0); + } + + /** + * class not found in runtime descriptor: {0} + * + */ + public static String RUNTIME_PARSER_CLASS_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_CLASS_NOT_FOUND(arg0)); + } + + public static Localizable localizableSTATEFUL_INVALID_WEBSERVICE_CONTEXT(Object arg0) { + return MESSAGE_FACTORY.getMessage("stateful.invalid.webservice.context", arg0); + } + + /** + * Not a WebServiceContext from JAX-WS RI: {0} + * + */ + public static String STATEFUL_INVALID_WEBSERVICE_CONTEXT(Object arg0) { + return LOCALIZER.localize(localizableSTATEFUL_INVALID_WEBSERVICE_CONTEXT(arg0)); + } + + public static Localizable localizableNO_CURRENT_PACKET() { + return MESSAGE_FACTORY.getMessage("no.current.packet"); + } + + /** + * This thread is not currently processing any web service request. + * + */ + public static String NO_CURRENT_PACKET() { + return LOCALIZER.localize(localizableNO_CURRENT_PACKET()); + } + + public static Localizable localizableDUPLICATE_PORT_KNOWN_HEADER(Object arg0) { + return MESSAGE_FACTORY.getMessage("duplicate.portKnownHeader", arg0); + } + + /** + * Received SOAP message contains duplicate header: {0} for a bound parameter + * + */ + public static String DUPLICATE_PORT_KNOWN_HEADER(Object arg0) { + return LOCALIZER.localize(localizableDUPLICATE_PORT_KNOWN_HEADER(arg0)); + } + + public static Localizable localizableSTATIC_RESOURCE_INJECTION_ONLY(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("static.resource.injection.only", arg0, arg1); + } + + /** + * Static resource {0} cannot be injected to non-static "{1}" + * + */ + public static String STATIC_RESOURCE_INJECTION_ONLY(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableSTATIC_RESOURCE_INJECTION_ONLY(arg0, arg1)); + } + + public static Localizable localizableCAN_NOT_GENERATE_WSDL(Object arg0) { + return MESSAGE_FACTORY.getMessage("can.not.generate.wsdl", arg0); + } + + /** + * Cannot generate WSDL for binding "{0}" + * + */ + public static String CAN_NOT_GENERATE_WSDL(Object arg0) { + return LOCALIZER.localize(localizableCAN_NOT_GENERATE_WSDL(arg0)); + } + + public static Localizable localizableALREADY_HTTPS_SERVER(Object arg0) { + return MESSAGE_FACTORY.getMessage("already.https.server", arg0); + } + + /** + * There is already a HTTPS server at : {0} + * + */ + public static String ALREADY_HTTPS_SERVER(Object arg0) { + return LOCALIZER.localize(localizableALREADY_HTTPS_SERVER(arg0)); + } + + public static Localizable localizableRUNTIME_PARSER_INVALID_ELEMENT(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("runtime.parser.invalidElement", arg0, arg1); + } + + /** + * invalid element "{1}" in runtime descriptor (line {0}) + * + */ + public static String RUNTIME_PARSER_INVALID_ELEMENT(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_INVALID_ELEMENT(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_PARSER_WSDL_MULTIPLEBINDING(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("runtime.parser.wsdl.multiplebinding", arg0, arg1, arg2); + } + + /** + * multiple bindings found for binding ID {0} for service {1} in WSDL {2} + * + */ + public static String RUNTIME_PARSER_WSDL_MULTIPLEBINDING(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_WSDL_MULTIPLEBINDING(arg0, arg1, arg2)); + } + + public static Localizable localizableRUNTIMEMODELER_INVALIDANNOTATION_ON_IMPL(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("runtimemodeler.invalidannotationOnImpl", arg0, arg1, arg2); + } + + /** + * Invalid annotation: {0} on endpoint implementation class "{1}" - will be ignored. "{1}" is annotated with @WebService(endpointInterface="{2}"}, it must not be annotated with {0}, to fix it - put this annotation on the SEI {2}. + * + */ + public static String RUNTIMEMODELER_INVALIDANNOTATION_ON_IMPL(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableRUNTIMEMODELER_INVALIDANNOTATION_ON_IMPL(arg0, arg1, arg2)); + } + + public static Localizable localizablePROVIDER_INVALID_PARAMETER_TYPE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("provider.invalid.parameterType", arg0, arg1); + } + + /** + * "{0}" implements Provider but its type parameter {1} is incorrect + * + */ + public static String PROVIDER_INVALID_PARAMETER_TYPE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizablePROVIDER_INVALID_PARAMETER_TYPE(arg0, arg1)); + } + + public static Localizable localizableRUNTIME_PARSER_WSDL(Object arg0) { + return MESSAGE_FACTORY.getMessage("runtime.parser.wsdl", arg0); + } + + /** + * exception during WSDL parsing: {0} + * + */ + public static String RUNTIME_PARSER_WSDL(Object arg0) { + return LOCALIZER.localize(localizableRUNTIME_PARSER_WSDL(arg0)); + } + + public static Localizable localizableNO_CONTENT_TYPE() { + return MESSAGE_FACTORY.getMessage("no.contentType"); + } + + /** + * Request doesn't have a Content-Type + * + */ + public static String NO_CONTENT_TYPE() { + return LOCALIZER.localize(localizableNO_CONTENT_TYPE()); + } + + public static Localizable localizableNOT_IMPLEMENT_PROVIDER(Object arg0) { + return MESSAGE_FACTORY.getMessage("not.implement.provider", arg0); + } + + /** + * "{0}" doesn't implement Provider + * + */ + public static String NOT_IMPLEMENT_PROVIDER(Object arg0) { + return LOCALIZER.localize(localizableNOT_IMPLEMENT_PROVIDER(arg0)); + } + + public static Localizable localizableSOAPDECODER_ERR() { + return MESSAGE_FACTORY.getMessage("soapdecoder.err"); + } + + /** + * Error in decoding SOAP Message + * + */ + public static String SOAPDECODER_ERR() { + return LOCALIZER.localize(localizableSOAPDECODER_ERR()); + } + + public static Localizable localizablePORT_NAME_REQUIRED() { + return MESSAGE_FACTORY.getMessage("port.name.required"); + } + + /** + * Port QName is not found + * + */ + public static String PORT_NAME_REQUIRED() { + return LOCALIZER.localize(localizablePORT_NAME_REQUIRED()); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SoapMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SoapMessages.java index 2710db48539..961660cb6be 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SoapMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SoapMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,30 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class SoapMessages { - private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.soap"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, SoapMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.soap"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new SoapMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableSOAP_FAULT_CREATE_ERR(Object arg0) { - return messageFactory.getMessage("soap.fault.create.err", arg0); + return MESSAGE_FACTORY.getMessage("soap.fault.create.err", arg0); } /** @@ -56,47 +54,11 @@ public final class SoapMessages { * */ public static String SOAP_FAULT_CREATE_ERR(Object arg0) { - return localizer.localize(localizableSOAP_FAULT_CREATE_ERR(arg0)); - } - - public static Localizable localizableSOAP_MSG_FACTORY_CREATE_ERR(Object arg0) { - return messageFactory.getMessage("soap.msg.factory.create.err", arg0); - } - - /** - * Couldn''t create SOAP message factory due to exception: {0} - * - */ - public static String SOAP_MSG_FACTORY_CREATE_ERR(Object arg0) { - return localizer.localize(localizableSOAP_MSG_FACTORY_CREATE_ERR(arg0)); - } - - public static Localizable localizableSOAP_MSG_CREATE_ERR(Object arg0) { - return messageFactory.getMessage("soap.msg.create.err", arg0); - } - - /** - * Couldn''t create SOAP message due to exception: {0} - * - */ - public static String SOAP_MSG_CREATE_ERR(Object arg0) { - return localizer.localize(localizableSOAP_MSG_CREATE_ERR(arg0)); - } - - public static Localizable localizableSOAP_FACTORY_CREATE_ERR(Object arg0) { - return messageFactory.getMessage("soap.factory.create.err", arg0); - } - - /** - * Couldn''t create SOAP factory due to exception: {0} - * - */ - public static String SOAP_FACTORY_CREATE_ERR(Object arg0) { - return localizer.localize(localizableSOAP_FACTORY_CREATE_ERR(arg0)); + return LOCALIZER.localize(localizableSOAP_FAULT_CREATE_ERR(arg0)); } public static Localizable localizableSOAP_PROTOCOL_INVALID_FAULT_CODE(Object arg0) { - return messageFactory.getMessage("soap.protocol.invalidFaultCode", arg0); + return MESSAGE_FACTORY.getMessage("soap.protocol.invalidFaultCode", arg0); } /** @@ -104,11 +66,11 @@ public final class SoapMessages { * */ public static String SOAP_PROTOCOL_INVALID_FAULT_CODE(Object arg0) { - return localizer.localize(localizableSOAP_PROTOCOL_INVALID_FAULT_CODE(arg0)); + return LOCALIZER.localize(localizableSOAP_PROTOCOL_INVALID_FAULT_CODE(arg0)); } public static Localizable localizableSOAP_VERSION_MISMATCH_ERR(Object arg0, Object arg1) { - return messageFactory.getMessage("soap.version.mismatch.err", arg0, arg1); + return MESSAGE_FACTORY.getMessage("soap.version.mismatch.err", arg0, arg1); } /** @@ -116,7 +78,54 @@ public final class SoapMessages { * */ public static String SOAP_VERSION_MISMATCH_ERR(Object arg0, Object arg1) { - return localizer.localize(localizableSOAP_VERSION_MISMATCH_ERR(arg0, arg1)); + return LOCALIZER.localize(localizableSOAP_VERSION_MISMATCH_ERR(arg0, arg1)); + } + + public static Localizable localizableSOAP_MSG_FACTORY_CREATE_ERR(Object arg0) { + return MESSAGE_FACTORY.getMessage("soap.msg.factory.create.err", arg0); + } + + /** + * Couldn''t create SOAP message factory due to exception: {0} + * + */ + public static String SOAP_MSG_FACTORY_CREATE_ERR(Object arg0) { + return LOCALIZER.localize(localizableSOAP_MSG_FACTORY_CREATE_ERR(arg0)); + } + + public static Localizable localizableSOAP_MSG_CREATE_ERR(Object arg0) { + return MESSAGE_FACTORY.getMessage("soap.msg.create.err", arg0); + } + + /** + * Couldn''t create SOAP message due to exception: {0} + * + */ + public static String SOAP_MSG_CREATE_ERR(Object arg0) { + return LOCALIZER.localize(localizableSOAP_MSG_CREATE_ERR(arg0)); + } + + public static Localizable localizableSOAP_FACTORY_CREATE_ERR(Object arg0) { + return MESSAGE_FACTORY.getMessage("soap.factory.create.err", arg0); + } + + /** + * Couldn''t create SOAP factory due to exception: {0} + * + */ + public static String SOAP_FACTORY_CREATE_ERR(Object arg0) { + return LOCALIZER.localize(localizableSOAP_FACTORY_CREATE_ERR(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/StreamingMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/StreamingMessages.java index 65ce3fefe26..da66bb6465e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/StreamingMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/StreamingMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,258 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class StreamingMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.streaming"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, StreamingMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableFASTINFOSET_DECODING_NOT_ACCEPTED() { - return messageFactory.getMessage("fastinfoset.decodingNotAccepted"); - } - - /** - * Fast Infoset decoding is not accepted - * - */ - public static String FASTINFOSET_DECODING_NOT_ACCEPTED() { - return localizer.localize(localizableFASTINFOSET_DECODING_NOT_ACCEPTED()); - } - - public static Localizable localizableSTAX_CANT_CREATE() { - return messageFactory.getMessage("stax.cantCreate"); - } - - /** - * Unable to create StAX reader or writer - * - */ - public static String STAX_CANT_CREATE() { - return localizer.localize(localizableSTAX_CANT_CREATE()); - } - - public static Localizable localizableSTREAMING_IO_EXCEPTION(Object arg0) { - return messageFactory.getMessage("streaming.ioException", arg0); - } - - /** - * XML parsing error: {0} - * - */ - public static String STREAMING_IO_EXCEPTION(Object arg0) { - return localizer.localize(localizableSTREAMING_IO_EXCEPTION(arg0)); - } - - public static Localizable localizableSOURCEREADER_INVALID_SOURCE(Object arg0) { - return messageFactory.getMessage("sourcereader.invalidSource", arg0); - } - - /** - * Unable to create reader from source "{0}" - * - */ - public static String SOURCEREADER_INVALID_SOURCE(Object arg0) { - return localizer.localize(localizableSOURCEREADER_INVALID_SOURCE(arg0)); - } - - public static Localizable localizableXMLREADER_UNEXPECTED_STATE(Object arg0, Object arg1) { - return messageFactory.getMessage("xmlreader.unexpectedState", arg0, arg1); - } - - /** - * unexpected XML reader state. expected: {0} but found: {1} - * - */ - public static String XMLREADER_UNEXPECTED_STATE(Object arg0, Object arg1) { - return localizer.localize(localizableXMLREADER_UNEXPECTED_STATE(arg0, arg1)); - } - - public static Localizable localizableWOODSTOX_CANT_LOAD(Object arg0) { - return messageFactory.getMessage("woodstox.cant.load", arg0); - } - - /** - * Unable to load Woodstox class {0} - * - */ - public static String WOODSTOX_CANT_LOAD(Object arg0) { - return localizer.localize(localizableWOODSTOX_CANT_LOAD(arg0)); - } - - public static Localizable localizableXMLREADER_IO_EXCEPTION(Object arg0) { - return messageFactory.getMessage("xmlreader.ioException", arg0); - } - - /** - * XML reader error: {0} - * - */ - public static String XMLREADER_IO_EXCEPTION(Object arg0) { - return localizer.localize(localizableXMLREADER_IO_EXCEPTION(arg0)); - } - - public static Localizable localizableFASTINFOSET_NO_IMPLEMENTATION() { - return messageFactory.getMessage("fastinfoset.noImplementation"); - } - - /** - * Unable to locate compatible implementation of Fast Infoset in classpath - * - */ - public static String FASTINFOSET_NO_IMPLEMENTATION() { - return localizer.localize(localizableFASTINFOSET_NO_IMPLEMENTATION()); - } - - public static Localizable localizableINVALID_PROPERTY_VALUE_INTEGER(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("invalid.property.value.integer", arg0, arg1, arg2); - } - - /** - * Ignoring system property "{0}" as value "{1}" is invalid, property value must be a valid integer. Using default value "{2}". - * - */ - public static String INVALID_PROPERTY_VALUE_INTEGER(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableINVALID_PROPERTY_VALUE_INTEGER(arg0, arg1, arg2)); - } - - public static Localizable localizableXMLWRITER_IO_EXCEPTION(Object arg0) { - return messageFactory.getMessage("xmlwriter.ioException", arg0); - } - - /** - * XML writer error: {0} - * - */ - public static String XMLWRITER_IO_EXCEPTION(Object arg0) { - return localizer.localize(localizableXMLWRITER_IO_EXCEPTION(arg0)); - } - - public static Localizable localizableXMLREADER_UNEXPECTED_CHARACTER_CONTENT(Object arg0) { - return messageFactory.getMessage("xmlreader.unexpectedCharacterContent", arg0); - } - - /** - * XML reader error: unexpected character content: "{0}" - * - */ - public static String XMLREADER_UNEXPECTED_CHARACTER_CONTENT(Object arg0) { - return localizer.localize(localizableXMLREADER_UNEXPECTED_CHARACTER_CONTENT(arg0)); - } - - public static Localizable localizableSTREAMING_PARSE_EXCEPTION(Object arg0) { - return messageFactory.getMessage("streaming.parseException", arg0); - } - - /** - * XML parsing error: {0} - * - */ - public static String STREAMING_PARSE_EXCEPTION(Object arg0) { - return localizer.localize(localizableSTREAMING_PARSE_EXCEPTION(arg0)); - } - - public static Localizable localizableXMLWRITER_NO_PREFIX_FOR_URI(Object arg0) { - return messageFactory.getMessage("xmlwriter.noPrefixForURI", arg0); - } - - /** - * XML writer error: no prefix for URI: "{0}" - * - */ - public static String XMLWRITER_NO_PREFIX_FOR_URI(Object arg0) { - return localizer.localize(localizableXMLWRITER_NO_PREFIX_FOR_URI(arg0)); - } - - public static Localizable localizableXMLREADER_NESTED_ERROR(Object arg0) { - return messageFactory.getMessage("xmlreader.nestedError", arg0); - } - - /** - * XML reader error: {0} - * - */ - public static String XMLREADER_NESTED_ERROR(Object arg0) { - return localizer.localize(localizableXMLREADER_NESTED_ERROR(arg0)); - } - - public static Localizable localizableINVALID_PROPERTY_VALUE_LONG(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("invalid.property.value.long", arg0, arg1, arg2); - } - - /** - * Ignoring system property "{0}" as value "{1}" is invalid, property value must be a valid long. Using default value "{2}". - * - */ - public static String INVALID_PROPERTY_VALUE_LONG(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableINVALID_PROPERTY_VALUE_LONG(arg0, arg1, arg2)); - } - - public static Localizable localizableSTAXREADER_XMLSTREAMEXCEPTION(Object arg0) { - return messageFactory.getMessage("staxreader.xmlstreamexception", arg0); - } - - /** - * XML stream reader exception: {0} - * - */ - public static String STAXREADER_XMLSTREAMEXCEPTION(Object arg0) { - return localizer.localize(localizableSTAXREADER_XMLSTREAMEXCEPTION(arg0)); - } - - public static Localizable localizableXMLWRITER_NESTED_ERROR(Object arg0) { - return messageFactory.getMessage("xmlwriter.nestedError", arg0); - } - - /** - * XML writer error: {0} - * - */ - public static String XMLWRITER_NESTED_ERROR(Object arg0) { - return localizer.localize(localizableXMLWRITER_NESTED_ERROR(arg0)); - } - - public static Localizable localizableXMLREADER_ILLEGAL_STATE_ENCOUNTERED(Object arg0) { - return messageFactory.getMessage("xmlreader.illegalStateEncountered", arg0); - } - - /** - * XML reader internal error: illegal state ({0}) - * - */ - public static String XMLREADER_ILLEGAL_STATE_ENCOUNTERED(Object arg0) { - return localizer.localize(localizableXMLREADER_ILLEGAL_STATE_ENCOUNTERED(arg0)); - } - - public static Localizable localizableXMLREADER_UNEXPECTED_STATE_TAG(Object arg0, Object arg1) { - return messageFactory.getMessage("xmlreader.unexpectedState.tag", arg0, arg1); - } - - /** - * unexpected XML tag. expected: {0} but found: {1} - * - */ - public static String XMLREADER_UNEXPECTED_STATE_TAG(Object arg0, Object arg1) { - return localizer.localize(localizableXMLREADER_UNEXPECTED_STATE_TAG(arg0, arg1)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new StreamingMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableXMLREADER_UNEXPECTED_STATE_MESSAGE(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("xmlreader.unexpectedState.message", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("xmlreader.unexpectedState.message", arg0, arg1, arg2); } /** @@ -284,23 +54,11 @@ public final class StreamingMessages { * */ public static String XMLREADER_UNEXPECTED_STATE_MESSAGE(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableXMLREADER_UNEXPECTED_STATE_MESSAGE(arg0, arg1, arg2)); - } - - public static Localizable localizableXMLREADER_PARSE_EXCEPTION(Object arg0) { - return messageFactory.getMessage("xmlreader.parseException", arg0); - } - - /** - * XML parsing error: {0} - * - */ - public static String XMLREADER_PARSE_EXCEPTION(Object arg0) { - return localizer.localize(localizableXMLREADER_PARSE_EXCEPTION(arg0)); + return LOCALIZER.localize(localizableXMLREADER_UNEXPECTED_STATE_MESSAGE(arg0, arg1, arg2)); } public static Localizable localizableXMLRECORDER_RECORDING_ENDED() { - return messageFactory.getMessage("xmlrecorder.recording.ended"); + return MESSAGE_FACTORY.getMessage("xmlrecorder.recording.ended"); } /** @@ -308,7 +66,258 @@ public final class StreamingMessages { * */ public static String XMLRECORDER_RECORDING_ENDED() { - return localizer.localize(localizableXMLRECORDER_RECORDING_ENDED()); + return LOCALIZER.localize(localizableXMLRECORDER_RECORDING_ENDED()); + } + + public static Localizable localizableXMLREADER_UNEXPECTED_STATE_TAG(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("xmlreader.unexpectedState.tag", arg0, arg1); + } + + /** + * unexpected XML tag. expected: {0} but found: {1} + * + */ + public static String XMLREADER_UNEXPECTED_STATE_TAG(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableXMLREADER_UNEXPECTED_STATE_TAG(arg0, arg1)); + } + + public static Localizable localizableFASTINFOSET_NO_IMPLEMENTATION() { + return MESSAGE_FACTORY.getMessage("fastinfoset.noImplementation"); + } + + /** + * Unable to locate compatible implementation of Fast Infoset in classpath + * + */ + public static String FASTINFOSET_NO_IMPLEMENTATION() { + return LOCALIZER.localize(localizableFASTINFOSET_NO_IMPLEMENTATION()); + } + + public static Localizable localizableXMLREADER_NESTED_ERROR(Object arg0) { + return MESSAGE_FACTORY.getMessage("xmlreader.nestedError", arg0); + } + + /** + * XML reader error: {0} + * + */ + public static String XMLREADER_NESTED_ERROR(Object arg0) { + return LOCALIZER.localize(localizableXMLREADER_NESTED_ERROR(arg0)); + } + + public static Localizable localizableWOODSTOX_CANT_LOAD(Object arg0) { + return MESSAGE_FACTORY.getMessage("woodstox.cant.load", arg0); + } + + /** + * Unable to load Woodstox class {0} + * + */ + public static String WOODSTOX_CANT_LOAD(Object arg0) { + return LOCALIZER.localize(localizableWOODSTOX_CANT_LOAD(arg0)); + } + + public static Localizable localizableSOURCEREADER_INVALID_SOURCE(Object arg0) { + return MESSAGE_FACTORY.getMessage("sourcereader.invalidSource", arg0); + } + + /** + * Unable to create reader from source "{0}" + * + */ + public static String SOURCEREADER_INVALID_SOURCE(Object arg0) { + return LOCALIZER.localize(localizableSOURCEREADER_INVALID_SOURCE(arg0)); + } + + public static Localizable localizableINVALID_PROPERTY_VALUE_INTEGER(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("invalid.property.value.integer", arg0, arg1, arg2); + } + + /** + * Ignoring system property "{0}" as value "{1}" is invalid, property value must be a valid integer. Using default value "{2}". + * + */ + public static String INVALID_PROPERTY_VALUE_INTEGER(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableINVALID_PROPERTY_VALUE_INTEGER(arg0, arg1, arg2)); + } + + public static Localizable localizableXMLWRITER_NO_PREFIX_FOR_URI(Object arg0) { + return MESSAGE_FACTORY.getMessage("xmlwriter.noPrefixForURI", arg0); + } + + /** + * XML writer error: no prefix for URI: "{0}" + * + */ + public static String XMLWRITER_NO_PREFIX_FOR_URI(Object arg0) { + return LOCALIZER.localize(localizableXMLWRITER_NO_PREFIX_FOR_URI(arg0)); + } + + public static Localizable localizableSTREAMING_PARSE_EXCEPTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("streaming.parseException", arg0); + } + + /** + * XML parsing error: {0} + * + */ + public static String STREAMING_PARSE_EXCEPTION(Object arg0) { + return LOCALIZER.localize(localizableSTREAMING_PARSE_EXCEPTION(arg0)); + } + + public static Localizable localizableXMLREADER_IO_EXCEPTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("xmlreader.ioException", arg0); + } + + /** + * XML reader error: {0} + * + */ + public static String XMLREADER_IO_EXCEPTION(Object arg0) { + return LOCALIZER.localize(localizableXMLREADER_IO_EXCEPTION(arg0)); + } + + public static Localizable localizableFASTINFOSET_DECODING_NOT_ACCEPTED() { + return MESSAGE_FACTORY.getMessage("fastinfoset.decodingNotAccepted"); + } + + /** + * Fast Infoset decoding is not accepted + * + */ + public static String FASTINFOSET_DECODING_NOT_ACCEPTED() { + return LOCALIZER.localize(localizableFASTINFOSET_DECODING_NOT_ACCEPTED()); + } + + public static Localizable localizableXMLREADER_ILLEGAL_STATE_ENCOUNTERED(Object arg0) { + return MESSAGE_FACTORY.getMessage("xmlreader.illegalStateEncountered", arg0); + } + + /** + * XML reader internal error: illegal state ({0}) + * + */ + public static String XMLREADER_ILLEGAL_STATE_ENCOUNTERED(Object arg0) { + return LOCALIZER.localize(localizableXMLREADER_ILLEGAL_STATE_ENCOUNTERED(arg0)); + } + + public static Localizable localizableSTAX_CANT_CREATE() { + return MESSAGE_FACTORY.getMessage("stax.cantCreate"); + } + + /** + * Unable to create StAX reader or writer + * + */ + public static String STAX_CANT_CREATE() { + return LOCALIZER.localize(localizableSTAX_CANT_CREATE()); + } + + public static Localizable localizableSTAXREADER_XMLSTREAMEXCEPTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("staxreader.xmlstreamexception", arg0); + } + + /** + * XML stream reader exception: {0} + * + */ + public static String STAXREADER_XMLSTREAMEXCEPTION(Object arg0) { + return LOCALIZER.localize(localizableSTAXREADER_XMLSTREAMEXCEPTION(arg0)); + } + + public static Localizable localizableXMLREADER_UNEXPECTED_STATE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("xmlreader.unexpectedState", arg0, arg1); + } + + /** + * unexpected XML reader state. expected: {0} but found: {1} + * + */ + public static String XMLREADER_UNEXPECTED_STATE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableXMLREADER_UNEXPECTED_STATE(arg0, arg1)); + } + + public static Localizable localizableINVALID_PROPERTY_VALUE_LONG(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("invalid.property.value.long", arg0, arg1, arg2); + } + + /** + * Ignoring system property "{0}" as value "{1}" is invalid, property value must be a valid long. Using default value "{2}". + * + */ + public static String INVALID_PROPERTY_VALUE_LONG(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableINVALID_PROPERTY_VALUE_LONG(arg0, arg1, arg2)); + } + + public static Localizable localizableSTREAMING_IO_EXCEPTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("streaming.ioException", arg0); + } + + /** + * XML parsing error: {0} + * + */ + public static String STREAMING_IO_EXCEPTION(Object arg0) { + return LOCALIZER.localize(localizableSTREAMING_IO_EXCEPTION(arg0)); + } + + public static Localizable localizableXMLREADER_UNEXPECTED_CHARACTER_CONTENT(Object arg0) { + return MESSAGE_FACTORY.getMessage("xmlreader.unexpectedCharacterContent", arg0); + } + + /** + * XML reader error: unexpected character content: "{0}" + * + */ + public static String XMLREADER_UNEXPECTED_CHARACTER_CONTENT(Object arg0) { + return LOCALIZER.localize(localizableXMLREADER_UNEXPECTED_CHARACTER_CONTENT(arg0)); + } + + public static Localizable localizableXMLWRITER_NESTED_ERROR(Object arg0) { + return MESSAGE_FACTORY.getMessage("xmlwriter.nestedError", arg0); + } + + /** + * XML writer error: {0} + * + */ + public static String XMLWRITER_NESTED_ERROR(Object arg0) { + return LOCALIZER.localize(localizableXMLWRITER_NESTED_ERROR(arg0)); + } + + public static Localizable localizableXMLWRITER_IO_EXCEPTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("xmlwriter.ioException", arg0); + } + + /** + * XML writer error: {0} + * + */ + public static String XMLWRITER_IO_EXCEPTION(Object arg0) { + return LOCALIZER.localize(localizableXMLWRITER_IO_EXCEPTION(arg0)); + } + + public static Localizable localizableXMLREADER_PARSE_EXCEPTION(Object arg0) { + return MESSAGE_FACTORY.getMessage("xmlreader.parseException", arg0); + } + + /** + * XML parsing error: {0} + * + */ + public static String XMLREADER_PARSE_EXCEPTION(Object arg0) { + return LOCALIZER.localize(localizableXMLREADER_PARSE_EXCEPTION(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java index e1842a79f19..ab5786c75ee 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,90 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class TubelineassemblyMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.tubelineassembly"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, TubelineassemblyMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableMASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(Object arg0, Object arg1) { - return messageFactory.getMessage("MASM0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE", arg0, arg1); - } - - /** - * MASM0019: Illegal logging level value "{1}" stored in the {0} message logging system property. Using default logging level. - * - */ - public static String MASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(Object arg0, Object arg1) { - return localizer.localize(localizableMASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(arg0, arg1)); - } - - public static Localizable localizableMASM_0009_CANNOT_FORM_VALID_URL(Object arg0) { - return messageFactory.getMessage("MASM0009_CANNOT_FORM_VALID_URL", arg0); - } - - /** - * MASM0009: Cannot form a valid URL from the resource name "{0}". For more details see the nested exception. - * - */ - public static String MASM_0009_CANNOT_FORM_VALID_URL(Object arg0) { - return localizer.localize(localizableMASM_0009_CANNOT_FORM_VALID_URL(arg0)); - } - - public static Localizable localizableMASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(Object arg0) { - return messageFactory.getMessage("MASM0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE", arg0); - } - - /** - * MASM0005: No default tubeline is defined in the default [ {0} ] configuration file - * - */ - public static String MASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(Object arg0) { - return localizer.localize(localizableMASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(arg0)); - } - - public static Localizable localizableMASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(Object arg0) { - return messageFactory.getMessage("MASM0003_DEFAULT_CFG_FILE_NOT_LOADED", arg0); - } - - /** - * MASM0003: Default [ {0} ] configuration file was not loaded - * - */ - public static String MASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(Object arg0) { - return localizer.localize(localizableMASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(arg0)); - } - - public static Localizable localizableMASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(Object arg0, Object arg1) { - return messageFactory.getMessage("MASM0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE", arg0, arg1); - } - - /** - * MASM0018: Message logging {0} system property detected to be set to value {1} - * - */ - public static String MASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(Object arg0, Object arg1) { - return localizer.localize(localizableMASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(arg0, arg1)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new TubelineassemblyMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableMASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("MASM0001_DEFAULT_CFG_FILE_NOT_FOUND", arg0); + return MESSAGE_FACTORY.getMessage("MASM0001_DEFAULT_CFG_FILE_NOT_FOUND", arg0); } /** @@ -116,155 +54,11 @@ public final class TubelineassemblyMessages { * */ public static String MASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(Object arg0) { - return localizer.localize(localizableMASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(arg0)); - } - - public static Localizable localizableMASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(Object arg0) { - return messageFactory.getMessage("MASM0020_ERROR_CREATING_URI_FROM_GENERATED_STRING", arg0); - } - - /** - * MASM0020: Unable to create a new URI instance for generated endpoint URI string [ {0} ] - * - */ - public static String MASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(Object arg0) { - return localizer.localize(localizableMASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(arg0)); - } - - public static Localizable localizableMASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(Object arg0) { - return messageFactory.getMessage("MASM0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY", arg0); - } - - /** - * MASM0016: Unable to instantiate Tube factory class [ {0} ] - * - */ - public static String MASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(Object arg0) { - return localizer.localize(localizableMASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(arg0)); - } - - public static Localizable localizableMASM_0012_LOADING_VIA_SERVLET_CONTEXT(Object arg0, Object arg1) { - return messageFactory.getMessage("MASM0012_LOADING_VIA_SERVLET_CONTEXT", arg0, arg1); - } - - /** - * MASM0012: Trying to load [ {0} ] via servlet context [ {1} ] - * - */ - public static String MASM_0012_LOADING_VIA_SERVLET_CONTEXT(Object arg0, Object arg1) { - return localizer.localize(localizableMASM_0012_LOADING_VIA_SERVLET_CONTEXT(arg0, arg1)); - } - - public static Localizable localizableMASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(Object arg0) { - return messageFactory.getMessage("MASM0010_ERROR_READING_CFG_FILE_FROM_LOCATION", arg0); - } - - /** - * MASM0010: Unable to unmarshall metro config file from location [ {0} ] - * - */ - public static String MASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(Object arg0) { - return localizer.localize(localizableMASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(arg0)); - } - - public static Localizable localizableMASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(Object arg0) { - return messageFactory.getMessage("MASM0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE", arg0); - } - - /** - * MASM0004: No section found in the default [ {0} ] configuration file - * - */ - public static String MASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(Object arg0) { - return localizer.localize(localizableMASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(arg0)); - } - - public static Localizable localizableMASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(Object arg0) { - return messageFactory.getMessage("MASM0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD", arg0); - } - - /** - * MASM0013: Unable to invoke {0} method on servlet context instance - * - */ - public static String MASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(Object arg0) { - return localizer.localize(localizableMASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(arg0)); - } - - public static Localizable localizableMASM_0007_APP_CFG_FILE_NOT_FOUND() { - return messageFactory.getMessage("MASM0007_APP_CFG_FILE_NOT_FOUND"); - } - - /** - * MASM0007: No application metro.xml configuration file found. - * - */ - public static String MASM_0007_APP_CFG_FILE_NOT_FOUND() { - return localizer.localize(localizableMASM_0007_APP_CFG_FILE_NOT_FOUND()); - } - - public static Localizable localizableMASM_0002_DEFAULT_CFG_FILE_LOCATED(Object arg0, Object arg1) { - return messageFactory.getMessage("MASM0002_DEFAULT_CFG_FILE_LOCATED", arg0, arg1); - } - - /** - * MASM0002: Default [ {0} ] configuration file located at [ {1} ] - * - */ - public static String MASM_0002_DEFAULT_CFG_FILE_LOCATED(Object arg0, Object arg1) { - return localizer.localize(localizableMASM_0002_DEFAULT_CFG_FILE_LOCATED(arg0, arg1)); - } - - public static Localizable localizableMASM_0014_UNABLE_TO_LOAD_CLASS(Object arg0) { - return messageFactory.getMessage("MASM0014_UNABLE_TO_LOAD_CLASS", arg0); - } - - /** - * MASM0014: Unable to load [ {0} ] class - * - */ - public static String MASM_0014_UNABLE_TO_LOAD_CLASS(Object arg0) { - return localizer.localize(localizableMASM_0014_UNABLE_TO_LOAD_CLASS(arg0)); - } - - public static Localizable localizableMASM_0006_APP_CFG_FILE_LOCATED(Object arg0) { - return messageFactory.getMessage("MASM0006_APP_CFG_FILE_LOCATED", arg0); - } - - /** - * MASM0006: Application metro.xml configuration file located at [ {0} ] - * - */ - public static String MASM_0006_APP_CFG_FILE_LOCATED(Object arg0) { - return localizer.localize(localizableMASM_0006_APP_CFG_FILE_LOCATED(arg0)); - } - - public static Localizable localizableMASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(Object arg0) { - return messageFactory.getMessage("MASM0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS", arg0); - } - - /** - * MASM0017: Unable to load Tube factory class [ {0} ] - * - */ - public static String MASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(Object arg0) { - return localizer.localize(localizableMASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(arg0)); - } - - public static Localizable localizableMASM_0008_INVALID_URI_REFERENCE(Object arg0) { - return messageFactory.getMessage("MASM0008_INVALID_URI_REFERENCE", arg0); - } - - /** - * MASM0008: Invalid URI reference [ {0} ] - * - */ - public static String MASM_0008_INVALID_URI_REFERENCE(Object arg0) { - return localizer.localize(localizableMASM_0008_INVALID_URI_REFERENCE(arg0)); + return LOCALIZER.localize(localizableMASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(arg0)); } public static Localizable localizableMASM_0011_LOADING_RESOURCE(Object arg0, Object arg1) { - return messageFactory.getMessage("MASM0011_LOADING_RESOURCE", arg0, arg1); + return MESSAGE_FACTORY.getMessage("MASM0011_LOADING_RESOURCE", arg0, arg1); } /** @@ -272,11 +66,95 @@ public final class TubelineassemblyMessages { * */ public static String MASM_0011_LOADING_RESOURCE(Object arg0, Object arg1) { - return localizer.localize(localizableMASM_0011_LOADING_RESOURCE(arg0, arg1)); + return LOCALIZER.localize(localizableMASM_0011_LOADING_RESOURCE(arg0, arg1)); + } + + public static Localizable localizableMASM_0012_LOADING_VIA_SERVLET_CONTEXT(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("MASM0012_LOADING_VIA_SERVLET_CONTEXT", arg0, arg1); + } + + /** + * MASM0012: Trying to load [ {0} ] via servlet context [ {1} ] + * + */ + public static String MASM_0012_LOADING_VIA_SERVLET_CONTEXT(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableMASM_0012_LOADING_VIA_SERVLET_CONTEXT(arg0, arg1)); + } + + public static Localizable localizableMASM_0002_DEFAULT_CFG_FILE_LOCATED(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("MASM0002_DEFAULT_CFG_FILE_LOCATED", arg0, arg1); + } + + /** + * MASM0002: Default [ {0} ] configuration file located at [ {1} ] + * + */ + public static String MASM_0002_DEFAULT_CFG_FILE_LOCATED(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableMASM_0002_DEFAULT_CFG_FILE_LOCATED(arg0, arg1)); + } + + public static Localizable localizableMASM_0007_APP_CFG_FILE_NOT_FOUND() { + return MESSAGE_FACTORY.getMessage("MASM0007_APP_CFG_FILE_NOT_FOUND"); + } + + /** + * MASM0007: No application metro.xml configuration file found. + * + */ + public static String MASM_0007_APP_CFG_FILE_NOT_FOUND() { + return LOCALIZER.localize(localizableMASM_0007_APP_CFG_FILE_NOT_FOUND()); + } + + public static Localizable localizableMASM_0006_APP_CFG_FILE_LOCATED(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0006_APP_CFG_FILE_LOCATED", arg0); + } + + /** + * MASM0006: Application metro.xml configuration file located at [ {0} ] + * + */ + public static String MASM_0006_APP_CFG_FILE_LOCATED(Object arg0) { + return LOCALIZER.localize(localizableMASM_0006_APP_CFG_FILE_LOCATED(arg0)); + } + + public static Localizable localizableMASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("MASM0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE", arg0, arg1); + } + + /** + * MASM0018: Message logging {0} system property detected to be set to value {1} + * + */ + public static String MASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableMASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(arg0, arg1)); + } + + public static Localizable localizableMASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0003_DEFAULT_CFG_FILE_NOT_LOADED", arg0); + } + + /** + * MASM0003: Default [ {0} ] configuration file was not loaded + * + */ + public static String MASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(Object arg0) { + return LOCALIZER.localize(localizableMASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(arg0)); + } + + public static Localizable localizableMASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE", arg0); + } + + /** + * MASM0004: No section found in the default [ {0} ] configuration file + * + */ + public static String MASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(Object arg0) { + return LOCALIZER.localize(localizableMASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(arg0)); } public static Localizable localizableMASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(Object arg0, Object arg1) { - return messageFactory.getMessage("MASM0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE", arg0, arg1); + return MESSAGE_FACTORY.getMessage("MASM0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE", arg0, arg1); } /** @@ -284,7 +162,138 @@ public final class TubelineassemblyMessages { * */ public static String MASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(Object arg0, Object arg1) { - return localizer.localize(localizableMASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(arg0, arg1)); + return LOCALIZER.localize(localizableMASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(arg0, arg1)); + } + + public static Localizable localizableMASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0020_ERROR_CREATING_URI_FROM_GENERATED_STRING", arg0); + } + + /** + * MASM0020: Unable to create a new URI instance for generated endpoint URI string [ {0} ] + * + */ + public static String MASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(Object arg0) { + return LOCALIZER.localize(localizableMASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(arg0)); + } + + public static Localizable localizableMASM_0008_INVALID_URI_REFERENCE(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0008_INVALID_URI_REFERENCE", arg0); + } + + /** + * MASM0008: Invalid URI reference [ {0} ] + * + */ + public static String MASM_0008_INVALID_URI_REFERENCE(Object arg0) { + return LOCALIZER.localize(localizableMASM_0008_INVALID_URI_REFERENCE(arg0)); + } + + public static Localizable localizableMASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY", arg0); + } + + /** + * MASM0016: Unable to instantiate Tube factory class [ {0} ] + * + */ + public static String MASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(Object arg0) { + return LOCALIZER.localize(localizableMASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(arg0)); + } + + public static Localizable localizableMASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0010_ERROR_READING_CFG_FILE_FROM_LOCATION", arg0); + } + + /** + * MASM0010: Unable to unmarshall metro config file from location [ {0} ] + * + */ + public static String MASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(Object arg0) { + return LOCALIZER.localize(localizableMASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(arg0)); + } + + public static Localizable localizableMASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE", arg0); + } + + /** + * MASM0005: No default tubeline is defined in the default [ {0} ] configuration file + * + */ + public static String MASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(Object arg0) { + return LOCALIZER.localize(localizableMASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(arg0)); + } + + public static Localizable localizableMASM_0014_UNABLE_TO_LOAD_CLASS(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0014_UNABLE_TO_LOAD_CLASS", arg0); + } + + /** + * MASM0014: Unable to load [ {0} ] class + * + */ + public static String MASM_0014_UNABLE_TO_LOAD_CLASS(Object arg0) { + return LOCALIZER.localize(localizableMASM_0014_UNABLE_TO_LOAD_CLASS(arg0)); + } + + public static Localizable localizableMASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD", arg0); + } + + /** + * MASM0013: Unable to invoke {0} method on servlet context instance + * + */ + public static String MASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(Object arg0) { + return LOCALIZER.localize(localizableMASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(arg0)); + } + + public static Localizable localizableMASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("MASM0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE", arg0, arg1); + } + + /** + * MASM0019: Illegal logging level value "{1}" stored in the {0} message logging system property. Using default logging level. + * + */ + public static String MASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableMASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(arg0, arg1)); + } + + public static Localizable localizableMASM_0009_CANNOT_FORM_VALID_URL(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0009_CANNOT_FORM_VALID_URL", arg0); + } + + /** + * MASM0009: Cannot form a valid URL from the resource name "{0}". For more details see the nested exception. + * + */ + public static String MASM_0009_CANNOT_FORM_VALID_URL(Object arg0) { + return LOCALIZER.localize(localizableMASM_0009_CANNOT_FORM_VALID_URL(arg0)); + } + + public static Localizable localizableMASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(Object arg0) { + return MESSAGE_FACTORY.getMessage("MASM0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS", arg0); + } + + /** + * MASM0017: Unable to load Tube factory class [ {0} ] + * + */ + public static String MASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(Object arg0) { + return LOCALIZER.localize(localizableMASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/UtilMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/UtilMessages.java index d62c0d8ffa7..574ad6f8ab8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/UtilMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/UtilMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,114 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class UtilMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.util"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, UtilMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableUTIL_LOCATION(Object arg0, Object arg1) { - return messageFactory.getMessage("util.location", arg0, arg1); - } - - /** - * at line {0} of {1} - * - */ - public static String UTIL_LOCATION(Object arg0, Object arg1) { - return localizer.localize(localizableUTIL_LOCATION(arg0, arg1)); - } - - public static Localizable localizableUTIL_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) { - return messageFactory.getMessage("util.failed.to.parse.handlerchain.file", arg0, arg1); - } - - /** - * Could not parse handler chain file {1} for class {0} - * - */ - public static String UTIL_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) { - return localizer.localize(localizableUTIL_FAILED_TO_PARSE_HANDLERCHAIN_FILE(arg0, arg1)); - } - - public static Localizable localizableUTIL_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("util.parser.wrong.element", arg0, arg1, arg2); - } - - /** - * found element "{1}", expected "{2}" in handler chain configuration (line {0}) - * - */ - public static String UTIL_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableUTIL_PARSER_WRONG_ELEMENT(arg0, arg1, arg2)); - } - - public static Localizable localizableUTIL_HANDLER_CLASS_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("util.handler.class.not.found", arg0); - } - - /** - * "Class: {0} could not be found" - * - */ - public static String UTIL_HANDLER_CLASS_NOT_FOUND(Object arg0) { - return localizer.localize(localizableUTIL_HANDLER_CLASS_NOT_FOUND(arg0)); - } - - public static Localizable localizableUTIL_HANDLER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) { - return messageFactory.getMessage("util.handler.endpoint.interface.no.webservice", arg0); - } - - /** - * "The Endpoint Interface: {0} does not have WebService Annotation" - * - */ - public static String UTIL_HANDLER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) { - return localizer.localize(localizableUTIL_HANDLER_ENDPOINT_INTERFACE_NO_WEBSERVICE(arg0)); - } - - public static Localizable localizableUTIL_HANDLER_NO_WEBSERVICE_ANNOTATION(Object arg0) { - return messageFactory.getMessage("util.handler.no.webservice.annotation", arg0); - } - - /** - * "A WebService annotation is not present on class: {0}" - * - */ - public static String UTIL_HANDLER_NO_WEBSERVICE_ANNOTATION(Object arg0) { - return localizer.localize(localizableUTIL_HANDLER_NO_WEBSERVICE_ANNOTATION(arg0)); - } - - public static Localizable localizableUTIL_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) { - return messageFactory.getMessage("util.failed.to.find.handlerchain.file", arg0, arg1); - } - - /** - * Could not find handler chain file {1} for class {0} - * - */ - public static String UTIL_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) { - return localizer.localize(localizableUTIL_FAILED_TO_FIND_HANDLERCHAIN_FILE(arg0, arg1)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new UtilMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableUTIL_HANDLER_CANNOT_COMBINE_SOAPMESSAGEHANDLERS() { - return messageFactory.getMessage("util.handler.cannot.combine.soapmessagehandlers"); + return MESSAGE_FACTORY.getMessage("util.handler.cannot.combine.soapmessagehandlers"); } /** @@ -140,7 +54,102 @@ public final class UtilMessages { * */ public static String UTIL_HANDLER_CANNOT_COMBINE_SOAPMESSAGEHANDLERS() { - return localizer.localize(localizableUTIL_HANDLER_CANNOT_COMBINE_SOAPMESSAGEHANDLERS()); + return LOCALIZER.localize(localizableUTIL_HANDLER_CANNOT_COMBINE_SOAPMESSAGEHANDLERS()); + } + + public static Localizable localizableUTIL_LOCATION(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("util.location", arg0, arg1); + } + + /** + * at line {0} of {1} + * + */ + public static String UTIL_LOCATION(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableUTIL_LOCATION(arg0, arg1)); + } + + public static Localizable localizableUTIL_HANDLER_CLASS_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("util.handler.class.not.found", arg0); + } + + /** + * "Class: {0} could not be found" + * + */ + public static String UTIL_HANDLER_CLASS_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableUTIL_HANDLER_CLASS_NOT_FOUND(arg0)); + } + + public static Localizable localizableUTIL_HANDLER_NO_WEBSERVICE_ANNOTATION(Object arg0) { + return MESSAGE_FACTORY.getMessage("util.handler.no.webservice.annotation", arg0); + } + + /** + * "A WebService annotation is not present on class: {0}" + * + */ + public static String UTIL_HANDLER_NO_WEBSERVICE_ANNOTATION(Object arg0) { + return LOCALIZER.localize(localizableUTIL_HANDLER_NO_WEBSERVICE_ANNOTATION(arg0)); + } + + public static Localizable localizableUTIL_HANDLER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) { + return MESSAGE_FACTORY.getMessage("util.handler.endpoint.interface.no.webservice", arg0); + } + + /** + * "The Endpoint Interface: {0} does not have WebService Annotation" + * + */ + public static String UTIL_HANDLER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) { + return LOCALIZER.localize(localizableUTIL_HANDLER_ENDPOINT_INTERFACE_NO_WEBSERVICE(arg0)); + } + + public static Localizable localizableUTIL_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) { + return MESSAGE_FACTORY.getMessage("util.parser.wrong.element", arg0, arg1, arg2); + } + + /** + * found element "{1}", expected "{2}" in handler chain configuration (line {0}) + * + */ + public static String UTIL_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) { + return LOCALIZER.localize(localizableUTIL_PARSER_WRONG_ELEMENT(arg0, arg1, arg2)); + } + + public static Localizable localizableUTIL_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("util.failed.to.parse.handlerchain.file", arg0, arg1); + } + + /** + * Could not parse handler chain file {1} for class {0} + * + */ + public static String UTIL_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableUTIL_FAILED_TO_PARSE_HANDLERCHAIN_FILE(arg0, arg1)); + } + + public static Localizable localizableUTIL_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("util.failed.to.find.handlerchain.file", arg0, arg1); + } + + /** + * Could not find handler chain file {1} for class {0} + * + */ + public static String UTIL_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableUTIL_FAILED_TO_FIND_HANDLERCHAIN_FILE(arg0, arg1)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java index a431885f204..d6bcbcecfde 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,30 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class WsdlmodelMessages { - private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.wsdlmodel"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, WsdlmodelMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.wsdlmodel"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new WsdlmodelMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableWSDL_PORTADDRESS_EPRADDRESS_NOT_MATCH(Object arg0, Object arg1, Object arg2) { - return messageFactory.getMessage("wsdl.portaddress.epraddress.not.match", arg0, arg1, arg2); + return MESSAGE_FACTORY.getMessage("wsdl.portaddress.epraddress.not.match", arg0, arg1, arg2); } /** @@ -56,11 +54,11 @@ public final class WsdlmodelMessages { * */ public static String WSDL_PORTADDRESS_EPRADDRESS_NOT_MATCH(Object arg0, Object arg1, Object arg2) { - return localizer.localize(localizableWSDL_PORTADDRESS_EPRADDRESS_NOT_MATCH(arg0, arg1, arg2)); + return LOCALIZER.localize(localizableWSDL_PORTADDRESS_EPRADDRESS_NOT_MATCH(arg0, arg1, arg2)); } public static Localizable localizableWSDL_IMPORT_SHOULD_BE_WSDL(Object arg0) { - return messageFactory.getMessage("wsdl.import.should.be.wsdl", arg0); + return MESSAGE_FACTORY.getMessage("wsdl.import.should.be.wsdl", arg0); } /** @@ -69,11 +67,11 @@ public final class WsdlmodelMessages { * */ public static String WSDL_IMPORT_SHOULD_BE_WSDL(Object arg0) { - return localizer.localize(localizableWSDL_IMPORT_SHOULD_BE_WSDL(arg0)); + return LOCALIZER.localize(localizableWSDL_IMPORT_SHOULD_BE_WSDL(arg0)); } public static Localizable localizableMEX_METADATA_SYSTEMID_NULL() { - return messageFactory.getMessage("Mex.metadata.systemid.null"); + return MESSAGE_FACTORY.getMessage("Mex.metadata.systemid.null"); } /** @@ -81,7 +79,18 @@ public final class WsdlmodelMessages { * */ public static String MEX_METADATA_SYSTEMID_NULL() { - return localizer.localize(localizableMEX_METADATA_SYSTEMID_NULL()); + return LOCALIZER.localize(localizableMEX_METADATA_SYSTEMID_NULL()); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsservletMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsservletMessages.java index efcdcb72944..51b07ab0c74 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsservletMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsservletMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,426 +25,52 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class WsservletMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.wsservlet"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, WsservletMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new WsservletMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION() { - return messageFactory.getMessage("error.wsdlPublisher.cannotReadConfiguration"); + public static Localizable localizableWSSERVLET_23_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET23.diag.cause.1"); } /** - * WSSERVLET46: cannot read configuration + * The request generated no response from the service * */ - public static String ERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION() { - return localizer.localize(localizableERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION()); + public static String WSSERVLET_23_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_23_DIAG_CAUSE_1()); } - public static Localizable localizableWSSERVLET_22_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET22.diag.check.1"); + public static Localizable localizableWSSERVLET_30_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET30.diag.check.1"); } /** - * Set endpoint with stub.setTargetEndpoint property + * This could be due to a number of causes. Check the server log file for exceptions. * */ - public static String WSSERVLET_22_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_22_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_33_DIAG_CAUSE_2() { - return messageFactory.getMessage("WSSERVLET33.diag.cause.2"); - } - - /** - * When publishing the service wsdl, the http location is patched with the deployed location/endpoint using XSLT transformation. The transformer could not be created to do the transformation. - * - */ - public static String WSSERVLET_33_DIAG_CAUSE_2() { - return localizer.localize(localizableWSSERVLET_33_DIAG_CAUSE_2()); - } - - public static Localizable localizableWSSERVLET_33_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET33.diag.cause.1"); - } - - /** - * When publishing the service wsdl, the http location is patched with the deployed location/endpoint using XSLT transformation. The transformer could not be created to do the transformation. - * - */ - public static String WSSERVLET_33_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_33_DIAG_CAUSE_1()); - } - - public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_DUPLICATE_NAME(Object arg0) { - return messageFactory.getMessage("error.implementorRegistry.duplicateName", arg0); - } - - /** - * WSSERVLET42: duplicate port name: {0} - * - */ - public static String ERROR_IMPLEMENTOR_REGISTRY_DUPLICATE_NAME(Object arg0) { - return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_DUPLICATE_NAME(arg0)); - } - - public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_FILE_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("error.implementorRegistry.fileNotFound", arg0); - } - - /** - * WSSERVLET45: file not found: {0} - * - */ - public static String ERROR_IMPLEMENTOR_REGISTRY_FILE_NOT_FOUND(Object arg0) { - return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_FILE_NOT_FOUND(arg0)); - } - - public static Localizable localizableSERVLET_TRACE_INVOKING_IMPLEMENTOR(Object arg0) { - return messageFactory.getMessage("servlet.trace.invokingImplementor", arg0); - } - - /** - * WSSERVLET21: invoking implementor: {0} - * - */ - public static String SERVLET_TRACE_INVOKING_IMPLEMENTOR(Object arg0) { - return localizer.localize(localizableSERVLET_TRACE_INVOKING_IMPLEMENTOR(arg0)); - } - - public static Localizable localizableWSSERVLET_17_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET17.diag.cause.1"); - } - - /** - * Two or more endpoints with the same name where found in the jaxrpc-ri.xml runtime descriptor - * - */ - public static String WSSERVLET_17_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_17_DIAG_CAUSE_1()); - } - - public static Localizable localizableHTML_NON_ROOT_PAGE_BODY_2() { - return messageFactory.getMessage("html.nonRootPage.body2"); - } - - /** - *

    Invalid request URI.

    Please check your deployment information.

    - * - */ - public static String HTML_NON_ROOT_PAGE_BODY_2() { - return localizer.localize(localizableHTML_NON_ROOT_PAGE_BODY_2()); - } - - public static Localizable localizableHTML_NON_ROOT_PAGE_BODY_1() { - return messageFactory.getMessage("html.nonRootPage.body1"); - } - - /** - *

    A Web Service is installed at this URL.

    - * - */ - public static String HTML_NON_ROOT_PAGE_BODY_1() { - return localizer.localize(localizableHTML_NON_ROOT_PAGE_BODY_1()); - } - - public static Localizable localizablePUBLISHER_INFO_APPLYING_TRANSFORMATION(Object arg0) { - return messageFactory.getMessage("publisher.info.applyingTransformation", arg0); - } - - /** - * WSSERVLET31: applying transformation with actual address: {0} - * - */ - public static String PUBLISHER_INFO_APPLYING_TRANSFORMATION(Object arg0) { - return localizer.localize(localizablePUBLISHER_INFO_APPLYING_TRANSFORMATION(arg0)); - } - - public static Localizable localizableWSSERVLET_29_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET29.diag.check.1"); - } - - /** - * Is the port valid? Unzip the war file and make sure the tie and serializers are present - * - */ - public static String WSSERVLET_29_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_29_DIAG_CHECK_1()); - } - - public static Localizable localizableSERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(Object arg0) { - return messageFactory.getMessage("servlet.trace.gotRequestForEndpoint", arg0); - } - - /** - * WSSERVLET19: got request for endpoint: {0} - * - */ - public static String SERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(Object arg0) { - return localizer.localize(localizableSERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(arg0)); - } - - public static Localizable localizableERROR_SERVLET_INIT_CONFIG_PARAMETER_MISSING(Object arg0) { - return messageFactory.getMessage("error.servlet.init.config.parameter.missing", arg0); - } - - /** - * WSSERVLET47: cannot find configuration parameter: "{0}" - * - */ - public static String ERROR_SERVLET_INIT_CONFIG_PARAMETER_MISSING(Object arg0) { - return localizer.localize(localizableERROR_SERVLET_INIT_CONFIG_PARAMETER_MISSING(arg0)); - } - - public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_SERVANT_INIT_FAILED(Object arg0) { - return messageFactory.getMessage("error.implementorFactory.servantInitFailed", arg0); - } - - /** - * WSSERVLET44: failed to initialize the service implementor for port "{0}" - * - */ - public static String ERROR_IMPLEMENTOR_FACTORY_SERVANT_INIT_FAILED(Object arg0) { - return localizer.localize(localizableERROR_IMPLEMENTOR_FACTORY_SERVANT_INIT_FAILED(arg0)); - } - - public static Localizable localizableWSSERVLET_13_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET13.diag.check.1"); - } - - /** - * Normal web service shutdown - * - */ - public static String WSSERVLET_13_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_13_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_31_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET31.diag.cause.1"); - } - - /** - * Transformation being applied - * - */ - public static String WSSERVLET_31_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_31_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_50_DIAG_CHECK_3() { - return messageFactory.getMessage("WSSERVLET50.diag.check.3"); - } - - /** - * Check the server.xml file in the domain directory for failures - * - */ - public static String WSSERVLET_50_DIAG_CHECK_3() { - return localizer.localize(localizableWSSERVLET_50_DIAG_CHECK_3()); - } - - public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_NO_INPUT_STREAM() { - return messageFactory.getMessage("error.implementorFactory.noInputStream"); - } - - /** - * WSSERVLET37: no configuration specified - * - */ - public static String ERROR_IMPLEMENTOR_FACTORY_NO_INPUT_STREAM() { - return localizer.localize(localizableERROR_IMPLEMENTOR_FACTORY_NO_INPUT_STREAM()); - } - - public static Localizable localizableWSSERVLET_24_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET24.diag.cause.1"); - } - - /** - * SOAPFault message is being returned to the client. - * - */ - public static String WSSERVLET_24_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_24_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_50_DIAG_CHECK_2() { - return messageFactory.getMessage("WSSERVLET50.diag.check.2"); - } - - /** - * Verify that Application server deployment descriptors are correct in the service war file - * - */ - public static String WSSERVLET_50_DIAG_CHECK_2() { - return localizer.localize(localizableWSSERVLET_50_DIAG_CHECK_2()); - } - - public static Localizable localizableWSSERVLET_50_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET50.diag.check.1"); - } - - /** - * Verify that sun-jaxws.xml and web.xml are correct in the service war file - * - */ - public static String WSSERVLET_50_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_50_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_43_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET43.diag.check.1"); - } - - /** - * Make sure web service is available and public. Examine exception for more details - * - */ - public static String WSSERVLET_43_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_43_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_15_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET15.diag.cause.1"); - } - - /** - * Web Services servlet shutdown. - * - */ - public static String WSSERVLET_15_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_15_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_27_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET27.diag.check.1"); - } - - /** - * Remove the implicit URL - * - */ - public static String WSSERVLET_27_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_27_DIAG_CHECK_1()); - } - - public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_UNKNOWN_NAME(Object arg0) { - return messageFactory.getMessage("error.implementorRegistry.unknownName", arg0); - } - - /** - * WSSERVLET38: unknown port name: {0} - * - */ - public static String ERROR_IMPLEMENTOR_REGISTRY_UNKNOWN_NAME(Object arg0) { - return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_UNKNOWN_NAME(arg0)); - } - - public static Localizable localizableSERVLET_HTML_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("servlet.html.notFound", arg0); - } - - /** - *

    404 Not Found: {0}

    - * - */ - public static String SERVLET_HTML_NOT_FOUND(Object arg0) { - return localizer.localize(localizableSERVLET_HTML_NOT_FOUND(arg0)); - } - - public static Localizable localizableHTML_ROOT_PAGE_TITLE() { - return messageFactory.getMessage("html.rootPage.title"); - } - - /** - * Web Service - * - */ - public static String HTML_ROOT_PAGE_TITLE() { - return localizer.localize(localizableHTML_ROOT_PAGE_TITLE()); - } - - public static Localizable localizableWSSERVLET_20_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET20.diag.check.1"); - } - - /** - * Unzip the war, are the tie and serializer classes found? - * - */ - public static String WSSERVLET_20_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_20_DIAG_CHECK_1()); - } - - public static Localizable localizableJAXRPCSERVLET_11_DIAG_CAUSE_1() { - return messageFactory.getMessage("JAXRPCSERVLET11.diag.cause.1"); - } - - /** - * WSRuntimeInfoParser could not parse sun-jaxws.xml runtime descriptor - * - */ - public static String JAXRPCSERVLET_11_DIAG_CAUSE_1() { - return localizer.localize(localizableJAXRPCSERVLET_11_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_11_DIAG_CHECK_2() { - return messageFactory.getMessage("WSSERVLET11.diag.check.2"); - } - - /** - * Please check the jaxrpc-ri.xml file to make sure it is present in the war file - * - */ - public static String WSSERVLET_11_DIAG_CHECK_2() { - return localizer.localize(localizableWSSERVLET_11_DIAG_CHECK_2()); - } - - public static Localizable localizableWSSERVLET_11_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET11.diag.check.1"); - } - - /** - * Please check the sun-jaxws.xml file to make sure it is correct - * - */ - public static String WSSERVLET_11_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_11_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_22_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET22.diag.cause.1"); - } - - /** - * A request was invoked with no endpoint - * - */ - public static String WSSERVLET_22_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_22_DIAG_CAUSE_1()); + public static String WSSERVLET_30_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_30_DIAG_CHECK_1()); } public static Localizable localizableWSSERVLET_34_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET34.diag.check.1"); + return MESSAGE_FACTORY.getMessage("WSSERVLET34.diag.check.1"); } /** @@ -452,71 +78,143 @@ public final class WsservletMessages { * */ public static String WSSERVLET_34_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_34_DIAG_CHECK_1()); + return LOCALIZER.localize(localizableWSSERVLET_34_DIAG_CHECK_1()); } - public static Localizable localizableERROR_SERVLET_NO_IMPLEMENTOR_FOR_PORT(Object arg0) { - return messageFactory.getMessage("error.servlet.noImplementorForPort", arg0); + public static Localizable localizableSERVLET_FAULTSTRING_INVALID_CONTENT_TYPE() { + return MESSAGE_FACTORY.getMessage("servlet.faultstring.invalidContentType"); } /** - * WSSERVLET52: no implementor registered for port: {0} + * WSSERVLET64: Invalid Content-Type, text/xml required * */ - public static String ERROR_SERVLET_NO_IMPLEMENTOR_FOR_PORT(Object arg0) { - return localizer.localize(localizableERROR_SERVLET_NO_IMPLEMENTOR_FOR_PORT(arg0)); + public static String SERVLET_FAULTSTRING_INVALID_CONTENT_TYPE() { + return LOCALIZER.localize(localizableSERVLET_FAULTSTRING_INVALID_CONTENT_TYPE()); } - public static Localizable localizableWSSERVLET_64_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET64.diag.check.1"); + public static Localizable localizableWSSERVLET_27_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET27.diag.cause.1"); } /** - * Make sure the client request is using text/xml + * Implicit URLS are not supported in this release * */ - public static String WSSERVLET_64_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_64_DIAG_CHECK_1()); + public static String WSSERVLET_27_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_27_DIAG_CAUSE_1()); } - public static Localizable localizableWSSERVLET_18_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET18.diag.check.1"); + public static Localizable localizableHTML_WSDL_PAGE_NO_WSDL() { + return MESSAGE_FACTORY.getMessage("html.wsdlPage.noWsdl"); } /** - * This may or may not be intentional. If not examine client program for errors. + *

    No WSDL document available for publishing.

    Please check your deployment information.

    * */ - public static String WSSERVLET_18_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_18_DIAG_CHECK_1()); + public static String HTML_WSDL_PAGE_NO_WSDL() { + return LOCALIZER.localize(localizableHTML_WSDL_PAGE_NO_WSDL()); } - public static Localizable localizableWSSERVLET_29_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET29.diag.cause.1"); + public static Localizable localizableWSSERVLET_19_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET19.diag.check.1"); } /** - * A port is specified, but a corresponding service implementation is not found + * Informational message only. Normal operation. * */ - public static String WSSERVLET_29_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_29_DIAG_CAUSE_1()); + public static String WSSERVLET_19_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_19_DIAG_CHECK_1()); } - public static Localizable localizableSERVLET_ERROR_NO_RESPONSE_MESSAGE() { - return messageFactory.getMessage("servlet.error.noResponseMessage"); + public static Localizable localizableSERVLET_TRACE_WRITING_FAULT_RESPONSE() { + return MESSAGE_FACTORY.getMessage("servlet.trace.writingFaultResponse"); } /** - * WSSERVLET23: no response message + * WSSERVLET24: writing fault response * */ - public static String SERVLET_ERROR_NO_RESPONSE_MESSAGE() { - return localizer.localize(localizableSERVLET_ERROR_NO_RESPONSE_MESSAGE()); + public static String SERVLET_TRACE_WRITING_FAULT_RESPONSE() { + return LOCALIZER.localize(localizableSERVLET_TRACE_WRITING_FAULT_RESPONSE()); + } + + public static Localizable localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_NAME() { + return MESSAGE_FACTORY.getMessage("servlet.warning.duplicateEndpointName"); + } + + /** + * WSSERVLET17: duplicate endpoint name + * + */ + public static String SERVLET_WARNING_DUPLICATE_ENDPOINT_NAME() { + return LOCALIZER.localize(localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_NAME()); + } + + public static Localizable localizableTRACE_SERVLET_HANDING_REQUEST_OVER_TO_IMPLEMENTOR(Object arg0) { + return MESSAGE_FACTORY.getMessage("trace.servlet.handingRequestOverToImplementor", arg0); + } + + /** + * WSSERVLET59: handing request over to implementor: {0} + * + */ + public static String TRACE_SERVLET_HANDING_REQUEST_OVER_TO_IMPLEMENTOR(Object arg0) { + return LOCALIZER.localize(localizableTRACE_SERVLET_HANDING_REQUEST_OVER_TO_IMPLEMENTOR(arg0)); + } + + public static Localizable localizableWSSERVLET_11_DIAG_CHECK_2() { + return MESSAGE_FACTORY.getMessage("WSSERVLET11.diag.check.2"); + } + + /** + * Please check the jaxrpc-ri.xml file to make sure it is present in the war file + * + */ + public static String WSSERVLET_11_DIAG_CHECK_2() { + return LOCALIZER.localize(localizableWSSERVLET_11_DIAG_CHECK_2()); + } + + public static Localizable localizableWSSERVLET_65_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET65.diag.check.1"); + } + + /** + * Add SOAPAction and appropriate value + * + */ + public static String WSSERVLET_65_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_65_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_11_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET11.diag.check.1"); + } + + /** + * Please check the sun-jaxws.xml file to make sure it is correct + * + */ + public static String WSSERVLET_11_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_11_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_15_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET15.diag.check.1"); + } + + /** + * Normal Web service undeployment. Undeployment complete. + * + */ + public static String WSSERVLET_15_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_15_DIAG_CHECK_1()); } public static Localizable localizableMESSAGE_TOO_LONG(Object arg0) { - return messageFactory.getMessage("message.too.long", arg0); + return MESSAGE_FACTORY.getMessage("message.too.long", arg0); } /** @@ -526,1151 +224,11 @@ public final class WsservletMessages { * */ public static String MESSAGE_TOO_LONG(Object arg0) { - return localizer.localize(localizableMESSAGE_TOO_LONG(arg0)); - } - - public static Localizable localizableLISTENER_INFO_INITIALIZE() { - return messageFactory.getMessage("listener.info.initialize"); - } - - /** - * WSSERVLET12: JAX-WS context listener initializing - * - */ - public static String LISTENER_INFO_INITIALIZE() { - return localizer.localize(localizableLISTENER_INFO_INITIALIZE()); - } - - public static Localizable localizableSERVLET_HTML_NO_INFO_AVAILABLE() { - return messageFactory.getMessage("servlet.html.noInfoAvailable"); - } - - /** - *

    No JAX-WS context information available.

    - * - */ - public static String SERVLET_HTML_NO_INFO_AVAILABLE() { - return localizer.localize(localizableSERVLET_HTML_NO_INFO_AVAILABLE()); - } - - public static Localizable localizableSERVLET_HTML_INFORMATION_TABLE(Object arg0, Object arg1) { - return messageFactory.getMessage("servlet.html.information.table", arg0, arg1); - } - - /** - *
    Address:{0}
    WSDL:{0}?wsdl
    Implementation class:{1}
    - * - */ - public static String SERVLET_HTML_INFORMATION_TABLE(Object arg0, Object arg1) { - return localizer.localize(localizableSERVLET_HTML_INFORMATION_TABLE(arg0, arg1)); - } - - public static Localizable localizableSERVLET_TRACE_WRITING_FAULT_RESPONSE() { - return messageFactory.getMessage("servlet.trace.writingFaultResponse"); - } - - /** - * WSSERVLET24: writing fault response - * - */ - public static String SERVLET_TRACE_WRITING_FAULT_RESPONSE() { - return localizer.localize(localizableSERVLET_TRACE_WRITING_FAULT_RESPONSE()); - } - - public static Localizable localizableSERVLET_ERROR_NO_IMPLEMENTOR_FOR_ENDPOINT(Object arg0) { - return messageFactory.getMessage("servlet.error.noImplementorForEndpoint", arg0); - } - - /** - * WSSERVLET20: no implementor for endpoint: {0} - * - */ - public static String SERVLET_ERROR_NO_IMPLEMENTOR_FOR_ENDPOINT(Object arg0) { - return localizer.localize(localizableSERVLET_ERROR_NO_IMPLEMENTOR_FOR_ENDPOINT(arg0)); - } - - public static Localizable localizableWSSERVLET_13_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET13.diag.cause.1"); - } - - /** - * Context listener shutdown - * - */ - public static String WSSERVLET_13_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_13_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_50_DIAG_CAUSE_3() { - return messageFactory.getMessage("WSSERVLET50.diag.cause.3"); - } - - /** - * There may some Application Server initialization problems - * - */ - public static String WSSERVLET_50_DIAG_CAUSE_3() { - return localizer.localize(localizableWSSERVLET_50_DIAG_CAUSE_3()); - } - - public static Localizable localizableWSSERVLET_32_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET32.diag.check.1"); - } - - /** - * Normal Operation. - * - */ - public static String WSSERVLET_32_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_32_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_50_DIAG_CAUSE_2() { - return messageFactory.getMessage("WSSERVLET50.diag.cause.2"); - } - - /** - * Application server deployment descriptors may be incorrect - * - */ - public static String WSSERVLET_50_DIAG_CAUSE_2() { - return localizer.localize(localizableWSSERVLET_50_DIAG_CAUSE_2()); - } - - public static Localizable localizableWSSERVLET_50_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET50.diag.cause.1"); - } - - /** - * WS runtime sun-jaxws.xml or web.xml may be incorrect - * - */ - public static String WSSERVLET_50_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_50_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_25_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET25.diag.check.1"); - } - - /** - * Tracing message, normal response. - * - */ - public static String WSSERVLET_25_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_25_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_43_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET43.diag.cause.1"); - } - - /** - * Instantiation of the web service failed. - * - */ - public static String WSSERVLET_43_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_43_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_27_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET27.diag.cause.1"); - } - - /** - * Implicit URLS are not supported in this release - * - */ - public static String WSSERVLET_27_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_27_DIAG_CAUSE_1()); - } - - public static Localizable localizableERROR_SERVLET_CAUGHT_THROWABLE_IN_INIT(Object arg0) { - return messageFactory.getMessage("error.servlet.caughtThrowableInInit", arg0); - } - - /** - * WSSERVLET50: caught throwable during servlet initialization: {0} - * - */ - public static String ERROR_SERVLET_CAUGHT_THROWABLE_IN_INIT(Object arg0) { - return localizer.localize(localizableERROR_SERVLET_CAUGHT_THROWABLE_IN_INIT(arg0)); - } - - public static Localizable localizableSERVLET_HTML_ENDPOINT_TABLE(Object arg0, Object arg1) { - return messageFactory.getMessage("servlet.html.endpoint.table", arg0, arg1); - } - - /** - *
    Service Name:{0}
    Port Name:{1}
    - * - */ - public static String SERVLET_HTML_ENDPOINT_TABLE(Object arg0, Object arg1) { - return localizer.localize(localizableSERVLET_HTML_ENDPOINT_TABLE(arg0, arg1)); - } - - public static Localizable localizableERROR_SERVLET_CAUGHT_THROWABLE_WHILE_RECOVERING(Object arg0) { - return messageFactory.getMessage("error.servlet.caughtThrowableWhileRecovering", arg0); - } - - /** - * WSSERVLET51: caught throwable while recovering from a previous exception: {0} - * - */ - public static String ERROR_SERVLET_CAUGHT_THROWABLE_WHILE_RECOVERING(Object arg0) { - return localizer.localize(localizableERROR_SERVLET_CAUGHT_THROWABLE_WHILE_RECOVERING(arg0)); - } - - public static Localizable localizableNO_SUNJAXWS_XML(Object arg0) { - return messageFactory.getMessage("no.sunjaxws.xml", arg0); - } - - /** - * Runtime descriptor "{0}" is missing - * - */ - public static String NO_SUNJAXWS_XML(Object arg0) { - return localizer.localize(localizableNO_SUNJAXWS_XML(arg0)); - } - - public static Localizable localizableSERVLET_HTML_TITLE_2() { - return messageFactory.getMessage("servlet.html.title2"); - } - - /** - *

    Web Services

    - * - */ - public static String SERVLET_HTML_TITLE_2() { - return localizer.localize(localizableSERVLET_HTML_TITLE_2()); - } - - public static Localizable localizableLISTENER_INFO_DESTROY() { - return messageFactory.getMessage("listener.info.destroy"); - } - - /** - * WSSERVLET13: JAX-WS context listener destroyed - * - */ - public static String LISTENER_INFO_DESTROY() { - return localizer.localize(localizableLISTENER_INFO_DESTROY()); - } - - public static Localizable localizableEXCEPTION_TEMPLATE_CREATION_FAILED() { - return messageFactory.getMessage("exception.templateCreationFailed"); - } - - /** - * WSSERVLET35: failed to create a template object - * - */ - public static String EXCEPTION_TEMPLATE_CREATION_FAILED() { - return localizer.localize(localizableEXCEPTION_TEMPLATE_CREATION_FAILED()); - } - - public static Localizable localizableWSSERVLET_20_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET20.diag.cause.1"); - } - - /** - * Implementation for this service can not be found - * - */ - public static String WSSERVLET_20_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_20_DIAG_CAUSE_1()); - } - - public static Localizable localizableTRACE_SERVLET_WRITING_FAULT_RESPONSE() { - return messageFactory.getMessage("trace.servlet.writingFaultResponse"); - } - - /** - * WSSERVLET61: writing fault response - * - */ - public static String TRACE_SERVLET_WRITING_FAULT_RESPONSE() { - return localizer.localize(localizableTRACE_SERVLET_WRITING_FAULT_RESPONSE()); - } - - public static Localizable localizableWSSERVLET_23_DIAG_CHECK_2() { - return messageFactory.getMessage("WSSERVLET23.diag.check.2"); - } - - /** - * The request may be malformed and be accepted by the service, yet did not generate a response - * - */ - public static String WSSERVLET_23_DIAG_CHECK_2() { - return localizer.localize(localizableWSSERVLET_23_DIAG_CHECK_2()); - } - - public static Localizable localizableWSSERVLET_23_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET23.diag.check.1"); - } - - /** - * If a response was expected, check that a request message was actually sent - * - */ - public static String WSSERVLET_23_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_23_DIAG_CHECK_1()); - } - - public static Localizable localizableSERVLET_WARNING_MISSING_CONTEXT_INFORMATION() { - return messageFactory.getMessage("servlet.warning.missingContextInformation"); - } - - /** - * WSSERVLET16: missing context information - * - */ - public static String SERVLET_WARNING_MISSING_CONTEXT_INFORMATION() { - return localizer.localize(localizableSERVLET_WARNING_MISSING_CONTEXT_INFORMATION()); - } - - public static Localizable localizableWSSERVLET_16_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET16.diag.check.1"); - } - - /** - * Unjar the service war file; check to see that the jaxrpc-ri-runtime.xml file is present - * - */ - public static String WSSERVLET_16_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_16_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_34_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET34.diag.cause.1"); - } - - /** - * The location patching on the wsdl failed when attempting to transform. - * - */ - public static String WSSERVLET_34_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_34_DIAG_CAUSE_1()); - } - - public static Localizable localizableHTML_NON_ROOT_PAGE_TITLE() { - return messageFactory.getMessage("html.nonRootPage.title"); - } - - /** - * Web Service - * - */ - public static String HTML_NON_ROOT_PAGE_TITLE() { - return localizer.localize(localizableHTML_NON_ROOT_PAGE_TITLE()); - } - - public static Localizable localizableSERVLET_HTML_COLUMN_HEADER_INFORMATION() { - return messageFactory.getMessage("servlet.html.columnHeader.information"); - } - - /** - * Information - * - */ - public static String SERVLET_HTML_COLUMN_HEADER_INFORMATION() { - return localizer.localize(localizableSERVLET_HTML_COLUMN_HEADER_INFORMATION()); - } - - public static Localizable localizableWSSERVLET_18_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET18.diag.cause.1"); - } - - /** - * Message sent by client is empty - * - */ - public static String WSSERVLET_18_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_18_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_64_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET64.diag.cause.1"); - } - - /** - * Web service requests must be a content type text/xml: WSI BP 1.0 - * - */ - public static String WSSERVLET_64_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_64_DIAG_CAUSE_1()); - } - - public static Localizable localizableINFO_SERVLET_INITIALIZING() { - return messageFactory.getMessage("info.servlet.initializing"); - } - - /** - * WSSERVLET56: JAX-WS servlet: init - * - */ - public static String INFO_SERVLET_INITIALIZING() { - return localizer.localize(localizableINFO_SERVLET_INITIALIZING()); - } - - public static Localizable localizableSERVLET_INFO_EMPTY_REQUEST_MESSAGE() { - return messageFactory.getMessage("servlet.info.emptyRequestMessage"); - } - - /** - * WSSERVLET18: got empty request message - * - */ - public static String SERVLET_INFO_EMPTY_REQUEST_MESSAGE() { - return localizer.localize(localizableSERVLET_INFO_EMPTY_REQUEST_MESSAGE()); - } - - public static Localizable localizableSERVLET_ERROR_NO_ENDPOINT_SPECIFIED() { - return messageFactory.getMessage("servlet.error.noEndpointSpecified"); - } - - /** - * WSSERVLET22: no endpoint specified - * - */ - public static String SERVLET_ERROR_NO_ENDPOINT_SPECIFIED() { - return localizer.localize(localizableSERVLET_ERROR_NO_ENDPOINT_SPECIFIED()); - } - - public static Localizable localizableWSSERVLET_11_DIAG_CAUSE_2() { - return messageFactory.getMessage("WSSERVLET11.diag.cause.2"); - } - - /** - * The sun-jaxws.xml runtime deployment descriptor may be missing - * - */ - public static String WSSERVLET_11_DIAG_CAUSE_2() { - return localizer.localize(localizableWSSERVLET_11_DIAG_CAUSE_2()); - } - - public static Localizable localizableWSSERVLET_30_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET30.diag.check.1"); - } - - /** - * This could be due to a number of causes. Check the server log file for exceptions. - * - */ - public static String WSSERVLET_30_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_30_DIAG_CHECK_1()); - } - - public static Localizable localizableEXCEPTION_CANNOT_CREATE_TRANSFORMER() { - return messageFactory.getMessage("exception.cannotCreateTransformer"); - } - - /** - * WSSERVLET33: cannot create transformer - * - */ - public static String EXCEPTION_CANNOT_CREATE_TRANSFORMER() { - return localizer.localize(localizableEXCEPTION_CANNOT_CREATE_TRANSFORMER()); - } - - public static Localizable localizableSERVLET_FAULTSTRING_INVALID_SOAP_ACTION() { - return messageFactory.getMessage("servlet.faultstring.invalidSOAPAction"); - } - - /** - * WSSERVLET65: Invalid Header SOAPAction required - * - */ - public static String SERVLET_FAULTSTRING_INVALID_SOAP_ACTION() { - return localizer.localize(localizableSERVLET_FAULTSTRING_INVALID_SOAP_ACTION()); - } - - public static Localizable localizableWSSERVLET_14_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET14.diag.check.1"); - } - - /** - * Normal Web Service deployment. Deployment of service complete. - * - */ - public static String WSSERVLET_14_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_14_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_32_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET32.diag.cause.1"); - } - - /** - * WSDL being generated - * - */ - public static String WSSERVLET_32_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_32_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_25_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET25.diag.cause.1"); - } - - /** - * SOAPMessage response is being returned to client - * - */ - public static String WSSERVLET_25_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_25_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_44_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET44.diag.check.1"); - } - - /** - * Check the exception for more details. Make sure all the configuration files are correct. - * - */ - public static String WSSERVLET_44_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_44_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_28_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET28.diag.check.1"); - } - - /** - * Set target endpoint with stub.setTargetEndpoint() property. - * - */ - public static String WSSERVLET_28_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_28_DIAG_CHECK_1()); - } - - public static Localizable localizableSERVLET_INFO_INITIALIZE() { - return messageFactory.getMessage("servlet.info.initialize"); - } - - /** - * WSSERVLET14: JAX-WS servlet initializing - * - */ - public static String SERVLET_INFO_INITIALIZE() { - return localizer.localize(localizableSERVLET_INFO_INITIALIZE()); - } - - public static Localizable localizableERROR_SERVLET_INIT_CONFIG_FILE_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("error.servlet.init.config.fileNotFound", arg0); - } - - /** - * WSSERVLET48: config file: "{0}" not found - * - */ - public static String ERROR_SERVLET_INIT_CONFIG_FILE_NOT_FOUND(Object arg0) { - return localizer.localize(localizableERROR_SERVLET_INIT_CONFIG_FILE_NOT_FOUND(arg0)); - } - - public static Localizable localizableHTML_WSDL_PAGE_TITLE() { - return messageFactory.getMessage("html.wsdlPage.title"); - } - - /** - * Web Service - * - */ - public static String HTML_WSDL_PAGE_TITLE() { - return localizer.localize(localizableHTML_WSDL_PAGE_TITLE()); - } - - public static Localizable localizableSERVLET_HTML_COLUMN_HEADER_PORT_NAME() { - return messageFactory.getMessage("servlet.html.columnHeader.portName"); - } - - /** - * Endpoint - * - */ - public static String SERVLET_HTML_COLUMN_HEADER_PORT_NAME() { - return localizer.localize(localizableSERVLET_HTML_COLUMN_HEADER_PORT_NAME()); - } - - public static Localizable localizableHTML_ROOT_PAGE_BODY_2_B() { - return messageFactory.getMessage("html.rootPage.body2b"); - } - - /** - *

    - * - */ - public static String HTML_ROOT_PAGE_BODY_2_B() { - return localizer.localize(localizableHTML_ROOT_PAGE_BODY_2_B()); - } - - public static Localizable localizableHTML_ROOT_PAGE_BODY_2_A() { - return messageFactory.getMessage("html.rootPage.body2a"); - } - - /** - *

    It supports the following ports: - * - */ - public static String HTML_ROOT_PAGE_BODY_2_A() { - return localizer.localize(localizableHTML_ROOT_PAGE_BODY_2_A()); - } - - public static Localizable localizableWSSERVLET_21_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET21.diag.check.1"); - } - - /** - * Normal web service invocation. - * - */ - public static String WSSERVLET_21_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_21_DIAG_CHECK_1()); - } - - public static Localizable localizableERROR_SERVLET_NO_PORT_SPECIFIED() { - return messageFactory.getMessage("error.servlet.noPortSpecified"); - } - - /** - * WSSERVLET53: no port specified in HTTP POST request URL - * - */ - public static String ERROR_SERVLET_NO_PORT_SPECIFIED() { - return localizer.localize(localizableERROR_SERVLET_NO_PORT_SPECIFIED()); - } - - public static Localizable localizableINFO_SERVLET_GOT_EMPTY_REQUEST_MESSAGE() { - return messageFactory.getMessage("info.servlet.gotEmptyRequestMessage"); - } - - /** - * WSSERVLET55: got empty request message - * - */ - public static String INFO_SERVLET_GOT_EMPTY_REQUEST_MESSAGE() { - return localizer.localize(localizableINFO_SERVLET_GOT_EMPTY_REQUEST_MESSAGE()); - } - - public static Localizable localizableWSSERVLET_51_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET51.diag.check.1"); - } - - /** - * Check the server.xml log file for exception information - * - */ - public static String WSSERVLET_51_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_51_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_23_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET23.diag.cause.1"); - } - - /** - * The request generated no response from the service - * - */ - public static String WSSERVLET_23_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_23_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_16_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET16.diag.cause.1"); - } - - /** - * The jaxrpc-ri.xml file may be missing from the war file - * - */ - public static String WSSERVLET_16_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_16_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_35_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET35.diag.check.1"); - } - - /** - * An exception was thrown during creation of the template. View exception and stacktrace for more details. - * - */ - public static String WSSERVLET_35_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_35_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_65_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET65.diag.check.1"); - } - - /** - * Add SOAPAction and appropriate value - * - */ - public static String WSSERVLET_65_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_65_DIAG_CHECK_1()); - } - - public static Localizable localizableTRACE_SERVLET_HANDING_REQUEST_OVER_TO_IMPLEMENTOR(Object arg0) { - return messageFactory.getMessage("trace.servlet.handingRequestOverToImplementor", arg0); - } - - /** - * WSSERVLET59: handing request over to implementor: {0} - * - */ - public static String TRACE_SERVLET_HANDING_REQUEST_OVER_TO_IMPLEMENTOR(Object arg0) { - return localizer.localize(localizableTRACE_SERVLET_HANDING_REQUEST_OVER_TO_IMPLEMENTOR(arg0)); - } - - public static Localizable localizableWSSERVLET_19_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET19.diag.check.1"); - } - - /** - * Informational message only. Normal operation. - * - */ - public static String WSSERVLET_19_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_19_DIAG_CHECK_1()); - } - - public static Localizable localizablePUBLISHER_INFO_GENERATING_WSDL(Object arg0) { - return messageFactory.getMessage("publisher.info.generatingWSDL", arg0); - } - - /** - * WSSERVLET32: generating WSDL for endpoint: {0} - * - */ - public static String PUBLISHER_INFO_GENERATING_WSDL(Object arg0) { - return localizer.localize(localizablePUBLISHER_INFO_GENERATING_WSDL(arg0)); - } - - public static Localizable localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_URL_PATTERN(Object arg0) { - return messageFactory.getMessage("servlet.warning.duplicateEndpointUrlPattern", arg0); - } - - /** - * WSSERVLET26: duplicate URL pattern in endpoint: {0} - * - */ - public static String SERVLET_WARNING_DUPLICATE_ENDPOINT_URL_PATTERN(Object arg0) { - return localizer.localize(localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_URL_PATTERN(arg0)); - } - - public static Localizable localizableWSSERVLET_49_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET49.diag.check.1"); - } - - /** - * Check the server.xml log file for exception information - * - */ - public static String WSSERVLET_49_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_49_DIAG_CHECK_1()); - } - - public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_CANNOT_READ_CONFIGURATION() { - return messageFactory.getMessage("error.implementorRegistry.cannotReadConfiguration"); - } - - /** - * WSSERVLET39: cannot read configuration - * - */ - public static String ERROR_IMPLEMENTOR_REGISTRY_CANNOT_READ_CONFIGURATION() { - return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_CANNOT_READ_CONFIGURATION()); - } - - public static Localizable localizableTRACE_SERVLET_GOT_RESPONSE_FROM_IMPLEMENTOR(Object arg0) { - return messageFactory.getMessage("trace.servlet.gotResponseFromImplementor", arg0); - } - - /** - * WSSERVLET60: got response from implementor: {0} - * - */ - public static String TRACE_SERVLET_GOT_RESPONSE_FROM_IMPLEMENTOR(Object arg0) { - return localizer.localize(localizableTRACE_SERVLET_GOT_RESPONSE_FROM_IMPLEMENTOR(arg0)); - } - - public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_INCOMPLETE_INFORMATION() { - return messageFactory.getMessage("error.implementorRegistry.incompleteInformation"); - } - - /** - * WSSERVLET41: configuration information is incomplete - * - */ - public static String ERROR_IMPLEMENTOR_REGISTRY_INCOMPLETE_INFORMATION() { - return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_INCOMPLETE_INFORMATION()); - } - - public static Localizable localizableWSSERVLET_12_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET12.diag.check.1"); - } - - /** - * Normal web service startup - * - */ - public static String WSSERVLET_12_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_12_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_30_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET30.diag.cause.1"); - } - - /** - * There was a server error processing the request - * - */ - public static String WSSERVLET_30_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_30_DIAG_CAUSE_1()); - } - - public static Localizable localizableHTML_WSDL_PAGE_NO_WSDL() { - return messageFactory.getMessage("html.wsdlPage.noWsdl"); - } - - /** - *

    No WSDL document available for publishing.

    Please check your deployment information.

    - * - */ - public static String HTML_WSDL_PAGE_NO_WSDL() { - return localizer.localize(localizableHTML_WSDL_PAGE_NO_WSDL()); - } - - public static Localizable localizableWSSERVLET_14_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET14.diag.cause.1"); - } - - /** - * Web Services servlet starting up. - * - */ - public static String WSSERVLET_14_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_14_DIAG_CAUSE_1()); - } - - public static Localizable localizableINFO_SERVLET_DESTROYING() { - return messageFactory.getMessage("info.servlet.destroying"); - } - - /** - * WSSERVLET57: JAX-WS servlet: destroy - * - */ - public static String INFO_SERVLET_DESTROYING() { - return localizer.localize(localizableINFO_SERVLET_DESTROYING()); - } - - public static Localizable localizableERROR_SERVLET_NO_RESPONSE_WAS_PRODUCED() { - return messageFactory.getMessage("error.servlet.noResponseWasProduced"); - } - - /** - * WSSERVLET54: no response was produced (internal error) - * - */ - public static String ERROR_SERVLET_NO_RESPONSE_WAS_PRODUCED() { - return localizer.localize(localizableERROR_SERVLET_NO_RESPONSE_WAS_PRODUCED()); - } - - public static Localizable localizableWSSERVLET_26_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET26.diag.check.1"); - } - - /** - * This may cause a problem, please remove duplicate endpoints - * - */ - public static String WSSERVLET_26_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_26_DIAG_CHECK_1()); - } - - public static Localizable localizableSERVLET_HTML_TITLE() { - return messageFactory.getMessage("servlet.html.title"); - } - - /** - * Web Services - * - */ - public static String SERVLET_HTML_TITLE() { - return localizer.localize(localizableSERVLET_HTML_TITLE()); - } - - public static Localizable localizableWSSERVLET_44_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET44.diag.cause.1"); - } - - /** - * The web service was instantiated, however, it could not be initialized - * - */ - public static String WSSERVLET_44_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_44_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_63_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET63.diag.check.1"); - } - - /** - * Make sure that your HTTP client is using POST requests, not GET requests - * - */ - public static String WSSERVLET_63_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_63_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_28_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET28.diag.cause.1"); - } - - /** - * Target endpoint is null - * - */ - public static String WSSERVLET_28_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_28_DIAG_CAUSE_1()); - } - - public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_NO_CONFIGURATION() { - return messageFactory.getMessage("error.implementorFactory.noConfiguration"); - } - - /** - * WSSERVLET36: no configuration specified - * - */ - public static String ERROR_IMPLEMENTOR_FACTORY_NO_CONFIGURATION() { - return localizer.localize(localizableERROR_IMPLEMENTOR_FACTORY_NO_CONFIGURATION()); - } - - public static Localizable localizableHTML_ROOT_PAGE_BODY_4() { - return messageFactory.getMessage("html.rootPage.body4"); - } - - /** - *

    This endpoint is incorrectly configured. Please check the location and contents of the configuration file.

    - * - */ - public static String HTML_ROOT_PAGE_BODY_4() { - return localizer.localize(localizableHTML_ROOT_PAGE_BODY_4()); - } - - public static Localizable localizableHTML_ROOT_PAGE_BODY_1() { - return messageFactory.getMessage("html.rootPage.body1"); - } - - /** - *

    A Web Service is installed at this URL.

    - * - */ - public static String HTML_ROOT_PAGE_BODY_1() { - return localizer.localize(localizableHTML_ROOT_PAGE_BODY_1()); - } - - public static Localizable localizableEXCEPTION_TRANSFORMATION_FAILED(Object arg0) { - return messageFactory.getMessage("exception.transformationFailed", arg0); - } - - /** - * WSSERVLET34: transformation failed : {0} - * - */ - public static String EXCEPTION_TRANSFORMATION_FAILED(Object arg0) { - return localizer.localize(localizableEXCEPTION_TRANSFORMATION_FAILED(arg0)); - } - - public static Localizable localizableSERVLET_HTML_METHOD() { - return messageFactory.getMessage("servlet.html.method"); - } - - /** - * WSSERVLET63: must use Post for this type of request - * - */ - public static String SERVLET_HTML_METHOD() { - return localizer.localize(localizableSERVLET_HTML_METHOD()); - } - - public static Localizable localizableSERVLET_FAULTSTRING_MISSING_PORT() { - return messageFactory.getMessage("servlet.faultstring.missingPort"); - } - - /** - * WSSERVLET28: Missing port information - * - */ - public static String SERVLET_FAULTSTRING_MISSING_PORT() { - return localizer.localize(localizableSERVLET_FAULTSTRING_MISSING_PORT()); - } - - public static Localizable localizableWSSERVLET_21_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET21.diag.cause.1"); - } - - /** - * The Web service is being invoked - * - */ - public static String WSSERVLET_21_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_21_DIAG_CAUSE_1()); - } - - public static Localizable localizableSERVLET_TRACE_WRITING_SUCCESS_RESPONSE() { - return messageFactory.getMessage("servlet.trace.writingSuccessResponse"); - } - - /** - * WSSERVLET25: writing success response - * - */ - public static String SERVLET_TRACE_WRITING_SUCCESS_RESPONSE() { - return localizer.localize(localizableSERVLET_TRACE_WRITING_SUCCESS_RESPONSE()); - } - - public static Localizable localizableWSSERVLET_33_DIAG_CHECK_2() { - return messageFactory.getMessage("WSSERVLET33.diag.check.2"); - } - - /** - * There maybe a transformation engine may not be supported or compatible. Check the server.xml file for exceptions. - * - */ - public static String WSSERVLET_33_DIAG_CHECK_2() { - return localizer.localize(localizableWSSERVLET_33_DIAG_CHECK_2()); - } - - public static Localizable localizableWSSERVLET_33_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET33.diag.check.1"); - } - - /** - * There maybe a transformation engine being used that is not compatible. Make sure you are using the correct transformer and version. - * - */ - public static String WSSERVLET_33_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_33_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_51_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET51.diag.cause.1"); - } - - /** - * Service processing of the request generated an exception; while attempting to return a SOAPPFaultMessage a throwable was again generated - * - */ - public static String WSSERVLET_51_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_51_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_24_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET24.diag.check.1"); - } - - /** - * Tracing message fault recorded. - * - */ - public static String WSSERVLET_24_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_24_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_17_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET17.diag.check.1"); - } - - /** - * Note that this may cause problems with service deployment - * - */ - public static String WSSERVLET_17_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_17_DIAG_CHECK_1()); - } - - public static Localizable localizableWSSERVLET_35_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET35.diag.cause.1"); - } - - /** - * A XSLT stylesheet template is create for the wsdl location patching using transformation. Template create failed. - * - */ - public static String WSSERVLET_35_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_35_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_19_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET19.diag.cause.1"); - } - - /** - * Client request for this endpoint arrived - * - */ - public static String WSSERVLET_19_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_19_DIAG_CAUSE_1()); - } - - public static Localizable localizableWSSERVLET_65_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET65.diag.cause.1"); - } - - /** - * SOAP Action is required - * - */ - public static String WSSERVLET_65_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_65_DIAG_CAUSE_1()); - } - - public static Localizable localizableLISTENER_PARSING_FAILED(Object arg0) { - return messageFactory.getMessage("listener.parsingFailed", arg0); - } - - /** - * WSSERVLET11: failed to parse runtime descriptor: {0} - * - */ - public static String LISTENER_PARSING_FAILED(Object arg0) { - return localizer.localize(localizableLISTENER_PARSING_FAILED(arg0)); - } - - public static Localizable localizableSERVLET_WARNING_IGNORING_IMPLICIT_URL_PATTERN(Object arg0) { - return messageFactory.getMessage("servlet.warning.ignoringImplicitUrlPattern", arg0); - } - - /** - * WSSERVLET27: unsupported implicit URL pattern in endpoint: {0} - * - */ - public static String SERVLET_WARNING_IGNORING_IMPLICIT_URL_PATTERN(Object arg0) { - return localizer.localize(localizableSERVLET_WARNING_IGNORING_IMPLICIT_URL_PATTERN(arg0)); - } - - public static Localizable localizableWSSERVLET_49_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET49.diag.cause.1"); - } - - /** - * Service processing of the request generated an exception; while attempting to return a SOAPFaultMessage a throwable was again generated - * - */ - public static String WSSERVLET_49_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_49_DIAG_CAUSE_1()); + return LOCALIZER.localize(localizableMESSAGE_TOO_LONG(arg0)); } public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_NEW_INSTANCE_FAILED(Object arg0) { - return messageFactory.getMessage("error.implementorFactory.newInstanceFailed", arg0); + return MESSAGE_FACTORY.getMessage("error.implementorFactory.newInstanceFailed", arg0); } /** @@ -1678,191 +236,83 @@ public final class WsservletMessages { * */ public static String ERROR_IMPLEMENTOR_FACTORY_NEW_INSTANCE_FAILED(Object arg0) { - return localizer.localize(localizableERROR_IMPLEMENTOR_FACTORY_NEW_INSTANCE_FAILED(arg0)); + return LOCALIZER.localize(localizableERROR_IMPLEMENTOR_FACTORY_NEW_INSTANCE_FAILED(arg0)); } - public static Localizable localizableWSSERVLET_12_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET12.diag.cause.1"); + public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_CANNOT_READ_CONFIGURATION() { + return MESSAGE_FACTORY.getMessage("error.implementorRegistry.cannotReadConfiguration"); } /** - * Context listener starting + * WSSERVLET39: cannot read configuration * */ - public static String WSSERVLET_12_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_12_DIAG_CAUSE_1()); + public static String ERROR_IMPLEMENTOR_REGISTRY_CANNOT_READ_CONFIGURATION() { + return LOCALIZER.localize(localizableERROR_IMPLEMENTOR_REGISTRY_CANNOT_READ_CONFIGURATION()); } - public static Localizable localizableWSSERVLET_31_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET31.diag.check.1"); + public static Localizable localizableWSSERVLET_35_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET35.diag.cause.1"); } /** - * Normal operation + * A XSLT stylesheet template is create for the wsdl location patching using transformation. Template create failed. * */ - public static String WSSERVLET_31_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_31_DIAG_CHECK_1()); + public static String WSSERVLET_35_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_35_DIAG_CAUSE_1()); } - public static Localizable localizableSERVLET_FAULTSTRING_INVALID_CONTENT_TYPE() { - return messageFactory.getMessage("servlet.faultstring.invalidContentType"); + public static Localizable localizableERROR_SERVLET_INIT_CONFIG_FILE_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.servlet.init.config.fileNotFound", arg0); } /** - * WSSERVLET64: Invalid Content-Type, text/xml required + * WSSERVLET48: config file: "{0}" not found * */ - public static String SERVLET_FAULTSTRING_INVALID_CONTENT_TYPE() { - return localizer.localize(localizableSERVLET_FAULTSTRING_INVALID_CONTENT_TYPE()); + public static String ERROR_SERVLET_INIT_CONFIG_FILE_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableERROR_SERVLET_INIT_CONFIG_FILE_NOT_FOUND(arg0)); } - public static Localizable localizableERROR_SERVLET_CAUGHT_THROWABLE(Object arg0) { - return messageFactory.getMessage("error.servlet.caughtThrowable", arg0); + public static Localizable localizableWSSERVLET_34_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET34.diag.cause.1"); } /** - * WSSERVLET49: caught throwable: {0} + * The location patching on the wsdl failed when attempting to transform. * */ - public static String ERROR_SERVLET_CAUGHT_THROWABLE(Object arg0) { - return localizer.localize(localizableERROR_SERVLET_CAUGHT_THROWABLE(arg0)); + public static String WSSERVLET_34_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_34_DIAG_CAUSE_1()); } - public static Localizable localizableTRACE_SERVLET_WRITING_SUCCESS_RESPONSE() { - return messageFactory.getMessage("trace.servlet.writingSuccessResponse"); + public static Localizable localizableERROR_SERVLET_CAUGHT_THROWABLE_IN_INIT(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.servlet.caughtThrowableInInit", arg0); } /** - * WSSERVLET62: writing success response + * WSSERVLET50: caught throwable during servlet initialization: {0} * */ - public static String TRACE_SERVLET_WRITING_SUCCESS_RESPONSE() { - return localizer.localize(localizableTRACE_SERVLET_WRITING_SUCCESS_RESPONSE()); + public static String ERROR_SERVLET_CAUGHT_THROWABLE_IN_INIT(Object arg0) { + return LOCALIZER.localize(localizableERROR_SERVLET_CAUGHT_THROWABLE_IN_INIT(arg0)); } - public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_CLASS_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("error.implementorRegistry.classNotFound", arg0); + public static Localizable localizableSERVLET_ERROR_NO_RESPONSE_MESSAGE() { + return MESSAGE_FACTORY.getMessage("servlet.error.noResponseMessage"); } /** - * WSSERVLET40: class not found: {0} + * WSSERVLET23: no response message * */ - public static String ERROR_IMPLEMENTOR_REGISTRY_CLASS_NOT_FOUND(Object arg0) { - return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_CLASS_NOT_FOUND(arg0)); - } - - public static Localizable localizableWSSERVLET_15_DIAG_CHECK_1() { - return messageFactory.getMessage("WSSERVLET15.diag.check.1"); - } - - /** - * Normal Web service undeployment. Undeployment complete. - * - */ - public static String WSSERVLET_15_DIAG_CHECK_1() { - return localizer.localize(localizableWSSERVLET_15_DIAG_CHECK_1()); - } - - public static Localizable localizableSERVLET_FAULTSTRING_PORT_NOT_FOUND(Object arg0) { - return messageFactory.getMessage("servlet.faultstring.portNotFound", arg0); - } - - /** - * WSSERVLET29: Port not found ({0}) - * - */ - public static String SERVLET_FAULTSTRING_PORT_NOT_FOUND(Object arg0) { - return localizer.localize(localizableSERVLET_FAULTSTRING_PORT_NOT_FOUND(arg0)); - } - - public static Localizable localizableSERVLET_INFO_DESTROY() { - return messageFactory.getMessage("servlet.info.destroy"); - } - - /** - * WSSERVLET15: JAX-WS servlet destroyed - * - */ - public static String SERVLET_INFO_DESTROY() { - return localizer.localize(localizableSERVLET_INFO_DESTROY()); - } - - public static Localizable localizableSERVLET_FAULTSTRING_INTERNAL_SERVER_ERROR(Object arg0) { - return messageFactory.getMessage("servlet.faultstring.internalServerError", arg0); - } - - /** - * WSSERVLET30: Internal server error ({0}) - * - */ - public static String SERVLET_FAULTSTRING_INTERNAL_SERVER_ERROR(Object arg0) { - return localizer.localize(localizableSERVLET_FAULTSTRING_INTERNAL_SERVER_ERROR(arg0)); - } - - public static Localizable localizableWSSERVLET_26_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET26.diag.cause.1"); - } - - /** - * The endpoint URL is a duplicate - * - */ - public static String WSSERVLET_26_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_26_DIAG_CAUSE_1()); - } - - public static Localizable localizableSERVLET_HTML_COLUMN_HEADER_STATUS() { - return messageFactory.getMessage("servlet.html.columnHeader.status"); - } - - /** - * Status - * - */ - public static String SERVLET_HTML_COLUMN_HEADER_STATUS() { - return localizer.localize(localizableSERVLET_HTML_COLUMN_HEADER_STATUS()); - } - - public static Localizable localizableWSSERVLET_63_DIAG_CAUSE_1() { - return messageFactory.getMessage("WSSERVLET63.diag.cause.1"); - } - - /** - * Web service requests must use HTTP POST method: WSI BP 1.0 - * - */ - public static String WSSERVLET_63_DIAG_CAUSE_1() { - return localizer.localize(localizableWSSERVLET_63_DIAG_CAUSE_1()); - } - - public static Localizable localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_NAME() { - return messageFactory.getMessage("servlet.warning.duplicateEndpointName"); - } - - /** - * WSSERVLET17: duplicate endpoint name - * - */ - public static String SERVLET_WARNING_DUPLICATE_ENDPOINT_NAME() { - return localizer.localize(localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_NAME()); - } - - public static Localizable localizableTRACE_SERVLET_REQUEST_FOR_PORT_NAMED(Object arg0) { - return messageFactory.getMessage("trace.servlet.requestForPortNamed", arg0); - } - - /** - * WSSERVLET58: got request for port: {0} - * - */ - public static String TRACE_SERVLET_REQUEST_FOR_PORT_NAMED(Object arg0) { - return localizer.localize(localizableTRACE_SERVLET_REQUEST_FOR_PORT_NAMED(arg0)); + public static String SERVLET_ERROR_NO_RESPONSE_MESSAGE() { + return LOCALIZER.localize(localizableSERVLET_ERROR_NO_RESPONSE_MESSAGE()); } public static Localizable localizableSERVLET_NO_ADDRESS_AVAILABLE(Object arg0) { - return messageFactory.getMessage("servlet.no.address.available", arg0); + return MESSAGE_FACTORY.getMessage("servlet.no.address.available", arg0); } /** @@ -1870,7 +320,1566 @@ public final class WsservletMessages { * */ public static String SERVLET_NO_ADDRESS_AVAILABLE(Object arg0) { - return localizer.localize(localizableSERVLET_NO_ADDRESS_AVAILABLE(arg0)); + return LOCALIZER.localize(localizableSERVLET_NO_ADDRESS_AVAILABLE(arg0)); + } + + public static Localizable localizableWSSERVLET_31_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET31.diag.cause.1"); + } + + /** + * Transformation being applied + * + */ + public static String WSSERVLET_31_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_31_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_30_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET30.diag.cause.1"); + } + + /** + * There was a server error processing the request + * + */ + public static String WSSERVLET_30_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_30_DIAG_CAUSE_1()); + } + + public static Localizable localizableINFO_SERVLET_DESTROYING() { + return MESSAGE_FACTORY.getMessage("info.servlet.destroying"); + } + + /** + * WSSERVLET57: JAX-WS servlet: destroy + * + */ + public static String INFO_SERVLET_DESTROYING() { + return LOCALIZER.localize(localizableINFO_SERVLET_DESTROYING()); + } + + public static Localizable localizableWSSERVLET_22_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET22.diag.cause.1"); + } + + /** + * A request was invoked with no endpoint + * + */ + public static String WSSERVLET_22_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_22_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_26_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET26.diag.cause.1"); + } + + /** + * The endpoint URL is a duplicate + * + */ + public static String WSSERVLET_26_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_26_DIAG_CAUSE_1()); + } + + public static Localizable localizableSERVLET_HTML_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("servlet.html.notFound", arg0); + } + + /** + *

    404 Not Found: {0}

    + * + */ + public static String SERVLET_HTML_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableSERVLET_HTML_NOT_FOUND(arg0)); + } + + public static Localizable localizableNO_SUNJAXWS_XML(Object arg0) { + return MESSAGE_FACTORY.getMessage("no.sunjaxws.xml", arg0); + } + + /** + * Runtime descriptor "{0}" is missing + * + */ + public static String NO_SUNJAXWS_XML(Object arg0) { + return LOCALIZER.localize(localizableNO_SUNJAXWS_XML(arg0)); + } + + public static Localizable localizableWSSERVLET_18_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET18.diag.check.1"); + } + + /** + * This may or may not be intentional. If not examine client program for errors. + * + */ + public static String WSSERVLET_18_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_18_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_24_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET24.diag.cause.1"); + } + + /** + * SOAPFault message is being returned to the client. + * + */ + public static String WSSERVLET_24_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_24_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_51_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET51.diag.cause.1"); + } + + /** + * Service processing of the request generated an exception; while attempting to return a SOAPPFaultMessage a throwable was again generated + * + */ + public static String WSSERVLET_51_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_51_DIAG_CAUSE_1()); + } + + public static Localizable localizableERROR_SERVLET_NO_PORT_SPECIFIED() { + return MESSAGE_FACTORY.getMessage("error.servlet.noPortSpecified"); + } + + /** + * WSSERVLET53: no port specified in HTTP POST request URL + * + */ + public static String ERROR_SERVLET_NO_PORT_SPECIFIED() { + return LOCALIZER.localize(localizableERROR_SERVLET_NO_PORT_SPECIFIED()); + } + + public static Localizable localizableWSSERVLET_43_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET43.diag.cause.1"); + } + + /** + * Instantiation of the web service failed. + * + */ + public static String WSSERVLET_43_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_43_DIAG_CAUSE_1()); + } + + public static Localizable localizableTRACE_SERVLET_WRITING_SUCCESS_RESPONSE() { + return MESSAGE_FACTORY.getMessage("trace.servlet.writingSuccessResponse"); + } + + /** + * WSSERVLET62: writing success response + * + */ + public static String TRACE_SERVLET_WRITING_SUCCESS_RESPONSE() { + return LOCALIZER.localize(localizableTRACE_SERVLET_WRITING_SUCCESS_RESPONSE()); + } + + public static Localizable localizableINFO_SERVLET_GOT_EMPTY_REQUEST_MESSAGE() { + return MESSAGE_FACTORY.getMessage("info.servlet.gotEmptyRequestMessage"); + } + + /** + * WSSERVLET55: got empty request message + * + */ + public static String INFO_SERVLET_GOT_EMPTY_REQUEST_MESSAGE() { + return LOCALIZER.localize(localizableINFO_SERVLET_GOT_EMPTY_REQUEST_MESSAGE()); + } + + public static Localizable localizableERROR_SERVLET_CAUGHT_THROWABLE_WHILE_RECOVERING(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.servlet.caughtThrowableWhileRecovering", arg0); + } + + /** + * WSSERVLET51: caught throwable while recovering from a previous exception: {0} + * + */ + public static String ERROR_SERVLET_CAUGHT_THROWABLE_WHILE_RECOVERING(Object arg0) { + return LOCALIZER.localize(localizableERROR_SERVLET_CAUGHT_THROWABLE_WHILE_RECOVERING(arg0)); + } + + public static Localizable localizableWSSERVLET_12_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET12.diag.check.1"); + } + + /** + * Normal web service startup + * + */ + public static String WSSERVLET_12_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_12_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_16_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET16.diag.check.1"); + } + + /** + * Unjar the service war file; check to see that the jaxrpc-ri-runtime.xml file is present + * + */ + public static String WSSERVLET_16_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_16_DIAG_CHECK_1()); + } + + public static Localizable localizableSERVLET_INFO_EMPTY_REQUEST_MESSAGE() { + return MESSAGE_FACTORY.getMessage("servlet.info.emptyRequestMessage"); + } + + /** + * WSSERVLET18: got empty request message + * + */ + public static String SERVLET_INFO_EMPTY_REQUEST_MESSAGE() { + return LOCALIZER.localize(localizableSERVLET_INFO_EMPTY_REQUEST_MESSAGE()); + } + + public static Localizable localizableSERVLET_WARNING_IGNORING_IMPLICIT_URL_PATTERN(Object arg0) { + return MESSAGE_FACTORY.getMessage("servlet.warning.ignoringImplicitUrlPattern", arg0); + } + + /** + * WSSERVLET27: unsupported implicit URL pattern in endpoint: {0} + * + */ + public static String SERVLET_WARNING_IGNORING_IMPLICIT_URL_PATTERN(Object arg0) { + return LOCALIZER.localize(localizableSERVLET_WARNING_IGNORING_IMPLICIT_URL_PATTERN(arg0)); + } + + public static Localizable localizableWSSERVLET_14_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET14.diag.check.1"); + } + + /** + * Normal Web Service deployment. Deployment of service complete. + * + */ + public static String WSSERVLET_14_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_14_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_20_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET20.diag.cause.1"); + } + + /** + * Implementation for this service can not be found + * + */ + public static String WSSERVLET_20_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_20_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_14_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET14.diag.cause.1"); + } + + /** + * Web Services servlet starting up. + * + */ + public static String WSSERVLET_14_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_14_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_28_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET28.diag.check.1"); + } + + /** + * Set target endpoint with stub.setTargetEndpoint() property. + * + */ + public static String WSSERVLET_28_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_28_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_26_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET26.diag.check.1"); + } + + /** + * This may cause a problem, please remove duplicate endpoints + * + */ + public static String WSSERVLET_26_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_26_DIAG_CHECK_1()); + } + + public static Localizable localizableHTML_ROOT_PAGE_TITLE() { + return MESSAGE_FACTORY.getMessage("html.rootPage.title"); + } + + /** + * Web Service + * + */ + public static String HTML_ROOT_PAGE_TITLE() { + return LOCALIZER.localize(localizableHTML_ROOT_PAGE_TITLE()); + } + + public static Localizable localizableWSSERVLET_18_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET18.diag.cause.1"); + } + + /** + * Message sent by client is empty + * + */ + public static String WSSERVLET_18_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_18_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_63_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET63.diag.cause.1"); + } + + /** + * Web service requests must use HTTP POST method: WSI BP 1.0 + * + */ + public static String WSSERVLET_63_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_63_DIAG_CAUSE_1()); + } + + public static Localizable localizableHTML_NON_ROOT_PAGE_TITLE() { + return MESSAGE_FACTORY.getMessage("html.nonRootPage.title"); + } + + /** + * Web Service + * + */ + public static String HTML_NON_ROOT_PAGE_TITLE() { + return LOCALIZER.localize(localizableHTML_NON_ROOT_PAGE_TITLE()); + } + + public static Localizable localizableSERVLET_INFO_DESTROY() { + return MESSAGE_FACTORY.getMessage("servlet.info.destroy"); + } + + /** + * WSSERVLET15: JAX-WS servlet destroyed + * + */ + public static String SERVLET_INFO_DESTROY() { + return LOCALIZER.localize(localizableSERVLET_INFO_DESTROY()); + } + + public static Localizable localizableSERVLET_FAULTSTRING_INVALID_SOAP_ACTION() { + return MESSAGE_FACTORY.getMessage("servlet.faultstring.invalidSOAPAction"); + } + + /** + * WSSERVLET65: Invalid Header SOAPAction required + * + */ + public static String SERVLET_FAULTSTRING_INVALID_SOAP_ACTION() { + return LOCALIZER.localize(localizableSERVLET_FAULTSTRING_INVALID_SOAP_ACTION()); + } + + public static Localizable localizableWSSERVLET_16_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET16.diag.cause.1"); + } + + /** + * The jaxrpc-ri.xml file may be missing from the war file + * + */ + public static String WSSERVLET_16_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_16_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_63_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET63.diag.check.1"); + } + + /** + * Make sure that your HTTP client is using POST requests, not GET requests + * + */ + public static String WSSERVLET_63_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_63_DIAG_CHECK_1()); + } + + public static Localizable localizableEXCEPTION_TRANSFORMATION_FAILED(Object arg0) { + return MESSAGE_FACTORY.getMessage("exception.transformationFailed", arg0); + } + + /** + * WSSERVLET34: transformation failed : {0} + * + */ + public static String EXCEPTION_TRANSFORMATION_FAILED(Object arg0) { + return LOCALIZER.localize(localizableEXCEPTION_TRANSFORMATION_FAILED(arg0)); + } + + public static Localizable localizableWSSERVLET_28_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET28.diag.cause.1"); + } + + /** + * Target endpoint is null + * + */ + public static String WSSERVLET_28_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_28_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_20_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET20.diag.check.1"); + } + + /** + * Unzip the war, are the tie and serializer classes found? + * + */ + public static String WSSERVLET_20_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_20_DIAG_CHECK_1()); + } + + public static Localizable localizableERROR_SERVLET_NO_IMPLEMENTOR_FOR_PORT(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.servlet.noImplementorForPort", arg0); + } + + /** + * WSSERVLET52: no implementor registered for port: {0} + * + */ + public static String ERROR_SERVLET_NO_IMPLEMENTOR_FOR_PORT(Object arg0) { + return LOCALIZER.localize(localizableERROR_SERVLET_NO_IMPLEMENTOR_FOR_PORT(arg0)); + } + + public static Localizable localizablePUBLISHER_INFO_GENERATING_WSDL(Object arg0) { + return MESSAGE_FACTORY.getMessage("publisher.info.generatingWSDL", arg0); + } + + /** + * WSSERVLET32: generating WSDL for endpoint: {0} + * + */ + public static String PUBLISHER_INFO_GENERATING_WSDL(Object arg0) { + return LOCALIZER.localize(localizablePUBLISHER_INFO_GENERATING_WSDL(arg0)); + } + + public static Localizable localizableWSSERVLET_22_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET22.diag.check.1"); + } + + /** + * Set endpoint with stub.setTargetEndpoint property + * + */ + public static String WSSERVLET_22_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_22_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_24_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET24.diag.check.1"); + } + + /** + * Tracing message fault recorded. + * + */ + public static String WSSERVLET_24_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_24_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_12_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET12.diag.cause.1"); + } + + /** + * Context listener starting + * + */ + public static String WSSERVLET_12_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_12_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_65_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET65.diag.cause.1"); + } + + /** + * SOAP Action is required + * + */ + public static String WSSERVLET_65_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_65_DIAG_CAUSE_1()); + } + + public static Localizable localizableSERVLET_TRACE_INVOKING_IMPLEMENTOR(Object arg0) { + return MESSAGE_FACTORY.getMessage("servlet.trace.invokingImplementor", arg0); + } + + /** + * WSSERVLET21: invoking implementor: {0} + * + */ + public static String SERVLET_TRACE_INVOKING_IMPLEMENTOR(Object arg0) { + return LOCALIZER.localize(localizableSERVLET_TRACE_INVOKING_IMPLEMENTOR(arg0)); + } + + public static Localizable localizableWSSERVLET_21_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET21.diag.cause.1"); + } + + /** + * The Web service is being invoked + * + */ + public static String WSSERVLET_21_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_21_DIAG_CAUSE_1()); + } + + public static Localizable localizableTRACE_SERVLET_REQUEST_FOR_PORT_NAMED(Object arg0) { + return MESSAGE_FACTORY.getMessage("trace.servlet.requestForPortNamed", arg0); + } + + /** + * WSSERVLET58: got request for port: {0} + * + */ + public static String TRACE_SERVLET_REQUEST_FOR_PORT_NAMED(Object arg0) { + return LOCALIZER.localize(localizableTRACE_SERVLET_REQUEST_FOR_PORT_NAMED(arg0)); + } + + public static Localizable localizablePUBLISHER_INFO_APPLYING_TRANSFORMATION(Object arg0) { + return MESSAGE_FACTORY.getMessage("publisher.info.applyingTransformation", arg0); + } + + /** + * WSSERVLET31: applying transformation with actual address: {0} + * + */ + public static String PUBLISHER_INFO_APPLYING_TRANSFORMATION(Object arg0) { + return LOCALIZER.localize(localizablePUBLISHER_INFO_APPLYING_TRANSFORMATION(arg0)); + } + + public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_SERVANT_INIT_FAILED(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.implementorFactory.servantInitFailed", arg0); + } + + /** + * WSSERVLET44: failed to initialize the service implementor for port "{0}" + * + */ + public static String ERROR_IMPLEMENTOR_FACTORY_SERVANT_INIT_FAILED(Object arg0) { + return LOCALIZER.localize(localizableERROR_IMPLEMENTOR_FACTORY_SERVANT_INIT_FAILED(arg0)); + } + + public static Localizable localizableWSSERVLET_17_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET17.diag.check.1"); + } + + /** + * Note that this may cause problems with service deployment + * + */ + public static String WSSERVLET_17_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_17_DIAG_CHECK_1()); + } + + public static Localizable localizableERROR_SERVLET_CAUGHT_THROWABLE(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.servlet.caughtThrowable", arg0); + } + + /** + * WSSERVLET49: caught throwable: {0} + * + */ + public static String ERROR_SERVLET_CAUGHT_THROWABLE(Object arg0) { + return LOCALIZER.localize(localizableERROR_SERVLET_CAUGHT_THROWABLE(arg0)); + } + + public static Localizable localizableWSSERVLET_25_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET25.diag.cause.1"); + } + + /** + * SOAPMessage response is being returned to client + * + */ + public static String WSSERVLET_25_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_25_DIAG_CAUSE_1()); + } + + public static Localizable localizableSERVLET_HTML_METHOD() { + return MESSAGE_FACTORY.getMessage("servlet.html.method"); + } + + /** + * WSSERVLET63: must use Post for this type of request + * + */ + public static String SERVLET_HTML_METHOD() { + return LOCALIZER.localize(localizableSERVLET_HTML_METHOD()); + } + + public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_NO_INPUT_STREAM() { + return MESSAGE_FACTORY.getMessage("error.implementorFactory.noInputStream"); + } + + /** + * WSSERVLET37: no configuration specified + * + */ + public static String ERROR_IMPLEMENTOR_FACTORY_NO_INPUT_STREAM() { + return LOCALIZER.localize(localizableERROR_IMPLEMENTOR_FACTORY_NO_INPUT_STREAM()); + } + + public static Localizable localizableWSSERVLET_51_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET51.diag.check.1"); + } + + /** + * Check the server.xml log file for exception information + * + */ + public static String WSSERVLET_51_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_51_DIAG_CHECK_1()); + } + + public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_UNKNOWN_NAME(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.implementorRegistry.unknownName", arg0); + } + + /** + * WSSERVLET38: unknown port name: {0} + * + */ + public static String ERROR_IMPLEMENTOR_REGISTRY_UNKNOWN_NAME(Object arg0) { + return LOCALIZER.localize(localizableERROR_IMPLEMENTOR_REGISTRY_UNKNOWN_NAME(arg0)); + } + + public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_INCOMPLETE_INFORMATION() { + return MESSAGE_FACTORY.getMessage("error.implementorRegistry.incompleteInformation"); + } + + /** + * WSSERVLET41: configuration information is incomplete + * + */ + public static String ERROR_IMPLEMENTOR_REGISTRY_INCOMPLETE_INFORMATION() { + return LOCALIZER.localize(localizableERROR_IMPLEMENTOR_REGISTRY_INCOMPLETE_INFORMATION()); + } + + public static Localizable localizableWSSERVLET_13_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET13.diag.check.1"); + } + + /** + * Normal web service shutdown + * + */ + public static String WSSERVLET_13_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_13_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_32_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET32.diag.check.1"); + } + + /** + * Normal Operation. + * + */ + public static String WSSERVLET_32_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_32_DIAG_CHECK_1()); + } + + public static Localizable localizableSERVLET_HTML_TITLE_2() { + return MESSAGE_FACTORY.getMessage("servlet.html.title2"); + } + + /** + *

    Web Services

    + * + */ + public static String SERVLET_HTML_TITLE_2() { + return LOCALIZER.localize(localizableSERVLET_HTML_TITLE_2()); + } + + public static Localizable localizableSERVLET_HTML_COLUMN_HEADER_PORT_NAME() { + return MESSAGE_FACTORY.getMessage("servlet.html.columnHeader.portName"); + } + + /** + * Endpoint + * + */ + public static String SERVLET_HTML_COLUMN_HEADER_PORT_NAME() { + return LOCALIZER.localize(localizableSERVLET_HTML_COLUMN_HEADER_PORT_NAME()); + } + + public static Localizable localizableSERVLET_HTML_COLUMN_HEADER_STATUS() { + return MESSAGE_FACTORY.getMessage("servlet.html.columnHeader.status"); + } + + /** + * Status + * + */ + public static String SERVLET_HTML_COLUMN_HEADER_STATUS() { + return LOCALIZER.localize(localizableSERVLET_HTML_COLUMN_HEADER_STATUS()); + } + + public static Localizable localizableWSSERVLET_43_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET43.diag.check.1"); + } + + /** + * Make sure web service is available and public. Examine exception for more details + * + */ + public static String WSSERVLET_43_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_43_DIAG_CHECK_1()); + } + + public static Localizable localizableINFO_SERVLET_INITIALIZING() { + return MESSAGE_FACTORY.getMessage("info.servlet.initializing"); + } + + /** + * WSSERVLET56: JAX-WS servlet: init + * + */ + public static String INFO_SERVLET_INITIALIZING() { + return LOCALIZER.localize(localizableINFO_SERVLET_INITIALIZING()); + } + + public static Localizable localizableWSSERVLET_32_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET32.diag.cause.1"); + } + + /** + * WSDL being generated + * + */ + public static String WSSERVLET_32_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_32_DIAG_CAUSE_1()); + } + + public static Localizable localizableJAXRPCSERVLET_11_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("JAXRPCSERVLET11.diag.cause.1"); + } + + /** + * WSRuntimeInfoParser could not parse sun-jaxws.xml runtime descriptor + * + */ + public static String JAXRPCSERVLET_11_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableJAXRPCSERVLET_11_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_33_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET33.diag.cause.1"); + } + + /** + * When publishing the service wsdl, the http location is patched with the deployed location/endpoint using XSLT transformation. The transformer could not be created to do the transformation. + * + */ + public static String WSSERVLET_33_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_33_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_44_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET44.diag.check.1"); + } + + /** + * Check the exception for more details. Make sure all the configuration files are correct. + * + */ + public static String WSSERVLET_44_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_44_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_33_DIAG_CAUSE_2() { + return MESSAGE_FACTORY.getMessage("WSSERVLET33.diag.cause.2"); + } + + /** + * When publishing the service wsdl, the http location is patched with the deployed location/endpoint using XSLT transformation. The transformer could not be created to do the transformation. + * + */ + public static String WSSERVLET_33_DIAG_CAUSE_2() { + return LOCALIZER.localize(localizableWSSERVLET_33_DIAG_CAUSE_2()); + } + + public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_NO_CONFIGURATION() { + return MESSAGE_FACTORY.getMessage("error.implementorFactory.noConfiguration"); + } + + /** + * WSSERVLET36: no configuration specified + * + */ + public static String ERROR_IMPLEMENTOR_FACTORY_NO_CONFIGURATION() { + return LOCALIZER.localize(localizableERROR_IMPLEMENTOR_FACTORY_NO_CONFIGURATION()); + } + + public static Localizable localizableWSSERVLET_44_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET44.diag.cause.1"); + } + + /** + * The web service was instantiated, however, it could not be initialized + * + */ + public static String WSSERVLET_44_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_44_DIAG_CAUSE_1()); + } + + public static Localizable localizableHTML_WSDL_PAGE_TITLE() { + return MESSAGE_FACTORY.getMessage("html.wsdlPage.title"); + } + + /** + * Web Service + * + */ + public static String HTML_WSDL_PAGE_TITLE() { + return LOCALIZER.localize(localizableHTML_WSDL_PAGE_TITLE()); + } + + public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_DUPLICATE_NAME(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.implementorRegistry.duplicateName", arg0); + } + + /** + * WSSERVLET42: duplicate port name: {0} + * + */ + public static String ERROR_IMPLEMENTOR_REGISTRY_DUPLICATE_NAME(Object arg0) { + return LOCALIZER.localize(localizableERROR_IMPLEMENTOR_REGISTRY_DUPLICATE_NAME(arg0)); + } + + public static Localizable localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_URL_PATTERN(Object arg0) { + return MESSAGE_FACTORY.getMessage("servlet.warning.duplicateEndpointUrlPattern", arg0); + } + + /** + * WSSERVLET26: duplicate URL pattern in endpoint: {0} + * + */ + public static String SERVLET_WARNING_DUPLICATE_ENDPOINT_URL_PATTERN(Object arg0) { + return LOCALIZER.localize(localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_URL_PATTERN(arg0)); + } + + public static Localizable localizableSERVLET_HTML_NO_INFO_AVAILABLE() { + return MESSAGE_FACTORY.getMessage("servlet.html.noInfoAvailable"); + } + + /** + *

    No JAX-WS context information available.

    + * + */ + public static String SERVLET_HTML_NO_INFO_AVAILABLE() { + return LOCALIZER.localize(localizableSERVLET_HTML_NO_INFO_AVAILABLE()); + } + + public static Localizable localizableWSSERVLET_49_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET49.diag.cause.1"); + } + + /** + * Service processing of the request generated an exception; while attempting to return a SOAPFaultMessage a throwable was again generated + * + */ + public static String WSSERVLET_49_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_49_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_33_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET33.diag.check.1"); + } + + /** + * There maybe a transformation engine being used that is not compatible. Make sure you are using the correct transformer and version. + * + */ + public static String WSSERVLET_33_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_33_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_35_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET35.diag.check.1"); + } + + /** + * An exception was thrown during creation of the template. View exception and stacktrace for more details. + * + */ + public static String WSSERVLET_35_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_35_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_33_DIAG_CHECK_2() { + return MESSAGE_FACTORY.getMessage("WSSERVLET33.diag.check.2"); + } + + /** + * There maybe a transformation engine may not be supported or compatible. Check the server.xml file for exceptions. + * + */ + public static String WSSERVLET_33_DIAG_CHECK_2() { + return LOCALIZER.localize(localizableWSSERVLET_33_DIAG_CHECK_2()); + } + + public static Localizable localizableSERVLET_HTML_INFORMATION_TABLE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("servlet.html.information.table", arg0, arg1); + } + + /** + *
    Address:{0}
    WSDL:{0}?wsdl
    Implementation class:{1}
    + * + */ + public static String SERVLET_HTML_INFORMATION_TABLE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableSERVLET_HTML_INFORMATION_TABLE(arg0, arg1)); + } + + public static Localizable localizableERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION() { + return MESSAGE_FACTORY.getMessage("error.wsdlPublisher.cannotReadConfiguration"); + } + + /** + * WSSERVLET46: cannot read configuration + * + */ + public static String ERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION() { + return LOCALIZER.localize(localizableERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION()); + } + + public static Localizable localizableEXCEPTION_CANNOT_CREATE_TRANSFORMER() { + return MESSAGE_FACTORY.getMessage("exception.cannotCreateTransformer"); + } + + /** + * WSSERVLET33: cannot create transformer + * + */ + public static String EXCEPTION_CANNOT_CREATE_TRANSFORMER() { + return LOCALIZER.localize(localizableEXCEPTION_CANNOT_CREATE_TRANSFORMER()); + } + + public static Localizable localizableHTML_NON_ROOT_PAGE_BODY_2() { + return MESSAGE_FACTORY.getMessage("html.nonRootPage.body2"); + } + + /** + *

    Invalid request URI.

    Please check your deployment information.

    + * + */ + public static String HTML_NON_ROOT_PAGE_BODY_2() { + return LOCALIZER.localize(localizableHTML_NON_ROOT_PAGE_BODY_2()); + } + + public static Localizable localizableLISTENER_PARSING_FAILED(Object arg0) { + return MESSAGE_FACTORY.getMessage("listener.parsingFailed", arg0); + } + + /** + * WSSERVLET11: failed to parse runtime descriptor: {0} + * + */ + public static String LISTENER_PARSING_FAILED(Object arg0) { + return LOCALIZER.localize(localizableLISTENER_PARSING_FAILED(arg0)); + } + + public static Localizable localizableLISTENER_INFO_DESTROY() { + return MESSAGE_FACTORY.getMessage("listener.info.destroy"); + } + + /** + * WSSERVLET13: JAX-WS context listener destroyed + * + */ + public static String LISTENER_INFO_DESTROY() { + return LOCALIZER.localize(localizableLISTENER_INFO_DESTROY()); + } + + public static Localizable localizableHTML_NON_ROOT_PAGE_BODY_1() { + return MESSAGE_FACTORY.getMessage("html.nonRootPage.body1"); + } + + /** + *

    A Web Service is installed at this URL.

    + * + */ + public static String HTML_NON_ROOT_PAGE_BODY_1() { + return LOCALIZER.localize(localizableHTML_NON_ROOT_PAGE_BODY_1()); + } + + public static Localizable localizableSERVLET_INFO_INITIALIZE() { + return MESSAGE_FACTORY.getMessage("servlet.info.initialize"); + } + + /** + * WSSERVLET14: JAX-WS servlet initializing + * + */ + public static String SERVLET_INFO_INITIALIZE() { + return LOCALIZER.localize(localizableSERVLET_INFO_INITIALIZE()); + } + + public static Localizable localizableSERVLET_WARNING_MISSING_CONTEXT_INFORMATION() { + return MESSAGE_FACTORY.getMessage("servlet.warning.missingContextInformation"); + } + + /** + * WSSERVLET16: missing context information + * + */ + public static String SERVLET_WARNING_MISSING_CONTEXT_INFORMATION() { + return LOCALIZER.localize(localizableSERVLET_WARNING_MISSING_CONTEXT_INFORMATION()); + } + + public static Localizable localizableWSSERVLET_64_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET64.diag.check.1"); + } + + /** + * Make sure the client request is using text/xml + * + */ + public static String WSSERVLET_64_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_64_DIAG_CHECK_1()); + } + + public static Localizable localizableSERVLET_FAULTSTRING_PORT_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("servlet.faultstring.portNotFound", arg0); + } + + /** + * WSSERVLET29: Port not found ({0}) + * + */ + public static String SERVLET_FAULTSTRING_PORT_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableSERVLET_FAULTSTRING_PORT_NOT_FOUND(arg0)); + } + + public static Localizable localizableWSSERVLET_49_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET49.diag.check.1"); + } + + /** + * Check the server.xml log file for exception information + * + */ + public static String WSSERVLET_49_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_49_DIAG_CHECK_1()); + } + + public static Localizable localizableSERVLET_TRACE_WRITING_SUCCESS_RESPONSE() { + return MESSAGE_FACTORY.getMessage("servlet.trace.writingSuccessResponse"); + } + + /** + * WSSERVLET25: writing success response + * + */ + public static String SERVLET_TRACE_WRITING_SUCCESS_RESPONSE() { + return LOCALIZER.localize(localizableSERVLET_TRACE_WRITING_SUCCESS_RESPONSE()); + } + + public static Localizable localizableWSSERVLET_50_DIAG_CHECK_2() { + return MESSAGE_FACTORY.getMessage("WSSERVLET50.diag.check.2"); + } + + /** + * Verify that Application server deployment descriptors are correct in the service war file + * + */ + public static String WSSERVLET_50_DIAG_CHECK_2() { + return LOCALIZER.localize(localizableWSSERVLET_50_DIAG_CHECK_2()); + } + + public static Localizable localizableSERVLET_FAULTSTRING_INTERNAL_SERVER_ERROR(Object arg0) { + return MESSAGE_FACTORY.getMessage("servlet.faultstring.internalServerError", arg0); + } + + /** + * WSSERVLET30: Internal server error ({0}) + * + */ + public static String SERVLET_FAULTSTRING_INTERNAL_SERVER_ERROR(Object arg0) { + return LOCALIZER.localize(localizableSERVLET_FAULTSTRING_INTERNAL_SERVER_ERROR(arg0)); + } + + public static Localizable localizableWSSERVLET_50_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET50.diag.check.1"); + } + + /** + * Verify that sun-jaxws.xml and web.xml are correct in the service war file + * + */ + public static String WSSERVLET_50_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_50_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_31_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET31.diag.check.1"); + } + + /** + * Normal operation + * + */ + public static String WSSERVLET_31_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_31_DIAG_CHECK_1()); + } + + public static Localizable localizableEXCEPTION_TEMPLATE_CREATION_FAILED() { + return MESSAGE_FACTORY.getMessage("exception.templateCreationFailed"); + } + + /** + * WSSERVLET35: failed to create a template object + * + */ + public static String EXCEPTION_TEMPLATE_CREATION_FAILED() { + return LOCALIZER.localize(localizableEXCEPTION_TEMPLATE_CREATION_FAILED()); + } + + public static Localizable localizableSERVLET_ERROR_NO_IMPLEMENTOR_FOR_ENDPOINT(Object arg0) { + return MESSAGE_FACTORY.getMessage("servlet.error.noImplementorForEndpoint", arg0); + } + + /** + * WSSERVLET20: no implementor for endpoint: {0} + * + */ + public static String SERVLET_ERROR_NO_IMPLEMENTOR_FOR_ENDPOINT(Object arg0) { + return LOCALIZER.localize(localizableSERVLET_ERROR_NO_IMPLEMENTOR_FOR_ENDPOINT(arg0)); + } + + public static Localizable localizableWSSERVLET_50_DIAG_CHECK_3() { + return MESSAGE_FACTORY.getMessage("WSSERVLET50.diag.check.3"); + } + + /** + * Check the server.xml file in the domain directory for failures + * + */ + public static String WSSERVLET_50_DIAG_CHECK_3() { + return LOCALIZER.localize(localizableWSSERVLET_50_DIAG_CHECK_3()); + } + + public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_FILE_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.implementorRegistry.fileNotFound", arg0); + } + + /** + * WSSERVLET45: file not found: {0} + * + */ + public static String ERROR_IMPLEMENTOR_REGISTRY_FILE_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableERROR_IMPLEMENTOR_REGISTRY_FILE_NOT_FOUND(arg0)); + } + + public static Localizable localizableWSSERVLET_13_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET13.diag.cause.1"); + } + + /** + * Context listener shutdown + * + */ + public static String WSSERVLET_13_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_13_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_27_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET27.diag.check.1"); + } + + /** + * Remove the implicit URL + * + */ + public static String WSSERVLET_27_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_27_DIAG_CHECK_1()); + } + + public static Localizable localizableHTML_ROOT_PAGE_BODY_2_B() { + return MESSAGE_FACTORY.getMessage("html.rootPage.body2b"); + } + + /** + *

    + * + */ + public static String HTML_ROOT_PAGE_BODY_2_B() { + return LOCALIZER.localize(localizableHTML_ROOT_PAGE_BODY_2_B()); + } + + public static Localizable localizableWSSERVLET_15_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET15.diag.cause.1"); + } + + /** + * Web Services servlet shutdown. + * + */ + public static String WSSERVLET_15_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_15_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_29_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET29.diag.check.1"); + } + + /** + * Is the port valid? Unzip the war file and make sure the tie and serializers are present + * + */ + public static String WSSERVLET_29_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_29_DIAG_CHECK_1()); + } + + public static Localizable localizableERROR_SERVLET_INIT_CONFIG_PARAMETER_MISSING(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.servlet.init.config.parameter.missing", arg0); + } + + /** + * WSSERVLET47: cannot find configuration parameter: "{0}" + * + */ + public static String ERROR_SERVLET_INIT_CONFIG_PARAMETER_MISSING(Object arg0) { + return LOCALIZER.localize(localizableERROR_SERVLET_INIT_CONFIG_PARAMETER_MISSING(arg0)); + } + + public static Localizable localizableWSSERVLET_25_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET25.diag.check.1"); + } + + /** + * Tracing message, normal response. + * + */ + public static String WSSERVLET_25_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_25_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_64_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET64.diag.cause.1"); + } + + /** + * Web service requests must be a content type text/xml: WSI BP 1.0 + * + */ + public static String WSSERVLET_64_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_64_DIAG_CAUSE_1()); + } + + public static Localizable localizableHTML_ROOT_PAGE_BODY_2_A() { + return MESSAGE_FACTORY.getMessage("html.rootPage.body2a"); + } + + /** + *

    It supports the following ports: + * + */ + public static String HTML_ROOT_PAGE_BODY_2_A() { + return LOCALIZER.localize(localizableHTML_ROOT_PAGE_BODY_2_A()); + } + + public static Localizable localizableWSSERVLET_19_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET19.diag.cause.1"); + } + + /** + * Client request for this endpoint arrived + * + */ + public static String WSSERVLET_19_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_19_DIAG_CAUSE_1()); + } + + public static Localizable localizableHTML_ROOT_PAGE_BODY_4() { + return MESSAGE_FACTORY.getMessage("html.rootPage.body4"); + } + + /** + *

    This endpoint is incorrectly configured. Please check the location and contents of the configuration file.

    + * + */ + public static String HTML_ROOT_PAGE_BODY_4() { + return LOCALIZER.localize(localizableHTML_ROOT_PAGE_BODY_4()); + } + + public static Localizable localizableSERVLET_FAULTSTRING_MISSING_PORT() { + return MESSAGE_FACTORY.getMessage("servlet.faultstring.missingPort"); + } + + /** + * WSSERVLET28: Missing port information + * + */ + public static String SERVLET_FAULTSTRING_MISSING_PORT() { + return LOCALIZER.localize(localizableSERVLET_FAULTSTRING_MISSING_PORT()); + } + + public static Localizable localizableHTML_ROOT_PAGE_BODY_1() { + return MESSAGE_FACTORY.getMessage("html.rootPage.body1"); + } + + /** + *

    A Web Service is installed at this URL.

    + * + */ + public static String HTML_ROOT_PAGE_BODY_1() { + return LOCALIZER.localize(localizableHTML_ROOT_PAGE_BODY_1()); + } + + public static Localizable localizableTRACE_SERVLET_WRITING_FAULT_RESPONSE() { + return MESSAGE_FACTORY.getMessage("trace.servlet.writingFaultResponse"); + } + + /** + * WSSERVLET61: writing fault response + * + */ + public static String TRACE_SERVLET_WRITING_FAULT_RESPONSE() { + return LOCALIZER.localize(localizableTRACE_SERVLET_WRITING_FAULT_RESPONSE()); + } + + public static Localizable localizableTRACE_SERVLET_GOT_RESPONSE_FROM_IMPLEMENTOR(Object arg0) { + return MESSAGE_FACTORY.getMessage("trace.servlet.gotResponseFromImplementor", arg0); + } + + /** + * WSSERVLET60: got response from implementor: {0} + * + */ + public static String TRACE_SERVLET_GOT_RESPONSE_FROM_IMPLEMENTOR(Object arg0) { + return LOCALIZER.localize(localizableTRACE_SERVLET_GOT_RESPONSE_FROM_IMPLEMENTOR(arg0)); + } + + public static Localizable localizableWSSERVLET_17_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET17.diag.cause.1"); + } + + /** + * Two or more endpoints with the same name where found in the jaxrpc-ri.xml runtime descriptor + * + */ + public static String WSSERVLET_17_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_17_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_50_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET50.diag.cause.1"); + } + + /** + * WS runtime sun-jaxws.xml or web.xml may be incorrect + * + */ + public static String WSSERVLET_50_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_50_DIAG_CAUSE_1()); + } + + public static Localizable localizableSERVLET_HTML_ENDPOINT_TABLE(Object arg0, Object arg1) { + return MESSAGE_FACTORY.getMessage("servlet.html.endpoint.table", arg0, arg1); + } + + /** + *
    Service Name:{0}
    Port Name:{1}
    + * + */ + public static String SERVLET_HTML_ENDPOINT_TABLE(Object arg0, Object arg1) { + return LOCALIZER.localize(localizableSERVLET_HTML_ENDPOINT_TABLE(arg0, arg1)); + } + + public static Localizable localizableSERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(Object arg0) { + return MESSAGE_FACTORY.getMessage("servlet.trace.gotRequestForEndpoint", arg0); + } + + /** + * WSSERVLET19: got request for endpoint: {0} + * + */ + public static String SERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(Object arg0) { + return LOCALIZER.localize(localizableSERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(arg0)); + } + + public static Localizable localizableSERVLET_HTML_COLUMN_HEADER_INFORMATION() { + return MESSAGE_FACTORY.getMessage("servlet.html.columnHeader.information"); + } + + /** + * Information + * + */ + public static String SERVLET_HTML_COLUMN_HEADER_INFORMATION() { + return LOCALIZER.localize(localizableSERVLET_HTML_COLUMN_HEADER_INFORMATION()); + } + + public static Localizable localizableLISTENER_INFO_INITIALIZE() { + return MESSAGE_FACTORY.getMessage("listener.info.initialize"); + } + + /** + * WSSERVLET12: JAX-WS context listener initializing + * + */ + public static String LISTENER_INFO_INITIALIZE() { + return LOCALIZER.localize(localizableLISTENER_INFO_INITIALIZE()); + } + + public static Localizable localizableERROR_SERVLET_NO_RESPONSE_WAS_PRODUCED() { + return MESSAGE_FACTORY.getMessage("error.servlet.noResponseWasProduced"); + } + + /** + * WSSERVLET54: no response was produced (internal error) + * + */ + public static String ERROR_SERVLET_NO_RESPONSE_WAS_PRODUCED() { + return LOCALIZER.localize(localizableERROR_SERVLET_NO_RESPONSE_WAS_PRODUCED()); + } + + public static Localizable localizableSERVLET_ERROR_NO_ENDPOINT_SPECIFIED() { + return MESSAGE_FACTORY.getMessage("servlet.error.noEndpointSpecified"); + } + + /** + * WSSERVLET22: no endpoint specified + * + */ + public static String SERVLET_ERROR_NO_ENDPOINT_SPECIFIED() { + return LOCALIZER.localize(localizableSERVLET_ERROR_NO_ENDPOINT_SPECIFIED()); + } + + public static Localizable localizableSERVLET_HTML_TITLE() { + return MESSAGE_FACTORY.getMessage("servlet.html.title"); + } + + /** + * Web Services + * + */ + public static String SERVLET_HTML_TITLE() { + return LOCALIZER.localize(localizableSERVLET_HTML_TITLE()); + } + + public static Localizable localizableWSSERVLET_50_DIAG_CAUSE_2() { + return MESSAGE_FACTORY.getMessage("WSSERVLET50.diag.cause.2"); + } + + /** + * Application server deployment descriptors may be incorrect + * + */ + public static String WSSERVLET_50_DIAG_CAUSE_2() { + return LOCALIZER.localize(localizableWSSERVLET_50_DIAG_CAUSE_2()); + } + + public static Localizable localizableWSSERVLET_50_DIAG_CAUSE_3() { + return MESSAGE_FACTORY.getMessage("WSSERVLET50.diag.cause.3"); + } + + /** + * There may some Application Server initialization problems + * + */ + public static String WSSERVLET_50_DIAG_CAUSE_3() { + return LOCALIZER.localize(localizableWSSERVLET_50_DIAG_CAUSE_3()); + } + + public static Localizable localizableWSSERVLET_21_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET21.diag.check.1"); + } + + /** + * Normal web service invocation. + * + */ + public static String WSSERVLET_21_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_21_DIAG_CHECK_1()); + } + + public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_CLASS_NOT_FOUND(Object arg0) { + return MESSAGE_FACTORY.getMessage("error.implementorRegistry.classNotFound", arg0); + } + + /** + * WSSERVLET40: class not found: {0} + * + */ + public static String ERROR_IMPLEMENTOR_REGISTRY_CLASS_NOT_FOUND(Object arg0) { + return LOCALIZER.localize(localizableERROR_IMPLEMENTOR_REGISTRY_CLASS_NOT_FOUND(arg0)); + } + + public static Localizable localizableWSSERVLET_29_DIAG_CAUSE_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET29.diag.cause.1"); + } + + /** + * A port is specified, but a corresponding service implementation is not found + * + */ + public static String WSSERVLET_29_DIAG_CAUSE_1() { + return LOCALIZER.localize(localizableWSSERVLET_29_DIAG_CAUSE_1()); + } + + public static Localizable localizableWSSERVLET_11_DIAG_CAUSE_2() { + return MESSAGE_FACTORY.getMessage("WSSERVLET11.diag.cause.2"); + } + + /** + * The sun-jaxws.xml runtime deployment descriptor may be missing + * + */ + public static String WSSERVLET_11_DIAG_CAUSE_2() { + return LOCALIZER.localize(localizableWSSERVLET_11_DIAG_CAUSE_2()); + } + + public static Localizable localizableWSSERVLET_23_DIAG_CHECK_1() { + return MESSAGE_FACTORY.getMessage("WSSERVLET23.diag.check.1"); + } + + /** + * If a response was expected, check that a request message was actually sent + * + */ + public static String WSSERVLET_23_DIAG_CHECK_1() { + return LOCALIZER.localize(localizableWSSERVLET_23_DIAG_CHECK_1()); + } + + public static Localizable localizableWSSERVLET_23_DIAG_CHECK_2() { + return MESSAGE_FACTORY.getMessage("WSSERVLET23.diag.check.2"); + } + + /** + * The request may be malformed and be accepted by the service, yet did not generate a response + * + */ + public static String WSSERVLET_23_DIAG_CHECK_2() { + return LOCALIZER.localize(localizableWSSERVLET_23_DIAG_CHECK_2()); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java index 3680416d951..318387a336b 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,150 +25,28 @@ package com.sun.xml.internal.ws.resources; -import com.sun.istack.internal.localization.Localizable; -import com.sun.istack.internal.localization.LocalizableMessageFactory; -import com.sun.istack.internal.localization.Localizer; - import java.util.Locale; import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; /** * Defines string formatting method for each constant in the resource file * */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") public final class XmlmessageMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.xmlmessage"; - private final static LocalizableMessageFactory messageFactory = - new LocalizableMessageFactory(BUNDLE_NAME, XmlmessageMessages::getResourceBundle); - private final static Localizer localizer = new Localizer(); - - private static ResourceBundle getResourceBundle(Locale locale) { - return ResourceBundle.getBundle(BUNDLE_NAME, locale); - } - - public static Localizable localizableXML_NULL_HEADERS() { - return messageFactory.getMessage("xml.null.headers"); - } - - /** - * Invalid argument. MimeHeaders=null - * - */ - public static String XML_NULL_HEADERS() { - return localizer.localize(localizableXML_NULL_HEADERS()); - } - - public static Localizable localizableXML_SET_PAYLOAD_ERR() { - return messageFactory.getMessage("xml.set.payload.err"); - } - - /** - * Couldn't set Payload in XMLMessage - * - */ - public static String XML_SET_PAYLOAD_ERR() { - return localizer.localize(localizableXML_SET_PAYLOAD_ERR()); - } - - public static Localizable localizableXML_CONTENT_TYPE_MUSTBE_MULTIPART() { - return messageFactory.getMessage("xml.content-type.mustbe.multipart"); - } - - /** - * Content-Type needs to be Multipart/Related and with type=text/xml - * - */ - public static String XML_CONTENT_TYPE_MUSTBE_MULTIPART() { - return localizer.localize(localizableXML_CONTENT_TYPE_MUSTBE_MULTIPART()); - } - - public static Localizable localizableXML_UNKNOWN_CONTENT_TYPE() { - return messageFactory.getMessage("xml.unknown.Content-Type"); - } - - /** - * Unrecognized Content-Type - * - */ - public static String XML_UNKNOWN_CONTENT_TYPE() { - return localizer.localize(localizableXML_UNKNOWN_CONTENT_TYPE()); - } - - public static Localizable localizableXML_GET_DS_ERR() { - return messageFactory.getMessage("xml.get.ds.err"); - } - - /** - * Couldn't get DataSource - * - */ - public static String XML_GET_DS_ERR() { - return localizer.localize(localizableXML_GET_DS_ERR()); - } - - public static Localizable localizableXML_CONTENT_TYPE_PARSE_ERR() { - return messageFactory.getMessage("xml.Content-Type.parse.err"); - } - - /** - * Error while parsing MimeHeaders for Content-Type - * - */ - public static String XML_CONTENT_TYPE_PARSE_ERR() { - return localizer.localize(localizableXML_CONTENT_TYPE_PARSE_ERR()); - } - - public static Localizable localizableXML_GET_SOURCE_ERR() { - return messageFactory.getMessage("xml.get.source.err"); - } - - /** - * Couldn't return Source - * - */ - public static String XML_GET_SOURCE_ERR() { - return localizer.localize(localizableXML_GET_SOURCE_ERR()); - } - - public static Localizable localizableXML_CANNOT_INTERNALIZE_MESSAGE() { - return messageFactory.getMessage("xml.cannot.internalize.message"); - } - - /** - * Cannot create XMLMessage - * - */ - public static String XML_CANNOT_INTERNALIZE_MESSAGE() { - return localizer.localize(localizableXML_CANNOT_INTERNALIZE_MESSAGE()); - } - - public static Localizable localizableXML_NO_CONTENT_TYPE() { - return messageFactory.getMessage("xml.no.Content-Type"); - } - - /** - * MimeHeaders doesn't contain Content-Type header - * - */ - public static String XML_NO_CONTENT_TYPE() { - return localizer.localize(localizableXML_NO_CONTENT_TYPE()); - } - - public static Localizable localizableXML_ROOT_PART_INVALID_CONTENT_TYPE(Object arg0) { - return messageFactory.getMessage("xml.root.part.invalid.Content-Type", arg0); - } - - /** - * Bad Content-Type for Root Part : {0} - * - */ - public static String XML_ROOT_PART_INVALID_CONTENT_TYPE(Object arg0) { - return localizer.localize(localizableXML_ROOT_PART_INVALID_CONTENT_TYPE(arg0)); - } + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new XmlmessageMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); public static Localizable localizableXML_INVALID_CONTENT_TYPE(Object arg0) { - return messageFactory.getMessage("xml.invalid.content-type", arg0); + return MESSAGE_FACTORY.getMessage("xml.invalid.content-type", arg0); } /** @@ -176,7 +54,138 @@ public final class XmlmessageMessages { * */ public static String XML_INVALID_CONTENT_TYPE(Object arg0) { - return localizer.localize(localizableXML_INVALID_CONTENT_TYPE(arg0)); + return LOCALIZER.localize(localizableXML_INVALID_CONTENT_TYPE(arg0)); + } + + public static Localizable localizableXML_GET_SOURCE_ERR() { + return MESSAGE_FACTORY.getMessage("xml.get.source.err"); + } + + /** + * Couldn't return Source + * + */ + public static String XML_GET_SOURCE_ERR() { + return LOCALIZER.localize(localizableXML_GET_SOURCE_ERR()); + } + + public static Localizable localizableXML_UNKNOWN_CONTENT_TYPE() { + return MESSAGE_FACTORY.getMessage("xml.unknown.Content-Type"); + } + + /** + * Unrecognized Content-Type + * + */ + public static String XML_UNKNOWN_CONTENT_TYPE() { + return LOCALIZER.localize(localizableXML_UNKNOWN_CONTENT_TYPE()); + } + + public static Localizable localizableXML_SET_PAYLOAD_ERR() { + return MESSAGE_FACTORY.getMessage("xml.set.payload.err"); + } + + /** + * Couldn't set Payload in XMLMessage + * + */ + public static String XML_SET_PAYLOAD_ERR() { + return LOCALIZER.localize(localizableXML_SET_PAYLOAD_ERR()); + } + + public static Localizable localizableXML_ROOT_PART_INVALID_CONTENT_TYPE(Object arg0) { + return MESSAGE_FACTORY.getMessage("xml.root.part.invalid.Content-Type", arg0); + } + + /** + * Bad Content-Type for Root Part : {0} + * + */ + public static String XML_ROOT_PART_INVALID_CONTENT_TYPE(Object arg0) { + return LOCALIZER.localize(localizableXML_ROOT_PART_INVALID_CONTENT_TYPE(arg0)); + } + + public static Localizable localizableXML_GET_DS_ERR() { + return MESSAGE_FACTORY.getMessage("xml.get.ds.err"); + } + + /** + * Couldn't get DataSource + * + */ + public static String XML_GET_DS_ERR() { + return LOCALIZER.localize(localizableXML_GET_DS_ERR()); + } + + public static Localizable localizableXML_CANNOT_INTERNALIZE_MESSAGE() { + return MESSAGE_FACTORY.getMessage("xml.cannot.internalize.message"); + } + + /** + * Cannot create XMLMessage + * + */ + public static String XML_CANNOT_INTERNALIZE_MESSAGE() { + return LOCALIZER.localize(localizableXML_CANNOT_INTERNALIZE_MESSAGE()); + } + + public static Localizable localizableXML_CONTENT_TYPE_PARSE_ERR() { + return MESSAGE_FACTORY.getMessage("xml.Content-Type.parse.err"); + } + + /** + * Error while parsing MimeHeaders for Content-Type + * + */ + public static String XML_CONTENT_TYPE_PARSE_ERR() { + return LOCALIZER.localize(localizableXML_CONTENT_TYPE_PARSE_ERR()); + } + + public static Localizable localizableXML_NULL_HEADERS() { + return MESSAGE_FACTORY.getMessage("xml.null.headers"); + } + + /** + * Invalid argument. MimeHeaders=null + * + */ + public static String XML_NULL_HEADERS() { + return LOCALIZER.localize(localizableXML_NULL_HEADERS()); + } + + public static Localizable localizableXML_NO_CONTENT_TYPE() { + return MESSAGE_FACTORY.getMessage("xml.no.Content-Type"); + } + + /** + * MimeHeaders doesn't contain Content-Type header + * + */ + public static String XML_NO_CONTENT_TYPE() { + return LOCALIZER.localize(localizableXML_NO_CONTENT_TYPE()); + } + + public static Localizable localizableXML_CONTENT_TYPE_MUSTBE_MULTIPART() { + return MESSAGE_FACTORY.getMessage("xml.content-type.mustbe.multipart"); + } + + /** + * Content-Type needs to be Multipart/Related and with type=text/xml + * + */ + public static String XML_CONTENT_TYPE_MUSTBE_MULTIPART() { + return LOCALIZER.localize(localizableXML_CONTENT_TYPE_MUSTBE_MULTIPART()); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler.properties index 545570e86c2..fff23f10b6a 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -51,8 +51,8 @@ runtime.modeler.mtom.conflict = Error in @BindingType: MTOM Configuration in bi # {0} - feature class name, {1} - feature class name runtime.modeler.feature.conflict= Feature {0} in implementation conflicts with {1} in WSDL configuration # {0} - absolute class location -runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API is loaded from {0}, But JAX-WS runtime requires JAX-WS 2.2 API. \ - Use the endorsed standards override mechanism to load JAX-WS 2.2 API +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API is loaded from {0}, But JAX-WS runtime requires JAX-WS 2.2 or newer API. \ + Use the standard override mechanism to load JAX-WS 2.2 or newer API. runtime.modeler.wsfeature.no.ftrconstructor=Annotation {0} is not recognizable, at least one constructor of {1} should be marked with @FeatureConstructor runtime.modeler.wsfeature.morethanone.ftrconstructor=Annotation {0} is illegal, Only one constructor of {1} can be marked as @FeatureConstructor runtime.modeler.wsfeature.illegal.ftrconstructor=Annotation {0} is illegal, In {1} @FeatureConstructor value doesn't match the constructor parameters diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_de.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_de.properties index 52c9c712b24..c2d5374723c 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_de.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -47,7 +47,7 @@ runtime.modeler.mtom.conflict = Fehler bei @BindingType: MTOM-Konfiguration in B # {0} - feature class name, {1} - feature class name runtime.modeler.feature.conflict= Feature {0} in Implementierung ist nicht mit {1} in WSDL-Konfiguration vereinbar # {0} - absolute class location -runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API wird aus {0} geladen, die JAX-WS-Laufzeitumgebung erfordert jedoch JAX-WS 2.2 API. Verwenden Sie das "Endorsed Standards Override Mechanism"-Verfahren, um JAX-WS 2.2 API zu laden +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1-API wird aus {0} geladen, die JAX-WS-Laufzeit erfordert jedoch JAX-WS 2.2 oder eine neuere API. Verwenden Sie das Standard-Override-Verfahren, um JAX-WS 2.2 oder eine neuere API zu laden. runtime.modeler.wsfeature.no.ftrconstructor=Annotation {0} kann nicht erkannt werden, mindestens ein Konstruktor von {1} muss mit @FeatureConstructor markiert werden runtime.modeler.wsfeature.morethanone.ftrconstructor=Annotation {0} ist unzul\u00E4ssig. Nur ein Konstruktor von {1} kann als @FeatureConstructor markiert werden runtime.modeler.wsfeature.illegal.ftrconstructor=Annotation {0} ist unzul\u00E4ssig. In {1} stimmt der @FeatureConstructor-Wert nicht mit den Konstruktorparametern \u00FCberein diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_es.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_es.properties index 0317823ef75..26ee36aade8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_es.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -47,7 +47,7 @@ runtime.modeler.mtom.conflict = Error en @BindingType: la configuraci\u00F3n de # {0} - feature class name, {1} - feature class name runtime.modeler.feature.conflict= La funci\u00F3n {0} de la implantaci\u00F3n entra en conflicto con {1} en la configuraci\u00F3n de WSDL # {0} - absolute class location -runtime.modeler.addressing.responses.nosuchmethod = La API de JAX-WS 2.1 se ha cargado desde {0}, pero JAX-WS en tiempo de ejecuci\u00F3n necesita la API JAX-WS 2.2. Utilice el mecanismo de sustituci\u00F3n de est\u00E1ndares aprobado para cargar la API JAX-WS 2.2 +runtime.modeler.addressing.responses.nosuchmethod = La API de JAX-WS 2.1 se ha cargado desde {0}, pero JAX-WS en tiempo de ejecuci\u00F3n necesita la API de JAX-WS 2.2 o una versi\u00F3n posterior. Utilice el mecanismo de sustituci\u00F3n de est\u00E1ndares para cargar la API de JAX-WS 2.2 o una versi\u00F3n posterior. runtime.modeler.wsfeature.no.ftrconstructor=La anotaci\u00F3n {0} no es reconocible. Al menos un constructor de {1} se deber\u00EDa marcar con @FeatureConstructor runtime.modeler.wsfeature.morethanone.ftrconstructor=La anotaci\u00F3n {0} no es v\u00E1lida. S\u00F3lo un constructor de {1} se puede marcar como @FeatureConstructor runtime.modeler.wsfeature.illegal.ftrconstructor=La anotaci\u00F3n {0} no es v\u00E1lida. En {1}, el valor de @FeatureConstructor no coincide con los par\u00E1metros del constructor diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_fr.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_fr.properties index 980e2dbb19b..4487ad86139 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_fr.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -47,7 +47,7 @@ runtime.modeler.mtom.conflict = Erreur dans @BindingType : la configuration MTOM # {0} - feature class name, {1} - feature class name runtime.modeler.feature.conflict= La fonctionnalit\u00E9 {0} dans l''impl\u00E9mentation est en conflit avec {1} dans la configuration WSDL # {0} - absolute class location -runtime.modeler.addressing.responses.nosuchmethod = L''API JAX-WS 2.1 est charg\u00E9 \u00E0 partir de {0}, mais le runtime JAX-WS exige l''API JAX-WS 2.2. Utilisez le m\u00E9canisme Endorsed Standards Override Mechanism pour charger l''API JAX-WS 2.2 +runtime.modeler.addressing.responses.nosuchmethod = L''API JAX-WS 2.1 est charg\u00E9e \u00E0 partir de {0}, mais le runtime JAX-WS exige l''API JAX-WS 2.2 ou une version plus r\u00E9cente. Utilisez le m\u00E9canisme Standard Override Mechanism pour charger l''API JAX-WS 2.2 ou une version plus r\u00E9cente. runtime.modeler.wsfeature.no.ftrconstructor=L''annotation {0} n''est pas reconnaissable, au moins un constructeur de {1} doit \u00EAtre marqu\u00E9 avec @FeatureConstructor runtime.modeler.wsfeature.morethanone.ftrconstructor=L''annotation {0} est interdite, seul un constructeur de {1} peut \u00EAtre marqu\u00E9 comme @FeatureConstructor runtime.modeler.wsfeature.illegal.ftrconstructor=L''annotation {0} est interdite ; dans {1}, la valeur @FeatureConstructor ne correspond pas aux param\u00E8tres constructeur diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_it.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_it.properties index c8bc8c4c9b0..e1c32e6c4bf 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_it.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -47,7 +47,7 @@ runtime.modeler.mtom.conflict = Errore in @BindingType: la configurazione MTOM n # {0} - feature class name, {1} - feature class name runtime.modeler.feature.conflict= La funzione {0} nell''implementazione \u00E8 in conflitto con {1} nella configurazione WSDL # {0} - absolute class location -runtime.modeler.addressing.responses.nosuchmethod = L''API JAX-WS 2.1 viene caricata da {0} ma il runtime JAX-WS richiede l''API JAX-WS 2.2. Usare il meccanismo Endorsed Standards Override Mechanism per caricare l''API JAX-WS 2.2 +runtime.modeler.addressing.responses.nosuchmethod = L''API JAX-WS 2.1 viene caricata da {0} ma il runtime JAX-WS richiede l''API JAX-WS 2.2 o versione successiva. Usare il meccanismo di sostituzione standard per caricare l''API JAX-WS 2.2 o versione successiva. runtime.modeler.wsfeature.no.ftrconstructor=L''annotazione {0} non \u00E8 riconoscibile. Almeno un costruttore di {1} deve essere contrassegnato con @FeatureConstructor runtime.modeler.wsfeature.morethanone.ftrconstructor=L''annotazione {0} non \u00E8 valida. Solo un costruttore di {1} pu\u00F2 essere contrassegnato come @FeatureConstructor runtime.modeler.wsfeature.illegal.ftrconstructor=L''annotazione {0} non \u00E8 valida. Il valore {1} @FeatureConstructor non corrisponde ai parametri del costruttore diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_ja.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_ja.properties index 94495904454..5e495b64f6b 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_ja.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -47,7 +47,7 @@ runtime.modeler.mtom.conflict = @BindingType\u306E\u30A8\u30E9\u30FC: \u30D0\u30 # {0} - feature class name, {1} - feature class name runtime.modeler.feature.conflict= \u5B9F\u88C5\u306E\u6A5F\u80FD{0}\u304CWSDL\u69CB\u6210\u306E{1}\u3068\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059 # {0} - absolute class location -runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API\u306F{0}\u304B\u3089\u30ED\u30FC\u30C9\u3055\u308C\u307E\u3059\u304C\u3001JAX-WS\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u306FJAX-WS 2.2 API\u304C\u5FC5\u8981\u3067\u3059\u3002JAX-WS 2.2 API\u3092\u30ED\u30FC\u30C9\u3059\u308B\u306B\u306F\u3001Endorsed Standards Override Mechanism\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044 +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API\u306F{0}\u304B\u3089\u30ED\u30FC\u30C9\u3055\u308C\u307E\u3059\u304C\u3001JAX-WS\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u306FJAX-WS 2.2\u4EE5\u4E0A\u306EAPI\u304C\u5FC5\u8981\u3067\u3059\u3002JAX-WS 2.2\u4EE5\u4E0A\u306EAPI\u3092\u30ED\u30FC\u30C9\u3059\u308B\u306B\u306F\u3001Standards Override Mechanism\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002 runtime.modeler.wsfeature.no.ftrconstructor=\u6CE8\u91C8{0}\u3092\u8A8D\u8B58\u3067\u304D\u307E\u305B\u3093\u3002{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u5C11\u306A\u304F\u3068\u30821\u3064\u304C@FeatureConstructor\u3067\u30DE\u30FC\u30AF\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 runtime.modeler.wsfeature.morethanone.ftrconstructor=\u6CE8\u91C8{0}\u304C\u4E0D\u6B63\u3067\u3059\u3002@FeatureConstructor\u3068\u3057\u3066\u30DE\u30FC\u30AF\u3067\u304D\u308B{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306F\u30011\u3064\u306E\u307F\u3067\u3059 runtime.modeler.wsfeature.illegal.ftrconstructor=\u6CE8\u91C8{0}\u304C\u4E0D\u6B63\u3067\u3059\u3002{1}\u3067\u3001@FeatureConstructor\u306E\u5024\u304C\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093 diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_ko.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_ko.properties index f51d783a1b1..0912cd30b48 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_ko.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -47,7 +47,7 @@ runtime.modeler.mtom.conflict = @BindingType\uC5D0 \uC624\uB958 \uBC1C\uC0DD: \u # {0} - feature class name, {1} - feature class name runtime.modeler.feature.conflict= \uAD6C\uD604\uC758 {0} \uAE30\uB2A5\uC774 WSDL \uAD6C\uC131\uC758 {1}\uACFC(\uC640) \uCDA9\uB3CC\uD569\uB2C8\uB2E4. # {0} - absolute class location -runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API\uAC00 {0}\uC5D0\uC11C \uB85C\uB4DC\uB418\uC5C8\uC9C0\uB9CC JAX-WS \uB7F0\uD0C0\uC784\uC5D0 JAX-WS 2.2 API\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC778\uC99D\uB41C \uD45C\uC900 \uBB34\uD6A8\uD654 \uBC29\uC2DD\uC744 \uC0AC\uC6A9\uD558\uC5EC AX-WS 2.2 API\uB97C \uB85C\uB4DC\uD558\uC2ED\uC2DC\uC624. +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API\uAC00 {0}\uC5D0\uC11C \uB85C\uB4DC\uB418\uC5C8\uC9C0\uB9CC JAX-WS \uB7F0\uD0C0\uC784\uC5D0 JAX-WS 2.2 \uC774\uC0C1 API\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uD45C\uC900 \uBB34\uD6A8\uD654 \uBC29\uC2DD\uC744 \uC0AC\uC6A9\uD558\uC5EC JAX-WS 2.2 \uC774\uC0C1 API\uB97C \uB85C\uB4DC\uD558\uC2ED\uC2DC\uC624. runtime.modeler.wsfeature.no.ftrconstructor={0} \uC8FC\uC11D\uC744 \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD558\uB098 \uC774\uC0C1\uC758 {1} \uC0DD\uC131\uC790\uAC00 @FeatureConstructor\uB85C \uD45C\uC2DC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. runtime.modeler.wsfeature.morethanone.ftrconstructor={0} \uC8FC\uC11D\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uD558\uB098\uC758 {1} \uC0DD\uC131\uC790\uB9CC @FeatureConstructor\uB85C \uD45C\uC2DC\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. runtime.modeler.wsfeature.illegal.ftrconstructor={0} \uC8FC\uC11D\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. {1}\uC5D0\uC11C @FeatureConstructor \uAC12\uC774 \uC0DD\uC131\uC790 \uB9E4\uAC1C\uBCC0\uC218\uC640 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties index d6bfc767594..57d9f50b2b3 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -47,7 +47,7 @@ runtime.modeler.mtom.conflict = Erro em @BindingType: a Configura\u00E7\u00E3o d # {0} - feature class name, {1} - feature class name runtime.modeler.feature.conflict= O recurso {0} na implementa\u00E7\u00E3o est\u00E1 em conflito com {1} na configura\u00E7\u00E3o do WSDL # {0} - absolute class location -runtime.modeler.addressing.responses.nosuchmethod = A API de JAX-WS 2.1 foi carregada de {0}, mas o runtime de JAX-WS requer a API JAX-WS 2.2. Use o mecanismo de substitui\u00E7\u00E3o de padr\u00F5es endossados para carregar a API de JAX-WS 2.2 +runtime.modeler.addressing.responses.nosuchmethod = A API de JAX-WS 2.1 foi carregada de {0}, mas o runtime de JAX-WS requer a API JAX-WS 2.2 ou mais recente. Use o mecanismo de substitui\u00E7\u00E3o de padr\u00F5es para carregar a API de JAX-WS 2.2 ou mais recente. runtime.modeler.wsfeature.no.ftrconstructor=A anota\u00E7\u00E3o {0} n\u00E3o \u00E9 reconhec\u00EDvel, pelo menos um construtor de {1} deve ser marcado com @FeatureConstructor runtime.modeler.wsfeature.morethanone.ftrconstructor=A anota\u00E7\u00E3o {0} \u00E9 inv\u00E1lida. Somente um construtor de {1} pode ser marcado como @FeatureConstructor runtime.modeler.wsfeature.illegal.ftrconstructor=A anota\u00E7\u00E3o {0} \u00E9 inv\u00E1lida. No {1} o valor de @FeatureConstructor n\u00E3o corresponde aos par\u00E2metros do construtor diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties index be9b1b7e9a3..56a8d496f6d 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -47,7 +47,7 @@ runtime.modeler.mtom.conflict = @BindingType \u4E2D\u51FA\u9519: \u7ED1\u5B9A\u6 # {0} - feature class name, {1} - feature class name runtime.modeler.feature.conflict= \u5B9E\u73B0\u4E2D\u7684\u529F\u80FD{0}\u4E0E WSDL \u914D\u7F6E\u4E2D\u7684{1}\u53D1\u751F\u51B2\u7A81 # {0} - absolute class location -runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API \u5DF2\u4ECE{0}\u4E2D\u52A0\u8F7D, \u4F46 JAX-WS \u8FD0\u884C\u65F6\u9700\u8981 JAX-WS 2.2 API\u3002\u8BF7\u4F7F\u7528\u6388\u6743\u6807\u51C6\u8986\u76D6\u673A\u5236\u6765\u52A0\u8F7D JAX-WS 2.2 API +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API \u5DF2\u4ECE {0} \u4E2D\u52A0\u8F7D, \u4F46 JAX-WS \u8FD0\u884C\u65F6\u9700\u8981 JAX-WS 2.2 \u6216\u66F4\u65B0\u7684 API\u3002\u8BF7\u4F7F\u7528\u6807\u51C6\u8986\u76D6\u673A\u5236\u6765\u52A0\u8F7D JAX-WS 2.2 \u6216\u66F4\u65B0\u7684 API\u3002 runtime.modeler.wsfeature.no.ftrconstructor=\u65E0\u6CD5\u8BC6\u522B\u6CE8\u91CA{0}, \u5E94\u4F7F\u7528 @FeatureConstructor \u81F3\u5C11\u6807\u8BB0{1}\u7684\u4E00\u4E2A\u6784\u9020\u5668 runtime.modeler.wsfeature.morethanone.ftrconstructor=\u6CE8\u91CA{0}\u662F\u975E\u6CD5\u7684, \u53EA\u80FD\u5C06{1}\u7684\u4E00\u4E2A\u6784\u9020\u5668\u6807\u8BB0\u4E3A @FeatureConstructor runtime.modeler.wsfeature.illegal.ftrconstructor=\u6CE8\u91CA{0}\u662F\u975E\u6CD5\u7684, \u5728{1}\u4E2D, @FeatureConstructor \u503C\u4E0E\u6784\u9020\u5668\u53C2\u6570\u4E0D\u5339\u914D diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties index 055d6da0d57..372512643f1 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -47,7 +47,7 @@ runtime.modeler.mtom.conflict = @BindingType \u767C\u751F\u932F\u8AA4: \u9023\u7 # {0} - feature class name, {1} - feature class name runtime.modeler.feature.conflict= \u5BE6\u884C\u4E2D\u7684\u529F\u80FD {0} \u8207 WSDL \u7D44\u614B\u4E2D\u7684 {1} \u767C\u751F\u885D\u7A81 # {0} - absolute class location -runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API \u5DF2\u5F9E {0} \u8F09\u5165, \u4F46 JAX-WS \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u9700\u8981 JAX-WS 2.2 API. \u8ACB\u4F7F\u7528\u8A8D\u53EF\u7684\u6A19\u6E96\u8986\u5BEB\u6A5F\u5236\u4F86\u8F09\u5165 JAX-WS 2.2 API +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API \u5F9E {0} \u8F09\u5165\uFF0C\u4F46\u662F JAX-WS \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u9700\u8981 JAX-WS 2.2 \u6216\u66F4\u65B0\u7248\u672C\u7684 API\u3002\u8ACB\u4F7F\u7528\u6A19\u6E96\u8986\u5BEB\u6A5F\u5236\u4F86\u8F09\u5165 JAX-WS 2.2 \u6216\u66F4\u65B0\u7248\u672C\u7684 API\u3002 runtime.modeler.wsfeature.no.ftrconstructor=\u8A3B\u89E3 {0} \u7121\u6CD5\u8FA8\u8B58, \u81F3\u5C11\u4E00\u500B {1} \u7684\u5EFA\u69CB\u5B50\u61C9\u6A19\u793A @FeatureConstructor runtime.modeler.wsfeature.morethanone.ftrconstructor=\u8A3B\u89E3 {0} \u7121\u6548, \u53EA\u80FD\u6709\u4E00\u500B {1} \u7684\u5EFA\u69CB\u5B50\u6A19\u793A\u70BA @FeatureConstructor runtime.modeler.wsfeature.illegal.ftrconstructor=\u8A3B\u89E3 {0} \u7121\u6548, \u5728 {1} \u4E2D, @FeatureConstructor \u503C\u8207\u5EFA\u69CB\u5B50\u53C3\u6578\u4E0D\u7B26 diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java index cf0bf26eec3..976cdd1e7b5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java @@ -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 @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.spi; +import com.sun.xml.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java index 9f23f51b43a..944dd388df6 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -69,13 +69,11 @@ import org.w3c.dom.Element; /** * Implements {@link Endpoint}. - *

    - *

    + * * This class accumulates the information necessary to create * {@link WSEndpoint}, and then when {@link #publish} method * is called it will be created. - *

    - *

    + * * This object also allows accumulated information to be retrieved. * * @author Jitendra Kotamraju @@ -205,14 +203,17 @@ public class EndpointImpl extends Endpoint { invoker = null; } + @Override public Binding getBinding() { return binding; } + @Override public Object getImplementor() { return implementor; } + @Override public void publish(String address) { canPublish(); URL url; @@ -232,6 +233,7 @@ public class EndpointImpl extends Endpoint { ((HttpEndpoint) actualEndpoint).publish(address); } + @Override public void publish(Object serverContext) { canPublish(); if (!com.sun.net.httpserver.HttpContext.class.isAssignableFrom(serverContext.getClass())) { @@ -241,12 +243,14 @@ public class EndpointImpl extends Endpoint { ((HttpEndpoint) actualEndpoint).publish(serverContext); } + @Override public void publish(HttpContext serverContext) { canPublish(); createEndpoint(serverContext.getPath()); ((HttpEndpoint) actualEndpoint).publish(serverContext); } + @Override public void stop() { if (isPublished()) { ((HttpEndpoint) actualEndpoint).stop(); @@ -255,14 +259,17 @@ public class EndpointImpl extends Endpoint { } } + @Override public boolean isPublished() { return actualEndpoint != null; } + @Override public List getMetadata() { return metadata; } + @Override public void setMetadata(java.util.List metadata) { if (isPublished()) { throw new IllegalStateException("Cannot set Metadata. Endpoint is already published"); @@ -270,20 +277,24 @@ public class EndpointImpl extends Endpoint { this.metadata = metadata; } + @Override public Executor getExecutor() { return executor; } + @Override public void setExecutor(Executor executor) { this.executor = executor; } + @Override public Map getProperties() { - return new HashMap(properties); + return new HashMap<>(properties); } + @Override public void setProperties(Map map) { - this.properties = new HashMap(map); + this.properties = new HashMap<>(map); } /* @@ -335,7 +346,7 @@ public class EndpointImpl extends Endpoint { * reuse the Source object multiple times. */ private List buildDocList() { - List r = new ArrayList(); + List r = new ArrayList<>(); if (metadata != null) { for (Source source : metadata) { @@ -344,14 +355,8 @@ public class EndpointImpl extends Endpoint { String systemId = source.getSystemId(); r.add(SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer())); - } catch (TransformerException te) { + } catch (TransformerException | IOException | SAXException | ParserConfigurationException te) { throw new ServerRtException("server.rt.err", te); - } catch (IOException te) { - throw new ServerRtException("server.rt.err", te); - } catch (SAXException e) { - throw new ServerRtException("server.rt.err", e); - } catch (ParserConfigurationException e) { - throw new ServerRtException("server.rt.err", e); } } } @@ -367,11 +372,6 @@ public class EndpointImpl extends Endpoint { EndpointFactory.verifyImplementorClass(implClass, metadataReader); String wsdlLocation = EndpointFactory.getWsdlLocation(implClass, metadataReader); if (wsdlLocation != null) { - ClassLoader cl = implClass.getClassLoader(); - URL url = cl.getResource(wsdlLocation); - if (url != null) { - return SDDocumentSource.create(url); - } return SDDocumentSource.create(implClass, wsdlLocation); } return null; @@ -388,10 +388,12 @@ public class EndpointImpl extends Endpoint { } } + @Override public EndpointReference getEndpointReference(Element...referenceParameters) { return getEndpointReference(W3CEndpointReference.class, referenceParameters); } + @Override public T getEndpointReference(Class clazz, Element...referenceParameters) { if (!isPublished()) { throw new WebServiceException("Endpoint is not published yet"); @@ -458,13 +460,12 @@ public class EndpointImpl extends Endpoint { public void start(@NotNull WSWebServiceContext wsc, @NotNull WSEndpoint endpoint) { try { spiInvoker.inject(wsc); - } catch (IllegalAccessException e) { - throw new WebServiceException(e); - } catch (InvocationTargetException e) { + } catch (IllegalAccessException | InvocationTargetException e) { throw new WebServiceException(e); } } + @Override public Object invoke(@NotNull Packet p, @NotNull Method m, @NotNull Object... args) throws InvocationTargetException, IllegalAccessException { return spiInvoker.invoke(m, args); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java index 6455b83efa9..2d8ecee4cfc 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,8 +37,8 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.logging.Level; import java.util.logging.Logger; -import java.util.Optional; /** @@ -49,10 +49,10 @@ import java.util.Optional; final class ServerMgr { private static final ServerMgr serverMgr = new ServerMgr(); - private static final Logger logger = + private static final Logger LOGGER = Logger.getLogger( com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.http"); - private final Map servers = new HashMap(); + private final Map servers = new HashMap<>(); private ServerMgr() {} @@ -83,25 +83,26 @@ final class ServerMgr { synchronized(servers) { state = servers.get(inetAddress); if (state == null) { - final int finalPortNum = port; - Optional stateOpt = - servers.values() - .stream() - .filter(s -> s.getServer() - .getAddress() - .getPort() == finalPortNum) - .findAny(); - - if (inetAddress.getAddress().isAnyLocalAddress() && - stateOpt.isPresent()) { - state = stateOpt.get(); + ServerState free = null; + for (ServerState ss : servers.values()) { + if (port == ss.getServer().getAddress().getPort()) { + free = ss; + break; + } + } + if (inetAddress.getAddress().isAnyLocalAddress() && free != null) { + state = free; } else { - logger.fine("Creating new HTTP Server at "+inetAddress); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine("Creating new HTTP Server at "+inetAddress); + } // Creates server with default socket backlog server = HttpServer.create(inetAddress, 0); server.setExecutor(Executors.newCachedThreadPool()); String path = url.toURI().getPath(); - logger.fine("Creating HTTP Context at = "+path); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine("Creating HTTP Context at = "+path); + } HttpContext context = server.createContext(path); server.start(); @@ -110,7 +111,9 @@ final class ServerMgr { // or IP: 0.0.0.0 - which is used to monitor network traffic from any valid IP address inetAddress = server.getAddress(); - logger.fine("HTTP server started = "+inetAddress); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine("HTTP server started = "+inetAddress); + } state = new ServerState(server, path); servers.put(inetAddress, state); return context; @@ -121,11 +124,15 @@ final class ServerMgr { if (state.getPaths().contains(url.getPath())) { String err = "Context with URL path "+url.getPath()+ " already exists on the server "+server.getAddress(); - logger.fine(err); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine(err); + } throw new IllegalArgumentException(err); } - logger.fine("Creating HTTP Context at = "+url.getPath()); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine("Creating HTTP Context at = "+url.getPath()); + } HttpContext context = server.createContext(url.getPath()); state.oneMoreContext(url.getPath()); return context; @@ -157,7 +164,7 @@ final class ServerMgr { private static final class ServerState { private final HttpServer server; private int instances; - private Set paths = new HashSet(); + private final Set paths = new HashSet<>(); ServerState(HttpServer server, String path) { this.server = server; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java index 42385239f3f..df549c0249c 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -45,6 +45,7 @@ import javax.xml.ws.Provider; import javax.xml.ws.Service; import java.io.IOException; import java.io.InputStream; +import java.lang.reflect.Method; import java.net.URL; import java.util.logging.Logger; @@ -234,17 +235,15 @@ public class HandlerAnnotationProcessor { } private static InputStream moduleResource(Class resolvingClass, String name) { - java.lang.reflect.Module module = resolvingClass.getModule(); - if (module != null) { - try { - InputStream stream = module.getResourceAsStream(name); - if (stream != null) { - return stream; - } - } catch(IOException e) { - throw new UtilException("util.failed.to.find.handlerchain.file", - resolvingClass.getName(), name); + Module module = resolvingClass.getModule(); + try { + InputStream stream = module.getResourceAsStream(name); + if (stream != null) { + return stream; } + } catch(IOException e) { + throw new UtilException("util.failed.to.find.handlerchain.file", + resolvingClass.getName(), name); } return null; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MethodUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MethodUtil.java new file mode 100644 index 00000000000..8eaf51e461f --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MethodUtil.java @@ -0,0 +1,293 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.util; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.security.AccessController; +import java.security.AllPermission; +import java.security.CodeSource; +import java.security.PermissionCollection; +import java.security.PrivilegedExceptionAction; +import java.security.SecureClassLoader; +import java.util.Arrays; + +/* + * This copies from sun.reflect.misc.MethodUtil to implement the trampoline + * code such that when a Method is invoked, it will be called through + * the trampoline that is defined by this MethodUtil class loader. + */ +class Trampoline { + static { + if (Trampoline.class.getClassLoader() == null) { + throw new Error( + "Trampoline must not be defined by the bootstrap classloader"); + } + } + + private static void ensureInvocableMethod(Method m) + throws InvocationTargetException { + Class clazz = m.getDeclaringClass(); + if (clazz.equals(AccessController.class) || + clazz.equals(Method.class) || + clazz.getName().startsWith("java.lang.invoke.")) + throw new InvocationTargetException( + new UnsupportedOperationException("invocation not supported")); + } + + private static Object invoke(Method m, Object obj, Object[] params) + throws InvocationTargetException, IllegalAccessException { + ensureInvocableMethod(m); + return m.invoke(obj, params); + } +} + +/* + * Create a trampoline class. + */ +public final class MethodUtil extends SecureClassLoader { + private static final String WS_UTIL_PKG = "com.sun.xml.internal.ws.util."; + private static final String TRAMPOLINE = WS_UTIL_PKG + "Trampoline"; + private static final Method bounce = getTrampoline(); + private static final int DEFAULT_BUFFER_SIZE = 8192; + private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8; + + + private MethodUtil() { + super(); + } + + /* + * Bounce through the trampoline. + */ + public static Object invoke(Method m, Object obj, Object[] params) + throws InvocationTargetException, IllegalAccessException { + try { + return bounce.invoke(null, m, obj, params); + } catch (InvocationTargetException ie) { + Throwable t = ie.getCause(); + + if (t instanceof InvocationTargetException) { + throw (InvocationTargetException) t; + } else if (t instanceof IllegalAccessException) { + throw (IllegalAccessException) t; + } else if (t instanceof RuntimeException) { + throw (RuntimeException) t; + } else if (t instanceof Error) { + throw (Error) t; + } else { + throw new Error("Unexpected invocation error", t); + } + } catch (IllegalAccessException iae) { + // this can't happen + throw new Error("Unexpected invocation error", iae); + } + } + + private static Method getTrampoline() { + try { + return AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public Method run() throws Exception { + Class t = getTrampolineClass(); + Method b = t.getDeclaredMethod("invoke", + Method.class, Object.class, Object[].class); + b.setAccessible(true); + return b; + } + }); + } catch (Exception e) { + throw new InternalError("bouncer cannot be found", e); + } + } + + + protected synchronized Class loadClass(String name, boolean resolve) + throws ClassNotFoundException { + // First, check if the class has already been loaded + checkPackageAccess(name); + Class c = findLoadedClass(name); + if (c == null) { + try { + c = findClass(name); + } catch (ClassNotFoundException e) { + // Fall through ... + } + if (c == null) { + c = getParent().loadClass(name); + } + } + if (resolve) { + resolveClass(c); + } + return c; + } + + + protected Class findClass(final String name) + throws ClassNotFoundException { + if (!name.startsWith(WS_UTIL_PKG)) { + throw new ClassNotFoundException(name); + } + String path = "/".concat(name.replace('.', '/').concat(".class")); + try (InputStream in = MethodUtil.class.getResourceAsStream(path)) { + byte[] b = readAllBytes(in); + return defineClass(name, b); + } catch (IOException e) { + throw new ClassNotFoundException(name, e); + } + } + + /** + * JDK9 {@link InputStream#readAllBytes()} substitution. + */ + private byte[] readAllBytes(InputStream in) throws IOException { + byte[] buf = new byte[DEFAULT_BUFFER_SIZE]; + int capacity = buf.length; + int nread = 0; + int n; + for (; ; ) { + // read to EOF which may read more or less than initial buffer size + while ((n = in.read(buf, nread, capacity - 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) + throw new OutOfMemoryError("Required array size too large"); + capacity = MAX_BUFFER_SIZE; + } + buf = Arrays.copyOf(buf, capacity); + } + return (capacity == nread) ? buf : Arrays.copyOf(buf, nread); + } + + + /* + * Define the proxy classes + */ + private Class defineClass(String name, byte[] b) throws IOException { + CodeSource cs = new CodeSource(null, (java.security.cert.Certificate[]) null); + if (!name.equals(TRAMPOLINE)) { + throw new IOException("MethodUtil: bad name " + name); + } + return defineClass(name, b, 0, b.length, cs); + } + + protected PermissionCollection getPermissions(CodeSource codesource) { + PermissionCollection perms = super.getPermissions(codesource); + perms.add(new AllPermission()); + return perms; + } + + private static Class getTrampolineClass() { + try { + return Class.forName(TRAMPOLINE, true, new MethodUtil()); + } catch (ClassNotFoundException e) { + } + return null; + } + + /** + * Checks package access on the given classname. + * This method is typically called when the Class instance is not + * available and the caller attempts to load a class on behalf + * the true caller (application). + */ + private static void checkPackageAccess(String name) { + SecurityManager s = System.getSecurityManager(); + if (s != null) { + String cname = name.replace('/', '.'); + if (cname.startsWith("[")) { + int b = cname.lastIndexOf('[') + 2; + if (b > 1 && b < cname.length()) { + cname = cname.substring(b); + } + } + int i = cname.lastIndexOf('.'); + if (i != -1) { + s.checkPackageAccess(cname.substring(0, i)); + } + } + } + + /** + * Checks package access on the given class. + *

    + * If it is a {@link Proxy#isProxyClass(Class)} that implements + * a non-public interface (i.e. may be in a non-restricted package), + * also check the package access on the proxy interfaces. + */ + private static void checkPackageAccess(Class clazz) { + checkPackageAccess(clazz.getName()); + if (isNonPublicProxyClass(clazz)) { + checkProxyPackageAccess(clazz); + } + } + + // Note that bytecode instrumentation tools may exclude 'sun.*' + // classes but not generated proxy classes and so keep it in com.sun.* + private static final String PROXY_PACKAGE = "com.sun.proxy"; + + /** + * Test if the given class is a proxy class that implements + * non-public interface. Such proxy class may be in a non-restricted + * package that bypasses checkPackageAccess. + */ + private static boolean isNonPublicProxyClass(Class cls) { + String name = cls.getName(); + int i = name.lastIndexOf('.'); + String pkg = (i != -1) ? name.substring(0, i) : ""; + return Proxy.isProxyClass(cls) && !pkg.startsWith(PROXY_PACKAGE); + } + + /** + * Check package access on the proxy interfaces that the given proxy class + * implements. + * + * @param clazz Proxy class object + */ + private static void checkProxyPackageAccess(Class clazz) { + SecurityManager s = System.getSecurityManager(); + if (s != null) { + // check proxy interfaces if the given class is a proxy class + if (Proxy.isProxyClass(clazz)) { + for (Class intf : clazz.getInterfaces()) { + checkPackageAccess(intf); + } + } + } + } +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MrJarUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MrJarUtil.java new file mode 100644 index 00000000000..7b6b5c2b649 --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MrJarUtil.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.util; + +import java.security.AccessController; +import java.security.PrivilegedAction; + +/** + * Utility class used as a JEP 238 multi release jar versioned class. + * + * Version for {@code runtime >= 9}. + */ +public class MrJarUtil { + + /** + * Get property used for disabling instance pooling of xml readers / writers. + * + * @param baseName Name of a {@linkplain com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory} class or + * {@linkplain com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory} class. + * + * @return true if *.noPool system property is not set or is set to true. + */ + public static boolean getNoPoolProperty(String baseName) { + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public Boolean run() { + String noPool = System.getProperty(baseName + ".noPool"); + return noPool == null || Boolean.parseBoolean(noPool); + } + }); + } +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/Pool.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/Pool.java index 3c6e544167f..dd426f491d0 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/Pool.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/Pool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -30,8 +30,10 @@ import com.sun.xml.internal.ws.api.pipe.TubeCloner; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; + import java.util.concurrent.ConcurrentLinkedQueue; -import java.lang.ref.WeakReference; +import java.lang.ref.SoftReference; + /** * General-purpose object pool. @@ -50,7 +52,7 @@ import java.lang.ref.WeakReference; public abstract class Pool { // volatile since multiple threads may access queue reference - private volatile WeakReference> queue; + private volatile SoftReference> queue; /** * Gets a new object from the pool. @@ -69,7 +71,7 @@ public abstract class Pool { } private ConcurrentLinkedQueue getQueue() { - WeakReference> q = queue; + SoftReference> q = queue; if (q != null) { ConcurrentLinkedQueue d = q.get(); if (d != null) @@ -78,7 +80,7 @@ public abstract class Pool { // overwrite the queue ConcurrentLinkedQueue d = new ConcurrentLinkedQueue(); - queue = new WeakReference>(d); + queue = new SoftReference>(d); return d; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java index c2ec0fc4013..e7977c05e77 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -45,7 +45,7 @@ import javax.xml.ws.WebServiceException; * @author WS Development Team */ public abstract class JAXWSExceptionBase - extends WebServiceException implements Localizable { + extends WebServiceException implements Localizable, LocalizableMessageFactory.ResourceBundleSupplier { //Don't worry about previous serialVersionUID = 4818235090198755494L;, this class was not serializable before. private static final long serialVersionUID = 1L; @@ -53,12 +53,14 @@ public abstract class JAXWSExceptionBase private transient Localizable msg; /** - * @deprecated - * Should use the localizable constructor instead. + * @param key + * @param args + * @deprecated Should use the localizable constructor instead. */ + @Deprecated protected JAXWSExceptionBase(String key, Object... args) { super(findNestedException(args)); - this.msg = new LocalizableMessage(getDefaultResourceBundleName(), key, args); + this.msg = new LocalizableMessage(getDefaultResourceBundleName(), this, key, args); } @@ -68,6 +70,7 @@ public abstract class JAXWSExceptionBase /** * Creates a new exception that wraps the specified exception. + * @param throwable */ protected JAXWSExceptionBase(Throwable throwable) { this(new NullLocalizable(throwable.toString()),throwable); @@ -127,8 +130,7 @@ public abstract class JAXWSExceptionBase args[i] = in.readObject(); } } - msg = new LocalizableMessageFactory(resourceBundleName, this::getResourceBundle) - .getMessage(key,args); + msg = new LocalizableMessageFactory(resourceBundleName).getMessage(key,args); } private static Throwable findNestedException(Object[] args) { @@ -141,6 +143,7 @@ public abstract class JAXWSExceptionBase return null; } + @Override public String getMessage() { Localizer localizer = new Localizer(); return localizer.localize(this); @@ -149,31 +152,31 @@ public abstract class JAXWSExceptionBase /** * Gets the default resource bundle name for this kind of exception. * Used for {@link #JAXWSExceptionBase(String, Object[])}. + * @return */ protected abstract String getDefaultResourceBundleName(); - /* - * Returns the ResourceBundle in this module. - * - * Subclasses in a different module has to override this method. - */ +// +// Localizable delegation +// + @Override + public final String getKey() { + return msg.getKey(); + } + + @Override + public final Object[] getArguments() { + return msg.getArguments(); + } + + @Override + public final String getResourceBundleName() { + return msg.getResourceBundleName(); + } + @Override public ResourceBundle getResourceBundle(Locale locale) { return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale); } -// -// Localizable delegation -// - public final String getKey() { - return msg.getKey(); - } - - public final Object[] getArguments() { - return msg.getArguments(); - } - - public final String getResourceBundleName() { - return msg.getResourceBundleName(); - } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java index 234d05eae54..783eab51dcb 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -483,7 +483,7 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp assert docs.size() > 1; final StringBuilder sb = new StringBuilder("\n"); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties index eedc7c2b359..88eace686b6 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties @@ -1,5 +1,5 @@ # -# 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 @@ -26,4 +26,4 @@ build-id=2.3.0-SNAPSHOT build-version=JAX-WS RI 2.3.0-SNAPSHOT major-version=2.3.0 -svn-revision=5c2c1fd2f2ab3b5c7cea25f79aa49e54cb84b7cc +svn-revision=3012ef421cf43774943c57736dac2207aeea9f07 diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java index 93a44b68050..715db421328 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java @@ -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 @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.util.xml; +import com.sun.xml.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlCatalogUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlCatalogUtil.java new file mode 100644 index 00000000000..d1ef8648bfc --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlCatalogUtil.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.util.xml; + +import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.server.ServerRtException; +import java.io.File; +import java.net.URI; +import java.net.URL; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Enumeration; +import javax.xml.catalog.CatalogFeatures; +import javax.xml.catalog.CatalogFeatures.Feature; +import javax.xml.catalog.CatalogManager; +import javax.xml.ws.WebServiceException; +import org.xml.sax.EntityResolver; + +/** + * + * @author lukas + */ +public class XmlCatalogUtil { + + // Cache CatalogFeatures instance for future usages. + // Resolve feature is set to "continue" value for backward compatibility. + private static final CatalogFeatures CATALOG_FEATURES + = CatalogFeatures.builder().with(Feature.RESOLVE, "continue").build(); + + /** + * Gets an EntityResolver using XML catalog + * + * @param catalogUrl + * @return + */ + public static EntityResolver createEntityResolver(@Nullable URL catalogUrl) { + ArrayList urlsArray = new ArrayList<>(); + EntityResolver er; + if (catalogUrl != null) { + urlsArray.add(catalogUrl); + } + try { + er = createCatalogResolver(urlsArray); + } catch (Exception e) { + throw new ServerRtException("server.rt.err", e); + } + return er; + } + + /** + * Gets a default EntityResolver for catalog at META-INF/jaxws-catalog.xml + * + * @return + */ + public static EntityResolver createDefaultCatalogResolver() { + EntityResolver er; + try { + /** + * Gets a URLs for catalog defined at META-INF/jaxws-catalog.xml + */ + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + Enumeration catalogEnum; + if (cl == null) { + catalogEnum = ClassLoader.getSystemResources("META-INF/jax-ws-catalog.xml"); + } else { + catalogEnum = cl.getResources("META-INF/jax-ws-catalog.xml"); + } + er = createCatalogResolver(Collections.list(catalogEnum)); + } catch (Exception e) { + throw new WebServiceException(e); + } + + return er; + } + + /** + * Instantiate catalog resolver using new catalog API (javax.xml.catalog.*) + * added in JDK9. Usage of new API removes dependency on internal API + * (com.sun.org.apache.xml.internal) for modular runtime. + */ + private static EntityResolver createCatalogResolver(ArrayList urls) throws Exception { + // Prepare array of catalog URIs + URI[] uris = urls.stream() + .map(u -> URI.create(u.toExternalForm())) + .toArray(URI[]::new); + + //Create CatalogResolver with new JDK9+ API + return (EntityResolver) CatalogManager.catalogResolver(CATALOG_FEATURES, uris); + } + +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java index d84fa5e7d11..213b584b15a 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java @@ -26,30 +26,21 @@ package com.sun.xml.internal.ws.util.xml; import com.sun.istack.internal.Nullable; -import com.sun.xml.internal.ws.server.ServerRtException; import com.sun.xml.internal.ws.util.ByteArrayBuffer; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.io.Writer; -import java.lang.reflect.Method; -import java.net.URI; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; -import java.util.Collections; -import java.util.Enumeration; import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.stream.Collectors; import javax.xml.XMLConstants; -import javax.xml.catalog.CatalogFeatures; -import javax.xml.catalog.CatalogFeatures.Feature; -import javax.xml.catalog.CatalogManager; import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -65,7 +56,6 @@ import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.SchemaFactory; -import javax.xml.ws.WebServiceException; import javax.xml.xpath.XPathFactory; import javax.xml.xpath.XPathFactoryConfigurationException; import org.w3c.dom.Attr; @@ -78,6 +68,8 @@ import org.xml.sax.EntityResolver; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; +import org.xml.sax.SAXNotRecognizedException; +import org.xml.sax.SAXNotSupportedException; import org.xml.sax.SAXParseException; import org.xml.sax.XMLReader; @@ -184,7 +176,7 @@ public class XmlUtil { } public static List parseTokenList(String tokenList) { - List result = new ArrayList(); + List result = new ArrayList<>(); StringTokenizer tokenizer = new StringTokenizer(tokenList, " "); while (tokenizer.hasMoreTokens()) { result.add(tokenizer.nextToken()); @@ -247,6 +239,7 @@ public class XmlUtil { /** * Creates a new identity transformer. + * @return */ public static Transformer newTransformer() { try { @@ -258,9 +251,17 @@ public class XmlUtil { /** * Performs identity transformation. + * @param + * @param src + * @param result + * @return + * @throws javax.xml.transform.TransformerException + * @throws java.io.IOException + * @throws org.xml.sax.SAXException + * @throws javax.xml.parsers.ParserConfigurationException */ - public static - T identityTransform(Source src, T result) throws TransformerException, SAXException, ParserConfigurationException, IOException { + public static T identityTransform(Source src, T result) + throws TransformerException, SAXException, ParserConfigurationException, IOException { if (src instanceof StreamSource) { // work around a bug in JAXP in JDK6u4 and earlier where the namespace processing // is not turned on by default @@ -286,68 +287,25 @@ public class XmlUtil { return is; } - /* - * Gets an EntityResolver using XML catalog - */ - public static EntityResolver createEntityResolver(@Nullable URL catalogUrl) { - ArrayList urlsArray = new ArrayList(); - EntityResolver er; - if (catalogUrl != null) { - urlsArray.add(catalogUrl); - } - try { - er = createCatalogResolver(urlsArray); - } catch (Exception e) { - throw new ServerRtException("server.rt.err",e); - } - return er; + /** + * Gets an EntityResolver using XML catalog + * + * @param catalogUrl + * @return + */ + public static EntityResolver createEntityResolver(@Nullable URL catalogUrl) { + return XmlCatalogUtil.createEntityResolver(catalogUrl); } /** * Gets a default EntityResolver for catalog at META-INF/jaxws-catalog.xml + * + * @return */ public static EntityResolver createDefaultCatalogResolver() { - EntityResolver er; - try { - /** - * Gets a URLs for catalog defined at META-INF/jaxws-catalog.xml - */ - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - Enumeration catalogEnum; - if (cl == null) { - catalogEnum = ClassLoader.getSystemResources("META-INF/jax-ws-catalog.xml"); - } else { - catalogEnum = cl.getResources("META-INF/jax-ws-catalog.xml"); - } - er = createCatalogResolver(Collections.list(catalogEnum)); - } catch (Exception e) { - throw new WebServiceException(e); - } - - return er; + return XmlCatalogUtil.createDefaultCatalogResolver(); } - /** - * Instantiate catalog resolver using new catalog API (javax.xml.catalog.*) - * added in JDK9. Usage of new API removes dependency on internal API - * (com.sun.org.apache.xml.internal) for modular runtime. - */ - private static EntityResolver createCatalogResolver(ArrayList urls) throws Exception { - // Prepare array of catalog URIs - URI[] uris = urls.stream() - .map(u -> URI.create(u.toExternalForm())) - .toArray(URI[]::new); - - //Create CatalogResolver with new JDK9+ API - return (EntityResolver) CatalogManager.catalogResolver(catalogFeatures, uris); - } - - // Cache CatalogFeatures instance for future usages. - // Resolve feature is set to "continue" value for backward compatibility. - private static CatalogFeatures catalogFeatures = CatalogFeatures.builder() - .with(Feature.RESOLVE, "continue") - .build(); - /** * {@link ErrorHandler} that always treat the error as fatal. */ @@ -391,7 +349,7 @@ public class XmlUtil { SAXParserFactory factory = SAXParserFactory.newInstance(); try { factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !xmlSecurityDisabled(disableSecurity)); - } catch (Exception e) { + } catch (ParserConfigurationException | SAXNotRecognizedException | SAXNotSupportedException e) { LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()}); } return factory; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/AttachmentPart.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/AttachmentPart.java index 5b90f85e2dc..4770665d8f3 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/AttachmentPart.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/AttachmentPart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -26,7 +26,6 @@ package javax.xml.soap; import java.io.InputStream; -import java.io.Reader; import java.util.Iterator; import javax.activation.DataHandler; @@ -499,7 +498,7 @@ public abstract class AttachmentPart { * @return an {@code Iterator} object with all of the Mime * headers for this {@code AttachmentPart} object */ - public abstract Iterator getAllMimeHeaders(); + public abstract Iterator getAllMimeHeaders(); /** * Retrieves all {@code MimeHeader} objects that match a name in @@ -510,7 +509,7 @@ public abstract class AttachmentPart { * @return all of the MIME headers that match one of the names in the * given array as an {@code Iterator} object */ - public abstract Iterator getMatchingMimeHeaders(String[] names); + public abstract Iterator getMatchingMimeHeaders(String[] names); /** * Retrieves all {@code MimeHeader} objects whose name does @@ -523,5 +522,5 @@ public abstract class AttachmentPart { * given array. The nonmatching MIME headers are returned as an * {@code Iterator} object. */ - public abstract Iterator getNonMatchingMimeHeaders(String[] names); + public abstract Iterator getNonMatchingMimeHeaders(String[] names); } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Detail.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Detail.java index 78ad9f323dc..8b823e1aeeb 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Detail.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Detail.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -68,6 +68,9 @@ public interface Detail extends SOAPFaultElement { * @param name a {@code Name} object identifying the * new {@code DetailEntry} object * + * @return the new {@code DetailEntry} object that was + * created + * * @exception SOAPException thrown when there is a problem in adding a * DetailEntry object to this Detail object. * @@ -83,6 +86,9 @@ public interface Detail extends SOAPFaultElement { * @param qname a {@code QName} object identifying the * new {@code DetailEntry} object * + * @return the new {@code DetailEntry} object that was + * created + * * @exception SOAPException thrown when there is a problem in adding a * DetailEntry object to this Detail object. * @@ -97,5 +103,5 @@ public interface Detail extends SOAPFaultElement { * @return an {@code Iterator} object over the {@code DetailEntry} * objects in this {@code Detail} object */ - public Iterator getDetailEntries(); + public Iterator getDetailEntries(); } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java index ef5500a0627..190471cd9d5 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -245,10 +245,14 @@ class FactoryFinder { return null; } - private static String getSystemProperty(String property) { + private static String getSystemProperty(final String property) { logger.log(Level.FINE, "Checking system property {0}", property); - String value = AccessController.doPrivileged( - (PrivilegedAction) () -> System.getProperty(property)); + String value = AccessController.doPrivileged(new PrivilegedAction() { + @Override + public String run() { + return System.getProperty(property); + } + }); logFound(value); return value; } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeaders.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeaders.java index d84d6b77255..85046ca9a3a 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeaders.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -42,14 +42,14 @@ import java.util.Vector; * @since 1.6 */ public class MimeHeaders { - private Vector headers; + private Vector headers; /** * Constructs a default {@code MimeHeaders} object initialized with * an empty {@code Vector} object. */ public MimeHeaders() { - headers = new Vector(); + headers = new Vector<>(); } /** @@ -62,10 +62,10 @@ public class MimeHeaders { * @see #setHeader */ public String[] getHeader(String name) { - Vector values = new Vector(); + Vector values = new Vector<>(); for(int i = 0; i < headers.size(); i++) { - MimeHeader hdr = (MimeHeader) headers.elementAt(i); + MimeHeader hdr = headers.elementAt(i); if (hdr.getName().equalsIgnoreCase(name) && hdr.getValue() != null) values.addElement(hdr.getValue()); @@ -103,7 +103,7 @@ public class MimeHeaders { throw new IllegalArgumentException("Illegal MimeHeader name"); for(int i = 0; i < headers.size(); i++) { - MimeHeader hdr = (MimeHeader) headers.elementAt(i); + MimeHeader hdr = headers.elementAt(i); if (hdr.getName().equalsIgnoreCase(name)) { if (!found) { headers.setElementAt(new MimeHeader(hdr.getName(), @@ -141,7 +141,7 @@ public class MimeHeaders { int pos = headers.size(); for(int i = pos - 1 ; i >= 0; i--) { - MimeHeader hdr = (MimeHeader) headers.elementAt(i); + MimeHeader hdr = headers.elementAt(i); if (hdr.getName().equalsIgnoreCase(name)) { headers.insertElementAt(new MimeHeader(name, value), i+1); @@ -160,7 +160,7 @@ public class MimeHeaders { */ public void removeHeader(String name) { for(int i = 0; i < headers.size(); i++) { - MimeHeader hdr = (MimeHeader) headers.elementAt(i); + MimeHeader hdr = headers.elementAt(i); if (hdr.getName().equalsIgnoreCase(name)) headers.removeElementAt(i--); } @@ -180,26 +180,26 @@ public class MimeHeaders { * @return an {@code Iterator} object over this {@code MimeHeaders} * object's list of {@code MimeHeader} objects */ - public Iterator getAllHeaders() { + public Iterator getAllHeaders() { return headers.iterator(); } - class MatchingIterator implements Iterator { - private boolean match; - private Iterator iterator; - private String[] names; - private Object nextHeader; + static class MatchingIterator implements Iterator { + private final boolean match; + private final Iterator iterator; + private final String[] names; + private MimeHeader nextHeader; - MatchingIterator(String[] names, boolean match) { + MatchingIterator(String[] names, boolean match, Iterator i) { this.match = match; this.names = names; - this.iterator = headers.iterator(); + this.iterator = i; } - private Object nextMatch() { + private MimeHeader nextMatch() { next: while (iterator.hasNext()) { - MimeHeader hdr = (MimeHeader) iterator.next(); + MimeHeader hdr = iterator.next(); if (names == null) return match ? null : hdr; @@ -217,17 +217,19 @@ public class MimeHeaders { } + @Override public boolean hasNext() { if (nextHeader == null) nextHeader = nextMatch(); return nextHeader != null; } - public Object next() { + @Override + public MimeHeader next() { // hasNext should've prefetched the header for us, // return it. if (nextHeader != null) { - Object ret = nextHeader; + MimeHeader ret = nextHeader; nextHeader = null; return ret; } @@ -236,6 +238,7 @@ public class MimeHeaders { return null; } + @Override public void remove() { iterator.remove(); } @@ -251,8 +254,8 @@ public class MimeHeaders { * @return an {@code Iterator} object over the {@code MimeHeader} * objects whose name matches one of the names in the given list */ - public Iterator getMatchingHeaders(String[] names) { - return new MatchingIterator(names, true); + public Iterator getMatchingHeaders(String[] names) { + return new MatchingIterator(names, true, headers.iterator()); } /** @@ -264,7 +267,7 @@ public class MimeHeaders { * @return an {@code Iterator} object over the {@code MimeHeader} * objects whose name does not match one of the names in the given list */ - public Iterator getNonMatchingHeaders(String[] names) { - return new MatchingIterator(names, false); + public Iterator getNonMatchingHeaders(String[] names) { + return new MatchingIterator(names, false, headers.iterator()); } } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Node.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Node.java index 221255e422d..164658fb663 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Node.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Node.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -27,7 +27,7 @@ package javax.xml.soap; /** * A representation of a node (element) in an XML document. - * This interface extnends the standard DOM Node interface with methods for + * This interface extends the standard DOM Node interface with methods for * getting and setting the value of a node, for * getting and setting the parent of a node, and for removing a node. * @@ -59,6 +59,7 @@ public interface Node extends org.w3c.dom.Node { * there are no children in which case a child {@code Text} node will be * created. * + * @param value {@code value} to set on the {@code Text} node * @exception IllegalStateException if the node is not a {@code Text} * node and either has more than one child node or has a child * node that is not a {@code Text} node. diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJMetaFactory.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJMetaFactory.java index 4734e5689d1..109bc02e3ba 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJMetaFactory.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJMetaFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -29,7 +29,7 @@ package javax.xml.soap; * The access point for the implementation classes of the factories defined in the * SAAJ API. The {@code newInstance} methods defined on factories {@link SOAPFactory} and * {@link MessageFactory} in SAAJ 1.3 defer to instances of this class to do the actual object creation. -* The implementations of {@code newInstance()} methods (in SOAPFactory and MessageFactory) +* The implementations of {@code newInstance()} methods (in {@link SOAPFactory} and {@link MessageFactory}) * that existed in SAAJ 1.2 have been updated to also delegate to the SAAJMetaFactory when the SAAJ 1.2 * defined lookup fails to locate the Factory implementation class name. * @@ -94,7 +94,7 @@ public abstract class SAAJMetaFactory { } catch (Exception e) { throw new SOAPException( - "Unable to create SAAJ meta-factory" + e.getMessage()); + "Unable to create SAAJ meta-factory: " + e.getMessage()); } } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElement.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElement.java index 76ef0fb8ce7..c773003d6c5 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElement.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -277,7 +277,7 @@ public interface SOAPElement extends Node, org.w3c.dom.Element { * @see SOAPElement#getAllAttributesAsQNames() * @return an iterator over the names of the attributes */ - public Iterator getAllAttributes(); + public Iterator getAllAttributes(); /** * Returns an {@code Iterator} over all of the attributes @@ -290,7 +290,7 @@ public interface SOAPElement extends Node, org.w3c.dom.Element { * @see SOAPElement#getAllAttributes() * @since 1.6, SAAJ 1.3 */ - public Iterator getAllAttributesAsQNames(); + public Iterator getAllAttributesAsQNames(); /** @@ -312,7 +312,7 @@ public interface SOAPElement extends Node, org.w3c.dom.Element { * @return an iterator over the namespace prefixes in this * {@code SOAPElement} object */ - public Iterator getNamespacePrefixes(); + public Iterator getNamespacePrefixes(); /** * Returns an {@code Iterator} over the namespace prefix @@ -325,7 +325,7 @@ public interface SOAPElement extends Node, org.w3c.dom.Element { * * @since 1.6, SAAJ 1.2 */ - public Iterator getVisibleNamespacePrefixes(); + public Iterator getVisibleNamespacePrefixes(); /** * Creates a {@code QName} whose namespace URI is the one associated @@ -429,7 +429,7 @@ public interface SOAPElement extends Node, org.w3c.dom.Element { * {@link Node}s of this element. This includes {@code javax.xml.soap.Text} * objects as well as {@code SOAPElement} objects. *

    - * Calling this method may cause child {@code Element}, + * Calling this method must cause child {@code Element}, * {@code SOAPElement} and {@code org.w3c.dom.Text} nodes to be * replaced by {@code SOAPElement}, {@code SOAPHeaderElement}, * {@code SOAPBodyElement} or {@code javax.xml.soap.Text} nodes as @@ -444,14 +444,14 @@ public interface SOAPElement extends Node, org.w3c.dom.Element { * @return an iterator with the content of this {@code SOAPElement} * object */ - public Iterator getChildElements(); + public Iterator getChildElements(); /** * Returns an {@code Iterator} over all the immediate child * {@link Node}s of this element with the specified name. All of these * children will be {@code SOAPElement} nodes. *

    - * Calling this method may cause child {@code Element}, + * Calling this method must cause child {@code Element}, * {@code SOAPElement} and {@code org.w3c.dom.Text} nodes to be * replaced by {@code SOAPElement}, {@code SOAPHeaderElement}, * {@code SOAPBodyElement} or {@code javax.xml.soap.Text} nodes as @@ -471,14 +471,14 @@ public interface SOAPElement extends Node, org.w3c.dom.Element { * specified name * @see SOAPElement#getChildElements(javax.xml.namespace.QName) */ - public Iterator getChildElements(Name name); + public Iterator getChildElements(Name name); /** * Returns an {@code Iterator} over all the immediate child * {@link Node}s of this element with the specified qname. All of these * children will be {@code SOAPElement} nodes. *

    - * Calling this method may cause child {@code Element}, + * Calling this method must cause child {@code Element}, * {@code SOAPElement} and {@code org.w3c.dom.Text} nodes to be * replaced by {@code SOAPElement}, {@code SOAPHeaderElement}, * {@code SOAPBodyElement} or {@code javax.xml.soap.Text} nodes as @@ -499,7 +499,7 @@ public interface SOAPElement extends Node, org.w3c.dom.Element { * @see SOAPElement#getChildElements(Name) * @since 1.6, SAAJ 1.3 */ - public Iterator getChildElements(QName qname); + public Iterator getChildElements(QName qname); /** * Sets the encoding style for this {@code SOAPElement} object diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElementFactory.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElementFactory.java index 40b1b5e3af1..9be7c2cc301 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElementFactory.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElementFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -103,6 +103,9 @@ public class SOAPElementFactory { * @param uri a {@code String} giving the URI of the * namespace to which the new element belongs * + * @return the new {@code SOAPElement} object that was + * created + * * @exception SOAPException if there is an error in creating the * {@code SOAPElement} object * diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java index 5d76bf0d289..4e10e63af48 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -83,6 +83,9 @@ public class SOAPException extends Exception { /** * Constructs a {@code SOAPException} object initialized * with the given {@code Throwable} object. + * + * @param cause a {@code Throwable} object that is to + * be embedded in this {@code SOAPException} object */ public SOAPException(Throwable cause) { super(cause.toString()); @@ -103,6 +106,7 @@ public class SOAPException extends Exception { * message of the embedded {@code Throwable} object, * if there is one */ + @Override public String getMessage() { String message = super.getMessage(); if (message == null && cause != null) { @@ -121,6 +125,7 @@ public class SOAPException extends Exception { * if there is none */ + @Override public Throwable getCause() { return cause; } @@ -151,6 +156,7 @@ public class SOAPException extends Exception { * @throws IllegalStateException if the cause for this {@code SOAPException} object * has already been initialized */ + @Override public synchronized Throwable initCause(Throwable cause) { if (this.cause != null) { throw new IllegalStateException("Can't override cause"); diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFactory.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFactory.java index 8509bda21f1..14397cf8276 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFactory.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -150,6 +150,8 @@ public abstract class SOAPFactory { * @param prefix the prefix for this {@code SOAPElement} * @param uri a {@code String} giving the URI of the * namespace to which the new element belongs + * @return the new {@code SOAPElement} object that was + * created * * @exception SOAPException if there is an error in creating the * {@code SOAPElement} object diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFault.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFault.java index dd99c64841e..6ec2d3e774c 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFault.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -162,7 +162,7 @@ public interface SOAPFault extends SOAPBodyElement { * * @since 1.6, SAAJ 1.3 */ - public Iterator getFaultSubcodes(); + public Iterator getFaultSubcodes(); /** * Removes any Subcodes that may be contained by this @@ -381,7 +381,7 @@ public interface SOAPFault extends SOAPBodyElement { * * @since 1.6, SAAJ 1.3 */ - public Iterator getFaultReasonLocales() throws SOAPException; + public Iterator getFaultReasonLocales() throws SOAPException; /** * Returns an {@code Iterator} over a sequence of @@ -397,7 +397,7 @@ public interface SOAPFault extends SOAPBodyElement { * * @since 1.6, SAAJ 1.3 */ - public Iterator getFaultReasonTexts() throws SOAPException; + public Iterator getFaultReasonTexts() throws SOAPException; /** * Returns the Reason Text associated with the given {@code Locale}. @@ -468,6 +468,8 @@ public interface SOAPFault extends SOAPBodyElement { * this {@code SOAPFault} object. The Node element * is optional in SOAP 1.2. * + * @param uri - the URI of the Node + * * @exception SOAPException if there was an error in setting the * Node for this {@code SOAPFault} object. * @exception UnsupportedOperationException if this message does not diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeader.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeader.java index e555c3b5f4f..494cb21b073 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeader.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -118,7 +118,7 @@ public interface SOAPHeader extends SOAPElement { * * @since 1.6, SAAJ 1.2 */ - public Iterator examineMustUnderstandHeaderElements(String actor); + public Iterator examineMustUnderstandHeaderElements(String actor); /** * Returns an {@code Iterator} over all the {@code SOAPHeaderElement} objects @@ -144,7 +144,7 @@ public interface SOAPHeader extends SOAPElement { * @see #extractHeaderElements * @see SOAPConstants#URI_SOAP_ACTOR_NEXT */ - public Iterator examineHeaderElements(String actor); + public Iterator examineHeaderElements(String actor); /** * Returns an {@code Iterator} over all the {@code SOAPHeaderElement} objects @@ -168,7 +168,7 @@ public interface SOAPHeader extends SOAPElement { * @see #examineHeaderElements * @see SOAPConstants#URI_SOAP_ACTOR_NEXT */ - public Iterator extractHeaderElements(String actor); + public Iterator extractHeaderElements(String actor); /** * Creates a new NotUnderstood {@code SOAPHeaderElement} object initialized @@ -188,18 +188,18 @@ public interface SOAPHeader extends SOAPElement { /** * Creates a new Upgrade {@code SOAPHeaderElement} object initialized - * with the specified List of supported SOAP URIs and adds it to this - * {@code SOAPHeader} object. + * with the specified String Iterator of supported SOAP URIs and adds + * it to this {@code SOAPHeader} object. * This operation is supported on both SOAP 1.1 and SOAP 1.2 header. * - * @param supportedSOAPURIs an {@code Iterator} object with the URIs of SOAP + * @param supportedSOAPURIs an URI Strings {@code Iterator} of SOAP * versions supported. * @return the new {@code SOAPHeaderElement} object that was * inserted into this {@code SOAPHeader} object * @exception SOAPException if a SOAP error occurs. * @since 1.6, SAAJ 1.3 */ - public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSOAPURIs) + public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSOAPURIs) throws SOAPException; /** @@ -243,7 +243,7 @@ public interface SOAPHeader extends SOAPElement { * * @since 1.6, SAAJ 1.2 */ - public Iterator examineAllHeaderElements(); + public Iterator examineAllHeaderElements(); /** * Returns an {@code Iterator} over all the {@code SOAPHeaderElement} objects @@ -258,6 +258,6 @@ public interface SOAPHeader extends SOAPElement { * * @since 1.6, SAAJ 1.2 */ - public Iterator extractAllHeaderElements(); + public Iterator extractAllHeaderElements(); } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPMessage.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPMessage.java index d0476a65cb9..daa6e5b64fe 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPMessage.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -205,7 +205,7 @@ public abstract class SOAPMessage { * * @return an iterator over all the attachments in this message */ - public abstract Iterator getAttachments(); + public abstract Iterator getAttachments(); /** * Retrieves all the {@code AttachmentPart} objects that have header @@ -217,7 +217,7 @@ public abstract class SOAPMessage { * @return an iterator over all attachments that have a header that matches * one of the given headers */ - public abstract Iterator getAttachments(MimeHeaders headers); + public abstract Iterator getAttachments(MimeHeaders headers); /** * Removes all the {@code AttachmentPart} objects that have header @@ -266,12 +266,14 @@ public abstract class SOAPMessage { * object. An {@code AttachmentPart} object must be created before * it can be added to a message. * - * @param AttachmentPart - * an {@code AttachmentPart} object that is to become part + * @param attachmentPart + * an {@code attachmentPart} object that is to become part * of this {@code SOAPMessage} object * @exception IllegalArgumentException + * if there was a problem with the specified {@code attachmentPart} + * object */ - public abstract void addAttachmentPart(AttachmentPart AttachmentPart); + public abstract void addAttachmentPart(AttachmentPart attachmentPart); /** * Creates a new empty {@code AttachmentPart} object. Note that the diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java index 099a2e9caba..811a8702585 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -213,7 +213,7 @@ public abstract class SOAPPart implements org.w3c.dom.Document, Node { * @return an {@code Iterator} object with all of the Mime * headers for this {@code SOAPPart} object */ - public abstract Iterator getAllMimeHeaders(); + public abstract Iterator getAllMimeHeaders(); /** * Retrieves all {@code MimeHeader} objects that match a name in @@ -224,7 +224,7 @@ public abstract class SOAPPart implements org.w3c.dom.Document, Node { * @return all of the MIME headers that match one of the names in the * given array, returned as an {@code Iterator} object */ - public abstract Iterator getMatchingMimeHeaders(String[] names); + public abstract Iterator getMatchingMimeHeaders(String[] names); /** * Retrieves all {@code MimeHeader} objects whose name does @@ -237,7 +237,7 @@ public abstract class SOAPPart implements org.w3c.dom.Document, Node { * given array. The nonmatching MIME headers are returned as an * {@code Iterator} object. */ - public abstract Iterator getNonMatchingMimeHeaders(String[] names); + public abstract Iterator getNonMatchingMimeHeaders(String[] names); /** * Sets the content of the {@code SOAPEnvelope} object with the data diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/ServiceLoaderUtil.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/ServiceLoaderUtil.java index ebd4bdc3a95..ae78cd883a9 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/ServiceLoaderUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/ServiceLoaderUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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,8 +46,7 @@ class ServiceLoaderUtil { ServiceLoader

    serviceLoader = ServiceLoader.load(spiClass); for (P impl : serviceLoader) { - logger.fine("ServiceProvider loading Facility used; returning object [" + - impl.getClass().getName() + "]"); + logger.log(Level.FINE, "ServiceProvider loading Facility used; returning object [{0}]", impl.getClass().getName()); return impl; } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/package-info.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/package-info.java index 678635a67f9..51d856f646d 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/package-info.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -25,8 +25,7 @@ /** * Provides the API for creating and building SOAP messages. This package - * is defined in the SOAP with Attachments API for JavaTM - * (SAAJ) 1.4 specification. + * is defined in the SOAP with Attachments API for Java™ (SAAJ) 1.4 specification. * *

    The API in the javax.xml.soap package allows you to do the following: * diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Action.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Action.java index 445f651c893..a54fd50c070 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Action.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Action.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -129,12 +129,16 @@ public @interface Action { /** * Explicit value of the WS-Addressing {@code Action} message addressing property for the {@code input} * message of the operation. + * + * @return {@code Action} message addressing property for the {@code input} message */ String input() default ""; /** * Explicit value of the WS-Addressing {@code Action} message addressing property for the {@code output} * message of the operation. + * + * @return {@code Action} message addressing property for the {@code output} message */ String output() default ""; @@ -143,6 +147,8 @@ public @interface Action { * message(s) of the operation. Each exception that is mapped to a fault and requires an explicit WS-Addressing * {@code Action} message addressing property, needs to be specified as a value in this property * using {@link FaultAction} annotation. + * + * @return {@code Action} message addressing property for the {@code fault} message(s) */ FaultAction[] fault() default { }; } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/AsyncHandler.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/AsyncHandler.java index dd9c9a547a1..7b887cd1d0e 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/AsyncHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/AsyncHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -29,6 +29,7 @@ package javax.xml.ws; * clients that wish to receive callback notification of the completion of * service endpoint operations invoked asynchronously. * + * @param The type of the message or payload * @since 1.6, JAX-WS 2.0 **/ public interface AsyncHandler { diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/BindingProvider.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/BindingProvider.java index 2dd90644670..607d067cb9c 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/BindingProvider.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/BindingProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -164,6 +164,7 @@ public interface BindingProvider { * this {@code BindingProvider} instance. The instance * returned will be of type {@code clazz}. * + * @param the type of {@code EndpointReference} * @param clazz Specifies the type of {@code EndpointReference} * that MUST be returned. diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/BindingType.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/BindingType.java index 00e7b69cc6a..ff823800514 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/BindingType.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/BindingType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -30,13 +30,15 @@ import java.lang.annotation.Target; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import javax.xml.ws.http.HTTPBinding; +import javax.xml.ws.soap.SOAPBinding; /** * The {@code BindingType} annotation is used to * specify the binding to use for a web service * endpoint implementation class. *

    - * This annotation may be overriden programmatically or via + * This annotation may be overridden programmatically or via * deployment descriptors, depending on the platform in use. * * @since 1.6, JAX-WS 2.0 @@ -47,12 +49,11 @@ import java.lang.annotation.RetentionPolicy; @Documented public @interface BindingType { /** - * A binding identifier (a URI). - * If not specified, the default is the SOAP 1.1 / HTTP binding. - *

    - * See the {@code SOAPBinding} and {@code HTTPBinding} + * A binding identifier (a URI). If not specified, the default is the SOAP 1.1 / HTTP binding.
    + * See the {@link SOAPBinding} and {@link HTTPBinding} * for the definition of the standard binding identifiers. * + * @return A binding identifier (a URI) * @see javax.xml.ws.Binding * @see javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING * @see javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Dispatch.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Dispatch.java index 8bef4ee4cf5..f15163ec569 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Dispatch.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Dispatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -27,12 +27,14 @@ package javax.xml.ws; import java.util.concurrent.Future; + /** The {@code Dispatch} interface provides support * for the dynamic invocation of a service endpoint operations. The * {@code javax.xml.ws.Service} * class acts as a factory for the creation of {@code Dispatch} * instances. * + * @param The type of the message or payload * @since 1.6, JAX-WS 2.0 **/ public interface Dispatch extends BindingProvider { diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Endpoint.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Endpoint.java index f588409759e..78b8a72ea85 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Endpoint.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Endpoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -81,7 +81,6 @@ public abstract class Endpoint { **/ public static final String WSDL_PORT = "javax.xml.ws.wsdl.port"; - /** * Creates an endpoint with the specified implementor object. If there is * a binding specified via a BindingType annotation then it MUST be used else @@ -272,7 +271,6 @@ public abstract class Endpoint { return Provider.provider().createAndPublishEndpoint(address, implementor, features); } - /** * Publishes this endpoint at the provided server context. * A server context encapsulates the server infrastructure @@ -406,7 +404,6 @@ public abstract class Endpoint { **/ public abstract void setExecutor(java.util.concurrent.Executor executor); - /** * Returns the property bag for this {@code Endpoint} instance. * @@ -450,11 +447,11 @@ public abstract class Endpoint { **/ public abstract EndpointReference getEndpointReference(Element... referenceParameters); - /** * Returns the {@code EndpointReference} associated with * this {@code Endpoint} instance. * + * @param The type of EndpointReference. * @param clazz Specifies the type of EndpointReference that MUST be returned. * @param referenceParameters Reference parameters to be associated with the * returned {@code EndpointReference} instance. @@ -478,7 +475,7 @@ public abstract class Endpoint { Element... referenceParameters); /** - * By settng a {@code EndpointContext}, JAX-WS runtime knows about + * By setting a {@code EndpointContext}, JAX-WS runtime knows about * addresses of other endpoints in an application. If multiple endpoints * share different ports of a WSDL, then the multiple port addresses * are patched when the WSDL is accessed. diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/EndpointReference.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/EndpointReference.java index 163cfbdfd61..46d2317a5eb 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/EndpointReference.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/EndpointReference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -88,6 +88,10 @@ public abstract class EndpointReference { // //Default constructor to be only called by derived types. // + + /** + * Default constructor. + */ protected EndpointReference(){} /** @@ -150,6 +154,7 @@ public abstract class EndpointReference { * method can be used to manually configure handlers for this port. * * + * @param Service endpoint interface * @param serviceEndpointInterface Service endpoint interface * @param features An array of {@code WebServiceFeatures} to configure on the * proxy. Supported features not in the {@code features @@ -183,7 +188,10 @@ public abstract class EndpointReference { /** * Displays EPR infoset for debugging convenience. + * + * @return a string representation of the object */ + @Override public String toString() { StringWriter w = new StringWriter(); writeTo(new StreamResult(w)); diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/FaultAction.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/FaultAction.java index 7fd4eff7f7e..9b654837a4a 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/FaultAction.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/FaultAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -153,12 +153,16 @@ import java.lang.annotation.Target; @Target(ElementType.METHOD) public @interface FaultAction { /** - * Name of the exception class + * Name of the exception class. + * + * @return the name of the exception class */ Class className(); /** - * Value of WS-Addressing {@code Action} message addressing property for the exception + * Value of WS-Addressing {@code Action} message addressing property for the exception. + * + * @return WS-Addressing {@code Action} message addressing property for the exception */ String value() default ""; } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Holder.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Holder.java index 9b489750d4d..f2f77dba0f1 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Holder.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Holder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -30,6 +30,7 @@ import java.io.Serializable; /** * Holds a value of type {@code T}. * + * @param Type of the value in the holder. * @since 1.6, JAX-WS 2.0 */ public final class Holder implements Serializable { diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Provider.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Provider.java index e9772efc0dc..a9b8dc26120 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Provider.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Provider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -38,6 +38,7 @@ package javax.xml.ws; * the {@code Provider} instance will receive entire protocol messages * or just message payloads. * + * @param The type of the request * @since 1.6, JAX-WS 2.0 * * @see javax.xml.transform.Source @@ -46,7 +47,7 @@ package javax.xml.ws; **/ public interface Provider { - /** Invokes an operation occording to the contents of the request + /** Invokes an operation according to the contents of the request * message. * * @param request The request message or message payload. diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/RequestWrapper.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/RequestWrapper.java index becf6057842..9466f5fae47 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/RequestWrapper.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/RequestWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -49,22 +49,26 @@ import java.lang.annotation.RetentionPolicy; public @interface RequestWrapper { /** * Element's local name. + * @return local name */ public String localName() default ""; /** * Element's namespace name. + * @return target namespace name */ public String targetNamespace() default ""; /** * Request wrapper bean name. + * @return bean name */ public String className() default ""; /** * wsdl:part name for the wrapper part * + * @return wsdl:part name * @since 1.7, JAX-WS 2.2 */ public String partName() default ""; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/RespectBinding.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/RespectBinding.java index d50de4830f6..24f38c0140c 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/RespectBinding.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/RespectBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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,6 +63,8 @@ import javax.xml.ws.spi.WebServiceFeatureAnnotation; public @interface RespectBinding { /** * Specifies if this feature is enabled or disabled. + * + * @return {@code true} if this feature is enabled, {@code false} otherwise */ boolean enabled() default true; } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Response.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Response.java index 2b91ad51793..294b555c71d 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Response.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Response.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -36,9 +36,10 @@ import java.util.concurrent.Future; * to check the status of the request. The {@code get(...)} methods may * throw the standard * set of exceptions and their cause may be a {@code RemoteException} or a - * {@link WebServiceException} that represents the error that occured during the + * {@link WebServiceException} that represents the error that occurred during the * asynchronous method invocation.

    * + * @param The type of the response * @since 1.6, JAX-WS 2.0 **/ public interface Response extends Future { diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/ResponseWrapper.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/ResponseWrapper.java index 77e7fc26999..9c139cc99f3 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/ResponseWrapper.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/ResponseWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -49,22 +49,26 @@ public @interface ResponseWrapper { /** * Element's local name. + * @return local name */ public String localName() default ""; /** * Element's namespace name. + * @return target namespace name */ public String targetNamespace() default ""; /** * Response wrapper bean name. + * @return bean name */ public String className() default ""; /** * wsdl:part name for the wrapper part * + * @return wsdl:part name * @since 1.7, JAX-WS 2.2 */ public String partName() default ""; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Service.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Service.java index 7ce118698d1..1c1267429ca 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Service.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Service.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -71,14 +71,48 @@ public class Service { * access to entire protocol message, {@code PAYLOAD} to protocol message * payload only. **/ - public enum Mode { MESSAGE, PAYLOAD } + public enum Mode { + /** + * Message mode. + */ + MESSAGE, + + /** + * Payload mode. + */ + PAYLOAD } + + /** + * Creates a {@code Service}. + * + * The specified WSDL document location and service qualified name MUST + * uniquely identify a {@code wsdl:service} element. + * + * @param wsdlDocumentLocation {@code URL} for the WSDL document location + * for the service + * @param serviceName {@code QName} for the service + */ protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, this.getClass()); } + /** + * Creates a {@code Service}. The created instance is + * configured with the web service features. + * + * The specified WSDL document location and service qualified name MUST + * uniquely identify a {@code wsdl:service} element. + * + * @param wsdlDocumentLocation {@code URL} for the WSDL document location + * for the service + * @param serviceName {@code QName} for the service + * @param features Web Service features that must be configured on + * the service. If the provider doesn't understand a feature, + * it must throw a WebServiceException. + */ protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) { delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, @@ -93,6 +127,7 @@ public class Service { * specifies the service endpoint interface that is supported by * the created dynamic proxy instance. * + * @param Service endpoint interface. * @param portName Qualified name of the service endpoint in * the WSDL service description. * @param serviceEndpointInterface Service endpoint interface @@ -126,6 +161,7 @@ public class Service { * specifies the service endpoint interface that is supported by * the created dynamic proxy instance. * + * @param Service endpoint interface. * @param portName Qualified name of the service endpoint in * the WSDL service description. * @param serviceEndpointInterface Service endpoint interface @@ -170,6 +206,7 @@ public class Service { * binding (and a port) and configuring the proxy accordingly. * The returned proxy should not be reconfigured by the client. * + * @param Service endpoint interface. * @param serviceEndpointInterface Service endpoint interface. * @return Object instance that supports the * specified service endpoint interface. @@ -198,6 +235,7 @@ public class Service { * binding (and a port) and configuring the proxy accordingly. * The returned proxy should not be reconfigured by the client. * + * @param Service endpoint interface. * @param serviceEndpointInterface Service endpoint interface. * @param features A list of WebServiceFeatures to configure on the * proxy. Supported features not in the {@code features @@ -267,6 +305,7 @@ public class Service { * {@code serviceEndpointInterface} and the WSDL * associated with this {@code Service} instance. * + * @param Service endpoint interface. * @param endpointReference The {@code EndpointReference} * for the target service endpoint that will be invoked by the * returned proxy. @@ -328,6 +367,7 @@ public class Service { * Creates a {@code Dispatch} instance for use with objects of * the client's choosing. * + * @param The type of the message or payload * @param portName Qualified name for the target service endpoint * @param type The class of object used for messages or message * payloads. Implementations are required to support @@ -357,6 +397,7 @@ public class Service { * Creates a {@code Dispatch} instance for use with objects of * the client's choosing. * + * @param The type of the message or payload * @param portName Qualified name for the target service endpoint * @param type The class of object used for messages or message * payloads. Implementations are required to support @@ -419,6 +460,7 @@ public class Service { * where the {@code portName} is retrieved from the * WSDL or {@code EndpointReference} metadata. * + * @param The type of the message or payload * @param endpointReference The {@code EndpointReference} * for the target service endpoint that will be invoked by the * returned {@code Dispatch} object. @@ -698,6 +740,7 @@ public class Service { * @param wsdlDocumentLocation {@code URL} for the WSDL document location * for the service * @param serviceName {@code QName} for the service + * @return Service instance * @throws WebServiceException If any error in creation of the * specified service. **/ @@ -720,6 +763,7 @@ public class Service { * @param features Web Service features that must be configured on * the service. If the provider doesn't understand a feature, * it must throw a WebServiceException. + * @return Service instance configured with requested web service features * @throws WebServiceException If any error in creation of the * specified service. * @since 1.7, JAX-WS 2.2 @@ -734,6 +778,7 @@ public class Service { * Creates a {@code Service} instance. * * @param serviceName {@code QName} for the service + * @return Service instance * @throws WebServiceException If any error in creation of the * specified service */ @@ -749,6 +794,7 @@ public class Service { * @param features Web Service features that must be configured on * the service. If the provider doesn't understand a feature, * it must throw a WebServiceException. + * @return Service instance configured with requested web service features * @throws WebServiceException If any error in creation of the * specified service * diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/ServiceMode.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/ServiceMode.java index 5d0cb135918..de20e4479d9 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/ServiceMode.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/ServiceMode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -48,6 +48,8 @@ public @interface ServiceMode { * wishes to work with protocol message payloads only. {@code MESSAGE} indicates * that the {@code Provider} implementation wishes to work with entire protocol * messages. - **/ + * + * @return Service mode. + **/ public Service.Mode value() default Service.Mode.PAYLOAD; } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebEndpoint.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebEndpoint.java index f51d570643d..9978f0b1519 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebEndpoint.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -51,6 +51,8 @@ import java.lang.annotation.RetentionPolicy; public @interface WebEndpoint { /** * The local name of the endpoint. + * + * @return ocal name of the endpoint **/ String name() default ""; } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceClient.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceClient.java index a37e4e84ee5..1bbd5d5bfa7 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceClient.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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,18 +46,24 @@ import java.lang.annotation.RetentionPolicy; @Retention(RetentionPolicy.RUNTIME) @Documented public @interface WebServiceClient { - /** - * The local name of the Web service. - **/ - String name() default ""; + /** + * The local name of the Web service. + * + * @return local name + */ + String name() default ""; - /** - * The namespace for the Web service. - **/ - String targetNamespace() default ""; + /** + * The namespace for the Web service. + * + * @return target namespace name + */ + String targetNamespace() default ""; - /** - * The location of the WSDL document for the service (a URL). - **/ - String wsdlLocation() default ""; + /** + * The location of the WSDL document for the service (a URL). + * + * @return location of the WSDL document (a URL) + */ + String wsdlLocation() default ""; } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceContext.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceContext.java index 0af63723568..77c4775eeb8 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceContext.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -128,6 +128,7 @@ public interface WebServiceContext { * Returns the {@code EndpointReference} associated with * this endpoint. * + * @param The type of {@code EndpointReference}. * @param clazz The type of {@code EndpointReference} that * MUST be returned. * @param referenceParameters Reference parameters to be associated with the diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceFeature.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceFeature.java index 8f4c6875d6c..745f03f8534 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceFeature.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -66,9 +66,10 @@ public abstract class WebServiceFeature { */ protected boolean enabled = false; - - protected WebServiceFeature(){} - + /** + * Default constructor. + */ + protected WebServiceFeature() {} /** * Returns {@code true} if this feature is enabled. diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceProvider.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceProvider.java index c2d48d2f5b9..67e39cd6554 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceProvider.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -42,21 +42,29 @@ import java.lang.annotation.RetentionPolicy; public @interface WebServiceProvider { /** * Location of the WSDL description for the service. + * + * @return location of the WSDL description */ String wsdlLocation() default ""; /** * Service name. + * + * @return service name */ String serviceName() default ""; /** * Target namespace for the service + * + * @return target namespace */ String targetNamespace() default ""; /** * Port name. + * + * @return port name */ String portName() default ""; } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceRef.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceRef.java index 477133fb039..3111ce4dbec 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceRef.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceRef.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -30,8 +30,10 @@ import javax.xml.ws.spi.WebServiceFeatureAnnotation; import java.lang.annotation.Documented; import java.lang.annotation.Target; import java.lang.annotation.ElementType; +import java.lang.annotation.Repeatable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import javax.annotation.Resource; /** * The {@code WebServiceRef} annotation is used to @@ -72,16 +74,17 @@ import java.lang.annotation.RetentionPolicy; * annotation annotated with the {@code WebServiceFeatureAnnotation} * that is specified with {@code WebServiceRef}, an ERROR MUST be given. * - * @see javax.annotation.Resource + * @see Resource * @see WebServiceFeatureAnnotation * * @since 1.6, JAX-WS 2.0 * -**/ + **/ @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) @Documented +@Repeatable(WebServiceRefs.class) public @interface WebServiceRef { /** * The JNDI name of the resource. For field annotations, @@ -92,6 +95,8 @@ public @interface WebServiceRef { * * The JNDI name can be absolute(with any logical namespace) or relative * to JNDI {@code java:comp/env} namespace. + * + * @return absolute or relative JNDI name */ String name() default ""; @@ -101,6 +106,8 @@ public @interface WebServiceRef { * the default is the type of the JavaBeans property. * For class annotations, there is no default and this MUST be * specified. + * + * @return type of the resource */ Class type() default Object.class; @@ -119,6 +126,8 @@ public @interface WebServiceRef { * form or type of mapped name, nor the ability to use mapped names. * The mapped name is product-dependent and often installation-dependent. * No use of a mapped name is portable. + * + * @return product specific resource name */ String mappedName() default ""; @@ -126,16 +135,20 @@ public @interface WebServiceRef { * The service class, always a type extending * {@code javax.xml.ws.Service}. This element MUST be specified * whenever the type of the reference is a service endpoint interface. + * + * @return the service class extending {@code javax.xml.ws.Service} */ - // 2.1 has Class value() default Object.class; - // Fixing this raw Class type correctly in 2.2 API. This shouldn't cause - // any compatibility issues for applications. + // 2.1 has Class value() default Object.class; + // Fixing this raw Class type correctly in 2.2 API. This shouldn't cause + // any compatibility issues for applications. Class value() default Service.class; /** * A URL pointing to the WSDL document for the web service. * If not specified, the WSDL location specified by annotations * on the resource type is used instead. + * + * @return a URL pointing to the WSDL document */ String wsdlLocation() default ""; @@ -143,6 +156,7 @@ public @interface WebServiceRef { * A portable JNDI lookup name that resolves to the target * web service reference. * + * @return portable JNDI lookup name * @since 1.7, JAX-WS 2.2 */ String lookup() default ""; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceRefs.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceRefs.java index fd29f4f5219..0cba6457f67 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceRefs.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServiceRefs.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -78,6 +78,8 @@ import static java.lang.annotation.RetentionPolicy.*; public @interface WebServiceRefs { /** * Array used for multiple web service reference declarations. + * + * @return multiple web service reference declarations */ WebServiceRef[] value(); } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/Handler.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/Handler.java index 045413ec8c3..25a7dbeaa59 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/Handler.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/Handler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -26,11 +26,11 @@ package javax.xml.ws.handler; import javax.xml.ws.ProtocolException; -import javax.xml.ws.handler.MessageContext; /** The {@code Handler} interface * is the base interface for JAX-WS handlers. * + * @param message context * @since 1.6, JAX-WS 2.0 **/ public interface Handler { diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/LogicalHandler.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/LogicalHandler.java index 8c713a819c1..c13712a0ffe 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/LogicalHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/LogicalHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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,6 +28,7 @@ package javax.xml.ws.handler; /** The {@code LogicalHandler} extends * Handler to provide typesafety for the message context parameter. * + * @param message context * @since 1.6, JAX-WS 2.0 **/ public interface LogicalHandler extends Handler { diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/MessageContext.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/MessageContext.java index aab8550dead..76c5e5e1d54 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/MessageContext.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/MessageContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -180,7 +180,17 @@ public interface MessageContext extends Map { * {@code HANDLER} * are only normally visible to handlers. */ - public enum Scope {APPLICATION, HANDLER}; + public enum Scope { + + /** + * Application visibility. + */ + APPLICATION, + + /** + * Handler visibility. + */ + HANDLER}; /** * Sets the scope of a property. diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/package-info.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/package-info.java new file mode 100644 index 00000000000..08c9db7e079 --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package defines APIs for message handlers. + */ +package javax.xml.ws.handler; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/package.html b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/package.html deleted file mode 100644 index 483b45ec7e9..00000000000 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -This package defines APIs for message handlers. - - diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/soap/SOAPHandler.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/soap/SOAPHandler.java index 742c5335098..d76ff9b9364 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/soap/SOAPHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/soap/SOAPHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -33,6 +33,7 @@ import java.util.Set; * to provide typesafety for the message context parameter and add a method * to obtain access to the headers that may be processed by the handler. * + * @param message context * @since 1.6, JAX-WS 2.0 **/ public interface SOAPHandler diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/soap/package-info.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/soap/package-info.java new file mode 100644 index 00000000000..ed794064096 --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/soap/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package defines APIs for SOAP message handlers. + */ +package javax.xml.ws.handler.soap; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/soap/package.html b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/soap/package.html deleted file mode 100644 index 862b416b167..00000000000 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/soap/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -This package defines APIs for SOAP message handlers. - - diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/http/package-info.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/http/package-info.java new file mode 100644 index 00000000000..8c0e4b09979 --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/http/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package defines APIs specific to the HTTP binding. + */ +package javax.xml.ws.http; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/http/package.html b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/http/package.html deleted file mode 100644 index bc9020d3a3d..00000000000 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/http/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -This package defines APIs specific to the HTTP binding. - - diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/Addressing.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/Addressing.java index fd26ba1dfe6..0c79833556e 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/Addressing.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/Addressing.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -31,9 +31,7 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import javax.xml.ws.BindingProvider; import javax.xml.ws.WebServiceRef; -import javax.xml.ws.WebServiceRefs; import javax.xml.ws.WebServiceProvider; import javax.xml.ws.soap.AddressingFeature.Responses; import javax.xml.ws.spi.WebServiceFeatureAnnotation; @@ -44,7 +42,7 @@ import javax.xml.ws.spi.WebServiceFeatureAnnotation; * with any other binding is undefined. *

    * This annotation MUST only be used in conjunction with the - * {@link javax.jws.WebService}, {@link WebServiceProvider}, + * {@code javax.jws.WebService}, {@link WebServiceProvider}, * and {@link WebServiceRef} annotations. * When used with a {@code javax.jws.WebService} annotation, this * annotation MUST only be used on the service endpoint implementation @@ -70,6 +68,8 @@ public @interface Addressing { * Corresponding * * 3.1.1 Addressing Assertion must be generated in the generated WSDL. + * + * @return {@code true} if endpoint supports WS-Addressing, {@code false} otherwise */ boolean enabled() default true; @@ -80,6 +80,8 @@ public @interface Addressing { * be present on incoming messages. A corresponding * * 3.1.1 Addressing Assertion must be generated in the WSDL. + * + * @return {@code true} if endpoint requires WS-Addressing, {@code false} otherwise */ boolean required() default false; @@ -106,6 +108,7 @@ public @interface Addressing { * * 3.1.3 NonAnonymousResponses Assertion in the generated WSDL. * + * @return supported response types * @since 1.7, JAX-WS 2.2 */ Responses responses() default Responses.ALL; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/MTOM.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/MTOM.java index cd59f0ffcbb..b3d2f0dc56f 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/MTOM.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/MTOM.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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,6 +63,8 @@ import javax.xml.ws.WebServiceProvider; public @interface MTOM { /** * Specifies if this feature is enabled or disabled. + * + * @return {@code true} if MTOM is supported, {@code false} otherwise */ boolean enabled() default true; @@ -70,6 +72,8 @@ public @interface MTOM { * Property for MTOM threshold value. When MTOM is enabled, binary data above this * size in bytes will be XOP encoded or sent as attachment. The value of this property * MUST always be {@literal >=} 0. Default value is 0. + * + * @return MTOM threshold in bytes */ int threshold() default 0; } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/package-info.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/package-info.java new file mode 100644 index 00000000000..fc7f3859bbf --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package defines APIs specific to the SOAP binding. + */ +package javax.xml.ws.soap; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/package.html b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/package.html deleted file mode 100644 index abc85e703ee..00000000000 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -This package defines APIs specific to the SOAP binding. - - diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/Provider.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/Provider.java index 121409f7413..de8a01f111a 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/Provider.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/Provider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -25,11 +25,8 @@ package javax.xml.ws.spi; -import java.net.URL; import java.util.List; -import java.util.Iterator; import java.util.Map; -import java.util.ServiceLoader; import javax.xml.namespace.QName; import javax.xml.ws.*; import javax.xml.ws.wsaddressing.W3CEndpointReference; @@ -77,6 +74,7 @@ public abstract class Provider { *

  • Finally, a platform default implementation is used. * * + * @return provider object */ public static Provider provider() { try { @@ -123,7 +121,6 @@ public abstract class Provider { throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour."); } - /** * * Creates an endpoint object with the provided binding and implementation @@ -139,7 +136,6 @@ public abstract class Provider { public abstract Endpoint createEndpoint(String bindingId, Object implementor); - /** * Creates and publishes an endpoint object with the specified * address and implementation object. @@ -199,6 +195,7 @@ public abstract class Provider { * {@code serviceName} metadata. * * + * @param Service endpoint interface * @param endpointReference the EndpointReference that will * be invoked by the returned proxy. * @param serviceEndpointInterface Service endpoint interface diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/ServiceDelegate.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/ServiceDelegate.java index 49954ba8d88..d3127f301d6 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/ServiceDelegate.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/ServiceDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -51,6 +51,9 @@ import javax.xml.ws.WebServiceException; */ public abstract class ServiceDelegate { + /** + * Default constructor. + */ protected ServiceDelegate() { } @@ -61,6 +64,7 @@ public abstract class ServiceDelegate { * specifies the service endpoint interface that is supported by * the created dynamic proxy instance. * + * @param Service endpoint interface * @param portName Qualified name of the service endpoint in * the WSDL service description * @param serviceEndpointInterface Service endpoint interface @@ -92,6 +96,7 @@ public abstract class ServiceDelegate { * specifies the service endpoint interface that is supported by * the created dynamic proxy instance. * + * @param Service endpoint interface * @param portName Qualified name of the service endpoint in * the WSDL service description * @param serviceEndpointInterface Service endpoint interface @@ -164,6 +169,7 @@ public abstract class ServiceDelegate { * {@code serviceEndpointInterface} and the WSDL * associated with this {@code Service} instance. * + * @param Service endpoint interface. * @param endpointReference The {@code EndpointReference} * for the target service endpoint that will be invoked by the * returned proxy. @@ -209,6 +215,7 @@ public abstract class ServiceDelegate { * binding (and a port) and configuring the proxy accordingly. * The returned proxy should not be reconfigured by the client. * + * @param Service endpoint interface * @param serviceEndpointInterface Service endpoint interface * @return Object instance that supports the * specified service endpoint interface @@ -235,6 +242,7 @@ public abstract class ServiceDelegate { * binding (and a port) and configuring the proxy accordingly. * The returned proxy should not be reconfigured by the client. * + * @param Service endpoint interface * @param serviceEndpointInterface Service endpoint interface * @param features An array of {@code WebServiceFeatures} to configure on the * proxy. Supported features not in the {@code features @@ -286,6 +294,8 @@ public abstract class ServiceDelegate { * Creates a {@code Dispatch} instance for use with objects of * the user's choosing. * + * @param type used for messages or message payloads. Implementations are required to + * support {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}. * @param portName Qualified name for the target service endpoint * @param type The class of object used for messages or message * payloads. Implementations are required to support @@ -310,6 +320,8 @@ public abstract class ServiceDelegate { * Creates a {@code Dispatch} instance for use with objects of * the user's choosing. * + * @param type used for messages or message payloads. Implementations are required to + * support {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}. * @param portName Qualified name for the target service endpoint * @param type The class of object used for messages or message * payloads. Implementations are required to support @@ -369,6 +381,9 @@ public abstract class ServiceDelegate { * where the {@code portName} is retrieved from the * WSDL or {@code EndpointReference} metadata. * + * @param type of object used to messages or message + * payloads. Implementations are required to support + * {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}. * @param endpointReference The {@code EndpointReference} * for the target service endpoint that will be invoked by the * returned {@code Dispatch} object. diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java index 74423670e4e..a60784edebb 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -32,7 +32,6 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import javax.xml.ws.WebServiceFeature; import javax.xml.ws.WebServiceRef; -import javax.xml.ws.WebServiceRefs; import javax.xml.ws.RespectBinding; import javax.xml.ws.soap.Addressing; import javax.xml.ws.soap.MTOM; @@ -74,12 +73,14 @@ public @interface WebServiceFeatureAnnotation { * Unique identifier for the WebServiceFeature. This * identifier MUST be unique across all implementations * of JAX-WS. + * @return unique identifier for the WebServiceFeature */ String id(); /** * The {@code WebServiceFeature} bean that is associated * with the {@code WebServiceFeature} annotation + * @return the {@code WebServiceFeature} bean */ Class bean(); } diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/http/HttpContext.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/http/HttpContext.java index f62458455ac..211e9441161 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/http/HttpContext.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/http/HttpContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +41,9 @@ import java.util.Set; */ public abstract class HttpContext { + /** + * The handler to set for this context. + */ protected HttpHandler handler; /** diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/package-info.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/package-info.java new file mode 100644 index 00000000000..ec642e76331 --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * This package defines SPIs for JAX-WS. + */ +package javax.xml.ws.spi; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/package.html b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/package.html deleted file mode 100644 index e269ef9b53c..00000000000 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -This package defines SPIs for JAX-WS. - - diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java index 0a9a0cfe429..b3638847e51 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -72,10 +72,18 @@ public final class W3CEndpointReference extends EndpointReference { private final JAXBContext w3cjc = getW3CJaxbContext(); // should be changed to package private, keeping original modifier to keep backwards compatibility + + /** + * Addressing namespace. + */ protected static final String NS = "http://www.w3.org/2005/08/addressing"; // default constructor forbidden ... // should be private, keeping original modifier to keep backwards compatibility + + /** + * Default constructor. + */ protected W3CEndpointReference() { } @@ -110,6 +118,7 @@ public final class W3CEndpointReference extends EndpointReference { /** * {@inheritDoc} */ + @Override public void writeTo(Result result){ try { Marshaller marshaller = w3cjc.createMarshaller(); diff --git a/jaxws/src/java.xml.ws/share/classes/module-info.java b/jaxws/src/java.xml.ws/share/classes/module-info.java index 4a0175eeae2..0fcd8120181 100644 --- a/jaxws/src/java.xml.ws/share/classes/module-info.java +++ b/jaxws/src/java.xml.ws/share/classes/module-info.java @@ -26,22 +26,30 @@ /** * Defines the Java API for XML-Based Web Services (JAX-WS), and * the Web Services Metadata API. + * + *

    This module is upgradeable. + * + * @uses javax.xml.soap.MessageFactory + * @uses javax.xml.soap.SAAJMetaFactory + * @uses javax.xml.soap.SOAPConnectionFactory + * @uses javax.xml.soap.SOAPFactory + * @uses javax.xml.ws.spi.Provider + * + * @moduleGraph + * @since 9 */ +@Deprecated(since="9", forRemoval=true) module java.xml.ws { - requires transitive java.activation; - requires transitive java.xml; - requires transitive java.xml.bind; - requires java.xml.ws.annotation; requires java.desktop; requires java.logging; requires java.management; + requires java.xml.ws.annotation; requires jdk.httpserver; + requires jdk.unsupported; - uses javax.xml.ws.spi.Provider; - uses javax.xml.soap.MessageFactory; - uses javax.xml.soap.SAAJMetaFactory; - uses javax.xml.soap.SOAPConnectionFactory; - uses javax.xml.soap.SOAPFactory; + requires transitive java.activation; + requires transitive java.xml; + requires transitive java.xml.bind; exports javax.jws; exports javax.jws.soap; @@ -55,8 +63,6 @@ module java.xml.ws { exports javax.xml.ws.spi.http; exports javax.xml.ws.wsaddressing; - opens javax.xml.ws.wsaddressing to java.xml.bind; - exports com.oracle.webservices.internal.api.databinding to jdk.xml.ws; exports com.sun.xml.internal.ws.addressing to @@ -102,6 +108,13 @@ module java.xml.ws { jdk.xml.ws; exports com.sun.xml.internal.ws.wsdl.writer to jdk.xml.ws; + // JAF data handlers + exports com.sun.xml.internal.messaging.saaj.soap to + java.activation; + exports com.sun.xml.internal.ws.encoding to + java.activation; + + opens javax.xml.ws.wsaddressing to java.xml.bind; // XML document content needs to be exported opens com.sun.xml.internal.ws.runtime.config to java.xml.bind; @@ -109,13 +122,23 @@ module java.xml.ws { // com.sun.xml.internal.ws.fault.SOAPFaultBuilder uses JAXBContext.newInstance opens com.sun.xml.internal.ws.fault to java.xml.bind; - // classes passed to JAXBContext.newInstance for deep reflection + // com.sun.xml.internal.ws.addressing.WsaTubeHelperImpl uses JAXBContext.newInstance opens com.sun.xml.internal.ws.addressing to java.xml.bind; - // JAF data handlers - exports com.sun.xml.internal.messaging.saaj.soap to - java.activation; - exports com.sun.xml.internal.ws.encoding to - java.activation; + // com.sun.xml.internal.ws.addressing.v200408.WsaTubeHelperImpl uses JAXBContext.newInstance + opens com.sun.xml.internal.ws.addressing.v200408 to java.xml.bind; + + // com.sun.xml.ws.developer.MemberSubmissionEndpointReference uses JAXBContext.newInstance + opens com.sun.xml.internal.ws.developer to java.xml.bind; + + // com.sun.xml.ws.model.ExternalMetadataReader uses JAXBContext.newInstance + opens com.oracle.xmlns.internal.webservices.jaxws_databinding to java.xml.bind; + + + uses javax.xml.ws.spi.Provider; + uses javax.xml.soap.MessageFactory; + uses javax.xml.soap.SAAJMetaFactory; + uses javax.xml.soap.SOAPConnectionFactory; + uses javax.xml.soap.SOAPFactory; } diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java index 1af2c5d9a31..fe7813ebc4e 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -85,8 +85,8 @@ public class JJavaName { * ("my_children","MyChildren","myChildren", and "MY-CHILDREN", "CODE003-children" respectively) *

    * Although this method only works for English words, it handles non-English - * words gracefully (by just returning it as-is.) For example, "日本語" - * will be returned as-is without modified, not "日本語s" + * words gracefully (by just returning it as-is.) For example, "{@literal 日本語}" + * will be returned as-is without modified, not "{@literal 日本語s}" *

    * This method doesn't handle suffixes very well. For example, passing * "person56" will return "person56s", not "people56". diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JModuleDirective.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JModuleDirective.java index 472aa508b28..5c22491eb3b 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JModuleDirective.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JModuleDirective.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -94,14 +94,17 @@ public abstract class JModuleDirective { /** * Returns a hash code for this module directive based on directive type and name. - * The hash code for a module directive is computed as

    -     * 97 * Integer.hashCode(type_ordinal_value + 1) + name.hashCode()
    -     * 
    using {@code int} arithmetic. + * The hash code for a module directive is computed as + *
    +     *     {@code 97 * (type_ordinal_value + 1) + name.hashCode()}
    +     * 
    + * using {@code int} arithmetic. + * * @return a hash code value for this object. */ @Override public int hashCode() { - return 97 * (Integer.hashCode(getType().ordinal() + 1)) + name.hashCode(); + return 97 * (getType().ordinal() + 1) + name.hashCode(); } /** diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java index 9a9fae31705..a824946273c 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,7 +37,7 @@ import java.io.Writer; * *

    * Note that this class doesn't escape other Unicode characters - * that are typically unsafe. For example, 愛 (A kanji + * that are typically unsafe. For example, {@literal 愛} (A kanji * that means "love") can be considered as unsafe because * javac with English Windows cannot accept this character in the * source code. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/DefaultAuthenticator.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/DefaultAuthenticator.java index d4feaeecb91..c149697ea1c 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/DefaultAuthenticator.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/DefaultAuthenticator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -33,6 +33,7 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.lang.reflect.Field; +import java.lang.reflect.Method; import java.net.Authenticator; import java.net.Authenticator.RequestorType; import java.net.MalformedURLException; @@ -42,6 +43,8 @@ import java.net.URLDecoder; import java.net.URLEncoder; import java.security.AccessController; import java.security.PrivilegedAction; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; @@ -56,11 +59,12 @@ import org.xml.sax.helpers.LocatorImpl; */ public class DefaultAuthenticator extends Authenticator { + private static final Logger LOGGER = Logger.getLogger(DefaultAuthenticator.class.getName()); private static DefaultAuthenticator instance; private static Authenticator systemAuthenticator = getCurrentAuthenticator(); private String proxyUser; private String proxyPasswd; - private final List authInfo = new ArrayList(); + private final List authInfo = new ArrayList<>(); private static int counter = 0; DefaultAuthenticator() { @@ -145,10 +149,7 @@ public class DefaultAuthenticator extends Authenticator { fi = new FileInputStream(f); is = new InputStreamReader(fi, "UTF-8"); in = new BufferedReader(is); - } catch (UnsupportedEncodingException e) { - listener.onError(e, locator); - return; - } catch (FileNotFoundException e) { + } catch (UnsupportedEncodingException | FileNotFoundException e) { listener.onError(e, locator); return; } @@ -170,7 +171,7 @@ public class DefaultAuthenticator extends Authenticator { } } catch (IOException e) { listener.onError(e, locator); - Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, e.getMessage(), e); + LOGGER.log(Level.SEVERE, e.getMessage(), e); } } finally { try { @@ -184,7 +185,7 @@ public class DefaultAuthenticator extends Authenticator { fi.close(); } } catch (IOException ex) { - Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, null, ex); + LOGGER.log(Level.SEVERE, null, ex); } } } @@ -225,6 +226,29 @@ public class DefaultAuthenticator extends Authenticator { } static Authenticator getCurrentAuthenticator() { + try { + return AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public Authenticator run() throws Exception { + Method method = Authenticator.class.getMethod("getDefault"); + return (Authenticator) method.invoke(null); + } + + }); + } catch (PrivilegedActionException pae) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, null, pae); + } + Exception ex = pae.getException(); + if (!(ex instanceof NoSuchMethodException)) { + // if Authenticator.getDefault has not been found, + // we likely didn't get through sec, so return null + // and don't care about JDK version we're on + return null; + } + // or we're on JDK <9, so let's continue the old way... + } + final Field f = getTheAuthenticator(); if (f == null) { return null; @@ -239,7 +263,7 @@ public class DefaultAuthenticator extends Authenticator { } }); return (Authenticator) f.get(null); - } catch (Exception ex) { + } catch (IllegalAccessException | IllegalArgumentException ex) { return null; } finally { AccessController.doPrivileged(new PrivilegedAction() { @@ -255,7 +279,7 @@ public class DefaultAuthenticator extends Authenticator { private static Field getTheAuthenticator() { try { return Authenticator.class.getDeclaredField("theAuthenticator"); - } catch (Exception ex) { + } catch (NoSuchFieldException | SecurityException ex) { return null; } } @@ -277,7 +301,7 @@ public class DefaultAuthenticator extends Authenticator { @Override public void onError(Exception e, Locator loc) { System.err.println(getLocationString(loc) + ": " + e.getMessage()); - Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, e.getMessage(), e); + LOGGER.log(Level.SEVERE, e.getMessage(), e); } private String getLocationString(Locator l) { diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/SecureLoader.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/SecureLoader.java index 4c08e4da25f..4061f18702d 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/SecureLoader.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/SecureLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,6 +25,9 @@ package com.sun.istack.internal.tools; +import java.security.AccessController; +import java.security.PrivilegedAction; + /** * Class defined for safe calls of getClassLoader methods of any kind (context/system/class * classloader. This MUST be package private and defined in every package which @@ -37,9 +40,10 @@ class SecureLoader { if (System.getSecurityManager() == null) { return Thread.currentThread().getContextClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ClassLoader run() { return Thread.currentThread().getContextClassLoader(); } }); @@ -50,9 +54,10 @@ class SecureLoader { if (System.getSecurityManager() == null) { return c.getClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ClassLoader run() { return c.getClassLoader(); } }); @@ -63,9 +68,10 @@ class SecureLoader { if (System.getSecurityManager() == null) { return ClassLoader.getSystemClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ClassLoader run() { return ClassLoader.getSystemClassLoader(); } }); @@ -76,9 +82,10 @@ class SecureLoader { if (System.getSecurityManager() == null) { return cl.getParent(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ClassLoader run() { return cl.getParent(); } }); @@ -89,9 +96,10 @@ class SecureLoader { if (System.getSecurityManager() == null) { Thread.currentThread().setContextClassLoader(cl); } else { - java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ClassLoader run() { Thread.currentThread().setContextClassLoader(cl); return null; } diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties index 0cc3e21ee84..aecb2773243 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -30,10 +30,10 @@ BASEDIR_DOESNT_EXIST = \ Non-existent directory: {0} VERSION = \ - schemagen 2.3.0-SNAPSHOT + schemagen 2.3.0-b170531.0717 FULLVERSION = \ - schemagen full version "2.3.0-SNAPSHOT" + schemagen full version "2.3.0-b170531.0717" USAGE = \ Usage: schemagen [-options ...] \n\ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties index 3158ce32236..f826e6297d5 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Nicht erkanntes {0} in Zeile {1} Spalte {2} BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170531.0717 -FULLVERSION = schemagen vollst\u00E4ndige Version "2.3.0-SNAPSHOT" +FULLVERSION = schemagen vollst\u00E4ndige Version "2.3.0-b170531.0717" USAGE = Verwendung: schemagen [-options ...] \nOptionen: \n\\ \\ \\ \\ -d : Gibt an, wo die von Prozessor und javac generierten Klassendateien gespeichert werden sollen\n\\ \\ \\ \\ -cp : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -classpath : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -encoding : Gibt die Codierung f\u00FCr die Annotationsverarbeitung/den javac-Aufruf an \n\\ \\ \\ \\ -episode : Generiert Episodendatei f\u00FCr separate Kompilierung\n\\ \\ \\ \\ -version : Zeigt Versionsinformation an\n\\ \\ \\ \\ -fullversion : Zeigt vollst\u00E4ndige Versionsinformationen an\n\\ \\ \\ \\ -help : Zeigt diese Verwendungsmeldung an diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties index 81d9274dc3c..063d107a602 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Aparece un {0} inesperado en la l\u00EDnea {1} y la colu BASEDIR_DOESNT_EXIST = Directorio no existente: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170531.0717 -FULLVERSION = versi\u00F3n completa de schemagen "2.3.0-SNAPSHOT" +FULLVERSION = versi\u00F3n completa de schemagen "2.3.0-b170531.0717" USAGE = Sintaxis: schemagen [-options ...] \nOpciones: \n\\ \\ \\ \\ -d : especifique d\u00F3nde se colocan los archivos de clase generados por javac y el procesador\n\\ \\ \\ \\ -cp : especifique d\u00F3nde se encuentran los archivos especificados por el usuario\n\\ \\ \\ \\ -encoding : especifique la codificaci\u00F3n que se va a utilizar para el procesamiento de anotaciones/llamada de javac\n\\ \\ \\ \\ -episode : genera un archivo de episodio para una compilaci\u00F3n diferente\n\\ \\ \\ \\ -version : muestra la informaci\u00F3n de la versi\u00F3n\n\\ \\ \\ \\ -fullversion : muestra la informaci\u00F3n completa de la versi\u00F3n\n\\ \\ \\ \\ -help : muestra este mensaje de sintaxis diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties index 597ce0e512b..b3f913c9772 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Un \u00E9l\u00E9ment {0} inattendu appara\u00EEt \u00E0 BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170531.0717 -FULLVERSION = version compl\u00E8te de schemagen "2.3.0-SNAPSHOT" +FULLVERSION = version compl\u00E8te de schemagen "2.3.0-b170531.0717" USAGE = Syntaxe : schemagen [-options ...] \nOptions : \n\ \ \ \ -d : indiquez o\u00F9 placer les fichiers de classe g\u00E9n\u00E9r\u00E9s par le processeur et le compilateur javac\n\ \ \ \ -cp : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -classpath : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -encoding : indiquez l'encodage \u00E0 utiliser pour l'appel de javac/traitement de l'annotation \n\ \ \ \ -episode : g\u00E9n\u00E9rez un fichier d'\u00E9pisode pour la compilation s\u00E9par\u00E9e\n\ \ \ \ -version : affichez les informations de version\n\ \ \ \ -fullversion : affichez les informations compl\u00E8tes de version\n\ \ \ \ -help : affichez ce message de syntaxe diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties index c7ef575e06e..37360925c4a 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = {0} imprevisto visualizzato sulla riga {1} colonna {2} BASEDIR_DOESNT_EXIST = Directory non esistente: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170531.0717 -FULLVERSION = versione completa schemagen "2.3.0-SNAPSHOT" +FULLVERSION = versione completa schemagen "2.3.0-b170531.0717" USAGE = Uso: schemagen [-options ...] \nOpzioni: \n\ \ \ \ -d : specifica dove posizionare il processore e i file della classe generata javac\n\ \ \ \ -cp : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -classpath : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -encoding : specifica la codifica da usare per l'elaborazione dell'annotazione/richiamo javac \n\ \ \ \ -episode : genera il file di episodio per la compilazione separata\n\ \ \ \ -version : visualizza le informazioni sulla versione\n\ \ \ \ -fullversion : visualizza le informazioni sulla versione completa\n\ \ \ \ -help : visualizza questo messaggio sull'uso diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties index e07c234ff85..0acac182736 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u4E88\u671F\u3057\u306A\u3044{0}\u304C\u884C{1}\u3001\u BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170531.0717 -FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-SNAPSHOT" +FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-b170531.0717" USAGE = \u4F7F\u7528\u65B9\u6CD5: schemagen [-options ...] \n\u30AA\u30D7\u30B7\u30E7\u30F3: \n\ \ \ \ -d : \u30D7\u30ED\u30BB\u30C3\u30B5\u304A\u3088\u3073javac\u304C\u751F\u6210\u3057\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u7F6E\u304F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -cp : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -classpath : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -encoding : \u6CE8\u91C8\u51E6\u7406/javac\u547C\u51FA\u3057\u306B\u4F7F\u7528\u3059\u308B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -episode : \u30B3\u30F3\u30D1\u30A4\u30EB\u3054\u3068\u306B\u30A8\u30D4\u30BD\u30FC\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059\n\ \ \ \ -version : \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -fullversion : \u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -help : \u3053\u306E\u4F7F\u7528\u4F8B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u307E\u3059 diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties index f4e5fa4d62e..4b585c25816 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \uC608\uC0C1\uCE58 \uC54A\uC740 {0}\uC774(\uAC00) {1}\uD BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170531.0717 -FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.3.0-SNAPSHOT" +FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.3.0-b170531.0717" USAGE = \uC0AC\uC6A9\uBC95: schemagen [-options ...] \n\uC635\uC158: \n\ \ \ \ -d : \uD504\uB85C\uC138\uC11C \uBC0F javac\uC5D0\uC11C \uC0DD\uC131\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uBC30\uCE58\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -cp : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -classpath : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -encoding : \uC8FC\uC11D \uCC98\uB9AC/javac \uD638\uCD9C\uC5D0 \uC0AC\uC6A9\uD560 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. \n\ \ \ \ -episode : \uBCC4\uB3C4 \uCEF4\uD30C\uC77C\uC744 \uC704\uD574 episode \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n\ \ \ \ -version : \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -fullversion : \uC815\uC2DD \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -help : \uC774 \uC0AC\uC6A9\uBC95 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties index d56ca3894d5..38d6da28b9b 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = {0} inesperado aparece na linha {1} coluna {2} BASEDIR_DOESNT_EXIST = Diret\u00F3rio n\u00E3o existente: {0} -VERSION = gera\u00E7\u00E3o do esquema 2.3.0-SNAPSHOT +VERSION = gera\u00E7\u00E3o do esquema 2.3.0-b170531.0717 -FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.3.0-SNAPSHOT" +FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.3.0-b170531.0717" USAGE = Uso: gera\u00E7\u00E3o do esquema [-options ...] \nOp\u00E7\u00F5es: \n\\ \\ \\ \\ -d : especificar onde colocar o processador e os arquivos da classe gerados por javac\n\\ \\ \\ \\ -cp : especificar onde localizar arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -classpath : especificar onde localizar os arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -encoding : especificar codifica\u00E7\u00E3o a ser usada para processamento de anota\u00E7\u00E3o/chamada javac \n\\ \\ \\ \\ -episode : gerar arquivo do epis\u00F3dio para compila\u00E7\u00E3o separada\n\\ \\ \\ \\ -version : exibir informa\u00E7\u00F5es da vers\u00E3o\n\\ \\ \\ \\ -fullversion : exibir informa\u00E7\u00F5es da vers\u00E3o completa\n\\ \\ \\ \\ -help : exibir esta mensagem de uso diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties index c1be9f0f704..896dc2d5480 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u5728\u7B2C {1} \u884C, \u7B2C {2} \u5217\u51FA\u73B0\u BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170531.0717 -FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" +FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-b170531.0717" USAGE = \u7528\u6CD5: schemagen [-options ...] \n\u9009\u9879: \n\ \ \ \ -d : \u6307\u5B9A\u653E\u7F6E\u5904\u7406\u7A0B\u5E8F\u548C javac \u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -cp : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -classpath : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -encoding : \u6307\u5B9A\u7528\u4E8E\u6CE8\u91CA\u5904\u7406/javac \u8C03\u7528\u7684\u7F16\u7801\n\ \ \ \ -episode : \u751F\u6210\u7247\u6BB5\u6587\u4EF6\u4EE5\u4F9B\u5355\u72EC\u7F16\u8BD1\n\ \ \ \ -version : \u663E\u793A\u7248\u672C\u4FE1\u606F\n\ \ \ \ -fullversion : \u663E\u793A\u5B8C\u6574\u7684\u7248\u672C\u4FE1\u606F\n\ \ \ \ -help : \u663E\u793A\u6B64\u7528\u6CD5\u6D88\u606F diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties index dcd7976be7c..6ffd45d8984 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u672A\u9810\u671F\u7684 {0} \u986F\u793A\u65BC\u884C {1 BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170531.0717 -FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" +FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-b170531.0717" USAGE = \u7528\u6CD5: schemagen [-options ...] \n\u9078\u9805: \n\\ \\ \\ \\ -d : \u6307\u5B9A\u8655\u7406\u5668\u4EE5\u53CA javac \u7522\u751F\u7684\u985E\u5225\u6A94\u6848\u653E\u7F6E\u4F4D\u7F6E\n\\ \\ \\ \\ -cp : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -classpath : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -encoding : \u6307\u5B9A\u8981\u7528\u65BC\u8A3B\u89E3\u8655\u7406/javac \u547C\u53EB\u7684\u7DE8\u78BC \n\\ \\ \\ \\ -episode : \u7522\u751F\u7368\u7ACB\u7DE8\u8B6F\u7684\u4E8B\u4EF6 (episode) \u6A94\u6848\n\\ \\ \\ \\ -version : \u986F\u793A\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -fullversion : \u986F\u793A\u5B8C\u6574\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -help : \u986F\u793A\u6B64\u7528\u6CD5\u8A0A\u606F diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package-info.java new file mode 100644 index 00000000000..52b29b23e93 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package-info.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Annotation Processing related code. + * + * This package hosts a driver that runs annotation processing for java-to-schema processing, + * and additional implementations that deal primarily with AP. + */ +package com.sun.tools.internal.jxc.ap; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package.html deleted file mode 100644 index 8f893b55ef2..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - Annotation Processing related code. - - This package hosts a driver that runs annotation processing for java-to-schema processing, - and additional implementations that deal primarily with AP. - - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/CatalogUtil.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/CatalogUtil.java new file mode 100644 index 00000000000..0d3dbc5839f --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/CatalogUtil.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.tools.internal.xjc; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import javax.xml.catalog.CatalogFeatures; +import javax.xml.catalog.CatalogFeatures.Feature; +import javax.xml.catalog.CatalogManager; +import org.xml.sax.EntityResolver; + +/** + * + * @author lukas + */ +final class CatalogUtil { + + // Cache CatalogFeatures instance for future usages. + // Resolve feature is set to "continue" value for backward compatibility. + private static final CatalogFeatures CATALOG_FEATURES = CatalogFeatures.builder() + .with(Feature.RESOLVE, "continue") + .build(); + + static EntityResolver getCatalog(EntityResolver entityResolver, File catalogFile, ArrayList catalogUrls) throws IOException { + return CatalogManager.catalogResolver( + CATALOG_FEATURES, catalogUrls.stream().toArray(URI[]::new)); + } +} diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties index 6a418f594ad..4231c45b6e4 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -173,23 +173,23 @@ Driver.CompilingSchema = \ Driver.FailedToGenerateCode = \ Failed to produce code. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +# DO NOT localize the 2.3.0-b170531.0717 string - it is a token for an mvn Driver.FilePrologComment = \ - This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT \n\ + This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-b170531.0717 \n\ See https://jaxb.java.net/ \n\ Any modifications to this file will be lost upon recompilation of the source schema. \n\ Generated on: {0} \n Driver.Version = \ - xjc 2.3.0-SNAPSHOT + xjc 2.3.0-b170531.0717 Driver.FullVersion = \ - xjc full version "2.3.0-SNAPSHOT" + xjc full version "2.3.0-b170531.0717" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170531.0717 # for JDK integration - include version in source zip -jaxb.jdk.version=@@JAXB_JDK_VERSION@@ +jaxb.jdk.version=2.3.0-b170531.0717 # see java.text.SimpleDateFormat for format syntax # DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties index 7d645e92472..83a0e115a21 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -127,17 +127,17 @@ Driver.CompilingSchema = Ein Schema wird kompiliert ... Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT generiert \nSiehe https://jaxb.java.net/ \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n +# DO NOT localize the 2.3.0-b170531.0717 string - it is a token for an mvn +Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-b170531.0717 generiert \nSiehe https://jaxb.java.net/ \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170531.0717 -Driver.FullVersion = xjc vollst\u00E4ndige Version "2.3.0-SNAPSHOT" +Driver.FullVersion = xjc vollst\u00E4ndige Version "2.3.0-b170531.0717" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170531.0717 # for JDK integration - include version in source zip -jaxb.jdk.version=@@JAXB_JDK_VERSION@@ +jaxb.jdk.version=2.3.0-b170531.0717 # see java.text.SimpleDateFormat for format syntax # DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties index e7196a558f3..178f0ec7b39 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -127,17 +127,17 @@ Driver.CompilingSchema = Compilando un esquema... Driver.FailedToGenerateCode = Fallo al producir c\u00f3digo. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.3.0-SNAPSHOT \nVisite https://jaxb.java.net/ \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n +# DO NOT localize the 2.3.0-b170531.0717 string - it is a token for an mvn +Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.3.0-b170531.0717 \nVisite https://jaxb.java.net/ \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170531.0717 -Driver.FullVersion = versi\u00F3n completa de xjc "2.3.0-SNAPSHOT" +Driver.FullVersion = versi\u00F3n completa de xjc "2.3.0-b170531.0717" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170531.0717 # for JDK integration - include version in source zip -jaxb.jdk.version=@@JAXB_JDK_VERSION@@ +jaxb.jdk.version=2.3.0-b170531.0717 # see java.text.SimpleDateFormat for format syntax # DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties index 6a1719d4042..5bd13440b3f 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -131,17 +131,17 @@ Driver.CompilingSchema = compilation d'un sch\u00e9ma... Driver.FailedToGenerateCode = Echec de la production du code. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.3.0-SNAPSHOT \nVoir https://jaxb.java.net/ \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n +# DO NOT localize the 2.3.0-b170531.0717 string - it is a token for an mvn +Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.3.0-b170531.0717 \nVoir https://jaxb.java.net/ \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170531.0717 -Driver.FullVersion = version compl\u00E8te xjc "2.3.0-SNAPSHOT" +Driver.FullVersion = version compl\u00E8te xjc "2.3.0-b170531.0717" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170531.0717 # for JDK integration - include version in source zip -jaxb.jdk.version=@@JAXB_JDK_VERSION@@ +jaxb.jdk.version=2.3.0-b170531.0717 # see java.text.SimpleDateFormat for format syntax # DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties index a1762e7b93d..aad9f6bca1d 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -127,17 +127,17 @@ Driver.CompilingSchema = compilazione di uno schema in corso... Driver.FailedToGenerateCode = Produzione del codice non riuscita. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.3.0-SNAPSHOT \nVedere https://jaxb.java.net/ \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n +# DO NOT localize the 2.3.0-b170531.0717 string - it is a token for an mvn +Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.3.0-b170531.0717 \nVedere https://jaxb.java.net/ \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170531.0717 -Driver.FullVersion = versione completa xjc "2.3.0-SNAPSHOT" +Driver.FullVersion = versione completa xjc "2.3.0-b170531.0717" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170531.0717 # for JDK integration - include version in source zip -jaxb.jdk.version=@@JAXB_JDK_VERSION@@ +jaxb.jdk.version=2.3.0-b170531.0717 # see java.text.SimpleDateFormat for format syntax # DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties index abdf441ddf4..ceb952818eb 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -127,17 +127,17 @@ Driver.CompilingSchema = \u30b9\u30ad\u30fc\u30de\u306e\u30b3\u30f3\u30d1\u30a4\ Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.3.0-SNAPSHOT\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \nhttps://jaxb.java.net/\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n +# DO NOT localize the 2.3.0-b170531.0717 string - it is a token for an mvn +Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.3.0-b170531.0717\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \nhttps://jaxb.java.net/\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170531.0717 -Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-SNAPSHOT" +Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-b170531.0717" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170531.0717 # for JDK integration - include version in source zip -jaxb.jdk.version=@@JAXB_JDK_VERSION@@ +jaxb.jdk.version=2.3.0-b170531.0717 # see java.text.SimpleDateFormat for format syntax # DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties index d129d33031c..275be7748b0 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -127,17 +127,17 @@ Driver.CompilingSchema = \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub294 Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.3.0-SNAPSHOT \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \nhttps://jaxb.java.net/\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n +# DO NOT localize the 2.3.0-b170531.0717 string - it is a token for an mvn +Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.3.0-b170531.0717 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \nhttps://jaxb.java.net/\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n -Driver.Version = XJC 2.3.0-SNAPSHOT +Driver.Version = XJC 2.3.0-b170531.0717 -Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.3.0-SNAPSHOT" +Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.3.0-b170531.0717" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170531.0717 # for JDK integration - include version in source zip -jaxb.jdk.version=@@JAXB_JDK_VERSION@@ +jaxb.jdk.version=2.3.0-b170531.0717 # see java.text.SimpleDateFormat for format syntax # DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties index 58083953f6d..7926f4d5331 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -127,17 +127,17 @@ Driver.CompilingSchema = compilando um esquema... Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.3.0-SNAPSHOT \nConsulte https://jaxb.java.net/ \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n +# DO NOT localize the 2.3.0-b170531.0717 string - it is a token for an mvn +Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.3.0-b170531.0717 \nConsulte https://jaxb.java.net/ \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170531.0717 -Driver.FullVersion = vers\u00E3o completa de xjc "2.3.0-SNAPSHOT" +Driver.FullVersion = vers\u00E3o completa de xjc "2.3.0-b170531.0717" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170531.0717 # for JDK integration - include version in source zip -jaxb.jdk.version=@@JAXB_JDK_VERSION@@ +jaxb.jdk.version=2.3.0-b170531.0717 # see java.text.SimpleDateFormat for format syntax # DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties index 34397261515..daad91ff9e2 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -131,17 +131,17 @@ Driver.CompilingSchema = \u6b63\u5728\u7f16\u8bd1\u6a21\u5f0f... Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002 -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.3.0-SNAPSHOT \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee https://jaxb.java.net/ \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n +# DO NOT localize the 2.3.0-b170531.0717 string - it is a token for an mvn +Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.3.0-b170531.0717 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee https://jaxb.java.net/ \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170531.0717 -Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" +Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.3.0-b170531.0717" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170531.0717 # for JDK integration - include version in source zip -jaxb.jdk.version=@@JAXB_JDK_VERSION@@ +jaxb.jdk.version=2.3.0-b170531.0717 # see java.text.SimpleDateFormat for format syntax # DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties index 2685c64a2bf..d0282b8efc7 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -127,17 +127,17 @@ Driver.CompilingSchema = \u6b63\u5728\u7de8\u8b6f\u7db1\u8981... Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 https://jaxb.java.net/ \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n +# DO NOT localize the 2.3.0-b170531.0717 string - it is a token for an mvn +Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-b170531.0717 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 https://jaxb.java.net/ \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170531.0717 -Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" +Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.3.0-b170531.0717" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170531.0717 # for JDK integration - include version in source zip -jaxb.jdk.version=@@JAXB_JDK_VERSION@@ +jaxb.jdk.version=2.3.0-b170531.0717 # see java.text.SimpleDateFormat for format syntax # DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java index 10c1bda5157..c1136f45f65 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java @@ -25,6 +25,27 @@ package com.sun.tools.internal.xjc; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.List; +import java.util.ServiceLoader; +import java.util.Set; + import com.sun.codemodel.internal.CodeWriter; import com.sun.codemodel.internal.JPackage; import com.sun.codemodel.internal.JResourceFile; @@ -37,40 +58,16 @@ import com.sun.tools.internal.xjc.generator.bean.field.FieldRendererFactory; import com.sun.tools.internal.xjc.model.Model; import com.sun.tools.internal.xjc.reader.Util; import com.sun.xml.internal.bind.api.impl.NameConverter; -import org.xml.sax.EntityResolver; -import org.xml.sax.InputSource; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; -import java.net.URL; -import java.net.URLClassLoader; import java.nio.charset.Charset; import java.nio.charset.IllegalCharsetNameException; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.Enumeration; -import java.util.HashSet; -import java.util.List; import java.util.Locale; -import java.util.ServiceLoader; -import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; -import javax.xml.catalog.CatalogFeatures; -import javax.xml.catalog.CatalogFeatures.Feature; -import javax.xml.catalog.CatalogManager; +import org.xml.sax.EntityResolver; +import org.xml.sax.InputSource; /** * Global options. @@ -80,37 +77,53 @@ import javax.xml.catalog.CatalogManager; * The configuration in this class should be abstract enough so that * it could be parsed from both command-line or Ant. */ -public class Options -{ - /** If "-debug" is specified. */ +public class Options { + /** + * If "-debug" is specified. + */ public boolean debugMode; - /** If the "-verbose" option is specified. */ + /** + * If the "-verbose" option is specified. + */ public boolean verbose; - /** If the "-quiet" option is specified. */ + /** + * If the "-quiet" option is specified. + */ public boolean quiet; - /** If the -readOnly option is specified. */ + /** + * If the -readOnly option is specified. + */ public boolean readOnly; - /** No file header comment (to be more friendly with diff.) */ + /** + * No file header comment (to be more friendly with diff.) + */ public boolean noFileHeader; - /** When on, fixes getter/setter generation to match the Bean Introspection API */ + /** + * When on, fixes getter/setter generation to match the Bean Introspection API + */ public boolean enableIntrospection; - /** When on, generates content property for types with multiple xs:any derived elements (which is supposed to be correct behaviour) */ + /** + * When on, generates content property for types with multiple xs:any derived elements (which is supposed to be correct behaviour) + */ public boolean contentForWildcard; - /** Encoding to be used by generated java sources, null for platform default. */ + /** + * Encoding to be used by generated java sources, null for platform default. + */ public String encoding; /** * If true XML security features when parsing XML documents will be disabled. * The default value is false. - * + *

    * Boolean + * * @since 2.2.6 */ public boolean disableXmlSecurity; @@ -119,7 +132,7 @@ public class Options * Check the source schemas with extra scrutiny. * The exact meaning depends on the schema language. */ - public boolean strictCheck =true; + public boolean strictCheck = true; /** * If -explicit-annotation option is specified. @@ -152,7 +165,7 @@ public class Options public int compatibilityMode = STRICT; public boolean isExtensionMode() { - return compatibilityMode==EXTENSION; + return compatibilityMode == EXTENSION; } private static final Logger logger = com.sun.xml.internal.bind.Util.getClassLogger(); @@ -181,7 +194,7 @@ public class Options public File targetDir = new File("."); /** - * Actually stores {@link CatalogResolver}, but the field + * On JDK 8 an odler stores {@code CatalogResolver}, but the field * type is made to {@link EntityResolver} so that XJC can be * used even if resolver.jar is not available in the classpath. */ @@ -208,9 +221,9 @@ public class Options /** * Input schema files as a list of {@link InputSource}s. */ - private final List grammars = new ArrayList(); + private final List grammars = new ArrayList<>(); - private final List bindFiles = new ArrayList(); + private final List bindFiles = new ArrayList<>(); // Proxy setting. private String proxyHost = null; @@ -220,7 +233,7 @@ public class Options /** * {@link Plugin}s that are enabled in this compilation. */ - public final List activePlugins = new ArrayList(); + public final List activePlugins = new ArrayList<>(); /** * All discovered {@link Plugin}s. @@ -233,7 +246,7 @@ public class Options /** * Set of URIs that plug-ins recognize as extension bindings. */ - public final Set pluginURIs = new HashSet(); + public final Set pluginURIs = new HashSet<>(); /** * This allocator has the final say on deciding the class name. @@ -280,30 +293,26 @@ public class Options /** * Sets the {@link FieldRendererFactory}. - * + *

    *

    * This method is for plugins to call to set a custom {@link FieldRendererFactory}. * - * @param frf - * The {@link FieldRendererFactory} to be installed. Must not be null. - * @param owner - * Identifies the plugin that owns this {@link FieldRendererFactory}. - * When two {@link Plugin}s try to call this method, this allows XJC - * to report it as a user-friendly error message. - * - * @throws BadCommandLineException - * If a conflit happens, this exception carries a user-friendly error - * message, indicating a conflict. + * @param frf The {@link FieldRendererFactory} to be installed. Must not be null. + * @param owner Identifies the plugin that owns this {@link FieldRendererFactory}. + * When two {@link Plugin}s try to call this method, this allows XJC + * to report it as a user-friendly error message. + * @throws BadCommandLineException If a conflit happens, this exception carries a user-friendly error + * message, indicating a conflict. */ public void setFieldRendererFactory(FieldRendererFactory frf, Plugin owner) throws BadCommandLineException { // since this method is for plugins, make it bit more fool-proof than usual - if(frf==null) + if (frf == null) throw new IllegalArgumentException(); - if(fieldRendererFactoryOwner!=null) { + if (fieldRendererFactoryOwner != null) { throw new BadCommandLineException( Messages.format(Messages.FIELD_RENDERER_CONFLICT, fieldRendererFactoryOwner.getOptionName(), - owner.getOptionName() )); + owner.getOptionName())); } this.fieldRendererFactoryOwner = owner; this.fieldRendererFactory = frf; @@ -321,30 +330,26 @@ public class Options /** * Sets the {@link NameConverter}. - * + *

    *

    * This method is for plugins to call to set a custom {@link NameConverter}. * - * @param nc - * The {@link NameConverter} to be installed. Must not be null. - * @param owner - * Identifies the plugin that owns this {@link NameConverter}. - * When two {@link Plugin}s try to call this method, this allows XJC - * to report it as a user-friendly error message. - * - * @throws BadCommandLineException - * If a conflit happens, this exception carries a user-friendly error - * message, indicating a conflict. + * @param nc The {@link NameConverter} to be installed. Must not be null. + * @param owner Identifies the plugin that owns this {@link NameConverter}. + * When two {@link Plugin}s try to call this method, this allows XJC + * to report it as a user-friendly error message. + * @throws BadCommandLineException If a conflit happens, this exception carries a user-friendly error + * message, indicating a conflict. */ public void setNameConverter(NameConverter nc, Plugin owner) throws BadCommandLineException { // since this method is for plugins, make it bit more fool-proof than usual - if(nc==null) + if (nc == null) throw new IllegalArgumentException(); - if(nameConverter!=null) { + if (nameConverter != null) { throw new BadCommandLineException( Messages.format(Messages.NAME_CONVERTER_CONFLICT, nameConverterOwner.getOptionName(), - owner.getOptionName() )); + owner.getOptionName())); } this.nameConverterOwner = owner; this.nameConverter = nc; @@ -352,14 +357,16 @@ public class Options /** * Gets all the {@link Plugin}s discovered so far. - * + *

    *

    * A plugins are enumerated when this method is called for the first time, * by taking {@link #classpaths} into account. That means * "-cp plugin.jar" has to come before you specify options to enable it. + * + * @return */ public List getAllPlugins() { - if(allPlugins==null) { + if (allPlugins == null) { allPlugins = findServices(Plugin.class); } @@ -367,27 +374,34 @@ public class Options } public Language getSchemaLanguage() { - if( schemaLanguage==null) + if (schemaLanguage == null) schemaLanguage = guessSchemaLanguage(); return schemaLanguage; } + public void setSchemaLanguage(Language _schemaLanguage) { this.schemaLanguage = _schemaLanguage; } - /** Input schema files. */ + /** + * Input schema files. + * + * @return + */ public InputSource[] getGrammars() { return grammars.toArray(new InputSource[grammars.size()]); } /** * Adds a new input schema. + * + * @param is */ - public void addGrammar( InputSource is ) { + public void addGrammar(InputSource is) { grammars.add(absolutize(is)); } - private InputSource fileToInputSource( File source ) { + private InputSource fileToInputSource(File source) { try { String url = source.toURL().toExternalForm(); return new InputSource(Util.escapeSpace(url)); @@ -396,26 +410,27 @@ public class Options } } - public void addGrammar( File source ) { + public void addGrammar(File source) { addGrammar(fileToInputSource(source)); } /** * Recursively scan directories and add all XSD files in it. + * + * @param dir */ - public void addGrammarRecursive( File dir ) { - addRecursive(dir,".xsd",grammars); + public void addGrammarRecursive(File dir) { + addRecursive(dir, ".xsd", grammars); } - private void addRecursive( File dir, String suffix, List result ) { + private void addRecursive(File dir, String suffix, List result) { File[] files = dir.listFiles(); - if(files==null) return; // work defensively + if (files == null) return; // work defensively - for( File f : files ) { - if(f.isDirectory()) - addRecursive(f,suffix,result); - else - if(f.getPath().endsWith(suffix)) + for (File f : files) { + if (f.isDirectory()) + addRecursive(f, suffix, result); + else if (f.getPath().endsWith(suffix)) result.add(absolutize(fileToInputSource(f))); } } @@ -425,53 +440,68 @@ public class Options // absolutize all the system IDs in the input, so that we can map system IDs to DOM trees. try { URL baseURL = new File(".").getCanonicalFile().toURL(); - is.setSystemId( new URL(baseURL,is.getSystemId()).toExternalForm() ); - } catch( IOException e ) { + is.setSystemId(new URL(baseURL, is.getSystemId()).toExternalForm()); + } catch (IOException e) { logger.log(Level.FINE, "{0}, {1}", new Object[]{is.getSystemId(), e.getLocalizedMessage()}); } return is; } - /** Input external binding files. */ + /** + * Input external binding files. + * + * @return + */ public InputSource[] getBindFiles() { return bindFiles.toArray(new InputSource[bindFiles.size()]); } /** * Adds a new binding file. + * + * @param is */ - public void addBindFile( InputSource is ) { + public void addBindFile(InputSource is) { bindFiles.add(absolutize(is)); } /** * Adds a new binding file. + * + * @param bindFile */ - public void addBindFile( File bindFile ) { + public void addBindFile(File bindFile) { bindFiles.add(fileToInputSource(bindFile)); } /** * Recursively scan directories and add all ".xjb" files in it. + * + * @param dir */ - public void addBindFileRecursive( File dir ) { - addRecursive(dir,".xjb",bindFiles); + public void addBindFileRecursive(File dir) { + addRecursive(dir, ".xjb", bindFiles); } - public final List classpaths = new ArrayList(); + public final List classpaths = new ArrayList<>(); + /** * Gets a classLoader that can load classes specified via the * -classpath option. + * + * @param parent + * @return */ - public ClassLoader getUserClassLoader( ClassLoader parent ) { + public ClassLoader getUserClassLoader(ClassLoader parent) { if (classpaths.isEmpty()) return parent; return new URLClassLoader( - classpaths.toArray(new URL[classpaths.size()]),parent); + classpaths.toArray(new URL[classpaths.size()]), parent); } /** * Gets Java module name option. + * * @return Java module name option or {@code null} if this option was not set. */ public String getModuleName() { @@ -482,13 +512,13 @@ public class Options * Parses an option {@code args[i]} and return * the number of tokens consumed. * - * @return - * 0 if the argument is not understood. Returning 0 - * will let the caller report an error. - * @exception BadCommandLineException - * If the callee wants to provide a custom message for an error. + * @param args + * @param i + * @return 0 if the argument is not understood. Returning 0 + * will let the caller report an error. + * @throws BadCommandLineException If the callee wants to provide a custom message for an error. */ - public int parseArgument( String[] args, int i ) throws BadCommandLineException { + public int parseArgument(String[] args, int i) throws BadCommandLineException { if (args[i].equals("-classpath") || args[i].equals("-cp")) { String a = requireArgument(args[i], args, ++i); for (String p : a.split(File.pathSeparator)) { @@ -497,16 +527,16 @@ public class Options classpaths.add(file.toURL()); } catch (MalformedURLException e) { throw new BadCommandLineException( - Messages.format(Messages.NOT_A_VALID_FILENAME,file),e); + Messages.format(Messages.NOT_A_VALID_FILENAME, file), e); } } return 2; } if (args[i].equals("-d")) { - targetDir = new File(requireArgument("-d",args,++i)); - if( !targetDir.exists() ) + targetDir = new File(requireArgument("-d", args, ++i)); + if (!targetDir.exists()) throw new BadCommandLineException( - Messages.format(Messages.NON_EXISTENT_DIR,targetDir)); + Messages.format(Messages.NON_EXISTENT_DIR, targetDir)); return 2; } if (args[i].equals("-readOnly")) { @@ -514,8 +544,8 @@ public class Options return 1; } if (args[i].equals("-p")) { - defaultPackage = requireArgument("-p",args,++i); - if(defaultPackage.length()==0) { // user specified default package + defaultPackage = requireArgument("-p", args, ++i); + if (defaultPackage.length() == 0) { // user specified default package // there won't be any package to annotate, so disable them // automatically as a usability feature packageLevelAnnotations = false; @@ -535,11 +565,11 @@ public class Options strictCheck = false; return 1; } - if( args[i].equals("-npa")) { + if (args[i].equals("-npa")) { packageLevelAnnotations = false; return 1; } - if( args[i].equals("-no-header")) { + if (args[i].equals("-no-header")) { noFileHeader = true; return 1; } @@ -572,7 +602,7 @@ public class Options return 1; } if (args[i].equals("-b")) { - addFile(requireArgument("-b",args,++i),bindFiles,".xjb"); + addFile(requireArgument("-b", args, ++i), bindFiles, ".xjb"); return 2; } if (args[i].equals("-dtd")) { @@ -592,10 +622,10 @@ public class Options return 1; } if (args[i].equals("-target")) { - String token = requireArgument("-target",args,++i); + String token = requireArgument("-target", args, ++i); target = SpecVersion.parse(token); - if(target==null) - throw new BadCommandLineException(Messages.format(Messages.ILLEGAL_TARGET_VERSION,token)); + if (target == null) + throw new BadCommandLineException(Messages.format(Messages.ILLEGAL_TARGET_VERSION, token)); return 2; } if (args[i].equals("-httpproxyfile")) { @@ -605,18 +635,16 @@ public class Options } File file = new File(args[++i]); - if(!file.exists()) { + if (!file.exists()) { throw new BadCommandLineException( - Messages.format(Messages.NO_SUCH_FILE,file)); + Messages.format(Messages.NO_SUCH_FILE, file)); } - try { - BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8")); + try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"))) { parseProxy(in.readLine()); - in.close(); } catch (IOException e) { throw new BadCommandLineException( - Messages.format(Messages.FAILED_TO_PARSE,file,e.getMessage()),e); + Messages.format(Messages.FAILED_TO_PARSE, file, e.getMessage()), e); } return 2; @@ -631,30 +659,33 @@ public class Options return 2; } if (args[i].equals("-host")) { - proxyHost = requireArgument("-host",args,++i); + proxyHost = requireArgument("-host", args, ++i); return 2; } if (args[i].equals("-port")) { - proxyPort = requireArgument("-port",args,++i); + proxyPort = requireArgument("-port", args, ++i); return 2; } - if( args[i].equals("-catalog") ) { - // use javax.xml.catalog to resolve external entities. + if (args[i].equals("-catalog")) { + // use Sun's "XML Entity and URI Resolvers" by Norman Walsh + // to resolve external entities. + // https://xerces.apache.org/xml-commons/components/resolver/resolver-article.html - File catalogFile = new File(requireArgument("-catalog",args,++i)); + File catalogFile = new File(requireArgument("-catalog", args, ++i)); try { addCatalog(catalogFile); } catch (IOException e) { throw new BadCommandLineException( - Messages.format(Messages.FAILED_TO_PARSE,catalogFile,e.getMessage()),e); + Messages.format(Messages.FAILED_TO_PARSE, catalogFile, e.getMessage()), e); } return 2; } - if( args[i].equals("-Xtest-class-name-allocator") ) { + if (args[i].equals("-Xtest-class-name-allocator")) { classNameAllocator = new ClassNameAllocator() { + @Override public String assignClassName(String packageName, String className) { - System.out.printf("assignClassName(%s,%s)\n",packageName,className); - return className+"_Type"; + System.out.printf("assignClassName(%s,%s)\n", packageName, className); + return className + "_Type"; } }; return 1; @@ -675,9 +706,9 @@ public class Options } // see if this is one of the extensions - for( Plugin plugin : getAllPlugins() ) { + for (Plugin plugin : getAllPlugins()) { try { - if( ('-'+plugin.getOptionName()).equals(args[i]) ) { + if (('-' + plugin.getOptionName()).equals(args[i])) { activePlugins.add(plugin); plugin.onActivated(this); pluginURIs.addAll(plugin.getCustomizationURIs()); @@ -686,17 +717,17 @@ public class Options // this is new in 2.1, and due to the backward compatibility reason, // if plugin didn't understand it, we still return 1 to indicate // that this option is consumed. - int r = plugin.parseArgument(this,args,i); - if(r!=0) + int r = plugin.parseArgument(this, args, i); + if (r != 0) return r; else return 1; } - int r = plugin.parseArgument(this,args,i); - if(r!=0) return r; + int r = plugin.parseArgument(this, args, i); + if (r != 0) return r; } catch (IOException e) { - throw new BadCommandLineException(e.getMessage(),e); + throw new BadCommandLineException(e.getMessage(), e); } } @@ -730,17 +761,23 @@ public class Options try { Integer.valueOf(proxyPort); } catch (NumberFormatException e) { - throw new BadCommandLineException(Messages.format(Messages.ILLEGAL_PROXY,text)); + throw new BadCommandLineException(Messages.format(Messages.ILLEGAL_PROXY, text)); } } /** * Obtains an operand and reports an error if it's not there. + * + * @param optionName + * @param args + * @param i + * @return + * @throws com.sun.tools.internal.xjc.BadCommandLineException */ public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException { if (i == args.length || args[i].startsWith("-")) { throw new BadCommandLineException( - Messages.format(Messages.MISSING_OPERAND,optionName)); + Messages.format(Messages.MISSING_OPERAND, optionName)); } return args[i]; } @@ -749,9 +786,8 @@ public class Options * Parses a token to a file (or a set of files) * and add them as {@link InputSource} to the specified list. * - * @param suffix - * If the given token is a directory name, we do a recursive search - * and find all files that have the given suffix. + * @param suffix If the given token is a directory name, we do a recursive search + * and find all files that have the given suffix. */ private void addFile(String name, List target, String suffix) throws BadCommandLineException { Object src; @@ -759,67 +795,60 @@ public class Options src = Util.getFileOrURL(name); } catch (IOException e) { throw new BadCommandLineException( - Messages.format(Messages.NOT_A_FILE_NOR_URL,name)); + Messages.format(Messages.NOT_A_FILE_NOR_URL, name)); } - if(src instanceof URL) { - target.add(absolutize(new InputSource(Util.escapeSpace(((URL)src).toExternalForm())))); + if (src instanceof URL) { + target.add(absolutize(new InputSource(Util.escapeSpace(((URL) src).toExternalForm())))); } else { - File fsrc = (File)src; - if(fsrc.isDirectory()) { - addRecursive(fsrc,suffix,target); + File fsrc = (File) src; + if (fsrc.isDirectory()) { + addRecursive(fsrc, suffix, target); } else { target.add(absolutize(fileToInputSource(fsrc))); } } } - /** - * Adds a new catalog file. - */ - public void addCatalog(File catalogFile) throws IOException { - URI newUrl = catalogFile.toURI(); - if (!catalogUrls.contains(newUrl)) { - catalogUrls.add(newUrl); - } - try { - entityResolver = CatalogManager.catalogResolver(catalogFeatures, - catalogUrls.stream().toArray(URI[]::new)); - } catch (Exception ex) { - entityResolver = null; - } - } - // Since javax.xml.catalog is unmodifiable we need to track catalog // URLs added and create new catalog each time addCatalog is called private final ArrayList catalogUrls = new ArrayList<>(); - // Cache CatalogFeatures instance for future usages. - // Resolve feature is set to "continue" value for backward compatibility. - private static CatalogFeatures catalogFeatures = CatalogFeatures.builder() - .with(Feature.RESOLVE, "continue") - .build(); + /** + * Adds a new catalog file.Use created or existed resolver to parse new catalog file. + * + * @param catalogFile + * @throws java.io.IOException + */ + public void addCatalog(File catalogFile) throws IOException { + URI newUri = catalogFile.toURI(); + if (!catalogUrls.contains(newUri)) { + catalogUrls.add(newUri); + } + entityResolver = CatalogUtil.getCatalog(entityResolver, catalogFile, catalogUrls); + } + /** * Parses arguments and fill fields of this object. * - * @exception BadCommandLineException - * thrown when there's a problem in the command-line arguments + * @param args + * @throws BadCommandLineException thrown when there's a problem in the command-line arguments */ - public void parseArguments( String[] args ) throws BadCommandLineException { + public void parseArguments(String[] args) throws BadCommandLineException { for (int i = 0; i < args.length; i++) { - if(args[i].length()==0) + if (args[i].length() == 0) throw new BadCommandLineException(); if (args[i].charAt(0) == '-') { - int j = parseArgument(args,i); - if(j==0) + int j = parseArgument(args, i); + if (j == 0) throw new BadCommandLineException( Messages.format(Messages.UNRECOGNIZED_PARAMETER, args[i])); - i += (j-1); + i += (j - 1); } else { - if(args[i].endsWith(".jar")) + if (args[i].endsWith(".jar")) scanEpisodeFile(new File(args[i])); else - addFile(args[i],grammars,".xsd"); + addFile(args[i], grammars, ".xsd"); } } @@ -846,7 +875,7 @@ public class Options throw new BadCommandLineException( Messages.format(Messages.MISSING_GRAMMAR)); - if( schemaLanguage==null ) + if (schemaLanguage == null) schemaLanguage = guessSchemaLanguage(); // if(target==SpecVersion.V2_2 && !isExtensionMode()) @@ -854,13 +883,16 @@ public class Options // "Currently 2.2 is still not finalized yet, so using it requires the -extension switch." + // "NOTE THAT 2.2 SPEC MAY CHANGE BEFORE IT BECOMES FINAL."); - if(pluginLoadFailure!=null) + if (pluginLoadFailure != null) throw new BadCommandLineException( - Messages.format(Messages.PLUGIN_LOAD_FAILURE,pluginLoadFailure)); + Messages.format(Messages.PLUGIN_LOAD_FAILURE, pluginLoadFailure)); } /** * Finds the {@code META-INF/sun-jaxb.episode} file to add as a binding customization. + * + * @param jar + * @throws com.sun.tools.internal.xjc.BadCommandLineException */ public void scanEpisodeFile(File jar) throws BadCommandLineException { try { @@ -872,13 +904,15 @@ public class Options } } catch (IOException e) { throw new BadCommandLineException( - Messages.format(Messages.FAILED_TO_LOAD,jar,e.getMessage()), e); + Messages.format(Messages.FAILED_TO_LOAD, jar, e.getMessage()), e); } } /** * Guesses the schema language. + * + * @return */ public Language guessSchemaLanguage() { @@ -899,24 +933,31 @@ public class Options /** * Creates a configured CodeWriter that produces files into the specified directory. + * + * @return + * @throws java.io.IOException */ public CodeWriter createCodeWriter() throws IOException { - return createCodeWriter(new FileCodeWriter( targetDir, readOnly, encoding )); + return createCodeWriter(new FileCodeWriter(targetDir, readOnly, encoding)); } /** * Creates a configured CodeWriter that produces files into the specified directory. + * + * @param core + * @return */ - public CodeWriter createCodeWriter( CodeWriter core ) { - if(noFileHeader) + public CodeWriter createCodeWriter(CodeWriter core) { + if (noFileHeader) return core; - return new PrologCodeWriter( core,getPrologComment() ); + return new PrologCodeWriter(core, getPrologComment()); } /** - * Gets the string suitable to be used as the prolog comment baked into artifacts. - * This is the string like "This file was generated by the JAXB RI on YYYY/mm/dd..." + * Gets the string suitable to be used as the prolog comment baked into artifacts.This is the string like "This file was generated by the JAXB RI on YYYY/mm/dd..." + * + * @return */ public String getPrologComment() { // generate format syntax: 'at'

    + * This package provides a way to invoke XJC from within another program. The primary target of this API is the JAX-WS + * RI, but we hope that this API would be useful for other integration purposes as well. + * + *

    Getting Started: Using XJC

    + *

    + * To invoke XJC, a typical client would do something like this: + *

    + *    SchemaCompiler sc = XJC.createSchemaCompiler();
    + *    sc.parseSchema(new InputSource(schema1Url.toExternalForm()));
    + *    sc.parseSchema(new InputSource(schema2Url.toExternalForm()));
    + *    ...
    + *    S2JModel model = sc.bind();
    + * 
    + *

    + * The bind operation causes XJC to do the bulk of the work, such as figuring out what classes to generate, what + * methods/fields to generate, etc. The obtained model contains useful introspective information about how the binding + * was performed (such as the mapping between XML types and generated Java classes) + * + *

    + * Once the model is obtained, generate the code into the file system as follows: + *

    + *   JCodeModel cm = model.generateCode( null, ... );
    + *   cm.build(new FileCodeWriter(outputDir));
    + * 
    + * + *

    Implementation Note

    + *

    + * This package shouldn't contain any implementation code. + */ +package com.sun.tools.internal.xjc.api; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/package.html deleted file mode 100644 index 5ec97a80e19..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/package.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - -API for programmatic invocation of XJC and schemagen. - -

    -This package provides a way to invoke XJC from within another program. -The primary target of this API is the JAX-WS RI, but we hope that -this API would be useful for other integration purposes as well. - -

    Getting Started: Using XJC

    -

    -To invoke XJC, a typical client would do something like this: -

    -    SchemaCompiler sc = XJC.createSchemaCompiler();
    -    sc.parseSchema(new InputSource(schema1Url.toExternalForm()));
    -    sc.parseSchema(new InputSource(schema2Url.toExternalForm()));
    -    ...
    -    S2JModel model = sc.bind();
    -
    -

    -The bind operation causes XJC to do the bulk of the work, such as -figuring out what classes to generate, what methods/fields to generate, etc. -The obtained model contains useful introspective information about -how the binding was performed (such as the mapping between XML types -and generated Java classes) - -

    -Once the model is obtained, generate the code into the file system as follows: -

    -    JCodeModel cm = model.generateCode( null, ... );
    -    cm.build(new FileCodeWriter(outputDir));
    -
    - - -

    Implementation Note

    -

    -This package shouldn't contain any implementation code. - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package-info.java new file mode 100644 index 00000000000..28d16b99d11 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * FieldRenderer and its implementation classes. + * Unless you are deriving from these classes to define your own custom renderer, + * you shouldn't be using these classes directly. Use the outline package. + */ +package com.sun.tools.internal.xjc.generator.bean.field; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package.html deleted file mode 100644 index 149a2f33f39..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - -

    -FieldRenderer and its implementation classes. -Unless you are deriving from these classes to define your own custom renderer, -you shouldn't be using these classes directly. Use the outline package. -

    diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package-info.java new file mode 100644 index 00000000000..f40b82a7150 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package-info.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + *

    + * Compile-time representation of Java type system. + * + *

    + * These classes are used as TypeT and ClassDeclT of the model parameterization. This implementaion is designed to be + * capable of representing pre-existing classes (such as java.lang.String) as well as the generated classes (represented + * as JDefinedClass.) + * + *

    Handling of Primitive Types

    + *

    + * Primitive types have two forms (int and Integer), and this complicates the binding process. For this reason, inside + * the front end, we always use the boxed types. We'll use the unboxed form only in the back end when we know the field + * doesn't need to represent the null value. + */ +package com.sun.tools.internal.xjc.model.nav; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package.html deleted file mode 100644 index 24ecf544b4d..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -

    - Compile-time representation of Java type system. - -

    - These classes are used as TypeT and ClassDeclT of the model parameterization. - This implementaion is designed to be capable of representing pre-existing classes - (such as java.lang.String) as well as the generated classes (represented as JDefinedClass.) - -

    Handling of Primitive Types

    -

    - Primitive types have two forms (int and Integer), and this complicates the binding process. - For this reason, inside the front end, we always use the boxed types. We'll use the unboxed - form only in the back end when we know the field doesn't need to represent the null value. - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package-info.java new file mode 100644 index 00000000000..271f84ccebf --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package-info.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides the outline of the generated Java source code so that + * additional processing (such as adding more annotations) can be + * done on the generated code. + * + *

    + * Code generation phase builds an outline little by little, while each step is using the outline built by the prior + * steps. + */ +package com.sun.tools.internal.xjc.outline; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package.html deleted file mode 100644 index 371364c7a27..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Provides the outline of the generated Java source code so that - additional processings (such as adding more annotations) can be - done on the generated code. - -

    - Code generation phase builds an outline little by little, while - each step is using the outline built by the prior steps. - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package-info.java new file mode 100644 index 00000000000..11e9f94d952 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Object Model that represents DTD binding information. + */ +package com.sun.tools.internal.xjc.reader.dtd.bindinfo; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html deleted file mode 100644 index 87bbd14bc37..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html +++ /dev/null @@ -1,26 +0,0 @@ - - -

    Object Model that represents DTD binding information.

    diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package-info.java new file mode 100644 index 00000000000..1faa04caa10 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Binary expressions are left-associative. IOW, ((A,B),C) instead of (A,(B,C)). + */ +package com.sun.tools.internal.xjc.reader.gbind; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package.html deleted file mode 100644 index 36465475b32..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - Binary expressions are left-associative. IOW, ((A,B),C) instead of (A,(B,C)) - - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java index 37a0b40e1dd..51ac49302eb 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -85,7 +85,7 @@ import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI; */ public final class DOMForest { /** actual data storage {@code map}. */ - private final Map core = new HashMap(); + private final Map core = new LinkedHashMap<>(); /** * To correctly feed documents to a schema parser, we need to remember diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package-info.java new file mode 100644 index 00000000000..e32f91f28e4 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * internalization of external binding files and <jaxb:bindings> customizations. + */ +package com.sun.tools.internal.xjc.reader.internalizer; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package.html deleted file mode 100644 index e6f2aa14379..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package.html +++ /dev/null @@ -1,26 +0,0 @@ - - -

    internalization of external binding files and <jaxb:bindings> customizations.

    diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package-info.java new file mode 100644 index 00000000000..d6719858a56 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Front-end that reads schema(s) and produce BGM. + */ +package com.sun.tools.internal.xjc.reader; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package.html deleted file mode 100644 index 7da51871e6a..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package.html +++ /dev/null @@ -1,26 +0,0 @@ - - -

    Front-end that reads schema(s) and produce BGM.

    diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java index 0c313cbcd1d..898bfcaab34 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -23,6 +23,12 @@ * questions. */ +/** + * Object Model that represents customization declarations. + * RelaxNGCC is used to parse + * XML syntax into this representation, and the other parts of XJC will use + * this object model. + */ @XmlSchema(elementFormDefault = QUALIFIED, namespace=Const.JAXB_NSURI) package com.sun.tools.internal.xjc.reader.xmlschema.bindinfo; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html deleted file mode 100644 index e71625d1171..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html +++ /dev/null @@ -1,34 +0,0 @@ - - - -Object Model that represents customization declarations. - -

    - RelaxNGCC is used to parse - XML syntax into this representation, and the other parts of XJC will use - this object model. -

    - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package-info.java new file mode 100644 index 00000000000..5387ad02145 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +/** + * Code generated into the user's packages in certain compilation mode. + */ +package com.sun.tools.internal.xjc.runtime; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package.html deleted file mode 100644 index 3e675192b04..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Code generated into the user's packages in certain compilation mode. - - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ElementDecl.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ElementDecl.java index c4a9f35d90b..e74b7e0a494 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ElementDecl.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ElementDecl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -70,7 +70,7 @@ public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.T this.substHead = _substHead; this.substDisallowed = _substDisallowed; this.substExcluded = _substExcluded; - this.idConstraints = Collections.unmodifiableList((List)idConstraints); + this.idConstraints = (List) Collections.unmodifiableList((List)idConstraints); for (IdentityConstraintImpl idc : idConstraints) idc.setParent(this); @@ -80,42 +80,52 @@ public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.T } private XmlString defaultValue; + @Override public XmlString getDefaultValue() { return defaultValue; } private XmlString fixedValue; + @Override public XmlString getFixedValue() { return fixedValue; } private boolean nillable; + @Override public boolean isNillable() { return nillable; } private boolean _abstract; + @Override public boolean isAbstract() { return _abstract; } private Ref.Type type; + @Override public XSType getType() { return type.getType(); } private Ref.Element substHead; + @Override public XSElementDecl getSubstAffiliation() { if(substHead==null) return null; return substHead.get(); } private int substDisallowed; + @Override public boolean isSubstitutionDisallowed( int method ) { return (substDisallowed&method)!=0; } private int substExcluded; + @Override public boolean isSubstitutionExcluded( int method ) { return (substExcluded&method)!=0; } private final List idConstraints; + @Override public List getIdentityConstraints() { return idConstraints; } private Boolean form; + @Override public Boolean getForm() { return form; } @@ -124,6 +134,7 @@ public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.T /** * @deprecated */ + @Override public XSElementDecl[] listSubstitutables() { Set s = getSubstitutables(); return s.toArray(new XSElementDecl[s.size()]); @@ -135,6 +146,7 @@ public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.T /** Unmodifieable view of {@link #substitutables}. */ private Set substitutablesView = null; + @Override public Set getSubstitutables() { if( substitutables==null ) { // if the field is null by the time this method @@ -194,42 +206,57 @@ public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.T } } + @Override public boolean canBeSubstitutedBy(XSElementDecl e) { return getSubstitutables().contains(e); } + @Override public boolean isWildcard() { return false; } + @Override public boolean isModelGroupDecl() { return false; } + @Override public boolean isModelGroup() { return false; } + @Override public boolean isElementDecl() { return true; } + @Override public XSWildcard asWildcard() { return null; } + @Override public XSModelGroupDecl asModelGroupDecl() { return null; } + @Override public XSModelGroup asModelGroup() { return null; } + @Override public XSElementDecl asElementDecl() { return this; } + @Override public void visit( XSVisitor visitor ) { visitor.elementDecl(this); } + @Override public void visit( XSTermVisitor visitor ) { visitor.elementDecl(this); } + @Override public Object apply( XSTermFunction function ) { return function.elementDecl(this); } + @Override public T apply(XSTermFunctionWithParam function, P param) { return function.elementDecl(this,param); } + @Override public Object apply( XSFunction function ) { return function.elementDecl(this); } // Ref.Term implementation + @Override public XSTerm getTerm() { return this; } } diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java index 2a4c69475e8..4ca87b29c52 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -59,17 +59,19 @@ public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityC this.name = name; this.selector = selector; selector.setParent(this); - this.fields = Collections.unmodifiableList((List)fields); + this.fields = (List) Collections.unmodifiableList((List)fields); for( XPathImpl xp : fields ) xp.setParent(this); this.refer = refer; } + @Override public void visit(XSVisitor visitor) { visitor.identityConstraint(this); } + @Override public T apply(XSFunction function) { return function.identityConstraint(this); } @@ -79,30 +81,37 @@ public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityC parent.getOwnerSchema().addIdentityConstraint(this); } + @Override public XSElementDecl getParent() { return parent; } + @Override public String getName() { return name; } + @Override public String getTargetNamespace() { return getParent().getTargetNamespace(); } + @Override public short getCategory() { return category; } + @Override public XSXPath getSelector() { return selector; } + @Override public List getFields() { return fields; } + @Override public XSIdentityConstraint getReferencedKey() { if(category==KEYREF) return refer.get(); @@ -110,6 +119,7 @@ public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityC throw new IllegalStateException("not a keyref"); } + @Override public XSIdentityConstraint get() { return this; } diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java index 4e600c32e55..297ff889b6d 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -34,7 +34,6 @@ import com.sun.xml.internal.xsom.impl.UName; import com.sun.xml.internal.xsom.impl.Const; import com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime; import com.sun.xml.internal.xsom.impl.parser.state.Schema; -import com.sun.xml.internal.xsom.impl.util.Uri; import com.sun.xml.internal.xsom.parser.AnnotationParser; import com.sun.xml.internal.org.relaxng.datatype.ValidationContext; import org.xml.sax.Attributes; @@ -48,8 +47,10 @@ import org.xml.sax.helpers.LocatorImpl; import java.io.IOException; import java.net.URI; +import java.net.URL; import java.text.MessageFormat; import java.util.Stack; +import java.util.regex.Pattern; /** * NGCCRuntime extended with various utility methods for @@ -150,12 +151,15 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { /* registers a patcher that will run after all the parsing has finished. */ + @Override public void addPatcher( Patch patcher ) { parser.patcherManager.addPatcher(patcher); } + @Override public void addErrorChecker( Patch patcher ) { parser.patcherManager.addErrorChecker(patcher); } + @Override public void reportError( String msg, Locator loc ) throws SAXException { parser.patcherManager.reportError(msg,loc); } @@ -188,8 +192,15 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { EntityResolver er = parser.getEntityResolver(); String systemId = null; - if (relativeUri!=null) - systemId = Uri.resolve(baseUri,relativeUri); + if (relativeUri!=null) { + if (isAbsolute(relativeUri)) { + systemId = relativeUri; + } + if (baseUri == null || !isAbsolute(baseUri)) { + throw new IOException("Unable to resolve relative URI " + relativeUri + " because base URI is not absolute: " + baseUri); + } + systemId = new URL(new URL(baseUri), relativeUri).toString(); + } if (er!=null) { InputSource is = er.resolveEntity(namespaceURI,systemId); @@ -217,7 +228,21 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { } } - /** Includes the specified schema. */ + private static final Pattern P = Pattern.compile(".*[/#?].*"); + + private static boolean isAbsolute(String uri) { + int i = uri.indexOf(':'); + if (i < 0) { + return false; + } + return !P.matcher(uri.substring(0, i)).matches(); + } + + /** + * Includes the specified schema. + * + * @param schemaLocation + * @throws org.xml.sax.SAXException */ public void includeSchema( String schemaLocation ) throws SAXException { NGCCRuntimeEx runtime = new NGCCRuntimeEx(parser,chameleonMode,this); runtime.currentSchema = this.currentSchema; @@ -235,7 +260,12 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { true, currentSchema.getTargetNamespace(), getLocator() ); } - /** Imports the specified schema. */ + /** + * Imports the specified schema. + * + * @param ns + * @param schemaLocation + * @throws org.xml.sax.SAXException */ public void importSchema( String ns, String schemaLocation ) throws SAXException { NGCCRuntimeEx newRuntime = new NGCCRuntimeEx(parser,false,this); InputSource source = resolveRelativeURL(ns,schemaLocation); @@ -317,9 +347,13 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { /** * Parses the specified entity. * + * @param source * @param importLocation * The source location of the import/include statement. * Used for reporting errors. + * @param includeMode + * @param expectedNamespace + * @throws org.xml.sax.SAXException */ public void parseEntity( InputSource source, boolean includeMode, String expectedNamespace, Locator importLocation ) throws SAXException { @@ -342,6 +376,8 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { /** * Creates a new instance of annotation parser. + * + * @return Annotation parser */ public AnnotationParser createAnnotationParser() { if(parser.getAnnotationParserFactory()==null) @@ -351,14 +387,19 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { } /** - * Gets the element name that contains the annotation element. - * This method works correctly only when called by the annotation handler. + * Gets the element name that contains the annotation element.This method works correctly only when called by the annotation handler. + * + * @return Element name */ public String getAnnotationContextElementName() { return elementNames.get( elementNames.size()-2 ); } - /** Creates a copy of the current locator object. */ + /** + * Creates a copy of the current locator object. + * + * @return Locator copy + */ public Locator copyLocator() { return new LocatorImpl(getLocator()); } @@ -397,6 +438,7 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { this.uri = _uri; } + @Override public String resolveNamespacePrefix(String p) { if(p.equals(prefix)) return uri; if(previous==null) return null; @@ -408,14 +450,20 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { private final Context previous; // XSDLib don't use those methods, so we cut a corner here. + @Override public String getBaseUri() { return null; } + @Override public boolean isNotation(String arg0) { return false; } + @Override public boolean isUnparsedEntity(String arg0) { return false; } } private Context currentContext=null; - /** Returns an immutable snapshot of the current context. */ + /** Returns an immutable snapshot of the current context. + * + * @return Snapshot of current context + */ public ValidationContext createValidationContext() { return currentContext; } @@ -446,6 +494,7 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { * Parses UName under the given context. * @param qname Attribute name. * @return New {@link UName} instance based on attribute name. + * @throws org.xml.sax.SAXException */ public UName parseUName(final String qname ) throws SAXException { int idx = qname.indexOf(':'); diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/util/Uri.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/util/Uri.java deleted file mode 100644 index d6cddc7529b..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/util/Uri.java +++ /dev/null @@ -1,187 +0,0 @@ -/* -Copyright (c) 2001, 2002 Thai Open Source Software Center Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of the Thai Open Source Software Center Ltd nor - the names of its contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -// @@3RD PARTY CODE@@ - -package com.sun.xml.internal.xsom.impl.util; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URL; - -public class Uri { - private static String utf8 = "UTF-8"; - - public static boolean isValid(String s) { - return isValidPercent(s) && isValidFragment(s) && isValidScheme(s); - } - - private static final String HEX_DIGITS = "0123456789abcdef"; - - public static String escapeDisallowedChars(String s) { - StringBuffer buf = null; - int len = s.length(); - int done = 0; - for (;;) { - int i = done; - for (;;) { - if (i == len) { - if (done == 0) - return s; - break; - } - if (isExcluded(s.charAt(i))) - break; - i++; - } - if (buf == null) - buf = new StringBuffer(); - if (i > done) { - buf.append(s.substring(done, i)); - done = i; - } - if (i == len) - break; - for (i++; i < len && isExcluded(s.charAt(i)); i++) - ; - String tem = s.substring(done, i); - byte[] bytes; - try { - bytes = tem.getBytes(utf8); - } - catch (UnsupportedEncodingException e) { - utf8 = "UTF8"; - try { - bytes = tem.getBytes(utf8); - } - catch (UnsupportedEncodingException e2) { - // Give up - return s; - } - } - for (int j = 0; j < bytes.length; j++) { - buf.append('%'); - buf.append(HEX_DIGITS.charAt((bytes[j] & 0xFF) >> 4)); - buf.append(HEX_DIGITS.charAt(bytes[j] & 0xF)); - } - done = i; - } - return buf.toString(); - } - - private static String excluded = "<>\"{}|\\^`"; - - private static boolean isExcluded(char c) { - return c <= 0x20 || c >= 0x7F || excluded.indexOf(c) >= 0; - } - - private static boolean isAlpha(char c) { - return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'); - } - - private static boolean isHexDigit(char c) { - return ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F') || isDigit(c); - } - - private static boolean isDigit(char c) { - return '0' <= c && c <= '9'; - } - - private static boolean isSchemeChar(char c) { - return isAlpha(c) || isDigit(c) || c == '+' || c == '-' || c =='.'; - } - - private static boolean isValidPercent(String s) { - int len = s.length(); - for (int i = 0; i < len; i++) - if (s.charAt(i) == '%') { - if (i + 2 >= len) - return false; - else if (!isHexDigit(s.charAt(i + 1)) - || !isHexDigit(s.charAt(i + 2))) - return false; - } - return true; - } - - private static boolean isValidFragment(String s) { - int i = s.indexOf('#'); - return i < 0 || s.indexOf('#', i + 1) < 0; - } - - private static boolean isValidScheme(String s) { - if (!isAbsolute(s)) - return true; - int i = s.indexOf(':'); - if (i == 0 - || i + 1 == s.length() - || !isAlpha(s.charAt(0))) - return false; - while (--i > 0) - if (!isSchemeChar(s.charAt(i))) - return false; - return true; - } - - public static String resolve(String baseUri, String uriReference) throws IOException { - if (isAbsolute(uriReference)) - return uriReference; - - if(baseUri==null) - throw new IOException("Unable to resolve relative URI "+uriReference+" without a base URI"); - - if(!isAbsolute(baseUri)) - throw new IOException("Unable to resolve relative URI "+uriReference+" because base URI is not absolute: "+baseUri); - - return new URL(new URL(baseUri), uriReference).toString(); - } - - public static boolean hasFragmentId(String uri) { - return uri.indexOf('#') >= 0; - } - - public static boolean isAbsolute(String uri) { - int i = uri.indexOf(':'); - if (i < 0) - return false; - while (--i >= 0) { - switch (uri.charAt(i)) { - case '#': - case '/': - case '?': - return false; - } - } - return true; - } -} diff --git a/jaxws/src/jdk.xml.bind/share/classes/module-info.java b/jaxws/src/jdk.xml.bind/share/classes/module-info.java index 8757ce45f33..2fb19012634 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/module-info.java +++ b/jaxws/src/jdk.xml.bind/share/classes/module-info.java @@ -23,6 +23,21 @@ * questions. */ +/** + * Defines tools for JAXB classes and XML schema generation, + * including the {@index schemagen schemagen tool} + * and {@index xjc xjc tool} tools. + * + *
    + *
    Tool Guides: + *
    {@extLink schemagen_tool_reference schemagen}, + * {@extLink xjc_tool_reference xjc} + *
    + * + * @moduleGraph + * @since 9 + */ +@Deprecated(since="9", forRemoval=true) module jdk.xml.bind { requires java.activation; requires java.compiler; @@ -54,15 +69,16 @@ module jdk.xml.bind { jdk.xml.ws; exports com.sun.xml.internal.xsom.parser to jdk.xml.ws; + // com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo uses JAXBContext + exports com.sun.tools.internal.xjc.generator.bean to + java.xml.bind; // XML document content needs to be exported opens com.sun.tools.internal.xjc.reader.xmlschema.bindinfo to java.xml.bind; - // com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo uses JAXBContext - exports com.sun.tools.internal.xjc.generator.bean to java.xml.bind; - uses com.sun.tools.internal.xjc.Plugin; + provides com.sun.tools.internal.xjc.Plugin with com.sun.tools.internal.xjc.addon.accessors.PluginImpl, com.sun.tools.internal.xjc.addon.at_generated.PluginImpl, diff --git a/jaxws/src/jdk.xml.bind/share/legal/freebxml.md b/jaxws/src/jdk.xml.bind/share/legal/freebxml.md new file mode 100644 index 00000000000..1648e61e928 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/legal/freebxml.md @@ -0,0 +1,58 @@ +## freebXML v3.1 + +### freebXML License v1.1.5 +
    +freebxml: Copyright (c) 2001 freebxml.org. All rights reserved.
    +
    +The names "The freebXML Registry Project" and "freebxml Software Foundation" must not be 
    +used to endorse or promote products derived from this software or be used in a product 
    +name without prior written permission. For written permission, 
    +please contact ebxmlrr-team@lists.sourceforge.net.
    +
    +This software consists of voluntary contributions made by many individuals on behalf of 
    +the the freebxml Software Foundation. For more information on the freebxml Software 
    +Foundation, please see .
    +
    +This product includes software developed by the Apache Software Foundation 
    +(http://www.apache.org/).
    +
    +The freebxml License, Version 1.1 5
    +Copyright (c) 2001 freebxml.org. All rights reserved.
    +
    +Redistribution and use in source and binary forms, with or without modification, are 
    +permitted provided that the following conditions are met:
    +
    +1. Redistributions of source code must retain the above copyright notice, this list of 
    +conditions and the following disclaimer.
    +
    +2. Redistributions in binary form must reproduce the above copyright notice, this list 
    +of conditions and the following disclaimer in the documentation and/or other materials 
    +provided with the distribution.
    +
    +3. The end-user documentation included with the redistribution, if any, must include the 
    +following acknowlegement:
    +
    +"This product includes software developed by freebxml.org (http://www.freebxml.org/)."
    +
    +Alternately, this acknowlegement may appear in the software itself, if and wherever 
    +such third-party acknowlegements normally appear.
    +
    +4. The names "The freebXML Registry Project", "freebxml Software Foundation" must not be 
    +used to endorse or promote products derived from this software without prior written 
    +permission. For written permission, please contact ebxmlrr-team@lists.sourceforge.net.
    +
    +5. Products derived from this software may not be called "freebxml", "freebXML Registry" 
    +nor may freebxml" appear in their names without prior written permission of the 
    +freebxml Group.
    +
    +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, 
    +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
    +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE freebxml SOFTWARE FOUNDATION OR 
    +ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
    +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
    +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
    +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
    +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
    +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    +
    +
    \ No newline at end of file diff --git a/jaxws/src/jdk.xml.bind/share/legal/relaxngdatatype.md b/jaxws/src/jdk.xml.bind/share/legal/relaxngdatatype.md index 54343b7483d..2555613c67c 100644 --- a/jaxws/src/jdk.xml.bind/share/legal/relaxngdatatype.md +++ b/jaxws/src/jdk.xml.bind/share/legal/relaxngdatatype.md @@ -3,7 +3,7 @@ ### RelaxNG Datatype License
     
    -Copyright (c) 2001, Thai Open Source Software Center Ltd, Sun Microsystems.
    +Copyright (c) 2005, 2010 Thai Open Source Software Center Ltd
     All rights reserved.
     
     Redistribution and use in source and binary forms, with or without
    diff --git a/jaxws/src/jdk.xml.bind/share/legal/xmlresolver.md b/jaxws/src/jdk.xml.bind/share/legal/xmlresolver.md
    index cf18bb439b3..696f8d3e148 100644
    --- a/jaxws/src/jdk.xml.bind/share/legal/xmlresolver.md
    +++ b/jaxws/src/jdk.xml.bind/share/legal/xmlresolver.md
    @@ -1,6 +1,6 @@
     ## Apache XML Resolver Library v1.2
     
    -### Notice
    +### Apache XML Resolver Notice
     
     
     Apache XML Commons Resolver
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/processor/ProcessorException.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/processor/ProcessorException.java
    index eb8fe7bcd0e..77108990cb6 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/processor/ProcessorException.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/processor/ProcessorException.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -27,9 +27,6 @@ package com.sun.tools.internal.ws.processor;
     
     import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
     
    -import java.util.Locale;
    -import java.util.ResourceBundle;
    -
     /**
      * ProcessorException represents an exception that occurred while processing
      * a web service.
    @@ -55,9 +52,4 @@ public class ProcessorException extends JAXWSExceptionBase {
         public String getDefaultResourceBundleName() {
             return "com.sun.tools.internal.ws.resources.processor";
         }
    -
    -    @Override
    -    public ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale);
    -    }
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java
    index d46e6cf9271..22bf34ee7ae 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -25,12 +25,12 @@
     
     package com.sun.tools.internal.ws.resources;
     
    -import com.sun.istack.internal.localization.Localizable;
    -import com.sun.istack.internal.localization.LocalizableMessageFactory;
    -import com.sun.istack.internal.localization.Localizer;
    -
     import java.util.Locale;
     import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.Localizable;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
     
     
     /**
    @@ -38,26 +38,32 @@ import java.util.ResourceBundle;
      *
      */
     public final class ConfigurationMessages {
    -    private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.configuration";
    -    private final static LocalizableMessageFactory messageFactory =
    -        new LocalizableMessageFactory(BUNDLE_NAME, ConfigurationMessages::getResourceBundle);
    -    private final static Localizer localizer = new Localizer();
     
    -    private static ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    -    }
    +    private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.configuration";
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ConfigurationMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
     
         public static Localizable localizableCONFIGURATION_NOT_BINDING_FILE(Object arg0) {
    -        return messageFactory.getMessage("configuration.notBindingFile", arg0);
    +        return MESSAGE_FACTORY.getMessage("configuration.notBindingFile", arg0);
         }
     
    -
         /**
          * Ignoring: binding file "{0}". It is not a jaxws or a jaxb binding file.
          *
          */
         public static String CONFIGURATION_NOT_BINDING_FILE(Object arg0) {
    -        return localizer.localize(localizableCONFIGURATION_NOT_BINDING_FILE(arg0));
    +        return LOCALIZER.localize(localizableCONFIGURATION_NOT_BINDING_FILE(arg0));
    +    }
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
         }
     
     }
    diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocal.properties
    similarity index 94%
    rename from jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties
    rename to jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocal.properties
    index c0267b823ea..d79956811cb 100644
    --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocal.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
     # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     #
     # This code is free software; you can redistribute it and/or modify it
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocalMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocalMessages.java
    new file mode 100644
    index 00000000000..24584fa50aa
    --- /dev/null
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocalMessages.java
    @@ -0,0 +1,69 @@
    +/*
    + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
    + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    + *
    + * This code is free software; you can redistribute it and/or modify it
    + * under the terms of the GNU General Public License version 2 only, as
    + * published by the Free Software Foundation.  Oracle designates this
    + * particular file as subject to the "Classpath" exception as provided
    + * by Oracle in the LICENSE file that accompanied this code.
    + *
    + * This code is distributed in the hope that it will be useful, but WITHOUT
    + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    + * version 2 for more details (a copy is included in the LICENSE file that
    + * accompanied this code).
    + *
    + * You should have received a copy of the GNU General Public License version
    + * 2 along with this work; if not, write to the Free Software Foundation,
    + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    + *
    + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    + * or visit www.oracle.com if you need additional information or have any
    + * questions.
    + */
    +
    +package com.sun.tools.internal.ws.resources;
    +
    +import java.util.Locale;
    +import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.Localizable;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
    +
    +
    +/**
    + * Defines string formatting method for each constant in the resource file
    + *
    + */
    +public final class ContextClassloaderLocalMessages {
    +
    +    private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.ContextClassloaderLocal";
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ContextClassloaderLocalMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
    +
    +    public static Localizable localizableFAILED_TO_CREATE_NEW_INSTANCE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("FAILED_TO_CREATE_NEW_INSTANCE", arg0);
    +    }
    +
    +    /**
    +     * Failed to create new instance of {0}
    +     *
    +     */
    +    public static String FAILED_TO_CREATE_NEW_INSTANCE(Object arg0) {
    +        return LOCALIZER.localize(localizableFAILED_TO_CREATE_NEW_INSTANCE(arg0));
    +    }
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
    +    }
    +
    +}
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java
    index a750a5741fd..5ab2dc817b1 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -25,12 +25,12 @@
     
     package com.sun.tools.internal.ws.resources;
     
    -import com.sun.istack.internal.localization.Localizable;
    -import com.sun.istack.internal.localization.LocalizableMessageFactory;
    -import com.sun.istack.internal.localization.Localizer;
    -
     import java.util.Locale;
     import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.Localizable;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
     
     
     /**
    @@ -38,65 +38,13 @@ import java.util.ResourceBundle;
      *
      */
     public final class GeneratorMessages {
    +
         private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.generator";
    -    private final static LocalizableMessageFactory messageFactory =
    -        new LocalizableMessageFactory(BUNDLE_NAME, GeneratorMessages::getResourceBundle);
    -    private final static Localizer localizer = new Localizer();
    -
    -    private static ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    -    }
    -
    -    public static Localizable localizableGENERATOR_SERVICE_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("generator.service.classAlreadyExist", arg0, arg1);
    -    }
    -
    -    /**
    -     * Could not generate Service, class: {0} already exists. Rename wsdl:Service "{1}" using JAX-WS customization
    -     *
    -     */
    -    public static String GENERATOR_SERVICE_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
    -        return localizer.localize(localizableGENERATOR_SERVICE_CLASS_ALREADY_EXIST(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableGENERATOR_SEI_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("generator.sei.classAlreadyExist", arg0, arg1);
    -    }
    -
    -    /**
    -     * Could not generate SEI, class: {0} already exists. Rename wsdl:portType "{1}" using JAX-WS customization
    -     *
    -     */
    -    public static String GENERATOR_SEI_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
    -        return localizer.localize(localizableGENERATOR_SEI_CLASS_ALREADY_EXIST(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableGENERATOR_NESTED_GENERATOR_ERROR(Object arg0) {
    -        return messageFactory.getMessage("generator.nestedGeneratorError", arg0);
    -    }
    -
    -    /**
    -     * generator error: {0}
    -     *
    -     */
    -    public static String GENERATOR_NESTED_GENERATOR_ERROR(Object arg0) {
    -        return localizer.localize(localizableGENERATOR_NESTED_GENERATOR_ERROR(arg0));
    -    }
    -
    -    public static Localizable localizableGENERATOR_INTERNAL_ERROR_SHOULD_NOT_HAPPEN(Object arg0) {
    -        return messageFactory.getMessage("generator.internal.error.should.not.happen", arg0);
    -    }
    -
    -    /**
    -     * internal error (should not happen): {0}
    -     *
    -     */
    -    public static String GENERATOR_INTERNAL_ERROR_SHOULD_NOT_HAPPEN(Object arg0) {
    -        return localizer.localize(localizableGENERATOR_INTERNAL_ERROR_SHOULD_NOT_HAPPEN(arg0));
    -    }
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new GeneratorMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
     
         public static Localizable localizableGENERATOR_INDENTINGWRITER_CHARSET_CANTENCODE(Object arg0) {
    -        return messageFactory.getMessage("generator.indentingwriter.charset.cantencode", arg0);
    +        return MESSAGE_FACTORY.getMessage("generator.indentingwriter.charset.cantencode", arg0);
         }
     
         /**
    @@ -104,11 +52,11 @@ public final class GeneratorMessages {
          *
          */
         public static String GENERATOR_INDENTINGWRITER_CHARSET_CANTENCODE(Object arg0) {
    -        return localizer.localize(localizableGENERATOR_INDENTINGWRITER_CHARSET_CANTENCODE(arg0));
    +        return LOCALIZER.localize(localizableGENERATOR_INDENTINGWRITER_CHARSET_CANTENCODE(arg0));
         }
     
         public static Localizable localizableGENERATOR_CANNOT_CREATE_DIR(Object arg0) {
    -        return messageFactory.getMessage("generator.cannot.create.dir", arg0);
    +        return MESSAGE_FACTORY.getMessage("generator.cannot.create.dir", arg0);
         }
     
         /**
    @@ -116,7 +64,66 @@ public final class GeneratorMessages {
          *
          */
         public static String GENERATOR_CANNOT_CREATE_DIR(Object arg0) {
    -        return localizer.localize(localizableGENERATOR_CANNOT_CREATE_DIR(arg0));
    +        return LOCALIZER.localize(localizableGENERATOR_CANNOT_CREATE_DIR(arg0));
    +    }
    +
    +    public static Localizable localizableGENERATOR_INTERNAL_ERROR_SHOULD_NOT_HAPPEN(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("generator.internal.error.should.not.happen", arg0);
    +    }
    +
    +    /**
    +     * internal error (should not happen): {0}
    +     *
    +     */
    +    public static String GENERATOR_INTERNAL_ERROR_SHOULD_NOT_HAPPEN(Object arg0) {
    +        return LOCALIZER.localize(localizableGENERATOR_INTERNAL_ERROR_SHOULD_NOT_HAPPEN(arg0));
    +    }
    +
    +    public static Localizable localizableGENERATOR_NESTED_GENERATOR_ERROR(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("generator.nestedGeneratorError", arg0);
    +    }
    +
    +    /**
    +     * generator error: {0}
    +     *
    +     */
    +    public static String GENERATOR_NESTED_GENERATOR_ERROR(Object arg0) {
    +        return LOCALIZER.localize(localizableGENERATOR_NESTED_GENERATOR_ERROR(arg0));
    +    }
    +
    +    public static Localizable localizableGENERATOR_SEI_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("generator.sei.classAlreadyExist", arg0, arg1);
    +    }
    +
    +    /**
    +     * Could not generate SEI, class: {0} already exists. Rename wsdl:portType "{1}" using JAX-WS customization
    +     *
    +     */
    +    public static String GENERATOR_SEI_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableGENERATOR_SEI_CLASS_ALREADY_EXIST(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableGENERATOR_SERVICE_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("generator.service.classAlreadyExist", arg0, arg1);
    +    }
    +
    +    /**
    +     * Could not generate Service, class: {0} already exists. Rename wsdl:Service "{1}" using JAX-WS customization
    +     *
    +     */
    +    public static String GENERATOR_SERVICE_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableGENERATOR_SERVICE_CLASS_ALREADY_EXIST(arg0, arg1));
    +    }
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
         }
     
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java
    index 8c72a46ce9c..dda631c0873 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -25,12 +25,12 @@
     
     package com.sun.tools.internal.ws.resources;
     
    -import com.sun.istack.internal.localization.Localizable;
    -import com.sun.istack.internal.localization.LocalizableMessageFactory;
    -import com.sun.istack.internal.localization.Localizer;
    -
     import java.util.Locale;
     import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.Localizable;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
     
     
     /**
    @@ -38,17 +38,13 @@ import java.util.ResourceBundle;
      *
      */
     public final class JavacompilerMessages {
    -    private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.javacompiler";
    -    private final static LocalizableMessageFactory messageFactory =
    -        new LocalizableMessageFactory(BUNDLE_NAME, JavacompilerMessages::getResourceBundle);
    -    private final static Localizer localizer = new Localizer();
     
    -    private static ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    -    }
    +    private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.javacompiler";
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new JavacompilerMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
     
         public static Localizable localizableNO_JAVACOMPILER_ERROR() {
    -        return messageFactory.getMessage("no.javacompiler.error");
    +        return MESSAGE_FACTORY.getMessage("no.javacompiler.error");
         }
     
         /**
    @@ -56,7 +52,18 @@ public final class JavacompilerMessages {
          *
          */
         public static String NO_JAVACOMPILER_ERROR() {
    -        return localizer.localize(localizableNO_JAVACOMPILER_ERROR());
    +        return LOCALIZER.localize(localizableNO_JAVACOMPILER_ERROR());
    +    }
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
         }
     
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java
    index 722a0a74a14..7fc93f86381 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -25,12 +25,12 @@
     
     package com.sun.tools.internal.ws.resources;
     
    -import com.sun.istack.internal.localization.Localizable;
    -import com.sun.istack.internal.localization.LocalizableMessageFactory;
    -import com.sun.istack.internal.localization.Localizer;
    -
     import java.util.Locale;
     import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.Localizable;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
     
     
     /**
    @@ -38,161 +38,61 @@ import java.util.ResourceBundle;
      *
      */
     public final class ModelMessages {
    +
         private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.model";
    -    private final static LocalizableMessageFactory messageFactory =
    -        new LocalizableMessageFactory(BUNDLE_NAME, ModelMessages::getResourceBundle);
    -    private final static Localizer localizer = new Localizer();
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ModelMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
     
    -    private static ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    -    }
    -
    -    public static Localizable localizableMODEL_NESTED_MODEL_ERROR(Object arg0) {
    -        return messageFactory.getMessage("model.nestedModelError", arg0);
    +    public static Localizable localizableMODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("model.importer.invalidMinorMinorOrPatchVersion", arg0, arg1, arg2);
         }
     
         /**
    -     * model error: {0}
    +     * model version "{1}" newer than runtime version "{2}" (line {0}): need to upgrade to a newer runtime
          *
          */
    -    public static String MODEL_NESTED_MODEL_ERROR(Object arg0) {
    -        return localizer.localize(localizableMODEL_NESTED_MODEL_ERROR(arg0));
    +    public static String MODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableMODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(arg0, arg1, arg2));
         }
     
    -    public static Localizable localizableMODEL_EXCEPTION_NOTUNIQUE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.exception.notunique", arg0, arg1);
    +    public static Localizable localizableMODEL_SCHEMA_UNSUPPORTED_TYPE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.unsupportedType", arg0, arg1, arg2);
         }
     
         /**
    -     * Failed to generate Java signature: duplicate exception names {0}. Use JAXWS binding customization to rename the wsdl:part "{1}"
    +     * unsupported type ({0}): "{1}" (namespace: {2})
          *
          */
    -    public static String MODEL_EXCEPTION_NOTUNIQUE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_EXCEPTION_NOTUNIQUE(arg0, arg1));
    +    public static String MODEL_SCHEMA_UNSUPPORTED_TYPE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_UNSUPPORTED_TYPE(arg0, arg1, arg2));
         }
     
    -    public static Localizable localizableMODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(Object arg0) {
    -        return messageFactory.getMessage("model.schema.invalidWildcard.allCompositor", arg0);
    +    public static Localizable localizableMODEL_IMPORTER_INVALID_CLASS(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("model.importer.invalidClass", arg0, arg1);
         }
     
         /**
    -     * xsd:all compositor not supported for the wildcard in schema type: "{0}"
    +     * invalid class name "{1}" in model document (line {0})
          *
          */
    -    public static String MODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(Object arg0) {
    -        return localizer.localize(localizableMODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(arg0));
    +    public static String MODEL_IMPORTER_INVALID_CLASS(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMODEL_IMPORTER_INVALID_CLASS(arg0, arg1));
         }
     
    -    public static Localizable localizableMODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(Object arg0) {
    -        return messageFactory.getMessage("model.schema.simpleTypeWithFacets", arg0);
    +    public static Localizable localizableMODEL_ARRAYWRAPPER_NO_SUBTYPES() {
    +        return MESSAGE_FACTORY.getMessage("model.arraywrapper.no.subtypes");
         }
     
         /**
    -     * facet "{0}" not supported on simple type: "{0}"
    +     * LiteralArrayWrapper cannot have subtypes
          *
          */
    -    public static String MODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(Object arg0) {
    -        return localizer.localize(localizableMODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(arg0));
    -    }
    -
    -    public static Localizable localizableMODEL_SCHEMA_UNION_NOT_SUPPORTED(Object arg0) {
    -        return messageFactory.getMessage("model.schema.unionNotSupported", arg0);
    -    }
    -
    -    /**
    -     * simpleType: "{0}" derivation by xsd:union not supported
    -     *
    -     */
    -    public static String MODEL_SCHEMA_UNION_NOT_SUPPORTED(Object arg0) {
    -        return localizer.localize(localizableMODEL_SCHEMA_UNION_NOT_SUPPORTED(arg0));
    -    }
    -
    -    public static Localizable localizableMODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(Object arg0) {
    -        return messageFactory.getMessage("model.complexType.simpleContent.reservedName", arg0);
    -    }
    -
    -    /**
    -     * invalid attribute name: "_value" in complexType: "{0}", _value is JAXWS reserved name, this name is generated in the generated javabean class to hold content value in the generated javabean class for complexType/simpleContent.
    -     *
    -     */
    -    public static String MODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(Object arg0) {
    -        return localizer.localize(localizableMODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(arg0));
    -    }
    -
    -    public static Localizable localizableMODEL_IMPORTER_INVALID_ID(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.importer.invalidId", arg0, arg1);
    -    }
    -
    -    /**
    -     * invalid id "{1} in model document (line {0})
    -     *
    -     */
    -    public static String MODEL_IMPORTER_INVALID_ID(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_IMPORTER_INVALID_ID(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("model.schema.jaxbException.message", arg0);
    -    }
    -
    -    /**
    -     * "{0}"
    -     *
    -     */
    -    public static String MODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableMODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(arg0));
    -    }
    -
    -    public static Localizable localizableMODEL_INVALID_MESSAGE_TYPE(Object arg0) {
    -        return messageFactory.getMessage("model.invalid.message.type", arg0);
    -    }
    -
    -    /**
    -     * invalid message type: {0}
    -     *
    -     */
    -    public static String MODEL_INVALID_MESSAGE_TYPE(Object arg0) {
    -        return localizer.localize(localizableMODEL_INVALID_MESSAGE_TYPE(arg0));
    -    }
    -
    -    public static Localizable localizableCONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION() {
    -        return messageFactory.getMessage("ConsoleErrorReporter.UnknownLocation");
    -    }
    -
    -    /**
    -     * unknown location
    -     *
    -     */
    -    public static String CONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION() {
    -        return localizer.localize(localizableCONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION());
    -    }
    -
    -    public static Localizable localizableMODEL_EXPORTER_UNSUPPORTED_CLASS(Object arg0) {
    -        return messageFactory.getMessage("model.exporter.unsupportedClass", arg0);
    -    }
    -
    -    /**
    -     * model exporter: unsupported class: {0}
    -     *
    -     */
    -    public static String MODEL_EXPORTER_UNSUPPORTED_CLASS(Object arg0) {
    -        return localizer.localize(localizableMODEL_EXPORTER_UNSUPPORTED_CLASS(arg0));
    -    }
    -
    -    public static Localizable localizableMODEL_SCHEMA_ELEMENT_NOT_FOUND(Object arg0) {
    -        return messageFactory.getMessage("model.schema.elementNotFound", arg0);
    -    }
    -
    -    /**
    -     * Element "{0}" not found.
    -     *
    -     */
    -    public static String MODEL_SCHEMA_ELEMENT_NOT_FOUND(Object arg0) {
    -        return localizer.localize(localizableMODEL_SCHEMA_ELEMENT_NOT_FOUND(arg0));
    +    public static String MODEL_ARRAYWRAPPER_NO_SUBTYPES() {
    +        return LOCALIZER.localize(localizableMODEL_ARRAYWRAPPER_NO_SUBTYPES());
         }
     
         public static Localizable localizableMODEL_UNIQUENESS_JAVASTRUCTURETYPE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.uniqueness.javastructuretype", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("model.uniqueness.javastructuretype", arg0, arg1);
         }
     
         /**
    @@ -200,11 +100,83 @@ public final class ModelMessages {
          *
          */
         public static String MODEL_UNIQUENESS_JAVASTRUCTURETYPE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_UNIQUENESS_JAVASTRUCTURETYPE(arg0, arg1));
    +        return LOCALIZER.localize(localizableMODEL_UNIQUENESS_JAVASTRUCTURETYPE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.invalidSimpleType.invalidItemType", arg0, arg1);
    +    }
    +
    +    /**
    +     * in simpleType: "{0}", itemType "{1}" can not be derived by list
    +     *
    +     */
    +    public static String MODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableMODEL_IMPORTER_INVALID_VERSION(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("model.importer.invalidVersion", arg0, arg1);
    +    }
    +
    +    /**
    +     * invalid version "{1}" in model document (line {0})
    +     *
    +     */
    +    public static String MODEL_IMPORTER_INVALID_VERSION(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMODEL_IMPORTER_INVALID_VERSION(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableMODEL_EXPORTER_UNSUPPORTED_CLASS(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.exporter.unsupportedClass", arg0);
    +    }
    +
    +    /**
    +     * model exporter: unsupported class: {0}
    +     *
    +     */
    +    public static String MODEL_EXPORTER_UNSUPPORTED_CLASS(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_EXPORTER_UNSUPPORTED_CLASS(arg0));
    +    }
    +
    +    public static Localizable localizableMODEL_NESTED_MODEL_ERROR(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.nestedModelError", arg0);
    +    }
    +
    +    /**
    +     * model error: {0}
    +     *
    +     */
    +    public static String MODEL_NESTED_MODEL_ERROR(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_NESTED_MODEL_ERROR(arg0));
    +    }
    +
    +    public static Localizable localizableMODEL_EXCEPTION_NOTUNIQUE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("model.exception.notunique", arg0, arg1);
    +    }
    +
    +    /**
    +     * Failed to generate Java signature: duplicate exception names {0}. Use JAXWS binding customization to rename the wsdl:part "{1}"
    +     *
    +     */
    +    public static String MODEL_EXCEPTION_NOTUNIQUE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMODEL_EXCEPTION_NOTUNIQUE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableMODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER() {
    +        return MESSAGE_FACTORY.getMessage("model.arraywrapper.only.one.member");
    +    }
    +
    +    /**
    +     * LiteralArrayWrapper may only have one element member.
    +     *
    +     */
    +    public static String MODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER() {
    +        return LOCALIZER.localize(localizableMODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER());
         }
     
         public static Localizable localizableMODEL_SAXPARSER_EXCEPTION(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.saxparser.exception", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("model.saxparser.exception", arg0, arg1);
         }
     
         /**
    @@ -213,217 +185,23 @@ public final class ModelMessages {
          *
          */
         public static String MODEL_SAXPARSER_EXCEPTION(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_SAXPARSER_EXCEPTION(arg0, arg1));
    +        return LOCALIZER.localize(localizableMODEL_SAXPARSER_EXCEPTION(arg0, arg1));
         }
     
    -    public static Localizable localizableMODEL_SCHEMA_UNSUPPORTED_TYPE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("model.schema.unsupportedType", arg0, arg1, arg2);
    +    public static Localizable localizableMODEL_IMPORTER_INVALID_ID(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("model.importer.invalidId", arg0, arg1);
         }
     
         /**
    -     * unsupported type ({0}): "{1}" (namespace: {2})
    +     * invalid id "{1} in model document (line {0})
          *
          */
    -    public static String MODEL_SCHEMA_UNSUPPORTED_TYPE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableMODEL_SCHEMA_UNSUPPORTED_TYPE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableMODEL_SCHEMA_LIST_NOT_SUPPORTED(Object arg0) {
    -        return messageFactory.getMessage("model.schema.listNotSupported", arg0);
    -    }
    -
    -    /**
    -     * simpleType: "{0}" derivation by xsd:list not supported
    -     *
    -     */
    -    public static String MODEL_SCHEMA_LIST_NOT_SUPPORTED(Object arg0) {
    -        return localizer.localize(localizableMODEL_SCHEMA_LIST_NOT_SUPPORTED(arg0));
    -    }
    -
    -    public static Localizable localizableMODEL_ARRAYWRAPPER_NO_PARENT() {
    -        return messageFactory.getMessage("model.arraywrapper.no.parent");
    -    }
    -
    -    /**
    -     * LiteralArrayWrapper cannot have a parent type
    -     *
    -     */
    -    public static String MODEL_ARRAYWRAPPER_NO_PARENT() {
    -        return localizer.localize(localizableMODEL_ARRAYWRAPPER_NO_PARENT());
    -    }
    -
    -    public static Localizable localizableMODEL_PARENT_TYPE_ALREADY_SET(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("model.parent.type.already.set", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * parent of type "{0}" already set to "{1}", new value = "{2}"
    -     *
    -     */
    -    public static String MODEL_PARENT_TYPE_ALREADY_SET(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableMODEL_PARENT_TYPE_ALREADY_SET(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableMODEL_ARRAYWRAPPER_NO_SUBTYPES() {
    -        return messageFactory.getMessage("model.arraywrapper.no.subtypes");
    -    }
    -
    -    /**
    -     * LiteralArrayWrapper cannot have subtypes
    -     *
    -     */
    -    public static String MODEL_ARRAYWRAPPER_NO_SUBTYPES() {
    -        return localizer.localize(localizableMODEL_ARRAYWRAPPER_NO_SUBTYPES());
    -    }
    -
    -    public static Localizable localizableMODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("model.importer.invalidMinorMinorOrPatchVersion", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * model version "{1}" newer than runtime version "{2}" (line {0}): need to upgrade to a newer runtime
    -     *
    -     */
    -    public static String MODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableMODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableMODEL_SCHEMA_CIRCULARITY(Object arg0) {
    -        return messageFactory.getMessage("model.schema.circularity", arg0);
    -    }
    -
    -    /**
    -     * circularity detected in schema: "{0}"
    -     *
    -     */
    -    public static String MODEL_SCHEMA_CIRCULARITY(Object arg0) {
    -        return localizer.localize(localizableMODEL_SCHEMA_CIRCULARITY(arg0));
    -    }
    -
    -    public static Localizable localizableMODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET() {
    -        return messageFactory.getMessage("model.arraywrapper.member.already.set");
    -    }
    -
    -    /**
    -     * LiteralArrayWrapper element member already set.
    -     *
    -     */
    -    public static String MODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET() {
    -        return localizer.localize(localizableMODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET());
    -    }
    -
    -    public static Localizable localizableMODEL_IMPORTER_INVALID_CLASS(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.importer.invalidClass", arg0, arg1);
    -    }
    -
    -    /**
    -     * invalid class name "{1}" in model document (line {0})
    -     *
    -     */
    -    public static String MODEL_IMPORTER_INVALID_CLASS(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_IMPORTER_INVALID_CLASS(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMODEL_IMPORTER_INVALID_VERSION(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.importer.invalidVersion", arg0, arg1);
    -    }
    -
    -    /**
    -     * invalid version "{1}" in model document (line {0})
    -     *
    -     */
    -    public static String MODEL_IMPORTER_INVALID_VERSION(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_IMPORTER_INVALID_VERSION(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableCONSOLE_ERROR_REPORTER_LINE_X_OF_Y(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("ConsoleErrorReporter.LineXOfY", arg0, arg1);
    -    }
    -
    -    /**
    -     *   line {0} of {1}
    -     *
    -     */
    -    public static String CONSOLE_ERROR_REPORTER_LINE_X_OF_Y(Object arg0, Object arg1) {
    -        return localizer.localize(localizableCONSOLE_ERROR_REPORTER_LINE_X_OF_Y(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.parameter.notunique", arg0, arg1);
    -    }
    -
    -    /**
    -     * Failed to generate Java signature: duplicate parameter name "{0}". Try one of these
    -     *  1. Use JAXWS binding customization to rename the wsdl:part "{1}"
    -     *  2. Run wsimport with -extension switch.
    -     *
    -     */
    -    public static String MODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_PARAMETER_NOTUNIQUE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.schema.invalidSimpleType.invalidItemType", arg0, arg1);
    -    }
    -
    -    /**
    -     * in simpleType: "{0}", itemType "{1}" can not be derived by list
    -     *
    -     */
    -    public static String MODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMODEL_UNIQUENESS() {
    -        return messageFactory.getMessage("model.uniqueness");
    -    }
    -
    -    /**
    -     * uniqueness constraint violation
    -     *
    -     */
    -    public static String MODEL_UNIQUENESS() {
    -        return localizer.localize(localizableMODEL_UNIQUENESS());
    -    }
    -
    -    public static Localizable localizable_002F_002F_REPLACEMENT() {
    -        return messageFactory.getMessage("//replacement");
    -    }
    -
    -    /**
    -     * for Uxxx codes
    -     *
    -     */
    -    public static String _002F_002F_REPLACEMENT() {
    -        return localizer.localize(localizable_002F_002F_REPLACEMENT());
    -    }
    -
    -    public static Localizable localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.schema.invalidSimpleType.noItemLiteralType", arg0, arg1);
    -    }
    -
    -    /**
    -     * in simpleType: "{0}", xsd:list itemType "{1}" is invalid
    -     *
    -     */
    -    public static String MODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER() {
    -        return messageFactory.getMessage("model.arraywrapper.only.one.member");
    -    }
    -
    -    /**
    -     * LiteralArrayWrapper may only have one element member.
    -     *
    -     */
    -    public static String MODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER() {
    -        return localizer.localize(localizableMODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER());
    +    public static String MODEL_IMPORTER_INVALID_ID(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMODEL_IMPORTER_INVALID_ID(arg0, arg1));
         }
     
         public static Localizable localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.parameter.notunique.wrapper", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("model.parameter.notunique.wrapper", arg0, arg1);
         }
     
         /**
    @@ -434,23 +212,47 @@ public final class ModelMessages {
          *
          */
         public static String MODEL_PARAMETER_NOTUNIQUE_WRAPPER(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(arg0, arg1));
    +        return LOCALIZER.localize(localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(arg0, arg1));
         }
     
    -    public static Localizable localizableMODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) {
    -        return messageFactory.getMessage("model.schema.notImplemented", arg0);
    +    public static Localizable localizableMODEL_SCHEMA_ELEMENT_NOT_FOUND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.elementNotFound", arg0);
         }
     
         /**
    -     * unsupported XML Schema feature ({0})
    +     * Element "{0}" not found.
          *
          */
    -    public static String MODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) {
    -        return localizer.localize(localizableMODEL_SCHEMA_NOT_IMPLEMENTED(arg0));
    +    public static String MODEL_SCHEMA_ELEMENT_NOT_FOUND(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_ELEMENT_NOT_FOUND(arg0));
    +    }
    +
    +    public static Localizable localizableMODEL_SCHEMA_UNION_NOT_SUPPORTED(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.unionNotSupported", arg0);
    +    }
    +
    +    /**
    +     * simpleType: "{0}" derivation by xsd:union not supported
    +     *
    +     */
    +    public static String MODEL_SCHEMA_UNION_NOT_SUPPORTED(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_UNION_NOT_SUPPORTED(arg0));
    +    }
    +
    +    public static Localizable localizableCONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION() {
    +        return MESSAGE_FACTORY.getMessage("ConsoleErrorReporter.UnknownLocation");
    +    }
    +
    +    /**
    +     * unknown location
    +     *
    +     */
    +    public static String CONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION() {
    +        return LOCALIZER.localize(localizableCONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION());
         }
     
         public static Localizable localizableMODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(Object arg0) {
    -        return messageFactory.getMessage("model.schema.invalidLiteralInEnumeration.anonymous", arg0);
    +        return MESSAGE_FACTORY.getMessage("model.schema.invalidLiteralInEnumeration.anonymous", arg0);
         }
     
         /**
    @@ -458,23 +260,11 @@ public final class ModelMessages {
          *
          */
         public static String MODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(Object arg0) {
    -        return localizer.localize(localizableMODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(arg0));
    -    }
    -
    -    public static Localizable localizableMODEL_PART_NOT_UNIQUE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("model.part.notUnique", arg0, arg1);
    -    }
    -
    -    /**
    -     * parts in wsdl:message "{0}", reference "{1}", they must reference unique global elements.
    -     *
    -     */
    -    public static String MODEL_PART_NOT_UNIQUE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMODEL_PART_NOT_UNIQUE(arg0, arg1));
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(arg0));
         }
     
         public static Localizable localizableMODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER() {
    -        return messageFactory.getMessage("model.arraywrapper.no.content.member");
    +        return MESSAGE_FACTORY.getMessage("model.arraywrapper.no.content.member");
         }
     
         /**
    @@ -482,7 +272,224 @@ public final class ModelMessages {
          *
          */
         public static String MODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER() {
    -        return localizer.localize(localizableMODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER());
    +        return LOCALIZER.localize(localizableMODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER());
    +    }
    +
    +    public static Localizable localizableMODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET() {
    +        return MESSAGE_FACTORY.getMessage("model.arraywrapper.member.already.set");
    +    }
    +
    +    /**
    +     * LiteralArrayWrapper element member already set.
    +     *
    +     */
    +    public static String MODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET() {
    +        return LOCALIZER.localize(localizableMODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET());
    +    }
    +
    +    public static Localizable localizableMODEL_INVALID_MESSAGE_TYPE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.invalid.message.type", arg0);
    +    }
    +
    +    /**
    +     * invalid message type: {0}
    +     *
    +     */
    +    public static String MODEL_INVALID_MESSAGE_TYPE(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_INVALID_MESSAGE_TYPE(arg0));
    +    }
    +
    +    public static Localizable localizableMODEL_SCHEMA_CIRCULARITY(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.circularity", arg0);
    +    }
    +
    +    /**
    +     * circularity detected in schema: "{0}"
    +     *
    +     */
    +    public static String MODEL_SCHEMA_CIRCULARITY(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_CIRCULARITY(arg0));
    +    }
    +
    +    public static Localizable localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.invalidSimpleType.noItemLiteralType", arg0, arg1);
    +    }
    +
    +    /**
    +     * in simpleType: "{0}", xsd:list itemType "{1}" is invalid
    +     *
    +     */
    +    public static String MODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableMODEL_SCHEMA_LIST_NOT_SUPPORTED(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.listNotSupported", arg0);
    +    }
    +
    +    /**
    +     * simpleType: "{0}" derivation by xsd:list not supported
    +     *
    +     */
    +    public static String MODEL_SCHEMA_LIST_NOT_SUPPORTED(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_LIST_NOT_SUPPORTED(arg0));
    +    }
    +
    +    public static Localizable localizable_002F_002F_REPLACEMENT() {
    +        return MESSAGE_FACTORY.getMessage("//replacement");
    +    }
    +
    +    /**
    +     * for Uxxx codes
    +     *
    +     */
    +    public static String _002F_002F_REPLACEMENT() {
    +        return LOCALIZER.localize(localizable_002F_002F_REPLACEMENT());
    +    }
    +
    +    public static Localizable localizableMODEL_PART_NOT_UNIQUE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("model.part.notUnique", arg0, arg1);
    +    }
    +
    +    /**
    +     * parts in wsdl:message "{0}", reference "{1}", they must reference unique global elements.
    +     *
    +     */
    +    public static String MODEL_PART_NOT_UNIQUE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMODEL_PART_NOT_UNIQUE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableMODEL_ARRAYWRAPPER_NO_PARENT() {
    +        return MESSAGE_FACTORY.getMessage("model.arraywrapper.no.parent");
    +    }
    +
    +    /**
    +     * LiteralArrayWrapper cannot have a parent type
    +     *
    +     */
    +    public static String MODEL_ARRAYWRAPPER_NO_PARENT() {
    +        return LOCALIZER.localize(localizableMODEL_ARRAYWRAPPER_NO_PARENT());
    +    }
    +
    +    public static Localizable localizableMODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.complexType.simpleContent.reservedName", arg0);
    +    }
    +
    +    /**
    +     * invalid attribute name: "_value" in complexType: "{0}", _value is JAXWS reserved name, this name is generated in the generated javabean class to hold content value in the generated javabean class for complexType/simpleContent.
    +     *
    +     */
    +    public static String MODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(arg0));
    +    }
    +
    +    public static Localizable localizableMODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.simpleTypeWithFacets", arg0);
    +    }
    +
    +    /**
    +     * facet "{0}" not supported on simple type: "{0}"
    +     *
    +     */
    +    public static String MODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(arg0));
    +    }
    +
    +    public static Localizable localizableMODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.notImplemented", arg0);
    +    }
    +
    +    /**
    +     * unsupported XML Schema feature ({0})
    +     *
    +     */
    +    public static String MODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_NOT_IMPLEMENTED(arg0));
    +    }
    +
    +    public static Localizable localizableMODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.jaxbException.message", arg0);
    +    }
    +
    +    /**
    +     * "{0}"
    +     *
    +     */
    +    public static String MODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(arg0));
    +    }
    +
    +    public static Localizable localizableMODEL_UNIQUENESS() {
    +        return MESSAGE_FACTORY.getMessage("model.uniqueness");
    +    }
    +
    +    /**
    +     * uniqueness constraint violation
    +     *
    +     */
    +    public static String MODEL_UNIQUENESS() {
    +        return LOCALIZER.localize(localizableMODEL_UNIQUENESS());
    +    }
    +
    +    public static Localizable localizableMODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("model.schema.invalidWildcard.allCompositor", arg0);
    +    }
    +
    +    /**
    +     * xsd:all compositor not supported for the wildcard in schema type: "{0}"
    +     *
    +     */
    +    public static String MODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(Object arg0) {
    +        return LOCALIZER.localize(localizableMODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(arg0));
    +    }
    +
    +    public static Localizable localizableCONSOLE_ERROR_REPORTER_LINE_X_OF_Y(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("ConsoleErrorReporter.LineXOfY", arg0, arg1);
    +    }
    +
    +    /**
    +     *   line {0} of {1}
    +     *
    +     */
    +    public static String CONSOLE_ERROR_REPORTER_LINE_X_OF_Y(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableCONSOLE_ERROR_REPORTER_LINE_X_OF_Y(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableMODEL_PARENT_TYPE_ALREADY_SET(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("model.parent.type.already.set", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * parent of type "{0}" already set to "{1}", new value = "{2}"
    +     *
    +     */
    +    public static String MODEL_PARENT_TYPE_ALREADY_SET(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableMODEL_PARENT_TYPE_ALREADY_SET(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableMODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("model.parameter.notunique", arg0, arg1);
    +    }
    +
    +    /**
    +     * Failed to generate Java signature: duplicate parameter name "{0}". Try one of these
    +     *  1. Use JAXWS binding customization to rename the wsdl:part "{1}"
    +     *  2. Run wsimport with -extension switch.
    +     *
    +     */
    +    public static String MODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMODEL_PARAMETER_NOTUNIQUE(arg0, arg1));
    +    }
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
         }
     
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java
    index 708ffc37008..542aa686d73 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -25,12 +25,12 @@
     
     package com.sun.tools.internal.ws.resources;
     
    -import com.sun.istack.internal.localization.Localizable;
    -import com.sun.istack.internal.localization.LocalizableMessageFactory;
    -import com.sun.istack.internal.localization.Localizer;
    -
     import java.util.Locale;
     import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.Localizable;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
     
     
     /**
    @@ -38,401 +38,13 @@ import java.util.ResourceBundle;
      *
      */
     public final class ModelerMessages {
    +
         private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.modeler";
    -    private final static LocalizableMessageFactory messageFactory =
    -        new LocalizableMessageFactory(BUNDLE_NAME, ModelerMessages::getResourceBundle);
    -    private final static Localizer localizer = new Localizer();
    -
    -    private static ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    -    }
    -
    -    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("mimemodeler.invalidMimeContent.invalidSchemaType", arg0, arg1);
    -    }
    -
    -    /**
    -     * Ignoring the mime:part. mime part: {0} can not be mapped to schema type: {1}
    -     *
    -     */
    -    public static String MIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.parameterorder.parameter", arg0, arg1);
    -    }
    -
    -    /**
    -     * "{0}" specified in the parameterOrder attribute of operation "{1}" is not a valid part of the message.
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_NO_SOAP_FAULT_NAME(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.noSoapFaultName", arg0, arg1);
    -    }
    -
    -    /**
    -     * soap:fault name not specified, wsdl:fault "{0}" in operation "{1}"
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_FAULT_NO_SOAP_FAULT_NAME(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_NO_SOAP_FAULT_NAME(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_IMPORT() {
    -        return messageFactory.getMessage("wsdlmodeler.warning.nonconforming.wsdl.import");
    -    }
    -
    -    /**
    -     * Non conforming WS-I WSDL used for wsdl:import
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_NONCONFORMING_WSDL_IMPORT() {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_IMPORT());
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace", arg0);
    -    }
    -
    -    /**
    -     * output message of binding operation "{0}" must specify a value for the "namespace" attribute
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.operation.fault.notLiteral", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring encoded fault "{0}" in literal binding operation "{1}"
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody", arg0);
    -    }
    -
    -    /**
    -     * input message of binding operation "{0}" does not have a SOAP body extension
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport", arg0);
    -    }
    -
    -    /**
    -     * ignoring SOAP port "{0}": unrecognized transport. try running wsimport with -extension switch.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.notFound", arg0, arg1);
    -    }
    -
    -    /**
    -     * in binding "{1}", operation "{0}" does not match any operation in the corresponding port type
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_UNSUPPORTED_BINDING_MIME() {
    -        return messageFactory.getMessage("wsdlmodeler.unsupportedBinding.mime");
    -    }
    -
    -    /**
    -     * WSDL MIME binding is not currently supported!
    -     *
    -     */
    -    public static String WSDLMODELER_UNSUPPORTED_BINDING_MIME() {
    -        return localizer.localize(localizableWSDLMODELER_UNSUPPORTED_BINDING_MIME());
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NO_ELEMENT_ATTRIBUTE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * ignoring header fault part="{0}" message="{1}" of operation {2}
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NO_ELEMENT_ATTRIBUTE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NO_ELEMENT_ATTRIBUTE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * Invalid operation "{0}", can''t generate java method. Parameter: part "{2}" in wsdl:message "{1}", is a java keyword. Use customization to change the parameter name or change the wsdl:part name.
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_HEADERFAULT_NOT_LITERAL(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.headerfault.notLiteral", arg0, arg1);
    -    }
    -
    -    /**
    -     * Invalid headerfault "{0}" of binding operation "{1}": not literal
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_HEADERFAULT_NOT_LITERAL(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_HEADERFAULT_NOT_LITERAL(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_DIFFERENT_PART() {
    -        return messageFactory.getMessage("mimemodeler.invalidMimeContent.differentPart");
    -    }
    -
    -    /**
    -     * Ignoring the mime:part. Invalid mime:part, the mime:content has different part attribute.
    -     *
    -     */
    -    public static String MIMEMODELER_INVALID_MIME_CONTENT_DIFFERENT_PART() {
    -        return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_DIFFERENT_PART());
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_ERROR_PART_NOT_FOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.error.partNotFound", arg0, arg1);
    -    }
    -
    -    /**
    -     * part "{1}" of operation "{0}" could not be resolved!
    -     *
    -     */
    -    public static String WSDLMODELER_ERROR_PART_NOT_FOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_ERROR_PART_NOT_FOUND(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor", arg0, arg1);
    -    }
    -
    -    /**
    -     * Invalid header "{0}" in operation {1}: part must specify a "element" attribute
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName", arg0);
    -    }
    -
    -    /**
    -     * Invalid operation "{0}", it''s java reserved word, can''t generate java method. Use customization to change the operation name.
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.outputMissingSoapFault", arg0, arg1);
    -    }
    -
    -    /**
    -     * fault "{0}" in operation "{1}" does not have a SOAP fault extension
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart", arg0);
    -    }
    -
    -    /**
    -     * ignoring operation "{0}": message part does not refer to a schema type declaration
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODLER_WARNING_OPERATION_USE() {
    -        return messageFactory.getMessage("wsdlmodler.warning.operation.use");
    -    }
    -
    -    /**
    -     * The WSDL used has operations with literal and encoded use. -f:searchschema is not supported for this scenario.
    -     *
    -     */
    -    public static String WSDLMODLER_WARNING_OPERATION_USE() {
    -        return localizer.localize(localizableWSDLMODLER_WARNING_OPERATION_USE());
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringNonSOAPPort", arg0);
    -    }
    -
    -    /**
    -     * ignoring port "{0}": not a standard SOAP port. try running wsimport with -extension switch.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_MESSAGE_HAS_MORE_THAN_ONE_PART(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart", arg0, arg1);
    -    }
    -
    -    /**
    -     * fault "{0}" refers to message "{1}", but the message has more than one parts
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_FAULT_MESSAGE_HAS_MORE_THAN_ONE_PART(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_MESSAGE_HAS_MORE_THAN_ONE_PART(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND() {
    -        return messageFactory.getMessage("wsdlmodeler.warning.noServiceDefinitionsFound");
    -    }
    -
    -    /**
    -     * WSDL document does not define any services
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND() {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND());
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringFault.cant.resolve.message", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring fault "{0}" of binding operation "{1}": cannot resolve message
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_CANT_RESOLVE_MESSAGE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_JAXB_JAVATYPE_NOTFOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.jaxb.javatype.notfound", arg0, arg1);
    -    }
    -
    -    /**
    -     * Schema descriptor {0} in message part "{1}" is not defined and could not be bound to Java. Perhaps the schema descriptor {0} is not defined in the schema imported/included in the WSDL. You can either add such imports/includes or run wsimport and provide the schema location using -b switch.
    -     *
    -     */
    -    public static String WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_JAXB_JAVATYPE_NOTFOUND(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_MIXED_STYLE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.port.SOAPBinding.mixedStyle", arg0);
    -    }
    -
    -    /**
    -     * not a WS-I BP1.1 compliant SOAP port "{0}": the WSDL binding has mixed style, it must be rpc-literal or document-literal operation!
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_PORT_SOAP_BINDING_MIXED_STYLE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_MIXED_STYLE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_DOCLITOPERATION(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.doclitoperation", arg0);
    -    }
    -
    -    /**
    -     * Invalid wsdl:operation "{0}": its a document-literal operation,  message part must refer to a schema element declaration
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_DOCLITOPERATION(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_DOCLITOPERATION(arg0));
    -    }
    -
    -    public static Localizable localizableMODELER_NESTED_MODEL_ERROR(Object arg0) {
    -        return messageFactory.getMessage("modeler.nestedModelError", arg0);
    -    }
    -
    -    /**
    -     * modeler error: {0}
    -     *
    -     */
    -    public static String MODELER_NESTED_MODEL_ERROR(Object arg0) {
    -        return localizer.localize(localizableMODELER_NESTED_MODEL_ERROR(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_DUPLICATE_FAULT_SOAP_NAME(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.duplicate.fault.soap.name", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * ignoring fault "{0}" of operation "{1}", soap:fault name "{2}" is not unique
    -     *
    -     */
    -    public static String WSDLMODELER_DUPLICATE_FAULT_SOAP_NAME(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_DUPLICATE_FAULT_SOAP_NAME(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_WRONG_SOAP_FAULT_NAME(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.wrongSoapFaultName", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * name of soap:fault "{0}" doesn''t match the name of wsdl:fault "{1}" in operation "{2}"
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_FAULT_WRONG_SOAP_FAULT_NAME(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_WRONG_SOAP_FAULT_NAME(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_LITERAL(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.notLiteral", arg0);
    -    }
    -
    -    /**
    -     * ignoring document-style operation "{0}": parameters are not literal
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_LITERAL(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_LITERAL(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_DOCUMENT_STYLE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle", arg0);
    -    }
    -
    -    /**
    -     * ignoring operation "{0}": cannot handle document-style operations
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_DOCUMENT_STYLE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_DOCUMENT_STYLE(arg0));
    -    }
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ModelerMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
     
         public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_LITERAL(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringFault.notLiteral", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringFault.notLiteral", arg0, arg1);
         }
     
         /**
    @@ -440,359 +52,11 @@ public final class ModelerMessages {
          *
          */
         public static String WSDLMODELER_WARNING_IGNORING_FAULT_NOT_LITERAL(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_LITERAL(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_RPCLITOPERATION(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.rpclitoperation", arg0);
    -    }
    -
    -    /**
    -     * Invalid wsdl:operation "{0}": its a rpc-literal operation,  message part must refer to a schema type declaration
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_RPCLITOPERATION(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_RPCLITOPERATION(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName", arg0, arg1);
    -    }
    -
    -    /**
    -     * Invalid operation "{0}", can''t generate java method. Parameter,customized name "{1}"  is a java keyword.
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.memberSubmissionAddressingUsed", arg0, arg1);
    -    }
    -
    -    /**
    -     * obsolete addressing version 08-2004:"{0}" used; version "{1}" should be used instead.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.bindingOperation.multiplePartBinding", arg0, arg1);
    -    }
    -
    -    /**
    -     * Check the abstract operation "{0}" binding, part "{1}" has multiple binding. Will try to generated artifacts anyway...
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_12(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.port.SOAPBinding12", arg0);
    -    }
    -
    -    /**
    -     * SOAP port "{0}": uses a non-standard SOAP 1.2 binding.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_PORT_SOAP_BINDING_12(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_12(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_PORT_TYPE_FAULT_NOT_FOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.portTypeFault.notFound", arg0, arg1);
    -    }
    -
    -    /**
    -     * fault "{0}" in portType operation "{1}" does not match any fault in the corresponding binding operation
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_PORT_TYPE_FAULT_NOT_FOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_PORT_TYPE_FAULT_NOT_FOUND(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(Object arg0) {
    -        return messageFactory.getMessage("mimemodeler.invalidMimePart.nameNotAllowed", arg0);
    -    }
    -
    -    /**
    -     * name attribute on wsdl:part in Operation "{0}" is ignored. Its not allowed as per WS-I AP 1.0.
    -     *
    -     */
    -    public static String MIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(Object arg0) {
    -        return localizer.localize(localizableMIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_MIME_PART_NOT_FOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringMimePart.notFound", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring mime:part, cannot find part "{0}" referenced by the mime:content in the wsdl:operation "{1}"
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_MIME_PART_NOT_FOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_MIME_PART_NOT_FOUND(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.operation.MoreThanOnePartInMessage", arg0);
    -    }
    -
    -    /**
    -     * Ignoring operation "{0}": more than one part bound to body
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * Ignoring operation "{0}", can''t generate java method. Parameter: part "{2}" in wsdl:message "{1}", is a java keyword. Use customization to change the parameter name or change the wsdl:part name.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.fault.cant.resolve.message", arg0, arg1);
    -    }
    -
    -    /**
    -     * fault message "{0}" in binding operation "{1}" could not be resolved
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_FAULT_CANT_RESOLVE_MESSAGE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.emptyMessage", arg0, arg1);
    -    }
    -
    -    /**
    -     * fault "{0}" refers to message "{1}", but the message has no parts
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.rpclit.unkownschematype", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * XML type "{0}" could not be resolved, XML to JAVA binding failed! Please check the wsdl:part "{1}" in the wsdl:message "{2}".
    -     *
    -     */
    -    public static String WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_BODY_PARTS_ATTRIBUTE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute", arg0);
    -    }
    -
    -    /**
    -     * ignoring operation "{0}": cannot handle "parts" attribute of "soap:body" element
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_BODY_PARTS_ATTRIBUTE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_BODY_PARTS_ATTRIBUTE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_NON_UNIQUE_BODY_ERROR(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return messageFactory.getMessage("wsdlmodeler.nonUnique.body.error", arg0, arg1, arg2, arg3);
    -    }
    -
    -    /**
    -     * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. In port {0}, Operations "{1}" and "{2}" have the same request body block {3}. Try running wsimport with -extension switch, runtime will try to dispatch using SOAPAction
    -     *
    -     */
    -    public static String WSDLMODELER_NON_UNIQUE_BODY_ERROR(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return localizer.localize(localizableWSDLMODELER_NON_UNIQUE_BODY_ERROR(arg0, arg1, arg2, arg3));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle", arg0);
    -    }
    -
    -    /**
    -     * ignoring port "{0}", its not WS-I BP 1.1 compliant: the wsdl binding has mixed style, it must be rpc-literal or document-literal operation. try running wsimport with -extension switch.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(arg0));
    -    }
    -
    -    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(Object arg0) {
    -        return messageFactory.getMessage("mimemodeler.invalidMimeContent.missingTypeAttribute", arg0);
    -    }
    -
    -    /**
    -     * Missing type attribute in mime:content in operation "{0}". part attribute must be present in mime:content declaration.
    -     *
    -     */
    -    public static String MIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(Object arg0) {
    -        return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_INPUT_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage", arg0);
    -    }
    -
    -    /**
    -     * ignoring operation "{0}": input message is empty
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_INPUT_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_INPUT_MESSAGE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_NO_PORTS_IN_SERVICE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.noPortsInService", arg0);
    -    }
    -
    -    /**
    -     * Service "{0}" does not contain any usable ports. try running wsimport with -extension switch.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_NO_PORTS_IN_SERVICE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_NO_PORTS_IN_SERVICE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_PARAMETER_ORDER_TOO_MANY_UNMENTIONED_PARTS(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts", arg0);
    -    }
    -
    -    /**
    -     * more than one part left out in the parameterOrder attribute of operation "{0}"
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_PARAMETER_ORDER_TOO_MANY_UNMENTIONED_PARTS(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_PARAMETER_ORDER_TOO_MANY_UNMENTIONED_PARTS(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace", arg0);
    -    }
    -
    -    /**
    -     * input message of binding operation "{0}" must specify a value for the "namespace" attribute
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring header "{0}" of binding operation "{1}"
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_HEADER(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_RESPONSEBEAN_NOTFOUND(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.responsebean.notfound", arg0);
    -    }
    -
    -    /**
    -     * wsimport failed to generate async response bean for operation: {0}
    -     *
    -     */
    -    public static String WSDLMODELER_RESPONSEBEAN_NOTFOUND(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_RESPONSEBEAN_NOTFOUND(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_20_RPCENC_NOT_SUPPORTED() {
    -        return messageFactory.getMessage("wsdlmodeler20.rpcenc.not.supported");
    -    }
    -
    -    /**
    -     * rpc/encoded wsdl's are not supported in JAXWS 2.0.
    -     *
    -     */
    -    public static String WSDLMODELER_20_RPCENC_NOT_SUPPORTED() {
    -        return localizer.localize(localizableWSDLMODELER_20_RPCENC_NOT_SUPPORTED());
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.partNotFound", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring operation "{0}": part "{1}" not found
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.message.partMustHaveElementDescriptor", arg0, arg1);
    -    }
    -
    -    /**
    -     * in message "{0}", part "{1}" must specify a "element" attribute
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_ERROR_PARTS_NOT_FOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.error.partsNotFound", arg0, arg1);
    -    }
    -
    -    /**
    -     * parts "{0}" not found in the message "{1}", wrong WSDL
    -     *
    -     */
    -    public static String WSDLMODELER_ERROR_PARTS_NOT_FOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_ERROR_PARTS_NOT_FOUND(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_ENCODED(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringFault.notEncoded", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring literal fault "{0}" of binding operation "{1}"
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_FAULT_NOT_ENCODED(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_ENCODED(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.notSupportedStyle", arg0);
    -    }
    -
    -    /**
    -     * ignoring operation "{0}": not request-response or one-way
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(arg0));
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_LITERAL(arg0, arg1));
         }
     
         public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.multiplePartBinding", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.multiplePartBinding", arg0, arg1);
         }
     
         /**
    @@ -800,131 +64,23 @@ public final class ModelerMessages {
          *
          */
         public static String WSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_PART_BINDING(arg0, arg1));
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_PART_BINDING(arg0, arg1));
         }
     
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations", arg0, arg1);
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_LITERAL(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringHeaderFault.notLiteral", arg0, arg1, arg2);
         }
     
         /**
    -     * in binding "{1}", operation "{0}" does not reference a unique operation in the corresponding port type
    +     * ignoring header fault part="{0}" message="{1}" of operation {2}, use attribute must be "literal"
          *
          */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.cant.resolve.message", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring header "{0}" of binding operation "{1}": cannot resolve message
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_CANT_RESOLVE_MESSAGE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName", arg0, arg1);
    -    }
    -
    -    /**
    -     * Ignoring operation "{0}", can''t generate java method ,customized name "{1}" of the wsdl:operation is a java keyword.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_LITERAL(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.notLiteral", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring header "{0}" of binding operation "{1}": not literal
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_HEADER_NOT_LITERAL(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_LITERAL(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace", arg0, arg1);
    -    }
    -
    -    /**
    -     * input header "{1}" of binding operation "{0}" must specify a value for the "namespace" attribute
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_HEADER_MISSING_NAMESPACE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_INPUT_NAME(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.missingInputName", arg0);
    -    }
    -
    -    /**
    -     * binding operation "{0}" must specify a name for its input message
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_MISSING_INPUT_NAME(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_INPUT_NAME(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringNonSOAPPort.noAddress", arg0);
    -    }
    -
    -    /**
    -     * ignoring port "{0}": no SOAP address specified. try running wsimport with -extension switch.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_RESULT_IS_IN_OUT_PARAMETER(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.resultIsInOutParameter", arg0);
    -    }
    -
    -    /**
    -     * result is "inout" parameter in operation: {0}
    -     *
    -     */
    -    public static String WSDLMODELER_RESULT_IS_IN_OUT_PARAMETER(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_RESULT_IS_IN_OUT_PARAMETER(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_HEADER_NOT_FOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.header.notFound", arg0, arg1);
    -    }
    -
    -    /**
    -     * header "{0}" of binding operation "{1}": not found
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_HEADER_NOT_FOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_HEADER_NOT_FOUND(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMIMEMODELER_ELEMENT_PART_INVALID_ELEMENT_MIME_TYPE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("mimemodeler.elementPart.invalidElementMimeType", arg0, arg1);
    -    }
    -
    -    /**
    -     * The mime:content part refers to wsdl:part "{0}", defined using element attribute. Please make sure the mime type: "{1}" is appropriate to serialize XML.
    -     *
    -     */
    -    public static String MIMEMODELER_ELEMENT_PART_INVALID_ELEMENT_MIME_TYPE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMIMEMODELER_ELEMENT_PART_INVALID_ELEMENT_MIME_TYPE(arg0, arg1));
    +    public static String WSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_LITERAL(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_LITERAL(arg0, arg1, arg2));
         }
     
         public static Localizable localizableWSDLMODELER_INVALID_HEADER_NOT_LITERAL(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.header.notLiteral", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.header.notLiteral", arg0, arg1);
         }
     
         /**
    @@ -932,443 +88,47 @@ public final class ModelerMessages {
          *
          */
         public static String WSDLMODELER_INVALID_HEADER_NOT_LITERAL(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_HEADER_NOT_LITERAL(arg0, arg1));
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_HEADER_NOT_LITERAL(arg0, arg1));
         }
     
    -    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_MESAGE_PART_ELEMENT_KIND(Object arg0) {
    -        return messageFactory.getMessage("mimemodeler.invalidMimeContent.mesagePartElementKind", arg0);
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.notSupportedStyle", arg0);
         }
     
         /**
    -     * wsdl:part element referenced by mime:content part attribute: {0} must be defined using type attribute!
    +     * ignoring operation "{0}": not request-response or one-way
          *
          */
    -    public static String MIMEMODELER_INVALID_MIME_CONTENT_MESAGE_PART_ELEMENT_KIND(Object arg0) {
    -        return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_MESAGE_PART_ELEMENT_KIND(arg0));
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(arg0));
         }
     
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_ENCODED(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.notEncoded", arg0);
    +    public static Localizable localizableWSDLMODELER_INVALID_PARAMETER_ORDER_TOO_MANY_UNMENTIONED_PARTS(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts", arg0);
         }
     
         /**
    -     * ignoring RPC-style operation "{0}": parameters are not encoded
    +     * more than one part left out in the parameterOrder attribute of operation "{0}"
          *
          */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_ENCODED(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_ENCODED(arg0));
    +    public static String WSDLMODELER_INVALID_PARAMETER_ORDER_TOO_MANY_UNMENTIONED_PARTS(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_PARAMETER_ORDER_TOO_MANY_UNMENTIONED_PARTS(arg0));
         }
     
    -    public static Localizable localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_TYPES() {
    -        return messageFactory.getMessage("wsdlmodeler.warning.nonconforming.wsdl.types");
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName", arg0, arg1);
         }
     
         /**
    -     * Non conforming WS-I WSDL used for wsdl:types
    +     * Ignoring operation "{0}", can''t generate java method ,customized name "{1}" of the wsdl:operation is a java keyword.
          *
          */
    -    public static String WSDLMODELER_WARNING_NONCONFORMING_WSDL_TYPES() {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_TYPES());
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_INPUT_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage", arg0);
    -    }
    -
    -    /**
    -     * ignoring operation "{0}": more than one part in input message
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_INPUT_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_INPUT_MESSAGE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_OUTPUT_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage", arg0);
    -    }
    -
    -    /**
    -     * ignoring operation "{0}": output message is empty
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_OUTPUT_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_OUTPUT_MESSAGE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_R_2716_R_2726(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.r2716r2726", arg0, arg1);
    -    }
    -
    -    /**
    -     * R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for {0}: "{1}"
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_R_2716_R_2726(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_R_2716_R_2726(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.ignoringMemberSubmissionAddressing", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring wsa:Action attribute since obsolete addressing version 08-2004:"{0}" used; expecting addressing version "{1}". To use version 08-2004 anyway run wsimport with -extension switch.
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_NO_SOAP_ADDRESS(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.noSOAPAddress", arg0);
    -    }
    -
    -    /**
    -     * Port "{0}" is not a SOAP port, it has no soap:address
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_NO_SOAP_ADDRESS(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_NO_SOAP_ADDRESS(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULTS(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringFaults", arg0);
    -    }
    -
    -    /**
    -     * ignoring faults declared by operation "{0}"
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_FAULTS(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULTS(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAME(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.missingName", arg0, arg1);
    -    }
    -
    -    /**
    -     * fault "{0}" in operation "{1}" must specify a value for the "name" attribute
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAME(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAME(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(Object arg0) {
    -        return messageFactory.getMessage("mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart", arg0);
    -    }
    -
    -    /**
    -     * Headers not in root mime:part with soap:body, ignoring headers in operation "{0}"
    -     *
    -     */
    -    public static String MIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(Object arg0) {
    -        return localizer.localize(localizableMIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(arg0));
    -    }
    -
    -    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_ERROR_LOADING_JAVA_CLASS() {
    -        return messageFactory.getMessage("mimemodeler.invalidMimeContent.errorLoadingJavaClass");
    -    }
    -
    -    /**
    -     * Couldn't find class "{0}" for mime type "{1}"
    -     *
    -     */
    -    public static String MIMEMODELER_INVALID_MIME_CONTENT_ERROR_LOADING_JAVA_CLASS() {
    -        return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_ERROR_LOADING_JAVA_CLASS());
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.notInPortType", arg0, arg1);
    -    }
    -
    -    /**
    -     * in binding "{1}", operation "{0}" does not appear in the corresponding port type
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CONFLICT_STYLE_IN_WSI_MODE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode", arg0);
    -    }
    -
    -    /**
    -     * ignoring operation "{0}": binding style and operation style are conflicting
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CONFLICT_STYLE_IN_WSI_MODE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CONFLICT_STYLE_IN_WSI_MODE(arg0));
    -    }
    -
    -    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(Object arg0) {
    -        return messageFactory.getMessage("mimemodeler.invalidMimeContent.missingPartAttribute", arg0);
    -    }
    -
    -    /**
    -     * Ignoring operation "{0}", missing part attribute in mime:content. part attribute must be present in mime:content declaration.
    -     *
    -     */
    -    public static String MIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(Object arg0) {
    -        return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_SEARCH_SCHEMA_UNRECOGNIZED_TYPES(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.searchSchema.unrecognizedTypes", arg0);
    -    }
    -
    -    /**
    -     * encountered {0} unrecognized type(s)
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_SEARCH_SCHEMA_UNRECOGNIZED_TYPES(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_SEARCH_SCHEMA_UNRECOGNIZED_TYPES(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName", arg0, arg1);
    -    }
    -
    -    /**
    -     * Invalid operation "{0}", can''t generate java method ,customized name "{1}" of the wsdl:operation is a java keyword.
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.header.cant.resolve.message", arg0, arg1);
    -    }
    -
    -    /**
    -     * header "{0}" of binding operation "{1}": cannot resolve message
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAMESPACE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.missingNamespace", arg0, arg1);
    -    }
    -
    -    /**
    -     * fault "{0}" in operation "{1}" must specify a value for the "namespace" attribute
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAMESPACE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAMESPACE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableMIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(Object arg0) {
    -        return messageFactory.getMessage("mimemodeler.invalidMimePart.moreThanOneSOAPBody", arg0);
    -    }
    -
    -    /**
    -     * Ignoring operation "{0}". The Multipart/Related structure has invalid root part: more than one soap:body parts found
    -     *
    -     */
    -    public static String MIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(Object arg0) {
    -        return localizer.localize(localizableMIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_INCONSISTENT_DEFINITION(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.inconsistentDefinition", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring header "{0}" of operation "{1}": part not found
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_HEADER_INCONSISTENT_DEFINITION(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_INCONSISTENT_DEFINITION(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.notFound", arg0, arg1);
    -    }
    -
    -    /**
    -     * fault "{0}" in operation "{1}" does not match any fault in the corresponding port type operation
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName", arg0, arg1);
    -    }
    -
    -    /**
    -     * Ignoring operation "{0}", can''t generate java method. Parameter,customized name "{1}" is a java keyword.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_UNRECOGNIZED_SCHEMA_EXTENSION(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension", arg0);
    -    }
    -
    -    /**
    -     * ignoring schema element (unsupported version): {0}
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_UNRECOGNIZED_SCHEMA_EXTENSION(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_UNRECOGNIZED_SCHEMA_EXTENSION(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_FOUND(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeaderFault.notFound", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * ignoring header fault "{0}", cannot find part "{1}" in binding "{2}"
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_FOUND(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_FOUND(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_NON_UNIQUE_BODY_WARNING(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return messageFactory.getMessage("wsdlmodeler.nonUnique.body.warning", arg0, arg1, arg2, arg3);
    -    }
    -
    -    /**
    -     * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. In port {0}, Operations "{1}" and "{2}" have the same request body block {3}. Method dispatching may fail, runtime will try to dispatch using SOAPAction
    -     *
    -     */
    -    public static String WSDLMODELER_NON_UNIQUE_BODY_WARNING(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return localizer.localize(localizableWSDLMODELER_NON_UNIQUE_BODY_WARNING(arg0, arg1, arg2, arg3));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * Invalid operation "{0}", can''t generate java method parameter. Local name of the wrapper child "{1}" in the global element "{2}" is a java keyword. Use customization to change the parameter name.
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_UNKNOWN_SCHEMA_TYPE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("mimemodeler.invalidMimeContent.unknownSchemaType", arg0, arg1);
    -    }
    -
    -    /**
    -     * Unknown schema type: {1} for mime:content part: {0}
    -     *
    -     */
    -    public static String MIMEMODELER_INVALID_MIME_CONTENT_UNKNOWN_SCHEMA_TYPE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_UNKNOWN_SCHEMA_TYPE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_R_2716(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.r2716", arg0, arg1);
    -    }
    -
    -    /**
    -     * R2716 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit for {0}: "{1}"
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_R_2716(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_R_2716(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_FOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.notFound", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring header "{0}" of binding operation "{1}": not found
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_HEADER_NOT_FOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_FOUND(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart", arg0);
    -    }
    -
    -    /**
    -     * ignoring operation "{0}": message part does not refer to a schema element declaration
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.parameterOrder.invalidParameterOrder", arg0);
    -    }
    -
    -    /**
    -     * parameterOrder attribute on operation "{0}" is invalid, ignoring parameterOrder hint
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_OUTPUT_NAME(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.missingOutputName", arg0);
    -    }
    -
    -    /**
    -     * binding operation "{0}" must specify a name for its output message
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_MISSING_OUTPUT_NAME(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_OUTPUT_NAME(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_OPERATION(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalidOperation", arg0);
    -    }
    -
    -    /**
    -     * invalid operation: {0}
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_OPERATION(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace", arg0, arg1);
    -    }
    -
    -    /**
    -     * output header "{1}" of binding operation "{0}" must specify a value for the "namespace" attribute
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_HEADER_MISSING_NAMESPACE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_PART_FROM_BODY(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.partFromBody", arg0);
    -    }
    -
    -    /**
    -     * header part: "{0}" already bound by soapbind:body, illegal to bind the part twice
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_HEADER_PART_FROM_BODY(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_PART_FROM_BODY(arg0));
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(arg0, arg1));
         }
     
         public static Localizable localizableWSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.operation.notSupportedStyle", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.operation.notSupportedStyle", arg0, arg1);
         }
     
         /**
    @@ -1376,11 +136,167 @@ public final class ModelerMessages {
          *
          */
         public static String WSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(arg0, arg1));
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_TYPES() {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.nonconforming.wsdl.types");
    +    }
    +
    +    /**
    +     * Non conforming WS-I WSDL used for wsdl:types
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_NONCONFORMING_WSDL_TYPES() {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_TYPES());
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_HEADER_NOT_FOUND(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.header.notFound", arg0, arg1);
    +    }
    +
    +    /**
    +     * header "{0}" of binding operation "{1}": not found
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_HEADER_NOT_FOUND(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_HEADER_NOT_FOUND(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableMIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart", arg0);
    +    }
    +
    +    /**
    +     * Headers not in root mime:part with soap:body, ignoring headers in operation "{0}"
    +     *
    +     */
    +    public static String MIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(Object arg0) {
    +        return LOCALIZER.localize(localizableMIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_UNSUPPORTED_BINDING_MIME() {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.unsupportedBinding.mime");
    +    }
    +
    +    /**
    +     * WSDL MIME binding is not currently supported!
    +     *
    +     */
    +    public static String WSDLMODELER_UNSUPPORTED_BINDING_MIME() {
    +        return LOCALIZER.localize(localizableWSDLMODELER_UNSUPPORTED_BINDING_MIME());
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_NON_UNIQUE_BODY_ERROR(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.nonUnique.body.error", arg0, arg1, arg2, arg3);
    +    }
    +
    +    /**
    +     * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. In port {0}, Operations "{1}" and "{2}" have the same request body block {3}. Try running wsimport with -extension switch, runtime will try to dispatch using SOAPAction
    +     *
    +     */
    +    public static String WSDLMODELER_NON_UNIQUE_BODY_ERROR(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_NON_UNIQUE_BODY_ERROR(arg0, arg1, arg2, arg3));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAMESPACE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingFault.missingNamespace", arg0, arg1);
    +    }
    +
    +    /**
    +     * fault "{0}" in operation "{1}" must specify a value for the "namespace" attribute
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAMESPACE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAMESPACE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODLER_WARNING_OPERATION_USE() {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodler.warning.operation.use");
    +    }
    +
    +    /**
    +     * The WSDL used has operations with literal and encoded use. -f:searchschema is not supported for this scenario.
    +     *
    +     */
    +    public static String WSDLMODLER_WARNING_OPERATION_USE() {
    +        return LOCALIZER.localize(localizableWSDLMODLER_WARNING_OPERATION_USE());
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_ERROR_PARTS_NOT_FOUND(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.error.partsNotFound", arg0, arg1);
    +    }
    +
    +    /**
    +     * parts "{0}" not found in the message "{1}", wrong WSDL
    +     *
    +     */
    +    public static String WSDLMODELER_ERROR_PARTS_NOT_FOUND(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_ERROR_PARTS_NOT_FOUND(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_JAXB_JAVATYPE_NOTFOUND(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.jaxb.javatype.notfound", arg0, arg1);
    +    }
    +
    +    /**
    +     * Schema descriptor {0} in message part "{1}" is not defined and could not be bound to Java. Perhaps the schema descriptor {0} is not defined in the schema imported/included in the WSDL. You can either add such imports/includes or run wsimport and provide the schema location using -b switch.
    +     *
    +     */
    +    public static String WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_JAXB_JAVATYPE_NOTFOUND(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_HEADERFAULT_NOT_LITERAL(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.headerfault.notLiteral", arg0, arg1);
    +    }
    +
    +    /**
    +     * Invalid headerfault "{0}" of binding operation "{1}": not literal
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_HEADERFAULT_NOT_LITERAL(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_HEADERFAULT_NOT_LITERAL(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_20_RPCENC_NOT_SUPPORTED() {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler20.rpcenc.not.supported");
    +    }
    +
    +    /**
    +     * rpc/encoded wsdl's are not supported in JAXWS 2.0.
    +     *
    +     */
    +    public static String WSDLMODELER_20_RPCENC_NOT_SUPPORTED() {
    +        return LOCALIZER.localize(localizableWSDLMODELER_20_RPCENC_NOT_SUPPORTED());
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingFault.notFound", arg0, arg1);
    +    }
    +
    +    /**
    +     * fault "{0}" in operation "{1}" does not match any fault in the corresponding port type operation
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_DOCLITOPERATION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.doclitoperation", arg0);
    +    }
    +
    +    /**
    +     * Invalid wsdl:operation "{0}": its a document-literal operation,  message part must refer to a schema element declaration
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_DOCLITOPERATION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_DOCLITOPERATION(arg0));
         }
     
         public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_NC_NAME(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.notNCName", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.notNCName", arg0, arg1);
         }
     
         /**
    @@ -1388,23 +304,35 @@ public final class ModelerMessages {
          *
          */
         public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_NC_NAME(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_NC_NAME(arg0, arg1));
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_NC_NAME(arg0, arg1));
         }
     
    -    public static Localizable localizableWSDLMODELER_INVALID_PARAMETER_DIFFERENT_TYPES(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.parameter.differentTypes", arg0, arg1);
    +    public static Localizable localizableMIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.invalidMimePart.nameNotAllowed", arg0);
         }
     
         /**
    -     * parameter "{0}" of operation "{1}" appears with different types in the input and output messages
    +     * name attribute on wsdl:part in Operation "{0}" is ignored. Its not allowed as per WS-I AP 1.0.
          *
          */
    -    public static String WSDLMODELER_INVALID_PARAMETER_DIFFERENT_TYPES(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_PARAMETER_DIFFERENT_TYPES(arg0, arg1));
    +    public static String MIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(Object arg0) {
    +        return LOCALIZER.localize(localizableMIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_LITERAL(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.notLiteral", arg0);
    +    }
    +
    +    /**
    +     * ignoring document-style operation "{0}": parameters are not literal
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_LITERAL(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_LITERAL(arg0));
         }
     
         public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULT_DOCUMENT_OPERATION(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringFault.documentOperation", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringFault.documentOperation", arg0, arg1);
         }
     
         /**
    @@ -1412,107 +340,47 @@ public final class ModelerMessages {
          *
          */
         public static String WSDLMODELER_WARNING_IGNORING_FAULT_DOCUMENT_OPERATION(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_DOCUMENT_OPERATION(arg0, arg1));
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_DOCUMENT_OPERATION(arg0, arg1));
         }
     
    -    public static Localizable localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_USE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.nonconforming.wsdl.use", arg0);
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingFault.notUnique", arg0, arg1);
         }
     
         /**
    -     * Processing WS-I non conforming operation "{0}" with RPC-Style and SOAP-encoded
    +     * fault "{0}" in operation "{1}" matches more than one fault in the corresponding port type operation
          *
          */
    -    public static String WSDLMODELER_WARNING_NONCONFORMING_WSDL_USE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_USE(arg0));
    +    public static String WSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(arg0, arg1));
         }
     
    -    public static Localizable localizableWSDLMODELER_WARNING_NON_SOAP_PORT(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.nonSOAPPort", arg0);
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_INPUT_NAME(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.missingInputName", arg0);
         }
     
         /**
    -     * port "{0}": not a standard SOAP port. The generated artifacts may not work with JAX-WS runtime.
    +     * binding operation "{0}" must specify a name for its input message
          *
          */
    -    public static String WSDLMODELER_WARNING_NON_SOAP_PORT(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_NON_SOAP_PORT(arg0));
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_MISSING_INPUT_NAME(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_INPUT_NAME(arg0));
         }
     
    -    public static Localizable localizableWSDLMODELER_INVALID_HEADERFAULT_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor", arg0, arg1, arg2);
    +    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle", arg0, arg1, arg2);
         }
     
         /**
    -     * Invalid headerfault "{0}" for header {1} in operation {2}: part must specify an "element" attribute
    +     * Invalid operation "{0}", can''t generate java method parameter. Local name of the wrapper child "{1}" in the global element "{2}" is a java keyword. Use customization to change the parameter name.
          *
          */
    -    public static String WSDLMODELER_INVALID_HEADERFAULT_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_HEADERFAULT_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_STATE_MODELING_OPERATION(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalidState.modelingOperation", arg0);
    -    }
    -
    -    /**
    -     * invalid state while modeling operation: {0}
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_STATE_MODELING_OPERATION(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_STATE_MODELING_OPERATION(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName", arg0);
    -    }
    -
    -    /**
    -     * Ignoring operation "{0}", it''s java reserved word, can''t generate java method. Use customization to change the operation name.
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(arg0));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_ENCODED(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.notEncoded", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring header "{0}" of binding operation "{1}": not SOAP-encoded
    -     *
    -     */
    -    public static String WSDLMODELER_WARNING_IGNORING_HEADER_NOT_ENCODED(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_ENCODED(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_DUPLICATE_FAULT_PART_NAME(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.duplicate.fault.part.name", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * ignoring fault "{0}" of operation "{1}", part name "{2}" is not unique
    -     *
    -     */
    -    public static String WSDLMODELER_DUPLICATE_FAULT_PART_NAME(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_DUPLICATE_FAULT_PART_NAME(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.operation.MoreThanOnePartInMessage", arg0);
    -    }
    -
    -    /**
    -     * operation "{0}": more than one part bound to body
    -     *
    -     */
    -    public static String WSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(arg0));
    +    public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(arg0, arg1, arg2));
         }
     
         public static Localizable localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_12(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringSOAPBinding12", arg0);
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringSOAPBinding12", arg0);
         }
     
         /**
    @@ -1521,71 +389,539 @@ public final class ModelerMessages {
          *
          */
         public static String WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_12(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_12(arg0));
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_12(arg0));
         }
     
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.notUnique", arg0, arg1);
    +    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_MESAGE_PART_ELEMENT_KIND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.invalidMimeContent.mesagePartElementKind", arg0);
         }
     
         /**
    -     * fault "{0}" in operation "{1}" matches more than one fault in the corresponding port type operation
    +     * wsdl:part element referenced by mime:content part attribute: {0} must be defined using type attribute!
          *
          */
    -    public static String WSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(arg0, arg1));
    +    public static String MIMEMODELER_INVALID_MIME_CONTENT_MESAGE_PART_ELEMENT_KIND(Object arg0) {
    +        return LOCALIZER.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_MESAGE_PART_ELEMENT_KIND(arg0));
         }
     
    -    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_MISSING_SOAP_BODY(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody", arg0);
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport", arg0);
         }
     
         /**
    -     * output message of binding operation "{0}" does not have a SOAP body extension
    +     * ignoring SOAP port "{0}": unrecognized transport. try running wsimport with -extension switch.
          *
          */
    -    public static String WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_MISSING_SOAP_BODY(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_MISSING_SOAP_BODY(arg0));
    +    public static String WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(arg0));
         }
     
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_LITERAL(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeaderFault.notLiteral", arg0, arg1, arg2);
    +    public static Localizable localizableWSDLMODELER_DUPLICATE_FAULT_SOAP_NAME(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.duplicate.fault.soap.name", arg0, arg1, arg2);
         }
     
         /**
    -     * ignoring header fault part="{0}" message="{1}" of operation {2}, use attribute must be "literal"
    +     * ignoring fault "{0}" of operation "{1}", soap:fault name "{2}" is not unique
          *
          */
    -    public static String WSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_LITERAL(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_LITERAL(arg0, arg1, arg2));
    +    public static String WSDLMODELER_DUPLICATE_FAULT_SOAP_NAME(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_DUPLICATE_FAULT_SOAP_NAME(arg0, arg1, arg2));
         }
     
    -    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_OUTPUT_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage", arg0);
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_OUTPUT_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage", arg0);
         }
     
         /**
    -     * ignoring operation "{0}": more than one part in output message
    +     * ignoring operation "{0}": output message is empty
          *
          */
    -    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_OUTPUT_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_OUTPUT_MESSAGE(arg0));
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_OUTPUT_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_OUTPUT_MESSAGE(arg0));
         }
     
    -    public static Localizable localizableWSDLMODELER_WARNING_NO_OPERATIONS_IN_PORT(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.noOperationsInPort", arg0);
    +    public static Localizable localizableMIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.invalidMimePart.moreThanOneSOAPBody", arg0);
         }
     
         /**
    -     * Port "{0}" does not contain any usable operations
    +     * Ignoring operation "{0}". The Multipart/Related structure has invalid root part: more than one soap:body parts found
          *
          */
    -    public static String WSDLMODELER_WARNING_NO_OPERATIONS_IN_PORT(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_NO_OPERATIONS_IN_PORT(arg0));
    +    public static String MIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(Object arg0) {
    +        return LOCALIZER.localize(localizableMIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_MESSAGE_HAS_MORE_THAN_ONE_PART(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart", arg0, arg1);
    +    }
    +
    +    /**
    +     * fault "{0}" refers to message "{1}", but the message has more than one parts
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_FAULT_MESSAGE_HAS_MORE_THAN_ONE_PART(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_MESSAGE_HAS_MORE_THAN_ONE_PART(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart", arg0);
    +    }
    +
    +    /**
    +     * ignoring operation "{0}": message part does not refer to a schema element declaration
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULTS(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringFaults", arg0);
    +    }
    +
    +    /**
    +     * ignoring faults declared by operation "{0}"
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_FAULTS(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULTS(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace", arg0);
    +    }
    +
    +    /**
    +     * input message of binding operation "{0}" must specify a value for the "namespace" attribute
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart", arg0);
    +    }
    +
    +    /**
    +     * ignoring operation "{0}": message part does not refer to a schema type declaration
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(arg0));
    +    }
    +
    +    public static Localizable localizableMODELER_NESTED_MODEL_ERROR(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("modeler.nestedModelError", arg0);
    +    }
    +
    +    /**
    +     * modeler error: {0}
    +     *
    +     */
    +    public static String MODELER_NESTED_MODEL_ERROR(Object arg0) {
    +        return LOCALIZER.localize(localizableMODELER_NESTED_MODEL_ERROR(arg0));
    +    }
    +
    +    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_DIFFERENT_PART() {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.invalidMimeContent.differentPart");
    +    }
    +
    +    /**
    +     * Ignoring the mime:part. Invalid mime:part, the mime:content has different part attribute.
    +     *
    +     */
    +    public static String MIMEMODELER_INVALID_MIME_CONTENT_DIFFERENT_PART() {
    +        return LOCALIZER.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_DIFFERENT_PART());
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.ignoringMemberSubmissionAddressing", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring wsa:Action attribute since obsolete addressing version 08-2004:"{0}" used; expecting addressing version "{1}". To use version 08-2004 anyway run wsimport with -extension switch.
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.bindingOperation.multiplePartBinding", arg0, arg1);
    +    }
    +
    +    /**
    +     * Check the abstract operation "{0}" binding, part "{1}" has multiple binding. Will try to generated artifacts anyway...
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringNonSOAPPort.noAddress", arg0);
    +    }
    +
    +    /**
    +     * ignoring port "{0}": no SOAP address specified. try running wsimport with -extension switch.
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_12(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.port.SOAPBinding12", arg0);
    +    }
    +
    +    /**
    +     * SOAP port "{0}": uses a non-standard SOAP 1.2 binding.
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_PORT_SOAP_BINDING_12(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_12(arg0));
    +    }
    +
    +    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.invalidMimeContent.invalidSchemaType", arg0, arg1);
    +    }
    +
    +    /**
    +     * Ignoring the mime:part. mime part: {0} can not be mapped to schema type: {1}
    +     *
    +     */
    +    public static String MIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_ENCODED(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.notEncoded", arg0);
    +    }
    +
    +    /**
    +     * ignoring RPC-style operation "{0}": parameters are not encoded
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_ENCODED(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_ENCODED(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor", arg0, arg1);
    +    }
    +
    +    /**
    +     * Invalid header "{0}" in operation {1}: part must specify a "element" attribute
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.message.partMustHaveElementDescriptor", arg0, arg1);
    +    }
    +
    +    /**
    +     * in message "{0}", part "{1}" must specify a "element" attribute
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_ERROR_PART_NOT_FOUND(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.error.partNotFound", arg0, arg1);
    +    }
    +
    +    /**
    +     * part "{1}" of operation "{0}" could not be resolved!
    +     *
    +     */
    +    public static String WSDLMODELER_ERROR_PART_NOT_FOUND(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_ERROR_PART_NOT_FOUND(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName", arg0);
    +    }
    +
    +    /**
    +     * Invalid operation "{0}", it''s java reserved word, can''t generate java method. Use customization to change the operation name.
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.notInPortType", arg0, arg1);
    +    }
    +
    +    /**
    +     * in binding "{1}", operation "{0}" does not appear in the corresponding port type
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_OPERATION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalidOperation", arg0);
    +    }
    +
    +    /**
    +     * invalid operation: {0}
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_OPERATION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_OPERATION(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace", arg0, arg1);
    +    }
    +
    +    /**
    +     * output header "{1}" of binding operation "{0}" must specify a value for the "namespace" attribute
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_HEADER_MISSING_NAMESPACE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_INPUT_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage", arg0);
    +    }
    +
    +    /**
    +     * ignoring operation "{0}": more than one part in input message
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_INPUT_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_INPUT_MESSAGE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_OUTPUT_NAME(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.missingOutputName", arg0);
    +    }
    +
    +    /**
    +     * binding operation "{0}" must specify a name for its output message
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_MISSING_OUTPUT_NAME(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_OUTPUT_NAME(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAME(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingFault.missingName", arg0, arg1);
    +    }
    +
    +    /**
    +     * fault "{0}" in operation "{1}" must specify a value for the "name" attribute
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAME(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAME(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.notFound", arg0, arg1);
    +    }
    +
    +    /**
    +     * in binding "{1}", operation "{0}" does not match any operation in the corresponding port type
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_BODY_PARTS_ATTRIBUTE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute", arg0);
    +    }
    +
    +    /**
    +     * ignoring operation "{0}": cannot handle "parts" attribute of "soap:body" element
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_BODY_PARTS_ATTRIBUTE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_BODY_PARTS_ATTRIBUTE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * Ignoring operation "{0}", can''t generate java method. Parameter: part "{2}" in wsdl:message "{1}", is a java keyword. Use customization to change the parameter name or change the wsdl:part name.
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CONFLICT_STYLE_IN_WSI_MODE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode", arg0);
    +    }
    +
    +    /**
    +     * ignoring operation "{0}": binding style and operation style are conflicting
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CONFLICT_STYLE_IN_WSI_MODE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CONFLICT_STYLE_IN_WSI_MODE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_FOUND(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringHeader.notFound", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring header "{0}" of binding operation "{1}": not found
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_HEADER_NOT_FOUND(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_FOUND(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.memberSubmissionAddressingUsed", arg0, arg1);
    +    }
    +
    +    /**
    +     * obsolete addressing version 08-2004:"{0}" used; version "{1}" should be used instead.
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_NO_SOAP_ADDRESS(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.noSOAPAddress", arg0);
    +    }
    +
    +    /**
    +     * Port "{0}" is not a SOAP port, it has no soap:address
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_NO_SOAP_ADDRESS(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_NO_SOAP_ADDRESS(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName", arg0);
    +    }
    +
    +    /**
    +     * Ignoring operation "{0}", it''s java reserved word, can''t generate java method. Use customization to change the operation name.
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_LITERAL(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringHeader.notLiteral", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring header "{0}" of binding operation "{1}": not literal
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_HEADER_NOT_LITERAL(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_LITERAL(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingFault.outputMissingSoapFault", arg0, arg1);
    +    }
    +
    +    /**
    +     * fault "{0}" in operation "{1}" does not have a SOAP fault extension
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_NON_UNIQUE_BODY_WARNING(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.nonUnique.body.warning", arg0, arg1, arg2, arg3);
    +    }
    +
    +    /**
    +     * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. In port {0}, Operations "{1}" and "{2}" have the same request body block {3}. Method dispatching may fail, runtime will try to dispatch using SOAPAction
    +     *
    +     */
    +    public static String WSDLMODELER_NON_UNIQUE_BODY_WARNING(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_NON_UNIQUE_BODY_WARNING(arg0, arg1, arg2, arg3));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_MIXED_STYLE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.port.SOAPBinding.mixedStyle", arg0);
    +    }
    +
    +    /**
    +     * not a WS-I BP1.1 compliant SOAP port "{0}": the WSDL binding has mixed style, it must be rpc-literal or document-literal operation!
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_PORT_SOAP_BINDING_MIXED_STYLE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_MIXED_STYLE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_NO_SOAP_FAULT_NAME(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingFault.noSoapFaultName", arg0, arg1);
    +    }
    +
    +    /**
    +     * soap:fault name not specified, wsdl:fault "{0}" in operation "{1}"
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_FAULT_NO_SOAP_FAULT_NAME(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_NO_SOAP_FAULT_NAME(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_HEADERFAULT_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * Invalid headerfault "{0}" for header {1} in operation {2}: part must specify an "element" attribute
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_HEADERFAULT_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_HEADERFAULT_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.rpclit.unkownschematype", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * XML type "{0}" could not be resolved, XML to JAVA binding failed! Please check the wsdl:part "{1}" in the wsdl:message "{2}".
    +     *
    +     */
    +    public static String WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_R_2716(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.r2716", arg0, arg1);
    +    }
    +
    +    /**
    +     * R2716 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit for {0}: "{1}"
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_R_2716(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_R_2716(arg0, arg1));
         }
     
         public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle", arg0, arg1, arg2);
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle", arg0, arg1, arg2);
         }
     
         /**
    @@ -1593,11 +929,71 @@ public final class ModelerMessages {
          *
          */
         public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(arg0, arg1, arg2));
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.operation.fault.notLiteral", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring encoded fault "{0}" in literal binding operation "{1}"
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace", arg0);
    +    }
    +
    +    /**
    +     * output message of binding operation "{0}" must specify a value for the "namespace" attribute
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.header.cant.resolve.message", arg0, arg1);
    +    }
    +
    +    /**
    +     * header "{0}" of binding operation "{1}": cannot resolve message
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_SEARCH_SCHEMA_UNRECOGNIZED_TYPES(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.searchSchema.unrecognizedTypes", arg0);
    +    }
    +
    +    /**
    +     * encountered {0} unrecognized type(s)
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_SEARCH_SCHEMA_UNRECOGNIZED_TYPES(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_SEARCH_SCHEMA_UNRECOGNIZED_TYPES(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_RESPONSEBEAN_NOTFOUND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.responsebean.notfound", arg0);
    +    }
    +
    +    /**
    +     * wsimport failed to generate async response bean for operation: {0}
    +     *
    +     */
    +    public static String WSDLMODELER_RESPONSEBEAN_NOTFOUND(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_RESPONSEBEAN_NOTFOUND(arg0));
         }
     
         public static Localizable localizableWSDLMODELER_UNSOLVABLE_NAMING_CONFLICTS(Object arg0) {
    -        return messageFactory.getMessage("wsdlmodeler.unsolvableNamingConflicts", arg0);
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.unsolvableNamingConflicts", arg0);
         }
     
         /**
    @@ -1605,7 +1001,618 @@ public final class ModelerMessages {
          *
          */
         public static String WSDLMODELER_UNSOLVABLE_NAMING_CONFLICTS(Object arg0) {
    -        return localizer.localize(localizableWSDLMODELER_UNSOLVABLE_NAMING_CONFLICTS(arg0));
    +        return LOCALIZER.localize(localizableWSDLMODELER_UNSOLVABLE_NAMING_CONFLICTS(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_NO_PORTS_IN_SERVICE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.noPortsInService", arg0);
    +    }
    +
    +    /**
    +     * Service "{0}" does not contain any usable ports. try running wsimport with -extension switch.
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_NO_PORTS_IN_SERVICE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_NO_PORTS_IN_SERVICE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringFault.cant.resolve.message", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring fault "{0}" of binding operation "{1}": cannot resolve message
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_CANT_RESOLVE_MESSAGE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.partNotFound", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring operation "{0}": part "{1}" not found
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NO_ELEMENT_ATTRIBUTE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * ignoring header fault part="{0}" message="{1}" of operation {2}
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NO_ELEMENT_ATTRIBUTE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NO_ELEMENT_ATTRIBUTE(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_R_2716_R_2726(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.r2716r2726", arg0, arg1);
    +    }
    +
    +    /**
    +     * R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for {0}: "{1}"
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_R_2716_R_2726(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_R_2716_R_2726(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations", arg0, arg1);
    +    }
    +
    +    /**
    +     * in binding "{1}", operation "{0}" does not reference a unique operation in the corresponding port type
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_ENCODED(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringHeader.notEncoded", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring header "{0}" of binding operation "{1}": not SOAP-encoded
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_HEADER_NOT_ENCODED(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_ENCODED(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableMIMEMODELER_ELEMENT_PART_INVALID_ELEMENT_MIME_TYPE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.elementPart.invalidElementMimeType", arg0, arg1);
    +    }
    +
    +    /**
    +     * The mime:content part refers to wsdl:part "{0}", defined using element attribute. Please make sure the mime type: "{1}" is appropriate to serialize XML.
    +     *
    +     */
    +    public static String MIMEMODELER_ELEMENT_PART_INVALID_ELEMENT_MIME_TYPE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMIMEMODELER_ELEMENT_PART_INVALID_ELEMENT_MIME_TYPE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_PORT_TYPE_FAULT_NOT_FOUND(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.portTypeFault.notFound", arg0, arg1);
    +    }
    +
    +    /**
    +     * fault "{0}" in portType operation "{1}" does not match any fault in the corresponding binding operation
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_PORT_TYPE_FAULT_NOT_FOUND(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_PORT_TYPE_FAULT_NOT_FOUND(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_RESULT_IS_IN_OUT_PARAMETER(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.resultIsInOutParameter", arg0);
    +    }
    +
    +    /**
    +     * result is "inout" parameter in operation: {0}
    +     *
    +     */
    +    public static String WSDLMODELER_RESULT_IS_IN_OUT_PARAMETER(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_RESULT_IS_IN_OUT_PARAMETER(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.operation.MoreThanOnePartInMessage", arg0);
    +    }
    +
    +    /**
    +     * Ignoring operation "{0}": more than one part bound to body
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(arg0));
    +    }
    +
    +    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_ERROR_LOADING_JAVA_CLASS() {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.invalidMimeContent.errorLoadingJavaClass");
    +    }
    +
    +    /**
    +     * Couldn't find class "{0}" for mime type "{1}"
    +     *
    +     */
    +    public static String MIMEMODELER_INVALID_MIME_CONTENT_ERROR_LOADING_JAVA_CLASS() {
    +        return LOCALIZER.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_ERROR_LOADING_JAVA_CLASS());
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_RPCLITOPERATION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.rpclitoperation", arg0);
    +    }
    +
    +    /**
    +     * Invalid wsdl:operation "{0}": its a rpc-literal operation,  message part must refer to a schema type declaration
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_RPCLITOPERATION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_RPCLITOPERATION(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_PART_FROM_BODY(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringHeader.partFromBody", arg0);
    +    }
    +
    +    /**
    +     * header part: "{0}" already bound by soapbind:body, illegal to bind the part twice
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_HEADER_PART_FROM_BODY(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_PART_FROM_BODY(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND() {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.noServiceDefinitionsFound");
    +    }
    +
    +    /**
    +     * WSDL document does not define any services
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND() {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND());
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingFault.emptyMessage", arg0, arg1);
    +    }
    +
    +    /**
    +     * fault "{0}" refers to message "{1}", but the message has no parts
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.parameterorder.parameter", arg0, arg1);
    +    }
    +
    +    /**
    +     * "{0}" specified in the parameterOrder attribute of operation "{1}" is not a valid part of the message.
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_DUPLICATE_FAULT_PART_NAME(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.duplicate.fault.part.name", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * ignoring fault "{0}" of operation "{1}", part name "{2}" is not unique
    +     *
    +     */
    +    public static String WSDLMODELER_DUPLICATE_FAULT_PART_NAME(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_DUPLICATE_FAULT_PART_NAME(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringNonSOAPPort", arg0);
    +    }
    +
    +    /**
    +     * ignoring port "{0}": not a standard SOAP port. try running wsimport with -extension switch.
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName", arg0, arg1);
    +    }
    +
    +    /**
    +     * Invalid operation "{0}", can''t generate java method ,customized name "{1}" of the wsdl:operation is a java keyword.
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * Invalid operation "{0}", can''t generate java method. Parameter: part "{2}" in wsdl:message "{1}", is a java keyword. Use customization to change the parameter name or change the wsdl:part name.
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringHeader.cant.resolve.message", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring header "{0}" of binding operation "{1}": cannot resolve message
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_CANT_RESOLVE_MESSAGE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody", arg0);
    +    }
    +
    +    /**
    +     * input message of binding operation "{0}" does not have a SOAP body extension
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.parameterOrder.invalidParameterOrder", arg0);
    +    }
    +
    +    /**
    +     * parameterOrder attribute on operation "{0}" is invalid, ignoring parameterOrder hint
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_NO_OPERATIONS_IN_PORT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.noOperationsInPort", arg0);
    +    }
    +
    +    /**
    +     * Port "{0}" does not contain any usable operations
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_NO_OPERATIONS_IN_PORT(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_NO_OPERATIONS_IN_PORT(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_IMPORT() {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.nonconforming.wsdl.import");
    +    }
    +
    +    /**
    +     * Non conforming WS-I WSDL used for wsdl:import
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_NONCONFORMING_WSDL_IMPORT() {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_IMPORT());
    +    }
    +
    +    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.invalidMimeContent.missingTypeAttribute", arg0);
    +    }
    +
    +    /**
    +     * Missing type attribute in mime:content in operation "{0}". part attribute must be present in mime:content declaration.
    +     *
    +     */
    +    public static String MIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(Object arg0) {
    +        return LOCALIZER.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace", arg0, arg1);
    +    }
    +
    +    /**
    +     * input header "{1}" of binding operation "{0}" must specify a value for the "namespace" attribute
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_HEADER_MISSING_NAMESPACE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_PARAMETER_DIFFERENT_TYPES(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.parameter.differentTypes", arg0, arg1);
    +    }
    +
    +    /**
    +     * parameter "{0}" of operation "{1}" appears with different types in the input and output messages
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_PARAMETER_DIFFERENT_TYPES(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_PARAMETER_DIFFERENT_TYPES(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_OUTPUT_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage", arg0);
    +    }
    +
    +    /**
    +     * ignoring operation "{0}": more than one part in output message
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_OUTPUT_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_OUTPUT_MESSAGE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_USE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.nonconforming.wsdl.use", arg0);
    +    }
    +
    +    /**
    +     * Processing WS-I non conforming operation "{0}" with RPC-Style and SOAP-encoded
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_NONCONFORMING_WSDL_USE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_USE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_DOCUMENT_STYLE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle", arg0);
    +    }
    +
    +    /**
    +     * ignoring operation "{0}": cannot handle document-style operations
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_DOCUMENT_STYLE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_DOCUMENT_STYLE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_WRONG_SOAP_FAULT_NAME(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingFault.wrongSoapFaultName", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * name of soap:fault "{0}" doesn''t match the name of wsdl:fault "{1}" in operation "{2}"
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_FAULT_WRONG_SOAP_FAULT_NAME(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_WRONG_SOAP_FAULT_NAME(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.operation.MoreThanOnePartInMessage", arg0);
    +    }
    +
    +    /**
    +     * operation "{0}": more than one part bound to body
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_NON_SOAP_PORT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.nonSOAPPort", arg0);
    +    }
    +
    +    /**
    +     * port "{0}": not a standard SOAP port. The generated artifacts may not work with JAX-WS runtime.
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_NON_SOAP_PORT(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_NON_SOAP_PORT(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_STATE_MODELING_OPERATION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalidState.modelingOperation", arg0);
    +    }
    +
    +    /**
    +     * invalid state while modeling operation: {0}
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_STATE_MODELING_OPERATION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_STATE_MODELING_OPERATION(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_INPUT_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage", arg0);
    +    }
    +
    +    /**
    +     * ignoring operation "{0}": input message is empty
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_INPUT_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_INPUT_MESSAGE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_MISSING_SOAP_BODY(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody", arg0);
    +    }
    +
    +    /**
    +     * output message of binding operation "{0}" does not have a SOAP body extension
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_MISSING_SOAP_BODY(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_MISSING_SOAP_BODY(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_FOUND(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringHeaderFault.notFound", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * ignoring header fault "{0}", cannot find part "{1}" in binding "{2}"
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_FOUND(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_FOUND(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringHeader", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring header "{0}" of binding operation "{1}"
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_HEADER(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.fault.cant.resolve.message", arg0, arg1);
    +    }
    +
    +    /**
    +     * fault message "{0}" in binding operation "{1}" could not be resolved
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_FAULT_CANT_RESOLVE_MESSAGE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_MIME_PART_NOT_FOUND(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringMimePart.notFound", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring mime:part, cannot find part "{0}" referenced by the mime:content in the wsdl:operation "{1}"
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_MIME_PART_NOT_FOUND(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_MIME_PART_NOT_FOUND(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_UNRECOGNIZED_SCHEMA_EXTENSION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension", arg0);
    +    }
    +
    +    /**
    +     * ignoring schema element (unsupported version): {0}
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_UNRECOGNIZED_SCHEMA_EXTENSION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_UNRECOGNIZED_SCHEMA_EXTENSION(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle", arg0);
    +    }
    +
    +    /**
    +     * ignoring port "{0}", its not WS-I BP 1.1 compliant: the wsdl binding has mixed style, it must be rpc-literal or document-literal operation. try running wsimport with -extension switch.
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(arg0));
    +    }
    +
    +    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_UNKNOWN_SCHEMA_TYPE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.invalidMimeContent.unknownSchemaType", arg0, arg1);
    +    }
    +
    +    /**
    +     * Unknown schema type: {1} for mime:content part: {0}
    +     *
    +     */
    +    public static String MIMEMODELER_INVALID_MIME_CONTENT_UNKNOWN_SCHEMA_TYPE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_UNKNOWN_SCHEMA_TYPE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_ENCODED(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringFault.notEncoded", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring literal fault "{0}" of binding operation "{1}"
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_FAULT_NOT_ENCODED(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_ENCODED(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName", arg0, arg1);
    +    }
    +
    +    /**
    +     * Ignoring operation "{0}", can''t generate java method. Parameter,customized name "{1}" is a java keyword.
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("mimemodeler.invalidMimeContent.missingPartAttribute", arg0);
    +    }
    +
    +    /**
    +     * Ignoring operation "{0}", missing part attribute in mime:content. part attribute must be present in mime:content declaration.
    +     *
    +     */
    +    public static String MIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(Object arg0) {
    +        return LOCALIZER.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(arg0));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_INCONSISTENT_DEFINITION(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.warning.ignoringHeader.inconsistentDefinition", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring header "{0}" of operation "{1}": part not found
    +     *
    +     */
    +    public static String WSDLMODELER_WARNING_IGNORING_HEADER_INCONSISTENT_DEFINITION(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_INCONSISTENT_DEFINITION(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName", arg0, arg1);
    +    }
    +
    +    /**
    +     * Invalid operation "{0}", can''t generate java method. Parameter,customized name "{1}"  is a java keyword.
    +     *
    +     */
    +    public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(arg0, arg1));
    +    }
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
         }
     
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java
    index e9296456fbf..58c15b5eead 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -25,11 +25,11 @@
     
     package com.sun.tools.internal.ws.resources;
     
    -import com.sun.istack.internal.localization.LocalizableMessageFactory;
    -import com.sun.istack.internal.localization.Localizer;
    -
     import java.util.Locale;
     import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
     
     
     /**
    @@ -37,12 +37,20 @@ import java.util.ResourceBundle;
      *
      */
     public final class ProcessorMessages {
    -    private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.processor";
    -    private final static LocalizableMessageFactory messageFactory =
    -        new LocalizableMessageFactory(BUNDLE_NAME, ProcessorMessages::getResourceBundle);
    -    private final static Localizer localizer = new Localizer();
     
    -    private static ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +    private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.processor";
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ProcessorMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
         }
    +
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/UtilMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/UtilMessages.java
    index c90a9ab2358..eb979056acc 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/UtilMessages.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/UtilMessages.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -25,12 +25,12 @@
     
     package com.sun.tools.internal.ws.resources;
     
    -import com.sun.istack.internal.localization.Localizable;
    -import com.sun.istack.internal.localization.LocalizableMessageFactory;
    -import com.sun.istack.internal.localization.Localizer;
    -
     import java.util.Locale;
     import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.Localizable;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
     
     
     /**
    @@ -38,29 +38,13 @@ import java.util.ResourceBundle;
      *
      */
     public final class UtilMessages {
    +
         private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.util";
    -    private final static LocalizableMessageFactory messageFactory =
    -        new LocalizableMessageFactory(BUNDLE_NAME, UtilMessages::getResourceBundle);
    -    private final static Localizer localizer = new Localizer();
    -
    -    private static ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    -    }
    -
    -    public static Localizable localizableSAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(Object arg0) {
    -        return messageFactory.getMessage("sax2dom.notsupported.createelement", arg0);
    -    }
    -
    -    /**
    -     * SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
    -     *
    -     */
    -    public static String SAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(Object arg0) {
    -        return localizer.localize(localizableSAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(arg0));
    -    }
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new UtilMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
     
         public static Localizable localizableNULL_NAMESPACE_FOUND(Object arg0) {
    -        return messageFactory.getMessage("null.namespace.found", arg0);
    +        return MESSAGE_FACTORY.getMessage("null.namespace.found", arg0);
         }
     
         /**
    @@ -68,11 +52,11 @@ public final class UtilMessages {
          *
          */
         public static String NULL_NAMESPACE_FOUND(Object arg0) {
    -        return localizer.localize(localizableNULL_NAMESPACE_FOUND(arg0));
    +        return LOCALIZER.localize(localizableNULL_NAMESPACE_FOUND(arg0));
         }
     
         public static Localizable localizableHOLDER_VALUEFIELD_NOT_FOUND(Object arg0) {
    -        return messageFactory.getMessage("holder.valuefield.not.found", arg0);
    +        return MESSAGE_FACTORY.getMessage("holder.valuefield.not.found", arg0);
         }
     
         /**
    @@ -80,7 +64,30 @@ public final class UtilMessages {
          *
          */
         public static String HOLDER_VALUEFIELD_NOT_FOUND(Object arg0) {
    -        return localizer.localize(localizableHOLDER_VALUEFIELD_NOT_FOUND(arg0));
    +        return LOCALIZER.localize(localizableHOLDER_VALUEFIELD_NOT_FOUND(arg0));
    +    }
    +
    +    public static Localizable localizableSAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("sax2dom.notsupported.createelement", arg0);
    +    }
    +
    +    /**
    +     * SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
    +     *
    +     */
    +    public static String SAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(Object arg0) {
    +        return LOCALIZER.localize(localizableSAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(arg0));
    +    }
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
         }
     
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java
    index b4918e43d9a..edb724e4cb4 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -25,12 +25,12 @@
     
     package com.sun.tools.internal.ws.resources;
     
    -import com.sun.istack.internal.localization.Localizable;
    -import com.sun.istack.internal.localization.LocalizableMessageFactory;
    -import com.sun.istack.internal.localization.Localizer;
    -
     import java.util.Locale;
     import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.Localizable;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
     
     
     /**
    @@ -38,353 +38,13 @@ import java.util.ResourceBundle;
      *
      */
     public final class WebserviceapMessages {
    +
         private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.webserviceap";
    -    private final static LocalizableMessageFactory messageFactory =
    -        new LocalizableMessageFactory(BUNDLE_NAME, WebserviceapMessages::getResourceBundle);
    -    private final static Localizer localizer = new Localizer();
    -
    -    private static ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.endpointinterfaces.do.not.match", arg0, arg1);
    -    }
    -
    -    /**
    -     * The endpoint interface {0} does not match the interface {1}.
    -     *
    -     */
    -    public static String WEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.invalid.webmethod.element.with.exclude", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * The @javax.jws.WebMethod.{0} element cannot be specified with the @javax.jws.WebMethod.exclude element. Class: {1} method: {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.sei.cannot.contain.constant.values", arg0, arg1);
    -    }
    -
    -    /**
    -     * A service endpoint interface cannot contain constant declaration: Interface: {0} field: {1}.
    -     *
    -     */
    -    public static String WEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.invalid.soapbinding.parameterstyle", arg0, arg1);
    -    }
    -
    -    /**
    -     * Incorrect usage of Annotation {0} on {1}, ParameterStyle can only be WRAPPED with RPC Style Web service.
    -     *
    -     */
    -    public static String WEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.rpc.literal.parameters.must.have.webparam", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * All RPC literal parameters must have a WebParam annotation.  Class: {0} method: {1} parameter {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.method.exception.bean.name.not.unique", arg0, arg1);
    -    }
    -
    -    /**
    -     * Exception bean names must be unique and must not clash with other generated classes.  Class: {0} exception {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.webservice.and.webserviceprovider", arg0);
    -    }
    -
    -    /**
    -     * Classes cannot be annotated with both @javax.jws.WebService and @javax.xml.ws.WebServiceProvider.  Class: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.webservice.no.default.constructor", arg0);
    -    }
    -
    -    /**
    -     * Classes annotated with @javax.jws.WebService must have a public default constructor. Class: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_DOC_BARE_NO_OUT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.doc.bare.no.out", arg0, arg1);
    -    }
    -
    -    /**
    -     * Document/literal bare methods with no return type or OUT/INOUT parameters must be annotated as @Oneway. Class: {0}, method: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_DOC_BARE_NO_OUT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_NO_OUT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.failed.to.parse.handlerchain.file", arg0, arg1);
    -    }
    -
    -    /**
    -     * Failed to parse HandlerChain file. Class: {0}, file: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_JAVA_TYPE_NOT_FOUND(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.java.typeNotFound", arg0);
    -    }
    -
    -    /**
    -     * The type: {0} was not found in the mapping
    -     *
    -     */
    -    public static String WEBSERVICEAP_JAVA_TYPE_NOT_FOUND(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_JAVA_TYPE_NOT_FOUND(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.oneway.operation.cannot.declare.exceptions", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * The method {1} of class {0} is annotated @Oneway but declares the exception {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.webservice.method.is.static.or.final", arg0, arg1);
    -    }
    -
    -    /**
    -     * Method annotated with @javax.jws.WebMethod must not be static or final. Class: {0} Method: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.oneway.operation.cannot.have.return.type", arg0, arg1);
    -    }
    -
    -    /**
    -     * The method {1} of class {0} is annotated @Oneway but has a return type.
    -     *
    -     */
    -    public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_WARNING(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.warning", arg0);
    -    }
    -
    -    /**
    -     * warning: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_WARNING(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_WARNING(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.method.response.wrapper.bean.name.not.unique", arg0, arg1);
    -    }
    -
    -    /**
    -     * Response wrapper bean names must be unique and must not clash with other generated classes.  Class: {0} method {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.endpointinterface.on.interface", arg0, arg1);
    -    }
    -
    -    /**
    -     * Service endpoint interface: {0} cannot have a WebService.endpointInterface annotation: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ONEWAY_AND_OUT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.oneway.and.out", arg0, arg1);
    -    }
    -
    -    /**
    -     * @Oneway methods cannot have out parameters. Class: {0} method {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_ONEWAY_AND_OUT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_ONEWAY_AND_OUT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.rpc.literal.webparams.must.specify.name", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * All RPC literal WebParams must specify a name.  Class: {0} method {1} parameter {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.invalid.sei.annotation.element.exclude", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * The @javax.jws.WebMethod({0}) cannot be used on a service endpoint interface. Class: {1} method: {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_CLASS_NOT_FOUND(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.class.not.found", arg0);
    -    }
    -
    -    /**
    -     * Class Not Found: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_CLASS_NOT_FOUND(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_CLASS_NOT_FOUND(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.endpointinteface.plus.element", arg0);
    -    }
    -
    -    /**
    -     * The @javax.jws.WebService.{0} element cannot be used in with @javax.jws.WebService.endpointInterface element.
    -     *
    -     */
    -    public static String WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS() {
    -        return messageFactory.getMessage("webserviceap.cannot.combine.handlerchain.soapmessagehandlers");
    -    }
    -
    -    /**
    -     * You cannot specify both HanlderChain and SOAPMessageHandlers annotations
    -     *
    -     */
    -    public static String WEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS() {
    -        return localizer.localize(localizableWEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS());
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.webservice.class.is.innerclass.not.static", arg0);
    -    }
    -
    -    /**
    -     * Inner classes annotated with @javax.jws.WebService must be static. Class: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.non.in.parameters.must.be.holder", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * Class: {0}, method: {1}, parameter: {2} is not WebParam.Mode.IN and is not of type javax.xml.ws.Holder.
    -     *
    -     */
    -    public static String WEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.invalid.sei.annotation.element", arg0, arg1);
    -    }
    -
    -    /**
    -     * The @javax.jws.WebService.{0} element cannot be specified on a service endpoint interface. Class: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_SUCCEEDED() {
    -        return messageFactory.getMessage("webserviceap.succeeded");
    -    }
    -
    -    /**
    -     * Success
    -     *
    -     */
    -    public static String WEBSERVICEAP_SUCCEEDED() {
    -        return localizer.localize(localizableWEBSERVICEAP_SUCCEEDED());
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.doc.bare.and.no.one.in", arg0, arg1);
    -    }
    -
    -    /**
    -     * Document literal bare methods must have one non-header, IN/INOUT parameter.  Class: {0} Method: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(arg0, arg1));
    -    }
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new WebserviceapMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
     
         public static Localizable localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.webservice.method.is.abstract", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("webserviceap.webservice.method.is.abstract", arg0, arg1);
         }
     
         /**
    @@ -392,107 +52,35 @@ public final class WebserviceapMessages {
          *
          */
         public static String WEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(arg0, arg1));
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(arg0, arg1));
         }
     
    -    public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return messageFactory.getMessage("webserviceap.document.literal.bare.method.return.not.unique", arg0, arg1, arg2, arg3);
    +    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.webservice.and.webserviceprovider", arg0);
         }
     
         /**
    -     * Document literal bare methods must have a unique result name return type combination.  Class {0} method: {1}, result name: {2} return type: {3}
    +     * Classes cannot be annotated with both @javax.jws.WebService and @javax.xml.ws.WebServiceProvider.  Class: {0}
          *
          */
    -    public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(arg0, arg1, arg2, arg3));
    +    public static String WEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(arg0));
         }
     
    -    public static Localizable localizableWEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND() {
    -        return messageFactory.getMessage("webserviceap.no.webservice.endpoint.found");
    +    public static Localizable localizableWEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.doc.bare.and.no.one.in", arg0, arg1);
         }
     
         /**
    -     * A web service endpoint could not be found
    +     * Document literal bare methods must have one non-header, IN/INOUT parameter.  Class: {0} Method: {1}
          *
          */
    -    public static String WEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND() {
    -        return localizer.localize(localizableWEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND());
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_FILE_NOT_FOUND(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.fileNotFound", arg0);
    -    }
    -
    -    /**
    -     * error: file not found: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_FILE_NOT_FOUND(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_FILE_NOT_FOUND(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.invalid.handlerchain.file.nohandler-config", arg0);
    -    }
    -
    -    /**
    -     * The handlerchain file {0} is invalid, it does not contain a handler-config element
    -     *
    -     */
    -    public static String WEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.header.parameters.must.have.webparam.name", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * All WebParam annotations on header parameters must specify a name.  Class: {0} method {1} parameter {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.method.return.type.cannot.implement.remote", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * Method return types cannot implement java.rmi.Remote.  Class: {0} method: {1} return type: {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.endpointinteface.plus.annotation", arg0);
    -    }
    -
    -    /**
    -     * The @{0} annotation cannot be used in with @javax.jws.WebService.endpointInterface element.
    -     *
    -     */
    -    public static String WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.holder.parameters.must.not.be.in.only", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * javax.xml.ws.Holder parameters must not be annotated with the WebParam.Mode.IN property.  Class: {0} method: {1} parameter: {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(arg0, arg1, arg2));
    +    public static String WEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(arg0, arg1));
         }
     
         public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.document.literal.bare.must.have.only.one.in.parameter", arg0, arg1, arg2);
    +        return MESSAGE_FACTORY.getMessage("webserviceap.document.literal.bare.must.have.only.one.in.parameter", arg0, arg1, arg2);
         }
     
         /**
    @@ -500,407 +88,11 @@ public final class WebserviceapMessages {
          *
          */
         public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.doc.bare.return.and.out", arg0, arg1);
    -    }
    -
    -    /**
    -     * Document/literal bare methods cannot have a return type and out parameters. Class: {0}, method: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return messageFactory.getMessage("webserviceap.method.parameter.types.cannot.implement.remote", arg0, arg1, arg2, arg3);
    -    }
    -
    -    /**
    -     * Method parameter types cannot implement java.rmi.Remote.  Class: {0} method: {1} parameter: {2} type: {3}
    -     *
    -     */
    -    public static String WEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return localizer.localize(localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(arg0, arg1, arg2, arg3));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_COMPILATION_FAILED() {
    -        return messageFactory.getMessage("webserviceap.compilationFailed");
    -    }
    -
    -    /**
    -     * compilation failed, errors should have been reported
    -     *
    -     */
    -    public static String WEBSERVICEAP_COMPILATION_FAILED() {
    -        return localizer.localize(localizableWEBSERVICEAP_COMPILATION_FAILED());
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_MODEL_ALREADY_EXISTS() {
    -        return messageFactory.getMessage("webserviceap.model.already.exists");
    -    }
    -
    -    /**
    -     * model already exists
    -     *
    -     */
    -    public static String WEBSERVICEAP_MODEL_ALREADY_EXISTS() {
    -        return localizer.localize(localizableWEBSERVICEAP_MODEL_ALREADY_EXISTS());
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.could.not.find.typedecl", arg0, arg1);
    -    }
    -
    -    /**
    -     * Could not get TypeElement for: {0} in annotation processing round: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.webservice.class.not.public", arg0);
    -    }
    -
    -    /**
    -     * Classes annotated with @javax.jws.WebService must be public. Class: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.document.literal.bare.method.not.unique", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * Document literal bare methods must have unique parameter names.  Class: {0} method: {1} parameter name: {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.rpc.soapbinding.not.allowed.on.method", arg0, arg1);
    -    }
    -
    -    /**
    -     * SOAPBinding.Style.RPC binding annotations are not allowed on methods.  Class: {0} Method: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.no.package.class.must.have.targetnamespace", arg0);
    -    }
    -
    -    /**
    -     * @javax.jws.Webservice annotated classes that do not belong to a package must have the @javax.jws.Webservice.targetNamespace element.  Class: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.endpointinterface.has.no.webservice.annotation", arg0);
    -    }
    -
    -    /**
    -     * The endpoint interface {0} must have a WebService annotation
    -     *
    -     */
    -    public static String WEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_INFO(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.info", arg0);
    -    }
    -
    -    /**
    -     * info: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_INFO(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_INFO(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.rpc.literal.must.not.be.bare", arg0);
    -    }
    -
    -    /**
    -     * RPC literal SOAPBindings must have parameterStyle WRAPPED. Class: {0}.
    -     *
    -     */
    -    public static String WEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.could.not.find.handlerchain", arg0, arg1);
    -    }
    -
    -    /**
    -     * Could not find the handlerchain {0} in the handler file {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.rpc.encoded.not.supported", arg0);
    -    }
    -
    -    /**
    -     * The class {0} has a rpc/encoded SOAPBinding.  Rpc/encoded SOAPBindings are not supported in JAXWS 2.0.
    -     *
    -     */
    -    public static String WEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ERROR(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.error", arg0);
    -    }
    -
    -    /**
    -     * error: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_ERROR(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_ERROR(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.endpointinterface.class.not.found", arg0);
    -    }
    -
    -    /**
    -     * The endpointInterface class {0} could not be found
    -     *
    -     */
    -    public static String WEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.method.not.implemented", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * Methods in an endpointInterface must be implemented in the implementation class.  Interface Class:{0} Implementation Class:{1} Method: {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_METHOD_NOT_IMPLEMENTED(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR() {
    -        return messageFactory.getMessage("webserviceap.parsing.javac.options.error");
    -    }
    -
    -    /**
    -     * Can't get javac options from processingEnv.
    -     *
    -     */
    -    public static String WEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR() {
    -        return localizer.localize(localizableWEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR());
    -    }
    -
    -    public static Localizable localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webservice.encoded.not.supported", arg0, arg1);
    -    }
    -
    -    /**
    -     * The {0} class has invalid SOAPBinding annotation. {1}/encoded SOAPBinding is not supported
    -     *
    -     */
    -    public static String WEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.handlerclass.notspecified", arg0);
    -    }
    -
    -    /**
    -     * A handler in the HandlerChain file: {0} does not specify a handler-class
    -     *
    -     */
    -    public static String WEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.failed.to.find.handlerchain.file", arg0, arg1);
    -    }
    -
    -    /**
    -     * Cannot find HandlerChain file. class: {0}, file: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.doc.bare.no.return.and.no.out", arg0, arg1);
    -    }
    -
    -    /**
    -     * Document literal bare methods that do not have a return value must have a single OUT/INOUT parameter.  Class: {0} Method: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.webservice.class.is.abstract", arg0);
    -    }
    -
    -    /**
    -     * Classes annotated with @javax.jws.WebService must not be abstract. Class: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_INIT_PARAM_FORMAT_ERROR() {
    -        return messageFactory.getMessage("webserviceap.init_param.format.error");
    -    }
    -
    -    /**
    -     * a  element must have exactly 1  and 1 
    -     *
    -     */
    -    public static String WEBSERVICEAP_INIT_PARAM_FORMAT_ERROR() {
    -        return localizer.localize(localizableWEBSERVICEAP_INIT_PARAM_FORMAT_ERROR());
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_MIXED_BINDING_STYLE(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.mixed.binding.style", arg0);
    -    }
    -
    -    /**
    -     * Class: {0} contains mixed bindings.  SOAPBinding.Style.RPC and SOAPBinding.Style.DOCUMENT cannot be mixed.
    -     *
    -     */
    -    public static String WEBSERVICEAP_MIXED_BINDING_STYLE(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_MIXED_BINDING_STYLE(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_METHOD_NOT_ANNOTATED(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.method.not.annotated", arg0, arg1);
    -    }
    -
    -    /**
    -     * The method {0} on class {1} is not annotated.
    -     *
    -     */
    -    public static String WEBSERVICEAP_METHOD_NOT_ANNOTATED(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_METHOD_NOT_ANNOTATED(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.oneway.operation.cannot.have.holders", arg0, arg1);
    -    }
    -
    -    /**
    -     * The method {1} of class {0} is annotated @Oneway but contains INOUT or OUT parameters (javax.xml.ws.Holder)
    -     *
    -     */
    -    public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.document.literal.bare.cannot.have.more.than.one.out", arg0, arg1);
    -    }
    -
    -    /**
    -     * Document literal bare methods must have a return value or one out parameter.  Class: {0} Method: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.invalid.sei.annotation", arg0, arg1);
    -    }
    -
    -    /**
    -     * The @{0} annotation cannot be used on a service endpoint interface. Class: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.operation.name.not.unique", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * Operation names must be unique.  Class: {0} method: {1} operation name: {2}
    -     *
    -     */
    -    public static String WEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(Object arg0) {
    -        return messageFactory.getMessage("webserviceap.webservice.class.is.final", arg0);
    -    }
    -
    -    /**
    -     * Classes annotated with @javax.jws.WebService must not be final. Class: {0}
    -     *
    -     */
    -    public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(Object arg0) {
    -        return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(arg0));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.document.literal.bare.must.have.one.in.or.out", arg0, arg1);
    -    }
    -
    -    /**
    -     * Document literal bare methods must have at least one of: a return, an in parameter or an out parameter.  Class: {0} Method: {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.method.request.wrapper.bean.name.not.unique", arg0, arg1);
    -    }
    -
    -    /**
    -     * Request wrapper bean names must be unique and must not clash with other generated classes.  Class: {0} method {1}
    -     *
    -     */
    -    public static String WEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(arg0, arg1));
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(arg0, arg1, arg2));
         }
     
         public static Localizable localizableWEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("webserviceap.document.bare.holder.parameters.must.not.be.inout", arg0, arg1, arg2);
    +        return MESSAGE_FACTORY.getMessage("webserviceap.document.bare.holder.parameters.must.not.be.inout", arg0, arg1, arg2);
         }
     
         /**
    @@ -908,11 +100,215 @@ public final class WebserviceapMessages {
          *
          */
         public static String WEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(arg0, arg1, arg2));
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.doc.bare.return.and.out", arg0, arg1);
    +    }
    +
    +    /**
    +     * Document/literal bare methods cannot have a return type and out parameters. Class: {0}, method: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_COMPILATION_FAILED() {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.compilationFailed");
    +    }
    +
    +    /**
    +     * compilation failed, errors should have been reported
    +     *
    +     */
    +    public static String WEBSERVICEAP_COMPILATION_FAILED() {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_COMPILATION_FAILED());
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_MIXED_BINDING_STYLE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.mixed.binding.style", arg0);
    +    }
    +
    +    /**
    +     * Class: {0} contains mixed bindings.  SOAPBinding.Style.RPC and SOAPBinding.Style.DOCUMENT cannot be mixed.
    +     *
    +     */
    +    public static String WEBSERVICEAP_MIXED_BINDING_STYLE(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_MIXED_BINDING_STYLE(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.endpointinterface.on.interface", arg0, arg1);
    +    }
    +
    +    /**
    +     * Service endpoint interface: {0} cannot have a WebService.endpointInterface annotation: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.no.package.class.must.have.targetnamespace", arg0);
    +    }
    +
    +    /**
    +     * @javax.jws.Webservice annotated classes that do not belong to a package must have the @javax.jws.Webservice.targetNamespace element.  Class: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_SUCCEEDED() {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.succeeded");
    +    }
    +
    +    /**
    +     * Success
    +     *
    +     */
    +    public static String WEBSERVICEAP_SUCCEEDED() {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_SUCCEEDED());
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ERROR(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.error", arg0);
    +    }
    +
    +    /**
    +     * error: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_ERROR(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ERROR(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.could.not.find.handlerchain", arg0, arg1);
    +    }
    +
    +    /**
    +     * Could not find the handlerchain {0} in the handler file {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.endpointinterface.class.not.found", arg0);
    +    }
    +
    +    /**
    +     * The endpointInterface class {0} could not be found
    +     *
    +     */
    +    public static String WEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.method.return.type.cannot.implement.remote", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * Method return types cannot implement java.rmi.Remote.  Class: {0} method: {1} return type: {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.webservice.method.is.static.or.final", arg0, arg1);
    +    }
    +
    +    /**
    +     * Method annotated with @javax.jws.WebMethod must not be static or final. Class: {0} Method: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.invalid.sei.annotation", arg0, arg1);
    +    }
    +
    +    /**
    +     * The @{0} annotation cannot be used on a service endpoint interface. Class: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.webservice.no.default.constructor", arg0);
    +    }
    +
    +    /**
    +     * Classes annotated with @javax.jws.WebService must have a public default constructor. Class: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.doc.bare.no.return.and.no.out", arg0, arg1);
    +    }
    +
    +    /**
    +     * Document literal bare methods that do not have a return value must have a single OUT/INOUT parameter.  Class: {0} Method: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.method.exception.bean.name.not.unique", arg0, arg1);
    +    }
    +
    +    /**
    +     * Exception bean names must be unique and must not clash with other generated classes.  Class: {0} exception {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_DOC_BARE_NO_OUT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.doc.bare.no.out", arg0, arg1);
    +    }
    +
    +    /**
    +     * Document/literal bare methods with no return type or OUT/INOUT parameters must be annotated as @Oneway. Class: {0}, method: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_DOC_BARE_NO_OUT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_DOC_BARE_NO_OUT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.failed.to.find.handlerchain.file", arg0, arg1);
    +    }
    +
    +    /**
    +     * Cannot find HandlerChain file. class: {0}, file: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(arg0, arg1));
         }
     
         public static Localizable localizableWEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("webserviceap.oneway.and.not.one.in", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("webserviceap.oneway.and.not.one.in", arg0, arg1);
         }
     
         /**
    @@ -920,7 +316,618 @@ public final class WebserviceapMessages {
          *
          */
         public static String WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(arg0, arg1));
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_CLASS_NOT_FOUND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.class.not.found", arg0);
    +    }
    +
    +    /**
    +     * Class Not Found: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_CLASS_NOT_FOUND(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_CLASS_NOT_FOUND(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.method.parameter.types.cannot.implement.remote", arg0, arg1, arg2, arg3);
    +    }
    +
    +    /**
    +     * Method parameter types cannot implement java.rmi.Remote.  Class: {0} method: {1} parameter: {2} type: {3}
    +     *
    +     */
    +    public static String WEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(arg0, arg1, arg2, arg3));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.non.in.parameters.must.be.holder", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * Class: {0}, method: {1}, parameter: {2} is not WebParam.Mode.IN and is not of type javax.xml.ws.Holder.
    +     *
    +     */
    +    public static String WEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_INIT_PARAM_FORMAT_ERROR() {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.init_param.format.error");
    +    }
    +
    +    /**
    +     * a  element must have exactly 1  and 1 
    +     *
    +     */
    +    public static String WEBSERVICEAP_INIT_PARAM_FORMAT_ERROR() {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_INIT_PARAM_FORMAT_ERROR());
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.document.literal.bare.must.have.one.in.or.out", arg0, arg1);
    +    }
    +
    +    /**
    +     * Document literal bare methods must have at least one of: a return, an in parameter or an out parameter.  Class: {0} Method: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.oneway.operation.cannot.have.holders", arg0, arg1);
    +    }
    +
    +    /**
    +     * The method {1} of class {0} is annotated @Oneway but contains INOUT or OUT parameters (javax.xml.ws.Holder)
    +     *
    +     */
    +    public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.endpointinteface.plus.element", arg0);
    +    }
    +
    +    /**
    +     * The @javax.jws.WebService.{0} element cannot be used in with @javax.jws.WebService.endpointInterface element.
    +     *
    +     */
    +    public static String WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.invalid.sei.annotation.element", arg0, arg1);
    +    }
    +
    +    /**
    +     * The @javax.jws.WebService.{0} element cannot be specified on a service endpoint interface. Class: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.header.parameters.must.have.webparam.name", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * All WebParam annotations on header parameters must specify a name.  Class: {0} method {1} parameter {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_FILE_NOT_FOUND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.fileNotFound", arg0);
    +    }
    +
    +    /**
    +     * error: file not found: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_FILE_NOT_FOUND(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_FILE_NOT_FOUND(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_METHOD_NOT_ANNOTATED(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.method.not.annotated", arg0, arg1);
    +    }
    +
    +    /**
    +     * The method {0} on class {1} is not annotated.
    +     *
    +     */
    +    public static String WEBSERVICEAP_METHOD_NOT_ANNOTATED(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_METHOD_NOT_ANNOTATED(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.endpointinterface.has.no.webservice.annotation", arg0);
    +    }
    +
    +    /**
    +     * The endpoint interface {0} must have a WebService annotation
    +     *
    +     */
    +    public static String WEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.rpc.literal.webparams.must.specify.name", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * All RPC literal WebParams must specify a name.  Class: {0} method {1} parameter {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.document.literal.bare.method.not.unique", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * Document literal bare methods must have unique parameter names.  Class: {0} method: {1} parameter name: {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.rpc.literal.must.not.be.bare", arg0);
    +    }
    +
    +    /**
    +     * RPC literal SOAPBindings must have parameterStyle WRAPPED. Class: {0}.
    +     *
    +     */
    +    public static String WEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.oneway.operation.cannot.declare.exceptions", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * The method {1} of class {0} is annotated @Oneway but declares the exception {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.document.literal.bare.method.return.not.unique", arg0, arg1, arg2, arg3);
    +    }
    +
    +    /**
    +     * Document literal bare methods must have a unique result name return type combination.  Class {0} method: {1}, result name: {2} return type: {3}
    +     *
    +     */
    +    public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(arg0, arg1, arg2, arg3));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.oneway.operation.cannot.have.return.type", arg0, arg1);
    +    }
    +
    +    /**
    +     * The method {1} of class {0} is annotated @Oneway but has a return type.
    +     *
    +     */
    +    public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND() {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.no.webservice.endpoint.found");
    +    }
    +
    +    /**
    +     * A web service endpoint could not be found
    +     *
    +     */
    +    public static String WEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND() {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND());
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ONEWAY_AND_OUT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.oneway.and.out", arg0, arg1);
    +    }
    +
    +    /**
    +     * @Oneway methods cannot have out parameters. Class: {0} method {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_ONEWAY_AND_OUT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ONEWAY_AND_OUT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS() {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.cannot.combine.handlerchain.soapmessagehandlers");
    +    }
    +
    +    /**
    +     * You cannot specify both HanlderChain and SOAPMessageHandlers annotations
    +     *
    +     */
    +    public static String WEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS() {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS());
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.webservice.class.is.innerclass.not.static", arg0);
    +    }
    +
    +    /**
    +     * Inner classes annotated with @javax.jws.WebService must be static. Class: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_INFO(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.info", arg0);
    +    }
    +
    +    /**
    +     * info: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_INFO(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_INFO(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_JAVA_TYPE_NOT_FOUND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.java.typeNotFound", arg0);
    +    }
    +
    +    /**
    +     * The type: {0} was not found in the mapping
    +     *
    +     */
    +    public static String WEBSERVICEAP_JAVA_TYPE_NOT_FOUND(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_JAVA_TYPE_NOT_FOUND(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.rpc.soapbinding.not.allowed.on.method", arg0, arg1);
    +    }
    +
    +    /**
    +     * SOAPBinding.Style.RPC binding annotations are not allowed on methods.  Class: {0} Method: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.could.not.find.typedecl", arg0, arg1);
    +    }
    +
    +    /**
    +     * Could not get TypeElement for: {0} in annotation processing round: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.endpointinterfaces.do.not.match", arg0, arg1);
    +    }
    +
    +    /**
    +     * The endpoint interface {0} does not match the interface {1}.
    +     *
    +     */
    +    public static String WEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.method.response.wrapper.bean.name.not.unique", arg0, arg1);
    +    }
    +
    +    /**
    +     * Response wrapper bean names must be unique and must not clash with other generated classes.  Class: {0} method {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.document.literal.bare.cannot.have.more.than.one.out", arg0, arg1);
    +    }
    +
    +    /**
    +     * Document literal bare methods must have a return value or one out parameter.  Class: {0} Method: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webservice.encoded.not.supported", arg0, arg1);
    +    }
    +
    +    /**
    +     * The {0} class has invalid SOAPBinding annotation. {1}/encoded SOAPBinding is not supported
    +     *
    +     */
    +    public static String WEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.operation.name.not.unique", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * Operation names must be unique.  Class: {0} method: {1} operation name: {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.invalid.handlerchain.file.nohandler-config", arg0);
    +    }
    +
    +    /**
    +     * The handlerchain file {0} is invalid, it does not contain a handler-config element
    +     *
    +     */
    +    public static String WEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.method.request.wrapper.bean.name.not.unique", arg0, arg1);
    +    }
    +
    +    /**
    +     * Request wrapper bean names must be unique and must not clash with other generated classes.  Class: {0} method {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_MODEL_ALREADY_EXISTS() {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.model.already.exists");
    +    }
    +
    +    /**
    +     * model already exists
    +     *
    +     */
    +    public static String WEBSERVICEAP_MODEL_ALREADY_EXISTS() {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_MODEL_ALREADY_EXISTS());
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.invalid.soapbinding.parameterstyle", arg0, arg1);
    +    }
    +
    +    /**
    +     * Incorrect usage of Annotation {0} on {1}, ParameterStyle can only be WRAPPED with RPC Style Web service.
    +     *
    +     */
    +    public static String WEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.rpc.literal.parameters.must.have.webparam", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * All RPC literal parameters must have a WebParam annotation.  Class: {0} method: {1} parameter {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR() {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.parsing.javac.options.error");
    +    }
    +
    +    /**
    +     * Can't get javac options from processingEnv.
    +     *
    +     */
    +    public static String WEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR() {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR());
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.webservice.class.is.abstract", arg0);
    +    }
    +
    +    /**
    +     * Classes annotated with @javax.jws.WebService must not be abstract. Class: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.method.not.implemented", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * Methods in an endpointInterface must be implemented in the implementation class.  Interface Class:{0} Implementation Class:{1} Method: {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_METHOD_NOT_IMPLEMENTED(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.endpointinteface.plus.annotation", arg0);
    +    }
    +
    +    /**
    +     * The @{0} annotation cannot be used in with @javax.jws.WebService.endpointInterface element.
    +     *
    +     */
    +    public static String WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.rpc.encoded.not.supported", arg0);
    +    }
    +
    +    /**
    +     * The class {0} has a rpc/encoded SOAPBinding.  Rpc/encoded SOAPBindings are not supported in JAXWS 2.0.
    +     *
    +     */
    +    public static String WEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.sei.cannot.contain.constant.values", arg0, arg1);
    +    }
    +
    +    /**
    +     * A service endpoint interface cannot contain constant declaration: Interface: {0} field: {1}.
    +     *
    +     */
    +    public static String WEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.holder.parameters.must.not.be.in.only", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * javax.xml.ws.Holder parameters must not be annotated with the WebParam.Mode.IN property.  Class: {0} method: {1} parameter: {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.invalid.sei.annotation.element.exclude", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * The @javax.jws.WebMethod({0}) cannot be used on a service endpoint interface. Class: {1} method: {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.webservice.class.not.public", arg0);
    +    }
    +
    +    /**
    +     * Classes annotated with @javax.jws.WebService must be public. Class: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.webservice.class.is.final", arg0);
    +    }
    +
    +    /**
    +     * Classes annotated with @javax.jws.WebService must not be final. Class: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.invalid.webmethod.element.with.exclude", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * The @javax.jws.WebMethod.{0} element cannot be specified with the @javax.jws.WebMethod.exclude element. Class: {1} method: {2}
    +     *
    +     */
    +    public static String WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_WARNING(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.warning", arg0);
    +    }
    +
    +    /**
    +     * warning: {0}
    +     *
    +     */
    +    public static String WEBSERVICEAP_WARNING(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_WARNING(arg0));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.failed.to.parse.handlerchain.file", arg0, arg1);
    +    }
    +
    +    /**
    +     * Failed to parse HandlerChain file. Class: {0}, file: {1}
    +     *
    +     */
    +    public static String WEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("webserviceap.handlerclass.notspecified", arg0);
    +    }
    +
    +    /**
    +     * A handler in the HandlerChain file: {0} does not specify a handler-class
    +     *
    +     */
    +    public static String WEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(Object arg0) {
    +        return LOCALIZER.localize(localizableWEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(arg0));
    +    }
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
         }
     
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java
    index f186c7b8d19..35845d5fe9b 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -25,12 +25,12 @@
     
     package com.sun.tools.internal.ws.resources;
     
    -import com.sun.istack.internal.localization.Localizable;
    -import com.sun.istack.internal.localization.LocalizableMessageFactory;
    -import com.sun.istack.internal.localization.Localizer;
    -
     import java.util.Locale;
     import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.Localizable;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
     
     
     /**
    @@ -38,247 +38,25 @@ import java.util.ResourceBundle;
      *
      */
     public final class WscompileMessages {
    +
         private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.wscompile";
    -    private final static LocalizableMessageFactory messageFactory =
    -        new LocalizableMessageFactory(BUNDLE_NAME, WscompileMessages::getResourceBundle);
    -    private final static Localizer localizer = new Localizer();
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new WscompileMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
     
    -    private static ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    -    }
    -
    -    public static Localizable localizableWSIMPORT_ARCHIVING_ARTIFACTS(Object arg0) {
    -        return messageFactory.getMessage("wsimport.archivingArtifacts", arg0);
    +    public static Localizable localizableWSIMPORT_NOT_A_FILE_NOR_URL(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.NotAFileNorURL", arg0);
         }
     
         /**
    -     *
    -     * Archiving the generated artifacts into {0}.
    -     *
    +     * "{0}" is neither a file name nor an URL
          *
          */
    -    public static String WSIMPORT_ARCHIVING_ARTIFACTS(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_ARCHIVING_ARTIFACTS(arg0));
    -    }
    -
    -    public static Localizable localizableWSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(Object arg0) {
    -        return messageFactory.getMessage("wsgen.class.must.be.implementation.class", arg0);
    -    }
    -
    -    /**
    -     * The class "{0}" is not an endpoint implementation class.
    -     *
    -     */
    -    public static String WSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(Object arg0) {
    -        return localizer.localize(localizableWSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(arg0));
    -    }
    -
    -    public static Localizable localizableWSGEN_FULLVERSION(Object arg0) {
    -        return messageFactory.getMessage("wsgen.fullversion", arg0);
    -    }
    -
    -    /**
    -     * wsgen full version "{0}"
    -     *
    -     */
    -    public static String WSGEN_FULLVERSION(Object arg0) {
    -        return localizer.localize(localizableWSGEN_FULLVERSION(arg0));
    -    }
    -
    -    public static Localizable localizableWRAPPER_TASK_LOADING_INCORRECT_API(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wrapperTask.loadingIncorrectApi", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * You are loading JAX-WS {0} API from {1} but this tool requires JAX-WS {2} API.
    -     *
    -     */
    -    public static String WRAPPER_TASK_LOADING_INCORRECT_API(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWRAPPER_TASK_LOADING_INCORRECT_API(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSIMPORT_WSDLLOCATION_CLIENTJAR() {
    -        return messageFactory.getMessage("wsimport.wsdllocation.clientjar");
    -    }
    -
    -    /**
    -     * wsdlLocation cannot be specified when using clientJar option
    -     *
    -     */
    -    public static String WSIMPORT_WSDLLOCATION_CLIENTJAR() {
    -        return localizer.localize(localizableWSIMPORT_WSDLLOCATION_CLIENTJAR());
    -    }
    -
    -    public static Localizable localizableWSIMPORT_VERSION(Object arg0) {
    -        return messageFactory.getMessage("wsimport.version", arg0);
    -    }
    -
    -    /**
    -     * wsimport version "{0}"
    -     *
    -     */
    -    public static String WSIMPORT_VERSION(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_VERSION(arg0));
    -    }
    -
    -    public static Localizable localizableWSGEN_CLASS_NOT_FOUND(Object arg0) {
    -        return messageFactory.getMessage("wsgen.class.not.found", arg0);
    -    }
    -
    -    /**
    -     * Class not found: "{0}"
    -     *
    -     */
    -    public static String WSGEN_CLASS_NOT_FOUND(Object arg0) {
    -        return localizer.localize(localizableWSGEN_CLASS_NOT_FOUND(arg0));
    -    }
    -
    -    public static Localizable localizableWSIMPORT_HTTP_REDIRECT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsimport.httpRedirect", arg0, arg1);
    -    }
    -
    -    /**
    -     * Server returned HTTP Status code: "{0}", retrying with "{1}"
    -     *
    -     */
    -    public static String WSIMPORT_HTTP_REDIRECT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSIMPORT_HTTP_REDIRECT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSIMPORT_AUTH_INFO_NEEDED(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsimport.authInfoNeeded", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * {0},  "{1}" needs authorization, please provide authorization file with read access at {2} or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
    -     *
    -     */
    -    public static String WSIMPORT_AUTH_INFO_NEEDED(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSIMPORT_AUTH_INFO_NEEDED(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSGEN_USAGE_EXAMPLES() {
    -        return messageFactory.getMessage("wsgen.usage.examples");
    -    }
    -
    -    /**
    -     *
    -     * Examples:
    -     *   wsgen -cp . example.Stock
    -     *   wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'
    -     *
    -     *
    -     */
    -    public static String WSGEN_USAGE_EXAMPLES() {
    -        return localizer.localize(localizableWSGEN_USAGE_EXAMPLES());
    -    }
    -
    -    public static Localizable localizableWSIMPORT_FETCHING_METADATA() {
    -        return messageFactory.getMessage("wsimport.fetchingMetadata");
    -    }
    -
    -    /**
    -     *
    -     * Downloading the WSDL and associated metadata
    -     *
    -     *
    -     */
    -    public static String WSIMPORT_FETCHING_METADATA() {
    -        return localizer.localize(localizableWSIMPORT_FETCHING_METADATA());
    -    }
    -
    -    public static Localizable localizableWSGEN_INVALID_PROTOCOL(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsgen.invalid.protocol", arg0, arg1);
    -    }
    -
    -    /**
    -     * "{0}" is not a supported protocol.  Supported protocols include: {1}.
    -     *
    -     */
    -    public static String WSGEN_INVALID_PROTOCOL(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSGEN_INVALID_PROTOCOL(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSIMPORT_USAGE_EXAMPLES() {
    -        return messageFactory.getMessage("wsimport.usage.examples");
    -    }
    -
    -    /**
    -     *
    -     * Examples:
    -     *   wsimport stock.wsdl -b stock.xml -b stock.xjb
    -     *   wsimport -d generated http://example.org/stock?wsdl
    -     *
    -     *
    -     */
    -    public static String WSIMPORT_USAGE_EXAMPLES() {
    -        return localizer.localize(localizableWSIMPORT_USAGE_EXAMPLES());
    -    }
    -
    -    public static Localizable localizableINVOKER_NEED_ENDORSED(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("invoker.needEndorsed", arg0, arg1);
    -    }
    -
    -    /**
    -     * You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), or use -Xendorsed option.
    -     *
    -     */
    -    public static String INVOKER_NEED_ENDORSED(Object arg0, Object arg1) {
    -        return localizer.localize(localizableINVOKER_NEED_ENDORSED(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSIMPORT_MISSING_FILE() {
    -        return messageFactory.getMessage("wsimport.missingFile");
    -    }
    -
    -    /**
    -     * Missing WSDL_URI
    -     *
    -     */
    -    public static String WSIMPORT_MISSING_FILE() {
    -        return localizer.localize(localizableWSIMPORT_MISSING_FILE());
    -    }
    -
    -    public static Localizable localizableWSIMPORT_USAGE_EXTENSIONS() {
    -        return messageFactory.getMessage("wsimport.usage.extensions");
    -    }
    -
    -    /**
    -     *
    -     * Extensions:
    -     *   -XadditionalHeaders              map headers not bound to request or response message to
    -     *                                    Java method parameters
    -     *   -Xauthfile                       file to carry authorization information in the format
    -     *                                    http://username:password@example.org/stock?wsdl
    -     *   -Xdebug                          print debug information
    -     *   -Xno-addressing-databinding      enable binding of W3C EndpointReferenceType to Java
    -     *   -Xnocompile                      do not compile generated Java files
    -     *   -XdisableAuthenticator           disable Authenticator used by JAX-WS RI,
    -     *                                    -Xauthfile option will be ignored if set
    -     *   -XdisableSSLHostnameVerification disable the SSL Hostname verification while fetching
    -     *                                    wsdls
    -     *
    -     */
    -    public static String WSIMPORT_USAGE_EXTENSIONS() {
    -        return localizer.localize(localizableWSIMPORT_USAGE_EXTENSIONS());
    -    }
    -
    -    public static Localizable localizableWSIMPORT_USAGE(Object arg0) {
    -        return messageFactory.getMessage("wsimport.usage", arg0);
    -    }
    -
    -    /**
    -     * Usage: {0} [options] 
    -     *
    -     * Use "wsimport -help" for a detailed description of options.
    -     *
    -     */
    -    public static String WSIMPORT_USAGE(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_USAGE(arg0));
    +    public static String WSIMPORT_NOT_A_FILE_NOR_URL(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_NOT_A_FILE_NOR_URL(arg0));
         }
     
         public static Localizable localizableWSGEN_USAGE_EXTENSIONS() {
    -        return messageFactory.getMessage("wsgen.usage.extensions");
    +        return MESSAGE_FACTORY.getMessage("wsgen.usage.extensions");
         }
     
         /**
    @@ -288,50 +66,11 @@ public final class WscompileMessages {
          *
          */
         public static String WSGEN_USAGE_EXTENSIONS() {
    -        return localizer.localize(localizableWSGEN_USAGE_EXTENSIONS());
    -    }
    -
    -    public static Localizable localizableWSCOMPILE_EXISTING_OPTION(Object arg0) {
    -        return messageFactory.getMessage("wscompile.existingOption", arg0);
    -    }
    -
    -    /**
    -     * Ignoring already defined option {0}
    -     *
    -     *
    -     */
    -    public static String WSCOMPILE_EXISTING_OPTION(Object arg0) {
    -        return localizer.localize(localizableWSCOMPILE_EXISTING_OPTION(arg0));
    -    }
    -
    -    public static Localizable localizableWSIMPORT_PARSING_WSDL() {
    -        return messageFactory.getMessage("wsimport.ParsingWSDL");
    -    }
    -
    -    /**
    -     * parsing WSDL...
    -     *
    -     *
    -     *
    -     */
    -    public static String WSIMPORT_PARSING_WSDL() {
    -        return localizer.localize(localizableWSIMPORT_PARSING_WSDL());
    -    }
    -
    -    public static Localizable localizableWSGEN_MISSING_FILE() {
    -        return messageFactory.getMessage("wsgen.missingFile");
    -    }
    -
    -    /**
    -     * Missing SEI
    -     *
    -     */
    -    public static String WSGEN_MISSING_FILE() {
    -        return localizer.localize(localizableWSGEN_MISSING_FILE());
    +        return LOCALIZER.localize(localizableWSGEN_USAGE_EXTENSIONS());
         }
     
         public static Localizable localizableWSIMPORT_HELP(Object arg0) {
    -        return messageFactory.getMessage("wsimport.help", arg0);
    +        return MESSAGE_FACTORY.getMessage("wsimport.help", arg0);
         }
     
         /**
    @@ -358,6 +97,7 @@ public final class WscompileMessages {
          *   -J           pass this option to javac
          *   -keep                     keep generated files
          *   -p                   specifies the target package
    +     *   -m                  generate module-info.java with given Java module name
          *   -quiet                    suppress wsimport output
          *   -s             specify where to place generated source files
          *   -target          generate code as per the given JAXWS spec version
    @@ -376,48 +116,258 @@ public final class WscompileMessages {
          *
          */
         public static String WSIMPORT_HELP(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_HELP(arg0));
    +        return LOCALIZER.localize(localizableWSIMPORT_HELP(arg0));
         }
     
    -    public static Localizable localizableWSCOMPILE_CANT_GET_COMPILER(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wscompile.cant.get.compiler", arg0, arg1, arg2);
    +    public static Localizable localizableWSIMPORT_ILLEGAL_TARGET_VERSION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.ILLEGAL_TARGET_VERSION", arg0);
         }
     
         /**
    -     * No Java compiler found. Perhaps environment/JDK problem?
    -     *  Used JVM: {0}, {1}/{2}
    +     * "{0}" is not a valid target version. "2.0" and "2.1" are supported.
          *
          */
    -    public static String WSCOMPILE_CANT_GET_COMPILER(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSCOMPILE_CANT_GET_COMPILER(arg0, arg1, arg2));
    +    public static String WSIMPORT_ILLEGAL_TARGET_VERSION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_ILLEGAL_TARGET_VERSION(arg0));
         }
     
    -    public static Localizable localizableWSCOMPILE_ERROR(Object arg0) {
    -        return messageFactory.getMessage("wscompile.error", arg0);
    +    public static Localizable localizableWSIMPORT_USAGE_EXAMPLES() {
    +        return MESSAGE_FACTORY.getMessage("wsimport.usage.examples");
         }
     
         /**
    -     * error: {0}
    +     *
    +     * Examples:
    +     *   wsimport stock.wsdl -b stock.xml -b stock.xjb
    +     *   wsimport -d generated http://example.org/stock?wsdl
    +     *
          *
          */
    -    public static String WSCOMPILE_ERROR(Object arg0) {
    -        return localizer.localize(localizableWSCOMPILE_ERROR(arg0));
    +    public static String WSIMPORT_USAGE_EXAMPLES() {
    +        return LOCALIZER.localize(localizableWSIMPORT_USAGE_EXAMPLES());
         }
     
    -    public static Localizable localizableWSGEN_PROTOCOL_WITHOUT_EXTENSION(Object arg0) {
    -        return messageFactory.getMessage("wsgen.protocol.without.extension", arg0);
    +    public static Localizable localizableWSIMPORT_DEBUG_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.DebugMessage", arg0);
         }
     
         /**
    -     * The optional protocol "{0}" must be used in conjunction with the "-extension" option.
    +     * [DEBUG] {0}
          *
          */
    -    public static String WSGEN_PROTOCOL_WITHOUT_EXTENSION(Object arg0) {
    -        return localizer.localize(localizableWSGEN_PROTOCOL_WITHOUT_EXTENSION(arg0));
    +    public static String WSIMPORT_DEBUG_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_DEBUG_MESSAGE(arg0));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_FULLVERSION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.fullversion", arg0);
    +    }
    +
    +    /**
    +     * wsimport full version "{0}"
    +     *
    +     */
    +    public static String WSIMPORT_FULLVERSION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_FULLVERSION(arg0));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_NO_SUCH_JAXB_OPTION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.noSuchJaxbOption", arg0);
    +    }
    +
    +    /**
    +     * no such JAXB option: {0}
    +     *
    +     */
    +    public static String WSIMPORT_NO_SUCH_JAXB_OPTION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_NO_SUCH_JAXB_OPTION(arg0));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_ILLEGAL_PROXY(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.ILLEGAL_PROXY", arg0);
    +    }
    +
    +    /**
    +     * "{0}" is not a valid proxy format. The format is [user[:password]@]proxyHost:proxyPort
    +     *
    +     */
    +    public static String WSIMPORT_ILLEGAL_PROXY(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_ILLEGAL_PROXY(arg0));
    +    }
    +
    +    public static Localizable localizableINVOKER_NEED_ENDORSED(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("invoker.needEndorsed", arg0, arg1);
    +    }
    +
    +    /**
    +     * You are running on JDK6 or newer which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} or newer API. Use the standard override mechanism.
    +     *
    +     */
    +    public static String INVOKER_NEED_ENDORSED(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableINVOKER_NEED_ENDORSED(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_AUTH_INFO_NEEDED(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.authInfoNeeded", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * {0},  "{1}" needs authorization, please provide authorization file with read access at {2} or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
    +     *
    +     */
    +    public static String WSIMPORT_AUTH_INFO_NEEDED(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSIMPORT_AUTH_INFO_NEEDED(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_AUTH_INFO_LINENO(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.AUTH_INFO_LINENO", arg0, arg1);
    +    }
    +
    +    /**
    +     * line {0} of {1}
    +     *
    +     */
    +    public static String WSIMPORT_AUTH_INFO_LINENO(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSIMPORT_AUTH_INFO_LINENO(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSCOMPILE_MISSING_OPTION_ARGUMENT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wscompile.missingOptionArgument", arg0);
    +    }
    +
    +    /**
    +     * option "{0}" requires an argument
    +     *
    +     */
    +    public static String WSCOMPILE_MISSING_OPTION_ARGUMENT(Object arg0) {
    +        return LOCALIZER.localize(localizableWSCOMPILE_MISSING_OPTION_ARGUMENT(arg0));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_ARCHIVE_ARTIFACT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.archiveArtifact", arg0, arg1);
    +    }
    +
    +    /**
    +     * Adding {0} to the archive {1}
    +     *
    +     */
    +    public static String WSIMPORT_ARCHIVE_ARTIFACT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSIMPORT_ARCHIVE_ARTIFACT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSGEN_USAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.usage", arg0);
    +    }
    +
    +    /**
    +     * Usage: {0} [options] 
    +     *
    +     * Use "wsgen -help" for a detailed description of options.
    +     *
    +     */
    +    public static String WSGEN_USAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_USAGE(arg0));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_USAGE_EXTENSIONS() {
    +        return MESSAGE_FACTORY.getMessage("wsimport.usage.extensions");
    +    }
    +
    +    /**
    +     *
    +     * Extensions:
    +     *   -XadditionalHeaders              map headers not bound to request or response message to
    +     *                                    Java method parameters
    +     *   -Xauthfile                       file to carry authorization information in the format
    +     *                                    http://username:password@example.org/stock?wsdl
    +     *   -Xdebug                          print debug information
    +     *   -Xno-addressing-databinding      enable binding of W3C EndpointReferenceType to Java
    +     *   -Xnocompile                      do not compile generated Java files
    +     *   -XdisableAuthenticator           disable Authenticator used by JAX-WS RI,
    +     *                                    -Xauthfile option will be ignored if set
    +     *   -XdisableSSLHostnameVerification disable the SSL Hostname verification while fetching
    +     *                                    wsdls
    +     *
    +     */
    +    public static String WSIMPORT_USAGE_EXTENSIONS() {
    +        return LOCALIZER.localize(localizableWSIMPORT_USAGE_EXTENSIONS());
    +    }
    +
    +    public static Localizable localizableWSIMPORT_WARNING_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.WarningMessage", arg0);
    +    }
    +
    +    /**
    +     * [WARNING] {0}
    +     *
    +     */
    +    public static String WSIMPORT_WARNING_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_WARNING_MESSAGE(arg0));
    +    }
    +
    +    public static Localizable localizableWSGEN_INVALID_TRANSPORT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.invalid.transport", arg0, arg1);
    +    }
    +
    +    /**
    +     * "{0}" is not a supported transport.  Supported transport includes: {1}.
    +     *
    +     */
    +    public static String WSGEN_INVALID_TRANSPORT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSGEN_INVALID_TRANSPORT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_DOCUMENT_DOWNLOAD(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.document.download", arg0, arg1);
    +    }
    +
    +    /**
    +     *
    +     * Downloading metadata document from {0} to {1}
    +     *
    +     */
    +    public static String WSIMPORT_DOCUMENT_DOWNLOAD(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSIMPORT_DOCUMENT_DOWNLOAD(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSGEN_CLASS_NOT_FOUND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.class.not.found", arg0);
    +    }
    +
    +    /**
    +     * Class not found: "{0}"
    +     *
    +     */
    +    public static String WSGEN_CLASS_NOT_FOUND(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_CLASS_NOT_FOUND(arg0));
    +    }
    +
    +    public static Localizable localizableWSCOMPILE_DUPLICATE_OPTION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wscompile.duplicateOption", arg0);
    +    }
    +
    +    /**
    +     * duplicate option: {0}
    +     *
    +     */
    +    public static String WSCOMPILE_DUPLICATE_OPTION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSCOMPILE_DUPLICATE_OPTION(arg0));
    +    }
    +
    +    public static Localizable localizableWSCOMPILE_UNSUPPORTED_ENCODING(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wscompile.unsupportedEncoding", arg0);
    +    }
    +
    +    /**
    +     * unsupported encoding: {0}
    +     *
    +     */
    +    public static String WSCOMPILE_UNSUPPORTED_ENCODING(Object arg0) {
    +        return LOCALIZER.localize(localizableWSCOMPILE_UNSUPPORTED_ENCODING(arg0));
         }
     
         public static Localizable localizableWSIMPORT_COMPILING_CODE() {
    -        return messageFactory.getMessage("wsimport.CompilingCode");
    +        return MESSAGE_FACTORY.getMessage("wsimport.CompilingCode");
         }
     
         /**
    @@ -427,83 +377,23 @@ public final class WscompileMessages {
          *
          */
         public static String WSIMPORT_COMPILING_CODE() {
    -        return localizer.localize(localizableWSIMPORT_COMPILING_CODE());
    +        return LOCALIZER.localize(localizableWSIMPORT_COMPILING_CODE());
         }
     
    -    public static Localizable localizableWSIMPORT_READING_AUTH_FILE(Object arg0) {
    -        return messageFactory.getMessage("wsimport.readingAuthFile", arg0);
    +    public static Localizable localizableWSGEN_SERVICENAME_MISSING_NAMESPACE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.servicename.missing.namespace", arg0);
         }
     
         /**
    -     * Trying to read authorization file : "{0}"...
    +     * The service name "{0}" is missing a namespace.
          *
          */
    -    public static String WSIMPORT_READING_AUTH_FILE(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_READING_AUTH_FILE(arg0));
    -    }
    -
    -    public static Localizable localizableWSCOMPILE_UNSUPPORTED_ENCODING(Object arg0) {
    -        return messageFactory.getMessage("wscompile.unsupportedEncoding", arg0);
    -    }
    -
    -    /**
    -     * unsupported encoding: {0}
    -     *
    -     */
    -    public static String WSCOMPILE_UNSUPPORTED_ENCODING(Object arg0) {
    -        return localizer.localize(localizableWSCOMPILE_UNSUPPORTED_ENCODING(arg0));
    -    }
    -
    -    public static Localizable localizableWSGEN_NO_WEBSERVICES_CLASS(Object arg0) {
    -        return messageFactory.getMessage("wsgen.no.webservices.class", arg0);
    -    }
    -
    -    /**
    -     * wsgen did not find any class with @WebService annotation. Please specify @WebService annotation on {0}.
    -     *
    -     */
    -    public static String WSGEN_NO_WEBSERVICES_CLASS(Object arg0) {
    -        return localizer.localize(localizableWSGEN_NO_WEBSERVICES_CLASS(arg0));
    -    }
    -
    -    public static Localizable localizableWSIMPORT_ARCHIVE_ARTIFACT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsimport.archiveArtifact", arg0, arg1);
    -    }
    -
    -    /**
    -     * Adding {0} to the archive {1}
    -     *
    -     */
    -    public static String WSIMPORT_ARCHIVE_ARTIFACT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSIMPORT_ARCHIVE_ARTIFACT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSCOMPILE_NO_SUCH_DIRECTORY(Object arg0) {
    -        return messageFactory.getMessage("wscompile.noSuchDirectory", arg0);
    -    }
    -
    -    /**
    -     * directory not found: {0}
    -     *
    -     */
    -    public static String WSCOMPILE_NO_SUCH_DIRECTORY(Object arg0) {
    -        return localizer.localize(localizableWSCOMPILE_NO_SUCH_DIRECTORY(arg0));
    -    }
    -
    -    public static Localizable localizableWSCOMPILE_INFO(Object arg0) {
    -        return messageFactory.getMessage("wscompile.info", arg0);
    -    }
    -
    -    /**
    -     * info: {0}
    -     *
    -     */
    -    public static String WSCOMPILE_INFO(Object arg0) {
    -        return localizer.localize(localizableWSCOMPILE_INFO(arg0));
    +    public static String WSGEN_SERVICENAME_MISSING_NAMESPACE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_SERVICENAME_MISSING_NAMESPACE(arg0));
         }
     
         public static Localizable localizableWSIMPORT_MAX_REDIRECT_ATTEMPT() {
    -        return messageFactory.getMessage("wsimport.maxRedirectAttempt");
    +        return MESSAGE_FACTORY.getMessage("wsimport.maxRedirectAttempt");
         }
     
         /**
    @@ -511,47 +401,72 @@ public final class WscompileMessages {
          *
          */
         public static String WSIMPORT_MAX_REDIRECT_ATTEMPT() {
    -        return localizer.localize(localizableWSIMPORT_MAX_REDIRECT_ATTEMPT());
    +        return LOCALIZER.localize(localizableWSIMPORT_MAX_REDIRECT_ATTEMPT());
         }
     
    -    public static Localizable localizableWSIMPORT_WARNING_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("wsimport.WarningMessage", arg0);
    +    public static Localizable localizableWSIMPORT_READING_AUTH_FILE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.readingAuthFile", arg0);
         }
     
         /**
    -     * [WARNING] {0}
    +     * Trying to read authorization file : "{0}"...
          *
          */
    -    public static String WSIMPORT_WARNING_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_WARNING_MESSAGE(arg0));
    +    public static String WSIMPORT_READING_AUTH_FILE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_READING_AUTH_FILE(arg0));
         }
     
    -    public static Localizable localizableWSCOMPILE_INVALID_OPTION(Object arg0) {
    -        return messageFactory.getMessage("wscompile.invalidOption", arg0);
    +    public static Localizable localizableWSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.cannot.gen.wsdl.for.soap12.binding", arg0, arg1);
         }
     
         /**
    -     * unrecognized parameter {0}
    +     * wsgen can not generate WSDL for SOAP 1.2 binding: {0} on class: {1}.Please specify "-extension" and "-wsdl:protocol XSoap1.2" switches. For example:wsgen -wsdl:protocol XSoap1.2 -extenson {1}
          *
          */
    -    public static String WSCOMPILE_INVALID_OPTION(Object arg0) {
    -        return localizer.localize(localizableWSCOMPILE_INVALID_OPTION(arg0));
    +    public static String WSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(arg0, arg1));
         }
     
    -    public static Localizable localizableWSIMPORT_ERROR_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("wsimport.ErrorMessage", arg0);
    +    public static Localizable localizableWSIMPORT_INFO_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.InfoMessage", arg0);
         }
     
         /**
    -     * [ERROR] {0}
    +     * [INFO] {0}
          *
          */
    -    public static String WSIMPORT_ERROR_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_ERROR_MESSAGE(arg0));
    +    public static String WSIMPORT_INFO_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_INFO_MESSAGE(arg0));
    +    }
    +
    +    public static Localizable localizableWSCOMPILE_EXISTING_OPTION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wscompile.existingOption", arg0);
    +    }
    +
    +    /**
    +     * Ignoring already defined option {0}
    +     *
    +     *
    +     */
    +    public static String WSCOMPILE_EXISTING_OPTION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSCOMPILE_EXISTING_OPTION(arg0));
    +    }
    +
    +    public static Localizable localizableWSGEN_PORTNAME_MISSING_NAMESPACE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.portname.missing.namespace", arg0);
    +    }
    +
    +    /**
    +     * The port name "{0}" is missing a namespace.
    +     *
    +     */
    +    public static String WSGEN_PORTNAME_MISSING_NAMESPACE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_PORTNAME_MISSING_NAMESPACE(arg0));
         }
     
         public static Localizable localizableWSIMPORT_GENERATING_CODE() {
    -        return messageFactory.getMessage("wsimport.GeneratingCode");
    +        return MESSAGE_FACTORY.getMessage("wsimport.GeneratingCode");
         }
     
         /**
    @@ -561,71 +476,11 @@ public final class WscompileMessages {
          *
          */
         public static String WSIMPORT_GENERATING_CODE() {
    -        return localizer.localize(localizableWSIMPORT_GENERATING_CODE());
    -    }
    -
    -    public static Localizable localizableWSIMPORT_NOT_A_FILE_NOR_URL(Object arg0) {
    -        return messageFactory.getMessage("wsimport.NotAFileNorURL", arg0);
    -    }
    -
    -    /**
    -     * "{0}" is neither a file name nor an URL
    -     *
    -     */
    -    public static String WSIMPORT_NOT_A_FILE_NOR_URL(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_NOT_A_FILE_NOR_URL(arg0));
    -    }
    -
    -    public static Localizable localizableWSCOMPILE_WARNING(Object arg0) {
    -        return messageFactory.getMessage("wscompile.warning", arg0);
    -    }
    -
    -    /**
    -     * warning: {0}
    -     *
    -     */
    -    public static String WSCOMPILE_WARNING(Object arg0) {
    -        return localizer.localize(localizableWSCOMPILE_WARNING(arg0));
    -    }
    -
    -    public static Localizable localizableWRAPPER_TASK_NEED_ENDORSED(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wrapperTask.needEndorsed", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), or set xendorsed="true" on <{2}>.
    -     *
    -     */
    -    public static String WRAPPER_TASK_NEED_ENDORSED(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWRAPPER_TASK_NEED_ENDORSED(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableWSIMPORT_NO_SUCH_JAXB_OPTION(Object arg0) {
    -        return messageFactory.getMessage("wsimport.noSuchJaxbOption", arg0);
    -    }
    -
    -    /**
    -     * no such JAXB option: {0}
    -     *
    -     */
    -    public static String WSIMPORT_NO_SUCH_JAXB_OPTION(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_NO_SUCH_JAXB_OPTION(arg0));
    -    }
    -
    -    public static Localizable localizableWSGEN_VERSION(Object arg0) {
    -        return messageFactory.getMessage("wsgen.version", arg0);
    -    }
    -
    -    /**
    -     * wsgen version "{0}"
    -     *
    -     */
    -    public static String WSGEN_VERSION(Object arg0) {
    -        return localizer.localize(localizableWSGEN_VERSION(arg0));
    +        return LOCALIZER.localize(localizableWSIMPORT_GENERATING_CODE());
         }
     
         public static Localizable localizableWSIMPORT_AUTH_FILE_NOT_FOUND(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsimport.authFileNotFound", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("wsimport.authFileNotFound", arg0, arg1);
         }
     
         /**
    @@ -633,47 +488,59 @@ public final class WscompileMessages {
          *
          */
         public static String WSIMPORT_AUTH_FILE_NOT_FOUND(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSIMPORT_AUTH_FILE_NOT_FOUND(arg0, arg1));
    +        return LOCALIZER.localize(localizableWSIMPORT_AUTH_FILE_NOT_FOUND(arg0, arg1));
         }
     
    -    public static Localizable localizableWSIMPORT_DEBUG_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("wsimport.DebugMessage", arg0);
    +    public static Localizable localizableWSIMPORT_WSDLLOCATION_CLIENTJAR() {
    +        return MESSAGE_FACTORY.getMessage("wsimport.wsdllocation.clientjar");
         }
     
         /**
    -     * [DEBUG] {0}
    +     * wsdlLocation cannot be specified when using clientJar option
          *
          */
    -    public static String WSIMPORT_DEBUG_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_DEBUG_MESSAGE(arg0));
    +    public static String WSIMPORT_WSDLLOCATION_CLIENTJAR() {
    +        return LOCALIZER.localize(localizableWSIMPORT_WSDLLOCATION_CLIENTJAR());
         }
     
    -    public static Localizable localizableWSGEN_COULD_NOT_CREATE_FILE(Object arg0) {
    -        return messageFactory.getMessage("wsgen.could.not.create.file", arg0);
    +    public static Localizable localizableWSIMPORT_FAILED_TO_PARSE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.FailedToParse", arg0, arg1);
         }
     
         /**
    -     * Could not create file: "{0}"
    +     * Failed to parse "{0}": {1}
          *
          */
    -    public static String WSGEN_COULD_NOT_CREATE_FILE(Object arg0) {
    -        return localizer.localize(localizableWSGEN_COULD_NOT_CREATE_FILE(arg0));
    +    public static String WSIMPORT_FAILED_TO_PARSE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSIMPORT_FAILED_TO_PARSE(arg0, arg1));
         }
     
    -    public static Localizable localizableWSGEN_WSDL_ARG_NO_GENWSDL(Object arg0) {
    -        return messageFactory.getMessage("wsgen.wsdl.arg.no.genwsdl", arg0);
    +    public static Localizable localizableWSIMPORT_NO_WSDL(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.no.wsdl", arg0);
         }
     
         /**
    -     * The "{0}" option can only be in conjunction with the "-wsdl" option.
    +     * Failed to read the WSDL document: {0}, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
          *
          */
    -    public static String WSGEN_WSDL_ARG_NO_GENWSDL(Object arg0) {
    -        return localizer.localize(localizableWSGEN_WSDL_ARG_NO_GENWSDL(arg0));
    +    public static String WSIMPORT_NO_WSDL(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_NO_WSDL(arg0));
    +    }
    +
    +    public static Localizable localizableWSGEN_INVALID_PROTOCOL(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.invalid.protocol", arg0, arg1);
    +    }
    +
    +    /**
    +     * "{0}" is not a supported protocol.  Supported protocols include: {1}.
    +     *
    +     */
    +    public static String WSGEN_INVALID_PROTOCOL(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSGEN_INVALID_PROTOCOL(arg0, arg1));
         }
     
         public static Localizable localizableWSGEN_HELP(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("wsgen.help", arg0, arg1, arg2);
    +        return MESSAGE_FACTORY.getMessage("wsgen.help", arg0, arg1, arg2);
         }
     
         /**
    @@ -714,59 +581,97 @@ public final class WscompileMessages {
          *
          */
         public static String WSGEN_HELP(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWSGEN_HELP(arg0, arg1, arg2));
    +        return LOCALIZER.localize(localizableWSGEN_HELP(arg0, arg1, arg2));
         }
     
    -    public static Localizable localizableWSIMPORT_INFO_MESSAGE(Object arg0) {
    -        return messageFactory.getMessage("wsimport.InfoMessage", arg0);
    +    public static Localizable localizableWSIMPORT_USAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.usage", arg0);
         }
     
         /**
    -     * [INFO] {0}
    +     * Usage: {0} [options] 
    +     *
    +     * Use "wsimport -help" for a detailed description of options.
          *
          */
    -    public static String WSIMPORT_INFO_MESSAGE(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_INFO_MESSAGE(arg0));
    +    public static String WSIMPORT_USAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_USAGE(arg0));
         }
     
    -    public static Localizable localizableWSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL() {
    -        return messageFactory.getMessage("wsgen.inlineSchemas.only.with.wsdl");
    +    public static Localizable localizableWSCOMPILE_ERROR(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wscompile.error", arg0);
         }
     
         /**
    -     * "-inlineSchemas" must be used in conjunction with the "-wsdl" option
    +     * error: {0}
          *
          */
    -    public static String WSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL() {
    -        return localizer.localize(localizableWSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL());
    +    public static String WSCOMPILE_ERROR(Object arg0) {
    +        return LOCALIZER.localize(localizableWSCOMPILE_ERROR(arg0));
         }
     
    -    public static Localizable localizableWSGEN_SOAP_12_WITHOUT_EXTENSION() {
    -        return messageFactory.getMessage("wsgen.soap12.without.extension");
    +    public static Localizable localizableWSCOMPILE_WARNING(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wscompile.warning", arg0);
         }
     
         /**
    -     * The optional protocol "Xsoap1.2" must be used in conjunction with the "-extension" option.
    +     * warning: {0}
          *
          */
    -    public static String WSGEN_SOAP_12_WITHOUT_EXTENSION() {
    -        return localizer.localize(localizableWSGEN_SOAP_12_WITHOUT_EXTENSION());
    +    public static String WSCOMPILE_WARNING(Object arg0) {
    +        return LOCALIZER.localize(localizableWSCOMPILE_WARNING(arg0));
         }
     
    -    public static Localizable localizableWSIMPORT_ILLEGAL_AUTH_INFO(Object arg0) {
    -        return messageFactory.getMessage("wsimport.ILLEGAL_AUTH_INFO", arg0);
    +    public static Localizable localizableWRAPPER_TASK_NEED_ENDORSED(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wrapperTask.needEndorsed", arg0, arg1);
         }
     
         /**
    -     * "{0}" is not a valid authorization information format. The format is http[s]://user:password@host:port//.
    +     * You are running on JDK6 or newer which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} or newer API. Use the standard override mechanism.
          *
          */
    -    public static String WSIMPORT_ILLEGAL_AUTH_INFO(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_ILLEGAL_AUTH_INFO(arg0));
    +    public static String WRAPPER_TASK_NEED_ENDORSED(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWRAPPER_TASK_NEED_ENDORSED(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_VERSION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.version", arg0);
    +    }
    +
    +    /**
    +     * wsimport version "{0}"
    +     *
    +     */
    +    public static String WSIMPORT_VERSION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_VERSION(arg0));
    +    }
    +
    +    public static Localizable localizableWSCOMPILE_NO_SUCH_DIRECTORY(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wscompile.noSuchDirectory", arg0);
    +    }
    +
    +    /**
    +     * directory not found: {0}
    +     *
    +     */
    +    public static String WSCOMPILE_NO_SUCH_DIRECTORY(Object arg0) {
    +        return LOCALIZER.localize(localizableWSCOMPILE_NO_SUCH_DIRECTORY(arg0));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_MISSING_FILE() {
    +        return MESSAGE_FACTORY.getMessage("wsimport.missingFile");
    +    }
    +
    +    /**
    +     * Missing WSDL_URI
    +     *
    +     */
    +    public static String WSIMPORT_MISSING_FILE() {
    +        return LOCALIZER.localize(localizableWSIMPORT_MISSING_FILE());
         }
     
         public static Localizable localizableWSCOMPILE_COMPILATION_FAILED() {
    -        return messageFactory.getMessage("wscompile.compilationFailed");
    +        return MESSAGE_FACTORY.getMessage("wscompile.compilationFailed");
         }
     
         /**
    @@ -774,96 +679,164 @@ public final class WscompileMessages {
          *
          */
         public static String WSCOMPILE_COMPILATION_FAILED() {
    -        return localizer.localize(localizableWSCOMPILE_COMPILATION_FAILED());
    +        return LOCALIZER.localize(localizableWSCOMPILE_COMPILATION_FAILED());
         }
     
    -    public static Localizable localizableWSCOMPILE_MISSING_OPTION_ARGUMENT(Object arg0) {
    -        return messageFactory.getMessage("wscompile.missingOptionArgument", arg0);
    +    public static Localizable localizableWSIMPORT_PARSING_WSDL() {
    +        return MESSAGE_FACTORY.getMessage("wsimport.ParsingWSDL");
         }
     
         /**
    -     * option "{0}" requires an argument
    +     * parsing WSDL...
    +     *
    +     *
          *
          */
    -    public static String WSCOMPILE_MISSING_OPTION_ARGUMENT(Object arg0) {
    -        return localizer.localize(localizableWSCOMPILE_MISSING_OPTION_ARGUMENT(arg0));
    +    public static String WSIMPORT_PARSING_WSDL() {
    +        return LOCALIZER.localize(localizableWSIMPORT_PARSING_WSDL());
         }
     
    -    public static Localizable localizableWSIMPORT_DOCUMENT_DOWNLOAD(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsimport.document.download", arg0, arg1);
    +    public static Localizable localizableWSGEN_USAGE_EXAMPLES() {
    +        return MESSAGE_FACTORY.getMessage("wsgen.usage.examples");
         }
     
         /**
          *
    -     * Downloading metadata document from {0} to {1}
    +     * Examples:
    +     *   wsgen -cp . example.Stock
    +     *   wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'
    +     *
          *
          */
    -    public static String WSIMPORT_DOCUMENT_DOWNLOAD(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSIMPORT_DOCUMENT_DOWNLOAD(arg0, arg1));
    +    public static String WSGEN_USAGE_EXAMPLES() {
    +        return LOCALIZER.localize(localizableWSGEN_USAGE_EXAMPLES());
         }
     
    -    public static Localizable localizableWSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsgen.cannot.gen.wsdl.for.non.soap.binding", arg0, arg1);
    +    public static Localizable localizableWSIMPORT_ARCHIVING_ARTIFACTS(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.archivingArtifacts", arg0);
         }
     
         /**
    -     * wsgen can not generate WSDL for non-SOAP binding: {0} on Class {1}
    +     *
    +     * Archiving the generated artifacts into {0}.
    +     *
          *
          */
    -    public static String WSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(arg0, arg1));
    +    public static String WSIMPORT_ARCHIVING_ARTIFACTS(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_ARCHIVING_ARTIFACTS(arg0));
         }
     
    -    public static Localizable localizableWSCOMPILE_DUPLICATE_OPTION(Object arg0) {
    -        return messageFactory.getMessage("wscompile.duplicateOption", arg0);
    +    public static Localizable localizableWSGEN_PROTOCOL_WITHOUT_EXTENSION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.protocol.without.extension", arg0);
         }
     
         /**
    -     * duplicate option: {0}
    +     * The optional protocol "{0}" must be used in conjunction with the "-extension" option.
          *
          */
    -    public static String WSCOMPILE_DUPLICATE_OPTION(Object arg0) {
    -        return localizer.localize(localizableWSCOMPILE_DUPLICATE_OPTION(arg0));
    +    public static String WSGEN_PROTOCOL_WITHOUT_EXTENSION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_PROTOCOL_WITHOUT_EXTENSION(arg0));
         }
     
    -    public static Localizable localizableWSIMPORT_FAILED_TO_PARSE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsimport.FailedToParse", arg0, arg1);
    +    public static Localizable localizableWSGEN_MISSING_FILE() {
    +        return MESSAGE_FACTORY.getMessage("wsgen.missingFile");
         }
     
         /**
    -     * Failed to parse "{0}": {1}
    +     * Missing SEI
          *
          */
    -    public static String WSIMPORT_FAILED_TO_PARSE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSIMPORT_FAILED_TO_PARSE(arg0, arg1));
    +    public static String WSGEN_MISSING_FILE() {
    +        return LOCALIZER.localize(localizableWSGEN_MISSING_FILE());
         }
     
    -    public static Localizable localizableWSIMPORT_NO_WSDL(Object arg0) {
    -        return messageFactory.getMessage("wsimport.no.wsdl", arg0);
    +    public static Localizable localizableWSGEN_VERSION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.version", arg0);
         }
     
         /**
    -     * Failed to read the WSDL document: {0}, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
    +     * wsgen version "{0}"
          *
          */
    -    public static String WSIMPORT_NO_WSDL(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_NO_WSDL(arg0));
    +    public static String WSGEN_VERSION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_VERSION(arg0));
         }
     
    -    public static Localizable localizableWSIMPORT_AUTH_INFO_LINENO(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsimport.AUTH_INFO_LINENO", arg0, arg1);
    +    public static Localizable localizableWSGEN_NO_WEBSERVICES_CLASS(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.no.webservices.class", arg0);
         }
     
         /**
    -     * line {0} of {1}
    +     * wsgen did not find any class with @WebService annotation. Please specify @WebService annotation on {0}.
          *
          */
    -    public static String WSIMPORT_AUTH_INFO_LINENO(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSIMPORT_AUTH_INFO_LINENO(arg0, arg1));
    +    public static String WSGEN_NO_WEBSERVICES_CLASS(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_NO_WEBSERVICES_CLASS(arg0));
    +    }
    +
    +    public static Localizable localizableWSGEN_SOAP_12_WITHOUT_EXTENSION() {
    +        return MESSAGE_FACTORY.getMessage("wsgen.soap12.without.extension");
    +    }
    +
    +    /**
    +     * The optional protocol "Xsoap1.2" must be used in conjunction with the "-extension" option.
    +     *
    +     */
    +    public static String WSGEN_SOAP_12_WITHOUT_EXTENSION() {
    +        return LOCALIZER.localize(localizableWSGEN_SOAP_12_WITHOUT_EXTENSION());
    +    }
    +
    +    public static Localizable localizableWSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.class.must.be.implementation.class", arg0);
    +    }
    +
    +    /**
    +     * The class "{0}" is not an endpoint implementation class.
    +     *
    +     */
    +    public static String WSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(arg0));
    +    }
    +
    +    public static Localizable localizableWSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL() {
    +        return MESSAGE_FACTORY.getMessage("wsgen.inlineSchemas.only.with.wsdl");
    +    }
    +
    +    /**
    +     * "-inlineSchemas" must be used in conjunction with the "-wsdl" option
    +     *
    +     */
    +    public static String WSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL() {
    +        return LOCALIZER.localize(localizableWSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL());
    +    }
    +
    +    public static Localizable localizableWRAPPER_TASK_LOADING_INCORRECT_API(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wrapperTask.loadingIncorrectApi", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * You are loading JAX-WS {0} API from {1} but this tool requires JAX-WS {2} API.
    +     *
    +     */
    +    public static String WRAPPER_TASK_LOADING_INCORRECT_API(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWRAPPER_TASK_LOADING_INCORRECT_API(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableWSCOMPILE_CANT_GET_COMPILER(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("wscompile.cant.get.compiler", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * No Java compiler found. Perhaps environment/JDK problem?
    +     *  Used JVM: {0}, {1}/{2}
    +     *
    +     */
    +    public static String WSCOMPILE_CANT_GET_COMPILER(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWSCOMPILE_CANT_GET_COMPILER(arg0, arg1, arg2));
         }
     
         public static Localizable localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) {
    -        return messageFactory.getMessage("wsgen.servicename.missing.localname", arg0);
    +        return MESSAGE_FACTORY.getMessage("wsgen.servicename.missing.localname", arg0);
         }
     
         /**
    @@ -871,85 +844,35 @@ public final class WscompileMessages {
          *
          */
         public static String WSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) {
    -        return localizer.localize(localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(arg0));
    +        return LOCALIZER.localize(localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(arg0));
         }
     
    -    public static Localizable localizableWSGEN_USAGE(Object arg0) {
    -        return messageFactory.getMessage("wsgen.usage", arg0);
    +    public static Localizable localizableWSCOMPILE_INVALID_OPTION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wscompile.invalidOption", arg0);
         }
     
         /**
    -     * Usage: {0} [options] 
    -     *
    -     * Use "wsgen -help" for a detailed description of options.
    +     * unrecognized parameter {0}
          *
          */
    -    public static String WSGEN_USAGE(Object arg0) {
    -        return localizer.localize(localizableWSGEN_USAGE(arg0));
    +    public static String WSCOMPILE_INVALID_OPTION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSCOMPILE_INVALID_OPTION(arg0));
         }
     
    -    public static Localizable localizableWSGEN_SERVICENAME_MISSING_NAMESPACE(Object arg0) {
    -        return messageFactory.getMessage("wsgen.servicename.missing.namespace", arg0);
    +    public static Localizable localizableWSIMPORT_HTTP_REDIRECT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.httpRedirect", arg0, arg1);
         }
     
         /**
    -     * The service name "{0}" is missing a namespace.
    +     * Server returned HTTP Status code: "{0}", retrying with "{1}"
          *
          */
    -    public static String WSGEN_SERVICENAME_MISSING_NAMESPACE(Object arg0) {
    -        return localizer.localize(localizableWSGEN_SERVICENAME_MISSING_NAMESPACE(arg0));
    -    }
    -
    -    public static Localizable localizableWSGEN_INVALID_TRANSPORT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsgen.invalid.transport", arg0, arg1);
    -    }
    -
    -    /**
    -     * "{0}" is not a supported transport.  Supported transport includes: {1}.
    -     *
    -     */
    -    public static String WSGEN_INVALID_TRANSPORT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSGEN_INVALID_TRANSPORT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("wsgen.cannot.gen.wsdl.for.soap12.binding", arg0, arg1);
    -    }
    -
    -    /**
    -     * wsgen can not generate WSDL for SOAP 1.2 binding: {0} on class: {1}.Please specify "-extension" and "-wsdl:protocol XSoap1.2" switches. For example:wsgen -wsdl:protocol XSoap1.2 -extenson {1}
    -     *
    -     */
    -    public static String WSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWSIMPORT_ILLEGAL_TARGET_VERSION(Object arg0) {
    -        return messageFactory.getMessage("wsimport.ILLEGAL_TARGET_VERSION", arg0);
    -    }
    -
    -    /**
    -     * "{0}" is not a valid target version. "2.0" and "2.1" are supported.
    -     *
    -     */
    -    public static String WSIMPORT_ILLEGAL_TARGET_VERSION(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_ILLEGAL_TARGET_VERSION(arg0));
    -    }
    -
    -    public static Localizable localizableWSIMPORT_ILLEGAL_PROXY(Object arg0) {
    -        return messageFactory.getMessage("wsimport.ILLEGAL_PROXY", arg0);
    -    }
    -
    -    /**
    -     * "{0}" is not a valid proxy format. The format is [user[:password]@]proxyHost:proxyPort
    -     *
    -     */
    -    public static String WSIMPORT_ILLEGAL_PROXY(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_ILLEGAL_PROXY(arg0));
    +    public static String WSIMPORT_HTTP_REDIRECT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSIMPORT_HTTP_REDIRECT(arg0, arg1));
         }
     
         public static Localizable localizableWSGEN_PORTNAME_MISSING_LOCALNAME(Object arg0) {
    -        return messageFactory.getMessage("wsgen.portname.missing.localname", arg0);
    +        return MESSAGE_FACTORY.getMessage("wsgen.portname.missing.localname", arg0);
         }
     
         /**
    @@ -957,31 +880,116 @@ public final class WscompileMessages {
          *
          */
         public static String WSGEN_PORTNAME_MISSING_LOCALNAME(Object arg0) {
    -        return localizer.localize(localizableWSGEN_PORTNAME_MISSING_LOCALNAME(arg0));
    +        return LOCALIZER.localize(localizableWSGEN_PORTNAME_MISSING_LOCALNAME(arg0));
         }
     
    -    public static Localizable localizableWSGEN_PORTNAME_MISSING_NAMESPACE(Object arg0) {
    -        return messageFactory.getMessage("wsgen.portname.missing.namespace", arg0);
    +    public static Localizable localizableWSIMPORT_ERROR_MESSAGE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.ErrorMessage", arg0);
         }
     
         /**
    -     * The port name "{0}" is missing a namespace.
    +     * [ERROR] {0}
          *
          */
    -    public static String WSGEN_PORTNAME_MISSING_NAMESPACE(Object arg0) {
    -        return localizer.localize(localizableWSGEN_PORTNAME_MISSING_NAMESPACE(arg0));
    +    public static String WSIMPORT_ERROR_MESSAGE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_ERROR_MESSAGE(arg0));
         }
     
    -    public static Localizable localizableWSIMPORT_FULLVERSION(Object arg0) {
    -        return messageFactory.getMessage("wsimport.fullversion", arg0);
    +    public static Localizable localizableWSGEN_FULLVERSION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.fullversion", arg0);
         }
     
         /**
    -     * wsimport full version "{0}"
    +     * wsgen full version "{0}"
          *
          */
    -    public static String WSIMPORT_FULLVERSION(Object arg0) {
    -        return localizer.localize(localizableWSIMPORT_FULLVERSION(arg0));
    +    public static String WSGEN_FULLVERSION(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_FULLVERSION(arg0));
    +    }
    +
    +    public static Localizable localizableWSGEN_WSDL_ARG_NO_GENWSDL(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.wsdl.arg.no.genwsdl", arg0);
    +    }
    +
    +    /**
    +     * The "{0}" option can only be in conjunction with the "-wsdl" option.
    +     *
    +     */
    +    public static String WSGEN_WSDL_ARG_NO_GENWSDL(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_WSDL_ARG_NO_GENWSDL(arg0));
    +    }
    +
    +    public static Localizable localizableWSCOMPILE_INFO(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wscompile.info", arg0);
    +    }
    +
    +    /**
    +     * info: {0}
    +     *
    +     */
    +    public static String WSCOMPILE_INFO(Object arg0) {
    +        return LOCALIZER.localize(localizableWSCOMPILE_INFO(arg0));
    +    }
    +
    +    public static Localizable localizableWSGEN_COULD_NOT_CREATE_FILE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.could.not.create.file", arg0);
    +    }
    +
    +    /**
    +     * Could not create file: "{0}"
    +     *
    +     */
    +    public static String WSGEN_COULD_NOT_CREATE_FILE(Object arg0) {
    +        return LOCALIZER.localize(localizableWSGEN_COULD_NOT_CREATE_FILE(arg0));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_ILLEGAL_AUTH_INFO(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("wsimport.ILLEGAL_AUTH_INFO", arg0);
    +    }
    +
    +    /**
    +     * "{0}" is not a valid authorization information format. The format is http[s]://user:password@host:port//.
    +     *
    +     */
    +    public static String WSIMPORT_ILLEGAL_AUTH_INFO(Object arg0) {
    +        return LOCALIZER.localize(localizableWSIMPORT_ILLEGAL_AUTH_INFO(arg0));
    +    }
    +
    +    public static Localizable localizableWSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("wsgen.cannot.gen.wsdl.for.non.soap.binding", arg0, arg1);
    +    }
    +
    +    /**
    +     * wsgen can not generate WSDL for non-SOAP binding: {0} on Class {1}
    +     *
    +     */
    +    public static String WSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWSIMPORT_FETCHING_METADATA() {
    +        return MESSAGE_FACTORY.getMessage("wsimport.fetchingMetadata");
    +    }
    +
    +    /**
    +     *
    +     * Downloading the WSDL and associated metadata
    +     *
    +     *
    +     */
    +    public static String WSIMPORT_FETCHING_METADATA() {
    +        return LOCALIZER.localize(localizableWSIMPORT_FETCHING_METADATA());
    +    }
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
         }
     
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java
    index a4ac6af4dfe..056ece95582 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -25,12 +25,12 @@
     
     package com.sun.tools.internal.ws.resources;
     
    -import com.sun.istack.internal.localization.Localizable;
    -import com.sun.istack.internal.localization.LocalizableMessageFactory;
    -import com.sun.istack.internal.localization.Localizer;
    -
     import java.util.Locale;
     import java.util.ResourceBundle;
    +import com.sun.istack.internal.localization.Localizable;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory;
    +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier;
    +import com.sun.istack.internal.localization.Localizer;
     
     
     /**
    @@ -38,41 +38,49 @@ import java.util.ResourceBundle;
      *
      */
     public final class WsdlMessages {
    +
         private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.wsdl";
    -    private final static LocalizableMessageFactory messageFactory =
    -        new LocalizableMessageFactory(BUNDLE_NAME, WsdlMessages::getResourceBundle);
    -    private final static Localizer localizer = new Localizer();
    +    private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new WsdlMessages.BundleSupplier());
    +    private final static Localizer LOCALIZER = new Localizer();
     
    -    private static ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    -    }
    -
    -    public static Localizable localizablePARSING_ELEMENT_EXPECTED() {
    -        return messageFactory.getMessage("parsing.elementExpected");
    +    public static Localizable localizablePARSING_NOT_AWSDL(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("Parsing.NotAWSDL", arg0);
         }
     
         /**
    -     * unexpected non-element found
    +     * Failed to get WSDL components, probably {0} is not a valid WSDL file.
          *
          */
    -    public static String PARSING_ELEMENT_EXPECTED() {
    -        return localizer.localize(localizablePARSING_ELEMENT_EXPECTED());
    +    public static String PARSING_NOT_AWSDL(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_NOT_AWSDL(arg0));
         }
     
    -    public static Localizable localizableENTITY_NOT_FOUND_BINDING(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("entity.notFound.binding", arg0, arg1);
    +    public static Localizable localizablePARSER_NOT_A_BINDING_FILE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("Parser.NotABindingFile", arg0, arg1);
         }
     
         /**
    -     * wsdl:binding "{0}" referenced by wsdl:port "{1}", but it's not found in the wsdl
    +     *  not an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxws'}'bindings but it is '{'{0}'}'{1}
          *
          */
    -    public static String ENTITY_NOT_FOUND_BINDING(Object arg0, Object arg1) {
    -        return localizer.localize(localizableENTITY_NOT_FOUND_BINDING(arg0, arg1));
    +    public static String PARSER_NOT_A_BINDING_FILE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizablePARSER_NOT_A_BINDING_FILE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizablePARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("parsing.unknownExtensibilityElementOrAttribute", arg0, arg1);
    +    }
    +
    +    /**
    +     * unknown extensibility element or attribute "{0}" (in namespace "{1}")
    +     *
    +     */
    +    public static String PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizablePARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(arg0, arg1));
         }
     
         public static Localizable localizablePARSING_UNABLE_TO_GET_METADATA(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("parsing.unableToGetMetadata", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("parsing.unableToGetMetadata", arg0, arg1);
         }
     
         /**
    @@ -82,555 +90,11 @@ public final class WsdlMessages {
          *
          */
         public static String PARSING_UNABLE_TO_GET_METADATA(Object arg0, Object arg1) {
    -        return localizer.localize(localizablePARSING_UNABLE_TO_GET_METADATA(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_PARSE_FAILED() {
    -        return messageFactory.getMessage("Parsing.ParseFailed");
    -    }
    -
    -    /**
    -     *  Failed to parse the WSDL.
    -     *
    -     */
    -    public static String PARSING_PARSE_FAILED() {
    -        return localizer.localize(localizablePARSING_PARSE_FAILED());
    -    }
    -
    -    public static Localizable localizablePARSING_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("parsing.invalidAttributeValue", arg0, arg1);
    -    }
    -
    -    /**
    -     * invalid value "{1}" for attribute "{0}"
    -     *
    -     */
    -    public static String PARSING_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
    -        return localizer.localize(localizablePARSING_INVALID_ATTRIBUTE_VALUE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableVALIDATION_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.invalidAttributeValue", arg0, arg1);
    -    }
    -
    -    /**
    -     * invalid value "{1}" for attribute "{0}"
    -     *
    -     */
    -    public static String VALIDATION_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_INVALID_ATTRIBUTE_VALUE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_INVALID_TAG(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("parsing.invalidTag", arg0, arg1);
    -    }
    -
    -    /**
    -     * expected element "{1}", found "{0}"
    -     *
    -     */
    -    public static String PARSING_INVALID_TAG(Object arg0, Object arg1) {
    -        return localizer.localize(localizablePARSING_INVALID_TAG(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableENTITY_NOT_FOUND_PORT_TYPE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("entity.notFound.portType", arg0, arg1);
    -    }
    -
    -    /**
    -     * wsdl:portType "{0}" referenced by wsdl:binding "{1}", but it's not found in the wsdl
    -     *
    -     */
    -    public static String ENTITY_NOT_FOUND_PORT_TYPE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableENTITY_NOT_FOUND_PORT_TYPE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("parsing.missingRequiredAttribute", arg0, arg1);
    -    }
    -
    -    /**
    -     * missing required attribute "{1}" of element "{0}"
    -     *
    -     */
    -    public static String PARSING_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
    -        return localizer.localize(localizablePARSING_MISSING_REQUIRED_ATTRIBUTE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_INVALID_ELEMENT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("parsing.invalidElement", arg0, arg1);
    -    }
    -
    -    /**
    -     * invalid element: "{0}" (in namespace "{1}")
    -     *
    -     */
    -    public static String PARSING_INVALID_ELEMENT(Object arg0, Object arg1) {
    -        return localizer.localize(localizablePARSING_INVALID_ELEMENT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableVALIDATION_INVALID_ELEMENT(Object arg0) {
    -        return messageFactory.getMessage("validation.invalidElement", arg0);
    -    }
    -
    -    /**
    -     * invalid element: "{0}"
    -     *
    -     */
    -    public static String VALIDATION_INVALID_ELEMENT(Object arg0) {
    -        return localizer.localize(localizableVALIDATION_INVALID_ELEMENT(arg0));
    -    }
    -
    -    public static Localizable localizableINTERNALIZER_TWO_VERSION_ATTRIBUTES() {
    -        return messageFactory.getMessage("Internalizer.TwoVersionAttributes");
    -    }
    -
    -    /**
    -     *  Both jaxws:version and version are present
    -     *
    -     */
    -    public static String INTERNALIZER_TWO_VERSION_ATTRIBUTES() {
    -        return localizer.localize(localizableINTERNALIZER_TWO_VERSION_ATTRIBUTES());
    -    }
    -
    -    public static Localizable localizableVALIDATION_DUPLICATE_PART_NAME(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.duplicatePartName", arg0, arg1);
    -    }
    -
    -    /**
    -     * Invalid WSDL, duplicate parts in a wsdl:message is not allowed.
    -     * wsdl:message {0} has a duplicated part name: "{1}"
    -     *
    -     */
    -    public static String VALIDATION_DUPLICATE_PART_NAME(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_DUPLICATE_PART_NAME(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_INVALID_WSDL_ELEMENT(Object arg0) {
    -        return messageFactory.getMessage("parsing.invalidWsdlElement", arg0);
    -    }
    -
    -    /**
    -     * invalid WSDL element: "{0}"
    -     *
    -     */
    -    public static String PARSING_INVALID_WSDL_ELEMENT(Object arg0) {
    -        return localizer.localize(localizablePARSING_INVALID_WSDL_ELEMENT(arg0));
    -    }
    -
    -    public static Localizable localizablePARSING_NON_WHITESPACE_TEXT_FOUND(Object arg0) {
    -        return messageFactory.getMessage("parsing.nonWhitespaceTextFound", arg0);
    -    }
    -
    -    /**
    -     * found unexpected non-whitespace text: "{0}"
    -     *
    -     */
    -    public static String PARSING_NON_WHITESPACE_TEXT_FOUND(Object arg0) {
    -        return localizer.localize(localizablePARSING_NON_WHITESPACE_TEXT_FOUND(arg0));
    -    }
    -
    -    public static Localizable localizableINTERNALIZER_TARGET_NOT_FOUND(Object arg0) {
    -        return messageFactory.getMessage("internalizer.targetNotFound", arg0);
    -    }
    -
    -    /**
    -     *  No target found for the wsdlLocation: {0}
    -     *
    -     */
    -    public static String INTERNALIZER_TARGET_NOT_FOUND(Object arg0) {
    -        return localizer.localize(localizableINTERNALIZER_TARGET_NOT_FOUND(arg0));
    -    }
    -
    -    public static Localizable localizablePARSING_SAX_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
    -        return messageFactory.getMessage("parsing.saxExceptionWithSystemId", arg0);
    -    }
    -
    -    /**
    -     * invalid WSDL file! failed to parse document at "{0}"
    -     *
    -     */
    -    public static String PARSING_SAX_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
    -        return localizer.localize(localizablePARSING_SAX_EXCEPTION_WITH_SYSTEM_ID(arg0));
    -    }
    -
    -    public static Localizable localizablePARSING_REQUIRED_EXTENSIBILITY_ELEMENT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("parsing.requiredExtensibilityElement", arg0, arg1);
    -    }
    -
    -    /**
    -     * unknown required extensibility element "{0}" (in namespace "{1}")
    -     *
    -     */
    -    public static String PARSING_REQUIRED_EXTENSIBILITY_ELEMENT(Object arg0, Object arg1) {
    -        return localizer.localize(localizablePARSING_REQUIRED_EXTENSIBILITY_ELEMENT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableENTITY_NOT_FOUND_BY_ID(Object arg0) {
    -        return messageFactory.getMessage("entity.notFoundByID", arg0);
    -    }
    -
    -    /**
    -     * invalid entity id: "{0}"
    -     *
    -     */
    -    public static String ENTITY_NOT_FOUND_BY_ID(Object arg0) {
    -        return localizer.localize(localizableENTITY_NOT_FOUND_BY_ID(arg0));
    -    }
    -
    -    public static Localizable localizableVALIDATION_EXCLUSIVE_ATTRIBUTES(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.exclusiveAttributes", arg0, arg1);
    -    }
    -
    -    /**
    -     * exclusive attributes: "{0}", "{1}"
    -     *
    -     */
    -    public static String VALIDATION_EXCLUSIVE_ATTRIBUTES(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_EXCLUSIVE_ATTRIBUTES(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableVALIDATION_MISSING_REQUIRED_SUB_ENTITY(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.missingRequiredSubEntity", arg0, arg1);
    -    }
    -
    -    /**
    -     * missing required sub-entity "{0}" of element "{1}"
    -     *
    -     */
    -    public static String VALIDATION_MISSING_REQUIRED_SUB_ENTITY(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_MISSING_REQUIRED_SUB_ENTITY(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableINTERNALIZER_INCORRECT_VERSION() {
    -        return messageFactory.getMessage("Internalizer.IncorrectVersion");
    -    }
    -
    -    /**
    -     *  JAXWS version attribute must be "2.0"
    -     *
    -     */
    -    public static String INTERNALIZER_INCORRECT_VERSION() {
    -        return localizer.localize(localizableINTERNALIZER_INCORRECT_VERSION());
    -    }
    -
    -    public static Localizable localizableLOCALIZED_ERROR(Object arg0) {
    -        return messageFactory.getMessage("localized.error", arg0);
    -    }
    -
    -    /**
    -     * {0}
    -     *
    -     */
    -    public static String LOCALIZED_ERROR(Object arg0) {
    -        return localizer.localize(localizableLOCALIZED_ERROR(arg0));
    -    }
    -
    -    public static Localizable localizableENTITY_DUPLICATE_WITH_TYPE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("entity.duplicateWithType", arg0, arg1);
    -    }
    -
    -    /**
    -     * duplicate "{0}" entity: "{1}"
    -     *
    -     */
    -    public static String ENTITY_DUPLICATE_WITH_TYPE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableENTITY_DUPLICATE_WITH_TYPE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
    -        return messageFactory.getMessage("parsing.onlyOneOfElementOrTypeRequired", arg0);
    -    }
    -
    -    /**
    -     * only one of the "element" or "type" attributes is allowed in part "{0}"
    -     *
    -     */
    -    public static String PARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
    -        return localizer.localize(localizablePARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(arg0));
    -    }
    -
    -    public static Localizable localizableVALIDATION_UNSUPPORTED_USE_ENCODED(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.unsupportedUse.encoded", arg0, arg1);
    -    }
    -
    -    /**
    -     * "Use of SOAP Encoding is not supported.
    -     * SOAP extension element on line {0} in {1} has use="encoded" "
    -     *
    -     */
    -    public static String VALIDATION_UNSUPPORTED_USE_ENCODED(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_UNSUPPORTED_USE_ENCODED(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_INCORRECT_ROOT_ELEMENT(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return messageFactory.getMessage("parsing.incorrectRootElement", arg0, arg1, arg2, arg3);
    -    }
    -
    -    /**
    -     * expected root element "{2}" (in namespace "{3}"), found element "{0}" (in namespace "{1}")
    -     *
    -     */
    -    public static String PARSING_INCORRECT_ROOT_ELEMENT(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return localizer.localize(localizablePARSING_INCORRECT_ROOT_ELEMENT(arg0, arg1, arg2, arg3));
    -    }
    -
    -    public static Localizable localizableTRY_WITH_MEX(Object arg0) {
    -        return messageFactory.getMessage("try.with.mex", arg0);
    -    }
    -
    -    /**
    -     * {0}
    -     *
    -     * retrying with MEX...
    -     *
    -     */
    -    public static String TRY_WITH_MEX(Object arg0) {
    -        return localizer.localize(localizableTRY_WITH_MEX(arg0));
    -    }
    -
    -    public static Localizable localizableVALIDATION_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.missingRequiredAttribute", arg0, arg1);
    -    }
    -
    -    /**
    -     * missing required attribute "{0}" of element "{1}"
    -     *
    -     */
    -    public static String VALIDATION_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_MISSING_REQUIRED_ATTRIBUTE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_IO_EXCEPTION(Object arg0) {
    -        return messageFactory.getMessage("parsing.ioException", arg0);
    -    }
    -
    -    /**
    -     * parsing failed: {0}
    -     *
    -     */
    -    public static String PARSING_IO_EXCEPTION(Object arg0) {
    -        return localizer.localize(localizablePARSING_IO_EXCEPTION(arg0));
    -    }
    -
    -    public static Localizable localizableINTERNALIZER_X_PATH_EVAULATES_TO_TOO_MANY_TARGETS(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("internalizer.XPathEvaulatesToTooManyTargets", arg0, arg1);
    -    }
    -
    -    /**
    -     * XPath evaluation of "{0}" results in too many ({1}) target nodes
    -     *
    -     */
    -    public static String INTERNALIZER_X_PATH_EVAULATES_TO_TOO_MANY_TARGETS(Object arg0, Object arg1) {
    -        return localizer.localize(localizableINTERNALIZER_X_PATH_EVAULATES_TO_TOO_MANY_TARGETS(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSER_NOT_A_BINDING_FILE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("Parser.NotABindingFile", arg0, arg1);
    -    }
    -
    -    /**
    -     *  not an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxws'}'bindings but it is '{'{0}'}'{1}
    -     *
    -     */
    -    public static String PARSER_NOT_A_BINDING_FILE(Object arg0, Object arg1) {
    -        return localizer.localize(localizablePARSER_NOT_A_BINDING_FILE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_UNKNOWN_NAMESPACE_PREFIX(Object arg0) {
    -        return messageFactory.getMessage("parsing.unknownNamespacePrefix", arg0);
    -    }
    -
    -    /**
    -     * undeclared namespace prefix: "{0}"
    -     *
    -     */
    -    public static String PARSING_UNKNOWN_NAMESPACE_PREFIX(Object arg0) {
    -        return localizer.localize(localizablePARSING_UNKNOWN_NAMESPACE_PREFIX(arg0));
    -    }
    -
    -    public static Localizable localizablePARSING_FACTORY_CONFIG_EXCEPTION(Object arg0) {
    -        return messageFactory.getMessage("parsing.factoryConfigException", arg0);
    -    }
    -
    -    /**
    -     * invalid WSDL file! parsing failed: {0}
    -     *
    -     */
    -    public static String PARSING_FACTORY_CONFIG_EXCEPTION(Object arg0) {
    -        return localizer.localize(localizablePARSING_FACTORY_CONFIG_EXCEPTION(arg0));
    -    }
    -
    -    public static Localizable localizableVALIDATION_MISSING_REQUIRED_PROPERTY(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.missingRequiredProperty", arg0, arg1);
    -    }
    -
    -    /**
    -     * missing required property "{0}" of element "{1}"
    -     *
    -     */
    -    public static String VALIDATION_MISSING_REQUIRED_PROPERTY(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_MISSING_REQUIRED_PROPERTY(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_INVALID_OPERATION_STYLE(Object arg0) {
    -        return messageFactory.getMessage("parsing.invalidOperationStyle", arg0);
    -    }
    -
    -    /**
    -     * operation "{0}" has an invalid style
    -     *
    -     */
    -    public static String PARSING_INVALID_OPERATION_STYLE(Object arg0) {
    -        return localizer.localize(localizablePARSING_INVALID_OPERATION_STYLE(arg0));
    -    }
    -
    -    public static Localizable localizableINTERNALIZER_X_PATH_EVALUATION_ERROR(Object arg0) {
    -        return messageFactory.getMessage("internalizer.XPathEvaluationError", arg0);
    -    }
    -
    -    /**
    -     * XPath error: {0}
    -     *
    -     */
    -    public static String INTERNALIZER_X_PATH_EVALUATION_ERROR(Object arg0) {
    -        return localizer.localize(localizableINTERNALIZER_X_PATH_EVALUATION_ERROR(arg0));
    -    }
    -
    -    public static Localizable localizableVALIDATION_INVALID_SUB_ENTITY(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.invalidSubEntity", arg0, arg1);
    -    }
    -
    -    /**
    -     * invalid sub-element "{0}" of element "{1}"
    -     *
    -     */
    -    public static String VALIDATION_INVALID_SUB_ENTITY(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_INVALID_SUB_ENTITY(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableVALIDATION_SHOULD_NOT_HAPPEN(Object arg0) {
    -        return messageFactory.getMessage("validation.shouldNotHappen", arg0);
    -    }
    -
    -    /**
    -     * internal error ("{0}")
    -     *
    -     */
    -    public static String VALIDATION_SHOULD_NOT_HAPPEN(Object arg0) {
    -        return localizer.localize(localizableVALIDATION_SHOULD_NOT_HAPPEN(arg0));
    -    }
    -
    -    public static Localizable localizableABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("AbstractReferenceFinderImpl.UnableToParse", arg0, arg1);
    -    }
    -
    -    /**
    -     *  Unable to parse "{0}" : {1}
    -     *
    -     */
    -    public static String ABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableWARNING_FAULT_EMPTY_ACTION(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("warning.faultEmptyAction", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * ignoring empty Action in "{0}" {1} element of "{2}" operation, using default instead
    -     *
    -     */
    -    public static String WARNING_FAULT_EMPTY_ACTION(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableWARNING_FAULT_EMPTY_ACTION(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizablePARSING_INVALID_EXTENSION_ELEMENT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("parsing.invalidExtensionElement", arg0, arg1);
    -    }
    -
    -    /**
    -     * invalid extension element: "{0}" (in namespace "{1}")
    -     *
    -     */
    -    public static String PARSING_INVALID_EXTENSION_ELEMENT(Object arg0, Object arg1) {
    -        return localizer.localize(localizablePARSING_INVALID_EXTENSION_ELEMENT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableINTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(Object arg0) {
    -        return messageFactory.getMessage("internalizer.XPathEvaluatesToNonElement", arg0);
    -    }
    -
    -    /**
    -     * XPath evaluation of "{0}" needs to result in an element.
    -     *
    -     */
    -    public static String INTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(Object arg0) {
    -        return localizer.localize(localizableINTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(arg0));
    -    }
    -
    -    public static Localizable localizableINTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(Object arg0) {
    -        return messageFactory.getMessage("internalizer.XPathEvaluatesToNoTarget", arg0);
    -    }
    -
    -    /**
    -     * XPath evaluation of "{0}" results in an empty target node
    -     *
    -     */
    -    public static String INTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(Object arg0) {
    -        return localizer.localize(localizableINTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(arg0));
    -    }
    -
    -    public static Localizable localizablePARSING_SAX_EXCEPTION(Object arg0) {
    -        return messageFactory.getMessage("parsing.saxException", arg0);
    -    }
    -
    -    /**
    -     * invalid WSDL file! parsing failed: {0}
    -     *
    -     */
    -    public static String PARSING_SAX_EXCEPTION(Object arg0) {
    -        return localizer.localize(localizablePARSING_SAX_EXCEPTION(arg0));
    -    }
    -
    -    public static Localizable localizableINVALID_CUSTOMIZATION_NAMESPACE(Object arg0) {
    -        return messageFactory.getMessage("invalid.customization.namespace", arg0);
    -    }
    -
    -    /**
    -     * Ignoring customization: "{0}", because it has no namespace. It must belong to the customization namespace.
    -     *
    -     */
    -    public static String INVALID_CUSTOMIZATION_NAMESPACE(Object arg0) {
    -        return localizer.localize(localizableINVALID_CUSTOMIZATION_NAMESPACE(arg0));
    -    }
    -
    -    public static Localizable localizableVALIDATION_INVALID_ATTRIBUTE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.invalidAttribute", arg0, arg1);
    -    }
    -
    -    /**
    -     * invalid attribute "{0}" of element "{1}"
    -     *
    -     */
    -    public static String VALIDATION_INVALID_ATTRIBUTE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_INVALID_ATTRIBUTE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_PARSER_CONFIG_EXCEPTION(Object arg0) {
    -        return messageFactory.getMessage("parsing.parserConfigException", arg0);
    -    }
    -
    -    /**
    -     * invalid WSDL file! parsing failed: {0}
    -     *
    -     */
    -    public static String PARSING_PARSER_CONFIG_EXCEPTION(Object arg0) {
    -        return localizer.localize(localizablePARSING_PARSER_CONFIG_EXCEPTION(arg0));
    +        return LOCALIZER.localize(localizablePARSING_UNABLE_TO_GET_METADATA(arg0, arg1));
         }
     
         public static Localizable localizablePARSING_ONLY_ONE_TYPES_ALLOWED(Object arg0) {
    -        return messageFactory.getMessage("parsing.onlyOneTypesAllowed", arg0);
    +        return MESSAGE_FACTORY.getMessage("parsing.onlyOneTypesAllowed", arg0);
         }
     
         /**
    @@ -638,215 +102,23 @@ public final class WsdlMessages {
          *
          */
         public static String PARSING_ONLY_ONE_TYPES_ALLOWED(Object arg0) {
    -        return localizer.localize(localizablePARSING_ONLY_ONE_TYPES_ALLOWED(arg0));
    +        return LOCALIZER.localize(localizablePARSING_ONLY_ONE_TYPES_ALLOWED(arg0));
         }
     
    -    public static Localizable localizablePARSING_INVALID_URI(Object arg0) {
    -        return messageFactory.getMessage("parsing.invalidURI", arg0);
    +    public static Localizable localizableVALIDATION_SHOULD_NOT_HAPPEN(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("validation.shouldNotHappen", arg0);
         }
     
         /**
    -     * invalid URI: {0}
    +     * internal error ("{0}")
          *
          */
    -    public static String PARSING_INVALID_URI(Object arg0) {
    -        return localizer.localize(localizablePARSING_INVALID_URI(arg0));
    -    }
    -
    -    public static Localizable localizableVALIDATION_INCORRECT_TARGET_NAMESPACE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.incorrectTargetNamespace", arg0, arg1);
    -    }
    -
    -    /**
    -     * target namespace is incorrect (expected: {1}, found: {0})
    -     *
    -     */
    -    public static String VALIDATION_INCORRECT_TARGET_NAMESPACE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_INCORRECT_TARGET_NAMESPACE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableENTITY_NOT_FOUND_BY_Q_NAME(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("entity.notFoundByQName", arg0, arg1, arg2);
    -    }
    -
    -    /**
    -     * {0} "{1}" not found in the wsdl: {2}
    -     *
    -     */
    -    public static String ENTITY_NOT_FOUND_BY_Q_NAME(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizableENTITY_NOT_FOUND_BY_Q_NAME(arg0, arg1, arg2));
    -    }
    -
    -    public static Localizable localizableINVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return messageFactory.getMessage("invalid.wsdl", arg0, arg1, arg2, arg3);
    -    }
    -
    -    /**
    -     * Invalid WSDL {0}, expected {1} found {2} at (line {3})
    -     *
    -     */
    -    public static String INVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) {
    -        return localizer.localize(localizableINVALID_WSDL(arg0, arg1, arg2, arg3));
    -    }
    -
    -    public static Localizable localizablePARSING_UNKNOWN_IMPORTED_DOCUMENT_TYPE(Object arg0) {
    -        return messageFactory.getMessage("parsing.unknownImportedDocumentType", arg0);
    -    }
    -
    -    /**
    -     * imported document is of unknown type: {0}
    -     *
    -     */
    -    public static String PARSING_UNKNOWN_IMPORTED_DOCUMENT_TYPE(Object arg0) {
    -        return localizer.localize(localizablePARSING_UNKNOWN_IMPORTED_DOCUMENT_TYPE(arg0));
    -    }
    -
    -    public static Localizable localizablePARSING_IO_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
    -        return messageFactory.getMessage("parsing.ioExceptionWithSystemId", arg0);
    -    }
    -
    -    /**
    -     * failed to parse document at "{0}"
    -     *
    -     */
    -    public static String PARSING_IO_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
    -        return localizer.localize(localizablePARSING_IO_EXCEPTION_WITH_SYSTEM_ID(arg0));
    -    }
    -
    -    public static Localizable localizableVALIDATION_AMBIGUOUS_NAME(Object arg0) {
    -        return messageFactory.getMessage("validation.ambiguousName", arg0);
    -    }
    -
    -    /**
    -     * ambiguous operation name: "{0}"
    -     *
    -     */
    -    public static String VALIDATION_AMBIGUOUS_NAME(Object arg0) {
    -        return localizer.localize(localizableVALIDATION_AMBIGUOUS_NAME(arg0));
    -    }
    -
    -    public static Localizable localizablePARSING_WSDL_NOT_DEFAULT_NAMESPACE(Object arg0) {
    -        return messageFactory.getMessage("parsing.wsdlNotDefaultNamespace", arg0);
    -    }
    -
    -    /**
    -     * default namespace must be "{0}"
    -     *
    -     */
    -    public static String PARSING_WSDL_NOT_DEFAULT_NAMESPACE(Object arg0) {
    -        return localizer.localize(localizablePARSING_WSDL_NOT_DEFAULT_NAMESPACE(arg0));
    -    }
    -
    -    public static Localizable localizablePARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("parsing.unknownExtensibilityElementOrAttribute", arg0, arg1);
    -    }
    -
    -    /**
    -     * unknown extensibility element or attribute "{0}" (in namespace "{1}")
    -     *
    -     */
    -    public static String PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(Object arg0, Object arg1) {
    -        return localizer.localize(localizablePARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(arg0, arg1));
    -    }
    -
    -    public static Localizable localizableVALIDATION_DUPLICATED_ELEMENT(Object arg0) {
    -        return messageFactory.getMessage("validation.duplicatedElement", arg0);
    -    }
    -
    -    /**
    -     * duplicated element: "{0}"
    -     *
    -     */
    -    public static String VALIDATION_DUPLICATED_ELEMENT(Object arg0) {
    -        return localizer.localize(localizableVALIDATION_DUPLICATED_ELEMENT(arg0));
    -    }
    -
    -    public static Localizable localizableINTERNALIZER_TARGET_NOT_AN_ELEMENT() {
    -        return messageFactory.getMessage("internalizer.targetNotAnElement");
    -    }
    -
    -    /**
    -     *  Target node is not an element
    -     *
    -     */
    -    public static String INTERNALIZER_TARGET_NOT_AN_ELEMENT() {
    -        return localizer.localize(localizableINTERNALIZER_TARGET_NOT_AN_ELEMENT());
    -    }
    -
    -    public static Localizable localizableWARNING_INPUT_OUTPUT_EMPTY_ACTION(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("warning.inputOutputEmptyAction", arg0, arg1);
    -    }
    -
    -    /**
    -     * ignoring empty Action in {0} element of "{1}" operation, using default instead
    -     *
    -     */
    -    public static String WARNING_INPUT_OUTPUT_EMPTY_ACTION(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWARNING_INPUT_OUTPUT_EMPTY_ACTION(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_INVALID_TAG_NS(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
    -        return messageFactory.getMessage("parsing.invalidTagNS", arg0, arg1, arg2, arg3, arg4);
    -    }
    -
    -    /**
    -     * Invalid WSDL at {4}: expected element "{2}" (in namespace "{3}"), found element "{0}" (in namespace "{1}")
    -     *
    -     */
    -    public static String PARSING_INVALID_TAG_NS(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
    -        return localizer.localize(localizablePARSING_INVALID_TAG_NS(arg0, arg1, arg2, arg3, arg4));
    -    }
    -
    -    public static Localizable localizableINVALID_WSDL_WITH_DOOC(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("invalid.wsdl.with.dooc", arg0, arg1);
    -    }
    -
    -    /**
    -     * "Not a WSDL document: {0}, it gives "{1}", retrying with MEX..."
    -     *
    -     */
    -    public static String INVALID_WSDL_WITH_DOOC(Object arg0, Object arg1) {
    -        return localizer.localize(localizableINVALID_WSDL_WITH_DOOC(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_NOT_AWSDL(Object arg0) {
    -        return messageFactory.getMessage("Parsing.NotAWSDL", arg0);
    -    }
    -
    -    /**
    -     * Failed to get WSDL components, probably {0} is not a valid WSDL file.
    -     *
    -     */
    -    public static String PARSING_NOT_AWSDL(Object arg0) {
    -        return localizer.localize(localizablePARSING_NOT_AWSDL(arg0));
    -    }
    -
    -    public static Localizable localizableENTITY_DUPLICATE(Object arg0) {
    -        return messageFactory.getMessage("entity.duplicate", arg0);
    -    }
    -
    -    /**
    -     * duplicate entity: "{0}"
    -     *
    -     */
    -    public static String ENTITY_DUPLICATE(Object arg0) {
    -        return localizer.localize(localizableENTITY_DUPLICATE(arg0));
    -    }
    -
    -    public static Localizable localizableWARNING_WSI_R_2004() {
    -        return messageFactory.getMessage("warning.wsi.r2004");
    -    }
    -
    -    /**
    -     * Not a WSI-BP compliant WSDL (R2001, R2004). xsd:import must not import XML Schema definitions embedded inline within the WSDL document.
    -     *
    -     */
    -    public static String WARNING_WSI_R_2004() {
    -        return localizer.localize(localizableWARNING_WSI_R_2004());
    +    public static String VALIDATION_SHOULD_NOT_HAPPEN(Object arg0) {
    +        return LOCALIZER.localize(localizableVALIDATION_SHOULD_NOT_HAPPEN(arg0));
         }
     
         public static Localizable localizableWARNING_WSI_R_2003() {
    -        return messageFactory.getMessage("warning.wsi.r2003");
    +        return MESSAGE_FACTORY.getMessage("warning.wsi.r2003");
         }
     
         /**
    @@ -854,95 +126,71 @@ public final class WsdlMessages {
          *
          */
         public static String WARNING_WSI_R_2003() {
    -        return localizer.localize(localizableWARNING_WSI_R_2003());
    +        return LOCALIZER.localize(localizableWARNING_WSI_R_2003());
         }
     
    -    public static Localizable localizableWARNING_WSI_R_2002(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("warning.wsi.r2002", arg0, arg1);
    +    public static Localizable localizableWARNING_WSI_R_2004() {
    +        return MESSAGE_FACTORY.getMessage("warning.wsi.r2004");
         }
     
         /**
    -     * Not a WSI-BP compliant WSDL (R2002). wsdl:import must not be used to import XML Schema embedded in the WSDL document. Expected WSDL namespace: {0}, found: {1}
    +     * Not a WSI-BP compliant WSDL (R2001, R2004). xsd:import must not import XML Schema definitions embedded inline within the WSDL document.
          *
          */
    -    public static String WARNING_WSI_R_2002(Object arg0, Object arg1) {
    -        return localizer.localize(localizableWARNING_WSI_R_2002(arg0, arg1));
    +    public static String WARNING_WSI_R_2004() {
    +        return LOCALIZER.localize(localizableWARNING_WSI_R_2004());
         }
     
    -    public static Localizable localizablePARSING_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
    -        return messageFactory.getMessage("parsing.elementOrTypeRequired", arg0);
    +    public static Localizable localizableVALIDATION_INVALID_ATTRIBUTE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.invalidAttribute", arg0, arg1);
         }
     
         /**
    -     * warning: part {0} is ignored, either the "element" or the "type" attribute is required in part "{0}"
    +     * invalid attribute "{0}" of element "{1}"
          *
          */
    -    public static String PARSING_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
    -        return localizer.localize(localizablePARSING_ELEMENT_OR_TYPE_REQUIRED(arg0));
    +    public static String VALIDATION_INVALID_ATTRIBUTE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_INVALID_ATTRIBUTE(arg0, arg1));
         }
     
    -    public static Localizable localizableWARNING_WSI_R_2001() {
    -        return messageFactory.getMessage("warning.wsi.r2001");
    +    public static Localizable localizableVALIDATION_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.invalidAttributeValue", arg0, arg1);
         }
     
         /**
    -     * Not a WSI-BP compliant WSDL (R2001, R2002). wsdl:import must import only WSDL documents. It's trying to import: "{0}"
    +     * invalid value "{1}" for attribute "{0}"
          *
          */
    -    public static String WARNING_WSI_R_2001() {
    -        return localizer.localize(localizableWARNING_WSI_R_2001());
    +    public static String VALIDATION_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_INVALID_ATTRIBUTE_VALUE(arg0, arg1));
         }
     
    -    public static Localizable localizableFILE_NOT_FOUND(Object arg0) {
    -        return messageFactory.getMessage("file.not.found", arg0);
    +    public static Localizable localizablePARSING_IO_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.ioExceptionWithSystemId", arg0);
         }
     
         /**
    -     * {0} is unreachable
    +     * failed to parse document at "{0}"
          *
          */
    -    public static String FILE_NOT_FOUND(Object arg0) {
    -        return localizer.localize(localizableFILE_NOT_FOUND(arg0));
    +    public static String PARSING_IO_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_IO_EXCEPTION_WITH_SYSTEM_ID(arg0));
         }
     
    -    public static Localizable localizableVALIDATION_INVALID_SIMPLE_TYPE_IN_ELEMENT(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("validation.invalidSimpleTypeInElement", arg0, arg1);
    +    public static Localizable localizablePARSING_PARSE_FAILED() {
    +        return MESSAGE_FACTORY.getMessage("Parsing.ParseFailed");
         }
     
         /**
    -     * invalid element: "{1}", has named simpleType: "{0}"
    +     *  Failed to parse the WSDL.
          *
          */
    -    public static String VALIDATION_INVALID_SIMPLE_TYPE_IN_ELEMENT(Object arg0, Object arg1) {
    -        return localizer.localize(localizableVALIDATION_INVALID_SIMPLE_TYPE_IN_ELEMENT(arg0, arg1));
    -    }
    -
    -    public static Localizable localizablePARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(Object arg0) {
    -        return messageFactory.getMessage("parsing.onlyOneDocumentationAllowed", arg0);
    -    }
    -
    -    /**
    -     * only one "documentation" element allowed in "{0}"
    -     *
    -     */
    -    public static String PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(Object arg0) {
    -        return localizer.localize(localizablePARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(arg0));
    -    }
    -
    -    public static Localizable localizableINTERNALIZER_VERSION_NOT_PRESENT() {
    -        return messageFactory.getMessage("Internalizer.VersionNotPresent");
    -    }
    -
    -    /**
    -     *  JAXWS version attribute must be present
    -     *
    -     */
    -    public static String INTERNALIZER_VERSION_NOT_PRESENT() {
    -        return localizer.localize(localizableINTERNALIZER_VERSION_NOT_PRESENT());
    +    public static String PARSING_PARSE_FAILED() {
    +        return LOCALIZER.localize(localizablePARSING_PARSE_FAILED());
         }
     
         public static Localizable localizableFAILED_NOSERVICE(Object arg0) {
    -        return messageFactory.getMessage("failed.noservice", arg0);
    +        return MESSAGE_FACTORY.getMessage("failed.noservice", arg0);
         }
     
         /**
    @@ -952,11 +200,120 @@ public final class WsdlMessages {
          *
          */
         public static String FAILED_NOSERVICE(Object arg0) {
    -        return localizer.localize(localizableFAILED_NOSERVICE(arg0));
    +        return LOCALIZER.localize(localizableFAILED_NOSERVICE(arg0));
    +    }
    +
    +    public static Localizable localizableENTITY_DUPLICATE_WITH_TYPE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("entity.duplicateWithType", arg0, arg1);
    +    }
    +
    +    /**
    +     * duplicate "{0}" entity: "{1}"
    +     *
    +     */
    +    public static String ENTITY_DUPLICATE_WITH_TYPE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableENTITY_DUPLICATE_WITH_TYPE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableVALIDATION_DUPLICATE_PART_NAME(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.duplicatePartName", arg0, arg1);
    +    }
    +
    +    /**
    +     * Invalid WSDL, duplicate parts in a wsdl:message is not allowed.
    +     * wsdl:message {0} has a duplicated part name: "{1}"
    +     *
    +     */
    +    public static String VALIDATION_DUPLICATE_PART_NAME(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_DUPLICATE_PART_NAME(arg0, arg1));
    +    }
    +
    +    public static Localizable localizablePARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.onlyOneOfElementOrTypeRequired", arg0);
    +    }
    +
    +    /**
    +     * only one of the "element" or "type" attributes is allowed in part "{0}"
    +     *
    +     */
    +    public static String PARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_INCORRECT_ROOT_ELEMENT(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return MESSAGE_FACTORY.getMessage("parsing.incorrectRootElement", arg0, arg1, arg2, arg3);
    +    }
    +
    +    /**
    +     * expected root element "{2}" (in namespace "{3}"), found element "{0}" (in namespace "{1}")
    +     *
    +     */
    +    public static String PARSING_INCORRECT_ROOT_ELEMENT(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return LOCALIZER.localize(localizablePARSING_INCORRECT_ROOT_ELEMENT(arg0, arg1, arg2, arg3));
    +    }
    +
    +    public static Localizable localizableINVALID_WSDL_WITH_DOOC(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("invalid.wsdl.with.dooc", arg0, arg1);
    +    }
    +
    +    /**
    +     * "Not a WSDL document: {0}, it gives "{1}", retrying with MEX..."
    +     *
    +     */
    +    public static String INVALID_WSDL_WITH_DOOC(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableINVALID_WSDL_WITH_DOOC(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableINTERNALIZER_X_PATH_EVAULATES_TO_TOO_MANY_TARGETS(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("internalizer.XPathEvaulatesToTooManyTargets", arg0, arg1);
    +    }
    +
    +    /**
    +     * XPath evaluation of "{0}" results in too many ({1}) target nodes
    +     *
    +     */
    +    public static String INTERNALIZER_X_PATH_EVAULATES_TO_TOO_MANY_TARGETS(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableINTERNALIZER_X_PATH_EVAULATES_TO_TOO_MANY_TARGETS(arg0, arg1));
    +    }
    +
    +    public static Localizable localizablePARSING_ELEMENT_EXPECTED() {
    +        return MESSAGE_FACTORY.getMessage("parsing.elementExpected");
    +    }
    +
    +    /**
    +     * unexpected non-element found
    +     *
    +     */
    +    public static String PARSING_ELEMENT_EXPECTED() {
    +        return LOCALIZER.localize(localizablePARSING_ELEMENT_EXPECTED());
    +    }
    +
    +    public static Localizable localizableFILE_NOT_FOUND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("file.not.found", arg0);
    +    }
    +
    +    /**
    +     * {0} is unreachable
    +     *
    +     */
    +    public static String FILE_NOT_FOUND(Object arg0) {
    +        return LOCALIZER.localize(localizableFILE_NOT_FOUND(arg0));
    +    }
    +
    +    public static Localizable localizableVALIDATION_INVALID_SIMPLE_TYPE_IN_ELEMENT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.invalidSimpleTypeInElement", arg0, arg1);
    +    }
    +
    +    /**
    +     * invalid element: "{1}", has named simpleType: "{0}"
    +     *
    +     */
    +    public static String VALIDATION_INVALID_SIMPLE_TYPE_IN_ELEMENT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_INVALID_SIMPLE_TYPE_IN_ELEMENT(arg0, arg1));
         }
     
         public static Localizable localizablePARSING_TOO_MANY_ELEMENTS(Object arg0, Object arg1, Object arg2) {
    -        return messageFactory.getMessage("parsing.tooManyElements", arg0, arg1, arg2);
    +        return MESSAGE_FACTORY.getMessage("parsing.tooManyElements", arg0, arg1, arg2);
         }
     
         /**
    @@ -964,11 +321,241 @@ public final class WsdlMessages {
          *
          */
         public static String PARSING_TOO_MANY_ELEMENTS(Object arg0, Object arg1, Object arg2) {
    -        return localizer.localize(localizablePARSING_TOO_MANY_ELEMENTS(arg0, arg1, arg2));
    +        return LOCALIZER.localize(localizablePARSING_TOO_MANY_ELEMENTS(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableLOCALIZED_ERROR(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("localized.error", arg0);
    +    }
    +
    +    /**
    +     * {0}
    +     *
    +     */
    +    public static String LOCALIZED_ERROR(Object arg0) {
    +        return LOCALIZER.localize(localizableLOCALIZED_ERROR(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_FACTORY_CONFIG_EXCEPTION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.factoryConfigException", arg0);
    +    }
    +
    +    /**
    +     * invalid WSDL file! parsing failed: {0}
    +     *
    +     */
    +    public static String PARSING_FACTORY_CONFIG_EXCEPTION(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_FACTORY_CONFIG_EXCEPTION(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_UNKNOWN_IMPORTED_DOCUMENT_TYPE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.unknownImportedDocumentType", arg0);
    +    }
    +
    +    /**
    +     * imported document is of unknown type: {0}
    +     *
    +     */
    +    public static String PARSING_UNKNOWN_IMPORTED_DOCUMENT_TYPE(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_UNKNOWN_IMPORTED_DOCUMENT_TYPE(arg0));
    +    }
    +
    +    public static Localizable localizableVALIDATION_DUPLICATED_ELEMENT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("validation.duplicatedElement", arg0);
    +    }
    +
    +    /**
    +     * duplicated element: "{0}"
    +     *
    +     */
    +    public static String VALIDATION_DUPLICATED_ELEMENT(Object arg0) {
    +        return LOCALIZER.localize(localizableVALIDATION_DUPLICATED_ELEMENT(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_INVALID_URI(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.invalidURI", arg0);
    +    }
    +
    +    /**
    +     * invalid URI: {0}
    +     *
    +     */
    +    public static String PARSING_INVALID_URI(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_INVALID_URI(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_SAX_EXCEPTION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.saxException", arg0);
    +    }
    +
    +    /**
    +     * invalid WSDL file! parsing failed: {0}
    +     *
    +     */
    +    public static String PARSING_SAX_EXCEPTION(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_SAX_EXCEPTION(arg0));
    +    }
    +
    +    public static Localizable localizableINTERNALIZER_INCORRECT_VERSION() {
    +        return MESSAGE_FACTORY.getMessage("Internalizer.IncorrectVersion");
    +    }
    +
    +    /**
    +     *  JAXWS version attribute must be "2.0"
    +     *
    +     */
    +    public static String INTERNALIZER_INCORRECT_VERSION() {
    +        return LOCALIZER.localize(localizableINTERNALIZER_INCORRECT_VERSION());
    +    }
    +
    +    public static Localizable localizablePARSING_NON_WHITESPACE_TEXT_FOUND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.nonWhitespaceTextFound", arg0);
    +    }
    +
    +    /**
    +     * found unexpected non-whitespace text: "{0}"
    +     *
    +     */
    +    public static String PARSING_NON_WHITESPACE_TEXT_FOUND(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_NON_WHITESPACE_TEXT_FOUND(arg0));
    +    }
    +
    +    public static Localizable localizableENTITY_NOT_FOUND_BY_Q_NAME(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("entity.notFoundByQName", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * {0} "{1}" not found in the wsdl: {2}
    +     *
    +     */
    +    public static String ENTITY_NOT_FOUND_BY_Q_NAME(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableENTITY_NOT_FOUND_BY_Q_NAME(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizableVALIDATION_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.missingRequiredAttribute", arg0, arg1);
    +    }
    +
    +    /**
    +     * missing required attribute "{0}" of element "{1}"
    +     *
    +     */
    +    public static String VALIDATION_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_MISSING_REQUIRED_ATTRIBUTE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableWARNING_FAULT_EMPTY_ACTION(Object arg0, Object arg1, Object arg2) {
    +        return MESSAGE_FACTORY.getMessage("warning.faultEmptyAction", arg0, arg1, arg2);
    +    }
    +
    +    /**
    +     * ignoring empty Action in "{0}" {1} element of "{2}" operation, using default instead
    +     *
    +     */
    +    public static String WARNING_FAULT_EMPTY_ACTION(Object arg0, Object arg1, Object arg2) {
    +        return LOCALIZER.localize(localizableWARNING_FAULT_EMPTY_ACTION(arg0, arg1, arg2));
    +    }
    +
    +    public static Localizable localizablePARSING_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("parsing.invalidAttributeValue", arg0, arg1);
    +    }
    +
    +    /**
    +     * invalid value "{1}" for attribute "{0}"
    +     *
    +     */
    +    public static String PARSING_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizablePARSING_INVALID_ATTRIBUTE_VALUE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("AbstractReferenceFinderImpl.UnableToParse", arg0, arg1);
    +    }
    +
    +    /**
    +     *  Unable to parse "{0}" : {1}
    +     *
    +     */
    +    public static String ABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableENTITY_DUPLICATE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("entity.duplicate", arg0);
    +    }
    +
    +    /**
    +     * duplicate entity: "{0}"
    +     *
    +     */
    +    public static String ENTITY_DUPLICATE(Object arg0) {
    +        return LOCALIZER.localize(localizableENTITY_DUPLICATE(arg0));
    +    }
    +
    +    public static Localizable localizableVALIDATION_MISSING_REQUIRED_PROPERTY(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.missingRequiredProperty", arg0, arg1);
    +    }
    +
    +    /**
    +     * missing required property "{0}" of element "{1}"
    +     *
    +     */
    +    public static String VALIDATION_MISSING_REQUIRED_PROPERTY(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_MISSING_REQUIRED_PROPERTY(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableINVALID_CUSTOMIZATION_NAMESPACE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("invalid.customization.namespace", arg0);
    +    }
    +
    +    /**
    +     * Ignoring customization: "{0}", because it has no namespace. It must belong to the customization namespace.
    +     *
    +     */
    +    public static String INVALID_CUSTOMIZATION_NAMESPACE(Object arg0) {
    +        return LOCALIZER.localize(localizableINVALID_CUSTOMIZATION_NAMESPACE(arg0));
    +    }
    +
    +    public static Localizable localizableTRY_WITH_MEX(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("try.with.mex", arg0);
    +    }
    +
    +    /**
    +     * {0}
    +     *
    +     * retrying with MEX...
    +     *
    +     */
    +    public static String TRY_WITH_MEX(Object arg0) {
    +        return LOCALIZER.localize(localizableTRY_WITH_MEX(arg0));
    +    }
    +
    +    public static Localizable localizableINVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return MESSAGE_FACTORY.getMessage("invalid.wsdl", arg0, arg1, arg2, arg3);
    +    }
    +
    +    /**
    +     * Invalid WSDL {0}, expected {1} found {2} at (line {3})
    +     *
    +     */
    +    public static String INVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) {
    +        return LOCALIZER.localize(localizableINVALID_WSDL(arg0, arg1, arg2, arg3));
    +    }
    +
    +    public static Localizable localizableENTITY_NOT_FOUND_BY_ID(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("entity.notFoundByID", arg0);
    +    }
    +
    +    /**
    +     * invalid entity id: "{0}"
    +     *
    +     */
    +    public static String ENTITY_NOT_FOUND_BY_ID(Object arg0) {
    +        return LOCALIZER.localize(localizableENTITY_NOT_FOUND_BY_ID(arg0));
         }
     
         public static Localizable localizableINTERNALIZER_INCORRECT_SCHEMA_REFERENCE(Object arg0, Object arg1) {
    -        return messageFactory.getMessage("Internalizer.IncorrectSchemaReference", arg0, arg1);
    +        return MESSAGE_FACTORY.getMessage("Internalizer.IncorrectSchemaReference", arg0, arg1);
         }
     
         /**
    @@ -976,7 +563,427 @@ public final class WsdlMessages {
          *
          */
         public static String INTERNALIZER_INCORRECT_SCHEMA_REFERENCE(Object arg0, Object arg1) {
    -        return localizer.localize(localizableINTERNALIZER_INCORRECT_SCHEMA_REFERENCE(arg0, arg1));
    +        return LOCALIZER.localize(localizableINTERNALIZER_INCORRECT_SCHEMA_REFERENCE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizablePARSING_INVALID_EXTENSION_ELEMENT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("parsing.invalidExtensionElement", arg0, arg1);
    +    }
    +
    +    /**
    +     * invalid extension element: "{0}" (in namespace "{1}")
    +     *
    +     */
    +    public static String PARSING_INVALID_EXTENSION_ELEMENT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizablePARSING_INVALID_EXTENSION_ELEMENT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableVALIDATION_EXCLUSIVE_ATTRIBUTES(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.exclusiveAttributes", arg0, arg1);
    +    }
    +
    +    /**
    +     * exclusive attributes: "{0}", "{1}"
    +     *
    +     */
    +    public static String VALIDATION_EXCLUSIVE_ATTRIBUTES(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_EXCLUSIVE_ATTRIBUTES(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableVALIDATION_INCORRECT_TARGET_NAMESPACE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.incorrectTargetNamespace", arg0, arg1);
    +    }
    +
    +    /**
    +     * target namespace is incorrect (expected: {1}, found: {0})
    +     *
    +     */
    +    public static String VALIDATION_INCORRECT_TARGET_NAMESPACE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_INCORRECT_TARGET_NAMESPACE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableINTERNALIZER_TWO_VERSION_ATTRIBUTES() {
    +        return MESSAGE_FACTORY.getMessage("Internalizer.TwoVersionAttributes");
    +    }
    +
    +    /**
    +     *  Both jaxws:version and version are present
    +     *
    +     */
    +    public static String INTERNALIZER_TWO_VERSION_ATTRIBUTES() {
    +        return LOCALIZER.localize(localizableINTERNALIZER_TWO_VERSION_ATTRIBUTES());
    +    }
    +
    +    public static Localizable localizableENTITY_NOT_FOUND_BINDING(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("entity.notFound.binding", arg0, arg1);
    +    }
    +
    +    /**
    +     * wsdl:binding "{0}" referenced by wsdl:port "{1}", but it's not found in the wsdl
    +     *
    +     */
    +    public static String ENTITY_NOT_FOUND_BINDING(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableENTITY_NOT_FOUND_BINDING(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableVALIDATION_INVALID_SUB_ENTITY(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.invalidSubEntity", arg0, arg1);
    +    }
    +
    +    /**
    +     * invalid sub-element "{0}" of element "{1}"
    +     *
    +     */
    +    public static String VALIDATION_INVALID_SUB_ENTITY(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_INVALID_SUB_ENTITY(arg0, arg1));
    +    }
    +
    +    public static Localizable localizablePARSING_REQUIRED_EXTENSIBILITY_ELEMENT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("parsing.requiredExtensibilityElement", arg0, arg1);
    +    }
    +
    +    /**
    +     * unknown required extensibility element "{0}" (in namespace "{1}")
    +     *
    +     */
    +    public static String PARSING_REQUIRED_EXTENSIBILITY_ELEMENT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizablePARSING_REQUIRED_EXTENSIBILITY_ELEMENT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizablePARSING_IO_EXCEPTION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.ioException", arg0);
    +    }
    +
    +    /**
    +     * parsing failed: {0}
    +     *
    +     */
    +    public static String PARSING_IO_EXCEPTION(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_IO_EXCEPTION(arg0));
    +    }
    +
    +    public static Localizable localizableINTERNALIZER_VERSION_NOT_PRESENT() {
    +        return MESSAGE_FACTORY.getMessage("Internalizer.VersionNotPresent");
    +    }
    +
    +    /**
    +     *  JAXWS version attribute must be present
    +     *
    +     */
    +    public static String INTERNALIZER_VERSION_NOT_PRESENT() {
    +        return LOCALIZER.localize(localizableINTERNALIZER_VERSION_NOT_PRESENT());
    +    }
    +
    +    public static Localizable localizableINTERNALIZER_X_PATH_EVALUATION_ERROR(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("internalizer.XPathEvaluationError", arg0);
    +    }
    +
    +    /**
    +     * XPath error: {0}
    +     *
    +     */
    +    public static String INTERNALIZER_X_PATH_EVALUATION_ERROR(Object arg0) {
    +        return LOCALIZER.localize(localizableINTERNALIZER_X_PATH_EVALUATION_ERROR(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_INVALID_WSDL_ELEMENT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.invalidWsdlElement", arg0);
    +    }
    +
    +    /**
    +     * invalid WSDL element: "{0}"
    +     *
    +     */
    +    public static String PARSING_INVALID_WSDL_ELEMENT(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_INVALID_WSDL_ELEMENT(arg0));
    +    }
    +
    +    public static Localizable localizableINTERNALIZER_TARGET_NOT_AN_ELEMENT() {
    +        return MESSAGE_FACTORY.getMessage("internalizer.targetNotAnElement");
    +    }
    +
    +    /**
    +     *  Target node is not an element
    +     *
    +     */
    +    public static String INTERNALIZER_TARGET_NOT_AN_ELEMENT() {
    +        return LOCALIZER.localize(localizableINTERNALIZER_TARGET_NOT_AN_ELEMENT());
    +    }
    +
    +    public static Localizable localizableWARNING_INPUT_OUTPUT_EMPTY_ACTION(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("warning.inputOutputEmptyAction", arg0, arg1);
    +    }
    +
    +    /**
    +     * ignoring empty Action in {0} element of "{1}" operation, using default instead
    +     *
    +     */
    +    public static String WARNING_INPUT_OUTPUT_EMPTY_ACTION(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWARNING_INPUT_OUTPUT_EMPTY_ACTION(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableINTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("internalizer.XPathEvaluatesToNoTarget", arg0);
    +    }
    +
    +    /**
    +     * XPath evaluation of "{0}" results in an empty target node
    +     *
    +     */
    +    public static String INTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(Object arg0) {
    +        return LOCALIZER.localize(localizableINTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_INVALID_TAG_NS(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
    +        return MESSAGE_FACTORY.getMessage("parsing.invalidTagNS", arg0, arg1, arg2, arg3, arg4);
    +    }
    +
    +    /**
    +     * Invalid WSDL at {4}: expected element "{2}" (in namespace "{3}"), found element "{0}" (in namespace "{1}")
    +     *
    +     */
    +    public static String PARSING_INVALID_TAG_NS(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
    +        return LOCALIZER.localize(localizablePARSING_INVALID_TAG_NS(arg0, arg1, arg2, arg3, arg4));
    +    }
    +
    +    public static Localizable localizablePARSING_UNKNOWN_NAMESPACE_PREFIX(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.unknownNamespacePrefix", arg0);
    +    }
    +
    +    /**
    +     * undeclared namespace prefix: "{0}"
    +     *
    +     */
    +    public static String PARSING_UNKNOWN_NAMESPACE_PREFIX(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_UNKNOWN_NAMESPACE_PREFIX(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_INVALID_ELEMENT(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("parsing.invalidElement", arg0, arg1);
    +    }
    +
    +    /**
    +     * invalid element: "{0}" (in namespace "{1}")
    +     *
    +     */
    +    public static String PARSING_INVALID_ELEMENT(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizablePARSING_INVALID_ELEMENT(arg0, arg1));
    +    }
    +
    +    public static Localizable localizablePARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.onlyOneDocumentationAllowed", arg0);
    +    }
    +
    +    /**
    +     * only one "documentation" element allowed in "{0}"
    +     *
    +     */
    +    public static String PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_PARSER_CONFIG_EXCEPTION(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.parserConfigException", arg0);
    +    }
    +
    +    /**
    +     * invalid WSDL file! parsing failed: {0}
    +     *
    +     */
    +    public static String PARSING_PARSER_CONFIG_EXCEPTION(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_PARSER_CONFIG_EXCEPTION(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("parsing.missingRequiredAttribute", arg0, arg1);
    +    }
    +
    +    /**
    +     * missing required attribute "{1}" of element "{0}"
    +     *
    +     */
    +    public static String PARSING_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizablePARSING_MISSING_REQUIRED_ATTRIBUTE(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableVALIDATION_MISSING_REQUIRED_SUB_ENTITY(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.missingRequiredSubEntity", arg0, arg1);
    +    }
    +
    +    /**
    +     * missing required sub-entity "{0}" of element "{1}"
    +     *
    +     */
    +    public static String VALIDATION_MISSING_REQUIRED_SUB_ENTITY(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_MISSING_REQUIRED_SUB_ENTITY(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableVALIDATION_INVALID_ELEMENT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("validation.invalidElement", arg0);
    +    }
    +
    +    /**
    +     * invalid element: "{0}"
    +     *
    +     */
    +    public static String VALIDATION_INVALID_ELEMENT(Object arg0) {
    +        return LOCALIZER.localize(localizableVALIDATION_INVALID_ELEMENT(arg0));
    +    }
    +
    +    public static Localizable localizableVALIDATION_AMBIGUOUS_NAME(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("validation.ambiguousName", arg0);
    +    }
    +
    +    /**
    +     * ambiguous operation name: "{0}"
    +     *
    +     */
    +    public static String VALIDATION_AMBIGUOUS_NAME(Object arg0) {
    +        return LOCALIZER.localize(localizableVALIDATION_AMBIGUOUS_NAME(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_SAX_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.saxExceptionWithSystemId", arg0);
    +    }
    +
    +    /**
    +     * invalid WSDL file! failed to parse document at "{0}"
    +     *
    +     */
    +    public static String PARSING_SAX_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_SAX_EXCEPTION_WITH_SYSTEM_ID(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_WSDL_NOT_DEFAULT_NAMESPACE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.wsdlNotDefaultNamespace", arg0);
    +    }
    +
    +    /**
    +     * default namespace must be "{0}"
    +     *
    +     */
    +    public static String PARSING_WSDL_NOT_DEFAULT_NAMESPACE(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_WSDL_NOT_DEFAULT_NAMESPACE(arg0));
    +    }
    +
    +    public static Localizable localizablePARSING_INVALID_OPERATION_STYLE(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.invalidOperationStyle", arg0);
    +    }
    +
    +    /**
    +     * operation "{0}" has an invalid style
    +     *
    +     */
    +    public static String PARSING_INVALID_OPERATION_STYLE(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_INVALID_OPERATION_STYLE(arg0));
    +    }
    +
    +    public static Localizable localizableWARNING_WSI_R_2001() {
    +        return MESSAGE_FACTORY.getMessage("warning.wsi.r2001");
    +    }
    +
    +    /**
    +     * Not a WSI-BP compliant WSDL (R2001, R2002). wsdl:import must import only WSDL documents. It's trying to import: "{0}"
    +     *
    +     */
    +    public static String WARNING_WSI_R_2001() {
    +        return LOCALIZER.localize(localizableWARNING_WSI_R_2001());
    +    }
    +
    +    public static Localizable localizableWARNING_WSI_R_2002(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("warning.wsi.r2002", arg0, arg1);
    +    }
    +
    +    /**
    +     * Not a WSI-BP compliant WSDL (R2002). wsdl:import must not be used to import XML Schema embedded in the WSDL document. Expected WSDL namespace: {0}, found: {1}
    +     *
    +     */
    +    public static String WARNING_WSI_R_2002(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableWARNING_WSI_R_2002(arg0, arg1));
    +    }
    +
    +    public static Localizable localizablePARSING_INVALID_TAG(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("parsing.invalidTag", arg0, arg1);
    +    }
    +
    +    /**
    +     * expected element "{1}", found "{0}"
    +     *
    +     */
    +    public static String PARSING_INVALID_TAG(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizablePARSING_INVALID_TAG(arg0, arg1));
    +    }
    +
    +    public static Localizable localizableINTERNALIZER_TARGET_NOT_FOUND(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("internalizer.targetNotFound", arg0);
    +    }
    +
    +    /**
    +     *  No target found for the wsdlLocation: {0}
    +     *
    +     */
    +    public static String INTERNALIZER_TARGET_NOT_FOUND(Object arg0) {
    +        return LOCALIZER.localize(localizableINTERNALIZER_TARGET_NOT_FOUND(arg0));
    +    }
    +
    +    public static Localizable localizableINTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("internalizer.XPathEvaluatesToNonElement", arg0);
    +    }
    +
    +    /**
    +     * XPath evaluation of "{0}" needs to result in an element.
    +     *
    +     */
    +    public static String INTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(Object arg0) {
    +        return LOCALIZER.localize(localizableINTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(arg0));
    +    }
    +
    +    public static Localizable localizableVALIDATION_UNSUPPORTED_USE_ENCODED(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("validation.unsupportedUse.encoded", arg0, arg1);
    +    }
    +
    +    /**
    +     * "Use of SOAP Encoding is not supported.
    +     * SOAP extension element on line {0} in {1} has use="encoded" "
    +     *
    +     */
    +    public static String VALIDATION_UNSUPPORTED_USE_ENCODED(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableVALIDATION_UNSUPPORTED_USE_ENCODED(arg0, arg1));
    +    }
    +
    +    public static Localizable localizablePARSING_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
    +        return MESSAGE_FACTORY.getMessage("parsing.elementOrTypeRequired", arg0);
    +    }
    +
    +    /**
    +     * warning: part {0} is ignored, either the "element" or the "type" attribute is required in part "{0}"
    +     *
    +     */
    +    public static String PARSING_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
    +        return LOCALIZER.localize(localizablePARSING_ELEMENT_OR_TYPE_REQUIRED(arg0));
    +    }
    +
    +    public static Localizable localizableENTITY_NOT_FOUND_PORT_TYPE(Object arg0, Object arg1) {
    +        return MESSAGE_FACTORY.getMessage("entity.notFound.portType", arg0, arg1);
    +    }
    +
    +    /**
    +     * wsdl:portType "{0}" referenced by wsdl:binding "{1}", but it's not found in the wsdl
    +     *
    +     */
    +    public static String ENTITY_NOT_FOUND_PORT_TYPE(Object arg0, Object arg1) {
    +        return LOCALIZER.localize(localizableENTITY_NOT_FOUND_PORT_TYPE(arg0, arg1));
    +    }
    +
    +    private static class BundleSupplier
    +        implements ResourceBundleSupplier
    +    {
    +
    +
    +        public ResourceBundle getResourceBundle(Locale locale) {
    +            return ResourceBundle.getBundle(BUNDLE_NAME, locale);
    +        }
    +
         }
     
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile.properties
    index 94c7c57fc71..43a863fdfb2 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2005, 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
    @@ -142,18 +142,16 @@ wsgen.version=wsgen version \"{0}\"
     wsgen.fullversion=wsgen full version \"{0}\"
     
     wrapperTask.needEndorsed=\
    -You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. \
    -Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \
    -or set xendorsed="true" on <{2}>.
    +You are running on JDK6 or newer which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} or newer API. Use \
    +the standard override mechanism.
     
     # {0}, {2} - version (e.g. 2.1), {1} - absolute class location
     wrapperTask.loadingIncorrectApi=\
     You are loading JAX-WS {0} API from {1} but this tool requires JAX-WS {2} API.
     
     invoker.needEndorsed=\
    -You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. \
    -Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \
    -or use -Xendorsed option.
    +You are running on JDK6 or newer which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} or newer API. Use \
    +the standard override mechanism.
     
     
     #
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_de.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_de.properties
    index b325ad5be5a..d51973dc968 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_de.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_de.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2005, 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
    @@ -38,12 +38,12 @@ wsgen.help=\nVerwendung: {0} [options] \n\n\\wobei [options] Folgendes umfa
     
     
     wsgen.usage.examples=\n\\Beispiele:\n\\  wsgen -cp . example.Stock\n\\  wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
    -wrapperTask.needEndorsed=Sie arbeiten mit JDK6, das mit JAX-WS {0}-API geliefert wird, dieses Tool erfordert jedoch JAX-WS {1}-API. Verwenden Sie das "Endorsed Standards Override Mechanism"-Verfahren (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), oder setzen Sie xendorsed="true" in <{2}>.
    +wrapperTask.needEndorsed=Sie arbeiten mit JDK6 oder h\u00F6her, das mit der JAX-WS {0}-API geliefert wird. Dieses Tool erfordert jedoch JAX-WS {1} oder eine neuere API. Verwenden Sie das Standard-Override-Verfahren.
     
     # {0}, {2} - version (e.g. 2.1), {1} - absolute class location
     wrapperTask.loadingIncorrectApi=Sie laden JAX-WS {0}-API aus {1}, dieses Tool erfordert jedoch JAX-WS {2}-API.
     
    -invoker.needEndorsed=Sie arbeiten mit JDK6, das mit JAX-WS {0}-API geliefert wird, dieses Tool erfordert jedoch JAX-WS {1}-API. Verwenden Sie das "Endorsed Standards Override Mechanism"-Verfahren (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), oder verwenden Sie die Option "-Xendorsed".
    +invoker.needEndorsed=Sie arbeiten mit JDK6 oder h\u00F6her, das mit der JAX-WS {0}-API geliefert wird. Dieses Tool erfordert jedoch JAX-WS {1} oder eine neuere API. Verwenden Sie das Standard-Override-Verfahren.
     
     
     #
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_es.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_es.properties
    index 5c3906c63dd..57ffdc5dbf3 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_es.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_es.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2005, 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
    @@ -38,12 +38,12 @@ wsgen.help=\nSintaxis: {0} [options] \n\n\\donde [options] incluye:\n\\  -c
     
     
     wsgen.usage.examples=\n\\Ejemplos:\n\\ wsgen -cp . example.Stock\n\\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
    -wrapperTask.needEndorsed=Est\u00e1 utilizando JDK6, que incluye la API JAX-WS {0}, pero esta herramienta necesita la API JAX-WS {1}. Utilice el mecanismo de sustituci\u00f3n de los est\u00e1ndares aprobados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), o defina xendorsed="true" en <{2}>.
    +wrapperTask.needEndorsed=Est\u00E1 ejecutando JDK6 o una versi\u00F3n posterior que incluye la API JAX-WS {0}, pero esta herramienta necesita la API JAX-WS {1} o una versi\u00F3n posterior. Utilice el mecanismo de sustituci\u00F3n de est\u00E1ndares.
     
     # {0}, {2} - version (e.g. 2.1), {1} - absolute class location
     wrapperTask.loadingIncorrectApi=Est\u00e1 cargando la API JAX-WS {0} desde {1}, pero esta herramienta necesita la API JAX-WS {2}.
     
    -invoker.needEndorsed=Est\u00e1 utilizando JDK6, que incluye la API JAX-WS {0}, pero esta herramienta necesita la API JAX-WS {1}. Utilice el mecanismo de sustituci\u00f3n de los est\u00e1ndares aprobados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), o utilice la opci\u00f3n -Xendorsed.
    +invoker.needEndorsed=Est\u00E1 ejecutando JDK6 o una versi\u00F3n posterior que incluye la API JAX-WS {0}, pero esta herramienta necesita la API JAX-WS {1} o una versi\u00F3n posterior. Utilice el mecanismo de sustituci\u00F3n de est\u00E1ndares.
     
     
     #
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties
    index c26d69e9b8e..6931093f120 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2005, 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
    @@ -38,12 +38,12 @@ wsgen.help=\nSyntaxe : {0} [options] \n\n\\o\u00f9 [options] incluent :\n\
     
     
     wsgen.usage.examples=\n\\Exemples :\n\  wsgen -cp . example.Stock\n\  wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
    -wrapperTask.needEndorsed=Vous ex\u00e9cutez JDK6, qui comporte l''API JAX-WS {0}, mais cet outil exige l''API JAX-WS {1}. Utilisez le m\u00e9canisme Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), ou d\u00e9finissez xendorsed="True" sur <{2}>.
    +wrapperTask.needEndorsed=Vous ex\u00E9cutez JDK6 ou une version ult\u00E9rieure, qui est fournie avec l''API JAX-WS {0}, mais cet outil exige l''API JAX-WS {1} ou une version plus r\u00E9cente. Utilisez le m\u00E9canisme Standard Override Mechanism.
     
     # {0}, {2} - version (e.g. 2.1), {1} - absolute class location
     wrapperTask.loadingIncorrectApi=Vous \u00eates en train de charger l''API JAX-WS {0} \u00e0 partir de {1}, mais cet outil exige l''API JAX-WS {2}.
     
    -invoker.needEndorsed=Vous ex\u00e9cutez JDK6, qui comporte l''API JAX-WS {0}, mais cet outil exige l''API JAX-WS {1}. Utilisez le m\u00e9canisme Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), ou utilisez l''option -Xendorsed.
    +invoker.needEndorsed=Vous ex\u00E9cutez JDK6 ou une version ult\u00E9rieure, qui est fournie avec l''API JAX-WS {0}, mais cet outil exige l''API JAX-WS {1} ou une version plus r\u00E9cente. Utilisez le m\u00E9canisme Standard Override Mechanism.
     
     
     #
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_it.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_it.properties
    index 92a0c8cba5a..f0d82449eae 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_it.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_it.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2005, 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
    @@ -38,12 +38,12 @@ wsgen.help=\nUso: {0} [options] \n\n\\dove [options] include:\n\  -classpat
     
     
     wsgen.usage.examples=\n\\Esempi:\n\  wsgen -cp . example.Stock\n\  wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
    -wrapperTask.needEndorsed=\u00c8 in corso l''esecuzione su JDK6, fornito con l''API JAX-WS {0} ma questo strumento richiede l''API JAX-WS {1}. Usare il meccanismo Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/) o impostare xendorsed="true" su <{2}>.
    +wrapperTask.needEndorsed=\u00C8 in corso l''esecuzione su JDK6 o versione successiva, fornito con l''API JAX-WS {0}, ma questo strumento richiede l''API JAX-WS {1} o versione successiva. Usare il meccanismo di sostituzione standard.
     
     # {0}, {2} - version (e.g. 2.1), {1} - absolute class location
     wrapperTask.loadingIncorrectApi=\u00c8 in corso il caricamento dell''API JAX-WS {0} da {1} ma questo strumento richiede l''API JAX-WS {2}.
     
    -invoker.needEndorsed=\u00c8 in corso l''esecuzione su JDK6, fornito con l''API JAX-WS {0} ma questo strumento richiede l''API JAX-WS {1}. Usare il meccanismo Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/) o usare l''opzione -Xendorsed.
    +invoker.needEndorsed=\u00C8 in corso l''esecuzione su JDK6 o versione successiva, fornito con l''API JAX-WS {0}, ma questo strumento richiede l''API JAX-WS {1} o versione successiva. Usare il meccanismo di sostituzione standard.
     
     
     #
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties
    index 65561cc41a1..ed0276a4e4c 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2005, 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
    @@ -38,12 +38,12 @@ wsgen.help=\n\u4f7f\u7528\u65b9\u6cd5: {0} [options] \n\n\\[options]\u306b\
     
     
     wsgen.usage.examples=\n\\\u4f8b:\n\  wsgen -cp . example.Stock\n\  wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
    -wrapperTask.needEndorsed=JAX-WS {0} API\u306b\u4ed8\u5c5e\u3057\u305fJDK6\u3067\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30c4\u30fc\u30eb\u306b\u306fJAX-WS {1} API\u304c\u5fc5\u8981\u3067\u3059\u3002Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001<{2}>\u3067xendorsed="true"\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002
    +wrapperTask.needEndorsed=JAX-WS {0} API\u306B\u4ED8\u5C5E\u3057\u305FJDK6\u4EE5\u4E0A\u3067\u5B9F\u884C\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u306E\u30C4\u30FC\u30EB\u306B\u306FJAX-WS {1}\u4EE5\u4E0A\u306EAPI\u304C\u5FC5\u8981\u3067\u3059\u3002Standards Override Mechanism\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
     
     # {0}, {2} - version (e.g. 2.1), {1} - absolute class location
     wrapperTask.loadingIncorrectApi={1}\u304b\u3089JAX-WS {0} API\u3092\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30c4\u30fc\u30eb\u306b\u306fJAX-WS {2} API\u304c\u5fc5\u8981\u3067\u3059\u3002
     
    -invoker.needEndorsed=JAX-WS {0} API\u306b\u4ed8\u5c5e\u3057\u305fJDK6\u3067\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30c4\u30fc\u30eb\u306b\u306fJAX-WS {1} API\u304c\u5fc5\u8981\u3067\u3059\u3002Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001-Xendorsed\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002
    +invoker.needEndorsed=JAX-WS {0} API\u306B\u4ED8\u5C5E\u3057\u305FJDK6\u4EE5\u4E0A\u3067\u5B9F\u884C\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u306E\u30C4\u30FC\u30EB\u306B\u306FJAX-WS {1}\u4EE5\u4E0A\u306EAPI\u304C\u5FC5\u8981\u3067\u3059\u3002Standards Override Mechanism\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
     
     
     #
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties
    index c6571186abd..6ea2065a4ea 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2005, 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
    @@ -38,12 +38,12 @@ wsgen.help=\n\uc0ac\uc6a9\ubc95: {0} [options] \n\n\\\uc5ec\uae30\uc11c [op
     
     
     wsgen.usage.examples=\n\\\uc608:\n\  wsgen -cp . example.Stock\n\  wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
    -wrapperTask.needEndorsed=JAX-WS {0} API\uc640 \ud568\uaed8 \uc81c\uacf5\ub418\ub294 JDK6\uc5d0\uc11c \uc2e4\ud589\ud558\uace0 \uc788\uc9c0\ub9cc \uc774 \ud234\uc744 \uc0ac\uc6a9\ud558\ub824\uba74 JAX-WS {1} API\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. \uc778\uc99d\ub41c \ud45c\uc900 \ubb34\ud6a8\ud654 \ubc29\uc2dd(http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\uc744 \uc0ac\uc6a9\ud558\uac70\ub098 <{2}>\uc5d0 \ub300\ud574 xendorsed="true"\ub97c \uc124\uc815\ud558\uc2ed\uc2dc\uc624.
    +wrapperTask.needEndorsed=JAX-WS {0} API\uC640 \uD568\uAED8 \uC81C\uACF5\uB418\uB294 JDK6 \uC774\uC0C1\uC5D0\uC11C \uC2E4\uD589\uD558\uACE0 \uC788\uC9C0\uB9CC \uC774 \uD234\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 JAX-WS {1} \uC774\uC0C1 API\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uD45C\uC900 \uBB34\uD6A8\uD654 \uBC29\uC2DD\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
     
     # {0}, {2} - version (e.g. 2.1), {1} - absolute class location
     wrapperTask.loadingIncorrectApi={1}\uc5d0\uc11c JAX-WS {0} API\ub97c \ub85c\ub4dc\ud558\uace0 \uc788\uc9c0\ub9cc \uc774 \ud234\uc744 \uc0ac\uc6a9\ud558\ub824\uba74 JAX-WS {2} API\uac00 \ud544\uc694\ud569\ub2c8\ub2e4.
     
    -invoker.needEndorsed=JAX-WS {0} API\uc640 \ud568\uaed8 \uc81c\uacf5\ub418\ub294 JDK6\uc5d0\uc11c \uc2e4\ud589\ud558\uace0 \uc788\uc9c0\ub9cc \uc774 \ud234\uc744 \uc0ac\uc6a9\ud558\ub824\uba74 JAX-WS {1} API\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. \uc778\uc99d\ub41c \ud45c\uc900 \ubb34\ud6a8\ud654 \ubc29\uc2dd(http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\uc744 \uc0ac\uc6a9\ud558\uac70\ub098 -Xendorsed \uc635\uc158\uc744 \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624.
    +invoker.needEndorsed=JAX-WS {0} API\uC640 \uD568\uAED8 \uC81C\uACF5\uB418\uB294 JDK6 \uC774\uC0C1\uC5D0\uC11C \uC2E4\uD589\uD558\uACE0 \uC788\uC9C0\uB9CC \uC774 \uD234\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 JAX-WS {1} \uC774\uC0C1 API\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uD45C\uC900 \uBB34\uD6A8\uD654 \uBC29\uC2DD\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
     
     
     #
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties
    index 3806bf2a029..d479d1901a7 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2005, 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
    @@ -38,12 +38,12 @@ wsgen.help=\nUso: {0} [options] \n\n\\onde [options] inclui:\n\\  -classpat
     
     
     wsgen.usage.examples=\n\\Exemplos:\n\  wsgen -cp . example.Stock\n\  wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
    -wrapperTask.needEndorsed=Voc\u00ea est\u00e1 executando no JDK6 que vem com a API de JAX-WS {0}, mas esta ferramenta exige a API de JAX-WS {1}. Use o mecanismo de substitui\u00e7\u00e3o de padr\u00f5es endossados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/) ou defina xendorsed="true" em <{2}>.
    +wrapperTask.needEndorsed=Voc\u00EA est\u00E1 executando no JDK6 ou mais recente que vem com a API de JAX-WS {0}, mas esta ferramenta exige a API de JAX-WS {1} ou mais recente. Use o mecanismo de substitui\u00E7\u00E3o de padr\u00F5es.
     
     # {0}, {2} - version (e.g. 2.1), {1} - absolute class location
     wrapperTask.loadingIncorrectApi=Voc\u00ea est\u00e1 carregando a API de JAX-WS {0} de {1}, mas esta ferramenta requer a API de JAX-WS {2}.
     
    -invoker.needEndorsed=Voc\u00ea est\u00e1 executando no JDK6 que vem com a API de JAX-WS {0}, mas esta ferramenta exige a API de JAX-WS {1}. Use o mecanismo de substitui\u00e7\u00e3o de padr\u00f5es endossados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), ou use a op\u00e7\u00e3o -Xendorsed.
    +invoker.needEndorsed=Voc\u00EA est\u00E1 executando no JDK6 ou mais recente que vem com a API de JAX-WS {0}, mas esta ferramenta exige a API de JAX-WS {1} ou mais recente. Use o mecanismo de substitui\u00E7\u00E3o de padr\u00F5es.
     
     
     #
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties
    index 1eabe9a7baa..32f92fd4993 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2005, 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
    @@ -38,12 +38,12 @@ wsgen.help=\n\u7528\u6cd5: {0} [options] \n\n\\\u5176\u4e2d [options] \u530
     
     
     wsgen.usage.examples=\n\\\u793a\u4f8b:\n\  wsgen -cp . example.Stock\n\  wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
    -wrapperTask.needEndorsed=\u60a8\u6b63\u5728\u9644\u5e26 JAX-WS {0} API \u7684 JDK6 \u4e0a\u8fd0\u884c, \u4f46\u6b64\u5de5\u5177\u9700\u8981 JAX-WS {1} API\u3002\u8bf7\u4f7f\u7528\u6388\u6743\u6807\u51c6\u8986\u76d6\u673a\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u5728 <{2}> \u4e0a\u8bbe\u7f6e xendorsed="true"\u3002
    +wrapperTask.needEndorsed=\u60A8\u6B63\u5728\u9644\u5E26 JAX-WS {0} API \u7684 JDK6 \u6216\u66F4\u65B0\u7248\u672C\u4E0A\u8FD0\u884C, \u4F46\u6B64\u5DE5\u5177\u9700\u8981 JAX-WS {1} \u6216\u66F4\u65B0\u7684 API\u3002\u8BF7\u4F7F\u7528\u6807\u51C6\u8986\u76D6\u673A\u5236\u3002
     
     # {0}, {2} - version (e.g. 2.1), {1} - absolute class location
     wrapperTask.loadingIncorrectApi=\u60a8\u6b63\u5728\u4ece{1}\u52a0\u8f7d JAX-WS {0} API, \u4f46\u6b64\u5de5\u5177\u9700\u8981 JAX-WS {2} API\u3002
     
    -invoker.needEndorsed=\u60a8\u6b63\u5728\u9644\u5e26 JAX-WS {0} API \u7684 JDK6 \u4e0a\u8fd0\u884c, \u4f46\u6b64\u5de5\u5177\u9700\u8981 JAX-WS {1} API\u3002\u8bf7\u4f7f\u7528\u6388\u6743\u6807\u51c6\u8986\u76d6\u673a\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u4f7f\u7528 -Xendorsed \u9009\u9879\u3002
    +invoker.needEndorsed=\u60A8\u6B63\u5728\u9644\u5E26 JAX-WS {0} API \u7684 JDK6 \u6216\u66F4\u65B0\u7248\u672C\u4E0A\u8FD0\u884C, \u4F46\u6B64\u5DE5\u5177\u9700\u8981 JAX-WS {1} \u6216\u66F4\u65B0\u7684 API\u3002\u8BF7\u4F7F\u7528\u6807\u51C6\u8986\u76D6\u673A\u5236\u3002
     
     
     #
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties
    index 6c338863b1d..40b2297b594 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties
    @@ -1,5 +1,5 @@
     #
    -# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
    +# Copyright (c) 2005, 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
    @@ -38,12 +38,12 @@ wsgen.help=\n\u7528\u6cd5: {0} [options] \n\n\\\u5176\u4e2d [options] \u530
     
     
     wsgen.usage.examples=\n\\\u7bc4\u4f8b:\n\  wsgen -cp . example.Stock\n\  wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
    -wrapperTask.needEndorsed=\u60a8\u76ee\u524d\u57f7\u884c\u96a8\u9644\u65bc JAX-WS {0} API \u7684 JDK6, \u4f46\u662f\u6b64\u5de5\u5177\u9700\u8981\u4f7f\u7528 JAX-WS {1} API. \u8acb\u4f7f\u7528\u8a8d\u53ef\u7684\u6a19\u6e96\u8986\u5beb\u6a5f\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u5728 <{2}> \u8a2d\u5b9a xendorsed="true".
    +wrapperTask.needEndorsed=\u60A8\u76EE\u524D\u57F7\u884C\u96A8\u9644\u65BC JAX-WS {0} API \u7684 JDK6 \u6216\u66F4\u65B0\u7248\u672C\uFF0C\u4F46\u662F\u6B64\u5DE5\u5177\u9700\u8981\u642D\u914D JAX-WS {1} \u6216\u66F4\u65B0\u7248\u672C\u7684 API\u3002\u8ACB\u4F7F\u7528\u6A19\u6E96\u8986\u5BEB\u6A5F\u5236\u3002
     
     # {0}, {2} - version (e.g. 2.1), {1} - absolute class location
     wrapperTask.loadingIncorrectApi=\u60a8\u6b63\u5728\u5f9e {1} \u8f09\u5165 JAX-WS {0} API, \u4f46\u662f\u6b64\u5de5\u5177\u9700\u8981\u4f7f\u7528 JAX-WS {2} API.
     
    -invoker.needEndorsed=\u60a8\u76ee\u524d\u57f7\u884c\u96a8\u9644\u65bc JAX-WS {0} API \u7684 JDK6, \u4f46\u662f\u6b64\u5de5\u5177\u9700\u8981\u4f7f\u7528 JAX-WS {1} API. \u8acb\u4f7f\u7528\u8a8d\u53ef\u7684\u6a19\u6e96\u8986\u5beb\u6a5f\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u4f7f\u7528 -Xendorsed \u9078\u9805.
    +invoker.needEndorsed=\u60A8\u76EE\u524D\u57F7\u884C\u96A8\u9644\u65BC JAX-WS {0} API \u7684 JDK6 \u6216\u66F4\u65B0\u7248\u672C\uFF0C\u4F46\u662F\u6B64\u5DE5\u5177\u9700\u8981\u642D\u914D JAX-WS {1} \u6216\u66F4\u65B0\u7248\u672C\u7684 API\u3002\u8ACB\u4F7F\u7528\u6A19\u6E96\u8986\u5BEB\u6A5F\u5236\u3002
     
     
     #
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/util/WSDLParseException.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/util/WSDLParseException.java
    index b9ceb98e6cb..1ea2ae0a8f9 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/util/WSDLParseException.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/util/WSDLParseException.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -27,9 +27,6 @@ package com.sun.tools.internal.ws.util;
     
     import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
     
    -import java.util.Locale;
    -import java.util.ResourceBundle;
    -
     /**
       * @author WS Development Team
       */
    @@ -46,9 +43,4 @@ public class WSDLParseException extends JAXWSExceptionBase {
         public String getDefaultResourceBundleName() {
             return "com.sun.tools.internal.ws.resources.util";
         }
    -
    -    @Override
    -    public ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale);
    -    }
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/version.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/version.properties
    index eedc7c2b359..88eace686b6 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/version.properties
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/version.properties
    @@ -1,5 +1,5 @@
     #
    -# 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
    @@ -26,4 +26,4 @@
     build-id=2.3.0-SNAPSHOT
     build-version=JAX-WS RI 2.3.0-SNAPSHOT
     major-version=2.3.0
    -svn-revision=5c2c1fd2f2ab3b5c7cea25f79aa49e54cb84b7cc
    +svn-revision=3012ef421cf43774943c57736dac2207aeea9f07
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java
    index 4f29dc67fb4..e730c8e4ebb 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -144,12 +144,9 @@ public class WsgenTool {
         public boolean buildModel(String endpoint, Listener listener) throws BadCommandLineException {
             final ErrorReceiverFilter errReceiver = new ErrorReceiverFilter(listener);
     
    -        List args = new ArrayList(6 + (options.nocompile ? 1 : 0)
    +        List args = new ArrayList<>(6 + (options.nocompile ? 1 : 0)
                     + (options.encoding != null ? 2 : 0));
     
    -        args.add("--add-modules");
    -        args.add("java.xml.ws");
    -
             args.add("-d");
             args.add(options.destDir.getAbsolutePath());
             args.add("-classpath");
    @@ -163,8 +160,27 @@ public class WsgenTool {
                 args.add("-encoding");
                 args.add(options.encoding);
             }
    +
    +        boolean addModules = true;
             if (options.javacOptions != null) {
    -            args.addAll(options.getJavacOptions(args, listener));
    +            List javacOptions = options.getJavacOptions(args, listener);
    +            for (int i = 0; i < javacOptions.size(); i++) {
    +                String opt = javacOptions.get(i);
    +                if ("-source".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) {
    +                    addModules = false;
    +                }
    +                if ("-target".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) {
    +                    addModules = false;
    +                }
    +                if ("--release".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) {
    +                    addModules = false;
    +                }
    +                args.add(opt);
    +            }
    +        }
    +        if (addModules) {
    +            args.add("--add-modules");
    +            args.add("java.xml.ws");
             }
     
             JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
    @@ -227,7 +243,7 @@ public class WsgenTool {
                 com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl) fac.createRuntime(config);
     
                 final File[] wsdlFileName = new File[1]; // used to capture the generated WSDL file.
    -            final Map schemaFiles = new HashMap();
    +            final Map schemaFiles = new HashMap<>();
     
                 WSDLGenInfo wsdlGenInfo = new WSDLGenInfo();
                 wsdlGenInfo.setSecureXmlProcessingDisabled(disableXmlSecurity);
    @@ -299,7 +315,7 @@ public class WsgenTool {
         }
     
         private List getExternalFiles(List exts) {
    -        List files = new ArrayList();
    +        List files = new ArrayList<>();
             for (String ext : exts) {
                 // first try absolute path ...
                 File file = new File(ext);
    @@ -341,6 +357,10 @@ public class WsgenTool {
             }
         }
     
    +    private float getVersion(String s) {
    +        return Float.parseFloat(s);
    +    }
    +
         /**
          * "Namespace" for code needed to generate the report file.
          */
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java
    index 3768118feb2..33664a05c7d 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -246,7 +246,7 @@ public class WsimportTool {
         }
     
         private void deleteGeneratedFiles() {
    -        Set trackedRootPackages = new HashSet();
    +        Set trackedRootPackages = new HashSet<>();
     
             if (options.clientjar != null) {
                 //remove all non-java artifacts as they will packaged in jar.
    @@ -282,7 +282,7 @@ public class WsimportTool {
     
         private void addClassesToGeneratedFiles() throws IOException {
             Iterable generatedFiles = options.getGeneratedFiles();
    -        final List trackedClassFiles = new ArrayList();
    +        final List trackedClassFiles = new ArrayList<>();
             for(File f: generatedFiles) {
                 if(f.getName().endsWith(".java")) {
                     String relativeDir = DirectoryUtil.getRelativePathfromCommonBase(f.getParentFile(),options.sourceDir);
    @@ -504,7 +504,7 @@ public class WsimportTool {
         }
     
         protected boolean compileGeneratedClasses(ErrorReceiver receiver, WsimportListener listener){
    -        List sourceFiles = new ArrayList();
    +        List sourceFiles = new ArrayList<>();
     
             for (File f : options.getGeneratedFiles()) {
                 if (f.exists() && f.getName().endsWith(".java")) {
    @@ -515,10 +515,7 @@ public class WsimportTool {
             if (sourceFiles.size() > 0) {
                 String classDir = options.destDir.getAbsolutePath();
                 String classpathString = createClasspathString();
    -            List args = new ArrayList();
    -
    -            args.add("--add-modules");
    -            args.add("java.xml.ws");
    +            List args = new ArrayList<>();
     
                 args.add("-d");
                 args.add(classDir);
    @@ -534,8 +531,26 @@ public class WsimportTool {
                     args.add(options.encoding);
                 }
     
    +            boolean addModules = true;
                 if (options.javacOptions != null) {
    -                args.addAll(options.getJavacOptions(args, listener));
    +                List javacOptions = options.getJavacOptions(args, listener);
    +                for (int i = 0; i < javacOptions.size(); i++) {
    +                    String opt = javacOptions.get(i);
    +                    if ("-source".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) {
    +                        addModules = false;
    +                    }
    +                    if ("-target".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) {
    +                        addModules = false;
    +                    }
    +                    if ("--release".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) {
    +                        addModules = false;
    +                    }
    +                    args.add(opt);
    +                }
    +            }
    +            if (addModules) {
    +                args.add("--add-modules");
    +                args.add("java.xml.ws");
                 }
     
                 for (int i = 0; i < sourceFiles.size(); ++i) {
    @@ -572,4 +587,8 @@ public class WsimportTool {
             System.out.println(WscompileMessages.WSIMPORT_USAGE_EXTENSIONS());
             System.out.println(WscompileMessages.WSIMPORT_USAGE_EXAMPLES());
         }
    +
    +    private float getVersion(String s) {
    +        return Float.parseFloat(s);
    +    }
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java
    index f98dfcf9708..73061693351 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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,9 +28,6 @@ package com.sun.tools.internal.ws.wsdl.framework;
     import com.sun.istack.internal.localization.Localizable;
     import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
     
    -import java.util.Locale;
    -import java.util.ResourceBundle;
    -
     /**
      * An exception signalling a parsing error.
      *
    @@ -53,9 +50,4 @@ public class ParseException extends JAXWSExceptionBase {
         public String getDefaultResourceBundleName() {
             return "com.sun.tools.internal.ws.resources.wsdl";
         }
    -
    -    @Override
    -    public ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale);
    -    }
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java
    index 708d8b190e7..d73b5fb0d4d 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -27,9 +27,6 @@ package com.sun.tools.internal.ws.wsdl.framework;
     
     import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
     
    -import java.util.Locale;
    -import java.util.ResourceBundle;
    -
     /**
      * An exception signalling that validation of an entity failed.
      *
    @@ -48,9 +45,4 @@ public class ValidationException extends JAXWSExceptionBase {
         public String getDefaultResourceBundleName() {
             return "com.sun.tools.internal.ws.resources.wsdl";
         }
    -
    -    @Override
    -    public ResourceBundle getResourceBundle(Locale locale) {
    -        return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale);
    -    }
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java
    index c8c847907cd..e15ab93b9c1 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java
    @@ -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
    @@ -25,10 +25,10 @@
     
     package com.sun.tools.internal.ws.wsdl.parser;
     
    +import com.sun.tools.internal.ws.resources.ContextClassloaderLocalMessages;
    +
     import java.security.AccessController;
     import java.security.PrivilegedAction;
    -import java.text.MessageFormat;
    -import java.util.ResourceBundle;
     import java.util.WeakHashMap;
     
     /**
    @@ -36,9 +36,7 @@ import java.util.WeakHashMap;
      */
     abstract class ContextClassloaderLocal {
     
    -    private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
    -
    -    private WeakHashMap CACHE = new WeakHashMap();
    +    private WeakHashMap CACHE = new WeakHashMap<>();
     
         public V get() throws Error {
             ClassLoader tccl = getContextClassLoader();
    @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal {
             try {
                 return initialValue();
             } catch (Exception e) {
    -            throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
    +            throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e);
             }
         }
     
    -    private static String format(String property, Object... args) {
    -        String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
    -        return MessageFormat.format(text, args);
    -    }
    -
         private static ClassLoader getContextClassLoader() {
    -        return (ClassLoader)
    -                AccessController.doPrivileged(new PrivilegedAction() {
    -                    public Object run() {
    -                        ClassLoader cl = null;
    -                        try {
    -                            cl = Thread.currentThread().getContextClassLoader();
    -                        } catch (SecurityException ex) {
    -                        }
    -                        return cl;
    -                    }
    -                });
    +        return AccessController.doPrivileged(new PrivilegedAction() {
    +            @Override
    +            public ClassLoader run() {
    +                ClassLoader cl = null;
    +                try {
    +                    cl = Thread.currentThread().getContextClassLoader();
    +                } catch (SecurityException ex) {
    +                }
    +                return cl;
    +            }
    +        });
         }
     }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties
    deleted file mode 100644
    index c0267b823ea..00000000000
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties
    +++ /dev/null
    @@ -1,26 +0,0 @@
    -#
    -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
    -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    -#
    -# This code is free software; you can redistribute it and/or modify it
    -# under the terms of the GNU General Public License version 2 only, as
    -# published by the Free Software Foundation.  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.
    -#
    -
    -FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java
    index aed48abe794..e105d2f386c 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 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
    @@ -115,12 +115,26 @@ public class DOMForest {
             try {
                 // secure xml processing can be switched off if input requires it
                 boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity;
    -            DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(secureProcessingEnabled);
    +            DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(!secureProcessingEnabled);
                 dbf.setNamespaceAware(true);
                 this.documentBuilder = dbf.newDocumentBuilder();
     
                 this.parserFactory = XmlUtil.newSAXParserFactory(secureProcessingEnabled);
                 this.parserFactory.setNamespaceAware(true);
    +
    +            if(secureProcessingEnabled){
    +                dbf.setExpandEntityReferences(false);
    +                try {
    +                parserFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
    +                parserFactory.setFeature("http://xml.org/sax/features/external-general-entities", false);
    +                parserFactory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
    +              } catch (SAXNotRecognizedException e){
    +                throw new ParserConfigurationException(e.getMessage());
    +              } catch (SAXNotSupportedException e) {
    +                throw new ParserConfigurationException(e.getMessage());
    +              }
    +            }
    +
             } catch (ParserConfigurationException e) {
                 throw new AssertionError(e);
             }
    diff --git a/jaxws/src/jdk.xml.ws/share/classes/module-info.java b/jaxws/src/jdk.xml.ws/share/classes/module-info.java
    index dbec9c537b0..a9064619f55 100644
    --- a/jaxws/src/jdk.xml.ws/share/classes/module-info.java
    +++ b/jaxws/src/jdk.xml.ws/share/classes/module-info.java
    @@ -23,6 +23,21 @@
      * questions.
      */
     
    +/**
    + * Defines tools for JAX-WS classes and WSDL generation,
    + * including the {@index wsgen wsgen tool}
    + * and {@index wsimport wsimport tool} tools.
    + *
    + * 
    + *
    Tool Guides: + *
    {@extLink wsgen_tool_reference wsgen}, + * {@extLink wsimport_tool_reference wsimport} + *
    + * + * @moduleGraph + * @since 9 + */ +@Deprecated(since="9", forRemoval=true) module jdk.xml.ws { requires java.compiler; requires java.logging; @@ -33,6 +48,7 @@ module jdk.xml.ws { requires jdk.xml.bind; uses com.sun.tools.internal.ws.wscompile.Plugin; + provides com.sun.tools.internal.ws.wscompile.Plugin with com.sun.tools.internal.ws.wscompile.plugin.at_generated.PluginImpl; } diff --git a/jdk/.hgtags b/jdk/.hgtags index 5a7c6ba2850..0a0dc863876 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -398,3 +398,25 @@ a20f2cf90762673e1bc4980fd6597e70a2578045 jdk-9+152 1c4411322327aea3f91011ec3977a12a05b09629 jdk-9+153 c97e7a8b8da062b9070df442f9cf308e10845fb7 jdk-9+154 e170c858888e83d5c0994504599b6ed7a1fb0cfc jdk-9+155 +7d64e541a6c04c714bcad4c8b553db912f827cd5 jdk-9+156 +fdfa7b2fe9a7db06792eae20f97748f3e85bb83a jdk-9+157 +c476ca73750698fa5654e101af699ee45db38e2a jdk-9+158 +49b54a4d9e84b7ba956b8c27fced5035465146ae jdk-9+159 +cac788454598b95d8b0153c021a7fae3cd7e6fda jdk-9+160 +09b92d3067a38ee07bc14efa336b14790c93f7e7 jdk-9+161 +f6bf027e88e9a4dd19f721001a7af00157af42c4 jdk-9+162 +50171f8c47961710cbf87aead6f03fa431d8d240 jdk-9+163 +6dea581453d7c0e767e3169cfec8b423a381e71d jdk-9+164 +a7942c3b1e59495dbf51dc7c41aab355fcd253d7 jdk-9+165 +5d2b48f1f0a322aca719b49ff02ab421705bffc7 jdk-9+166 +7828aedcb525df40b7c8122bcc3f997c75ebaf7f jdk-9+167 +e78da9db6299b3fcba49300d52e2359e82fdd218 jdk-9+168 +177436a54ca13730ffc725a6e5dbfcd9486f3da3 jdk-9+169 +ef9954f6896bb0b95ac62bf769f68b59a7a56ccd jdk-9+170 +29bbedd4cce8e14742bdb22118c057b877c02f0f jdk-9+171 +0ff9ad7d067cd4fa14450cf208bf019175a0aaba jdk-9+172 +a5506b425f1bf91530d8417b57360e5d89328c0c jdk-9+173 +42f18c931bd4fae5c206ccf6d8e591e4c4e69d31 jdk-9+174 +e6c4f6ef717d104dba880e2dae538690c993b46f jdk-9+175 +9f27d513658d5375b0e26846857d92563f279073 jdk-9+176 +80acf577b7d0b886fb555c9916552844f6cc72af jdk-9+177 diff --git a/jdk/README b/jdk/README deleted file mode 100644 index 9817e93b584..00000000000 --- a/jdk/README +++ /dev/null @@ -1,27 +0,0 @@ -README: - This file should be located at the top of the jdk Mercurial repository. - - See http://openjdk.java.net/ for more information about the OpenJDK. - -Simple Build Instructions: - - 1. Download and install a JDK 6 from - http://java.sun.com/javase/downloads/index.jsp - Set the environment variable ALT_BOOTDIR to the location of this JDK 6. - - 2. Either download and install the latest JDK7 from - http://download.java.net/openjdk/jdk7/, or build your own complete - OpenJDK7 by using the top level Makefile in the OpenJDK Mercurial forest. - Set the environment variable ALT_JDK_IMPORT_PATH to the location of - this latest JDK7 or OpenJDK7 build. - - 3. Check the sanity of doing a build with the current machine: - cd make && gnumake sanity - See README-builds.html if you run into problems. - - 4. Do a partial build of the jdk: - cd make && gnumake all - - 5. Construct the images: - cd make && gnumake images - The resulting JDK image should be found in build/*/j2sdk-image diff --git a/jdk/make/CompileDemos.gmk b/jdk/make/CompileDemos.gmk index 5982ea02592..5b093935cd7 100644 --- a/jdk/make/CompileDemos.gmk +++ b/jdk/make/CompileDemos.gmk @@ -263,239 +263,13 @@ $(eval $(call SetupBuildDemo, TransparentRuler, \ MAIN_CLASS := transparentruler.Ruler, \ )) -$(eval $(call SetupBuildDemo, jconsole-plugin, \ - DEMO_SUBDIR := scripting, \ - SRC_SUB_DIR := src, \ - MAIN_CLASS := NONE, \ -)) - -$(eval $(call SetupBuildDemo, FullThreadDump, \ - DEMO_SUBDIR := management, \ -)) - -$(eval $(call SetupBuildDemo, JTop, \ - DEMO_SUBDIR := management, \ -)) - -$(eval $(call SetupBuildDemo, MemoryMonitor, \ - DEMO_SUBDIR := management, \ -)) - -$(eval $(call SetupBuildDemo, VerboseGC, \ - DEMO_SUBDIR := management, \ -)) - -################################################################################ -# Build JVMTI demos. - -# Setup make rules for building a JVMTI demo. -# -# Parameter 1 is the name of the rule. This name is used as variable prefix, -# and the targets generated are listed in a variable by that name. -# -# Remaining parameters are named arguments. These include: -# EXTRA_SRC_SUBDIR Also include these subdirectories -# TOOLCHAIN Optionally specify toolchain to use -SetupBuildJvmtiDemo = $(NamedParamsMacroTemplate) -define SetupBuildJvmtiDemoBody - $1_SRC := \ - $(DEMO_SHARE_SRC)/jvmti/$1 \ - $$(wildcard $$(addprefix $(DEMO_SHARE_SRC)/jvmti/, \ - agent_util $$($1_EXTRA_SRC_SUBDIR))) - - ### Build the native lib - $1_CFLAGS_INCLUDE := $$(addprefix -I, $$($1_SRC)) - - $1_CXXFLAGS := $$($1_CFLAGS_INCLUDE) $(CXXFLAGS_JDKLIB) $(CXXFLAGS_DEBUG_SYMBOLS) - - ifeq ($$($1_TOOLCHAIN), TOOLCHAIN_LINK_CXX) - # For C++, we also need some special treatment. - $1_LDFLAGS := $$(LDFLAGS_CXX_JDK) - $1_LIBS := $(LIBCXX) - - ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc) - $1_CXXFLAGS := $$(filter-out -xregs=no%appl, $$($1_CXXFLAGS)) - endif - endif - - # Remove the -incremental:no setting to get .ilk-files like in the old build. - $$(eval $$(call SetupNativeCompilation, BUILD_DEMO_JVMTI_NATIVE_$1, \ - SRC := $$($1_SRC), \ - TOOLCHAIN := $$($1_TOOLCHAIN), \ - OPTIMIZATION := LOW, \ - CFLAGS := $$($1_CFLAGS_INCLUDE) $$(CFLAGS_JDKLIB) $$(CFLAGS_DEBUG_SYMBOLS), \ - CXXFLAGS := $$($1_CXXFLAGS), \ - LDFLAGS := $(filter-out -incremental:no -opt:ref, $$(LDFLAGS_JDKLIB)) \ - $$($1_LDFLAGS), \ - LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN), \ - LIBS := $$($1_LIBS), \ - LIBS_solaris := -lc, \ - VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ - RC_FLAGS := $$(RC_FLAGS) \ - -D "JDK_FNAME=$1.dll" \ - -D "JDK_INTERNAL_NAME=$1" \ - -D "JDK_FTYPE=0x2L", \ - OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jvmti/$1, \ - OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/lib, \ - LIBRARY := $1, \ - STRIP_SYMBOLS := false, \ - )) - - $1 += $$(BUILD_DEMO_JVMTI_NATIVE_$1) - - ### Build the jar, if we have java sources - ifneq ($$(wildcard $(DEMO_SHARE_SRC)/jvmti/$1/*.java), ) - $$(eval $$(call SetupJavaCompilation, BUILD_DEMO_JVMTI_JAVA_$1, \ - SETUP := GENERATE_USINGJDKBYTECODE, \ - SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \ - BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/jvmti/$1, \ - COPY := $(COPY_TO_JAR), \ - JAR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/$1.jar, \ - EXTRA_MANIFEST_ATTR := Main-Class: \n, \ - MANIFEST := $(DEMO_MANIFEST), \ - )) - - $1 += $$(BUILD_DEMO_JVMTI_JAVA_$1_JAR) - endif - - ### Build the source zip - $1_EXCLUDE_FILES := \ - $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/README.txt, \ - agent_util $$($1_EXTRA_SRC_SUBDIR))) \ - $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/sample.makefile.txt, \ - agent_util $$($1_EXTRA_SRC_SUBDIR))) - - $$(eval $$(call SetupZipArchive, BUILD_DEMO_JVMTI_SRC_$1, \ - SRC := $$($1_SRC), \ - EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \ - ZIP := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/src.zip, \ - )) - - $1 += $$(BUILD_DEMO_JVMTI_SRC_$1) - - # Copy files to image - $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/README.txt: $(DEMO_SHARE_SRC)/jvmti/$1/README.txt - $$(call install-file) - $(CHMOD) -f ug+w $$@ - - $1 += $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/README.txt - - ifeq ($(OPENJDK_TARGET_OS), windows) - # These lib and exp files normally end up in OBJECT_DIR but for demos they - # are supposed to be included in the distro. Since they are created as - # a side-effect of the library compilation, make does not know about them. - $1_SUPPORT_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/demos/native/jvmti/$1 - $1_IMAGE_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/lib - - $$($1_SUPPORT_OUTPUTDIR)/$1.lib: $$(BUILD_DEMO_JVMTI_NATIVE_$1) - - $$($1_SUPPORT_OUTPUTDIR)/$1.exp: $$(BUILD_DEMO_JVMTI_NATIVE_$1) - - $$($1_IMAGE_OUTPUTDIR)/$1.lib: $$($1_SUPPORT_OUTPUTDIR)/$1.lib - $$(call install-file) - - $$($1_IMAGE_OUTPUTDIR)/$1.exp: $$($1_SUPPORT_OUTPUTDIR)/$1.exp - $$(call install-file) - - $1 += $$($1_IMAGE_OUTPUTDIR)/$1.lib $$($1_IMAGE_OUTPUTDIR)/$1.exp - endif - - TARGETS += $$($1) -endef - -$(eval $(call SetupBuildJvmtiDemo, compiledMethodLoad)) -$(eval $(call SetupBuildJvmtiDemo, gctest)) -$(eval $(call SetupBuildJvmtiDemo, heapViewer)) -$(eval $(call SetupBuildJvmtiDemo, versionCheck)) - -$(eval $(call SetupBuildJvmtiDemo, heapTracker, \ - EXTRA_SRC_SUBDIR := java_crw_demo, \ -)) - -$(eval $(call SetupBuildJvmtiDemo, minst, \ - EXTRA_SRC_SUBDIR := java_crw_demo, \ -)) - -$(eval $(call SetupBuildJvmtiDemo, mtrace, \ - EXTRA_SRC_SUBDIR := java_crw_demo, \ -)) - -$(eval $(call SetupBuildJvmtiDemo, waiters, \ - TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ -)) - -################################################################################ -# Build the Poller demo (on Solaris only). - -ifeq ($(OPENJDK_TARGET_OS), solaris) - DEMO_SOLARIS_SRC := $(JDK_TOPDIR)/src/demo/solaris - - $(eval $(call SetupJavaCompilation, BUILD_DEMO_JAVA_Poller, \ - SETUP := GENERATE_USINGJDKBYTECODE, \ - SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \ - BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \ - HEADERS := $(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \ - JAR := $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/Poller.jar, \ - MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf, \ - SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/src.zip, \ - COPY := README.txt Poller.c, \ - JARMAIN := Client, \ - )) - - TARGETS += $(BUILD_DEMO_JAVA_Poller) - - $(eval $(call SetupNativeCompilation, BUILD_DEMO_NATIVE_Poller, \ - SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \ - OPTIMIZATION := LOW, \ - CFLAGS := $(CFLAGS_JDKLIB) \ - -I$(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \ - LDFLAGS := $(LDFLAGS_JDKLIB), \ - LIBS_solaris := -lc, \ - OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller, \ - OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native, \ - LIBRARY := Poller, \ - STRIP_SYMBOLS := false, \ - )) - - TARGETS += $(BUILD_DEMO_NATIVE_Poller) - - # We can only compile native code after java has been compiled (since we - # depend on generated .h files) - $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller/Poller.o: \ - $(BUILD_DEMO_JAVA_Poller) - - # Copy to image - $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/README.txt: \ - $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt - $(call install-file) - $(CHMOD) -f ug+w $@ - - TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/README.txt - - $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/lib/libPoller.so: \ - $(SUPPORT_OUTPUTDIR)/demos/native/libPoller.so - $(call install-file) - - TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/lib/libPoller.so -endif - ################################################################################ # Copy html and README files. -$(SUPPORT_OUTPUTDIR)/demos/image/management/index.html: $(DEMO_SHARE_SRC)/management/index.html - $(call install-file) - $(CHMOD) -f ug+w $@ - -$(SUPPORT_OUTPUTDIR)/demos/image/jvmti/index.html: $(DEMO_SHARE_SRC)/jvmti/index.html - $(call install-file) - $(CHMOD) -f ug+w $@ - $(SUPPORT_OUTPUTDIR)/demos/image/README: $(DEMO_SHARE_SRC)/README $(call install-file) -TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/management/index.html \ - $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/index.html \ - $(SUPPORT_OUTPUTDIR)/demos/image/README +TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/README ################################################################################ # Copy netbeans project files. @@ -517,9 +291,21 @@ endif ################################################################################ +ifneq ($(filter images, $(MAKECMDGOALS)), ) + $(eval $(call SetupCopyFiles, COPY_TO_TEST_IMAGE, \ + SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \ + DEST := $(TEST_IMAGE_DIR)/jdk/demos, \ + FILES := $(call DoubleDollar, $(call CacheFind, $(SUPPORT_OUTPUTDIR)/demos/image)), \ + )) + + IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE) +endif + +################################################################################ # Hook to include the corresponding custom file, if present. $(eval $(call IncludeCustomExtension, jdk, CompileDemos.gmk)) all: $(TARGETS) +images: $(IMAGES_TARGETS) .PHONY: all diff --git a/jdk/make/CompileModuleTools.gmk b/jdk/make/CompileModuleTools.gmk index 2bfe520b233..c53953335e8 100644 --- a/jdk/make/CompileModuleTools.gmk +++ b/jdk/make/CompileModuleTools.gmk @@ -23,19 +23,33 @@ # questions. # +default: all + include $(SPEC) include MakeBase.gmk include JavaCompilation.gmk include SetupJavaCompilers.gmk +################################################################################ + TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes $(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \ SETUP := GENERATE_USINGJDKBYTECODE, \ SRC := $(JDK_TOPDIR)/make/src/classes, \ INCLUDES := build/tools/deps \ + build/tools/docs \ build/tools/jigsaw, \ + COPY := .properties .html, \ BIN := $(TOOLS_CLASSES_DIR), \ ADD_JAVAC_FLAGS := \ + --add-modules jdk.jdeps \ --add-exports java.base/jdk.internal.module=ALL-UNNAMED \ + --add-exports jdk.jdeps/com.sun.tools.jdeps=ALL-UNNAMED \ )) + +TARGETS += $(BUILD_JIGSAW_TOOLS) + +################################################################################ + +all: $(TARGETS) diff --git a/jdk/make/CompileTools.gmk b/jdk/make/CompileTools.gmk index 9d76d660e2d..23c3bdb5e39 100644 --- a/jdk/make/CompileTools.gmk +++ b/jdk/make/CompileTools.gmk @@ -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 @@ -32,10 +32,21 @@ include SetupJavaCompilers.gmk ################################################################################ +$(eval $(call IncludeCustomExtension, jdk, CompileTools.gmk)) + +################################################################################ + +# Use += to be able to add to this from a custom extension +BUILD_TOOLS_SRC_DIRS += \ + $(JDK_TOPDIR)/make/src/classes \ + $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes \ + # + $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \ SETUP := GENERATE_OLDBYTECODE, \ - SRC := $(JDK_TOPDIR)/make/src/classes $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes, \ + SRC := $(BUILD_TOOLS_SRC_DIRS), \ EXCLUDES := build/tools/deps \ + build/tools/docs \ build/tools/jigsaw, \ BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes)) diff --git a/jdk/make/GenerateModuleSummary.gmk b/jdk/make/GenerateModuleSummary.gmk index 38d9985c263..b96e9ded8ca 100644 --- a/jdk/make/GenerateModuleSummary.gmk +++ b/jdk/make/GenerateModuleSummary.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2016, 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 @@ -31,11 +31,16 @@ include MakeBase.gmk include ModuleTools.gmk GENGRAPHS_DIR := $(IMAGES_OUTPUTDIR)/gengraphs +SPEC_DOTFILES_DIR := $(GENGRAPHS_DIR)/spec-dotfiles TOOLS_MODULE_SRCDIR := $(JDK_TOPDIR)/make/src/classes/build/tools/jigsaw $(GENGRAPHS_DIR)/jdk.dot: $(BUILD_JIGSAW_TOOLS) $(MKDIR) -p $(@D) - $(TOOL_GENGRAPHS) $(GENGRAPHS_DIR) + $(TOOL_GENGRAPHS) --output $(GENGRAPHS_DIR) + +$(SPEC_DOTFILES_DIR)/java.se.dot: $(BUILD_JIGSAW_TOOLS) + $(MKDIR) -p $(@D) + $(TOOL_GENGRAPHS) --spec --output $(SPEC_DOTFILES_DIR) $(GENGRAPHS_DIR)/technology-summary.html: $(TOOLS_MODULE_SRCDIR)/technology-summary.html $(install-file) @@ -44,4 +49,4 @@ $(GENGRAPHS_DIR)/module-summary.html: $(BUILD_JIGSAW_TOOLS) $(GENGRAPHS_DIR)/tec $(MKDIR) -p $(@D) $(TOOL_MODULESUMMARY) -o $@ --module-path $(IMAGES_OUTPUTDIR)/jmods -all: $(GENGRAPHS_DIR)/jdk.dot $(GENGRAPHS_DIR)/module-summary.html +all: $(GENGRAPHS_DIR)/jdk.dot $(GENGRAPHS_DIR)/module-summary.html $(SPEC_DOTFILES_DIR)/java.se.dot diff --git a/jdk/make/ModuleTools.gmk b/jdk/make/ModuleTools.gmk index 71ca1cf8eaa..c48a1b6ec3d 100644 --- a/jdk/make/ModuleTools.gmk +++ b/jdk/make/ModuleTools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 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 @@ -23,8 +23,9 @@ # questions. # -include $(SPEC) -include MakeBase.gmk +ifndef _MODULE_TOOLS_GMK +_MODULE_TOOLS_GMK := 1 + include JavaCompilation.gmk TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes @@ -32,10 +33,12 @@ TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes # To avoid reevaluating the compilation setup for the tools each time this file # is included, the actual compilation is handled by CompileModuleTools.gmk. The # following trick is used to be able to declare a dependency on the built tools. -BUILD_TOOLS_JDK := $(call SetupJavaCompilationCompileTarget, \ +BUILD_JIGSAW_TOOLS := $(call SetupJavaCompilationCompileTarget, \ BUILD_JIGSAW_TOOLS, $(TOOLS_CLASSES_DIR)) TOOL_GENGRAPHS := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \ + --add-modules jdk.jdeps \ + --add-exports jdk.jdeps/com.sun.tools.jdeps=ALL-UNNAMED \ build.tools.jigsaw.GenGraphs TOOL_MODULESUMMARY := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \ @@ -45,3 +48,5 @@ TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL) \ -cp $(TOOLS_CLASSES_DIR) \ --add-exports java.base/jdk.internal.module=ALL-UNNAMED \ build.tools.jigsaw.AddPackagesAttribute + +endif # _MODULE_TOOLS_GMK diff --git a/jdk/make/Tools.gmk b/jdk/make/Tools.gmk index 92af1ee102f..153da84124d 100644 --- a/jdk/make/Tools.gmk +++ b/jdk/make/Tools.gmk @@ -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 @@ -28,6 +28,9 @@ _TOOLS_GMK := 1 include JavaCompilation.gmk +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, jdk, Tools.gmk)) + ################################################################################ # To avoid reevaluating the compilation setup for the tools each time this file # is included, the actual compilation is handled by CompileTools.gmk. The diff --git a/jdk/make/copy/Copy-java.base.gmk b/jdk/make/copy/Copy-java.base.gmk index 2f26a834718..01764904187 100644 --- a/jdk/make/copy/Copy-java.base.gmk +++ b/jdk/make/copy/Copy-java.base.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2016, 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 @@ -235,8 +235,10 @@ endif # JDK license and assembly exception files to be packaged in JMOD -JDK_LICENSE ?= $(JDK_TOPDIR)/LICENSE -JDK_NOTICE ?= $(JDK_TOPDIR)/ASSEMBLY_EXCEPTION +# The license files may not be present if the source has been obtained using a +# different license. +JDK_LICENSE ?= $(wildcard $(TOPDIR)/LICENSE) +JDK_NOTICE ?= $(wildcard $(TOPDIR)/ASSEMBLY_EXCEPTION) $(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \ FILES := $(JDK_LICENSE) $(JDK_NOTICE), \ @@ -245,4 +247,3 @@ $(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \ )) TARGETS += $(COPY_JDK_NOTICES) - diff --git a/jdk/make/copy/Copy-java.desktop.gmk b/jdk/make/copy/Copy-java.desktop.gmk index 49d6b86aeb2..710375594e4 100644 --- a/jdk/make/copy/Copy-java.desktop.gmk +++ b/jdk/make/copy/Copy-java.desktop.gmk @@ -77,6 +77,13 @@ ifneq ($(FREETYPE_BUNDLE_LIB_PATH), ) endif TARGETS += $(FREETYPE_TARGET_LIB) + + $(eval $(call SetupCopyFiles, COPY_FREETYPE_LICENSE, \ + FILES := $(FREETYPE_LICENSE), \ + DEST := $(LEGAL_DST_DIR), \ + )) + + TARGETS += $(COPY_FREETYPE_LICENSE) endif ################################################################################ diff --git a/jdk/make/data/charsetmapping/stdcs-linux b/jdk/make/data/charsetmapping/stdcs-linux index 3bb08875a9d..0a870b754e1 100644 --- a/jdk/make/data/charsetmapping/stdcs-linux +++ b/jdk/make/data/charsetmapping/stdcs-linux @@ -24,3 +24,5 @@ JIS_X_0208 JIS_X_0212 JIS_X_0208_Solaris JIS_X_0212_Solaris +MS932 +SJIS # SJIS must go together with MS932 to support sun.nio.cs.map diff --git a/jdk/make/data/docs-resources/resources/jdk-default.css b/jdk/make/data/docs-resources/resources/jdk-default.css new file mode 100644 index 00000000000..ee742adeb22 --- /dev/null +++ b/jdk/make/data/docs-resources/resources/jdk-default.css @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ + +body { + margin: 2em 2em; + font-family: DejaVu Sans, Bitstream Vera Sans, Luxi Sans, Verdana, Arial, Helvetica; + font-size: 10pt; + line-height: 1.4; +} + +pre, code, tt { + font-family: DejaVu Sans Mono, Bitstream Vera Sans Mono, Luxi Mono, + Courier New, monospace; +} + +blockquote { + margin: 1.5ex 0em 1.5ex 2em; +} + +p { + padding: 0pt; + margin: 1ex 0em; +} + +p:first-child, pre:first-child { margin-top: 0pt; } + +h1 { + font-weight: bold; + padding: 0pt; + margin: 2ex .5ex 1ex 0pt; +} + +h1:first-child, h2:first-child { + margin-top: 0ex; +} + +h2 { + font-weight: bold; + padding: 0pt; + margin: 2ex 0pt 1ex 0pt; +} + +h3 { + font-weight: bold; + padding: 0pt; + margin: 1.5ex 0pt 1ex 0pt; +} + +h4 { + font-weight: bold; + padding: 0pt; + margin: 1.5ex 0pt 1ex 0pt; +} + +a:link { + color: #437291; +} + +a:visited { + color: #666666; +} + +a[href]:hover { + color: #e76f00; +} + +a img { + border-width: 0px; +} + +img { + background: white; +} + +table { + border-collapse: collapse; + margin-left: 15px; + margin-right: 15px; +} + +th, td { + padding: 3px; + vertical-align: top; +} + +table, th, td { + border: 1px solid black; +} + +caption { + text-align: left; + font-style: italic; + text-indent: 15px; + margin-bottom:10px; +} + +tr:nth-child(even), tr:nth-child(even) th[scope=row] { + background: #DDD; +} + +tr:nth-child(odd), tr:nth-child(odd) th[scope=row] { + background: #FFF; +} + +th { + background: #DDF; +} diff --git a/jdk/make/data/tzdata/VERSION b/jdk/make/data/tzdata/VERSION index 016d94c21fa..eb5b4595f3e 100644 --- a/jdk/make/data/tzdata/VERSION +++ b/jdk/make/data/tzdata/VERSION @@ -21,4 +21,4 @@ # or visit www.oracle.com if you need additional information or have any # questions. # -tzdata2016j +tzdata2017b diff --git a/jdk/make/data/tzdata/africa b/jdk/make/data/tzdata/africa index 67918afea67..d3de96d1431 100644 --- a/jdk/make/data/tzdata/africa +++ b/jdk/make/data/tzdata/africa @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-20): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -54,39 +54,33 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # +# European-style abbreviations are commonly used along the Mediterranean. +# For sub-Saharan Africa abbreviations were less standardized. # Previous editions of this database used WAT, CAT, SAT, and EAT -# for +0:00 through +3:00, respectively, -# but Mark R V Murray reports that -# 'SAST' is the official abbreviation for +2:00 in the country of South Africa, -# 'CAT' is commonly used for +2:00 in countries north of South Africa, and -# 'WAT' is probably the best name for +1:00, as the common phrase for +# for UT +00 through +03, respectively, +# but in 1997 Mark R V Murray reported that +# 'SAST' is the official abbreviation for +02 in the country of South Africa, +# 'CAT' is commonly used for +02 in countries north of South Africa, and +# 'WAT' is probably the best name for +01, as the common phrase for # the area that includes Nigeria is "West Africa". -# He has heard of "Western Sahara Time" for +0:00 but can find no reference. # -# To make things confusing, 'WAT' seems to have been used for -1:00 long ago; -# I'd guess that this was because people needed _some_ name for -1:00, -# and at the time, far west Africa was the only major land area in -1:00. -# This usage is now obsolete, as the last use of -1:00 on the African -# mainland seems to have been 1976 in Western Sahara. -# -# To summarize, the following abbreviations seem to have some currency: -# -1:00 WAT West Africa Time (no longer used) -# 0:00 GMT Greenwich Mean Time -# 2:00 CAT Central Africa Time -# 2:00 SAST South Africa Standard Time -# and Murray suggests the following abbreviation: -# 1:00 WAT West Africa Time -# I realize that this leads to 'WAT' being used for both -1:00 and 1:00 -# for times before 1976, but this is the best I can think of -# until we get more information. +# To summarize, the following abbreviations seemed to have some currency: +# +00 GMT Greenwich Mean Time +# +02 CAT Central Africa Time +# +02 SAST South Africa Standard Time +# and Murray suggested the following abbreviation: +# +01 WAT West Africa Time +# Murray's suggestion seems to have caught on in news reports and the like. +# I vaguely recall 'WAT' also being used for -01 in the past but +# cannot now come up with solid citations. # # I invented the following abbreviations; corrections are welcome! -# 2:00 WAST West Africa Summer Time -# 2:30 BEAT British East Africa Time (no longer used) -# 2:45 BEAUT British East Africa Unified Time (no longer used) -# 3:00 CAST Central Africa Summer Time (no longer used) -# 3:00 SAST South Africa Summer Time (no longer used) -# 3:00 EAT East Africa Time +# +02 WAST West Africa Summer Time +# +03 CAST Central Africa Summer Time (no longer used) +# +03 SAST South Africa Summer Time (no longer used) +# +03 EAT East Africa Time +# 'EAT' also seems to have caught on; the others are rare but are paired +# with better-attested non-DST abbreviations. # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -144,17 +138,17 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 # Cape Verde / Cabo Verde # -# Shanks gives 1907 for the transition to CVT. +# Shanks gives 1907 for the transition to +02. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1907 # Praia - -2:00 - CVT 1942 Sep - -2:00 1:00 CVST 1945 Oct 15 - -2:00 - CVT 1975 Nov 25 2:00 - -1:00 - CVT + -2:00 - -02 1942 Sep + -2:00 1:00 -01 1945 Oct 15 + -2:00 - -02 1975 Nov 25 2:00 + -1:00 - -01 # Central African Republic # See Africa/Lagos. @@ -411,7 +405,7 @@ Rule Ghana 1920 1942 - Sep 1 0:00 0:20 GHST Rule Ghana 1920 1942 - Dec 31 0:00 0 GMT # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 - 0:00 Ghana %s + 0:00 Ghana GMT/+0020 # Guinea # See Africa/Abidjan. @@ -420,20 +414,20 @@ Zone Africa/Accra -0:00:52 - LMT 1918 # # Shanks gives 1911-05-26 for the transition to WAT, # evidently confusing the date of the Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # with the date that it took effect, namely 1912-01-01. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 - -1:00 - WAT 1975 + -1:00 - -01 1975 0:00 - GMT # Kenya # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 - 2:30 - BEAT 1940 - 2:45 - BEAUT 1960 + 2:30 - +0230 1940 + 2:45 - +0245 1960 3:00 - EAT Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia Link Africa/Nairobi Africa/Asmara # Eritrea @@ -449,18 +443,25 @@ Link Africa/Nairobi Indian/Mayotte # See Africa/Johannesburg. # Liberia -# From Paul Eggert (2006-03-22): -# In 1972 Liberia was the last country to switch -# from a UTC offset that was not a multiple of 15 or 20 minutes. -# Howse reports that it was in honor of their president's birthday. -# Shank & Pottenger report the date as May 1, whereas Howse reports Jan; -# go with Shanks & Pottenger. -# For Liberia before 1972, Shanks & Pottenger report -0:44, whereas Howse and -# Whitman each report -0:44:30; go with the more precise figure. +# +# From Paul Eggert (2017-03-02): +# +# The Nautical Almanac for the Year 1970, p 264, is the source for -0:44:30. +# +# In 1972 Liberia was the last country to switch from a UTC offset +# that was not a multiple of 15 or 20 minutes. The 1972 change was on +# 1972-01-07, according to an entry dated 1972-01-04 on p 330 of: +# Presidential Papers: First year of the administration of +# President William R. Tolbert, Jr., July 23, 1971-July 31, 1972. +# Monrovia: Executive Mansion. +# +# Use the abbreviation "MMT" before 1972, as the more-accurate numeric +# abbreviation "-004430" would be one byte over the POSIX limit. +# # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time - -0:44:30 - LRT 1972 May # Liberia Time + -0:44:30 - MMT 1972 Jan 7 # approximately MMT 0:00 - GMT ############################################################################### @@ -619,7 +620,7 @@ Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 S Rule Mauritius 2009 only - Mar lastSun 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis - 4:00 Mauritius MU%sT # Mauritius Time + 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez # no information; probably like Indian/Mauritius @@ -938,14 +939,14 @@ Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 # since most of it was then controlled by Morocco. Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún - -1:00 - WAT 1976 Apr 14 + -1:00 - -01 1976 Apr 14 0:00 Morocco WE%sT # Mozambique # # Shanks gives 1903-03-01 for the transition to CAT. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -972,16 +973,19 @@ Link Africa/Maputo Africa/Lusaka # Zambia # the country are close to 40 minutes earlier in sunrise than the rest # of the country. # -# From Paul Eggert (2007-03-31): -# Apparently the Caprivi Strip informally observes Botswana time, but -# we have no details. In the meantime people there can use Africa/Gaborone. +# From Paul Eggert (2017-02-22): +# Although the Zambezi Region (formerly known as Caprivi) informally +# observes Botswana time, we have no details about historical practice. +# In the meantime people there can use Africa/Gaborone. +# See: Immanuel S. The Namibian. 2017-02-23. +# http://www.namibian.com.na/51480/read/Time-change-divides-lawmakers # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Namibia 1994 max - Sep Sun>=1 2:00 1:00 S Rule Namibia 1995 max - Apr Sun>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 - 1:30 - SWAT 1903 Mar # SW Africa Time + 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 2:00 1:00 SAST 1943 Mar 21 2:00 2:00 - SAST 1990 Mar 21 # independence @@ -1008,7 +1012,7 @@ Link Africa/Lagos Africa/Porto-Novo # Benin # Réunion # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis - 4:00 - RET # Réunion Time + 4:00 - +04 # # Crozet Islands also observes Réunion time; see the 'antarctica' file. # @@ -1043,7 +1047,7 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis # Seychelles # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria - 4:00 - SCT # Seychelles Time + 4:00 - +04 # From Paul Eggert (2001-05-30): # Aldabra, Farquhar, and Desroches, originally dependencies of the # Seychelles, were transferred to the British Indian Ocean Territory diff --git a/jdk/make/data/tzdata/antarctica b/jdk/make/data/tzdata/antarctica index 2398ac51b07..c88c0b4107b 100644 --- a/jdk/make/data/tzdata/antarctica +++ b/jdk/make/data/tzdata/antarctica @@ -133,7 +133,8 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13 # O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02 # Prat, -6230-05941 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09 -# These locations have always used Santiago time; use TZ='America/Santiago'. +# These locations employ Region of Magallanes time; use +# TZ='America/Punta_Arenas'. # China - year-round bases # Great Wall, King George Island, -6213-05858, since 1985-02-20 diff --git a/jdk/make/data/tzdata/asia b/jdk/make/data/tzdata/asia index ac207403859..306a2aa8bc2 100644 --- a/jdk/make/data/tzdata/asia +++ b/jdk/make/data/tzdata/asia @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2015-08-08): +# From Paul Eggert (2017-01-13): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -58,29 +58,24 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # -# I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. -# Corrections are welcome! +# The following alphabetic abbreviations appear in these tables: # std dst # LMT Local Mean Time # 2:00 EET EEST Eastern European Time # 2:00 IST IDT Israel -# 3:00 AST ADT Arabia* -# 3:30 IRST IRDT Iran* -# 4:00 GST Gulf* # 5:30 IST India -# 7:00 ICT Indochina, most times and locations* # 7:00 WIB west Indonesia (Waktu Indonesia Barat) # 8:00 WITA central Indonesia (Waktu Indonesia Tengah) # 8:00 CST China -# 8:00 IDT Indochina, 1943-45, 1947-55, 1960-75 (some locations)* -# 8:00 JWST Western Standard Time (Japan, 1896/1937)* -# 8:30 KST KDT Korea when at +0830* -# 9:00 JCST Central Standard Time (Japan, 1896/1937) +# 8:30 KST KDT Korea when at +0830 # 9:00 WIT east Indonesia (Waktu Indonesia Timur) # 9:00 JST JDT Japan # 9:00 KST KDT Korea when at +09 # 9:30 ACST Australian Central Standard Time +# Otherwise, these tables typically use numeric abbreviations like +03 +# and +0330 for integer hour and minute UTC offsets. Although earlier +# editions invented alphabetic time zone abbreviations for every +# offset, this did not reflect common practice. # # See the 'europe' file for Russia and Turkey in Asia. @@ -88,7 +83,7 @@ # Incorporates data for Singapore from Robert Elz' asia 1.1, as well as # additional information from Tom Yap, Sun Microsystems Intercontinental # Technical Support (including a page from the Official Airline Guide - -# Worldwide Edition). The names for time zones are guesses. +# Worldwide Edition). ############################################################################### @@ -109,8 +104,8 @@ Rule RussiaAsia 1996 2011 - Oct lastSun 2:00s 0 - # Afghanistan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 - 4:00 - AFT 1945 - 4:30 - AFT + 4:00 - +04 1945 + 4:30 - +0430 # Armenia # From Paul Eggert (2006-03-22): @@ -253,18 +248,17 @@ Rule Dhaka 2009 only - Dec 31 24:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct # Howrah Mean Time? - 6:30 - BURT 1942 May 15 # Burma Time - 5:30 - IST 1942 Sep - 6:30 - BURT 1951 Sep 30 - 6:00 - DACT 1971 Mar 26 # Dacca Time - 6:00 - BDT 2009 - 6:00 Dhaka BD%sT + 6:30 - +0630 1942 May 15 + 5:30 - +0530 1942 Sep + 6:30 - +0630 1951 Sep 30 + 6:00 - +06 2009 + 6:00 Dhaka +06/+07 # Bhutan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu - 5:30 - IST 1987 Oct - 6:00 - BTT # Bhutan Time + 5:30 - +0530 1987 Oct + 6:00 - +06 # British Indian Ocean Territory # Whitman and the 1995 CIA time zone map say 5:00, but the @@ -274,14 +268,14 @@ Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu # then contained the Chagos Archipelago). # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Chagos 4:49:40 - LMT 1907 - 5:00 - IOT 1996 # BIOT Time - 6:00 - IOT + 5:00 - +05 1996 + 6:00 - +06 # Brunei # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan - 7:30 - BNT 1933 - 8:00 - BNT + 7:30 - +0730 1933 + 8:00 - +08 # Burma / Myanmar @@ -290,9 +284,9 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Yangon 6:24:40 - LMT 1880 # or Rangoon 6:24:40 - RMT 1920 # Rangoon Mean Time? - 6:30 - BURT 1942 May # Burma Time - 9:00 - JST 1945 May 3 - 6:30 - MMT # Myanmar Time + 6:30 - +0630 1942 May + 9:00 - +09 1945 May 3 + 6:30 - +0630 # Cambodia # See Asia/Bangkok. @@ -355,7 +349,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D # (could be true), for the moment I am assuming that those two # counties are mistakes in the astro.com data. -# From Paul Eggert (2014-06-30): +# From Paul Eggert (2017-01-05): # Alois Treindl kindly sent me translations of the following two sources: # # (1) @@ -413,28 +407,26 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D # mainly observed in coastal areas), the five zones were: # # Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT +08:30 -# Asia/Harbin (currently a link to Asia/Shanghai) +# Now part of Asia/Shanghai; its pre-1970 times are not recorded here. # Heilongjiang (except Mohe county), Jilin # # Zhongyuan Time ("Central plain Time") UT +08 -# Asia/Shanghai +# Now part of Asia/Shanghai. # most of China -# This currently represents most other zones as well, -# as apparently these regions have been the same since 1970. # Milne gives 8:05:43.2 for Xujiahui Observatory time; round to nearest. # Guo says Shanghai switched to UT +08 "from the end of the 19th century". # -# Long-shu Time (probably due to Long and Shu being two names of the area) UT +07 -# Asia/Chongqing (currently a link to Asia/Shanghai) +# Long-shu Time (probably as Long and Shu were two names of the area) UT +07 +# Now part of Asia/Shanghai; its pre-1970 times are not recorded here. # Guangxi, Guizhou, Hainan, Ningxia, Sichuan, Shaanxi, and Yunnan; -# most of Gansu; west Inner Mongolia; west Qinghai; and the Guangdong +# most of Gansu; west Inner Mongolia; east Qinghai; and the Guangdong # counties Deqing, Enping, Kaiping, Luoding, Taishan, Xinxing, # Yangchun, Yangjiang, Yu'nan, and Yunfu. # # Xin-zang Time ("Xinjiang-Tibet Time") UT +06 -# Asia/Urumqi -# This currently represents Kunlun Time as well, -# as apparently the two regions have been the same since 1970. +# This region is now part of either Asia/Urumqi or Asia/Shanghai with +# current boundaries uncertain; times before 1970 for areas that +# disagree with Ãœrümqi or Shanghai are not recorded here. # The Gansu counties Aksay, Anxi, Dunhuang, Subei; west Qinghai; # the Guangdong counties Xuwen, Haikang, Suixi, Lianjiang, # Zhanjiang, Wuchuan, Huazhou, Gaozhou, Maoming, Dianbai, and Xinyi; @@ -445,7 +437,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D # Fukang, Kuitun, Kumukuli, Miquan, Qitai, and Turfan. # # Kunlun Time UT +05:30 -# Asia/Kashgar (currently a link to Asia/Urumqi) +# This region is now in the same status as Xin-zang Time (see above). # West Tibet, including Pulan, Aheqi, Shufu, Shule; # West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke, # Zhaosu, Tekesi, Gongliu, Chabuchaer, Huocheng, Bole, Pishan, Suiding, @@ -546,7 +538,7 @@ Zone Asia/Shanghai 8:05:43 - LMT 1901 # Xinjiang time, used by many in western China; represented by Ãœrümqi / Ãœrümchi # / Wulumuqi. (Please use Asia/Shanghai if you prefer Beijing time.) Zone Asia/Urumqi 5:50:20 - LMT 1928 - 6:00 - XJT + 6:00 - +06 # Hong Kong (Xianggang) @@ -765,30 +757,29 @@ Rule Taiwan 1979 only - Oct 1 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Taipei or Taibei or T'ai-pei Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1 - 8:00 - JWST 1937 Oct 1 + 8:00 - CST 1937 Oct 1 9:00 - JST 1945 Sep 21 1:00 8:00 Taiwan C%sT # Macau (Macao, Aomen) # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 S -Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 - -Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 S -Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 S -Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 S -Rule Macau 1965 only - Oct 31 0:00 0 - -Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 S -Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 - -Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 S -Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 - -Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 - -Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 S -Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 S -Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 - +Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 D +Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 S +Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 D +Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 D +Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 D +Rule Macau 1965 only - Oct 31 0:00 0 S +Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 D +Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 S +Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 D +Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 S +Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 S +Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 D +Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 D +Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Macau 7:34:20 - LMT 1912 Jan 1 - 8:00 Macau MO%sT 1999 Dec 20 # return to China - 8:00 PRC C%sT + 8:00 Macau C%sT ############################################################################### @@ -904,11 +895,10 @@ Zone Asia/Tbilisi 2:59:11 - LMT 1880 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 - 8:00 - TLT 1942 Feb 21 23:00 # E Timor Time - 9:00 - JST 1945 Sep 23 - 9:00 - TLT 1976 May 3 - 8:00 - WITA 2000 Sep 17 0:00 - 9:00 - TLT + 8:00 - +08 1942 Feb 21 23:00 + 9:00 - +09 1976 May 3 + 8:00 - +08 2000 Sep 17 0:00 + 9:00 - +09 # India @@ -923,9 +913,9 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata 5:53:20 - HMT 1941 Oct # Howrah Mean Time? - 6:30 - BURT 1942 May 15 # Burma Time + 6:30 - +0630 1942 May 15 5:30 - IST 1942 Sep - 5:30 1:00 IST 1945 Oct 15 + 5:30 1:00 +0630 1945 Oct 15 5:30 - IST # The following are like Asia/Kolkata: # Andaman Is @@ -976,33 +966,33 @@ Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, # but this must be a typo. 7:07:12 - BMT 1923 Dec 31 23:47:12 # Batavia - 7:20 - JAVT 1932 Nov # Java Time - 7:30 - WIB 1942 Mar 23 - 9:00 - JST 1945 Sep 23 - 7:30 - WIB 1948 May - 8:00 - WIB 1950 May - 7:30 - WIB 1964 + 7:20 - +0720 1932 Nov + 7:30 - +0730 1942 Mar 23 + 9:00 - +09 1945 Sep 23 + 7:30 - +0730 1948 May + 8:00 - +08 1950 May + 7:30 - +0730 1964 7:00 - WIB # west and central Borneo Zone Asia/Pontianak 7:17:20 - LMT 1908 May 7:17:20 - PMT 1932 Nov # Pontianak MT - 7:30 - WIB 1942 Jan 29 - 9:00 - JST 1945 Sep 23 - 7:30 - WIB 1948 May - 8:00 - WIB 1950 May - 7:30 - WIB 1964 + 7:30 - +0730 1942 Jan 29 + 9:00 - +09 1945 Sep 23 + 7:30 - +0730 1948 May + 8:00 - +08 1950 May + 7:30 - +0730 1964 8:00 - WITA 1988 Jan 1 7:00 - WIB # Sulawesi, Lesser Sundas, east and south Borneo Zone Asia/Makassar 7:57:36 - LMT 1920 7:57:36 - MMT 1932 Nov # Macassar MT - 8:00 - WITA 1942 Feb 9 - 9:00 - JST 1945 Sep 23 + 8:00 - +08 1942 Feb 9 + 9:00 - +09 1945 Sep 23 8:00 - WITA # Maluku Islands, West Papua, Papua Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov - 9:00 - WIT 1944 Sep 1 - 9:30 - ACST 1964 + 9:00 - +09 1944 Sep 1 + 9:30 - +0930 1964 9:00 - WIT # Iran @@ -1034,8 +1024,6 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov # for at least the last 5 years. Before that, for a few years, the # date used was the first Thursday night of Farvardin and the last # Thursday night of Shahrivar, but I can't give exact dates.... -# I have also changed the abbreviations to what is considered correct -# here in Iran, IRST for regular time and IRDT for daylight saving time. # # From Roozbeh Pournader (2005-04-05): # The text of the Iranian law, in effect since 1925, clearly mentions @@ -1142,9 +1130,9 @@ Rule Iran 2036 max - Sep 21 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time - 3:30 - IRST 1977 Nov - 4:00 Iran IR%sT 1979 - 3:30 Iran IR%sT + 3:30 - +0330 1977 Nov + 4:00 Iran +04/+05 1979 + 3:30 Iran +0330/+0430 # Iraq @@ -1187,8 +1175,8 @@ Rule Iraq 1991 2007 - Oct 1 3:00s 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Baghdad 2:57:40 - LMT 1890 2:57:36 - BMT 1918 # Baghdad Mean Time? - 3:00 - AST 1982 May - 3:00 Iraq A%sT + 3:00 - +03 1982 May + 3:00 Iraq +03/+04 ############################################################################### @@ -1487,8 +1475,6 @@ Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u - 9:00 - JST 1896 Jan 1 - 9:00 - JCST 1937 Oct 1 9:00 Japan J%sT # Since 1938, all Japanese possessions have been like Asia/Tokyo. @@ -1764,7 +1750,23 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # Kazakh 1992-01-13 act appears to provide the same rules and 1992-03-27 # act was to be enacted on the last Sunday of March 1992. -# From Paul Eggert (2016-11-07): +# From Stepan Golosunov (2016-11-08): +# Turgai reorganization should affect only southern part of Qostanay +# oblast. Which should probably be separated into Asia/Arkalyk zone. +# (There were also 1970, 1988 and 1990 Turgai oblast reorganizations +# according to wikipedia.) +# +# [For Qostanay] http://www.ng.kz/gazeta/195/hranit/ +# suggests that clocks were to be moved 40 minutes backwards on +# 1920-01-01 to the fourth time belt. But I do not understand +# how that could happen.... +# +# [For Atyrau and Oral] 1919 decree +# (http://www.worldtimezone.com/dst_news/dst_news_russia-1919-02-08.html +# and in Byalokoz) lists Ural river (plus 10 versts on its left bank) in +# the third time belt (before 1930 this means +03). + +# From Paul Eggert (2016-12-06): # The tables below reflect Golosunov's remarks, with exceptions as noted. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1794,7 +1796,7 @@ Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2 6:00 - +06 # The following zone is like Asia/Qyzylorda except for being one # hour earlier from 1991-09-29 to 1992-03-29. The 1991/2 rules for -# Qostenay are unclear partly because of the 1997 Turgai +# Qostanay are unclear partly because of the 1997 Turgai # reorganization, so this zone is commented out for now. #Zone Asia/Qostanay 4:14:20 - LMT 1924 May 2 # 4:00 - +04 1930 Jun 21 @@ -1831,7 +1833,7 @@ Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2 # AtyraÅ« (KZ-ATY) is like MangghystaÅ« except it switched from # +04/+05 to +05/+06 in spring 1999, not fall 1994. Zone Asia/Atyrau 3:27:44 - LMT 1924 May 2 - 4:00 - +04 1930 Jun 21 + 3:00 - +03 1930 Jun 21 5:00 - +05 1981 Oct 1 6:00 - +06 1982 Apr 1 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s @@ -1843,7 +1845,7 @@ Zone Asia/Atyrau 3:27:44 - LMT 1924 May 2 # From Paul Eggert (2016-03-18): # The 1989 transition is from USSR act No. 227 (1989-03-14). Zone Asia/Oral 3:25:24 - LMT 1924 May 2 # or Ural'sk - 4:00 - +04 1930 Jun 21 + 3:00 - +03 1930 Jun 21 5:00 - +05 1981 Apr 1 5:00 1:00 +06 1981 Oct 1 6:00 - +06 1982 Apr 1 @@ -1949,14 +1951,12 @@ Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 8:30 - KST 1912 Jan 1 - 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 8:30 - KST 1912 Jan 1 - 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Aug 24 9:00 - KST 2015 Aug 15 00:00 8:30 - KST @@ -2011,30 +2011,29 @@ Rule NBorneo 1935 1941 - Dec 14 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kuala_Lumpur 6:46:46 - LMT 1901 Jan 1 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. - 7:00 - MALT 1933 Jan 1 # Malaya Time - 7:00 0:20 MALST 1936 Jan 1 - 7:20 - MALT 1941 Sep 1 - 7:30 - MALT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 7:30 - MALT 1982 Jan 1 - 8:00 - MYT # Malaysia Time + 7:00 - +07 1933 Jan 1 + 7:00 0:20 +0720 1936 Jan 1 + 7:20 - +0720 1941 Sep 1 + 7:30 - +0730 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 7:30 - +0730 1982 Jan 1 + 8:00 - +08 # Sabah & Sarawak # From Paul Eggert (2014-08-12): # The data entries here are mostly from Shanks & Pottenger, but the 1942, 1945 # and 1982 transition dates are from Mok Ly Yng. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kuching 7:21:20 - LMT 1926 Mar - 7:30 - BORT 1933 # Borneo Time - 8:00 NBorneo BOR%sT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 8:00 - BORT 1982 Jan 1 - 8:00 - MYT + 7:30 - +0730 1933 + 8:00 NBorneo +08/+0820 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 8:00 - +08 # Maldives # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Maldives 4:54:00 - LMT 1880 # Male 4:54:00 - MMT 1960 # Male Mean Time - 5:00 - MVT # Maldives Time + 5:00 - +05 # Mongolia @@ -2161,37 +2160,41 @@ Rule Mongol 1983 only - Oct 1 0:00 0 - # correction of 02:00 (in the previous edition) not being done correctly # in the latest edition; so ignore it for now. +# From Ganbold Tsagaankhuu (2017-02-09): +# Mongolian Government meeting has concluded today to cancel daylight +# saving time adoption in Mongolia. Source: http://zasag.mn/news/view/16192 + Rule Mongol 1985 1998 - Mar lastSun 0:00 1:00 S Rule Mongol 1984 1998 - Sep lastSun 0:00 0 - # IATA SSIM (1999-09) says Mongolia no longer observes DST. Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S -Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S -Rule Mongol 2015 max - Sep lastSat 0:00 0 - +Rule Mongol 2015 2016 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 2016 - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta Zone Asia/Hovd 6:06:36 - LMT 1905 Aug - 6:00 - HOVT 1978 # Hovd Time - 7:00 Mongol HOV%sT + 6:00 - +06 1978 + 7:00 Mongol +07/+08 # Ulaanbaatar, a.k.a. Ulan Bataar, Ulan Bator, Urga Zone Asia/Ulaanbaatar 7:07:32 - LMT 1905 Aug - 7:00 - ULAT 1978 # Ulaanbaatar Time - 8:00 Mongol ULA%sT + 7:00 - +07 1978 + 8:00 Mongol +08/+09 # Choibalsan, a.k.a. Bajan Tümen, Bajan Tumen, Chojbalsan, # Choybalsan, Sanbejse, Tchoibalsan Zone Asia/Choibalsan 7:38:00 - LMT 1905 Aug - 7:00 - ULAT 1978 - 8:00 - ULAT 1983 Apr - 9:00 Mongol CHO%sT 2008 Mar 31 # Choibalsan Time - 8:00 Mongol CHO%sT + 7:00 - +07 1978 + 8:00 - +08 1983 Apr + 9:00 Mongol +09/+10 2008 Mar 31 + 8:00 Mongol +08/+09 # Nepal # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kathmandu 5:41:16 - LMT 1920 - 5:30 - IST 1986 - 5:45 - NPT # Nepal Time + 5:30 - +0530 1986 + 5:45 - +0545 # Oman # See Asia/Dubai. @@ -2340,10 +2343,10 @@ Rule Pakistan 2009 only - Apr 15 0:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Karachi 4:28:12 - LMT 1907 - 5:30 - IST 1942 Sep - 5:30 1:00 IST 1945 Oct 15 - 5:30 - IST 1951 Sep 30 - 5:00 - KART 1971 Mar 26 # Karachi Time + 5:30 - +0530 1942 Sep + 5:30 1:00 +0630 1945 Oct 15 + 5:30 - +0530 1951 Sep 30 + 5:00 - +05 1971 Mar 26 5:00 Pakistan PK%sT # Pakistan Time # Palestine @@ -2708,15 +2711,15 @@ Rule Phil 1978 only - Sep 21 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31 8:04:00 - LMT 1899 May 11 - 8:00 Phil PH%sT 1942 May - 9:00 - JST 1944 Nov - 8:00 Phil PH%sT + 8:00 Phil +08/+09 1942 May + 9:00 - +09 1944 Nov + 8:00 Phil +08/+09 # Qatar # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha - 4:00 - GST 1972 Jun - 3:00 - AST + 4:00 - +04 1972 Jun + 3:00 - +03 Link Asia/Qatar Asia/Bahrain # Saudi Arabia @@ -2743,7 +2746,7 @@ Link Asia/Qatar Asia/Bahrain # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 - 3:00 - AST + 3:00 - +03 Link Asia/Riyadh Asia/Aden # Yemen Link Asia/Riyadh Asia/Kuwait @@ -2753,14 +2756,13 @@ Link Asia/Riyadh Asia/Kuwait # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. - 7:00 - MALT 1933 Jan 1 # Malaya Time - 7:00 0:20 MALST 1936 Jan 1 - 7:20 - MALT 1941 Sep 1 - 7:30 - MALT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 7:30 - MALT 1965 Aug 9 # independence - 7:30 - SGT 1982 Jan 1 # Singapore Time - 8:00 - SGT + 7:00 - +07 1933 Jan 1 + 7:00 0:20 +0720 1936 Jan 1 + 7:20 - +0720 1941 Sep 1 + 7:30 - +0730 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 7:30 - +0730 1982 Jan 1 + 8:00 - +08 # Spratly Is # no information @@ -2819,8 +2821,8 @@ Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1 Zone Asia/Colombo 5:19:24 - LMT 1880 5:19:32 - MMT 1906 # Moratuwa Mean Time 5:30 - +0530 1942 Jan 5 - 5:30 0:30 +0530/+06 1942 Sep - 5:30 1:00 +0530/+0630 1945 Oct 16 2:00 + 5:30 0:30 +06 1942 Sep + 5:30 1:00 +0630 1945 Oct 16 2:00 5:30 - +0530 1996 May 25 0:00 6:30 - +0630 1996 Oct 26 0:30 6:00 - +06 2006 Apr 15 0:30 @@ -3002,7 +3004,7 @@ Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Bangkok 6:42:04 - LMT 1880 6:42:04 - BMT 1920 Apr # Bangkok Mean Time - 7:00 - ICT + 7:00 - +07 Link Asia/Bangkok Asia/Phnom_Penh # Cambodia Link Asia/Bangkok Asia/Vientiane # Laos @@ -3018,7 +3020,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 May 2 # or Ashkhabad # United Arab Emirates # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 - 4:00 - GST + 4:00 - +04 Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan @@ -3091,15 +3093,15 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1 - 7:06:30 - PLMT 1911 May 1 - 7:00 - ICT 1942 Dec 31 23:00 - 8:00 - IDT 1945 Mar 14 23:00 - 9:00 - JST 1945 Sep 2 - 7:00 - ICT 1947 Apr 1 - 8:00 - IDT 1955 Jul 1 - 7:00 - ICT 1959 Dec 31 23:00 - 8:00 - IDT 1975 Jun 13 - 7:00 - ICT + 7:06:30 - PLMT 1911 May 1 # Phù Liá»…n MT + 7:00 - +07 1942 Dec 31 23:00 + 8:00 - +08 1945 Mar 14 23:00 + 9:00 - +09 1945 Sep 2 + 7:00 - +07 1947 Apr 1 + 8:00 - +08 1955 Jul 1 + 7:00 - +07 1959 Dec 31 23:00 + 8:00 - +08 1975 Jun 13 + 7:00 - +07 # Yemen # See Asia/Riyadh. diff --git a/jdk/make/data/tzdata/australasia b/jdk/make/data/tzdata/australasia index 81ef5215942..db7e7f7bcb2 100644 --- a/jdk/make/data/tzdata/australasia +++ b/jdk/make/data/tzdata/australasia @@ -67,8 +67,8 @@ Zone Australia/Perth 7:43:24 - LMT 1895 Dec 8:00 Aus AW%sT 1943 Jul 8:00 AW AW%sT Zone Australia/Eucla 8:35:28 - LMT 1895 Dec - 8:45 Aus ACW%sT 1943 Jul - 8:45 AW ACW%sT + 8:45 Aus +0845/+0945 1943 Jul + 8:45 AW +0845/+0945 # Queensland # @@ -235,7 +235,8 @@ Rule LH 2008 max - Apr Sun>=1 2:00 0 S Rule LH 2008 max - Oct Sun>=1 2:00 0:30 D Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb 10:00 - AEST 1981 Mar - 10:30 LH LH%sT + 10:30 LH +1030/+1130 1985 Jul + 10:30 LH +1030/+11 # Australian miscellany # @@ -273,19 +274,19 @@ Zone Antarctica/Macquarie 0 - -00 1899 Nov 0 - -00 1948 Mar 25 10:00 Aus AE%sT 1967 10:00 AT AE%sT 2010 Apr 4 3:00 - 11:00 - MIST # Macquarie I Standard Time + 11:00 - +11 # Christmas # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Christmas 7:02:52 - LMT 1895 Feb - 7:00 - CXT # Christmas Island Time + 7:00 - +07 # Cocos (Keeling) Is # These islands were ruled by the Ross family from about 1830 to 1978. # We don't know when standard time was introduced; for now, we guess 1900. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Cocos 6:27:40 - LMT 1900 - 6:30 - CCT # Cocos Islands Time + 6:30 - +0630 # Fiji @@ -398,16 +399,16 @@ Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 S Rule Fiji 2015 max - Jan Sun>=15 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva - 12:00 Fiji FJ%sT # Fiji Time + 12:00 Fiji +12/+13 # French Polynesia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Gambier -8:59:48 - LMT 1912 Oct # Rikitea - -9:00 - GAMT # Gambier Time + -9:00 - -09 Zone Pacific/Marquesas -9:18:00 - LMT 1912 Oct - -9:30 - MART # Marquesas Time + -9:30 - -0930 Zone Pacific/Tahiti -9:58:16 - LMT 1912 Oct # Papeete - -10:00 - TAHT # Tahiti Time + -10:00 - -10 # Clipperton (near North America) is administered from French Polynesia; # it is uninhabited. @@ -422,15 +423,15 @@ Link Pacific/Guam Pacific/Saipan # N Mariana Is # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Tarawa 11:32:04 - LMT 1901 # Bairiki - 12:00 - GILT # Gilbert Is Time + 12:00 - +12 Zone Pacific/Enderbury -11:24:20 - LMT 1901 - -12:00 - PHOT 1979 Oct # Phoenix Is Time - -11:00 - PHOT 1995 - 13:00 - PHOT + -12:00 - -12 1979 Oct + -11:00 - -11 1995 + 13:00 - +13 Zone Pacific/Kiritimati -10:29:20 - LMT 1901 - -10:40 - LINT 1979 Oct # Line Is Time - -10:00 - LINT 1995 - 14:00 - LINT + -10:40 - -1040 1979 Oct + -10:00 - -10 1995 + 14:00 - +14 # N Mariana Is # See Pacific/Guam. @@ -438,31 +439,31 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 1901 # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Majuro 11:24:48 - LMT 1901 - 11:00 - MHT 1969 Oct # Marshall Islands Time - 12:00 - MHT + 11:00 - +11 1969 Oct + 12:00 - +12 Zone Pacific/Kwajalein 11:09:20 - LMT 1901 - 11:00 - MHT 1969 Oct - -12:00 - KWAT 1993 Aug 20 # Kwajalein Time - 12:00 - MHT + 11:00 - +11 1969 Oct + -12:00 - -12 1993 Aug 20 + 12:00 - +12 # Micronesia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Chuuk 10:07:08 - LMT 1901 - 10:00 - CHUT # Chuuk Time + 10:00 - +10 Zone Pacific/Pohnpei 10:32:52 - LMT 1901 # Kolonia - 11:00 - PONT # Pohnpei Time + 11:00 - +11 Zone Pacific/Kosrae 10:51:56 - LMT 1901 - 11:00 - KOST 1969 Oct # Kosrae Time - 12:00 - KOST 1999 - 11:00 - KOST + 11:00 - +11 1969 Oct + 12:00 - +12 1999 + 11:00 - +11 # Nauru # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Nauru 11:07:40 - LMT 1921 Jan 15 # Uaobe - 11:30 - NRT 1942 Mar 15 # Nauru Time - 9:00 - JST 1944 Aug 15 - 11:30 - NRT 1979 May - 12:00 - NRT + 11:30 - +1130 1942 Mar 15 + 9:00 - +09 1944 Aug 15 + 11:30 - +1130 1979 May + 12:00 - +12 # New Caledonia # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -473,7 +474,7 @@ Rule NC 1996 only - Dec 1 2:00s 1:00 S Rule NC 1997 only - Mar 2 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Noumea 11:05:48 - LMT 1912 Jan 13 # Nouméa - 11:00 NC NC%sT + 11:00 NC +11/+12 ############################################################################### @@ -514,8 +515,8 @@ Zone Pacific/Auckland 11:39:04 - LMT 1868 Nov 2 11:30 NZ NZ%sT 1946 Jan 1 12:00 NZ NZ%sT Zone Pacific/Chatham 12:13:48 - LMT 1868 Nov 2 - 12:15 - CHAST 1946 Jan 1 - 12:45 Chatham CHA%sT + 12:15 - +1215 1946 Jan 1 + 12:45 Chatham +1245/+1345 Link Pacific/Auckland Antarctica/McMurdo @@ -537,8 +538,8 @@ Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua - -10:30 - CKT 1978 Nov 12 # Cook Is Time - -10:00 Cook CK%sT + -10:30 - -1030 1978 Nov 12 + -10:00 Cook -10/-0930 ############################################################################### @@ -546,29 +547,29 @@ Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua # Niue # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi - -11:20 - NUT 1951 # Niue Time - -11:30 - NUT 1978 Oct 1 - -11:00 - NUT + -11:20 - -1120 1951 + -11:30 - -1130 1978 Oct 1 + -11:00 - -11 # Norfolk # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston - 11:12 - NMT 1951 # Norfolk Mean Time - 11:30 - NFT 1974 Oct 27 02:00 # Norfolk T. - 11:30 1:00 NFST 1975 Mar 2 02:00 - 11:30 - NFT 2015 Oct 4 02:00 - 11:00 - NFT + 11:12 - +1112 1951 + 11:30 - +1130 1974 Oct 27 02:00 + 11:30 1:00 +1230 1975 Mar 2 02:00 + 11:30 - +1130 2015 Oct 4 02:00 + 11:00 - +11 # Palau (Belau) # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Palau 8:57:56 - LMT 1901 # Koror - 9:00 - PWT # Palau Time + 9:00 - +09 # Papua New Guinea # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 9:48:32 - PMMT 1895 # Port Moresby Mean Time - 10:00 - PGT # Papua New Guinea Time + 10:00 - +10 # # From Paul Eggert (2014-10-13): # Base the Bougainville entry on the Arawa-Kieta region, which appears to have @@ -583,28 +584,26 @@ Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 # and seem to have controlled it until their 1945-08-21 surrender. # # The Autonomous Region of Bougainville switched from UT +10 to +11 -# on 2014-12-28 at 02:00. They call +11 "Bougainville Standard Time"; -# abbreviate this as BST. See: +# on 2014-12-28 at 02:00. They call +11 "Bougainville Standard Time". +# See: # http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/ # Zone Pacific/Bougainville 10:22:16 - LMT 1880 9:48:32 - PMMT 1895 - 10:00 - PGT 1942 Jul - 9:00 - JST 1945 Aug 21 - 10:00 - PGT 2014 Dec 28 2:00 - 11:00 - BST + 10:00 - +10 1942 Jul + 9:00 - +09 1945 Aug 21 + 10:00 - +10 2014 Dec 28 2:00 + 11:00 - +11 # Pitcairn # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Pitcairn -8:40:20 - LMT 1901 # Adamstown - -8:30 - PNT 1998 Apr 27 0:00 - -8:00 - PST # Pitcairn Standard Time + -8:30 - -0830 1998 Apr 27 0:00 + -8:00 - -08 # American Samoa Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 -11:22:48 - LMT 1911 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands @@ -685,17 +684,17 @@ Rule WS 2012 max - Sep lastSun 3:00 1 D # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 - -11:30 - WSST 1950 - -11:00 WS S%sT 2011 Dec 29 24:00 # S=Samoa - 13:00 WS WS%sT + -11:30 - -1130 1950 + -11:00 WS -11/-10 2011 Dec 29 24:00 + 13:00 WS +13/+14 # Solomon Is # excludes Bougainville, for which see Papua New Guinea # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara - 11:00 - SBT # Solomon Is Time + 11:00 - +11 -# Tokelau Is +# Tokelau # # From Gwillim Law (2011-12-29) # A correspondent informed me that Tokelau, like Samoa, will be skipping @@ -716,8 +715,8 @@ Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fakaofo -11:24:56 - LMT 1901 - -11:00 - TKT 2011 Dec 30 # Tokelau Time - 13:00 - TKT + -11:00 - -11 2011 Dec 30 + 13:00 - +13 # Tonga # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -736,7 +735,7 @@ Zone Pacific/Tongatapu 12:19:20 - LMT 1901 # Tuvalu # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Funafuti 11:56:52 - LMT 1901 - 12:00 - TVT # Tuvalu Time + 12:00 - +12 # US minor outlying islands @@ -760,10 +759,11 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901 # Johnston # -# From Paul Eggert (2014-03-11): +# From Paul Eggert (2017-02-10): # Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. # Details are uncertain. We have no data for Johnston after 1970, so -# treat it like Hawaii for now. +# treat it like Hawaii for now. Since Johnston is now uninhabited, +# its link to Pacific/Honolulu is in the 'backward' file. # # In his memoirs of June 6th to October 4, 1945 # (2005), Herbert C. Bach writes, @@ -783,8 +783,6 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901 # See the table on page 4 where he lists GMT and local times for the tests; a # footnote for the JI tests reads that local time is "JI time = Hawaii Time # Minus One Hour". -# -# See 'northamerica' for Pacific/Johnston. # Kingman # uninhabited @@ -798,7 +796,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901 # Wake # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Wake 11:06:28 - LMT 1901 - 12:00 - WAKT # Wake Time + 12:00 - +12 # Vanuatu @@ -811,12 +809,12 @@ Rule Vanuatu 1992 1993 - Jan Sun>=23 0:00 0 - Rule Vanuatu 1992 only - Oct Sun>=23 0:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila - 11:00 Vanuatu VU%sT # Vanuatu Time + 11:00 Vanuatu +11/+12 # Wallis and Futuna # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Wallis 12:15:20 - LMT 1901 - 12:00 - WFT # Wallis & Futuna Time + 12:00 - +12 ############################################################################### @@ -827,15 +825,15 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -852,28 +850,19 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # -# I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. +# The following abbreviations are from other sources. # Corrections are welcome! # std dst # LMT Local Mean Time # 8:00 AWST AWDT Western Australia -# 8:45 ACWST ACWDT Central Western Australia* -# 9:00 JST Japan # 9:30 ACST ACDT Central Australia # 10:00 AEST AEDT Eastern Australia +# 10:00 GST Guam through 2000 # 10:00 ChST Chamorro -# 10:30 LHST LHDT Lord Howe* -# 11:00 BST Bougainville* # 11:30 NZMT NZST New Zealand through 1945 # 12:00 NZST NZDT New Zealand 1946-present -# 12:15 CHAST Chatham through 1945* -# 12:45 CHAST CHADT Chatham 1946-present* -# 13:00 WSST WSDT (western) Samoa 2011-present* -# -11:30 WSST Western Samoa through 1950* # -11:00 SST Samoa # -10:00 HST Hawaii -# - 8:00 PST Pitcairn* # # See the 'northamerica' file for Hawaii. # See the 'southamerica' file for Easter I and the Galápagos Is. diff --git a/jdk/make/data/tzdata/backward b/jdk/make/data/tzdata/backward index ec96c7e39f6..b4cf3be2d34 100644 --- a/jdk/make/data/tzdata/backward +++ b/jdk/make/data/tzdata/backward @@ -119,6 +119,7 @@ Link Pacific/Auckland NZ Link Pacific/Chatham NZ-CHAT Link America/Denver Navajo Link Asia/Shanghai PRC +Link Pacific/Honolulu Pacific/Johnston Link Pacific/Pohnpei Pacific/Ponape Link Pacific/Pago_Pago Pacific/Samoa Link Pacific/Chuuk Pacific/Truk diff --git a/jdk/make/data/tzdata/europe b/jdk/make/data/tzdata/europe index 9cede59acda..0d8a40e4f37 100644 --- a/jdk/make/data/tzdata/europe +++ b/jdk/make/data/tzdata/europe @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -79,26 +79,23 @@ # History of Summer Time # # (1998-09-21, in Portuguese) - # # I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. -# Corrections are welcome! -# std dst 2dst -# LMT Local Mean Time -# -4:00 AST ADT Atlantic -# -3:00 WGT WGST Western Greenland* -# -1:00 EGT EGST Eastern Greenland* -# 0:00 GMT BST BDST Greenwich, British Summer -# 0:00 GMT IST Greenwich, Irish Summer -# 0:00 WET WEST WEMT Western Europe -# 0:19:32.13 AMT NST Amsterdam, Netherlands Summer (1835-1937)* -# 0:20 NET NEST Netherlands (1937-1940)* -# 1:00 BST British Standard (1968-1971) -# 1:00 CET CEST CEMT Central Europe -# 1:00:14 SET Swedish (1879-1899)* -# 2:00 EET EEST Eastern Europe -# 3:00 MSK MSD Moscow +# the rest are variants of the "xMT" pattern for a city's mean time, +# or are from other sources. Corrections are welcome! +# std dst 2dst +# LMT Local Mean Time +# -4:00 AST ADT Atlantic +# 0:00 GMT BST BDST Greenwich, British Summer +# 0:00 GMT IST Greenwich, Irish Summer +# 0:00 WET WEST WEMT Western Europe +# 0:19:32.13 AMT* NST* Amsterdam, Netherlands Summer (1835-1937) +# 1:00 BST British Standard (1968-1971) +# 1:00 CET CEST CEMT Central Europe +# 1:00:14 SET Swedish (1879-1899) +# 1:36:34 RMT* LST* Riga, Latvian Summer (1880-1926)* +# 2:00 EET EEST Eastern Europe +# 3:00 MSK MSD MDST* Moscow # From Peter Ilieve (1994-12-04), # The original six [EU members]: Belgium, France, (West) Germany, Italy, @@ -498,7 +495,7 @@ Link Europe/London Europe/Isle_of_Man # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 - -0:25:21 - DMT 1916 May 21 2:00 + -0:25:21 - DMT 1916 May 21 2:00 # Dublin MT -0:25:21 1:00 IST 1916 Oct 1 2:00s 0:00 GB-Eire %s 1921 Dec 6 # independence 0:00 GB-Eire GMT/IST 1940 Feb 25 2:00 @@ -1087,16 +1084,16 @@ Rule Thule 2007 max - Nov Sun>=1 2:00 0 S # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Danmarkshavn -1:14:40 - LMT 1916 Jul 28 - -3:00 - WGT 1980 Apr 6 2:00 - -3:00 EU WG%sT 1996 + -3:00 - -03 1980 Apr 6 2:00 + -3:00 EU -03/-02 1996 0:00 - GMT Zone America/Scoresbysund -1:27:52 - LMT 1916 Jul 28 # Ittoqqortoormiit - -2:00 - CGT 1980 Apr 6 2:00 - -2:00 C-Eur CG%sT 1981 Mar 29 - -1:00 EU EG%sT + -2:00 - -02 1980 Apr 6 2:00 + -2:00 C-Eur -02/-01 1981 Mar 29 + -1:00 EU -01/+00 Zone America/Godthab -3:26:56 - LMT 1916 Jul 28 # Nuuk - -3:00 - WGT 1980 Apr 6 2:00 - -3:00 EU WG%sT + -3:00 - -03 1980 Apr 6 2:00 + -3:00 EU -03/-02 Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base -4:00 Thule A%sT @@ -1511,7 +1508,7 @@ Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Reykjavik -1:28 - LMT 1908 - -1:00 Iceland IS%sT 1968 Apr 7 1:00s + -1:00 Iceland -01/+00 1968 Apr 7 1:00s 0:00 - GMT # Italy @@ -1975,7 +1972,7 @@ Rule Neth 1945 only - Sep 16 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Amsterdam 0:19:32 - LMT 1835 0:19:32 Neth %s 1937 Jul 1 - 0:20 Neth NE%sT 1940 May 16 0:00 # Dutch Time + 0:20 Neth +0020/+0120 1940 May 16 0:00 1:00 C-Eur CE%sT 1945 Apr 2 2:00 1:00 Neth CE%sT 1977 1:00 EU CE%sT @@ -2192,16 +2189,34 @@ Zone Europe/Lisbon -0:36:45 - LMT 1884 0:00 W-Eur WE%sT 1992 Sep 27 1:00s 1:00 EU CE%sT 1996 Mar 31 1:00u 0:00 EU WE%sT +# This Zone can be simplified once we assume zic %z. Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada -1:54:32 - HMT 1912 Jan 1 # Horta Mean Time - -2:00 Port AZO%sT 1966 Apr 3 2:00 # Azores Time - -1:00 Port AZO%sT 1983 Sep 25 1:00s - -1:00 W-Eur AZO%sT 1992 Sep 27 1:00s + -2:00 Port -02/-01 1942 Apr 25 22:00s + -2:00 Port +00 1942 Aug 15 22:00s + -2:00 Port -02/-01 1943 Apr 17 22:00s + -2:00 Port +00 1943 Aug 28 22:00s + -2:00 Port -02/-01 1944 Apr 22 22:00s + -2:00 Port +00 1944 Aug 26 22:00s + -2:00 Port -02/-01 1945 Apr 21 22:00s + -2:00 Port +00 1945 Aug 25 22:00s + -2:00 Port -02/-01 1966 Apr 3 2:00 + -1:00 Port -01/+00 1983 Sep 25 1:00s + -1:00 W-Eur -01/+00 1992 Sep 27 1:00s 0:00 EU WE%sT 1993 Mar 28 1:00u - -1:00 EU AZO%sT + -1:00 EU -01/+00 +# This Zone can be simplified once we assume zic %z. Zone Atlantic/Madeira -1:07:36 - LMT 1884 # Funchal -1:07:36 - FMT 1912 Jan 1 # Funchal Mean Time - -1:00 Port MAD%sT 1966 Apr 3 2:00 # Madeira Time + -1:00 Port -01/+00 1942 Apr 25 22:00s + -1:00 Port +01 1942 Aug 15 22:00s + -1:00 Port -01/+00 1943 Apr 17 22:00s + -1:00 Port +01 1943 Aug 28 22:00s + -1:00 Port -01/+00 1944 Apr 22 22:00s + -1:00 Port +01 1944 Aug 26 22:00s + -1:00 Port -01/+00 1945 Apr 21 22:00s + -1:00 Port +01 1945 Aug 25 22:00s + -1:00 Port -01/+00 1966 Apr 3 2:00 0:00 Port WE%sT 1983 Sep 25 1:00s 0:00 EU WE%sT @@ -2559,10 +2574,8 @@ Zone Europe/Moscow 2:30:17 - LMT 1880 3:00 - MSK -# From Tim Parenti (2014-07-03): -# Europe/Simferopol covers... -# ** **** Crimea, Republic of -# ** **** Sevastopol +# From Paul Eggert (2016-12-06): +# Europe/Simferopol covers Crimea. Zone Europe/Simferopol 2:16:24 - LMT 1880 2:16 - SMT 1924 May 2 # Simferopol Mean T @@ -3255,46 +3268,77 @@ Link Europe/Prague Europe/Bratislava # See Europe/Belgrade. # Spain +# +# From Paul Eggert (2016-12-14): +# +# The source for Europe/Madrid before 2013 is: +# Planesas P. La hora oficial en España y sus cambios. +# Anuario del Observatorio Astronómico de Madrid (2013, in Spanish). +# http://astronomia.ign.es/rknowsys-theme/images/webAstro/paginas/documentos/Anuario/lahoraoficialenespana.pdf +# As this source says that historical time in the Canaries is obscure, +# and it does not discuss Ceuta, stick with Shanks for now for that data. +# +# In the 1918 and 1919 fallback transitions in Spain, the clock for +# the hour-longer day officially kept going after midnight, so that +# the repeated instances of that day's 00:00 hour were 24 hours apart, +# with a fallback transition from the second occurrence of 00:59... to +# the next day's 00:00. Our data format cannot represent this +# directly, and instead repeats the first hour of the next day, with a +# fallback transition from the next day's 00:59... to 00:00. + +# From Michael Deckers (2016-12-15): +# The Royal Decree of 1900-06-26 quoted by Planesas, online at +# https://www.boe.es/datos/pdfs/BOE//1900/209/A00383-00384.pdf +# says in its article 5 (my translation): +# These dispositions will enter into force beginning with the +# instant at which, according to the time indicated in article 1, +# the 1st day of January of 1901 will begin. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -# For 1917-1919 Whitman gives Apr Sat>=1 - Oct Sat>=1; -# go with Shanks & Pottenger. -Rule Spain 1917 only - May 5 23:00s 1:00 S -Rule Spain 1917 1919 - Oct 6 23:00s 0 - -Rule Spain 1918 only - Apr 15 23:00s 1:00 S -Rule Spain 1919 only - Apr 5 23:00s 1:00 S -# Whitman gives 1921 Feb 28 - Oct 14; go with Shanks & Pottenger. -Rule Spain 1924 only - Apr 16 23:00s 1:00 S -# Whitman gives 1924 Oct 14; go with Shanks & Pottenger. -Rule Spain 1924 only - Oct 4 23:00s 0 - -Rule Spain 1926 only - Apr 17 23:00s 1:00 S -# Whitman says no DST in 1929; go with Shanks & Pottenger. -Rule Spain 1926 1929 - Oct Sat>=1 23:00s 0 - -Rule Spain 1927 only - Apr 9 23:00s 1:00 S -Rule Spain 1928 only - Apr 14 23:00s 1:00 S -Rule Spain 1929 only - Apr 20 23:00s 1:00 S -# Whitman gives 1937 Jun 16, 1938 Apr 16, 1940 Apr 13; -# go with Shanks & Pottenger. -Rule Spain 1937 only - May 22 23:00s 1:00 S -Rule Spain 1937 1939 - Oct Sat>=1 23:00s 0 - -Rule Spain 1938 only - Mar 22 23:00s 1:00 S -Rule Spain 1939 only - Apr 15 23:00s 1:00 S -Rule Spain 1940 only - Mar 16 23:00s 1:00 S -# Whitman says no DST 1942-1945; go with Shanks & Pottenger. -Rule Spain 1942 only - May 2 22:00s 2:00 M # Midsummer -Rule Spain 1942 only - Sep 1 22:00s 1:00 S -Rule Spain 1943 1946 - Apr Sat>=13 22:00s 2:00 M -Rule Spain 1943 only - Oct 3 22:00s 1:00 S -Rule Spain 1944 only - Oct 10 22:00s 1:00 S -Rule Spain 1945 only - Sep 30 1:00 1:00 S -Rule Spain 1946 only - Sep 30 0:00 0 - +Rule Spain 1918 only - Apr 15 23:00 1:00 S +Rule Spain 1918 1919 - Oct 6 24:00s 0 - +Rule Spain 1919 only - Apr 6 23:00 1:00 S +Rule Spain 1924 only - Apr 16 23:00 1:00 S +Rule Spain 1924 only - Oct 4 24:00s 0 - +Rule Spain 1926 only - Apr 17 23:00 1:00 S +Rule Spain 1926 1929 - Oct Sat>=1 24:00s 0 - +Rule Spain 1927 only - Apr 9 23:00 1:00 S +Rule Spain 1928 only - Apr 15 0:00 1:00 S +Rule Spain 1929 only - Apr 20 23:00 1:00 S +# Republican Spain during the civil war; it controlled Madrid until 1939-03-28. +Rule Spain 1937 only - Jun 16 23:00 1:00 S +Rule Spain 1937 only - Oct 2 24:00s 0 - +Rule Spain 1938 only - Apr 2 23:00 1:00 S +Rule Spain 1938 only - Apr 30 23:00 2:00 M +Rule Spain 1938 only - Oct 2 24:00 1:00 S +# The following rules are for unified Spain again. +# +# Planesas does not say what happened in Madrid between its fall on +# 1939-03-28 and the Nationalist spring-forward transition on +# 1939-04-15. For lack of better info, assume Madrid's clocks did not +# change during that period. +# +# The first rule is commented out, as it is redundant for Republican Spain. +#Rule Spain 1939 only - Apr 15 23:00 1:00 S +Rule Spain 1939 only - Oct 7 24:00s 0 - +Rule Spain 1942 only - May 2 23:00 1:00 S +Rule Spain 1942 only - Sep 1 1:00 0 - +Rule Spain 1943 1946 - Apr Sat>=13 23:00 1:00 S +Rule Spain 1943 1944 - Oct Sun>=1 1:00 0 - +Rule Spain 1945 1946 - Sep lastSun 1:00 0 - Rule Spain 1949 only - Apr 30 23:00 1:00 S -Rule Spain 1949 only - Sep 30 1:00 0 - -Rule Spain 1974 1975 - Apr Sat>=13 23:00 1:00 S +Rule Spain 1949 only - Oct 2 1:00 0 - +Rule Spain 1974 1975 - Apr Sat>=12 23:00 1:00 S Rule Spain 1974 1975 - Oct Sun>=1 1:00 0 - Rule Spain 1976 only - Mar 27 23:00 1:00 S Rule Spain 1976 1977 - Sep lastSun 1:00 0 - -Rule Spain 1977 1978 - Apr 2 23:00 1:00 S -Rule Spain 1978 only - Oct 1 1:00 0 - +Rule Spain 1977 only - Apr 2 23:00 1:00 S +Rule Spain 1978 only - Apr 2 2:00s 1:00 S +Rule Spain 1978 only - Oct 1 2:00s 0 - +# Nationalist Spain during the civil war +#Rule NatSpain 1937 only - May 22 23:00 1:00 S +#Rule NatSpain 1937 1938 - Oct Sat>=1 24:00s 0 - +#Rule NatSpain 1938 only - Mar 26 23:00 1:00 S # The following rules are copied from Morocco from 1967 through 1978. Rule SpainAfrica 1967 only - Jun 3 12:00 1:00 S Rule SpainAfrica 1967 only - Oct 1 0:00 0 - @@ -3306,11 +3350,11 @@ Rule SpainAfrica 1977 only - Sep 28 0:00 0 - Rule SpainAfrica 1978 only - Jun 1 0:00 1:00 S Rule SpainAfrica 1978 only - Aug 4 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Europe/Madrid -0:14:44 - LMT 1901 Jan 1 0:00s - 0:00 Spain WE%sT 1946 Sep 30 +Zone Europe/Madrid -0:14:44 - LMT 1900 Dec 31 23:45:16 + 0:00 Spain WE%sT 1940 Mar 16 23:00 1:00 Spain CE%sT 1979 1:00 EU CE%sT -Zone Africa/Ceuta -0:21:16 - LMT 1901 +Zone Africa/Ceuta -0:21:16 - LMT 1900 Dec 31 23:38:44 0:00 - WET 1918 May 6 23:00 0:00 1:00 WEST 1918 Oct 7 23:00 0:00 - WET 1924 @@ -3319,7 +3363,7 @@ Zone Africa/Ceuta -0:21:16 - LMT 1901 1:00 - CET 1986 1:00 EU CE%sT Zone Atlantic/Canary -1:01:36 - LMT 1922 Mar # Las Palmas de Gran C. - -1:00 - CANT 1946 Sep 30 1:00 # Canaries T + -1:00 - -01 1946 Sep 30 1:00 0:00 - WET 1980 Apr 6 0:00s 0:00 1:00 WEST 1980 Sep 28 1:00u 0:00 EU WE%sT @@ -3732,7 +3776,7 @@ Zone Europe/Uzhgorod 1:29:12 - LMT 1890 Oct # spelling, except omit the apostrophe as it is not allowed in # portable Posix file names. Zone Europe/Zaporozhye 2:20:40 - LMT 1880 - 2:20 - CUT 1924 May 2 # Central Ukraine T + 2:20 - +0220 1924 May 2 2:00 - EET 1930 Jun 21 3:00 - MSK 1941 Aug 25 1:00 C-Eur CE%sT 1943 Oct 25 diff --git a/jdk/make/data/tzdata/iso3166.tab b/jdk/make/data/tzdata/iso3166.tab index 004a4a70556..38a3a1ed52b 100644 --- a/jdk/make/data/tzdata/iso3166.tab +++ b/jdk/make/data/tzdata/iso3166.tab @@ -32,8 +32,8 @@ # All text uses UTF-8 encoding. The columns of the table are as follows: # # 1. ISO 3166-1 alpha-2 country code, current as of -# ISO 3166-1 Newsletter VI-16 (2013-07-11). See: Updates on ISO 3166 -# http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm +# ISO 3166-1 N905 (2016-11-15). See: Updates on ISO 3166-1 +# http://isotc.iso.org/livelink/livelink/Open/16944257 # 2. The usual English name for the coded region, # chosen so that alphabetic sorting of subsets produces helpful lists. # This is not the same as the English name in the ISO 3166 tables. diff --git a/jdk/make/data/tzdata/leapseconds b/jdk/make/data/tzdata/leapseconds index 71d774d16fa..3823c9abc4c 100644 --- a/jdk/make/data/tzdata/leapseconds +++ b/jdk/make/data/tzdata/leapseconds @@ -81,5 +81,5 @@ Leap 2012 Jun 30 23:59:60 + S Leap 2015 Jun 30 23:59:60 + S Leap 2016 Dec 31 23:59:60 + S -# Updated through IERS Bulletin C52 -# File expires on: 28 June 2017 +# Updated through IERS Bulletin C53 +# File expires on: 28 December 2017 diff --git a/jdk/make/data/tzdata/northamerica b/jdk/make/data/tzdata/northamerica index 56b089c8fc5..d59d2705b99 100644 --- a/jdk/make/data/tzdata/northamerica +++ b/jdk/make/data/tzdata/northamerica @@ -201,22 +201,6 @@ Zone CST6CDT -6:00 US C%sT Zone MST7MDT -7:00 US M%sT Zone PST8PDT -8:00 US P%sT -# From Bob Devine (1988-01-28): -# ...Alaska (and Hawaii) had the timezone names changed in 1967. -# old new -# Pacific Standard Time(PST) -same- -# Yukon Standard Time(YST) -same- -# Central Alaska S.T. (CAT) Alaska-Hawaii St[an]dard Time (AHST) -# Nome Standard Time (NT) Bering Standard Time (BST) -# -# ...Alaska's timezone lines were redrawn in 1983 to give only 2 tz. -# The YST zone now covers nearly all of the state, AHST just part -# of the Aleutian islands. No DST. - -# From Paul Eggert (1995-12-19): -# The tables below use 'NST', not 'NT', for Nome Standard Time. -# I invented 'CAWT' for Central Alaska War Time. - # From U. S. Naval Observatory (1989-01-19): # USA EASTERN 5 H BEHIND UTC NEW YORK, WASHINGTON # USA EASTERN 4 H BEHIND UTC APR 3 - OCT 30 @@ -273,6 +257,21 @@ Zone PST8PDT -8:00 US P%sT # Samoa standard time # The law doesn't give abbreviations. # +# From Paul Eggert (2016-12-19): +# Here are URLs for the 1918 and 1966 legislation: +# http://uscode.house.gov/statviewer.htm?volume=40&page=451 +# http://uscode.house.gov/statviewer.htm?volume=80&page=108 +# Although the 1918 names were officially "United States Standard +# Eastern Time" and similarly for "Central", "Mountain", "Pacific", +# and "Alaska", in practice "Standard" was placed just before "Time", +# as codified in 1966. In practice, Alaska time was abbreviated "AST" +# before 1968. Summarizing the 1967 name changes: +# 1918 names 1967 names +# -08 Standard Pacific Time (PST) Pacific standard time (PST) +# -09 (unofficial) Yukon (YST) Yukon standard time (YST) +# -10 Standard Alaska Time (AST) Alaska-Hawaii standard time (AHST) +# -11 (unofficial) Nome (NST) Bering standard time (BST) +# # From Paul Eggert (2000-01-08), following a heads-up from Rives McDow: # Public law 106-564 (2000-12-23) introduced ... "Chamorro Standard Time" # for time in Guam and the Northern Marianas. See the file "australasia". @@ -328,6 +327,15 @@ Zone PST8PDT -8:00 US P%sT # Roberts, city administrator in Phenix City. as saying "We are in the Central # time zone, but we do go by the Eastern time zone because so many people work # in Columbus." +# +# From Paul Eggert (2017-02-22): +# Four cities are involved. The two not mentioned above are Smiths Station +# and Valley. Barbara Brooks, Valley's assistant treasurer, heard it started +# because West Point Pepperell textile mills were in Alabama while the +# corporate office was in Georgia, and residents voted to keep Eastern +# time even after the mills closed. See: Kazek K. Did you know which +# Alabama towns are in a different time zone? al.com 2017-02-06. +# http://www.al.com/living/index.ssf/2017/02/do_you_know_which_alabama_town.html # From Paul Eggert (2014-09-06): # Monthly Notices of the Royal Astronomical Society 44, 4 (1884-02-08), 208 @@ -505,7 +513,7 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02 -8:00 US P%sT # Alaska -# AK%sT is the modern abbreviation for -9:00 per USNO. +# AK%sT is the modern abbreviation for -09 per USNO. # # From Paul Eggert (2001-05-30): # Howse writes that Alaska switched from the Julian to the Gregorian calendar, @@ -611,10 +619,8 @@ Zone America/Yakutat 14:41:05 - LMT 1867 Oct 18 -9:00 US AK%sT Zone America/Anchorage 14:00:24 - LMT 1867 Oct 18 -9:59:36 - LMT 1900 Aug 20 12:00 - -10:00 - CAT 1942 - -10:00 US CAT/CAWT 1945 Aug 14 23:00u - -10:00 US CAT/CAPT 1946 # Peace - -10:00 - CAT 1967 Apr + -10:00 - AST 1942 + -10:00 US A%sT 1967 Apr -10:00 - AHST 1969 -10:00 US AH%sT 1983 Oct 30 2:00 -9:00 US Y%sT 1983 Nov 30 @@ -703,7 +709,6 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 -10:30 1:00 HDT 1945 Sep 30 2:00 -10:30 - HST 1947 Jun 8 2:00 -10:00 - HST -Link Pacific/Honolulu Pacific/Johnston # Now we turn to US areas that have diverged from the consensus since 1970. @@ -1091,15 +1096,15 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00 ################################################################################ -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -2757,15 +2762,15 @@ Zone America/Barbados -3:58:29 - LMT 1924 # Bridgetown # Belize # Whitman entirely disagrees with Shanks; go with Shanks & Pottenger. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 HD -Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 S -Rule Belize 1973 only - Dec 5 0:00 1:00 D -Rule Belize 1974 only - Feb 9 0:00 0 S -Rule Belize 1982 only - Dec 18 0:00 1:00 D -Rule Belize 1983 only - Feb 12 0:00 0 S +Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 -0530 +Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 CST +Rule Belize 1973 only - Dec 5 0:00 1:00 CDT +Rule Belize 1974 only - Feb 9 0:00 0 CST +Rule Belize 1982 only - Dec 18 0:00 1:00 CDT +Rule Belize 1983 only - Feb 12 0:00 0 CST # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Belize -5:52:48 - LMT 1912 Apr - -6:00 Belize C%sT + -6:00 Belize %s # Bermuda @@ -3037,16 +3042,16 @@ Zone America/Havana -5:29:28 - LMT 1890 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule DR 1966 only - Oct 30 0:00 1:00 D -Rule DR 1967 only - Feb 28 0:00 0 S -Rule DR 1969 1973 - Oct lastSun 0:00 0:30 HD -Rule DR 1970 only - Feb 21 0:00 0 S -Rule DR 1971 only - Jan 20 0:00 0 S -Rule DR 1972 1974 - Jan 21 0:00 0 S +Rule DR 1966 only - Oct 30 0:00 1:00 EDT +Rule DR 1967 only - Feb 28 0:00 0 EST +Rule DR 1969 1973 - Oct lastSun 0:00 0:30 -0430 +Rule DR 1970 only - Feb 21 0:00 0 EST +Rule DR 1971 only - Jan 20 0:00 0 EST +Rule DR 1972 1974 - Jan 21 0:00 0 EST # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Santo_Domingo -4:39:36 - LMT 1890 -4:40 - SDMT 1933 Apr 1 12:00 # S. Dom. MT - -5:00 DR E%sT 1974 Oct 27 + -5:00 DR %s 1974 Oct 27 -4:00 - AST 2000 Oct 29 2:00 -5:00 US E%sT 2000 Dec 3 1:00 -4:00 - AST @@ -3157,6 +3162,12 @@ Zone America/Guatemala -6:02:04 - LMT 1918 Oct 5 # http://www.vantbefinfo.com/changement-dheure-pas-pour-haiti/ # http://news.anmwe.com/haiti-lheure-nationale-ne-sera-ni-avancee-ni-reculee-cette-annee/ +# From Steffen Thorsen (2017-03-12): +# We have received 4 mails from different people telling that Haiti +# has started DST again today, and this source seems to confirm that, +# I have not been able to find a more authoritative source: +# https://www.haitilibre.com/en/news-20319-haiti-notices-time-change-in-haiti.html + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Haiti 1983 only - May 8 0:00 1:00 D Rule Haiti 1984 1987 - Apr lastSun 0:00 1:00 D @@ -3169,6 +3180,8 @@ Rule Haiti 2005 2006 - Apr Sun>=1 0:00 1:00 D Rule Haiti 2005 2006 - Oct lastSun 0:00 0 S Rule Haiti 2012 2015 - Mar Sun>=8 2:00 1:00 D Rule Haiti 2012 2015 - Nov Sun>=1 2:00 0 S +Rule Haiti 2017 max - Mar Sun>=8 2:00 1:00 D +Rule Haiti 2017 max - Nov Sun>=1 2:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Port-au-Prince -4:49:20 - LMT 1890 -4:49 - PPMT 1917 Jan 24 12:00 # P-a-P MT @@ -3336,8 +3349,8 @@ Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre -4:00 - AST 1980 May - -3:00 - PMST 1987 # Pierre & Miquelon Time - -3:00 Canada PM%sT + -3:00 - -03 1987 + -3:00 Canada -03/-02 # St Vincent and the Grenadines # See America/Port_of_Spain. diff --git a/jdk/make/data/tzdata/southamerica b/jdk/make/data/tzdata/southamerica index bbc0a95067a..44dbd957566 100644 --- a/jdk/make/data/tzdata/southamerica +++ b/jdk/make/data/tzdata/southamerica @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2016-12-05): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -47,32 +47,10 @@ # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. # http://www.jstor.org/stable/1774359 # -# Earlier editions of these tables used the North American style (e.g. ARST and -# ARDT for Argentine Standard and Daylight Time), but the following quote -# suggests that it's better to use European style (e.g. ART and ARST). -# I suggest the use of _Summer time_ instead of the more cumbersome -# _daylight-saving time_. _Summer time_ seems to be in general use -# in Europe and South America. -# -- E O Cutler, _New York Times_ (1937-02-14), quoted in -# H L Mencken, _The American Language: Supplement I_ (1960), p 466 -# -# Earlier editions of these tables also used the North American style -# for time zones in Brazil, but this was incorrect, as Brazilians say -# "summer time". Reinaldo Goulart, a São Paulo businessman active in -# the railroad sector, writes (1999-07-06): -# The subject of time zones is currently a matter of discussion/debate in -# Brazil. Let's say that "the Brasília time" is considered the -# "official time" because Brasília is the capital city. -# The other three time zones are called "Brasília time "minus one" or -# "plus one" or "plus two". As far as I know there is no such -# name/designation as "Eastern Time" or "Central Time". -# So I invented the following (English-language) abbreviations for now. -# Corrections are welcome! -# std dst -# -2:00 FNT FNST Fernando de Noronha -# -3:00 BRT BRST Brasília -# -4:00 AMT AMST Amazon -# -5:00 ACT ACST Acre +# These tables use numeric abbreviations like -03 and -0330 for +# integer hour and minute UTC offsets. Although earlier editions used +# alphabetic time zone abbreviations, these abbreviations were +# invented and did not reflect common practice. ############################################################################### @@ -407,12 +385,6 @@ Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 S # # So I guess a new set of rules, besides "Arg", must be made and the last # America/Argentina/San_Luis entries should change to use these... -# -# I'm enclosing a patch that does what I say... regretfully, the San Luis -# timezone must be called "WART/WARST" even when most of the time (like, -# right now) WARST == ART... that is, since last Sunday, all the country -# is using UTC-3, but in my patch, San Luis calls it "WARST" and the rest -# of the country calls it "ART". # ... # From Alexander Krivenyshev (2010-04-09): @@ -451,11 +423,11 @@ Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 S # Buenos Aires (BA), Capital Federal (CF), Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 # # Córdoba (CB), Santa Fe (SF), Entre Ríos (ER), Corrientes (CN), Misiones (MN), # Chaco (CC), Formosa (FM), Santiago del Estero (SE) @@ -469,113 +441,113 @@ Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31 # Zone America/Argentina/Cordoba -4:16:48 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 # # Salta (SA), La Pampa (LP), Neuquén (NQ), Rio Negro (RN) Zone America/Argentina/Salta -4:21:40 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Tucumán (TM) Zone America/Argentina/Tucuman -4:20:52 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 13 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 13 + -3:00 Arg -03/-02 # # La Rioja (LR) Zone America/Argentina/La_Rioja -4:27:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 1 - -4:00 - WART 1991 May 7 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 1 + -4:00 - -04 1991 May 7 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # San Juan (SJ) Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 1 - -4:00 - WART 1991 May 7 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 31 - -4:00 - WART 2004 Jul 25 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 1 + -4:00 - -04 1991 May 7 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 31 + -4:00 - -04 2004 Jul 25 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Jujuy (JY) Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 Mar 4 - -4:00 - WART 1990 Oct 28 - -4:00 1:00 WARST 1991 Mar 17 - -4:00 - WART 1991 Oct 6 - -3:00 1:00 ARST 1992 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 Mar 4 + -4:00 - -04 1990 Oct 28 + -4:00 1:00 -03 1991 Mar 17 + -4:00 - -04 1991 Oct 6 + -3:00 1:00 -02 1992 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Catamarca (CT), Chubut (CH) Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Mendoza (MZ) Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 Mar 4 - -4:00 - WART 1990 Oct 15 - -4:00 1:00 WARST 1991 Mar 1 - -4:00 - WART 1991 Oct 15 - -4:00 1:00 WARST 1992 Mar 1 - -4:00 - WART 1992 Oct 18 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 23 - -4:00 - WART 2004 Sep 26 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 Mar 4 + -4:00 - -04 1990 Oct 15 + -4:00 1:00 -03 1991 Mar 1 + -4:00 - -04 1991 Oct 15 + -4:00 1:00 -03 1992 Mar 1 + -4:00 - -04 1992 Oct 18 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 23 + -4:00 - -04 2004 Sep 26 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # San Luis (SL) @@ -584,44 +556,44 @@ Rule SanLuis 2007 2008 - Oct Sun>=8 0:00 1:00 S Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 - -3:00 1:00 ARST 1990 Mar 14 - -4:00 - WART 1990 Oct 15 - -4:00 1:00 WARST 1991 Mar 1 - -4:00 - WART 1991 Jun 1 - -3:00 - ART 1999 Oct 3 - -4:00 1:00 WARST 2000 Mar 3 - -3:00 - ART 2004 May 31 - -4:00 - WART 2004 Jul 25 - -3:00 Arg AR%sT 2008 Jan 21 - -4:00 SanLuis WAR%sT 2009 Oct 11 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 + -3:00 1:00 -02 1990 Mar 14 + -4:00 - -04 1990 Oct 15 + -4:00 1:00 -03 1991 Mar 1 + -4:00 - -04 1991 Jun 1 + -3:00 - -03 1999 Oct 3 + -4:00 1:00 -03 2000 Mar 3 + -3:00 - -03 2004 May 31 + -4:00 - -04 2004 Jul 25 + -3:00 Arg -03/-02 2008 Jan 21 + -4:00 SanLuis -04/-03 2009 Oct 11 + -3:00 - -03 # # Santa Cruz (SC) Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31 - -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:16:48 - CMT 1920 May + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Tierra del Fuego, Antártida e Islas del Atlántico Sur (TF) Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31 - -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 30 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:16:48 - CMT 1920 May + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 30 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # Aruba Link America/Curacao America/Aruba @@ -631,7 +603,7 @@ Link America/Curacao America/Aruba Zone America/La_Paz -4:32:36 - LMT 1890 -4:32:36 - CMT 1931 Oct 15 # Calamarca MT -4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST - -4:00 - BOT # Bolivia Time + -4:00 - -04 # Brazil @@ -983,12 +955,12 @@ Rule Brazil 2038 max - Feb Sun>=15 0:00 0 - # # Fernando de Noronha (administratively part of PE) Zone America/Noronha -2:09:40 - LMT 1914 - -2:00 Brazil FN%sT 1990 Sep 17 - -2:00 - FNT 1999 Sep 30 - -2:00 Brazil FN%sT 2000 Oct 15 - -2:00 - FNT 2001 Sep 13 - -2:00 Brazil FN%sT 2002 Oct 1 - -2:00 - FNT + -2:00 Brazil -02/-01 1990 Sep 17 + -2:00 - -02 1999 Sep 30 + -2:00 Brazil -02/-01 2000 Oct 15 + -2:00 - -02 2001 Sep 13 + -2:00 Brazil -02/-01 2002 Oct 1 + -2:00 - -02 # Other Atlantic islands have no permanent settlement. # These include Trindade and Martim Vaz (administratively part of ES), # Rocas Atoll (RN), and the St Peter and St Paul Archipelago (PE). @@ -1001,119 +973,119 @@ Zone America/Noronha -2:09:40 - LMT 1914 # In the north a very small part from the river Javary (now Jari I guess, # the border with Amapá) to the Amazon, then to the Xingu. Zone America/Belem -3:13:56 - LMT 1914 - -3:00 Brazil BR%sT 1988 Sep 12 - -3:00 - BRT + -3:00 Brazil -03/-02 1988 Sep 12 + -3:00 - -03 # # west Pará (PA) # West Pará includes Altamira, Óbidos, Prainha, Oriximiná, and Santarém. Zone America/Santarem -3:38:48 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 2008 Jun 24 0:00 - -3:00 - BRT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 2008 Jun 24 0:00 + -3:00 - -03 # # Maranhão (MA), Piauí (PI), Ceará (CE), Rio Grande do Norte (RN), # Paraíba (PB) Zone America/Fortaleza -2:34:00 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 22 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 22 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Pernambuco (PE) (except Atlantic islands) Zone America/Recife -2:19:36 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 15 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 15 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Tocantins (TO) Zone America/Araguaina -3:12:48 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1995 Sep 14 - -3:00 Brazil BR%sT 2003 Sep 24 - -3:00 - BRT 2012 Oct 21 - -3:00 Brazil BR%sT 2013 Sep - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1995 Sep 14 + -3:00 Brazil -03/-02 2003 Sep 24 + -3:00 - -03 2012 Oct 21 + -3:00 Brazil -03/-02 2013 Sep + -3:00 - -03 # # Alagoas (AL), Sergipe (SE) Zone America/Maceio -2:22:52 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1995 Oct 13 - -3:00 Brazil BR%sT 1996 Sep 4 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 22 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1995 Oct 13 + -3:00 Brazil -03/-02 1996 Sep 4 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 22 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Bahia (BA) # There are too many Salvadors elsewhere, so use America/Bahia instead # of America/Salvador. Zone America/Bahia -2:34:04 - LMT 1914 - -3:00 Brazil BR%sT 2003 Sep 24 - -3:00 - BRT 2011 Oct 16 - -3:00 Brazil BR%sT 2012 Oct 21 - -3:00 - BRT + -3:00 Brazil -03/-02 2003 Sep 24 + -3:00 - -03 2011 Oct 16 + -3:00 Brazil -03/-02 2012 Oct 21 + -3:00 - -03 # # Goiás (GO), Distrito Federal (DF), Minas Gerais (MG), # Espírito Santo (ES), Rio de Janeiro (RJ), São Paulo (SP), Paraná (PR), # Santa Catarina (SC), Rio Grande do Sul (RS) Zone America/Sao_Paulo -3:06:28 - LMT 1914 - -3:00 Brazil BR%sT 1963 Oct 23 0:00 - -3:00 1:00 BRST 1964 - -3:00 Brazil BR%sT + -3:00 Brazil -03/-02 1963 Oct 23 0:00 + -3:00 1:00 -02 1964 + -3:00 Brazil -03/-02 # # Mato Grosso do Sul (MS) Zone America/Campo_Grande -3:38:28 - LMT 1914 - -4:00 Brazil AM%sT + -4:00 Brazil -04/-03 # # Mato Grosso (MT) Zone America/Cuiaba -3:44:20 - LMT 1914 - -4:00 Brazil AM%sT 2003 Sep 24 - -4:00 - AMT 2004 Oct 1 - -4:00 Brazil AM%sT + -4:00 Brazil -04/-03 2003 Sep 24 + -4:00 - -04 2004 Oct 1 + -4:00 Brazil -04/-03 # # Rondônia (RO) Zone America/Porto_Velho -4:15:36 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 # # Roraima (RR) Zone America/Boa_Vista -4:02:40 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 1999 Sep 30 - -4:00 Brazil AM%sT 2000 Oct 15 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 1999 Sep 30 + -4:00 Brazil -04/-03 2000 Oct 15 + -4:00 - -04 # # east Amazonas (AM): Boca do Acre, Jutaí, Manaus, Floriano Peixoto # The great circle line from Tabatinga to Porto Acre divides # east from west Amazonas. Zone America/Manaus -4:00:04 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 1993 Sep 28 - -4:00 Brazil AM%sT 1994 Sep 22 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 1993 Sep 28 + -4:00 Brazil -04/-03 1994 Sep 22 + -4:00 - -04 # # west Amazonas (AM): Atalaia do Norte, Boca do Maoco, Benjamin Constant, # Eirunepé, Envira, Ipixuna Zone America/Eirunepe -4:39:28 - LMT 1914 - -5:00 Brazil AC%sT 1988 Sep 12 - -5:00 - ACT 1993 Sep 28 - -5:00 Brazil AC%sT 1994 Sep 22 - -5:00 - ACT 2008 Jun 24 0:00 - -4:00 - AMT 2013 Nov 10 - -5:00 - ACT + -5:00 Brazil -05/-04 1988 Sep 12 + -5:00 - -05 1993 Sep 28 + -5:00 Brazil -05/-04 1994 Sep 22 + -5:00 - -05 2008 Jun 24 0:00 + -4:00 - -04 2013 Nov 10 + -5:00 - -05 # # Acre (AC) Zone America/Rio_Branco -4:31:12 - LMT 1914 - -5:00 Brazil AC%sT 1988 Sep 12 - -5:00 - ACT 2008 Jun 24 0:00 - -4:00 - AMT 2013 Nov 10 - -5:00 - ACT + -5:00 Brazil -05/-04 1988 Sep 12 + -5:00 - -05 2008 Jun 24 0:00 + -4:00 - -04 2013 Nov 10 + -5:00 - -05 # Chile @@ -1258,6 +1230,18 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # to mean 24:00 mainland time, not 24:00 local time, so that Easter # Island is always two hours behind the mainland. +# From Juan Correa (2016-12-04): +# Magallanes region ... will keep DST (UTC -3) all year round.... +# http://www.soychile.cl/Santiago/Sociedad/2016/12/04/433428/Bachelet-firmo-el-decreto-para-establecer-un-horario-unico-para-la-Region-de-Magallanes.aspx +# +# From Deborah Goldsmith (2017-01-19): +# http://www.diariooficial.interior.gob.cl/publicaciones/2017/01/17/41660/01/1169626.pdf +# From Paul Eggert (2017-01-19): +# The above says the Magallanes change expires 2019-05-11 at 24:00, +# so in theory, they will revert to -04/-03 after that, which means +# they will switch from -03 to -04 one hour after Santiago does that day. +# For now, assume that they will not revert. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Chile 1927 1931 - Sep 1 0:00 1:00 S Rule Chile 1928 1932 - Apr 1 0:00 0 - @@ -1298,22 +1282,35 @@ Rule Chile 2016 max - Aug Sun>=9 4:00u 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Santiago -4:42:46 - LMT 1890 -4:42:46 - SMT 1910 Jan 10 # Santiago Mean Time - -5:00 - CLT 1916 Jul 1 # Chile Time + -5:00 - -05 1916 Jul 1 -4:42:46 - SMT 1918 Sep 10 - -4:00 - CLT 1919 Jul 1 + -4:00 - -04 1919 Jul 1 -4:42:46 - SMT 1927 Sep 1 - -5:00 Chile CL%sT 1932 Sep 1 - -4:00 - CLT 1942 Jun 1 - -5:00 - CLT 1942 Aug 1 - -4:00 - CLT 1946 Jul 15 - -4:00 1:00 CLST 1946 Sep 1 # central Chile - -4:00 - CLT 1947 Apr 1 - -5:00 - CLT 1947 May 21 23:00 - -4:00 Chile CL%sT + -5:00 Chile -05/-04 1932 Sep 1 + -4:00 - -04 1942 Jun 1 + -5:00 - -05 1942 Aug 1 + -4:00 - -04 1946 Jul 15 + -4:00 1:00 -03 1946 Sep 1 # central Chile + -4:00 - -04 1947 Apr 1 + -5:00 - -05 1947 May 21 23:00 + -4:00 Chile -04/-03 +Zone America/Punta_Arenas -4:43:40 - LMT 1890 + -4:42:46 - SMT 1910 Jan 10 + -5:00 - -05 1916 Jul 1 + -4:42:46 - SMT 1918 Sep 10 + -4:00 - -04 1919 Jul 1 + -4:42:46 - SMT 1927 Sep 1 + -5:00 Chile -05/-04 1932 Sep 1 + -4:00 - -04 1942 Jun 1 + -5:00 - -05 1942 Aug 1 + -4:00 - -04 1947 Apr 1 + -5:00 - -05 1947 May 21 23:00 + -4:00 Chile -04/-03 2016 Dec 4 + -3:00 - -03 Zone Pacific/Easter -7:17:28 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile -07/-06 1982 Mar 14 3:00u # Easter Time + -6:00 Chile -06/-05 # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, @@ -1333,9 +1330,10 @@ Zone Pacific/Easter -7:17:28 - LMT 1890 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - -00 1965 - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1982 May - -4:00 Chile CL%sT + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1982 May + -4:00 Chile -04/-03 2016 Dec 4 + -3:00 - -03 # Colombia @@ -1348,7 +1346,7 @@ Rule CO 1993 only - Apr 4 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Bogota -4:56:16 - LMT 1884 Mar 13 -4:56:16 - BMT 1914 Nov 23 # Bogotá Mean Time - -5:00 CO CO%sT # Colombia Time + -5:00 CO -05/-04 # Malpelo, Providencia, San Andres # no information; probably like America/Bogota @@ -1372,7 +1370,7 @@ Zone America/Bogota -4:56:16 - LMT 1884 Mar 13 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad - -4:30 - ANT 1965 # Netherlands Antilles Time + -4:30 - -0430 1965 -4:00 - AST # From Arthur David Olson (2011-06-15): @@ -1387,19 +1385,32 @@ Link America/Curacao America/Kralendijk # Caribbean Netherlands # # Milne says the Central and South American Telegraph Company used -5:24:15. # -# From Paul Eggert (2007-03-04): -# Apparently Ecuador had a failed experiment with DST in 1992. -# (2007-02-27) and -# (2006-11-06) both -# talk about "hora Sixto". Leave this alone for now, as we have no data. +# From Alois Treindl (2016-12-15): +# http://www.elcomercio.com/actualidad/hora-sixto-1993.html +# ... Whether the law applied also to Galápagos, I do not know. +# From Paul Eggert (2016-12-15): +# http://www.elcomercio.com/afull/modificacion-husohorario-ecuador-presidentes-decreto.html +# This says President Sixto Durán Ballén signed decree No. 285, which +# established DST from 1992-11-28 to 1993-02-05; it does not give transition +# times. The people called it "hora de Sixto" ("Sixto hour"). The change did +# not go over well; a popular song "Qué hora es" by Jaime Guevara had lyrics +# that included "Amanecía en mitad de la noche, los guaguas iban a clase sin +# sol" ("It was dawning in the middle of the night, the buses went to class +# without sun"). Although Ballén's campaign slogan was "Ni un paso atrás" +# (Not one step back), the clocks went back in 1993 and the experiment was not +# repeated. For now, assume transitions were at 00:00 local time country-wide. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Ecuador 1992 only - Nov 28 0:00 1:00 S +Rule Ecuador 1993 only - Feb 5 0:00 0 - # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guayaquil -5:19:20 - LMT 1890 -5:14:00 - QMT 1931 # Quito Mean Time - -5:00 - ECT # Ecuador Time + -5:00 Ecuador -05/-04 Zone Pacific/Galapagos -5:58:24 - LMT 1931 # Puerto Baquerizo Moreno - -5:00 - ECT 1986 - -6:00 - GALT # Galápagos Time + -5:00 - -05 1986 + -6:00 Ecuador -06/-05 # Falklands @@ -1499,25 +1510,24 @@ Rule Falk 2001 2010 - Sep Sun>=1 2:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Stanley -3:51:24 - LMT 1890 -3:51:24 - SMT 1912 Mar 12 # Stanley Mean Time - -4:00 Falk FK%sT 1983 May # Falkland Is Time - -3:00 Falk FK%sT 1985 Sep 15 - -4:00 Falk FK%sT 2010 Sep 5 2:00 - -3:00 - FKST + -4:00 Falk -04/-03 1983 May + -3:00 Falk -03/-02 1985 Sep 15 + -4:00 Falk -04/-03 2010 Sep 5 2:00 + -3:00 - -03 # French Guiana # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Cayenne -3:29:20 - LMT 1911 Jul - -4:00 - GFT 1967 Oct # French Guiana Time - -3:00 - GFT + -4:00 - -04 1967 Oct + -3:00 - -03 # Guyana # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown - -3:45 - GBGT 1966 May 26 # Br Guiana Time - -3:45 - GYT 1975 Jul 31 # Guyana Time - -3:00 - GYT 1991 + -3:45 - -0345 1975 Jul 31 + -3:00 - -03 1991 # IATA SSIM (1996-06) says -4:00. Assume a 1991 switch. - -4:00 - GYT + -4:00 - -04 # Paraguay # @@ -1609,9 +1619,9 @@ Rule Para 2013 max - Mar Sun>=22 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Asuncion -3:50:40 - LMT 1890 -3:50:40 - AMT 1931 Oct 10 # Asunción Mean Time - -4:00 - PYT 1972 Oct # Paraguay Time - -3:00 - PYT 1974 Apr - -4:00 Para PY%sT + -4:00 - -04 1972 Oct + -3:00 - -03 1974 Apr + -4:00 Para -04/-03 # Peru # @@ -1638,12 +1648,12 @@ Rule Peru 1994 only - Apr 1 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Lima -5:08:12 - LMT 1890 -5:08:36 - LMT 1908 Jul 28 # Lima Mean Time? - -5:00 Peru PE%sT # Peru Time + -5:00 Peru -05/-04 # South Georgia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken - -2:00 - GST # South Georgia Time + -2:00 - -02 # South Sandwich Is # uninhabited; scientific personnel have wintered @@ -1653,9 +1663,8 @@ Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken Zone America/Paramaribo -3:40:40 - LMT 1911 -3:40:52 - PMT 1935 # Paramaribo Mean Time -3:40:36 - PMT 1945 Oct # The capital moved? - -3:30 - NEGT 1975 Nov 20 # Dutch Guiana Time - -3:30 - SRT 1984 Oct # Suriname Time - -3:00 - SRT + -3:30 - -0330 1984 Oct + -3:00 - -03 # Trinidad and Tobago # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1758,11 +1767,16 @@ Rule Uruguay 2006 only - Mar 12 2:00 0 - # [dated 2015-06-29; repeals Decree 311/006 dated 2006-09-04] Rule Uruguay 2006 2014 - Oct Sun>=1 2:00 1:00 S Rule Uruguay 2007 2015 - Mar Sun>=8 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] + +# This Zone can be simplified once we assume zic %z. Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28 -3:44:44 - MMT 1920 May 1 # Montevideo MT - -3:30 Uruguay UY%sT 1942 Dec 14 # Uruguay Time - -3:00 Uruguay UY%sT + -3:30 Uruguay -0330/-03 1942 Dec 14 + -3:00 Uruguay -03/-02 1968 + -3:00 Uruguay -03/-0230 1971 + -3:00 Uruguay -03/-02 1974 + -3:00 Uruguay -03/-0230 1974 Dec 22 + -3:00 Uruguay -03/-02 # Venezuela # @@ -1796,7 +1810,7 @@ Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Caracas -4:27:44 - LMT 1890 -4:27:40 - CMT 1912 Feb 12 # Caracas Mean Time? - -4:30 - VET 1965 Jan 1 0:00 # Venezuela T. - -4:00 - VET 2007 Dec 9 3:00 - -4:30 - VET 2016 May 1 2:30 - -4:00 - VET + -4:30 - -0430 1965 Jan 1 0:00 + -4:00 - -04 2007 Dec 9 3:00 + -4:30 - -0430 2016 May 1 2:30 + -4:00 - -04 diff --git a/jdk/make/data/tzdata/zone.tab b/jdk/make/data/tzdata/zone.tab index 7255ea5bfb4..8d6247d21a7 100644 --- a/jdk/make/data/tzdata/zone.tab +++ b/jdk/make/data/tzdata/zone.tab @@ -165,6 +165,7 @@ CH +4723+00832 Europe/Zurich CI +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga CL -3327-07040 America/Santiago Chile (most areas) +CL -5309-07055 America/Punta_Arenas Region of Magallanes CL -2709-10926 Pacific/Easter Easter Island CM +0403+00942 Africa/Douala CN +3114+12128 Asia/Shanghai Beijing Time @@ -420,7 +421,6 @@ UA +5026+03031 Europe/Kiev Ukraine (most areas) UA +4837+02218 Europe/Uzhgorod Ruthenia UA +4750+03510 Europe/Zaporozhye Zaporozh'ye/Zaporizhia; Lugansk/Luhansk (east) UG +0019+03225 Africa/Kampala -UM +1645-16931 Pacific/Johnston Johnston Atoll UM +2813-17722 Pacific/Midway Midway Islands UM +1917+16637 Pacific/Wake Wake Island US +404251-0740023 America/New_York Eastern (most areas) diff --git a/jdk/make/gensrc/GensrcCharsetCoder.gmk b/jdk/make/gensrc/GensrcCharsetCoder.gmk index e992b19a3fa..47dab1cfbc0 100644 --- a/jdk/make/gensrc/GensrcCharsetCoder.gmk +++ b/jdk/make/gensrc/GensrcCharsetCoder.gmk @@ -54,7 +54,7 @@ $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE) -DOtherCoder='Encoder' \ -DreplTypeName='string' \ -DdefaultRepl='"\\uFFFD"' \ - -DdefaultReplName='"\\uFFFD"<\/tt>' \ + -DdefaultReplName='"\\uFFFD"<\/code>' \ -DreplType='String' \ -DreplFQType='java.lang.String' \ -DreplLength='length()' \ @@ -89,7 +89,7 @@ $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE) -DOtherCoder='Decoder' \ -DreplTypeName='byte array' \ -DdefaultRepl='new byte[] { (byte)'"'"\\?"'"' }' \ - -DdefaultReplName='{<\/tt>\ (byte)'"'"\\?"'"'<\/tt>\ }<\/tt>' \ + -DdefaultReplName='{<\/code>\ (byte)'"'"\\?"'"'<\/code>\ }<\/code>' \ -DreplType='byte[]' \ -DreplFQType='byte[]' \ -DreplLength='length' \ diff --git a/jdk/make/gensrc/GensrcMisc.gmk b/jdk/make/gensrc/GensrcMisc.gmk index 6b5dcf9e6b6..9a03f118b82 100644 --- a/jdk/make/gensrc/GensrcMisc.gmk +++ b/jdk/make/gensrc/GensrcMisc.gmk @@ -116,11 +116,13 @@ else JCE_DEFAULT_POLICY = limited endif -$(eval $(call SetupTextFileProcessing, BUILD_JCESECURITY_JAVA, \ - SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/javax/crypto/JceSecurity.java.template, \ - OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/javax/crypto/JceSecurity.java, \ - REPLACEMENTS := \ +ifneq ($(wildcard $(JDK_TOPDIR)/src/java.base/share/classes/javax/crypto/JceSecurity.java.template), ) + $(eval $(call SetupTextFileProcessing, BUILD_JCESECURITY_JAVA, \ + SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/javax/crypto/JceSecurity.java.template, \ + OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/javax/crypto/JceSecurity.java, \ + REPLACEMENTS := \ @@JCE_DEFAULT_POLICY@@ => $(JCE_DEFAULT_POLICY), \ -)) + )) -GENSRC_JAVA_BASE += $(BUILD_JCESECURITY_JAVA) + GENSRC_JAVA_BASE += $(BUILD_JCESECURITY_JAVA) +endif diff --git a/jdk/make/launcher/Launcher-jdk.aot.gmk b/jdk/make/launcher/Launcher-jdk.aot.gmk index a827a66bc35..9aea620ac9e 100644 --- a/jdk/make/launcher/Launcher-jdk.aot.gmk +++ b/jdk/make/launcher/Launcher-jdk.aot.gmk @@ -25,9 +25,25 @@ include LauncherCommon.gmk +# The JVMCI exports are needed since JVMCI is normally dynamically exported +# (see jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo). + $(eval $(call SetupBuildLauncher, jaotc, \ MAIN_CLASS := jdk.tools.jaotc.Main, \ JAVA_ARGS := -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.site=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.stack=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.common=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.meta=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ + --add-exports=jdk.internal.vm.ci/jdk.vm.ci.sparc=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \ -XX:+UseAOT \ -Djvmci.UseProfilingInformation=false \ -Dgraal.UseExceptionProbability=false \ diff --git a/jdk/make/launcher/Launcher-jdk.pack.gmk b/jdk/make/launcher/Launcher-jdk.pack.gmk index 2ee08c767bf..4fe0fdf411f 100644 --- a/jdk/make/launcher/Launcher-jdk.pack.gmk +++ b/jdk/make/launcher/Launcher-jdk.pack.gmk @@ -44,7 +44,7 @@ ifeq ($(USE_EXTERNAL_LIBZ), true) UNPACKEXE_CFLAGS += -DSYSTEM_ZLIB UNPACKEXE_LIBS := -lz else - UNPACKEXE_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 + UNPACKEXE_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib UNPACKEXE_ZIPOBJS := $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zcrc32$(OBJ_SUFFIX) \ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/deflate$(OBJ_SUFFIX) \ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/trees$(OBJ_SUFFIX) \ diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk index 743422b0afe..3eafa4a47ea 100644 --- a/jdk/make/lib/Awt2dLibraries.gmk +++ b/jdk/make/lib/Awt2dLibraries.gmk @@ -749,12 +749,14 @@ ifeq ($(OPENJDK_TARGET_OS), windows) $(BUILD_LIBJAWT): $(BUILD_LIBAWT) - $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT) - $(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%, %, $@)) - $(call MakeDir, $(@D)) - $(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@ + $(eval $(call SetupCopyFiles, COPY_JAWT_LIB, \ + FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX), \ + DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \ + )) - TARGETS += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) + $(COPY_JAWT_LIB): $(BUILD_LIBJAWT) + + TARGETS += $(COPY_JAWT_LIB) else # OPENJDK_TARGET_OS not windows @@ -889,7 +891,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false) LIBSPLASHSCREEN_LIBS := ifneq ($(USE_EXTERNAL_LIBZ), true) - LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 + LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS) endif diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk index 3ec50824202..5bb93942087 100644 --- a/jdk/make/lib/CoreLibraries.gmk +++ b/jdk/make/lib/CoreLibraries.gmk @@ -202,7 +202,7 @@ $(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM) BUILD_LIBZIP_EXCLUDES := ifeq ($(USE_EXTERNAL_LIBZ), true) - LIBZIP_EXCLUDES += zlib-1.2.8 + LIBZIP_EXCLUDES += zlib endif BUILD_LIBZIP_REORDER := @@ -343,7 +343,7 @@ LIBJLI_CFLAGS += $(addprefix -I, $(LIBJLI_SRC_DIRS)) ifneq ($(USE_EXTERNAL_LIBZ), true) LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS) LIBJLI_EXTRA_FILES += \ - $(addprefix $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8/, \ + $(addprefix $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib/, \ inflate.c \ inftrees.c \ inffast.c \ diff --git a/jdk/make/lib/LibCommon.gmk b/jdk/make/lib/LibCommon.gmk index f326842d0d9..4e1cab991aa 100644 --- a/jdk/make/lib/LibCommon.gmk +++ b/jdk/make/lib/LibCommon.gmk @@ -73,7 +73,7 @@ INSTALL_LIBRARIES_HERE := $(call FindLibDirForModule, $(MODULE)) ifeq ($(USE_EXTERNAL_LIBZ), true) LIBZ := -lz else - ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 + ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib endif ############################################################################### diff --git a/jdk/make/mapfiles/libinstrument/mapfile-vers b/jdk/make/mapfiles/libinstrument/mapfile-vers index 748670139bd..c51a8af2dc7 100644 --- a/jdk/make/mapfiles/libinstrument/mapfile-vers +++ b/jdk/make/mapfiles/libinstrument/mapfile-vers @@ -39,6 +39,7 @@ SUNWprivate_1.1 { Java_sun_instrument_InstrumentationImpl_getObjectSize0; Java_sun_instrument_InstrumentationImpl_appendToClassLoaderSearch0; Java_sun_instrument_InstrumentationImpl_setNativeMethodPrefixes; + Java_sun_instrument_InstrumentationImpl_loadAgent0; local: *; }; diff --git a/jdk/make/mapfiles/libjava/mapfile-vers b/jdk/make/mapfiles/libjava/mapfile-vers index c08bc2c12f0..8a4f9e4ce45 100644 --- a/jdk/make/mapfiles/libjava/mapfile-vers +++ b/jdk/make/mapfiles/libjava/mapfile-vers @@ -128,7 +128,6 @@ SUNWprivate_1.1 { Java_java_lang_Class_isInstance; Java_java_lang_Class_registerNatives; Java_java_lang_ClassLoader_findBootstrapClass; - Java_java_lang_ClassLoader_defineClass0; Java_java_lang_ClassLoader_defineClass1; Java_java_lang_ClassLoader_defineClass2; Java_java_lang_ClassLoader_findBuiltinLib; @@ -274,12 +273,11 @@ SUNWprivate_1.1 { Java_jdk_internal_misc_VM_getRuntimeArguments; Java_jdk_internal_misc_VM_initialize; - Java_java_lang_reflect_Module_defineModule0; - Java_java_lang_reflect_Module_addReads0; - Java_java_lang_reflect_Module_addExports0; - Java_java_lang_reflect_Module_addExportsToAll0; - Java_java_lang_reflect_Module_addExportsToAllUnnamed0; - Java_java_lang_reflect_Module_addPackage0; + Java_java_lang_Module_defineModule0; + Java_java_lang_Module_addReads0; + Java_java_lang_Module_addExports0; + Java_java_lang_Module_addExportsToAll0; + Java_java_lang_Module_addExportsToAllUnnamed0; Java_jdk_internal_loader_BootLoader_getSystemPackageLocation; Java_jdk_internal_loader_BootLoader_getSystemPackageNames; diff --git a/jdk/make/rmic/RmicCommon.gmk b/jdk/make/rmic/RmicCommon.gmk index bfc5b859b54..2eedfda9139 100644 --- a/jdk/make/rmic/RmicCommon.gmk +++ b/jdk/make/rmic/RmicCommon.gmk @@ -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 @@ -29,7 +29,7 @@ include $(SPEC) include MakeBase.gmk include RMICompilation.gmk -########################################################################################## +################################################################################ ifeq ($(BOOT_JDK_MODULAR), true) RMIC_MAIN_CLASS := -m jdk.rmic/sun.rmi.rmic.Main @@ -37,12 +37,13 @@ else RMIC_MAIN_CLASS := sun.rmi.rmic.Main endif -RMIC := $(JAVA_SMALL) $(INTERIM_OVERRIDE_MODULES_ARGS) $(RMIC_MAIN_CLASS) +RMIC := $(JAVA_SMALL) $(INTERIM_RMIC_OVERRIDE_MODULES_ARGS) $(RMIC_MAIN_CLASS) CLASSES_DIR := $(JDK_OUTPUTDIR)/modules -# NOTE: If the smart javac dependency management is reintroduced, these classes risk -# interfering with the dependency checking. In that case they will need to be kept separate. +# NOTE: If the smart javac dependency management is reintroduced, these classes +# risk interfering with the dependency checking. In that case they will need to +# be kept separate. STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules RMIC_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/rmic -########################################################################################## +################################################################################ diff --git a/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java b/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java index 4de7b5c719a..8301929ebd1 100644 --- a/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java +++ b/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java @@ -25,29 +25,25 @@ package build.tools.jigsaw; +import com.sun.tools.jdeps.ModuleDotGraph; + import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; -import java.lang.module.ResolvedModule; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Properties; import java.util.Set; -import java.util.TreeSet; import java.util.function.Function; - -import static java.util.stream.Collectors.*; -import static java.lang.module.ModuleDescriptor.Requires.Modifier.TRANSITIVE; +import java.util.stream.Collectors; /** * Generate the DOT file for a module graph for each module in the JDK @@ -56,238 +52,209 @@ import static java.lang.module.ModuleDescriptor.Requires.Modifier.TRANSITIVE; public class GenGraphs { public static void main(String[] args) throws Exception { + Path dir = null; + boolean spec = false; + Properties props = null; + for (int i=0; i < args.length; i++) { + String arg = args[i]; + if (arg.equals("--spec")) { + spec = true; + } else if (arg.equals("--dot-attributes")) { + if (i++ == args.length) { + throw new IllegalArgumentException("Missing argument: --dot-attributes option"); + } + props = new Properties(); + props.load(Files.newInputStream(Paths.get(args[i]))); + } else if (arg.equals("--output")) { + dir = ++i < args.length ? Paths.get(args[i]) : null; + } else if (arg.startsWith("-")) { + throw new IllegalArgumentException("Invalid option: " + arg); + } + } - if (args.length != 1) { - System.err.println("ERROR: specify the output directory"); + if (dir == null) { + System.err.println("ERROR: must specify --output argument"); System.exit(1); } - Path dir = Paths.get(args[0]); + Files.createDirectories(dir); + ModuleGraphAttributes attributes; + if (props != null) { + attributes = new ModuleGraphAttributes(props); + } else { + attributes = new ModuleGraphAttributes(); + } + GenGraphs genGraphs = new GenGraphs(dir, spec, attributes); + // print dot file for each module + Map configurations = new HashMap<>(); + Set modules = new HashSet<>(); ModuleFinder finder = ModuleFinder.ofSystem(); - - Set javaSEModules - = new TreeSet<>(finder.findAll().stream() - .map(ModuleReference::descriptor) - .filter(m -> (m.name().startsWith("java.") && - !m.name().equals("java.smartcardio"))) - .collect(toSet())); - Set jdkModules - = new TreeSet<>(finder.findAll().stream() - .map(ModuleReference::descriptor) - .filter(m -> !javaSEModules.contains(m)) - .collect(toSet())); - - GenGraphs genGraphs = new GenGraphs(dir, javaSEModules, jdkModules); - Set mods = new HashSet<>(); - for (ModuleReference mref: finder.findAll()) { - mods.add(mref.descriptor().name()); - genGraphs.genDotFile(mref); + for (ModuleReference mref : finder.findAll()) { + String name = (mref.descriptor().name()); + modules.add(name); + if (genGraphs.accept(name, mref.descriptor())) { + configurations.put(name, Configuration.empty() + .resolve(finder, + ModuleFinder.of(), + Set.of(name))); + } } - // all modules - genGraphs.genDotFile("jdk", mods); + if (genGraphs.accept("jdk", null)) { + // print a graph of all JDK modules + configurations.put("jdk", Configuration.empty() + .resolve(finder, + ModuleFinder.of(), + modules)); + } + genGraphs.genDotFiles(configurations); } - private static final String ORANGE = "#e76f00"; - private static final String BLUE = "#437291"; - private static final String GRAY = "#dddddd"; + /** + * Custom dot file attributes. + */ + static class ModuleGraphAttributes implements ModuleDotGraph.Attributes { + static Map DEFAULT_ATTRIBUTES = Map.of( + "ranksep", "0.6", + "fontsize", "12", + "fontcolor", BLACK, + "fontname", "DejaVuSans", + "arrowsize", "1", + "arrowwidth", "2", + "arrowcolor", DARK_GRAY, + // custom + "requiresMandatedColor", LIGHT_GRAY, + "javaSubgraphColor", ORANGE, + "jdkSubgraphColor", BLUE + ); - private static final String REEXPORTS = ""; - private static final String REQUIRES = "style=\"dashed\""; - private static final String REQUIRES_BASE = "color=\"" + GRAY + "\""; + final Map weights = new HashMap<>(); + final List> ranks = new ArrayList<>(); + final Map attrs; + ModuleGraphAttributes(Map attrs) { + int h = 1000; + weight("java.se", "java.sql.rowset", h * 10); + weight("java.sql.rowset", "java.sql", h * 10); + weight("java.sql", "java.xml", h * 10); + weight("java.xml", "java.base", h * 10); - private static final Map weights = new HashMap<>(); - private static final List> ranks = new ArrayList<>(); + ranks.add(Set.of("java.logging", "java.scripting", "java.xml")); + ranks.add(Set.of("java.sql")); + ranks.add(Set.of("java.compiler", "java.instrument")); + ranks.add(Set.of("java.desktop", "java.management")); + ranks.add(Set.of("java.corba", "java.xml.ws")); + ranks.add(Set.of("java.xml.bind", "java.xml.ws.annotation")); - private static void weight(String s, String t, int w) { - weights.put(s + ":" + t, w); - } + this.attrs = attrs; + } - private static int weightOf(String s, String t) { - int w = weights.getOrDefault(s + ":" + t, 1); - if (w != 1) - return w; - if (s.startsWith("java.") && t.startsWith("java.")) - return 10; - return 1; - } + ModuleGraphAttributes() { + this(DEFAULT_ATTRIBUTES); + } + ModuleGraphAttributes(Properties props) { + this(toAttributes(props)); + } - static { - int h = 1000; - weight("java.se", "java.sql.rowset", h * 10); - weight("java.sql.rowset", "java.sql", h * 10); - weight("java.sql", "java.xml", h * 10); - weight("java.xml", "java.base", h * 10); + @Override + public double rankSep() { + return Double.valueOf(attrs.get("ranksep")); + } - ranks.add(Set.of("java.logging", "java.scripting", "java.xml")); - ranks.add(Set.of("java.sql")); - ranks.add(Set.of("java.compiler", "java.instrument")); - ranks.add(Set.of("java.desktop", "java.management")); - ranks.add(Set.of("java.corba", "java.xml.ws")); - ranks.add(Set.of("java.xml.bind", "java.xml.ws.annotation")); + @Override + public int fontSize() { + return Integer.valueOf(attrs.get("fontsize")); + } + @Override + public String fontName() { + return attrs.get("fontname"); + } + + @Override + public String fontColor() { + return attrs.get("fontcolor"); + } + + @Override + public int arrowSize() { + return Integer.valueOf(attrs.get("arrowsize")); + } + + @Override + public int arrowWidth() { + return Integer.valueOf(attrs.get("arrowwidth")); + } + + @Override + public String arrowColor() { + return attrs.get("arrowcolor"); + } + + @Override + public List> ranks() { + return ranks; + } + + @Override + public String requiresMandatedColor() { + return attrs.get("requiresMandatedColor"); + } + + @Override + public String javaSubgraphColor() { + return attrs.get("javaSubgraphColor"); + } + + @Override + public String jdkSubgraphColor() { + return attrs.get("jdkSubgraphColor"); + } + + @Override + public int weightOf(String s, String t) { + int w = weights.getOrDefault(s + ":" + t, 1); + if (w != 1) + return w; + if (s.startsWith("java.") && t.startsWith("java.")) + return 10; + return 1; + } + + public void weight(String s, String t, int w) { + weights.put(s + ":" + t, w); + } + + static Map toAttributes(Properties props) { + return DEFAULT_ATTRIBUTES.keySet().stream() + .collect(Collectors.toMap(Function.identity(), + k -> props.getProperty(k, DEFAULT_ATTRIBUTES.get(k)))); + } } private final Path dir; - private final Set javaGroup; - private final Set jdkGroup; - - GenGraphs(Path dir, Set javaGroup, Set jdkGroup) { + private final boolean spec; + private final ModuleGraphAttributes attributes; + GenGraphs(Path dir, boolean spec, ModuleGraphAttributes attributes) { this.dir = dir; - this.javaGroup = Collections.unmodifiableSet(javaGroup); - this.jdkGroup = Collections.unmodifiableSet(jdkGroup); + this.spec = spec; + this.attributes = attributes; + } + + void genDotFiles(Map configurations) throws IOException { + ModuleDotGraph dotGraph = new ModuleDotGraph(configurations, spec); + dotGraph.genDotFiles(dir, attributes); } /** - * Generates a dot file for the given module reference as the root. + * Returns true for any name if generating graph for non-spec; + * otherwise, returns true except "jdk" and name with "jdk.internal." prefix */ - void genDotFile(ModuleReference mref) throws IOException { - String name = mref.descriptor().name(); - genDotFile(name, Set.of(name)); - } + boolean accept(String name, ModuleDescriptor descriptor) { + if (!spec) + return true; - /** - * Generates a dot file for the given set of root modules. - */ - void genDotFile(String name, Set roots) throws IOException { - Configuration cf = - Configuration.empty().resolveRequires(ModuleFinder.ofSystem(), - ModuleFinder.of(), - roots); - - Set mds = cf.modules().stream() - .map(ResolvedModule::reference) - .map(ModuleReference::descriptor) - .collect(toSet()); - - // generate a dot file for the resolved graph - try (OutputStream os = Files.newOutputStream(dir.resolve(name + ".dot")); - PrintStream out = new PrintStream(os)) { - printGraph(out, name, gengraph(cf), - mds.stream() - .collect(toMap(ModuleDescriptor::name, Function.identity())) - ); - } - - if (name.equals("java.se") || name.equals("java.se.ee")) { - // generate a dot file for Java SE module graph - try (OutputStream os = Files.newOutputStream(dir.resolve(name + "-spec.dot")); - PrintStream out = new PrintStream(os)) { - // transitive reduction on the graph of `requires transitive` edges - // filter out jdk.* modules which are implementation dependences - Graph graph = requiresTransitiveGraph(cf, true); - printGraph(out, name, graph, - mds.stream() - .filter(md -> !md.name().startsWith("jdk.") && - graph.nodes().contains(md.name())) - .collect(toMap(ModuleDescriptor::name, Function.identity())) - ); - } - } - } - - private void printGraph(PrintStream out, - String name, - Graph graph, - Map nameToModule) - throws IOException - { - Set descriptors = new TreeSet<>(nameToModule.values()); - - out.format("digraph \"%s\" {%n", name); - out.format("size=\"25,25\";"); - out.format("nodesep=.5;%n"); - out.format("ranksep=1.5;%n"); - out.format("pencolor=transparent;%n"); - out.format("node [shape=plaintext, fontname=\"DejaVuSans\", fontsize=36, margin=\".2,.2\"];%n"); - out.format("edge [penwidth=4, color=\"#999999\", arrowhead=open, arrowsize=2];%n"); - - out.format("subgraph %sse {%n", name.equals("jdk") ? "cluster_" : ""); - descriptors.stream() - .filter(javaGroup::contains) - .map(ModuleDescriptor::name) - .forEach(mn -> out.format(" \"%s\" [fontcolor=\"%s\", group=%s];%n", - mn, ORANGE, "java")); - out.format("}%n"); - - // same ranks - ranks.stream() - .map(group -> descriptors.stream() - .map(ModuleDescriptor::name) - .filter(group::contains) - .map(mn -> "\"" + mn + "\"") - .collect(joining(","))) - .filter(group -> group.length() > 0) - .forEach(group -> out.format("{rank=same %s}%n", group)); - - descriptors.stream() - .filter(jdkGroup::contains) - .map(ModuleDescriptor::name) - .forEach(mn -> out.format(" \"%s\" [fontcolor=\"%s\", group=%s];%n", - mn, BLUE, "jdk")); - - descriptors.stream() - .forEach(md -> { - String mn = md.name(); - Set requiresTransitive = md.requires().stream() - .filter(d -> d.modifiers().contains(TRANSITIVE)) - .map(d -> d.name()) - .collect(toSet()); - - graph.adjacentNodes(mn) - .stream() - .filter(nameToModule::containsKey) - .forEach(dn -> { - String attr = dn.equals("java.base") ? REQUIRES_BASE - : (requiresTransitive.contains(dn) ? REEXPORTS : REQUIRES); - int w = weightOf(mn, dn); - if (w > 1) - attr += "weight=" + w; - out.format(" \"%s\" -> \"%s\" [%s];%n", mn, dn, attr); - }); - }); - - out.println("}"); - } - - /** - * Returns a Graph of the given Configuration after transitive reduction. - * - * Transitive reduction of requires transitive edge and requires edge have - * to be applied separately to prevent the requires transitive edges - * (e.g. U -> V) from being reduced by a path (U -> X -> Y -> V) - * in which V would not be re-exported from U. - */ - private Graph gengraph(Configuration cf) { - Graph.Builder builder = new Graph.Builder<>(); - for (ResolvedModule resolvedModule : cf.modules()) { - String mn = resolvedModule.reference().descriptor().name(); - builder.addNode(mn); - resolvedModule.reads().stream() - .map(ResolvedModule::name) - .forEach(target -> builder.addEdge(mn, target)); - } - Graph rpg = requiresTransitiveGraph(cf, false); - return builder.build().reduce(rpg); - } - - /** - * Returns a Graph containing only requires transitive edges - * with transitive reduction. - */ - private Graph requiresTransitiveGraph(Configuration cf, boolean includeBase) { - Graph.Builder builder = new Graph.Builder<>(); - for (ResolvedModule resolvedModule : cf.modules()) { - ModuleDescriptor descriptor = resolvedModule.reference().descriptor(); - String mn = descriptor.name(); - descriptor.requires().stream() - .filter(d -> d.modifiers().contains(TRANSITIVE) - || (includeBase && d.name().equals("java.base"))) - .map(d -> d.name()) - .forEach(d -> builder.addEdge(mn, d)); - } - return builder.build().reduce(); + return !name.equals("jdk") && !name.startsWith("jdk.internal."); } } diff --git a/jdk/make/src/classes/build/tools/jigsaw/Graph.java b/jdk/make/src/classes/build/tools/jigsaw/Graph.java deleted file mode 100644 index a835da1ad93..00000000000 --- a/jdk/make/src/classes/build/tools/jigsaw/Graph.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package build.tools.jigsaw; - -import java.io.PrintStream; -import java.util.Deque; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.Map; -import java.util.Set; - -public class Graph { - private static boolean traceOn = Boolean.getBoolean("build.tools.module.trace"); - private final Set nodes; - private final Map> edges; - private Graph(Set nodes, Map> edges) { - this.nodes = nodes; - this.edges = edges; - } - - public Set nodes() { - return nodes; - } - - public Map> edges() { - return edges; - } - - public Set adjacentNodes(T u) { - return edges.get(u); - } - - /** - * Returns a new Graph after transitive reduction - */ - public Graph reduce() { - Graph.Builder builder = new Builder<>(); - nodes.stream() - .forEach(u -> { - builder.addNode(u); - edges.get(u).stream() - .filter(v -> !pathExists(u, v, false)) - .forEach(v -> builder.addEdge(u, v)); - }); - return builder.build(); - } - - /** - * Returns a new Graph after transitive reduction. All edges in - * the given g takes precedence over this graph. - * - * @throw IllegalArgumentException g must be a subgraph this graph - */ - public Graph reduce(Graph g) { - boolean subgraph = nodes.containsAll(g.nodes) && g.edges.keySet().stream() - .allMatch(u -> adjacentNodes(u).containsAll(g.adjacentNodes(u))); - if (!subgraph) { - throw new IllegalArgumentException("the given argument is not a subgraph of this graph"); - } - - Graph.Builder builder = new Builder<>(); - nodes.stream() - .forEach(u -> { - builder.addNode(u); - // filter the edge if there exists a path from u to v in the given g - // or there exists another path from u to v in this graph - edges.get(u).stream() - .filter(v -> !g.pathExists(u, v) && !pathExists(u, v, false)) - .forEach(v -> builder.addEdge(u, v)); - }); - - // add the overlapped edges from this graph and the given g - g.edges().keySet().stream() - .forEach(u -> g.adjacentNodes(u).stream() - .filter(v -> isAdjacent(u, v)) - .forEach(v -> builder.addEdge(u, v))); - return builder.build(); - } - - private boolean isAdjacent(T u, T v) { - return edges.containsKey(u) && edges.get(u).contains(v); - } - - private boolean pathExists(T u, T v) { - return pathExists(u, v, true); - } - - /** - * Returns true if there exists a path from u to v in this graph. - * If includeAdjacent is false, it returns true if there exists - * another path from u to v of distance > 1 - */ - private boolean pathExists(T u, T v, boolean includeAdjacent) { - if (!nodes.contains(u) || !nodes.contains(v)) { - return false; - } - if (includeAdjacent && isAdjacent(u, v)) { - return true; - } - Deque stack = new LinkedList<>(); - Set visited = new HashSet<>(); - stack.push(u); - while (!stack.isEmpty()) { - T node = stack.pop(); - if (node.equals(v)) { - if (traceOn) { - System.out.format("Edge %s -> %s removed%n", u, v); - } - return true; - } - if (!visited.contains(node)) { - visited.add(node); - edges.get(node).stream() - .filter(e -> includeAdjacent || !node.equals(u) || !e.equals(v)) - .forEach(e -> stack.push(e)); - } - } - assert !visited.contains(v); - return false; - } - - void printGraph(PrintStream out) { - nodes.stream() - .forEach(u -> adjacentNodes(u).stream() - .forEach(v -> out.format("%s -> %s%n", u, v))); - } - - public static class Builder { - final Set nodes = new HashSet<>(); - final Map> edges = new HashMap<>(); - public void addNode(T node) { - if (nodes.contains(node)) { - return; - } - nodes.add(node); - edges.computeIfAbsent(node, _e -> new HashSet<>()); - } - public void addEdge(T u, T v) { - addNode(u); - addNode(v); - edges.get(u).add(v); - } - public Graph build() { - return new Graph<>(nodes, edges); - } - } -} diff --git a/jdk/make/src/classes/build/tools/jigsaw/ListPackages.java b/jdk/make/src/classes/build/tools/jigsaw/ListPackages.java new file mode 100644 index 00000000000..89cbc2892aa --- /dev/null +++ b/jdk/make/src/classes/build/tools/jigsaw/ListPackages.java @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package build.tools.jigsaw; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; +import java.io.UncheckedIOException; +import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleFinder; +import java.lang.module.ModuleReference; +import java.net.URI; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.BasicFileAttributes; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * Run this tool to generate the JDK internal APIs in the previous releases + * including platform-specific internal APIs. + */ +public class ListPackages { + // Filter non-interesting JAR files + private final static List excludes = Arrays.asList( + "deploy.jar", + "javaws.jar", + "plugin.jar", + "cldrdata.jar", + "localedata.jar" + ); + private static void usage() { + System.out.println("ListPackages [-o ] [-jdkinternals] []*"); + } + + private static final Set EXPORTED_PACKAGES = new HashSet<>(); + + public static void main(String... args) throws IOException { + List paths = new ArrayList<>(); + Path outFile = null; + boolean jdkinternals = false; + int i=0; + while (i < args.length) { + String arg = args[i++]; + if (arg.equals("-o")) { + outFile = Paths.get(args[i++]); + } else if (arg.equals("-jdkinternals")) { + jdkinternals = true; + } else { + Path p = Paths.get(arg); + if (Files.notExists(p)) + throw new IllegalArgumentException(p + " not exist"); + paths.add(p); + } + } + if (paths.isEmpty()) { + usage(); + System.exit(1); + } + + // Get the exported APIs from the current JDK releases + Path javaHome = Paths.get(System.getProperty("java.home")); + ModuleFinder.ofSystem().findAll() + .stream() + .map(ModuleReference::descriptor) + .filter(md -> !md.name().equals("jdk.unsupported")) + .flatMap(md -> md.exports().stream()) + .filter(exp -> !exp.isQualified()) + .map(ModuleDescriptor.Exports::source) + .forEach(EXPORTED_PACKAGES::add); + + ListPackages listPackages = new ListPackages(paths); + Stream pkgs = listPackages.packages().stream(); + if (jdkinternals) { + pkgs = pkgs.filter(pn -> !EXPORTED_PACKAGES.contains(pn)); + } + if (outFile != null) { + try (OutputStream out = Files.newOutputStream(outFile); + PrintStream pw = new PrintStream(out)) { + write(pw, pkgs); + } + } else { + write(System.out, pkgs); + } + } + + + private static void write(PrintStream pw, Stream packages) { + pw.println("# This file is auto-generated by ListPackages tool on " + + LocalDateTime.now().toString()); + packages.sorted().forEach(pw::println); + } + + private final Set packages = new HashSet<>(); + ListPackages(List dirs) throws IOException { + for (Path p : dirs) { + packages.addAll(list(p)); + } + } + + Set packages() { + return packages; + } + + private Set list(Path javaHome) throws IOException { + Path jrt = javaHome.resolve("lib").resolve("modules"); + Path jre = javaHome.resolve("jre"); + + if (Files.exists(jrt)) { + return listModularRuntime(javaHome); + } else if (Files.exists(jre.resolve("lib").resolve("rt.jar"))) { + return listLegacyRuntime(javaHome); + } + throw new IllegalArgumentException("invalid " + javaHome); + } + + private Set listModularRuntime(Path javaHome) throws IOException { + Map env = new HashMap<>(); + env.put("java.home", javaHome.toString()); + FileSystem fs = FileSystems.newFileSystem(URI.create("jrt:/"), env); + Path root = fs.getPath("packages"); + return Files.walk(root, 1) + .map(Path::getFileName) + .map(Path::toString) + .collect(Collectors.toSet()); + } + + private Set listLegacyRuntime(Path javaHome) throws IOException { + List dirs = new ArrayList<>(); + Path jre = javaHome.resolve("jre"); + Path lib = javaHome.resolve("lib"); + + dirs.add(jre.resolve("lib")); + dirs.add(jre.resolve("lib").resolve("ext")); + dirs.add(lib.resolve("tools.jar")); + dirs.add(lib.resolve("jconsole.jar")); + Set packages = new HashSet<>(); + for (Path d : dirs) { + Files.find(d, 1, (Path p, BasicFileAttributes attr) + -> p.getFileName().toString().endsWith(".jar") && + !excludes.contains(p.getFileName().toString())) + .map(ListPackages::walkJarFile) + .forEach(packages::addAll); + } + return packages; + } + + static Set walkJarFile(Path jarfile) { + try (JarFile jf = new JarFile(jarfile.toFile())) { + return jf.stream() + .map(JarEntry::getName) + .filter(n -> n.endsWith(".class")) + .map(ListPackages::toPackage) + .collect(Collectors.toSet()); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + static String toPackage(String name) { + int i = name.lastIndexOf('/'); + if (i < 0) { + System.err.format("Warning: unnamed package %s%n", name); + } + return i >= 0 ? name.substring(0, i).replace("/", ".") : ""; + } +} diff --git a/jdk/make/src/classes/build/tools/jigsaw/ModuleSummary.java b/jdk/make/src/classes/build/tools/jigsaw/ModuleSummary.java index e55a1c04855..520fb1b96b0 100644 --- a/jdk/make/src/classes/build/tools/jigsaw/ModuleSummary.java +++ b/jdk/make/src/classes/build/tools/jigsaw/ModuleSummary.java @@ -291,9 +291,9 @@ public class ModuleSummary { static Configuration resolve(Set roots) { return Configuration.empty() - .resolveRequires(ModuleFinder.ofSystem(), - ModuleFinder.of(), - roots); + .resolve(ModuleFinder.ofSystem(), + ModuleFinder.of(), + roots); } static class HtmlDocument { diff --git a/jdk/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties b/jdk/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties new file mode 100644 index 00000000000..75348c3f7be --- /dev/null +++ b/jdk/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties @@ -0,0 +1,2 @@ +arrowcolor=#999999 +requiresMandatedColor=#999999 diff --git a/jdk/make/src/classes/build/tools/jigsaw/technology-summary.html b/jdk/make/src/classes/build/tools/jigsaw/technology-summary.html index e42ed25b728..1c86f905f19 100644 --- a/jdk/make/src/classes/build/tools/jigsaw/technology-summary.html +++ b/jdk/make/src/classes/build/tools/jigsaw/technology-summary.html @@ -1,625 +1,534 @@ -JDK Technology Summary +JCP Technologies in JDK 9 -

    JCP Technologies in the Modular JDK

    +

    JCP Technologies in JDK 9

    -

    Last updated 2015-03-06 (Added java.datatransfer. Assumes JNLP is modularized, and StAX joins the Java SE Platform.)

    +

    Last updated 2017-06-08

    -

    JDK Module Summary | Technologies in the Java SE Documentation

    +

    JDK 9 Module Summary | Technologies in the Java SE 8 Documentation

    - - - + + +
    Legend
    JCP technology in the Java SE Platform only -- in java.base
    JCP technology in the Java SE Platform only -- not in java.base
    JCP technology in the Java SE Platform and the Java EE Platform
    JCP technology in the Java SE Platform based on non-JCP standards
    JCP technology in neither the Java SE or EE Platforms
    JCP technology in the Java SE Platform derived from the Java EE Platform
    JCP technology in the Java SE Platform derived from non-JCP standards
    JCP technology in neither the Java SE or EE Platforms
    -

    An upgradeable module contains JCP technology that is in the Java SE Platform but is not exclusive to the Java SE Platform, i.e., the green and pink technologies. Most upgradeable modules are defined by loaders other than the bootstrap.

    -
    + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - - - - - - - - - - + - - + + - - - + + - - + - - - + + - - + - - - + + - - - - - + + - - - - - - - - - - - - - - - - + + - - - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + - - - + + + + - - - - - - + - - - + + + - - + + - - - - + + - - + + - + + - - - - + - - + + - - - - + + - + + - - - - - - + + + - + - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    JSR TechnologyOriginal JSROriginal TargetEvolved By ModuleEvolved ByHistoryProfile/SE Loader Upg?
    JMX3Java SEjava.managementUJSR for Java SE3bootNo
    Print Service6Java SEjava.desktopUJSR for Java SESEbootNo
    Preferences10Java SEjava.prefsUJSR for Java SE3bootNo
    Image I/O15Java SEjava.desktopUJSR for Java SESEbootNo
    SASL28Java SEjava.security.saslUJSR for Java SE3bootNo
    Logging47Java SEjava.loggingUJSR for Java SE1bootNoNotesAggregator
    NIO51Java SEjava.baseUJSR for Java SE1bootNo
    JNLP56Java SEjava.jnlpOriginal JSRN/AbootNo
    Beans Persistence57Java SEjava.desktopUJSR for Java SESEbootNo
    GSS72Java SEjava.security.jgssUJSR for Java SE3bootNo
    XML Digital Signature105Java SEjava.xml.cryptoUJSR for Java SE3bootNo
    JDBC Rowset114Java SEjava.sql.rowsetOriginal JSRCo-evolved with JDBC3bootNo
    JMX Remote160Java SEjava.managementUJSR for Java SE3bootNo
    Profiling (Agent)163Java SEjava.instrumentUJSR for Java SE3bootNo
    Profiling (JMX)163Java SEjava.managementUJSR for Java SE3bootNo
    Concurrency Utilities166Java SEjava.baseUJSR for Java SE1bootNo
    Annotations175Java SEjava.baseUJSR for Java SE1bootNo
    StAX173Java SEjava.xmlOriginal JSRFormerly a Standalone Technology2bootNo
    Annotations (Language Model)175Java SEjava.compilerUJSR for Java SE3bootNo
    Compiler199Java SEjava.compilerOriginal JSRFormerly a Standalone Technology3bootNo
    Pack200200Java SEjava.baseUJSR for Java SE1bootNo
    NIO.2203Java SEjava.baseUJSR for Java SE1bootNo
    JAXP206Java SEjava.xmlUJSR for Java SEFormerly a Standalone Technology2bootNo
    JDBC221Java SEjava.sqlOriginal JSRCo-evolved with JDBC Rowset2bootNo
    Scripting223Java SEjava.scriptingOriginal JSRFormerly a Standalone Technology1bootNo
    Smart Card I/O268Java SEjava.smartcardioOriginal JSRFormerly a Standalone Technology (unlisted)N/AbootNo
    Annotation Processing269Java SEjava.compilerOriginal JSRFormerly a Standalone Technology3bootNo
    InvokeDynamic292Java SEjava.baseUJSR for Java SE1bootNo
    Type Annotations308Java SEjava.baseUJSR for Java SE1bootNo
    Type Annotations (Language Model)308Java SEjava.compilerUJSR for Java SE3bootNo
    Date and Time310Java SEjava.baseUJSR for Java SE1bootNo
    Streams335Java SEjava.baseUJSR for Java SE1bootNo
    Collections, Math, I18N, I/O, Net, Reflection ------java.baseCollections, Concurrency,
    Core Reflection, I18N, I/O,
    JAAS, JCA, JSSE, Math, Net, Text
    UJSR for Java SE1java.base boot No
    JCA, JAAS, JSSE------java.baseUJSR for Java SE 1bootNojava.se
    Applet, AWT, Swing, Java 2D, Beans, A11Y, Sound--- ---A11Y, Applet, AWT, Beans,
    Image I/O, Java 2D,
    Print, Sound, Swing
    UJSR for Java SE java.desktopUJSR for Java SESE boot No
    --- Data Transfer------UJSR for Java SE java.datatransferUJSR for Java SESE boot No
    --- JNDI------UJSR for Java SE java.namingUJSR for Java SE3 boot No
    --- RMI------java.rmi UJSR for Java SE2java.rmi boot No
    JAF925---java.activationOriginal JSRFormerly a Standalone Technology (unlisted)SEextYes
    RMI-IIOP, IDL(OMG)---java.corba3JMX UJSR for Java SEFormerly an Endorsed StandardSEextYesjava.managementbootNo
    DOM, SAX(W3C)---
    6Print ServiceUJSR for Java SEjava.desktopbootNo
    10PreferencesUJSR for Java SEjava.prefsbootNo
    15Image I/OUJSR for Java SEjava.desktopbootNo
    28SASLUJSR for Java SEjava.security.saslbootNo
    47LoggingUJSR for Java SEjava.loggingbootNo
    51NIOUJSR for Java SEjava.basebootNo
    57Beans PersistenceUJSR for Java SEjava.desktopbootNo
    72GSSUJSR for Java SEjava.security.jgssplatNo
    105XML Digital SignatureUJSR for Java SEjava.xml.cryptoplatNo
    114JDBC RowsetOriginal JSRjava.sql.rowsetplatNoCo-developed with JDBC
    160JMX RemoteUJSR for Java SEjava.managementbootNo
    160JMX Remote (RMI)UJSR for Java SEjava.management.rmibootNo
    163Instrumentation UJSR for Java SEjava.instrumentbootNoCo-developed with JVMTI
    163Monitoring & Management UJSR for Java SEjava.managementbootNo
    166Concurrency UtilitiesUJSR for Java SEjava.basebootNo
    173StAXUJSR for Java SE java.xmlbootNoFormerly a Standalone Technology
    175Annotations (Core Reflection) UJSR for Java SEjava.basebootNo
    175Annotations (Language Model)UJSR for Java SEjava.compilerplatYesCo-located with a former Standalone Technology
    199CompilerOriginal JSRjava.compilerplatYesFormerly a Standalone Technology
    200Pack200UJSR for Java SEjava.basebootNo
    203NIO.2UJSR for Java SEjava.basebootNo
    206JAXPUJSR for Java SEjava.xmlbootNoFormerly a Standalone Technology
    221JDBCOriginal JSRjava.sqlplatNoCo-developed with JDBC Rowset
    223ScriptingUJSR for Java SEjava.scriptingplatNoFormerly a Standalone Technology
    269Annotation ProcessingOriginal JSRjava.compilerplatYesFormerly a Standalone Technology
    292InvokeDynamicUJSR for Java SEjava.basebootNo
    308Type Annotations (Core Reflection)UJSR for Java SEjava.basebootNo
    308Type Annotations (Language Model)UJSR for Java SEjava.compilerplatYesCo-located with a former Standalone Technology
    310Date and TimeUJSR for Java SEjava.basebootNo
    335StreamsUJSR for Java SEjava.basebootNo
    (W3C)DOM, SAXUJSR for Java SEjava.xmlbootNo Formerly an Endorsed Standard2bootNo
    (OMG)RMI-IIOP, IDLUJSR for Java SEjava.corbaplatYesFormerly an Endorsed Standardjava.se.ee
    SAAJ 67Java SEjava.xml.wsSAAJ Original JSRjava.xml.wsplatYes Formerly a Standalone Technology (f.k.a. JAXM)SEextYes
    Web Services Metadata 181Java EEjava.xml.wsWeb Services Metadata Original JSRFormerly a Standalone Technology (unlisted)SEextjava.xml.wsplat YesFormerly a Standalone Technology (unlisted)
    JAXB 222Java SEJAXBOriginal JSR java.xml.bindOriginal JSRFormerly a Standalone TechnologySEextplat YesFormerly a Standalone Technology
    JAXWS 224Java SEJAXWSOriginal JSR java.xml.wsOriginal JSRplatYes Formerly a Standalone TechnologySEextYes
    Common Annotations 250Java SE,EECommon AnnotationsOriginal JSR java.xml.ws.annotationOriginal JSRFormerly a Standalone Technology (unlisted)SEextplat YesFormerly a Standalone Technology (unlisted)
    907 JTA (non-XA)907---java.transaction Original JSRFormerly a Standalone Technology (unlisted)SEextjava.transactionplat YesFormerly a Standalone Technology (unlisted)
    JTA (XA) 907---java.sqlJTA (XA) Original JSRFormerly a Standalone Technology (unlisted)2bootjava.sqlplat NoFormerly a Standalone Technology (unlisted)java.se
    925JAFOriginal JSRjava.activationplatYesFormerly a Standalone Technology (unlisted)java.se.ee
    56JNLPOriginal JSRjava.jnlpplatYesNone
    268Smart Card I/OOriginal JSRjava.smartcardioplatNoFormerly a Standalone Technology (unlisted)
    diff --git a/jdk/make/src/classes/build/tools/taglet/ExtLink.java b/jdk/make/src/classes/build/tools/taglet/ExtLink.java new file mode 100644 index 00000000000..34eaed59f28 --- /dev/null +++ b/jdk/make/src/classes/build/tools/taglet/ExtLink.java @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package build.tools.taglet; + +import java.util.EnumSet; +import java.util.List; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import javax.lang.model.element.Element; + +import com.sun.source.doctree.DocTree; +import com.sun.source.doctree.UnknownInlineTagTree; +import jdk.javadoc.doclet.Taglet; + +import static com.sun.source.doctree.DocTree.Kind.*; +import static jdk.javadoc.doclet.Taglet.Location.*; + +/** + * An inline tag to conveniently insert an external link. + * The tag can be used as follows: + * {@extLink name description}, for example + *

    + * {@code Please see {@extLink Borealis a spectacular} sight.} + *

    + * will produce the following html + *

    + * {@code + * Please see a spectacular sight. + * } + */ +public class ExtLink implements Taglet { + + static final String TAG_NAME = "extLink"; + + static final String URL = "https://www.oracle.com/pls/topic/lookup?ctx=javase9&id="; + + static final Pattern TAG_PATTERN = Pattern.compile("(\\s*)(?\\w+)(\\s+)(?.*)"); + + /** + * Returns the set of locations in which the tag may be used. + */ + @Override + public Set getAllowedLocations() { + return EnumSet.allOf(jdk.javadoc.doclet.Taglet.Location.class); + } + + @Override + public boolean isInlineTag() { + return true; + } + + @Override + public String getName() { + return TAG_NAME; + } + + @Override + public String toString(List tags, Element elem) { + + if (tags.isEmpty()) + return ""; + + DocTree tag = tags.get(0); + if (tag.getKind() != UNKNOWN_INLINE_TAG) + return ""; + + UnknownInlineTagTree uitree = (UnknownInlineTagTree) tag; + if (uitree.getContent().isEmpty()) + return ""; + + String tagText = uitree.getContent().get(0).toString(); + Matcher m = TAG_PATTERN.matcher(tagText); + if (!m.find()) + return ""; + + StringBuilder sb = new StringBuilder("") + .append(m.group("desc")) + .append(""); + + return sb.toString(); + } +} diff --git a/jdk/make/src/classes/build/tools/taglet/Incubating.java b/jdk/make/src/classes/build/tools/taglet/Incubating.java index 826fadd4ddf..0670a9630ce 100644 --- a/jdk/make/src/classes/build/tools/taglet/Incubating.java +++ b/jdk/make/src/classes/build/tools/taglet/Incubating.java @@ -28,9 +28,10 @@ package build.tools.taglet; import java.util.EnumSet; import java.util.List; import java.util.Set; +import javax.lang.model.element.Element; import com.sun.source.doctree.DocTree; -import jdk.javadoc.doclet.taglet.Taglet; -import static jdk.javadoc.doclet.taglet.Taglet.Location.*; +import jdk.javadoc.doclet.Taglet; +import static jdk.javadoc.doclet.Taglet.Location.*; /** * An inline tag to conveniently insert a standard Incubating warning. For @@ -59,12 +60,7 @@ public class Incubating implements Taglet { + " Will be removed in a future release."; @Override - public String toString(DocTree tag) { - return MESSAGE; - } - - @Override - public String toString(List tags) { + public String toString(List tags, Element elem) { return MESSAGE; } } diff --git a/jdk/make/src/classes/build/tools/taglet/ModuleGraph.java b/jdk/make/src/classes/build/tools/taglet/ModuleGraph.java new file mode 100644 index 00000000000..6e2b0309667 --- /dev/null +++ b/jdk/make/src/classes/build/tools/taglet/ModuleGraph.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package build.tools.taglet; + +import java.util.EnumSet; +import java.util.List; +import java.util.Set; +import javax.lang.model.element.Element; +import javax.lang.model.element.ModuleElement; +import com.sun.source.doctree.DocTree; +import jdk.javadoc.doclet.Taglet; +import static jdk.javadoc.doclet.Taglet.Location.*; + +/** + * A block tag to optionally insert a reference to a module graph. + */ +public class ModuleGraph implements Taglet { + private static final boolean enableModuleGraph = + Boolean.getBoolean("enableModuleGraph"); + + /** Returns the set of locations in which a taglet may be used. */ + @Override + public Set getAllowedLocations() { + return EnumSet.of(MODULE); + } + + @Override + public boolean isInlineTag() { + return false; + } + + @Override + public String getName() { + return "moduleGraph"; + } + + @Override + public String toString(List tags, Element element) { + if (!enableModuleGraph) { + return ""; + } + + String moduleName = ((ModuleElement) element).getQualifiedName().toString(); + String imageFile = moduleName + "-graph.png"; + int thumbnailHeight = -1; + String hoverImage = ""; + if (!moduleName.equals("java.base")) { + thumbnailHeight = 100; // also appears in the stylesheet + hoverImage = "" + + getImage(moduleName, imageFile, -1, true) + + ""; + } + return "

    " + + "Module Graph:\n" + + "
    " + + "
    " + + "" + + getImage(moduleName, imageFile, thumbnailHeight, false) + + hoverImage + + "" + + "
    "; + } + + private static final String VERTICAL_ALIGN = "vertical-align:top"; + private static final String BORDER = "border: solid lightgray 1px;"; + + private String getImage(String moduleName, String file, int height, boolean useBorder) { + return String.format("\"Module", + useBorder ? BORDER + " " + VERTICAL_ALIGN : VERTICAL_ALIGN, + moduleName, + file, + (height <= 0 ? "" : " height=\"" + height + "\"")); + } +} diff --git a/jdk/src/demo/share/README b/jdk/src/demo/share/README index e70be01a0a2..7936fb3893e 100644 --- a/jdk/src/demo/share/README +++ b/jdk/src/demo/share/README @@ -1,4 +1,4 @@ -The source code provided with samples and demos for the JDK is meant +The source code provided with demos for the JDK is meant to illustrate the usage of a given feature or technique and has been deliberately simplified. Additional steps required for a production-quality application, such as security checks, input diff --git a/jdk/src/demo/share/jvmti/agent_util/README.txt b/jdk/src/demo/share/jvmti/agent_util/README.txt deleted file mode 100644 index 88638b01e9a..00000000000 --- a/jdk/src/demo/share/jvmti/agent_util/README.txt +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -agent_util sources - -Just some shared generic source used by several of the demos. - diff --git a/jdk/src/demo/share/jvmti/agent_util/agent_util.c b/jdk/src/demo/share/jvmti/agent_util/agent_util.c deleted file mode 100644 index 6678ef7d966..00000000000 --- a/jdk/src/demo/share/jvmti/agent_util/agent_util.c +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include - -/* ------------------------------------------------------------------- */ -/* Generic C utility functions */ - -/* Send message to stdout or whatever the data output location is */ -void -stdout_message(const char * format, ...) -{ - va_list ap; - - va_start(ap, format); - (void)vfprintf(stdout, format, ap); - va_end(ap); -} - -/* Send message to stderr or whatever the error output location is and exit */ -void -fatal_error(const char * format, ...) -{ - va_list ap; - - va_start(ap, format); - (void)vfprintf(stderr, format, ap); - (void)fflush(stderr); - va_end(ap); - exit(3); -} - -/* Get a token from a string (strtok is not MT-safe) - * str String to scan - * seps Separation characters - * buf Place to put results - * max Size of buf - * Returns NULL if no token available or can't do the scan. - */ -char * -get_token(char *str, char *seps, char *buf, int max) -{ - int len; - - buf[0] = 0; - if ( str==NULL || str[0]==0 ) { - return NULL; - } - str += strspn(str, seps); - if ( str[0]==0 ) { - return NULL; - } - len = (int)strcspn(str, seps); - if ( len >= max ) { - return NULL; - } - (void)strncpy(buf, str, len); - buf[len] = 0; - return str+len; -} - -/* Determines if a class/method is specified by a list item - * item String that represents a pattern to match - * If it starts with a '*', then any class is allowed - * If it ends with a '*', then any method is allowed - * cname Class name, e.g. "java.lang.Object" - * mname Method name, e.g. "" - * Returns 1(true) or 0(false). - */ -static int -covered_by_list_item(char *item, char *cname, char *mname) -{ - int len; - - len = (int)strlen(item); - if ( item[0]=='*' ) { - if ( strncmp(mname, item+1, len-1)==0 ) { - return 1; - } - } else if ( item[len-1]=='*' ) { - if ( strncmp(cname, item, len-1)==0 ) { - return 1; - } - } else { - int cname_len; - - cname_len = (int)strlen(cname); - if ( strncmp(cname, item, (len>cname_len?cname_len:len))==0 ) { - if ( cname_len >= len ) { - /* No method name supplied in item, we must have matched */ - return 1; - } else { - int mname_len; - - mname_len = (int)strlen(mname); - item += cname_len+1; - len -= cname_len+1; - if ( strncmp(mname, item, (len>mname_len?mname_len:len))==0 ) { - return 1; - } - } - } - } - return 0; -} - -/* Determines if a class/method is specified by this list - * list String of comma separated pattern items - * cname Class name, e.g. "java.lang.Object" - * mname Method name, e.g. "" - * Returns 1(true) or 0(false). - */ -static int -covered_by_list(char *list, char *cname, char *mname) -{ - char token[1024]; - char *next; - - if ( list[0] == 0 ) { - return 0; - } - - next = get_token(list, ",", token, sizeof(token)); - while ( next != NULL ) { - if ( covered_by_list_item(token, cname, mname) ) { - return 1; - } - next = get_token(next, ",", token, sizeof(token)); - } - return 0; -} - -/* Determines which class and methods we are interested in - * cname Class name, e.g. "java.lang.Object" - * mname Method name, e.g. "" - * include_list Empty or an explicit list for inclusion - * exclude_list Empty or an explicit list for exclusion - * Returns 1(true) or 0(false). - */ -int -interested(char *cname, char *mname, char *include_list, char *exclude_list) -{ - if ( exclude_list!=NULL && exclude_list[0]!=0 && - covered_by_list(exclude_list, cname, mname) ) { - return 0; - } - if ( include_list!=NULL && include_list[0]!=0 && - !covered_by_list(include_list, cname, mname) ) { - return 0; - } - return 1; -} - -/* ------------------------------------------------------------------- */ -/* Generic JVMTI utility functions */ - -/* Every JVMTI interface returns an error code, which should be checked - * to avoid any cascading errors down the line. - * The interface GetErrorName() returns the actual enumeration constant - * name, making the error messages much easier to understand. - */ -void -check_jvmti_error(jvmtiEnv *jvmti, jvmtiError errnum, const char *str) -{ - if ( errnum != JVMTI_ERROR_NONE ) { - char *errnum_str; - - errnum_str = NULL; - (void)(*jvmti)->GetErrorName(jvmti, errnum, &errnum_str); - - fatal_error("ERROR: JVMTI: %d(%s): %s\n", errnum, - (errnum_str==NULL?"Unknown":errnum_str), - (str==NULL?"":str)); - } -} - -/* All memory allocated by JVMTI must be freed by the JVMTI Deallocate - * interface. - */ -void -deallocate(jvmtiEnv *jvmti, void *ptr) -{ - jvmtiError error; - - error = (*jvmti)->Deallocate(jvmti, ptr); - check_jvmti_error(jvmti, error, "Cannot deallocate memory"); -} - -/* Allocation of JVMTI managed memory */ -void * -allocate(jvmtiEnv *jvmti, jint len) -{ - jvmtiError error; - void *ptr; - - error = (*jvmti)->Allocate(jvmti, len, (unsigned char **)&ptr); - check_jvmti_error(jvmti, error, "Cannot allocate memory"); - return ptr; -} - -/* Add demo jar file to boot class path (the BCI Tracker class must be - * in the boot classpath) - * - * WARNING: This code assumes that the jar file can be found at one of: - * ${JAVA_HOME}/demo/jvmti/${DEMO_NAME}/${DEMO_NAME}.jar - * ${JAVA_HOME}/../demo/jvmti/${DEMO_NAME}/${DEMO_NAME}.jar - * where JAVA_HOME may refer to the jre directory. - * Both these values are added to the boot classpath. - * These locations are only true for these demos, installed - * in the JDK area. Platform specific code could be used to - * find the location of the DLL or .so library, and construct a - * path name to the jar file, relative to the library location. - */ -void -add_demo_jar_to_bootclasspath(jvmtiEnv *jvmti, char *demo_name) -{ - jvmtiError error; - char *file_sep; - int max_len; - char *java_home; - char jar_path[FILENAME_MAX+1]; - - java_home = NULL; - error = (*jvmti)->GetSystemProperty(jvmti, "java.home", &java_home); - check_jvmti_error(jvmti, error, "Cannot get java.home property value"); - if ( java_home == NULL || java_home[0] == 0 ) { - fatal_error("ERROR: Java home not found\n"); - } - -#ifdef WIN32 - file_sep = "\\"; -#else - file_sep = "/"; -#endif - - max_len = (int)(strlen(java_home) + strlen(demo_name)*2 + - strlen(file_sep)*5 + - 16 /* ".." "demo" "jvmti" ".jar" NULL */ ); - if ( max_len > (int)sizeof(jar_path) ) { - fatal_error("ERROR: Path to jar file too long\n"); - } - (void)strcpy(jar_path, java_home); - (void)strcat(jar_path, file_sep); - (void)strcat(jar_path, "demo"); - (void)strcat(jar_path, file_sep); - (void)strcat(jar_path, "jvmti"); - (void)strcat(jar_path, file_sep); - (void)strcat(jar_path, demo_name); - (void)strcat(jar_path, file_sep); - (void)strcat(jar_path, demo_name); - (void)strcat(jar_path, ".jar"); - error = (*jvmti)->AddToBootstrapClassLoaderSearch(jvmti, (const char*)jar_path); - check_jvmti_error(jvmti, error, "Cannot add to boot classpath"); - - (void)strcpy(jar_path, java_home); - (void)strcat(jar_path, file_sep); - (void)strcat(jar_path, ".."); - (void)strcat(jar_path, file_sep); - (void)strcat(jar_path, "demo"); - (void)strcat(jar_path, file_sep); - (void)strcat(jar_path, "jvmti"); - (void)strcat(jar_path, file_sep); - (void)strcat(jar_path, demo_name); - (void)strcat(jar_path, file_sep); - (void)strcat(jar_path, demo_name); - (void)strcat(jar_path, ".jar"); - - error = (*jvmti)->AddToBootstrapClassLoaderSearch(jvmti, (const char*)jar_path); - check_jvmti_error(jvmti, error, "Cannot add to boot classpath"); -} - -/* ------------------------------------------------------------------- */ diff --git a/jdk/src/demo/share/jvmti/agent_util/agent_util.h b/jdk/src/demo/share/jvmti/agent_util/agent_util.h deleted file mode 100644 index 2237097ab30..00000000000 --- a/jdk/src/demo/share/jvmti/agent_util/agent_util.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#ifndef AGENT_UTIL_H -#define AGENT_UTIL_H - -#include -#include -#include -#include -#include - -#include "jni.h" -#include "jvmti.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void stdout_message(const char * format, ...); -void fatal_error(const char * format, ...); -char *get_token(char *str, char *seps, char *buf, int max); -int interested(char *cname, char *mname, - char *include_list, char *exclude_list); - -void check_jvmti_error(jvmtiEnv *jvmti, jvmtiError errnum, const char *str); -void deallocate(jvmtiEnv *jvmti, void *ptr); -void *allocate(jvmtiEnv *jvmti, jint len); -void add_demo_jar_to_bootclasspath(jvmtiEnv *jvmti, char *demo_name); - -#ifdef STATIC_BUILD -/* Macros for handling declaration of static/dynamic - * Agent library Load/Attach/Unload functions - * - * DEF_Agent_OnLoad, DEF_Agent_OnAttach or DEF_Agent_OnUnload - * generate the appropriate entrypoint names based on static - * versus dynamic builds. - * - * STATIC_BUILD must be defined to build static versions of these libraries. - * LIBRARY_NAME must be set to the name of the library for static builds. - */ -#define ADD_LIB_NAME3(name, lib) name ## lib -#define ADD_LIB_NAME2(name, lib) ADD_LIB_NAME3(name, lib) -#define ADD_LIB_NAME(entry) ADD_LIB_NAME2(entry, LIBRARY_NAME) - -#define DEF_Agent_OnLoad \ -ADD_LIB_NAME(Agent_OnLoad_)(JavaVM *vm, char *options, void *reserved) \ -{ \ - jint JNICALL ADD_LIB_NAME(Agent_OnLoad_dynamic_)(JavaVM *vm, char *options, void *reserved); \ - return ADD_LIB_NAME(Agent_OnLoad_dynamic_)(vm, options, reserved); \ -} \ -jint JNICALL ADD_LIB_NAME(Agent_OnLoad_dynamic_) - -#define DEF_Agent_OnAttach \ -ADD_LIB_NAME(Agent_OnAttach_)(JavaVM *vm, char *options, void *reserved) \ -{ \ - jint JNICALL ADD_LIB_NAME(Agent_OnAttach_dynamic_)(JavaVM *vm, char *options, void *reserved); \ - return ADD_LIB_NAME(Agent_OnAttach_dynamic_)(vm, options, reserved); \ -} \ -jint JNICALL ADD_LIB_NAME(Agent_OnAttach_dynamic_) - -#define DEF_Agent_OnUnload \ -ADD_LIB_NAME(Agent_OnUnload_)(JavaVM *vm) \ -{ \ - void JNICALL ADD_LIB_NAME(Agent_OnUnload_dynamic_)(JavaVM *vm); \ - ADD_LIB_NAME(Agent_OnUnload_dynamic_)(vm); \ -} \ -void JNICALL ADD_LIB_NAME(Agent_OnUnload_dynamic_) - -#else -#define DEF_Agent_OnLoad Agent_OnLoad -#define DEF_Agent_OnAttach Agent_OnAttach -#define DEF_Agent_OnUnload Agent_OnUnload -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif diff --git a/jdk/src/demo/share/jvmti/compiledMethodLoad/README.txt b/jdk/src/demo/share/jvmti/compiledMethodLoad/README.txt deleted file mode 100644 index 3898d29afbc..00000000000 --- a/jdk/src/demo/share/jvmti/compiledMethodLoad/README.txt +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -compiledMethodLoad - -This agent library traces CompiledMethodLoad events along -with the HotSpot specific compile_info parameter. - -You can use this agent library as follows: - - java -agentlib:compiledMethodLoad ... - -See ${JAVA_HOME}/demo/jvmti/index.html for help running and building agents. - diff --git a/jdk/src/demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c b/jdk/src/demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c deleted file mode 100644 index 92d123ea3ce..00000000000 --- a/jdk/src/demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include -#include -#include - -#include "jni.h" -#include "jvmti.h" -#include "jvmticmlr.h" - -#include "agent_util.h" - -/* Global static data */ -static char OUTPUT_FILE[] = "compiledMethodLoad.txt"; -static FILE *fp; -static jvmtiEnv *jvmti; -static jrawMonitorID lock; - -/* print a jvmtiCompiledMethodLoadDummyRecord */ -void -print_dummy_record(jvmtiCompiledMethodLoadDummyRecord* record, - jvmtiEnv* jvmti, FILE* fp) { - - if (record != NULL) { - fprintf(fp, "Dummy record detected containing message: %s\n", - (char *)record->message); - } -} - -/* print the specified stack frames */ -void -print_stack_frames(PCStackInfo* record, jvmtiEnv *jvmti, FILE* fp) { - if (record != NULL && record->methods != NULL) { - int i; - - for (i = 0; i < record->numstackframes; i++) { - jvmtiError err; - char* method_name = NULL; - char* class_name = NULL; - char* method_signature = NULL; - char* class_signature = NULL; - char* generic_ptr_method = NULL; - char* generic_ptr_class = NULL; - jmethodID id; - jclass declaringclassptr; - id = record->methods[i]; - - err = (*jvmti)->GetMethodDeclaringClass(jvmti, id, - &declaringclassptr); - check_jvmti_error(jvmti, err, "get method declaring class"); - - err = (*jvmti)->GetClassSignature(jvmti, declaringclassptr, - &class_signature, &generic_ptr_class); - check_jvmti_error(jvmti, err, "get class signature"); - - err = (*jvmti)->GetMethodName(jvmti, id, &method_name, - &method_signature, &generic_ptr_method); - check_jvmti_error(jvmti, err, "get method name"); - - fprintf(fp, "%s::%s %s %s @%d\n", class_signature, method_name, - method_signature, - generic_ptr_method == NULL ? "" : generic_ptr_method, - record->bcis[i]); - - if (method_name != NULL) { - err = (*jvmti)->Deallocate(jvmti, (unsigned char*)method_name); - check_jvmti_error(jvmti, err, "deallocate method_name"); - } - if (method_signature != NULL) { - err = (*jvmti)->Deallocate(jvmti, - (unsigned char*)method_signature); - check_jvmti_error(jvmti, err, "deallocate method_signature"); - } - if (generic_ptr_method != NULL) { - err = (*jvmti)->Deallocate(jvmti, - (unsigned char*)generic_ptr_method); - check_jvmti_error(jvmti, err, "deallocate generic_ptr_method"); - } - if (class_name != NULL) { - err = (*jvmti)->Deallocate(jvmti, (unsigned char*)class_name); - check_jvmti_error(jvmti, err, "deallocate class_name"); - } - if (class_signature != NULL) { - err = (*jvmti)->Deallocate(jvmti, - (unsigned char*)class_signature); - check_jvmti_error(jvmti, err, "deallocate class_signature"); - } - if (generic_ptr_class != NULL) { - err = (*jvmti)->Deallocate(jvmti, - (unsigned char*)generic_ptr_class); - check_jvmti_error(jvmti, err, "deallocate generic_ptr_class"); - } - } - } -} - -/* print a jvmtiCompiledMethodLoadInlineRecord */ -void -print_inline_info_record(jvmtiCompiledMethodLoadInlineRecord* record, - jvmtiEnv *jvmti, FILE* fp) { - - if (record != NULL && record->pcinfo != NULL) { - int numpcs = record->numpcs; - int i; - - for (i = 0; i < numpcs; i++) { - PCStackInfo pcrecord = (record->pcinfo[i]); - fprintf(fp, "PcDescriptor(pc=%p):\n", pcrecord.pc); - print_stack_frames(&pcrecord, jvmti, fp); - } - } -} - -/* decode kind of CompiledMethodLoadRecord and print */ -void -print_records(jvmtiCompiledMethodLoadRecordHeader* list, jvmtiEnv *jvmti, - FILE* fp) -{ - jvmtiCompiledMethodLoadRecordHeader* curr = list; - fprintf(fp, "\nPrinting PC Descriptors\n\n"); - while (curr != NULL) { - switch (curr->kind) { - case JVMTI_CMLR_DUMMY: - print_dummy_record((jvmtiCompiledMethodLoadDummyRecord *)curr, - jvmti, fp); - break; - - case JVMTI_CMLR_INLINE_INFO: - print_inline_info_record( - (jvmtiCompiledMethodLoadInlineRecord *)curr, jvmti, fp); - break; - - default: - fprintf(fp, "Warning: unrecognized record: kind=%d\n", curr->kind); - break; - } - - curr = (jvmtiCompiledMethodLoadRecordHeader *)curr->next; - } -} - -/* Callback for JVMTI_EVENT_COMPILED_METHOD_LOAD */ -void JNICALL -compiled_method_load(jvmtiEnv *jvmti, jmethodID method, jint code_size, - const void* code_addr, jint map_length, const jvmtiAddrLocationMap* map, - const void* compile_info) -{ - jvmtiError err; - char* name = NULL; - char* signature = NULL; - char* generic_ptr = NULL; - jvmtiCompiledMethodLoadRecordHeader* pcs; - - err = (*jvmti)->RawMonitorEnter(jvmti, lock); - check_jvmti_error(jvmti, err, "raw monitor enter"); - - err = (*jvmti)->GetMethodName(jvmti, method, &name, &signature, - &generic_ptr); - check_jvmti_error(jvmti, err, "get method name"); - - fprintf(fp, "\nCompiled method load event\n"); - fprintf(fp, "Method name %s %s %s\n\n", name, signature, - generic_ptr == NULL ? "" : generic_ptr); - pcs = (jvmtiCompiledMethodLoadRecordHeader *)compile_info; - if (pcs != NULL) { - print_records(pcs, jvmti, fp); - } - - if (name != NULL) { - err = (*jvmti)->Deallocate(jvmti, (unsigned char*)name); - check_jvmti_error(jvmti, err, "deallocate name"); - } - if (signature != NULL) { - err = (*jvmti)->Deallocate(jvmti, (unsigned char*)signature); - check_jvmti_error(jvmti, err, "deallocate signature"); - } - if (generic_ptr != NULL) { - err = (*jvmti)->Deallocate(jvmti, (unsigned char*)generic_ptr); - check_jvmti_error(jvmti, err, "deallocate generic_ptr"); - } - - err = (*jvmti)->RawMonitorExit(jvmti, lock); - check_jvmti_error(jvmti, err, "raw monitor exit"); -} - -/* Agent_OnLoad() is called first, we prepare for a COMPILED_METHOD_LOAD - * event here. - */ -JNIEXPORT jint JNICALL -DEF_Agent_OnLoad(JavaVM *vm, char *options, void *reserved) -{ - jint rc; - jvmtiError err; - jvmtiCapabilities capabilities; - jvmtiEventCallbacks callbacks; - - fp = fopen(OUTPUT_FILE, "w"); - if (fp == NULL) { - fatal_error("ERROR: %s: Unable to create output file\n", OUTPUT_FILE); - return -1; - } - - /* Get JVMTI environment */ - rc = (*vm)->GetEnv(vm, (void **)&jvmti, JVMTI_VERSION); - if (rc != JNI_OK) { - fatal_error( - "ERROR: Unable to create jvmtiEnv, GetEnv failed, error=%d\n", rc); - return -1; - } - - /* add JVMTI capabilities */ - memset(&capabilities,0, sizeof(capabilities)); - capabilities.can_generate_compiled_method_load_events = 1; - err = (*jvmti)->AddCapabilities(jvmti, &capabilities); - check_jvmti_error(jvmti, err, "add capabilities"); - - /* set JVMTI callbacks for events */ - memset(&callbacks, 0, sizeof(callbacks)); - callbacks.CompiledMethodLoad = &compiled_method_load; - err = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, sizeof(callbacks)); - check_jvmti_error(jvmti, err, "set event callbacks"); - - /* enable JVMTI events */ - err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_COMPILED_METHOD_LOAD, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - - /* create coordination monitor */ - err = (*jvmti)->CreateRawMonitor(jvmti, "agent lock", &lock); - check_jvmti_error(jvmti, err, "create raw monitor"); - - return 0; -} - -/* Agent_OnUnload() is called last */ -JNIEXPORT void JNICALL -DEF_Agent_OnUnload(JavaVM *vm) -{ -} diff --git a/jdk/src/demo/share/jvmti/compiledMethodLoad/sample.makefile.txt b/jdk/src/demo/share/jvmti/compiledMethodLoad/sample.makefile.txt deleted file mode 100644 index 3da8383d912..00000000000 --- a/jdk/src/demo/share/jvmti/compiledMethodLoad/sample.makefile.txt +++ /dev/null @@ -1,148 +0,0 @@ -# -# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -######################################################################## -# -# Sample GNU Makefile for building JVMTI Demo compiledMethodLoad -# -# Example uses: -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparc] -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] -# gnumake JDK= OSNAME=linux [OPT=true] -# gnumake JDK= OSNAME=win32 [OPT=true] -# -######################################################################## - -# Source lists -LIBNAME=compiledMethodLoad -SOURCES=compiledMethodLoad.c ../agent_util/agent_util.c - -# Solaris Studio C Compiler Version 12.4 -ifeq ($(OSNAME), solaris) - # Sun Solaris Compiler options needed - COMMON_FLAGS=-mt -KPIC - # Options that help find errors - COMMON_FLAGS+= -Xa -v -xc99=%none - # Check LIBARCH for any special compiler options - LIBARCH=$(shell uname -p) - ifeq ($(LIBARCH), sparc) - COMMON_FLAGS+=-xarch=v8 -xregs=no%appl - endif - ifeq ($(LIBARCH), sparcv9) - COMMON_FLAGS+=-xarch=v9 -xregs=no%appl - endif - ifeq ($(OPT), true) - CFLAGS=-xO2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-z defs -ztext - # Libraries we are dependent on - LIBRARIES= -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -G -o $@ -endif - -# Linux GNU C Compiler -ifeq ($(OSNAME), linux) - # GNU Compiler options needed to build it - COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer - # Options that help find errors - COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses - ifeq ($(OPT), true) - CFLAGS=-O2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc - # Libraries we are dependent on - LIBRARIES=-lc - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ -endif - -# Windows Microsoft C/C++ Optimizing Compiler Version 12 -ifeq ($(OSNAME), win32) - CC=cl - # Compiler options needed to build it - COMMON_FLAGS=-Gy -DWIN32 - # Options that help find errors - COMMON_FLAGS+=-W0 -WX - ifeq ($(OPT), true) - CFLAGS= -Ox -Op -Zi $(COMMON_FLAGS) - else - CFLAGS= -Od -Zi $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.obj) - # Library name and options needed to build it - LIBRARY=$(LIBNAME).dll - LDFLAGS= - # Libraries we are dependent on - LIBRARIES= - # Building a shared library - LINK_SHARED=link -dll -out:$@ -endif - -# Common -I options -CFLAGS += -I. -CFLAGS += -I../agent_util -CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - -# Default rule -all: $(LIBRARY) - -# Build native library -$(LIBRARY): $(OBJECTS) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - -# Cleanup the built bits -clean: - rm -f $(LIBRARY) $(OBJECTS) - -# Simple tester -test: all - LD_LIBRARY_PATH=`pwd` $(JDK)/bin/java -agentlib:$(LIBNAME) -version - -# Compilation rule only needed on Windows -ifeq ($(OSNAME), win32) -%.obj: %.c - $(COMPILE.c) $< -endif - diff --git a/jdk/src/demo/share/jvmti/gctest/README.txt b/jdk/src/demo/share/jvmti/gctest/README.txt deleted file mode 100644 index 1d23b8fa339..00000000000 --- a/jdk/src/demo/share/jvmti/gctest/README.txt +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -gctest - -This agent library can be used to track garbage collection events. - -You can use this agent library as follows: - - java -agentlib:gctest ... - -To get help on the available options try: - - java -agentlib:gctest=help - -See ${JAVA_HOME}/demo/jvmti/index.html for help running and building agents. - -The Events JVMTI_EVENT_GARBAGE_COLLECTION_START, -JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, and JVMTI_EVENT_OBJECT_FREE -all have limitations as to what can be called directly inside the -agent callback functions (e.g. no JNI calls are allowed, and limited -interface calls can be made). However, by using raw monitors and a separate -watcher thread, this agent demonstrates how these limitations can be -easily avoided, allowing the watcher thread to do just about anything -after the JVMTI_EVENT_GARBAGE_COLLECTION_FINISH event. - diff --git a/jdk/src/demo/share/jvmti/gctest/gctest.c b/jdk/src/demo/share/jvmti/gctest/gctest.c deleted file mode 100644 index 848e7e07c1a..00000000000 --- a/jdk/src/demo/share/jvmti/gctest/gctest.c +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* Example of using JVMTI_EVENT_GARBAGE_COLLECTION_START and - * JVMTI_EVENT_GARBAGE_COLLECTION_FINISH events. - */ - -#include -#include -#include - -#include "jni.h" -#include "jvmti.h" - -/* For stdout_message(), fatal_error(), and check_jvmti_error() */ -#include "agent_util.h" - -/* Global static data */ -static jvmtiEnv *jvmti; -static int gc_count; -static jrawMonitorID lock; - -/* Worker thread that waits for garbage collections */ -static void JNICALL -worker(jvmtiEnv* jvmti, JNIEnv* jni, void *p) -{ - jvmtiError err; - - stdout_message("GC worker started...\n"); - - for (;;) { - err = (*jvmti)->RawMonitorEnter(jvmti, lock); - check_jvmti_error(jvmti, err, "raw monitor enter"); - while (gc_count == 0) { - err = (*jvmti)->RawMonitorWait(jvmti, lock, 0); - if (err != JVMTI_ERROR_NONE) { - err = (*jvmti)->RawMonitorExit(jvmti, lock); - check_jvmti_error(jvmti, err, "raw monitor wait"); - return; - } - } - gc_count = 0; - - err = (*jvmti)->RawMonitorExit(jvmti, lock); - check_jvmti_error(jvmti, err, "raw monitor exit"); - - /* Perform arbitrary JVMTI/JNI work here to do post-GC cleanup */ - stdout_message("post-GarbageCollectionFinish actions...\n"); - } -} - -/* Creates a new jthread */ -static jthread -alloc_thread(JNIEnv *env) -{ - jclass thrClass; - jmethodID cid; - jthread res; - - thrClass = (*env)->FindClass(env, "java/lang/Thread"); - if ( thrClass == NULL ) { - fatal_error("Cannot find Thread class\n"); - } - cid = (*env)->GetMethodID(env, thrClass, "", "()V"); - if ( cid == NULL ) { - fatal_error("Cannot find Thread constructor method\n"); - } - res = (*env)->NewObject(env, thrClass, cid); - if ( res == NULL ) { - fatal_error("Cannot create new Thread object\n"); - } - return res; -} - -/* Callback for JVMTI_EVENT_VM_INIT */ -static void JNICALL -vm_init(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - jvmtiError err; - - stdout_message("VMInit...\n"); - - err = (*jvmti)->RunAgentThread(jvmti, alloc_thread(env), &worker, NULL, - JVMTI_THREAD_MAX_PRIORITY); - check_jvmti_error(jvmti, err, "running agent thread"); -} - -/* Callback for JVMTI_EVENT_GARBAGE_COLLECTION_START */ -static void JNICALL -gc_start(jvmtiEnv* jvmti_env) -{ - stdout_message("GarbageCollectionStart...\n"); -} - -/* Callback for JVMTI_EVENT_GARBAGE_COLLECTION_FINISH */ -static void JNICALL -gc_finish(jvmtiEnv* jvmti_env) -{ - jvmtiError err; - - stdout_message("GarbageCollectionFinish...\n"); - - err = (*jvmti)->RawMonitorEnter(jvmti, lock); - check_jvmti_error(jvmti, err, "raw monitor enter"); - gc_count++; - err = (*jvmti)->RawMonitorNotify(jvmti, lock); - check_jvmti_error(jvmti, err, "raw monitor notify"); - err = (*jvmti)->RawMonitorExit(jvmti, lock); - check_jvmti_error(jvmti, err, "raw monitor exit"); -} - -/* Agent_OnLoad() is called first, we prepare for a VM_INIT event here. */ -JNIEXPORT jint JNICALL -DEF_Agent_OnLoad(JavaVM *vm, char *options, void *reserved) -{ - jint rc; - jvmtiError err; - jvmtiCapabilities capabilities; - jvmtiEventCallbacks callbacks; - - /* Get JVMTI environment */ - rc = (*vm)->GetEnv(vm, (void **)&jvmti, JVMTI_VERSION); - if (rc != JNI_OK) { - fatal_error("ERROR: Unable to create jvmtiEnv, rc=%d\n", rc); - return -1; - } - - /* Get/Add JVMTI capabilities */ - (void)memset(&capabilities, 0, sizeof(capabilities)); - capabilities.can_generate_garbage_collection_events = 1; - err = (*jvmti)->AddCapabilities(jvmti, &capabilities); - check_jvmti_error(jvmti, err, "add capabilities"); - - /* Set callbacks and enable event notifications */ - memset(&callbacks, 0, sizeof(callbacks)); - callbacks.VMInit = &vm_init; - callbacks.GarbageCollectionStart = &gc_start; - callbacks.GarbageCollectionFinish = &gc_finish; - err = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, sizeof(callbacks)); - check_jvmti_error(jvmti, err, "set event callbacks"); - err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_INIT, NULL); - check_jvmti_error(jvmti, err, "set event notification"); - err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL); - check_jvmti_error(jvmti, err, "set event notification"); - err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL); - check_jvmti_error(jvmti, err, "set event notification"); - - /* Create the necessary raw monitor */ - err = (*jvmti)->CreateRawMonitor(jvmti, "lock", &lock); - check_jvmti_error(jvmti, err, "create raw monitor"); - return 0; -} - -/* Agent_OnUnload() is called last */ -JNIEXPORT void JNICALL -DEF_Agent_OnUnload(JavaVM *vm) -{ -} diff --git a/jdk/src/demo/share/jvmti/gctest/sample.makefile.txt b/jdk/src/demo/share/jvmti/gctest/sample.makefile.txt deleted file mode 100644 index 46afeb498ce..00000000000 --- a/jdk/src/demo/share/jvmti/gctest/sample.makefile.txt +++ /dev/null @@ -1,148 +0,0 @@ -# -# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -######################################################################## -# -# Sample GNU Makefile for building JVMTI Demo gctest -# -# Example uses: -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparc] -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] -# gnumake JDK= OSNAME=linux [OPT=true] -# gnumake JDK= OSNAME=win32 [OPT=true] -# -######################################################################## - -# Source lists -LIBNAME=gctest -SOURCES=gctest.c ../agent_util/agent_util.c - -# Solaris Studio C Compiler Version 12.4 -ifeq ($(OSNAME), solaris) - # Sun Solaris Compiler options needed - COMMON_FLAGS=-mt -KPIC - # Options that help find errors - COMMON_FLAGS+= -Xa -v -xc99=%none - # Check LIBARCH for any special compiler options - LIBARCH=$(shell uname -p) - ifeq ($(LIBARCH), sparc) - COMMON_FLAGS+=-xarch=v8 -xregs=no%appl - endif - ifeq ($(LIBARCH), sparcv9) - COMMON_FLAGS+=-xarch=v9 -xregs=no%appl - endif - ifeq ($(OPT), true) - CFLAGS=-xO2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-z defs -ztext - # Libraries we are dependent on - LIBRARIES= -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -G -o $@ -endif - -# Linux GNU C Compiler -ifeq ($(OSNAME), linux) - # GNU Compiler options needed to build it - COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer - # Options that help find errors - COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses - ifeq ($(OPT), true) - CFLAGS=-O2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc - # Libraries we are dependent on - LIBRARIES=-lc - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ -endif - -# Windows Microsoft C/C++ Optimizing Compiler Version 12 -ifeq ($(OSNAME), win32) - CC=cl - # Compiler options needed to build it - COMMON_FLAGS=-Gy -DWIN32 - # Options that help find errors - COMMON_FLAGS+=-W0 -WX - ifeq ($(OPT), true) - CFLAGS= -Ox -Op -Zi $(COMMON_FLAGS) - else - CFLAGS= -Od -Zi $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.obj) - # Library name and options needed to build it - LIBRARY=$(LIBNAME).dll - LDFLAGS= - # Libraries we are dependent on - LIBRARIES= - # Building a shared library - LINK_SHARED=link -dll -out:$@ -endif - -# Common -I options -CFLAGS += -I. -CFLAGS += -I../agent_util -CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - -# Default rule -all: $(LIBRARY) - -# Build native library -$(LIBRARY): $(OBJECTS) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - -# Cleanup the built bits -clean: - rm -f $(LIBRARY) $(OBJECTS) - -# Simple tester -test: all - LD_LIBRARY_PATH=`pwd` $(JDK)/bin/java -agentlib:$(LIBNAME) -version - -# Compilation rule only needed on Windows -ifeq ($(OSNAME), win32) -%.obj: %.c - $(COMPILE.c) $< -endif - diff --git a/jdk/src/demo/share/jvmti/heapTracker/HeapTracker.java b/jdk/src/demo/share/jvmti/heapTracker/HeapTracker.java deleted file mode 100644 index a7eb362cd20..00000000000 --- a/jdk/src/demo/share/jvmti/heapTracker/HeapTracker.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - - -/* Java class to hold static methods which will be called in byte code - * injections of all class files. - */ - -public class HeapTracker { - - private static int engaged = 0; - - private static native void _newobj(Object thread, Object o); - public static void newobj(Object o) - { - if ( engaged != 0 ) { - _newobj(Thread.currentThread(), o); - } - } - - private static native void _newarr(Object thread, Object a); - public static void newarr(Object a) - { - if ( engaged != 0 ) { - _newarr(Thread.currentThread(), a); - } - } - -} diff --git a/jdk/src/demo/share/jvmti/heapTracker/README.txt b/jdk/src/demo/share/jvmti/heapTracker/README.txt deleted file mode 100644 index cb7aac359b9..00000000000 --- a/jdk/src/demo/share/jvmti/heapTracker/README.txt +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -heapTracker - -This agent library can be used to track object allocations. -It uses the same java_crw_demo library used by HPROF to do BCI -on all classfiles loaded into the Virtual Machine. - -You can use this agent library as follows: - - java -agentlib:heapTracker ... - -To get help on the available options try: - - java -agentlib:heapTracker=help - -See ${JAVA_HOME}/demo/jvmti/index.html for help running and building agents. - diff --git a/jdk/src/demo/share/jvmti/heapTracker/heapTracker.c b/jdk/src/demo/share/jvmti/heapTracker/heapTracker.c deleted file mode 100644 index 3af21846245..00000000000 --- a/jdk/src/demo/share/jvmti/heapTracker/heapTracker.c +++ /dev/null @@ -1,1016 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include "stdlib.h" - -#include "heapTracker.h" -#include "java_crw_demo.h" - -#include "jni.h" -#include "jvmti.h" - -#include "agent_util.h" - -/* ------------------------------------------------------------------- - * Some constant names that tie to Java class/method names. - * We assume the Java class whose static methods we will be calling - * looks like: - * - * public class HeapTracker { - * private static int engaged; - * private static native void _newobj(Object thr, Object o); - * public static void newobj(Object o) - * { - * if ( engaged != 0 ) { - * _newobj(Thread.currentThread(), o); - * } - * } - * private static native void _newarr(Object thr, Object a); - * public static void newarr(Object a) - * { - * if ( engaged != 0 ) { - * _newarr(Thread.currentThread(), a); - * } - * } - * } - * - * The engaged field allows us to inject all classes (even system classes) - * and delay the actual calls to the native code until the VM has reached - * a safe time to call native methods (Past the JVMTI VM_START event). - * - */ - -#define HEAP_TRACKER_class HeapTracker /* Name of class we are using */ -#define HEAP_TRACKER_newobj newobj /* Name of java init method */ -#define HEAP_TRACKER_newarr newarr /* Name of java newarray method */ -#define HEAP_TRACKER_native_newobj _newobj /* Name of java newobj native */ -#define HEAP_TRACKER_native_newarr _newarr /* Name of java newarray native */ -#define HEAP_TRACKER_engaged engaged /* Name of static field switch */ - -/* C macros to create strings from tokens */ -#define _STRING(s) #s -#define STRING(s) _STRING(s) - -/* ------------------------------------------------------------------- */ - -/* Flavors of traces (to separate out stack traces) */ - -typedef enum { - TRACE_FIRST = 0, - TRACE_USER = 0, - TRACE_BEFORE_VM_START = 1, - TRACE_BEFORE_VM_INIT = 2, - TRACE_VM_OBJECT = 3, - TRACE_MYSTERY = 4, - TRACE_LAST = 4 -} TraceFlavor; - -static char * flavorDesc[] = { - "", - "before VM_START", - "before VM_INIT", - "VM_OBJECT", - "unknown" -}; - -/* Trace (Stack Trace) */ - -#define MAX_FRAMES 6 -typedef struct Trace { - /* Number of frames (includes HEAP_TRACKER methods) */ - jint nframes; - /* Frames from GetStackTrace() (2 extra for HEAP_TRACKER methods) */ - jvmtiFrameInfo frames[MAX_FRAMES+2]; - /* Used to make some traces unique */ - TraceFlavor flavor; -} Trace; - -/* Trace information (more than one object will have this as a tag) */ - -typedef struct TraceInfo { - /* Trace where this object was allocated from */ - Trace trace; - /* 64 bit hash code that attempts to identify this specific trace */ - jlong hashCode; - /* Total space taken up by objects allocated from this trace */ - jlong totalSpace; - /* Total count of objects ever allocated from this trace */ - int totalCount; - /* Total live objects that were allocated from this trace */ - int useCount; - /* The next TraceInfo in the hash bucket chain */ - struct TraceInfo *next; -} TraceInfo; - -/* Global agent data structure */ - -typedef struct { - /* JVMTI Environment */ - jvmtiEnv *jvmti; - /* State of the VM flags */ - jboolean vmStarted; - jboolean vmInitialized; - jboolean vmDead; - /* Options */ - int maxDump; - /* Data access Lock */ - jrawMonitorID lock; - /* Counter on classes where BCI has been applied */ - jint ccount; - /* Hash table to lookup TraceInfo's via Trace's */ - #define HASH_INDEX_BIT_WIDTH 12 /* 4096 */ - #define HASH_BUCKET_COUNT (1<RawMonitorEnter(jvmti, gdata->lock); - check_jvmti_error(jvmti, error, "Cannot enter with raw monitor"); -} - -/* Exit a critical section by doing a JVMTI Raw Monitor Exit */ -static void -exitCriticalSection(jvmtiEnv *jvmti) -{ - jvmtiError error; - - error = (*jvmti)->RawMonitorExit(jvmti, gdata->lock); - check_jvmti_error(jvmti, error, "Cannot exit with raw monitor"); -} - -/* Update stats on a TraceInfo */ -static TraceInfo * -updateStats(TraceInfo *tinfo) -{ - tinfo->totalCount++; - tinfo->useCount++; - return tinfo; -} - -/* Get TraceInfo for empty stack */ -static TraceInfo * -emptyTrace(TraceFlavor flavor) -{ - return updateStats(gdata->emptyTrace[flavor]); -} - -/* Allocate new TraceInfo */ -static TraceInfo * -newTraceInfo(Trace *trace, jlong hashCode, TraceFlavor flavor) -{ - TraceInfo *tinfo; - - tinfo = (TraceInfo*)calloc(1, sizeof(TraceInfo)); - if ( tinfo == NULL ) { - fatal_error("ERROR: Ran out of malloc() space\n"); - } else { - int hashIndex; - - tinfo->trace = *trace; - tinfo->trace.flavor = flavor; - tinfo->hashCode = hashCode; - gdata->traceInfoCount++; - hashIndex = (int)(hashCode & HASH_INDEX_MASK); - tinfo->next = gdata->hashBuckets[hashIndex]; - gdata->hashBuckets[hashIndex] = tinfo; - } - return tinfo; -} - -/* Create hash code for a Trace */ -static jlong -hashTrace(Trace *trace) -{ - jlong hashCode; - int i; - - hashCode = 0; - for ( i = 0 ; i < trace->nframes ; i++ ) { - hashCode = (hashCode << 3) + - (jlong)(ptrdiff_t)(void*)(trace->frames[i].method); - hashCode = (hashCode << 2) + - (jlong)(trace->frames[i].location); - } - hashCode = (hashCode << 3) + trace->nframes; - hashCode += trace->flavor; - return hashCode; -} - -/* Lookup or create a new TraceInfo */ -static TraceInfo * -lookupOrEnter(jvmtiEnv *jvmti, Trace *trace, TraceFlavor flavor) -{ - TraceInfo *tinfo; - jlong hashCode; - - /* Calculate hash code (outside critical section to lessen contention) */ - hashCode = hashTrace(trace); - - /* Do a lookup in the hash table */ - enterCriticalSection(jvmti); { - TraceInfo *prev; - int hashIndex; - - /* Start with first item in hash buck chain */ - prev = NULL; - hashIndex = (int)(hashCode & HASH_INDEX_MASK); - tinfo = gdata->hashBuckets[hashIndex]; - while ( tinfo != NULL ) { - if ( tinfo->hashCode == hashCode && - memcmp(trace, &(tinfo->trace), sizeof(Trace))==0 ) { - /* We found one that matches, move to head of bucket chain */ - if ( prev != NULL ) { - /* Remove from list and add to head of list */ - prev->next = tinfo->next; - tinfo->next = gdata->hashBuckets[hashIndex]; - gdata->hashBuckets[hashIndex] = tinfo; - } - /* Break out */ - break; - } - prev = tinfo; - tinfo = tinfo->next; - } - - /* If we didn't find anything we need to enter a new entry */ - if ( tinfo == NULL ) { - /* Create new hash table element */ - tinfo = newTraceInfo(trace, hashCode, flavor); - } - - /* Update stats */ - (void)updateStats(tinfo); - - } exitCriticalSection(jvmti); - - return tinfo; -} - -/* Get TraceInfo for this allocation */ -static TraceInfo * -findTraceInfo(jvmtiEnv *jvmti, jthread thread, TraceFlavor flavor) -{ - TraceInfo *tinfo; - jvmtiError error; - - tinfo = NULL; - if ( thread != NULL ) { - static Trace empty; - Trace trace; - - /* Before VM_INIT thread could be NULL, watch out */ - trace = empty; - error = (*jvmti)->GetStackTrace(jvmti, thread, 0, MAX_FRAMES+2, - trace.frames, &(trace.nframes)); - /* If we get a PHASE error, the VM isn't ready, or it died */ - if ( error == JVMTI_ERROR_WRONG_PHASE ) { - /* It is assumed this is before VM_INIT */ - if ( flavor == TRACE_USER ) { - tinfo = emptyTrace(TRACE_BEFORE_VM_INIT); - } else { - tinfo = emptyTrace(flavor); - } - } else { - check_jvmti_error(jvmti, error, "Cannot get stack trace"); - /* Lookup this entry */ - tinfo = lookupOrEnter(jvmti, &trace, flavor); - } - } else { - /* If thread==NULL, it's assumed this is before VM_START */ - if ( flavor == TRACE_USER ) { - tinfo = emptyTrace(TRACE_BEFORE_VM_START); - } else { - tinfo = emptyTrace(flavor); - } - } - return tinfo; -} - -/* Tag an object with a TraceInfo pointer. */ -static void -tagObjectWithTraceInfo(jvmtiEnv *jvmti, jobject object, TraceInfo *tinfo) -{ - jvmtiError error; - jlong tag; - - /* Tag this object with this TraceInfo pointer */ - tag = (jlong)(ptrdiff_t)(void*)tinfo; - error = (*jvmti)->SetTag(jvmti, object, tag); - check_jvmti_error(jvmti, error, "Cannot tag object"); -} - -/* Java Native Method for Object. */ -static void JNICALL -HEAP_TRACKER_native_newobj(JNIEnv *env, jclass klass, jthread thread, jobject o) -{ - TraceInfo *tinfo; - - if ( gdata->vmDead ) { - return; - } - tinfo = findTraceInfo(gdata->jvmti, thread, TRACE_USER); - tagObjectWithTraceInfo(gdata->jvmti, o, tinfo); -} - -/* Java Native Method for newarray */ -static void JNICALL -HEAP_TRACKER_native_newarr(JNIEnv *env, jclass klass, jthread thread, jobject a) -{ - TraceInfo *tinfo; - - if ( gdata->vmDead ) { - return; - } - tinfo = findTraceInfo(gdata->jvmti, thread, TRACE_USER); - tagObjectWithTraceInfo(gdata->jvmti, a, tinfo); -} - -/* Callback for JVMTI_EVENT_VM_START */ -static void JNICALL -cbVMStart(jvmtiEnv *jvmti, JNIEnv *env) -{ - enterCriticalSection(jvmti); { - jclass klass; - jfieldID field; - jint rc; - - /* Java Native Methods for class */ - static JNINativeMethod registry[2] = { - {STRING(HEAP_TRACKER_native_newobj), "(Ljava/lang/Object;Ljava/lang/Object;)V", - (void*)&HEAP_TRACKER_native_newobj}, - {STRING(HEAP_TRACKER_native_newarr), "(Ljava/lang/Object;Ljava/lang/Object;)V", - (void*)&HEAP_TRACKER_native_newarr} - }; - - /* Register Natives for class whose methods we use */ - klass = (*env)->FindClass(env, STRING(HEAP_TRACKER_class)); - if ( klass == NULL ) { - fatal_error("ERROR: JNI: Cannot find %s with FindClass\n", - STRING(HEAP_TRACKER_class)); - } - rc = (*env)->RegisterNatives(env, klass, registry, 2); - if ( rc != 0 ) { - fatal_error("ERROR: JNI: Cannot register natives for class %s\n", - STRING(HEAP_TRACKER_class)); - } - - /* Engage calls. */ - field = (*env)->GetStaticFieldID(env, klass, STRING(HEAP_TRACKER_engaged), "I"); - if ( field == NULL ) { - fatal_error("ERROR: JNI: Cannot get field from %s\n", - STRING(HEAP_TRACKER_class)); - } - (*env)->SetStaticIntField(env, klass, field, 1); - - /* Indicate VM has started */ - gdata->vmStarted = JNI_TRUE; - - } exitCriticalSection(jvmti); -} - -/* Iterate Through Heap callback */ -static jint JNICALL -cbObjectTagger(jlong class_tag, jlong size, jlong* tag_ptr, jint length, - void *user_data) -{ - TraceInfo *tinfo; - - tinfo = emptyTrace(TRACE_BEFORE_VM_INIT); - *tag_ptr = (jlong)(ptrdiff_t)(void*)tinfo; - return JVMTI_VISIT_OBJECTS; -} - -/* Callback for JVMTI_EVENT_VM_INIT */ -static void JNICALL -cbVMInit(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - jvmtiHeapCallbacks heapCallbacks; - jvmtiError error; - - /* Iterate through heap, find all untagged objects allocated before this */ - (void)memset(&heapCallbacks, 0, sizeof(heapCallbacks)); - heapCallbacks.heap_iteration_callback = &cbObjectTagger; - error = (*jvmti)->IterateThroughHeap(jvmti, JVMTI_HEAP_FILTER_TAGGED, - NULL, &heapCallbacks, NULL); - check_jvmti_error(jvmti, error, "Cannot iterate through heap"); - - enterCriticalSection(jvmti); { - - /* Indicate VM is initialized */ - gdata->vmInitialized = JNI_TRUE; - - } exitCriticalSection(jvmti); -} - -/* Iterate Through Heap callback */ -static jint JNICALL -cbObjectSpaceCounter(jlong class_tag, jlong size, jlong* tag_ptr, jint length, - void *user_data) -{ - TraceInfo *tinfo; - - tinfo = (TraceInfo*)(ptrdiff_t)(*tag_ptr); - if ( tinfo == NULL ) { - tinfo = emptyTrace(TRACE_MYSTERY); - *tag_ptr = (jlong)(ptrdiff_t)(void*)tinfo; - } - tinfo->totalSpace += size; - return JVMTI_VISIT_OBJECTS; -} - -/* Qsort compare function */ -static int -compareInfo(const void *p1, const void *p2) -{ - TraceInfo *tinfo1, *tinfo2; - - tinfo1 = *((TraceInfo**)p1); - tinfo2 = *((TraceInfo**)p2); - return (int)(tinfo2->totalSpace - tinfo1->totalSpace); -} - -/* Frame to text */ -static void -frameToString(jvmtiEnv *jvmti, char *buf, int buflen, jvmtiFrameInfo *finfo) -{ - jvmtiError error; - jclass klass; - char *signature; - char *methodname; - char *methodsig; - jboolean isNative; - char *filename; - int lineCount; - jvmtiLineNumberEntry*lineTable; - int lineNumber; - - /* Initialize defaults */ - buf[0] = 0; - klass = NULL; - signature = NULL; - methodname = NULL; - methodsig = NULL; - isNative = JNI_FALSE; - filename = NULL; - lineCount = 0; - lineTable = NULL; - lineNumber = 0; - - /* Get jclass object for the jmethodID */ - error = (*jvmti)->GetMethodDeclaringClass(jvmti, finfo->method, &klass); - check_jvmti_error(jvmti, error, "Cannot get method's class"); - - /* Get the class signature */ - error = (*jvmti)->GetClassSignature(jvmti, klass, &signature, NULL); - check_jvmti_error(jvmti, error, "Cannot get class signature"); - - /* Skip all this if it's our own Tracker method */ - if ( strcmp(signature, "L" STRING(HEAP_TRACKER_class) ";" ) == 0 ) { - deallocate(jvmti, signature); - return; - } - - /* Get the name and signature for the method */ - error = (*jvmti)->GetMethodName(jvmti, finfo->method, - &methodname, &methodsig, NULL); - check_jvmti_error(jvmti, error, "Cannot method name"); - - /* Check to see if it's a native method, which means no lineNumber */ - error = (*jvmti)->IsMethodNative(jvmti, finfo->method, &isNative); - check_jvmti_error(jvmti, error, "Cannot get method native status"); - - /* Get source file name */ - error = (*jvmti)->GetSourceFileName(jvmti, klass, &filename); - if ( error != JVMTI_ERROR_NONE && error != JVMTI_ERROR_ABSENT_INFORMATION ) { - check_jvmti_error(jvmti, error, "Cannot get source filename"); - } - - /* Get lineNumber if we can */ - if ( !isNative ) { - int i; - - /* Get method line table */ - error = (*jvmti)->GetLineNumberTable(jvmti, finfo->method, &lineCount, &lineTable); - if ( error == JVMTI_ERROR_NONE ) { - /* Search for line */ - lineNumber = lineTable[0].line_number; - for ( i = 1 ; i < lineCount ; i++ ) { - if ( finfo->location < lineTable[i].start_location ) { - break; - } - lineNumber = lineTable[i].line_number; - } - } else if ( error != JVMTI_ERROR_ABSENT_INFORMATION ) { - check_jvmti_error(jvmti, error, "Cannot get method line table"); - } - } - - /* Create string for this frame location. - * NOTE: These char* quantities are mUTF (Modified UTF-8) bytes - * and should actually be converted to the default system - * character encoding. Sending them to things like - * printf() without converting them is actually an I18n - * (Internationalization) error. - */ - (void)sprintf(buf, "%s.%s@%d[%s:%d]", - (signature==NULL?"UnknownClass":signature), - (methodname==NULL?"UnknownMethod":methodname), - (int)finfo->location, - (filename==NULL?"UnknownFile":filename), - lineNumber); - - /* Free up JVMTI space allocated by the above calls */ - deallocate(jvmti, signature); - deallocate(jvmti, methodname); - deallocate(jvmti, methodsig); - deallocate(jvmti, filename); - deallocate(jvmti, lineTable); -} - -/* Print the information */ -static void -printTraceInfo(jvmtiEnv *jvmti, int index, TraceInfo* tinfo) -{ - if ( tinfo == NULL ) { - fatal_error("%d: NULL ENTRY ERROR\n", index); - return; - } - - stdout_message("%2d: %7d bytes %5d objects %5d live %s", - index, (int)tinfo->totalSpace, tinfo->totalCount, - tinfo->useCount, flavorDesc[tinfo->trace.flavor]); - - if ( tinfo->trace.nframes > 0 ) { - int i; - int fcount; - - fcount = 0; - stdout_message(" stack=("); - for ( i = 0 ; i < tinfo->trace.nframes ; i++ ) { - char buf[4096]; - - frameToString(jvmti, buf, (int)sizeof(buf), tinfo->trace.frames+i); - if ( buf[0] == 0 ) { - continue; /* Skip the ones that are from Tracker class */ - } - fcount++; - stdout_message("%s", buf); - if ( i < (tinfo->trace.nframes-1) ) { - stdout_message(","); - } - } - stdout_message(") nframes=%d\n", fcount); - } else { - stdout_message(" stack=\n"); - } -} - -/* Callback for JVMTI_EVENT_VM_DEATH */ -static void JNICALL -cbVMDeath(jvmtiEnv *jvmti, JNIEnv *env) -{ - jvmtiHeapCallbacks heapCallbacks; - jvmtiError error; - - /* These are purposely done outside the critical section */ - - /* Force garbage collection now so we get our ObjectFree calls */ - error = (*jvmti)->ForceGarbageCollection(jvmti); - check_jvmti_error(jvmti, error, "Cannot force garbage collection"); - - /* Iterate through heap and find all objects */ - (void)memset(&heapCallbacks, 0, sizeof(heapCallbacks)); - heapCallbacks.heap_iteration_callback = &cbObjectSpaceCounter; - error = (*jvmti)->IterateThroughHeap(jvmti, 0, NULL, &heapCallbacks, NULL); - check_jvmti_error(jvmti, error, "Cannot iterate through heap"); - - /* Process VM Death */ - enterCriticalSection(jvmti); { - jclass klass; - jfieldID field; - jvmtiEventCallbacks callbacks; - - /* Disengage calls in HEAP_TRACKER_class. */ - klass = (*env)->FindClass(env, STRING(HEAP_TRACKER_class)); - if ( klass == NULL ) { - fatal_error("ERROR: JNI: Cannot find %s with FindClass\n", - STRING(HEAP_TRACKER_class)); - } - field = (*env)->GetStaticFieldID(env, klass, STRING(HEAP_TRACKER_engaged), "I"); - if ( field == NULL ) { - fatal_error("ERROR: JNI: Cannot get field from %s\n", - STRING(HEAP_TRACKER_class)); - } - (*env)->SetStaticIntField(env, klass, field, 0); - - /* The critical section here is important to hold back the VM death - * until all other callbacks have completed. - */ - - /* Clear out all callbacks. */ - (void)memset(&callbacks,0, sizeof(callbacks)); - error = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, - (jint)sizeof(callbacks)); - check_jvmti_error(jvmti, error, "Cannot set jvmti callbacks"); - - /* Since this critical section could be holding up other threads - * in other event callbacks, we need to indicate that the VM is - * dead so that the other callbacks can short circuit their work. - * We don't expect an further events after VmDeath but we do need - * to be careful that existing threads might be in our own agent - * callback code. - */ - gdata->vmDead = JNI_TRUE; - - /* Dump all objects */ - if ( gdata->traceInfoCount > 0 ) { - TraceInfo **list; - int count; - int i; - - stdout_message("Dumping heap trace information\n"); - - /* Create single array of pointers to TraceInfo's, sort, and - * print top gdata->maxDump top space users. - */ - list = (TraceInfo**)calloc(gdata->traceInfoCount, - sizeof(TraceInfo*)); - if ( list == NULL ) { - fatal_error("ERROR: Ran out of malloc() space\n"); - } - count = 0; - for ( i = 0 ; i < HASH_BUCKET_COUNT ; i++ ) { - TraceInfo *tinfo; - - tinfo = gdata->hashBuckets[i]; - while ( tinfo != NULL ) { - if ( count < gdata->traceInfoCount ) { - list[count++] = tinfo; - } - tinfo = tinfo->next; - } - } - if ( count != gdata->traceInfoCount ) { - fatal_error("ERROR: Count found by iterate doesn't match ours:" - " count=%d != traceInfoCount==%d\n", - count, gdata->traceInfoCount); - } - qsort(list, count, sizeof(TraceInfo*), &compareInfo); - for ( i = 0 ; i < count ; i++ ) { - if ( i >= gdata->maxDump ) { - break; - } - printTraceInfo(jvmti, i+1, list[i]); - } - (void)free(list); - } - - } exitCriticalSection(jvmti); - -} - -/* Callback for JVMTI_EVENT_VM_OBJECT_ALLOC */ -static void JNICALL -cbVMObjectAlloc(jvmtiEnv *jvmti, JNIEnv *env, jthread thread, - jobject object, jclass object_klass, jlong size) -{ - TraceInfo *tinfo; - - if ( gdata->vmDead ) { - return; - } - tinfo = findTraceInfo(jvmti, thread, TRACE_VM_OBJECT); - tagObjectWithTraceInfo(jvmti, object, tinfo); -} - -/* Callback for JVMTI_EVENT_OBJECT_FREE */ -static void JNICALL -cbObjectFree(jvmtiEnv *jvmti, jlong tag) -{ - TraceInfo *tinfo; - - if ( gdata->vmDead ) { - return; - } - - /* The object tag is actually a pointer to a TraceInfo structure */ - tinfo = (TraceInfo*)(void*)(ptrdiff_t)tag; - - /* Decrement the use count */ - tinfo->useCount--; -} - -/* Callback for JVMTI_EVENT_CLASS_FILE_LOAD_HOOK */ -static void JNICALL -cbClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv* env, - jclass class_being_redefined, jobject loader, - const char* name, jobject protection_domain, - jint class_data_len, const unsigned char* class_data, - jint* new_class_data_len, unsigned char** new_class_data) -{ - enterCriticalSection(jvmti); { - /* It's possible we get here right after VmDeath event, be careful */ - if ( !gdata->vmDead ) { - - const char * classname; - - /* Name can be NULL, make sure we avoid SEGV's */ - if ( name == NULL ) { - classname = java_crw_demo_classname(class_data, class_data_len, - NULL); - if ( classname == NULL ) { - fatal_error("ERROR: No classname in classfile\n"); - } - } else { - classname = strdup(name); - if ( classname == NULL ) { - fatal_error("ERROR: Ran out of malloc() space\n"); - } - } - - *new_class_data_len = 0; - *new_class_data = NULL; - - /* The tracker class itself? */ - if ( strcmp(classname, STRING(HEAP_TRACKER_class)) != 0 ) { - jint cnum; - int systemClass; - unsigned char *newImage; - long newLength; - - /* Get number for every class file image loaded */ - cnum = gdata->ccount++; - - /* Is it a system class? If the class load is before VmStart - * then we will consider it a system class that should - * be treated carefully. (See java_crw_demo) - */ - systemClass = 0; - if ( !gdata->vmStarted ) { - systemClass = 1; - } - - newImage = NULL; - newLength = 0; - - /* Call the class file reader/write demo code */ - java_crw_demo(cnum, - classname, - class_data, - class_data_len, - systemClass, - STRING(HEAP_TRACKER_class), - "L" STRING(HEAP_TRACKER_class) ";", - NULL, NULL, - NULL, NULL, - STRING(HEAP_TRACKER_newobj), "(Ljava/lang/Object;)V", - STRING(HEAP_TRACKER_newarr), "(Ljava/lang/Object;)V", - &newImage, - &newLength, - NULL, - NULL); - - /* If we got back a new class image, return it back as "the" - * new class image. This must be JVMTI Allocate space. - */ - if ( newLength > 0 ) { - unsigned char *jvmti_space; - - jvmti_space = (unsigned char *)allocate(jvmti, (jint)newLength); - (void)memcpy((void*)jvmti_space, (void*)newImage, (int)newLength); - *new_class_data_len = (jint)newLength; - *new_class_data = jvmti_space; /* VM will deallocate */ - } - - /* Always free up the space we get from java_crw_demo() */ - if ( newImage != NULL ) { - (void)free((void*)newImage); /* Free malloc() space with free() */ - } - } - - (void)free((void*)classname); - } - } exitCriticalSection(jvmti); -} - -/* Parse the options for this heapTracker agent */ -static void -parse_agent_options(char *options) -{ - #define MAX_TOKEN_LENGTH 16 - char token[MAX_TOKEN_LENGTH]; - char *next; - - /* Defaults */ - gdata->maxDump = 20; - - /* Parse options and set flags in gdata */ - if ( options==NULL ) { - return; - } - - /* Get the first token from the options string. */ - next = get_token(options, ",=", token, (int)sizeof(token)); - - /* While not at the end of the options string, process this option. */ - while ( next != NULL ) { - if ( strcmp(token,"help")==0 ) { - stdout_message("The heapTracker JVMTI demo agent\n"); - stdout_message("\n"); - stdout_message(" java -agent:heapTracker[=options] ...\n"); - stdout_message("\n"); - stdout_message("The options are comma separated:\n"); - stdout_message("\t help\t\t\t Print help information\n"); - stdout_message("\t maxDump=n\t\t\t How many TraceInfo's to dump\n"); - stdout_message("\n"); - exit(0); - } else if ( strcmp(token,"maxDump")==0 ) { - char number[MAX_TOKEN_LENGTH]; - - next = get_token(next, ",=", number, (int)sizeof(number)); - if ( next == NULL ) { - fatal_error("ERROR: Cannot parse maxDump=number: %s\n", options); - } - gdata->maxDump = atoi(number); - } else if ( token[0]!=0 ) { - /* We got a non-empty token and we don't know what it is. */ - fatal_error("ERROR: Unknown option: %s\n", token); - } - /* Get the next token (returns NULL if there are no more) */ - next = get_token(next, ",=", token, (int)sizeof(token)); - } -} - -/* Agent_OnLoad: This is called immediately after the shared library is - * loaded. This is the first code executed. - */ -JNIEXPORT jint JNICALL -DEF_Agent_OnLoad(JavaVM *vm, char *options, void *reserved) -{ - static GlobalAgentData data; - jvmtiEnv *jvmti; - jvmtiError error; - jint res; - TraceFlavor flavor; - jvmtiCapabilities capabilities; - jvmtiEventCallbacks callbacks; - static Trace empty; - - /* Setup initial global agent data area - * Use of static/extern data should be handled carefully here. - * We need to make sure that we are able to cleanup after ourselves - * so anything allocated in this library needs to be freed in - * the Agent_OnUnload() function. - */ - (void)memset((void*)&data, 0, sizeof(data)); - gdata = &data; - - /* First thing we need to do is get the jvmtiEnv* or JVMTI environment */ - res = (*vm)->GetEnv(vm, (void **)&jvmti, JVMTI_VERSION_1); - if (res != JNI_OK) { - /* This means that the VM was unable to obtain this version of the - * JVMTI interface, this is a fatal error. - */ - fatal_error("ERROR: Unable to access JVMTI Version 1 (0x%x)," - " is your JDK a 5.0 or newer version?" - " JNIEnv's GetEnv() returned %d\n", - JVMTI_VERSION_1, res); - } - - /* Here we save the jvmtiEnv* for Agent_OnUnload(). */ - gdata->jvmti = jvmti; - - /* Parse any options supplied on java command line */ - parse_agent_options(options); - - /* Immediately after getting the jvmtiEnv* we need to ask for the - * capabilities this agent will need. - */ - (void)memset(&capabilities,0, sizeof(capabilities)); - capabilities.can_generate_all_class_hook_events = 1; - capabilities.can_tag_objects = 1; - capabilities.can_generate_object_free_events = 1; - capabilities.can_get_source_file_name = 1; - capabilities.can_get_line_numbers = 1; - capabilities.can_generate_vm_object_alloc_events = 1; - error = (*jvmti)->AddCapabilities(jvmti, &capabilities); - check_jvmti_error(jvmti, error, "Unable to get necessary JVMTI capabilities."); - - /* Next we need to provide the pointers to the callback functions to - * to this jvmtiEnv* - */ - (void)memset(&callbacks,0, sizeof(callbacks)); - /* JVMTI_EVENT_VM_START */ - callbacks.VMStart = &cbVMStart; - /* JVMTI_EVENT_VM_INIT */ - callbacks.VMInit = &cbVMInit; - /* JVMTI_EVENT_VM_DEATH */ - callbacks.VMDeath = &cbVMDeath; - /* JVMTI_EVENT_OBJECT_FREE */ - callbacks.ObjectFree = &cbObjectFree; - /* JVMTI_EVENT_VM_OBJECT_ALLOC */ - callbacks.VMObjectAlloc = &cbVMObjectAlloc; - /* JVMTI_EVENT_CLASS_FILE_LOAD_HOOK */ - callbacks.ClassFileLoadHook = &cbClassFileLoadHook; - error = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, (jint)sizeof(callbacks)); - check_jvmti_error(jvmti, error, "Cannot set jvmti callbacks"); - - /* At first the only initial events we are interested in are VM - * initialization, VM death, and Class File Loads. - * Once the VM is initialized we will request more events. - */ - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_START, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_INIT, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_DEATH, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_OBJECT_FREE, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_OBJECT_ALLOC, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - - /* Here we create a raw monitor for our use in this agent to - * protect critical sections of code. - */ - error = (*jvmti)->CreateRawMonitor(jvmti, "agent data", &(gdata->lock)); - check_jvmti_error(jvmti, error, "Cannot create raw monitor"); - - /* Create the TraceInfo for various flavors of empty traces */ - for ( flavor = TRACE_FIRST ; flavor <= TRACE_LAST ; flavor++ ) { - gdata->emptyTrace[flavor] = - newTraceInfo(&empty, hashTrace(&empty), flavor); - } - - /* Add jar file to boot classpath */ - add_demo_jar_to_bootclasspath(jvmti, "heapTracker"); - - /* We return JNI_OK to signify success */ - return JNI_OK; -} - -/* Agent_OnUnload: This is called immediately before the shared library is - * unloaded. This is the last code executed. - */ -JNIEXPORT void JNICALL -DEF_Agent_OnUnload(JavaVM *vm) -{ - /* Skip any cleanup, VM is about to die anyway */ -} diff --git a/jdk/src/demo/share/jvmti/heapTracker/heapTracker.h b/jdk/src/demo/share/jvmti/heapTracker/heapTracker.h deleted file mode 100644 index 8d63f156b71..00000000000 --- a/jdk/src/demo/share/jvmti/heapTracker/heapTracker.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* Primary heapTracker #include file, should be included by most if not - * all heapTracker source files. Gives access to the global data structure - * and all global macros. - */ - -#ifndef HEAP_TRACKER_H -#define HEAP_TRACKER_H - -/* Standard C functions used throughout. */ - -#include -#include -#include -#include -#include - -/* General JVM/Java functions, types and macros. */ - -#include -#include "jni.h" -#include "jvmti.h" - -/* Utility functions */ - -#include "agent_util.h" - -#endif diff --git a/jdk/src/demo/share/jvmti/heapTracker/sample.makefile.txt b/jdk/src/demo/share/jvmti/heapTracker/sample.makefile.txt deleted file mode 100644 index e094bc8206f..00000000000 --- a/jdk/src/demo/share/jvmti/heapTracker/sample.makefile.txt +++ /dev/null @@ -1,163 +0,0 @@ -# -# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -######################################################################## -# -# Sample GNU Makefile for building JVMTI Demo heapTracker -# -# Example uses: -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparc] -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] -# gnumake JDK= OSNAME=linux [OPT=true] -# gnumake JDK= OSNAME=win32 [OPT=true] -# -######################################################################## - -# Source lists -LIBNAME=heapTracker -SOURCES=heapTracker.c ../agent_util/agent_util.c -JAVA_SOURCES=HeapTracker.java - -# Name of jar file that needs to be created -JARFILE=heapTracker.jar - -# Solaris Studio C Compiler Version 12.4 -ifeq ($(OSNAME), solaris) - # Sun Solaris Compiler options needed - COMMON_FLAGS=-mt -KPIC - # Options that help find errors - COMMON_FLAGS+= -Xa -v -xc99=%none - # Check LIBARCH for any special compiler options - LIBARCH=$(shell uname -p) - ifeq ($(LIBARCH), sparc) - COMMON_FLAGS+=-xarch=v8 -xregs=no%appl - endif - ifeq ($(LIBARCH), sparcv9) - COMMON_FLAGS+=-xarch=v9 -xregs=no%appl - endif - ifeq ($(OPT), true) - CFLAGS=-xO2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-z defs -ztext - # Libraries we are dependent on - LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -G -o $@ -endif - -# Linux GNU C Compiler -ifeq ($(OSNAME), linux) - # GNU Compiler options needed to build it - COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer - # Options that help find errors - COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses - ifeq ($(OPT), true) - CFLAGS=-O2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc - # Libraries we are dependent on - LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ -endif - -# Windows Microsoft C/C++ Optimizing Compiler Version 12 -ifeq ($(OSNAME), win32) - CC=cl - # Compiler options needed to build it - COMMON_FLAGS=-Gy -DWIN32 - # Options that help find errors - COMMON_FLAGS+=-W0 -WX - ifeq ($(OPT), true) - CFLAGS= -Ox -Op -Zi $(COMMON_FLAGS) - else - CFLAGS= -Od -Zi $(COMMON_FLAGS) - endif - # Sources need java_crw_demo - SOURCES += ../java_crw_demo/java_crw_demo.c - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.obj) - # Library name and options needed to build it - LIBRARY=$(LIBNAME).dll - LDFLAGS= - # Libraries we are dependent on - LIBRARIES=$(JDK)/ - # Building a shared library - LINK_SHARED=link -dll -out:$@ -endif - -# Common -I options -CFLAGS += -I. -CFLAGS += -I../agent_util -CFLAGS += -I../java_crw_demo -CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - -# Default rule (build both native library and jar file) -all: $(LIBRARY) $(JARFILE) - -# Build native library -$(LIBRARY): $(OBJECTS) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - -# Build jar file -$(JARFILE): $(JAVA_SOURCES) - rm -f -r classes - mkdir -p classes - $(JDK)/bin/javac -d classes $(JAVA_SOURCES) - (cd classes; $(JDK)/bin/jar cf ../$@ *) - -# Cleanup the built bits -clean: - rm -f -r classes - rm -f $(LIBRARY) $(JARFILE) $(OBJECTS) - -# Simple tester -test: all - LD_LIBRARY_PATH=. $(JDK)/bin/java -agentlib:$(LIBNAME) -Xbootclasspath/a:./$(JARFILE) -version - -# Compilation rule only needed on Windows -ifeq ($(OSNAME), win32) -%.obj: %.c - $(COMPILE.c) $< -endif - diff --git a/jdk/src/demo/share/jvmti/heapViewer/README.txt b/jdk/src/demo/share/jvmti/heapViewer/README.txt deleted file mode 100644 index 57c183819f3..00000000000 --- a/jdk/src/demo/share/jvmti/heapViewer/README.txt +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -heapViewer - -This agent library demonstrates how to get an easy view of the -heap in terms of total object count and space used. -It uses GetLoadedClasses(), SetTag(), and IterateThroughHeap() -to count up all the objects of all the current loaded classes. -The heap dump will happen at the event JVMTI_EVENT_VM_DEATH, or the -event JVMTI_EVENT_DATA_DUMP_REQUEST. - -It also demonstrates some more robust agent error handling using -GetErrorName(), - -Using the heap iterate functions, lots of statistics can be generated -without resorting to using Byte Code Instrumentation (BCI). - -You can use this agent library as follows: - - java -agentlib:heapViewer ... - -To get help on the available options try: - - java -agentlib:heapViewer=help - -See ${JAVA_HOME}/demo/jvmti/index.html for help running and building agents. - diff --git a/jdk/src/demo/share/jvmti/heapViewer/heapViewer.c b/jdk/src/demo/share/jvmti/heapViewer/heapViewer.c deleted file mode 100644 index 35ed907b84a..00000000000 --- a/jdk/src/demo/share/jvmti/heapViewer/heapViewer.c +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include -#include -#include -#include - -#include "jni.h" -#include "jvmti.h" - -#include "agent_util.h" - -/* Global static data */ -typedef struct { - jboolean vmDeathCalled; - jboolean dumpInProgress; - jrawMonitorID lock; -} GlobalData; -static GlobalData globalData, *gdata = &globalData; - -/* Typedef to hold class details */ -typedef struct { - char *signature; - int count; - int space; -} ClassDetails; - -/* Enter agent monitor protected section */ -static void -enterAgentMonitor(jvmtiEnv *jvmti) -{ - jvmtiError err; - - err = (*jvmti)->RawMonitorEnter(jvmti, gdata->lock); - check_jvmti_error(jvmti, err, "raw monitor enter"); -} - -/* Exit agent monitor protected section */ -static void -exitAgentMonitor(jvmtiEnv *jvmti) -{ - jvmtiError err; - - err = (*jvmti)->RawMonitorExit(jvmti, gdata->lock); - check_jvmti_error(jvmti, err, "raw monitor exit"); -} - -/* Heap object callback */ -static jint JNICALL -cbHeapObject(jlong class_tag, jlong size, jlong* tag_ptr, jint length, - void* user_data) -{ - if ( class_tag != (jlong)0 ) { - ClassDetails *d; - - d = (ClassDetails*)(void*)(ptrdiff_t)class_tag; - (*((jint*)(user_data)))++; - d->count++; - d->space += (int)size; - } - return JVMTI_VISIT_OBJECTS; -} - -/* Compare two ClassDetails */ -static int -compareDetails(const void *p1, const void *p2) -{ - return ((ClassDetails*)p2)->space - ((ClassDetails*)p1)->space; -} - -/* Callback for JVMTI_EVENT_DATA_DUMP_REQUEST (Ctrl-\ or at exit) */ -static void JNICALL -dataDumpRequest(jvmtiEnv *jvmti) -{ - enterAgentMonitor(jvmti); { - if ( !gdata->vmDeathCalled && !gdata->dumpInProgress ) { - jvmtiHeapCallbacks heapCallbacks; - ClassDetails *details; - jvmtiError err; - jclass *classes; - jint totalCount; - jint count; - jint i; - - gdata->dumpInProgress = JNI_TRUE; - - /* Get all the loaded classes */ - err = (*jvmti)->GetLoadedClasses(jvmti, &count, &classes); - check_jvmti_error(jvmti, err, "get loaded classes"); - - /* Setup an area to hold details about these classes */ - details = (ClassDetails*)calloc(sizeof(ClassDetails), count); - if ( details == NULL ) { - fatal_error("ERROR: Ran out of malloc space\n"); - } - for ( i = 0 ; i < count ; i++ ) { - char *sig; - - /* Get and save the class signature */ - err = (*jvmti)->GetClassSignature(jvmti, classes[i], &sig, NULL); - check_jvmti_error(jvmti, err, "get class signature"); - if ( sig == NULL ) { - fatal_error("ERROR: No class signature found\n"); - } - details[i].signature = strdup(sig); - deallocate(jvmti, sig); - - /* Tag this jclass */ - err = (*jvmti)->SetTag(jvmti, classes[i], - (jlong)(ptrdiff_t)(void*)(&details[i])); - check_jvmti_error(jvmti, err, "set object tag"); - } - - /* Iterate through the heap and count up uses of jclass */ - (void)memset(&heapCallbacks, 0, sizeof(heapCallbacks)); - heapCallbacks.heap_iteration_callback = &cbHeapObject; - totalCount = 0; - err = (*jvmti)->IterateThroughHeap(jvmti, - JVMTI_HEAP_FILTER_CLASS_UNTAGGED, NULL, - &heapCallbacks, (const void *)&totalCount); - check_jvmti_error(jvmti, err, "iterate through heap"); - - /* Remove tags */ - for ( i = 0 ; i < count ; i++ ) { - /* Un-Tag this jclass */ - err = (*jvmti)->SetTag(jvmti, classes[i], (jlong)0); - check_jvmti_error(jvmti, err, "set object tag"); - } - - /* Sort details by space used */ - qsort(details, count, sizeof(ClassDetails), &compareDetails); - - /* Print out sorted table */ - stdout_message("Heap View, Total of %d objects found.\n\n", - totalCount); - - stdout_message("Space Count Class Signature\n"); - stdout_message("---------- ---------- ----------------------\n"); - - for ( i = 0 ; i < count ; i++ ) { - if ( details[i].space == 0 || i > 20 ) { - break; - } - stdout_message("%10d %10d %s\n", - details[i].space, details[i].count, details[i].signature); - } - stdout_message("---------- ---------- ----------------------\n\n"); - - /* Free up all allocated space */ - deallocate(jvmti, classes); - for ( i = 0 ; i < count ; i++ ) { - if ( details[i].signature != NULL ) { - free(details[i].signature); - } - } - free(details); - - gdata->dumpInProgress = JNI_FALSE; - } - } exitAgentMonitor(jvmti); -} - -/* Callback for JVMTI_EVENT_VM_INIT */ -static void JNICALL -vmInit(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - enterAgentMonitor(jvmti); { - jvmtiError err; - - err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_DATA_DUMP_REQUEST, NULL); - check_jvmti_error(jvmti, err, "set event notification"); - } exitAgentMonitor(jvmti); -} - -/* Callback for JVMTI_EVENT_VM_DEATH */ -static void JNICALL -vmDeath(jvmtiEnv *jvmti, JNIEnv *env) -{ - jvmtiError err; - - /* Make sure everything has been garbage collected */ - err = (*jvmti)->ForceGarbageCollection(jvmti); - check_jvmti_error(jvmti, err, "force garbage collection"); - - /* Disable events and dump the heap information */ - enterAgentMonitor(jvmti); { - err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_DISABLE, - JVMTI_EVENT_DATA_DUMP_REQUEST, NULL); - check_jvmti_error(jvmti, err, "set event notification"); - - dataDumpRequest(jvmti); - - gdata->vmDeathCalled = JNI_TRUE; - } exitAgentMonitor(jvmti); -} - -/* Agent_OnLoad() is called first, we prepare for a VM_INIT event here. */ -JNIEXPORT jint JNICALL -DEF_Agent_OnLoad(JavaVM *vm, char *options, void *reserved) -{ - jint rc; - jvmtiError err; - jvmtiCapabilities capabilities; - jvmtiEventCallbacks callbacks; - jvmtiEnv *jvmti; - - /* Get JVMTI environment */ - jvmti = NULL; - rc = (*vm)->GetEnv(vm, (void **)&jvmti, JVMTI_VERSION); - if (rc != JNI_OK) { - fatal_error("ERROR: Unable to create jvmtiEnv, error=%d\n", rc); - return -1; - } - if ( jvmti == NULL ) { - fatal_error("ERROR: No jvmtiEnv* returned from GetEnv\n"); - } - - /* Get/Add JVMTI capabilities */ - (void)memset(&capabilities, 0, sizeof(capabilities)); - capabilities.can_tag_objects = 1; - capabilities.can_generate_garbage_collection_events = 1; - err = (*jvmti)->AddCapabilities(jvmti, &capabilities); - check_jvmti_error(jvmti, err, "add capabilities"); - - /* Create the raw monitor */ - err = (*jvmti)->CreateRawMonitor(jvmti, "agent lock", &(gdata->lock)); - check_jvmti_error(jvmti, err, "create raw monitor"); - - /* Set callbacks and enable event notifications */ - memset(&callbacks, 0, sizeof(callbacks)); - callbacks.VMInit = &vmInit; - callbacks.VMDeath = &vmDeath; - callbacks.DataDumpRequest = &dataDumpRequest; - err = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, sizeof(callbacks)); - check_jvmti_error(jvmti, err, "set event callbacks"); - err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_INIT, NULL); - check_jvmti_error(jvmti, err, "set event notifications"); - err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_DEATH, NULL); - check_jvmti_error(jvmti, err, "set event notifications"); - return 0; -} - -/* Agent_OnUnload() is called last */ -JNIEXPORT void JNICALL -DEF_Agent_OnUnload(JavaVM *vm) -{ -} diff --git a/jdk/src/demo/share/jvmti/heapViewer/sample.makefile.txt b/jdk/src/demo/share/jvmti/heapViewer/sample.makefile.txt deleted file mode 100644 index 59693c298eb..00000000000 --- a/jdk/src/demo/share/jvmti/heapViewer/sample.makefile.txt +++ /dev/null @@ -1,147 +0,0 @@ -# -# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -######################################################################## -# -# Sample GNU Makefile for building JVMTI Demo heapViewer -# -# Example uses: -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparc] -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] -# gnumake JDK= OSNAME=linux [OPT=true] -# gnumake JDK= OSNAME=win32 [OPT=true] -# -######################################################################## - -# Source lists -LIBNAME=heapViewer -SOURCES=heapViewer.c ../agent_util/agent_util.c - -# Solaris Studio C Compiler Version 12.4 -ifeq ($(OSNAME), solaris) - # Sun Solaris Compiler options needed - COMMON_FLAGS=-mt -KPIC - # Options that help find errors - COMMON_FLAGS+= -Xa -v -xc99=%none - # Check LIBARCH for any special compiler options - LIBARCH=$(shell uname -p) - ifeq ($(LIBARCH), sparc) - COMMON_FLAGS+=-xarch=v8 -xregs=no%appl - endif - ifeq ($(LIBARCH), sparcv9) - COMMON_FLAGS+=-xarch=v9 -xregs=no%appl - endif - ifeq ($(OPT), true) - CFLAGS=-xO2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-z defs -ztext - # Libraries we are dependent on - LIBRARIES= -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -G -o $@ -endif - -# Linux GNU C Compiler -ifeq ($(OSNAME), linux) - # GNU Compiler options needed to build it - COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer - # Options that help find errors - COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses - ifeq ($(OPT), true) - CFLAGS=-O2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc - # Libraries we are dependent on - LIBRARIES=-lc - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ -endif - -# Windows Microsoft C/C++ Optimizing Compiler Version 12 -ifeq ($(OSNAME), win32) - CC=cl - # Compiler options needed to build it - COMMON_FLAGS=-Gy -DWIN32 - # Options that help find errors - COMMON_FLAGS+=-W0 -WX - ifeq ($(OPT), true) - CFLAGS= -Ox -Op -Zi $(COMMON_FLAGS) - else - CFLAGS= -Od -Zi $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.obj) - # Library name and options needed to build it - LIBRARY=$(LIBNAME).dll - LDFLAGS= - # Libraries we are dependent on - LIBRARIES= - # Building a shared library - LINK_SHARED=link -dll -out:$@ -endif - -# Common -I options -CFLAGS += -I. -CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - -# Default rule -all: $(LIBRARY) - -# Build native library -$(LIBRARY): $(OBJECTS) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - -# Cleanup the built bits -clean: - rm -f $(LIBRARY) $(OBJECTS) - -# Simple tester -test: all - LD_LIBRARY_PATH=`pwd` $(JDK)/bin/java -agentlib:$(LIBNAME) -version - -# Compilation rule only needed on Windows -ifeq ($(OSNAME), win32) -%.obj: %.c - $(COMPILE.c) $< -endif - diff --git a/jdk/src/demo/share/jvmti/index.html b/jdk/src/demo/share/jvmti/index.html deleted file mode 100644 index 5791b8b046f..00000000000 --- a/jdk/src/demo/share/jvmti/index.html +++ /dev/null @@ -1,430 +0,0 @@ - - JVM TI Demonstration Code - -

    JVM TI Demonstration Code

    - -

    -The -Java™ Virtual Machine Tools Interface (JVM TI) -is a native tool interface provided in JDK 5.0 and newer. -Native libraries that use JVM TI and are loaded into the -Java Virtual Machine -via the -agentlib, -agentpath, or -Xrun (deprecated) interfaces, are -called Agents. -

    -JVM TI -was designed to work with the -Java Native Interface -(JNI), -and eventually displace the -Java Virtual Machine Debugging Interface -(JVMDI) -and the -Java Virtual Machine Profiling Interface -(JVMPI). - -

    -We have created a set of demonstration agents that should -help show many of the features and abilities of the -interface. This list of demonstration agents will change over time. -They are provided as educational tools and as starting -points for Java tool development. - -

    -These agents are built with every JDK build and some basic testing is performed -on a regular basis, but no extensive testbases currently -exist for these agents. -Every JDK installation should include all the pre-built binaries and sources for -all these agents, just look in the demo/jvmti directory of your JDK. - - -

    Using or Running These Agents

    - -

    -Using these agents will require the VM to locate the shared library file -before any actual Java code is run. -The JDK installation should contain all the agent libraries in -the ${JAVA_HOME}/demo/jvmti/agent-name/lib directories. -The Solaris 64bit version would be contained in the sparcv9 or amd64 -subdirectory. -If 'java' complains that it can't find the library, -you may need to add the directory containing the library into the -LD_LIBRARY_PATH environment variable (Unix), or the PATH environment -variable (Windows). -This is system and platform specific. -If you are using 64bit Solaris (e.g. 'java -d64'), -you should use LD_LIBRARY_PATH64. -Some agents such as the jdwp (debugger backend) -are located inside the primary JDK directories and will always be found -in those locations. - -

    -The agents that instrument classfiles -(i.e. BCI, usually through the java_crw_demo library) -such as heapTracker, mtrace, and minst, -also need to have the Java classes they use available in the bootclasspath. -The agents will make attempts at automatically adding their jar file -(e.g. heapTracker.jar, mtrace.jar, or minst.jar) to the bootclasspath -with AddToBootstrapClassLoaderSearch from JVM TI at startup -(see the agent_util code). -This is done by locating this jar file at -${JAVA_HOME}/demo/jvmti/agent-name -where JAVA_HOME is obtained by calling GetSystemProperty from JVM TI -with "java.home". -We recognize that this is not ideal, but felt that as just demonstration -code it was acceptable. -Ideally the agent could find out the actual directory it came from and -locate the jar file relative to that location. -Our demonstration agents currently do not do this. - -

    -If you choose to modify or change these agents, the above information -is important in making everything is found. -It is recommended that you change the name of the agent when you -modify it to avoid conflicts with the existing demo agents. -Or better yet, go to http://jdk.dev.java.net and submit your -changes to the agent as an RFE to the JDK. - - -

    Demonstration Agents Available

    - -
      - -
    • -versionCheck -
      -This is a extremely small agent that does nothing but check the -version string supplied in the jvmti.h file, with the version -number supplied by the VM at runtime. -
    • - -
    • -compiledMethodLoad -
      -This is a small agent that traces CompiledMethodLoad events along -with the HotSpot specific compile_info parameter. -
    • - -
    • -mtrace -
      -This is a small agent that does method tracing. -It uses Bytecode Instrumentation (BCI) via the java_crw_demo library. -
    • - -
    • -minst -
      -This is an even smaller agent that does just method entry tracing. -It also uses Bytecode Instrumentation (BCI) via the java_crw_demo library, -but the instrumentation code is pure Java (no Java native methods used). -NOTE: Be sure to check out java.lang.instrument for a way to avoid -native code agents completely. -
    • - -
    • -gctest -
      -This is a small agent that does garbage collection counting. -
    • - -
    • -heapViewer -
      -This is a small agent that does some basic heap inspections. -
    • - -
    • -heapTracker -
      -This is a small agent that does BCI to capture object creation -and track them. -It uses Bytecode Instrumentation (BCI) via the java_crw_demo library. -
    • - -
    • -waiters -
      -This is a small agent that gets information about threads -waiting on monitors. -
    • - -
    - - - -

    Agent Support

    - -
      - -
    • -java_crw_demo -
      -This is a demo C library that does class file to class file -transformations or BCI (Bytecode Instrumentation). -It is used by several of the above agents. -
    • - - -
    - - - -

    Native Library Build Hints

    - -

    -All libraries loaded into java are assumed to be MT-safe (Multi-thread safe). -This means that multiple threads could be executing the code at the same -time, and static or global data may need to be placed in critical -sections. See the Raw Monitor interfaces for more information. - -

    -All native libraries loaded into the -Java Virtual Machine, -including Agent libraries, -need to be compiled and built in a compatible way. -Certain native compilation options or optimizations should be avoided, -and some are required. -More information on this options is available in the man pages for -the various compilers. - -

    -Some native compiler and linker options can create fatal or -erroneous behavior when native agent libraries are operating -inside the Java Virtual Machine. -It would take too many words to describe all the possible issues with all -the native compiler options, optimizations, and settings. -Here are some recommendations on the basic compiler and linker options -we recommend: - -

      - -

      Solaris

      - -
    • -On Solaris, using the Sun Studio 11 C compiler, -the typical compile and link command lines might look something like: -
      -For 32bit SPARC: -
      -
        -cc -xO2 -mt -xregs=no%appl -xmemalign=4s -xarch=v8 -KPIC -c *.c -
        -cc -mt -xarch=v8 -z defs -ztext -G -o libXXX.so *.o -lc -
      -
      -For 64bit SPARC: -
      -
        -cc -xO2 -mt -xregs=no%appl -xarch=v9 -KPIC -c *.c -
        -cc -mt -xarch=v9 -z defs -ztext -G -o libXXX.so *.o -lc -
      -
      -For X86: -
      -
        -cc -xO2 -mt -xregs=no%frameptr -KPIC -c *.c -
        -cc -mt -z defs -ztext -G -o libXXX.so *.o -lc -
      -
      -For AMD64: -
      -
        -cc -xO2 -mt -xregs=no%frameptr -xarch=amd64 -KPIC -c *.c -
        -cc -mt -xarch=amd64 -z defs -ztext -G -o libXXX.so *.o -lc -
      -
      -
    • - -
    • -Architecture/File Format: -For SPARC 32bit use -xarch=v8, -for SPARC 64bit use -xarch=v9, -for X86 (32-bit) - -leave the option off or use -xarch=generic -, -and for AMD64 (64bit) use -xarch=amd64 -with both C and C++. -
      -This is to be specific as to the architecture and the file format -of the .o files (and ultimately of the .so). -
    • - -
    • -MT-Safe, Position Independent: Use -KPIC -mt -with both C and C++. -
    • - -
    • -Register usage: For SPARC (both 32bit and 64bit) use --xregs=no%appl and for X86 and AMD64 use -xregs=no%frameptr -with both C and C++. -
    • - -
    • -Alignment: For SPARC 32bit use -xmemalign=4s and for SPARC 64bit do NOT use -xmemalign=4 -with both C and C++. -
    • - -
    • -Dependencies: Use ldd -r LibraryName. -
      -After the shared library has been built, the utility -ldd can be used to verify that all dependent libraries -have been satisfied, and all externs can be found. -If ldd says anything is missing, it is very likely that the JVM will also -be unable to load this library. -This usually means that you missed some -lname -options when building the library, or perhaps forgot a -R path -option that tells the library where to look for libraries at runtime. -
    • - -

      Linux

      - -
    • -On Linux, using the gcc version 3.2, -the typical compile and link command lines might look something like: -
      -For X86: -
      -
        -gcc -O2 -fPIC -pthread -DLINUX -c *.c -
        -gcc -z defs -static-libgcc -shared -o libXXX.so *.o -lc -
      -
      -For AMD64: -
      -
        -gcc -O2 -fPIC -pthread -DLINUX -D_LP64=1 -c *.c -
        -gcc -z defs -static-libgcc -shared -o libXXX.so *.o -lc -
      -
      -
    • - -
    • -MT-Safe, Position Independent: -Use -fPIC -pthread. -
    • - -
    • -Agent Demo Code: Needs -DLINUX -
    • - -
    • -Register Usage: Use -fno-omit-frame-pointer. -
      -It is important that these libraries have frame pointer register usage, see the above comments on the Solaris --xregs=no%frameptr -option. -
    • - -
    • -Library: Use -static-libgcc. -
      -When building the shared library (-shared option), this option -allows for maximum portability of the library between different -flavors of Linux. -The problem we have seen with Linux is that we cannot depend -on a compatible shared gcc library existing on all the versions of -Linux we can run on. -By doing this static link, the version script becomes more -important, making sure you don't expose any extern symbols -you didn't intend to. -
    • - -
    • -Dependencies: Use ldd -r LibraryName. -
      -Provides the same checking as Solaris (see above). -
    • - -

      Windows

      - -
    • -On Windows and using the Microsoft C++ Compiler Visual Studio .NET 2003, -the typical compile and link command lines might look something like: -
      -For X86: -
      -
        -cl /O1 /MD /D _STATIC_CPPLIB /c *.c -
        -link /dll /opt:REF /out:XXX.dll *.obj -
      -
      -For AMD64: -
      -
        -cl /O1 /MD /D _STATIC_CPPLIB /c *.c -
        -link /dll /opt:REF /out:XXX.dll *.obj -
      -
      -
    • - -
    • -Library: Use /opt:REF when building the dll. -
    • - -
    • -MS DLL Runtime: Use the /MD /D _STATIC_CPPLIB option. -
      -This causes your dll to become dependent on just MSVCR*.DLL. -The option /D _STATIC_CPPLIB prevents you from becoming dependent on the -C++ library MSVCP*.DLL. -This is what we use in the JDK, but there are probably many combinations -that you could safely use, unfortunately there are many combinations -of runtimes that will not work. -Check the Microsoft site on proper use of runtimes. -
    • - -
    • -Dependencies: Use VC++ dumpbin /exports and the VC++ "Dependency Walker". -
      -Provides dependency information similar to ldd. -
    • - -
    - - -

    For More Information

    - -

    -Remember, the complete source to all these agents is contained in the JDK -installations at demo/jvmti. - -

    -For more detailed information on JVM TI, refer to - -http://java.sun.com/j2se/latest/docs/guide/jvmti. - -

    -More information on using JNI and building native libraries refer to: - -http://java.sun.com/j2se/latest/docs/guide/jni. - -

    -Additional information can also be found by doing a search on "jvmti" at -http://java.sun.com/j2se. -Various technical articles are also available through this website. -And don't forget the -Java Tutorials at -http://docs.oracle.com/javase/tutorial -for getting a quick start on all the various interfaces. - -

    Comments and Feedback

    - -

    -Comments regarding JVM TI or on any of these demonstrations should be -sent through -http://java.sun.com/mail/ - - - - diff --git a/jdk/src/demo/share/jvmti/java_crw_demo/README.txt b/jdk/src/demo/share/jvmti/java_crw_demo/README.txt deleted file mode 100644 index c242793a6a2..00000000000 --- a/jdk/src/demo/share/jvmti/java_crw_demo/README.txt +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -java_crw_demo Library - -The library java_crw_demo is a small C library that is used by HPROF -and other agent libraries to do some very basic bytecode -insertion (BCI) of class files. This is not an agent -library but a general purpose library that can be used to do some -very limited bytecode insertion. - -In the demo sources, look for the use of java_crw_demo.h and -the C function java_crw_demo(). The java_crw_demo library is provided -as part of the JRE. - -The basic BCI that this library does includes: - - * On entry to the java.lang.Object init method (signature "()V"), - a invokestatic call to tclass.obj_init_method(object); is inserted. - - * On any newarray type opcode, immediately following it, the array - object is duplicated on the stack and an invokestatic call to - tclass.newarray_method(object); is inserted. - - * On entry to all methods, a invokestatic call to - tclass.call_method(cnum,mnum); is inserted. The agent can map the - two integers (cnum,mnum) to a method in a class, the cnum is the - number provided to the java_crw_demo library when the classfile was - modified. - - * On return from any method (any return opcode), a invokestatic call to - tclass.return_method(cnum,mnum); is inserted. - -Some methods are not modified at all, init methods and finalize methods -whose length is 1 will not be modified. Classes that are designated -"system" will not have their clinit methods modified. In addition, the -method java.lang.Thread.currentThread() is not modified. - -No methods or fields will be added to any class, however new constant -pool entries will be added at the end of the original constant pool table. -The exception, line, and local variable tables for each method is adjusted -for the modification. The bytecodes are compressed to use smaller offsets -and the fewest 'wide' opcodes. - -All attempts are made to minimize the number of bytecodes at each insertion -site, however, classes with N return opcodes or N newarray opcodes will get -N insertions. And only the necessary modification dictated by the input -arguments to java_crw_demo are actually made. - diff --git a/jdk/src/demo/share/jvmti/java_crw_demo/java_crw_demo.c b/jdk/src/demo/share/jvmti/java_crw_demo/java_crw_demo.c deleted file mode 100644 index eaa271e9e18..00000000000 --- a/jdk/src/demo/share/jvmti/java_crw_demo/java_crw_demo.c +++ /dev/null @@ -1,2535 +0,0 @@ -/* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* Class reader writer (java_crw_demo) for instrumenting bytecodes */ - -/* - * As long as the callbacks allow for it and the class number is unique, - * this code is completely re-entrant and any number of classfile - * injections can happen at the same time. - * - * The current logic requires a unique number for this class instance - * or (jclass,jobject loader) pair, this is done via the ClassIndex - * in hprof, which is passed in as the 'unsigned cnum' to java_crw_demo(). - * It's up to the user of this interface if it wants to use this - * feature. - * - */ - -#include -#include -#include - -/* Get Java and class file and bytecode information. */ - -#include - -#include "classfile_constants.h" - - -/* Include our own interface for cross check */ - -#include "java_crw_demo.h" - -/* Macros over error functions to capture line numbers */ - -/* Fatal error used in all builds. */ - -/* Use THIS_FILE when it is available. */ -#ifndef THIS_FILE - #define THIS_FILE "java_crw.demo.c" /* Never use __FILE__ */ -#endif - -#define CRW_FATAL(ci, message) fatal_error(ci, message, THIS_FILE, __LINE__) - -#if defined(DEBUG) || !defined(NDEBUG) - - /* This assert macro is only used in the debug builds. */ - #define CRW_ASSERT(ci, cond) \ - ((cond)?(void)0:assert_error(ci, #cond, THIS_FILE, __LINE__)) - -#else - - #define CRW_ASSERT(ci, cond) - -#endif - -#define CRW_ASSERT_MI(mi) CRW_ASSERT((mi)?(mi)->ci:NULL,(mi)!=NULL) - -#define CRW_ASSERT_CI(ci) CRW_ASSERT(ci, ( (ci) != NULL && \ - (ci)->input_position <= (ci)->input_len && \ - (ci)->output_position <= (ci)->output_len) ) - -#define BUFSIZE 256 - -#ifdef _WIN32 -#define snprintf(buffer, count, format, ...) _snprintf_s(buffer, count, _TRUNCATE, format, ##__VA_ARGS__) -#endif - -/* Typedefs for various integral numbers, just for code clarity */ - -typedef unsigned ClassOpcode; /* One opcode */ -typedef unsigned char ByteCode; /* One byte from bytecodes */ -typedef int ByteOffset; /* Byte offset */ -typedef int ClassConstant; /* Constant pool kind */ -typedef long CrwPosition; /* Position in class image */ -typedef unsigned short CrwCpoolIndex; /* Index into constant pool */ - -/* Misc support macros */ - -/* Given the position of an opcode, find the next 4byte boundary position */ -#define NEXT_4BYTE_BOUNDARY(opcode_pos) (((opcode_pos)+4) & (~3)) - -#define LARGEST_INJECTION (12*3) /* 3 injections at same site */ -#define MAXIMUM_NEW_CPOOL_ENTRIES 64 /* don't add more than 32 entries */ - -/* Constant Pool Entry (internal table that mirrors pool in file image) */ - -typedef struct { - const char * ptr; /* Pointer to any string */ - unsigned short len; /* Length of string */ - unsigned int index1; /* 1st 16 bit index or 32bit value. */ - unsigned int index2; /* 2nd 16 bit index or 32bit value. */ - ClassConstant tag; /* Tag or kind of entry. */ -} CrwConstantPoolEntry; - -struct MethodImage; - -/* Class file image storage structure */ - -typedef struct CrwClassImage { - - /* Unique class number for this class */ - unsigned number; - - /* Name of class, given or gotten out of class image */ - const char * name; - - /* Input and Output class images tracking */ - const unsigned char * input; - unsigned char * output; - CrwPosition input_len; - CrwPosition output_len; - CrwPosition input_position; - CrwPosition output_position; - - /* Mirrored constant pool */ - CrwConstantPoolEntry * cpool; - CrwCpoolIndex cpool_max_elements; /* Max count */ - CrwCpoolIndex cpool_count_plus_one; - - /* Input flags about class (e.g. is it a system class) */ - int system_class; - - /* Class access flags gotten from file. */ - unsigned access_flags; - - /* Names of classes and methods. */ - char* tclass_name; /* Name of class that has tracker methods. */ - char* tclass_sig; /* Signature of class */ - char* call_name; /* Method name to call at offset 0 */ - char* call_sig; /* Signature of this method */ - char* return_name; /* Method name to call before any return */ - char* return_sig; /* Signature of this method */ - char* obj_init_name; /* Method name to call in Object */ - char* obj_init_sig; /* Signature of this method */ - char* newarray_name; /* Method name to call after newarray opcodes */ - char* newarray_sig; /* Signature of this method */ - - /* Constant pool index values for new entries */ - CrwCpoolIndex tracker_class_index; - CrwCpoolIndex object_init_tracker_index; - CrwCpoolIndex newarray_tracker_index; - CrwCpoolIndex call_tracker_index; - CrwCpoolIndex return_tracker_index; - CrwCpoolIndex class_number_index; /* Class number in pool */ - - /* Count of injections made into this class */ - int injection_count; - - /* This class must be the java.lang.Object class */ - jboolean is_object_class; - - /* This class must be the java.lang.Thread class */ - jboolean is_thread_class; - - /* Callback functions */ - FatalErrorHandler fatal_error_handler; - MethodNumberRegister mnum_callback; - - /* Table of method names and descr's */ - int method_count; - const char ** method_name; - const char ** method_descr; - struct MethodImage * current_mi; - -} CrwClassImage; - -/* Injection bytecodes (holds injected bytecodes for each code position) */ - -typedef struct { - ByteCode * code; - ByteOffset len; -} Injection; - -/* Method transformation data (allocated/freed as each method is processed) */ - -typedef struct MethodImage { - - /* Back reference to Class image data. */ - CrwClassImage * ci; - - /* Unique method number for this class. */ - unsigned number; - - /* Method name and descr */ - const char * name; - const char * descr; - - /* Map of input bytecode offsets to output bytecode offsets */ - ByteOffset * map; - - /* Bytecode injections for each input bytecode offset */ - Injection * injections; - - /* Widening setting for each input bytecode offset */ - signed char * widening; - - /* Length of original input bytecodes, and new bytecodes. */ - ByteOffset code_len; - ByteOffset new_code_len; - - /* Location in input where bytecodes are located. */ - CrwPosition start_of_input_bytecodes; - - /* Original max_stack and new max stack */ - unsigned max_stack; - unsigned new_max_stack; - - jboolean object_init_method; - jboolean skip_call_return_sites; - - /* Method access flags gotten from file. */ - unsigned access_flags; - -} MethodImage; - -/* ----------------------------------------------------------------- */ -/* General support functions (memory and error handling) */ - -static void -fatal_error(CrwClassImage *ci, const char *message, const char *file, int line) -{ - if ( ci != NULL && ci->fatal_error_handler != NULL ) { - (*ci->fatal_error_handler)(message, file, line); - } else { - /* Normal operation should NEVER reach here */ - /* NO CRW FATAL ERROR HANDLER! */ - (void)fprintf(stderr, "CRW: %s [%s:%d]\n", message, file, line); - } - abort(); -} - -#if defined(DEBUG) || !defined(NDEBUG) -static void -assert_error(CrwClassImage *ci, const char *condition, - const char *file, int line) -{ - char buf[512]; - MethodImage *mi; - ByteOffset byte_code_offset; - - mi = ci->current_mi; - if ( mi != NULL ) { - byte_code_offset = (ByteOffset)(mi->ci->input_position - mi->start_of_input_bytecodes); - } else { - byte_code_offset=-1; - } - - (void)sprintf(buf, - "CRW ASSERTION FAILURE: %s (%s:%s:%d)", - condition, - ci->name==NULL?"?":ci->name, - (mi==NULL||mi->name==NULL)?"?":mi->name, - byte_code_offset); - fatal_error(ci, buf, file, line); -} -#endif - -static void * -allocate(CrwClassImage *ci, int nbytes) -{ - void * ptr; - - if ( nbytes <= 0 ) { - CRW_FATAL(ci, "Cannot allocate <= 0 bytes"); - } - ptr = malloc(nbytes); - if ( ptr == NULL ) { - CRW_FATAL(ci, "Ran out of malloc memory"); - } - return ptr; -} - -static void * -reallocate(CrwClassImage *ci, void *optr, int nbytes) -{ - void * ptr; - - if ( optr == NULL ) { - CRW_FATAL(ci, "Cannot deallocate NULL"); - } - if ( nbytes <= 0 ) { - CRW_FATAL(ci, "Cannot reallocate <= 0 bytes"); - } - ptr = realloc(optr, nbytes); - if ( ptr == NULL ) { - CRW_FATAL(ci, "Ran out of malloc memory"); - } - return ptr; -} - -static void * -allocate_clean(CrwClassImage *ci, int nbytes) -{ - void * ptr; - - if ( nbytes <= 0 ) { - CRW_FATAL(ci, "Cannot allocate <= 0 bytes"); - } - ptr = calloc(nbytes, 1); - if ( ptr == NULL ) { - CRW_FATAL(ci, "Ran out of malloc memory"); - } - return ptr; -} - -static const char * -duplicate(CrwClassImage *ci, const char *str, int len) -{ - char *copy; - - copy = (char*)allocate(ci, len+1); - (void)memcpy(copy, str, len); - copy[len] = 0; - return (const char *)copy; -} - -static void -deallocate(CrwClassImage *ci, void *ptr) -{ - if ( ptr == NULL ) { - CRW_FATAL(ci, "Cannot deallocate NULL"); - } - (void)free(ptr); -} - -/* ----------------------------------------------------------------- */ -/* Functions for reading/writing bytes to/from the class images */ - -static unsigned -readU1(CrwClassImage *ci) -{ - CRW_ASSERT_CI(ci); - return ((unsigned)(ci->input[ci->input_position++])) & 0xFF; -} - -static unsigned -readU2(CrwClassImage *ci) -{ - unsigned res; - - res = readU1(ci); - return (res << 8) + readU1(ci); -} - -static signed short -readS2(CrwClassImage *ci) -{ - unsigned res; - - res = readU1(ci); - return ((res << 8) + readU1(ci)) & 0xFFFF; -} - -static unsigned -readU4(CrwClassImage *ci) -{ - unsigned res; - - res = readU2(ci); - return (res << 16) + readU2(ci); -} - -static void -writeU1(CrwClassImage *ci, unsigned val) /* Only writes out lower 8 bits */ -{ - CRW_ASSERT_CI(ci); - if ( ci->output != NULL ) { - ci->output[ci->output_position++] = val & 0xFF; - } -} - -static void -writeU2(CrwClassImage *ci, unsigned val) -{ - writeU1(ci, val >> 8); - writeU1(ci, val); -} - -static void -writeU4(CrwClassImage *ci, unsigned val) -{ - writeU2(ci, val >> 16); - writeU2(ci, val); -} - -static unsigned -copyU1(CrwClassImage *ci) -{ - unsigned value; - - value = readU1(ci); - writeU1(ci, value); - return value; -} - -static unsigned -copyU2(CrwClassImage *ci) -{ - unsigned value; - - value = readU2(ci); - writeU2(ci, value); - return value; -} - -static unsigned -copyU4(CrwClassImage *ci) -{ - unsigned value; - - value = readU4(ci); - writeU4(ci, value); - return value; -} - -static void -copy(CrwClassImage *ci, unsigned count) -{ - CRW_ASSERT_CI(ci); - if ( ci->output != NULL ) { - (void)memcpy(ci->output+ci->output_position, - ci->input+ci->input_position, count); - ci->output_position += count; - } - ci->input_position += count; - CRW_ASSERT_CI(ci); -} - -static void -skip(CrwClassImage *ci, unsigned count) -{ - CRW_ASSERT_CI(ci); - ci->input_position += count; -} - -static void -read_bytes(CrwClassImage *ci, void *bytes, unsigned count) -{ - CRW_ASSERT_CI(ci); - CRW_ASSERT(ci, bytes!=NULL); - (void)memcpy(bytes, ci->input+ci->input_position, count); - ci->input_position += count; -} - -static void -write_bytes(CrwClassImage *ci, void *bytes, unsigned count) -{ - CRW_ASSERT_CI(ci); - CRW_ASSERT(ci, bytes!=NULL); - if ( ci->output != NULL ) { - (void)memcpy(ci->output+ci->output_position, bytes, count); - ci->output_position += count; - } -} - -static void -random_writeU2(CrwClassImage *ci, CrwPosition pos, unsigned val) -{ - CrwPosition save_position; - - CRW_ASSERT_CI(ci); - save_position = ci->output_position; - ci->output_position = pos; - writeU2(ci, val); - ci->output_position = save_position; -} - -static void -random_writeU4(CrwClassImage *ci, CrwPosition pos, unsigned val) -{ - CrwPosition save_position; - - CRW_ASSERT_CI(ci); - save_position = ci->output_position; - ci->output_position = pos; - writeU4(ci, val); - ci->output_position = save_position; -} - -/* ----------------------------------------------------------------- */ -/* Constant Pool handling functions. */ - -static void -fillin_cpool_entry(CrwClassImage *ci, CrwCpoolIndex i, - ClassConstant tag, - unsigned int index1, unsigned int index2, - const char *ptr, int len) -{ - CRW_ASSERT_CI(ci); - CRW_ASSERT(ci, i > 0 && i < ci->cpool_count_plus_one); - ci->cpool[i].tag = tag; - ci->cpool[i].index1 = index1; - ci->cpool[i].index2 = index2; - ci->cpool[i].ptr = ptr; - ci->cpool[i].len = (unsigned short)len; -} - -static CrwCpoolIndex -add_new_cpool_entry(CrwClassImage *ci, ClassConstant tag, - unsigned int index1, unsigned int index2, - const char *str, int len) -{ - CrwCpoolIndex i; - char *utf8 = NULL; - - CRW_ASSERT_CI(ci); - i = ci->cpool_count_plus_one++; - - /* NOTE: This implementation does not automatically expand the - * constant pool table beyond the expected number needed - * to handle this particular CrwTrackerInterface injections. - * See MAXIMUM_NEW_CPOOL_ENTRIES - */ - CRW_ASSERT(ci, ci->cpool_count_plus_one < ci->cpool_max_elements ); - - writeU1(ci, tag); - switch (tag) { - case JVM_CONSTANT_Class: - writeU2(ci, index1); - break; - case JVM_CONSTANT_String: - writeU2(ci, index1); - break; - case JVM_CONSTANT_Fieldref: - case JVM_CONSTANT_Methodref: - case JVM_CONSTANT_InterfaceMethodref: - case JVM_CONSTANT_Integer: - case JVM_CONSTANT_Float: - case JVM_CONSTANT_NameAndType: - writeU2(ci, index1); - writeU2(ci, index2); - break; - case JVM_CONSTANT_Long: - case JVM_CONSTANT_Double: - writeU4(ci, index1); - writeU4(ci, index2); - ci->cpool_count_plus_one++; - CRW_ASSERT(ci, ci->cpool_count_plus_one < ci->cpool_max_elements ); - break; - case JVM_CONSTANT_Utf8: - CRW_ASSERT(ci, len==(len & 0xFFFF)); - writeU2(ci, len); - write_bytes(ci, (void*)str, len); - utf8 = (char*)duplicate(ci, str, len); - break; - default: - CRW_FATAL(ci, "Unknown constant"); - break; - } - fillin_cpool_entry(ci, i, tag, index1, index2, (const char *)utf8, len); - CRW_ASSERT(ci, i > 0 && i < ci->cpool_count_plus_one); - return i; -} - -static CrwCpoolIndex -add_new_class_cpool_entry(CrwClassImage *ci, const char *class_name) -{ - CrwCpoolIndex name_index; - CrwCpoolIndex class_index; - int len; - - CRW_ASSERT_CI(ci); - CRW_ASSERT(ci, class_name!=NULL); - - len = (int)strlen(class_name); - name_index = add_new_cpool_entry(ci, JVM_CONSTANT_Utf8, len, 0, - class_name, len); - class_index = add_new_cpool_entry(ci, JVM_CONSTANT_Class, name_index, 0, - NULL, 0); - return class_index; -} - -static CrwCpoolIndex -add_new_method_cpool_entry(CrwClassImage *ci, CrwCpoolIndex class_index, - const char *name, const char *descr) -{ - CrwCpoolIndex name_index; - CrwCpoolIndex descr_index; - CrwCpoolIndex name_type_index; - int len; - - CRW_ASSERT_CI(ci); - CRW_ASSERT(ci, name!=NULL); - CRW_ASSERT(ci, descr!=NULL); - len = (int)strlen(name); - name_index = - add_new_cpool_entry(ci, JVM_CONSTANT_Utf8, len, 0, name, len); - len = (int)strlen(descr); - descr_index = - add_new_cpool_entry(ci, JVM_CONSTANT_Utf8, len, 0, descr, len); - name_type_index = - add_new_cpool_entry(ci, JVM_CONSTANT_NameAndType, - name_index, descr_index, NULL, 0); - return add_new_cpool_entry(ci, JVM_CONSTANT_Methodref, - class_index, name_type_index, NULL, 0); -} - -static CrwConstantPoolEntry -cpool_entry(CrwClassImage *ci, CrwCpoolIndex c_index) -{ - CRW_ASSERT_CI(ci); - CRW_ASSERT(ci, c_index > 0 && c_index < ci->cpool_count_plus_one); - return ci->cpool[c_index]; -} - -static void -cpool_setup(CrwClassImage *ci) -{ - CrwCpoolIndex i; - CrwPosition cpool_output_position; - int count_plus_one; - - CRW_ASSERT_CI(ci); - cpool_output_position = ci->output_position; - count_plus_one = copyU2(ci); - CRW_ASSERT(ci, count_plus_one>1); - ci->cpool_max_elements = count_plus_one+MAXIMUM_NEW_CPOOL_ENTRIES; - ci->cpool = (CrwConstantPoolEntry*)allocate_clean(ci, - (int)((ci->cpool_max_elements)*sizeof(CrwConstantPoolEntry))); - ci->cpool_count_plus_one = (CrwCpoolIndex)count_plus_one; - - /* Index zero not in class file */ - for (i = 1; i < count_plus_one; ++i) { - CrwCpoolIndex ipos; - ClassConstant tag; - unsigned int index1; - unsigned int index2; - unsigned len; - char * utf8; - char message[BUFSIZE]; - - ipos = i; - index1 = 0; - index2 = 0; - len = 0; - utf8 = NULL; - - tag = copyU1(ci); - switch (tag) { - case JVM_CONSTANT_Class: - index1 = copyU2(ci); - break; - case JVM_CONSTANT_String: - index1 = copyU2(ci); - break; - case JVM_CONSTANT_Fieldref: - case JVM_CONSTANT_Methodref: - case JVM_CONSTANT_InterfaceMethodref: - case JVM_CONSTANT_Integer: - case JVM_CONSTANT_Float: - case JVM_CONSTANT_NameAndType: - index1 = copyU2(ci); - index2 = copyU2(ci); - break; - case JVM_CONSTANT_Long: - case JVM_CONSTANT_Double: - index1 = copyU4(ci); - index2 = copyU4(ci); - ++i; /* // these take two CP entries - duh! */ - break; - case JVM_CONSTANT_Utf8: - len = copyU2(ci); - index1 = (unsigned short)len; - utf8 = (char*)allocate(ci, len+1); - read_bytes(ci, (void*)utf8, len); - utf8[len] = 0; - write_bytes(ci, (void*)utf8, len); - break; - case JVM_CONSTANT_MethodType: - index1 = copyU2(ci); - break; - case JVM_CONSTANT_MethodHandle: - index1 = copyU1(ci); - index2 = copyU2(ci); - break; - case JVM_CONSTANT_InvokeDynamic: - index1 = copyU2(ci); - index2 = copyU2(ci); - break; - default: - snprintf(message, BUFSIZE, "Unknown tag: %d, at ipos %hu", tag, ipos); - CRW_FATAL(ci, message); - break; - } - fillin_cpool_entry(ci, ipos, tag, index1, index2, (const char *)utf8, len); - } - - if (ci->call_name != NULL || ci->return_name != NULL) { - if ( ci->number != (ci->number & 0x7FFF) ) { - ci->class_number_index = - add_new_cpool_entry(ci, JVM_CONSTANT_Integer, - (ci->number>>16) & 0xFFFF, ci->number & 0xFFFF, NULL, 0); - } - } - - if ( ci->tclass_name != NULL ) { - ci->tracker_class_index = - add_new_class_cpool_entry(ci, ci->tclass_name); - } - if (ci->obj_init_name != NULL) { - ci->object_init_tracker_index = add_new_method_cpool_entry(ci, - ci->tracker_class_index, - ci->obj_init_name, - ci->obj_init_sig); - } - if (ci->newarray_name != NULL) { - ci->newarray_tracker_index = add_new_method_cpool_entry(ci, - ci->tracker_class_index, - ci->newarray_name, - ci->newarray_sig); - } - if (ci->call_name != NULL) { - ci->call_tracker_index = add_new_method_cpool_entry(ci, - ci->tracker_class_index, - ci->call_name, - ci->call_sig); - } - if (ci->return_name != NULL) { - ci->return_tracker_index = add_new_method_cpool_entry(ci, - ci->tracker_class_index, - ci->return_name, - ci->return_sig); - } - - random_writeU2(ci, cpool_output_position, ci->cpool_count_plus_one); -} - -/* ----------------------------------------------------------------- */ -/* Functions that create the bytecodes to inject */ - -static ByteOffset -push_pool_constant_bytecodes(ByteCode *bytecodes, CrwCpoolIndex index) -{ - ByteOffset nbytes = 0; - - if ( index == (index&0x7F) ) { - bytecodes[nbytes++] = (ByteCode)JVM_OPC_ldc; - } else { - bytecodes[nbytes++] = (ByteCode)JVM_OPC_ldc_w; - bytecodes[nbytes++] = (ByteCode)((index >> 8) & 0xFF); - } - bytecodes[nbytes++] = (ByteCode)(index & 0xFF); - return nbytes; -} - -static ByteOffset -push_short_constant_bytecodes(ByteCode *bytecodes, unsigned number) -{ - ByteOffset nbytes = 0; - - if ( number <= 5 ) { - bytecodes[nbytes++] = (ByteCode)(JVM_OPC_iconst_0+number); - } else if ( number == (number&0x7F) ) { - bytecodes[nbytes++] = (ByteCode)JVM_OPC_bipush; - bytecodes[nbytes++] = (ByteCode)(number & 0xFF); - } else { - bytecodes[nbytes++] = (ByteCode)JVM_OPC_sipush; - bytecodes[nbytes++] = (ByteCode)((number >> 8) & 0xFF); - bytecodes[nbytes++] = (ByteCode)(number & 0xFF); - } - return nbytes; -} - -static ByteOffset -injection_template(MethodImage *mi, ByteCode *bytecodes, ByteOffset max_nbytes, - CrwCpoolIndex method_index) -{ - CrwClassImage * ci; - ByteOffset nbytes = 0; - unsigned max_stack; - int add_dup; - int add_aload; - int push_cnum; - int push_mnum; - - ci = mi->ci; - - CRW_ASSERT(ci, bytecodes!=NULL); - - if ( method_index == 0 ) { - return 0; - } - - if ( method_index == ci->newarray_tracker_index) { - max_stack = mi->max_stack + 1; - add_dup = JNI_TRUE; - add_aload = JNI_FALSE; - push_cnum = JNI_FALSE; - push_mnum = JNI_FALSE; - } else if ( method_index == ci->object_init_tracker_index) { - max_stack = mi->max_stack + 1; - add_dup = JNI_FALSE; - add_aload = JNI_TRUE; - push_cnum = JNI_FALSE; - push_mnum = JNI_FALSE; - } else { - max_stack = mi->max_stack + 2; - add_dup = JNI_FALSE; - add_aload = JNI_FALSE; - push_cnum = JNI_TRUE; - push_mnum = JNI_TRUE; - } - - if ( add_dup ) { - bytecodes[nbytes++] = (ByteCode)JVM_OPC_dup; - } - if ( add_aload ) { - bytecodes[nbytes++] = (ByteCode)JVM_OPC_aload_0; - } - if ( push_cnum ) { - if ( ci->number == (ci->number & 0x7FFF) ) { - nbytes += push_short_constant_bytecodes(bytecodes+nbytes, - ci->number); - } else { - CRW_ASSERT(ci, ci->class_number_index!=0); - nbytes += push_pool_constant_bytecodes(bytecodes+nbytes, - ci->class_number_index); - } - } - if ( push_mnum ) { - nbytes += push_short_constant_bytecodes(bytecodes+nbytes, - mi->number); - } - bytecodes[nbytes++] = (ByteCode)JVM_OPC_invokestatic; - bytecodes[nbytes++] = (ByteCode)(method_index >> 8); - bytecodes[nbytes++] = (ByteCode)method_index; - bytecodes[nbytes] = 0; - CRW_ASSERT(ci, nbytes mi->new_max_stack ) { - mi->new_max_stack = max_stack; - } - return nbytes; -} - -/* Called to create injection code at entry to a method */ -static ByteOffset -entry_injection_code(MethodImage *mi, ByteCode *bytecodes, ByteOffset len) -{ - CrwClassImage * ci; - ByteOffset nbytes = 0; - - CRW_ASSERT_MI(mi); - - ci = mi->ci; - - if ( mi->object_init_method ) { - nbytes = injection_template(mi, - bytecodes, len, ci->object_init_tracker_index); - } - if ( !mi->skip_call_return_sites ) { - nbytes += injection_template(mi, - bytecodes+nbytes, len-nbytes, ci->call_tracker_index); - } - return nbytes; -} - -/* Called to create injection code before an opcode */ -static ByteOffset -before_injection_code(MethodImage *mi, ClassOpcode opcode, - ByteCode *bytecodes, ByteOffset len) -{ - ByteOffset nbytes = 0; - - - CRW_ASSERT_MI(mi); - switch ( opcode ) { - case JVM_OPC_return: - case JVM_OPC_ireturn: - case JVM_OPC_lreturn: - case JVM_OPC_freturn: - case JVM_OPC_dreturn: - case JVM_OPC_areturn: - if ( !mi->skip_call_return_sites ) { - nbytes = injection_template(mi, - bytecodes, len, mi->ci->return_tracker_index); - } - break; - default: - break; - } - return nbytes; -} - -/* Called to create injection code after an opcode */ -static ByteOffset -after_injection_code(MethodImage *mi, ClassOpcode opcode, - ByteCode *bytecodes, ByteOffset len) -{ - CrwClassImage* ci; - ByteOffset nbytes; - - ci = mi->ci; - nbytes = 0; - - CRW_ASSERT_MI(mi); - switch ( opcode ) { - case JVM_OPC_new: - /* Can't inject here cannot pass around uninitialized object */ - break; - case JVM_OPC_newarray: - case JVM_OPC_anewarray: - case JVM_OPC_multianewarray: - nbytes = injection_template(mi, - bytecodes, len, ci->newarray_tracker_index); - break; - default: - break; - } - return nbytes; -} - -/* Actually inject the bytecodes */ -static void -inject_bytecodes(MethodImage *mi, ByteOffset at, - ByteCode *bytecodes, ByteOffset len) -{ - Injection injection; - CrwClassImage *ci; - - ci = mi->ci; - CRW_ASSERT_MI(mi); - CRW_ASSERT(ci, at <= mi->code_len); - - injection = mi->injections[at]; - - CRW_ASSERT(ci, len <= LARGEST_INJECTION/2); - CRW_ASSERT(ci, injection.len+len <= LARGEST_INJECTION); - - /* Either start an injection area or concatenate to what is there */ - if ( injection.code == NULL ) { - CRW_ASSERT(ci, injection.len==0); - injection.code = (ByteCode *)allocate_clean(ci, LARGEST_INJECTION+1); - } - - (void)memcpy(injection.code+injection.len, bytecodes, len); - injection.len += len; - injection.code[injection.len] = 0; - mi->injections[at] = injection; - ci->injection_count++; -} - -/* ----------------------------------------------------------------- */ -/* Method handling functions */ - -static MethodImage * -method_init(CrwClassImage *ci, unsigned mnum, ByteOffset code_len) -{ - MethodImage * mi; - ByteOffset i; - - mi = (MethodImage*)allocate_clean(ci, (int)sizeof(MethodImage)); - mi->ci = ci; - mi->name = ci->method_name[mnum]; - mi->descr = ci->method_descr[mnum]; - mi->code_len = code_len; - mi->map = (ByteOffset*)allocate_clean(ci, - (int)((code_len+1)*sizeof(ByteOffset))); - for(i=0; i<=code_len; i++) { - mi->map[i] = i; - } - mi->widening = (signed char*)allocate_clean(ci, code_len+1); - mi->injections = (Injection *)allocate_clean(ci, - (int)((code_len+1)*sizeof(Injection))); - mi->number = mnum; - ci->current_mi = mi; - return mi; -} - -static void -method_term(MethodImage *mi) -{ - CrwClassImage *ci; - - ci = mi->ci; - CRW_ASSERT_MI(mi); - if ( mi->map != NULL ) { - deallocate(ci, (void*)mi->map); - mi->map = NULL; - } - if ( mi->widening != NULL ) { - deallocate(ci, (void*)mi->widening); - mi->widening = NULL; - } - if ( mi->injections != NULL ) { - ByteOffset i; - for(i=0; i<= mi->code_len; i++) { - if ( mi->injections[i].code != NULL ) { - deallocate(ci, (void*)mi->injections[i].code); - mi->injections[i].code = NULL; - } - } - deallocate(ci, (void*)mi->injections); - mi->injections = NULL; - } - ci->current_mi = NULL; - deallocate(ci, (void*)mi); -} - -static ByteOffset -input_code_offset(MethodImage *mi) -{ - CRW_ASSERT_MI(mi); - return (ByteOffset)(mi->ci->input_position - mi->start_of_input_bytecodes); -} - -static void -rewind_to_beginning_of_input_bytecodes(MethodImage *mi) -{ - CRW_ASSERT_MI(mi); - mi->ci->input_position = mi->start_of_input_bytecodes; -} - -/* Starting at original byte position 'at', add 'offset' to it's new - * location. This may be a negative value. - * NOTE: That this map is not the new bytecode location of the opcode - * but the new bytecode location that should be used when - * a goto or jump instruction was targeting the old bytecode - * location. - */ -static void -adjust_map(MethodImage *mi, ByteOffset at, ByteOffset offset) -{ - ByteOffset i; - - CRW_ASSERT_MI(mi); - for (i = at; i <= mi->code_len; ++i) { - mi->map[i] += offset; - } -} - -static void -widen(MethodImage *mi, ByteOffset at, ByteOffset len) -{ - int delta; - - CRW_ASSERT(mi->ci, at <= mi->code_len); - delta = len - mi->widening[at]; - /* Adjust everything from the current input location by delta */ - adjust_map(mi, input_code_offset(mi), delta); - /* Mark at beginning of instruction */ - mi->widening[at] = (signed char)len; -} - -static void -verify_opc_wide(CrwClassImage *ci, ClassOpcode wopcode) -{ - switch (wopcode) { - case JVM_OPC_aload: case JVM_OPC_astore: - case JVM_OPC_fload: case JVM_OPC_fstore: - case JVM_OPC_iload: case JVM_OPC_istore: - case JVM_OPC_lload: case JVM_OPC_lstore: - case JVM_OPC_dload: case JVM_OPC_dstore: - case JVM_OPC_ret: case JVM_OPC_iinc: - break; - default: - CRW_FATAL(ci, "Invalid opcode supplied to wide opcode"); - break; - } -} - -static unsigned -opcode_length(CrwClassImage *ci, ClassOpcode opcode) -{ - /* Define array that holds length of an opcode */ - static unsigned char _opcode_length[JVM_OPC_MAX+1] = - JVM_OPCODE_LENGTH_INITIALIZER; - - if ( opcode > JVM_OPC_MAX ) { - CRW_FATAL(ci, "Invalid opcode supplied to opcode_length()"); - } - return _opcode_length[opcode]; -} - -/* Walk one instruction and inject instrumentation */ -static void -inject_for_opcode(MethodImage *mi) -{ - CrwClassImage * ci; - ClassOpcode opcode; - int pos; - - CRW_ASSERT_MI(mi); - ci = mi->ci; - pos = input_code_offset(mi); - opcode = readU1(ci); - - if (opcode == JVM_OPC_wide) { - ClassOpcode wopcode; - - wopcode = readU1(ci); - /* lvIndex not used */ - (void)readU2(ci); - verify_opc_wide(ci, wopcode); - if ( wopcode==JVM_OPC_iinc ) { - (void)readU1(ci); - (void)readU1(ci); - } - } else { - - ByteCode bytecodes[LARGEST_INJECTION+1]; - int header; - int instr_len; - int low; - int high; - int npairs; - ByteOffset len; - - /* Get bytecodes to inject before this opcode */ - len = before_injection_code(mi, opcode, bytecodes, (int)sizeof(bytecodes)); - if ( len > 0 ) { - inject_bytecodes(mi, pos, bytecodes, len); - /* Adjust map after processing this opcode */ - } - - /* Process this opcode */ - switch (opcode) { - case JVM_OPC_tableswitch: - header = NEXT_4BYTE_BOUNDARY(pos); - skip(ci, header - (pos+1)); - (void)readU4(ci); - low = readU4(ci); - high = readU4(ci); - skip(ci, (high+1-low) * 4); - break; - case JVM_OPC_lookupswitch: - header = NEXT_4BYTE_BOUNDARY(pos); - skip(ci, header - (pos+1)); - (void)readU4(ci); - npairs = readU4(ci); - skip(ci, npairs * 8); - break; - default: - instr_len = opcode_length(ci, opcode); - skip(ci, instr_len-1); - break; - } - - /* Get position after this opcode is processed */ - pos = input_code_offset(mi); - - /* Adjust for any before_injection_code() */ - if ( len > 0 ) { - /* Adjust everything past this opcode. - * Why past it? Because we want any jumps to this bytecode loc - * to go to the injected code, not where the opcode - * was moved too. - * Consider a 'return' opcode that is jumped too. - * NOTE: This may not be correct in all cases, but will - * when we are only dealing with non-variable opcodes - * like the return opcodes. Be careful if the - * before_injection_code() changes to include other - * opcodes that have variable length. - */ - adjust_map(mi, pos, len); - } - - /* Get bytecodes to inject after this opcode */ - len = after_injection_code(mi, opcode, bytecodes, (int)sizeof(bytecodes)); - if ( len > 0 ) { - inject_bytecodes(mi, pos, bytecodes, len); - - /* Adjust for any after_injection_code() */ - adjust_map(mi, pos, len); - } - - } -} - -/* Map original bytecode location to it's new location. (See adjust_map()). */ -static ByteOffset -method_code_map(MethodImage *mi, ByteOffset pos) -{ - CRW_ASSERT_MI(mi); - CRW_ASSERT(mi->ci, pos <= mi->code_len); - return mi->map[pos]; -} - -static int -adjust_instruction(MethodImage *mi) -{ - CrwClassImage * ci; - ClassOpcode opcode; - int pos; - int new_pos; - - CRW_ASSERT_MI(mi); - ci = mi->ci; - pos = input_code_offset(mi); - new_pos = method_code_map(mi,pos); - - opcode = readU1(ci); - - if (opcode == JVM_OPC_wide) { - ClassOpcode wopcode; - - wopcode = readU1(ci); - /* lvIndex not used */ - (void)readU2(ci); - verify_opc_wide(ci, wopcode); - if ( wopcode==JVM_OPC_iinc ) { - (void)readU1(ci); - (void)readU1(ci); - } - } else { - - int widened; - int header; - int newHeader; - int low; - int high; - int new_pad; - int old_pad; - int delta; - int new_delta; - int delta_pad; - int npairs; - int instr_len; - - switch (opcode) { - - case JVM_OPC_tableswitch: - widened = mi->widening[pos]; - header = NEXT_4BYTE_BOUNDARY(pos); - newHeader = NEXT_4BYTE_BOUNDARY(new_pos); - - skip(ci, header - (pos+1)); - - delta = readU4(ci); - low = readU4(ci); - high = readU4(ci); - skip(ci, (high+1-low) * 4); - new_pad = newHeader - new_pos; - old_pad = header - pos; - delta_pad = new_pad - old_pad; - if (widened != delta_pad) { - widen(mi, pos, delta_pad); - return 0; - } - break; - - case JVM_OPC_lookupswitch: - widened = mi->widening[pos]; - header = NEXT_4BYTE_BOUNDARY(pos); - newHeader = NEXT_4BYTE_BOUNDARY(new_pos); - - skip(ci, header - (pos+1)); - - delta = readU4(ci); - npairs = readU4(ci); - skip(ci, npairs * 8); - new_pad = newHeader - new_pos; - old_pad = header - pos; - delta_pad = new_pad - old_pad; - if (widened != delta_pad) { - widen(mi, pos, delta_pad); - return 0; - } - break; - - case JVM_OPC_jsr: case JVM_OPC_goto: - case JVM_OPC_ifeq: case JVM_OPC_ifge: case JVM_OPC_ifgt: - case JVM_OPC_ifle: case JVM_OPC_iflt: case JVM_OPC_ifne: - case JVM_OPC_if_icmpeq: case JVM_OPC_if_icmpne: case JVM_OPC_if_icmpge: - case JVM_OPC_if_icmpgt: case JVM_OPC_if_icmple: case JVM_OPC_if_icmplt: - case JVM_OPC_if_acmpeq: case JVM_OPC_if_acmpne: - case JVM_OPC_ifnull: case JVM_OPC_ifnonnull: - widened = mi->widening[pos]; - delta = readS2(ci); - if (widened == 0) { - new_delta = method_code_map(mi,pos+delta) - new_pos; - if ((new_delta < -32768) || (new_delta > 32767)) { - switch (opcode) { - case JVM_OPC_jsr: case JVM_OPC_goto: - widen(mi, pos, 2); - break; - default: - widen(mi, pos, 5); - break; - } - return 0; - } - } - break; - - case JVM_OPC_jsr_w: - case JVM_OPC_goto_w: - (void)readU4(ci); - break; - - default: - instr_len = opcode_length(ci, opcode); - skip(ci, instr_len-1); - break; - } - } - return 1; -} - -static void -write_instruction(MethodImage *mi) -{ - CrwClassImage * ci; - ClassOpcode opcode; - ByteOffset new_code_len; - int pos; - int new_pos; - - CRW_ASSERT_MI(mi); - ci = mi->ci; - pos = input_code_offset(mi); - new_pos = method_code_map(mi,pos); - new_code_len = mi->injections[pos].len; - if (new_code_len > 0) { - write_bytes(ci, (void*)mi->injections[pos].code, new_code_len); - } - - opcode = readU1(ci); - if (opcode == JVM_OPC_wide) { - ClassOpcode wopcode; - - writeU1(ci, opcode); - - wopcode = copyU1(ci); - /* lvIndex not used */ - (void)copyU2(ci); - verify_opc_wide(ci, wopcode); - if ( wopcode==JVM_OPC_iinc ) { - (void)copyU1(ci); - (void)copyU1(ci); - } - } else { - - ClassOpcode new_opcode; - int header; - int newHeader; - int low; - int high; - int i; - int npairs; - int widened; - int instr_len; - int delta; - int new_delta; - - switch (opcode) { - - case JVM_OPC_tableswitch: - header = NEXT_4BYTE_BOUNDARY(pos); - newHeader = NEXT_4BYTE_BOUNDARY(new_pos); - - skip(ci, header - (pos+1)); - - delta = readU4(ci); - new_delta = method_code_map(mi,pos+delta) - new_pos; - low = readU4(ci); - high = readU4(ci); - - writeU1(ci, opcode); - for (i = new_pos+1; i < newHeader; ++i) { - writeU1(ci, 0); - } - writeU4(ci, new_delta); - writeU4(ci, low); - writeU4(ci, high); - - for (i = low; i <= high; ++i) { - delta = readU4(ci); - new_delta = method_code_map(mi,pos+delta) - new_pos; - writeU4(ci, new_delta); - } - break; - - case JVM_OPC_lookupswitch: - header = NEXT_4BYTE_BOUNDARY(pos); - newHeader = NEXT_4BYTE_BOUNDARY(new_pos); - - skip(ci, header - (pos+1)); - - delta = readU4(ci); - new_delta = method_code_map(mi,pos+delta) - new_pos; - npairs = readU4(ci); - writeU1(ci, opcode); - for (i = new_pos+1; i < newHeader; ++i) { - writeU1(ci, 0); - } - writeU4(ci, new_delta); - writeU4(ci, npairs); - for (i = 0; i< npairs; ++i) { - unsigned match = readU4(ci); - delta = readU4(ci); - new_delta = method_code_map(mi,pos+delta) - new_pos; - writeU4(ci, match); - writeU4(ci, new_delta); - } - break; - - case JVM_OPC_jsr: case JVM_OPC_goto: - case JVM_OPC_ifeq: case JVM_OPC_ifge: case JVM_OPC_ifgt: - case JVM_OPC_ifle: case JVM_OPC_iflt: case JVM_OPC_ifne: - case JVM_OPC_if_icmpeq: case JVM_OPC_if_icmpne: case JVM_OPC_if_icmpge: - case JVM_OPC_if_icmpgt: case JVM_OPC_if_icmple: case JVM_OPC_if_icmplt: - case JVM_OPC_if_acmpeq: case JVM_OPC_if_acmpne: - case JVM_OPC_ifnull: case JVM_OPC_ifnonnull: - widened = mi->widening[pos]; - delta = readS2(ci); - new_delta = method_code_map(mi,pos+delta) - new_pos; - new_opcode = opcode; - if (widened == 0) { - writeU1(ci, opcode); - writeU2(ci, new_delta); - } else if (widened == 2) { - switch (opcode) { - case JVM_OPC_jsr: - new_opcode = JVM_OPC_jsr_w; - break; - case JVM_OPC_goto: - new_opcode = JVM_OPC_goto_w; - break; - default: - CRW_FATAL(ci, "unexpected opcode"); - break; - } - writeU1(ci, new_opcode); - writeU4(ci, new_delta); - } else if (widened == 5) { - switch (opcode) { - case JVM_OPC_ifeq: - new_opcode = JVM_OPC_ifne; - break; - case JVM_OPC_ifge: - new_opcode = JVM_OPC_iflt; - break; - case JVM_OPC_ifgt: - new_opcode = JVM_OPC_ifle; - break; - case JVM_OPC_ifle: - new_opcode = JVM_OPC_ifgt; - break; - case JVM_OPC_iflt: - new_opcode = JVM_OPC_ifge; - break; - case JVM_OPC_ifne: - new_opcode = JVM_OPC_ifeq; - break; - case JVM_OPC_if_icmpeq: - new_opcode = JVM_OPC_if_icmpne; - break; - case JVM_OPC_if_icmpne: - new_opcode = JVM_OPC_if_icmpeq; - break; - case JVM_OPC_if_icmpge: - new_opcode = JVM_OPC_if_icmplt; - break; - case JVM_OPC_if_icmpgt: - new_opcode = JVM_OPC_if_icmple; - break; - case JVM_OPC_if_icmple: - new_opcode = JVM_OPC_if_icmpgt; - break; - case JVM_OPC_if_icmplt: - new_opcode = JVM_OPC_if_icmpge; - break; - case JVM_OPC_if_acmpeq: - new_opcode = JVM_OPC_if_acmpne; - break; - case JVM_OPC_if_acmpne: - new_opcode = JVM_OPC_if_acmpeq; - break; - case JVM_OPC_ifnull: - new_opcode = JVM_OPC_ifnonnull; - break; - case JVM_OPC_ifnonnull: - new_opcode = JVM_OPC_ifnull; - break; - default: - CRW_FATAL(ci, "Unexpected opcode"); - break; - } - writeU1(ci, new_opcode); /* write inverse branch */ - writeU2(ci, 3 + 5); /* beyond if and goto_w */ - writeU1(ci, JVM_OPC_goto_w); /* add a goto_w */ - writeU4(ci, new_delta-3); /* write new and wide delta */ - } else { - CRW_FATAL(ci, "Unexpected widening"); - } - break; - - case JVM_OPC_jsr_w: - case JVM_OPC_goto_w: - delta = readU4(ci); - new_delta = method_code_map(mi,pos+delta) - new_pos; - writeU1(ci, opcode); - writeU4(ci, new_delta); - break; - - default: - instr_len = opcode_length(ci, opcode); - writeU1(ci, opcode); - copy(ci, instr_len-1); - break; - } - } -} - -static void -method_inject_and_write_code(MethodImage *mi) -{ - ByteCode bytecodes[LARGEST_INJECTION+1]; - ByteOffset len; - - CRW_ASSERT_MI(mi); - - /* Do injections */ - rewind_to_beginning_of_input_bytecodes(mi); - len = entry_injection_code(mi, bytecodes, (int)sizeof(bytecodes)); - if ( len > 0 ) { - int pos; - - pos = 0; - inject_bytecodes(mi, pos, bytecodes, len); - /* Adjust pos 0 to map to new pos 0, you never want to - * jump into this entry code injection. So the new pos 0 - * will be past this entry_injection_code(). - */ - adjust_map(mi, pos, len); /* Inject before behavior */ - } - while (input_code_offset(mi) < mi->code_len) { - inject_for_opcode(mi); - } - - /* Adjust instructions */ - rewind_to_beginning_of_input_bytecodes(mi); - while (input_code_offset(mi) < mi->code_len) { - if (!adjust_instruction(mi)) { - rewind_to_beginning_of_input_bytecodes(mi); - } - } - - /* Write new instructions */ - rewind_to_beginning_of_input_bytecodes(mi); - while (input_code_offset(mi) < mi->code_len) { - write_instruction(mi); - } -} - -static void -copy_attribute(CrwClassImage *ci) -{ - int len; - - (void)copyU2(ci); - len = copyU4(ci); - copy(ci, len); -} - -static void -copy_attributes(CrwClassImage *ci) -{ - unsigned i; - unsigned count; - - count = copyU2(ci); - for (i = 0; i < count; ++i) { - copy_attribute(ci); - } -} - -static void -copy_all_fields(CrwClassImage *ci) -{ - unsigned i; - unsigned count; - - count = copyU2(ci); - for (i = 0; i < count; ++i) { - /* access, name, descriptor */ - copy(ci, 6); - copy_attributes(ci); - } -} - -static void -write_line_table(MethodImage *mi) -{ - unsigned i; - unsigned count; - CrwClassImage * ci; - - CRW_ASSERT_MI(mi); - ci = mi->ci; - (void)copyU4(ci); - count = copyU2(ci); - for(i=0; ici; - (void)copyU4(ci); - count = copyU2(ci); - for(i=0; icode_len > 65535 ) { - return readU4(mi->ci); - } - return readU2(mi->ci); -} - -static void -writeUoffset(MethodImage *mi, unsigned val) -{ - if ( mi->new_code_len > 65535 ) { - writeU4(mi->ci, val); - } - writeU2(mi->ci, val); -} - -static unsigned -copyUoffset(MethodImage *mi) -{ - unsigned uoffset; - - uoffset = readUoffset(mi); - writeUoffset(mi, uoffset); - return uoffset; -} - -/* Copy over verification_type_info structure */ -static void -copy_verification_types(MethodImage *mi, int ntypes) -{ - /* If there were ntypes, we just copy that over, no changes */ - if ( ntypes > 0 ) { - int j; - - for ( j = 0 ; j < ntypes ; j++ ) { - unsigned tag; - - tag = copyU1(mi->ci); - switch ( tag ) { - case JVM_ITEM_Object: - (void)copyU2(mi->ci); /* Constant pool entry */ - break; - case JVM_ITEM_Uninitialized: - /* Code offset for 'new' opcode is for this object */ - writeUoffset(mi, method_code_map(mi, readUoffset(mi))); - break; - } - } - } -} - -/* Process the StackMapTable attribute. We didn't add any basic blocks - * so the frame count remains the same but we may need to process the - * frame types due to offset changes putting things out of range. - */ -static void -write_stackmap_table(MethodImage *mi) -{ - CrwClassImage *ci; - CrwPosition save_position; - ByteOffset last_pc; - ByteOffset last_new_pc; - unsigned i; - unsigned attr_len; - unsigned new_attr_len; - unsigned count; - unsigned delta_adj; - - CRW_ASSERT_MI(mi); - ci = mi->ci; - - /* Save the position of the attribute length so we can fix it later */ - save_position = ci->output_position; - attr_len = copyU4(ci); - count = copyUoffset(mi); /* uoffset: number_of_entries */ - if ( count == 0 ) { - CRW_ASSERT(ci, attr_len==2); - return; - } - - /* Process entire stackmap */ - last_pc = 0; - last_new_pc = 0; - delta_adj = 0; - for ( i = 0 ; i < count ; i++ ) { - ByteOffset new_pc=0; /* new pc in instrumented code */ - unsigned ft; /* frame_type */ - int delta=0; /* pc delta */ - int new_delta=0; /* new pc delta */ - - ft = readU1(ci); - if ( ft <= 63 ) { - /* Frame Type: same_frame ([0,63]) */ - unsigned new_ft; /* new frame_type */ - - delta = (delta_adj + ft); - new_pc = method_code_map(mi, last_pc + delta); - new_delta = new_pc - last_new_pc; - new_ft = (new_delta - delta_adj); - if ( new_ft > 63 ) { - /* Change to same_frame_extended (251) */ - new_ft = 251; - writeU1(ci, new_ft); - writeUoffset(mi, (new_delta - delta_adj)); - } else { - writeU1(ci, new_ft); - } - } else if ( ft >= 64 && ft <= 127 ) { - /* Frame Type: same_locals_1_stack_item_frame ([64,127]) */ - unsigned new_ft; /* new frame_type */ - - delta = (delta_adj + ft - 64); - new_pc = method_code_map(mi, last_pc + delta); - new_delta = new_pc - last_new_pc; - if ( (new_delta - delta_adj) > 63 ) { - /* Change to same_locals_1_stack_item_frame_extended (247) */ - new_ft = 247; - writeU1(ci, new_ft); - writeUoffset(mi, (new_delta - delta_adj)); - } else { - new_ft = (new_delta - delta_adj) + 64; - writeU1(ci, new_ft); - } - copy_verification_types(mi, 1); - } else if ( ft >= 128 && ft <= 246 ) { - /* Frame Type: reserved_for_future_use ([128,246]) */ - CRW_FATAL(ci, "Unknown frame type in StackMapTable attribute"); - } else if ( ft == 247 ) { - /* Frame Type: same_locals_1_stack_item_frame_extended (247) */ - delta = (delta_adj + readUoffset(mi)); - new_pc = method_code_map(mi, last_pc + delta); - new_delta = new_pc - last_new_pc; - writeU1(ci, ft); - writeUoffset(mi, (new_delta - delta_adj)); - copy_verification_types(mi, 1); - } else if ( ft >= 248 && ft <= 250 ) { - /* Frame Type: chop_frame ([248,250]) */ - delta = (delta_adj + readUoffset(mi)); - new_pc = method_code_map(mi, last_pc + delta); - new_delta = new_pc - last_new_pc; - writeU1(ci, ft); - writeUoffset(mi, (new_delta - delta_adj)); - } else if ( ft == 251 ) { - /* Frame Type: same_frame_extended (251) */ - delta = (delta_adj + readUoffset(mi)); - new_pc = method_code_map(mi, last_pc + delta); - new_delta = new_pc - last_new_pc; - writeU1(ci, ft); - writeUoffset(mi, (new_delta - delta_adj)); - } else if ( ft >= 252 && ft <= 254 ) { - /* Frame Type: append_frame ([252,254]) */ - delta = (delta_adj + readUoffset(mi)); - new_pc = method_code_map(mi, last_pc + delta); - new_delta = new_pc - last_new_pc; - writeU1(ci, ft); - writeUoffset(mi, (new_delta - delta_adj)); - copy_verification_types(mi, (ft - 251)); - } else if ( ft == 255 ) { - unsigned ntypes; - - /* Frame Type: full_frame (255) */ - delta = (delta_adj + readUoffset(mi)); - new_pc = method_code_map(mi, last_pc + delta); - new_delta = new_pc - last_new_pc; - writeU1(ci, ft); - writeUoffset(mi, (new_delta - delta_adj)); - ntypes = copyU2(ci); /* ulocalvar */ - copy_verification_types(mi, ntypes); - ntypes = copyU2(ci); /* ustack */ - copy_verification_types(mi, ntypes); - } - - /* Update last_pc and last_new_pc (save on calls to method_code_map) */ - CRW_ASSERT(ci, delta >= 0); - CRW_ASSERT(ci, new_delta >= 0); - last_pc += delta; - last_new_pc = new_pc; - CRW_ASSERT(ci, last_pc <= mi->code_len); - CRW_ASSERT(ci, last_new_pc <= mi->new_code_len); - - /* Delta adjustment, all deltas are -1 now in attribute */ - delta_adj = 1; - } - - /* Update the attribute length */ - new_attr_len = ci->output_position - (save_position + 4); - CRW_ASSERT(ci, new_attr_len >= attr_len); - random_writeU4(ci, save_position, new_attr_len); -} - -/* Process the CLDC StackMap attribute. We didn't add any basic blocks - * so the frame count remains the same but we may need to process the - * frame types due to offset changes putting things out of range. - */ -static void -write_cldc_stackmap_table(MethodImage *mi) -{ - CrwClassImage *ci; - CrwPosition save_position; - unsigned i; - unsigned attr_len; - unsigned new_attr_len; - unsigned count; - - CRW_ASSERT_MI(mi); - ci = mi->ci; - - /* Save the position of the attribute length so we can fix it later */ - save_position = ci->output_position; - attr_len = copyU4(ci); - count = copyUoffset(mi); /* uoffset: number_of_entries */ - if ( count == 0 ) { - CRW_ASSERT(ci, attr_len==2); - return; - } - - /* Process entire stackmap */ - for ( i = 0 ; i < count ; i++ ) { - unsigned ntypes; - - writeUoffset(mi, method_code_map(mi, readUoffset(mi))); - ntypes = copyU2(ci); /* ulocalvar */ - copy_verification_types(mi, ntypes); - ntypes = copyU2(ci); /* ustack */ - copy_verification_types(mi, ntypes); - } - - /* Update the attribute length */ - new_attr_len = ci->output_position - (save_position + 4); - CRW_ASSERT(ci, new_attr_len >= attr_len); - random_writeU4(ci, save_position, new_attr_len); -} - -static void -method_write_exception_table(MethodImage *mi) -{ - unsigned i; - unsigned count; - CrwClassImage * ci; - - CRW_ASSERT_MI(mi); - ci = mi->ci; - count = copyU2(ci); - for(i=0; ici; - name_index = copyU2(ci); - if ( attribute_match(ci, name_index, "LineNumberTable") ) { - write_line_table(mi); - } else if ( attribute_match(ci, name_index, "LocalVariableTable") ) { - write_var_table(mi); - } else if ( attribute_match(ci, name_index, "LocalVariableTypeTable") ) { - write_var_table(mi); /* Exact same format as the LocalVariableTable */ - } else if ( attribute_match(ci, name_index, "StackMapTable") ) { - write_stackmap_table(mi); - } else if ( attribute_match(ci, name_index, "StackMap") ) { - write_cldc_stackmap_table(mi); - } else { - unsigned len; - len = copyU4(ci); - copy(ci, len); - } -} - -static int -is_init_method(const char *name) -{ - if ( name!=NULL && strcmp(name,"")==0 ) { - return JNI_TRUE; - } - return JNI_FALSE; -} - -static int -is_clinit_method(const char *name) -{ - if ( name!=NULL && strcmp(name,"")==0 ) { - return JNI_TRUE; - } - return JNI_FALSE; -} - -static int -is_finalize_method(const char *name) -{ - if ( name!=NULL && strcmp(name,"finalize")==0 ) { - return JNI_TRUE; - } - return JNI_FALSE; -} - -static int -skip_method(CrwClassImage *ci, const char *name, - unsigned access_flags, ByteOffset code_len, - int system_class, jboolean *pskip_call_return_sites) -{ - *pskip_call_return_sites = JNI_FALSE; - if ( system_class ) { - if ( code_len == 1 && is_init_method(name) ) { - return JNI_TRUE; - } else if ( code_len == 1 && is_finalize_method(name) ) { - return JNI_TRUE; - } else if ( is_clinit_method(name) ) { - return JNI_TRUE; - } else if ( ci->is_thread_class && strcmp(name,"currentThread")==0 ) { - return JNI_TRUE; - } - /* - if ( access_flags & JVM_ACC_PRIVATE ) { - *pskip_call_return_sites = JNI_TRUE; - } - */ - } - return JNI_FALSE; -} - -/* Process all code attributes */ -static void -method_write_bytecodes(CrwClassImage *ci, unsigned mnum, unsigned access_flags) -{ - CrwPosition output_attr_len_position; - CrwPosition output_max_stack_position; - CrwPosition output_code_len_position; - CrwPosition start_of_output_bytecodes; - unsigned i; - unsigned attr_len; - unsigned max_stack; - ByteOffset code_len; - unsigned attr_count; - unsigned new_attr_len; - MethodImage * mi; - jboolean object_init_method; - jboolean skip_call_return_sites; - - CRW_ASSERT_CI(ci); - - /* Attribute Length */ - output_attr_len_position = ci->output_position; - attr_len = copyU4(ci); - - /* Max Stack */ - output_max_stack_position = ci->output_position; - max_stack = copyU2(ci); - - /* Max Locals */ - (void)copyU2(ci); - - /* Code Length */ - output_code_len_position = ci->output_position; - code_len = copyU4(ci); - start_of_output_bytecodes = ci->output_position; - - /* Some methods should not be instrumented */ - object_init_method = JNI_FALSE; - skip_call_return_sites = JNI_FALSE; - if ( ci->is_object_class && - is_init_method(ci->method_name[mnum]) && - strcmp(ci->method_descr[mnum],"()V")==0 ) { - object_init_method = JNI_TRUE; - skip_call_return_sites = JNI_TRUE; - } else if ( skip_method(ci, ci->method_name[mnum], access_flags, - code_len, ci->system_class, &skip_call_return_sites) ) { - /* Copy remainder minus already copied, the U2 max_stack, - * U2 max_locals, and U4 code_length fields have already - * been processed. - */ - copy(ci, attr_len - (2+2+4)); - return; - } - - /* Start Injection */ - mi = method_init(ci, mnum, code_len); - mi->object_init_method = object_init_method; - mi->access_flags = access_flags; - mi->skip_call_return_sites = skip_call_return_sites; - - /* Save the current position as the start of the input bytecodes */ - mi->start_of_input_bytecodes = ci->input_position; - - /* The max stack may increase */ - mi->max_stack = max_stack; - mi->new_max_stack = max_stack; - - /* Adjust all code offsets */ - method_inject_and_write_code(mi); - - /* Fix up code length (save new_code_len for later attribute processing) */ - mi->new_code_len = (int)(ci->output_position - start_of_output_bytecodes); - random_writeU4(ci, output_code_len_position, mi->new_code_len); - - /* Fixup max stack */ - CRW_ASSERT(ci, mi->new_max_stack <= 0xFFFF); - random_writeU2(ci, output_max_stack_position, mi->new_max_stack); - - /* Copy exception table */ - method_write_exception_table(mi); - - /* Copy code attributes (needs mi->new_code_len) */ - attr_count = copyU2(ci); - for (i = 0; i < attr_count; ++i) { - method_write_code_attribute(mi); - } - - /* Fix up attribute length */ - new_attr_len = (int)(ci->output_position - (output_attr_len_position + 4)); - random_writeU4(ci, output_attr_len_position, new_attr_len); - - /* Free method data */ - method_term(mi); - mi = NULL; - -} - -static void -method_write(CrwClassImage *ci, unsigned mnum) -{ - unsigned i; - unsigned access_flags; - CrwCpoolIndex name_index; - CrwCpoolIndex descr_index; - unsigned attr_count; - - access_flags = copyU2(ci); - name_index = copyU2(ci); - ci->method_name[mnum] = cpool_entry(ci, name_index).ptr; - descr_index = copyU2(ci); - ci->method_descr[mnum] = cpool_entry(ci, descr_index).ptr; - attr_count = copyU2(ci); - - for (i = 0; i < attr_count; ++i) { - CrwCpoolIndex name_index; - - name_index = copyU2(ci); - if ( attribute_match(ci, name_index, "Code") ) { - method_write_bytecodes(ci, mnum, access_flags); - } else { - unsigned len; - len = copyU4(ci); - copy(ci, len); - } - } -} - -static void -method_write_all(CrwClassImage *ci) -{ - unsigned i; - unsigned count; - - count = copyU2(ci); - ci->method_count = count; - if ( count > 0 ) { - ci->method_name = (const char **)allocate_clean(ci, count*(int)sizeof(const char*)); - ci->method_descr = (const char **)allocate_clean(ci, count*(int)sizeof(const char*)); - } - - for (i = 0; i < count; ++i) { - method_write(ci, i); - } - - if ( ci->mnum_callback != NULL ) { - (*(ci->mnum_callback))(ci->number, ci->method_name, ci->method_descr, - count); - } -} - -/* ------------------------------------------------------------------- */ -/* Cleanup function. */ - -static void -cleanup(CrwClassImage *ci) -{ - CRW_ASSERT_CI(ci); - if ( ci->name != NULL ) { - deallocate(ci, (void*)ci->name); - ci->name = NULL; - } - if ( ci->method_name != NULL ) { - deallocate(ci, (void*)ci->method_name); - ci->method_name = NULL; - } - if ( ci->method_descr != NULL ) { - deallocate(ci, (void*)ci->method_descr); - ci->method_descr = NULL; - } - if ( ci->cpool != NULL ) { - CrwCpoolIndex i; - for(i=0; icpool_count_plus_one; i++) { - if ( ci->cpool[i].ptr != NULL ) { - deallocate(ci, (void*)(ci->cpool[i].ptr)); - ci->cpool[i].ptr = NULL; - } - } - deallocate(ci, (void*)ci->cpool); - ci->cpool = NULL; - } -} - -static jboolean -skip_class(unsigned access_flags) -{ - if ( access_flags & JVM_ACC_INTERFACE ) { - return JNI_TRUE; - } - return JNI_FALSE; -} - -static long -inject_class(struct CrwClassImage *ci, - int system_class, - char* tclass_name, - char* tclass_sig, - char* call_name, - char* call_sig, - char* return_name, - char* return_sig, - char* obj_init_name, - char* obj_init_sig, - char* newarray_name, - char* newarray_sig, - unsigned char *buf, - long buf_len) -{ - CrwConstantPoolEntry cs; - CrwCpoolIndex this_class; - CrwCpoolIndex super_class; - unsigned magic; - unsigned classfileMajorVersion; - unsigned classfileMinorVersion; - unsigned interface_count; - - CRW_ASSERT_CI(ci); - CRW_ASSERT(ci, buf!=NULL); - CRW_ASSERT(ci, buf_len!=0); - - CRW_ASSERT(ci, strchr(tclass_name,'.')==NULL); /* internal qualified name */ - - ci->injection_count = 0; - ci->system_class = system_class; - ci->tclass_name = tclass_name; - ci->tclass_sig = tclass_sig; - ci->call_name = call_name; - ci->call_sig = call_sig; - ci->return_name = return_name; - ci->return_sig = return_sig; - ci->obj_init_name = obj_init_name; - ci->obj_init_sig = obj_init_sig; - ci->newarray_name = newarray_name; - ci->newarray_sig = newarray_sig; - ci->output = buf; - ci->output_len = buf_len; - - magic = copyU4(ci); - CRW_ASSERT(ci, magic==0xCAFEBABE); - if ( magic != 0xCAFEBABE ) { - return (long)0; - } - - /* minor version number not used */ - classfileMinorVersion = copyU2(ci); - /* major version number not used */ - classfileMajorVersion = copyU2(ci); - CRW_ASSERT(ci, (classfileMajorVersion <= JVM_CLASSFILE_MAJOR_VERSION) || - ((classfileMajorVersion == JVM_CLASSFILE_MAJOR_VERSION) && - (classfileMinorVersion <= JVM_CLASSFILE_MINOR_VERSION))); - - cpool_setup(ci); - - ci->access_flags = copyU2(ci); - if ( skip_class(ci->access_flags) ) { - return (long)0; - } - - this_class = copyU2(ci); - - cs = cpool_entry(ci, (CrwCpoolIndex)(cpool_entry(ci, this_class).index1)); - if ( ci->name == NULL ) { - ci->name = duplicate(ci, cs.ptr, cs.len); - CRW_ASSERT(ci, strchr(ci->name,'.')==NULL); /* internal qualified name */ - } - CRW_ASSERT(ci, (int)strlen(ci->name)==cs.len && strncmp(ci->name, cs.ptr, cs.len)==0); - - super_class = copyU2(ci); - if ( super_class == 0 ) { - ci->is_object_class = JNI_TRUE; - CRW_ASSERT(ci, strcmp(ci->name,"java/lang/Object")==0); - } - - interface_count = copyU2(ci); - copy(ci, interface_count * 2); - - copy_all_fields(ci); - - method_write_all(ci); - - if ( ci->injection_count == 0 ) { - return (long)0; - } - - copy_attributes(ci); - - return (long)ci->output_position; -} - -/* ------------------------------------------------------------------- */ -/* Exported interfaces */ - -JNIEXPORT void JNICALL -java_crw_demo(unsigned class_number, - const char *name, - const unsigned char *file_image, - long file_len, - int system_class, - char* tclass_name, /* Name of class that has tracker methods. */ - char* tclass_sig, /* Signature of tclass */ - char* call_name, /* Method name to call at offset 0 */ - char* call_sig, /* Signature of this method */ - char* return_name, /* Method name to call before any return */ - char* return_sig, /* Signature of this method */ - char* obj_init_name, /* Method name to call in Object */ - char* obj_init_sig, /* Signature of this method */ - char* newarray_name, /* Method name to call after newarray opcodes */ - char* newarray_sig, /* Signature of this method */ - unsigned char **pnew_file_image, - long *pnew_file_len, - FatalErrorHandler fatal_error_handler, - MethodNumberRegister mnum_callback) -{ - CrwClassImage ci; - long max_length; - long new_length; - void *new_image; - int len; - - /* Initial setup of the CrwClassImage structure */ - (void)memset(&ci, 0, (int)sizeof(CrwClassImage)); - ci.fatal_error_handler = fatal_error_handler; - ci.mnum_callback = mnum_callback; - - /* Do some interface error checks */ - if ( pnew_file_image==NULL ) { - CRW_FATAL(&ci, "pnew_file_image==NULL"); - } - if ( pnew_file_len==NULL ) { - CRW_FATAL(&ci, "pnew_file_len==NULL"); - } - - /* No file length means do nothing */ - *pnew_file_image = NULL; - *pnew_file_len = 0; - if ( file_len==0 ) { - return; - } - - /* Do some more interface error checks */ - if ( file_image == NULL ) { - CRW_FATAL(&ci, "file_image == NULL"); - } - if ( file_len < 0 ) { - CRW_FATAL(&ci, "file_len < 0"); - } - if ( system_class != 0 && system_class != 1 ) { - CRW_FATAL(&ci, "system_class is not 0 or 1"); - } - if ( tclass_name == NULL ) { - CRW_FATAL(&ci, "tclass_name == NULL"); - } - if ( tclass_sig == NULL || tclass_sig[0]!='L' ) { - CRW_FATAL(&ci, "tclass_sig is not a valid class signature"); - } - len = (int)strlen(tclass_sig); - if ( tclass_sig[len-1]!=';' ) { - CRW_FATAL(&ci, "tclass_sig is not a valid class signature"); - } - if ( call_name != NULL ) { - if ( call_sig == NULL || strcmp(call_sig, "(II)V") != 0 ) { - CRW_FATAL(&ci, "call_sig is not (II)V"); - } - } - if ( return_name != NULL ) { - if ( return_sig == NULL || strcmp(return_sig, "(II)V") != 0 ) { - CRW_FATAL(&ci, "return_sig is not (II)V"); - } - } - if ( obj_init_name != NULL ) { - if ( obj_init_sig == NULL || strcmp(obj_init_sig, "(Ljava/lang/Object;)V") != 0 ) { - CRW_FATAL(&ci, "obj_init_sig is not (Ljava/lang/Object;)V"); - } - } - if ( newarray_name != NULL ) { - if ( newarray_sig == NULL || strcmp(newarray_sig, "(Ljava/lang/Object;)V") != 0 ) { - CRW_FATAL(&ci, "newarray_sig is not (Ljava/lang/Object;)V"); - } - } - - /* Finish setup the CrwClassImage structure */ - ci.is_thread_class = JNI_FALSE; - if ( name != NULL ) { - CRW_ASSERT(&ci, strchr(name,'.')==NULL); /* internal qualified name */ - - ci.name = duplicate(&ci, name, (int)strlen(name)); - if ( strcmp(name, "java/lang/Thread")==0 ) { - ci.is_thread_class = JNI_TRUE; - } - } - ci.number = class_number; - ci.input = file_image; - ci.input_len = file_len; - - /* Do the injection */ - max_length = file_len*2 + 512; /* Twice as big + 512 */ - new_image = allocate(&ci, (int)max_length); - new_length = inject_class(&ci, - system_class, - tclass_name, - tclass_sig, - call_name, - call_sig, - return_name, - return_sig, - obj_init_name, - obj_init_sig, - newarray_name, - newarray_sig, - new_image, - max_length); - - /* Dispose or shrink the space to be returned. */ - if ( new_length == 0 ) { - deallocate(&ci, (void*)new_image); - new_image = NULL; - } else { - new_image = (void*)reallocate(&ci, (void*)new_image, (int)new_length); - } - - /* Return the new class image */ - *pnew_file_image = (unsigned char *)new_image; - *pnew_file_len = (long)new_length; - - /* Cleanup before we leave. */ - cleanup(&ci); -} - -/* Return the classname for this class which is inside the classfile image. */ -JNIEXPORT char * JNICALL -java_crw_demo_classname(const unsigned char *file_image, long file_len, - FatalErrorHandler fatal_error_handler) -{ - CrwClassImage ci; - CrwConstantPoolEntry cs; - CrwCpoolIndex this_class; - unsigned magic; - char * name; - - name = NULL; - - if ( file_len==0 || file_image==NULL ) { - return name; - } - - /* The only fields we need filled in are the image pointer and the error - * handler. - * By not adding an output buffer pointer, no output is created. - */ - (void)memset(&ci, 0, (int)sizeof(CrwClassImage)); - ci.input = file_image; - ci.input_len = file_len; - ci.fatal_error_handler = fatal_error_handler; - - /* Read out the bytes from the classfile image */ - - magic = readU4(&ci); /* magic number */ - CRW_ASSERT(&ci, magic==0xCAFEBABE); - if ( magic != 0xCAFEBABE ) { - return name; - } - (void)readU2(&ci); /* minor version number */ - (void)readU2(&ci); /* major version number */ - - /* Read in constant pool. Since no output setup, writes are NOP's */ - cpool_setup(&ci); - - (void)readU2(&ci); /* access flags */ - this_class = readU2(&ci); /* 'this' class */ - - /* Get 'this' constant pool entry */ - cs = cpool_entry(&ci, (CrwCpoolIndex)(cpool_entry(&ci, this_class).index1)); - - /* Duplicate the name */ - name = (char *)duplicate(&ci, cs.ptr, cs.len); - - /* Cleanup before we leave. */ - cleanup(&ci); - - /* Return malloc space */ - return name; -} diff --git a/jdk/src/demo/share/jvmti/java_crw_demo/java_crw_demo.h b/jdk/src/demo/share/jvmti/java_crw_demo/java_crw_demo.h deleted file mode 100644 index e2626784341..00000000000 --- a/jdk/src/demo/share/jvmti/java_crw_demo/java_crw_demo.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#ifndef JAVA_CRW_DEMO_H -#define JAVA_CRW_DEMO_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* This callback is used to notify the caller of a fatal error. */ - -typedef void (*FatalErrorHandler)(const char*message, const char*file, int line); - -/* This callback is used to return the method information for a class. - * Since the information was already read here, it was useful to - * return it here, with no JVMTI phase restrictions. - * If the class file does represent a "class" and it has methods, then - * this callback will be called with the class number and pointers to - * the array of names, array of signatures, and the count of methods. - */ - -typedef void (*MethodNumberRegister)(unsigned, const char**, const char**, int); - -/* Class file reader/writer interface. Basic input is a classfile image - * and details about what to inject. The output is a new classfile image - * that was allocated with malloc(), and should be freed by the caller. - */ - -/* Names of external symbols to look for. These are the names that we - * try and lookup in the shared library. On Windows 2000, the naming - * convention is to prefix a "_" and suffix a "@N" where N is 4 times - * the number or arguments supplied.It has 19 args, so 76 = 19*4. - * On Windows 2003, Linux, and Solaris, the first name will be - * found, on Windows 2000 a second try should find the second name. - * - * WARNING: If You change the JavaCrwDemo typedef, you MUST change - * multiple things in this file, including this name. - */ - -#define JAVA_CRW_DEMO_SYMBOLS { "java_crw_demo", "_java_crw_demo@76" } - -/* Typedef needed for type casting in dynamic access situations. */ - -typedef void (JNICALL *JavaCrwDemo)( - unsigned class_number, - const char *name, - const unsigned char *file_image, - long file_len, - int system_class, - char* tclass_name, - char* tclass_sig, - char* call_name, - char* call_sig, - char* return_name, - char* return_sig, - char* obj_init_name, - char* obj_init_sig, - char* newarray_name, - char* newarray_sig, - unsigned char **pnew_file_image, - long *pnew_file_len, - FatalErrorHandler fatal_error_handler, - MethodNumberRegister mnum_callback -); - -/* Function export (should match typedef above) */ - -JNIEXPORT void JNICALL java_crw_demo( - - unsigned class_number, /* Caller assigned class number for class */ - - const char *name, /* Internal class name, e.g. java/lang/Object */ - /* (Do not use "java.lang.Object" format) */ - - const unsigned char - *file_image, /* Pointer to classfile image for this class */ - - long file_len, /* Length of the classfile in bytes */ - - int system_class, /* Set to 1 if this is a system class */ - /* (prevents injections into empty */ - /* , finalize, and methods) */ - - char* tclass_name, /* Class that has methods we will call at */ - /* the injection sites (tclass) */ - - char* tclass_sig, /* Signature of tclass */ - /* (Must be "L" + tclass_name + ";") */ - - char* call_name, /* Method name in tclass to call at offset 0 */ - /* for every method */ - - char* call_sig, /* Signature of this call_name method */ - /* (Must be "(II)V") */ - - char* return_name, /* Method name in tclass to call at all */ - /* return opcodes in every method */ - - char* return_sig, /* Signature of this return_name method */ - /* (Must be "(II)V") */ - - char* obj_init_name, /* Method name in tclass to call first thing */ - /* when injecting java.lang.Object. */ - - char* obj_init_sig, /* Signature of this obj_init_name method */ - /* (Must be "(Ljava/lang/Object;)V") */ - - char* newarray_name, /* Method name in tclass to call after every */ - /* newarray opcode in every method */ - - char* newarray_sig, /* Signature of this method */ - /* (Must be "(Ljava/lang/Object;II)V") */ - - unsigned char - **pnew_file_image, /* Returns a pointer to new classfile image */ - - long *pnew_file_len, /* Returns the length of the new image */ - - FatalErrorHandler - fatal_error_handler, /* Pointer to function to call on any */ - /* fatal error. NULL sends error to stderr */ - - MethodNumberRegister - mnum_callback /* Pointer to function that gets called */ - /* with all details on methods in this */ - /* class. NULL means skip this call. */ - - ); - - -/* External to read the class name out of a class file . - * - * WARNING: If You change the typedef, you MUST change - * multiple things in this file, including this name. - */ - -#define JAVA_CRW_DEMO_CLASSNAME_SYMBOLS \ - { "java_crw_demo_classname", "_java_crw_demo_classname@12" } - -/* Typedef needed for type casting in dynamic access situations. */ - -typedef char * (JNICALL *JavaCrwDemoClassname)( - const unsigned char *file_image, - long file_len, - FatalErrorHandler fatal_error_handler); - -JNIEXPORT char * JNICALL java_crw_demo_classname( - const unsigned char *file_image, - long file_len, - FatalErrorHandler fatal_error_handler); - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif diff --git a/jdk/src/demo/share/jvmti/java_crw_demo/sample.makefile.txt b/jdk/src/demo/share/jvmti/java_crw_demo/sample.makefile.txt deleted file mode 100644 index 81ce07938d4..00000000000 --- a/jdk/src/demo/share/jvmti/java_crw_demo/sample.makefile.txt +++ /dev/null @@ -1,144 +0,0 @@ -# -# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -######################################################################## -# -# Sample GNU Makefile for building -# -# Example uses: -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparc] -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] -# gnumake JDK= OSNAME=linux [OPT=true] -# gnumake JDK= OSNAME=win32 [OPT=true] -# -######################################################################## - -# Source lists -LIBNAME=java_crw_demo -SOURCES=java_crw_demo.c - -# Solaris Studio C Compiler Version 12.4 -ifeq ($(OSNAME), solaris) - # Sun Solaris Compiler options needed - COMMON_FLAGS=-mt -KPIC - # Options that help find errors - COMMON_FLAGS+= -Xa -v -xc99=%none - # Check LIBARCH for any special compiler options - LIBARCH=$(shell uname -p) - ifeq ($(LIBARCH), sparc) - COMMON_FLAGS+=-xarch=v8 -xregs=no%appl - endif - ifeq ($(LIBARCH), sparcv9) - COMMON_FLAGS+=-xarch=v9 -xregs=no%appl - endif - ifeq ($(OPT), true) - CFLAGS=-xO2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-z defs -ztext - # Libraries we are dependent on - LIBRARIES=-lc - # Building a shared library - LINK_SHARED=$(LINK.c) -G -o $@ -endif - -# Linux GNU C Compiler -ifeq ($(OSNAME), linux) - # GNU Compiler options needed to build it - COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer - # Options that help find errors - COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses - ifeq ($(OPT), true) - CFLAGS=-O2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc - # Libraries we are dependent on - LIBRARIES=-lc - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ -endif - -# Windows Microsoft C/C++ Optimizing Compiler Version 12 -ifeq ($(OSNAME), win32) - CC=cl - # Compiler options needed to build it - COMMON_FLAGS=-Gy -DWIN32 - # Options that help find errors - COMMON_FLAGS+=-W0 -WX - ifeq ($(OPT), true) - CFLAGS= -Ox -Op -Zi $(COMMON_FLAGS) - else - CFLAGS= -Od -Zi $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.obj) - # Library name and options needed to build it - LIBRARY=$(LIBNAME).dll - LDFLAGS= - # Libraries we are dependent on - LIBRARIES= - # Building a shared library - LINK_SHARED=link -dll -out:$@ -endif - -# Common -I options -CFLAGS += -I. -CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - -# Default rule (build both native library and jar file) -all: $(LIBRARY) - -# Build native library -$(LIBRARY): $(OBJECTS) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - -# Cleanup the built bits -clean: - rm -f -r classes - rm -f $(LIBRARY) $(OBJECTS) - -# Compilation rule only needed on Windows -ifeq ($(OSNAME), win32) -%.obj: %.c - $(COMPILE.c) $< -endif - diff --git a/jdk/src/demo/share/jvmti/minst/Minst.java b/jdk/src/demo/share/jvmti/minst/Minst.java deleted file mode 100644 index 2826cea04ba..00000000000 --- a/jdk/src/demo/share/jvmti/minst/Minst.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - - -/* Java class to hold static methods which will be called in byte code - * injections of all class files. - */ - -public class Minst { - - /* Master switch that activates methods. */ - - private static int engaged = 0; - - /* At the very beginning of every method, a call to method_entry() - * is injected. - */ - - public static void method_entry(int cnum, int mnum) { - Class x = Minst.class; - synchronized ( x ) { - if ( engaged > 0 ) { - engaged = 0; - String className = "Unknown"; - String methodName = "Unknown"; - Exception exp = new Exception(); - StackTraceElement[] stack = exp.getStackTrace(); - if (stack.length > 1) { - StackTraceElement location = stack[1]; - className = location.getClassName(); - methodName = location.getMethodName(); - } - System.out.println("Reached method entry: " + - className + "." + methodName + "()"); - engaged++; - } - } - } - -} diff --git a/jdk/src/demo/share/jvmti/minst/README.txt b/jdk/src/demo/share/jvmti/minst/README.txt deleted file mode 100644 index 3cc9b4fff3c..00000000000 --- a/jdk/src/demo/share/jvmti/minst/README.txt +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -minst - -This agent library can be used to inject code at method calls. -It uses the same java_crw_demo library used by HPROF to do BCI on all -or selected classfiles loaded into the Virtual Machine. -The class Minst.java can be customized to do whatever you wish, -within reason of course, and does not call native methods directly. - -You can use this agent library as follows: - - java -agentlib:minst ... - -To get help on the available options try: - - java -agentlib:minst=help - -See ${JAVA_HOME}/demo/jvmti/index.html for help running and building agents. - diff --git a/jdk/src/demo/share/jvmti/minst/minst.c b/jdk/src/demo/share/jvmti/minst/minst.c deleted file mode 100644 index 8317c1d3d61..00000000000 --- a/jdk/src/demo/share/jvmti/minst/minst.c +++ /dev/null @@ -1,481 +0,0 @@ -/* - * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include "stdlib.h" - -#include "minst.h" -#include "java_crw_demo.h" - - -/* ------------------------------------------------------------------- */ -/* Some constant maximum sizes */ - -#define MAX_TOKEN_LENGTH 80 -#define MAX_METHOD_NAME_LENGTH 256 - -/* Some constant names that tie to Java class/method names. - * We assume the Java class whose static methods we will be calling - * looks like: - * - * public class Minst { - * private static int engaged; - * private static native void _method_entry(Object thr, int cnum, int mnum); - * public static void method_entry(int cnum, int mnum) - * { - * ... - * } - * } - * - */ - -#define MINST_class Minst /* Name of class we are using */ -#define MINST_entry method_entry /* Name of java entry method */ -#define MINST_engaged engaged /* Name of java static field */ - -/* C macros to create strings from tokens */ -#define _STRING(s) #s -#define STRING(s) _STRING(s) - -/* ------------------------------------------------------------------- */ - -/* Global agent data structure */ - -typedef struct { - /* JVMTI Environment */ - jvmtiEnv *jvmti; - jboolean vm_is_dead; - jboolean vm_is_started; - /* Data access Lock */ - jrawMonitorID lock; - /* Options */ - char *include; - char *exclude; - /* Class Count/ID */ - jint ccount; -} GlobalAgentData; - -static GlobalAgentData *gdata; - -/* Enter a critical section by doing a JVMTI Raw Monitor Enter */ -static void -enter_critical_section(jvmtiEnv *jvmti) -{ - jvmtiError error; - - error = (*jvmti)->RawMonitorEnter(jvmti, gdata->lock); - check_jvmti_error(jvmti, error, "Cannot enter with raw monitor"); -} - -/* Exit a critical section by doing a JVMTI Raw Monitor Exit */ -static void -exit_critical_section(jvmtiEnv *jvmti) -{ - jvmtiError error; - - error = (*jvmti)->RawMonitorExit(jvmti, gdata->lock); - check_jvmti_error(jvmti, error, "Cannot exit with raw monitor"); -} - -/* Callback for JVMTI_EVENT_VM_START */ -static void JNICALL -cbVMStart(jvmtiEnv *jvmti, JNIEnv *env) -{ - enter_critical_section(jvmti); { - /* Indicate VM has started */ - gdata->vm_is_started = JNI_TRUE; - } exit_critical_section(jvmti); -} - -/* Callback for JVMTI_EVENT_VM_INIT */ -static void JNICALL -cbVMInit(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - enter_critical_section(jvmti); { - jclass klass; - jfieldID field; - - /* Register Natives for class whose methods we use */ - klass = (*env)->FindClass(env, STRING(MINST_class)); - if ( klass == NULL ) { - fatal_error("ERROR: JNI: Cannot find %s with FindClass\n", - STRING(MINST_class)); - } - - /* Engage calls. */ - field = (*env)->GetStaticFieldID(env, klass, STRING(MINST_engaged), "I"); - if ( field == NULL ) { - fatal_error("ERROR: JNI: Cannot get field from %s\n", - STRING(MINST_class)); - } - (*env)->SetStaticIntField(env, klass, field, 1); - } exit_critical_section(jvmti); -} - -/* Callback for JVMTI_EVENT_VM_DEATH */ -static void JNICALL -cbVMDeath(jvmtiEnv *jvmti, JNIEnv *env) -{ - enter_critical_section(jvmti); { - jclass klass; - jfieldID field; - - /* The VM has died. */ - stdout_message("VMDeath\n"); - - /* Disengage calls in MINST_class. */ - klass = (*env)->FindClass(env, STRING(MINST_class)); - if ( klass == NULL ) { - fatal_error("ERROR: JNI: Cannot find %s with FindClass\n", - STRING(MINST_class)); - } - field = (*env)->GetStaticFieldID(env, klass, STRING(MINST_engaged), "I"); - if ( field == NULL ) { - fatal_error("ERROR: JNI: Cannot get field from %s\n", - STRING(MINST_class)); - } - (*env)->SetStaticIntField(env, klass, field, -1); - - /* The critical section here is important to hold back the VM death - * until all other callbacks have completed. - */ - - /* Since this critical section could be holding up other threads - * in other event callbacks, we need to indicate that the VM is - * dead so that the other callbacks can short circuit their work. - * We don't expect any further events after VmDeath but we do need - * to be careful that existing threads might be in our own agent - * callback code. - */ - gdata->vm_is_dead = JNI_TRUE; - - } exit_critical_section(jvmti); - -} - -/* Callback for JVMTI_EVENT_CLASS_FILE_LOAD_HOOK */ -static void JNICALL -cbClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv* env, - jclass class_being_redefined, jobject loader, - const char* name, jobject protection_domain, - jint class_data_len, const unsigned char* class_data, - jint* new_class_data_len, unsigned char** new_class_data) -{ - enter_critical_section(jvmti); { - /* It's possible we get here right after VmDeath event, be careful */ - if ( !gdata->vm_is_dead ) { - - const char *classname; - - /* Name could be NULL */ - if ( name == NULL ) { - classname = java_crw_demo_classname(class_data, class_data_len, - NULL); - if ( classname == NULL ) { - fatal_error("ERROR: No classname inside classfile\n"); - } - } else { - classname = strdup(name); - if ( classname == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - } - - *new_class_data_len = 0; - *new_class_data = NULL; - - /* The tracker class itself? */ - if ( interested((char*)classname, "", gdata->include, gdata->exclude) - && strcmp(classname, STRING(MINST_class)) != 0 ) { - jint cnum; - int system_class; - unsigned char *new_image; - long new_length; - - /* Get unique number for every class file image loaded */ - cnum = gdata->ccount++; - - /* Is it a system class? If the class load is before VmStart - * then we will consider it a system class that should - * be treated carefully. (See java_crw_demo) - */ - system_class = 0; - if ( !gdata->vm_is_started ) { - system_class = 1; - } - - new_image = NULL; - new_length = 0; - - /* Call the class file reader/write demo code */ - java_crw_demo(cnum, - classname, - class_data, - class_data_len, - system_class, - STRING(MINST_class), "L" STRING(MINST_class) ";", - STRING(MINST_entry), "(II)V", - NULL, NULL, - NULL, NULL, - NULL, NULL, - &new_image, - &new_length, - NULL, - NULL); - - /* If we got back a new class image, return it back as "the" - * new class image. This must be JVMTI Allocate space. - */ - if ( new_length > 0 ) { - unsigned char *jvmti_space; - - jvmti_space = (unsigned char *)allocate(jvmti, (jint)new_length); - (void)memcpy((void*)jvmti_space, (void*)new_image, (int)new_length); - *new_class_data_len = (jint)new_length; - *new_class_data = jvmti_space; /* VM will deallocate */ - } - - /* Always free up the space we get from java_crw_demo() */ - if ( new_image != NULL ) { - (void)free((void*)new_image); /* Free malloc() space with free() */ - } - } - (void)free((void*)classname); - } - } exit_critical_section(jvmti); -} - -/* Parse the options for this minst agent */ -static void -parse_agent_options(char *options) -{ - char token[MAX_TOKEN_LENGTH]; - char *next; - - /* Parse options and set flags in gdata */ - if ( options==NULL ) { - return; - } - - /* Get the first token from the options string. */ - next = get_token(options, ",=", token, sizeof(token)); - - /* While not at the end of the options string, process this option. */ - while ( next != NULL ) { - if ( strcmp(token,"help")==0 ) { - stdout_message("The minst JVMTI demo agent\n"); - stdout_message("\n"); - stdout_message(" java -agent:minst[=options] ...\n"); - stdout_message("\n"); - stdout_message("The options are comma separated:\n"); - stdout_message("\t help\t\t\t Print help information\n"); - stdout_message("\t include=item\t\t Only these classes/methods\n"); - stdout_message("\t exclude=item\t\t Exclude these classes/methods\n"); - stdout_message("\n"); - stdout_message("item\t Qualified class and/or method names\n"); - stdout_message("\t\t e.g. (*.;Foobar.method;sun.*)\n"); - stdout_message("\n"); - exit(0); - } else if ( strcmp(token,"include")==0 ) { - int used; - int maxlen; - - maxlen = MAX_METHOD_NAME_LENGTH; - if ( gdata->include == NULL ) { - gdata->include = (char*)calloc(maxlen+1, 1); - used = 0; - } else { - used = (int)strlen(gdata->include); - gdata->include[used++] = ','; - gdata->include[used] = 0; - gdata->include = (char*) - realloc((void*)gdata->include, used+maxlen+1); - } - if ( gdata->include == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - /* Add this item to the list */ - next = get_token(next, ",=", gdata->include+used, maxlen); - /* Check for token scan error */ - if ( next==NULL ) { - fatal_error("ERROR: include option error\n"); - } - } else if ( strcmp(token,"exclude")==0 ) { - int used; - int maxlen; - - maxlen = MAX_METHOD_NAME_LENGTH; - if ( gdata->exclude == NULL ) { - gdata->exclude = (char*)calloc(maxlen+1, 1); - used = 0; - } else { - used = (int)strlen(gdata->exclude); - gdata->exclude[used++] = ','; - gdata->exclude[used] = 0; - gdata->exclude = (char*) - realloc((void*)gdata->exclude, used+maxlen+1); - } - if ( gdata->exclude == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - /* Add this item to the list */ - next = get_token(next, ",=", gdata->exclude+used, maxlen); - /* Check for token scan error */ - if ( next==NULL ) { - fatal_error("ERROR: exclude option error\n"); - } - } else if ( token[0]!=0 ) { - /* We got a non-empty token and we don't know what it is. */ - fatal_error("ERROR: Unknown option: %s\n", token); - } - /* Get the next token (returns NULL if there are no more) */ - next = get_token(next, ",=", token, sizeof(token)); - } -} - -/* Agent_OnLoad: This is called immediately after the shared library is - * loaded. This is the first code executed. - */ -JNIEXPORT jint JNICALL -DEF_Agent_OnLoad(JavaVM *vm, char *options, void *reserved) -{ - static GlobalAgentData data; - jvmtiEnv *jvmti; - jvmtiError error; - jint res; - jvmtiCapabilities capabilities; - jvmtiEventCallbacks callbacks; - - /* Setup initial global agent data area - * Use of static/extern data should be handled carefully here. - * We need to make sure that we are able to cleanup after ourselves - * so anything allocated in this library needs to be freed in - * the Agent_OnUnload() function. - */ - (void)memset((void*)&data, 0, sizeof(data)); - gdata = &data; - - /* First thing we need to do is get the jvmtiEnv* or JVMTI environment */ - res = (*vm)->GetEnv(vm, (void **)&jvmti, JVMTI_VERSION_1); - if (res != JNI_OK) { - /* This means that the VM was unable to obtain this version of the - * JVMTI interface, this is a fatal error. - */ - fatal_error("ERROR: Unable to access JVMTI Version 1 (0x%x)," - " is your JDK a 5.0 or newer version?" - " JNIEnv's GetEnv() returned %d\n", - JVMTI_VERSION_1, res); - } - - /* Here we save the jvmtiEnv* for Agent_OnUnload(). */ - gdata->jvmti = jvmti; - - /* Parse any options supplied on java command line */ - parse_agent_options(options); - - /* Immediately after getting the jvmtiEnv* we need to ask for the - * capabilities this agent will need. In this case we need to make - * sure that we can get all class load hooks. - */ - (void)memset(&capabilities,0, sizeof(capabilities)); - capabilities.can_generate_all_class_hook_events = 1; - error = (*jvmti)->AddCapabilities(jvmti, &capabilities); - check_jvmti_error(jvmti, error, "Unable to get necessary JVMTI capabilities."); - - /* Next we need to provide the pointers to the callback functions to - * to this jvmtiEnv* - */ - (void)memset(&callbacks,0, sizeof(callbacks)); - /* JVMTI_EVENT_VM_START */ - callbacks.VMStart = &cbVMStart; - /* JVMTI_EVENT_VM_INIT */ - callbacks.VMInit = &cbVMInit; - /* JVMTI_EVENT_VM_DEATH */ - callbacks.VMDeath = &cbVMDeath; - /* JVMTI_EVENT_CLASS_FILE_LOAD_HOOK */ - callbacks.ClassFileLoadHook = &cbClassFileLoadHook; - error = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, (jint)sizeof(callbacks)); - check_jvmti_error(jvmti, error, "Cannot set jvmti callbacks"); - - /* At first the only initial events we are interested in are VM - * initialization, VM death, and Class File Loads. - * Once the VM is initialized we will request more events. - */ - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_START, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_INIT, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_DEATH, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - - /* Here we create a raw monitor for our use in this agent to - * protect critical sections of code. - */ - error = (*jvmti)->CreateRawMonitor(jvmti, "agent data", &(gdata->lock)); - check_jvmti_error(jvmti, error, "Cannot create raw monitor"); - - /* Add demo jar file to boot classpath */ - add_demo_jar_to_bootclasspath(jvmti, "minst"); - - /* We return JNI_OK to signify success */ - return JNI_OK; -} - -/* Agent_OnUnload: This is called immediately before the shared library is - * unloaded. This is the last code executed. - */ -JNIEXPORT void JNICALL -DEF_Agent_OnUnload(JavaVM *vm) -{ - /* Make sure all malloc/calloc/strdup space is freed */ - if ( gdata->include != NULL ) { - (void)free((void*)gdata->include); - gdata->include = NULL; - } - if ( gdata->exclude != NULL ) { - (void)free((void*)gdata->exclude); - gdata->exclude = NULL; - } -} diff --git a/jdk/src/demo/share/jvmti/minst/minst.h b/jdk/src/demo/share/jvmti/minst/minst.h deleted file mode 100644 index d852ad4dcb8..00000000000 --- a/jdk/src/demo/share/jvmti/minst/minst.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* Primary minst #include file, should be included by most if not - * all minst source files. Gives access to the global data structure - * and all global macros. - */ - -#ifndef MINST_H -#define MINST_H - -/* Standard C functions used throughout. */ - -#include -#include -#include -#include -#include - -/* General JVM/Java functions, types and macros. */ - -#include -#include "jni.h" -#include "jvmti.h" - -/* Utility functions */ - -#include "agent_util.h" - -#endif diff --git a/jdk/src/demo/share/jvmti/minst/sample.makefile.txt b/jdk/src/demo/share/jvmti/minst/sample.makefile.txt deleted file mode 100644 index 5c8f422fb40..00000000000 --- a/jdk/src/demo/share/jvmti/minst/sample.makefile.txt +++ /dev/null @@ -1,163 +0,0 @@ -# -# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -######################################################################## -# -# Sample GNU Makefile for building JVMTI Demo minst -# -# Example uses: -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparc] -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] -# gnumake JDK= OSNAME=linux [OPT=true] -# gnumake JDK= OSNAME=win32 [OPT=true] -# -######################################################################## - -# Source lists -LIBNAME=minst -SOURCES=minst.c ../agent_util/agent_util.c -JAVA_SOURCES=Minst.java - -# Name of jar file that needs to be created -JARFILE=minst.jar - -# Solaris Studio C Compiler Version 12.4 -ifeq ($(OSNAME), solaris) - # Sun Solaris Compiler options needed - COMMON_FLAGS=-mt -KPIC - # Options that help find errors - COMMON_FLAGS+= -Xa -v -xc99=%none - # Check LIBARCH for any special compiler options - LIBARCH=$(shell uname -p) - ifeq ($(LIBARCH), sparc) - COMMON_FLAGS+=-xarch=v8 -xregs=no%appl - endif - ifeq ($(LIBARCH), sparcv9) - COMMON_FLAGS+=-xarch=v9 -xregs=no%appl - endif - ifeq ($(OPT), true) - CFLAGS=-xO2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-z defs -ztext - # Libraries we are dependent on - LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -G -o $@ -endif - -# Linux GNU C Compiler -ifeq ($(OSNAME), linux) - # GNU Compiler options needed to build it - COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer - # Options that help find errors - COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses - ifeq ($(OPT), true) - CFLAGS=-O2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc - # Libraries we are dependent on - LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ -endif - -# Windows Microsoft C/C++ Optimizing Compiler Version 12 -ifeq ($(OSNAME), win32) - CC=cl - # Compiler options needed to build it - COMMON_FLAGS=-Gy -DWIN32 - # Options that help find errors - COMMON_FLAGS+=-W0 -WX - ifeq ($(OPT), true) - CFLAGS= -Ox -Op -Zi $(COMMON_FLAGS) - else - CFLAGS= -Od -Zi $(COMMON_FLAGS) - endif - # Add in java_crw_demo obj file on windows (easier) - SOURCES+=../java_crw_demo/java_crw_demo.c - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.obj) - # Library name and options needed to build it - LIBRARY=$(LIBNAME).dll - LDFLAGS= - # Libraries we are dependent on - LIBRARIES=$(JDK)/ - # Building a shared library - LINK_SHARED=link -dll -out:$@ -endif - -# Common -I options -CFLAGS += -I. -CFLAGS += -I../agent_util -CFLAGS += -I../java_crw_demo -CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - -# Default rule (build both native library and jar file) -all: $(LIBRARY) $(JARFILE) - -# Build native library -$(LIBRARY): $(OBJECTS) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - -# Build jar file -$(JARFILE): $(JAVA_SOURCES) - rm -f -r classes - mkdir -p classes - $(JDK)/bin/javac -d classes $(JAVA_SOURCES) - (cd classes; $(JDK)/bin/jar cf ../$@ *) - -# Cleanup the built bits -clean: - rm -f -r classes - rm -f $(LIBRARY) $(JARFILE) $(OBJECTS) - -# Simple tester -test: all - LD_LIBRARY_PATH=. $(JDK)/bin/java -agentlib:$(LIBNAME) -Xbootclasspath/a:./$(JARFILE) -version - -# Compilation rule only needed on Windows -ifeq ($(OSNAME), win32) -%.obj: %.c - $(COMPILE.c) $< -endif - diff --git a/jdk/src/demo/share/jvmti/mtrace/Mtrace.java b/jdk/src/demo/share/jvmti/mtrace/Mtrace.java deleted file mode 100644 index ecebf75a450..00000000000 --- a/jdk/src/demo/share/jvmti/mtrace/Mtrace.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - - -/* Java class to hold static methods which will be called in byte code - * injections of all class files. - */ - -public class Mtrace { - - /* Master switch that activates methods. */ - - private static int engaged = 0; - - /* At the very beginning of every method, a call to method_entry() - * is injected. - */ - - private static native void _method_entry(Object thr, int cnum, int mnum); - public static void method_entry(int cnum, int mnum) - { - if ( engaged != 0 ) { - _method_entry(Thread.currentThread(), cnum, mnum); - } - } - - /* Before any of the return bytecodes, a call to method_exit() - * is injected. - */ - - private static native void _method_exit(Object thr, int cnum, int mnum); - public static void method_exit(int cnum, int mnum) - { - if ( engaged != 0 ) { - _method_exit(Thread.currentThread(), cnum, mnum); - } - } - -} diff --git a/jdk/src/demo/share/jvmti/mtrace/README.txt b/jdk/src/demo/share/jvmti/mtrace/README.txt deleted file mode 100644 index 3c5519726da..00000000000 --- a/jdk/src/demo/share/jvmti/mtrace/README.txt +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -mtrace - -This agent library can be used to track method call and return counts. -It uses the same java_crw_demo library used by HPROF to do BCI on all or -selected classfiles loaded into the Virtual Machine. It will print out a -sorted list of the most heavily used classes (as determined by the number -of method calls into the class) and also include the call and return counts -for all methods that are called. - -You can use this agent library as follows: - - java -Xbootclasspath/a:mtrace.jar -agentlib:mtrace ... - -To get help on the available options try: - - java -agentlib:mtrace=help - -See ${JAVA_HOME}/demo/jvmti/index.html for help running and building agents. - diff --git a/jdk/src/demo/share/jvmti/mtrace/mtrace.c b/jdk/src/demo/share/jvmti/mtrace/mtrace.c deleted file mode 100644 index 82b9e662e40..00000000000 --- a/jdk/src/demo/share/jvmti/mtrace/mtrace.c +++ /dev/null @@ -1,833 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include "stdlib.h" - -#include "mtrace.h" -#include "java_crw_demo.h" - - -/* ------------------------------------------------------------------- */ -/* Some constant maximum sizes */ - -#define MAX_TOKEN_LENGTH 16 -#define MAX_THREAD_NAME_LENGTH 512 -#define MAX_METHOD_NAME_LENGTH 1024 - -/* Some constant names that tie to Java class/method names. - * We assume the Java class whose static methods we will be calling - * looks like: - * - * public class Mtrace { - * private static int engaged; - * private static native void _method_entry(Object thr, int cnum, int mnum); - * public static void method_entry(int cnum, int mnum) - * { - * if ( engaged != 0 ) { - * _method_entry(Thread.currentThread(), cnum, mnum); - * } - * } - * private static native void _method_exit(Object thr, int cnum, int mnum); - * public static void method_exit(int cnum, int mnum) - * { - * if ( engaged != 0 ) { - * _method_exit(Thread.currentThread(), cnum, mnum); - * } - * } - * } - * - * The engaged field allows us to inject all classes (even system classes) - * and delay the actual calls to the native code until the VM has reached - * a safe time to call native methods (Past the JVMTI VM_START event). - * - */ - -#define MTRACE_class Mtrace /* Name of class we are using */ -#define MTRACE_entry method_entry /* Name of java entry method */ -#define MTRACE_exit method_exit /* Name of java exit method */ -#define MTRACE_native_entry _method_entry /* Name of java entry native */ -#define MTRACE_native_exit _method_exit /* Name of java exit native */ -#define MTRACE_engaged engaged /* Name of java static field */ - -/* C macros to create strings from tokens */ -#define _STRING(s) #s -#define STRING(s) _STRING(s) - -/* ------------------------------------------------------------------- */ - -/* Data structure to hold method and class information in agent */ - -typedef struct MethodInfo { - const char *name; /* Method name */ - const char *signature; /* Method signature */ - int calls; /* Method call count */ - int returns; /* Method return count */ -} MethodInfo; - -typedef struct ClassInfo { - const char *name; /* Class name */ - int mcount; /* Method count */ - MethodInfo *methods; /* Method information */ - int calls; /* Method call count for this class */ -} ClassInfo; - -/* Global agent data structure */ - -typedef struct { - /* JVMTI Environment */ - jvmtiEnv *jvmti; - jboolean vm_is_dead; - jboolean vm_is_started; - /* Data access Lock */ - jrawMonitorID lock; - /* Options */ - char *include; - char *exclude; - int max_count; - /* ClassInfo Table */ - ClassInfo *classes; - jint ccount; -} GlobalAgentData; - -static GlobalAgentData *gdata; - -/* Enter a critical section by doing a JVMTI Raw Monitor Enter */ -static void -enter_critical_section(jvmtiEnv *jvmti) -{ - jvmtiError error; - - error = (*jvmti)->RawMonitorEnter(jvmti, gdata->lock); - check_jvmti_error(jvmti, error, "Cannot enter with raw monitor"); -} - -/* Exit a critical section by doing a JVMTI Raw Monitor Exit */ -static void -exit_critical_section(jvmtiEnv *jvmti) -{ - jvmtiError error; - - error = (*jvmti)->RawMonitorExit(jvmti, gdata->lock); - check_jvmti_error(jvmti, error, "Cannot exit with raw monitor"); -} - -/* Get a name for a jthread */ -static void -get_thread_name(jvmtiEnv *jvmti, jthread thread, char *tname, int maxlen) -{ - jvmtiThreadInfo info; - jvmtiError error; - - /* Make sure the stack variables are garbage free */ - (void)memset(&info,0, sizeof(info)); - - /* Assume the name is unknown for now */ - (void)strcpy(tname, "Unknown"); - - /* Get the thread information, which includes the name */ - error = (*jvmti)->GetThreadInfo(jvmti, thread, &info); - check_jvmti_error(jvmti, error, "Cannot get thread info"); - - /* The thread might not have a name, be careful here. */ - if ( info.name != NULL ) { - int len; - - /* Copy the thread name into tname if it will fit */ - len = (int)strlen(info.name); - if ( len < maxlen ) { - (void)strcpy(tname, info.name); - } - - /* Every string allocated by JVMTI needs to be freed */ - deallocate(jvmti, (void*)info.name); - } -} - -/* Qsort class compare routine */ -static int -class_compar(const void *e1, const void *e2) -{ - ClassInfo *c1 = (ClassInfo*)e1; - ClassInfo *c2 = (ClassInfo*)e2; - if ( c1->calls > c2->calls ) return 1; - if ( c1->calls < c2->calls ) return -1; - return 0; -} - -/* Qsort method compare routine */ -static int -method_compar(const void *e1, const void *e2) -{ - MethodInfo *m1 = (MethodInfo*)e1; - MethodInfo *m2 = (MethodInfo*)e2; - if ( m1->calls > m2->calls ) return 1; - if ( m1->calls < m2->calls ) return -1; - return 0; -} - -/* Callback from java_crw_demo() that gives us mnum mappings */ -static void -mnum_callbacks(unsigned cnum, const char **names, const char**sigs, int mcount) -{ - ClassInfo *cp; - int mnum; - - if ( cnum >= (unsigned)gdata->ccount ) { - fatal_error("ERROR: Class number out of range\n"); - } - if ( mcount == 0 ) { - return; - } - - cp = gdata->classes + (int)cnum; - cp->calls = 0; - cp->mcount = mcount; - cp->methods = (MethodInfo*)calloc(mcount, sizeof(MethodInfo)); - if ( cp->methods == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - - for ( mnum = 0 ; mnum < mcount ; mnum++ ) { - MethodInfo *mp; - - mp = cp->methods + mnum; - mp->name = (const char *)strdup(names[mnum]); - if ( mp->name == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - mp->signature = (const char *)strdup(sigs[mnum]); - if ( mp->signature == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - } -} - -/* Java Native Method for entry */ -static void -MTRACE_native_entry(JNIEnv *env, jclass klass, jobject thread, jint cnum, jint mnum) -{ - enter_critical_section(gdata->jvmti); { - /* It's possible we get here right after VmDeath event, be careful */ - if ( !gdata->vm_is_dead ) { - ClassInfo *cp; - MethodInfo *mp; - - if ( cnum >= gdata->ccount ) { - fatal_error("ERROR: Class number out of range\n"); - } - cp = gdata->classes + cnum; - if ( mnum >= cp->mcount ) { - fatal_error("ERROR: Method number out of range\n"); - } - mp = cp->methods + mnum; - if ( interested((char*)cp->name, (char*)mp->name, - gdata->include, gdata->exclude) ) { - mp->calls++; - cp->calls++; - } - } - } exit_critical_section(gdata->jvmti); -} - -/* Java Native Method for exit */ -static void -MTRACE_native_exit(JNIEnv *env, jclass klass, jobject thread, jint cnum, jint mnum) -{ - enter_critical_section(gdata->jvmti); { - /* It's possible we get here right after VmDeath event, be careful */ - if ( !gdata->vm_is_dead ) { - ClassInfo *cp; - MethodInfo *mp; - - if ( cnum >= gdata->ccount ) { - fatal_error("ERROR: Class number out of range\n"); - } - cp = gdata->classes + cnum; - if ( mnum >= cp->mcount ) { - fatal_error("ERROR: Method number out of range\n"); - } - mp = cp->methods + mnum; - if ( interested((char*)cp->name, (char*)mp->name, - gdata->include, gdata->exclude) ) { - mp->returns++; - } - } - } exit_critical_section(gdata->jvmti); -} - -/* Callback for JVMTI_EVENT_VM_START */ -static void JNICALL -cbVMStart(jvmtiEnv *jvmti, JNIEnv *env) -{ - enter_critical_section(jvmti); { - jclass klass; - jfieldID field; - int rc; - - /* Java Native Methods for class */ - static JNINativeMethod registry[2] = { - {STRING(MTRACE_native_entry), "(Ljava/lang/Object;II)V", - (void*)&MTRACE_native_entry}, - {STRING(MTRACE_native_exit), "(Ljava/lang/Object;II)V", - (void*)&MTRACE_native_exit} - }; - - /* The VM has started. */ - stdout_message("VMStart\n"); - - /* Register Natives for class whose methods we use */ - klass = (*env)->FindClass(env, STRING(MTRACE_class)); - if ( klass == NULL ) { - fatal_error("ERROR: JNI: Cannot find %s with FindClass\n", - STRING(MTRACE_class)); - } - rc = (*env)->RegisterNatives(env, klass, registry, 2); - if ( rc != 0 ) { - fatal_error("ERROR: JNI: Cannot register native methods for %s\n", - STRING(MTRACE_class)); - } - - /* Engage calls. */ - field = (*env)->GetStaticFieldID(env, klass, STRING(MTRACE_engaged), "I"); - if ( field == NULL ) { - fatal_error("ERROR: JNI: Cannot get field from %s\n", - STRING(MTRACE_class)); - } - (*env)->SetStaticIntField(env, klass, field, 1); - - /* Indicate VM has started */ - gdata->vm_is_started = JNI_TRUE; - - } exit_critical_section(jvmti); -} - -/* Callback for JVMTI_EVENT_VM_INIT */ -static void JNICALL -cbVMInit(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - enter_critical_section(jvmti); { - char tname[MAX_THREAD_NAME_LENGTH]; - static jvmtiEvent events[] = - { JVMTI_EVENT_THREAD_START, JVMTI_EVENT_THREAD_END }; - int i; - - /* The VM has started. */ - get_thread_name(jvmti, thread, tname, sizeof(tname)); - stdout_message("VMInit %s\n", tname); - - /* The VM is now initialized, at this time we make our requests - * for additional events. - */ - - for( i=0; i < (int)(sizeof(events)/sizeof(jvmtiEvent)); i++) { - jvmtiError error; - - /* Setup event notification modes */ - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - events[i], (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - } - - } exit_critical_section(jvmti); -} - -/* Callback for JVMTI_EVENT_VM_DEATH */ -static void JNICALL -cbVMDeath(jvmtiEnv *jvmti, JNIEnv *env) -{ - enter_critical_section(jvmti); { - jclass klass; - jfieldID field; - - /* The VM has died. */ - stdout_message("VMDeath\n"); - - /* Disengage calls in MTRACE_class. */ - klass = (*env)->FindClass(env, STRING(MTRACE_class)); - if ( klass == NULL ) { - fatal_error("ERROR: JNI: Cannot find %s with FindClass\n", - STRING(MTRACE_class)); - } - field = (*env)->GetStaticFieldID(env, klass, STRING(MTRACE_engaged), "I"); - if ( field == NULL ) { - fatal_error("ERROR: JNI: Cannot get field from %s\n", - STRING(MTRACE_class)); - } - (*env)->SetStaticIntField(env, klass, field, 0); - - /* The critical section here is important to hold back the VM death - * until all other callbacks have completed. - */ - - /* Since this critical section could be holding up other threads - * in other event callbacks, we need to indicate that the VM is - * dead so that the other callbacks can short circuit their work. - * We don't expect any further events after VmDeath but we do need - * to be careful that existing threads might be in our own agent - * callback code. - */ - gdata->vm_is_dead = JNI_TRUE; - - /* Dump out stats */ - stdout_message("Begin Class Stats\n"); - if ( gdata->ccount > 0 ) { - int cnum; - - /* Sort table (in place) by number of method calls into class. */ - /* Note: Do not use this table after this qsort! */ - qsort(gdata->classes, gdata->ccount, sizeof(ClassInfo), - &class_compar); - - /* Dump out gdata->max_count most called classes */ - for ( cnum=gdata->ccount-1 ; - cnum >= 0 && cnum >= gdata->ccount - gdata->max_count; - cnum-- ) { - ClassInfo *cp; - int mnum; - - cp = gdata->classes + cnum; - stdout_message("Class %s %d calls\n", cp->name, cp->calls); - if ( cp->calls==0 ) continue; - - /* Sort method table (in place) by number of method calls. */ - /* Note: Do not use this table after this qsort! */ - qsort(cp->methods, cp->mcount, sizeof(MethodInfo), - &method_compar); - for ( mnum=cp->mcount-1 ; mnum >= 0 ; mnum-- ) { - MethodInfo *mp; - - mp = cp->methods + mnum; - if ( mp->calls==0 ) continue; - stdout_message("\tMethod %s %s %d calls %d returns\n", - mp->name, mp->signature, mp->calls, mp->returns); - } - } - } - stdout_message("End Class Stats\n"); - (void)fflush(stdout); - - } exit_critical_section(jvmti); - -} - -/* Callback for JVMTI_EVENT_THREAD_START */ -static void JNICALL -cbThreadStart(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - enter_critical_section(jvmti); { - /* It's possible we get here right after VmDeath event, be careful */ - if ( !gdata->vm_is_dead ) { - char tname[MAX_THREAD_NAME_LENGTH]; - - get_thread_name(jvmti, thread, tname, sizeof(tname)); - stdout_message("ThreadStart %s\n", tname); - } - } exit_critical_section(jvmti); -} - -/* Callback for JVMTI_EVENT_THREAD_END */ -static void JNICALL -cbThreadEnd(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - enter_critical_section(jvmti); { - /* It's possible we get here right after VmDeath event, be careful */ - if ( !gdata->vm_is_dead ) { - char tname[MAX_THREAD_NAME_LENGTH]; - - get_thread_name(jvmti, thread, tname, sizeof(tname)); - stdout_message("ThreadEnd %s\n", tname); - } - } exit_critical_section(jvmti); -} - -/* Callback for JVMTI_EVENT_CLASS_FILE_LOAD_HOOK */ -static void JNICALL -cbClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv* env, - jclass class_being_redefined, jobject loader, - const char* name, jobject protection_domain, - jint class_data_len, const unsigned char* class_data, - jint* new_class_data_len, unsigned char** new_class_data) -{ - enter_critical_section(jvmti); { - /* It's possible we get here right after VmDeath event, be careful */ - if ( !gdata->vm_is_dead ) { - - const char *classname; - - /* Name could be NULL */ - if ( name == NULL ) { - classname = java_crw_demo_classname(class_data, class_data_len, - NULL); - if ( classname == NULL ) { - fatal_error("ERROR: No classname inside classfile\n"); - } - } else { - classname = strdup(name); - if ( classname == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - } - - *new_class_data_len = 0; - *new_class_data = NULL; - - /* The tracker class itself? */ - if ( interested((char*)classname, "", gdata->include, gdata->exclude) - && strcmp(classname, STRING(MTRACE_class)) != 0 ) { - jint cnum; - int system_class; - unsigned char *new_image; - long new_length; - ClassInfo *cp; - - /* Get unique number for every class file image loaded */ - cnum = gdata->ccount++; - - /* Save away class information */ - if ( gdata->classes == NULL ) { - gdata->classes = (ClassInfo*)malloc( - gdata->ccount*sizeof(ClassInfo)); - } else { - gdata->classes = (ClassInfo*) - realloc((void*)gdata->classes, - gdata->ccount*sizeof(ClassInfo)); - } - if ( gdata->classes == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - cp = gdata->classes + cnum; - cp->name = (const char *)strdup(classname); - if ( cp->name == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - cp->calls = 0; - cp->mcount = 0; - cp->methods = NULL; - - /* Is it a system class? If the class load is before VmStart - * then we will consider it a system class that should - * be treated carefully. (See java_crw_demo) - */ - system_class = 0; - if ( !gdata->vm_is_started ) { - system_class = 1; - } - - new_image = NULL; - new_length = 0; - - /* Call the class file reader/write demo code */ - java_crw_demo(cnum, - classname, - class_data, - class_data_len, - system_class, - STRING(MTRACE_class), "L" STRING(MTRACE_class) ";", - STRING(MTRACE_entry), "(II)V", - STRING(MTRACE_exit), "(II)V", - NULL, NULL, - NULL, NULL, - &new_image, - &new_length, - NULL, - &mnum_callbacks); - - /* If we got back a new class image, return it back as "the" - * new class image. This must be JVMTI Allocate space. - */ - if ( new_length > 0 ) { - unsigned char *jvmti_space; - - jvmti_space = (unsigned char *)allocate(jvmti, (jint)new_length); - (void)memcpy((void*)jvmti_space, (void*)new_image, (int)new_length); - *new_class_data_len = (jint)new_length; - *new_class_data = jvmti_space; /* VM will deallocate */ - } - - /* Always free up the space we get from java_crw_demo() */ - if ( new_image != NULL ) { - (void)free((void*)new_image); /* Free malloc() space with free() */ - } - } - (void)free((void*)classname); - } - } exit_critical_section(jvmti); -} - -/* Parse the options for this mtrace agent */ -static void -parse_agent_options(char *options) -{ - char token[MAX_TOKEN_LENGTH]; - char *next; - - gdata->max_count = 10; /* Default max=n */ - - /* Parse options and set flags in gdata */ - if ( options==NULL ) { - return; - } - - /* Get the first token from the options string. */ - next = get_token(options, ",=", token, sizeof(token)); - - /* While not at the end of the options string, process this option. */ - while ( next != NULL ) { - if ( strcmp(token,"help")==0 ) { - stdout_message("The mtrace JVMTI demo agent\n"); - stdout_message("\n"); - stdout_message(" java -agent:mtrace[=options] ...\n"); - stdout_message("\n"); - stdout_message("The options are comma separated:\n"); - stdout_message("\t help\t\t\t Print help information\n"); - stdout_message("\t max=n\t\t Only list top n classes\n"); - stdout_message("\t include=item\t\t Only these classes/methods\n"); - stdout_message("\t exclude=item\t\t Exclude these classes/methods\n"); - stdout_message("\n"); - stdout_message("item\t Qualified class and/or method names\n"); - stdout_message("\t\t e.g. (*.;Foobar.method;sun.*)\n"); - stdout_message("\n"); - exit(0); - } else if ( strcmp(token,"max")==0 ) { - char number[MAX_TOKEN_LENGTH]; - - /* Get the numeric option */ - next = get_token(next, ",=", number, (int)sizeof(number)); - /* Check for token scan error */ - if ( next==NULL ) { - fatal_error("ERROR: max=n option error\n"); - } - /* Save numeric value */ - gdata->max_count = atoi(number); - } else if ( strcmp(token,"include")==0 ) { - int used; - int maxlen; - - maxlen = MAX_METHOD_NAME_LENGTH; - if ( gdata->include == NULL ) { - gdata->include = (char*)calloc(maxlen+1, 1); - used = 0; - } else { - used = (int)strlen(gdata->include); - gdata->include[used++] = ','; - gdata->include[used] = 0; - gdata->include = (char*) - realloc((void*)gdata->include, used+maxlen+1); - } - if ( gdata->include == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - /* Add this item to the list */ - next = get_token(next, ",=", gdata->include+used, maxlen); - /* Check for token scan error */ - if ( next==NULL ) { - fatal_error("ERROR: include option error\n"); - } - } else if ( strcmp(token,"exclude")==0 ) { - int used; - int maxlen; - - maxlen = MAX_METHOD_NAME_LENGTH; - if ( gdata->exclude == NULL ) { - gdata->exclude = (char*)calloc(maxlen+1, 1); - used = 0; - } else { - used = (int)strlen(gdata->exclude); - gdata->exclude[used++] = ','; - gdata->exclude[used] = 0; - gdata->exclude = (char*) - realloc((void*)gdata->exclude, used+maxlen+1); - } - if ( gdata->exclude == NULL ) { - fatal_error("ERROR: Out of malloc memory\n"); - } - /* Add this item to the list */ - next = get_token(next, ",=", gdata->exclude+used, maxlen); - /* Check for token scan error */ - if ( next==NULL ) { - fatal_error("ERROR: exclude option error\n"); - } - } else if ( token[0]!=0 ) { - /* We got a non-empty token and we don't know what it is. */ - fatal_error("ERROR: Unknown option: %s\n", token); - } - /* Get the next token (returns NULL if there are no more) */ - next = get_token(next, ",=", token, sizeof(token)); - } -} - -/* Agent_OnLoad: This is called immediately after the shared library is - * loaded. This is the first code executed. - */ -JNIEXPORT jint JNICALL -DEF_Agent_OnLoad(JavaVM *vm, char *options, void *reserved) -{ - static GlobalAgentData data; - jvmtiEnv *jvmti; - jvmtiError error; - jint res; - jvmtiCapabilities capabilities; - jvmtiEventCallbacks callbacks; - - /* Setup initial global agent data area - * Use of static/extern data should be handled carefully here. - * We need to make sure that we are able to cleanup after ourselves - * so anything allocated in this library needs to be freed in - * the Agent_OnUnload() function. - */ - (void)memset((void*)&data, 0, sizeof(data)); - gdata = &data; - - /* First thing we need to do is get the jvmtiEnv* or JVMTI environment */ - res = (*vm)->GetEnv(vm, (void **)&jvmti, JVMTI_VERSION_1); - if (res != JNI_OK) { - /* This means that the VM was unable to obtain this version of the - * JVMTI interface, this is a fatal error. - */ - fatal_error("ERROR: Unable to access JVMTI Version 1 (0x%x)," - " is your JDK a 5.0 or newer version?" - " JNIEnv's GetEnv() returned %d\n", - JVMTI_VERSION_1, res); - } - - /* Here we save the jvmtiEnv* for Agent_OnUnload(). */ - gdata->jvmti = jvmti; - - /* Parse any options supplied on java command line */ - parse_agent_options(options); - - /* Immediately after getting the jvmtiEnv* we need to ask for the - * capabilities this agent will need. In this case we need to make - * sure that we can get all class load hooks. - */ - (void)memset(&capabilities,0, sizeof(capabilities)); - capabilities.can_generate_all_class_hook_events = 1; - error = (*jvmti)->AddCapabilities(jvmti, &capabilities); - check_jvmti_error(jvmti, error, "Unable to get necessary JVMTI capabilities."); - - /* Next we need to provide the pointers to the callback functions to - * to this jvmtiEnv* - */ - (void)memset(&callbacks,0, sizeof(callbacks)); - /* JVMTI_EVENT_VM_START */ - callbacks.VMStart = &cbVMStart; - /* JVMTI_EVENT_VM_INIT */ - callbacks.VMInit = &cbVMInit; - /* JVMTI_EVENT_VM_DEATH */ - callbacks.VMDeath = &cbVMDeath; - /* JVMTI_EVENT_CLASS_FILE_LOAD_HOOK */ - callbacks.ClassFileLoadHook = &cbClassFileLoadHook; - /* JVMTI_EVENT_THREAD_START */ - callbacks.ThreadStart = &cbThreadStart; - /* JVMTI_EVENT_THREAD_END */ - callbacks.ThreadEnd = &cbThreadEnd; - error = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, (jint)sizeof(callbacks)); - check_jvmti_error(jvmti, error, "Cannot set jvmti callbacks"); - - /* At first the only initial events we are interested in are VM - * initialization, VM death, and Class File Loads. - * Once the VM is initialized we will request more events. - */ - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_START, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_INIT, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_DEATH, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - error = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, (jthread)NULL); - check_jvmti_error(jvmti, error, "Cannot set event notification"); - - /* Here we create a raw monitor for our use in this agent to - * protect critical sections of code. - */ - error = (*jvmti)->CreateRawMonitor(jvmti, "agent data", &(gdata->lock)); - check_jvmti_error(jvmti, error, "Cannot create raw monitor"); - - /* Add demo jar file to boot classpath */ - add_demo_jar_to_bootclasspath(jvmti, "mtrace"); - - /* We return JNI_OK to signify success */ - return JNI_OK; -} - -/* Agent_OnUnload: This is called immediately before the shared library is - * unloaded. This is the last code executed. - */ -JNIEXPORT void JNICALL -DEF_Agent_OnUnload(JavaVM *vm) -{ - /* Make sure all malloc/calloc/strdup space is freed */ - if ( gdata->include != NULL ) { - (void)free((void*)gdata->include); - gdata->include = NULL; - } - if ( gdata->exclude != NULL ) { - (void)free((void*)gdata->exclude); - gdata->exclude = NULL; - } - if ( gdata->classes != NULL ) { - int cnum; - - for ( cnum = 0 ; cnum < gdata->ccount ; cnum++ ) { - ClassInfo *cp; - - cp = gdata->classes + cnum; - (void)free((void*)cp->name); - if ( cp->mcount > 0 ) { - int mnum; - - for ( mnum = 0 ; mnum < cp->mcount ; mnum++ ) { - MethodInfo *mp; - - mp = cp->methods + mnum; - (void)free((void*)mp->name); - (void)free((void*)mp->signature); - } - (void)free((void*)cp->methods); - } - } - (void)free((void*)gdata->classes); - gdata->classes = NULL; - } -} diff --git a/jdk/src/demo/share/jvmti/mtrace/mtrace.h b/jdk/src/demo/share/jvmti/mtrace/mtrace.h deleted file mode 100644 index 39f483ddf14..00000000000 --- a/jdk/src/demo/share/jvmti/mtrace/mtrace.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* Primary mtrace #include file, should be included by most if not - * all mtrace source files. Gives access to the global data structure - * and all global macros. - */ - -#ifndef MTRACE_H -#define MTRACE_H - -/* Standard C functions used throughout. */ - -#include -#include -#include -#include -#include - -/* General JVM/Java functions, types and macros. */ - -#include -#include "jni.h" -#include "jvmti.h" - -/* Utility functions */ - -#include "agent_util.h" - -#endif diff --git a/jdk/src/demo/share/jvmti/mtrace/sample.makefile.txt b/jdk/src/demo/share/jvmti/mtrace/sample.makefile.txt deleted file mode 100644 index b342e785020..00000000000 --- a/jdk/src/demo/share/jvmti/mtrace/sample.makefile.txt +++ /dev/null @@ -1,163 +0,0 @@ -# -# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -######################################################################## -# -# Sample GNU Makefile for building JVMTI Demo mtrace -# -# Example uses: -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparc] -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] -# gnumake JDK= OSNAME=linux [OPT=true] -# gnumake JDK= OSNAME=win32 [OPT=true] -# -######################################################################## - -# Source lists -LIBNAME=mtrace -SOURCES=mtrace.c ../agent_util/agent_util.c -JAVA_SOURCES=Mtrace.java - -# Name of jar file that needs to be created -JARFILE=mtrace.jar - -# Solaris Studio C Compiler Version 12.4 -ifeq ($(OSNAME), solaris) - # Sun Solaris Compiler options needed - COMMON_FLAGS=-mt -KPIC - # Options that help find errors - COMMON_FLAGS+= -Xa -v -xc99=%none - # Check LIBARCH for any special compiler options - LIBARCH=$(shell uname -p) - ifeq ($(LIBARCH), sparc) - COMMON_FLAGS+=-xarch=v8 -xregs=no%appl - endif - ifeq ($(LIBARCH), sparcv9) - COMMON_FLAGS+=-xarch=v9 -xregs=no%appl - endif - ifeq ($(OPT), true) - CFLAGS=-xO2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-z defs -ztext - # Libraries we are dependent on - LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -G -o $@ -endif - -# Linux GNU C Compiler -ifeq ($(OSNAME), linux) - # GNU Compiler options needed to build it - COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer - # Options that help find errors - COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses - ifeq ($(OPT), true) - CFLAGS=-O2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc - # Libraries we are dependent on - LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ -endif - -# Windows Microsoft C/C++ Optimizing Compiler Version 12 -ifeq ($(OSNAME), win32) - CC=cl - # Compiler options needed to build it - COMMON_FLAGS=-Gy -DWIN32 - # Options that help find errors - COMMON_FLAGS+=-W0 -WX - ifeq ($(OPT), true) - CFLAGS= -Ox -Op -Zi $(COMMON_FLAGS) - else - CFLAGS= -Od -Zi $(COMMON_FLAGS) - endif - # Add in java_crw_demo obj file on windows (easier) - SOURCES+=../java_crw_demo/java_crw_demo.c - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.obj) - # Library name and options needed to build it - LIBRARY=$(LIBNAME).dll - LDFLAGS= - # Libraries we are dependent on - LIBRARIES=$(JDK)/ - # Building a shared library - LINK_SHARED=link -dll -out:$@ -endif - -# Common -I options -CFLAGS += -I. -CFLAGS += -I../agent_util -CFLAGS += -I../java_crw_demo -CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - -# Default rule (build both native library and jar file) -all: $(LIBRARY) $(JARFILE) - -# Build native library -$(LIBRARY): $(OBJECTS) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - -# Build jar file -$(JARFILE): $(JAVA_SOURCES) - rm -f -r classes - mkdir -p classes - $(JDK)/bin/javac -d classes $(JAVA_SOURCES) - (cd classes; $(JDK)/bin/jar cf ../$@ *) - -# Cleanup the built bits -clean: - rm -f -r classes - rm -f $(LIBRARY) $(JARFILE) $(OBJECTS) - -# Simple tester -test: all - LD_LIBRARY_PATH=. $(JDK)/bin/java -agentlib:$(LIBNAME) -Xbootclasspath/a:./$(JARFILE) -version - -# Compilation rule only needed on Windows -ifeq ($(OSNAME), win32) -%.obj: %.c - $(COMPILE.c) $< -endif - diff --git a/jdk/src/demo/share/jvmti/versionCheck/README.txt b/jdk/src/demo/share/jvmti/versionCheck/README.txt deleted file mode 100644 index 838af415252..00000000000 --- a/jdk/src/demo/share/jvmti/versionCheck/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -versionCheck - -This agent library just makes some simple calls and checks -the version of the interface being used to build the agent, -with that supplied by the VM at runtime. - -You can use this agent library as follows: - - java -agentlib:versionCheck ... - -See ${JAVA_HOME}/demo/jvmti/index.html for help running and building agents. - diff --git a/jdk/src/demo/share/jvmti/versionCheck/sample.makefile.txt b/jdk/src/demo/share/jvmti/versionCheck/sample.makefile.txt deleted file mode 100644 index 01240330398..00000000000 --- a/jdk/src/demo/share/jvmti/versionCheck/sample.makefile.txt +++ /dev/null @@ -1,148 +0,0 @@ -# -# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -######################################################################## -# -# Sample GNU Makefile for building JVMTI Demo versionCheck -# -# Example uses: -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparc] -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] -# gnumake JDK= OSNAME=linux [OPT=true] -# gnumake JDK= OSNAME=win32 [OPT=true] -# -######################################################################## - -# Source lists -LIBNAME=versionCheck -SOURCES=versionCheck.c ../agent_util/agent_util.c - -# Solaris Studio C Compiler Version 12.4 -ifeq ($(OSNAME), solaris) - # Sun Solaris Compiler options needed - COMMON_FLAGS=-mt -KPIC - # Options that help find errors - COMMON_FLAGS+= -Xa -v -xc99=%none - # Check LIBARCH for any special compiler options - LIBARCH=$(shell uname -p) - ifeq ($(LIBARCH), sparc) - COMMON_FLAGS+=-xarch=v8 -xregs=no%appl - endif - ifeq ($(LIBARCH), sparcv9) - COMMON_FLAGS+=-xarch=v9 -xregs=no%appl - endif - ifeq ($(OPT), true) - CFLAGS=-xO2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-z defs -ztext - # Libraries we are dependent on - LIBRARIES= -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -G -o $@ -endif - -# Linux GNU C Compiler -ifeq ($(OSNAME), linux) - # GNU Compiler options needed to build it - COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer - # Options that help find errors - COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses - ifeq ($(OPT), true) - CFLAGS=-O2 $(COMMON_FLAGS) - else - CFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc - # Libraries we are dependent on - LIBRARIES=-lc - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ -endif - -# Windows Microsoft C/C++ Optimizing Compiler Version 12 -ifeq ($(OSNAME), win32) - CC=cl - # Compiler options needed to build it - COMMON_FLAGS=-Gy -DWIN32 - # Options that help find errors - COMMON_FLAGS+=-W0 -WX - ifeq ($(OPT), true) - CFLAGS= -Ox -Op -Zi $(COMMON_FLAGS) - else - CFLAGS= -Od -Zi $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.obj) - # Library name and options needed to build it - LIBRARY=$(LIBNAME).dll - LDFLAGS= - # Libraries we are dependent on - LIBRARIES= - # Building a shared library - LINK_SHARED=link -dll -out:$@ -endif - -# Common -I options -CFLAGS += -I. -CFLAGS += -I../agent_util -CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - -# Default rule -all: $(LIBRARY) - -# Build native library -$(LIBRARY): $(OBJECTS) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - -# Cleanup the built bits -clean: - rm -f $(LIBRARY) $(OBJECTS) - -# Simple tester -test: all - LD_LIBRARY_PATH=`pwd` $(JDK)/bin/java -agentlib:$(LIBNAME) -version - -# Compilation rule only needed on Windows -ifeq ($(OSNAME), win32) -%.obj: %.c - $(COMPILE.c) $< -endif - diff --git a/jdk/src/demo/share/jvmti/versionCheck/versionCheck.c b/jdk/src/demo/share/jvmti/versionCheck/versionCheck.c deleted file mode 100644 index 0ed58263b26..00000000000 --- a/jdk/src/demo/share/jvmti/versionCheck/versionCheck.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include -#include -#include - -#include "jni.h" -#include "jvmti.h" - -#include "agent_util.h" - -/* Create major.minor.micro version string */ -static void -version_check(jint cver, jint rver) -{ - jint cmajor, cminor, cmicro; - jint rmajor, rminor, rmicro; - - cmajor = (cver & JVMTI_VERSION_MASK_MAJOR) >> JVMTI_VERSION_SHIFT_MAJOR; - cminor = (cver & JVMTI_VERSION_MASK_MINOR) >> JVMTI_VERSION_SHIFT_MINOR; - cmicro = (cver & JVMTI_VERSION_MASK_MICRO) >> JVMTI_VERSION_SHIFT_MICRO; - rmajor = (rver & JVMTI_VERSION_MASK_MAJOR) >> JVMTI_VERSION_SHIFT_MAJOR; - rminor = (rver & JVMTI_VERSION_MASK_MINOR) >> JVMTI_VERSION_SHIFT_MINOR; - rmicro = (rver & JVMTI_VERSION_MASK_MICRO) >> JVMTI_VERSION_SHIFT_MICRO; - stdout_message("Compile Time JVMTI Version: %d.%d.%d (0x%08x)\n", - cmajor, cminor, cmicro, cver); - stdout_message("Run Time JVMTI Version: %d.%d.%d (0x%08x)\n", - rmajor, rminor, rmicro, rver); - if ( (cmajor > rmajor) || (cmajor == rmajor && cminor > rminor) ) { - fatal_error( - "ERROR: Compile Time JVMTI and Run Time JVMTI are incompatible\n"); - } -} - -/* Callback for JVMTI_EVENT_VM_INIT */ -static void JNICALL -vm_init(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - jvmtiError err; - jint runtime_version; - - /* The exact JVMTI version doesn't have to match, however this - * code demonstrates how you can check that the JVMTI version seen - * in the jvmti.h include file matches that being supplied at runtime - * by the VM. - */ - err = (*jvmti)->GetVersionNumber(jvmti, &runtime_version); - check_jvmti_error(jvmti, err, "get version number"); - version_check(JVMTI_VERSION, runtime_version); -} - -/* Agent_OnLoad() is called first, we prepare for a VM_INIT event here. */ -JNIEXPORT jint JNICALL -DEF_Agent_OnLoad(JavaVM *vm, char *options, void *reserved) -{ - jint rc; - jvmtiError err; - jvmtiEventCallbacks callbacks; - jvmtiEnv *jvmti; - - /* Get JVMTI environment */ - rc = (*vm)->GetEnv(vm, (void **)&jvmti, JVMTI_VERSION); - if (rc != JNI_OK) { - fatal_error("ERROR: Unable to create jvmtiEnv, GetEnv failed, error=%d\n", rc); - return -1; - } - - /* Set callbacks and enable event notifications */ - memset(&callbacks, 0, sizeof(callbacks)); - callbacks.VMInit = &vm_init; - err = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, sizeof(callbacks)); - check_jvmti_error(jvmti, err, "set event callbacks"); - err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_INIT, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - return 0; -} - -/* Agent_OnUnload() is called last */ -JNIEXPORT void JNICALL -DEF_Agent_OnUnload(JavaVM *vm) -{ -} diff --git a/jdk/src/demo/share/jvmti/waiters/Agent.cpp b/jdk/src/demo/share/jvmti/waiters/Agent.cpp deleted file mode 100644 index 8f67f5480a5..00000000000 --- a/jdk/src/demo/share/jvmti/waiters/Agent.cpp +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include -#include -#include -#include - -#include "jni.h" -#include "jvmti.h" - -#include "agent_util.h" - -#include "Monitor.hpp" -#include "Thread.hpp" -#include "Agent.hpp" - -/* Implementation of the Agent class */ - -/* Given a jvmtiEnv* and jthread, find the Thread instance */ -Thread * -Agent::get_thread(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - jvmtiError err; - Thread *t; - - /* This should always be in the Thread Local Storage */ - t = NULL; - err = jvmti->GetThreadLocalStorage(thread, (void**)&t); - check_jvmti_error(jvmti, err, "get thread local storage"); - if ( t == NULL ) { - /* This jthread has never been seen before? */ - stdout_message("WARNING: Never before seen jthread?\n"); - t = new Thread(jvmti, env, thread); - err = jvmti->SetThreadLocalStorage(thread, (const void*)t); - check_jvmti_error(jvmti, err, "set thread local storage"); - } - return t; -} - -/* Given a jvmtiEnv* and jobject, find the Monitor instance or create one */ -Monitor * -Agent::get_monitor(jvmtiEnv *jvmti, JNIEnv *env, jobject object) -{ - jvmtiError err; - Monitor *m; - jlong tag; - - m = NULL; - tag = (jlong)0; - err = jvmti->GetTag(object, &tag); - check_jvmti_error(jvmti, err, "get tag"); - /*LINTED*/ - m = (Monitor *)(void *)(ptrdiff_t)tag; - if ( m == NULL ) { - m = new Monitor(jvmti, env, object); - /* Save monitor on list */ - if (monitor_count == monitor_list_size) { - monitor_list_size += monitor_list_grow_size; - monitor_list = (Monitor**)realloc((void*)monitor_list, - (monitor_list_size)*(int)sizeof(Monitor*)); - } - monitor_list[monitor_count] = m; - m->set_slot(monitor_count); - monitor_count++; - /*LINTED*/ - tag = (jlong)(ptrdiff_t)(void *)m; - err = jvmti->SetTag(object, tag); - check_jvmti_error(jvmti, err, "set tag"); - } - return m; -} - -/* VM initialization and VM death calls to Agent */ -Agent::Agent(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - stdout_message("Agent created..\n"); - stdout_message("VMInit...\n"); - /* Start monitor list */ - monitor_count = 0; - monitor_list_size = initial_monitor_list_size; - monitor_list = (Monitor**) - malloc(monitor_list_size*(int)sizeof(Monitor*)); -} - -Agent::~Agent() -{ - stdout_message("Agent reclaimed..\n"); -} - -void Agent::vm_death(jvmtiEnv *jvmti, JNIEnv *env) -{ - /* Delete all Monitors we allocated */ - for ( int i = 0; i < (int)monitor_count; i++ ) { - delete monitor_list[i]; - } - free(monitor_list); - /* Print death message */ - stdout_message("VMDeath...\n"); -} - -/* Thread start event, setup a new thread */ -void Agent::thread_start(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - jvmtiError err; - Thread *t; - - /* Allocate a new Thread instance, put it in the Thread Local - * Storage for easy access later. - */ - t = new Thread(jvmti, env, thread); - err = jvmti->SetThreadLocalStorage(thread, (const void*)t); - check_jvmti_error(jvmti, err, "set thread local storage"); -} - - -/* Thread end event, we need to reclaim the space */ -void Agent::thread_end(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - jvmtiError err; - Thread *t; - - /* Find the thread */ - t = get_thread(jvmti, env, thread); - - /* Clear out the Thread Local Storage */ - err = jvmti->SetThreadLocalStorage(thread, (const void*)NULL); - check_jvmti_error(jvmti, err, "set thread local storage"); - - /* Reclaim the C++ object space */ - delete t; -} - -/* Monitor contention begins for a thread. */ -void Agent::monitor_contended_enter(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object) -{ - get_monitor(jvmti, env, object)->contended(); - get_thread(jvmti, env, thread)-> - monitor_contended_enter(jvmti, env, thread, object); -} - -/* Monitor contention ends for a thread. */ -void Agent::monitor_contended_entered(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object) -{ - /* Do nothing for now */ -} - -/* Monitor wait begins for a thread. */ -void Agent::monitor_wait(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object, jlong timeout) -{ - get_monitor(jvmti, env, object)->waited(); - get_thread(jvmti, env, thread)-> - monitor_wait(jvmti, env, thread, object, timeout); -} - -/* Monitor wait ends for a thread. */ -void Agent::monitor_waited(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object, jboolean timed_out) -{ - if ( timed_out ) { - get_monitor(jvmti, env, object)->timeout(); - } - get_thread(jvmti, env, thread)-> - monitor_waited(jvmti, env, thread, object, timed_out); -} - -/* A tagged object has been freed */ -void Agent::object_free(jvmtiEnv* jvmti, jlong tag) -{ - /* We just cast the tag to a C++ pointer and delete it. - * we know it can only be a Monitor *. - */ - Monitor *m; - /*LINTED*/ - m = (Monitor *)(ptrdiff_t)tag; - if (monitor_count > 1) { - /* Move the last element to this Monitor's slot */ - int slot = m->get_slot(); - Monitor *last = monitor_list[monitor_count-1]; - monitor_list[slot] = last; - last->set_slot(slot); - } - monitor_count--; - delete m; -} diff --git a/jdk/src/demo/share/jvmti/waiters/Agent.hpp b/jdk/src/demo/share/jvmti/waiters/Agent.hpp deleted file mode 100644 index 20f03229ef9..00000000000 --- a/jdk/src/demo/share/jvmti/waiters/Agent.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* C++ Agent class */ - -class Agent { - - private: - enum { - initial_monitor_list_size = 64, - monitor_list_grow_size = 16 - }; - Monitor **monitor_list; - unsigned monitor_list_size; - unsigned monitor_count; - Thread *get_thread(jvmtiEnv *jvmti, JNIEnv *env, jthread thread); - Monitor *get_monitor(jvmtiEnv *jvmti, JNIEnv *env, jobject object); - - public: - Agent(jvmtiEnv *jvmti, JNIEnv *env, jthread thread); - ~Agent(); - void vm_death(jvmtiEnv *jvmti, JNIEnv *env); - void thread_start(jvmtiEnv *jvmti, JNIEnv *env, jthread thread); - void thread_end(jvmtiEnv *jvmti, JNIEnv *env, jthread thread); - void monitor_contended_enter(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object); - void monitor_contended_entered(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object); - void monitor_wait(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object, jlong timeout); - void monitor_waited(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object, jboolean timed_out); - void object_free(jvmtiEnv* jvmti, jlong tag); - -}; diff --git a/jdk/src/demo/share/jvmti/waiters/Monitor.cpp b/jdk/src/demo/share/jvmti/waiters/Monitor.cpp deleted file mode 100644 index db215c8b7b7..00000000000 --- a/jdk/src/demo/share/jvmti/waiters/Monitor.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include -#include -#include - -#include "jni.h" -#include "jvmti.h" - -#include "agent_util.h" - -#include "Monitor.hpp" - -/* Implementation of the Monitor class */ - -Monitor::Monitor(jvmtiEnv *jvmti, JNIEnv *env, jobject object) -{ - jvmtiError err; - jclass klass; - char *signature; - - /* Clear counters */ - contends = 0; - waits = 0; - timeouts = 0; - - /* Get the class name for this monitor object */ - (void)strcpy(name, "Unknown"); - klass = env->GetObjectClass(object); - if ( klass == NULL ) { - fatal_error("ERROR: Cannot find jclass from jobject\n"); - } - err = jvmti->GetClassSignature(klass, &signature, NULL); - check_jvmti_error(jvmti, err, "get class signature"); - if ( signature != NULL ) { - (void)strncpy(name, signature, (int)sizeof(name)-1); - deallocate(jvmti, signature); - } -} - -Monitor::~Monitor() -{ - stdout_message("Monitor %s summary: %d contends, %d waits, %d timeouts\n", - name, contends, waits, timeouts); -} - -int Monitor::get_slot() -{ - return slot; -} - -void Monitor::set_slot(int aslot) -{ - slot = aslot; -} - -void Monitor::contended() -{ - contends++; -} - -void Monitor::waited() -{ - waits++; -} - -void Monitor::timeout() -{ - timeouts++; -} diff --git a/jdk/src/demo/share/jvmti/waiters/Monitor.hpp b/jdk/src/demo/share/jvmti/waiters/Monitor.hpp deleted file mode 100644 index 2906e5779f6..00000000000 --- a/jdk/src/demo/share/jvmti/waiters/Monitor.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -#ifdef STATIC_BUILD -#define Monitor WaiterMonitor -#endif - - -/* C++ Monitor class */ - -class Monitor { - - private: - char name[64]; - int slot; - unsigned contends; - unsigned waits; - unsigned timeouts; - - public: - Monitor(jvmtiEnv *jvmti, JNIEnv *env, jobject object); - ~Monitor(); - int get_slot(); - void set_slot(int i); - void contended(); - void waited(); - void timeout(); - -}; diff --git a/jdk/src/demo/share/jvmti/waiters/README.txt b/jdk/src/demo/share/jvmti/waiters/README.txt deleted file mode 100644 index f0d940bd34e..00000000000 --- a/jdk/src/demo/share/jvmti/waiters/README.txt +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -waiters - -This agent library can be used to track threads that wait on monitors. -This agent is written in C++. - -You can use this agent library as follows: - - java -agentlib:waiters ... - -To get help on the available options try: - - java -agentlib:waiters=help - -See ${JAVA_HOME}/demo/jvmti/index.html for help running and building agents. - diff --git a/jdk/src/demo/share/jvmti/waiters/Thread.cpp b/jdk/src/demo/share/jvmti/waiters/Thread.cpp deleted file mode 100644 index 589976963e0..00000000000 --- a/jdk/src/demo/share/jvmti/waiters/Thread.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -#ifdef STATIC_BUILD -#define Thread WaiterThread -#endif - -#include -#include -#include - -#include "jni.h" -#include "jvmti.h" - -#include "agent_util.h" - -#include "Thread.hpp" - -/* Implementation of the Thread class */ - -Thread::Thread(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) -{ - jvmtiError err; - jvmtiThreadInfo info; - - /* Get and save the name of the thread */ - info.name = NULL; - (void)strcpy(name, "Unknown"); - err = jvmti->GetThreadInfo(thread, &info); - check_jvmti_error(jvmti, err, "get thread info"); - if ( info.name != NULL ) { - (void)strncpy(name, info.name, (int)sizeof(name)-1); - name[(int)sizeof(name)-1] = 0; - deallocate(jvmti, info.name); - } - - /* Clear thread counters */ - contends = 0; - waits = 0; - timeouts = 0; -} - -Thread::~Thread() -{ - /* Send out summary message */ - stdout_message("Thread %s summary: %d waits plus %d contended\n", - name, waits, contends); -} - -void Thread::monitor_contended_enter(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object) -{ - contends++; -} - -void Thread::monitor_wait(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object, jlong timeout) -{ - waits++; -} - -void Thread::monitor_waited(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object, jboolean timed_out) -{ - if ( timed_out ) { - timeouts++; - } -} diff --git a/jdk/src/demo/share/jvmti/waiters/Thread.hpp b/jdk/src/demo/share/jvmti/waiters/Thread.hpp deleted file mode 100644 index 0ad661521e6..00000000000 --- a/jdk/src/demo/share/jvmti/waiters/Thread.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* C++ Thread class */ - -class Thread { - - private: - char name[64]; - unsigned contends; - unsigned waits; - unsigned timeouts; - - public: - Thread(jvmtiEnv *jvmti, JNIEnv *env, jthread thread); - ~Thread(); - void monitor_contended_enter(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object); - void monitor_wait(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object, jlong timeout); - void monitor_waited(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object, jboolean timed_out); - -}; diff --git a/jdk/src/demo/share/jvmti/waiters/sample.makefile.txt b/jdk/src/demo/share/jvmti/waiters/sample.makefile.txt deleted file mode 100644 index 51cbca4a395..00000000000 --- a/jdk/src/demo/share/jvmti/waiters/sample.makefile.txt +++ /dev/null @@ -1,149 +0,0 @@ -# -# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -######################################################################## -# -# Sample GNU Makefile for building JVMTI Demo waiters -# -# Example uses: -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparc] -# gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] -# gnumake JDK= OSNAME=linux [OPT=true] -# gnumake JDK= OSNAME=win32 [OPT=true] -# -######################################################################## - -# Source lists -LIBNAME=waiters -SOURCES=waiters.cpp Agent.cpp Thread.cpp Monitor.cpp ../agent_util/agent_util.c - -# Solaris Sun C Compiler Version 5.5 -ifeq ($(OSNAME), solaris) - # Tell gnumake which compilers to use - CC=cc - CXX=CC - # Sun Solaris Compiler options needed - COMMON_FLAGS=-mt -KPIC - # Check LIBARCH for any special compiler options - LIBARCH=$(shell uname -p) - ifeq ($(LIBARCH), sparc) - COMMON_FLAGS+=-xarch=v8 -xregs=no%appl - endif - ifeq ($(LIBARCH), sparcv9) - COMMON_FLAGS+=-xarch=v9 -xregs=no%appl - endif - ifeq ($(OPT), true) - CXXFLAGS=-xO2 $(COMMON_FLAGS) - else - CXXFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.cpp=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-z defs -ztext - # Libraries we are dependent on - LIBRARIES= -lc - # Building a shared library - LINK_SHARED=$(LINK.cc) -G -o $@ -endif - -# Linux GNU C Compiler -ifeq ($(OSNAME), linux) - # GNU Compiler options needed to build it - COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer - # Options that help find errors - COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses - ifeq ($(OPT), true) - CXXFLAGS=-O2 $(COMMON_FLAGS) - else - CXXFLAGS=-g $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.cpp=%.o) - # Library name and options needed to build it - LIBRARY=lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc - # Libraries we are dependent on - LIBRARIES= - # Building a shared library - LINK_SHARED=$(LINK.cc) -shared -o $@ -endif - -# Windows Microsoft C/C++ Optimizing Compiler Version 12 -ifeq ($(OSNAME), win32) - CC=cl - # Compiler options needed to build it - COMMON_FLAGS=-Gy -DWIN32 - # Options that help find errors - COMMON_FLAGS+=-W0 -WX - ifeq ($(OPT), true) - CXXFLAGS= -Ox -Op -Zi $(COMMON_FLAGS) - else - CXXFLAGS= -Od -Zi $(COMMON_FLAGS) - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.cpp=%.obj) - # Library name and options needed to build it - LIBRARY=$(LIBNAME).dll - LDFLAGS= - # Libraries we are dependent on - LIBRARIES= - # Building a shared library - LINK_SHARED=link -dll -out:$@ -endif - -# Common -I options -CXXFLAGS += -I. -CXXFLAGS += -I../agent_util -CXXFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - -# Default rule -all: $(LIBRARY) - -# Build native library -$(LIBRARY): $(OBJECTS) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - -# Cleanup the built bits -clean: - rm -f $(LIBRARY) $(OBJECTS) - -# Simple tester -test: all - LD_LIBRARY_PATH=`pwd` $(JDK)/bin/java -agentlib:$(LIBNAME) -version - -# Compilation rule only needed on Windows -ifeq ($(OSNAME), win32) -%.obj: %.cpp - $(COMPILE.cc) $< -endif - diff --git a/jdk/src/demo/share/jvmti/waiters/waiters.cpp b/jdk/src/demo/share/jvmti/waiters/waiters.cpp deleted file mode 100644 index cf38e00e160..00000000000 --- a/jdk/src/demo/share/jvmti/waiters/waiters.cpp +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* Example of using JVMTI events: - * JVMTI_EVENT_VM_INIT - * JVMTI_EVENT_VM_DEATH - * JVMTI_EVENT_THREAD_START - * JVMTI_EVENT_THREAD_END - * JVMTI_EVENT_MONITOR_CONTENDED_ENTER - * JVMTI_EVENT_MONITOR_WAIT - * JVMTI_EVENT_MONITOR_WAITED - * JVMTI_EVENT_OBJECT_FREE - */ - -#include -#include -#include - -#include "jni.h" -#include "jvmti.h" - -#include "agent_util.h" - -#include "Monitor.hpp" -#include "Thread.hpp" -#include "Agent.hpp" - -static jrawMonitorID vm_death_lock; -static jboolean vm_death_active; - -/* Given a jvmtiEnv*, return the C++ Agent class instance */ -static Agent * -get_agent(jvmtiEnv *jvmti) -{ - jvmtiError err; - Agent *agent; - - agent = NULL; - err = jvmti->GetEnvironmentLocalStorage((void**)&agent); - check_jvmti_error(jvmti, err, "get env local storage"); - if ( agent == NULL ) { - /* This should never happen, but we should check */ - fatal_error("ERROR: GetEnvironmentLocalStorage() returned NULL"); - } - return agent; -} - -/* Enter raw monitor */ -static void -menter(jvmtiEnv *jvmti, jrawMonitorID rmon) -{ - jvmtiError err; - - err = jvmti->RawMonitorEnter(rmon); - check_jvmti_error(jvmti, err, "raw monitor enter"); -} - -/* Exit raw monitor */ -static void -mexit(jvmtiEnv *jvmti, jrawMonitorID rmon) -{ - jvmtiError err; - - err = jvmti->RawMonitorExit(rmon); - check_jvmti_error(jvmti, err, "raw monitor exit"); -} - - -/* All callbacks need to be extern "C" */ -extern "C" { - static void JNICALL - vm_init(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) - { - jvmtiError err; - Agent *agent; - - /* Create raw monitor to protect against threads running after death */ - err = jvmti->CreateRawMonitor("Waiters vm_death lock", &vm_death_lock); - check_jvmti_error(jvmti, err, "create raw monitor"); - vm_death_active = JNI_FALSE; - - /* Create an Agent instance, set JVMTI Local Storage */ - agent = new Agent(jvmti, env, thread); - err = jvmti->SetEnvironmentLocalStorage((const void*)agent); - check_jvmti_error(jvmti, err, "set env local storage"); - - /* Enable all other events we want */ - err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, - JVMTI_EVENT_VM_DEATH, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, - JVMTI_EVENT_THREAD_START, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, - JVMTI_EVENT_THREAD_END, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, - JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, - JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, - JVMTI_EVENT_MONITOR_WAIT, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, - JVMTI_EVENT_MONITOR_WAITED, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, - JVMTI_EVENT_OBJECT_FREE, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - } - static void JNICALL - vm_death(jvmtiEnv *jvmti, JNIEnv *env) - { - jvmtiError err; - Agent *agent; - - /* Block all callbacks */ - menter(jvmti, vm_death_lock); { - /* Set flag for other callbacks */ - vm_death_active = JNI_TRUE; - - /* Inform Agent instance of VM_DEATH */ - agent = get_agent(jvmti); - agent->vm_death(jvmti, env); - - /* Reclaim space of Agent */ - err = jvmti->SetEnvironmentLocalStorage((const void*)NULL); - check_jvmti_error(jvmti, err, "set env local storage"); - delete agent; - } mexit(jvmti, vm_death_lock); - - } - static void JNICALL - thread_start(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) - { - menter(jvmti, vm_death_lock); { - if ( !vm_death_active ) { - get_agent(jvmti)->thread_start(jvmti, env, thread); - } - } mexit(jvmti, vm_death_lock); - } - static void JNICALL - thread_end(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) - { - menter(jvmti, vm_death_lock); { - if ( !vm_death_active ) { - get_agent(jvmti)->thread_end(jvmti, env, thread); - } - } mexit(jvmti, vm_death_lock); - } - static void JNICALL - monitor_contended_enter(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object) - { - menter(jvmti, vm_death_lock); { - if ( !vm_death_active ) { - get_agent(jvmti)->monitor_contended_enter(jvmti, env, - thread, object); - } - } mexit(jvmti, vm_death_lock); - } - static void JNICALL - monitor_contended_entered(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object) - { - menter(jvmti, vm_death_lock); { - if ( !vm_death_active ) { - get_agent(jvmti)->monitor_contended_entered(jvmti, env, - thread, object); - } - } mexit(jvmti, vm_death_lock); - } - static void JNICALL - monitor_wait(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object, jlong timeout) - { - menter(jvmti, vm_death_lock); { - if ( !vm_death_active ) { - get_agent(jvmti)->monitor_wait(jvmti, env, thread, - object, timeout); - } - } mexit(jvmti, vm_death_lock); - } - static void JNICALL - monitor_waited(jvmtiEnv* jvmti, JNIEnv *env, - jthread thread, jobject object, jboolean timed_out) - { - menter(jvmti, vm_death_lock); { - if ( !vm_death_active ) { - get_agent(jvmti)->monitor_waited(jvmti, env, thread, - object, timed_out); - } - } mexit(jvmti, vm_death_lock); - } - static void JNICALL - object_free(jvmtiEnv* jvmti, jlong tag) - { - menter(jvmti, vm_death_lock); { - if ( !vm_death_active ) { - get_agent(jvmti)->object_free(jvmti, tag); - } - } mexit(jvmti, vm_death_lock); - } - - /* Agent_OnLoad() is called first, we prepare for a VM_INIT event here. */ - JNIEXPORT jint JNICALL - DEF_Agent_OnLoad(JavaVM *vm, char *options, void *reserved) - { - jvmtiEnv *jvmti; - jint rc; - jvmtiError err; - jvmtiCapabilities capabilities; - jvmtiEventCallbacks callbacks; - - /* Get JVMTI environment */ - rc = vm->GetEnv((void **)&jvmti, JVMTI_VERSION); - if (rc != JNI_OK) { - fatal_error("ERROR: Unable to create jvmtiEnv, GetEnv failed, error=%d\n", rc); - return -1; - } - - /* Get/Add JVMTI capabilities */ - (void)memset(&capabilities, 0, sizeof(capabilities)); - capabilities.can_generate_monitor_events = 1; - capabilities.can_get_monitor_info = 1; - capabilities.can_tag_objects = 1; - capabilities.can_generate_object_free_events = 1; - err = jvmti->AddCapabilities(&capabilities); - check_jvmti_error(jvmti, err, "add capabilities"); - - /* Set all callbacks and enable VM_INIT event notification */ - memset(&callbacks, 0, sizeof(callbacks)); - callbacks.VMInit = &vm_init; - callbacks.VMDeath = &vm_death; - callbacks.ThreadStart = &thread_start; - callbacks.ThreadEnd = &thread_end; - callbacks.MonitorContendedEnter = &monitor_contended_enter; - callbacks.MonitorContendedEntered = &monitor_contended_entered; - callbacks.MonitorWait = &monitor_wait; - callbacks.MonitorWaited = &monitor_waited; - callbacks.ObjectFree = &object_free; - err = jvmti->SetEventCallbacks(&callbacks, (jint)sizeof(callbacks)); - check_jvmti_error(jvmti, err, "set event callbacks"); - err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, - JVMTI_EVENT_VM_INIT, NULL); - check_jvmti_error(jvmti, err, "set event notify"); - return 0; - } - - /* Agent_OnUnload() is called last */ - JNIEXPORT void JNICALL - DEF_Agent_OnUnload(JavaVM *vm) - { - } - -} /* of extern "C" */ diff --git a/jdk/src/demo/share/management/FullThreadDump/Deadlock.java b/jdk/src/demo/share/management/FullThreadDump/Deadlock.java deleted file mode 100644 index 85668ee50da..00000000000 --- a/jdk/src/demo/share/management/FullThreadDump/Deadlock.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - */ - -import java.util.concurrent.CyclicBarrier; -import java.util.concurrent.BrokenBarrierException; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; -import java.io.IOException; - -/** - * This Deadlock class demonstrates the capability of performing - * deadlock detection programmatically within the application using - * the java.lang.management API. - * - * See ThreadMonitor.java for the use of java.lang.management.ThreadMXBean - * API. - */ -public class Deadlock { - public static void main(String[] argv) { - new Deadlock(); - - // Now find deadlock - ThreadMonitor monitor = new ThreadMonitor(); - boolean found = false; - while (!found) { - found = monitor.findDeadlock(); - try { - Thread.sleep(500); - } catch (InterruptedException e) { - System.exit(1); - } - } - - System.out.println("\nPress to exit this Deadlock program.\n"); - waitForEnterPressed(); - } - - - private CyclicBarrier barrier = new CyclicBarrier(6); - public Deadlock() { - DeadlockThread[] dThreads = new DeadlockThread[6]; - - Monitor a = new Monitor("a"); - Monitor b = new Monitor("b"); - Monitor c = new Monitor("c"); - dThreads[0] = new DeadlockThread("MThread-1", a, b); - dThreads[1] = new DeadlockThread("MThread-2", b, c); - dThreads[2] = new DeadlockThread("MThread-3", c, a); - - Lock d = new ReentrantLock(); - Lock e = new ReentrantLock(); - Lock f = new ReentrantLock(); - - dThreads[3] = new DeadlockThread("SThread-4", d, e); - dThreads[4] = new DeadlockThread("SThread-5", e, f); - dThreads[5] = new DeadlockThread("SThread-6", f, d); - - // make them daemon threads so that the test will exit - for (int i = 0; i < 6; i++) { - dThreads[i].setDaemon(true); - dThreads[i].start(); - } - } - - class DeadlockThread extends Thread { - private Lock lock1 = null; - private Lock lock2 = null; - private Monitor mon1 = null; - private Monitor mon2 = null; - private boolean useSync; - - DeadlockThread(String name, Lock lock1, Lock lock2) { - super(name); - this.lock1 = lock1; - this.lock2 = lock2; - this.useSync = true; - } - DeadlockThread(String name, Monitor mon1, Monitor mon2) { - super(name); - this.mon1 = mon1; - this.mon2 = mon2; - this.useSync = false; - } - @Override - public void run() { - if (useSync) { - syncLock(); - } else { - monitorLock(); - } - } - private void syncLock() { - lock1.lock(); - try { - try { - barrier.await(); - } catch (InterruptedException e) { - e.printStackTrace(); - System.exit(1); - } catch (BrokenBarrierException e) { - e.printStackTrace(); - System.exit(1); - } - goSyncDeadlock(); - } finally { - lock1.unlock(); - } - } - private void goSyncDeadlock() { - try { - barrier.await(); - } catch (InterruptedException e) { - e.printStackTrace(); - System.exit(1); - } catch (BrokenBarrierException e) { - e.printStackTrace(); - System.exit(1); - } - lock2.lock(); - throw new RuntimeException("should not reach here."); - } - private void monitorLock() { - synchronized (mon1) { - try { - barrier.await(); - } catch (InterruptedException e) { - e.printStackTrace(); - System.exit(1); - } catch (BrokenBarrierException e) { - e.printStackTrace(); - System.exit(1); - } - goMonitorDeadlock(); - } - } - private void goMonitorDeadlock() { - try { - barrier.await(); - } catch (InterruptedException e) { - e.printStackTrace(); - System.exit(1); - } catch (BrokenBarrierException e) { - e.printStackTrace(); - System.exit(1); - } - synchronized (mon2) { - throw new RuntimeException(getName() + " should not reach here."); - } - } - } - - class Monitor { - String name; - Monitor(String name) { - this.name = name; - } - } - - private static void waitForEnterPressed() { - try { - boolean done = false; - while (!done) { - char ch = (char) System.in.read(); - if (ch<0||ch=='\n') { - done = true; - } - } - } - catch (IOException e) { - e.printStackTrace(); - System.exit(0); - } - } -} diff --git a/jdk/src/demo/share/management/FullThreadDump/FullThreadDump.java b/jdk/src/demo/share/management/FullThreadDump/FullThreadDump.java deleted file mode 100644 index ba46eeb828c..00000000000 --- a/jdk/src/demo/share/management/FullThreadDump/FullThreadDump.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - */ - -import javax.management.*; -import javax.management.remote.*; -import java.io.IOException; -import java.net.MalformedURLException; - -/** - * This FullThreadDump class demonstrates the capability to get - * a full thread dump and also detect deadlock remotely. - */ -public class FullThreadDump { - private MBeanServerConnection server; - private JMXConnector jmxc; - public FullThreadDump(String hostname, int port) { - System.out.println("Connecting to " + hostname + ":" + port); - - // Create an RMI connector client and connect it to - // the RMI connector server - String urlPath = "/jndi/rmi://" + hostname + ":" + port + "/jmxrmi"; - connect(urlPath); - } - - public void dump() { - try { - ThreadMonitor monitor = new ThreadMonitor(server); - monitor.threadDump(); - if (!monitor.findDeadlock()) { - System.out.println("No deadlock found."); - } - } catch (IOException e) { - System.err.println("\nCommunication error: " + e.getMessage()); - System.exit(1); - } - } - - /** - * Connect to a JMX agent of a given URL. - */ - private void connect(String urlPath) { - try { - JMXServiceURL url = new JMXServiceURL("rmi", "", 0, urlPath); - this.jmxc = JMXConnectorFactory.connect(url); - this.server = jmxc.getMBeanServerConnection(); - } catch (MalformedURLException e) { - // should not reach here - } catch (IOException e) { - System.err.println("\nCommunication error: " + e.getMessage()); - System.exit(1); - } - } - - public static void main(String[] args) { - if (args.length != 1) { - usage(); - } - - String[] arg2 = args[0].split(":"); - if (arg2.length != 2) { - usage(); - } - String hostname = arg2[0]; - int port = -1; - try { - port = Integer.parseInt(arg2[1]); - } catch (NumberFormatException x) { - usage(); - } - if (port < 0) { - usage(); - } - - // get full thread dump and perform deadlock detection - FullThreadDump ftd = new FullThreadDump(hostname, port); - ftd.dump(); - } - - private static void usage() { - System.out.println("Usage: java FullThreadDump :"); - } -} diff --git a/jdk/src/demo/share/management/FullThreadDump/README.txt b/jdk/src/demo/share/management/FullThreadDump/README.txt deleted file mode 100644 index 1571fb86596..00000000000 --- a/jdk/src/demo/share/management/FullThreadDump/README.txt +++ /dev/null @@ -1,52 +0,0 @@ -FullThreadDump demonstrates the use of the java.lang.management API -to print the full thread dump. JDK 6 defines a new API to dump -the information about monitors and java.util.concurrent ownable -synchronizers. - -This demo also illustrates how to monitor JDK 5 and JDK 6 VMs with -two versions of APIs. - -It contains two parts: -a) Local monitoring within the application -b) Remote monitoring by connecting to a JMX agent with a JMX service URL: - service:jmx:rmi:///jndi/rmi://:/jmxrmi - where is the hostname and is the port number - to which the JMX agent will be connected. - -To run the demo ---------------- -a) Local Monitoring - - java -cp /demo/management/FullThreadDump/FullThreadDump.jar Deadlock - - This will dump the stack trace and then detect deadlocks locally - within the application. - -b) Remote Monitoring - - (1) Start the Deadlock application (or any other application) - with the JMX agent as follows: - - java -Dcom.sun.management.jmxremote.port=1090 - -Dcom.sun.management.jmxremote.ssl=false - -Dcom.sun.management.jmxremote.authenticate=false - -cp /demo/management/FullThreadDump/FullThreadDump.jar - Deadlock - - This instruction uses the Sun's built-in support to enable a JMX agent. - You can programmatically start a JMX agent with the RMI connector - using javax.management.remote API. See the javadoc and examples for - javax.management.remote API for details. - - (2) Run FullThreadDump - - java -jar /demo/management/FullThreadDump/FullThreadDump.jar \ - localhost:1090 - - This will dump the stack trace and then print out the deadlocked threads. - -These instructions assume that this installation's version of the java -command is in your path. If it isn't, then you should either -specify the complete path to the java command or update your -PATH environment variable as described in the installation -instructions for the Java(TM) SDK. diff --git a/jdk/src/demo/share/management/FullThreadDump/ThreadMonitor.java b/jdk/src/demo/share/management/FullThreadDump/ThreadMonitor.java deleted file mode 100644 index 05846e7c182..00000000000 --- a/jdk/src/demo/share/management/FullThreadDump/ThreadMonitor.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - */ - -import static java.lang.management.ManagementFactory.*; -import java.lang.management.ThreadMXBean; -import java.lang.management.ThreadInfo; -import java.lang.management.LockInfo; -import java.lang.management.MonitorInfo; -import javax.management.*; -import java.io.*; - -/** - * Example of using the java.lang.management API to dump stack trace - * and to perform deadlock detection. - * - * @author Mandy Chung - */ -public class ThreadMonitor { - private MBeanServerConnection server; - private ThreadMXBean tmbean; - private ObjectName objname; - - // default - JDK 6+ VM - private String findDeadlocksMethodName = "findDeadlockedThreads"; - private boolean canDumpLocks = true; - - /** - * Constructs a ThreadMonitor object to get thread information - * in a remote JVM. - */ - public ThreadMonitor(MBeanServerConnection server) throws IOException { - this.server = server; - this.tmbean = newPlatformMXBeanProxy(server, - THREAD_MXBEAN_NAME, - ThreadMXBean.class); - try { - objname = new ObjectName(THREAD_MXBEAN_NAME); - } catch (MalformedObjectNameException e) { - // should not reach here - InternalError ie = new InternalError(e.getMessage()); - ie.initCause(e); - throw ie; - } - parseMBeanInfo(); - } - - /** - * Constructs a ThreadMonitor object to get thread information - * in the local JVM. - */ - public ThreadMonitor() { - this.tmbean = getThreadMXBean(); - } - - /** - * Prints the thread dump information to System.out. - */ - public void threadDump() { - if (canDumpLocks) { - if (tmbean.isObjectMonitorUsageSupported() && - tmbean.isSynchronizerUsageSupported()) { - // Print lock info if both object monitor usage - // and synchronizer usage are supported. - // This sample code can be modified to handle if - // either monitor usage or synchronizer usage is supported. - dumpThreadInfoWithLocks(); - } - } else { - dumpThreadInfo(); - } - } - - private void dumpThreadInfo() { - System.out.println("Full Java thread dump"); - long[] tids = tmbean.getAllThreadIds(); - ThreadInfo[] tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE); - for (ThreadInfo ti : tinfos) { - printThreadInfo(ti); - } - } - - /** - * Prints the thread dump information with locks info to System.out. - */ - private void dumpThreadInfoWithLocks() { - System.out.println("Full Java thread dump with locks info"); - - ThreadInfo[] tinfos = tmbean.dumpAllThreads(true, true); - for (ThreadInfo ti : tinfos) { - printThreadInfo(ti); - LockInfo[] syncs = ti.getLockedSynchronizers(); - printLockInfo(syncs); - } - System.out.println(); - } - - private static String INDENT = " "; - - private void printThreadInfo(ThreadInfo ti) { - // print thread information - printThread(ti); - - // print stack trace with locks - StackTraceElement[] stacktrace = ti.getStackTrace(); - MonitorInfo[] monitors = ti.getLockedMonitors(); - for (int i = 0; i < stacktrace.length; i++) { - StackTraceElement ste = stacktrace[i]; - System.out.println(INDENT + "at " + ste.toString()); - for (MonitorInfo mi : monitors) { - if (mi.getLockedStackDepth() == i) { - System.out.println(INDENT + " - locked " + mi); - } - } - } - System.out.println(); - } - - private void printThread(ThreadInfo ti) { - StringBuilder sb = new StringBuilder("\"" + ti.getThreadName() + "\"" + - " Id=" + ti.getThreadId() + - " in " + ti.getThreadState()); - if (ti.getLockName() != null) { - sb.append(" on lock=" + ti.getLockName()); - } - if (ti.isSuspended()) { - sb.append(" (suspended)"); - } - if (ti.isInNative()) { - sb.append(" (running in native)"); - } - System.out.println(sb.toString()); - if (ti.getLockOwnerName() != null) { - System.out.println(INDENT + " owned by " + ti.getLockOwnerName() + - " Id=" + ti.getLockOwnerId()); - } - } - - private void printMonitorInfo(ThreadInfo ti) { - MonitorInfo[] monitors = ti.getLockedMonitors(); - System.out.println(INDENT + "Locked monitors: count = " + monitors.length); - for (MonitorInfo mi : monitors) { - System.out.println(INDENT + " - " + mi + " locked at "); - System.out.println(INDENT + " " + mi.getLockedStackDepth() + - " " + mi.getLockedStackFrame()); - } - } - - private void printLockInfo(LockInfo[] locks) { - System.out.println(INDENT + "Locked synchronizers: count = " + locks.length); - for (LockInfo li : locks) { - System.out.println(INDENT + " - " + li); - } - System.out.println(); - } - - /** - * Checks if any threads are deadlocked. If any, print - * the thread dump information. - */ - public boolean findDeadlock() { - long[] tids; - if (findDeadlocksMethodName.equals("findDeadlockedThreads") && - tmbean.isSynchronizerUsageSupported()) { - tids = tmbean.findDeadlockedThreads(); - if (tids == null) { - return false; - } - - System.out.println("Deadlock found :-"); - ThreadInfo[] infos = tmbean.getThreadInfo(tids, true, true); - for (ThreadInfo ti : infos) { - printThreadInfo(ti); - printMonitorInfo(ti); - printLockInfo(ti.getLockedSynchronizers()); - System.out.println(); - } - } else { - tids = tmbean.findMonitorDeadlockedThreads(); - if (tids == null) { - return false; - } - ThreadInfo[] infos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE); - for (ThreadInfo ti : infos) { - // print thread information - printThreadInfo(ti); - } - } - - return true; - } - - - private void parseMBeanInfo() throws IOException { - try { - MBeanOperationInfo[] mopis = server.getMBeanInfo(objname).getOperations(); - - // look for findDeadlockedThreads operations; - boolean found = false; - for (MBeanOperationInfo op : mopis) { - if (op.getName().equals(findDeadlocksMethodName)) { - found = true; - break; - } - } - if (!found) { - // if findDeadlockedThreads operation doesn't exist, - // the target VM is running on JDK 5 and details about - // synchronizers and locks cannot be dumped. - findDeadlocksMethodName = "findMonitorDeadlockedThreads"; - canDumpLocks = false; - } - } catch (IntrospectionException e) { - InternalError ie = new InternalError(e.getMessage()); - ie.initCause(e); - throw ie; - } catch (InstanceNotFoundException e) { - InternalError ie = new InternalError(e.getMessage()); - ie.initCause(e); - throw ie; - } catch (ReflectionException e) { - InternalError ie = new InternalError(e.getMessage()); - ie.initCause(e); - throw ie; - } - } -} diff --git a/jdk/src/demo/share/management/JTop/JTop.java b/jdk/src/demo/share/management/JTop/JTop.java deleted file mode 100644 index c1d48cc3716..00000000000 --- a/jdk/src/demo/share/management/JTop/JTop.java +++ /dev/null @@ -1,427 +0,0 @@ -/* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - * - * Example of using the java.lang.management API to sort threads - * by CPU usage. - * - * JTop class can be run as a standalone application. - * It first establishs a connection to a target VM specified - * by the given hostname and port number where the JMX agent - * to be connected. It then polls for the thread information - * and the CPU consumption of each thread to display every 2 - * seconds. - * - * It is also used by JTopPlugin which is a JConsolePlugin - * that can be used with JConsole (see README.txt). The JTop - * GUI will be added as a JConsole tab by the JTop plugin. - * - * @see com.sun.tools.jconsole.JConsolePlugin - * - * @author Mandy Chung - */ -import java.lang.management.*; -import javax.management.*; -import javax.management.remote.*; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.SortedMap; -import java.util.Timer; -import java.util.TimerTask; -import java.util.TreeMap; -import java.util.concurrent.ExecutionException; -import java.text.NumberFormat; -import java.net.MalformedURLException; -import static java.lang.management.ManagementFactory.*; - -import java.awt.*; -import javax.swing.*; -import javax.swing.border.*; -import javax.swing.table.*; - -/** - * JTop is a JPanel to display thread's name, CPU time, and its state - * in a table. - */ -public class JTop extends JPanel { - - private static class StatusBar extends JPanel { - private static final long serialVersionUID = -6483392381797633018L; - private final JLabel statusText; - - public StatusBar(boolean defaultVisible) { - super(new GridLayout(1, 1)); - statusText = new JLabel(); - statusText.setVisible(defaultVisible); - add(statusText); - } - - @Override - public Dimension getMaximumSize() { - Dimension maximum = super.getMaximumSize(); - Dimension minimum = getMinimumSize(); - return new Dimension(maximum.width, minimum.height); - } - - public void setMessage(String text) { - statusText.setText(text); - statusText.setVisible(true); - } - } - private static final long serialVersionUID = -1499762160973870696L; - private MBeanServerConnection server; - private ThreadMXBean tmbean; - private MyTableModel tmodel; - private final StatusBar statusBar; - public JTop() { - super(new GridBagLayout()); - - tmodel = new MyTableModel(); - JTable table = new JTable(tmodel); - table.setPreferredScrollableViewportSize(new Dimension(500, 300)); - - // Set the renderer to format Double - table.setDefaultRenderer(Double.class, new DoubleRenderer()); - // Add some space - table.setIntercellSpacing(new Dimension(6,3)); - table.setRowHeight(table.getRowHeight() + 4); - - // Create the scroll pane and add the table to it. - JScrollPane scrollPane = new JScrollPane(table); - - // Add the scroll pane to this panel. - GridBagConstraints c1 = new GridBagConstraints(); - c1.fill = GridBagConstraints.BOTH; - c1.gridy = 0; - c1.gridx = 0; - c1.weightx = 1; - c1.weighty = 1; - add(scrollPane, c1); - - statusBar = new StatusBar(false); - GridBagConstraints c2 = new GridBagConstraints(); - c2.fill = GridBagConstraints.HORIZONTAL; - c2.gridy = 1; - c2.gridx = 0; - c2.weightx = 1.0; - c2.weighty = 0.0; - add(statusBar, c2); - } - - // Set the MBeanServerConnection object for communicating - // with the target VM - public void setMBeanServerConnection(MBeanServerConnection mbs) { - this.server = mbs; - try { - this.tmbean = newPlatformMXBeanProxy(server, - THREAD_MXBEAN_NAME, - ThreadMXBean.class); - } catch (IOException e) { - e.printStackTrace(); - } - if (!tmbean.isThreadCpuTimeSupported()) { - statusBar.setMessage("Monitored VM does not support thread CPU time measurement"); - } else { - try { - tmbean.setThreadCpuTimeEnabled(true); - } catch (SecurityException e) { - statusBar.setMessage("Monitored VM does not have permission for enabling thread cpu time measurement"); - } - } - } - - class MyTableModel extends AbstractTableModel { - private static final long serialVersionUID = -7877310288576779514L; - private String[] columnNames = {"ThreadName", - "CPU(sec)", - "State"}; - // List of all threads. The key of each entry is the CPU time - // and its value is the ThreadInfo object with no stack trace. - private List> threadList = - Collections.emptyList(); - - public MyTableModel() { - } - - @Override - public int getColumnCount() { - return columnNames.length; - } - - @Override - public int getRowCount() { - return threadList.size(); - } - - @Override - public String getColumnName(int col) { - return columnNames[col]; - } - - @Override - public Object getValueAt(int row, int col) { - Map.Entry me = threadList.get(row); - switch (col) { - case 0 : - // Column 0 shows the thread name - return me.getValue().getThreadName(); - case 1 : - // Column 1 shows the CPU usage - long ns = me.getKey().longValue(); - double sec = ns / 1000000000; - return new Double(sec); - case 2 : - // Column 2 shows the thread state - return me.getValue().getThreadState(); - default: - return null; - } - } - - @Override - public Class getColumnClass(int c) { - return getValueAt(0, c).getClass(); - } - - void setThreadList(List> list) { - threadList = list; - } - } - - /** - * Get the thread list with CPU consumption and the ThreadInfo - * for each thread sorted by the CPU time. - */ - private List> getThreadList() { - // Get all threads and their ThreadInfo objects - // with no stack trace - long[] tids = tmbean.getAllThreadIds(); - ThreadInfo[] tinfos = tmbean.getThreadInfo(tids); - - // build a map with key = CPU time and value = ThreadInfo - SortedMap map = new TreeMap(); - for (int i = 0; i < tids.length; i++) { - long cpuTime = tmbean.getThreadCpuTime(tids[i]); - // filter out threads that have been terminated - if (cpuTime != -1 && tinfos[i] != null) { - map.put(new Long(cpuTime), tinfos[i]); - } - } - - // build the thread list and sort it with CPU time - // in decreasing order - Set> set = map.entrySet(); - List> list = - new ArrayList>(set); - Collections.reverse(list); - return list; - } - - - /** - * Format Double with 4 fraction digits - */ - class DoubleRenderer extends DefaultTableCellRenderer { - private static final long serialVersionUID = 1704639497162584382L; - NumberFormat formatter; - public DoubleRenderer() { - super(); - setHorizontalAlignment(JLabel.RIGHT); - } - - @Override - public void setValue(Object value) { - if (formatter==null) { - formatter = NumberFormat.getInstance(); - formatter.setMinimumFractionDigits(4); - } - setText((value == null) ? "" : formatter.format(value)); - } - } - - // SwingWorker responsible for updating the GUI - // - // It first gets the thread and CPU usage information as a - // background task done by a worker thread so that - // it will not block the event dispatcher thread. - // - // When the worker thread finishes, the event dispatcher - // thread will invoke the done() method which will update - // the UI. - class Worker extends SwingWorker>,Object> { - private MyTableModel tmodel; - Worker(MyTableModel tmodel) { - this.tmodel = tmodel; - } - - // Get the current thread info and CPU time - @Override - public List> doInBackground() { - return getThreadList(); - } - - // fire table data changed to trigger GUI update - // when doInBackground() is finished - @Override - protected void done() { - try { - // Set table model with the new thread list - tmodel.setThreadList(get()); - // refresh the table model - tmodel.fireTableDataChanged(); - } catch (InterruptedException e) { - } catch (ExecutionException e) { - } - } - } - - // Return a new SwingWorker for UI update - public SwingWorker newSwingWorker() { - return new Worker(tmodel); - } - - public static void main(String[] args) throws Exception { - // Validate the input arguments - if (args.length != 1) { - usage(); - } - - String[] arg2 = args[0].split(":"); - if (arg2.length != 2) { - usage(); - } - String hostname = arg2[0]; - int port = -1; - try { - port = Integer.parseInt(arg2[1]); - } catch (NumberFormatException x) { - usage(); - } - if (port < 0) { - usage(); - } - - // Create the JTop Panel - final JTop jtop = new JTop(); - // Set up the MBeanServerConnection to the target VM - MBeanServerConnection server = connect(hostname, port); - jtop.setMBeanServerConnection(server); - - // A timer task to update GUI per each interval - TimerTask timerTask = new TimerTask() { - @Override - public void run() { - // Schedule the SwingWorker to update the GUI - jtop.newSwingWorker().execute(); - } - }; - - // Create the standalone window with JTop panel - // by the event dispatcher thread - SwingUtilities.invokeAndWait(new Runnable() { - @Override - public void run() { - createAndShowGUI(jtop); - } - }); - - // refresh every 2 seconds - Timer timer = new Timer("JTop Sampling thread"); - timer.schedule(timerTask, 0, 2000); - - } - - // Establish a connection with the remote application - // - // You can modify the urlPath to the address of the JMX agent - // of your application if it has a different URL. - // - // You can also modify the following code to take - // username and password for client authentication. - private static MBeanServerConnection connect(String hostname, int port) { - // Create an RMI connector client and connect it to - // the RMI connector server - String urlPath = "/jndi/rmi://" + hostname + ":" + port + "/jmxrmi"; - MBeanServerConnection server = null; - try { - JMXServiceURL url = new JMXServiceURL("rmi", "", 0, urlPath); - JMXConnector jmxc = JMXConnectorFactory.connect(url); - server = jmxc.getMBeanServerConnection(); - } catch (MalformedURLException e) { - // should not reach here - } catch (IOException e) { - System.err.println("\nCommunication error: " + e.getMessage()); - System.exit(1); - } - return server; - } - - private static void usage() { - System.out.println("Usage: java JTop :"); - System.exit(1); - } - /** - * Create the GUI and show it. For thread safety, - * this method should be invoked from the - * event-dispatching thread. - */ - private static void createAndShowGUI(JPanel jtop) { - // Create and set up the window. - JFrame frame = new JFrame("JTop"); - frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); - - // Create and set up the content pane. - JComponent contentPane = (JComponent) frame.getContentPane(); - contentPane.add(jtop, BorderLayout.CENTER); - contentPane.setOpaque(true); //content panes must be opaque - contentPane.setBorder(new EmptyBorder(12, 12, 12, 12)); - frame.setContentPane(contentPane); - - // Display the window. - frame.pack(); - frame.setVisible(true); - } - -} diff --git a/jdk/src/demo/share/management/JTop/JTopPlugin.java b/jdk/src/demo/share/management/JTop/JTopPlugin.java deleted file mode 100644 index 785bb328db4..00000000000 --- a/jdk/src/demo/share/management/JTop/JTopPlugin.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - * - * Example of a JConsole Plugin. This loads JTop as a JConsole tab. - * - * @author Mandy Chung - */ - -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.util.LinkedHashMap; -import java.util.Map; - -import javax.swing.JPanel; -import javax.swing.SwingWorker; - -import com.sun.tools.jconsole.JConsoleContext; -import com.sun.tools.jconsole.JConsoleContext.ConnectionState; -import com.sun.tools.jconsole.JConsolePlugin; - -/** - * JTopPlugin is a subclass to com.sun.tools.jconsole.JConsolePlugin - * - * JTopPlugin is loaded and instantiated by JConsole. One instance - * is created for each window that JConsole creates. It listens to - * the connected property change so that it will update JTop with - * the valid MBeanServerConnection object. JTop is a JPanel object - * displaying the thread and its CPU usage information. - */ -public class JTopPlugin extends JConsolePlugin implements PropertyChangeListener -{ - private JTop jtop = null; - private Map tabs = null; - - public JTopPlugin() { - // register itself as a listener - addContextPropertyChangeListener(this); - } - - /* - * Returns a JTop tab to be added in JConsole. - */ - @Override - public synchronized Map getTabs() { - if (tabs == null) { - jtop = new JTop(); - jtop.setMBeanServerConnection( - getContext().getMBeanServerConnection()); - // use LinkedHashMap if you want a predictable order - // of the tabs to be added in JConsole - tabs = new LinkedHashMap(); - tabs.put("JTop", jtop); - } - return tabs; - } - - /* - * Returns a SwingWorker which is responsible for updating the JTop tab. - */ - @Override - public SwingWorker newSwingWorker() { - return jtop.newSwingWorker(); - } - - // You can implement the dispose() method if you need to release - // any resource when the plugin instance is disposed when the JConsole - // window is closed. - // - // public void dispose() { - // } - - /* - * Property listener to reset the MBeanServerConnection - * at reconnection time. - */ - @Override - public void propertyChange(PropertyChangeEvent ev) { - String prop = ev.getPropertyName(); - if (prop == JConsoleContext.CONNECTION_STATE_PROPERTY) { - ConnectionState newState = (ConnectionState)ev.getNewValue(); - // JConsole supports disconnection and reconnection - // The MBeanServerConnection will become invalid when - // disconnected. Need to use the new MBeanServerConnection object - // created at reconnection time. - if (newState == ConnectionState.CONNECTED && jtop != null) { - jtop.setMBeanServerConnection( - getContext().getMBeanServerConnection()); - } - } - } -} diff --git a/jdk/src/demo/share/management/JTop/META-INF/services/com.sun.tools.jconsole.JConsolePlugin b/jdk/src/demo/share/management/JTop/META-INF/services/com.sun.tools.jconsole.JConsolePlugin deleted file mode 100644 index 11aa2aea385..00000000000 --- a/jdk/src/demo/share/management/JTop/META-INF/services/com.sun.tools.jconsole.JConsolePlugin +++ /dev/null @@ -1 +0,0 @@ -JTopPlugin diff --git a/jdk/src/demo/share/management/JTop/README.txt b/jdk/src/demo/share/management/JTop/README.txt deleted file mode 100644 index b2d3ae43c04..00000000000 --- a/jdk/src/demo/share/management/JTop/README.txt +++ /dev/null @@ -1,61 +0,0 @@ -JTop monitors the CPU usage of all threads in a remote application -which has remote management enabled. JTop demonstrates the use of -the java.lang.management API to obtain the CPU consumption for -each thread. - -JTop is also a JConsole Plugin. See below for details. - -JTop Standalone GUI -=================== - -JTop first establishes a connection to a JMX agent in a remote -application with a JMX service URL: - service:jmx:rmi:///jndi/rmi://:/jmxrmi - -where is the hostname and is the port number -to which the JMX agent will be connected. - -To run the demo ---------------- -(1) Start the application with the JMX agent - here's an example of - how the Java2D is started - - java -Dcom.sun.management.jmxremote.port=1090 - -Dcom.sun.management.jmxremote.ssl=false - -Dcom.sun.management.jmxremote.authenticate=false - -jar /demo/jfc/Java2D/Java2Demo.jar - - This instruction uses the Sun's built-in support to enable a JMX agent - with a JMX service URL as described above. - You can programmatically start a JMX agent with the RMI connector - using javax.management.remote API. See the javadoc and examples for - javax.management.remote API for details. - -(2) Run JTop on a different machine: - - java -jar /demo/management/JTop/JTop.jar :1090 - - where is where the Java2Demo.jar runs in step (1). - -These instructions assume that this installation's version of the java -command is in your path. If it isn't, then you should either -specify the complete path to the java command or update your -PATH environment variable as described in the installation -instructions for the Java(TM) SDK. - -JTop JConsole Plugin -==================== - -JTop is a JConsole Plugin which adds a "JTop" tab to JConsole. - -To run JConsole with the JTop plugin ------------------------------------- - jconsole -pluginpath /demo/management/JTop/JTop.jar - - -To compile ----------- - javac -classpath /lib/jconsole.jar JTopPlugin.java - -com.sun.tools.jconsole API is in jconsole.jar which is needed -in the classpath for compilation. diff --git a/jdk/src/demo/share/management/MemoryMonitor/MemoryMonitor.java b/jdk/src/demo/share/management/MemoryMonitor/MemoryMonitor.java deleted file mode 100644 index 3d2769b917a..00000000000 --- a/jdk/src/demo/share/management/MemoryMonitor/MemoryMonitor.java +++ /dev/null @@ -1,491 +0,0 @@ -/* - * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - */ - -import java.awt.*; -import java.awt.event.*; -import java.awt.image.BufferedImage; -import java.awt.geom.Line2D; -import java.awt.geom.Rectangle2D; -import java.util.Date; -import javax.swing.*; -import javax.swing.border.EtchedBorder; -import javax.swing.border.TitledBorder; -import java.lang.management.*; -/** - * Demo code which plots the memory usage by all memory pools. - * The memory usage is sampled at some time interval using - * java.lang.management API. This demo code is modified based - * java2d MemoryMonitor demo. - */ -public class MemoryMonitor extends JPanel { - - private static final long serialVersionUID = -3463003810776195761L; - static JCheckBox dateStampCB = new JCheckBox("Output Date Stamp"); - public Surface surf; - JPanel controls; - boolean doControls; - JTextField tf; - // Get memory pools. - static java.util.List mpools = - ManagementFactory.getMemoryPoolMXBeans(); - // Total number of memory pools. - static int numPools = mpools.size(); - - public MemoryMonitor() { - setLayout(new BorderLayout()); - setBorder(new TitledBorder(new EtchedBorder(), "Memory Monitor")); - add(surf = new Surface()); - controls = new JPanel(); - controls.setPreferredSize(new Dimension(135,80)); - Font font = new Font("serif", Font.PLAIN, 10); - JLabel label = new JLabel("Sample Rate"); - label.setFont(font); - label.setForeground(Color.red); - controls.add(label); - tf = new JTextField("1000"); - tf.setPreferredSize(new Dimension(45,20)); - controls.add(tf); - controls.add(label = new JLabel("ms")); - label.setFont(font); - label.setForeground(Color.red); - controls.add(dateStampCB); - dateStampCB.setFont(font); - addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - removeAll(); - if ((doControls = !doControls)) { - surf.stop(); - add(controls); - } else { - try { - surf.sleepAmount = Long.parseLong(tf.getText().trim()); - } catch (Exception ex) {} - surf.start(); - add(surf); - } - validate(); - repaint(); - } - }); - } - - - public class Surface extends JPanel implements Runnable { - - public Thread thread; - public long sleepAmount = 1000; - public int usageHistCount = 20000; - private int w, h; - private BufferedImage bimg; - private Graphics2D big; - private Font font = new Font("Times New Roman", Font.PLAIN, 11); - private int columnInc; - private float usedMem[][]; - private float usedMemMax[]; // Used when max pool size is undefined - private int ptNum[]; - private int ascent, descent; - private Rectangle graphOutlineRect = new Rectangle(); - private Rectangle2D mfRect = new Rectangle2D.Float(); - private Rectangle2D muRect = new Rectangle2D.Float(); - private Line2D graphLine = new Line2D.Float(); - private Color graphColor = new Color(46, 139, 87); - private Color mfColor = new Color(0, 100, 0); - private String usedStr; - - - public Surface() { - setBackground(Color.black); - addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - if (thread == null) start(); else stop(); - } - }); - usedMem = new float[numPools][]; - usedMemMax = new float[numPools]; - for (int i = 0; i < numPools; i++) { - usedMemMax[i] = 1024f * 1024f ; - } - ptNum = new int[numPools]; - } - - @Override - public Dimension getMinimumSize() { - return getPreferredSize(); - } - - @Override - public Dimension getMaximumSize() { - return getPreferredSize(); - } - - @Override - public Dimension getPreferredSize() { - return new Dimension(135,80); - } - - - @Override - public void paint(Graphics g) { - - if (big == null) { - return; - } - - big.setBackground(getBackground()); - big.clearRect(0,0,w,h); - - - h = h / ((numPools + numPools%2) / 2); - w = w / 2; - - int k=0; // index of memory pool. - for (int i=0; i < 2;i++) { - for (int j=0; j < (numPools + numPools%2)/ 2; j++) { - plotMemoryUsage(w*i,h*j,w,h,k); - if (++k >= numPools) { - i = 3; - j = (numPools + numPools%2)/ 2; - break; - } - } - } - g.drawImage(bimg, 0, 0, this); - } - - public void plotMemoryUsage(int x1, int y1, int x2, int y2, int npool) { - - MemoryPoolMXBean mp = mpools.get(npool); - float usedMemory = mp.getUsage().getUsed(); - float totalMemory = mp.getUsage().getMax(); - if (totalMemory < 0) { // Max is undefined for this pool - if (usedMemory > usedMemMax[npool]) { - usedMemMax[npool] = usedMemory; - } - totalMemory = usedMemMax[npool]; - } - - // .. Draw allocated and used strings .. - big.setColor(Color.green); - - // Print Max memory allocated for this memory pool. - big.drawString(String.valueOf((int)totalMemory/1024) + "K Max ", x1+4.0f, (float) y1 + ascent+0.5f); - big.setColor(Color.yellow); - - // Print the memory pool name. - big.drawString(mp.getName(), x1+x2/2, (float) y1 + ascent+0.5f); - - // Print the memory used by this memory pool. - usedStr = String.valueOf((int)usedMemory/1024) - + "K used"; - big.setColor(Color.green); - big.drawString(usedStr, x1+4, y1+y2-descent); - - // Calculate remaining size - float ssH = ascent + descent; - float remainingHeight = y2 - (ssH*2) - 0.5f; - float blockHeight = remainingHeight/10; - float blockWidth = 20.0f; - float remainingWidth = x2 - blockWidth - 10; - - // .. Memory Free .. - big.setColor(mfColor); - int MemUsage = (int) (((totalMemory - usedMemory) / totalMemory) * 10); - int i = 0; - for ( ; i < MemUsage ; i++) { - mfRect.setRect(x1+5,(float) y1+ssH+i*blockHeight, - blockWidth, blockHeight-1); - big.fill(mfRect); - } - - // .. Memory Used .. - big.setColor(Color.green); - for ( ; i < 10; i++) { - muRect.setRect(x1+5,(float) y1 + ssH+i*blockHeight, - blockWidth, blockHeight-1); - big.fill(muRect); - } - - // .. Draw History Graph .. - if (remainingWidth <= 30) remainingWidth = (float)30; - if (remainingHeight <= ssH) remainingHeight = ssH; - big.setColor(graphColor); - int graphX = x1+30; - int graphY = y1 + (int) ssH; - int graphW = (int) remainingWidth; - int graphH = (int) remainingHeight; - - graphOutlineRect.setRect(graphX, graphY, graphW, graphH); - big.draw(graphOutlineRect); - - int graphRow = graphH/10; - - // .. Draw row .. - for (int j = graphY; j <= graphH+graphY; j += graphRow) { - graphLine.setLine(graphX,j,graphX+graphW,j); - big.draw(graphLine); - } - - // .. Draw animated column movement .. - int graphColumn = graphW/15; - - if (columnInc == 0) { - columnInc = graphColumn; - } - - for (int j = graphX+columnInc; j < graphW+graphX; j+=graphColumn) { - graphLine.setLine(j,graphY,j,graphY+graphH); - big.draw(graphLine); - } - - --columnInc; - - // Plot memory usage by this memory pool. - if (usedMem[npool] == null) { - usedMem[npool] = new float[usageHistCount]; - ptNum[npool] = 0; - } - - // save memory usage history. - usedMem[npool][ptNum[npool]] = usedMemory; - - big.setColor(Color.yellow); - - int w1; // width of memory usage history. - if (ptNum[npool] > graphW) { - w1 = graphW; - } else { - w1 = ptNum[npool]; - } - - - for (int j=graphX+graphW-w1, k=ptNum[npool]-w1; k < ptNum[npool]; - k++, j++) { - if (k != 0) { - if (usedMem[npool][k] != usedMem[npool][k-1]) { - int h1 = (int)(graphY + graphH * ((totalMemory -usedMem[npool][k-1])/totalMemory)); - int h2 = (int)(graphY + graphH * ((totalMemory -usedMem[npool][k])/totalMemory)); - big.drawLine(j-1, h1, j, h2); - } else { - int h1 = (int)(graphY + graphH * ((totalMemory -usedMem[npool][k])/totalMemory)); - big.fillRect(j, h1, 1, 1); - } - } - } - if (ptNum[npool]+2 == usedMem[npool].length) { - // throw out oldest point - for (int j = 1;j < ptNum[npool]; j++) { - usedMem[npool][j-1] = usedMem[npool][j]; - } - --ptNum[npool]; - } else { - ptNum[npool]++; - } - } - - - public void start() { - thread = new Thread(this); - thread.setPriority(Thread.MIN_PRIORITY); - thread.setName("MemoryMonitor"); - thread.start(); - } - - - public synchronized void stop() { - thread = null; - notify(); - } - - @Override - public void run() { - - Thread me = Thread.currentThread(); - - while (thread == me && !isShowing() || getSize().width == 0) { - try { - Thread.sleep(500); - } catch (InterruptedException e) { return; } - } - - while (thread == me && isShowing()) { - Dimension d = getSize(); - if (d.width != w || d.height != h) { - w = d.width; - h = d.height; - bimg = (BufferedImage) createImage(w, h); - big = bimg.createGraphics(); - big.setFont(font); - FontMetrics fm = big.getFontMetrics(font); - ascent = fm.getAscent(); - descent = fm.getDescent(); - } - repaint(); - try { - Thread.sleep(sleepAmount); - } catch (InterruptedException e) { break; } - if (MemoryMonitor.dateStampCB.isSelected()) { - System.out.println(new Date().toString() + " " + usedStr); - } - } - thread = null; - } - } - - - // Test thread to consume memory - static class Memeater extends ClassLoader implements Runnable { - Object y[]; - public Memeater() {} - @Override - public void run() { - y = new Object[10000000]; - int k =0; - while(true) { - if (k == 5000000) k=0; - y[k++] = new Object(); - try { - Thread.sleep(20); - } catch (Exception x){} - - // to consume perm gen storage - try { - // the classes are small so we load 10 at a time - for (int i=0; i<10; i++) { - loadNext(); - } - } catch (ClassNotFoundException x) { - // ignore exception - } - - } - - } - - Class loadNext() throws ClassNotFoundException { - - // public class TestNNNNNN extends java.lang.Object{ - // public TestNNNNNN(); - // Code: - // 0: aload_0 - // 1: invokespecial #1; //Method java/lang/Object."":()V - // 4: return - // } - - int begin[] = { - 0xca, 0xfe, 0xba, 0xbe, 0x00, 0x00, 0x00, 0x30, - 0x00, 0x0a, 0x0a, 0x00, 0x03, 0x00, 0x07, 0x07, - 0x00, 0x08, 0x07, 0x00, 0x09, 0x01, 0x00, 0x06, - 0x3c, 0x69, 0x6e, 0x69, 0x74, 0x3e, 0x01, 0x00, - 0x03, 0x28, 0x29, 0x56, 0x01, 0x00, 0x04, 0x43, - 0x6f, 0x64, 0x65, 0x0c, 0x00, 0x04, 0x00, 0x05, - 0x01, 0x00, 0x0a, 0x54, 0x65, 0x73, 0x74 }; - - int end [] = { - 0x01, 0x00, 0x10, - 0x6a, 0x61, 0x76, 0x61, 0x2f, 0x6c, 0x61, 0x6e, - 0x67, 0x2f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x00, 0x21, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x04, - 0x00, 0x05, 0x00, 0x01, 0x00, 0x06, 0x00, 0x00, - 0x00, 0x11, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x05, 0x2a, 0xb7, 0x00, 0x01, 0xb1, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00 }; - - - // TestNNNNNN - - String name = "Test" + Integer.toString(count++); - - byte value[]; - try { - value = name.substring(4).getBytes("UTF-8"); - } catch (java.io.UnsupportedEncodingException x) { - throw new Error(); - } - - // construct class file - - int len = begin.length + value.length + end.length; - byte b[] = new byte[len]; - int pos=0; - for (int i: begin) { - b[pos++] = (byte) i; - } - for (byte v: value) { - b[pos++] = v; - } - for (int e: end) { - b[pos++] = (byte) e; - } - - return defineClass(name, b, 0, b.length); - - } - static int count = 100000; - - } - - public static void main(String s[]) { - final MemoryMonitor demo = new MemoryMonitor(); - WindowListener l = new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) {System.exit(0);} - @Override - public void windowDeiconified(WindowEvent e) { demo.surf.start(); } - @Override - public void windowIconified(WindowEvent e) { demo.surf.stop(); } - }; - JFrame f = new JFrame("MemoryMonitor"); - f.addWindowListener(l); - f.getContentPane().add("Center", demo); - f.pack(); - f.setSize(new Dimension(400,500)); - f.setVisible(true); - demo.surf.start(); - Thread thr = new Thread(new Memeater()); - thr.start(); - } - -} diff --git a/jdk/src/demo/share/management/MemoryMonitor/README.txt b/jdk/src/demo/share/management/MemoryMonitor/README.txt deleted file mode 100644 index 5a421dbdc90..00000000000 --- a/jdk/src/demo/share/management/MemoryMonitor/README.txt +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -MemoryMonitor demonstrates the use of the java.lang.management API -in observing the memory usage of all memory pools consumed by -the application. - -This simple demo program queries the memory usage of each memory pool -and plots the memory usage history graph. - -To run the MemoryMonitor demo - - java -jar /demo/management/MemoryMonitor/MemoryMonitor.jar - -These instructions assume that this installation's version of the java -command is in your path. If it isn't, then you should either -specify the complete path to the java command or update your -PATH environment variable as described in the installation -instructions for the Java(TM) SDK. - diff --git a/jdk/src/demo/share/management/VerboseGC/PrintGCStat.java b/jdk/src/demo/share/management/VerboseGC/PrintGCStat.java deleted file mode 100644 index 565c8dc5c2c..00000000000 --- a/jdk/src/demo/share/management/VerboseGC/PrintGCStat.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - */ - -import static java.lang.management.ManagementFactory.*; -import java.lang.management.*; -import javax.management.*; -import java.io.*; -import java.util.*; - -/** - * Example of using the java.lang.management API to monitor - * the memory usage and garbage collection statistics. - * - * @author Mandy Chung - */ -public class PrintGCStat { - private RuntimeMXBean rmbean; - private MemoryMXBean mmbean; - private List pools; - private List gcmbeans; - - /** - * Constructs a PrintGCStat object to monitor a remote JVM. - */ - public PrintGCStat(MBeanServerConnection server) throws IOException { - // Create the platform mxbean proxies - this.rmbean = newPlatformMXBeanProxy(server, - RUNTIME_MXBEAN_NAME, - RuntimeMXBean.class); - this.mmbean = newPlatformMXBeanProxy(server, - MEMORY_MXBEAN_NAME, - MemoryMXBean.class); - ObjectName poolName = null; - ObjectName gcName = null; - try { - poolName = new ObjectName(MEMORY_POOL_MXBEAN_DOMAIN_TYPE+",*"); - gcName = new ObjectName(GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE+",*"); - } catch (MalformedObjectNameException e) { - // should not reach here - assert(false); - } - - Set mbeans = server.queryNames(poolName, null); - if (mbeans != null) { - pools = new ArrayList(); - for (ObjectName objName : mbeans) { - MemoryPoolMXBean p = - newPlatformMXBeanProxy(server, - objName.getCanonicalName(), - MemoryPoolMXBean.class); - pools.add(p); - } - } - - mbeans = server.queryNames(gcName, null); - if (mbeans != null) { - gcmbeans = new ArrayList(); - for (ObjectName objName : mbeans) { - GarbageCollectorMXBean gc = - newPlatformMXBeanProxy(server, - objName.getCanonicalName(), - GarbageCollectorMXBean.class); - gcmbeans.add(gc); - } - } - } - - /** - * Constructs a PrintGCStat object to monitor the local JVM. - */ - public PrintGCStat() { - // Obtain the platform mxbean instances for the running JVM. - this.rmbean = getRuntimeMXBean(); - this.mmbean = getMemoryMXBean(); - this.pools = getMemoryPoolMXBeans(); - this.gcmbeans = getGarbageCollectorMXBeans(); - } - - /** - * Prints the verbose GC log to System.out to list the memory usage - * of all memory pools as well as the GC statistics. - */ - public void printVerboseGc() { - System.out.println("Uptime: " + formatMillis(rmbean.getUptime())); - System.out.println("Heap usage: " + mmbean.getHeapMemoryUsage()); - System.out.println("Non-Heap memory usage: " + mmbean.getNonHeapMemoryUsage()); - for (GarbageCollectorMXBean gc : gcmbeans) { - System.out.print(" [" + gc.getName() + ": "); - System.out.print("Count=" + gc.getCollectionCount()); - System.out.print(" GCTime=" + formatMillis(gc.getCollectionTime())); - System.out.print("]"); - } - System.out.println(); - for (MemoryPoolMXBean p : pools) { - System.out.print(" [" + p.getName() + ":"); - MemoryUsage u = p.getUsage(); - System.out.print(" Used=" + formatBytes(u.getUsed())); - System.out.print(" Committed=" + formatBytes(u.getCommitted())); - System.out.println("]"); - } - } - - private String formatMillis(long ms) { - return String.format("%.4fsec", ms / (double) 1000); - } - private String formatBytes(long bytes) { - long kb = bytes; - if (bytes > 0) { - kb = bytes / 1024; - } - return kb + "K"; - } -} diff --git a/jdk/src/demo/share/management/VerboseGC/README.txt b/jdk/src/demo/share/management/VerboseGC/README.txt deleted file mode 100644 index f7a9011e422..00000000000 --- a/jdk/src/demo/share/management/VerboseGC/README.txt +++ /dev/null @@ -1,31 +0,0 @@ -VerboseGC demonstrates the use of the java.lang.management API to -print the garbage collection statistics and memory usage remotely -by connecting to a JMX agent with a JMX service URL: - service:jmx:rmi:///jndi/rmi://:/jmxrmi -where is the hostname and is the port number -to which the JMX agent will be connected. - -To run the VerboseGC demo - -(1) Start the application with the JMX agent - here's an example of - how the Java2D is started - - java -Dcom.sun.management.jmxremote.port=1090 - -Dcom.sun.management.jmxremote.ssl=false - -Dcom.sun.management.jmxremote.authenticate=false - -jar /demo/jfc/Java2D/Java2Demo.jar - - This instruction uses the Sun's built-in support to enable a JMX agent. - You can programmatically start a JMX agent with the RMI connector - using javax.management.remote API. See the javadoc and examples for - javax.management.remote API for details. - -(2) Run VerboseGC - - java -jar /demo/management/VerboseGC/VerboseGC.jar localhost:1090 - -These instructions assume that this installation's version of the java -command is in your path. If it isn't, then you should either -specify the complete path to the java command or update your -PATH environment variable as described in the installation -instructions for the Java(TM) SDK. diff --git a/jdk/src/demo/share/management/VerboseGC/VerboseGC.java b/jdk/src/demo/share/management/VerboseGC/VerboseGC.java deleted file mode 100644 index 57f78b8a53a..00000000000 --- a/jdk/src/demo/share/management/VerboseGC/VerboseGC.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - */ - -import javax.management.*; -import javax.management.remote.*; -import java.io.IOException; -import java.net.MalformedURLException; - -/** - * This VerboseGC class demonstrates the capability to get - * the garbage collection statistics and memory usage remotely. - */ -public class VerboseGC { - private MBeanServerConnection server; - private JMXConnector jmxc; - public VerboseGC(String hostname, int port) { - System.out.println("Connecting to " + hostname + ":" + port); - - // Create an RMI connector client and connect it to - // the RMI connector server - String urlPath = "/jndi/rmi://" + hostname + ":" + port + "/jmxrmi"; - connect(urlPath); - } - - public void dump(long interval, long samples) { - try { - PrintGCStat pstat = new PrintGCStat(server); - for (int i = 0; i < samples; i++) { - pstat.printVerboseGc(); - try { - Thread.sleep(interval); - } catch (InterruptedException e) { - System.exit(1); - } - } - } catch (IOException e) { - System.err.println("\nCommunication error: " + e.getMessage()); - System.exit(1); - } - } - - /** - * Connect to a JMX agent of a given URL. - */ - private void connect(String urlPath) { - try { - JMXServiceURL url = new JMXServiceURL("rmi", "", 0, urlPath); - this.jmxc = JMXConnectorFactory.connect(url); - this.server = jmxc.getMBeanServerConnection(); - } catch (MalformedURLException e) { - // should not reach here - } catch (IOException e) { - System.err.println("\nCommunication error: " + e.getMessage()); - System.exit(1); - } - } - - public static void main(String[] args) { - if (args.length < 1) { - usage(); - } - - String hostname = ""; - int port = -1; - long interval = 5000; // default is 5 second interval - long mins = 5; - for (String arg: args) { - if (arg.startsWith("-")) { - if (arg.equals("-h") || - arg.equals("-help") || - arg.equals("-?")) { - usage(); - } else if (arg.startsWith("-interval=")) { - try { - interval = Integer.parseInt(arg.substring(10)) * 1000; - } catch (NumberFormatException ex) { - usage(); - } - } else if (arg.startsWith("-duration=")) { - try { - mins = Integer.parseInt(arg.substring(10)); - } catch (NumberFormatException ex) { - usage(); - } - } else { - // Unknown switch - System.err.println("Unrecognized option: " + arg); - usage(); - } - } else { - String[] arg2 = arg.split(":"); - if (arg2.length != 2) { - usage(); - } - hostname = arg2[0]; - try { - port = Integer.parseInt(arg2[1]); - } catch (NumberFormatException x) { - usage(); - } - if (port < 0) { - usage(); - } - } - } - - // get full thread dump and perform deadlock detection - VerboseGC vgc = new VerboseGC(hostname, port); - long samples = (mins * 60 * 1000) / interval; - vgc.dump(interval, samples); - - } - - private static void usage() { - System.out.print("Usage: java VerboseGC : "); - System.out.println(" [-interval=seconds] [-duration=minutes]"); - } -} diff --git a/jdk/src/demo/share/management/index.html b/jdk/src/demo/share/management/index.html deleted file mode 100644 index f9f35064221..00000000000 --- a/jdk/src/demo/share/management/index.html +++ /dev/null @@ -1,46 +0,0 @@ - - java.lang.management Demonstration Code - - -

    java.lang.management Demonstration Code

    - -
      - -
    • -FullThreadDump -
      -Shows how to get thread dumps and look for deadlocks. -
    • - -
    • -VerboseGC -
      -Shows how you can find out about Garbage Collection in the VM. -
    • - -
    • -MemoryMonitor -
      -Shows how you can find out the memory usage in the VM. -
    • - -
    • -JTop -
      -Shows how you can find out the threads with top CPU usage. -
    • - - -
    - - - -

    Comments and Feedback

    - -

    -Comments regarding java.lang.management API or on any of these -demonstrations should be sent through -http://java.sun.com/mail/ - - - diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/README.txt b/jdk/src/demo/share/scripting/jconsole-plugin/README.txt deleted file mode 100644 index fc4bbf199aa..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/README.txt +++ /dev/null @@ -1,64 +0,0 @@ -What is this demo about? - -This is "script shell" plugin for jconsole - the monitoring and management -client tool shipped with JRE. This plugin adds "Script Shell" tab to jconsole. -This serves as a demo for jconsole plugin API (com.sun.tools.jconsole) as well -as a demo for scripting API (javax.script) for the Java platform. - -Script console is an interactive read-eval-print interface that can be used -used to execute advanced monitoring and management queries. By default, -JavaScript is used as the scripting language. The scripting language can be -changed using the system property com.sun.demo.jconsole.console.language. To -use other scripting languages, you need to specify the corresponding engine -jar file in pluginpath along with this plugin's jar file. - -The following 3 global variables are exposed to the script engine: - - window javax.swing.JPanel - engine javax.script.ScriptEngine - plugin com.sun.tools.jconsole.JConsolePlugin - -If you use JavaScript, there are many useful global functions defined in -./src/resources/jconsole.js. This is built into the script plugin jar file. -In addition, you can add other global functions and global variables by -defining those in ~/jconsole.js (or jconsole. where is the file -extension for your scripting language of choice under your home directory). - -How do I compile script console plugin? - -You can use the Java based build tool "ant" (http://ant.apache.org) to build -this plugin. To build using ant, please use the following command in the -current directory: - - ant - -How do I use script console plugin? - -To start jconsole with this plugin, please use the following command - - jconsole -pluginpath jconsole-plugin.jar - -How do I load my own script files in script console? - -If you use JavaScript (the default), then there is a global function called -"load" to load any script file from your file system. In script console -prompt, enter the following: - - load(); - -where is the path of your script file to load. If you don't -specify the file path, then the load function shows file dialog box to choose -the script file to load. - -How do I get help on script global functions? - -If you use JavaScript (the default), then there is a global function called -"help" that prints one-line help messages on global functions. In script -console prompt, enter the following: - - help(); - -Where are the sample JavaScript files? - -./src/scripts directory contains JavaScript files that can be loaded into -script console. diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/build.xml b/jdk/src/demo/share/scripting/jconsole-plugin/build.xml deleted file mode 100644 index aecefdcad5d..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/build.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/META-INF/services/com.sun.tools.jconsole.JConsolePlugin b/jdk/src/demo/share/scripting/jconsole-plugin/src/META-INF/services/com.sun.tools.jconsole.JConsolePlugin deleted file mode 100644 index 9e05f3c164f..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/META-INF/services/com.sun.tools.jconsole.JConsolePlugin +++ /dev/null @@ -1 +0,0 @@ -com.sun.demo.scripting.jconsole.ScriptJConsolePlugin diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/EditableAtEndDocument.java b/jdk/src/demo/share/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/EditableAtEndDocument.java deleted file mode 100644 index 2552f5ea5a7..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/EditableAtEndDocument.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.demo.scripting.jconsole; - -import javax.swing.text.*; - -/** This class implements a special type of document in which edits - * can only be performed at the end, from "mark" to the end of the - * document. This is used in ScriptShellPanel class as document for editor. - */ -public class EditableAtEndDocument extends PlainDocument { - - private static final long serialVersionUID = 5358116444851502167L; - private int mark; - - @Override - public void insertString(int offset, String text, AttributeSet a) - throws BadLocationException { - int len = getLength(); - super.insertString(len, text, a); - } - - @Override - public void remove(int offs, int len) throws BadLocationException { - int start = offs; - int end = offs + len; - - int markStart = mark; - int markEnd = getLength(); - - if ((end < markStart) || (start > markEnd)) { - // no overlap - return; - } - - // Determine interval intersection - int cutStart = Math.max(start, markStart); - int cutEnd = Math.min(end, markEnd); - super.remove(cutStart, cutEnd - cutStart); - } - - public void setMark() { - mark = getLength(); - } - - public String getMarkedText() throws BadLocationException { - return getText(mark, getLength() - mark); - } - - /** Used to reset the contents of this document */ - public void clear() { - try { - super.remove(0, getLength()); - setMark(); - } catch (BadLocationException e) { - } - } -} diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptJConsolePlugin.java b/jdk/src/demo/share/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptJConsolePlugin.java deleted file mode 100644 index c955a968dcf..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptJConsolePlugin.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.demo.scripting.jconsole; - -import com.sun.tools.jconsole.*; -import java.io.*; -import java.util.concurrent.CountDownLatch; -import javax.script.*; -import javax.swing.*; -import java.util.*; - -/** - * This is script console plugin. This class uses javax.script API to create - * interactive read-eval-print script shell within the jconsole GUI. - */ -public class ScriptJConsolePlugin extends JConsolePlugin - implements ScriptShellPanel.CommandProcessor { - // Panel for our tab - private volatile ScriptShellPanel window; - // Tabs that we add to jconsole GUI - private Map tabs; - - // Script engine that evaluates scripts - private volatile ScriptEngine engine; - - // script engine initialization occurs in background. - // This latch is used to coorrdinate engine init and eval. - private CountDownLatch engineReady = new CountDownLatch(1); - - // File extension used for scripts of chosen language. - // For eg. ".js" for JavaScript, ".bsh" for BeanShell. - private String extension; - - // Prompt to print in the read-eval-print loop. This is - // derived from the script file extension. - private volatile String prompt; - - /** - * Constructor to create this plugin - */ - public ScriptJConsolePlugin() { - } - - @Override public Map getTabs() { - // create ScriptEngine - createScriptEngine(); - - // create panel for tab - window = new ScriptShellPanel(this); - - // add tab to tabs map - tabs = new HashMap(); - tabs.put("Script Shell", window); - - new Thread(new Runnable() { - @Override - public void run() { - // initialize the script engine - initScriptEngine(); - engineReady.countDown(); - } - }).start(); - return tabs; - } - - @Override public SwingWorker newSwingWorker() { - return null; - } - - @Override public void dispose() { - window.dispose(); - } - - @Override - public String getPrompt() { - return prompt; - } - - @Override - public String executeCommand(String cmd) { - String res; - try { - engineReady.await(); - Object tmp = engine.eval(cmd); - res = (tmp == null)? null : tmp.toString(); - } catch (InterruptedException ie) { - res = ie.getMessage(); - } catch (ScriptException se) { - res = se.getMessage(); - } - return res; - } - - //-- Internals only below this point - private void createScriptEngine() { - ScriptEngineManager manager = new ScriptEngineManager(); - String language = getScriptLanguage(); - engine = manager.getEngineByName(language); - if (engine == null) { - throw new RuntimeException("cannot load " + language + " engine"); - } - extension = engine.getFactory().getExtensions().get(0); - prompt = extension + ">"; - engine.setBindings(createBindings(), ScriptContext.ENGINE_SCOPE); - } - - // Name of the System property used to select scripting language - private static final String LANGUAGE_KEY = "com.sun.demo.jconsole.console.language"; - - private String getScriptLanguage() { - // check whether explicit System property is set - String lang = System.getProperty(LANGUAGE_KEY); - if (lang == null) { - // default is JavaScript - lang = "JavaScript"; - } - return lang; - } - - // create Bindings that is backed by a synchronized HashMap - private Bindings createBindings() { - Map map = - Collections.synchronizedMap(new HashMap()); - return new SimpleBindings(map); - } - - // create and initialize script engine - private void initScriptEngine() { - // set pre-defined global variables - setGlobals(); - // load pre-defined initialization file - loadInitFile(); - // load current user's initialization file - loadUserInitFile(); - } - - // set pre-defined global variables for script - private void setGlobals() { - engine.put("engine", engine); - engine.put("window", window); - engine.put("plugin", this); - } - - // load initial script file (jconsole.) - private void loadInitFile() { - String oldFilename = (String) engine.get(ScriptEngine.FILENAME); - engine.put(ScriptEngine.FILENAME, ""); - try { - Class myClass = this.getClass(); - InputStream stream = myClass.getResourceAsStream("/resources/jconsole." + - extension); - if (stream != null) { - engine.eval(new InputStreamReader(new BufferedInputStream(stream))); - } - } catch (Exception exp) { - exp.printStackTrace(); - // FIXME: What else I can do here?? - } finally { - engine.put(ScriptEngine.FILENAME, oldFilename); - } - } - - // load user's initial script file (~/jconsole.) - private void loadUserInitFile() { - String oldFilename = (String) engine.get(ScriptEngine.FILENAME); - String home = System.getProperty("user.home"); - if (home == null) { - // no user.home?? should not happen?? - return; - } - String fileName = home + File.separator + "jconsole." + extension; - if (! (new File(fileName).exists())) { - // user does not have ~/jconsole. - return; - } - engine.put(ScriptEngine.FILENAME, fileName); - try { - engine.eval(new FileReader(fileName)); - } catch (Exception exp) { - exp.printStackTrace(); - // FIXME: What else I can do here?? - } finally { - engine.put(ScriptEngine.FILENAME, oldFilename); - } - } -} diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java b/jdk/src/demo/share/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java deleted file mode 100644 index c7e4dee51bc..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.demo.scripting.jconsole; - -import java.awt.*; -import java.awt.event.*; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import javax.swing.*; -import javax.swing.event.*; -import javax.swing.text.*; - - -/** - * A JPanel subclass containing a scrollable text area displaying the - * jconsole's script console. - */ - -public class ScriptShellPanel extends JPanel { - - private static final long serialVersionUID = 4116273141148726319L; - - // interface to evaluate script command and script prompt - interface CommandProcessor { - // execute given String as script and return the result - public String executeCommand(String cmd); - // get prompt used for interactive read-eval-loop - public String getPrompt(); - } - - // my script command processor - private CommandProcessor commandProcessor; - // editor component for command editing - private JTextComponent editor; - - private final ExecutorService commandExecutor = - Executors.newSingleThreadExecutor(); - - // document management - private boolean updating; - - public ScriptShellPanel(CommandProcessor cmdProc) { - setLayout(new BorderLayout()); - this.commandProcessor = cmdProc; - this.editor = new JTextArea(); - editor.setDocument(new EditableAtEndDocument()); - JScrollPane scroller = new JScrollPane(); - scroller.getViewport().add(editor); - add(scroller, BorderLayout.CENTER); - - editor.getDocument().addDocumentListener(new DocumentListener() { - @Override - public void changedUpdate(DocumentEvent e) { - } - - @Override - public void insertUpdate(DocumentEvent e) { - if (updating) return; - beginUpdate(); - editor.setCaretPosition(editor.getDocument().getLength()); - if (insertContains(e, '\n')) { - String cmd = getMarkedText(); - // Handle multi-line input - if ((cmd.length() == 0) || - (cmd.charAt(cmd.length() - 1) != '\\')) { - // Trim "\\n" combinations - final String cmd1 = trimContinuations(cmd); - commandExecutor.execute(new Runnable() { - @Override - public void run() { - final String result = executeCommand(cmd1); - - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - if (result != null) { - print(result + "\n"); - } - printPrompt(); - setMark(); - endUpdate(); - } - }); - } - }); - } else { - endUpdate(); - } - } else { - endUpdate(); - } - } - - @Override - public void removeUpdate(DocumentEvent e) { - } - }); - - // This is a bit of a hack but is probably better than relying on - // the JEditorPane to update the caret's position precisely the - // size of the insertion - editor.addCaretListener(new CaretListener() { - @Override - public void caretUpdate(CaretEvent e) { - int len = editor.getDocument().getLength(); - if (e.getDot() > len) { - editor.setCaretPosition(len); - } - } - }); - - Box hbox = Box.createHorizontalBox(); - hbox.add(Box.createGlue()); - JButton button = new JButton("Clear"); // FIXME: i18n? - button.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - clear(); - } - }); - hbox.add(button); - hbox.add(Box.createGlue()); - add(hbox, BorderLayout.SOUTH); - - clear(); - } - - public void dispose() { - commandExecutor.shutdown(); - } - - @Override - public void requestFocus() { - editor.requestFocus(); - } - - public void clear() { - clear(true); - } - - public void clear(boolean prompt) { - EditableAtEndDocument d = (EditableAtEndDocument) editor.getDocument(); - d.clear(); - if (prompt) printPrompt(); - setMark(); - editor.requestFocus(); - } - - public void setMark() { - ((EditableAtEndDocument) editor.getDocument()).setMark(); - } - - public String getMarkedText() { - try { - String s = ((EditableAtEndDocument) editor.getDocument()).getMarkedText(); - int i = s.length(); - while ((i > 0) && (s.charAt(i - 1) == '\n')) { - i--; - } - return s.substring(0, i); - } catch (BadLocationException e) { - e.printStackTrace(); - return null; - } - } - - public void print(String s) { - Document d = editor.getDocument(); - try { - d.insertString(d.getLength(), s, null); - } catch (BadLocationException e) { - e.printStackTrace(); - } - } - - - // - // Internals only below this point - // - - private String executeCommand(String cmd) { - return commandProcessor.executeCommand(cmd); - } - - private String getPrompt() { - return commandProcessor.getPrompt(); - } - - private void beginUpdate() { - editor.setEditable(false); - updating = true; - } - - private void endUpdate() { - editor.setEditable(true); - updating = false; - } - - private void printPrompt() { - print(getPrompt()); - } - - private boolean insertContains(DocumentEvent e, char c) { - String s = null; - try { - s = editor.getText(e.getOffset(), e.getLength()); - for (int i = 0; i < e.getLength(); i++) { - if (s.charAt(i) == c) { - return true; - } - } - } catch (BadLocationException ex) { - ex.printStackTrace(); - } - return false; - } - - private String trimContinuations(String text) { - int i; - while ((i = text.indexOf("\\\n")) >= 0) { - text = text.substring(0, i) + text.substring(i+1, text.length()); - } - return text; - } -} diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/resources/jconsole.js b/jdk/src/demo/share/scripting/jconsole-plugin/src/resources/jconsole.js deleted file mode 100644 index f39dea30069..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/resources/jconsole.js +++ /dev/null @@ -1,891 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * -Redistribution of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * -Redistribution in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of Oracle nor the names of contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any kind. ALL - * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING - * ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - * OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN") - * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE - * AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST - * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, - * INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY - * OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, - * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or intended - * for use in the design, construction, operation or maintenance of any - * nuclear facility. - */ - -// This function depends on the pre-defined variable -// "plugin" of type com.sun.tools.jconsole.JConsolePlugin - -function jcontext() { - return plugin.getContext(); -} -jcontext.docString = "returns JConsoleContext for the current jconsole plugin"; - -function mbeanConnection() { - return jcontext().getMBeanServerConnection(); -} -mbeanConnection.docString = "returns current MBeanServer connection"; - -// check if there is a build in sync function, define one if missing -if (typeof sync === "undefined") { - var sync = function(func, obj) { - if (arguments.length < 1 || arguments.length > 2 ) { - throw "sync(function [,object]) parameter count mismatch"; - } - - var syncobj = (arguments.length == 2 ? obj : this); - - if (!syncobj._syncLock) { - syncobj._syncLock = new Lock(); - } - - return function() { - syncobj._syncLock.lock(); - try { - func.apply(null, arguments); - } finally { - syncobj._syncLock.unlock(); - } - }; - }; - sync.docString = "synchronize a function, optionally on an object"; -} - -/** - * Prints one liner help message for each function exposed here - * Note that this function depends on docString meta-data for - * each function - */ -function help() { - var i; - for (i in this) { - var func = this[i]; - if (typeof(func) == "function" && - ("docString" in func)) { - echo(i + " - " + func["docString"]); - } - } -} -help.docString = "prints help message for global functions"; - -function connectionState() { - return jcontext().connectionState; -} -connectionState.docString = "return connection state of the current jcontext"; - -/** - * Returns a platform MXBean proxy for given MXBean name and interface class - */ -function newPlatformMXBeanProxy(name, intf) { - var factory = java.lang.management.ManagementFactory; - return factory.newPlatformMXBeanProxy(mbeanConnection(), name, intf); -} -newPlatformMXBeanProxy.docString = "returns a proxy for a platform MXBean"; - -/** - * Wraps a string to ObjectName if needed. - */ -function objectName(objName) { - var ObjectName = Packages.javax.management.ObjectName; - if (objName instanceof ObjectName) { - return objName; - } else { - return new ObjectName(objName); - } -} -objectName.docString = "creates JMX ObjectName for a given String"; - - -/** - * Creates a new (M&M) Attribute object - * - * @param name name of the attribute - * @param value value of the attribute - */ -function attribute(name, value) { - var Attribute = Packages.javax.management.Attribute; - return new Attribute(name, value); -} -attribute.docString = "returns a new JMX Attribute using name and value given"; - -/** - * Returns MBeanInfo for given ObjectName. Strings are accepted. - */ -function mbeanInfo(objName) { - objName = objectName(objName); - return mbeanConnection().getMBeanInfo(objName); -} -mbeanInfo.docString = "returns MBeanInfo of a given ObjectName"; - -/** - * Returns ObjectInstance for a given ObjectName. - */ -function objectInstance(objName) { - objName = objectName(objName); - return mbeanConnection().objectInstance(objectName); -} -objectInstance.docString = "returns ObjectInstance for a given ObjectName"; - -/** - * Queries with given ObjectName and QueryExp. - * QueryExp may be null. - * - * @return set of ObjectNames. - */ -function queryNames(objName, query) { - objName = objectName(objName); - if (query == undefined) query = null; - return mbeanConnection().queryNames(objName, query); -} -queryNames.docString = "returns QueryNames using given ObjectName and optional query"; - - -/** - * Queries with given ObjectName and QueryExp. - * QueryExp may be null. - * - * @return set of ObjectInstances. - */ -function queryMBeans(objName, query) { - objName = objectName(objName); - if (query == undefined) query = null; - return mbeanConnection().queryMBeans(objName, query); -} -queryMBeans.docString = "return MBeans using given ObjectName and optional query"; - -// wraps a script array as java.lang.Object[] -function objectArray(array) { - return Java.to(array, "java.lang.Object[]"); -} - -// wraps a script (string) array as java.lang.String[] -function stringArray(array) { - return Java.to(array, "java.lang.String[]"); -} - -// script array to Java List -function toAttrList(array) { - var AttributeList = Packages.javax.management.AttributeList; - if (array instanceof AttributeList) { - return array; - } - var list = new AttributeList(array.length); - for (var index = 0; index < array.length; index++) { - list.add(array[index]); - } - return list; -} - -// Java Collection (Iterable) to script array -function toArray(collection) { - if (collection instanceof Array) { - return collection; - } - var itr = collection.iterator(); - var array = new Array(); - while (itr.hasNext()) { - array[array.length] = itr.next(); - } - return array; -} - -// gets MBean attributes -function getMBeanAttributes(objName, attributeNames) { - objName = objectName(objName); - return mbeanConnection().getAttributes(objName,stringArray(attributeNames)); -} -getMBeanAttributes.docString = "returns specified Attributes of given ObjectName"; - -// gets MBean attribute -function getMBeanAttribute(objName, attrName) { - objName = objectName(objName); - return mbeanConnection().getAttribute(objName, attrName); -} -getMBeanAttribute.docString = "returns a single Attribute of given ObjectName"; - - -// sets MBean attributes -function setMBeanAttributes(objName, attrList) { - objName = objectName(objName); - attrList = toAttrList(attrList); - return mbeanConnection().setAttributes(objName, attrList); -} -setMBeanAttributes.docString = "sets specified Attributes of given ObjectName"; - -// sets MBean attribute -function setMBeanAttribute(objName, attrName, attrValue) { - var Attribute = Packages.javax.management.Attribute; - objName = objectName(objName); - mbeanConnection().setAttribute(objName, new Attribute(attrName, attrValue)); -} -setMBeanAttribute.docString = "sets a single Attribute of given ObjectName"; - - -// invokes an operation on given MBean -function invokeMBean(objName, operation, params, signature) { - objName = objectName(objName); - params = objectArray(params); - signature = stringArray(signature); - return mbeanConnection().invoke(objName, operation, params, signature); -} -invokeMBean.docString = "invokes MBean operation on given ObjectName"; - -/** - * Wraps a MBean specified by ObjectName as a convenient - * script object -- so that setting/getting MBean attributes - * and invoking MBean method can be done with natural syntax. - * - * @param objName ObjectName of the MBean - * @param async asynchornous mode [optional, default is false] - * @return script wrapper for MBean - * - * With async mode, all field, operation access is async. Results - * will be of type FutureTask. When you need value, call 'get' on it. - */ -function mbean(objName, async) { - var index; - - objName = objectName(objName); - var info = mbeanInfo(objName); - var attrs = info.attributes; - var attrMap = new Object; - for (index in attrs) { - attrMap[attrs[index].name] = attrs[index]; - } - var opers = info.operations; - var operMap = new Object; - for (index in opers) { - operMap[opers[index].name] = opers[index]; - } - - function isAttribute(name) { - return name in attrMap; - } - - function isOperation(name) { - return name in operMap; - } - - return new JSAdapter() { - __has__: function (name) { - return isAttribute(name) || isOperation(name); - }, - __get__: function (name) { - if (isAttribute(name)) { - if (async) { - return getMBeanAttribute.future(objName, name); - } else { - return getMBeanAttribute(objName, name); - } - } else { - return undefined; - } - }, - __call__: function(name) { - if (isOperation(name)) { - var oper = operMap[name]; - - var params = []; - for (var j = 1; j < arguments.length; j++) { - params[j-1]= arguments[j]; - } - - var sigs = oper.signature; - - var sigNames = new Array(sigs.length); - for (var index in sigs) { - sigNames[index] = sigs[index].getType(); - } - - if (async) { - return invokeMBean.future(objName, name, params, sigNames); - } else { - return invokeMBean(objName, name, params, sigNames); - } - } else { - return undefined; - } - }, - __put__: function (name, value) { - if (isAttribute(name)) { - if (async) { - setMBeanAttribute.future(objName, name, value); - } else { - setMBeanAttribute(objName, name, value); - } - } else { - return undefined; - } - } - }; -} -mbean.docString = "returns a conveninent script wrapper for a MBean of given ObjectName"; - -/** - * load and evaluate script file. If no script file is - * specified, file dialog is shown to choose the script. - * - * @param file script file name [optional] - * @return value returned from evaluating script - */ -function load(file) { - if (file == undefined || file == null) { - // file not specified, show file dialog to choose - file = fileDialog(); - } - if (file == null) return; - - var reader = new java.io.FileReader(file); - var oldFilename = engine.get(engine.FILENAME); - engine.put(engine.FILENAME, file); - try { - engine.eval(reader); - } finally { - engine.put(engine.FILENAME, oldFilename); - } - reader.close(); -} -load.docString = "loads a script file and evaluates it"; - -/** - * Concurrency utilities for JavaScript. These are based on - * java.lang and java.util.concurrent API. The following functions - * provide a simpler API for scripts. Instead of directly using java.lang - * and java.util.concurrent classes, scripts can use functions and - * objects exported from here. - */ - -/** - * Wrapper for java.lang.Object.wait - * - * can be called only within a sync method - */ -function wait(object) { - var objClazz = java.lang.Class.forName('java.lang.Object'); - var waitMethod = objClazz.getMethod('wait', null); - waitMethod.invoke(object, null); -} -wait.docString = "convenient wrapper for java.lang.Object.wait method"; - - -/** - * Wrapper for java.lang.Object.notify - * - * can be called only within a sync method - */ -function notify(object) { - var objClazz = java.lang.Class.forName('java.lang.Object'); - var notifyMethod = objClazz.getMethod('notify', null); - notifyMethod.invoke(object, null); -} -notify.docString = "convenient wrapper for java.lang.Object.notify method"; - - -/** - * Wrapper for java.lang.Object.notifyAll - * - * can be called only within a sync method - */ -function notifyAll(object) { - var objClazz = java.lang.Class.forName('java.lang.Object'); - var notifyAllMethod = objClazz.getMethod('notifyAll', null); - notifyAllMethod.invoke(object, null); -} -notifyAll.docString = "convenient wrapper for java.lang.Object.notifyAll method"; - - -/** - * Creates a java.lang.Runnable from a given script - * function. - */ -Function.prototype.runnable = function() { - var args = arguments; - var func = this; - return new java.lang.Runnable() { - run: function() { - func.apply(null, args); - } - } -} - -/** - * Executes the function on a new Java Thread. - */ -Function.prototype.thread = function() { - var t = new java.lang.Thread(this.runnable.apply(this, arguments)); - t.start(); - return t; -} - -/** - * Executes the function on a new Java daemon Thread. - */ -Function.prototype.daemon = function() { - var t = new java.lang.Thread(this.runnable.apply(this, arguments)); - t.setDaemon(true); - t.start(); - return t; -} - -/** - * Creates a java.util.concurrent.Callable from a given script - * function. - */ -Function.prototype.callable = function() { - var args = arguments; - var func = this; - return new java.util.concurrent.Callable() { - call: function() { return func.apply(null, args); } - } -} - -/** - * Registers the script function so that it will be called exit. - */ -Function.prototype.atexit = function () { - var args = arguments; - java.lang.Runtime.getRuntime().addShutdownHook( - new java.lang.Thread(this.runnable.apply(this, args))); -} - -/** - * Executes the function asynchronously. - * - * @return a java.util.concurrent.FutureTask - */ -Function.prototype.future = (function() { - // default executor for future - var juc = java.util.concurrent; - var theExecutor = juc.Executors.newSingleThreadExecutor(); - // clean-up the default executor at exit - (function() { theExecutor.shutdown(); }).atexit(); - return function() { - return theExecutor.submit(this.callable.apply(this, arguments)); - } -})(); - -// shortcut for j.u.c lock classes -var Lock = java.util.concurrent.locks.ReentrantLock; -var RWLock = java.util.concurrent.locks.ReentrantReadWriteLock; - -/** - * Executes a function after acquiring given lock. On return, - * (normal or exceptional), lock is released. - * - * @param lock lock that is locked and unlocked - */ -Function.prototype.sync = function (lock) { - if (arguments.length == 0) { - throw "lock is missing"; - } - var res = new Array(arguments.length - 1); - for (var i = 0; i < res.length; i++) { - res[i] = arguments[i + 1]; - } - lock.lock(); - try { - this.apply(null, res); - } finally { - lock.unlock(); - } -}; - -/** - * Causes current thread to sleep for specified - * number of milliseconds - * - * @param interval in milliseconds - */ -function sleep(interval) { - java.lang.Thread.sleep(interval); -} -sleep.docString = "wrapper for java.lang.Thread.sleep method"; - -/** - * Schedules a task to be executed once in N milliseconds specified. - * - * @param callback function or expression to evaluate - * @param interval in milliseconds to sleep - * @return timeout ID (which is nothing but Thread instance) - */ -function setTimeout(callback, interval) { - if (! (callback instanceof Function)) { - callback = new Function(callback); - } - - // start a new thread that sleeps given time - // and calls callback in an infinite loop - return (function() { - try { - sleep(interval); - } catch (x) { } - callback(); - }).daemon(); -} -setTimeout.docString = "calls given callback once after specified interval"; - -/** - * Cancels a timeout set earlier. - * @param tid timeout ID returned from setTimeout - */ -function clearTimeout(tid) { - // we just interrupt the timer thread - tid.interrupt(); -} -clearTimeout.docString = "interrupt a setTimeout timer"; - -/** - * Schedules a task to be executed once in - * every N milliseconds specified. - * - * @param callback function or expression to evaluate - * @param interval in milliseconds to sleep - * @return timeout ID (which is nothing but Thread instance) - */ -function setInterval(callback, interval) { - if (! (callback instanceof Function)) { - callback = new Function(callback); - } - - // start a new thread that sleeps given time - // and calls callback in an infinite loop - return (function() { - while (true) { - try { - sleep(interval); - } catch (x) { - break; - } - callback(); - } - }).daemon(); -} -setInterval.docString = "calls given callback every specified interval"; - -/** - * Cancels a timeout set earlier. - * @param tid timeout ID returned from setTimeout - */ -function clearInterval(tid) { - // we just interrupt the timer thread - tid.interrupt(); -} -clearInterval.docString = "interrupt a setInterval timer"; - -/** - * Simple access to thread local storage. - * - * Script sample: - * - * __thread.x = 44; - * function f() { - * __thread.x = 'hello'; - * print(__thread.x); - * } - * f.thread(); // prints 'hello' - * print(__thread.x); // prints 44 in main thread - */ -var __thread = (function () { - var map = new Object(); - return new JSAdapter() { - __has__: function(name) { - return map[name] != undefined; - }, - __get__: function(name) { - if (map[name] != undefined) { - return map[name].get(); - } else { - return undefined; - } - }, - __put__: sync(function(name, value) { - if (map[name] == undefined) { - var tmp = new java.lang.ThreadLocal(); - tmp.set(value); - map[name] = tmp; - } else { - map[name].set(value); - } - }), - __delete__: function(name) { - if (map[name] != undefined) { - map[name].set(null); - } - } - } -})(); - -// user interface utilities - -/** - * Swing invokeLater - invokes given function in AWT event thread - */ -Function.prototype.invokeLater = function() { - var SwingUtilities = Packages.javax.swing.SwingUtilities; - SwingUtilities.invokeLater(this.runnable.apply(this, arguments)); -} - -/** - * Swing invokeAndWait - invokes given function in AWT event thread - * and waits for it's completion - */ -Function.prototype.invokeAndWait = function() { - var SwingUtilities = Packages.javax.swing.SwingUtilities; - SwingUtilities.invokeAndWait(this.runnable.apply(this, arguments)); -} - -/** - * Am I running in AWT event dispatcher thread? - */ -function isEventThread() { - var SwingUtilities = Packages.javax.swing.SwingUtilities; - return SwingUtilities.isEventDispatchThread(); -} -isEventThread.docString = "returns whether the current thread is GUI thread"; - -/** - * Opens a file dialog box - * - * @param curDir current directory [optional] - * @return absolute path if file selected or else null - */ -function fileDialog(curDir) { - var result; - function _fileDialog() { - if (curDir == undefined) curDir = undefined; - var JFileChooser = Packages.javax.swing.JFileChooser; - var dialog = new JFileChooser(curDir); - var res = dialog.showOpenDialog(null); - if (res == JFileChooser.APPROVE_OPTION) { - result = dialog.getSelectedFile().getAbsolutePath(); - } else { - result = null; - } - } - - if (isEventThread()) { - _fileDialog(); - } else { - _fileDialog.invokeAndWait(); - } - return result; -} -fileDialog.docString = "show a FileOpen dialog box"; - -/** - * Shows a message box - * - * @param msg message to be shown - * @param title title of message box [optional] - * @param msgType type of message box [constants in JOptionPane] - */ -function msgBox(msg, title, msgType) { - - function _msgBox() { - var JOptionPane = Packages.javax.swing.JOptionPane; - if (msg === undefined) msg = "undefined"; - if (msg === null) msg = "null"; - if (title == undefined) title = msg; - if (msgType == undefined) msgType = JOptionPane.INFORMATION_MESSAGE; - JOptionPane.showMessageDialog(window, msg, title, msgType); - } - if (isEventThread()) { - _msgBox(); - } else { - _msgBox.invokeAndWait(); - } -} -msgBox.docString = "shows MessageBox to the user"; - -/** - * Shows an information alert box - * - * @param msg message to be shown - * @param title title of message box [optional] - */ -function alert(msg, title) { - var JOptionPane = Packages.javax.swing.JOptionPane; - msgBox(msg, title, JOptionPane.INFORMATION_MESSAGE); -} -alert.docString = "shows an alert message box to the user"; - -/** - * Shows an error alert box - * - * @param msg message to be shown - * @param title title of message box [optional] - */ -function error(msg, title) { - var JOptionPane = Packages.javax.swing.JOptionPane; - msgBox(msg, title, JOptionPane.ERROR_MESSAGE); -} -error.docString = "shows an error message box to the user"; - - -/** - * Shows a warning alert box - * - * @param msg message to be shown - * @param title title of message box [optional] - */ -function warn(msg, title) { - var JOptionPane = Packages.javax.swing.JOptionPane; - msgBox(msg, title, JOptionPane.WARNING_MESSAGE); -} -warn.docString = "shows a warning message box to the user"; - - -/** - * Shows a prompt dialog box - * - * @param question question to be asked - * @param answer default answer suggested [optional] - * @return answer given by user - */ -function prompt(question, answer) { - var result; - function _prompt() { - var JOptionPane = Packages.javax.swing.JOptionPane; - if (answer == undefined) answer = ""; - result = JOptionPane.showInputDialog(window, question, answer); - } - if (isEventThread()) { - _prompt(); - } else { - _prompt.invokeAndWait(); - } - return result; -} -prompt.docString = "shows a prompt box to the user and returns the answer"; - -/** - * Shows a confirmation dialog box - * - * @param msg message to be shown - * @param title title of message box [optional] - * @return boolean (yes->true, no->false) - */ -function confirm(msg, title) { - var result; - var JOptionPane = Packages.javax.swing.JOptionPane; - function _confirm() { - if (title == undefined) title = msg; - var optionType = JOptionPane.YES_NO_OPTION; - result = JOptionPane.showConfirmDialog(null, msg, title, optionType); - } - if (isEventThread()) { - _confirm(); - } else { - _confirm.invokeAndWait(); - } - return result == JOptionPane.YES_OPTION; -} -confirm.docString = "shows a confirmation message box to the user"; - -/** - * Echoes zero or more arguments supplied to screen. - * This is print equivalent for GUI. - * - * @param zero or more items to echo. - */ -function echo() { - var args = arguments; - (function() { - var len = args.length; - for (var i = 0; i < len; i++) { - window.print(args[i]); - window.print(" "); - } - window.print("\n"); - }).invokeLater(); -} -echo.docString = "echoes arguments to interactive console screen"; - - -/** - * Clear the screen - */ -function clear() { - (function() { window.clear(false); }).invokeLater(); -} -clear.docString = "clears interactive console screen"; - - -// synonym for clear -var cls = clear; - - -/** - * Exit the process after confirmation from user - * - * @param exitCode return code to OS [optional] - */ -function exit(exitCode) { - if (exitCode == undefined) exitCode = 0; - if (confirm("Do you really want to exit?")) { - java.lang.System.exit(exitCode); - } -} -exit.docString = "exits jconsole"; - -// synonym to exit -var quit = exit; - diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/heapdump.js b/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/heapdump.js deleted file mode 100644 index 7cb53225a11..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/heapdump.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - * This file defines heapdump function to heap dump - * in binary format. User can call this function - * based on events. For example, a timer thread can - * keep checking heap threshold and depending on - * specific expected threshold value, it can call - * heapdump to dump the keep. File name can contain - * timestamp so that multiple heapdumps can be generated - * for the same process. - */ - -/** - * Function to dump heap in binary format. - * - * @param file heap dump file name [optional] - */ -function heapdump(file) { - // no file specified, show file open dialog - if (file == undefined) { - file = fileDialog(); - // check whether user cancelled the dialog - if (file == null) return; - } - - /* - * Get HotSpotDiagnostic MBean and wrap it as convenient - * script wrapper using 'mbean' function. Instead of using - * MBean proxies 'mbean' function creates a script wrapper - * that provides similar convenience but uses explicit - * invocation behind the scene. This implies that mbean - * wrapper would the same for dynamic MBeans as well. - */ - var diagBean = mbean("com.sun.management:type=HotSpotDiagnostic"); - - // dump the heap in the file - diagBean.dumpHeap(file, true); -} diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/hello.js b/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/hello.js deleted file mode 100644 index 6c0acd36138..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/hello.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - * This is sample JavaScript file that can be loaded into script console. - * This file prints "hello, world". - */ - -echo("hello, world"); diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/invoke.js b/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/invoke.js deleted file mode 100644 index 919769bc493..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/invoke.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - * This script demonstrates "invokeMBean" function. Instead - * of using MXBean proxy or script wrapper object returned by - * 'mbean' function, this file uses direct invoke on MBean. - * - * To use this particular script, load this script file in - * script console prompt and call resetPeakThreadCount(). - - */ - -/** - * Resets the peak thread count to the current number of live threads. - * - */ -function resetPeakThreadCount() { - return invokeMBean("java.lang:type=Threading", "resetPeakThreadCount", [], {}); -} - diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/jstack.js b/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/jstack.js deleted file mode 100644 index aff7d7c04e1..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/jstack.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - * This file defines 'jstack' function to print stack traces of - * threads.'jstack' function which can be called once or periodically - * from a timer thread (calling it periodically would slow down the target - * application). To call this once, just call 'jstack()' in script - * console prompt. To call jstack in a timer thread, you can use - * - * var t = setInterval(function () { jstack(print); }, 5000); - * - * The above call prints threads in sorted order for every 5 seconds. - * The print output goes to OS console window from which jconsole was - * started. The timer can be cancelled later by clearTimeout() function - * as shown below: - * - * clearInterval(t); - */ - - -/** - * print given ThreadInfo using given printFunc - */ -function printThreadInfo(ti, printFunc) { - printFunc(ti.threadId + " - " + ti.threadName + " - " + ti.threadState); - var stackTrace = ti.stackTrace; - for (var i in stackTrace) { - printFunc("\t" + stackTrace[i]); - } -} - -/** - * print stack traces of all threads. - * - * @param printFunc function called to print [optional] - * @param maxFrames maximum number of frames to print [optional] - */ -function jstack(printFunc, maxFrames) { - // by default use 'echo' to print. Other choices could be - // 'print' or custom function that writes in a text file - if (printFunc == undefined) { - printFunc = echo; - } - - // by default print 25 frames - if (maxFrames == undefined) { - maxFrames = 25; - } - - var tmbean = newPlatformMXBeanProxy( - "java.lang:type=Threading", - java.lang.management.ThreadMXBean.class); - - var tids = tmbean.allThreadIds; - var tinfos = tmbean["getThreadInfo(long[],int)"](tids, maxFrames); - - for (var i in tinfos) { - printThreadInfo(tinfos[i], printFunc); - } -} diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/jtop.js b/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/jtop.js deleted file mode 100644 index 2733b12a69e..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/jtop.js +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - * This code is "ported" from JTop demo. This file defines - * 'jtop' function. jtop prints threads sorting by CPU time. - * jtop can be called once or periodically from a timer thread. - * To call this once, just call 'jtop()' in script console prompt. - * To call jtop in a timer thread, you can use - * - * var t = setInterval(function () { jtop(print); }, 2000); - * - * The above call prints threads in sorted order for every 2 seconds. - * The print output goes to OS console window from which jconsole was - * started. The timer can be cancelled later by clearTimeout() function - * as shown below: - * - * clearInterval(t); - */ - -/** - * This function returns a List of Map.Entry objects - * in which each entry maps cpu time to ThreadInfo. - */ -function getThreadList() { - var tmbean = newPlatformMXBeanProxy( - "java.lang:type=Threading", - java.lang.management.ThreadMXBean.class); - - if (!tmbean.isThreadCpuTimeSupported()) { - return java.util.Collections.EMPTY_LIST; - } - - tmbean.setThreadCpuTimeEnabled(true); - - var tids = tmbean.allThreadIds; - var tinfos = tmbean["getThreadInfo(long[])"](tids); - - var map = new java.util.TreeMap(); - for (var i in tids) { - var cpuTime = tmbean.getThreadCpuTime(tids[i]); - if (cpuTime != -1 && tinfos[i] != null) { - map.put(cpuTime, tinfos[i]); - } - } - var list = new java.util.ArrayList(map.entrySet()); - java.util.Collections.reverse(list); - return list; -} - -/** - * This function prints threads sorted by CPU time. - * - * @param printFunc function called back to print [optional] - * - * By default, it uses 'echo' function to print in screen. - * Other choices could be 'print' (prints in console), 'alert' - * to show message box. Or you can define a function that writes - * the output to a text file. - */ -function jtop(printFunc) { - if (printFunc == undefined) { - printFunc = echo; - } - var list = getThreadList(); - var itr = list.iterator(); - printFunc("time - state - name"); - while (itr.hasNext()) { - var entry = itr.next(); - // time is in nanoseconds - convert to seconds - var time = entry.key / 1.0e9; - var name = entry.value.threadName; - var state = entry.value.threadState; - printFunc(time + " - " + state + " - " + name); - } -} diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/sysprops.js b/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/sysprops.js deleted file mode 100644 index 5ff958d836e..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/sysprops.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - * This file defines 'sysprops' function to print Java System - * properties.'sysprops' function which can be called once or periodically - * from a timer thread (calling it periodically would slow down the target - * application). To call this once, just call 'sysprops()' in script - * console prompt. To call sysprops in a timer thread, you can use - * - * var t = setInterval(function () { sysprops(print); }, 5000); - * - * The above call prints threads in sorted order for every 5 seconds. - * The print output goes to OS console window from which jconsole was - * started. The timer can be cancelled later by clearTimeout() function - * as shown below: - * - * clearInterval(t); - */ - - -/** - * Returns System properties as a Map - */ -function getSystemProps() { - var runtimeBean = newPlatformMXBeanProxy( - "java.lang:type=Runtime", - java.lang.management.RuntimeMXBean.class); - return runtimeBean.systemProperties; -} - -/** - * print System properties - * - * @param printFunc function called to print [optional] - */ -function sysprops(printFunc) { - // by default use 'echo' to print. Other choices could be - // 'print' or custom function that writes in a text file - if (printFunc == undefined) { - printFunc = echo; - } - - var map = getSystemProps(); - var keys = map.keySet().iterator(); - while (keys.hasNext()) { - var key = keys.next(); - var value = map.get(key); - printFunc(key + "=" + value); - } -} diff --git a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/verbose.js b/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/verbose.js deleted file mode 100644 index a749ce36c65..00000000000 --- a/jdk/src/demo/share/scripting/jconsole-plugin/src/scripts/verbose.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - * This script demonstrates "getMBeanAttribute" - * and "setMBeanAttribute" functions. Instead of using - * MXBean proxy or script wrapper object returned by - * 'mbean' function, this file uses direct get/set MBean - * attribute functions. - * - * To use this particular script, load this script file in - * script console prompt and call verboseGC or verboseClass - * functions. These functions based on events such as - * heap threshold crossing a given limit. i.e., A timer thread - * can keep checking for threshold event and then turn on - * verbose:gc or verbose:class based on expected event. - - */ - -/** - * Get or set verbose GC flag. - * - * @param flag verbose mode flag [optional] - * - * If flag is not passed verboseGC returns current - * flag value. - */ -function verboseGC(flag) { - if (flag == undefined) { - // no argument passed. interpret this as 'get' - return getMBeanAttribute("java.lang:type=Memory", "Verbose"); - } else { - return setMBeanAttribute("java.lang:type=Memory", "Verbose", flag); - } -} - -/** - * Get or set verbose class flag. - * - * @param flag verbose mode flag [optional] - * - * If flag is not passed verboseClass returns current - * flag value. - */ -function verboseClass(flag) { - if (flag == undefined) { - // no argument passed. interpret this as 'get' - return getMBeanAttribute("java.lang:type=ClassLoading", "Verbose"); - } else { - return setMBeanAttribute("java.lang:type=ClassLoading", "Verbose", flag); - } -} diff --git a/jdk/src/demo/solaris/jni/Poller/Client.java b/jdk/src/demo/solaris/jni/Poller/Client.java deleted file mode 100644 index ffa706eabc9..00000000000 --- a/jdk/src/demo/solaris/jni/Poller/Client.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.util.*; -import java.net.*; -import java.io.*; - -public class Client -{ - private final static int BYTESPEROP= PollingServer.BYTESPEROP; - private final static int PORTNUM = PollingServer.PORTNUM; - private final static int MAXCONN = PollingServer.MAXCONN; - - private static Socket[] sockArr = new Socket[MAXCONN]; - private static int totalConn =10; - private static int bytesToSend =1024000; - private static int connections = 0; - private static int sends = 0; - - public static void main (String args[]) { - - String host = "localhost"; - - if (args.length < 1 || args.length > 3) { - System.out.println("Usage : java Client "); - System.out.println(" | java Client "); - System.out.println(" | java Client " + - " "); - System.exit(-1); - } - - if (args.length >= 1) - totalConn = java.lang.Integer.valueOf(args[0]).intValue(); - if (args.length >= 2) - host = args[1]; - if (args.length == 3) - bytesToSend = java.lang.Integer.valueOf(args[2]).intValue() * 1024; - - - if (totalConn <= 0 || totalConn > MAXCONN) { - System.out.println("Connections out of range. Terminating."); - System.exit(-1); - } - - System.out.println("Using " + totalConn + " connections for sending " + - bytesToSend + " bytes to " + host); - - - try { - Socket ctrlSock = new Socket (host, PORTNUM); - PrintStream ctrlStream = - new PrintStream(ctrlSock.getOutputStream()); - ctrlStream.println(bytesToSend); - ctrlStream.println(totalConn); - - while (connections < totalConn ) { - sockArr[connections] = new Socket (host, PORTNUM); - connections ++; - } - System.out.println("Connections made : " + connections); - - byte[] buff = new byte[BYTESPEROP]; - for (int i = 0; i < BYTESPEROP; i++) // just put some junk in! - buff[i] = (byte) i; - - Random rand = new Random(5321L); - while (sends < bytesToSend/BYTESPEROP) { - int idx = java.lang.Math.abs(rand.nextInt()) % totalConn; - sockArr[idx].getOutputStream().write(buff,0,BYTESPEROP); - sends++; - } - // Wait for server to say done. - int bytes = ctrlSock.getInputStream().read(buff, 0, BYTESPEROP); - System.out.println (" Total connections : " + connections + - " Bytes sent : " + sends * BYTESPEROP + - "...Done!"); - } catch (Exception e) { e.printStackTrace(); } - } -} diff --git a/jdk/src/demo/solaris/jni/Poller/LinkedQueue.java b/jdk/src/demo/solaris/jni/Poller/LinkedQueue.java deleted file mode 100644 index bc70554f3e7..00000000000 --- a/jdk/src/demo/solaris/jni/Poller/LinkedQueue.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - File: SLQ.java - Originally: LinkedQueue.java - - Originally written by Doug Lea and released into the public domain. - This may be used for any purposes whatsoever without acknowledgment. - Thanks for the assistance and support of Sun Microsystems Labs, - and everyone contributing, testing, and using this code. - - History: - Date Who What - 11Jun1998 dl Create public version - 25aug1998 dl added peek - 10dec1998 dl added isEmpty - 10jun1999 bc modified for isolated use -*/ - -// Original was in package EDU.oswego.cs.dl.util.concurrent; - -/** - * A linked list based channel implementation, - * adapted from the TwoLockQueue class from CPJ. - * The algorithm avoids contention between puts - * and takes when the queue is not empty. - * Normally a put and a take can proceed simultaneously. - * (Although it does not allow multiple concurrent puts or takes.) - * This class tends to perform more efficently than - * other Channel implementations in producer/consumer - * applications. - *

    [ Introduction to this package. ] - **/ - -public class LinkedQueue { - - - /** - * Dummy header node of list. The first actual node, if it exists, is always - * at head_.next. After each take, the old first node becomes the head. - **/ - protected LinkedNode head_; - protected int count_; - /** - * Helper monitor for managing access to last node, in case it is also first. - * last_ and waitingForTake_ ONLY used with synch on appendMonitor_ - **/ - protected final Object lastMonitor_ = new Object(); - - /** - * The last node of list. Put() appends to list, so modifies last_ - **/ - protected LinkedNode last_; - - /** - * The number of threads waiting for a take. - * Notifications are provided in put only if greater than zero. - * The bookkeeping is worth it here since in reasonably balanced - * usages, the notifications will hardly ever be necessary, so - * the call overhead to notify can be eliminated. - **/ - protected int waitingForTake_ = 0; - - public LinkedQueue() { - head_ = new LinkedNode(null); - last_ = head_; - count_ = 0; - } - - /** Main mechanics for put/offer **/ - protected void insert(Object x) { - synchronized(lastMonitor_) { - LinkedNode p = new LinkedNode(x); - last_.next = p; - last_ = p; - count_++; - if (count_ > 1000 && (count_ % 1000 == 0)) - System.out.println("In Queue : " + count_); - if (waitingForTake_ > 0) - lastMonitor_.notify(); - } - } - - /** Main mechanics for take/poll **/ - protected synchronized Object extract() { - Object x = null; - LinkedNode first = head_.next; - if (first != null) { - x = first.value; - first.value = null; - head_ = first; - count_ --; - } - return x; - } - - - public void put(Object x) throws InterruptedException { - if (x == null) throw new IllegalArgumentException(); - if (Thread.interrupted()) throw new InterruptedException(); - insert(x); - } - - public boolean offer(Object x, long msecs) throws InterruptedException { - if (x == null) throw new IllegalArgumentException(); - if (Thread.interrupted()) throw new InterruptedException(); - insert(x); - return true; - } - - public Object take() throws InterruptedException { - if (Thread.interrupted()) throw new InterruptedException(); - // try to extract. If fail, then enter wait-based retry loop - Object x = extract(); - if (x != null) - return x; - else { - synchronized(lastMonitor_) { - try { - ++waitingForTake_; - for (;;) { - x = extract(); - if (x != null) { - --waitingForTake_; - return x; - } - else { - lastMonitor_.wait(); - } - } - } - catch(InterruptedException ex) { - --waitingForTake_; - lastMonitor_.notify(); - throw ex; - } - } - } - } - - public synchronized Object peek() { - LinkedNode first = head_.next; - if (first != null) - return first.value; - else - return null; - } - - - public synchronized boolean isEmpty() { - return head_.next == null; - } - - public Object poll(long msecs) throws InterruptedException { - if (Thread.interrupted()) throw new InterruptedException(); - Object x = extract(); - if (x != null) - return x; - else { - synchronized(lastMonitor_) { - try { - long waitTime = msecs; - long start = (msecs <= 0)? 0 : System.currentTimeMillis(); - ++waitingForTake_; - for (;;) { - x = extract(); - if (x != null || waitTime <= 0) { - --waitingForTake_; - return x; - } - else { - lastMonitor_.wait(waitTime); - waitTime = msecs - (System.currentTimeMillis() - start); - } - } - } - catch(InterruptedException ex) { - --waitingForTake_; - lastMonitor_.notify(); - throw ex; - } - } - } - } - - class LinkedNode { - Object value; - LinkedNode next = null; - LinkedNode(Object x) { value = x; } - LinkedNode(Object x, LinkedNode n) { value = x; next = n; } - } -} diff --git a/jdk/src/demo/solaris/jni/Poller/Poller.c b/jdk/src/demo/solaris/jni/Poller/Poller.c deleted file mode 100644 index 5c627ac57ca..00000000000 --- a/jdk/src/demo/solaris/jni/Poller/Poller.c +++ /dev/null @@ -1,753 +0,0 @@ -/* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* - ********************************************************************** - * Poller.c : - * JNI code for use with Poller.java, principally to take advantage - * of poll() or /dev/poll multiplexing. - * - * One will need Solaris 8 or Solaris 7 with adequate patches to take - * advantage of the /dev/poll performance enhancements, though any - * version of Solaris 7 will automatically use the kernel poll() - * caching. And poll() will function in 2.5.1 and 2.6 as well, but - * will not perform well for large numbers of file descriptors. - * - * Several assumptions have been made to simplify this code : - * 1> At most MAX_HANDLES (32) separate pollable entities are currently - * supported. - * 2> Global synchronization from Java is assumed for all init, create - * and destroy routines. Per Object (handle passed in) synchronization - * is required for all AddFd, RemoveFd, IsMember, and Wait routines. - * 3> It is currently up to the user to handle waking up an - * existing nativeWait() call to do an addfd or removefd on - * that set...could implement that here with an extra pipe, or - * with a pair of loopback sockets in Poller.java or user code. - * In most cases interruption is not necessary for deletions, - * so long as deletions are queued up outside the Poller class - * and then executed the next time waitMultiple() returns. - * 4> /dev/poll performance could be slightly improved by coalescing - * adds/removes so that a write() is only done before the ioctl - * (DP_POLL), but this complicates exception handling and sees - * only modest performance gains so wasn't done. - * 5> /dev/poll does not report errors on attempts to remove non- - * extant fds, but a future bug fix to the /dev/poll device driver - * should solve this problem. - * 6> Could add simpler code for pre-Solaris 7 releases which will - * perform slightly better on those OSs. But again there - * are only modest gains to be had from these new code paths, - * so they've been omitted here. - * - * Compile "cc -G -o /libpoller.so -I ${JAVA_HOME}/include " \ - * -I ${JAVA_HOME}/include/solaris Poller.c" and place the - * in your LD_LIBRARY_PATH - * - ********************************************************************** - */ - -#include -#include -#include -#include -#include -#include - - -/* - * Remove "_NOT"s to turn on features - * Append "_NOT" to turn off features. - * Use of /dev/poll requires both the include file and kernel driver. - */ -#define DEBUG_NOT -#define DEVPOLL_NOT - -#ifdef DEVPOLL -#include -#endif - -#include "Poller.h" - -#define MAX_HANDLES 32 - - -#ifdef DEBUG -#define DBGMSG(x) printf x -#define ASSERT(x) {if (!(x)) \ - printf("assertion(%s) failed at line : %d\n",#x,__LINE__);} -#define CHECK_HANDLE(x) check_handle(x) -#else -#define DBGMSG(x) -#define ASSERT(x) -#define CHECK_HANDLE(x) -#endif - -/* - * Globals ...protect all with a global synchronization object. - */ - -static int Current_handle = 0; -static int Use_devpoll = 0; -static int Max_index = 0; - -/* - * Per Poller object data. - * Must be synchronized on a per Poller object basis. - */ - -typedef struct ioevent { - int inuse; - int devpollfd; - int last_index; - int total_free; - int left_events; - int max_index; - pollfd_t *pfd; -} ioevent_t; - -static ioevent_t IOE_handles[MAX_HANDLES]; - - /* - * Exceptions to be thrown. - * Note : assuming all illegal argument and NULL pointer checks - * have already been done by the Java calling methods. - */ -static jint throwOutOfMemoryError(JNIEnv *env, const char * cause) -{ - (*env)->ThrowNew(env, (*env)->FindClass(env,"java/lang/OutOfMemoryError"), - cause); - return -1; -} -static jint throwInterruptedIOException(JNIEnv *env, const char * cause) -{ - (*env)->ThrowNew(env, - (*env)->FindClass(env,"java/io/InterruptedIOException"), - cause); - return -1; -} -static jint throwIllegalStateException(JNIEnv *env, const char * cause) -{ - (*env)->ThrowNew(env, - (*env)->FindClass(env,"java/lang/IllegalStateException"), - cause); - return -1; -} - -#define MEMORY_EXCEPTION(str) throwOutOfMemoryError(env, "Poller:" str) -#define STATE_EXCEPTION(str) throwIllegalStateException(env, "Poller:" str) -#define INTERRUPT_EXCEPTION(str) throwInterruptedIOException(env, \ - "Poller:" str) -jint addfd(JNIEnv *, ioevent_t *, jint, jshort); -jint removefd(JNIEnv *, ioevent_t *, jint); - - /* - * Class Poller - * Method: nativeInit - * Signature: ()I - * - * Only to be called once, right after this library is loaded, - * so no need to deal with reentrancy here. - * Could do as a pragma ini, but that isn't as portable. - */ -JNIEXPORT jint JNICALL Java_Poller_nativeInit(JNIEnv *env, jclass cls) -{ - int testdevpollfd; - int i; - -#ifdef DEVPOLL - /* - * See if we can use this much faster method - * Note : must have fix for BUGID # 4223353 or OS can crash! - */ - testdevpollfd = open("/dev/poll",O_RDWR); - if (testdevpollfd >= 0) { - /* - * If Solaris 7, we need a patch - * Until we know what string to search for, we'll play it - * safe and disable this for Solaris 7. - */ - - if (!strcmp(name.release,"5.7")) - { - Use_devpoll = 0; - } - else - { - Use_devpoll = 1; - } - } - - DBGMSG(("Use_devpoll=%d\n" ,Use_devpoll)); - close(testdevpollfd); -#endif - - /* - * For now, we optimize for Solaris 7 if /dev/poll isn't - * available, as it is only a small % hit for Solaris < 7. - * if ( (Use_devpoll == 0) && !strcmp(name.release,"5.6") ) - * Use_sol7opt = 0; - */ - Current_handle = 0; - for (i = 0; i < MAX_HANDLES; i++) { - IOE_handles[i].devpollfd = -1; - IOE_handles[i].pfd = NULL; - } - - /* - * this tells me the max number of open filedescriptors - */ - Max_index = sysconf(_SC_OPEN_MAX); - if (Max_index < 0) { - Max_index = 1024; - } - - DBGMSG(("got sysconf(_SC_OPEN_MAX)=%d file desc\n",Max_index)); - - return 0; -} - -JNIEXPORT jint JNICALL Java_Poller_getNumCPUs(JNIEnv *env, jclass cls) -{ - return sysconf(_SC_NPROCESSORS_ONLN); -} - - /* - * Class: Poller - * Method: nativeCreatePoller - * Signature: (I)I - * Note : in the case where /dev/poll doesn't exist, - * using more than one poll array could hurt - * Solaris 7 performance due to kernel caching. - */ - -JNIEXPORT jint JNICALL Java_Poller_nativeCreatePoller - (JNIEnv *env, jobject obj, jint maximum_fds) -{ - int handle, retval, i; - ioevent_t *ioeh; - - if (maximum_fds == -1) { - maximum_fds = Max_index; - } - handle = Current_handle; - if (Current_handle >= MAX_HANDLES) { - for (i = 0; i < MAX_HANDLES; i++) { - if (IOE_handles[i].inuse == 0) { - handle = i; - break; - } - } - if (handle >= MAX_HANDLES) { - return MEMORY_EXCEPTION("CreatePoller - MAX_HANDLES exceeded"); - } - } else { - Current_handle++; - } - - ioeh = &IOE_handles[handle]; - - ioeh->inuse = 1; - - ioeh->last_index = 0; - ioeh->total_free = 0; - ioeh->left_events = 0; - ioeh->max_index = maximum_fds; - - retval = handle; - if (Use_devpoll) { - ioeh->devpollfd = open("/dev/poll",O_RDWR); - DBGMSG(("Opened /dev/poll, set devpollfd = %d\n",ioeh->devpollfd)); - if (ioeh->devpollfd < 0) { - Current_handle--; - return MEMORY_EXCEPTION("CreatePoller - can\'t open /dev/poll"); - } - } - ioeh->pfd = malloc(maximum_fds * sizeof(pollfd_t)); - if (ioeh->pfd == NULL) { - Current_handle--; - return MEMORY_EXCEPTION("CreatePoller - malloc failure"); - } - - return retval; -} - - /* - * Class: Poller - * Method: nativeDestroyPoller - * Signature: (I)V - */ -JNIEXPORT void JNICALL Java_Poller_nativeDestroyPoller - (JNIEnv *env, jobject obj, jint handle) -{ - - ioevent_t *ioeh; - - if (handle < 0 || handle >= MAX_HANDLES) - { - STATE_EXCEPTION("DestroyPoller - handle out of range"); - return; - } - - ioeh = &IOE_handles[handle]; - ioeh->inuse = 0; - if (Use_devpoll) { - close(ioeh->devpollfd); - } - free(ioeh->pfd); -} - -#ifdef DEBUG -static void check_handle(ioevent_t *ioeh) -{ - int i,used,unused; - - used=unused=0; - for (i = 0; i < ioeh->last_index; i++) - { - if (ioeh->pfd[i].fd == -1) - unused++; - else - used++; - } - if (unused != ioeh->total_free) - printf("WARNING : found %d free, claimed %d. Used : %d\n", - unused, ioeh->total_free, used); -} -#endif - - /* - * Class: Poller - * Method: nativeAddFd - * Signature: (IIS)I - * - * Currently doesn't check to make sure we aren't adding - * an fd already added (no problem for /dev/poll...just - * an array waster for poll()). - */ -JNIEXPORT jint JNICALL Java_Poller_nativeAddFd - (JNIEnv *env, jobject obj, jint handle, jint fd, jshort events) -{ - int retval; - ioevent_t *ioeh; - - if (handle < 0 || handle >= MAX_HANDLES) - return STATE_EXCEPTION("AddFd - handle out of range"); - - ioeh = &IOE_handles[handle]; - - CHECK_HANDLE(ioeh); - - #ifdef DEVPOLL - if (Use_devpoll) - { - int i; - pollfd_t pollelt; - - /* - * use /dev/poll - */ - pollelt.fd = fd; - pollelt.events = events; - if ((i = write(ioeh->devpollfd, &pollelt, sizeof(pollfd_t))) != - sizeof(pollfd_t)) { - DBGMSG(("write to devpollfd=%d showed %d bytes out of %d\n", - ioeh->devpollfd,i,sizeof(pollfd_t))); - return STATE_EXCEPTION("AddFd - /dev/poll add failure"); - } - else - { - retval = fd; - } - } - else - #endif - { /* no /dev/poll available */ - retval = addfd(env, ioeh, fd, events); - } - return retval; -} - -/* - * Addfd to pollfd array...optimized for Solaris 7 - */ -jint addfd(JNIEnv *env, ioevent_t *ioeh, jint fd, jshort events) -{ - int idx; - - if (ioeh->total_free) - { - /* - * Traversing from end because that's where we pad. - */ - ioeh->total_free--; - for (idx = ioeh->last_index - 1; idx >= 0; idx--) { - if (ioeh->pfd[idx].fd == -1) - break; - } - } - else if (ioeh->last_index >= ioeh->max_index) - { - return MEMORY_EXCEPTION("AddFd - too many fds"); - } - else - { - int i; - int new_total; - /* - * For Solaris 7, want to add some growth space - * and fill extras with fd=-1. This allows for - * kernel poll() implementation to perform optimally. - */ - new_total = ioeh->last_index; - new_total += (new_total/10) + 1; /* bump size by 10% */ - if (new_total > ioeh->max_index) - new_total = ioeh->max_index; - for (i = ioeh->last_index; i <= new_total; i++) - { - ioeh->pfd[i].fd = -1; - } - idx = ioeh->last_index; - ioeh->total_free = new_total - ioeh->last_index - 1; - DBGMSG(("Just grew from %d to %d in size\n", - ioeh->last_index, new_total)); - ioeh->last_index = new_total; - } - ASSERT((idx >= 0) && (idx <= ioeh->max_index)); - ASSERT(ioeh->pfd[idx].fd == -1); - ioeh->pfd[idx].fd = fd; - ioeh->pfd[idx].events = events; - ioeh->pfd[idx].revents = 0; - - CHECK_HANDLE(ioeh); - - return fd; -} - -/* - * Class: Poller - * Method: nativeRemoveFd - * Signature: (II)I - */ -JNIEXPORT jint JNICALL Java_Poller_nativeRemoveFd - (JNIEnv *env, jobject obj, jint handle, jint fd) -{ - ioevent_t *ioeh; - - if (handle < 0 || handle >= MAX_HANDLES) - return STATE_EXCEPTION("RemoveFd - handle out of range"); - - ioeh = &IOE_handles[handle]; - - #ifdef DEVPOLL - if (Use_devpoll) - { - /* - * use /dev/poll - currently no need for locking here. - */ - pollfd_t pollelt; - - pollelt.fd = fd; - pollelt.events = POLLREMOVE; - if (write(ioeh->devpollfd, &pollelt, - sizeof(pollfd_t) ) != sizeof(pollfd_t)) - { - return STATE_EXCEPTION("RemoveFd - /dev/poll failure"); - } - } - else - #endif DEVPOLL - { - return removefd(env, ioeh,fd); - } -} -/* - * remove from pollfd array...optimize for Solaris 7 - */ -jint removefd(JNIEnv *env, ioevent_t *ioeh, jint fd) -{ - int i; - int found = 0; - - { /* !Use_devpoll */ - for (i = 0; i < ioeh->last_index; i++) - { - if (ioeh->pfd[i].fd == fd) - { - ioeh->pfd[i].fd = -1; - found = 1; - break; - } - } - if (!found) - { - return STATE_EXCEPTION("RemoveFd - no such fd"); - } - ioeh->left_events = 0; /* Have to go back to the kernel */ - ioeh->total_free++; - /* - * Shrinking pool if > 33% empty. Just don't do this often! - */ - if ( (ioeh->last_index > 100) && - (ioeh->total_free > (ioeh->last_index / 3)) ) - { - int j; - /* - * we'll just bite the bullet here, since we're > 33% empty. - * walk through and eliminate -1 fd values, shrink total - * size to still have ~ 10 fd==-1 values at end. - * Start at end (since we pad here) and, when we find fd != -1, - * swap with an earlier fd == -1 until we have all -1 values - * at the end. - */ - CHECK_HANDLE(ioeh); - for (i = ioeh->last_index - 1, j = 0; i > j; i--) - { - if (ioeh->pfd[i].fd != -1) - { - while ( (j < i) && (ioeh->pfd[j].fd != -1) ) - j++; - DBGMSG( ("i=%d,j=%d,ioeh->pfd[j].fd=%d\n", - i, j, ioeh->pfd[j].fd) ); - if (j < i) - { - ASSERT(ioeh->pfd[j].fd == -1); - ioeh->pfd[j].fd = ioeh->pfd[i].fd; - ioeh->pfd[j].events = ioeh->pfd[i].events; - ioeh->pfd[i].fd = -1; - } - } - } - DBGMSG(("Just shrunk from %d to %d in size\n", - ioeh->last_index, j+11)); - ioeh->last_index = j + 11; /* last_index always 1 greater */ - ioeh->total_free = 10; - CHECK_HANDLE(ioeh); - } - } /* !Use_devpoll */ - - return 1; -} - - /* - * Class: Poller - * Method: nativeIsMember - * Signature: (II)I - */ -JNIEXPORT jint JNICALL Java_Poller_nativeIsMember - (JNIEnv *env, jobject obj, jint handle, jint fd) -{ - int found = 0; - int i; - ioevent_t *ioeh; - - if (handle < 0 || handle >= MAX_HANDLES) - return STATE_EXCEPTION("IsMember - handle out of range"); - - ioeh = &IOE_handles[handle]; - - #ifdef DEVPOLL - if (Use_devpoll) - { - pollfd_t pfd; - /* - * DEVPOLL ioctl DP_ISPOLLED call to determine if fd is polled. - */ - pfd.fd = fd; - pfd.events = 0; - pfd.revents = 0; - found = ioctl(ioeh->devpollfd, DP_ISPOLLED, &pfd); - if (found == -1) - { - return STATE_EXCEPTION("IsMember - /dev/poll failure"); - } - } - else - #endif - { - for (i = 0; i < ioeh->last_index; i++) - { - if (fd == ioeh->pfd[i].fd) - { - found = 1; - break; - } - } - } - - return found; -} - - /* - * Class: Poller - * Method: nativeWait - * Signature: (II[I[SJ)I - */ -JNIEXPORT jint JNICALL Java_Poller_nativeWait - (JNIEnv *env, jobject obj, jint handle, jint maxEvents, - jintArray jfds, jshortArray jrevents, jlong timeout) -{ - int useEvents, count, idx; - short *reventp; - jint *fdp; - int retval; - ioevent_t *ioeh; - jboolean isCopy1,isCopy2; - - if (handle < 0 || handle >= MAX_HANDLES) - return STATE_EXCEPTION("nativeWait - handle out of range"); - - ioeh = &IOE_handles[handle]; - - if (maxEvents == 0) /* just doing a kernel delay! */ - { - useEvents = poll(NULL,0L,timeout); - return 0; - } - - #ifdef DEVPOLL - if (Use_devpoll) - { - struct dvpoll dopoll; - /* - * DEVPOLL ioctl DP_POLL call, reading - */ - dopoll.dp_timeout = timeout; - dopoll.dp_nfds=maxEvents; - dopoll.dp_fds=ioeh->pfd; - - useEvents = ioctl(ioeh->devpollfd, DP_POLL, &dopoll); - while ((useEvents == -1) && (errno == EAGAIN)) - useEvents = ioctl(ioeh->devpollfd, DP_POLL, &dopoll); - - if (useEvents == -1) - { - if (errno == EINTR) - return INTERRUPT_EXCEPTION("nativeWait - /dev/poll failure EINTR"); - else - return STATE_EXCEPTION("nativeWait - /dev/poll failure"); - } - - reventp =(*env)->GetShortArrayElements(env,jrevents,&isCopy1); - fdp =(*env)->GetIntArrayElements(env,jfds,&isCopy2); - for (idx = 0,count = 0; idx < useEvents; idx++) - { - if (ioeh->pfd[idx].revents) - { - fdp[count] = ioeh->pfd[idx].fd; - reventp[count] = ioeh->pfd[idx].revents; - count++; - } - } - if (count < useEvents) - return STATE_EXCEPTION("Wait - Corrupted internals"); - - if (isCopy1 == JNI_TRUE) - (*env)->ReleaseShortArrayElements(env,jrevents,reventp,0); - if (isCopy2 == JNI_TRUE) - (*env)->ReleaseIntArrayElements(env,jfds,fdp,0); - } - else - #endif - { /* !Use_devpoll */ - - /* no leftovers=>go to kernel */ - if (ioeh->left_events == 0) - { - useEvents = poll(ioeh->pfd,ioeh->last_index, timeout); - while ((useEvents == -1) && (errno == EAGAIN)) - useEvents = poll(ioeh->pfd,ioeh->last_index, timeout); - if (useEvents == -1) - { - if (errno == EINTR) - return INTERRUPT_EXCEPTION("Wait - poll() failure EINTR-" \ - "IO interrupted."); - else if (errno == EINVAL) - return STATE_EXCEPTION("Wait - poll() failure EINVAL-" \ - "invalid args (is fdlim cur < max?)"); - else - return STATE_EXCEPTION("Wait - poll() failure"); - } - ioeh->left_events = useEvents; - DBGMSG(("waitnative : poll returns : %d\n",useEvents)); - } - else - { /* left over from last call */ - useEvents = ioeh->left_events; - } - - if (useEvents > maxEvents) - { - useEvents = maxEvents; - } - - ioeh->left_events -= useEvents; /* left to process */ - - DBGMSG(("waitnative : left %d, use %d, max %d\n",ioeh->left_events, - useEvents,maxEvents)); - - if (useEvents > 0) - { - reventp =(*env)->GetShortArrayElements(env,jrevents,&isCopy1); - fdp =(*env)->GetIntArrayElements(env,jfds,&isCopy2); - for (idx = 0,count = 0; (idx < ioeh->last_index) && - (count < useEvents); idx++) - { - if (ioeh->pfd[idx].revents) - { - fdp[count] = ioeh->pfd[idx].fd; - reventp[count] = ioeh->pfd[idx].revents; - /* in case of leftover for next walk */ - ioeh->pfd[idx].revents = 0; - count++; - } - } - if (count < useEvents) - { - ioeh->left_events = 0; - return STATE_EXCEPTION("Wait - Corrupted internals"); - } - if (isCopy1 == JNI_TRUE) - (*env)->ReleaseShortArrayElements(env,jrevents,reventp,0); - if (isCopy2 == JNI_TRUE) - (*env)->ReleaseIntArrayElements(env,jfds,fdp,0); - } - } /* !Use_devpoll */ - - return useEvents; -} diff --git a/jdk/src/demo/solaris/jni/Poller/Poller.java b/jdk/src/demo/solaris/jni/Poller/Poller.java deleted file mode 100644 index a144dfbcb1f..00000000000 --- a/jdk/src/demo/solaris/jni/Poller/Poller.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.lang.reflect.*; -import java.io.*; -import java.net.*; - -/** - * This class is provided for access to the underlying poll(2) - * or /dev/poll kernel interfaces. This may be needed for - * multiplexing IO when an application cannot afford to have - * a thread block on each outstanding IO request. - * - * It currently supports the same basic functionality as the - * C poll(2) API, although for efficiency we needed to avoid - * passing the entire pollfd array for every call. See man - * pages for poll(2) for info on C API and event types. - * - * - * @author Bruce Chapman - * @see java.io.FileDescriptor - * @see java.net.Socket - * @see attached README.txt - * @since 1.2 - */ - -public class Poller { - /** - * Solaris POLL event types. - */ - public final static short POLLERR = 0x08; - public final static short POLLHUP = 0x10; - public final static short POLLNVAL = 0x20; - public final static short POLLIN = 1; - public final static short POLLPRI = 2; - public final static short POLLOUT = 4; - public final static short POLLRDNORM = 0x40; - public final static short POLLWRNORM = POLLOUT ; - public final static short POLLRDBAND = 0x80; - public final static short POLLWRBAND = 0x100; - public final static short POLLNORM = POLLRDNORM; - - /* - * This global synchronization object must be used for all - * creation or destruction of Poller objects. - */ - private final static Object globalSync = new Object(); - - /* - * The handle for a Poller Object...is used in the JNI C code - * where all the associated data is kept. - */ - private int handle; - - /** - * Constructs an instance of a Poller object. - * Native code uses sysconf(_SC_OPEN_MAX) to determine how - * many fd/skt objects this Poller object can contain. - */ - public Poller() throws Exception { - synchronized(globalSync) { - this.handle = nativeCreatePoller(-1); - } - } - - /** - * Constructs an instance of a Poller object. - * @param maxFd the maximum number of FileDescriptors/Sockets - * this Poller object can contain. - */ - public Poller(int maxFd) throws Exception { - synchronized(globalSync) { - this.handle = nativeCreatePoller(maxFd); - } - } - - /** - * Needed to clean up at the JNI C level when object is GCd. - */ - protected void finalize() throws Throwable { - synchronized(globalSync) { - nativeDestroyPoller(handle); - super.finalize(); - } - } - - /** - * Since we can't guarantee WHEN finalize is called, we may - * recycle on our own. - * @param maxFd the maximum number of FileDescriptors/Sockets - * this Poller object can contain. - */ - public void reset(int maxFd) throws Exception { - synchronized(globalSync) { - nativeDestroyPoller(handle); - this.handle = nativeCreatePoller(maxFd); - } - } - /** - * Since we can't guarantee WHEN finalize is called, we may - * recycle on our own. - */ - public void reset() throws Exception { - synchronized(globalSync) { - nativeDestroyPoller(handle); - this.handle = nativeCreatePoller(-1); - } - } - - /** - * Add FileDescriptor to the set handled by this Poller object. - * - * @param fdObj the FileDescriptor, Socket, or ServerSocket to add. - * @param event the bitmask of events we are interested in. - * @return the OS level fd associated with this IO Object - * (which is what waitMultiple() stores in fds[]) - */ - public synchronized int add(Object fdObj, short event) throws Exception { - return nativeAddFd(handle,findfd(fdObj), event); - } - - /** - * Remove FileDescriptor from the set handled by this Poller object. - * - * Must be called before the fd/skt is closed. - * @param fdObj the FileDescriptor, Socket, or ServerSocket to remove. - * @return true if removal succeeded. - */ - public synchronized boolean remove(Object fdObj) throws Exception { - return (nativeRemoveFd(handle,findfd(fdObj)) == 1); - } - /** - * Check if fd or socket is already in the set handled by this Poller object - * - * @param fdObj the FileDescriptor or [Server]Socket to check. - * @return true if fd/skt is in the set for this Poller object. - */ - public synchronized boolean isMember(Object fdObj) throws Exception { - return (nativeIsMember(handle,findfd(fdObj)) == 1); - } - /** - * Wait on Multiple IO Objects. - * - * @param maxRet the maximum number of fds[] and revents[] to return. - * @param fds[] (return) an array of ints in which to store fds with - * available data upon a successful non-timeout return. - * fds.length must be >= maxRet - * @param revents[] (return) the actual events available on the - * same-indexed fds[] (i.e. fds[0] has events revents[0]) - * revents.length must be >= maxRet - * - * Note : both above arrays are "dense," i.e. only fds[] with events - * available are returned. - * - * @param timeout the maximum number of milliseconds to wait for - * events before timing out. - * @return the number of fds with triggered events. - * - * Note : convenience methods exist for skipping the timeout parameter - * or the maxRet parameter (in the case of no maxRet, fds.length - * must equal revents.length) - * - * obj.waitMultiple(null,null,timeout) can be used for pausing the LWP - * (much more reliable and scalable than Thread.sleep() or Object.wait()) - */ - public synchronized int waitMultiple(int maxRet, int[] fds,short[] revents, - long timeout) throws Exception - { - if ((revents == null) || (fds == null)) { - if (maxRet > 0) { - throw new NullPointerException("fds or revents is null"); - } - } else if ( (maxRet < 0) || - (maxRet > revents.length) || (maxRet > fds.length) ) { - throw new IllegalArgumentException("maxRet out of range"); - } - - int ret = nativeWait(handle, maxRet, fds, revents, timeout); - if (ret < 0) { - throw new InterruptedIOException(); - } - return ret; - } - - /** - * Wait on Multiple IO Objects (no timeout). - * A convenience method for waiting indefinitely on IO events - * - * @see Poller#waitMultiple - * - */ - public int waitMultiple(int maxRet, int[] fds, short[] revents) - throws Exception - { - return waitMultiple(maxRet, fds, revents,-1L); // already synchronized - } - - /** - * Wait on Multiple IO Objects (no maxRet). - * A convenience method for waiting on IO events when the fds - * and revents arrays are the same length and that specifies the - * maximum number of return events. - * - * @see Poller#waitMultiple - * - */ - public synchronized int waitMultiple(int[] fds, short[] revents, - long timeout) throws Exception - { - if ((revents == null) && (fds == null)) { - return nativeWait(handle,0,null,null,timeout); - } else if ((revents == null) || (fds == null)) { - throw new NullPointerException("revents or fds is null"); - } else if (fds.length == revents.length) { - return nativeWait(handle, fds.length, fds, revents, timeout); - } - throw new IllegalArgumentException("fds.length != revents.length"); - } - - - /** - * Wait on Multiple IO Objects (no maxRet/timeout). - * A convenience method for waiting on IO events when the fds - * and revents arrays are the same length and that specifies the - * maximum number of return events, and when waiting indefinitely - * for IO events to occur. - * - * @see Poller#waitMultiple - * - */ - public int waitMultiple(int[] fds, short[] revents) - throws Exception - { - if ((revents == null) || (fds == null)) { - throw new NullPointerException("fds or revents is null"); - } else if (fds.length == revents.length) { - return waitMultiple(revents.length,fds,revents,-1L); // already sync - } - throw new IllegalArgumentException("fds.length != revents.length"); - } - - // Utility - get (int) fd from FileDescriptor or [Server]Socket objects. - - private int findfd(Object fdObj) throws Exception { - Class cl; - Field f; - Object val, implVal; - - if ((fdObj instanceof java.net.Socket) || - (fdObj instanceof java.net.ServerSocket)) { - cl = fdObj.getClass(); - f = cl.getDeclaredField("impl"); - f.setAccessible(true); - val = f.get(fdObj); - cl = f.getType(); - f = cl.getDeclaredField("fd"); - f.setAccessible(true); - implVal = f.get(val); - cl = f.getType(); - f = cl.getDeclaredField("fd"); - f.setAccessible(true); - return ((Integer) f.get(implVal)).intValue(); - } else if ( fdObj instanceof java.io.FileDescriptor ) { - cl = fdObj.getClass(); - f = cl.getDeclaredField("fd"); - f.setAccessible(true); - return ((Integer) f.get(fdObj)).intValue(); - } - else { - throw new IllegalArgumentException("Illegal Object type."); - } - } - - // Actual NATIVE calls - - private static native int nativeInit(); - private native int nativeCreatePoller(int maxFd) throws Exception; - private native void nativeDestroyPoller(int handle) throws Exception; - private native int nativeAddFd(int handle, int fd, short events) - throws Exception; - private native int nativeRemoveFd(int handle, int fd) throws Exception; - private native int nativeRemoveIndex(int handle, int index) - throws Exception; - private native int nativeIsMember(int handle, int fd) throws Exception; - private native int nativeWait(int handle, int maxRet, int[] fds, - short[] events, long timeout) - throws Exception; - /** - * Get number of active CPUs in this machine - * to determine proper level of concurrency. - */ - public static native int getNumCPUs(); - - static { - System.loadLibrary("poller"); - nativeInit(); - } -} diff --git a/jdk/src/demo/solaris/jni/Poller/PollingServer.java b/jdk/src/demo/solaris/jni/Poller/PollingServer.java deleted file mode 100644 index 5cb26260398..00000000000 --- a/jdk/src/demo/solaris/jni/Poller/PollingServer.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.net.*; -import java.lang.Byte; - -/** - * Simple Java "server" using the Poller class - * to multiplex on incoming connections. Note - * that handoff of events, via linked Q is not - * actually be a performance booster here, since - * the processing of events is cheaper than - * the overhead in scheduling/executing them. - * Although this demo does allow for concurrency - * in handling connections, it uses a rather - * primitive "gang scheduling" policy to keep - * the code simpler. - */ - -public class PollingServer -{ - public final static int MAXCONN = 10000; - public final static int PORTNUM = 4444; - public final static int BYTESPEROP = 10; - - /** - * This synchronization object protects access to certain - * data (bytesRead,eventsToProcess) by concurrent Consumer threads. - */ - private final static Object eventSync = new Object(); - - private static InputStream[] instr = new InputStream[MAXCONN]; - private static int[] mapping = new int[65535]; - private static LinkedQueue linkedQ = new LinkedQueue(); - private static int bytesRead = 0; - private static int bytesToRead; - private static int eventsToProcess=0; - - public PollingServer(int concurrency) { - Socket[] sockArr = new Socket[MAXCONN]; - long timestart, timestop; - short[] revents = new short[MAXCONN]; - int[] fds = new int[MAXCONN]; - int bytes; - Poller Mux; - int serverFd; - int totalConn=0; - int connects=0; - - System.out.println ("Serv: Initializing port " + PORTNUM); - try { - - ServerSocket skMain = new ServerSocket (PORTNUM); - /* - * Create the Poller object Mux, allow for up to MAXCONN - * sockets/filedescriptors to be polled. - */ - Mux = new Poller(MAXCONN); - serverFd = Mux.add(skMain, Poller.POLLIN); - - Socket ctrlSock = skMain.accept(); - - BufferedReader ctrlReader = - new BufferedReader(new InputStreamReader(ctrlSock.getInputStream())); - String ctrlString = ctrlReader.readLine(); - bytesToRead = Integer.valueOf(ctrlString).intValue(); - ctrlString = ctrlReader.readLine(); - totalConn = Integer.valueOf(ctrlString).intValue(); - - System.out.println("Receiving " + bytesToRead + " bytes from " + - totalConn + " client connections"); - - timestart = System.currentTimeMillis(); - - /* - * Start the consumer threads to read data. - */ - for (int consumerThread = 0; - consumerThread < concurrency; consumerThread++ ) { - new Consumer(consumerThread).start(); - } - - /* - * Take connections, read Data - */ - int numEvents=0; - - while ( bytesRead < bytesToRead ) { - - int loopWaits=0; - while (eventsToProcess > 0) { - synchronized (eventSync) { - loopWaits++; - if (eventsToProcess <= 0) break; - try { eventSync.wait(); } catch (Exception e) {e.printStackTrace();}; - } - } - if (loopWaits > 1) - System.out.println("Done waiting...loops = " + loopWaits + - " events " + numEvents + - " bytes read : " + bytesRead ); - - if (bytesRead >= bytesToRead) break; // may be done! - - /* - * Wait for events - */ - numEvents = Mux.waitMultiple(100, fds, revents); - synchronized (eventSync) { - eventsToProcess = numEvents; - } - /* - * Process all the events we got from Mux.waitMultiple - */ - int cnt = 0; - while ( (cnt < numEvents) && (bytesRead < bytesToRead) ) { - int fd = fds[cnt]; - - if (revents[cnt] == Poller.POLLIN) { - if (fd == serverFd) { - /* - * New connection coming in on the ServerSocket - * Add the socket to the Mux, keep track of mapping - * the fdval returned by Mux.add to the connection. - */ - sockArr[connects] = skMain.accept(); - instr[connects] = sockArr[connects].getInputStream(); - int fdval = Mux.add(sockArr[connects], Poller.POLLIN); - mapping[fdval] = connects; - synchronized(eventSync) { - eventsToProcess--; // just processed this one! - } - connects++; - } else { - /* - * We've got data from this client connection. - * Put it on the queue for the consumer threads to process. - */ - linkedQ.put(new Integer(fd)); - } - } else { - System.out.println("Got revents[" + cnt + "] == " + revents[cnt]); - } - cnt++; - } - } - timestop = System.currentTimeMillis(); - System.out.println("Time for all reads (" + totalConn + - " sockets) : " + (timestop-timestart)); - - // Tell the client it can now go away - byte[] buff = new byte[BYTESPEROP]; - ctrlSock.getOutputStream().write(buff,0,BYTESPEROP); - - // Tell the cunsumer threads they can exit. - for (int cThread = 0; cThread < concurrency; cThread++ ) { - linkedQ.put(new Integer(-1)); - } - } catch (Exception exc) { exc.printStackTrace(); } - } - - /* - * main ... just check if a concurrency was specified - */ - public static void main (String args[]) - { - int concurrency; - - if (args.length == 1) - concurrency = java.lang.Integer.valueOf(args[0]).intValue(); - else - concurrency = Poller.getNumCPUs() + 1; - PollingServer server = new PollingServer(concurrency); - } - - /* - * This class is for handling the Client data. - * The PollingServer spawns off a number of these based upon - * the number of CPUs (or concurrency argument). - * Each just loops grabbing events off the queue and - * processing them. - */ - class Consumer extends Thread { - private int threadNumber; - public Consumer(int i) { threadNumber = i; } - - public void run() { - byte[] buff = new byte[BYTESPEROP]; - int bytes = 0; - - InputStream instream; - while (bytesRead < bytesToRead) { - try { - Integer Fd = (Integer) linkedQ.take(); - int fd = Fd.intValue(); - if (fd == -1) break; /* got told we could exit */ - - /* - * We have to map the fd value returned from waitMultiple - * to the actual input stream associated with that fd. - * Take a look at how the Mux.add() was done to see how - * we stored that. - */ - int map = mapping[fd]; - instream = instr[map]; - bytes = instream.read(buff,0,BYTESPEROP); - } catch (Exception e) { System.out.println(e.toString()); } - - if (bytes > 0) { - /* - * Any real server would do some synchronized and some - * unsynchronized work on behalf of the client, and - * most likely send some data back...but this is a - * gross oversimplification. - */ - synchronized(eventSync) { - bytesRead += bytes; - eventsToProcess--; - if (eventsToProcess <= 0) { - eventSync.notify(); - } - } - } - } - } - } -} diff --git a/jdk/src/demo/solaris/jni/Poller/README.txt b/jdk/src/demo/solaris/jni/Poller/README.txt deleted file mode 100644 index d665c221e8b..00000000000 --- a/jdk/src/demo/solaris/jni/Poller/README.txt +++ /dev/null @@ -1,174 +0,0 @@ -README.txt - - -This Poller class demonstrates access to poll(2) functionality in Java. - -Requires Solaris production (native threads) JDK 1.2 or later, currently -the C code compiles only on Solaris (SPARC and Intel). - -Poller.java is the class, Poller.c is the supporting JNI code. - -PollingServer.java is a sample application which uses the Poller class -to multiplex sockets. - -SimpleServer.java is the functional equivalent that does not multiplex -but uses a single thread to handle each client connection. - -Client.java is a sample application to drive against either server. - -To build the Poller class and client/server demo : - javac PollingServer.java Client.java - javah Poller - cc -G -o libpoller.so -I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/solaris\ - Poller.c - -You will need to set the environment variable LD_LIBRARY_PATH to search -the directory containing libpoller.so. - -To use client/server, bump up your fd limit to handle the connections you -want (need root access to go beyond 1024). For info on changing your file -descriptor limit, type "man limit". If you are using Solaris 2.6 -or later, a regression in loopback read() performance may hit you at low -numbers of connections, so run the client on another machine. - -BASICs of Poller class usage : - run "javadoc Poller" or see Poller.java for more details. - -{ - Poller Mux = new Poller(65535); // allow it to contain 64K IO objects - - int fd1 = Mux.add(socket1, Poller.POLLIN); - ... - int fdN = Mux.add(socketN, Poller.POLLIN); - - int[] fds = new int[100]; - short[] revents = new revents[100]; - - int numEvents = Mux.waitMultiple(100, fds, revents, timeout); - - for (int i = 0; i < numEvents; i++) { - /* - * Probably need more sophisticated mapping scheme than this! - */ - if (fds[i] == fd1) { - System.out.println("Got data on socket1"); - socket1.getInputStream().read(byteArray); - // Do something based upon state of fd1 connection - } - ... - } -} - -Poller class implementation notes : - - Currently all add(),remove(),isMember(), and waitMultiple() methods -are synchronized for each Poller object. If one thread is blocked in -pObj.waitMultiple(), another thread calling pObj.add(fd) will block -until waitMultiple() returns. There is no provided mechanism to -interrupt waitMultiple(), as one might expect a ServerSocket to be in -the list waited on (see PollingServer.java). - - One might also need to interrupt waitMultiple() to remove() -fds/sockets, in which case one could create a Pipe or loopback localhost -connection (at the level of PollingServer) and use a write() to that -connection to interrupt. Or, better, one could queue up deletions -until the next return of waitMultiple(). Or one could implement an -interrupt mechanism in the JNI C code using a pipe(), and expose that -at the Java level. - - If frequent deletions/re-additions of socks/fds is to be done with -very large sets of monitored fds, the Solaris 7 kernel cache will -likely perform poorly without some tuning. One could differentiate -between deleted (no longer cared for) fds/socks and those that are -merely being disabled while data is processed on their behalf. In -that case, re-enabling a disabled fd/sock could put it in it's -original position in the poll array, thereby increasing the kernel -cache performance. This would best be done in Poller.c. Of course -this is not necessary for optimal /dev/poll performance. - - Caution...the next paragraph gets a little technical for the -benefit of those who already understand poll()ing fairly well. Others -may choose to skip over it to read notes on the demo server. - - An optimal solution for frequent enabling/disabling of socks/fds -could involve a separately synchronized structure of "async" -operations. Using a simple array (0..64k) containing the action -(ADD,ENABLE,DISABLE, NONE), the events, and the index into the poll -array, and having nativeWait() wake up in the poll() call periodically -to process these async operations, I was able to speed up performance -of the PollingServer by a factor of 2x at 8000 connections. Of course -much of that gain was from the fact that I could (with the advent of -an asyncAdd() method) move the accept() loop into a separate thread -from the main poll() loop, and avoid the overhead of calling poll() -with up to 7999 fds just for an accept. In implementing the async -Disable/Enable, a further large optimization was to auto-disable fds -with events available (before return from nativeWait()), so I could -just call asyncEnable(fd) after processing (read()ing) the available -data. This removed the need for inefficient gang-scheduling the -attached PollingServer uses. In order to separately synchronize the -async structure, yet still be able to operate on it from within -nativeWait(), synchronization had to be done at the C level here. Due -to the new complexities this introduced, as well as the fact that it -was tuned specifically for Solaris 7 poll() improvements (not -/dev/poll), this extra logic was left out of this demo. - - -Client/Server Demo Notes : - - Do not run the sample client/server with high numbers of connections -unless you have a lot of free memory on your machine, as it can saturate -CPU and lock you out of CDE just by its very resource intensive nature -(much more so the SimpleServer than PollingServer). - - Different OS versions will behave very differently as far as poll() -performance (or /dev/poll existence) but, generally, real world applications -"hit the wall" much earlier when a separate thread is used to handle -each client connection. Issues of thread synchronization and locking -granularity become performance killers. There is some overhead associated -with multiplexing, such as keeping track of the state of each connection; as -the number of connections gets very large, however, this overhead is more -than made up for by the reduced synchronization overhead. - - As an example, running the servers on a Solaris 7 PC (Pentium II-350 x -2 CPUS) with 1 GB RAM, and the client on an Ultra-2, I got the following -times (shorter is better) : - - 1000 connections : - -PollingServer took 11 seconds -SimpleServer took 12 seconds - - 4000 connections : - -PollingServer took 20 seconds -SimpleServer took 37 seconds - - 8000 connections : - -PollingServer took 39 seconds -SimpleServer took 1:48 seconds - - This demo is not, however, meant to be considered some form of proof -that multiplexing with the Poller class will gain you performance; this -code is actually very heavily biased towards the non-polling server as -very little synchronization is done, and most of the overhead is in the -kernel IO for both servers. Use of multiplexing may be helpful in -many, but certainly not all, circumstances. - - Benchmarking a major Java server application which can run -in a single-thread-per-client mode or using the new Poller class showed -Poller provided a 253% improvement in throughput at a moderate load, as -well as a 300% improvement in peak capacity. It also yielded a 21% -smaller memory footprint at the lower load level. - - Finally, there is code in Poller.c to take advantage of /dev/poll -on OS versions that have that device; however, DEVPOLL must be defined -in compiling Poller.c (and it must be compiled on a machine with -/usr/include/sys/devpoll.h) to use it. Code compiled with DEVPOLL -turned on will work on machines that don't have kernel support for -the device, as it will fall back to using poll() in those cases. -Currently /dev/poll does not correctly return an error if you attempt -to remove() an object that was never added, but this should be fixed -in an upcoming /dev/poll patch. The binary as shipped is not built with -/dev/poll support as our build machine does not have devpoll.h. - diff --git a/jdk/src/demo/solaris/jni/Poller/SimpleServer.java b/jdk/src/demo/solaris/jni/Poller/SimpleServer.java deleted file mode 100644 index 6a099c67071..00000000000 --- a/jdk/src/demo/solaris/jni/Poller/SimpleServer.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.net.*; -import java.lang.Byte; - -/** - * Simple Java "server" using a single thread to handle each connection. - */ - -public class SimpleServer -{ - private final static int BYTESPEROP= PollingServer.BYTESPEROP; - private final static int PORTNUM = PollingServer.PORTNUM; - private final static int MAXCONN = PollingServer.MAXCONN; - - /* - * This synchronization object protects access to certain - * data (bytesRead,eventsToProcess) by concurrent Consumer threads. - */ - private final static Object eventSync = new Object(); - - private static InputStream[] instr = new InputStream[MAXCONN]; - private static int bytesRead; - private static int bytesToRead; - - public SimpleServer() { - Socket[] sockArr = new Socket[MAXCONN]; - long timestart, timestop; - int bytes; - int totalConn=0; - - - System.out.println ("Serv: Initializing port " + PORTNUM); - try { - - ServerSocket skMain = new ServerSocket (PORTNUM); - - bytesRead = 0; - Socket ctrlSock = skMain.accept(); - - BufferedReader ctrlReader = - new BufferedReader(new InputStreamReader(ctrlSock.getInputStream())); - String ctrlString = ctrlReader.readLine(); - bytesToRead = Integer.valueOf(ctrlString).intValue(); - ctrlString = ctrlReader.readLine(); - totalConn = Integer.valueOf(ctrlString).intValue(); - - System.out.println("Receiving " + bytesToRead + " bytes from " + - totalConn + " client connections"); - - timestart = System.currentTimeMillis(); - - /* - * Take connections, spawn off connection handling threads - */ - ConnHandler[] connHA = new ConnHandler[MAXCONN]; - int conn = 0; - while ( conn < totalConn ) { - Socket sock = skMain.accept(); - connHA[conn] = new ConnHandler(sock.getInputStream()); - connHA[conn].start(); - conn++; - } - - while ( bytesRead < bytesToRead ) { - java.lang.Thread.sleep(500); - } - timestop = System.currentTimeMillis(); - System.out.println("Time for all reads (" + totalConn + - " sockets) : " + (timestop-timestart)); - // Tell the client it can now go away - byte[] buff = new byte[BYTESPEROP]; - ctrlSock.getOutputStream().write(buff,0,BYTESPEROP); - } catch (Exception exc) { exc.printStackTrace(); } - } - - /* - * main ... just create invoke the SimpleServer constructor. - */ - public static void main (String args[]) - { - SimpleServer server = new SimpleServer(); - } - - /* - * Connection Handler inner class...one of these per client connection. - */ - class ConnHandler extends Thread { - private InputStream instr; - public ConnHandler(InputStream inputStr) { instr = inputStr; } - - public void run() { - try { - int bytes; - byte[] buff = new byte[BYTESPEROP]; - - while ( bytesRead < bytesToRead ) { - bytes = instr.read (buff, 0, BYTESPEROP); - if (bytes > 0 ) { - synchronized(eventSync) { - bytesRead += bytes; - } - /* - * Any real server would do some synchronized and some - * unsynchronized work on behalf of the client, and - * most likely send some data back...but this is a - * gross oversimplification. - */ - } - else { - if (bytesRead < bytesToRead) - System.out.println("instr.read returned : " + bytes); - } - } - } - catch (Exception e) {e.printStackTrace();} - } - } -} diff --git a/jdk/src/java.base/aix/native/libnet/aix_close.c b/jdk/src/java.base/aix/native/libnet/aix_close.c index 1588d485640..51bf81f1d21 100644 --- a/jdk/src/java.base/aix/native/libnet/aix_close.c +++ b/jdk/src/java.base/aix/native/libnet/aix_close.c @@ -419,10 +419,8 @@ int NET_ReadV(int s, const struct iovec * vector, int count) { } int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, - struct sockaddr *from, int *fromlen) { - socklen_t socklen = *fromlen; - BLOCKING_IO_RETURN_INT( s, recvfrom(s, buf, len, flags, from, &socklen) ); - *fromlen = socklen; + struct sockaddr *from, socklen_t *fromlen) { + BLOCKING_IO_RETURN_INT( s, recvfrom(s, buf, len, flags, from, fromlen) ); } int NET_Send(int s, void *msg, int len, unsigned int flags) { @@ -438,10 +436,8 @@ int NET_SendTo(int s, const void *msg, int len, unsigned int BLOCKING_IO_RETURN_INT( s, sendto(s, msg, len, flags, to, tolen) ); } -int NET_Accept(int s, struct sockaddr *addr, int *addrlen) { - socklen_t socklen = *addrlen; - BLOCKING_IO_RETURN_INT( s, accept(s, addr, &socklen) ); - *addrlen = socklen; +int NET_Accept(int s, struct sockaddr *addr, socklen_t *addrlen) { + BLOCKING_IO_RETURN_INT( s, accept(s, addr, addrlen) ); } int NET_Connect(int s, struct sockaddr *addr, int addrlen) { diff --git a/jdk/src/java.base/linux/native/libnio/ch/EPoll.c b/jdk/src/java.base/linux/native/libnio/ch/EPoll.c index ea9cdf4dd03..d6526c5d63a 100644 --- a/jdk/src/java.base/linux/native/libnio/ch/EPoll.c +++ b/jdk/src/java.base/linux/native/libnio/ch/EPoll.c @@ -95,9 +95,3 @@ Java_sun_nio_ch_EPoll_epollWait(JNIEnv *env, jclass c, } return res; } - -JNIEXPORT void JNICALL -Java_sun_nio_ch_EPoll_close0(JNIEnv *env, jclass c, jint epfd) { - int res; - RESTARTABLE(close(epfd), res); -} diff --git a/jdk/src/java.base/macosx/classes/java/net/DefaultInterface.java b/jdk/src/java.base/macosx/classes/java/net/DefaultInterface.java index 573de6986f8..b68e3aa0034 100644 --- a/jdk/src/java.base/macosx/classes/java/net/DefaultInterface.java +++ b/jdk/src/java.base/macosx/classes/java/net/DefaultInterface.java @@ -50,10 +50,11 @@ class DefaultInterface { } /** - * Choose a default interface. This method returns an interface that is - * both "up" and supports multicast. This method choses an interface in + * Choose a default interface. This method returns the first interface that + * is both "up" and supports multicast. This method chooses an interface in * order of preference: * 1. neither loopback nor point to point + * ( prefer interfaces with dual IP support ) * 2. point to point * 3. loopback * @@ -66,32 +67,56 @@ class DefaultInterface { try { nifs = NetworkInterface.getNetworkInterfaces(); } catch (IOException ignore) { - // unable to enumate network interfaces + // unable to enumerate network interfaces return null; } + NetworkInterface preferred = null; NetworkInterface ppp = null; NetworkInterface loopback = null; while (nifs.hasMoreElements()) { NetworkInterface ni = nifs.nextElement(); try { - if (ni.isUp() && ni.supportsMulticast()) { - boolean isLoopback = ni.isLoopback(); - boolean isPPP = ni.isPointToPoint(); - if (!isLoopback && !isPPP) { - // found an interface that is not the loopback or a - // point-to-point interface + if (!ni.isUp() || !ni.supportsMulticast()) + continue; + + boolean ip4 = false, ip6 = false; + Enumeration addrs = ni.getInetAddresses(); + while (addrs.hasMoreElements()) { + InetAddress addr = addrs.nextElement(); + if (!addr.isAnyLocalAddress()) { + if (addr instanceof Inet4Address) { + ip4 = true; + } else if (addr instanceof Inet6Address) { + ip6 = true; + } + } + } + + boolean isLoopback = ni.isLoopback(); + boolean isPPP = ni.isPointToPoint(); + if (!isLoopback && !isPPP) { + // found an interface that is not the loopback or a + // point-to-point interface + if (preferred == null) { + preferred = ni; + } else if (ip4 && ip6){ return ni; } - if (ppp == null && isPPP) - ppp = ni; - if (loopback == null && isLoopback) - loopback = ni; } + if (ppp == null && isPPP) + ppp = ni; + if (loopback == null && isLoopback) + loopback = ni; + } catch (IOException skip) { } } - return (ppp != null) ? ppp : loopback; + if (preferred != null) { + return preferred; + } else { + return (ppp != null) ? ppp : loopback; + } } } diff --git a/jdk/src/java.base/macosx/native/launcher/Info-privileged.plist b/jdk/src/java.base/macosx/native/launcher/Info-privileged.plist index 776967ab384..9b2fc0a32fc 100644 --- a/jdk/src/java.base/macosx/native/launcher/Info-privileged.plist +++ b/jdk/src/java.base/macosx/native/launcher/Info-privileged.plist @@ -7,7 +7,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - OpenJDK 7 Command + OpenJDK Command CFBundleShortVersionString 1.0 CFBundleVersion diff --git a/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c b/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c index b43f290b0a2..b11a4d00143 100644 --- a/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c +++ b/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,6 +46,8 @@ char *getPosixLocale(int cat) { #define LOCALEIDLENGTH 128 char *getMacOSXLocale(int cat) { + const char* retVal = NULL; + switch (cat) { case LC_MESSAGES: { @@ -72,33 +74,7 @@ char *getMacOSXLocale(int cat) { } CFRelease(languages); - // Language IDs use the language designators and (optional) region - // and script designators of BCP 47. So possible formats are: - // - // "en" (language designator only) - // "haw" (3-letter lanuage designator) - // "en-GB" (language with alpha-2 region designator) - // "es-419" (language with 3-digit UN M.49 area code) - // "zh-Hans" (language with ISO 15924 script designator) - // - // In the case of region designators (alpha-2 or UN M.49), we convert - // to our locale string format by changing '-' to '_'. That is, if - // the '-' is followed by fewer than 4 chars. - char* scriptOrRegion = strchr(languageString, '-'); - if (scriptOrRegion != NULL && strlen(scriptOrRegion) < 5) { - *scriptOrRegion = '_'; - - assert((strlen(scriptOrRegion) == 3 && - // '-' followed by a 2 character region designator - isalpha(scriptOrRegion[1]) && - isalpha(scriptOrRegion[2])) || - (strlen(scriptOrRegion) == 4 && - // '-' followed by a 3-digit UN M.49 area code - isdigit(scriptOrRegion[1]) && - isdigit(scriptOrRegion[2]) && - isdigit(scriptOrRegion[3]))); - } - const char* retVal = languageString; + retVal = languageString; // Special case for Portuguese in Brazil: // The language code needs the "_BR" region code (to distinguish it @@ -112,20 +88,58 @@ char *getMacOSXLocale(int cat) { strcmp(localeString, "pt_BR") == 0) { retVal = localeString; } - return strdup(retVal); } break; default: { char localeString[LOCALEIDLENGTH]; - if (CFStringGetCString(CFLocaleGetIdentifier(CFLocaleCopyCurrent()), - localeString, LOCALEIDLENGTH, CFStringGetSystemEncoding())) { - return strdup(localeString); + if (!CFStringGetCString(CFLocaleGetIdentifier(CFLocaleCopyCurrent()), + localeString, LOCALEIDLENGTH, CFStringGetSystemEncoding())) { + return NULL; } + retVal = localeString; } break; } + if (retVal != NULL) { + // Language IDs use the language designators and (optional) region + // and script designators of BCP 47. So possible formats are: + // + // "en" (language designator only) + // "haw" (3-letter lanuage designator) + // "en-GB" (language with alpha-2 region designator) + // "es-419" (language with 3-digit UN M.49 area code) + // "zh-Hans" (language with ISO 15924 script designator) + // "zh-Hans-US" (language with ISO 15924 script designator and region) + // "zh-Hans-419" (language with ISO 15924 script designator and UN M.49) + // + // In the case of region designators (alpha-2 and/or UN M.49), we convert + // to our locale string format by changing '-' to '_'. That is, if + // the '-' is followed by fewer than 4 chars. + char* scriptOrRegion = strchr(retVal, '-'); + if (scriptOrRegion != NULL) { + int length = strlen(scriptOrRegion); + if (length > 5) { + // Region and script both exist. Honor the script for now + scriptOrRegion[5] = '\0'; + } else if (length < 5) { + *scriptOrRegion = '_'; + + assert((length == 3 && + // '-' followed by a 2 character region designator + isalpha(scriptOrRegion[1]) && + isalpha(scriptOrRegion[2])) || + (length == 4 && + // '-' followed by a 3-digit UN M.49 area code + isdigit(scriptOrRegion[1]) && + isdigit(scriptOrRegion[2]) && + isdigit(scriptOrRegion[3]))); + } + } + + return strdup(retVal); + } return NULL; } diff --git a/jdk/src/java.base/macosx/native/libnet/DefaultProxySelector.c b/jdk/src/java.base/macosx/native/libnet/DefaultProxySelector.c index ab6f465da40..aa91f3012b2 100644 --- a/jdk/src/java.base/macosx/native/libnet/DefaultProxySelector.c +++ b/jdk/src/java.base/macosx/native/libnet/DefaultProxySelector.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java index a1c33ae1593..4503ec0e170 100644 --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, 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 @@ -42,10 +42,10 @@ import jdk.internal.HotSpotIntrinsicCandidate; * @author Andreas Sterbenz * @since 1.4.2 */ -final class CounterMode extends FeedbackCipher { +class CounterMode extends FeedbackCipher { // current counter value - private final byte[] counter; + final byte[] counter; // encrypted bytes of the previous counter value private final byte[] encryptedCounter; diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/DESKey.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/DESKey.java index d4493808167..d3f1c99df2a 100644 --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/DESKey.java +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/DESKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -149,6 +149,7 @@ final class DESKey implements SecretKey { * Ensures that the bytes of this key are * set to zero when there are no more references to it. */ + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { try { if (this.key != null) { diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/DESedeKey.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/DESedeKey.java index a0de5dc059c..9695ba39e6f 100644 --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/DESedeKey.java +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/DESedeKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -150,6 +150,7 @@ final class DESedeKey implements SecretKey { * Ensures that the bytes of this key are * set to zero when there are no more references to it. */ + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { try { if (this.key != null) { diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/GCTR.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/GCTR.java index f8a3eaa0a4c..ffa681c6a2b 100644 --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/GCTR.java +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/GCTR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -29,52 +29,43 @@ package com.sun.crypto.provider; -import java.security.*; -import javax.crypto.*; +import javax.crypto.IllegalBlockSizeException; import static com.sun.crypto.provider.AESConstants.AES_BLOCK_SIZE; /** * This class represents the GCTR function defined in NIST 800-38D - * under section 6.5. It needs to be constructed w/ an initialized - * cipher object, and initial counter block(ICB). Given an input X - * of arbitrary length, it processes and returns an output which has - * the same length as X. The invariants of this class are: - * - * (1) The length of intialCounterBlk (and also of its clones, e.g., - * fields counter and counterSave) is equal to AES_BLOCK_SIZE. - * - * (2) After construction, the field counter never becomes null, it - * always contains a byte array of length AES_BLOCK_SIZE. + * under section 6.5. With a given cipher object and initial counter + * block, a counter mode operation is performed. Blocksize is limited + * to 16 bytes. * * If any invariant is broken, failures can occur because the * AESCrypt.encryptBlock method can be intrinsified on the HotSpot VM * (see JDK-8067648 for details). * + * The counter mode operations can be intrinsified and parallelized + * by using CounterMode.implCrypt() if HotSpot VM supports it on the + * architecture. + * *

    This function is used in the implementation of GCM mode. * * @since 1.8 */ -final class GCTR { +final class GCTR extends CounterMode { - // these fields should not change after the object has been constructed - private final SymmetricCipher aes; - private final byte[] icb; - - // the current counter value - private byte[] counter; - - // needed for save/restore calls - private byte[] counterSave = null; - - // NOTE: cipher should already be initialized GCTR(SymmetricCipher cipher, byte[] initialCounterBlk) { - this.aes = cipher; + super(cipher); if (initialCounterBlk.length != AES_BLOCK_SIZE) { throw new RuntimeException("length of initial counter block (" + initialCounterBlk.length + ") not equal to AES_BLOCK_SIZE (" + AES_BLOCK_SIZE + ")"); } - this.icb = initialCounterBlk; - this.counter = icb.clone(); + + iv = initialCounterBlk; + reset(); + } + + @Override + String getFeedback() { + return "GCTR"; } // input must be multiples of 128-bit blocks when calling update @@ -89,23 +80,11 @@ final class GCTR { throw new RuntimeException("output buffer too small"); } - byte[] encryptedCntr = new byte[AES_BLOCK_SIZE]; - - int numOfCompleteBlocks = inLen / AES_BLOCK_SIZE; - for (int i = 0; i < numOfCompleteBlocks; i++) { - aes.encryptBlock(counter, 0, encryptedCntr, 0); - for (int n = 0; n < AES_BLOCK_SIZE; n++) { - int index = (i * AES_BLOCK_SIZE + n); - out[outOfs + index] = - (byte) ((in[inOfs + index] ^ encryptedCntr[n])); - } - GaloisCounterMode.increment32(counter); - } - return inLen; + return encrypt(in, inOfs, inLen, out, outOfs); } // input can be arbitrary size when calling doFinal - protected int doFinal(byte[] in, int inOfs, int inLen, byte[] out, + int doFinal(byte[] in, int inOfs, int inLen, byte[] out, int outOfs) throws IllegalBlockSizeException { try { if (inLen < 0) { @@ -118,7 +97,7 @@ final class GCTR { if (lastBlockSize != 0) { // do the last partial block byte[] encryptedCntr = new byte[AES_BLOCK_SIZE]; - aes.encryptBlock(counter, 0, encryptedCntr, 0); + embeddedCipher.encryptBlock(counter, 0, encryptedCntr, 0); for (int n = 0; n < lastBlockSize; n++) { out[outOfs + completeBlkLen + n] = (byte) ((in[inOfs + completeBlkLen + n] ^ @@ -131,28 +110,4 @@ final class GCTR { } return inLen; } - - /** - * Resets the content of this object to when it's first constructed. - */ - void reset() { - System.arraycopy(icb, 0, counter, 0, icb.length); - counterSave = null; - } - - /** - * Save the current content of this object. - */ - void save() { - this.counterSave = this.counter.clone(); - } - - /** - * Restores the content of this object to the previous saved one. - */ - void restore() { - if (this.counterSave != null) { - this.counter = this.counterSave; - } - } } diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKey.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKey.java index 3331f787429..72e7452ace0 100644 --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKey.java +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -145,6 +145,7 @@ final class PBEKey implements SecretKey { * Ensures that the password bytes of this key are * set to zero when there are no more references to it. */ + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { try { if (this.key != null) { diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java index 9d82ebb6ff2..1bf51566165 100644 --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -267,6 +267,7 @@ final class PBKDF2KeyImpl implements javax.crypto.interfaces.PBEKey { * Ensures that the password bytes of this key are * erased when there are no more references to it. */ + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { try { if (this.passwd != null) { diff --git a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PropMap.java b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PropMap.java index 3d54b911492..4a1d4be9362 100644 --- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PropMap.java +++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PropMap.java @@ -29,6 +29,8 @@ import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; import java.io.PrintWriter; +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; @@ -62,12 +64,17 @@ final class PropMap implements SortedMap { Properties props = new Properties(); // Allow implementation selected via -Dpack.disable.native=true + String propValue = getPropertyValue(Utils.DEBUG_DISABLE_NATIVE, "false"); props.put(Utils.DEBUG_DISABLE_NATIVE, - String.valueOf(Boolean.getBoolean(Utils.DEBUG_DISABLE_NATIVE))); + String.valueOf(Boolean.parseBoolean(propValue))); // Set the DEBUG_VERBOSE from system - props.put(Utils.DEBUG_VERBOSE, - String.valueOf(Integer.getInteger(Utils.DEBUG_VERBOSE,0))); + int verbose = 0; + try { + verbose = Integer.decode(getPropertyValue(Utils.DEBUG_VERBOSE, "0")); + } catch (NumberFormatException e) { + } + props.put(Utils.DEBUG_VERBOSE, String.valueOf(verbose)); // The segment size is unlimited props.put(Pack200.Packer.SEGMENT_LIMIT, "-1"); @@ -87,7 +94,7 @@ final class PropMap implements SortedMap { // Pass through files with unrecognized format by default, also // allow system property to be set props.put(Utils.CLASS_FORMAT_ERROR, - System.getProperty(Utils.CLASS_FORMAT_ERROR, Pack200.Packer.PASS)); + getPropertyValue(Utils.CLASS_FORMAT_ERROR, Pack200.Packer.PASS)); // Default effort is 5, midway between 1 and 9. props.put(Pack200.Packer.EFFORT, "5"); @@ -97,7 +104,9 @@ final class PropMap implements SortedMap { // to allow override if necessary. String propFile = "intrinsic.properties"; - try (InputStream propStr = PackerImpl.class.getResourceAsStream(propFile)) { + PrivilegedAction pa = + () -> PackerImpl.class.getResourceAsStream(propFile); + try (InputStream propStr = AccessController.doPrivileged(pa)) { if (propStr == null) { throw new RuntimeException(propFile + " cannot be loaded"); } @@ -119,6 +128,12 @@ final class PropMap implements SortedMap { defaultProps = temp; } + private static String getPropertyValue(String key, String defaultValue) { + PrivilegedAction pa = () -> System.getProperty(key); + String s = AccessController.doPrivileged(pa); + return s != null ? s : defaultValue; + } + PropMap() { theMap.putAll(defaultProps); } diff --git a/jdk/src/java.base/share/classes/java/io/BufferedReader.java b/jdk/src/java.base/share/classes/java/io/BufferedReader.java index 1f6a66490cd..8cb4f73e597 100644 --- a/jdk/src/java.base/share/classes/java/io/BufferedReader.java +++ b/jdk/src/java.base/share/classes/java/io/BufferedReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -297,14 +297,15 @@ public class BufferedReader extends Reader { /** * Reads a line of text. A line is considered to be terminated by any one - * of a line feed ('\n'), a carriage return ('\r'), or a carriage return - * followed immediately by a linefeed. + * of a line feed ('\n'), a carriage return ('\r'), a carriage return + * followed immediately by a line feed, or by reaching the end-of-file + * (EOF). * * @param ignoreLF If true, the next '\n' will be skipped * * @return A String containing the contents of the line, not including * any line-termination characters, or null if the end of the - * stream has been reached + * stream has been reached without reading any characters * * @see java.io.LineNumberReader#readLine() * @@ -375,12 +376,13 @@ public class BufferedReader extends Reader { /** * Reads a line of text. A line is considered to be terminated by any one - * of a line feed ('\n'), a carriage return ('\r'), or a carriage return - * followed immediately by a linefeed. + * of a line feed ('\n'), a carriage return ('\r'), a carriage return + * followed immediately by a line feed, or by reaching the end-of-file + * (EOF). * * @return A String containing the contents of the line, not including * any line-termination characters, or null if the end of the - * stream has been reached + * stream has been reached without reading any characters * * @exception IOException If an I/O error occurs * diff --git a/jdk/src/java.base/share/classes/java/io/DataInput.java b/jdk/src/java.base/share/classes/java/io/DataInput.java index 60e03c2173c..70f78a6a068 100644 --- a/jdk/src/java.base/share/classes/java/io/DataInput.java +++ b/jdk/src/java.base/share/classes/java/io/DataInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -48,7 +48,7 @@ package java.io; * may be thrown if the input stream has been * closed. * - *

    Modified UTF-8

    + *

    Modified UTF-8

    *

    * Implementations of the DataInput and DataOutput interfaces represent * Unicode strings in a format that is a slight modification of UTF-8. @@ -59,8 +59,9 @@ package java.io; * far left-hand column. * *

    - * + *
    + * + * * * * * - * - * + * * * * * - * - * + * * - * - * + * * * * * - * - * + * * - * - * + * * - * - * + * + * *
    Bit values and bytes
    * All characters in the range {@code '\u005Cu0001'} to @@ -71,9 +72,9 @@ package java.io; * Bit Values
    Byte 1
    0
    - *
    bits 6-0
    + *
    Byte 10 + * bits 6-0 *
    @@ -86,17 +87,17 @@ package java.io; * Bit Values
    Byte 1
    1
    - *
    1
    - *
    0
    - *
    bits 10-6
    + *
    Byte 11 + * 1 + * 0 + * bits 10-6 *
    Byte 2
    1
    - *
    0
    - *
    bits 5-0
    + *
    Byte 21 + * 0 + * bits 5-0 *
    @@ -108,25 +109,26 @@ package java.io; * Bit Values
    Byte 1
    1
    - *
    1
    - *
    1
    - *
    0
    - *
    bits 15-12
    + *
    Byte 11 + * 1 + * 1 + * 0 + * bits 15-12 *
    Byte 2
    1
    - *
    0
    - *
    bits 11-6
    + *
    Byte 21 + * 0 + * bits 11-6 *
    Byte 3
    1
    - *
    0
    - *
    bits 5-0
    + *
    Byte 31 + * 0 + * bits 5-0 *
    *
    *

    diff --git a/jdk/src/java.base/share/classes/java/io/File.java b/jdk/src/java.base/share/classes/java/io/File.java index 0bbaf4d5d0b..2edef59abdc 100644 --- a/jdk/src/java.base/share/classes/java/io/File.java +++ b/jdk/src/java.base/share/classes/java/io/File.java @@ -113,7 +113,7 @@ import sun.security.action.GetPropertyAction; * operating system-specific portion of storage for a file system. A single * storage device (e.g. a physical disk-drive, flash memory, CD-ROM) may * contain multiple partitions. The object, if any, will reside on the - * partition named by some ancestor of the absolute + * partition named by some ancestor of the absolute * form of this pathname. * *

    A file system may implement restrictions to certain operations on the @@ -916,17 +916,28 @@ public class File * Returns the time that the file denoted by this abstract pathname was * last modified. * + * @apiNote + * While the unit of time of the return value is milliseconds, the + * granularity of the value depends on the underlying file system and may + * be larger. For example, some file systems use time stamps in units of + * seconds. + * *

    Where it is required to distinguish an I/O exception from the case * where {@code 0L} is returned, or where several attributes of the * same file are required at the same time, or where the time of last * access or the creation time are required, then the {@link * java.nio.file.Files#readAttributes(Path,Class,LinkOption[]) - * Files.readAttributes} method may be used. + * Files.readAttributes} method may be used. If however only the + * time of last modification is required, then the + * {@link java.nio.file.Files#getLastModifiedTime(Path,LinkOption[]) + * Files.getLastModifiedTime} method may be used instead. * * @return A long value representing the time the file was * last modified, measured in milliseconds since the epoch * (00:00:00 GMT, January 1, 1970), or 0L if the - * file does not exist or if an I/O error occurs + * file does not exist or if an I/O error occurs. The value may + * be negative indicating the number of milliseconds before the + * epoch * * @throws SecurityException * If a security manager exists and its {@link diff --git a/jdk/src/java.base/share/classes/java/io/FileInputStream.java b/jdk/src/java.base/share/classes/java/io/FileInputStream.java index a321c61ae41..0d8401128ff 100644 --- a/jdk/src/java.base/share/classes/java/io/FileInputStream.java +++ b/jdk/src/java.base/share/classes/java/io/FileInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -413,9 +413,19 @@ class FileInputStream extends InputStream * Ensures that the close method of this file input stream is * called when there are no more references to it. * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. + * * @exception IOException if an I/O error occurs. * @see java.io.FileInputStream#close() */ + @Deprecated(since="9") protected void finalize() throws IOException { if ((fd != null) && (fd != FileDescriptor.in)) { /* if fd is shared, the references in FileDescriptor diff --git a/jdk/src/java.base/share/classes/java/io/FileOutputStream.java b/jdk/src/java.base/share/classes/java/io/FileOutputStream.java index f6bdb1f3b5f..b98549bd11e 100644 --- a/jdk/src/java.base/share/classes/java/io/FileOutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/FileOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -91,6 +91,10 @@ class FileOutputStream extends OutputStream * If the file exists but is a directory rather than a regular file, does * not exist but cannot be created, or cannot be opened for any other * reason then a FileNotFoundException is thrown. + *

    + * @implSpec Invoking this constructor with the parameter {@code name} is + * equivalent to invoking {@link #FileOutputStream(String,boolean) + * new FileOutputStream(name, false)}. * * @param name the system-dependent filename * @exception FileNotFoundException if the file exists but is a directory @@ -427,9 +431,18 @@ class FileOutputStream extends OutputStream * close method of this file output stream is * called when there are no more references to this stream. * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. * @exception IOException if an I/O error occurs. * @see java.io.FileInputStream#close() */ + @Deprecated(since="9") protected void finalize() throws IOException { if (fd != null) { if (fd == FileDescriptor.out || fd == FileDescriptor.err) { diff --git a/jdk/src/java.base/share/classes/java/io/FilePermission.java b/jdk/src/java.base/share/classes/java/io/FilePermission.java index 2d56f438cb3..39cded53b27 100644 --- a/jdk/src/java.base/share/classes/java/io/FilePermission.java +++ b/jdk/src/java.base/share/classes/java/io/FilePermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -209,6 +209,10 @@ public final class FilePermission extends Permission implements Serializable { private static final Path here = builtInFS.getPath( GetPropertyAction.privilegedGetProperty("user.dir")); + private static final Path EMPTY_PATH = builtInFS.getPath(""); + private static final Path DASH_PATH = builtInFS.getPath("-"); + private static final Path DOTDOT_PATH = builtInFS.getPath(".."); + /** * A private constructor that clones some and updates some, * always with a different name. @@ -341,7 +345,7 @@ public final class FilePermission extends Permission implements Serializable { .normalize(); // lastName should always be non-null now Path lastName = npath.getFileName(); - if (lastName != null && lastName.toString().equals("-")) { + if (lastName != null && lastName.equals(DASH_PATH)) { directory = true; recursive = !rememberStar; npath = npath.getParent(); @@ -679,23 +683,76 @@ public final class FilePermission extends Permission implements Serializable { * @return the depth in between */ private static int containsPath(Path p1, Path p2) { - Path p; - try { - p = p2.relativize(p1).normalize(); - if (p.getName(0).toString().isEmpty()) { - return 0; - } else { - for (Path item: p) { - String s = item.toString(); - if (!s.equals("..")) { - return -1; - } - } - return p.getNameCount(); - } - } catch (IllegalArgumentException iae) { + + // Two paths must have the same root. For example, + // there is no contains relation between any two of + // "/x", "x", "C:/x", "C:x", and "//host/share/x". + if (!Objects.equals(p1.getRoot(), p2.getRoot())) { return -1; } + + // Empty path (i.e. "." or "") is a strange beast, + // because its getNameCount()==1 but getName(0) is null. + // It's better to deal with it separately. + if (p1.equals(EMPTY_PATH)) { + if (p2.equals(EMPTY_PATH)) { + return 0; + } else if (p2.getName(0).equals(DOTDOT_PATH)) { + // "." contains p2 iif p2 has no "..". Since a + // a normalized path can only have 0 or more + // ".." at the beginning. We only need to look + // at the head. + return -1; + } else { + // and the distance is p2's name count. i.e. + // 3 between "." and "a/b/c". + return p2.getNameCount(); + } + } else if (p2.equals(EMPTY_PATH)) { + int c1 = p1.getNameCount(); + if (!p1.getName(c1 - 1).equals(DOTDOT_PATH)) { + // "." is inside p1 iif p1 is 1 or more "..". + // For the same reason above, we only need to + // look at the tail. + return -1; + } + // and the distance is the count of ".." + return c1; + } + + // Good. No more empty paths. + + // Common heads are removed + + int c1 = p1.getNameCount(); + int c2 = p2.getNameCount(); + + int n = Math.min(c1, c2); + int i = 0; + while (i < n) { + if (!p1.getName(i).equals(p2.getName(i))) + break; + i++; + } + + // for p1 containing p2, p1 must be 0-or-more "..", + // and p2 cannot have "..". For the same reason, we only + // check tail of p1 and head of p2. + if (i < c1 && !p1.getName(c1 - 1).equals(DOTDOT_PATH)) { + return -1; + } + + if (i < c2 && p2.getName(i).equals(DOTDOT_PATH)) { + return -1; + } + + // and the distance is the name counts added (after removing + // the common heads). + + // For example: p1 = "../../..", p2 = "../a". + // After removing the common heads, they become "../.." and "a", + // and the distance is (3-1)+(2-1) = 3. + return c1 - i + c2 - i; } /** diff --git a/jdk/src/java.base/share/classes/java/io/FilterInputStream.java b/jdk/src/java.base/share/classes/java/io/FilterInputStream.java index 3304a1f2eb8..05ab5fa56cb 100644 --- a/jdk/src/java.base/share/classes/java/io/FilterInputStream.java +++ b/jdk/src/java.base/share/classes/java/io/FilterInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -84,7 +84,7 @@ class FilterInputStream extends InputStream { } /** - * Reads up to byte.length bytes of data from this + * Reads up to b.length bytes of data from this * input stream into an array of bytes. This method blocks until some * input is available. *

    diff --git a/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java b/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java index cb8f122d0b1..8030979cdaa 100644 --- a/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -91,8 +91,8 @@ public class FilterOutputStream extends OutputStream { * b.length. *

    * Note that this method does not call the one-argument - * write method of its underlying stream with the single - * argument b. + * write method of its underlying output stream with + * the single argument b. * * @param b the data to be written. * @exception IOException if an I/O error occurs. @@ -113,7 +113,7 @@ public class FilterOutputStream extends OutputStream { * byte to output. *

    * Note that this method does not call the write method - * of its underlying input stream with the same arguments. Subclasses + * of its underlying output stream with the same arguments. Subclasses * of FilterOutputStream should provide a more efficient * implementation of this method. * diff --git a/jdk/src/java.base/share/classes/java/io/LineNumberReader.java b/jdk/src/java.base/share/classes/java/io/LineNumberReader.java index cc7bb2ae5fa..c9ecbe0734a 100644 --- a/jdk/src/java.base/share/classes/java/io/LineNumberReader.java +++ b/jdk/src/java.base/share/classes/java/io/LineNumberReader.java @@ -39,7 +39,7 @@ package java.io; * the stream; it only changes the value that will be returned by * {@code getLineNumber()}. * - *

    A line is considered to be terminated by any one of a + *

    A line is considered to be terminated by any one of a * line feed ('\n'), a carriage return ('\r'), or a carriage return followed * immediately by a linefeed. * diff --git a/jdk/src/java.base/share/classes/java/io/ObjectInputFilter.java b/jdk/src/java.base/share/classes/java/io/ObjectInputFilter.java index a0e998c7b29..534e1b2b8de 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectInputFilter.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectInputFilter.java @@ -104,7 +104,6 @@ public interface ObjectInputFilter { * @return {@link Status#ALLOWED Status.ALLOWED} if accepted, * {@link Status#REJECTED Status.REJECTED} if rejected, * {@link Status#UNDECIDED Status.UNDECIDED} if undecided. - * @since 9 */ Status checkInput(FilterInfo filterInfo); @@ -323,7 +322,7 @@ public interface ObjectInputFilter { * Other patterns match or reject class or package name * as returned from {@link Class#getName() Class.getName()} and * if an optional module name is present - * {@link java.lang.reflect.Module#getName() class.getModule().getName()}. + * {@link Module#getName() class.getModule().getName()}. * Note that for arrays the element type is used in the pattern, * not the array type. *

      diff --git a/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java b/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java index ed033d685e9..bffc5a81ee8 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -216,7 +216,8 @@ import sun.reflect.misc.ReflectUtil; * @see java.io.DataInput * @see java.io.ObjectOutputStream * @see java.io.Serializable - * @see Object Serialization Specification, Section 3, Object Input Classes + * @see + * Object Serialization Specification, Section 3, Object Input Classes * @since 1.1 */ public class ObjectInputStream @@ -812,23 +813,24 @@ public class ObjectInputStream } /** - * Enable the stream to allow objects read from the stream to be replaced. - * When enabled, the resolveObject method is called for every object being + * Enables the stream to do replacement of objects read from the stream. When + * enabled, the {@link #resolveObject} method is called for every object being * deserialized. * - *

      If enable is true, and there is a security manager installed, + *

      If object replacement is currently not enabled, and + * {@code enable} is true, and there is a security manager installed, * this method first calls the security manager's - * checkPermission method with the - * SerializablePermission("enableSubstitution") permission to - * ensure it's ok to enable the stream to allow objects read from the - * stream to be replaced. + * {@code checkPermission} method with the + * {@code SerializablePermission("enableSubstitution")} permission to + * ensure that the caller is permitted to enable the stream to do replacement + * of objects read from the stream. * - * @param enable true for enabling use of resolveObject for + * @param enable true for enabling use of {@code resolveObject} for * every object being deserialized * @return the previous setting before this method was invoked * @throws SecurityException if a security manager exists and its - * checkPermission method denies enabling the stream - * to allow objects read from the stream to be replaced. + * {@code checkPermission} method denies enabling the stream + * to do replacement of objects read from the stream. * @see SecurityManager#checkPermission * @see java.io.SerializablePermission */ @@ -1796,12 +1798,19 @@ public class ObjectInputStream } catch (ClassNotFoundException ex) { resolveEx = ex; } + + // Call filterCheck on the class before reading anything else + filterCheck(cl, -1); + skipCustomData(); - desc.initProxy(cl, resolveEx, readClassDesc(false)); - - // Call filterCheck on the definition - filterCheck(desc.forClass(), -1); + try { + totalObjectRefs++; + depth++; + desc.initProxy(cl, resolveEx, readClassDesc(false)); + } finally { + depth--; + } handles.finish(descHandle); passHandle = descHandle; @@ -1846,12 +1855,19 @@ public class ObjectInputStream } catch (ClassNotFoundException ex) { resolveEx = ex; } + + // Call filterCheck on the class before reading anything else + filterCheck(cl, -1); + skipCustomData(); - desc.initNonProxy(readDesc, cl, resolveEx, readClassDesc(false)); - - // Call filterCheck on the definition - filterCheck(desc.forClass(), -1); + try { + totalObjectRefs++; + depth++; + desc.initNonProxy(readDesc, cl, resolveEx, readClassDesc(false)); + } finally { + depth--; + } handles.finish(descHandle); passHandle = descHandle; diff --git a/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java b/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java index bff6f8311ee..135e5645a36 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -156,7 +156,8 @@ import sun.reflect.misc.ReflectUtil; * @see java.io.ObjectInputStream * @see java.io.Serializable * @see java.io.Externalizable - * @see Object Serialization Specification, Section 2, Object Output Classes + * @see + * Object Serialization Specification, Section 2, Object Output Classes * @since 1.1 */ public class ObjectOutputStream @@ -589,22 +590,24 @@ public class ObjectOutputStream } /** - * Enable the stream to do replacement of objects in the stream. When - * enabled, the replaceObject method is called for every object being + * Enables the stream to do replacement of objects written to the stream. When + * enabled, the {@link #replaceObject} method is called for every object being * serialized. * - *

      If enable is true, and there is a security manager - * installed, this method first calls the security manager's - * checkPermission method with a - * SerializablePermission("enableSubstitution") permission to - * ensure it's ok to enable the stream to do replacement of objects in the - * stream. + *

      If object replacement is currently not enabled, and + * {@code enable} is true, and there is a security manager installed, + * this method first calls the security manager's + * {@code checkPermission} method with the + * {@code SerializablePermission("enableSubstitution")} permission to + * ensure that the caller is permitted to enable the stream to do replacement + * of objects written to the stream. * - * @param enable boolean parameter to enable replacement of objects + * @param enable true for enabling use of {@code replaceObject} for + * every object being serialized * @return the previous setting before this method was invoked * @throws SecurityException if a security manager exists and its - * checkPermission method denies enabling the stream - * to do replacement of objects in the stream. + * {@code checkPermission} method denies enabling the stream + * to do replacement of objects written to the stream. * @see SecurityManager#checkPermission * @see java.io.SerializablePermission */ diff --git a/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java b/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java index 0f2af6495fe..e5a323830ee 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -62,13 +62,14 @@ import static java.io.ObjectStreamField.*; * loaded in this Java VM can be found/created using the lookup method. * *

      The algorithm to compute the SerialVersionUID is described in - * Object - * Serialization Specification, Section 4.6, Stream Unique Identifiers. + * + * Object Serialization Specification, Section 4.6, Stream Unique Identifiers. * * @author Mike Warres * @author Roger Riggs * @see ObjectStreamField - * @see Object Serialization Specification, Section 4, Class Descriptors + * @see + * Object Serialization Specification, Section 4, Class Descriptors * @since 1.1 */ public class ObjectStreamClass implements Serializable { diff --git a/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java b/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java index 3d44f443b82..71ea81e8c03 100644 --- a/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java +++ b/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java @@ -40,10 +40,8 @@ import sun.nio.cs.StreamEncoder; * *

      Each invocation of a write() method causes the encoding converter to be * invoked on the given character(s). The resulting bytes are accumulated in a - * buffer before being written to the underlying output stream. The size of - * this buffer may be specified, but by default it is large enough for most - * purposes. Note that the characters passed to the write() methods are not - * buffered. + * buffer before being written to the underlying output stream. Note that the + * characters passed to the write() methods are not buffered. * *

      For top efficiency, consider wrapping an OutputStreamWriter within a * BufferedWriter so as to avoid frequent converter invocations. For example: diff --git a/jdk/src/java.base/share/classes/java/io/PipedInputStream.java b/jdk/src/java.base/share/classes/java/io/PipedInputStream.java index b55c1b08b75..0a1de74462d 100644 --- a/jdk/src/java.base/share/classes/java/io/PipedInputStream.java +++ b/jdk/src/java.base/share/classes/java/io/PipedInputStream.java @@ -39,7 +39,7 @@ package java.io; * The piped input stream contains a buffer, * decoupling read operations from write operations, * within limits. - * A pipe is said to be broken if a + * A pipe is said to be broken if a * thread that was providing data bytes to the connected * piped output stream is no longer alive. * diff --git a/jdk/src/java.base/share/classes/java/io/PipedOutputStream.java b/jdk/src/java.base/share/classes/java/io/PipedOutputStream.java index d49e05005d5..79ffd38e928 100644 --- a/jdk/src/java.base/share/classes/java/io/PipedOutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/PipedOutputStream.java @@ -35,7 +35,7 @@ import java.io.*; * read from the connected PipedInputStream by some * other thread. Attempting to use both objects from a single thread * is not recommended as it may deadlock the thread. - * The pipe is said to be broken if a + * The pipe is said to be broken if a * thread that was reading data bytes from the connected piped input * stream is no longer alive. * diff --git a/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java b/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java index 3806675cdca..b2e08f8cb27 100644 --- a/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java +++ b/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -132,27 +132,32 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * write to, the file specified by the {@link File} argument. A new {@link * FileDescriptor} object is created to represent this file connection. * - *

      The {@code mode} argument specifies the access mode + *

      The {@code mode} argument specifies the access mode * in which the file is to be opened. The permitted values and their * meanings are: * - * - * - * + *
      ValueMeaning
      {@code "r"}
      + * + * + * + * + * + * * - * + * * - * + * * - * + * * + * *
      Access mode permitted values and meanings
      ValueMeaning
      {@code "r"} Open for reading only. Invoking any of the {@code write} * methods of the resulting object will cause an * {@link java.io.IOException} to be thrown.
      {@code "rw"}
      {@code "rw"} Open for reading and writing. If the file does not already * exist then an attempt will be made to create it.
      {@code "rws"}
      {@code "rws"} Open for reading and writing, as with {@code "rw"}, and also * require that every update to the file's content or metadata be * written synchronously to the underlying storage device.
      {@code "rwd"}
      {@code "rwd"} Open for reading and writing, as with {@code "rw"}, and also * require that every update to the file's content be written * synchronously to the underlying storage device.
      * * The {@code "rws"} and {@code "rwd"} modes work much like the {@link diff --git a/jdk/src/java.base/share/classes/java/io/Serializable.java b/jdk/src/java.base/share/classes/java/io/Serializable.java index 1431795cfe2..1ad884fdcf2 100644 --- a/jdk/src/java.base/share/classes/java/io/Serializable.java +++ b/jdk/src/java.base/share/classes/java/io/Serializable.java @@ -84,9 +84,9 @@ package java.io; * correspondingly named fields in the current object. This handles the case * when the class has evolved to add new fields. The method does not need to * concern itself with the state belonging to its superclasses or subclasses. - * State is saved by writing the individual fields to the - * ObjectOutputStream using the writeObject method or by using the - * methods for primitive data types supported by DataOutput. + * State is restored by reading data from the ObjectInputStream for + * the individual fields and making assignments to the appropriate fields + * of the object. Reading primitive data types is supported by DataInput. * *

      The readObjectNoData method is responsible for initializing the state of * the object for its particular class in the event that the serialization diff --git a/jdk/src/java.base/share/classes/java/io/SerializablePermission.java b/jdk/src/java.base/share/classes/java/io/SerializablePermission.java index 8aded4dcad2..93034a165a4 100644 --- a/jdk/src/java.base/share/classes/java/io/SerializablePermission.java +++ b/jdk/src/java.base/share/classes/java/io/SerializablePermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -44,12 +44,16 @@ import java.util.StringTokenizer; * and for each provides a description of what the permission allows * and a discussion of the risks of granting code the permission. * - * + *
      + * + * * * * * * + * + * * * * @@ -79,7 +83,7 @@ import java.util.StringTokenizer; * * - * + * *
      Permission target name, what the permission allows, and associated risks
      Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
      enableSubclassImplementationCode could remove a configured filter and remove protections * already established.
      * * @see java.security.BasicPermission diff --git a/jdk/src/java.base/share/classes/java/io/package-info.java b/jdk/src/java.base/share/classes/java/io/package-info.java index cf1b699cd0d..3d9685886cb 100644 --- a/jdk/src/java.base/share/classes/java/io/package-info.java +++ b/jdk/src/java.base/share/classes/java/io/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,8 @@ * *

      Package Specification

      * * *

      Related Documentation

      @@ -41,7 +42,8 @@ * For overviews, tutorials, examples, guides, and tool documentation, * please see: *
        - *
      • Serialization Enhancements + *
      • {@extLink serialver_tool_reference The serialver tool}
      • + *
      • {@extLink serialization_guide Serialization Documentation}
      • *
      * * @since 1.0 diff --git a/jdk/src/java.base/share/classes/java/lang/AbstractStringBuilder.java b/jdk/src/java.base/share/classes/java/lang/AbstractStringBuilder.java index f9c8eea6c89..47c6a4019e7 100644 --- a/jdk/src/java.base/share/classes/java/lang/AbstractStringBuilder.java +++ b/jdk/src/java.base/share/classes/java/lang/AbstractStringBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -307,6 +307,8 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { * sequence. */ public int codePointAt(int index) { + int count = this.count; + byte[] value = this.value; checkIndex(index, count); if (isLatin1()) { return value[index] & 0xff; @@ -560,11 +562,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { val[count++] = 'l'; val[count++] = 'l'; } else { - checkOffset(count + 4, val.length >> 1); - StringUTF16.putChar(val, count++, 'n'); - StringUTF16.putChar(val, count++, 'u'); - StringUTF16.putChar(val, count++, 'l'); - StringUTF16.putChar(val, count++, 'l'); + count = StringUTF16.putCharsAt(val, count, 'n', 'u', 'l', 'l'); } this.count = count; return this; @@ -695,18 +693,9 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { } } else { if (b) { - checkOffset(count + 4, val.length >> 1); - StringUTF16.putChar(val, count++, 't'); - StringUTF16.putChar(val, count++, 'r'); - StringUTF16.putChar(val, count++, 'u'); - StringUTF16.putChar(val, count++, 'e'); + count = StringUTF16.putCharsAt(val, count, 't', 'r', 'u', 'e'); } else { - checkOffset(count + 5, val.length >> 1); - StringUTF16.putChar(val, count++, 'f'); - StringUTF16.putChar(val, count++, 'a'); - StringUTF16.putChar(val, count++, 'l'); - StringUTF16.putChar(val, count++, 's'); - StringUTF16.putChar(val, count++, 'e'); + count = StringUTF16.putCharsAt(val, count, 'f', 'a', 'l', 's', 'e'); } } this.count = count; @@ -755,16 +744,15 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { * @return a reference to this object. */ public AbstractStringBuilder append(int i) { + int count = this.count; int spaceNeeded = count + Integer.stringSize(i); ensureCapacityInternal(spaceNeeded); if (isLatin1()) { Integer.getChars(i, spaceNeeded, value); } else { - byte[] val = this.value; - checkOffset(spaceNeeded, val.length >> 1); - Integer.getCharsUTF16(i, spaceNeeded, val); + StringUTF16.getChars(i, count, spaceNeeded, value); } - count = spaceNeeded; + this.count = spaceNeeded; return this; } @@ -781,16 +769,15 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { * @return a reference to this object. */ public AbstractStringBuilder append(long l) { + int count = this.count; int spaceNeeded = count + Long.stringSize(l); ensureCapacityInternal(spaceNeeded); if (isLatin1()) { Long.getChars(l, spaceNeeded, value); } else { - byte[] val = this.value; - checkOffset(spaceNeeded, val.length >> 1); - Long.getCharsUTF16(l, spaceNeeded, val); + StringUTF16.getChars(l, count, spaceNeeded, value); } - count = spaceNeeded; + this.count = spaceNeeded; return this; } @@ -843,6 +830,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { * greater than {@code end}. */ public AbstractStringBuilder delete(int start, int end) { + int count = this.count; if (end > count) { end = count; } @@ -850,7 +838,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { int len = end - start; if (len > 0) { shift(end, -len); - count -= len; + this.count = count - len; } return this; } @@ -925,6 +913,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { * greater than {@code end}. */ public AbstractStringBuilder replace(int start, int end, String str) { + int count = this.count; if (end > count) { end = count; } @@ -933,7 +922,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { int newCount = count + len - (end - start); ensureCapacityInternal(newCount); shift(end, newCount - count); - count = newCount; + this.count = newCount; putStringAt(start, str); return this; } @@ -1500,40 +1489,11 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { val[k] = cj; } } else { - checkOffset(count, val.length >> 1); - boolean hasSurrogates = false; - for (int j = (n-1) >> 1; j >= 0; j--) { - int k = n - j; - char cj = StringUTF16.getChar(val, j); - char ck = StringUTF16.getChar(val, k); - StringUTF16.putChar(val, j, ck); - StringUTF16.putChar(val, k, cj); - if (Character.isSurrogate(cj) || - Character.isSurrogate(ck)) { - hasSurrogates = true; - } - } - if (hasSurrogates) { - reverseAllValidSurrogatePairs(val, count); - } + StringUTF16.reverse(val, count); } return this; } - /** Outlined helper method for reverse() */ - private void reverseAllValidSurrogatePairs(byte[] val, int count) { - for (int i = 0; i < count - 1; i++) { - char c2 = StringUTF16.getChar(val, i); - if (Character.isLowSurrogate(c2)) { - char c1 = StringUTF16.getChar(val, i + 1); - if (Character.isHighSurrogate(c1)) { - StringUTF16.putChar(val, i++, c1); - StringUTF16.putChar(val, i, c2); - } - } - } - } - /** * Returns a string representing the data in this sequence. * A new {@code String} object is allocated and initialized to @@ -1682,6 +1642,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { } private final void appendChars(char[] s, int off, int end) { + int count = this.count; if (isLatin1()) { byte[] val = this.value; for (int i = off, j = count; i < end; i++) { @@ -1689,17 +1650,17 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { if (StringLatin1.canEncode(c)) { val[j++] = (byte)c; } else { - count = j; + this.count = count = j; inflate(); StringUTF16.putCharsSB(this.value, j, s, i, end); - count += end - i; + this.count = count + end - i; return; } } } else { StringUTF16.putCharsSB(this.value, count, s, off, end); } - count += end - off; + this.count = count + end - off; } private final void appendChars(CharSequence s, int off, int end) { diff --git a/jdk/src/java.base/share/classes/java/lang/CharSequence.java b/jdk/src/java.base/share/classes/java/lang/CharSequence.java index 2972f10079f..e8ee5aa5b50 100644 --- a/jdk/src/java.base/share/classes/java/lang/CharSequence.java +++ b/jdk/src/java.base/share/classes/java/lang/CharSequence.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -123,7 +123,7 @@ public interface CharSequence { * *

      The stream binds to this sequence when the terminal stream operation * commences (specifically, for mutable sequences the spliterator for the - * stream is late-binding). + * stream is late-binding). * If the sequence is modified during that operation then the result is * undefined. * @@ -173,7 +173,7 @@ public interface CharSequence { * *

      The stream binds to this sequence when the terminal stream operation * commences (specifically, for mutable sequences the spliterator for the - * stream is late-binding). + * stream is late-binding). * If the sequence is modified during that operation then the result is * undefined. * diff --git a/jdk/src/java.base/share/classes/java/lang/Character.java b/jdk/src/java.base/share/classes/java/lang/Character.java index 9f9e4de1972..fd6682e6196 100644 --- a/jdk/src/java.base/share/classes/java/lang/Character.java +++ b/jdk/src/java.base/share/classes/java/lang/Character.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, 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 @@ -56,7 +56,7 @@ import jdk.internal.HotSpotIntrinsicCandidate; *

    • http://www.unicode.org *
    * - *

    Unicode Character Representations

    + *

    Unicode Character Representations

    * *

    The {@code char} data type (and therefore the value that a * {@code Character} object encapsulates) are based on the @@ -70,9 +70,9 @@ import jdk.internal.HotSpotIntrinsicCandidate; * definition of the U+n notation in the Unicode * Standard.) * - *

    The set of characters from U+0000 to U+FFFF is + *

    The set of characters from U+0000 to U+FFFF is * sometimes referred to as the Basic Multilingual Plane (BMP). - * Characters whose code points are greater + * Characters whose code points are greater * than U+FFFF are called supplementary characters. The Java * platform uses the UTF-16 representation in {@code char} arrays and * in the {@code String} and {@code StringBuffer} classes. In @@ -9566,7 +9566,9 @@ class Character implements java.io.Serializable, Comparable { * Determines if the specified character is ISO-LATIN-1 white space. * This method returns {@code true} for the following five * characters only: - * + *
    + * + * * * * @@ -9577,6 +9579,7 @@ class Character implements java.io.Serializable, Comparable { * * * + * *
    truechars
    {@code '\t'} {@code U+0009}{@code HORIZONTAL TABULATION}
    {@code '\n'} {@code U+000A}{@code CARRIAGE RETURN}
    {@code ' '} {@code U+0020}{@code SPACE}
    * * @param ch the character to be tested. diff --git a/jdk/src/java.base/share/classes/java/lang/Class.java b/jdk/src/java.base/share/classes/java/lang/Class.java index b0e3d3af0cd..679c0fa1066 100644 --- a/jdk/src/java.base/share/classes/java/lang/Class.java +++ b/jdk/src/java.base/share/classes/java/lang/Class.java @@ -43,7 +43,6 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Member; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.lang.reflect.Proxy; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; @@ -51,6 +50,7 @@ import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -64,9 +64,9 @@ import java.util.StringJoiner; import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.loader.BootLoader; import jdk.internal.loader.BuiltinClassLoader; -import jdk.internal.loader.ResourceHelper; import jdk.internal.misc.Unsafe; import jdk.internal.misc.VM; +import jdk.internal.module.Resources; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.ConstantPool; import jdk.internal.reflect.Reflection; @@ -425,6 +425,7 @@ public final class Class implements java.io.Serializable, * * * @since 9 + * @spec JPMS */ @CallerSensitive public static Class forName(Module module, String name) { @@ -724,18 +725,23 @@ public final class Class implements java.io.Serializable, * one or more '{@code [}' characters representing the depth of the array * nesting. The encoding of element type names is as follows: * - *

    - * + * + * + * + * + * + * + * + * + * + * + *
    Element Type     Encoding - *
    boolean     Z - *
    byte     B - *
    char     C + *
    + * + * + * + * + * *
    Element types and encodings
    Element Type Encoding + *
    boolean Z + *
    byte B + *
    char C *
    class or interface - *     Lclassname; - *
    double     D - *
    float     F - *
    int     I - *
    long     J - *
    short     S + * Lclassname; + *
    double D + *
    float F + *
    int I + *
    long J + *
    short S + *
    * *

    The class or interface name classname is the binary name of @@ -819,6 +825,7 @@ public final class Class implements java.io.Serializable, * @return the module that this class or interface is a member of * * @since 9 + * @spec JPMS */ public Module getModule() { return module; @@ -924,6 +931,8 @@ public final class Class implements java.io.Serializable, * this method returns {@code null}. * * @return the package of this class. + * @revised 9 + * @spec JPMS */ public Package getPackage() { if (isPrimitive() || isArray()) { @@ -951,20 +960,30 @@ public final class Class implements java.io.Serializable, * declaring class} of the {@link #getEnclosingMethod enclosing method} or * {@link #getEnclosingConstructor enclosing constructor}. * - *

    This method returns {@code null} if this class represents an array type, - * a primitive type or void. + *

    If this class represents an array type then this method returns the + * package name of the element type. If this class represents a primitive + * type or void then the package name "{@code java.lang}" is returned. * * @return the fully qualified package name * * @since 9 + * @spec JPMS * @jls 6.7 Fully Qualified Names */ public String getPackageName() { String pn = this.packageName; - if (pn == null && !isArray() && !isPrimitive()) { - String cn = getName(); - int dot = cn.lastIndexOf('.'); - pn = (dot != -1) ? cn.substring(0, dot).intern() : ""; + if (pn == null) { + Class c = this; + while (c.isArray()) { + c = c.getComponentType(); + } + if (c.isPrimitive()) { + pn = "java.lang"; + } else { + String cn = c.getName(); + int dot = cn.lastIndexOf('.'); + pn = (dot != -1) ? cn.substring(0, dot).intern() : ""; + } this.packageName = pn; } return pn; @@ -2048,25 +2067,6 @@ public final class Class implements java.io.Serializable, return getReflectionFactory().copyMethod(method); } - /** - * Returns a {@code Method} object that reflects the specified public - * member method of the class or interface represented by this - * {@code Class} object. - * - * @param name the name of the method - * @param parameterTypes the list of parameters - * @return the {@code Method} object that matches the specified - * {@code name} and {@code parameterTypes}; {@code null} - * if the method is not found or the name is - * "<init>"or "<clinit>". - */ - Method getMethodOrNull(String name, Class... parameterTypes) { - Objects.requireNonNull(name); - Method method = getMethod0(name, parameterTypes); - return method == null ? null : getReflectionFactory().copyMethod(method); - } - - /** * Returns a {@code Constructor} object that reflects the specified * public constructor of the class represented by this {@code Class} @@ -2207,7 +2207,6 @@ public final class Class implements java.io.Serializable, /** - * * Returns an array containing {@code Method} objects reflecting all the * declared methods of the class or interface represented by this {@code * Class} object, including public, protected, default (package) @@ -2435,6 +2434,30 @@ public final class Class implements java.io.Serializable, return getReflectionFactory().copyMethod(method); } + /** + * Returns the list of {@code Method} objects for the declared public + * methods of this class or interface that have the specified method name + * and parameter types. + * + * @param name the name of the method + * @param parameterTypes the parameter array + * @return the list of {@code Method} objects for the public methods of + * this class matching the specified name and parameters + */ + List getDeclaredPublicMethods(String name, Class... parameterTypes) { + Method[] methods = privateGetDeclaredMethods(/* publicOnly */ true); + ReflectionFactory factory = getReflectionFactory(); + List result = new ArrayList<>(); + for (Method method : methods) { + if (method.getName().equals(name) + && Arrays.equals( + factory.getExecutableSharedParameterTypes(method), + parameterTypes)) { + result.add(factory.copyMethod(method)); + } + } + return result; + } /** * Returns a {@code Constructor} object that reflects the specified @@ -2491,10 +2514,16 @@ public final class Class implements java.io.Serializable, * Finds a resource with a given name. * *

    If this class is in a named {@link Module Module} then this method - * will attempt to find the resource in the module by means of the absolute - * resource name, subject to the rules for encapsulation specified in the - * {@code Module} {@link Module#getResourceAsStream getResourceAsStream} - * method. + * will attempt to find the resource in the module. This is done by + * delegating to the module's class loader {@link + * ClassLoader#findResource(String,String) findResource(String,String)} + * method, invoking it with the module name and the absolute name of the + * resource. Resources in named modules are subject to the rules for + * encapsulation specified in the {@code Module} {@link + * Module#getResourceAsStream getResourceAsStream} method and so this + * method returns {@code null} when the resource is a + * non-"{@code .class}" resource in a package that is not open to the + * caller's module. * *

    Otherwise, if this class is not in a named module then the rules for * searching resources associated with a given class are implemented by the @@ -2503,9 +2532,8 @@ public final class Class implements java.io.Serializable, * the bootstrap class loader, the method delegates to {@link * ClassLoader#getSystemResourceAsStream}. * - *

    Before finding a resource in the caller's module or delegation to a - * class loader, an absolute resource name is constructed from the given - * resource name using this algorithm: + *

    Before delegation, an absolute resource name is constructed from the + * given resource name using this algorithm: * *

      * @@ -2532,27 +2560,26 @@ public final class Class implements java.io.Serializable, * least the caller module, or access to the resource is denied * by the security manager. * @throws NullPointerException If {@code name} is {@code null} + * + * @see Module#getResourceAsStream(String) * @since 1.1 + * @revised 9 + * @spec JPMS */ @CallerSensitive public InputStream getResourceAsStream(String name) { name = resolveName(name); - Module module = getModule(); - if (module.isNamed()) { - if (!ResourceHelper.isSimpleResource(name)) { - Module caller = Reflection.getCallerClass().getModule(); - if (caller != module) { - Set packages = module.getDescriptor().packages(); - String pn = ResourceHelper.getPackageName(name); - if (packages.contains(pn) && !module.isOpen(pn, caller)) { - // resource is in package not open to caller - return null; - } - } + Module thisModule = getModule(); + if (thisModule.isNamed()) { + // check if resource can be located by caller + if (Resources.canEncapsulate(name) + && !isOpenToCaller(name, Reflection.getCallerClass())) { + return null; } - String mn = module.getName(); + // resource not encapsulated or in package open to caller + String mn = thisModule.getName(); ClassLoader cl = getClassLoader0(); try { @@ -2585,10 +2612,16 @@ public final class Class implements java.io.Serializable, * Finds a resource with a given name. * *

      If this class is in a named {@link Module Module} then this method - * will attempt to find the resource in the module by means of the absolute - * resource name, subject to the rules for encapsulation specified in the - * {@code Module} {@link Module#getResourceAsStream getResourceAsStream} - * method. + * will attempt to find the resource in the module. This is done by + * delegating to the module's class loader {@link + * ClassLoader#findResource(String,String) findResource(String,String)} + * method, invoking it with the module name and the absolute name of the + * resource. Resources in named modules are subject to the rules for + * encapsulation specified in the {@code Module} {@link + * Module#getResourceAsStream getResourceAsStream} method and so this + * method returns {@code null} when the resource is a + * non-"{@code .class}" resource in a package that is not open to the + * caller's module. * *

      Otherwise, if this class is not in a named module then the rules for * searching resources associated with a given class are implemented by the @@ -2627,25 +2660,23 @@ public final class Class implements java.io.Serializable, * manager. * @throws NullPointerException If {@code name} is {@code null} * @since 1.1 + * @revised 9 + * @spec JPMS */ @CallerSensitive public URL getResource(String name) { name = resolveName(name); - Module module = getModule(); - if (module.isNamed()) { - if (!ResourceHelper.isSimpleResource(name)) { - Module caller = Reflection.getCallerClass().getModule(); - if (caller != module) { - Set packages = module.getDescriptor().packages(); - String pn = ResourceHelper.getPackageName(name); - if (packages.contains(pn) && !module.isOpen(pn, caller)) { - // resource is in package not open to caller - return null; - } - } + Module thisModule = getModule(); + if (thisModule.isNamed()) { + // check if resource can be located by caller + if (Resources.canEncapsulate(name) + && !isOpenToCaller(name, Reflection.getCallerClass())) { + return null; } - String mn = getModule().getName(); + + // resource not encapsulated or in package open to caller + String mn = thisModule.getName(); ClassLoader cl = getClassLoader0(); try { if (cl == null) { @@ -2667,10 +2698,36 @@ public final class Class implements java.io.Serializable, } } + /** + * Returns true if a resource with the given name can be located by the + * given caller. All resources in a module can be located by code in + * the module. For other callers, then the package needs to be open to + * the caller. + */ + private boolean isOpenToCaller(String name, Class caller) { + // assert getModule().isNamed(); + Module thisModule = getModule(); + Module callerModule = (caller != null) ? caller.getModule() : null; + if (callerModule != thisModule) { + String pn = Resources.toPackageName(name); + if (thisModule.getDescriptor().packages().contains(pn)) { + if (callerModule == null && !thisModule.isOpen(pn)) { + // no caller, package not open + return false; + } + if (!thisModule.isOpen(pn, callerModule)) { + // package not open to caller + return false; + } + } + } + return true; + } + + /** protection domain returned when the internal domain is null */ private static java.security.ProtectionDomain allPermDomain; - /** * Returns the {@code ProtectionDomain} of this class. If there is a * security manager installed, this method first calls the security @@ -2740,7 +2797,7 @@ public final class Class implements java.io.Serializable, * In all other cases, it requires RuntimePermission("accessDeclaredMembers") * permission. */ - final ClassLoader ccl = caller.getClassLoader0(); + final ClassLoader ccl = ClassLoader.getClassLoader(caller); if (which != Member.PUBLIC) { final ClassLoader cl = getClassLoader0(); if (ccl != cl) { @@ -2828,19 +2885,19 @@ public final class Class implements java.io.Serializable, static boolean casReflectionData(Class clazz, SoftReference> oldData, SoftReference> newData) { - return unsafe.compareAndSwapObject(clazz, reflectionDataOffset, oldData, newData); + return unsafe.compareAndSetObject(clazz, reflectionDataOffset, oldData, newData); } static boolean casAnnotationType(Class clazz, AnnotationType oldType, AnnotationType newType) { - return unsafe.compareAndSwapObject(clazz, annotationTypeOffset, oldType, newType); + return unsafe.compareAndSetObject(clazz, annotationTypeOffset, oldType, newType); } static boolean casAnnotationData(Class clazz, AnnotationData oldData, AnnotationData newData) { - return unsafe.compareAndSwapObject(clazz, annotationDataOffset, oldData, newData); + return unsafe.compareAndSetObject(clazz, annotationDataOffset, oldData, newData); } } diff --git a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java index fb771c29a10..57c4c09c9f7 100644 --- a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java +++ b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java @@ -31,7 +31,6 @@ import java.io.UncheckedIOException; import java.io.File; import java.lang.reflect.Constructor; import java.lang.reflect.Field; -import java.lang.reflect.Module; import java.net.URL; import java.security.AccessController; import java.security.AccessControlContext; @@ -94,12 +93,20 @@ import sun.security.util.SecurityConstants; *

      Class loaders may typically be used by security managers to indicate * security domains. * + *

      In addition to loading classes, a class loader is also responsible for + * locating resources. A resource is some data (a "{@code .class}" file, + * configuration data, or an image for example) that is identified with an + * abstract '/'-separated path name. Resources are typically packaged with an + * application or library so that they can be located by code in the + * application or library. In some cases, the resources are included so that + * they can be located by other libraries. + * *

      The {@code ClassLoader} class uses a delegation model to search for * classes and resources. Each instance of {@code ClassLoader} has an - * associated parent class loader. When requested to find a class or - * resource, a {@code ClassLoader} instance will delegate the search for the - * class or resource to its parent class loader before attempting to find the - * class or resource itself. + * associated parent class loader. When requested to find a class or + * resource, a {@code ClassLoader} instance will usually delegate the search + * for the class or resource to its parent class loader before attempting to + * find the class or resource itself. * *

      Class loaders that support concurrent loading of classes are known as * {@linkplain #isRegisteredAsParallelCapable() parallel capable} class @@ -115,23 +122,31 @@ import sun.security.util.SecurityConstants; * duration of the class loading process (see {@link #loadClass * loadClass} methods). * - *

      Run-time Built-in Class Loaders

      + *

      Run-time Built-in Class Loaders

      * * The Java run-time has the following built-in class loaders: * *
        - *
      • Bootstrap class loader. + *
      • Bootstrap class loader. * It is the virtual machine's built-in class loader, typically represented * as {@code null}, and does not have a parent.

      • - *
      • {@linkplain #getPlatformClassLoader() Platform class loader}. + *
      • {@linkplain #getPlatformClassLoader() Platform class loader}. * All platform classes are visible to the platform class loader * that can be used as the parent of a {@code ClassLoader} instance. * Platform classes include Java SE platform APIs, their implementation * classes and JDK-specific run-time classes that are defined by the - * platform class loader or its ancestors.

      • - *
      • {@linkplain #getSystemClassLoader() System class loader}. - * It is also known as application class - * loader and is distinct from the platform class loader. + * platform class loader or its ancestors. + *

        To allow for upgrading/overriding of modules defined to the platform + * class loader, and where upgraded modules read modules defined to class + * loaders other than the platform class loader and its ancestors, then + * the platform class loader may have to delegate to other class loaders, + * the application class loader for example. + * In other words, classes in named modules defined to class loaders + * other than the platform class loader and its ancestors may be visible + * to the platform class loader.

      • + *
      • {@linkplain #getSystemClassLoader() System class loader}. + * It is also known as application class loader and is distinct + * from the platform class loader. * The system class loader is typically used to define classes on the * application class path, module path, and JDK-specific tools. * The platform class loader is a parent or an ancestor of the system class @@ -184,7 +199,7 @@ import sun.security.util.SecurityConstants; * } * * - *

        Binary names

        + *

        Binary names

        * *

        Any class name provided as a {@code String} parameter to methods in * {@code ClassLoader} must be a binary name as defined by @@ -207,6 +222,8 @@ import sun.security.util.SecurityConstants; * @jls 13.1 The Form of a Binary * @see #resolveClass(Class) * @since 1.0 + * @revised 9 + * @spec JPMS */ public abstract class ClassLoader { @@ -350,9 +367,7 @@ public abstract class ClassLoader { private ClassLoader(Void unused, String name, ClassLoader parent) { this.name = name; this.parent = parent; - this.unnamedModule - = SharedSecrets.getJavaLangReflectModuleAccess() - .defineUnnamedModule(this); + this.unnamedModule = new Module(this); if (ParallelLoaders.isRegistered(this.getClass())) { parallelLockMap = new ConcurrentHashMap<>(); package2certs = new ConcurrentHashMap<>(); @@ -369,6 +384,10 @@ public abstract class ClassLoader { * Creates a new class loader of the specified name and using the * specified parent class loader for delegation. * + * @apiNote If the parent is specified as {@code null} (for the + * bootstrap class loader) then there is no guarantee that all platform + * classes are visible. + * * @param name class loader name; or {@code null} if not named * @param parent the parent class loader * @@ -380,20 +399,23 @@ public abstract class ClassLoader { * method doesn't allow creation of a new class loader. * * @since 9 + * @spec JPMS */ protected ClassLoader(String name, ClassLoader parent) { this(checkCreateClassLoader(name), name, parent); } - /** * Creates a new class loader using the specified parent class loader for * delegation. * *

        If there is a security manager, its {@link - * SecurityManager#checkCreateClassLoader() - * checkCreateClassLoader} method is invoked. This may result in - * a security exception.

        + * SecurityManager#checkCreateClassLoader() checkCreateClassLoader} method + * is invoked. This may result in a security exception.

        + * + * @apiNote If the parent is specified as {@code null} (for the + * bootstrap class loader) then there is no guarantee that all platform + * classes are visible. * * @param parent * The parent class loader @@ -440,6 +462,7 @@ public abstract class ClassLoader { * this class loader is not named. * * @since 9 + * @spec JPMS */ public String getName() { return name; @@ -485,7 +508,7 @@ public abstract class ClassLoader { * *
      • Invoke the {@link #loadClass(String) loadClass} method * on the parent class loader. If the parent is {@code null} the class - * loader built-in to the virtual machine is used, instead.

      • + * loader built into the virtual machine is used, instead.

        * *
      • Invoke the {@link #findClass(String)} method to find the * class.

      • @@ -668,8 +691,9 @@ public abstract class ClassLoader { * This method should be overridden by class loader implementations that * follow the delegation model for loading classes, and will be invoked by * the {@link #loadClass loadClass} method after checking the - * parent class loader for the requested class. The default implementation - * throws a {@code ClassNotFoundException}. + * parent class loader for the requested class. + * + * @implSpec The default implementation throws {@code ClassNotFoundException}. * * @param name * The binary name of the class @@ -710,6 +734,7 @@ public abstract class ClassLoader { * if the class could not be found. * * @since 9 + * @spec JPMS */ protected Class findClass(String moduleName, String name) { if (moduleName == null) { @@ -834,6 +859,8 @@ public abstract class ClassLoader { * @see java.security.SecureClassLoader * * @since 1.1 + * @revised 9 + * @spec JPMS */ protected final Class defineClass(String name, byte[] b, int off, int len) throws ClassFormatError @@ -967,6 +994,9 @@ public abstract class ClassLoader { * certificates than this class, or if {@code name} begins with * "{@code java.}" and this class loader is not the platform * class loader or its ancestor. + * + * @revised 9 + * @spec JPMS */ protected final Class defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain) @@ -974,7 +1004,7 @@ public abstract class ClassLoader { { protectionDomain = preDefineClass(name, protectionDomain); String source = defineClassSourceLocation(protectionDomain); - Class c = defineClass1(name, b, off, len, protectionDomain, source); + Class c = defineClass1(this, name, b, off, len, protectionDomain, source); postDefineClass(c, protectionDomain); return c; } @@ -1041,6 +1071,8 @@ public abstract class ClassLoader { * @see #defineClass(String, byte[], int, int, ProtectionDomain) * * @since 1.5 + * @revised 9 + * @spec JPMS */ protected final Class defineClass(String name, java.nio.ByteBuffer b, ProtectionDomain protectionDomain) @@ -1064,17 +1096,17 @@ public abstract class ClassLoader { protectionDomain = preDefineClass(name, protectionDomain); String source = defineClassSourceLocation(protectionDomain); - Class c = defineClass2(name, b, b.position(), len, protectionDomain, source); + Class c = defineClass2(this, name, b, b.position(), len, protectionDomain, source); postDefineClass(c, protectionDomain); return c; } - private native Class defineClass1(String name, byte[] b, int off, int len, - ProtectionDomain pd, String source); + static native Class defineClass1(ClassLoader loader, String name, byte[] b, int off, int len, + ProtectionDomain pd, String source); - private native Class defineClass2(String name, java.nio.ByteBuffer b, - int off, int len, ProtectionDomain pd, - String source); + static native Class defineClass2(ClassLoader loader, String name, java.nio.ByteBuffer b, + int off, int len, ProtectionDomain pd, + String source); // true if the name is null or has the potential to be a valid binary name private boolean checkName(String name) { @@ -1106,8 +1138,9 @@ public abstract class ClassLoader { putIfAbsent(pname, (certs == null? nocerts:certs)); } if (pcerts != null && !compareCerts(pcerts, certs)) { - throw new SecurityException("class \""+ name + - "\"'s signer information does not match signer information of other classes in the same package"); + throw new SecurityException("class \"" + name + + "\"'s signer information does not match signer information" + + " of other classes in the same package"); } } @@ -1264,11 +1297,11 @@ public abstract class ClassLoader { * Class loader implementations that support the loading from modules * should override this method. * - * @apiNote This method is the basis for the {@code Class} {@link - * Class#getResource getResource} and {@link Class#getResourceAsStream - * getResourceAsStream} methods. It is not subject to the rules for - * encapsulation specified by {@code Module} {@link - * Module#getResourceAsStream getResourceAsStream}. + * @apiNote This method is the basis for the {@link + * Class#getResource Class.getResource}, {@link Class#getResourceAsStream + * Class.getResourceAsStream}, and {@link Module#getResourceAsStream + * Module.getResourceAsStream} methods. It is not subject to the rules for + * encapsulation specified by {@code Module.getResourceAsStream}. * * @implSpec The default implementation attempts to find the resource by * invoking {@link #findResource(String)} when the {@code moduleName} is @@ -1292,6 +1325,7 @@ public abstract class ClassLoader { * * @see java.lang.module.ModuleReader#find(String) * @since 9 + * @spec JPMS */ protected URL findResource(String moduleName, String name) throws IOException { if (moduleName == null) { @@ -1307,12 +1341,7 @@ public abstract class ClassLoader { * that is independent of the location of the code. * *

        The name of a resource is a '{@code /}'-separated path name that - * identifies the resource. - * - *

        This method will first search the parent class loader for the - * resource; if the parent is {@code null} the path of the class loader - * built-in to the virtual machine is searched. That failing, this method - * will invoke {@link #findResource(String)} to find the resource.

        + * identifies the resource.

        * *

        Resources in named modules are subject to the encapsulation rules * specified by {@link Module#getResourceAsStream Module.getResourceAsStream}. @@ -1322,6 +1351,11 @@ public abstract class ClassLoader { * opened} unconditionally (even if the caller of this method is in the * same module as the resource).

        * + * @implSpec The default implementation will first search the parent class + * loader for the resource; if the parent is {@code null} the path of the + * class loader built into the virtual machine is searched. If not found, + * this method will invoke {@link #findResource(String)} to find the resource. + * * @apiNote Where several modules are defined to the same class loader, * and where more than one module contains a resource with the given name, * then the ordering that modules are searched is not specified and may be @@ -1342,6 +1376,8 @@ public abstract class ClassLoader { * @throws NullPointerException If {@code name} is {@code null} * * @since 1.1 + * @revised 9 + * @spec JPMS */ public URL getResource(String name) { Objects.requireNonNull(name); @@ -1363,10 +1399,7 @@ public abstract class ClassLoader { * that is independent of the location of the code. * *

        The name of a resource is a {@code /}-separated path name that - * identifies the resource. - * - *

        The delegation order for searching is described in the documentation - * for {@link #getResource(String)}.

        + * identifies the resource.

        * *

        Resources in named modules are subject to the encapsulation rules * specified by {@link Module#getResourceAsStream Module.getResourceAsStream}. @@ -1374,7 +1407,15 @@ public abstract class ClassLoader { * name ending with "{@code .class}", this method will only find resources in * packages of named modules when the package is {@link Module#isOpen(String) * opened} unconditionally (even if the caller of this method is in the - * same module as the resource).

        + * same module as the resource).

        + * + * @implSpec The default implementation will first search the parent class + * loader for the resource; if the parent is {@code null} the path of the + * class loader built into the virtual machine is searched. It then + * invokes {@link #findResources(String)} to find the resources with the + * name in this class loader. It returns an enumeration whose elements + * are the URLs found by searching the parent class loader followed by + * the elements found with {@code findResources}. * * @apiNote Where several modules are defined to the same class loader, * and where more than one module contains a resource with the given name, @@ -1400,9 +1441,9 @@ public abstract class ClassLoader { * If I/O errors occur * @throws NullPointerException If {@code name} is {@code null} * - * @see #findResources(String) - * * @since 1.2 + * @revised 9 + * @spec JPMS */ public Enumeration getResources(String name) throws IOException { Objects.requireNonNull(name); @@ -1427,9 +1468,6 @@ public abstract class ClassLoader { *

        The name of a resource is a {@code /}-separated path name that * identifies the resource. * - *

        The search order is described in the documentation for {@link - * #getResource(String)}. - * *

        The resources will be located when the returned stream is evaluated. * If the evaluation results in an {@code IOException} then the I/O * exception is wrapped in an {@link UncheckedIOException} that is then @@ -1443,6 +1481,10 @@ public abstract class ClassLoader { * opened} unconditionally (even if the caller of this method is in the * same module as the resource).

        * + * @implSpec The default implementation invokes {@link #getResources(String) + * getResources} to find all the resources with the given name and returns + * a stream with the elements in the enumeration as the source. + * * @apiNote When overriding this method it is recommended that an * implementation ensures that any delegation is consistent with the {@link * #getResource(java.lang.String) getResource(String)} method. This should @@ -1460,8 +1502,6 @@ public abstract class ClassLoader { * * @throws NullPointerException If {@code name} is {@code null} * - * @see #findResources(String) - * * @since 9 */ public Stream resources(String name) { @@ -1480,7 +1520,7 @@ public abstract class ClassLoader { /** * Finds the resource with the given name. Class loader implementations - * should override this method to specify where to find resources. + * should override this method. * *

        For resources in named modules then the method must implement the * rules for encapsulation specified in the {@code Module} {@link @@ -1489,6 +1529,8 @@ public abstract class ClassLoader { * modules unless the package is {@link Module#isOpen(String) opened} * unconditionally.

        * + * @implSpec The default implementation returns {@code null}. + * * @param name * The resource name * @@ -1499,6 +1541,8 @@ public abstract class ClassLoader { * denied by the security manager. * * @since 1.2 + * @revised 9 + * @spec JPMS */ protected URL findResource(String name) { return null; @@ -1507,8 +1551,7 @@ public abstract class ClassLoader { /** * Returns an enumeration of {@link java.net.URL URL} objects * representing all the resources with the given name. Class loader - * implementations should override this method to specify where to load - * resources from. + * implementations should override this method. * *

        For resources in named modules then the method must implement the * rules for encapsulation specified in the {@code Module} {@link @@ -1517,6 +1560,9 @@ public abstract class ClassLoader { * modules unless the package is {@link Module#isOpen(String) opened} * unconditionally.

        * + * @implSpec The default implementation returns an enumeration that + * contains no elements. + * * @param name * The resource name * @@ -1531,6 +1577,8 @@ public abstract class ClassLoader { * If I/O errors occur * * @since 1.2 + * @revised 9 + * @spec JPMS */ protected Enumeration findResources(String name) throws IOException { return Collections.emptyEnumeration(); @@ -1601,6 +1649,8 @@ public abstract class ClassLoader { * denied by the security manager. * * @since 1.1 + * @revised 9 + * @spec JPMS */ public static URL getSystemResource(String name) { return getSystemClassLoader().getResource(name); @@ -1636,6 +1686,8 @@ public abstract class ClassLoader { * If I/O errors occur * * @since 1.2 + * @revised 9 + * @spec JPMS */ public static Enumeration getSystemResources(String name) throws IOException @@ -1667,6 +1719,8 @@ public abstract class ClassLoader { * @throws NullPointerException If {@code name} is {@code null} * * @since 1.1 + * @revised 9 + * @spec JPMS */ public InputStream getResourceAsStream(String name) { Objects.requireNonNull(name); @@ -1699,6 +1753,8 @@ public abstract class ClassLoader { * denied by the security manager. * * @since 1.1 + * @revised 9 + * @spec JPMS */ public static InputStream getSystemResourceAsStream(String name) { URL url = getSystemResource(name); @@ -1749,6 +1805,7 @@ public abstract class ClassLoader { * * @see Module#isNamed() * @since 9 + * @spec JPMS */ public final Module getUnnamedModule() { return unnamedModule; @@ -1772,6 +1829,7 @@ public abstract class ClassLoader { * {@link RuntimePermission}{@code ("getClassLoader")} * * @since 9 + * @spec JPMS */ @CallerSensitive public static ClassLoader getPlatformClassLoader() { @@ -1847,6 +1905,8 @@ public abstract class ClassLoader { * {@link Throwable#getCause()} method. * * @revised 1.4 + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ClassLoader getSystemClassLoader() { @@ -1857,7 +1917,8 @@ public abstract class ClassLoader { // the system class loader is the built-in app class loader during startup return getBuiltinAppClassLoader(); case 3: - throw new InternalError("getSystemClassLoader should only be called after VM booted"); + String msg = "getSystemClassLoader should only be called after VM booted"; + throw new InternalError(msg); case 4: // system fully initialized assert VM.isBooted() && scl != null; @@ -2101,10 +2162,10 @@ public abstract class ClassLoader { * defined by this class loader * * @since 1.2 + * @revised 9 + * @spec JPMS * - * @see - * The JAR File Specification: Package Versioning - * @see + * @see * The JAR File Specification: Package Sealing */ protected Package definePackage(String name, String specTitle, @@ -2138,6 +2199,7 @@ public abstract class ClassLoader { * if {@code name} is {@code null}. * * @since 9 + * @spec JPMS */ public final Package getDefinedPackage(String name) { Objects.requireNonNull(name, "name cannot be null"); @@ -2160,6 +2222,7 @@ public abstract class ClassLoader { * or an zero length array if no package has been defined by this class loader. * * @since 9 + * @spec JPMS */ public final Package[] getDefinedPackages() { return packages().toArray(Package[]::new); @@ -2173,6 +2236,12 @@ public abstract class ClassLoader { * this class loader are searched recursively (parent by parent) * for a {@code Package} of the given name. * + * @apiNote The {@link #getPlatformClassLoader() platform class loader} + * may delegate to the application class loader but the application class + * loader is not its ancestor. When invoked on the platform class loader, + * this method will not find packages defined to the application + * class loader. + * * @param name * The package name * @@ -2196,6 +2265,8 @@ public abstract class ClassLoader { * a {@code Package} for the specified class loader. * * @since 1.2 + * @revised 9 + * @spec JPMS */ @Deprecated(since="9") protected Package getPackage(String name) { @@ -2216,10 +2287,20 @@ public abstract class ClassLoader { * {@code Package} object of the same package name, each defined by * a different class loader in the class loader hierarchy. * + * @apiNote The {@link #getPlatformClassLoader() platform class loader} + * may delegate to the application class loader. In other words, + * packages in modules defined to the application class loader may be + * visible to the platform class loader. On the other hand, + * the application class loader is not its ancestor and hence + * when invoked on the platform class loader, this method will not + * return any packages defined to the application class loader. + * * @return The array of {@code Package} objects defined by this * class loader and its ancestors * * @since 1.2 + * @revised 9 + * @spec JPMS */ protected Package[] getPackages() { Stream pkgs = packages(); @@ -2308,6 +2389,7 @@ public abstract class ClassLoader { this.isBuiltin = isBuiltin; } + @SuppressWarnings("deprecation") protected void finalize() { synchronized (loadedLibraryNames) { if (fromClass.getClassLoader() != null && loaded) { @@ -2819,7 +2901,7 @@ public abstract class ClassLoader { } catch (NoSuchFieldException e) { throw new InternalError(e); } - return unsafe.compareAndSwapObject(this, offset, null, obj); + return unsafe.compareAndSetObject(this, offset, null, obj); } } diff --git a/jdk/src/java.base/share/classes/java/lang/Comparable.java b/jdk/src/java.base/share/classes/java/lang/Comparable.java index ff8892caacf..f9be4c440ca 100644 --- a/jdk/src/java.base/share/classes/java/lang/Comparable.java +++ b/jdk/src/java.base/share/classes/java/lang/Comparable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -84,7 +84,7 @@ import java.util.*; * {(x, y) such that x.equals(y)}.

        * * This interface is a member of the - * + * * Java Collections Framework. * * @param the type of objects that this object may be compared to @@ -124,7 +124,7 @@ public interface Comparable { * {@code sgn(}expression{@code )} designates the mathematical * signum function, which is defined to return one of {@code -1}, * {@code 0}, or {@code 1} according to whether the value of - * expression is negative, zero or positive. + * expression is negative, zero, or positive, respectively. * * @param o the object to be compared. * @return a negative integer, zero, or a positive integer as this object diff --git a/jdk/src/java.base/share/classes/java/lang/Double.java b/jdk/src/java.base/share/classes/java/lang/Double.java index 75a227e5282..a7aa0a0f626 100644 --- a/jdk/src/java.base/share/classes/java/lang/Double.java +++ b/jdk/src/java.base/share/classes/java/lang/Double.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -255,9 +255,12 @@ public final class Double extends Number implements Comparable { * *

      * - * + *
      * + * * + * + * * * * @@ -272,6 +275,7 @@ public final class Double extends Number implements Comparable { * * * + * *
      Examples
      Floating-point ValueHexadecimal String
      {@code 1.0} {@code 0x1.0p0}
      {@code -1.0} {@code -0x1.0p0}
      {@code 2.0} {@code 0x1.0p1}{@code 0x0.fffffffffffffp-1022}
      {@code Double.MIN_VALUE}{@code 0x0.0000000000001p-1022}
      * @param d the {@code double} to be converted. * @return a hex string representation of the argument. diff --git a/jdk/src/java.base/share/classes/java/lang/Enum.java b/jdk/src/java.base/share/classes/java/lang/Enum.java index 9a98f30bbbd..ac912f5ca65 100644 --- a/jdk/src/java.base/share/classes/java/lang/Enum.java +++ b/jdk/src/java.base/share/classes/java/lang/Enum.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -243,6 +243,7 @@ public abstract class Enum> /** * enum classes cannot have finalize methods. */ + @SuppressWarnings("deprecation") protected final void finalize() { } /** diff --git a/jdk/src/java.base/share/classes/java/lang/Float.java b/jdk/src/java.base/share/classes/java/lang/Float.java index 60e08db7ad5..77c1d1671d5 100644 --- a/jdk/src/java.base/share/classes/java/lang/Float.java +++ b/jdk/src/java.base/share/classes/java/lang/Float.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -256,9 +256,12 @@ public final class Float extends Number implements Comparable { * *
    * - * + *
    * + * * + * + * * * * @@ -273,6 +276,7 @@ public final class Float extends Number implements Comparable { * * * + * *
    Examples
    Floating-point ValueHexadecimal String
    {@code 1.0} {@code 0x1.0p0}
    {@code -1.0} {@code -0x1.0p0}
    {@code 2.0} {@code 0x1.0p1}{@code 0x0.fffffep-126}
    {@code Float.MIN_VALUE}{@code 0x0.000002p-126}
    * @param f the {@code float} to be converted. * @return a hex string representation of the argument. diff --git a/jdk/src/java.base/share/classes/java/lang/IllegalCallerException.java b/jdk/src/java.base/share/classes/java/lang/IllegalCallerException.java new file mode 100644 index 00000000000..f882fb21591 --- /dev/null +++ b/jdk/src/java.base/share/classes/java/lang/IllegalCallerException.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.lang; + +/** + * Thrown to indicate that a method has been called by an inappropriate caller. + * + * @since 9 + * @spec JPMS + * @see StackWalker#getCallerClass + */ +public class IllegalCallerException extends RuntimeException { + /** + * Constructs an IllegalCallerException with no detail message. + */ + public IllegalCallerException() { + super(); + } + + /** + * Constructs an IllegalCallerException with the specified detail + * message. + * + * @param s the String that contains a detailed message (can be null) + */ + public IllegalCallerException(String s) { + super(s); + } + + /** + * Constructs a new exception with the specified detail message and + * cause. + * + * @param message the detail message (can be null) + * @param cause the cause (can be null) + */ + public IllegalCallerException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new exception with the specified cause and a detail + * message of {@code (cause==null ? null : cause.toString())} (which + * typically contains the class and detail message of {@code cause}). + * + * @param cause the cause (can be null) + */ + public IllegalCallerException(Throwable cause) { + super(cause); + } + + static final long serialVersionUID = -2349421918363102232L; +} diff --git a/jdk/src/java.base/share/classes/java/lang/Integer.java b/jdk/src/java.base/share/classes/java/lang/Integer.java index 8164b20d77e..685d77c8968 100644 --- a/jdk/src/java.base/share/classes/java/lang/Integer.java +++ b/jdk/src/java.base/share/classes/java/lang/Integer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -386,7 +386,7 @@ public final class Integer extends Number implements Comparable { } /** byte[]/UTF16 version */ - static void formatUnsignedIntUTF16(int val, int shift, byte[] buf, int offset, int len) { + private static void formatUnsignedIntUTF16(int val, int shift, byte[] buf, int offset, int len) { int charPos = offset + len; int radix = 1 << shift; int mask = radix - 1; @@ -442,7 +442,7 @@ public final class Integer extends Number implements Comparable { return new String(buf, LATIN1); } else { byte[] buf = new byte[size * 2]; - getCharsUTF16(i, size, buf); + StringUTF16.getChars(i, size, buf); return new String(buf, UTF16); } } @@ -516,49 +516,6 @@ public final class Integer extends Number implements Comparable { return charPos; } - /** - * This is a variant of {@link #getChars(int, int, byte[])}, but for - * UTF-16 coder. - * - * @param i value to convert - * @param index next index, after the least significant digit - * @param buf target buffer, UTF16-coded. - * @return index of the most significant digit or minus sign, if present - */ - static int getCharsUTF16(int i, int index, byte[] buf) { - int q, r; - int charPos = index; - - boolean negative = (i < 0); - if (!negative) { - i = -i; - } - - // Get 2 digits/iteration using ints - while (i <= -100) { - q = i / 100; - r = (q * 100) - i; - i = q; - StringUTF16.putChar(buf, --charPos, DigitOnes[r]); - StringUTF16.putChar(buf, --charPos, DigitTens[r]); - } - - // We know there are at most two digits left at this point. - q = i / 10; - r = (q * 10) - i; - StringUTF16.putChar(buf, --charPos, '0' + r); - - // Whatever left is the remaining digit. - if (q < 0) { - StringUTF16.putChar(buf, --charPos, '0' - q); - } - - if (negative) { - StringUTF16.putChar(buf, --charPos, '-'); - } - return charPos; - } - // Left here for compatibility reasons, see JDK-8143900. static final int [] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999, 99999999, 999999999, Integer.MAX_VALUE }; diff --git a/jdk/src/java.base/share/classes/java/lang/Iterable.java b/jdk/src/java.base/share/classes/java/lang/Iterable.java index 89059022905..a58faa4b250 100644 --- a/jdk/src/java.base/share/classes/java/lang/Iterable.java +++ b/jdk/src/java.base/share/classes/java/lang/Iterable.java @@ -31,16 +31,13 @@ import java.util.Spliterators; import java.util.function.Consumer; /** - * Implementing this interface allows an object to be the target of - * the "for-each loop" statement. See - * - * For-each Loop - * + * Implementing this interface allows an object to be the target of the enhanced + * {@code for} statement (sometimes called the "for-each loop" statement). * * @param the type of elements returned by the iterator * * @since 1.5 - * @jls 14.14.2 The enhanced for statement + * @jls 14.14.2 The enhanced {@code for} statement */ public interface Iterable { /** diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/LayerInstantiationException.java b/jdk/src/java.base/share/classes/java/lang/LayerInstantiationException.java similarity index 88% rename from jdk/src/java.base/share/classes/java/lang/reflect/LayerInstantiationException.java rename to jdk/src/java.base/share/classes/java/lang/LayerInstantiationException.java index ff61c41590f..5a7ee0aaaac 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/LayerInstantiationException.java +++ b/jdk/src/java.base/share/classes/java/lang/LayerInstantiationException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -23,14 +23,14 @@ * questions. */ -package java.lang.reflect; +package java.lang; /** - * Thrown when creating a Layer fails. - * - * @see Layer + * Thrown when creating a {@linkplain ModuleLayer module layer} fails. * + * @see ModuleLayer * @since 9 + * @spec JPMS */ public class LayerInstantiationException extends RuntimeException { private static final long serialVersionUID = -906239691613568347L; @@ -63,8 +63,8 @@ public class LayerInstantiationException extends RuntimeException { } /** - * Constructs a {@code FindException} with the given detail message - * and cause. + * Constructs a {@code LayerInstantiationException} with the given detail + * message and cause. * * @param msg * The detail message; can be {@code null} @@ -74,6 +74,5 @@ public class LayerInstantiationException extends RuntimeException { public LayerInstantiationException(String msg, Throwable cause) { super(msg, cause); } - } diff --git a/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java b/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java index 5be48729d5a..13dfa34be8f 100644 --- a/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java +++ b/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java @@ -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 @@ -55,14 +55,36 @@ interface LiveStackFrame extends StackFrame { * *

    A single local variable can hold a value of type boolean, byte, char, * short, int, float, reference or returnAddress. A pair of local variables - * can hold a value of type long or double. In other words, - * a value of type long or type double occupies two consecutive local - * variables. For a value of primitive type, the element in the - * local variable array is an {@link PrimitiveValue} object; - * otherwise, the element is an {@code Object}. + * can hold a value of type long or double (JVMS section 2.6.1). Primitive + * locals are represented in the returned array as {@code PrimitiveSlot}s, + * with longs and doubles occupying a pair of consecutive + * {@code PrimitiveSlot}s. * - *

    The returned array may contain null entries if a local variable is not - * live. + *

    The current VM implementation does not provide specific type + * information for primitive locals. This method simply returns the raw + * contents of the VM's primitive locals on a best-effort basis, without + * indicating a specific type. + * + *

    The returned array may contain null entries for local variables that + * are not live. + * + * @implNote + *

    The specific subclass of {@code PrimitiveSlot} will reflect the + * underlying architecture, and will be either {@code PrimitiveSlot32} or + * {@code PrimitiveSlot64}. + * + *

    How a long or double value is stored in the pair of + * {@code PrimitiveSlot}s can vary based on the underlying architecture and + * VM implementation. On 32-bit architectures, long/double values are split + * between the two {@code PrimitiveSlot32}s. + * On 64-bit architectures, the entire value may be stored in one of the + * {@code PrimitiveSlot64}s, with the other {@code PrimitiveSlot64} being + * unused. + * + *

    The contents of the unused, high-order portion of a + * {@code PrimitiveSlot64} (when storing a primitive other than a long or + * double) is unspecified. In particular, the unused bits are not + * necessarily zeroed out. * * @return the local variable array of this stack frame. */ @@ -78,7 +100,7 @@ interface LiveStackFrame extends StackFrame { *

    Each entry on the operand stack can hold a value of any Java Virtual * Machine Type. * For a value of primitive type, the element in the returned array is - * an {@link PrimitiveValue} object; otherwise, the element is the {@code Object} + * a {@link PrimitiveSlot} object; otherwise, the element is the {@code Object} * on the operand stack. * * @return the operand stack of this stack frame. @@ -87,107 +109,37 @@ interface LiveStackFrame extends StackFrame { /** * UNSUPPORTED This interface is intended to be package-private - * or move to an internal package.

    + * or moved to an internal package.

    * - * Represents a local variable or an entry on the operand whose value is + * Represents a local variable or an entry on the operand stack whose value is * of primitive type. */ - public abstract class PrimitiveValue { + public abstract class PrimitiveSlot { /** - * Returns the base type of this primitive value, one of - * {@code B, D, C, F, I, J, S, Z}. - * - * @return Name of a base type - * @jvms table 4.3-A + * Returns the size, in bytes, of the slot. */ - abstract char type(); + public abstract int size(); /** - * Returns the boolean value if this primitive value is of type boolean. - * @return the boolean value if this primitive value is of type boolean. + * Returns the int value if this primitive value is of size 4 + * @return the int value if this primitive value is of size 4 * * @throws UnsupportedOperationException if this primitive value is not - * of type boolean. - */ - public boolean booleanValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the int value if this primitive value is of type int. - * @return the int value if this primitive value is of type int. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type int. + * of size 4. */ public int intValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); + throw new UnsupportedOperationException("this " + size() + "-byte primitive"); } /** - * Returns the long value if this primitive value is of type long. - * @return the long value if this primitive value is of type long. + * Returns the long value if this primitive value is of size 8 + * @return the long value if this primitive value is of size 8 * * @throws UnsupportedOperationException if this primitive value is not - * of type long. + * of size 8. */ public long longValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the char value if this primitive value is of type char. - * @return the char value if this primitive value is of type char. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type char. - */ - public char charValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the byte value if this primitive value is of type byte. - * @return the byte value if this primitive value is of type byte. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type byte. - */ - public byte byteValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the short value if this primitive value is of type short. - * @return the short value if this primitive value is of type short. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type short. - */ - public short shortValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the float value if this primitive value is of type float. - * @return the float value if this primitive value is of type float. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type float. - */ - public float floatValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the double value if this primitive value is of type double. - * @return the double value if this primitive value is of type double. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type double. - */ - public double doubleValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); + throw new UnsupportedOperationException("this " + size() + "-byte primitive"); } } @@ -217,7 +169,7 @@ interface LiveStackFrame extends StackFrame { * it denies access to {@code RuntimePermission("liveStackFrames")}; or * or if the given {@code options} contains * {@link StackWalker.Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE} - * and it denies access to {@code StackFramePermission("retainClassReference")}. + * and it denies access to {@code RuntimePermission("getStackWalkerWithClassReference")}. */ public static StackWalker getStackWalker(Set options) { SecurityManager sm = System.getSecurityManager(); diff --git a/jdk/src/java.base/share/classes/java/lang/LiveStackFrameInfo.java b/jdk/src/java.base/share/classes/java/lang/LiveStackFrameInfo.java index db8901ea731..b6583adf559 100644 --- a/jdk/src/java.base/share/classes/java/lang/LiveStackFrameInfo.java +++ b/jdk/src/java.base/share/classes/java/lang/LiveStackFrameInfo.java @@ -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 @@ -24,15 +24,13 @@ */ package java.lang; -import java.lang.StackWalker.Option; -import java.util.EnumSet; -import java.util.Set; - -import static java.lang.StackWalker.ExtendedOption.*; - final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame { private static Object[] EMPTY_ARRAY = new Object[0]; + // These flags must match the values maintained in the VM + private static final int MODE_INTERPRETED = 0x01; + private static final int MODE_COMPILED = 0x02; + LiveStackFrameInfo(StackWalker walker) { super(walker); } @@ -41,6 +39,7 @@ final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame private Object[] monitors = EMPTY_ARRAY; private Object[] locals = EMPTY_ARRAY; private Object[] operands = EMPTY_ARRAY; + private int mode = 0; @Override public Object[] getMonitors() { @@ -57,51 +56,44 @@ final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame return operands; } + @Override + public String toString() { + StringBuilder retVal = new StringBuilder(super.toString()); + if (mode != 0) { + retVal.append("("); + if ((mode & MODE_INTERPRETED) == MODE_INTERPRETED) { + retVal.append(" interpreted "); + } + if ((mode & MODE_COMPILED) == MODE_COMPILED) { + retVal.append(" compiled "); + } + retVal.append(")"); + } + return retVal.toString(); + } + /* - * Convert primitive value to {@code Primitive} object to represent + * Convert primitive value to {@code PrimitiveSlot} object to represent * a local variable or an element on the operand stack of primitive type. */ - static PrimitiveValue asPrimitive(boolean value) { - return new BooleanPrimitive(value); + + static PrimitiveSlot asPrimitive(int value) { + return new PrimitiveSlot32(value); } - static PrimitiveValue asPrimitive(int value) { - return new IntPrimitive(value); + static PrimitiveSlot asPrimitive(long value) { + return new PrimitiveSlot64(value); } - static PrimitiveValue asPrimitive(short value) { - return new ShortPrimitive(value); - } - - static PrimitiveValue asPrimitive(char value) { - return new CharPrimitive(value); - } - - static PrimitiveValue asPrimitive(byte value) { - return new BytePrimitive(value); - } - - static PrimitiveValue asPrimitive(long value) { - return new LongPrimitive(value); - } - - static PrimitiveValue asPrimitive(float value) { - return new FloatPrimitive(value); - } - - static PrimitiveValue asPrimitive(double value) { - return new DoublePrimitive(value); - } - - private static class IntPrimitive extends PrimitiveValue { + private static class PrimitiveSlot32 extends PrimitiveSlot { final int value; - IntPrimitive(int value) { + PrimitiveSlot32(int value) { this.value = value; } @Override - public char type() { - return 'I'; + public int size() { + return 4; } @Override @@ -115,103 +107,15 @@ final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame } } - private static class ShortPrimitive extends PrimitiveValue { - final short value; - ShortPrimitive(short value) { - this.value = value; - } - - @Override - public char type() { - return 'S'; - } - - @Override - public short shortValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } - - private static class BooleanPrimitive extends PrimitiveValue { - final boolean value; - BooleanPrimitive(boolean value) { - this.value = value; - } - - @Override - public char type() { - return 'Z'; - } - - @Override - public boolean booleanValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } - - private static class CharPrimitive extends PrimitiveValue { - final char value; - CharPrimitive(char value) { - this.value = value; - } - - @Override - public char type() { - return 'C'; - } - - @Override - public char charValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } - - private static class BytePrimitive extends PrimitiveValue { - final byte value; - BytePrimitive(byte value) { - this.value = value; - } - - @Override - public char type() { - return 'B'; - } - - @Override - public byte byteValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } - - private static class LongPrimitive extends PrimitiveValue { + private static class PrimitiveSlot64 extends PrimitiveSlot { final long value; - LongPrimitive(long value) { + PrimitiveSlot64(long value) { this.value = value; } @Override - public char type() { - return 'J'; + public int size() { + return 8; } @Override @@ -224,48 +128,4 @@ final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame return String.valueOf(value); } } - - private static class FloatPrimitive extends PrimitiveValue { - final float value; - FloatPrimitive(float value) { - this.value = value; - } - - @Override - public char type() { - return 'F'; - } - - @Override - public float floatValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } - - private static class DoublePrimitive extends PrimitiveValue { - final double value; - DoublePrimitive(double value) { - this.value = value; - } - - @Override - public char type() { - return 'D'; - } - - @Override - public double doubleValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } } diff --git a/jdk/src/java.base/share/classes/java/lang/Long.java b/jdk/src/java.base/share/classes/java/lang/Long.java index 103389c99fe..9d298cae439 100644 --- a/jdk/src/java.base/share/classes/java/lang/Long.java +++ b/jdk/src/java.base/share/classes/java/lang/Long.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -414,7 +414,7 @@ public final class Long extends Number implements Comparable { } /** byte[]/UTF16 version */ - static void formatUnsignedLong0UTF16(long val, int shift, byte[] buf, int offset, int len) { + private static void formatUnsignedLong0UTF16(long val, int shift, byte[] buf, int offset, int len) { int charPos = offset + len; int radix = 1 << shift; int mask = radix - 1; @@ -475,7 +475,7 @@ public final class Long extends Number implements Comparable { return new String(buf, LATIN1); } else { byte[] buf = new byte[size * 2]; - getCharsUTF16(i, size, buf); + StringUTF16.getChars(i, size, buf); return new String(buf, UTF16); } } @@ -561,61 +561,6 @@ public final class Long extends Number implements Comparable { return charPos; } - /** - * This is a variant of {@link #getChars(long, int, byte[])}, but for - * UTF-16 coder. - * - * @param i value to convert - * @param index next index, after the least significant digit - * @param buf target buffer, UTF16-coded. - * @return index of the most significant digit or minus sign, if present - */ - static int getCharsUTF16(long i, int index, byte[] buf) { - long q; - int r; - int charPos = index; - - boolean negative = (i < 0); - if (!negative) { - i = -i; - } - - // Get 2 digits/iteration using longs until quotient fits into an int - while (i <= Integer.MIN_VALUE) { - q = i / 100; - r = (int)((q * 100) - i); - i = q; - StringUTF16.putChar(buf, --charPos, Integer.DigitOnes[r]); - StringUTF16.putChar(buf, --charPos, Integer.DigitTens[r]); - } - - // Get 2 digits/iteration using ints - int q2; - int i2 = (int)i; - while (i2 <= -100) { - q2 = i2 / 100; - r = (q2 * 100) - i2; - i2 = q2; - StringUTF16.putChar(buf, --charPos, Integer.DigitOnes[r]); - StringUTF16.putChar(buf, --charPos, Integer.DigitTens[r]); - } - - // We know there are at most two digits left at this point. - q2 = i2 / 10; - r = (q2 * 10) - i2; - StringUTF16.putChar(buf, --charPos, '0' + r); - - // Whatever left is the remaining digit. - if (q2 < 0) { - StringUTF16.putChar(buf, --charPos, '0' - q2); - } - - if (negative) { - StringUTF16.putChar(buf, --charPos, '-'); - } - return charPos; - } - /** * Returns the string representation size for a given long value. * diff --git a/jdk/src/java.base/share/classes/java/lang/Math.java b/jdk/src/java.base/share/classes/java/lang/Math.java index 911267d5956..40e8926e052 100644 --- a/jdk/src/java.base/share/classes/java/lang/Math.java +++ b/jdk/src/java.base/share/classes/java/lang/Math.java @@ -1079,6 +1079,7 @@ public final class Math { * @param x the first value * @param y the second value * @return the result + * @since 9 */ public static long multiplyFull(int x, int y) { return (long)x * (long)y; @@ -1091,6 +1092,7 @@ public final class Math { * @param x the first value * @param y the second value * @return the result + * @since 9 */ public static long multiplyHigh(long x, long y) { if (x < 0 || y < 0) { @@ -1275,7 +1277,7 @@ public final class Math { } /** - * Returns the floor modulus of the {@code long} and {@int} arguments. + * Returns the floor modulus of the {@code long} and {@code int} arguments. *

    * The floor modulus is {@code x - (floorDiv(x, y) * y)}, * has the same sign as the divisor {@code y}, and diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Module.java b/jdk/src/java.base/share/classes/java/lang/Module.java similarity index 70% rename from jdk/src/java.base/share/classes/java/lang/reflect/Module.java rename to jdk/src/java.base/share/classes/java/lang/Module.java index 5134b64caf8..2b1e0ed74a6 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Module.java +++ b/jdk/src/java.base/share/classes/java/lang/Module.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -23,7 +23,7 @@ * questions. */ -package java.lang.reflect; +package java.lang; import java.io.IOException; import java.io.InputStream; @@ -35,6 +35,7 @@ import java.lang.module.ModuleDescriptor.Exports; import java.lang.module.ModuleDescriptor.Opens; import java.lang.module.ModuleDescriptor.Version; import java.lang.module.ResolvedModule; +import java.lang.reflect.AnnotatedElement; import java.net.URI; import java.net.URL; import java.security.AccessController; @@ -42,21 +43,26 @@ import java.security.PrivilegedAction; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; +import java.util.stream.Collectors; import java.util.stream.Stream; import jdk.internal.loader.BuiltinClassLoader; import jdk.internal.loader.BootLoader; -import jdk.internal.loader.ResourceHelper; +import jdk.internal.loader.ClassLoaders; import jdk.internal.misc.JavaLangAccess; -import jdk.internal.misc.JavaLangReflectModuleAccess; import jdk.internal.misc.SharedSecrets; +import jdk.internal.module.IllegalAccessLogger; +import jdk.internal.module.ModuleLoaderMap; import jdk.internal.module.ServicesCatalog; +import jdk.internal.module.Resources; import jdk.internal.org.objectweb.asm.AnnotationVisitor; import jdk.internal.org.objectweb.asm.Attribute; import jdk.internal.org.objectweb.asm.ClassReader; @@ -72,18 +78,17 @@ import sun.security.util.SecurityConstants; * *

    Named modules have a {@link #getName() name} and are constructed by the * Java Virtual Machine when a graph of modules is defined to the Java virtual - * machine to create a module {@link Layer Layer}.

    + * machine to create a {@linkplain ModuleLayer module layer}.

    * - *

    An unnamed module does not have a name. There is an unnamed module - * per {@link ClassLoader ClassLoader} that is obtained by invoking the class - * loader's {@link ClassLoader#getUnnamedModule() getUnnamedModule} method. The - * {@link Class#getModule() getModule} method of all types defined by a class - * loader that are not in a named module return the class loader's unnamed + *

    An unnamed module does not have a name. There is an unnamed module for + * each {@link ClassLoader ClassLoader}, obtained by invoking its {@link + * ClassLoader#getUnnamedModule() getUnnamedModule} method. All types that are + * not in a named module are members of their defining class loader's unnamed * module.

    * *

    The package names that are parameters or returned by methods defined in * this class are the fully-qualified names of the packages as defined in - * section 6.5.3 of The Java™ Language Specification , for + * section 6.5.3 of The Java™ Language Specification, for * example, {@code "java.lang"}.

    * *

    Unless otherwise specified, passing a {@code null} argument to a method @@ -91,13 +96,14 @@ import sun.security.util.SecurityConstants; * be thrown.

    * * @since 9 - * @see java.lang.Class#getModule + * @spec JPMS + * @see Class#getModule() */ public final class Module implements AnnotatedElement { // the layer that contains this module, can be null - private final Layer layer; + private final ModuleLayer layer; // module name and loader, these fields are read by VM private final String name; @@ -112,10 +118,10 @@ public final class Module implements AnnotatedElement { * VM but will not read any other modules, will not have any exports setup * and will not be registered in the service catalog. */ - private Module(Layer layer, - ClassLoader loader, - ModuleDescriptor descriptor, - URI uri) + Module(ModuleLayer layer, + ClassLoader loader, + ModuleDescriptor descriptor, + URI uri) { this.layer = layer; this.name = descriptor.name(); @@ -138,7 +144,7 @@ public final class Module implements AnnotatedElement { * * @see ClassLoader#getUnnamedModule */ - private Module(ClassLoader loader) { + Module(ClassLoader loader) { this.layer = null; this.name = null; this.loader = loader; @@ -159,7 +165,6 @@ public final class Module implements AnnotatedElement { } - /** * Returns {@code true} if this module is a named module. * @@ -213,32 +218,31 @@ public final class Module implements AnnotatedElement { } /** - * Returns the layer that contains this module or {@code null} if this - * module is not in a layer. + * Returns the module layer that contains this module or {@code null} if + * this module is not in a module layer. * - * A module {@code Layer} contains named modules and therefore this - * method always returns {@code null} when invoked on an unnamed module. + * A module layer contains named modules and therefore this method always + * returns {@code null} when invoked on an unnamed module. * - *

    Dynamic modules are named - * modules that are generated at runtime. A dynamic module may or may - * not be in a module Layer.

    + *

    Dynamic modules are + * named modules that are generated at runtime. A dynamic module may or may + * not be in a module layer.

    * - * @return The layer that contains this module + * @return The module layer that contains this module * - * @see Proxy + * @see java.lang.reflect.Proxy */ - public Layer getLayer() { + public ModuleLayer getLayer() { if (isNamed()) { - Layer layer = this.layer; + ModuleLayer layer = this.layer; if (layer != null) return layer; - // special-case java.base as it is created before the boot Layer + // special-case java.base as it is created before the boot layer if (loader == null && name.equals("java.base")) { - return SharedSecrets.getJavaLangAccess().getBootLayer(); + return ModuleLayer.boot(); } } - return null; } @@ -247,12 +251,10 @@ public final class Module implements AnnotatedElement { // special Module to mean "all unnamed modules" private static final Module ALL_UNNAMED_MODULE = new Module(null); + private static final Set ALL_UNNAMED_MODULE_SET = Set.of(ALL_UNNAMED_MODULE); // special Module to mean "everyone" private static final Module EVERYONE_MODULE = new Module(null); - - // set contains EVERYONE_MODULE, used when a package is opened or - // exported unconditionally private static final Set EVERYONE_SET = Set.of(EVERYONE_MODULE); @@ -327,8 +329,9 @@ public final class Module implements AnnotatedElement { * * @return this module * - * @throws IllegalStateException - * If this is a named module and the caller is not this module + * @throws IllegalCallerException + * If this is a named module and the caller's module is not this + * module * * @see #canRead */ @@ -336,9 +339,9 @@ public final class Module implements AnnotatedElement { public Module addReads(Module other) { Objects.requireNonNull(other); if (this.isNamed()) { - Module caller = Reflection.getCallerClass().getModule(); + Module caller = getCallerModule(Reflection.getCallerClass()); if (caller != this) { - throw new IllegalStateException(caller + " != " + this); + throw new IllegalCallerException(caller + " != " + this); } implAddReads(other, true); } @@ -348,12 +351,21 @@ public final class Module implements AnnotatedElement { /** * Updates this module to read another module. * - * @apiNote This method is for Proxy use and white-box testing. + * @apiNote Used by the --add-reads command line option. */ void implAddReads(Module other) { implAddReads(other, true); } + /** + * Updates this module to read all unnamed modules. + * + * @apiNote Used by the --add-reads command line option. + */ + void implAddReadsAllUnnamed() { + implAddReads(Module.ALL_UNNAMED_MODULE, true); + } + /** * Updates this module to read another module without notifying the VM. * @@ -370,27 +382,19 @@ public final class Module implements AnnotatedElement { */ private void implAddReads(Module other, boolean syncVM) { Objects.requireNonNull(other); - - // nothing to do - if (other == this || !this.isNamed()) - return; - - // check if we already read this module - Set reads = this.reads; - if (reads != null && reads.contains(other)) - return; - - // update VM first, just in case it fails - if (syncVM) { - if (other == ALL_UNNAMED_MODULE) { - addReads0(this, null); - } else { - addReads0(this, other); + if (!canRead(other)) { + // update VM first, just in case it fails + if (syncVM) { + if (other == ALL_UNNAMED_MODULE) { + addReads0(this, null); + } else { + addReads0(this, other); + } } - } - // add reflective read - reflectivelyReads.putIfAbsent(this, other, Boolean.TRUE); + // add reflective read + reflectivelyReads.putIfAbsent(this, other, Boolean.TRUE); + } } @@ -530,12 +534,12 @@ public final class Module implements AnnotatedElement { return true; // all packages are exported/open to self - if (other == this && containsPackage(pn)) + if (other == this && descriptor.packages().contains(pn)) return true; - // all packages in open modules are open - if (descriptor.isOpen()) - return containsPackage(pn); + // all packages in open and automatic modules are open + if (descriptor.isOpen() || descriptor.isAutomatic()) + return descriptor.packages().contains(pn); // exported/opened via module declaration/descriptor if (isStaticallyExportedOrOpen(pn, other, open)) @@ -551,42 +555,48 @@ public final class Module implements AnnotatedElement { /** * Returns {@code true} if this module exports or opens a package to - * the given module via its module declaration. + * the given module via its module declaration or CLI options. */ - boolean isStaticallyExportedOrOpen(String pn, Module other, boolean open) { - // package is open to everyone or + private boolean isStaticallyExportedOrOpen(String pn, Module other, boolean open) { + // test if package is open to everyone or Map> openPackages = this.openPackages; - if (openPackages != null) { - Set targets = openPackages.get(pn); - if (targets != null) { - if (targets.contains(EVERYONE_MODULE)) - return true; - if (other != EVERYONE_MODULE && targets.contains(other)) - return true; - } + if (openPackages != null && allows(openPackages.get(pn), other)) { + return true; } if (!open) { - // package is exported to everyone or + // test package is exported to everyone or Map> exportedPackages = this.exportedPackages; - if (exportedPackages != null) { - Set targets = exportedPackages.get(pn); - if (targets != null) { - if (targets.contains(EVERYONE_MODULE)) - return true; - if (other != EVERYONE_MODULE && targets.contains(other)) - return true; - } + if (exportedPackages != null && allows(exportedPackages.get(pn), other)) { + return true; } } return false; } + /** + * Returns {@code true} if targets is non-null and contains EVERYONE_MODULE + * or the given module. Also returns true if the given module is an unnamed + * module and targets contains ALL_UNNAMED_MODULE. + */ + private boolean allows(Set targets, Module module) { + if (targets != null) { + if (targets.contains(EVERYONE_MODULE)) + return true; + if (module != EVERYONE_MODULE) { + if (targets.contains(module)) + return true; + if (!module.isNamed() && targets.contains(ALL_UNNAMED_MODULE)) + return true; + } + } + return false; + } /** - * Returns {@code true} if this module reflectively exports or opens given - * package package to the given module. + * Returns {@code true} if this module reflectively exports or opens the + * given package to the given module. */ private boolean isReflectivelyExportedOrOpen(String pn, Module other, boolean open) { // exported or open to all modules @@ -628,14 +638,29 @@ public final class Module implements AnnotatedElement { return false; } + /** + * Returns {@code true} if this module reflectively exports the + * given package to the given module. + */ + boolean isReflectivelyExported(String pn, Module other) { + return isReflectivelyExportedOrOpen(pn, other, false); + } + + /** + * Returns {@code true} if this module reflectively opens the + * given package to the given module. + */ + boolean isReflectivelyOpened(String pn, Module other) { + return isReflectivelyExportedOrOpen(pn, other, true); + } + /** * If the caller's module is this module then update this module to export * the given package to the given module. * *

    This method has no effect if the package is already exported (or - * open) to the given module. It also has no effect if - * invoked on an {@link ModuleDescriptor#isOpen open} module.

    + * open) to the given module.

    * * @apiNote As specified in section 5.4.3 of the The Java™ * Virtual Machine Specification , if an attempt to resolve a @@ -653,8 +678,9 @@ public final class Module implements AnnotatedElement { * @throws IllegalArgumentException * If {@code pn} is {@code null}, or this is a named module and the * package {@code pn} is not a package in this module - * @throws IllegalStateException - * If this is a named module and the caller is not this module + * @throws IllegalCallerException + * If this is a named module and the caller's module is not this + * module * * @jvms 5.4.3 Resolution * @see #isExported(String,Module) @@ -665,10 +691,10 @@ public final class Module implements AnnotatedElement { throw new IllegalArgumentException("package is null"); Objects.requireNonNull(other); - if (isNamed() && !descriptor.isOpen()) { - Module caller = Reflection.getCallerClass().getModule(); + if (isNamed()) { + Module caller = getCallerModule(Reflection.getCallerClass()); if (caller != this) { - throw new IllegalStateException(caller + " != " + this); + throw new IllegalCallerException(caller + " != " + this); } implAddExportsOrOpens(pn, other, /*open*/false, /*syncVM*/true); } @@ -686,8 +712,14 @@ public final class Module implements AnnotatedElement { * access control checks. * *

    This method has no effect if the package is already open - * to the given module. It also has no effect if invoked on an {@link - * ModuleDescriptor#isOpen open} module.

    + * to the given module.

    + * + * @apiNote This method can be used for cases where a consumer + * module uses a qualified opens to open a package to an API + * module but where the reflective access to the members of classes in + * the consumer module is delegated to code in another module. Code in the + * API module can use this method to open the package in the consumer module + * to the other module. * * @param pn * The package name @@ -699,9 +731,9 @@ public final class Module implements AnnotatedElement { * @throws IllegalArgumentException * If {@code pn} is {@code null}, or this is a named module and the * package {@code pn} is not a package in this module - * @throws IllegalStateException + * @throws IllegalCallerException * If this is a named module and this module has not opened the - * package to at least the caller + * package to at least the caller's module * * @see #isOpen(String,Module) * @see AccessibleObject#setAccessible(boolean) @@ -713,10 +745,10 @@ public final class Module implements AnnotatedElement { throw new IllegalArgumentException("package is null"); Objects.requireNonNull(other); - if (isNamed() && !descriptor.isOpen()) { - Module caller = Reflection.getCallerClass().getModule(); - if (caller != this && !isOpen(pn, caller)) - throw new IllegalStateException(pn + " is not open to " + caller); + if (isNamed()) { + Module caller = getCallerModule(Reflection.getCallerClass()); + if (caller != this && (caller == null || !isOpen(pn, caller))) + throw new IllegalCallerException(pn + " is not open to " + caller); implAddExportsOrOpens(pn, other, /*open*/true, /*syncVM*/true); } @@ -725,36 +757,79 @@ public final class Module implements AnnotatedElement { /** - * Updates the exports so that package {@code pn} is exported to module - * {@code other} but without notifying the VM. + * Updates this module to export a package unconditionally. * - * @apiNote This method is for VM white-box testing. + * @apiNote This method is for JDK tests only. */ - void implAddExportsNoSync(String pn, Module other) { - if (other == null) - other = EVERYONE_MODULE; - implAddExportsOrOpens(pn.replace('/', '.'), other, false, false); + void implAddExports(String pn) { + implAddExportsOrOpens(pn, Module.EVERYONE_MODULE, false, true); } /** - * Updates the exports so that package {@code pn} is exported to module - * {@code other}. + * Updates this module to export a package to another module. * - * @apiNote This method is for white-box testing. + * @apiNote Used by Instrumentation::redefineModule and --add-exports */ void implAddExports(String pn, Module other) { implAddExportsOrOpens(pn, other, false, true); } /** - * Updates the module to open package {@code pn} to module {@code other}. + * Updates this module to export a package to all unnamed modules. * - * @apiNote This method is for white-box tests and jtreg + * @apiNote Used by the --add-exports command line option. + */ + void implAddExportsToAllUnnamed(String pn) { + implAddExportsOrOpens(pn, Module.ALL_UNNAMED_MODULE, false, true); + } + + /** + * Updates this export to export a package unconditionally without + * notifying the VM. + * + * @apiNote This method is for VM white-box testing. + */ + void implAddExportsNoSync(String pn) { + implAddExportsOrOpens(pn.replace('/', '.'), Module.EVERYONE_MODULE, false, false); + } + + /** + * Updates a module to export a package to another module without + * notifying the VM. + * + * @apiNote This method is for VM white-box testing. + */ + void implAddExportsNoSync(String pn, Module other) { + implAddExportsOrOpens(pn.replace('/', '.'), other, false, false); + } + + /** + * Updates this module to open a package unconditionally. + * + * @apiNote This method is for JDK tests only. + */ + void implAddOpens(String pn) { + implAddExportsOrOpens(pn, Module.EVERYONE_MODULE, true, true); + } + + /** + * Updates this module to open a package to another module. + * + * @apiNote Used by Instrumentation::redefineModule and --add-opens */ void implAddOpens(String pn, Module other) { implAddExportsOrOpens(pn, other, true, true); } + /** + * Updates this module to open a package to all unnamed modules. + * + * @apiNote Used by the --add-opens command line option. + */ + void implAddOpensToAllUnnamed(String pn) { + implAddExportsOrOpens(pn, Module.ALL_UNNAMED_MODULE, true, true); + } + /** * Updates a module to export or open a module to another module. * @@ -767,16 +842,35 @@ public final class Module implements AnnotatedElement { Objects.requireNonNull(other); Objects.requireNonNull(pn); - // all packages are open in unnamed and open modules - if (!isNamed() || descriptor.isOpen()) + // all packages are open in unnamed, open, and automatic modules + if (!isNamed() || descriptor.isOpen() || descriptor.isAutomatic()) return; - // nothing to do if already exported/open to other - if (implIsExportedOrOpen(pn, other, open)) - return; + // check if the package is already exported/open to other + if (implIsExportedOrOpen(pn, other, open)) { + + // if the package is exported/open for illegal access then we need + // to record that it has also been exported/opened reflectively so + // that the IllegalAccessLogger doesn't emit a warning. + boolean needToAdd = false; + if (!other.isNamed()) { + IllegalAccessLogger l = IllegalAccessLogger.illegalAccessLogger(); + if (l != null) { + if (open) { + needToAdd = l.isOpenForIllegalAccess(this, pn); + } else { + needToAdd = l.isExportedForIllegalAccess(this, pn); + } + } + } + if (!needToAdd) { + // nothing to do + return; + } + } // can only export a package in the module - if (!containsPackage(pn)) { + if (!descriptor.packages().contains(pn)) { throw new IllegalArgumentException("package " + pn + " not in contents"); } @@ -796,7 +890,6 @@ public final class Module implements AnnotatedElement { Map map = reflectivelyExports .computeIfAbsent(this, other, (m1, m2) -> new ConcurrentHashMap<>()); - if (open) { map.put(pn, Boolean.TRUE); // may need to promote from FALSE to TRUE } else { @@ -804,6 +897,38 @@ public final class Module implements AnnotatedElement { } } + /** + * Updates a module to open all packages returned by the given iterator to + * all unnamed modules. + * + * @apiNote Used during startup to open packages for illegal access. + */ + void implAddOpensToAllUnnamed(Iterator iterator) { + if (jdk.internal.misc.VM.isModuleSystemInited()) { + throw new IllegalStateException("Module system already initialized"); + } + + // replace this module's openPackages map with a new map that opens + // the packages to all unnamed modules. + Map> openPackages = this.openPackages; + if (openPackages == null) { + openPackages = new HashMap<>(); + } else { + openPackages = new HashMap<>(openPackages); + } + while (iterator.hasNext()) { + String pn = iterator.next(); + Set prev = openPackages.putIfAbsent(pn, ALL_UNNAMED_MODULE_SET); + if (prev != null) { + prev.add(ALL_UNNAMED_MODULE); + } + + // update VM to export the package + addExportsToAllUnnamed0(this, pn); + } + this.openPackages = openPackages; + } + // -- services -- @@ -819,17 +944,17 @@ public final class Module implements AnnotatedElement { * passed a reference to the service type by other code. This method is * a no-op when invoked on an unnamed module or an automatic module. * - *

    This method does not cause {@link - * Configuration#resolveRequiresAndUses resolveRequiresAndUses} to be - * re-run.

    + *

    This method does not cause {@link Configuration#resolveAndBind + * resolveAndBind} to be re-run.

    * * @param service * The service type * * @return this module * - * @throws IllegalStateException - * If this is a named module and the caller is not this module + * @throws IllegalCallerException + * If this is a named module and the caller's module is not this + * module * * @see #canUse(Class) * @see ModuleDescriptor#uses() @@ -839,9 +964,9 @@ public final class Module implements AnnotatedElement { Objects.requireNonNull(service); if (isNamed() && !descriptor.isAutomatic()) { - Module caller = Reflection.getCallerClass().getModule(); + Module caller = getCallerModule(Reflection.getCallerClass()); if (caller != this) { - throw new IllegalStateException(caller + " != " + this); + throw new IllegalCallerException(caller + " != " + this); } implAddUses(service); } @@ -893,131 +1018,30 @@ public final class Module implements AnnotatedElement { // -- packages -- - // Additional packages that are added to the module at run-time. - // The field is volatile as it may be replaced at run-time - private volatile Set extraPackages; - - private boolean containsPackage(String pn) { - if (descriptor.packages().contains(pn)) - return true; - Set extraPackages = this.extraPackages; - if (extraPackages != null && extraPackages.contains(pn)) - return true; - return false; - } - - /** - * Returns an array of the package names of the packages in this module. + * Returns the set of package names for the packages in this module. * - *

    For named modules, the returned array contains an element for each - * package in the module. It may contain elements corresponding to packages - * added to the module, dynamic modules - * for example, after it was loaded. + *

    For named modules, the returned set contains an element for each + * package in the module.

    * - *

    For unnamed modules, this method is the equivalent of invoking the + *

    For unnamed modules, this method is the equivalent to invoking the * {@link ClassLoader#getDefinedPackages() getDefinedPackages} method of - * this module's class loader and returning the array of package names.

    + * this module's class loader and returning the set of package names.

    * - *

    A package name appears at most once in the returned array.

    - * - * @apiNote This method returns an array rather than a {@code Set} for - * consistency with other {@code java.lang.reflect} types. - * - * @return an array of the package names of the packages in this module + * @return the set of the package names of the packages in this module */ - public String[] getPackages() { + public Set getPackages() { if (isNamed()) { - - Set packages = descriptor.packages(); - Set extraPackages = this.extraPackages; - if (extraPackages == null) { - return packages.toArray(new String[0]); - } else { - return Stream.concat(packages.stream(), - extraPackages.stream()) - .toArray(String[]::new); - } - + return descriptor.packages(); } else { // unnamed module Stream packages; if (loader == null) { packages = BootLoader.packages(); } else { - packages = SharedSecrets.getJavaLangAccess().packages(loader); + packages = loader.packages(); } - return packages.map(Package::getName).toArray(String[]::new); - } - } - - /** - * Add a package to this module. - * - * @apiNote This method is for Proxy use. - * - * @apiNote This is an expensive operation, not expected to be used often. - * At this time then it does not validate that the package name is a - * valid java identifier. - */ - void addPackage(String pn) { - implAddPackage(pn, true); - } - - /** - * Add a package to this module without notifying the VM. - * - * @apiNote This method is VM white-box testing. - */ - void implAddPackageNoSync(String pn) { - implAddPackage(pn.replace('/', '.'), false); - } - - /** - * Add a package to this module. - * - * If {@code syncVM} is {@code true} then the VM is notified. - */ - private void implAddPackage(String pn, boolean syncVM) { - if (!isNamed()) - throw new InternalError("adding package to unnamed module?"); - if (descriptor.isOpen()) - throw new InternalError("adding package to open module?"); - if (pn.isEmpty()) - throw new InternalError("adding package to module?"); - - if (descriptor.packages().contains(pn)) { - // already in module - return; - } - - Set extraPackages = this.extraPackages; - if (extraPackages != null && extraPackages.contains(pn)) { - // already added - return; - } - synchronized (this) { - // recheck under lock - extraPackages = this.extraPackages; - if (extraPackages != null) { - if (extraPackages.contains(pn)) { - // already added - return; - } - - // copy the set - extraPackages = new HashSet<>(extraPackages); - extraPackages.add(pn); - } else { - extraPackages = Collections.singleton(pn); - } - - // update VM first, just in case it fails - if (syncVM) - addPackage0(this, pn); - - // replace with new set - this.extraPackages = extraPackages; // volatile write + return packages.map(Package::getName).collect(Collectors.toSet()); } } @@ -1034,23 +1058,27 @@ public final class Module implements AnnotatedElement { */ static Map defineModules(Configuration cf, Function clf, - Layer layer) + ModuleLayer layer) { Map nameToModule = new HashMap<>(); Map moduleToLoader = new HashMap<>(); - boolean isBootLayer = (Layer.boot() == null); Set loaders = new HashSet<>(); + boolean hasPlatformModules = false; // map each module to a class loader for (ResolvedModule resolvedModule : cf.modules()) { String name = resolvedModule.name(); ClassLoader loader = clf.apply(name); - if (loader != null) { - moduleToLoader.put(name, loader); + moduleToLoader.put(name, loader); + if (loader == null || loader == ClassLoaders.platformClassLoader()) { + if (!(clf instanceof ModuleLoaderMap.Mapper)) { + throw new IllegalArgumentException("loader can't be 'null'" + + " or the platform class loader"); + } + hasPlatformModules = true; + } else { loaders.add(loader); - } else if (!isBootLayer) { - throw new IllegalArgumentException("loader can't be 'null'"); } } @@ -1062,7 +1090,7 @@ public final class Module implements AnnotatedElement { URI uri = mref.location().orElse(null); ClassLoader loader = moduleToLoader.get(resolvedModule.name()); Module m; - if (loader == null && isBootLayer && name.equals("java.base")) { + if (loader == null && name.equals("java.base")) { // java.base is already defined to the VM m = Object.class.getModule(); } else { @@ -1083,20 +1111,28 @@ public final class Module implements AnnotatedElement { // reads Set reads = new HashSet<>(); + + // name -> source Module when in parent layer + Map nameToSource = Collections.emptyMap(); + for (ResolvedModule other : resolvedModule.reads()) { Module m2 = null; if (other.configuration() == cf) { - String dn = other.reference().descriptor().name(); - m2 = nameToModule.get(dn); + // this configuration + m2 = nameToModule.get(other.name()); + assert m2 != null; } else { - for (Layer parent: layer.parents()) { + // parent layer + for (ModuleLayer parent: layer.parents()) { m2 = findModule(parent, other); if (m2 != null) break; } + assert m2 != null; + if (nameToSource.isEmpty()) + nameToSource = new HashMap<>(); + nameToSource.put(other.name(), m2); } - assert m2 != null; - reads.add(m2); // update VM view @@ -1110,11 +1146,15 @@ public final class Module implements AnnotatedElement { } // exports and opens - initExportsAndOpens(descriptor, nameToModule, m); + initExportsAndOpens(m, nameToSource, nameToModule, layer.parents()); } - // register the modules in the boot layer - if (isBootLayer) { + // if there are modules defined to the boot or platform class loaders + // then register the modules in the class loader's services catalog + if (hasPlatformModules) { + ClassLoader pcl = ClassLoaders.platformClassLoader(); + ServicesCatalog bootCatalog = BootLoader.getServicesCatalog(); + ServicesCatalog pclCatalog = ServicesCatalog.getServicesCatalog(pcl); for (ResolvedModule resolvedModule : cf.modules()) { ModuleReference mref = resolvedModule.reference(); ModuleDescriptor descriptor = mref.descriptor(); @@ -1122,13 +1162,11 @@ public final class Module implements AnnotatedElement { String name = descriptor.name(); Module m = nameToModule.get(name); ClassLoader loader = moduleToLoader.get(name); - ServicesCatalog catalog; if (loader == null) { - catalog = BootLoader.getServicesCatalog(); - } else { - catalog = ServicesCatalog.getServicesCatalog(loader); + bootCatalog.register(m); + } else if (loader == pcl) { + pclCatalog.register(m); } - catalog.register(m); } } } @@ -1146,7 +1184,8 @@ public final class Module implements AnnotatedElement { * Find the runtime Module corresponding to the given ResolvedModule * in the given parent layer (or its parents). */ - private static Module findModule(Layer parent, ResolvedModule resolvedModule) { + private static Module findModule(ModuleLayer parent, + ResolvedModule resolvedModule) { Configuration cf = resolvedModule.configuration(); String dn = resolvedModule.name(); return parent.layers() @@ -1162,15 +1201,18 @@ public final class Module implements AnnotatedElement { .orElse(null); } + /** * Initialize the maps of exported and open packages for module m. */ - private static void initExportsAndOpens(ModuleDescriptor descriptor, + private static void initExportsAndOpens(Module m, + Map nameToSource, Map nameToModule, - Module m) - { - // The VM doesn't know about open modules so need to export all packages - if (descriptor.isOpen()) { + List parents) { + // The VM doesn't special case open or automatic modules so need to + // export all packages + ModuleDescriptor descriptor = m.getDescriptor(); + if (descriptor.isOpen() || descriptor.isAutomatic()) { assert descriptor.opens().isEmpty(); for (String source : descriptor.packages()) { addExportsToAll0(m, source); @@ -1189,8 +1231,7 @@ public final class Module implements AnnotatedElement { // qualified opens Set targets = new HashSet<>(); for (String target : opens.targets()) { - // only open to modules that are in this configuration - Module m2 = nameToModule.get(target); + Module m2 = findModule(target, nameToSource, nameToModule, parents); if (m2 != null) { addExports0(m, source, m2); targets.add(m2); @@ -1219,8 +1260,7 @@ public final class Module implements AnnotatedElement { // qualified exports Set targets = new HashSet<>(); for (String target : exports.targets()) { - // only export to modules that are in this configuration - Module m2 = nameToModule.get(target); + Module m2 = findModule(target, nameToSource, nameToModule, parents); if (m2 != null) { // skip qualified export if already open to m2 if (openToTargets == null || !openToTargets.contains(m2)) { @@ -1246,6 +1286,32 @@ public final class Module implements AnnotatedElement { m.exportedPackages = exportedPackages; } + /** + * Find the runtime Module with the given name. The module name is the + * name of a target module in a qualified exports or opens directive. + * + * @param target The target module to find + * @param nameToSource The modules in parent layers that are read + * @param nameToModule The modules in the layer under construction + * @param parents The parent layers + */ + private static Module findModule(String target, + Map nameToSource, + Map nameToModule, + List parents) { + Module m = nameToSource.get(target); + if (m == null) { + m = nameToModule.get(target); + if (m == null) { + for (ModuleLayer parent : parents) { + m = parent.findModule(target).orElse(null); + if (m != null) break; + } + } + } + return m; + } + // -- annotations -- @@ -1375,35 +1441,44 @@ public final class Module implements AnnotatedElement { /** - * Returns an input stream for reading a resource in this module. The - * {@code name} parameter is a {@code '/'}-separated path name that - * identifies the resource. + * Returns an input stream for reading a resource in this module. + * The {@code name} parameter is a {@code '/'}-separated path name that + * identifies the resource. As with {@link Class#getResourceAsStream + * Class.getResourceAsStream}, this method delegates to the module's class + * loader {@link ClassLoader#findResource(String,String) + * findResource(String,String)} method, invoking it with the module name + * (or {@code null} when the module is unnamed) and the name of the + * resource. If the resource name has a leading slash then it is dropped + * before delegation. * - *

    A resource in a named modules may be encapsulated so that + *

    A resource in a named module may be encapsulated so that * it cannot be located by code in other modules. Whether a resource can be - * located or not is determined as follows: + * located or not is determined as follows:

    * *
      - *
    • The package name of the resource is derived from the - * subsequence of characters that precedes the last {@code '/'} and then - * replacing each {@code '/'} character in the subsequence with - * {@code '.'}. For example, the package name derived for a resource - * named "{@code a/b/c/foo.properties}" is "{@code a.b.c}".
    • + *
    • If the resource name ends with "{@code .class}" then it is not + * encapsulated.
    • * - *
    • If the package name is a package in the module then the package - * must be {@link #isOpen open} the module of the caller of this method. - * If the package is not in the module then the resource is not - * encapsulated. Resources in the unnamed package or "{@code META-INF}", - * for example, are never encapsulated because they can never be - * packages in a named module.
    • - * - *
    • As a special case, resources ending with "{@code .class}" are - * never encapsulated.
    • + *
    • A package name is derived from the resource name. If + * the package name is a {@linkplain #getPackages() package} in the + * module then the resource can only be located by the caller of this + * method when the package is {@linkplain #isOpen(String,Module) open} + * to at least the caller's module. If the resource is not in a + * package in the module then the resource is not encapsulated.
    • *
    * + *

    In the above, the package name for a resource is derived + * from the subsequence of characters that precedes the last {@code '/'} in + * the name and then replacing each {@code '/'} character in the subsequence + * with {@code '.'}. A leading slash is ignored when deriving the package + * name. As an example, the package name derived for a resource named + * "{@code a/b/c/foo.properties}" is "{@code a.b.c}". A resource name + * with the name "{@code META-INF/MANIFEST.MF}" is never encapsulated + * because "{@code META-INF}" is not a legal package name.

    + * *

    This method returns {@code null} if the resource is not in this * module, the resource is encapsulated and cannot be located by the caller, - * or access to the resource is denied by the security manager. + * or access to the resource is denied by the security manager.

    * * @param name * The resource name @@ -1413,21 +1488,27 @@ public final class Module implements AnnotatedElement { * @throws IOException * If an I/O error occurs * - * @see java.lang.module.ModuleReader#open(String) + * @see Class#getResourceAsStream(String) */ @CallerSensitive public InputStream getResourceAsStream(String name) throws IOException { - Objects.requireNonNull(name); + if (name.startsWith("/")) { + name = name.substring(1); + } - if (isNamed() && !ResourceHelper.isSimpleResource(name)) { - Module caller = Reflection.getCallerClass().getModule(); + if (isNamed() && Resources.canEncapsulate(name)) { + Module caller = getCallerModule(Reflection.getCallerClass()); if (caller != this && caller != Object.class.getModule()) { - // ignore packages added for proxies via addPackage - Set packages = getDescriptor().packages(); - String pn = ResourceHelper.getPackageName(name); - if (packages.contains(pn) && !isOpen(pn, caller)) { - // resource is in package not open to caller - return null; + String pn = Resources.toPackageName(name); + if (getPackages().contains(pn)) { + if (caller == null && !isOpen(pn)) { + // no caller, package not open + return null; + } + if (!isOpen(pn, caller)) { + // package not open to caller + return null; + } } } } @@ -1442,8 +1523,7 @@ public final class Module implements AnnotatedElement { } // locate resource in module - JavaLangAccess jla = SharedSecrets.getJavaLangAccess(); - URL url = jla.findResource(loader, mn, name); + URL url = loader.findResource(mn, name); if (url != null) { try { return url.openStream(); @@ -1472,6 +1552,14 @@ public final class Module implements AnnotatedElement { } } + /** + * Returns the module that a given caller class is a member of. Returns + * {@code null} if the caller is {@code null}. + */ + private Module getCallerModule(Class caller) { + return (caller != null) ? caller.getModule() : null; + } + // -- native methods -- @@ -1493,82 +1581,4 @@ public final class Module implements AnnotatedElement { // JVM_AddModuleExportsToAllUnnamed private static native void addExportsToAllUnnamed0(Module from, String pn); - - // JVM_AddModulePackage - private static native void addPackage0(Module m, String pn); - - /** - * Register shared secret to provide access to package-private methods - */ - static { - SharedSecrets.setJavaLangReflectModuleAccess( - new JavaLangReflectModuleAccess() { - @Override - public Module defineUnnamedModule(ClassLoader loader) { - return new Module(loader); - } - @Override - public Module defineModule(ClassLoader loader, - ModuleDescriptor descriptor, - URI uri) { - return new Module(null, loader, descriptor, uri); - } - @Override - public void addReads(Module m1, Module m2) { - m1.implAddReads(m2, true); - } - @Override - public void addReadsAllUnnamed(Module m) { - m.implAddReads(Module.ALL_UNNAMED_MODULE); - } - @Override - public void addExports(Module m, String pn, Module other) { - m.implAddExportsOrOpens(pn, other, false, true); - } - @Override - public void addOpens(Module m, String pn, Module other) { - m.implAddExportsOrOpens(pn, other, true, true); - } - @Override - public void addExportsToAll(Module m, String pn) { - m.implAddExportsOrOpens(pn, Module.EVERYONE_MODULE, false, true); - } - @Override - public void addOpensToAll(Module m, String pn) { - m.implAddExportsOrOpens(pn, Module.EVERYONE_MODULE, true, true); - } - @Override - public void addExportsToAllUnnamed(Module m, String pn) { - m.implAddExportsOrOpens(pn, Module.ALL_UNNAMED_MODULE, false, true); - } - @Override - public void addOpensToAllUnnamed(Module m, String pn) { - m.implAddExportsOrOpens(pn, Module.ALL_UNNAMED_MODULE, true, true); - } - @Override - public void addUses(Module m, Class service) { - m.implAddUses(service); - } - @Override - public void addPackage(Module m, String pn) { - m.implAddPackage(pn, true); - } - @Override - public ServicesCatalog getServicesCatalog(Layer layer) { - return layer.getServicesCatalog(); - } - @Override - public Stream layers(Layer layer) { - return layer.layers(); - } - @Override - public Stream layers(ClassLoader loader) { - return Layer.layers(loader); - } - @Override - public boolean isStaticallyExported(Module module, String pn, Module other) { - return module.isStaticallyExportedOrOpen(pn, other, false); - } - }); - } } diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Layer.java b/jdk/src/java.base/share/classes/java/lang/ModuleLayer.java similarity index 71% rename from jdk/src/java.base/share/classes/java/lang/reflect/Layer.java rename to jdk/src/java.base/share/classes/java/lang/ModuleLayer.java index 9eaf90d0ca8..d0487f21214 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Layer.java +++ b/jdk/src/java.base/share/classes/java/lang/ModuleLayer.java @@ -23,7 +23,7 @@ * questions. */ -package java.lang.reflect; +package java.lang; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; @@ -47,8 +47,6 @@ import java.util.stream.Stream; import jdk.internal.loader.ClassLoaderValue; import jdk.internal.loader.Loader; import jdk.internal.loader.LoaderPool; -import jdk.internal.misc.SharedSecrets; -import jdk.internal.module.Modules; import jdk.internal.module.ServicesCatalog; import sun.security.util.SecurityConstants; @@ -56,46 +54,65 @@ import sun.security.util.SecurityConstants; /** * A layer of modules in the Java virtual machine. * - *

    A layer is created from a graph of modules that is the {@link - * Configuration} and a function that maps each module to a {@link ClassLoader}. + *

    A layer is created from a graph of modules in a {@link Configuration} + * and a function that maps each module to a {@link ClassLoader}. * Creating a layer informs the Java virtual machine about the classes that - * may be loaded from modules so that the Java virtual machine knows which - * module that each class is a member of. Each layer, except the {@link - * #empty() empty} layer, has at least one {@link #parents() parent}.

    + * may be loaded from the modules so that the Java virtual machine knows which + * module that each class is a member of.

    * *

    Creating a layer creates a {@link Module} object for each {@link * ResolvedModule} in the configuration. For each resolved module that is * {@link ResolvedModule#reads() read}, the {@code Module} {@link * Module#canRead reads} the corresponding run-time {@code Module}, which may - * be in the same layer or a parent layer. The {@code Module} {@link - * Module#isExported(String) exports} the packages described by its {@link - * ModuleDescriptor}.

    + * be in the same layer or a {@link #parents() parent} layer.

    * *

    The {@link #defineModulesWithOneLoader defineModulesWithOneLoader} and * {@link #defineModulesWithManyLoaders defineModulesWithManyLoaders} methods - * provide convenient ways to create a {@code Layer} where all modules are + * provide convenient ways to create a module layer where all modules are * mapped to a single class loader or where each module is mapped to its own * class loader. The {@link #defineModules defineModules} method is for more * advanced cases where modules are mapped to custom class loaders by means of * a function specified to the method. Each of these methods has an instance * and static variant. The instance methods create a layer with the receiver * as the parent layer. The static methods are for more advanced cases where - * there can be more than one parent layer or a {@link Layer.Controller - * Controller} is needed to control modules in the layer.

    + * there can be more than one parent layer or where a {@link + * ModuleLayer.Controller Controller} is needed to control modules in the layer + *

    * *

    A Java virtual machine has at least one non-empty layer, the {@link * #boot() boot} layer, that is created when the Java virtual machine is * started. The boot layer contains module {@code java.base} and is the only * layer in the Java virtual machine with a module named "{@code java.base}". * The modules in the boot layer are mapped to the bootstrap class loader and - * other class loaders that are + * other class loaders that are * built-in into the Java virtual machine. The boot layer will often be * the {@link #parents() parent} when creating additional layers.

    * + *

    Each {@code Module} in a layer is created so that it {@link + * Module#isExported(String) exports} and {@link Module#isOpen(String) opens} + * the packages described by its {@link ModuleDescriptor}. Qualified exports + * (where a package is exported to a set of target modules rather than all + * modules) are reified when creating the layer as follows:

    + *
      + *
    • If module {@code X} exports a package to {@code Y}, and if the + * runtime {@code Module} {@code X} reads {@code Module} {@code Y}, then + * the package is exported to {@code Module} {@code Y} (which may be in + * the same layer as {@code X} or a parent layer).
    • + * + *
    • If module {@code X} exports a package to {@code Y}, and if the + * runtime {@code Module} {@code X} does not read {@code Y} then target + * {@code Y} is located as if by invoking {@link #findModule(String) + * findModule} to find the module in the layer or its parent layers. If + * {@code Y} is found then the package is exported to the instance of + * {@code Y} that was found. If {@code Y} is not found then the qualified + * export is ignored.
    • + *
    + * + *

    Qualified opens are handled in same way as qualified exports.

    + * *

    As when creating a {@code Configuration}, - * {@link ModuleDescriptor#isAutomatic() automatic} modules receive - * special - * treatment when creating a layer. An automatic module is created in the + * {@link ModuleDescriptor#isAutomatic() automatic} modules receive special + * treatment when creating a layer. An automatic module is created in the * Java virtual machine as a {@code Module} that reads every unnamed {@code * Module} in the Java virtual machine.

    * @@ -113,43 +130,43 @@ import sun.security.util.SecurityConstants; *
    {@code
      *     ModuleFinder finder = ModuleFinder.of(dir1, dir2, dir3);
      *
    - *     Layer parent = Layer.boot();
    + *     ModuleLayer parent = ModuleLayer.boot();
      *
    - *     Configuration cf = parent.configuration()
    - *         .resolveRequires(finder, ModuleFinder.of(), Set.of("myapp"));
    + *     Configuration cf = parent.configuration().resolve(finder, ModuleFinder.of(), Set.of("myapp"));
      *
      *     ClassLoader scl = ClassLoader.getSystemClassLoader();
      *
    - *     Layer layer = parent.defineModulesWithOneLoader(cf, scl);
    + *     ModuleLayer layer = parent.defineModulesWithOneLoader(cf, scl);
      *
      *     Class c = layer.findLoader("myapp").loadClass("app.Main");
      * }
    * * @since 9 + * @spec JPMS * @see Module#getLayer() */ -public final class Layer { +public final class ModuleLayer { - // the empty Layer - private static final Layer EMPTY_LAYER - = new Layer(Configuration.empty(), List.of(), null); + // the empty layer + private static final ModuleLayer EMPTY_LAYER + = new ModuleLayer(Configuration.empty(), List.of(), null); - // the configuration from which this Layer was created + // the configuration from which this ;ayer was created private final Configuration cf; // parent layers, empty in the case of the empty layer - private final List parents; + private final List parents; // maps module name to jlr.Module private final Map nameToModule; /** - * Creates a new Layer from the modules in the given configuration. + * Creates a new module layer from the modules in the given configuration. */ - private Layer(Configuration cf, - List parents, - Function clf) + private ModuleLayer(Configuration cf, + List parents, + Function clf) { this.cf = cf; this.parents = parents; // no need to do defensive copy @@ -164,33 +181,38 @@ public final class Layer { } /** - * Controls a layer. The static methods defined by {@link Layer} to create - * module layers return a {@code Controller} that can be used to control - * modules in the layer. + * Controls a module layer. The static methods defined by {@link ModuleLayer} + * to create module layers return a {@code Controller} that can be used to + * control modules in the layer. + * + *

    Unless otherwise specified, passing a {@code null} argument to a + * method in this class causes a {@link NullPointerException + * NullPointerException} to be thrown.

    * * @apiNote Care should be taken with {@code Controller} objects, they * should never be shared with untrusted code. * * @since 9 + * @spec JPMS */ public static final class Controller { - private final Layer layer; + private final ModuleLayer layer; - Controller(Layer layer) { + Controller(ModuleLayer layer) { this.layer = layer; } /** * Returns the layer that this object controls. * - * @return the layer + * @return the module layer */ - public Layer layer() { + public ModuleLayer layer() { return layer; } private void ensureInLayer(Module source) { - if (!layer.modules().contains(source)) + if (source.getLayer() != layer) throw new IllegalArgumentException(source + " not in layer"); } @@ -212,15 +234,39 @@ public final class Layer { * @return This controller * * @throws IllegalArgumentException - * If {@code source} is not in the layer + * If {@code source} is not in the module layer * * @see Module#addReads */ public Controller addReads(Module source, Module target) { - Objects.requireNonNull(source); - Objects.requireNonNull(target); ensureInLayer(source); - Modules.addReads(source, target); + source.implAddReads(target); + return this; + } + + /** + * Updates module {@code source} in the layer to export a package to + * module {@code target}. This method is a no-op if {@code source} + * already exports the package to at least {@code target}. + * + * @param source + * The source module + * @param pn + * The package name + * @param target + * The target module + * + * @return This controller + * + * @throws IllegalArgumentException + * If {@code source} is not in the module layer or the package + * is not in the source module + * + * @see Module#addExports + */ + public Controller addExports(Module source, String pn, Module target) { + ensureInLayer(source); + source.implAddExports(pn, target); return this; } @@ -234,28 +280,26 @@ public final class Layer { * @param pn * The package name * @param target - * The target module to read + * The target module * * @return This controller * * @throws IllegalArgumentException - * If {@code source} is not in the layer or the package is not - * in the source module + * If {@code source} is not in the module layer or the package + * is not in the source module * * @see Module#addOpens */ public Controller addOpens(Module source, String pn, Module target) { - Objects.requireNonNull(source); - Objects.requireNonNull(target); ensureInLayer(source); - Modules.addOpens(source, pn, target); + source.implAddOpens(pn, target); return this; } } /** - * Creates a new layer, with this layer as its parent, by defining the + * Creates a new module layer, with this layer as its parent, by defining the * modules in the given {@code Configuration} to the Java virtual machine. * This method creates one class loader and defines all modules to that * class loader. The {@link ClassLoader#getParent() parent} of each class @@ -266,7 +310,7 @@ public final class Layer { * parent. In other words, if this layer is {@code thisLayer} then this * method is equivalent to invoking: *
     {@code
    -     *     Layer.defineModulesWithOneLoader(cf, List.of(thisLayer), parentLoader).layer();
    +     *     ModuleLayer.defineModulesWithOneLoader(cf, List.of(thisLayer), parentLoader).layer();
          * }
    * * @param cf @@ -281,10 +325,8 @@ public final class Layer { * If the parent of the given configuration is not the configuration * for this layer * @throws LayerInstantiationException - * If all modules cannot be defined to the same class loader for any - * of the reasons listed above or the layer cannot be created because - * the configuration contains a module named "{@code java.base}" or - * a module with a package name starting with "{@code java.}" + * If the layer cannot be created for any of the reasons specified + * by the static {@code defineModulesWithOneLoader} method * @throws SecurityException * If {@code RuntimePermission("createClassLoader")} or * {@code RuntimePermission("getClassLoader")} is denied by @@ -292,14 +334,14 @@ public final class Layer { * * @see #findLoader */ - public Layer defineModulesWithOneLoader(Configuration cf, - ClassLoader parentLoader) { + public ModuleLayer defineModulesWithOneLoader(Configuration cf, + ClassLoader parentLoader) { return defineModulesWithOneLoader(cf, List.of(this), parentLoader).layer(); } /** - * Creates a new layer, with this layer as its parent, by defining the + * Creates a new module layer, with this layer as its parent, by defining the * modules in the given {@code Configuration} to the Java virtual machine. * Each module is defined to its own {@link ClassLoader} created by this * method. The {@link ClassLoader#getParent() parent} of each class loader @@ -310,7 +352,7 @@ public final class Layer { * parent. In other words, if this layer is {@code thisLayer} then this * method is equivalent to invoking: *
     {@code
    -     *     Layer.defineModulesWithManyLoaders(cf, List.of(thisLayer), parentLoader).layer();
    +     *     ModuleLayer.defineModulesWithManyLoaders(cf, List.of(thisLayer), parentLoader).layer();
          * }
    * * @param cf @@ -325,9 +367,8 @@ public final class Layer { * If the parent of the given configuration is not the configuration * for this layer * @throws LayerInstantiationException - * If the layer cannot be created because the configuration contains - * a module named "{@code java.base}" or a module with a package - * name starting with "{@code java.}" + * If the layer cannot be created for any of the reasons specified + * by the static {@code defineModulesWithManyLoaders} method * @throws SecurityException * If {@code RuntimePermission("createClassLoader")} or * {@code RuntimePermission("getClassLoader")} is denied by @@ -335,14 +376,14 @@ public final class Layer { * * @see #findLoader */ - public Layer defineModulesWithManyLoaders(Configuration cf, - ClassLoader parentLoader) { + public ModuleLayer defineModulesWithManyLoaders(Configuration cf, + ClassLoader parentLoader) { return defineModulesWithManyLoaders(cf, List.of(this), parentLoader).layer(); } /** - * Creates a new layer, with this layer as its parent, by defining the + * Creates a new module layer, with this layer as its parent, by defining the * modules in the given {@code Configuration} to the Java virtual machine. * Each module is mapped, by name, to its class loader by means of the * given function. This method works exactly as specified by the static @@ -351,7 +392,7 @@ public final class Layer { * this layer is {@code thisLayer} then this method is equivalent to * invoking: *
     {@code
    -     *     Layer.defineModules(cf, List.of(thisLayer), clf).layer();
    +     *     ModuleLayer.defineModules(cf, List.of(thisLayer), clf).layer();
          * }
    * * @param cf @@ -365,30 +406,24 @@ public final class Layer { * If the parent of the given configuration is not the configuration * for this layer * @throws LayerInstantiationException - * If creating the {@code Layer} fails for any of the reasons - * listed above, the layer cannot be created because the - * configuration contains a module named "{@code java.base}", - * a module with a package name starting with "{@code java.}" is - * mapped to a class loader other than the {@link - * ClassLoader#getPlatformClassLoader() platform class loader}, - * or the function to map a module name to a class loader returns - * {@code null} + * If the layer cannot be created for any of the reasons specified + * by the static {@code defineModules} method * @throws SecurityException * If {@code RuntimePermission("getClassLoader")} is denied by * the security manager */ - public Layer defineModules(Configuration cf, - Function clf) { + public ModuleLayer defineModules(Configuration cf, + Function clf) { return defineModules(cf, List.of(this), clf).layer(); } /** - * Creates a new layer by defining the modules in the given {@code + * Creates a new module layer by defining the modules in the given {@code * Configuration} to the Java virtual machine. This method creates one * class loader and defines all modules to that class loader. * *

    The class loader created by this method implements direct - * delegation when loading types from modules. When its {@link + * delegation when loading classes from modules. If the {@link * ClassLoader#loadClass(String, boolean) loadClass} method is invoked to * load a class then it uses the package name of the class to map it to a * module. This may be a module in this layer and hence defined to the same @@ -396,10 +431,15 @@ public final class Layer { * exported to one or more of the modules in this layer. The class * loader delegates to the class loader of the module, throwing {@code * ClassNotFoundException} if not found by that class loader. - * * When {@code loadClass} is invoked to load classes that do not map to a * module then it delegates to the parent class loader.

    * + *

    The class loader created by this method locates resources + * ({@link ClassLoader#getResource(String) getResource}, {@link + * ClassLoader#getResources(String) getResources}, and other resource + * methods) in all modules in the layer before searching the parent class + * loader.

    + * *

    Attempting to create a layer with all modules defined to the same * class loader can fail for the following reasons: * @@ -409,11 +449,15 @@ public final class Layer { * configuration have the same package.

    * *
  • Split delegation: The resulting class loader would - * need to delegate to more than one class loader in order to load types - * in a specific package.

  • + * need to delegate to more than one class loader in order to load + * classes in a specific package.

    * * * + *

    In addition, a layer cannot be created if the configuration contains + * a module named "{@code java.base}", or a module contains a package named + * "{@code java}" or a package with a name starting with "{@code java.}".

    + * *

    If there is a security manager then the class loader created by * this method will load classes and resources with privileges that are * restricted by the calling context of this method.

    @@ -421,7 +465,7 @@ public final class Layer { * @param cf * The configuration for the layer * @param parentLayers - * The list parent layers in search order + * The list of parent layers in search order * @param parentLoader * The parent class loader for the class loader created by this * method; may be {@code null} for the bootstrap class loader @@ -433,9 +477,7 @@ public final class Layer { * the parent layers, including order * @throws LayerInstantiationException * If all modules cannot be defined to the same class loader for any - * of the reasons listed above or the layer cannot be created because - * the configuration contains a module named "{@code java.base}" or - * a module with a package name starting with "{@code java.}" + * of the reasons listed above * @throws SecurityException * If {@code RuntimePermission("createClassLoader")} or * {@code RuntimePermission("getClassLoader")} is denied by @@ -444,10 +486,10 @@ public final class Layer { * @see #findLoader */ public static Controller defineModulesWithOneLoader(Configuration cf, - List parentLayers, + List parentLayers, ClassLoader parentLoader) { - List parents = new ArrayList<>(parentLayers); + List parents = new ArrayList<>(parentLayers); checkConfiguration(cf, parents); checkCreateClassLoaderPermission(); @@ -456,7 +498,7 @@ public final class Layer { try { Loader loader = new Loader(cf.modules(), parentLoader); loader.initRemotePackageMap(cf, parents); - Layer layer = new Layer(cf, parents, mn -> loader); + ModuleLayer layer = new ModuleLayer(cf, parents, mn -> loader); return new Controller(layer); } catch (IllegalArgumentException | IllegalStateException e) { throw new LayerInstantiationException(e.getMessage()); @@ -464,14 +506,14 @@ public final class Layer { } /** - * Creates a new layer by defining the modules in the given {@code + * Creates a new module layer by defining the modules in the given {@code * Configuration} to the Java virtual machine. Each module is defined to * its own {@link ClassLoader} created by this method. The {@link * ClassLoader#getParent() parent} of each class loader is the given parent * class loader. * *

    The class loaders created by this method implement direct - * delegation when loading types from modules. When {@link + * delegation when loading classes from modules. If the {@link * ClassLoader#loadClass(String, boolean) loadClass} method is invoked to * load a class then it uses the package name of the class to map it to a * module. The package may be in the module defined to the class loader. @@ -479,10 +521,15 @@ public final class Layer { * module defined to the class loader. It may be in a package exported by a * module in a parent layer. The class loader delegates to the class loader * of the module, throwing {@code ClassNotFoundException} if not found by - * that class loader. + * that class loader. When {@code loadClass} is invoked to load a class + * that does not map to a module then it delegates to the parent class + * loader.

    * - * When {@code loadClass} is invoked to load classes that do not map to a - * module then it delegates to the parent class loader.

    + *

    The class loaders created by this method locate resources + * ({@link ClassLoader#getResource(String) getResource}, {@link + * ClassLoader#getResources(String) getResources}, and other resource + * methods) in the module defined to the class loader before searching + * the parent class loader.

    * *

    If there is a security manager then the class loaders created by * this method will load classes and resources with privileges that are @@ -491,7 +538,7 @@ public final class Layer { * @param cf * The configuration for the layer * @param parentLayers - * The list parent layers in search order + * The list of parent layers in search order * @param parentLoader * The parent class loader for each of the class loaders created by * this method; may be {@code null} for the bootstrap class loader @@ -503,8 +550,10 @@ public final class Layer { * the parent layers, including order * @throws LayerInstantiationException * If the layer cannot be created because the configuration contains - * a module named "{@code java.base}" or a module with a package - * name starting with "{@code java.}" + * a module named "{@code java.base}" or a module contains a package + * named "{@code java}" or a package with a name starting with + * "{@code java.}" + * * @throws SecurityException * If {@code RuntimePermission("createClassLoader")} or * {@code RuntimePermission("getClassLoader")} is denied by @@ -513,10 +562,10 @@ public final class Layer { * @see #findLoader */ public static Controller defineModulesWithManyLoaders(Configuration cf, - List parentLayers, + List parentLayers, ClassLoader parentLoader) { - List parents = new ArrayList<>(parentLayers); + List parents = new ArrayList<>(parentLayers); checkConfiguration(cf, parents); checkCreateClassLoaderPermission(); @@ -524,7 +573,7 @@ public final class Layer { LoaderPool pool = new LoaderPool(cf, parents, parentLoader); try { - Layer layer = new Layer(cf, parents, pool::loaderFor); + ModuleLayer layer = new ModuleLayer(cf, parents, pool::loaderFor); return new Controller(layer); } catch (IllegalArgumentException | IllegalStateException e) { throw new LayerInstantiationException(e.getMessage()); @@ -532,18 +581,22 @@ public final class Layer { } /** - * Creates a new layer by defining the modules in the given {@code - * Configuration} to the Java virtual machine. - * Each module is mapped, by name, to its class loader by means of the - * given function. The class loader delegation implemented by these class - * loaders must respect module readability. The class loaders should be + * Creates a new module layer by defining the modules in the given {@code + * Configuration} to the Java virtual machine. The given function maps each + * module in the configuration, by name, to a class loader. Creating the + * layer informs the Java virtual machine about the classes that may be + * loaded so that the Java virtual machine knows which module that each + * class is a member of. + * + *

    The class loader delegation implemented by the class loaders must + * respect module readability. The class loaders should be * {@link ClassLoader#registerAsParallelCapable parallel-capable} so as to * avoid deadlocks during class loading. In addition, the entity creating - * a new layer with this method should arrange that the class loaders are + * a new layer with this method should arrange that the class loaders be * ready to load from these modules before there are any attempts to load - * classes or resources. + * classes or resources.

    * - *

    Creating a {@code Layer} can fail for the following reasons:

    + *

    Creating a layer can fail for the following reasons:

    * *
      * @@ -558,19 +611,26 @@ public final class Layer { * *
    * + *

    In addition, a layer cannot be created if the configuration contains + * a module named "{@code java.base}", a configuration contains a module + * with a package named "{@code java}" or a package name starting with + * "{@code java.}", or the function to map a module name to a class loader + * returns {@code null} or the {@linkplain ClassLoader#getPlatformClassLoader() + * platform class loader}.

    + * *

    If the function to map a module name to class loader throws an error * or runtime exception then it is propagated to the caller of this method. *

    * - * @apiNote It is implementation specific as to whether creating a Layer + * @apiNote It is implementation specific as to whether creating a layer * with this method is an atomic operation or not. Consequentially it is * possible for this method to fail with some modules, but not all, defined - * to Java virtual machine. + * to the Java virtual machine. * * @param cf * The configuration for the layer * @param parentLayers - * The list parent layers in search order + * The list of parent layers in search order * @param clf * The function to map a module name to a class loader * @@ -580,23 +640,16 @@ public final class Layer { * If the parent configurations do not match the configuration of * the parent layers, including order * @throws LayerInstantiationException - * If creating the {@code Layer} fails for any of the reasons - * listed above, the layer cannot be created because the - * configuration contains a module named "{@code java.base}", - * a module with a package name starting with "{@code java.}" is - * mapped to a class loader other than the {@link - * ClassLoader#getPlatformClassLoader() platform class loader}, - * or the function to map a module name to a class loader returns - * {@code null} + * If creating the layer fails for any of the reasons listed above * @throws SecurityException * If {@code RuntimePermission("getClassLoader")} is denied by * the security manager */ public static Controller defineModules(Configuration cf, - List parentLayers, + List parentLayers, Function clf) { - List parents = new ArrayList<>(parentLayers); + List parents = new ArrayList<>(parentLayers); checkConfiguration(cf, parents); Objects.requireNonNull(clf); @@ -608,7 +661,7 @@ public final class Layer { } try { - Layer layer = new Layer(cf, parents, clf); + ModuleLayer layer = new ModuleLayer(cf, parents, clf); return new Controller(layer); } catch (IllegalArgumentException | IllegalStateException e) { throw new LayerInstantiationException(e.getMessage()); @@ -621,7 +674,7 @@ public final class Layer { * the parent layers. */ private static void checkConfiguration(Configuration cf, - List parentLayers) + List parentLayers) { Objects.requireNonNull(cf); @@ -630,7 +683,7 @@ public final class Layer { throw new IllegalArgumentException("wrong number of parents"); int index = 0; - for (Layer parent : parentLayers) { + for (ModuleLayer parent : parentLayers) { if (parent.configuration() != parentConfigurations.get(index)) { throw new IllegalArgumentException( "Parent of configuration != configuration of this Layer"); @@ -707,7 +760,7 @@ public final class Layer { * * @return The list of this layer's parents */ - public List parents() { + public List parents() { return parents; } @@ -719,24 +772,24 @@ public final class Layer { * @implNote For now, the assumption is that the number of elements will * be very low and so this method does not use a specialized spliterator. */ - Stream layers() { - List allLayers = this.allLayers; + Stream layers() { + List allLayers = this.allLayers; if (allLayers != null) return allLayers.stream(); allLayers = new ArrayList<>(); - Set visited = new HashSet<>(); - Deque stack = new ArrayDeque<>(); + Set visited = new HashSet<>(); + Deque stack = new ArrayDeque<>(); visited.add(this); stack.push(this); while (!stack.isEmpty()) { - Layer layer = stack.pop(); + ModuleLayer layer = stack.pop(); allLayers.add(layer); // push in reverse order for (int i = layer.parents.size() - 1; i >= 0; i--) { - Layer parent = layer.parents.get(i); + ModuleLayer parent = layer.parents.get(i); if (!visited.contains(parent)) { visited.add(parent); stack.push(parent); @@ -748,7 +801,7 @@ public final class Layer { return allLayers.stream(); } - private volatile List allLayers; + private volatile List allLayers; /** * Returns the set of the modules in this layer. @@ -756,14 +809,20 @@ public final class Layer { * @return A possibly-empty unmodifiable set of the modules in this layer */ public Set modules() { - return Collections.unmodifiableSet( - nameToModule.values().stream().collect(Collectors.toSet())); + Set modules = this.modules; + if (modules == null) { + this.modules = modules = + Collections.unmodifiableSet(new HashSet<>(nameToModule.values())); + } + return modules; } + private volatile Set modules; + /** * Returns the module with the given name in this layer, or if not in this - * layer, the {@linkplain #parents parents} layers. Finding a module in + * layer, the {@linkplain #parents parent} layers. Finding a module in * parent layers is equivalent to invoking {@code findModule} on each * parent, in search order, until the module is found or all parents have * been searched. In a tree of layers then this is equivalent to @@ -778,6 +837,8 @@ public final class Layer { */ public Optional findModule(String name) { Objects.requireNonNull(name); + if (this == EMPTY_LAYER) + return Optional.empty(); Module m = nameToModule.get(name); if (m != null) return Optional.of(m); @@ -828,9 +889,9 @@ public final class Layer { } /** - * Returns a string describing this layer. + * Returns a string describing this module layer. * - * @return A possibly empty string describing this layer + * @return A possibly empty string describing this module layer */ @Override public String toString() { @@ -845,7 +906,7 @@ public final class Layer { * * @return The empty layer */ - public static Layer empty() { + public static ModuleLayer empty() { return EMPTY_LAYER; } @@ -859,11 +920,10 @@ public final class Layer { * * @return The boot layer */ - public static Layer boot() { - return SharedSecrets.getJavaLangAccess().getBootLayer(); + public static ModuleLayer boot() { + return System.bootLayer; } - /** * Returns the ServicesCatalog for this Layer, creating it if not * already created. @@ -894,10 +954,10 @@ public final class Layer { */ void bindToLoader(ClassLoader loader) { // CLV.computeIfAbsent(loader, (cl, clv) -> new CopyOnWriteArrayList<>()) - List list = CLV.get(loader); + List list = CLV.get(loader); if (list == null) { list = new CopyOnWriteArrayList<>(); - List previous = CLV.putIfAbsent(loader, list); + List previous = CLV.putIfAbsent(loader, list); if (previous != null) list = previous; } list.add(this); @@ -907,8 +967,8 @@ public final class Layer { * Returns a stream of the layers that have at least one module defined to * the given class loader. */ - static Stream layers(ClassLoader loader) { - List list = CLV.get(loader); + static Stream layers(ClassLoader loader) { + List list = CLV.get(loader); if (list != null) { return list.stream(); } else { @@ -917,5 +977,5 @@ public final class Layer { } // the list of layers with modules defined to a class loader - private static final ClassLoaderValue> CLV = new ClassLoaderValue<>(); + private static final ClassLoaderValue> CLV = new ClassLoaderValue<>(); } diff --git a/jdk/src/java.base/share/classes/java/lang/NamedPackage.java b/jdk/src/java.base/share/classes/java/lang/NamedPackage.java index 5d86cc7fd9c..6234b949e65 100644 --- a/jdk/src/java.base/share/classes/java/lang/NamedPackage.java +++ b/jdk/src/java.base/share/classes/java/lang/NamedPackage.java @@ -26,7 +26,6 @@ package java.lang; import java.lang.module.Configuration; import java.lang.module.ModuleReference; -import java.lang.reflect.Module; import java.net.URI; /** diff --git a/jdk/src/java.base/share/classes/java/lang/Object.java b/jdk/src/java.base/share/classes/java/lang/Object.java index 0677aa5d234..e1cb6e0246d 100644 --- a/jdk/src/java.base/share/classes/java/lang/Object.java +++ b/jdk/src/java.base/share/classes/java/lang/Object.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -561,10 +561,53 @@ public class Object { * the finalization of this object to be halted, but is otherwise * ignored. * + * @apiNote + * Classes that embed non-heap resources have many options + * for cleanup of those resources. The class must ensure that the + * lifetime of each instance is longer than that of any resource it embeds. + * {@link java.lang.ref.Reference#reachabilityFence} can be used to ensure that + * objects remain reachable while resources embedded in the object are in use. + *

    + * A subclass should avoid overriding the {@code finalize} method + * unless the subclass embeds non-heap resources that must be cleaned up + * before the instance is collected. + * Finalizer invocations are not automatically chained, unlike constructors. + * If a subclass overrides {@code finalize} it must invoke the superclass + * finalizer explicitly. + * To guard against exceptions prematurely terminating the finalize chain, + * the subclass should use a {@code try-finally} block to ensure + * {@code super.finalize()} is always invoked. For example, + *

    {@code      @Override
    +     *     protected void finalize() throws Throwable {
    +     *         try {
    +     *             ... // cleanup subclass state
    +     *         } finally {
    +     *             super.finalize();
    +     *         }
    +     *     }
    +     * }
    + * + * @deprecated The finalization mechanism is inherently problematic. + * Finalization can lead to performance issues, deadlocks, and hangs. + * Errors in finalizers can lead to resource leaks; there is no way to cancel + * finalization if it is no longer necessary; and no ordering is specified + * among calls to {@code finalize} methods of different objects. + * Furthermore, there are no guarantees regarding the timing of finalization. + * The {@code finalize} method might be called on a finalizable object + * only after an indefinite delay, if at all. + * + * Classes whose instances hold non-heap resources should provide a method + * to enable explicit release of those resources, and they should also + * implement {@link AutoCloseable} if appropriate. + * The {@link java.lang.ref.Cleaner} and {@link java.lang.ref.PhantomReference} + * provide more flexible and efficient ways to release resources when an object + * becomes unreachable. + * * @throws Throwable the {@code Exception} raised by this method * @see java.lang.ref.WeakReference * @see java.lang.ref.PhantomReference * @jls 12.6 Finalization of Class Instances */ + @Deprecated(since="9") protected void finalize() throws Throwable { } } diff --git a/jdk/src/java.base/share/classes/java/lang/Package.java b/jdk/src/java.base/share/classes/java/lang/Package.java index 5a19f9771f1..03740212f9f 100644 --- a/jdk/src/java.base/share/classes/java/lang/Package.java +++ b/jdk/src/java.base/share/classes/java/lang/Package.java @@ -27,7 +27,6 @@ package java.lang; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; -import java.lang.reflect.Module; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; @@ -103,14 +102,20 @@ import jdk.internal.reflect.Reflection; * with the {@link Package#getPackages Package.getPackages()} and * {@link ClassLoader#getDefinedPackages} methods. * + * @implNote + * The builtin class loaders + * do not explicitly define {@code Package} objects for packages in + * named modules. Instead those packages are automatically defined + * and have no specification and implementation versioning information. + * * @jvms 5.3 Run-time package - * @see - * The JAR File Specification: Package Versioning - * @see + * @see * The JAR File Specification: Package Sealing * @see ClassLoader#definePackage(String, String, String, String, String, String, String, URL) * * @since 1.2 + * @revised 9 + * @spec JPMS */ public class Package extends NamedPackage implements java.lang.reflect.AnnotatedElement { /** @@ -207,6 +212,9 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated * is returned if it is not known. * @return the vendor that implemented this package, {@code null} * is returned if it is not known. + * + * @revised 9 + * @spec JPMS */ public String getImplementationVendor() { return versionInfo.implVendor; @@ -334,6 +342,9 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated * a {@code Package} for the specified class loader. * * @see ClassLoader#getDefinedPackage + * + * @revised 9 + * @spec JPMS */ @CallerSensitive @Deprecated(since="9") @@ -356,6 +367,9 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated * class loader and its ancestors * * @see ClassLoader#getDefinedPackages + * + * @revised 9 + * @spec JPMS */ @CallerSensitive public static Package[] getPackages() { diff --git a/jdk/src/java.base/share/classes/java/lang/Process.java b/jdk/src/java.base/share/classes/java/lang/Process.java index c4c5612e674..90ca41d0375 100644 --- a/jdk/src/java.base/share/classes/java/lang/Process.java +++ b/jdk/src/java.base/share/classes/java/lang/Process.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -80,10 +80,10 @@ import java.util.stream.Stream; * *

    Subclasses of Process should override the {@link #onExit()} and * {@link #toHandle()} methods to provide a fully functional Process including the - * {@link #getPid() process id}, - * {@link #info() information about the process}, - * {@link #children() direct children}, and - * {@link #descendants() direct children plus descendants of those children} of the process. + * {@linkplain #pid() process id}, + * {@linkplain #info() information about the process}, + * {@linkplain #children() direct children}, and + * {@linkplain #descendants() direct children plus descendants of those children} of the process. * Delegating to the underlying Process or ProcessHandle is typically * easiest and most efficient. * @@ -237,14 +237,14 @@ public abstract class Process { /** * Kills the process. * Whether the process represented by this {@code Process} object is - * {@link #supportsNormalTermination normally terminated} or not is + * {@linkplain #supportsNormalTermination normally terminated} or not is * implementation dependent. * Forcible process destruction is defined as the immediate termination of a * process, whereas normal termination allows the process to shut down cleanly. * If the process is not alive, no action is taken. *

    * The {@link java.util.concurrent.CompletableFuture} from {@link #onExit} is - * {@link java.util.concurrent.CompletableFuture#complete completed} + * {@linkplain java.util.concurrent.CompletableFuture#complete completed} * when the process has terminated. */ public abstract void destroy(); @@ -257,7 +257,7 @@ public abstract class Process { * If the process is not alive, no action is taken. *

    * The {@link java.util.concurrent.CompletableFuture} from {@link #onExit} is - * {@link java.util.concurrent.CompletableFuture#complete completed} + * {@linkplain java.util.concurrent.CompletableFuture#complete completed} * when the process has terminated. *

    * Invoking this method on {@code Process} objects returned by @@ -335,15 +335,15 @@ public abstract class Process { * * @implSpec * The implementation of this method returns the process id as: - * {@link #toHandle toHandle().getPid()}. + * {@link #toHandle toHandle().pid()}. * * @return the native process id of the process * @throws UnsupportedOperationException if the Process implementation * does not support this operation * @since 9 */ - public long getPid() { - return toHandle().getPid(); + public long pid() { + return toHandle().pid(); } /** @@ -357,9 +357,9 @@ public abstract class Process { *

    * Calling {@code onExit().get()} waits for the process to terminate and returns * the Process. The future can be used to check if the process is - * {@link java.util.concurrent.CompletableFuture#isDone done} or to - * {@link java.util.concurrent.CompletableFuture#get() wait} for it to terminate. - * {@link java.util.concurrent.CompletableFuture#cancel(boolean) Cancelling} + * {@linkplain java.util.concurrent.CompletableFuture#isDone done} or to + * {@linkplain java.util.concurrent.CompletableFuture#get() wait} for it to terminate. + * {@linkplain java.util.concurrent.CompletableFuture#cancel(boolean) Cancelling} * the CompletableFuture does not affect the Process. *

    * Processes returned from {@link ProcessBuilder#start} override the @@ -389,7 +389,7 @@ public abstract class Process { * {@code waitFor} is interrupted, the thread's interrupt status is preserved. *

    * When {@link #waitFor()} returns successfully the CompletableFuture is - * {@link java.util.concurrent.CompletableFuture#complete completed} regardless + * {@linkplain java.util.concurrent.CompletableFuture#complete completed} regardless * of the exit status of the process. * * This implementation may consume a lot of memory for thread stacks if a @@ -463,7 +463,7 @@ public abstract class Process { * This implementation throws an instance of * {@link java.lang.UnsupportedOperationException} and performs no other action. * Subclasses should override this method to provide a ProcessHandle for the - * process. The methods {@link #getPid}, {@link #info}, {@link #children}, + * process. The methods {@link #pid}, {@link #info}, {@link #children}, * and {@link #descendants}, unless overridden, operate on the ProcessHandle. * * @return Returns a ProcessHandle for the Process @@ -500,10 +500,10 @@ public abstract class Process { /** * Returns a snapshot of the direct children of the process. * The parent of a direct child process is the process. - * Typically, a process that is {@link #isAlive not alive} has no children. + * Typically, a process that is {@linkplain #isAlive not alive} has no children. *

    * Note that processes are created and terminate asynchronously. - * There is no guarantee that a process is {@link #isAlive alive}. + * There is no guarantee that a process is {@linkplain #isAlive alive}. * * * @implSpec @@ -526,10 +526,10 @@ public abstract class Process { * Returns a snapshot of the descendants of the process. * The descendants of a process are the children of the process * plus the descendants of those children, recursively. - * Typically, a process that is {@link #isAlive not alive} has no children. + * Typically, a process that is {@linkplain #isAlive not alive} has no children. *

    * Note that processes are created and terminate asynchronously. - * There is no guarantee that a process is {@link #isAlive alive}. + * There is no guarantee that a process is {@linkplain #isAlive alive}. * * * @implSpec diff --git a/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java b/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java index 31406459d93..7adee534b81 100644 --- a/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java +++ b/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java @@ -71,7 +71,7 @@ import sun.security.action.GetPropertyAction; * working directory of the current process, usually the directory * named by the system property {@code user.dir}. * - *

  • a source of standard input. + *
  • a source of standard input. * By default, the subprocess reads input from a pipe. Java code * can access this pipe via the output stream returned by * {@link Process#getOutputStream()}. However, standard input may @@ -86,7 +86,7 @@ import sun.security.action.GetPropertyAction; *
  • the {@link OutputStream#close() close} method does nothing * * - *
  • a destination for standard output + *
  • a destination for standard output * and standard error. By default, the subprocess writes standard * output and standard error to pipes. Java code can access these pipes * via the input streams returned by {@link Process#getOutputStream()} and @@ -1251,6 +1251,7 @@ public final class ProcessBuilder * If the operating system does not support the creation of processes * * @throws IOException if an I/O error occurs + * @since 9 */ public static List startPipeline(List builders) throws IOException { // Accumulate and check the builders diff --git a/jdk/src/java.base/share/classes/java/lang/ProcessHandle.java b/jdk/src/java.base/share/classes/java/lang/ProcessHandle.java index fbf5cfba252..7cd3b5dd96c 100644 --- a/jdk/src/java.base/share/classes/java/lang/ProcessHandle.java +++ b/jdk/src/java.base/share/classes/java/lang/ProcessHandle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, 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 @@ -104,7 +104,7 @@ public interface ProcessHandle extends Comparable { * @throws UnsupportedOperationException if the implementation * does not support this operation */ - long getPid(); + long pid(); /** * Returns an {@code Optional} for an existing native process. @@ -383,7 +383,7 @@ public interface ProcessHandle extends Comparable { /** * Returns a hash code value for this ProcessHandle. * The hashcode value follows the general contract for {@link Object#hashCode()}. - * The value is a function of the {@link #getPid getPid()} value and + * The value is a function of the {@link #pid pid()} value and * may be a function of additional information to uniquely identify the process. * If two ProcessHandles are equal according to the {@link #equals(Object) equals} * method, then calling the hashCode method on each of the two objects diff --git a/jdk/src/java.base/share/classes/java/lang/ProcessHandleImpl.java b/jdk/src/java.base/share/classes/java/lang/ProcessHandleImpl.java index 15a2bd4c029..d634166a30a 100644 --- a/jdk/src/java.base/share/classes/java/lang/ProcessHandleImpl.java +++ b/jdk/src/java.base/share/classes/java/lang/ProcessHandleImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, 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 @@ -24,6 +24,7 @@ */ package java.lang; +import java.lang.annotation.Native; import java.security.PrivilegedAction; import java.time.Duration; import java.time.Instant; @@ -34,11 +35,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; import java.util.concurrent.Executors; -import java.util.concurrent.ForkJoinPool; -import java.util.concurrent.SynchronousQueue; import java.util.concurrent.ThreadFactory; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; import java.util.stream.IntStream; import java.util.stream.Stream; @@ -56,6 +53,12 @@ final class ProcessHandleImpl implements ProcessHandle { */ private static long REAPER_DEFAULT_STACKSIZE = 128 * 1024; + /** + * Return value from waitForProcessExit0 indicating the process is not a child. + */ + @Native + private static final int NOT_A_CHILD = -2; + /** * Cache the ProcessHandle of this process. */ @@ -131,6 +134,29 @@ final class ProcessHandleImpl implements ProcessHandle { // spawn a thread to wait for and deliver the exit value processReaperExecutor.execute(() -> { int exitValue = waitForProcessExit0(pid, shouldReap); + if (exitValue == NOT_A_CHILD) { + // pid not alive or not a child of this process + // If it is alive wait for it to terminate + long sleep = 300; // initial milliseconds to sleep + int incr = 30; // increment to the sleep time + + long startTime = isAlive0(pid); + long origStart = startTime; + while (startTime >= 0) { + try { + Thread.sleep(Math.min(sleep, 5000L)); // no more than 5 sec + sleep += incr; + } catch (InterruptedException ie) { + // ignore and retry + } + startTime = isAlive0(pid); // recheck if is alive + if (origStart > 0 && startTime != origStart) { + // start time changed, pid is not the same process + break; + } + } + exitValue = 0; + } newCompletion.complete(exitValue); // remove from cache afterwards completions.remove(pid, newCompletion); @@ -146,7 +172,7 @@ final class ProcessHandleImpl implements ProcessHandle { throw new IllegalStateException("onExit for current process not allowed"); } - return ProcessHandleImpl.completion(getPid(), false) + return ProcessHandleImpl.completion(pid(), false) .handleAsync((exitStatus, unusedThrowable) -> this); } @@ -229,7 +255,7 @@ final class ProcessHandleImpl implements ProcessHandle { * @return the native process ID */ @Override - public long getPid() { + public long pid() { return pid; } diff --git a/jdk/src/java.base/share/classes/java/lang/Runtime.java b/jdk/src/java.base/share/classes/java/lang/Runtime.java index 84a599a4285..230d75a412d 100644 --- a/jdk/src/java.base/share/classes/java/lang/Runtime.java +++ b/jdk/src/java.base/share/classes/java/lang/Runtime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -930,10 +930,9 @@ public class Runtime { } /** - * Returns the version of the Java Runtime Environment as a {@link - * Runtime.Version}. + * Returns the version of the Java Runtime Environment as a {@link Version}. * - * @return the {@link Runtime.Version} of the Java Runtime Environment + * @return the {@link Version} of the Java Runtime Environment * * @since 9 */ @@ -948,19 +947,19 @@ public class Runtime { /** * A representation of a version string for an implementation of the - * Java SE Platform. A version string contains a version number + * Java SE Platform. A version string consists of a version number * optionally followed by pre-release and build information. * - *

    Version numbers

    + *

    Version numbers

    * *

    A version number, {@code $VNUM}, is a non-empty sequence * of elements separated by period characters (U+002E). An element is - * either zero, or a unsigned integer numeral without leading zeros. The + * either zero, or an unsigned integer numeral without leading zeros. The * final element in a version number must not be zero. The format is: *

    * *
    -     *     ^[1-9][0-9]*(((\.0)*\.[1-9][0-9]*)*)*$
    +     *     [1-9][0-9]*((\.0)*\.[1-9][0-9]*)*
          * 
    * *

    The sequence may be of arbitrary length but the first three @@ -972,7 +971,7 @@ public class Runtime { * *

      * - *
    • {@code $MAJOR} --- The major version + *

    • {@code $MAJOR} --- The major version * number, incremented for a major release that contains significant new * features as specified in a new edition of the Java SE Platform * Specification, e.g.,

    • * - *
    • {@code $MINOR} --- The minor version + *

    • {@code $MINOR} --- The minor version * number, incremented for a minor update release that may contain * compatible bug fixes, revisions to standard APIs mandated by a * Maintenance Release @@ -993,7 +992,7 @@ public class Runtime { * additional service providers, new garbage collectors, and ports to new * hardware architectures.

    • * - *
    • {@code $SECURITY} --- The security + *

    • {@code $SECURITY} --- The security * level, incremented for a security update release that contains critical * fixes including those necessary to improve security. {@code $SECURITY} * is not reset when {@code $MINOR} is incremented. A @@ -1022,39 +1021,42 @@ public class Runtime { * sequence; e.g., {@code 9.1.2} is less than {@code 9.1.2.1}. *

      * - *

      Version strings

      + *

      Version strings

      * *

      A version string, {@code $VSTR}, consists of a version * number {@code $VNUM}, as described above, optionally followed by - * pre-release and build information, in the format

      + * pre-release and build information, in one of the following formats: + *

      * *
      -     *     $VNUM(-$PRE)?(\+($BUILD)?(-$OPT)?)?
      +     *     $VNUM(-$PRE)?\+$BUILD(-$OPT)?
      +     *     $VNUM-$PRE(-$OPT)?
      +     *     $VNUM(+-$OPT)?
            * 
      * *

      where:

      * *
        * - *
      • {@code $PRE}, matching {@code ([a-zA-Z0-9]+)} + *

      • {@code $PRE}, matching {@code ([a-zA-Z0-9]+)} * --- A pre-release identifier. Typically {@code ea}, for a * potentially unstable early-access release under active development, - * or {@code internal}, for an internal developer build. + * or {@code internal}, for an internal developer build.

      • * - *
      • {@code $BUILD}, matching {@code + *

      • {@code $BUILD}, matching {@code * (0|[1-9][0-9]*)} --- The build number, incremented for each promoted * build. {@code $BUILD} is reset to {@code 1} when any portion of {@code - * $VNUM} is incremented.

        + * $VNUM} is incremented.

      • * - *
      • {@code $OPT}, matching {@code - * ([-a-zA-Z0-9\.]+)} --- Additional build information, if desired. In + *

      • {@code $OPT}, matching {@code + * ([-a-zA-Z0-9.]+)} --- Additional build information, if desired. In * the case of an {@code internal} build this will often contain the date - * and time of the build.

        + * and time of the build.

      • * *
      * - *

      A version number {@code 10-ea} matches {@code $VNUM = "10"} and - * {@code $PRE = "ea"}. The version number {@code 10+-ea} matches + *

      A version string {@code 10-ea} matches {@code $VNUM = "10"} and + * {@code $PRE = "ea"}. The version string {@code 10+-ea} matches * {@code $VNUM = "10"} and {@code $OPT = "ea"}.

      * *

      When comparing two version strings, the value of {@code $OPT}, if @@ -1067,15 +1069,21 @@ public class Runtime { * *

      A short version string, {@code $SVSTR}, often useful in * less formal contexts, is a version number optionally followed by a - * pre-release identifier: + * pre-release identifier:

      * *
            *     $VNUM(-$PRE)?
            * 
      * + *

      This is a value-based + * class; use of identity-sensitive operations (including reference equality + * ({@code ==}), identity hash code, or synchronization) on instances of + * {@code Version} may have unpredictable results and should be avoided. + *

      + * * @since 9 */ - public static class Version + public static final class Version implements Comparable { private final List version; @@ -1083,9 +1091,18 @@ public class Runtime { private final Optional build; private final Optional optional; - Version(List version, Optional pre, - Optional build, Optional optional) { - this.version = Collections.unmodifiableList(version); + /* + * List of version number components passed to this constructor MUST + * be at least unmodifiable (ideally immutable). In the case on an + * unmodifiable list, the caller MUST hand the list over to this + * constructor and never change the underlying list. + */ + private Version(List unmodifiableListOfVersions, + Optional pre, + Optional build, + Optional optional) + { + this.version = unmodifiableListOfVersions; this.pre = pre; this.build = build; this.optional = optional; @@ -1129,9 +1146,11 @@ public class Runtime { + s + "'"); // $VNUM is a dot-separated list of integers of arbitrary length - List version = new ArrayList<>(); - for (String i : m.group(VersionPattern.VNUM_GROUP).split("\\.")) - version.add(Integer.parseInt(i)); + String[] split = m.group(VersionPattern.VNUM_GROUP).split("\\."); + Integer[] version = new Integer[split.length]; + for (int i = 0; i < split.length; i++) { + version[i] = Integer.parseInt(split[i]); + } Optional pre = Optional.ofNullable( m.group(VersionPattern.PRE_GROUP)); @@ -1158,7 +1177,7 @@ public class Runtime { + " build or optional components: '" + s + "'"); } } - return new Version(version, pre, build, optional); + return new Version(List.of(version), pre, build, optional); } private static boolean isSimpleNumber(String s) { @@ -1247,7 +1266,7 @@ public class Runtime { * Compares this version to another. * *

      Each of the components in the version is - * compared in the follow order of precedence: version numbers, + * compared in the following order of precedence: version numbers, * pre-release identifiers, build numbers, optional build information. *

      * @@ -1269,9 +1288,7 @@ public class Runtime { * During this comparison, a version with optional build information is * considered to be greater than a version without one.

      * - *

      A version is not comparable to any other type of object. - * - * @param ob + * @param obj * The object to be compared * * @return A negative integer, zero, or a positive integer if this @@ -1282,8 +1299,8 @@ public class Runtime { * If the given object is {@code null} */ @Override - public int compareTo(Version ob) { - return compare(ob, false); + public int compareTo(Version obj) { + return compare(obj, false); } /** @@ -1294,9 +1311,10 @@ public class Runtime { * described in {@link #compareTo(Version)} with the exception that the * optional build information is always ignored.

      * - *

      A version is not comparable to any other type of object. + *

      This method provides ordering which is consistent with + * {@code equalsIgnoreOptional()}.

      * - * @param ob + * @param obj * The object to be compared * * @return A negative integer, zero, or a positive integer if this @@ -1306,49 +1324,47 @@ public class Runtime { * @throws NullPointerException * If the given object is {@code null} */ - public int compareToIgnoreOptional(Version ob) { - return compare(ob, true); + public int compareToIgnoreOptional(Version obj) { + return compare(obj, true); } - private int compare(Version ob, boolean ignoreOpt) { - if (ob == null) - throw new NullPointerException("Invalid argument"); + private int compare(Version obj, boolean ignoreOpt) { + if (obj == null) + throw new NullPointerException(); - int ret = compareVersion(ob); + int ret = compareVersion(obj); if (ret != 0) return ret; - ret = comparePre(ob); + ret = comparePre(obj); if (ret != 0) return ret; - ret = compareBuild(ob); + ret = compareBuild(obj); if (ret != 0) return ret; if (!ignoreOpt) - return compareOptional(ob); + return compareOptional(obj); return 0; } - private int compareVersion(Version ob) { + private int compareVersion(Version obj) { int size = version.size(); - int oSize = ob.version().size(); + int oSize = obj.version().size(); int min = Math.min(size, oSize); for (int i = 0; i < min; i++) { - Integer val = version.get(i); - Integer oVal = ob.version().get(i); + int val = version.get(i); + int oVal = obj.version().get(i); if (val != oVal) return val - oVal; } - if (size != oSize) - return size - oSize; - return 0; + return size - oSize; } - private int comparePre(Version ob) { - Optional oPre = ob.pre(); + private int comparePre(Version obj) { + Optional oPre = obj.pre(); if (!pre.isPresent()) { if (oPre.isPresent()) return 1; @@ -1370,20 +1386,20 @@ public class Runtime { return 0; } - private int compareBuild(Version ob) { - Optional oBuild = ob.build(); + private int compareBuild(Version obj) { + Optional oBuild = obj.build(); if (oBuild.isPresent()) { return (build.isPresent() ? build.get().compareTo(oBuild.get()) - : 1); + : -1); } else if (build.isPresent()) { - return -1; + return 1; } return 0; } - private int compareOptional(Version ob) { - Optional oOpt = ob.optional(); + private int compareOptional(Version obj) { + Optional oOpt = obj.optional(); if (!optional.isPresent()) { if (oOpt.isPresent()) return -1; @@ -1429,10 +1445,7 @@ public class Runtime { *

      Two {@code Version}s are equal if and only if they represent the * same version string. * - *

      This method satisfies the general contract of the {@link - * Object#equals(Object) Object.equals} method.

      - * - * @param ob + * @param obj * The object to which this {@code Version} is to be compared * * @return {@code true} if, and only if, the given object is a {@code @@ -1440,12 +1453,12 @@ public class Runtime { * */ @Override - public boolean equals(Object ob) { - boolean ret = equalsIgnoreOptional(ob); + public boolean equals(Object obj) { + boolean ret = equalsIgnoreOptional(obj); if (!ret) return false; - Version that = (Version)ob; + Version that = (Version)obj; return (this.optional().equals(that.optional())); } @@ -1456,21 +1469,21 @@ public class Runtime { *

      Two {@code Version}s are equal if and only if they represent the * same version string disregarding the optional build information. * - * @param ob + * @param obj * The object to which this {@code Version} is to be compared * * @return {@code true} if, and only if, the given object is a {@code * Version} that is identical to this {@code Version} - * ignoring the optinal build information + * ignoring the optional build information * */ - public boolean equalsIgnoreOptional(Object ob) { - if (this == ob) + public boolean equalsIgnoreOptional(Object obj) { + if (this == obj) return true; - if (!(ob instanceof Version)) + if (!(obj instanceof Version)) return false; - Version that = (Version)ob; + Version that = (Version)obj; return (this.version().equals(that.version()) && this.pre().equals(that.pre()) && this.build().equals(that.build())); @@ -1479,9 +1492,6 @@ public class Runtime { /** * Returns the hash code of this version. * - *

      This method satisfies the general contract of the {@link - * Object#hashCode Object.hashCode} method. - * * @return The hashcode of this version */ @Override @@ -1509,8 +1519,7 @@ public class Runtime { private static final String BUILD = "(?:(?\\+)(?0|[1-9][0-9]*)?)?"; private static final String OPT = "(?:-(?[-a-zA-Z0-9.]+))?"; - private static final String VSTR_FORMAT - = "^" + VNUM + PRE + BUILD + OPT + "$"; + private static final String VSTR_FORMAT = VNUM + PRE + BUILD + OPT; static final Pattern VSTR_PATTERN = Pattern.compile(VSTR_FORMAT); diff --git a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java index 46d8ef23c08..6867aeda184 100644 --- a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java +++ b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -26,9 +26,7 @@ package java.lang; import java.security.*; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.StringTokenizer; +import java.lang.module.ModuleFinder; /** * This class is for runtime permissions. A {@code RuntimePermission} @@ -45,13 +43,17 @@ import java.util.StringTokenizer; * target names, and for each provides a description of what the permission * allows and a discussion of the risks of granting code the permission. * - * + *
      + * + * * * * * * + * + * * * * @@ -265,6 +267,16 @@ import java.util.StringTokenizer; * * * + * + * + * + * + * + * * * * * * + * + * + * + * + * + * * * @@ -320,14 +340,6 @@ import java.util.StringTokenizer; * * * - * - * - * - * - * * * @@ -359,6 +371,15 @@ import java.util.StringTokenizer; * * + * + * + * + * + * + * + * + * *
      permission target name, + * what the target allows, and associated risks
      Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
      createClassLoader
      defineClassDefine a class with + * {@link java.lang.invoke.MethodHandles.Lookup#defineClass(byte[]) + * Lookup.defineClass}.This grants code with a suitably privileged {@code Lookup} object + * permission to define classes in the same package as the {@code Lookup}'s + * lookup class.
      accessDeclaredMembersAccess to the declared members of a classThis grants code permission to query a class for its public, @@ -298,6 +310,14 @@ import java.util.StringTokenizer; *
      getStackWalkerWithClassReferenceGet a stack walker that can retrieve stack frames with class reference.This allows retrieval of Class objects from stack walking. + * This might allow malicious code to access Class objects on the stack + * outside its own context.
      setDefaultUncaughtExceptionHandlerSetting the default handler to be used when a thread * terminates abruptly due to an uncaught exception
      usePolicyGranting this permission disables the Java Plug-In's default - * security prompting behavior.For more information, refer to the deployment guide. - *
      manageProcessNative process termination and information about processes * {@link ProcessHandle}.See {@link java.lang.System.LoggerFinder java.lang.System.LoggerFinder} * for more information.
      accessSystemModulesAccess system modules in the runtime image.This grants the permission to access resources in the + * {@linkplain ModuleFinder#ofSystem system modules} in the runtime image.
      * * @implNote @@ -374,6 +395,7 @@ import java.util.StringTokenizer; * * @author Marianne Mueller * @author Roland Schemers + * @since 1.2 */ public final class RuntimePermission extends BasicPermission { diff --git a/jdk/src/java.base/share/classes/java/lang/SecurityManager.java b/jdk/src/java.base/share/classes/java/lang/SecurityManager.java index 8a819ee6db7..7ab62aba500 100644 --- a/jdk/src/java.base/share/classes/java/lang/SecurityManager.java +++ b/jdk/src/java.base/share/classes/java/lang/SecurityManager.java @@ -25,13 +25,11 @@ package java.lang; -import java.lang.RuntimePermission; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleDescriptor.Exports; import java.lang.module.ModuleDescriptor.Opens; -import java.lang.reflect.Layer; +import java.lang.module.ModuleReference; import java.lang.reflect.Member; -import java.lang.reflect.Module; import java.io.FileDescriptor; import java.io.File; import java.io.FilePermission; @@ -44,12 +42,15 @@ import java.security.PrivilegedAction; import java.security.Security; import java.security.SecurityPermission; import java.util.HashSet; +import java.util.Map; import java.util.Objects; import java.util.PropertyPermission; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; -import java.util.stream.Stream; +import jdk.internal.module.ModuleBootstrap; +import jdk.internal.module.ModuleLoaderMap; import jdk.internal.reflect.CallerSensitive; import sun.security.util.SecurityConstants; @@ -193,18 +194,15 @@ import sun.security.util.SecurityConstants; * of system administrators who might need to perform multiple * tasks that require all (or numerous) permissions. *

      - * See - * Permissions in the JDK for permission-related information. + * See {@extLink security_guide_permissions + * Permissions in the Java Development Kit (JDK)} + * for permission-related information. * This document includes, for example, a table listing the various SecurityManager * check methods and the permission(s) the default * implementation of each such method requires. * It also contains a table of all the version 1.2 methods * that require permissions, and for each such method tells * which permission it requires. - *

      - * For more information about SecurityManager changes made in - * the JDK and advice regarding porting of 1.1-style security managers, - * see the security documentation. * * @author Arthur van Hoff * @author Roland Schemers @@ -1433,36 +1431,40 @@ class SecurityManager { return packages; } - // The non-exported packages of the modules in the boot layer that are - // loaded by the platform class loader or its ancestors. A non-exported - // package is a package that either is not exported at all by its containing - // module or is exported in a qualified fashion by its containing module. - private static final Set nonExportedPkgs; - + // The non-exported packages in modules defined to the boot or platform + // class loaders. A non-exported package is a package that is not exported + // or is only exported to specific modules. + private static final Map nonExportedPkgs = new ConcurrentHashMap<>(); static { - // Get the modules in the boot layer - Stream bootLayerModules = Layer.boot().modules().stream(); - - // Filter out the modules loaded by the boot or platform loader - PrivilegedAction> pa = () -> - bootLayerModules.filter(SecurityManager::isBootOrPlatformModule) - .collect(Collectors.toSet()); - Set modules = AccessController.doPrivileged(pa); - - // Filter out the non-exported packages - nonExportedPkgs = modules.stream() - .map(Module::getDescriptor) - .map(SecurityManager::nonExportedPkgs) - .flatMap(Set::stream) - .collect(Collectors.toSet()); + addNonExportedPackages(ModuleLayer.boot()); } /** - * Returns true if the module's loader is the boot or platform loader. + * Record the non-exported packages of the modules in the given layer */ - private static boolean isBootOrPlatformModule(Module m) { - return m.getClassLoader() == null || - m.getClassLoader() == ClassLoader.getPlatformClassLoader(); + static void addNonExportedPackages(ModuleLayer layer) { + Set bootModules = ModuleLoaderMap.bootModules(); + Set platformModules = ModuleLoaderMap.platformModules(); + layer.modules().stream() + .map(Module::getDescriptor) + .filter(md -> bootModules.contains(md.name()) + || platformModules.contains(md.name())) + .map(SecurityManager::nonExportedPkgs) + .flatMap(Set::stream) + .forEach(pn -> nonExportedPkgs.put(pn, Boolean.TRUE)); + } + + + /** + * Called by java.security.Security + */ + static void invalidatePackageAccessCache() { + synchronized (packageAccessLock) { + packageAccessValid = false; + } + synchronized (packageDefinitionLock) { + packageDefinitionValid = false; + } } /** @@ -1491,7 +1493,10 @@ class SecurityManager { * Throws a {@code SecurityException} if the calling thread is not allowed * to access the specified package. *

      - * This method is called by the {@code loadClass} method of class loaders. + * During class loading, this method may be called by the {@code loadClass} + * method of class loaders and by the Java Virtual Machine to ensure that + * the caller is allowed to access the package of the class that is + * being loaded. *

      * This method checks if the specified package starts with or equals * any of the packages in the {@code package.access} Security Property. @@ -1525,7 +1530,7 @@ class SecurityManager { Objects.requireNonNull(pkg, "package name can't be null"); // check if pkg is not exported to all modules - if (nonExportedPkgs.contains(pkg)) { + if (nonExportedPkgs.containsKey(pkg)) { checkPermission( new RuntimePermission("accessClassInPackage." + pkg)); return; @@ -1624,7 +1629,7 @@ class SecurityManager { Objects.requireNonNull(pkg, "package name can't be null"); // check if pkg is not exported to all modules - if (nonExportedPkgs.contains(pkg)) { + if (nonExportedPkgs.containsKey(pkg)) { checkPermission( new RuntimePermission("defineClassInPackage." + pkg)); return; diff --git a/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java b/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java index 55976485d4f..00cec33e2a2 100644 --- a/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java +++ b/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java @@ -25,11 +25,13 @@ package java.lang; import jdk.internal.reflect.MethodAccessor; +import jdk.internal.reflect.ConstructorAccessor; import java.lang.StackWalker.Option; import java.lang.StackWalker.StackFrame; import java.lang.annotation.Native; import java.lang.reflect.Method; +import java.lang.reflect.Constructor; import java.util.HashSet; import java.util.NoSuchElementException; import java.util.Objects; @@ -684,7 +686,7 @@ final class StackStreamFactory { frames[n++] = caller; } if (frames[1] == null) { - throw new IllegalStateException("no caller frame"); + throw new IllegalCallerException("no caller frame"); } return n; } @@ -922,7 +924,8 @@ final class StackStreamFactory { */ final void setBatch(int depth, int startIndex, int endIndex) { if (startIndex <= 0 || endIndex <= 0) - throw new IllegalArgumentException("startIndex=" + startIndex + " endIndex=" + endIndex); + throw new IllegalArgumentException("startIndex=" + startIndex + + " endIndex=" + endIndex); this.origin = startIndex; this.fence = endIndex; @@ -979,14 +982,12 @@ final class StackStreamFactory { } private static boolean isReflectionFrame(Class c) { - if (c.getName().startsWith("jdk.internal.reflect") && - !MethodAccessor.class.isAssignableFrom(c)) { - throw new InternalError("Not jdk.internal.reflect.MethodAccessor: " + c.toString()); - } // ## should filter all @Hidden frames? return c == Method.class || - MethodAccessor.class.isAssignableFrom(c) || - c.getName().startsWith("java.lang.invoke.LambdaForm"); + c == Constructor.class || + MethodAccessor.class.isAssignableFrom(c) || + ConstructorAccessor.class.isAssignableFrom(c) || + c.getName().startsWith("java.lang.invoke.LambdaForm"); } } diff --git a/jdk/src/java.base/share/classes/java/lang/StackTraceElement.java b/jdk/src/java.base/share/classes/java/lang/StackTraceElement.java index d95ea5ef826..b96fb363559 100644 --- a/jdk/src/java.base/share/classes/java/lang/StackTraceElement.java +++ b/jdk/src/java.base/share/classes/java/lang/StackTraceElement.java @@ -33,8 +33,6 @@ import jdk.internal.module.ModuleReferenceImpl; import java.lang.module.ModuleDescriptor.Version; import java.lang.module.ModuleReference; import java.lang.module.ResolvedModule; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.util.HashSet; import java.util.Objects; import java.util.Optional; @@ -92,6 +90,8 @@ public final class StackTraceElement implements java.io.Serializable { * @throws NullPointerException if {@code declaringClass} or * {@code methodName} is null * @since 1.5 + * @revised 9 + * @spec JPMS */ public StackTraceElement(String declaringClass, String methodName, String fileName, int lineNumber) { @@ -128,6 +128,7 @@ public final class StackTraceElement implements java.io.Serializable { * or {@code methodName} is {@code null} * * @since 9 + * @spec JPMS */ public StackTraceElement(String classLoaderName, String moduleName, String moduleVersion, @@ -187,7 +188,8 @@ public final class StackTraceElement implements java.io.Serializable { * point represented by this stack trace element; {@code null} * if the module name is not available. * @since 9 - * @see java.lang.reflect.Module#getName() + * @spec JPMS + * @see Module#getName() */ public String getModuleName() { return moduleName; @@ -201,6 +203,7 @@ public final class StackTraceElement implements java.io.Serializable { * point represented by this stack trace element; {@code null} * if the module version is not available. * @since 9 + * @spec JPMS * @see java.lang.module.ModuleDescriptor.Version */ public String getModuleVersion() { @@ -216,6 +219,7 @@ public final class StackTraceElement implements java.io.Serializable { * if the class loader is not named. * * @since 9 + * @spec JPMS * @see java.lang.ClassLoader#getName() */ public String getClassLoaderName() { @@ -329,6 +333,8 @@ public final class StackTraceElement implements java.io.Serializable { * {@link java.lang.StackWalker.StackFrame}, where an implementation may * choose to omit some element in the returned string. * + * @revised 9 + * @spec JPMS * @see Throwable#printStackTrace() */ public String toString() { @@ -376,6 +382,9 @@ public final class StackTraceElement implements java.io.Serializable { * @return true if the specified object is another * {@code StackTraceElement} instance representing the same * execution point as this instance. + * + * @revised 9 + * @spec JPMS */ public boolean equals(Object obj) { if (obj==this) @@ -469,7 +478,7 @@ public final class StackTraceElement implements java.io.Serializable { if (!VM.isModuleSystemInited()) return true; - return Layer.boot() == m.getLayer() && HashedModules.contains(m); + return ModuleLayer.boot() == m.getLayer() && HashedModules.contains(m); } /* @@ -481,7 +490,7 @@ public final class StackTraceElement implements java.io.Serializable { static Set hashedModules() { - Optional resolvedModule = Layer.boot() + Optional resolvedModule = ModuleLayer.boot() .configuration() .findModule("java.base"); assert resolvedModule.isPresent(); diff --git a/jdk/src/java.base/share/classes/java/lang/StackWalker.java b/jdk/src/java.base/share/classes/java/lang/StackWalker.java index b5c43fd2d67..7e4bc1ebf88 100644 --- a/jdk/src/java.base/share/classes/java/lang/StackWalker.java +++ b/jdk/src/java.base/share/classes/java/lang/StackWalker.java @@ -29,6 +29,7 @@ import jdk.internal.reflect.CallerSensitive; import java.util.*; import java.util.function.Consumer; import java.util.function.Function; +import java.util.function.Predicate; import java.util.stream.Stream; /** @@ -207,13 +208,23 @@ public final class StackWalker { /** * Shows all reflection frames. * - *

      By default, reflection frames are hidden. This includes the - * {@link java.lang.reflect.Method#invoke} method - * and the reflection implementation classes. A {@code StackWalker} with - * this {@code SHOW_REFLECT_FRAMES} option will show all reflection frames. - * The {@link #SHOW_HIDDEN_FRAMES} option can also be used to show all + *

      By default, reflection frames are hidden. A {@code StackWalker} + * configured with this {@code SHOW_REFLECT_FRAMES} option + * will show all reflection frames that + * include {@link java.lang.reflect.Method#invoke} and + * {@link java.lang.reflect.Constructor#newInstance(Object...)} + * and their reflection implementation classes. + * + *

      The {@link #SHOW_HIDDEN_FRAMES} option can also be used to show all * reflection frames and it will also show other hidden frames that * are implementation-specific. + * + * @apiNote + * This option includes the stack frames representing the invocation of + * {@code Method} and {@code Constructor}. Any utility methods that + * are equivalent to calling {@code Method.invoke} or + * {@code Constructor.newInstance} such as {@code Class.newInstance} + * are not filtered or controlled by any stack walking option. */ SHOW_REFLECT_FRAMES, /** @@ -268,7 +279,7 @@ public final class StackWalker { * If a security manager is present and the given {@code option} is * {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE}, * it calls its {@link SecurityManager#checkPermission checkPermission} - * method for {@code StackFramePermission("retainClassReference")}. + * method for {@code RuntimePermission("getStackWalkerWithClassReference")}. * * @param option {@link Option stack walking option} * @@ -292,7 +303,7 @@ public final class StackWalker { * If a security manager is present and the given {@code options} contains * {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE}, * it calls its {@link SecurityManager#checkPermission checkPermission} - * method for {@code StackFramePermission("retainClassReference")}. + * method for {@code RuntimePermission("getStackWalkerWithClassReference")}. * * @param options {@link Option stack walking option} * @@ -322,7 +333,7 @@ public final class StackWalker { * If a security manager is present and the given {@code options} contains * {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE}, * it calls its {@link SecurityManager#checkPermission checkPermission} - * method for {@code StackFramePermission("retainClassReference")}. + * method for {@code RuntimePermission("getStackWalkerWithClassReference")}. * *

      * The {@code estimateDepth} specifies the estimate number of stack frames @@ -365,7 +376,7 @@ public final class StackWalker { SecurityManager sm = System.getSecurityManager(); if (sm != null) { if (options.contains(Option.RETAIN_CLASS_REFERENCE)) { - sm.checkPermission(new StackFramePermission("retainClassReference")); + sm.checkPermission(new RuntimePermission("getStackWalkerWithClassReference")); } } } @@ -465,28 +476,31 @@ public final class StackWalker { } /** - * Gets the {@code Class} object of the caller invoking the method - * that calls this {@code getCallerClass} method. + * Gets the {@code Class} object of the caller who invoked the method + * that invoked {@code getCallerClass}. * - *

      Reflection frames, {@link java.lang.invoke.MethodHandle}, and - * hidden frames are filtered regardless of the + *

      This method filters {@linkplain Option#SHOW_REFLECT_FRAMES reflection + * frames}, {@link java.lang.invoke.MethodHandle}, and + * {@linkplain Option#SHOW_HIDDEN_FRAMES hidden frames} regardless of the * {@link Option#SHOW_REFLECT_FRAMES SHOW_REFLECT_FRAMES} * and {@link Option#SHOW_HIDDEN_FRAMES SHOW_HIDDEN_FRAMES} options * this {@code StackWalker} has been configured with. * + *

      This method should be called when a caller frame is present. If + * it is called from the bottom most frame on the stack, + * {@code IllegalCallerException} will be thrown. + * *

      This method throws {@code UnsupportedOperationException} * if this {@code StackWalker} is not configured with the * {@link Option#RETAIN_CLASS_REFERENCE RETAIN_CLASS_REFERENCE} option. - * This method should be called when a caller frame is present. If - * it is called from the last frame on the stack, - * {@code IllegalStateException} will be thrown. * * @apiNote * For example, {@code Util::getResourceBundle} loads a resource bundle - * on behalf of the caller. It calls this {@code getCallerClass} method - * to find the method calling {@code Util::getResourceBundle} and uses the caller's - * class loader to load the resource bundle. The caller class in this example - * is the {@code MyTool} class. + * on behalf of the caller. It invokes {@code getCallerClass} to identify + * the class whose method called {@code Util::getResourceBundle}. + * Then, it obtains the class loader of that class, and uses + * the class loader to load the resource bundle. The caller class + * in this example is {@code MyTool}. * *

      {@code
            * class Util {
      @@ -517,17 +531,17 @@ public final class StackWalker {
            * }
      * * When the {@code getCallerClass} method is called from a method that - * is the last frame on the stack, + * is the bottom most frame on the stack, * for example, {@code static public void main} method launched by the * {@code java} launcher, or a method invoked from a JNI attached thread, - * {@code IllegalStateException} is thrown. + * {@code IllegalCallerException} is thrown. * * @return {@code Class} object of the caller's caller invoking this method. * * @throws UnsupportedOperationException if this {@code StackWalker} * is not configured with {@link Option#RETAIN_CLASS_REFERENCE * Option.RETAIN_CLASS_REFERENCE}. - * @throws IllegalStateException if there is no caller frame, i.e. + * @throws IllegalCallerException if there is no caller frame, i.e. * when this {@code getCallerClass} method is called from a method * which is the last frame on the stack. */ diff --git a/jdk/src/java.base/share/classes/java/lang/StrictMath.java b/jdk/src/java.base/share/classes/java/lang/StrictMath.java index 63d895fa13c..400b3b25f34 100644 --- a/jdk/src/java.base/share/classes/java/lang/StrictMath.java +++ b/jdk/src/java.base/share/classes/java/lang/StrictMath.java @@ -975,7 +975,7 @@ public final class StrictMath { } /** - * Returns the floor modulus of the {@code long} and {@int} arguments. + * Returns the floor modulus of the {@code long} and {@code int} arguments. *

      * The floor modulus is {@code x - (floorDiv(x, y) * y)}, * has the same sign as the divisor {@code y}, and diff --git a/jdk/src/java.base/share/classes/java/lang/String.java b/jdk/src/java.base/share/classes/java/lang/String.java index 9bcc69963c7..7191669709e 100644 --- a/jdk/src/java.base/share/classes/java/lang/String.java +++ b/jdk/src/java.base/share/classes/java/lang/String.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -203,7 +203,7 @@ public final class String * Class String is special cased within the Serialization Stream Protocol. * * A String instance is written into an ObjectOutputStream according to - * + * * Object Serialization Specification, Section 6.2, "Stream Elements" */ private static final ObjectStreamField[] serialPersistentFields = @@ -335,7 +335,7 @@ public final class String * subarray. * *

      Each {@code byte} in the subarray is converted to a {@code char} as - * specified in the method above. + * specified in the {@link #String(byte[],int) String(byte[],int)} constructor. * * @deprecated This method does not properly convert bytes into characters. * As of JDK 1.1, the preferred way to do this is via the @@ -390,7 +390,7 @@ public final class String /** * Allocates a new {@code String} containing characters constructed from - * an array of 8-bit integer values. Each character cin the + * an array of 8-bit integer values. Each character c in the * resulting string is constructed from the corresponding component * b in the byte array such that: * @@ -1064,11 +1064,7 @@ public final class String if (!isLatin1()) { // utf16 str and latin1 abs can never be "equal" return false; } - for (int i = 0; i < len; i++) { - if ((char)(v1[i] & 0xff) != StringUTF16.getChar(v2, i)) { - return false; - } - } + return StringUTF16.contentEquals(v1, v2, len); } return true; } @@ -1120,10 +1116,8 @@ public final class String } } } else { - for (int i = 0; i < n; i++) { - if (StringUTF16.getChar(val, i) != cs.charAt(i)) { - return false; - } + if (!StringUTF16.contentEquals(val, cs, n)) { + return false; } } return true; @@ -1734,6 +1728,9 @@ public final class String if (tgtCount == 0) { return fromIndex; } + if (tgtCount > srcCount) { + return -1; + } if (srcCoder == tgtCoder) { return srcCoder == LATIN1 ? StringLatin1.indexOf(src, srcCount, tgt, tgtCount, fromIndex) @@ -1792,7 +1789,7 @@ public final class String * is the string being searched for. * * @param src the characters being searched. - * @param srcCoder coder handles the mapping between bytes/chars + * @param srcCoder coder handles the mapping between bytes/chars * @param srcCount count of the source string. * @param tgt the characters being searched for. * @param fromIndex the index to begin searching from. @@ -1807,12 +1804,12 @@ public final class String * consistency, don't check for null str. */ int rightIndex = srcCount - tgtCount; - if (fromIndex < 0) { - return -1; - } if (fromIndex > rightIndex) { fromIndex = rightIndex; } + if (fromIndex < 0) { + return -1; + } /* Empty string always matches. */ if (tgtCount == 0) { return fromIndex; @@ -1825,31 +1822,8 @@ public final class String if (srcCoder == LATIN1) { // && tgtCoder == UTF16 return -1; } - // srcCoder == UTF16 && tgtCoder == LATIN1 - int min = tgtCount - 1; - int i = min + fromIndex; - int strLastIndex = tgtCount - 1; - - char strLastChar = (char)(tgt[strLastIndex] & 0xff); - startSearchForLastChar: - while (true) { - while (i >= min && StringUTF16.getChar(src, i) != strLastChar) { - i--; - } - if (i < min) { - return -1; - } - int j = i - 1; - int start = j - strLastIndex; - int k = strLastIndex - 1; - while (j > start) { - if (StringUTF16.getChar(src, j--) != (tgt[k--] & 0xff)) { - i--; - continue startSearchForLastChar; - } - } - return start + 1; - } + // srcCoder == UTF16 && tgtCoder == LATIN1 + return StringUTF16.lastIndexOfLatin1(src, srcCount, tgt, tgtCount, fromIndex); } /** @@ -2229,30 +2203,35 @@ public final class String *

      The string {@code "boo:and:foo"}, for example, yields the * following results with these parameters: * - *

      + *
      + * + * * * * * * - * - * + * + * + * + * * - * - * + * + * * - * - * + * + * * - * - * + * + * * - * - * + * + * * - * - * + * + * * + * *
      Split example showing regex, limit, and result
      RegexLimitResult
      :2
      :2{@code { "boo", "and:foo" }}
      :5
      :5{@code { "boo", "and", "foo" }}
      :-2
      :-2{@code { "boo", "and", "foo" }}
      o5
      o5{@code { "b", "", ":and:f", "", "" }}
      o-2
      o-2{@code { "b", "", ":and:f", "", "" }}
      o0
      o0{@code { "b", "", ":and:f" }}
      * *

      An invocation of this method of the form @@ -2352,15 +2331,20 @@ public final class String *

      The string {@code "boo:and:foo"}, for example, yields the following * results with these expressions: * - *

      + *
      + * + * * * * * - * + * + * + * * - * + * * + * *
      Split examples showing regex and result
      RegexResult
      :
      :{@code { "boo", "and", "foo" }}
      o
      o{@code { "b", "", ":and:f" }}
      * * @@ -2471,13 +2455,17 @@ public final class String * {@code String} may be a different length than the original {@code String}. *

      * Examples of lowercase mappings are in the following table: - * + *
      + * + * * * * * * * + * + * * * * @@ -2506,6 +2494,7 @@ public final class String * sigma * * + * *
      Lowercase mapping examples showing language code of locale, upper case, lower case, and description
      Language Code of LocaleUpper CaseLower CaseDescription
      tr (Turkish)\u0130lowercased all chars in String
      * * @param locale use the case transformation rules for this locale @@ -2552,13 +2541,17 @@ public final class String *

      * Examples of locale-sensitive and 1:M case mappings are in the following table. * - * + *
      + * + * * * * * * * + * + * * * * @@ -2583,6 +2576,7 @@ public final class String * * * + * *
      Examples of locale-sensitive and 1:M case mappings. Shows Language code of locale, lower case, upper case, and description.
      Language Code of LocaleLower CaseUpper CaseDescription
      tr (Turkish)\u0069FAHRVERGNÜGEN
      * @param locale use the case transformation rules for this locale * @return the {@code String}, converted to uppercase. @@ -2672,7 +2666,6 @@ public final class String * point is passed through uninterpreted. * * @return an IntStream of char values from this sequence - * @since 9 */ @Override public IntStream chars() { @@ -2692,7 +2685,6 @@ public final class String * {@code int} values which are then passed to the stream. * * @return an IntStream of Unicode code points from this sequence - * @since 9 */ @Override public IntStream codePoints() { @@ -3080,7 +3072,8 @@ public final class String */ static void checkIndex(int index, int length) { if (index < 0 || index >= length) { - throw new StringIndexOutOfBoundsException("index " + index); + throw new StringIndexOutOfBoundsException("index " + index + + ",length " + length); } } @@ -3118,7 +3111,7 @@ public final class String * If {@code begin} is negative, {@code begin} is greater than * {@code end}, or {@code end} is greater than {@code length}. */ - private static void checkBoundsBeginEnd(int begin, int end, int length) { + static void checkBoundsBeginEnd(int begin, int end, int length) { if (begin < 0 || begin > end || end > length) { throw new StringIndexOutOfBoundsException( "begin " + begin + ", end " + end + ", length " + length); diff --git a/jdk/src/java.base/share/classes/java/lang/StringCoding.java b/jdk/src/java.base/share/classes/java/lang/StringCoding.java index ccbe6f24b43..7340fed04ca 100644 --- a/jdk/src/java.base/share/classes/java/lang/StringCoding.java +++ b/jdk/src/java.base/share/classes/java/lang/StringCoding.java @@ -46,9 +46,6 @@ import sun.nio.cs.ArrayEncoder; import static java.lang.String.LATIN1; import static java.lang.String.UTF16; import static java.lang.String.COMPACT_STRINGS; -import static java.nio.charset.StandardCharsets.ISO_8859_1; -import static java.nio.charset.StandardCharsets.US_ASCII; -import static java.nio.charset.StandardCharsets.UTF_8; /** * Utility class for string encoding and decoding. @@ -64,6 +61,10 @@ class StringCoding { private static final ThreadLocal> encoder = new ThreadLocal<>(); + private static final Charset ISO_8859_1 = Charset.forName("iso-8859-1"); + private static final Charset US_ASCII = Charset.forName("us-ascii"); + private static final Charset UTF_8 = Charset.forName("utf-8"); + private static boolean warnUnsupportedCharset = true; private static T deref(ThreadLocal> tl) { diff --git a/jdk/src/java.base/share/classes/java/lang/StringConcatHelper.java b/jdk/src/java.base/share/classes/java/lang/StringConcatHelper.java index f3f16088f7a..809fab8eed5 100644 --- a/jdk/src/java.base/share/classes/java/lang/StringConcatHelper.java +++ b/jdk/src/java.base/share/classes/java/lang/StringConcatHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -293,7 +293,7 @@ final class StringConcatHelper { if (coder == String.LATIN1) { return Integer.getChars(value, index, buf); } else { - return Integer.getCharsUTF16(value, index, buf); + return StringUTF16.getChars(value, index, buf); } } @@ -311,7 +311,7 @@ final class StringConcatHelper { if (coder == String.LATIN1) { return Long.getChars(value, index, buf); } else { - return Long.getCharsUTF16(value, index, buf); + return StringUTF16.getChars(value, index, buf); } } diff --git a/jdk/src/java.base/share/classes/java/lang/StringLatin1.java b/jdk/src/java.base/share/classes/java/lang/StringLatin1.java index b307bee6d46..73a84eb91ce 100644 --- a/jdk/src/java.base/share/classes/java/lang/StringLatin1.java +++ b/jdk/src/java.base/share/classes/java/lang/StringLatin1.java @@ -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 @@ -36,7 +36,6 @@ import jdk.internal.HotSpotIntrinsicCandidate; import static java.lang.String.LATIN1; import static java.lang.String.UTF16; import static java.lang.String.checkOffset; -import static java.lang.String.checkBoundsOffCount; final class StringLatin1 { @@ -566,11 +565,7 @@ final class StringLatin1 { // inflatedCopy byte[] -> byte[] @HotSpotIntrinsicCandidate public static void inflate(byte[] src, int srcOff, byte[] dst, int dstOff, int len) { - // We need a range check here because 'putChar' has no checks - checkBoundsOffCount(dstOff << 1, len << 1, dst.length); - for (int i = 0; i < len; i++) { - StringUTF16.putChar(dst, dstOff++, src[srcOff++] & 0xff); - } + StringUTF16.inflate(src, srcOff, dst, dstOff, len); } static class CharsSpliterator implements Spliterator.OfInt { diff --git a/jdk/src/java.base/share/classes/java/lang/StringUTF16.java b/jdk/src/java.base/share/classes/java/lang/StringUTF16.java index 2c0dd917a8f..e4a94d1bdf8 100644 --- a/jdk/src/java.base/share/classes/java/lang/StringUTF16.java +++ b/jdk/src/java.base/share/classes/java/lang/StringUTF16.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -30,12 +30,11 @@ import java.util.Locale; import java.util.Spliterator; import java.util.function.IntConsumer; import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.ForceInline; +import jdk.internal.vm.annotation.DontInline; import static java.lang.String.UTF16; import static java.lang.String.LATIN1; -import static java.lang.String.checkIndex; -import static java.lang.String.checkOffset; -import static java.lang.String.checkBoundsOffCount; final class StringUTF16 { @@ -51,33 +50,37 @@ final class StringUTF16 { } @HotSpotIntrinsicCandidate - public static void putChar(byte[] val, int index, int c) { + // intrinsic performs no bounds checks + static void putChar(byte[] val, int index, int c) { + assert index >= 0 && index < length(val) : "Trusted caller missed bounds check"; index <<= 1; val[index++] = (byte)(c >> HI_BYTE_SHIFT); val[index] = (byte)(c >> LO_BYTE_SHIFT); } @HotSpotIntrinsicCandidate - public static char getChar(byte[] val, int index) { + // intrinsic performs no bounds checks + static char getChar(byte[] val, int index) { + assert index >= 0 && index < length(val) : "Trusted caller missed bounds check"; index <<= 1; return (char)(((val[index++] & 0xff) << HI_BYTE_SHIFT) | ((val[index] & 0xff) << LO_BYTE_SHIFT)); } - public static char charAt(byte[] value, int index) { - if (index < 0 || index >= value.length >> 1) { - throw new StringIndexOutOfBoundsException(index); - } - return getChar(value, index); - } - public static int length(byte[] value) { return value.length >> 1; } - public static int codePointAt(byte[] value, int index, int end) { + private static int codePointAt(byte[] value, int index, int end, boolean checked) { + assert index < end; + if (checked) { + checkIndex(index, value); + } char c1 = getChar(value, index); if (Character.isHighSurrogate(c1) && ++index < end) { + if (checked) { + checkIndex(index, value); + } char c2 = getChar(value, index); if (Character.isLowSurrogate(c2)) { return Character.toCodePoint(c1, c2); @@ -86,10 +89,22 @@ final class StringUTF16 { return c1; } - public static int codePointBefore(byte[] value, int index) { - char c2 = getChar(value, --index); + public static int codePointAt(byte[] value, int index, int end) { + return codePointAt(value, index, end, false /* unchecked */); + } + + private static int codePointBefore(byte[] value, int index, boolean checked) { + --index; + if (checked) { + checkIndex(index, value); + } + char c2 = getChar(value, index); if (Character.isLowSurrogate(c2) && index > 0) { - char c1 = getChar(value, --index); + --index; + if (checked) { + checkIndex(index, value); + } + char c1 = getChar(value, index); if (Character.isHighSurrogate(c1)) { return Character.toCodePoint(c1, c2); } @@ -97,11 +112,19 @@ final class StringUTF16 { return c2; } - public static int codePointCount(byte[] value, int beginIndex, int endIndex) { + public static int codePointBefore(byte[] value, int index) { + return codePointBefore(value, index, false /* unchecked */); + } + + private static int codePointCount(byte[] value, int beginIndex, int endIndex, boolean checked) { + assert beginIndex <= endIndex; int count = endIndex - beginIndex; - for (int i = beginIndex; i < endIndex; ) { + int i = beginIndex; + if (checked && i < endIndex) { + checkBoundsBeginEnd(i, endIndex, value); + } + for (; i < endIndex - 1; ) { if (Character.isHighSurrogate(getChar(value, i++)) && - i < endIndex && Character.isLowSurrogate(getChar(value, i))) { count--; i++; @@ -110,6 +133,10 @@ final class StringUTF16 { return count; } + public static int codePointCount(byte[] value, int beginIndex, int endIndex) { + return codePointCount(value, beginIndex, endIndex, false /* unchecked */); + } + public static char[] toChars(byte[] value) { char[] dst = new char[value.length >> 1]; getChars(value, 0, dst.length, dst, 0); @@ -162,7 +189,7 @@ final class StringUTF16 { @HotSpotIntrinsicCandidate public static int compress(byte[] src, int srcOff, byte[] dst, int dstOff, int len) { // We need a range check here because 'getChar' has no checks - checkBoundsOffCount(srcOff << 1, len << 1, src.length); + checkBoundsOffCount(srcOff, len, src); for (int i = 0; i < len; i++) { char c = getChar(src, srcOff); if (c > 0xFF) { @@ -212,7 +239,7 @@ final class StringUTF16 { public static void getChars(byte[] value, int srcBegin, int srcEnd, char dst[], int dstBegin) { // We need a range check here because 'getChar' has no checks if (srcBegin < srcEnd) { - checkBoundsOffCount(srcBegin << 1, (srcEnd - srcBegin) << 1, value.length); + checkBoundsOffCount(srcBegin, srcEnd - srcBegin, value); } for (int i = srcBegin; i < srcEnd; i++) { dst[dstBegin++] = getChar(value, i); @@ -319,14 +346,25 @@ final class StringUTF16 { if (str.length == 0) { return 0; } - if (value.length == 0) { + if (value.length < str.length) { return -1; } - return indexOf(value, length(value), str, length(str), 0); + return indexOfUnsafe(value, length(value), str, length(str), 0); } @HotSpotIntrinsicCandidate public static int indexOf(byte[] value, int valueCount, byte[] str, int strCount, int fromIndex) { + checkBoundsBeginEnd(fromIndex, valueCount, value); + checkBoundsBeginEnd(0, strCount, str); + return indexOfUnsafe(value, valueCount, str, strCount, fromIndex); + } + + + private static int indexOfUnsafe(byte[] value, int valueCount, byte[] str, int strCount, int fromIndex) { + assert fromIndex >= 0; + assert strCount > 0; + assert strCount <= length(str); + assert valueCount >= strCount; char first = getChar(str, 0); int max = (valueCount - strCount); for (int i = fromIndex; i <= max; i++) { @@ -348,6 +386,7 @@ final class StringUTF16 { return -1; } + /** * Handles indexOf Latin1 substring in UTF16 string. */ @@ -356,14 +395,24 @@ final class StringUTF16 { if (str.length == 0) { return 0; } - if (value.length == 0) { + if (length(value) < str.length) { return -1; } - return indexOfLatin1(value, length(value), str, str.length, 0); + return indexOfLatin1Unsafe(value, length(value), str, str.length, 0); } @HotSpotIntrinsicCandidate public static int indexOfLatin1(byte[] src, int srcCount, byte[] tgt, int tgtCount, int fromIndex) { + checkBoundsBeginEnd(fromIndex, srcCount, src); + String.checkBoundsBeginEnd(0, tgtCount, tgt.length); + return indexOfLatin1Unsafe(src, srcCount, tgt, tgtCount, fromIndex); + } + + public static int indexOfLatin1Unsafe(byte[] src, int srcCount, byte[] tgt, int tgtCount, int fromIndex) { + assert fromIndex >= 0; + assert tgtCount > 0; + assert tgtCount <= tgt.length; + assert srcCount >= tgtCount; char first = (char)(tgt[0] & 0xff); int max = (srcCount - tgtCount); for (int i = fromIndex; i <= max; i++) { @@ -389,6 +438,11 @@ final class StringUTF16 { @HotSpotIntrinsicCandidate private static int indexOfChar(byte[] value, int ch, int fromIndex, int max) { + checkBoundsBeginEnd(fromIndex, max, value); + return indexOfCharUnsafe(value, ch, fromIndex, max); + } + + private static int indexOfCharUnsafe(byte[] value, int ch, int fromIndex, int max) { for (int i = fromIndex; i < max; i++) { if (getChar(value, i) == ch) { return i; @@ -404,6 +458,7 @@ final class StringUTF16 { if (Character.isValidCodePoint(ch)) { final char hi = Character.highSurrogate(ch); final char lo = Character.lowSurrogate(ch); + checkBoundsBeginEnd(fromIndex, max, value); for (int i = fromIndex; i < max - 1; i++) { if (getChar(value, i) == hi && getChar(value, i + 1 ) == lo) { return i; @@ -413,13 +468,21 @@ final class StringUTF16 { return -1; } + // srcCoder == UTF16 && tgtCoder == UTF16 public static int lastIndexOf(byte[] src, int srcCount, byte[] tgt, int tgtCount, int fromIndex) { + assert fromIndex >= 0; + assert tgtCount > 0; + assert tgtCount <= length(tgt); int min = tgtCount - 1; int i = min + fromIndex; int strLastIndex = tgtCount - 1; + + checkIndex(strLastIndex, tgt); char strLastChar = getChar(tgt, strLastIndex); + checkIndex(i, src); + startSearchForLastChar: while (true) { while (i >= min && getChar(src, i) != strLastChar) { @@ -509,6 +572,9 @@ final class StringUTF16 { public static boolean regionMatchesCI(byte[] value, int toffset, byte[] other, int ooffset, int len) { int last = toffset + len; + assert toffset >= 0 && ooffset >= 0; + assert ooffset + len <= length(other); + assert last <= length(value); while (toffset < last) { char c1 = getChar(value, toffset++); char c2 = getChar(other, ooffset++); @@ -599,6 +665,8 @@ final class StringUTF16 { private static String toLowerCaseEx(String str, byte[] value, byte[] result, int first, Locale locale, boolean localeDependent) { + assert(result.length == value.length); + assert(first >= 0); int resultOffset = first; int length = value.length >> 1; int srcCount; @@ -633,6 +701,8 @@ final class StringUTF16 { System.arraycopy(result, 0, result2, 0, resultOffset << 1); result = result2; } + assert resultOffset >= 0; + assert resultOffset + mapLen <= length(result); for (int x = 0; x < mapLen; ++x) { putChar(result, resultOffset++, lowerCharArray[x]); } @@ -697,6 +767,8 @@ final class StringUTF16 { byte[] result, int first, Locale locale, boolean localeDependent) { + assert(result.length == value.length); + assert(first >= 0); int resultOffset = first; int length = value.length >> 1; int srcCount; @@ -733,10 +805,12 @@ final class StringUTF16 { byte[] result2 = newBytesFor((result.length >> 1) + mapLen - srcCount); System.arraycopy(result, 0, result2, 0, resultOffset << 1); result = result2; - } - for (int x = 0; x < mapLen; ++x) { + } + assert resultOffset >= 0; + assert resultOffset + mapLen <= length(result); + for (int x = 0; x < mapLen; ++x) { putChar(result, resultOffset++, upperCharArray[x]); - } + } } } return newString(result, 0, resultOffset); @@ -757,7 +831,7 @@ final class StringUTF16 { null; } - public static void putChars(byte[] val, int index, char[] str, int off, int end) { + private static void putChars(byte[] val, int index, char[] str, int off, int end) { while (off < end) { putChar(val, index++, str[off++]); } @@ -927,35 +1001,172 @@ final class StringUTF16 { //////////////////////////////////////////////////////////////// public static void putCharSB(byte[] val, int index, int c) { - checkIndex(index, val.length >> 1); + checkIndex(index, val); putChar(val, index, c); } public static void putCharsSB(byte[] val, int index, char[] ca, int off, int end) { - checkOffset(index + end - off, val.length >> 1); + checkBoundsBeginEnd(index, index + end - off, val); putChars(val, index, ca, off, end); } public static void putCharsSB(byte[] val, int index, CharSequence s, int off, int end) { - checkOffset(index + end - off, val.length >> 1); + checkBoundsBeginEnd(index, index + end - off, val); for (int i = off; i < end; i++) { putChar(val, index++, s.charAt(i)); } } public static int codePointAtSB(byte[] val, int index, int end) { - checkOffset(end, val.length >> 1); - return codePointAt(val, index, end); + return codePointAt(val, index, end, true /* checked */); } public static int codePointBeforeSB(byte[] val, int index) { - checkOffset(index, val.length >> 1); - return codePointBefore(val, index); + return codePointBefore(val, index, true /* checked */); } public static int codePointCountSB(byte[] val, int beginIndex, int endIndex) { - checkOffset(endIndex, val.length >> 1); - return codePointCount(val, beginIndex, endIndex); + return codePointCount(val, beginIndex, endIndex, true /* checked */); + } + + public static int getChars(int i, int begin, int end, byte[] value) { + checkBoundsBeginEnd(begin, end, value); + int pos = getChars(i, end, value); + assert begin == pos; + return pos; + } + + public static int getChars(long l, int begin, int end, byte[] value) { + checkBoundsBeginEnd(begin, end, value); + int pos = getChars(l, end, value); + assert begin == pos; + return pos; + } + + public static boolean contentEquals(byte[] v1, byte[] v2, int len) { + checkBoundsOffCount(0, len, v2); + for (int i = 0; i < len; i++) { + if ((char)(v1[i] & 0xff) != getChar(v2, i)) { + return false; + } + } + return true; + } + + public static boolean contentEquals(byte[] value, CharSequence cs, int len) { + checkOffset(len, value); + for (int i = 0; i < len; i++) { + if (getChar(value, i) != cs.charAt(i)) { + return false; + } + } + return true; + } + + public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4) { + int end = i + 4; + checkBoundsBeginEnd(i, end, value); + putChar(value, i++, c1); + putChar(value, i++, c2); + putChar(value, i++, c3); + putChar(value, i++, c4); + assert(i == end); + return end; + } + + public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4, char c5) { + int end = i + 5; + checkBoundsBeginEnd(i, end, value); + putChar(value, i++, c1); + putChar(value, i++, c2); + putChar(value, i++, c3); + putChar(value, i++, c4); + putChar(value, i++, c5); + assert(i == end); + return end; + } + + public static char charAt(byte[] value, int index) { + checkIndex(index, value); + return getChar(value, index); + } + + public static void reverse(byte[] val, int count) { + checkOffset(count, val); + int n = count - 1; + boolean hasSurrogates = false; + for (int j = (n-1) >> 1; j >= 0; j--) { + int k = n - j; + char cj = getChar(val, j); + char ck = getChar(val, k); + putChar(val, j, ck); + putChar(val, k, cj); + if (Character.isSurrogate(cj) || + Character.isSurrogate(ck)) { + hasSurrogates = true; + } + } + if (hasSurrogates) { + reverseAllValidSurrogatePairs(val, count); + } + } + + /** Outlined helper method for reverse() */ + private static void reverseAllValidSurrogatePairs(byte[] val, int count) { + for (int i = 0; i < count - 1; i++) { + char c2 = getChar(val, i); + if (Character.isLowSurrogate(c2)) { + char c1 = getChar(val, i + 1); + if (Character.isHighSurrogate(c1)) { + putChar(val, i++, c1); + putChar(val, i, c2); + } + } + } + } + + // inflatedCopy byte[] -> byte[] + public static void inflate(byte[] src, int srcOff, byte[] dst, int dstOff, int len) { + // We need a range check here because 'putChar' has no checks + checkBoundsOffCount(dstOff, len, dst); + for (int i = 0; i < len; i++) { + putChar(dst, dstOff++, src[srcOff++] & 0xff); + } + } + + // srcCoder == UTF16 && tgtCoder == LATIN1 + public static int lastIndexOfLatin1(byte[] src, int srcCount, + byte[] tgt, int tgtCount, int fromIndex) { + assert fromIndex >= 0; + assert tgtCount > 0; + assert tgtCount <= tgt.length; + int min = tgtCount - 1; + int i = min + fromIndex; + int strLastIndex = tgtCount - 1; + + char strLastChar = (char)(tgt[strLastIndex] & 0xff); + + checkIndex(i, src); + + startSearchForLastChar: + while (true) { + while (i >= min && getChar(src, i) != strLastChar) { + i--; + } + if (i < min) { + return -1; + } + int j = i - 1; + int start = j - strLastIndex; + int k = strLastIndex - 1; + while (j > start) { + if (getChar(src, j--) != (tgt[k--] & 0xff)) { + i--; + continue startSearchForLastChar; + } + } + return start + 1; + } } //////////////////////////////////////////////////////////////// @@ -975,4 +1186,123 @@ final class StringUTF16 { } static final int MAX_LENGTH = Integer.MAX_VALUE >> 1; + + // Used by trusted callers. Assumes all necessary bounds checks have + // been done by the caller. + + /** + * This is a variant of {@link Integer#getChars(int, int, byte[])}, but for + * UTF-16 coder. + * + * @param i value to convert + * @param index next index, after the least significant digit + * @param buf target buffer, UTF16-coded. + * @return index of the most significant digit or minus sign, if present + */ + static int getChars(int i, int index, byte[] buf) { + int q, r; + int charPos = index; + + boolean negative = (i < 0); + if (!negative) { + i = -i; + } + + // Get 2 digits/iteration using ints + while (i <= -100) { + q = i / 100; + r = (q * 100) - i; + i = q; + putChar(buf, --charPos, Integer.DigitOnes[r]); + putChar(buf, --charPos, Integer.DigitTens[r]); + } + + // We know there are at most two digits left at this point. + q = i / 10; + r = (q * 10) - i; + putChar(buf, --charPos, '0' + r); + + // Whatever left is the remaining digit. + if (q < 0) { + putChar(buf, --charPos, '0' - q); + } + + if (negative) { + putChar(buf, --charPos, '-'); + } + return charPos; + } + + /** + * This is a variant of {@link Long#getChars(long, int, byte[])}, but for + * UTF-16 coder. + * + * @param i value to convert + * @param index next index, after the least significant digit + * @param buf target buffer, UTF16-coded. + * @return index of the most significant digit or minus sign, if present + */ + static int getChars(long i, int index, byte[] buf) { + long q; + int r; + int charPos = index; + + boolean negative = (i < 0); + if (!negative) { + i = -i; + } + + // Get 2 digits/iteration using longs until quotient fits into an int + while (i <= Integer.MIN_VALUE) { + q = i / 100; + r = (int)((q * 100) - i); + i = q; + putChar(buf, --charPos, Integer.DigitOnes[r]); + putChar(buf, --charPos, Integer.DigitTens[r]); + } + + // Get 2 digits/iteration using ints + int q2; + int i2 = (int)i; + while (i2 <= -100) { + q2 = i2 / 100; + r = (q2 * 100) - i2; + i2 = q2; + putChar(buf, --charPos, Integer.DigitOnes[r]); + putChar(buf, --charPos, Integer.DigitTens[r]); + } + + // We know there are at most two digits left at this point. + q2 = i2 / 10; + r = (q2 * 10) - i2; + putChar(buf, --charPos, '0' + r); + + // Whatever left is the remaining digit. + if (q2 < 0) { + putChar(buf, --charPos, '0' - q2); + } + + if (negative) { + putChar(buf, --charPos, '-'); + } + return charPos; + } + // End of trusted methods. + + public static void checkIndex(int off, byte[] val) { + String.checkIndex(off, length(val)); + } + + public static void checkOffset(int off, byte[] val) { + String.checkOffset(off, length(val)); + } + + public static void checkBoundsBeginEnd(int begin, int end, byte[] val) { + String.checkBoundsBeginEnd(begin, end, length(val)); + } + + public static void checkBoundsOffCount(int offset, int count, byte[] val) { + String.checkBoundsOffCount(offset, count, length(val)); + } + } diff --git a/jdk/src/java.base/share/classes/java/lang/System.java b/jdk/src/java.base/share/classes/java/lang/System.java index 1577e215e35..c8d807a3d13 100644 --- a/jdk/src/java.base/share/classes/java/lang/System.java +++ b/jdk/src/java.base/share/classes/java/lang/System.java @@ -35,32 +35,33 @@ import java.io.InputStream; import java.io.PrintStream; import java.io.UnsupportedEncodingException; import java.lang.annotation.Annotation; +import java.lang.module.ModuleDescriptor; import java.lang.reflect.Constructor; import java.lang.reflect.Executable; -import java.lang.reflect.Layer; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; -import java.net.URL; +import java.net.URI; import java.security.AccessControlContext; -import java.util.Properties; -import java.util.PropertyPermission; -import java.util.Map; +import java.security.ProtectionDomain; import java.security.AccessController; import java.security.PrivilegedAction; import java.nio.channels.Channel; import java.nio.channels.spi.SelectorProvider; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Properties; +import java.util.PropertyPermission; +import java.util.ResourceBundle; +import java.util.function.Supplier; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Stream; -import java.util.Objects; -import java.util.ResourceBundle; -import java.util.function.Supplier; -import sun.nio.ch.Interruptible; +import jdk.internal.module.ModuleBootstrap; +import jdk.internal.module.ServicesCatalog; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; -import sun.security.util.SecurityConstants; -import sun.reflect.annotation.AnnotationType; import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.misc.JavaLangAccess;; import jdk.internal.misc.SharedSecrets;; @@ -68,8 +69,9 @@ import jdk.internal.misc.VM; import jdk.internal.logger.LoggerFinderLoader; import jdk.internal.logger.LazyLoggers; import jdk.internal.logger.LocalizedLoggerWrapper; - -import jdk.internal.module.ModuleBootstrap; +import sun.reflect.annotation.AnnotationType; +import sun.nio.ch.Interruptible; +import sun.security.util.SecurityConstants; /** * The System class contains several useful class fields @@ -575,9 +577,13 @@ public final class System { * system properties, a set of system properties is first created and * initialized. This set of system properties always includes values * for the following keys: - * + *
      + * + * * * + * + * * * @@ -636,6 +642,7 @@ public final class System { * * * + * *
      Shows property keys and associated values
      KeyDescription of Associated Value
      java.versionJava Runtime Environment version which may be interpreted * as a {@link Runtime.Version}
      User's home directory
      user.dirUser's current working directory
      *

      * Multiple paths in a system property value are separated by the path @@ -647,9 +654,13 @@ public final class System { * * @implNote In addition to the standard system properties, the system * properties may include the following keys: - * + *
      + * + * * * + * + * * * * @@ -658,6 +669,7 @@ public final class System { * * * + * *
      Shows property keys and associated values
      KeyDescription of Associated Value
      {@code jdk.module.path}The application module path
      {@code jdk.module.upgrade.path}The module name of the initial/main module
      {@code jdk.module.main.class}The main class name of the initial module
      * * @return the system properties @@ -898,7 +910,7 @@ public final class System { * being thrown. If no exception is thrown the value of the * variable name is returned. * - *

      System + *

      System * properties and environment variables are both * conceptually mappings between names and values. Both * mechanisms can be used to pass user-defined information to a @@ -1159,7 +1171,7 @@ public final class System { * @param msg the string message (or a key in the message catalog, if * this logger is a {@link * LoggerFinder#getLocalizedLogger(java.lang.String, - * java.util.ResourceBundle, java.lang.reflect.Module) localized logger}); + * java.util.ResourceBundle, java.lang.Module) localized logger}); * can be {@code null}. * * @throws NullPointerException if {@code level} is {@code null}. @@ -1227,7 +1239,7 @@ public final class System { * @param msg the string message (or a key in the message catalog, if * this logger is a {@link * LoggerFinder#getLocalizedLogger(java.lang.String, - * java.util.ResourceBundle, java.lang.reflect.Module) localized logger}); + * java.util.ResourceBundle, java.lang.Module) localized logger}); * can be {@code null}. * @param thrown a {@code Throwable} associated with the log message; * can be {@code null}. @@ -1276,7 +1288,7 @@ public final class System { * java.text.MessageFormat} format, (or a key in the message * catalog, if this logger is a {@link * LoggerFinder#getLocalizedLogger(java.lang.String, - * java.util.ResourceBundle, java.lang.reflect.Module) localized logger}); + * java.util.ResourceBundle, java.lang.Module) localized logger}); * can be {@code null}. * @param params an optional list of parameters to the message (may be * none). @@ -1481,7 +1493,7 @@ public final class System { * message localization. * * @implSpec By default, this method calls {@link - * #getLogger(java.lang.String, java.lang.reflect.Module) + * #getLogger(java.lang.String, java.lang.Module) * this.getLogger(name, module)} to obtain a logger, then wraps that * logger in a {@link Logger} instance where all methods that do not * take a {@link ResourceBundle} as parameter are redirected to one @@ -1565,12 +1577,20 @@ public final class System { * @implSpec * Instances returned by this method route messages to loggers * obtained by calling {@link LoggerFinder#getLogger(java.lang.String, - * java.lang.reflect.Module) LoggerFinder.getLogger(name, module)}, where + * java.lang.Module) LoggerFinder.getLogger(name, module)}, where * {@code module} is the caller's module. + * In cases where {@code System.getLogger} is called from a context where + * there is no caller frame on the stack (e.g when called directly + * from a JNI attached thread), {@code IllegalCallerException} is thrown. + * To obtain a logger in such a context, use an auxiliary class that will + * implicitly be identified as the caller, or use the system {@link + * LoggerFinder#getLoggerFinder() LoggerFinder} to obtain a logger instead. + * Note that doing the latter may eagerly initialize the underlying + * logging system. * * @apiNote * This method may defer calling the {@link - * LoggerFinder#getLogger(java.lang.String, java.lang.reflect.Module) + * LoggerFinder#getLogger(java.lang.String, java.lang.Module) * LoggerFinder.getLogger} method to create an actual logger supplied by * the logging backend, for instance, to allow loggers to be obtained during * the system initialization time. @@ -1579,6 +1599,8 @@ public final class System { * @return an instance of {@link Logger} that can be used by the calling * class. * @throws NullPointerException if {@code name} is {@code null}. + * @throws IllegalCallerException if there is no Java caller frame on the + * stack. * * @since 9 */ @@ -1586,6 +1608,9 @@ public final class System { public static Logger getLogger(String name) { Objects.requireNonNull(name); final Class caller = Reflection.getCallerClass(); + if (caller == null) { + throw new IllegalCallerException("no caller frame"); + } return LazyLoggers.getLogger(name, caller.getModule()); } @@ -1598,9 +1623,17 @@ public final class System { * @implSpec * The returned logger will perform message localization as specified * by {@link LoggerFinder#getLocalizedLogger(java.lang.String, - * java.util.ResourceBundle, java.lang.reflect.Module) - * LoggerFinder.getLocalizedLogger(name, bundle, module}, where + * java.util.ResourceBundle, java.lang.Module) + * LoggerFinder.getLocalizedLogger(name, bundle, module)}, where * {@code module} is the caller's module. + * In cases where {@code System.getLogger} is called from a context where + * there is no caller frame on the stack (e.g when called directly + * from a JNI attached thread), {@code IllegalCallerException} is thrown. + * To obtain a logger in such a context, use an auxiliary class that + * will implicitly be identified as the caller, or use the system {@link + * LoggerFinder#getLoggerFinder() LoggerFinder} to obtain a logger instead. + * Note that doing the latter may eagerly initialize the underlying + * logging system. * * @apiNote * This method is intended to be used after the system is fully initialized. @@ -1619,6 +1652,8 @@ public final class System { * resource bundle for message localization. * @throws NullPointerException if {@code name} is {@code null} or * {@code bundle} is {@code null}. + * @throws IllegalCallerException if there is no Java caller frame on the + * stack. * * @since 9 */ @@ -1627,6 +1662,9 @@ public final class System { final ResourceBundle rb = Objects.requireNonNull(bundle); Objects.requireNonNull(name); final Class caller = Reflection.getCallerClass(); + if (caller == null) { + throw new IllegalCallerException("no caller frame"); + } final SecurityManager sm = System.getSecurityManager(); // We don't use LazyLoggers if a resource bundle is specified. // Bootstrap sensitive classes in the JDK do not use resource bundles @@ -1737,6 +1775,7 @@ public final class System { * @since 1.1 */ @Deprecated(since="1.2", forRemoval=true) + @SuppressWarnings("removal") public static void runFinalizersOnExit(boolean value) { Runtime.runFinalizersOnExit(value); } @@ -1844,6 +1883,39 @@ public final class System { return new PrintStream(new BufferedOutputStream(fos, 128), true); } + /** + * Logs an exception/error at initialization time to stdout or stderr. + * + * @param printToStderr to print to stderr rather than stdout + * @param printStackTrace to print the stack trace + * @param msg the message to print before the exception, can be {@code null} + * @param e the exception or error + */ + private static void logInitException(boolean printToStderr, + boolean printStackTrace, + String msg, + Throwable e) { + if (VM.initLevel() < 1) { + throw new InternalError("system classes not initialized"); + } + PrintStream log = (printToStderr) ? err : out; + if (msg != null) { + log.println(msg); + } + if (printStackTrace) { + e.printStackTrace(log); + } else { + log.println(e); + for (Throwable suppressed : e.getSuppressed()) { + log.println("Suppressed: " + suppressed); + } + Throwable cause = e.getCause(); + if (cause != null) { + log.println("Caused by: " + cause); + } + } + } + /** * Initialize the system class. Called after thread initialization. */ @@ -1917,18 +1989,30 @@ public final class System { } // @see #initPhase2() - private static Layer bootLayer; + static ModuleLayer bootLayer; /* * Invoked by VM. Phase 2 module system initialization. * Only classes in java.base can be loaded in this phase. + * + * @param printToStderr print exceptions to stderr rather than stdout + * @param printStackTrace print stack trace when exception occurs + * + * @return JNI_OK for success, JNI_ERR for failure */ - private static void initPhase2() { - // initialize the module system - System.bootLayer = ModuleBootstrap.boot(); + private static int initPhase2(boolean printToStderr, boolean printStackTrace) { + try { + bootLayer = ModuleBootstrap.boot(); + } catch (Exception | Error e) { + logInitException(printToStderr, printStackTrace, + "Error occurred during initialization of boot layer", e); + return -1; // JNI_ERR + } // module system initialized VM.initLevel(2); + + return 0; // JNI_OK } /* @@ -1942,10 +2026,6 @@ public final class System { * the application classpath or modulepath. */ private static void initPhase3() { - // Initialize publicLookup early, to avoid bootstrapping circularities - // with security manager using java.lang.invoke infrastructure. - java.lang.invoke.MethodHandles.publicLookup(); - // set security manager String cn = System.getProperty("java.security.manager"); if (cn != null) { @@ -1989,8 +2069,8 @@ public final class System { private static void setJavaLangAccess() { // Allow privileged classes outside of java.lang SharedSecrets.setJavaLangAccess(new JavaLangAccess() { - public Method getMethodOrNull(Class klass, String name, Class... parameterTypes) { - return klass.getMethodOrNull(name, parameterTypes); + public List getDeclaredPublicMethods(Class klass, String name, Class... parameterTypes) { + return klass.getDeclaredPublicMethods(name, parameterTypes); } public jdk.internal.reflect.ConstantPool getConstantPool(Class klass) { return klass.getConstantPool(); @@ -2014,7 +2094,7 @@ public final class System { return Class.getExecutableTypeAnnotationBytes(executable); } public > - E[] getEnumConstantsShared(Class klass) { + E[] getEnumConstantsShared(Class klass) { return klass.getEnumConstantsShared(); } public void blockedOn(Thread t, Interruptible b) { @@ -2029,30 +2109,78 @@ public final class System { public Thread newThreadWithAcc(Runnable target, AccessControlContext acc) { return new Thread(target, acc); } + @SuppressWarnings("deprecation") public void invokeFinalize(Object o) throws Throwable { o.finalize(); } - public Layer getBootLayer() { - return bootLayer; - } public ConcurrentHashMap createOrGetClassLoaderValueMap(ClassLoader cl) { return cl.createOrGetClassLoaderValueMap(); } + public Class defineClass(ClassLoader loader, String name, byte[] b, ProtectionDomain pd, String source) { + return ClassLoader.defineClass1(loader, name, b, 0, b.length, pd, source); + } public Class findBootstrapClassOrNull(ClassLoader cl, String name) { return cl.findBootstrapClassOrNull(name); } - public URL findResource(ClassLoader cl, String mn, String name) throws IOException { - return cl.findResource(mn, name); - } - public Stream packages(ClassLoader cl) { - return cl.packages(); - } public Package definePackage(ClassLoader cl, String name, Module module) { return cl.definePackage(name, module); } public String fastUUID(long lsb, long msb) { return Long.fastUUID(lsb, msb); } + public void addNonExportedPackages(ModuleLayer layer) { + SecurityManager.addNonExportedPackages(layer); + } + public void invalidatePackageAccessCache() { + SecurityManager.invalidatePackageAccessCache(); + } + public Module defineModule(ClassLoader loader, + ModuleDescriptor descriptor, + URI uri) { + return new Module(null, loader, descriptor, uri); + } + public Module defineUnnamedModule(ClassLoader loader) { + return new Module(loader); + } + public void addReads(Module m1, Module m2) { + m1.implAddReads(m2); + } + public void addReadsAllUnnamed(Module m) { + m.implAddReadsAllUnnamed(); + } + public void addExports(Module m, String pn, Module other) { + m.implAddExports(pn, other); + } + public void addExportsToAllUnnamed(Module m, String pn) { + m.implAddExportsToAllUnnamed(pn); + } + public void addOpens(Module m, String pn, Module other) { + m.implAddOpens(pn, other); + } + public void addOpensToAllUnnamed(Module m, String pn) { + m.implAddOpensToAllUnnamed(pn); + } + public void addOpensToAllUnnamed(Module m, Iterator packages) { + m.implAddOpensToAllUnnamed(packages); + } + public void addUses(Module m, Class service) { + m.implAddUses(service); + } + public boolean isReflectivelyExported(Module m, String pn, Module other) { + return m.isReflectivelyExported(pn, other); + } + public boolean isReflectivelyOpened(Module m, String pn, Module other) { + return m.isReflectivelyOpened(pn, other); + } + public ServicesCatalog getServicesCatalog(ModuleLayer layer) { + return layer.getServicesCatalog(); + } + public Stream layers(ModuleLayer layer) { + return layer.layers(); + } + public Stream layers(ClassLoader loader) { + return ModuleLayer.layers(loader); + } }); } } diff --git a/jdk/src/java.base/share/classes/java/lang/Thread.java b/jdk/src/java.base/share/classes/java/lang/Thread.java index a7fc391d540..8ecc90dd964 100644 --- a/jdk/src/java.base/share/classes/java/lang/Thread.java +++ b/jdk/src/java.base/share/classes/java/lang/Thread.java @@ -927,7 +927,7 @@ class Thread implements Runnable { * for example), the interrupt method should be used to * interrupt the wait. * For more information, see - * Why + * Why * are Thread.stop, Thread.suspend and Thread.resume Deprecated?. */ @Deprecated(since="1.2") @@ -960,7 +960,7 @@ class Thread implements Runnable { * could be used to generate exceptions that the target thread was * not prepared to handle. * For more information, see - * Why + * Why * are Thread.stop, Thread.suspend and Thread.resume Deprecated?. * This method is subject to removal in a future version of Java SE. */ @@ -1082,7 +1082,7 @@ class Thread implements Runnable { * If another thread ever attempted to lock this resource, deadlock * would result. Such deadlocks typically manifest themselves as * "frozen" processes. For more information, see - * + * * Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?. * This method is subject to removal in a future version of Java SE. * @throws NoSuchMethodError always @@ -1122,7 +1122,7 @@ class Thread implements Runnable { * monitor prior to calling resume, deadlock results. Such * deadlocks typically manifest themselves as "frozen" processes. * For more information, see - * Why + * Why * are Thread.stop, Thread.suspend and Thread.resume Deprecated?. */ @Deprecated(since="1.2") @@ -1148,7 +1148,7 @@ class Thread implements Runnable { * @deprecated This method exists solely for use with {@link #suspend}, * which has been deprecated because it is deadlock-prone. * For more information, see - * Why + * Why * are Thread.stop, Thread.suspend and Thread.resume Deprecated?. */ @Deprecated(since="1.2") diff --git a/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java b/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java index 2d9c7a00cbf..eebc580e6f1 100644 --- a/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java +++ b/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java @@ -29,7 +29,7 @@ package java.lang; * Thrown to indicate that the requested operation is not supported.

      * * This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch diff --git a/jdk/src/java.base/share/classes/java/lang/VersionProps.java.template b/jdk/src/java.base/share/classes/java/lang/VersionProps.java.template index 367103a13fc..53a9160c8ce 100644 --- a/jdk/src/java.base/share/classes/java/lang/VersionProps.java.template +++ b/jdk/src/java.base/share/classes/java/lang/VersionProps.java.template @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -26,7 +26,7 @@ package java.lang; import java.io.PrintStream; -import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Optional; @@ -77,21 +77,32 @@ class VersionProps { // This method is reflectively used by regression tests. static List parseVersionNumbers(String version) { - List verNumbers = new ArrayList<>(4); + // Let's find the size of an array required to hold $VNUM components + int size = 0; int prevIndex = 0; + do { + prevIndex = version.indexOf('.', prevIndex) + 1; + size++; + } while (prevIndex > 0); + Integer[] verNumbers = new Integer[size]; + + // Fill in the array with $VNUM components + int n = 0; + prevIndex = 0; int index = version.indexOf('.'); - while (index > 0) { - verNumbers.add(parseVersionNumber(version, prevIndex, index)); + while (index > -1) { + verNumbers[n] = parseVersionNumber(version, prevIndex, index); prevIndex = index + 1; // Skip the period index = version.indexOf('.', prevIndex); + n++; } - verNumbers.add(parseVersionNumber(version, prevIndex, version.length())); + verNumbers[n] = parseVersionNumber(version, prevIndex, version.length()); - if (verNumbers.get(0) == 0 || verNumbers.get(verNumbers.size() - 1) == 0) - throw new IllegalArgumentException("Leading/trailing zeros not supported (" + - verNumbers + ")"); + if (verNumbers[0] == 0 || verNumbers[n] == 0) + throw new IllegalArgumentException("Leading/trailing zeros not allowed (" + + Arrays.toString(verNumbers) + ")"); - return verNumbers; + return List.of(verNumbers); } static List versionNumbers() { diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/WeakPairMap.java b/jdk/src/java.base/share/classes/java/lang/WeakPairMap.java similarity index 99% rename from jdk/src/java.base/share/classes/java/lang/reflect/WeakPairMap.java rename to jdk/src/java.base/share/classes/java/lang/WeakPairMap.java index 39a623a4704..1e4e12767b3 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/WeakPairMap.java +++ b/jdk/src/java.base/share/classes/java/lang/WeakPairMap.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package java.lang.reflect; +package java.lang; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; diff --git a/jdk/src/java.base/share/classes/java/lang/annotation/ElementType.java b/jdk/src/java.base/share/classes/java/lang/annotation/ElementType.java index 14780fe6827..bbab9cdacc2 100644 --- a/jdk/src/java.base/share/classes/java/lang/annotation/ElementType.java +++ b/jdk/src/java.base/share/classes/java/lang/annotation/ElementType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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,7 +28,7 @@ package java.lang.annotation; /** * The constants of this enumerated type provide a simple classification of the * syntactic locations where annotations may appear in a Java program. These - * constants are used in {@link Target java.lang.annotation.Target} + * constants are used in {@link java.lang.annotation.Target Target} * meta-annotations to specify where it is legal to write annotations of a * given type. * diff --git a/jdk/src/java.base/share/classes/java/lang/doc-files/threadPrimitiveDeprecation.html b/jdk/src/java.base/share/classes/java/lang/doc-files/threadPrimitiveDeprecation.html new file mode 100644 index 00000000000..aa6ba4981f4 --- /dev/null +++ b/jdk/src/java.base/share/classes/java/lang/doc-files/threadPrimitiveDeprecation.html @@ -0,0 +1,364 @@ + + + + + Java Thread Primitive Deprecation + + + +

      Java Thread Primitive Deprecation

      +
      +

      Why is Thread.stop deprecated?

      +

      Because it is inherently unsafe. Stopping a thread causes it to +unlock all the monitors that it has locked. (The monitors are +unlocked as the ThreadDeath exception propagates up +the stack.) If any of the objects previously protected by these +monitors were in an inconsistent state, other threads may now view +these objects in an inconsistent state. Such objects are said to be +damaged. When threads operate on damaged objects, arbitrary +behavior can result. This behavior may be subtle and difficult to +detect, or it may be pronounced. Unlike other unchecked exceptions, +ThreadDeath kills threads silently; thus, the user has +no warning that his program may be corrupted. The corruption can +manifest itself at any time after the actual damage occurs, even +hours or days in the future.

      +
      +

      Couldn't I just catch the ThreadDeath exception +and fix the damaged object?

      +

      In theory, perhaps, but it would vastly complicate the +task of writing correct multithreaded code. The task would be +nearly insurmountable for two reasons:

      +
        +
      1. A thread can throw a ThreadDeath exception +almost anywhere. All synchronized methods and blocks would +have to be studied in great detail, with this in mind.
      2. +
      3. A thread can throw a second ThreadDeath exception +while cleaning up from the first (in the catch or +finally clause). Cleanup would have to be repeated till +it succeeded. The code to ensure this would be quite complex.
      4. +
      +In sum, it just isn't practical. +
      +

      What about Thread.stop(Throwable)?

      +

      In addition to all of the problems noted above, this method may +be used to generate exceptions that its target thread is unprepared +to handle (including checked exceptions that the thread could not +possibly throw, were it not for this method). For example, the +following method is behaviorally identical to Java's +throw operation, but circumvents the compiler's +attempts to guarantee that the calling method has declared all of +the checked exceptions that it may throw:

      +
      +    static void sneakyThrow(Throwable t) {
      +        Thread.currentThread().stop(t);
      +    }
      +
      +
      +

      What should I use instead of Thread.stop?

      +

      Most uses of stop should be replaced by code that +simply modifies some variable to indicate that the target thread +should stop running. The target thread should check this variable +regularly, and return from its run method in an orderly fashion if +the variable indicates that it is to stop running. To ensure prompt +communication of the stop-request, the variable must be +volatile (or access to the variable must be +synchronized).

      +

      For example, suppose your applet contains the following +start, stop and run +methods:

      +
      +    private Thread blinker;
      +
      +    public void start() {
      +        blinker = new Thread(this);
      +        blinker.start();
      +    }
      +
      +    public void stop() {
      +        blinker.stop();  // UNSAFE!
      +    }
      +
      +    public void run() {
      +        while (true) {
      +            try {
      +                Thread.sleep(interval);
      +            } catch (InterruptedException e){
      +            }
      +            repaint();
      +        }
      +    }
      +
      +You can avoid the use of Thread.stop by replacing the +applet's stop and run methods with: +
      +    private volatile Thread blinker;
      +
      +    public void stop() {
      +        blinker = null;
      +    }
      +
      +    public void run() {
      +        Thread thisThread = Thread.currentThread();
      +        while (blinker == thisThread) {
      +            try {
      +                Thread.sleep(interval);
      +            } catch (InterruptedException e){
      +            }
      +            repaint();
      +        }
      +    }
      +
      +
      +

      How do I stop a thread that waits for long periods (e.g., for +input)?

      +

      That's what the Thread.interrupt method is for. The +same "state based" signaling mechanism shown above can be used, but +the state change (blinker = null, in the previous +example) can be followed by a call to +Thread.interrupt, to interrupt the wait:

      +
      +    public void stop() {
      +        Thread moribund = waiter;
      +        waiter = null;
      +        moribund.interrupt();
      +    }
      +
      +For this technique to work, it's critical that any method that +catches an interrupt exception and is not prepared to deal with it +immediately reasserts the exception. We say reasserts +rather than rethrows, because it is not always possible to +rethrow the exception. If the method that catches the +InterruptedException is not declared to throw this +(checked) exception, then it should "reinterrupt itself" with the +following incantation: +
      +    Thread.currentThread().interrupt();
      +
      +This ensures that the Thread will reraise the +InterruptedException as soon as it is able. +
      +

      What if a thread doesn't respond to +Thread.interrupt?

      +

      In some cases, you can use application specific tricks. For +example, if a thread is waiting on a known socket, you can close +the socket to cause the thread to return immediately. +Unfortunately, there really isn't any technique that works in +general. It should be noted that in all situations where a +waiting thread doesn't respond to Thread.interrupt, it +wouldn't respond to Thread.stop either. Such +cases include deliberate denial-of-service attacks, and I/O +operations for which thread.stop and thread.interrupt do not work +properly.

      +
      +

      Why are Thread.suspend and +Thread.resume deprecated?

      +

      Thread.suspend is inherently deadlock-prone. If the +target thread holds a lock on the monitor protecting a critical +system resource when it is suspended, no thread can access this +resource until the target thread is resumed. If the thread that +would resume the target thread attempts to lock this monitor prior +to calling resume, deadlock results. Such deadlocks +typically manifest themselves as "frozen" processes.

      +
      +

      What should I use instead of Thread.suspend and +Thread.resume?

      +

      As with Thread.stop, the prudent approach is to +have the "target thread" poll a variable indicating the desired +state of the thread (active or suspended). When the desired state +is suspended, the thread waits using Object.wait. When +the thread is resumed, the target thread is notified using +Object.notify.

      +

      For example, suppose your applet contains the following +mousePressed event handler, which toggles the state of a thread +called blinker:

      +
      +    private boolean threadSuspended;
      +
      +    Public void mousePressed(MouseEvent e) {
      +        e.consume();
      +
      +        if (threadSuspended)
      +            blinker.resume();
      +        else
      +            blinker.suspend();  // DEADLOCK-PRONE!
      +
      +        threadSuspended = !threadSuspended;
      +    }
      +
      +You can avoid the use of Thread.suspend and +Thread.resume by replacing the event handler above +with: +
      +    public synchronized void mousePressed(MouseEvent e) {
      +        e.consume();
      +
      +        threadSuspended = !threadSuspended;
      +
      +        if (!threadSuspended)
      +            notify();
      +    }
      +
      +and adding the following code to the "run loop": +
      +                synchronized(this) {
      +                    while (threadSuspended)
      +                        wait();
      +                }
      +
      +The wait method throws the +InterruptedException, so it must be inside a try +... catch clause. It's fine to put it in the same clause as +the sleep. The check should follow (rather than +precede) the sleep so the window is immediately +repainted when the thread is "resumed." The resulting +run method follows: +
      +    public void run() {
      +        while (true) {
      +            try {
      +                Thread.sleep(interval);
      +
      +                synchronized(this) {
      +                    while (threadSuspended)
      +                        wait();
      +                }
      +            } catch (InterruptedException e){
      +            }
      +            repaint();
      +        }
      +    }
      +
      +Note that the notify in the mousePressed +method and the wait in the run method are +inside synchronized blocks. This is required by the +language, and ensures that wait and +notify are properly serialized. In practical terms, +this eliminates race conditions that could cause the "suspended" +thread to miss a notify and remain suspended +indefinitely. +

      While the cost of synchronization in Java is decreasing as the +platform matures, it will never be free. A simple trick can be used +to remove the synchronization that we've added to each iteration of +the "run loop." The synchronized block that was added is replaced +by a slightly more complex piece of code that enters a synchronized +block only if the thread has actually been suspended:

      +
      +                if (threadSuspended) {
      +                    synchronized(this) {
      +                        while (threadSuspended)
      +                            wait();
      +                    }
      +                }
      +
      +

      In the absence of explicit synchronization, +threadSuspended must be made volatile to ensure +prompt communication of the suspend-request.

      +The resulting run method is: +
      +    private volatile boolean threadSuspended;
      +
      +    public void run() {
      +        while (true) {
      +            try {
      +                Thread.sleep(interval);
      +
      +                if (threadSuspended) {
      +                    synchronized(this) {
      +                        while (threadSuspended)
      +                            wait();
      +                    }
      +                }
      +            } catch (InterruptedException e){
      +            }
      +            repaint();
      +        }
      +    }
      +
      +
      +

      Can I combine the two techniques to produce a thread that may +be safely "stopped" or "suspended"?

      +Yes, it's reasonably straightforward. The one subtlety is that the +target thread may already be suspended at the time that another +thread tries to stop it. If the stop method merely sets +the state variable (blinker) to null, the target thread +will remain suspended (waiting on the monitor), rather than exiting +gracefully as it should. If the applet is restarted, multiple +threads could end up waiting on the monitor at the same time, +resulting in erratic behavior. +

      To rectify this situation, the stop method must ensure +that the target thread resumes immediately if it is suspended. Once +the target thread resumes, it must recognize immediately that it +has been stopped, and exit gracefully. Here's how the resulting +run and stop methods look:

      +
      +    public void run() {
      +        Thread thisThread = Thread.currentThread();
      +        while (blinker == thisThread) {
      +            try {
      +                Thread.sleep(interval);
      +
      +                synchronized(this) {
      +                    while (threadSuspended && blinker==thisThread)
      +                        wait();
      +                }
      +            } catch (InterruptedException e){
      +            }
      +            repaint();
      +        }
      +    }
      +
      +    public synchronized void stop() {
      +        blinker = null;
      +        notify();
      +    }
      +
      +If the stop method calls Thread.interrupt, as +described above, it needn't call notify as well, but it +still must be synchronized. This ensures that the target thread +won't miss an interrupt due to a race condition. +
      +

      What about Thread.destroy?

      +Thread.destroy was never implemented and has been +deprecated. If it were implemented, it would be deadlock-prone in +the manner of Thread.suspend. (In fact, it is roughly +equivalent to Thread.suspend without the possibility +of a subsequent Thread.resume.) +
      +

      Why is Runtime.runFinalizersOnExit +deprecated?

      +Because it is inherently unsafe. It may result in finalizers being +called on live objects while other threads are concurrently +manipulating those objects, resulting in erratic behavior or +deadlock. While this problem could be prevented if the class whose +objects are being finalized were coded to "defend against" this +call, most programmers do not defend against it. They assume +that an object is dead at the time that its finalizer is called. +

      Further, the call is not "thread-safe" in the sense that it sets +a VM-global flag. This forces every class with a finalizer +to defend against the finalization of live objects!

      +

      + + diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java index 3f91060ccc8..a7172138ae8 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java @@ -26,6 +26,7 @@ package java.lang.invoke; import sun.invoke.util.Wrapper; +import static java.lang.invoke.MethodHandleInfo.*; import static sun.invoke.util.Wrapper.forPrimitiveType; import static sun.invoke.util.Wrapper.forWrapperType; import static sun.invoke.util.Wrapper.isWrapperType; @@ -56,11 +57,11 @@ import static sun.invoke.util.Wrapper.isWrapperType; final String samMethodName; // Name of the SAM method "foo" final MethodType samMethodType; // Type of the SAM method "(Object)Object" final MethodHandle implMethod; // Raw method handle for the implementation method + final MethodType implMethodType; // Type of the implMethod MethodHandle "(CC,int)String" final MethodHandleInfo implInfo; // Info about the implementation method handle "MethodHandleInfo[5 CC.impl(int)String]" final int implKind; // Invocation kind for implementation "5"=invokevirtual final boolean implIsInstanceMethod; // Is the implementation an instance method "true" - final Class implDefiningClass; // Type defining the implementation "class CC" - final MethodType implMethodType; // Type of the implementation method "(int)String" + final Class implClass; // Class for referencing the implementation method "class CC" final MethodType instantiatedMethodType; // Instantiated erased functional interface method type "(Integer)Object" final boolean isSerializable; // Should the returned instance be serializable final Class[] markerInterfaces; // Additional marker interfaces to be implemented @@ -128,19 +129,51 @@ import static sun.invoke.util.Wrapper.isWrapperType; this.samMethodType = samMethodType; this.implMethod = implMethod; + this.implMethodType = implMethod.type(); this.implInfo = caller.revealDirect(implMethod); - this.implKind = implInfo.getReferenceKind(); - this.implIsInstanceMethod = - implKind == MethodHandleInfo.REF_invokeVirtual || - implKind == MethodHandleInfo.REF_invokeSpecial || - implKind == MethodHandleInfo.REF_invokeInterface; - this.implDefiningClass = implInfo.getDeclaringClass(); - this.implMethodType = implInfo.getMethodType(); + switch (implInfo.getReferenceKind()) { + case REF_invokeVirtual: + case REF_invokeInterface: + this.implClass = implMethodType.parameterType(0); + // reference kind reported by implInfo may not match implMethodType's first param + // Example: implMethodType is (Cloneable)String, implInfo is for Object.toString + this.implKind = implClass.isInterface() ? REF_invokeInterface : REF_invokeVirtual; + this.implIsInstanceMethod = true; + break; + case REF_invokeSpecial: + // JDK-8172817: should use referenced class here, but we don't know what it was + this.implClass = implInfo.getDeclaringClass(); + this.implKind = REF_invokeSpecial; + this.implIsInstanceMethod = true; + break; + case REF_invokeStatic: + case REF_newInvokeSpecial: + // JDK-8172817: should use referenced class here for invokestatic, but we don't know what it was + this.implClass = implInfo.getDeclaringClass(); + this.implKind = implInfo.getReferenceKind(); + this.implIsInstanceMethod = false; + break; + default: + throw new LambdaConversionException(String.format("Unsupported MethodHandle kind: %s", implInfo)); + } + this.instantiatedMethodType = instantiatedMethodType; this.isSerializable = isSerializable; this.markerInterfaces = markerInterfaces; this.additionalBridges = additionalBridges; + if (samMethodName.isEmpty() || + samMethodName.indexOf('.') >= 0 || + samMethodName.indexOf(';') >= 0 || + samMethodName.indexOf('[') >= 0 || + samMethodName.indexOf('/') >= 0 || + samMethodName.indexOf('<') >= 0 || + samMethodName.indexOf('>') >= 0) { + throw new LambdaConversionException(String.format( + "Method name '%s' is not legal", + samMethodName)); + } + if (!samBase.isInterface()) { throw new LambdaConversionException(String.format( "Functional interface %s is not an interface", @@ -171,24 +204,12 @@ import static sun.invoke.util.Wrapper.isWrapperType; * @throws LambdaConversionException if there are improper conversions */ void validateMetafactoryArgs() throws LambdaConversionException { - switch (implKind) { - case MethodHandleInfo.REF_invokeInterface: - case MethodHandleInfo.REF_invokeVirtual: - case MethodHandleInfo.REF_invokeStatic: - case MethodHandleInfo.REF_newInvokeSpecial: - case MethodHandleInfo.REF_invokeSpecial: - break; - default: - throw new LambdaConversionException(String.format("Unsupported MethodHandle kind: %s", implInfo)); - } - - // Check arity: optional-receiver + captured + SAM == impl + // Check arity: captured + SAM == impl final int implArity = implMethodType.parameterCount(); - final int receiverArity = implIsInstanceMethod ? 1 : 0; final int capturedArity = invokedType.parameterCount(); final int samArity = samMethodType.parameterCount(); final int instantiatedArity = instantiatedMethodType.parameterCount(); - if (implArity + receiverArity != capturedArity + samArity) { + if (implArity != capturedArity + samArity) { throw new LambdaConversionException( String.format("Incorrect number of parameters for %s method %s; %d captured parameters, %d functional interface method parameters, %d implementation parameters", implIsInstanceMethod ? "instance" : "static", implInfo, @@ -209,8 +230,8 @@ import static sun.invoke.util.Wrapper.isWrapperType; } // If instance: first captured arg (receiver) must be subtype of class where impl method is defined - final int capturedStart; - final int samStart; + final int capturedStart; // index of first non-receiver capture parameter in implMethodType + final int samStart; // index of first non-receiver sam parameter in implMethodType if (implIsInstanceMethod) { final Class receiverClass; @@ -223,45 +244,36 @@ import static sun.invoke.util.Wrapper.isWrapperType; } else { // receiver is a captured variable capturedStart = 1; - samStart = 0; + samStart = capturedArity; receiverClass = invokedType.parameterType(0); } // check receiver type - if (!implDefiningClass.isAssignableFrom(receiverClass)) { + if (!implClass.isAssignableFrom(receiverClass)) { throw new LambdaConversionException( String.format("Invalid receiver type %s; not a subtype of implementation type %s", - receiverClass, implDefiningClass)); - } - - Class implReceiverClass = implMethod.type().parameterType(0); - if (implReceiverClass != implDefiningClass && !implReceiverClass.isAssignableFrom(receiverClass)) { - throw new LambdaConversionException( - String.format("Invalid receiver type %s; not a subtype of implementation receiver type %s", - receiverClass, implReceiverClass)); + receiverClass, implClass)); } } else { // no receiver capturedStart = 0; - samStart = 0; + samStart = capturedArity; } // Check for exact match on non-receiver captured arguments - final int implFromCaptured = capturedArity - capturedStart; - for (int i=0; i implParamType = implMethodType.parameterType(i); - Class capturedParamType = invokedType.parameterType(i + capturedStart); + Class capturedParamType = invokedType.parameterType(i); if (!capturedParamType.equals(implParamType)) { throw new LambdaConversionException( String.format("Type mismatch in captured lambda parameter %d: expecting %s, found %s", i, capturedParamType, implParamType)); } } - // Check for adaptation match on SAM arguments - final int samOffset = samStart - implFromCaptured; - for (int i=implFromCaptured; i implParamType = implMethodType.parameterType(i); - Class instantiatedParamType = instantiatedMethodType.parameterType(i + samOffset); + Class instantiatedParamType = instantiatedMethodType.parameterType(i - capturedArity); if (!isAdaptableTo(instantiatedParamType, implParamType, true)) { throw new LambdaConversionException( String.format("Type mismatch for lambda argument %d: %s is not convertible to %s", @@ -271,29 +283,40 @@ import static sun.invoke.util.Wrapper.isWrapperType; // Adaptation match: return type Class expectedType = instantiatedMethodType.returnType(); - Class actualReturnType = - (implKind == MethodHandleInfo.REF_newInvokeSpecial) - ? implDefiningClass - : implMethodType.returnType(); - Class samReturnType = samMethodType.returnType(); + Class actualReturnType = implMethodType.returnType(); if (!isAdaptableToAsReturn(actualReturnType, expectedType)) { throw new LambdaConversionException( String.format("Type mismatch for lambda return: %s is not convertible to %s", actualReturnType, expectedType)); } - if (!isAdaptableToAsReturnStrict(expectedType, samReturnType)) { - throw new LambdaConversionException( - String.format("Type mismatch for lambda expected return: %s is not convertible to %s", - expectedType, samReturnType)); - } + + // Check descriptors of generated methods + checkDescriptor(samMethodType); for (MethodType bridgeMT : additionalBridges) { - if (!isAdaptableToAsReturnStrict(expectedType, bridgeMT.returnType())) { - throw new LambdaConversionException( - String.format("Type mismatch for lambda expected return: %s is not convertible to %s", - expectedType, bridgeMT.returnType())); + checkDescriptor(bridgeMT); + } + } + + /** Validate that the given descriptor's types are compatible with {@code instantiatedMethodType} **/ + private void checkDescriptor(MethodType descriptor) throws LambdaConversionException { + for (int i = 0; i < instantiatedMethodType.parameterCount(); i++) { + Class instantiatedParamType = instantiatedMethodType.parameterType(i); + Class descriptorParamType = descriptor.parameterType(i); + if (!descriptorParamType.isAssignableFrom(instantiatedParamType)) { + String msg = String.format("Type mismatch for instantiated parameter %d: %s is not a subtype of %s", + i, instantiatedParamType, descriptorParamType); + throw new LambdaConversionException(msg); } } - } + + Class instantiatedReturnType = instantiatedMethodType.returnType(); + Class descriptorReturnType = descriptor.returnType(); + if (!isAdaptableToAsReturnStrict(instantiatedReturnType, descriptorReturnType)) { + String msg = String.format("Type mismatch for lambda expected return: %s is not convertible to %s", + instantiatedReturnType, descriptorReturnType); + throw new LambdaConversionException(msg); + } + } /** * Check type adaptability for parameter types. @@ -345,8 +368,8 @@ import static sun.invoke.util.Wrapper.isWrapperType; || !fromType.equals(void.class) && isAdaptableTo(fromType, toType, false); } private boolean isAdaptableToAsReturnStrict(Class fromType, Class toType) { - if (fromType.equals(void.class)) return toType.equals(void.class); - return isAdaptableTo(fromType, toType, true); + if (fromType.equals(void.class) || toType.equals(void.class)) return fromType.equals(toType); + else return isAdaptableTo(fromType, toType, true); } diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/CallSite.java b/jdk/src/java.base/share/classes/java/lang/invoke/CallSite.java index 53899611f59..031e18a759a 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/CallSite.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/CallSite.java @@ -82,6 +82,7 @@ private static CallSite bootstrapDynamic(MethodHandles.Lookup caller, String nam } } * @author John Rose, JSR 292 EG + * @since 1.7 */ abstract public class CallSite { diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/ConstantCallSite.java b/jdk/src/java.base/share/classes/java/lang/invoke/ConstantCallSite.java index f27d0e7bbd2..f7d87ba45ac 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/ConstantCallSite.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/ConstantCallSite.java @@ -30,6 +30,7 @@ package java.lang.invoke; * An {@code invokedynamic} instruction linked to a {@code ConstantCallSite} is permanently * bound to the call site's target. * @author John Rose, JSR 292 EG + * @since 1.7 */ public class ConstantCallSite extends CallSite { private final boolean isFrozen; diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java index 0c814bdd470..35f91cc243b 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java @@ -96,7 +96,6 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; private final String implMethodClassName; // Name of type containing implementation "CC" private final String implMethodName; // Name of implementation method "impl" private final String implMethodDesc; // Type descriptor for implementation methods "(I)Ljava/lang/String;" - private final Class implMethodReturnClass; // class for implementation method return type "Ljava/lang/String;" private final MethodType constructorType; // Generated class constructor type "(CC)void" private final ClassWriter cw; // ASM class writer private final String[] argNames; // Generated names for the constructor arguments @@ -153,12 +152,9 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; super(caller, invokedType, samMethodName, samMethodType, implMethod, instantiatedMethodType, isSerializable, markerInterfaces, additionalBridges); - implMethodClassName = implDefiningClass.getName().replace('.', '/'); + implMethodClassName = implClass.getName().replace('.', '/'); implMethodName = implInfo.getName(); - implMethodDesc = implMethodType.toMethodDescriptorString(); - implMethodReturnClass = (implKind == MethodHandleInfo.REF_newInvokeSpecial) - ? implDefiningClass - : implMethodType.returnType(); + implMethodDesc = implInfo.getMethodType().toMethodDescriptorString(); constructorType = invokedType.changeReturnType(Void.TYPE); lambdaClassName = targetClass.getName().replace('.', '/') + "$$Lambda$" + counter.incrementAndGet(); cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); @@ -467,13 +463,14 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; // Invoke the method we want to forward to visitMethodInsn(invocationOpcode(), implMethodClassName, implMethodName, implMethodDesc, - implDefiningClass.isInterface()); + implClass.isInterface()); // Convert the return value (if any) and return it // Note: if adapting from non-void to void, the 'return' // instruction will pop the unneeded result + Class implReturnClass = implMethodType.returnType(); Class samReturnClass = methodType.returnType(); - convertType(implMethodReturnClass, samReturnClass, samReturnClass); + convertType(implReturnClass, samReturnClass, samReturnClass); visitInsn(getReturnOpcode(samReturnClass)); // Maxs computed by ClassWriter.COMPUTE_MAXS,these arguments ignored visitMaxs(-1, -1); @@ -482,23 +479,13 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; private void convertArgumentTypes(MethodType samType) { int lvIndex = 0; - boolean samIncludesReceiver = implIsInstanceMethod && - invokedType.parameterCount() == 0; - int samReceiverLength = samIncludesReceiver ? 1 : 0; - if (samIncludesReceiver) { - // push receiver - Class rcvrType = samType.parameterType(0); - visitVarInsn(getLoadOpcode(rcvrType), lvIndex + 1); - lvIndex += getParameterSize(rcvrType); - convertType(rcvrType, implDefiningClass, instantiatedMethodType.parameterType(0)); - } int samParametersLength = samType.parameterCount(); - int argOffset = implMethodType.parameterCount() - samParametersLength; - for (int i = samReceiverLength; i < samParametersLength; i++) { + int captureArity = invokedType.parameterCount(); + for (int i = 0; i < samParametersLength; i++) { Class argType = samType.parameterType(i); visitVarInsn(getLoadOpcode(argType), lvIndex + 1); lvIndex += getParameterSize(argType); - convertType(argType, implMethodType.parameterType(argOffset + i), instantiatedMethodType.parameterType(i)); + convertType(argType, implMethodType.parameterType(captureArity + i), instantiatedMethodType.parameterType(i)); } } diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaConversionException.java b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaConversionException.java index e1123da59d8..2dc8f22c01d 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaConversionException.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaConversionException.java @@ -27,6 +27,8 @@ package java.lang.invoke; /** * LambdaConversionException + * + * @since 1.8 */ public class LambdaConversionException extends Exception { private static final long serialVersionUID = 292L + 8L; diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java index b6ef976c515..95719763b0f 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -149,8 +149,12 @@ import java.util.Arrays; * capture argument (corresponding to the receiver) must be non-null. * *

      A type Q is considered adaptable to S as follows: - * + *
      + * + * * + * + * * * * @@ -176,6 +180,7 @@ import java.util.Arrays; *
      for return types: none * * + * *
      adaptable types
      QSLink-time checksInvocation-time checks
      PrimitivePrimitiveQ can be converted to S via a primitive widening conversionCast from Q to S
      * * @apiNote These linkage methods are designed to support the evaluation @@ -211,8 +216,11 @@ import java.util.Arrays; * theory, any method handle could be used. Currently supported are direct method * handles representing invocation of virtual, interface, constructor and static * methods. + * @since 1.8 */ -public class LambdaMetafactory { +public final class LambdaMetafactory { + + private LambdaMetafactory() {} /** Flag for alternate metafactories indicating the lambda object * must be serializable */ diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java b/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java index 97efa4f1066..92ab77cedf4 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java @@ -33,7 +33,6 @@ import java.lang.reflect.Field; import java.lang.reflect.Member; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java index 6265b874175..6e913a84fd9 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java @@ -310,7 +310,7 @@ mh.invokeExact(System.out, "Hello, world."); * throwables locally, rethrowing only those which are legal in the context, * and wrapping ones which are illegal. * - *

      Signature polymorphism

      + *

      Signature polymorphism

      * The unusual compilation and linkage behavior of * {@code invokeExact} and plain {@code invoke} * is referenced by the term signature polymorphism. @@ -404,7 +404,7 @@ mh.invokeExact(System.out, "Hello, world."); * genericity with a Java type parameter.
    • *
    * - *

    Arity limits

    + *

    Arity limits

    * The JVM imposes on all methods and constructors of any kind an absolute * limit of 255 stacked arguments. This limit can appear more restrictive * in certain cases: @@ -423,6 +423,7 @@ mh.invokeExact(System.out, "Hello, world."); * @see MethodType * @see MethodHandles * @author John Rose, JSR 292 EG + * @since 1.7 */ public abstract class MethodHandle { diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java index ad6799acfc9..909f271c672 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -35,7 +35,7 @@ import static java.lang.invoke.MethodHandleStatics.*; * A symbolic reference obtained by cracking a direct method handle * into its consitutent symbolic parts. * To crack a direct method handle, call {@link Lookup#revealDirect Lookup.revealDirect}. - *

    Direct Method Handles

    + *

    Direct Method Handles

    * A direct method handle represents a method, constructor, or field without * any intervening argument bindings or other transformations. * The method, constructor, or field referred to by a direct method handle is called @@ -77,12 +77,16 @@ import static java.lang.invoke.MethodHandleStatics.*; * handle with symbolic information (or caller binding) from an unexpected scope. * Use {@link java.lang.invoke.MethodHandles#reflectAs} to override this limitation. * - *

    Reference kinds

    + *

    Reference kinds

    * The Lookup Factory Methods * correspond to all major use cases for methods, constructors, and fields. * These use cases may be distinguished using small integers as follows: - * + *
    + * + * * + * + * * * * @@ -119,6 +123,7 @@ import static java.lang.invoke.MethodHandleStatics.*; * * * + * *
    reference kinds
    reference kinddescriptive namescopememberbehavior
    {@code 1}{@code REF_getField}{@code class}{@code FT f;}{@code (T) this.f;}{@code 9}{@code REF_invokeInterface}{@code interface}{@code T m(A*);}{@code (T) this.m(arg*);}
    * @since 1.8 */ diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java index 09db4f93512..fce6e0fef01 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java @@ -38,6 +38,8 @@ import static java.lang.invoke.MethodHandleStatics.*; /** * This class consists exclusively of static methods that help adapt * method handles to other JVM types, such as interfaces. + * + * @since 1.7 */ public class MethodHandleProxies { diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java index 16a9e8a941d..df76d3dbbcf 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java @@ -25,8 +25,9 @@ package java.lang.invoke; -import jdk.internal.org.objectweb.asm.ClassWriter; -import jdk.internal.org.objectweb.asm.Opcodes; +import jdk.internal.misc.SharedSecrets; +import jdk.internal.module.IllegalAccessLogger; +import jdk.internal.org.objectweb.asm.ClassReader; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; import jdk.internal.vm.annotation.ForceInline; @@ -42,9 +43,11 @@ import java.lang.reflect.Field; import java.lang.reflect.Member; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.lang.reflect.ReflectPermission; import java.nio.ByteOrder; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.ProtectionDomain; import java.util.ArrayList; import java.util.Arrays; import java.util.BitSet; @@ -109,15 +112,32 @@ public class MethodHandles { return new Lookup(Reflection.getCallerClass()); } + /** + * This reflected$lookup method is the alternate implementation of + * the lookup method when being invoked by reflection. + */ + @CallerSensitive + private static Lookup reflected$lookup() { + Class caller = Reflection.getCallerClass(); + if (caller.getClassLoader() == null) { + throw newIllegalArgumentException("illegal lookupClass: "+caller); + } + return new Lookup(caller); + } + /** * Returns a {@link Lookup lookup object} which is trusted minimally. - * It can only be used to create method handles to public members in + * The lookup has the {@code PUBLIC} and {@code UNCONDITIONAL} modes. + * It can only be used to create method handles to public members of * public classes in packages that are exported unconditionally. *

    - * For now, the {@linkplain Lookup#lookupClass lookup class} of this lookup - * object is in an unnamed module. - * Consequently, the lookup context of this lookup object will be the bootstrap - * class loader, which means it cannot find user classes. + * As a matter of pure convention, the {@linkplain Lookup#lookupClass lookup class} + * of this lookup object will be {@link java.lang.Object}. + * + * @apiNote The use of Object is conventional, and because the lookup modes are + * limited, there is no special access provided to the internals of Object, its package + * or its module. Consequently, the lookup context of this lookup object will be the + * bootstrap class loader, which means it cannot find user classes. * *

    * Discussion: @@ -129,17 +149,12 @@ public class MethodHandles { * Also, it cannot access * caller sensitive methods. * @return a lookup object which is trusted minimally + * + * @revised 9 + * @spec JPMS */ public static Lookup publicLookup() { - // During VM startup then only classes in the java.base module can be - // loaded and linked. This is because java.base exports aren't setup until - // the module system is initialized, hence types in the unnamed module - // (or any named module) can't link to java/lang/Object. - if (!jdk.internal.misc.VM.isModuleSystemInited()) { - return new Lookup(Object.class, Lookup.PUBLIC); - } else { - return LookupHelper.PUBLIC_LOOKUP; - } + return Lookup.PUBLIC_LOOKUP; } /** @@ -172,6 +187,7 @@ public class MethodHandles { * @throws IllegalAccessException if the access check specified above fails * @throws SecurityException if denied by the security manager * @since 9 + * @spec JPMS * @see Lookup#dropLookupMode */ public static Lookup privateLookupIn(Class targetClass, Lookup lookup) throws IllegalAccessException { @@ -183,16 +199,22 @@ public class MethodHandles { throw new IllegalArgumentException(targetClass + " is an array class"); Module targetModule = targetClass.getModule(); Module callerModule = lookup.lookupClass().getModule(); - if (callerModule != targetModule && targetModule.isNamed()) { - if (!callerModule.canRead(targetModule)) - throw new IllegalAccessException(callerModule + " does not read " + targetModule); + if (!callerModule.canRead(targetModule)) + throw new IllegalAccessException(callerModule + " does not read " + targetModule); + if (targetModule.isNamed()) { String pn = targetClass.getPackageName(); - assert pn != null && pn.length() > 0 : "unnamed package cannot be in named module"; + assert pn.length() > 0 : "unnamed package cannot be in named module"; if (!targetModule.isOpen(pn, callerModule)) throw new IllegalAccessException(targetModule + " does not open " + pn + " to " + callerModule); } if ((lookup.lookupModes() & Lookup.MODULE) == 0) throw new IllegalAccessException("lookup does not have MODULE lookup mode"); + if (!callerModule.isNamed() && targetModule.isNamed()) { + IllegalAccessLogger logger = IllegalAccessLogger.illegalAccessLogger(); + if (logger != null) { + logger.logIfOpenedForIllegalAccess(lookup, targetClass); + } + } return new Lookup(targetClass); } @@ -248,7 +270,7 @@ public class MethodHandles { * This includes all methods, constructors, and fields which are allowed to the lookup class, * even private ones. * - *

    Lookup Factory Methods

    + *

    Lookup Factory Methods

    * The factory methods on a {@code Lookup} object correspond to all major * use cases for methods, constructors, and fields. * Each method handle created by a factory method is the functional @@ -256,12 +278,16 @@ public class MethodHandles { * (Bytecode behaviors are described in section 5.4.3.5 of the Java Virtual Machine Specification.) * Here is a summary of the correspondence between these factory methods and * the behavior of the resulting method handles: - * + *
    + * + * * - * + * * * * + * + * * * * @@ -318,6 +344,7 @@ public class MethodHandles { * * * + * *
    lookup method behaviors
    lookup expressionlookup expressionmemberbytecode behavior
    {@link java.lang.invoke.MethodHandles.Lookup#findGetter lookup.findGetter(C.class,"f",FT.class)}{@code FT f;}{@code (T) this.f;}{@link java.lang.invoke.MethodHandles.Lookup#findClass lookup.findClass("C")}{@code class C { ... }}{@code C.class;}
    * * Here, the type {@code C} is the class or interface being searched for a member, @@ -369,7 +396,7 @@ public class MethodHandles { * type having too many parameters. * * - *

    Access checking

    + *

    Access checking

    * Access checks are applied in the factory methods of {@code Lookup}, * when a method handle is created. * This is a key difference from the Core Reflection API, since @@ -474,7 +501,7 @@ public class MethodHandles { * with fewer access modes than the original lookup object. * *

    - * + * * Discussion of private access: * We say that a lookup has private access * if its {@linkplain #lookupModes lookup modes} @@ -497,7 +524,7 @@ public class MethodHandles { * whose bytecode behaviors and Java language access permissions * can be reliably determined and emulated by method handles. * - *

    Security manager interactions

    + *

    Security manager interactions

    * Although bytecode instructions can only refer to classes in * a related class loader, this API can search for methods in any * class, as long as a reference to its {@code Class} object is @@ -556,7 +583,7 @@ public class MethodHandles { * or else that is being accessed from a lookup class that has * rights to access the member or class. * - *

    Caller sensitive methods

    + *

    Caller sensitive methods

    * A small number of Java methods have a special property called caller sensitivity. * A caller-sensitive method can behave differently depending on the * identity of its immediate caller. @@ -601,6 +628,8 @@ public class MethodHandles { * so that there can be a secure foundation for lookups. * Nearly all other methods in the JSR 292 API rely on lookup * objects to check access requests. + * + * @revised 9 */ public static final class Lookup { @@ -647,15 +676,33 @@ public class MethodHandles { * lookup class and public types in packages exported by other modules * to the module of the lookup class. * @since 9 + * @spec JPMS */ public static final int MODULE = PACKAGE << 1; - private static final int ALL_MODES = (PUBLIC | PRIVATE | PROTECTED | PACKAGE | MODULE); + /** A single-bit mask representing {@code unconditional} access + * which may contribute to the result of {@link #lookupModes lookupModes}. + * The value is {@code 0x20}, which does not correspond meaningfully to + * any particular {@linkplain java.lang.reflect.Modifier modifier bit}. + * A {@code Lookup} with this lookup mode assumes {@linkplain + * java.lang.Module#canRead(java.lang.Module) readability}. + * In conjunction with the {@code PUBLIC} modifier bit, a {@code Lookup} + * with this lookup mode can access all public members of public types + * of all modules where the type is in a package that is {@link + * java.lang.Module#isExported(String) exported unconditionally}. + * @since 9 + * @spec JPMS + * @see #publicLookup() + */ + public static final int UNCONDITIONAL = PACKAGE << 2; + + private static final int ALL_MODES = (PUBLIC | PRIVATE | PROTECTED | PACKAGE | MODULE | UNCONDITIONAL); + private static final int FULL_POWER_MODES = (ALL_MODES & ~UNCONDITIONAL); private static final int TRUSTED = -1; private static int fixmods(int mods) { - mods &= (ALL_MODES - PACKAGE - MODULE); - return (mods != 0) ? mods : (PACKAGE | MODULE); + mods &= (ALL_MODES - PACKAGE - MODULE - UNCONDITIONAL); + return (mods != 0) ? mods : (PACKAGE | MODULE | UNCONDITIONAL); } /** Tells which class is performing the lookup. It is this class against @@ -682,13 +729,14 @@ public class MethodHandles { * {@linkplain #PRIVATE PRIVATE (0x02)}, * {@linkplain #PROTECTED PROTECTED (0x04)}, * {@linkplain #PACKAGE PACKAGE (0x08)}, - * and {@linkplain #MODULE MODULE (0x10)}. + * {@linkplain #MODULE MODULE (0x10)}, + * and {@linkplain #UNCONDITIONAL UNCONDITIONAL (0x20)}. *

    * A freshly-created lookup object - * on the {@linkplain java.lang.invoke.MethodHandles#lookup() caller's class} - * has all possible bits set, since the caller class can access all its own members, - * all public types in the caller's module, and all public types in packages exported - * by other modules to the caller's module. + * on the {@linkplain java.lang.invoke.MethodHandles#lookup() caller's class} has + * all possible bits set, except {@code UNCONDITIONAL}. The lookup can be used to + * access all members of the caller's class, all public types in the caller's module, + * and all public types in packages exported by other modules to the caller's module. * A lookup object on a new lookup class * {@linkplain java.lang.invoke.MethodHandles.Lookup#in created from a previous lookup object} * may have some mode bits set to zero. @@ -701,6 +749,9 @@ public class MethodHandles { * @return the lookup modes, which limit the kinds of access performed by this lookup object * @see #in * @see #dropLookupMode + * + * @revised 9 + * @spec JPMS */ public int lookupModes() { return allowedModes & ALL_MODES; @@ -712,9 +763,9 @@ public class MethodHandles { * which in turn is called by a method not in this package. */ Lookup(Class lookupClass) { - this(lookupClass, ALL_MODES); + this(lookupClass, FULL_POWER_MODES); // make sure we haven't accidentally picked up a privileged class: - checkUnprivilegedlookupClass(lookupClass, ALL_MODES); + checkUnprivilegedlookupClass(lookupClass); } private Lookup(Class lookupClass, int allowedModes) { @@ -730,19 +781,20 @@ public class MethodHandles { * However, the resulting {@code Lookup} object is guaranteed * to have no more access capabilities than the original. * In particular, access capabilities can be lost as follows:

      - *
    • If the lookup class for this {@code Lookup} is not in a named module, - * and the new lookup class is in a named module {@code M}, then no members in - * {@code M}'s non-exported packages will be accessible. - *
    • If the lookup for this {@code Lookup} is in a named module, and the - * new lookup class is in a different module {@code M}, then no members, not even - * public members in {@code M}'s exported packages, will be accessible. - *
    • If the new lookup class differs from the old one, - * protected members will not be accessible by virtue of inheritance. - * (Protected members may continue to be accessible because of package sharing.) + *
    • If the old lookup class is in a {@link Module#isNamed() named} module, and + * the new lookup class is in a different module {@code M}, then no members, not + * even public members in {@code M}'s exported packages, will be accessible. + * The exception to this is when this lookup is {@link #publicLookup() + * publicLookup}, in which case {@code PUBLIC} access is not lost. + *
    • If the old lookup class is in an unnamed module, and the new lookup class + * is a different module then {@link #MODULE MODULE} access is lost. + *
    • If the new lookup class differs from the old one then {@code UNCONDITIONAL} is lost. *
    • If the new lookup class is in a different package * than the old one, protected and default (package) members will not be accessible. *
    • If the new lookup class is not within the same package member - * as the old one, private members will not be accessible. + * as the old one, private members will not be accessible, and protected members + * will not be accessible by virtue of inheritance. + * (Protected members may continue to be accessible because of package sharing.) *
    • If the new lookup class is not accessible to the old lookup class, * then no members, not even public members, will be accessible. * (In all other cases, public members will continue to be accessible.) @@ -757,32 +809,34 @@ public class MethodHandles { * @return a lookup object which reports the desired lookup class, or the same object * if there is no change * @throws NullPointerException if the argument is null + * + * @revised 9 + * @spec JPMS */ public Lookup in(Class requestedLookupClass) { Objects.requireNonNull(requestedLookupClass); if (allowedModes == TRUSTED) // IMPL_LOOKUP can make any lookup at all - return new Lookup(requestedLookupClass, ALL_MODES); + return new Lookup(requestedLookupClass, FULL_POWER_MODES); if (requestedLookupClass == this.lookupClass) return this; // keep same capabilities - - int newModes = (allowedModes & (ALL_MODES & ~PROTECTED)); + int newModes = (allowedModes & FULL_POWER_MODES); if (!VerifyAccess.isSameModule(this.lookupClass, requestedLookupClass)) { - // Allowed to teleport from an unnamed to a named module but resulting - // Lookup has no access to module private members - if (this.lookupClass.getModule().isNamed()) { + // Need to drop all access when teleporting from a named module to another + // module. The exception is publicLookup where PUBLIC is not lost. + if (this.lookupClass.getModule().isNamed() + && (this.allowedModes & UNCONDITIONAL) == 0) newModes = 0; - } else { - newModes &= ~MODULE; - } + else + newModes &= ~(MODULE|PACKAGE|PRIVATE|PROTECTED); } if ((newModes & PACKAGE) != 0 && !VerifyAccess.isSamePackage(this.lookupClass, requestedLookupClass)) { - newModes &= ~(PACKAGE|PRIVATE); + newModes &= ~(PACKAGE|PRIVATE|PROTECTED); } // Allow nestmate lookups to be created without special privilege: if ((newModes & PRIVATE) != 0 && !VerifyAccess.isSamePackageMember(this.lookupClass, requestedLookupClass)) { - newModes &= ~PRIVATE; + newModes &= ~(PRIVATE|PROTECTED); } if ((newModes & PUBLIC) != 0 && !VerifyAccess.isClassAccessible(requestedLookupClass, this.lookupClass, allowedModes)) { @@ -791,7 +845,7 @@ public class MethodHandles { newModes = 0; } - checkUnprivilegedlookupClass(requestedLookupClass, newModes); + checkUnprivilegedlookupClass(requestedLookupClass); return new Lookup(requestedLookupClass, newModes); } @@ -801,59 +855,152 @@ public class MethodHandles { * finds members, but with a lookup mode that has lost the given lookup mode. * The lookup mode to drop is one of {@link #PUBLIC PUBLIC}, {@link #MODULE * MODULE}, {@link #PACKAGE PACKAGE}, {@link #PROTECTED PROTECTED} or {@link #PRIVATE PRIVATE}. - * {@link #PROTECTED PROTECTED} is always dropped and so the resulting lookup - * mode will never have this access capability. When dropping {@code PACKAGE} - * then the resulting lookup will not have {@code PACKAGE} or {@code PRIVATE} - * access. When dropping {@code MODULE} then the resulting lookup will not - * have {@code MODULE}, {@code PACKAGE}, or {@code PRIVATE} access. If {@code - * PUBLIC} is dropped then the resulting lookup has no access. + * {@link #PROTECTED PROTECTED} and {@link #UNCONDITIONAL UNCONDITIONAL} are always + * dropped and so the resulting lookup mode will never have these access capabilities. + * When dropping {@code PACKAGE} then the resulting lookup will not have {@code PACKAGE} + * or {@code PRIVATE} access. When dropping {@code MODULE} then the resulting lookup will + * not have {@code MODULE}, {@code PACKAGE}, or {@code PRIVATE} access. If {@code PUBLIC} + * is dropped then the resulting lookup has no access. * @param modeToDrop the lookup mode to drop * @return a lookup object which lacks the indicated mode, or the same object if there is no change * @throws IllegalArgumentException if {@code modeToDrop} is not one of {@code PUBLIC}, - * {@code MODULE}, {@code PACKAGE}, {@code PROTECTED} or {@code PRIVATE} - * @since 9 + * {@code MODULE}, {@code PACKAGE}, {@code PROTECTED}, {@code PRIVATE} or {@code UNCONDITIONAL} * @see MethodHandles#privateLookupIn + * @since 9 */ public Lookup dropLookupMode(int modeToDrop) { int oldModes = lookupModes(); - int newModes = oldModes & ~(modeToDrop | PROTECTED); + int newModes = oldModes & ~(modeToDrop | PROTECTED | UNCONDITIONAL); switch (modeToDrop) { case PUBLIC: newModes &= ~(ALL_MODES); break; case MODULE: newModes &= ~(PACKAGE | PRIVATE); break; case PACKAGE: newModes &= ~(PRIVATE); break; case PROTECTED: - case PRIVATE: break; + case PRIVATE: + case UNCONDITIONAL: break; default: throw new IllegalArgumentException(modeToDrop + " is not a valid mode to drop"); } if (newModes == oldModes) return this; // return self if no change return new Lookup(lookupClass(), newModes); } + /** + * Defines a class to the same class loader and in the same runtime package and + * {@linkplain java.security.ProtectionDomain protection domain} as this lookup's + * {@linkplain #lookupClass() lookup class}. + * + *

      The {@linkplain #lookupModes() lookup modes} for this lookup must include + * {@link #PACKAGE PACKAGE} access as default (package) members will be + * accessible to the class. The {@code PACKAGE} lookup mode serves to authenticate + * that the lookup object was created by a caller in the runtime package (or derived + * from a lookup originally created by suitably privileged code to a target class in + * the runtime package).

      + * + *

      The {@code bytes} parameter is the class bytes of a valid class file (as defined + * by the The Java Virtual Machine Specification) with a class name in the + * same package as the lookup class.

      + * + *

      This method does not run the class initializer. The class initializer may + * run at a later time, as detailed in section 12.4 of the The Java Language + * Specification.

      + * + *

      If there is a security manager, its {@code checkPermission} method is first called + * to check {@code RuntimePermission("defineClass")}.

      + * + * @param bytes the class bytes + * @return the {@code Class} object for the class + * @throws IllegalArgumentException the bytes are for a class in a different package + * to the lookup class + * @throws IllegalAccessException if this lookup does not have {@code PACKAGE} access + * @throws LinkageError if the class is malformed ({@code ClassFormatError}), cannot be + * verified ({@code VerifyError}), is already defined, or another linkage error occurs + * @throws SecurityException if denied by the security manager + * @throws NullPointerException if {@code bytes} is {@code null} + * @since 9 + * @spec JPMS + * @see Lookup#privateLookupIn + * @see Lookup#dropLookupMode + * @see ClassLoader#defineClass(String,byte[],int,int,ProtectionDomain) + */ + public Class defineClass(byte[] bytes) throws IllegalAccessException { + SecurityManager sm = System.getSecurityManager(); + if (sm != null) + sm.checkPermission(new RuntimePermission("defineClass")); + if ((lookupModes() & PACKAGE) == 0) + throw new IllegalAccessException("Lookup does not have PACKAGE access"); + assert (lookupModes() & (MODULE|PUBLIC)) != 0; + + // parse class bytes to get class name (in internal form) + bytes = bytes.clone(); + String name; + try { + ClassReader reader = new ClassReader(bytes); + name = reader.getClassName(); + } catch (RuntimeException e) { + // ASM exceptions are poorly specified + ClassFormatError cfe = new ClassFormatError(); + cfe.initCause(e); + throw cfe; + } + + // get package and class name in binary form + String cn, pn; + int index = name.lastIndexOf('/'); + if (index == -1) { + cn = name; + pn = ""; + } else { + cn = name.replace('/', '.'); + pn = cn.substring(0, index); + } + if (!pn.equals(lookupClass.getPackageName())) { + throw new IllegalArgumentException("Class not in same package as lookup class"); + } + + // invoke the class loader's defineClass method + ClassLoader loader = lookupClass.getClassLoader(); + ProtectionDomain pd = (loader != null) ? lookupClassProtectionDomain() : null; + String source = "__Lookup_defineClass__"; + Class clazz = SharedSecrets.getJavaLangAccess().defineClass(loader, cn, bytes, pd, source); + assert clazz.getClassLoader() == lookupClass.getClassLoader() + && clazz.getPackageName().equals(lookupClass.getPackageName()) + && protectionDomain(clazz) == lookupClassProtectionDomain(); + return clazz; + } + + private ProtectionDomain lookupClassProtectionDomain() { + ProtectionDomain pd = cachedProtectionDomain; + if (pd == null) { + cachedProtectionDomain = pd = protectionDomain(lookupClass); + } + return pd; + } + + private ProtectionDomain protectionDomain(Class clazz) { + PrivilegedAction pa = clazz::getProtectionDomain; + return AccessController.doPrivileged(pa); + } + + // cached protection domain + private volatile ProtectionDomain cachedProtectionDomain; + + // Make sure outer class is initialized first. static { IMPL_NAMES.getClass(); } /** Package-private version of lookup which is trusted. */ static final Lookup IMPL_LOOKUP = new Lookup(Object.class, TRUSTED); - private static void checkUnprivilegedlookupClass(Class lookupClass, int allowedModes) { + /** Version of lookup which is trusted minimally. + * It can only be used to create method handles to publicly accessible + * members in packages that are exported unconditionally. + */ + static final Lookup PUBLIC_LOOKUP = new Lookup(Object.class, (PUBLIC|UNCONDITIONAL)); + + private static void checkUnprivilegedlookupClass(Class lookupClass) { String name = lookupClass.getName(); if (name.startsWith("java.lang.invoke.")) throw newIllegalArgumentException("illegal lookupClass: "+lookupClass); - - // For caller-sensitive MethodHandles.lookup() disallow lookup from - // restricted packages. This a fragile and blunt approach. - // TODO replace with a more formal and less fragile mechanism - // that does not bluntly restrict classes under packages within - // java.base from looking up MethodHandles or VarHandles. - if (allowedModes == ALL_MODES && lookupClass.getClassLoader() == null) { - if ((name.startsWith("java.") && - !name.equals("java.lang.Thread") && - !name.startsWith("java.util.concurrent.")) || - (name.startsWith("sun.") && - !name.startsWith("sun.invoke."))) { - throw newIllegalArgumentException("illegal lookupClass: " + lookupClass); - } - } } /** @@ -866,6 +1013,7 @@ public class MethodHandles { *
        *
      • If no access is allowed, the suffix is "/noaccess". *
      • If only public access to types in exported packages is allowed, the suffix is "/public". + *
      • If only public access and unconditional access are allowed, the suffix is "/publicLookup". *
      • If only public and module access are allowed, the suffix is "/module". *
      • If only public, module and package access are allowed, the suffix is "/package". *
      • If only public, module, package, and private access are allowed, the suffix is "/private". @@ -884,6 +1032,9 @@ public class MethodHandles { * because it requires a direct subclass relationship between * caller and callee.) * @see #in + * + * @revised 9 + * @spec JPMS */ @Override public String toString() { @@ -893,13 +1044,15 @@ public class MethodHandles { return cname + "/noaccess"; case PUBLIC: return cname + "/public"; + case PUBLIC|UNCONDITIONAL: + return cname + "/publicLookup"; case PUBLIC|MODULE: return cname + "/module"; case PUBLIC|MODULE|PACKAGE: return cname + "/package"; - case ALL_MODES & ~PROTECTED: + case FULL_POWER_MODES & ~PROTECTED: return cname + "/private"; - case ALL_MODES: + case FULL_POWER_MODES: return cname; case TRUSTED: return "/trusted"; // internal only; not exported @@ -1292,9 +1445,10 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method } /** - * Produces a VarHandle giving access to non-static fields of type - * {@code T} declared by a receiver class of type {@code R}, supporting - * shape {@code (R : T)}. + * Produces a VarHandle giving access to a non-static field {@code name} + * of type {@code type} declared in a class of type {@code recv}. + * The VarHandle's variable type is {@code type} and it has one + * coordinate type, {@code recv}. *

        * Access checking is performed immediately on behalf of the lookup * class. @@ -1317,7 +1471,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method *

        * If the field is declared {@code volatile} then the returned VarHandle * will override access to the field (effectively ignore the - * {@code volatile} declaration) in accordance to it's specified + * {@code volatile} declaration) in accordance to its specified * access modes. *

        * If the field type is {@code float} or {@code double} then numeric @@ -1413,9 +1567,10 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method } /** - * Produces a VarHandle giving access to a static field of type - * {@code T} declared by a given declaring class, supporting shape - * {@code ((empty) : T)}. + * Produces a VarHandle giving access to a static field {@code name} of + * type {@code type} declared in a class of type {@code decl}. + * The VarHandle's variable type is {@code type} and it has no + * coordinate types. *

        * Access checking is performed immediately on behalf of the lookup * class. @@ -1441,7 +1596,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method *

        * If the field is declared {@code volatile} then the returned VarHandle * will override access to the field (effectively ignore the - * {@code volatile} declaration) in accordance to it's specified + * {@code volatile} declaration) in accordance to its specified * access modes. *

        * If the field type is {@code float} or {@code double} then numeric @@ -1505,7 +1660,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method * (If the trailing array argument is the only argument, * the given receiver value will be bound to it.) *

        - * This is equivalent to the following code: + * This is almost equivalent to the following code, with some differences noted below: *

        {@code
         import static java.lang.invoke.MethodHandles.*;
         import static java.lang.invoke.MethodType.*;
        @@ -1518,7 +1673,10 @@ return mh1;
                  * where {@code defc} is either {@code receiver.getClass()} or a super
                  * type of that class, in which the requested method is accessible
                  * to the lookup class.
        -         * (Note that {@code bindTo} does not preserve variable arity.)
        +         * (Unlike {@code bind}, {@code bindTo} does not preserve variable arity.
        +         * Also, {@code bindTo} may throw a {@code ClassCastException} in instances where {@code bind} would
        +         * throw an {@code IllegalAccessException}, as in the case where the member is {@code protected} and
        +         * the receiver is restricted by {@code findVirtual} to the lookup class.)
                  * @param receiver the object from which the method is accessed
                  * @param name the name of the method
                  * @param type the type of the method, with the receiver argument omitted
        @@ -1536,7 +1694,13 @@ return mh1;
                 public MethodHandle bind(Object receiver, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
                     Class refc = receiver.getClass(); // may get NPE
                     MemberName method = resolveOrFail(REF_invokeSpecial, refc, name, type);
        -            MethodHandle mh = getDirectMethodNoRestrict(REF_invokeSpecial, refc, method, findBoundCallerClass(method));
        +            MethodHandle mh = getDirectMethodNoRestrictInvokeSpecial(refc, method, findBoundCallerClass(method));
        +            if (!mh.type().leadingReferenceParameter().isAssignableFrom(receiver.getClass())) {
        +                throw new IllegalAccessException("The restricted defining class " +
        +                                                 mh.type().leadingReferenceParameter().getName() +
        +                                                 " is not assignable from receiver class " +
        +                                                 receiver.getClass().getName());
        +            }
                     return mh.bindArgumentL(0, receiver).setVarargs(method);
                 }
         
        @@ -1580,6 +1744,7 @@ return mh1;
                     if (refKind == REF_invokeSpecial)
                         refKind = REF_invokeVirtual;
                     assert(method.isMethod());
        +            @SuppressWarnings("deprecation")
                     Lookup lookup = m.isAccessible() ? IMPL_LOOKUP : this;
                     return lookup.getDirectMethodNoSecurityManager(refKind, method.getDeclaringClass(), method, findBoundCallerClass(method));
                 }
        @@ -1662,6 +1827,7 @@ return mh1;
                 public MethodHandle unreflectConstructor(Constructor c) throws IllegalAccessException {
                     MemberName ctor = new MemberName(c);
                     assert(ctor.isConstructor());
        +            @SuppressWarnings("deprecation")
                     Lookup lookup = c.isAccessible() ? IMPL_LOOKUP : this;
                     return lookup.getDirectConstructorNoSecurityManager(ctor.getDeclaringClass(), ctor);
                 }
        @@ -1692,6 +1858,7 @@ return mh1;
                     assert(isSetter
                             ? MethodHandleNatives.refKindIsSetter(field.getReferenceKind())
                             : MethodHandleNatives.refKindIsGetter(field.getReferenceKind()));
        +            @SuppressWarnings("deprecation")
                     Lookup lookup = f.isAccessible() ? IMPL_LOOKUP : this;
                     return lookup.getDirectFieldNoSecurityManager(field.getReferenceKind(), f.getDeclaringClass(), field);
                 }
        @@ -1719,11 +1886,12 @@ return mh1;
                 }
         
                 /**
        -         * Produces a VarHandle that accesses fields of type {@code T} declared
        -         * by a class of type {@code R}, as described by the given reflected
        -         * field.
        -         * If the field is non-static the VarHandle supports a shape of
        -         * {@code (R : T)}, otherwise supports a shape of {@code ((empty) : T)}.
        +         * Produces a VarHandle giving access to a reflected field {@code f}
        +         * of type {@code T} declared in a class of type {@code R}.
        +         * The VarHandle's variable type is {@code T}.
        +         * If the field is non-static the VarHandle has one coordinate type,
        +         * {@code R}.  Otherwise, the field is static, and the VarHandle has no
        +         * coordinate types.
                  * 

        * Access checking is performed immediately on behalf of the lookup * class, regardless of the value of the field's {@code accessible} @@ -1751,7 +1919,7 @@ return mh1; *

        * If the field is declared {@code volatile} then the returned VarHandle * will override access to the field (effectively ignore the - * {@code volatile} declaration) in accordance to it's specified + * {@code volatile} declaration) in accordance to its specified * access modes. *

        * If the field type is {@code float} or {@code double} then numeric @@ -1907,7 +2075,7 @@ return mh1; /** * Returns {@code true} if this lookup has {@code PRIVATE} access. - * @return {@code true} if this lookup has {@code PRIVATE} acesss. + * @return {@code true} if this lookup has {@code PRIVATE} access. * @since 9 */ public boolean hasPrivateAccess() { @@ -2033,9 +2201,9 @@ return mh1; (defc == refc || Modifier.isPublic(refc.getModifiers()))); if (!classOK && (allowedModes & PACKAGE) != 0) { - classOK = (VerifyAccess.isClassAccessible(defc, lookupClass(), ALL_MODES) && + classOK = (VerifyAccess.isClassAccessible(defc, lookupClass(), FULL_POWER_MODES) && (defc == refc || - VerifyAccess.isClassAccessible(refc, lookupClass(), ALL_MODES))); + VerifyAccess.isClassAccessible(refc, lookupClass(), FULL_POWER_MODES))); } if (!classOK) return "class is not public"; @@ -2082,7 +2250,7 @@ return mh1; throw method.makeAccessException("caller class must be a subclass below the method", caller); } MethodType rawType = mh.type(); - if (rawType.parameterType(0) == caller) return mh; + if (caller.isAssignableFrom(rawType.parameterType(0))) return mh; // no need to restrict; already narrow MethodType narrowType = rawType.changeParameterType(0, caller); assert(!mh.isVarargsCollector()); // viewAsType will lose varargs-ness assert(mh.viewAsTypeChecks(narrowType, true)); @@ -2095,11 +2263,11 @@ return mh1; final boolean checkSecurity = true; return getDirectMethodCommon(refKind, refc, method, checkSecurity, doRestrict, callerClass); } - /** Check access and get the requested method, eliding receiver narrowing rules. */ - private MethodHandle getDirectMethodNoRestrict(byte refKind, Class refc, MemberName method, Class callerClass) throws IllegalAccessException { + /** Check access and get the requested method, for invokespecial with no restriction on the application of narrowing rules. */ + private MethodHandle getDirectMethodNoRestrictInvokeSpecial(Class refc, MemberName method, Class callerClass) throws IllegalAccessException { final boolean doRestrict = false; final boolean checkSecurity = true; - return getDirectMethodCommon(refKind, refc, method, checkSecurity, doRestrict, callerClass); + return getDirectMethodCommon(REF_invokeSpecial, refc, method, checkSecurity, doRestrict, callerClass); } /** Check access and get the requested method, eliding security manager checks. */ private MethodHandle getDirectMethodNoSecurityManager(byte refKind, Class refc, MemberName method, Class callerClass) throws IllegalAccessException { @@ -2151,10 +2319,8 @@ return mh1; DirectMethodHandle dmh = DirectMethodHandle.make(refKind, refc, method); MethodHandle mh = dmh; // Optionally narrow the receiver argument to refc using restrictReceiver. - if (doRestrict && - (refKind == REF_invokeSpecial || - (MethodHandleNatives.refKindHasReceiver(refKind) && - restrictProtectedReceiver(method)))) { + if ((doRestrict && refKind == REF_invokeSpecial) || + (MethodHandleNatives.refKindHasReceiver(refKind) && restrictProtectedReceiver(method))) { mh = restrictReceiver(method, dmh, lookupClass()); } mh = maybeBindCaller(method, mh, callerClass); @@ -2347,53 +2513,6 @@ return mh1; static ConcurrentHashMap LOOKASIDE_TABLE = new ConcurrentHashMap<>(); } - /** - * Helper class used to lazily create PUBLIC_LOOKUP with a lookup class - * in an unnamed module. - * - * @see Lookup#publicLookup - */ - private static class LookupHelper { - private static final String UNNAMED = "Unnamed"; - private static final String OBJECT = "java/lang/Object"; - - private static Class createClass() { - try { - ClassWriter cw = new ClassWriter(0); - cw.visit(Opcodes.V1_8, - Opcodes.ACC_FINAL + Opcodes.ACC_SUPER, - UNNAMED, - null, - OBJECT, - null); - cw.visitSource(UNNAMED, null); - cw.visitEnd(); - byte[] bytes = cw.toByteArray(); - ClassLoader loader = new ClassLoader(null) { - @Override - protected Class findClass(String cn) throws ClassNotFoundException { - if (cn.equals(UNNAMED)) - return super.defineClass(UNNAMED, bytes, 0, bytes.length); - throw new ClassNotFoundException(cn); - } - }; - return loader.loadClass(UNNAMED); - } catch (Exception e) { - throw new InternalError(e); - } - } - - private static final Class PUBLIC_LOOKUP_CLASS = createClass(); - - /** - * Lookup that is trusted minimally. It can only be used to create - * method handles to publicly accessible members in exported packages. - * - * @see MethodHandles#publicLookup - */ - static final Lookup PUBLIC_LOOKUP = new Lookup(PUBLIC_LOOKUP_CLASS, Lookup.PUBLIC); - } - /** * Produces a method handle constructing arrays of a desired type. * The return type of the method handle will be the array type. @@ -2461,9 +2580,11 @@ return mh1; } /** - * - * Produces a VarHandle giving access to elements of an array type - * {@code T[]}, supporting shape {@code (T[], int : T)}. + * Produces a VarHandle giving access to elements of an array of type + * {@code arrayClass}. The VarHandle's variable type is the component type + * of {@code arrayClass} and the list of coordinate types is + * {@code (arrayClass, int)}, where the {@code int} coordinate type + * corresponds to an argument that is an index into an array. *

        * Certain access modes of the returned VarHandle are unsupported under * the following conditions: @@ -2518,13 +2639,14 @@ return mh1; /** * Produces a VarHandle giving access to elements of a {@code byte[]} array * viewed as if it were a different primitive array type, such as - * {@code int[]} or {@code long[]}. The shape of the resulting VarHandle is - * {@code (byte[], int : T)}, where the {@code int} coordinate type - * corresponds to an argument that is an index in a {@code byte[]} array, - * and {@code T} is the component type of the given view array class. The - * returned VarHandle accesses bytes at an index in a {@code byte[]} array, - * composing bytes to or from a value of {@code T} according to the given - * endianness. + * {@code int[]} or {@code long[]}. + * The VarHandle's variable type is the component type of + * {@code viewArrayClass} and the list of coordinate types is + * {@code (byte[], int)}, where the {@code int} coordinate type + * corresponds to an argument that is an index into a {@code byte[]} array. + * The returned VarHandle accesses bytes at an index in a {@code byte[]} + * array, composing bytes to or from a value of the component type of + * {@code viewArrayClass} according to the given endianness. *

        * The supported component types (variables types) are {@code short}, * {@code char}, {@code int}, {@code long}, {@code float} and @@ -2602,13 +2724,14 @@ return mh1; * Produces a VarHandle giving access to elements of a {@code ByteBuffer} * viewed as if it were an array of elements of a different primitive * component type to that of {@code byte}, such as {@code int[]} or - * {@code long[]}. The shape of the resulting VarHandle is - * {@code (ByteBuffer, int : T)}, where the {@code int} coordinate type - * corresponds to an argument that is an index in a {@code ByteBuffer}, and - * {@code T} is the component type of the given view array class. The - * returned VarHandle accesses bytes at an index in a {@code ByteBuffer}, - * composing bytes to or from a value of {@code T} according to the given - * endianness. + * {@code long[]}. + * The VarHandle's variable type is the component type of + * {@code viewArrayClass} and the list of coordinate types is + * {@code (ByteBuffer, int)}, where the {@code int} coordinate type + * corresponds to an argument that is an index into a {@code byte[]} array. + * The returned VarHandle accesses bytes at an index in a + * {@code ByteBuffer}, composing bytes to or from a value of the component + * type of {@code viewArrayClass} according to the given endianness. *

        * The supported component types (variables types) are {@code short}, * {@code char}, {@code int}, {@code long}, {@code float} and @@ -4386,7 +4509,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum")); * The init functions can observe initial pre-loop state, in the form {@code (a...)}. * Most clause functions will not need all of this information, but they will be formally connected to it * as if by {@link #dropArguments}. - * + * * More specifically, we shall use the notation {@code (V*)} to express an arbitrary prefix of a full * sequence {@code (V...)} (and likewise for {@code (v*)}, {@code (A*)}, {@code (a*)}). * In that notation, the general form of an init function parameter list @@ -4399,7 +4522,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum")); * met by the inputs to the loop combinator. *

        * Effectively identical sequences: - * + * * A parameter list {@code A} is defined to be effectively identical to another parameter list {@code B} * if {@code A} and {@code B} are identical, or if {@code A} is shorter and is identical with a proper prefix of {@code B}. * When speaking of an unordered set of parameter lists, we say they the set is "effectively identical" diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java index 53e88de34f2..860ef23f019 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java @@ -88,6 +88,7 @@ import sun.invoke.util.VerifyType; * (But the classes need not be initialized, as is the case with a {@code CONSTANT_Class}.) * This loading may occur at any time before the {@code MethodType} object is first derived. * @author John Rose, JSR 292 EG + * @since 1.7 */ public final class MethodType implements java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MutableCallSite.java b/jdk/src/java.base/share/classes/java/lang/invoke/MutableCallSite.java index 6e5d350495d..2d32abde706 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MutableCallSite.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MutableCallSite.java @@ -81,6 +81,7 @@ assertEquals("Wilma, dear?", (String) worker2.invokeExact()); * For target values which will be frequently updated, consider using * a {@linkplain VolatileCallSite volatile call site} instead. * @author John Rose, JSR 292 EG + * @since 1.7 */ public class MutableCallSite extends CallSite { /** diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java b/jdk/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java index d9f94f39e77..0566e6b483e 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java @@ -54,6 +54,7 @@ import java.util.Objects; * lambda actually captured by that class. * * @see LambdaMetafactory + * @since 1.8 */ public final class SerializedLambda implements Serializable { private static final long serialVersionUID = 8025925345765570181L; diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java b/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java index 5d9b3bfe843..83b4d49cd42 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java @@ -108,6 +108,7 @@ package java.lang.invoke; * } * }

        * @author Remi Forax, JSR 292 EG + * @since 1.7 */ public class SwitchPoint { private static final MethodHandle diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java b/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java index 57e3a3f4a3c..e46805538d4 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java @@ -41,7 +41,7 @@ import static java.lang.invoke.MethodHandleStatics.UNSAFE; import static java.lang.invoke.MethodHandleStatics.newInternalError; /** - * A VarHandle is a dynamically typed reference to a variable, or to a + * A VarHandle is a dynamically strongly typed reference to a variable, or to a * parametrically-defined family of variables, including static fields, * non-static fields, array elements, or components of an off-heap data * structure. Access to such variables is supported under various @@ -53,63 +53,76 @@ import static java.lang.invoke.MethodHandleStatics.newInternalError; * *

        A VarHandle has: *

          - *
        • a {@link #varType variable type}, referred to as {@code T}, which is the - * type of variable(s) referenced by this VarHandle; - *
        • a list of {@link #coordinateTypes coordinate types}, referred to as - * {@code CT}, where the types (primitive and reference) are represented by - * {@link Class} objects). A list of arguments corresponding to instances of - * the coordinate types uniquely locates a variable referenced by this - * VarHandle; and - *
        • a shape, that combines the variable type and coordinate types, - * and is declared with the notation {@code (CT : T)}. An empty list of - * coordinate types is declared as {@code (empty)}. + *
        • a {@link #varType variable type} T, the type of every variable referenced + * by this VarHandle; and + *
        • a list of {@link #coordinateTypes coordinate types} + * {@code CT1, CT2, ..., CTn}, the types of coordinate expressions that + * jointly locate a variable referenced by this VarHandle. *
        + * Variable and coordinate types may be primitive or reference, and are + * represented by {@code Class} objects. The list of coordinate types may be + * empty. * *

        Factory methods that produce or {@link java.lang.invoke.MethodHandles.Lookup - * lookup} VarHandle instances document the supported variable type, coordinate - * types, and shape. + * lookup} VarHandle instances document the supported variable type and the list + * of coordinate types. * - * For example, a VarHandle referencing a non-static field will declare a shape - * of {@code (R : T)}, where {@code R} is the receiver type and - * {@code T} is the field type, and where the VarHandle and an instance of the - * receiver type can be utilized to access the field variable. - * A VarHandle referencing array elements will declare a shape of - * {@code (T[], int : T)}, where {@code T[]} is the array type and {@code T} - * its component type, and where the VarHandle, an instance of the array type, - * and an {@code int} index can be utilized to access an array element variable. + *

        Each access mode is associated with one access mode method, a + * signature polymorphic method named + * for the access mode. When an access mode method is invoked on a VarHandle + * instance, the initial arguments to the invocation are coordinate expressions + * that indicate in precisely which object the variable is to be accessed. + * Trailing arguments to the invocation represent values of importance to the + * access mode. For example, the various compare-and-set or compare-and-exchange + * access modes require two trailing arguments for the variable's expected value + * and new value. * - *

        Each access mode is associated with a - * signature polymorphic method of the - * same name, where the VarHandle shape and access mode uniquely determine the - * canonical {@link #accessModeType(AccessMode) access mode type}, - * which in turn determines the matching constraints on a valid symbolic - * type descriptor at the call site of an access mode's method - * invocation. + *

        The arity and types of arguments to the invocation of an access mode + * method are not checked statically. Instead, each access mode method + * specifies an {@link #accessModeType(AccessMode) access mode type}, + * represented as an instance of {@link MethodType}, that serves as a kind of + * method signature against which the arguments are checked dynamically. An + * access mode type gives formal parameter types in terms of the coordinate + * types of a VarHandle instance and the types for values of importance to the + * access mode. An access mode type also gives a return type, often in terms of + * the variable type of a VarHandle instance. When an access mode method is + * invoked on a VarHandle instance, the symbolic type descriptor at the + * call site, the run time types of arguments to the invocation, and the run + * time type of the return value, must match the types + * given in the access mode type. A runtime exception will be thrown if the + * match fails. * - * As such, VarHandles are dynamically and strongly typed. Their arity, - * argument types, and return type of an access mode method invocation are not - * statically checked. If they, and associated values, do not match the arity - * and types of the access mode's type, an exception will be thrown. + * For example, the access mode method {@link #compareAndSet} specifies that if + * its receiver is a VarHandle instance with coordinate types + * {@code CT1, ..., CTn} and variable type {@code T}, then its access mode type + * is {@code (CT1 c1, ..., CTn cn, T expectedValue, T newValue)boolean}. + * Suppose that a VarHandle instance can access array elements, and that its + * coordinate types are {@code String[]} and {@code int} while its variable type + * is {@code String}. The access mode type for {@code compareAndSet} on this + * VarHandle instance would be + * {@code (String[] c1, int c2, String expectedValue, String newValue)boolean}. + * Such a VarHandle instance may produced by the + * {@link MethodHandles#arrayElementVarHandle(Class) array factory method} and + * access array elements as follows: + *

         {@code
        + * String[] sa = ...
        + * VarHandle avh = MethodHandles.arrayElementVarHandle(String[].class);
        + * boolean r = avh.compareAndSet(sa, 10, "expected", "new");
        + * }
        * - * The parameter types of an access mode method type will consist of those that - * are the VarHandles's coordinate types (in order), followed by access mode - * parameter types specific to the access mode. - * - *

        An access mode's method documents the form of its method signature, which - * is derived from the access mode parameter types. The form is declared with - * the notation {@code (CT, P1 p1, P2 p2, ..., PN pn)R}, where {@code CT} is the - * coordinate types (as documented by a VarHandle factory method), {@code P1}, - * {@code P2} and {@code PN} are the first, second and the n'th access mode - * parameters named {@code p1}, {@code p2} and {@code pn} respectively, and - * {@code R} is the return type. - * - * For example, for the generic shape of {@code (CT : T)} the - * {@link #compareAndSet} access mode method documents that its method - * signature is of the form {@code (CT, T expectedValue, T newValue)boolean}, - * where the parameter types named {@code extendedValue} and {@code newValue} - * are the access mode parameter types. If the VarHandle accesses array - * elements with a shape of say {@code (T[], int : T)} then the access mode - * method type is {@code (T[], int, T, T)boolean}. + *

        Access modes control atomicity and consistency properties. + * Plain read ({@code get}) and write ({@code set}) + * accesses are guaranteed to be bitwise atomic only for references + * and for primitive values of at most 32 bits, and impose no observable + * ordering constraints with respect to threads other than the + * executing thread. Opaque operations are bitwise atomic and + * coherently ordered with respect to accesses to the same variable. + * In addition to obeying Opaque properties, Acquire mode + * reads and their subsequent accesses are ordered after matching + * Release mode writes and their previous accesses. In + * addition to obeying Acquire and Release properties, all + * Volatile operations are totally ordered with respect to + * each other. * *

        Access modes are grouped into the following categories: *

          @@ -172,10 +185,10 @@ import static java.lang.invoke.MethodHandleStatics.newInternalError; * lookup} VarHandle instances document the set of access modes that are * supported, which may also include documenting restrictions based on the * variable type and whether a variable is read-only. If an access mode is not - * supported then the corresponding signature-polymorphic method will on - * invocation throw an {@code UnsupportedOperationException}. Factory methods - * should document any additional undeclared exceptions that may be thrown by - * access mode methods. + * supported then the corresponding access mode method will on invocation throw + * an {@code UnsupportedOperationException}. Factory methods should document + * any additional undeclared exceptions that may be thrown by access mode + * methods. * The {@link #get get} access mode is supported for all * VarHandle instances and the corresponding method never throws * {@code UnsupportedOperationException}. @@ -215,7 +228,7 @@ import static java.lang.invoke.MethodHandleStatics.newInternalError; * precise phrasing of the specification of access mode methods and memory fence * methods may accompany future updates of the Java Language Specification. * - *

          Compilation of an access mode's method

          + *

          Compiling invocation of access mode methods

          * A Java method call expression naming an access mode method can invoke a * VarHandle from Java source code. From the viewpoint of source code, these * methods can take any arguments and their polymorphic result (if expressed) @@ -247,7 +260,7 @@ import static java.lang.invoke.MethodHandleStatics.newInternalError; * except the null reference. * * - *

          Invocation of an access mode's method

          + *

          Performing invocation of access mode methods

          * The first time an {@code invokevirtual} instruction is executed it is linked * by symbolically resolving the names in the instruction and verifying that * the method call is statically legal. This also holds for calls to access mode @@ -264,38 +277,31 @@ import static java.lang.invoke.MethodHandleStatics.newInternalError; * invoking is not present on the individual VarHandle being invoked. * *

          - * Invocation of an access mode's signature-polymorphic method behaves as if an - * invocation of {@link MethodHandle#invoke}, where the receiving method handle - * is bound to a VarHandle instance and the access mode. More specifically, the - * following: + * Invocation of an access mode method behaves as if an invocation of + * {@link MethodHandle#invoke}, where the receiving method handle accepts the + * VarHandle instance as the leading argument. More specifically, the + * following, where {@code {access-mode}} corresponds to the access mode method + * name: *

           {@code
            * VarHandle vh = ..
            * R r = (R) vh.{access-mode}(p1, p2, ..., pN);
            * }
          - * behaves as if (modulo the access mode methods do not declare throwing of - * {@code Throwable}): + * behaves as if: *
           {@code
            * VarHandle vh = ..
          + * VarHandle.AccessMode am = VarHandle.AccessMode.valueFromMethodName("{access-mode}");
            * MethodHandle mh = MethodHandles.varHandleExactInvoker(
          - *                       VarHandle.AccessMode.{access-mode},
          - *                       vh.accessModeType(VarHandle.AccessMode.{access-mode}));
          + *                       am,
          + *                       vh.accessModeType(am));
            *
          - * mh = mh.bindTo(vh);
          - * R r = (R) mh.invoke(p1, p2, ..., pN)
          + * R r = (R) mh.invoke(vh, p1, p2, ..., pN)
            * }
          - * or, more concisely, behaves as if: - *
           {@code
          - * VarHandle vh = ..
          - * MethodHandle mh = vh.toMethodHandle(VarHandle.AccessMode.{access-mode});
          - *
          - * R r = (R) mh.invoke(p1, p2, ..., pN)
          - * }
          - * In terms of equivalent {@code invokevirtual} bytecode behaviour an access - * mode method invocation is equivalent to: + * (modulo access mode methods do not declare throwing of {@code Throwable}). + * This is equivalent to: *
           {@code
            * MethodHandle mh = MethodHandles.lookup().findVirtual(
            *                       VarHandle.class,
          - *                       VarHandle.AccessMode.{access-mode}.methodName(),
          + *                       "{access-mode}",
            *                       MethodType.methodType(R, p1, p2, ..., pN));
            *
            * R r = (R) mh.invokeExact(vh, p1, p2, ..., pN)
          @@ -306,6 +312,17 @@ import static java.lang.invoke.MethodHandleStatics.newInternalError;
            * widen primitive values, as if by {@link MethodHandle#asType asType} (see also
            * {@link MethodHandles#varHandleInvoker}).
            *
          + * More concisely, such behaviour is equivalent to:
          + * 
           {@code
          + * VarHandle vh = ..
          + * VarHandle.AccessMode am = VarHandle.AccessMode.valueFromMethodName("{access-mode}");
          + * MethodHandle mh = vh.toMethodHandle(am);
          + *
          + * R r = (R) mh.invoke(p1, p2, ..., pN)
          + * }
          + * Where, in this case, the method handle is bound to the VarHandle instance. + * + * *

          Invocation checking

          * In typical programs, VarHandle access mode type matching will usually * succeed. But if a match fails, the JVM will throw a @@ -439,7 +456,7 @@ public abstract class VarHandle { * if the variable was declared non-{@code volatile}. Commonly referred to * as plain read access. * - *

          The method signature is of the form {@code (CT)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}. * *

          The symbolic type descriptor at the call site of {@code get} * must match the access mode type that is the result of calling @@ -449,15 +466,15 @@ public abstract class VarHandle { * throws {@code UnsupportedOperationException}. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT)} + * {@code (CT1 ct1, ..., CTn)} * , statically represented using varargs. * @return the signature-polymorphic result that is the value of the * variable * , statically represented using {@code Object}. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @@ -469,21 +486,21 @@ public abstract class VarHandle { * semantics of setting as if the variable was declared non-{@code volatile} * and non-{@code final}. Commonly referred to as plain write access. * - *

          The method signature is of the form {@code (CT, T newValue)void} + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void} * *

          The symbolic type descriptor at the call site of {@code set} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.SET)} on this VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @@ -497,7 +514,7 @@ public abstract class VarHandle { * Returns the value of a variable, with memory semantics of reading as if * the variable was declared {@code volatile}. * - *

          The method signature is of the form {@code (CT)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}. * *

          The symbolic type descriptor at the call site of {@code getVolatile} * must match the access mode type that is the result of calling @@ -505,17 +522,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT)} + * {@code (CT1 ct1, ..., CTn ctn)} * , statically represented using varargs. * @return the signature-polymorphic result that is the value of the * variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @@ -526,7 +543,7 @@ public abstract class VarHandle { * Sets the value of a variable to the {@code newValue}, with memory * semantics of setting as if the variable was declared {@code volatile}. * - *

          The method signature is of the form {@code (CT, T newValue)void}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void}. * *

          The symbolic type descriptor at the call site of {@code setVolatile} * must match the access mode type that is the result of calling @@ -538,14 +555,14 @@ public abstract class VarHandle { * memory ordering effects compatible with {@code memory_order_seq_cst}. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @@ -557,7 +574,7 @@ public abstract class VarHandle { * Returns the value of a variable, accessed in program order, but with no * assurance of memory ordering effects with respect to other threads. * - *

          The method signature is of the form {@code (CT)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}. * *

          The symbolic type descriptor at the call site of {@code getOpaque} * must match the access mode type that is the result of calling @@ -565,17 +582,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT)} + * {@code (CT1 ct1, ..., CTn ctn)} * , statically represented using varargs. * @return the signature-polymorphic result that is the value of the * variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @@ -587,7 +604,7 @@ public abstract class VarHandle { * but with no assurance of memory ordering effects with respect to other * threads. * - *

          The method signature is of the form {@code (CT, T newValue)void}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void}. * *

          The symbolic type descriptor at the call site of {@code setOpaque} * must match the access mode type that is the result of calling @@ -595,14 +612,14 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @@ -616,7 +633,7 @@ public abstract class VarHandle { * Returns the value of a variable, and ensures that subsequent loads and * stores are not reordered before this access. * - *

          The method signature is of the form {@code (CT)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}. * *

          The symbolic type descriptor at the call site of {@code getAcquire} * must match the access mode type that is the result of calling @@ -629,17 +646,17 @@ public abstract class VarHandle { * ordering. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT)} + * {@code (CT1 ct1, ..., CTn ctn)} * , statically represented using varargs. * @return the signature-polymorphic result that is the value of the * variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @@ -650,7 +667,7 @@ public abstract class VarHandle { * Sets the value of a variable to the {@code newValue}, and ensures that * prior loads and stores are not reordered after this access. * - *

          The method signature is of the form {@code (CT, T newValue)void}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void}. * *

          The symbolic type descriptor at the call site of {@code setRelease} * must match the access mode type that is the result of calling @@ -663,14 +680,14 @@ public abstract class VarHandle { * ordering. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @@ -687,7 +704,7 @@ public abstract class VarHandle { * {@code expectedValue}, as accessed with the memory semantics of * {@link #getVolatile}. * - *

          The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}. * *

          The symbolic type descriptor at the call site of {@code * compareAndSet} must match the access mode type that is the result of @@ -695,16 +712,16 @@ public abstract class VarHandle { * this VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T expectedValue, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return {@code true} if successful, otherwise {@code false} if the * witness value was not the same as the {@code expectedValue}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -720,7 +737,7 @@ public abstract class VarHandle { * {@code expectedValue}, as accessed with the memory semantics of * {@link #getVolatile}. * - *

          The method signature is of the form {@code (CT, T expectedValue, T newValue)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)T}. * *

          The symbolic type descriptor at the call site of {@code * compareAndExchange} @@ -729,7 +746,7 @@ public abstract class VarHandle { * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T expectedValue, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the witness value, which * will be the same as the {@code expectedValue} if successful @@ -755,7 +772,7 @@ public abstract class VarHandle { * {@code expectedValue}, as accessed with the memory semantics of * {@link #getAcquire}. * - *

          The method signature is of the form {@code (CT, T expectedValue, T newValue)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)T}. * *

          The symbolic type descriptor at the call site of {@code * compareAndExchangeAcquire} @@ -764,17 +781,17 @@ public abstract class VarHandle { * this VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T expectedValue, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the witness value, which * will be the same as the {@code expectedValue} if successful * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #getAcquire(Object...) */ @@ -790,7 +807,7 @@ public abstract class VarHandle { * {@code expectedValue}, as accessed with the memory semantics of * {@link #get}. * - *

          The method signature is of the form {@code (CT, T expectedValue, T newValue)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)T}. * *

          The symbolic type descriptor at the call site of {@code * compareAndExchangeRelease} @@ -799,17 +816,17 @@ public abstract class VarHandle { * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T expectedValue, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the witness value, which * will be the same as the {@code expectedValue} if successful * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setRelease(Object...) * @see #get(Object...) */ @@ -830,7 +847,7 @@ public abstract class VarHandle { *

          This operation may fail spuriously (typically, due to memory * contention) even if the witness value does match the expected value. * - *

          The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}. * *

          The symbolic type descriptor at the call site of {@code * weakCompareAndSetPlain} must match the access mode type that is the result of @@ -838,17 +855,17 @@ public abstract class VarHandle { * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T expectedValue, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return {@code true} if successful, otherwise {@code false} if the * witness value was not the same as the {@code expectedValue} or if this * operation spuriously failed. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #get(Object...) */ @@ -867,7 +884,7 @@ public abstract class VarHandle { *

          This operation may fail spuriously (typically, due to memory * contention) even if the witness value does match the expected value. * - *

          The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}. * *

          The symbolic type descriptor at the call site of {@code * weakCompareAndSet} must match the access mode type that is the @@ -875,17 +892,17 @@ public abstract class VarHandle { * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T expectedValue, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return {@code true} if successful, otherwise {@code false} if the * witness value was not the same as the {@code expectedValue} or if this * operation spuriously failed. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -904,7 +921,7 @@ public abstract class VarHandle { *

          This operation may fail spuriously (typically, due to memory * contention) even if the witness value does match the expected value. * - *

          The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}. * *

          The symbolic type descriptor at the call site of {@code * weakCompareAndSetAcquire} @@ -913,17 +930,17 @@ public abstract class VarHandle { * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T expectedValue, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return {@code true} if successful, otherwise {@code false} if the * witness value was not the same as the {@code expectedValue} or if this * operation spuriously failed. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #getAcquire(Object...) */ @@ -942,7 +959,7 @@ public abstract class VarHandle { *

          This operation may fail spuriously (typically, due to memory * contention) even if the witness value does match the expected value. * - *

          The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}. * *

          The symbolic type descriptor at the call site of {@code * weakCompareAndSetRelease} @@ -951,17 +968,17 @@ public abstract class VarHandle { * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T expectedValue, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return {@code true} if successful, otherwise {@code false} if the * witness value was not the same as the {@code expectedValue} or if this * operation spuriously failed. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setRelease(Object...) * @see #get(Object...) */ @@ -976,7 +993,7 @@ public abstract class VarHandle { * previous value, as accessed with the memory semantics of * {@link #getVolatile}. * - *

          The method signature is of the form {@code (CT, T newValue)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)T}. * *

          The symbolic type descriptor at the call site of {@code getAndSet} * must match the access mode type that is the result of calling @@ -984,17 +1001,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -1009,7 +1026,7 @@ public abstract class VarHandle { * previous value, as accessed with the memory semantics of * {@link #getAcquire}. * - *

          The method signature is of the form {@code (CT, T newValue)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)T}. * *

          The symbolic type descriptor at the call site of {@code getAndSetAcquire} * must match the access mode type that is the result of calling @@ -1017,17 +1034,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -1042,7 +1059,7 @@ public abstract class VarHandle { * previous value, as accessed with the memory semantics of * {@link #get}. * - *

          The method signature is of the form {@code (CT, T newValue)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)T}. * *

          The symbolic type descriptor at the call site of {@code getAndSetRelease} * must match the access mode type that is the result of calling @@ -1050,17 +1067,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T newValue)} + * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -1078,7 +1095,7 @@ public abstract class VarHandle { * previous value, as accessed with the memory semantics of * {@link #getVolatile}. * - *

          The method signature is of the form {@code (CT, T value)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T value)T}. * *

          The symbolic type descriptor at the call site of {@code getAndAdd} * must match the access mode type that is the result of calling @@ -1086,17 +1103,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T value)} + * {@code (CT1 ct1, ..., CTn ctn, T value)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -1111,7 +1128,7 @@ public abstract class VarHandle { * previous value, as accessed with the memory semantics of * {@link #getAcquire}. * - *

          The method signature is of the form {@code (CT, T value)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T value)T}. * *

          The symbolic type descriptor at the call site of {@code getAndAddAcquire} * must match the access mode type that is the result of calling @@ -1119,17 +1136,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T value)} + * {@code (CT1 ct1, ..., CTn ctn, T value)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -1144,7 +1161,7 @@ public abstract class VarHandle { * previous value, as accessed with the memory semantics of * {@link #get}. * - *

          The method signature is of the form {@code (CT, T value)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T value)T}. * *

          The symbolic type descriptor at the call site of {@code getAndAddRelease} * must match the access mode type that is the result of calling @@ -1152,17 +1169,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T value)} + * {@code (CT1 ct1, ..., CTn ctn, T value)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -1185,7 +1202,7 @@ public abstract class VarHandle { *

          If the variable type is the non-integral {@code boolean} type then a * logical OR is performed instead of a bitwise OR. * - *

          The method signature is of the form {@code (CT, T mask)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * *

          The symbolic type descriptor at the call site of {@code getAndBitwiseOr} * must match the access mode type that is the result of calling @@ -1193,17 +1210,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T mask)} + * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -1222,7 +1239,7 @@ public abstract class VarHandle { *

          If the variable type is the non-integral {@code boolean} type then a * logical OR is performed instead of a bitwise OR. * - *

          The method signature is of the form {@code (CT, T mask)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * *

          The symbolic type descriptor at the call site of {@code getAndBitwiseOrAcquire} * must match the access mode type that is the result of calling @@ -1230,17 +1247,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T mask)} + * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #getAcquire(Object...) */ @@ -1259,7 +1276,7 @@ public abstract class VarHandle { *

          If the variable type is the non-integral {@code boolean} type then a * logical OR is performed instead of a bitwise OR. * - *

          The method signature is of the form {@code (CT, T mask)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * *

          The symbolic type descriptor at the call site of {@code getAndBitwiseOrRelease} * must match the access mode type that is the result of calling @@ -1267,17 +1284,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T mask)} + * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setRelease(Object...) * @see #get(Object...) */ @@ -1296,7 +1313,7 @@ public abstract class VarHandle { *

          If the variable type is the non-integral {@code boolean} type then a * logical AND is performed instead of a bitwise AND. * - *

          The method signature is of the form {@code (CT, T mask)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * *

          The symbolic type descriptor at the call site of {@code getAndBitwiseAnd} * must match the access mode type that is the result of calling @@ -1304,17 +1321,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T mask)} + * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -1333,7 +1350,7 @@ public abstract class VarHandle { *

          If the variable type is the non-integral {@code boolean} type then a * logical AND is performed instead of a bitwise AND. * - *

          The method signature is of the form {@code (CT, T mask)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * *

          The symbolic type descriptor at the call site of {@code getAndBitwiseAndAcquire} * must match the access mode type that is the result of calling @@ -1341,17 +1358,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T mask)} + * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #getAcquire(Object...) */ @@ -1370,7 +1387,7 @@ public abstract class VarHandle { *

          If the variable type is the non-integral {@code boolean} type then a * logical AND is performed instead of a bitwise AND. * - *

          The method signature is of the form {@code (CT, T mask)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * *

          The symbolic type descriptor at the call site of {@code getAndBitwiseAndRelease} * must match the access mode type that is the result of calling @@ -1378,17 +1395,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T mask)} + * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setRelease(Object...) * @see #get(Object...) */ @@ -1407,7 +1424,7 @@ public abstract class VarHandle { *

          If the variable type is the non-integral {@code boolean} type then a * logical XOR is performed instead of a bitwise XOR. * - *

          The method signature is of the form {@code (CT, T mask)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * *

          The symbolic type descriptor at the call site of {@code getAndBitwiseXor} * must match the access mode type that is the result of calling @@ -1415,17 +1432,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T mask)} + * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ @@ -1444,7 +1461,7 @@ public abstract class VarHandle { *

          If the variable type is the non-integral {@code boolean} type then a * logical XOR is performed instead of a bitwise XOR. * - *

          The method signature is of the form {@code (CT, T mask)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * *

          The symbolic type descriptor at the call site of {@code getAndBitwiseXorAcquire} * must match the access mode type that is the result of calling @@ -1452,17 +1469,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T mask)} + * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #getAcquire(Object...) */ @@ -1481,7 +1498,7 @@ public abstract class VarHandle { *

          If the variable type is the non-integral {@code boolean} type then a * logical XOR is performed instead of a bitwise XOR. * - *

          The method signature is of the form {@code (CT, T mask)T}. + *

          The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * *

          The symbolic type descriptor at the call site of {@code getAndBitwiseXorRelease} * must match the access mode type that is the result of calling @@ -1489,17 +1506,17 @@ public abstract class VarHandle { * VarHandle. * * @param args the signature-polymorphic parameter list of the form - * {@code (CT, T mask)} + * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. - * @throws WrongMethodTypeException if the access mode type is not - * compatible with the caller's symbolic type descriptor. - * @throws ClassCastException if the access mode type is compatible with the - * caller's symbolic type descriptor, but a reference cast fails. + * @throws WrongMethodTypeException if the access mode type does not + * match the caller's symbolic type descriptor. + * @throws ClassCastException if the access mode type matches the caller's + * symbolic type descriptor, but a reference cast fails. * @see #setRelease(Object...) * @see #get(Object...) */ @@ -1790,7 +1807,7 @@ public abstract class VarHandle { /** * Returns the {@code VarHandle} signature-polymorphic method name - * associated with this {@code AccessMode} value + * associated with this {@code AccessMode} value. * * @return the signature-polymorphic method name * @see #valueFromMethodName @@ -1861,14 +1878,13 @@ public abstract class VarHandle { } /** - * Obtains the canonical access mode type for this VarHandle and a given - * access mode. + * Obtains the access mode type for this VarHandle and a given access mode. * *

          The access mode type's parameter types will consist of a prefix that * is the coordinate types of this VarHandle followed by further - * types as defined by the access mode's method. + * types as defined by the access mode method. * The access mode type's return type is defined by the return type of the - * access mode's method. + * access mode method. * * @param accessMode the access mode, corresponding to the * signature-polymorphic method of the same name @@ -1891,7 +1907,7 @@ public abstract class VarHandle { * *

          The return of a {@code false} value for a given access mode indicates * that an {@code UnsupportedOperationException} is thrown on invocation - * of the corresponding access mode's signature-polymorphic method. + * of the corresponding access mode method. * * @param accessMode the access mode, corresponding to the * signature-polymorphic method of the same name @@ -1908,7 +1924,7 @@ public abstract class VarHandle { * * @apiNote This method, for a VarHandle {@code vh} and access mode * {@code {access-mode}}, returns a method handle that is equivalent to - * method handle {@code bhm} in the following code (though it may be more + * method handle {@code bmh} in the following code (though it may be more * efficient): *

          {@code
                * MethodHandle mh = MethodHandles.varHandleExactInvoker(
          diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/VolatileCallSite.java b/jdk/src/java.base/share/classes/java/lang/invoke/VolatileCallSite.java
          index de88f36bbb3..1046e72edf6 100644
          --- a/jdk/src/java.base/share/classes/java/lang/invoke/VolatileCallSite.java
          +++ b/jdk/src/java.base/share/classes/java/lang/invoke/VolatileCallSite.java
          @@ -40,6 +40,7 @@ package java.lang.invoke;
            * with {@code MutableCallSite}.
            * @see MutableCallSite
            * @author John Rose, JSR 292 EG
          + * @since 1.7
            */
           public class VolatileCallSite extends CallSite {
               /**
          diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template
          index 634d64d8327..71419c36548 100644
          --- a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template
          +++ b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template
          @@ -1,5 +1,5 @@
           /*
          - * Copyright (c) 2015, 2016, 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
          @@ -125,7 +125,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static boolean compareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
          -            return UNSAFE.compareAndSwap$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
          +            return UNSAFE.compareAndSet$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -133,7 +133,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static $type$ compareAndExchange(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
          -            return UNSAFE.compareAndExchange$Type$Volatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
          +            return UNSAFE.compareAndExchange$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -157,7 +157,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static boolean weakCompareAndSetPlain(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
          -            return UNSAFE.weakCompareAndSwap$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
          +            return UNSAFE.weakCompareAndSet$Type$Plain(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -165,7 +165,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
          -            return UNSAFE.weakCompareAndSwap$Type$Volatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
          +            return UNSAFE.weakCompareAndSet$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -173,7 +173,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static boolean weakCompareAndSetAcquire(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
          -            return UNSAFE.weakCompareAndSwap$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
          +            return UNSAFE.weakCompareAndSet$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -181,7 +181,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static boolean weakCompareAndSetRelease(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
          -            return UNSAFE.weakCompareAndSwap$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
          +            return UNSAFE.weakCompareAndSet$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -275,7 +275,7 @@ final class VarHandle$Type$s {
                                                  handle.fieldOffset,
                                                  value);
                   }
          -        
          +
                   @ForceInline
                   static $type$ getAndBitwiseXor(FieldInstanceReadWrite handle, Object holder, $type$ value) {
                       return UNSAFE.getAndBitwiseXor$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
          @@ -392,7 +392,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static boolean compareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
          -            return UNSAFE.compareAndSwap$Type$(handle.base,
          +            return UNSAFE.compareAndSet$Type$(handle.base,
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -401,7 +401,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static $type$ compareAndExchange(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
          -            return UNSAFE.compareAndExchange$Type$Volatile(handle.base,
          +            return UNSAFE.compareAndExchange$Type$(handle.base,
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -425,7 +425,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static boolean weakCompareAndSetPlain(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
          -            return UNSAFE.weakCompareAndSwap$Type$(handle.base,
          +            return UNSAFE.weakCompareAndSet$Type$Plain(handle.base,
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -433,7 +433,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
          -            return UNSAFE.weakCompareAndSwap$Type$Volatile(handle.base,
          +            return UNSAFE.weakCompareAndSet$Type$(handle.base,
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -441,7 +441,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static boolean weakCompareAndSetAcquire(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
          -            return UNSAFE.weakCompareAndSwap$Type$Acquire(handle.base,
          +            return UNSAFE.weakCompareAndSet$Type$Acquire(handle.base,
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -449,7 +449,7 @@ final class VarHandle$Type$s {
           
                   @ForceInline
                   static boolean weakCompareAndSetRelease(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
          -            return UNSAFE.weakCompareAndSwap$Type$Release(handle.base,
          +            return UNSAFE.weakCompareAndSet$Type$Release(handle.base,
                                                          handle.fieldOffset,
                                                          {#if[Object]?handle.fieldType.cast(expected):expected},
                                                          {#if[Object]?handle.fieldType.cast(value):value});
          @@ -689,7 +689,7 @@ final class VarHandle$Type$s {
           #else[Object]
                       $type$[] array = ($type$[]) oarray;
           #end[Object]
          -            return UNSAFE.compareAndSwap$Type$(array,
          +            return UNSAFE.compareAndSet$Type$(array,
                               (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                               {#if[Object]?handle.componentType.cast(expected):expected},
                               {#if[Object]?handle.componentType.cast(value):value});
          @@ -702,7 +702,7 @@ final class VarHandle$Type$s {
           #else[Object]
                       $type$[] array = ($type$[]) oarray;
           #end[Object]
          -            return UNSAFE.compareAndExchange$Type$Volatile(array,
          +            return UNSAFE.compareAndExchange$Type$(array,
                               (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                               {#if[Object]?handle.componentType.cast(expected):expected},
                               {#if[Object]?handle.componentType.cast(value):value});
          @@ -741,7 +741,7 @@ final class VarHandle$Type$s {
           #else[Object]
                       $type$[] array = ($type$[]) oarray;
           #end[Object]
          -            return UNSAFE.weakCompareAndSwap$Type$(array,
          +            return UNSAFE.weakCompareAndSet$Type$Plain(array,
                               (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                               {#if[Object]?handle.componentType.cast(expected):expected},
                               {#if[Object]?handle.componentType.cast(value):value});
          @@ -754,7 +754,7 @@ final class VarHandle$Type$s {
           #else[Object]
                       $type$[] array = ($type$[]) oarray;
           #end[Object]
          -            return UNSAFE.weakCompareAndSwap$Type$Volatile(array,
          +            return UNSAFE.weakCompareAndSet$Type$(array,
                               (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                               {#if[Object]?handle.componentType.cast(expected):expected},
                               {#if[Object]?handle.componentType.cast(value):value});
          @@ -767,7 +767,7 @@ final class VarHandle$Type$s {
           #else[Object]
                       $type$[] array = ($type$[]) oarray;
           #end[Object]
          -            return UNSAFE.weakCompareAndSwap$Type$Acquire(array,
          +            return UNSAFE.weakCompareAndSet$Type$Acquire(array,
                               (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                               {#if[Object]?handle.componentType.cast(expected):expected},
                               {#if[Object]?handle.componentType.cast(value):value});
          @@ -780,7 +780,7 @@ final class VarHandle$Type$s {
           #else[Object]
                       $type$[] array = ($type$[]) oarray;
           #end[Object]
          -            return UNSAFE.weakCompareAndSwap$Type$Release(array,
          +            return UNSAFE.weakCompareAndSet$Type$Release(array,
                               (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                               {#if[Object]?handle.componentType.cast(expected):expected},
                               {#if[Object]?handle.componentType.cast(value):value});
          @@ -897,7 +897,7 @@ final class VarHandle$Type$s {
                                                  (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                                  value);
                   }
          -        
          +
                   @ForceInline
                   static $type$ getAndBitwiseXor(Array handle, Object oarray, int index, $type$ value) {
                       $type$[] array = ($type$[]) oarray;
          diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template
          index da57311e39d..e85fd913406 100644
          --- a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template
          +++ b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template
          @@ -1,5 +1,5 @@
           /*
          - * Copyright (c) 2015, 2016, 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
          @@ -186,7 +186,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   @ForceInline
                   static boolean compareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
                       byte[] ba = (byte[]) oba;
          -            return UNSAFE.compareAndSwap$RawType$(
          +            return UNSAFE.compareAndSet$RawType$(
                               ba,
                               address(ba, index(ba, index)),
                               convEndian(handle.be, expected), convEndian(handle.be, value));
          @@ -196,7 +196,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   static $type$ compareAndExchange(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
                       byte[] ba = (byte[]) oba;
                       return convEndian(handle.be,
          -                              UNSAFE.compareAndExchange$RawType$Volatile(
          +                              UNSAFE.compareAndExchange$RawType$(
                                                 ba,
                                                 address(ba, index(ba, index)),
                                                 convEndian(handle.be, expected), convEndian(handle.be, value)));
          @@ -225,7 +225,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   @ForceInline
                   static boolean weakCompareAndSetPlain(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
                       byte[] ba = (byte[]) oba;
          -            return UNSAFE.weakCompareAndSwap$RawType$(
          +            return UNSAFE.weakCompareAndSet$RawType$Plain(
                               ba,
                               address(ba, index(ba, index)),
                               convEndian(handle.be, expected), convEndian(handle.be, value));
          @@ -234,7 +234,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   @ForceInline
                   static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
                       byte[] ba = (byte[]) oba;
          -            return UNSAFE.weakCompareAndSwap$RawType$Volatile(
          +            return UNSAFE.weakCompareAndSet$RawType$(
                               ba,
                               address(ba, index(ba, index)),
                               convEndian(handle.be, expected), convEndian(handle.be, value));
          @@ -243,7 +243,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   @ForceInline
                   static boolean weakCompareAndSetAcquire(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
                       byte[] ba = (byte[]) oba;
          -            return UNSAFE.weakCompareAndSwap$RawType$Acquire(
          +            return UNSAFE.weakCompareAndSet$RawType$Acquire(
                               ba,
                               address(ba, index(ba, index)),
                               convEndian(handle.be, expected), convEndian(handle.be, value));
          @@ -252,7 +252,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   @ForceInline
                   static boolean weakCompareAndSetRelease(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
                       byte[] ba = (byte[]) oba;
          -            return UNSAFE.weakCompareAndSwap$RawType$Release(
          +            return UNSAFE.weakCompareAndSet$RawType$Release(
                               ba,
                               address(ba, index(ba, index)),
                               convEndian(handle.be, expected), convEndian(handle.be, value));
          @@ -336,7 +336,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                       do {
                           nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
                           expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
          -            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
          +            } while (!UNSAFE.weakCompareAndSet$RawType$(ba, offset,
                               nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
                       return expectedValue;
                   }
          @@ -389,7 +389,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                       do {
                           nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
                           expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
          -            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
          +            } while (!UNSAFE.weakCompareAndSet$RawType$(ba, offset,
                               nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
                       return expectedValue;
                   }
          @@ -440,7 +440,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                       do {
                           nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
                           expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
          -            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
          +            } while (!UNSAFE.weakCompareAndSet$RawType$(ba, offset,
                               nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
                       return expectedValue;
                   }
          @@ -491,7 +491,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                       do {
                           nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
                           expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
          -            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
          +            } while (!UNSAFE.weakCompareAndSet$RawType$(ba, offset,
                               nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
                       return expectedValue;
                   }
          @@ -625,7 +625,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   @ForceInline
                   static boolean compareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
                       ByteBuffer bb = (ByteBuffer) obb;
          -            return UNSAFE.compareAndSwap$RawType$(
          +            return UNSAFE.compareAndSet$RawType$(
                               UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                               address(bb, indexRO(bb, index)),
                               convEndian(handle.be, expected), convEndian(handle.be, value));
          @@ -635,7 +635,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   static $type$ compareAndExchange(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
                       ByteBuffer bb = (ByteBuffer) obb;
                       return convEndian(handle.be,
          -                              UNSAFE.compareAndExchange$RawType$Volatile(
          +                              UNSAFE.compareAndExchange$RawType$(
                                                 UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                                                 address(bb, indexRO(bb, index)),
                                                 convEndian(handle.be, expected), convEndian(handle.be, value)));
          @@ -664,7 +664,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   @ForceInline
                   static boolean weakCompareAndSetPlain(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
                       ByteBuffer bb = (ByteBuffer) obb;
          -            return UNSAFE.weakCompareAndSwap$RawType$(
          +            return UNSAFE.weakCompareAndSet$RawType$Plain(
                               UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                               address(bb, indexRO(bb, index)),
                               convEndian(handle.be, expected), convEndian(handle.be, value));
          @@ -673,7 +673,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   @ForceInline
                   static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
                       ByteBuffer bb = (ByteBuffer) obb;
          -            return UNSAFE.weakCompareAndSwap$RawType$Volatile(
          +            return UNSAFE.weakCompareAndSet$RawType$(
                               UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                               address(bb, indexRO(bb, index)),
                               convEndian(handle.be, expected), convEndian(handle.be, value));
          @@ -682,7 +682,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   @ForceInline
                   static boolean weakCompareAndSetAcquire(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
                       ByteBuffer bb = (ByteBuffer) obb;
          -            return UNSAFE.weakCompareAndSwap$RawType$Acquire(
          +            return UNSAFE.weakCompareAndSet$RawType$Acquire(
                               UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                               address(bb, indexRO(bb, index)),
                               convEndian(handle.be, expected), convEndian(handle.be, value));
          @@ -691,7 +691,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                   @ForceInline
                   static boolean weakCompareAndSetRelease(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
                       ByteBuffer bb = (ByteBuffer) obb;
          -            return UNSAFE.weakCompareAndSwap$RawType$Release(
          +            return UNSAFE.weakCompareAndSet$RawType$Release(
                               UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                               address(bb, indexRO(bb, index)),
                               convEndian(handle.be, expected), convEndian(handle.be, value));
          @@ -776,7 +776,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                       do {
                           nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
                           expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
          -            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
          +            } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
                               nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
                       return expectedValue;
                   }
          @@ -830,7 +830,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                       do {
                           nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
                           expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
          -            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
          +            } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
                               nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
                       return expectedValue;
                   }
          @@ -882,12 +882,12 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                       do {
                           nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
                           expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
          -            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
          +            } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
                               nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
                       return expectedValue;
                   }
          -        
          -        
          +
          +
                   @ForceInline
                   static $type$ getAndBitwiseXor(ByteBufferHandle handle, Object obb, int index, $type$ value) {
                       ByteBuffer bb = (ByteBuffer) obb;
          @@ -935,7 +935,7 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
                       do {
                           nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
                           expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
          -            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
          +            } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
                               nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
                       return expectedValue;
                   }
          diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/package-info.java b/jdk/src/java.base/share/classes/java/lang/invoke/package-info.java
          index ba1d84a8911..7e4ce134ec0 100644
          --- a/jdk/src/java.base/share/classes/java/lang/invoke/package-info.java
          +++ b/jdk/src/java.base/share/classes/java/lang/invoke/package-info.java
          @@ -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
          @@ -44,13 +44,13 @@
            * 
            * 
        * - *

        Summary of relevant Java Virtual Machine changes

        + *

        Summary of relevant Java Virtual Machine changes

        * The following low-level information summarizes relevant parts of the * Java Virtual Machine specification. For full details, please see the * current version of that specification. * * Each occurrence of an {@code invokedynamic} instruction is called a dynamic call site. - *

        {@code invokedynamic} instructions

        + *

        {@code invokedynamic} instructions

        * A dynamic call site is originally in an unlinked state. In this state, there is * no target method for the call site to invoke. *

        @@ -77,7 +77,8 @@ *

        * The bootstrap method is invoked on at least three values: *

          - *
        • a {@code MethodHandles.Lookup}, a lookup object on the caller class in which dynamic call site occurs
        • + *
        • a {@code MethodHandles.Lookup}, a lookup object on the caller class + * in which dynamic call site occurs
        • *
        • a {@code String}, the method name mentioned in the call site
        • *
        • a {@code MethodType}, the resolved type descriptor of the call
        • *
        • optionally, between 1 and 251 additional static arguments taken from the constant pool
        • @@ -165,17 +166,27 @@ * Given these rules, here are examples of legal bootstrap method declarations, * given various numbers {@code N} of extra arguments. * The first rows (marked {@code *}) will work for any number of extra arguments. - * - * - * - * - * - * - * - * - * - * - * + *
          Nsample bootstrap method
          *CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
          *CallSite bootstrap(Object... args)
          *CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)
          0CallSite bootstrap(Lookup caller, String name, MethodType type)
          0CallSite bootstrap(Lookup caller, Object... nameAndType)
          1CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)
          2CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
          2CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)
          2CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)
          + * + * + * + * + * + * + * + * + * + * + * + * + * *
          Static argument types
          NSample bootstrap method
          *CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
          * + * CallSite bootstrap(Object... args)
          * + * CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)
          0 + * CallSite bootstrap(Lookup caller, String name, MethodType type)
          0 + * CallSite bootstrap(Lookup caller, Object... nameAndType)
          1 + * CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)
          2 + * CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
          2 + * CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)
          2CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)
          * The last example assumes that the extra arguments are of type * {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively. diff --git a/jdk/src/java.base/share/classes/java/lang/module/Configuration.java b/jdk/src/java.base/share/classes/java/lang/module/Configuration.java index 9753569374d..f989aae7fe6 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/Configuration.java +++ b/jdk/src/java.base/share/classes/java/lang/module/Configuration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -42,126 +42,47 @@ import java.util.stream.Collectors; import java.util.stream.Stream; /** - * The configuration that is the result of resolution or resolution with - * service binding. + * A configuration that is the result of + * resolution or resolution with service binding. * - *

          Resolution

          + *

          A configuration encapsulates the readability graph that is the + * output of resolution. A readability graph is a directed graph whose vertices + * are of type {@link ResolvedModule} and the edges represent the readability + * amongst the modules. {@code Configuration} defines the {@link #modules() + * modules()} method to get the set of resolved modules in the graph. {@code + * ResolvedModule} defines the {@link ResolvedModule#reads() reads()} method to + * get the set of modules that a resolved module reads. The modules that are + * read may be in the same configuration or may be in {@link #parents() parent} + * configurations.

          * - *

          Resolution is the process of computing the transitive closure of a set - * of root modules over a set of observable modules by resolving the - * dependences expressed by {@code requires} clauses. + *

          Configuration defines the {@link #resolve(ModuleFinder,List,ModuleFinder,Collection) + * resolve} method to resolve a collection of root modules, and the {@link + * #resolveAndBind(ModuleFinder,List,ModuleFinder,Collection) resolveAndBind} + * method to do resolution with service binding. There are instance and + * static variants of both methods. The instance methods create a configuration + * with the receiver as the parent configuration. The static methods are for + * more advanced cases where there can be more than one parent configuration.

          * - * The dependence graph is augmented with edges that take account of - * implicitly declared dependences ({@code requires transitive}) to create a - * readability graph. A {@code Configuration} encapsulates the - * resulting graph of {@link ResolvedModule resolved modules}. - * - *

          Suppose we have the following observable modules:

          - *
           {@code
          - *     module m1 { requires m2; }
          - *     module m2 { requires transitive m3; }
          - *     module m3 { }
          - *     module m4 { }
          - * } 
          - * - *

          If the module {@code m1} is resolved then the resulting configuration - * contains three modules ({@code m1}, {@code m2}, {@code m3}). The edges in - * its readability graph are:

          - *
           {@code
          - *     m1 --> m2  (meaning m1 reads m2)
          - *     m1 --> m3
          - *     m2 --> m3
          - * } 
          - * - *

          Resolution is an additive process. When computing the transitive closure - * then the dependence relation may include dependences on modules in parent - * configurations. The result is a relative configuration that is - * relative to one or more parent configurations and where the readability graph - * may have edges from modules in the configuration to modules in parent - * configurations. - * - *

          - * - *

          Suppose we have the following observable modules:

          - *
           {@code
          - *     module m1 { requires m2; requires java.xml; }
          - *     module m2 { }
          - * } 
          - * - *

          If module {@code m1} is resolved with the configuration for the {@link - * java.lang.reflect.Layer#boot() boot} layer as the parent then the resulting - * configuration contains two modules ({@code m1}, {@code m2}). The edges in - * its readability graph are: - *

           {@code
          - *     m1 --> m2
          - *     m1 --> java.xml
          - * } 
          - * where module {@code java.xml} is in the parent configuration. For - * simplicity, this example omits the implicitly declared dependence on the - * {@code java.base} module. - * - * - *

          {@link ModuleDescriptor#isAutomatic() Automatic} modules receive special - * treatment during resolution. Each automatic module is resolved so that it - * reads all other modules in the configuration and all parent configurations. - * Each automatic module is also resolved as if it {@code requires transitive} - * all other automatic modules in the configuration (and all automatic modules - * in parent configurations).

          - - *

          Service binding

          - * - *

          Service binding is the process of augmenting a graph of resolved modules - * from the set of observable modules induced by the service-use dependence - * ({@code uses} and {@code provides} clauses). Any module that was not - * previously in the graph requires resolution to compute its transitive - * closure. Service binding is an iterative process in that adding a module - * that satisfies some service-use dependence may introduce new service-use - * dependences.

          - * - *

          Suppose we have the following observable modules:

          - *
           {@code
          - *     module m1 { exports p; uses p.S; }
          - *     module m2 { requires m1; provides p.S with p2.S2; }
          - *     module m3 { requires m1; requires m4; provides p.S with p3.S3; }
          - *     module m4 { }
          - * } 
          - * - *

          If the module {@code m1} is resolved then the resulting graph of modules - * has one module ({@code m1}). If the graph is augmented with modules induced - * by the service-use dependence relation then the configuration will contain - * four modules ({@code m1}, {@code m2}, {@code m3}, {@code m4}). The edges in - * its readability graph are:

          - *
           {@code
          - *     m2 --> m1
          - *     m3 --> m1
          - *     m3 --> m4
          - * } 
          - *

          The edges in the conceptual service-use graph are:

          - *
           {@code
          - *     m1 --> m2  (meaning m1 uses a service that is provided by m2)
          - *     m1 --> m3
          - * } 
          - * - *

          If this configuration is instantiated as a {@code Layer}, and if code in - * module {@code m1} uses {@link java.util.ServiceLoader ServiceLoader} to - * iterate over implementations of {@code p.S.class}, then it will iterate over - * an instance of {@code p2.S2} and {@code p3.S3}.

          + *

          Each {@link java.lang.ModuleLayer layer} of modules in the Java virtual + * machine is created from a configuration. The configuration for the {@link + * java.lang.ModuleLayer#boot() boot} layer is obtained by invoking {@code + * ModuleLayer.boot().configuration()}. The configuration for the boot layer + * will often be the parent when creating new configurations.

          * *

          Example

          * - *

          The following example uses the {@code resolveRequires} method to resolve - * a module named myapp with the configuration for the boot layer as - * the parent configuration. It prints the name of each resolved module and - * the names of the modules that each module reads.

          + *

          The following example uses the {@link + * #resolve(ModuleFinder,ModuleFinder,Collection) resolve} method to resolve a + * module named myapp with the configuration for the boot layer as the + * parent configuration. It prints the name of each resolved module and the + * names of the modules that each module reads.

          * *
          {@code
            *    ModuleFinder finder = ModuleFinder.of(dir1, dir2, dir3);
            *
          - *    Configuration parent = Layer.boot().configuration();
          + *    Configuration parent = ModuleLayer.boot().configuration();
            *
          - *    Configuration cf = parent.resolveRequires(finder,
          - *                                              ModuleFinder.of(),
          - *                                              Set.of("myapp"));
          + *    Configuration cf = parent.resolve(finder, ModuleFinder.of(), Set.of("myapp"));
            *    cf.modules().forEach(m -> {
            *        System.out.format("%s -> %s%n",
            *            m.name(),
          @@ -172,7 +93,8 @@ import java.util.stream.Stream;
            * }
          * * @since 9 - * @see java.lang.reflect.Layer + * @spec JPMS + * @see java.lang.ModuleLayer */ public final class Configuration { @@ -186,11 +108,17 @@ public final class Configuration { private final Set modules; private final Map nameToModule; + // constraint on target platform + private final String targetPlatform; + + String targetPlatform() { return targetPlatform; } + private Configuration() { this.parents = Collections.emptyList(); this.graph = Collections.emptyMap(); this.modules = Collections.emptySet(); this.nameToModule = Collections.emptyMap(); + this.targetPlatform = null; } private Configuration(List parents, @@ -214,27 +142,28 @@ public final class Configuration { this.graph = g; this.modules = Set.of(moduleArray); this.nameToModule = Map.ofEntries(nameEntries); - } + this.targetPlatform = resolver.targetPlatform(); + } /** * Resolves a collection of root modules, with this configuration as its * parent, to create a new configuration. This method works exactly as * specified by the static {@link - * #resolveRequires(ModuleFinder,List,ModuleFinder,Collection) resolveRequires} + * #resolve(ModuleFinder,List,ModuleFinder,Collection) resolve} * method when invoked with this configuration as the parent. In other words, * if this configuration is {@code cf} then this method is equivalent to * invoking: *
           {@code
          -     *     Configuration.resolveRequires(before, List.of(cf), after, roots);
          +     *     Configuration.resolve(before, List.of(cf), after, roots);
                * }
          * * @param before * The before module finder to find modules * @param after - * The after module finder to locate modules when a - * module cannot be located by the {@code before} module finder - * and the module is not in this configuration + * The after module finder to locate modules when not + * located by the {@code before} module finder or in parent + * configurations * @param roots * The possibly-empty collection of module names of the modules * to resolve @@ -242,16 +171,20 @@ public final class Configuration { * @return The configuration that is the result of resolving the given * root modules * + * @throws FindException + * If resolution fails for any of the observability-related reasons + * specified by the static {@code resolve} method * @throws ResolutionException - * If resolution or the post-resolution checks fail + * If resolution fails any of the consistency checks specified by + * the static {@code resolve} method * @throws SecurityException * If locating a module is denied by the security manager */ - public Configuration resolveRequires(ModuleFinder before, - ModuleFinder after, - Collection roots) + public Configuration resolve(ModuleFinder before, + ModuleFinder after, + Collection roots) { - return resolveRequires(before, List.of(this), after, roots); + return resolve(before, List.of(this), after, roots); } @@ -259,12 +192,12 @@ public final class Configuration { * Resolves a collection of root modules, with service binding, and with * this configuration as its parent, to create a new configuration. * This method works exactly as specified by the static {@link - * #resolveRequiresAndUses(ModuleFinder,List,ModuleFinder,Collection) - * resolveRequiresAndUses} method when invoked with this configuration + * #resolveAndBind(ModuleFinder,List,ModuleFinder,Collection) + * resolveAndBind} method when invoked with this configuration * as the parent. In other words, if this configuration is {@code cf} then * this method is equivalent to invoking: *
           {@code
          -     *     Configuration.resolveRequiresAndUses(before, List.of(cf), after, roots);
          +     *     Configuration.resolveAndBind(before, List.of(cf), after, roots);
                * }
          * * @@ -272,43 +205,47 @@ public final class Configuration { * The before module finder to find modules * @param after * The after module finder to locate modules when not - * located by the {@code before} module finder and this - * configuration + * located by the {@code before} module finder or in parent + * configurations * @param roots * The possibly-empty collection of module names of the modules * to resolve * - * @return The configuration that is the result of resolving the given - * root modules + * @return The configuration that is the result of resolving, with service + * binding, the given root modules * + * @throws FindException + * If resolution fails for any of the observability-related reasons + * specified by the static {@code resolve} method * @throws ResolutionException - * If resolution or the post-resolution checks fail + * If resolution fails any of the consistency checks specified by + * the static {@code resolve} method * @throws SecurityException * If locating a module is denied by the security manager */ - public Configuration resolveRequiresAndUses(ModuleFinder before, - ModuleFinder after, - Collection roots) + public Configuration resolveAndBind(ModuleFinder before, + ModuleFinder after, + Collection roots) { - return resolveRequiresAndUses(before, List.of(this), after, roots); + return resolveAndBind(before, List.of(this), after, roots); } /** * Resolves a collection of root modules, with service binding, and with - * the empty configuration as its parent. The post resolution checks + * the empty configuration as its parent. The consistency checks * are optionally run. * * This method is used to create the configuration for the boot layer. */ - static Configuration resolveRequiresAndUses(ModuleFinder finder, - Collection roots, - boolean check, - PrintStream traceOutput) + static Configuration resolveAndBind(ModuleFinder finder, + Collection roots, + boolean check, + PrintStream traceOutput) { List parents = List.of(empty()); Resolver resolver = new Resolver(finder, parents, ModuleFinder.of(), traceOutput); - resolver.resolveRequires(roots).resolveUses(); + resolver.resolve(roots).bind(); return new Configuration(parents, resolver, check); } @@ -326,15 +263,15 @@ public final class Configuration { * or dependences that are located in a parent configuration are resolved * no further and are not included in the resulting configuration.

          * - *

          When all modules have been resolved then the resulting dependency - * graph is checked to ensure that it does not contain cycles. A - * readability graph is constructed and in conjunction with the module - * exports and service use, checked for consistency.

          + *

          When all modules have been enumerated then a readability graph + * is computed, and in conjunction with the module exports and service use, + * checked for consistency.

          * - *

          Resolution and the (post-resolution) consistency checks may fail for - * following reasons:

          + *

          Resolution may fail with {@code FindException} for the following + * observability-related reasons:

          * *
            + * *
          • A root module, or a direct or transitive dependency, is not * found.

          • * @@ -343,9 +280,20 @@ public final class Configuration { * descriptor ({@code module-info.class}) or two versions of the same * module are found in the same directory.

            * + *
          + * + *

          Resolution may fail with {@code ResolutionException} if any of the + * following consistency checks fail:

          + * + *
            + * *
          • A cycle is detected, say where module {@code m1} requires * module {@code m2} and {@code m2} requires {@code m1}.

          • * + *
          • A module reads two or more modules with the same name. This + * includes the case where a module reads another with the same name as + * itself.

          • + * *
          • Two or more modules in the configuration export the same * package to a module that reads both. This includes the case where a * module {@code M} containing package {@code p} reads another module @@ -356,21 +304,13 @@ public final class Configuration { * module {@code M} nor exported to {@code M} by any module that * {@code M} reads.

          • * - *
          • A module {@code M} declares that it - * "{@code provides ... with q.T}" but package {@code q} is not in - * module {@code M}.

          • - * - *
          • Two or more modules in the configuration are specific to - * different {@link ModuleDescriptor#osName() operating systems}, - * {@link ModuleDescriptor#osArch() architectures}, or {@link - * ModuleDescriptor#osVersion() versions}.

          • - * - *
          • Other implementation specific checks, for example referential - * integrity checks to ensure that different versions of tighly coupled - * modules cannot be combined in the same configuration.

          • - * *
          * + * @implNote In the implementation then observability of modules may depend + * on referential integrity or other checks that ensure different builds of + * tightly coupled modules or modules for specific operating systems or + * architectures are not combined in the same configuration. + * * @param before * The before module finder to find modules * @param parents @@ -386,17 +326,24 @@ public final class Configuration { * @return The configuration that is the result of resolving the given * root modules * + * @throws FindException + * If resolution fails for any of observability-related reasons + * specified above * @throws ResolutionException - * If resolution or the post-resolution checks fail + * If resolution fails for any of the consistency checks specified + * above * @throws IllegalArgumentException - * If the list of parents is empty + * If the list of parents is empty, or the list has two or more + * parents with modules for different target operating systems, + * architectures, or versions + * * @throws SecurityException * If locating a module is denied by the security manager */ - public static Configuration resolveRequires(ModuleFinder before, - List parents, - ModuleFinder after, - Collection roots) + public static Configuration resolve(ModuleFinder before, + List parents, + ModuleFinder after, + Collection roots) { Objects.requireNonNull(before); Objects.requireNonNull(after); @@ -407,7 +354,7 @@ public final class Configuration { throw new IllegalArgumentException("'parents' is empty"); Resolver resolver = new Resolver(before, parentList, after, null); - resolver.resolveRequires(roots); + resolver.resolve(roots); return new Configuration(parentList, resolver, true); } @@ -417,24 +364,24 @@ public final class Configuration { * configuration. * *

          This method works exactly as specified by {@link - * #resolveRequires(ModuleFinder,List,ModuleFinder,Collection) - * resolveRequires} except that the graph of resolved modules is augmented + * #resolve(ModuleFinder,List,ModuleFinder,Collection) + * resolve} except that the graph of resolved modules is augmented * with modules induced by the service-use dependence relation.

          * - *

          More specifically, the root modules are resolved as if by calling - * {@code resolveRequires}. The resolved modules, and all modules in the - * parent configurations, with {@link ModuleDescriptor#uses() service - * dependences} are then examined. All modules found by the given module - * finders that {@link ModuleDescriptor#provides() provide} an + *

          More specifically, the root modules are + * resolved as if by calling {@code resolve}. The resolved modules, and + * all modules in the parent configurations, with {@link ModuleDescriptor#uses() + * service dependences} are then examined. All modules found by the given + * module finders that {@link ModuleDescriptor#provides() provide} an * implementation of one or more of the service types are added to the * module graph and then resolved as if by calling the {@code - * resolveRequires} method. Adding modules to the module graph may - * introduce new service-use dependences and so the process works - * iteratively until no more modules are added.

          + * resolve} method. Adding modules to the module graph may introduce new + * service-use dependences and so the process works iteratively until no + * more modules are added.

          * - *

          As service binding involves resolution then it may fail with {@link - * ResolutionException} for exactly the same reasons specified in - * {@code resolveRequires}.

          + *

          As service binding involves resolution then it may fail with {@code + * FindException} or {@code ResolutionException} for exactly the same + * reasons specified in {@code resolve}.

          * * @param before * The before module finder to find modules @@ -448,20 +395,26 @@ public final class Configuration { * The possibly-empty collection of module names of the modules * to resolve * - * @return The configuration that is the result of resolving the given - * root modules + * @return The configuration that is the result of resolving, with service + * binding, the given root modules * + * @throws FindException + * If resolution fails for any of the observability-related reasons + * specified by the static {@code resolve} method * @throws ResolutionException - * If resolution or the post-resolution checks fail + * If resolution fails any of the consistency checks specified by + * the static {@code resolve} method * @throws IllegalArgumentException - * If the list of parents is empty + * If the list of parents is empty, or the list has two or more + * parents with modules for different target operating systems, + * architectures, or versions * @throws SecurityException * If locating a module is denied by the security manager */ - public static Configuration resolveRequiresAndUses(ModuleFinder before, - List parents, - ModuleFinder after, - Collection roots) + public static Configuration resolveAndBind(ModuleFinder before, + List parents, + ModuleFinder after, + Collection roots) { Objects.requireNonNull(before); Objects.requireNonNull(after); @@ -472,7 +425,7 @@ public final class Configuration { throw new IllegalArgumentException("'parents' is empty"); Resolver resolver = new Resolver(before, parentList, after, null); - resolver.resolveRequires(roots).resolveUses(); + resolver.resolve(roots).bind(); return new Configuration(parentList, resolver, true); } diff --git a/jdk/src/java.base/share/classes/java/lang/module/FindException.java b/jdk/src/java.base/share/classes/java/lang/module/FindException.java index d76f2935e7e..411959eb418 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/FindException.java +++ b/jdk/src/java.base/share/classes/java/lang/module/FindException.java @@ -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 @@ -26,10 +26,14 @@ package java.lang.module; /** - * Thrown by module finders when finding a module fails. + * Thrown by a {@link ModuleFinder ModuleFinder} when an error occurs finding + * a module. Also thrown by {@link + * Configuration#resolve(ModuleFinder,java.util.List,ModuleFinder,java.util.Collection) + * Configuration.resolve} when resolution fails for observability-related + * reasons. * - * @see ModuleFinder * @since 9 + * @spec JPMS */ public class FindException extends RuntimeException { diff --git a/jdk/src/java.base/share/classes/java/lang/module/InvalidModuleDescriptorException.java b/jdk/src/java.base/share/classes/java/lang/module/InvalidModuleDescriptorException.java index 981f23a5189..3e306886fb2 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/InvalidModuleDescriptorException.java +++ b/jdk/src/java.base/share/classes/java/lang/module/InvalidModuleDescriptorException.java @@ -31,6 +31,7 @@ package java.lang.module; * * @see ModuleDescriptor#read * @since 9 + * @spec JPMS */ public class InvalidModuleDescriptorException extends RuntimeException { private static final long serialVersionUID = 4863390386809347380L; diff --git a/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java b/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java index b10d986ade9..20d198b46ee 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -32,6 +32,7 @@ import java.io.UncheckedIOException; import java.nio.ByteBuffer; import java.nio.file.Path; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.EnumSet; @@ -56,29 +57,84 @@ import jdk.internal.module.ModuleInfo; /** * A module descriptor. * - *

          A {@code ModuleDescriptor} is typically created from the binary form - * of a module declaration. Alternatively, the {@link ModuleDescriptor.Builder} - * class can be used to create a {@code ModuleDescriptor} from its components. - * The {@link #module module}, {@link #openModule openModule}, and {@link - * #automaticModule automaticModule} methods create builders for building - * different kinds of modules.

          + *

          A module descriptor describes a named module and defines methods to + * obtain each of its components. The module descriptor for a named module + * in the Java virtual machine is obtained by invoking the {@link + * java.lang.Module Module}'s {@link java.lang.Module#getDescriptor + * getDescriptor} method. Module descriptors can also be created using the + * {@link ModuleDescriptor.Builder} class or by reading the binary form of a + * module declaration ({@code module-info.class}) using the {@link + * #read(InputStream,Supplier) read} methods defined here.

          + * + *

          A module descriptor describes a normal, open, or automatic + * module. Normal modules and open modules describe their {@link + * #requires() dependences}, {@link #exports() exported-packages}, the services + * that they {@link #uses() use} or {@link #provides() provide}, and other + * components. Normal modules may {@link #opens() open} specific + * packages. The module descriptor for an open modules does not declare any + * open packages (its {@code opens} method returns an empty set) but when + * instantiated in the Java virtual machine then it is treated as if all + * packages are open. The module descriptor for an automatic module does not + * declare any dependences (except for the mandatory dependency on {@code + * java.base}), and does not declare any exported or open packages. Automatic + * module receive special treatment during resolution so that they read all + * other modules in the configuration. When an automatic module is instantiated + * in the Java virtual machine then it reads every unnamed module and is + * treated as if all packages are exported and open.

          * *

          {@code ModuleDescriptor} objects are immutable and safe for use by * multiple concurrent threads.

          * + * @see java.lang.Module * @since 9 - * @see java.lang.reflect.Module + * @spec JPMS */ public class ModuleDescriptor implements Comparable { + /** + * A modifier on a module. + * + * @see ModuleDescriptor#modifiers() + * @since 9 + * @spec JPMS + */ + public static enum Modifier { + /** + * An open module. An open module does not declare any open packages + * but the resulting module is treated as if all packages are open. + */ + OPEN, + + /** + * An automatic module. An automatic module is treated as if it exports + * and opens all packages. + * + * @apiNote This modifier does not correspond to a module flag in the + * binary form of a module declaration ({@code module-info.class}). + */ + AUTOMATIC, + + /** + * The module was not explicitly or implicitly declared. + */ + SYNTHETIC, + + /** + * The module was implicitly declared. + */ + MANDATED; + } + + /** *

          A dependence upon a module

          * * @see ModuleDescriptor#requires() * @since 9 + * @spec JPMS */ public final static class Requires @@ -88,7 +144,9 @@ public class ModuleDescriptor /** * A modifier on a module dependence. * + * @see Requires#modifiers() * @since 9 + * @spec JPMS */ public static enum Modifier { @@ -122,8 +180,10 @@ public class ModuleDescriptor private final Set mods; private final String name; private final Version compiledVersion; + private final String rawCompiledVersion; - private Requires(Set ms, String mn, Version v) { + private Requires(Set ms, String mn, Version v, String vs) { + assert v == null || vs == null; if (ms.isEmpty()) { ms = Collections.emptySet(); } else { @@ -132,12 +192,14 @@ public class ModuleDescriptor this.mods = ms; this.name = mn; this.compiledVersion = v; + this.rawCompiledVersion = vs; } private Requires(Set ms, String mn, Version v, boolean unused) { this.mods = ms; this.name = mn; this.compiledVersion = v; + this.rawCompiledVersion = null; } /** @@ -161,24 +223,52 @@ public class ModuleDescriptor /** * Returns the version of the module if recorded at compile-time. * - * @return The version of the module if recorded at compile-time + * @return The version of the module if recorded at compile-time, + * or an empty {@code Optional} if no version was recorded or + * the version string recorded is {@linkplain Version#parse(String) + * unparseable} */ public Optional compiledVersion() { return Optional.ofNullable(compiledVersion); } + /** + * Returns the string with the possibly-unparseable version of the module + * if recorded at compile-time. + * + * @return The string containing the version of the module if recorded + * at compile-time, or an empty {@code Optional} if no version + * was recorded + * + * @see #compiledVersion() + */ + public Optional rawCompiledVersion() { + if (compiledVersion != null) { + return Optional.of(compiledVersion.toString()); + } else { + return Optional.ofNullable(rawCompiledVersion); + } + } + /** * Compares this module dependence to another. * *

          Two {@code Requires} objects are compared by comparing their - * module name lexicographically. Where the module names are equal then - * the sets of modifiers are compared based on a value computed from the - * ordinal of each modifier. Where the module names are equal and the - * set of modifiers are equal then the version of the modules recorded - * at compile-time are compared. When comparing the versions recorded - * at compile-time then a dependence that has a recorded version is - * considered to succeed a dependence that does not have a recorded - * version.

          + * module names lexicographically. Where the module names are equal + * then the sets of modifiers are compared in the same way that + * module modifiers are compared (see {@link ModuleDescriptor#compareTo + * ModuleDescriptor.compareTo}). Where the module names are equal and + * the set of modifiers are equal then the version of the modules + * recorded at compile-time are compared. When comparing the versions + * recorded at compile-time then a dependence that has a recorded + * version is considered to succeed a dependence that does not have a + * recorded version. If both recorded versions are {@linkplain + * Version#parse(String) unparseable} then the {@linkplain + * #rawCompiledVersion() raw version strings} are compared + * lexicographically.

          + * + * @param that + * The module dependence to compare * * @return A negative integer, zero, or a positive integer if this module * dependence is less than, equal to, or greater than the given @@ -186,39 +276,26 @@ public class ModuleDescriptor */ @Override public int compareTo(Requires that) { + if (this == that) return 0; + int c = this.name().compareTo(that.name()); - if (c != 0) - return c; + if (c != 0) return c; // modifiers - c = Long.compare(this.modsValue(), that.modsValue()); - if (c != 0) - return c; + long v1 = modsValue(this.modifiers()); + long v2 = modsValue(that.modifiers()); + c = Long.compare(v1, v2); + if (c != 0) return c; // compiledVersion - if (this.compiledVersion != null) { - if (that.compiledVersion != null) - c = this.compiledVersion.compareTo(that.compiledVersion); - else - c = 1; - } else { - if (that.compiledVersion != null) - c = -1; - } + c = compare(this.compiledVersion, that.compiledVersion); + if (c != 0) return c; - return c; - } + // rawCompiledVersion + c = compare(this.rawCompiledVersion, that.rawCompiledVersion); + if (c != 0) return c; - /** - * Return a value for the modifiers to allow sets of modifiers to be - * compared. - */ - private long modsValue() { - long value = 0; - for (Modifier m : mods) { - value += 1 << m.ordinal(); - } - return value; + return 0; } /** @@ -245,7 +322,8 @@ public class ModuleDescriptor return false; Requires that = (Requires)ob; return name.equals(that.name) && mods.equals(that.mods) - && Objects.equals(compiledVersion, that.compiledVersion); + && Objects.equals(compiledVersion, that.compiledVersion) + && Objects.equals(rawCompiledVersion, that.rawCompiledVersion); } /** @@ -262,13 +340,15 @@ public class ModuleDescriptor int hash = name.hashCode() * 43 + mods.hashCode(); if (compiledVersion != null) hash = hash * 43 + compiledVersion.hashCode(); + if (rawCompiledVersion != null) + hash = hash * 43 + rawCompiledVersion.hashCode(); return hash; } /** - * Returns a string describing module dependence. + * Returns a string describing this module dependence. * - * @return A string describing module dependence + * @return A string describing this module dependence */ @Override public String toString() { @@ -285,18 +365,23 @@ public class ModuleDescriptor /** - *

          A module export, may be qualified or unqualified.

          + *

          A package exported by a module, may be qualified or unqualified.

          * * @see ModuleDescriptor#exports() * @since 9 + * @spec JPMS */ - public final static class Exports { + public final static class Exports + implements Comparable + { /** - * A modifier on a module export. + * A modifier on an exported package. * + * @see Exports#modifiers() * @since 9 + * @spec JPMS */ public static enum Modifier { @@ -380,6 +465,52 @@ public class ModuleDescriptor return targets; } + /** + * Compares this module export to another. + * + *

          Two {@code Exports} objects are compared by comparing the package + * names lexicographically. Where the packages names are equal then the + * sets of modifiers are compared in the same way that module modifiers + * are compared (see {@link ModuleDescriptor#compareTo + * ModuleDescriptor.compareTo}). Where the package names are equal and + * the set of modifiers are equal then the set of target modules are + * compared. This is done by sorting the names of the target modules + * in ascending order, and according to their natural ordering, and then + * comparing the corresponding elements lexicographically. Where the + * sets differ in size, and the larger set contains all elements of the + * smaller set, then the larger set is considered to succeed the smaller + * set.

          + * + * @param that + * The module export to compare + * + * @return A negative integer, zero, or a positive integer if this module + * export is less than, equal to, or greater than the given + * export dependence + */ + @Override + public int compareTo(Exports that) { + if (this == that) return 0; + + int c = source.compareTo(that.source); + if (c != 0) + return c; + + // modifiers + long v1 = modsValue(this.modifiers()); + long v2 = modsValue(that.modifiers()); + c = Long.compare(v1, v2); + if (c != 0) + return c; + + // targets + c = compare(targets, that.targets); + if (c != 0) + return c; + + return 0; + } + /** * Computes a hash code for this module export. * @@ -425,9 +556,9 @@ public class ModuleDescriptor } /** - * Returns a string describing module export. + * Returns a string describing the exported package. * - * @return A string describing module export + * @return A string describing the exported package */ @Override public String toString() { @@ -441,8 +572,7 @@ public class ModuleDescriptor /** - *

          Represents a module opens directive, may be qualified or - * unqualified.

          + *

          A package opened by a module, may be qualified or unqualified.

          * *

          The opens directive in a module declaration declares a * package to be open to allow all types in the package, and all their @@ -452,26 +582,30 @@ public class ModuleDescriptor * * @see ModuleDescriptor#opens() * @since 9 + * @spec JPMS */ - public final static class Opens { - + public final static class Opens + implements Comparable + { /** - * A modifier on a module opens directive. + * A modifier on an open package. * + * @see Opens#modifiers() * @since 9 + * @spec JPMS */ public static enum Modifier { /** - * The opens was not explicitly or implicitly declared in the - * source of the module declaration. + * The open package was not explicitly or implicitly declared in + * the source of the module declaration. */ SYNTHETIC, /** - * The opens was implicitly declared in the source of the module - * declaration. + * The open package was implicitly declared in the source of the + * module declaration. */ MANDATED; @@ -543,6 +677,52 @@ public class ModuleDescriptor return targets; } + /** + * Compares this module opens to another. + * + *

          Two {@code Opens} objects are compared by comparing the package + * names lexicographically. Where the packages names are equal then the + * sets of modifiers are compared in the same way that module modifiers + * are compared (see {@link ModuleDescriptor#compareTo + * ModuleDescriptor.compareTo}). Where the package names are equal and + * the set of modifiers are equal then the set of target modules are + * compared. This is done by sorting the names of the target modules + * in ascending order, and according to their natural ordering, and then + * comparing the corresponding elements lexicographically. Where the + * sets differ in size, and the larger set contains all elements of the + * smaller set, then the larger set is considered to succeed the smaller + * set.

          + * + * @param that + * The module opens to compare + * + * @return A negative integer, zero, or a positive integer if this module + * opens is less than, equal to, or greater than the given + * module opens + */ + @Override + public int compareTo(Opens that) { + if (this == that) return 0; + + int c = source.compareTo(that.source); + if (c != 0) + return c; + + // modifiers + long v1 = modsValue(this.modifiers()); + long v2 = modsValue(that.modifiers()); + c = Long.compare(v1, v2); + if (c != 0) + return c; + + // targets + c = compare(targets, that.targets); + if (c != 0) + return c; + + return 0; + } + /** * Computes a hash code for this module opens. * @@ -588,9 +768,9 @@ public class ModuleDescriptor } /** - * Returns a string describing module opens. + * Returns a string describing the open package. * - * @return A string describing module opens + * @return A string describing the open package */ @Override public String toString() { @@ -608,10 +788,12 @@ public class ModuleDescriptor * * @see ModuleDescriptor#provides() * @since 9 + * @spec JPMS */ - public final static class Provides { - + public final static class Provides + implements Comparable + { private final String service; private final List providers; @@ -628,7 +810,7 @@ public class ModuleDescriptor /** * Returns the fully qualified class name of the service type. * - * @return The fully qualified class name of the service type. + * @return The fully qualified class name of the service type */ public String service() { return service; } @@ -641,6 +823,46 @@ public class ModuleDescriptor */ public List providers() { return providers; } + /** + * Compares this provides to another. + * + *

          Two {@code Provides} objects are compared by comparing the fully + * qualified class name of the service type lexicographically. Where the + * class names are equal then the list of the provider class names are + * compared by comparing the corresponding elements of both lists + * lexicographically and in sequence. Where the lists differ in size, + * {@code N} is the size of the shorter list, and the first {@code N} + * corresponding elements are equal, then the longer list is considered + * to succeed the shorter list.

          + * + * @param that + * The {@code Provides} to compare + * + * @return A negative integer, zero, or a positive integer if this provides + * is less than, equal to, or greater than the given provides + */ + public int compareTo(Provides that) { + if (this == that) return 0; + + int c = service.compareTo(that.service); + if (c != 0) return c; + + // compare provider class names in sequence + int size1 = this.providers.size(); + int size2 = that.providers.size(); + for (int index=0; index size2) ? 1 : -1; + } + } + /** * Computes a hash code for this provides. * @@ -699,7 +921,7 @@ public class ModuleDescriptor * *

          A version string has three components: The version number itself, an * optional pre-release version, and an optional build version. Each - * component is sequence of tokens; each token is either a non-negative + * component is a sequence of tokens; each token is either a non-negative * integer or a string. Tokens are separated by the punctuation characters * {@code '.'}, {@code '-'}, or {@code '+'}, or by transitions from a * sequence of digits to a sequence of characters that are neither digits @@ -740,6 +962,7 @@ public class ModuleDescriptor * * @see ModuleDescriptor#version() * @since 9 + * @spec JPMS */ public final static class Version @@ -1009,53 +1232,40 @@ public class ModuleDescriptor } - + private final String name; private final Version version; - private final boolean open; - - // Indicates if synthesised for a JAR file found on the module path - private final boolean automatic; - - // Not generated from a module-info.java - private final boolean synthetic; - + private final String rawVersionString; + private final Set modifiers; + private final boolean open; // true if modifiers contains OPEN + private final boolean automatic; // true if modifiers contains AUTOMATIC private final Set requires; private final Set exports; private final Set opens; private final Set uses; private final Set provides; - - // Added post-compilation by tools private final Set packages; private final String mainClass; - private final String osName; - private final String osArch; - private final String osVersion; - private ModuleDescriptor(String name, Version version, - boolean open, - boolean automatic, - boolean synthetic, + String rawVersionString, + Set modifiers, Set requires, Set exports, Set opens, Set uses, Set provides, Set packages, - String mainClass, - String osName, - String osArch, - String osVersion) + String mainClass) { + assert version == null || rawVersionString == null; this.name = name; this.version = version; - this.open = open; - this.automatic = automatic; - this.synthetic = synthetic; - + this.rawVersionString = rawVersionString; + this.modifiers = emptyOrUnmodifiableSet(modifiers); + this.open = modifiers.contains(Modifier.OPEN); + this.automatic = modifiers.contains(Modifier.AUTOMATIC); assert (requires.stream().map(Requires::name).distinct().count() == requires.size()); this.requires = emptyOrUnmodifiableSet(requires); @@ -1066,35 +1276,6 @@ public class ModuleDescriptor this.packages = emptyOrUnmodifiableSet(packages); this.mainClass = mainClass; - this.osName = osName; - this.osArch = osArch; - this.osVersion = osVersion; - } - - /** - * Clones the given module descriptor with an augmented set of packages - */ - ModuleDescriptor(ModuleDescriptor md, Set pkgs) { - this.name = md.name; - this.version = md.version; - this.open = md.open; - this.automatic = md.automatic; - this.synthetic = md.synthetic; - - this.requires = md.requires; - this.exports = md.exports; - this.opens = md.opens; - this.uses = md.uses; - this.provides = md.provides; - - Set packages = new HashSet<>(md.packages); - packages.addAll(pkgs); - this.packages = emptyOrUnmodifiableSet(packages); - - this.mainClass = md.mainClass; - this.osName = md.osName; - this.osArch = md.osArch; - this.osVersion = md.osVersion; } /** @@ -1103,9 +1284,7 @@ public class ModuleDescriptor */ ModuleDescriptor(String name, Version version, - boolean open, - boolean automatic, - boolean synthetic, + Set modifiers, Set requires, Set exports, Set opens, @@ -1113,16 +1292,14 @@ public class ModuleDescriptor Set provides, Set packages, String mainClass, - String osName, - String osArch, - String osVersion, int hashCode, boolean unused) { this.name = name; this.version = version; - this.open = open; - this.automatic = automatic; - this.synthetic = synthetic; + this.rawVersionString = null; + this.modifiers = modifiers; + this.open = modifiers.contains(Modifier.OPEN); + this.automatic = modifiers.contains(Modifier.AUTOMATIC); this.requires = requires; this.exports = exports; this.opens = opens; @@ -1130,14 +1307,11 @@ public class ModuleDescriptor this.provides = provides; this.packages = packages; this.mainClass = mainClass; - this.osName = osName; - this.osArch = osArch; - this.osVersion = osVersion; this.hash = hashCode; } /** - *

          The module name.

          + *

          Returns the module name.

          * * @return The module name */ @@ -1145,12 +1319,20 @@ public class ModuleDescriptor return name; } + /** + *

          Returns the set of module modifiers.

          + * + * @return A possibly-empty unmodifiable set of modifiers + */ + public Set modifiers() { + return modifiers; + } + /** *

          Returns {@code true} if this is an open module.

          * - *

          An open module does not declare any open packages (the {@link #opens() - * opens} method returns an empty set) but the resulting module is treated - * as if all packages are open.

          + *

          This method is equivalent to testing if the set of {@link #modifiers + * modifiers} contains the {@link Modifier#OPEN OPEN} modifier.

          * * @return {@code true} if this is an open module */ @@ -1161,12 +1343,8 @@ public class ModuleDescriptor /** *

          Returns {@code true} if this is an automatic module.

          * - *

          An automatic module is defined implicitly rather than explicitly - * and therefore does not have a module declaration. JAR files located on - * the application module path, or by the {@link ModuleFinder} returned by - * {@link ModuleFinder#of(java.nio.file.Path[]) ModuleFinder.of}, are - * treated as automatic modules if they do have not have a module - * declaration.

          + *

          This method is equivalent to testing if the set of {@link #modifiers + * modifiers} contains the {@link Modifier#OPEN AUTOMATIC} modifier.

          * * @return {@code true} if this is an automatic module */ @@ -1175,20 +1353,13 @@ public class ModuleDescriptor } /** - *

          Returns {@code true} if this module descriptor was not generated - * from an explicit module declaration ({@code module-info.java}) - * or an implicit module declaration (an {@link #isAutomatic() automatic} - * module).

          + *

          Returns the set of {@code Requires} objects representing the module + * dependences.

          * - * @return {@code true} if this module descriptor was not generated by - * an explicit or implicit module declaration - */ - public boolean isSynthetic() { - return synthetic; - } - - /** - *

          The dependences of this module.

          + *

          The set includes a dependency on "{@code java.base}" when this + * module is not named "{@code java.base}". If this module is an automatic + * module then it does not have a dependency on any module other than + * "{@code java.base}".

          * * @return A possibly-empty unmodifiable set of {@link Requires} objects */ @@ -1197,7 +1368,11 @@ public class ModuleDescriptor } /** - *

          The module exports.

          + *

          Returns the set of {@code Exports} objects representing the exported + * packages.

          + * + *

          If this module is an automatic module then the set of exports + * is empty.

          * * @return A possibly-empty unmodifiable set of exported packages */ @@ -1206,16 +1381,11 @@ public class ModuleDescriptor } /** - *

          The module opens directives.

          + *

          Returns the set of {@code Opens} objects representing the open + * packages.

          * - *

          Each {@code Opens} object in the set represents a package (and - * the set of target module names when qualified) where all types in the - * package, and all their members, not just public types and their public - * members, can be reflected on when using APIs that bypass or suppress - * default Java language access control checks.

          - * - *

          This method returns an empty set when invoked on {@link #isOpen() - * open} module.

          + *

          If this module is an open module or an automatic module then the + * set of open packages is empty.

          * * @return A possibly-empty unmodifiable set of open packages */ @@ -1224,7 +1394,10 @@ public class ModuleDescriptor } /** - *

          The service dependences of this module.

          + *

          Returns the set of service dependences.

          + * + *

          If this module is an automatic module then the set of service + * dependences is empty.

          * * @return A possibly-empty unmodifiable set of the fully qualified class * names of the service types used @@ -1234,7 +1407,8 @@ public class ModuleDescriptor } /** - *

          The services that this module provides.

          + *

          Returns the set of {@code Provides} objects representing the + * services that the module provides.

          * * @return The possibly-empty unmodifiable set of the services that this * module provides @@ -1244,20 +1418,39 @@ public class ModuleDescriptor } /** - * Returns this module's version. + *

          Returns the module version.

          * - * @return This module's version + * @return This module's version, or an empty {@code Optional} if the + * module does not have a version or the version is + * {@linkplain Version#parse(String) unparseable} */ public Optional version() { return Optional.ofNullable(version); } /** - * Returns a string containing this module's name and, if present, its - * version. + *

          Returns the string with the possibly-unparseable version of the + * module

          * - * @return A string containing this module's name and, if present, its - * version. + * @return The string containing the version of the module or an empty + * {@code Optional} if the module does not have a version + * + * @see #version() + */ + public Optional rawVersion() { + if (version != null) { + return Optional.of(version.toString()); + } else { + return Optional.ofNullable(rawVersionString); + } + } + + /** + *

          Returns a string containing the module name and, if present, its + * version.

          + * + * @return A string containing the module name and, if present, its + * version */ public String toNameAndVersion() { if (version != null) { @@ -1268,51 +1461,22 @@ public class ModuleDescriptor } /** - * Returns the module's main class. + *

          Returns the module main class.

          * - * @return The fully qualified class name of this module's main class + * @return The fully qualified class name of the module's main class */ public Optional mainClass() { return Optional.ofNullable(mainClass); } /** - * Returns the operating system name if this module is operating system - * specific. + * Returns the set of packages in the module. * - * @return The operating system name or an empty {@code Optional} - * if this module is not operating system specific - */ - public Optional osName() { - return Optional.ofNullable(osName); - } - - /** - * Returns the operating system architecture if this module is operating - * system architecture specific. + *

          The set of packages includes all exported and open packages, as well + * as the packages of any service providers, and the package for the main + * class.

          * - * @return The operating system architecture or an empty {@code Optional} - * if this module is not operating system architecture specific - */ - public Optional osArch() { - return Optional.ofNullable(osArch); - } - - /** - * Returns the operating system version if this module is operating - * system version specific. - * - * @return The operating system version or an empty {@code Optional} - * if this module is not operating system version specific - */ - public Optional osVersion() { - return Optional.ofNullable(osVersion); - } - - /** - * Returns the names of all packages in this module. - * - * @return A possibly-empty unmodifiable set of all packages in the module + * @return A possibly-empty unmodifiable set of the packages in the module */ public Set packages() { return packages; @@ -1320,77 +1484,81 @@ public class ModuleDescriptor /** - * A builder used for building {@link ModuleDescriptor} objects. + * A builder for building {@link ModuleDescriptor} objects. * - *

          {@code ModuleDescriptor} defines the {@link #module module}, {@link - * #openModule openModule}, and {@link #automaticModule automaticModule} - * methods to create builders for building different kinds of modules.

          + *

          {@code ModuleDescriptor} defines the {@link #newModule newModule}, + * {@link #newOpenModule newOpenModule}, and {@link #newAutomaticModule + * newAutomaticModule} methods to create builders for building + * normal, open, and automatic modules.

          + * + *

          The set of packages in the module are accumulated by the {@code + * Builder} as the {@link ModuleDescriptor.Builder#exports(String) exports}, + * {@link ModuleDescriptor.Builder#opens(String) opens}, + * {@link ModuleDescriptor.Builder#packages(Set) packages}, + * {@link ModuleDescriptor.Builder#provides(String,List) provides}, and + * {@link ModuleDescriptor.Builder#mainClass(String) mainClass} methods are + * invoked.

          + * + *

          The module names, package names, and class names that are parameters + * specified to the builder methods are the module names, package names, + * and qualified names of classes (in named packages) as defined in the + * The Java™ Language Specification.

          * *

          Example usage:

          - *
          {@code    ModuleDescriptor descriptor = ModuleDescriptor.module("m1")
          -     *         .exports("p")
          -     *         .requires("m2")
          +     * 
          {@code    ModuleDescriptor descriptor = ModuleDescriptor.newModule("stats.core")
          +     *         .requires("java.base")
          +     *         .exports("org.acme.stats.core.clustering")
          +     *         .exports("org.acme.stats.core.regression")
          +     *         .packages(Set.of("org.acme.stats.core.internal"))
                *         .build();
                * }
          * * @apiNote A {@code Builder} checks the components and invariants as - * components are added to the builder. The rational for this is to detect + * components are added to the builder. The rationale for this is to detect * errors as early as possible and not defer all validation to the - * {@link #build build} method. A {@code Builder} cannot be used to create - * a {@link ModuleDescriptor#isSynthetic() synthetic} module. + * {@link #build build} method. * * @since 9 + * @spec JPMS */ public static final class Builder { final String name; - final boolean strict; // true if module names are checked + final boolean strict; + final Set modifiers; final boolean open; - final boolean synthetic; - boolean automatic; + final boolean automatic; + final Set packages = new HashSet<>(); final Map requires = new HashMap<>(); final Map exports = new HashMap<>(); final Map opens = new HashMap<>(); - final Set concealedPackages = new HashSet<>(); final Set uses = new HashSet<>(); final Map provides = new HashMap<>(); Version version; - String osName; - String osArch; - String osVersion; + String rawVersionString; String mainClass; /** * Initializes a new builder with the given module name. * - * @param strict - * Indicates whether module names are checked or not + * If {@code strict} is {@code true} then module, package, and class + * names are checked to ensure they are legal names. In addition, the + * {@link #build buid} method will add "{@code requires java.base}" if + * the dependency is not declared. */ - Builder(String name, boolean strict, boolean open, boolean synthetic) { + Builder(String name, boolean strict, Set modifiers) { this.name = (strict) ? requireModuleName(name) : name; this.strict = strict; - this.open = open; - this.synthetic = synthetic; - } - - /* package */ Builder automatic(boolean automatic) { - this.automatic = automatic; - return this; + this.modifiers = modifiers; + this.open = modifiers.contains(Modifier.OPEN); + this.automatic = modifiers.contains(Modifier.AUTOMATIC); + assert !open || !automatic; } /** - * Returns the set of packages that are exported (unconditionally or - * unconditionally). + * Returns a snapshot of the packages in the module. */ - /* package */ Set exportedPackages() { - return exports.keySet(); - } - - /** - * Returns the set of packages that are opened (unconditionally or - * unconditionally). - */ - /* package */Set openPackages() { - return opens.keySet(); + /* package */ Set packages() { + return Collections.unmodifiableSet(packages); } /** @@ -1406,8 +1574,12 @@ public class ModuleDescriptor * initialized to build * @throws IllegalStateException * If the dependence on the module has already been declared + * or this builder is for an automatic module */ public Builder requires(Requires req) { + if (automatic) + throw new IllegalStateException("Automatic modules cannot declare" + + " dependences"); String mn = req.name(); if (name.equals(mn)) throw new IllegalArgumentException("Dependence on self"); @@ -1433,11 +1605,12 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the module name is {@code null}, is not a legal Java - * identifier, or is equal to the module name that this builder + * If the module name is {@code null}, is not a legal module + * name, or is equal to the module name that this builder * was initialized to build * @throws IllegalStateException * If the dependence on the module has already been declared + * or this builder is for an automatic module */ public Builder requires(Set ms, String mn, @@ -1445,7 +1618,21 @@ public class ModuleDescriptor Objects.requireNonNull(compiledVersion); if (strict) mn = requireModuleName(mn); - return requires(new Requires(ms, mn, compiledVersion)); + return requires(new Requires(ms, mn, compiledVersion, null)); + } + + /* package */Builder requires(Set ms, + String mn, + String rawCompiledVersion) { + Requires r; + try { + Version v = Version.parse(rawCompiledVersion); + r = new Requires(ms, mn, v, null); + } catch (IllegalArgumentException e) { + if (strict) throw e; + r = new Requires(ms, mn, null, rawCompiledVersion); + } + return requires(r); } /** @@ -1460,16 +1647,17 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the module name is {@code null}, is not a legal Java - * identifier, or is equal to the module name that this builder + * If the module name is {@code null}, is not a legal module + * name, or is equal to the module name that this builder * was initialized to build * @throws IllegalStateException * If the dependence on the module has already been declared + * or this builder is for an automatic module */ public Builder requires(Set ms, String mn) { if (strict) mn = requireModuleName(mn); - return requires(new Requires(ms, mn, null)); + return requires(new Requires(ms, mn, null, null)); } /** @@ -1481,18 +1669,19 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the module name is {@code null}, is not a legal Java - * identifier, or is equal to the module name that this builder + * If the module name is {@code null}, is not a legal module + * name, or is equal to the module name that this builder * was initialized to build * @throws IllegalStateException * If the dependence on the module has already been declared + * or this builder is for an automatic module */ public Builder requires(String mn) { return requires(EnumSet.noneOf(Requires.Modifier.class), mn); } /** - * Adds an export. + * Adds an exported package. * * @param e * The export @@ -1500,29 +1689,27 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method or the package is already - * declared as exported + * If the {@link Exports#source package} is already declared as + * exported or this builder is for an automatic module */ public Builder exports(Exports e) { - // can't be exported and concealed - String source = e.source(); - if (concealedPackages.contains(source)) { - throw new IllegalStateException("Package " + source - + " already declared"); + if (automatic) { + throw new IllegalStateException("Automatic modules cannot declare" + + " exported packages"); } + String source = e.source(); if (exports.containsKey(source)) { throw new IllegalStateException("Exported package " + source + " already declared"); } - exports.put(source, e); + packages.add(source); return this; } /** - * Adds an export, with the given (and possibly empty) set of modifiers, - * to export a package to a set of target modules. + * Adds an exported package with the given (and possibly empty) set of + * modifiers. The package is exported to a set of target modules. * * @param ms * The set of modifiers @@ -1534,33 +1721,34 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the package name or any of the target modules is {@code - * null} or is not a legal Java identifier, or the set of - * targets is empty + * If the package name is {@code null} or is not a legal + * package name, the set of target modules is empty, or the set + * of target modules contains a name that is not a legal module + * name * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method or the package is already - * declared as exported + * If the package is already declared as exported + * or this builder is for an automatic module */ public Builder exports(Set ms, String pn, Set targets) { - Exports e = new Exports(ms, requirePackageName(pn), targets); + Exports e = new Exports(ms, pn, targets); // check targets targets = e.targets(); if (targets.isEmpty()) throw new IllegalArgumentException("Empty target set"); - if (strict) + if (strict) { + requirePackageName(e.source()); targets.stream().forEach(Checks::requireModuleName); - + } return exports(e); } /** - * Adds an unqualified export with the given (and possibly empty) set - * of modifiers. + * Adds an exported package with the given (and possibly empty) set of + * modifiers. The package is exported to all modules. * * @param ms * The set of modifiers @@ -1570,160 +1758,22 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the package name is {@code null} or is not a legal Java - * identifier + * If the package name is {@code null} or is not a legal + * package name * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method or the package is already - * declared as exported + * If the package is already declared as exported + * or this builder is for an automatic module */ public Builder exports(Set ms, String pn) { - Exports e = new Exports(ms, requirePackageName(pn), Collections.emptySet()); + if (strict) { + requirePackageName(pn); + } + Exports e = new Exports(ms, pn, Collections.emptySet()); return exports(e); } /** - * Adds an export to export a package to a set of target modules. - * - * @param pn - * The package name - * @param targets - * The set of target modules names - * - * @return This builder - * - * @throws IllegalArgumentException - * If the package name or any of the target modules is {@code - * null} or is not a legal Java identifier, or the set of - * targets is empty - * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method or the package is already - * declared as exported - */ - public Builder exports(String pn, Set targets) { - return exports(Collections.emptySet(), pn, targets); - } - - /** - * Adds an unqualified export. - * - * @param pn - * The package name - * - * @return This builder - * - * @throws IllegalArgumentException - * If the package name is {@code null} or is not a legal Java - * identifier - * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method or the package is already - * declared as exported - */ - public Builder exports(String pn) { - return exports(Collections.emptySet(), pn); - } - - /** - * Adds an opens directive. - * - * @param obj - * The {@code Opens} object - * - * @return This builder - * - * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method, the package is already - * declared as open, or this is a builder for an open module - */ - public Builder opens(Opens obj) { - if (open) { - throw new IllegalStateException("open modules cannot declare" - + " open packages"); - } - - // can't be open and concealed - String source = obj.source(); - if (concealedPackages.contains(source)) { - throw new IllegalStateException("Package " + source - + " already declared"); - } - if (opens.containsKey(source)) { - throw new IllegalStateException("Open package " + source - + " already declared"); - } - - opens.put(source, obj); - return this; - } - - - /** - * Adds an opens directive, with the given (and possibly empty) - * set of modifiers, to open a package to a set of target modules. - * - * @param ms - * The set of modifiers - * @param pn - * The package name - * @param targets - * The set of target modules names - * - * @return This builder - * - * @throws IllegalArgumentException - * If the package name or any of the target modules is {@code - * null} or is not a legal Java identifier, or the set of - * targets is empty - * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method, the package is already - * declared as open, or this is a builder for an open module - */ - public Builder opens(Set ms, - String pn, - Set targets) - { - Opens e = new Opens(ms, requirePackageName(pn), targets); - - // check targets - targets = e.targets(); - if (targets.isEmpty()) - throw new IllegalArgumentException("Empty target set"); - if (strict) - targets.stream().forEach(Checks::requireModuleName); - - return opens(e); - } - - /** - * Adds an opens directive to open a package with the given (and - * possibly empty) set of modifiers. - * - * @param ms - * The set of modifiers - * @param pn - * The package name - * - * @return This builder - * - * @throws IllegalArgumentException - * If the package name is {@code null} or is not a legal Java - * identifier - * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method, the package is already - * declared as open, or this is a builder for an open module - */ - public Builder opens(Set ms, String pn) { - Opens e = new Opens(ms, requirePackageName(pn), Collections.emptySet()); - return opens(e); - } - - /** - * Adds an opens directive to open a package to a set of target + * Adds an exported package. The package is exported to a set of target * modules. * * @param pn @@ -1734,20 +1784,20 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the package name or any of the target modules is {@code - * null} or is not a legal Java identifier, or the set of - * targets is empty + * If the package name is {@code null} or is not a legal + * package name, the set of target modules is empty, or the set + * of target modules contains a name that is not a legal module + * name * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method, the package is already - * declared as open, or this is a builder for an open module + * If the package is already declared as exported + * or this builder is for an automatic module */ - public Builder opens(String pn, Set targets) { - return opens(Collections.emptySet(), pn, targets); + public Builder exports(String pn, Set targets) { + return exports(Collections.emptySet(), pn, targets); } /** - * Adds an opens directive to open a package. + * Adds an exported package. The package is exported to all modules. * * @param pn * The package name @@ -1755,12 +1805,146 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the package name is {@code null} or is not a legal Java - * identifier + * If the package name is {@code null} or is not a legal + * package name * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method, the package is already - * declared as open, or this is a builder for an open module + * If the package is already declared as exported + * or this builder is for an automatic module + */ + public Builder exports(String pn) { + return exports(Collections.emptySet(), pn); + } + + /** + * Adds an open package. + * + * @param obj + * The {@code Opens} object + * + * @return This builder + * + * @throws IllegalStateException + * If the package is already declared as open, or this is a + * builder for an open module or automatic module + */ + public Builder opens(Opens obj) { + if (open || automatic) { + throw new IllegalStateException("Open or automatic modules cannot" + + " declare open packages"); + } + String source = obj.source(); + if (opens.containsKey(source)) { + throw new IllegalStateException("Open package " + source + + " already declared"); + } + opens.put(source, obj); + packages.add(source); + return this; + } + + + /** + * Adds an open package with the given (and possibly empty) set of + * modifiers. The package is open to a set of target modules. + * + * @param ms + * The set of modifiers + * @param pn + * The package name + * @param targets + * The set of target modules names + * + * @return This builder + * + * @throws IllegalArgumentException + * If the package name is {@code null} or is not a legal + * package name, the set of target modules is empty, or the set + * of target modules contains a name that is not a legal module + * name + * @throws IllegalStateException + * If the package is already declared as open, or this is a + * builder for an open module or automatic module + */ + public Builder opens(Set ms, + String pn, + Set targets) + { + Opens opens = new Opens(ms, pn, targets); + + // check targets + targets = opens.targets(); + if (targets.isEmpty()) + throw new IllegalArgumentException("Empty target set"); + if (strict) { + requirePackageName(opens.source()); + targets.stream().forEach(Checks::requireModuleName); + } + return opens(opens); + } + + /** + * Adds an open package with the given (and possibly empty) set of + * modifiers. The package is open to all modules. + * + * @param ms + * The set of modifiers + * @param pn + * The package name + * + * @return This builder + * + * @throws IllegalArgumentException + * If the package name is {@code null} or is not a legal + * package name + * @throws IllegalStateException + * If the package is already declared as open, or this is a + * builder for an open module or automatic module + */ + public Builder opens(Set ms, String pn) { + if (strict) { + requirePackageName(pn); + } + Opens e = new Opens(ms, pn, Collections.emptySet()); + return opens(e); + } + + /** + * Adds an open package. The package is open to a set of target modules. + * + * @param pn + * The package name + * @param targets + * The set of target modules names + * + * @return This builder + * + * @throws IllegalArgumentException + * If the package name is {@code null} or is not a legal + * package name, the set of target modules is empty, or the set + * of target modules contains a name that is not a legal module + * name + * @throws IllegalStateException + * If the package is already declared as open, or this is a + * builder for an open module or automatic module + */ + public Builder opens(String pn, Set targets) { + return opens(Collections.emptySet(), pn, targets); + } + + /** + * Adds an open package. The package is open to all modules. + * + * @param pn + * The package name + * + * @return This builder + * + * @throws IllegalArgumentException + * If the package name is {@code null} or is not a legal + * package name + * @throws IllegalStateException + * If the package is already declared as open, or this is a + * builder for an open module or automatic module */ public Builder opens(String pn) { return opens(Collections.emptySet(), pn); @@ -1775,12 +1959,16 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the service type is {@code null} or is not a legal Java - * identifier + * If the service type is {@code null} or not a qualified name of + * a class in a named package * @throws IllegalStateException * If a dependency on the service type has already been declared + * or this is a builder for an automatic module */ public Builder uses(String service) { + if (automatic) + throw new IllegalStateException("Automatic modules can not declare" + + " service dependences"); if (uses.contains(requireServiceTypeName(service))) throw new IllegalStateException("Dependence upon service " + service + " already declared"); @@ -1789,7 +1977,9 @@ public class ModuleDescriptor } /** - * Provides a service with one or more implementations. + * Provides a service with one or more implementations. The package for + * each {@link Provides#providers provider} (or provider factory) is + * added to the module if not already added. * * @param p * The provides @@ -1801,16 +1991,18 @@ public class ModuleDescriptor * declared */ public Builder provides(Provides p) { - String st = p.service(); - if (provides.containsKey(st)) + String service = p.service(); + if (provides.containsKey(service)) throw new IllegalStateException("Providers of service " - + st + " already declared"); - provides.put(st, p); + + service + " already declared"); + provides.put(service, p); + p.providers().forEach(name -> packages.add(packageName(name))); return this; } /** - * Provides implementations of a service. + * Provides implementations of a service. The package for each provider + * (or provider factory) is added to the module if not already added. * * @param service * The service type @@ -1821,103 +2013,59 @@ public class ModuleDescriptor * * @throws IllegalArgumentException * If the service type or any of the provider class names is - * {@code null} or is not a legal Java identifier, or the list - * of provider class names is empty + * {@code null} or not a qualified name of a class in a named + * package, or the list of provider class names is empty * @throws IllegalStateException * If the providers for the service type have already been * declared */ public Builder provides(String service, List providers) { - if (provides.containsKey(service)) - throw new IllegalStateException("Providers of service " - + service + " already declared by " + name); - - Provides p = new Provides(requireServiceTypeName(service), providers); + Provides p = new Provides(service, providers); // check providers after the set has been copied. List providerNames = p.providers(); if (providerNames.isEmpty()) throw new IllegalArgumentException("Empty providers set"); - providerNames.forEach(Checks::requireServiceProviderName); - provides.put(service, p); - return this; + if (strict) { + requireServiceTypeName(p.service()); + providerNames.forEach(Checks::requireServiceProviderName); + } else { + // Disallow service/providers in unnamed package + String pn = packageName(service); + if (pn.isEmpty()) { + throw new IllegalArgumentException(service + + ": unnamed package"); + } + for (String name : providerNames) { + pn = packageName(name); + if (pn.isEmpty()) { + throw new IllegalArgumentException(name + + ": unnamed package"); + } + } + } + return provides(p); } /** - * Provides an implementation of a service. - * - * @param service - * The service type - * @param provider - * The provider or provider factory class name - * - * @return This builder - * - * @throws IllegalArgumentException - * If the service type or the provider class name is {@code - * null} or is not a legal Java identifier - * @throws IllegalStateException - * If the providers for the service type have already been - * declared - */ - public Builder provides(String service, String provider) { - if (provider == null) - throw new IllegalArgumentException("'provider' is null"); - return provides(service, List.of(provider)); - } - - /** - * Adds a (possible empty) set of packages to the module + * Adds packages to the module. All packages in the set of package names + * that are not in the module are added to module. * * @param pns - * The set of package names + * The (possibly empty) set of package names * * @return This builder * * @throws IllegalArgumentException * If any of the package names is {@code null} or is not a - * legal Java identifier - * @throws IllegalStateException - * If any of packages are already declared as packages in - * the module. This includes packages that are already - * declared as exported or open packages. + * legal package name */ - public Builder contains(Set pns) { - pns.forEach(this::contains); - return this; - } - - /** - * Adds a package to the module. - * - * @param pn - * The package name - * - * @return This builder - * - * @throws IllegalArgumentException - * If the package name is {@code null}, or is not a legal Java - * identifier - * @throws IllegalStateException - * If the package is already declared as a package in the - * module. This includes the package already declared as an - * exported or open package. - */ - public Builder contains(String pn) { - Checks.requirePackageName(pn); - if (concealedPackages.contains(pn)) { - throw new IllegalStateException("Package " + pn - + " already declared"); + public Builder packages(Set pns) { + if (strict) { + pns = new HashSet<>(pns); + pns.forEach(Checks::requirePackageName); } - if (exports.containsKey(pn)) { - throw new IllegalStateException("Exported package " - + pn + " already declared"); - } - if (opens.containsKey(pn)) { - throw new IllegalStateException("Open package " - + pn + " already declared"); - } - concealedPackages.add(pn); + this.packages.addAll(pns); return this; } @@ -1931,28 +2079,41 @@ public class ModuleDescriptor */ public Builder version(Version v) { version = requireNonNull(v); + rawVersionString = null; return this; } /** * Sets the module version. * - * @param v + * @param vs * The version string to parse * * @return This builder * * @throws IllegalArgumentException - * If {@code v} is null or cannot be parsed as a version string + * If {@code vs} is {@code null} or cannot be parsed as a + * version string * * @see Version#parse(String) */ - public Builder version(String v) { - return version(Version.parse(v)); + public Builder version(String vs) { + try { + version = Version.parse(vs); + rawVersionString = null; + } catch (IllegalArgumentException e) { + if (strict) throw e; + version = null; + rawVersionString = vs; + } + return this; } /** - * Sets the module main class. + * Sets the module main class. The package for the main class is added + * to the module if not already added. In other words, this method is + * equivalent to first invoking this builder's {@link #packages(Set) + * packages} method to add the package name of the main class. * * @param mc * The module main class @@ -1960,100 +2121,67 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If {@code mainClass} is null or is not a legal Java identifier + * If {@code mainClass} is {@code null} or not a qualified + * name of a class in a named package */ public Builder mainClass(String mc) { - mainClass = requireBinaryName("main class name", mc); - return this; - } - - /** - * Sets the operating system name. - * - * @param name - * The operating system name - * - * @return This builder - * - * @throws IllegalArgumentException - * If {@code name} is null or the empty String - */ - public Builder osName(String name) { - if (name == null || name.isEmpty()) - throw new IllegalArgumentException("OS name is null or empty"); - osName = name; - return this; - } - - /** - * Sets the operating system architecture. - * - * @param arch - * The operating system architecture - * - * @return This builder - * - * @throws IllegalArgumentException - * If {@code name} is null or the empty String - */ - public Builder osArch(String arch) { - if (arch == null || arch.isEmpty()) - throw new IllegalArgumentException("OS arch is null or empty"); - osArch = arch; - return this; - } - - /** - * Sets the operating system version. - * - * @param version - * The operating system version - * - * @return This builder - * - * @throws IllegalArgumentException - * If {@code name} is null or the empty String - */ - public Builder osVersion(String version) { - if (version == null || version.isEmpty()) - throw new IllegalArgumentException("OS version is null or empty"); - osVersion = version; + String pn; + if (strict) { + mc = requireQualifiedClassName("main class name", mc); + pn = packageName(mc); + assert !pn.isEmpty(); + } else { + // Disallow main class in unnamed package + pn = packageName(mc); + if (pn.isEmpty()) { + throw new IllegalArgumentException(mc + ": unnamed package"); + } + } + packages.add(pn); + mainClass = mc; return this; } /** * Builds and returns a {@code ModuleDescriptor} from its components. * + *

          The module will require "{@code java.base}" even if the dependence + * has not been declared (the exception is when building a module named + * "{@code java.base}" as it cannot require itself). The dependence on + * "{@code java.base}" will have the {@link + * java.lang.module.ModuleDescriptor.Requires.Modifier#MANDATED MANDATED} + * modifier if the dependence was not declared.

          + * * @return The module descriptor */ public ModuleDescriptor build() { Set requires = new HashSet<>(this.requires.values()); - - Set packages = new HashSet<>(); - packages.addAll(exports.keySet()); - packages.addAll(opens.keySet()); - packages.addAll(concealedPackages); - Set exports = new HashSet<>(this.exports.values()); Set opens = new HashSet<>(this.opens.values()); + // add dependency on java.base + if (strict + && !name.equals("java.base") + && !this.requires.containsKey("java.base")) { + requires.add(new Requires(Set.of(Requires.Modifier.MANDATED), + "java.base", + null, + null)); + } + Set provides = new HashSet<>(this.provides.values()); return new ModuleDescriptor(name, version, - open, - automatic, - synthetic, + rawVersionString, + modifiers, requires, exports, opens, uses, provides, packages, - mainClass, - osName, - osArch, - osVersion); + mainClass); } } @@ -2062,16 +2190,22 @@ public class ModuleDescriptor * Compares this module descriptor to another. * *

          Two {@code ModuleDescriptor} objects are compared by comparing their - * module name lexicographically. Where the module names are equal then - * the versions, if present, are compared.

          - * - * @apiNote For now, the natural ordering is not consistent with equals. - * If two module descriptors have equal module names, equal versions if - * present, but their corresponding components are not equal, then they - * will be considered equal by this method. + * module names lexicographically. Where the module names are equal then the + * module versions are compared. When comparing the module versions then a + * module descriptor with a version is considered to succeed a module + * descriptor that does not have a version. If both versions are {@linkplain + * Version#parse(String) unparseable} then the {@linkplain #rawVersion() + * raw version strings} are compared lexicographically. Where the module names + * are equal and the versions are equal (or not present in both), then the + * set of modifiers are compared. Sets of modifiers are compared by comparing + * a binary value computed for each set. If a modifier is present + * in the set then the bit at the position of its ordinal is {@code 1} + * in the binary value, otherwise {@code 0}. If the two set of modifiers + * are also equal then the other components of the module descriptors are + * compared in a manner that is consistent with {@code equals}.

          * * @param that - * The object to which this module descriptor is to be compared + * The module descriptor to compare * * @return A negative integer, zero, or a positive integer if this module * descriptor is less than, equal to, or greater than the given @@ -2079,16 +2213,44 @@ public class ModuleDescriptor */ @Override public int compareTo(ModuleDescriptor that) { + if (this == that) return 0; + int c = this.name().compareTo(that.name()); if (c != 0) return c; - if (version == null) { - if (that.version == null) - return 0; - return -1; - } - if (that.version == null) - return +1; - return version.compareTo(that.version); + + c = compare(this.version, that.version); + if (c != 0) return c; + + c = compare(this.rawVersionString, that.rawVersionString); + if (c != 0) return c; + + long v1 = modsValue(this.modifiers()); + long v2 = modsValue(that.modifiers()); + c = Long.compare(v1, v2); + if (c != 0) return c; + + c = compare(this.requires, that.requires); + if (c != 0) return c; + + c = compare(this.packages, that.packages); + if (c != 0) return c; + + c = compare(this.exports, that.exports); + if (c != 0) return c; + + c = compare(this.opens, that.opens); + if (c != 0) return c; + + c = compare(this.uses, that.uses); + if (c != 0) return c; + + c = compare(this.provides, that.provides); + if (c != 0) return c; + + c = compare(this.mainClass, that.mainClass); + if (c != 0) return c; + + return 0; } /** @@ -2115,24 +2277,18 @@ public class ModuleDescriptor return false; ModuleDescriptor that = (ModuleDescriptor)ob; return (name.equals(that.name) - && open == that.open - && automatic == that.automatic - && synthetic == that.synthetic + && modifiers.equals(that.modifiers) && requires.equals(that.requires) + && Objects.equals(packages, that.packages) && exports.equals(that.exports) && opens.equals(that.opens) && uses.equals(that.uses) && provides.equals(that.provides) && Objects.equals(version, that.version) - && Objects.equals(mainClass, that.mainClass) - && Objects.equals(osName, that.osName) - && Objects.equals(osArch, that.osArch) - && Objects.equals(osVersion, that.osVersion) - && Objects.equals(packages, that.packages)); + && Objects.equals(rawVersionString, that.rawVersionString) + && Objects.equals(mainClass, that.mainClass)); } - private transient int hash; // cached hash code - /** * Computes a hash code for this module descriptor. * @@ -2147,31 +2303,28 @@ public class ModuleDescriptor int hc = hash; if (hc == 0) { hc = name.hashCode(); - hc = hc * 43 + Boolean.hashCode(open); - hc = hc * 43 + Boolean.hashCode(automatic); - hc = hc * 43 + Boolean.hashCode(synthetic); + hc = hc * 43 + Objects.hashCode(modifiers); hc = hc * 43 + requires.hashCode(); + hc = hc * 43 + Objects.hashCode(packages); hc = hc * 43 + exports.hashCode(); hc = hc * 43 + opens.hashCode(); hc = hc * 43 + uses.hashCode(); hc = hc * 43 + provides.hashCode(); hc = hc * 43 + Objects.hashCode(version); + hc = hc * 43 + Objects.hashCode(rawVersionString); hc = hc * 43 + Objects.hashCode(mainClass); - hc = hc * 43 + Objects.hashCode(osName); - hc = hc * 43 + Objects.hashCode(osArch); - hc = hc * 43 + Objects.hashCode(osVersion); - hc = hc * 43 + Objects.hashCode(packages); if (hc == 0) hc = -1; hash = hc; } return hc; } + private transient int hash; // cached hash code /** - * Returns a string describing this descriptor. + *

          Returns a string describing the module.

          * - * @return A string describing this descriptor + * @return A string describing the module */ @Override public String toString() { @@ -2201,31 +2354,50 @@ public class ModuleDescriptor * * @param name * The module name + * @param ms + * The set of module modifiers * * @return A new builder * * @throws IllegalArgumentException - * If the module name is {@code null} or is not a legal Java - * identifier + * If the module name is {@code null} or is not a legal module + * name, or the set of modifiers contains {@link + * Modifier#AUTOMATIC AUTOMATIC} with other modifiers */ - public static Builder module(String name) { - return new Builder(name, true, false, false); + public static Builder newModule(String name, Set ms) { + Set mods = new HashSet<>(ms); + if (mods.contains(Modifier.AUTOMATIC) && mods.size() > 1) + throw new IllegalArgumentException("AUTOMATIC cannot be used with" + + " other modifiers"); + + return new Builder(name, true, mods); + } + + /** + * Instantiates a builder to build a module descriptor for a normal + * module. This method is equivalent to invoking {@link #newModule(String,Set) + * newModule} with an empty set of {@link ModuleDescriptor.Modifier modifiers}. + * + * @param name + * The module name + * + * @return A new builder + * + * @throws IllegalArgumentException + * If the module name is {@code null} or is not a legal module + * name + */ + public static Builder newModule(String name) { + return new Builder(name, true, Set.of()); } /** * Instantiates a builder to build a module descriptor for an open module. - * An open module does not declare any open packages but the resulting - * module is treated as if all packages are open. + * This method is equivalent to invoking {@link #newModule(String,Set) + * newModule} with the {@link ModuleDescriptor.Modifier#OPEN OPEN} modifier. * - *

          As an example, the following creates a module descriptor for an open - * name "{@code m}" containing two packages, one of which is exported.

          - *
          {@code
          -     *     ModuleDescriptor descriptor = ModuleDescriptor.openModule("m")
          -     *         .requires("java.base")
          -     *         .exports("p")
          -     *         .contains("q")
          -     *         .build();
          -     * }
          + *

          The builder for an open module cannot be used to declare any open + * packages.

          * * @param name * The module name @@ -2233,19 +2405,22 @@ public class ModuleDescriptor * @return A new builder that builds an open module * * @throws IllegalArgumentException - * If the module name is {@code null} or is not a legal Java - * identifier + * If the module name is {@code null} or is not a legal module + * name */ - public static Builder openModule(String name) { - return new Builder(name, true, true, false); + public static Builder newOpenModule(String name) { + return new Builder(name, true, Set.of(Modifier.OPEN)); } /** * Instantiates a builder to build a module descriptor for an automatic - * module. Automatic modules receive special treatment during resolution - * (see {@link Configuration}) so that they read all other modules. When - * Instantiated in the Java virtual machine as a {@link java.lang.reflect.Module} - * then the Module reads every unnamed module in the Java virtual machine. + * module. This method is equivalent to invoking {@link #newModule(String,Set) + * newModule} with the {@link ModuleDescriptor.Modifier#AUTOMATIC AUTOMATIC} + * modifier. + * + *

          The builder for an automatic module cannot be used to declare module + * or service dependences. It also cannot be used to declare any exported + * or open packages.

          * * @param name * The module name @@ -2253,13 +2428,13 @@ public class ModuleDescriptor * @return A new builder that builds an automatic module * * @throws IllegalArgumentException - * If the module name is {@code null} or is not a legal Java - * identifier + * If the module name is {@code null} or is not a legal module + * name * * @see ModuleFinder#of(Path[]) */ - public static Builder automaticModule(String name) { - return new Builder(name, true, false, false).automatic(true); + public static Builder newAutomaticModule(String name) { + return new Builder(name, true, Set.of(Modifier.AUTOMATIC)); } @@ -2269,8 +2444,12 @@ public class ModuleDescriptor * *

          If the descriptor encoded in the input stream does not indicate a * set of packages in the module then the {@code packageFinder} will be - * invoked. If the {@code packageFinder} throws an {@link UncheckedIOException} - * then {@link IOException} cause will be re-thrown.

          + * invoked. The set of packages that the {@code packageFinder} returns + * must include all the packages that the module exports, opens, as well + * as the packages of the service implementations that the module provides, + * and the package of the main class (if the module has a main class). If + * the {@code packageFinder} throws an {@link UncheckedIOException} then + * {@link IOException} cause will be re-thrown.

          * *

          If there are bytes following the module descriptor then it is * implementation specific as to whether those bytes are read, ignored, @@ -2292,7 +2471,9 @@ public class ModuleDescriptor * @return The module descriptor * * @throws InvalidModuleDescriptorException - * If an invalid module descriptor is detected + * If an invalid module descriptor is detected or the set of + * packages returned by the {@code packageFinder} does not include + * all of the packages obtained from the module descriptor * @throws IOException * If an I/O error occurs reading from the input stream or {@code * UncheckedIOException} is thrown by the package finder @@ -2305,8 +2486,12 @@ public class ModuleDescriptor } /** - * Reads the binary form of a module declaration from an input stream - * as a module descriptor. + * Reads the binary form of a module declaration from an input stream as a + * module descriptor. This method works exactly as specified by the 2-arg + * {@link #read(InputStream,Supplier) read} method with the exception that + * a packager finder is not used to find additional packages when the + * module descriptor read from the stream does not indicate the set of + * packages. * * @param in * The input stream @@ -2327,7 +2512,13 @@ public class ModuleDescriptor * as a module descriptor. * *

          If the descriptor encoded in the byte buffer does not indicate a - * set of packages then the {@code packageFinder} will be invoked.

          + * set of packages in the module then the {@code packageFinder} will be + * invoked. The set of packages that the {@code packageFinder} returns + * must include all the packages that the module exports, opens, as well + * as the packages of the service implementations that the module provides, + * and the package of the main class (if the module has a main class). If + * the {@code packageFinder} throws an {@link UncheckedIOException} then + * {@link IOException} cause will be re-thrown.

          * *

          The module descriptor is read from the buffer stating at index * {@code p}, where {@code p} is the buffer's {@link ByteBuffer#position() @@ -2353,7 +2544,9 @@ public class ModuleDescriptor * @return The module descriptor * * @throws InvalidModuleDescriptorException - * If an invalid module descriptor is detected + * If an invalid module descriptor is detected or the set of + * packages returned by the {@code packageFinder} does not include + * all of the packages obtained from the module descriptor */ public static ModuleDescriptor read(ByteBuffer bb, Supplier> packageFinder) @@ -2362,8 +2555,11 @@ public class ModuleDescriptor } /** - * Reads the binary form of a module declaration from a byte buffer - * as a module descriptor. + * Reads the binary form of a module declaration from a byte buffer as a + * module descriptor. This method works exactly as specified by the 2-arg + * {@link #read(ByteBuffer,Supplier) read} method with the exception that a + * packager finder is not used to find additional packages when the module + * descriptor encoded in the buffer does not indicate the set of packages. * * @param bb * The byte buffer @@ -2398,6 +2594,11 @@ public class ModuleDescriptor } } + private static String packageName(String cn) { + int index = cn.lastIndexOf('.'); + return (index == -1) ? "" : cn.substring(0, index); + } + /** * Returns a string containing the given set of modifiers and label. */ @@ -2407,6 +2608,36 @@ public class ModuleDescriptor .collect(Collectors.joining(" ")); } + private static > + int compare(T obj1, T obj2) { + if (obj1 != null) { + return (obj2 != null) ? obj1.compareTo(obj2) : 1; + } else { + return (obj2 == null) ? 0 : -1; + } + } + + /** + * Compares two sets of {@code Comparable} objects. + */ + @SuppressWarnings("unchecked") + private static > + int compare(Set s1, Set s2) { + T[] a1 = (T[]) s1.toArray(); + T[] a2 = (T[]) s2.toArray(); + Arrays.sort(a1); + Arrays.sort(a2); + return Arrays.compare(a1, a2); + } + + private static > long modsValue(Set set) { + long value = 0; + for (Enum e : set) { + value += 1 << e.ordinal(); + } + return value; + } + static { /** * Setup the shared secret to allow code in other packages access @@ -2417,19 +2648,21 @@ public class ModuleDescriptor @Override public Builder newModuleBuilder(String mn, boolean strict, - boolean open, - boolean synthetic) { - return new Builder(mn, strict, open, synthetic); + Set modifiers) { + return new Builder(mn, strict, modifiers); } @Override - public Set exportedPackages(ModuleDescriptor.Builder builder) { - return builder.exportedPackages(); + public Set packages(ModuleDescriptor.Builder builder) { + return builder.packages(); } @Override - public Set openPackages(ModuleDescriptor.Builder builder) { - return builder.openPackages(); + public void requires(ModuleDescriptor.Builder builder, + Set ms, + String mn, + String rawCompiledVersion) { + builder.requires(ms, mn, rawCompiledVersion); } @Override @@ -2466,23 +2699,10 @@ public class ModuleDescriptor return new Provides(service, providers, true); } - @Override - public Version newVersion(String v) { - return new Version(v); - } - - @Override - public ModuleDescriptor newModuleDescriptor(ModuleDescriptor md, - Set pkgs) { - return new ModuleDescriptor(md, pkgs); - } - @Override public ModuleDescriptor newModuleDescriptor(String name, Version version, - boolean open, - boolean automatic, - boolean synthetic, + Set modifiers, Set requires, Set exports, Set opens, @@ -2490,15 +2710,10 @@ public class ModuleDescriptor Set provides, Set packages, String mainClass, - String osName, - String osArch, - String osVersion, int hashCode) { return new ModuleDescriptor(name, version, - open, - automatic, - synthetic, + modifiers, requires, exports, opens, @@ -2506,20 +2721,17 @@ public class ModuleDescriptor provides, packages, mainClass, - osName, - osArch, - osVersion, hashCode, false); } @Override - public Configuration resolveRequiresAndUses(ModuleFinder finder, - Collection roots, - boolean check, - PrintStream traceOutput) + public Configuration resolveAndBind(ModuleFinder finder, + Collection roots, + boolean check, + PrintStream traceOutput) { - return Configuration.resolveRequiresAndUses(finder, roots, check, traceOutput); + return Configuration.resolveAndBind(finder, roots, check, traceOutput); } }); } diff --git a/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java b/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java index 5d01f698806..5a8b8cb63f3 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -25,8 +25,6 @@ package java.lang.module; -import java.io.File; -import java.io.FilePermission; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -42,14 +40,15 @@ import java.util.Objects; import java.util.Optional; import java.util.Set; +import jdk.internal.module.ModuleBootstrap; +import jdk.internal.module.ModulePatcher; import jdk.internal.module.ModulePath; import jdk.internal.module.SystemModuleFinder; -import sun.security.action.GetPropertyAction; /** * A finder of modules. A {@code ModuleFinder} is used to find modules during - * resolution or - * service binding. + * resolution or + * service binding. * *

          A {@code ModuleFinder} can only find one module with a given name. A * {@code ModuleFinder} that finds modules in a sequence of directories, for @@ -85,6 +84,7 @@ import sun.security.action.GetPropertyAction; *

          A {@code ModuleFinder} is not required to be thread safe.

          * * @since 9 + * @spec JPMS */ public interface ModuleFinder { @@ -124,8 +124,8 @@ public interface ModuleFinder { * to find that module.

          * * @apiNote This is important to have for methods such as {@link - * Configuration#resolveRequiresAndUses resolveRequiresAndUses} that need - * to scan the module path to find modules that provide a specific service. + * Configuration#resolveAndBind resolveAndBind} that need to scan the + * module path to find modules that provide a specific service. * * @return The set of all module references that this finder locates * @@ -144,9 +144,9 @@ public interface ModuleFinder { * *

          If there is a security manager set then its {@link * SecurityManager#checkPermission(Permission) checkPermission} method is - * invoked to check that the caller has been granted {@link FilePermission} - * to recursively read the directory that is the value of the system - * property {@code java.home}.

          + * invoked to check that the caller has been granted + * {@link RuntimePermission RuntimePermission("accessSystemModules")} + * to access the system modules.

          * * @return A {@code ModuleFinder} that locates the system modules * @@ -154,31 +154,55 @@ public interface ModuleFinder { * If denied by the security manager */ static ModuleFinder ofSystem() { - String home; - SecurityManager sm = System.getSecurityManager(); if (sm != null) { - PrivilegedAction pa = new GetPropertyAction("java.home"); - home = AccessController.doPrivileged(pa); - Permission p = new FilePermission(home + File.separator + "-", "read"); - sm.checkPermission(p); + sm.checkPermission(new RuntimePermission("accessSystemModules")); + PrivilegedAction pa = ModuleFinder::privilegedOfSystem; + return AccessController.doPrivileged(pa); } else { - home = System.getProperty("java.home"); + return privilegedOfSystem(); } + } + /** + * Returns a module finder that locates the system modules. This method + * assumes it has permissions to access the runtime image. + */ + private static ModuleFinder privilegedOfSystem() { + String home = System.getProperty("java.home"); Path modules = Paths.get(home, "lib", "modules"); if (Files.isRegularFile(modules)) { return SystemModuleFinder.getInstance(); } else { - Path mlib = Paths.get(home, "modules"); - if (Files.isDirectory(mlib)) { - return of(mlib); + Path dir = Paths.get(home, "modules"); + if (Files.isDirectory(dir)) { + return privilegedOf(ModuleBootstrap.patcher(), dir); } else { throw new InternalError("Unable to detect the run-time image"); } } } + /** + * Returns a module finder that locates the system modules in an exploded + * image. The image may be patched. + */ + private static ModuleFinder privilegedOf(ModulePatcher patcher, Path dir) { + ModuleFinder finder = ModulePath.of(patcher, dir); + return new ModuleFinder() { + @Override + public Optional find(String name) { + PrivilegedAction> pa = () -> finder.find(name); + return AccessController.doPrivileged(pa); + } + @Override + public Set findAll() { + PrivilegedAction> pa = finder::findAll; + return AccessController.doPrivileged(pa); + } + }; + } + /** * Returns a module finder that locates modules on the file system by * searching a sequence of directories and/or packaged modules. @@ -198,100 +222,105 @@ public interface ModuleFinder { * *

          If an element is a path to a directory of modules then each entry in * the directory is a packaged module or the top-level directory of an - * exploded module. The module finder's {@link #find(String) find} or - * {@link #findAll() findAll} methods throw {@link FindException} if a - * directory containing more than one module with the same name is - * encountered.

          - * - *

          If an element in the array is a path to a directory, and that - * directory contains a file named {@code module-info.class}, then the + * exploded module. It is an error if a directory contains more than one + * module with the same name. If an element is a path to a directory, and + * that directory contains a file named {@code module-info.class}, then the * directory is treated as an exploded module rather than a directory of * modules.

          * - *

          The module finder returned by this method supports modules that are - * packaged as JAR files. A JAR file with a {@code module-info.class} in - * the top-level directory of the JAR file (or overridden by a versioned - * entry in a {@link java.util.jar.JarFile#isMultiRelease() multi-release} - * JAR file) is a modular JAR and is an explicit module. - * A JAR file that does not have a {@code module-info.class} in the - * top-level directory is an {@link ModuleDescriptor#isAutomatic automatic} - * module. The {@link ModuleDescriptor} for an automatic module is created as - * follows: + *

          The module finder returned by this method + * supports modules packaged as JAR files. A JAR file with a {@code + * module-info.class} in its top-level directory, or in a versioned entry + * in a {@linkplain java.util.jar.JarFile#isMultiRelease() multi-release} + * JAR file, is a modular JAR file and thus defines an explicit + * module. A JAR file that does not have a {@code module-info.class} in its + * top-level directory defines an automatic module, as follows: + *

          * *
            * - *
          • The module {@link ModuleDescriptor#name() name}, and {@link - * ModuleDescriptor#version() version} if applicable, is derived from - * the file name of the JAR file as follows:

            + *
          • If the JAR file has the attribute "{@code Automatic-Module-Name}" + * in its main manifest then its value is the {@linkplain + * ModuleDescriptor#name() module name}. The module name is otherwise + * derived from the name of the JAR file.

          • + * + *
          • The {@link ModuleDescriptor#version() version}, and the + * module name when the attribute "{@code Automatic-Module-Name}" is not + * present, are derived from the file name of the JAR file as follows:

            * *
              * - *
            • The {@code .jar} suffix is removed.

            • + *
            • The "{@code .jar}" suffix is removed.

            • * *
            • If the name matches the regular expression {@code * "-(\\d+(\\.|$))"} then the module name will be derived from the * subsequence preceding the hyphen of the first occurrence. The * subsequence after the hyphen is parsed as a {@link - * ModuleDescriptor.Version} and ignored if it cannot be parsed as - * a {@code Version}.

            • + * ModuleDescriptor.Version Version} and ignored if it cannot be + * parsed as a {@code Version}.

              * - *
            • For the module name, then any trailing digits and dots - * are removed, all non-alphanumeric characters ({@code [^A-Za-z0-9]}) - * are replaced with a dot ({@code "."}), all repeating dots are - * replaced with one dot, and all leading and trailing dots are - * removed.

            • + *
            • All non-alphanumeric characters ({@code [^A-Za-z0-9]}) + * in the module name are replaced with a dot ({@code "."}), all + * repeating dots are replaced with one dot, and all leading and + * trailing dots are removed.

            • * - *
            • As an example, a JAR file named {@code foo-bar.jar} will - * derive a module name {@code foo.bar} and no version. A JAR file - * named {@code foo-1.2.3-SNAPSHOT.jar} will derive a module name - * {@code foo} and {@code 1.2.3-SNAPSHOT} as the version.

            • + *
            • As an example, a JAR file named "{@code foo-bar.jar}" will + * derive a module name "{@code foo.bar}" and no version. A JAR file + * named "{@code foo-bar-1.2.3-SNAPSHOT.jar}" will derive a module + * name "{@code foo.bar}" and "{@code 1.2.3-SNAPSHOT}" as the version. + *

            • * *
          • * - *
          • It {@link ModuleDescriptor#requires() requires} {@code - * java.base}.

          • - * - *
          • The set of packages in the module is derived from the names - * of non-directory entries in the JAR file. A candidate package name - * is derived from an entry using the characters up to, but not - * including, the last forward slash. All remaining forward slashes are - * replaced with dot ({@code "."}). If the resulting string is a valid - * Java identifier then it is assumed to be a package name. For example, - * if the JAR file contains an entry "{@code p/q/Foo.class}" then the - * package name derived is "{@code p.q}". All packages are {@link - * ModuleDescriptor#exports() exported}.

          • + *
          • The set of packages in the module is derived from the + * non-directory entries in the JAR file that have names ending in + * "{@code .class}". A candidate package name is derived from the name + * using the characters up to, but not including, the last forward slash. + * All remaining forward slashes are replaced with dot ({@code "."}). If + * the resulting string is a legal package name then it is assumed to be + * a package name. For example, if the JAR file contains the entry + * "{@code p/q/Foo.class}" then the package name derived is + * "{@code p.q}".

          • * *
          • The contents of entries starting with {@code * META-INF/services/} are assumed to be service configuration files * (see {@link java.util.ServiceLoader}). If the name of a file - * (that follows {@code META-INF/services/}) is a legal Java identifier - * then it is assumed to be the fully-qualified binary name of a - * service type. The entries in the file are assumed to be the - * fully-qualified binary names of provider classes.

          • + * (that follows {@code META-INF/services/}) is a legal class name + * then it is assumed to be the fully-qualified class name of a service + * type. The entries in the file are assumed to be the fully-qualified + * class names of provider classes.

            * *
          • If the JAR file has a {@code Main-Class} attribute in its - * main manifest then its value is the {@link - * ModuleDescriptor#mainClass() main class}.

          • + * main manifest, its value is a legal class name, and its package is + * in the set of packages derived for the module, then the value is the + * module {@linkplain ModuleDescriptor#mainClass() main class}.

            * *
          * *

          If a {@code ModuleDescriptor} cannot be created (by means of the * {@link ModuleDescriptor.Builder ModuleDescriptor.Builder} API) for an - * automatic module then {@code FindException} is thrown. This can arise, - * for example, when a legal Java identifier name cannot be derived from - * the file name of the JAR file or where the JAR file contains a {@code - * .class} in the top-level directory of the JAR file.

          + * automatic module then {@code FindException} is thrown. This can arise + * when the value of the "{@code Automatic-Module-Name}" attribute is not a + * legal module name, a legal module name cannot be derived from the file + * name of the JAR file, where the JAR file contains a {@code .class} in + * the top-level directory of the JAR file, where an entry in a service + * configuration file is not a legal class name or its package name is not + * in the set of packages derived for the module.

          * *

          In addition to JAR files, an implementation may also support modules - * that are packaged in other implementation specific module formats. When - * a file is encountered that is not recognized as a packaged module then - * {@code FindException} is thrown. An implementation may choose to ignore - * some files, {@link java.nio.file.Files#isHidden hidden} files for - * example. Paths to files that do not exist are always ignored.

          + * that are packaged in other implementation specific module formats. If + * an element in the array specified to this method is a path to a directory + * of modules then entries in the directory that not recognized as modules + * are ignored. If an element in the array is a path to a packaged module + * that is not recognized then a {@code FindException} is thrown when the + * file is encountered. Paths to files that do not exist are always ignored. + *

          * *

          As with automatic modules, the contents of a packaged or exploded * module may need to be scanned in order to determine the packages - * in the module. If a {@code .class} file (other than {@code + * in the module. Whether {@linkplain java.nio.file.Files#isHidden(Path) + * hidden files} are ignored or not is implementation specific and therefore + * not specified. If a {@code .class} file (other than {@code * module-info.class}) is found in the top-level directory then it is * assumed to be a class in the unnamed package and so {@code FindException} * is thrown.

          @@ -325,7 +354,7 @@ public interface ModuleFinder { }; } - return new ModulePath(entries); + return ModulePath.of(entries); } /** diff --git a/jdk/src/java.base/share/classes/java/lang/module/ModuleReader.java b/jdk/src/java.base/share/classes/java/lang/module/ModuleReader.java index d79d210edd0..e97f32f7185 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ModuleReader.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ModuleReader.java @@ -45,10 +45,14 @@ import java.util.stream.Stream; * module. A module reader is also intended to be used by {@code ClassLoader} * implementations that load classes and resources from modules.

          * - *

          A resource in a module is identified by a name that is a + *

          A resource in a module is identified by an abstract name that is a * '{@code /}'-separated path string. For example, module {@code java.base} may * have a resource "{@code java/lang/Object.class}" that, by convention, is the - * class file for {@code java.lang.Object}.

          + * class file for {@code java.lang.Object}. A module reader may treat + * directories in the module content as resources (whether it does or not is + * module reader specific). Where the module content contains a directory + * that can be located as a resource then its name ends with a slash ('/'). The + * directory can also be located with a name that drops the trailing slash.

          * *

          A {@code ModuleReader} is {@linkplain ModuleReference#open open} upon * creation and is closed by invoking the {@link #close close} method. Failure @@ -61,8 +65,18 @@ import java.util.stream.Stream; * open}, {@link #read read}, and {@link #list list} methods may throw {@code * SecurityException} if access is denied by the security manager.

          * + * @implSpec Implementations of {@code ModuleReader} should take great care + * when translating an abstract resource name to the location of a resource in + * a packaged module or on the file system. Implementations are advised to + * treat resource names with elements such as '{@code .}, '{@code ..}', + * elements containing file separators, or empty elements as "not found". More + * generally, if the resource name is not in the stream of elements that the + * {@code list} method returns then the resource should be treated as "not + * found" to avoid inconsistencies. + * * @see ModuleReference * @since 9 + * @spec JPMS */ public interface ModuleReader extends Closeable { @@ -70,6 +84,9 @@ public interface ModuleReader extends Closeable { /** * Finds a resource, returning a URI to the resource in the module. * + *

          If the module reader can determine that the name locates a directory + * then the resulting URI will end with a slash ('/').

          + * * @param name * The name of the resource to open for reading * @@ -130,7 +147,7 @@ public interface ModuleReader extends Closeable { * * @apiNote This method is intended for high-performance class loading. It * is not capable (or intended) to read arbitrary large resources that - * could potentially be 2GB or larger. The rational for using this method + * could potentially be 2GB or larger. The rationale for using this method * in conjunction with the {@code release} method is to allow module reader * implementations manage buffers in an efficient manner. * @@ -148,6 +165,9 @@ public interface ModuleReader extends Closeable { * If an I/O error occurs or the module reader is closed * @throws SecurityException * If denied by the security manager + * @throws OutOfMemoryError + * If the resource is larger than {@code Integer.MAX_VALUE}, + * the maximum capacity of a byte buffer * * @see ClassLoader#defineClass(String, ByteBuffer, java.security.ProtectionDomain) */ @@ -182,7 +202,9 @@ public interface ModuleReader extends Closeable { /** * Lists the contents of the module, returning a stream of elements that - * are the names of all resources in the module. + * are the names of all resources in the module. Whether the stream of + * elements includes names corresponding to directories in the module is + * module reader specific. * *

          In lazy implementations then an {@code IOException} may be thrown * when using the stream to list the module contents. If this occurs then diff --git a/jdk/src/java.base/share/classes/java/lang/module/ModuleReference.java b/jdk/src/java.base/share/classes/java/lang/module/ModuleReference.java index 09a5acec219..54291e78dcc 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ModuleReference.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ModuleReference.java @@ -44,6 +44,7 @@ import java.util.Optional; * @see ModuleFinder * @see ModuleReader * @since 9 + * @spec JPMS */ public abstract class ModuleReference { @@ -76,7 +77,7 @@ public abstract class ModuleReference { /** * Returns the location of this module's content, if known. * - *

          This URI, when present, is used as the {@linkplain + *

          This URI, when present, can be used as the {@linkplain * java.security.CodeSource#getLocation location} value of a {@link * java.security.CodeSource CodeSource} so that a module's classes can be * granted specific permissions when loaded by a {@link diff --git a/jdk/src/java.base/share/classes/java/lang/module/ResolutionException.java b/jdk/src/java.base/share/classes/java/lang/module/ResolutionException.java index fb14cfe8200..69cc71f3466 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ResolutionException.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ResolutionException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -26,10 +26,12 @@ package java.lang.module; /** - * Thrown when resolving a set of modules or binding fails. + * Thrown when resolving a set of modules, or resolving a set of modules with + * service binding, fails. * * @see Configuration * @since 9 + * @spec JPMS */ public class ResolutionException extends RuntimeException { private static final long serialVersionUID = -1031186845316729450L; diff --git a/jdk/src/java.base/share/classes/java/lang/module/ResolvedModule.java b/jdk/src/java.base/share/classes/java/lang/module/ResolvedModule.java index 05ef3c4dc1c..a3858ef6c13 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ResolvedModule.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ResolvedModule.java @@ -37,6 +37,7 @@ import java.util.Set; * module's content. * * @since 9 + * @spec JPMS * @see Configuration#modules() */ public final class ResolvedModule { diff --git a/jdk/src/java.base/share/classes/java/lang/module/Resolver.java b/jdk/src/java.base/share/classes/java/lang/module/Resolver.java index d2aafdc5d87..a723e638abe 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/Resolver.java +++ b/jdk/src/java.base/share/classes/java/lang/module/Resolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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,7 +28,7 @@ package java.lang.module; import java.io.PrintStream; import java.lang.module.ModuleDescriptor.Provides; import java.lang.module.ModuleDescriptor.Requires.Modifier; -import java.lang.reflect.Layer; +import java.net.URI; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; @@ -39,18 +39,17 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Optional; import java.util.Set; -import java.util.StringJoiner; import java.util.stream.Collectors; import jdk.internal.module.ModuleHashes; import jdk.internal.module.ModuleReferenceImpl; +import jdk.internal.module.ModuleTarget; /** - * The resolver used by {@link Configuration#resolveRequires} and - * {@link Configuration#resolveRequiresAndUses}. + * The resolver used by {@link Configuration#resolve} and {@link + * Configuration#resolveAndBind}. * * @implNote The resolver is used at VM startup and so deliberately avoids * using lambda and stream usages in code paths used during startup. @@ -66,7 +65,18 @@ final class Resolver { // maps module name to module reference private final Map nameToReference = new HashMap<>(); + // true if all automatic modules have been found + private boolean haveAllAutomaticModules; + // constraint on target platform + private String targetPlatform; + + String targetPlatform() { return targetPlatform; } + + /** + * @throws IllegalArgumentException if there are more than one parent and + * the constraints on the target platform conflict + */ Resolver(ModuleFinder beforeFinder, List parents, ModuleFinder afterFinder, @@ -75,15 +85,30 @@ final class Resolver { this.parents = parents; this.afterFinder = afterFinder; this.traceOutput = traceOutput; - } + // record constraint on target platform, checking for conflicts + for (Configuration parent : parents) { + String value = parent.targetPlatform(); + if (value != null) { + if (targetPlatform == null) { + targetPlatform = value; + } else { + if (!value.equals(targetPlatform)) { + String msg = "Parents have conflicting constraints on target" + + " platform: " + targetPlatform + ", " + value; + throw new IllegalArgumentException(msg); + } + } + } + } + } /** * Resolves the given named modules. * * @throws ResolutionException */ - Resolver resolveRequires(Collection roots) { + Resolver resolve(Collection roots) { // create the visit stack to get us started Deque q = new ArrayDeque<>(); @@ -100,17 +125,15 @@ final class Resolver { mref = findWithAfterFinder(root); if (mref == null) { - fail("Module %s not found", root); + findFail("Module %s not found", root); } } if (isTracing()) { - trace("Root module %s located", root); - mref.location().ifPresent(uri -> trace(" (%s)", uri)); + trace("root %s", nameAndInfo(mref)); } - assert mref.descriptor().name().equals(root); - nameToReference.put(root, mref); + addFoundModule(mref); q.push(mref.descriptor()); } @@ -132,6 +155,19 @@ final class Resolver { ModuleDescriptor descriptor = q.poll(); assert nameToReference.containsKey(descriptor.name()); + // if the module is an automatic module then all automatic + // modules need to be resolved + if (descriptor.isAutomatic() && !haveAllAutomaticModules) { + addFoundAutomaticModules().forEach(mref -> { + ModuleDescriptor other = mref.descriptor(); + q.offer(other); + if (isTracing()) { + trace("%s requires %s", descriptor.name(), nameAndInfo(mref)); + } + }); + haveAllAutomaticModules = true; + } + // process dependences for (ModuleDescriptor.Requires requires : descriptor.requires()) { @@ -152,21 +188,18 @@ final class Resolver { mref = findWithAfterFinder(dn); if (mref == null) { - fail("Module %s not found, required by %s", - dn, descriptor.name()); + findFail("Module %s not found, required by %s", + dn, descriptor.name()); } } - if (!nameToReference.containsKey(dn)) { - nameToReference.put(dn, mref); - q.offer(mref.descriptor()); - resolved.add(mref.descriptor()); + if (isTracing() && !dn.equals("java.base")) { + trace("%s requires %s", descriptor.name(), nameAndInfo(mref)); + } - if (isTracing()) { - trace("Module %s located, required by %s", - dn, descriptor.name()); - mref.location().ifPresent(uri -> trace(" (%s)", uri)); - } + if (!nameToReference.containsKey(dn)) { + addFoundModule(mref); + q.offer(mref.descriptor()); } } @@ -181,7 +214,7 @@ final class Resolver { * Augments the set of resolved modules with modules induced by the * service-use relation. */ - Resolver resolveUses() { + Resolver bind() { // Scan the finders for all available service provider modules. As // java.base uses services then then module finders will be scanned @@ -211,7 +244,7 @@ final class Resolver { // the initial set of modules that may use services Set initialConsumers; - if (Layer.boot() == null) { + if (ModuleLayer.boot() == null) { initialConsumers = new HashSet<>(); } else { initialConsumers = parents.stream() @@ -230,6 +263,13 @@ final class Resolver { do { for (ModuleDescriptor descriptor : candidateConsumers) { if (!descriptor.uses().isEmpty()) { + + // the modules that provide at least one service + Set modulesToBind = null; + if (isTracing()) { + modulesToBind = new HashSet<>(); + } + for (String service : descriptor.uses()) { Set mrefs = availableProviders.get(service); if (mrefs != null) { @@ -237,16 +277,14 @@ final class Resolver { ModuleDescriptor provider = mref.descriptor(); if (!provider.equals(descriptor)) { - trace("Module %s provides %s, used by %s", - provider.name(), service, descriptor.name()); + if (isTracing() && modulesToBind.add(provider)) { + trace("%s binds %s", descriptor.name(), + nameAndInfo(mref)); + } String pn = provider.name(); if (!nameToReference.containsKey(pn)) { - if (isTracing()) { - mref.location() - .ifPresent(uri -> trace(" (%s)", uri)); - } - nameToReference.put(pn, mref); + addFoundModule(mref); q.push(provider); } } @@ -262,6 +300,56 @@ final class Resolver { return this; } + /** + * Add all automatic modules that have not already been found to the + * nameToReference map. + */ + private Set addFoundAutomaticModules() { + Set result = new HashSet<>(); + findAll().forEach(mref -> { + String mn = mref.descriptor().name(); + if (mref.descriptor().isAutomatic() && !nameToReference.containsKey(mn)) { + addFoundModule(mref); + result.add(mref); + } + }); + return result; + } + + /** + * Add the module to the nameToReference map. Also check any constraints on + * the target platform with the constraints of other modules. + */ + private void addFoundModule(ModuleReference mref) { + String mn = mref.descriptor().name(); + + if (mref instanceof ModuleReferenceImpl) { + ModuleTarget target = ((ModuleReferenceImpl)mref).moduleTarget(); + if (target != null) + checkTargetPlatform(mn, target); + } + + nameToReference.put(mn, mref); + } + + /** + * Check that the module's constraints on the target platform does + * conflict with the constraint of other modules resolved so far. + */ + private void checkTargetPlatform(String mn, ModuleTarget target) { + String value = target.targetPlatform(); + if (value != null) { + if (targetPlatform == null) { + targetPlatform = value; + } else { + if (!value.equals(targetPlatform)) { + findFail("Module %s has constraints on target platform (%s)" + + " that conflict with other modules: %s", mn, + value, targetPlatform); + } + } + } + } /** * Execute post-resolution checks and returns the module graph of resolved @@ -273,15 +361,8 @@ final class Resolver { Map> finish(Configuration cf, boolean check) { - if (isTracing()) { - trace("Result:"); - Set names = nameToReference.keySet(); - names.stream().sorted().forEach(name -> trace(" %s", name)); - } - if (check) { detectCycles(); - checkPlatformConstraints(); checkHashes(); } @@ -319,8 +400,7 @@ final class Resolver { if (!visited.contains(descriptor)) { boolean added = visitPath.add(descriptor); if (!added) { - throw new ResolutionException("Cycle detected: " + - cycleAsString(descriptor)); + resolveFail("Cycle detected: %s", cycleAsString(descriptor)); } for (ModuleDescriptor.Requires requires : descriptor.requires()) { String dn = requires.name(); @@ -353,86 +433,6 @@ final class Resolver { } - /** - * If there are platform specific modules then check that the OS name, - * architecture and version match. - * - * @apiNote This method does not currently check if the OS matches - * platform specific modules in parent configurations. - */ - private void checkPlatformConstraints() { - - // first module encountered that is platform specific - String savedModuleName = null; - String savedOsName = null; - String savedOsArch = null; - String savedOsVersion = null; - - for (ModuleReference mref : nameToReference.values()) { - ModuleDescriptor descriptor = mref.descriptor(); - - String osName = descriptor.osName().orElse(null); - String osArch = descriptor.osArch().orElse(null); - String osVersion = descriptor.osVersion().orElse(null); - - if (osName != null || osArch != null || osVersion != null) { - - if (savedModuleName == null) { - - savedModuleName = descriptor.name(); - savedOsName = osName; - savedOsArch = osArch; - savedOsVersion = osVersion; - - } else { - - boolean matches = platformMatches(osName, savedOsName) - && platformMatches(osArch, savedOsArch) - && platformMatches(osVersion, savedOsVersion); - - if (!matches) { - String s1 = platformAsString(savedOsName, - savedOsArch, - savedOsVersion); - - String s2 = platformAsString(osName, osArch, osVersion); - fail("Mismatching constraints on target platform: " - + savedModuleName + ": " + s1 - + ", " + descriptor.name() + ": " + s2); - } - - } - - } - } - - } - - /** - * Returns true if the s1 and s2 are equal or one of them is null. - */ - private boolean platformMatches(String s1, String s2) { - if (s1 == null || s2 == null) - return true; - else - return Objects.equals(s1, s2); - } - - /** - * Return a string that encodes the OS name/arch/version. - */ - private String platformAsString(String osName, - String osArch, - String osVersion) { - - return new StringJoiner("-") - .add(Objects.toString(osName, "*")) - .add(Objects.toString(osArch, "*")) - .add(Objects.toString(osVersion, "*")) - .toString(); - - } - /** * Checks the hashes in the module descriptor to ensure that they match * any recorded hashes. @@ -460,20 +460,19 @@ final class Resolver { continue; if (!(mref2 instanceof ModuleReferenceImpl)) { - fail("Unable to compute the hash of module %s", dn); + findFail("Unable to compute the hash of module %s", dn); } - // skip checking the hash if the module has been patched ModuleReferenceImpl other = (ModuleReferenceImpl)mref2; - if (other != null && !other.isPatched()) { + if (other != null) { byte[] recordedHash = hashes.hashFor(dn); byte[] actualHash = other.computeHash(algorithm); if (actualHash == null) - fail("Unable to compute the hash of module %s", dn); + findFail("Unable to compute the hash of module %s", dn); if (!Arrays.equals(recordedHash, actualHash)) { - fail("Hash of %s (%s) differs to expected hash (%s)" + - " recorded in %s", dn, toHexString(actualHash), - toHexString(recordedHash), descriptor.name()); + findFail("Hash of %s (%s) differs to expected hash (%s)" + + " recorded in %s", dn, toHexString(actualHash), + toHexString(recordedHash), descriptor.name()); } } } @@ -514,7 +513,7 @@ final class Resolver { // need "requires transitive" from the modules in parent configurations // as there may be selected modules that have a dependency on modules in // the parent configuration. - if (Layer.boot() == null) { + if (ModuleLayer.boot() == null) { g2 = new HashMap<>(capacity); } else { g2 = parents.stream() @@ -669,16 +668,30 @@ final class Resolver { /** - * Checks the readability graph to ensure that no two modules export the - * same package to a module. This includes the case where module M has - * a local package P and M reads another module that exports P to M. - * Also checks the uses/provides of module M to ensure that it reads a - * module that exports the package of the service type to M. + * Checks the readability graph to ensure that + *

            + *
          1. A module does not read two or more modules with the same name. + * This includes the case where a module reads another another with the + * same name as itself.

          2. + *
          3. Two or more modules in the configuration don't export the same + * package to a module that reads both. This includes the case where a + * module {@code M} containing package {@code p} reads another module + * that exports {@code p} to {@code M}.

          4. + *
          5. A module {@code M} doesn't declare that it "{@code uses p.S}" + * or "{@code provides p.S with ...}" but package {@code p} is neither + * in module {@code M} nor exported to {@code M} by any module that + * {@code M} reads.

          6. + *
          */ private void checkExportSuppliers(Map> graph) { for (Map.Entry> e : graph.entrySet()) { ModuleDescriptor descriptor1 = e.getKey().descriptor(); + String name1 = descriptor1.name(); + + // the names of the modules that are read (including self) + Set names = new HashSet<>(); + names.add(name1); // the map of packages that are local or exported to descriptor1 Map packageToExporter = new HashMap<>(); @@ -694,37 +707,49 @@ final class Resolver { for (ResolvedModule endpoint : reads) { ModuleDescriptor descriptor2 = endpoint.descriptor(); - for (ModuleDescriptor.Exports export : descriptor2.exports()) { - - if (export.isQualified()) { - if (!export.targets().contains(descriptor1.name())) - continue; + String name2 = descriptor2.name(); + if (descriptor2 != descriptor1 && !names.add(name2)) { + if (name2.equals(name1)) { + resolveFail("Module %s reads another module named %s", + name1, name1); + } else{ + resolveFail("Module %s reads more than one module named %s", + name1, name2); } + } - // source is exported to descriptor2 - String source = export.source(); - ModuleDescriptor other - = packageToExporter.putIfAbsent(source, descriptor2); + if (descriptor2.isAutomatic()) { + // automatic modules read self and export all packages + if (descriptor2 != descriptor1) { + for (String source : descriptor2.packages()) { + ModuleDescriptor supplier + = packageToExporter.putIfAbsent(source, descriptor2); - if (other != null && other != descriptor2) { - // package might be local to descriptor1 - if (other == descriptor1) { - fail("Module %s contains package %s" - + ", module %s exports package %s to %s", - descriptor1.name(), - source, - descriptor2.name(), - source, - descriptor1.name()); - } else { - fail("Modules %s and %s export package %s to module %s", - descriptor2.name(), - other.name(), - source, - descriptor1.name()); + // descriptor2 and 'supplier' export source to descriptor1 + if (supplier != null) { + failTwoSuppliers(descriptor1, source, descriptor2, supplier); + } } } + } else { + for (ModuleDescriptor.Exports export : descriptor2.exports()) { + if (export.isQualified()) { + if (!export.targets().contains(descriptor1.name())) + continue; + } + + // source is exported by descriptor2 + String source = export.source(); + ModuleDescriptor supplier + = packageToExporter.putIfAbsent(source, descriptor2); + + // descriptor2 and 'supplier' export source to descriptor1 + if (supplier != null) { + failTwoSuppliers(descriptor1, source, descriptor2, supplier); + } + } + } } @@ -735,8 +760,8 @@ final class Resolver { for (String service : descriptor1.uses()) { String pn = packageName(service); if (!packageToExporter.containsKey(pn)) { - fail("Module %s does not read a module that exports %s", - descriptor1.name(), pn); + resolveFail("Module %s does not read a module that exports %s", + descriptor1.name(), pn); } } @@ -744,15 +769,8 @@ final class Resolver { for (ModuleDescriptor.Provides provides : descriptor1.provides()) { String pn = packageName(provides.service()); if (!packageToExporter.containsKey(pn)) { - fail("Module %s does not read a module that exports %s", - descriptor1.name(), pn); - } - - for (String provider : provides.providers()) { - if (!packages.contains(packageName(provider))) { - fail("Provider %s not in module %s", - provider, descriptor1.name()); - } + resolveFail("Module %s does not read a module that exports %s", + descriptor1.name(), pn); } } @@ -762,6 +780,42 @@ final class Resolver { } + /** + * Fail because a module in the configuration exports the same package to + * a module that reads both. This includes the case where a module M + * containing a package p reads another module that exports p to at least + * module M. + */ + private void failTwoSuppliers(ModuleDescriptor descriptor, + String source, + ModuleDescriptor supplier1, + ModuleDescriptor supplier2) { + + if (supplier2 == descriptor) { + ModuleDescriptor tmp = supplier1; + supplier1 = supplier2; + supplier2 = tmp; + } + + if (supplier1 == descriptor) { + resolveFail("Module %s contains package %s" + + ", module %s exports package %s to %s", + descriptor.name(), + source, + supplier2.name(), + source, + descriptor.name()); + } else { + resolveFail("Modules %s and %s export package %s to module %s", + supplier1.name(), + supplier2.name(), + source, + descriptor.name()); + } + + } + + /** * Find a module of the given name in the parent configurations */ @@ -779,24 +833,16 @@ final class Resolver { * Invokes the beforeFinder to find method to find the given module. */ private ModuleReference findWithBeforeFinder(String mn) { - try { - return beforeFinder.find(mn).orElse(null); - } catch (FindException e) { - // unwrap - throw new ResolutionException(e.getMessage(), e.getCause()); - } + + return beforeFinder.find(mn).orElse(null); + } /** * Invokes the afterFinder to find method to find the given module. */ private ModuleReference findWithAfterFinder(String mn) { - try { - return afterFinder.find(mn).orElse(null); - } catch (FindException e) { - // unwrap - throw new ResolutionException(e.getMessage(), e.getCause()); - } + return afterFinder.find(mn).orElse(null); } /** @@ -804,34 +850,27 @@ final class Resolver { * and after ModuleFinders. */ private Set findAll() { - try { + Set beforeModules = beforeFinder.findAll(); + Set afterModules = afterFinder.findAll(); - Set beforeModules = beforeFinder.findAll(); - Set afterModules = afterFinder.findAll(); + if (afterModules.isEmpty()) + return beforeModules; - if (afterModules.isEmpty()) - return beforeModules; + if (beforeModules.isEmpty() + && parents.size() == 1 + && parents.get(0) == Configuration.empty()) + return afterModules; - if (beforeModules.isEmpty() - && parents.size() == 1 - && parents.get(0) == Configuration.empty()) - return afterModules; - - Set result = new HashSet<>(beforeModules); - for (ModuleReference mref : afterModules) { - String name = mref.descriptor().name(); - if (!beforeFinder.find(name).isPresent() - && findInParent(name) == null) { - result.add(mref); - } + Set result = new HashSet<>(beforeModules); + for (ModuleReference mref : afterModules) { + String name = mref.descriptor().name(); + if (!beforeFinder.find(name).isPresent() + && findInParent(name) == null) { + result.add(mref); } - - return result; - - } catch (FindException e) { - // unwrap - throw new ResolutionException(e.getMessage(), e.getCause()); } + + return result; } /** @@ -842,10 +881,18 @@ final class Resolver { return (index == -1) ? "" : cn.substring(0, index); } + /** + * Throw FindException with the given format string and arguments + */ + private static void findFail(String fmt, Object ... args) { + String msg = String.format(fmt, args); + throw new FindException(msg); + } + /** * Throw ResolutionException with the given format string and arguments */ - private static void fail(String fmt, Object ... args) { + private static void resolveFail(String fmt, Object ... args) { String msg = String.format(fmt, args); throw new ResolutionException(msg); } @@ -860,9 +907,17 @@ final class Resolver { private void trace(String fmt, Object ... args) { if (traceOutput != null) { - traceOutput.format("[Resolver] " + fmt, args); + traceOutput.format(fmt, args); traceOutput.println(); } } + private String nameAndInfo(ModuleReference mref) { + ModuleDescriptor descriptor = mref.descriptor(); + StringBuilder sb = new StringBuilder(descriptor.name()); + mref.location().ifPresent(uri -> sb.append(" " + uri)); + if (descriptor.isAutomatic()) + sb.append(" automatic"); + return sb.toString(); + } } diff --git a/jdk/src/java.base/share/classes/java/lang/module/package-info.java b/jdk/src/java.base/share/classes/java/lang/module/package-info.java index f641638cb2c..74021cd0bef 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/package-info.java +++ b/jdk/src/java.base/share/classes/java/lang/module/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -33,7 +33,181 @@ * invoking a method with an array or collection containing a {@code null} element * will cause a {@code NullPointerException}, unless otherwise specified.

          * + * + *

          Resolution

          + * + *

          Resolution is the process of computing how modules depend on each other. + * The process occurs at compile time and run time.

          + * + *

          Resolution is a two-step process. The first step recursively enumerates + * the 'requires' directives of a set of root modules. If all the enumerated + * modules are observable, then the second step computes their readability graph. + * The readability graph embodies how modules depend on each other, which in + * turn controls access across module boundaries.

          + * + *

          Step 1: Recursive enumeration

          + * + *

          Recursive enumeration takes a set of module names, looks up each of their + * module declarations, and for each module declaration, recursively enumerates: + * + *

            + *
          • the module names given by the 'requires' directives with the + * 'transitive' modifier, and

          • + *
          • at the discretion of the host system, the module names given by + * the 'requires' directives without the 'transitive' modifier.

          • + *
          + * + *

          Module declarations are looked up in a set of observable modules. The set + * of observable modules is determined in an implementation specific manner. The + * set of observable modules may include modules with explicit declarations + * (that is, with a {@code module-info.java} source file or {@code module-info.class} + * file) and modules with implicit declarations (that is, + * automatic modules). + * Because an automatic module has no explicit module declaration, it has no + * 'requires' directives of its own, although its name may be given by a + * 'requires' directive of an explicit module declaration.

          + + *

          The set of root modules, whose names are the initial input to this + * algorithm, is determined in an implementation specific manner. The set of + * root modules may include automatic modules.

          + * + *

          If at least one automatic module is enumerated by this algorithm, then + * every observable automatic module must be enumerated, regardless of whether + * any of their names are given by 'requires' directives of explicit module + * declarations.

          + * + *

          If any of the following conditions occur, then resolution fails: + *

            + *
          • Any root module is not observable.

          • + *
          • Any module whose name is given by a 'requires' directive with the + * 'transitive' modifier is not observable.

          • + *
          • At the discretion of the host system, any module whose name is given + * by a 'requires' directive without the 'transitive' modifier is not + * observable.

          • + *
          • The algorithm in this step enumerates the same module name twice. This + * indicates a cycle in the 'requires' directives, disregarding any 'transitive' + * modifiers.

          • + *
          + * + *

          Otherwise, resolution proceeds to step 2.

          + * + *

          Step 2: Computing the readability graph

          + * + *

          A 'requires' directive (irrespective of 'transitive') expresses that + * one module depends on some other module. The effect of the 'transitive' + * modifier is to cause additional modules to also depend on the other module. + * If module M 'requires transitive N', then not only does M depend on N, but + * any module that depends on M also depends on N. This allows M to be + * refactored so that some or all of its content can be moved to a new module N + * without breaking modules that have a 'requires M' directive.

          + * + *

          Module dependencies are represented by the readability graph. The + * readability graph is a directed graph whose vertices are the modules + * enumerated in step 1 and whose edges represent readability between pairs of + * modules. The edges are specified as follows: + * + *

          First, readability is determined by the 'requires' directives of the + * enumerated modules, disregarding any 'transitive' modifiers: + * + *

            + *
          • For each enumerated module A that 'requires' B: A "reads" B.

          • + *
          • For each enumerated module X that is automatic: X "reads" every + * other enumerated module (it is "as if" an automatic module has 'requires' + * directives for every other enumerated module).

          • + *
          + * + *

          Second, readability is augmented to account for 'transitive' modifiers: + *

            + *
          • For each enumerated module A that "reads" B:

            + *
              + *
            • If B 'requires transitive' C, then A "reads" C as well as B. This + * augmentation is recursive: since A "reads" C, if C 'requires transitive' + * D, then A "reads" D as well as C and B.

            • + *
            • If B is an automatic module, then A "reads" every other enumerated + * automatic module. (It is "as if" an automatic module has 'requires transitive' + * directives for every other enumerated automatic module).

            • + *
            + *
          • + *
          + * + *

          Finally, every module "reads" itself.

          + * + *

          If any of the following conditions occur in the readability graph, then + * resolution fails: + *

            + *
          • A module "reads" two or more modules with the same name. This includes + * the case where a module "reads" another with the same name as itself.

          • + *
          • Two or more modules export a package with the same name to a module + * that "reads" both. This includes the case where a module M containing package + * p "reads" another module that exports p to M.

          • + *
          • A module M declares that it 'uses p.S' or 'provides p.S with ...' but + * package p is neither in module M nor exported to M by any module that M + * "reads".

          • + *
          + *

          Otherwise, resolution succeeds, and the result of resolution is the + * readability graph. + * + *

          Root modules

          + * + *

          The set of root modules at compile-time is usually the set of modules + * being compiled. At run-time, the set of root modules is usually the + * application module specified to the 'java' launcher. When compiling code in + * the unnamed module, or at run-time when the main application class is loaded + * from the class path, then the default set of root modules is implementation + * specific (In the JDK implementation it is the module "java.se", if observable, + * and every observable module that exports an API).

          + * + *

          Observable modules

          + * + *

          The set of observable modules at both compile-time and run-time is + * determined by searching several different paths, and also by searching + * the compiled modules built in to the environment. The search order is as + * follows:

          + * + *
            + *
          1. At compile time only, the compilation module path. This path + * contains module definitions in source form.

          2. + * + *
          3. The upgrade module path. This path contains compiled definitions of + * modules that will be observed in preference to the compiled definitions of + * any upgradeable modules that are present in (3) and (4). See the Java + * SE Platform for the designation of which standard modules are upgradeable. + *

          4. + * + *
          5. The system modules, which are the compiled definitions built in to + * the environment.

          6. + * + *
          7. The application module path. This path contains compiled definitions + * of library and application modules.

          8. + * + *
          + * + *

          'requires' directives with 'static' modifier

          + * + *

          'requires' directives that have the 'static' modifier express an optional + * dependence at run time. If a module declares that it 'requires static M' then + * resolution does not search the observable modules for M to satisfy the dependency. + * However, if M is recursively enumerated at step 1 then all modules that are + * enumerated and `requires static M` will read M.

          + * + *

          Completeness

          + * + *

          Resolution may be partial at compile-time in that the complete transitive + * closure may not be required to compile a set of modules. Minimally, the + * readability graph that is constructed and validated at compile-time includes + * the modules being compiled, their direct dependences, and all implicitly + * declared dependences (requires transitive).

          + * + *

          At run-time, resolution is an additive process. The recursive enumeration + * at step 1 may be relative to previous resolutions so that a root module, + * or a module named in a 'requires' directive, is not enumerated when it was + * enumerated by a previous (or parent) resolution. The readability graph that + * is the result of resolution may therefore have a vertex for a module enumerated + * in step 1 but with an edge to represent that the module reads a module that + * was enumerated by previous (or parent) resolution.

          + * * @since 9 + * @spec JPMS */ package java.lang.module; diff --git a/jdk/src/java.base/share/classes/java/lang/package-info.java b/jdk/src/java.base/share/classes/java/lang/package-info.java index 26a0daf1c93..5868aee8fcf 100644 --- a/jdk/src/java.base/share/classes/java/lang/package-info.java +++ b/jdk/src/java.base/share/classes/java/lang/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -57,7 +57,7 @@ * by the {@code throw} statement. Subclasses of {@code Throwable} * represent errors and exceptions. * - * + * *

          Character Encodings

          * * The specification of the {@link java.nio.charset.Charset diff --git a/jdk/src/java.base/share/classes/java/lang/ref/Cleaner.java b/jdk/src/java.base/share/classes/java/lang/ref/Cleaner.java index 63bd43c53c1..04e2101e2cc 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/Cleaner.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/Cleaner.java @@ -119,7 +119,7 @@ import java.util.function.Function; * Using a static nested class, as above, will avoid accidentally retaining the * object reference. *

          - * + * * Cleaning actions should be prepared to be invoked concurrently with * other cleaning actions. * Typically the cleaning actions should be very quick to execute diff --git a/jdk/src/java.base/share/classes/java/lang/ref/FinalReference.java b/jdk/src/java.base/share/classes/java/lang/ref/FinalReference.java index d7637943726..bb97d6947a5 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/FinalReference.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/FinalReference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -33,4 +33,9 @@ class FinalReference extends Reference { public FinalReference(T referent, ReferenceQueue q) { super(referent, q); } + + @Override + public boolean enqueue() { + throw new InternalError("should never reach here"); + } } diff --git a/jdk/src/java.base/share/classes/java/lang/ref/Reference.java b/jdk/src/java.base/share/classes/java/lang/ref/Reference.java index cd4bd8065bc..5125e7cb553 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/Reference.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/Reference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -140,15 +140,26 @@ public abstract class Reference { } } - /* Atomically get and clear (set to null) the VM's pending list. + /* + * 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. */ private static native Reference getAndClearReferencePendingList(); - /* Test whether the VM's pending list contains any entries. + /* + * Test whether the VM's pending list contains any entries. */ private static native boolean hasReferencePendingList(); - /* Wait until the VM's pending list may be non-null. + /* + * Wait until the VM's pending list may be non-null. */ private static native void waitForReferencePendingList(); @@ -261,7 +272,6 @@ public abstract class Reference { this.referent = null; } - /* -- Queue operations -- */ /** @@ -278,8 +288,8 @@ public abstract class Reference { } /** - * Adds this reference object to the queue with which it is registered, - * if any. + * Clears this reference object and adds it to the queue with which + * it is registered, if any. * *

          This method is invoked only by Java code; when the garbage collector * enqueues references it does so directly, without invoking this method. @@ -289,10 +299,11 @@ public abstract class Reference { * 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); } - /* -- Constructors -- */ Reference(T referent) { @@ -419,5 +430,4 @@ public abstract class Reference { // HotSpot needs to retain the ref and not GC it before a call to this // method } - } diff --git a/jdk/src/java.base/share/classes/java/lang/ref/package-info.java b/jdk/src/java.base/share/classes/java/lang/ref/package-info.java index 58600cba1b8..3f37878650c 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/package-info.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/package-info.java @@ -93,7 +93,7 @@ * structure, this check will add little overhead to the hashtable * access methods. * - * + * *

          Reachability

          * * Going from strongest to weakest, the different levels of diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java b/jdk/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java index f585b476504..f725eb35e6a 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,37 +29,46 @@ import java.lang.annotation.Annotation; import java.security.AccessController; import jdk.internal.misc.VM; +import jdk.internal.module.IllegalAccessLogger; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; import jdk.internal.reflect.ReflectionFactory; import sun.security.action.GetPropertyAction; /** - * The AccessibleObject class is the base class for Field, Method and - * Constructor objects. It provides the ability to flag a reflected - * object as suppressing default Java language access control checks - * when it is used. The access checks -- module boundaries, - * public, default (package) access, protected, and private members -- - * are performed when Fields, Methods or Constructors are used to set - * or get fields, to invoke methods or to create and initialize new - * instances of classes, respectively. Unlike access control specified - * in the The Java™ Language Specification and - * The Java Virtual Machine Specification, access checks - * with reflected objects assume {@link Module#canRead readability}. + * The {@code AccessibleObject} class is the base class for {@code Field}, + * {@code Method}, and {@code Constructor} objects (known as reflected + * objects). It provides the ability to flag a reflected object as + * suppressing checks for Java language access control when it is used. This + * permits sophisticated applications with sufficient privilege, such as Java + * Object Serialization or other persistence mechanisms, to manipulate objects + * in a manner that would normally be prohibited. * - *

          Setting the {@code accessible} flag in a reflected object - * permits sophisticated applications with sufficient privilege, such - * as Java Object Serialization or other persistence mechanisms, to - * manipulate objects in a manner that would normally be prohibited. + *

          Java language access control prevents use of private members outside + * their class; package access members outside their package; protected members + * outside their package or subclasses; and public members outside their + * module unless they are declared in an {@link Module#isExported(String,Module) + * exported} package and the user {@link Module#canRead reads} their module. By + * default, Java language access control is enforced (with one variation) when + * {@code Field}s, {@code Method}s, or {@code Constructor}s are used to get or + * set fields, to invoke methods, or to create and initialize new instances of + * classes, respectively. Every reflected object checks that the code using it + * is in an appropriate class, package, or module.

          * - *

          By default, a reflected object is not accessible. + *

          The one variation from Java language access control is that the checks + * by reflected objects assume readability. That is, the module containing + * the use of a reflected object is assumed to read the module in which + * the underlying field, method, or constructor is declared.

          * - * @see Field - * @see Method - * @see Constructor - * @see ReflectPermission + *

          Whether the checks for Java language access control can be suppressed + * (and thus, whether access can be enabled) depends on whether the reflected + * object corresponds to a member in an exported or open package + * (see {@link #setAccessible(boolean)}).

          * + * @jls 6.6 Access Control * @since 1.2 + * @revised 9 + * @spec JPMS */ public class AccessibleObject implements AnnotatedElement { @@ -78,15 +87,11 @@ public class AccessibleObject implements AnnotatedElement { /** * Convenience method to set the {@code accessible} flag for an - * array of objects with a single security check (for efficiency). + * array of reflected objects with a single security check (for efficiency). * - *

          This method cannot be used to enable access to an object that is a - * {@link Member member} of a class in a different module to the caller and - * where the class is in a package that is not exported to the caller's - * module. Additionally, if the member is non-public or its declaring - * class is non-public, then this method can only be used to enable access - * if the package is {@link Module#isOpen(String,Module) open} to at least - * the caller's module. + *

          This method may be used to enable access to all reflected objects in + * the array when access to each reflected object can be enabled as + * specified by {@link #setAccessible(boolean) setAccessible(boolean)}.

          * *

          If there is a security manager, its * {@code checkPermission} method is first called with a @@ -99,10 +104,15 @@ public class AccessibleObject implements AnnotatedElement { * @param array the array of AccessibleObjects * @param flag the new value for the {@code accessible} flag * in each object - * @throws InaccessibleObjectException if access cannot be enabled - * @throws SecurityException if the request is denied. + * @throws InaccessibleObjectException if access cannot be enabled for all + * objects in the array + * @throws SecurityException if the request is denied by the security manager + * or an element in the array is a constructor for {@code + * java.lang.Class} * @see SecurityManager#checkPermission * @see ReflectPermission + * @revised 9 + * @spec JPMS */ @CallerSensitive public static void setAccessible(AccessibleObject[] array, boolean flag) { @@ -120,41 +130,143 @@ public class AccessibleObject implements AnnotatedElement { } /** - * Set the {@code accessible} flag for this object to + * Set the {@code accessible} flag for this reflected object to * the indicated boolean value. A value of {@code true} indicates that - * the reflected object should suppress Java language access - * checking when it is used. A value of {@code false} indicates - * that the reflected object should enforce Java language access checks - * while assuming readability (as noted in the class description). + * the reflected object should suppress checks for Java language access + * control when it is used. A value of {@code false} indicates that + * the reflected object should enforce checks for Java language access + * control when it is used, with the variation noted in the class description. * - *

          This method cannot be used to enable access to an object that is a - * {@link Member member} of a class in a different module to the caller and - * where the class is in a package that is not exported to the caller's - * module. Additionally, if the member is non-public or its declaring - * class is non-public, then this method can only be used to enable access - * if the package is {@link Module#isOpen(String,Module) open} to at least - * the caller's module. + *

          This method may be used by a caller in class {@code C} to enable + * access to a {@link Member member} of {@link Member#getDeclaringClass() + * declaring class} {@code D} if any of the following hold:

          * - *

          If there is a security manager, its + *

            + *
          • {@code C} and {@code D} are in the same module.
          • + * + *
          • The member is {@code public} and {@code D} is {@code public} in + * a package that the module containing {@code D} {@link + * Module#isExported(String,Module) exports} to at least the module + * containing {@code C}.
          • + * + *
          • The member is {@code protected} {@code static}, {@code D} is + * {@code public} in a package that the module containing {@code D} + * exports to at least the module containing {@code C}, and {@code C} + * is a subclass of {@code D}.
          • + * + *
          • {@code D} is in a package that the module containing {@code D} + * {@link Module#isOpen(String,Module) opens} to at least the module + * containing {@code C}. + * All packages in unnamed and open modules are open to all modules and + * so this method always succeeds when {@code D} is in an unnamed or + * open module.
          • + *
          + * + *

          This method cannot be used to enable access to private members, + * members with default (package) access, protected instance members, or + * protected constructors when the declaring class is in a different module + * to the caller and the package containing the declaring class is not open + * to the caller's module.

          + * + *

          If there is a security manager, its * {@code checkPermission} method is first called with a * {@code ReflectPermission("suppressAccessChecks")} permission. * * @param flag the new value for the {@code accessible} flag * @throws InaccessibleObjectException if access cannot be enabled - * @throws SecurityException if the request is denied - * @see SecurityManager#checkPermission - * @see ReflectPermission + * @throws SecurityException if the request is denied by the security manager + * @see #trySetAccessible * @see java.lang.invoke.MethodHandles#privateLookupIn + * @revised 9 + * @spec JPMS */ public void setAccessible(boolean flag) { AccessibleObject.checkPermission(); setAccessible0(flag); } - void setAccessible0(boolean flag) { + /** + * Sets the accessible flag and returns the new value + */ + boolean setAccessible0(boolean flag) { this.override = flag; + return flag; } + /** + * Set the {@code accessible} flag for this reflected object to {@code true} + * if possible. This method sets the {@code accessible} flag, as if by + * invoking {@link #setAccessible(boolean) setAccessible(true)}, and returns + * the possibly-updated value for the {@code accessible} flag. If access + * cannot be enabled, i.e. the checks or Java language access control cannot + * be suppressed, this method returns {@code false} (as opposed to {@code + * setAccessible(true)} throwing {@code InaccessibleObjectException} when + * it fails). + * + *

          This method is a no-op if the {@code accessible} flag for + * this reflected object is {@code true}. + * + *

          For example, a caller can invoke {@code trySetAccessible} + * on a {@code Method} object for a private instance method + * {@code p.T::privateMethod} to suppress the checks for Java language access + * control when the {@code Method} is invoked. + * If {@code p.T} class is in a different module to the caller and + * package {@code p} is open to at least the caller's module, + * the code below successfully sets the {@code accessible} flag + * to {@code true}. + * + *

          +     * {@code
          +     *     p.T obj = ....;  // instance of p.T
          +     *     :
          +     *     Method m = p.T.class.getDeclaredMethod("privateMethod");
          +     *     if (m.trySetAccessible()) {
          +     *         m.invoke(obj);
          +     *     } else {
          +     *         // package p is not opened to the caller to access private member of T
          +     *         ...
          +     *     }
          +     * }
          + * + *

          If there is a security manager, its {@code checkPermission} method + * is first called with a {@code ReflectPermission("suppressAccessChecks")} + * permission.

          + * + * @return {@code true} if the {@code accessible} flag is set to {@code true}; + * {@code false} if access cannot be enabled. + * @throws SecurityException if the request is denied by the security manager + * + * @since 9 + * @spec JPMS + * @see java.lang.invoke.MethodHandles#privateLookupIn + */ + @CallerSensitive + public final boolean trySetAccessible() { + AccessibleObject.checkPermission(); + + if (override == true) return true; + + // if it's not a Constructor, Method, Field then no access check + if (!Member.class.isInstance(this)) { + return setAccessible0(true); + } + + // does not allow to suppress access check for Class's constructor + Class declaringClass = ((Member) this).getDeclaringClass(); + if (declaringClass == Class.class && this instanceof Constructor) { + return false; + } + + if (checkCanSetAccessible(Reflection.getCallerClass(), + declaringClass, + false)) { + return setAccessible0(true); + } else { + return false; + } + } + + /** * If the given AccessibleObject is a {@code Constructor}, {@code Method} * or {@code Field} then checks that its declaring class is in a package @@ -164,106 +276,206 @@ public class AccessibleObject implements AnnotatedElement { // do nothing, needs to be overridden by Constructor, Method, Field } + void checkCanSetAccessible(Class caller, Class declaringClass) { + checkCanSetAccessible(caller, declaringClass, true); + } + + private boolean checkCanSetAccessible(Class caller, + Class declaringClass, + boolean throwExceptionIfDenied) { Module callerModule = caller.getModule(); Module declaringModule = declaringClass.getModule(); - if (callerModule == declaringModule) return; - if (callerModule == Object.class.getModule()) return; - if (!declaringModule.isNamed()) return; + if (callerModule == declaringModule) return true; + if (callerModule == Object.class.getModule()) return true; + if (!declaringModule.isNamed()) return true; - // package is open to caller - String pn = packageName(declaringClass); - if (declaringModule.isOpen(pn, callerModule)) { - printStackTraceIfOpenedReflectively(declaringModule, pn, callerModule); - return; - } - - // package is exported to caller and class/member is public - boolean isExported = declaringModule.isExported(pn, callerModule); - boolean isClassPublic = Modifier.isPublic(declaringClass.getModifiers()); + String pn = declaringClass.getPackageName(); int modifiers; if (this instanceof Executable) { modifiers = ((Executable) this).getModifiers(); } else { modifiers = ((Field) this).getModifiers(); } - boolean isMemberPublic = Modifier.isPublic(modifiers); - if (isExported && isClassPublic && isMemberPublic) { - printStackTraceIfExportedReflectively(declaringModule, pn, callerModule); - return; + + // class is public and package is exported to caller + boolean isClassPublic = Modifier.isPublic(declaringClass.getModifiers()); + if (isClassPublic && declaringModule.isExported(pn, callerModule)) { + // member is public + if (Modifier.isPublic(modifiers)) { + logIfExportedForIllegalAccess(caller, declaringClass); + return true; + } + + // member is protected-static + if (Modifier.isProtected(modifiers) + && Modifier.isStatic(modifiers) + && isSubclassOf(caller, declaringClass)) { + logIfExportedForIllegalAccess(caller, declaringClass); + return true; + } } - // not accessible - String msg = "Unable to make "; - if (this instanceof Field) - msg += "field "; - msg += this + " accessible: " + declaringModule + " does not \""; - if (isClassPublic && isMemberPublic) - msg += "exports"; - else - msg += "opens"; - msg += " " + pn + "\" to " + callerModule; - InaccessibleObjectException e = new InaccessibleObjectException(msg); - if (Reflection.printStackTraceWhenAccessFails()) { - e.printStackTrace(System.err); + // package is open to caller + if (declaringModule.isOpen(pn, callerModule)) { + logIfOpenedForIllegalAccess(caller, declaringClass); + return true; } - throw e; - } - private void printStackTraceIfOpenedReflectively(Module module, - String pn, - Module other) { - printStackTraceIfExposedReflectively(module, pn, other, true); - } - - private void printStackTraceIfExportedReflectively(Module module, - String pn, - Module other) { - printStackTraceIfExposedReflectively(module, pn, other, false); - } - - private void printStackTraceIfExposedReflectively(Module module, - String pn, - Module other, - boolean open) - { - if (Reflection.printStackTraceWhenAccessSucceeds() - && !module.isStaticallyExportedOrOpen(pn, other, open)) - { - String msg = other + " allowed to invoke setAccessible on "; + if (throwExceptionIfDenied) { + // not accessible + String msg = "Unable to make "; if (this instanceof Field) msg += "field "; - msg += this; - new Exception(msg) { - private static final long serialVersionUID = 42L; - public String toString() { - return "WARNING: " + getMessage(); - } - }.printStackTrace(System.err); + msg += this + " accessible: " + declaringModule + " does not \""; + if (isClassPublic && Modifier.isPublic(modifiers)) + msg += "exports"; + else + msg += "opens"; + msg += " " + pn + "\" to " + callerModule; + InaccessibleObjectException e = new InaccessibleObjectException(msg); + if (printStackTraceWhenAccessFails()) { + e.printStackTrace(System.err); + } + throw e; + } + return false; + } + + private boolean isSubclassOf(Class queryClass, Class ofClass) { + while (queryClass != null) { + if (queryClass == ofClass) { + return true; + } + queryClass = queryClass.getSuperclass(); + } + return false; + } + + private void logIfOpenedForIllegalAccess(Class caller, Class declaringClass) { + Module callerModule = caller.getModule(); + Module targetModule = declaringClass.getModule(); + // callerModule is null during early startup + if (callerModule != null && !callerModule.isNamed() && targetModule.isNamed()) { + IllegalAccessLogger logger = IllegalAccessLogger.illegalAccessLogger(); + if (logger != null) { + logger.logIfOpenedForIllegalAccess(caller, declaringClass, this::toShortString); + } + } + } + + private void logIfExportedForIllegalAccess(Class caller, Class declaringClass) { + Module callerModule = caller.getModule(); + Module targetModule = declaringClass.getModule(); + // callerModule is null during early startup + if (callerModule != null && !callerModule.isNamed() && targetModule.isNamed()) { + IllegalAccessLogger logger = IllegalAccessLogger.illegalAccessLogger(); + if (logger != null) { + logger.logIfExportedForIllegalAccess(caller, declaringClass, this::toShortString); + } } } /** - * Returns the package name of the given class. + * Returns a short descriptive string to describe this object in log messages. */ - private static String packageName(Class c) { - while (c.isArray()) { - c = c.getComponentType(); - } - String pn = c.getPackageName(); - return (pn != null) ? pn : ""; + String toShortString() { + return toString(); } /** - * Get the value of the {@code accessible} flag for this object. + * Get the value of the {@code accessible} flag for this reflected object. * * @return the value of the object's {@code accessible} flag + * + * @deprecated + * This method is deprecated because its name hints that it checks + * if the reflected object is accessible when it actually indicates + * if the checks for Java language access control are suppressed. + * This method may return {@code false} on a reflected object that is + * accessible to the caller. To test if this reflected object is accessible, + * it should use {@link #canAccess(Object)}. + * + * @revised 9 + * @spec JPMS */ + @Deprecated(since="9") public boolean isAccessible() { return override; } + /** + * Test if the caller can access this reflected object. If this reflected + * object corresponds to an instance method or field then this method tests + * if the caller can access the given {@code obj} with the reflected object. + * For instance methods or fields then the {@code obj} argument must be an + * instance of the {@link Member#getDeclaringClass() declaring class}. For + * static members and constructors then {@code obj} must be {@code null}. + * + *

          This method returns {@code true} if the {@code accessible} flag + * is set to {@code true}, i.e. the checks for Java language access control + * are suppressed, or if the caller can access the member as + * specified in The Java™ Language Specification, + * with the variation noted in the class description.

          + * + * @param obj an instance object of the declaring class of this reflected + * object if it is an instance method or field + * + * @return {@code true} if the caller can access this reflected object. + * + * @throws IllegalArgumentException + *
            + *
          • if this reflected object is a static member or constructor and + * the given {@code obj} is non-{@code null}, or
          • + *
          • if this reflected object is an instance method or field + * and the given {@code obj} is {@code null} or of type + * that is not a subclass of the {@link Member#getDeclaringClass() + * declaring class} of the member.
          • + *
          + * + * @since 9 + * @spec JPMS + * @jls 6.6 Access Control + * @see #trySetAccessible + * @see #setAccessible(boolean) + */ + @CallerSensitive + public final boolean canAccess(Object obj) { + if (!Member.class.isInstance(this)) { + return override; + } + + Class declaringClass = ((Member) this).getDeclaringClass(); + int modifiers = ((Member) this).getModifiers(); + if (!Modifier.isStatic(modifiers) && + (this instanceof Method || this instanceof Field)) { + if (obj == null) { + throw new IllegalArgumentException("null object for " + this); + } + // if this object is an instance member, the given object + // must be a subclass of the declaring class of this reflected object + if (!declaringClass.isAssignableFrom(obj.getClass())) { + throw new IllegalArgumentException("object is not an instance of " + + declaringClass.getName()); + } + } else if (obj != null) { + throw new IllegalArgumentException("non-null object for " + this); + } + + // access check is suppressed + if (override) return true; + + Class caller = Reflection.getCallerClass(); + Class targetClass; + if (this instanceof Constructor) { + targetClass = declaringClass; + } else { + targetClass = Modifier.isStatic(modifiers) ? null : obj.getClass(); + } + return verifyAccess(caller, declaringClass, targetClass, modifiers); + } + /** * Constructor: only used by the Java Virtual Machine. */ @@ -302,7 +514,7 @@ public class AccessibleObject implements AnnotatedElement { return AnnotatedElement.super.isAnnotationPresent(annotationClass); } - /** + /** * @throws NullPointerException {@inheritDoc} * @since 1.8 */ @@ -372,9 +584,22 @@ public class AccessibleObject implements AnnotatedElement { final void checkAccess(Class caller, Class memberClass, Class targetClass, int modifiers) throws IllegalAccessException + { + if (!verifyAccess(caller, memberClass, targetClass, modifiers)) { + IllegalAccessException e = Reflection.newIllegalAccessException( + caller, memberClass, targetClass, modifiers); + if (printStackTraceWhenAccessFails()) { + e.printStackTrace(System.err); + } + throw e; + } + } + + final boolean verifyAccess(Class caller, Class memberClass, + Class targetClass, int modifiers) { if (caller == memberClass) { // quick check - return; // ACCESS IS OK + return true; // ACCESS IS OK } Object cache = securityCheckCache; // read volatile if (targetClass != null // instance member or constructor @@ -385,26 +610,31 @@ public class AccessibleObject implements AnnotatedElement { Class[] cache2 = (Class[]) cache; if (cache2[1] == targetClass && cache2[0] == caller) { - return; // ACCESS IS OK + return true; // ACCESS IS OK } // (Test cache[1] first since range check for [1] // subsumes range check for [0].) } } else if (cache == caller) { // Non-protected case (or targetClass == memberClass or static member). - return; // ACCESS IS OK + return true; // ACCESS IS OK } // If no return, fall through to the slow path. - slowCheckMemberAccess(caller, memberClass, targetClass, modifiers); + return slowVerifyAccess(caller, memberClass, targetClass, modifiers); } // Keep all this slow stuff out of line: - void slowCheckMemberAccess(Class caller, Class memberClass, - Class targetClass, int modifiers) - throws IllegalAccessException + private boolean slowVerifyAccess(Class caller, Class memberClass, + Class targetClass, int modifiers) { - Reflection.ensureMemberAccess(caller, memberClass, targetClass, modifiers); + if (!Reflection.verifyMemberAccess(caller, memberClass, targetClass, modifiers)) { + // access denied + return false; + } + + // access okay + logIfExportedForIllegalAccess(caller, memberClass); // Success: Update the cache. Object cache = (targetClass != null @@ -418,5 +648,27 @@ public class AccessibleObject implements AnnotatedElement { // guarantees that the initializing stores for the cache // elements will occur before the volatile write. securityCheckCache = cache; // write volatile + return true; + } + + // true to print a stack trace when access fails + private static volatile boolean printStackWhenAccessFails; + + // true if printStack* values are initialized + private static volatile boolean printStackPropertiesSet; + + /** + * Returns true if a stack trace should be printed when access fails. + */ + private static boolean printStackTraceWhenAccessFails() { + if (!printStackPropertiesSet && VM.initLevel() >= 1) { + String s = GetPropertyAction.privilegedGetProperty( + "sun.reflect.debugModuleAccessChecks"); + if (s != null) { + printStackWhenAccessFails = !s.equalsIgnoreCase("false"); + } + printStackPropertiesSet = true; + } + return printStackWhenAccessFails; } } diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java b/jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java index 2f26c0b1bdc..fd15669931b 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -105,28 +105,32 @@ import sun.reflect.annotation.AnnotationType; *

          The table below summarizes which kind of annotation presence * different methods in this interface examine. * - * + *
          * + * * * - * + * + * * - * * - * * - * * - * * - * * + * *
          Overview of kind of presence detected by different AnnotatedElement methods
          Kind of Presence
          MethodDirectly PresentIndirectly PresentPresentAssociated
          {@code T}{@link #getAnnotation(Class) getAnnotation(Class<T>)} + *
          {@code T}{@link #getAnnotation(Class) getAnnotation(Class<T>)} * X
          {@code Annotation[]}{@link #getAnnotations getAnnotations()} + *
          {@code Annotation[]}{@link #getAnnotations getAnnotations()} * X
          {@code T[]}{@link #getAnnotationsByType(Class) getAnnotationsByType(Class<T>)} + *
          {@code T[]}{@link #getAnnotationsByType(Class) getAnnotationsByType(Class<T>)} * X
          {@code T}{@link #getDeclaredAnnotation(Class) getDeclaredAnnotation(Class<T>)} + *
          {@code T}{@link #getDeclaredAnnotation(Class) getDeclaredAnnotation(Class<T>)} * X
          {@code Annotation[]}{@link #getDeclaredAnnotations getDeclaredAnnotations()} + *
          {@code Annotation[]}{@link #getDeclaredAnnotations getDeclaredAnnotations()} * X
          {@code T[]}{@link #getDeclaredAnnotationsByType(Class) getDeclaredAnnotationsByType(Class<T>)} + *
          {@code T[]}{@link #getDeclaredAnnotationsByType(Class) getDeclaredAnnotationsByType(Class<T>)} * XX
          * *

          For an invocation of {@code get[Declared]AnnotationsByType( Class < diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Array.java b/jdk/src/java.base/share/classes/java/lang/reflect/Array.java index 2d6d717ad15..f43936df58c 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Array.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Array.java @@ -36,6 +36,7 @@ import jdk.internal.HotSpotIntrinsicCandidate; * conversion would occur. * * @author Nakul Saraiya + * @since 1.1 */ public final class Array { diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java index f64e84f7f37..a519d7feaf4 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -38,6 +38,7 @@ import sun.reflect.generics.factory.GenericsFactory; import sun.reflect.generics.scope.ConstructorScope; import java.lang.annotation.Annotation; import java.lang.annotation.AnnotationFormatError; +import java.util.StringJoiner; /** * {@code Constructor} provides information about, and access to, a single @@ -58,6 +59,7 @@ import java.lang.annotation.AnnotationFormatError; * * @author Kenneth Russell * @author Nakul Saraiya + * @since 1.1 */ public final class Constructor extends Executable { private Class clazz; @@ -168,6 +170,12 @@ public final class Constructor extends Executable { * is true.

          * * @param flag {@inheritDoc} + * + * @throws InaccessibleObjectException {@inheritDoc} + * @throws SecurityException if the request is denied by the security manager + * or this is a constructor for {@code java.lang.Class} + * + * @spec JPMS */ @Override @CallerSensitive @@ -353,6 +361,20 @@ public final class Constructor extends Executable { sb.append(getDeclaringClass().getTypeName()); } + @Override + String toShortString() { + StringBuilder sb = new StringBuilder("constructor "); + sb.append(getDeclaringClass().getTypeName()); + sb.append('('); + StringJoiner sj = new StringJoiner(","); + for (Class parameterType : getParameterTypes()) { + sj.add(parameterType.getTypeName()); + } + sb.append(sj); + sb.append(')'); + return sb.toString(); + } + /** * Returns a string describing this {@code Constructor}, * including type parameters. The string is formatted as the @@ -567,19 +589,18 @@ public final class Constructor extends Executable { } @Override - void handleParameterNumberMismatch(int resultLength, int numParameters) { + boolean handleParameterNumberMismatch(int resultLength, int numParameters) { Class declaringClass = getDeclaringClass(); if (declaringClass.isEnum() || declaringClass.isAnonymousClass() || declaringClass.isLocalClass() ) - return ; // Can't do reliable parameter counting + return false; // Can't do reliable parameter counting else { - if (!declaringClass.isMemberClass() || // top-level - // Check for the enclosing instance parameter for - // non-static member classes - (declaringClass.isMemberClass() && - ((declaringClass.getModifiers() & Modifier.STATIC) == 0) && - resultLength + 1 != numParameters) ) { + if (declaringClass.isMemberClass() && + ((declaringClass.getModifiers() & Modifier.STATIC) == 0) && + resultLength + 1 == numParameters) { + return true; + } else { throw new AnnotationFormatError( "Parameter annotations don't match number of parameters"); } diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java b/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java index ae94a58f06c..70e52b3505c 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java @@ -1,5 +1,5 @@ /* - * 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 @@ -551,12 +551,18 @@ public abstract class Executable extends AccessibleObject Annotation[][] result = parseParameterAnnotations(parameterAnnotations); - if (result.length != numParameters) - handleParameterNumberMismatch(result.length, numParameters); + if (result.length != numParameters && + handleParameterNumberMismatch(result.length, numParameters)) { + Annotation[][] tmp = new Annotation[result.length+1][]; + // Shift annotations down one to account for an implicit leading parameter + System.arraycopy(result, 0, tmp, 1, result.length); + tmp[0] = new Annotation[0]; + result = tmp; + } return result; } - abstract void handleParameterNumberMismatch(int resultLength, int numParameters); + abstract boolean handleParameterNumberMismatch(int resultLength, int numParameters); /** * {@inheritDoc} diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Field.java b/jdk/src/java.base/share/classes/java/lang/reflect/Field.java index 05b71785ffa..2bbb3c55010 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Field.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Field.java @@ -60,6 +60,7 @@ import sun.reflect.annotation.TypeAnnotationParser; * * @author Kenneth Russell * @author Nakul Saraiya + * @since 1.1 */ public final class Field extends AccessibleObject implements Member { @@ -158,6 +159,10 @@ class Field extends AccessibleObject implements Member { return res; } + /** + * @throws InaccessibleObjectException {@inheritDoc} + * @throws SecurityException {@inheritDoc} + */ @Override @CallerSensitive public void setAccessible(boolean flag) { @@ -320,6 +325,11 @@ class Field extends AccessibleObject implements Member { + getName()); } + @Override + String toShortString() { + return "field " + getDeclaringClass().getTypeName() + "." + getName(); + } + /** * Returns a string describing this {@code Field}, including * its generic type. The format is the access modifiers for the diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/InaccessibleObjectException.java b/jdk/src/java.base/share/classes/java/lang/reflect/InaccessibleObjectException.java index 34db5150f85..b03d449fecc 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/InaccessibleObjectException.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/InaccessibleObjectException.java @@ -30,6 +30,7 @@ package java.lang.reflect; * * @see AccessibleObject#setAccessible(boolean) * @since 9 + * @spec JPMS */ public class InaccessibleObjectException extends RuntimeException { diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/InvocationTargetException.java b/jdk/src/java.base/share/classes/java/lang/reflect/InvocationTargetException.java index 360d0ba2525..e1133e3c017 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/InvocationTargetException.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/InvocationTargetException.java @@ -38,6 +38,7 @@ package java.lang.reflect; * * @see Method * @see Constructor + * @since 1.1 */ public class InvocationTargetException extends ReflectiveOperationException { /** diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Member.java b/jdk/src/java.base/share/classes/java/lang/reflect/Member.java index 2241d456059..3ac457d9cb8 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Member.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Member.java @@ -35,6 +35,7 @@ package java.lang.reflect; * @see Constructor * * @author Nakul Saraiya + * @since 1.1 */ public interface Member { diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java index 027a711d3e1..026750cdce9 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -42,6 +42,7 @@ import sun.reflect.annotation.AnnotationParser; import java.lang.annotation.Annotation; import java.lang.annotation.AnnotationFormatError; import java.nio.ByteBuffer; +import java.util.StringJoiner; /** * A {@code Method} provides information about, and access to, a single method @@ -62,6 +63,7 @@ import java.nio.ByteBuffer; * * @author Kenneth Russell * @author Nakul Saraiya + * @since 1.1 */ public final class Method extends Executable { private Class clazz; @@ -179,6 +181,10 @@ public final class Method extends Executable { return res; } + /** + * @throws InaccessibleObjectException {@inheritDoc} + * @throws SecurityException {@inheritDoc} + */ @Override @CallerSensitive public void setAccessible(boolean flag) { @@ -412,6 +418,21 @@ public final class Method extends Executable { sb.append(getName()); } + @Override + String toShortString() { + StringBuilder sb = new StringBuilder("method "); + sb.append(getDeclaringClass().getTypeName()).append('.'); + sb.append(getName()); + sb.append('('); + StringJoiner sj = new StringJoiner(","); + for (Class parameterType : getParameterTypes()) { + sj.add(parameterType.getTypeName()); + } + sb.append(sj); + sb.append(')'); + return sb.toString(); + } + /** * Returns a string describing this {@code Method}, including * type parameters. The string is formatted as the method access @@ -699,7 +720,7 @@ public final class Method extends Executable { } @Override - void handleParameterNumberMismatch(int resultLength, int numParameters) { + boolean handleParameterNumberMismatch(int resultLength, int numParameters) { throw new AnnotationFormatError("Parameter annotations don't match number of parameters"); } } diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Modifier.java b/jdk/src/java.base/share/classes/java/lang/reflect/Modifier.java index d3875d387c2..8520aabb8db 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Modifier.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Modifier.java @@ -43,6 +43,7 @@ import jdk.internal.reflect.ReflectionFactory; * * @author Nakul Saraiya * @author Kenneth Russell + * @since 1.1 */ public class Modifier { diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java b/jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java index 15d41a4101d..e2a950ed1c1 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -25,6 +25,7 @@ package java.lang.reflect; +import java.lang.module.ModuleDescriptor; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Arrays; @@ -52,6 +53,9 @@ import sun.reflect.misc.ReflectUtil; import sun.security.action.GetPropertyAction; import sun.security.util.SecurityConstants; +import static java.lang.module.ModuleDescriptor.Modifier.SYNTHETIC; + + /** * * {@code Proxy} provides static methods for creating objects that act like instances @@ -153,7 +157,7 @@ import sun.security.util.SecurityConstants; * like they do for instances of {@code java.lang.Object}. * * - *

          Package and Module Membership of Proxy Class

          + *

          Package and Module Membership of Proxy Class

          * * The package and module to which a proxy class belongs are chosen such that * the accessibility of the proxy class is in line with the accessibility of @@ -164,7 +168,8 @@ import sun.security.util.SecurityConstants; * methods is specified as follows: * *
            - *
          1. If all the proxy interfaces are in exported packages: + *
          2. If all the proxy interfaces are in exported or open + * packages: *
              *
            1. if all the proxy interfaces are public, then the proxy class is * public in a package exported by the @@ -178,10 +183,11 @@ import sun.security.util.SecurityConstants; * not possible.
            2. *
            *
          3. - *
          4. If at least one proxy interface is a non-exported package: + *
          5. If at least one proxy interface is in a package that is + * non-exported and non-open: *
              *
            1. if all the proxy interfaces are public, then the proxy class is - * public in a non-exported package of + * public in a non-exported, non-open package of * dynamic module. * The names of the package and the module are unspecified.
            2. * @@ -195,23 +201,24 @@ import sun.security.util.SecurityConstants; *
            * *

            - * Note that if proxy interfaces with a mix of accessibilities -- - * exported public, exported non-public, non-exported public, non-exported non-public -- - * are proxied by the same instance, then the proxy class's accessibility is + * Note that if proxy interfaces with a mix of accessibilities -- for example, + * an exported public interface and a non-exported non-public interface -- are + * proxied by the same instance, then the proxy class's accessibility is * governed by the least accessible proxy interface. *

            * Note that it is possible for arbitrary code to obtain access to a proxy class - * in an exported package with {@link AccessibleObject#setAccessible setAccessible}, - * whereas a proxy class in a non-exported package is never accessible to + * in an open package with {@link AccessibleObject#setAccessible setAccessible}, + * whereas a proxy class in a non-open package is never accessible to * code outside the module of the proxy class. * *

            - * Throughout this specification, a "non-exported package" refers to a package that - * is not exported to all modules. Specifically, it refers to a package that - * either is not exported at all by its containing module or is exported in a - * qualified fashion by its containing module. + * Throughout this specification, a "non-exported package" refers to a package + * that is not exported to all modules, and a "non-open package" refers to + * a package that is not open to all modules. Specifically, these terms refer to + * a package that either is not exported/open by its containing module or is + * exported/open in a qualified fashion by its containing module. * - *

            Dynamic Modules

            + *

            Dynamic Modules

            *

            * A dynamic module is a named module generated at runtime. A proxy class * defined in a dynamic module is encapsulated and not accessible to any module. @@ -220,11 +227,11 @@ import sun.security.util.SecurityConstants; * {@code Proxy.newProxyInstance} method should be used instead. * *

            - * A dynamic module can read the modules of all of the superinterfaces of a proxy class - * and the modules of the types referenced by all public method signatures + * A dynamic module can read the modules of all of the superinterfaces of a proxy + * class and the modules of the types referenced by all public method signatures * of a proxy class. If a superinterface or a referenced type, say {@code T}, - * is in a non-exported package, the {@linkplain java.lang.reflect.Module module} - * of {@code T} is updated to export the package of {@code T} to the dynamic module. + * is in a non-exported package, the {@linkplain Module module} of {@code T} is + * updated to export the package of {@code T} to the dynamic module. * *

            Methods Duplicated in Multiple Proxy Interfaces

            * @@ -272,6 +279,8 @@ import sun.security.util.SecurityConstants; * @author Peter Jones * @see InvocationHandler * @since 1.3 + * @revised 9 + * @spec JPMS */ public class Proxy implements java.io.Serializable { private static final long serialVersionUID = -2222568056686623797L; @@ -350,14 +359,17 @@ public class Proxy implements java.io.Serializable { * @throws NullPointerException if the {@code interfaces} array * argument or any of its elements are {@code null} * - * @deprecated Proxy classes generated in a named module are encapsulated and not - * accessible to code outside its module. - * {@link Constructor#newInstance(Object...) Constructor.newInstance} will throw - * {@code IllegalAccessException} when it is called on an inaccessible proxy class. + * @deprecated Proxy classes generated in a named module are encapsulated + * and not accessible to code outside its module. + * {@link Constructor#newInstance(Object...) Constructor.newInstance} + * will throw {@code IllegalAccessException} when it is called on + * an inaccessible proxy class. * Use {@link #newProxyInstance(ClassLoader, Class[], InvocationHandler)} * to create a proxy instance instead. * * @see Package and Module Membership of Proxy Class + * @revised 9 + * @spec JPMS */ @Deprecated @CallerSensitive @@ -500,17 +512,19 @@ public class Proxy implements java.io.Serializable { "Unnamed package cannot be added to " + m); } - // add the package to the runtime module if not exists if (m.isNamed()) { - m.addPackage(proxyPkg); + if (!m.getDescriptor().packages().contains(proxyPkg)) { + throw new InternalError(proxyPkg + " not exist in " + m.getName()); + } } /* * Choose a name for the proxy class to generate. */ long num = nextUniqueNumber.getAndIncrement(); - String proxyName = proxyPkg.isEmpty() ? proxyClassNamePrefix + num - : proxyPkg + "." + proxyClassNamePrefix + num; + String proxyName = proxyPkg.isEmpty() + ? proxyClassNamePrefix + num + : proxyPkg + "." + proxyClassNamePrefix + num; ClassLoader loader = getLoader(m); trace(proxyName, m, loader, interfaces); @@ -570,9 +584,13 @@ public class Proxy implements java.io.Serializable { c.getModule().getName(), c.getName(), access, ld); } - static void trace(String cn, Module module, ClassLoader loader, List> interfaces) { + static void trace(String cn, + Module module, + ClassLoader loader, + List> interfaces) { if (isDebug()) { - System.out.format("PROXY: %s/%s defined by %s%n", module.getName(), cn, loader); + System.err.format("PROXY: %s/%s defined by %s%n", + module.getName(), cn, loader); } if (isDebug("debug")) { interfaces.stream() @@ -581,7 +599,7 @@ public class Proxy implements java.io.Serializable { } private static final String DEBUG = - GetPropertyAction.privilegedGetProperty("jdk.proxy.debug", ""); + GetPropertyAction.privilegedGetProperty("jdk.proxy.debug", ""); private static boolean isDebug() { return !DEBUG.isEmpty(); @@ -592,15 +610,16 @@ public class Proxy implements java.io.Serializable { // ProxyBuilder instance members start here.... - private final ClassLoader loader; private final List> interfaces; private final Module module; ProxyBuilder(ClassLoader loader, List> interfaces) { if (!VM.isModuleSystemInited()) { - throw new InternalError("Proxy is not supported until module system is fully initialized"); + throw new InternalError("Proxy is not supported until " + + "module system is fully initialized"); } if (interfaces.size() > 65535) { - throw new IllegalArgumentException("interface limit exceeded: " + interfaces.size()); + throw new IllegalArgumentException("interface limit exceeded: " + + interfaces.size()); } Set> refTypes = referencedTypes(loader, interfaces); @@ -608,7 +627,6 @@ public class Proxy implements java.io.Serializable { // IAE if violates any restrictions specified in newProxyInstance validateProxyInterfaces(loader, interfaces, refTypes); - this.loader = loader; this.interfaces = interfaces; this.module = mapToModule(loader, interfaces, refTypes); assert getLoader(module) == loader; @@ -648,8 +666,8 @@ public class Proxy implements java.io.Serializable { * Validate the given proxy interfaces and the given referenced types * are visible to the defining loader. * - * @throws IllegalArgumentException if it violates the restrictions specified - * in {@link Proxy#newProxyInstance} + * @throws IllegalArgumentException if it violates the restrictions + * specified in {@link Proxy#newProxyInstance} */ private static void validateProxyInterfaces(ClassLoader loader, List> interfaces, @@ -720,9 +738,9 @@ public class Proxy implements java.io.Serializable { * is in the same module of the package-private interface. * * If all proxy interfaces are public and at least one in a non-exported - * package, then the proxy class is in a dynamic module in a non-exported - * package. Reads edge and qualified exports are added for - * dynamic module to access. + * package, then the proxy class is in a dynamic module in a + * non-exported package. Reads edge and qualified exports are added + * for dynamic module to access. */ private static Module mapToModule(ClassLoader loader, List> interfaces, @@ -741,11 +759,12 @@ public class Proxy implements java.io.Serializable { } } - // all proxy interfaces are public and exported, the proxy class is in unnamed module - // Such proxy class is accessible to any unnamed module and named module that - // can read unnamed module + // all proxy interfaces are public and exported, the proxy class + // is in unnamed module. Such proxy class is accessible to + // any unnamed module and named module that can read unnamed module if (packagePrivateTypes.isEmpty() && modulePrivateTypes.isEmpty()) { - return loader != null ? loader.getUnnamedModule() : BootLoader.getUnnamedModule(); + return loader != null ? loader.getUnnamedModule() + : BootLoader.getUnnamedModule(); } if (packagePrivateTypes.size() > 0) { @@ -767,7 +786,8 @@ public class Proxy implements java.io.Serializable { Module target = null; for (Module m : packagePrivateTypes.values()) { if (getLoader(m) != loader) { - // the specified loader is not the same class loader of the non-public interface + // the specified loader is not the same class loader + // of the non-public interface throw new IllegalArgumentException( "non-public interface is not defined by the given loader"); } @@ -788,8 +808,9 @@ public class Proxy implements java.io.Serializable { return target; } - // all proxy interfaces are public and at least one in a non-exported package - // map to dynamic proxy module and add reads edge and qualified exports, if necessary + // All proxy interfaces are public and at least one in a non-exported + // package. So maps to a dynamic proxy module and add reads edge + // and qualified exports, if necessary Module target = getDynamicModule(loader); // set up proxy class access to proxy interfaces and types @@ -845,8 +866,8 @@ public class Proxy implements java.io.Serializable { private static final AtomicInteger counter = new AtomicInteger(); /* - * Define a dynamic module for the generated proxy classes in a non-exported package - * named com.sun.proxy.$MODULE. + * Define a dynamic module for the generated proxy classes in + * a non-exported package named com.sun.proxy.$MODULE. * * Each class loader will have one dynamic module. */ @@ -855,7 +876,11 @@ public class Proxy implements java.io.Serializable { // create a dynamic module and setup module access String mn = "jdk.proxy" + counter.incrementAndGet(); String pn = PROXY_PACKAGE_PREFIX + "." + mn; - Module m = Modules.defineModule(ld, mn, Collections.singleton(pn)); + ModuleDescriptor descriptor = + ModuleDescriptor.newModule(mn, Set.of(SYNTHETIC)) + .packages(Set.of(pn)) + .build(); + Module m = Modules.defineModule(ld, descriptor, null); Modules.addReads(m, Proxy.class.getModule()); // java.base to create proxy instance Modules.addExports(m, pn, Object.class.getModule()); @@ -869,7 +894,7 @@ public class Proxy implements java.io.Serializable { * that dispatches method invocations to the specified invocation * handler. *

            - * {@code IllegalArgumentException} will be thrown + * {@code IllegalArgumentException} will be thrown * if any of the following restrictions is violated: *

              *
            • All of {@code Class} objects in the given {@code interfaces} array @@ -955,6 +980,8 @@ public class Proxy implements java.io.Serializable { * {@code null} * * @see Package and Module Membership of Proxy Class + * @revised 9 + * @spec JPMS */ @CallerSensitive public static Object newProxyInstance(ClassLoader loader, @@ -1039,6 +1066,9 @@ public class Proxy implements java.io.Serializable { * @return {@code true} if the class is a proxy class and * {@code false} otherwise * @throws NullPointerException if {@code cl} is {@code null} + * + * @revised 9 + * @spec JPMS */ public static boolean isProxyClass(Class cl) { return Proxy.class.isAssignableFrom(cl) && ProxyBuilder.isProxyClass(cl); diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java b/jdk/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java index df6178358df..8b34ae3b4f2 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -32,12 +32,16 @@ package java.lang.reflect; * provides a summary description of what the permission allows, * and discusses the risks of granting code the permission. * - * + *
              + * + * * * * * * + * + * * * * @@ -58,6 +62,7 @@ package java.lang.reflect; * help in its attempt to compromise security in the system. * * + * *
              Table shows permission target name, what the permission allows, and associated risks
              Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
              suppressAccessChecks
              * * @see java.security.Permission diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/package-info.java b/jdk/src/java.base/share/classes/java/lang/reflect/package-info.java index c8cb0257b2a..e771f31cea1 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/package-info.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,11 +25,10 @@ /** * Provides classes and interfaces for obtaining reflective information about - * modules, classes and objects. Reflection allows programmatic access to - * information about modules and to the fields, methods and constructors of - * loaded classes, and the use of reflected fields, methods, and constructors - * to operate on their underlying counterparts, within encapsulation and - * security restrictions. + * classes and objects. Reflection allows programmatic access to information + * about the fields, methods and constructors of loaded classes, and the use + * of reflected fields, methods, and constructors to operate on their underlying + * counterparts, within encapsulation and security restrictions. * *

              {@code AccessibleObject} allows suppression of access checks if * the necessary {@code ReflectPermission} is available. @@ -45,5 +44,7 @@ * members declared by a given class. * * @since 1.1 + * @revised 9 + * @spec JPMS */ package java.lang.reflect; diff --git a/jdk/src/java.base/share/classes/java/math/BigDecimal.java b/jdk/src/java.base/share/classes/java/math/BigDecimal.java index 5feb70fec43..f4e1f4985d6 100644 --- a/jdk/src/java.base/share/classes/java/math/BigDecimal.java +++ b/jdk/src/java.base/share/classes/java/math/BigDecimal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -120,15 +120,19 @@ import java.util.Arrays; * preferred scale for representing a result. The preferred * scale for each operation is listed in the table below. * - * + *
              * + * * + * + * * * * * * + * *
              Preferred Scales for Results of Arithmetic Operations *
              OperationPreferred Scale of Result
              Addmax(addend.scale(), augend.scale())
              Subtractmax(minuend.scale(), subtrahend.scale())
              Multiplymultiplier.scale() + multiplicand.scale()
              Dividedividend.scale() - divisor.scale()
              Square rootradicand.scale()/2
              * * These scales are the ones used by the methods which return exact @@ -218,6 +222,7 @@ import java.util.Arrays; * @author Mike Cowlishaw * @author Joseph D. Darcy * @author Sergey V. Kuksenko + * @since 1.1 */ public class BigDecimal extends Number implements Comparable { /** diff --git a/jdk/src/java.base/share/classes/java/math/RoundingMode.java b/jdk/src/java.base/share/classes/java/math/RoundingMode.java index a4a1c1aa460..79ecce36e7f 100644 --- a/jdk/src/java.base/share/classes/java/math/RoundingMode.java +++ b/jdk/src/java.base/share/classes/java/math/RoundingMode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -51,11 +51,12 @@ package java.math; * proper {@code MathContext}. A summary table showing the results * of these rounding operations for all rounding modes appears below. * - * + *
              * + * * - * + * * * * @@ -64,18 +65,21 @@ package java.math; * * * + * + * * - * - * - * - * - * - * - * - * - * - * - *
              Summary of Rounding Operations Under Different Rounding Modes
              Result of rounding input to one digit with the given * rounding mode
              Input Number {@code UP}{@code DOWN}{@code CEILING}{@code HALF_DOWN}{@code HALF_EVEN}{@code UNNECESSARY}
              5.5 6 5 6 5 6 5 6 throw {@code ArithmeticException}
              2.5 3 2 3 2 3 2 2 throw {@code ArithmeticException}
              1.6 2 1 2 1 2 2 2 throw {@code ArithmeticException}
              1.1 2 1 2 1 1 1 1 throw {@code ArithmeticException}
              1.0 1 1 1 1 1 1 1 1
              -1.0 -1 -1 -1 -1 -1 -1 -1 -1
              -1.1 -2 -1 -1 -2 -1 -1 -1 throw {@code ArithmeticException}
              -1.6 -2 -1 -1 -2 -2 -2 -2 throw {@code ArithmeticException}
              -2.5 -3 -2 -2 -3 -3 -2 -2 throw {@code ArithmeticException}
              -5.5 -6 -5 -5 -6 -6 -5 -6 throw {@code ArithmeticException}
              + *

  • 5.5 6 5 6 5 6 5 6 throw {@code ArithmeticException}
    2.5 3 2 3 2 3 2 2 throw {@code ArithmeticException}
    1.6 2 1 2 1 2 2 2 throw {@code ArithmeticException}
    1.1 2 1 2 1 1 1 1 throw {@code ArithmeticException}
    1.0 1 1 1 1 1 1 1 1
    -1.0 -1 -1 -1 -1 -1 -1 -1 -1
    -1.1 -2 -1 -1 -2 -1 -1 -1 throw {@code ArithmeticException}
    -1.6 -2 -1 -1 -2 -2 -2 -2 throw {@code ArithmeticException}
    -2.5 -3 -2 -2 -3 -3 -2 -2 throw {@code ArithmeticException}
    -5.5 -6 -5 -5 -6 -6 -5 -6 throw {@code ArithmeticException}
    * * *

    This {@code enum} is intended to replace the integer-based @@ -100,20 +104,24 @@ public enum RoundingMode { * value. * *

    Example: - * + *
    * - * + * + * * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * *
    Rounding mode UP Examples
    Input Number
    Input NumberInput rounded to one digit
    with {@code UP} rounding - *
    5.5 6
    2.5 3
    1.6 2
    1.1 2
    1.0 1
    -1.0 -1
    -1.1 -2
    -1.6 -2
    -2.5 -3
    -5.5 -6
    5.5 6
    2.5 3
    1.6 2
    1.1 2
    1.0 1
    -1.0 -1
    -1.1 -2
    -1.6 -2
    -2.5 -3
    -5.5 -6
    */ UP(BigDecimal.ROUND_UP), @@ -124,20 +132,24 @@ public enum RoundingMode { * rounding mode never increases the magnitude of the calculated value. * *

    Example: - * + *
    * - * + * + * * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * *
    Rounding mode DOWN Examples
    Input Number
    Input NumberInput rounded to one digit
    with {@code DOWN} rounding - *
    5.5 5
    2.5 2
    1.6 1
    1.1 1
    1.0 1
    -1.0 -1
    -1.1 -1
    -1.6 -1
    -2.5 -2
    -5.5 -5
    5.5 5
    2.5 2
    1.6 1
    1.1 1
    1.0 1
    -1.0 -1
    -1.1 -1
    -1.6 -1
    -2.5 -2
    -5.5 -5
    */ DOWN(BigDecimal.ROUND_DOWN), @@ -149,20 +161,24 @@ public enum RoundingMode { * that this rounding mode never decreases the calculated value. * *

    Example: - * + *
    * - * + * + * * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * *
    Rounding mode CEILING Examples
    Input Number
    Input NumberInput rounded to one digit
    with {@code CEILING} rounding - *
    5.5 6
    2.5 3
    1.6 2
    1.1 2
    1.0 1
    -1.0 -1
    -1.1 -1
    -1.6 -1
    -2.5 -2
    -5.5 -5
    5.5 6
    2.5 3
    1.6 2
    1.1 2
    1.0 1
    -1.0 -1
    -1.1 -1
    -1.6 -1
    -2.5 -2
    -5.5 -5
    */ CEILING(BigDecimal.ROUND_CEILING), @@ -174,20 +190,24 @@ public enum RoundingMode { * this rounding mode never increases the calculated value. * *

    Example: - * + *
    * - * + * + * * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * *
    Rounding mode FLOOR Examples
    Input Number
    Input NumberInput rounded to one digit
    with {@code FLOOR} rounding - *
    5.5 5
    2.5 2
    1.6 1
    1.1 1
    1.0 1
    -1.0 -1
    -1.1 -2
    -1.6 -2
    -2.5 -3
    -5.5 -6
    5.5 5
    2.5 2
    1.6 1
    1.1 1
    1.0 1
    -1.0 -1
    -1.1 -2
    -1.6 -2
    -2.5 -3
    -5.5 -6
    */ FLOOR(BigDecimal.ROUND_FLOOR), @@ -201,20 +221,24 @@ public enum RoundingMode { * mode commonly taught at school. * *

    Example: - * + *
    * - * + * + * * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * *
    Rounding mode HALF_UP Examples
    Input Number
    Input NumberInput rounded to one digit
    with {@code HALF_UP} rounding - *
    5.5 6
    2.5 3
    1.6 2
    1.1 1
    1.0 1
    -1.0 -1
    -1.1 -1
    -1.6 -2
    -2.5 -3
    -5.5 -6
    5.5 6
    2.5 3
    1.6 2
    1.1 1
    1.0 1
    -1.0 -1
    -1.1 -1
    -1.6 -2
    -2.5 -3
    -5.5 -6
    */ HALF_UP(BigDecimal.ROUND_HALF_UP), @@ -227,20 +251,24 @@ public enum RoundingMode { * {@code RoundingMode.DOWN}. * *

    Example: - * + *
    * - * + * + * * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * *
    Rounding mode HALF_DOWN Examples
    Input Number
    Input NumberInput rounded to one digit
    with {@code HALF_DOWN} rounding - *
    5.5 5
    2.5 2
    1.6 2
    1.1 1
    1.0 1
    -1.0 -1
    -1.1 -1
    -1.6 -2
    -2.5 -2
    -5.5 -5
    5.5 5
    2.5 2
    1.6 2
    1.1 1
    1.0 1
    -1.0 -1
    -1.1 -1
    -1.6 -2
    -2.5 -2
    -5.5 -5
    */ HALF_DOWN(BigDecimal.ROUND_HALF_DOWN), @@ -260,20 +288,24 @@ public enum RoundingMode { * arithmetic in Java. * *

    Example: - * + *
    * - * + * + * * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * *
    Rounding mode HALF_EVEN Examples
    Input Number
    Input NumberInput rounded to one digit
    with {@code HALF_EVEN} rounding - *
    5.5 6
    2.5 2
    1.6 2
    1.1 1
    1.0 1
    -1.0 -1
    -1.1 -1
    -1.6 -2
    -2.5 -2
    -5.5 -6
    5.5 6
    2.5 2
    1.6 2
    1.1 1
    1.0 1
    -1.0 -1
    -1.1 -1
    -1.6 -2
    -2.5 -2
    -5.5 -6
    */ HALF_EVEN(BigDecimal.ROUND_HALF_EVEN), @@ -284,20 +316,24 @@ public enum RoundingMode { * specified on an operation that yields an inexact result, an * {@code ArithmeticException} is thrown. *

    Example: - * + *
    * - * + * + * * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * *
    Rounding mode UNNECESSARY Examples
    Input Number
    Input NumberInput rounded to one digit
    with {@code UNNECESSARY} rounding - *
    5.5 throw {@code ArithmeticException}
    2.5 throw {@code ArithmeticException}
    1.6 throw {@code ArithmeticException}
    1.1 throw {@code ArithmeticException}
    1.0 1
    -1.0 -1
    -1.1 throw {@code ArithmeticException}
    -1.6 throw {@code ArithmeticException}
    -2.5 throw {@code ArithmeticException}
    -5.5 throw {@code ArithmeticException}
    5.5 throw {@code ArithmeticException}
    2.5 throw {@code ArithmeticException}
    1.6 throw {@code ArithmeticException}
    1.1 throw {@code ArithmeticException}
    1.0 1
    -1.0 -1
    -1.1 throw {@code ArithmeticException}
    -1.6 throw {@code ArithmeticException}
    -2.5 throw {@code ArithmeticException}
    -5.5 throw {@code ArithmeticException}
    */ UNNECESSARY(BigDecimal.ROUND_UNNECESSARY); diff --git a/jdk/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java b/jdk/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java index 4945713e228..d4414560fe6 100644 --- a/jdk/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java +++ b/jdk/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -275,6 +275,7 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl return (fd == null) ? true : false; } + @SuppressWarnings("deprecation") protected void finalize() { close(); } diff --git a/jdk/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java b/jdk/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java index 465ec01cc37..e66bbdc61aa 100644 --- a/jdk/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java +++ b/jdk/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -646,6 +646,7 @@ abstract class AbstractPlainSocketImpl extends SocketImpl /** * Cleans up if the user forgets to close it. */ + @SuppressWarnings("deprecation") protected void finalize() throws IOException { close(); } diff --git a/jdk/src/java.base/share/classes/java/net/HttpURLConnection.java b/jdk/src/java.base/share/classes/java/net/HttpURLConnection.java index 9e428e59584..448034e6225 100644 --- a/jdk/src/java.base/share/classes/java/net/HttpURLConnection.java +++ b/jdk/src/java.base/share/classes/java/net/HttpURLConnection.java @@ -54,7 +54,7 @@ import java.util.Date; * Security permissions *

    * If a security manager is installed, and if a method is called which results in an - * attempt to open a connection, the caller must possess either:- + * attempt to open a connection, the caller must possess either: *

    • a "connect" {@link SocketPermission} to the host/port combination of the * destination URL or
    • *
    • a {@link URLPermission} that permits this request.
    • diff --git a/jdk/src/java.base/share/classes/java/net/Inet4Address.java b/jdk/src/java.base/share/classes/java/net/Inet4Address.java index ab9c0c93811..25c5ab41224 100644 --- a/jdk/src/java.base/share/classes/java/net/Inet4Address.java +++ b/jdk/src/java.base/share/classes/java/net/Inet4Address.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -36,17 +36,17 @@ import java.io.ObjectStreamException; * and RFC 2365: * Administratively Scoped IP Multicast * - *

      Textual representation of IP addresses

      + *

      Textual representation of IP addresses

      * * Textual representation of IPv4 address used as input to methods * takes one of the following forms: * - *
      - * - * - * - * - *
      {@code d.d.d.d}
      {@code d.d.d}
      {@code d.d}
      {@code d}
      + *
        + *
      • {@code d.d.d.d}
      • + *
      • {@code d.d.d}
      • + *
      • {@code d.d}
      • + *
      • {@code d}
      • + *
      * *

      When four parts are specified, each is interpreted as a byte of * data and assigned, from left to right, to the four bytes of an IPv4 diff --git a/jdk/src/java.base/share/classes/java/net/Inet6Address.java b/jdk/src/java.base/share/classes/java/net/Inet6Address.java index ce4d9b93a62..0df84877cd5 100644 --- a/jdk/src/java.base/share/classes/java/net/Inet6Address.java +++ b/jdk/src/java.base/share/classes/java/net/Inet6Address.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -38,20 +38,20 @@ import java.util.Arrays; * Defined by * RFC 2373: IP Version 6 Addressing Architecture. * - *

      Textual representation of IP addresses

      + *

      Textual representation of IP addresses

      * * Textual representation of IPv6 address used as input to methods * takes one of the following forms: * *
        - *
      1. The preferred form is x:x:x:x:x:x:x:x, + *

      2. The preferred form is x:x:x:x:x:x:x:x, * where the 'x's are * the hexadecimal values of the eight 16-bit pieces of the * address. This is the full form. For example, * - *

        - * - *
        {@code 1080:0:0:0:8:800:200C:417A}
        + *
          + *
        • {@code 1080:0:0:0:8:800:200C:417A}
        • + *
        * *

        Note that it is not necessary to write the leading zeros in * an individual field. However, there must be at least one numeral @@ -66,9 +66,9 @@ import java.util.Arrays; * The "::" can also be used to compress the leading and/or trailing * zeros in an address. For example, * - *

        - * - *
        {@code 1080::8:800:200C:417A}
        + *
          + *
        • {@code 1080::8:800:200C:417A}
        • + *
        * *
      3. An alternative form that is sometimes more convenient * when dealing with a mixed environment of IPv4 and IPv6 nodes is @@ -77,35 +77,35 @@ import java.util.Arrays; * are the decimal values of the four low-order 8-bit pieces of the * standard IPv4 representation address, for example, * - *

        - * - * - *
        {@code ::FFFF:129.144.52.38}
        {@code ::129.144.52.38}
        + *
          + *
        • {@code ::FFFF:129.144.52.38}
        • + *
        • {@code ::129.144.52.38}
        • + *
        * *

        where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the * general forms of an IPv4-mapped IPv6 address and an * IPv4-compatible IPv6 address. Note that the IPv4 portion must be * in the "d.d.d.d" form. The following forms are invalid: * - *

        - * - * - * - * - *
        {@code ::FFFF:d.d.d}
        {@code ::FFFF:d.d}
        {@code ::d.d.d}
        {@code ::d.d}
        + *
          + *
        • {@code ::FFFF:d.d.d}
        • + *
        • {@code ::FFFF:d.d}
        • + *
        • {@code ::d.d.d}
        • + *
        • {@code ::d.d}
        • + *
        * *

        The following form: * - *

        - * - *
        {@code ::FFFF:d}
        + *
          + *
        • {@code ::FFFF:d}
        • + *
        * *

        is valid, however it is an unconventional representation of * the IPv4-compatible IPv6 address, * - *

        - * - *
        {@code ::255.255.0.d}
        + *
          + *
        • {@code ::255.255.0.d}
        • + *
        * *

        while "::d" corresponds to the general IPv6 address * "0:0:0:0:0:0:0:d".

      4. @@ -119,9 +119,10 @@ import java.util.Arrays; *

        Special IPv6 address

        * *
        - * - * - *
        IPv4-mapped addressOf the form::ffff:w.x.y.z, this IPv6 address is used to + * + * + * + * *
        Description of IPv4-mapped address
        IPv4-mapped addressOf the form ::ffff:w.x.y.z, this IPv6 address is used to * represent an IPv4 address. It allows the native program to * use the same address data structure and also the same * socket when communicating with both IPv4 and IPv6 nodes. @@ -134,7 +135,7 @@ import java.util.Arrays; * address.
        * - *

        Textual representation of IPv6 scoped addresses

        + *

        Textual representation of IPv6 scoped addresses

        * *

        The textual representation of IPv6 addresses as described above can be * extended to specify IPv6 scoped addresses. This extension to the basic diff --git a/jdk/src/java.base/share/classes/java/net/InetAddress.java b/jdk/src/java.base/share/classes/java/net/InetAddress.java index 84457f30066..95b38875d9c 100644 --- a/jdk/src/java.base/share/classes/java/net/InetAddress.java +++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -72,8 +72,10 @@ import sun.net.util.IPAddressUtil; * *

        Address types

        * - *
        - * + *
        unicast
        + * + * + * * - * + * * + * *
        Description of unicast and multicast address types
        unicastAn identifier for a single interface. A packet sent to * a unicast address is delivered to the interface identified by * that address. @@ -92,10 +94,11 @@ import sun.net.util.IPAddressUtil; * IP address loops around and becomes IP input on the local * host. This address is often used when testing a * client.
        multicast
        multicastAn identifier for a set of interfaces (typically belonging * to different nodes). A packet sent to a multicast address is * delivered to all interfaces identified by that address.
        * *

        IP address scope

        diff --git a/jdk/src/java.base/share/classes/java/net/NetPermission.java b/jdk/src/java.base/share/classes/java/net/NetPermission.java index dad3fb99f32..f17c1b46d05 100644 --- a/jdk/src/java.base/share/classes/java/net/NetPermission.java +++ b/jdk/src/java.base/share/classes/java/net/NetPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -47,12 +47,16 @@ import java.util.StringTokenizer; * and for each provides a description of what the permission allows * and a discussion of the risks of granting code the permission. * - * + *
        + * + * * * * * * + * + * * * * @@ -151,6 +155,7 @@ import java.util.StringTokenizer; * creating a ProtectionDomain/CodeSource for a class even though * that class really didn't come from that location. * + *
        Permission target name, what the permission allows, and associated risks
        Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
        allowHttpTraceThe ability to use the HTTP TRACE method in HttpURLConnection.
        * * @see java.security.BasicPermission @@ -162,6 +167,7 @@ import java.util.StringTokenizer; * * @author Marianne Mueller * @author Roland Schemers + * @since 1.2 */ public final class NetPermission extends BasicPermission { diff --git a/jdk/src/java.base/share/classes/java/net/NetworkInterface.java b/jdk/src/java.base/share/classes/java/net/NetworkInterface.java index 960024f939d..66141af44fa 100644 --- a/jdk/src/java.base/share/classes/java/net/NetworkInterface.java +++ b/jdk/src/java.base/share/classes/java/net/NetworkInterface.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -175,14 +175,16 @@ public final class NetworkInterface { */ public java.util.List getInterfaceAddresses() { java.util.List lst = new java.util.ArrayList<>(1); - SecurityManager sec = System.getSecurityManager(); - for (int j=0; j - * - * - * - *
        {@code mailto:java-net@java.sun.com}
        {@code news:comp.lang.java}
        {@code urn:isbn:096139210x}
        + *
          + *
        • {@code mailto:java-net@java.sun.com}
        • + *
        • {@code news:comp.lang.java}
        • + *
        • {@code urn:isbn:096139210x}
        • + *
        * *

        A hierarchical URI is either an absolute URI whose * scheme-specific part begins with a slash character, or a relative URI, that @@ -132,8 +132,12 @@ import java.lang.NullPointerException; // for javadoc * *

        All told, then, a URI instance has the following nine components: * - *

        + *
        + * + * * + * + * * * * @@ -143,6 +147,7 @@ import java.lang.NullPointerException; // for javadoc * * * + * *
        Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment
        ComponentType
        scheme{@code String}
        scheme-specific-part    {@code String}
        authority{@code String}
        path{@code String}
        query{@code String}
        fragment{@code String}
        * * In a given instance any particular component is either undefined or @@ -248,30 +253,32 @@ import java.lang.NullPointerException; // for javadoc * which are taken from that specification, are used below to describe these * constraints: * - *
        - * + *
        alpha
        + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * + * *
        Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other
        alphaThe US-ASCII alphabetic characters, * {@code 'A'} through {@code 'Z'} * and {@code 'a'} through {@code 'z'}
        digit
        digitThe US-ASCII decimal digit characters, * {@code '0'} through {@code '9'}
        alphanum
        alphanumAll alpha and digit characters
        unreserved    
        unreserved    All alphanum characters together with those in the string * {@code "_-!.~'()*"}
        punct
        punctThe characters in the string {@code ",;:$&+="}
        reserved
        reservedAll punct characters together with those in the string * {@code "?/[]@"}
        escaped
        escapedEscaped octets, that is, triplets consisting of the percent * character ({@code '%'}) followed by two hexadecimal digits * ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and * {@code 'a'}-{@code 'f'})
        other
        otherThe Unicode characters that are not in the US-ASCII character set, * are not control characters (according to the {@link * java.lang.Character#isISOControl(char) Character.isISOControl} @@ -279,9 +286,10 @@ import java.lang.NullPointerException; // for javadoc * java.lang.Character#isSpaceChar(char) Character.isSpaceChar} * method)  (Deviation from RFC 2396, which is * limited to US-ASCII)
        * - *

        The set of all legal URI characters consists of + *

        The set of all legal URI characters consists of * the unreserved, reserved, escaped, and other * characters. * @@ -308,20 +316,20 @@ import java.lang.NullPointerException; // for javadoc * *

          * - *
        • A character is encoded by replacing it + *

        • A character is encoded by replacing it * with the sequence of escaped octets that represent that character in the * UTF-8 character set. The Euro currency symbol ({@code '\u005Cu20AC'}), * for example, is encoded as {@code "%E2%82%AC"}. (Deviation from * RFC 2396, which does not specify any particular character * set.)

        • * - *
        • An illegal character is quoted simply by + *

        • An illegal character is quoted simply by * encoding it. The space character, for example, is quoted by replacing it * with {@code "%20"}. UTF-8 contains US-ASCII, hence for US-ASCII * characters this transformation has exactly the effect required by * RFC 2396.

        • * - *
        • + *

        • * A sequence of escaped octets is decoded by * replacing it with the sequence of characters that it represents in the * UTF-8 character set. UTF-8 contains US-ASCII, hence decoding has the @@ -983,7 +991,7 @@ public final class URI *

          If the given URI is already absolute, or if this URI is opaque, then * the given URI is returned. * - *

          If the given URI's fragment component is + *

          If the given URI's fragment component is * defined, its path component is empty, and its scheme, authority, and * query components are undefined, then a URI with the given fragment but * with all other components equal to those of this URI is returned. This diff --git a/jdk/src/java.base/share/classes/java/net/URL.java b/jdk/src/java.base/share/classes/java/net/URL.java index b029b83d7ca..1ac1437ab96 100644 --- a/jdk/src/java.base/share/classes/java/net/URL.java +++ b/jdk/src/java.base/share/classes/java/net/URL.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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,6 +41,8 @@ import java.util.NoSuchElementException; import java.util.ServiceConfigurationError; import java.util.ServiceLoader; +import jdk.internal.misc.JavaNetURLAccess; +import jdk.internal.misc.SharedSecrets; import sun.security.util.SecurityConstants; import sun.security.action.GetPropertyAction; @@ -1614,6 +1616,17 @@ public final class URL implements java.io.Serializable { private void setSerializedHashCode(int hc) { this.hashCode = hc; } + + static { + SharedSecrets.setJavaNetURLAccess( + new JavaNetURLAccess() { + @Override + public URLStreamHandler getHandler(URL u) { + return u.handler; + } + } + ); + } } final class UrlDeserializedState { diff --git a/jdk/src/java.base/share/classes/java/net/URLClassLoader.java b/jdk/src/java.base/share/classes/java/net/URLClassLoader.java index 2e52fe2b4e9..d6bd9546750 100644 --- a/jdk/src/java.base/share/classes/java/net/URLClassLoader.java +++ b/jdk/src/java.base/share/classes/java/net/URLClassLoader.java @@ -228,6 +228,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { * allow creation of a class loader. * * @since 9 + * @spec JPMS */ public URLClassLoader(String name, URL[] urls, @@ -262,6 +263,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { * creation of a class loader. * * @since 9 + * @spec JPMS */ public URLClassLoader(String name, URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory) { @@ -558,6 +560,9 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { * @throws IllegalArgumentException if the package name is * already defined by this class loader * @return the newly defined {@code Package} object + * + * @revised 9 + * @spec JPMS */ protected Package definePackage(String name, Manifest man, URL url) { String path = name.replace('.', '/').concat("/"); diff --git a/jdk/src/java.base/share/classes/java/net/URLConnection.java b/jdk/src/java.base/share/classes/java/net/URLConnection.java index e2ed0cfcbdd..c9331b704af 100644 --- a/jdk/src/java.base/share/classes/java/net/URLConnection.java +++ b/jdk/src/java.base/share/classes/java/net/URLConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -54,16 +54,21 @@ import sun.security.action.GetPropertyAction; * read from and to write to the resource referenced by the URL. In * general, creating a connection to a URL is a multistep process: * - *

          + *
          + * + * * * + * + * * * + * *
          Describes the process of creating a connection to a URL: openConnection() and connect() over time.
          {@code openConnection()}{@code connect()}
          Manipulate parameters that affect the connection to the remote * resource.Interact with the resource; query header fields and * contents.
          * ----------------------------> - *
          time
          + *
          time * *
            *
          1. The connection object is created by invoking the diff --git a/jdk/src/java.base/share/classes/java/net/URLPermission.java b/jdk/src/java.base/share/classes/java/net/URLPermission.java index e78c7aee68c..43a8bd43066 100644 --- a/jdk/src/java.base/share/classes/java/net/URLPermission.java +++ b/jdk/src/java.base/share/classes/java/net/URLPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -72,9 +72,12 @@ import java.security.Permission; * separated by '/' characters. path may also be empty. The path is specified * in a similar way to the path in {@link java.io.FilePermission}. There are * three different ways as the following examples show: - * + *
            * + * * + * + * * * * @@ -90,6 +93,7 @@ import java.security.Permission; * example). * * + * *
            URL Examples
            Example urlDescription
            http://www.oracle.com/a/b/c.htmlA url which identifies a specific (single) resource
            *

            * The '*' and '-' may only be specified in the final segment of a path and must be @@ -246,9 +250,12 @@ public final class URLPermission extends Permission { *

          2. otherwise, return false
          3. *
        *

        Some examples of how paths are matched are shown below: - * + *
        * + * * + * + * * * * @@ -256,6 +263,7 @@ public final class URLPermission extends Permission { * * * + * *
        Examples of Path Matching
        this's pathp's pathmatch
        /a/b/a/byes
        /a/b/*/a/b/cyes
        /a/b/*/a/b/c/dno
        /a/b/-/a/b/c/d/eyes
        /a/b/-/a/b/c/*yes
        /a/b/*/a/b/c/-no
        */ public boolean implies(Permission p) { diff --git a/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html b/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html index f4bf1243681..003749ba7f2 100644 --- a/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html +++ b/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html @@ -1,5 +1,6 @@ + - Networking Properties -

        Networking Properties

        -

        There are a few standard system properties used to +

        Networking Properties

        +

        There are a few standard system properties used to alter the mechanisms and behavior of the various classes of the java.net package. Some are checked only once at startup of the VM, and therefore are best set using the -D option of the java command, @@ -39,7 +39,7 @@ the +

        IPv4 / IPv6

        • java.net.preferIPv4Stack (default: false)
          @@ -62,7 +62,7 @@ and detail all of these properties.

          returned by the operating system.

        Both of these properties are checked only once, at startup.

        - +

        Proxies

        A proxy server allows indirect connection to network services and is used mainly for security (to get through firewalls) and @@ -155,7 +155,7 @@ of proxies.

        globally through their user interface). Note that this property is checked only once at startup.

        - +

        Misc HTTP properties

        • http.agent (default: “Java/<version>”)
          @@ -214,7 +214,7 @@ of proxies.

        All these properties are checked only once at startup.

        - +

        Address Cache

        The java.net package, when doing name resolution, uses an address cache for both security and performance reasons. Any address diff --git a/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java b/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java index 838cc40a09a..0439afbffca 100644 --- a/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java +++ b/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java @@ -45,7 +45,7 @@ import jdk.internal.misc.Unsafe; * this program or another. Whether or not such changes occur, and when they * occur, is operating-system dependent and therefore unspecified. * - *

        All or part of a mapped byte buffer may become + *

        All or part of a mapped byte buffer may become * inaccessible at any time, for example if the mapped file is truncated. An * attempt to access an inaccessible region of a mapped byte buffer will not * change the buffer's content and will cause an unspecified exception to be @@ -213,7 +213,6 @@ public abstract class MappedByteBuffer /** * {@inheritDoc} - * @since 9 */ @Override public final MappedByteBuffer position(int newPosition) { @@ -223,7 +222,6 @@ public abstract class MappedByteBuffer /** * {@inheritDoc} - * @since 9 */ @Override public final MappedByteBuffer limit(int newLimit) { @@ -233,7 +231,6 @@ public abstract class MappedByteBuffer /** * {@inheritDoc} - * @since 9 */ @Override public final MappedByteBuffer mark() { @@ -243,7 +240,6 @@ public abstract class MappedByteBuffer /** * {@inheritDoc} - * @since 9 */ @Override public final MappedByteBuffer reset() { @@ -253,7 +249,6 @@ public abstract class MappedByteBuffer /** * {@inheritDoc} - * @since 9 */ @Override public final MappedByteBuffer clear() { @@ -263,7 +258,6 @@ public abstract class MappedByteBuffer /** * {@inheritDoc} - * @since 9 */ @Override public final MappedByteBuffer flip() { @@ -273,7 +267,6 @@ public abstract class MappedByteBuffer /** * {@inheritDoc} - * @since 9 */ @Override public final MappedByteBuffer rewind() { diff --git a/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template b/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template index 1292ca458c6..0a39543a88e 100644 --- a/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template +++ b/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template @@ -93,7 +93,7 @@ import java.util.stream.$Streamtype$Stream; * #if[byte] * - * + * *

        Direct vs. non-direct buffers

        * *

        A byte buffer is either direct or non-direct. Given a @@ -128,7 +128,7 @@ import java.util.stream.$Streamtype$Stream; * that explicit buffer management can be done in performance-critical code. * * - * + * *

        Access to binary data

        * *

        This class defines methods for reading and writing values of all other @@ -155,7 +155,7 @@ import java.util.stream.$Streamtype$Stream; * parameters of the absolute get and put methods are in terms of * bytes rather than of the type being read or written. * - * + * * *

        For access to homogeneous binary data, that is, sequences of values of * the same type, this class defines methods that can create views of a @@ -1069,7 +1069,6 @@ public abstract class $Type$Buffer /** * {@inheritDoc} - * @since 9 */ @Override public @@ -1083,7 +1082,6 @@ public abstract class $Type$Buffer /** * {@inheritDoc} - * @since 9 */ @Override public @@ -1097,7 +1095,6 @@ public abstract class $Type$Buffer /** * {@inheritDoc} - * @since 9 */ @Override public @@ -1111,7 +1108,6 @@ public abstract class $Type$Buffer /** * {@inheritDoc} - * @since 9 */ @Override public @@ -1125,7 +1121,6 @@ public abstract class $Type$Buffer /** * {@inheritDoc} - * @since 9 */ @Override public @@ -1139,7 +1134,6 @@ public abstract class $Type$Buffer /** * {@inheritDoc} - * @since 9 */ @Override public @@ -1153,7 +1147,6 @@ public abstract class $Type$Buffer /** * {@inheritDoc} - * @since 9 */ @Override public diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousChannelGroup.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousChannelGroup.java index 92b7e66a174..acd7da8b1d9 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousChannelGroup.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousChannelGroup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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,11 +60,15 @@ import java.util.concurrent.TimeUnit; * default group is not configured then the pooled threads of the default group * are {@link Thread#isDaemon daemon} threads. * - * + *
        + * + * * * * * + * + * * * * * + * *
        System properties
        System propertyDescription
        {@code java.nio.channels.DefaultThreadPool.threadFactory} The value of this property is taken to be the fully-qualified name @@ -86,9 +90,10 @@ import java.util.concurrent.TimeUnit; * unspecified error to be thrown during the construction of the default * group.
        * - *

        Threading

        + *

        Threading

        * *

        The completion handler for an I/O operation initiated on a channel bound * to a group is guaranteed to be invoked by one of the pooled threads in the @@ -103,7 +108,7 @@ import java.util.concurrent.TimeUnit; * handler directly by the initiating thread (see {@link * AsynchronousServerSocketChannel#accept(Object,CompletionHandler) accept}). * - *

        Shutdown and Termination

        + *

        Shutdown and Termination

        * *

        The {@link #shutdown() shutdown} method is used to initiate an orderly * shutdown of a group. An orderly shutdown marks the group as shutdown; diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java index 4b5548e79e5..9653a433050 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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 @@ -133,8 +133,12 @@ public abstract class AsynchronousFileChannel *

        In addition to {@code READ} and {@code WRITE}, the following options * may be present: * - * + *
        + * + * * + * + * * * * * + * *
        additional options
        Option Description
        {@link StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING} When opening an existing file, the file is first truncated to a @@ -186,6 +190,7 @@ public abstract class AsynchronousFileChannel * href="../file/package-summary.html#integrity"> Synchronized I/O file * integrity).
        * *

        An implementation may also support additional options. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java index 44a2460426f..137451c7763 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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 @@ -52,11 +52,15 @@ import java.io.IOException; *

        Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Channels of this type support the following options: *

        - * + *
        + * + * * * * * + * + * * * * @@ -65,6 +69,7 @@ import java.io.IOException; * * * + * *
        Socket options
        Option NameDescription
        {@link java.net.StandardSocketOptions#SO_RCVBUF SO_RCVBUF} The size of the socket receive buffer {@link java.net.StandardSocketOptions#SO_REUSEADDR SO_REUSEADDR} Re-use address
        *
        * Additional (implementation specific) options may also be supported. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java index d5e2abeb63a..6ba16628632 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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 @@ -62,11 +62,15 @@ import java.nio.ByteBuffer; *

        Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Asynchronous socket channels support the following options: *

        - * + *
        + * + * * * * * + * + * * * * @@ -87,6 +91,7 @@ import java.nio.ByteBuffer; * * * + * *
        Socket options
        Option NameDescription
        {@link java.net.StandardSocketOptions#SO_SNDBUF SO_SNDBUF} The size of the socket send buffer {@link java.net.StandardSocketOptions#TCP_NODELAY TCP_NODELAY} Disable the Nagle algorithm
        *
        * Additional (implementation specific) options may also be supported. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java index 0b3278bf356..ac96bc61596 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -57,11 +57,15 @@ import java.nio.channels.spi.SelectorProvider; * setOption} method. A datagram channel to an Internet Protocol socket supports * the following options: *
        - * + *
        + * + * * * * * + * + * * * * @@ -97,6 +101,7 @@ import java.nio.channels.spi.SelectorProvider; * IP_MULTICAST_LOOP} * * + * *
        Socket options
        Option NameDescription
        {@link java.net.StandardSocketOptions#SO_SNDBUF SO_SNDBUF} The size of the socket send buffer Loopback for Internet Protocol (IP) multicast datagrams
        *
        * Additional (implementation specific) options may also be supported. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java index 066ef8a9fa9..551ef21bb2c 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -118,7 +118,7 @@ import java.util.Collections; * versa. Changing the file's content by writing bytes will change the content * seen by the originating object, and vice versa. * - *

        At various points this class specifies that an + *

        At various points this class specifies that an * instance that is "open for reading," "open for writing," or "open for * reading and writing" is required. A channel obtained via the {@link * java.io.FileInputStream#getChannel getChannel} method of a {@link @@ -131,7 +131,7 @@ import java.util.Collections; * was created with mode {@code "r"} and will be open for reading and writing * if the instance was created with mode {@code "rw"}. * - *

        A file channel that is open for writing may be in + *

        A file channel that is open for writing may be in * append mode, for example if it was obtained from a file-output stream * that was created by invoking the {@link * java.io.FileOutputStream#FileOutputStream(java.io.File,boolean) @@ -174,8 +174,12 @@ public abstract class FileChannel *

        In the addition to {@code READ} and {@code WRITE}, the following * options may be present: * - * + *
        + * + * * + * + * * * * * + * *
        additional options
        Option Description
        {@link StandardOpenOption#APPEND APPEND} If this option is present then the file is opened for writing and @@ -237,6 +241,7 @@ public abstract class FileChannel * href="../file/package-summary.html#integrity"> Synchronized I/O file * integrity).
        * *

        An implementation may also support additional options. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/FileLock.java b/jdk/src/java.base/share/classes/java/nio/channels/FileLock.java index 3a5c6a1a4b7..0edd94d5e25 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/FileLock.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/FileLock.java @@ -73,7 +73,7 @@ import java.util.Objects; *

        File-lock objects are safe for use by multiple concurrent threads. * * - *

        Platform dependencies

        + *

        Platform dependencies

        * *

        This file-locking API is intended to map directly to the native locking * facility of the underlying operating system. Thus the locks held on a file diff --git a/jdk/src/java.base/share/classes/java/nio/channels/SelectableChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/SelectableChannel.java index 8cf4dab27a4..cbb77dab86d 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/SelectableChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/SelectableChannel.java @@ -64,7 +64,7 @@ import java.nio.channels.spi.SelectorProvider; * threads.

        * * - * + * *

        Blocking mode

        * * A selectable channel is either in blocking mode or in diff --git a/jdk/src/java.base/share/classes/java/nio/channels/SelectionKey.java b/jdk/src/java.base/share/classes/java/nio/channels/SelectionKey.java index bd7c74de52a..6af664fa96b 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/SelectionKey.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/SelectionKey.java @@ -40,7 +40,7 @@ import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; * next selection operation. The validity of a key may be tested by invoking * its {@link #isValid isValid} method. * - * + * * *

        A selection key contains two operation sets represented as * integer values. Each bit of an operation set denotes a category of diff --git a/jdk/src/java.base/share/classes/java/nio/channels/Selector.java b/jdk/src/java.base/share/classes/java/nio/channels/Selector.java index cfed526b47d..cae3ff2c137 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/Selector.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/Selector.java @@ -42,7 +42,7 @@ import java.util.Set; * method of a custom selector provider. A selector remains open until it is * closed via its {@link #close close} method. * - * + * * *

        A selectable channel's registration with a selector is represented by a * {@link SelectionKey} object. A selector maintains three sets of selection @@ -80,7 +80,7 @@ import java.util.Set; * during the next selection operation, at which time the key will removed from * all of the selector's key sets. * - *

        Keys are added to the selected-key set by selection + *

        Keys are added to the selected-key set by selection * operations. A key may be removed directly from the selected-key set by * invoking the set's {@link java.util.Set#remove(java.lang.Object) remove} * method or by invoking the {@link java.util.Iterator#remove() remove} method @@ -90,7 +90,7 @@ import java.util.Set; * operations. Keys may not be added directly to the selected-key set.

        * * - * + * *

        Selection

        * *

        During each selection operation, keys may be added to and removed from a @@ -183,7 +183,7 @@ import java.util.Set; *

        The {@link #close close} method synchronizes on the selector and all * three key sets in the same order as in a selection operation. * - * + * * *

        A selector's key and selected-key sets are not, in general, safe for use * by multiple concurrent threads. If such a thread might modify one of these diff --git a/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java index 7c9666bbdd8..ea8951b2d2e 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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,11 +46,15 @@ import java.nio.channels.spi.SelectorProvider; *

        Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Server-socket channels support the following options: *

        - * + *
        + * + * * * * * + * + * * * * @@ -59,6 +63,7 @@ import java.nio.channels.spi.SelectorProvider; * * * + * *
        Socket options
        Option NameDescription
        {@link java.net.StandardSocketOptions#SO_RCVBUF SO_RCVBUF} The size of the socket receive buffer {@link java.net.StandardSocketOptions#SO_REUSEADDR SO_REUSEADDR} Re-use address
        *
        * Additional (implementation specific) options may also be supported. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java index c25cc68edf2..0025d2c22cf 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -66,11 +66,15 @@ import java.nio.channels.spi.SelectorProvider; *

        Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Socket channels support the following options: *

        - * + *
        + * + * * * * * + * + * * * * @@ -96,6 +100,7 @@ import java.nio.channels.spi.SelectorProvider; * * * + * *
        Socket options
        Option NameDescription
        {@link java.net.StandardSocketOptions#SO_SNDBUF SO_SNDBUF} The size of the socket send buffer {@link java.net.StandardSocketOptions#TCP_NODELAY TCP_NODELAY} Disable the Nagle algorithm
        *
        * Additional (implementation specific) options may also be supported. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/package-info.java b/jdk/src/java.base/share/classes/java/nio/channels/package-info.java index b38bdea058a..d29ae67590f 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/package-info.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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,33 +28,46 @@ * performing I/O operations, such as files and sockets; defines selectors, for * multiplexed, non-blocking I/O operations. * - * + * * - *
        - * - * + *
        ChannelsDescription
        {@link java.nio.channels.Channel}
        + * + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * - * - * + * + * + * * - * + * * - * + * * - * + * * - * + * * *
        Lists channels and their descriptions
        ChannelsDescription
        {@link java.nio.channels.Channel}A nexus for I/O operations
          {@link java.nio.channels.ReadableByteChannel}
        + *   {@link java.nio.channels.ReadableByteChannel}Can read into a buffer
            {@link java.nio.channels.ScatteringByteChannel}  
        + *     {@link java.nio.channels.ScatteringByteChannel}  Can read into a sequence of buffers
          {@link java.nio.channels.WritableByteChannel}
        + *   {@link java.nio.channels.WritableByteChannel}Can write from a buffer
            {@link java.nio.channels.GatheringByteChannel}
        + *     {@link java.nio.channels.GatheringByteChannel}Can write from a sequence of buffers
          {@link java.nio.channels.ByteChannel}
        + *   {@link java.nio.channels.ByteChannel}Can read/write to/from a buffer
            {@link java.nio.channels.SeekableByteChannel}A {@code ByteChannel} connected to an entity that contains a variable-length sequence of bytes
          {@link java.nio.channels.AsynchronousChannel}
        + *     {@link java.nio.channels.SeekableByteChannel}A {@code ByteChannel} connected to an entity that contains a variable-length + * sequence of bytes
        + *   {@link java.nio.channels.AsynchronousChannel}Supports asynchronous I/O operations.
            {@link java.nio.channels.AsynchronousByteChannel}
        + *     {@link java.nio.channels.AsynchronousByteChannel}Can read and write bytes asynchronously
          {@link java.nio.channels.NetworkChannel}
        + *   {@link java.nio.channels.NetworkChannel}A channel to a network socket
            {@link java.nio.channels.MulticastChannel}
        + *     {@link java.nio.channels.MulticastChannel}Can join Internet Protocol (IP) multicast groups
        {@link java.nio.channels.Channels}
        {@link java.nio.channels.Channels}Utility methods for channel/stream interoperation
        * @@ -109,13 +122,19 @@ * be constructed that uses a given charset to encode characters into bytes and * write them to a given writable byte channel. * - *
        - * - * + *
        File channelsDescription
        {@link java.nio.channels.FileChannel}
        + * + * + * + * * - * + * * - * + * * *
        + * Lists file channels and their descriptions
        File channelsDescription
        + * {@link java.nio.channels.FileChannel}Reads, writes, maps, and manipulates files
        {@link java.nio.channels.FileLock}
        + * {@link java.nio.channels.FileLock}A lock on a (region of a) file
        {@link java.nio.MappedByteBuffer}  
        + * {@link java.nio.MappedByteBuffer}  A direct byte buffer mapped to a region of a file
        * @@ -136,27 +155,35 @@ * file channel connected to the same underlying file as the {@link java.io} * class. * - * - *
        - * - * + * + *
        Multiplexed, non-blocking I/O

        Description

        {@link java.nio.channels.SelectableChannel}
        + * + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * *
        + * Lists multiplexed, non-blocking channels and their descriptions
        Multiplexed, non-blocking I/ODescription
        {@link java.nio.channels.SelectableChannel}A channel that can be multiplexed
          {@link java.nio.channels.DatagramChannel}
        + *   {@link java.nio.channels.DatagramChannel}A channel to a datagram-oriented socket
          {@link java.nio.channels.Pipe.SinkChannel}
        + *   {@link java.nio.channels.Pipe.SinkChannel}The write end of a pipe
          {@link java.nio.channels.Pipe.SourceChannel}
        + *   {@link java.nio.channels.Pipe.SourceChannel}The read end of a pipe
          {@link java.nio.channels.ServerSocketChannel}  
        + *   {@link java.nio.channels.ServerSocketChannel}  A channel to a stream-oriented listening socket
          {@link java.nio.channels.SocketChannel}
        + *   {@link java.nio.channels.SocketChannel}A channel for a stream-oriented connecting socket
        {@link java.nio.channels.Selector}
        {@link java.nio.channels.Selector}A multiplexor of selectable channels
        {@link java.nio.channels.SelectionKey}
        {@link java.nio.channels.SelectionKey}A token representing the registration
        of a channel * with a selector
        {@link java.nio.channels.Pipe}
        {@link java.nio.channels.Pipe}Two channels that form a unidirectional pipe
        * @@ -222,19 +249,27 @@ * directly; custom channel classes should extend the appropriate {@link * java.nio.channels.SelectableChannel} subclasses defined in this package. * - * + * * - *
        - * - * + *
        Asynchronous I/ODescription
        {@link java.nio.channels.AsynchronousFileChannel}
        + * + * + * * - * + * * - * + * * - * + * * - * + * * *
        + * Lists asynchronous channels and their descriptions
        + * Asynchronous I/ODescription
        + * {@link java.nio.channels.AsynchronousFileChannel}An asynchronous channel for reading, writing, and manipulating a file
        {@link java.nio.channels.AsynchronousSocketChannel}
        + * {@link java.nio.channels.AsynchronousSocketChannel}An asynchronous channel to a stream-oriented connecting socket
        {@link java.nio.channels.AsynchronousServerSocketChannel}  
        + * {@link java.nio.channels.AsynchronousServerSocketChannel}  An asynchronous channel to a stream-oriented listening socket
        {@link java.nio.channels.CompletionHandler}
        + * {@link java.nio.channels.CompletionHandler}A handler for consuming the result of an asynchronous operation
        {@link java.nio.channels.AsynchronousChannelGroup}
        + * {@link java.nio.channels.AsynchronousChannelGroup}A grouping of asynchronous channels for the purpose of resource sharing
        * @@ -277,7 +312,6 @@ * so that sophisticated users can take advantage of operating-system-specific * asynchronous I/O mechanisms when very high performance is required. * - *
        *

        Unless otherwise noted, passing a {@code null} argument to a constructor * or method in any class or interface in this package will cause a {@link * java.lang.NullPointerException NullPointerException} to be thrown. diff --git a/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template b/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template index 74b6f928439..dd69c9bf62b 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template +++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template @@ -41,7 +41,7 @@ import java.util.Arrays; * An engine that can transform a sequence of $itypesPhrase$ into a sequence of * $otypesPhrase$. * - * + * * *

        The input $itype$ sequence is provided in a $itype$ buffer or a series * of such buffers. The output $otype$ sequence is written to a $otype$ buffer @@ -76,14 +76,14 @@ import java.util.Arrays; * examine this object and fill the input buffer, flush the output buffer, or * attempt to recover from $a$ $coding$ error, as appropriate, and try again. * - * + * * *

        There are two general types of $coding$ errors. If the input $itype$ * sequence is $notLegal$ then the input is considered malformed. If * the input $itype$ sequence is legal but cannot be mapped to a valid * $outSequence$ then an unmappable character has been encountered. * - * + * * *

        How $a$ $coding$ error is handled depends upon the action requested for * that type of error, which is described by an instance of the {@link diff --git a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java index 81209891bb4..480ede3e6a2 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java +++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -67,7 +67,7 @@ import sun.security.action.GetPropertyAction; * concurrent threads. * * - * + * *

        Charset names

        * *

        Charsets are named by strings composed of the following characters: @@ -113,14 +113,14 @@ import sun.security.action.GetPropertyAction; * The aliases of a charset are returned by the {@link #aliases() aliases} * method. * - *

        Some charsets have an historical name that is defined for + *

        Some charsets have an historical name that is defined for * compatibility with previous versions of the Java platform. A charset's * historical name is either its canonical name or one of its aliases. The * historical name is returned by the {@code getEncoding()} methods of the * {@link java.io.InputStreamReader#getEncoding InputStreamReader} and {@link * java.io.OutputStreamWriter#getEncoding OutputStreamWriter} classes. * - *

        If a charset listed in the If a charset listed in the IANA Charset * Registry is supported by an implementation of the Java platform then * its canonical name must be the name listed in the registry. Many charsets @@ -142,29 +142,34 @@ import sun.security.action.GetPropertyAction; * * * - *

        Every implementation of the Java platform is required to support the + *

        Every implementation of the Java platform is required to support the * following standard charsets. Consult the release documentation for your * implementation to see if any other charsets are supported. The behavior * of such optional charsets may differ between implementations. * - *

        - * - * + *
        CharsetDescription
        {@code US-ASCII}
        + * + * + * + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * + * *
        Description of standard charsets
        CharsetDescription
        {@code US-ASCII}Seven-bit ASCII, a.k.a. {@code ISO646-US}, * a.k.a. the Basic Latin block of the Unicode character set
        ISO-8859-1  
        ISO-8859-1  ISO Latin Alphabet No. 1, a.k.a. {@code ISO-LATIN-1}
        {@code UTF-8}
        {@code UTF-8}Eight-bit UCS Transformation Format
        {@code UTF-16BE}
        {@code UTF-16BE}Sixteen-bit UCS Transformation Format, * big-endian byte order
        {@code UTF-16LE}
        {@code UTF-16LE}Sixteen-bit UCS Transformation Format, * little-endian byte order
        {@code UTF-16}
        {@code UTF-16}Sixteen-bit UCS Transformation Format, * byte order identified by an optional byte-order mark
        * *

        The {@code UTF-8} charset is specified by aliasSet = null; /** diff --git a/jdk/src/java.base/share/classes/java/nio/charset/package-info.java b/jdk/src/java.base/share/classes/java/nio/charset/package-info.java index 9d93a710a25..80141dc8b6a 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/package-info.java +++ b/jdk/src/java.base/share/classes/java/nio/charset/package-info.java @@ -27,17 +27,19 @@ * Defines charsets, decoders, and encoders, for translating between * bytes and Unicode characters. * - *

        - * - * + *
        Class nameDescription
        {@link java.nio.charset.Charset}
        + * + * + * * - * + * * - * + * * - * + * * - * + * * * *
        Summary of charsets, decoders, and encoders in this package
        Class nameDescriptiPath + *
        {@link java.nio.charset.Charset}A named mapping between characters
        and bytes
        {@link java.nio.charset.CharsetDecoder}
        {@link java.nio.charset.CharsetDecoder}Decodes bytes into characters
        {@link java.nio.charset.CharsetEncoder}  
        {@link java.nio.charset.CharsetEncoder}Encodes characters into bytes
        {@link java.nio.charset.CoderResult}  
        {@link java.nio.charset.CoderResult}Describes coder results
        {@link java.nio.charset.CodingErrorAction}  
        {@link java.nio.charset.CodingErrorAction}Describes actions to take when
        coding errors are detected
        diff --git a/jdk/src/java.base/share/classes/java/nio/file/ClosedFileSystemException.java b/jdk/src/java.base/share/classes/java/nio/file/ClosedFileSystemException.java index 82cf096c848..60d4551419f 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/ClosedFileSystemException.java +++ b/jdk/src/java.base/share/classes/java/nio/file/ClosedFileSystemException.java @@ -28,6 +28,8 @@ package java.nio.file; /** * Unchecked exception thrown when an attempt is made to invoke an operation on * a file and the file system is closed. + * + * @since 1.7 */ public class ClosedFileSystemException diff --git a/jdk/src/java.base/share/classes/java/nio/file/ClosedWatchServiceException.java b/jdk/src/java.base/share/classes/java/nio/file/ClosedWatchServiceException.java index 3995b6def60..4990a7aca3f 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/ClosedWatchServiceException.java +++ b/jdk/src/java.base/share/classes/java/nio/file/ClosedWatchServiceException.java @@ -28,6 +28,8 @@ package java.nio.file; /** * Unchecked exception thrown when an attempt is made to invoke an operation on * a watch service that is closed. + * + * @since 1.7 */ public class ClosedWatchServiceException diff --git a/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java b/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java index 1c60862c857..0fd5be4fcf0 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java +++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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 @@ -315,7 +315,9 @@ public abstract class FileSystem * that resembles regular expressions but with a simpler syntax. For example: * *
        - * + *
        + * + * * * * @@ -348,7 +350,7 @@ public abstract class FileSystem * platform (note that the backslash is escaped; as a string literal in the * Java Language the pattern would be "C:\\\\*") * - * + * *
        Pattern Language
        {@code *.java}Matches a path that represents a file name ending in {@code .java}
        *
        * diff --git a/jdk/src/java.base/share/classes/java/nio/file/FileSystemAlreadyExistsException.java b/jdk/src/java.base/share/classes/java/nio/file/FileSystemAlreadyExistsException.java index e305542508f..5877410473e 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/FileSystemAlreadyExistsException.java +++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystemAlreadyExistsException.java @@ -28,6 +28,8 @@ package java.nio.file; /** * Runtime exception thrown when an attempt is made to create a file system that * already exists. + * + * @since 1.7 */ public class FileSystemAlreadyExistsException diff --git a/jdk/src/java.base/share/classes/java/nio/file/FileSystemNotFoundException.java b/jdk/src/java.base/share/classes/java/nio/file/FileSystemNotFoundException.java index 1c0ee4cb731..e50eafb5d6d 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/FileSystemNotFoundException.java +++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystemNotFoundException.java @@ -27,6 +27,8 @@ package java.nio.file; /** * Runtime exception thrown when a file system cannot be found. + * + * @since 1.7 */ public class FileSystemNotFoundException diff --git a/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java b/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java index 08ff1f0d740..2754fa39c0a 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java +++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -36,6 +36,8 @@ import java.util.Map; import java.util.ServiceConfigurationError; import java.util.ServiceLoader; +import jdk.internal.misc.VM; + /** * Factory methods for file systems. This class defines the {@link #getDefault * getDefault} method to get the default file system and factory methods to @@ -120,8 +122,8 @@ public final class FileSystems { // if the property java.nio.file.spi.DefaultFileSystemProvider is // set then its value is the name of the default provider (or a list) - String propValue = System - .getProperty("java.nio.file.spi.DefaultFileSystemProvider"); + String prop = "java.nio.file.spi.DefaultFileSystemProvider"; + String propValue = System.getProperty(prop); if (propValue != null) { for (String cn: propValue.split(",")) { try { @@ -184,7 +186,7 @@ public final class FileSystems { * @return the default file system */ public static FileSystem getDefault() { - if (jdk.internal.misc.VM.isBooted()) { + if (VM.isModuleSystemInited()) { return DefaultFileSystemHolder.defaultFileSystem; } else { return BuiltinFileSystemHolder.builtinFileSystem; diff --git a/jdk/src/java.base/share/classes/java/nio/file/Files.java b/jdk/src/java.base/share/classes/java/nio/file/Files.java index 3a6491440a7..ac662e4e431 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/Files.java +++ b/jdk/src/java.base/share/classes/java/nio/file/Files.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -233,8 +233,12 @@ public final class Files { *

        In the addition to {@code READ} and {@code WRITE}, the following * options may be present: * - * + *
        + * + * * + * + * * * * * + * *
        Options
        Option Description
        {@link StandardOpenOption#APPEND APPEND} If this option is present then the file is opened for writing and @@ -294,6 +298,7 @@ public final class Files { * href="package-summary.html#integrity"> Synchronized I/O file * integrity).
        * *

        An implementation may also support additional implementation specific @@ -1188,8 +1193,12 @@ public final class Files { * *

        The {@code options} parameter may include any of the following: * - * + *
        + * + * * + * + * * * * * + * *
        Options
        Option Description
        {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} If the target file exists, then the target file is replaced if it @@ -1215,6 +1224,7 @@ public final class Files { * new link. In other words, the {@code COPY_ATTRIBUTES} option may be * ignored when copying a symbolic link.
        * *

        An implementation of this interface may support additional @@ -1306,8 +1316,12 @@ public final class Files { * *

        The {@code options} parameter may include any of the following: * - * + *
        + * + * * + * + * * * * + * *
        Options
        Option Description
        {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} If the target file exists, then the target file is replaced if it @@ -1326,6 +1340,7 @@ public final class Files { * example, when the target location is on a different {@code FileStore} * and would require that the file be copied, or target location is * associated with a different provider to this object.
        * *

        An implementation of this interface may support additional @@ -1909,7 +1924,9 @@ public final class Files { * attributes} parameter: * *

        - * + *
        + * + * * * * @@ -1927,6 +1944,7 @@ public final class Files { * * * + * *
        Possible values
        {@code "*"} Read all {@link BasicFileAttributes basic-file-attributes}. {@code "posix:permissions,owner,size"} Reads the POSIX file permissions, owner, and file size.
        *
        * diff --git a/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java b/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java index 0502d7ba809..2dc3597ded8 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java +++ b/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java @@ -29,6 +29,8 @@ package java.nio.file; * Unchecked exception thrown when path string cannot be converted into a * {@link Path} because the path string contains invalid characters, or * the path string is invalid for other file system specific reasons. + * + * @since 1.7 */ public class InvalidPathException diff --git a/jdk/src/java.base/share/classes/java/nio/file/LinkPermission.java b/jdk/src/java.base/share/classes/java/nio/file/LinkPermission.java index bf54e168774..8f82d9f2adb 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/LinkPermission.java +++ b/jdk/src/java.base/share/classes/java/nio/file/LinkPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2011, 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 @@ -33,13 +33,16 @@ import java.security.BasicPermission; *

        The following table provides a summary description of what the permission * allows, and discusses the risks of granting code the permission. * - * + *
        + * + * * * * * * + * + * * * * * + * *
        Table shows permission target name, what the permission allows, and associated risks
        Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
        hard Ability to add an existing file to a directory. This is sometimes @@ -55,6 +58,7 @@ import java.security.BasicPermission; * linking to any file or directory in the file system thus allowing the * attacker to access to all files.
        * * @since 1.7 diff --git a/jdk/src/java.base/share/classes/java/nio/file/Path.java b/jdk/src/java.base/share/classes/java/nio/file/Path.java index e7307e65640..76715a2225e 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/Path.java +++ b/jdk/src/java.base/share/classes/java/nio/file/Path.java @@ -76,7 +76,7 @@ import java.util.NoSuchElementException; * BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8); * * - *

        Interoperability

        + *

        Interoperability

        *

        Paths associated with the default {@link * java.nio.file.spi.FileSystemProvider provider} are generally interoperable * with the {@link java.io.File java.io.File} class. Paths created by other diff --git a/jdk/src/java.base/share/classes/java/nio/file/ProviderMismatchException.java b/jdk/src/java.base/share/classes/java/nio/file/ProviderMismatchException.java index 0220d6e173f..9e628cbdfc7 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/ProviderMismatchException.java +++ b/jdk/src/java.base/share/classes/java/nio/file/ProviderMismatchException.java @@ -29,6 +29,8 @@ package java.nio.file; * Unchecked exception thrown when an attempt is made to invoke a method on an * object created by one file system provider with a parameter created by a * different file system provider. + * + * @since 1.7 */ public class ProviderMismatchException extends java.lang.IllegalArgumentException diff --git a/jdk/src/java.base/share/classes/java/nio/file/ProviderNotFoundException.java b/jdk/src/java.base/share/classes/java/nio/file/ProviderNotFoundException.java index 8fa0cefaf3b..41f9819aacb 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/ProviderNotFoundException.java +++ b/jdk/src/java.base/share/classes/java/nio/file/ProviderNotFoundException.java @@ -27,6 +27,8 @@ package java.nio.file; /** * Runtime exception thrown when a provider of the required type cannot be found. + * + * @since 1.7 */ public class ProviderNotFoundException diff --git a/jdk/src/java.base/share/classes/java/nio/file/ReadOnlyFileSystemException.java b/jdk/src/java.base/share/classes/java/nio/file/ReadOnlyFileSystemException.java index 9b25e5f054b..0b9d42a2bbb 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/ReadOnlyFileSystemException.java +++ b/jdk/src/java.base/share/classes/java/nio/file/ReadOnlyFileSystemException.java @@ -28,6 +28,8 @@ package java.nio.file; /** * Unchecked exception thrown when an attempt is made to update an object * associated with a {@link FileSystem#isReadOnly() read-only} {@code FileSystem}. + * + * @since 1.7 */ public class ReadOnlyFileSystemException diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java index 429bfde8a1b..4ba76741dd0 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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 @@ -94,11 +94,15 @@ import java.io.IOException; *

        Where dynamic access to file attributes is required, the attributes * supported by this attribute view are as follows: *

        - * + *
        + * + * * * * * + * + * * * * @@ -107,6 +111,7 @@ import java.io.IOException; * * * + * *
        Supported attributes
        Name Type
        "acl" {@link List}<{@link AclEntry}> "owner" {@link UserPrincipal}
        *
        * diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java index bfa3fdc2676..465fb6bc3f3 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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,11 +41,15 @@ import java.io.IOException; *

        Where dynamic access to file attributes is required, the attributes * supported by this attribute view have the following names and types: *

        - * + *
        + * + * * * * * + * + * * * * @@ -82,6 +86,7 @@ import java.io.IOException; * * * + * *
        Supported attributes
        Name Type
        "lastModifiedTime" {@link FileTime} "fileKey" {@link Object}
        *
        * diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributeView.java index c12d8a0e5f0..be4f570b46b 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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,11 +41,15 @@ import java.io.IOException; * BasicFileAttributeView}, and in addition, the following attributes are * supported: *
        - * + *
        + * + * * * * * + * + * * * * @@ -62,6 +66,7 @@ import java.io.IOException; * * * + * *
        Supported attributes
        Name Type
        readonly {@link Boolean} archive {@link Boolean}
        *
        * diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java index f8c36523d66..9e171768603 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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 @@ -74,11 +74,15 @@ import java.io.IOException; * BasicFileAttributeView} and {@link FileOwnerAttributeView}, and in addition, * the following attributes are supported: *
        - * + *
        + * + * * * * * + * + * * * * @@ -87,6 +91,7 @@ import java.io.IOException; * * * + * *
        Supported attributes
        Name Type
        "permissions" {@link Set}<{@link PosixFilePermission}> "group" {@link GroupPrincipal}
        *
        * diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java index 1dd20f627c7..11f5d6e2720 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java @@ -26,25 +26,41 @@ /** * Interfaces and classes providing access to file and file system attributes. * - *
        - * - * + *
        Attribute viewsDescription
        {@link java.nio.file.attribute.AttributeView}
        + * + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * *
        Attribute views
        Attribute viewsDescription
        {@link java.nio.file.attribute.AttributeView}Can read or update non-opaque values associated with objects in a file system
          {@link java.nio.file.attribute.FileAttributeView}
        + *   {@link java.nio.file.attribute.FileAttributeView}Can read or update file attributes
            {@link java.nio.file.attribute.BasicFileAttributeView}  
        + *      + * {@link java.nio.file.attribute.BasicFileAttributeView}  Can read or update a basic set of file attributes
              {@link java.nio.file.attribute.PosixFileAttributeView}  
        + *        + * {@link java.nio.file.attribute.PosixFileAttributeView}  Can read or update POSIX defined file attributes
              {@link java.nio.file.attribute.DosFileAttributeView}  
        + *        + * {@link java.nio.file.attribute.DosFileAttributeView}  Can read or update FAT file attributes
            {@link java.nio.file.attribute.FileOwnerAttributeView}  
        + *      + * {@link java.nio.file.attribute.FileOwnerAttributeView}  Can read or update the owner of a file
             {@link java.nio.file.attribute.AclFileAttributeView}  
        + *       + * {@link java.nio.file.attribute.AclFileAttributeView}  Can read or update Access Control Lists
            {@link java.nio.file.attribute.UserDefinedFileAttributeView}  
        + *      + * {@link java.nio.file.attribute.UserDefinedFileAttributeView}  Can read or update user-defined file attributes
          {@link java.nio.file.attribute.FileStoreAttributeView}
        + *   {@link java.nio.file.attribute.FileStoreAttributeView}Can read or update file system attributes
        * diff --git a/jdk/src/java.base/share/classes/java/nio/file/package-info.java b/jdk/src/java.base/share/classes/java/nio/file/package-info.java index 556df2b8c6a..611138eef8e 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/package-info.java +++ b/jdk/src/java.base/share/classes/java/nio/file/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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 @@ -33,7 +33,7 @@ * package is used by service provider implementors wishing to extend the * platform default provider, or to construct other provider implementations.

        * - *

        Symbolic Links

        + *

        Symbolic Links

        *

        Many operating systems and file systems support for symbolic links. * A symbolic link is a special file that serves as a reference to another file. * For the most part, symbolic links are transparent to applications and @@ -45,7 +45,7 @@ * that are semantically close but support for these other types of links is * not included in this package.

        * - *

        Interoperability

        + *

        Interoperability

        *

        The {@link java.io.File} class defines the {@link java.io.File#toPath * toPath} method to construct a {@link java.nio.file.Path} by converting * the abstract path represented by the {@code java.io.File} object. The resulting @@ -65,7 +65,7 @@ * or on some other machine. The exact nature of any such inconsistencies are * system-dependent and are therefore unspecified.

        * - *

        Synchronized I/O File Integrity

        + *

        Synchronized I/O File Integrity

        *

        The {@link java.nio.file.StandardOpenOption#SYNC SYNC} and {@link * java.nio.file.StandardOpenOption#DSYNC DSYNC} options are used when opening a file * to require that updates to the file are written synchronously to the underlying diff --git a/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java b/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java index b92cf525eef..26dc40606de 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java +++ b/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, 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 @@ -919,8 +919,12 @@ public abstract class FileSystemProvider { * according to all of access modes specified in the {@code modes} parameter * as follows: * - * + *
        + * + * * + * + * * * * * + * *
        Access Modes
        Value Description
        {@link AccessMode#READ READ} Checks that the file exists and that the Java virtual machine has @@ -940,6 +944,7 @@ public abstract class FileSystemProvider { * virtual machine has permission to search the directory in order to * access file or subdirectories.
        * *

        If the {@code modes} parameter is of length zero, then the existence diff --git a/jdk/src/java.base/share/classes/java/nio/package-info.java b/jdk/src/java.base/share/classes/java/nio/package-info.java index b36faeac3c6..9fa17c945e0 100644 --- a/jdk/src/java.base/share/classes/java/nio/package-info.java +++ b/jdk/src/java.base/share/classes/java/nio/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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,30 +60,33 @@ * the contents of which can be used to extend the platform's default * implementations or to construct alternative implementations. * - * + * * - *

        - * - * + *
        BuffersDescription
        {@link java.nio.Buffer}
        + * + * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * *
        Description of the various buffers
        BuffersDescription
        {@link java.nio.Buffer}Position, limit, and capacity; *
        clear, flip, rewind, and mark/reset
          {@link java.nio.ByteBuffer}
          {@link java.nio.ByteBuffer}Get/put, compact, views; allocate, wrap
            {@link java.nio.MappedByteBuffer}  
        + *     {@link java.nio.MappedByteBuffer}  A byte buffer mapped to a file
          {@link java.nio.CharBuffer}
          {@link java.nio.CharBuffer}Get/put, compact; allocate, wrap
          {@link java.nio.DoubleBuffer}
          {@link java.nio.DoubleBuffer}    ' '
          {@link java.nio.FloatBuffer}
          {@link java.nio.FloatBuffer}    ' '
          {@link java.nio.IntBuffer}
          {@link java.nio.IntBuffer}    ' '
          {@link java.nio.LongBuffer}
          {@link java.nio.LongBuffer}    ' '
          {@link java.nio.ShortBuffer}
          {@link java.nio.ShortBuffer}    ' '
        {@link java.nio.ByteOrder}
        {@link java.nio.ByteOrder}Typesafe enumeration for byte orders
        * diff --git a/jdk/src/java.base/share/classes/java/security/AccessControlContext.java b/jdk/src/java.base/share/classes/java/security/AccessControlContext.java index e15b3906dab..eb60950cc1e 100644 --- a/jdk/src/java.base/share/classes/java/security/AccessControlContext.java +++ b/jdk/src/java.base/share/classes/java/security/AccessControlContext.java @@ -74,6 +74,7 @@ import sun.security.util.SecurityConstants; * @see AccessController * * @author Roland Schemers + * @since 1.2 */ public final class AccessControlContext { diff --git a/jdk/src/java.base/share/classes/java/security/AccessControlException.java b/jdk/src/java.base/share/classes/java/security/AccessControlException.java index a4f2a7803ad..3d654eebea4 100644 --- a/jdk/src/java.base/share/classes/java/security/AccessControlException.java +++ b/jdk/src/java.base/share/classes/java/security/AccessControlException.java @@ -38,6 +38,7 @@ package java.security; * * @author Li Gong * @author Roland Schemers + * @since 1.2 */ public class AccessControlException extends SecurityException { diff --git a/jdk/src/java.base/share/classes/java/security/AccessController.java b/jdk/src/java.base/share/classes/java/security/AccessController.java index b37b476efdd..e41f40b46f1 100644 --- a/jdk/src/java.base/share/classes/java/security/AccessController.java +++ b/jdk/src/java.base/share/classes/java/security/AccessController.java @@ -259,6 +259,7 @@ import jdk.internal.reflect.Reflection; * * @author Li Gong * @author Roland Schemers + * @since 1.2 */ public final class AccessController { diff --git a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java index 7d1134493ce..cc9ad853bf9 100644 --- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java +++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java @@ -61,11 +61,16 @@ import java.util.Objects; * * *

        In case the client does not explicitly initialize the - * AlgorithmParameterGenerator - * (via a call to an {@code init} method), each provider must supply (and - * document) a default initialization. For example, the Sun provider uses a - * default modulus prime size of 1024 bits for the generation of DSA - * parameters. + * AlgorithmParameterGenerator (via a call to an {@code init} method), + * each provider must supply (and document) a default initialization. + * See the Keysize Restriction sections of the + * {@extLink security_guide_jdk_providers JDK Providers} + * document for information on the AlgorithmParameterGenerator defaults + * used by JDK providers. + * However, note that defaults may vary across different providers. + * Additionally, the default value for a provider may change in a future + * version. Therefore, it is recommended to explicitly initialize the + * AlgorithmParameterGenerator instead of relying on provider-specific defaults. * *

        Every implementation of the Java platform is required to support the * following standard {@code AlgorithmParameterGenerator} algorithms and @@ -75,9 +80,9 @@ import java.util.Objects; *

      5. {@code DSA} (1024, 2048)
      6. * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms"> * AlgorithmParameterGenerator section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -150,8 +155,8 @@ public class AlgorithmParameterGenerator { * @param algorithm the name of the algorithm this * parameter generator is associated with. * See the AlgorithmParameterGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code AlgorithmParameterGenerator} object @@ -195,8 +200,8 @@ public class AlgorithmParameterGenerator { * @param algorithm the name of the algorithm this * parameter generator is associated with. * See the AlgorithmParameterGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the string name of the Provider. @@ -245,8 +250,8 @@ public class AlgorithmParameterGenerator { * @param algorithm the string name of the algorithm this * parameter generator is associated with. * See the AlgorithmParameterGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the {@code Provider} object. diff --git a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java index 721fb52ac18..e4c0567f05f 100644 --- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java +++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -39,8 +39,14 @@ import java.security.spec.AlgorithmParameterSpec; *

        In case the client does not explicitly initialize the * AlgorithmParameterGenerator (via a call to an {@code engineInit} * method), each provider must supply (and document) a default initialization. - * For example, the Sun provider uses a default modulus prime size of 1024 - * bits for the generation of DSA parameters. + * See the Keysize Restriction sections of the + * {@extLink security_guide_jdk_providers JDK Providers} + * document for information on the AlgorithmParameterGenerator defaults + * used by JDK providers. + * However, note that defaults may vary across different providers. + * Additionally, the default value for a provider may change in a future + * version. Therefore, it is recommended to explicitly initialize the + * AlgorithmParameterGenerator instead of relying on provider-specific defaults. * * @author Jan Luehe * diff --git a/jdk/src/java.base/share/classes/java/security/AlgorithmParameters.java b/jdk/src/java.base/share/classes/java/security/AlgorithmParameters.java index e03361233a5..a5ed953e65b 100644 --- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameters.java +++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -57,9 +57,9 @@ import java.util.Objects; *

      7. {@code DSA}
      8. * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms"> * AlgorithmParameters section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -137,8 +137,8 @@ public class AlgorithmParameters { * * @param algorithm the name of the algorithm requested. * See the AlgorithmParameters section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new parameter object @@ -182,8 +182,8 @@ public class AlgorithmParameters { * * @param algorithm the name of the algorithm requested. * See the AlgorithmParameters section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -232,8 +232,8 @@ public class AlgorithmParameters { * * @param algorithm the name of the algorithm requested. * See the AlgorithmParameters section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. diff --git a/jdk/src/java.base/share/classes/java/security/AllPermission.java b/jdk/src/java.base/share/classes/java/security/AllPermission.java index fcda7ce0bc1..c6e4629167c 100644 --- a/jdk/src/java.base/share/classes/java/security/AllPermission.java +++ b/jdk/src/java.base/share/classes/java/security/AllPermission.java @@ -51,6 +51,7 @@ import sun.security.util.SecurityConstants; * * * @author Roland Schemers + * @since 1.2 * * @serial exclude */ diff --git a/jdk/src/java.base/share/classes/java/security/BasicPermission.java b/jdk/src/java.base/share/classes/java/security/BasicPermission.java index fb5f2a260a3..906d6b91349 100644 --- a/jdk/src/java.base/share/classes/java/security/BasicPermission.java +++ b/jdk/src/java.base/share/classes/java/security/BasicPermission.java @@ -62,6 +62,7 @@ import java.util.concurrent.ConcurrentHashMap; * * @author Marianne Mueller * @author Roland Schemers + * @since 1.2 */ public abstract class BasicPermission extends Permission diff --git a/jdk/src/java.base/share/classes/java/security/Certificate.java b/jdk/src/java.base/share/classes/java/security/Certificate.java index 2d3db8f0383..d56446925b1 100644 --- a/jdk/src/java.base/share/classes/java/security/Certificate.java +++ b/jdk/src/java.base/share/classes/java/security/Certificate.java @@ -56,6 +56,7 @@ import java.util.Date; * the certificate and satisfy itself of its validity. * * @author Benjamin Renaud + * @since 1.1 * @deprecated A new certificate handling package is created in the Java platform. * This Certificate interface is entirely deprecated and * is here to allow for a smooth transition to the new diff --git a/jdk/src/java.base/share/classes/java/security/CodeSource.java b/jdk/src/java.base/share/classes/java/security/CodeSource.java index f710fe31fc9..93d9983f12a 100644 --- a/jdk/src/java.base/share/classes/java/security/CodeSource.java +++ b/jdk/src/java.base/share/classes/java/security/CodeSource.java @@ -44,6 +44,7 @@ import sun.net.util.URLUtil; * * @author Li Gong * @author Roland Schemers + * @since 1.2 */ public class CodeSource implements java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/java/security/DigestException.java b/jdk/src/java.base/share/classes/java/security/DigestException.java index 2327c982845..f2755304afc 100644 --- a/jdk/src/java.base/share/classes/java/security/DigestException.java +++ b/jdk/src/java.base/share/classes/java/security/DigestException.java @@ -29,6 +29,7 @@ package java.security; * This is the generic Message Digest exception. * * @author Benjamin Renaud + * @since 1.1 */ public class DigestException extends GeneralSecurityException { diff --git a/jdk/src/java.base/share/classes/java/security/DigestInputStream.java b/jdk/src/java.base/share/classes/java/security/DigestInputStream.java index 747537df253..a76ebdacdfc 100644 --- a/jdk/src/java.base/share/classes/java/security/DigestInputStream.java +++ b/jdk/src/java.base/share/classes/java/security/DigestInputStream.java @@ -59,6 +59,7 @@ import java.io.ByteArrayInputStream; * @see DigestOutputStream * * @author Benjamin Renaud + * @since 1.2 */ public class DigestInputStream extends FilterInputStream { diff --git a/jdk/src/java.base/share/classes/java/security/DigestOutputStream.java b/jdk/src/java.base/share/classes/java/security/DigestOutputStream.java index 51db133a5f6..a0a44e26f10 100644 --- a/jdk/src/java.base/share/classes/java/security/DigestOutputStream.java +++ b/jdk/src/java.base/share/classes/java/security/DigestOutputStream.java @@ -51,6 +51,7 @@ import java.io.ByteArrayOutputStream; * @see DigestInputStream * * @author Benjamin Renaud + * @since 1.2 */ public class DigestOutputStream extends FilterOutputStream { diff --git a/jdk/src/java.base/share/classes/java/security/DrbgParameters.java b/jdk/src/java.base/share/classes/java/security/DrbgParameters.java index c71e1cffa28..05723baa916 100644 --- a/jdk/src/java.base/share/classes/java/security/DrbgParameters.java +++ b/jdk/src/java.base/share/classes/java/security/DrbgParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -53,8 +53,8 @@ import java.util.Objects; * for CTR_DRBG. Please note that it is not the algorithm used in * {@link SecureRandom#getInstance}, which we will call a * SecureRandom algorithm below), - *
      9. optionally features, including prediction resistance - * and reseeding supports. + *
      10. optional features, including prediction resistance + * and reseeding supports, *
      11. highest security strength. * *

        @@ -188,7 +188,7 @@ import java.util.Objects; * @implSpec * By convention, a provider should name its primary DRBG implementation * with the + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> * standard {@code SecureRandom} algorithm name "DRBG". * * @implNote @@ -263,14 +263,19 @@ public class DrbgParameters { * Capability effective = ((DrbgParametes.Initiate) s.getParameters()) * .getCapability(); * - * + *
        + * + * * * * * + * + * * * * + * *
        requested and effective capabilities
        Requested ValuePossible Effective Values
        NONENONE, RESEED_ONLY, PR_AND_RESEED
        RESEED_ONLYRESEED_ONLY, PR_AND_RESEED
        PR_AND_RESEEDPR_AND_RESEED
        *

        * A DRBG implementation supporting prediction resistance must also diff --git a/jdk/src/java.base/share/classes/java/security/GeneralSecurityException.java b/jdk/src/java.base/share/classes/java/security/GeneralSecurityException.java index dc9ea06ecce..69ee8ead305 100644 --- a/jdk/src/java.base/share/classes/java/security/GeneralSecurityException.java +++ b/jdk/src/java.base/share/classes/java/security/GeneralSecurityException.java @@ -31,6 +31,7 @@ package java.security; * security-related exception classes that extend from it. * * @author Jan Luehe + * @since 1.2 */ public class GeneralSecurityException extends Exception { diff --git a/jdk/src/java.base/share/classes/java/security/Guard.java b/jdk/src/java.base/share/classes/java/security/Guard.java index abafb588659..f64a0d9f275 100644 --- a/jdk/src/java.base/share/classes/java/security/Guard.java +++ b/jdk/src/java.base/share/classes/java/security/Guard.java @@ -38,6 +38,7 @@ package java.security; * * @author Roland Schemers * @author Li Gong + * @since 1.2 */ public interface Guard { diff --git a/jdk/src/java.base/share/classes/java/security/GuardedObject.java b/jdk/src/java.base/share/classes/java/security/GuardedObject.java index a275ddf043e..a2bf3f758e7 100644 --- a/jdk/src/java.base/share/classes/java/security/GuardedObject.java +++ b/jdk/src/java.base/share/classes/java/security/GuardedObject.java @@ -44,6 +44,7 @@ package java.security; * * @author Roland Schemers * @author Li Gong + * @since 1.2 */ public class GuardedObject implements java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/java/security/Identity.java b/jdk/src/java.base/share/classes/java/security/Identity.java index d091b942e26..4d79e2d751a 100644 --- a/jdk/src/java.base/share/classes/java/security/Identity.java +++ b/jdk/src/java.base/share/classes/java/security/Identity.java @@ -51,6 +51,7 @@ import java.util.*; * @see Principal * * @author Benjamin Renaud + * @since 1.1 * @deprecated This class is no longer used. Its functionality has been * replaced by {@code java.security.KeyStore}, the * {@code java.security.cert} package, and diff --git a/jdk/src/java.base/share/classes/java/security/IdentityScope.java b/jdk/src/java.base/share/classes/java/security/IdentityScope.java index 107fe0861ad..5b6ec8212f7 100644 --- a/jdk/src/java.base/share/classes/java/security/IdentityScope.java +++ b/jdk/src/java.base/share/classes/java/security/IdentityScope.java @@ -55,6 +55,7 @@ import java.util.Properties; * @see Key * * @author Benjamin Renaud + * @since 1.1 * * @deprecated This class is no longer used. Its functionality has been * replaced by {@code java.security.KeyStore}, the diff --git a/jdk/src/java.base/share/classes/java/security/InvalidKeyException.java b/jdk/src/java.base/share/classes/java/security/InvalidKeyException.java index 2f7568713c7..5349796b150 100644 --- a/jdk/src/java.base/share/classes/java/security/InvalidKeyException.java +++ b/jdk/src/java.base/share/classes/java/security/InvalidKeyException.java @@ -31,6 +31,7 @@ package java.security; * length, uninitialized, etc). * * @author Benjamin Renaud + * @since 1.1 */ public class InvalidKeyException extends KeyException { diff --git a/jdk/src/java.base/share/classes/java/security/InvalidParameterException.java b/jdk/src/java.base/share/classes/java/security/InvalidParameterException.java index a095f90de36..18d413eba39 100644 --- a/jdk/src/java.base/share/classes/java/security/InvalidParameterException.java +++ b/jdk/src/java.base/share/classes/java/security/InvalidParameterException.java @@ -31,6 +31,7 @@ package java.security; * to a method. * * @author Benjamin Renaud + * @since 1.1 */ public class InvalidParameterException extends IllegalArgumentException { diff --git a/jdk/src/java.base/share/classes/java/security/Key.java b/jdk/src/java.base/share/classes/java/security/Key.java index 09542e394a2..ff5611e91e5 100644 --- a/jdk/src/java.base/share/classes/java/security/Key.java +++ b/jdk/src/java.base/share/classes/java/security/Key.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -82,7 +82,7 @@ package java.security; *

        A Key should use KeyRep as its serialized representation. * Note that a serialized Key may contain sensitive information * which should not be exposed in untrusted environments. See the - * + * * Security Appendix * of the Serialization Specification for more information. * @@ -97,6 +97,7 @@ package java.security; * @see Signer * * @author Benjamin Renaud + * @since 1.1 */ public interface Key extends java.io.Serializable { @@ -113,10 +114,10 @@ public interface Key extends java.io.Serializable { /** * Returns the standard algorithm name for this key. For * example, "DSA" would indicate that this key is a DSA key. - * See Appendix A in the - * Java Cryptography Architecture API Specification & Reference - * for information about standard algorithm names. + * See the + * Java Security Standard Algorithm Names document + * for more information. * * @return the name of the algorithm associated with this key. */ diff --git a/jdk/src/java.base/share/classes/java/security/KeyException.java b/jdk/src/java.base/share/classes/java/security/KeyException.java index 59cdd6f3ab5..b8b87d9516e 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyException.java +++ b/jdk/src/java.base/share/classes/java/security/KeyException.java @@ -33,6 +33,7 @@ package java.security; * @see KeyManagementException * * @author Benjamin Renaud + * @since 1.1 */ public class KeyException extends GeneralSecurityException { diff --git a/jdk/src/java.base/share/classes/java/security/KeyFactory.java b/jdk/src/java.base/share/classes/java/security/KeyFactory.java index 4d297157ebc..8171cb1b568 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyFactory.java +++ b/jdk/src/java.base/share/classes/java/security/KeyFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -75,9 +75,9 @@ import sun.security.jca.GetInstance.Instance; *

      12. {@code RSA}
      13. * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> * KeyFactory section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -163,8 +163,8 @@ public class KeyFactory { * * @param algorithm the name of the requested key algorithm. * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code KeyFactory} object @@ -197,8 +197,8 @@ public class KeyFactory { * * @param algorithm the name of the requested key algorithm. * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -239,8 +239,8 @@ public class KeyFactory { * * @param algorithm the name of the requested key algorithm. * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/KeyManagementException.java b/jdk/src/java.base/share/classes/java/security/KeyManagementException.java index be212b9fdc1..fe1ab3eda94 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyManagementException.java +++ b/jdk/src/java.base/share/classes/java/security/KeyManagementException.java @@ -38,6 +38,7 @@ package java.security; * * * @author Benjamin Renaud + * @since 1.1 * * @see Key * @see KeyException diff --git a/jdk/src/java.base/share/classes/java/security/KeyPair.java b/jdk/src/java.base/share/classes/java/security/KeyPair.java index 6147a16aa59..1d9e1640553 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyPair.java +++ b/jdk/src/java.base/share/classes/java/security/KeyPair.java @@ -36,6 +36,7 @@ import java.util.*; * @see PrivateKey * * @author Benjamin Renaud + * @since 1.1 */ public final class KeyPair implements java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java b/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java index 10d2f067f83..cd9a0a51263 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java +++ b/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,8 +95,14 @@ import sun.security.util.Debug; *

        In case the client does not explicitly initialize the KeyPairGenerator * (via a call to an {@code initialize} method), each provider must * supply (and document) a default initialization. - * For example, the Sun provider uses a default modulus size (keysize) - * of 1024 bits for DSA key pairs. + * See the Keysize Restriction sections of the + * {@extLink security_guide_jdk_providers JDK Providers} + * document for information on the KeyPairGenerator defaults used by + * JDK providers. + * However, note that defaults may vary across different providers. + * Additionally, the default value for a provider may change in a future + * version. Therefore, it is recommended to explicitly initialize the + * KeyPairGenerator instead of relying on provider-specific defaults. * *

        Note that this class is abstract and extends from * {@code KeyPairGeneratorSpi} for historical reasons. @@ -114,13 +120,14 @@ import sun.security.util.Debug; *

      14. {@code RSA} (1024, 2048, 4096)
      15. * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> * KeyPairGenerator section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * * @author Benjamin Renaud + * @since 1.1 * * @see java.security.spec.AlgorithmParameterSpec */ @@ -142,8 +149,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { * * @param algorithm the standard string name of the algorithm. * See the KeyPairGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. */ protected KeyPairGenerator(String algorithm) { @@ -153,8 +160,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { /** * Returns the standard name of the algorithm for this key pair generator. * See the KeyPairGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the standard string name of the algorithm. @@ -205,8 +212,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { * * @param algorithm the standard string name of the algorithm. * See the KeyPairGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code KeyPairGenerator} object @@ -264,8 +271,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { * * @param algorithm the standard string name of the algorithm. * See the KeyPairGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the string name of the provider. @@ -306,8 +313,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { * * @param algorithm the standard string name of the algorithm. * See the KeyPairGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java b/jdk/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java index dfe8c04218d..bbd7b271ad4 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java +++ b/jdk/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -39,10 +39,17 @@ import java.security.spec.AlgorithmParameterSpec; *

        In case the client does not explicitly initialize the KeyPairGenerator * (via a call to an {@code initialize} method), each provider must * supply (and document) a default initialization. - * For example, the Sun provider uses a default modulus size (keysize) - * of 1024 bits. + * See the Keysize Restriction sections of the + * {@extLink security_guide_jdk_providers JDK Providers} + * document for information on the KeyPairGenerator defaults used by + * JDK providers. + * However, note that defaults may vary across different providers. + * Additionally, the default value for a provider may change in a future + * version. Therefore, it is recommended to explicitly initialize the + * KeyPairGenerator instead of relying on provider-specific defaults. * * @author Benjamin Renaud + * @since 1.2 * * * @see KeyPairGenerator diff --git a/jdk/src/java.base/share/classes/java/security/KeyRep.java b/jdk/src/java.base/share/classes/java/security/KeyRep.java index f97208f1083..9d53635f7ce 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyRep.java +++ b/jdk/src/java.base/share/classes/java/security/KeyRep.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -42,7 +42,7 @@ import javax.crypto.spec.SecretKeySpec; * * Note that a serialized Key may contain sensitive information * which should not be exposed in untrusted environments. See the - * + * * Security Appendix * of the Serialization Specification for more information. * diff --git a/jdk/src/java.base/share/classes/java/security/KeyStore.java b/jdk/src/java.base/share/classes/java/security/KeyStore.java index f963cae1390..fec312740f4 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyStore.java +++ b/jdk/src/java.base/share/classes/java/security/KeyStore.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -176,9 +176,9 @@ import sun.security.util.Debug; *

      16. {@code PKCS12}
      17. * * This type is described in the + * "{@docRoot}/../specs/security/standard-names.html#keystore-types"> * KeyStore section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other types are supported. * @@ -291,9 +291,8 @@ public class KeyStore { * @param protectionAlgorithm the encryption algorithm name, for * example, {@code PBEWithHmacSHA256AndAES_256}. * See the Cipher section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation + * "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names"> + * Java Security Standard Algorithm Names Specification * for information about standard encryption algorithm names. * @param protectionParameters the encryption algorithm parameter * specification, which may be {@code null} @@ -854,8 +853,8 @@ public class KeyStore { * * @param type the type of keystore. * See the KeyStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keystore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard keystore types. * * @return a keystore object of the specified type @@ -895,8 +894,8 @@ public class KeyStore { * * @param type the type of keystore. * See the KeyStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keystore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard keystore types. * * @param provider the name of the provider. @@ -941,8 +940,8 @@ public class KeyStore { * * @param type the type of keystore. * See the KeyStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keystore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard keystore types. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/MessageDigest.java b/jdk/src/java.base/share/classes/java/security/MessageDigest.java index 692dce5a10f..be163c179f9 100644 --- a/jdk/src/java.base/share/classes/java/security/MessageDigest.java +++ b/jdk/src/java.base/share/classes/java/security/MessageDigest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -89,13 +89,14 @@ import javax.crypto.SecretKey; *
      18. {@code SHA-256}
      19. * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> * MessageDigest section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * * @author Benjamin Renaud + * @since 1.1 * * @see DigestInputStream * @see DigestOutputStream @@ -123,8 +124,8 @@ public abstract class MessageDigest extends MessageDigestSpi { * * @param algorithm the standard name of the digest algorithm. * See the MessageDigest section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. */ protected MessageDigest(String algorithm) { @@ -154,8 +155,8 @@ public abstract class MessageDigest extends MessageDigestSpi { * * @param algorithm the name of the algorithm requested. * See the MessageDigest section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return a {@code MessageDigest} object that implements the @@ -209,8 +210,8 @@ public abstract class MessageDigest extends MessageDigestSpi { * * @param algorithm the name of the algorithm requested. * See the MessageDigest section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -262,8 +263,8 @@ public abstract class MessageDigest extends MessageDigestSpi { * * @param algorithm the name of the algorithm requested. * See the MessageDigest section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. @@ -497,8 +498,8 @@ public abstract class MessageDigest extends MessageDigestSpi { * implementation details. The name should be a standard * Java Security name (such as "SHA", "MD5", and so on). * See the MessageDigest section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the name of the algorithm diff --git a/jdk/src/java.base/share/classes/java/security/MessageDigestSpi.java b/jdk/src/java.base/share/classes/java/security/MessageDigestSpi.java index 0d5ace1f7bf..699e8c25e72 100644 --- a/jdk/src/java.base/share/classes/java/security/MessageDigestSpi.java +++ b/jdk/src/java.base/share/classes/java/security/MessageDigestSpi.java @@ -43,6 +43,7 @@ import sun.security.jca.JCAUtil; *

        Implementations are free to implement the Cloneable interface. * * @author Benjamin Renaud + * @since 1.2 * * * @see MessageDigest diff --git a/jdk/src/java.base/share/classes/java/security/NoSuchAlgorithmException.java b/jdk/src/java.base/share/classes/java/security/NoSuchAlgorithmException.java index 951e44e41dc..24455d31064 100644 --- a/jdk/src/java.base/share/classes/java/security/NoSuchAlgorithmException.java +++ b/jdk/src/java.base/share/classes/java/security/NoSuchAlgorithmException.java @@ -30,6 +30,7 @@ package java.security; * requested but is not available in the environment. * * @author Benjamin Renaud + * @since 1.1 */ public class NoSuchAlgorithmException extends GeneralSecurityException { diff --git a/jdk/src/java.base/share/classes/java/security/NoSuchProviderException.java b/jdk/src/java.base/share/classes/java/security/NoSuchProviderException.java index 9874adb145e..e2f9265be2a 100644 --- a/jdk/src/java.base/share/classes/java/security/NoSuchProviderException.java +++ b/jdk/src/java.base/share/classes/java/security/NoSuchProviderException.java @@ -30,6 +30,7 @@ package java.security; * requested but is not available in the environment. * * @author Benjamin Renaud + * @since 1.1 */ public class NoSuchProviderException extends GeneralSecurityException { diff --git a/jdk/src/java.base/share/classes/java/security/Permission.java b/jdk/src/java.base/share/classes/java/security/Permission.java index 088f97c35a6..0eb0496ce3b 100644 --- a/jdk/src/java.base/share/classes/java/security/Permission.java +++ b/jdk/src/java.base/share/classes/java/security/Permission.java @@ -60,6 +60,7 @@ package java.security; * * @author Marianne Mueller * @author Roland Schemers + * @since 1.2 */ public abstract class Permission implements Guard, java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/java/security/PermissionCollection.java b/jdk/src/java.base/share/classes/java/security/PermissionCollection.java index 1aa41cab022..ca15210b177 100644 --- a/jdk/src/java.base/share/classes/java/security/PermissionCollection.java +++ b/jdk/src/java.base/share/classes/java/security/PermissionCollection.java @@ -91,6 +91,7 @@ import java.util.stream.StreamSupport; * * * @author Roland Schemers + * @since 1.2 */ public abstract class PermissionCollection implements java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/java/security/Permissions.java b/jdk/src/java.base/share/classes/java/security/Permissions.java index 6bb5fa1a445..fa37fcb4698 100644 --- a/jdk/src/java.base/share/classes/java/security/Permissions.java +++ b/jdk/src/java.base/share/classes/java/security/Permissions.java @@ -75,6 +75,7 @@ import java.io.IOException; * * @author Marianne Mueller * @author Roland Schemers + * @since 1.2 * * @serial exclude */ diff --git a/jdk/src/java.base/share/classes/java/security/Policy.java b/jdk/src/java.base/share/classes/java/security/Policy.java index 73737ddb525..54663a5a0f8 100644 --- a/jdk/src/java.base/share/classes/java/security/Policy.java +++ b/jdk/src/java.base/share/classes/java/security/Policy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -78,6 +78,7 @@ import sun.security.util.SecurityConstants; * * @author Roland Schemers * @author Gary Ellison + * @since 1.2 * @see java.security.Provider * @see java.security.ProtectionDomain * @see java.security.Permission @@ -365,8 +366,8 @@ public abstract class Policy { * * @param type the specified Policy type. See the Policy section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#policy-types"> + * Java Security Standard Algorithm Names Specification * for a list of standard Policy types. * * @param params parameters for the Policy, which may be null. @@ -419,8 +420,8 @@ public abstract class Policy { * * @param type the specified Policy type. See the Policy section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#policy-types"> + * Java Security Standard Algorithm Names Specification * for a list of standard Policy types. * * @param params parameters for the Policy, which may be null. @@ -485,8 +486,8 @@ public abstract class Policy { * * @param type the specified Policy type. See the Policy section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#policy-types"> + * Java Security Standard Algorithm Names Specification * for a list of standard Policy types. * * @param params parameters for the Policy, which may be null. diff --git a/jdk/src/java.base/share/classes/java/security/Principal.java b/jdk/src/java.base/share/classes/java/security/Principal.java index db1e7d5fd02..40ee260bca9 100644 --- a/jdk/src/java.base/share/classes/java/security/Principal.java +++ b/jdk/src/java.base/share/classes/java/security/Principal.java @@ -35,6 +35,7 @@ import javax.security.auth.Subject; * @see java.security.cert.X509Certificate * * @author Li Gong + * @since 1.1 */ public interface Principal { diff --git a/jdk/src/java.base/share/classes/java/security/PrivateKey.java b/jdk/src/java.base/share/classes/java/security/PrivateKey.java index 7d8a7ea7041..0bc933bd901 100644 --- a/jdk/src/java.base/share/classes/java/security/PrivateKey.java +++ b/jdk/src/java.base/share/classes/java/security/PrivateKey.java @@ -54,6 +54,7 @@ package java.security; * * @author Benjamin Renaud * @author Josh Bloch + * @since 1.1 */ public interface PrivateKey extends Key, javax.security.auth.Destroyable { diff --git a/jdk/src/java.base/share/classes/java/security/PrivilegedAction.java b/jdk/src/java.base/share/classes/java/security/PrivilegedAction.java index b993cea4d2f..fec7a37d9ba 100644 --- a/jdk/src/java.base/share/classes/java/security/PrivilegedAction.java +++ b/jdk/src/java.base/share/classes/java/security/PrivilegedAction.java @@ -34,6 +34,7 @@ package java.security; * throw checked exceptions must use {@code PrivilegedExceptionAction} * instead. * + * @since 1.2 * @see AccessController * @see AccessController#doPrivileged(PrivilegedAction) * @see PrivilegedExceptionAction diff --git a/jdk/src/java.base/share/classes/java/security/PrivilegedActionException.java b/jdk/src/java.base/share/classes/java/security/PrivilegedActionException.java index 2de69698599..ebc12e74e0b 100644 --- a/jdk/src/java.base/share/classes/java/security/PrivilegedActionException.java +++ b/jdk/src/java.base/share/classes/java/security/PrivilegedActionException.java @@ -43,6 +43,7 @@ package java.security; * cause, and may be accessed via the {@link Throwable#getCause()} * method, as well as the aforementioned "legacy method." * + * @since 1.2 * @see PrivilegedExceptionAction * @see AccessController#doPrivileged(PrivilegedExceptionAction) * @see AccessController#doPrivileged(PrivilegedExceptionAction,AccessControlContext) diff --git a/jdk/src/java.base/share/classes/java/security/PrivilegedExceptionAction.java b/jdk/src/java.base/share/classes/java/security/PrivilegedExceptionAction.java index 59a9ba7dc18..35b9abfe354 100644 --- a/jdk/src/java.base/share/classes/java/security/PrivilegedExceptionAction.java +++ b/jdk/src/java.base/share/classes/java/security/PrivilegedExceptionAction.java @@ -35,6 +35,7 @@ package java.security; * computations that do not throw * checked exceptions should use {@code PrivilegedAction} instead. * + * @since 1.2 * @see AccessController * @see AccessController#doPrivileged(PrivilegedExceptionAction) * @see AccessController#doPrivileged(PrivilegedExceptionAction, diff --git a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java index ecb12785591..365096f619a 100644 --- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java +++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -38,6 +38,7 @@ import jdk.internal.misc.JavaSecurityAccess; import jdk.internal.misc.JavaSecurityProtectionDomainAccess; import static jdk.internal.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache; import jdk.internal.misc.SharedSecrets; +import sun.security.action.GetPropertyAction; import sun.security.provider.PolicyFile; import sun.security.util.Debug; import sun.security.util.FilePermCompat; @@ -58,10 +59,19 @@ import sun.security.util.SecurityConstants; * @author Li Gong * @author Roland Schemers * @author Gary Ellison + * @since 1.2 */ public class ProtectionDomain { + /** + * If true, {@link #impliesWithAltFilePerm} will try to be compatible on + * FilePermission checking even if a 3rd-party Policy implementation is set. + */ + private static final boolean filePermCompatInPD = + "true".equals(GetPropertyAction.privilegedGetProperty( + "jdk.security.filePermCompat")); + private static class JavaSecurityAccessImpl implements JavaSecurityAccess { private JavaSecurityAccessImpl() { @@ -321,19 +331,27 @@ public class ProtectionDomain { } /** - * This method has the same logic flow as {@link #implies} except that - * when the {@link FilePermCompat#compat} flag is on it ensures - * FilePermission compatibility after JDK-8164705. {@code implies()} - * is called when compat flag is not on or user has extended - * {@code ProtectionDomain}. + * This method has almost the same logic flow as {@link #implies} but + * it ensures some level of FilePermission compatibility after JDK-8164705. * * This method is called by {@link AccessControlContext#checkPermission} * and not intended to be called by an application. */ boolean impliesWithAltFilePerm(Permission perm) { - // If this is a subclass of ProtectionDomain. Call the old method. - if (!FilePermCompat.compat || getClass() != ProtectionDomain.class) { + // If FilePermCompat.compat is set (default value), FilePermission + // checking compatibility should be considered. + + // If filePermCompatInPD is set, this method checks for alternative + // FilePermission to keep compatibility for any Policy implementation. + // When set to false (default value), implies() is called since + // the PolicyFile implementation already supports compatibility. + + // If this is a subclass of ProtectionDomain, call implies() + // because most likely user has overridden it. + + if (!filePermCompatInPD || !FilePermCompat.compat || + getClass() != ProtectionDomain.class) { return implies(perm); } diff --git a/jdk/src/java.base/share/classes/java/security/Provider.java b/jdk/src/java.base/share/classes/java/security/Provider.java index f53660346a5..cf20bfec3ac 100644 --- a/jdk/src/java.base/share/classes/java/security/Provider.java +++ b/jdk/src/java.base/share/classes/java/security/Provider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -61,17 +61,21 @@ import java.util.function.Function; * security framework. Services of this type cannot be added, removed, * or modified by applications. * The following attributes are automatically placed in each Provider object: - * + *
        * + * * + * + * * - * + * * * * - + * * * + * *
        Attributes Automatically Placed in a Provider Object
        NameValue
        {@code Provider.id name}{@code String.valueOf(provider.getName())}{@code String.valueOf(provider.getName())}
        {@code Provider.id version}{@code String.valueOf(provider.getVersionStr())}
        {@code Provider.id info}{@code String.valueOf(provider.getInfo())}{@code String.valueOf(provider.getInfo())}
        {@code Provider.id className}{@code provider.getClass().getName()}
        * *

        Each provider has a name and a version string. A provider normally @@ -90,14 +94,15 @@ import java.util.function.Function; * The JDK implementation supports static registration of the security * providers via the {@code conf/security/java.security} file in the Java * installation directory. These providers are automatically installed by - * the JDK runtime, see The Provider Class - * in the "Java Cryptography Architecture API Specification & Reference" + * the JDK runtime, see {@extLink security_guide_jca_provider + * The Provider Class} + * in the Java Cryptography Architecture (JCA) Reference Guide * for information about how a particular type of provider, the cryptographic * service provider, works and is installed. * * @author Benjamin Renaud * @author Andreas Sterbenz + * @since 1.1 */ public abstract class Provider extends Properties { @@ -1305,8 +1310,8 @@ public abstract class Provider extends Properties { * it is replaced by the new service. * This method also places information about this service * in the provider's Hashtable values in the format described in the - * - * Java Cryptography Architecture API Specification & Reference . + * {@extLink security_guide_jca + * Java Cryptography Architecture (JCA) Reference Guide}. * *

        Also, if there is a security manager, its * {@code checkSecurityAccess} method is called with the string @@ -1588,8 +1593,8 @@ public abstract class Provider extends Properties { * suitable services and instantiates them. The valid arguments to those * methods depend on the type of service. For the service types defined * within Java SE, see the - * - * Java Cryptography Architecture API Specification & Reference + * {@extLink security_guide_jca + * Java Cryptography Architecture (JCA) Reference Guide} * for the valid values. * Note that components outside of Java SE can define additional types of * services and their behavior. @@ -1764,9 +1769,8 @@ public abstract class Provider extends Properties { * instantiation in a different way. * For details and the values of constructorParameter that are * valid for the various types of services see the - * - * Java Cryptography Architecture API Specification & - * Reference. + * {@extLink security_guide_jca + * Java Cryptography Architecture (JCA) Reference Guide}. * * @param constructorParameter the value to pass to the constructor, * or null if this type of service does not use a constructorParameter. @@ -1873,9 +1877,8 @@ public abstract class Provider extends Properties { * *

        For details and the values of parameter that are valid for the * various types of services see the top of this class and the - * - * Java Cryptography Architecture API Specification & - * Reference. + * {@extLink security_guide_jca + * Java Cryptography Architecture (JCA) Reference Guide}. * Security providers can override it to implement their own test. * * @param parameter the parameter to test diff --git a/jdk/src/java.base/share/classes/java/security/ProviderException.java b/jdk/src/java.base/share/classes/java/security/ProviderException.java index b372ee75752..48c3638a524 100644 --- a/jdk/src/java.base/share/classes/java/security/ProviderException.java +++ b/jdk/src/java.base/share/classes/java/security/ProviderException.java @@ -32,6 +32,7 @@ package java.security; * throw specialized, provider-specific runtime errors. * * @author Benjamin Renaud + * @since 1.1 */ public class ProviderException extends RuntimeException { diff --git a/jdk/src/java.base/share/classes/java/security/PublicKey.java b/jdk/src/java.base/share/classes/java/security/PublicKey.java index df49807eea4..986f9d0c72f 100644 --- a/jdk/src/java.base/share/classes/java/security/PublicKey.java +++ b/jdk/src/java.base/share/classes/java/security/PublicKey.java @@ -34,6 +34,7 @@ package java.security; * See, for example, the DSAPublicKey interface in * {@code java.security.interfaces}. * + * @since 1.1 * @see Key * @see PrivateKey * @see Certificate diff --git a/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java b/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java index 8f84e10324e..a6b8b6cffe6 100644 --- a/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java +++ b/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java @@ -39,6 +39,7 @@ import sun.security.util.Debug; * * @author Li Gong * @author Roland Schemers + * @since 1.2 */ public class SecureClassLoader extends ClassLoader { /* @@ -125,6 +126,7 @@ public class SecureClassLoader extends ClassLoader { * doesn't allow creation of a class loader. * * @since 9 + * @spec JPMS */ protected SecureClassLoader(String name, ClassLoader parent) { super(name, parent); diff --git a/jdk/src/java.base/share/classes/java/security/SecureRandom.java b/jdk/src/java.base/share/classes/java/security/SecureRandom.java index ac4ee6e7c7a..254f378aac6 100644 --- a/jdk/src/java.base/share/classes/java/security/SecureRandom.java +++ b/jdk/src/java.base/share/classes/java/security/SecureRandom.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -40,7 +40,7 @@ import sun.security.util.Debug; * *

        A cryptographically strong random number minimally complies with the * statistical random number generator tests specified in - * + * * FIPS 140-2, Security Requirements for Cryptographic Modules, * section 4.9.1. * Additionally, {@code SecureRandom} must produce non-deterministic output. @@ -64,8 +64,8 @@ import sun.security.util.Debug; *

          * SecureRandom r1 = new SecureRandom();
          * SecureRandom r2 = SecureRandom.getInstance("NativePRNG");
        - * SecureRandom r3 = SecureRandom("DRBG",
        - *         DrbgParameters.Instantiation(128, RESEED_ONLY, null));
        + * SecureRandom r3 = SecureRandom.getInstance("DRBG", + * DrbgParameters.instantiation(128, RESEED_ONLY, null)); *
        * *

        The third statement above returns a {@code SecureRandom} object of the @@ -126,7 +126,7 @@ import sun.security.util.Debug; * @implSpec * A {@code SecureRandom} service provider can advertise that it is thread-safe * by setting the service + * "{@docRoot}/../specs/security/standard-names.html#service-attributes">service * provider attribute "ThreadSafe" to "true" when registering the provider. * Otherwise, this class will instead synchronize access to the following * methods of the {@code SecureRandomSpi} implementation: @@ -143,6 +143,7 @@ import sun.security.util.Debug; * * @author Benjamin Renaud * @author Josh Bloch + * @since 1.1 */ public class SecureRandom extends java.util.Random { @@ -203,8 +204,8 @@ public class SecureRandom extends java.util.Random { * the {@link Security#getProviders() Security.getProviders()} method. * *

        See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. */ public SecureRandom() { @@ -244,8 +245,8 @@ public class SecureRandom extends java.util.Random { * the {@link Security#getProviders() Security.getProviders()} method. * *

        See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param seed the seed. @@ -341,8 +342,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @return the new {@code SecureRandom} object @@ -380,8 +381,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param provider the name of the provider. @@ -424,8 +425,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param provider the provider. @@ -478,8 +479,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param params the {@code SecureRandomParameters} @@ -528,8 +529,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param params the {@code SecureRandomParameters} @@ -581,8 +582,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param params the {@code SecureRandomParameters} @@ -651,8 +652,6 @@ public class SecureRandom extends java.util.Random { * {@code SecureRandom}. * * @return the string representation - * - * @since 9 */ @Override public String toString() { diff --git a/jdk/src/java.base/share/classes/java/security/SecureRandomSpi.java b/jdk/src/java.base/share/classes/java/security/SecureRandomSpi.java index 65a0ce0164d..8443baf68ee 100644 --- a/jdk/src/java.base/share/classes/java/security/SecureRandomSpi.java +++ b/jdk/src/java.base/share/classes/java/security/SecureRandomSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,7 +65,7 @@ package java.security; * will synchronize access to each of the applicable engine methods * (see {@link SecureRandom} for the list of methods). However, if a * {@code SecureRandomSpi} implementation is thread-safe, the + * "{@docRoot}/../specs/security/standard-names.html#service-attributes"> * service provider attribute "ThreadSafe" should be set to "true" during * its registration, as follows: *

        @@ -211,8 +211,6 @@ public abstract class SecureRandomSpi implements java.io.Serializable {
              * {@code SecureRandom}.
              *
              * @return the string representation
        -     *
        -     * @since 9
              */
             @Override
             public String toString() {
        diff --git a/jdk/src/java.base/share/classes/java/security/Security.java b/jdk/src/java.base/share/classes/java/security/Security.java
        index 49b7e991b40..f68821aa53e 100644
        --- a/jdk/src/java.base/share/classes/java/security/Security.java
        +++ b/jdk/src/java.base/share/classes/java/security/Security.java
        @@ -1,5 +1,5 @@
         /*
        - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
        + * Copyright (c) 1996, 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
        @@ -25,11 +25,12 @@
         
         package java.security;
         
        -import java.lang.reflect.*;
         import java.util.*;
         import java.util.concurrent.ConcurrentHashMap;
         import java.io.*;
         import java.net.URL;
        +
        +import jdk.internal.misc.SharedSecrets;
         import sun.security.util.Debug;
         import sun.security.util.PropertyExpander;
         
        @@ -44,6 +45,7 @@ import sun.security.jca.*;
          * {@code conf/security/java.security} in the Java installation directory.
          *
          * @author Benjamin Renaud
        + * @since 1.1
          */
         
         public final class Security {
        @@ -280,8 +282,8 @@ public final class Security {
             /**
              * Gets a specified property for an algorithm. The algorithm name
              * should be a standard name. See the 
        -     * Java Cryptography Architecture Standard Algorithm Name Documentation
        +     * "{@docRoot}/../specs/security/standard-names.html">
        +     * Java Security Standard Algorithm Names Specification
              * for information about standard algorithm names.
              *
              * One possible use is by specialized algorithm parsers, which may map
        @@ -510,8 +512,8 @@ public final class Security {
              * 
              *
              * 

        See the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html"> + * Java Security Standard Algorithm Names Specification * for information about standard cryptographic service names, standard * algorithm names and standard attribute names. * @@ -581,8 +583,8 @@ public final class Security { * * *

        See the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html"> + * Java Security Standard Algorithm Names Specification * for information about standard cryptographic service names, standard * algorithm names and standard attribute names. * @@ -800,9 +802,6 @@ public final class Security { * "package.definition", we need to signal to the SecurityManager * class that the value has just changed, and that it should * invalidate it's local cache values. - * - * Rather than create a new API entry for this function, - * we use reflection to set a private variable. */ private static void invalidateSMCache(String key) { @@ -810,42 +809,8 @@ public final class Security { final boolean pd = key.equals("package.definition"); if (pa || pd) { - AccessController.doPrivileged(new PrivilegedAction<>() { - public Void run() { - try { - /* Get the class via the bootstrap class loader. */ - Class cl = Class.forName( - "java.lang.SecurityManager", false, null); - Field f = null; - boolean accessible = false; - - if (pa) { - f = cl.getDeclaredField("packageAccessValid"); - accessible = f.isAccessible(); - f.setAccessible(true); - } else { - f = cl.getDeclaredField("packageDefinitionValid"); - accessible = f.isAccessible(); - f.setAccessible(true); - } - f.setBoolean(f, false); - f.setAccessible(accessible); - } - catch (Exception e1) { - /* If we couldn't get the class, it hasn't - * been loaded yet. If there is no such - * field, we shouldn't try to set it. There - * shouldn't be a security execption, as we - * are loaded by boot class loader, and we - * are inside a doPrivileged() here. - * - * NOOP: don't do anything... - */ - } - return null; - } /* run */ - }); /* PrivilegedAction */ - } /* if */ + SharedSecrets.getJavaLangAccess().invalidatePackageAccessCache(); + } } private static void check(String directive) { @@ -1076,8 +1041,8 @@ public final class Security { * an empty Set if there is no provider that supports the * specified service or if serviceName is null. For a complete list * of Java cryptographic services, please see the - * Java - * Cryptography Architecture API Specification & Reference. + * {@extLink security_guide_jca + * Java Cryptography Architecture (JCA) Reference Guide}. * Note: the returned set is immutable. * * @param serviceName the name of the Java cryptographic diff --git a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java index 8234624d26e..5211c23735d 100644 --- a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java +++ b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -45,12 +45,16 @@ import java.util.StringTokenizer; * target names, and for each provides a description of what the permission * allows and a discussion of the risks of granting code the permission. * - * + *
        + * + * * * * * * + * + * * * * @@ -196,6 +200,7 @@ import java.util.StringTokenizer; * described under the "removeProvider.{provider name}" permission. * * + * *
        target name, what the permission allows, and associated risks
        Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
        authProvider.{provider name}
        * *

        @@ -204,13 +209,17 @@ import java.util.StringTokenizer; * {@link IdentityScope}, {@link Signer}. Use of them is discouraged. See the * applicable classes for more information. * - * + *
        + * + * * * * * * + * * + * * * * @@ -308,6 +317,7 @@ import java.util.StringTokenizer; * data encrypted under that session key. * * + * *
        target name, what the permission allows, and associated risks
        Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
        insertProvider.{provider name}Addition of a new provider, with the specified name
        * * @implNote @@ -323,6 +333,7 @@ import java.util.StringTokenizer; * * @author Marianne Mueller * @author Roland Schemers + * @since 1.2 */ public final class SecurityPermission extends BasicPermission { diff --git a/jdk/src/java.base/share/classes/java/security/Signature.java b/jdk/src/java.base/share/classes/java/security/Signature.java index df5350e99f1..c7c25831a35 100644 --- a/jdk/src/java.base/share/classes/java/security/Signature.java +++ b/jdk/src/java.base/share/classes/java/security/Signature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -106,13 +106,14 @@ import sun.security.jca.GetInstance.Instance; *

      20. {@code SHA256withRSA}
      21. * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> * Signature section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * * @author Benjamin Renaud + * @since 1.1 * */ @@ -164,8 +165,8 @@ public abstract class Signature extends SignatureSpi { * * @param algorithm the standard string name of the algorithm. * See the Signature section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. */ protected Signature(String algorithm) { @@ -209,8 +210,8 @@ public abstract class Signature extends SignatureSpi { * * @param algorithm the standard name of the algorithm requested. * See the Signature section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code Signature} object @@ -332,8 +333,8 @@ public abstract class Signature extends SignatureSpi { * * @param algorithm the name of the algorithm requested. * See the Signature section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -385,8 +386,8 @@ public abstract class Signature extends SignatureSpi { * * @param algorithm the name of the algorithm requested. * See the Signature section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/SignatureException.java b/jdk/src/java.base/share/classes/java/security/SignatureException.java index 2e1fa592f60..7788e12301b 100644 --- a/jdk/src/java.base/share/classes/java/security/SignatureException.java +++ b/jdk/src/java.base/share/classes/java/security/SignatureException.java @@ -29,6 +29,7 @@ package java.security; * This is the generic Signature exception. * * @author Benjamin Renaud + * @since 1.1 */ public class SignatureException extends GeneralSecurityException { diff --git a/jdk/src/java.base/share/classes/java/security/SignatureSpi.java b/jdk/src/java.base/share/classes/java/security/SignatureSpi.java index 9be7701a2fa..99926824bd8 100644 --- a/jdk/src/java.base/share/classes/java/security/SignatureSpi.java +++ b/jdk/src/java.base/share/classes/java/security/SignatureSpi.java @@ -44,6 +44,7 @@ import sun.security.jca.JCAUtil; * of a particular signature algorithm. * * @author Benjamin Renaud + * @since 1.2 * * * @see Signature diff --git a/jdk/src/java.base/share/classes/java/security/SignedObject.java b/jdk/src/java.base/share/classes/java/security/SignedObject.java index 94d4d0ae8a0..810c5706579 100644 --- a/jdk/src/java.base/share/classes/java/security/SignedObject.java +++ b/jdk/src/java.base/share/classes/java/security/SignedObject.java @@ -114,6 +114,7 @@ import java.io.*; * @see Signature * * @author Li Gong + * @since 1.2 */ public final class SignedObject implements Serializable { diff --git a/jdk/src/java.base/share/classes/java/security/Signer.java b/jdk/src/java.base/share/classes/java/security/Signer.java index 3c53f6c055f..88852b2e4be 100644 --- a/jdk/src/java.base/share/classes/java/security/Signer.java +++ b/jdk/src/java.base/share/classes/java/security/Signer.java @@ -38,6 +38,7 @@ import java.io.*; * @see Identity * * @author Benjamin Renaud + * @since 1.1 * * @deprecated This class is no longer used. Its functionality has been * replaced by {@code java.security.KeyStore}, the diff --git a/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java b/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java index 9827788806a..b5dc02dcb38 100644 --- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java +++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java @@ -96,6 +96,7 @@ import java.security.cert.*; * * * @author Roland Schemers + * @since 1.2 */ public final class UnresolvedPermission extends Permission diff --git a/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java b/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java index 5fdc3cbc8e0..bd4fb7562e1 100644 --- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java +++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java @@ -43,6 +43,7 @@ import java.util.concurrent.CopyOnWriteArrayList; * * * @author Roland Schemers + * @since 1.2 * * @serial include */ diff --git a/jdk/src/java.base/share/classes/java/security/acl/Acl.java b/jdk/src/java.base/share/classes/java/security/acl/Acl.java index 0b2f374a2c9..423afdd695e 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/Acl.java +++ b/jdk/src/java.base/share/classes/java/security/acl/Acl.java @@ -82,6 +82,7 @@ import java.security.Principal; * @see java.security.acl.Acl#getPermissions * * @author Satish Dharmaraj + * @since 1.1 * * @deprecated This package has been replaced by {@code java.security.Policy} * and related classes since 1.2. diff --git a/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java b/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java index b785a05f3d7..242470876a6 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java +++ b/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java @@ -50,6 +50,7 @@ import java.security.Principal; * @see java.security.acl.Acl * * @author Satish Dharmaraj + * @since 1.1 * * @deprecated This package has been replaced by {@code java.security.Policy} * and related classes since 1.2. diff --git a/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java b/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java index c07852c5490..1585f93637d 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java +++ b/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java @@ -30,6 +30,7 @@ package java.security.acl; * non-existent ACL (Access Control List). * * @author Satish Dharmaraj + * @since 1.1 * * @deprecated This package has been replaced by {@code java.security.Policy} * and related classes since 1.2. diff --git a/jdk/src/java.base/share/classes/java/security/acl/Group.java b/jdk/src/java.base/share/classes/java/security/acl/Group.java index f68d5dae13c..6ce62330d87 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/Group.java +++ b/jdk/src/java.base/share/classes/java/security/acl/Group.java @@ -39,6 +39,7 @@ import java.security.Principal; * Principal or Group. * * @author Satish Dharmaraj + * @since 1.1 * * @deprecated This package has been replaced by {@code java.security.Policy} * and related classes since 1.2. diff --git a/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java b/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java index dab93db9c1e..3d655d7bf48 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java +++ b/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java @@ -32,6 +32,7 @@ package java.security.acl; * @see java.security.acl.Owner#deleteOwner * * @author Satish Dharmaraj + * @since 1.1 * * @deprecated This package has been replaced by {@code java.security.Policy} * and related classes since 1.2. diff --git a/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java b/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java index 3c7da3ebc8a..cf3b5975a7a 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java +++ b/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java @@ -31,6 +31,7 @@ package java.security.acl; * the object, but the Principal attempting the modification is not an owner. * * @author Satish Dharmaraj + * @since 1.1 * * @deprecated This package has been replaced by {@code java.security.Policy} * and related classes since 1.2. diff --git a/jdk/src/java.base/share/classes/java/security/acl/Owner.java b/jdk/src/java.base/share/classes/java/security/acl/Owner.java index 476af4a0a80..0ba70035057 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/Owner.java +++ b/jdk/src/java.base/share/classes/java/security/acl/Owner.java @@ -34,6 +34,7 @@ import java.security.Principal; * interface.) The initial owner Principal should be specified as an * argument to the constructor of the class implementing this interface. * + * @since 1.1 * @see java.security.acl.Acl * * @deprecated This package has been replaced by {@code java.security.Policy} diff --git a/jdk/src/java.base/share/classes/java/security/acl/Permission.java b/jdk/src/java.base/share/classes/java/security/acl/Permission.java index 15b77429413..2c867490b6b 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/Permission.java +++ b/jdk/src/java.base/share/classes/java/security/acl/Permission.java @@ -31,6 +31,7 @@ package java.security.acl; * a particular type of access to a resource. * * @author Satish Dharmaraj + * @since 1.1 * * @deprecated This package has been replaced by {@code java.security.Policy} * and related classes since 1.2. diff --git a/jdk/src/java.base/share/classes/java/security/cert/CRL.java b/jdk/src/java.base/share/classes/java/security/cert/CRL.java index f8083c72338..e149c30106e 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CRL.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CRL.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,9 +52,9 @@ public abstract class CRL { * Creates a CRL of the specified type. * * @param type the standard name of the CRL type. - * See Appendix A in the - * Java Cryptography Architecture API Specification & Reference + * See the + * Java Security Standard Algorithm Names document * for information about standard CRL types. */ protected CRL(String type) { diff --git a/jdk/src/java.base/share/classes/java/security/cert/CRLException.java b/jdk/src/java.base/share/classes/java/security/cert/CRLException.java index 7a854316bbd..4b648e9ab9e 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CRLException.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CRLException.java @@ -31,6 +31,7 @@ import java.security.GeneralSecurityException; * CRL (Certificate Revocation List) Exception. * * @author Hemma Prafullchandra + * @since 1.2 */ public class CRLException extends GeneralSecurityException { diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertPath.java b/jdk/src/java.base/share/classes/java/security/cert/CertPath.java index 88df135f6c0..295c5aa8804 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertPath.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertPath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -91,9 +91,9 @@ import java.util.List; *
      22. {@code PkiPath}
      23. * * These encodings are described in the + * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings"> * CertPath Encodings section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other encodings are supported. *

        diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java b/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java index 12f608816be..46d5c77580c 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -72,9 +72,9 @@ import sun.security.jca.GetInstance.Instance; *

      24. {@code PKIX}
      25. * * This algorithm is described in the + * "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms"> * CertPathBuilder section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -152,8 +152,8 @@ public class CertPathBuilder { * * @param algorithm the name of the requested {@code CertPathBuilder} * algorithm. See the CertPathBuilder section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return a {@code CertPathBuilder} object that implements the @@ -190,8 +190,8 @@ public class CertPathBuilder { * * @param algorithm the name of the requested {@code CertPathBuilder} * algorithm. See the CertPathBuilder section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -233,8 +233,8 @@ public class CertPathBuilder { * * @param algorithm the name of the requested {@code CertPathBuilder} * algorithm. See the CertPathBuilder section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java b/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java index 298923d84a2..57efedd3348 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -74,9 +74,9 @@ import sun.security.jca.GetInstance.Instance; *
      26. {@code PKIX}
      27. * * This algorithm is described in the + * "{@docRoot}/../specs/security/standard-names.html#certpathvalidator-algorithms"> * CertPathValidator section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -152,9 +152,9 @@ public class CertPathValidator { * {@link Security#getProviders() Security.getProviders()}. * * @param algorithm the name of the requested {@code CertPathValidator} - * algorithm. See the CertPathValidator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * algorithm. See the CertPathValidator section in the + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return a {@code CertPathValidator} object that implements the @@ -190,9 +190,9 @@ public class CertPathValidator { * the {@link Security#getProviders() Security.getProviders()} method. * * @param algorithm the name of the requested {@code CertPathValidator} - * algorithm. See the CertPathValidator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * algorithm. See the CertPathValidator section in the + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -235,8 +235,8 @@ public class CertPathValidator { * * @param algorithm the name of the requested {@code CertPathValidator} * algorithm. See the CertPathValidator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpathvalidator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertStore.java b/jdk/src/java.base/share/classes/java/security/cert/CertStore.java index e62d39f27b0..0d7675c13af 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertStore.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertStore.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -67,9 +67,9 @@ import sun.security.jca.GetInstance.Instance; *
      28. {@code Collection}
      29. * * This type is described in the + * "{@docRoot}/../specs/security/standard-names.html#certstore-types"> * CertStore section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other types are supported. * @@ -212,8 +212,8 @@ public class CertStore { * * @param type the name of the requested {@code CertStore} type. * See the CertStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certstore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard types. * * @param params the initialization parameters (may be {@code null}). @@ -276,8 +276,8 @@ public class CertStore { * * @param type the requested {@code CertStore} type. * See the CertStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certstore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard types. * * @param params the initialization parameters (may be {@code null}). @@ -337,8 +337,8 @@ public class CertStore { * * @param type the requested {@code CertStore} type. * See the CertStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certstore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard types. * * @param params the initialization parameters (may be {@code null}). diff --git a/jdk/src/java.base/share/classes/java/security/cert/Certificate.java b/jdk/src/java.base/share/classes/java/security/cert/Certificate.java index 6923627ce7b..ad72e638d39 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/Certificate.java +++ b/jdk/src/java.base/share/classes/java/security/cert/Certificate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -57,6 +57,7 @@ import sun.security.x509.X509CertImpl; * @see CertificateFactory * * @author Hemma Prafullchandra + * @since 1.2 */ public abstract class Certificate implements java.io.Serializable { @@ -74,8 +75,8 @@ public abstract class Certificate implements java.io.Serializable { * * @param type the standard name of the certificate type. * See the CertificateFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types"> + * Java Security Standard Algorithm Names Specification * for information about standard certificate types. */ protected Certificate(String type) { diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateEncodingException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateEncodingException.java index 618ee0a55b9..c30b96c46c8 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertificateEncodingException.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateEncodingException.java @@ -30,6 +30,7 @@ package java.security.cert; * occurs while attempting to encode a certificate. * * @author Hemma Prafullchandra + * @since 1.2 */ public class CertificateEncodingException extends CertificateException { diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateException.java index f663054000b..ce73103aaab 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertificateException.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateException.java @@ -31,6 +31,7 @@ import java.security.GeneralSecurityException; * This exception indicates one of a variety of certificate problems. * * @author Hemma Prafullchandra + * @since 1.2 * @see Certificate */ public class CertificateException extends GeneralSecurityException { diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateExpiredException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateExpiredException.java index 9de0c236c13..635a32f5cda 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertificateExpiredException.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateExpiredException.java @@ -32,6 +32,7 @@ package java.security.cert; * of the certificate. * * @author Hemma Prafullchandra + * @since 1.2 */ public class CertificateExpiredException extends CertificateException { diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateFactory.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateFactory.java index e63c3b403d4..ae4e8bd05c4 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertificateFactory.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -101,11 +101,11 @@ import sun.security.jca.GetInstance.Instance; *
      30. {@code PkiPath}
      31. * * The type and encodings are described in the + * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types"> * CertificateFactory section and the + * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings"> * CertPath Encodings section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other types or encodings are supported. * @@ -172,8 +172,8 @@ public class CertificateFactory { * * @param type the name of the requested certificate type. * See the CertificateFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types"> + * Java Security Standard Algorithm Names Specification * for information about standard certificate types. * * @return a certificate factory object for the specified type @@ -213,8 +213,8 @@ public class CertificateFactory { * * @param type the certificate type. * See the CertificateFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types"> + * Java Security Standard Algorithm Names Specification * for information about standard certificate types. * * @param provider the name of the provider. @@ -260,8 +260,8 @@ public class CertificateFactory { * * @param type the certificate type. * See the CertificateFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types"> + * Java Security Standard Algorithm Names Specification * for information about standard certificate types. * @param provider the provider. * @@ -359,8 +359,8 @@ public class CertificateFactory { * Returns an iteration of the {@code CertPath} encodings supported * by this certificate factory, with the default encoding first. See * the CertPath Encodings section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings"> + * Java Security Standard Algorithm Names Specification * for information about standard encoding names and their formats. *

        * Attempts to modify the returned {@code Iterator} via its @@ -399,8 +399,8 @@ public class CertificateFactory { * the data read from the {@code InputStream} inStream. The data * is assumed to be in the specified encoding. See * the CertPath Encodings section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings"> + * Java Security Standard Algorithm Names Specification * for information about standard encoding names and their formats. * * @param inStream an {@code InputStream} containing the data diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java index 35aee847bb8..0b1bb337b3f 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -183,8 +183,8 @@ public abstract class CertificateFactorySpi { * Returns an iteration of the {@code CertPath} encodings supported * by this certificate factory, with the default encoding first. See * the CertPath Encodings section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings"> + * Java Security Standard Algorithm Names Specification * for information about standard encoding names. *

        * Attempts to modify the returned {@code Iterator} via its diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateNotYetValidException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateNotYetValidException.java index e8722bd339d..75f3e150283 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertificateNotYetValidException.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateNotYetValidException.java @@ -32,6 +32,7 @@ package java.security.cert; * validity period. * * @author Hemma Prafullchandra + * @since 1.2 */ public class CertificateNotYetValidException extends CertificateException { diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateParsingException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateParsingException.java index 06a7d603f29..36fa9650874 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertificateParsingException.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateParsingException.java @@ -31,6 +31,7 @@ package java.security.cert; * are found in the Certificate. * * @author Hemma Prafullchandra + * @since 1.2 */ public class CertificateParsingException extends CertificateException { diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java b/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java index 21332907357..d23e3416272 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java +++ b/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java @@ -102,6 +102,7 @@ import sun.security.x509.X509CRLImpl; * }

        * * @author Hemma Prafullchandra + * @since 1.2 * * * @see CRL diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509CRLEntry.java b/jdk/src/java.base/share/classes/java/security/cert/X509CRLEntry.java index 268fa819587..4028738dae9 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/X509CRLEntry.java +++ b/jdk/src/java.base/share/classes/java/security/cert/X509CRLEntry.java @@ -62,6 +62,7 @@ import sun.security.x509.X509CRLEntryImpl; * @see X509Extension * * @author Hemma Prafullchandra + * @since 1.2 */ public abstract class X509CRLEntry implements X509Extension { diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java b/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java index 174d6a73838..ab4391e53d5 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java +++ b/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java @@ -95,6 +95,7 @@ import sun.security.x509.X509CertImpl; * * * @author Hemma Prafullchandra + * @since 1.2 * * * @see Certificate diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java b/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java index 03469606eed..b7533a2c697 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java +++ b/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -65,6 +65,7 @@ import java.util.Set; * be handled by a Class that understands the extension. * * @author Hemma Prafullchandra + * @since 1.2 */ public interface X509Extension { @@ -152,10 +153,14 @@ public interface X509Extension { * by periods. * *

        For example:
        - * + *
        + * + * * * * + * + * * * * @@ -176,6 +181,7 @@ public interface X509Extension { * * * + * *
        Examples of OIDs and extension names
        OID (Object Identifier)Extension Name
        2.5.29.14SubjectKeyIdentifier
        2.5.29.15AuthorityKeyIdentifier
        2.5.29.36PolicyConstraints
        * * @param oid the Object Identifier value for the extension. diff --git a/jdk/src/java.base/share/classes/java/security/cert/package-info.java b/jdk/src/java.base/share/classes/java/security/cert/package-info.java index 58f5fb77e0a..0a5f0b7b532 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/package-info.java +++ b/jdk/src/java.base/share/classes/java/security/cert/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,17 +32,15 @@ *

        Package Specification

        * * * *

        Related Documentation

        @@ -51,12 +49,7 @@ * * * @since 1.2 diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/DSAKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/DSAKey.java index d78b3e19853..64ac8c4b931 100644 --- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAKey.java +++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAKey.java @@ -35,6 +35,7 @@ package java.security.interfaces; * * @author Benjamin Renaud * @author Josh Bloch + * @since 1.1 */ public interface DSAKey { diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java b/jdk/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java index 558ac4419c2..dc231db419c 100644 --- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java +++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java @@ -65,6 +65,7 @@ import java.security.*; *

        Note: Some earlier implementations of this interface may not support * larger sizes of DSA parameters such as 2048 and 3072-bit. * + * @since 1.1 * @see java.security.KeyPairGenerator */ public interface DSAKeyPairGenerator { diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/DSAParams.java b/jdk/src/java.base/share/classes/java/security/interfaces/DSAParams.java index 8c46ed57e27..2eafe879e7d 100644 --- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAParams.java +++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAParams.java @@ -38,6 +38,7 @@ import java.math.BigInteger; * * @author Benjamin Renaud * @author Josh Bloch + * @since 1.1 */ public interface DSAParams { diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java index 81ab3586f69..b23a5c14d42 100644 --- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java +++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java @@ -37,6 +37,7 @@ import java.math.BigInteger; * @see DSAPublicKey * * @author Benjamin Renaud + * @since 1.1 */ public interface DSAPrivateKey extends DSAKey, java.security.PrivateKey { diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java index e56b795ae70..fb4a2f3226e 100644 --- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java +++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java @@ -37,6 +37,7 @@ import java.math.BigInteger; * @see DSAPrivateKey * * @author Benjamin Renaud + * @since 1.1 */ public interface DSAPublicKey extends DSAKey, java.security.PublicKey { diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java index 0408feabbbc..89dd478c831 100644 --- a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java +++ b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java @@ -32,6 +32,7 @@ import java.math.BigInteger; * using the Chinese Remainder Theorem (CRT) information values. * * @author Jan Luehe + * @since 1.2 * * * @see RSAPrivateKey diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java index 5d69ad6837e..390da4e89fd 100644 --- a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java +++ b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java @@ -31,6 +31,7 @@ import java.math.BigInteger; * The interface to an RSA private key. * * @author Jan Luehe + * @since 1.2 * * * @see RSAPrivateCrtKey diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java index a698c05f738..f19530604d7 100644 --- a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java +++ b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java @@ -31,6 +31,7 @@ import java.math.BigInteger; * The interface to an RSA public key. * * @author Jan Luehe + * @since 1.2 * */ diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/package-info.java b/jdk/src/java.base/share/classes/java/security/interfaces/package-info.java index 426c56ec075..1fe4c3ddb90 100644 --- a/jdk/src/java.base/share/classes/java/security/interfaces/package-info.java +++ b/jdk/src/java.base/share/classes/java/security/interfaces/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,11 +42,10 @@ * {@code Key} classes for hardware devices, please refer * to these cryptographic provider developer guides: *

        * *

        Package Specification

        @@ -61,12 +60,8 @@ * * For further documentation, please see: * * * @since 1.1 diff --git a/jdk/src/java.base/share/classes/java/security/package-info.java b/jdk/src/java.base/share/classes/java/security/package-info.java index 2c8205b09b9..5b6b02bad5d 100644 --- a/jdk/src/java.base/share/classes/java/security/package-info.java +++ b/jdk/src/java.base/share/classes/java/security/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,64 +46,36 @@ *

        Package Specification

        * * * *

        Related Documentation

        * * For further documentation, please see: * * diff --git a/jdk/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java index 5aca225d2b2..99b5a04655a 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java +++ b/jdk/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -67,8 +67,8 @@ public abstract class EncodedKeySpec implements KeySpec { * array are copied to protect against subsequent modification. * @param algorithm the algorithm name of the encoded key * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * @throws NullPointerException if {@code encodedKey} * or {@code algorithm} is null. diff --git a/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java index 198ca604b8c..73d79a41321 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java +++ b/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -85,8 +85,8 @@ public class PKCS8EncodedKeySpec extends EncodedKeySpec { * the array are copied to protect against subsequent modification. * @param algorithm the algorithm name of the encoded private key * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * @throws NullPointerException if {@code encodedKey} * or {@code algorithm} is null. diff --git a/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateCrtKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateCrtKeySpec.java index d0ba70be443..1c66e537983 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateCrtKeySpec.java +++ b/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateCrtKeySpec.java @@ -33,6 +33,7 @@ import java.math.BigInteger; * efficiency. * * @author Jan Luehe + * @since 1.2 * * * @see java.security.Key diff --git a/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateKeySpec.java index e7491461684..6a750354e1b 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateKeySpec.java +++ b/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateKeySpec.java @@ -31,6 +31,7 @@ import java.math.BigInteger; * This class specifies an RSA private key. * * @author Jan Luehe + * @since 1.2 * * * @see java.security.Key diff --git a/jdk/src/java.base/share/classes/java/security/spec/RSAPublicKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/RSAPublicKeySpec.java index 9a944f962b1..68ce197c939 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/RSAPublicKeySpec.java +++ b/jdk/src/java.base/share/classes/java/security/spec/RSAPublicKeySpec.java @@ -31,6 +31,7 @@ import java.math.BigInteger; * This class specifies an RSA public key. * * @author Jan Luehe + * @since 1.2 * * * @see java.security.Key diff --git a/jdk/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java index 2d23570fe3d..7de4a2a1417 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java +++ b/jdk/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -75,8 +75,8 @@ public class X509EncodedKeySpec extends EncodedKeySpec { * array are copied to protect against subsequent modification. * @param algorithm the algorithm name of the encoded public key * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * @throws NullPointerException if {@code encodedKey} * or {@code algorithm} is null. diff --git a/jdk/src/java.base/share/classes/java/security/spec/package-info.java b/jdk/src/java.base/share/classes/java/security/spec/package-info.java index cb393088e5b..c8a3a62e638 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/package-info.java +++ b/jdk/src/java.base/share/classes/java/security/spec/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,18 +54,10 @@ * For documentation that includes information about algorithm parameter * and key specifications, please see: * * * @since 1.2 diff --git a/jdk/src/java.base/share/classes/java/text/BreakIterator.java b/jdk/src/java.base/share/classes/java/text/BreakIterator.java index f5e53c4d4f9..ffb5d5938e5 100644 --- a/jdk/src/java.base/share/classes/java/text/BreakIterator.java +++ b/jdk/src/java.base/share/classes/java/text/BreakIterator.java @@ -68,19 +68,19 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * (word, line, sentence, and so on). You must use a different iterator * for each unit boundary analysis you wish to perform. * - *

        + *

        * Line boundary analysis determines where a text string can be * broken when line-wrapping. The mechanism correctly handles * punctuation and hyphenated words. Actual line breaking needs * to also consider the available line width and is handled by * higher-level software. * - *

        + *

        * Sentence boundary analysis allows selection with correct interpretation * of periods within numbers and abbreviations, and trailing punctuation * marks such as quotation marks and parentheses. * - *

        + *

        * Word boundary analysis is used by search and replace functions, as * well as within text editing applications that allow the user to * select words with a double click. Word selection provides correct @@ -88,7 +88,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * words. Characters that are not part of a word, such as symbols * or punctuation marks, have word-breaks on both sides. * - *

        + *

        * Character boundary analysis allows users to interact with characters * as they expect to, for example, when moving the cursor through a text * string. Character boundary analysis provides correct navigation @@ -221,6 +221,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * and the next is a word; otherwise, it's the material between words.) *

        * + * @since 1.1 * @see CharacterIterator * */ diff --git a/jdk/src/java.base/share/classes/java/text/CharacterIterator.java b/jdk/src/java.base/share/classes/java/text/CharacterIterator.java index efa7ab413b0..b6e5e8b1196 100644 --- a/jdk/src/java.base/share/classes/java/text/CharacterIterator.java +++ b/jdk/src/java.base/share/classes/java/text/CharacterIterator.java @@ -98,6 +98,7 @@ package java.text; * } * } * + * @since 1.1 * @see StringCharacterIterator * @see AttributedCharacterIterator */ diff --git a/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java b/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java index e8fa564ec26..13697dfcc8f 100644 --- a/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java +++ b/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java @@ -151,7 +151,7 @@ import java.util.Arrays; * } * * - *

        Synchronization

        + *

        Synchronization

        * *

        * Choice formats are not synchronized. @@ -163,6 +163,7 @@ import java.util.Arrays; * @see DecimalFormat * @see MessageFormat * @author Mark Davis + * @since 1.1 */ public class ChoiceFormat extends NumberFormat { diff --git a/jdk/src/java.base/share/classes/java/text/CollationElementIterator.java b/jdk/src/java.base/share/classes/java/text/CollationElementIterator.java index 7060ac0c8b6..9da55b26625 100644 --- a/jdk/src/java.base/share/classes/java/text/CollationElementIterator.java +++ b/jdk/src/java.base/share/classes/java/text/CollationElementIterator.java @@ -104,6 +104,7 @@ import sun.text.normalizer.NormalizerBase; * @see Collator * @see RuleBasedCollator * @author Helena Shih, Laura Werner, Richard Gillam + * @since 1.1 */ public final class CollationElementIterator { diff --git a/jdk/src/java.base/share/classes/java/text/CollationKey.java b/jdk/src/java.base/share/classes/java/text/CollationKey.java index 4f9c3c6ac49..318f3c4d26b 100644 --- a/jdk/src/java.base/share/classes/java/text/CollationKey.java +++ b/jdk/src/java.base/share/classes/java/text/CollationKey.java @@ -95,6 +95,7 @@ package java.text; * @see Collator * @see RuleBasedCollator * @author Helena Shih + * @since 1.1 */ public abstract class CollationKey implements Comparable { diff --git a/jdk/src/java.base/share/classes/java/text/Collator.java b/jdk/src/java.base/share/classes/java/text/Collator.java index ce2f8945856..cd8fa44d3b9 100644 --- a/jdk/src/java.base/share/classes/java/text/Collator.java +++ b/jdk/src/java.base/share/classes/java/text/Collator.java @@ -123,6 +123,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * @see CollationElementIterator * @see Locale * @author Helena Shih, Laura Werner, Richard Gillam + * @since 1.1 */ public abstract class Collator diff --git a/jdk/src/java.base/share/classes/java/text/DateFormat.java b/jdk/src/java.base/share/classes/java/text/DateFormat.java index 3b689b534f3..f4e7a5ab849 100644 --- a/jdk/src/java.base/share/classes/java/text/DateFormat.java +++ b/jdk/src/java.base/share/classes/java/text/DateFormat.java @@ -133,7 +133,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * on the screen. * * - *

        Synchronization

        + *

        Synchronization

        * *

        * Date formats are not synchronized. @@ -167,6 +167,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * @see java.util.GregorianCalendar * @see java.util.TimeZone * @author Mark Davis, Chen-Lieh Huang, Alan Liu + * @since 1.1 */ public abstract class DateFormat extends Format { diff --git a/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java b/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java index 0360631a02d..724c1e71ac3 100644 --- a/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java +++ b/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java @@ -98,6 +98,7 @@ import sun.util.locale.provider.TimeZoneNameUtility; * @see SimpleDateFormat * @see java.util.SimpleTimeZone * @author Chen-Lieh Huang + * @since 1.1 */ public class DateFormatSymbols implements Serializable, Cloneable { diff --git a/jdk/src/java.base/share/classes/java/text/DecimalFormat.java b/jdk/src/java.base/share/classes/java/text/DecimalFormat.java index 3e2a44a2d6c..448cf6f2d75 100644 --- a/jdk/src/java.base/share/classes/java/text/DecimalFormat.java +++ b/jdk/src/java.base/share/classes/java/text/DecimalFormat.java @@ -172,60 +172,63 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * are not localized. * *

        - * - * - * + *
        Symbol - * Location - * Localized? - * Meaning - *
        + * + * + * + * + * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * *
        Chart showing symbol, location, localized, and meaning.
        Symbol + * Location + * Localized? + * Meaning + *
        0 * Number * Yes * Digit - *
        # * Number * Yes * Digit, zero shows as absent - *
        . * Number * Yes * Decimal separator or monetary decimal separator - *
        - * Number * Yes * Minus sign - *
        , * Number * Yes * Grouping separator - *
        E * Number * Yes * Separates mantissa and exponent in scientific notation. * Need not be quoted in prefix or suffix. - *
        ; * Subpattern boundary * Yes * Separates positive and negative subpatterns - *
        % * Prefix or suffix * Yes * Multiply by 100 and show as percentage - *
        \u2030 * Prefix or suffix * Yes * Multiply by 1000 and show as per mille value - *
        ¤ (\u00A4) * Prefix or suffix * No @@ -233,7 +236,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * doubled, replaced by international currency symbol. * If present in a pattern, the monetary decimal separator * is used instead of the decimal separator. - *
        ' * Prefix or suffix * No @@ -241,6 +244,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * for example, "'#'#" formats 123 to * "#123". To create a single quote * itself, use two in a row: "# o''clock". + *
        *
        * @@ -327,7 +331,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * and isParseIntegerOnly() are false. * * - *

        Synchronization

        + *

        Synchronization

        * *

        * Decimal formats are generally not synchronized. @@ -377,6 +381,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * @see ParsePosition * @author Mark Davis * @author Alan Liu + * @since 1.1 */ public class DecimalFormat extends NumberFormat { diff --git a/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java b/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java index cf7e7e5ffc7..989d6f26377 100644 --- a/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java +++ b/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java @@ -60,6 +60,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * @see DecimalFormat * @author Mark Davis * @author Alan Liu + * @since 1.1 */ public class DecimalFormatSymbols implements Cloneable, Serializable { diff --git a/jdk/src/java.base/share/classes/java/text/FieldPosition.java b/jdk/src/java.base/share/classes/java/text/FieldPosition.java index 955221dee80..7a6e2a58e93 100644 --- a/jdk/src/java.base/share/classes/java/text/FieldPosition.java +++ b/jdk/src/java.base/share/classes/java/text/FieldPosition.java @@ -68,6 +68,7 @@ package java.text; * formatToCharacterIterator. * * @author Mark Davis + * @since 1.1 * @see java.text.Format */ public class FieldPosition { diff --git a/jdk/src/java.base/share/classes/java/text/Format.java b/jdk/src/java.base/share/classes/java/text/Format.java index f24b4ee0083..be324eb63ba 100644 --- a/jdk/src/java.base/share/classes/java/text/Format.java +++ b/jdk/src/java.base/share/classes/java/text/Format.java @@ -115,7 +115,7 @@ import java.io.Serializable; * the field. For examples of these constants, see ERA_FIELD and its * friends in {@link DateFormat}. * - *

        Synchronization

        + *

        Synchronization

        * *

        * Formats are generally not synchronized. @@ -129,6 +129,7 @@ import java.io.Serializable; * @see java.text.DateFormat * @see java.text.MessageFormat * @author Mark Davis + * @since 1.1 */ public abstract class Format implements Serializable, Cloneable { diff --git a/jdk/src/java.base/share/classes/java/text/MessageFormat.java b/jdk/src/java.base/share/classes/java/text/MessageFormat.java index b1e0eb70e21..b80eb054f51 100644 --- a/jdk/src/java.base/share/classes/java/text/MessageFormat.java +++ b/jdk/src/java.base/share/classes/java/text/MessageFormat.java @@ -68,7 +68,7 @@ import java.util.Locale; * behavior is defined by the pattern that you provide as well as the * subformats used for inserted arguments. * - *

        Patterns and Their Interpretation

        + *

        Patterns and Their Interpretation

        * * MessageFormat uses patterns of the following form: *
        @@ -146,11 +146,15 @@ import java.util.Locale;
          * shown in the table are illegal. A SubformatPattern must
          * be a valid pattern string for the {@code Format} subclass used.
          *
        - * 
        + * 
        + * + * * * + * * * *
        Shows how FormatType and FormatStyle values map to Format instances
        FormatType * FormatStyle * Subformat Created + *
        (none) * (none) @@ -213,6 +217,7 @@ import java.util.Locale; * choice * SubformatPattern * {@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)} + *
        * *

        Usage Information

        @@ -321,7 +326,7 @@ import java.util.Locale; * // result now equals {new String("z")} *
        * - *

        Synchronization

        + *

        Synchronization

        * *

        * Message formats are not synchronized. @@ -339,6 +344,7 @@ import java.util.Locale; * @see SimpleDateFormat * * @author Mark Davis + * @since 1.1 */ public class MessageFormat extends Format { @@ -766,11 +772,15 @@ public class MessageFormat extends Format { * argument is unavailable if arguments is * null or has fewer than argumentIndex+1 elements. * - * + *
        + * + * * * + * * * *
        Examples of subformat,argument,and formatted text
        Subformat * Argument * Formatted Text + *
        any * unavailable @@ -805,6 +815,7 @@ public class MessageFormat extends Format { * null * any * argument.toString() + *
        *

        * If pos is non-null, and refers to diff --git a/jdk/src/java.base/share/classes/java/text/NumberFormat.java b/jdk/src/java.base/share/classes/java/text/NumberFormat.java index 73dbfea6dab..86953f21c9a 100644 --- a/jdk/src/java.base/share/classes/java/text/NumberFormat.java +++ b/jdk/src/java.base/share/classes/java/text/NumberFormat.java @@ -166,7 +166,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * numbers: "(12)" for -12. * * - *

        Synchronization

        + *

        Synchronization

        * *

        * Number formats are generally not synchronized. @@ -185,6 +185,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * @see ChoiceFormat * @author Mark Davis * @author Helena Shih + * @since 1.1 */ public abstract class NumberFormat extends Format { diff --git a/jdk/src/java.base/share/classes/java/text/ParseException.java b/jdk/src/java.base/share/classes/java/text/ParseException.java index f9ad001fa52..264c4803fc5 100644 --- a/jdk/src/java.base/share/classes/java/text/ParseException.java +++ b/jdk/src/java.base/share/classes/java/text/ParseException.java @@ -45,6 +45,7 @@ package java.text; * @see java.text.Format * @see java.text.FieldPosition * @author Mark Davis + * @since 1.1 */ public class ParseException extends Exception { diff --git a/jdk/src/java.base/share/classes/java/text/ParsePosition.java b/jdk/src/java.base/share/classes/java/text/ParsePosition.java index be3ffce61eb..85e5c9d9e3c 100644 --- a/jdk/src/java.base/share/classes/java/text/ParsePosition.java +++ b/jdk/src/java.base/share/classes/java/text/ParsePosition.java @@ -51,6 +51,7 @@ package java.text; * records the current position. * * @author Mark Davis + * @since 1.1 * @see java.text.Format */ diff --git a/jdk/src/java.base/share/classes/java/text/RuleBasedCollator.java b/jdk/src/java.base/share/classes/java/text/RuleBasedCollator.java index e3c2c8c309e..c8140a5efa0 100644 --- a/jdk/src/java.base/share/classes/java/text/RuleBasedCollator.java +++ b/jdk/src/java.base/share/classes/java/text/RuleBasedCollator.java @@ -242,6 +242,7 @@ import java.util.Locale; * @see Collator * @see CollationElementIterator * @author Helena Shih, Laura Werner, Richard Gillam + * @since 1.1 */ public class RuleBasedCollator extends Collator{ // IMPLEMENTATION NOTES: The implementation of the collation algorithm is diff --git a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java index 00b2b969670..4990338e1a6 100644 --- a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java +++ b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java @@ -92,18 +92,22 @@ import sun.util.locale.provider.LocaleProviderAdapter; * 'A' to 'Z' and from 'a' to * 'z' are reserved): *

        - * - * - *
        Letter - * Date or Time Component - * Presentation - * Examples + * + * + * + * + * + * * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * *
        Chart shows pattern letters, date/time component, presentation, and examples.
        Letter + * Date or Time Component + * Presentation + * Examples + *
        G * Era designator * Text * AD - *
        y * Year * Year @@ -113,7 +117,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Week year * Year * 2009; 09 - *
        M * Month in year (context sensitive) * Month @@ -123,7 +127,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Month in year (standalone form) * Month * July; Jul; 07 - *
        w * Week in year * Number @@ -133,7 +137,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Week in month * Number * 2 - *
        D * Day in year * Number @@ -143,7 +147,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Day in month * Number * 10 - *
        F * Day of week in month * Number @@ -153,7 +157,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Day name in week * Text * Tuesday; Tue - *
        u * Day number of week (1 = Monday, ..., 7 = Sunday) * Number @@ -163,7 +167,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Am/pm marker * Text * PM - *
        H * Hour in day (0-23) * Number @@ -173,7 +177,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Hour in day (1-24) * Number * 24 - *
        K * Hour in am/pm (0-11) * Number @@ -183,7 +187,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Hour in am/pm (1-12) * Number * 12 - *
        m * Minute in hour * Number @@ -193,7 +197,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Second in minute * Number * 55 - *
        S * Millisecond * Number @@ -203,7 +207,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Time zone * General time zone * Pacific Standard Time; PST; GMT-08:00 - *
        Z * Time zone * RFC 822 time zone @@ -213,23 +217,24 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Time zone * ISO 8601 time zone * -08; -0800; -08:00 + *
        * * Pattern letters are usually repeated, as their number determines the * exact presentation: *
          - *
        • Text: + *
        • Text: * For formatting, if the number of pattern letters is 4 or more, * the full form is used; otherwise a short or abbreviated form * is used if available. * For parsing, both forms are accepted, independent of the number * of pattern letters.

        • - *
        • Number: + *
        • Number: * For formatting, the number of pattern letters is the minimum * number of digits, and shorter numbers are zero-padded to this amount. * For parsing, the number of pattern letters is ignored unless * it's needed to separate two adjacent fields.

        • - *
        • Year: + *
        • Year: * If the formatter's {@link #getCalendar() Calendar} is the Gregorian * calendar, the following rules are applied.
          *
            @@ -270,7 +275,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * DateFormat#getCalendar() getCalendar()}.{@link * java.util.Calendar#isWeekDateSupported() * isWeekDateSupported()}.

            - *
          • Month: + *
          • Month: * If the number of pattern letters is 3 or more, the month is * interpreted as text; otherwise, * it is interpreted as a number.
            @@ -291,12 +296,12 @@ import sun.util.locale.provider.LocaleProviderAdapter; *
          • Letter L produces the standalone form of month names.
          • *
          *
        • - *
        • General time zone: + *
        • General time zone: * Time zones are interpreted as text if they have * names. For time zones representing a GMT offset value, the * following syntax is used: *
          - *     GMTOffsetTimeZone:
          + *     GMTOffsetTimeZone:
            *             GMT Sign Hours : Minutes
            *     Sign: one of
            *             + -
          @@ -312,7 +317,7 @@ import sun.util.locale.provider.LocaleProviderAdapter;
            *     from the Basic Latin block of the Unicode standard.
            *     

          For parsing, RFC 822 time zones are also * accepted.

        • - *
        • RFC 822 time zone: + *
        • RFC 822 time zone: * For formatting, the RFC 822 4-digit time zone format is used: * *
          @@ -325,7 +330,7 @@ import sun.util.locale.provider.LocaleProviderAdapter;
            *
            *     

          For parsing, general time zones are also * accepted. - *

        • ISO 8601 Time zone: + *
        • ISO 8601 Time zone: * The number of pattern letters designates the format for both formatting * and parsing as follows: *
          @@ -370,47 +375,52 @@ import sun.util.locale.provider.LocaleProviderAdapter;
            * the U.S. locale. The given date and time are 2001-07-04 12:08:56 local time
            * in the U.S. Pacific Time time zone.
            * 
          - * - * - *
          Date and Time Pattern - * Result + * + * + * + * + * + * * * + * * * + * * * + * * * + * * * + * * * *
          Examples of date and time patterns interpreted in the U.S. locale
          Date and Time Pattern + * Result + *
          "yyyy.MM.dd G 'at' HH:mm:ss z" * 2001.07.04 AD at 12:08:56 PDT - *
          "EEE, MMM d, ''yy" * Wed, Jul 4, '01 *
          "h:mm a" * 12:08 PM - *
          "hh 'o''clock' a, zzzz" * 12 o'clock PM, Pacific Daylight Time *
          "K:mm a, z" * 0:08 PM, PDT - *
          "yyyyy.MMMMM.dd GGG hh:mm aaa" * 02001.July.04 AD 12:08 PM *
          "EEE, d MMM yyyy HH:mm:ss Z" * Wed, 4 Jul 2001 12:08:56 -0700 - *
          "yyMMddHHmmssZ" * 010704120856-0700 *
          "yyyy-MM-dd'T'HH:mm:ss.SSSZ" * 2001-07-04T12:08:56.235-0700 - *
          "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" * 2001-07-04T12:08:56.235-07:00 *
          "YYYY-'W'ww-u" * 2001-W27-3 + *
          * * - *

          Synchronization

          + *

          Synchronization

          * *

          * Date formats are not synchronized. @@ -424,6 +434,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * @see DateFormat * @see DateFormatSymbols * @author Mark Davis, Chen-Lieh Huang, Alan Liu + * @since 1.1 */ public class SimpleDateFormat extends DateFormat { diff --git a/jdk/src/java.base/share/classes/java/text/StringCharacterIterator.java b/jdk/src/java.base/share/classes/java/text/StringCharacterIterator.java index 66b5be65157..b5d510cd642 100644 --- a/jdk/src/java.base/share/classes/java/text/StringCharacterIterator.java +++ b/jdk/src/java.base/share/classes/java/text/StringCharacterIterator.java @@ -47,6 +47,7 @@ package java.text; * entire String. * * @see CharacterIterator + * @since 1.1 */ public final class StringCharacterIterator implements CharacterIterator diff --git a/jdk/src/java.base/share/classes/java/time/Clock.java b/jdk/src/java.base/share/classes/java/time/Clock.java index 121afa3730b..a372251f983 100644 --- a/jdk/src/java.base/share/classes/java/time/Clock.java +++ b/jdk/src/java.base/share/classes/java/time/Clock.java @@ -127,10 +127,13 @@ import jdk.internal.misc.VM; * document whether or not they do support serialization. * * @implNote - * The clock implementation provided here is based on {@link System#currentTimeMillis()}. - * That method provides little to no guarantee about the accuracy of the clock. - * Applications requiring a more accurate clock must implement this abstract class - * themselves using a different external clock, such as an NTP server. + * The clock implementation provided here is based on the same underlying clock + * as {@link System#currentTimeMillis()}, but may have a precision finer than + * milliseconds if available. + * However, little to no guarantee is provided about the accuracy of the + * underlying clock. Applications requiring a more accurate clock must implement + * this abstract class themselves using a different external clock, such as an + * NTP server. * * @since 1.8 */ diff --git a/jdk/src/java.base/share/classes/java/time/Duration.java b/jdk/src/java.base/share/classes/java/time/Duration.java index cacd3999a83..875b9e07761 100644 --- a/jdk/src/java.base/share/classes/java/time/Duration.java +++ b/jdk/src/java.base/share/classes/java/time/Duration.java @@ -1370,6 +1370,7 @@ public final class Duration * @return a {@code Duration} based on this duration with the time truncated, not null * @throws DateTimeException if the unit is invalid for truncation * @throws UnsupportedTemporalTypeException if the unit is not supported + * @since 9 */ public Duration truncatedTo(TemporalUnit unit) { Objects.requireNonNull(unit, "unit"); diff --git a/jdk/src/java.base/share/classes/java/time/chrono/Era.java b/jdk/src/java.base/share/classes/java/time/chrono/Era.java index f8945fa0aec..5cf0968597c 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/Era.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/Era.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -310,8 +310,8 @@ public interface Era extends TemporalAccessor, TemporalAdjuster { * The parameters control the style of the returned text and the locale. *

          * If no textual mapping is found then the {@link #getValue() numeric value} is returned. - *

          - * This default implementation is suitable for all implementations. + * + * @apiNote This default implementation is suitable for most implementations. * * @param style the style of the text required, not null * @param locale the locale to use, not null diff --git a/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java b/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java index d61c2333303..0ec1b591bc2 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 @@ -103,17 +103,18 @@ import sun.util.logging.PlatformLogger; * *

          * CLDR and LDML identify variants: - * + *
          + * * - * - * - * - * - * + * + * + * + * + * * * * - * + * * * * @@ -147,36 +148,37 @@ import sun.util.logging.PlatformLogger; *

          * The Hijrah property resource is a set of properties that describe the calendar. * The syntax is defined by {@code java.util.Properties#load(Reader)}. - *

          Variants of Hijrah Calendars
          Chronology IDCalendar TypeLocale extension, see {@link java.util.Locale}Description
          Chronology IDCalendar TypeLocale extension, see {@link java.util.Locale}Description
          Hijrah-umalquraislamic-umalquraca-islamic-umalqura
          + *
          + * * - * - * - * - * + * + * + * + * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * @@ -813,8 +815,9 @@ public final class HijrahChronology extends AbstractChronology implements Serial private Properties readConfigProperties(final String calendarType) throws Exception { String resourceName = RESOURCE_PREFIX + calendarType + RESOURCE_SUFFIX; PrivilegedAction getResourceAction = () -> HijrahChronology.class.getResourceAsStream(resourceName); - FilePermission perm = new FilePermission("<>", "read"); - try (InputStream is = AccessController.doPrivileged(getResourceAction, null, perm)) { + FilePermission perm1 = new FilePermission("<>", "read"); + RuntimePermission perm2 = new RuntimePermission("accessSystemModules"); + try (InputStream is = AccessController.doPrivileged(getResourceAction, null, perm1, perm2)) { if (is == null) { throw new RuntimeException("Hijrah calendar resource not found: /java/time/chrono/" + resourceName); } diff --git a/jdk/src/java.base/share/classes/java/time/chrono/IsoEra.java b/jdk/src/java.base/share/classes/java/time/chrono/IsoEra.java index bd299691ace..702fabdf920 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/IsoEra.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/IsoEra.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -70,25 +70,26 @@ import java.time.DateTimeException; * A definition has therefore been created with two eras - 'Current era' (CE) for * years on or after 0001-01-01 (ISO), and 'Before current era' (BCE) for years before that. * - *
          Configuration of Hijrah Calendar
          Property Name Property value Description
          Property Name Property value Description
          idChronology Id, for example, "Hijrah-umalqura"The Id of the calendar in common usage
          typeCalendar type, for example, "islamic-umalqura"LDML defines the calendar types
          versionVersion, for example: "1.8.0_1"The version of the Hijrah variant data
          iso-startISO start date, formatted as {@code yyyy-MM-dd}, for example: "1900-04-30"The ISO date of the first day of the minimum Hijrah year.
          yyyy - a numeric 4 digit year, for example "1434"The value is a sequence of 12 month lengths, * for example: "29 30 29 30 29 30 30 30 29 30 29 29"
          + *
          + * * - * - * - * - * + * + * + * + * * * * - * + * * * - * + * * * - * + * * * - * + * * * * diff --git a/jdk/src/java.base/share/classes/java/time/chrono/JapaneseEra.java b/jdk/src/java.base/share/classes/java/time/chrono/JapaneseEra.java index 7ae62944025..e6fadc902ae 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/JapaneseEra.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/JapaneseEra.java @@ -1,5 +1,5 @@ /* - * 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 @@ -240,19 +240,10 @@ public final class JapaneseEra } /** - * Gets the textual representation of this era. - *

          - * This returns the textual name used to identify the era, - * suitable for presentation to the user. - * The parameters control the style of the returned text and the locale. - *

          - * If no textual mapping is found then the {@link #getValue() numeric value} - * is returned. + * {@inheritDoc} * - * @param style the style of the text required, not null - * @param locale the locale to use, not null - * @return the text value of the era, not null - * @since 9 + * @param style {@inheritDoc} + * @param locale {@inheritDoc} */ @Override public String getDisplayName(TextStyle style, Locale locale) { diff --git a/jdk/src/java.base/share/classes/java/time/chrono/MinguoEra.java b/jdk/src/java.base/share/classes/java/time/chrono/MinguoEra.java index fd96de196ee..edac0ec02e7 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/MinguoEra.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/MinguoEra.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -71,26 +71,27 @@ import java.time.DateTimeException; * All previous years, zero or earlier in the proleptic count or one and greater * in the year-of-era count, are part of the 'Before Republic of China' era. * - *

          ISO years and eras
          year-of-eraeraproleptic-year
          year-of-eraeraproleptic-year
          2CE2
          1CE1
          1BCE0
          2BCE-1
          + *
          + * * - * - * - * - * - * + * + * + * + * + * * * * - * + * * * - * + * * * - * + * * * - * + * * * * diff --git a/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java b/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java index e3e6e86fa45..53cb5d870be 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -71,26 +71,27 @@ import java.time.DateTimeException; * All previous years, zero or earlier in the proleptic count or one and greater * in the year-of-era count, are part of the 'Before Buddhist' era. * - *
          Minguo years and eras
          year-of-eraeraproleptic-yearISO proleptic-year
          year-of-eraeraproleptic-yearISO proleptic-year
          2ROC21913
          1ROC11912
          1BEFORE_ROC01911
          2BEFORE_ROC-11910
          + *
          + * * - * - * - * - * - * + * + * + * + * + * * * * - * + * * * - * + * * * - * + * * * - * + * * * * diff --git a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java index c705fcafe88..cda0f8abb48 100644 --- a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java +++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java @@ -1,5 +1,5 @@ /* - * 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 @@ -150,105 +150,106 @@ import java.util.Set; * implementation of {@code java.text.Format}. * *

          Predefined Formatters

          - *
          Buddhist years and eras
          year-of-eraeraproleptic-yearISO proleptic-year
          year-of-eraeraproleptic-yearISO proleptic-year
          2BE2-542
          1BE1-543
          1BEFORE_BE0-544
          2BEFORE_BE-1-545
          + *
          + * * - * - * - * - * + * + * + * + * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * - * + * * * * * - * + * * * * diff --git a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java index 8fe990a4f05..f734fdd9d02 100644 --- a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java +++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java @@ -1278,6 +1278,7 @@ public final class DateTimeFormatterBuilder { * * @param textStyle the text style to use, not null * @return this, for chaining, not null + * @since 9 */ public DateTimeFormatterBuilder appendGenericZoneText(TextStyle textStyle) { appendInternal(new ZoneTextPrinterParser(textStyle, null, true)); @@ -1303,6 +1304,7 @@ public final class DateTimeFormatterBuilder { * @param textStyle the text style to use, not null * @param preferredZones the set of preferred zone ids, not null * @return this, for chaining, not null + * @since 9 */ public DateTimeFormatterBuilder appendGenericZoneText(TextStyle textStyle, Set preferredZones) { diff --git a/jdk/src/java.base/share/classes/java/time/temporal/IsoFields.java b/jdk/src/java.base/share/classes/java/time/temporal/IsoFields.java index 26e7e168446..9740a9defc0 100644 --- a/jdk/src/java.base/share/classes/java/time/temporal/IsoFields.java +++ b/jdk/src/java.base/share/classes/java/time/temporal/IsoFields.java @@ -1,5 +1,5 @@ /* - * 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 @@ -136,15 +136,19 @@ import sun.util.locale.provider.LocaleResources; *

          * For example: * - *

          Predefined Formatters
          FormatterDescriptionExample
          FormatterDescriptionExample
          {@link #ofLocalizedDate ofLocalizedDate(dateStyle)} Formatter with date style from the locale '2011-12-03'
          {@link #ofLocalizedTime ofLocalizedTime(timeStyle)} Formatter with time style from the locale '10:15:30'
          {@link #ofLocalizedDateTime ofLocalizedDateTime(dateTimeStyle)} Formatter with a style for date and time from the locale '3 Jun 2008 11:05:30'
          {@link #ofLocalizedDateTime ofLocalizedDateTime(dateStyle,timeStyle)} * Formatter with date and time styles from the locale '3 Jun 2008 11:05'
          {@link #BASIC_ISO_DATE}Basic ISO date '20111203'
          {@link #ISO_LOCAL_DATE} ISO Local Date '2011-12-03'
          {@link #ISO_OFFSET_DATE} ISO Date with offset '2011-12-03+01:00'
          {@link #ISO_DATE} ISO Date with or without offset '2011-12-03+01:00'; '2011-12-03'
          {@link #ISO_LOCAL_TIME} Time without offset '10:15:30'
          {@link #ISO_OFFSET_TIME} Time with offset '10:15:30+01:00'
          {@link #ISO_TIME} Time with or without offset '10:15:30+01:00'; '10:15:30'
          {@link #ISO_LOCAL_DATE_TIME} ISO Local Date and Time '2011-12-03T10:15:30'
          {@link #ISO_OFFSET_DATE_TIME} Date Time with Offset * 2011-12-03T10:15:30+01:00'
          {@link #ISO_ZONED_DATE_TIME} Zoned Date Time '2011-12-03T10:15:30+01:00[Europe/Paris]'
          {@link #ISO_DATE_TIME} Date and time with ZoneId '2011-12-03T10:15:30+01:00[Europe/Paris]'
          {@link #ISO_ORDINAL_DATE} Year and day of year '2012-337'
          {@link #ISO_WEEK_DATE} Year and Week 2012-W48-6'
          {@link #ISO_INSTANT} Date and Time of an Instant '2011-12-03T10:15:30Z'
          {@link #RFC_1123_DATE_TIME} RFC 1123 / RFC 822 'Tue, 3 Jun 2008 11:05:30 GMT'
          + *
          * + * * + * + * * * * * * * + * *
          Examples of Week based Years
          DateDay-of-weekField values
          2008-12-28SundayWeek 52 of week-based-year 2008
          2008-12-29MondayWeek 1 of week-based-year 2009
          2008-12-31WednesdayWeek 1 of week-based-year 2009
          2009-01-01ThursdayWeek 1 of week-based-year 2009
          2009-01-04SundayWeek 1 of week-based-year 2009
          2009-01-05MondayWeek 2 of week-based-year 2009
          * * @implSpec diff --git a/jdk/src/java.base/share/classes/java/time/temporal/WeekFields.java b/jdk/src/java.base/share/classes/java/time/temporal/WeekFields.java index faee176d3e7..2f13368d28f 100644 --- a/jdk/src/java.base/share/classes/java/time/temporal/WeekFields.java +++ b/jdk/src/java.base/share/classes/java/time/temporal/WeekFields.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -127,10 +127,13 @@ import sun.util.locale.provider.LocaleResources; * The earliest period is referred to as week 0 if it has less than the minimal number of days * and week 1 if it has at least the minimal number of days. * - * + *
          * + * * * + * + * * * * @@ -139,6 +142,7 @@ import sun.util.locale.provider.LocaleResources; * * * + * *
          Examples of WeekFields
          DateDay-of-weekFirst day: Monday
          Minimal days: 4
          First day: Monday
          Minimal days: 5
          2008-12-31WednesdayWeek 5 of December 2008Week 5 of December 2008
          2009-01-01ThursdayWeek 1 of January 2009Week 0 of January 2009
          2009-01-05MondayWeek 2 of January 2009Week 1 of January 2009
          * *

          Week of Year

          @@ -157,10 +161,13 @@ import sun.util.locale.provider.LocaleResources; * The first and last weeks of a year may contain days from the * previous calendar year or next calendar year respectively. * - * + *
          * + * * * + * + * * * * @@ -169,6 +176,7 @@ import sun.util.locale.provider.LocaleResources; * * * + * *
          Examples of WeekFields for week-based-year
          DateDay-of-weekFirst day: Monday
          Minimal days: 4
          First day: Monday
          Minimal days: 5
          2008-12-31WednesdayWeek 1 of 2009Week 53 of 2008
          2009-01-01ThursdayWeek 1 of 2009Week 53 of 2008
          2009-01-05MondayWeek 2 of 2009Week 1 of 2009
          * * @implSpec diff --git a/jdk/src/java.base/share/classes/java/util/AbstractCollection.java b/jdk/src/java.base/share/classes/java/util/AbstractCollection.java index 6f344f8befe..9845c0f031b 100644 --- a/jdk/src/java.base/share/classes/java/util/AbstractCollection.java +++ b/jdk/src/java.base/share/classes/java/util/AbstractCollection.java @@ -49,7 +49,7 @@ package java.util; * the collection being implemented admits a more efficient implementation.

          * * This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch diff --git a/jdk/src/java.base/share/classes/java/util/AbstractList.java b/jdk/src/java.base/share/classes/java/util/AbstractList.java index c8c160de6a4..6d819368a24 100644 --- a/jdk/src/java.base/share/classes/java/util/AbstractList.java +++ b/jdk/src/java.base/share/classes/java/util/AbstractList.java @@ -62,7 +62,7 @@ import java.util.function.Consumer; * collection being implemented admits a more efficient implementation. * *

          This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch diff --git a/jdk/src/java.base/share/classes/java/util/AbstractMap.java b/jdk/src/java.base/share/classes/java/util/AbstractMap.java index 0b76ddd76b1..ed39bcacbca 100644 --- a/jdk/src/java.base/share/classes/java/util/AbstractMap.java +++ b/jdk/src/java.base/share/classes/java/util/AbstractMap.java @@ -52,7 +52,7 @@ import java.util.Map.Entry; * map being implemented admits a more efficient implementation. * *

          This class is a member of the - * + * * Java Collections Framework. * * @param the type of keys maintained by this map diff --git a/jdk/src/java.base/share/classes/java/util/AbstractQueue.java b/jdk/src/java.base/share/classes/java/util/AbstractQueue.java index 6c1442b09f6..789151642d6 100644 --- a/jdk/src/java.base/share/classes/java/util/AbstractQueue.java +++ b/jdk/src/java.base/share/classes/java/util/AbstractQueue.java @@ -54,7 +54,7 @@ package java.util; * instead subclassing {@link AbstractCollection}. * *

          This class is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/AbstractSequentialList.java b/jdk/src/java.base/share/classes/java/util/AbstractSequentialList.java index bd6736ba63c..0e7cb01938a 100644 --- a/jdk/src/java.base/share/classes/java/util/AbstractSequentialList.java +++ b/jdk/src/java.base/share/classes/java/util/AbstractSequentialList.java @@ -54,7 +54,7 @@ package java.util; * specification.

          * * This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch diff --git a/jdk/src/java.base/share/classes/java/util/AbstractSet.java b/jdk/src/java.base/share/classes/java/util/AbstractSet.java index 35e2ba4ec99..534ef775db1 100644 --- a/jdk/src/java.base/share/classes/java/util/AbstractSet.java +++ b/jdk/src/java.base/share/classes/java/util/AbstractSet.java @@ -42,7 +42,7 @@ package java.util; * for {@code equals} and {@code hashCode}.

          * * This class is a member of the - * + * * Java Collections Framework. * * @param the type of elements maintained by this set diff --git a/jdk/src/java.base/share/classes/java/util/ArrayDeque.java b/jdk/src/java.base/share/classes/java/util/ArrayDeque.java index de78bdc9e9a..53cdeffa846 100644 --- a/jdk/src/java.base/share/classes/java/util/ArrayDeque.java +++ b/jdk/src/java.base/share/classes/java/util/ArrayDeque.java @@ -79,7 +79,7 @@ import java.util.function.UnaryOperator; * Iterator} interfaces. * *

          This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch and Doug Lea diff --git a/jdk/src/java.base/share/classes/java/util/ArrayList.java b/jdk/src/java.base/share/classes/java/util/ArrayList.java index dbaa725dacb..f63ef493dc0 100644 --- a/jdk/src/java.base/share/classes/java/util/ArrayList.java +++ b/jdk/src/java.base/share/classes/java/util/ArrayList.java @@ -91,7 +91,7 @@ import java.util.function.UnaryOperator; * should be used only to detect bugs. * *

          This class is a member of the - * + * * Java Collections Framework. * * @param the type of elements in this list diff --git a/jdk/src/java.base/share/classes/java/util/Arrays.java b/jdk/src/java.base/share/classes/java/util/Arrays.java index 6d7e858fbed..e1571cc613f 100644 --- a/jdk/src/java.base/share/classes/java/util/Arrays.java +++ b/jdk/src/java.base/share/classes/java/util/Arrays.java @@ -62,7 +62,7 @@ import java.util.stream.StreamSupport; * a MergeSort, but it does have to be stable.) * *

          This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch @@ -8899,4 +8899,4 @@ public class Arrays { return aLength != bLength ? length : -1; } -} \ No newline at end of file +} diff --git a/jdk/src/java.base/share/classes/java/util/Base64.java b/jdk/src/java.base/share/classes/java/util/Base64.java index 99f5dc0d993..43e3d0690cd 100644 --- a/jdk/src/java.base/share/classes/java/util/Base64.java +++ b/jdk/src/java.base/share/classes/java/util/Base64.java @@ -41,21 +41,21 @@ import java.nio.charset.StandardCharsets; * RFC 2045. * *

            - *
          • Basic + *
          • Basic *

            Uses "The Base64 Alphabet" as specified in Table 1 of * RFC 4648 and RFC 2045 for encoding and decoding operation. * The encoder does not add any line feed (line separator) * character. The decoder rejects data that contains characters * outside the base64 alphabet.

          • * - *
          • URL and Filename safe + *
          • URL and Filename safe *

            Uses the "URL and Filename safe Base64 Alphabet" as specified * in Table 2 of RFC 4648 for encoding and decoding. The * encoder does not add any line feed (line separator) character. * The decoder rejects data that contains characters outside the * base64 alphabet.

          • * - *
          • MIME + *
          • MIME *

            Uses the "The Base64 Alphabet" as specified in Table 1 of * RFC 2045 for encoding and decoding operation. The encoded output * must be represented in lines of no more than 76 characters each diff --git a/jdk/src/java.base/share/classes/java/util/BitSet.java b/jdk/src/java.base/share/classes/java/util/BitSet.java index f453965f672..c9dafaed3e8 100644 --- a/jdk/src/java.base/share/classes/java/util/BitSet.java +++ b/jdk/src/java.base/share/classes/java/util/BitSet.java @@ -1212,7 +1212,7 @@ public class BitSet implements Cloneable, java.io.Serializable { * *

            The stream binds to this bit set when the terminal stream operation * commences (specifically, the spliterator for the stream is - * late-binding). If the + * late-binding). If the * bit set is modified during that operation then the result is undefined. * * @return a stream of integers representing set indices diff --git a/jdk/src/java.base/share/classes/java/util/Calendar.java b/jdk/src/java.base/share/classes/java/util/Calendar.java index 7665d84f3ce..83435a90e9e 100644 --- a/jdk/src/java.base/share/classes/java/util/Calendar.java +++ b/jdk/src/java.base/share/classes/java/util/Calendar.java @@ -67,7 +67,7 @@ import sun.util.spi.CalendarProvider; * DAY_OF_MONTH, HOUR, and so on, and for * manipulating the calendar fields, such as getting the date of the next * week. An instant in time can be represented by a millisecond value that is - * an offset from the Epoch, January 1, 1970 + * an offset from the Epoch, January 1, 1970 * 00:00:00.000 GMT (Gregorian). * *

            The class also provides additional fields and methods for @@ -124,7 +124,7 @@ import sun.util.spi.CalendarProvider; * calculating its time or calendar field values if any out-of-range field * value has been set. * - *

            First Week

            + *

            First Week

            * * Calendar defines a locale-specific seven day week using two * parameters: the first day of the week and the minimal days in first week @@ -154,13 +154,13 @@ import sun.util.spi.CalendarProvider; * calendar field values to determine the date and time in the * following way. * - *

            If there is any conflict in calendar field values, + *

            If there is any conflict in calendar field values, * Calendar gives priorities to calendar fields that have been set * more recently. The following are the default combinations of the * calendar fields. The most recent combination, as determined by the * most recently set single field, will be used. * - *

            For the date fields: + *

            For the date fields: *

            *
              * YEAR + MONTH + DAY_OF_MONTH
            @@ -170,7 +170,7 @@ import sun.util.spi.CalendarProvider;
              * YEAR + DAY_OF_WEEK + WEEK_OF_YEAR
              * 
            * - * For the time of day fields: + * For the time of day fields: *
            *
              * HOUR_OF_DAY
            diff --git a/jdk/src/java.base/share/classes/java/util/Collection.java b/jdk/src/java.base/share/classes/java/util/Collection.java
            index f92b9f6153f..bc18f3725a1 100644
            --- a/jdk/src/java.base/share/classes/java/util/Collection.java
            +++ b/jdk/src/java.base/share/classes/java/util/Collection.java
            @@ -64,7 +64,7 @@ import java.util.stream.StreamSupport;
              * but is not required to, throw the exception if the collection to be added
              * is empty.
              *
            - * 

            + *

            * Some collection implementations have restrictions on the elements that * they may contain. For example, some implementations prohibit null elements, * and some have restrictions on the types of their elements. Attempting to @@ -112,7 +112,7 @@ import java.util.stream.StreamSupport; * however most current implementations do not do so. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @implSpec diff --git a/jdk/src/java.base/share/classes/java/util/Collections.java b/jdk/src/java.base/share/classes/java/util/Collections.java index 22b4557ae2f..8aa9c53c455 100644 --- a/jdk/src/java.base/share/classes/java/util/Collections.java +++ b/jdk/src/java.base/share/classes/java/util/Collections.java @@ -65,7 +65,7 @@ import java.util.stream.StreamSupport; * already sorted may or may not throw {@code UnsupportedOperationException}. * *

            This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch diff --git a/jdk/src/java.base/share/classes/java/util/Comparator.java b/jdk/src/java.base/share/classes/java/util/Comparator.java index ade582dbd3b..1e95e6279bb 100644 --- a/jdk/src/java.base/share/classes/java/util/Comparator.java +++ b/jdk/src/java.base/share/classes/java/util/Comparator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -94,7 +94,7 @@ import java.util.Comparators; * an equivalence relation. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @param the type of objects that may be compared by this comparator @@ -112,12 +112,6 @@ public interface Comparator { * zero, or a positive integer as the first argument is less than, equal * to, or greater than the second.

            * - * In the foregoing description, the notation - * {@code sgn(}expression{@code )} designates the mathematical - * signum function, which is defined to return one of {@code -1}, - * {@code 0}, or {@code 1} according to whether the value of - * expression is negative, zero or positive.

            - * * The implementor must ensure that {@code sgn(compare(x, y)) == * -sgn(compare(y, x))} for all {@code x} and {@code y}. (This * implies that {@code compare(x, y)} must throw an exception if and only @@ -135,7 +129,13 @@ public interface Comparator { * {@code (compare(x, y)==0) == (x.equals(y))}. Generally speaking, * any comparator that violates this condition should clearly indicate * this fact. The recommended language is "Note: this comparator - * imposes orderings that are inconsistent with equals." + * imposes orderings that are inconsistent with equals."

            + * + * In the foregoing description, the notation + * {@code sgn(}expression{@code )} designates the mathematical + * signum function, which is defined to return one of {@code -1}, + * {@code 0}, or {@code 1} according to whether the value of + * expression is negative, zero, or positive, respectively. * * @param o1 the first object to be compared. * @param o2 the second object to be compared. diff --git a/jdk/src/java.base/share/classes/java/util/Date.java b/jdk/src/java.base/share/classes/java/util/Date.java index 312a74b6033..8b6a6349082 100644 --- a/jdk/src/java.base/share/classes/java/util/Date.java +++ b/jdk/src/java.base/share/classes/java/util/Date.java @@ -728,7 +728,6 @@ public class Date * @see java.util.Calendar * @deprecated As of JDK version 1.1, * replaced by {@code Calendar.get(Calendar.DAY_OF_MONTH)}. - * @deprecated */ @Deprecated public int getDate() { diff --git a/jdk/src/java.base/share/classes/java/util/Deque.java b/jdk/src/java.base/share/classes/java/util/Deque.java index 2714373fe63..be461bdca58 100644 --- a/jdk/src/java.base/share/classes/java/util/Deque.java +++ b/jdk/src/java.base/share/classes/java/util/Deque.java @@ -56,40 +56,40 @@ package java.util; *

            The twelve methods described above are summarized in the * following table: * - * + *
            * * * - * - * + * + * * * * - * - * - * - * + * + * + * + * * * * - * - * - * - * + * + * + * + * * * * - * - * - * - * + * + * + * + * * * * - * - * - * - * + * + * + * + * * *
            Summary of Deque methods
            First Element (Head) Last Element (Tail) First Element (Head) Last Element (Tail)
            Throws exceptionSpecial valueThrows exceptionSpecial valueThrows exceptionSpecial valueThrows exceptionSpecial value
            Insert{@link Deque#addFirst addFirst(e)}{@link Deque#offerFirst offerFirst(e)}{@link Deque#addLast addLast(e)}{@link Deque#offerLast offerLast(e)}{@link #addFirst(Object) addFirst(e)}{@link #offerFirst(Object) offerFirst(e)}{@link #addLast(Object) addLast(e)}{@link #offerLast(Object) offerLast(e)}
            Remove{@link Deque#removeFirst removeFirst()}{@link Deque#pollFirst pollFirst()}{@link Deque#removeLast removeLast()}{@link Deque#pollLast pollLast()}{@link #removeFirst() removeFirst()}{@link #pollFirst() pollFirst()}{@link #removeLast() removeLast()}{@link #pollLast() pollLast()}
            Examine{@link Deque#getFirst getFirst()}{@link Deque#peekFirst peekFirst()}{@link Deque#getLast getLast()}{@link Deque#peekLast peekLast()}{@link #getFirst() getFirst()}{@link #peekFirst() peekFirst()}{@link #getLast() getLast()}{@link #peekLast() peekLast()}
            * @@ -99,35 +99,35 @@ package java.util; * inherited from the {@code Queue} interface are precisely equivalent to * {@code Deque} methods as indicated in the following table: * - * + *
            * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * *
            Comparison of Queue and Deque methods
            {@code Queue} Method Equivalent {@code Deque} Method {@code Queue} Method Equivalent {@code Deque} Method
            {@link java.util.Queue#add add(e)}{@link #addLast addLast(e)}{@link #add(Object) add(e)}{@link #addLast(Object) addLast(e)}
            {@link java.util.Queue#offer offer(e)}{@link #offerLast offerLast(e)}{@link #offer(Object) offer(e)}{@link #offerLast(Object) offerLast(e)}
            {@link java.util.Queue#remove remove()}{@link #removeFirst removeFirst()}{@link #remove() remove()}{@link #removeFirst() removeFirst()}
            {@link java.util.Queue#poll poll()}{@link #pollFirst pollFirst()}{@link #poll() poll()}{@link #pollFirst() pollFirst()}
            {@link java.util.Queue#element element()}{@link #getFirst getFirst()}{@link #element() element()}{@link #getFirst() getFirst()}
            {@link java.util.Queue#peek peek()}{@link #peek peekFirst()}{@link #peek() peek()}{@link #peekFirst() peekFirst()}
            * @@ -137,23 +137,23 @@ package java.util; * beginning of the deque. Stack methods are precisely equivalent to * {@code Deque} methods as indicated in the table below: * - * + *
            * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * *
            Comparison of Stack and Deque methods
            Stack Method Equivalent {@code Deque} Method Stack Method Equivalent {@code Deque} Method
            {@link #push push(e)}{@link #addFirst addFirst(e)}{@link #push(Object) push(e)}{@link #addFirst(Object) addFirst(e)}
            {@link #pop pop()}{@link #removeFirst removeFirst()}{@link #pop() pop()}{@link #removeFirst() removeFirst()}
            {@link #peek peek()}{@link #peekFirst peekFirst()}{@link #peek() peek()}{@link #peekFirst() peekFirst()}
            * @@ -181,9 +181,9 @@ package java.util; * methods, but instead inherit the identity-based versions from class * {@code Object}. * - *

            This interface is a member of the Java Collections - * Framework. + *

            This interface is a member of the + * + * Java Collections Framework. * * @author Doug Lea * @author Josh Bloch @@ -430,8 +430,8 @@ public interface Deque extends Queue { /** * Retrieves and removes the head of the queue represented by this deque * (in other words, the first element of this deque). - * This method differs from {@link #poll poll} only in that it throws an - * exception if this deque is empty. + * This method differs from {@link #poll() poll()} only in that it + * throws an exception if this deque is empty. * *

            This method is equivalent to {@link #removeFirst()}. * @@ -477,6 +477,31 @@ public interface Deque extends Queue { */ E peek(); + /** + * Adds all of the elements in the specified collection at the end + * of this deque, as if by calling {@link #addLast} on each one, + * in the order that they are returned by the collection's iterator. + * + *

            When using a capacity-restricted deque, it is generally preferable + * to call {@link #offer(Object) offer} separately on each element. + * + *

            An exception encountered while trying to add an element may result + * in only some of the elements having been successfully added when + * the associated exception is thrown. + * + * @param c the elements to be inserted into this deque + * @return {@code true} if this deque changed as a result of the call + * @throws IllegalStateException if not all the elements can be added at + * this time due to insertion restrictions + * @throws ClassCastException if the class of an element of the specified + * collection prevents it from being added to this deque + * @throws NullPointerException if the specified collection contains a + * null element and this deque does not permit null elements, + * or if the specified collection is null + * @throws IllegalArgumentException if some property of an element of the + * specified collection prevents it from being added to this deque + */ + boolean addAll(Collection c); // *** Stack methods *** diff --git a/jdk/src/java.base/share/classes/java/util/EnumMap.java b/jdk/src/java.base/share/classes/java/util/EnumMap.java index e6d63cf4ae8..3eff9a6fd3a 100644 --- a/jdk/src/java.base/share/classes/java/util/EnumMap.java +++ b/jdk/src/java.base/share/classes/java/util/EnumMap.java @@ -68,7 +68,7 @@ import jdk.internal.misc.SharedSecrets; * {@link HashMap} counterparts. * *

            This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch diff --git a/jdk/src/java.base/share/classes/java/util/EnumSet.java b/jdk/src/java.base/share/classes/java/util/EnumSet.java index 0ca61870976..0adeab410b0 100644 --- a/jdk/src/java.base/share/classes/java/util/EnumSet.java +++ b/jdk/src/java.base/share/classes/java/util/EnumSet.java @@ -69,7 +69,7 @@ import jdk.internal.misc.SharedSecrets; * constant time if their argument is also an enum set. * *

            This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch diff --git a/jdk/src/java.base/share/classes/java/util/Formatter.java b/jdk/src/java.base/share/classes/java/util/Formatter.java index 1871896bca9..39c23af20ff 100644 --- a/jdk/src/java.base/share/classes/java/util/Formatter.java +++ b/jdk/src/java.base/share/classes/java/util/Formatter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -137,7 +137,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * // -> s == "Duke's Birthday: May 23, 1995" *

            * - *

            Organization

            + *

            Organization

            * *

            This specification is divided into two sections. The first section, Summary, covers the basic formatting concepts. This @@ -147,13 +147,13 @@ import jdk.internal.math.FormattedFloatingDecimal; * details. It is intended for users who want more precise specification of * formatting behavior. * - *

            Summary

            + *

            Summary

            * *

            This section is intended to provide a brief overview of formatting * concepts. For precise behavioral details, refer to the Details section. * - *

            Format String Syntax

            + *

            Format String Syntax

            * *

            Every method which produces formatted output requires a format * string and an argument list. The format string is a {@link @@ -290,87 +290,90 @@ import jdk.internal.math.FormattedFloatingDecimal; *

              *    out.toUpperCase(Locale.getDefault(Locale.Category.FORMAT)) 
            * - * - * - *
            Conversion - * Argument Category - * Description - * - *
            {@code 'b'}, {@code 'B'} - * general + * + * + * + * + * + * *
            genConv
            Conversion + * Argument Category + * Description + *
            {@code 'b'}, {@code 'B'} + * general * If the argument arg is {@code null}, then the result is * "{@code false}". If arg is a {@code boolean} or {@link * Boolean}, then the result is the string returned by {@link * String#valueOf(boolean) String.valueOf(arg)}. Otherwise, the result is * "true". * - *
            {@code 'h'}, {@code 'H'} - * general + *
            {@code 'h'}, {@code 'H'} + * general * The result is obtained by invoking * {@code Integer.toHexString(arg.hashCode())}. * - *
            {@code 's'}, {@code 'S'} - * general + *
            {@code 's'}, {@code 'S'} + * general * If arg implements {@link Formattable}, then * {@link Formattable#formatTo arg.formatTo} is invoked. Otherwise, the * result is obtained by invoking {@code arg.toString()}. * - *
            {@code 'c'}, {@code 'C'} - * character + *
            {@code 'c'}, {@code 'C'} + * character * The result is a Unicode character * - *
            {@code 'd'} - * integral + *
            {@code 'd'} + * integral * The result is formatted as a decimal integer * - *
            {@code 'o'} - * integral + *
            {@code 'o'} + * integral * The result is formatted as an octal integer * - *
            {@code 'x'}, {@code 'X'} - * integral + *
            {@code 'x'}, {@code 'X'} + * integral * The result is formatted as a hexadecimal integer * - *
            {@code 'e'}, {@code 'E'} - * floating point + *
            {@code 'e'}, {@code 'E'} + * floating point * The result is formatted as a decimal number in computerized * scientific notation * - *
            {@code 'f'} - * floating point + *
            {@code 'f'} + * floating point * The result is formatted as a decimal number * - *
            {@code 'g'}, {@code 'G'} - * floating point + *
            {@code 'g'}, {@code 'G'} + * floating point * The result is formatted using computerized scientific notation or * decimal format, depending on the precision and the value after rounding. * - *
            {@code 'a'}, {@code 'A'} - * floating point + *
            {@code 'a'}, {@code 'A'} + * floating point * The result is formatted as a hexadecimal floating-point number with * a significand and an exponent. This conversion is not supported * for the {@code BigDecimal} type despite the latter's being in the * floating point argument category. * - *
            {@code 't'}, {@code 'T'} - * date/time + *
            {@code 't'}, {@code 'T'} + * date/time * Prefix for date and time conversion characters. See Date/Time Conversions. * - *
            {@code '%'} - * percent + *
            {@code '%'} + * percent * The result is a literal {@code '%'} ('\u0025') * - *
            {@code 'n'} - * line separator + *
            {@code 'n'} + * line separator * The result is the platform-specific line separator * + *
            * *

            Any characters not explicitly defined as conversions are illegal and are * reserved for future extensions. * - *

            Date/Time Conversions

            + *

            Date/Time Conversions

            * *

            The following date and time conversion suffix characters are defined for * the {@code 't'} and {@code 'T'} conversions. The types are similar to but @@ -381,46 +384,47 @@ import jdk.internal.math.FormattedFloatingDecimal; * *

            The following conversion characters are used for formatting times: * - * - * - *
            {@code 'H'} + * + * + * + * *
            time
            {@code 'H'} * Hour of the day for the 24-hour clock, formatted as two digits with * a leading zero as necessary i.e. {@code 00 - 23}. * - *
            {@code 'I'} + *
            {@code 'I'} * Hour for the 12-hour clock, formatted as two digits with a leading * zero as necessary, i.e. {@code 01 - 12}. * - *
            {@code 'k'} + *
            {@code 'k'} * Hour of the day for the 24-hour clock, i.e. {@code 0 - 23}. * - *
            {@code 'l'} + *
            {@code 'l'} * Hour for the 12-hour clock, i.e. {@code 1 - 12}. * - *
            {@code 'M'} + *
            {@code 'M'} * Minute within the hour formatted as two digits with a leading zero * as necessary, i.e. {@code 00 - 59}. * - *
            {@code 'S'} + *
            {@code 'S'} * Seconds within the minute, formatted as two digits with a leading * zero as necessary, i.e. {@code 00 - 60} ("{@code 60}" is a special * value required to support leap seconds). * - *
            {@code 'L'} + *
            {@code 'L'} * Millisecond within the second formatted as three digits with * leading zeros as necessary, i.e. {@code 000 - 999}. * - *
            {@code 'N'} + *
            {@code 'N'} * Nanosecond within the second, formatted as nine digits with leading * zeros as necessary, i.e. {@code 000000000 - 999999999}. * - *
            {@code 'p'} + *
            {@code 'p'} * Locale-specific {@linkplain * java.text.DateFormatSymbols#getAmPmStrings morning or afternoon} marker * in lower case, e.g."{@code am}" or "{@code pm}". Use of the conversion * prefix {@code 'T'} forces this output to upper case. * - *
            {@code 'z'} + *
            {@code 'z'} * RFC 822 * style numeric time zone offset from GMT, e.g. {@code -0800}. This * value will be adjusted as necessary for Daylight Saving Time. For @@ -428,7 +432,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * the {@linkplain TimeZone#getDefault() default time zone} for this * instance of the Java virtual machine. * - *
            {@code 'Z'} + *
            {@code 'Z'} * A string representing the abbreviation for the time zone. This * value will be adjusted as necessary for Daylight Saving Time. For * {@code long}, {@link Long}, and {@link Date} the time zone used is @@ -436,101 +440,108 @@ import jdk.internal.math.FormattedFloatingDecimal; * instance of the Java virtual machine. The Formatter's locale will * supersede the locale of the argument (if any). * - *
            {@code 's'} + *
            {@code 's'} * Seconds since the beginning of the epoch starting at 1 January 1970 * {@code 00:00:00} UTC, i.e. {@code Long.MIN_VALUE/1000} to * {@code Long.MAX_VALUE/1000}. * - *
            {@code 'Q'} + *
            {@code 'Q'} * Milliseconds since the beginning of the epoch starting at 1 January * 1970 {@code 00:00:00} UTC, i.e. {@code Long.MIN_VALUE} to * {@code Long.MAX_VALUE}. * + *
            * *

            The following conversion characters are used for formatting dates: * - * + *
            + * + * * - * *
            date
            {@code 'B'} + *
            {@code 'B'} * Locale-specific {@linkplain java.text.DateFormatSymbols#getMonths * full month name}, e.g. {@code "January"}, {@code "February"}. * - *
            {@code 'b'} + *
            {@code 'b'} * Locale-specific {@linkplain * java.text.DateFormatSymbols#getShortMonths abbreviated month name}, * e.g. {@code "Jan"}, {@code "Feb"}. * - *
            {@code 'h'} + *
            {@code 'h'} * Same as {@code 'b'}. * - *
            {@code 'A'} + *
            {@code 'A'} * Locale-specific full name of the {@linkplain * java.text.DateFormatSymbols#getWeekdays day of the week}, * e.g. {@code "Sunday"}, {@code "Monday"} * - *
            {@code 'a'} + *
            {@code 'a'} * Locale-specific short name of the {@linkplain * java.text.DateFormatSymbols#getShortWeekdays day of the week}, * e.g. {@code "Sun"}, {@code "Mon"} * - *
            {@code 'C'} + *
            {@code 'C'} * Four-digit year divided by {@code 100}, formatted as two digits * with leading zero as necessary, i.e. {@code 00 - 99} * - *
            {@code 'Y'} + *
            {@code 'Y'} * Year, formatted as at least four digits with leading zeros as * necessary, e.g. {@code 0092} equals {@code 92} CE for the Gregorian * calendar. * - *
            {@code 'y'} + *
            {@code 'y'} * Last two digits of the year, formatted with leading zeros as * necessary, i.e. {@code 00 - 99}. * - *
            {@code 'j'} + *
            {@code 'j'} * Day of year, formatted as three digits with leading zeros as * necessary, e.g. {@code 001 - 366} for the Gregorian calendar. * - *
            {@code 'm'} + *
            {@code 'm'} * Month, formatted as two digits with leading zeros as necessary, * i.e. {@code 01 - 13}. * - *
            {@code 'd'} + *
            {@code 'd'} * Day of month, formatted as two digits with leading zeros as * necessary, i.e. {@code 01 - 31} * - *
            {@code 'e'} + *
            {@code 'e'} * Day of month, formatted as two digits, i.e. {@code 1 - 31}. * + *
            * *

            The following conversion characters are used for formatting common * date/time compositions. * - * + *
            + * + * * - * *
            composites
            {@code 'R'} + *
            {@code 'R'} * Time formatted for the 24-hour clock as {@code "%tH:%tM"} * - *
            {@code 'T'} + *
            {@code 'T'} * Time formatted for the 24-hour clock as {@code "%tH:%tM:%tS"}. * - *
            {@code 'r'} + *
            {@code 'r'} * Time formatted for the 12-hour clock as {@code "%tI:%tM:%tS %Tp"}. * The location of the morning or afternoon marker ({@code '%Tp'}) may be * locale-dependent. * - *
            {@code 'D'} + *
            {@code 'D'} * Date formatted as {@code "%tm/%td/%ty"}. * - *
            {@code 'F'} + *
            {@code 'F'} * ISO 8601 * complete date formatted as {@code "%tY-%tm-%td"}. * - *
            {@code 'c'} + *
            {@code 'c'} * Date and time formatted as {@code "%ta %tb %td %tT %tZ %tY"}, * e.g. {@code "Sun Jul 20 16:17:00 EDT 1969"}. * + *
            * *

            Any characters not explicitly defined as date/time conversion suffixes @@ -541,64 +552,67 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            The following table summarizes the supported flags. y means the * flag is supported for the indicated argument types. * - * - * - * + *
            Flag General - * Character Integral - * Floating Point - * Date/Time - * Description - * - *
            '-' y - * y - * y - * y - * y + * + * + * + * + * + * *
            genConv
            Flag General + * Character Integral + * Floating Point + * Date/Time + * Description + *
            '-' y + * y + * y + * y + * y * The result will be left-justified. * - *
            '#' y1 - * - - * y3 - * y - * - + *
            '#' y1 + * - + * y3 + * y + * - * The result should use a conversion-dependent alternate form * - *
            '+' - - * - - * y4 - * y - * - + *
            '+' - + * - + * y4 + * y + * - * The result will always include a sign * - *
            '  ' - - * - - * y4 - * y - * - + *
            '  ' - + * - + * y4 + * y + * - * The result will include a leading space for positive values * - *
            '0' - - * - - * y - * y - * - + *
            '0' - + * - + * y + * y + * - * The result will be zero-padded * - *
            ',' - - * - - * y2 - * y5 - * - + *
            ',' - + * - + * y2 + * y5 + * - * The result will include locale-specific {@linkplain * java.text.DecimalFormatSymbols#getGroupingSeparator grouping separators} * - *
            '(' - - * - - * y4 - * y5 - * - + *
            '(' - + * - + * y4 + * y5 + * - * The result will enclose negative numbers in parentheses * + *
            * *

            1 Depends on the definition of {@link Formattable}. @@ -659,7 +673,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * * *


            - *

            Details

            + *

            Details

            * *

            This section is intended to provide behavioral details for formatting, * including conditions and exceptions, supported data types, localization, and @@ -701,14 +715,16 @@ import jdk.internal.math.FormattedFloatingDecimal; *

              *    out.toUpperCase(Locale.getDefault(Locale.Category.FORMAT)) 
            * - *

            General

            + *

            General

            * *

            The following general conversions may be applied to any argument type: * - * + *
            + * + * * - * *
            dgConv
            {@code 'b'} - * '\u0062' + *
            {@code 'b'} + * '\u0062' * Produces either "{@code true}" or "{@code false}" as returned by * {@link Boolean#toString(boolean)}. * @@ -721,12 +737,12 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code '#'} flag is given, then a {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'B'} - * '\u0042' + *
            {@code 'B'} + * '\u0042' * The upper-case variant of {@code 'b'}. * - *
            {@code 'h'} - * '\u0068' + *
            {@code 'h'} + * '\u0068' * Produces a string representing the hash code value of the object. * *

            The result is obtained by invoking @@ -735,12 +751,12 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code '#'} flag is given, then a {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'H'} - * '\u0048' + *
            {@code 'H'} + * '\u0048' * The upper-case variant of {@code 'h'}. * - *
            {@code 's'} - * '\u0073' + *
            {@code 's'} + * '\u0073' * Produces a string. * *

            If the argument implements {@link Formattable}, then @@ -752,32 +768,36 @@ import jdk.internal.math.FormattedFloatingDecimal; * Formattable} , then a {@link FormatFlagsConversionMismatchException} * will be thrown. * - *

            {@code 'S'} - * '\u0053' + *
            {@code 'S'} + * '\u0053' * The upper-case variant of {@code 's'}. * + *
            * - *

            The following flags apply to general conversions: + *

            The following flags apply to general conversions: * - * + *
            + * + * * - * *
            dFlags
            {@code '-'} - * '\u002d' + *
            {@code '-'} + * '\u002d' * Left justifies the output. Spaces ('\u0020') will be * added at the end of the converted value as required to fill the minimum * width of the field. If the width is not provided, then a {@link * MissingFormatWidthException} will be thrown. If this flag is not given * then the output will be right-justified. * - *
            {@code '#'} - * '\u0023' + *
            {@code '#'} + * '\u0023' * Requires the output use an alternate form. The definition of the * form is specified by the conversion. * + *
            * - *

            The width is the minimum number of characters to + *

            The width is the minimum number of characters to * be written to the * output. If the length of the converted value is less than the width then * the output will be padded by '  ' ('\u0020') @@ -792,7 +812,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * the precision. If the precision is not specified then there is no explicit * limit on the number of characters. * - *

            Character

            + *

            Character

            * * This conversion may be applied to {@code char} and {@link Character}. It * may also be applied to the types {@code byte}, {@link Byte}, @@ -801,10 +821,12 @@ import jdk.internal.math.FormattedFloatingDecimal; * {@code false} then an {@link IllegalFormatCodePointException} will be * thrown. * - * + *
            + * + * * - * *
            charConv
            {@code 'c'} - * '\u0063' + *
            {@code 'c'} + * '\u0063' * Formats the argument as a Unicode character as described in Unicode Character * Representation. This may be more than one 16-bit {@code char} in @@ -813,10 +835,11 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code '#'} flag is given, then a {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'C'} - * '\u0043' + *
            {@code 'C'} + * '\u0043' * The upper-case variant of {@code 'c'}. * + *
            * *

            The {@code '-'} flag defined for General @@ -828,7 +851,7 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            The precision is not applicable. If the precision is specified then an * {@link IllegalFormatPrecisionException} will be thrown. * - *

            Numeric

            + *

            Numeric

            * *

            Numeric conversions are divided into the following categories: * @@ -846,7 +869,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * *

            Numeric types will be formatted according to the following algorithm: * - *

            Number Localization Algorithm + *

            Number Localization Algorithm * *

            After digits are obtained for the integer part, fractional part, and * exponent (as appropriate for the data type), the following transformation @@ -865,7 +888,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * substituted. * *

          • If the {@code ','} ('\u002c') - * flag is given, then the locale-specific {@linkplain + * flag is given, then the locale-specific {@linkplain * java.text.DecimalFormatSymbols#getGroupingSeparator grouping separator} is * inserted by scanning the integer part of the string from least significant * to most significant digits and inserting a separator at intervals defined by @@ -896,16 +919,18 @@ import jdk.internal.math.FormattedFloatingDecimal; * then the output will be "(Infinity)" if the {@code '('} flag is given * otherwise the output will be "-Infinity". These values are not localized. * - *

            Byte, Short, Integer, and Long + *

            Byte, Short, Integer, and Long * *

            The following conversions may be applied to {@code byte}, {@link Byte}, * {@code short}, {@link Short}, {@code int} and {@link Integer}, * {@code long}, and {@link Long}. * - * + *
            + * + * * - * *
            IntConv
            {@code 'd'} - * '\u0064' + *
            {@code 'd'} + * '\u0064' * Formats the argument as a decimal integer. The localization algorithm is applied. * @@ -915,8 +940,8 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code '#'} flag is given then a {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'o'} - * '\u006f' + *
            {@code 'o'} + * '\u006f' * Formats the argument as an integer in base eight. No localization * is applied. * @@ -937,8 +962,8 @@ import jdk.internal.math.FormattedFloatingDecimal; * are given then a {@link FormatFlagsConversionMismatchException} will be * thrown. * - *
            {@code 'x'} - * '\u0078' + *
            {@code 'x'} + * '\u0078' * Formats the argument as an integer in base sixteen. No * localization is applied. * @@ -960,14 +985,15 @@ import jdk.internal.math.FormattedFloatingDecimal; * {@code ','} flags are given then a {@link * FormatFlagsConversionMismatchException} will be thrown. * - *
            {@code 'X'} - * '\u0058' + *
            {@code 'X'} + * '\u0058' * The upper-case variant of {@code 'x'}. The entire string * representing the number will be converted to {@linkplain * String#toUpperCase upper case} including the {@code 'x'} (if any) and * all hexadecimal digits {@code 'a'} - {@code 'f'} * ('\u0061' - '\u0066'). * + *
            * *

            If the conversion is {@code 'o'}, {@code 'x'}, or {@code 'X'} and @@ -979,13 +1005,15 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code '-'} flag is not given, then the space padding will occur * before the sign. * - *

            The following flags apply to numeric integral + *

            The following flags apply to numeric integral * conversions: * - * + *
            + * + * * - * *
            intFlags
            {@code '+'} - * '\u002b' + *
            {@code '+'} + * '\u002b' * Requires the output to include a positive sign for all positive * numbers. If this flag is not given then only negative values will * include a sign. @@ -993,16 +1021,16 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If both the {@code '+'} and '  ' flags are given * then an {@link IllegalFormatFlagsException} will be thrown. * - *

            '  ' - * '\u0020' + *
            '  ' + * '\u0020' * Requires the output to include a single extra space * ('\u0020') for non-negative values. * *

            If both the {@code '+'} and '  ' flags are given * then an {@link IllegalFormatFlagsException} will be thrown. * - *

            {@code '0'} - * '\u0030' + *
            {@code '0'} + * '\u0030' * Requires the output to be padded with leading {@linkplain * java.text.DecimalFormatSymbols#getZeroDigit zeros} to the minimum field * width following any sign or radix indicator except when converting NaN @@ -1012,22 +1040,23 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If both the {@code '-'} and {@code '0'} flags are given then an * {@link IllegalFormatFlagsException} will be thrown. * - *

            {@code ','} - * '\u002c' + *
            {@code ','} + * '\u002c' * Requires the output to include the locale-specific {@linkplain * java.text.DecimalFormatSymbols#getGroupingSeparator group separators} as * described in the "group" section of the * localization algorithm. * - *
            {@code '('} - * '\u0028' + *
            {@code '('} + * '\u0028' * Requires the output to prepend a {@code '('} * ('\u0028') and append a {@code ')'} * ('\u0029') to negative values. * + *
            * - *

            If no flags are given the default formatting is + *

            If no flags are given the default formatting is * as follows: * *

              @@ -1043,7 +1072,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * *
            * - *

            The width is the minimum number of characters to + *

            The width is the minimum number of characters to * be written to the output. This includes any signs, digits, grouping * separators, radix indicator, and parentheses. If the length of the * converted value is less than the width then the output will be padded by @@ -1055,23 +1084,25 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            The precision is not applicable. If precision is specified then an * {@link IllegalFormatPrecisionException} will be thrown. * - *

            BigInteger + *

            BigInteger * *

            The following conversions may be applied to {@link * java.math.BigInteger}. * - * + *
            + * + * * - * *
            bIntConv
            {@code 'd'} - * '\u0064' + *
            {@code 'd'} + * '\u0064' * Requires the output to be formatted as a decimal integer. The localization algorithm is applied. * *

            If the {@code '#'} flag is given {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'o'} - * '\u006f' + *
            {@code 'o'} + * '\u006f' * Requires the output to be formatted as an integer in base eight. * No localization is applied. * @@ -1093,8 +1124,8 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code ','} flag is given then a {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'x'} - * '\u0078' + *
            {@code 'x'} + * '\u0078' * Requires the output to be formatted as an integer in base * sixteen. No localization is applied. * @@ -1117,14 +1148,15 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code ','} flag is given then a {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'X'} - * '\u0058' + *
            {@code 'X'} + * '\u0058' * The upper-case variant of {@code 'x'}. The entire string * representing the number will be converted to {@linkplain * String#toUpperCase upper case} including the {@code 'x'} (if any) and * all hexadecimal digits {@code 'a'} - {@code 'f'} * ('\u0061' - '\u0066'). * + *
            * *

            If the conversion is {@code 'o'}, {@code 'x'}, or {@code 'X'} and @@ -1149,17 +1181,19 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            The precision is not applicable. If precision is specified then an * {@link IllegalFormatPrecisionException} will be thrown. * - *

            Float and Double + *

            Float and Double * *

            The following conversions may be applied to {@code float}, {@link * Float}, {@code double} and {@link Double}. * - * + *
            + * + * * - * *
            floatConv
            {@code 'e'} - * '\u0065' + *
            {@code 'e'} + * '\u0065' * Requires the output to be formatted using computerized scientific notation. The computerized scientific notation. The localization algorithm is applied. * *

            The formatting of the magnitude m depends upon its value. @@ -1204,13 +1238,13 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code ','} flag is given, then an {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'E'} - * '\u0045' + *
            {@code 'E'} + * '\u0045' * The upper-case variant of {@code 'e'}. The exponent symbol * will be {@code 'E'} ('\u0045'). * - *
            {@code 'g'} - * '\u0067' + *
            {@code 'g'} + * '\u0067' * Requires the output to be formatted in general scientific notation * as described below. The localization * algorithm is applied. @@ -1234,13 +1268,13 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code '#'} flag is given then an {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'G'} - * '\u0047' + *
            {@code 'G'} + * '\u0047' * The upper-case variant of {@code 'g'}. * - *
            {@code 'f'} - * '\u0066' - * Requires the output to be formatted using decimal + *
            {@code 'f'} + * '\u0066' + * Requires the output to be formatted using decimal * format. The localization algorithm is * applied. * @@ -1270,8 +1304,8 @@ import jdk.internal.math.FormattedFloatingDecimal; * Float#toString(float)} or {@link Double#toString(double)} as * appropriate. * - *
            {@code 'a'} - * '\u0061' + *
            {@code 'a'} + * '\u0061' * Requires the output to be formatted in hexadecimal exponential * form. No localization is applied. * @@ -1323,14 +1357,15 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code '('} or {@code ','} flags are given, then a {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'A'} - * '\u0041' + *
            {@code 'A'} + * '\u0041' * The upper-case variant of {@code 'a'}. The entire string * representing the number will be converted to upper case including the * {@code 'x'} ('\u0078') and {@code 'p'} * ('\u0070' and all hexadecimal digits {@code 'a'} - * {@code 'f'} ('\u0061' - '\u0066'). * + *
            * *

            All flags defined for Byte, Short, Integer, and @@ -1339,7 +1374,7 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code '#'} flag is given, then the decimal separator will * always be present. * - *

            If no flags are given the default formatting + *

            If no flags are given the default formatting * is as follows: * *

              @@ -1357,7 +1392,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * *
            * - *

            The width is the minimum number of characters + *

            The width is the minimum number of characters * to be written to the output. This includes any signs, digits, grouping * separators, decimal separators, exponential symbol, radix indicator, * parentheses, and strings representing infinity and NaN as applicable. If @@ -1367,7 +1402,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * {@code '-'} flag is given then the padding will be on the right. If width * is not specified then there is no minimum. * - *

            If the conversion is {@code 'e'}, + *

            If the conversion is {@code 'e'}, * {@code 'E'} or {@code 'f'}, then the precision is the number of digits * after the decimal separator. If the precision is not specified, then it is * assumed to be {@code 6}. @@ -1383,17 +1418,19 @@ import jdk.internal.math.FormattedFloatingDecimal; * precision is not provided, then all of the digits as returned by {@link * Double#toHexString(double)} will be output. * - *

            BigDecimal + *

            BigDecimal * *

            The following conversions may be applied {@link java.math.BigDecimal * BigDecimal}. * - * + *
            + * + * * - * *
            floatConv
            {@code 'e'} - * '\u0065' + *
            {@code 'e'} + * '\u0065' * Requires the output to be formatted using computerized scientific notation. The computerized scientific notation. The localization algorithm is applied. * *

            The formatting of the magnitude m depends upon its value. @@ -1432,13 +1469,13 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code ','} flag is given, then an {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'E'} - * '\u0045' + *
            {@code 'E'} + * '\u0045' * The upper-case variant of {@code 'e'}. The exponent symbol * will be {@code 'E'} ('\u0045'). * - *
            {@code 'g'} - * '\u0067' + *
            {@code 'g'} + * '\u0067' * Requires the output to be formatted in general scientific notation * as described below. The localization * algorithm is applied. @@ -1462,13 +1499,13 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            If the {@code '#'} flag is given then an {@link * FormatFlagsConversionMismatchException} will be thrown. * - *

            {@code 'G'} - * '\u0047' + *
            {@code 'G'} + * '\u0047' * The upper-case variant of {@code 'g'}. * - *
            {@code 'f'} - * '\u0066' - * Requires the output to be formatted using decimal + *
            {@code 'f'} + * '\u0066' + * Requires the output to be formatted using decimal * format. The localization algorithm is * applied. * @@ -1492,6 +1529,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * For a canonical representation of the value, use {@link * BigDecimal#toString()}. * + *
            * *

            All flags defined for Byte, Short, Integer, and @@ -1507,20 +1545,23 @@ import jdk.internal.math.FormattedFloatingDecimal; * href="#floatDPrec">precision is the same as defined for Float and * Double. * - *

            Date/Time

            + *

            Date/Time

            * *

            This conversion may be applied to {@code long}, {@link Long}, {@link * Calendar}, {@link Date} and {@link TemporalAccessor TemporalAccessor} * - * + *
            + * + * * - * *
            DTConv
            {@code 't'} - * '\u0074' + *
            {@code 't'} + * '\u0074' * Prefix for date and time conversion characters. - *
            {@code 'T'} - * '\u0054' + *
            {@code 'T'} + * '\u0054' * The upper-case variant of {@code 't'}. * + *
            * *

            The following date and time conversion character suffixes are defined @@ -1532,55 +1573,57 @@ import jdk.internal.math.FormattedFloatingDecimal; * *

            The following conversion characters are used for formatting times: * - * + *
            + * + * * - * *
            time
            {@code 'H'} - * '\u0048' + *
            {@code 'H'} + * '\u0048' * Hour of the day for the 24-hour clock, formatted as two digits with * a leading zero as necessary i.e. {@code 00 - 23}. {@code 00} * corresponds to midnight. * - *
            {@code 'I'} - * '\u0049' + *
            {@code 'I'} + * '\u0049' * Hour for the 12-hour clock, formatted as two digits with a leading * zero as necessary, i.e. {@code 01 - 12}. {@code 01} corresponds to * one o'clock (either morning or afternoon). * - *
            {@code 'k'} - * '\u006b' + *
            {@code 'k'} + * '\u006b' * Hour of the day for the 24-hour clock, i.e. {@code 0 - 23}. * {@code 0} corresponds to midnight. * - *
            {@code 'l'} - * '\u006c' + *
            {@code 'l'} + * '\u006c' * Hour for the 12-hour clock, i.e. {@code 1 - 12}. {@code 1} * corresponds to one o'clock (either morning or afternoon). * - *
            {@code 'M'} - * '\u004d' + *
            {@code 'M'} + * '\u004d' * Minute within the hour formatted as two digits with a leading zero * as necessary, i.e. {@code 00 - 59}. * - *
            {@code 'S'} - * '\u0053' + *
            {@code 'S'} + * '\u0053' * Seconds within the minute, formatted as two digits with a leading * zero as necessary, i.e. {@code 00 - 60} ("{@code 60}" is a special * value required to support leap seconds). * - *
            {@code 'L'} - * '\u004c' + *
            {@code 'L'} + * '\u004c' * Millisecond within the second formatted as three digits with * leading zeros as necessary, i.e. {@code 000 - 999}. * - *
            {@code 'N'} - * '\u004e' + *
            {@code 'N'} + * '\u004e' * Nanosecond within the second, formatted as nine digits with leading * zeros as necessary, i.e. {@code 000000000 - 999999999}. The precision * of this value is limited by the resolution of the underlying operating * system or hardware. * - *
            {@code 'p'} - * '\u0070' + *
            {@code 'p'} + * '\u0070' * Locale-specific {@linkplain * java.text.DateFormatSymbols#getAmPmStrings morning or afternoon} marker * in lower case, e.g."{@code am}" or "{@code pm}". Use of the @@ -1589,8 +1632,8 @@ import jdk.internal.math.FormattedFloatingDecimal; * GNU {@code date} and POSIX {@code strftime(3c)} which produce * upper-case output.) * - *
            {@code 'z'} - * '\u007a' + *
            {@code 'z'} + * '\u007a' * RFC 822 * style numeric time zone offset from GMT, e.g. {@code -0800}. This * value will be adjusted as necessary for Daylight Saving Time. For @@ -1598,8 +1641,8 @@ import jdk.internal.math.FormattedFloatingDecimal; * the {@linkplain TimeZone#getDefault() default time zone} for this * instance of the Java virtual machine. * - *
            {@code 'Z'} - * '\u005a' + *
            {@code 'Z'} + * '\u005a' * A string representing the abbreviation for the time zone. This * value will be adjusted as necessary for Daylight Saving Time. For * {@code long}, {@link Long}, and {@link Date} the time zone used is @@ -1607,126 +1650,133 @@ import jdk.internal.math.FormattedFloatingDecimal; * instance of the Java virtual machine. The Formatter's locale will * supersede the locale of the argument (if any). * - *
            {@code 's'} - * '\u0073' + *
            {@code 's'} + * '\u0073' * Seconds since the beginning of the epoch starting at 1 January 1970 * {@code 00:00:00} UTC, i.e. {@code Long.MIN_VALUE/1000} to * {@code Long.MAX_VALUE/1000}. * - *
            {@code 'Q'} - * '\u004f' + *
            {@code 'Q'} + * '\u004f' * Milliseconds since the beginning of the epoch starting at 1 January * 1970 {@code 00:00:00} UTC, i.e. {@code Long.MIN_VALUE} to * {@code Long.MAX_VALUE}. The precision of this value is limited by * the resolution of the underlying operating system or hardware. * + *
            * *

            The following conversion characters are used for formatting dates: * - * + *
            + * + * * - * *
            date
            {@code 'B'} - * '\u0042' + *
            {@code 'B'} + * '\u0042' * Locale-specific {@linkplain java.text.DateFormatSymbols#getMonths * full month name}, e.g. {@code "January"}, {@code "February"}. * - *
            {@code 'b'} - * '\u0062' + *
            {@code 'b'} + * '\u0062' * Locale-specific {@linkplain * java.text.DateFormatSymbols#getShortMonths abbreviated month name}, * e.g. {@code "Jan"}, {@code "Feb"}. * - *
            {@code 'h'} - * '\u0068' + *
            {@code 'h'} + * '\u0068' * Same as {@code 'b'}. * - *
            {@code 'A'} - * '\u0041' + *
            {@code 'A'} + * '\u0041' * Locale-specific full name of the {@linkplain * java.text.DateFormatSymbols#getWeekdays day of the week}, * e.g. {@code "Sunday"}, {@code "Monday"} * - *
            {@code 'a'} - * '\u0061' + *
            {@code 'a'} + * '\u0061' * Locale-specific short name of the {@linkplain * java.text.DateFormatSymbols#getShortWeekdays day of the week}, * e.g. {@code "Sun"}, {@code "Mon"} * - *
            {@code 'C'} - * '\u0043' + *
            {@code 'C'} + * '\u0043' * Four-digit year divided by {@code 100}, formatted as two digits * with leading zero as necessary, i.e. {@code 00 - 99} * - *
            {@code 'Y'} - * '\u0059' Year, formatted to at least + *
            {@code 'Y'} + * '\u0059' Year, formatted to at least * four digits with leading zeros as necessary, e.g. {@code 0092} equals * {@code 92} CE for the Gregorian calendar. * - *
            {@code 'y'} - * '\u0079' + *
            {@code 'y'} + * '\u0079' * Last two digits of the year, formatted with leading zeros as * necessary, i.e. {@code 00 - 99}. * - *
            {@code 'j'} - * '\u006a' + *
            {@code 'j'} + * '\u006a' * Day of year, formatted as three digits with leading zeros as * necessary, e.g. {@code 001 - 366} for the Gregorian calendar. * {@code 001} corresponds to the first day of the year. * - *
            {@code 'm'} - * '\u006d' + *
            {@code 'm'} + * '\u006d' * Month, formatted as two digits with leading zeros as necessary, * i.e. {@code 01 - 13}, where "{@code 01}" is the first month of the * year and ("{@code 13}" is a special value required to support lunar * calendars). * - *
            {@code 'd'} - * '\u0064' + *
            {@code 'd'} + * '\u0064' * Day of month, formatted as two digits with leading zeros as * necessary, i.e. {@code 01 - 31}, where "{@code 01}" is the first day * of the month. * - *
            {@code 'e'} - * '\u0065' + *
            {@code 'e'} + * '\u0065' * Day of month, formatted as two digits, i.e. {@code 1 - 31} where * "{@code 1}" is the first day of the month. * + *
            * *

            The following conversion characters are used for formatting common * date/time compositions. * - * + *
            + * + * * - * *
            composites
            {@code 'R'} - * '\u0052' + *
            {@code 'R'} + * '\u0052' * Time formatted for the 24-hour clock as {@code "%tH:%tM"} * - *
            {@code 'T'} - * '\u0054' + *
            {@code 'T'} + * '\u0054' * Time formatted for the 24-hour clock as {@code "%tH:%tM:%tS"}. * - *
            {@code 'r'} - * '\u0072' + *
            {@code 'r'} + * '\u0072' * Time formatted for the 12-hour clock as {@code "%tI:%tM:%tS * %Tp"}. The location of the morning or afternoon marker * ({@code '%Tp'}) may be locale-dependent. * - *
            {@code 'D'} - * '\u0044' + *
            {@code 'D'} + * '\u0044' * Date formatted as {@code "%tm/%td/%ty"}. * - *
            {@code 'F'} - * '\u0046' + *
            {@code 'F'} + * '\u0046' * ISO 8601 * complete date formatted as {@code "%tY-%tm-%td"}. * - *
            {@code 'c'} - * '\u0063' + *
            {@code 'c'} + * '\u0063' * Date and time formatted as {@code "%ta %tb %td %tT %tZ %tY"}, * e.g. {@code "Sun Jul 20 16:17:00 EDT 1969"}. * + *
            * *

            The {@code '-'} flag defined for General @@ -1744,13 +1794,15 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            The precision is not applicable. If the precision is specified then an * {@link IllegalFormatPrecisionException} will be thrown. * - *

            Percent

            + *

            Percent

            * *

            The conversion does not correspond to any argument. * - * + *
            + * + * * - * *
            DTConv
            {@code '%'} + *
            {@code '%'} * The result is a literal {@code '%'} ('\u0025') * *

            The width is the minimum number of characters to @@ -1767,25 +1819,29 @@ import jdk.internal.math.FormattedFloatingDecimal; *

            The precision is not applicable. If the precision is specified an * {@link IllegalFormatPrecisionException} will be thrown. * + *

            * - *

            Line Separator

            + *

            Line Separator

            * *

            The conversion does not correspond to any argument. * - * + *
            + * + * * - * *
            DTConv
            {@code 'n'} + *
            {@code 'n'} * the platform-specific line separator as returned by {@link * System#lineSeparator()}. * + *
            * *

            Flags, width, and precision are not applicable. If any are provided an * {@link IllegalFormatFlagsException}, {@link IllegalFormatWidthException}, * and {@link IllegalFormatPrecisionException}, respectively will be thrown. * - *

            Argument Index

            + *

            Argument Index

            * *

            Format specifiers can reference arguments in three ways: * diff --git a/jdk/src/java.base/share/classes/java/util/GregorianCalendar.java b/jdk/src/java.base/share/classes/java/util/GregorianCalendar.java index 6ce8e8e9b7a..8d2835fe5ac 100644 --- a/jdk/src/java.base/share/classes/java/util/GregorianCalendar.java +++ b/jdk/src/java.base/share/classes/java/util/GregorianCalendar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -91,7 +91,7 @@ import sun.util.calendar.ZoneInfo; * adjustment may be made if desired for dates that are prior to the Gregorian * changeover and which fall between January 1 and March 24. * - *

            Week Of Year and Week Year

            + *

            Week Of Year and Week Year

            * *

            Values calculated for the {@link Calendar#WEEK_OF_YEAR * WEEK_OF_YEAR} field range from 1 to 53. The first week of a @@ -108,7 +108,7 @@ import sun.util.calendar.ZoneInfo; *

            The {@code getFirstDayOfWeek()} and {@code * getMinimalDaysInFirstWeek()} values are initialized using * locale-dependent resources when constructing a {@code - * GregorianCalendar}. The week + * GregorianCalendar}. The week * determination is compatible with the ISO 8601 standard when {@code * getFirstDayOfWeek()} is {@code MONDAY} and {@code * getMinimalDaysInFirstWeek()} is 4, which values are used in locales @@ -117,7 +117,7 @@ import sun.util.calendar.ZoneInfo; * {@link Calendar#setMinimalDaysInFirstWeek(int) * setMinimalDaysInFirstWeek()}. * - *

            A week year is in sync with a + *

            A week year is in sync with a * {@code WEEK_OF_YEAR} cycle. All weeks between the first and last * weeks (inclusive) have the same week year value. * Therefore, the first and last days of a week year may have @@ -159,88 +159,89 @@ import sun.util.calendar.ZoneInfo; * undefined. GregorianCalendar uses the following * default value for each calendar field if its value is undefined. * - * + *
            + * + * + * + * + * + * + * * * - * - * - * - * - * - * * * - * - * * * - * - * * * - * - * * * - * - * * * - * - * * * - * - * * * - * - * * * - * - * * * diff --git a/jdk/src/java.base/share/classes/java/util/HashMap.java b/jdk/src/java.base/share/classes/java/util/HashMap.java index 5cc36296aa8..4f0e8e6c7d6 100644 --- a/jdk/src/java.base/share/classes/java/util/HashMap.java +++ b/jdk/src/java.base/share/classes/java/util/HashMap.java @@ -117,7 +117,7 @@ import java.util.function.Function; * should be used only to detect bugs. * *

            This class is a member of the - * + * * Java Collections Framework. * * @param the type of keys maintained by this map diff --git a/jdk/src/java.base/share/classes/java/util/HashSet.java b/jdk/src/java.base/share/classes/java/util/HashSet.java index 172cb37ad06..360de8119d6 100644 --- a/jdk/src/java.base/share/classes/java/util/HashSet.java +++ b/jdk/src/java.base/share/classes/java/util/HashSet.java @@ -72,7 +72,7 @@ import java.io.InvalidObjectException; * should be used only to detect bugs. * *

            This class is a member of the - * + * * Java Collections Framework. * * @param the type of elements maintained by this set diff --git a/jdk/src/java.base/share/classes/java/util/Hashtable.java b/jdk/src/java.base/share/classes/java/util/Hashtable.java index b541ca12a06..f97303be2b3 100644 --- a/jdk/src/java.base/share/classes/java/util/Hashtable.java +++ b/jdk/src/java.base/share/classes/java/util/Hashtable.java @@ -106,7 +106,7 @@ import java.util.function.BiFunction; * *

            As of the Java 2 platform v1.2, this class was retrofitted to * implement the {@link Map} interface, making it a member of the - * + * * * Java Collections Framework. Unlike the new collection * implementations, {@code Hashtable} is synchronized. If a diff --git a/jdk/src/java.base/share/classes/java/util/IdentityHashMap.java b/jdk/src/java.base/share/classes/java/util/IdentityHashMap.java index bd1e217e7ff..f749774e78e 100644 --- a/jdk/src/java.base/share/classes/java/util/IdentityHashMap.java +++ b/jdk/src/java.base/share/classes/java/util/IdentityHashMap.java @@ -122,7 +122,7 @@ import java.util.function.Consumer; * {@link HashMap} (which uses chaining rather than linear-probing). * *

            This class is a member of the - * + * * Java Collections Framework. * * @see System#identityHashCode(Object) diff --git a/jdk/src/java.base/share/classes/java/util/Iterator.java b/jdk/src/java.base/share/classes/java/util/Iterator.java index 7dcb155c63d..5f7b1de8b85 100644 --- a/jdk/src/java.base/share/classes/java/util/Iterator.java +++ b/jdk/src/java.base/share/classes/java/util/Iterator.java @@ -40,7 +40,7 @@ import java.util.function.Consumer; * * *

            This interface is a member of the - * + * * Java Collections Framework. * * @apiNote @@ -109,7 +109,8 @@ public interface Iterator { * Exceptions thrown by the action are relayed to the caller. *

            * The behavior of an iterator is unspecified if the action modifies the - * collection in any way (even by calling the {@link #remove remove} method), + * collection in any way (even by calling the {@link #remove remove} method + * or other mutator methods of {@code Iterator} subtypes), * unless an overriding class has specified a concurrent modification policy. *

            * Subsequent behavior of an iterator is unspecified if the action throws an diff --git a/jdk/src/java.base/share/classes/java/util/LinkedHashMap.java b/jdk/src/java.base/share/classes/java/util/LinkedHashMap.java index bd21f5bf6d4..252a5437353 100644 --- a/jdk/src/java.base/share/classes/java/util/LinkedHashMap.java +++ b/jdk/src/java.base/share/classes/java/util/LinkedHashMap.java @@ -140,7 +140,7 @@ import java.io.IOException; * fail-fast, and additionally report {@link Spliterator#ORDERED}. * *

            This class is a member of the - * + * * Java Collections Framework. * * @implNote diff --git a/jdk/src/java.base/share/classes/java/util/LinkedHashSet.java b/jdk/src/java.base/share/classes/java/util/LinkedHashSet.java index c0e1f2eb8e4..0d0f927166e 100644 --- a/jdk/src/java.base/share/classes/java/util/LinkedHashSet.java +++ b/jdk/src/java.base/share/classes/java/util/LinkedHashSet.java @@ -100,7 +100,7 @@ package java.util; * should be used only to detect bugs. * *

            This class is a member of the - * + * * Java Collections Framework. * * @param the type of elements maintained by this set diff --git a/jdk/src/java.base/share/classes/java/util/LinkedList.java b/jdk/src/java.base/share/classes/java/util/LinkedList.java index 2d21ff145c3..fce19cad553 100644 --- a/jdk/src/java.base/share/classes/java/util/LinkedList.java +++ b/jdk/src/java.base/share/classes/java/util/LinkedList.java @@ -70,7 +70,7 @@ import java.util.function.Consumer; * should be used only to detect bugs. * *

            This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch diff --git a/jdk/src/java.base/share/classes/java/util/List.java b/jdk/src/java.base/share/classes/java/util/List.java index dda514b313f..8dec9acd6c5 100644 --- a/jdk/src/java.base/share/classes/java/util/List.java +++ b/jdk/src/java.base/share/classes/java/util/List.java @@ -87,7 +87,7 @@ import java.util.function.UnaryOperator; * Such exceptions are marked as "optional" in the specification for this * interface. * - *

            Immutable List Static Factory Methods

            + *

            Immutable List Static Factory Methods

            *

            The {@link List#of(Object...) List.of()} static factory methods * provide a convenient way to create immutable lists. The {@code List} * instances created by these methods have the following characteristics: @@ -114,7 +114,7 @@ import java.util.function.UnaryOperator; * * *

            This interface is a member of the - * + * * Java Collections Framework. * * @param the type of elements in this list diff --git a/jdk/src/java.base/share/classes/java/util/ListIterator.java b/jdk/src/java.base/share/classes/java/util/ListIterator.java index 6ad98fe3fa3..2ec555754ea 100644 --- a/jdk/src/java.base/share/classes/java/util/ListIterator.java +++ b/jdk/src/java.base/share/classes/java/util/ListIterator.java @@ -46,7 +46,7 @@ package java.util; * {@link #previous()}. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch diff --git a/jdk/src/java.base/share/classes/java/util/ListResourceBundle.java b/jdk/src/java.base/share/classes/java/util/ListResourceBundle.java index 4c4498e1b6b..de43f09e5c5 100644 --- a/jdk/src/java.base/share/classes/java/util/ListResourceBundle.java +++ b/jdk/src/java.base/share/classes/java/util/ListResourceBundle.java @@ -56,7 +56,7 @@ import sun.util.ResourceBundleEnumeration; * that key. * *

            - * The following example shows two members of a resource + * The following example shows two members of a resource * bundle family with the base name "MyResources". * "MyResources" is the default member of the bundle family, and * "MyResources_fr" is the French member. diff --git a/jdk/src/java.base/share/classes/java/util/Locale.java b/jdk/src/java.base/share/classes/java/util/Locale.java index d4fae4bb544..45d13fa3db9 100644 --- a/jdk/src/java.base/share/classes/java/util/Locale.java +++ b/jdk/src/java.base/share/classes/java/util/Locale.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -83,7 +83,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * described below. * *

            - *
            language
            + *
            language
            * *
            ISO 639 alpha-2 or alpha-3 language code, or registered * language subtags up to 8 alpha letters (for future enhancements). @@ -101,7 +101,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * *
            Example: "en" (English), "ja" (Japanese), "kok" (Konkani)
            * - *
            script
            + *
            script
            * *
            ISO 15924 alpha-4 script code. You can find a full list of * valid script codes in the IANA Language Subtag Registry (search @@ -115,7 +115,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * *
            Example: "Latn" (Latin), "Cyrl" (Cyrillic)
            * - *
            country (region)
            + *
            country (region)
            * *
            ISO 3166 alpha-2 country code or UN M.49 numeric-3 area code. * You can find a full list of valid country and region codes in the @@ -129,7 +129,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; *
            Example: "US" (United States), "FR" (France), "029" * (Caribbean)
            * - *
            variant
            + *
            variant
            * *
            Any arbitrary value used to indicate a variation of a * Locale. Where there are two or more variant values @@ -160,7 +160,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * *
            Example: "polyton" (Polytonic Greek), "POSIX"
            * - *
            extensions
            + *
            extensions
            * *
            A map from single character keys to string values, indicating * extensions apart from language identification. The extensions in @@ -188,7 +188,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * requirement (is well-formed), but does not validate the value * itself. See {@link Builder} for details. * - *

            Unicode locale/language extension

            + *

            Unicode locale/language extension

            * *

            UTS#35, "Unicode Locale Data Markup Language" defines optional * attributes and keywords to override or refine the default behavior @@ -269,7 +269,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * * * - *

            Locale Matching

            + *

            Locale Matching

            * *

            If an application or a system is internationalized and provides localized * resources for multiple locales, it sometimes needs to find one or more @@ -408,7 +408,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool; * Clients desiring a string representation of the complete locale can * then always rely on toLanguageTag for this purpose. * - *

            Special cases
            + *
            Special cases
            * *

            For compatibility reasons, two * non-conforming locales are treated as special cases. These are @@ -1587,44 +1587,50 @@ public final class Locale implements Cloneable, Serializable { * *

            Grandfathered tags with canonical replacements are as follows: * - *

            GregorianCalendar default field values
            + * Field + * + Default Value + *
            Field
            - *
            Default Value
            - *
            - * ERA
            + *
            + * ERA * - * AD
            + *
            + * AD *
            - * YEAR
            + *
            + * YEAR * - * 1970
            + *
            + * 1970 *
            - * MONTH
            + *
            + * MONTH * - * JANUARY
            + *
            + * JANUARY *
            - * DAY_OF_MONTH
            + *
            + * DAY_OF_MONTH * - * 1
            + *
            + * 1 *
            - * DAY_OF_WEEK
            + *
            + * DAY_OF_WEEK * - * the first day of week
            + *
            + * the first day of week *
            - * WEEK_OF_MONTH
            + *
            + * WEEK_OF_MONTH * - * 0
            + *
            + * 0 *
            - * DAY_OF_WEEK_IN_MONTH
            + *
            + * DAY_OF_WEEK_IN_MONTH * - * 1
            + *
            + * 1 *
            - * AM_PM
            + *
            + * AM_PM * - * AM
            + *
            + * AM *
            - * HOUR, HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND
            + *
            + * HOUR, HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND * - * 0
            + *
            + * 0 *
            - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + *
            grandfathered tag modern replacement
            art-lojban jbo
            i-ami ami
            i-bnn bnn
            i-hak hak
            i-klingon tlh
            i-lux lb
            i-navajo nv
            i-pwn pwn
            i-tao tao
            i-tay tay
            i-tsu tsu
            no-bok nb
            no-nyn nn
            sgn-BE-FR sfb
            sgn-BE-NL vgt
            sgn-CH-DE sgg
            zh-guoyu cmn
            zh-hakka hak
            zh-min-nan nan
            zh-xiang hsn
            + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * * *
            Grandfathered tags with canonical replacements
            grandfathered tagmodern replacement
            art-lojbanjbo
            i-amiami
            i-bnnbnn
            i-hakhak
            i-klingontlh
            i-luxlb
            i-navajonv
            i-pwnpwn
            i-taotao
            i-taytay
            i-tsutsu
            no-boknb
            no-nynnn
            sgn-BE-FRsfb
            sgn-BE-NLvgt
            sgn-CH-DEsgg
            zh-guoyucmn
            zh-hakkahak
            zh-min-nannan
            zh-xianghsn
            * *

            Grandfathered tags with no modern replacement will be * converted as follows: * - * - * - * - * - * - * - * - * - * + *
            grandfathered tag converts to
            cel-gaulish xtg-x-cel-gaulish
            en-GB-oed en-GB-x-oed
            i-default en-x-i-default
            i-enochian und-x-i-enochian
            i-mingo see-x-i-mingo
            zh-min nan-x-zh-min
            + * + * + * + * + * + * + * + * + * + * + * * *
            Grandfathered tags with no modern replacement
            grandfathered tagconverts to
            cel-gaulishxtg-x-cel-gaulish
            en-GB-oeden-GB-x-oed
            i-defaulten-x-i-default
            i-enochianund-x-i-enochian
            i-mingosee-x-i-mingo
            zh-minnan-x-zh-min
            * @@ -2767,71 +2773,76 @@ public final class Locale implements Cloneable, Serializable { * * The filtering method will behave as follows: * - * + *
            + * + * * * * * * + * + * * - * - * - * * * - * - * - * + * * * - * - * - * * * - * - * - * + * * * - * - * - * + * * + * *
            Filtering method behavior
            Filtering ModeLanguage Priority List: {@code "de-DE"}Language Priority List: {@code "de-*-DE"}
            + * * {@link FilteringMode#AUTOSELECT_FILTERING AUTOSELECT_FILTERING} * + * * Performs basic filtering and returns {@code "de-DE"} and * {@code "de-DE-1996"}. * + * * Performs extended filtering and returns {@code "de-DE"}, * {@code "de-Deva-DE"}, {@code "de-DE-1996"}, {@code "de-Latn-DE"}, and * {@code "de-Latn-DE-1996"}. *
            + * * {@link FilteringMode#EXTENDED_FILTERING EXTENDED_FILTERING} * + * * Performs extended filtering and returns {@code "de-DE"}, * {@code "de-Deva-DE"}, {@code "de-DE-1996"}, {@code "de-Latn-DE"}, and * {@code "de-Latn-DE-1996"}. * Same as above.Same as above.
            + * * {@link FilteringMode#IGNORE_EXTENDED_RANGES IGNORE_EXTENDED_RANGES} * + * * Performs basic filtering and returns {@code "de-DE"} and * {@code "de-DE-1996"}. * + * * Performs basic filtering and returns {@code null} because * nothing matches. *
            + * * {@link FilteringMode#MAP_EXTENDED_RANGES MAP_EXTENDED_RANGES} * Same as above. + * Same as above. * Performs basic filtering and returns {@code "de-DE"} and * {@code "de-DE-1996"} because {@code "de-*-DE"} is mapped to * {@code "de-DE"}. *
            + * * {@link FilteringMode#REJECT_EXTENDED_RANGES REJECT_EXTENDED_RANGES} * Same as above. + * Same as above. * Throws {@link IllegalArgumentException} because {@code "de-*-DE"} is * not a valid basic language range. *
            * * @see #filter(List, Collection, FilteringMode) diff --git a/jdk/src/java.base/share/classes/java/util/Map.java b/jdk/src/java.base/share/classes/java/util/Map.java index 153b86b8084..e3bee23b7ea 100644 --- a/jdk/src/java.base/share/classes/java/util/Map.java +++ b/jdk/src/java.base/share/classes/java/util/Map.java @@ -110,7 +110,7 @@ import java.io.Serializable; * Implementations may optionally handle the self-referential scenario, however * most current implementations do not do so. * - *

            Immutable Map Static Factory Methods

            + *

            Immutable Map Static Factory Methods

            *

            The {@link Map#of() Map.of()} and * {@link Map#ofEntries(Map.Entry...) Map.ofEntries()} * static factory methods provide a convenient way to create immutable maps. @@ -140,7 +140,7 @@ import java.io.Serializable; * * *

            This interface is a member of the - * + * * Java Collections Framework. * * @param the type of keys maintained by this map diff --git a/jdk/src/java.base/share/classes/java/util/NavigableMap.java b/jdk/src/java.base/share/classes/java/util/NavigableMap.java index 6045ee2b48f..8a2af7a7a2a 100644 --- a/jdk/src/java.base/share/classes/java/util/NavigableMap.java +++ b/jdk/src/java.base/share/classes/java/util/NavigableMap.java @@ -85,7 +85,7 @@ package java.util; * {@link #keySet()} can be overridden to return {@link NavigableSet}. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @author Doug Lea diff --git a/jdk/src/java.base/share/classes/java/util/NavigableSet.java b/jdk/src/java.base/share/classes/java/util/NavigableSet.java index 40843905271..4f1f0d510a9 100644 --- a/jdk/src/java.base/share/classes/java/util/NavigableSet.java +++ b/jdk/src/java.base/share/classes/java/util/NavigableSet.java @@ -79,7 +79,7 @@ package java.util; * {@code NavigableSet}. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @author Doug Lea diff --git a/jdk/src/java.base/share/classes/java/util/Objects.java b/jdk/src/java.base/share/classes/java/util/Objects.java index dad583b9206..c6bf3c96133 100644 --- a/jdk/src/java.base/share/classes/java/util/Objects.java +++ b/jdk/src/java.base/share/classes/java/util/Objects.java @@ -343,7 +343,8 @@ public final class Objects { */ public static T requireNonNull(T obj, Supplier messageSupplier) { if (obj == null) - throw new NullPointerException(messageSupplier.get()); + throw new NullPointerException(messageSupplier == null ? + null : messageSupplier.get()); return obj; } diff --git a/jdk/src/java.base/share/classes/java/util/Observable.java b/jdk/src/java.base/share/classes/java/util/Observable.java index b19830bb64e..d71bf5d5d4c 100644 --- a/jdk/src/java.base/share/classes/java/util/Observable.java +++ b/jdk/src/java.base/share/classes/java/util/Observable.java @@ -69,6 +69,8 @@ package java.util; * {@link java.beans} package. For reliable and ordered * messaging among threads, consider using one of the concurrent data * structures in the {@link java.util.concurrent} package. + * For reactive streams style programming, see the + * {@link java.util.concurrent.Flow} API. */ @Deprecated(since="9") public class Observable { diff --git a/jdk/src/java.base/share/classes/java/util/Optional.java b/jdk/src/java.base/share/classes/java/util/Optional.java index 94f3c17511a..5803d818deb 100644 --- a/jdk/src/java.base/share/classes/java/util/Optional.java +++ b/jdk/src/java.base/share/classes/java/util/Optional.java @@ -1,5 +1,5 @@ /* - * 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 @@ -36,9 +36,9 @@ import java.util.stream.Stream; * {@code get()} returns the value. * *

            Additional methods that depend on the presence or absence of a contained - * value are provided, such as {@link #orElse(java.lang.Object) orElse()} + * value are provided, such as {@link #orElse(Object) orElse()} * (returns a default value if no value is present) and - * {@link #ifPresent(java.util.function.Consumer) ifPresent()} (performs an + * {@link #ifPresent(Consumer) ifPresent()} (performs an * action if a value is present). * *

            This is a value-based @@ -46,6 +46,13 @@ import java.util.stream.Stream; * ({@code ==}), identity hash code, or synchronization) on instances of * {@code Optional} may have unpredictable results and should be avoided. * + * @apiNote + * {@code Optional} is primarily intended for use as a method return type where + * there is a clear need to represent "no result," and where using {@code null} + * is likely to cause errors. A variable whose type is {@code Optional} should + * never itself be {@code null}; it should always point to an {@code Optional} + * instance. + * * @param the type of value * @since 1.8 */ @@ -129,6 +136,12 @@ public final class Optional { * If a value is present, returns the value, otherwise throws * {@code NoSuchElementException}. * + * @apiNote + * The methods {@link #orElse(Object) orElse} and + * {@link #orElseGet(Supplier) orElseGet} + * are generally preferable to this method, as they return a substitute + * value if the value is absent, instead of throwing an exception. + * * @return the non-{@code null} value described by this {@code Optional} * @throws NoSuchElementException if no value is present * @see Optional#isPresent() diff --git a/jdk/src/java.base/share/classes/java/util/OptionalDouble.java b/jdk/src/java.base/share/classes/java/util/OptionalDouble.java index 5a637d87b03..5472b34b5ff 100644 --- a/jdk/src/java.base/share/classes/java/util/OptionalDouble.java +++ b/jdk/src/java.base/share/classes/java/util/OptionalDouble.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 @@ -37,7 +37,7 @@ import java.util.stream.DoubleStream; *

            Additional methods that depend on the presence or absence of a contained * value are provided, such as {@link #orElse(double) orElse()} * (returns a default value if no value is present) and - * {@link #ifPresent(java.util.function.DoubleConsumer) ifPresent()} (performs + * {@link #ifPresent(DoubleConsumer) ifPresent()} (performs * an action if a value is present). * *

            This is a value-based @@ -45,6 +45,12 @@ import java.util.stream.DoubleStream; * ({@code ==}), identity hash code, or synchronization) on instances of * {@code OptionalDouble} may have unpredictable results and should be avoided. * + * @apiNote + * {@code OptionalDouble} is primarily intended for use as a method return type where + * there is a clear need to represent "no result." A variable whose type is + * {@code OptionalDouble} should never itself be {@code null}; it should always point + * to an {@code OptionalDouble} instance. + * * @since 1.8 */ public final class OptionalDouble { @@ -110,6 +116,12 @@ public final class OptionalDouble { * If a value is present, returns the value, otherwise throws * {@code NoSuchElementException}. * + * @apiNote + * The methods {@link #orElse(double) orElse} and + * {@link #orElseGet(DoubleSupplier) orElseGet} + * are generally preferable to this method, as they return a substitute + * value if the value is absent, instead of throwing an exception. + * * @return the value described by this {@code OptionalDouble} * @throws NoSuchElementException if no value is present * @see OptionalDouble#isPresent() diff --git a/jdk/src/java.base/share/classes/java/util/OptionalInt.java b/jdk/src/java.base/share/classes/java/util/OptionalInt.java index cc56f47e4ba..12e588e56e9 100644 --- a/jdk/src/java.base/share/classes/java/util/OptionalInt.java +++ b/jdk/src/java.base/share/classes/java/util/OptionalInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 @@ -37,7 +37,7 @@ import java.util.stream.IntStream; *

            Additional methods that depend on the presence or absence of a contained * value are provided, such as {@link #orElse(int) orElse()} * (returns a default value if no value is present) and - * {@link #ifPresent(java.util.function.IntConsumer) ifPresent()} (performs an + * {@link #ifPresent(IntConsumer) ifPresent()} (performs an * action if a value is present). * *

            This is a value-based @@ -45,6 +45,12 @@ import java.util.stream.IntStream; * ({@code ==}), identity hash code, or synchronization) on instances of * {@code OptionalInt} may have unpredictable results and should be avoided. * + * @apiNote + * {@code OptionalInt} is primarily intended for use as a method return type where + * there is a clear need to represent "no result." A variable whose type is + * {@code OptionalInt} should never itself be {@code null}; it should always point + * to an {@code OptionalInt} instance. + * * @since 1.8 */ public final class OptionalInt { @@ -110,6 +116,12 @@ public final class OptionalInt { * If a value is present, returns the value, otherwise throws * {@code NoSuchElementException}. * + * @apiNote + * The methods {@link #orElse(int) orElse} and + * {@link #orElseGet(IntSupplier) orElseGet} + * are generally preferable to this method, as they return a substitute + * value if the value is absent, instead of throwing an exception. + * * @return the value described by this {@code OptionalInt} * @throws NoSuchElementException if no value is present * @see OptionalInt#isPresent() diff --git a/jdk/src/java.base/share/classes/java/util/OptionalLong.java b/jdk/src/java.base/share/classes/java/util/OptionalLong.java index b2c34339fd8..57dc8e59688 100644 --- a/jdk/src/java.base/share/classes/java/util/OptionalLong.java +++ b/jdk/src/java.base/share/classes/java/util/OptionalLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 @@ -37,7 +37,7 @@ import java.util.stream.LongStream; *

            Additional methods that depend on the presence or absence of a contained * value are provided, such as {@link #orElse(long) orElse()} * (returns a default value if no value is present) and - * {@link #ifPresent(java.util.function.LongConsumer) ifPresent()} (performs an + * {@link #ifPresent(LongConsumer) ifPresent()} (performs an * action if a value is present). * *

            This is a value-based @@ -45,6 +45,12 @@ import java.util.stream.LongStream; * ({@code ==}), identity hash code, or synchronization) on instances of * {@code OptionalLong} may have unpredictable results and should be avoided. * + * @apiNote + * {@code OptionalLong} is primarily intended for use as a method return type where + * there is a clear need to represent "no result." A variable whose type is + * {@code OptionalLong} should never itself be {@code null}; it should always point + * to an {@code OptionalLong} instance. + * * @since 1.8 */ public final class OptionalLong { @@ -110,6 +116,12 @@ public final class OptionalLong { * If a value is present, returns the value, otherwise throws * {@code NoSuchElementException}. * + * @apiNote + * The methods {@link #orElse(long) orElse} and + * {@link #orElseGet(LongSupplier) orElseGet} + * are generally preferable to this method, as they return a substitute + * value if the value is absent, instead of throwing an exception. + * * @return the value described by this {@code OptionalLong} * @throws NoSuchElementException if no value is present * @see OptionalLong#isPresent() diff --git a/jdk/src/java.base/share/classes/java/util/PriorityQueue.java b/jdk/src/java.base/share/classes/java/util/PriorityQueue.java index 829eb01efea..28111ae16bf 100644 --- a/jdk/src/java.base/share/classes/java/util/PriorityQueue.java +++ b/jdk/src/java.base/share/classes/java/util/PriorityQueue.java @@ -73,7 +73,7 @@ import java.util.function.Consumer; * ({@code peek}, {@code element}, and {@code size}). * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/Properties.java b/jdk/src/java.base/share/classes/java/util/Properties.java index 85e294d3340..0b117686cea 100644 --- a/jdk/src/java.base/share/classes/java/util/Properties.java +++ b/jdk/src/java.base/share/classes/java/util/Properties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -290,7 +290,7 @@ class Properties extends Hashtable { * specifies that the key is {@code "cheeses"} and the associated * element is the empty string {@code ""}. *

            - * + * * Characters in keys and elements can be represented in escape * sequences similar to those used for character and string literals * (see sections 3.3 and 3.10.6 of @@ -471,7 +471,7 @@ class Properties extends Hashtable { if (inStream != null) { //The line below is equivalent to calling a //ISO8859-1 decoder. - c = (char) (0xff & inByteBuf[inOff++]); + c = (char)(inByteBuf[inOff++] & 0xFF); } else { c = inCharBuf[inOff++]; } @@ -494,8 +494,25 @@ class Properties extends Hashtable { if (isNewLine) { isNewLine = false; if (c == '#' || c == '!') { + // Comment, quickly consume the rest of the line, + // resume on line-break and backslash. + if (inStream != null) { + while (inOff < inLimit) { + byte b = inByteBuf[inOff++]; + if (b == '\n' || b == '\r' || b == '\\') { + c = (char)(b & 0xFF); + break; + } + } + } else { + while (inOff < inLimit) { + c = inCharBuf[inOff++]; + if (c == '\n' || c == '\r' || c == '\\') { + break; + } + } + } isCommentLine = true; - continue; } } diff --git a/jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java b/jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java index 0866f22eefd..a7231fbef99 100644 --- a/jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java +++ b/jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java @@ -67,7 +67,7 @@ import sun.util.ResourceBundleEnumeration; * for a complete description of the search and instantiation strategy. * *

            - * The following example shows a member of a resource + * The following example shows a member of a resource * bundle family with the base name "MyResources". * The text defines the bundle "MyResources_de", * the German member of the bundle family. diff --git a/jdk/src/java.base/share/classes/java/util/Queue.java b/jdk/src/java.base/share/classes/java/util/Queue.java index e94b22c7fb2..f8383b67b41 100644 --- a/jdk/src/java.base/share/classes/java/util/Queue.java +++ b/jdk/src/java.base/share/classes/java/util/Queue.java @@ -47,12 +47,12 @@ package java.util; * implementations; in most implementations, insert operations cannot * fail. * - * + *
            * * * - * - * + * + * * * * @@ -125,7 +125,7 @@ package java.util; * ordering properties. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/RandomAccess.java b/jdk/src/java.base/share/classes/java/util/RandomAccess.java index a4d489313de..09793e633f6 100644 --- a/jdk/src/java.base/share/classes/java/util/RandomAccess.java +++ b/jdk/src/java.base/share/classes/java/util/RandomAccess.java @@ -59,7 +59,7 @@ package java.util; * * *

            This interface is a member of the - * + * * Java Collections Framework. * * @since 1.4 diff --git a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java index 600b1810a2e..340b53353da 100644 --- a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java +++ b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java @@ -50,7 +50,6 @@ import java.lang.ref.WeakReference; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.net.JarURLConnection; import java.net.URL; import java.net.URLConnection; @@ -205,7 +204,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; * known concrete subclasses {@code ListResourceBundle} and * {@code PropertyResourceBundle} are thread-safe. * - *

            Resource Bundles in Named Modules

            + *

            Resource Bundles in Named Modules

            * * When resource bundles are deployed in named modules, the following * module-specific requirements and restrictions are applied. @@ -217,16 +216,17 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; * 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 - * base name of the bundles and the string "{@code Provider}". The + * package name of the base name, string "{@code .spi.}", the simple class + * name of the base name, and the string "{@code Provider}". The * bundle provider modules 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.MyResourcesProvider;}" and a module containing resource - * bundles must declare "{@code provides com.example.app.MyResourcesProvider + * "{@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.MyResourcesProvider}. + * implementation class of {@code com.example.app.spi.MyResourcesProvider}. *
          • If you want to use non-standard formats in named modules, such as XML, * {@link ResourceBundleProvider} needs to be used.
          • *
          • The {@code getBundle} method with a {@code ClassLoader} may not be able to @@ -240,13 +240,14 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; *
          • * * - *

            ResourceBundleProvider Service Providers

            + *

            ResourceBundleProvider Service Providers

            * * The {@code getBundle} factory methods load service providers of * {@link ResourceBundleProvider}, if available, using {@link ServiceLoader}. - * The service type is designated by {@code basename+"Provider"}. For + * The service type is designated by + * {@code + ".spi." + + "Provider"}. For * example, if the base name is "{@code com.example.app.MyResources}", the service - * type is {@code com.example.app.MyResourcesProvider}. + * type is {@code com.example.app.spi.MyResourcesProvider}. *

            * 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 @@ -267,7 +268,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; * {@link #getBundle(String, Locale, ClassLoader, Control) getBundle} * factory method for details. * - *

            For the {@code getBundle} factory + *

            For the {@code getBundle} factory * methods that take no {@link Control} instance, their default behavior of resource bundle loading * can be modified with custom {@link @@ -350,6 +351,8 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; * @see MissingResourceException * @see ResourceBundleProvider * @since 1.1 + * @revised 9 + * @spec JPMS */ public abstract class ResourceBundle { @@ -870,6 +873,8 @@ public abstract class ResourceBundle { * @throws UnsupportedOperationException * if this method is called in a named module * @since 1.6 + * @revised 9 + * @spec JPMS */ @CallerSensitive public static final ResourceBundle getBundle(String baseName, @@ -920,7 +925,12 @@ public abstract class ResourceBundle { *

            Resource bundles in named modules may be encapsulated. When * the resource bundle is loaded from a provider, the caller module * must have an appropriate uses clause in its module descriptor - * to declare that the module uses implementations of {@code "baseName"Provider}. + * to declare that the module uses implementations of + * {@code + ".spi." + + "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 Resource Bundles in Named Modules + * 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}. @@ -938,6 +948,7 @@ public abstract class ResourceBundle { * specified module * @return a resource bundle for the given base name and the default locale * @since 9 + * @spec JPMS * @see ResourceBundleProvider */ @CallerSensitive @@ -954,20 +965,17 @@ public abstract class ResourceBundle { *

            Resource bundles in named modules may be encapsulated. When * the resource bundle is loaded from a provider, the caller module * must have an appropriate uses clause in its module descriptor - * to declare that the module uses implementations of {@code "baseName"Provider}. + * to declare that the module uses implementations of + * {@code + ".spi." + + "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 Resource Bundles in Named Modules + * 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}. * *

            - * If the given {@code module} is a named module, this method will - * load the service providers for {@link java.util.spi.ResourceBundleProvider} - * and also resource bundles that are local in the given module or that - * are visible to the class loader of the given module (refer to the - * Resource Bundles in Named Modules section - * for details). - * - *

            * If the given {@code module} is an unnamed module, then this method is * equivalent to calling {@link #getBundle(String, Locale, ClassLoader) * getBundle(baseName, targetLocale, module.getClassLoader()} to load @@ -991,6 +999,7 @@ public abstract class ResourceBundle { * be found in the specified {@code module} * @return a resource bundle for the given base name and locale in the module * @since 9 + * @spec JPMS */ @CallerSensitive public static ResourceBundle getBundle(String baseName, Locale targetLocale, Module module) { @@ -1036,6 +1045,8 @@ public abstract class ResourceBundle { * @throws UnsupportedOperationException * if this method is called in a named module * @since 1.6 + * @revised 9 + * @spec JPMS */ @CallerSensitive public static final ResourceBundle getBundle(String baseName, Locale targetLocale, @@ -1056,15 +1067,17 @@ public abstract class ResourceBundle { * description of modifying the default * behavior. * - *

            The following describes the default + *

            The following describes the default * behavior. * *

            * 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} - * and also find resource bundles that are in the caller's module or - * that are visible to the given class loader. + * if any. Otherwise, it will load the resource bundles that are visible to + * the given {@code loader} (refer to the + * Resource Bundles in Named Modules 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 @@ -1073,7 +1086,7 @@ public abstract class ResourceBundle { *

            getBundle uses the base name, the specified locale, and * the default locale (obtained from {@link java.util.Locale#getDefault() * Locale.getDefault}) to generate a sequence of candidate bundle names. If the specified + * id="candidates">candidate bundle names. If the specified * locale's language, script, country, and variant are all empty strings, * then the base name is the only candidate bundle name. Otherwise, a list * of candidate locales is generated from the attribute values of the @@ -1163,7 +1176,7 @@ public abstract class ResourceBundle { *

            If still no result bundle is found, the base name alone is looked up. If * this still fails, a MissingResourceException is thrown. * - *

            Once a result resource bundle has been found, + *

            Once a result resource bundle has been found, * its parent chain is instantiated. If the result bundle already * has a parent (perhaps because it was returned from a cache) the chain is * complete. @@ -1193,7 +1206,7 @@ public abstract class ResourceBundle { * path name (using "/") instead of a fully qualified class name (using * "."). * - *

            + *

            * Example: *

            * The following class and property files are provided: @@ -1215,12 +1228,15 @@ public abstract class ResourceBundle { *

            Calling getBundle with the locale arguments below will * instantiate resource bundles as follows: * - *

            Summary of Queue methods
            Throws exceptionReturns special valueThrows exceptionReturns special value
            Insert
            + *
            + * + * * * * * * + * *
            getBundle() locale to resource bundle mapping
            Locale("fr", "CH")MyResources_fr_CH.class, parent MyResources_fr.properties, parent MyResources.class
            Locale("fr", "FR")MyResources_fr.properties, parent MyResources.class
            Locale("de", "DE")MyResources_en.properties, parent MyResources.class
            Locale("en", "US")MyResources_en.properties, parent MyResources.class
            Locale("es", "ES")MyResources_es_ES.class, parent MyResources.class
            * *

            The file MyResources_fr_CH.properties is never used because it is @@ -1243,6 +1259,8 @@ public abstract class ResourceBundle { * @exception MissingResourceException * if no resource bundle for the specified base name can be found * @since 1.2 + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ResourceBundle getBundle(String baseName, Locale locale, @@ -1302,9 +1320,9 @@ public abstract class ResourceBundle { * sequence of locale-format combinations to be used to call * control.newBundle. * - * - * + *
            + * + * * * * + * + * * * @@ -1465,6 +1485,8 @@ public abstract class ResourceBundle { * @throws UnsupportedOperationException * if this method is called in a named module * @since 1.6 + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ResourceBundle getBundle(String baseName, Locale targetLocale, @@ -1824,7 +1846,7 @@ public abstract class ResourceBundle { cacheKey.setFormat(format); break; } - } catch (Exception e) { + } catch (LinkageError|Exception e) { cacheKey.setCause(e); } } @@ -1867,8 +1889,15 @@ public abstract class ResourceBundle { private static Class getResourceBundleProviderType(String baseName, ClassLoader loader) { - // Look up + "Provider" - String providerName = baseName + "Provider"; + // Look up + ".spi." + "Provider" + int i = baseName.lastIndexOf('.'); + if (i <= 0) { + return null; + } + + String name = baseName.substring(i+1, baseName.length()) + "Provider"; + String providerName = baseName.substring(0, i) + ".spi." + name; + // Use the class loader of the getBundle caller so that the caller's // visibility of the provider type is checked. return AccessController.doPrivileged( @@ -2194,6 +2223,8 @@ public abstract class ResourceBundle { * by the caller's module. * * @since 1.6 + * @revised 9 + * @spec JPMS * @see ResourceBundle.Control#getTimeToLive(String,Locale) */ @CallerSensitive @@ -2468,13 +2499,15 @@ public abstract class ResourceBundle { * } * * - * @apiNote {@code ResourceBundle.Control} is not supported + * @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. * * @since 1.6 + * @revised 9 + * @spec JPMS * @see java.util.spi.ResourceBundleProvider */ public static class Control { @@ -3103,6 +3136,8 @@ public abstract class ResourceBundle { * if an error occurred when reading resources using * any I/O operations * @see java.util.spi.ResourceBundleProvider#getBundle(String, Locale) + * @revised 9 + * @spec JPMS */ public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) diff --git a/jdk/src/java.base/share/classes/java/util/Scanner.java b/jdk/src/java.base/share/classes/java/util/Scanner.java index df075844364..381bcf3e6cc 100644 --- a/jdk/src/java.base/share/classes/java/util/Scanner.java +++ b/jdk/src/java.base/share/classes/java/util/Scanner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ import java.util.stream.StreamSupport; * s.close(); * } * - *

            The default whitespace delimiter used + *

            The default whitespace delimiter used * by a scanner is as recognized by {@link Character#isWhitespace(char) * Character.isWhitespace()}. The {@link #reset reset()} * method will reset the value of the scanner's delimiter to the default @@ -152,11 +152,11 @@ import java.util.stream.StreamSupport; * {@link #reset} method will reset the value of the scanner's radix to * {@code 10} regardless of whether it was previously changed. * - *

            Localized numbers

            + *

            Localized numbers

            * *

            An instance of this class is capable of scanning numbers in the standard * formats as well as in the formats of the scanner's locale. A scanner's - * initial locale is the value returned by the {@link + * initial locale is the value returned by the {@link * java.util.Locale#getDefault(Locale.Category) * Locale.getDefault(Locale.Category.FORMAT)} method; it may be changed via the {@link * #useLocale useLocale()} method. The {@link #reset} method will reset the value of the @@ -213,7 +213,7 @@ import java.util.stream.StreamSupport; * getInfinity()} * * - *

            Number syntax

            + *

            Number syntax

            * *

            The strings that can be parsed as numbers by an instance of this class * are specified in terms of the following regular-expression grammar, where @@ -244,7 +244,7 @@ import java.util.stream.StreamSupport; *

            {@code ( ( }Digit{@code + ) * | }GroupedNumeral{@code )} * - *
            Integer: + *
            Integer: *
            {@code ( [-+]? ( }Numeral{@code * ) )} *
            {@code | }LocalPositivePrefix Numeral @@ -263,7 +263,7 @@ import java.util.stream.StreamSupport; *
            Exponent: *
            {@code ( [eE] [+-]? }Digit{@code + )} * - *
            Decimal: + *
            Decimal: *
            {@code ( [-+]? }DecimalNumeral * Exponent{@code ? )} *
            {@code | }LocalPositivePrefix @@ -294,7 +294,7 @@ import java.util.stream.StreamSupport; * NonNumber * LocalNegativeSuffix * - *
            Float: + *
            Float: *
            Decimal * {@code | }HexFloat * {@code | }SignedNonNumber @@ -2846,6 +2846,7 @@ public final class Scanner implements Iterator, Closeable { class FindSpliterator extends Spliterators.AbstractSpliterator { final Pattern pattern; int expectedCount = -1; + private boolean advance = false; // true if we need to auto-advance FindSpliterator(Pattern pattern) { super(Long.MAX_VALUE, @@ -2861,12 +2862,15 @@ public final class Scanner implements Iterator, Closeable { throw new ConcurrentModificationException(); } } else { + // init + matchValid = false; + matcher.usePattern(pattern); expectedCount = modCount; } while (true) { // assert expectedCount == modCount - if (findPatternInBuffer(pattern, 0)) { // doesn't increment modCount + if (nextInBuffer()) { // doesn't increment modCount cons.accept(matcher.toMatchResult()); if (expectedCount != modCount) { throw new ConcurrentModificationException(); @@ -2879,6 +2883,29 @@ public final class Scanner implements Iterator, Closeable { return false; // reached end of input } } + + // reimplementation of findPatternInBuffer with auto-advance on zero-length matches + private boolean nextInBuffer() { + if (advance) { + if (position + 1 > buf.limit()) { + if (!sourceClosed) + needInput = true; + return false; + } + position++; + advance = false; + } + matcher.region(position, buf.limit()); + if (matcher.find() && (!matcher.hitEnd() || sourceClosed)) { + // Did not hit end, or hit real end + position = matcher.end(); + advance = matcher.start() == position; + return true; + } + if (!sourceClosed) + needInput = true; + return false; + } } /** Small LRU cache of Patterns. */ diff --git a/jdk/src/java.base/share/classes/java/util/ServiceConfigurationError.java b/jdk/src/java.base/share/classes/java/util/ServiceConfigurationError.java index 42db72d2d48..2852384eb4b 100644 --- a/jdk/src/java.base/share/classes/java/util/ServiceConfigurationError.java +++ b/jdk/src/java.base/share/classes/java/util/ServiceConfigurationError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -27,33 +27,12 @@ package java.util; /** - * Error thrown when something goes wrong while loading a service provider. - * - *

            This error will be thrown in the following situations: - * - *

              - * - *
            • The format of a provider-configuration file violates the specification;
            • - * - *
            • An {@link java.io.IOException IOException} occurs while reading a - * provider-configuration file;
            • - * - *
            • A concrete provider class named in a provider-configuration file - * cannot be found;
            • - * - *
            • A concrete provider class is not a subclass of the service class; - *
            • - * - *
            • A concrete provider class cannot be instantiated; or - * - *
            • Some other kind of error occurs.
            • - * - *
            - * + * Error thrown when something goes wrong while locating, loading, or + * instantiating a service provider. * * @author Mark Reinhold * @since 1.6 + * @see ServiceLoader */ public class ServiceConfigurationError diff --git a/jdk/src/java.base/share/classes/java/util/ServiceLoader.java b/jdk/src/java.base/share/classes/java/util/ServiceLoader.java index 0b437d44e2e..72081980298 100644 --- a/jdk/src/java.base/share/classes/java/util/ServiceLoader.java +++ b/jdk/src/java.base/share/classes/java/util/ServiceLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -31,10 +31,8 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Layer; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.net.URL; import java.net.URLConnection; import java.security.AccessControlContext; @@ -48,8 +46,8 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; import jdk.internal.loader.BootLoader; +import jdk.internal.loader.ClassLoaders; import jdk.internal.misc.JavaLangAccess; -import jdk.internal.misc.JavaLangReflectModuleAccess; import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.VM; import jdk.internal.module.ServicesCatalog; @@ -59,184 +57,309 @@ import jdk.internal.reflect.Reflection; /** - * A simple service-provider loading facility. + * A facility to load implementations of a service. * - *

            A service is a well-known set of interfaces and (usually - * abstract) classes. A service provider is a specific implementation - * of a service. The classes in a provider typically implement the interfaces - * and subclass the classes defined in the service itself. - * Providers may be developed and deployed as modules and made available using - * the application module path. Providers may alternatively be packaged as JAR - * files and made available by adding them to the application class path. The - * advantage of developing a provider as a module is that the provider can be - * fully encapsulated to hide all details of its implementation. + *

            A service is a well-known interface or class for which zero, one, + * or many service providers exist. A service provider (or just + * provider) is a class that implements or subclasses the well-known + * interface or class. A {@code ServiceLoader} is an object that locates and + * loads service providers deployed in the run time environment at a time of an + * application's choosing. Application code refers only to the service, not to + * service providers, and is assumed to be capable of differentiating between + * multiple service providers as well as handling the possibility that no service + * providers are located. * - *

            For the purpose of loading, a service is represented by a single type, - * that is, a single interface or abstract class. (A concrete class can be - * used, but this is not recommended.) A provider of a given service contains - * one or more concrete classes that extend this service type with data - * and code specific to the provider. The provider class is typically - * not the entire provider itself but rather a proxy which contains enough - * information to decide whether the provider is able to satisfy a particular - * request together with code that can create the actual provider on demand. - * The details of provider classes tend to be highly service-specific; no - * single class or interface could possibly unify them, so no such type is - * defined here. + *

            Obtaining a service loader

            * - *

            Providers deployed as explicit modules on the module path are - * instantiated by a provider factory or directly via the provider's - * constructor. In the module declaration then the class name specified in the - * provides clause is a provider factory if it is public and defines a - * public static no-args method named "{@code provider}". The return type of - * the method must be assignable to the service type. If the class is - * not a provider factory then it is public with a public zero-argument - * constructor. The requirement that the provider factory or provider class - * be public helps to document the intent that the provider will be - * instantiated by the service-provider loading facility. + *

            An application obtains a service loader for a given service by invoking + * one of the static {@code load} methods of ServiceLoader. If the application + * is a module, then its module declaration must have a uses directive + * that specifies the service; this helps to locate providers and ensure they + * will execute reliably. In addition, if the service is not in the application + * module, then the module declaration must have a requires directive + * that specifies the module which exports the service. * - *

            As an example, suppose a module declares the following: + *

            A service loader can be used to locate and instantiate providers of the + * service by means of the {@link #iterator() iterator} method. {@code ServiceLoader} + * also defines the {@link #stream() stream} method to obtain a stream of providers + * that can be inspected and filtered without instantiating them. + * + *

            As an example, suppose the service is {@code com.example.CodecFactory}, an + * interface that defines methods for producing encoders and decoders: * *

            {@code
            - *     provides com.example.CodecSet with com.example.impl.StandardCodecs;
            - *     provides com.example.CodecSet with com.example.impl.ExtendedCodecsFactory;
            + *     package com.example;
            + *     public interface CodecFactory {
            + *         Encoder getEncoder(String encodingName);
            + *         Decoder getDecoder(String encodingName);
            + *     }
              * }
            * - *

            where {@code com.example.CodecSet} is the service type, {@code - * com.example.impl.StandardCodecs} is a provider class that is public with a - * public no-args constructor, {@code com.example.impl.ExtendedCodecsFactory} - * is a public class that defines a public static no-args method named - * "{@code provider}" with a return type that is {@code CodecSet} or a subtype - * of. For this example then {@code StandardCodecs}'s no-arg constructor will - * be used to instantiate {@code StandardCodecs}. {@code ExtendedCodecsFactory} - * will be treated as a provider factory and {@code - * ExtendedCodecsFactory.provider()} will be invoked to obtain the provider. + *

            The following code obtains a service loader for the {@code CodecFactory} + * service, then uses its iterator (created automatically by the enhanced-for + * loop) to yield instances of the service providers that are located: * - *

            Providers deployed on the class path or as {@link - * java.lang.module.ModuleDescriptor#isAutomatic automatic-modules} on the - * module path must have a public zero-argument constructor. - * - *

            An application or library using this loading facility and developed - * and deployed as an explicit module must have an appropriate uses - * clause in its module descriptor to declare that the module uses - * implementations of the service. A corresponding requirement is that a - * provider deployed as a named module must have an appropriate - * provides clause in its module descriptor to declare that the module - * provides an implementation of the service. The uses and - * provides allow consumers of a service to be linked to modules - * containing providers of the service. - * - *

            A service provider that is packaged as a JAR file for the class path is - * identified by placing a provider-configuration file in the resource - * directory META-INF/services. The file's name is the fully-qualified - * binary name of the service's - * type. The file contains a list of fully-qualified binary names of concrete - * provider classes, one per line. Space and tab characters surrounding each - * name, as well as blank lines, are ignored. The comment character is - * '#' ('\u0023', - * NUMBER SIGN); on - * each line all characters following the first comment character are ignored. - * The file must be encoded in UTF-8. - * If a particular concrete provider class is named in more than one - * configuration file, or is named in the same configuration file more than - * once, then the duplicates are ignored. The configuration file naming a - * particular provider need not be in the same JAR file or other distribution - * unit as the provider itself. The provider must be visible from the same - * class loader that was initially queried to locate the configuration file; - * note that this is not necessarily the class loader from which the file was - * actually loaded. - * - *

            Providers are located and instantiated lazily, that is, on demand. A - * service loader maintains a cache of the providers that have been loaded so - * far. Each invocation of the {@link #iterator iterator} method returns an - * iterator that first yields all of the elements cached from previous - * iteration, in instantiation order, and then lazily locates and instantiates - * any remaining providers, adding each one to the cache in turn. Similarly, - * each invocation of the {@link #stream stream} method returns a stream that - * first processes all providers loaded by previous stream operations, in load - * order, and then lazily locates any remaining providers. Caches are cleared - * via the {@link #reload reload} method. - * - *

            Locating providers

            - * - *

            The {@code load} methods locate providers using a class loader or module - * {@link Layer layer}. When locating providers using a class loader then - * providers in both named and unnamed modules may be located. When locating - * providers using a module layer then only providers in named modules in - * the layer (or parent layers) are located. - * - *

            When locating providers using a class loader then any providers in named - * modules defined to the class loader, or any class loader that is reachable - * via parent delegation, are located. Additionally, providers in module layers - * other than the {@link Layer#boot() boot} layer, where the module layer - * contains modules defined to the class loader, or any class loader reachable - * via parent delegation, are also located. For example, suppose there is a - * module layer where each module is defined to its own class loader (see {@link - * Layer#defineModulesWithManyLoaders defineModulesWithManyLoaders}). If the - * {@code load} method is invoked to locate providers using any of these class - * loaders for this layer then it will locate all of the providers in that - * layer, irrespective of their defining class loader. - * - *

            In the case of unnamed modules then the service configuration files are - * located using the class loader's {@link ClassLoader#getResources(String) - * ClassLoader.getResources(String)} method. Any providers listed should be - * visible via the class loader specified to the {@code load} method. If a - * provider in a named module is listed then it is ignored - this is to avoid - * duplicates that would otherwise arise when a module has both a - * provides clause and a service configuration file in {@code - * META-INF/services} that lists the same provider. - * - *

            Ordering

            - * - *

            Service loaders created to locate providers using a {@code ClassLoader} - * locate providers as follows: - *

              - *
            • Providers in named modules are located before providers on the - * class path (or more generally, unnamed modules).
            • - * - *
            • When locating providers in named modules then the service loader - * will locate providers in modules defined to the class loader, then its - * parent class loader, its parent parent, and so on to the bootstrap class - * loader. If a {@code ClassLoader}, or any class loader in the parent - * delegation chain, defines modules in a custom module {@link Layer} then - * all providers in that layer are located, irrespective of their class - * loader. The ordering of modules defined to the same class loader, or the - * ordering of modules in a layer, is not defined.
            • - * - *
            • If a named module declares more than one provider then the providers - * are located in the order that they appear in the {@code provides} table of - * the {@code Module} class file attribute ({@code module-info.class}).
            • - * - *
            • When locating providers in unnamed modules then the ordering is - * based on the order that the class loader's {@link - * ClassLoader#getResources(String) ClassLoader.getResources(String)} - * method finds the service configuration files.
            • - *
            - * - *

            Service loaders created to locate providers in a module {@link Layer} - * will first locate providers in the layer, before locating providers in - * parent layers. Traversal of parent layers is depth-first with each layer - * visited at most once. For example, suppose L0 is the boot layer, L1 and - * L2 are custom layers with L0 as their parent. Now suppose that L3 is - * created with L1 and L2 as the parents (in that order). Using a service - * loader to locate providers with L3 as the content will locate providers - * in the following order: L3, L1, L0, L2. The ordering of modules in a layer - * is not defined. - * - *

            Selection and filtering

            - * - *

            Selecting a provider or filtering providers will usually involve invoking - * a provider method. Where selection or filtering based on the provider class is - * needed then it can be done using a {@link #stream() stream}. For example, the - * following collects the providers that have a specific annotation: *

            {@code
            - *     Set providers = ServiceLoader.load(CodecSet.class)
            - *            .stream()
            - *            .filter(p -> p.type().isAnnotationPresent(Managed.class))
            - *            .map(Provider::get)
            + *     ServiceLoader loader = ServiceLoader.load(CodecFactory.class);
            + *     for (CodecFactory factory : loader) {
            + *         Encoder enc = factory.getEncoder("PNG");
            + *         if (enc != null)
            + *             ... use enc to encode a PNG file
            + *             break;
            + *         }
            + * }
            + * + *

            If this code resides in a module, then in order to refer to the + * {@code com.example.CodecFactory} interface, the module declaration would + * require the module which exports the interface. The module declaration would + * also specify use of {@code com.example.CodecFactory}: + *

            {@code
            + *     requires com.example.codec.core;
            + *     uses com.example.CodecFactory;
            + * }
            + * + *

            Sometimes an application may wish to inspect a service provider before + * instantiating it, in order to determine if an instance of that service + * provider would be useful. For example, a service provider for {@code + * CodecFactory} that is capable of producing a "PNG" encoder may be annotated + * with {@code @PNG}. The following code uses service loader's {@code stream} + * method to yield instances of {@code Provider} in contrast to + * how the iterator yields instances of {@code CodecFactory}: + *

            {@code
            + *     ServiceLoader loader = ServiceLoader.load(CodecFactory.class);
            + *     Set pngFactories = loader
            + *            .stream()                                              // Note a below
            + *            .filter(p -> p.type().isAnnotationPresent(PNG.class))  // Note b
            + *            .map(Provider::get)                                    // Note c
              *            .collect(Collectors.toSet());
              * }
            + *
              + *
            1. A stream of {@code Provider} objects
            2. + *
            3. {@code p.type()} yields a {@code Class}
            4. + *
            5. {@code get()} yields an instance of {@code CodecFactory}
            6. + *
            * - *

            Security

            + *

            Designing services

            + * + *

            A service is a single type, usually an interface or abstract class. A + * concrete class can be used, but this is not recommended. The type may have + * any accessibility. The methods of a service are highly domain-specific, so + * this API specification cannot give concrete advice about their form or + * function. However, there are two general guidelines: + *

              + *
            1. A service should declare as many methods as needed to allow service + * providers to communicate their domain-specific properties and other + * quality-of-implementation factors. An application which obtains a service + * loader for the service may then invoke these methods on each instance of + * a service provider, in order to choose the best provider for the + * application.

            2. + *
            3. A service should express whether its service providers are intended + * to be direct implementations of the service or to be an indirection + * mechanism such as a "proxy" or a "factory". Service providers tend to be + * indirection mechanisms when domain-specific objects are relatively + * expensive to instantiate; in this case, the service should be designed + * so that service providers are abstractions which create the "real" + * implementation on demand. For example, the {@code CodecFactory} service + * expresses through its name that its service providers are factories + * for codecs, rather than codecs themselves, because it may be expensive + * or complicated to produce certain codecs.

            4. + *
            + * + *

            Developing service providers

            + * + *

            A service provider is a single type, usually a concrete class. An + * interface or abstract class is permitted because it may declare a static + * provider method, discussed later. The type must be public and must not be + * an inner class. + * + *

            A service provider and its supporting code may be developed in a module, + * which is then deployed on the application module path or in a modular + * image. Alternatively, a service provider and its supporting code may be + * packaged as a JAR file and deployed on the application class path. The + * advantage of developing a service provider in a module is that the provider + * can be fully encapsulated to hide all details of its implementation. + * + *

            An application that obtains a service loader for a given service is + * indifferent to whether providers of the service are deployed in modules or + * packaged as JAR files. The application instantiates service providers via + * the service loader's iterator, or via {@link Provider Provider} objects in + * the service loader's stream, without knowledge of the service providers' + * locations. + * + *

            Deploying service providers as modules

            + * + *

            A service provider that is developed in a module must be specified in a + * provides directive in the module declaration. The provides directive + * specifies both the service and the service provider; this helps to locate the + * provider when another module, with a uses directive for the service, + * obtains a service loader for the service. It is strongly recommended that the + * module does not export the package containing the service provider. There is + * no support for a module specifying, in a provides directive, a service + * provider in another module. + + *

            A service provider that is developed in a module has no control over when + * it is instantiated, since that occurs at the behest of the application, but it + * does have control over how it is instantiated: + * + *

              + * + *
            • If the service provider declares a provider method, then the service + * loader invokes that method to obtain an instance of the service provider. A + * provider method is a public static method named "provider" with no formal + * parameters and a return type that is assignable to the service's interface + * or class. + *

              In this case, the service provider itself need not be assignable to the + * service's interface or class.

            • + * + *
            • If the service provider does not declare a provider method, then the + * service provider is instantiated directly, via its provider constructor. A + * provider constructor is a public constructor with no formal parameters. + *

              In this case, the service provider must be assignable to the service's + * interface or class

            • + * + *
            + * + *

            A service provider that is deployed as an + * {@linkplain java.lang.module.ModuleDescriptor#isAutomatic automatic module} on + * the application module path must have a provider constructor. There is no + * support for a provider method in this case. + * + *

            As an example, suppose a module specifies the following directives: + *

            {@code
            + *     provides com.example.CodecFactory with com.example.impl.StandardCodecs;
            + *     provides com.example.CodecFactory with com.example.impl.ExtendedCodecsFactory;
            + * }
            + * + *

            where + * + *

              + *
            • {@code com.example.CodecFactory} is the two-method service from + * earlier.
            • + * + *
            • {@code com.example.impl.StandardCodecs} is a public class that implements + * {@code CodecFactory} and has a public no-args constructor.
            • + * + *
            • {@code com.example.impl.ExtendedCodecsFactory} is a public class that + * does not implement CodecFactory, but it declares a public static no-args + * method named "provider" with a return type of {@code CodecFactory}.
            • + *
            + * + *

            A service loader will instantiate {@code StandardCodecs} via its + * constructor, and will instantiate {@code ExtendedCodecsFactory} by invoking + * its {@code provider} method. The requirement that the provider constructor or + * provider method is public helps to document the intent that the class (that is, + * the service provider) will be instantiated by an entity (that is, a service + * loader) which is outside the class's package. + * + *

            Deploying service providers on the class path

            + * + * A service provider that is packaged as a JAR file for the class path is + * identified by placing a provider-configuration file in the resource + * directory {@code META-INF/services}. The name of the provider-configuration + * file is the fully qualified binary name of the service. The provider-configuration + * file contains a list of fully qualified binary names of service providers, one + * per line. + * + *

            For example, suppose the service provider + * {@code com.example.impl.StandardCodecs} is packaged in a JAR file for the + * class path. The JAR file will contain a provider-configuration file named: + * + *

            {@code + * META-INF/services/com.example.CodecFactory + * }
            + * + * that contains the line: + * + *
            {@code + * com.example.impl.StandardCodecs # Standard codecs + * }
            + * + *

            The provider-configuration file must be encoded in UTF-8. + * Space and tab characters surrounding each service provider's name, as well as + * blank lines, are ignored. The comment character is {@code '#'} + * ({@code '\u0023'} NUMBER SIGN); + * on each line all characters following the first comment character are ignored. + * If a service provider class name is listed more than once in a + * provider-configuration file then the duplicate is ignored. If a service + * provider class is named in more than one configuration file then the duplicate + * is ignored. + * + *

            A service provider that is mentioned in a provider-configuration file may + * be located in the same JAR file as the provider-configuration file or in a + * different JAR file. The service provider must be visible from the class loader + * that is initially queried to locate the provider-configuration file; this is + * not necessarily the class loader which ultimately locates the + * provider-configuration file. + * + *

            Timing of provider discovery

            + * + *

            Service providers are loaded and instantiated lazily, that is, on demand. + * A service loader maintains a cache of the providers that have been loaded so + * far. Each invocation of the {@code iterator} method returns an {@code Iterator} + * that first yields all of the elements cached from previous iteration, in + * instantiation order, and then lazily locates and instantiates any remaining + * providers, adding each one to the cache in turn. Similarly, each invocation + * of the stream method returns a {@code Stream} that first processes all + * providers loaded by previous stream operations, in load order, and then lazily + * locates any remaining providers. Caches are cleared via the {@link #reload + * reload} method. + * + *

            Errors

            + * + *

            When using the service loader's {@code iterator}, the {@link + * Iterator#hasNext() hasNext} and {@link Iterator#next() next} methods will + * fail with {@link ServiceConfigurationError} if an error occurs locating, + * loading or instantiating a service provider. When processing the service + * loader's stream then {@code ServiceConfigurationError} may be thrown by any + * method that causes a service provider to be located or loaded. + * + *

            When loading or instantiating a service provider in a module, {@code + * ServiceConfigurationError} can be thrown for the following reasons: + * + *

              + * + *
            • The service provider cannot be loaded.
            • + * + *
            • The service provider does not declare a provider method, and either + * it is not assignable to the service's interface/class or does not have a + * provider constructor.
            • + * + *
            • The service provider declares a public static no-args method named + * "provider" with a return type that is not assignable to the service's + * interface or class.
            • + * + *
            • The service provider class file has more than one public static + * no-args method named "{@code provider}".
            • + * + *
            • The service provider declares a provider method and it fails by + * returning {@code null} or throwing an exception.
            • + * + *
            • The service provider does not declare a provider method, and its + * provider constructor fails by throwing an exception.
            • + * + *
            + * + *

            When reading a provider-configuration file, or loading or instantiating + * a provider class named in a provider-configuration file, then {@code + * ServiceConfigurationError} can be thrown for the following reasons: + * + *

              + * + *
            • The format of the provider-configuration file violates the format specified above;
            • + * + *
            • An {@link IOException IOException} occurs while reading the + * provider-configuration file;
            • + * + *
            • A service provider cannot be loaded;
            • + * + *
            • A service provider is not assignable to the service's interface or + * class, or does not define a provider constructor, or cannot be + * instantiated.
            • + * + *
            + * + *

            Security

            * *

            Service loaders always execute in the security context of the caller * of the iterator or stream methods and may also be restricted by the security @@ -245,96 +368,23 @@ import jdk.internal.reflect.Reflection; * the methods of the iterators which they return, from within a privileged * security context. * - *

            Concurrency

            + *

            Concurrency

            * *

            Instances of this class are not safe for use by multiple concurrent * threads. * - *

            Null handling

            + *

            Null handling

            * *

            Unless otherwise specified, passing a {@code null} argument to any * method in this class will cause a {@link NullPointerException} to be thrown. * - *

            Example

            - *

            Suppose we have a service type com.example.CodecSet which is - * intended to represent sets of encoder/decoder pairs for some protocol. In - * this case it is an abstract class with two abstract methods: - * - *

            - * public abstract Encoder getEncoder(String encodingName);
            - * public abstract Decoder getDecoder(String encodingName);
            - * - * Each method returns an appropriate object or null if the provider - * does not support the given encoding. Typical providers support more than - * one encoding. - * - *

            The CodecSet class creates and saves a single service instance - * at initialization: - * - *

            {@code
            - * private static ServiceLoader codecSetLoader
            - *     = ServiceLoader.load(CodecSet.class);
            - * }
            - * - *

            To locate an encoder for a given encoding name it defines a static - * factory method which iterates through the known and available providers, - * returning only when it has located a suitable encoder or has run out of - * providers. - * - *

            {@code
            - * public static Encoder getEncoder(String encodingName) {
            - *     for (CodecSet cp : codecSetLoader) {
            - *         Encoder enc = cp.getEncoder(encodingName);
            - *         if (enc != null)
            - *             return enc;
            - *     }
            - *     return null;
            - * }}
            - * - *

            A {@code getDecoder} method is defined similarly. - * - *

            If the code creating and using the service loader is developed as - * a module then its module descriptor will declare the usage with: - *

            {@code uses com.example.CodecSet;}
            - * - *

            Now suppose that {@code com.example.impl.StandardCodecs} is an - * implementation of the {@code CodecSet} service and developed as a module. - * In that case then the module with the service provider module will declare - * this in its module descriptor: - *

            {@code provides com.example.CodecSet with com.example.impl.StandardCodecs;
            - * }
            - * - *

            On the other hand, suppose {@code com.example.impl.StandardCodecs} is - * packaged in a JAR file for the class path then the JAR file will contain a - * file named: - *

            {@code META-INF/services/com.example.CodecSet}
            - * that contains the single line: - *
            {@code com.example.impl.StandardCodecs    # Standard codecs}
            - * - *

            Usage Note If - * the class path of a class loader that is used for provider loading includes - * remote network URLs then those URLs will be dereferenced in the process of - * searching for provider-configuration files. - * - *

            This activity is normal, although it may cause puzzling entries to be - * created in web-server logs. If a web server is not configured correctly, - * however, then this activity may cause the provider-loading algorithm to fail - * spuriously. - * - *

            A web server should return an HTTP 404 (Not Found) response when a - * requested resource does not exist. Sometimes, however, web servers are - * erroneously configured to return an HTTP 200 (OK) response along with a - * helpful HTML error page in such cases. This will cause a {@link - * ServiceConfigurationError} to be thrown when this class attempts to parse - * the HTML page as a provider-configuration file. The best solution to this - * problem is to fix the misconfigured web server to return the correct - * response code (HTTP 404) along with the HTML error page. - * * @param * The type of the service to be loaded by this loader * * @author Mark Reinhold * @since 1.6 + * @revised 9 + * @spec JPMS */ public final class ServiceLoader @@ -346,12 +396,12 @@ public final class ServiceLoader // The class of the service type private final String serviceName; - // The module Layer used to locate providers; null when locating + // The module layer used to locate providers; null when locating // providers using a class loader - private final Layer layer; + private final ModuleLayer layer; // The class loader used to locate, load, and instantiate providers; - // null when locating provider using a module Layer + // null when locating provider using a module layer private final ClassLoader loader; // The access control context taken when the ServiceLoader is created @@ -370,10 +420,8 @@ public final class ServiceLoader private int reloadCount; private static JavaLangAccess LANG_ACCESS; - private static JavaLangReflectModuleAccess JLRM_ACCESS; static { LANG_ACCESS = SharedSecrets.getJavaLangAccess(); - JLRM_ACCESS = SharedSecrets.getJavaLangReflectModuleAccess(); } /** @@ -386,6 +434,7 @@ public final class ServiceLoader * * @param The service type * @since 9 + * @spec JPMS */ public static interface Provider extends Supplier { /** @@ -418,13 +467,13 @@ public final class ServiceLoader /** * Initializes a new instance of this class for locating service providers - * in a module Layer. + * in a module layer. * * @throws ServiceConfigurationError * If {@code svc} is not accessible to {@code caller} or the caller * module does not use the service type. */ - private ServiceLoader(Class caller, Layer layer, Class svc) { + private ServiceLoader(Class caller, ModuleLayer layer, Class svc) { Objects.requireNonNull(caller); Objects.requireNonNull(layer); Objects.requireNonNull(svc); @@ -505,12 +554,15 @@ public final class ServiceLoader /** * Checks that the given service type is accessible to types in the given - * module, and check that the module declare that it uses the service type. ?? + * module, and check that the module declares that it uses the service type. */ private static void checkCaller(Class caller, Class svc) { - Module callerModule = caller.getModule(); + if (caller == null) { + fail(svc, "no caller to check if it declares `uses`"); + } // Check access to the service type + Module callerModule = caller.getModule(); int mods = svc.getModifiers(); if (!Reflection.verifyMemberAccess(caller, svc, null, mods)) { fail(svc, "service type not accessible to " + callerModule); @@ -543,32 +595,83 @@ public final class ServiceLoader } /** - * Uses Class.forName to load a provider class in a module. - * - * @throws ServiceConfigurationError - * If the class cannot be loaded + * Returns {@code true} if the provider is in an explicit module */ - private Class loadProviderInModule(Module module, String cn) { - Class clazz = null; - if (acc == null) { - try { - clazz = Class.forName(module, cn); - } catch (LinkageError e) { - fail(service, "Unable to load " + cn, e); - } - } else { - PrivilegedExceptionAction> pa = () -> Class.forName(module, cn); - try { - clazz = AccessController.doPrivileged(pa); - } catch (PrivilegedActionException pae) { - Throwable x = pae.getCause(); - fail(service, "Unable to load " + cn, x); - return null; + private boolean inExplicitModule(Class clazz) { + Module module = clazz.getModule(); + return module.isNamed() && !module.getDescriptor().isAutomatic(); + } + + /** + * Returns the public static "provider" method if found. + * + * @throws ServiceConfigurationError if there is an error finding the + * provider method or there is more than one public static + * provider method + */ + private Method findStaticProviderMethod(Class clazz) { + List methods = null; + try { + methods = LANG_ACCESS.getDeclaredPublicMethods(clazz, "provider"); + } catch (Throwable x) { + fail(service, "Unable to get public provider() method", x); + } + if (methods.isEmpty()) { + // does not declare a public provider method + return null; + } + + // locate the static methods, can be at most one + Method result = null; + for (Method method : methods) { + int mods = method.getModifiers(); + assert Modifier.isPublic(mods); + if (Modifier.isStatic(mods)) { + if (result != null) { + fail(service, clazz + " declares more than one" + + " public static provider() method"); + } + result = method; } } - if (clazz == null) - fail(service, "Provider " + cn + " not found"); - return clazz; + if (result != null) { + Method m = result; + PrivilegedAction pa = () -> { + m.setAccessible(true); + return null; + }; + AccessController.doPrivileged(pa); + } + return result; + } + + /** + * Returns the public no-arg constructor of a class. + * + * @throws ServiceConfigurationError if the class does not have + * public no-arg constructor + */ + private Constructor getConstructor(Class clazz) { + PrivilegedExceptionAction> pa + = new PrivilegedExceptionAction<>() { + @Override + public Constructor run() throws Exception { + Constructor ctor = clazz.getConstructor(); + if (inExplicitModule(clazz)) + ctor.setAccessible(true); + return ctor; + } + }; + Constructor ctor = null; + try { + ctor = AccessController.doPrivileged(pa); + } catch (Throwable x) { + if (x instanceof PrivilegedActionException) + x = x.getCause(); + String cn = clazz.getName(); + fail(service, cn + " Unable to get public no-arg constructor", x); + } + return ctor; } /** @@ -576,65 +679,33 @@ public final class ServiceLoader * permissions, the static factory to obtain the provider or the * provider's no-arg constructor. */ - private final static class ProviderImpl implements Provider { + private static class ProviderImpl implements Provider { final Class service; + final Class type; + final Method factoryMethod; // factory method or null + final Constructor ctor; // public no-args constructor or null final AccessControlContext acc; - final Method factoryMethod; // factory method or null - final Class type; - final Constructor ctor; // public no-args constructor or null - - /** - * Creates a Provider. - * - * @param service - * The service type - * @param clazz - * The provider (or provider factory) class - * @param acc - * The access control context when running with security manager - * - * @throws ServiceConfigurationError - * If the class is not public; If the class defines a public - * static provider() method with a return type that is assignable - * to the service type or the class is not a provider class with - * a public no-args constructor. - */ - @SuppressWarnings("unchecked") - ProviderImpl(Class service, Class clazz, AccessControlContext acc) { - this.service = (Class) service; - this.acc = acc; - - int mods = clazz.getModifiers(); - if (!Modifier.isPublic(mods)) { - fail(service, clazz + " is not public"); - } - - // if the class is in an explicit module then see if it is - // a provider factory class - Method factoryMethod = null; - if (inExplicitModule(clazz)) { - factoryMethod = findStaticProviderMethod(clazz); - if (factoryMethod != null) { - Class returnType = factoryMethod.getReturnType(); - if (!service.isAssignableFrom(returnType)) { - fail(service, factoryMethod + " return type not a subtype"); - } - } - } + ProviderImpl(Class service, + Class type, + Method factoryMethod, + AccessControlContext acc) { + this.service = service; + this.type = type; this.factoryMethod = factoryMethod; + this.ctor = null; + this.acc = acc; + } - if (factoryMethod == null) { - // no factory method so must have a public no-args constructor - if (!service.isAssignableFrom(clazz)) { - fail(service, clazz.getName() + " not a subtype"); - } - this.type = (Class) clazz; - this.ctor = (Constructor) getConstructor(clazz); - } else { - this.type = (Class) factoryMethod.getReturnType(); - this.ctor = null; - } + ProviderImpl(Class service, + Class type, + Constructor ctor, + AccessControlContext acc) { + this.service = service; + this.type = type; + this.factoryMethod = null; + this.ctor = ctor; + this.acc = acc; } @Override @@ -651,72 +722,6 @@ public final class ServiceLoader } } - /** - * Returns {@code true} if the provider is in an explicit module - */ - private boolean inExplicitModule(Class clazz) { - Module module = clazz.getModule(); - return module.isNamed() && !module.getDescriptor().isAutomatic(); - } - - /** - * Returns the public static provider method if found. - * - * @throws ServiceConfigurationError if there is an error finding the - * provider method - */ - private Method findStaticProviderMethod(Class clazz) { - Method method = null; - try { - method = LANG_ACCESS.getMethodOrNull(clazz, "provider"); - } catch (Throwable x) { - fail(service, "Unable to get public provider() method", x); - } - if (method != null) { - int mods = method.getModifiers(); - if (Modifier.isStatic(mods)) { - assert Modifier.isPublic(mods); - Method m = method; - PrivilegedAction pa = () -> { - m.setAccessible(true); - return null; - }; - AccessController.doPrivileged(pa); - return method; - } - } - return null; - } - - /** - * Returns the public no-arg constructor of a class. - * - * @throws ServiceConfigurationError if the class does not have - * public no-arg constructor - */ - private Constructor getConstructor(Class clazz) { - PrivilegedExceptionAction> pa - = new PrivilegedExceptionAction<>() { - @Override - public Constructor run() throws Exception { - Constructor ctor = clazz.getConstructor(); - if (inExplicitModule(clazz)) - ctor.setAccessible(true); - return ctor; - } - }; - Constructor ctor = null; - try { - ctor = AccessController.doPrivileged(pa); - } catch (Throwable x) { - if (x instanceof PrivilegedActionException) - x = x.getCause(); - String cn = clazz.getName(); - fail(service, cn + " Unable to get public no-arg constructor", x); - } - return ctor; - } - /** * Invokes the provider's "provider" method to instantiate a provider. * When running with a security manager then the method runs with @@ -803,7 +808,7 @@ public final class ServiceLoader @Override public int hashCode() { - return Objects.hash(type, acc); + return Objects.hash(service, type, acc); } @Override @@ -812,62 +817,139 @@ public final class ServiceLoader return false; @SuppressWarnings("unchecked") ProviderImpl that = (ProviderImpl)ob; - return this.type == that.type + return this.service == that.service + && this.type == that.type && Objects.equals(this.acc, that.acc); } } + /** + * Loads a service provider in a module. + * + * Returns {@code null} if the service provider's module doesn't read + * the module with the service type. + * + * @throws ServiceConfigurationError if the class cannot be loaded or + * isn't the expected sub-type (or doesn't define a provider + * factory method that returns the expected type) + */ + private Provider loadProvider(ServiceProvider provider) { + Module module = provider.module(); + if (!module.canRead(service.getModule())) { + // module does not read the module with the service type + return null; + } + + String cn = provider.providerName(); + Class clazz = null; + if (acc == null) { + try { + clazz = Class.forName(module, cn); + } catch (LinkageError e) { + fail(service, "Unable to load " + cn, e); + } + } else { + PrivilegedExceptionAction> pa = () -> Class.forName(module, cn); + try { + clazz = AccessController.doPrivileged(pa); + } catch (PrivilegedActionException pae) { + Throwable x = pae.getCause(); + fail(service, "Unable to load " + cn, x); + return null; + } + } + if (clazz == null) { + fail(service, "Provider " + cn + " not found"); + } + + int mods = clazz.getModifiers(); + if (!Modifier.isPublic(mods)) { + fail(service, clazz + " is not public"); + } + + // if provider in explicit module then check for static factory method + if (inExplicitModule(clazz)) { + Method factoryMethod = findStaticProviderMethod(clazz); + if (factoryMethod != null) { + Class returnType = factoryMethod.getReturnType(); + if (!service.isAssignableFrom(returnType)) { + fail(service, factoryMethod + " return type not a subtype"); + } + + @SuppressWarnings("unchecked") + Class type = (Class) returnType; + return new ProviderImpl(service, type, factoryMethod, acc); + } + } + + // no factory method so must be a subtype + if (!service.isAssignableFrom(clazz)) { + fail(service, clazz.getName() + " not a subtype"); + } + + @SuppressWarnings("unchecked") + Class type = (Class) clazz; + @SuppressWarnings("unchecked") + Constructor ctor = (Constructor ) getConstructor(clazz); + return new ProviderImpl(service, type, ctor, acc); + } + /** * Implements lazy service provider lookup of service providers that - * are provided by modules in a module Layer (or parent layers) + * are provided by modules in a module layer (or parent layers) */ private final class LayerLookupIterator implements Iterator> { - Deque stack = new ArrayDeque<>(); - Set visited = new HashSet<>(); + Deque stack = new ArrayDeque<>(); + Set visited = new HashSet<>(); Iterator iterator; - ServiceProvider next; // next provider to load + + Provider nextProvider; + ServiceConfigurationError nextError; LayerLookupIterator() { visited.add(layer); stack.push(layer); } - private Iterator providers(Layer layer) { - ServicesCatalog catalog = JLRM_ACCESS.getServicesCatalog(layer); + private Iterator providers(ModuleLayer layer) { + ServicesCatalog catalog = LANG_ACCESS.getServicesCatalog(layer); return catalog.findServices(serviceName).iterator(); } @Override public boolean hasNext() { - // already have the next provider cached - if (next != null) - return true; + while (nextProvider == null && nextError == null) { + // get next provider to load + while (iterator == null || !iterator.hasNext()) { + // next layer (DFS order) + if (stack.isEmpty()) + return false; - while (true) { - - // next provider (or provider factory) - if (iterator != null && iterator.hasNext()) { - next = iterator.next(); - return true; - } - - // next layer (DFS order) - if (stack.isEmpty()) - return false; - - Layer layer = stack.pop(); - List parents = layer.parents(); - for (int i = parents.size() - 1; i >= 0; i--) { - Layer parent = parents.get(i); - if (!visited.contains(parent)) { - visited.add(parent); - stack.push(parent); + ModuleLayer layer = stack.pop(); + List parents = layer.parents(); + for (int i = parents.size() - 1; i >= 0; i--) { + ModuleLayer parent = parents.get(i); + if (!visited.contains(parent)) { + visited.add(parent); + stack.push(parent); + } } + iterator = providers(layer); + } + + // attempt to load provider + ServiceProvider provider = iterator.next(); + try { + @SuppressWarnings("unchecked") + Provider next = (Provider) loadProvider(provider); + nextProvider = next; + } catch (ServiceConfigurationError e) { + nextError = e; } - iterator = providers(layer); } + return true; } @Override @@ -875,15 +957,16 @@ public final class ServiceLoader if (!hasNext()) throw new NoSuchElementException(); - // take next provider - ServiceProvider provider = next; - next = null; - - // attempt to load provider - Module module = provider.module(); - String cn = provider.providerName(); - Class clazz = loadProviderInModule(module, cn); - return new ProviderImpl(service, clazz, acc); + Provider provider = nextProvider; + if (provider != null) { + nextProvider = null; + return provider; + } else { + ServiceConfigurationError e = nextError; + assert e != null; + nextError = null; + throw e; + } } } @@ -897,7 +980,9 @@ public final class ServiceLoader { ClassLoader currentLoader; Iterator iterator; - ServiceProvider next; // next provider to load + + Provider nextProvider; + ServiceConfigurationError nextError; ModuleServicesLookupIterator() { this.currentLoader = loader; @@ -908,67 +993,88 @@ public final class ServiceLoader * Returns iterator to iterate over the implementations of {@code * service} in the given layer. */ - private List providers(Layer layer) { - ServicesCatalog catalog = JLRM_ACCESS.getServicesCatalog(layer); + private List providers(ModuleLayer layer) { + ServicesCatalog catalog = LANG_ACCESS.getServicesCatalog(layer); return catalog.findServices(serviceName); } + /** + * Returns the class loader that a module is defined to + */ + private ClassLoader loaderFor(Module module) { + SecurityManager sm = System.getSecurityManager(); + if (sm == null) { + return module.getClassLoader(); + } else { + PrivilegedAction pa = module::getClassLoader; + return AccessController.doPrivileged(pa); + } + } + /** * Returns an iterator to iterate over the implementations of {@code * service} in modules defined to the given class loader or in custom * layers with a module defined to this class loader. */ private Iterator iteratorFor(ClassLoader loader) { - - // modules defined to this class loader + // modules defined to the class loader ServicesCatalog catalog; if (loader == null) { catalog = BootLoader.getServicesCatalog(); } else { catalog = ServicesCatalog.getServicesCatalogOrNull(loader); } - Stream stream1; + List providers; if (catalog == null) { - stream1 = Stream.empty(); + providers = List.of(); } else { - stream1 = catalog.findServices(serviceName).stream(); + providers = catalog.findServices(serviceName); } - // modules in custom layers that define modules to the class loader - Stream stream2; - if (loader == null) { - stream2 = Stream.empty(); + // modules in layers that define modules to the class loader + ClassLoader platformClassLoader = ClassLoaders.platformClassLoader(); + if (loader == null || loader == platformClassLoader) { + return providers.iterator(); } else { - Layer bootLayer = Layer.boot(); - stream2 = JLRM_ACCESS.layers(loader) - .filter(l -> (l != bootLayer)) - .map(l -> providers(l)) - .flatMap(List::stream); + List allProviders = new ArrayList<>(providers); + Iterator iterator = LANG_ACCESS.layers(loader).iterator(); + while (iterator.hasNext()) { + ModuleLayer layer = iterator.next(); + for (ServiceProvider sp : providers(layer)) { + ClassLoader l = loaderFor(sp.module()); + if (l != null && l != platformClassLoader) { + allProviders.add(sp); + } + } + } + return allProviders.iterator(); } - - return Stream.concat(stream1, stream2).iterator(); } @Override public boolean hasNext() { - // already have the next provider cached - if (next != null) - return true; - - while (true) { - if (iterator.hasNext()) { - next = iterator.next(); - return true; + while (nextProvider == null && nextError == null) { + // get next provider to load + while (!iterator.hasNext()) { + if (currentLoader == null) { + return false; + } else { + currentLoader = currentLoader.getParent(); + iterator = iteratorFor(currentLoader); + } } - // move to the next class loader if possible - if (currentLoader == null) { - return false; - } else { - currentLoader = currentLoader.getParent(); - iterator = iteratorFor(currentLoader); + // attempt to load provider + ServiceProvider provider = iterator.next(); + try { + @SuppressWarnings("unchecked") + Provider next = (Provider) loadProvider(provider); + nextProvider = next; + } catch (ServiceConfigurationError e) { + nextError = e; } } + return true; } @Override @@ -976,15 +1082,16 @@ public final class ServiceLoader if (!hasNext()) throw new NoSuchElementException(); - // take next provider - ServiceProvider provider = next; - next = null; - - // attempt to load provider - Module module = provider.module(); - String cn = provider.providerName(); - Class clazz = loadProviderInModule(module, cn); - return new ProviderImpl(service, clazz, acc); + Provider provider = nextProvider; + if (provider != null) { + nextProvider = null; + return provider; + } else { + ServiceConfigurationError e = nextError; + assert e != null; + nextError = null; + throw e; + } } } @@ -998,16 +1105,18 @@ public final class ServiceLoader { static final String PREFIX = "META-INF/services/"; + Set providerNames = new HashSet<>(); // to avoid duplicates Enumeration configs; Iterator pending; - Class nextClass; - String nextErrorMessage; // when hasNext fails with CNFE + + Provider nextProvider; + ServiceConfigurationError nextError; LazyClassPathLookupIterator() { } /** * Parse a single line from the given configuration file, adding the - * name on the line to the names list. + * name on the line to set of names if not already seen. */ private int parseLine(URL u, BufferedReader r, int lc, Set names) throws IOException @@ -1032,7 +1141,9 @@ public final class ServiceLoader if (!Character.isJavaIdentifierPart(cp) && (cp != '.')) fail(service, u, lc, "Illegal provider-class name: " + ln); } - names.add(ln); + if (providerNames.add(ln)) { + names.add(ln); + } } return lc + 1; } @@ -1058,42 +1169,71 @@ public final class ServiceLoader return names.iterator(); } - private boolean hasNextService() { - if (nextClass != null || nextErrorMessage != null) { - return true; - } - - Class clazz = null; - do { - if (configs == null) { - try { - String fullName = PREFIX + service.getName(); - if (loader == null) - configs = ClassLoader.getSystemResources(fullName); - else - configs = loader.getResources(fullName); - } catch (IOException x) { - fail(service, "Error locating configuration files", x); - } - } - while ((pending == null) || !pending.hasNext()) { - if (!configs.hasMoreElements()) { - return false; - } - pending = parse(configs.nextElement()); - } - String cn = pending.next(); + /** + * Loads and returns the next provider class. + */ + private Class nextProviderClass() { + if (configs == null) { try { - clazz = Class.forName(cn, false, loader); - } catch (ClassNotFoundException x) { - // don't throw SCE here to long standing behavior - nextErrorMessage = "Provider " + cn + " not found"; - return true; + String fullName = PREFIX + service.getName(); + if (loader == null) { + configs = ClassLoader.getSystemResources(fullName); + } else if (loader == ClassLoaders.platformClassLoader()) { + // The platform classloader doesn't have a class path, + // but the boot loader might. + if (BootLoader.hasClassPath()) { + configs = BootLoader.findResources(fullName); + } else { + configs = Collections.emptyEnumeration(); + } + } else { + configs = loader.getResources(fullName); + } + } catch (IOException x) { + fail(service, "Error locating configuration files", x); } + } + while ((pending == null) || !pending.hasNext()) { + if (!configs.hasMoreElements()) { + return null; + } + pending = parse(configs.nextElement()); + } + String cn = pending.next(); + try { + return Class.forName(cn, false, loader); + } catch (ClassNotFoundException x) { + fail(service, "Provider " + cn + " not found"); + return null; + } + } - } while (clazz.getModule().isNamed()); // ignore if in named module + @SuppressWarnings("unchecked") + private boolean hasNextService() { + while (nextProvider == null && nextError == null) { + try { + Class clazz = nextProviderClass(); + if (clazz == null) + return false; - nextClass = clazz; + if (clazz.getModule().isNamed()) { + // ignore class if in named module + continue; + } + + if (service.isAssignableFrom(clazz)) { + Class type = (Class) clazz; + Constructor ctor + = (Constructor)getConstructor(clazz); + ProviderImpl p = new ProviderImpl(service, type, ctor, acc); + nextProvider = (ProviderImpl) p; + } else { + fail(service, clazz.getName() + " not a subtype"); + } + } catch (ServiceConfigurationError e) { + nextError = e; + } + } return true; } @@ -1101,17 +1241,16 @@ public final class ServiceLoader if (!hasNextService()) throw new NoSuchElementException(); - // throw any SCE with error recorded by hasNext - if (nextErrorMessage != null) { - String msg = nextErrorMessage; - nextErrorMessage = null; - fail(service, msg); + Provider provider = nextProvider; + if (provider != null) { + nextProvider = null; + return provider; + } else { + ServiceConfigurationError e = nextError; + assert e != null; + nextError = null; + throw e; } - - // return next provider - Class clazz = nextClass; - nextClass = null; - return new ProviderImpl(service, clazz, acc); } @Override @@ -1169,42 +1308,26 @@ public final class ServiceLoader } /** - * Lazily load and instantiate the available providers of this loader's - * service. - * - *

            The iterator returned by this method first yields all of the - * elements of the provider cache, in the order that they were loaded. - * It then lazily loads and instantiates any remaining providers, - * adding each one to the cache in turn. + * Returns an iterator to lazily load and instantiate the available + * providers of this loader's service. * *

            To achieve laziness the actual work of locating and instantiating - * providers must be done by the iterator itself. Its {@link - * java.util.Iterator#hasNext hasNext} and {@link java.util.Iterator#next - * next} methods can therefore throw a {@link ServiceConfigurationError} - * if a provider class cannot be loaded, doesn't have an appropriate static - * factory method or constructor, can't be assigned to the service type or - * if any other kind of exception or error is thrown as the next provider - * is located and instantiated. To write robust code it is only necessary - * to catch {@link ServiceConfigurationError} when using a service iterator. - * - *

            If such an error is thrown then subsequent invocations of the + * providers is done by the iterator itself. Its {@link Iterator#hasNext + * hasNext} and {@link Iterator#next next} methods can therefore throw a + * {@link ServiceConfigurationError} for any of the reasons specified in + * the Errors section above. To write robust code it + * is only necessary to catch {@code ServiceConfigurationError} when using + * the iterator. If an error is thrown then subsequent invocations of the * iterator will make a best effort to locate and instantiate the next * available provider, but in general such recovery cannot be guaranteed. * - *

            Design Note - * Throwing an error in these cases may seem extreme. The rationale for - * this behavior is that a malformed provider-configuration file, like a - * malformed class file, indicates a serious problem with the way the Java - * virtual machine is configured or is being used. As such it is - * preferable to throw an error rather than try to recover or, even worse, - * fail silently.
            - * - *

            If this loader's provider caches are cleared by invoking the {@link - * #reload() reload} method then existing iterators for this service - * loader should be discarded. - * The {@link java.util.Iterator#hasNext() hasNext} and {@link - * java.util.Iterator#next() next} methods of the iterator throw {@link + *

            Caching: The iterator returned by this method first yields all of + * the elements of the provider cache, in the order that they were loaded. + * It then lazily loads and instantiates any remaining service providers, + * adding each one to the cache in turn. If this loader's provider caches are + * cleared by invoking the {@link #reload() reload} method then existing + * iterators for this service loader should be discarded. + * The {@code hasNext} and {@code next} methods of the iterator throw {@link * java.util.ConcurrentModificationException ConcurrentModificationException} * if used after the provider cache has been cleared. * @@ -1212,8 +1335,17 @@ public final class ServiceLoader * Invoking its {@link java.util.Iterator#remove() remove} method will * cause an {@link UnsupportedOperationException} to be thrown. * + * @apiNote Throwing an error in these cases may seem extreme. The rationale + * for this behavior is that a malformed provider-configuration file, like a + * malformed class file, indicates a serious problem with the way the Java + * virtual machine is configured or is being used. As such it is preferable + * to throw an error rather than try to recover or, even worse, fail silently. + * * @return An iterator that lazily loads providers for this loader's * service + * + * @revised 9 + * @spec JPMS */ public Iterator iterator() { @@ -1265,33 +1397,36 @@ public final class ServiceLoader } /** - * Returns a stream that lazily loads the available providers of this - * loader's service. The stream elements are of type {@link Provider - * Provider}, the {@code Provider}'s {@link Provider#get() get} method - * must be invoked to get or instantiate the provider. + * Returns a stream to lazily load available providers of this loader's + * service. The stream elements are of type {@link Provider Provider}, the + * {@code Provider}'s {@link Provider#get() get} method must be invoked to + * get or instantiate the provider. * - *

            When processing the stream then providers that were previously + *

            To achieve laziness the actual work of locating providers is done + * when processing the stream. If a service provider cannot be loaded for any + * of the the reasons specified in the Errors section + * above then {@link ServiceConfigurationError} is thrown by whatever method + * caused the service provider to be loaded.

            + * + *

            Caching: When processing the stream then providers that were previously * loaded by stream operations are processed first, in load order. It then - * lazily loads any remaining providers. If a provider class cannot be - * loaded, can't be assigned to the service type, or some other error is - * thrown when locating the provider then it is wrapped with a {@code - * ServiceConfigurationError} and thrown by whatever method caused the - * provider to be loaded.

            + * lazily loads any remaining service providers. If this loader's provider + * caches are cleared by invoking the {@link #reload() reload} method then + * existing streams for this service loader should be discarded. The returned + * stream's source {@link Spliterator spliterator} is fail-fast and + * will throw {@link ConcurrentModificationException} if the provider cache + * has been cleared.

            * - *

            If this loader's provider caches are cleared by invoking the {@link - * #reload() reload} method then existing streams for this service - * loader should be discarded.

            - * - *

            The following examples demonstrate usage. The first example - * creates a stream of providers, the second example is the same except - * that it sorts the providers by provider class name (and so locate all - * providers). + *

            The following examples demonstrate usage. The first example creates + * a stream of {@code CodecFactory} objects, the second example is the same + * except that it sorts the providers by provider class name (and so locate + * all providers). *

            {@code
            -     *    Stream providers = ServiceLoader.load(CodecSet.class)
            +     *    Stream providers = ServiceLoader.load(CodecFactory.class)
                  *            .stream()
                  *            .map(Provider::get);
                  *
            -     *    Stream providers = ServiceLoader.load(CodecSet.class)
            +     *    Stream providers = ServiceLoader.load(CodecFactory.class)
                  *            .stream()
                  *            .sorted(Comparator.comparing(p -> p.type().getName()))
                  *            .map(Provider::get);
            @@ -1300,6 +1435,7 @@ public final class ServiceLoader
                  * @return  A stream that lazily loads providers for this loader's service
                  *
                  * @since 9
            +     * @spec JPMS
                  */
                 public Stream> stream() {
                     // use cached providers as the source when all providers loaded
            @@ -1377,7 +1513,7 @@ public final class ServiceLoader
                  *
                  * @param  loader
                  *         The class loader to be used to load provider-configuration files
            -     *         and provider classes, or null if the system class
            +     *         and provider classes, or {@code null} if the system class
                  *         loader (or, failing that, the bootstrap class loader) is to be
                  *         used
                  *
            @@ -1394,8 +1530,86 @@ public final class ServiceLoader
                 }
             
                 /**
            -     * Creates a new service loader for the given service type and class
            -     * loader.
            +     * Creates a new service loader for the given service. The service loader
            +     * uses the given class loader as the starting point to locate service
            +     * providers for the service. The service loader's {@link #iterator()
            +     * iterator} and {@link #stream() stream} locate providers in both named
            +     * and unnamed modules, as follows:
            +     *
            +     * 
              + *
            • Step 1: Locate providers in named modules.

              + * + *

              Service providers are located in all named modules of the class + * loader or to any class loader reachable via parent delegation.

              + * + *

              In addition, if the class loader is not the bootstrap or {@linkplain + * ClassLoader#getPlatformClassLoader() platform class loader}, then service + * providers may be located in the named modules of other class loaders. + * Specifically, if the class loader, or any class loader reachable via + * parent delegation, has a module in a {@linkplain ModuleLayer module + * layer}, then service providers in all modules in the module layer are + * located.

              + * + *

              For example, suppose there is a module layer where each module is + * in its own class loader (see {@link ModuleLayer#defineModulesWithManyLoaders + * defineModulesWithManyLoaders}). If this {@code ServiceLoader.load} method + * is invoked to locate providers using any of the class loaders created for + * the module layer, then it will locate all of the providers in the module + * layer, irrespective of their defining class loader.

              + * + *

              Ordering: The service loader will first locate any service providers + * in modules defined to the class loader, then its parent class loader, + * its parent parent, and so on to the bootstrap class loader. If a class + * loader has modules in a module layer then all providers in that module + * layer are located (irrespective of their class loader) before the + * providers in the parent class loader are located. The ordering of + * modules in same class loader, or the ordering of modules in a module + * layer, is not defined.

              + * + *

              If a module declares more than one provider then the providers + * are located in the order that its module descriptor {@linkplain + * java.lang.module.ModuleDescriptor.Provides#providers() lists the + * providers}. Providers added dynamically by instrumentation agents (see + * {@link java.lang.instrument.Instrumentation#redefineModule redefineModule}) + * are always located after providers declared by the module.

            • + * + *
            • Step 2: Locate providers in unnamed modules.

              + * + *

              Service providers in unnamed modules are located if their class names + * are listed in provider-configuration files located by the class loader's + * {@link ClassLoader#getResources(String) getResources} method.

              + * + *

              The ordering is based on the order that the class loader's {@code + * getResources} method finds the service configuration files and within + * that, the order that the class names are listed in the file.

              + * + *

              In a provider-configuration file, any mention of a service provider + * that is deployed in a named module is ignored. This is to avoid + * duplicates that would otherwise arise when a named module has both a + * provides directive and a provider-configuration file that mention + * the same service provider.

              + * + *

              The provider class must be visible to the class loader.

            • + * + *
            + * + * @apiNote If the class path of the class loader includes remote network + * URLs then those URLs may be dereferenced in the process of searching for + * provider-configuration files. + * + *

            This activity is normal, although it may cause puzzling entries to be + * created in web-server logs. If a web server is not configured correctly, + * however, then this activity may cause the provider-loading algorithm to fail + * spuriously. + * + *

            A web server should return an HTTP 404 (Not Found) response when a + * requested resource does not exist. Sometimes, however, web servers are + * erroneously configured to return an HTTP 200 (OK) response along with a + * helpful HTML error page in such cases. This will cause a {@link + * ServiceConfigurationError} to be thrown when this class attempts to parse + * the HTML page as a provider-configuration file. The best solution to this + * problem is to fix the misconfigured web server to return the correct + * response code (HTTP 404) along with the HTML error page. * * @param the class of the service type * @@ -1414,6 +1628,9 @@ public final class ServiceLoader * if the service type is not accessible to the caller or the * caller is in an explicit module and its module descriptor does * not declare that it uses {@code service} + * + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ServiceLoader load(Class service, @@ -1429,13 +1646,13 @@ public final class ServiceLoader * *

            An invocation of this convenience method of the form *

            {@code
            -     * ServiceLoader.load(service)
            +     *     ServiceLoader.load(service)
                  * }
            * * is equivalent to * *
            {@code
            -     * ServiceLoader.load(service, Thread.currentThread().getContextClassLoader())
            +     *     ServiceLoader.load(service, Thread.currentThread().getContextClassLoader())
                  * }
            * * @apiNote Service loader objects obtained with this method should not be @@ -1457,6 +1674,9 @@ public final class ServiceLoader * if the service type is not accessible to the caller or the * caller is in an explicit module and its module descriptor does * not declare that it uses {@code service} + * + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ServiceLoader load(Class service) { @@ -1471,7 +1691,7 @@ public final class ServiceLoader *

            This convenience method is equivalent to:

            * *
            {@code
            -     * ServiceLoader.load(service, ClassLoader.getPlatformClassLoader())
            +     *     ServiceLoader.load(service, ClassLoader.getPlatformClassLoader())
                  * }
            * *

            This method is intended for use when only installed providers are @@ -1490,6 +1710,9 @@ public final class ServiceLoader * if the service type is not accessible to the caller or the * caller is in an explicit module and its module descriptor does * not declare that it uses {@code service} + * + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ServiceLoader loadInstalled(Class service) { @@ -1498,9 +1721,29 @@ public final class ServiceLoader } /** - * Creates a new service loader for the given service type that loads - * service providers from modules in the given {@code Layer} and its - * ancestors. + * Creates a new service loader for the given service type to load service + * providers from modules in the given module layer and its ancestors. It + * does not locate providers in unnamed modules. The ordering that the service + * loader's {@link #iterator() iterator} and {@link #stream() stream} locate + * providers and yield elements is as follows: + * + *

              + *
            • Providers are located in a module layer before locating providers + * in parent layers. Traversal of parent layers is depth-first with each + * layer visited at most once. For example, suppose L0 is the boot layer, L1 + * and L2 are modules layers with L0 as their parent. Now suppose that L3 is + * created with L1 and L2 as the parents (in that order). Using a service + * loader to locate providers with L3 as the context will locate providers + * in the following order: L3, L1, L0, L2.

            • + * + *
            • If a module declares more than one provider then the providers + * are located in the order that its module descriptor + * {@linkplain java.lang.module.ModuleDescriptor.Provides#providers() + * lists the providers}. Providers added dynamically by instrumentation + * agents are always located after providers declared by the module.

            • + * + *
            • The ordering of modules in a module layer is not defined.

            • + *
            * * @apiNote Unlike the other load methods defined here, the service type * is the second parameter. The reason for this is to avoid source @@ -1509,7 +1752,7 @@ public final class ServiceLoader * @param the class of the service type * * @param layer - * The module Layer + * The module layer * * @param service * The interface or abstract class representing the service @@ -1522,35 +1765,36 @@ public final class ServiceLoader * not declare that it uses {@code service} * * @since 9 + * @spec JPMS */ @CallerSensitive - public static ServiceLoader load(Layer layer, Class service) { + public static ServiceLoader load(ModuleLayer layer, Class service) { return new ServiceLoader<>(Reflection.getCallerClass(), layer, service); } /** - * Load the first available provider of this loader's service. This + * Load the first available service provider of this loader's service. This * convenience method is equivalent to invoking the {@link #iterator() * iterator()} method and obtaining the first element. It therefore * returns the first element from the provider cache if possible, it * otherwise attempts to load and instantiate the first provider. * - *

            The following example loads the first available provider. If there - * are no providers deployed then it uses a default implementation. + *

            The following example loads the first available service provider. If + * no service providers are located then it uses a default implementation. *

            {@code
            -     *    CodecSet provider =
            -     *        ServiceLoader.load(CodecSet.class).findFirst().orElse(DEFAULT_CODECSET);
            +     *    CodecFactory factory = ServiceLoader.load(CodecFactory.class)
            +     *                                        .findFirst()
            +     *                                        .orElse(DEFAULT_CODECSET_FACTORY);
                  * }
            - * @return The first provider or empty {@code Optional} if no providers - * are located + * @return The first service provider or empty {@code Optional} if no + * service providers are located * * @throws ServiceConfigurationError - * If a provider class cannot be loaded, doesn't have the - * appropriate static factory method or constructor, can't be - * assigned to the service type, or if any other kind of exception - * or error is thrown when locating or instantiating the provider. + * If a provider class cannot be loaded for any of the reasons + * specified in the Errors section above. * * @since 9 + * @spec JPMS */ public Optional findFirst() { Iterator iterator = iterator(); @@ -1567,11 +1811,11 @@ public final class ServiceLoader * *

            After invoking this method, subsequent invocations of the {@link * #iterator() iterator} or {@link #stream() stream} methods will lazily - * look up providers (and instantiate in the case of {@code iterator}) - * from scratch, just as is done by a newly-created loader. + * locate providers (and instantiate in the case of {@code iterator}) + * from scratch, just as is done by a newly-created service loader. * - *

            This method is intended for use in situations in which new providers - * can be installed into a running Java virtual machine. + *

            This method is intended for use in situations in which new service + * providers can be installed into a running Java virtual machine. */ public void reload() { lookupIterator1 = null; diff --git a/jdk/src/java.base/share/classes/java/util/Set.java b/jdk/src/java.base/share/classes/java/util/Set.java index 2dd9060f7df..32966e993e3 100644 --- a/jdk/src/java.base/share/classes/java/util/Set.java +++ b/jdk/src/java.base/share/classes/java/util/Set.java @@ -63,7 +63,7 @@ package java.util; * Such exceptions are marked as "optional" in the specification for this * interface. * - *

            Immutable Set Static Factory Methods

            + *

            Immutable Set Static Factory Methods

            *

            The {@link Set#of(Object...) Set.of()} static factory methods * provide a convenient way to create immutable sets. The {@code Set} * instances created by these methods have the following characteristics: @@ -91,7 +91,7 @@ package java.util; * * *

            This interface is a member of the - * + * * Java Collections Framework. * * @param the type of elements maintained by this set diff --git a/jdk/src/java.base/share/classes/java/util/SortedMap.java b/jdk/src/java.base/share/classes/java/util/SortedMap.java index 7f98152253c..3a57088859b 100644 --- a/jdk/src/java.base/share/classes/java/util/SortedMap.java +++ b/jdk/src/java.base/share/classes/java/util/SortedMap.java @@ -93,7 +93,7 @@ package java.util; * SortedMap<String, V> sub = m.subMap(low+"\0", high);

            * *

            This interface is a member of the - * + * * Java Collections Framework. * * @param the type of keys maintained by this map diff --git a/jdk/src/java.base/share/classes/java/util/SortedSet.java b/jdk/src/java.base/share/classes/java/util/SortedSet.java index 5eb7f76117d..e95a9775b61 100644 --- a/jdk/src/java.base/share/classes/java/util/SortedSet.java +++ b/jdk/src/java.base/share/classes/java/util/SortedSet.java @@ -89,7 +89,7 @@ package java.util; * SortedSet<String> sub = s.subSet(low+"\0", high); * *

            This interface is a member of the - * + * * Java Collections Framework. * * @param the type of elements maintained by this set diff --git a/jdk/src/java.base/share/classes/java/util/Spliterator.java b/jdk/src/java.base/share/classes/java/util/Spliterator.java index 96db12f0d60..485187952fe 100644 --- a/jdk/src/java.base/share/classes/java/util/Spliterator.java +++ b/jdk/src/java.base/share/classes/java/util/Spliterator.java @@ -62,7 +62,7 @@ import java.util.function.LongConsumer; * New characteristics may be defined in the future, so implementors should not * assign meanings to unlisted values. * - *

            A Spliterator that does not report {@code IMMUTABLE} or + *

            A Spliterator that does not report {@code IMMUTABLE} or * {@code CONCURRENT} is expected to have a documented policy concerning: * when the spliterator binds to the element source; and detection of * structural interference of the element source detected after binding. A diff --git a/jdk/src/java.base/share/classes/java/util/SplittableRandom.java b/jdk/src/java.base/share/classes/java/util/SplittableRandom.java index 1a6653d56c7..f852e1dcaea 100644 --- a/jdk/src/java.base/share/classes/java/util/SplittableRandom.java +++ b/jdk/src/java.base/share/classes/java/util/SplittableRandom.java @@ -779,8 +779,7 @@ public final class SplittableRandom { * @return a stream of pseudorandom {@code double} values, * each with the given origin (inclusive) and bound (exclusive) * @throws IllegalArgumentException if {@code streamSize} is - * less than zero - * @throws IllegalArgumentException if {@code randomNumberOrigin} + * less than zero, or {@code randomNumberOrigin} * is greater than or equal to {@code randomNumberBound} */ public DoubleStream doubles(long streamSize, double randomNumberOrigin, diff --git a/jdk/src/java.base/share/classes/java/util/TimeZone.java b/jdk/src/java.base/share/classes/java/util/TimeZone.java index 1180d38c491..b428cd668a7 100644 --- a/jdk/src/java.base/share/classes/java/util/TimeZone.java +++ b/jdk/src/java.base/share/classes/java/util/TimeZone.java @@ -74,7 +74,7 @@ import sun.util.locale.provider.TimeZoneNameUtility; * produce a TimeZone. The syntax of a custom time zone ID is: * *

            - * CustomID:
            + * CustomID:
              *         GMT Sign Hours : Minutes
              *         GMT Sign Hours Minutes
              *         GMT Sign Hours
            @@ -102,7 +102,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
              * When creating a TimeZone, the specified custom time
              * zone ID is normalized in the following syntax:
              * 
            - * NormalizedCustomID:
            + * NormalizedCustomID:
              *         GMT Sign TwoDigitHours : Minutes
              * Sign: one of
              *         + -
            diff --git a/jdk/src/java.base/share/classes/java/util/Timer.java b/jdk/src/java.base/share/classes/java/util/Timer.java
            index 770d9f9df8b..7c47d0c7135 100644
            --- a/jdk/src/java.base/share/classes/java/util/Timer.java
            +++ b/jdk/src/java.base/share/classes/java/util/Timer.java
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 1999, 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,6 +108,7 @@ public class Timer {
                  * finalizer forgetting to call it.
                  */
                 private final Object threadReaper = new Object() {
            +        @SuppressWarnings("deprecation")
                     protected void finalize() throws Throwable {
                         synchronized(queue) {
                             thread.newTasksMayBeScheduled = false;
            diff --git a/jdk/src/java.base/share/classes/java/util/TreeMap.java b/jdk/src/java.base/share/classes/java/util/TreeMap.java
            index 2da0a5e8b28..5051282a9c9 100644
            --- a/jdk/src/java.base/share/classes/java/util/TreeMap.java
            +++ b/jdk/src/java.base/share/classes/java/util/TreeMap.java
            @@ -92,7 +92,7 @@ import java.util.function.Consumer;
              * associated map using {@code put}.)
              *
              * 

            This class is a member of the - * + * * Java Collections Framework. * * @param the type of keys maintained by this map diff --git a/jdk/src/java.base/share/classes/java/util/TreeSet.java b/jdk/src/java.base/share/classes/java/util/TreeSet.java index b80021e738e..8b110ef3b10 100644 --- a/jdk/src/java.base/share/classes/java/util/TreeSet.java +++ b/jdk/src/java.base/share/classes/java/util/TreeSet.java @@ -74,7 +74,7 @@ package java.util; * should be used only to detect bugs. * *

            This class is a member of the - * + * * Java Collections Framework. * * @param the type of elements maintained by this set diff --git a/jdk/src/java.base/share/classes/java/util/Vector.java b/jdk/src/java.base/share/classes/java/util/Vector.java index fb6c938c226..fac073b1116 100644 --- a/jdk/src/java.base/share/classes/java/util/Vector.java +++ b/jdk/src/java.base/share/classes/java/util/Vector.java @@ -70,7 +70,7 @@ import java.util.function.UnaryOperator; * *

            As of the Java 2 platform v1.2, this class was retrofitted to * implement the {@link List} interface, making it a member of the - * + * * Java Collections Framework. Unlike the new collection * implementations, {@code Vector} is synchronized. If a thread-safe * implementation is not needed, it is recommended to use {@link diff --git a/jdk/src/java.base/share/classes/java/util/WeakHashMap.java b/jdk/src/java.base/share/classes/java/util/WeakHashMap.java index 1aa8ec4396d..183b4c39729 100644 --- a/jdk/src/java.base/share/classes/java/util/WeakHashMap.java +++ b/jdk/src/java.base/share/classes/java/util/WeakHashMap.java @@ -120,7 +120,7 @@ import java.util.function.Consumer; * should be used only to detect bugs. * *

            This class is a member of the - * + * * Java Collections Framework. * * @param the type of keys maintained by this map diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java index 6af7c7a98bc..557ce73a7a3 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java @@ -76,7 +76,7 @@ import java.util.function.Predicate; * methods of the {@link Collection} and {@link Iterator} interfaces. * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.5 @@ -1226,6 +1226,7 @@ public class ArrayBlockingQueue extends AbstractQueue } else { nextIndex = NONE; nextItem = null; + if (lastRet == REMOVED) detach(); } } finally { lock.unlock(); diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java index 27b05bf711b..f93af80ad48 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java @@ -53,17 +53,17 @@ import java.util.NoSuchElementException; * and the fourth blocks for only a given maximum time limit before giving * up. These methods are summarized in the following table: * - *

            locale-format combinations for newBundle
            Locale
            @@ -1313,6 +1331,8 @@ public abstract class ResourceBundle { * style="vertical-align: top; text-align: left; font-weight: bold; width: 50%;">format
            *
            Locale("de", "DE")
            *
            + *
            * * - * + * * * * - * - * - * - * + * + * + * + * * * * @@ -87,14 +87,14 @@ import java.util.NoSuchElementException; * * * - * + * * * * - * - * - * - * + * + * + * + * * * * @@ -128,14 +128,14 @@ import java.util.NoSuchElementException; * {@code BlockingQueue} interface are precisely equivalent to * {@code BlockingDeque} methods as indicated in the following table: * - *
            Summary of BlockingDeque methods
            First Element (Head) First Element (Head)
            Throws exceptionSpecial valueBlocksTimes outThrows exceptionSpecial valueBlocksTimes out
            Insertnot applicable
            Last Element (Tail) Last Element (Tail)
            Throws exceptionSpecial valueBlocksTimes outThrows exceptionSpecial valueBlocksTimes out
            Insert
            + *
            * * - * - * + * + * * * - * + * * * * @@ -154,7 +154,7 @@ import java.util.NoSuchElementException; * * * - * + * * * * @@ -173,7 +173,7 @@ import java.util.NoSuchElementException; * * * - * + * * * * @@ -193,7 +193,7 @@ import java.util.NoSuchElementException; * the {@code BlockingDeque} in another thread. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @since 1.6 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java index 03ca56d8791..65a523e6b40 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java @@ -53,14 +53,14 @@ import java.util.Queue; * and the fourth blocks for only a given maximum time limit before giving * up. These methods are summarized in the following table: * - *

            Comparison of BlockingQueue and BlockingDeque methods
            {@code BlockingQueue} Method Equivalent {@code BlockingDeque} Method {@code BlockingQueue} Method Equivalent {@code BlockingDeque} Method
            Insert Insert
            {@link #add(Object) add(e)}{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}
            Remove Remove
            {@link #remove() remove()}{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}
            Examine Examine
            {@link #element() element()}
            + *
            * * * - * - * - * - * + * + * + * + * * * * @@ -170,7 +170,7 @@ import java.util.Queue; * the {@code BlockingQueue} in another thread. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/CompletionService.java b/jdk/src/java.base/share/classes/java/util/concurrent/CompletionService.java index f647e213128..5e5232efa7a 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/CompletionService.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/CompletionService.java @@ -57,6 +57,8 @@ package java.util.concurrent; * happen-before * actions taken by that task, which in turn happen-before * actions following a successful return from the corresponding {@code take()}. + * + * @since 1.5 */ public interface CompletionService { /** diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java index 1d80077b58c..aec44a2d4c7 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java @@ -254,7 +254,7 @@ import jdk.internal.misc.Unsafe; *

            All arguments to all task methods must be non-null. * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.5 @@ -768,7 +768,7 @@ public class ConcurrentHashMap extends AbstractMap static final boolean casTabAt(Node[] tab, int i, Node c, Node v) { - return U.compareAndSwapObject(tab, ((long)i << ASHIFT) + ABASE, c, v); + return U.compareAndSetObject(tab, ((long)i << ASHIFT) + ABASE, c, v); } static final void setTabAt(Node[] tab, int i, Node v) { @@ -2299,7 +2299,7 @@ public class ConcurrentHashMap extends AbstractMap while ((tab = table) == null || tab.length == 0) { if ((sc = sizeCtl) < 0) Thread.yield(); // lost initialization race; just spin - else if (U.compareAndSwapInt(this, SIZECTL, sc, -1)) { + else if (U.compareAndSetInt(this, SIZECTL, sc, -1)) { try { if ((tab = table) == null || tab.length == 0) { int n = (sc > 0) ? sc : DEFAULT_CAPACITY; @@ -2330,13 +2330,13 @@ public class ConcurrentHashMap extends AbstractMap private final void addCount(long x, int check) { CounterCell[] as; long b, s; if ((as = counterCells) != null || - !U.compareAndSwapLong(this, BASECOUNT, b = baseCount, s = b + x)) { + !U.compareAndSetLong(this, BASECOUNT, b = baseCount, s = b + x)) { CounterCell a; long v; int m; boolean uncontended = true; if (as == null || (m = as.length - 1) < 0 || (a = as[ThreadLocalRandom.getProbe() & m]) == null || !(uncontended = - U.compareAndSwapLong(a, CELLVALUE, v = a.value, v + x))) { + U.compareAndSetLong(a, CELLVALUE, v = a.value, v + x))) { fullAddCount(x, uncontended); return; } @@ -2354,10 +2354,10 @@ public class ConcurrentHashMap extends AbstractMap sc == rs + MAX_RESIZERS || (nt = nextTable) == null || transferIndex <= 0) break; - if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1)) + if (U.compareAndSetInt(this, SIZECTL, sc, sc + 1)) transfer(tab, nt); } - else if (U.compareAndSwapInt(this, SIZECTL, sc, + else if (U.compareAndSetInt(this, SIZECTL, sc, (rs << RESIZE_STAMP_SHIFT) + 2)) transfer(tab, null); s = sumCount(); @@ -2378,7 +2378,7 @@ public class ConcurrentHashMap extends AbstractMap if ((sc >>> RESIZE_STAMP_SHIFT) != rs || sc == rs + 1 || sc == rs + MAX_RESIZERS || transferIndex <= 0) break; - if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1)) { + if (U.compareAndSetInt(this, SIZECTL, sc, sc + 1)) { transfer(tab, nextTab); break; } @@ -2401,7 +2401,7 @@ public class ConcurrentHashMap extends AbstractMap Node[] tab = table; int n; if (tab == null || (n = tab.length) == 0) { n = (sc > c) ? sc : c; - if (U.compareAndSwapInt(this, SIZECTL, sc, -1)) { + if (U.compareAndSetInt(this, SIZECTL, sc, -1)) { try { if (table == tab) { @SuppressWarnings("unchecked") @@ -2418,7 +2418,7 @@ public class ConcurrentHashMap extends AbstractMap break; else if (tab == table) { int rs = resizeStamp(n); - if (U.compareAndSwapInt(this, SIZECTL, sc, + if (U.compareAndSetInt(this, SIZECTL, sc, (rs << RESIZE_STAMP_SHIFT) + 2)) transfer(tab, null); } @@ -2459,7 +2459,7 @@ public class ConcurrentHashMap extends AbstractMap i = -1; advance = false; } - else if (U.compareAndSwapInt + else if (U.compareAndSetInt (this, TRANSFERINDEX, nextIndex, nextBound = (nextIndex > stride ? nextIndex - stride : 0))) { @@ -2476,7 +2476,7 @@ public class ConcurrentHashMap extends AbstractMap sizeCtl = (n << 1) - (n >>> 1); return; } - if (U.compareAndSwapInt(this, SIZECTL, sc = sizeCtl, sc - 1)) { + if (U.compareAndSetInt(this, SIZECTL, sc = sizeCtl, sc - 1)) { if ((sc - 2) != resizeStamp(n) << RESIZE_STAMP_SHIFT) return; finishing = advance = true; @@ -2601,7 +2601,7 @@ public class ConcurrentHashMap extends AbstractMap if (cellsBusy == 0) { // Try to attach new Cell CounterCell r = new CounterCell(x); // Optimistic create if (cellsBusy == 0 && - U.compareAndSwapInt(this, CELLSBUSY, 0, 1)) { + U.compareAndSetInt(this, CELLSBUSY, 0, 1)) { boolean created = false; try { // Recheck under lock CounterCell[] rs; int m, j; @@ -2623,14 +2623,14 @@ public class ConcurrentHashMap extends AbstractMap } else if (!wasUncontended) // CAS already known to fail wasUncontended = true; // Continue after rehash - else if (U.compareAndSwapLong(a, CELLVALUE, v = a.value, v + x)) + else if (U.compareAndSetLong(a, CELLVALUE, v = a.value, v + x)) break; else if (counterCells != as || n >= NCPU) collide = false; // At max size or stale else if (!collide) collide = true; else if (cellsBusy == 0 && - U.compareAndSwapInt(this, CELLSBUSY, 0, 1)) { + U.compareAndSetInt(this, CELLSBUSY, 0, 1)) { try { if (counterCells == as) {// Expand table unless stale CounterCell[] rs = new CounterCell[n << 1]; @@ -2647,7 +2647,7 @@ public class ConcurrentHashMap extends AbstractMap h = ThreadLocalRandom.advanceProbe(h); } else if (cellsBusy == 0 && counterCells == as && - U.compareAndSwapInt(this, CELLSBUSY, 0, 1)) { + U.compareAndSetInt(this, CELLSBUSY, 0, 1)) { boolean init = false; try { // Initialize table if (counterCells == as) { @@ -2662,7 +2662,7 @@ public class ConcurrentHashMap extends AbstractMap if (init) break; } - else if (U.compareAndSwapLong(this, BASECOUNT, v = baseCount, v + x)) + else if (U.compareAndSetLong(this, BASECOUNT, v = baseCount, v + x)) break; // Fall back on using base } } @@ -2858,7 +2858,7 @@ public class ConcurrentHashMap extends AbstractMap * Acquires write lock for tree restructuring. */ private final void lockRoot() { - if (!U.compareAndSwapInt(this, LOCKSTATE, 0, WRITER)) + if (!U.compareAndSetInt(this, LOCKSTATE, 0, WRITER)) contendedLock(); // offload to separate method } @@ -2876,14 +2876,14 @@ public class ConcurrentHashMap extends AbstractMap boolean waiting = false; for (int s;;) { if (((s = lockState) & ~WAITER) == 0) { - if (U.compareAndSwapInt(this, LOCKSTATE, s, WRITER)) { + if (U.compareAndSetInt(this, LOCKSTATE, s, WRITER)) { if (waiting) waiter = null; return; } } else if ((s & WAITER) == 0) { - if (U.compareAndSwapInt(this, LOCKSTATE, s, s | WAITER)) { + if (U.compareAndSetInt(this, LOCKSTATE, s, s | WAITER)) { waiting = true; waiter = Thread.currentThread(); } @@ -2908,7 +2908,7 @@ public class ConcurrentHashMap extends AbstractMap return e; e = e.next; } - else if (U.compareAndSwapInt(this, LOCKSTATE, s, + else if (U.compareAndSetInt(this, LOCKSTATE, s, s + READER)) { TreeNode r, p; try { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java index 58e16ae83b8..8546bfb3f46 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java @@ -85,7 +85,7 @@ import java.util.function.Predicate; * the {@code ConcurrentLinkedDeque} in another thread. * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.7 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java index 6ce61b8f4ab..ac70f00bac6 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java @@ -99,7 +99,7 @@ import java.util.function.Predicate; * the {@code ConcurrentLinkedQueue} in another thread. * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java index d301de9eee6..0a5cda1d81f 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java @@ -61,7 +61,7 @@ import java.util.function.Function; * the {@code ConcurrentMap} in another thread. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentNavigableMap.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentNavigableMap.java index 0d763b6e9ea..5040e2ec4af 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentNavigableMap.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentNavigableMap.java @@ -43,7 +43,7 @@ import java.util.NavigableSet; * and recursively so for its navigable sub-maps. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @author Doug Lea diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java index 2ae29aa42f3..8be87529539 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java @@ -106,7 +106,7 @@ import java.util.function.Predicate; * elements. * *

            This class is a member of the - * + * * Java Collections Framework. * * @author Doug Lea diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java index 86be622c78b..d61fb2170cc 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java @@ -87,7 +87,7 @@ import java.util.Spliterator; * distinguished from the absence of elements. * *

            This class is a member of the - * + * * Java Collections Framework. * * @author Doug Lea diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java b/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java index 63bd252868d..592f9a51cd2 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java @@ -82,7 +82,7 @@ import java.util.function.UnaryOperator; * the {@code CopyOnWriteArrayList} in another thread. * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java b/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java index 6e4ad018d2f..c8e984fab96 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java @@ -87,7 +87,7 @@ import java.util.function.Predicate; * }} * *

            This class is a member of the - * + * * Java Collections Framework. * * @see CopyOnWriteArrayList diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/DelayQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/DelayQueue.java index 50997f7abda..73d66b9e64c 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/DelayQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/DelayQueue.java @@ -67,7 +67,7 @@ import java.util.concurrent.locks.ReentrantLock; * particular order. * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java b/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java index 77208837d57..67dcfc26c17 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java @@ -97,6 +97,8 @@ package java.util.concurrent; * if (result != null) * use(result); * }} + * + * @since 1.5 */ public class ExecutorCompletionService implements CompletionService { private final Executor executor; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/Executors.java b/jdk/src/java.base/share/classes/java/util/concurrent/Executors.java index a31e3a1ebac..00fdf25772c 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/Executors.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/Executors.java @@ -713,6 +713,7 @@ public class Executors { FinalizableDelegatedExecutorService(ExecutorService executor) { super(executor); } + @SuppressWarnings("deprecation") protected void finalize() { super.shutdown(); } diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/Flow.java b/jdk/src/java.base/share/classes/java/util/concurrent/Flow.java index 9b53a8a54f9..65e994350ce 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/Flow.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/Flow.java @@ -271,11 +271,11 @@ public final class Flow { /** * Adds the given number {@code n} of items to the current * unfulfilled demand for this subscription. If {@code n} is - * negative, the Subscriber will receive an {@code onError} - * signal with an {@link IllegalArgumentException} argument. - * Otherwise, the Subscriber will receive up to {@code n} - * additional {@code onNext} invocations (or fewer if - * terminated). + * less than or equal to zero, the Subscriber will receive an + * {@code onError} signal with an {@link + * IllegalArgumentException} argument. Otherwise, the + * Subscriber will receive up to {@code n} additional {@code + * onNext} invocations (or fewer if terminated). * * @param n the increment of demand; a value of {@code * Long.MAX_VALUE} may be considered as effectively unbounded diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java index 330f4fb78a3..cd14b0057ec 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java @@ -109,12 +109,12 @@ import java.util.concurrent.locks.LockSupport; * async event-style tasks that are not usually joined, in which case * there is little difference among choice of methods. * - *

            Summary of BlockingQueue methods
            Throws exceptionSpecial valueBlocksTimes outThrows exceptionSpecial valueBlocksTimes out
            Insert
            + *
            * * * - * - * + * + * * * * diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java index 1db30b3b440..ec7b7eee5ce 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java @@ -68,7 +68,7 @@ import java.util.function.Predicate; * methods of the {@link Collection} and {@link Iterator} interfaces. * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.6 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java index 7a1a2138073..368f6014dfa 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java @@ -71,7 +71,7 @@ import java.util.function.Predicate; * methods of the {@link Collection} and {@link Iterator} interfaces. * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java index 3a919c1efad..c7ad85b9fc1 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java @@ -81,7 +81,7 @@ import java.util.function.Predicate; * the {@code LinkedTransferQueue} in another thread. * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.7 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java index cdb1548eb61..8b0b3fec285 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java @@ -101,7 +101,7 @@ import java.util.function.Consumer; * }} * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java b/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java index 28e98a361ef..fafc11b8c15 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java @@ -588,6 +588,7 @@ public class SubmissionPublisher implements Flow.Publisher, if (!closed) { BufferedSubscription b; synchronized (this) { + // no need to re-check closed here b = clients; clients = null; closed = true; @@ -619,9 +620,11 @@ public class SubmissionPublisher implements Flow.Publisher, BufferedSubscription b; synchronized (this) { b = clients; - clients = null; - closed = true; - closedException = error; + if (!closed) { // don't clobber racing close + clients = null; + closedException = error; + closed = true; + } } while (b != null) { BufferedSubscription next = b.next; @@ -1362,9 +1365,9 @@ public class SubmissionPublisher implements Flow.Publisher, } } } - else if (n < 0L) + else onError(new IllegalArgumentException( - "negative subscription request")); + "non-positive subscription request")); } public final boolean isReleasable() { // for ManagedBlocker diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java index 165198f97f8..0a4049b6628 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java @@ -80,7 +80,7 @@ import java.util.concurrent.locks.ReentrantLock; * methods of the {@link Collection} and {@link Iterator} interfaces. * *

            This class is a member of the - * + * * Java Collections Framework. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java index cfc676aa39a..02820050420 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java @@ -49,6 +49,7 @@ import java.util.stream.IntStream; import java.util.stream.LongStream; import java.util.stream.StreamSupport; import jdk.internal.misc.Unsafe; +import jdk.internal.misc.VM; /** * A random number generator isolated to the current thread. Like the @@ -699,8 +700,7 @@ public class ThreadLocalRandom extends Random { * @return a stream of pseudorandom {@code double} values, * each with the given origin (inclusive) and bound (exclusive) * @throws IllegalArgumentException if {@code streamSize} is - * less than zero - * @throws IllegalArgumentException if {@code randomNumberOrigin} + * less than zero, or {@code randomNumberOrigin} * is greater than or equal to {@code randomNumberBound} * @since 1.8 */ @@ -1094,11 +1094,8 @@ public class ThreadLocalRandom extends Random { // at end of to survive static initialization circularity static { - if (java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction<>() { - public Boolean run() { - return Boolean.getBoolean("java.util.secureRandomSeed"); - }})) { + String sec = VM.getSavedProperty("java.util.secureRandomSeed"); + if (Boolean.parseBoolean(sec)) { byte[] seedBytes = java.security.SecureRandom.getSeed(8); long s = (long)seedBytes[0] & 0xffL; for (int i = 1; i < 8; ++i) diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java index 0016bfffe87..ceb9bf2022f 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java @@ -1490,7 +1490,17 @@ public class ThreadPoolExecutor extends AbstractExecutorService { /** * Invokes {@code shutdown} when this executor is no longer * referenced and it has no threads. + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") protected void finalize() { shutdown(); } diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/TransferQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/TransferQueue.java index 43d8f0c1395..0621bce2b76 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/TransferQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/TransferQueue.java @@ -58,7 +58,7 @@ package java.util.concurrent; * and {@code transfer} are effectively synonymous. * *

            This interface is a member of the - * + * * Java Collections Framework. * * @since 1.7 diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java index f2184aaeebd..d61f246fec0 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java @@ -140,7 +140,7 @@ public class AtomicInteger extends Number implements java.io.Serializable { * the actual value was not equal to the expected value. */ public final boolean compareAndSet(int expectedValue, int newValue) { - return U.compareAndSwapInt(this, VALUE, expectedValue, newValue); + return U.compareAndSetInt(this, VALUE, expectedValue, newValue); } /** @@ -161,7 +161,7 @@ public class AtomicInteger extends Number implements java.io.Serializable { */ @Deprecated(since="9") public final boolean weakCompareAndSet(int expectedValue, int newValue) { - return U.weakCompareAndSwapInt(this, VALUE, expectedValue, newValue); + return U.weakCompareAndSetIntPlain(this, VALUE, expectedValue, newValue); } /** @@ -175,7 +175,7 @@ public class AtomicInteger extends Number implements java.io.Serializable { * @since 9 */ public final boolean weakCompareAndSetPlain(int expectedValue, int newValue) { - return U.weakCompareAndSwapInt(this, VALUE, expectedValue, newValue); + return U.weakCompareAndSetIntPlain(this, VALUE, expectedValue, newValue); } /** @@ -249,7 +249,8 @@ public class AtomicInteger extends Number implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function, returning the previous value. The * function should be side-effect-free, since it may be re-applied * when attempted updates fail due to contention among threads. @@ -270,7 +271,8 @@ public class AtomicInteger extends Number implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function, returning the updated value. The * function should be side-effect-free, since it may be re-applied * when attempted updates fail due to contention among threads. @@ -291,13 +293,14 @@ public class AtomicInteger extends Number implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function to the current and given values, * returning the previous value. The function should be * side-effect-free, since it may be re-applied when attempted - * updates fail due to contention among threads. The function - * is applied with the current value as its first argument, - * and the given update as the second argument. + * updates fail due to contention among threads. The function is + * applied with the current value as its first argument, and the + * given update as the second argument. * * @param x the update value * @param accumulatorFunction a side-effect-free function of two arguments @@ -317,13 +320,14 @@ public class AtomicInteger extends Number implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function to the current and given values, * returning the updated value. The function should be * side-effect-free, since it may be re-applied when attempted - * updates fail due to contention among threads. The function - * is applied with the current value as its first argument, - * and the given update as the second argument. + * updates fail due to contention among threads. The function is + * applied with the current value as its first argument, and the + * given update as the second argument. * * @param x the update value * @param accumulatorFunction a side-effect-free function of two arguments @@ -473,7 +477,7 @@ public class AtomicInteger extends Number implements java.io.Serializable { * @since 9 */ public final int compareAndExchange(int expectedValue, int newValue) { - return U.compareAndExchangeIntVolatile(this, VALUE, expectedValue, newValue); + return U.compareAndExchangeInt(this, VALUE, expectedValue, newValue); } /** @@ -520,7 +524,7 @@ public class AtomicInteger extends Number implements java.io.Serializable { * @since 9 */ public final boolean weakCompareAndSetVolatile(int expectedValue, int newValue) { - return U.weakCompareAndSwapIntVolatile(this, VALUE, expectedValue, newValue); + return U.weakCompareAndSetInt(this, VALUE, expectedValue, newValue); } /** @@ -535,7 +539,7 @@ public class AtomicInteger extends Number implements java.io.Serializable { * @since 9 */ public final boolean weakCompareAndSetAcquire(int expectedValue, int newValue) { - return U.weakCompareAndSwapIntAcquire(this, VALUE, expectedValue, newValue); + return U.weakCompareAndSetIntAcquire(this, VALUE, expectedValue, newValue); } /** @@ -550,7 +554,7 @@ public class AtomicInteger extends Number implements java.io.Serializable { * @since 9 */ public final boolean weakCompareAndSetRelease(int expectedValue, int newValue) { - return U.weakCompareAndSwapIntRelease(this, VALUE, expectedValue, newValue); + return U.weakCompareAndSetIntRelease(this, VALUE, expectedValue, newValue); } } diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java index efddc9fb0f4..f59327da98a 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java @@ -260,10 +260,12 @@ public class AtomicIntegerArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the results - * of applying the given function, returning the previous value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function, returning the + * previous value. The function should be side-effect-free, since + * it may be re-applied when attempted updates fail due to + * contention among threads. * * @param i the index * @param updateFunction a side-effect-free function @@ -282,10 +284,12 @@ public class AtomicIntegerArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the results - * of applying the given function, returning the updated value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function, returning the + * updated value. The function should be side-effect-free, since it + * may be re-applied when attempted updates fail due to contention + * among threads. * * @param i the index * @param updateFunction a side-effect-free function @@ -304,10 +308,11 @@ public class AtomicIntegerArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the - * results of applying the given function to the current and given - * values, returning the previous value. The function should be - * side-effect-free, since it may be re-applied when attempted + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function to the current and + * given values, returning the previous value. The function should + * be side-effect-free, since it may be re-applied when attempted * updates fail due to contention among threads. The function is * applied with the current value of the element at index {@code i} * as its first argument, and the given update as the second @@ -332,10 +337,11 @@ public class AtomicIntegerArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the - * results of applying the given function to the current and given - * values, returning the updated value. The function should be - * side-effect-free, since it may be re-applied when attempted + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function to the current and + * given values, returning the updated value. The function should + * be side-effect-free, since it may be re-applied when attempted * updates fail due to contention among threads. The function is * applied with the current value of the element at index {@code i} * as its first argument, and the given update as the second diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java index 1de994f06ec..c8a37f30c31 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java @@ -46,6 +46,7 @@ import java.util.function.IntUnaryOperator; import jdk.internal.misc.Unsafe; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; +import java.lang.invoke.VarHandle; /** * A reflection-based utility that enables atomic updates to @@ -275,10 +276,12 @@ public abstract class AtomicIntegerFieldUpdater { } /** - * Atomically updates the field of the given object managed by this updater - * with the results of applying the given function, returning the previous - * value. The function should be side-effect-free, since it may be - * re-applied when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given + * function, returning the previous value. The function should be + * side-effect-free, since it may be re-applied when attempted + * updates fail due to contention among threads. * * @param obj An object whose field to get and set * @param updateFunction a side-effect-free function @@ -295,10 +298,12 @@ public abstract class AtomicIntegerFieldUpdater { } /** - * Atomically updates the field of the given object managed by this updater - * with the results of applying the given function, returning the updated - * value. The function should be side-effect-free, since it may be - * re-applied when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given + * function, returning the updated value. The function should be + * side-effect-free, since it may be re-applied when attempted + * updates fail due to contention among threads. * * @param obj An object whose field to get and set * @param updateFunction a side-effect-free function @@ -315,13 +320,14 @@ public abstract class AtomicIntegerFieldUpdater { } /** - * Atomically updates the field of the given object managed by this - * updater with the results of applying the given function to the - * current and given values, returning the previous value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. The - * function is applied with the current value as its first argument, - * and the given update as the second argument. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given function + * to the current and given values, returning the previous value. + * The function should be side-effect-free, since it may be + * re-applied when attempted updates fail due to contention among + * threads. The function is applied with the current value as its + * first argument, and the given update as the second argument. * * @param obj An object whose field to get and set * @param x the update value @@ -340,13 +346,14 @@ public abstract class AtomicIntegerFieldUpdater { } /** - * Atomically updates the field of the given object managed by this - * updater with the results of applying the given function to the - * current and given values, returning the updated value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. The - * function is applied with the current value as its first argument, - * and the given update as the second argument. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given function + * to the current and given values, returning the updated value. + * The function should be side-effect-free, since it may be + * re-applied when attempted updates fail due to contention among + * threads. The function is applied with the current value as its + * first argument, and the given update as the second argument. * * @param obj An object whose field to get and set * @param x the update value @@ -481,12 +488,12 @@ public abstract class AtomicIntegerFieldUpdater { public final boolean compareAndSet(T obj, int expect, int update) { accessCheck(obj); - return U.compareAndSwapInt(obj, offset, expect, update); + return U.compareAndSetInt(obj, offset, expect, update); } public final boolean weakCompareAndSet(T obj, int expect, int update) { accessCheck(obj); - return U.compareAndSwapInt(obj, offset, expect, update); + return U.compareAndSetInt(obj, offset, expect, update); } public final void set(T obj, int newValue) { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java index a0670eeac8f..4345ae89f72 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java @@ -56,7 +56,7 @@ public class AtomicLong extends Number implements java.io.Serializable { /** * Records whether the underlying JVM supports lockless - * compareAndSwap for longs. While the intrinsic compareAndSwapLong + * compareAndSet for longs. While the intrinsic compareAndSetLong * method works in either case, some constructions should be * handled at Java level to avoid locking user-visible locks. */ @@ -118,8 +118,7 @@ public class AtomicLong extends Number implements java.io.Serializable { * @param newValue the new value */ public final void set(long newValue) { - // Use putLongVolatile instead of ordinary volatile store when - // using compareAndSwapLong, for sake of some 32bit systems. + // See JDK-8180620: Clarify VarHandle mixed-access subtleties U.putLongVolatile(this, VALUE, newValue); } @@ -156,7 +155,7 @@ public class AtomicLong extends Number implements java.io.Serializable { * the actual value was not equal to the expected value. */ public final boolean compareAndSet(long expectedValue, long newValue) { - return U.compareAndSwapLong(this, VALUE, expectedValue, newValue); + return U.compareAndSetLong(this, VALUE, expectedValue, newValue); } /** @@ -177,7 +176,7 @@ public class AtomicLong extends Number implements java.io.Serializable { */ @Deprecated(since="9") public final boolean weakCompareAndSet(long expectedValue, long newValue) { - return U.weakCompareAndSwapLong(this, VALUE, expectedValue, newValue); + return U.weakCompareAndSetLongPlain(this, VALUE, expectedValue, newValue); } /** @@ -191,7 +190,7 @@ public class AtomicLong extends Number implements java.io.Serializable { * @since 9 */ public final boolean weakCompareAndSetPlain(long expectedValue, long newValue) { - return U.weakCompareAndSwapLong(this, VALUE, expectedValue, newValue); + return U.weakCompareAndSetLongPlain(this, VALUE, expectedValue, newValue); } /** @@ -265,7 +264,8 @@ public class AtomicLong extends Number implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function, returning the previous value. The * function should be side-effect-free, since it may be re-applied * when attempted updates fail due to contention among threads. @@ -286,7 +286,8 @@ public class AtomicLong extends Number implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function, returning the updated value. The * function should be side-effect-free, since it may be re-applied * when attempted updates fail due to contention among threads. @@ -307,13 +308,14 @@ public class AtomicLong extends Number implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function to the current and given values, * returning the previous value. The function should be * side-effect-free, since it may be re-applied when attempted - * updates fail due to contention among threads. The function - * is applied with the current value as its first argument, - * and the given update as the second argument. + * updates fail due to contention among threads. The function is + * applied with the current value as its first argument, and the + * given update as the second argument. * * @param x the update value * @param accumulatorFunction a side-effect-free function of two arguments @@ -333,13 +335,14 @@ public class AtomicLong extends Number implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function to the current and given values, * returning the updated value. The function should be * side-effect-free, since it may be re-applied when attempted - * updates fail due to contention among threads. The function - * is applied with the current value as its first argument, - * and the given update as the second argument. + * updates fail due to contention among threads. The function is + * applied with the current value as its first argument, and the + * given update as the second argument. * * @param x the update value * @param accumulatorFunction a side-effect-free function of two arguments @@ -487,7 +490,7 @@ public class AtomicLong extends Number implements java.io.Serializable { * @since 9 */ public final long compareAndExchange(long expectedValue, long newValue) { - return U.compareAndExchangeLongVolatile(this, VALUE, expectedValue, newValue); + return U.compareAndExchangeLong(this, VALUE, expectedValue, newValue); } /** @@ -534,7 +537,7 @@ public class AtomicLong extends Number implements java.io.Serializable { * @since 9 */ public final boolean weakCompareAndSetVolatile(long expectedValue, long newValue) { - return U.weakCompareAndSwapLongVolatile(this, VALUE, expectedValue, newValue); + return U.weakCompareAndSetLong(this, VALUE, expectedValue, newValue); } /** @@ -549,7 +552,7 @@ public class AtomicLong extends Number implements java.io.Serializable { * @since 9 */ public final boolean weakCompareAndSetAcquire(long expectedValue, long newValue) { - return U.weakCompareAndSwapLongAcquire(this, VALUE, expectedValue, newValue); + return U.weakCompareAndSetLongAcquire(this, VALUE, expectedValue, newValue); } /** @@ -564,7 +567,7 @@ public class AtomicLong extends Number implements java.io.Serializable { * @since 9 */ public final boolean weakCompareAndSetRelease(long expectedValue, long newValue) { - return U.weakCompareAndSwapLongRelease(this, VALUE, expectedValue, newValue); + return U.weakCompareAndSetLongRelease(this, VALUE, expectedValue, newValue); } } diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java index 10aa9deea83..24e42a1ea81 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java @@ -260,10 +260,12 @@ public class AtomicLongArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the results - * of applying the given function, returning the previous value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function, returning the + * previous value. The function should be side-effect-free, since + * it may be re-applied when attempted updates fail due to + * contention among threads. * * @param i the index * @param updateFunction a side-effect-free function @@ -282,10 +284,12 @@ public class AtomicLongArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the results - * of applying the given function, returning the updated value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function, returning the + * updated value. The function should be side-effect-free, since it + * may be re-applied when attempted updates fail due to contention + * among threads. * * @param i the index * @param updateFunction a side-effect-free function @@ -304,10 +308,11 @@ public class AtomicLongArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the - * results of applying the given function to the current and given - * values, returning the previous value. The function should be - * side-effect-free, since it may be re-applied when attempted + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function to the current and + * given values, returning the previous value. The function should + * be side-effect-free, since it may be re-applied when attempted * updates fail due to contention among threads. The function is * applied with the current value of the element at index {@code i} * as its first argument, and the given update as the second @@ -332,10 +337,11 @@ public class AtomicLongArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the - * results of applying the given function to the current and given - * values, returning the updated value. The function should be - * side-effect-free, since it may be re-applied when attempted + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function to the current and + * given values, returning the updated value. The function should + * be side-effect-free, since it may be re-applied when attempted * updates fail due to contention among threads. The function is * applied with the current value of the element at index {@code i} * as its first argument, and the given update as the second diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java index bd60f0bdcbb..3db7e36fe22 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java @@ -46,6 +46,7 @@ import java.util.function.LongUnaryOperator; import jdk.internal.misc.Unsafe; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; +import java.lang.invoke.VarHandle; /** * A reflection-based utility that enables atomic updates to @@ -278,10 +279,12 @@ public abstract class AtomicLongFieldUpdater { } /** - * Atomically updates the field of the given object managed by this updater - * with the results of applying the given function, returning the previous - * value. The function should be side-effect-free, since it may be - * re-applied when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given + * function, returning the previous value. The function should be + * side-effect-free, since it may be re-applied when attempted + * updates fail due to contention among threads. * * @param obj An object whose field to get and set * @param updateFunction a side-effect-free function @@ -298,10 +301,12 @@ public abstract class AtomicLongFieldUpdater { } /** - * Atomically updates the field of the given object managed by this updater - * with the results of applying the given function, returning the updated - * value. The function should be side-effect-free, since it may be - * re-applied when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given + * function, returning the updated value. The function should be + * side-effect-free, since it may be re-applied when attempted + * updates fail due to contention among threads. * * @param obj An object whose field to get and set * @param updateFunction a side-effect-free function @@ -318,13 +323,14 @@ public abstract class AtomicLongFieldUpdater { } /** - * Atomically updates the field of the given object managed by this - * updater with the results of applying the given function to the - * current and given values, returning the previous value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. The - * function is applied with the current value as its first argument, - * and the given update as the second argument. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given function + * to the current and given values, returning the previous value. + * The function should be side-effect-free, since it may be + * re-applied when attempted updates fail due to contention among + * threads. The function is applied with the current value as its + * first argument, and the given update as the second argument. * * @param obj An object whose field to get and set * @param x the update value @@ -343,13 +349,14 @@ public abstract class AtomicLongFieldUpdater { } /** - * Atomically updates the field of the given object managed by this - * updater with the results of applying the given function to the - * current and given values, returning the updated value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. The - * function is applied with the current value as its first argument, - * and the given update as the second argument. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given function + * to the current and given values, returning the updated value. + * The function should be side-effect-free, since it may be + * re-applied when attempted updates fail due to contention among + * threads. The function is applied with the current value as its + * first argument, and the given update as the second argument. * * @param obj An object whose field to get and set * @param x the update value @@ -454,12 +461,12 @@ public abstract class AtomicLongFieldUpdater { public final boolean compareAndSet(T obj, long expect, long update) { accessCheck(obj); - return U.compareAndSwapLong(obj, offset, expect, update); + return U.compareAndSetLong(obj, offset, expect, update); } public final boolean weakCompareAndSet(T obj, long expect, long update) { accessCheck(obj); - return U.compareAndSwapLong(obj, offset, expect, update); + return U.compareAndSetLong(obj, offset, expect, update); } public final void set(T obj, long newValue) { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java index 66b7b6c37a5..db1d483b5ae 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java @@ -170,7 +170,8 @@ public class AtomicReference implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function, returning the previous value. The * function should be side-effect-free, since it may be re-applied * when attempted updates fail due to contention among threads. @@ -191,7 +192,8 @@ public class AtomicReference implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function, returning the updated value. The * function should be side-effect-free, since it may be re-applied * when attempted updates fail due to contention among threads. @@ -212,13 +214,14 @@ public class AtomicReference implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function to the current and given values, * returning the previous value. The function should be * side-effect-free, since it may be re-applied when attempted - * updates fail due to contention among threads. The function - * is applied with the current value as its first argument, - * and the given update as the second argument. + * updates fail due to contention among threads. The function is + * applied with the current value as its first argument, and the + * given update as the second argument. * * @param x the update value * @param accumulatorFunction a side-effect-free function of two arguments @@ -238,13 +241,14 @@ public class AtomicReference implements java.io.Serializable { } /** - * Atomically updates the current value with the results of + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the current value with the results of * applying the given function to the current and given values, * returning the updated value. The function should be * side-effect-free, since it may be re-applied when attempted - * updates fail due to contention among threads. The function - * is applied with the current value as its first argument, - * and the given update as the second argument. + * updates fail due to contention among threads. The function is + * applied with the current value as its first argument, and the + * given update as the second argument. * * @param x the update value * @param accumulatorFunction a side-effect-free function of two arguments diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java index 2d529bb7ef1..b3193a23b9d 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java @@ -190,10 +190,12 @@ public class AtomicReferenceArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the results - * of applying the given function, returning the previous value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function, returning the + * previous value. The function should be side-effect-free, since + * it may be re-applied when attempted updates fail due to + * contention among threads. * * @param i the index * @param updateFunction a side-effect-free function @@ -212,10 +214,12 @@ public class AtomicReferenceArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the results - * of applying the given function, returning the updated value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function, returning the + * updated value. The function should be side-effect-free, since it + * may be re-applied when attempted updates fail due to contention + * among threads. * * @param i the index * @param updateFunction a side-effect-free function @@ -234,10 +238,11 @@ public class AtomicReferenceArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the - * results of applying the given function to the current and given - * values, returning the previous value. The function should be - * side-effect-free, since it may be re-applied when attempted + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function to the current and + * given values, returning the previous value. The function should + * be side-effect-free, since it may be re-applied when attempted * updates fail due to contention among threads. The function is * applied with the current value of the element at index {@code i} * as its first argument, and the given update as the second @@ -262,10 +267,11 @@ public class AtomicReferenceArray implements java.io.Serializable { } /** - * Atomically updates the element at index {@code i} with the - * results of applying the given function to the current and given - * values, returning the updated value. The function should be - * side-effect-free, since it may be re-applied when attempted + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the element at index {@code i} with + * the results of applying the given function to the current and + * given values, returning the updated value. The function should + * be side-effect-free, since it may be re-applied when attempted * updates fail due to contention among threads. The function is * applied with the current value of the element at index {@code i} * as its first argument, and the given update as the second diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java index 56f6751b9f0..062e797c496 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java @@ -46,6 +46,7 @@ import java.util.function.UnaryOperator; import jdk.internal.misc.Unsafe; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; +import java.lang.invoke.VarHandle; /** * A reflection-based utility that enables atomic updates to @@ -199,10 +200,12 @@ public abstract class AtomicReferenceFieldUpdater { } /** - * Atomically updates the field of the given object managed by this updater - * with the results of applying the given function, returning the previous - * value. The function should be side-effect-free, since it may be - * re-applied when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given + * function, returning the previous value. The function should be + * side-effect-free, since it may be re-applied when attempted + * updates fail due to contention among threads. * * @param obj An object whose field to get and set * @param updateFunction a side-effect-free function @@ -219,10 +222,12 @@ public abstract class AtomicReferenceFieldUpdater { } /** - * Atomically updates the field of the given object managed by this updater - * with the results of applying the given function, returning the updated - * value. The function should be side-effect-free, since it may be - * re-applied when attempted updates fail due to contention among threads. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given + * function, returning the updated value. The function should be + * side-effect-free, since it may be re-applied when attempted + * updates fail due to contention among threads. * * @param obj An object whose field to get and set * @param updateFunction a side-effect-free function @@ -239,13 +244,14 @@ public abstract class AtomicReferenceFieldUpdater { } /** - * Atomically updates the field of the given object managed by this - * updater with the results of applying the given function to the - * current and given values, returning the previous value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. The - * function is applied with the current value as its first argument, - * and the given update as the second argument. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given function + * to the current and given values, returning the previous value. + * The function should be side-effect-free, since it may be + * re-applied when attempted updates fail due to contention among + * threads. The function is applied with the current value as its + * first argument, and the given update as the second argument. * * @param obj An object whose field to get and set * @param x the update value @@ -264,13 +270,14 @@ public abstract class AtomicReferenceFieldUpdater { } /** - * Atomically updates the field of the given object managed by this - * updater with the results of applying the given function to the - * current and given values, returning the updated value. The - * function should be side-effect-free, since it may be re-applied - * when attempted updates fail due to contention among threads. The - * function is applied with the current value as its first argument, - * and the given update as the second argument. + * Atomically updates (with memory effects as specified by {@link + * VarHandle#compareAndSet}) the field of the given object managed + * by this updater with the results of applying the given function + * to the current and given values, returning the updated value. + * The function should be side-effect-free, since it may be + * re-applied when attempted updates fail due to contention among + * threads. The function is applied with the current value as its + * first argument, and the given update as the second argument. * * @param obj An object whose field to get and set * @param x the update value @@ -432,14 +439,14 @@ public abstract class AtomicReferenceFieldUpdater { public final boolean compareAndSet(T obj, V expect, V update) { accessCheck(obj); valueCheck(update); - return U.compareAndSwapObject(obj, offset, expect, update); + return U.compareAndSetObject(obj, offset, expect, update); } public final boolean weakCompareAndSet(T obj, V expect, V update) { // same implementation as strong form for now accessCheck(obj); valueCheck(update); - return U.compareAndSwapObject(obj, offset, expect, update); + return U.compareAndSetObject(obj, offset, expect, update); } public final void set(T obj, V newValue) { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java b/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java index 7bf6e8a54cd..09c4368c6cc 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java @@ -133,6 +133,8 @@ import jdk.internal.misc.Unsafe; * Class ensureLoaded = LockSupport.class; * } * }} + * + * @since 1.5 */ public class LockSupport { private LockSupport() {} // Cannot be instantiated. diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java b/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java index d228f73d39c..ab43971e84d 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java @@ -53,16 +53,14 @@ import jdk.internal.vm.annotation.ReservedStackAccess; * *

            *
            Non-fair mode (default) - *
            - * When constructed as non-fair (the default), the order of entry + *
            When constructed as non-fair (the default), the order of entry * to the read and write lock is unspecified, subject to reentrancy * constraints. A nonfair lock that is continuously contended may * indefinitely postpone one or more reader or writer threads, but * will normally have higher throughput than a fair lock. * *
            Fair mode - *
            - * When constructed as fair, threads contend for entry using an + *
            When constructed as fair, threads contend for entry using an * approximately arrival-order policy. When the currently held lock * is released, either the longest-waiting single writer thread will * be assigned the write lock, or if there is a group of reader threads diff --git a/jdk/src/java.base/share/classes/java/util/doc-files/coll-designfaq.html b/jdk/src/java.base/share/classes/java/util/doc-files/coll-designfaq.html new file mode 100644 index 00000000000..84d6cc32a67 --- /dev/null +++ b/jdk/src/java.base/share/classes/java/util/doc-files/coll-designfaq.html @@ -0,0 +1,399 @@ + + + + + + + +Java Collections API Design FAQ + + +

            Java Collections API Design FAQ

            + +
            +This document answers frequently asked questions concerning the +design of the Java collections framework. It is derived from the +large volume of traffic on the collections-comments alias. It +serves as a design rationale for the collections framework. +

            Core Interfaces - General Questions

            +
              +
            1. Why don't you support immutability directly in +the core collection interfaces so that you can do away with +optional operations (and +UnsupportedOperationException)?
            2. +
            3. Won't programmers have to surround any code +that calls optional operations with a try-catch clause in case they +throw an UnsupportedOperationException?
            4. +
            5. Why isn't there a core interface for "bags" +(AKA multisets)?
            6. +
            7. Why didn't you use "Beans-style names" for +consistency?
            8. +
            +

            Collection Interface

            +
              +
            1. Why doesn't Collection extend Cloneable and +Serializable?
            2. +
            3. Why don't you provide an "apply" method in +Collection to apply a given method ("upcall") to all the elements +of the Collection?
            4. +
            5. Why didn't you provide a "Predicate" interface, +and related methods (e.g., a method to find the first element in +the Collection satisfying the predicate)?
            6. +
            7. Why don't you provide a form of the addAll +method that takes an Enumeration (or an Iterator)?
            8. +
            9. Why don't the concrete implementations in the +JDK have Enumeration (or Iterator) constructors?
            10. +
            11. Why don't you provide an Iterator.add +method?
            12. +
            +

            List Interface

            +
              +
            1. Why don't you rename the List interface to +Sequence; doesn't "list" generally suggest "linked list"? Also, +doesn't it conflict with java.awt.List?
            2. +
            3. Why don't you rename List's set method to +replace, to avoid confusion with Set.
            4. +
            +

            Map Interface

            +
              +
            1. Why doesn't Map extend +Collection?
            2. +
            +

            Iterator Interface

            +
              +
            1. Why doesn't Iterator extend +Enumeration?
            2. +
            3. Why don't you provide an Iterator.peek method +that allows you to look at the next element in an iteration without +advancing the iterator?
            4. +
            +

            Miscellaneous

            +
              +
            1. Why did you write a new collections framework +instead of adopting JGL (a preexisting collections package from +ObjectSpace, Inc.) into the JDK?
            2. +
            3. Why don't you eliminate all of the methods and +classes that return "views" (Collections backed by other +collection-like objects). This would greatly reduce +aliasing.
            4. +
            5. Why don't you provide for "observable" +collections that send out Events when they're +modified?
            6. +
            +
            +

            Core Interfaces - General Questions

            +
              +
            1. Why don't you support immutability +directly in the core collection interfaces so that you can do away +with optional operations (and +UnsupportedOperationException)? +

              This is the most controversial design decision in the whole API. +Clearly, static (compile time) type checking is highly desirable, +and is the norm in Java. We would have supported it if we believed +it were feasible. Unfortunately, attempts to achieve this goal +cause an explosion in the size of the interface hierarchy, and do +not succeed in eliminating the need for runtime exceptions (though +they reduce it substantially).

              +

              Doug Lea, who wrote a popular Java collections package that did +reflect mutability distinctions in its interface hierarchy, no +longer believes it is a viable approach, based on user experience +with his collections package. In his words (from personal +correspondence) "Much as it pains me to say it, strong static +typing does not work for collection interfaces in Java."

              +

              To illustrate the problem in gory detail, suppose you want to +add the notion of modifiability to the Hierarchy. You need four new +interfaces: ModifiableCollection, ModifiableSet, ModifiableList, +and ModifiableMap. What was previously a simple hierarchy is now a +messy heterarchy. Also, you need a new Iterator interface for use +with unmodifiable Collections, that does not contain the remove +operation. Now can you do away with UnsupportedOperationException? +Unfortunately not.

              +

              Consider arrays. They implement most of the List operations, but +not remove and add. They are "fixed-size" Lists. If you want to +capture this notion in the hierarchy, you have to add two new +interfaces: VariableSizeList and VariableSizeMap. You don't have to +add VariableSizeCollection and VariableSizeSet, because they'd be +identical to ModifiableCollection and ModifiableSet, but you might +choose to add them anyway for consistency's sake. Also, you need a +new variety of ListIterator that doesn't support the add and remove +operations, to go along with unmodifiable List. Now we're up to ten +or twelve interfaces, plus two new Iterator interfaces, instead of +our original four. Are we done? No.

              +

              Consider logs (such as error logs, audit logs and journals for +recoverable data objects). They are natural append-only sequences, +that support all of the List operations except for remove and set +(replace). They require a new core interface, and a new +iterator.

              +

              And what about immutable Collections, as opposed to unmodifiable +ones? (i.e., Collections that cannot be changed by the client AND +will never change for any other reason). Many argue that this is +the most important distinction of all, because it allows multiple +threads to access a collection concurrently without the need for +synchronization. Adding this support to the type hierarchy requires +four more interfaces.

              +

              Now we're up to twenty or so interfaces and five iterators, and +it's almost certain that there are still collections arising in +practice that don't fit cleanly into any of the interfaces. For +example, the collection-views returned by Map are natural +delete-only collections. Also, there are collections that will +reject certain elements on the basis of their value, so we still +haven't done away with runtime exceptions.

              +

              When all was said and done, we felt that it was a sound +engineering compromise to sidestep the whole issue by providing a +very small set of core interfaces that can throw a runtime +exception.

              +
            2. +
            3. Won't programmers have to surround any +code that calls optional operations with a try-catch clause in case +they throw an UnsupportedOperationException? +

              It was never our intention that programs should catch these +exceptions: that's why they're unchecked (runtime) exceptions. They +should only arise as a result of programming errors, in which case, +your program will halt due to the uncaught exception.

              +
            4. +
            5. Why isn't there a core interface for +"bags" (AKA multisets)? +

              The Collection interface provides this functionality. We are not +providing any public implementations of this interface, as we think +that it wouldn't be used frequently enough to "pull its weight." We +occasionally return such Collections, which are implemented easily +atop AbstractCollection (for example, the Collection returned by +Map.values).

              +
            6. +
            7. Why didn't you use "Beans-style +names" for consistency? +

              While the names of the new collections methods do not adhere to +the "Beans naming conventions", we believe that they are +reasonable, consistent and appropriate to their purpose. It should +be remembered that the Beans naming conventions do not apply to the +JDK as a whole; the AWT did adopt these conventions, but that +decision was somewhat controversial. We suspect that the +collections APIs will be used quite pervasively, often with +multiple method calls on a single line of code, so it is important +that the names be short. Consider, for example, the Iterator +methods. Currently, a loop over a collection looks like this:

              +
              +    for (Iterator i = c.iterator(); i.hasNext(); )
              +        System.out.println(i.next());
              +
              +Everything fits neatly on one line, even if the Collection name is +a long expression. If we named the methods "getIterator", +"hasNextElement" and "getNextElement", this would no longer be the +case. Thus, we adopted the "traditional" JDK style rather than the +Beans style.
            8. +
            +
            +

            Collection Interface

            +
              +
            1. Why doesn't Collection extend Cloneable +and Serializable? +

              Many Collection implementations (including all of the ones +provided by the JDK) will have a public clone method, but it would +be mistake to require it of all Collections. For example, what does +it mean to clone a Collection that's backed by a terabyte SQL +database? Should the method call cause the company to requisition a +new disk farm? Similar arguments hold for serializable.

              +

              If the client doesn't know the actual type of a Collection, it's +much more flexible and less error prone to have the client decide +what type of Collection is desired, create an empty Collection of +this type, and use the addAll method to copy the elements of the +original collection into the new one.

              +
            2. +
            3. Why don't you provide an "apply" method +in Collection to apply a given method ("upcall") to all the +elements of the Collection? +

              This is what is referred to as an "Internal Iterator" in the +"Design Patterns" book (Gamma et al.). We considered providing it, +but decided not to as it seems somewhat redundant to support +internal and external iterators, and Java already has a precedent +for external iterators (with Enumerations). The "throw weight" of +this functionality is increased by the fact that it requires a +public interface to describe upcalls.

              +
            4. +
            5. Why didn't you provide a "Predicate" +interface, and related methods (e.g., a method to find the first +element in the Collection satisfying the predicate)? +

              It's easy to implement this functionality atop Iterators, and +the resulting code may actually look cleaner as the user can inline +the predicate. Thus, it's not clear whether this facility pulls its +weight. It could be added to the Collections class at a later date +(implemented atop Iterator), if it's deemed useful.

              +
            6. +
            7. Why don't you provide a form of the +addAll method that takes an Enumeration (or an Iterator)? +

              Because we don't believe in using Enumerations (or Iterators) as +"poor man's collections." This was occasionally done in prior +releases, but now that we have the Collection interface, it is the +preferred way to pass around abstract collections of objects.

              +
            8. +
            9. Why don't the concrete implementations +in the JDK have Enumeration (or Iterator) constructors? +

              Again, this is an instance of an Enumeration serving as a "poor +man's collection" and we're trying to discourage that. Note +however, that we strongly suggest that all concrete implementations +should have constructors that take a Collection (and create a new +Collection with the same elements).

              +
            10. +
            11. Why don't you provide an Iterator.add +method? +

              The semantics are unclear, given that the contract for Iterator +makes no guarantees about the order of iteration. Note, however, +that ListIterator does provide an add operation, as it does +guarantee the order of the iteration.

              +
            12. +
            +
            +

            List Interface

            +
              +
            1. Why don't you rename the List +interface to Sequence; doesn't "list" generally suggest "linked +list"? Also, doesn't it conflict with java.awt.List? +

              People were evenly divided as to whether List suggests linked +lists. Given the implementation naming convention, +<Implementation><Interface>, there +was a strong desire to keep the core interface names short. Also, +several existing names (AbstractSequentialList, LinkedList) would +have been decidedly worse if we changed List to Sequence. The +naming conflict can be dealt with by the following incantation:

              +
              +    import java.util.*;
              +    import java.awt.*;
              +    import java.util.List;   // Dictates interpretation of "List"
              +
            2. +
            3. Why don't you rename List's set +method to replace, to avoid confusion with Set. +

              It was decided that the "set/get" naming convention was strongly +enough enshrined in the language that we'd stick with it.

              +
            4. +
            +
            +

            Map Interface

            +
              +
            1. Why doesn't Map extend +Collection? +

              This was by design. We feel that mappings are not collections +and collections are not mappings. Thus, it makes little sense for +Map to extend the Collection interface (or vice versa).

              +

              If a Map is a Collection, what are the elements? The only +reasonable answer is "Key-value pairs", but this provides a very +limited (and not particularly useful) Map abstraction. You can't +ask what value a given key maps to, nor can you delete the entry +for a given key without knowing what value it maps to.

              +

              Collection could be made to extend Map, but this raises the +question: what are the keys? There's no really satisfactory answer, +and forcing one leads to an unnatural interface.

              +

              Maps can be viewed as Collections (of keys, values, or +pairs), and this fact is reflected in the three "Collection view +operations" on Maps (keySet, entrySet, and values). While it is, in +principle, possible to view a List as a Map mapping indices to +elements, this has the nasty property that deleting an element from +the List changes the Key associated with every element before the +deleted element. That's why we don't have a map view operation on +Lists.

              +
            2. +
            +
            +

            Iterator Interface

            +
              +
            1. Why doesn't Iterator extend +Enumeration? +

              We view the method names for Enumeration as unfortunate. They're +very long, and very frequently used. Given that we were adding a +method and creating a whole new framework, we felt that it would be +foolish not to take advantage of the opportunity to improve the +names. Of course we could support the new and old names in +Iterator, but it doesn't seem worthwhile.

              +
            2. +
            3. Why don't you provide an +Iterator.peek method that allows you to look at the next element in +an iteration without advancing the iterator? +

              It can be implemented atop the current Iterators (a similar +pattern to java.io.PushbackInputStream). We believe that its use +would be rare enough that it isn't worth including in the interface +that everyone has to implement.

              +
            4. +
            +
            +

            Miscellaneous

            +
              +
            1. Why did you write a new collections +framework instead of adopting JGL (a preexisting collections +package from ObjectSpace, Inc.) into the JDK? +

              If you examine the goals for our Collections framework (in the +Overview), you'll see that we are not really "playing in the same +space" as JGL. Quoting from the "Design Goals" Section of the Java +Collections Overview: "Our main design goal was to produce an API +that was reasonably small, both in size, and (more importantly) in +'conceptual weight.'"

              +

              JGL consists of approximately 130 classes and interfaces; its +main goal was consistency with the C++ Standard Template Library +(STL). This was not one of our goals. Java has +traditionally stayed away from C++'s more complex features (e.g., +multiple inheritance, operator overloading). Our entire framework, +including all infrastructure, contains approximately 25 classes and +interfaces.

              +

              While this may cause some discomfort for some C++ programmers, +we feel that it will be good for Java in the long run. As the Java +libraries mature, they inevitably grow, but we are trying as hard +as we can to keep them small and manageable, so that Java continues +to be an easy, fun language to learn and to use.

              +
            2. +
            3. Why don't you eliminate all of the +methods and classes that return "views" (Collections backed by +other collection-like objects). This would greatly reduce +aliasing. +

              Given that we provide core collection interfaces behind which +programmers can "hide" their own implementations, there will be +aliased collections whether the JDK provides them or not. +Eliminating all views from the JDK would greatly increase the cost +of common operations like making a Collection out of an array, and +would do away with many useful facilities (like synchronizing +wrappers). One view that we see as being particularly useful is +List.subList. +The existence of this method means that people who write methods +taking List on input do not have to write secondary forms taking an +offset and a length (as they do for arrays).

              +
            4. +
            5. Why don't you provide for +"observable" collections that send out Events when they're +modified? +

              Primarily, resource constraints. If we're going to commit to +such an API, it has to be something that works for everyone, that +we can live with for the long haul. We may provide such a facility +some day. In the meantime, it's not difficult to implement such a +facility on top of the public APIs.

              +
            6. +
            +
            +

            +Copyright © 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
            + Redwood Shores, CA 94065 USA. All rights reserved.

            + + + diff --git a/jdk/src/java.base/share/classes/java/util/doc-files/coll-index.html b/jdk/src/java.base/share/classes/java/util/doc-files/coll-index.html new file mode 100644 index 00000000000..1e3f553bbd8 --- /dev/null +++ b/jdk/src/java.base/share/classes/java/util/doc-files/coll-index.html @@ -0,0 +1,80 @@ + + + + + + + + +The Collections Framework + + + + +

            The Collections Framework

            + +

            The collections framework is a unified architecture for +representing and manipulating collections, enabling them to be +manipulated independently of the details of their representation. +It reduces programming effort while increasing performance. It +enables interoperability among unrelated APIs, reduces effort in +designing and learning new APIs, and fosters software reuse. The +framework is based on more than a dozen collection interfaces. It +includes implementations of these interfaces and algorithms to +manipulate them.

            +

            The documents in this section are non-normative portions of +the Java™ Platform, Standard Edition API Specification.

            +
              +
            • Overview - An overview of +the collections framework.
            • +
            +
              +
            • Annotated API Outline - An +annotated outline of the classes and interfaces comprising the +collections framework, with links into the API Specification.
            • +
            +
              +
            • Design FAQ - Answers to +frequently asked questions (FAQ) about the design of the +collections framework.
            • +
            +
            +

            +Copyright © 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
            + Redwood Shores, CA 94065 USA. All rights reserved.

            + + + diff --git a/jdk/src/java.base/share/classes/java/util/doc-files/coll-overview.html b/jdk/src/java.base/share/classes/java/util/doc-files/coll-overview.html new file mode 100644 index 00000000000..61db0494ca4 --- /dev/null +++ b/jdk/src/java.base/share/classes/java/util/doc-files/coll-overview.html @@ -0,0 +1,359 @@ + + + + + + + +Collections Framework Overview + + +

            Collections Framework Overview

            + +

            Introduction

            +The Java platform includes a collections framework. A +collection is an object that represents a group of objects +(such as the classic ArrayList class). +A collections framework is a unified architecture for representing +and manipulating collections, enabling collections to be +manipulated independently of implementation details. +

            The primary advantages of a collections framework are that +it:

            +
              +
            • Reduces programming effort by providing data +structures and algorithms so you don't have to write them +yourself.
            • +
            • Increases performance by providing +high-performance implementations of data structures and algorithms. +Because the various implementations of each interface are +interchangeable, programs can be tuned by switching +implementations.
            • +
            • Provides interoperability between unrelated +APIs by establishing a common language to pass collections +back and forth.
            • +
            • Reduces the effort required to learn APIs by +requiring you to learn multiple ad hoc collection APIs.
            • +
            • Reduces the effort required to design and implement +APIs by not requiring you to produce ad hoc collections +APIs.
            • +
            • Fosters software reuse by providing a standard +interface for collections and algorithms with which to manipulate +them.
            • +
            +

            The collections framework consists of:

            +
              +
            • Collection interfaces. Represent different +types of collections, such as sets, lists, and maps. These +interfaces form the basis of the framework.
            • +
            • General-purpose implementations. Primary +implementations of the collection interfaces.
            • +
            • Legacy implementations. The collection classes +from earlier releases, Vector and Hashtable, were +retrofitted to implement the collection interfaces.
            • +
            • Special-purpose implementations. +Implementations designed for use in special situations. These +implementations display nonstandard performance characteristics, +usage restrictions, or behavior.
            • +
            • Concurrent implementations. Implementations +designed for highly concurrent use.
            • +
            • Wrapper implementations. Add functionality, +such as synchronization, to other implementations.
            • +
            • Convenience implementations. High-performance +"mini-implementations" of the collection interfaces.
            • +
            • Abstract implementations. Partial +implementations of the collection interfaces to facilitate custom +implementations.
            • +
            • Algorithms. Static methods that perform useful +functions on collections, such as sorting a list.
            • +
            • Infrastructure. Interfaces that provide +essential support for the collection interfaces.
            • +
            • Array Utilities. Utility functions for arrays +of primitive types and reference objects. Not, strictly speaking, a +part of the collections framework, this feature was added to the +Java platform at the same time as the collections framework and +relies on some of the same infrastructure.
            • +
            +
            +

            Collection Interfaces

            +

            The collection interfaces are divided into two groups. +The most basic interface, java.util.Collection, +has the following descendants:

            + +

            The other collection interfaces are based on java.util.Map and are +not true collections. However, these interfaces contain +collection-view operations, which enable them to be +manipulated as collections. Map has the following +offspring:

            + +

            Many of the modification methods in the collection interfaces +are labeled optional. Implementations are permitted to not +perform one or more of these operations, throwing a runtime +exception (UnsupportedOperationException) if they are +attempted. The documentation for each implementation must specify +which optional operations are supported. Several terms are +introduced to aid in this specification:

            +
              +
            • Collections that do not support modification operations (such +as add, remove and clear) are referred +to as unmodifiable. Collections that are not unmodifiable +are modifiable.
            • +
            • Collections that additionally guarantee that no change in the +Collection object will be visible are referred to as +immutable. Collections that are not immutable are +mutable.
            • +
            • Lists that guarantee that their size remains constant even +though the elements can change are referred to as +fixed-size. Lists that are not fixed-size are referred to as +variable-size.
            • +
            • Lists that support fast (generally constant time) indexed +element access are known as random access lists. Lists that +do not support fast indexed element access are known as +sequential access lists. The RandomAccess +marker interface enables lists to advertise the fact that they +support random access. This enables generic algorithms to change +their behavior to provide good performance when applied to either +random or sequential access lists.
            • +
            +

            Some implementations restrict what elements (or in the case of +Maps, keys and values) can be stored. Possible +restrictions include requiring elements to:

            +
              +
            • Be of a particular type.
            • +
            • Be not null.
            • +
            • Obey some arbitrary predicate.
            • +
            +

            Attempting to add an element that violates an implementation's +restrictions results in a runtime exception, typically a +ClassCastException, an IllegalArgumentException, +or a NullPointerException. Attempting to remove or test +for the presence of an element that violates an implementation's +restrictions can result in an exception. Some restricted +collections permit this usage.

            +
            +

            Collection Implementations

            +

            Classes that implement the collection interfaces typically have +names in the form of +<Implementation-style><Interface>. +The general purpose implementations are summarized in the following +table:

            +
            Summary of task execution methods
            Call from non-fork/join clients Call from within fork/join computations Call from non-fork/join clients Call from within fork/join computations
            Arrange async execution
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            InterfaceHash TableResizable ArrayBalanced TreeLinked ListHash Table + Linked List
            SetHashSet TreeSet LinkedHashSet
            List ArrayList LinkedList 
            Deque ArrayDeque LinkedList 
            MapHashMap TreeMap LinkedHashMap
            +

            The general-purpose implementations support all of the +optional operations in the collection interfaces and have no +restrictions on the elements they may contain. They are +unsynchronized, but the Collections class contains static +factories called +synchronization wrappers that can be used to add +synchronization to many unsynchronized collections. All of the new +implementations have fail-fast iterators, which detect +invalid concurrent modification, and fail quickly and cleanly +(rather than behaving erratically).

            +

            The AbstractCollection, AbstractSet, +AbstractList, AbstractSequentialList and +AbstractMap classes provide basic implementations of the +core collection interfaces, to minimize the effort required to +implement them. The API documentation for these classes describes +precisely how each method is implemented so the implementer knows +which methods must be overridden, given the performance of the +basic operations of a specific implementation.

            +
            +

            Concurrent Collections

            +

            Applications that use collections from more than one thread must +be carefully programmed. In general, this is known as concurrent +programming. The Java platform includes extensive support for +concurrent programming. See Java Concurrency +Utilities for details.

            +

            Collections are so frequently used that various concurrent +friendly interfaces and implementations of collections are included +in the APIs. These types go beyond the synchronization wrappers +discussed previously to provide features that are frequently needed +in concurrent programming.

            +

            These concurrent-aware interfaces are available:

            + +

            The following concurrent-aware implementation classes are +available. See the API documentation for the correct usage of these +implementations.

            + +
            +

            Design Goals

            +

            The main design goal was to produce an API that was small in +size and, more importantly, in "conceptual weight." It +was critical that the new functionality not seem too different to +current Java programmers; it had to augment current facilities, +rather than replace them. At the same time, the new API had to be +powerful enough to provide all the advantages described +previously.

            +

            To keep the number of core interfaces small, the interfaces do +not attempt to capture such subtle distinctions as mutability, +modifiability, and resizability. Instead, certain calls in the core +interfaces are optional, enabling implementations to throw +an UnsupportedOperationException to indicate that they do +not support a specified optional operation. Collection implementers +must clearly document which optional operations are supported by an +implementation.

            +

            To keep the number of methods in each core interface small, an +interface contains a method only if either:

            +
              +
            • It is a truly fundamental operation: a basic operations +in terms of which others could be reasonably defined,
            • +
            • There is a compelling performance reason why an important +implementation would want to override it.
            • +
            +

            It was critical that all reasonable representations of +collections interoperate well. This included arrays, which cannot +be made to implement the Collection interface directly +without changing the language. Thus, the framework includes methods +to enable collections to be moved into arrays, arrays to be viewed +as collections, and maps to be viewed as collections.

            +
            +

            +Copyright © 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
            + Redwood Shores, CA 94065 USA. All rights reserved.

            + + + diff --git a/jdk/src/java.base/share/classes/java/util/doc-files/coll-reference.html b/jdk/src/java.base/share/classes/java/util/doc-files/coll-reference.html new file mode 100644 index 00000000000..97ebf939e19 --- /dev/null +++ b/jdk/src/java.base/share/classes/java/util/doc-files/coll-reference.html @@ -0,0 +1,564 @@ + + + + + + + +Outline of the Collections Framework + + +

            Outline of the Collections Framework

            + +The collections framework consists of: +
              +
            • Collection interfaces - The primary means by +which collections are manipulated. +
                +
              • Collection +- A group of objects. No assumptions are made about the order of +the collection (if any) or whether it can contain duplicate +elements.
              • +
              • Set - The +familiar set abstraction. No duplicate elements permitted. May or +may not be ordered. Extends the Collection interface.
              • +
              • List - +Ordered collection, also known as a sequence. Duplicates are +generally permitted. Allows positional access. Extends the +Collection interface.
              • +
              • Queue - A +collection designed for holding elements before processing. Besides +basic Collection operations, queues provide additional +insertion, extraction, and inspection operations.
              • +
              • Deque - A +double ended queue, supporting element insertion and +removal at both ends. Extends the Queue interface.
              • +
              • Map - A +mapping from keys to values. Each key can map to one value.
              • +
              • SortedSet +- A set whose elements are automatically sorted, either in their +natural ordering (see the Comparable +interface) or by a Comparator +object provided when a SortedSet instance is created. +Extends the Set interface.
              • +
              • SortedMap +- A map whose mappings are automatically sorted by key, either +using the natural ordering of the keys or by a comparator +provided when a SortedMap instance is created. Extends the +Map interface.
              • +
              • NavigableSet +- A SortedSet extended with navigation methods reporting +closest matches for given search targets. A NavigableSet +may be accessed and traversed in either ascending or descending +order.
              • +
              • NavigableMap +- A SortedMap extended with navigation methods returning +the closest matches for given search targets. A +NavigableMap can be accessed and traversed in either +ascending or descending key order.
              • +
              • BlockingQueue +- A Queue with operations that wait for the queue to +become nonempty when retrieving an element and that wait for space +to become available in the queue when storing an element. (This +interface is part of the java.util.concurrent +package.)
              • +
              • TransferQueue +- A BlockingQueue in which producers can wait for +consumers to receive elements. (This interface is part of the +java.util.concurrent +package.)
              • +
              • BlockingDeque +- A Deque with operations that wait for the deque to +become nonempty when retrieving an element and wait for space to +become available in the deque when storing an element. Extends both +the Deque and BlockingQueue interfaces. (This +interface is part of the java.util.concurrent +package.)
              • +
              • ConcurrentMap +- A Map with atomic putIfAbsent, remove, +and replace methods. (This interface is part of the +java.util.concurrent package.)
              • +
              • +ConcurrentNavigableMap - A ConcurrentMap that +is also a NavigableMap.
              • +
              +
            • +
            • General-purpose implementations - The primary +implementations of the collection interfaces. +
                +
              • HashSet - Hash +table implementation of the Set interface. The best +all-around implementation of the Set interface.
              • +
              • TreeSet +- Red-black tree implementation of the NavigableSet +interface.
              • +
              • LinkedHashSet +- Hash table and linked list implementation of the Set +interface. An insertion-ordered Set implementation that +runs nearly as fast as HashSet.
              • +
              • ArrayList - +Resizable array implementation of the List interface (an +unsynchronized Vector). The best all-around implementation +of the List interface.
              • +
              • ArrayDeque - +Efficient, resizable array implementation of the Deque +interface.
              • +
              • LinkedList +- Doubly-linked list implementation of the List interface. +Provides better performance than the ArrayList +implementation if elements are frequently inserted or deleted +within the list. Also implements the Deque interface. When +accessed through the Queue interface, LinkedList +acts as a FIFO queue.
              • +
              • PriorityQueue +- Heap implementation of an unbounded priority queue.
              • +
              • HashMap - Hash +table implementation of the Map interface (an +unsynchronized Hashtable that supports null keys +and values). The best all-around implementation of the Map +interface.
              • +
              • TreeMap +Red-black tree implementation of the NavigableMap +interface.
              • +
              • LinkedHashMap +- Hash table and linked list implementation of the Map +interface. An insertion-ordered Map implementation that +runs nearly as fast as HashMap. Also useful for building +caches (see +removeEldestEntry(Map.Entry) ).
              • +
              +
            • +
            • Wrapper implementations - +Functionality-enhancing implementations for use with other +implementations. Accessed solely through static factory methods. +
                +
              • +Collections.unmodifiableInterface - +Returns an unmodifiable view of a specified collection that throws +an UnsupportedOperationException if the user attempts to +modify it.
              • +
              • Collections.synchronizedInterface +- Returns a synchronized collection that is backed by the specified +(typically unsynchronized) collection. As long as all accesses to +the backing collection are through the returned collection, thread +safety is guaranteed.
              • +
              • +Collections.checkedInterface - Returns +a dynamically type-safe view of the specified collection, which +throws a ClassCastException if a client attempts to add an +element of the wrong type. The generics mechanism in the language +provides compile-time (static) type checking, but it is possible to +bypass this mechanism. Dynamically type-safe views eliminate this +possibility.
              • +
              +
            • +
            • Adapter implementations - Implementations that +adapt one collections interface to another: +
                +
              • +newSetFromMap(Map) - Creates a general-purpose +Set implementation from a general-purpose Map +implementation.
              • +
              • +asLifoQueue(Deque) - Returns a view of a +Deque as a Last In First Out (LIFO) Queue.
              • +
              +
            • +
            • Convenience implementations - High-performance +"mini-implementations" of the collection interfaces. + +
            • +
            • Legacy implementations - Older collection +classes were retrofitted to implement the collection interfaces. +
                +
              • Vector - +Synchronized resizable array implementation of the List +interface with additional legacy methods.
              • +
              • Hashtable +- Synchronized hash table implementation of the Map +interface that does not allow null keys or values, plus +additional legacy methods.
              • +
              +
            • +
            • Special-purpose implementations +
                +
              • WeakHashMap +- An implementation of the Map interface that stores only +weak +references to its keys. Storing only weak references +enables key-value pairs to be garbage collected when the key is no +longer referenced outside of the WeakHashMap. This class +is the easiest way to use the power of weak references. It is +useful for implementing registry-like data structures, where the +utility of an entry vanishes when its key is no longer reachable by +any thread.
              • +
              • IdentityHashMap +- Identity-based Map implementation based on a hash table. +This class is useful for topology-preserving object graph +transformations (such as serialization or deep copying). To perform +these transformations, you must maintain an identity-based "node +table" that keeps track of which objects have already been seen. +Identity-based maps are also used to maintain +object-to-meta-information mappings in dynamic debuggers and +similar systems. Finally, identity-based maps are useful in +preventing "spoof attacks" resulting from intentionally perverse +equals methods. (IdentityHashMap never invokes the equals +method on its keys.) An added benefit of this implementation is +that it is fast.
              • +
              • CopyOnWriteArrayList +- A List implementation backed by an copy-on-write array. +All mutative operations (such as add, set, and +remove) are implemented by making a new copy of the array. +No synchronization is necessary, even during iteration, and +iterators are guaranteed never to throw +ConcurrentModificationException. This implementation is +well-suited to maintaining event-handler lists (where change is +infrequent, and traversal is frequent and potentially +time-consuming).
              • +
              • CopyOnWriteArraySet +- A Set implementation backed by a copy-on-write array. +This implementation is similar to CopyOnWriteArrayList. +Unlike most Set implementations, the add, +remove, and contains methods require time +proportional to the size of the set. This implementation is well +suited to maintaining event-handler lists that must prevent +duplicates.
              • +
              • EnumSet - A +high-performance Set implementation backed by a bit +vector. All elements of each EnumSet instance must be +elements of a single enum type.
              • +
              • EnumMap - A +high-performance Map implementation backed by an array. +All keys in each EnumMap instance must be elements of a +single enum type.
              • +
              +
            • +
            • Concurrent implementations - These +implementations are part of java.util.concurrent. +
                +
              • ConcurrentLinkedQueue +- An unbounded first in, first out (FIFO) queue based on linked +nodes.
              • +
              • +LinkedBlockingQueue - An optionally bounded FIFO +blocking queue backed by linked nodes.
              • +
              • +ArrayBlockingQueue - A bounded FIFO blocking queue +backed by an array.
              • +
              • +PriorityBlockingQueue - An unbounded blocking priority +queue backed by a priority heap.
              • +
              • DelayQueue +- A time-based scheduling queue backed by a priority heap.
              • +
              • SynchronousQueue +- A simple rendezvous mechanism that uses the +BlockingQueue interface.
              • +
              • +LinkedBlockingDeque - An optionally bounded FIFO +blocking deque backed by linked nodes.
              • +
              • +LinkedTransferQueue - An unbounded +TransferQueue backed by linked nodes.
              • +
              • ConcurrentHashMap +- A highly concurrent, high-performance ConcurrentMap +implementation based on a hash table. This implementation never +blocks when performing retrievals and enables the client to select +the concurrency level for updates. It is intended as a drop-in +replacement for Hashtable. In +addition to implementing ConcurrentMap, it supports all of +the legacy methods of Hashtable.
              • +
              • +ConcurrentSkipListSet - Skips list implementation of +the NavigableSet interface.
              • +
              • +ConcurrentSkipListMap - Skips list implementation of +the ConcurrentNavigableMap interface.
              • +
              +
            • +
            • Abstract implementations - Skeletal +implementations of the collection interfaces to facilitate custom +implementations. +
                +
              • AbstractCollection +- Skeletal Collection implementation that is neither a set +nor a list (such as a "bag" or multiset).
              • +
              • AbstractSet +- Skeletal Set implementation.
              • +
              • AbstractList +- Skeletal List implementation backed by a random access +data store (such as an array).
              • +
              • AbstractSequentialList +- Skeletal List implementation backed by a sequential +access data store (such as a linked list).
              • +
              • AbstractQueue +- Skeletal Queue implementation.
              • +
              • AbstractMap +- Skeletal Map implementation.
              • +
              +
            • +
            • Algorithms - The Collections +class contains these useful static methods. + +
            • +
            • Infrastructure +
                +
              • Iterators - Similar to the familiar Enumeration +interface, but more powerful, and with improved method names. +
                  +
                • Iterator +- In addition to the functionality of the Enumeration +interface, enables the user to remove elements from the backing +collection with well-defined, useful semantics.
                • +
                • ListIterator +- Iterator for use with lists. In addition to the functionality of +the Iterator interface, supports bidirectional iteration, +element replacement, element insertion, and index retrieval.
                • +
                +
              • +
              • Ordering +
                  +
                • Comparable +- Imparts a natural ordering to classes that implement it. +The natural ordering can be used to sort a list or maintain order +in a sorted set or map. Many classes were retrofitted to implement +this interface.
                • +
                • Comparator +- Represents an order relation, which can be used to sort a list or +maintain order in a sorted set or map. Can override a type's +natural ordering or order objects of a type that does not implement +the Comparable interface.
                • +
                +
              • +
              • Runtime exceptions +
                  +
                • +UnsupportedOperationException - Thrown by collections +if an unsupported optional operation is called.
                • +
                • +ConcurrentModificationException - Thrown by iterators +and list iterators if the backing collection is changed +unexpectedly while the iteration is in progress. Also thrown by +sublist views of lists if the backing list is changed +unexpectedly.
                • +
                +
              • +
              • Performance +
                  +
                • RandomAccess +- Marker interface that lets List implementations indicate +that they support fast (generally constant time) random access. +This lets generic algorithms change their behavior to provide good +performance when applied to either random or sequential access +lists.
                • +
                +
              • +
              +
            • +
            • Array Utilities +
                +
              • Arrays - +Contains static methods to sort, search, compare, hash, copy, +resize, convert to String, and fill arrays of primitives +and objects.
              • +
              +
            • +
            +
            +

            +Copyright © 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
            + Redwood Shores, CA 94065 USA. All rights reserved.

            + + + diff --git a/jdk/src/java.base/share/classes/java/util/jar/Attributes.java b/jdk/src/java.base/share/classes/java/util/jar/Attributes.java index 342c85ea2fd..b288d1ed268 100644 --- a/jdk/src/java.base/share/classes/java/util/jar/Attributes.java +++ b/jdk/src/java.base/share/classes/java/util/jar/Attributes.java @@ -44,7 +44,7 @@ import java.util.Comparator; * the ASCII characters in the set [0-9a-zA-Z_-], and cannot exceed 70 * characters in length. Attribute values can contain any characters and * will be UTF8-encoded when written to the output stream. See the - * JAR File Specification + * JAR File Specification * for more information about valid attribute names and values. * *

            This map and its views have a predictable iteration order, namely the @@ -443,7 +443,7 @@ public class Attributes implements Map, Cloneable { * to the ASCII characters in the set [0-9a-zA-Z_-], and cannot exceed * 70 characters in length. Attribute values can contain any characters * and will be UTF8-encoded when written to the output stream. See the - * JAR File Specification + * JAR File Specification * for more information about valid attribute names and values. */ public static class Name { @@ -529,7 +529,7 @@ public class Attributes implements Map, Cloneable { * {@code Name} object for {@code Manifest-Version} * manifest attribute. This attribute indicates the version number * of the manifest standard to which a JAR file's manifest conforms. - * @see + * @see * Manifest and Signature Specification */ public static final Name MANIFEST_VERSION = new Name("Manifest-Version"); @@ -537,7 +537,7 @@ public class Attributes implements Map, Cloneable { /** * {@code Name} object for {@code Signature-Version} * manifest attribute used when signing JAR files. - * @see + * @see * Manifest and Signature Specification */ public static final Name SIGNATURE_VERSION = new Name("Signature-Version"); @@ -551,7 +551,7 @@ public class Attributes implements Map, Cloneable { /** * {@code Name} object for {@code Class-Path} * manifest attribute. - * @see + * @see * JAR file specification */ public static final Name CLASS_PATH = new Name("Class-Path"); @@ -568,7 +568,7 @@ public class Attributes implements Map, Cloneable { /** * {@code Name} object for {@code Sealed} manifest attribute * used for sealing. - * @see + * @see * Package Sealing */ public static final Name SEALED = new Name("Sealed"); diff --git a/jdk/src/java.base/share/classes/java/util/jar/JarEntry.java b/jdk/src/java.base/share/classes/java/util/jar/JarEntry.java index b0e6841bf83..28a69cf805c 100644 --- a/jdk/src/java.base/share/classes/java/util/jar/JarEntry.java +++ b/jdk/src/java.base/share/classes/java/util/jar/JarEntry.java @@ -32,6 +32,8 @@ import java.security.cert.Certificate; /** * This class is used to represent a JAR file entry. + * + * @since 1.2 */ public class JarEntry extends ZipEntry { diff --git a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java index ba072d7aa5d..4076cf59887 100644 --- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java +++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java @@ -48,7 +48,7 @@ import sun.security.util.SignatureFileVerifier; * processing multi-release jar files. The {@code Manifest} can be used * to specify meta-information about the jar file and its entries. * - *

            A multi-release jar file is a jar file that + *

            A multi-release jar file is a jar file that * contains a manifest with a main attribute named "Multi-Release", * a set of "base" entries, some of which are public classes with public * or protected methods that comprise the public interface of the jar file, diff --git a/jdk/src/java.base/share/classes/java/util/jar/Manifest.java b/jdk/src/java.base/share/classes/java/util/jar/Manifest.java index 90c9e99595f..f525995669d 100644 --- a/jdk/src/java.base/share/classes/java/util/jar/Manifest.java +++ b/jdk/src/java.base/share/classes/java/util/jar/Manifest.java @@ -39,7 +39,7 @@ import java.util.Iterator; * associated Attributes. There are main Manifest Attributes as well as * per-entry Attributes. For information on the Manifest format, please * see the - * + * * Manifest format specification. * * @author David Connelly diff --git a/jdk/src/java.base/share/classes/java/util/jar/Pack200.java b/jdk/src/java.base/share/classes/java/util/jar/Pack200.java index 01df2638039..b5fc981e577 100644 --- a/jdk/src/java.base/share/classes/java/util/jar/Pack200.java +++ b/jdk/src/java.base/share/classes/java/util/jar/Pack200.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -34,8 +34,7 @@ import sun.security.action.GetPropertyAction; /** * Transforms a JAR file to or from a packed stream in Pack200 format. - * Please refer to Network Transfer Format JSR 200 Specification at - * http://jcp.org/aboutJava/communityprocess/review/jsr200/index.html + * Please refer to Network Transfer Format JSR 200 Specification *

            * Typically the packer engine is used by application developers * to deploy or host JAR files on a website. @@ -452,13 +451,13 @@ public abstract class Pack200 { String CODE_ATTRIBUTE_PFX = "pack.code.attribute."; /** - * The unpacker's progress as a percentage, as periodically - * updated by the unpacker. + * The packer's progress as a percentage, as periodically + * updated by the packer. * Values of 0 - 100 are normal, and -1 indicates a stall. * Progress can be monitored by polling the value of this * property. *

            - * At a minimum, the unpacker must set progress to 0 + * At a minimum, the packer must set progress to 0 * at the beginning of a packing operation, and to 100 * at the end. */ @@ -623,7 +622,7 @@ public abstract class Pack200 { * property. *

            * At a minimum, the unpacker must set progress to 0 - * at the beginning of a packing operation, and to 100 + * at the beginning of an unpacking operation, and to 100 * at the end. */ String PROGRESS = "unpack.progress"; @@ -631,7 +630,7 @@ public abstract class Pack200 { /** * Get the set of this engine's properties. This set is * a "live view", so that changing its - * contents immediately affects the Packer engine, and + * contents immediately affects the Unpacker engine, and * changes from the engine (such as progress indications) * are immediately visible in the map. * diff --git a/jdk/src/java.base/share/classes/java/util/jar/package-info.java b/jdk/src/java.base/share/classes/java/util/jar/package-info.java index 2a7431b9577..7655c6f6f4e 100644 --- a/jdk/src/java.base/share/classes/java/util/jar/package-info.java +++ b/jdk/src/java.base/share/classes/java/util/jar/package-info.java @@ -40,7 +40,7 @@ * java.util.zip * package description.

            * In JAR files, all file names must be encoded in the UTF-8 encoding. - *

          • + *
          • * Manifest and Signature Specification - The manifest format specification. * * diff --git a/jdk/src/java.base/share/classes/java/util/package-info.java b/jdk/src/java.base/share/classes/java/util/package-info.java index ab706e0d179..1da427e72a5 100644 --- a/jdk/src/java.base/share/classes/java/util/package-info.java +++ b/jdk/src/java.base/share/classes/java/util/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,27 +24,24 @@ */ /** - * Contains the collections framework, legacy collection classes, - * event model, date and time facilities, internationalization, and - * miscellaneous utility classes (a string tokenizer, a random-number - * generator, and a bit array). + * Contains the collections framework, some internationalization support classes, + * a service loader, properties, random number generation, string parsing + * and scanning classes, base64 encoding and decoding, a bit array, and + * several miscellaneous utility classes. This package also contains + * legacy collection classes and legacy date and time classes. * - *

            Package Specification

            + *

            {@index "Java Collections Framework"}

            + *

            For an overview, API outline, and design rationale, please see: *

            * - *

            Related Documentation

            - * For overviews, tutorials, examples, guides, and tool documentation, - * please see: + *

            For a tutorial and programming guide with examples of use + * of the collections framework, please see: *

            * * @since 1.0 diff --git a/jdk/src/java.base/share/classes/java/util/regex/Pattern.java b/jdk/src/java.base/share/classes/java/util/regex/Pattern.java index 53884b12ac7..b79c850bebf 100644 --- a/jdk/src/java.base/share/classes/java/util/regex/Pattern.java +++ b/jdk/src/java.base/share/classes/java/util/regex/Pattern.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -77,318 +77,321 @@ import java.util.stream.StreamSupport; * such use. * * - *

            Summary of regular-expression constructs

            + *

            Summary of regular-expression constructs

            * - * - * - * - * - * + *
            ConstructMatches
            + * + * + * + * + * * + * + * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * - * + * * - * + * * - * + * * - * + * * - * + * * * * - * - * + * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * - * - * + * + * * * * - * - * + * + * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * - * + * * - * + * * - * + * * - * + * * * * - * + * * - * - * + * * - * - * + * * * - * + * * - * + * * - * + * * - * + * * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * + * *
            Regular expression constructs, and what they match
            ConstructMatches
             
            Characters
            Characters
            x
            xThe character x
            {@code \\}
            {@code \\}The backslash character
            {@code \0}n
            {@code \0}nThe character with octal value {@code 0}n * (0 {@code <=} n {@code <=} 7)
            {@code \0}nn
            {@code \0}nnThe character with octal value {@code 0}nn * (0 {@code <=} n {@code <=} 7)
            {@code \0}mnn
            {@code \0}mnnThe character with octal value {@code 0}mnn * (0 {@code <=} m {@code <=} 3, * 0 {@code <=} n {@code <=} 7)
            {@code \x}hh
            {@code \x}hhThe character with hexadecimal value {@code 0x}hh
            \uhhhh
            \uhhhhThe character with hexadecimal value {@code 0x}hhhh
            \x{h...h}
            \x{h...h}The character with hexadecimal value {@code 0x}h...h * ({@link java.lang.Character#MIN_CODE_POINT Character.MIN_CODE_POINT} *  <= {@code 0x}h...h <=  * {@link java.lang.Character#MAX_CODE_POINT Character.MAX_CODE_POINT})
            \N{name}
            \N{name}The character with Unicode character name 'name'
            {@code \t}
            {@code \t}The tab character ('\u0009')
            {@code \n}
            {@code \n}The newline (line feed) character ('\u000A')
            {@code \r}
            {@code \r}The carriage-return character ('\u000D')
            {@code \f}
            {@code \f}The form-feed character ('\u000C')
            {@code \a}
            {@code \a}The alert (bell) character ('\u0007')
            {@code \e}
            {@code \e}The escape character ('\u001B')
            {@code \c}x
            {@code \c}xThe control character corresponding to x
             
            Character classes
            Character classes
            {@code [abc]}
            {@code [abc]}{@code a}, {@code b}, or {@code c} (simple class)
            {@code [^abc]}
            {@code [^abc]}Any character except {@code a}, {@code b}, or {@code c} (negation)
            {@code [a-zA-Z]}
            {@code [a-zA-Z]}{@code a} through {@code z} * or {@code A} through {@code Z}, inclusive (range)
            {@code [a-d[m-p]]}
            {@code [a-d[m-p]]}{@code a} through {@code d}, * or {@code m} through {@code p}: {@code [a-dm-p]} (union)
            {@code [a-z&&[def]]}
            {@code [a-z&&[def]]}{@code d}, {@code e}, or {@code f} (intersection)
            {@code [a-z&&[^bc]]}
            {@code [a-z&&[^bc]]}{@code a} through {@code z}, * except for {@code b} and {@code c}: {@code [ad-z]} (subtraction)
            {@code [a-z&&[^m-p]]}
            {@code [a-z&&[^m-p]]}{@code a} through {@code z}, * and not {@code m} through {@code p}: {@code [a-lq-z]}(subtraction)
             
            Predefined character classes
            Predefined character classes
            {@code .}
            {@code .}Any character (may or may not match line terminators)
            {@code \d}
            {@code \d}A digit: {@code [0-9]}
            {@code \D}
            {@code \D}A non-digit: {@code [^0-9]}
            {@code \h}
            {@code \h}A horizontal whitespace character: * [ \t\xA0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000]
            {@code \H}
            {@code \H}A non-horizontal whitespace character: {@code [^\h]}
            {@code \s}
            {@code \s}A whitespace character: {@code [ \t\n\x0B\f\r]}
            {@code \S}
            {@code \S}A non-whitespace character: {@code [^\s]}
            {@code \v}
            {@code \v}A vertical whitespace character: [\n\x0B\f\r\x85\u2028\u2029] *
            {@code \V}
            {@code \V}A non-vertical whitespace character: {@code [^\v]}
            {@code \w}
            {@code \w}A word character: {@code [a-zA-Z_0-9]}
            {@code \W}
            {@code \W}A non-word character: {@code [^\w]}
             
            POSIX character classes (US-ASCII only)
            POSIX character classes (US-ASCII only)
            {@code \p{Lower}}
            {@code \p{Lower}}A lower-case alphabetic character: {@code [a-z]}
            {@code \p{Upper}}
            {@code \p{Upper}}An upper-case alphabetic character:{@code [A-Z]}
            {@code \p{ASCII}}
            {@code \p{ASCII}}All ASCII:{@code [\x00-\x7F]}
            {@code \p{Alpha}}
            {@code \p{Alpha}}An alphabetic character:{@code [\p{Lower}\p{Upper}]}
            {@code \p{Digit}}
            {@code \p{Digit}}A decimal digit: {@code [0-9]}
            {@code \p{Alnum}}
            {@code \p{Alnum}}An alphanumeric character:{@code [\p{Alpha}\p{Digit}]}
            {@code \p{Punct}}
            {@code \p{Punct}}Punctuation: One of {@code !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~}
            {@code \p{Graph}}
            {@code \p{Graph}}A visible character: {@code [\p{Alnum}\p{Punct}]}
            {@code \p{Print}}
            {@code \p{Print}}A printable character: {@code [\p{Graph}\x20]}
            {@code \p{Blank}}
            {@code \p{Blank}}A space or a tab: {@code [ \t]}
            {@code \p{Cntrl}}
            {@code \p{Cntrl}}A control character: {@code [\x00-\x1F\x7F]}
            {@code \p{XDigit}}
            {@code \p{XDigit}}A hexadecimal digit: {@code [0-9a-fA-F]}
            {@code \p{Space}}
            {@code \p{Space}}A whitespace character: {@code [ \t\n\x0B\f\r]}
             
            java.lang.Character classes (simple java character type)
            java.lang.Character classes (simple java character type)
            {@code \p{javaLowerCase}}
            {@code \p{javaLowerCase}}Equivalent to java.lang.Character.isLowerCase()
            {@code \p{javaUpperCase}}
            {@code \p{javaUpperCase}}Equivalent to java.lang.Character.isUpperCase()
            {@code \p{javaWhitespace}}
            {@code \p{javaWhitespace}}Equivalent to java.lang.Character.isWhitespace()
            {@code \p{javaMirrored}}
            {@code \p{javaMirrored}}Equivalent to java.lang.Character.isMirrored()
             
            Classes for Unicode scripts, blocks, categories and binary properties
            {@code \p{IsLatin}}
            Classes for Unicode scripts, blocks, categories and binary properties
            {@code \p{IsLatin}}A Latin script character (script)
            {@code \p{InGreek}}
            {@code \p{InGreek}}A character in the Greek block (block)
            {@code \p{Lu}}
            {@code \p{Lu}}An uppercase letter (category)
            {@code \p{IsAlphabetic}}
            {@code \p{IsAlphabetic}}An alphabetic character (binary property)
            {@code \p{Sc}}
            {@code \p{Sc}}A currency symbol
            {@code \P{InGreek}}
            {@code \P{InGreek}}Any character except one in the Greek block (negation)
            {@code [\p{L}&&[^\p{Lu}]]}
            {@code [\p{L}&&[^\p{Lu}]]}Any letter except an uppercase letter (subtraction)
             
            Boundary matchers
            Boundary matchers
            {@code ^}
            {@code ^}The beginning of a line
            {@code $}
            {@code $}The end of a line
            {@code \b}
            {@code \b}A word boundary
            {@code \b{g}}
            {@code \b{g}}A Unicode extended grapheme cluster boundary
            {@code \B}
            {@code \B}A non-word boundary
            {@code \A}
            {@code \A}The beginning of the input
            {@code \G}
            {@code \G}The end of the previous match
            {@code \Z}
            {@code \Z}The end of the input but for the final * terminator, if any
            {@code \z}
            {@code \z}The end of the input
             
            Linebreak matcher
            {@code \R}
            Linebreak matcher
            {@code \R}Any Unicode linebreak sequence, is equivalent to * \u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029] *
             
            Unicode Extended Grapheme matcher
            {@code \X}
            Unicode Extended Grapheme matcher
            {@code \X}Any Unicode extended grapheme cluster
             
            Greedy quantifiers
            Greedy quantifiers
            X{@code ?}
            X{@code ?}X, once or not at all
            X{@code *}
            X{@code *}X, zero or more times
            X{@code +}
            X{@code +}X, one or more times
            X{n}
            X{n}X, exactly n times
            X{n{@code ,}}
            X{n{@code ,}}X, at least n times
            X{n{@code ,}m}
            X{n{@code ,}m}X, at least n but not more than m times
             
            Reluctant quantifiers
            Reluctant quantifiers
            X{@code ??}
            X{@code ??}X, once or not at all
            X{@code *?}
            X{@code *?}X, zero or more times
            X{@code +?}
            X{@code +?}X, one or more times
            X{n}?
            X{n}?X, exactly n times
            X{n,}?
            X{n,}?X, at least n times
            X{n{@code ,}m}?
            X{n{@code ,}m}?X, at least n but not more than m times
             
            Possessive quantifiers
            Possessive quantifiers
            X{@code ?+}
            X{@code ?+}X, once or not at all
            X{@code *+}
            X{@code *+}X, zero or more times
            X{@code ++}
            X{@code ++}X, one or more times
            X{n}+
            X{n}+X, exactly n times
            X{n,}+
            X{n,}+X, at least n times
            X{n{@code ,}m}+
            X{n{@code ,}m}+X, at least n but not more than m times
             
            Logical operators
            Logical operators
            XY
            XYX followed by Y
            X{@code |}Y
            X{@code |}YEither X or Y
            {@code (}X{@code )}
            {@code (}X{@code )}X, as a capturing group
             
            Back references
            Back references
            {@code \}nWhatever the nth + *
            {@code \}nWhatever the nth * capturing group matched
            {@code \}k<name>Whatever the + *
            {@code \}k<name>Whatever the * named-capturing group "name" matched
             
            Quotation
            Quotation
            {@code \}
            {@code \}Nothing, but quotes the following character
            {@code \Q}
            {@code \Q}Nothing, but quotes all characters until {@code \E}
            {@code \E}
            {@code \E}Nothing, but ends quoting started by {@code \Q}
             
            Special constructs (named-capturing and non-capturing)
            Special constructs (named-capturing and non-capturing)
            (?<name>X{@code )}
            (?<name>X{@code )}X, as a named-capturing group
            {@code (?:}X{@code )}
            {@code (?:}X{@code )}X, as a non-capturing group
            (?idmsuxU-idmsuxU) 
            (?idmsuxU-idmsuxU) Nothing, but turns match flags i * d m s * u x U * on - off
            (?idmsux-idmsux:X{@code )}  
            (?idmsux-idmsux:X{@code )}  X, as a non-capturing group with the * given flags i d * m s u * x on - off
            {@code (?=}X{@code )}
            {@code (?=}X{@code )}X, via zero-width positive lookahead
            {@code (?!}X{@code )}
            {@code (?!}X{@code )}X, via zero-width negative lookahead
            {@code (?<=}X{@code )}
            {@code (?<=}X{@code )}X, via zero-width positive lookbehind
            {@code (?X{@code )}
            {@code (?X{@code )}X, via zero-width negative lookbehind
            {@code (?>}X{@code )}
            {@code (?>}X{@code )}X, as an independent, non-capturing group
            * *
            * * - *

            Backslashes, escapes, and quoting

            + *

            Backslashes, escapes, and quoting

            * *

            The backslash character ({@code '\'}) serves to introduce escaped * constructs, as defined in the table above, as well as to quote characters @@ -416,7 +419,7 @@ import java.util.stream.StreamSupport; * {@code (hello)} the string literal {@code "\\(hello\\)"} * must be used. * - *

            Character Classes

            + *

            Character Classes

            * *

            Character classes may appear within other character classes, and * may be composed by the union operator (implicit) and the intersection @@ -429,8 +432,9 @@ import java.util.stream.StreamSupport; *

            The precedence of character-class operators is as follows, from * highest to lowest: * - *

            + *
            + * + * * * * @@ -446,6 +450,7 @@ import java.util.stream.StreamSupport; * * * + * *
            Precedence of character class operators.
            1    Literal escape    {@code \x}
            5    Intersection{@code [a-z&&[aeiou]]}
            * *

            Note that a different set of metacharacters are in effect inside @@ -454,7 +459,7 @@ import java.util.stream.StreamSupport; * character class, while the expression {@code -} becomes a range * forming metacharacter. * - *

            Line terminators

            + *

            Line terminators

            * *

            A line terminator is a one- or two-character sequence that marks * the end of a line of the input character sequence. The following are @@ -489,14 +494,16 @@ import java.util.stream.StreamSupport; * except at the end of input. When in {@link #MULTILINE} mode {@code $} * matches just before a line terminator or the end of the input sequence. * - *

            Groups and capturing

            + *

            Groups and capturing

            * - *

            Group number

            + *

            Group number

            *

            Capturing groups are numbered by counting their opening parentheses from * left to right. In the expression {@code ((A)(B(C)))}, for example, there * are four such groups:

            * - *
            + *
            + * + * * * * @@ -505,6 +512,7 @@ import java.util.stream.StreamSupport; * * * + * *
            Capturing group numberings
            1    {@code ((A)(B(C)))}
            2    {@code (B(C))}
            4    {@code (C)}
            * *

            Group zero always stands for the entire expression. @@ -514,7 +522,7 @@ import java.util.stream.StreamSupport; * subsequence may be used later in the expression, via a back reference, and * may also be retrieved from the matcher once the match operation is complete. * - *

            Group name

            + *

            Group name

            *

            A capturing group can also be assigned a "name", a {@code named-capturing group}, * and then be back-referenced later by the "name". Group names are composed of * the following characters. The first character must be a {@code letter}. @@ -585,7 +593,7 @@ import java.util.stream.StreamSupport; * and outside of a character class. * *

            - * Scripts are specified either with the prefix {@code Is}, as in + * Scripts are specified either with the prefix {@code Is}, as in * {@code IsHiragana}, or by using the {@code script} keyword (or its short * form {@code sc}) as in {@code script=Hiragana} or {@code sc=Hiragana}. *

            @@ -594,7 +602,7 @@ import java.util.stream.StreamSupport; * {@link java.lang.Character.UnicodeScript#forName(String) UnicodeScript.forName}. * *

            - * Blocks are specified with the prefix {@code In}, as in + * Blocks are specified with the prefix {@code In}, as in * {@code InMongolian}, or by using the keyword {@code block} (or its short * form {@code blk}) as in {@code block=Mongolian} or {@code blk=Mongolian}. *

            @@ -603,7 +611,7 @@ import java.util.stream.StreamSupport; * {@link java.lang.Character.UnicodeBlock#forName(String) UnicodeBlock.forName}. *

            * - * Categories may be specified with the optional prefix {@code Is}: + * Categories may be specified with the optional prefix {@code Is}: * Both {@code \p{L}} and {@code \p{IsL}} denote the category of Unicode * letters. Same as scripts and blocks, categories can also be specified * by using the keyword {@code general_category} (or its short form @@ -616,7 +624,7 @@ import java.util.stream.StreamSupport; * defined in the Standard, both normative and informative. *

            * - * Binary properties are specified with the prefix {@code Is}, as in + * Binary properties are specified with the prefix {@code Is}, as in * {@code IsAlphabetic}. The supported binary properties by {@code Pattern} * are *

              @@ -641,12 +649,15 @@ import java.util.stream.StreamSupport; * of Unicode Regular Expression * , when {@link #UNICODE_CHARACTER_CLASS} flag is specified. * - * - * - * - * - * + *
              ClassesMatches
              + * + * + * + * + * + * + * + * * * * @@ -685,9 +696,10 @@ import java.util.stream.StreamSupport; * * * + * *
              predefined and posix character classes in Unicode mode
              ClassesMatches
              {@code \p{Lower}}A lowercase character:{@code \p{IsLowercase}}
              {@code \p{Upper}}A word character: {@code [\p{Alpha}\p{gc=Mn}\p{gc=Me}\p{gc=Mc}\p{Digit}\p{gc=Pc}\p{IsJoin_Control}]}
              {@code \W}A non-word character: {@code [^\w]}
              *

              - * + * * Categories that behave like the java.lang.Character * boolean ismethodname methods (except for the deprecated ones) are * available through the same \p{prop} syntax where @@ -1207,29 +1219,33 @@ public final class Pattern *

              The input {@code "boo:and:foo"}, for example, yields the following * results with these parameters: * - *

              - * - * - * - * - * + *
              Regex    Limit    Result    
              :2
              + * + * + * + * + * + * + * + * + * * - * - * + * + * * - * - * + * + * * - * - * + * + * * - * - * + * + * * - * - * + * + * * + * *
              Split examples showing regex, limit, and result
              Regex    Limit    Result    
              :2{@code { "boo", "and:foo" }}
              :5
              :5{@code { "boo", "and", "foo" }}
              :-2
              :-2{@code { "boo", "and", "foo" }}
              o5
              o5{@code { "b", "", ":and:f", "", "" }}
              o-2
              o-2{@code { "b", "", ":and:f", "", "" }}
              o0
              o0{@code { "b", "", ":and:f" }}
              * * @param input @@ -1294,14 +1310,18 @@ public final class Pattern *

              The input {@code "boo:and:foo"}, for example, yields the following * results with these expressions: * - *

              - * - * - * + *
              Regex    Result
              :
              + * + * + * + * + * + * + * * - * + * * + * *
              Split examples showing regex and result
              Regex    Result
              :{@code { "boo", "and", "foo" }}
              o
              o{@code { "b", "", ":and:f" }}
              * * @@ -3867,8 +3887,10 @@ loop: for(int x=0, offset=0; x * * @since 9 + * @spec JPMS */ public abstract class AbstractResourceBundleProvider implements ResourceBundleProvider { private static final JavaUtilResourceBundleAccess RB_ACCESS = diff --git a/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java b/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java index c0a0ad806aa..004aab08f9a 100644 --- a/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java +++ b/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -33,7 +33,7 @@ import java.util.Map; * An abstract class for service providers that provide localized string * representations (display names) of {@code Calendar} field values. * - *

              Calendar Types + *

              Calendar Types * *

              Calendar types are used to specify calendar systems for which the {@link * #getDisplayName(String, int, int, int, Locale) getDisplayName} and {@link @@ -46,15 +46,19 @@ import java.util.Map; * Calendar}. The following are calendar-common fields and their values to be * supported for each calendar system. * - * + *
              + * + * * * * * * + * + * * - * - * + * + * * * * - * - * + * + * * * * - * - * + * + * * * + * *
              Field values
              FieldValueDescription
              {@link Calendar#MONTH}{@link Calendar#JANUARY} to {@link Calendar#UNDECIMBER}{@link Calendar#MONTH}{@link Calendar#JANUARY} to {@link Calendar#UNDECIMBER}Month numbering is 0-based (e.g., 0 - January, ..., 11 - * December). Some calendar systems have 13 months. Month * names need to be supported in both the formatting and @@ -63,30 +67,35 @@ import java.util.Map; * in both of the forms.
              {@link Calendar#DAY_OF_WEEK}{@link Calendar#SUNDAY} to {@link Calendar#SATURDAY}{@link Calendar#DAY_OF_WEEK}{@link Calendar#SUNDAY} to {@link Calendar#SATURDAY}Day-of-week numbering is 1-based starting from Sunday (i.e., 1 - Sunday, * ..., 7 - Saturday).
              {@link Calendar#AM_PM}{@link Calendar#AM} to {@link Calendar#PM}{@link Calendar#AM_PM}{@link Calendar#AM} to {@link Calendar#PM}0 - AM, 1 - PM
              * *

              The following are calendar-specific fields and their values to be supported. * - * + *
              + * + * * * * * * * + * + * * - * - * + * + * * * * @@ -95,8 +104,8 @@ import java.util.Map; * * * - * - * + * + * * * * @@ -105,8 +114,8 @@ import java.util.Map; * * * - * - * + * + * * * * @@ -135,8 +144,8 @@ import java.util.Map; * Year representation in {@code SimpleDateFormat}. * * - * - * + * + * * * * @@ -145,8 +154,8 @@ import java.util.Map; * * * - * - * + * + * * * * @@ -154,6 +163,7 @@ import java.util.Map; * * * + * *
              Calendar type and field values
              Calendar TypeFieldValueDescription
              {@code "gregory"}{@link Calendar#ERA}{@code "gregory"}{@link Calendar#ERA}0{@link java.util.GregorianCalendar#BC} (BCE)
              {@link java.util.GregorianCalendar#AD} (CE)
              {@code "buddhist"}{@link Calendar#ERA}{@code "buddhist"}{@link Calendar#ERA}0BC (BCE)
              B.E. (Buddhist Era)
              {@code "japanese"}{@link Calendar#ERA}{@code "japanese"}{@link Calendar#ERA}0Seireki (Before Meiji)
              {@code "roc"}{@link Calendar#ERA}{@code "roc"}{@link Calendar#ERA}0Before R.O.C.
              R.O.C.
              {@code "islamic"}{@link Calendar#ERA}{@code "islamic"}{@link Calendar#ERA}0Before AH
              1Anno Hijrah (AH)
              * *

              Calendar field value names for {@code "gregory"} must be consistent with diff --git a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleControlProvider.java b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleControlProvider.java index f74830b4d6a..871d9192ec0 100644 --- a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleControlProvider.java +++ b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleControlProvider.java @@ -44,6 +44,8 @@ import java.util.ResourceBundle; * * @author Masayoshi Okutsu * @since 1.8 + * @revised 9 + * @spec JPMS * @see ResourceBundle#getBundle(String, java.util.Locale, ClassLoader, ResourceBundle.Control) * ResourceBundle.getBundle * @see java.util.ServiceLoader#load(Class) diff --git a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java index 0074ae32090..0cb0bccd4a6 100644 --- a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java +++ b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -35,11 +35,11 @@ import java.util.ResourceBundle; * during a call to the * {@link ResourceBundle#getBundle(String, Locale, ClassLoader) * ResourceBundle.getBundle} method. The provider service type is determined by - * {@code basename+"Provider"}. + * {@code + ".spi." + + "Provider"}. * *

              * For example, if the base name is "com.example.app.MyResources", - * {@code com.example.app.MyResourcesProvider} will be the provider service type: + * {@code com.example.app.spi.MyResourcesProvider} will be the provider service type: *

              {@code
                * public interface MyResourcesProvider extends ResourceBundleProvider {
                * }
              @@ -57,6 +57,7 @@ import java.util.ResourceBundle;
                * @see 
                *     ResourceBundleProvider Service Providers
                * @since 9
              + * @spec JPMS
                */
               public interface ResourceBundleProvider {
                   /**
              diff --git a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java
              index 17c743a9064..02f9ada39c0 100644
              --- a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java
              +++ b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java
              @@ -720,8 +720,9 @@ public final class Collectors {
                    * the result is 0.
                    *
                    * @param  the type of the input elements
              -     * @param mapper a function extracting the property to be summed
              -     * @return a {@code Collector} that produces the sum of a derived property
              +     * @param mapper a function extracting the property to be averaged
              +     * @return a {@code Collector} that produces the arithmetic mean of a
              +     * derived property
                    */
                   public static  Collector
                   averagingInt(ToIntFunction mapper) {
              @@ -738,8 +739,9 @@ public final class Collectors {
                    * the result is 0.
                    *
                    * @param  the type of the input elements
              -     * @param mapper a function extracting the property to be summed
              -     * @return a {@code Collector} that produces the sum of a derived property
              +     * @param mapper a function extracting the property to be averaged
              +     * @return a {@code Collector} that produces the arithmetic mean of a
              +     * derived property
                    */
                   public static  Collector
                   averagingLong(ToLongFunction mapper) {
              @@ -769,8 +771,9 @@ public final class Collectors {
                    * 253, leading to additional numerical errors.
                    *
                    * @param  the type of the input elements
              -     * @param mapper a function extracting the property to be summed
              -     * @return a {@code Collector} that produces the sum of a derived property
              +     * @param mapper a function extracting the property to be averaged
              +     * @return a {@code Collector} that produces the arithmetic mean of a
              +     * derived property
                    */
                   public static  Collector
                   averagingDouble(ToDoubleFunction mapper) {
              diff --git a/jdk/src/java.base/share/classes/java/util/stream/StreamOpFlag.java b/jdk/src/java.base/share/classes/java/util/stream/StreamOpFlag.java
              index e4ad988eaf1..a8e06b2f7ce 100644
              --- a/jdk/src/java.base/share/classes/java/util/stream/StreamOpFlag.java
              +++ b/jdk/src/java.base/share/classes/java/util/stream/StreamOpFlag.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2012, 2013, 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
              @@ -41,7 +41,7 @@ import java.util.Spliterator;
                * contexts:
                *
                * 
              - * + *
              * * * diff --git a/jdk/src/java.base/share/classes/java/util/stream/package-info.java b/jdk/src/java.base/share/classes/java/util/stream/package-info.java index f580d8fb372..03904e01df6 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/package-info.java +++ b/jdk/src/java.base/share/classes/java/util/stream/package-info.java @@ -94,7 +94,7 @@ *

              Additional stream sources can be provided by third-party libraries using * these techniques. * - *

              Stream operations and pipelines

              + *

              Stream operations and pipelines

              * *

              Stream operations are divided into intermediate and * terminal operations, and are combined to form stream @@ -159,7 +159,7 @@ * is a necessary, but not sufficient, condition for the processing of an infinite * stream to terminate normally in finite time. * - *

              Parallelism

              + *

              Parallelism

              * *

              Processing elements with an explicit {@code for-}loop is inherently serial. * Streams facilitate parallel execution by reframing the computation as a pipeline of @@ -206,7 +206,7 @@ * as {@link java.util.function.Function}, and are often lambda expressions or * method references. * - *

              Non-interference

              + *

              Non-interference

              * * Streams enable you to execute possibly-parallel aggregate operations over a * variety of data sources, including even non-thread-safe collections such as @@ -252,7 +252,7 @@ * Low-level stream * construction for requirements for building well-behaved streams. * - *

              Stateless behaviors

              + *

              Stateless behaviors

              * * Stream pipeline results may be nondeterministic or incorrect if the behavioral * parameters to the stream operations are stateful. A stateful lambda @@ -280,7 +280,7 @@ * parameters to stream operations entirely; there is usually a way to * restructure the stream pipeline to avoid statefulness. * - *

              Side-effects

              + *

              Side-effects

              * * Side-effects in behavioral parameters to stream operations are, in general, * discouraged, as they can often lead to unwitting violations of the @@ -349,7 +349,7 @@ * .collect(Collectors.toList()); // No side-effects! * } * - *

              Ordering

              + *

              Ordering

              * *

              Streams may or may not have a defined encounter order. Whether * or not a stream has an encounter order depends on the source and the @@ -388,7 +388,7 @@ * However, most stream pipelines, such as the "sum of weight of blocks" example * above, still parallelize efficiently even under ordering constraints. * - *

              Reduction operations

              + *

              Reduction operations

              * * A reduction operation (also called a fold) takes a sequence * of input elements and combines them into a single summary result by repeated @@ -493,7 +493,7 @@ * significant work can be optimized away by combining mapping and reducing * into a single function. * - *

              Mutable reduction

              + *

              Mutable reduction

              * * A mutable reduction operation accumulates input elements into a * mutable result container, such as a {@code Collection} or {@code StringBuilder}, @@ -620,7 +620,7 @@ * but in some cases equivalence may be relaxed to account for differences in * order. * - *

              Reduction, concurrency, and ordering

              + *

              Reduction, concurrency, and ordering

              * * With some complex reduction operations, for example a {@code collect()} that * produces a {@code Map}, such as: @@ -675,7 +675,7 @@ * We would then be constrained to implement either a sequential reduction or * a merge-based parallel reduction. * - *

              Associativity

              + *

              Associativity

              * * An operator or function {@code op} is associative if the following * holds: @@ -693,7 +693,7 @@ *

              Examples of associative operations include numeric addition, min, and * max, and string concatenation. * - *

              Low-level stream construction

              + *

              Low-level stream construction

              * * So far, all the stream examples have used methods like * {@link java.util.Collection#stream()} or {@link java.util.Arrays#stream(Object[])} diff --git a/jdk/src/java.base/share/classes/java/util/zip/Adler32.java b/jdk/src/java.base/share/classes/java/util/zip/Adler32.java index 425c35d1bf4..5881282a8e3 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/Adler32.java +++ b/jdk/src/java.base/share/classes/java/util/zip/Adler32.java @@ -39,6 +39,7 @@ import jdk.internal.HotSpotIntrinsicCandidate; * a {@link NullPointerException} to be thrown.

              * * @author David Connelly + * @since 1.1 */ public class Adler32 implements Checksum { diff --git a/jdk/src/java.base/share/classes/java/util/zip/CRC32.java b/jdk/src/java.base/share/classes/java/util/zip/CRC32.java index 4b04ab20238..b60dea653e4 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/CRC32.java +++ b/jdk/src/java.base/share/classes/java/util/zip/CRC32.java @@ -38,6 +38,7 @@ import jdk.internal.HotSpotIntrinsicCandidate; * a {@link NullPointerException} to be thrown.

              * * @author David Connelly + * @since 1.1 */ public class CRC32 implements Checksum { diff --git a/jdk/src/java.base/share/classes/java/util/zip/CheckedInputStream.java b/jdk/src/java.base/share/classes/java/util/zip/CheckedInputStream.java index e1e5249c251..05c6f891c16 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/CheckedInputStream.java +++ b/jdk/src/java.base/share/classes/java/util/zip/CheckedInputStream.java @@ -35,6 +35,7 @@ import java.io.IOException; * * @see Checksum * @author David Connelly + * @since 1.1 */ public class CheckedInputStream extends FilterInputStream { diff --git a/jdk/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java b/jdk/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java index 698b9410f5f..9267d8e1c89 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java +++ b/jdk/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java @@ -36,6 +36,7 @@ import java.io.IOException; * * @see Checksum * @author David Connelly + * @since 1.1 */ public class CheckedOutputStream extends FilterOutputStream { diff --git a/jdk/src/java.base/share/classes/java/util/zip/Checksum.java b/jdk/src/java.base/share/classes/java/util/zip/Checksum.java index eb681861785..db9490cd2c6 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/Checksum.java +++ b/jdk/src/java.base/share/classes/java/util/zip/Checksum.java @@ -30,6 +30,7 @@ import java.nio.ByteBuffer; * An interface representing a data checksum. * * @author David Connelly + * @since 1.1 */ public interface Checksum { diff --git a/jdk/src/java.base/share/classes/java/util/zip/DataFormatException.java b/jdk/src/java.base/share/classes/java/util/zip/DataFormatException.java index 77adbe90c12..a5639b3ebb1 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/DataFormatException.java +++ b/jdk/src/java.base/share/classes/java/util/zip/DataFormatException.java @@ -29,6 +29,7 @@ package java.util.zip; * Signals that a data format error has occurred. * * @author David Connelly + * @since 1.1 */ public class DataFormatException extends Exception { diff --git a/jdk/src/java.base/share/classes/java/util/zip/Deflater.java b/jdk/src/java.base/share/classes/java/util/zip/Deflater.java index bf70f4dd8a1..494018939b6 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/Deflater.java +++ b/jdk/src/java.base/share/classes/java/util/zip/Deflater.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -69,6 +69,7 @@ package java.util.zip; * * @see Inflater * @author David Connelly + * @since 1.1 */ public class Deflater { @@ -551,7 +552,17 @@ class Deflater { /** * Closes the compressor when garbage is collected. + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") protected void finalize() { end(); } diff --git a/jdk/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java b/jdk/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java index a1f768caea4..ac8f2ae90c4 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java +++ b/jdk/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java @@ -37,6 +37,7 @@ import java.io.IOException; * * @see Deflater * @author David Connelly + * @since 1.1 */ public class DeflaterOutputStream extends FilterOutputStream { diff --git a/jdk/src/java.base/share/classes/java/util/zip/GZIPInputStream.java b/jdk/src/java.base/share/classes/java/util/zip/GZIPInputStream.java index d5a2f4544df..f5f530f5da6 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/GZIPInputStream.java +++ b/jdk/src/java.base/share/classes/java/util/zip/GZIPInputStream.java @@ -38,6 +38,7 @@ import java.io.EOFException; * * @see InflaterInputStream * @author David Connelly + * @since 1.1 * */ public diff --git a/jdk/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java b/jdk/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java index 67a20a1c291..9ff56f156c2 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java +++ b/jdk/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java @@ -32,6 +32,7 @@ import java.io.IOException; * This class implements a stream filter for writing compressed data in * the GZIP file format. * @author David Connelly + * @since 1.1 * */ public diff --git a/jdk/src/java.base/share/classes/java/util/zip/Inflater.java b/jdk/src/java.base/share/classes/java/util/zip/Inflater.java index 94c05e1d315..edf0add3314 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/Inflater.java +++ b/jdk/src/java.base/share/classes/java/util/zip/Inflater.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -68,6 +68,7 @@ package java.util.zip; * * @see Deflater * @author David Connelly + * @since 1.1 * */ public @@ -378,7 +379,17 @@ class Inflater { /** * Closes the decompressor when garbage is collected. + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") protected void finalize() { end(); } diff --git a/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java b/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java index 57e38b341c8..fd4c05736fa 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java +++ b/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java @@ -37,6 +37,7 @@ import java.io.EOFException; * * @see Inflater * @author David Connelly + * @since 1.1 */ public class InflaterInputStream extends FilterInputStream { diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipConstants.java b/jdk/src/java.base/share/classes/java/util/zip/ZipConstants.java index db7f500424f..4f54718e0e1 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/ZipConstants.java +++ b/jdk/src/java.base/share/classes/java/util/zip/ZipConstants.java @@ -30,6 +30,7 @@ package java.util.zip; * which manipulate ZIP files. * * @author David Connelly + * @since 1.1 */ interface ZipConstants { /* diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java b/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java index 5191894f4e6..e52ea06cf2e 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java +++ b/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -39,6 +39,7 @@ import static java.util.zip.ZipConstants64.*; * This class is used to represent a ZIP file entry. * * @author David Connelly + * @since 1.1 */ public class ZipEntry implements ZipConstants, Cloneable { @@ -441,7 +442,7 @@ class ZipEntry implements ZipConstants, Cloneable { /** * Sets the size of the compressed entry data. * - * @param csize the compressed size to set to + * @param csize the compressed size to set * * @see #getCompressedSize() */ diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipException.java b/jdk/src/java.base/share/classes/java/util/zip/ZipException.java index 7031292d282..588611f1e0e 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/ZipException.java +++ b/jdk/src/java.base/share/classes/java/util/zip/ZipException.java @@ -32,7 +32,7 @@ import java.io.IOException; * * @author unascribed * @see java.io.IOException - * @since 1.0 + * @since 1.1 */ public diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java index 4a78e2eb277..74264ed21a4 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java +++ b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -70,6 +70,7 @@ import static java.util.zip.ZipUtils.*; * thrown. * * @author David Connelly + * @since 1.1 */ public class ZipFile implements ZipConstants, Closeable { @@ -274,7 +275,7 @@ class ZipFile implements ZipConstants, Closeable { * * @throws IllegalStateException if the zip file has been closed * - * Since 1.7 + * @since 1.7 */ public String getComment() { synchronized (this) { @@ -420,6 +421,7 @@ class ZipFile implements ZipConstants, Closeable { Integer.MAX_VALUE : (int) avail); } + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { close(); } @@ -641,9 +643,18 @@ class ZipFile implements ZipConstants, Closeable { * This will prevent holding up system resources for an undetermined * length of time. * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. * @throws IOException if an I/O error has occurred * @see java.util.zip.ZipFile#close() */ + @Deprecated(since="9") protected void finalize() throws IOException { close(); } @@ -813,6 +824,7 @@ class ZipFile implements ZipConstants, Closeable { } } + @SuppressWarnings("deprecation") protected void finalize() { close(); } diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipInputStream.java b/jdk/src/java.base/share/classes/java/util/zip/ZipInputStream.java index c615aaa7eb9..29cbc23f7de 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/ZipInputStream.java +++ b/jdk/src/java.base/share/classes/java/util/zip/ZipInputStream.java @@ -40,6 +40,7 @@ import static java.util.zip.ZipUtils.*; * entries. * * @author David Connelly + * @since 1.1 */ public class ZipInputStream extends InflaterInputStream implements ZipConstants { diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipOutputStream.java b/jdk/src/java.base/share/classes/java/util/zip/ZipOutputStream.java index b298653b39d..1770ef3bff9 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/ZipOutputStream.java +++ b/jdk/src/java.base/share/classes/java/util/zip/ZipOutputStream.java @@ -41,6 +41,7 @@ import sun.security.action.GetPropertyAction; * entries. * * @author David Connelly + * @since 1.1 */ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstants { diff --git a/jdk/src/java.base/share/classes/java/util/zip/package-info.java b/jdk/src/java.base/share/classes/java/util/zip/package-info.java index a6ec2072413..f89085e1af3 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/package-info.java +++ b/jdk/src/java.base/share/classes/java/util/zip/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,13 +37,13 @@ * Info-ZIP Application Note 970311 - a detailed description of * the Info-ZIP format upon which the {@code java.util.zip} classes * are based. - *
            • An implementation may optionally support the + *
            • An implementation may optionally support the * ZIP64(tm) format extensions defined by the * * PKWARE ZIP File Format Specification. The ZIP64(tm) format * extensions are used to overcome the size limitations of the * original ZIP format. - *
            • APPENDIX D of + *
            • APPENDIX D of * * PKWARE ZIP File Format Specification - Language Encoding Flag * (EFS) to encode ZIP entry filename and comment fields using UTF-8. diff --git a/jdk/src/java.base/share/classes/javax/crypto/Cipher.java b/jdk/src/java.base/share/classes/javax/crypto/Cipher.java index 48ca2b01994..4982a87bbe1 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/Cipher.java +++ b/jdk/src/java.base/share/classes/javax/crypto/Cipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -137,6 +137,7 @@ import sun.security.jca.*; *
            • {@code AES/CBC/PKCS5Padding} (128)
            • *
            • {@code AES/ECB/NoPadding} (128)
            • *
            • {@code AES/ECB/PKCS5Padding} (128)
            • + *
            • {@code AES/GCM/NoPadding} (128)
            • *
            • {@code DES/CBC/NoPadding} (56)
            • *
            • {@code DES/CBC/PKCS5Padding} (56)
            • *
            • {@code DES/ECB/NoPadding} (56)
            • @@ -150,9 +151,9 @@ import sun.security.jca.*; *
            • {@code RSA/ECB/OAEPWithSHA-256AndMGF1Padding} (1024, 2048)
            • * * These transformations are described in the - * + * * Cipher section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other transformations are supported. * @@ -489,8 +490,8 @@ public class Cipher { * @param transformation the name of the transformation, e.g., * DES/CBC/PKCS5Padding. * See the Cipher section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names"> + * Java Security Standard Algorithm Names Specification * for information about standard transformation names. * * @return a cipher that implements the requested transformation @@ -567,8 +568,8 @@ public class Cipher { * @param transformation the name of the transformation, * e.g., DES/CBC/PKCS5Padding. * See the Cipher section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names"> + * Java Security Standard Algorithm Names Specification * for information about standard transformation names. * * @param provider the name of the provider. @@ -627,8 +628,8 @@ public class Cipher { * @param transformation the name of the transformation, * e.g., DES/CBC/PKCS5Padding. * See the Cipher section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names"> + * Java Security Standard Algorithm Names Specification * for information about standard transformation names. * * @param provider the provider. @@ -2615,11 +2616,9 @@ public class Cipher { * according to the installed JCE jurisdiction policy files. If * JCE unlimited strength jurisdiction policy files are installed, * Integer.MAX_VALUE will be returned. - * For more information on default key size in JCE jurisdiction - * policy files, please see Appendix E in the - * - * Java Cryptography Architecture Reference Guide. + * For more information on the default key sizes and the JCE jurisdiction + * policy files, please see the Cryptographic defaults and limitations in + * the {@extLink security_guide_jdk_providers JDK Providers Documentation}. * * @param transformation the cipher transformation. * @return the maximum key length in bits or Integer.MAX_VALUE. diff --git a/jdk/src/java.base/share/classes/javax/crypto/CipherInputStream.java b/jdk/src/java.base/share/classes/javax/crypto/CipherInputStream.java index 9c8bc81393a..54ad9611e2d 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/CipherInputStream.java +++ b/jdk/src/java.base/share/classes/javax/crypto/CipherInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -93,7 +93,7 @@ public class CipherInputStream extends FilterInputStream { // stream status private boolean closed = false; - /** + /* * private convenience function. * * Entry condition: ostart = ofinish diff --git a/jdk/src/java.base/share/classes/javax/crypto/CryptoPermission.java b/jdk/src/java.base/share/classes/javax/crypto/CryptoPermission.java index 749e31926fe..ddc2648b693 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/CryptoPermission.java +++ b/jdk/src/java.base/share/classes/javax/crypto/CryptoPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -196,19 +196,19 @@ class CryptoPermission extends java.security.Permission { * Checks if the specified permission is "implied" by * this object. *

              - * More specifically, this method returns true if:

              + * More specifically, this method returns true if: *

                - *
              • p is an instance of CryptoPermission, and

                + *

              • p is an instance of CryptoPermission, and
              • *
              • p's algorithm name equals or (in the case of wildcards) - * is implied by this permission's algorithm name, and

                + * is implied by this permission's algorithm name, and

              • *
              • p's maximum allowable key size is less or - * equal to this permission's maximum allowable key size, and

                + * equal to this permission's maximum allowable key size, and

              • *
              • p's algorithm parameter spec equals or is - * implied by this permission's algorithm parameter spec, and

                + * implied by this permission's algorithm parameter spec, and

              • *
              • p's exemptionMechanism equals or * is implied by this permission's * exemptionMechanism (a null exemption mechanism - * implies any other exemption mechanism). + * implies any other exemption mechanism).
              • *
              * * @param p the permission to check against. diff --git a/jdk/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java b/jdk/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java index 7f27ea2506a..0093ce65b6d 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java +++ b/jdk/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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,10 +46,12 @@ import java.lang.reflect.*; * * The format of a permission entry in the jurisdiction policy file is: * + *
              {@code
                *   permission [, 
                *              [[, ][, 
                *              [, , ]]]];
              + * }
              * * @author Sharon Liu * @@ -526,8 +528,7 @@ final class CryptoPolicyParser { /** * Each grant entry in the policy configuration file is represented by a - * GrantEntry object.

              - * + * GrantEntry object. *

              * For example, the entry *

              @@ -587,8 +588,7 @@ final class CryptoPolicyParser {
               
                   /**
                    * Each crypto permission entry in the policy configuration file is
              -     * represented by a CryptoPermissionEntry object.  

              - * + * represented by a CryptoPermissionEntry object. *

              * For example, the entry *

              diff --git a/jdk/src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java b/jdk/src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java
              index 959ed982a55..59b4a07f349 100644
              --- a/jdk/src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java
              +++ b/jdk/src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 2001, 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
              @@ -116,10 +116,9 @@ public class EncryptedPrivateKeyInfo {
                    * e.g. EncryptedPrivateKeyInfo(AlgorithmParameters, byte[]),
                    * should be used.
                    *
              -     * @param algName encryption algorithm name. See Appendix A in the
              -     * 
              -     * Java Cryptography Architecture Reference Guide
              +     * @param algName encryption algorithm name. See the
              +     * 
              +     * Java Security Standard Algorithm Names document
                    * for information about standard Cipher algorithm names.
                    * @param encryptedData encrypted data. The contents of
                    * encrypedData are copied to protect against subsequent
              @@ -199,10 +198,8 @@ public class EncryptedPrivateKeyInfo {
                    * Returns the encryption algorithm.
                    * 

              Note: Standard name is returned instead of the specified one * in the constructor when such mapping is available. - * See Appendix A in the - * - * Java Cryptography Architecture Reference Guide + * See the + * Java Security Standard Algorithm Names document * for information about standard Cipher algorithm names. * * @return the encryption algorithm name. diff --git a/jdk/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java b/jdk/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java index cf19807f2dc..35e4fdfca43 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java +++ b/jdk/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -125,8 +125,8 @@ public class ExemptionMechanism { * mechanism. * See the ExemptionMechanism section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#exemption-mechanisms"> + * Java Security Standard Algorithm Names Specification * for information about standard exemption mechanism names. * * @return the new {@code ExemptionMechanism} object @@ -164,8 +164,8 @@ public class ExemptionMechanism { * @param algorithm the standard name of the requested exemption mechanism. * See the ExemptionMechanism section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#exemption-mechanisms"> + * Java Security Standard Algorithm Names Specification * for information about standard exemption mechanism names. * * @param provider the name of the provider. @@ -208,8 +208,8 @@ public class ExemptionMechanism { * @param algorithm the standard name of the requested exemption mechanism. * See the ExemptionMechanism section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#exemption-mechanisms"> + * Java Security Standard Algorithm Names Specification * for information about standard exemption mechanism names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java b/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java index 60a1c9d3aa2..16b7903cd8e 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java +++ b/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java @@ -25,7 +25,6 @@ package javax.crypto; -import java.lang.reflect.Module; import java.security.*; import java.net.*; import java.util.*; diff --git a/jdk/src/java.base/share/classes/javax/crypto/KeyAgreement.java b/jdk/src/java.base/share/classes/javax/crypto/KeyAgreement.java index 47449b3338c..3f77eddccc8 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/KeyAgreement.java +++ b/jdk/src/java.base/share/classes/javax/crypto/KeyAgreement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,9 +60,9 @@ import sun.security.jca.GetInstance.Instance; *

            • {@code DiffieHellman}
            • * * This algorithm is described in the + * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms"> * KeyAgreement section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -161,8 +161,8 @@ public class KeyAgreement { * @param algorithm the standard name of the requested key agreement * algorithm. * See the KeyAgreement section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code KeyAgreement} object @@ -208,8 +208,8 @@ public class KeyAgreement { * @param algorithm the standard name of the requested key agreement * algorithm. * See the KeyAgreement section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -252,8 +252,8 @@ public class KeyAgreement { * @param algorithm the standard name of the requested key agreement * algorithm. * See the KeyAgreement section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java b/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java index 4cb8b79be23..b0d4de7775c 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java +++ b/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -83,6 +83,14 @@ import sun.security.util.Debug; *

              In case the client does not explicitly initialize the KeyGenerator * (via a call to an {@code init} method), each provider must * supply (and document) a default initialization. + * See the Keysize Restriction sections of the + * {@extLink security_guide_jdk_providers JDK Providers} + * document for information on the KeyGenerator defaults used by + * JDK providers. + * However, note that defaults may vary across different providers. + * Additionally, the default value for a provider may change in a future + * version. Therefore, it is recommended to explicitly initialize the + * KeyGenerator instead of relying on provider-specific defaults. * *

              Every implementation of the Java platform is required to support the * following standard {@code KeyGenerator} algorithms with the keysizes in @@ -95,9 +103,9 @@ import sun.security.util.Debug; *

            • {@code HmacSHA256}
            • * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms"> * KeyGenerator section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -216,8 +224,8 @@ public class KeyGenerator { * * @param algorithm the standard name of the requested key algorithm. * See the KeyGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code KeyGenerator} object @@ -250,8 +258,8 @@ public class KeyGenerator { * * @param algorithm the standard name of the requested key algorithm. * See the KeyGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -293,8 +301,8 @@ public class KeyGenerator { * * @param algorithm the standard name of the requested key algorithm. * See the KeyGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java b/jdk/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java index f271e413cfc..ea084d5807a 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java +++ b/jdk/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -35,6 +35,18 @@ import java.security.spec.*; * cryptographic service provider who wishes to supply the implementation * of a key generator for a particular algorithm. * + *

              In case the client does not explicitly initialize the KeyGenerator + * (via a call to an {@code init} method), each provider must + * supply (and document) a default initialization. + * See the Keysize Restriction sections of the + * {@extLink security_guide_jdk_providers JDK Providers} + * document for information on the KeyGenerator defaults used by + * JDK providers. + * However, note that defaults may vary across different providers. + * Additionally, the default value for a provider may change in a future + * version. Therefore, it is recommended to explicitly initialize the + * KeyGenerator instead of relying on provider-specific defaults. + * * @author Jan Luehe * * @see SecretKey diff --git a/jdk/src/java.base/share/classes/javax/crypto/Mac.java b/jdk/src/java.base/share/classes/javax/crypto/Mac.java index 5a1d12de4c6..245f12f6934 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/Mac.java +++ b/jdk/src/java.base/share/classes/javax/crypto/Mac.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,9 +61,9 @@ import sun.security.jca.GetInstance.Instance; *

            • {@code HmacSHA256}
            • * * These algorithms are described in the - * + * * Mac section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -162,8 +162,8 @@ public class Mac implements Cloneable { * * @param algorithm the standard name of the requested MAC algorithm. * See the Mac section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#mac-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code Mac} object @@ -206,8 +206,8 @@ public class Mac implements Cloneable { * * @param algorithm the standard name of the requested MAC algorithm. * See the Mac section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#mac-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -247,8 +247,8 @@ public class Mac implements Cloneable { * * @param algorithm the standard name of the requested MAC algorithm. * See the Mac section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#mac-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java b/jdk/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java index cadf2302d20..9e4bae382c6 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java +++ b/jdk/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -65,9 +65,9 @@ import sun.security.jca.GetInstance.Instance; *
            • {@code DESede}
            • * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms"> * SecretKeyFactory section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -148,8 +148,8 @@ public class SecretKeyFactory { * @param algorithm the standard name of the requested secret-key * algorithm. * See the SecretKeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code SecretKeyFactory} object @@ -183,8 +183,8 @@ public class SecretKeyFactory { * @param algorithm the standard name of the requested secret-key * algorithm. * See the SecretKeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -227,8 +227,8 @@ public class SecretKeyFactory { * @param algorithm the standard name of the requested secret-key * algorithm. * See the SecretKeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/interfaces/package-info.java b/jdk/src/java.base/share/classes/javax/crypto/interfaces/package-info.java index 9f59e8ffed6..a7c1d62de20 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/interfaces/package-info.java +++ b/jdk/src/java.base/share/classes/javax/crypto/interfaces/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -39,10 +39,8 @@ * developer guide: * * * *

              Package Specification

              @@ -57,10 +55,8 @@ * For further documentation, please see: * * * @since 1.4 diff --git a/jdk/src/java.base/share/classes/javax/crypto/package-info.java b/jdk/src/java.base/share/classes/javax/crypto/package-info.java index 754b5f643c8..1f600560842 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/package-info.java +++ b/jdk/src/java.base/share/classes/javax/crypto/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -42,9 +42,9 @@ * having to add or rewrite code. * * * *

              Related Documentation

              @@ -52,15 +52,11 @@ * For further documentation, please see: * * * @since 1.4 diff --git a/jdk/src/java.base/share/classes/javax/crypto/spec/SecretKeySpec.java b/jdk/src/java.base/share/classes/javax/crypto/spec/SecretKeySpec.java index 767c0d2a6f3..a0aaafdc7ef 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/spec/SecretKeySpec.java +++ b/jdk/src/java.base/share/classes/javax/crypto/spec/SecretKeySpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -81,9 +81,8 @@ public class SecretKeySpec implements KeySpec, SecretKey { * the array are copied to protect against subsequent modification. * @param algorithm the name of the secret-key algorithm to be associated * with the given key material. - * See Appendix A in the - * Java Cryptography Architecture Reference Guide + * See the + * Java Security Standard Algorithm Names document * for information about standard algorithm names. * @exception IllegalArgumentException if algorithm * is null or key is null or empty. @@ -126,9 +125,8 @@ public class SecretKeySpec implements KeySpec, SecretKey { * @param len the length of the key material. * @param algorithm the name of the secret-key algorithm to be associated * with the given key material. - * See Appendix A in the - * Java Cryptography Architecture Reference Guide + * See the + * Java Security Standard Algorithm Names document * for information about standard algorithm names. * @exception IllegalArgumentException if algorithm * is null or key is null, empty, or too short, diff --git a/jdk/src/java.base/share/classes/javax/crypto/spec/package-info.java b/jdk/src/java.base/share/classes/javax/crypto/spec/package-info.java index a9b4589321e..db0cc0259c8 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/spec/package-info.java +++ b/jdk/src/java.base/share/classes/javax/crypto/spec/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -57,16 +57,11 @@ * * * * @since 1.4 diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java b/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java index 1e23a429b4d..d8da54ebc46 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -44,9 +44,9 @@ public abstract class ExtendedSSLSession implements SSLSession { *

              * The signature algorithm name must be a standard Java Security * name (such as "SHA1withRSA", "SHA256withECDSA", and so on). - * See Appendix A in the - * Java Cryptography Architecture API Specification & Reference + * See the + * Java Security Standard Algorithm Names document * for information about standard algorithm names. *

              * Note: the local supported signature algorithms should conform to @@ -72,9 +72,9 @@ public abstract class ExtendedSSLSession implements SSLSession { *

              * The signature algorithm name must be a standard Java Security * name (such as "SHA1withRSA", "SHA256withECDSA", and so on). - * See Appendix A in the - * Java Cryptography Architecture API Specification & Reference + * See the + * Java Security Standard Algorithm Names document * for information about standard algorithm names. * * @return An array of supported signature algorithms, in descending diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java b/jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java index 443e704dde3..b34a59b15ba 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -127,8 +127,8 @@ public class KeyManagerFactory { * * @param algorithm the standard name of the requested algorithm. * See the - * Java Secure Socket Extension Reference Guide + * "{@docRoot}/../specs/security/standard-names.html"> + * Java Security Standard Algorithm Names document * for information about standard algorithm names. * * @return the new {@code KeyManagerFactory} object @@ -165,8 +165,8 @@ public class KeyManagerFactory { * @param algorithm the standard name of the requested algorithm. * See the - * Java Secure Socket Extension Reference Guide + * "{@docRoot}/../specs/security/standard-names.html"> + * Java Security Standard Algorithm Names document * for information about standard algorithm names. * * @param provider the name of the provider. @@ -209,8 +209,8 @@ public class KeyManagerFactory { * * @param algorithm the standard name of the requested algorithm. * See the - * Java Secure Socket Extension Reference Guide + * "{@docRoot}/../specs/security/standard-names.html"> + * Java Security Standard Algorithm Names document * for information about standard algorithm names. * * @param provider an instance of the provider. diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java index 2f2a0928a15..a649bdd10a0 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -45,9 +45,9 @@ import sun.security.jca.GetInstance; *

            • {@code TLSv1.2}
            • * * These protocols are described in the + * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms"> * SSLContext section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -147,9 +147,8 @@ public class SSLContext { * * @param protocol the standard name of the requested protocol. * See the SSLContext section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation + * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard protocol names. * * @return the new {@code SSLContext} object @@ -185,9 +184,8 @@ public class SSLContext { * * @param protocol the standard name of the requested protocol. * See the SSLContext section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation + * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard protocol names. * * @param provider the name of the provider. @@ -228,9 +226,8 @@ public class SSLContext { * * @param protocol the standard name of the requested protocol. * See the SSLContext section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation + * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard protocol names. * * @param provider an instance of the provider. diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java index 9613661afc2..b765128cd85 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -866,7 +866,7 @@ public abstract class SSLEngine { *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -892,7 +892,7 @@ public abstract class SSLEngine { *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -914,7 +914,7 @@ public abstract class SSLEngine { *

              * Note that the standard list of cipher suite names may be found in the * + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list or might not diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java index 5207c3c1f84..19b05f9de8a 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -110,7 +110,7 @@ public class SSLParameters { * constructor followed by * {@code setCipherSuites(cipherSuites);}. Note that the * standard list of cipher suite names may be found in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list. @@ -130,7 +130,7 @@ public class SSLParameters { * {@code setCipherSuites(cipherSuites); setProtocols(protocols);}. * Note that the standard list of cipher suite names may be found in the * + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list. @@ -153,7 +153,7 @@ public class SSLParameters { *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -170,7 +170,7 @@ public class SSLParameters { * * @param cipherSuites the array of ciphersuites (or null). Note that the * standard list of cipher suite names may be found in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list or might not @@ -294,9 +294,10 @@ public class SSLParameters { * SSL/TLS/DTLS handshaking. This is to prevent man-in-the-middle attacks. * * @param algorithm The standard string name of the endpoint - * identification algorithm (or null). See Appendix A in the - * Java Cryptography Architecture API Specification & Reference + * identification algorithm (or null). + * See the + * Java Security Standard Algorithm Names document * for information about standard algorithm names. * * @see X509ExtendedTrustManager @@ -675,4 +676,3 @@ public class SSLParameters { applicationProtocols = tempProtocols; } } - diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLPermission.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLPermission.java index b27142128ae..9db1f79a0d2 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLPermission.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -44,14 +44,17 @@ import java.security.*; * and for each provides a description of what the permission allows * and a discussion of the risks of granting code the permission. * - *

              Type Characteristics
              + *
              + * + * * * * * * + * * + * * * * * * + * *
              permission name, what it allows, and associated risks
              Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
              setHostnameVerifierThe ability to set a callback which can decide whether to @@ -84,6 +87,7 @@ import java.security.*; *
              * * @see java.security.BasicPermission diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocket.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocket.java index ead7d20ae58..aa7b266c3a3 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocket.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -198,7 +198,7 @@ public abstract class SSLServerSocket extends ServerSocket { *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -224,7 +224,7 @@ public abstract class SSLServerSocket extends ServerSocket { *

              * Note that the standard list of cipher suite names may be found in the * + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list or might not @@ -254,7 +254,7 @@ public abstract class SSLServerSocket extends ServerSocket { *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java index 3629aaef3c7..1cbbf9cfcd8 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -126,7 +126,7 @@ public abstract class SSLServerSocketFactory extends ServerSocketFactory *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -147,7 +147,7 @@ public abstract class SSLServerSocketFactory extends ServerSocketFactory *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java index 2a00d8f7f26..93e082bde07 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -270,7 +270,7 @@ public abstract class SSLSocket extends Socket *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -296,7 +296,7 @@ public abstract class SSLSocket extends Socket *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -318,7 +318,7 @@ public abstract class SSLSocket extends Socket *

              * Note that the standard list of cipher suite names may be found in the * + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list or might not diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java index d504e1d7a3d..8029b7d6b9a 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -151,7 +151,7 @@ public abstract class SSLSocketFactory extends SocketFactory *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -170,7 +170,7 @@ public abstract class SSLSocketFactory extends SocketFactory *

              * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java b/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java index 0f999e8d0aa..81f2707d4aa 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -40,12 +40,12 @@ import sun.security.jca.GetInstance; *

              Every implementation of the Java platform is required to support the * following standard {@code TrustManagerFactory} algorithm: *

                - *
              • PKIX
              • + *
              • {@code PKIX}
              • *
              * This algorithm is described in the + * "{@docRoot}/../specs/security/standard-names.html#trustmanagerfactory-algorithms"> * TrustManagerFactory section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -141,8 +141,8 @@ public class TrustManagerFactory { * * @param algorithm the standard name of the requested trust management * algorithm. See the - * Java Secure Socket Extension Reference Guide + * "{@docRoot}/../specs/security/standard-names.html"> + * Java Security Standard Algorithm Names document * for information about standard algorithm names. * * @return the new {@code TrustManagerFactory} object @@ -179,8 +179,8 @@ public class TrustManagerFactory { * * @param algorithm the standard name of the requested trust management * algorithm. See the - * Java Secure Socket Extension Reference Guide + * "{@docRoot}/../specs/security/standard-names.html"> + * Java Security Standard Algorithm Names document * for information about standard algorithm names. * * @param provider the name of the provider. @@ -223,8 +223,8 @@ public class TrustManagerFactory { * * @param algorithm the standard name of the requested trust management * algorithm. See the - * Java Secure Socket Extension Reference Guide + * "{@docRoot}/../specs/security/standard-names.html"> + * Java Security Standard Algorithm Names document * for information about standard algorithm names. * * @param provider an instance of the provider. diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/package-info.java b/jdk/src/java.base/share/classes/javax/net/ssl/package-info.java index 9fd6868587e..47ea7bf1ff6 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/package-info.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -31,9 +31,9 @@ * the communicating peers. * * * * @since 1.4 diff --git a/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java b/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java index 6cbff526932..bfdd022c138 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java @@ -139,6 +139,7 @@ package javax.security.auth; * @implNote * Implementations may define additional target names, but should use naming * conventions such as reverse domain name notation to avoid name clashes. + * @since 1.4 */ public final class AuthPermission extends java.security.BasicPermission { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/DestroyFailedException.java b/jdk/src/java.base/share/classes/javax/security/auth/DestroyFailedException.java index 4c72dda0484..66a84f46aa9 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/DestroyFailedException.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/DestroyFailedException.java @@ -32,6 +32,7 @@ package javax.security.auth; * the {@code Destroyable} interface when the {@code destroy} * method fails. * + * @since 1.4 */ public class DestroyFailedException extends Exception { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/Destroyable.java b/jdk/src/java.base/share/classes/javax/security/auth/Destroyable.java index eeb2ba0541e..5758cc4f453 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/Destroyable.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/Destroyable.java @@ -29,6 +29,7 @@ package javax.security.auth; * Objects such as credentials may optionally implement this interface * to provide the capability to destroy its contents. * + * @since 1.4 * @see javax.security.auth.Subject */ public interface Destroyable { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/Policy.java b/jdk/src/java.base/share/classes/javax/security/auth/Policy.java index 605161e363a..b9f61da72db 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/Policy.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/Policy.java @@ -153,6 +153,7 @@ import sun.security.util.Debug; * These two APIs provide callers the means to query the * Policy for Principal-based Permission entries. * + * @since 1.4 * @see java.security.Security security properties */ @Deprecated(since="1.4") diff --git a/jdk/src/java.base/share/classes/javax/security/auth/PrivateCredentialPermission.java b/jdk/src/java.base/share/classes/javax/security/auth/PrivateCredentialPermission.java index 217bf9ea95f..fdd1d017986 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/PrivateCredentialPermission.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/PrivateCredentialPermission.java @@ -100,6 +100,7 @@ import sun.security.util.ResourcesMgr; * "a.b.Principal" with the name, "duke", and "c.d.Principal", with the name, * "dukette". * + * @since 1.4 */ public final class PrivateCredentialPermission extends Permission { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/RefreshFailedException.java b/jdk/src/java.base/share/classes/javax/security/auth/RefreshFailedException.java index ff44d06f307..d69be787daf 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/RefreshFailedException.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/RefreshFailedException.java @@ -32,6 +32,7 @@ package javax.security.auth; * the {@code Refreshable} interface when the {@code refresh} * method fails. * + * @since 1.4 */ public class RefreshFailedException extends Exception { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/Refreshable.java b/jdk/src/java.base/share/classes/javax/security/auth/Refreshable.java index 8f727eafc28..73f1ec48431 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/Refreshable.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/Refreshable.java @@ -32,6 +32,7 @@ package javax.security.auth; * may implement this interface to allow callers to refresh the time period * for which it is valid. * + * @since 1.4 * @see javax.security.auth.Subject */ public interface Refreshable { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/Subject.java b/jdk/src/java.base/share/classes/javax/security/auth/Subject.java index 96c6eeaf30e..602298df9b6 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/Subject.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/Subject.java @@ -94,6 +94,7 @@ import sun.security.util.ResourcesMgr; * {@code Principal} implementations associated with Subjects * must implement {@code Serializable}. * + * @since 1.4 * @see java.security.Principal * @see java.security.DomainCombiner */ diff --git a/jdk/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java b/jdk/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java index a6cc910d3ab..b80cec126a5 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java @@ -43,6 +43,7 @@ import java.lang.ref.WeakReference; * with Principals from the {@code Subject} associated with this * {@code SubjectDomainCombiner}. * + * @since 1.4 */ public class SubjectDomainCombiner implements java.security.DomainCombiner { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/Callback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/Callback.java index 83855ca0484..d8522e40d8f 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/callback/Callback.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/Callback.java @@ -40,6 +40,7 @@ package javax.security.auth.callback; * if appropriate, to return requested information back to the * underlying security services. * + * @since 1.4 * @see javax.security.auth.callback.CallbackHandler * @see javax.security.auth.callback.ChoiceCallback * @see javax.security.auth.callback.ConfirmationCallback diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/CallbackHandler.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/CallbackHandler.java index d9ef17a700f..03e1b14a5ff 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/callback/CallbackHandler.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/CallbackHandler.java @@ -63,6 +63,7 @@ package javax.security.auth.callback; *

              All default handler implementations must provide a public * zero-argument constructor. * + * @since 1.4 * @see java.security.Security security properties */ public interface CallbackHandler { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/ChoiceCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/ChoiceCallback.java index 26cfd23e30c..564a7984551 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/callback/ChoiceCallback.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/ChoiceCallback.java @@ -31,6 +31,7 @@ package javax.security.auth.callback; * method of a {@code CallbackHandler} to display a list of choices * and to retrieve the selected choice(s). * + * @since 1.4 * @see javax.security.auth.callback.CallbackHandler */ public class ChoiceCallback implements Callback, java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java index 56fead57f0c..99bb5f8c17f 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java @@ -31,6 +31,7 @@ package javax.security.auth.callback; * method of a {@code CallbackHandler} to ask for YES/NO, * OK/CANCEL, YES/NO/CANCEL or other similar confirmations. * + * @since 1.4 * @see javax.security.auth.callback.CallbackHandler */ public class ConfirmationCallback implements Callback, java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/LanguageCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/LanguageCallback.java index bcd2fdf0741..c0bf6e31896 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/callback/LanguageCallback.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/LanguageCallback.java @@ -33,6 +33,7 @@ import java.util.Locale; * method of a {@code CallbackHandler} to retrieve the {@code Locale} * used for localizing text. * + * @since 1.4 * @see javax.security.auth.callback.CallbackHandler */ public class LanguageCallback implements Callback, java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/NameCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/NameCallback.java index 500f8d1ee10..5c289df2c43 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/callback/NameCallback.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/NameCallback.java @@ -30,6 +30,7 @@ package javax.security.auth.callback; * {@code NameCallback} to the {@code handle} * method of a {@code CallbackHandler} to retrieve name information. * + * @since 1.4 * @see javax.security.auth.callback.CallbackHandler */ public class NameCallback implements Callback, java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java index b35eaa8d0e4..63e52fea112 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java @@ -30,6 +30,7 @@ package javax.security.auth.callback; * {@code PasswordCallback} to the {@code handle} * method of a {@code CallbackHandler} to retrieve password information. * + * @since 1.4 * @see javax.security.auth.callback.CallbackHandler */ public class PasswordCallback implements Callback, java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java index b9f93b73e44..0fea6a3c7d6 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java @@ -31,6 +31,7 @@ package javax.security.auth.callback; * method of a {@code CallbackHandler} to retrieve generic text * information. * + * @since 1.4 * @see javax.security.auth.callback.CallbackHandler */ public class TextInputCallback implements Callback, java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/TextOutputCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/TextOutputCallback.java index 400a2c6e3ed..ba4551e3880 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/callback/TextOutputCallback.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/TextOutputCallback.java @@ -31,6 +31,7 @@ package javax.security.auth.callback; * method of a {@code CallbackHandler} to display information messages, * warning messages and error messages. * + * @since 1.4 * @see javax.security.auth.callback.CallbackHandler */ public class TextOutputCallback implements Callback, java.io.Serializable { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java index 605a3e35ebb..be11761f7b2 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java @@ -29,6 +29,7 @@ package javax.security.auth.callback; * Signals that a {@code CallbackHandler} does not * recognize a particular {@code Callback}. * + * @since 1.4 */ public class UnsupportedCallbackException extends Exception { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/AccountExpiredException.java b/jdk/src/java.base/share/classes/javax/security/auth/login/AccountExpiredException.java index 43dd84eb527..e979fc7cd52 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/login/AccountExpiredException.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/login/AccountExpiredException.java @@ -35,6 +35,7 @@ package javax.security.auth.login; * throws this exception to notify the application. The application can * then take the appropriate steps to notify the user. * + * @since 1.4 */ public class AccountExpiredException extends AccountException { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/AppConfigurationEntry.java b/jdk/src/java.base/share/classes/javax/security/auth/login/AppConfigurationEntry.java index 1e9acbf051a..f567b3be871 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/login/AppConfigurationEntry.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/login/AppConfigurationEntry.java @@ -39,6 +39,7 @@ import java.util.Collections; * options. Please refer to the {@code Configuration} class for * more information on the different control flags and their semantics. * + * @since 1.4 * @see javax.security.auth.login.Configuration */ public class AppConfigurationEntry { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java b/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java index 29d42df6855..e08bf3eb3d7 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -178,10 +178,11 @@ import sun.security.jca.GetInstance; * constructed by invoking one of the {@code getInstance} factory methods * with a standard type. The default policy type is "JavaLoginConfig". * See the Configuration section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#configuration-types"> + * Java Security Standard Algorithm Names Specification * for a list of standard Configuration types. * + * @since 1.4 * @see javax.security.auth.login.LoginContext * @see java.security.Security security properties */ @@ -323,9 +324,9 @@ public abstract class Configuration { * * @param type the specified Configuration type. See the Configuration * section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation for a list of standard Configuration types. + * "{@docRoot}/../specs/security/standard-names.html#configuration-types"> + * Java Security Standard Algorithm Names Specification + * for a list of standard Configuration types. * * @param params parameters for the Configuration, which may be null. * @@ -381,9 +382,9 @@ public abstract class Configuration { * * @param type the specified Configuration type. See the Configuration * section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation for a list of standard Configuration types. + * "{@docRoot}/../specs/security/standard-names.html#configuration-types"> + * Java Security Standard Algorithm Names Specification + * for a list of standard Configuration types. * * @param params parameters for the Configuration, which may be null. * @@ -448,9 +449,9 @@ public abstract class Configuration { * * @param type the specified Configuration type. See the Configuration * section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation for a list of standard Configuration types. + * "{@docRoot}/../specs/security/standard-names.html#configuration-types"> + * Java Security Standard Algorithm Names Specification + * for a list of standard Configuration types. * * @param params parameters for the Configuration, which may be null. * diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/CredentialExpiredException.java b/jdk/src/java.base/share/classes/javax/security/auth/login/CredentialExpiredException.java index 8e279bd604b..b0914d2c914 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/login/CredentialExpiredException.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/login/CredentialExpiredException.java @@ -37,6 +37,7 @@ package javax.security.auth.login; * the application. The application can then take the appropriate * steps to assist the user in updating the password. * + * @since 1.4 */ public class CredentialExpiredException extends CredentialException { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/FailedLoginException.java b/jdk/src/java.base/share/classes/javax/security/auth/login/FailedLoginException.java index 895583138db..82170a99fc9 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/login/FailedLoginException.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/login/FailedLoginException.java @@ -32,6 +32,7 @@ package javax.security.auth.login; * For example, a {@code LoginModule} throws this exception if * the user entered an incorrect password. * + * @since 1.4 */ public class FailedLoginException extends LoginException { diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/LoginContext.java b/jdk/src/java.base/share/classes/javax/security/auth/login/LoginContext.java index af46b200701..deaf3aac426 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/login/LoginContext.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/login/LoginContext.java @@ -182,6 +182,7 @@ import sun.security.util.ResourcesMgr; *

            * * + * @since 1.4 * @see java.security.Security * @see javax.security.auth.AuthPermission * @see javax.security.auth.Subject diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/LoginException.java b/jdk/src/java.base/share/classes/javax/security/auth/login/LoginException.java index 065f57f986c..3861cfcf0b9 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/login/LoginException.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/login/LoginException.java @@ -28,6 +28,7 @@ package javax.security.auth.login; /** * This is the basic login exception. * + * @since 1.4 * @see javax.security.auth.login.LoginContext */ diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/package-info.java b/jdk/src/java.base/share/classes/javax/security/auth/login/package-info.java index 5b43480dc0a..555b4983f38 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/login/package-info.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/login/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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,10 +28,9 @@ *

            Package Specification

            * * * * @since 1.4 diff --git a/jdk/src/java.base/share/classes/javax/security/auth/spi/LoginModule.java b/jdk/src/java.base/share/classes/javax/security/auth/spi/LoginModule.java index 3206b5a5d27..1c19b7d8832 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/spi/LoginModule.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/spi/LoginModule.java @@ -122,6 +122,7 @@ import java.util.Map; * no arguments. This allows classes which load the {@code LoginModule} * to instantiate it. * + * @since 1.4 * @see javax.security.auth.login.LoginContext * @see javax.security.auth.login.Configuration */ diff --git a/jdk/src/java.base/share/classes/javax/security/auth/x500/X500PrivateCredential.java b/jdk/src/java.base/share/classes/javax/security/auth/x500/X500PrivateCredential.java index e3a7fdbd7dc..a4f37a36818 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/x500/X500PrivateCredential.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/x500/X500PrivateCredential.java @@ -36,6 +36,7 @@ import javax.security.auth.Destroyable; * This enables looking up the private credentials for an X.500 principal * in a subject. * + * @since 1.4 */ public final class X500PrivateCredential implements Destroyable { private X509Certificate cert; diff --git a/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java b/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java index 10506b7029c..ee77794aa1c 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -137,10 +137,15 @@ public class BasicImageReader implements AutoCloseable { int headerSize = ImageHeader.getHeaderSize(); // If no memory map then read header from image file - if (map == null) { + if (headerBuffer == null) { headerBuffer = ByteBuffer.allocateDirect(headerSize); - channel.read(headerBuffer, 0L); - headerBuffer.rewind(); + if (channel.read(headerBuffer, 0L) == headerSize) { + headerBuffer.rewind(); + } else { + throw new IOException("\"" + name + "\" is not an image file"); + } + } else if (headerBuffer.capacity() < headerSize) { + throw new IOException("\"" + name + "\" is not an image file"); } // Interpret the image file header @@ -156,6 +161,9 @@ public class BasicImageReader implements AutoCloseable { memoryMap = map.asReadOnlyBuffer(); // Interpret the image index + if (memoryMap.capacity() < indexSize) { + throw new IOException("The image file \"" + name + "\" is corrupted"); + } redirect = intBuffer(memoryMap, header.getRedirectOffset(), header.getRedirectSize()); offsets = intBuffer(memoryMap, header.getOffsetsOffset(), header.getOffsetsSize()); locations = slice(memoryMap, header.getLocationsOffset(), header.getLocationsSize()); @@ -241,27 +249,20 @@ public class BasicImageReader implements AutoCloseable { return stringsReader; } - public ImageLocation findLocation(String mn, String rn) { - Objects.requireNonNull(mn); - Objects.requireNonNull(rn); - - return findLocation("/" + mn + "/" + rn); - } - - public synchronized ImageLocation findLocation(String name) { + public synchronized ImageLocation findLocation(String module, String name) { + Objects.requireNonNull(module); Objects.requireNonNull(name); // Details of the algorithm used here can be found in // jdk.tools.jlink.internal.PerfectHashBuilder. - byte[] bytes = ImageStringsReader.mutf8FromString(name); int count = header.getTableLength(); - int index = redirect.get(ImageStringsReader.hashCode(bytes) % count); + int index = redirect.get(ImageStringsReader.hashCode(module, name) % count); if (index < 0) { // index is twos complement of location attributes index. index = -index - 1; } else if (index > 0) { // index is hash seed needed to compute location attributes index. - index = ImageStringsReader.hashCode(bytes, index) % count; + index = ImageStringsReader.hashCode(module, name, index) % count; } else { // No entry. return null; @@ -269,13 +270,36 @@ public class BasicImageReader implements AutoCloseable { long[] attributes = getAttributes(offsets.get(index)); - ImageLocation imageLocation = new ImageLocation(attributes, stringsReader); + if (!ImageLocation.verify(module, name, attributes, stringsReader)) { + return null; + } + return new ImageLocation(attributes, stringsReader); + } - if (!imageLocation.verify(name)) { + public synchronized ImageLocation findLocation(String name) { + Objects.requireNonNull(name); + // Details of the algorithm used here can be found in + // jdk.tools.jlink.internal.PerfectHashBuilder. + int count = header.getTableLength(); + int index = redirect.get(ImageStringsReader.hashCode(name) % count); + + if (index < 0) { + // index is twos complement of location attributes index. + index = -index - 1; + } else if (index > 0) { + // index is hash seed needed to compute location attributes index. + index = ImageStringsReader.hashCode(name, index) % count; + } else { + // No entry. return null; } - return imageLocation; + long[] attributes = getAttributes(offsets.get(index)); + + if (!ImageLocation.verify(name, attributes, stringsReader)) { + return null; + } + return new ImageLocation(attributes, stringsReader); } public String[] getEntryNames() { diff --git a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java index ad0ae42fc3d..f1b8f5594c3 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -59,14 +59,6 @@ public class ImageLocation { return strings; } - private static int attributeLength(int data) { - return (data & 0x7) + 1; - } - - private static int attributeKind(int data) { - return data >>> 3; - } - static long[] decompress(ByteBuffer bytes) { Objects.requireNonNull(bytes); long[] attributes = new long[ATTRIBUTE_COUNT]; @@ -74,7 +66,7 @@ public class ImageLocation { if (bytes != null) { while (bytes.hasRemaining()) { int data = bytes.get() & 0xFF; - int kind = attributeKind(data); + int kind = data >>> 3; if (kind == ATTRIBUTE_END) { break; @@ -85,7 +77,7 @@ public class ImageLocation { "Invalid jimage attribute kind: " + kind); } - int length = attributeLength(data); + int length = (data & 0x7) + 1; long value = 0; for (int j = 0; j < length; j++) { @@ -128,9 +120,82 @@ public class ImageLocation { } public boolean verify(String name) { - Objects.requireNonNull(name); + return verify(name, attributes, strings); + } - return name.equals(getFullName()); + /** + * A simpler verification would be {@code name.equals(getFullName())}, but + * by not creating the full name and enabling early returns we allocate + * fewer objects. Could possibly be made allocation free by extending + * ImageStrings to test if strings at an offset match the name region. + */ + static boolean verify(String name, long[] attributes, ImageStrings strings) { + Objects.requireNonNull(name); + final int length = name.length(); + int index = 0; + int moduleOffset = (int)attributes[ATTRIBUTE_MODULE]; + if (moduleOffset != 0) { + String module = strings.get(moduleOffset); + final int moduleLen = module.length(); + index = moduleLen + 1; + if (length <= index + || name.charAt(0) != '/' + || !name.regionMatches(1, module, 0, moduleLen) + || name.charAt(index++) != '/') { + return false; + } + } + + return verifyName(name, index, length, attributes, strings); + } + + static boolean verify(String module, String name, long[] attributes, + ImageStrings strings) { + Objects.requireNonNull(module); + Objects.requireNonNull(name); + int moduleOffset = (int)attributes[ATTRIBUTE_MODULE]; + if (moduleOffset != 0) { + if (!module.equals(strings.get(moduleOffset))) { + return false; + } + } + + return verifyName(name, 0, name.length(), attributes, strings); + } + + private static boolean verifyName(String name, int index, int length, + long[] attributes, ImageStrings strings) { + + int parentOffset = (int) attributes[ATTRIBUTE_PARENT]; + if (parentOffset != 0) { + String parent = strings.get(parentOffset); + final int parentLen = parent.length(); + if (!name.regionMatches(index, parent, 0, parentLen)) { + return false; + } + index += parentLen; + if (length <= index || name.charAt(index++) != '/') { + return false; + } + } + String base = strings.get((int) attributes[ATTRIBUTE_BASE]); + final int baseLen = base.length(); + if (!name.regionMatches(index, base, 0, baseLen)) { + return false; + } + index += baseLen; + int extOffset = (int) attributes[ATTRIBUTE_EXTENSION]; + if (extOffset != 0) { + String extension = strings.get(extOffset); + int extLen = extension.length(); + if (length <= index + || name.charAt(index++) != '.' + || !name.regionMatches(index, extension, 0, extLen)) { + return false; + } + index += extLen; + } + return length == index; } long getAttribute(int kind) { diff --git a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java index 60ab472db3e..6082c21bee3 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java @@ -52,7 +52,9 @@ import java.util.function.Consumer; * to the jimage file provided by the shipped JDK by tools running on JDK 8. */ public final class ImageReader implements AutoCloseable { - private SharedImageReader reader; + private final SharedImageReader reader; + + private volatile boolean closed; private ImageReader(SharedImageReader reader) { this.reader = reader; @@ -71,45 +73,49 @@ public final class ImageReader implements AutoCloseable { @Override public void close() throws IOException { - if (reader == null) { + if (closed) { throw new IOException("image file already closed"); } - reader.close(this); - reader = null; + closed = true; + } + + private void ensureOpen() throws IOException { + if (closed) { + throw new IOException("image file closed"); + } + } + + private void requireOpen() { + if (closed) { + throw new IllegalStateException("image file closed"); + } } // directory management interface public Directory getRootDirectory() throws IOException { - if (reader == null) { - throw new IOException("image file closed"); - } + ensureOpen(); return reader.getRootDirectory(); } + public Node findNode(String name) throws IOException { - if (reader == null) { - throw new IOException("image file closed"); - } + ensureOpen(); return reader.findNode(name); } public byte[] getResource(Node node) throws IOException { - if (reader == null) { - throw new IOException("image file closed"); - } + ensureOpen(); return reader.getResource(node); } public byte[] getResource(Resource rs) throws IOException { - if (reader == null) { - throw new IOException("image file closed"); - } + ensureOpen(); return reader.getResource(rs); } public ImageHeader getHeader() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getHeader(); } @@ -118,42 +124,42 @@ public final class ImageReader implements AutoCloseable { } public String getName() { - Objects.requireNonNull(reader, "image file closed"); - return reader.getName() ; + requireOpen(); + return reader.getName(); } public ByteOrder getByteOrder() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getByteOrder(); } public Path getImagePath() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getImagePath(); } public ImageStringsReader getStrings() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getStrings(); } public ImageLocation findLocation(String mn, String rn) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.findLocation(mn, rn); } public ImageLocation findLocation(String name) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.findLocation(name); } public String[] getEntryNames() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getEntryNames(); } public String[] getModuleNames() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); int off = "/modules/".length(); return reader.findNode("/modules") .getChildren() @@ -164,32 +170,32 @@ public final class ImageReader implements AutoCloseable { } public long[] getAttributes(int offset) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getAttributes(offset); } public String getString(int offset) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getString(offset); } public byte[] getResource(String name) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getResource(name); } public byte[] getResource(ImageLocation loc) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getResource(loc); } public ByteBuffer getResourceBuffer(ImageLocation loc) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getResourceBuffer(loc); } public InputStream getResourceStream(ImageLocation loc) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getResourceStream(loc); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java index 092b309b0b7..24ac9bfc18a 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java @@ -32,6 +32,7 @@ import java.nio.file.Paths; import java.util.concurrent.ConcurrentHashMap; import java.util.Map; import java.util.Objects; +import java.util.function.Function; /** * Factory to get ImageReader @@ -56,21 +57,23 @@ public class ImageReaderFactory { */ public static ImageReader get(Path jimage) throws IOException { Objects.requireNonNull(jimage); - ImageReader reader = readers.get(jimage); - if (reader != null) { - return reader; - } - reader = ImageReader.open(jimage); - // potential race with other threads opening the same URL - ImageReader r = readers.putIfAbsent(jimage, reader); - if (r == null) { - return reader; - } else { - reader.close(); - return r; + try { + return readers.computeIfAbsent(jimage, OPENER); + } catch (UncheckedIOException io) { + throw io.getCause(); } } + private static Function OPENER = new Function() { + public ImageReader apply(Path path) { + try { + return ImageReader.open(path); + } catch (IOException io) { + throw new UncheckedIOException(io); + } + } + }; + /** * Returns the {@code ImageReader} to read the image file in this * run-time image. diff --git a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageStringsReader.java b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageStringsReader.java index e4a11cbdc14..d9900aa231e 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageStringsReader.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageStringsReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -38,6 +38,8 @@ import java.util.Objects; */ public class ImageStringsReader implements ImageStrings { public static final int HASH_MULTIPLIER = 0x01000193; + public static final int POSITIVE_MASK = 0x7FFFFFFF; + private final BasicImageReader reader; ImageStringsReader(BasicImageReader reader) { @@ -54,40 +56,60 @@ public class ImageStringsReader implements ImageStrings { throw new InternalError("Can not add strings at runtime"); } - private static int hashCode(byte[] bytes, int offset, int count, int seed) { - Objects.requireNonNull(bytes); + public static int hashCode(String s) { + return hashCode(s, HASH_MULTIPLIER); + } - if (offset < 0 || count < 0 || offset > bytes.length - count) { - throw new IndexOutOfBoundsException("offset=" + offset + ", count=" + count); + public static int hashCode(String s, int seed) { + return unmaskedHashCode(s, seed) & POSITIVE_MASK; + } + + public static int hashCode(String module, String name) { + return hashCode(module, name, HASH_MULTIPLIER); + } + + public static int hashCode(String module, String name, int seed) { + seed = unmaskedHashCode("/", seed); + seed = unmaskedHashCode(module, seed); + seed = unmaskedHashCode("/", seed); + seed = unmaskedHashCode(name, seed); + return seed & POSITIVE_MASK; + } + + public static int unmaskedHashCode(String s, int seed) { + int slen = s.length(); + byte[] buffer = null; + + for (int i = 0; i < slen; i++) { + char ch = s.charAt(i); + int uch = ch & 0xFFFF; + + if ((uch & ~0x7F) != 0) { + if (buffer == null) { + buffer = new byte[8]; + } + int mask = ~0x3F; + int n = 0; + + do { + buffer[n++] = (byte)(0x80 | (uch & 0x3F)); + uch >>= 6; + mask >>= 1; + } while ((uch & mask) != 0); + + buffer[n] = (byte)((mask << 1) | uch); + + do { + seed = (seed * HASH_MULTIPLIER) ^ (buffer[n--] & 0xFF); + } while (0 <= n); + } else if (uch == 0) { + seed = (seed * HASH_MULTIPLIER) ^ (0xC0); + seed = (seed * HASH_MULTIPLIER) ^ (0x80); + } else { + seed = (seed * HASH_MULTIPLIER) ^ (uch); + } } - - int limit = offset + count; - - if (limit < 0 || limit > bytes.length) { - throw new IndexOutOfBoundsException("limit=" + limit); - } - - for (int i = offset; i < limit; i++) { - seed = (seed * HASH_MULTIPLIER) ^ (bytes[i] & 0xFF); - } - - return seed & 0x7FFFFFFF; - } - - public static int hashCode(byte[] bytes, int seed) { - return hashCode(bytes, 0, bytes.length, seed); - } - - public static int hashCode(byte[] bytes) { - return hashCode(bytes, 0, bytes.length, HASH_MULTIPLIER); - } - - public static int hashCode(String string, int seed) { - return hashCode(mutf8FromString(string), seed); - } - - public static int hashCode(String string) { - return hashCode(mutf8FromString(string), HASH_MULTIPLIER); + return seed; } static int charsFromMUTF8Length(byte[] bytes, int offset, int count) { @@ -179,7 +201,7 @@ public class ImageStringsReader implements ImageStrings { throw new InternalError("No terminating zero byte for modified UTF-8 byte sequence"); } - static void charsFromByteBuffer(char chars[], ByteBuffer buffer) { + static void charsFromByteBuffer(char[] chars, ByteBuffer buffer) { int j = 0; while(buffer.hasRemaining()) { @@ -228,10 +250,12 @@ public class ImageStringsReader implements ImageStrings { return new String(chars); } - static int mutf8FromCharsLength(char chars[]) { + static int mutf8FromStringLength(String s) { int length = 0; + int slen = s.length(); - for (char ch : chars) { + for (int i = 0; i < slen; i++) { + char ch = s.charAt(i); int uch = ch & 0xFFFF; if ((uch & ~0x7F) != 0) { @@ -255,14 +279,19 @@ public class ImageStringsReader implements ImageStrings { return length; } - static void mutf8FromChars(byte[] bytes, int offset, char chars[]) { + static void mutf8FromString(byte[] bytes, int offset, String s) { int j = offset; - byte[] buffer = new byte[8]; + byte[] buffer = null; + int slen = s.length(); - for (char ch : chars) { + for (int i = 0; i < slen; i++) { + char ch = s.charAt(i); int uch = ch & 0xFFFF; if ((uch & ~0x7F) != 0) { + if (buffer == null) { + buffer = new byte[8]; + } int mask = ~0x3F; int n = 0; @@ -287,10 +316,9 @@ public class ImageStringsReader implements ImageStrings { } public static byte[] mutf8FromString(String string) { - char[] chars = string.toCharArray(); - int length = mutf8FromCharsLength(chars); + int length = mutf8FromStringLength(string); byte[] bytes = new byte[length]; - mutf8FromChars(bytes, 0, chars); + mutf8FromString(bytes, 0, string); return bytes; } diff --git a/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java b/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java index 34e99dfdd9b..0a78e71ed56 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -59,7 +59,7 @@ public class JmodFile implements AutoCloseable { bis.read(magic); if (magic[0] != JMOD_MAGIC_NUMBER[0] || magic[1] != JMOD_MAGIC_NUMBER[1]) { - throw new IOException("Invalid jmod file: " + file.toString()); + throw new IOException("Invalid JMOD file: " + file.toString()); } if (magic[2] > JMOD_MAJOR_VERSION || (magic[2] == JMOD_MAJOR_VERSION && magic[3] > JMOD_MINOR_VERSION)) { @@ -78,7 +78,7 @@ public class JmodFile implements AutoCloseable { HEADER_FILES("include"), LEGAL_NOTICES("legal"), MAN_PAGES("man"), - NATIVE_LIBS("native"), + NATIVE_LIBS("lib"), NATIVE_CMDS("bin"); private final String jmodDir; @@ -130,6 +130,13 @@ public class JmodFile implements AutoCloseable { return name; } + /** + * Returns true if the entry is a directory in the JMOD file. + */ + public boolean isDirectory() { + return zipEntry.isDirectory(); + } + /** * Returns the size of this entry. */ @@ -191,7 +198,7 @@ public class JmodFile implements AutoCloseable { /** * Opens an {@code InputStream} for reading the named entry of the given - * section in this jmod file. + * section in this JMOD file. * * @throws IOException if the named entry is not found, or I/O error * occurs when reading it @@ -217,11 +224,10 @@ public class JmodFile implements AutoCloseable { } /** - * Returns a stream of non-directory entries in this jmod file. + * Returns a stream of entries in this JMOD file. */ public Stream stream() { return zipfile.stream() - .filter(e -> !e.isDirectory()) .map(Entry::new); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java b/jdk/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java index 49285b31dfb..d544e4c0deb 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, 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 @@ -106,6 +106,7 @@ class JrtFileSystem extends FileSystem { } @Override + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { try { cleanup(); diff --git a/jdk/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystemProvider.java b/jdk/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystemProvider.java index 4aed7a67285..12976035291 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystemProvider.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystemProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -65,14 +65,12 @@ public final class JrtFileSystemProvider extends FileSystemProvider { } /** - * Need FilePermission ${java.home}/-", "read" to create or get jrt:/ + * Need RuntimePermission "accessSystemModules" to create or get jrt:/ */ private void checkPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { - String home = SystemImage.RUNTIME_HOME; - FilePermission perm - = new FilePermission(home + File.separator + "-", "read"); + RuntimePermission perm = new RuntimePermission("accessSystemModules"); sm.checkPermission(perm); } } diff --git a/jdk/src/java.base/share/classes/jdk/internal/loader/BootLoader.java b/jdk/src/java.base/share/classes/jdk/internal/loader/BootLoader.java index 7885d8e180d..07b5173e726 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/loader/BootLoader.java +++ b/jdk/src/java.base/share/classes/jdk/internal/loader/BootLoader.java @@ -27,8 +27,6 @@ package jdk.internal.loader; import java.io.IOException; import java.io.InputStream; import java.lang.module.ModuleReference; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; @@ -62,8 +60,7 @@ public class BootLoader { private static final String JAVA_HOME = System.getProperty("java.home"); static { - UNNAMED_MODULE - = SharedSecrets.getJavaLangReflectModuleAccess().defineUnnamedModule(null); + UNNAMED_MODULE = SharedSecrets.getJavaLangAccess().defineUnnamedModule(null); setBootLoaderUnnamedModule0(UNNAMED_MODULE); } @@ -95,6 +92,14 @@ public class BootLoader { return CLASS_LOADER_VALUE_MAP; } + /** + * Returns {@code true} if there is a class path associated with the + * BootLoader. + */ + public static boolean hasClassPath() { + return ClassLoaders.bootLoader().hasClassPath(); + } + /** * Register a module with this class loader so that its classes (and * resources) become visible via this class loader. @@ -247,7 +252,7 @@ public class BootLoader { if (mn != null) { // named module from runtime image or exploded module - Optional om = Layer.boot().findModule(mn); + Optional om = ModuleLayer.boot().findModule(mn); if (!om.isPresent()) throw new InternalError(mn + " not in boot layer"); return om.get(); diff --git a/jdk/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java b/jdk/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java index ab052ec0b30..95b65f646d8 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java +++ b/jdk/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java @@ -49,16 +49,20 @@ import java.security.SecureClassLoader; import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; +import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.NoSuchElementException; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; import java.util.jar.Attributes; import java.util.jar.Manifest; import java.util.stream.Stream; -import jdk.internal.module.ModulePatcher.PatchedModuleReader; import jdk.internal.misc.VM; +import jdk.internal.module.ModulePatcher.PatchedModuleReader; +import jdk.internal.module.SystemModules; +import jdk.internal.module.Resources; /** @@ -135,7 +139,7 @@ public class BuiltinClassLoader // maps package name to loaded module for modules in the boot layer private static final Map packageToModule - = new ConcurrentHashMap<>(1024); + = new ConcurrentHashMap<>(SystemModules.PACKAGES_IN_BOOT_LAYER); // maps a module name to a module reference private final Map nameToModule; @@ -162,12 +166,18 @@ public class BuiltinClassLoader } /** - * Register a module this this class loader. This has the effect of making - * the types in the module visible. + * Returns {@code true} if there is a class path associated with this + * class loader. + */ + boolean hasClassPath() { + return ucp != null; + } + + /** + * Register a module this class loader. This has the effect of making the + * types in the module visible. */ public void loadModule(ModuleReference mref) { - assert !VM.isModuleSystemInited(); - String mn = mref.descriptor().name(); if (nameToModule.putIfAbsent(mn, mref) != null) { throw new InternalError(mn + " already defined to this loader"); @@ -181,6 +191,11 @@ public class BuiltinClassLoader + other.mref().descriptor().name()); } } + + // clear resources cache if VM is already initialized + if (VM.isModuleSystemInited() && resourceCache != null) { + resourceCache = null; + } } /** @@ -247,18 +262,24 @@ public class BuiltinClassLoader */ @Override public URL findResource(String name) { - String pn = ResourceHelper.getPackageName(name); + String pn = Resources.toPackageName(name); LoadedModule module = packageToModule.get(pn); if (module != null) { // resource is in a package of a module defined to this loader - if (module.loader() == this - && (name.endsWith(".class") || isOpen(module.mref(), pn))) { + if (module.loader() == this) { + URL url; try { - return findResource(module.name(), name); // checks URL + url = findResource(module.name(), name); // checks URL } catch (IOException ioe) { return null; } + if (url != null + && (name.endsWith(".class") + || url.toString().endsWith("/") + || isOpen(module.mref(), pn))) { + return url; + } } } else { @@ -292,15 +313,17 @@ public class BuiltinClassLoader public Enumeration findResources(String name) throws IOException { List checked = new ArrayList<>(); // list of checked URLs - String pn = ResourceHelper.getPackageName(name); + String pn = Resources.toPackageName(name); LoadedModule module = packageToModule.get(pn); if (module != null) { // resource is in a package of a module defined to this loader - if (module.loader() == this - && (name.endsWith(".class") || isOpen(module.mref(), pn))) { - URL url = findResource(module.name(), name); // checks URL - if (url != null) { + if (module.loader() == this) { + URL url = findResource(module.name(), name); // checks URL + if (url != null + && (name.endsWith(".class") + || url.toString().endsWith("/") + || isOpen(module.mref(), pn))) { checked.add(url); } } @@ -315,16 +338,43 @@ public class BuiltinClassLoader } } - // search class path + // class path (not checked) Enumeration e = findResourcesOnClassPath(name); - while (e.hasMoreElements()) { - URL url = checkURL(e.nextElement()); - if (url != null) { - checked.add(url); - } - } - return Collections.enumeration(checked); + // concat the checked URLs and the (not checked) class path + return new Enumeration<>() { + final Iterator iterator = checked.iterator(); + URL next; + private boolean hasNext() { + if (next != null) { + return true; + } else if (iterator.hasNext()) { + next = iterator.next(); + return true; + } else { + // need to check each URL + while (e.hasMoreElements() && next == null) { + next = checkURL(e.nextElement()); + } + return next != null; + } + } + @Override + public boolean hasMoreElements() { + return hasNext(); + } + @Override + public URL nextElement() { + if (hasNext()) { + URL result = next; + next = null; + return result; + } else { + throw new NoSuchElementException(); + } + } + }; + } /** @@ -337,7 +387,10 @@ public class BuiltinClassLoader private List findMiscResource(String name) throws IOException { SoftReference>> ref = this.resourceCache; Map> map = (ref != null) ? ref.get() : null; - if (map != null) { + if (map == null) { + map = new ConcurrentHashMap<>(); + this.resourceCache = new SoftReference<>(map); + } else { List urls = map.get(name); if (urls != null) return urls; @@ -350,34 +403,31 @@ public class BuiltinClassLoader new PrivilegedExceptionAction<>() { @Override public List run() throws IOException { - List result = new ArrayList<>(); + List result = null; for (ModuleReference mref : nameToModule.values()) { URI u = moduleReaderFor(mref).find(name).orElse(null); if (u != null) { try { + if (result == null) + result = new ArrayList<>(); result.add(u.toURL()); } catch (MalformedURLException | IllegalArgumentException e) { } } } - return result; + return (result != null) ? result : Collections.emptyList(); } }); } catch (PrivilegedActionException pae) { throw (IOException) pae.getCause(); } - // only cache resources after all modules have been defined + // only cache resources after VM is fully initialized if (VM.isModuleSystemInited()) { - if (map == null) { - map = new ConcurrentHashMap<>(); - this.resourceCache = new SoftReference<>(map); - } - if (urls.isEmpty()) - urls = Collections.emptyList(); map.putIfAbsent(name, urls); } + return urls; } @@ -424,7 +474,7 @@ public class BuiltinClassLoader * Returns a URL to a resource on the class path. */ private URL findResourceOnClassPath(String name) { - if (ucp != null) { + if (hasClassPath()) { if (System.getSecurityManager() == null) { return ucp.findResource(name, false); } else { @@ -441,7 +491,7 @@ public class BuiltinClassLoader * Returns the URLs of all resources of the given name on the class path. */ private Enumeration findResourcesOnClassPath(String name) { - if (ucp != null) { + if (hasClassPath()) { if (System.getSecurityManager() == null) { return ucp.findResources(name, false); } else { @@ -480,7 +530,7 @@ public class BuiltinClassLoader } else { // search class path - if (ucp != null) { + if (hasClassPath()) { c = findClassOnClassPathOrNull(cn); } @@ -513,7 +563,7 @@ public class BuiltinClassLoader } // search class path - if (ucp != null) { + if (hasClassPath()) { return findClassOnClassPathOrNull(cn); } @@ -568,7 +618,7 @@ public class BuiltinClassLoader } // check class path - if (c == null && ucp != null && VM.isModuleSystemInited()) { + if (c == null && hasClassPath() && VM.isModuleSystemInited()) { c = findClassOnClassPathOrNull(cn); } } @@ -922,13 +972,13 @@ public class BuiltinClassLoader * Returns the ModuleReader for the given module. */ private ModuleReader moduleReaderFor(ModuleReference mref) { - return moduleToReader.computeIfAbsent(mref, m -> createModuleReader(mref)); + return moduleToReader.computeIfAbsent(mref, BuiltinClassLoader::createModuleReader); } /** * Creates a ModuleReader for the given module. */ - private ModuleReader createModuleReader(ModuleReference mref) { + private static ModuleReader createModuleReader(ModuleReference mref) { try { return mref.open(); } catch (IOException e) { @@ -966,7 +1016,7 @@ public class BuiltinClassLoader */ private boolean isOpen(ModuleReference mref, String pn) { ModuleDescriptor descriptor = mref.descriptor(); - if (descriptor.isOpen()) + if (descriptor.isOpen() || descriptor.isAutomatic()) return true; for (ModuleDescriptor.Opens opens : descriptor.opens()) { String source = opens.source(); diff --git a/jdk/src/java.base/share/classes/jdk/internal/loader/ClassLoaders.java b/jdk/src/java.base/share/classes/jdk/internal/loader/ClassLoaders.java index 64492508dc0..d976aab1cd7 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/loader/ClassLoaders.java +++ b/jdk/src/java.base/share/classes/jdk/internal/loader/ClassLoaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -27,7 +27,6 @@ package jdk.internal.loader; import java.io.File; import java.io.IOException; -import java.lang.reflect.Module; import java.net.URL; import java.nio.file.InvalidPathException; import java.nio.file.Paths; @@ -257,7 +256,10 @@ public class ClassLoaders { */ private static URL toFileURL(String s) { try { - return Paths.get(s).toRealPath().toUri().toURL(); + // Use an intermediate File object to construct a URI/URL without + // authority component as URLClassPath can't handle URLs with a UNC + // server name in the authority component. + return Paths.get(s).toRealPath().toFile().toURI().toURL(); } catch (InvalidPathException | IOException ignore) { // malformed path string or class path element does not exist return null; diff --git a/jdk/src/java.base/share/classes/jdk/internal/loader/Loader.java b/jdk/src/java.base/share/classes/jdk/internal/loader/Loader.java index 04285cc4cf1..dc46f6630b0 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/loader/Loader.java +++ b/jdk/src/java.base/share/classes/jdk/internal/loader/Loader.java @@ -28,12 +28,12 @@ package jdk.internal.loader; import java.io.File; import java.io.FilePermission; import java.io.IOException; +import java.io.UncheckedIOException; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleReader; import java.lang.module.ModuleReference; import java.lang.module.ResolvedModule; -import java.lang.reflect.Layer; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; @@ -53,13 +53,20 @@ import java.util.Collection; import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; +import java.util.Spliterator; +import java.util.Spliterators; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Supplier; import java.util.stream.Stream; +import java.util.stream.StreamSupport; import jdk.internal.misc.SharedSecrets; +import jdk.internal.module.Resources; /** @@ -79,8 +86,8 @@ import jdk.internal.misc.SharedSecrets; * loader. This allows automatic modules (for example) to link to types in the * unnamed module of the parent class loader. * - * @see Layer#defineModulesWithOneLoader - * @see Layer#defineModulesWithManyLoaders + * @see ModuleLayer#defineModulesWithOneLoader + * @see ModuleLayer#defineModulesWithManyLoaders */ public final class Loader extends SecureClassLoader { @@ -206,10 +213,10 @@ public final class Loader extends SecureClassLoader { * @param cf the Configuration containing at least modules to be defined to * this class loader * - * @param parentLayers the parent Layers + * @param parentModuleLayers the parent ModuleLayers */ public Loader initRemotePackageMap(Configuration cf, - List parentLayers) + List parentModuleLayers) { for (String name : nameToModule.keySet()) { ResolvedModule resolvedModule = cf.findModule(name).get(); @@ -235,8 +242,8 @@ public final class Loader extends SecureClassLoader { } else { // find the layer for the target module - Layer layer = parentLayers.stream() - .map(parent -> findLayer(parent, other.configuration())) + ModuleLayer layer = parentModuleLayers.stream() + .map(parent -> findModuleLayer(parent, other.configuration())) .flatMap(Optional::stream) .findAny() .orElseThrow(() -> @@ -285,8 +292,8 @@ public final class Loader extends SecureClassLoader { * Find the layer corresponding to the given configuration in the tree * of layers rooted at the given parent. */ - private Optional findLayer(Layer parent, Configuration cf) { - return SharedSecrets.getJavaLangReflectModuleAccess().layers(parent) + private Optional findModuleLayer(ModuleLayer parent, Configuration cf) { + return SharedSecrets.getJavaLangAccess().layers(parent) .filter(l -> l.configuration() == cf) .findAny(); } @@ -303,7 +310,6 @@ public final class Loader extends SecureClassLoader { // -- resources -- - /** * Returns a URL to a resource of the given name in a module defined to * this class loader. @@ -356,58 +362,128 @@ public final class Loader extends SecureClassLoader { @Override public URL findResource(String name) { - URL url = null; - String pn = ResourceHelper.getPackageName(name); + String pn = Resources.toPackageName(name); LoadedModule module = localPackageToModule.get(pn); - if (module != null) { - if (name.endsWith(".class") || isOpen(module.mref(), pn)) { - try { - url = findResource(module.name(), name); - } catch (IOException ioe) { - // ignore - } - } - } else { - for (ModuleReference mref : nameToModule.values()) { - try { - url = findResource(mref.descriptor().name(), name); - if (url != null) - break; - } catch (IOException ioe) { - // ignore - } - } - } - return url; - } - @Override - public Enumeration findResources(String name) throws IOException { - List urls = new ArrayList<>(); - String pn = ResourceHelper.getPackageName(name); - LoadedModule module = localPackageToModule.get(pn); if (module != null) { - if (name.endsWith(".class") || isOpen(module.mref(), pn)) { - try { - URL url = findResource(module.name(), name); - if (url != null) - urls.add(url); - } catch (IOException ioe) { - // ignore + try { + URL url = findResource(module.name(), name); + if (url != null + && (name.endsWith(".class") + || url.toString().endsWith("/") + || isOpen(module.mref(), pn))) { + return url; } + } catch (IOException ioe) { + // ignore } + } else { for (ModuleReference mref : nameToModule.values()) { try { URL url = findResource(mref.descriptor().name(), name); - if (url != null) - urls.add(url); + if (url != null) return url; } catch (IOException ioe) { // ignore } } } - return Collections.enumeration(urls); + + return null; + } + + @Override + public Enumeration findResources(String name) throws IOException { + return Collections.enumeration(findResourcesAsList(name)); + } + + @Override + public URL getResource(String name) { + Objects.requireNonNull(name); + + // this loader + URL url = findResource(name); + if (url != null) { + return url; + } else { + // parent loader + return parent.getResource(name); + } + } + + @Override + public Enumeration getResources(String name) throws IOException { + Objects.requireNonNull(name); + + // this loader + List urls = findResourcesAsList(name); + + // parent loader + Enumeration e = parent.getResources(name); + + // concat the URLs with the URLs returned by the parent + return new Enumeration<>() { + final Iterator iterator = urls.iterator(); + @Override + public boolean hasMoreElements() { + return (iterator.hasNext() || e.hasMoreElements()); + } + @Override + public URL nextElement() { + if (iterator.hasNext()) { + return iterator.next(); + } else { + return e.nextElement(); + } + } + }; + } + + @Override + public Stream resources(String name) { + Objects.requireNonNull(name); + // ordering not specified + int characteristics = (Spliterator.NONNULL | Spliterator.IMMUTABLE | + Spliterator.SIZED | Spliterator.SUBSIZED); + Supplier> supplier = () -> { + try { + List urls = findResourcesAsList(name); + return Spliterators.spliterator(urls, characteristics); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + }; + Stream s1 = StreamSupport.stream(supplier, characteristics, false); + Stream s2 = parent.resources(name); + return Stream.concat(s1, s2); + } + + /** + * Finds the resources with the given name in this class loader. + */ + private List findResourcesAsList(String name) throws IOException { + String pn = Resources.toPackageName(name); + LoadedModule module = localPackageToModule.get(pn); + if (module != null) { + URL url = findResource(module.name(), name); + if (url != null + && (name.endsWith(".class") + || url.toString().endsWith("/") + || isOpen(module.mref(), pn))) { + return List.of(url); + } else { + return Collections.emptyList(); + } + } else { + List urls = new ArrayList<>(); + for (ModuleReference mref : nameToModule.values()) { + URL url = findResource(mref.descriptor().name(), name); + if (url != null) { + urls.add(url); + } + } + return urls; + } } @@ -643,7 +719,7 @@ public final class Loader extends SecureClassLoader { */ private boolean isOpen(ModuleReference mref, String pn) { ModuleDescriptor descriptor = mref.descriptor(); - if (descriptor.isOpen()) + if (descriptor.isOpen() || descriptor.isAutomatic()) return true; for (ModuleDescriptor.Opens opens : descriptor.opens()) { String source = opens.source(); diff --git a/jdk/src/java.base/share/classes/jdk/internal/loader/LoaderPool.java b/jdk/src/java.base/share/classes/jdk/internal/loader/LoaderPool.java index 14b088c14a9..a16f2447947 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/loader/LoaderPool.java +++ b/jdk/src/java.base/share/classes/jdk/internal/loader/LoaderPool.java @@ -27,7 +27,6 @@ package jdk.internal.loader; import java.lang.module.Configuration; import java.lang.module.ResolvedModule; -import java.lang.reflect.Layer; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -36,7 +35,7 @@ import java.util.stream.Stream; /** * A pool of class loaders. * - * @see Layer#defineModulesWithManyLoaders + * @see ModuleLayer#defineModulesWithManyLoaders */ public final class LoaderPool { @@ -51,7 +50,7 @@ public final class LoaderPool { * created with the given parent class loader as its parent. */ public LoaderPool(Configuration cf, - List parentLayers, + List parentLayers, ClassLoader parentLoader) { Map loaders = new HashMap<>(); diff --git a/jdk/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java b/jdk/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java index d67c342fb0a..d343f8fdcbe 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java +++ b/jdk/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -65,6 +65,8 @@ import java.util.jar.Attributes; import java.util.jar.Attributes.Name; import java.util.zip.ZipFile; +import jdk.internal.misc.JavaNetURLAccess; +import jdk.internal.misc.JavaNetURLClassLoaderAccess; import jdk.internal.misc.JavaUtilZipFileAccess; import jdk.internal.misc.SharedSecrets; import jdk.internal.util.jar.InvalidJarIndexError; @@ -346,7 +348,7 @@ public class URLClassPath { * path. The URLs are opened and expanded as needed. Returns null * if the specified index is out of range. */ - private synchronized Loader getLoader(int index) { + private synchronized Loader getLoader(int index) { if (closed) { return null; } @@ -404,31 +406,40 @@ public class URLClassPath { private Loader getLoader(final URL url) throws IOException { try { return java.security.AccessController.doPrivileged( - new java.security.PrivilegedExceptionAction<>() { - public Loader run() throws IOException { - String protocol = url.getProtocol(); // lower cased in URL - String file = url.getFile(); - if ("jar".equals(protocol) - && file != null && (file.indexOf("!/") == file.length() - 2)) { - // extract the nested URL - URL nestedUrl = new URL(file.substring(0, file.length() - 2)); - return new JarLoader(nestedUrl, jarHandler, lmap, acc); - } else if (file != null && file.endsWith("/")) { - if ("file".equals(protocol)) { - return new FileLoader(url); - } else { - return new Loader(url); + new java.security.PrivilegedExceptionAction<>() { + public Loader run() throws IOException { + String protocol = url.getProtocol(); // lower cased in URL + String file = url.getFile(); + if (file != null && file.endsWith("/")) { + if ("file".equals(protocol)) { + return new FileLoader(url); + } else if ("jar".equals(protocol) && + isDefaultJarHandler(url) && + file.endsWith("!/")) { + // extract the nested URL + URL nestedUrl = new URL(file.substring(0, file.length() - 2)); + return new JarLoader(nestedUrl, jarHandler, lmap, acc); + } else { + return new Loader(url); + } + } else { + return new JarLoader(url, jarHandler, lmap, acc); + } } - } else { - return new JarLoader(url, jarHandler, lmap, acc); - } - } - }, acc); + }, acc); } catch (java.security.PrivilegedActionException pae) { throw (IOException)pae.getException(); } } + private static final JavaNetURLAccess JNUA + = SharedSecrets.getJavaNetURLAccess(); + + private static boolean isDefaultJarHandler(URL u) { + URLStreamHandler h = JNUA.getHandler(u); + return h instanceof sun.net.www.protocol.jar.Handler; + } + /* * Pushes the specified URLs onto the list of unopened URLs. */ @@ -493,7 +504,7 @@ public class URLClassPath { } /** - * Inner class used to represent a loader of resources and classes + * Nested class used to represent a loader of resources and classes * from a base URL. */ private static class Loader implements Closeable { @@ -600,7 +611,8 @@ public class URLClassPath { * close this loader and release all resources * method overridden in sub-classes */ - public void close () throws IOException { + @Override + public void close() throws IOException { if (jarfile != null) { jarfile.close(); } @@ -615,7 +627,7 @@ public class URLClassPath { } /* - * Inner class used to represent a Loader of resources from a JAR URL. + * Nested class class used to represent a Loader of resources from a JAR URL. */ static class JarLoader extends Loader { private JarFile jar; @@ -798,7 +810,7 @@ public class URLClassPath { /* - * Returns true iff atleast one resource in the jar file has the same + * Returns true iff at least one resource in the jar file has the same * package name as that of the specified resource name. */ boolean validIndex(final String name) { @@ -826,6 +838,7 @@ public class URLClassPath { /* * Returns the URL for a resource with the specified name */ + @Override URL findResource(final String name, boolean check) { Resource rsc = getResource(name, check); if (rsc != null) { @@ -837,6 +850,7 @@ public class URLClassPath { /* * Returns the JAR Resource for the specified name. */ + @Override Resource getResource(final String name, boolean check) { try { ensureOpen(); @@ -863,7 +877,6 @@ public class URLClassPath { */ Resource getResource(final String name, boolean check, Set visited) { - Resource res; String[] jarFiles; int count = 0; @@ -919,7 +932,6 @@ public class URLClassPath { continue; } - /* Note that the addition of the url to the list of visited * jars incorporates a check for presence in the hashmap */ @@ -975,6 +987,7 @@ public class URLClassPath { /* * Returns the JAR file local class path, or null if none. */ + @Override URL[] getClassPath() throws IOException { if (index != null) { return null; @@ -1002,7 +1015,7 @@ public class URLClassPath { * Parses value of the Class-Path manifest attribute and returns * an array of URLs relative to the specified base URL. */ - private URL[] parseClassPath(URL base, String value) + private static URL[] parseClassPath(URL base, String value) throws MalformedURLException { StringTokenizer st = new StringTokenizer(value); @@ -1018,7 +1031,7 @@ public class URLClassPath { } /* - * Inner class used to represent a loader of classes and resources + * Nested class used to represent a loader of classes and resources * from a file URL that refers to a directory. */ private static class FileLoader extends Loader { @@ -1038,6 +1051,7 @@ public class URLClassPath { /* * Returns the URL for a resource with the specified name */ + @Override URL findResource(final String name, boolean check) { Resource rsc = getResource(name, check); if (rsc != null) { @@ -1046,6 +1060,7 @@ public class URLClassPath { return null; } + @Override Resource getResource(final String name, boolean check) { final URL url; try { diff --git a/jdk/src/java.base/share/classes/jdk/internal/logger/DefaultLoggerFinder.java b/jdk/src/java.base/share/classes/jdk/internal/logger/DefaultLoggerFinder.java index 397ddba5432..5ffd8fd7af4 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/logger/DefaultLoggerFinder.java +++ b/jdk/src/java.base/share/classes/jdk/internal/logger/DefaultLoggerFinder.java @@ -30,10 +30,10 @@ import java.lang.ref.WeakReference; import java.util.HashMap; import java.util.Map; import java.util.function.Function; +import java.util.Objects; import java.lang.System.LoggerFinder; import java.lang.System.Logger; import java.lang.ref.ReferenceQueue; -import java.lang.reflect.Module; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Collection; @@ -155,6 +155,8 @@ public class DefaultLoggerFinder extends LoggerFinder { @Override public final Logger getLogger(String name, Module module) { + Objects.requireNonNull(name, "name"); + Objects.requireNonNull(module, "module"); checkPermission(); return demandLoggerFor(name, module); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/logger/LazyLoggers.java b/jdk/src/java.base/share/classes/jdk/internal/logger/LazyLoggers.java index 6c65426ca8e..c266caac684 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/logger/LazyLoggers.java +++ b/jdk/src/java.base/share/classes/jdk/internal/logger/LazyLoggers.java @@ -31,7 +31,6 @@ import java.util.function.BiFunction; import java.lang.System.LoggerFinder; import java.lang.System.Logger; import java.lang.ref.WeakReference; -import java.lang.reflect.Module; import java.util.Objects; import jdk.internal.misc.VM; import sun.util.logging.PlatformLogger; @@ -402,10 +401,10 @@ public final class LazyLoggers { * @param module The module on behalf of which the logger is created. * If the module is not loaded from the Boot ClassLoader, * the LoggerFinder is accessed and the logger returned - * by {@link LoggerFinder#getLogger(java.lang.String, java.lang.reflect.Module)} + * by {@link LoggerFinder#getLogger(java.lang.String, java.lang.Module)} * is returned to the caller directly. * Otherwise, the logger returned by - * {@link #getLazyLogger(java.lang.String, java.lang.reflect.Module)} + * {@link #getLazyLogger(java.lang.String, java.lang.Module)} * is returned to the caller. * * @return a (possibly lazy) Logger instance. diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java index 6838111c35d..ab92b03c856 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -25,18 +25,20 @@ package jdk.internal.misc; -import java.io.IOException; import java.lang.annotation.Annotation; +import java.lang.module.ModuleDescriptor; import java.lang.reflect.Executable; -import java.lang.reflect.Layer; import java.lang.reflect.Method; -import java.lang.reflect.Module; -import java.net.URL; +import java.net.URI; import java.security.AccessControlContext; +import java.security.ProtectionDomain; +import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Stream; +import jdk.internal.module.ServicesCatalog; import jdk.internal.reflect.ConstantPool; import sun.reflect.annotation.AnnotationType; import sun.nio.ch.Interruptible; @@ -44,13 +46,15 @@ import sun.nio.ch.Interruptible; public interface JavaLangAccess { /** - * Returns a {@code Method} object that reflects the specified public - * member method of the given class. Returns {@code null} if the - * method is not defined. + * Returns the list of {@code Method} objects for the declared public + * methods of this class or interface that have the specified method name + * and parameter types. */ - Method getMethodOrNull(Class klass, String name, Class... parameterTypes); + List getDeclaredPublicMethods(Class klass, String name, Class... parameterTypes); - /** Return the constant pool for a class. */ + /** + * Return the constant pool for a class. + */ ConstantPool getConstantPool(Class klass); /** @@ -95,7 +99,9 @@ public interface JavaLangAccess { */ > E[] getEnumConstantsShared(Class klass); - /** Set thread's blocker field. */ + /** + * Set thread's blocker field. + */ void blockedOn(Thread t, Interruptible b); /** @@ -138,33 +144,22 @@ public interface JavaLangAccess { */ void invokeFinalize(Object o) throws Throwable; - /** - * Returns the boot Layer - */ - Layer getBootLayer(); - /** * Returns the ConcurrentHashMap used as a storage for ClassLoaderValue(s) * associated with the given class loader, creating it if it doesn't already exist. */ ConcurrentHashMap createOrGetClassLoaderValueMap(ClassLoader cl); + /** + * Defines a class with the given name to a class loader. + */ + Class defineClass(ClassLoader cl, String name, byte[] b, ProtectionDomain pd, String source); + /** * Returns a class loaded by the bootstrap class loader. */ Class findBootstrapClassOrNull(ClassLoader cl, String name); - /** - * Returns a URL to a resource with the given name in a module that is - * defined to the given class loader. - */ - URL findResource(ClassLoader cl, String moduleName, String name) throws IOException; - - /** - * Returns the Packages for the given class loader. - */ - Stream packages(ClassLoader cl); - /** * Define a Package of the given name and module by the given class loader. */ @@ -174,4 +169,99 @@ public interface JavaLangAccess { * Invokes Long.fastUUID */ String fastUUID(long lsb, long msb); + + /** + * Record the non-exported packages of the modules in the given layer + */ + void addNonExportedPackages(ModuleLayer layer); + + /** + * Invalidate package access cache + */ + void invalidatePackageAccessCache(); + + /** + * Defines a new module to the Java virtual machine. The module + * is defined to the given class loader. + * + * The URI is for information purposes only, it can be {@code null}. + */ + Module defineModule(ClassLoader loader, ModuleDescriptor descriptor, URI uri); + + /** + * Defines the unnamed module for the given class loader. + */ + Module defineUnnamedModule(ClassLoader loader); + + /** + * Updates the readability so that module m1 reads m2. The new read edge + * does not result in a strong reference to m2 (m2 can be GC'ed). + * + * This method is the same as m1.addReads(m2) but without a permission check. + */ + void addReads(Module m1, Module m2); + + /** + * Updates module m to read all unnamed modules. + */ + void addReadsAllUnnamed(Module m); + + /** + * Updates module m1 to export a package to module m2. The export does + * not result in a strong reference to m2 (m2 can be GC'ed). + */ + void addExports(Module m1, String pkg, Module m2); + + /** + * Updates a module m to export a package to all unnamed modules. + */ + void addExportsToAllUnnamed(Module m, String pkg); + + /** + * Updates module m1 to open a package to module m2. Opening the + * package does not result in a strong reference to m2 (m2 can be GC'ed). + */ + void addOpens(Module m1, String pkg, Module m2); + + /** + * Updates module m to open a package to all unnamed modules. + */ + void addOpensToAllUnnamed(Module m, String pkg); + + /** + * Updates module m to open all packages returned by the given iterator. + */ + void addOpensToAllUnnamed(Module m, Iterator packages); + + /** + * Updates module m to use a service. + */ + void addUses(Module m, Class service); + + /** + * Returns true if module m reflectively exports a package to other + */ + boolean isReflectivelyExported(Module module, String pn, Module other); + + /** + * Returns true if module m reflectively opens a package to other + */ + boolean isReflectivelyOpened(Module module, String pn, Module other); + + /** + * Returns the ServicesCatalog for the given Layer. + */ + ServicesCatalog getServicesCatalog(ModuleLayer layer); + + /** + * Returns an ordered stream of layers. The first element is is the + * given layer, the remaining elements are its parents, in DFS order. + */ + Stream layers(ModuleLayer layer); + + /** + * Returns a stream of the layers that have modules defined to the + * given class loader. + */ + Stream layers(ClassLoader loader); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java index eed7a2d2aff..9ad1d5cf0ef 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -59,20 +59,21 @@ public interface JavaLangModuleAccess { */ ModuleDescriptor.Builder newModuleBuilder(String mn, boolean strict, - boolean open, - boolean synthetic); + Set ms); /** - * Returns the set of packages that are exported (unconditionally or - * unconditionally). + * Returns a snapshot of the packages in the module. */ - Set exportedPackages(ModuleDescriptor.Builder builder); + Set packages(ModuleDescriptor.Builder builder); /** - * Returns the set of packages that are opened (unconditionally or - * unconditionally). + * Adds a dependence on a module with the given (possibly un-parsable) + * version string. */ - Set openPackages(ModuleDescriptor.Builder builder); + void requires(ModuleDescriptor.Builder builder, + Set ms, + String mn, + String rawCompiledVersion); /** * Returns a {@code ModuleDescriptor.Requires} of the given modifiers @@ -113,24 +114,12 @@ public interface JavaLangModuleAccess { */ Provides newProvides(String service, List providers); - /** - * Returns a {@code ModuleDescriptor.Version} of the given version. - */ - Version newVersion(String v); - - /** - * Clones the given module descriptor with an augmented set of packages - */ - ModuleDescriptor newModuleDescriptor(ModuleDescriptor md, Set pkgs); - /** * Returns a new {@code ModuleDescriptor} instance. */ ModuleDescriptor newModuleDescriptor(String name, Version version, - boolean open, - boolean automatic, - boolean synthetic, + Set ms, Set requires, Set exports, Set opens, @@ -138,9 +127,6 @@ public interface JavaLangModuleAccess { Set provides, Set packages, String mainClass, - String osName, - String osArch, - String osVersion, int hashCode); /** @@ -148,9 +134,9 @@ public interface JavaLangModuleAccess { * and the empty configuration as the parent. The post resolution * checks are optionally run. */ - Configuration resolveRequiresAndUses(ModuleFinder finder, - Collection roots, - boolean check, - PrintStream traceOutput); + Configuration resolveAndBind(ModuleFinder finder, + Collection roots, + boolean check, + PrintStream traceOutput); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangReflectModuleAccess.java b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangReflectModuleAccess.java deleted file mode 100644 index 7bf6a1f3977..00000000000 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangReflectModuleAccess.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2014, 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. - */ - -package jdk.internal.misc; - -import java.lang.module.ModuleDescriptor; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; -import java.net.URI; -import java.util.stream.Stream; - -import jdk.internal.module.ServicesCatalog; - -/** - * Provides access to non-public methods in java.lang.reflect.Module - */ - -public interface JavaLangReflectModuleAccess { - - /** - * Defines the unnamed module for the given class loader. - */ - Module defineUnnamedModule(ClassLoader loader); - - /** - * Defines a new module to the Java virtual machine. The module - * is defined to the given class loader. - * - * The URI is for information purposes only, it can be {@code null}. - */ - Module defineModule(ClassLoader loader, ModuleDescriptor descriptor, URI uri); - - /** - * Updates the readability so that module m1 reads m2. The new read edge - * does not result in a strong reference to m2 (m2 can be GC'ed). - * - * This method is the same as m1.addReads(m2) but without a permission check. - */ - void addReads(Module m1, Module m2); - - /** - * Updates module m to read all unnamed modules. - */ - void addReadsAllUnnamed(Module m); - - /** - * Updates module m1 to export a package to module m2. The export does - * not result in a strong reference to m2 (m2 can be GC'ed). - */ - void addExports(Module m1, String pkg, Module m2); - - /** - * Updates module m1 to open a package to module m2. Opening the - * package does not result in a strong reference to m2 (m2 can be GC'ed). - */ - void addOpens(Module m1, String pkg, Module m2); - - /** - * Updates a module m to export a package to all modules. - */ - void addExportsToAll(Module m, String pkg); - - /** - * Updates a module m to open a package to all modules. - */ - void addOpensToAll(Module m, String pkg); - - /** - * Updates a module m to export a package to all unnamed modules. - */ - void addExportsToAllUnnamed(Module m, String pkg); - - /** - * Updates a module m to open a package to all unnamed modules. - */ - void addOpensToAllUnnamed(Module m, String pkg); - - /** - * Updates a module m to use a service. - */ - void addUses(Module m, Class service); - - /** - * Add a package to the given module. - */ - void addPackage(Module m, String pkg); - - /** - * Returns the ServicesCatalog for the given Layer. - */ - ServicesCatalog getServicesCatalog(Layer layer); - - /** - * Returns an ordered stream of layers. The first element is is the - * given layer, the remaining elements are its parents, in DFS order. - */ - Stream layers(Layer layer); - - /** - * Returns a stream of the layers that have modules defined to the - * given class loader. - */ - Stream layers(ClassLoader loader); - - /** - * Tests if a module exports a package at least {@code other} via its - * module declaration. - * - * @apiNote This is a temporary method for debugging features. - */ - boolean isStaticallyExported(Module module, String pn, Module other); -} \ No newline at end of file diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetURLAccess.java b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetURLAccess.java new file mode 100644 index 00000000000..37e8fd3216c --- /dev/null +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetURLAccess.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package jdk.internal.misc; + +import java.net.URL; +import java.net.URLStreamHandler; + +public interface JavaNetURLAccess { + URLStreamHandler getHandler(URL u); +} diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaUtilResourceBundleAccess.java b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaUtilResourceBundleAccess.java index b137c3d48c4..c0eb99d7dbf 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaUtilResourceBundleAccess.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaUtilResourceBundleAccess.java @@ -25,7 +25,6 @@ package jdk.internal.misc; -import java.lang.reflect.Module; import java.util.Locale; import java.util.ResourceBundle; diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java index 36514cb1065..cd54d422c21 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java @@ -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 @@ -50,7 +50,6 @@ public class SharedSecrets { private static JavaUtilJarAccess javaUtilJarAccess; private static JavaLangAccess javaLangAccess; private static JavaLangModuleAccess javaLangModuleAccess; - private static JavaLangReflectModuleAccess javaLangReflectModuleAccess; private static JavaLangInvokeAccess javaLangInvokeAccess; private static JavaLangRefAccess javaLangRefAccess; private static JavaIOAccess javaIOAccess; @@ -58,6 +57,7 @@ public class SharedSecrets { private static JavaNetHttpCookieAccess javaNetHttpCookieAccess; private static JavaNetSocketAccess javaNetSocketAccess; private static JavaNetUriAccess javaNetUriAccess; + private static JavaNetURLAccess javaNetURLAccess; private static JavaNetURLClassLoaderAccess javaNetURLClassLoaderAccess; private static JavaNioAccess javaNioAccess; private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess; @@ -118,16 +118,6 @@ public class SharedSecrets { return javaLangModuleAccess; } - public static void setJavaLangReflectModuleAccess(JavaLangReflectModuleAccess jlrma) { - javaLangReflectModuleAccess = jlrma; - } - - public static JavaLangReflectModuleAccess getJavaLangReflectModuleAccess() { - if (javaLangReflectModuleAccess == null) - unsafe.ensureClassInitialized(java.lang.reflect.Module.class); - return javaLangReflectModuleAccess; - } - public static void setJavaLangRefAccess(JavaLangRefAccess jlra) { javaLangRefAccess = jlra; } @@ -146,6 +136,16 @@ public class SharedSecrets { return javaNetUriAccess; } + public static void setJavaNetURLAccess(JavaNetURLAccess jnua) { + javaNetURLAccess = jnua; + } + + public static JavaNetURLAccess getJavaNetURLAccess() { + if (javaNetURLAccess == null) + unsafe.ensureClassInitialized(java.net.URL.class); + return javaNetURLAccess; + } + public static void setJavaNetURLClassLoaderAccess(JavaNetURLClassLoaderAccess jnua) { javaNetURLClassLoaderAccess = jnua; } diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java b/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java index f4de0ea0c47..f9d7e3e22b0 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -1278,55 +1278,55 @@ public final class Unsafe { * @return {@code true} if successful */ @HotSpotIntrinsicCandidate - public final native boolean compareAndSwapObject(Object o, long offset, - Object expected, - Object x); + public final native boolean compareAndSetObject(Object o, long offset, + Object expected, + Object x); @HotSpotIntrinsicCandidate - public final native Object compareAndExchangeObjectVolatile(Object o, long offset, - Object expected, - Object x); + public final native Object compareAndExchangeObject(Object o, long offset, + Object expected, + Object x); @HotSpotIntrinsicCandidate public final Object compareAndExchangeObjectAcquire(Object o, long offset, Object expected, Object x) { - return compareAndExchangeObjectVolatile(o, offset, expected, x); + return compareAndExchangeObject(o, offset, expected, x); } @HotSpotIntrinsicCandidate public final Object compareAndExchangeObjectRelease(Object o, long offset, Object expected, Object x) { - return compareAndExchangeObjectVolatile(o, offset, expected, x); + return compareAndExchangeObject(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapObject(Object o, long offset, - Object expected, - Object x) { - return compareAndSwapObject(o, offset, expected, x); + public final boolean weakCompareAndSetObjectPlain(Object o, long offset, + Object expected, + Object x) { + return compareAndSetObject(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapObjectAcquire(Object o, long offset, - Object expected, - Object x) { - return compareAndSwapObject(o, offset, expected, x); + public final boolean weakCompareAndSetObjectAcquire(Object o, long offset, + Object expected, + Object x) { + return compareAndSetObject(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapObjectRelease(Object o, long offset, - Object expected, - Object x) { - return compareAndSwapObject(o, offset, expected, x); + public final boolean weakCompareAndSetObjectRelease(Object o, long offset, + Object expected, + Object x) { + return compareAndSetObject(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapObjectVolatile(Object o, long offset, - Object expected, - Object x) { - return compareAndSwapObject(o, offset, expected, x); + public final boolean weakCompareAndSetObject(Object o, long offset, + Object expected, + Object x) { + return compareAndSetObject(o, offset, expected, x); } /** @@ -1339,61 +1339,61 @@ public final class Unsafe { * @return {@code true} if successful */ @HotSpotIntrinsicCandidate - public final native boolean compareAndSwapInt(Object o, long offset, - int expected, - int x); + public final native boolean compareAndSetInt(Object o, long offset, + int expected, + int x); @HotSpotIntrinsicCandidate - public final native int compareAndExchangeIntVolatile(Object o, long offset, - int expected, - int x); + public final native int compareAndExchangeInt(Object o, long offset, + int expected, + int x); @HotSpotIntrinsicCandidate public final int compareAndExchangeIntAcquire(Object o, long offset, int expected, int x) { - return compareAndExchangeIntVolatile(o, offset, expected, x); + return compareAndExchangeInt(o, offset, expected, x); } @HotSpotIntrinsicCandidate public final int compareAndExchangeIntRelease(Object o, long offset, int expected, int x) { - return compareAndExchangeIntVolatile(o, offset, expected, x); + return compareAndExchangeInt(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapInt(Object o, long offset, - int expected, - int x) { - return compareAndSwapInt(o, offset, expected, x); + public final boolean weakCompareAndSetIntPlain(Object o, long offset, + int expected, + int x) { + return compareAndSetInt(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapIntAcquire(Object o, long offset, - int expected, - int x) { - return compareAndSwapInt(o, offset, expected, x); + public final boolean weakCompareAndSetIntAcquire(Object o, long offset, + int expected, + int x) { + return compareAndSetInt(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapIntRelease(Object o, long offset, - int expected, - int x) { - return compareAndSwapInt(o, offset, expected, x); + public final boolean weakCompareAndSetIntRelease(Object o, long offset, + int expected, + int x) { + return compareAndSetInt(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapIntVolatile(Object o, long offset, - int expected, - int x) { - return compareAndSwapInt(o, offset, expected, x); + public final boolean weakCompareAndSetInt(Object o, long offset, + int expected, + int x) { + return compareAndSetInt(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final byte compareAndExchangeByteVolatile(Object o, long offset, - byte expected, - byte x) { + public final byte compareAndExchangeByte(Object o, long offset, + byte expected, + byte x) { long wordOffset = offset & ~3; int shift = (int) (offset & 3) << 3; if (BE) { @@ -1407,64 +1407,64 @@ public final class Unsafe { fullWord = getIntVolatile(o, wordOffset); if ((fullWord & mask) != maskedExpected) return (byte) ((fullWord & mask) >> shift); - } while (!weakCompareAndSwapIntVolatile(o, wordOffset, + } while (!weakCompareAndSetInt(o, wordOffset, fullWord, (fullWord & ~mask) | maskedX)); return expected; } @HotSpotIntrinsicCandidate - public final boolean compareAndSwapByte(Object o, long offset, - byte expected, - byte x) { - return compareAndExchangeByteVolatile(o, offset, expected, x) == expected; + public final boolean compareAndSetByte(Object o, long offset, + byte expected, + byte x) { + return compareAndExchangeByte(o, offset, expected, x) == expected; } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapByteVolatile(Object o, long offset, - byte expected, - byte x) { - return compareAndSwapByte(o, offset, expected, x); + public final boolean weakCompareAndSetByte(Object o, long offset, + byte expected, + byte x) { + return compareAndSetByte(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapByteAcquire(Object o, long offset, - byte expected, - byte x) { - return weakCompareAndSwapByteVolatile(o, offset, expected, x); + public final boolean weakCompareAndSetByteAcquire(Object o, long offset, + byte expected, + byte x) { + return weakCompareAndSetByte(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapByteRelease(Object o, long offset, - byte expected, - byte x) { - return weakCompareAndSwapByteVolatile(o, offset, expected, x); + public final boolean weakCompareAndSetByteRelease(Object o, long offset, + byte expected, + byte x) { + return weakCompareAndSetByte(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapByte(Object o, long offset, - byte expected, - byte x) { - return weakCompareAndSwapByteVolatile(o, offset, expected, x); + public final boolean weakCompareAndSetBytePlain(Object o, long offset, + byte expected, + byte x) { + return weakCompareAndSetByte(o, offset, expected, x); } @HotSpotIntrinsicCandidate public final byte compareAndExchangeByteAcquire(Object o, long offset, byte expected, byte x) { - return compareAndExchangeByteVolatile(o, offset, expected, x); + return compareAndExchangeByte(o, offset, expected, x); } @HotSpotIntrinsicCandidate public final byte compareAndExchangeByteRelease(Object o, long offset, byte expected, byte x) { - return compareAndExchangeByteVolatile(o, offset, expected, x); + return compareAndExchangeByte(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final short compareAndExchangeShortVolatile(Object o, long offset, - short expected, - short x) { + public final short compareAndExchangeShort(Object o, long offset, + short expected, + short x) { if ((offset & 3) == 3) { throw new IllegalArgumentException("Update spans the word, not supported"); } @@ -1482,44 +1482,44 @@ public final class Unsafe { if ((fullWord & mask) != maskedExpected) { return (short) ((fullWord & mask) >> shift); } - } while (!weakCompareAndSwapIntVolatile(o, wordOffset, + } while (!weakCompareAndSetInt(o, wordOffset, fullWord, (fullWord & ~mask) | maskedX)); return expected; } @HotSpotIntrinsicCandidate - public final boolean compareAndSwapShort(Object o, long offset, - short expected, - short x) { - return compareAndExchangeShortVolatile(o, offset, expected, x) == expected; + public final boolean compareAndSetShort(Object o, long offset, + short expected, + short x) { + return compareAndExchangeShort(o, offset, expected, x) == expected; } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapShortVolatile(Object o, long offset, - short expected, - short x) { - return compareAndSwapShort(o, offset, expected, x); + public final boolean weakCompareAndSetShort(Object o, long offset, + short expected, + short x) { + return compareAndSetShort(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapShortAcquire(Object o, long offset, - short expected, - short x) { - return weakCompareAndSwapShortVolatile(o, offset, expected, x); + public final boolean weakCompareAndSetShortAcquire(Object o, long offset, + short expected, + short x) { + return weakCompareAndSetShort(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapShortRelease(Object o, long offset, - short expected, - short x) { - return weakCompareAndSwapShortVolatile(o, offset, expected, x); + public final boolean weakCompareAndSetShortRelease(Object o, long offset, + short expected, + short x) { + return weakCompareAndSetShort(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapShort(Object o, long offset, - short expected, - short x) { - return weakCompareAndSwapShortVolatile(o, offset, expected, x); + public final boolean weakCompareAndSetShortPlain(Object o, long offset, + short expected, + short x) { + return weakCompareAndSetShort(o, offset, expected, x); } @@ -1527,14 +1527,14 @@ public final class Unsafe { public final short compareAndExchangeShortAcquire(Object o, long offset, short expected, short x) { - return compareAndExchangeShortVolatile(o, offset, expected, x); + return compareAndExchangeShort(o, offset, expected, x); } @HotSpotIntrinsicCandidate public final short compareAndExchangeShortRelease(Object o, long offset, short expected, short x) { - return compareAndExchangeShortVolatile(o, offset, expected, x); + return compareAndExchangeShort(o, offset, expected, x); } @ForceInline @@ -1548,17 +1548,17 @@ public final class Unsafe { } @ForceInline - public final boolean compareAndSwapChar(Object o, long offset, - char expected, - char x) { - return compareAndSwapShort(o, offset, c2s(expected), c2s(x)); + public final boolean compareAndSetChar(Object o, long offset, + char expected, + char x) { + return compareAndSetShort(o, offset, c2s(expected), c2s(x)); } @ForceInline - public final char compareAndExchangeCharVolatile(Object o, long offset, - char expected, - char x) { - return s2c(compareAndExchangeShortVolatile(o, offset, c2s(expected), c2s(x))); + public final char compareAndExchangeChar(Object o, long offset, + char expected, + char x) { + return s2c(compareAndExchangeShort(o, offset, c2s(expected), c2s(x))); } @ForceInline @@ -1576,31 +1576,31 @@ public final class Unsafe { } @ForceInline - public final boolean weakCompareAndSwapCharVolatile(Object o, long offset, - char expected, - char x) { - return weakCompareAndSwapShortVolatile(o, offset, c2s(expected), c2s(x)); + public final boolean weakCompareAndSetChar(Object o, long offset, + char expected, + char x) { + return weakCompareAndSetShort(o, offset, c2s(expected), c2s(x)); } @ForceInline - public final boolean weakCompareAndSwapCharAcquire(Object o, long offset, - char expected, - char x) { - return weakCompareAndSwapShortAcquire(o, offset, c2s(expected), c2s(x)); + public final boolean weakCompareAndSetCharAcquire(Object o, long offset, + char expected, + char x) { + return weakCompareAndSetShortAcquire(o, offset, c2s(expected), c2s(x)); } @ForceInline - public final boolean weakCompareAndSwapCharRelease(Object o, long offset, - char expected, - char x) { - return weakCompareAndSwapShortRelease(o, offset, c2s(expected), c2s(x)); + public final boolean weakCompareAndSetCharRelease(Object o, long offset, + char expected, + char x) { + return weakCompareAndSetShortRelease(o, offset, c2s(expected), c2s(x)); } @ForceInline - public final boolean weakCompareAndSwapChar(Object o, long offset, - char expected, - char x) { - return weakCompareAndSwapShort(o, offset, c2s(expected), c2s(x)); + public final boolean weakCompareAndSetCharPlain(Object o, long offset, + char expected, + char x) { + return weakCompareAndSetShortPlain(o, offset, c2s(expected), c2s(x)); } /** @@ -1653,17 +1653,17 @@ public final class Unsafe { } @ForceInline - public final boolean compareAndSwapBoolean(Object o, long offset, - boolean expected, - boolean x) { - return compareAndSwapByte(o, offset, bool2byte(expected), bool2byte(x)); + public final boolean compareAndSetBoolean(Object o, long offset, + boolean expected, + boolean x) { + return compareAndSetByte(o, offset, bool2byte(expected), bool2byte(x)); } @ForceInline - public final boolean compareAndExchangeBooleanVolatile(Object o, long offset, - boolean expected, - boolean x) { - return byte2bool(compareAndExchangeByteVolatile(o, offset, bool2byte(expected), bool2byte(x))); + public final boolean compareAndExchangeBoolean(Object o, long offset, + boolean expected, + boolean x) { + return byte2bool(compareAndExchangeByte(o, offset, bool2byte(expected), bool2byte(x))); } @ForceInline @@ -1681,31 +1681,31 @@ public final class Unsafe { } @ForceInline - public final boolean weakCompareAndSwapBooleanVolatile(Object o, long offset, - boolean expected, - boolean x) { - return weakCompareAndSwapByteVolatile(o, offset, bool2byte(expected), bool2byte(x)); + public final boolean weakCompareAndSetBoolean(Object o, long offset, + boolean expected, + boolean x) { + return weakCompareAndSetByte(o, offset, bool2byte(expected), bool2byte(x)); } @ForceInline - public final boolean weakCompareAndSwapBooleanAcquire(Object o, long offset, - boolean expected, - boolean x) { - return weakCompareAndSwapByteAcquire(o, offset, bool2byte(expected), bool2byte(x)); + public final boolean weakCompareAndSetBooleanAcquire(Object o, long offset, + boolean expected, + boolean x) { + return weakCompareAndSetByteAcquire(o, offset, bool2byte(expected), bool2byte(x)); } @ForceInline - public final boolean weakCompareAndSwapBooleanRelease(Object o, long offset, - boolean expected, - boolean x) { - return weakCompareAndSwapByteRelease(o, offset, bool2byte(expected), bool2byte(x)); + public final boolean weakCompareAndSetBooleanRelease(Object o, long offset, + boolean expected, + boolean x) { + return weakCompareAndSetByteRelease(o, offset, bool2byte(expected), bool2byte(x)); } @ForceInline - public final boolean weakCompareAndSwapBoolean(Object o, long offset, - boolean expected, - boolean x) { - return weakCompareAndSwapByte(o, offset, bool2byte(expected), bool2byte(x)); + public final boolean weakCompareAndSetBooleanPlain(Object o, long offset, + boolean expected, + boolean x) { + return weakCompareAndSetBytePlain(o, offset, bool2byte(expected), bool2byte(x)); } /** @@ -1718,21 +1718,21 @@ public final class Unsafe { * @return {@code true} if successful */ @ForceInline - public final boolean compareAndSwapFloat(Object o, long offset, - float expected, - float x) { - return compareAndSwapInt(o, offset, + public final boolean compareAndSetFloat(Object o, long offset, + float expected, + float x) { + return compareAndSetInt(o, offset, Float.floatToRawIntBits(expected), Float.floatToRawIntBits(x)); } @ForceInline - public final float compareAndExchangeFloatVolatile(Object o, long offset, - float expected, - float x) { - int w = compareAndExchangeIntVolatile(o, offset, - Float.floatToRawIntBits(expected), - Float.floatToRawIntBits(x)); + public final float compareAndExchangeFloat(Object o, long offset, + float expected, + float x) { + int w = compareAndExchangeInt(o, offset, + Float.floatToRawIntBits(expected), + Float.floatToRawIntBits(x)); return Float.intBitsToFloat(w); } @@ -1757,37 +1757,37 @@ public final class Unsafe { } @ForceInline - public final boolean weakCompareAndSwapFloat(Object o, long offset, - float expected, - float x) { - return weakCompareAndSwapInt(o, offset, + public final boolean weakCompareAndSetFloatPlain(Object o, long offset, + float expected, + float x) { + return weakCompareAndSetIntPlain(o, offset, Float.floatToRawIntBits(expected), Float.floatToRawIntBits(x)); } @ForceInline - public final boolean weakCompareAndSwapFloatAcquire(Object o, long offset, - float expected, - float x) { - return weakCompareAndSwapIntAcquire(o, offset, - Float.floatToRawIntBits(expected), - Float.floatToRawIntBits(x)); - } - - @ForceInline - public final boolean weakCompareAndSwapFloatRelease(Object o, long offset, - float expected, - float x) { - return weakCompareAndSwapIntRelease(o, offset, - Float.floatToRawIntBits(expected), - Float.floatToRawIntBits(x)); - } - - @ForceInline - public final boolean weakCompareAndSwapFloatVolatile(Object o, long offset, + public final boolean weakCompareAndSetFloatAcquire(Object o, long offset, float expected, float x) { - return weakCompareAndSwapIntVolatile(o, offset, + return weakCompareAndSetIntAcquire(o, offset, + Float.floatToRawIntBits(expected), + Float.floatToRawIntBits(x)); + } + + @ForceInline + public final boolean weakCompareAndSetFloatRelease(Object o, long offset, + float expected, + float x) { + return weakCompareAndSetIntRelease(o, offset, + Float.floatToRawIntBits(expected), + Float.floatToRawIntBits(x)); + } + + @ForceInline + public final boolean weakCompareAndSetFloat(Object o, long offset, + float expected, + float x) { + return weakCompareAndSetInt(o, offset, Float.floatToRawIntBits(expected), Float.floatToRawIntBits(x)); } @@ -1802,21 +1802,21 @@ public final class Unsafe { * @return {@code true} if successful */ @ForceInline - public final boolean compareAndSwapDouble(Object o, long offset, - double expected, - double x) { - return compareAndSwapLong(o, offset, - Double.doubleToRawLongBits(expected), - Double.doubleToRawLongBits(x)); + public final boolean compareAndSetDouble(Object o, long offset, + double expected, + double x) { + return compareAndSetLong(o, offset, + Double.doubleToRawLongBits(expected), + Double.doubleToRawLongBits(x)); } @ForceInline - public final double compareAndExchangeDoubleVolatile(Object o, long offset, - double expected, - double x) { - long w = compareAndExchangeLongVolatile(o, offset, - Double.doubleToRawLongBits(expected), - Double.doubleToRawLongBits(x)); + public final double compareAndExchangeDouble(Object o, long offset, + double expected, + double x) { + long w = compareAndExchangeLong(o, offset, + Double.doubleToRawLongBits(expected), + Double.doubleToRawLongBits(x)); return Double.longBitsToDouble(w); } @@ -1841,37 +1841,37 @@ public final class Unsafe { } @ForceInline - public final boolean weakCompareAndSwapDouble(Object o, long offset, - double expected, - double x) { - return weakCompareAndSwapLong(o, offset, + public final boolean weakCompareAndSetDoublePlain(Object o, long offset, + double expected, + double x) { + return weakCompareAndSetLongPlain(o, offset, Double.doubleToRawLongBits(expected), Double.doubleToRawLongBits(x)); } @ForceInline - public final boolean weakCompareAndSwapDoubleAcquire(Object o, long offset, - double expected, - double x) { - return weakCompareAndSwapLongAcquire(o, offset, + public final boolean weakCompareAndSetDoubleAcquire(Object o, long offset, + double expected, + double x) { + return weakCompareAndSetLongAcquire(o, offset, Double.doubleToRawLongBits(expected), Double.doubleToRawLongBits(x)); } @ForceInline - public final boolean weakCompareAndSwapDoubleRelease(Object o, long offset, - double expected, - double x) { - return weakCompareAndSwapLongRelease(o, offset, + public final boolean weakCompareAndSetDoubleRelease(Object o, long offset, + double expected, + double x) { + return weakCompareAndSetLongRelease(o, offset, Double.doubleToRawLongBits(expected), Double.doubleToRawLongBits(x)); } @ForceInline - public final boolean weakCompareAndSwapDoubleVolatile(Object o, long offset, - double expected, - double x) { - return weakCompareAndSwapLongVolatile(o, offset, + public final boolean weakCompareAndSetDouble(Object o, long offset, + double expected, + double x) { + return weakCompareAndSetLong(o, offset, Double.doubleToRawLongBits(expected), Double.doubleToRawLongBits(x)); } @@ -1886,55 +1886,55 @@ public final class Unsafe { * @return {@code true} if successful */ @HotSpotIntrinsicCandidate - public final native boolean compareAndSwapLong(Object o, long offset, - long expected, - long x); + public final native boolean compareAndSetLong(Object o, long offset, + long expected, + long x); @HotSpotIntrinsicCandidate - public final native long compareAndExchangeLongVolatile(Object o, long offset, - long expected, - long x); + public final native long compareAndExchangeLong(Object o, long offset, + long expected, + long x); @HotSpotIntrinsicCandidate public final long compareAndExchangeLongAcquire(Object o, long offset, long expected, long x) { - return compareAndExchangeLongVolatile(o, offset, expected, x); + return compareAndExchangeLong(o, offset, expected, x); } @HotSpotIntrinsicCandidate public final long compareAndExchangeLongRelease(Object o, long offset, long expected, long x) { - return compareAndExchangeLongVolatile(o, offset, expected, x); + return compareAndExchangeLong(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapLong(Object o, long offset, - long expected, - long x) { - return compareAndSwapLong(o, offset, expected, x); + public final boolean weakCompareAndSetLongPlain(Object o, long offset, + long expected, + long x) { + return compareAndSetLong(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapLongAcquire(Object o, long offset, - long expected, - long x) { - return compareAndSwapLong(o, offset, expected, x); + public final boolean weakCompareAndSetLongAcquire(Object o, long offset, + long expected, + long x) { + return compareAndSetLong(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapLongRelease(Object o, long offset, - long expected, - long x) { - return compareAndSwapLong(o, offset, expected, x); + public final boolean weakCompareAndSetLongRelease(Object o, long offset, + long expected, + long x) { + return compareAndSetLong(o, offset, expected, x); } @HotSpotIntrinsicCandidate - public final boolean weakCompareAndSwapLongVolatile(Object o, long offset, - long expected, - long x) { - return compareAndSwapLong(o, offset, expected, x); + public final boolean weakCompareAndSetLong(Object o, long offset, + long expected, + long x) { + return compareAndSetLong(o, offset, expected, x); } /** @@ -2316,7 +2316,7 @@ public final class Unsafe { int v; do { v = getIntVolatile(o, offset); - } while (!weakCompareAndSwapIntVolatile(o, offset, v, v + delta)); + } while (!weakCompareAndSetInt(o, offset, v, v + delta)); return v; } @@ -2325,7 +2325,7 @@ public final class Unsafe { int v; do { v = getInt(o, offset); - } while (!weakCompareAndSwapIntRelease(o, offset, v, v + delta)); + } while (!weakCompareAndSetIntRelease(o, offset, v, v + delta)); return v; } @@ -2334,7 +2334,7 @@ public final class Unsafe { int v; do { v = getIntAcquire(o, offset); - } while (!weakCompareAndSwapIntAcquire(o, offset, v, v + delta)); + } while (!weakCompareAndSetIntAcquire(o, offset, v, v + delta)); return v; } @@ -2354,7 +2354,7 @@ public final class Unsafe { long v; do { v = getLongVolatile(o, offset); - } while (!weakCompareAndSwapLongVolatile(o, offset, v, v + delta)); + } while (!weakCompareAndSetLong(o, offset, v, v + delta)); return v; } @@ -2363,7 +2363,7 @@ public final class Unsafe { long v; do { v = getLong(o, offset); - } while (!weakCompareAndSwapLongRelease(o, offset, v, v + delta)); + } while (!weakCompareAndSetLongRelease(o, offset, v, v + delta)); return v; } @@ -2372,7 +2372,7 @@ public final class Unsafe { long v; do { v = getLongAcquire(o, offset); - } while (!weakCompareAndSwapLongAcquire(o, offset, v, v + delta)); + } while (!weakCompareAndSetLongAcquire(o, offset, v, v + delta)); return v; } @@ -2381,7 +2381,7 @@ public final class Unsafe { byte v; do { v = getByteVolatile(o, offset); - } while (!weakCompareAndSwapByteVolatile(o, offset, v, (byte) (v + delta))); + } while (!weakCompareAndSetByte(o, offset, v, (byte) (v + delta))); return v; } @@ -2390,7 +2390,7 @@ public final class Unsafe { byte v; do { v = getByte(o, offset); - } while (!weakCompareAndSwapByteRelease(o, offset, v, (byte) (v + delta))); + } while (!weakCompareAndSetByteRelease(o, offset, v, (byte) (v + delta))); return v; } @@ -2399,7 +2399,7 @@ public final class Unsafe { byte v; do { v = getByteAcquire(o, offset); - } while (!weakCompareAndSwapByteAcquire(o, offset, v, (byte) (v + delta))); + } while (!weakCompareAndSetByteAcquire(o, offset, v, (byte) (v + delta))); return v; } @@ -2408,7 +2408,7 @@ public final class Unsafe { short v; do { v = getShortVolatile(o, offset); - } while (!weakCompareAndSwapShortVolatile(o, offset, v, (short) (v + delta))); + } while (!weakCompareAndSetShort(o, offset, v, (short) (v + delta))); return v; } @@ -2417,7 +2417,7 @@ public final class Unsafe { short v; do { v = getShort(o, offset); - } while (!weakCompareAndSwapShortRelease(o, offset, v, (short) (v + delta))); + } while (!weakCompareAndSetShortRelease(o, offset, v, (short) (v + delta))); return v; } @@ -2426,7 +2426,7 @@ public final class Unsafe { short v; do { v = getShortAcquire(o, offset); - } while (!weakCompareAndSwapShortAcquire(o, offset, v, (short) (v + delta))); + } while (!weakCompareAndSetShortAcquire(o, offset, v, (short) (v + delta))); return v; } @@ -2455,7 +2455,7 @@ public final class Unsafe { // may result in the loop not terminating. expectedBits = getIntVolatile(o, offset); v = Float.intBitsToFloat(expectedBits); - } while (!weakCompareAndSwapIntVolatile(o, offset, + } while (!weakCompareAndSetInt(o, offset, expectedBits, Float.floatToRawIntBits(v + delta))); return v; } @@ -2470,7 +2470,7 @@ public final class Unsafe { // may result in the loop not terminating. expectedBits = getInt(o, offset); v = Float.intBitsToFloat(expectedBits); - } while (!weakCompareAndSwapIntRelease(o, offset, + } while (!weakCompareAndSetIntRelease(o, offset, expectedBits, Float.floatToRawIntBits(v + delta))); return v; } @@ -2485,7 +2485,7 @@ public final class Unsafe { // may result in the loop not terminating. expectedBits = getIntAcquire(o, offset); v = Float.intBitsToFloat(expectedBits); - } while (!weakCompareAndSwapIntAcquire(o, offset, + } while (!weakCompareAndSetIntAcquire(o, offset, expectedBits, Float.floatToRawIntBits(v + delta))); return v; } @@ -2500,7 +2500,7 @@ public final class Unsafe { // may result in the loop not terminating. expectedBits = getLongVolatile(o, offset); v = Double.longBitsToDouble(expectedBits); - } while (!weakCompareAndSwapLongVolatile(o, offset, + } while (!weakCompareAndSetLong(o, offset, expectedBits, Double.doubleToRawLongBits(v + delta))); return v; } @@ -2515,7 +2515,7 @@ public final class Unsafe { // may result in the loop not terminating. expectedBits = getLong(o, offset); v = Double.longBitsToDouble(expectedBits); - } while (!weakCompareAndSwapLongRelease(o, offset, + } while (!weakCompareAndSetLongRelease(o, offset, expectedBits, Double.doubleToRawLongBits(v + delta))); return v; } @@ -2530,7 +2530,7 @@ public final class Unsafe { // may result in the loop not terminating. expectedBits = getLongAcquire(o, offset); v = Double.longBitsToDouble(expectedBits); - } while (!weakCompareAndSwapLongAcquire(o, offset, + } while (!weakCompareAndSetLongAcquire(o, offset, expectedBits, Double.doubleToRawLongBits(v + delta))); return v; } @@ -2551,7 +2551,7 @@ public final class Unsafe { int v; do { v = getIntVolatile(o, offset); - } while (!weakCompareAndSwapIntVolatile(o, offset, v, newValue)); + } while (!weakCompareAndSetInt(o, offset, v, newValue)); return v; } @@ -2560,7 +2560,7 @@ public final class Unsafe { int v; do { v = getInt(o, offset); - } while (!weakCompareAndSwapIntRelease(o, offset, v, newValue)); + } while (!weakCompareAndSetIntRelease(o, offset, v, newValue)); return v; } @@ -2569,7 +2569,7 @@ public final class Unsafe { int v; do { v = getIntAcquire(o, offset); - } while (!weakCompareAndSwapIntAcquire(o, offset, v, newValue)); + } while (!weakCompareAndSetIntAcquire(o, offset, v, newValue)); return v; } @@ -2589,7 +2589,7 @@ public final class Unsafe { long v; do { v = getLongVolatile(o, offset); - } while (!weakCompareAndSwapLongVolatile(o, offset, v, newValue)); + } while (!weakCompareAndSetLong(o, offset, v, newValue)); return v; } @@ -2598,7 +2598,7 @@ public final class Unsafe { long v; do { v = getLong(o, offset); - } while (!weakCompareAndSwapLongRelease(o, offset, v, newValue)); + } while (!weakCompareAndSetLongRelease(o, offset, v, newValue)); return v; } @@ -2607,7 +2607,7 @@ public final class Unsafe { long v; do { v = getLongAcquire(o, offset); - } while (!weakCompareAndSwapLongAcquire(o, offset, v, newValue)); + } while (!weakCompareAndSetLongAcquire(o, offset, v, newValue)); return v; } @@ -2627,7 +2627,7 @@ public final class Unsafe { Object v; do { v = getObjectVolatile(o, offset); - } while (!weakCompareAndSwapObjectVolatile(o, offset, v, newValue)); + } while (!weakCompareAndSetObject(o, offset, v, newValue)); return v; } @@ -2636,7 +2636,7 @@ public final class Unsafe { Object v; do { v = getObject(o, offset); - } while (!weakCompareAndSwapObjectRelease(o, offset, v, newValue)); + } while (!weakCompareAndSetObjectRelease(o, offset, v, newValue)); return v; } @@ -2645,7 +2645,7 @@ public final class Unsafe { Object v; do { v = getObjectAcquire(o, offset); - } while (!weakCompareAndSwapObjectAcquire(o, offset, v, newValue)); + } while (!weakCompareAndSetObjectAcquire(o, offset, v, newValue)); return v; } @@ -2654,7 +2654,7 @@ public final class Unsafe { byte v; do { v = getByteVolatile(o, offset); - } while (!weakCompareAndSwapByteVolatile(o, offset, v, newValue)); + } while (!weakCompareAndSetByte(o, offset, v, newValue)); return v; } @@ -2663,7 +2663,7 @@ public final class Unsafe { byte v; do { v = getByte(o, offset); - } while (!weakCompareAndSwapByteRelease(o, offset, v, newValue)); + } while (!weakCompareAndSetByteRelease(o, offset, v, newValue)); return v; } @@ -2672,7 +2672,7 @@ public final class Unsafe { byte v; do { v = getByteAcquire(o, offset); - } while (!weakCompareAndSwapByteAcquire(o, offset, v, newValue)); + } while (!weakCompareAndSetByteAcquire(o, offset, v, newValue)); return v; } @@ -2696,7 +2696,7 @@ public final class Unsafe { short v; do { v = getShortVolatile(o, offset); - } while (!weakCompareAndSwapShortVolatile(o, offset, v, newValue)); + } while (!weakCompareAndSetShort(o, offset, v, newValue)); return v; } @@ -2705,7 +2705,7 @@ public final class Unsafe { short v; do { v = getShort(o, offset); - } while (!weakCompareAndSwapShortRelease(o, offset, v, newValue)); + } while (!weakCompareAndSetShortRelease(o, offset, v, newValue)); return v; } @@ -2714,7 +2714,7 @@ public final class Unsafe { short v; do { v = getShortAcquire(o, offset); - } while (!weakCompareAndSwapShortAcquire(o, offset, v, newValue)); + } while (!weakCompareAndSetShortAcquire(o, offset, v, newValue)); return v; } @@ -2824,7 +2824,7 @@ public final class Unsafe { byte current; do { current = getByteVolatile(o, offset); - } while (!weakCompareAndSwapByteVolatile(o, offset, + } while (!weakCompareAndSetByte(o, offset, current, (byte) (current | mask))); return current; } @@ -2834,7 +2834,7 @@ public final class Unsafe { byte current; do { current = getByte(o, offset); - } while (!weakCompareAndSwapByteRelease(o, offset, + } while (!weakCompareAndSetByteRelease(o, offset, current, (byte) (current | mask))); return current; } @@ -2845,7 +2845,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getByte(o, offset); - } while (!weakCompareAndSwapByteAcquire(o, offset, + } while (!weakCompareAndSetByteAcquire(o, offset, current, (byte) (current | mask))); return current; } @@ -2855,7 +2855,7 @@ public final class Unsafe { byte current; do { current = getByteVolatile(o, offset); - } while (!weakCompareAndSwapByteVolatile(o, offset, + } while (!weakCompareAndSetByte(o, offset, current, (byte) (current & mask))); return current; } @@ -2865,7 +2865,7 @@ public final class Unsafe { byte current; do { current = getByte(o, offset); - } while (!weakCompareAndSwapByteRelease(o, offset, + } while (!weakCompareAndSetByteRelease(o, offset, current, (byte) (current & mask))); return current; } @@ -2876,7 +2876,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getByte(o, offset); - } while (!weakCompareAndSwapByteAcquire(o, offset, + } while (!weakCompareAndSetByteAcquire(o, offset, current, (byte) (current & mask))); return current; } @@ -2886,7 +2886,7 @@ public final class Unsafe { byte current; do { current = getByteVolatile(o, offset); - } while (!weakCompareAndSwapByteVolatile(o, offset, + } while (!weakCompareAndSetByte(o, offset, current, (byte) (current ^ mask))); return current; } @@ -2896,7 +2896,7 @@ public final class Unsafe { byte current; do { current = getByte(o, offset); - } while (!weakCompareAndSwapByteRelease(o, offset, + } while (!weakCompareAndSetByteRelease(o, offset, current, (byte) (current ^ mask))); return current; } @@ -2907,7 +2907,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getByte(o, offset); - } while (!weakCompareAndSwapByteAcquire(o, offset, + } while (!weakCompareAndSetByteAcquire(o, offset, current, (byte) (current ^ mask))); return current; } @@ -2964,7 +2964,7 @@ public final class Unsafe { short current; do { current = getShortVolatile(o, offset); - } while (!weakCompareAndSwapShortVolatile(o, offset, + } while (!weakCompareAndSetShort(o, offset, current, (short) (current | mask))); return current; } @@ -2974,7 +2974,7 @@ public final class Unsafe { short current; do { current = getShort(o, offset); - } while (!weakCompareAndSwapShortRelease(o, offset, + } while (!weakCompareAndSetShortRelease(o, offset, current, (short) (current | mask))); return current; } @@ -2985,7 +2985,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getShort(o, offset); - } while (!weakCompareAndSwapShortAcquire(o, offset, + } while (!weakCompareAndSetShortAcquire(o, offset, current, (short) (current | mask))); return current; } @@ -2995,7 +2995,7 @@ public final class Unsafe { short current; do { current = getShortVolatile(o, offset); - } while (!weakCompareAndSwapShortVolatile(o, offset, + } while (!weakCompareAndSetShort(o, offset, current, (short) (current & mask))); return current; } @@ -3005,7 +3005,7 @@ public final class Unsafe { short current; do { current = getShort(o, offset); - } while (!weakCompareAndSwapShortRelease(o, offset, + } while (!weakCompareAndSetShortRelease(o, offset, current, (short) (current & mask))); return current; } @@ -3016,7 +3016,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getShort(o, offset); - } while (!weakCompareAndSwapShortAcquire(o, offset, + } while (!weakCompareAndSetShortAcquire(o, offset, current, (short) (current & mask))); return current; } @@ -3026,7 +3026,7 @@ public final class Unsafe { short current; do { current = getShortVolatile(o, offset); - } while (!weakCompareAndSwapShortVolatile(o, offset, + } while (!weakCompareAndSetShort(o, offset, current, (short) (current ^ mask))); return current; } @@ -3036,7 +3036,7 @@ public final class Unsafe { short current; do { current = getShort(o, offset); - } while (!weakCompareAndSwapShortRelease(o, offset, + } while (!weakCompareAndSetShortRelease(o, offset, current, (short) (current ^ mask))); return current; } @@ -3047,7 +3047,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getShort(o, offset); - } while (!weakCompareAndSwapShortAcquire(o, offset, + } while (!weakCompareAndSetShortAcquire(o, offset, current, (short) (current ^ mask))); return current; } @@ -3058,7 +3058,7 @@ public final class Unsafe { int current; do { current = getIntVolatile(o, offset); - } while (!weakCompareAndSwapIntVolatile(o, offset, + } while (!weakCompareAndSetInt(o, offset, current, current | mask)); return current; } @@ -3068,7 +3068,7 @@ public final class Unsafe { int current; do { current = getInt(o, offset); - } while (!weakCompareAndSwapIntRelease(o, offset, + } while (!weakCompareAndSetIntRelease(o, offset, current, current | mask)); return current; } @@ -3079,7 +3079,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getInt(o, offset); - } while (!weakCompareAndSwapIntAcquire(o, offset, + } while (!weakCompareAndSetIntAcquire(o, offset, current, current | mask)); return current; } @@ -3100,7 +3100,7 @@ public final class Unsafe { int current; do { current = getIntVolatile(o, offset); - } while (!weakCompareAndSwapIntVolatile(o, offset, + } while (!weakCompareAndSetInt(o, offset, current, current & mask)); return current; } @@ -3110,7 +3110,7 @@ public final class Unsafe { int current; do { current = getInt(o, offset); - } while (!weakCompareAndSwapIntRelease(o, offset, + } while (!weakCompareAndSetIntRelease(o, offset, current, current & mask)); return current; } @@ -3121,7 +3121,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getInt(o, offset); - } while (!weakCompareAndSwapIntAcquire(o, offset, + } while (!weakCompareAndSetIntAcquire(o, offset, current, current & mask)); return current; } @@ -3131,7 +3131,7 @@ public final class Unsafe { int current; do { current = getIntVolatile(o, offset); - } while (!weakCompareAndSwapIntVolatile(o, offset, + } while (!weakCompareAndSetInt(o, offset, current, current ^ mask)); return current; } @@ -3141,7 +3141,7 @@ public final class Unsafe { int current; do { current = getInt(o, offset); - } while (!weakCompareAndSwapIntRelease(o, offset, + } while (!weakCompareAndSetIntRelease(o, offset, current, current ^ mask)); return current; } @@ -3152,7 +3152,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getInt(o, offset); - } while (!weakCompareAndSwapIntAcquire(o, offset, + } while (!weakCompareAndSetIntAcquire(o, offset, current, current ^ mask)); return current; } @@ -3163,7 +3163,7 @@ public final class Unsafe { long current; do { current = getLongVolatile(o, offset); - } while (!weakCompareAndSwapLongVolatile(o, offset, + } while (!weakCompareAndSetLong(o, offset, current, current | mask)); return current; } @@ -3173,7 +3173,7 @@ public final class Unsafe { long current; do { current = getLong(o, offset); - } while (!weakCompareAndSwapLongRelease(o, offset, + } while (!weakCompareAndSetLongRelease(o, offset, current, current | mask)); return current; } @@ -3184,7 +3184,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getLong(o, offset); - } while (!weakCompareAndSwapLongAcquire(o, offset, + } while (!weakCompareAndSetLongAcquire(o, offset, current, current | mask)); return current; } @@ -3194,7 +3194,7 @@ public final class Unsafe { long current; do { current = getLongVolatile(o, offset); - } while (!weakCompareAndSwapLongVolatile(o, offset, + } while (!weakCompareAndSetLong(o, offset, current, current & mask)); return current; } @@ -3204,7 +3204,7 @@ public final class Unsafe { long current; do { current = getLong(o, offset); - } while (!weakCompareAndSwapLongRelease(o, offset, + } while (!weakCompareAndSetLongRelease(o, offset, current, current & mask)); return current; } @@ -3215,7 +3215,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getLong(o, offset); - } while (!weakCompareAndSwapLongAcquire(o, offset, + } while (!weakCompareAndSetLongAcquire(o, offset, current, current & mask)); return current; } @@ -3225,7 +3225,7 @@ public final class Unsafe { long current; do { current = getLongVolatile(o, offset); - } while (!weakCompareAndSwapLongVolatile(o, offset, + } while (!weakCompareAndSetLong(o, offset, current, current ^ mask)); return current; } @@ -3235,7 +3235,7 @@ public final class Unsafe { long current; do { current = getLong(o, offset); - } while (!weakCompareAndSwapLongRelease(o, offset, + } while (!weakCompareAndSetLongRelease(o, offset, current, current ^ mask)); return current; } @@ -3246,7 +3246,7 @@ public final class Unsafe { do { // Plain read, the value is a hint, the acquire CAS does the work current = getLong(o, offset); - } while (!weakCompareAndSwapLongAcquire(o, offset, + } while (!weakCompareAndSetLongAcquire(o, offset, current, current ^ mask)); return current; } diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/VM.java b/jdk/src/java.base/share/classes/jdk/internal/misc/VM.java index 695795e4338..95961c74584 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/VM.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/VM.java @@ -26,7 +26,10 @@ package jdk.internal.misc; import static java.lang.Thread.State.*; +import java.util.Map; +import java.util.HashMap; import java.util.Properties; +import java.util.Collections; public class VM { @@ -132,25 +135,33 @@ public class VM { * Returns the system property of the specified key saved at * system initialization time. This method should only be used * for the system properties that are not changed during runtime. - * It accesses a private copy of the system properties so - * that user's locking of the system properties object will not - * cause the library to deadlock. * * Note that the saved system properties do not include - * the ones set by sun.misc.Version.init(). - * + * the ones set by java.lang.VersionProps.init(). */ public static String getSavedProperty(String key) { - if (savedProps.isEmpty()) - throw new IllegalStateException("Should be non-empty if initialized"); + if (savedProps == null) + throw new IllegalStateException("Not yet initialized"); - return savedProps.getProperty(key); + return savedProps.get(key); } - // TODO: the Property Management needs to be refactored and - // the appropriate prop keys need to be accessible to the - // calling classes to avoid duplication of keys. - private static final Properties savedProps = new Properties(); + /** + * Gets an unmodifiable view of the system properties saved at system + * initialization time. This method should only be used + * for the system properties that are not changed during runtime. + * + * Note that the saved system properties do not include + * the ones set by java.lang.VersionProps.init(). + */ + public static Map getSavedProperties() { + if (savedProps == null) + throw new IllegalStateException("Not yet initialized"); + + return savedProps; + } + + private static Map savedProps; // Save a private copy of the system properties and remove // the system properties that are not intended for public access. @@ -160,7 +171,12 @@ public class VM { if (initLevel() != 0) throw new IllegalStateException("Wrong init level"); - savedProps.putAll(props); + @SuppressWarnings({"rawtypes", "unchecked"}) + Map sp = + Map.ofEntries(props.entrySet().toArray(new Map.Entry[0])); + // only main thread is running at this time, so savedProps and + // its content will be correctly published to threads started later + savedProps = sp; // Set the maximum amount of direct memory. This value is controlled // by the vm option -XX:MaxDirectMemorySize=. diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/Builder.java b/jdk/src/java.base/share/classes/jdk/internal/module/Builder.java index 2ef9c11d248..2792ccca19f 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/Builder.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/Builder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -38,7 +38,7 @@ import jdk.internal.misc.JavaLangModuleAccess; import jdk.internal.misc.SharedSecrets; /** - * This builder is optimized for reconstituting ModuleDescriptor + * This builder is optimized for reconstituting the {@code ModuleDescriptor}s * for system modules. The validation should be done at jlink time. * * 1. skip name validation @@ -136,9 +136,7 @@ final class Builder { } final String name; - boolean open; - boolean automatic; - boolean synthetic; + boolean open, synthetic, mandated; Set requires; Set exports; Set opens; @@ -147,9 +145,6 @@ final class Builder { Set provides; Version version; String mainClass; - String osName; - String osArch; - String osVersion; Builder(String name) { this.name = name; @@ -165,13 +160,13 @@ final class Builder { return this; } - Builder automatic(boolean value) { - this.automatic = value; + Builder synthetic(boolean value) { + this.synthetic = value; return this; } - Builder synthetic(boolean value) { - this.synthetic = value; + Builder mandated(boolean value) { + this.mandated = value; return this; } @@ -228,13 +223,10 @@ final class Builder { * * @throws IllegalArgumentException if {@code v} is null or cannot be * parsed as a version string - * @throws IllegalStateException if the module version is already set * * @see Version#parse(String) */ public Builder version(String v) { - if (version != null) - throw new IllegalStateException("module version already set"); Version ver = cachedVersion; if (ver != null && v.equals(ver.toString())) { version = ver; @@ -246,50 +238,29 @@ final class Builder { /** * Sets the module main class. - * - * @throws IllegalStateException if already set */ public Builder mainClass(String mc) { - if (mainClass != null) - throw new IllegalStateException("main class already set"); mainClass = mc; return this; } /** - * Sets the OS name. - * - * @throws IllegalStateException if already set + * Returns an immutable set of the module modifiers derived from the flags. */ - public Builder osName(String name) { - if (osName != null) - throw new IllegalStateException("OS name already set"); - this.osName = name; - return this; - } - - /** - * Sets the OS arch. - * - * @throws IllegalStateException if already set - */ - public Builder osArch(String arch) { - if (osArch != null) - throw new IllegalStateException("OS arch already set"); - this.osArch = arch; - return this; - } - - /** - * Sets the OS version. - * - * @throws IllegalStateException if already set - */ - public Builder osVersion(String version) { - if (osVersion != null) - throw new IllegalStateException("OS version already set"); - this.osVersion = version; - return this; + private Set modifiers() { + int n = 0; + if (open) n++; + if (synthetic) n++; + if (mandated) n++; + if (n == 0) { + return Collections.emptySet(); + } else { + ModuleDescriptor.Modifier[] mods = new ModuleDescriptor.Modifier[n]; + if (open) mods[--n] = ModuleDescriptor.Modifier.OPEN; + if (synthetic) mods[--n] = ModuleDescriptor.Modifier.SYNTHETIC; + if (mandated) mods[--n] = ModuleDescriptor.Modifier.MANDATED; + return Set.of(mods); + } } /** @@ -297,12 +268,9 @@ final class Builder { */ public ModuleDescriptor build(int hashCode) { assert name != null; - return JLMA.newModuleDescriptor(name, version, - open, - automatic, - synthetic, + modifiers(), requires, exports, opens, @@ -310,9 +278,6 @@ final class Builder { provides, packages, mainClass, - osName, - osArch, - osVersion, hashCode); } } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/Checks.java b/jdk/src/java.base/share/classes/jdk/internal/module/Checks.java index 2fdeaab6211..4d772df129a 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/Checks.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/Checks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -25,8 +25,10 @@ package jdk.internal.module; +import java.util.Set; + /** - * Utility class for checking module name and binary names. + * Utility class for checking module, package, and class names. */ public final class Checks { @@ -45,21 +47,18 @@ public final class Checks { int next; int off = 0; while ((next = name.indexOf('.', off)) != -1) { - if (isJavaIdentifier(name, off, (next - off)) == -1) { - String id = name.substring(off, next); + String id = name.substring(off, next); + if (!isJavaIdentifier(id)) { throw new IllegalArgumentException(name + ": Invalid module name" + ": '" + id + "' is not a Java identifier"); } off = next+1; } - int last = isJavaIdentifier(name, off, name.length() - off); - if (last == -1) { - String id = name.substring(off); + String last = name.substring(off); + if (!isJavaIdentifier(last)) { throw new IllegalArgumentException(name + ": Invalid module name" - + ": '" + id + "' is not a Java identifier"); + + ": '" + last + "' is not a Java identifier"); } - //if (!Character.isJavaIdentifierStart(last)) - // throw new IllegalArgumentException(name + ": Module name ends in digit"); return name; } @@ -70,16 +69,13 @@ public final class Checks { int next; int off = 0; while ((next = name.indexOf('.', off)) != -1) { - if (isJavaIdentifier(name, off, (next - off)) == -1) + String id = name.substring(off, next); + if (!isJavaIdentifier(id)) return false; off = next+1; } - int last = isJavaIdentifier(name, off, name.length() - off); - if (last == -1) - return false; - //if (!Character.isJavaIdentifierStart(last)) - // return false; - return true; + String last = name.substring(off); + return isJavaIdentifier(last); } /** @@ -89,136 +85,179 @@ public final class Checks { * package name */ public static String requirePackageName(String name) { - return requireBinaryName("package name", name); + return requireTypeName("package name", name); } /** - * Checks a name to ensure that it's a legal type name. + * Returns {@code true} if the given name is a legal package name. + */ + public static boolean isPackageName(String name) { + return isTypeName(name); + } + + /** + * Checks a name to ensure that it's a legal qualified class name * * @throws IllegalArgumentException if name is null or not a legal - * type name + * qualified class name */ public static String requireServiceTypeName(String name) { - return requireBinaryName("service type name", name); + return requireQualifiedClassName("service type name", name); } /** - * Checks a name to ensure that it's a legal type name. + * Checks a name to ensure that it's a legal qualified class name. * * @throws IllegalArgumentException if name is null or not a legal - * type name + * qualified class name */ public static String requireServiceProviderName(String name) { - return requireBinaryName("service provider name", name); + return requireQualifiedClassName("service provider name", name); } /** - * Returns {@code true} if the given name is a legal binary name. + * Checks a name to ensure that it's a legal qualified class name in + * a named package. + * + * @throws IllegalArgumentException if name is null or not a legal + * qualified class name in a named package */ - public static boolean isJavaIdentifier(String name) { - return isBinaryName(name); + public static String requireQualifiedClassName(String what, String name) { + requireTypeName(what, name); + if (name.indexOf('.') == -1) + throw new IllegalArgumentException(name + ": is not a qualified name of" + + " a Java class in a named package"); + return name; } /** - * Returns {@code true} if the given name is a legal binary name. + * Returns {@code true} if the given name is a legal class name. */ - public static boolean isBinaryName(String name) { + public static boolean isClassName(String name) { + return isTypeName(name); + } + + /** + * Returns {@code true} if the given name is a legal type name. + */ + private static boolean isTypeName(String name) { int next; int off = 0; while ((next = name.indexOf('.', off)) != -1) { - if (isJavaIdentifier(name, off, (next - off)) == -1) + String id = name.substring(off, next); + if (!isJavaIdentifier(id)) return false; off = next+1; } - int count = name.length() - off; - return (isJavaIdentifier(name, off, count) != -1); + String last = name.substring(off); + return isJavaIdentifier(last); } /** - * Checks if the given name is a legal binary name. + * Checks if the given name is a legal type name. * * @throws IllegalArgumentException if name is null or not a legal - * binary name + * type name */ - public static String requireBinaryName(String what, String name) { + private static String requireTypeName(String what, String name) { if (name == null) throw new IllegalArgumentException("Null " + what); int next; int off = 0; while ((next = name.indexOf('.', off)) != -1) { - if (isJavaIdentifier(name, off, (next - off)) == -1) { - String id = name.substring(off, next); + String id = name.substring(off, next); + if (!isJavaIdentifier(id)) { throw new IllegalArgumentException(name + ": Invalid " + what + ": '" + id + "' is not a Java identifier"); } off = next + 1; } - if (isJavaIdentifier(name, off, name.length() - off) == -1) { - String id = name.substring(off, name.length()); + String last = name.substring(off); + if (!isJavaIdentifier(last)) { throw new IllegalArgumentException(name + ": Invalid " + what - + ": '" + id + "' is not a Java identifier"); + + ": '" + last + "' is not a Java identifier"); } return name; } /** - * Returns {@code true} if the last character of the given name is legal - * as the last character of a module name. - * - * @throws IllegalArgumentException if name is empty + * Returns true if the given char sequence is a legal Java identifier, + * otherwise false. */ - public static boolean hasLegalModuleNameLastCharacter(String name) { - if (name.isEmpty()) - throw new IllegalArgumentException("name is empty"); - int len = name.length(); - if (isASCIIString(name)) { - char c = name.charAt(len-1); - return Character.isJavaIdentifierStart(c); - } else { - int i = 0; - int cp = -1; - while (i < len) { - cp = name.codePointAt(i); - i += Character.charCount(cp); - } - return Character.isJavaIdentifierStart(cp); - } - } + private static boolean isJavaIdentifier(CharSequence cs) { + if (cs.length() == 0 || RESERVED.contains(cs)) + return false; - /** - * Returns true if the given string only contains ASCII characters. - */ - private static boolean isASCIIString(String s) { - int i = 0; - while (i < s.length()) { - int c = s.charAt(i); - if (c > 0x7F) - return false; - i++; - } - return true; - } - - /** - * Checks if a char sequence is a legal Java identifier, returning the code - * point of the last character if legal or {@code -1} if not legal. - */ - private static int isJavaIdentifier(CharSequence cs, int offset, int count) { - if (count == 0) - return -1; - int first = Character.codePointAt(cs, offset); + int first = Character.codePointAt(cs, 0); if (!Character.isJavaIdentifierStart(first)) - return -1; + return false; - int cp = first; int i = Character.charCount(first); - while (i < count) { - cp = Character.codePointAt(cs, offset+i); + while (i < cs.length()) { + int cp = Character.codePointAt(cs, i); if (!Character.isJavaIdentifierPart(cp)) - return -1; + return false; i += Character.charCount(cp); } - return cp; + return true; } + + // keywords, boolean and null literals, not allowed in identifiers + private static final Set RESERVED = Set.of( + "abstract", + "assert", + "boolean", + "break", + "byte", + "case", + "catch", + "char", + "class", + "const", + "continue", + "default", + "do", + "double", + "else", + "enum", + "extends", + "final", + "finally", + "float", + "for", + "goto", + "if", + "implements", + "import", + "instanceof", + "int", + "interface", + "long", + "native", + "new", + "package", + "private", + "protected", + "public", + "return", + "short", + "static", + "strictfp", + "super", + "switch", + "synchronized", + "this", + "throw", + "throws", + "transient", + "try", + "void", + "volatile", + "while", + "true", + "false", + "null", + "_" + ); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileAttributes.java b/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileAttributes.java index 69c7ee670dd..dd3520f044c 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileAttributes.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -26,6 +26,7 @@ package jdk.internal.module; import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleDescriptor.Builder; import java.lang.module.ModuleDescriptor.Requires; import java.lang.module.ModuleDescriptor.Exports; import java.lang.module.ModuleDescriptor.Opens; @@ -98,14 +99,17 @@ public final class ClassFileAttributes { // module_flags int module_flags = cr.readUnsignedShort(off); - boolean open = ((module_flags & ACC_OPEN) != 0); - boolean synthetic = ((module_flags & ACC_SYNTHETIC) != 0); off += 2; - ModuleDescriptor.Builder builder = JLMA.newModuleBuilder(mn, - false, - open, - synthetic); + Set modifiers = new HashSet<>(); + if ((module_flags & ACC_OPEN) != 0) + modifiers.add(ModuleDescriptor.Modifier.OPEN); + if ((module_flags & ACC_SYNTHETIC) != 0) + modifiers.add(ModuleDescriptor.Modifier.SYNTHETIC); + if ((module_flags & ACC_MANDATED) != 0) + modifiers.add(ModuleDescriptor.Modifier.MANDATED); + + Builder builder = JLMA.newModuleBuilder(mn, false, modifiers); // module_version String module_version = cr.readUTF8(off, buf); @@ -142,19 +146,13 @@ public final class ClassFileAttributes { mods.add(Requires.Modifier.MANDATED); } - // requires_version - Version compiledVersion = null; String requires_version = cr.readUTF8(off, buf); off += 2; - if (requires_version != null) { - compiledVersion = Version.parse(requires_version); - } - - if (compiledVersion == null) { + if (requires_version == null) { builder.requires(mods, dn); } else { - builder.requires(mods, dn, compiledVersion); + JLMA.requires(builder, mods, dn, requires_version); } } @@ -283,19 +281,22 @@ public final class ClassFileAttributes { attr.putShort(module_name_index); // module_flags + Set modifiers = descriptor.modifiers(); int module_flags = 0; - if (descriptor.isOpen()) + if (modifiers.contains(ModuleDescriptor.Modifier.OPEN)) module_flags |= ACC_OPEN; - if (descriptor.isSynthetic()) + if (modifiers.contains(ModuleDescriptor.Modifier.SYNTHETIC)) module_flags |= ACC_SYNTHETIC; + if (modifiers.contains(ModuleDescriptor.Modifier.MANDATED)) + module_flags |= ACC_MANDATED; attr.putShort(module_flags); // module_version - Version v = descriptor.version().orElse(null); - if (v == null) { + String vs = descriptor.rawVersion().orElse(null); + if (vs == null) { attr.putShort(0); } else { - int module_version_index = cw.newUTF8(v.toString()); + int module_version_index = cw.newUTF8(vs); attr.putShort(module_version_index); } @@ -319,11 +320,11 @@ public final class ClassFileAttributes { attr.putShort(requires_flags); int requires_version_index; - v = r.compiledVersion().orElse(null); - if (v == null) { + vs = r.rawCompiledVersion().orElse(null); + if (vs == null) { requires_version_index = 0; } else { - requires_version_index = cw.newUTF8(v.toString()); + requires_version_index = cw.newUTF8(vs); } attr.putShort(requires_version_index); } @@ -548,30 +549,26 @@ public final class ClassFileAttributes { * u2 attribute_name_index; * u4 attribute_length; * - * // index to CONSTANT_utf8_info structure with the OS name - * u2 os_name_index; - * // index to CONSTANT_utf8_info structure with the OS arch - * u2 os_arch_index - * // index to CONSTANT_utf8_info structure with the OS version - * u2 os_version_index; + * // index to CONSTANT_utf8_info structure with the target platform + * u2 target_platform_index; * } * * } */ public static class ModuleTargetAttribute extends Attribute { - private final String osName; - private final String osArch; - private final String osVersion; + private final String targetPlatform; - public ModuleTargetAttribute(String osName, String osArch, String osVersion) { + public ModuleTargetAttribute(String targetPlatform) { super(MODULE_TARGET); - this.osName = osName; - this.osArch = osArch; - this.osVersion = osVersion; + this.targetPlatform = targetPlatform; } public ModuleTargetAttribute() { - this(null, null, null); + this(null); + } + + public String targetPlatform() { + return targetPlatform; } @Override @@ -583,26 +580,14 @@ public final class ClassFileAttributes { Label[] labels) { - String osName = null; - String osArch = null; - String osVersion = null; + String targetPlatform = null; - int name_index = cr.readUnsignedShort(off); - if (name_index != 0) - osName = cr.readUTF8(off, buf); + int target_platform_index = cr.readUnsignedShort(off); + if (target_platform_index != 0) + targetPlatform = cr.readUTF8(off, buf); off += 2; - int arch_index = cr.readUnsignedShort(off); - if (arch_index != 0) - osArch = cr.readUTF8(off, buf); - off += 2; - - int version_index = cr.readUnsignedShort(off); - if (version_index != 0) - osVersion = cr.readUTF8(off, buf); - off += 2; - - return new ModuleTargetAttribute(osName, osArch, osVersion); + return new ModuleTargetAttribute(targetPlatform); } @Override @@ -614,20 +599,10 @@ public final class ClassFileAttributes { { ByteVector attr = new ByteVector(); - int name_index = 0; - if (osName != null && osName.length() > 0) - name_index = cw.newUTF8(osName); - attr.putShort(name_index); - - int arch_index = 0; - if (osArch != null && osArch.length() > 0) - arch_index = cw.newUTF8(osArch); - attr.putShort(arch_index); - - int version_index = 0; - if (osVersion != null && osVersion.length() > 0) - version_index = cw.newUTF8(osVersion); - attr.putShort(version_index); + int target_platform_index = 0; + if (targetPlatform != null && targetPlatform.length() > 0) + target_platform_index = cw.newUTF8(targetPlatform); + attr.putShort(target_platform_index); return attr; } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileConstants.java b/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileConstants.java index 48fe536c7aa..66e241ee555 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileConstants.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileConstants.java @@ -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 @@ -46,8 +46,8 @@ public class ClassFileConstants { // access, requires, exports, and opens flags public static final int ACC_MODULE = 0x8000; public static final int ACC_OPEN = 0x0020; - public static final int ACC_TRANSITIVE = 0x0010; - public static final int ACC_STATIC_PHASE = 0x0020; + public static final int ACC_TRANSITIVE = 0x0020; + public static final int ACC_STATIC_PHASE = 0x0040; public static final int ACC_SYNTHETIC = 0x1000; public static final int ACC_MANDATED = 0x8000; diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/IllegalAccessLogger.java b/jdk/src/java.base/share/classes/jdk/internal/module/IllegalAccessLogger.java new file mode 100644 index 00000000000..45170c07c97 --- /dev/null +++ b/jdk/src/java.base/share/classes/jdk/internal/module/IllegalAccessLogger.java @@ -0,0 +1,408 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.internal.module; + +import java.io.PrintStream; +import java.lang.invoke.MethodHandles; +import java.net.URL; +import java.security.AccessController; +import java.security.CodeSource; +import java.security.PrivilegedAction; +import java.security.ProtectionDomain; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.StringJoiner; +import java.util.WeakHashMap; +import java.util.function.Supplier; +import java.util.stream.Collectors; +import static java.util.Collections.*; + +import jdk.internal.misc.JavaLangAccess; +import jdk.internal.misc.SharedSecrets; + +/** + * Supports logging of access to members of exported and concealed packages + * that are opened to code in unnamed modules for illegal access. + */ + +public final class IllegalAccessLogger { + + /** + * Logger modes + */ + public static enum Mode { + /** + * Prints a warning when an illegal access succeeds and then + * discards the logger so that there is no further output. + */ + ONESHOT, + /** + * Print warnings when illegal access succeeds + */ + WARN, + /** + * Prints warnings and a stack trace when illegal access succeeds + */ + DEBUG, + } + + /** + * A builder for IllegalAccessLogger objects. + */ + public static class Builder { + private final Mode mode; + private final PrintStream warningStream; + private final Map> moduleToConcealedPackages; + private final Map> moduleToExportedPackages; + private boolean complete; + + private void ensureNotComplete() { + if (complete) throw new IllegalStateException(); + } + + /** + * Creates a builder. + */ + public Builder(Mode mode, PrintStream warningStream) { + this.mode = mode; + this.warningStream = warningStream; + this.moduleToConcealedPackages = new HashMap<>(); + this.moduleToExportedPackages = new HashMap<>(); + } + + /** + * Adding logging of reflective-access to any member of a type in + * otherwise concealed packages. + */ + public Builder logAccessToConcealedPackages(Module m, Set packages) { + ensureNotComplete(); + moduleToConcealedPackages.put(m, unmodifiableSet(packages)); + return this; + } + + /** + * Adding logging of reflective-access to non-public members/types in + * otherwise exported (not open) packages. + */ + public Builder logAccessToExportedPackages(Module m, Set packages) { + ensureNotComplete(); + moduleToExportedPackages.put(m, unmodifiableSet(packages)); + return this; + } + + /** + * Builds the IllegalAccessLogger and sets it as the system-wise logger. + */ + public void complete() { + Map> map1 = unmodifiableMap(moduleToConcealedPackages); + Map> map2 = unmodifiableMap(moduleToExportedPackages); + logger = new IllegalAccessLogger(mode, warningStream, map1, map2); + complete = true; + } + } + + // need access to java.lang.Module + private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess(); + + // system-wide IllegalAccessLogger + private static volatile IllegalAccessLogger logger; + + // logger mode + private final Mode mode; + + // the print stream to send the warnings + private final PrintStream warningStream; + + // module -> packages open for illegal access + private final Map> moduleToConcealedPackages; + private final Map> moduleToExportedPackages; + + // caller -> usages + private final Map, Usages> callerToUsages = new WeakHashMap<>(); + + private IllegalAccessLogger(Mode mode, + PrintStream warningStream, + Map> moduleToConcealedPackages, + Map> moduleToExportedPackages) + { + this.mode = mode; + this.warningStream = warningStream; + this.moduleToConcealedPackages = moduleToConcealedPackages; + this.moduleToExportedPackages = moduleToExportedPackages; + } + + /** + * Returns the system-wide IllegalAccessLogger or {@code null} if there is + * no logger. + */ + public static IllegalAccessLogger illegalAccessLogger() { + return logger; + } + + /** + * Returns true if the module exports a concealed package for illegal + * access. + */ + public boolean isExportedForIllegalAccess(Module module, String pn) { + Set packages = moduleToConcealedPackages.get(module); + if (packages != null && packages.contains(pn)) + return true; + return false; + } + + /** + * Returns true if the module opens a concealed or exported package for + * illegal access. + */ + public boolean isOpenForIllegalAccess(Module module, String pn) { + if (isExportedForIllegalAccess(module, pn)) + return true; + Set packages = moduleToExportedPackages.get(module); + if (packages != null && packages.contains(pn)) + return true; + return false; + } + + /** + * Logs access to the member of a target class by a caller class if the class + * is in a package that is exported for illegal access. + * + * The {@code whatSupplier} supplies the message that describes the member. + */ + public void logIfExportedForIllegalAccess(Class caller, + Class target, + Supplier whatSupplier) { + Module targetModule = target.getModule(); + String targetPackage = target.getPackageName(); + if (isExportedForIllegalAccess(targetModule, targetPackage)) { + Module callerModule = caller.getModule(); + if (!JLA.isReflectivelyExported(targetModule, targetPackage, callerModule)) { + log(caller, whatSupplier.get()); + } + } + } + + /** + * Logs access to the member of a target class by a caller class if the class + * is in a package that is opened for illegal access. + * + * The {@code what} parameter supplies the message that describes the member. + */ + public void logIfOpenedForIllegalAccess(Class caller, + Class target, + Supplier whatSupplier) { + Module targetModule = target.getModule(); + String targetPackage = target.getPackageName(); + if (isOpenForIllegalAccess(targetModule, targetPackage)) { + Module callerModule = caller.getModule(); + if (!JLA.isReflectivelyOpened(targetModule, targetPackage, callerModule)) { + log(caller, whatSupplier.get()); + } + } + } + + /** + * Logs access by caller lookup if the target class is in a package that is + * opened for illegal access. + */ + public void logIfOpenedForIllegalAccess(MethodHandles.Lookup caller, Class target) { + Module targetModule = target.getModule(); + String targetPackage = target.getPackageName(); + if (isOpenForIllegalAccess(targetModule, targetPackage)) { + Class callerClass = caller.lookupClass(); + Module callerModule = callerClass.getModule(); + if (!JLA.isReflectivelyOpened(targetModule, targetPackage, callerModule)) { + URL url = codeSource(callerClass); + final String source; + if (url == null) { + source = callerClass.getName(); + } else { + source = callerClass.getName() + " (" + url + ")"; + } + log(callerClass, target.getName(), () -> + "WARNING: Illegal reflective access using Lookup on " + source + + " to " + target); + } + } + } + + /** + * Logs access by a caller class. The {@code what} parameter describes + * the member being accessed. + */ + private void log(Class caller, String what) { + log(caller, what, () -> { + URL url = codeSource(caller); + String source = caller.getName(); + if (url != null) + source += " (" + url + ")"; + return "WARNING: Illegal reflective access by " + source + " to " + what; + }); + } + + /** + * Log access by a caller. The {@code what} parameter describes the class or + * member that is being accessed. The {@code msgSupplier} supplies the log + * message. + * + * To reduce output, this method only logs the access if it hasn't been seen + * previously. "Seen previously" is implemented as a map of caller class -> Usage, + * where a Usage is the "what" and a hash of the stack trace. The map has weak + * keys so it can be expunged when the caller is GC'ed/unloaded. + */ + private void log(Class caller, String what, Supplier msgSupplier) { + if (mode == Mode.ONESHOT) { + synchronized (IllegalAccessLogger.class) { + // discard the system wide logger + if (logger == null) + return; + logger = null; + } + warningStream.println(loudWarning(caller, msgSupplier)); + return; + } + + // stack trace without the top-most frames in java.base + List stack = StackWalkerHolder.INSTANCE.walk(s -> + s.dropWhile(this::isJavaBase) + .limit(32) + .collect(Collectors.toList()) + ); + + // record usage if this is the first (or not recently recorded) + Usage u = new Usage(what, hash(stack)); + boolean added; + synchronized (this) { + added = callerToUsages.computeIfAbsent(caller, k -> new Usages()).add(u); + } + + // print warning if this is the first (or not a recent) usage + if (added) { + String msg = msgSupplier.get(); + if (mode == Mode.DEBUG) { + StringBuilder sb = new StringBuilder(msg); + stack.forEach(f -> + sb.append(System.lineSeparator()).append("\tat " + f) + ); + msg = sb.toString(); + } + warningStream.println(msg); + } + } + + /** + * Returns the code source for the given class or null if there is no code source + */ + private URL codeSource(Class clazz) { + PrivilegedAction pa = clazz::getProtectionDomain; + CodeSource cs = AccessController.doPrivileged(pa).getCodeSource(); + return (cs != null) ? cs.getLocation() : null; + } + + private String loudWarning(Class caller, Supplier msgSupplier) { + StringJoiner sj = new StringJoiner(System.lineSeparator()); + sj.add("WARNING: An illegal reflective access operation has occurred"); + sj.add(msgSupplier.get()); + sj.add("WARNING: Please consider reporting this to the maintainers of " + + caller.getName()); + sj.add("WARNING: Use --illegal-access=warn to enable warnings of further" + + " illegal reflective access operations"); + sj.add("WARNING: All illegal access operations will be denied in a" + + " future release"); + return sj.toString(); + } + + private static class StackWalkerHolder { + static final StackWalker INSTANCE; + static { + PrivilegedAction pa = () -> + StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE); + INSTANCE = AccessController.doPrivileged(pa); + } + } + + /** + * Returns true if the stack frame is for a class in java.base. + */ + private boolean isJavaBase(StackWalker.StackFrame frame) { + Module caller = frame.getDeclaringClass().getModule(); + return "java.base".equals(caller.getName()); + } + + /** + * Computes a hash code for the give stack frames. The hash code is based + * on the class, method name, and BCI. + */ + private int hash(List stack) { + int hash = 0; + for (StackWalker.StackFrame frame : stack) { + hash = (31 * hash) + Objects.hash(frame.getDeclaringClass(), + frame.getMethodName(), + frame.getByteCodeIndex()); + } + return hash; + } + + private static class Usage { + private final String what; + private final int stack; + Usage(String what, int stack) { + this.what = what; + this.stack = stack; + } + @Override + public int hashCode() { + return what.hashCode() ^ stack; + } + @Override + public boolean equals(Object ob) { + if (ob instanceof Usage) { + Usage that = (Usage)ob; + return what.equals(that.what) && stack == (that.stack); + } else { + return false; + } + } + } + + @SuppressWarnings("serial") + private static class Usages extends LinkedHashMap { + Usages() { } + boolean add(Usage u) { + return (putIfAbsent(u, Boolean.TRUE) == null); + } + @Override + protected boolean removeEldestEntry(Map.Entry oldest) { + // prevent map growing too big, say where a utility class + // is used by generated code to do illegal access + return size() > 16; + } + } +} diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/IllegalAccessMaps.java b/jdk/src/java.base/share/classes/jdk/internal/module/IllegalAccessMaps.java new file mode 100644 index 00000000000..00ed66d2945 --- /dev/null +++ b/jdk/src/java.base/share/classes/jdk/internal/module/IllegalAccessMaps.java @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package jdk.internal.module; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UncheckedIOException; +import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleFinder; +import java.lang.module.ModuleReference; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import static java.nio.charset.StandardCharsets.*; + +/** + * Generates the maps of concealed and exported packages to open at run-time. + * + * This is used at run-time for exploded builds, and at link-time to generate + * the maps for the system modules in the run-time image. + */ + +public class IllegalAccessMaps { + private final Map> concealedPackagesToOpen; + private final Map> exportedPackagesToOpen; + + private IllegalAccessMaps(Map> map1, + Map> map2) { + this.concealedPackagesToOpen = map1; + this.exportedPackagesToOpen = map2; + } + + /** + * Returns the map of concealed packages to open. The map key is the + * module name, the value is the set of concealed packages to open. + */ + public Map> concealedPackagesToOpen() { + return concealedPackagesToOpen; + } + + /** + * Returns the map of exported packages to open. The map key is the + * module name, the value is the set of exported packages to open. + */ + public Map> exportedPackagesToOpen() { + return exportedPackagesToOpen; + } + + /** + * Generate the maps of module to concealed and exported packages for + * the system modules that are observable with the given module finder. + */ + public static IllegalAccessMaps generate(ModuleFinder finder) { + Map map = new HashMap<>(); + finder.findAll().stream() + .map(ModuleReference::descriptor) + .forEach(md -> md.packages().forEach(pn -> map.putIfAbsent(pn, md))); + + Map> concealedPackagesToOpen = new HashMap<>(); + Map> exportedPackagesToOpen = new HashMap<>(); + + String rn = "jdk8_packages.dat"; + InputStream in = IllegalAccessMaps.class.getResourceAsStream(rn); + if (in == null) { + throw new InternalError(rn + " not found"); + } + try (BufferedReader br = new BufferedReader(new InputStreamReader(in, UTF_8))) { + br.lines() + .filter(line -> !line.isEmpty() && !line.startsWith("#")) + .forEach(pn -> { + ModuleDescriptor descriptor = map.get(pn); + if (descriptor != null && !isOpen(descriptor, pn)) { + String name = descriptor.name(); + if (isExported(descriptor, pn)) { + exportedPackagesToOpen.computeIfAbsent(name, + k -> new HashSet<>()).add(pn); + } else { + concealedPackagesToOpen.computeIfAbsent(name, + k -> new HashSet<>()).add(pn); + } + } + }); + + } catch (IOException ioe) { + throw new UncheckedIOException(ioe); + } + + return new IllegalAccessMaps(concealedPackagesToOpen, exportedPackagesToOpen); + } + + private static boolean isExported(ModuleDescriptor descriptor, String pn) { + return descriptor.exports() + .stream() + .anyMatch(e -> e.source().equals(pn) && !e.isQualified()); + } + + private static boolean isOpen(ModuleDescriptor descriptor, String pn) { + return descriptor.opens() + .stream() + .anyMatch(e -> e.source().equals(pn) && !e.isQualified()); + } +} diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java index 71406460c41..619b03b3596 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -32,8 +32,6 @@ import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; import java.lang.module.ResolvedModule; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.net.URI; import java.nio.file.Path; import java.nio.file.Paths; @@ -41,14 +39,17 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.NoSuchElementException; import java.util.Optional; import java.util.Set; import java.util.function.Function; import jdk.internal.loader.BootLoader; import jdk.internal.loader.BuiltinClassLoader; +import jdk.internal.misc.JavaLangAccess; import jdk.internal.misc.SharedSecrets; import jdk.internal.perf.PerfCounter; @@ -60,8 +61,8 @@ import jdk.internal.perf.PerfCounter; * resolving a set of module names specified via the launcher (or equivalent) * -m and --add-modules options. The modules are located on a module path that * is constructed from the upgrade module path, system modules, and application - * module path. The Configuration is instantiated as the boot Layer with each - * module in the the configuration defined to one of the built-in class loaders. + * module path. The Configuration is instantiated as the boot layer with each + * module in the the configuration defined to a class loader. */ public final class ModuleBootstrap { @@ -86,8 +87,9 @@ public final class ModuleBootstrap { // The ModulePatcher for the initial configuration private static final ModulePatcher patcher = initModulePatcher(); - // ModuleFinder for the initial configuration - private static ModuleFinder initialFinder; + // ModuleFinders for the initial configuration + private static ModuleFinder unlimitedFinder; + private static ModuleFinder limitedFinder; /** * Returns the ModulePatcher for the initial configuration. @@ -97,34 +99,43 @@ public final class ModuleBootstrap { } /** - * Returns the ModuleFinder for the initial configuration + * Returns the ModuleFinder for the initial configuration before observability + * is limited by the --limit-modules command line option. */ - public static ModuleFinder finder() { - assert initialFinder != null; - return initialFinder; + public static ModuleFinder unlimitedFinder() { + assert unlimitedFinder != null; + return unlimitedFinder; } /** - * Initialize the module system, returning the boot Layer. + * Returns the ModuleFinder for the initial configuration. + */ + public static ModuleFinder limitedFinder() { + assert limitedFinder != null; + return limitedFinder; + } + + /** + * Initialize the module system, returning the boot layer. * * @see java.lang.System#initPhase2() */ - public static Layer boot() { - - long t0 = System.nanoTime(); - - // system modules (may be patched) - ModuleFinder systemModules = ModuleFinder.ofSystem(); - - PerfCounters.systemModulesTime.addElapsedTimeFrom(t0); + public static ModuleLayer boot() { + // Step 1: Locate system modules (may be patched) long t1 = System.nanoTime(); + ModuleFinder systemModules = ModuleFinder.ofSystem(); + PerfCounters.systemModulesTime.addElapsedTimeFrom(t1); + + + // Step 2: Define and load java.base. This patches all classes loaded + // to date so that they are members of java.base. Once java.base is + // loaded then resources in java.base are available for error messages + // needed from here on. + + long t2 = System.nanoTime(); - // Once we have the system modules then we define the base module to - // the VM. We do this here so that java.base is defined as early as - // possible and also that resources in the base module can be located - // for error messages that may happen from here on. ModuleReference base = systemModules.find(JAVA_BASE).orElse(null); if (base == null) throw new InternalError(JAVA_BASE + " not found"); @@ -134,10 +145,23 @@ public final class ModuleBootstrap { BootLoader.loadModule(base); Modules.defineModule(null, base.descriptor(), baseUri); - PerfCounters.defineBaseTime.addElapsedTimeFrom(t1); + PerfCounters.defineBaseTime.addElapsedTimeFrom(t2); - long t2 = System.nanoTime(); + // Step 2a: If --validate-modules is specified then the VM needs to + // start with only java.base, all other options are ignored. + + String propValue = getAndRemoveProperty("jdk.module.minimumBoot"); + if (propValue != null) { + return createMinimalBootLayer(); + } + + + // Step 3: Construct the module path and the set of root modules to + // resolve. If --limit-modules is specified then it limits the set + // modules that are observable. + + long t3 = System.nanoTime(); // --upgrade-module-path option specified to launcher ModuleFinder upgradeModulePath @@ -182,7 +206,8 @@ public final class ModuleBootstrap { } // --limit-modules - String propValue = getAndRemoveProperty("jdk.module.limitmods"); + unlimitedFinder = finder; + propValue = getAndRemoveProperty("jdk.module.limitmods"); if (propValue != null) { Set mods = new HashSet<>(); for (String mod: propValue.split(",")) { @@ -190,6 +215,7 @@ public final class ModuleBootstrap { } finder = limitFinder(finder, mods, roots); } + limitedFinder = finder; // If there is no initial module specified then assume that the initial // module is the unnamed module of the application class loader. This @@ -236,7 +262,6 @@ public final class ModuleBootstrap { ModuleFinder f = finder; // observable modules systemModules.findAll() .stream() - .filter(mref -> !ModuleResolution.doNotResolveByDefault(mref)) .map(ModuleReference::descriptor) .map(ModuleDescriptor::name) .filter(mn -> f.find(mn).isPresent()) // observable @@ -255,10 +280,13 @@ public final class ModuleBootstrap { .forEach(mn -> roots.add(mn)); } - PerfCounters.optionsAndRootsTime.addElapsedTimeFrom(t2); + PerfCounters.optionsAndRootsTime.addElapsedTimeFrom(t3); - long t3 = System.nanoTime(); + // Step 4: Resolve the root modules, with service binding, to create + // the configuration for the boot layer. + + long t4 = System.nanoTime(); // determine if post resolution checks are needed boolean needPostResolutionChecks = true; @@ -270,21 +298,28 @@ public final class ModuleBootstrap { } PrintStream traceOutput = null; - if (Boolean.getBoolean("jdk.launcher.traceResolver")) + propValue = getAndRemoveProperty("jdk.module.showModuleResolution"); + if (propValue != null && Boolean.parseBoolean(propValue)) traceOutput = System.out; // run the resolver to create the configuration Configuration cf = SharedSecrets.getJavaLangModuleAccess() - .resolveRequiresAndUses(finder, - roots, - needPostResolutionChecks, - traceOutput); + .resolveAndBind(finder, + roots, + needPostResolutionChecks, + traceOutput); - // time to create configuration - PerfCounters.resolveTime.addElapsedTimeFrom(t3); + PerfCounters.resolveTime.addElapsedTimeFrom(t4); - // check module names and incubating status - checkModuleNamesAndStatus(cf); + + // Step 5: Map the modules in the configuration to class loaders. + // The static configuration provides the mapping of standard and JDK + // modules to the boot and platform loaders. All other modules (JDK + // tool modules, and both explicit and automatic modules on the + // application module path) are defined to the application class + // loader. + + long t5 = System.nanoTime(); // mapping of modules to class loaders Function clf = ModuleLoaderMap.mappingFunction(cf); @@ -297,11 +332,9 @@ public final class ModuleBootstrap { String name = mref.descriptor().name(); ClassLoader cl = clf.apply(name); if (cl == null) { - if (upgradeModulePath != null && upgradeModulePath.find(name).isPresent()) fail(name + ": cannot be loaded from upgrade module path"); - if (!systemModules.find(name).isPresent()) fail(name + ": cannot be loaded from application module path"); } @@ -315,62 +348,101 @@ public final class ModuleBootstrap { } } - // if needed check that there are no split packages in the set of - // resolved modules for the boot layer + // check for split packages in the modules mapped to the built-in loaders if (SystemModules.hasSplitPackages() || needPostResolutionChecks) { - Map packageToModule = new HashMap<>(); - for (ResolvedModule resolvedModule : cf.modules()) { - ModuleDescriptor descriptor = - resolvedModule.reference().descriptor(); - String name = descriptor.name(); - for (String p : descriptor.packages()) { - String other = packageToModule.putIfAbsent(p, name); - if (other != null) { - fail("Package " + p + " in both module " - + name + " and module " + other); - } - } - } - } - - long t4 = System.nanoTime(); - - // define modules to VM/runtime - Layer bootLayer = Layer.empty().defineModules(cf, clf); - - PerfCounters.layerCreateTime.addElapsedTimeFrom(t4); - - - long t5 = System.nanoTime(); - - // define the module to its class loader, except java.base - for (ResolvedModule resolvedModule : cf.modules()) { - ModuleReference mref = resolvedModule.reference(); - String name = mref.descriptor().name(); - ClassLoader cl = clf.apply(name); - if (cl == null) { - if (!name.equals(JAVA_BASE)) BootLoader.loadModule(mref); - } else { - ((BuiltinClassLoader)cl).loadModule(mref); - } + checkSplitPackages(cf, clf); } + // load/register the modules with the built-in class loaders + loadModules(cf, clf); + PerfCounters.loadModulesTime.addElapsedTimeFrom(t5); - // --add-reads, -add-exports/-add-opens + // Step 6: Define all modules to the VM + + long t6 = System.nanoTime(); + ModuleLayer bootLayer = ModuleLayer.empty().defineModules(cf, clf); + PerfCounters.layerCreateTime.addElapsedTimeFrom(t6); + + + // Step 7: Miscellaneous + + // check incubating status + checkIncubatingStatus(cf); + + // --add-reads, --add-exports/--add-opens, and -illegal-access + long t7 = System.nanoTime(); addExtraReads(bootLayer); - addExtraExportsAndOpens(bootLayer); + boolean extraExportsOrOpens = addExtraExportsAndOpens(bootLayer); + addIllegalAccess(bootLayer, upgradeModulePath, extraExportsOrOpens); + PerfCounters.adjustModulesTime.addElapsedTimeFrom(t7); // total time to initialize - PerfCounters.bootstrapTime.addElapsedTimeFrom(t0); - - // remember the ModuleFinder - initialFinder = finder; + PerfCounters.bootstrapTime.addElapsedTimeFrom(t1); return bootLayer; } + /** + * Create a "minimal" boot module layer that only contains java.base. + */ + private static ModuleLayer createMinimalBootLayer() { + Configuration cf = SharedSecrets.getJavaLangModuleAccess() + .resolveAndBind(ModuleFinder.ofSystem(), + Set.of(JAVA_BASE), + false, + null); + + Function clf = ModuleLoaderMap.mappingFunction(cf); + return ModuleLayer.empty().defineModules(cf, clf); + } + + /** + * Load/register the modules to the built-in class loaders. + */ + private static void loadModules(Configuration cf, + Function clf) { + for (ResolvedModule resolvedModule : cf.modules()) { + ModuleReference mref = resolvedModule.reference(); + String name = resolvedModule.name(); + ClassLoader loader = clf.apply(name); + if (loader == null) { + // skip java.base as it is already loaded + if (!name.equals(JAVA_BASE)) { + BootLoader.loadModule(mref); + } + } else if (loader instanceof BuiltinClassLoader) { + ((BuiltinClassLoader) loader).loadModule(mref); + } + } + } + + /** + * Checks for split packages between modules defined to the built-in class + * loaders. + */ + private static void checkSplitPackages(Configuration cf, + Function clf) { + Map packageToModule = new HashMap<>(); + for (ResolvedModule resolvedModule : cf.modules()) { + ModuleDescriptor descriptor = resolvedModule.reference().descriptor(); + String name = descriptor.name(); + ClassLoader loader = clf.apply(name); + if (loader == null || loader instanceof BuiltinClassLoader) { + for (String p : descriptor.packages()) { + String other = packageToModule.putIfAbsent(p, name); + if (other != null) { + String msg = "Package " + p + " in both module " + + name + " and module " + other; + throw new LayerInstantiationException(msg); + } + } + } + + } + } + /** * Returns a ModuleFinder that limits observability to the given root * modules, their transitive dependences, plus a set of other modules. @@ -380,10 +452,9 @@ public final class ModuleBootstrap { Set otherMods) { // resolve all root modules - Configuration cf = Configuration.empty() - .resolveRequires(finder, - ModuleFinder.of(), - roots); + Configuration cf = Configuration.empty().resolve(finder, + ModuleFinder.of(), + roots); // module name -> reference Map map = new HashMap<>(); @@ -416,7 +487,7 @@ public final class ModuleBootstrap { /** * Creates a finder from the module path that is the value of the given - * system property. + * system property and optionally patched by --patch-module */ private static ModuleFinder createModulePathFinder(String prop) { String s = System.getProperty(prop); @@ -429,19 +500,18 @@ public final class ModuleBootstrap { for (String dir: dirs) { paths[i++] = Paths.get(dir); } - return ModuleFinder.of(paths); + return ModulePath.of(patcher, paths); } } - /** * Initialize the module patcher for the initial configuration passed on the * value of the --patch-module options. */ private static ModulePatcher initModulePatcher() { Map> map = decode("jdk.module.patch.", - File.pathSeparator, - false); + File.pathSeparator, + false); return new ModulePatcher(map); } @@ -475,7 +545,7 @@ public final class ModuleBootstrap { * Process the --add-reads options to add any additional read edges that * are specified on the command-line. */ - private static void addExtraReads(Layer bootLayer) { + private static void addExtraReads(ModuleLayer bootLayer) { // decode the command line options Map> map = decode("jdk.module.addreads."); @@ -513,24 +583,30 @@ public final class ModuleBootstrap { * Process the --add-exports and --add-opens options to export/open * additional packages specified on the command-line. */ - private static void addExtraExportsAndOpens(Layer bootLayer) { + private static boolean addExtraExportsAndOpens(ModuleLayer bootLayer) { + boolean extraExportsOrOpens = false; // --add-exports String prefix = "jdk.module.addexports."; Map> extraExports = decode(prefix); if (!extraExports.isEmpty()) { addExtraExportsOrOpens(bootLayer, extraExports, false); + extraExportsOrOpens = true; } + // --add-opens prefix = "jdk.module.addopens."; Map> extraOpens = decode(prefix); if (!extraOpens.isEmpty()) { addExtraExportsOrOpens(bootLayer, extraOpens, true); + extraExportsOrOpens = true; } + + return extraExportsOrOpens; } - private static void addExtraExportsOrOpens(Layer bootLayer, + private static void addExtraExportsOrOpens(ModuleLayer bootLayer, Map> map, boolean opens) { @@ -541,12 +617,12 @@ public final class ModuleBootstrap { String key = e.getKey(); String[] s = key.split("/"); if (s.length != 2) - fail(unableToParse(option, "/", key)); + fail(unableToParse(option, "/", key)); String mn = s[0]; String pn = s[1]; if (mn.isEmpty() || pn.isEmpty()) - fail(unableToParse(option, "/", key)); + fail(unableToParse(option, "/", key)); // The exporting module is in the boot layer Module m; @@ -596,6 +672,102 @@ public final class ModuleBootstrap { } } + /** + * Process the --illegal-access option (and its default) to open packages + * of system modules in the boot layer to code in unnamed modules. + */ + private static void addIllegalAccess(ModuleLayer bootLayer, + ModuleFinder upgradeModulePath, + boolean extraExportsOrOpens) { + String value = getAndRemoveProperty("jdk.module.illegalAccess"); + IllegalAccessLogger.Mode mode = IllegalAccessLogger.Mode.ONESHOT; + if (value != null) { + switch (value) { + case "deny": + return; + case "permit": + break; + case "warn": + mode = IllegalAccessLogger.Mode.WARN; + break; + case "debug": + mode = IllegalAccessLogger.Mode.DEBUG; + break; + default: + fail("Value specified to --illegal-access not recognized:" + + " '" + value + "'"); + return; + } + } + IllegalAccessLogger.Builder builder + = new IllegalAccessLogger.Builder(mode, System.err); + + Map> map1 = SystemModules.concealedPackagesToOpen(); + Map> map2 = SystemModules.exportedPackagesToOpen(); + if (map1.isEmpty() && map2.isEmpty()) { + // need to generate maps when on exploded build + IllegalAccessMaps maps = IllegalAccessMaps.generate(limitedFinder()); + map1 = maps.concealedPackagesToOpen(); + map2 = maps.exportedPackagesToOpen(); + } + + // open specific packages in the system modules + for (Module m : bootLayer.modules()) { + ModuleDescriptor descriptor = m.getDescriptor(); + String name = m.getName(); + + // skip open modules + if (descriptor.isOpen()) { + continue; + } + + // skip modules loaded from the upgrade module path + if (upgradeModulePath != null + && upgradeModulePath.find(name).isPresent()) { + continue; + } + + Set concealedPackages = map1.getOrDefault(name, Set.of()); + Set exportedPackages = map2.getOrDefault(name, Set.of()); + + // refresh the set of concealed and exported packages if needed + if (extraExportsOrOpens) { + concealedPackages = new HashSet<>(concealedPackages); + exportedPackages = new HashSet<>(exportedPackages); + Iterator iterator = concealedPackages.iterator(); + while (iterator.hasNext()) { + String pn = iterator.next(); + if (m.isExported(pn, BootLoader.getUnnamedModule())) { + // concealed package is exported to ALL-UNNAMED + iterator.remove(); + exportedPackages.add(pn); + } + } + iterator = exportedPackages.iterator(); + while (iterator.hasNext()) { + String pn = iterator.next(); + if (m.isOpen(pn, BootLoader.getUnnamedModule())) { + // exported package is opened to ALL-UNNAMED + iterator.remove(); + } + } + } + + // log reflective access to all types in concealed packages + builder.logAccessToConcealedPackages(m, concealedPackages); + + // log reflective access to non-public members/types in exported packages + builder.logAccessToExportedPackages(m, exportedPackages); + + // open the packages to unnamed modules + JavaLangAccess jla = SharedSecrets.getJavaLangAccess(); + jla.addOpensToAllUnnamed(m, concat(concealedPackages.iterator(), + exportedPackages.iterator())); + } + + builder.complete(); + } + /** * Decodes the values of --add-reads, -add-exports, --add-opens or * --patch-modules options that are encoded in system properties. @@ -631,7 +803,7 @@ public final class ModuleBootstrap { // value is (,)* or ()* if (!allowDuplicates && map.containsKey(key)) - fail(key + " specified more than once in " + option(prefix)); + fail(key + " specified more than once to " + option(prefix)); List values = map.computeIfAbsent(key, k -> new ArrayList<>()); int ntargets = 0; for (String s : rhs.split(regex)) { @@ -666,21 +838,16 @@ public final class ModuleBootstrap { } /** - * Checks the names and resolution bit of each module in the configuration, - * emitting warnings if needed. + * Checks incubating status of modules in the configuration */ - private static void checkModuleNamesAndStatus(Configuration cf) { + private static void checkIncubatingStatus(Configuration cf) { String incubating = null; - for (ResolvedModule rm : cf.modules()) { - ModuleReference mref = rm.reference(); - String mn = mref.descriptor().name(); - - // emit warning if module name ends with a non-Java letter - if (!Checks.hasLegalModuleNameLastCharacter(mn)) - warn("Module name \"" + mn + "\" may soon be illegal"); + for (ResolvedModule resolvedModule : cf.modules()) { + ModuleReference mref = resolvedModule.reference(); // emit warning if the WARN_INCUBATING module resolution bit set if (ModuleResolution.hasIncubatingWarning(mref)) { + String mn = mref.descriptor().name(); if (incubating == null) { incubating = mn; } else { @@ -704,7 +871,7 @@ public final class ModuleBootstrap { } static void warnUnknownModule(String option, String mn) { - warn("Unknown module: " + mn + " specified in " + option); + warn("Unknown module: " + mn + " specified to " + option); } static String unableToParse(String option, String text, String value) { @@ -739,6 +906,21 @@ public final class ModuleBootstrap { } } + static Iterator concat(Iterator iterator1, Iterator iterator2) { + return new Iterator() { + @Override + public boolean hasNext() { + return iterator1.hasNext() || iterator2.hasNext(); + } + @Override + public T next() { + if (iterator1.hasNext()) return iterator1.next(); + if (iterator2.hasNext()) return iterator2.next(); + throw new NoSuchElementException(); + } + }; + } + static class PerfCounters { static PerfCounter systemModulesTime @@ -753,6 +935,8 @@ public final class ModuleBootstrap { = PerfCounter.newPerfCounter("jdk.module.bootstrap.layerCreateTime"); static PerfCounter loadModulesTime = PerfCounter.newPerfCounter("jdk.module.bootstrap.loadModulesTime"); + static PerfCounter adjustModulesTime + = PerfCounter.newPerfCounter("jdk.module.bootstrap.adjustModulesTime"); static PerfCounter bootstrapTime = PerfCounter.newPerfCounter("jdk.module.bootstrap.totalTime"); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java index d808fe1db48..804f5eb4527 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java @@ -138,7 +138,7 @@ public class ModuleHashesBuilder { } /* - * Utilty class + * Utility class */ static class Graph { private final Set nodes; diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java index 3aac651577c..f6f1bb07e16 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -37,7 +37,6 @@ import java.lang.module.ModuleDescriptor.Builder; import java.lang.module.ModuleDescriptor.Requires; import java.lang.module.ModuleDescriptor.Exports; import java.lang.module.ModuleDescriptor.Opens; -import java.lang.module.ModuleDescriptor.Version; import java.nio.ByteBuffer; import java.nio.BufferUnderflowException; import java.util.ArrayList; @@ -51,7 +50,6 @@ import java.util.function.Supplier; import jdk.internal.misc.JavaLangModuleAccess; import jdk.internal.misc.SharedSecrets; -import jdk.internal.module.ModuleResolution; import static jdk.internal.module.ClassFileConstants.*; @@ -91,18 +89,24 @@ public final class ModuleInfo { */ public static final class Attributes { private final ModuleDescriptor descriptor; + private final ModuleTarget target; private final ModuleHashes recordedHashes; private final ModuleResolution moduleResolution; Attributes(ModuleDescriptor descriptor, + ModuleTarget target, ModuleHashes recordedHashes, ModuleResolution moduleResolution) { this.descriptor = descriptor; + this.target = target; this.recordedHashes = recordedHashes; this.moduleResolution = moduleResolution; } public ModuleDescriptor descriptor() { return descriptor; } + public ModuleTarget target() { + return target; + } public ModuleHashes recordedHashes() { return recordedHashes; } @@ -221,10 +225,10 @@ public final class ModuleInfo { Set attributes = new HashSet<>(); Builder builder = null; - Set packages = null; + Set allPackages = null; String mainClass = null; - String[] osValues = null; - ModuleHashes hashes = null; + ModuleTarget moduleTarget = null; + ModuleHashes moduelHashes = null; ModuleResolution moduleResolution = null; for (int i = 0; i < attributes_count ; i++) { @@ -245,7 +249,7 @@ public final class ModuleInfo { break; case MODULE_PACKAGES : - packages = readModulePackagesAttribute(in, cpool); + allPackages = readModulePackagesAttribute(in, cpool); break; case MODULE_MAIN_CLASS : @@ -253,12 +257,12 @@ public final class ModuleInfo { break; case MODULE_TARGET : - osValues = readModuleTargetAttribute(in, cpool); + moduleTarget = readModuleTargetAttribute(in, cpool); break; case MODULE_HASHES : if (parseHashes) { - hashes = readModuleHashesAttribute(in, cpool); + moduelHashes = readModuleHashesAttribute(in, cpool); } else { in.skipBytes(length); } @@ -284,55 +288,46 @@ public final class ModuleInfo { throw invalidModuleDescriptor(MODULE + " attribute not found"); } + // ModuleMainClass attribute + if (mainClass != null) { + builder.mainClass(mainClass); + } + // If the ModulePackages attribute is not present then the packageFinder // is used to find the set of packages boolean usedPackageFinder = false; - if (packages == null && packageFinder != null) { + if (allPackages == null && packageFinder != null) { try { - packages = new HashSet<>(packageFinder.get()); + allPackages = packageFinder.get(); } catch (UncheckedIOException x) { throw x.getCause(); } usedPackageFinder = true; } - if (packages != null) { - Set exportedPackages = JLMA.exportedPackages(builder); - Set openPackages = JLMA.openPackages(builder); - if (packages.containsAll(exportedPackages) - && packages.containsAll(openPackages)) { - packages.removeAll(exportedPackages); - packages.removeAll(openPackages); - } else { - // the set of packages is not complete - Set exportedAndOpenPackages = new HashSet<>(); - exportedAndOpenPackages.addAll(exportedPackages); - exportedAndOpenPackages.addAll(openPackages); - for (String pn : exportedAndOpenPackages) { - if (!packages.contains(pn)) { - String tail; - if (usedPackageFinder) { - tail = " not found by package finder"; - } else { - tail = " missing from ModulePackages attribute"; - } - throw invalidModuleDescriptor("Package " + pn + tail); - } + if (allPackages != null) { + Set knownPackages = JLMA.packages(builder); + if (!allPackages.containsAll(knownPackages)) { + Set missingPackages = new HashSet<>(knownPackages); + missingPackages.removeAll(allPackages); + assert !missingPackages.isEmpty(); + String missingPackage = missingPackages.iterator().next(); + String tail; + if (usedPackageFinder) { + tail = " not found in module"; + } else { + tail = " missing from ModulePackages class file attribute"; } - assert false; // should not get here - } - builder.contains(packages); - } + throw invalidModuleDescriptor("Package " + missingPackage + tail); - if (mainClass != null) - builder.mainClass(mainClass); - if (osValues != null) { - if (osValues[0] != null) builder.osName(osValues[0]); - if (osValues[1] != null) builder.osArch(osValues[1]); - if (osValues[2] != null) builder.osVersion(osValues[2]); + } + builder.packages(allPackages); } ModuleDescriptor descriptor = builder.build(); - return new Attributes(descriptor, hashes, moduleResolution); + return new Attributes(descriptor, + moduleTarget, + moduelHashes, + moduleResolution); } /** @@ -347,10 +342,17 @@ public final class ModuleInfo { String mn = cpool.getModuleName(module_name_index); int module_flags = in.readUnsignedShort(); - boolean open = ((module_flags & ACC_OPEN) != 0); - boolean synthetic = ((module_flags & ACC_SYNTHETIC) != 0); - Builder builder = JLMA.newModuleBuilder(mn, false, open, synthetic); + Set modifiers = new HashSet<>(); + boolean open = ((module_flags & ACC_OPEN) != 0); + if (open) + modifiers.add(ModuleDescriptor.Modifier.OPEN); + if ((module_flags & ACC_SYNTHETIC) != 0) + modifiers.add(ModuleDescriptor.Modifier.SYNTHETIC); + if ((module_flags & ACC_MANDATED) != 0) + modifiers.add(ModuleDescriptor.Modifier.MANDATED); + + Builder builder = JLMA.newModuleBuilder(mn, false, modifiers); int module_version_index = in.readUnsignedShort(); if (module_version_index != 0) { @@ -381,16 +383,11 @@ public final class ModuleInfo { } int requires_version_index = in.readUnsignedShort(); - Version compiledVersion = null; - if (requires_version_index != 0) { - String vs = cpool.getUtf8(requires_version_index); - compiledVersion = Version.parse(vs); - } - - if (compiledVersion == null) { + if (requires_version_index == 0) { builder.requires(mods, dn); } else { - builder.requires(mods, dn, compiledVersion); + String vs = cpool.getUtf8(requires_version_index); + JLMA.requires(builder, mods, dn, vs); } if (dn.equals("java.base")) @@ -429,7 +426,11 @@ public final class ModuleInfo { Set targets = new HashSet<>(exports_to_count); for (int j=0; j targets = new HashSet<>(open_to_count); for (int j=0; j notAllowed = predefinedNotAllowed; @@ -640,6 +635,7 @@ public final class ModuleInfo { notAllowed = Set.of( "ConstantValue", "Code", + "Deprecated", "StackMapTable", "Exceptions", "EnclosingMethod", diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java index 0d05ad296e9..270d0a2605f 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java @@ -56,16 +56,14 @@ public final class ModuleInfoExtender { // the packages in the ModulePackages attribute private Set packages; - // the value of the module_version in Module attribute + // the value for the module version in the Module attribute private Version version; // the value of the ModuleMainClass attribute private String mainClass; - // the values for the ModuleTarget attribute - private String osName; - private String osArch; - private String osVersion; + // the value for the ModuleTarget attribute + private String targetPlatform; // the hashes for the ModuleHashes attribute private ModuleHashes hashes; @@ -78,7 +76,11 @@ public final class ModuleInfoExtender { } /** - * Sets the set of packages for the ModulePackages attribute + * Sets the packages for the ModulePackages attribute + * + * @apiNote This method does not check that the package names are legal + * package names or that the set of packages is a super set of the + * packages in the module. */ public ModuleInfoExtender packages(Set packages) { this.packages = Collections.unmodifiableSet(packages); @@ -86,7 +88,7 @@ public final class ModuleInfoExtender { } /** - * Sets the value of the module_version in Module attribute. + * Sets the value for the module version in the Module attribute */ public ModuleInfoExtender version(Version version) { this.version = version; @@ -95,6 +97,9 @@ public final class ModuleInfoExtender { /** * Sets the value of the ModuleMainClass attribute. + * + * @apiNote This method does not check that the main class is a legal + * class name in a named package. */ public ModuleInfoExtender mainClass(String mainClass) { this.mainClass = mainClass; @@ -102,14 +107,10 @@ public final class ModuleInfoExtender { } /** - * Sets the values for the ModuleTarget attribute. + * Sets the value for the ModuleTarget attribute. */ - public ModuleInfoExtender targetPlatform(String osName, - String osArch, - String osVersion) { - this.osName = osName; - this.osArch = osArch; - this.osVersion = osVersion; + public ModuleInfoExtender targetPlatform(String targetPlatform) { + this.targetPlatform = targetPlatform; return this; } @@ -133,7 +134,7 @@ public final class ModuleInfoExtender { /** * A ClassVisitor that supports adding class file attributes. If an - * attribute already exists then the first occurence of the attribute + * attribute already exists then the first occurrence of the attribute * is replaced. */ private static class AttributeAddingClassVisitor extends ClassVisitor { @@ -196,8 +197,8 @@ public final class ModuleInfoExtender { cv.addAttribute(new ModulePackagesAttribute(packages)); if (mainClass != null) cv.addAttribute(new ModuleMainClassAttribute(mainClass)); - if (osName != null || osArch != null || osVersion != null) - cv.addAttribute(new ModuleTargetAttribute(osName, osArch, osVersion)); + if (targetPlatform != null) + cv.addAttribute(new ModuleTargetAttribute(targetPlatform)); if (hashes != null) cv.addAttribute(new ModuleHashesAttribute(hashes)); if (moduleResolution != null) diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java index 5a17442106c..dded95fe93d 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -48,7 +48,7 @@ public final class ModuleInfoWriter { * Writes the given module descriptor to a module-info.class file, * returning it in a byte array. */ - private static byte[] toModuleInfo(ModuleDescriptor md) { + private static byte[] toModuleInfo(ModuleDescriptor md, ModuleTarget target) { ClassWriter cw = new ClassWriter(0); cw.visit(Opcodes.V1_9, ACC_MODULE, "module-info", null, null, null); cw.visitAttribute(new ModuleAttribute(md)); @@ -66,18 +66,28 @@ public final class ModuleInfoWriter { // write ModuleMainClass if the module has a main class md.mainClass().ifPresent(mc -> cw.visitAttribute(new ModuleMainClassAttribute(mc))); - // write ModuleTarget attribute if have any of OS name/arch/version - String osName = md.osName().orElse(null); - String osArch = md.osArch().orElse(null); - String osVersion = md.osVersion().orElse(null); - if (osName != null || osArch != null || osVersion != null) { - cw.visitAttribute(new ModuleTargetAttribute(osName, osArch, osVersion)); + // write ModuleTarget if there is a target platform + if (target != null) { + cw.visitAttribute(new ModuleTargetAttribute(target.targetPlatform())); } cw.visitEnd(); return cw.toByteArray(); } + /** + * Writes a module descriptor to the given output stream as a + * module-info.class. + */ + public static void write(ModuleDescriptor descriptor, + ModuleTarget target, + OutputStream out) + throws IOException + { + byte[] bytes = toModuleInfo(descriptor, target); + out.write(bytes); + } + /** * Writes a module descriptor to the given output stream as a * module-info.class. @@ -85,8 +95,7 @@ public final class ModuleInfoWriter { public static void write(ModuleDescriptor descriptor, OutputStream out) throws IOException { - byte[] bytes = toModuleInfo(descriptor); - out.write(bytes); + write(descriptor, null, out); } /** @@ -94,8 +103,7 @@ public final class ModuleInfoWriter { * in module-info.class format. */ public static ByteBuffer toByteBuffer(ModuleDescriptor descriptor) { - byte[] bytes = toModuleInfo(descriptor); + byte[] bytes = toModuleInfo(descriptor, null); return ByteBuffer.wrap(bytes); } - } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java index 9c3308f97a0..b0f465d4776 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java @@ -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 @@ -37,39 +37,66 @@ import jdk.internal.loader.ClassLoaders; /** - * The module to class loader map. The list of boot modules and platform modules - * are generated at build time. + * Supports the mapping of modules to class loaders. The set of modules mapped + * to the boot and platform class loaders is generated at build time from + * this source file. */ -final class ModuleLoaderMap { - /* - * The list of boot modules and platform modules are generated at build time. +public final class ModuleLoaderMap { + + /** + * Maps the system modules to the built-in class loaders. */ - private static final String[] BOOT_MODULES - = new String[] { "@@BOOT_MODULE_NAMES@@" }; - private static final String[] PLATFORM_MODULES - = new String[] { "@@PLATFORM_MODULE_NAMES@@" }; + public static final class Mapper implements Function { + private final Map map; + + Mapper(Map map) { + this.map = map; // defensive copy not needed + } + + @Override + public ClassLoader apply(String name) { + return map.get(name); + } + } + + /** + * Returns the names of the modules defined to the boot loader. + */ + public static Set bootModules() { + // The list of boot modules generated at build time. + String[] BOOT_MODULES = new String[] { "@@BOOT_MODULE_NAMES@@" }; + Set bootModules = new HashSet<>(BOOT_MODULES.length); + for (String mn : BOOT_MODULES) { + bootModules.add(mn); + } + return bootModules; + } + + /** + * Returns the names of the modules defined to the platform loader. + */ + public static Set platformModules() { + // The list of platform modules generated at build time. + String[] PLATFORM_MODULES = new String[] { "@@PLATFORM_MODULE_NAMES@@" }; + Set platformModules = new HashSet<>(PLATFORM_MODULES.length); + for (String mn : PLATFORM_MODULES) { + platformModules.add(mn); + } + return platformModules; + } /** * Returns the function to map modules in the given configuration to the * built-in class loaders. */ static Function mappingFunction(Configuration cf) { - - Set bootModules = new HashSet<>(BOOT_MODULES.length); - for (String mn : BOOT_MODULES) { - bootModules.add(mn); - } - - Set platformModules = new HashSet<>(PLATFORM_MODULES.length); - for (String mn : PLATFORM_MODULES) { - platformModules.add(mn); - } + Set bootModules = bootModules(); + Set platformModules = platformModules(); ClassLoader platformClassLoader = ClassLoaders.platformClassLoader(); ClassLoader appClassLoader = ClassLoaders.appClassLoader(); Map map = new HashMap<>(); - for (ResolvedModule resolvedModule : cf.modules()) { String mn = resolvedModule.name(); if (!bootModules.contains(mn)) { @@ -80,12 +107,6 @@ final class ModuleLoaderMap { } } } - - return new Function () { - @Override - public ClassLoader apply(String mn) { - return map.get(mn); - } - }; + return new Mapper(map); } } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java index 5bd7ef5ed04..c0458e0f34e 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -31,6 +31,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.UncheckedIOException; import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleDescriptor.Builder; import java.lang.module.ModuleReader; import java.lang.module.ModuleReference; import java.net.MalformedURLException; @@ -108,18 +109,23 @@ public final class ModulePatcher { if (paths == null) return mref; - // scan the JAR file or directory tree to get the set of packages + // Scan the JAR file or directory tree to get the set of packages. + // For automatic modules then packages that do not contain class files + // must be ignored. Set packages = new HashSet<>(); + boolean isAutomatic = descriptor.isAutomatic(); try { for (Path file : paths) { if (Files.isRegularFile(file)) { // JAR file - do not open as a multi-release JAR as this // is not supported by the boot class loader - try (JarFile jf = new JarFile(file.toFile())) { + try (JarFile jf = new JarFile(file.toString())) { jf.stream() + .filter(e -> !e.isDirectory() + && (!isAutomatic || e.getName().endsWith(".class"))) .map(e -> toPackageName(file, e)) - .filter(Checks::isJavaIdentifier) + .filter(Checks::isPackageName) .forEach(packages::add); } @@ -129,8 +135,11 @@ public final class ModulePatcher { Path top = file; Files.find(top, Integer.MAX_VALUE, ((path, attrs) -> attrs.isRegularFile())) + .filter(path -> (!isAutomatic + || path.toString().endsWith(".class")) + && !isHidden(path)) .map(path -> toPackageName(top, path)) - .filter(Checks::isJavaIdentifier) + .filter(Checks::isPackageName) .forEach(packages::add); } @@ -141,20 +150,41 @@ public final class ModulePatcher { } // if there are new packages then we need a new ModuleDescriptor - Set original = descriptor.packages(); - packages.addAll(original); - if (packages.size() > original.size()) { - descriptor = JLMA.newModuleDescriptor(descriptor, packages); + packages.removeAll(descriptor.packages()); + if (!packages.isEmpty()) { + Builder builder = JLMA.newModuleBuilder(descriptor.name(), + /*strict*/ false, + descriptor.modifiers()); + if (!descriptor.isAutomatic()) { + descriptor.requires().forEach(builder::requires); + descriptor.exports().forEach(builder::exports); + descriptor.opens().forEach(builder::opens); + descriptor.uses().forEach(builder::uses); + } + descriptor.provides().forEach(builder::provides); + + descriptor.version().ifPresent(builder::version); + descriptor.mainClass().ifPresent(builder::mainClass); + + // original + new packages + builder.packages(descriptor.packages()); + builder.packages(packages); + + descriptor = builder.build(); } // return a module reference to the patched module URI location = mref.location().orElse(null); + ModuleTarget target = null; ModuleHashes recordedHashes = null; + ModuleHashes.HashSupplier hasher = null; ModuleResolution mres = null; if (mref instanceof ModuleReferenceImpl) { ModuleReferenceImpl impl = (ModuleReferenceImpl)mref; + target = impl.moduleTarget(); recordedHashes = impl.recordedHashes(); + hasher = impl.hasher(); mres = impl.moduleResolution(); } @@ -162,8 +192,9 @@ public final class ModulePatcher { location, () -> new PatchedModuleReader(paths, mref), this, + target, recordedHashes, - null, + hasher, mres); } @@ -197,7 +228,7 @@ public final class ModulePatcher { private volatile ModuleReader delegate; /** - * Creates the ModuleReader to reads resources a patched module. + * Creates the ModuleReader to reads resources in a patched module. */ PatchedModuleReader(List patches, ModuleReference mref) { List finders = new ArrayList<>(); @@ -262,13 +293,16 @@ public final class ModulePatcher { } /** - * Finds a resources in the patch locations. Returns null if not found. + * Finds a resources in the patch locations. Returns null if not found + * or the name is "module-info.class" as that cannot be overridden. */ private Resource findResourceInPatch(String name) throws IOException { - for (ResourceFinder finder : finders) { - Resource r = finder.find(name); - if (r != null) - return r; + if (!name.equals("module-info.class")) { + for (ResourceFinder finder : finders) { + Resource r = finder.find(name); + if (r != null) + return r; + } } return null; } @@ -397,7 +431,7 @@ public final class ModulePatcher { private final URL csURL; JarResourceFinder(Path path) throws IOException { - this.jf = new JarFile(path.toFile()); + this.jf = new JarFile(path.toString()); this.csURL = path.toUri().toURL(); } @@ -449,9 +483,7 @@ public final class ModulePatcher { @Override public Stream list() throws IOException { - return jf.stream() - .filter(e -> !e.isDirectory()) - .map(JarEntry::getName); + return jf.stream().map(JarEntry::getName); } } @@ -471,19 +503,8 @@ public final class ModulePatcher { @Override public Resource find(String name) throws IOException { - Path file = Paths.get(name.replace('/', File.separatorChar)); - if (file.getRoot() == null) { - file = dir.resolve(file); - } else { - // drop the root component so that the resource is - // located relative to the module directory - int n = file.getNameCount(); - if (n == 0) - return null; - file = dir.resolve(file.subpath(0, n)); - } - - if (Files.isRegularFile(file)) { + Path file = Resources.toFilePath(dir, name); + if (file != null) { return newResource(name, dir, file); } else { return null; @@ -530,17 +551,15 @@ public final class ModulePatcher { @Override public Stream list() throws IOException { - return Files.find(dir, Integer.MAX_VALUE, - (path, attrs) -> attrs.isRegularFile()) - .map(f -> dir.relativize(f) - .toString() - .replace(File.separatorChar, '/')); + return Files.walk(dir, Integer.MAX_VALUE) + .map(f -> Resources.toResourceName(dir, f)) + .filter(s -> s.length() > 0); } } /** - * Derives a package name from a file path to a .class file. + * Derives a package name from the file path of an entry in an exploded patch */ private static String toPackageName(Path top, Path file) { Path entry = top.relativize(file); @@ -552,6 +571,17 @@ public final class ModulePatcher { } } + /** + * Returns true if the given file exists and is a hidden file + */ + private boolean isHidden(Path file) { + try { + return Files.isHidden(file); + } catch (IOException ioe) { + return false; + } + } + /** * Derives a package name from the name of an entry in a JAR file. */ diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModulePath.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModulePath.java index fb7871d3c31..330117a8f37 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModulePath.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModulePath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -35,7 +35,7 @@ import java.io.UncheckedIOException; import java.lang.module.FindException; import java.lang.module.InvalidModuleDescriptorException; import java.lang.module.ModuleDescriptor; -import java.lang.module.ModuleDescriptor.Requires; +import java.lang.module.ModuleDescriptor.Builder; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; import java.net.URI; @@ -60,6 +60,7 @@ import java.util.jar.Manifest; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; +import java.util.zip.ZipException; import java.util.zip.ZipFile; import jdk.internal.jmod.JmodFile; @@ -70,12 +71,11 @@ import jdk.internal.util.jar.VersionedStream; /** * A {@code ModuleFinder} that locates modules on the file system by searching - * a sequence of directories or packaged modules. - * - * The {@code ModuleFinder} can be created to work in either the run-time - * or link-time phases. In both cases it locates modular JAR and exploded - * modules. When created for link-time then it additionally locates - * modules in JMOD files. + * a sequence of directories or packaged modules. The ModuleFinder can be + * created to work in either the run-time or link-time phases. In both cases it + * locates modular JAR and exploded modules. When created for link-time then it + * additionally locates modules in JMOD files. The ModuleFinder can also + * optionally patch any modules that it locates with a ModulePatcher. */ public class ModulePath implements ModuleFinder { @@ -87,6 +87,9 @@ public class ModulePath implements ModuleFinder { // true for the link phase (supports modules packaged in JMOD format) private final boolean isLinkPhase; + // for patching modules, can be null + private final ModulePatcher patcher; + // the entries on this module path private final Path[] entries; private int next; @@ -94,19 +97,51 @@ public class ModulePath implements ModuleFinder { // map of module name to module reference map for modules already located private final Map cachedModules = new HashMap<>(); - public ModulePath(Runtime.Version version, boolean isLinkPhase, Path... entries) { + + private ModulePath(Runtime.Version version, + boolean isLinkPhase, + ModulePatcher patcher, + Path... entries) { this.releaseVersion = version; this.isLinkPhase = isLinkPhase; + this.patcher = patcher; this.entries = entries.clone(); for (Path entry : this.entries) { Objects.requireNonNull(entry); } } - public ModulePath(Path... entries) { - this(JarFile.runtimeVersion(), false, entries); + /** + * Returns a ModuleFinder that that locates modules on the file system by + * searching a sequence of directories and/or packaged modules. The modules + * may be patched by the given ModulePatcher. + */ + public static ModuleFinder of(ModulePatcher patcher, Path... entries) { + return new ModulePath(JarFile.runtimeVersion(), false, patcher, entries); } + /** + * Returns a ModuleFinder that that locates modules on the file system by + * searching a sequence of directories and/or packaged modules. + */ + public static ModuleFinder of(Path... entries) { + return of((ModulePatcher)null, entries); + } + + /** + * Returns a ModuleFinder that that locates modules on the file system by + * searching a sequence of directories and/or packaged modules. + * + * @param version The release version to use for multi-release JAR files + * @param isLinkPhase {@code true} if the link phase to locate JMOD files + */ + public static ModuleFinder of(Runtime.Version version, + boolean isLinkPhase, + Path... entries) { + return new ModulePath(version, isLinkPhase, null, entries); + } + + @Override public Optional find(String name) { Objects.requireNonNull(name); @@ -195,8 +230,7 @@ public class ModulePath implements ModuleFinder { if (attrs.isDirectory()) { Path mi = entry.resolve(MODULE_INFO); if (!Files.exists(mi)) { - // does not exist or unable to determine so assume a - // directory of modules + // assume a directory of modules return scanDirectory(entry); } } @@ -206,11 +240,17 @@ public class ModulePath implements ModuleFinder { if (mref != null) { String name = mref.descriptor().name(); return Collections.singletonMap(name, mref); - } else { - // skipped - return Collections.emptyMap(); } + // not recognized + String msg; + if (!isLinkPhase && entry.toString().endsWith(".jmod")) { + msg = "JMOD format not supported at execution time"; + } else { + msg = "Module format not recognized"; + } + throw new FindException(msg + ": " + entry); + } catch (IOException ioe) { throw new FindException(ioe); } @@ -266,48 +306,53 @@ public class ModulePath implements ModuleFinder { /** - * Locates a packaged or exploded module, returning a {@code ModuleReference} - * to the module. Returns {@code null} if the entry is skipped because it is - * to a directory that does not contain a module-info.class or it's a hidden - * file. + * Reads a packaged or exploded module, returning a {@code ModuleReference} + * to the module. Returns {@code null} if the entry is not recognized. * * @throws IOException if an I/O error occurs - * @throws FindException if the file is not recognized as a module or an - * error occurs parsing its module descriptor + * @throws FindException if an error occurs parsing its module descriptor */ private ModuleReference readModule(Path entry, BasicFileAttributes attrs) throws IOException { try { + // exploded module if (attrs.isDirectory()) { return readExplodedModule(entry); // may return null } - String fn = entry.getFileName().toString(); + // JAR or JMOD file if (attrs.isRegularFile()) { + String fn = entry.getFileName().toString(); + boolean isDefaultFileSystem = isDefaultFileSystem(entry); + + // JAR file if (fn.endsWith(".jar")) { - return readJar(entry); - } else if (fn.endsWith(".jmod")) { - if (isLinkPhase) - return readJMod(entry); - throw new FindException("JMOD files not supported: " + entry); + if (isDefaultFileSystem) { + return readJar(entry); + } else { + // the JAR file is in a custom file system so + // need to copy it to the local file system + Path tmpdir = Files.createTempDirectory("mlib"); + Path target = Files.copy(entry, tmpdir.resolve(fn)); + return readJar(target); + } + } + + // JMOD file + if (isDefaultFileSystem && isLinkPhase && fn.endsWith(".jmod")) { + return readJMod(entry); } } - // skip hidden files - if (fn.startsWith(".") || Files.isHidden(entry)) { - return null; - } else { - throw new FindException("Unrecognized module: " + entry); - } + return null; } catch (InvalidModuleDescriptorException e) { throw new FindException("Error reading module: " + entry, e); } } - /** * Returns a string with the file name of the module if possible. * If the module location is not a file URI then return the URI @@ -327,7 +372,7 @@ public class ModulePath implements ModuleFinder { } } - // -- jmod files -- + // -- JMOD files -- private Set jmodPackages(JmodFile jf) { return jf.stream() @@ -339,7 +384,7 @@ public class ModulePath implements ModuleFinder { } /** - * Returns a {@code ModuleReference} to a module in jmod file on the + * Returns a {@code ModuleReference} to a module in JMOD file on the * file system. * * @throws IOException @@ -360,9 +405,12 @@ public class ModulePath implements ModuleFinder { private static final String SERVICES_PREFIX = "META-INF/services/"; + private static final Attributes.Name AUTOMATIC_MODULE_NAME + = new Attributes.Name("Automatic-Module-Name"); + /** * Returns the service type corresponding to the name of a services - * configuration file if it is a valid Java identifier. + * configuration file if it is a legal type name. * * For example, if called with "META-INF/services/p.S" then this method * returns a container with the value "p.S". @@ -374,7 +422,7 @@ public class ModulePath implements ModuleFinder { String prefix = cf.substring(0, index); if (prefix.equals(SERVICES_PREFIX)) { String sn = cf.substring(index); - if (Checks.isJavaIdentifier(sn)) + if (Checks.isClassName(sn)) return Optional.of(sn); } } @@ -401,51 +449,68 @@ public class ModulePath implements ModuleFinder { /** * Treat the given JAR file as a module as follows: * - * 1. The module name (and optionally the version) is derived from the file - * name of the JAR file - * 2. All packages are exported and open - * 3. It has no non-exported/non-open packages + * 1. The value of the Automatic-Module-Name attribute is the module name + * 2. The version, and the module name when the Automatic-Module-Name + * attribute is not present, is derived from the file ame of the JAR file + * 3. All packages are derived from the .class files in the JAR file * 4. The contents of any META-INF/services configuration files are mapped * to "provides" declarations * 5. The Main-Class attribute in the main attributes of the JAR manifest - * is mapped to the module descriptor mainClass + * is mapped to the module descriptor mainClass if possible */ private ModuleDescriptor deriveModuleDescriptor(JarFile jf) throws IOException { - // Derive module name and version from JAR file name + // Read Automatic-Module-Name attribute if present + Manifest man = jf.getManifest(); + Attributes attrs = null; + String moduleName = null; + if (man != null) { + attrs = man.getMainAttributes(); + if (attrs != null) { + moduleName = attrs.getValue(AUTOMATIC_MODULE_NAME); + } + } + // Derive the version, and the module name if needed, from JAR file name String fn = jf.getName(); int i = fn.lastIndexOf(File.separator); if (i != -1) - fn = fn.substring(i+1); + fn = fn.substring(i + 1); - // drop .jar - String mn = fn.substring(0, fn.length()-4); + // drop ".jar" + String name = fn.substring(0, fn.length() - 4); String vs = null; // find first occurrence of -${NUMBER}. or -${NUMBER}$ - Matcher matcher = Patterns.DASH_VERSION.matcher(mn); + Matcher matcher = Patterns.DASH_VERSION.matcher(name); if (matcher.find()) { int start = matcher.start(); // attempt to parse the tail as a version string try { - String tail = mn.substring(start+1); + String tail = name.substring(start + 1); ModuleDescriptor.Version.parse(tail); vs = tail; } catch (IllegalArgumentException ignore) { } - mn = mn.substring(0, start); + name = name.substring(0, start); } - // finally clean up the module name - mn = cleanModuleName(mn); + // Create builder, using the name derived from file name when + // Automatic-Module-Name not present + Builder builder; + if (moduleName != null) { + try { + builder = ModuleDescriptor.newAutomaticModule(moduleName); + } catch (IllegalArgumentException e) { + throw new FindException(AUTOMATIC_MODULE_NAME + ": " + e.getMessage()); + } + } else { + builder = ModuleDescriptor.newAutomaticModule(cleanModuleName(name)); + } - // Builder throws IAE if module name is empty or invalid - ModuleDescriptor.Builder builder - = ModuleDescriptor.automaticModule(mn) - .requires(Set.of(Requires.Modifier.MANDATED), "java.base"); + // module version if present if (vs != null) builder.version(vs); @@ -453,17 +518,22 @@ public class ModulePath implements ModuleFinder { Map> map = VersionedStream.stream(jf) .filter(e -> !e.isDirectory()) .map(JarEntry::getName) + .filter(e -> (e.endsWith(".class") ^ e.startsWith(SERVICES_PREFIX))) .collect(Collectors.partitioningBy(e -> e.startsWith(SERVICES_PREFIX), Collectors.toSet())); - Set resources = map.get(Boolean.FALSE); + Set classFiles = map.get(Boolean.FALSE); Set configFiles = map.get(Boolean.TRUE); - // all packages are exported and open - resources.stream() + + // the packages containing class files + Set packages = classFiles.stream() .map(this::toPackageName) .flatMap(Optional::stream) .distinct() - .forEach(pn -> builder.exports(pn).opens(pn)); + .collect(Collectors.toSet()); + + // all packages are exported and open + builder.packages(packages); // map names of service configuration files to service names Set serviceNames = configFiles.stream() @@ -481,6 +551,11 @@ public class ModulePath implements ModuleFinder { String cn; while ((cn = nextLine(reader)) != null) { if (cn.length() > 0) { + String pn = packageName(cn); + if (!packages.contains(pn)) { + String msg = "Provider class " + cn + " not in module"; + throw new InvalidModuleDescriptorException(msg); + } providerClasses.add(cn); } } @@ -490,12 +565,17 @@ public class ModulePath implements ModuleFinder { } // Main-Class attribute if it exists - Manifest man = jf.getManifest(); - if (man != null) { - Attributes attrs = man.getMainAttributes(); + if (attrs != null) { String mainClass = attrs.getValue(Attributes.Name.MAIN_CLASS); - if (mainClass != null) - builder.mainClass(mainClass.replace("/", ".")); + if (mainClass != null) { + mainClass = mainClass.replace("/", "."); + if (Checks.isClassName(mainClass)) { + String pn = packageName(mainClass); + if (packages.contains(pn)) { + builder.mainClass(mainClass); + } + } + } } return builder.build(); @@ -506,7 +586,6 @@ public class ModulePath implements ModuleFinder { */ private static class Patterns { static final Pattern DASH_VERSION = Pattern.compile("-(\\d+(\\.|$))"); - static final Pattern TRAILING_VERSION = Pattern.compile("(\\.|\\d)*$"); static final Pattern NON_ALPHANUM = Pattern.compile("[^A-Za-z0-9]"); static final Pattern REPEATING_DOTS = Pattern.compile("(\\.)(\\1)+"); static final Pattern LEADING_DOTS = Pattern.compile("^\\."); @@ -517,9 +596,6 @@ public class ModulePath implements ModuleFinder { * Clean up candidate module name derived from a JAR file name. */ private static String cleanModuleName(String mn) { - // drop trailing version from name - mn = Patterns.TRAILING_VERSION.matcher(mn).replaceAll(""); - // replace non-alphanumeric mn = Patterns.NON_ALPHANUM.matcher(mn).replaceAll("."); @@ -568,11 +644,10 @@ public class ModulePath implements ModuleFinder { // no module-info.class so treat it as automatic module try { ModuleDescriptor md = deriveModuleDescriptor(jf); - attrs = new ModuleInfo.Attributes(md, null, null); - } catch (IllegalArgumentException iae) { - throw new FindException( - "Unable to derive module descriptor for: " - + jf.getName(), iae); + attrs = new ModuleInfo.Attributes(md, null, null, null); + } catch (RuntimeException e) { + throw new FindException("Unable to derive module descriptor for " + + jf.getName(), e); } } else { @@ -580,7 +655,9 @@ public class ModulePath implements ModuleFinder { () -> jarPackages(jf)); } - return ModuleReferences.newJarModule(attrs, file); + return ModuleReferences.newJarModule(attrs, patcher, file); + } catch (ZipException e) { + throw new FindException("Error reading " + file, e); } } @@ -590,7 +667,7 @@ public class ModulePath implements ModuleFinder { private Set explodedPackages(Path dir) { try { return Files.find(dir, Integer.MAX_VALUE, - ((path, attrs) -> attrs.isRegularFile())) + ((path, attrs) -> attrs.isRegularFile() && !isHidden(path))) .map(path -> dir.relativize(path)) .map(this::toPackageName) .flatMap(Optional::stream) @@ -617,31 +694,38 @@ public class ModulePath implements ModuleFinder { // for now return null; } - return ModuleReferences.newExplodedModule(attrs, dir); + return ModuleReferences.newExplodedModule(attrs, patcher, dir); + } + + /** + * Maps a type name to its package name. + */ + private static String packageName(String cn) { + int index = cn.lastIndexOf('.'); + return (index == -1) ? "" : cn.substring(0, index); } /** * Maps the name of an entry in a JAR or ZIP file to a package name. * - * @throws IllegalArgumentException if the name is a class file in - * the top-level directory of the JAR/ZIP file (and it's - * not module-info.class) + * @throws InvalidModuleDescriptorException if the name is a class file in + * the top-level directory of the JAR/ZIP file (and it's not + * module-info.class) */ private Optional toPackageName(String name) { assert !name.endsWith("/"); - int index = name.lastIndexOf("/"); if (index == -1) { if (name.endsWith(".class") && !name.equals(MODULE_INFO)) { - throw new IllegalArgumentException(name - + " found in top-level directory:" - + " (unnamed package not allowed in module)"); + String msg = name + " found in top-level directory" + + " (unnamed package not allowed in module)"; + throw new InvalidModuleDescriptorException(msg); } return Optional.empty(); } String pn = name.substring(0, index).replace('/', '.'); - if (Checks.isJavaIdentifier(pn)) { + if (Checks.isPackageName(pn)) { return Optional.of(pn); } else { // not a valid package name @@ -653,7 +737,7 @@ public class ModulePath implements ModuleFinder { * Maps the relative path of an entry in an exploded module to a package * name. * - * @throws IllegalArgumentException if the name is a class file in + * @throws InvalidModuleDescriptorException if the name is a class file in * the top-level directory (and it's not module-info.class) */ private Optional toPackageName(Path file) { @@ -663,15 +747,15 @@ public class ModulePath implements ModuleFinder { if (parent == null) { String name = file.toString(); if (name.endsWith(".class") && !name.equals(MODULE_INFO)) { - throw new IllegalArgumentException(name - + " found in in top-level directory" - + " (unnamed package not allowed in module)"); + String msg = name + " found in top-level directory" + + " (unnamed package not allowed in module)"; + throw new InvalidModuleDescriptorException(msg); } return Optional.empty(); } String pn = parent.toString().replace(File.separatorChar, '.'); - if (Checks.isJavaIdentifier(pn)) { + if (Checks.isPackageName(pn)) { return Optional.of(pn); } else { // not a valid package name @@ -679,6 +763,27 @@ public class ModulePath implements ModuleFinder { } } + /** + * Returns true if the given file exists and is a hidden file + */ + private boolean isHidden(Path file) { + try { + return Files.isHidden(file); + } catch (IOException ioe) { + return false; + } + } + + + /** + * Return true if a path locates a path in the default file system + */ + private boolean isDefaultFileSystem(Path path) { + return path.getFileSystem().provider() + .getScheme().equalsIgnoreCase("file"); + } + + private static final PerfCounter scanTime = PerfCounter.newPerfCounter("jdk.module.finder.modulepath.scanTime"); private static final PerfCounter moduleCount diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java index 2ab42bdb4a2..c3cf0a8beec 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java @@ -41,11 +41,18 @@ import java.util.function.Supplier; public class ModuleReferenceImpl extends ModuleReference { + // location of module + private final URI location; + + // the module reader private final Supplier readerSupplier; // non-null if the module is patched private final ModulePatcher patcher; + // ModuleTarget if the module is OS/architecture specific + private final ModuleTarget target; + // the hashes of other modules recorded in this module private final ModuleHashes recordedHashes; @@ -65,13 +72,16 @@ public class ModuleReferenceImpl extends ModuleReference { URI location, Supplier readerSupplier, ModulePatcher patcher, + ModuleTarget target, ModuleHashes recordedHashes, ModuleHashes.HashSupplier hasher, ModuleResolution moduleResolution) { super(descriptor, Objects.requireNonNull(location)); + this.location = location; this.readerSupplier = readerSupplier; this.patcher = patcher; + this.target = target; this.recordedHashes = recordedHashes; this.hasher = hasher; this.moduleResolution = moduleResolution; @@ -93,6 +103,13 @@ public class ModuleReferenceImpl extends ModuleReference { return (patcher != null); } + /** + * Returns the ModuleTarget or {@code null} if the no target platform. + */ + public ModuleTarget moduleTarget() { + return target; + } + /** * Returns the hashes recorded in this module or {@code null} if there * are no hashes recorded. @@ -136,7 +153,7 @@ public class ModuleReferenceImpl extends ModuleReference { int hc = hash; if (hc == 0) { hc = descriptor().hashCode(); - hc = 43 * hc + Objects.hashCode(location()); + hc = 43 * hc + Objects.hashCode(location); hc = 43 * hc + Objects.hashCode(patcher); if (hc == 0) hc = -1; @@ -157,13 +174,20 @@ public class ModuleReferenceImpl extends ModuleReference { // when the modules have equal module descriptors, are at the // same location, and are patched by the same patcher. return Objects.equals(this.descriptor(), that.descriptor()) - && Objects.equals(this.location(), that.location()) + && Objects.equals(this.location, that.location) && Objects.equals(this.patcher, that.patcher); } @Override public String toString() { - return super.toString(); + StringBuilder sb = new StringBuilder(); + sb.append("[module "); + sb.append(descriptor().name()); + sb.append(", location="); + sb.append(location); + if (isPatched()) sb.append(" (patched)"); + sb.append("]"); + return sb.toString(); } } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java index a2aff8f76be..938c446b6c7 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java @@ -36,7 +36,6 @@ import java.net.URI; import java.nio.ByteBuffer; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -51,7 +50,6 @@ import java.util.stream.Stream; import java.util.zip.ZipFile; import jdk.internal.jmod.JmodFile; -import jdk.internal.misc.JavaLangAccess; import jdk.internal.misc.SharedSecrets; import jdk.internal.module.ModuleHashes.HashSupplier; import jdk.internal.util.jar.VersionedStream; @@ -65,59 +63,60 @@ import sun.net.www.ParseUtil; */ class ModuleReferences { - - private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess(); - private ModuleReferences() { } /** - * Creates a ModuleReference to a module or to patched module when - * creating modules for the boot Layer and --patch-module is specified. + * Creates a ModuleReference to a possibly-patched module */ private static ModuleReference newModule(ModuleInfo.Attributes attrs, URI uri, Supplier supplier, + ModulePatcher patcher, HashSupplier hasher) { - ModuleReference mref = new ModuleReferenceImpl(attrs.descriptor(), uri, supplier, null, + attrs.target(), attrs.recordedHashes(), hasher, attrs.moduleResolution()); - if (JLA.getBootLayer() == null) - mref = ModuleBootstrap.patcher().patchIfNeeded(mref); + if (patcher != null) + mref = patcher.patchIfNeeded(mref); return mref; } /** - * Creates a ModuleReference to a module packaged as a modular JAR. + * Creates a ModuleReference to a possibly-patched module in a modular JAR. */ - static ModuleReference newJarModule(ModuleInfo.Attributes attrs, Path file) { + static ModuleReference newJarModule(ModuleInfo.Attributes attrs, + ModulePatcher patcher, + Path file) { URI uri = file.toUri(); Supplier supplier = () -> new JarModuleReader(file, uri); HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); - return newModule(attrs, uri, supplier, hasher); + return newModule(attrs, uri, supplier, patcher, hasher); } /** - * Creates a ModuleReference to a module packaged as a JMOD. + * Creates a ModuleReference to a module in a JMOD file. */ static ModuleReference newJModModule(ModuleInfo.Attributes attrs, Path file) { URI uri = file.toUri(); Supplier supplier = () -> new JModModuleReader(file, uri); HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); - return newModule(attrs, uri, supplier, hasher); + return newModule(attrs, uri, supplier, null, hasher); } /** - * Creates a ModuleReference to an exploded module. + * Creates a ModuleReference to a possibly-patched exploded module. */ - static ModuleReference newExplodedModule(ModuleInfo.Attributes attrs, Path dir) { + static ModuleReference newExplodedModule(ModuleInfo.Attributes attrs, + ModulePatcher patcher, + Path dir) { Supplier supplier = () -> new ExplodedModuleReader(dir); - return newModule(attrs, dir.toUri(), supplier, null); + return newModule(attrs, dir.toUri(), supplier, patcher, null); } @@ -228,8 +227,8 @@ class ModuleReferences { static JarFile newJarFile(Path path) { try { - return new JarFile(path.toFile(), - true, // verify + return new JarFile(new File(path.toString()), + true, // verify ZipFile.OPEN_READ, JarFile.runtimeVersion()); } catch (IOException ioe) { @@ -252,6 +251,8 @@ class ModuleReferences { if (je != null) { if (jf.isMultiRelease()) name = SharedSecrets.javaUtilJarAccess().getRealName(jf, je); + if (je.isDirectory() && !name.endsWith("/")) + name += "/"; String encodedPath = ParseUtil.encodePath(name, false); String uris = "jar:" + uri + "!/" + encodedPath; return Optional.of(URI.create(uris)); @@ -274,7 +275,6 @@ class ModuleReferences { Stream implList() throws IOException { // take snapshot to avoid async close List names = VersionedStream.stream(jf) - .filter(e -> !e.isDirectory()) .map(JarEntry::getName) .collect(Collectors.toList()); return names.stream(); @@ -316,6 +316,8 @@ class ModuleReferences { Optional implFind(String name) { JmodFile.Entry je = getEntry(name); if (je != null) { + if (je.isDirectory() && !name.endsWith("/")) + name += "/"; String encodedPath = ParseUtil.encodePath(name, false); String uris = "jmod:" + uri + "!/" + encodedPath; return Optional.of(URI.create(uris)); @@ -369,21 +371,6 @@ class ModuleReferences { } } - /** - * Returns a Path to access to the given resource. - */ - private Path toPath(String name) { - Path path = Paths.get(name.replace('/', File.separatorChar)); - if (path.getRoot() == null) { - return dir.resolve(path); - } else { - // drop the root component so that the resource is - // located relative to the module directory - int n = path.getNameCount(); - return (n > 0) ? dir.resolve(path.subpath(0, n)) : null; - } - } - /** * Throws IOException if the module reader is closed; */ @@ -394,8 +381,8 @@ class ModuleReferences { @Override public Optional find(String name) throws IOException { ensureOpen(); - Path path = toPath(name); - if (path != null && Files.isRegularFile(path)) { + Path path = Resources.toFilePath(dir, name); + if (path != null) { try { return Optional.of(path.toUri()); } catch (IOError e) { @@ -409,8 +396,8 @@ class ModuleReferences { @Override public Optional open(String name) throws IOException { ensureOpen(); - Path path = toPath(name); - if (path != null && Files.isRegularFile(path)) { + Path path = Resources.toFilePath(dir, name); + if (path != null) { return Optional.of(Files.newInputStream(path)); } else { return Optional.empty(); @@ -420,8 +407,8 @@ class ModuleReferences { @Override public Optional read(String name) throws IOException { ensureOpen(); - Path path = toPath(name); - if (path != null && Files.isRegularFile(path)) { + Path path = Resources.toFilePath(dir, name); + if (path != null) { return Optional.of(ByteBuffer.wrap(Files.readAllBytes(path))); } else { return Optional.empty(); @@ -431,12 +418,9 @@ class ModuleReferences { @Override public Stream list() throws IOException { ensureOpen(); - // sym links not followed - return Files.find(dir, Integer.MAX_VALUE, - (path, attrs) -> attrs.isRegularFile()) - .map(f -> dir.relativize(f) - .toString() - .replace(File.separatorChar, '/')); + return Files.walk(dir, Integer.MAX_VALUE) + .map(f -> Resources.toResourceName(dir, f)) + .filter(s -> s.length() > 0); } @Override diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleResolution.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleResolution.java index 76c42368c63..d8b9d9609a1 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleResolution.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleResolution.java @@ -39,6 +39,10 @@ public final class ModuleResolution { this.value = value; } + public int value() { + return value; + } + public static ModuleResolution empty() { return new ModuleResolution(0); } @@ -74,35 +78,30 @@ public final class ModuleResolution { throw new InternalError("cannot add deprecated for removal to " + value); return new ModuleResolution(value | WARN_DEPRECATED_FOR_REMOVAL); } + public ModuleResolution withIncubating() { if ((value & (WARN_DEPRECATED | WARN_DEPRECATED_FOR_REMOVAL)) != 0) throw new InternalError("cannot add incubating to " + value); return new ModuleResolution(value | WARN_INCUBATING); } - public int value() { - return value; - } - public static boolean doNotResolveByDefault(ModuleReference mref) { // get the DO_NOT_RESOLVE_BY_DEFAULT flag, if any - if (!(mref instanceof ModuleReferenceImpl)) - return false; - - ModuleResolution mres = ((ModuleReferenceImpl)mref).moduleResolution(); - if (mres != null) - return mres.doNotResolveByDefault(); + if (mref instanceof ModuleReferenceImpl) { + ModuleResolution mres = ((ModuleReferenceImpl) mref).moduleResolution(); + if (mres != null) + return mres.doNotResolveByDefault(); + } return false; } public static boolean hasIncubatingWarning(ModuleReference mref) { - if (!(mref instanceof ModuleReferenceImpl)) - return false; - - ModuleResolution mres = ((ModuleReferenceImpl)mref).moduleResolution(); - if (mres != null) - return mres.hasIncubatingWarning(); + if (mref instanceof ModuleReferenceImpl) { + ModuleResolution mres = ((ModuleReferenceImpl) mref).moduleResolution(); + if (mres != null) + return mres.hasIncubatingWarning(); + } return false; } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleTarget.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleTarget.java new file mode 100644 index 00000000000..ffd50704f33 --- /dev/null +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleTarget.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.internal.module; + +/** + * Represents the module target. + * + * For now, this is a single value for the target platform, e.g. "linux-x64". + */ +public final class ModuleTarget { + + private final String targetPlatform; + + public ModuleTarget(String targetPlatform) { + this.targetPlatform = targetPlatform; + } + + public String targetPlatform() { + return targetPlatform; + } + +} diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/Modules.java b/jdk/src/java.base/share/classes/jdk/internal/module/Modules.java index 9f68cfbc421..dffe5e8c0ff 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/Modules.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/Modules.java @@ -25,24 +25,31 @@ package jdk.internal.module; +import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; +import java.lang.module.ModuleFinder; +import java.lang.module.ModuleReference; +import java.lang.module.ResolvedModule; import java.net.URI; import java.security.AccessController; import java.security.PrivilegedAction; +import java.util.List; +import java.util.Map; import java.util.Set; +import java.util.function.Function; +import java.util.stream.Collectors; import jdk.internal.loader.BootLoader; +import jdk.internal.loader.BuiltinClassLoader; import jdk.internal.loader.ClassLoaders; -import jdk.internal.misc.JavaLangReflectModuleAccess; +import jdk.internal.misc.JavaLangAccess; import jdk.internal.misc.SharedSecrets; /** - * A helper class to allow JDK classes create dynamic modules and to update - * modules, exports and the readability graph. It is also invoked by the VM - * to add read edges when agents are instrumenting code that need to link - * to supporting classes. + * A helper class for creating and updating modules. This class is intended to + * support command-line options, tests, and the instrumentation API. It is also + * used by the VM to load modules or add read edges when agents are instrumenting + * code that need to link to supporting classes. * * The parameters that are package names in this API are the fully-qualified * names of the packages as defined in section 6.5.3 of The Java™ @@ -52,8 +59,7 @@ import jdk.internal.misc.SharedSecrets; public class Modules { private Modules() { } - private static final JavaLangReflectModuleAccess JLRMA - = SharedSecrets.getJavaLangReflectModuleAccess(); + private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess(); /** * Creates a new Module. The module has the given ModuleDescriptor and @@ -68,48 +74,37 @@ public class Modules { ModuleDescriptor descriptor, URI uri) { - return JLRMA.defineModule(loader, descriptor, uri); + return JLA.defineModule(loader, descriptor, uri); } /** - * Define a new module to the VM. The module has the given set of - * packages and is defined to the given class loader. - * - * The resulting Module is in a larval state in that it does not not read - * any other module and does not have any exports. - */ - public static Module defineModule(ClassLoader loader, - String name, - Set packages) - { - ModuleDescriptor descriptor = ModuleDescriptor.module(name) - .contains(packages) - .build(); - - return JLRMA.defineModule(loader, descriptor, null); - } - - /** - * Adds a read-edge so that module {@code m1} reads module {@code m1}. + * Updates m1 to read m2. * Same as m1.addReads(m2) but without a caller check. */ public static void addReads(Module m1, Module m2) { - JLRMA.addReads(m1, m2); + JLA.addReads(m1, m2); } /** - * Update module {@code m} to read all unnamed modules. + * Update module m to read all unnamed modules. */ public static void addReadsAllUnnamed(Module m) { - JLRMA.addReadsAllUnnamed(m); + JLA.addReadsAllUnnamed(m); } /** * Updates module m1 to export a package to module m2. - * Same as m1.addExports(pn, m2) but without a caller check. + * Same as m1.addExports(pn, m2) but without a caller check */ public static void addExports(Module m1, String pn, Module m2) { - JLRMA.addExports(m1, pn, m2); + JLA.addExports(m1, pn, m2); + } + + /** + * Updates module m to export a package to all unnamed modules. + */ + public static void addExportsToAllUnnamed(Module m, String pn) { + JLA.addExportsToAllUnnamed(m, pn); } /** @@ -117,54 +112,36 @@ public class Modules { * Same as m1.addOpens(pn, m2) but without a caller check. */ public static void addOpens(Module m1, String pn, Module m2) { - JLRMA.addOpens(m1, pn, m2); - } - - /** - * Updates a module m to export a package to all modules. - */ - public static void addExportsToAll(Module m, String pn) { - JLRMA.addExportsToAll(m, pn); - } - - /** - * Updates a module m to open a package to all modules. - */ - public static void addOpensToAll(Module m, String pn) { - JLRMA.addOpensToAll(m, pn); - } - - /** - * Updates module m to export a package to all unnamed modules. - */ - public static void addExportsToAllUnnamed(Module m, String pn) { - JLRMA.addExportsToAllUnnamed(m, pn); + JLA.addOpens(m1, pn, m2); } /** * Updates module m to open a package to all unnamed modules. */ public static void addOpensToAllUnnamed(Module m, String pn) { - JLRMA.addOpensToAllUnnamed(m, pn); + JLA.addOpensToAllUnnamed(m, pn); } /** - * Updates module m to use a service + * Updates module m to use a service. + * Same as m2.addUses(service) but without a caller check. */ public static void addUses(Module m, Class service) { - JLRMA.addUses(m, service); + JLA.addUses(m, service); } /** * Updates module m to provide a service */ public static void addProvides(Module m, Class service, Class impl) { - Layer layer = m.getLayer(); + ModuleLayer layer = m.getLayer(); - if (layer == null || layer == Layer.boot()) { + PrivilegedAction pa = m::getClassLoader; + ClassLoader loader = AccessController.doPrivileged(pa); + + ClassLoader platformClassLoader = ClassLoaders.platformClassLoader(); + if (layer == null || loader == null || loader == platformClassLoader) { // update ClassLoader catalog - PrivilegedAction pa = m::getClassLoader; - ClassLoader loader = AccessController.doPrivileged(pa); ServicesCatalog catalog; if (loader == null) { catalog = BootLoader.getServicesCatalog(); @@ -176,21 +153,10 @@ public class Modules { if (layer != null) { // update Layer catalog - SharedSecrets.getJavaLangReflectModuleAccess() - .getServicesCatalog(layer) - .addProvider(m, service, impl); + JLA.getServicesCatalog(layer).addProvider(m, service, impl); } } - /** - * Adds a package to a module's content. - * - * This method is a no-op if the module already contains the package. - */ - public static void addPackage(Module m, String pn) { - JLRMA.addPackage(m, pn); - } - /** * Called by the VM when code in the given Module has been transformed by * an agent and so may have been instrumented to call into supporting @@ -200,4 +166,90 @@ public class Modules { addReads(m, BootLoader.getUnnamedModule()); addReads(m, ClassLoaders.appClassLoader().getUnnamedModule()); } + + /** + * Called by the VM to load a system module, typically "java.instrument" or + * "jdk.management.agent". If the module is not loaded then it is resolved + * and loaded (along with any dependences that weren't previously loaded) + * into a child layer. + */ + public static synchronized Module loadModule(String name) { + ModuleLayer top = topLayer; + if (top == null) + top = ModuleLayer.boot(); + + Module module = top.findModule(name).orElse(null); + if (module != null) { + // module already loaded + return module; + } + + // resolve the module with the top-most layer as the parent + ModuleFinder empty = ModuleFinder.of(); + ModuleFinder finder = ModuleBootstrap.unlimitedFinder(); + Set roots = Set.of(name); + Configuration cf = top.configuration().resolveAndBind(empty, finder, roots); + + // create the child layer + Function clf = ModuleLoaderMap.mappingFunction(cf); + ModuleLayer newLayer = top.defineModules(cf, clf); + + // add qualified exports/opens to give access to modules in child layer + Map map = newLayer.modules().stream() + .collect(Collectors.toMap(Module::getName, + Function.identity())); + ModuleLayer layer = top; + while (layer != null) { + for (Module m : layer.modules()) { + // qualified exports + m.getDescriptor().exports().stream() + .filter(ModuleDescriptor.Exports::isQualified) + .forEach(e -> e.targets().forEach(target -> { + Module other = map.get(target); + if (other != null) { + addExports(m, e.source(), other); + }})); + + // qualified opens + m.getDescriptor().opens().stream() + .filter(ModuleDescriptor.Opens::isQualified) + .forEach(o -> o.targets().forEach(target -> { + Module other = map.get(target); + if (other != null) { + addOpens(m, o.source(), other); + }})); + } + + List parents = layer.parents(); + assert parents.size() <= 1; + layer = parents.isEmpty() ? null : parents.get(0); + } + + // update security manager before making types visible + JLA.addNonExportedPackages(newLayer); + + // update the built-in class loaders to make the types visible + for (ResolvedModule resolvedModule : cf.modules()) { + ModuleReference mref = resolvedModule.reference(); + String mn = mref.descriptor().name(); + ClassLoader cl = clf.apply(mn); + if (cl == null) { + BootLoader.loadModule(mref); + } else { + ((BuiltinClassLoader) cl).loadModule(mref); + } + } + + // new top layer + topLayer = newLayer; + + // return module + return newLayer.findModule(name) + .orElseThrow(() -> new InternalError("module not loaded")); + + } + + // the top-most system layer + private static ModuleLayer topLayer; + } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/Resources.java b/jdk/src/java.base/share/classes/jdk/internal/module/Resources.java new file mode 100644 index 00000000000..53865742dbe --- /dev/null +++ b/jdk/src/java.base/share/classes/jdk/internal/module/Resources.java @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package jdk.internal.module; + +import java.io.File; +import java.io.IOException; +import java.nio.file.FileSystem; +import java.nio.file.Files; +import java.nio.file.NoSuchFileException; +import java.nio.file.Path; +import java.nio.file.attribute.BasicFileAttributes; + +/** + * A helper class to support working with resources in modules. Also provides + * support for translating resource names to file paths. + */ +public final class Resources { + private Resources() { } + + /** + * Return true if a resource can be encapsulated. Resource with names + * ending in ".class" or "/" cannot be encapsulated. Resource names + * that map to a legal package name can be encapsulated. + */ + public static boolean canEncapsulate(String name) { + int len = name.length(); + if (len > 6 && name.endsWith(".class")) { + return false; + } else { + return Checks.isPackageName(toPackageName(name)); + } + } + + /** + * Derive a package name for a resource. The package name + * returned by this method may not be a legal package name. This method + * returns null if the the resource name ends with a "/" (a directory) + * or the resource name does not contain a "/". + */ + public static String toPackageName(String name) { + int index = name.lastIndexOf('/'); + if (index == -1 || index == name.length()-1) { + return ""; + } else { + return name.substring(0, index).replace("/", "."); + } + } + + /** + * Returns a resource name corresponding to the relative file path + * between {@code dir} and {@code file}. If the file is a directory + * then the name will end with a "/", except the top-level directory + * where the empty string is returned. + */ + public static String toResourceName(Path dir, Path file) { + String s = dir.relativize(file) + .toString() + .replace(File.separatorChar, '/'); + if (s.length() > 0 && Files.isDirectory(file)) + s += "/"; + return s; + } + + /** + * Returns a file path to a resource in a file tree. If the resource + * name has a trailing "/" then the file path will locate a directory. + * Returns {@code null} if the resource does not map to a file in the + * tree file. + */ + public static Path toFilePath(Path dir, String name) throws IOException { + boolean expectDirectory = name.endsWith("/"); + if (expectDirectory) { + name = name.substring(0, name.length() - 1); // drop trailing "/" + } + Path path = toSafeFilePath(dir.getFileSystem(), name); + if (path != null) { + Path file = dir.resolve(path); + try { + BasicFileAttributes attrs; + attrs = Files.readAttributes(file, BasicFileAttributes.class); + if (attrs.isDirectory() + || (!attrs.isDirectory() && !expectDirectory)) + return file; + } catch (NoSuchFileException ignore) { } + } + return null; + } + + /** + * Map a resource name to a "safe" file path. Returns {@code null} if + * the resource name cannot be converted into a "safe" file path. + * + * Resource names with empty elements, or elements that are "." or ".." + * are rejected, as are resource names that translates to a file path + * with a root component. + */ + private static Path toSafeFilePath(FileSystem fs, String name) { + // scan elements of resource name + int next; + int off = 0; + while ((next = name.indexOf('/', off)) != -1) { + int len = next - off; + if (!mayTranslate(name, off, len)) { + return null; + } + off = next + 1; + } + int rem = name.length() - off; + if (!mayTranslate(name, off, rem)) { + return null; + } + + // convert to file path + Path path; + if (File.separatorChar == '/') { + path = fs.getPath(name); + } else { + // not allowed to embed file separators + if (name.contains(File.separator)) + return null; + path = fs.getPath(name.replace('/', File.separatorChar)); + } + + // file path not allowed to have root component + return (path.getRoot() == null) ? path : null; + } + + /** + * Returns {@code true} if the element in a resource name is a candidate + * to translate to the element of a file path. + */ + private static boolean mayTranslate(String name, int off, int len) { + if (len <= 2) { + if (len == 0) + return false; + boolean starsWithDot = (name.charAt(off) == '.'); + if (len == 1 && starsWithDot) + return false; + if (len == 2 && starsWithDot && (name.charAt(off+1) == '.')) + return false; + } + return true; + } + +} diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ServicesCatalog.java b/jdk/src/java.base/share/classes/jdk/internal/module/ServicesCatalog.java index d4425aadbb8..f0d7126adc8 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ServicesCatalog.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ServicesCatalog.java @@ -25,7 +25,6 @@ package jdk.internal.module; -import java.lang.reflect.Module; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleDescriptor.Provides; import java.util.ArrayList; diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/SystemModuleFinder.java b/jdk/src/java.base/share/classes/jdk/internal/module/SystemModuleFinder.java index 5ec0a62ca69..92c4c96cadb 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/SystemModuleFinder.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/SystemModuleFinder.java @@ -80,8 +80,6 @@ public class SystemModuleFinder implements ModuleFinder { = PerfCounter.newPerfCounter("jdk.module.finder.jimage.packages"); private static final PerfCounter exportsCount = PerfCounter.newPerfCounter("jdk.module.finder.jimage.exports"); - // ImageReader used to access all modules in the image - private static final ImageReader imageReader; // singleton finder to find modules in the run-time images private static final SystemModuleFinder INSTANCE; @@ -96,13 +94,28 @@ public class SystemModuleFinder implements ModuleFinder { */ static { long t0 = System.nanoTime(); - imageReader = ImageReaderFactory.getImageReader(); INSTANCE = new SystemModuleFinder(); initTime.addElapsedTimeFrom(t0); } + /** + * Holder class for the ImageReader + */ + private static class SystemImage { + static final ImageReader READER; + static { + long t0 = System.nanoTime(); + READER = ImageReaderFactory.getImageReader(); + initTime.addElapsedTimeFrom(t0); + } + + static ImageReader reader() { + return READER; + } + } + private static boolean isFastPathSupported() { return SystemModules.MODULE_NAMES.length > 0; } @@ -114,7 +127,7 @@ public class SystemModuleFinder implements ModuleFinder { // this happens when java.base is patched with java.base // from an exploded image - return imageReader.getModuleNames(); + return SystemImage.reader().getModuleNames(); } // the set of modules in the run-time image @@ -137,26 +150,31 @@ public class SystemModuleFinder implements ModuleFinder { System.getProperty("jdk.system.module.finder.disabledFastPath") != null; ModuleDescriptor[] descriptors; + ModuleTarget[] targets; ModuleHashes[] recordedHashes; ModuleResolution[] moduleResolutions; // fast loading of ModuleDescriptor of system modules if (isFastPathSupported() && !disabled) { descriptors = SystemModules.descriptors(); + targets = SystemModules.targets(); recordedHashes = SystemModules.hashes(); moduleResolutions = SystemModules.moduleResolutions(); } else { // if fast loading of ModuleDescriptors is disabled // fallback to read module-info.class descriptors = new ModuleDescriptor[n]; + targets = new ModuleTarget[n]; recordedHashes = new ModuleHashes[n]; moduleResolutions = new ModuleResolution[n]; + ImageReader imageReader = SystemImage.reader(); for (int i = 0; i < names.length; i++) { String mn = names[i]; ImageLocation loc = imageReader.findLocation(mn, "module-info.class"); ModuleInfo.Attributes attrs = ModuleInfo.read(imageReader.getResourceBuffer(loc), null); descriptors[i] = attrs.descriptor(); + targets[i] = attrs.target(); recordedHashes[i] = attrs.recordedHashes(); moduleResolutions[i] = attrs.moduleResolution(); } @@ -192,6 +210,7 @@ public class SystemModuleFinder implements ModuleFinder { // create the ModuleReference ModuleReference mref = toModuleReference(md, + targets[i], recordedHashes[i], hashSupplier(names[i]), moduleResolutions[i]); @@ -219,6 +238,7 @@ public class SystemModuleFinder implements ModuleFinder { } private ModuleReference toModuleReference(ModuleDescriptor md, + ModuleTarget target, ModuleHashes recordedHashes, HashSupplier hasher, ModuleResolution mres) { @@ -232,9 +252,14 @@ public class SystemModuleFinder implements ModuleFinder { } }; - ModuleReference mref = - new ModuleReferenceImpl(md, uri, readerSupplier, null, - recordedHashes, hasher, mres); + ModuleReference mref = new ModuleReferenceImpl(md, + uri, + readerSupplier, + null, + target, + recordedHashes, + hasher, + mres); // may need a reference to a patched module if --patch-module specified mref = ModuleBootstrap.patcher().patchIfNeeded(mref); @@ -291,6 +316,7 @@ public class SystemModuleFinder implements ModuleFinder { Objects.requireNonNull(name); if (closed) throw new IOException("ModuleReader is closed"); + ImageReader imageReader = SystemImage.reader(); if (imageReader != null) { return imageReader.findLocation(module, name); } else { @@ -330,7 +356,7 @@ public class SystemModuleFinder implements ModuleFinder { public Optional read(String name) throws IOException { ImageLocation location = findImageLocation(name); if (location != null) { - return Optional.of(imageReader.getResourceBuffer(location)); + return Optional.of(SystemImage.reader().getResourceBuffer(location)); } else { return Optional.empty(); } @@ -372,7 +398,7 @@ public class SystemModuleFinder implements ModuleFinder { stack = new ArrayDeque<>(); // push the root node to the stack to get started - ImageReader.Node dir = imageReader.findNode(moduleRoot); + ImageReader.Node dir = SystemImage.reader().findNode(moduleRoot); if (dir == null || !dir.isDirectory()) throw new IOException(moduleRoot + " not a directory"); stack.push(dir); @@ -390,7 +416,7 @@ public class SystemModuleFinder implements ModuleFinder { String name = node.getName(); if (node.isDirectory()) { // build node - ImageReader.Node dir = imageReader.findNode(name); + ImageReader.Node dir = SystemImage.reader().findNode(name); assert dir.isDirectory(); stack.push(dir); } else { diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/SystemModules.java b/jdk/src/java.base/share/classes/jdk/internal/module/SystemModules.java index 596bb697238..18817cc9bc5 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/SystemModules.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/SystemModules.java @@ -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 @@ -26,8 +26,11 @@ package jdk.internal.module; import java.lang.module.ModuleDescriptor; +import java.util.Collections; +import java.util.Map; +import java.util.Set; -/* +/** * SystemModules class will be generated at link time to create * ModuleDescriptor for the system modules directly to improve * the module descriptor reconstitution time. @@ -57,15 +60,14 @@ public final class SystemModules { public static int PACKAGES_IN_BOOT_LAYER = 1024; /** - * @return {@code false} if there are no split packages in the run-time - * image, {@code true} if there are or if it's not been checked. + * Return true if there are no split packages in the run-time image. */ public static boolean hasSplitPackages() { return true; } /** - * Returns a non-empty array of ModuleDescriptors in the run-time image. + * Returns a non-empty array of ModuleDescriptor objects in the run-time image. * * When running an exploded image it returns an empty array. */ @@ -73,6 +75,15 @@ public final class SystemModules { throw new InternalError("expected to be overridden at link time"); } + /** + * Returns a non-empty array of ModuleTarget objects in the run-time image. + * + * When running an exploded image it returns an empty array. + */ + public static ModuleTarget[] targets() { + throw new InternalError("expected to be overridden at link time"); + } + /** * Returns a non-empty array of ModuleHashes recorded in each module * in the run-time image. @@ -89,4 +100,20 @@ public final class SystemModules { public static ModuleResolution[] moduleResolutions() { throw new InternalError("expected to be overridden at link time"); } + + /** + * Returns the map of module concealed packages to open. The map key is the + * module name, the value is the set of concealed packages to open. + */ + public static Map> concealedPackagesToOpen() { + return Collections.emptyMap(); + } + + /** + * Returns the map of module exported packages to open. The map key is the + * module name, the value is the set of exported packages to open. + */ + public static Map> exportedPackagesToOpen() { + return Collections.emptyMap(); + } } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/jdk8_packages.dat b/jdk/src/java.base/share/classes/jdk/internal/module/jdk8_packages.dat new file mode 100644 index 00000000000..2774f2bb492 --- /dev/null +++ b/jdk/src/java.base/share/classes/jdk/internal/module/jdk8_packages.dat @@ -0,0 +1,1340 @@ +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. 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. +# +apple.applescript +apple.laf +apple.launcher +apple.security +com.apple.concurrent +com.apple.eawt +com.apple.eawt.event +com.apple.eio +com.apple.laf +com.apple.laf.resources +com.oracle.jrockit.jfr +com.oracle.jrockit.jfr.client +com.oracle.jrockit.jfr.management +com.oracle.security.ucrypto +com.oracle.util +com.oracle.webservices.internal.api +com.oracle.webservices.internal.api.databinding +com.oracle.webservices.internal.api.message +com.oracle.webservices.internal.impl.encoding +com.oracle.webservices.internal.impl.internalspi.encoding +com.oracle.xmlns.internal.webservices.jaxws_databinding +com.sun.accessibility.internal.resources +com.sun.activation.registries +com.sun.awt +com.sun.beans +com.sun.beans.decoder +com.sun.beans.editors +com.sun.beans.finder +com.sun.beans.infos +com.sun.beans.util +com.sun.codemodel.internal +com.sun.codemodel.internal.fmt +com.sun.codemodel.internal.util +com.sun.codemodel.internal.writer +com.sun.corba.se.impl.activation +com.sun.corba.se.impl.copyobject +com.sun.corba.se.impl.corba +com.sun.corba.se.impl.dynamicany +com.sun.corba.se.impl.encoding +com.sun.corba.se.impl.interceptors +com.sun.corba.se.impl.io +com.sun.corba.se.impl.ior +com.sun.corba.se.impl.ior.iiop +com.sun.corba.se.impl.javax.rmi +com.sun.corba.se.impl.javax.rmi.CORBA +com.sun.corba.se.impl.legacy.connection +com.sun.corba.se.impl.logging +com.sun.corba.se.impl.monitoring +com.sun.corba.se.impl.naming.cosnaming +com.sun.corba.se.impl.naming.namingutil +com.sun.corba.se.impl.naming.pcosnaming +com.sun.corba.se.impl.oa +com.sun.corba.se.impl.oa.poa +com.sun.corba.se.impl.oa.toa +com.sun.corba.se.impl.orb +com.sun.corba.se.impl.orbutil +com.sun.corba.se.impl.orbutil.closure +com.sun.corba.se.impl.orbutil.concurrent +com.sun.corba.se.impl.orbutil.fsm +com.sun.corba.se.impl.orbutil.graph +com.sun.corba.se.impl.orbutil.threadpool +com.sun.corba.se.impl.presentation.rmi +com.sun.corba.se.impl.protocol +com.sun.corba.se.impl.protocol.giopmsgheaders +com.sun.corba.se.impl.resolver +com.sun.corba.se.impl.transport +com.sun.corba.se.impl.util +com.sun.corba.se.internal.CosNaming +com.sun.corba.se.internal.Interceptors +com.sun.corba.se.internal.POA +com.sun.corba.se.internal.corba +com.sun.corba.se.internal.iiop +com.sun.corba.se.org.omg.CORBA +com.sun.corba.se.pept.broker +com.sun.corba.se.pept.encoding +com.sun.corba.se.pept.protocol +com.sun.corba.se.pept.transport +com.sun.corba.se.spi.activation +com.sun.corba.se.spi.activation.InitialNameServicePackage +com.sun.corba.se.spi.activation.LocatorPackage +com.sun.corba.se.spi.activation.RepositoryPackage +com.sun.corba.se.spi.copyobject +com.sun.corba.se.spi.encoding +com.sun.corba.se.spi.extension +com.sun.corba.se.spi.ior +com.sun.corba.se.spi.ior.iiop +com.sun.corba.se.spi.legacy.connection +com.sun.corba.se.spi.legacy.interceptor +com.sun.corba.se.spi.logging +com.sun.corba.se.spi.monitoring +com.sun.corba.se.spi.oa +com.sun.corba.se.spi.orb +com.sun.corba.se.spi.orbutil.closure +com.sun.corba.se.spi.orbutil.fsm +com.sun.corba.se.spi.orbutil.proxy +com.sun.corba.se.spi.orbutil.threadpool +com.sun.corba.se.spi.presentation.rmi +com.sun.corba.se.spi.protocol +com.sun.corba.se.spi.resolver +com.sun.corba.se.spi.servicecontext +com.sun.corba.se.spi.transport +com.sun.crypto.provider +com.sun.demo.jvmti.hprof +com.sun.deploy.uitoolkit.impl.fx +com.sun.deploy.uitoolkit.impl.fx.ui +com.sun.deploy.uitoolkit.impl.fx.ui.resources +com.sun.glass.events +com.sun.glass.events.mac +com.sun.glass.ui +com.sun.glass.ui.delegate +com.sun.glass.ui.gtk +com.sun.glass.ui.mac +com.sun.glass.ui.win +com.sun.glass.utils +com.sun.image.codec.jpeg +com.sun.imageio.plugins.bmp +com.sun.imageio.plugins.common +com.sun.imageio.plugins.gif +com.sun.imageio.plugins.jpeg +com.sun.imageio.plugins.png +com.sun.imageio.plugins.wbmp +com.sun.imageio.spi +com.sun.imageio.stream +com.sun.istack.internal +com.sun.istack.internal.localization +com.sun.istack.internal.logging +com.sun.istack.internal.tools +com.sun.jarsigner +com.sun.java.accessibility +com.sun.java.accessibility.util +com.sun.java.accessibility.util.java.awt +com.sun.java.browser.dom +com.sun.java.browser.net +com.sun.java.swing +com.sun.java.swing.plaf.gtk +com.sun.java.swing.plaf.gtk.resources +com.sun.java.swing.plaf.motif +com.sun.java.swing.plaf.motif.resources +com.sun.java.swing.plaf.nimbus +com.sun.java.swing.plaf.windows +com.sun.java.swing.plaf.windows.resources +com.sun.java.util.jar.pack +com.sun.java_cup.internal.runtime +com.sun.javadoc +com.sun.javafx +com.sun.javafx.animation +com.sun.javafx.applet +com.sun.javafx.application +com.sun.javafx.beans +com.sun.javafx.beans.event +com.sun.javafx.binding +com.sun.javafx.charts +com.sun.javafx.collections +com.sun.javafx.css +com.sun.javafx.css.converters +com.sun.javafx.css.parser +com.sun.javafx.cursor +com.sun.javafx.effect +com.sun.javafx.embed +com.sun.javafx.event +com.sun.javafx.font +com.sun.javafx.font.coretext +com.sun.javafx.font.directwrite +com.sun.javafx.font.freetype +com.sun.javafx.font.t2k +com.sun.javafx.fxml +com.sun.javafx.fxml.builder +com.sun.javafx.fxml.expression +com.sun.javafx.geom +com.sun.javafx.geom.transform +com.sun.javafx.geometry +com.sun.javafx.iio +com.sun.javafx.iio.bmp +com.sun.javafx.iio.common +com.sun.javafx.iio.gif +com.sun.javafx.iio.ios +com.sun.javafx.iio.jpeg +com.sun.javafx.iio.png +com.sun.javafx.image +com.sun.javafx.image.impl +com.sun.javafx.jmx +com.sun.javafx.logging +com.sun.javafx.media +com.sun.javafx.menu +com.sun.javafx.perf +com.sun.javafx.print +com.sun.javafx.property +com.sun.javafx.property.adapter +com.sun.javafx.robot +com.sun.javafx.robot.impl +com.sun.javafx.runtime +com.sun.javafx.runtime.async +com.sun.javafx.runtime.eula +com.sun.javafx.scene +com.sun.javafx.scene.control +com.sun.javafx.scene.control.behavior +com.sun.javafx.scene.control.skin +com.sun.javafx.scene.control.skin.resources +com.sun.javafx.scene.input +com.sun.javafx.scene.layout.region +com.sun.javafx.scene.paint +com.sun.javafx.scene.shape +com.sun.javafx.scene.text +com.sun.javafx.scene.transform +com.sun.javafx.scene.traversal +com.sun.javafx.scene.web +com.sun.javafx.scene.web.behavior +com.sun.javafx.scene.web.skin +com.sun.javafx.sg.prism +com.sun.javafx.sg.prism.web +com.sun.javafx.stage +com.sun.javafx.text +com.sun.javafx.tk +com.sun.javafx.tk.quantum +com.sun.javafx.util +com.sun.javafx.webkit +com.sun.javafx.webkit.drt +com.sun.javafx.webkit.prism +com.sun.javafx.webkit.prism.theme +com.sun.javafx.webkit.theme +com.sun.jdi +com.sun.jdi.connect +com.sun.jdi.connect.spi +com.sun.jdi.event +com.sun.jdi.request +com.sun.jmx.defaults +com.sun.jmx.interceptor +com.sun.jmx.mbeanserver +com.sun.jmx.remote.internal +com.sun.jmx.remote.protocol.iiop +com.sun.jmx.remote.protocol.rmi +com.sun.jmx.remote.security +com.sun.jmx.remote.util +com.sun.jmx.snmp +com.sun.jmx.snmp.IPAcl +com.sun.jmx.snmp.agent +com.sun.jmx.snmp.daemon +com.sun.jmx.snmp.defaults +com.sun.jmx.snmp.internal +com.sun.jmx.snmp.mpm +com.sun.jmx.snmp.tasks +com.sun.jndi.cosnaming +com.sun.jndi.dns +com.sun.jndi.ldap +com.sun.jndi.ldap.ext +com.sun.jndi.ldap.pool +com.sun.jndi.ldap.sasl +com.sun.jndi.rmi.registry +com.sun.jndi.toolkit.corba +com.sun.jndi.toolkit.ctx +com.sun.jndi.toolkit.dir +com.sun.jndi.toolkit.url +com.sun.jndi.url.corbaname +com.sun.jndi.url.dns +com.sun.jndi.url.iiop +com.sun.jndi.url.iiopname +com.sun.jndi.url.ldap +com.sun.jndi.url.ldaps +com.sun.jndi.url.rmi +com.sun.management +com.sun.management.jmx +com.sun.media.jfxmedia +com.sun.media.jfxmedia.control +com.sun.media.jfxmedia.effects +com.sun.media.jfxmedia.events +com.sun.media.jfxmedia.locator +com.sun.media.jfxmedia.logging +com.sun.media.jfxmedia.track +com.sun.media.jfxmediaimpl +com.sun.media.jfxmediaimpl.platform +com.sun.media.jfxmediaimpl.platform.gstreamer +com.sun.media.jfxmediaimpl.platform.ios +com.sun.media.jfxmediaimpl.platform.java +com.sun.media.jfxmediaimpl.platform.osx +com.sun.media.sound +com.sun.naming.internal +com.sun.net.httpserver +com.sun.net.httpserver.spi +com.sun.net.ssl +com.sun.net.ssl.internal.ssl +com.sun.net.ssl.internal.www.protocol.https +com.sun.nio.file +com.sun.nio.sctp +com.sun.nio.zipfs +com.sun.openpisces +com.sun.org.apache.bcel.internal +com.sun.org.apache.bcel.internal.classfile +com.sun.org.apache.bcel.internal.generic +com.sun.org.apache.bcel.internal.util +com.sun.org.apache.regexp.internal +com.sun.org.apache.xalan.internal +com.sun.org.apache.xalan.internal.extensions +com.sun.org.apache.xalan.internal.lib +com.sun.org.apache.xalan.internal.res +com.sun.org.apache.xalan.internal.templates +com.sun.org.apache.xalan.internal.utils +com.sun.org.apache.xalan.internal.xslt +com.sun.org.apache.xalan.internal.xsltc +com.sun.org.apache.xalan.internal.xsltc.cmdline +com.sun.org.apache.xalan.internal.xsltc.cmdline.getopt +com.sun.org.apache.xalan.internal.xsltc.compiler +com.sun.org.apache.xalan.internal.xsltc.compiler.util +com.sun.org.apache.xalan.internal.xsltc.dom +com.sun.org.apache.xalan.internal.xsltc.runtime +com.sun.org.apache.xalan.internal.xsltc.runtime.output +com.sun.org.apache.xalan.internal.xsltc.trax +com.sun.org.apache.xalan.internal.xsltc.util +com.sun.org.apache.xerces.internal.dom +com.sun.org.apache.xerces.internal.dom.events +com.sun.org.apache.xerces.internal.impl +com.sun.org.apache.xerces.internal.impl.dtd +com.sun.org.apache.xerces.internal.impl.dtd.models +com.sun.org.apache.xerces.internal.impl.dv +com.sun.org.apache.xerces.internal.impl.dv.dtd +com.sun.org.apache.xerces.internal.impl.dv.util +com.sun.org.apache.xerces.internal.impl.dv.xs +com.sun.org.apache.xerces.internal.impl.io +com.sun.org.apache.xerces.internal.impl.msg +com.sun.org.apache.xerces.internal.impl.validation +com.sun.org.apache.xerces.internal.impl.xpath +com.sun.org.apache.xerces.internal.impl.xpath.regex +com.sun.org.apache.xerces.internal.impl.xs +com.sun.org.apache.xerces.internal.impl.xs.identity +com.sun.org.apache.xerces.internal.impl.xs.models +com.sun.org.apache.xerces.internal.impl.xs.opti +com.sun.org.apache.xerces.internal.impl.xs.traversers +com.sun.org.apache.xerces.internal.impl.xs.util +com.sun.org.apache.xerces.internal.jaxp +com.sun.org.apache.xerces.internal.jaxp.datatype +com.sun.org.apache.xerces.internal.jaxp.validation +com.sun.org.apache.xerces.internal.parsers +com.sun.org.apache.xerces.internal.util +com.sun.org.apache.xerces.internal.utils +com.sun.org.apache.xerces.internal.xinclude +com.sun.org.apache.xerces.internal.xni +com.sun.org.apache.xerces.internal.xni.grammars +com.sun.org.apache.xerces.internal.xni.parser +com.sun.org.apache.xerces.internal.xpointer +com.sun.org.apache.xerces.internal.xs +com.sun.org.apache.xerces.internal.xs.datatypes +com.sun.org.apache.xml.internal.dtm +com.sun.org.apache.xml.internal.dtm.ref +com.sun.org.apache.xml.internal.dtm.ref.dom2dtm +com.sun.org.apache.xml.internal.dtm.ref.sax2dtm +com.sun.org.apache.xml.internal.res +com.sun.org.apache.xml.internal.resolver +com.sun.org.apache.xml.internal.resolver.helpers +com.sun.org.apache.xml.internal.resolver.readers +com.sun.org.apache.xml.internal.resolver.tools +com.sun.org.apache.xml.internal.security +com.sun.org.apache.xml.internal.security.algorithms +com.sun.org.apache.xml.internal.security.algorithms.implementations +com.sun.org.apache.xml.internal.security.c14n +com.sun.org.apache.xml.internal.security.c14n.helper +com.sun.org.apache.xml.internal.security.c14n.implementations +com.sun.org.apache.xml.internal.security.encryption +com.sun.org.apache.xml.internal.security.exceptions +com.sun.org.apache.xml.internal.security.keys +com.sun.org.apache.xml.internal.security.keys.content +com.sun.org.apache.xml.internal.security.keys.content.keyvalues +com.sun.org.apache.xml.internal.security.keys.content.x509 +com.sun.org.apache.xml.internal.security.keys.keyresolver +com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations +com.sun.org.apache.xml.internal.security.keys.storage +com.sun.org.apache.xml.internal.security.keys.storage.implementations +com.sun.org.apache.xml.internal.security.signature +com.sun.org.apache.xml.internal.security.signature.reference +com.sun.org.apache.xml.internal.security.transforms +com.sun.org.apache.xml.internal.security.transforms.implementations +com.sun.org.apache.xml.internal.security.transforms.params +com.sun.org.apache.xml.internal.security.utils +com.sun.org.apache.xml.internal.security.utils.resolver +com.sun.org.apache.xml.internal.security.utils.resolver.implementations +com.sun.org.apache.xml.internal.serialize +com.sun.org.apache.xml.internal.serializer +com.sun.org.apache.xml.internal.serializer.utils +com.sun.org.apache.xml.internal.utils +com.sun.org.apache.xml.internal.utils.res +com.sun.org.apache.xpath.internal +com.sun.org.apache.xpath.internal.axes +com.sun.org.apache.xpath.internal.compiler +com.sun.org.apache.xpath.internal.domapi +com.sun.org.apache.xpath.internal.functions +com.sun.org.apache.xpath.internal.jaxp +com.sun.org.apache.xpath.internal.objects +com.sun.org.apache.xpath.internal.operations +com.sun.org.apache.xpath.internal.patterns +com.sun.org.apache.xpath.internal.res +com.sun.org.glassfish.external.amx +com.sun.org.glassfish.external.arc +com.sun.org.glassfish.external.probe.provider +com.sun.org.glassfish.external.probe.provider.annotations +com.sun.org.glassfish.external.statistics +com.sun.org.glassfish.external.statistics.annotations +com.sun.org.glassfish.external.statistics.impl +com.sun.org.glassfish.gmbal +com.sun.org.glassfish.gmbal.util +com.sun.org.omg.CORBA +com.sun.org.omg.CORBA.ValueDefPackage +com.sun.org.omg.CORBA.portable +com.sun.org.omg.SendingContext +com.sun.org.omg.SendingContext.CodeBasePackage +com.sun.pisces +com.sun.prism +com.sun.prism.d3d +com.sun.prism.es2 +com.sun.prism.image +com.sun.prism.impl +com.sun.prism.impl.packrect +com.sun.prism.impl.paint +com.sun.prism.impl.ps +com.sun.prism.impl.shape +com.sun.prism.j2d +com.sun.prism.j2d.paint +com.sun.prism.j2d.print +com.sun.prism.paint +com.sun.prism.ps +com.sun.prism.shader +com.sun.prism.shape +com.sun.prism.sw +com.sun.rmi.rmid +com.sun.rowset +com.sun.rowset.internal +com.sun.rowset.providers +com.sun.scenario +com.sun.scenario.animation +com.sun.scenario.animation.shared +com.sun.scenario.effect +com.sun.scenario.effect.impl +com.sun.scenario.effect.impl.es2 +com.sun.scenario.effect.impl.hw +com.sun.scenario.effect.impl.hw.d3d +com.sun.scenario.effect.impl.prism +com.sun.scenario.effect.impl.prism.ps +com.sun.scenario.effect.impl.prism.sw +com.sun.scenario.effect.impl.state +com.sun.scenario.effect.impl.sw +com.sun.scenario.effect.impl.sw.java +com.sun.scenario.effect.impl.sw.sse +com.sun.scenario.effect.light +com.sun.security.auth +com.sun.security.auth.callback +com.sun.security.auth.login +com.sun.security.auth.module +com.sun.security.cert.internal.x509 +com.sun.security.jgss +com.sun.security.ntlm +com.sun.security.sasl +com.sun.security.sasl.digest +com.sun.security.sasl.gsskerb +com.sun.security.sasl.ntlm +com.sun.security.sasl.util +com.sun.source.doctree +com.sun.source.tree +com.sun.source.util +com.sun.swing.internal.plaf.basic.resources +com.sun.swing.internal.plaf.metal.resources +com.sun.swing.internal.plaf.synth.resources +com.sun.tools.attach +com.sun.tools.attach.spi +com.sun.tools.classfile +com.sun.tools.corba.se.idl +com.sun.tools.corba.se.idl.constExpr +com.sun.tools.corba.se.idl.som.cff +com.sun.tools.corba.se.idl.som.idlemit +com.sun.tools.corba.se.idl.toJavaPortable +com.sun.tools.doclets +com.sun.tools.doclets.formats.html +com.sun.tools.doclets.formats.html.markup +com.sun.tools.doclets.formats.html.resources +com.sun.tools.doclets.internal.toolkit +com.sun.tools.doclets.internal.toolkit.builders +com.sun.tools.doclets.internal.toolkit.resources +com.sun.tools.doclets.internal.toolkit.taglets +com.sun.tools.doclets.internal.toolkit.util +com.sun.tools.doclets.internal.toolkit.util.links +com.sun.tools.doclets.standard +com.sun.tools.doclint +com.sun.tools.doclint.resources +com.sun.tools.example.debug.expr +com.sun.tools.example.debug.tty +com.sun.tools.extcheck +com.sun.tools.hat +com.sun.tools.hat.internal.model +com.sun.tools.hat.internal.oql +com.sun.tools.hat.internal.parser +com.sun.tools.hat.internal.server +com.sun.tools.hat.internal.util +com.sun.tools.internal.jxc +com.sun.tools.internal.jxc.ap +com.sun.tools.internal.jxc.api +com.sun.tools.internal.jxc.api.impl.j2s +com.sun.tools.internal.jxc.gen.config +com.sun.tools.internal.jxc.model.nav +com.sun.tools.internal.ws +com.sun.tools.internal.ws.api +com.sun.tools.internal.ws.api.wsdl +com.sun.tools.internal.ws.processor +com.sun.tools.internal.ws.processor.generator +com.sun.tools.internal.ws.processor.model +com.sun.tools.internal.ws.processor.model.exporter +com.sun.tools.internal.ws.processor.model.java +com.sun.tools.internal.ws.processor.model.jaxb +com.sun.tools.internal.ws.processor.modeler +com.sun.tools.internal.ws.processor.modeler.annotation +com.sun.tools.internal.ws.processor.modeler.wsdl +com.sun.tools.internal.ws.processor.util +com.sun.tools.internal.ws.resources +com.sun.tools.internal.ws.spi +com.sun.tools.internal.ws.util +com.sun.tools.internal.ws.util.xml +com.sun.tools.internal.ws.wscompile +com.sun.tools.internal.ws.wscompile.plugin.at_generated +com.sun.tools.internal.ws.wsdl.document +com.sun.tools.internal.ws.wsdl.document.http +com.sun.tools.internal.ws.wsdl.document.jaxws +com.sun.tools.internal.ws.wsdl.document.mime +com.sun.tools.internal.ws.wsdl.document.schema +com.sun.tools.internal.ws.wsdl.document.soap +com.sun.tools.internal.ws.wsdl.framework +com.sun.tools.internal.ws.wsdl.parser +com.sun.tools.internal.xjc +com.sun.tools.internal.xjc.addon.accessors +com.sun.tools.internal.xjc.addon.at_generated +com.sun.tools.internal.xjc.addon.code_injector +com.sun.tools.internal.xjc.addon.episode +com.sun.tools.internal.xjc.addon.locator +com.sun.tools.internal.xjc.addon.sync +com.sun.tools.internal.xjc.api +com.sun.tools.internal.xjc.api.impl.s2j +com.sun.tools.internal.xjc.api.util +com.sun.tools.internal.xjc.generator.annotation.spec +com.sun.tools.internal.xjc.generator.bean +com.sun.tools.internal.xjc.generator.bean.field +com.sun.tools.internal.xjc.generator.util +com.sun.tools.internal.xjc.model +com.sun.tools.internal.xjc.model.nav +com.sun.tools.internal.xjc.outline +com.sun.tools.internal.xjc.reader +com.sun.tools.internal.xjc.reader.dtd +com.sun.tools.internal.xjc.reader.dtd.bindinfo +com.sun.tools.internal.xjc.reader.gbind +com.sun.tools.internal.xjc.reader.internalizer +com.sun.tools.internal.xjc.reader.relaxng +com.sun.tools.internal.xjc.reader.xmlschema +com.sun.tools.internal.xjc.reader.xmlschema.bindinfo +com.sun.tools.internal.xjc.reader.xmlschema.ct +com.sun.tools.internal.xjc.reader.xmlschema.parser +com.sun.tools.internal.xjc.runtime +com.sun.tools.internal.xjc.util +com.sun.tools.internal.xjc.writer +com.sun.tools.javac +com.sun.tools.javac.api +com.sun.tools.javac.code +com.sun.tools.javac.comp +com.sun.tools.javac.file +com.sun.tools.javac.jvm +com.sun.tools.javac.main +com.sun.tools.javac.model +com.sun.tools.javac.nio +com.sun.tools.javac.parser +com.sun.tools.javac.processing +com.sun.tools.javac.resources +com.sun.tools.javac.sym +com.sun.tools.javac.tree +com.sun.tools.javac.util +com.sun.tools.javadoc +com.sun.tools.javadoc.api +com.sun.tools.javadoc.resources +com.sun.tools.javah +com.sun.tools.javah.resources +com.sun.tools.javap +com.sun.tools.javap.resources +com.sun.tools.jconsole +com.sun.tools.jdeps +com.sun.tools.jdeps.resources +com.sun.tools.jdi +com.sun.tools.jdi.resources +com.sun.tools.script.shell +com.sun.tracing +com.sun.tracing.dtrace +com.sun.webkit +com.sun.webkit.dom +com.sun.webkit.event +com.sun.webkit.graphics +com.sun.webkit.network +com.sun.webkit.network.about +com.sun.webkit.network.data +com.sun.webkit.perf +com.sun.webkit.plugin +com.sun.webkit.text +com.sun.xml.internal.bind +com.sun.xml.internal.bind.annotation +com.sun.xml.internal.bind.api +com.sun.xml.internal.bind.api.impl +com.sun.xml.internal.bind.marshaller +com.sun.xml.internal.bind.unmarshaller +com.sun.xml.internal.bind.util +com.sun.xml.internal.bind.v2 +com.sun.xml.internal.bind.v2.bytecode +com.sun.xml.internal.bind.v2.model.annotation +com.sun.xml.internal.bind.v2.model.core +com.sun.xml.internal.bind.v2.model.impl +com.sun.xml.internal.bind.v2.model.nav +com.sun.xml.internal.bind.v2.model.runtime +com.sun.xml.internal.bind.v2.model.util +com.sun.xml.internal.bind.v2.runtime +com.sun.xml.internal.bind.v2.runtime.output +com.sun.xml.internal.bind.v2.runtime.property +com.sun.xml.internal.bind.v2.runtime.reflect +com.sun.xml.internal.bind.v2.runtime.reflect.opt +com.sun.xml.internal.bind.v2.runtime.unmarshaller +com.sun.xml.internal.bind.v2.schemagen +com.sun.xml.internal.bind.v2.schemagen.episode +com.sun.xml.internal.bind.v2.schemagen.xmlschema +com.sun.xml.internal.bind.v2.util +com.sun.xml.internal.dtdparser +com.sun.xml.internal.fastinfoset +com.sun.xml.internal.fastinfoset.algorithm +com.sun.xml.internal.fastinfoset.alphabet +com.sun.xml.internal.fastinfoset.dom +com.sun.xml.internal.fastinfoset.org.apache.xerces.util +com.sun.xml.internal.fastinfoset.sax +com.sun.xml.internal.fastinfoset.stax +com.sun.xml.internal.fastinfoset.stax.events +com.sun.xml.internal.fastinfoset.stax.factory +com.sun.xml.internal.fastinfoset.stax.util +com.sun.xml.internal.fastinfoset.tools +com.sun.xml.internal.fastinfoset.util +com.sun.xml.internal.fastinfoset.vocab +com.sun.xml.internal.messaging.saaj +com.sun.xml.internal.messaging.saaj.client.p2p +com.sun.xml.internal.messaging.saaj.packaging.mime +com.sun.xml.internal.messaging.saaj.packaging.mime.internet +com.sun.xml.internal.messaging.saaj.packaging.mime.util +com.sun.xml.internal.messaging.saaj.soap +com.sun.xml.internal.messaging.saaj.soap.dynamic +com.sun.xml.internal.messaging.saaj.soap.impl +com.sun.xml.internal.messaging.saaj.soap.name +com.sun.xml.internal.messaging.saaj.soap.ver1_1 +com.sun.xml.internal.messaging.saaj.soap.ver1_2 +com.sun.xml.internal.messaging.saaj.util +com.sun.xml.internal.messaging.saaj.util.transform +com.sun.xml.internal.org.jvnet.fastinfoset +com.sun.xml.internal.org.jvnet.fastinfoset.sax +com.sun.xml.internal.org.jvnet.fastinfoset.sax.helpers +com.sun.xml.internal.org.jvnet.fastinfoset.stax +com.sun.xml.internal.org.jvnet.mimepull +com.sun.xml.internal.org.jvnet.staxex +com.sun.xml.internal.rngom.ast.builder +com.sun.xml.internal.rngom.ast.om +com.sun.xml.internal.rngom.ast.util +com.sun.xml.internal.rngom.binary +com.sun.xml.internal.rngom.binary.visitor +com.sun.xml.internal.rngom.digested +com.sun.xml.internal.rngom.dt +com.sun.xml.internal.rngom.dt.builtin +com.sun.xml.internal.rngom.nc +com.sun.xml.internal.rngom.parse +com.sun.xml.internal.rngom.parse.compact +com.sun.xml.internal.rngom.parse.host +com.sun.xml.internal.rngom.parse.xml +com.sun.xml.internal.rngom.util +com.sun.xml.internal.rngom.xml.sax +com.sun.xml.internal.rngom.xml.util +com.sun.xml.internal.stream +com.sun.xml.internal.stream.buffer +com.sun.xml.internal.stream.buffer.sax +com.sun.xml.internal.stream.buffer.stax +com.sun.xml.internal.stream.dtd +com.sun.xml.internal.stream.dtd.nonvalidating +com.sun.xml.internal.stream.events +com.sun.xml.internal.stream.util +com.sun.xml.internal.stream.writers +com.sun.xml.internal.txw2 +com.sun.xml.internal.txw2.annotation +com.sun.xml.internal.txw2.output +com.sun.xml.internal.ws +com.sun.xml.internal.ws.addressing +com.sun.xml.internal.ws.addressing.model +com.sun.xml.internal.ws.addressing.policy +com.sun.xml.internal.ws.addressing.v200408 +com.sun.xml.internal.ws.api +com.sun.xml.internal.ws.api.addressing +com.sun.xml.internal.ws.api.client +com.sun.xml.internal.ws.api.config.management +com.sun.xml.internal.ws.api.config.management.policy +com.sun.xml.internal.ws.api.databinding +com.sun.xml.internal.ws.api.fastinfoset +com.sun.xml.internal.ws.api.ha +com.sun.xml.internal.ws.api.handler +com.sun.xml.internal.ws.api.message +com.sun.xml.internal.ws.api.message.saaj +com.sun.xml.internal.ws.api.message.stream +com.sun.xml.internal.ws.api.model +com.sun.xml.internal.ws.api.model.soap +com.sun.xml.internal.ws.api.model.wsdl +com.sun.xml.internal.ws.api.model.wsdl.editable +com.sun.xml.internal.ws.api.pipe +com.sun.xml.internal.ws.api.pipe.helper +com.sun.xml.internal.ws.api.policy +com.sun.xml.internal.ws.api.policy.subject +com.sun.xml.internal.ws.api.server +com.sun.xml.internal.ws.api.streaming +com.sun.xml.internal.ws.api.wsdl.parser +com.sun.xml.internal.ws.api.wsdl.writer +com.sun.xml.internal.ws.assembler +com.sun.xml.internal.ws.assembler.dev +com.sun.xml.internal.ws.assembler.jaxws +com.sun.xml.internal.ws.binding +com.sun.xml.internal.ws.client +com.sun.xml.internal.ws.client.dispatch +com.sun.xml.internal.ws.client.sei +com.sun.xml.internal.ws.commons.xmlutil +com.sun.xml.internal.ws.config.management.policy +com.sun.xml.internal.ws.config.metro.dev +com.sun.xml.internal.ws.config.metro.util +com.sun.xml.internal.ws.db +com.sun.xml.internal.ws.db.glassfish +com.sun.xml.internal.ws.developer +com.sun.xml.internal.ws.dump +com.sun.xml.internal.ws.encoding +com.sun.xml.internal.ws.encoding.fastinfoset +com.sun.xml.internal.ws.encoding.policy +com.sun.xml.internal.ws.encoding.soap +com.sun.xml.internal.ws.encoding.soap.streaming +com.sun.xml.internal.ws.encoding.xml +com.sun.xml.internal.ws.fault +com.sun.xml.internal.ws.handler +com.sun.xml.internal.ws.message +com.sun.xml.internal.ws.message.jaxb +com.sun.xml.internal.ws.message.saaj +com.sun.xml.internal.ws.message.source +com.sun.xml.internal.ws.message.stream +com.sun.xml.internal.ws.model +com.sun.xml.internal.ws.model.soap +com.sun.xml.internal.ws.model.wsdl +com.sun.xml.internal.ws.org.objectweb.asm +com.sun.xml.internal.ws.policy +com.sun.xml.internal.ws.policy.jaxws +com.sun.xml.internal.ws.policy.jaxws.spi +com.sun.xml.internal.ws.policy.privateutil +com.sun.xml.internal.ws.policy.sourcemodel +com.sun.xml.internal.ws.policy.sourcemodel.attach +com.sun.xml.internal.ws.policy.sourcemodel.wspolicy +com.sun.xml.internal.ws.policy.spi +com.sun.xml.internal.ws.policy.subject +com.sun.xml.internal.ws.protocol.soap +com.sun.xml.internal.ws.protocol.xml +com.sun.xml.internal.ws.resources +com.sun.xml.internal.ws.runtime.config +com.sun.xml.internal.ws.server +com.sun.xml.internal.ws.server.provider +com.sun.xml.internal.ws.server.sei +com.sun.xml.internal.ws.spi +com.sun.xml.internal.ws.spi.db +com.sun.xml.internal.ws.streaming +com.sun.xml.internal.ws.transport +com.sun.xml.internal.ws.transport.http +com.sun.xml.internal.ws.transport.http.client +com.sun.xml.internal.ws.transport.http.server +com.sun.xml.internal.ws.util +com.sun.xml.internal.ws.util.exception +com.sun.xml.internal.ws.util.pipe +com.sun.xml.internal.ws.util.xml +com.sun.xml.internal.ws.wsdl +com.sun.xml.internal.ws.wsdl.parser +com.sun.xml.internal.ws.wsdl.writer +com.sun.xml.internal.ws.wsdl.writer.document +com.sun.xml.internal.ws.wsdl.writer.document.http +com.sun.xml.internal.ws.wsdl.writer.document.soap +com.sun.xml.internal.ws.wsdl.writer.document.soap12 +com.sun.xml.internal.ws.wsdl.writer.document.xsd +com.sun.xml.internal.xsom +com.sun.xml.internal.xsom.impl +com.sun.xml.internal.xsom.impl.parser +com.sun.xml.internal.xsom.impl.parser.state +com.sun.xml.internal.xsom.impl.scd +com.sun.xml.internal.xsom.impl.util +com.sun.xml.internal.xsom.parser +com.sun.xml.internal.xsom.util +com.sun.xml.internal.xsom.visitor +java.applet +java.awt +java.awt.color +java.awt.datatransfer +java.awt.dnd +java.awt.dnd.peer +java.awt.event +java.awt.font +java.awt.geom +java.awt.im +java.awt.im.spi +java.awt.image +java.awt.image.renderable +java.awt.peer +java.awt.print +java.beans +java.beans.beancontext +java.io +java.lang +java.lang.annotation +java.lang.instrument +java.lang.invoke +java.lang.management +java.lang.ref +java.lang.reflect +java.math +java.net +java.nio +java.nio.channels +java.nio.channels.spi +java.nio.charset +java.nio.charset.spi +java.nio.file +java.nio.file.attribute +java.nio.file.spi +java.rmi +java.rmi.activation +java.rmi.dgc +java.rmi.registry +java.rmi.server +java.security +java.security.acl +java.security.cert +java.security.interfaces +java.security.spec +java.sql +java.text +java.text.spi +java.time +java.time.chrono +java.time.format +java.time.temporal +java.time.zone +java.util +java.util.concurrent +java.util.concurrent.atomic +java.util.concurrent.locks +java.util.function +java.util.jar +java.util.logging +java.util.prefs +java.util.regex +java.util.spi +java.util.stream +java.util.zip +javafx.animation +javafx.application +javafx.beans +javafx.beans.binding +javafx.beans.property +javafx.beans.property.adapter +javafx.beans.value +javafx.collections +javafx.collections.transformation +javafx.concurrent +javafx.css +javafx.embed.swing +javafx.embed.swt +javafx.event +javafx.fxml +javafx.geometry +javafx.print +javafx.scene +javafx.scene.canvas +javafx.scene.chart +javafx.scene.control +javafx.scene.control.cell +javafx.scene.effect +javafx.scene.image +javafx.scene.input +javafx.scene.layout +javafx.scene.media +javafx.scene.paint +javafx.scene.shape +javafx.scene.text +javafx.scene.transform +javafx.scene.web +javafx.stage +javafx.util +javafx.util.converter +javax.accessibility +javax.activation +javax.activity +javax.annotation +javax.annotation.processing +javax.crypto +javax.crypto.interfaces +javax.crypto.spec +javax.imageio +javax.imageio.event +javax.imageio.metadata +javax.imageio.plugins.bmp +javax.imageio.plugins.jpeg +javax.imageio.spi +javax.imageio.stream +javax.jws +javax.jws.soap +javax.lang.model +javax.lang.model.element +javax.lang.model.type +javax.lang.model.util +javax.management +javax.management.loading +javax.management.modelmbean +javax.management.monitor +javax.management.openmbean +javax.management.relation +javax.management.remote +javax.management.remote.rmi +javax.management.timer +javax.naming +javax.naming.directory +javax.naming.event +javax.naming.ldap +javax.naming.spi +javax.net +javax.net.ssl +javax.print +javax.print.attribute +javax.print.attribute.standard +javax.print.event +javax.rmi +javax.rmi.CORBA +javax.rmi.ssl +javax.script +javax.security.auth +javax.security.auth.callback +javax.security.auth.kerberos +javax.security.auth.login +javax.security.auth.spi +javax.security.auth.x500 +javax.security.cert +javax.security.sasl +javax.smartcardio +javax.sound.midi +javax.sound.midi.spi +javax.sound.sampled +javax.sound.sampled.spi +javax.sql +javax.sql.rowset +javax.sql.rowset.serial +javax.sql.rowset.spi +javax.swing +javax.swing.border +javax.swing.colorchooser +javax.swing.event +javax.swing.filechooser +javax.swing.plaf +javax.swing.plaf.basic +javax.swing.plaf.metal +javax.swing.plaf.multi +javax.swing.plaf.nimbus +javax.swing.plaf.synth +javax.swing.table +javax.swing.text +javax.swing.text.html +javax.swing.text.html.parser +javax.swing.text.rtf +javax.swing.tree +javax.swing.undo +javax.tools +javax.transaction +javax.transaction.xa +javax.xml +javax.xml.bind +javax.xml.bind.annotation +javax.xml.bind.annotation.adapters +javax.xml.bind.attachment +javax.xml.bind.helpers +javax.xml.bind.util +javax.xml.crypto +javax.xml.crypto.dom +javax.xml.crypto.dsig +javax.xml.crypto.dsig.dom +javax.xml.crypto.dsig.keyinfo +javax.xml.crypto.dsig.spec +javax.xml.datatype +javax.xml.namespace +javax.xml.parsers +javax.xml.soap +javax.xml.stream +javax.xml.stream.events +javax.xml.stream.util +javax.xml.transform +javax.xml.transform.dom +javax.xml.transform.sax +javax.xml.transform.stax +javax.xml.transform.stream +javax.xml.validation +javax.xml.ws +javax.xml.ws.handler +javax.xml.ws.handler.soap +javax.xml.ws.http +javax.xml.ws.soap +javax.xml.ws.spi +javax.xml.ws.spi.http +javax.xml.ws.wsaddressing +javax.xml.xpath +jdk +jdk.internal.cmm +jdk.internal.dynalink +jdk.internal.dynalink.beans +jdk.internal.dynalink.linker +jdk.internal.dynalink.support +jdk.internal.instrumentation +jdk.internal.org.objectweb.asm +jdk.internal.org.objectweb.asm.commons +jdk.internal.org.objectweb.asm.signature +jdk.internal.org.objectweb.asm.tree +jdk.internal.org.objectweb.asm.tree.analysis +jdk.internal.org.objectweb.asm.util +jdk.internal.org.xml.sax +jdk.internal.org.xml.sax.helpers +jdk.internal.util.xml +jdk.internal.util.xml.impl +jdk.jfr.events +jdk.management.cmm +jdk.management.resource +jdk.management.resource.internal +jdk.management.resource.internal.inst +jdk.nashorn.api.scripting +jdk.nashorn.internal +jdk.nashorn.internal.codegen +jdk.nashorn.internal.codegen.types +jdk.nashorn.internal.ir +jdk.nashorn.internal.ir.annotations +jdk.nashorn.internal.ir.debug +jdk.nashorn.internal.ir.visitor +jdk.nashorn.internal.lookup +jdk.nashorn.internal.objects +jdk.nashorn.internal.objects.annotations +jdk.nashorn.internal.parser +jdk.nashorn.internal.runtime +jdk.nashorn.internal.runtime.arrays +jdk.nashorn.internal.runtime.events +jdk.nashorn.internal.runtime.linker +jdk.nashorn.internal.runtime.logging +jdk.nashorn.internal.runtime.options +jdk.nashorn.internal.runtime.regexp +jdk.nashorn.internal.runtime.regexp.joni +jdk.nashorn.internal.runtime.regexp.joni.ast +jdk.nashorn.internal.runtime.regexp.joni.constants +jdk.nashorn.internal.runtime.regexp.joni.encoding +jdk.nashorn.internal.runtime.regexp.joni.exception +jdk.nashorn.internal.scripts +jdk.nashorn.tools +jdk.net +netscape.javascript +oracle.jrockit.jfr +oracle.jrockit.jfr.events +oracle.jrockit.jfr.jdkevents +oracle.jrockit.jfr.jdkevents.throwabletransform +oracle.jrockit.jfr.openmbean +oracle.jrockit.jfr.parser +oracle.jrockit.jfr.settings +oracle.jrockit.jfr.tools +org.ietf.jgss +org.jcp.xml.dsig.internal +org.jcp.xml.dsig.internal.dom +org.omg.CORBA +org.omg.CORBA.DynAnyPackage +org.omg.CORBA.ORBPackage +org.omg.CORBA.TypeCodePackage +org.omg.CORBA.portable +org.omg.CORBA_2_3 +org.omg.CORBA_2_3.portable +org.omg.CosNaming +org.omg.CosNaming.NamingContextExtPackage +org.omg.CosNaming.NamingContextPackage +org.omg.Dynamic +org.omg.DynamicAny +org.omg.DynamicAny.DynAnyFactoryPackage +org.omg.DynamicAny.DynAnyPackage +org.omg.IOP +org.omg.IOP.CodecFactoryPackage +org.omg.IOP.CodecPackage +org.omg.Messaging +org.omg.PortableInterceptor +org.omg.PortableInterceptor.ORBInitInfoPackage +org.omg.PortableServer +org.omg.PortableServer.CurrentPackage +org.omg.PortableServer.POAManagerPackage +org.omg.PortableServer.POAPackage +org.omg.PortableServer.ServantLocatorPackage +org.omg.PortableServer.portable +org.omg.SendingContext +org.omg.stub.java.rmi +org.omg.stub.javax.management.remote.rmi +org.relaxng.datatype +org.relaxng.datatype.helpers +org.w3c.dom +org.w3c.dom.bootstrap +org.w3c.dom.css +org.w3c.dom.events +org.w3c.dom.html +org.w3c.dom.ls +org.w3c.dom.ranges +org.w3c.dom.stylesheets +org.w3c.dom.traversal +org.w3c.dom.views +org.w3c.dom.xpath +org.xml.sax +org.xml.sax.ext +org.xml.sax.helpers +sun.applet +sun.applet.resources +sun.audio +sun.awt +sun.awt.X11 +sun.awt.datatransfer +sun.awt.dnd +sun.awt.event +sun.awt.geom +sun.awt.im +sun.awt.image +sun.awt.image.codec +sun.awt.motif +sun.awt.resources +sun.awt.shell +sun.awt.util +sun.awt.windows +sun.corba +sun.dc +sun.dc.path +sun.dc.pr +sun.font +sun.instrument +sun.invoke +sun.invoke.empty +sun.invoke.util +sun.io +sun.java2d +sun.java2d.cmm +sun.java2d.cmm.kcms +sun.java2d.cmm.lcms +sun.java2d.d3d +sun.java2d.jules +sun.java2d.loops +sun.java2d.opengl +sun.java2d.pipe +sun.java2d.pipe.hw +sun.java2d.pisces +sun.java2d.windows +sun.java2d.x11 +sun.java2d.xr +sun.jvmstat.monitor +sun.jvmstat.monitor.event +sun.jvmstat.monitor.remote +sun.jvmstat.perfdata.monitor +sun.jvmstat.perfdata.monitor.protocol.file +sun.jvmstat.perfdata.monitor.protocol.local +sun.jvmstat.perfdata.monitor.protocol.rmi +sun.jvmstat.perfdata.monitor.v1_0 +sun.jvmstat.perfdata.monitor.v2_0 +sun.launcher +sun.launcher.resources +sun.lwawt +sun.lwawt.macosx +sun.management +sun.management.counter +sun.management.counter.perf +sun.management.jdp +sun.management.jmxremote +sun.management.resources +sun.management.snmp +sun.management.snmp.jvminstr +sun.management.snmp.jvmmib +sun.management.snmp.util +sun.misc +sun.misc.resources +sun.net +sun.net.dns +sun.net.ftp +sun.net.ftp.impl +sun.net.httpserver +sun.net.idn +sun.net.sdp +sun.net.smtp +sun.net.spi +sun.net.spi.nameservice +sun.net.spi.nameservice.dns +sun.net.util +sun.net.www +sun.net.www.content.audio +sun.net.www.content.image +sun.net.www.content.text +sun.net.www.http +sun.net.www.protocol.file +sun.net.www.protocol.ftp +sun.net.www.protocol.http +sun.net.www.protocol.http.logging +sun.net.www.protocol.http.ntlm +sun.net.www.protocol.http.spnego +sun.net.www.protocol.https +sun.net.www.protocol.jar +sun.net.www.protocol.mailto +sun.net.www.protocol.netdoc +sun.nio +sun.nio.ch +sun.nio.ch.sctp +sun.nio.cs +sun.nio.cs.ext +sun.nio.fs +sun.print +sun.print.resources +sun.reflect +sun.reflect.annotation +sun.reflect.generics.factory +sun.reflect.generics.parser +sun.reflect.generics.reflectiveObjects +sun.reflect.generics.repository +sun.reflect.generics.scope +sun.reflect.generics.tree +sun.reflect.generics.visitor +sun.reflect.misc +sun.rmi.log +sun.rmi.registry +sun.rmi.rmic +sun.rmi.rmic.iiop +sun.rmi.rmic.newrmic +sun.rmi.rmic.newrmic.jrmp +sun.rmi.runtime +sun.rmi.server +sun.rmi.transport +sun.rmi.transport.proxy +sun.rmi.transport.tcp +sun.security.acl +sun.security.action +sun.security.ec +sun.security.internal.interfaces +sun.security.internal.spec +sun.security.jca +sun.security.jgss +sun.security.jgss.krb5 +sun.security.jgss.spi +sun.security.jgss.spnego +sun.security.jgss.wrapper +sun.security.krb5 +sun.security.krb5.internal +sun.security.krb5.internal.ccache +sun.security.krb5.internal.crypto +sun.security.krb5.internal.crypto.dk +sun.security.krb5.internal.ktab +sun.security.krb5.internal.rcache +sun.security.krb5.internal.tools +sun.security.krb5.internal.util +sun.security.mscapi +sun.security.pkcs +sun.security.pkcs10 +sun.security.pkcs11 +sun.security.pkcs11.wrapper +sun.security.pkcs12 +sun.security.provider +sun.security.provider.certpath +sun.security.provider.certpath.ldap +sun.security.provider.certpath.ssl +sun.security.rsa +sun.security.smartcardio +sun.security.ssl +sun.security.ssl.krb5 +sun.security.timestamp +sun.security.tools +sun.security.tools.jarsigner +sun.security.tools.keytool +sun.security.tools.policytool +sun.security.util +sun.security.validator +sun.security.x509 +sun.swing +sun.swing.icon +sun.swing.plaf +sun.swing.plaf.synth +sun.swing.plaf.windows +sun.swing.table +sun.swing.text +sun.swing.text.html +sun.text +sun.text.bidi +sun.text.normalizer +sun.text.resources +sun.text.resources.en +sun.tools.asm +sun.tools.attach +sun.tools.jar +sun.tools.jar.resources +sun.tools.java +sun.tools.javac +sun.tools.jcmd +sun.tools.jconsole +sun.tools.jconsole.inspector +sun.tools.jinfo +sun.tools.jmap +sun.tools.jps +sun.tools.jstack +sun.tools.jstat +sun.tools.jstatd +sun.tools.native2ascii +sun.tools.native2ascii.resources +sun.tools.serialver +sun.tools.tree +sun.tools.util +sun.tracing +sun.tracing.dtrace +sun.usagetracker +sun.util +sun.util.calendar +sun.util.cldr +sun.util.locale +sun.util.locale.provider +sun.util.logging +sun.util.logging.resources +sun.util.resources +sun.util.resources.en +sun.util.spi +sun.util.xml diff --git a/jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java b/jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java index 4d91a001690..a3c58f2990c 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java +++ b/jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java @@ -2508,7 +2508,7 @@ public class ClassReader { } /** - * Reads a CONSTANT_Pakcage_info item in {@code b}. This method is + * Reads a CONSTANT_Package_info item in {@code b}. This method is * intended for {@link Attribute} sub slasses, and is normally not needed * by class generators or adapters. * diff --git a/jdk/src/java.base/share/classes/jdk/internal/reflect/Reflection.java b/jdk/src/java.base/share/classes/jdk/internal/reflect/Reflection.java index 9a410049188..f2670e55200 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/reflect/Reflection.java +++ b/jdk/src/java.base/share/classes/jdk/internal/reflect/Reflection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -31,9 +31,8 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; import jdk.internal.HotSpotIntrinsicCandidate; -import jdk.internal.misc.SharedSecrets; +import jdk.internal.loader.ClassLoaders; import jdk.internal.misc.VM; -import sun.security.action.GetPropertyAction; /** Common utility routines used by both java.lang and java.lang.reflect */ @@ -104,39 +103,40 @@ public class Reflection { int modifiers) throws IllegalAccessException { - if (currentClass == null || memberClass == null) { - throw new InternalError(); - } - if (!verifyMemberAccess(currentClass, memberClass, targetClass, modifiers)) { - throwIllegalAccessException(currentClass, memberClass, targetClass, modifiers); + throw newIllegalAccessException(currentClass, memberClass, targetClass, modifiers); } } /** - * Verify access to a member, returning {@code false} if no access + * Verify access to a member and return {@code true} if it is granted. + * + * @param currentClass the class performing the access + * @param memberClass the declaring class of the member being accessed + * @param targetClass the class of target object if accessing instance + * field or method; + * or the declaring class if accessing constructor; + * or null if accessing static field or method + * @param modifiers the member's access modifiers + * @return {@code true} if access to member is granted */ public static boolean verifyMemberAccess(Class currentClass, Class memberClass, Class targetClass, int modifiers) { - // Verify that currentClass can access a field, method, or - // constructor of memberClass, where that member's access bits are - // "modifiers". - - boolean gotIsSameClassPackage = false; - boolean isSameClassPackage = false; - if (currentClass == memberClass) { // Always succeeds return true; } - if (!verifyModuleAccess(currentClass, memberClass)) { + if (!verifyModuleAccess(currentClass.getModule(), memberClass)) { return false; } + boolean gotIsSameClassPackage = false; + boolean isSameClassPackage = false; + if (!Modifier.isPublic(getClassAccessFlags(memberClass))) { isSameClassPackage = isSameClassPackage(currentClass, memberClass); gotIsSameClassPackage = true; @@ -196,39 +196,20 @@ public class Reflection { } /** - * Returns {@code true} if memberClass's's module exports memberClass's - * package to currentClass's module. + * Returns {@code true} if memberClass's module exports memberClass's + * package to currentModule. */ - public static boolean verifyModuleAccess(Class currentClass, - Class memberClass) { - return verifyModuleAccess(currentClass.getModule(), memberClass); - } - public static boolean verifyModuleAccess(Module currentModule, Class memberClass) { Module memberModule = memberClass.getModule(); - - // module may be null during startup (initLevel 0) - if (currentModule == memberModule) - return true; // same module (named or unnamed) - - // memberClass may be primitive or array class - Class c = memberClass; - while (c.isArray()) { - c = c.getComponentType(); - } - if (c.isPrimitive()) + if (currentModule == memberModule) { + // same module (named or unnamed) or both null if called + // before module system is initialized, which means we are + // dealing with java.base only. return true; - - String pkg = c.getPackageName(); - boolean allowed = memberModule.isExported(pkg, currentModule); - if (allowed && memberModule.isNamed() && printStackTraceWhenAccessSucceeds()) { - if (!SharedSecrets.getJavaLangReflectModuleAccess() - .isStaticallyExported(memberModule, pkg, currentModule)) { - String msg = currentModule + " allowed access to member of " + memberClass; - new Exception(msg).printStackTrace(System.err); - } + } else { + String pkg = memberClass.getPackageName(); + return memberModule.isExported(pkg, currentModule); } - return allowed; } /** @@ -237,10 +218,6 @@ public class Reflection { private static boolean isSameClassPackage(Class c1, Class c2) { if (c1.getClassLoader() != c2.getClassLoader()) return false; - while (c1.isArray()) - c1 = c1.getComponentType(); - while (c2.isArray()) - c2 = c2.getComponentType(); return Objects.equals(c1.getPackageName(), c2.getPackageName()); } @@ -339,69 +316,21 @@ public class Reflection { */ public static boolean isCallerSensitive(Method m) { final ClassLoader loader = m.getDeclaringClass().getClassLoader(); - if (VM.isSystemDomainLoader(loader) || isExtClassLoader(loader)) { + if (VM.isSystemDomainLoader(loader) || + loader == ClassLoaders.platformClassLoader()) { return m.isAnnotationPresent(CallerSensitive.class); } return false; } - private static boolean isExtClassLoader(ClassLoader loader) { - ClassLoader cl = ClassLoader.getSystemClassLoader(); - while (cl != null) { - if (cl.getParent() == null && cl == loader) { - return true; - } - cl = cl.getParent(); - } - return false; - } - - - // true to print a stack trace when access fails - private static volatile boolean printStackWhenAccessFails; - - // true to print a stack trace when access succeeds - private static volatile boolean printStackWhenAccessSucceeds; - - // true if printStack* values are initialized - private static volatile boolean printStackPropertiesSet; - - private static void ensurePrintStackPropertiesSet() { - if (!printStackPropertiesSet && VM.initLevel() >= 1) { - String s = GetPropertyAction.privilegedGetProperty( - "sun.reflect.debugModuleAccessChecks"); - if (s != null) { - printStackWhenAccessFails = !s.equalsIgnoreCase("false"); - printStackWhenAccessSucceeds = s.equalsIgnoreCase("access"); - } - printStackPropertiesSet = true; - } - } - - public static void enableStackTraces() { - printStackWhenAccessFails = true; - printStackWhenAccessSucceeds = true; - printStackPropertiesSet = true; - } - - public static boolean printStackTraceWhenAccessFails() { - ensurePrintStackPropertiesSet(); - return printStackWhenAccessFails; - } - - public static boolean printStackTraceWhenAccessSucceeds() { - ensurePrintStackPropertiesSet(); - return printStackWhenAccessSucceeds; - } - /** - * Throws IllegalAccessException with the an exception message based on + * Returns an IllegalAccessException with an exception message based on * the access that is denied. */ - private static void throwIllegalAccessException(Class currentClass, - Class memberClass, - Object target, - int modifiers) + public static IllegalAccessException newIllegalAccessException(Class currentClass, + Class memberClass, + Class targetClass, + int modifiers) throws IllegalAccessException { String currentSuffix = ""; @@ -413,11 +342,7 @@ public class Reflection { if (m2.isNamed()) memberSuffix = " (in " + m2 + ")"; - Class c = memberClass; - while (c.isArray()) { - c = c.getComponentType(); - } - String memberPackageName = c.getPackageName(); + String memberPackageName = memberClass.getPackageName(); String msg = currentClass + currentSuffix + " cannot access "; if (m2.isExported(memberPackageName, m1)) { @@ -433,20 +358,6 @@ public class Reflection { if (m2.isNamed()) msg += " to " + m1; } - throwIllegalAccessException(msg); - } - - /** - * Throws IllegalAccessException with the given exception message. - */ - public static void throwIllegalAccessException(String msg) - throws IllegalAccessException - { - IllegalAccessException e = new IllegalAccessException(msg); - ensurePrintStackPropertiesSet(); - if (printStackWhenAccessFails) { - e.printStackTrace(System.err); - } - throw e; + return new IllegalAccessException(msg); } } diff --git a/jdk/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java b/jdk/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java index 990de713fc6..f919026b31d 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java +++ b/jdk/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -44,6 +44,7 @@ import java.security.PrivilegedAction; import java.util.Objects; import java.util.Properties; +import jdk.internal.misc.VM; import sun.reflect.misc.ReflectUtil; import sun.security.action.GetPropertyAction; @@ -134,6 +135,24 @@ public class ReflectionFactory { return soleInstance; } + /** + * Returns an alternate reflective Method instance for the given method + * intended for reflection to invoke, if present. + * + * A trusted method can define an alternate implementation for a method `foo` + * by defining a method named "reflected$foo" that will be invoked + * reflectively. + */ + private static Method findMethodForReflection(Method method) { + String altName = "reflected$" + method.getName(); + try { + return method.getDeclaringClass() + .getDeclaredMethod(altName, method.getParameterTypes()); + } catch (NoSuchMethodException ex) { + return null; + } + } + //-------------------------------------------------------------------------- // // Routines used by java.lang.reflect @@ -160,6 +179,13 @@ public class ReflectionFactory { public MethodAccessor newMethodAccessor(Method method) { checkInitted(); + if (Reflection.isCallerSensitive(method)) { + Method altMethod = findMethodForReflection(method); + if (altMethod != null) { + method = altMethod; + } + } + if (noInflation && !ReflectUtil.isVMAnonymousClass(method.getDeclaringClass())) { return new MethodAccessorGenerator(). generateMethod(method.getDeclaringClass(), @@ -585,17 +611,10 @@ public class ReflectionFactory { private static void checkInitted() { if (initted) return; - // Tests to ensure the system properties table is fully - // initialized. This is needed because reflection code is - // called very early in the initialization process (before - // command-line arguments have been parsed and therefore - // these user-settable properties installed.) We assume that - // if System.out is non-null then the System class has been - // fully initialized and that the bulk of the startup code - // has been run. - - if (System.out == null) { - // java.lang.System not yet fully initialized + // Defer initialization until module system is initialized so as + // to avoid inflation and spinning bytecode in unnamed modules + // during early startup. + if (!VM.isModuleSystemInited()) { return; } diff --git a/jdk/src/java.base/share/classes/module-info.java b/jdk/src/java.base/share/classes/module-info.java index 185f8f2a1d1..964f131d2cb 100644 --- a/jdk/src/java.base/share/classes/module-info.java +++ b/jdk/src/java.base/share/classes/module-info.java @@ -25,6 +25,54 @@ /** * Defines the foundational APIs of the Java SE Platform. + * + *
            + *
            Providers:
            + *
            The JDK implementation of this module provides an implementation of + * the {@index jrt jrt} {@linkplain java.nio.file.spi.FileSystemProvider + * file system provider} to enumerate and read the class and resource + * files in a run-time image. + * The jrt file system can be created by calling + * {@link java.nio.file.FileSystems#newFileSystem + * FileSystems.newFileSystem(URI.create("jrt:/"))}. + *

            + *
            Tool Guides:
            + *
            {@extLink java_tool_reference java launcher}, + * {@extLink keytool_tool_reference keytool}
            + *
            + * + * @provides java.nio.file.spi.FileSystemProvider + * + * @uses java.lang.System.LoggerFinder + * @uses java.net.ContentHandlerFactory + * @uses java.net.spi.URLStreamHandlerProvider + * @uses java.nio.channels.spi.AsynchronousChannelProvider + * @uses java.nio.channels.spi.SelectorProvider + * @uses java.nio.charset.spi.CharsetProvider + * @uses java.nio.file.spi.FileSystemProvider + * @uses java.nio.file.spi.FileTypeDetector + * @uses java.security.Provider + * @uses java.text.spi.BreakIteratorProvider + * @uses java.text.spi.CollatorProvider + * @uses java.text.spi.DateFormatProvider + * @uses java.text.spi.DateFormatSymbolsProvider + * @uses java.text.spi.DecimalFormatSymbolsProvider + * @uses java.text.spi.NumberFormatProvider + * @uses java.time.chrono.AbstractChronology + * @uses java.time.chrono.Chronology + * @uses java.time.zone.ZoneRulesProvider + * @uses java.util.spi.CalendarDataProvider + * @uses java.util.spi.CalendarNameProvider + * @uses java.util.spi.CurrencyNameProvider + * @uses java.util.spi.LocaleNameProvider + * @uses java.util.spi.ResourceBundleControlProvider + * @uses java.util.spi.ResourceBundleProvider + * @uses java.util.spi.TimeZoneNameProvider + * @uses java.util.spi.ToolProvider + * @uses javax.security.auth.spi.LoginModule + * + * @moduleGraph + * @since 9 */ module java.base { @@ -81,37 +129,6 @@ module java.base { exports javax.security.cert; - // the service types defined by the APIs in this module - - uses java.lang.System.LoggerFinder; - uses java.net.ContentHandlerFactory; - uses java.net.spi.URLStreamHandlerProvider; - uses java.nio.channels.spi.AsynchronousChannelProvider; - uses java.nio.channels.spi.SelectorProvider; - uses java.nio.charset.spi.CharsetProvider; - uses java.nio.file.spi.FileSystemProvider; - uses java.nio.file.spi.FileTypeDetector; - uses java.security.Provider; - uses java.text.spi.BreakIteratorProvider; - uses java.text.spi.CollatorProvider; - uses java.text.spi.DateFormatProvider; - uses java.text.spi.DateFormatSymbolsProvider; - uses java.text.spi.DecimalFormatSymbolsProvider; - uses java.text.spi.NumberFormatProvider; - uses java.time.chrono.AbstractChronology; - uses java.time.chrono.Chronology; - uses java.time.zone.ZoneRulesProvider; - uses java.util.spi.CalendarDataProvider; - uses java.util.spi.CalendarNameProvider; - uses java.util.spi.CurrencyNameProvider; - uses java.util.spi.LocaleNameProvider; - uses java.util.spi.ResourceBundleControlProvider; - uses java.util.spi.ResourceBundleProvider; - uses java.util.spi.TimeZoneNameProvider; - uses java.util.spi.ToolProvider; - uses javax.security.auth.spi.LoginModule; - - // additional qualified exports may be inserted at build time // see make/gensrc/GenModuleInfo.gmk @@ -123,10 +140,9 @@ module java.base { jdk.jlink; exports jdk.internal.loader to java.instrument, - java.logging, - jdk.jlink; + java.logging; exports jdk.internal.jmod to - jdk.compiler, + jdk.compiler, // reflective dependency jdk.jlink; exports jdk.internal.logger to java.logging; @@ -134,28 +150,19 @@ module java.base { jdk.jartool, jdk.jlink, jdk.scripting.nashorn, - jdk.vm.ci; + jdk.internal.vm.ci; exports jdk.internal.org.objectweb.asm.tree to jdk.jlink; exports jdk.internal.org.objectweb.asm.util to - jdk.jlink, jdk.scripting.nashorn; - exports jdk.internal.org.objectweb.asm.tree.analysis to - jdk.jlink; exports jdk.internal.org.objectweb.asm.commons to jdk.scripting.nashorn; exports jdk.internal.org.objectweb.asm.signature to jdk.scripting.nashorn; exports jdk.internal.math to java.desktop; - exports jdk.internal.module to - java.instrument, - java.management.rmi, - jdk.jartool, - jdk.jlink; exports jdk.internal.misc to java.desktop, - jdk.incubator.httpclient, java.logging, java.management, java.naming, @@ -163,9 +170,10 @@ module java.base { java.security.jgss, java.sql, java.xml, + jdk.attach, jdk.charsets, - jdk.compiler, - jdk.jartool, + jdk.compiler, // reflective dependency + jdk.incubator.httpclient, jdk.jdeps, jdk.jlink, jdk.jshell, @@ -173,7 +181,12 @@ module java.base { jdk.scripting.nashorn, jdk.scripting.nashorn.shell, jdk.unsupported, - jdk.vm.ci; + jdk.internal.vm.ci; + exports jdk.internal.module to + java.instrument, + java.management.rmi, + jdk.jartool, + jdk.jlink; exports jdk.internal.perf to java.desktop, java.management, @@ -189,16 +202,17 @@ module java.base { jdk.dynalink, jdk.scripting.nashorn, jdk.unsupported; + exports jdk.internal.vm to + jdk.management.agent, + jdk.internal.jvmstat; exports jdk.internal.vm.annotation to jdk.unsupported, - jdk.vm.ci; + jdk.internal.vm.ci, + jdk.incubator.httpclient; exports jdk.internal.util.jar to jdk.jartool, jdk.jdeps, jdk.jlink; - exports jdk.internal.vm to - jdk.management.agent, - jdk.internal.jvmstat; exports sun.net to jdk.incubator.httpclient; exports sun.net.ext to @@ -208,11 +222,10 @@ module java.base { jdk.naming.dns; exports sun.net.util to java.desktop, - jdk.jconsole, - jdk.naming.dns; + jdk.jconsole; exports sun.net.www to - jdk.incubator.httpclient, java.desktop, + jdk.incubator.httpclient, jdk.jartool; exports sun.net.www.protocol.http to java.security.jgss; @@ -237,8 +250,7 @@ module java.base { java.management.rmi, java.rmi, java.sql.rowset, - java.xml, - java.xml.ws; + java.xml; exports sun.security.action to java.desktop, java.security.jgss; @@ -306,7 +318,39 @@ module java.base { exports sun.util.resources to jdk.localedata; + + // the service types defined by the APIs in this module + + uses java.lang.System.LoggerFinder; + uses java.net.ContentHandlerFactory; + uses java.net.spi.URLStreamHandlerProvider; + uses java.nio.channels.spi.AsynchronousChannelProvider; + uses java.nio.channels.spi.SelectorProvider; + uses java.nio.charset.spi.CharsetProvider; + uses java.nio.file.spi.FileSystemProvider; + uses java.nio.file.spi.FileTypeDetector; + uses java.security.Provider; + uses java.text.spi.BreakIteratorProvider; + uses java.text.spi.CollatorProvider; + uses java.text.spi.DateFormatProvider; + uses java.text.spi.DateFormatSymbolsProvider; + uses java.text.spi.DecimalFormatSymbolsProvider; + uses java.text.spi.NumberFormatProvider; + uses java.time.chrono.AbstractChronology; + uses java.time.chrono.Chronology; + uses java.time.zone.ZoneRulesProvider; + uses java.util.spi.CalendarDataProvider; + uses java.util.spi.CalendarNameProvider; + uses java.util.spi.CurrencyNameProvider; + uses java.util.spi.LocaleNameProvider; + uses java.util.spi.ResourceBundleControlProvider; + uses java.util.spi.ResourceBundleProvider; + uses java.util.spi.TimeZoneNameProvider; + uses java.util.spi.ToolProvider; + uses javax.security.auth.spi.LoginModule; + // JDK-internal service types + uses jdk.internal.logger.DefaultLoggerFinder; uses sun.security.ssl.ClientKeyExchangeService; uses sun.text.spi.JavaTimeDateTimePatternProvider; @@ -315,7 +359,6 @@ module java.base { uses sun.util.resources.LocaleData.CommonResourceBundleProvider; uses sun.util.resources.LocaleData.SupplementaryResourceBundleProvider; - // Built-in service providers that are located via ServiceLoader provides java.nio.file.spi.FileSystemProvider with diff --git a/jdk/src/java.base/share/classes/overview-core.html b/jdk/src/java.base/share/classes/overview-core.html deleted file mode 100644 index 5c2d54994fb..00000000000 --- a/jdk/src/java.base/share/classes/overview-core.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - -This document is the API specification for the Java™ -Platform, Standard Edition. - - - diff --git a/jdk/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java b/jdk/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java index 9c46aad018f..d0e2a98995a 100644 --- a/jdk/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java +++ b/jdk/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2013, 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 @@ -27,7 +27,6 @@ package sun.invoke.util; import java.lang.reflect.Modifier; import static java.lang.reflect.Modifier.*; -import java.lang.reflect.Module; import java.util.Objects; import jdk.internal.reflect.Reflection; @@ -39,6 +38,7 @@ public class VerifyAccess { private VerifyAccess() { } // cannot instantiate + private static final int UNCONDITIONAL_ALLOWED = java.lang.invoke.MethodHandles.Lookup.UNCONDITIONAL; private static final int MODULE_ALLOWED = java.lang.invoke.MethodHandles.Lookup.MODULE; private static final int PACKAGE_ONLY = 0; private static final int PACKAGE_ALLOWED = java.lang.invoke.MethodHandles.Lookup.PACKAGE; @@ -92,7 +92,7 @@ public class VerifyAccess { int allowedModes) { if (allowedModes == 0) return false; assert((allowedModes & PUBLIC) != 0 && - (allowedModes & ~(ALL_ACCESS_MODES|PACKAGE_ALLOWED|MODULE_ALLOWED)) == 0); + (allowedModes & ~(ALL_ACCESS_MODES|PACKAGE_ALLOWED|MODULE_ALLOWED|UNCONDITIONAL_ALLOWED)) == 0); // The symbolic reference class (refc) must always be fully verified. if (!isClassAccessible(refc, lookupClass, allowedModes)) { return false; @@ -173,7 +173,7 @@ public class VerifyAccess { int allowedModes) { if (allowedModes == 0) return false; assert((allowedModes & PUBLIC) != 0 && - (allowedModes & ~(ALL_ACCESS_MODES|PACKAGE_ALLOWED|MODULE_ALLOWED)) == 0); + (allowedModes & ~(ALL_ACCESS_MODES|PACKAGE_ALLOWED|MODULE_ALLOWED|UNCONDITIONAL_ALLOWED)) == 0); int mods = getClassModifiers(refc); if (isPublic(mods)) { @@ -191,22 +191,17 @@ public class VerifyAccess { (lookupModule == refModule)) return true; - // check readability - if (lookupModule.canRead(refModule)) { + // check readability when UNCONDITIONAL not allowed + if (((allowedModes & UNCONDITIONAL_ALLOWED) != 0) + || lookupModule.canRead(refModule)) { // check that refc is in an exported package - Class c = refc; - while (c.isArray()) { - c = c.getComponentType(); - } - if (c.isPrimitive()) - return true; if ((allowedModes & MODULE_ALLOWED) != 0) { - if (refModule.isExported(c.getPackageName(), lookupModule)) + if (refModule.isExported(refc.getPackageName(), lookupModule)) return true; } else { // exported unconditionally - if (refModule.isExported(c.getPackageName())) + if (refModule.isExported(refc.getPackageName())) return true; } diff --git a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java index ee8f311d2e4..ad9925a1a21 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java +++ b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java @@ -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 @@ -43,31 +43,35 @@ import java.io.File; import java.io.IOException; import java.io.PrintStream; import java.io.UnsupportedEncodingException; -import java.lang.module.ModuleFinder; -import java.lang.module.ModuleReference; +import java.lang.module.Configuration; +import java.lang.module.FindException; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleDescriptor.Requires; import java.lang.module.ModuleDescriptor.Exports; import java.lang.module.ModuleDescriptor.Opens; import java.lang.module.ModuleDescriptor.Provides; -import java.lang.reflect.Layer; +import java.lang.module.ModuleFinder; +import java.lang.module.ModuleReference; +import java.lang.module.ResolvedModule; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.math.BigDecimal; import java.math.RoundingMode; import java.net.URI; import java.nio.charset.Charset; import java.nio.file.DirectoryStream; import java.nio.file.Files; +import java.nio.file.NoSuchFileException; import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.BasicFileAttributes; import java.text.Normalizer; import java.text.MessageFormat; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.Comparator; -import java.util.HashSet; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; @@ -85,9 +89,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import jdk.internal.misc.VM; +import jdk.internal.module.ModuleBootstrap; import jdk.internal.module.Modules; - public final class LauncherHelper { // No instantiation @@ -100,6 +104,7 @@ public final class LauncherHelper { "javafx.application.Application"; private static final String JAVAFX_FXHELPER_CLASS_NAME_SUFFIX = "sun.launcher.LauncherHelper$FXHelper"; + private static final String LAUNCHER_AGENT_CLASS = "Launcher-Agent-Class"; private static final String MAIN_CLASS = "Main-Class"; private static final String ADD_EXPORTS = "Add-Exports"; private static final String ADD_OPENS = "Add-Opens"; @@ -410,8 +415,12 @@ public final class LauncherHelper { ostream = (printToStderr) ? System.err : System.out; } + static void initOutput(PrintStream ps) { + ostream = ps; + } + static String getMainClassFromJar(String jarname) { - String mainValue = null; + String mainValue; try (JarFile jarFile = new JarFile(jarname)) { Manifest manifest = jarFile.getManifest(); if (manifest == null) { @@ -428,7 +437,23 @@ public final class LauncherHelper { abort(null, "java.launcher.jar.error3", jarname); } - // Add-Exports and Add-Opens to break encapsulation + // Launcher-Agent-Class (only check for this when Main-Class present) + String agentClass = mainAttrs.getValue(LAUNCHER_AGENT_CLASS); + if (agentClass != null) { + ModuleLayer.boot().findModule("java.instrument").ifPresent(m -> { + try { + String cn = "sun.instrument.InstrumentationImpl"; + Class clazz = Class.forName(cn, false, null); + Method loadAgent = clazz.getMethod("loadAgent", String.class); + loadAgent.invoke(null, jarname); + } catch (Throwable e) { + if (e instanceof InvocationTargetException) e = e.getCause(); + abort(e, "java.launcher.jar.error4", jarname); + } + }); + } + + // Add-Exports and Add-Opens String exports = mainAttrs.getValue(ADD_EXPORTS); if (exports != null) { addExportsOrOpens(exports, false); @@ -466,15 +491,16 @@ public final class LauncherHelper { if (s.length == 2) { String mn = s[0]; String pn = s[1]; - Layer.boot().findModule(mn).ifPresent(m -> { - if (m.getDescriptor().packages().contains(pn)) { + ModuleLayer.boot() + .findModule(mn) + .filter(m -> m.getDescriptor().packages().contains(pn)) + .ifPresent(m -> { if (open) { Modules.addOpensToAllUnnamed(m, pn); } else { Modules.addExportsToAllUnnamed(m, pn); } - } - }); + }); } } } @@ -541,7 +567,6 @@ public final class LauncherHelper { } validateMainClass(mainClass); - return mainClass; } @@ -563,7 +588,7 @@ public final class LauncherHelper { } // main module is in the boot layer - Layer layer = Layer.boot(); + ModuleLayer layer = ModuleLayer.boot(); Optional om = layer.findModule(mainModule); if (!om.isPresent()) { // should not happen @@ -591,8 +616,8 @@ public final class LauncherHelper { c = Class.forName(m, cn); } } catch (LinkageError le) { - abort(null, "java.launcher.module.error3", - mainClass, m.getName(), le.getLocalizedMessage()); + abort(null, "java.launcher.module.error3", mainClass, m.getName(), + le.getClass().getName() + ": " + le.getLocalizedMessage()); } if (c == null) { abort(null, "java.launcher.module.error2", mainClass, mainModule); @@ -638,14 +663,17 @@ public final class LauncherHelper { String ncn = Normalizer.normalize(cn, Normalizer.Form.NFC); mainClass = Class.forName(ncn, false, scl); } catch (NoClassDefFoundError | ClassNotFoundException cnfe1) { - abort(cnfe1, "java.launcher.cls.error1", cn); + abort(cnfe1, "java.launcher.cls.error1", cn, + cnfe1.getClass().getCanonicalName(), cnfe1.getMessage()); } } else { - abort(cnfe, "java.launcher.cls.error1", cn); + abort(cnfe, "java.launcher.cls.error1", cn, + cnfe.getClass().getCanonicalName(), cnfe.getMessage()); } } } catch (LinkageError le) { - abort(le, "java.launcher.cls.error6", cn, le.getLocalizedMessage()); + abort(le, "java.launcher.cls.error6", cn, + le.getClass().getName() + ": " + le.getLocalizedMessage()); } return mainClass; } @@ -677,14 +705,22 @@ public final class LauncherHelper { // Check the existence and signature of main and abort if incorrect static void validateMainClass(Class mainClass) { - Method mainMethod; + Method mainMethod = null; try { mainMethod = mainClass.getMethod("main", String[].class); } catch (NoSuchMethodException nsme) { // invalid main or not FX application, abort with an error abort(null, "java.launcher.cls.error4", mainClass.getName(), JAVAFX_APPLICATION_CLASS_NAME); - return; // Avoid compiler issues + } catch (Throwable e) { + if (mainClass.getModule().isNamed()) { + abort(e, "java.launcher.module.error5", + mainClass.getName(), mainClass.getModule(), + e.getClass().getName(), e.getLocalizedMessage()); + } else { + abort(e, "java.launcher.cls.error7", mainClass.getName(), + e.getClass().getName(), e.getLocalizedMessage()); + } } /* @@ -850,7 +886,7 @@ public final class LauncherHelper { private static void setFXLaunchParameters(String what, int mode) { // find the module with the FX launcher - Optional om = Layer.boot().findModule(JAVAFX_GRAPHICS_MODULE_NAME); + Optional om = ModuleLayer.boot().findModule(JAVAFX_GRAPHICS_MODULE_NAME); if (!om.isPresent()) { abort(null, "java.launcher.cls.error5"); } @@ -911,130 +947,350 @@ public final class LauncherHelper { } } - private static void formatCommaList(PrintStream out, - String prefix, - Collection list) - { - if (list.isEmpty()) - return; - out.format("%s", prefix); - boolean first = true; - for (Object ob : list) { - if (first) { - out.format(" %s", ob); - first = false; - } else { - out.format(", %s", ob); - } - } - out.format("%n"); + /** + * Called by the launcher to list the observable modules. + */ + static void listModules() { + initOutput(System.out); + + ModuleBootstrap.limitedFinder().findAll().stream() + .sorted(new JrtFirstComparator()) + .forEach(LauncherHelper::showModule); } /** - * Called by the launcher to list the observable modules. - * If called without any sub-options then the output is a simple list of - * the modules. If called with sub-options then the sub-options are the - * names of the modules to list (-listmods:java.base,java.desktop for - * example). + * Called by the launcher to show the resolved modules */ - static void listModules(boolean printToStderr, String optionFlag) - throws IOException, ClassNotFoundException - { - initOutput(printToStderr); + static void showResolvedModules() { + initOutput(System.out); - ModuleFinder finder = jdk.internal.module.ModuleBootstrap.finder(); + ModuleLayer bootLayer = ModuleLayer.boot(); + Configuration cf = bootLayer.configuration(); - int colon = optionFlag.indexOf('='); - if (colon == -1) { - finder.findAll().stream() - .sorted(Comparator.comparing(ModuleReference::descriptor)) - .forEach(md -> { - ostream.println(midAndLocation(md.descriptor(), - md.location())); - }); - } else { - String[] names = optionFlag.substring(colon+1).split(","); - for (String name: names) { - ModuleReference mref = finder.find(name).orElse(null); - if (mref == null) { - System.err.format("%s not observable!%n", name); - continue; - } + cf.modules().stream() + .map(ResolvedModule::reference) + .sorted(new JrtFirstComparator()) + .forEach(LauncherHelper::showModule); + } - ModuleDescriptor md = mref.descriptor(); - if (md.isOpen()) - ostream.print("open "); - if (md.isAutomatic()) - ostream.print("automatic "); - ostream.println("module " + midAndLocation(md, mref.location())); + /** + * Called by the launcher to describe a module + */ + static void describeModule(String moduleName) { + initOutput(System.out); - // unqualified exports (sorted by package) - Set exports = new TreeSet<>(Comparator.comparing(Exports::source)); - md.exports().stream().filter(e -> !e.isQualified()).forEach(exports::add); - for (Exports e : exports) { - String modsAndSource = Stream.concat(toStringStream(e.modifiers()), - Stream.of(e.source())) - .collect(Collectors.joining(" ")); - ostream.format(" exports %s%n", modsAndSource); - } + ModuleFinder finder = ModuleBootstrap.limitedFinder(); + ModuleReference mref = finder.find(moduleName).orElse(null); + if (mref == null) { + abort(null, "java.launcher.module.error4", moduleName); + } + ModuleDescriptor md = mref.descriptor(); - for (Requires d : md.requires()) { - ostream.format(" requires %s%n", d); - } - for (String s : md.uses()) { - ostream.format(" uses %s%n", s); - } + // one-line summary + showModule(mref); - for (Provides ps : md.provides()) { - ostream.format(" provides %s with %s%n", ps.service(), - ps.providers().stream().collect(Collectors.joining(", "))); - } + // unqualified exports (sorted by package) + md.exports().stream() + .filter(e -> !e.isQualified()) + .sorted(Comparator.comparing(Exports::source)) + .map(e -> Stream.concat(Stream.of(e.source()), + toStringStream(e.modifiers())) + .collect(Collectors.joining(" "))) + .forEach(sourceAndMods -> ostream.format("exports %s%n", sourceAndMods)); - // qualified exports - for (Exports e : md.exports()) { - if (e.isQualified()) { - String modsAndSource = Stream.concat(toStringStream(e.modifiers()), - Stream.of(e.source())) - .collect(Collectors.joining(" ")); - ostream.format(" exports %s", modsAndSource); - formatCommaList(ostream, " to", e.targets()); - } - } + // dependences + for (Requires r : md.requires()) { + String nameAndMods = Stream.concat(Stream.of(r.name()), + toStringStream(r.modifiers())) + .collect(Collectors.joining(" ")); + ostream.format("requires %s", nameAndMods); + finder.find(r.name()) + .map(ModuleReference::descriptor) + .filter(ModuleDescriptor::isAutomatic) + .ifPresent(any -> ostream.print(" automatic")); + ostream.println(); + } - // open packages - for (Opens obj: md.opens()) { - String modsAndSource = Stream.concat(toStringStream(obj.modifiers()), - Stream.of(obj.source())) - .collect(Collectors.joining(" ")); - ostream.format(" opens %s", modsAndSource); - if (obj.isQualified()) - formatCommaList(ostream, " to", obj.targets()); - else - ostream.println(); - } + // service use and provides + for (String s : md.uses()) { + ostream.format("uses %s%n", s); + } + for (Provides ps : md.provides()) { + String names = ps.providers().stream().collect(Collectors.joining(" ")); + ostream.format("provides %s with %s%n", ps.service(), names); - // non-exported/non-open packages - Set concealed = new TreeSet<>(md.packages()); - md.exports().stream().map(Exports::source).forEach(concealed::remove); - md.opens().stream().map(Opens::source).forEach(concealed::remove); - concealed.forEach(p -> ostream.format(" contains %s%n", p)); + } + + // qualified exports + for (Exports e : md.exports()) { + if (e.isQualified()) { + String who = e.targets().stream().collect(Collectors.joining(" ")); + ostream.format("qualified exports %s to %s%n", e.source(), who); + } + } + + // open packages + for (Opens opens: md.opens()) { + if (opens.isQualified()) + ostream.print("qualified "); + String sourceAndMods = Stream.concat(Stream.of(opens.source()), + toStringStream(opens.modifiers())) + .collect(Collectors.joining(" ")); + ostream.format("opens %s", sourceAndMods); + if (opens.isQualified()) { + String who = opens.targets().stream().collect(Collectors.joining(" ")); + ostream.format(" to %s", who); + } + ostream.println(); + } + + // non-exported/non-open packages + Set concealed = new TreeSet<>(md.packages()); + md.exports().stream().map(Exports::source).forEach(concealed::remove); + md.opens().stream().map(Opens::source).forEach(concealed::remove); + concealed.forEach(p -> ostream.format("contains %s%n", p)); + } + + /** + * Prints a single line with the module name, version and modifiers + */ + private static void showModule(ModuleReference mref) { + ModuleDescriptor md = mref.descriptor(); + ostream.print(md.toNameAndVersion()); + mref.location() + .filter(uri -> !isJrt(uri)) + .ifPresent(uri -> ostream.format(" %s", uri)); + if (md.isOpen()) + ostream.print(" open"); + if (md.isAutomatic()) + ostream.print(" automatic"); + ostream.println(); + } + + /** + * A ModuleReference comparator that considers modules in the run-time + * image to be less than modules than not in the run-time image. + */ + private static class JrtFirstComparator implements Comparator { + private final Comparator real; + + JrtFirstComparator() { + this.real = Comparator.comparing(ModuleReference::descriptor); + } + + @Override + public int compare(ModuleReference a, ModuleReference b) { + if (isJrt(a)) { + return isJrt(b) ? real.compare(a, b) : -1; + } else { + return isJrt(b) ? 1 : real.compare(a, b); } } } - static String toString(Set s) { - return toStringStream(s).collect(Collectors.joining(" ")); - } - - static Stream toStringStream(Set s) { + private static Stream toStringStream(Set s) { return s.stream().map(e -> e.toString().toLowerCase()); } - static String midAndLocation(ModuleDescriptor md, Optional location ) { - URI loc = location.orElse(null); - if (loc == null || loc.getScheme().equalsIgnoreCase("jrt")) - return md.toNameAndVersion(); - else - return md.toNameAndVersion() + " (" + loc + ")"; + private static boolean isJrt(ModuleReference mref) { + return isJrt(mref.location().orElse(null)); + } + + private static boolean isJrt(URI uri) { + return (uri != null && uri.getScheme().equalsIgnoreCase("jrt")); + } + + /** + * Called by the launcher to validate the modules on the upgrade and + * application module paths. + * + * @return {@code true} if no errors are found + */ + private static boolean validateModules() { + initOutput(System.out); + + ModuleValidator validator = new ModuleValidator(); + + // upgrade module path + String value = System.getProperty("jdk.module.upgrade.path"); + if (value != null) { + Stream.of(value.split(File.pathSeparator)) + .map(Paths::get) + .forEach(validator::scan); + } + + // system modules + ModuleFinder.ofSystem().findAll().stream() + .sorted(Comparator.comparing(ModuleReference::descriptor)) + .forEach(validator::process); + + // application module path + value = System.getProperty("jdk.module.path"); + if (value != null) { + Stream.of(value.split(File.pathSeparator)) + .map(Paths::get) + .forEach(validator::scan); + } + + return !validator.foundErrors(); + } + + /** + * A simple validator to check for errors and conflicts between modules. + */ + static class ModuleValidator { + private static final String MODULE_INFO = "module-info.class"; + + private Map nameToModule = new HashMap<>(); + private Map packageToModule = new HashMap<>(); + private boolean errorFound; + + /** + * Returns true if at least one error was found + */ + boolean foundErrors() { + return errorFound; + } + + /** + * Prints the module location and name. + */ + private void printModule(ModuleReference mref) { + mref.location() + .filter(uri -> !isJrt(uri)) + .ifPresent(uri -> ostream.print(uri + " ")); + ModuleDescriptor descriptor = mref.descriptor(); + ostream.print(descriptor.name()); + if (descriptor.isAutomatic()) + ostream.print(" automatic"); + ostream.println(); + } + + /** + * Prints the module location and name, checks if the module is + * shadowed by a previously seen module, and finally checks for + * package conflicts with previously seen modules. + */ + void process(ModuleReference mref) { + printModule(mref); + + String name = mref.descriptor().name(); + ModuleReference previous = nameToModule.putIfAbsent(name, mref); + if (previous != null) { + ostream.print(INDENT + "shadowed by "); + printModule(previous); + } else { + // check for package conflicts when not shadowed + for (String pkg : mref.descriptor().packages()) { + previous = packageToModule.putIfAbsent(pkg, mref); + if (previous != null) { + String mn = previous.descriptor().name(); + ostream.println(INDENT + "contains " + pkg + + " conflicts with module " + mn); + errorFound = true; + } + } + } + } + + /** + * Scan an element on a module path. The element is a directory + * of modules, an exploded module, or a JAR file. + */ + void scan(Path entry) { + BasicFileAttributes attrs; + try { + attrs = Files.readAttributes(entry, BasicFileAttributes.class); + } catch (NoSuchFileException ignore) { + return; + } catch (IOException ioe) { + ostream.println(entry + " " + ioe); + errorFound = true; + return; + } + + String fn = entry.getFileName().toString(); + if (attrs.isRegularFile() && fn.endsWith(".jar")) { + // JAR file, explicit or automatic module + scanModule(entry).ifPresent(this::process); + } else if (attrs.isDirectory()) { + Path mi = entry.resolve(MODULE_INFO); + if (Files.exists(mi)) { + // exploded module + scanModule(entry).ifPresent(this::process); + } else { + // directory of modules + scanDirectory(entry); + } + } + } + + /** + * Scan the JAR files and exploded modules in a directory. + */ + private void scanDirectory(Path dir) { + try (DirectoryStream stream = Files.newDirectoryStream(dir)) { + Map moduleToEntry = new HashMap<>(); + + for (Path entry : stream) { + BasicFileAttributes attrs; + try { + attrs = Files.readAttributes(entry, BasicFileAttributes.class); + } catch (IOException ioe) { + ostream.println(entry + " " + ioe); + errorFound = true; + continue; + } + + ModuleReference mref = null; + + String fn = entry.getFileName().toString(); + if (attrs.isRegularFile() && fn.endsWith(".jar")) { + mref = scanModule(entry).orElse(null); + } else if (attrs.isDirectory()) { + Path mi = entry.resolve(MODULE_INFO); + if (Files.exists(mi)) { + mref = scanModule(entry).orElse(null); + } + } + + if (mref != null) { + String name = mref.descriptor().name(); + Path previous = moduleToEntry.putIfAbsent(name, entry); + if (previous != null) { + // same name as other module in the directory + printModule(mref); + ostream.println(INDENT + "contains same module as " + + previous.getFileName()); + errorFound = true; + } else { + process(mref); + } + } + } + } catch (IOException ioe) { + ostream.println(dir + " " + ioe); + errorFound = true; + } + } + + /** + * Scan a JAR file or exploded module. + */ + private Optional scanModule(Path entry) { + ModuleFinder finder = ModuleFinder.of(entry); + try { + return finder.findAll().stream().findFirst(); + } catch (FindException e) { + ostream.println(entry); + ostream.println(INDENT + e.getMessage()); + Throwable cause = e.getCause(); + if (cause != null) { + ostream.println(INDENT + cause); + } + errorFound = true; + return Optional.empty(); + } + } } } diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties index 23439deb377..922f4d95a31 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties @@ -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 @@ -24,19 +24,23 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Usage: {0} [options] class [args...]\n\ -\ (to execute a class)\n or {0} [options] -jar jarfile [args...]\n\ +java.launcher.opt.header = Usage: {0} [options] [args...]\n\ +\ (to execute a class)\n or {0} [options] -jar [args...]\n\ \ (to execute a jar file)\n\ -\ or {0} [options] -p -m [/] [args...]\n\ +\ or {0} [options] -m [/] [args...]\n\ +\ {0} [options] --module [/] [args...]\n\ \ (to execute the main class in a module)\n\n\ -where options include:\n\n +\ Arguments following the main class, -jar , -m or --module\n\ +\ / are passed as the arguments to main class.\n\n\ +\ where options include:\n\n java.launcher.opt.datamodel =\ -d{0}\t Deprecated, will be removed in a future release\n java.launcher.opt.vmselect =\ {0}\t to select the "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t is a synonym for the "{1}" VM [deprecated]\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n\ +java.launcher.opt.footer = \ +\ -cp \n\ \ -classpath \n\ \ --class-path \n\ \ A {0} separated list of directories, JAR archives,\n\ @@ -49,30 +53,33 @@ java.launcher.opt.footer =\ -cp [/]\n\ -\ --module [/]\n\ -\ the initial module to resolve, and the name of the main class\n\ -\ to execute if not specified by the module\n\ -\ --add-modules [,...]\n\ +\ --add-modules [,...]\n\ \ root modules to resolve in addition to the initial module.\n\ -\ can also be ALL-DEFAULT, ALL-SYSTEM,\n\ +\ can also be ALL-DEFAULT, ALL-SYSTEM,\n\ \ ALL-MODULE-PATH.\n\ -\ --limit-modules [,...]\n\ -\ limit the universe of observable modules\n\ -\ --list-modules [[,...]]\n\ -\ list the observable modules and exit\n\ -\ --dry-run create VM but do not execute main method.\n\ -\ This --dry-run option may be useful for validating the\n\ +\ --list-modules\n\ +\ list observable modules and exit\n\ +\ -d \n\ +\ --describe-module \n\ +\ describe a module and exit\n\ +\ --dry-run create VM and load main class but do not execute main method.\n\ +\ The --dry-run option may be useful for validating the\n\ \ command-line options such as the module system configuration.\n\ +\ --validate-modules\n\ +\ validate all modules and exit\n\ +\ The --validate-modules option may be useful for finding\n\ +\ conflicts and other errors with modules on the module path.\n\ \ -D=\n\ \ set a system property\n\ -\ -verbose:[class|gc|jni]\n\ +\ -verbose:[class|module|gc|jni]\n\ \ enable verbose output\n\ \ -version print product version to the error stream and exit\n\ \ --version print product version to the output stream and exit\n\ \ -showversion print product version to the error stream and continue\n\ \ --show-version\n\ \ print product version to the output stream and continue\n\ +\ --show-module-resolution\n\ +\ show module resolution output during startup\n\ \ -? -h -help\n\ \ print this help message to the error stream\n\ \ --help print this help message to the output stream\n\ @@ -102,8 +109,11 @@ java.launcher.opt.footer =\ -cp read options from the specified file\n\n\ +\ See the SplashScreen API documentation for more information\n\ +\ @argument files\n\ +\ one or more argument files containing options\n\ +\ -disable-@files\n\ +\ prevent further argument file expansion\n\ \To specify an argument for a long option, you can use --= or\n\ \-- .\n @@ -116,7 +126,6 @@ java.launcher.X.usage=\n\ \ -Xcomp forces compilation of methods on first invocation\n\ \ -Xdebug provided for backward compatibility\n\ \ -Xdiag show additional diagnostic messages\n\ -\ -Xdiag:resolver show resolver diagnostic messages\n\ \ -Xfuture enable strictest checks, anticipating future default\n\ \ -Xint interpreted mode execution only\n\ \ -Xinternalversion\n\ @@ -129,7 +138,7 @@ java.launcher.X.usage=\n\ \ -Xms set initial Java heap size\n\ \ -Xmx set maximum Java heap size\n\ \ -Xnoclassgc disable class garbage collection\n\ -\ -Xprof output cpu profiling data\n\ +\ -Xprof output cpu profiling data (deprecated)\n\ \ -Xrs reduce use of OS signals by Java/VM (see documentation)\n\ \ -Xshare:auto use shared class data if possible (default)\n\ \ -Xshare:off do not attempt to use shared class data\n\ @@ -157,10 +166,17 @@ java.launcher.X.usage=\n\ \ --add-opens /=(,)*\n\ \ updates to open to\n\ \ , regardless of module declaration.\n\ -\ --disable-@files disable further argument file expansion\n\ +\ --illegal-access=\n\ +\ permit or deny access to members of types in named modules\n\ +\ by code in unnamed modules.\n\ +\ is one of "deny", "permit", "warn", or "debug"\n\ +\ This option will be removed in a future release.\n\ +\ --limit-modules [,...]\n\ +\ limit the universe of observable modules\n\ \ --patch-module =({0})*\n\ -\ Override or augment a module with classes and resources\n\ -\ in JAR files or directories.\n\n\ +\ override or augment a module with classes and resources\n\ +\ in JAR files or directories.\n\ +\ --disable-@files disable further argument file expansion\n\n\ These extra options are subject to change without notice.\n # Translators please note do not translate the options themselves @@ -175,7 +191,8 @@ The following options are Mac OS X specific:\n\ \ override default icon displayed in dock\n\n java.launcher.cls.error1=\ - Error: Could not find or load main class {0} + Error: Could not find or load main class {0}\n\ + Caused by: {1}: {2} java.launcher.cls.error2=\ Error: Main method is not {0} in class {1}, please define the main method as:\n\ \ public static void main(String[] args) @@ -192,10 +209,14 @@ java.launcher.cls.error5=\ java.launcher.cls.error6=\ Error: LinkageError occurred while loading main class {0}\n\ \t{1} +java.launcher.cls.error7=\ + Error: Unable to initialize main class {0}\n\ + Caused by: {1}: {2} java.launcher.jar.error1=\ Error: An unexpected error occurred while trying to open file {0} java.launcher.jar.error2=manifest not found in {0} java.launcher.jar.error3=no main manifest attribute, in {0} +java.launcher.jar.error4=error loading java agent in {0} java.launcher.init.error=initialization error java.launcher.javafx.error1=\ Error: The JavaFX launchApplication method has the wrong signature, it\n\ @@ -205,6 +226,10 @@ java.launcher.module.error1=\ java.launcher.module.error2=\ Error: Could not find or load main class {0} in module {1} java.launcher.module.error3=\ - Error: Unable to load main class {0} from module {1}\n\ + Error: Unable to load main class {0} in module {1}\n\ \t{2} - +java.launcher.module.error4=\ + {0} not found +java.launcher.module.error5=\ + Error: Unable to initialize main class {0} in module {1}\n\ + Caused by: {1}: {2} diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties index 2272ae9fa24..c311de2bcf1 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties @@ -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 @@ -24,34 +24,36 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Verwendung: {0} [Optionen] Klasse [Argumente...]\n (zur Ausf\u00FChrung einer Klasse)\n oder {0} [Optionen] -jar JAR-Datei [Argumente...]\n (zur Ausf\u00FChrung einer JAR-Datei)\n oder {0} [Optionen] -p -m [/] [Argumente...]\n (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\nwobei "Optionen" Folgendes umfasst:\n +java.launcher.opt.header = Verwendung: {0} [Optionen] [args...]\n (zur Ausf\u00FChrung einer Klasse)\n oder {0} [Optionen] -jar [args...]\n (zur Ausf\u00FChrung einer JAR-Datei)\n oder {0} [Optionen] -m [/] [args...]\n {0} [Optionen] --module [/] [args...]\n (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\n\n Argumente, die auf die Hauptklasse folgen, -jar , -m oder --module\n / werden als Argumente f\u00FCr die Hauptklasse \u00FCbergeben.\n\n wobei "Optionen" Folgendes umfasst:\n\n java.launcher.opt.datamodel =\ -d{0}\t Veraltet, wird in einem zuk\u00FCnftigen Release entfernt\n java.launcher.opt.vmselect =\ {0}\t zur Auswahl der "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t ist ein Synonym f\u00FCr die "{1}" VM [verworfen]\n -java.launcher.ergo.message1 =\ Die Standard-VM ist {0} -java.launcher.ergo.message2 =\ weil die Ausf\u00FChrung auf einem Server-Class-Rechner erfolgt.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n -p \n --module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n ein Verzeichnis mit Modulen ist.\n --upgrade-module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n Module im Laufzeitimage ersetzen\n --add-modules [,...]\n Root-Module, die zus\u00E4tzlich zum anf\u00E4nglichen Modul aufgel\u00F6st werden sollen.\n kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n Listet beobachtbare Module auf und beendet den Vorgang\n --d \n --describe-module \n Beschreibt ein Modul und beendet den Vorgang\n --dry-run Erstellt eine VM und l\u00E4dt die Hauptklasse, f\u00FChrt aber nicht die Hauptmethode aus.\n Die Option "--dry-run" kann n\u00FCtzlich sein, um die\n Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n --validate-modules\n Validiert alle Module und beendet den Vorgang\n Die Option "--validate-modules" kann n\u00FCtzlich sein, um\n Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n -D=\n Legt eine Systemeigenschaft fest\n -verbose:[class|module|gc|jni]\n Ausgabe im Verbose-Modus aktivieren\n -version Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n --version Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n -showversion Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n --show-version\n Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n --show-module-resolution\n Zeigt die Modulaufl\u00F6sungsausgabe beim Start an\n -? -h -help\n Gibt diese Hilfemeldung an den Fehlerstream aus\n --help Gibt diese Hilfemeldung an den Outputstream aus\n -X Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Fehlerstream aus\n --help-extra Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Outputstream aus\n -ea[:...|:]\n -enableassertions[:...|:]\n Aktiviert Assertions mit angegebener Granularit\u00E4t\n -da[:...|:]\n -disableassertions[:...|:]\n Deaktiviert Assertions mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:[=]\n L\u00E4dt die native Agent Library . Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:[=]\n L\u00E4dt die native Agent Library mit dem vollst\u00E4ndigen Pfadnamen\n -javaagent:[=]\n L\u00E4dt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:\n Zeigt den Startbildschirm mit einem angegebenen Bild an\n Skalierte HiDPI-Bilder werden automatisch \ +unterst\u00FCtzt und verwendet,\n falls verf\u00FCgbar. Der nicht skalierte Bilddateiname (Beispiel: image.ext)\n muss immer als Argument an die Option "-splash" \u00FCbergeben werden.\n Das am besten geeignete angegebene skalierte Bild wird\n automatisch ausgew\u00E4hlt.\n Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API\n @argument files\n Eine oder mehrere Argumentdateien mit Optionen\n -disable-@files\n Verhindert die weitere Erweiterung von Argumentdateien\nUm ein Argument f\u00FCr eine lange Option anzugeben, k\u00F6nnen Sie --= oder\n-- verwenden.\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven zur Suche nach Klassendateien.\n -p \n --module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, wobei jedes Verzeichnis\n ein Modulverzeichnis ist.\n --upgrade-module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, wobei jedes Verzeichnis\n ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n Module im Laufzeitimage ersetzen\n -m [/]\n --module [/]\n Das anf\u00E4ngliche aufzul\u00F6sende Modul und der Name der auszuf\u00FChrenden\n Hauptklasse, wenn nicht durch das Modul angegeben\n --add-modules [,...]\n Zus\u00E4tzlich zu dem anf\u00E4nglichen Modul aufzul\u00F6sende Root-Module.\n kann auch ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH sein.\n --limit-modules [,...]\n Begrenzt die gesamten beobachtbaren Module\n --list-modules [[,...]]\n F\u00FChrt die beobachtbaren Module auf und beendet den Vorgang\n --dry-run Erstellt VM, f\u00FChrt jedoch die Hauptmethode nicht aus.\n Diese --dry-run-Option kann zur Validierung der Befehlszeilenoptionen\n n\u00FCtzlich sein, wie der Modulsystemkonfiguration.\n -D=\n Setzt eine Systemeigenschaft\n -verbose:[class|gc|jni]\n Aktiviert Verbose-Ausgabe\n -version Druckt Produktversion und beendet den Vorgang\n -showversion Druckt Produktversion und f\u00E4hrt fort\n -? -help --help\n Gibt diese Hilfemeldung aus\n -X Gibt Hilfe zu Nicht-Standardoptionen aus\n -ea[:...|:]\n -enableassertions[:...|:]\n Aktiviert Assertions mit angegebener Granularit\u00E4t\n -da[:...|:]\n -disableassertions[:...|:]\n Deaktiviert Assertions mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:[=]\n L\u00E4dt native Agent Library , Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:[=]\n L\u00E4dt native Agent Library nach vollst\u00E4ndigem Pfadnamen\n -javaagent:[=]\n L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:\n Zeigt Begr\u00FC\u00DFungsbildschirm mit angegebenem Bild an\n HiDPI-skalierte Bilder werden automatisch unterst\u00FCtzt und verwendet,\n sofern verf\u00FCgbar. Der nicht skalierte Bilddateiname, z.B. image.ext,\n muss immer als Argument an die Option -splash \u00FCbergeben werden.\n Das geeignetste skalierte Bild wird automatisch\n ausgew\u00E4hlt.\n Weitere Informationen finden Sie in der Dokumentation zu SplashScreen-API.\n @ Liest Optionen aus der angegebenen Datei\nZur Angabe eines Arguments f\u00FCr eine lange Option k\u00F6nnen Sie --= oder\n-- verwenden.\n -See Weitere Einzelheiten finden Sie unter http://www.oracle.com/technetwork/java/javase/documentation/index.html. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch Deaktiviert Hintergrundkompilierung\n -Xbootclasspath/a:\n an Ende von Bootstrap-Klassenpfad anh\u00E4ngen\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n -Xcomp Erzwingt Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Wird zur Abw\u00E4rtskompatiblit\u00E4t bereitgestellt\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen\n -Xdiag:resolver Zeigt Resolver-Diagnosemeldungen\n -Xfuture Aktiviert strengste Pr\u00FCfungen, als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n -version-Option\n -Xloggc: Protokolliert GC-Status in einer Datei mit Zeitstempeln\n -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xmn Setzt die anf\u00E4ngliche und maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n f\u00FCr die junge Generation (Nursery)\n -Xms Setzt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe\n -Xmx Setzt die maximale Java-Heap-Gr\u00F6\u00DFe\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xprof Gibt CPU-Profilierungsdaten aus\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet freigegebene Klassendaten, wenn m\u00F6glich (Standard)\n -Xshare:off Versucht nicht, freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n -XshowSettings Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen und f\u00E4hrt fort\n -Xss Setzt Stackgr\u00F6\u00DFe des Java-Threads\n -Xverify Setzt den Modus der Bytecodeverifizierung\n --add-reads =(,)*\n Aktualisiert , damit gelesen wird, ungeachtet \n der Moduldeklaration. \n kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports /=(,)*\n Aktualisiert , um in zu exportieren,\n ungeachtet der Moduldeklaration.\n kann ALL-UNNAMED sein, um in alle \n unbenannten Module zu exportieren.\n --disable-@files Deaktiviert das weitere Einblenden der Argumentdatei\n --patch-module =({0})*\n Setzt ein Modul au\u00DFer Kraft oder erweitert ein Modul mit Klassen und Ressourcen\n in JAR-Dateien oder -Verzeichnissen.\n\nDiese Optionen sind Nicht-Standardoptionen und k\u00F6nnen ohne Ank\u00FCndigung ge\u00E4ndert werden.\n +java.launcher.X.usage=\n -Xbatch Deaktiviert Hintergrundkompilierung\n -Xbootclasspath/a: \n an Ende von Bootstrap Classpath anh\u00E4ngen\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n -Xcomp Erzwingt Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Wird zur Abw\u00E4rtskompatiblit\u00E4t bereitgestellt\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen an\n -Xfuture Aktiviert strengste Pr\u00FCfungen, wird als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n Option "-version"\n -Xloggc: Protokolliert GC-Status in einer Datei mit Zeitstempeln\n -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xmn Legt die anf\u00E4ngliche und die maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n f\u00FCr die junge Generation (Nursery) fest\n -Xms Legt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe fest\n -Xmx Legt die maximale Java-Heap-Gr\u00F6\u00DFe fest\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xprof Gibt CPU-Profilierungsdaten aus (veraltet)\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet, wenn m\u00F6glich, freigegebene Klassendaten (Standard)\n -Xshare:off Versucht nicht, freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n -XshowSettings Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen an und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen an und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen an und f\u00E4hrt fort\n -Xss Legt Stack-Gr\u00F6\u00DFe des Java-Threads fest\n -Xverify Legt den Modus der Bytecodeverifizierung fest\n --add-reads =(,)*\n Aktualisiert , damit ungeachtet der\n Moduldeklaration gelesen wird. \n kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports /=(,)*\n Aktualisiert , um ungeachtet der Moduldeklaration\n in zu exportieren.\n kann ALL-UNNAMED sein, um in alle \n unbenannten Module zu exportieren.\n --add-opens /=(,)*\n Aktualisiert , um ungeachtet der Moduldeklaration\n in zu \u00F6ffnen.\n --limit-modules [,...]\n Grenzt die Gesamtmenge der beobachtbaren Module ein\n --patch-module =({0})*\n \u00DCberschreibt oder erweitert ein Modul in JAR-Dateien\n oder -Verzeichnissen mit \ +Klassen und Ressourcen.\n --disable-@files Deaktiviert die weitere Erweiterung von Argumentdateien\n\nDiese zus\u00E4tzlichen Optionen k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden. # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nDie folgenden Optionen sind f\u00FCr Mac OS X spezifisch:\n -XstartOnFirstThread\n main()-Methode f\u00FCr den ersten (AppKit) Thread ausf\u00FChren\n -Xdock:name=\n Den im Dock angezeigten Standardanwendungsnamen \u00FCberschreiben\n -Xdock:icon=\n Das im Dock angezeigte Standardsymbol \u00FCberschreiben\n\n -java.launcher.cls.error1=Fehler: Hauptklasse {0} konnte nicht gefunden oder geladen werden +java.launcher.cls.error1=Fehler: Hauptklasse {0} konnte nicht gefunden oder geladen werden\nUrsache: {1}: {2} java.launcher.cls.error2=Fehler: Hauptmethode ist nicht {0} in Klasse {1}. Definieren Sie die Hauptmethode als:\n public static void main(String[] args) java.launcher.cls.error3=Fehler: Hauptmethode muss einen Wert vom Typ void in Klasse {0} zur\u00FCckgeben. Definieren Sie \ndie Hauptmethode als:\n public static void main(String[] args) java.launcher.cls.error4=Fehler: Hauptmethode in Klasse {0} nicht gefunden. Definieren Sie die Hauptmethode als:\n public static void main(String[] args):\noder eine JavaFX-Anwendung muss {1} erweitern java.launcher.cls.error5=Fehler: Zum Ausf\u00FChren dieser Anwendung ben\u00F6tigte JavaFX-Runtime-Komponenten fehlen +java.launcher.cls.error6=Fehler: Beim Laden der Klasse {0} ist ein LinkageError aufgetreten\n\t{1} java.launcher.jar.error1=Fehler: Beim Versuch, Datei {0} zu \u00F6ffnen, ist ein unerwarteter Fehler aufgetreten java.launcher.jar.error2=Manifest in {0} nicht gefunden java.launcher.jar.error3=kein Hauptmanifestattribut, in {0} +java.launcher.jar.error4=Fehler beim Laden des Java-Agents in {0} java.launcher.init.error=Initialisierungsfehler java.launcher.javafx.error1=Fehler: Die JavaFX-Methode launchApplication hat die falsche Signatur, sie\nmuss als statisch deklariert werden und einen Wert vom Typ VOID zur\u00FCckgeben java.launcher.module.error1=Modul {0} weist kein MainClass-Attribut auf. Verwenden Sie -m / java.launcher.module.error2=Fehler: Hauptklasse {0} konnte in Modul {1} nicht gefunden oder geladen werden +java.launcher.module.error3=Fehler: Hauptklasse {0} kann nicht aus Modul {1} geladen werden\n\t{2} +java.launcher.module.error4={0} nicht gefunden diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties index c8370841ab9..3fecb4c841a 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties @@ -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 @@ -24,35 +24,36 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Sintaxis: {0} [opciones] class [argumentos...]\n (para ejecutar una clase)\n o {0} [opciones] -jar jarfile [argumentos...]\n (para ejecutar un archivo jar)\n o {0} [opciones] -p -m [/] [argumentos...]\n (para ejecutar la clase principal en un m\u00F3dulo)\ndonde las opciones incluyen:\n +java.launcher.opt.header = Sintaxis: {0} [opciones] [argumentos...]\n (para ejecutar una clase)\n o {0} [opciones] -jar [argumentos...]\n (para ejecutar un archivo jar)\n o {0} [opciones] -m [/] [argumentos...]\n {0} [opciones] --module [/] [argumentos...]\n (para ejecutar la clase principal en un m\u00F3dulo)\n\n Argumentos que siguen la clase principal, -jar , -m o --module\n / se transfieren como argumentos a una clase principal.\n\n donde las opciones incluyen:\n\n java.launcher.opt.datamodel =\ -d{0}\t Anticuada, se eliminar\u00E1 en una versi\u00F3n futura\n java.launcher.opt.vmselect =\ {0}\t para seleccionar la VM "{1}"\n java.launcher.opt.hotspot =\ {0}\t es un sin\u00F3nimo de la VM "{1}" [anticuada]\n -java.launcher.ergo.message1 =\ La VM por defecto es {0} -java.launcher.ergo.message2 =\ porque la ejecuci\u00F3n se est\u00E1 llevando a cabo en una m\u00E1quina de clase de servidor.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Una lista separada por el car\u00E1cter {0}, archivos JAR\n y archivos ZIP para buscar archivos de clases.\n -p \n --module-path ...\n Una lista de directorios separada por el car\u00E1cter {0}, cada directorio\n es un directorio de m\u00F3dulos.\n --upgrade-module-path ...\n Una lista de directorios separada por el car\u00E1cter {0}, cada directorio\n es un directorio de m\u00F3dulos que sustituye a\n los m\u00F3dulos actualizables en la imagen de tiempo de ejecuci\u00F3n\n --add-modules [,...]\n m\u00F3dulos de ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial.\n tambi\u00E9n puede ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n mostrar m\u00F3dulos observables y salir\n --d \n --describe-module \n describir un m\u00F3dulo y salir\n --dry-run crear VM y cargar la clase principal pero sin ejecutar el m\u00E9todo principal.\n La opci\u00F3n --dry-run puede ser \u00FAtil para validar\n las opciones de l\u00EDnea de comandos, como la configuraci\u00F3n del sistema de m\u00F3dulos.\n --validate-modules\n validar todos los m\u00F3dulos y salir\n La opci\u00F3n --validate-modules puede ser \u00FAtil para encontrar\n conflictos y otros errores con m\u00F3dulos en la ruta de m\u00F3dulos.\n -D=\n definir una propiedad de sistema\n -verbose:[class|module|gc|jni]\n activar la salida en modo verbose\n -version imprimir versi\u00F3n de producto en el flujo de errores y salir\n --version imprimir versi\u00F3n de producto en el flujo de salida y salir\n -showversion imprimir versi\u00F3n de producto en el flujo de errores y continuar\n --show-version\n -showversion imprimir versi\u00F3n de producto en el flujo de salida y continuar\n --show-module-resolution\n mostrar la salida de resoluci\u00F3n de m\u00F3dulo durante el inicio\n -? -h -help\n imprimir este mensaje de ayuda en el flujo de errores\n --help imprimir este mensaje de ayuda en el flujo de salida\n -X imprimir ayuda de opciones adicionales en el flujo de errores\n --help-extra imprimir ayuda de opciones adicionales en el flujo de salida\n -ea[:...|:]\n -enableassertions[:...|:]\n activar afirmaciones con una granularidad especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desactivar afirmaciones con una granularidad especificada\n -esa | -enablesystemassertions\n activar afirmaciones del sistema\n -dsa | -disablesystemassertions\n desactivar afirmaciones del sistema\n -agentlib:[=]\n cargar biblioteca de agente nativo , por ejemplo, -agentlib:jdwp\n ver tambi\u00E9n -agentlib:jdwp=help\n -agentpath:[=]\n cargar biblioteca de agente nativo por nombre completo de ruta\n -javaagent:[=]\n cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n -splash:\n \ + mostrar pantalla de presentaci\u00F3n con imagen especificada\n Las im\u00E1genes a escala HiDPI est\u00E1n soportadas y se usan autom\u00E1ticamente\n si est\u00E1n disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n siempre debe transmitirse como el argumento para la opci\u00F3n -splash.\n La imagen a escala m\u00E1s adecuada que se haya proporcionado se escoger\u00E1\n autom\u00E1ticamente.\n Consulte la documentaci\u00F3n de la API de la pantalla de presentaci\u00F3n para obtener m\u00E1s informaci\u00F3n.\n @argument files\n uno o m\u00E1s archivos de argumentos que contienen opciones\n -disable-@files\n evitar una mayor expansi\u00F3n del archivo de argumentos\nPara especificar un argumento para una opci\u00F3n larga, puede usar --= o\n-- .\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Lista separada por {0} de directorios, archivos JAR\n y archivos ZIP para buscar archivos de clase.\n -p \n --module-path ...\n Lista separada por {0} de directorios, cada directorio\n es un directorio de m\u00F3dulos.\n --upgrade-module-path ...\n Lista separada por {0} de directorios, cada directorio\n es un directorio de m\u00F3dulos que sustituye a los m\u00F3dulos\n actualizables en la imagen de tiempo de ejecuci\u00F3n\n -m [/]\n --module [/]\n m\u00F3dulo inicial que resolver y nombre de la clase principal\n que ejecutar si el m\u00F3dulo no la especifica\n --add-modules [,...]\n m\u00F3dulos ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial.\n tambi\u00E9n puede ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules [,...]\n limitar el universo de los m\u00F3dulos observables\n --list-modules [[,...]]\n mostrar los m\u00F3dulos observables y salir\n --dry-run crear VM pero no ejecutar m\u00E9todo principal.\n Esta opci\u00F3n --dry-run puede ser \u00FAtil para validar las\n opciones de l\u00EDnea de comandos como la configuraci\u00F3n del sistema de m\u00F3dulo.\n -D=\n definir una propiedad del sistema\n -verbose:[class|gc|jni]\n activar la salida detallada\n -version imprimir la versi\u00F3n del producto y salir\n -showversion imprimir la versi\u00F3n del producto y continuar\n -? -help --help\n imprimir este mensaje de ayuda\n -X imprimir la ayuda de opciones no est\u00E1ndar\n -ea[:...|:]\n -enableassertions[:...|:]\n activar afirmaciones con la granularidad especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desactivar afirmaciones con la granularidad especificada\n -esa | -enablesystemassertions\n activar afirmaciones del sistema\n -dsa | -disablesystemassertions\n desactivar afirmaciones del sistema\n -agentlib:[=]\n cargar biblioteca de agentes nativos , por ejemplo, -agentlib:jdwp\n ver tambi\u00E9n -agentlib:jdwp=help\n -agentpath:[=]\n cargar biblioteca de agentes nativos por nombre de ruta completo\n -javaagent:[=]\n cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n -splash:\n mostrar pantalla de bienvenida con la imagen especificada\n Las im\u00E1genes a escala HiDPI est\u00E1n soportadas y se usan autom\u00E1ticamente\n si est\u00E1n disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n siempre debe transferirse como el argumento en la opci\u00F3n -splash.\n La imagen a escala m\u00E1s adecuada que se haya proporcionado se escoger\u00E1\n autom\u00E1ticamente.\n Consulte la documentaci\u00F3n de \ -la API de la pantalla de bienvenida para obtener m\u00E1s informaci\u00F3n.\n en leer opciones del archivo especificado\nPara especificar un argumento para una opci\u00F3n larga, puede usar --= o\n-- .\n -See http://www.oracle.com/technetwork/java/javase/documentation/index.html para obtener m\u00E1s informaci\u00F3n. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch desactivar compilaci\u00F3n de fondo\n -Xbootclasspath/a:\n agregar al final de la ruta de la clase de inicializaci\u00F3n de datos\n -Xcheck:jni realizar comprobaciones adicionales para las funciones de JNI\n -Xcomp fuerza la compilaci\u00F3n de m\u00E9todos en la primera llamada\n -Xdebug se proporciona para ofrecer compatibilidad con versiones anteriores\n -Xdiag mostrar mensajes de diagn\u00F3stico adicionales\n -Xdiag:resolver mostrar mensajes de diagn\u00F3stico de resoluci\u00F3n\n -Xfuture activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n -Xint solo ejecuci\u00F3n de modo interpretado\n -Xinternalversion\n muestra una informaci\u00F3n de la versi\u00F3n de JVM m\u00E1s detallada que la\n opci\u00F3n -version\n -Xloggc: registrar el estado de GC en un archivo con registros de hora\n -Xmixed ejecuci\u00F3n de modo mixto (por defecto)\n -Xmn define el tama\u00F1o inicial y m\u00E1ximo (en bytes) de la pila\n para la generaci\u00F3n m\u00E1s joven (espacio infantil)\n -Xms define el tama\u00F1o inicial de la pila de Java\n -Xmx define el tama\u00F1o m\u00E1ximo de la pila de Java\n -Xnoclassgc desactivar la recolecci\u00F3n de basura de clases\n -Xprof datos de creaci\u00F3n de perfiles de CPU de salida\n -Xrs reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n -Xshare:auto usar datos de clase compartidos si es posible (valor por defecto)\n -Xshare:off no intentar usar datos de clase compartidos\n -Xshare:on es obligatorio el uso de datos de clase compartidos, de lo contrario se producir\u00E1 un fallo.\n -XshowSettings mostrar toda la configuraci\u00F3n y continuar\n -XshowSettings:all\n mostrar todos los valores y continuar\n -XshowSettings:locale\n mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n -XshowSettings:properties\n mostrar todos los valores de propiedad y continuar\n -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n -Xss definir tama\u00F1o de la pila del thread de Java\n -Xverify define el modo del verificador de c\u00F3digo de bytes\n --add-reads =(,)*\n actualiza para leer , independientemente\n de la declaraci\u00F3n del m\u00F3dulo. \n puede ser ALL-UNNAMED para leer todos los\n m\u00F3dulos sin nombre.\n --add-exports /=(,)*\n actualiza para exportar en ,\n independientemente de la declaraci\u00F3n del m\u00F3dulo.\n puede ser ALL-UNNAMED para exportar a todos los\n m\u00F3dulos sin nombre.\n --disable-@files desactivar la ampliaci\u00F3n de archivos de m\u00E1s argumentos\n --patch-module =({0})*\n Aumentar o anular un m\u00F3dulo con clases y recursos\n en directorios y archivos JAR\n\nEstas opciones no son est\u00E1ndar y est\u00E1n sujetas a cambio sin previo aviso.\n +java.launcher.X.usage=\ -Xbatch desactivar compilaci\u00F3n de fondo\n -Xbootclasspath/a:\n agregar al final de la ruta de la clase de inicializaci\u00F3n de datos\n -Xcheck:jni realizar comprobaciones adicionales para las funciones de JNI\n -Xcomp fuerza la compilaci\u00F3n de m\u00E9todos en la primera llamada\n -Xdebug se proporciona para ofrecer compatibilidad con versiones anteriores\n -Xdiag mostrar mensajes de diagn\u00F3stico adicionales\n -Xfuture activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n -Xint solo ejecuci\u00F3n de modo interpretado\n -Xinternalversion\n muestra una informaci\u00F3n de la versi\u00F3n de JVM m\u00E1s detallada que la\n opci\u00F3n -version\n -Xloggc: registrar el estado de GC en un archivo con registros de hora\n -Xmixed ejecuci\u00F3n de modo mixto (por defecto)\n -Xmn define el tama\u00F1o inicial y m\u00E1ximo (en bytes) de la pila\n para la generaci\u00F3n m\u00E1s joven (espacio infantil)\n -Xms define el tama\u00F1o inicial de la pila de Java\n -Xmx define el tama\u00F1o m\u00E1ximo de la pila de Java\n -Xnoclassgc desactivar la recolecci\u00F3n de basura de clases\n -Xprof datos de creaci\u00F3n de perfiles de CPU de salida (anticuados)\n -Xrs reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n -Xshare:auto usar datos de clase compartidos si es posible (valor por defecto)\n -Xshare:off no intentar usar datos de clase compartidos\n -Xshare:on es obligatorio el uso de datos de clase compartidos, de lo contrario se producir\u00E1 un fallo.\n -XshowSettings mostrar toda la configuraci\u00F3n y continuar\n -XshowSettings:all\n mostrar todos los valores y continuar\n -XshowSettings:locale\n mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n -XshowSettings:properties\n mostrar todos los valores de propiedad y continuar\n -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n -Xss definir tama\u00F1o de la pila del thread de Java\n -Xverify define el modo del verificador de c\u00F3digo de bytes\n --add-reads =(,)*\n actualiza para leer , independientement\n de la declaraci\u00F3n del m\u00F3dulo. \n puede ser ALL-UNNAMED para leer todos los\n m\u00F3dulos sin nombre.\n --add-exports /=(,)*\n actualiza para exportar en ,\n independientemente de la declaraci\u00F3n del m\u00F3dulo.\n puede ser ALL-UNNAMED para exportar a todos los\n m\u00F3dulos sin nombre.\n --add-opens /=(,)*\n actualiza para abrir en\n , independientemente de la declaraci\u00F3n del m\u00F3dulo.\n --limit-modules [,...]\n limitar el universo de m\u00F3dulos observables\n --patch-module =({0})*\n anular o aumentar un m\u00F3dulo con clases y recursos\n en directorios o archivos JAR.\n --disable-@files desactivar una mayor expansi\u00F3n del archivo de argumentos\n\nEstas opciones adicionales est\u00E1n sujetas a cambios sin previo aviso.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nLas siguientes opciones son espec\u00EDficas para Mac OS X:\n -XstartOnFirstThread\n ejecutar el m\u00E9todo main() del primer thread (AppKit)\n -Xdock:name=\n sustituir al nombre por defecto de la aplicaci\u00F3n que se muestra en el Dock\n -Xdock:icon=\n sustituir al icono por defecto que se muestra en el Dock\n\n -java.launcher.cls.error1=Error: no se ha encontrado o cargado la clase principal {0} +java.launcher.cls.error1=Error: no se ha encontrado o cargado la clase principal {0}\nCausado por: {1}: {2} java.launcher.cls.error2=Error: el m\u00E9todo principal no es {0} en la clase {1}, defina el m\u00E9todo principal del siguiente modo:\n public static void main(String[] args) java.launcher.cls.error3=Error: el m\u00E9todo principal debe devolver un valor del tipo void en la clase {0}, \ndefina el m\u00E9todo principal del siguiente modo:\n public static void main(String[] args) java.launcher.cls.error4=Error: no se ha encontrado el m\u00E9todo principal en la clase {0}, defina el m\u00E9todo principal del siguiente modo:\\n public static void main(String[] args)\\nde lo contrario, se deber\u00E1 ampliar una clase de aplicaci\u00F3n JavaFX {1} java.launcher.cls.error5=Error: faltan los componentes de JavaFX runtime y son necesarios para ejecutar esta aplicaci\u00F3n +java.launcher.cls.error6=Error: Se ha producido un error de enlace al cargar la clase principal {0}\n\t{1} java.launcher.jar.error1=Error: se ha producido un error inesperado al intentar abrir el archivo {0} java.launcher.jar.error2=no se ha encontrado el manifiesto en {0} java.launcher.jar.error3=no hay ning\u00FAn atributo de manifiesto principal en {0} +java.launcher.jar.error4=error al cargar el agente de java en {0} java.launcher.init.error=error de inicializaci\u00F3n java.launcher.javafx.error1=Error: el m\u00E9todo launchApplication de JavaFX tiene una firma que no es correcta.\\nSe debe declarar est\u00E1tico y devolver un valor de tipo nulo java.launcher.module.error1=el m\u00F3dulo {0} no tiene ning\u00FAn atributo MainClass, utilice -m / java.launcher.module.error2=Error: no se ha encontrado o cargado la clase principal {0} en el m\u00F3dulo {1} +java.launcher.module.error3=Error: No se ha podido cargar la clase principal {0} del m\u00F3dulo {1}\n\t{2} +java.launcher.module.error4=No se ha encontrado {0} diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties index 974388514ba..472d13b4baf 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties @@ -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 @@ -24,36 +24,35 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Syntaxe : {0} [options] class [args...]\n (pour l''ex\u00E9cution d''une classe)\n ou {0} [options] -jar jarfile [args...]\n (pour l''ex\u00E9cution d''un fichier JAR)\n ou {0} [options] -p -m [/] [args...]\n (pour l''ex\u00E9cution de la classe principale dans un module)\no\u00F9 options comprend les \u00E9l\u00E9ments suivants :\n +java.launcher.opt.header = Syntaxe : {0} [options] [args...]\n (pour ex\u00E9cuter une classe)\n ou {0} [options] -jar [args...]\n (pour ex\u00E9cuter un fichier JAR)\n ou {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (pour ex\u00E9cuter la classe principale dans un module)\n\n Les arguments suivant la classe principale -jar , -m ou --module\n / sont transmis en tant qu''arguments \u00E0 la classe principale.\n\n o\u00F9 options comprend les \u00E9l\u00E9ments suivants :\n\n java.launcher.opt.datamodel =\ -d{0}\t En phase d''abandon, sera enlev\u00E9 dans une version future\n java.launcher.opt.vmselect =\ {0}\t pour s\u00E9lectionner la machine virtuelle "{1}"\n java.launcher.opt.hotspot =\ {0}\t est un synonyme pour la machine virtuelle "{1}" [en phase d''abandon]\n -java.launcher.ergo.message1 =\ La machine virtuelle par d\u00E9faut est {0} -java.launcher.ergo.message2 =\ car vous ex\u00E9cutez une machine de classe de serveur.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Liste distincte {0} de r\u00E9pertoires, d''archives JAR\n et d'archives ZIP pour rechercher des fichiers de classe.\n -p \n --module-path ...\n Liste distincte {0} de r\u00E9pertoires, chaque r\u00E9pertoire\n est un r\u00E9pertoire de modules.\n --upgrade-module-path ...\n Liste distincte {0} de r\u00E9pertoires, chaque r\u00E9pertoire\n est un r\u00E9pertoire de module qui remplace les modules\n pouvant \u00EAtre mis \u00E0 niveau dans l'image d'ex\u00E9cution\n --add-modules [,...]\n modules racine \u00E0 r\u00E9soudre en plus du module initial.\n peut \u00E9galement \u00EAtre ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n r\u00E9pertorier les modules observables et quitter\n --d \n --describe-module \n d\u00E9crire un module et quitter\n --dry-run cr\u00E9er une machine virtuelle et charger la classe principale mais ne pas ex\u00E9cuter la m\u00E9thode principale.\n L'option--dry-run peut \u00EAtre utile pour la validation des\n options de ligne de commande telles que la configuration syst\u00E8me de module.\n --validate-modules\n valider tous les modules et quitter\n L'option --validate-modules peut \u00EAtre utile pour la recherche de\n conflits et d'autres erreurs avec des modules dans le chemin de module.\n -D=\n d\u00E9finir une propri\u00E9t\u00E9 syst\u00E8me\n -verbose:[class|module|gc|jni]\n activer la sortie en mode verbose\n -version afficher la version de produit dans le flux d'erreur et quitter\n --version afficher la version de produit dans le flux de sortie et quitter\n -showversion afficher la version de produit dans le flux d'erreur et continuer\n --show-version\n afficher la version de produit dans le flux de sortie et continuer\n --show-module-resolution\n afficher la sortie de r\u00E9solution de module lors du d\u00E9marrage\n -? -h -help\n afficher ce message d'aide dans le flux d'erreur\n --help afficher ce message d'erreur dans le flux de sortie\n -X afficher l'aide sur des options suppl\u00E9mentaires dans le flux d'erreur\n --help-extra afficher l'aide sur des options suppl\u00E9mentaires dans le flux de sortie\n -ea[:...|:]\n -enableassertions[:...|:]\n activer des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -da[:...|:]\n -disableassertions[:...|:]\n d\u00E9sactiver des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -esa | -enablesystemassertions\n activer des assertions syst\u00E8me\n -dsa | -disablesystemassertions\n d\u00E9sactiver des assertions syst\u00E8me\n -agentlib:[=]\n charger la biblioth\u00E8que d'agent natif , par ex. -agentlib:jdwp\n voir \u00E9galement -agentlib:jdwp=help\n -agentpath:[=]\n charger la biblioth\u00E8que d'agent natif par nom de chemin complet\n -javaagent:[=]\n charger l'agent de langage de programmation, voir \ +java.lang.instrument\n -splash:\n afficher l'\u00E9cran d'accueil avec l'image indiqu\u00E9e\n Les images redimensionn\u00E9es HiDPI sont automatiquement prises en charge et utilis\u00E9es\n si elles sont disponibles. Le nom de fichier d'une image non redimensionn\u00E9e, par ex. image.ext,\n doit toujours \u00EAtre transmis comme argument \u00E0 l'option -splash.\n L'image redimensionn\u00E9e fournie la plus appropri\u00E9e sera automatiquement\n s\u00E9lectionn\u00E9e.\n Pour plus d'informations, reportez-vous \u00E0 la documentation relative \u00E0 l'API SplashScreen\n fichiers @argument\n fichiers d'arguments contenant des options\n -disable-@files\n emp\u00EAcher le d\u00E9veloppement suppl\u00E9mentaire de fichiers d'arguments\nAfin d'indiquer un argument pour une option longue, vous pouvez utiliser --= ou\n-- .\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Liste de r\u00E9pertoires, d''archives JAR\n et d''archives ZIP s\u00E9par\u00E9s par des {0} dans laquelle rechercher les fichiers de classe.\n -p \n --module-path ...\n Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n est un r\u00E9pertoire de modules.\n --upgrade-module-path ...\n Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n est un r\u00E9pertoire de modules qui remplace des modules\n pouvant \u00EAtre mis \u00E0 niveau dans l''image d''ex\u00E9cution\n -m [/]\n --module [/]\n module initial \u00E0 r\u00E9soudre et nom de la classe principale\n \u00E0 ex\u00E9cuter si elle n''est pas indiqu\u00E9e par le module\n --add-modules [,...]\n modules racine \u00E0 r\u00E9soudre en plus du module initial.\n peut \u00E9galement \u00EAtre ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules [,...]\n limitation de l''univers de modules observables\n --list-modules [[,...]]\n \u00E9num\u00E9ration des modules observables et fin de l''op\u00E9ration\n --dry-run cr\u00E9e une machine virtuelle mais n''ex\u00E9cute pas la m\u00E9thode principale.\n Cette option --dry-run peut s''av\u00E9rer utile pour la validation des\n options de ligne de commandes telles que la configuration syst\u00E8me de module.\n -D=\n d\u00E9finition d''une propri\u00E9t\u00E9 syst\u00E8me\n -verbose:[class|gc|jni]\n activation de la sortie en mode verbose\n -version affichage de la version du produit et fin de l''op\u00E9ration\n -showversion affichage de la version du produit et poursuite de l''op\u00E9ration\n -? -help --help\n affichage du message d''aide\n -X affichage de l''aide sur les options non standard\n -ea[:...|:]\n -enableassertions[:...|:]\n activation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -da[:...|:]\n -disableassertions[:...|:]\n d\u00E9sactivation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -esa | -enablesystemassertions\n activation des assertions syst\u00E8me\n -dsa | -disablesystemassertions\n d\u00E9sactivation des assertions syst\u00E8me\n -agentlib:[=]\n chargement de la biblioth\u00E8que d''agent natif , par exemple : -agentlib:jdwp\n voir aussi -agentlib:jdwp=help\n -agentpath:[=]\n chargement de la biblioth\u00E8que d''agent natif via le chemin d''acc\u00E8s complet\n -javaagent:[=]\n chargement de l''agent du langage de programmation Java, voir java.lang.instrument\n -splash:\n affichage de l''\u00E9cran d''accueil avec l''image indiqu\u00E9e\n Les images redimensionn\u00E9es HiDPI sont automatiquement prises en charge et utilis\u00E9es\n si elles sont disponibles. Le nom de fichier d''une image non redimensionn\u00E9e, par ex. image.ext,\n doit toujours \ -\u00EAtre transmis comme argument \u00E0 l''option -splash.\n L''image redimensionn\u00E9e fournie la plus appropri\u00E9e sera automatiquement\n s\u00E9lectionn\u00E9e.\n Pour plus d''informations, reportez-vous \u00E0 la documentation relative \u00E0 l''API SplashScreen.\n @ lire les options \u00E0 partir du fichier indiqu\u00E9\nPour indiquer un argument pour une option longue, vous pouvez utiliser --= ou\n-- .\n -See http://www.oracle.com/technetwork/java/javase/documentation/index.html pour plus de d\u00E9tails. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch d\u00E9sactivation de la compilation en arri\u00E8re-plan\n -Xbootclasspath/a:\n ajout \u00E0 la fin du chemin de classe bootstrap\n -Xcheck:jni ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n -Xcomp force la compilation de m\u00E9thodes au premier appel\n -Xdebug fourni pour la compatibilit\u00E9 amont\n -Xdiag affichage de messages de diagnostic suppl\u00E9mentaires\n -Xdiag:resolver affichage de messages de diagnostic du r\u00E9solveur\n -Xfuture activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n -Xint ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n -Xinternalversion\n affiche des informations de version JVM plus d\u00E9taill\u00E9es que\n l''option -version\n -Xloggc: journalisation du statut de l''op\u00E9ration de ramasse-miette dans un fichier avec horodatage\n -Xmixed ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n -Xmn d\u00E9finit les tailles initiale et maximale (en octets) de la portion de m\u00E9moire\n pour la jeune g\u00E9n\u00E9ration (nursery)\n -Xms d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n -Xmx d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n -Xnoclassgc d\u00E9sactivation de l''op\u00E9ration de ramasse-miette de la classe\n -Xprof sortie des donn\u00E9es de profilage d''UC\n -Xrs r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n -Xshare:auto utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n -Xshare:off aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n -Xshare:on utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration\n -XshowSettings affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:all\n affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:locale\n affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n -XshowSettings:properties\n affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n -Xss d\u00E9finition de la taille de pile de threads Java\n -Xverify d\u00E9finit le mode du v\u00E9rificateur de code ex\u00E9cutable\n --add-reads =(,)*\n met \u00E0 jour pour lire , sans tenir compte\n de la d\u00E9claration de module. \n peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n sans nom.\n --add-exports /=(,)*\n met \u00E0 jour pour exporter vers ,\n sans tenir compte de la d\u00E9claration de module.\n peut \u00EAtre ALL-UNNAMED pour effectuer un export vers tous\n les modules sans nom.\n --disable-@files d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n --patch-module =({0})*\n Remplacement ou augmentation d''un module avec des classes et des ressources\n dans des \ -fichiers ou des r\u00E9pertoires JAR.\n\nCes options ne sont pas standard et peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n +java.launcher.X.usage=\n -Xbatch d\u00E9sactivation de la compilation en arri\u00E8re-plan\n -Xbootclasspath/a:\n ajout \u00E0 la fin du chemin de classe bootstrap\n -Xcheck:jni ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n -Xcomp force la compilation de m\u00E9thodes au premier appel\n -Xdebug fourni pour la compatibilit\u00E9 amont\n -Xdiag affichage de messages de diagnostic suppl\u00E9mentaires\n -Xfuture activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n -Xint ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n -Xinternalversion\n affiche des informations de version JVM plus d\u00E9taill\u00E9es que\n l''option -version\n -Xloggc: journalisation du statut de l''op\u00E9ration de ramasse-miette dans un fichier avec horodatage\n -Xmixed ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n -Xmn d\u00E9finit les tailles initiale et maximale (en octets) de la portion de m\u00E9moire\n pour la jeune g\u00E9n\u00E9ration (nursery)\n -Xms d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n -Xmx d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n -Xnoclassgc d\u00E9sactivation de l''op\u00E9ration de ramasse-miette de la classe\n -Xprof sortie des donn\u00E9es de profilage d''UC (en phase d''abandon)\n -Xrs r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n -Xshare:auto utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n -Xshare:off aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n -Xshare:on utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration.\n -XshowSettings affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:all\n affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:locale\n affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n -XshowSettings:properties\n affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n -Xss d\u00E9finition de la taille de pile de threads Java\n -Xverify d\u00E9finit le mode du v\u00E9rificateur de code ex\u00E9cutable\n --add-reads =(,)*\n met \u00E0 jour pour lire , sans tenir compte\n de la d\u00E9claration de module. \n peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n sans nom.\n --add-exports /=(,)*\n met \u00E0 jour pour exporter vers ,\n sans tenir compte de la d\u00E9claration de module.\n peut \u00EAtre ALL-UNNAMED pour exporter tous les\n modules sans nom.\n --add-opens /=(,)*\n met \u00E0 jour pour ouvrir dans\n , sans tenir compte de la d\u00E9claration de module.\n --limit-modules [,...]\n limiter l''univers de modules observables\n --patch-module =({0})*\n Remplacement ou augmentation d''un module avec des classes et des ressources\n dans des fichiers ou des r\u00E9pertoires JAR.\n --disable-@files d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n\nCes options suppl\u00E9mentaires peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nLes options suivantes sont propres \u00E0 Mac OS X :\n -XstartOnFirstThread\n ex\u00E9cute la m\u00E9thode main() sur le premier thread (AppKit)\n -Xdock:name=\n remplace le nom d'application par d\u00E9faut affich\u00E9 dans l'ancrage\n -Xdock:icon=\n remplace l'ic\u00F4ne par d\u00E9faut affich\u00E9e dans l'ancrage\n\n -java.launcher.cls.error1=Erreur : impossible de trouver ou charger la classe principale {0} +java.launcher.cls.error1=Erreur : impossible de trouver ou de charger la classe principale {0}\nCaus\u00E9 par : {1}: {2} java.launcher.cls.error2=Erreur : la m\u00E9thode principale n''est pas {0} dans la classe {1}, d\u00E9finissez la m\u00E9thode principale comme suit :\n public static void main(String[] args) java.launcher.cls.error3=Erreur : la m\u00E9thode principale doit renvoyer une valeur de type void dans la classe {0}, \nd\u00E9finissez la m\u00E9thode principale comme suit :\n public static void main(String[] args) java.launcher.cls.error4=Erreur : la m\u00E9thode principale est introuvable dans la classe {0}, d\u00E9finissez la m\u00E9thode principale comme suit :\n public static void main(String[] args)\nou une classe d''applications JavaFX doit \u00E9tendre {1} java.launcher.cls.error5=Erreur : des composants d'ex\u00E9cution JavaFX obligatoires pour ex\u00E9cuter cette application sont manquants. +java.launcher.cls.error6=Erreur : LinkageError lors du chargement de la classe principale {0}\n\t{1} java.launcher.jar.error1=Erreur : une erreur inattendue est survenue lors de la tentative d''ouverture du fichier {0} java.launcher.jar.error2=fichier manifeste introuvable dans {0} java.launcher.jar.error3=aucun attribut manifest principal dans {0} +java.launcher.jar.error4=erreur lors du chargement de l''agent Java dans {0} java.launcher.init.error=erreur d'initialisation java.launcher.javafx.error1=Erreur : la signature de la m\u00E9thode launchApplication JavaFX est incorrecte, la\nm\u00E9thode doit \u00EAtre d\u00E9clar\u00E9e statique et renvoyer une valeur de type void java.launcher.module.error1=le module {0} n''a pas d''attribut MainClass, utilisez -m / java.launcher.module.error2=Erreur : impossible de trouver ou charger la classe principale {0} dans le module {1} +java.launcher.module.error3=Erreur : impossible de charger la classe principale {0} \u00E0 partir du module {1}\n\t{2} +java.launcher.module.error4={0} introuvable diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties index d06e6997728..9c590b3c538 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties @@ -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 @@ -24,35 +24,36 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Uso: {0} [opzioni] class [argomenti...]\n (per eseguire una classe)\n oppure {0} [opzioni] -jar jarfile [argomenti...]\n (per eseguire un file jar)\n oppure {0} [opzioni] -p -m [/] [argomenti...]\n (per eseguire la classe principale in un modulo)\ndove opzioni include:\n +java.launcher.opt.header = Uso: {0} [opzioni] [argomenti...]\n (per eseguire una classe)\n oppure {0} [opzioni] -jar [argomenti...]\n (per eseguire un file jar)\n oppure {0} [opzioni] -m [/] [argomenti...]\n {0} [opzioni] --module [/] [argomenti...]\n (per eseguire la classe principale in un modulo)\n\n Gli argomenti specificati dopo la classe principale, dopo -jar , -m o --module\n / vengono passati come argomenti alla classe principale.\n\n dove opzioni include:\n\n java.launcher.opt.datamodel =\ -d{0}\t opzione non pi\u00F9 valida; verr\u00E0 rimossa in una release futura\n java.launcher.opt.vmselect =\ {0}\t per selezionare la VM "{1}"\n java.launcher.opt.hotspot =\ {0}\t \u00E8 un sinonimo per la VM "{1}" [non valido]\n -java.launcher.ergo.message1 =\ La VM predefinita \u00E8 {0} -java.launcher.ergo.message2 =\ perch\u00E9 si utilizza un computer di classe server.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer = \ -cp \n -classpath \n -class-path \n Una lista separata da {0} di directory, archivi JAR\n e archivi ZIP in cui cercare i file di classe.\n -p \n --module-path ...\n Una lista separata da {0} di directory. Ogni directory\n \u00E8 una directory di moduli.\n --upgrade-module-path ...\n Una lista separata da {0} di directory. Ogni directory\n \u00E8 una directory di moduli che sostituiscono i moduli\n aggiornabili nell'immagine in fase di esecuzione\n --add-modules [,...]\n I moduli radice da risolvere in aggiunta al modulo iniziale.\n pu\u00F2 essere anche ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n Elenca i moduli osservabili ed esce\n --d \n --describe-module \n Descrive un modulo ed esce\n --dry-run Crea la VM e carica la classe principale ma non esegue il metodo principale.\n L'opzione --dry-run pu\u00F2 essere utile per la convalida delle\n opzioni della riga di comando, ad esempio quelle utilizzate per la configurazione del sistema di moduli.\n --validate-modules\n Convalida tutti i moduli ed esce\n L'opzione --validate-modules pu\u00F2 essere utile per rilevare\n conflitti e altri errori con i moduli nel percorso dei moduli.\n -D=\n Imposta una propriet\u00E0 di sistema\n -verbose:[class|module|gc|jni]\n abilitare output descrittivo\n -version Visualizza la versione del prodotto nel flusso di errori ed esce\n -version Visualizza la versione del prodotto nel flusso di output ed esce\n -showversion Visualizza la versione del prodotto nel flusso di errori e continua\n --show-version\n Visualizza la versione del prodotto nel flusso di output e continua\n --show-module-resolution\n Mostra l'output della risoluzione del modulo durante l'avvio\n -? -h -help\n Visualizza questo messaggio della Guida nel flusso di errori\n --help Visualizza questo messaggio della Guida nel flusso di output\n -X Visualizza la Guida relativa alle opzioni non standard nel flusso di errori\n --help-extra Visualizza la Guida relativa alle opzioni non standard nel flusso di output\n -ea[:...|:]\n -enableassertions[:...|:]\n Abilita le asserzioni con la granularit\u00E0 specificata\n -da[:...|:]\n -disableassertions[:...|:]\n Disabilita le asserzioni con la granularit\u00E0 specificata\n -esa | -enablesystemassertions\n Abilita le asserzioni di sistema\n -dsa | -disablesystemassertions\n Disabilita le asserzioni di sistema\n -agentlib:[=]\n Carica la libreria agenti nativa , ad esempio -agentlib:jdwp\n Vedere anche -agentlib:jdwp=help\n -agentpath:[=]\n Carica la libreria agenti nativa con il percorso completo\n -javaagent:[=]\n Carica l'agente del linguaggio di programmazione Java, vedere java.lang.instrument\n -splash:\n Mostra la schermata iniziale con l'immagine specificata\n Le immagini ridimensionate HiDPI sono supportate e utilizzate \ +automaticamente\n se disponibili. I nomi file delle immagini non ridimensionate, ad esempio image.ext,\n devono essere sempre passati come argomenti all'opzione -splash.\n Verr\u00E0 scelta automaticamente l'immagine ridimensionata pi\u00F9 appropriata\n fornita.\n Per ulteriori informazioni, vedere la documentazione relativa all'API SplashScreen\n @file argomenti\n Uno o pi\u00F9 file argomenti contenenti opzioni\n -disable-@files\n Impedisce l'ulteriore espansione di file argomenti\nPer specificare un argomento per un'opzione lunga, \u00E8 possibile usare --= oppure\n-- .\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Lista separata da {0} di directory e di archivi JAR\n e ZIP utilizzata per la ricerca di file di classe.\n -p \n -module-path ...\n Lista separata da {0} di directory; ciascuna directory\n \u00E8 una directory di moduli.\n -upgrade-module-path ...\n Lista separata da {0} di directory; ciascuna directory\n \u00E8 una directory dei moduli che sostituiscono i moduli\n aggiornabili nell''immagine in fase di esecuzione.\n -m [/]\n --module [/]\n Il modulo iniziale da risolvere e il nome della classe\n principale da eseguire se non specificata dal modulo.\n -add-modules [,...]\n Moduli root da risolvere in aggiunta al modulo iniziale.\n pu\u00F2 essere anche ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n -limit-modules [,...]\n Limita l''universe dei moduli osservabili.\n -list-modules[:[,...]]\n Elenca i moduli osservabili ed esce.\n --dry-run Crea la VM ma non esegue il metodo principale.\n Pu\u00F2 essere utile, ad esempio, per la convalida delle opzioni della\n riga di comando utilizzate per la configurazione del sistema di moduli.\n -D=\n Imposta una propriet\u00E0 di sistema.\n -verbose:[class|gc|jni]\n Abilita l''output descrittivo.\n -version Visualizza la versione del prodotto ed esce.\n -showversion Visualizza la versione del prodotto e continua\n -? -help --help\n Visualizza questo messaggio della Guida.\n -X Visualizza la Guida relativa alle opzioni non standard.\n -ea[:...|:]\n -enableassertions[:...|:]\n Abilita le asserzioni con la granularit\u00E0 specificata.\n -da[:...|:]\n -disableassertions[:...|:]\n Disabilita le asserzioni con la granularit\u00E0 specificata.\n -esa | -enablesystemassertions\n Abilita le asserzioni di sistema.\n -dsa | -disablesystemassertions\n Disabilita le asserzioni di sistema.\n -agentlib:[=]\n Carica la libreria agenti nativa , ad esempio -agentlib:jdwp.\n Vedere anche -agentlib:jdwp=help.\n -agentpath:[=]\n Carica la libreria agenti nativa con il percorso completo.\n -javaagent:[=]\n Carica l''agente del linguaggio di programmazione Java. Vedere java.lang.instrument.\n -splash:\n Mostra la schermata iniziale con l''immagine specificata.\n Le immagini ridimensionate HiDPI sono supportate e utilizzate automaticamente\n se disponibili. I nomi file delle immagini non ridimensionate, ad esempio image.ext,\n devono essere sempre passati come argomenti all''opzione -splash.\n Verr\u00E0 scelta automaticamente l''immagine ridimensionata pi\u00F9 appropriata\n fornita.\n Per ulteriori informazioni, vedere la documentazione relativa all''API SplashScreen.\n @ legge le opzioni dal file specificato.\nPer specificare un argomento per un''opzione lunga, \u00E8 possibile \ -utilizzare --= o\n-- . -See Per ulteriori dettagli, vedere http://www.oracle.com/technetwork/java/javase/documentation/index.html. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch disabilita la compilazione in background\n -Xbootclasspath/a:\n aggiunge alla fine del classpath di bootstrap\n -Xcheck:jni esegue controlli aggiuntivi per le funzioni JNI\n -Xcomp forza la compilazione dei metodi al primo richiamo\n -Xdebug fornito per la compatibilit\u00E0 con le versioni precedenti\n -Xdiag mostra ulteriori messaggi diagnostici\n -Xdiag:resolver mostra i messaggi diagnostici del resolver\n -Xfuture abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future\n -Xint esecuzione solo in modalit\u00E0 convertita\n -Xinternalversion\n visualizza informazioni pi\u00F9 dettagliate sulla versione JVM rispetto\n all''opzione -version\n -Xloggc: registra lo stato GC in un file con indicatori orari\n -Xmixed esecuzione in modalit\u00E0 mista (impostazione predefinita)\n -Xmn imposta le dimensioni iniziale e massima (in byte) dell''heap\n per la young generation (nursery)\n -Xms imposta la dimensione heap Java iniziale\n -Xmx imposta la dimensione heap Java massima\n -Xnoclassgc disabilta la garbage collection della classe\n -Xprof visualizza i dati di profilo della CPU\n -Xrs riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione)\n -Xshare:auto utilizza i dati di classe condivisi se possibile (impostazione predefinita)\n -Xshare:off non tenta di utilizzare i dati di classe condivisi\n -Xshare:on richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n -XshowSettings mostra tutte le impostazioni e continua\n -XshowSettings:all\n mostra tutte le impostazioni e continua\n -XshowSettings:locale\n mostra tutte le impostazioni correlate alle impostazioni nazionali e continua\n -XshowSettings:properties\n mostra tutte le impostazioni delle propriet\u00E0 e continua\n -XshowSettings:vm mostra tutte le impostazioni correlate alla VM e continua\n -Xss imposta la dimensione dello stack di thread Java\n -Xverify imposta la modalit\u00E0 del verificatore bytecode\n --add-reads:=(,)*\n aggiorna per leggere , indipendentemente\n dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n moduli senza nome.\n -add-exports:/=(,)*\n aggiorna per esportare in ,\n indipendentemente dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n moduli senza nome.\n --disable-@files disabilita l''ulteriore espansione del file di argomenti\n -patch-module =({0})*\n sostituisce o migliora un modulo con classi e risorse\n in file JAR o directory\n\nQueste opzioni non sono opzioni standard e sono soggette a modifiche senza preavviso.\n +java.launcher.X.usage=\n -Xbatch Disabilita la compilazione in background.\n -Xbootclasspath/a:\n Aggiunge alla fine del classpath di bootstrap.\n -Xcheck:jni Esegue controlli aggiuntivi per le funzioni JNI.\n -Xcomp Forza la compilazione dei metodi al primo richiamo.\n -Xdebug Fornito per la compatibilit\u00E0 con le versioni precedenti.\n -Xdiag Mostra ulteriori messaggi diagnostici.\n -Xfuture Abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future.\n -Xint Esecuzione solo in modalit\u00E0 convertita.\n -Xinternalversion\n Visualizza informazioni pi\u00F9 dettagliate sulla versione JVM rispetto\n all''opzione -version.\n -Xloggc: Registra lo stato GC in un file con indicatori orari.\n -Xmixed Esecuzione in modalit\u00E0 mista (impostazione predefinita).\n -Xmn Imposta le dimensioni iniziale e massima (in byte) dell''heap\n per la young generation (nursery).\n -Xms Imposta la dimensione heap Java iniziale.\n -Xmx Imposta la dimensione heap Java massima.\n -Xnoclassgc Disabilta la garbage collection della classe.\n -Xprof Visualizza i dati di profilo della CPU (non pi\u00F9 valida).\n -Xrs Riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione).\n -Xshare:auto Utilizza i dati di classe condivisi se possibile (impostazione predefinita).\n -Xshare:off Non tenta di utilizzare i dati di classe condivisi.\n -Xshare:on Richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n -XshowSettings Mostra tutte le impostazioni e continua.\n -XshowSettings:all\n Mostra tutte le impostazioni e continua.\n -XshowSettings:locale\n Mostra tutte le impostazioni correlate alle impostazioni nazionali e continua.\n -XshowSettings:properties\n Mostra tutte le impostazioni delle propriet\u00E0 e continua.\n -XshowSettings:vm Mostra tutte le impostazioni correlate alla VM e continua.\n -Xss Imposta la dimensione dello stack di thread Java.\n -Xverify Imposta la modalit\u00E0 del verificatore bytecode.\n --add-reads:=(,)*\n Aggiorna per leggere , indipendentemente\n dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n moduli senza nome.\n -add-exports:/=(,)*\n Aggiorna per esportare in ,\n indipendentemente dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n moduli senza nome.\n --add-opens /=(,)*\n Aggiorna per aprire in\n , indipendentemente dalla dichiarazione del modulo.\n --limit-modules [,...]\n Limita l''universo di moduli osservabili\n -patch-module =({0})*\n Sostituisce o migliora un modulo con \ +classi e risorse\n in file JAR o directory.\n --disable-@files Disabilita l''ulteriore espansione di file argomenti.\n\nQueste opzioni non standard sono soggette a modifiche senza preavviso.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nLe opzioni riportate di seguito sono specifiche del sistema operativo Mac OS X:\n -XstartOnFirstThread\n Esegue il metodo main() sul primo thread (AppKit).\n -Xdock:name=\n Sostituisce il nome applicazione predefinito visualizzato nel dock\n -Xdock:icon=\n Sostituisce l'icona predefinita visualizzata nel dock\n\n -java.launcher.cls.error1=Errore: impossibile trovare o caricare la classe principale {0} +java.launcher.cls.error1=Errore: impossibile trovare o caricare la classe principale {0}\nCausato da: {1}: {2} java.launcher.cls.error2=Errore: il metodo principale non \u00E8 {0} nella classe {1}. Definire il metodo principale come:\n public static void main(String[] args) java.launcher.cls.error3=Errore: il metodo principale deve restituire un valore di tipo void nella classe {0}. \nDefinire il metodo principale come:\n public static void main(String[] args) java.launcher.cls.error4=Errore: il metodo principale non \u00E8 stato trovato nella classe {0}. Definire il metodo principale come:\n public static void main(String[] args)\naltrimenti una classe applicazione JavaFX deve estendere {1} java.launcher.cls.error5=Errore: non sono presenti i componenti runtime di JavaFX necessari per eseguire questa applicazione +java.launcher.cls.error6=Errore: LinkageError durante il caricamento della classe principale {0}\n\t{1} java.launcher.jar.error1=Errore: si \u00E8 verificato un errore imprevisto durante il tentativo di aprire il file {0} java.launcher.jar.error2=manifest non trovato in {0} java.launcher.jar.error3=nessun attributo manifest principale in {0} +java.launcher.jar.error4=errore durante il caricamento dell''agente java in {0} java.launcher.init.error=errore di inizializzazione java.launcher.javafx.error1=Errore: il metodo JavaFX launchApplication dispone di una firma errata, \nla firma deve essere dichiarata static e restituire un valore di tipo void java.launcher.module.error1=il modulo {0} non dispone di un attributo MainClass. Utilizzare -m / java.launcher.module.error2=Errore: impossibile trovare o caricare la classe principale {0} nel modulo {1} +java.launcher.module.error3=Errore: impossibile caricare la classe principale {0} dal modulo {1}\n\t{2} +java.launcher.module.error4={0} non trovato diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties index 996a8065a87..b8ef45ac9c4 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties @@ -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 @@ -24,36 +24,37 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = \u4F7F\u7528\u65B9\u6CD5: {0} [options] class [args...]\n (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -jar jarfile [args...]\n (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -p -m [/] [args...]\n (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n +java.launcher.opt.header = \u4F7F\u7528\u65B9\u6CD5: {0} [options] [args...]\n (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -jar [args...]\n (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n\n \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9-jar \u3001-m\u307E\u305F\u306F--module\n /\u306B\u7D9A\u304F\u5F15\u6570\u306F\u3001\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3078\u306E\u5F15\u6570\u3068\u3057\u3066\u6E21\u3055\u308C\u307E\u3059\u3002\n\n \u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\n java.launcher.opt.datamodel =\ -d{0}\t \u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u4E88\u5B9A\u3067\u3059\n java.launcher.opt.vmselect =\ {0}\t "{1}" VM\u3092\u9078\u629E\u3059\u308B\u5834\u5408\n java.launcher.opt.hotspot =\ {0}\t \u306F"{1}" VM\u306E\u30B7\u30CE\u30CB\u30E0\u3067\u3059 [\u975E\u63A8\u5968]\n -java.launcher.ergo.message1 =\ \u30C7\u30D5\u30A9\u30EB\u30C8VM\u306F{0}\u3067\u3059 -java.launcher.ergo.message2 =\ \u3053\u308C\u306F\u30B5\u30FC\u30D0\u30FC\u30AF\u30E9\u30B9\u306E\u30DE\u30B7\u30F3\u3067\u5B9F\u884C\u3057\u3066\u3044\u308B\u305F\u3081\u3067\u3059\u3002\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer = \ -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n {0}\u533A\u5207\u308A\u30EA\u30B9\u30C8(\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u3001\n ZIP\u30A2\u30FC\u30AB\u30A4\u30D6)\u3067\u3001\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u7D22\u7528\u3002\n -p \n --module-path ...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n \u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n --upgrade-module-path ...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n \u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u5185\u306E\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n --add-modules [,...]\n \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n \u306B\u306F\u6B21\u3082\u6307\u5B9A\u3067\u304D\u307E\u3059: ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH.\n --list-modules\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30EA\u30B9\u30C8\u3057\u7D42\u4E86\u3057\u307E\u3059\n --d \n --describe-module \n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u8AAC\u660E\u3057\u7D42\u4E86\u3057\u307E\u3059\n --dry-run VM\u3092\u4F5C\u6210\u3057\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u307E\u305B\u3093\u3002\n --dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u8A3C\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\u30B3\u30DE\u30F3\u30C9\u884C\u30AA\u30D7\u30B7\u30E7\u30F3\u3002\n --validate-modules\n \u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u691C\u8A3C\u3057\u7D42\u4E86\u3057\u307E\u3059\n --validate-modules\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u7D22\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u4E0A\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u306E\u7AF6\u5408\u304A\u3088\u3073\u305D\u306E\u4ED6\u306E\u30A8\u30E9\u30FC\u3002\n -D=\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n -verbose:[class|module|gc|jni]\n \u8A73\u7D30\u51FA\u529B\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n -version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n --version \ +\u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n -showversion \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n --show-version\n \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n --show-module-resolution\n \u8D77\u52D5\u6642\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u89E3\u6C7A\u51FA\u529B\u3092\u8868\u793A\u3057\u307E\u3059\n -? -h -help\n \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n --help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n -X \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n --help-extra \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n -ea[:...|:]\n -enableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n -da[:...|:]\n -disableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n -esa | -enablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n -dsa | -disablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n -agentlib:[=]\n \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\u4F8B: -agentlib:jdwp\n -agentlib:jdwp=help\u3082\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n -agentpath:[=]\n \u30D5\u30EB\u30D1\u30B9\u540D\u3092\u4F7F\u7528\u3057\u3066\u3001\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\n -javaagent:[=]\n Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002java.lang.instrument\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n -splash:\n \u6307\u5B9A\u3055\u308C\u305F\u30A4\u30E1\u30FC\u30B8\u3092\u542B\u3080\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3057\u307E\u3059\n HiDPI\u30B9\u30B1\u30FC\u30EB\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\n (\u53EF\u80FD\u306A\u5834\u5408)\u3002\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3055\u308C\u306A\u3044\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D(image.ext\u306A\u3069)\u3092\n \u5F15\u6570\u3068\u3057\u3066-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5FC5\u305A\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n \ +\u6307\u5B9A\u3055\u308C\u305F\u6700\u3082\u9069\u5207\u306A\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u6E08\u30A4\u30E1\u30FC\u30B8\u304C\u9078\u629E\u3055\u308C\u307E\u3059\n (\u81EA\u52D5\u7684)\u3002\n \u8A73\u7D30\u306F\u3001SplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n @argument\u30D5\u30A1\u30A4\u30EB\n \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u542B\u30801\u3064\u4EE5\u4E0A\u306E\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\n -disable-@files\n \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n\u9577\u3044\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u5834\u5408\u3001--=\u307E\u305F\u306F\n-- \u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001\n JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u304A\u3088\u3073ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\n -p <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>\n --module-path <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n --upgrade-module-path <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n \u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u3067\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\n \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n -m [/]\n --module [/]\n \u89E3\u6C7A\u3059\u308B\u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u304A\u3088\u3073\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306B\n \u5B9F\u884C\u3059\u308B\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u306E\u540D\u524D\n --add-modules [,...]\n \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n \u306FALL-DEFAULT\u3001ALL-SYSTEM\u3001ALL-MODULE-PATH\n \u306B\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002\n --limit-modules [,...]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3059\u308B\n --list-modules [[,...]]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u4E00\u89A7\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n --dry-run VM\u3092\u4F5C\u6210\u3059\u308B\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u306A\u3044\u3002\n \u3053\u306E--dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\n \u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u691C\u8A3C\u3059\u308B\u5834\u5408\u306B\u4FBF\u5229\u3067\u3059\u3002\n -D=\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3059\u308B\n -verbose:[class|gc|jni]\n \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n -version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n -showversion \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n -? -help --help\n \ -\u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B\n -X \u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3059\u308B\n -ea[:...|:]\n -enableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -da[:...|:]\n -disableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -esa | -enablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -dsa | -disablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -agentlib:[=]\n \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002\u4F8B: -agentlib:jdwp\n -agentlib:jdwp=help\u3082\u53C2\u7167\n -agentpath:[=]\n \u30D5\u30EB\u30D1\u30B9\u540D\u3067\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\n -javaagent:[=]\n Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002java.lang.instrument\u3092\u53C2\u7167\n -splash:\n \u6307\u5B9A\u3057\u305F\u30A4\u30E1\u30FC\u30B8\u3067\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3059\u308B\n \u53EF\u80FD\u3067\u3042\u308C\u3070\u3001HiDPI\u30B9\u30B1\u30FC\u30EB\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n \u30B9\u30B1\u30FC\u30EB\u306A\u3057\u306E\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D(image.ext\u306A\u3069)\u306F\u3001\n \u5E38\u306B-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u3068\u3057\u3066\u6E21\u3055\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n \u6307\u5B9A\u3055\u308C\u305F\u6700\u9069\u306A\u30B9\u30B1\u30FC\u30EB\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\n \u9078\u629E\u3055\u308C\u307E\u3059\u3002\n \u8A73\u7D30\u306FSplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n @ \u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\n\u9577\u3044\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u5834\u5408\u3001--=\u307E\u305F\u306F\n-- \u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n -See \u8A73\u7D30\u306F\u3001http://www.oracle.com/technetwork/java/javase/documentation/index.html\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002 - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n -Xcheck:jni JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n -Xcomp \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3059\u308B\n -Xdebug \u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u63D0\u4F9B\n -Xdiag \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xdiag:resolver \u30EA\u30BE\u30EB\u30D0\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xfuture \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n -Xint \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n -Xinternalversion\n -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n \u8868\u793A\u3059\u308B\n -Xloggc: \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n -Xmixed \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xmn \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA(\u30D0\u30A4\u30C8\u5358\u4F4D)\n \u3092\u8A2D\u5B9A\u3059\u308B\n -Xms Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xmx Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xnoclassgc \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xprof CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n -Xrs Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n -Xshare:auto \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xshare:off \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n -Xshare:on \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n -XshowSettings \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:all\n \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:locale\n \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:properties\n \ -\u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -Xss Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xverify \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u691C\u8A3C\u6A5F\u80FD\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3059\u308B\n --add-reads =(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\n \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u8AAD\u307F\u53D6\u308C\u307E\u3059\u3002\n --add-exports /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n --disable-@files \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3059\u308B\n --patch-module =({0})*\n JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\n \u62E1\u5F35\u3057\u307E\u3059\u3002\n\n\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n +java.launcher.X.usage=\n -Xbatch \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n -Xcheck:jni JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n -Xcomp \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3059\u308B\n -Xdebug \u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u63D0\u4F9B\n -Xdiag \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xfuture \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n -Xint \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n -Xinternalversion\n -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n \u8868\u793A\u3059\u308B\n -Xloggc: \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n -Xmixed \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xmn \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA(\u30D0\u30A4\u30C8\u5358\u4F4D)\n \u3092\u8A2D\u5B9A\u3059\u308B\n -Xms Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xmx Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xnoclassgc \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xprof CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n -Xrs Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n -Xshare:auto \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xshare:off \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n -Xshare:on \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n -XshowSettings \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:all\n \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:locale\n \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:properties\n \u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n \ +-Xss Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xverify \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u691C\u8A3C\u6A5F\u80FD\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3059\u308B\n --add-reads =(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\n \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u8AAD\u307F\u53D6\u308C\u307E\u3059\u3002\n --add-exports /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n --add-opens /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\n \u3092\u306B\u958B\u304D\u307E\u3059\u3002\n --limit-modules [,...]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3057\u307E\u3059\n --patch-module =({0})*\n JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3057\u307E\u3059\n --disable-@files \u3055\u3089\u306A\u308B\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n\n\u3053\u308C\u3089\u306E\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u4E88\u544A\u306A\u304F\u5909\u66F4\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\u6B21\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306FMac OS X\u56FA\u6709\u3067\u3059:\n -XstartOnFirstThread\n main()\u30E1\u30BD\u30C3\u30C9\u3092\u6700\u521D(AppKit)\u306E\u30B9\u30EC\u30C3\u30C9\u3067\u5B9F\u884C\u3059\u308B\n -Xdock:name=\n Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n -Xdock:icon=\n Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30A4\u30B3\u30F3\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\n -java.launcher.cls.error1=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u3089\u306A\u304B\u3063\u305F\u304B\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F +java.launcher.cls.error1=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u3092\u691C\u51FA\u304A\u3088\u3073\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\n\u539F\u56E0: {1}: {2} java.launcher.cls.error2=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u30AF\u30E9\u30B9{1}\u306E{0}\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n public static void main(String[] args) java.launcher.cls.error3=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u30AF\u30E9\u30B9{0}\u306Evoid\u578B\u306E\u5024\u3092\u8FD4\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\u6B21\u306E\u3088\u3046\u306B\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n public static void main(String[] args) java.launcher.cls.error4=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u30AF\u30E9\u30B9{0}\u3067\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n public static void main(String[] args)\n\u307E\u305F\u306FJavaFX\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30AF\u30E9\u30B9\u306F{1}\u3092\u62E1\u5F35\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 java.launcher.cls.error5=\u30A8\u30E9\u30FC: JavaFX\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u4E0D\u8DB3\u3057\u3066\u304A\u308A\u3001\u3053\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u5B9F\u884C\u306B\u5FC5\u8981\u3067\u3059 +java.launcher.cls.error6=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306BLinkageError\u304C\u767A\u751F\u3057\u307E\u3057\u305F\n\t{1} java.launcher.jar.error1=\u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB{0}\u3092\u958B\u3053\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u3001\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F java.launcher.jar.error2={0}\u306B\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 java.launcher.jar.error3={0}\u306B\u30E1\u30A4\u30F3\u30FB\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093 +java.launcher.jar.error4={0}\u5185\u306EJava\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F java.launcher.init.error=\u521D\u671F\u5316\u30A8\u30E9\u30FC java.launcher.javafx.error1=\u30A8\u30E9\u30FC: JavaFX launchApplication\u30E1\u30BD\u30C3\u30C9\u306B\u8AA4\u3063\u305F\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u3042\u308A\u3001\nstatic\u3092\u5BA3\u8A00\u3057\u3066void\u578B\u306E\u5024\u3092\u8FD4\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 java.launcher.module.error1=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306BMainClass\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002-m /\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044 java.launcher.module.error2=\u30A8\u30E9\u30FC: \u30E2\u30B8\u30E5\u30FC\u30EB{1}\u306B\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u3089\u306A\u304B\u3063\u305F\u304B\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F +java.launcher.module.error3=\u30A8\u30E9\u30FC: \u30E2\u30B8\u30E5\u30FC\u30EB{1}\u304B\u3089\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u306E\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\n\t{2} +java.launcher.module.error4={0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties index a734e614e2a..5ee8ae9c2b1 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties @@ -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 @@ -24,36 +24,36 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = \uC0AC\uC6A9\uBC95: {0} [options] class [args...]\n (\uD074\uB798\uC2A4 \uC2E4\uD589)\n \uB610\uB294 {0} [options] -jar jarfile [args...]\n (jar \uD30C\uC77C \uC2E4\uD589)\n \uB610\uB294 {0} [options] -p -m [/] [args...]\n (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\uC5EC\uAE30\uC11C options\uB294 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4.\n +java.launcher.opt.header = \uC0AC\uC6A9\uBC95: {0} [\uC635\uC158] <\uAE30\uBCF8 \uD074\uB798\uC2A4> [args...]\n (\uD074\uB798\uC2A4 \uC2E4\uD589)\n \uB610\uB294 {0} [\uC635\uC158] -jar [args...]\n (jar \uD30C\uC77C \uC2E4\uD589)\n \uB610\uB294 {0} [\uC635\uC158] -m <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>] [args...]\n {0} [\uC635\uC158] --module <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>] [args...]\n (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\n \uAE30\uBCF8 \uD074\uB798\uC2A4, -jar , -m \uB610\uB294 --module\n <\uBAA8\uB4C8>/<\uAE30\uBCF8 \uD074\uB798\uC2A4> \uB4A4\uC5D0 \uB098\uC624\uB294 \uC778\uC218\uB294 \uAE30\uBCF8 \uD074\uB798\uC2A4\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB429\uB2C8\uB2E4.\n\n \uC774 \uACBD\uC6B0 \uC635\uC158\uC5D0\uB294 \uB2E4\uC74C\uC774 \uD3EC\uD568\uB429\uB2C8\uB2E4.\n\n java.launcher.opt.datamodel =\ -d{0}\t \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C. \uC774\uD6C4 \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC81C\uAC70\uB429\uB2C8\uB2E4.\n java.launcher.opt.vmselect =\ {0}\t "{1}" VM\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4.\n java.launcher.opt.hotspot =\ {0}\t "{1}" VM\uC758 \uB3D9\uC758\uC5B4\uC785\uB2C8\uB2E4[\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C].\n -java.launcher.ergo.message1 =\ \uAE30\uBCF8 VM\uC740 {0}\uC785\uB2C8\uB2E4. -java.launcher.ergo.message2 =\ \uC11C\uBC84\uAE09 \uC2DC\uC2A4\uD15C\uC5D0\uC11C \uC2E4\uD589 \uC911\uC774\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer = \ -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n --class-path <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD558\uAE30 \uC704\uD55C \uB514\uB809\uD1A0\uB9AC, JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C\uC758 {0}(\uC73C)\uB85C\n \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n -p <\uBAA8\uB4C8 \uACBD\uB85C>\n --module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n \uB514\uB809\uD1A0\uB9AC\uC758 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n --upgrade-module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n \uB514\uB809\uD1A0\uB9AC\uC758 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD558\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n --add-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uCD08\uAE30 \uBAA8\uB4C8 \uC774\uC678\uC758 \uD574\uACB0\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n <\uBAA8\uB4C8 \uC774\uB984>\uC740 ALL-DEFAULT, ALL-SYSTEM\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n ALL-MODULE-PATH.\n --list-modules\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --d <\uBAA8\uB4C8 \uC774\uB984>\n --describe-module <\uBAA8\uB4C8 \uC774\uB984>\n \uBAA8\uB4C8\uC744 \uC124\uBA85\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --dry-run VM\uC744 \uC0DD\uC131\uD558\uACE0 \uAE30\uBCF8 \uD074\uB798\uC2A4\uB97C \uB85C\uB4DC\uD558\uC9C0\uB9CC \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD558\uC9C0\uB294 \uC54A\uC2B5\uB2C8\uB2E4.\n --dry-run \uC635\uC158\uC740 \uBAA8\uB4C8 \uC2DC\uC2A4\uD15C \uAD6C\uC131\uACFC \uAC19\uC740\n \uBA85\uB839\uC904 \uC635\uC158 \uAC80\uC99D\uC5D0 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --validate-modules\n \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uAC80\uC99D\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --validate-modules \uC635\uC158\uC740 \uBAA8\uB4C8 \uACBD\uB85C\uC5D0\uC11C \uBAA8\uB4C8\uC5D0 \uB300\uD55C\n \uCDA9\uB3CC \uBC0F \uAE30\uD0C0 \uC624\uB958\uB97C \uCC3E\uB294 \uB370 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n -D<\uC774\uB984>=<\uAC12>\n \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n -verbose:[class|module|gc|jni]\n \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\n -version \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --version \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n -showversion \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n --show-version\n \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n --show-module-resolution\n \uC2DC\uC791 \uC911 \uBAA8\uB4C8 \uBD84\uC11D \uCD9C\uB825\uC744 \ +\uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -? -h -help\n \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n --help \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -X \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n --help-extra \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -ea[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -enableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -da[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -disableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -esa | -enablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -dsa | -disablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -agentlib:<\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>[=<\uC635\uC158>]\n \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp).\n -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -agentpath:<\uACBD\uB85C \uC774\uB984>[=<\uC635\uC158>]\n \uC804\uCCB4 \uACBD\uB85C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n -javaagent:[=<\uC635\uC158>]\n Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -splash:<\uC774\uBBF8\uC9C0 \uACBD\uB85C>\n \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n HiDPI\uB85C \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uC9C0\uC6D0\uB418\uACE0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uACBD\uC6B0\n \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uBBF8\uC870\uC815 \uC774\uBBF8\uC9C0 \uD30C\uC77C \uC774\uB984(\uC608: image.ext)\uC740\n \uD56D\uC0C1 -splash \uC635\uC158\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.\n \uAC00\uC7A5 \uC801\uC808\uD788 \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C\n \uCC44\uD0DD\uB429\uB2C8\uB2E4.\n \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 SplashScreen API \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n @\uC778\uC218 \uD30C\uC77C\n -disable-@files \uC635\uC158\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294 \uD558\uB098 \uC774\uC0C1\uC758\n \uC778\uC218 \uD30C\uC77C\n \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uBC29\uC9C0\uD569\uB2C8\uB2E4.\nlong \uC635\uC158\uC5D0 \uB300\uD55C \uC778\uC218\uB97C \uC9C0\uC815\uD558\uB824\uBA74 --<\uC774\uB984>=<\uAC12> \uB610\uB294\n--<\uC774\uB984> <\uAC12>\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n --class-path <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD560 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC,\n JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n -p <\uBAA8\uB4C8 \uACBD\uB85C>\n --module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n --upgrade-module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uB85C, \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC\n \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD569\uB2C8\uB2E4.\n -m <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>]\n --module <\uBAA8\uB4C8 \uC774\uB984>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>]\n \uBD84\uC11D\uD560 \uCD08\uAE30 \uBAA8\uB4C8 \uBC0F \uBAA8\uB4C8\uC5D0\uC11C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uACBD\uC6B0 \uC2E4\uD589\uD560\n \uAE30\uBCF8 \uD074\uB798\uC2A4\uC758 \uC774\uB984\uC785\uB2C8\uB2E4.\n --add-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uCD08\uAE30 \uBAA8\uB4C8 \uC678\uC5D0 \uBD84\uC11D\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n <\uBAA8\uB4C8 \uC774\uB984>\uC740 ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH\uC77C \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.\n --limit-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC758 \uBC94\uC704\uB97C \uC81C\uD55C\uD569\uB2C8\uB2E4.\n --list-modules [<\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]]\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --dry-run VM\uC744 \uC0DD\uC131\uD558\uC9C0\uB9CC \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n \uC774 --dry-run \uC635\uC158\uC740 \uBAA8\uB4C8 \uC2DC\uC2A4\uD15C \uAD6C\uC131\uACFC \uAC19\uC740 \uBA85\uB839\uD589\n \uC635\uC158\uC744 \uAC80\uC99D\uD558\uB294 \uB370 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n -D<\uC774\uB984>=<\uAC12>\n \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n -verbose:[class|gc|jni]\n \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -version \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n -showversion \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -? -help --help\n \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -X \uBE44\uD45C\uC900 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -ea[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -enableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \ -\uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -da[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -disableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -esa | -enablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -dsa | -disablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -agentlib:<\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>[=<\uC635\uC158>]\n \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp).\n -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -agentpath:<\uACBD\uB85C \uC774\uB984>[=<\uC635\uC158>]\n \uC804\uCCB4 \uACBD\uB85C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n -javaagent:[=<\uC635\uC158>]\n Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -splash:<\uC774\uBBF8\uC9C0 \uACBD\uB85C>\n \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n HiDPI\uB85C \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uC9C0\uC6D0\uB418\uACE0 \uAC00\uB2A5\uD55C \uACBD\uC6B0\n \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uBBF8\uC870\uC815 \uC774\uBBF8\uC9C0 \uD30C\uC77C \uC774\uB984(\uC608: image.ext)\uC740\n \uD56D\uC0C1 -splash \uC635\uC158\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.\n \uAC00\uC7A5 \uC801\uC808\uD788 \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uCC44\uD0DD\uB429\uB2C8\uB2E4.\n \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 SplashScreen API \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n @<\uD30C\uC77C \uACBD\uB85C> \uC9C0\uC815\uB41C \uD30C\uC77C\uC5D0\uC11C \uC635\uC158\uC744 \uC77D\uC2B5\uB2C8\uB2E4.\nlong \uC635\uC158\uC5D0 \uB300\uD55C \uC778\uC218\uB97C \uC9C0\uC815\uD558\uB824\uBA74 --<\uC774\uB984>=<\uAC12> \uB610\uB294 --<\uC774\uB984> <\uAC12>\uC744\n\uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n -See \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 http://www.oracle.com/technetwork/java/javase/documentation/index.html\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n -Xcheck:jni JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n -Xcomp \uCCAB\uBC88\uC9F8 \uD638\uCD9C\uC5D0\uC11C \uBA54\uC18C\uB4DC \uCEF4\uD30C\uC77C\uC744 \uAC15\uC81C\uD569\uB2C8\uB2E4.\n -Xdebug \uC5ED \uD638\uD658\uC131\uC744 \uC704\uD574 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n -Xdiag \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xdiag:resolver \uBD84\uC11D\uAE30 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xfuture \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xint \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xinternalversion\n -version \uC635\uC158\uBCF4\uB2E4 \uC0C1\uC138\uD55C JVM \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xloggc: \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n -Xmixed \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xmn \uC80A\uC740 \uC138\uB300(Nursery)\uB97C \uC704\uD574 \uD799\uC758 \uCD08\uAE30 \uBC0F \uCD5C\uB300\n \uD06C\uAE30(\uBC14\uC774\uD2B8)\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xms \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xmx \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xnoclassgc \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xprof CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4.\n -Xrs Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n -Xshare:auto \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xshare:off \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -Xshare:on \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n -XshowSettings \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:all\n \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:locale\n \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:properties\n \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -Xss Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \ -\uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xverify \uBC14\uC774\uD2B8\uCF54\uB4DC \uAC80\uC99D\uC790\uC758 \uBAA8\uB4DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n --add-reads =(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uC744 \uC77D\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n \uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uC77D\uC744 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --add-exports /=(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uB97C \uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n \uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD560 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --disable-@files \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n --patch-module =({0})*\n JAR \uD30C\uC77C/\uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n \uBAA8\uB4C8\uC744 \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n\n\uC774 \uC635\uC158\uC740 \uBE44\uD45C\uC900 \uC635\uC158\uC774\uBBC0\uB85C \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n +java.launcher.X.usage=\n -Xbatch \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n -Xcheck:jni JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n -Xcomp \uCCAB\uBC88\uC9F8 \uD638\uCD9C\uC5D0\uC11C \uBA54\uC18C\uB4DC \uCEF4\uD30C\uC77C\uC744 \uAC15\uC81C\uD569\uB2C8\uB2E4.\n -Xdebug \uC5ED \uD638\uD658\uC131\uC744 \uC704\uD574 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n -Xdiag \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xfuture \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xint \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xinternalversion\n -version \uC635\uC158\uBCF4\uB2E4 \uC0C1\uC138\uD55C JVM \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xloggc:<\uD30C\uC77C> \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n -Xmixed \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xmn<\uD06C\uAE30> \uC80A\uC740 \uC138\uB300(Nursery)\uB97C \uC704\uD574 \uD799\uC758 \uCD08\uAE30 \uBC0F \uCD5C\uB300\n \uD06C\uAE30(\uBC14\uC774\uD2B8)\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xms<\uD06C\uAE30> \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xmx<\uD06C\uAE30> \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xnoclassgc \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xprof CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4(\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C).\n -Xrs Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n -Xshare:auto \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xshare:off \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -Xshare:on \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n -XshowSettings \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:all\n \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:locale\n \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:properties\n \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -Xss<\uD06C\uAE30> Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xverify \uBC14\uC774\uD2B8\uCF54\uB4DC \uAC80\uC99D\uC790\uC758 \uBAA8\uB4DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n \ + --add-reads <\uBAA8\uB4C8>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uB300\uC0C1-\uBAA8\uB4C8>\uC744 \uC77D\uB3C4\uB85D\n <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n <\uB300\uC0C1-\uBAA8\uB4C8>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uC77D\uC744 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --add-exports <\uBAA8\uB4C8>/<\uD328\uD0A4\uC9C0>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uD328\uD0A4\uC9C0>\uB97C <\uB300\uC0C1-\uBAA8\uB4C8>\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n <\uB300\uC0C1-\uBAA8\uB4C8>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD560 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --add-opens <\uBAA8\uB4C8>/<\uD328\uD0A4\uC9C0>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uD328\uD0A4\uC9C0>\uB97C <\uB300\uC0C1-\uBAA8\uB4C8>\uB85C \uC5F4\uB3C4\uB85D\n <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n --limit-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC758 \uACF5\uC6A9\uC744 \uC81C\uD55C\uD569\uB2C8\uB2E4.\n --patch-module <\uBAA8\uB4C8>=<\uD30C\uC77C>({0}<\uD30C\uC77C>)*\n JAR \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n \uBAA8\uB4C8\uC744 \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n --disable-@files \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n\n\uC774\uB7EC\uD55C \uCD94\uAC00 \uC635\uC158\uC740 \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\uB2E4\uC74C\uC740 Mac OS X\uC5D0 \uD2B9\uC815\uB41C \uC635\uC158\uC785\uB2C8\uB2E4.\n -XstartOnFirstThread\n \uCCAB\uBC88\uC9F8 (AppKit) \uC2A4\uB808\uB4DC\uC5D0 main() \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xdock:name=\n \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC774\uB984\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n -Xdock:icon=\n \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC544\uC774\uCF58\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n\n -java.launcher.cls.error1=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uAC70\uB098 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +java.launcher.cls.error1=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uAC70\uB098 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC6D0\uC778: {1}: {2} java.launcher.cls.error2=\uC624\uB958: {1} \uD074\uB798\uC2A4\uC5D0\uC11C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uAC00 {0}\uC774(\uAC00) \uC544\uB2D9\uB2C8\uB2E4. \uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\n public static void main(String[] args) java.launcher.cls.error3=\uC624\uB958: \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB294 {0} \uD074\uB798\uC2A4\uC5D0\uC11C void \uC720\uD615\uC758 \uAC12\uC744 \uBC18\uD658\uD574\uC57C \uD569\uB2C8\uB2E4. \n\uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\n public static void main(String[] args) java.launcher.cls.error4=\uC624\uB958: {0} \uD074\uB798\uC2A4\uC5D0\uC11C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\r\n public static void main(String[] args)\r\n\uB610\uB294 JavaFX \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uD074\uB798\uC2A4\uB294 {1}\uC744(\uB97C) \uD655\uC7A5\uD574\uC57C \uD569\uB2C8\uB2E4. java.launcher.cls.error5=\uC624\uB958: \uC774 \uC560\uD50C\uB9AC\uCF00\uC774\uC158\uC744 \uC2E4\uD589\uD558\uB294 \uB370 \uD544\uC694\uD55C JavaFX \uB7F0\uD0C0\uC784 \uAD6C\uC131 \uC694\uC18C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +java.launcher.cls.error6=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uB85C\uB4DC\uD558\uB294 \uC911 LinkageError\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n\t{1} java.launcher.jar.error1=\uC624\uB958: {0} \uD30C\uC77C\uC744 \uC5F4\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. java.launcher.jar.error2={0}\uC5D0\uC11C Manifest\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. java.launcher.jar.error3={0}\uC5D0 \uAE30\uBCF8 Manifest \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +java.launcher.jar.error4={0}\uC5D0\uC11C Java \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. java.launcher.init.error=\uCD08\uAE30\uD654 \uC624\uB958 java.launcher.javafx.error1=\uC624\uB958: JavaFX launchApplication \uBA54\uC18C\uB4DC\uC5D0 \uC798\uBABB\uB41C \uC11C\uBA85\uC774 \uC788\uC2B5\uB2C8\uB2E4.\\n\uB530\uB77C\uC11C static\uC73C\uB85C \uC120\uC5B8\uD558\uACE0 void \uC720\uD615\uC758 \uAC12\uC744 \uBC18\uD658\uD574\uC57C \uD569\uB2C8\uB2E4. java.launcher.module.error1={0} \uBAA8\uB4C8\uC5D0 MainClass \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. -m /\uB97C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624. java.launcher.module.error2=\uC624\uB958: {1} \uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uAC70\uB098 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +java.launcher.module.error3=\uC624\uB958: {1} \uBAA8\uB4C8\uC5D0\uC11C \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\t{2} +java.launcher.module.error4={0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties index 1d8421df7a8..cfe8507e56a 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties @@ -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 @@ -24,35 +24,36 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Uso: {0} [options] class [args...]\n (para executar uma classe)\n ou {0} [options] -jar jarfile [args...]\n (para executar um arquivo jar)\n or {0} [options] -p -m [/] [args...]\n (para executar a classe principal em um m\u00F3dulo)\nem que as op\u00E7\u00F5es incluem:\n +java.launcher.opt.header = Uso: {0} [options] [args...]\n (para executar uma classe)\n ou {0} [options] -jar [args...]\n (para executar um arquivo jar)\n ou {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (para executar a classe principal em um m\u00F3dulo)\n\n Os argumentos ap\u00F3s a classe principal, -jar , -m ou --module\n / s\u00E3o especificados como os argumentos para a classe principal.\n\n em que as op\u00E7\u00F5es incluem:\n\n java.launcher.opt.datamodel =\ -d{0}\t Obsoleto, ser\u00E1 removido em uma futura release\n java.launcher.opt.vmselect =\ {0}\t para selecionar a VM "{1}"\n java.launcher.opt.hotspot =\ {0}\t \u00E9 um sin\u00F4nimo da VM "{1}" [obsoleto]\n -java.launcher.ergo.message1 =\ A VM padr\u00E3o \u00E9 {0} -java.launcher.ergo.message2 =\ porque a execu\u00E7\u00E3o est\u00E1 sendo feita em uma m\u00E1quina de classe de servidor.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n e arquivos compactados ZIP para procurar arquivos de classe.\n -p \n --module-path ...\n Uma lista separada por {0} de diret\u00F3rios, cada um\n sendo um diret\u00F3rio de m\u00F3dulos.\n --upgrade-module-path ...\n Uma lista separada por {0} de diret\u00F3rios, cada um\n sendo um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos\n pass\u00EDveis de upgrade na imagem de runtime\n --add-modules [,...]\n m\u00F3dulos-raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial.\n tamb\u00E9m pode ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n lista os m\u00F3dulos observ\u00E1veis e sai\n --d \n --describe-module \n descreve um m\u00F3dulo e sai\n --dry-run cria VM e carrega classe principal, mas n\u00E3o executa o m\u00E9todo principal.\n A op\u00E7\u00E3o --dry-run pode ser \u00FAtil para validar as\n op\u00E7\u00F5es de linha de comando como a configura\u00E7\u00E3o do sistema do m\u00F3dulo.\n --validate-modules\n valida todos os m\u00F3dulos e sai\n A op\u00E7\u00E3o --validate-modules pode ser \u00FAtil para localizar\n conflitos e outros erros com m\u00F3dulos no caminho do m\u00F3dulo.\n -D=\n define uma propriedade de sistema\n -verbose:[class|module|gc|jni]\n ativar sa\u00EDda verbosa\n -version imprime a vers\u00E3o do produto no fluxo de erros e sai\n -version imprime a vers\u00E3o do produto no fluxo de sa\u00EDda e sai\n -showversion imprime a vers\u00E3o do produto no fluxo de erros e continua\n --show-version\n imprime a vers\u00E3o do produto no fluxo de sa\u00EDda e continua\n --show-module-resolution\n mostra a sa\u00EDda da resolu\u00E7\u00E3o do m\u00F3dulo durante a inicializa\u00E7\u00E3o\n -? -h -help\n imprime esta mensagem de ajuda no fluxo de erros\n --help imprime esta mensagem de ajuda no fluxo de sa\u00EDda\n -X imprime ajuda sobre op\u00E7\u00F5es extras no fluxo de erros\n --help-extra imprime ajuda sobre op\u00E7\u00F5es extras no fluxo de sa\u00EDda\n -ea[:...|:]\n -enableassertions[:...|:]\n ativa asser\u00E7\u00F5es com granularidade especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desativa asser\u00E7\u00F5es com granularidade especificada\n -esa | -enablesystemassertions\n ativa asser\u00E7\u00F5es de sistema\n -dsa | -disablesystemassertions\n desativa asser\u00E7\u00F5es de sistema\n -agentlib:[=]\n carrega biblioteca de agente nativo , por exemplo, -agentlib:jdwp\n consulte tamb\u00E9m -agentlib:jdwp=help\n -agentpath:[=]\n carrega biblioteca de agente nativo por nome do caminho completo\n -javaagent:[=]\n carrega agente de linguagem de programa\u00E7\u00E3o Java, consulte java.lang.instrument\n -splash:\n \ +mostra a tela inicial com a imagem especificada\n Imagens HiDPI dimensionadas s\u00E3o suportadas automaticamente e utilizadas,\n se dispon\u00EDveis. O nome do arquivo de imagem n\u00E3o dimensionada, por exemplo, image.ext,\n deve ser informado sempre como argumento para a op\u00E7\u00E3o -splash.\n A imagem dimensionada mais apropriada fornecida ser\u00E1 selecionada\n automaticamente.\n Consulte a documenta\u00E7\u00E3o da API de Tela Inicial para obter mais informa\u00E7\u00F5es\n @arquivos de argumento\n Um ou mais arquivos de argumentos que cont\u00EAm op\u00E7\u00F5es\n -disable-@files\n impede expans\u00E3o adicional de arquivo de argumentos\nnPara especificar um argumento para uma op\u00E7\u00E3o longa, voc\u00EA pode usar --= ou\n-- .\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n e ZIP para pesquisa de arquivos de classe.\n -p \n --module-path ...\n Uma lista separada por {0} de diret\u00F3rios, cada um\n sendo um diret\u00F3rio de m\u00F3dulos.\n --upgrade-module-path ...\n Uma lista separada por {0} de diret\u00F3rios, cada um sendo\n um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos atualiz\u00E1veis\n por upgrade na imagem do runtime\n -m [/]\n --module [/]\n o m\u00F3dulo inicial a ser resolvido e o nome da classe principal\n a ser executada se o m\u00F3dulo n\u00E3o especificar\n --add-modules [,...]\n m\u00F3dulos-raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial.\n tamb\u00E9m pode ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules [,...]\n limitar o universo de m\u00F3dulos observ\u00E1veis\n --list-modules [[,...]]\n listar os m\u00F3dulos observ\u00E1veis e sair\n --dry-run criar VM, mas n\u00E3o executar o m\u00E9todo principal.\n Esta op\u00E7\u00E3o --dry-run pode ser \u00FAtil para validar as\n op\u00E7\u00F5es da linha de comando, como a configura\u00E7\u00E3o do sistema do m\u00F3dulo.\n -D=\n definir uma propriedade do sistema\n -verbose:[class|gc|jni]\n ativar sa\u00EDda detalhada\n -version imprimir vers\u00E3o do produto e sair\n -showversion imprimir vers\u00E3o do produto e continuar\n -? -help --help\n imprimir esta mensagem de ajuda\n -X imprimir a ajuda em op\u00E7\u00F5es n\u00E3o padr\u00E3o\n -ea[:...|:]\n -enableassertions[:...|:]\n ativar asser\u00E7\u00F5es com granularidade especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desativar asser\u00E7\u00F5es com granularidade especificada\n -esa | -enablesystemassertions\n ativar asser\u00E7\u00F5es do sistema\n -dsa | -disablesystemassertions\n desativar asser\u00E7\u00F5es do sistema\n -agentlib:[=]\n carregar biblioteca de agentes nativa ; por exemplo, -agentlib:jdwp\n consulte tamb\u00E9m -agentlib:jdwp=help\n -agentpath:[=]\n carregar biblioteca de agentes nativa por nome de caminho completo\n -javaagent:[=]\n carregar agente de linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n -splash:\n mostrar tela de abertura com imagem especificada\n Imagens HiDPI dimensionadas s\u00E3o suportadas automaticamente e utilizadas\n se dispon\u00EDveis. O nome do arquivo de imagem n\u00E3o dimensionada, por exemplo, image.ext,\n deve ser informado sempre como argumento para a op\u00E7\u00E3o -splash.\n A imagem dimensionada mais apropriada fornecida ser\u00E1 selecionada\n automaticamente.\n Consulte a documenta\u00E7\u00E3o da API de Tela de Abertura para obter mais \ -informa\u00E7\u00F5es.\n @ op\u00E7\u00F5es de leitura do arquivo especificado\nPara especificar um argumento para uma op\u00E7\u00E3o longa, voc\u00EA pode usar --= ou\n-- .\n -See http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch desativar compila\u00E7\u00E3o em segundo plano\n -Xbootclasspath/a:\n anexar ao final do caminho de classe bootstrap\n -Xcheck:jni executar verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es JNI\n -Xcomp for\u00E7a a compila\u00E7\u00E3o de m\u00E9todos na primeira chamada\n -Xdebug fornecido para fins de compatibilidade reversa\n -Xdiag mostrar mensagens de diagn\u00F3stico adicionais\n -Xdiag:resolver mostrar mensagens de diagn\u00F3stico do resolvedor\n -Xfuture ativar verifica\u00E7\u00F5es mais rigorosas, antecipando padr\u00E3o futuro\n -Xint somente execu\u00E7\u00E3o em modo interpretado\n -Xinternalversion\n exibe informa\u00E7\u00F5es mais detalhadas de vers\u00E3o da JVM do que a\n op\u00E7\u00E3o -version\n -Xloggc: registrar status de GC em um arquivo com time-stamps\n -Xmixed execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n -Xmn define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n para a gera\u00E7\u00E3o jovem (infantil)\n -Xms definir tamanho do heap Java inicial\n -Xmx definir tamanho do heap Java m\u00E1ximo\n -Xnoclassgc desativar coleta de lixo de classe\n -Xprof emitir dados de perfil de cpu\n -Xrs reduzir uso de sinais do SO por Java/VM (consultar documenta\u00E7\u00E3o)\n -Xshare:auto usar dados de classe compartilhados, se poss\u00EDvel (padr\u00E3o)\n -Xshare:off n\u00E3o tentar usar dados de classe compartilhados\n -Xshare:on exigir o uso de dados de classe compartilhados; caso contr\u00E1rio, falhar\u00E1.\n -XshowSettings mostrar todas as defini\u00E7\u00F5es e continuar\n -XshowSettings:all\n mostrar todas as defini\u00E7\u00F5es e continuar\n -XshowSettings:locale\n mostrar todas as defini\u00E7\u00F5es relativas a localidade e continuar\n -XshowSettings:properties\n mostrar todas as defini\u00E7\u00F5es de propriedade e continuar\n -XshowSettings:vm mostrar todas as defini\u00E7\u00F5es relativas a vm e continuar\n -Xss definir tamanho de pilha de thread java\n -Xverify define o modo do verificador de c\u00F3digo de byte\n --add-reads =(,)*\n atualiza para ler , independentemente\n da declara\u00E7\u00E3o do m\u00F3dulo. \n pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n sem nome.\n --add-exports /=(,)*\n atualiza para exportar para ,\n independentemente da declara\u00E7\u00E3o do m\u00F3dulo.\n pode ser ALL-UNNAMED para exportar para todos\n os m\u00F3dulos sem nome.\n --disable-@files desativar expans\u00E3o de arquivo de argumento adicional\n --patch-module =({0})*\n Substituir ou aumentar um m\u00F3dulo com classes e recursos\n em arquivo JAR ou diret\u00F3rios.\n\nEssas op\u00E7\u00F5es n\u00E3o s\u00E3o padr\u00E3o e est\u00E3o sujeitas a altera\u00E7\u00E3o sem aviso.\n +java.launcher.X.usage=\n -Xbatch desativa compila\u00E7\u00E3o em segundo plano\n -Xbootclasspath/a:\n anexa ao final do caminho de classe de bootstrap\n -Xcheck:jni executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es JNI\n -Xcomp for\u00E7a a compila\u00E7\u00E3o de m\u00E9todos na primeira chamada\n -Xdebug fornecido para compatibilidade reversa\n -Xdiag mostra mensagens adicionais de diagn\u00F3stico\n -Xfuture ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo, antecipando padr\u00E3o futuro\n -Xint somente execu\u00E7\u00E3o de modo interpretado\n -Xinternalversion\n exibe informa\u00E7\u00F5es mais detalhadas da vers\u00E3o da JVM do que a\n op\u00E7\u00E3o -version\n -Xloggc: registra status de GC em um arquivo com timestamps\n -Xmixed execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n -Xmn define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n para a gera\u00E7\u00E3o jovem (infantil)\n -Xms define tamanho inicial do heap Java\n -Xmx define tamanho m\u00E1ximo do heap Java\n -Xnoclassgc desativa coleta de lixo de classe\n -Xprof gera dados de perfil de cpu (obsoleto)\n -Xrs reduz uso de sinais do SO por Java/VM (ver documenta\u00E7\u00E3o)\n -Xshare:auto usa dados de classe compartilhados se poss\u00EDvel (padr\u00E3o)\n -Xshare:off n\u00E3o tenta usar dados de classe compartilhados\n -Xshare:on exige o uso de dados de classe compartilhados; caso contr\u00E1rio, falhar\u00E1.\n -XshowSettings mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:all\n mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:locale\n mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 configura\u00E7\u00E3o regional e continua\n -XshowSettings:properties\n mostra todas as defini\u00E7\u00F5es de propriedade e continua\n -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas a vm e continua\n -Xss define o tamanho da pilha de thread java\n -Xverify define o modo do verificador de c\u00F3digo de byte\n --add-reads =(,)*\n atualiza para ler , independentemente\n da declara\u00E7\u00E3o de m\u00F3dulo. \n pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n sem nome.\n --add-exports /=(,)*\n atualiza para exportar para ,\n independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n pode ser ALL-UNNAMED para exportar todos os\n m\u00F3dulos sem nome.\n --add-opens /=(,)*\n atualiza para abrir para\n , independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n --limit-modules [,...]\n limita o universo de m\u00F3dulos observ\u00E1veis\n--patch-module =({0})*\n substitui ou amplia um m\u00F3dulo com classes e recursos\n em arquivos ou \ +diret\u00F3rios JAR.\n\nEssas op\u00E7\u00F5es extras est\u00E3o sujeitas a altera\u00E7\u00E3o sem aviso.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nAs op\u00E7\u00F5es a seguir s\u00E3o espec\u00EDficas para o Mac OS X:\n -XstartOnFirstThread\n executa o m\u00E9todo main() no primeiro thread (AppKit)\n -Xdock:name=\n substitui o nome do aplicativo padr\u00E3o exibido no encaixe\n -Xdock:icon=\n substitui o \u00EDcone exibido no encaixe\n\n -java.launcher.cls.error1=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0} +java.launcher.cls.error1=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0}\nCausada por: {1}: {2} java.launcher.cls.error2=Erro: o m\u00E9todo main n\u00E3o \u00E9 {0} na classe {1}; defina o m\u00E9todo main como:\n public static void main(String[] args) java.launcher.cls.error3=Erro: o m\u00E9todo main deve retornar um valor do tipo void na classe {0}; \ndefina o m\u00E9todo main como:\n public static void main(String[] args) java.launcher.cls.error4=Erro: o m\u00E9todo main n\u00E3o foi encontrado na classe {0}; defina o m\u00E9todo main como:\n public static void main(String[] args)\nou uma classe de aplicativo JavaFX deve expandir {1} java.launcher.cls.error5=Erro: os componentes de runtime do JavaFX n\u00E3o foram encontrados. Eles s\u00E3o obrigat\u00F3rios para executar este aplicativo +java.launcher.cls.error6=Erro: ocorreu LinkageError ao carregar a classe principal {0}\n\t{1} java.launcher.jar.error1=Erro: ocorreu um erro inesperado ao tentar abrir o arquivo {0} java.launcher.jar.error2=manifesto n\u00E3o encontrado em {0} java.launcher.jar.error3=nenhum atributo de manifesto principal em {0} +java.launcher.jar.error4=erro ao carregar o agente java em {0} java.launcher.init.error=erro de inicializa\u00E7\u00E3o java.launcher.javafx.error1=Erro: O m\u00E9todo launchApplication do JavaFX tem a assinatura errada. Ele\\ndeve ser declarado como est\u00E1tico e retornar um valor do tipo void java.launcher.module.error1=o m\u00F3dulo {0} n\u00E3o tem um atributo MainClass, use -m / java.launcher.module.error2=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0} no m\u00F3dulo {1} +java.launcher.module.error3=Erro: N\u00E3o \u00E9 poss\u00EDvel carregar a classe principal {0} do m\u00F3dulo {1}\n\t{2} +java.launcher.module.error4={0} n\u00E3o encontrado. diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties index c456d6102bf..885602e9a26 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties @@ -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 @@ -24,35 +24,36 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Syntax: {0} [options] class [args...]\n (f\u00F6r att k\u00F6ra en klass)\n eller {0} [options] -jar jarfile [args...]\n (f\u00F6r att k\u00F6ra en jar-fil)\n eller {0} [options] -p -m [/] [args...]\n (f\u00F6r att k\u00F6ra huvudklassen i en modul)\nmed alternativen:\n +java.launcher.opt.header = Syntax: {0} [options] [args...]\n (f\u00F6r att k\u00F6ra en klass)\n eller {0} [options] -jar [args...]\n (f\u00F6r att k\u00F6ra en jar-fil)\n eller {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (f\u00F6r att k\u00F6ra huvudklassen i en modul)\n\n Argument som kommer efter huvudklassen, -jar , -m eller --module\n / \u00F6verf\u00F6rs som argument till huvudklassen.\n\n med alternativen:\n\n java.launcher.opt.datamodel =\ -d{0}\t Inaktuellt, tas bort i en framtida utg\u00E5va\n java.launcher.opt.vmselect =\ {0}\t f\u00F6r att v\u00E4lja "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t \u00E4r en synonym f\u00F6r "{1}" VM [inaktuell]\n -java.launcher.ergo.message1 =\ Standard-VM \u00E4r {0} -java.launcher.ergo.message2 =\ eftersom du k\u00F6r en serverklassmaskin.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, JAR-arkiv\n och ZIP-arkiv att s\u00F6ka efter klassfiler i.\n -p \n --module-path ...\n En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje katalog\n \u00E4r en katalog \u00F6ver moduler.\n --upgrade-module-path ...\n En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje katalog\n \u00E4r en katalog \u00F6ver moduler som ers\u00E4tter uppgraderingsbara\n moduler i exekveringsavbilden\n --add-modules [,...]\n rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen.\n kan \u00E4ven vara ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n visa observerbara moduler och avsluta\n --d \n --describe-module \n beskriv en modul och avsluta\n --dry-run skapa VM och ladda huvudklassen men k\u00F6r inte huvudmetoden.\n Alternativet --dry-run kan vara anv\u00E4ndbart f\u00F6r att validera\n kommandoradsalternativ, som modulsystemkonfigurationen.\n --validate-modules\n validera alla moduler och avsluta\n Alternativet --validate-modules kan vara anv\u00E4ndbart f\u00F6r att hitta\n konflikter och andra fel i modulerna p\u00E5 moduls\u00F6kv\u00E4gen.\n -D=\n ange en systemegenskap\n -verbose:[class|module|gc|jni]\n aktivera utf\u00F6rliga utdata\n -version skriv ut produktversion till felstr\u00F6mmen och avsluta\n --version skriv ut produktversion till utdatastr\u00F6mmen och avsluta\n -showversion skriv ut produktversion till felstr\u00F6mmen och forts\u00E4tt\n --show-version\n skriv ut produktversion till utdatastr\u00F6mmen och forts\u00E4tt\n --show-module-resolution\n visa modull\u00F6sningsutdata vid start\n -? -h -help\n skriv ut det h\u00E4r hj\u00E4lpmeddelandet till felstr\u00F6mmen\n --help skriv ut det h\u00E4r hj\u00E4lpmeddelandet till utdatastr\u00F6mmen\n -X skriv ut hj\u00E4lp f\u00F6r extraalternativ till felstr\u00F6mmen\n --help-extra skriv ut hj\u00E4lp f\u00F6r extraalternativ till utdatastr\u00F6mmen\n -ea[:...|:]\n -enableassertions[:...|:]\n aktivera verifieringar med den angivna detaljgraden\n -da[:...|:]\n -disableassertions[:...|:]\n avaktivera verifieringar med den angivna detaljgraden\n -esa | -enablesystemassertions\n aktivera systemverifieringar\n -dsa | -disablesystemassertions\n avaktivera systemverifieringar\n -agentlib:[=]\n ladda det ursprungliga agentbiblioteket , t.ex. -agentlib:jdwp\n se \u00E4ven -agentlib:jdwp=help\n -agentpath:[=]\n ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n -javaagent:[=]\n ladda Java-programmeringsspr\u00E5ksagenten, se java.lang.instrument\n -splash:\n visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n HiDPI-skal\u00E4ndrade bilder st\u00F6ds automatiskt och anv\u00E4nds om de \u00E4r\n \ + tillg\u00E4ngliga. Filnamnet p\u00E5 den oskal\u00E4ndrade bilden, t.ex. image.ext,\n ska alltid \u00F6verf\u00F6ras som argument till alternativet -splash.\n Den l\u00E4mpligaste skal\u00E4ndrade bilden v\u00E4ljs\n automatiskt.\n Mer information finns i dokumentationen f\u00F6r API:t SplashScreen\n @argument filer\n en eller flera argumentfiler som inneh\u00E5ller alternativ\n -disable-@files\n f\u00F6rhindra ytterligare ut\u00F6kning av argumentfiler\nOm du vill ange ett argument f\u00F6r ett l\u00E5ngt alternativ kan du anv\u00E4nda --= eller\n-- .\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n En lista \u00F6ver kataloger, JAR-arkiv och ZIP-arkiv att\n s\u00F6ka efter klassfiler i, avgr\u00E4nsad med {0}.\n -p \n --module-path ...\n En lista \u00F6ver kataloger, d\u00E4r varje katalog \u00E4r en katalog\n med moduler, avgr\u00E4nsad med {0}.\n --upgrade-module-path ...\n En lista \u00F6ver kataloger, d\u00E4r varje katalog \u00E4r en katalog\n med moduler som ers\u00E4tter uppgraderingsbara moduler\n i exekveringsavbilden, avgr\u00E4nsad med {0} \n -m [/]\n --module [/]\n den ursprungliga modulen att l\u00F6sa och namnet p\u00E5 huvudklassen\n att k\u00F6ra, om den inte anges av modulen\n --add-modules [,...]\n rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen.\n kan \u00E4ven vara ALL-DEFAULT, ALL-SYSTEM och\n ALL-MODULE-PATH.\n --limit-modules [,...]\n begr\u00E4nsa universumet med observerbara moduler\n --list-modules [[,...]]\n lista de observerbara modulerna och avsluta\n --dry-run skapa VM:en men k\u00F6r inte huvudmetoden.\n Det h\u00E4r alternativet kan vara anv\u00E4ndbart f\u00F6r att validera\n kommandoradsalternativen, som modulsystemkonfigurationen.\n -D=\n ange en systemegenskap\n -verbose:[class|gc|jni]\n aktivera utf\u00F6rliga utdata\n -version skriv ut produktversion och avsluta\n -showversion skriv ut produktversion och forts\u00E4tt\n -? -help --help\n skriv ut det h\u00E4r hj\u00E4lpmeddelandet\n -X skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ\n -ea[:...|:]\n -enableassertions[:...|:]\n aktivera verifieringar med den angivna detaljgraden\n -da[:...|:]\n -disableassertions[:...|:]\n avaktivera verifieringar med den angivna detaljgraden\n -esa | -enablesystemassertions\n aktivera systemverifieringar\n -dsa | -disablesystemassertions\n avaktivera systemverifieringar\n -agentlib:[=]\n ladda det ursprungliga agentbiblioteket , exempel: -agentlib:jdwp\n se \u00E4ven -agentlib:jdwp=help\n -agentpath:[=]\n ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n -javaagent:[=]\n ladda agenten f\u00F6r programmeringsspr\u00E5ket Java, se java.lang.instrument\n -splash:\n visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n HiDPI-skal\u00E4ndrade bilder st\u00F6ds automatiskt och anv\u00E4nds om de \u00E4r\n tillg\u00E4ngliga. Filnamnet p\u00E5 den oskal\u00E4ndrade bilden, t.ex.\n bild.filtill\u00E4gg, ska alltid \u00F6verf\u00F6ras som argument till\n alternativet -splash.\n Den l\u00E4mpligaste skal\u00E4ndrade bilden v\u00E4ljs automatiskt.\n Mer information finns i dokumentationen f\u00F6r API:t SplashScreen.\n @ l\u00E4s alternativ fr\u00E5n den angivna filen\nOm du vill ange ett argument f\u00F6r \ -ett l\u00E5ngt alternativ kan du anv\u00E4nda --=\neller -- .\n -See Se http://www.oracle.com/technetwork/java/javase/documentation/index.html f\u00F6r mer information. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch avaktivera bakgrundskompilering\n -Xbootclasspath/a:\n l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n -Xcheck:jni utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n -Xcomp tvingar kompilering av metoder vid det f\u00F6rsta anropet\n -Xdebug tillhandah\u00E5lls f\u00F6r bak\u00E5tkompatibilitet\n -Xdiag visa fler diagnostiska meddelanden\n -Xdiag:resolver visa diagnostiska meddelanden f\u00F6r matchning\n -Xfuture aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n -Xint endast exekvering i tolkat l\u00E4ge\n -Xinternalversion\n visar mer detaljerad information om JVM-version \u00E4n\n alternativet -version\n -Xloggc: logga GC-status till en fil med tidsst\u00E4mplar\n -Xmixed exekvering i blandat l\u00E4ge (standard)\n -Xmn anger ursprunglig och maximal storlek (i byte) f\u00F6r h\u00F6gen f\u00F6r\n generationen med nyare objekt (h\u00F6gen f\u00F6r tilldelning av nya objekt)\n -Xms ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n -Xmx ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n -Xnoclassgc avaktivera klasskr\u00E4pinsamling\n -Xprof utdata f\u00F6r processorprofilering\n -Xrs minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n -Xshare:auto anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n -Xshare:off f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n -Xshare:on kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n -XshowSettings visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:all\n visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:locale\n visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:properties\n visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n -Xss ange storlek f\u00F6r java-tr\u00E5dsstacken\n -Xverify anger l\u00E4ge f\u00F6r bytekodverifieraren\n --add-reads =(,)*\n uppdaterar att l\u00E4sa , oavsett\n moduldeklarationen. \n kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n ej namngivna moduler.\n --add-exports /=(,)*\n uppdaterar att exportera till ,\n oavsett moduldeklarationen.\n kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n ej namngivna moduler.\n --disable-@files avaktivera ytterligare argumentfilsut\u00F6kning\n --patch-module =({0})*\n \u00C5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n i JAR-filer eller kataloger.\n\nDe h\u00E4r alternativen \u00E4r icke-standardalternativ och kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n +java.launcher.X.usage=\n -Xbatch avaktivera bakgrundskompilering\n -Xbootclasspath/a:\n l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n -Xcheck:jni utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n -Xcomp tvingar kompilering av metoder vid det f\u00F6rsta anropet\n -Xdebug tillhandah\u00E5lls f\u00F6r bak\u00E5tkompatibilitet\n -Xdiag visa fler diagnostiska meddelanden\n -Xfuture aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n -Xint endast exekvering i tolkat l\u00E4ge\n -Xinternalversion\n visar mer detaljerad information om JVM-version \u00E4n\n alternativet -version\n -Xloggc: logga GC-status till en fil med tidsst\u00E4mplar\n -Xmixed exekvering i blandat l\u00E4ge (standard)\n -Xmn anger ursprunglig och maximal storlek (i byte) f\u00F6r h\u00F6gen f\u00F6r\n generationen med nyare objekt (h\u00F6gen f\u00F6r tilldelning av nya objekt)\n -Xms ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n -Xmx ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n -Xnoclassgc avaktivera klasskr\u00E4pinsamling\n -Xprof utdata f\u00F6r processorprofilering (inaktuellt)\n -Xrs minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n -Xshare:auto anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n -Xshare:off f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n -Xshare:on kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n -XshowSettings visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:all\n visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:locale\n visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:properties\n visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n -Xss ange storlek f\u00F6r java-tr\u00E5dsstacken\n -Xverify anger l\u00E4ge f\u00F6r bytekodverifieraren\n --add-reads =(,)*\n uppdaterar f\u00F6r att l\u00E4sa , oavsett\n moduldeklarationen. \n kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n ej namngivna moduler.\n --add-exports /=(,)*\n uppdaterar f\u00F6r att exportera till ,\n oavsett moduldeklarationen.\n kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n ej namngivna moduler.\n --add-opens /=(,)*\n uppdaterar f\u00F6r att \u00F6ppna till\n , oavsett moduldeklarationen.\n --limit-modules [,...]\n begr\u00E4nsar universumet med observerbara moduler\n --patch-module =({0})*\n \u00E5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n i JAR-filer eller kataloger.\n --disable-@files avaktivera ytterligare \ +argumentfilsut\u00F6kning\n\nDe h\u00E4r extraalternativen kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nF\u00F6ljande alternativ \u00E4r Mac OS X-specifika:\n -XstartOnFirstThread\n k\u00F6r main()-metoden p\u00E5 den f\u00F6rsta (AppKit)-tr\u00E5den\n -Xdock:name=\n \u00E5sidos\u00E4tt det standardapplikationsnamn som visas i dockan\n -Xdock:icon=\n \u00E5sidos\u00E4tt den standardikon som visas i dockan\n\n -java.launcher.cls.error1=Fel: Kan inte hitta eller kan inte ladda huvudklassen {0} +java.launcher.cls.error1=Fel: kunde inte hitta eller ladda huvudklassen {0}\nOrsakades av: {1}: {2} java.launcher.cls.error2=Fel: Huvudmetoden \u00E4r inte {0} i klassen {1}, definiera huvudmetoden som:\n public static void main(String[] args) java.launcher.cls.error3=Fel: Huvudmetoden m\u00E5ste returnera ett v\u00E4rde av typen void i klassen {0}, \ndefiniera huvudmetoden som:\n public static void main(String[] args) java.launcher.cls.error4=Fel: Huvudmetoden finns inte i klassen {0}, definiera huvudmetoden som:\n public static void main(String[] args)\neller s\u00E5 m\u00E5ste en JavaFX-applikationsklass ut\u00F6ka {1} java.launcher.cls.error5=Fel: JavaFX-exekveringskomponenter saknas, och de kr\u00E4vs f\u00F6r att kunna k\u00F6ra den h\u00E4r applikationen +java.launcher.cls.error6=Fel: LinkageError intr\u00E4ffade vid laddning av huvudklassen {0}\n\t{1} java.launcher.jar.error1=Fel: Ett ov\u00E4ntat fel intr\u00E4ffade n\u00E4r filen {0} skulle \u00F6ppnas java.launcher.jar.error2=manifest finns inte i {0} java.launcher.jar.error3=inget huvudmanifestattribut i {0} +java.launcher.jar.error4=fel vid laddning av java-agenten i {0} java.launcher.init.error=initieringsfel java.launcher.javafx.error1=Fel: JavaFX launchApplication-metoden har fel signatur, den \nm\u00E5ste ha deklarerats som statisk och returnera ett v\u00E4rde av typen void java.launcher.module.error1=modulen {0} har inget MainClass-attribut, anv\u00E4nd -m / java.launcher.module.error2=Fel: kunde inte hitta eller ladda huvudklassen {0} i modulen {1} +java.launcher.module.error3=Fel: kan inte ladda huvudklassen {0} fr\u00E5n modulen {1}\n\t{2} +java.launcher.module.error4={0} hittades inte diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties index b2043dad703..574a3d26291 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties @@ -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 @@ -24,36 +24,36 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = \u7528\u6CD5: {0} [options] class [args...]\n (\u6267\u884C\u7C7B)\n \u6216 {0} [options] -jar jarfile [args...]\n (\u6267\u884C jar \u6587\u4EF6)\n \u6216 {0} [options] -p <\u6A21\u5757\u8DEF\u5F84> -m <\u6A21\u5757\u540D\u79F0>[/<\u6A21\u5757\u7C7B>] [args...]\n (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\u5176\u4E2D\u9009\u9879\u5305\u62EC:\n +java.launcher.opt.header = \u7528\u6CD5: {0} [options] <\u4E3B\u7C7B> [args...]\n (\u6267\u884C\u7C7B)\n \u6216 {0} [options] -jar [args...]\n (\u6267\u884C jar \u6587\u4EF6)\n \u6216 {0} [options] -m <\u6A21\u5757>[/<\u4E3B\u7C7B>] [args...]\n {0} [options] --module <\u6A21\u5757>[/<\u4E3B\u7C7B>] [args...]\n (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\n \u5C06\u4E3B\u7C7B, -jar , -m \u6216 --module\n <\u6A21\u5757>/<\u4E3B\u7C7B> \u540E\u7684\u53C2\u6570\u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u5230\u4E3B\u7C7B\u3002\n\n \u5176\u4E2D, \u9009\u9879\u5305\u62EC:\n\n java.launcher.opt.datamodel =\ -d{0}\t \u5DF2\u8FC7\u65F6, \u5728\u4EE5\u540E\u7684\u53D1\u884C\u7248\u4E2D\u5C06\u88AB\u5220\u9664\n java.launcher.opt.vmselect =\ {0}\t \u9009\u62E9 "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t \u662F "{1}" VM \u7684\u540C\u4E49\u8BCD [\u5DF2\u8FC7\u65F6]\n -java.launcher.ergo.message1 =\ \u9ED8\u8BA4 VM \u662F {0} -java.launcher.ergo.message2 =\ \u56E0\u4E3A\u60A8\u662F\u5728\u670D\u52A1\u5668\u7C7B\u8BA1\u7B97\u673A\u4E0A\u8FD0\u884C\u3002\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer = \ -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n \u4F7F\u7528 {0} \u5206\u9694\u7684, \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n \u548C ZIP \u6863\u6848\u5217\u8868\u3002\n -p <\u6A21\u5757\u8DEF\u5F84>\n --module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n --d <\u6A21\u5757\u540D\u79F0>\n --describe-module <\u6A21\u5757\u540D\u79F0>\n \u63CF\u8FF0\u6A21\u5757\u5E76\u9000\u51FA\n --dry-run \u521B\u5EFA VM \u5E76\u52A0\u8F7D\u4E3B\u7C7B, \u4F46\u4E0D\u6267\u884C main \u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n --validate-modules\n \u9A8C\u8BC1\u6240\u6709\u6A21\u5757\u5E76\u9000\u51FA\n --validate-modules \u9009\u9879\u5BF9\u4E8E\u67E5\u627E\n \u6A21\u5757\u8DEF\u5F84\u4E2D\u6A21\u5757\u7684\u51B2\u7A81\u53CA\u5176\u4ED6\u9519\u8BEF\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n -D<\u540D\u79F0>=<\u503C>\n \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n -verbose:[class|module|gc|jni]\n \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n -version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u9000\u51FA\n --version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u9000\u51FA\n -showversion \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u7EE7\u7EED\n --show-version\n \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u7EE7\u7EED\n --show-module-resolution\n \u5728\u542F\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u6A21\u5757\u89E3\u6790\u8F93\u51FA\n -? -h -help\n \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -X \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help-extra \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \ +\u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n -esa | -enablesystemassertions\n \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n -dsa | -disablesystemassertions\n \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n -javaagent:[=<\u9009\u9879>]\n \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n -splash:<\u56FE\u50CF\u8DEF\u5F84>\n \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n (\u5982\u679C\u53EF\u7528)\u3002\u5E94\u59CB\u7EC8\u5C06\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n \u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u5408\u9002\u7684\u7F29\u653E\n \u56FE\u50CF\u3002\n \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\n @argument \u6587\u4EF6\n \u4E00\u4E2A\u6216\u591A\u4E2A\u5305\u542B\u9009\u9879\u7684\u53C2\u6570\u6587\u4EF6\n -disable-@files\n \u963B\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n \u548C ZIP \u6863\u6848\u7684\u5217\u8868, \u4F7F\u7528 {0} \u5206\u9694\u3002\n -p <\u6A21\u5757\u8DEF\u5F84>\n --module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n -m <\u6A21\u5757>[/<\u4E3B\u7C7B>]\n --module <\u6A21\u5757\u540D\u79F0>[/<\u4E3B\u7C7B>]\n \u8981\u89E3\u6790\u7684\u521D\u59CB\u6A21\u5757, \u4EE5\u53CA\u5728\u672A\u7531\u6A21\u5757\u6307\u5B9A\u65F6\n \u8981\u6267\u884C\u7684\u4E3B\u7C7B\u540D\u79F0\n --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH\u3002\n --limit-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n --list-modules [<\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]]\n \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n --dry-run \u521B\u5EFA VM \u4F46\u4E0D\u6267\u884C\u4E3B\u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u662F\u975E\u5E38\u6709\u7528\u7684\u3002\n -D<\u540D\u79F0>=<\u503C>\n \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n -verbose:[class|gc|jni]\n \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n -version \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u9000\u51FA\n -showversion \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u7EE7\u7EED\n -? -help --help\n \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\n -X \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u5E2E\u52A9\n -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n -esa | -enablesystemassertions\n \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n -dsa | -disablesystemassertions\n \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n -javaagent:[=<\u9009\u9879>]\n \u52A0\u8F7D \ -Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n -splash:<\u56FE\u50CF\u8DEF\u5F84>\n \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n (\u5982\u679C\u53EF\u7528)\u3002\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n \u5E94\u59CB\u7EC8\u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u9002\u5F53\u7684\u7F29\u653E\n \u56FE\u50CF\u3002\n \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\u3002\n @<\u6587\u4EF6\u8DEF\u5F84> \u4ECE\u6307\u5B9A\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n -See \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 http://www.oracle.com/technetwork/java/javase/documentation/index.html\u3002 - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n -Xcheck:jni \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n -Xcomp \u5728\u9996\u6B21\u8C03\u7528\u65F6\u5F3A\u5236\u7F16\u8BD1\u65B9\u6CD5\n -Xdebug \u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\n -Xdiag \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n -Xdiag:resolver \u663E\u793A\u89E3\u6790\u5668\u8BCA\u65AD\u6D88\u606F\n -Xfuture \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n -Xint \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n -Xinternalversion\n \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684 JVM\n \u7248\u672C\u4FE1\u606F\n -Xloggc:<\u6587\u4EF6> \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n -Xmn<\u5927\u5C0F> \u4E3A\u5E74\u8F7B\u4EE3 (\u65B0\u751F\u4EE3) \u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n (\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D)\n -Xms<\u5927\u5C0F> \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n -Xmx<\u5927\u5C0F> \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n -Xnoclassgc \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n -Xprof \u8F93\u51FA cpu \u914D\u7F6E\u6587\u4EF6\u6570\u636E\n -Xrs \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n -Xshare:off \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n -Xshare:on \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n -XshowSettings \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:all\n \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:locale\n \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EEDe\n -XshowSettings:properties\n \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -Xss<\u5927\u5C0F> \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n -Xverify \u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n --add-reads <\u6A21\u5757>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u8BFB\u53D6 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n \u6A21\u5757\u3002\n --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u6240\u6709\n \u672A\u547D\u540D\u6A21\u5757\u3002\n --disable-@files \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n --patch-module \ -<\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n\n\u8FD9\u4E9B\u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n +java.launcher.X.usage=\n -Xbatch \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n -Xcheck:jni \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n -Xcomp \u5728\u9996\u6B21\u8C03\u7528\u65F6\u5F3A\u5236\u4F7F\u7528\u7684\u7F16\u8BD1\u65B9\u6CD5\n -Xdebug \u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\n -Xdiag \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n -Xfuture \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n -Xint \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n -Xinternalversion\n \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684 JVM\n \u7248\u672C\u4FE1\u606F\n -Xloggc:<\u6587\u4EF6> \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n -Xmn<\u5927\u5C0F> \u4E3A\u5E74\u8F7B\u4EE3 (\u65B0\u751F\u4EE3) \u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n (\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D)\n -Xms<\u5927\u5C0F> \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n -Xmx<\u5927\u5C0F> \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n -Xnoclassgc \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n -Xprof \u8F93\u51FA cpu \u5206\u6790\u6570\u636E (\u5DF2\u8FC7\u65F6)\n -Xrs \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n -Xshare:off \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n -Xshare:on \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n -XshowSettings \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:all\n \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:locale\n \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EEDe\n -XshowSettings:properties\n \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -Xss<\u5927\u5C0F> \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n -Xverify \u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n --add-reads <\u6A21\u5757>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u8BFB\u53D6 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n \u6A21\u5757\u3002\n --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u5230\u6240\u6709\n \u672A\u547D\u540D\u6A21\u5757\u3002\n --add-opens <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \ +\u4EE5\u5728 <\u76EE\u6807\u6A21\u5757> \u4E2D\n \u6253\u5F00 <\u7A0B\u5E8F\u5305>, \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n --limit-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n --patch-module <\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n --disable-@files \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\n\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\u4EE5\u4E0B\u9009\u9879\u4E3A Mac OS X \u7279\u5B9A\u7684\u9009\u9879:\n -XstartOnFirstThread\n \u5728\u7B2C\u4E00\u4E2A (AppKit) \u7EBF\u7A0B\u4E0A\u8FD0\u884C main() \u65B9\u6CD5\n -Xdock:name=<\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0>\n \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\n -Xdock:icon=<\u56FE\u6807\u6587\u4EF6\u7684\u8DEF\u5F84>\n \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u56FE\u6807\n\n -java.launcher.cls.error1=\u9519\u8BEF: \u627E\u4E0D\u5230\u6216\u65E0\u6CD5\u52A0\u8F7D\u4E3B\u7C7B {0} +java.launcher.cls.error1=\u9519\u8BEF: \u627E\u4E0D\u5230\u6216\u65E0\u6CD5\u52A0\u8F7D\u4E3B\u7C7B {0}\n\u539F\u56E0: {1}: {2} java.launcher.cls.error2=\u9519\u8BEF: main \u65B9\u6CD5\u4E0D\u662F\u7C7B {1} \u4E2D\u7684{0}, \u8BF7\u5C06 main \u65B9\u6CD5\u5B9A\u4E49\u4E3A:\n public static void main(String[] args) java.launcher.cls.error3=\u9519\u8BEF: main \u65B9\u6CD5\u5FC5\u987B\u8FD4\u56DE\u7C7B {0} \u4E2D\u7684\u7A7A\u7C7B\u578B\u503C, \u8BF7\n\u5C06 main \u65B9\u6CD5\u5B9A\u4E49\u4E3A:\n public static void main(String[] args) java.launcher.cls.error4=\u9519\u8BEF: \u5728\u7C7B {0} \u4E2D\u627E\u4E0D\u5230 main \u65B9\u6CD5, \u8BF7\u5C06 main \u65B9\u6CD5\u5B9A\u4E49\u4E3A:\n public static void main(String[] args)\n\u5426\u5219 JavaFX \u5E94\u7528\u7A0B\u5E8F\u7C7B\u5FC5\u987B\u6269\u5C55{1} java.launcher.cls.error5=\u9519\u8BEF: \u7F3A\u5C11 JavaFX \u8FD0\u884C\u65F6\u7EC4\u4EF6, \u9700\u8981\u4F7F\u7528\u8BE5\u7EC4\u4EF6\u6765\u8FD0\u884C\u6B64\u5E94\u7528\u7A0B\u5E8F +java.launcher.cls.error6=\u9519\u8BEF: \u52A0\u8F7D\u4E3B\u7C7B {0} \u65F6\u51FA\u73B0 LinkageError\n\t{1} java.launcher.jar.error1=\u9519\u8BEF: \u5C1D\u8BD5\u6253\u5F00\u6587\u4EF6{0}\u65F6\u51FA\u73B0\u610F\u5916\u9519\u8BEF java.launcher.jar.error2=\u5728{0}\u4E2D\u627E\u4E0D\u5230\u6E05\u5355 java.launcher.jar.error3={0}\u4E2D\u6CA1\u6709\u4E3B\u6E05\u5355\u5C5E\u6027 +java.launcher.jar.error4=\u5728 {0} \u4E2D\u52A0\u8F7D Java \u4EE3\u7406\u65F6\u51FA\u9519 java.launcher.init.error=\u521D\u59CB\u5316\u9519\u8BEF java.launcher.javafx.error1=\u9519\u8BEF: JavaFX launchApplication \u65B9\u6CD5\u5177\u6709\u9519\u8BEF\u7684\u7B7E\u540D, \u5FC5\u987B\n\u5C06\u65B9\u6CD5\u58F0\u660E\u4E3A\u9759\u6001\u65B9\u6CD5\u5E76\u8FD4\u56DE\u7A7A\u7C7B\u578B\u7684\u503C java.launcher.module.error1=\u6A21\u5757 {0} \u4E0D\u5177\u6709 MainClass \u5C5E\u6027, \u8BF7\u4F7F\u7528 -m / java.launcher.module.error2=\u9519\u8BEF: \u5728\u6A21\u5757 {1} \u4E2D\u627E\u4E0D\u5230\u6216\u65E0\u6CD5\u52A0\u8F7D\u4E3B\u7C7B {0} +java.launcher.module.error3=\u9519\u8BEF: \u65E0\u6CD5\u4ECE\u6A21\u5757 {1} \u52A0\u8F7D\u4E3B\u7C7B {0}\n\t{2} +java.launcher.module.error4=\u627E\u4E0D\u5230{0} diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties index 38815af2ae4..5b9cafa63f7 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties @@ -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 @@ -24,36 +24,36 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = \u7528\u6CD5: {0} [options] class [args...]\n (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n \u6216 {0} [options] -jar jarfile [args...]\n (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n \u6216 {0} [options] -p -m [/] [args...]\n (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\u5176\u4E2D\u7684\u9078\u9805\u5305\u62EC:\n +java.launcher.opt.header = \u7528\u6CD5: {0} [options] [args...]\n (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n \u6216\u8005 {0} [options] -jar [args...]\n (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n \u6216\u8005 {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\n \u4E3B\u8981\u985E\u5225\u3001-jar \u3001-m \u6216 --module /\n \u4E4B\u5F8C\u7684\u5F15\u6578\u6703\u7576\u6210\u5F15\u6578\u50B3\u9001\u81F3\u4E3B\u8981\u985E\u5225\u3002\n\n \u5176\u4E2D\u9078\u9805\u5305\u62EC:\n\n java.launcher.opt.datamodel =\ -d{0}\t \u5DF2\u4E0D\u518D\u4F7F\u7528\uFF0C\u5C07\u65BC\u672A\u4F86\u7248\u672C\u4E2D\u79FB\u9664\n java.launcher.opt.vmselect =\ {0}\t \u9078\u53D6 "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t \u662F "{1}" VM \u7684\u540C\u7FA9\u5B57 [\u5DF2\u4E0D\u518D\u4F7F\u7528]\n -java.launcher.ergo.message1 =\ \u9810\u8A2D\u7684 VM \u70BA {0} -java.launcher.ergo.message2 =\ \u56E0\u70BA\u60A8\u6B63\u5728\u4F3A\u670D\u5668\u985E\u5225\u6A5F\u5668\u4E0A\u57F7\u884C\u3002\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer = \ -cp <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n -classpath <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n --class-path <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\n \u4EE5\u53CA ZIP \u5B58\u6A94\u6E05\u55AE (\u5C07\u65BC\u5176\u4E2D\u641C\u5C0B\u985E\u5225\u6A94\u6848)\u3002\n -p <\u6A21\u7D44\u8DEF\u5F91>\n --module-path <\u6A21\u7D44\u8DEF\u5F91>...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\u3002\n --upgrade-module-path <\u6A21\u7D44\u8DEF\u5F91>...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\uFF0C\u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\u53EF\u5347\u7D1A\n \u6A21\u7D44 (\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D)\n --add-modules [,...]\n \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u4E4B\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\u3002\n \u4E5F\u53EF\u4EE5\u662F ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH.\n --list-modules\n \u5217\u51FA\u53EF\u76E3\u6E2C\u7684\u6A21\u7D44\u4E26\u7D50\u675F\n --d <\u6A21\u7D44\u540D\u7A31>\n --describe-module <\u6A21\u7D44\u540D\u7A31>\n \u63CF\u8FF0\u6A21\u7D44\u4E26\u7D50\u675F\n --dry-run \u5EFA\u7ACB VM \u4E26\u8F09\u5165\u4E3B\u8981\u985E\u5225\uFF0C\u4F46\u4E0D\u57F7\u884C\u4E3B\u8981\u65B9\u6CD5\u3002\n --dry-run \u9078\u9805\u9069\u5408\u7528\u5728\u9A57\u8B49\n \u50CF\u6A21\u7D44\u7CFB\u7D71\u7D44\u614B\u7684\u547D\u4EE4\u884C\u9078\u9805\u3002\n --validate-modules\n \u9A57\u8B49\u6240\u6709\u6A21\u7D44\u4E26\u7D50\u675F\n --validate-modules \u9078\u9805\u9069\u5408\u7528\u5728\u5C0B\u627E\n \u6A21\u7D44\u8DEF\u5F91\u4E0A\u4E4B\u6A21\u7D44\u7684\u885D\u7A81\u548C\u5176\u4ED6\u932F\u8AA4\u3002\n -D=\n \u8A2D\u5B9A\u7CFB\u7D71\u7279\u6027\n -verbose:[class|module|gc|jni]\n \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n -version \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n --version \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n -showversion \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n --show-version\n \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n --show-module-resolution\n \u5728\u555F\u52D5\u6642\u986F\u793A\u6A21\u7D44\u89E3\u6790\u8F38\u51FA\n -? -h -help\n \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n --help \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n -X \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n --help-extra \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n -ea[:...|:]\n -enableassertions[:...|:]\n \u555F\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -da[:...|:]\n -disableassertions[:...|:]\n \u505C\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -esa | -enablesystemassertions\n \ + \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n -dsa | -disablesystemassertions\n \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n -agentlib:[=]\n \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB \uFF0C\u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help\n -agentpath:[=]\n \u4F9D\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n -javaagent:[=]\n \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n -splash:\n \u986F\u793A\u542B\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n \u7CFB\u7D71\u6703\u81EA\u52D5\u652F\u63F4\u4E26\u4F7F\u7528 HiDPI \u7E2E\u653E\u7684\u5F71\u50CF\n (\u82E5\u6709\u7684\u8A71)\u3002\u672A\u7E2E\u653E\u5F71\u50CF\u6A94\u6848\u540D\u7A31 (\u4F8B\u5982 image.ext)\n \u61C9\u4E00\u5F8B\u4EE5\u5F15\u6578\u7684\u5F62\u5F0F\u50B3\u9001\u7D66 -splash \u9078\u9805\u3002\n \u7CFB\u7D71\u5C07\u6703\u81EA\u52D5\u9078\u64C7\u4F7F\u7528\u6700\u9069\u5408\u7684\u7E2E\u653E\u5F71\u50CF\n \u3002\n \u8ACB\u53C3\u95B1 SplashScreen API \u6587\u4EF6\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002\n @argument files\n \u4E00\u6216\u591A\u500B\u5305\u542B\u9078\u9805\u7684\u5F15\u6578\u6A94\u6848\n -disable-@files\n \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\u82E5\u8981\u6307\u5B9A\u9577\u9078\u9805\u7684\u5F15\u6578\uFF0C\u53EF\u4EE5\u4F7F\u7528 --= \u6216\n-- \u3002\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n \u5C07\u5728\u5176\u4E2D\u641C\u5C0B\u985E\u5225\u6A94\u6848\u4E4B\u4EE5 {0} \u5340\u9694\u7684\n \u76EE\u9304\u3001JAR \u5B58\u6A94\u4EE5\u53CA ZIP \u5B58\u6A94\u6E05\u55AE\u3002\n -p \n --module-path ...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\u3002\n --upgrade-module-path ...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\uFF0C\u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\n \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D\u7684\u53EF\u5347\u7D1A\u6A21\u7D44\n -m [/]\n --module [/]\n \u8981\u89E3\u6790\u7684\u8D77\u59CB\u6A21\u7D44\uFF0C\u4EE5\u53CA\u6A21\u7D44\u672A\u6307\u5B9A\u6642\n \u6240\u8981\u57F7\u884C\u4E4B\u4E3B\u8981\u985E\u5225\u7684\u540D\u7A31\n --add-modules [,...]\n \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\u3002\n \u4E5F\u53EF\u4EE5\u662F ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH\u3002\n --limit-modules [,...]\n \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n --list-modules [[,...]]\n \u5217\u51FA\u53EF\u76E3\u6E2C\u6A21\u7D44\u4E26\u7D50\u675F\n --dry-run \u5EFA\u7ACB VM \u4F46\u4E0D\u57F7\u884C\u4E3B\u8981\u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9078\u9805\u5C0D\u65BC\u9A57\u8B49\u547D\u4EE4\u884C\u9078\u9805\n (\u4F8B\u5982\u6A21\u7D44\u7CFB\u7D71\u7D44\u614B) \u6703\u5F88\u6709\u7528\u3002\n -D=\n \u8A2D\u5B9A\u7CFB\u7D71\u5C6C\u6027\n -verbose:[class|gc|jni]\n \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n -version \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n -showversion \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n -? -help --help\n \u5217\u5370\u672C\u8AAA\u660E\u8A0A\u606F\n -X \u5217\u5370\u975E\u6A19\u6E96\u9078\u9805\u7684\u8AAA\u660E\n -ea[:...|:]\n -enableassertions[:...|:]\n \u555F\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -da[:...|:]\n -disableassertions[:...|:]\n \u505C\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -esa | -enablesystemassertions\n \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n -dsa | -disablesystemassertions\n \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n -agentlib:[=]\n \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB \uFF0C\u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help\n -agentpath:[=]\n \u4F7F\u7528\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n -javaagent:[=]\n \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n -splash:\n \u986F\u793A\u542B\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n \ -\u7CFB\u7D71\u6703\u81EA\u52D5\u652F\u63F4\u4E26\u4F7F\u7528 HiDPI \u5DF2\u7E2E\u653E\u5F71\u50CF\n (\u5982\u679C\u53EF\u7528\u7684\u8A71)\u3002\u672A\u7E2E\u653E\u5F71\u50CF\u6A94\u6848\u540D\u7A31 (\u4F8B\u5982 image.ext)\n \u61C9\u4E00\u5F8B\u4EE5\u5F15\u6578\u7684\u5F62\u5F0F\u50B3\u9001\u5230 -splash \u9078\u9805\u3002\n \u7CFB\u7D71\u6703\u81EA\u52D5\u5F9E\u63D0\u4F9B\u7684\u5DF2\u7E2E\u653E\u5F71\u50CF\u4E2D\u9078\u64C7\u6700\u9069\u5408\u7684\n \u5DF2\u7E2E\u653E\u5F71\u50CF\u3002\n \u8ACB\u53C3\u95B1 SplashScreen API \u6587\u4EF6\uFF0C\u4EE5\u53D6\u5F97\u66F4\u591A\u8CC7\u8A0A\u3002\n @ \u5F9E\u6307\u5B9A\u7684\u6A94\u6848\u8B80\u53D6\u9078\u9805\n\u82E5\u8981\u6307\u5B9A\u9577\u9078\u9805\u7684\u5F15\u6578\uFF0C\u53EF\u4EE5\u4F7F\u7528 --= \u6216\n-- \u3002\n -See \u8ACB\u53C3\u95B1 http://www.oracle.com/technetwork/java/javase/documentation/index.html \u66B8\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002 - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n -Xbootclasspath/a:\n \u52A0\u5728\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n -Xcheck:jni \u57F7\u884C\u5176\u4ED6\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n -Xcomp \u5F37\u5236\u7DE8\u8B6F\u7B2C\u4E00\u500B\u547C\u53EB\u7684\u65B9\u6CD5\n -Xdebug \u70BA\u56DE\u6EAF\u76F8\u5BB9\u6027\u63D0\u4F9B\n -Xdiag \u986F\u793A\u5176\u4ED6\u8A3A\u65B7\u8A0A\u606F\n -Xdiag:resolver \u986F\u793A\u89E3\u6790\u5668\u8A3A\u65B7\u8A0A\u606F\n -Xfuture \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n -Xint \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n -Xinternalversion\n \u986F\u793A\u6BD4\u4F7F\u7528 -version \u9078\u9805\u6642\u66F4\u70BA\u8A73\u7D30\u7684\n JVM \u7248\u672C\u8CC7\u8A0A\n -Xloggc: \u5C07 GC \u72C0\u614B\u548C\u6642\u6233\u8A18\u9304\u81F3\u6A94\u6848\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n -Xmn \u91DD\u5C0D\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u8A2D\u5B9A\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n -Xms \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n -Xmx \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n -Xnoclassgc \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n -Xprof \u8F38\u51FA cpu \u5206\u6790\u8CC7\u6599\n -Xrs \u6E1B\u5C11 Java/VM \u4F7F\u7528\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n -Xshare:auto \u76E1\u53EF\u80FD\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n -Xshare:off \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n -Xshare:on \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u5931\u6557\u3002\n -XshowSettings \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:all\n \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:locale\n \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:properties\n \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -Xss \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n -Xverify \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u6A21\u5F0F\n --add-reads =(,)*\n \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C\u66F4\u65B0 \u4EE5\n \u8B80\u53D6 \u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n \u6A21\u7D44\u3002\n --add-exports /=(,)*\n \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C\u66F4\u65B0 \u4EE5\u4FBF\u5C07 \n \u532F\u51FA\u81F3 \u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n --disable-@files \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n --patch-module =({0})*\n \u8986\u5BEB\u6216\u52A0\u5F37 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n \ -\u542B\u6709\u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n\n\u4E0A\u8FF0\u9078\u9805\u4E0D\u662F\u6A19\u6E96\u9078\u9805\uFF0C\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n +java.launcher.X.usage=\n -Xbatch \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n -Xbootclasspath/a:<\u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u548C zip/jar \u6A94\u6848>\n \u9644\u52A0\u81F3\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n -Xcheck:jni \u57F7\u884C\u984D\u5916\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n -Xcomp \u5F37\u5236\u7DE8\u8B6F\u7B2C\u4E00\u500B\u547C\u53EB\u7684\u65B9\u6CD5\n -Xdebug \u91DD\u5C0D\u56DE\u6EAF\u76F8\u5BB9\u6027\u63D0\u4F9B\n -Xdiag \u986F\u793A\u984D\u5916\u7684\u8A3A\u65B7\u8A0A\u606F\n -Xfuture \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n -Xint \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n -Xinternalversion\n \u986F\u793A\u6BD4 -version \u9078\u9805\u66F4\u70BA\u8A73\u7D30\u7684\n JVM \u7248\u672C\u8CC7\u8A0A\n -Xloggc: \u5C07 GC \u72C0\u614B\u8A18\u9304\u81F3\u6A94\u6848\u4E14\u9023\u540C\u6642\u6233\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n -Xmn \u8A2D\u5B9A\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u4E4B\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n -Xms \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n -Xmx \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n -Xnoclassgc \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n -Xprof \u8F38\u51FA cpu \u5206\u6790\u8CC7\u6599 (\u5DF2\u4E0D\u518D\u4F7F\u7528)\n -Xrs \u6E1B\u5C11 Java/VM \u4F7F\u7528\u7684\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u6CC1\u4E0B\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n -Xshare:off \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n -Xshare:on \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u6703\u5931\u6557\u3002\n -XshowSettings \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n -XshowSettings:all\n \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n -XshowSettings:locale\n \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n -XshowSettings:properties\n \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n -Xss \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n -Xverify \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u7684\u6A21\u5F0F\n --add-reads =(,)*\n \u66F4\u65B0 \u4EE5\u8B80\u53D6 \uFF0C\u4E0D\u8AD6\n \u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n \u6A21\u7D44\u3002\n --add-exports /=(,)*\n \u66F4\u65B0 \u4EE5\u4FBF\u5C07 \u532F\u51FA\u81F3 \uFF0C\n \u4E0D\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n --add-opens /=(,)*\n \u66F4\u65B0 \ +\u4EE5\u4FBF\u5C07 \u958B\u555F\u81F3\n \uFF0C\u4E0D\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n --limit-modules [,...]\n \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n --patch-module =({0})*\n \u8986\u5BEB\u6216\u52A0\u5F37\u542B\u6709 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n \u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n --disable-@files \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\n\u4E0A\u8FF0\u7684\u984D\u5916\u9078\u9805\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\u4E0B\u5217\u662F Mac OS X \u7279\u5B9A\u9078\u9805:\n -XstartOnFirstThread\n \u5728\u7B2C\u4E00\u500B (AppKit) \u57F7\u884C\u7DD2\u57F7\u884C main() \u65B9\u6CD5\n -Xdock:name=\n \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u61C9\u7528\u7A0B\u5F0F\u540D\u7A31\n -Xdock:icon=\n \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u5716\u793A\n\n -java.launcher.cls.error1=\u932F\u8AA4: \u627E\u4E0D\u5230\u6216\u7121\u6CD5\u8F09\u5165\u4E3B\u8981\u985E\u5225 {0} +java.launcher.cls.error1=\u932F\u8AA4: \u627E\u4E0D\u5230\u6216\u7121\u6CD5\u8F09\u5165\u4E3B\u8981\u985E\u5225 {0}\n\u539F\u56E0: {1}: {2} java.launcher.cls.error2=\u932F\u8AA4: \u4E3B\u8981\u65B9\u6CD5\u4E0D\u662F\u985E\u5225 {1} \u4E2D\u7684 {0}\uFF0C\u8ACB\u5B9A\u7FA9\u4E3B\u8981\u65B9\u6CD5\u70BA:\n public static void main(String[] args) java.launcher.cls.error3=\u932F\u8AA4: \u4E3B\u8981\u65B9\u6CD5\u5FC5\u9808\u50B3\u56DE\u985E\u5225 {0} \u4E2D void \u985E\u578B\u7684\u503C\uFF0C\n\u8ACB\u5B9A\u7FA9\u4E3B\u8981\u65B9\u6CD5\u70BA:\n public static void main(String[] args) java.launcher.cls.error4=\u932F\u8AA4: \u5728\u985E\u5225 {0} \u4E2D\u627E\u4E0D\u5230\u4E3B\u8981\u65B9\u6CD5\uFF0C\u8ACB\u5B9A\u7FA9\u4E3B\u8981\u65B9\u6CD5\u70BA:\n public static void main(String[] args)\n\u6216\u8005 JavaFX \u61C9\u7528\u7A0B\u5F0F\u985E\u5225\u5FC5\u9808\u64F4\u5145 {1} java.launcher.cls.error5=\u932F\u8AA4: \u907A\u6F0F\u57F7\u884C\u6B64\u61C9\u7528\u7A0B\u5F0F\u6240\u9700\u7684 JavaFX \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5143\u4EF6 +java.launcher.cls.error6=\u932F\u8AA4: \u8F09\u5165\u4E3B\u8981\u985E\u5225 {0} \u6642\u767C\u751F LinkageError\n\t{1} java.launcher.jar.error1=\u932F\u8AA4: \u5617\u8A66\u958B\u555F\u6A94\u6848 {0} \u6642\u767C\u751F\u672A\u9810\u671F\u7684\u932F\u8AA4 java.launcher.jar.error2=\u5728 {0} \u4E2D\u627E\u4E0D\u5230\u8CC7\u8A0A\u6E05\u55AE java.launcher.jar.error3={0} \u4E2D\u6C92\u6709\u4E3B\u8981\u8CC7\u8A0A\u6E05\u55AE\u5C6C\u6027 +java.launcher.jar.error4=\u8F09\u5165 {0} \u4E2D\u7684 Java \u4EE3\u7406\u7A0B\u5F0F\u6642\u767C\u751F\u932F\u8AA4 java.launcher.init.error=\u521D\u59CB\u5316\u932F\u8AA4 java.launcher.javafx.error1=\u932F\u8AA4: JavaFX launchApplication \u65B9\u6CD5\u7684\u7C3D\u7AE0\u932F\u8AA4\uFF0C\u5B83\n\u5FC5\u9808\u5BA3\u544A\u70BA\u975C\u614B\u4E26\u50B3\u56DE void \u985E\u578B\u7684\u503C java.launcher.module.error1=\u6A21\u7D44 {0} \u4E0D\u542B MainClass \u5C6C\u6027\uFF0C\u8ACB\u4F7F\u7528 -m / java.launcher.module.error2=\u932F\u8AA4: \u627E\u4E0D\u5230\u6216\u7121\u6CD5\u8F09\u5165\u6A21\u7D44 {1} \u4E2D\u7684\u4E3B\u8981\u985E\u5225 {0} +java.launcher.module.error3=\u932F\u8AA4: \u7121\u6CD5\u5F9E\u6A21\u7D44 {1} \u8F09\u5165\u4E3B\u8981\u985E\u5225 {0}\n\t{2} +java.launcher.module.error4=\u627E\u4E0D\u5230 {0} diff --git a/jdk/src/java.base/share/classes/sun/net/RegisteredDomain.java b/jdk/src/java.base/share/classes/sun/net/RegisteredDomain.java index 7e75b321eb6..3a506da9831 100644 --- a/jdk/src/java.base/share/classes/sun/net/RegisteredDomain.java +++ b/jdk/src/java.base/share/classes/sun/net/RegisteredDomain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 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 @@ -32,6 +32,10 @@ import java.util.Map; import java.util.Set; /* + * WARNING: This class may contain out-of-date information. It should be + * updated or replaced with an appropriate implementation. See + * sun.security.util.RegisteredDomain for more information. + * * The naming tables listed below were gathered from publicly available data such as * the subdomain registration websites listed for each top-level domain by the Internet * Assigned Numbers Authority and the website of the Internet Corporation for Assigned Names @@ -696,6 +700,36 @@ static { top3Map.put("tr", new HashSet(Arrays.asList("gov.nc.tr"))); } + /** + * Returns a {@code sun.security.util.RegisteredDomain} representing the + * registered part of the specified domain. + * + * @param domain the domain name + * @return a {@code sun.security.util.RegisteredDomain} or null + * if the domain is unknown or not registerable + * @throws NullPointerException if domain is null + */ + public static sun.security.util.RegisteredDomain registeredDomain(String domain) { + String name = getRegisteredDomain(domain); + if (name.equals(domain)) { + return null; + } + return new sun.security.util.RegisteredDomain() { + private String rname = name; + @Override + public String name() { + return rname; + } + @Override + public sun.security.util.RegisteredDomain.Type type() { + return sun.security.util.RegisteredDomain.Type.ICANN; + } + @Override + public String publicSuffix() { + return rname.substring(rname.indexOf(".") + 1); + } + }; + } /* * Return the registered part of a qualified domain diff --git a/jdk/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java b/jdk/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java index b727b672e86..7180884ec69 100644 --- a/jdk/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java +++ b/jdk/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -516,7 +516,8 @@ public class FtpClient extends sun.net.ftp.FtpClient { * @return true if the command was successful * @throws IOException */ - private boolean issueCommand(String cmd) throws IOException { + private boolean issueCommand(String cmd) throws IOException, + sun.net.ftp.FtpProtocolException { if (!isConnected()) { throw new IllegalStateException("Not connected"); } @@ -527,6 +528,12 @@ public class FtpClient extends sun.net.ftp.FtpClient { // ignore... } } + if (cmd.indexOf('\n') != -1) { + sun.net.ftp.FtpProtocolException ex + = new sun.net.ftp.FtpProtocolException("Illegal FTP command"); + ex.initCause(new IllegalArgumentException("Illegal carriage return")); + throw ex; + } sendServer(cmd + "\r\n"); return readReply(); } @@ -1119,7 +1126,10 @@ public class FtpClient extends sun.net.ftp.FtpClient { */ public void close() throws IOException { if (isConnected()) { - issueCommand("QUIT"); + try { + issueCommand("QUIT"); + } catch (FtpProtocolException e) { + } loggedIn = false; } disconnect(); @@ -1897,7 +1907,8 @@ public class FtpClient extends sun.net.ftp.FtpClient { return null; } - private boolean sendSecurityData(byte[] buf) throws IOException { + private boolean sendSecurityData(byte[] buf) throws IOException, + sun.net.ftp.FtpProtocolException { String s = Base64.getMimeEncoder().encodeToString(buf); return issueCommand("ADAT " + s); } diff --git a/jdk/src/java.base/share/classes/sun/net/smtp/SmtpClient.java b/jdk/src/java.base/share/classes/sun/net/smtp/SmtpClient.java index 93451253f0a..59c60ce70dc 100644 --- a/jdk/src/java.base/share/classes/sun/net/smtp/SmtpClient.java +++ b/jdk/src/java.base/share/classes/sun/net/smtp/SmtpClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -43,6 +43,7 @@ import sun.security.action.GetPropertyAction; public class SmtpClient extends TransferProtocolClient { + private static int DEFAULT_SMTP_PORT = 25; String mailhost; SmtpPrintStream message; @@ -74,6 +75,10 @@ public class SmtpClient extends TransferProtocolClient { } public void to(String s) throws IOException { + if (s.indexOf('\n') != -1) { + throw new IOException("Illegal SMTP command", + new IllegalArgumentException("Illegal carriage return")); + } int st = 0; int limit = s.length(); int pos = 0; @@ -116,16 +121,21 @@ public class SmtpClient extends TransferProtocolClient { } public void from(String s) throws IOException { - if (s.startsWith("<")) + if (s.indexOf('\n') != -1) { + throw new IOException("Illegal SMTP command", + new IllegalArgumentException("Illegal carriage return")); + } + if (s.startsWith("<")) { issueCommand("mail from: " + s + "\r\n", 250); - else + } else { issueCommand("mail from: <" + s + ">\r\n", 250); + } } /** open a SMTP connection to host host. */ private void openServer(String host) throws IOException { mailhost = host; - openServer(mailhost, 25); + openServer(mailhost, DEFAULT_SMTP_PORT); issueCommand("helo "+InetAddress.getLocalHost().getHostName()+"\r\n", 250); } diff --git a/jdk/src/java.base/share/classes/sun/net/www/MeteredStream.java b/jdk/src/java.base/share/classes/sun/net/www/MeteredStream.java index 29b998a5e70..08ff179457a 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/MeteredStream.java +++ b/jdk/src/java.base/share/classes/sun/net/www/MeteredStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -203,6 +203,7 @@ public class MeteredStream extends FilterInputStream { return super.markSupported(); } + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { try { close(); diff --git a/jdk/src/java.base/share/classes/sun/net/www/http/HttpClient.java b/jdk/src/java.base/share/classes/sun/net/www/http/HttpClient.java index 9237d37a354..57d734e5166 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/http/HttpClient.java +++ b/jdk/src/java.base/share/classes/sun/net/www/http/HttpClient.java @@ -102,7 +102,20 @@ public class HttpClient extends NetworkClient { // from previous releases. private static boolean retryPostProp = true; + /* Value of the system property jdk.ntlm.cache; + if false, then NTLM connections will not be cached. + The default value is 'true'. */ + private static final boolean cacheNTLMProp; + /* Value of the system property jdk.spnego.cache; + if false, then connections authentified using the Negotiate/Kerberos + scheme will not be cached. + The default value is 'true'. */ + private static final boolean cacheSPNEGOProp; + volatile boolean keepingAlive; /* this is a keep-alive connection */ + volatile boolean disableKeepAlive;/* keep-alive has been disabled for this + connection - this will be used when + recomputing the value of keepingAlive */ int keepAliveConnections = -1; /* number of keep-alives left */ /**Idle timeout value, in milliseconds. Zero means infinity, @@ -152,6 +165,8 @@ public class HttpClient extends NetworkClient { Properties props = GetPropertyAction.privilegedGetProperties(); String keepAlive = props.getProperty("http.keepAlive"); String retryPost = props.getProperty("sun.net.http.retryPost"); + String cacheNTLM = props.getProperty("jdk.ntlm.cache"); + String cacheSPNEGO = props.getProperty("jdk.spnego.cache"); if (keepAlive != null) { keepAliveProp = Boolean.parseBoolean(keepAlive); @@ -161,9 +176,21 @@ public class HttpClient extends NetworkClient { if (retryPost != null) { retryPostProp = Boolean.parseBoolean(retryPost); - } else + } else { retryPostProp = true; + } + if (cacheNTLM != null) { + cacheNTLMProp = Boolean.parseBoolean(cacheNTLM); + } else { + cacheNTLMProp = true; + } + + if (cacheSPNEGO != null) { + cacheSPNEGOProp = Boolean.parseBoolean(cacheSPNEGO); + } else { + cacheSPNEGOProp = true; + } } /** @@ -723,6 +750,7 @@ public class HttpClient extends NetworkClient { nread += r; } String keep=null; + String authenticate=null; ret = b[0] == 'H' && b[1] == 'T' && b[2] == 'T' && b[3] == 'P' && b[4] == '/' && b[5] == '1' && b[6] == '.'; @@ -751,17 +779,44 @@ public class HttpClient extends NetworkClient { */ if (usingProxy) { // not likely a proxy will return this keep = responses.findValue("Proxy-Connection"); + authenticate = responses.findValue("Proxy-Authenticate"); } if (keep == null) { keep = responses.findValue("Connection"); + authenticate = responses.findValue("WWW-Authenticate"); } + + // 'disableKeepAlive' starts with the value false. + // It can transition from false to true, but once true + // it stays true. + // If cacheNTLMProp is false, and disableKeepAlive is false, + // then we need to examine the response headers to figure out + // whether we are doing NTLM authentication. If we do NTLM, + // and cacheNTLMProp is false, than we can't keep this connection + // alive: we will switch disableKeepAlive to true. + boolean canKeepAlive = !disableKeepAlive; + if (canKeepAlive && (cacheNTLMProp == false || cacheSPNEGOProp == false) + && authenticate != null) { + authenticate = authenticate.toLowerCase(Locale.US); + if (cacheNTLMProp == false) { + canKeepAlive &= !authenticate.startsWith("ntlm "); + } + if (cacheSPNEGOProp == false) { + canKeepAlive &= !authenticate.startsWith("negotiate "); + canKeepAlive &= !authenticate.startsWith("kerberos "); + } + } + disableKeepAlive |= !canKeepAlive; + if (keep != null && keep.toLowerCase(Locale.US).equals("keep-alive")) { /* some servers, notably Apache1.1, send something like: * "Keep-Alive: timeout=15, max=1" which we should respect. */ - HeaderParser p = new HeaderParser( + if (disableKeepAlive) { + keepAliveConnections = 1; + } else { + HeaderParser p = new HeaderParser( responses.findValue("Keep-Alive")); - if (p != null) { /* default should be larger in case of proxy */ keepAliveConnections = p.findInt("max", usingProxy?50:5); keepAliveTimeout = p.findInt("timeout", usingProxy?60:5); @@ -771,7 +826,7 @@ public class HttpClient extends NetworkClient { * We're talking 1.1 or later. Keep persistent until * the server says to close. */ - if (keep != null) { + if (keep != null || disableKeepAlive) { /* * The only Connection token we understand is close. * Paranoia: if there is any Connection header then @@ -853,7 +908,7 @@ public class HttpClient extends NetworkClient { keepAliveConnections = 1; keepingAlive = false; } else { - keepingAlive = true; + keepingAlive = !disableKeepAlive; } failedOnce = false; } else { @@ -886,7 +941,7 @@ public class HttpClient extends NetworkClient { (cl >= 0 || code == HttpURLConnection.HTTP_NOT_MODIFIED || code == HttpURLConnection.HTTP_NO_CONTENT)) { - keepingAlive = true; + keepingAlive = !disableKeepAlive; failedOnce = false; } else if (keepingAlive) { /* Previously we were keeping alive, and now we're not. Remove @@ -908,7 +963,11 @@ public class HttpClient extends NetworkClient { pi.setContentType(responses.findValue("content-type")); } - if (isKeepingAlive()) { + // If disableKeepAlive == true, the client will not be returned + // to the cache. But we still need to use a keepalive stream to + // allow the multi-message authentication exchange on the connection + boolean useKeepAliveStream = isKeepingAlive() || disableKeepAlive; + if (useKeepAliveStream) { // Wrap KeepAliveStream if keep alive is enabled. logFinest("KeepAlive stream used: " + url); serverInput = new KeepAliveStream(serverInput, pi, cl, this); diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java index 7d0dae92a8a..c7f369eda23 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java @@ -65,8 +65,7 @@ public abstract class AuthenticationInfo extends AuthCacheValue implements Clone * repeatedly, via the Authenticator. Default is false, which means that this * behavior is switched off. */ - static boolean serializeAuth; - + static final boolean serializeAuth; static { serializeAuth = java.security.AccessController.doPrivileged( new sun.security.action.GetBooleanAction( @@ -106,6 +105,16 @@ public abstract class AuthenticationInfo extends AuthCacheValue implements Clone public String getProtocolScheme() { return protocol; } + /** + * Whether we should cache this instance in the AuthCache. + * This method returns {@code true} by default. + * Subclasses may override this method to add + * additional restrictions. + * @return {@code true} by default. + */ + protected boolean useAuthCache() { + return true; + } /** * requests is used to ensure that interaction with the @@ -373,9 +382,11 @@ public abstract class AuthenticationInfo extends AuthCacheValue implements Clone */ void addToCache() { String key = cacheKey(true); - cache.put(key, this); - if (supportsPreemptiveAuthorization()) { - cache.put(cacheKey(false), this); + if (useAuthCache()) { + cache.put(key, this); + if (supportsPreemptiveAuthorization()) { + cache.put(cacheKey(false), this); + } } endAuthRequest(key); } diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java index d7c379f0d47..b4a4584f8ee 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java @@ -34,6 +34,7 @@ import sun.net.www.HeaderParser; import sun.util.logging.PlatformLogger; import static sun.net.www.protocol.http.AuthScheme.NEGOTIATE; import static sun.net.www.protocol.http.AuthScheme.KERBEROS; +import sun.security.action.GetPropertyAction; /** * NegotiateAuthentication: @@ -55,7 +56,14 @@ class NegotiateAuthentication extends AuthenticationInfo { // if it's true, a cached Negotiator is put into cache. // the cache can be used only once, so after the first use, it's cleaned. static HashMap supported = null; - static HashMap cache = null; + static ThreadLocal > cache = null; + /* Whether cache is enabled for Negotiate/Kerberos */ + private static final boolean cacheSPNEGO; + static { + String spnegoCacheProp = + GetPropertyAction.privilegedGetProperty("jdk.spnego.cache", "true"); + cacheSPNEGO = Boolean.parseBoolean(spnegoCacheProp); + } // The HTTP Negotiate Helper private Negotiator negotiator = null; @@ -119,8 +127,7 @@ class NegotiateAuthentication extends AuthenticationInfo { */ private static synchronized boolean isSupportedImpl(HttpCallerInfo hci) { if (supported == null) { - supported = new HashMap (); - cache = new HashMap (); + supported = new HashMap<>(); } String hostname = hci.host; hostname = hostname.toLowerCase(); @@ -133,7 +140,15 @@ class NegotiateAuthentication extends AuthenticationInfo { supported.put(hostname, true); // the only place cache.put is called. here we can make sure // the object is valid and the oneToken inside is not null - cache.put(hostname, neg); + if (cache == null) { + cache = new ThreadLocal<>() { + @Override + protected HashMap initialValue() { + return new HashMap<>(); + } + }; + } + cache.get().put(hostname, neg); return true; } else { supported.put(hostname, false); @@ -141,6 +156,16 @@ class NegotiateAuthentication extends AuthenticationInfo { } } + private static synchronized HashMap getCache() { + if (cache == null) return null; + return cache.get(); + } + + @Override + protected boolean useAuthCache() { + return super.useAuthCache() && cacheSPNEGO; + } + /** * Not supported. Must use the setHeaders() method */ @@ -198,12 +223,11 @@ class NegotiateAuthentication extends AuthenticationInfo { */ private byte[] firstToken() throws IOException { negotiator = null; - if (cache != null) { - synchronized(cache) { - negotiator = cache.get(getHost()); - if (negotiator != null) { - cache.remove(getHost()); // so that it is only used once - } + HashMap cachedMap = getCache(); + if (cachedMap != null) { + negotiator = cachedMap.get(getHost()); + if (negotiator != null) { + cachedMap.remove(getHost()); // so that it is only used once } } if (negotiator == null) { diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/DelegateHttpsURLConnection.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/DelegateHttpsURLConnection.java index b6ff7b417ac..2b5e5115cf3 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/DelegateHttpsURLConnection.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/DelegateHttpsURLConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -77,6 +77,7 @@ public class DelegateHttpsURLConnection extends AbstractDelegateHttpsURLConnecti * Called by layered delegator's finalize() method to handle closing * the underlying object. */ + @SuppressWarnings("deprecation") protected void dispose() throws Throwable { super.finalize(); } diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java index 1b2a584a79b..792af78675c 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -478,6 +478,7 @@ public class HttpsURLConnectionImpl * sun.net.www.protocol.http.HttpURLConnection's finalize() * would have to be made public. */ + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { delegate.dispose(); } diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java index fb12cf77626..5cb3e999a71 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java @@ -82,6 +82,9 @@ public class JarURLConnection extends java.net.JarURLConnection { jarFileURL = getJarFileURL(); jarFileURLConnection = jarFileURL.openConnection(); + // whether, or not, the embedded URL should use the cache will depend + // on this instance's cache value + jarFileURLConnection.setUseCaches(useCaches); entryName = getEntryName(); } diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java index 88e6f5b7caa..c7446082edd 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java @@ -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 @@ -26,13 +26,13 @@ package sun.net.www.protocol.jrt; import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FilePermission; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; +import java.security.AccessController; import java.security.Permission; +import java.security.PrivilegedAction; import jdk.internal.jimage.ImageLocation; import jdk.internal.jimage.ImageReader; @@ -42,7 +42,6 @@ import jdk.internal.loader.URLClassPath; import jdk.internal.loader.Resource; import sun.net.www.ParseUtil; import sun.net.www.URLConnection; -import sun.security.action.GetPropertyAction; /** * URLConnection implementation that can be used to connect to resources @@ -51,7 +50,11 @@ import sun.security.action.GetPropertyAction; public class JavaRuntimeURLConnection extends URLConnection { // ImageReader to access resources in jimage - private static final ImageReader reader = ImageReaderFactory.getImageReader(); + private static final ImageReader reader; + static { + PrivilegedAction pa = ImageReaderFactory::getImageReader; + reader = AccessController.doPrivileged(pa); + } // the module and resource name in the URL private final String module; @@ -60,9 +63,6 @@ public class JavaRuntimeURLConnection extends URLConnection { // the Resource when connected private volatile Resource resource; - // the permission to access resources in the runtime image, created lazily - private static volatile Permission permission; - JavaRuntimeURLConnection(URL url) throws IOException { super(url); String path = url.getPath(); @@ -158,14 +158,8 @@ public class JavaRuntimeURLConnection extends URLConnection { } @Override - public Permission getPermission() throws IOException { - Permission p = permission; - if (p == null) { - String home = GetPropertyAction.privilegedGetProperty("java.home"); - p = new FilePermission(home + File.separator + "-", "read"); - permission = p; - } - return p; + public Permission getPermission() { + return new RuntimePermission("accessSystemModules"); } /** diff --git a/jdk/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java b/jdk/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java index 7f63ec88264..c4d508070d4 100644 --- a/jdk/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java +++ b/jdk/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -1034,6 +1034,7 @@ class DatagramChannelImpl } } + @SuppressWarnings("deprecation") protected void finalize() throws IOException { // fd is null if constructor threw exception if (fd != null) diff --git a/jdk/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template b/jdk/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template index f2eeaaafdc3..8969ef1a04b 100644 --- a/jdk/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template +++ b/jdk/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template @@ -32,7 +32,6 @@ package sun.nio.cs; import java.nio.charset.Charset; import java.nio.charset.spi.CharsetProvider; import java.util.Iterator; -import java.util.Locale; import java.util.Map; import sun.security.action.GetPropertyAction; @@ -44,13 +43,13 @@ public class StandardCharsets extends CharsetProvider { _INCLUDE_CACHE_MAP_ // Maps canonical names to class names - private Map classMap; + private final Map classMap; // Maps alias names to canonical names - private Map aliasMap; + private final Map aliasMap; // Maps canonical names to cached instances - private Map cache; + private final Map cache; - private String packagePrefix = "sun.nio.cs"; + private static final String packagePrefix = "sun.nio.cs"; public StandardCharsets() { this.aliasMap = new Aliases(); @@ -102,10 +101,16 @@ public class StandardCharsets extends CharsetProvider { if (cln == null) return null; - if (cln.equals("US_ASCII")) { - cs = new US_ASCII(); - cache.put(csn, cs); - return cs; + // As all charset class names added to classMap are string literals we + // can check identity here as an optimization + if (cln == "US_ASCII") { + return cache(csn, new US_ASCII()); + } + if (cln == "ISO_8859_1") { + return cache(csn, new ISO_8859_1()); + } + if (cln == "UTF_8") { + return cache(csn, new UTF_8()); } // Instantiate the charset and cache it @@ -114,9 +119,7 @@ public class StandardCharsets extends CharsetProvider { Object o = Class.forName(packagePrefix + "." + cln, true, this.getClass().getClassLoader()).newInstance(); - cs = (Charset)o; - cache.put(csn, cs); - return cs; + return cache(csn, (Charset)o); } catch (ClassNotFoundException | IllegalAccessException | InstantiationException x) { @@ -124,6 +127,11 @@ public class StandardCharsets extends CharsetProvider { } } + private Charset cache(String csn, Charset cs) { + cache.put(csn, cs); + return cs; + } + public final Charset charsetForName(String charsetName) { synchronized (this) { return lookup(canonicalize(charsetName)); diff --git a/jdk/src/java.base/share/classes/sun/nio/cs/US_ASCII.java b/jdk/src/java.base/share/classes/sun/nio/cs/US_ASCII.java index 39b7df07d85..e85ce61ccd8 100644 --- a/jdk/src/java.base/share/classes/sun/nio/cs/US_ASCII.java +++ b/jdk/src/java.base/share/classes/sun/nio/cs/US_ASCII.java @@ -31,7 +31,6 @@ import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; import java.nio.charset.CoderResult; -import java.util.Arrays; public class US_ASCII extends Charset diff --git a/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java b/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java index 3744002e5a8..46c4e3cd685 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java +++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -123,9 +123,30 @@ public final class TypeAnnotationParser { tmp.add(t); } } + // If a constructor has a mandated outer this, that parameter + // has no annotations and the annotations to parameter mapping + // should be offset by 1. + boolean offset = false; + if (decl instanceof Constructor) { + Constructor ctor = (Constructor) decl; + Class declaringClass = ctor.getDeclaringClass(); + if (!declaringClass.isEnum() && + (declaringClass.isMemberClass() && + (declaringClass.getModifiers() & Modifier.STATIC) == 0) ) { + offset = true; + } + } for (int i = 0; i < size; i++) { - @SuppressWarnings("unchecked") - ArrayList list = l[i]; + ArrayList list; + if (offset) { + @SuppressWarnings("unchecked") + ArrayList tmp = (i == 0) ? null : l[i - 1]; + list = tmp; + } else { + @SuppressWarnings("unchecked") + ArrayList tmp = l[i]; + list = tmp; + } TypeAnnotation[] typeAnnotations; if (list != null) { typeAnnotations = list.toArray(new TypeAnnotation[list.size()]); diff --git a/jdk/src/java.base/share/classes/sun/reflect/misc/MethodUtil.java b/jdk/src/java.base/share/classes/sun/reflect/misc/MethodUtil.java index d3d34da4967..8cb5ca08fcb 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/misc/MethodUtil.java +++ b/jdk/src/java.base/share/classes/sun/reflect/misc/MethodUtil.java @@ -25,7 +25,6 @@ package sun.reflect.misc; -import java.lang.reflect.Module; import java.io.EOFException; import java.security.AllPermission; import java.security.AccessController; diff --git a/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java b/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java index ed69ba3d8b9..6efd90d0670 100644 --- a/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java +++ b/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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,6 +37,7 @@ import java.security.PublicKey; import java.security.Signature; import java.security.SignatureException; import java.security.Timestamp; +import java.security.cert.CertPathValidatorException; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.CertPath; @@ -48,6 +49,7 @@ import java.util.EnumSet; import java.util.Set; import sun.security.timestamp.TimestampToken; +import sun.security.util.ConstraintsParameters; import sun.security.util.Debug; import sun.security.util.DerEncoder; import sun.security.util.DerInputStream; @@ -321,6 +323,8 @@ public class SignerInfo implements DerEncoder { data = content.getContentBytes(); } + ConstraintsParameters cparams = + new ConstraintsParameters(timestamp); String digestAlgname = getDigestAlgorithmId().getName(); byte[] dataSigned; @@ -347,11 +351,11 @@ public class SignerInfo implements DerEncoder { if (messageDigest == null) // fail if there is no message digest return null; - // check that algorithm is not restricted - if (!JAR_DISABLED_CHECK.permits(DIGEST_PRIMITIVE_SET, - digestAlgname, null)) { - throw new SignatureException("Digest check failed. " + - "Disabled algorithm used: " + digestAlgname); + // check that digest algorithm is not restricted + try { + JAR_DISABLED_CHECK.permits(digestAlgname, cparams); + } catch (CertPathValidatorException e) { + throw new SignatureException(e.getMessage(), e); } MessageDigest md = MessageDigest.getInstance(digestAlgname); @@ -385,17 +389,18 @@ public class SignerInfo implements DerEncoder { String algname = AlgorithmId.makeSigAlg( digestAlgname, encryptionAlgname); - // check that algorithm is not restricted - if (!JAR_DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, algname, null)) { - throw new SignatureException("Signature check failed. " + - "Disabled algorithm used: " + algname); + // check that jar signature algorithm is not restricted + try { + JAR_DISABLED_CHECK.permits(algname, cparams); + } catch (CertPathValidatorException e) { + throw new SignatureException(e.getMessage(), e); } X509Certificate cert = getCertificate(block); - PublicKey key = cert.getPublicKey(); if (cert == null) { return null; } + PublicKey key = cert.getPublicKey(); // check if the public key is restricted if (!JAR_DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) { diff --git a/jdk/src/java.base/share/classes/sun/security/pkcs10/PKCS10.java b/jdk/src/java.base/share/classes/sun/security/pkcs10/PKCS10.java index 02ed730b9af..9302580db1c 100644 --- a/jdk/src/java.base/share/classes/sun/security/pkcs10/PKCS10.java +++ b/jdk/src/java.base/share/classes/sun/security/pkcs10/PKCS10.java @@ -167,7 +167,8 @@ public class PKCS10 { // key and signature algorithm we found. // try { - sig = Signature.getInstance(id.getName()); + sigAlg = id.getName(); + sig = Signature.getInstance(sigAlg); sig.initVerify(subjectPublicKeyInfo); sig.update(data); if (!sig.verify(sigData)) @@ -218,6 +219,7 @@ public class PKCS10 { signature.update(certificateRequestInfo, 0, certificateRequestInfo.length); sig = signature.sign(); + sigAlg = signature.getAlgorithm(); /* * Build guts of SIGNED macro @@ -250,6 +252,11 @@ public class PKCS10 { public PublicKey getSubjectPublicKeyInfo() { return subjectPublicKeyInfo; } + /** + * Returns the signature algorithm. + */ + public String getSigAlg() { return sigAlg; } + /** * Returns the additional attributes requested. */ @@ -348,6 +355,7 @@ public class PKCS10 { private X500Name subject; private PublicKey subjectPublicKeyInfo; + private String sigAlg; private PKCS10Attributes attributeSet; private byte[] encoded; // signed } diff --git a/jdk/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java b/jdk/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java index baf3b541756..9c0e0b7dc05 100644 --- a/jdk/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java +++ b/jdk/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java @@ -2408,9 +2408,9 @@ public final class PKCS12KeyStore extends KeyStoreSpi { { 0x3081000201033081L, 0x0006092A864886F7L, 0x0D010701A0810004L }, { 0x3082000002010330L, 0x810006092A864886L, 0xF70D010701A08100L }, { 0x3083000000020103L, 0x3082000006092A86L, 0x4886F70D010701A0L }, - { 0x3083000000020103L, 0x308200000006092AL, 0x864886F70D010701L }, - { 0x3084000000000201L, 0x0330820000000609L, 0x2A864886F70D0107L }, - { 0x3084000000000201L, 0x0330820000000006L, 0x092A864886F70D01L } + { 0x3083000000020103L, 0x308300000006092AL, 0x864886F70D010701L }, + { 0x3084000000000201L, 0x0330830000000609L, 0x2A864886F70D0107L }, + { 0x3084000000000201L, 0x0330840000000006L, 0x092A864886F70D01L } }; private static final long[][] PKCS12_HEADER_MASKS = { diff --git a/jdk/src/java.base/share/classes/sun/security/provider/KeyProtector.java b/jdk/src/java.base/share/classes/sun/security/provider/KeyProtector.java index ef7a1f43ffb..bffa1f5b283 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/KeyProtector.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/KeyProtector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -147,6 +147,7 @@ final class KeyProtector { * Ensures that the password bytes of this key protector are * set to zero when there are no more references to it. */ + @SuppressWarnings("deprecation") protected void finalize() { if (passwdBytes != null) { Arrays.fill(passwdBytes, (byte)0x00); diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java index 90559598aee..f7bedb99ccb 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +28,7 @@ package sun.security.provider.certpath; import java.security.AlgorithmConstraints; import java.security.CryptoPrimitive; import java.security.Timestamp; +import java.security.cert.CertPathValidator; import java.util.Collection; import java.util.Collections; import java.util.Date; @@ -53,9 +54,10 @@ import java.security.interfaces.DSAPublicKey; import java.security.spec.DSAPublicKeySpec; import sun.security.util.AnchorCertificates; -import sun.security.util.CertConstraintParameters; +import sun.security.util.ConstraintsParameters; import sun.security.util.Debug; import sun.security.util.DisabledAlgorithmConstraints; +import sun.security.validator.Validator; import sun.security.x509.X509CertImpl; import sun.security.x509.X509CRLImpl; import sun.security.x509.AlgorithmId; @@ -79,6 +81,7 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { private final Date pkixdate; private PublicKey prevPubKey; private final Timestamp jarTimestamp; + private final String variant; private static final Set SIGNATURE_PRIMITIVE_SET = Collections.unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE)); @@ -103,87 +106,56 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { private boolean trustedMatch = false; /** - * Create a new {@code AlgorithmChecker} with the algorithm - * constraints specified in security property - * "jdk.certpath.disabledAlgorithms". + * Create a new {@code AlgorithmChecker} with the given algorithm + * given {@code TrustAnchor} and {@code String} variant. * * @param anchor the trust anchor selected to validate the target * certificate + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. */ - public AlgorithmChecker(TrustAnchor anchor) { - this(anchor, certPathDefaultConstraints, null); - } - - /** - * Create a new {@code AlgorithmChecker} with the - * given {@code TrustAnchor} and {@code AlgorithmConstraints}. - * - * @param anchor the trust anchor selected to validate the target - * certificate - * @param constraints the algorithm constraints (or null) - * - * @throws IllegalArgumentException if the {@code anchor} is null - */ - public AlgorithmChecker(TrustAnchor anchor, - AlgorithmConstraints constraints) { - this(anchor, constraints, null); - } - - /** - * Create a new {@code AlgorithmChecker} with the - * given {@code AlgorithmConstraints}. - *

            - * Note that this constructor will be used to check a certification - * path where the trust anchor is unknown, or a certificate list which may - * contain the trust anchor. This constructor is used by SunJSSE. - * - * @param constraints the algorithm constraints (or null) - */ - public AlgorithmChecker(AlgorithmConstraints constraints) { - this.prevPubKey = null; - this.trustedPubKey = null; - this.constraints = constraints; - this.pkixdate = null; - this.jarTimestamp = null; + public AlgorithmChecker(TrustAnchor anchor, String variant) { + this(anchor, certPathDefaultConstraints, null, null, variant); } /** * Create a new {@code AlgorithmChecker} with the given - * {@code Timestamp}. - *

            - * Note that this constructor will be used to check a certification - * path for signed JAR files that are timestamped. + * {@code AlgorithmConstraints}, {@code Timestamp}, and {@code String} + * variant. * + * Note that this constructor can initialize a variation of situations where + * the AlgorithmConstraints, Timestamp, or Variant maybe known. + * + * @param constraints the algorithm constraints (or null) * @param jarTimestamp Timestamp passed for JAR timestamp constraint * checking. Set to null if not applicable. + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. */ - public AlgorithmChecker(Timestamp jarTimestamp) { - this.prevPubKey = null; - this.trustedPubKey = null; - this.constraints = certPathDefaultConstraints; - if (jarTimestamp == null) { - throw new IllegalArgumentException( - "Timestamp cannot be null"); - } - this.pkixdate = jarTimestamp.getTimestamp(); - this.jarTimestamp = jarTimestamp; + public AlgorithmChecker(AlgorithmConstraints constraints, + Timestamp jarTimestamp, String variant) { + this(null, constraints, null, jarTimestamp, variant); } /** * Create a new {@code AlgorithmChecker} with the - * given {@code TrustAnchor} and {@code AlgorithmConstraints}. + * given {@code TrustAnchor}, {@code AlgorithmConstraints}, + * {@code Timestamp}, and {@code String} variant. * * @param anchor the trust anchor selected to validate the target * certificate * @param constraints the algorithm constraints (or null) - * @param pkixdate Date the constraints are checked against. The value is - * either the PKIXParameter date or null for the current date. - * - * @throws IllegalArgumentException if the {@code anchor} is null + * @param pkixdate The date specified by the PKIXParameters date. If the + * PKIXParameters is null, the current date is used. This + * should be null when jar files are being checked. + * @param jarTimestamp Timestamp passed for JAR timestamp constraint + * checking. Set to null if not applicable. + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. */ public AlgorithmChecker(TrustAnchor anchor, - AlgorithmConstraints constraints, - Date pkixdate) { + AlgorithmConstraints constraints, Date pkixdate, + Timestamp jarTimestamp, String variant) { if (anchor != null) { if (anchor.getTrustedCert() != null) { @@ -203,25 +175,30 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { } } - this.prevPubKey = trustedPubKey; - this.constraints = constraints; - this.pkixdate = pkixdate; - this.jarTimestamp = null; + this.prevPubKey = this.trustedPubKey; + this.constraints = (constraints == null ? certPathDefaultConstraints : + constraints); + // If we are checking jar files, set pkixdate the same as the timestamp + // for certificate checking + this.pkixdate = (jarTimestamp != null ? jarTimestamp.getTimestamp() : + pkixdate); + this.jarTimestamp = jarTimestamp; + this.variant = (variant == null ? Validator.VAR_GENERIC : variant); } /** - * Create a new {@code AlgorithmChecker} with the - * given {@code TrustAnchor} and {@code PKIXParameter} date. + * Create a new {@code AlgorithmChecker} with the given {@code TrustAnchor}, + * {@code PKIXParameter} date, and {@code varient} * * @param anchor the trust anchor selected to validate the target * certificate * @param pkixdate Date the constraints are checked against. The value is - * either the PKIXParameter date or null for the current date. - * - * @throws IllegalArgumentException if the {@code anchor} is null + * either the PKIXParameters date or null for the current date. + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. */ - public AlgorithmChecker(TrustAnchor anchor, Date pkixdate) { - this(anchor, certPathDefaultConstraints, pkixdate); + public AlgorithmChecker(TrustAnchor anchor, Date pkixdate, String variant) { + this(anchor, certPathDefaultConstraints, pkixdate, null, variant); } // Check this 'cert' for restrictions in the AnchorCertificates @@ -237,10 +214,6 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { return AnchorCertificates.contains(cert); } - Timestamp getJarTimestamp() { - return jarTimestamp; - } - @Override public void init(boolean forward) throws CertPathValidatorException { // Note that this class does not support forward mode. @@ -286,6 +259,28 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { null, null, -1, PKIXReason.INVALID_KEY_USAGE); } + X509CertImpl x509Cert; + AlgorithmId algorithmId; + try { + x509Cert = X509CertImpl.toImpl((X509Certificate)cert); + algorithmId = (AlgorithmId)x509Cert.get(X509CertImpl.SIG_ALG); + } catch (CertificateException ce) { + throw new CertPathValidatorException(ce); + } + + AlgorithmParameters currSigAlgParams = algorithmId.getParameters(); + PublicKey currPubKey = cert.getPublicKey(); + String currSigAlg = ((X509Certificate)cert).getSigAlgName(); + + // Check the signature algorithm and parameters against constraints. + if (!constraints.permits(SIGNATURE_PRIMITIVE_SET, currSigAlg, + currSigAlgParams)) { + throw new CertPathValidatorException( + "Algorithm constraints check failed on signature " + + "algorithm: " + currSigAlg, null, null, -1, + BasicReason.ALGORITHM_CONSTRAINED); + } + // Assume all key usage bits are set if key usage is not present Set primitives = KU_PRIMITIVE_SET; @@ -322,101 +317,74 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { } } - PublicKey currPubKey = cert.getPublicKey(); + ConstraintsParameters cp = + new ConstraintsParameters((X509Certificate)cert, + trustedMatch, pkixdate, jarTimestamp, variant); + // Check against local constraints if it is DisabledAlgorithmConstraints if (constraints instanceof DisabledAlgorithmConstraints) { - // Check against DisabledAlgorithmConstraints certpath constraints. - // permits() will throw exception on failure. - ((DisabledAlgorithmConstraints)constraints).permits(primitives, - new CertConstraintParameters((X509Certificate)cert, - trustedMatch, pkixdate, jarTimestamp)); - // If there is no previous key, set one and exit - if (prevPubKey == null) { - prevPubKey = currPubKey; - return; - } - } - - X509CertImpl x509Cert; - AlgorithmId algorithmId; - try { - x509Cert = X509CertImpl.toImpl((X509Certificate)cert); - algorithmId = (AlgorithmId)x509Cert.get(X509CertImpl.SIG_ALG); - } catch (CertificateException ce) { - throw new CertPathValidatorException(ce); - } - - AlgorithmParameters currSigAlgParams = algorithmId.getParameters(); - String currSigAlg = x509Cert.getSigAlgName(); - - // If 'constraints' is not of DisabledAlgorithmConstraints, check all - // everything individually - if (!(constraints instanceof DisabledAlgorithmConstraints)) { - // Check the current signature algorithm - if (!constraints.permits( - SIGNATURE_PRIMITIVE_SET, - currSigAlg, currSigAlgParams)) { - throw new CertPathValidatorException( - "Algorithm constraints check failed on signature " + - "algorithm: " + currSigAlg, null, null, -1, - BasicReason.ALGORITHM_CONSTRAINED); - } + ((DisabledAlgorithmConstraints)constraints).permits(currSigAlg, cp); + // DisabledAlgorithmsConstraints does not check primitives, so key + // additional key check. + } else { + // Perform the default constraints checking anyway. + certPathDefaultConstraints.permits(currSigAlg, cp); + // Call locally set constraints to check key with primitives. if (!constraints.permits(primitives, currPubKey)) { throw new CertPathValidatorException( - "Algorithm constraints check failed on keysize: " + - sun.security.util.KeyUtil.getKeySize(currPubKey), + "Algorithm constraints check failed on key " + + currPubKey.getAlgorithm() + " with size of " + + sun.security.util.KeyUtil.getKeySize(currPubKey) + + "bits", null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); } } + // If there is no previous key, set one and exit + if (prevPubKey == null) { + prevPubKey = currPubKey; + return; + } + // Check with previous cert for signature algorithm and public key - if (prevPubKey != null) { - if (!constraints.permits( - SIGNATURE_PRIMITIVE_SET, - currSigAlg, prevPubKey, currSigAlgParams)) { - throw new CertPathValidatorException( + if (!constraints.permits( + SIGNATURE_PRIMITIVE_SET, + currSigAlg, prevPubKey, currSigAlgParams)) { + throw new CertPathValidatorException( "Algorithm constraints check failed on " + "signature algorithm: " + currSigAlg, null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); + } + + // Inherit key parameters from previous key + if (PKIX.isDSAPublicKeyWithoutParams(currPubKey)) { + // Inherit DSA parameters from previous key + if (!(prevPubKey instanceof DSAPublicKey)) { + throw new CertPathValidatorException("Input key is not " + + "of a appropriate type for inheriting parameters"); } - // Inherit key parameters from previous key - if (PKIX.isDSAPublicKeyWithoutParams(currPubKey)) { - // Inherit DSA parameters from previous key - if (!(prevPubKey instanceof DSAPublicKey)) { - throw new CertPathValidatorException("Input key is not " + - "of a appropriate type for inheriting parameters"); - } - - DSAParams params = ((DSAPublicKey)prevPubKey).getParams(); - if (params == null) { - throw new CertPathValidatorException( + DSAParams params = ((DSAPublicKey)prevPubKey).getParams(); + if (params == null) { + throw new CertPathValidatorException( "Key parameters missing from public key."); - } + } - try { - BigInteger y = ((DSAPublicKey)currPubKey).getY(); - KeyFactory kf = KeyFactory.getInstance("DSA"); - DSAPublicKeySpec ks = new DSAPublicKeySpec(y, - params.getP(), - params.getQ(), - params.getG()); - currPubKey = kf.generatePublic(ks); - } catch (GeneralSecurityException e) { - throw new CertPathValidatorException("Unable to generate " + + try { + BigInteger y = ((DSAPublicKey)currPubKey).getY(); + KeyFactory kf = KeyFactory.getInstance("DSA"); + DSAPublicKeySpec ks = new DSAPublicKeySpec(y, params.getP(), + params.getQ(), params.getG()); + currPubKey = kf.generatePublic(ks); + } catch (GeneralSecurityException e) { + throw new CertPathValidatorException("Unable to generate " + "key with inherited parameters: " + e.getMessage(), e); - } } } // reset the previous public key prevPubKey = currPubKey; - - // check the extended key usage, ignore the check now - // List extendedKeyUsages = x509Cert.getExtendedKeyUsage(); - - // DO NOT remove any unresolved critical extensions } /** @@ -456,8 +424,10 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { * * @param key the public key to verify the CRL signature * @param crl the target CRL + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. */ - static void check(PublicKey key, X509CRL crl) + static void check(PublicKey key, X509CRL crl, String variant) throws CertPathValidatorException { X509CRLImpl x509CRLImpl = null; @@ -468,7 +438,7 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { } AlgorithmId algorithmId = x509CRLImpl.getSigAlgId(); - check(key, algorithmId); + check(key, algorithmId, variant); } /** @@ -476,20 +446,16 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { * * @param key the public key to verify the CRL signature * @param algorithmId signature algorithm Algorithm ID + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. */ - static void check(PublicKey key, AlgorithmId algorithmId) + static void check(PublicKey key, AlgorithmId algorithmId, String variant) throws CertPathValidatorException { String sigAlgName = algorithmId.getName(); AlgorithmParameters sigAlgParams = algorithmId.getParameters(); - if (!certPathDefaultConstraints.permits( - SIGNATURE_PRIMITIVE_SET, sigAlgName, key, sigAlgParams)) { - throw new CertPathValidatorException( - "Algorithm constraints check failed on signature algorithm: " + - sigAlgName + " is disabled", - null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); - } + certPathDefaultConstraints.permits(new ConstraintsParameters( + sigAlgName, sigAlgParams, key, variant)); } - } diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/BasicChecker.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/BasicChecker.java index 49a0368753e..43ff7b7cd9d 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/BasicChecker.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/BasicChecker.java @@ -51,7 +51,7 @@ import sun.security.util.Debug; /** * BasicChecker is a PKIXCertPathChecker that checks the basic information - * on a PKIX certificate, namely the signature, timestamp, and subject/issuer + * on a PKIX certificate, namely the signature, validity, and subject/issuer * name chaining. * * @since 1.4 @@ -125,7 +125,7 @@ class BasicChecker extends PKIXCertPathChecker { } /** - * Performs the signature, timestamp, and subject/issuer name chaining + * Performs the signature, validity, and subject/issuer name chaining * checks on the certificate using its internal state. This method does * not remove any critical extensions from the Collection. * @@ -141,7 +141,7 @@ class BasicChecker extends PKIXCertPathChecker { X509Certificate currCert = (X509Certificate)cert; if (!sigOnly) { - verifyTimestamp(currCert); + verifyValidity(currCert); verifyNameChaining(currCert); } verifySignature(currCert); @@ -177,12 +177,12 @@ class BasicChecker extends PKIXCertPathChecker { } /** - * Internal method to verify the timestamp on a certificate + * Internal method to verify the validity on a certificate */ - private void verifyTimestamp(X509Certificate cert) + private void verifyValidity(X509Certificate cert) throws CertPathValidatorException { - String msg = "timestamp"; + String msg = "validity"; if (debug != null) debug.println("---checking " + msg + ":" + date.toString() + "..."); diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java index 95ef350a9d3..0f16c646a9c 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, 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 @@ -33,6 +33,7 @@ import javax.security.auth.x500.X500Principal; import java.util.*; import sun.security.util.Debug; +import sun.security.validator.Validator; import static sun.security.x509.PKIXExtensions.*; import sun.security.x509.*; @@ -65,6 +66,20 @@ public class DistributionPointFetcher { * Return the X509CRLs matching this selector. The selector must be * an X509CRLSelector with certificateChecking set. */ + public static Collection getCRLs(X509CRLSelector selector, + boolean signFlag, PublicKey prevKey, String provider, + List certStores, boolean[] reasonsMask, + Set trustAnchors, Date validity, String variant) + throws CertStoreException + { + return getCRLs(selector, signFlag, prevKey, null, provider, certStores, + reasonsMask, trustAnchors, validity, variant); + } + /** + * Return the X509CRLs matching this selector. The selector must be + * an X509CRLSelector with certificateChecking set. + */ + // Called by com.sun.deploy.security.RevocationChecker public static Collection getCRLs(X509CRLSelector selector, boolean signFlag, PublicKey prevKey, @@ -76,7 +91,7 @@ public class DistributionPointFetcher { throws CertStoreException { return getCRLs(selector, signFlag, prevKey, null, provider, certStores, - reasonsMask, trustAnchors, validity); + reasonsMask, trustAnchors, validity, Validator.VAR_GENERIC); } /** @@ -91,7 +106,8 @@ public class DistributionPointFetcher { List certStores, boolean[] reasonsMask, Set trustAnchors, - Date validity) + Date validity, + String variant) throws CertStoreException { X509Certificate cert = selector.getCertificateChecking(); @@ -120,7 +136,7 @@ public class DistributionPointFetcher { DistributionPoint point = t.next(); Collection crls = getCRLs(selector, certImpl, point, reasonsMask, signFlag, prevKey, prevCert, provider, - certStores, trustAnchors, validity); + certStores, trustAnchors, validity, variant); results.addAll(crls); } if (debug != null) { @@ -145,7 +161,7 @@ public class DistributionPointFetcher { X509CertImpl certImpl, DistributionPoint point, boolean[] reasonsMask, boolean signFlag, PublicKey prevKey, X509Certificate prevCert, String provider, List certStores, - Set trustAnchors, Date validity) + Set trustAnchors, Date validity, String variant) throws CertStoreException { // check for full name @@ -208,7 +224,7 @@ public class DistributionPointFetcher { selector.setIssuerNames(null); if (selector.match(crl) && verifyCRL(certImpl, point, crl, reasonsMask, signFlag, prevKey, prevCert, provider, - trustAnchors, certStores, validity)) { + trustAnchors, certStores, validity, variant)) { crls.add(crl); } } catch (IOException | CRLException e) { @@ -316,7 +332,7 @@ public class DistributionPointFetcher { X509CRL crl, boolean[] reasonsMask, boolean signFlag, PublicKey prevKey, X509Certificate prevCert, String provider, Set trustAnchors, List certStores, - Date validity) throws CRLException, IOException { + Date validity, String variant) throws CRLException, IOException { if (debug != null) { debug.println("DistributionPointFetcher.verifyCRL: " + @@ -663,7 +679,7 @@ public class DistributionPointFetcher { // check the crl signature algorithm try { - AlgorithmChecker.check(prevKey, crl); + AlgorithmChecker.check(prevKey, crl, variant); } catch (CertPathValidatorException cpve) { if (debug != null) { debug.println("CRL signature algorithm check failed: " + cpve); diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java index 8753072e9d0..dce73028cd0 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -45,6 +45,7 @@ import java.util.Map; import sun.security.action.GetIntegerAction; import sun.security.util.Debug; +import sun.security.validator.Validator; import sun.security.x509.AccessDescription; import sun.security.x509.AuthorityInfoAccessExtension; import sun.security.x509.GeneralName; @@ -94,42 +95,6 @@ public final class OCSP { private OCSP() {} - /** - * Obtains the revocation status of a certificate using OCSP using the most - * common defaults. The OCSP responder URI is retrieved from the - * certificate's AIA extension. The OCSP responder certificate is assumed - * to be the issuer's certificate (or issued by the issuer CA). - * - * @param cert the certificate to be checked - * @param issuerCert the issuer certificate - * @return the RevocationStatus - * @throws IOException if there is an exception connecting to or - * communicating with the OCSP responder - * @throws CertPathValidatorException if an exception occurs while - * encoding the OCSP Request or validating the OCSP Response - */ - public static RevocationStatus check(X509Certificate cert, - X509Certificate issuerCert) - throws IOException, CertPathValidatorException { - CertId certId = null; - URI responderURI = null; - try { - X509CertImpl certImpl = X509CertImpl.toImpl(cert); - responderURI = getResponderURI(certImpl); - if (responderURI == null) { - throw new CertPathValidatorException - ("No OCSP Responder URI in certificate"); - } - certId = new CertId(issuerCert, certImpl.getSerialNumberObject()); - } catch (CertificateException | IOException e) { - throw new CertPathValidatorException - ("Exception while encoding OCSPRequest", e); - } - OCSPResponse ocspResponse = check(Collections.singletonList(certId), - responderURI, new OCSPResponse.IssuerInfo(issuerCert), null, null, - Collections.emptyList()); - return (RevocationStatus)ocspResponse.getSingleResponse(certId); - } /** * Obtains the revocation status of a certificate using OCSP. @@ -146,6 +111,8 @@ public final class OCSP { * @throws CertPathValidatorException if an exception occurs while * encoding the OCSP Request or validating the OCSP Response */ + + // Called by com.sun.deploy.security.TrustDecider public static RevocationStatus check(X509Certificate cert, X509Certificate issuerCert, URI responderURI, @@ -154,27 +121,27 @@ public final class OCSP { throws IOException, CertPathValidatorException { return check(cert, issuerCert, responderURI, responderCert, date, - Collections.emptyList()); + Collections.emptyList(), Validator.VAR_GENERIC); } - // Called by com.sun.deploy.security.TrustDecider + public static RevocationStatus check(X509Certificate cert, - X509Certificate issuerCert, - URI responderURI, - X509Certificate responderCert, - Date date, List extensions) + X509Certificate issuerCert, URI responderURI, + X509Certificate responderCert, Date date, List extensions, + String variant) throws IOException, CertPathValidatorException { - return check(cert, responderURI, null, issuerCert, responderCert, date, extensions); + return check(cert, responderURI, null, issuerCert, responderCert, date, + extensions, variant); } public static RevocationStatus check(X509Certificate cert, URI responderURI, TrustAnchor anchor, X509Certificate issuerCert, X509Certificate responderCert, Date date, - List extensions) + List extensions, String variant) throws IOException, CertPathValidatorException { - CertId certId = null; + CertId certId; try { X509CertImpl certImpl = X509CertImpl.toImpl(cert); certId = new CertId(issuerCert, certImpl.getSerialNumberObject()); @@ -184,7 +151,7 @@ public final class OCSP { } OCSPResponse ocspResponse = check(Collections.singletonList(certId), responderURI, new OCSPResponse.IssuerInfo(anchor, issuerCert), - responderCert, date, extensions); + responderCert, date, extensions, variant); return (RevocationStatus) ocspResponse.getSingleResponse(certId); } @@ -206,10 +173,10 @@ public final class OCSP { * @throws CertPathValidatorException if an exception occurs while * encoding the OCSP Request or validating the OCSP Response */ - static OCSPResponse check(List certIds, URI responderURI, + static OCSPResponse check(List certIds, URI responderURI, OCSPResponse.IssuerInfo issuerInfo, X509Certificate responderCert, Date date, - List extensions) + List extensions, String variant) throws IOException, CertPathValidatorException { byte[] nonce = null; @@ -226,7 +193,7 @@ public final class OCSP { // verify the response ocspResponse.verify(certIds, issuerInfo, responderCert, date, - nonce); + nonce, variant); } catch (IOException ioe) { throw new CertPathValidatorException( "Unable to determine revocation status due to network error", diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java index d1770da153a..11f1b0996db 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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,6 @@ import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; import javax.security.auth.x500.X500Principal; @@ -375,7 +374,8 @@ public final class OCSPResponse { } void verify(List certIds, IssuerInfo issuerInfo, - X509Certificate responderCert, Date date, byte[] nonce) + X509Certificate responderCert, Date date, byte[] nonce, + String variant) throws CertPathValidatorException { switch (responseStatus) { @@ -508,7 +508,8 @@ public final class OCSPResponse { // Check algorithm constraints specified in security property // "jdk.certpath.disabledAlgorithms". AlgorithmChecker algChecker = - new AlgorithmChecker(issuerInfo.getAnchor(), date); + new AlgorithmChecker(issuerInfo.getAnchor(), date, + variant); algChecker.init(false); algChecker.check(signerCert, Collections.emptySet()); @@ -568,7 +569,7 @@ public final class OCSPResponse { if (signerCert != null) { // Check algorithm constraints specified in security property // "jdk.certpath.disabledAlgorithms". - AlgorithmChecker.check(signerCert.getPublicKey(), sigAlgId); + AlgorithmChecker.check(signerCert.getPublicKey(), sigAlgId, variant); if (!verifySignature(signerCert)) { throw new CertPathValidatorException( diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java index f6b0b2ed6f3..8a177c04fc1 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java @@ -1,5 +1,5 @@ /* - * 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 @@ -87,6 +87,7 @@ class PKIX { private Set anchors; private List certs; private Timestamp timestamp; + private String variant; ValidatorParams(CertPath cp, PKIXParameters params) throws InvalidAlgorithmParameterException @@ -102,8 +103,9 @@ class PKIX { ValidatorParams(PKIXParameters params) throws InvalidAlgorithmParameterException { - if (params instanceof PKIXTimestampParameters) { - timestamp = ((PKIXTimestampParameters) params).getTimestamp(); + if (params instanceof PKIXExtendedParameters) { + timestamp = ((PKIXExtendedParameters) params).getTimestamp(); + variant = ((PKIXExtendedParameters) params).getVariant(); } this.anchors = params.getTrustAnchors(); @@ -199,6 +201,10 @@ class PKIX { Timestamp timestamp() { return timestamp; } + + String variant() { + return variant; + } } static class BuilderParams extends ValidatorParams { diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java index ac12fab75ab..53ae439baf3 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -172,11 +172,8 @@ public final class PKIXCertPathValidator extends CertPathValidatorSpi { List certPathCheckers = new ArrayList<>(); // add standard checkers that we will be using certPathCheckers.add(untrustedChecker); - if (params.timestamp() == null) { - certPathCheckers.add(new AlgorithmChecker(anchor, params.date())); - } else { - certPathCheckers.add(new AlgorithmChecker(params.timestamp())); - } + certPathCheckers.add(new AlgorithmChecker(anchor, null, params.date(), + params.timestamp(), params.variant())); certPathCheckers.add(new KeyChecker(certPathLen, params.targetCertConstraints())); certPathCheckers.add(new ConstraintsChecker(certPathLen)); @@ -194,13 +191,10 @@ public final class PKIXCertPathValidator extends CertPathValidatorSpi { certPathCheckers.add(pc); // default value for date is current time BasicChecker bc; - if (params.timestamp() == null) { - bc = new BasicChecker(anchor, params.date(), params.sigProvider(), - false); - } else { - bc = new BasicChecker(anchor, params.timestamp().getTimestamp(), - params.sigProvider(), false); - } + bc = new BasicChecker(anchor, + (params.timestamp() == null ? params.date() : + params.timestamp().getTimestamp()), + params.sigProvider(), false); certPathCheckers.add(bc); boolean revCheckerAdded = false; diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXTimestampParameters.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXExtendedParameters.java similarity index 91% rename from jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXTimestampParameters.java rename to jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXExtendedParameters.java index 34b497188e0..42c2d1f9c4f 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXTimestampParameters.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXExtendedParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -39,19 +39,23 @@ import java.util.Set; /** * This class is a wrapper for PKIXBuilderParameters so that a Timestamp object - * can be passed alone when PKIXCertPath is checking signed jar files. + * and a string for the variant type, can be passed when doing certpath + * checking. */ -public class PKIXTimestampParameters extends PKIXBuilderParameters { +public class PKIXExtendedParameters extends PKIXBuilderParameters { private final PKIXBuilderParameters p; private Timestamp jarTimestamp; + private final String variant; - public PKIXTimestampParameters(PKIXBuilderParameters params, - Timestamp timestamp) throws InvalidAlgorithmParameterException { + public PKIXExtendedParameters(PKIXBuilderParameters params, + Timestamp timestamp, String variant) + throws InvalidAlgorithmParameterException { super(params.getTrustAnchors(), null); p = params; jarTimestamp = timestamp; + this.variant = variant; } public Timestamp getTimestamp() { @@ -61,6 +65,10 @@ public class PKIXTimestampParameters extends PKIXBuilderParameters { jarTimestamp = t; } + public String getVariant() { + return variant; + } + @Override public void setDate(Date d) { p.setDate(d); diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java index 5fba1666119..9b443a733dd 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java @@ -1,5 +1,5 @@ /* - * 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 @@ -579,7 +579,7 @@ class RevocationChecker extends PKIXRevocationChecker { approvedCRLs.addAll(DistributionPointFetcher.getCRLs( sel, signFlag, prevKey, prevCert, params.sigProvider(), certStores, - reasonsMask, anchors, null)); + reasonsMask, anchors, null, params.variant())); } } catch (CertStoreException e) { if (e instanceof CertStoreTypeException) { @@ -727,7 +727,7 @@ class RevocationChecker extends PKIXRevocationChecker { } } response.verify(Collections.singletonList(certId), issuerInfo, - responderCert, params.date(), nonce); + responderCert, params.date(), nonce, params.variant()); } else { URI responderURI = (this.responderURI != null) @@ -741,7 +741,7 @@ class RevocationChecker extends PKIXRevocationChecker { response = OCSP.check(Collections.singletonList(certId), responderURI, issuerInfo, responderCert, null, - ocspExtensions); + ocspExtensions, params.variant()); } } catch (IOException e) { throw new CertPathValidatorException( @@ -853,7 +853,7 @@ class RevocationChecker extends PKIXRevocationChecker { if (DistributionPointFetcher.verifyCRL( certImpl, point, crl, reasonsMask, signFlag, prevKey, null, params.sigProvider(), anchors, - certStores, params.date())) + certStores, params.date(), params.variant())) { results.add(crl); } diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java index c0cc98a7a36..11d8a067329 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -344,7 +344,7 @@ public final class SunCertPathBuilder extends CertPathBuilderSpi { // add the algorithm checker checkers.add(new AlgorithmChecker(builder.trustAnchor, - buildParams.date())); + buildParams.date(), null)); BasicChecker basicChecker = null; if (nextState.keyParamsNeeded()) { diff --git a/jdk/src/java.base/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java b/jdk/src/java.base/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java index 7b1fcce7eba..45cb91ff6c6 100644 --- a/jdk/src/java.base/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -191,14 +191,22 @@ public final class RSAPrivateCrtKeyImpl if (version != 0) { throw new IOException("Version must be 0"); } - n = getBigInteger(data); - e = getBigInteger(data); - d = getBigInteger(data); - p = getBigInteger(data); - q = getBigInteger(data); - pe = getBigInteger(data); - qe = getBigInteger(data); - coeff = getBigInteger(data); + + /* + * Some implementations do not correctly encode ASN.1 INTEGER values + * in 2's complement format, resulting in a negative integer when + * decoded. Correct the error by converting it to a positive integer. + * + * See CR 6255949 + */ + n = data.getPositiveBigInteger(); + e = data.getPositiveBigInteger(); + d = data.getPositiveBigInteger(); + p = data.getPositiveBigInteger(); + q = data.getPositiveBigInteger(); + pe = data.getPositiveBigInteger(); + qe = data.getPositiveBigInteger(); + coeff = data.getPositiveBigInteger(); if (derValue.data.available() != 0) { throw new IOException("Extra data available"); } @@ -206,23 +214,4 @@ public final class RSAPrivateCrtKeyImpl throw new InvalidKeyException("Invalid RSA private key", e); } } - - /** - * Read a BigInteger from the DerInputStream. - */ - static BigInteger getBigInteger(DerInputStream data) throws IOException { - BigInteger b = data.getBigInteger(); - - /* - * Some implementations do not correctly encode ASN.1 INTEGER values - * in 2's complement format, resulting in a negative integer when - * decoded. Correct the error by converting it to a positive integer. - * - * See CR 6255949 - */ - if (b.signum() < 0) { - b = new BigInteger(1, b.toByteArray()); - } - return b; - } } diff --git a/jdk/src/java.base/share/classes/sun/security/rsa/RSAPublicKeyImpl.java b/jdk/src/java.base/share/classes/sun/security/rsa/RSAPublicKeyImpl.java index 52c0d6718d7..5f2afac4df9 100644 --- a/jdk/src/java.base/share/classes/sun/security/rsa/RSAPublicKeyImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/rsa/RSAPublicKeyImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -111,8 +111,8 @@ public final class RSAPublicKeyImpl extends X509Key implements RSAPublicKey { throw new IOException("Not a SEQUENCE"); } DerInputStream data = derValue.data; - n = RSAPrivateCrtKeyImpl.getBigInteger(data); - e = RSAPrivateCrtKeyImpl.getBigInteger(data); + n = data.getPositiveBigInteger(); + e = data.getPositiveBigInteger(); if (derValue.data.available() != 0) { throw new IOException("Extra data available"); } diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/BaseSSLSocketImpl.java b/jdk/src/java.base/share/classes/sun/security/ssl/BaseSSLSocketImpl.java index a09932d94e5..51560f5872d 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/BaseSSLSocketImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/BaseSSLSocketImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, 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 @@ -265,6 +265,7 @@ abstract class BaseSSLSocketImpl extends SSLSocket { * the penalty of prematurly killing SSL sessions. */ @Override + @SuppressWarnings("deprecation") protected final void finalize() throws Throwable { try { close(); diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java b/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java index d4f2848c973..c91b25e72ef 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -43,6 +43,9 @@ import sun.security.action.GetPropertyAction; final class EllipticCurvesExtension extends HelloExtension { + /* Class and subclass dynamic debugging support */ + private static final Debug debug = Debug.getInstance("ssl"); + private static final int ARBITRARY_PRIME = 0xff01; private static final int ARBITRARY_CHAR2 = 0xff02; @@ -159,6 +162,11 @@ final class EllipticCurvesExtension extends HelloExtension { } // ignore unknown curves } } + if (idList.isEmpty() && JsseJce.isEcAvailable()) { + throw new IllegalArgumentException( + "System property jdk.tls.namedGroups(" + property + ") " + + "contains no supported elliptic curves"); + } } else { // default curves int[] ids; if (requireFips) { @@ -183,16 +191,17 @@ final class EllipticCurvesExtension extends HelloExtension { } } - if (idList.isEmpty()) { - throw new IllegalArgumentException( - "System property jdk.tls.namedGroups(" + property + ") " + - "contains no supported elliptic curves"); - } else { - supportedCurveIds = new int[idList.size()]; - int i = 0; - for (Integer id : idList) { - supportedCurveIds[i++] = id; - } + if (debug != null && idList.isEmpty()) { + Debug.log( + "Initialized [jdk.tls.namedGroups|default] list contains " + + "no available elliptic curves. " + + (property != null ? "(" + property + ")" : "[Default]")); + } + + supportedCurveIds = new int[idList.size()]; + int i = 0; + for (Integer id : idList) { + supportedCurveIds[i++] = id; } } diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java b/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java index 46ae8d5281e..4f0a95ff80b 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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,6 +37,7 @@ import javax.net.ssl.*; import sun.security.provider.certpath.AlgorithmChecker; import sun.security.action.GetPropertyAction; +import sun.security.validator.Validator; public abstract class SSLContextImpl extends SSLContextSpi { @@ -1436,7 +1437,7 @@ final class AbstractTrustManagerWrapper extends X509ExtendedTrustManager constraints = new SSLAlgorithmConstraints(sslSocket, true); } - checkAlgorithmConstraints(chain, constraints); + checkAlgorithmConstraints(chain, constraints, isClient); } } @@ -1478,12 +1479,12 @@ final class AbstractTrustManagerWrapper extends X509ExtendedTrustManager constraints = new SSLAlgorithmConstraints(engine, true); } - checkAlgorithmConstraints(chain, constraints); + checkAlgorithmConstraints(chain, constraints, isClient); } } private void checkAlgorithmConstraints(X509Certificate[] chain, - AlgorithmConstraints constraints) throws CertificateException { + AlgorithmConstraints constraints, boolean isClient) throws CertificateException { try { // Does the certificate chain end with a trusted certificate? @@ -1501,7 +1502,9 @@ final class AbstractTrustManagerWrapper extends X509ExtendedTrustManager // A forward checker, need to check from trust to target if (checkedLength >= 0) { - AlgorithmChecker checker = new AlgorithmChecker(constraints); + AlgorithmChecker checker = + new AlgorithmChecker(constraints, null, + (isClient ? Validator.VAR_TLS_CLIENT : Validator.VAR_TLS_SERVER)); checker.init(false); for (int i = checkedLength; i >= 0; i--) { Certificate cert = chain[i]; diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java b/jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java index 3ef37b798a1..0bb89fbc3ca 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -247,6 +247,7 @@ public abstract class SunJSSE extends java.security.Provider { } @Override + @SuppressWarnings("deprecation") protected final void finalize() throws Throwable { // empty super.finalize(); diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java b/jdk/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java index b6ed37cc5a3..954b90d15dd 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java @@ -39,6 +39,7 @@ import java.security.cert.Certificate; import javax.net.ssl.*; import sun.security.provider.certpath.AlgorithmChecker; +import sun.security.validator.Validator; /** * The new X509 key manager implementation. The main differences to the @@ -661,6 +662,15 @@ final class X509KeyManagerImpl extends X509ExtendedKeyManager return CheckResult.OK; } + + public String getValidator() { + if (this == CLIENT) { + return Validator.VAR_TLS_CLIENT; + } else if (this == SERVER) { + return Validator.VAR_TLS_SERVER; + } + return Validator.VAR_GENERIC; + } } // enum for the result of the extension check @@ -774,7 +784,8 @@ final class X509KeyManagerImpl extends X509ExtendedKeyManager // check the algorithm constraints if (constraints != null && - !conformsToAlgorithmConstraints(constraints, chain)) { + !conformsToAlgorithmConstraints(constraints, chain, + checkType.getValidator())) { if (useDebug) { debug.println("Ignoring alias " + alias + @@ -811,9 +822,10 @@ final class X509KeyManagerImpl extends X509ExtendedKeyManager } private static boolean conformsToAlgorithmConstraints( - AlgorithmConstraints constraints, Certificate[] chain) { + AlgorithmConstraints constraints, Certificate[] chain, + String variant) { - AlgorithmChecker checker = new AlgorithmChecker(constraints); + AlgorithmChecker checker = new AlgorithmChecker(constraints, null, variant); try { checker.init(false); } catch (CertPathValidatorException cpve) { diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/X509TrustManagerImpl.java b/jdk/src/java.base/share/classes/sun/security/ssl/X509TrustManagerImpl.java index a8e7328b753..42c84872bad 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/X509TrustManagerImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/X509TrustManagerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -35,6 +35,7 @@ import java.security.cert.*; import javax.net.ssl.*; import sun.security.validator.*; +import sun.security.util.AnchorCertificates; import sun.security.util.HostnameChecker; /** @@ -186,13 +187,11 @@ final class X509TrustManagerImpl extends X509ExtendedTrustManager return v; } - private void checkTrusted(X509Certificate[] chain, String authType, Socket socket, boolean isClient) throws CertificateException { Validator v = checkTrustedInit(chain, authType, isClient); - AlgorithmConstraints constraints = null; - List responseList = Collections.emptyList(); + X509Certificate[] trustedChain = null; if ((socket != null) && socket.isConnected() && (socket instanceof SSLSocket)) { @@ -202,48 +201,46 @@ final class X509TrustManagerImpl extends X509ExtendedTrustManager throw new CertificateException("No handshake session"); } - // check endpoint identity - String identityAlg = sslSocket.getSSLParameters(). - getEndpointIdentificationAlgorithm(); - if (identityAlg != null && identityAlg.length() != 0) { - checkIdentity(session, chain[0], identityAlg, isClient, - getRequestedServerNames(socket)); - } - // create the algorithm constraints ProtocolVersion protocolVersion = ProtocolVersion.valueOf(session.getProtocol()); - if (protocolVersion.v >= ProtocolVersion.TLS12.v) { - if (session instanceof ExtendedSSLSession) { - ExtendedSSLSession extSession = - (ExtendedSSLSession)session; - String[] localSupportedSignAlgs = - extSession.getLocalSupportedSignatureAlgorithms(); + boolean isExtSession = (session instanceof ExtendedSSLSession); + AlgorithmConstraints constraints = null; + if (protocolVersion.v >= ProtocolVersion.TLS12.v && isExtSession) { + ExtendedSSLSession extSession = (ExtendedSSLSession)session; + String[] localSupportedSignAlgs = + extSession.getLocalSupportedSignatureAlgorithms(); - constraints = new SSLAlgorithmConstraints( - sslSocket, localSupportedSignAlgs, false); - } else { - constraints = - new SSLAlgorithmConstraints(sslSocket, false); - } + constraints = new SSLAlgorithmConstraints( + sslSocket, localSupportedSignAlgs, false); } else { constraints = new SSLAlgorithmConstraints(sslSocket, false); } // Grab any stapled OCSP responses for use in validation - if (session instanceof ExtendedSSLSession) { + List responseList = Collections.emptyList(); + if (!isClient && isExtSession) { responseList = ((ExtendedSSLSession)session).getStatusResponses(); } - } + trustedChain = validate(v, chain, responseList, + constraints, isClient ? null : authType); - X509Certificate[] trustedChain = null; - if (isClient) { - trustedChain = validate(v, chain, Collections.emptyList(), - constraints, null); + // check if EE certificate chains to a public root CA (as + // pre-installed in cacerts) + boolean chainsToPublicCA = + AnchorCertificates.contains(trustedChain[trustedChain.length-1]); + + // check endpoint identity + String identityAlg = sslSocket.getSSLParameters(). + getEndpointIdentificationAlgorithm(); + if (identityAlg != null && identityAlg.length() != 0) { + checkIdentity(session, trustedChain[0], identityAlg, isClient, + getRequestedServerNames(socket), chainsToPublicCA); + } } else { - trustedChain = validate(v, chain, responseList, constraints, - authType); + trustedChain = validate(v, chain, Collections.emptyList(), + null, isClient ? null : authType); } if (debug != null && Debug.isOn("trustmanager")) { System.out.println("Found trusted certificate:"); @@ -255,56 +252,53 @@ final class X509TrustManagerImpl extends X509ExtendedTrustManager SSLEngine engine, boolean isClient) throws CertificateException { Validator v = checkTrustedInit(chain, authType, isClient); - AlgorithmConstraints constraints = null; - List responseList = Collections.emptyList(); + X509Certificate[] trustedChain = null; if (engine != null) { SSLSession session = engine.getHandshakeSession(); if (session == null) { throw new CertificateException("No handshake session"); } - // check endpoint identity - String identityAlg = engine.getSSLParameters(). - getEndpointIdentificationAlgorithm(); - if (identityAlg != null && identityAlg.length() != 0) { - checkIdentity(session, chain[0], identityAlg, isClient, - getRequestedServerNames(engine)); - } - // create the algorithm constraints ProtocolVersion protocolVersion = ProtocolVersion.valueOf(session.getProtocol()); - if (protocolVersion.v >= ProtocolVersion.TLS12.v) { - if (session instanceof ExtendedSSLSession) { - ExtendedSSLSession extSession = - (ExtendedSSLSession)session; - String[] localSupportedSignAlgs = - extSession.getLocalSupportedSignatureAlgorithms(); + boolean isExtSession = (session instanceof ExtendedSSLSession); + AlgorithmConstraints constraints = null; + if (protocolVersion.v >= ProtocolVersion.TLS12.v && isExtSession) { + ExtendedSSLSession extSession = (ExtendedSSLSession)session; + String[] localSupportedSignAlgs = + extSession.getLocalSupportedSignatureAlgorithms(); - constraints = new SSLAlgorithmConstraints( - engine, localSupportedSignAlgs, false); - } else { - constraints = - new SSLAlgorithmConstraints(engine, false); - } + constraints = new SSLAlgorithmConstraints( + engine, localSupportedSignAlgs, false); } else { constraints = new SSLAlgorithmConstraints(engine, false); } // Grab any stapled OCSP responses for use in validation - if (session instanceof ExtendedSSLSession) { + List responseList = Collections.emptyList(); + if (!isClient && isExtSession) { responseList = ((ExtendedSSLSession)session).getStatusResponses(); } - } + trustedChain = validate(v, chain, responseList, + constraints, isClient ? null : authType); - X509Certificate[] trustedChain = null; - if (isClient) { - trustedChain = validate(v, chain, Collections.emptyList(), - constraints, null); + // check if EE certificate chains to a public root CA (as + // pre-installed in cacerts) + boolean chainsToPublicCA = + AnchorCertificates.contains(trustedChain[trustedChain.length-1]); + + // check endpoint identity + String identityAlg = engine.getSSLParameters(). + getEndpointIdentificationAlgorithm(); + if (identityAlg != null && identityAlg.length() != 0) { + checkIdentity(session, trustedChain[0], identityAlg, isClient, + getRequestedServerNames(engine), chainsToPublicCA); + } } else { - trustedChain = validate(v, chain, responseList, constraints, - authType); + trustedChain = validate(v, chain, Collections.emptyList(), + null, isClient ? null : authType); } if (debug != null && Debug.isOn("trustmanager")) { System.out.println("Found trusted certificate:"); @@ -437,7 +431,8 @@ final class X509TrustManagerImpl extends X509ExtendedTrustManager X509Certificate cert, String algorithm, boolean isClient, - List sniNames) throws CertificateException { + List sniNames, + boolean chainsToPublicCA) throws CertificateException { boolean identifiable = false; String peerHost = session.getPeerHost(); @@ -445,7 +440,7 @@ final class X509TrustManagerImpl extends X509ExtendedTrustManager String hostname = getHostNameInSNI(sniNames); if (hostname != null) { try { - checkIdentity(hostname, cert, algorithm); + checkIdentity(hostname, cert, algorithm, chainsToPublicCA); identifiable = true; } catch (CertificateException ce) { if (hostname.equalsIgnoreCase(peerHost)) { @@ -458,7 +453,7 @@ final class X509TrustManagerImpl extends X509ExtendedTrustManager } if (!identifiable) { - checkIdentity(peerHost, cert, algorithm); + checkIdentity(peerHost, cert, algorithm, chainsToPublicCA); } } @@ -469,6 +464,12 @@ final class X509TrustManagerImpl extends X509ExtendedTrustManager */ static void checkIdentity(String hostname, X509Certificate cert, String algorithm) throws CertificateException { + checkIdentity(hostname, cert, algorithm, false); + } + + private static void checkIdentity(String hostname, X509Certificate cert, + String algorithm, boolean chainsToPublicCA) + throws CertificateException { if (algorithm != null && algorithm.length() != 0) { // if IPv6 strip off the "[]" if ((hostname != null) && hostname.startsWith("[") && @@ -478,11 +479,11 @@ final class X509TrustManagerImpl extends X509ExtendedTrustManager if (algorithm.equalsIgnoreCase("HTTPS")) { HostnameChecker.getInstance(HostnameChecker.TYPE_TLS).match( - hostname, cert); + hostname, cert, chainsToPublicCA); } else if (algorithm.equalsIgnoreCase("LDAP") || algorithm.equalsIgnoreCase("LDAPS")) { HostnameChecker.getInstance(HostnameChecker.TYPE_LDAP).match( - hostname, cert); + hostname, cert, chainsToPublicCA); } else { throw new CertificateException( "Unknown identification algorithm: " + algorithm); diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java index b73773f5711..53ea9706207 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java @@ -27,6 +27,7 @@ package sun.security.tools.keytool; import java.io.*; import java.security.CodeSigner; +import java.security.CryptoPrimitive; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.MessageDigest; @@ -156,6 +157,7 @@ public final class Main { private boolean protectedPath = false; private boolean srcprotectedPath = false; private boolean cacerts = false; + private boolean nowarn = false; private CertificateFactory cf = null; private KeyStore caks = null; // "cacerts" keystore private char[] srcstorePass = null; @@ -166,6 +168,16 @@ public final class Main { private List ids = new ArrayList<>(); // used in GENCRL private List v3ext = new ArrayList<>(); + // Warnings on weak algorithms + private List weakWarnings = new ArrayList<>(); + + private static final DisabledAlgorithmConstraints DISABLED_CHECK = + new DisabledAlgorithmConstraints( + DisabledAlgorithmConstraints.PROPERTY_CERTPATH_DISABLED_ALGS); + + private static final Set SIG_PRIMITIVE_SET = Collections + .unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE)); + enum Command { CERTREQ("Generates.a.certificate.request", ALIAS, SIGALG, FILEOUT, KEYPASS, KEYSTORE, DNAME, @@ -351,7 +363,7 @@ public final class Main { private static final String NONE = "NONE"; private static final String P11KEYSTORE = "PKCS11"; private static final String P12KEYSTORE = "PKCS12"; - private final String keyAlias = "mykey"; + private static final String keyAlias = "mykey"; // for i18n private static final java.util.ResourceBundle rb = @@ -387,6 +399,7 @@ public final class Main { throw e; } } finally { + printWeakWarnings(false); for (char[] pass : passwords) { if (pass != null) { Arrays.fill(pass, ' '); @@ -476,6 +489,8 @@ public final class Main { help = true; } else if (collator.compare(flags, "-conf") == 0) { i++; + } else if (collator.compare(flags, "-nowarn") == 0) { + nowarn = true; } else if (collator.compare(flags, "-keystore") == 0) { ksfname = args[++i]; if (new File(ksfname).getCanonicalPath().equals( @@ -1010,6 +1025,13 @@ public final class Main { cf = CertificateFactory.getInstance("X509"); } + // -trustcacerts can only be specified on -importcert. + // Reset it so that warnings on CA cert will remain for + // -printcert, etc. + if (command != IMPORTCERT) { + trustcacerts = false; + } + if (trustcacerts) { caks = KeyStoreUtil.getCacertsKeyStore(); } @@ -1152,11 +1174,11 @@ public final class Main { } else if (command == LIST) { if (storePass == null && !KeyStoreUtil.isWindowsKeyStore(storetype)) { - printWarning(); + printNoIntegrityWarning(); } if (alias != null) { - doPrintEntry(alias, out); + doPrintEntry(rb.getString("the.certificate"), alias, out); } else { doPrintEntries(out); } @@ -1253,6 +1275,12 @@ public final class Main { throws Exception { + if (keyStore.containsAlias(alias) == false) { + MessageFormat form = new MessageFormat + (rb.getString("Alias.alias.does.not.exist")); + Object[] source = {alias}; + throw new Exception(form.format(source)); + } Certificate signerCert = keyStore.getCertificate(alias); byte[] encoded = signerCert.getEncoded(); X509CertImpl signerCertImpl = new X509CertImpl(encoded); @@ -1306,6 +1334,8 @@ public final class Main { byte[] rawReq = Pem.decode(new String(sb)); PKCS10 req = new PKCS10(rawReq); + checkWeak(rb.getString("the.certificate.request"), req); + info.set(X509CertInfo.KEY, new CertificateX509Key(req.getSubjectPublicKeyInfo())); info.set(X509CertInfo.SUBJECT, dname==null?req.getSubjectName():new X500Name(dname)); @@ -1335,6 +1365,9 @@ public final class Main { } } } + + checkWeak(rb.getString("the.issuer"), keyStore.getCertificateChain(alias)); + checkWeak(rb.getString("the.generated.certificate"), cert); } private void doGenCRL(PrintStream out) @@ -1385,6 +1418,7 @@ public final class Main { } else { out.write(crl.getEncodedInternal()); } + checkWeak(rb.getString("the.generated.crl"), crl, privateKey); } /** @@ -1431,6 +1465,8 @@ public final class Main { // Sign the request and base-64 encode it request.encodeAndSign(subject, signature); request.print(out); + + checkWeak(rb.getString("the.generated.certificate.request"), request); } /** @@ -1454,7 +1490,7 @@ public final class Main { { if (storePass == null && !KeyStoreUtil.isWindowsKeyStore(storetype)) { - printWarning(); + printNoIntegrityWarning(); } if (alias == null) { alias = keyAlias; @@ -1474,6 +1510,7 @@ public final class Main { throw new Exception(form.format(source)); } dumpCert(cert, out); + checkWeak(rb.getString("the.certificate"), cert); } /** @@ -1728,6 +1765,7 @@ public final class Main { if (keyPass == null) { keyPass = promptForKeyPass(alias, null, storePass); } + checkWeak(rb.getString("the.generated.certificate"), chain[0]); keyStore.setKeyEntry(alias, privKey, keyPass, chain); } @@ -1810,7 +1848,7 @@ public final class Main { /** * Prints a single keystore entry. */ - private void doPrintEntry(String alias, PrintStream out) + private void doPrintEntry(String label, String alias, PrintStream out) throws Exception { if (keyStore.containsAlias(alias) == false) { @@ -1881,12 +1919,14 @@ public final class Main { } else { dumpCert(chain[i], out); } + checkWeak(label, chain[i]); } } else { // Print the digest of the user cert only out.println (rb.getString("Certificate.fingerprint.SHA.256.") + getCertFingerPrint("SHA-256", chain[0])); + checkWeak(label, chain); } } } else if (keyStore.entryInstanceOf(alias, @@ -1909,6 +1949,7 @@ public final class Main { out.println(rb.getString("Certificate.fingerprint.SHA.256.") + getCertFingerPrint("SHA-256", cert)); } + checkWeak(label, cert); } else { out.println(rb.getString("Unknown.Entry.Type")); } @@ -1992,7 +2033,7 @@ public final class Main { if (srcstorePass == null && !KeyStoreUtil.isWindowsKeyStore(srcstoretype)) { - // anti refactoring, copied from printWarning(), + // anti refactoring, copied from printNoIntegrityWarning(), // but change 2 lines System.err.println(); System.err.println(rb.getString @@ -2083,6 +2124,10 @@ public final class Main { } try { + Certificate c = srckeystore.getCertificate(alias); + if (c != null) { + checkWeak("<" + newAlias + ">", c); + } keyStore.setEntry(newAlias, entry, pp); // Place the check so that only successful imports are blocked. // For example, we don't block a failed SecretEntry import. @@ -2154,7 +2199,7 @@ public final class Main { for (Enumeration e = keyStore.aliases(); e.hasMoreElements(); ) { String alias = e.nextElement(); - doPrintEntry(alias, out); + doPrintEntry("<" + alias + ">", alias, out); if (verbose || rfc) { out.println(rb.getString("NEWLINE")); out.println(rb.getString @@ -2300,19 +2345,28 @@ public final class Main { for (CRL crl: loadCRLs(src)) { printCRL(crl, out); String issuer = null; + Certificate signer = null; if (caks != null) { issuer = verifyCRL(caks, crl); if (issuer != null) { + signer = caks.getCertificate(issuer); out.printf(rb.getString( - "verified.by.s.in.s"), issuer, "cacerts"); + "verified.by.s.in.s.weak"), + issuer, + "cacerts", + withWeak(signer.getPublicKey())); out.println(); } } if (issuer == null && keyStore != null) { issuer = verifyCRL(keyStore, crl); if (issuer != null) { + signer = keyStore.getCertificate(issuer); out.printf(rb.getString( - "verified.by.s.in.s"), issuer, "keystore"); + "verified.by.s.in.s.weak"), + issuer, + "keystore", + withWeak(signer.getPublicKey())); out.println(); } } @@ -2324,18 +2378,26 @@ public final class Main { out.println(rb.getString ("STARNN")); } + checkWeak(rb.getString("the.crl"), crl, signer == null ? null : signer.getPublicKey()); } } private void printCRL(CRL crl, PrintStream out) throws Exception { + X509CRL xcrl = (X509CRL)crl; if (rfc) { - X509CRL xcrl = (X509CRL)crl; out.println("-----BEGIN X509 CRL-----"); out.println(Base64.getMimeEncoder(64, CRLF).encodeToString(xcrl.getEncoded())); out.println("-----END X509 CRL-----"); } else { - out.println(crl.toString()); + String s; + if (crl instanceof X509CRLImpl) { + X509CRLImpl x509crl = (X509CRLImpl) crl; + s = x509crl.toStringWithAlgName(withWeak("" + x509crl.getSigAlgId())); + } else { + s = crl.toString(); + } + out.println(s); } } @@ -2362,8 +2424,11 @@ public final class Main { PKCS10 req = new PKCS10(Pem.decode(new String(sb))); PublicKey pkey = req.getSubjectPublicKeyInfo(); - out.printf(rb.getString("PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key."), - req.getSubjectName(), pkey.getFormat(), pkey.getAlgorithm()); + out.printf(rb.getString("PKCS.10.with.weak"), + req.getSubjectName(), + pkey.getFormat(), + withWeak(pkey), + withWeak(req.getSigAlg())); for (PKCS10Attribute attr: req.getAttributes().getAttributes()) { ObjectIdentifier oid = attr.getAttributeId(); if (oid.equals(PKCS9Attribute.EXTENSION_REQUEST_OID)) { @@ -2386,6 +2451,7 @@ public final class Main { if (debug) { out.println(req); // Just to see more, say, public key length... } + checkWeak(rb.getString("the.certificate.request"), req); } /** @@ -2425,6 +2491,15 @@ public final class Main { if (i < (certs.length-1)) { out.println(); } + checkWeak(oneInMany(rb.getString("the.certificate"), i, certs.length), x509Cert); + } + } + + private static String oneInMany(String label, int i, int num) { + if (num == 1) { + return label; + } else { + return String.format(rb.getString("one.in.many"), label, i+1, num); } } @@ -2458,7 +2533,11 @@ public final class Main { out.println(); out.println(rb.getString("Signature.")); out.println(); - for (Certificate cert: signer.getSignerCertPath().getCertificates()) { + + List certs + = signer.getSignerCertPath().getCertificates(); + int cc = 0; + for (Certificate cert: certs) { X509Certificate x = (X509Certificate)cert; if (rfc) { out.println(rb.getString("Certificate.owner.") + x.getSubjectDN() + "\n"); @@ -2467,12 +2546,15 @@ public final class Main { printX509Cert(x, out); } out.println(); + checkWeak(oneInMany(rb.getString("the.certificate"), cc++, certs.size()), x); } Timestamp ts = signer.getTimestamp(); if (ts != null) { out.println(rb.getString("Timestamp.")); out.println(); - for (Certificate cert: ts.getSignerCertPath().getCertificates()) { + certs = ts.getSignerCertPath().getCertificates(); + cc = 0; + for (Certificate cert: certs) { X509Certificate x = (X509Certificate)cert; if (rfc) { out.println(rb.getString("Certificate.owner.") + x.getSubjectDN() + "\n"); @@ -2481,6 +2563,7 @@ public final class Main { printX509Cert(x, out); } out.println(); + checkWeak(oneInMany(rb.getString("the.tsa.certificate"), cc++, certs.size()), x); } } } @@ -2523,6 +2606,7 @@ public final class Main { printX509Cert((X509Certificate)cert, out); out.println(); } + checkWeak(oneInMany(rb.getString("the.certificate"), i, chain.size()), cert); } catch (Exception e) { if (debug) { e.printStackTrace(); @@ -2698,7 +2782,7 @@ public final class Main { } // Now store the newly established chain in the keystore. The new - // chain replaces the old one. + // chain replaces the old one. The chain can be null if user chooses no. if (newChain != null) { keyStore.setKeyEntry(alias, privKey, (keyPass != null) ? keyPass : storePass, @@ -2735,6 +2819,12 @@ public final class Main { throw new Exception(rb.getString("Input.not.an.X.509.certificate")); } + if (noprompt) { + checkWeak(rb.getString("the.input"), cert); + keyStore.setCertificateEntry(alias, cert); + return true; + } + // if certificate is self-signed, make sure it verifies boolean selfSigned = false; if (KeyStoreUtil.isSelfSigned(cert)) { @@ -2742,11 +2832,6 @@ public final class Main { selfSigned = true; } - if (noprompt) { - keyStore.setCertificateEntry(alias, cert); - return true; - } - // check if cert already exists in keystore String reply = null; String trustalias = keyStore.getCertificateAlias(cert); @@ -2755,6 +2840,8 @@ public final class Main { ("Certificate.already.exists.in.keystore.under.alias.trustalias.")); Object[] source = {trustalias}; System.err.println(form.format(source)); + checkWeak(rb.getString("the.input"), cert); + printWeakWarnings(true); reply = getYesNoReply (rb.getString("Do.you.still.want.to.add.it.no.")); } else if (selfSigned) { @@ -2764,6 +2851,8 @@ public final class Main { ("Certificate.already.exists.in.system.wide.CA.keystore.under.alias.trustalias.")); Object[] source = {trustalias}; System.err.println(form.format(source)); + checkWeak(rb.getString("the.input"), cert); + printWeakWarnings(true); reply = getYesNoReply (rb.getString("Do.you.still.want.to.add.it.to.your.own.keystore.no.")); } @@ -2771,6 +2860,8 @@ public final class Main { // Print the cert and ask user if they really want to add // it to their keystore printX509Cert(cert, System.out); + checkWeak(rb.getString("the.input"), cert); + printWeakWarnings(true); reply = getYesNoReply (rb.getString("Trust.this.certificate.no.")); } @@ -2784,6 +2875,7 @@ public final class Main { } } + // Not found in this keystore and not self-signed // Try to establish trust chain try { Certificate[] chain = establishCertChain(null, cert); @@ -2795,6 +2887,8 @@ public final class Main { // Print the cert and ask user if they really want to add it to // their keystore printX509Cert(cert, System.out); + checkWeak(rb.getString("the.input"), cert); + printWeakWarnings(true); reply = getYesNoReply (rb.getString("Trust.this.certificate.no.")); if ("YES".equals(reply)) { @@ -2933,6 +3027,24 @@ public final class Main { return keyPass; } + private String withWeak(String alg) { + if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, alg, null)) { + return alg; + } else { + return String.format(rb.getString("with.weak"), alg); + } + } + + private String withWeak(PublicKey key) { + if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) { + return String.format(rb.getString("key.bit"), + KeyUtil.getKeySize(key), key.getAlgorithm()); + } else { + return String.format(rb.getString("key.bit.weak"), + KeyUtil.getKeySize(key), key.getAlgorithm()); + } + } + /** * Prints a certificate in a human readable format. */ @@ -2941,8 +3053,13 @@ public final class Main { { MessageFormat form = new MessageFormat - (rb.getString(".PATTERN.printX509Cert")); + (rb.getString(".PATTERN.printX509Cert.with.weak")); PublicKey pkey = cert.getPublicKey(); + String sigName = cert.getSigAlgName(); + // No need to warn about sigalg of a trust anchor + if (!isTrustedCert(cert)) { + sigName = withWeak(sigName); + } Object[] source = {cert.getSubjectDN().toString(), cert.getIssuerDN().toString(), cert.getSerialNumber().toString(16), @@ -2950,10 +3067,9 @@ public final class Main { cert.getNotAfter().toString(), getCertFingerPrint("SHA-1", cert), getCertFingerPrint("SHA-256", cert), - cert.getSigAlgName(), - pkey.getAlgorithm(), - KeyUtil.getKeySize(pkey), - cert.getVersion(), + sigName, + withWeak(pkey), + cert.getVersion() }; out.println(form.format(source)); @@ -3003,12 +3119,12 @@ public final class Main { * @param ks the keystore to search with, not null * @return cert itself if it's already inside ks, * or a certificate inside ks who signs cert, - * or null otherwise. + * or null otherwise. A label is added. */ - private static Certificate getTrustedSigner(Certificate cert, KeyStore ks) - throws Exception { + private static Pair + getSigner(Certificate cert, KeyStore ks) throws Exception { if (ks.getCertificateAlias(cert) != null) { - return cert; + return new Pair<>("", cert); } for (Enumeration aliases = ks.aliases(); aliases.hasMoreElements(); ) { @@ -3017,7 +3133,7 @@ public final class Main { if (trustedCert != null) { try { cert.verify(trustedCert.getPublicKey()); - return trustedCert; + return new Pair<>(name, trustedCert); } catch (Exception e) { // Not verified, skip to the next one } @@ -3281,7 +3397,7 @@ public final class Main { /** * Prints warning about missing integrity check. */ - private void printWarning() { + private void printNoIntegrityWarning() { System.err.println(); System.err.println(rb.getString (".WARNING.WARNING.WARNING.")); @@ -3306,6 +3422,9 @@ public final class Main { Certificate[] replyCerts) throws Exception { + + checkWeak(rb.getString("reply"), replyCerts); + // order the certs in the reply (bottom-up). // we know that all certs in the reply are of type X.509, because // we parsed them using an X.509 certificate factory @@ -3358,9 +3477,11 @@ public final class Main { // do we trust the cert at the top? Certificate topCert = replyCerts[replyCerts.length-1]; - Certificate root = getTrustedSigner(topCert, keyStore); + boolean fromKeyStore = true; + Pair root = getSigner(topCert, keyStore); if (root == null && trustcacerts && caks != null) { - root = getTrustedSigner(topCert, caks); + root = getSigner(topCert, caks); + fromKeyStore = false; } if (root == null) { System.err.println(); @@ -3369,33 +3490,42 @@ public final class Main { printX509Cert((X509Certificate)topCert, System.out); System.err.println(); System.err.print(rb.getString(".is.not.trusted.")); + printWeakWarnings(true); String reply = getYesNoReply (rb.getString("Install.reply.anyway.no.")); if ("NO".equals(reply)) { return null; } } else { - if (root != topCert) { + if (root.snd != topCert) { // append the root CA cert to the chain Certificate[] tmpCerts = new Certificate[replyCerts.length+1]; System.arraycopy(replyCerts, 0, tmpCerts, 0, replyCerts.length); - tmpCerts[tmpCerts.length-1] = root; + tmpCerts[tmpCerts.length-1] = root.snd; replyCerts = tmpCerts; + checkWeak(String.format(rb.getString(fromKeyStore ? + "alias.in.keystore" : + "alias.in.cacerts"), + root.fst), + root.snd); } } - return replyCerts; } /** * Establishes a certificate chain (using trusted certificates in the - * keystore), starting with the user certificate + * keystore and cacerts), starting with the reply (certToVerify) * and ending at a self-signed certificate found in the keystore. * - * @param userCert the user certificate of the alias - * @param certToVerify the single certificate provided in the reply + * @param userCert optional existing certificate, mostly likely be the + * original self-signed cert created by -genkeypair. + * It must have the same public key as certToVerify + * but cannot be the same cert. + * @param certToVerify the starting certificate to build the chain + * @returns the established chain, might be null if user decides not */ private Certificate[] establishCertChain(Certificate userCert, Certificate certToVerify) @@ -3423,30 +3553,37 @@ public final class Main { // Use the subject distinguished name as the key into the hash table. // All certificates associated with the same subject distinguished // name are stored in the same hash table entry as a vector. - Hashtable> certs = null; + Hashtable>> certs = null; if (keyStore.size() > 0) { - certs = new Hashtable>(11); + certs = new Hashtable<>(11); keystorecerts2Hashtable(keyStore, certs); } if (trustcacerts) { if (caks!=null && caks.size()>0) { if (certs == null) { - certs = new Hashtable>(11); + certs = new Hashtable<>(11); } keystorecerts2Hashtable(caks, certs); } } // start building chain - Vector chain = new Vector<>(2); - if (buildChain((X509Certificate)certToVerify, chain, certs)) { - Certificate[] newChain = new Certificate[chain.size()]; + Vector> chain = new Vector<>(2); + if (buildChain( + new Pair<>(rb.getString("the.input"), + (X509Certificate) certToVerify), + chain, certs)) { + for (Pair p : chain) { + checkWeak(p.fst, p.snd); + } + Certificate[] newChain = + new Certificate[chain.size()]; // buildChain() returns chain with self-signed root-cert first and // user-cert last, so we need to invert the chain before we store // it int j=0; for (int i=chain.size()-1; i>=0; i--) { - newChain[j] = chain.elementAt(i); + newChain[j] = chain.elementAt(i).snd; j++; } return newChain; @@ -3457,7 +3594,17 @@ public final class Main { } /** - * Recursively tries to establish chain from pool of trusted certs. + * Recursively tries to establish chain from pool of certs starting from + * certToVerify until a self-signed cert is found, and fill the certs found + * into chain. Each cert in the chain signs the next one. + * + * This method is able to recover from an error, say, if certToVerify + * is signed by certA but certA has no issuer in certs and itself is not + * self-signed, the method can try another certB that also signs + * certToVerify and look for signer of certB, etc, etc. + * + * Each cert in chain comes with a label showing its origin. The label is + * used in the warning message when the cert is considered a risk. * * @param certToVerify the cert that needs to be verified. * @param chain the chain that's being built. @@ -3465,19 +3612,20 @@ public final class Main { * * @return true if successful, false otherwise. */ - private boolean buildChain(X509Certificate certToVerify, - Vector chain, - Hashtable> certs) { - Principal issuer = certToVerify.getIssuerDN(); - if (KeyStoreUtil.isSelfSigned(certToVerify)) { + private boolean buildChain(Pair certToVerify, + Vector> chain, + Hashtable>> certs) { + if (KeyStoreUtil.isSelfSigned(certToVerify.snd)) { // reached self-signed root cert; // no verification needed because it's trusted. chain.addElement(certToVerify); return true; } + Principal issuer = certToVerify.snd.getIssuerDN(); + // Get the issuer's certificate(s) - Vector vec = certs.get(issuer); + Vector> vec = certs.get(issuer); if (vec == null) { return false; } @@ -3485,13 +3633,12 @@ public final class Main { // Try out each certificate in the vector, until we find one // whose public key verifies the signature of the certificate // in question. - for (Enumeration issuerCerts = vec.elements(); - issuerCerts.hasMoreElements(); ) { - X509Certificate issuerCert - = (X509Certificate)issuerCerts.nextElement(); - PublicKey issuerPubKey = issuerCert.getPublicKey(); + for (Enumeration> issuerCerts = vec.elements(); + issuerCerts.hasMoreElements(); ) { + Pair issuerCert = issuerCerts.nextElement(); + PublicKey issuerPubKey = issuerCert.snd.getPublicKey(); try { - certToVerify.verify(issuerPubKey); + certToVerify.snd.verify(issuerPubKey); } catch (Exception e) { continue; } @@ -3541,10 +3688,11 @@ public final class Main { /** * Stores the (leaf) certificates of a keystore in a hashtable. * All certs belonging to the same CA are stored in a vector that - * in turn is stored in the hashtable, keyed by the CA's subject DN + * in turn is stored in the hashtable, keyed by the CA's subject DN. + * Each cert comes with a string label that shows its origin and alias. */ private void keystorecerts2Hashtable(KeyStore ks, - Hashtable> hash) + Hashtable>> hash) throws Exception { for (Enumeration aliases = ks.aliases(); @@ -3553,13 +3701,20 @@ public final class Main { Certificate cert = ks.getCertificate(alias); if (cert != null) { Principal subjectDN = ((X509Certificate)cert).getSubjectDN(); - Vector vec = hash.get(subjectDN); + Pair pair = new Pair<>( + String.format( + rb.getString(ks == caks ? + "alias.in.cacerts" : + "alias.in.keystore"), + alias), + (X509Certificate)cert); + Vector> vec = hash.get(subjectDN); if (vec == null) { - vec = new Vector(); - vec.addElement(cert); + vec = new Vector<>(); + vec.addElement(pair); } else { - if (!vec.contains(cert)) { - vec.addElement(cert); + if (!vec.contains(pair)) { + vec.addElement(pair); } } hash.put(subjectDN, vec); @@ -4157,6 +4312,81 @@ public final class Main { return result; } + private boolean isTrustedCert(Certificate cert) throws KeyStoreException { + if (caks != null && caks.getCertificateAlias(cert) != null) { + return true; + } else { + String inKS = keyStore.getCertificateAlias(cert); + return inKS != null && keyStore.isCertificateEntry(inKS); + } + } + + private void checkWeak(String label, String sigAlg, Key key) { + + if (sigAlg != null && !DISABLED_CHECK.permits( + SIG_PRIMITIVE_SET, sigAlg, null)) { + weakWarnings.add(String.format( + rb.getString("whose.sigalg.risk"), label, sigAlg)); + } + if (key != null && !DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) { + weakWarnings.add(String.format( + rb.getString("whose.key.risk"), + label, + String.format(rb.getString("key.bit"), + KeyUtil.getKeySize(key), key.getAlgorithm()))); + } + } + + private void checkWeak(String label, Certificate[] certs) + throws KeyStoreException { + for (int i = 0; i < certs.length; i++) { + Certificate cert = certs[i]; + if (cert instanceof X509Certificate) { + X509Certificate xc = (X509Certificate)cert; + String fullLabel = label; + if (certs.length > 1) { + fullLabel = oneInMany(label, i, certs.length); + } + checkWeak(fullLabel, xc); + } + } + } + + private void checkWeak(String label, Certificate cert) + throws KeyStoreException { + if (cert instanceof X509Certificate) { + X509Certificate xc = (X509Certificate)cert; + // No need to check the sigalg of a trust anchor + String sigAlg = isTrustedCert(cert) ? null : xc.getSigAlgName(); + checkWeak(label, sigAlg, xc.getPublicKey()); + } + } + + private void checkWeak(String label, PKCS10 p10) { + checkWeak(label, p10.getSigAlg(), p10.getSubjectPublicKeyInfo()); + } + + private void checkWeak(String label, CRL crl, Key key) { + if (crl instanceof X509CRLImpl) { + X509CRLImpl impl = (X509CRLImpl)crl; + checkWeak(label, impl.getSigAlgName(), key); + } + } + + private void printWeakWarnings(boolean newLine) { + if (!weakWarnings.isEmpty() && !nowarn) { + System.err.println("\nWarning:"); + for (String warning : weakWarnings) { + System.err.println(warning); + } + if (newLine) { + // When calling before a yes/no prompt, add a new line + System.err.println(); + } + } + weakWarnings.clear(); + } + /** * Prints the usage of this tool. */ diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java index 8ede53992d8..522449c366b 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java @@ -360,8 +360,6 @@ public class Resources extends java.util.ListResourceBundle { {"Enter.alias.name.", "Enter alias name: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(RETURN if same as for <{0}>)"}, - {".PATTERN.printX509Cert", - "Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignature algorithm name: {7}\nSubject Public Key Algorithm: {8} ({9,number,#})\nVersion: {10}"}, {"What.is.your.first.and.last.name.", "What is your first and last name?"}, {"What.is.the.name.of.your.organizational.unit.", @@ -428,16 +426,12 @@ public class Resources extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "Please provide -keysize for secret key generation"}, - {"verified.by.s.in.s", "Verified by %s in %s"}, {"warning.not.verified.make.sure.keystore.is.correct", "WARNING: not verified. Make sure -keystore is correct."}, {"Extensions.", "Extensions: "}, {".Empty.value.", "(Empty value)"}, {"Extension.Request.", "Extension Request:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "PKCS #10 Certificate Request (Version 1.0)\n" + - "Subject: %s\nPublic Key: %s format %s key\n"}, {"Unknown.keyUsage.type.", "Unknown keyUsage type: "}, {"Unknown.extendedkeyUsage.type.", "Unknown extendedkeyUsage type: "}, {"Unknown.AccessDescription.type.", "Unknown AccessDescription type: "}, @@ -446,7 +440,34 @@ public class Resources extends java.util.ListResourceBundle { "This extension cannot be marked as critical. "}, {"Odd.number.of.hex.digits.found.", "Odd number of hex digits found: "}, {"Unknown.extension.type.", "Unknown extension type: "}, - {"command.{0}.is.ambiguous.", "command {0} is ambiguous:"} + {"command.{0}.is.ambiguous.", "command {0} is ambiguous:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "The certificate request"}, + {"the.issuer", "The issuer"}, + {"the.generated.certificate", "The generated certificate"}, + {"the.generated.crl", "The generated CRL"}, + {"the.generated.certificate.request", "The generated certificate request"}, + {"the.certificate", "The certificate"}, + {"the.crl", "The CRL"}, + {"the.tsa.certificate", "The TSA certificate"}, + {"the.input", "The input"}, + {"reply", "Reply"}, + {"one.in.many", "%s #%d of %d"}, + {"alias.in.cacerts", "Issuer <%s> in cacerts"}, + {"alias.in.keystore", "Issuer <%s>"}, + {"with.weak", "%s (weak)"}, + {"key.bit", "%d-bit %s key"}, + {"key.bit.weak", "%d-bit %s key (weak)"}, + {".PATTERN.printX509Cert.with.weak", + "Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignature algorithm name: {7}\nSubject Public Key Algorithm: {8}\nVersion: {9}"}, + {"PKCS.10.with.weak", + "PKCS #10 Certificate Request (Version 1.0)\n" + + "Subject: %s\nFormat: %s\nPublic Key: %s\nSignature algorithm: %s\n"}, + {"verified.by.s.in.s.weak", "Verified by %s in %s with a %s"}, + {"whose.sigalg.risk", "%s uses the %s signature algorithm which is considered a security risk."}, + {"whose.key.risk", "%s uses a %s which is considered a security risk."}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java index a86cfcf78cd..e3af1fdcf43 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -357,8 +357,6 @@ public class Resources_de extends java.util.ListResourceBundle { {"Enter.alias.name.", "Aliasnamen eingeben: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(RETURN, wenn identisch mit <{0}>)"}, - {".PATTERN.printX509Cert", - "Eigent\u00FCmer: {0}\nAussteller: {1}\nSeriennummer: {2}\nG\u00FCltig von: {3} bis: {4}\nZertifikatfingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgorithmusname: {7}\nAlgorithmus des Public Key von Betreff: {8} ({9,number,#})\nVersion: {10}"}, {"What.is.your.first.and.last.name.", "Wie lautet Ihr Vor- und Nachname?"}, {"What.is.the.name.of.your.organizational.unit.", @@ -421,15 +419,12 @@ public class Resources_de extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "Geben Sie -keysize zum Erstellen eines Secret Keys an"}, - {"verified.by.s.in.s", "Gepr\u00FCft von %s in %s"}, {"warning.not.verified.make.sure.keystore.is.correct", "WARNUNG: Nicht gepr\u00FCft. Stellen Sie sicher, dass -keystore korrekt ist."}, {"Extensions.", "Erweiterungen: "}, {".Empty.value.", "(Leerer Wert)"}, {"Extension.Request.", "Erweiterungsanforderung:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "PKCS #10-Zertifikatanforderung (Version 1.0)\nSubjekt: %s\nPublic Key: %s Format %s Schl\u00FCssel\n"}, {"Unknown.keyUsage.type.", "Unbekannter keyUsage-Typ: "}, {"Unknown.extendedkeyUsage.type.", "Unbekannter extendedkeyUsage-Typ: "}, {"Unknown.AccessDescription.type.", "Unbekannter AccessDescription-Typ: "}, @@ -438,7 +433,33 @@ public class Resources_de extends java.util.ListResourceBundle { "Erweiterung kann nicht als \"Kritisch\" markiert werden. "}, {"Odd.number.of.hex.digits.found.", "Ungerade Anzahl hexadezimaler Ziffern gefunden: "}, {"Unknown.extension.type.", "Unbekannter Erweiterungstyp: "}, - {"command.{0}.is.ambiguous.", "Befehl {0} ist mehrdeutig:"} + {"command.{0}.is.ambiguous.", "Befehl {0} ist mehrdeutig:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "Die Zertifikatsanforderung"}, + {"the.issuer", "Der Aussteller"}, + {"the.generated.certificate", "Das generierte Zertifikat"}, + {"the.generated.crl", "Die generierte CRL"}, + {"the.generated.certificate.request", "Die generierte Zertifikatsanforderung"}, + {"the.certificate", "Das Zertifikat"}, + {"the.crl", "Die CRL"}, + {"the.tsa.certificate", "Das TSA-Zertifikat"}, + {"the.input", "Die Eingabe"}, + {"reply", "Antwort"}, + {"one.in.many", "%s #%d von %d"}, + {"alias.in.cacerts", "Aussteller <%s> in cacerts"}, + {"alias.in.keystore", "Aussteller <%s>"}, + {"with.weak", "%s (schwach)"}, + {"key.bit", "%d-Bit-%s-Schl\u00FCssel"}, + {"key.bit.weak", "%d-Bit-%s-Schl\u00FCssel (schwach)"}, + {".PATTERN.printX509Cert.with.weak", + "Eigent\u00FCmer: {0}\nAussteller: {1}\nSeriennummer: {2}\nG\u00FCltig von: {3} bis: {4}\nZertifikatsfingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgorithmusname: {7}\nPublic Key-Algorithmus von Subject: {8}\nVersion: {9}"}, + {"PKCS.10.with.weak", + "PKCS #10-Zertifikatsanforderung (Version 1.0)\nSubject: %s\nFormat: %s\nPublic Key: %s\nSignaturalgorithmus: %s\n"}, + {"verified.by.s.in.s.weak", "Von %s in %s mit %s verifiziert"}, + {"whose.sigalg.risk", "%s verwendet den Signaturalgorithmus %s. Dies gilt als Sicherheitsrisiko."}, + {"whose.key.risk", "%s verwendet %s. Dies gilt als Sicherheitsrisiko."}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java index 31fbf73db32..31a0fe38b25 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -357,8 +357,6 @@ public class Resources_es extends java.util.ListResourceBundle { {"Enter.alias.name.", "Introduzca el nombre de alias: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(INTRO si es el mismo que para <{0}>)"}, - {".PATTERN.printX509Cert", - "Propietario: {0}\nEmisor: {1}\nN\u00FAmero de serie: {2}\nV\u00E1lido desde: {3} hasta: {4}\nHuellas digitales del certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNombre del algoritmo de firma: {7}\nAlgoritmo de clave p\u00FAblica de asunto: {8} ({9,number,#})\nVersi\u00F3n: {10}"}, {"What.is.your.first.and.last.name.", "\u00BFCu\u00E1les son su nombre y su apellido?"}, {"What.is.the.name.of.your.organizational.unit.", @@ -421,15 +419,12 @@ public class Resources_es extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "Proporcione el valor de -keysize para la generaci\u00F3n de claves secretas"}, - {"verified.by.s.in.s", "Verificado por %s en %s"}, {"warning.not.verified.make.sure.keystore.is.correct", "ADVERTENCIA: no se ha verificado. Aseg\u00FArese de que el valor de -keystore es correcto."}, {"Extensions.", "Extensiones: "}, {".Empty.value.", "(Valor vac\u00EDo)"}, {"Extension.Request.", "Solicitud de Extensi\u00F3n:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "Solicitud de Certificado PKCS #10 (Versi\u00F3n 1.0)\nAsunto: %s\nClave P\u00FAblica: %s formato %s clave\n"}, {"Unknown.keyUsage.type.", "Tipo de uso de clave desconocido: "}, {"Unknown.extendedkeyUsage.type.", "Tipo de uso de clave extendida desconocido: "}, {"Unknown.AccessDescription.type.", "Tipo de descripci\u00F3n de acceso desconocido: "}, @@ -438,7 +433,33 @@ public class Resources_es extends java.util.ListResourceBundle { "Esta extensi\u00F3n no se puede marcar como cr\u00EDtica. "}, {"Odd.number.of.hex.digits.found.", "Se ha encontrado un n\u00FAmero impar de d\u00EDgitos hexadecimales: "}, {"Unknown.extension.type.", "Tipo de extensi\u00F3n desconocida: "}, - {"command.{0}.is.ambiguous.", "El comando {0} es ambiguo:"} + {"command.{0}.is.ambiguous.", "El comando {0} es ambiguo:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "La solicitud de certificado"}, + {"the.issuer", "El emisor"}, + {"the.generated.certificate", "El certificado generado"}, + {"the.generated.crl", "La CRL generada"}, + {"the.generated.certificate.request", "La solicitud de certificado generada"}, + {"the.certificate", "El certificado"}, + {"the.crl", "La CRL"}, + {"the.tsa.certificate", "El certificado de TSA"}, + {"the.input", "La entrada"}, + {"reply", "Responder"}, + {"one.in.many", "%s #%d de %d"}, + {"alias.in.cacerts", "Emisor <%s> en cacerts"}, + {"alias.in.keystore", "Emisor <%s>"}, + {"with.weak", "%s (d\u00E9bil)"}, + {"key.bit", "Clave %s de %d bits"}, + {"key.bit.weak", "Clave %s de %d bits (d\u00E9bil)"}, + {".PATTERN.printX509Cert.with.weak", + "Propietario: {0}\nEmisor: {1}\nN\u00FAmero de serie: {2}\nV\u00E1lido desde: {3} hasta: {4}\nHuellas digitales del certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNombre del algoritmo de firma: {7}\nAlgoritmo de clave p\u00FAblica de asunto: {8}\nVersi\u00F3n: {9}"}, + {"PKCS.10.with.weak", + "Solicitud de certificado PKCS #10 (Versi\u00F3n 1.0)\nAsunto: %s\nFormato: %s\nClave p\u00FAblica:%s\nAlgoritmo de firma: %s\n"}, + {"verified.by.s.in.s.weak", "Verificado por %s en %s con %s"}, + {"whose.sigalg.risk", "%s usa el algoritmo de firma %s, lo que se considera un riesgo de seguridad."}, + {"whose.key.risk", "%s usa %s, lo que se considera un riesgo de seguridad."}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java index 282e78a4f2a..892001d28f8 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -357,8 +357,6 @@ public class Resources_fr extends java.util.ListResourceBundle { {"Enter.alias.name.", "Indiquez le nom d'alias : "}, {".RETURN.if.same.as.for.otherAlias.", "\t(appuyez sur Entr\u00E9e si le r\u00E9sultat est identique \u00E0 <{0}>)"}, - {".PATTERN.printX509Cert", - "Propri\u00E9taire : {0}\nEmetteur : {1}\nNum\u00E9ro de s\u00E9rie : {2}\nValide du : {3} au : {4}\nEmpreintes du certificat :\n\t SHA1 : {5}\n\t SHA256 : {6}\nNom de l''algorithme de signature : {7}\nAlgorithme de cl\u00E9 publique du sujet : {8} ({9,number,#})\nVersion : {10}"}, {"What.is.your.first.and.last.name.", "Quels sont vos nom et pr\u00E9nom ?"}, {"What.is.the.name.of.your.organizational.unit.", @@ -421,15 +419,12 @@ public class Resources_fr extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "Indiquez -keysize pour la g\u00E9n\u00E9ration de la cl\u00E9 secr\u00E8te"}, - {"verified.by.s.in.s", "V\u00E9rifi\u00E9 par %s dans %s"}, {"warning.not.verified.make.sure.keystore.is.correct", "AVERTISSEMENT : non v\u00E9rifi\u00E9. Assurez-vous que -keystore est correct."}, {"Extensions.", "Extensions\u00A0: "}, {".Empty.value.", "(Valeur vide)"}, {"Extension.Request.", "Demande d'extension :"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "Demande de certificat PKCS #10 (version 1.0)\nSujet : %s\nCl\u00E9 publique : format %s pour la cl\u00E9 %s\n"}, {"Unknown.keyUsage.type.", "Type keyUsage inconnu : "}, {"Unknown.extendedkeyUsage.type.", "Type extendedkeyUsage inconnu : "}, {"Unknown.AccessDescription.type.", "Type AccessDescription inconnu : "}, @@ -438,7 +433,33 @@ public class Resources_fr extends java.util.ListResourceBundle { "Cette extension ne peut pas \u00EAtre marqu\u00E9e comme critique. "}, {"Odd.number.of.hex.digits.found.", "Nombre impair de chiffres hexad\u00E9cimaux trouv\u00E9 : "}, {"Unknown.extension.type.", "Type d'extension inconnu : "}, - {"command.{0}.is.ambiguous.", "commande {0} ambigu\u00EB :"} + {"command.{0}.is.ambiguous.", "commande {0} ambigu\u00EB :"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "Demande de certificat"}, + {"the.issuer", "Emetteur"}, + {"the.generated.certificate", "Certificat g\u00E9n\u00E9r\u00E9"}, + {"the.generated.crl", "Liste des certificats r\u00E9voqu\u00E9s g\u00E9n\u00E9r\u00E9e"}, + {"the.generated.certificate.request", "Demande de certificat g\u00E9n\u00E9r\u00E9"}, + {"the.certificate", "Certificat"}, + {"the.crl", "Liste de certificats r\u00E9voqu\u00E9s"}, + {"the.tsa.certificate", "Certificat TSA"}, + {"the.input", "Entr\u00E9e"}, + {"reply", "R\u00E9pondre"}, + {"one.in.many", "%s #%d sur %d"}, + {"alias.in.cacerts", "Emetteur <%s> dans les certificats CA"}, + {"alias.in.keystore", "Emetteur <%s>"}, + {"with.weak", "%s (faible)"}, + {"key.bit", "Cl\u00E9 %s %d bits"}, + {"key.bit.weak", "Cl\u00E9 %s %d bits (faible)"}, + {".PATTERN.printX509Cert.with.weak", + "Propri\u00E9taire : {0}\nEmetteur : {1}\nNum\u00E9ro de s\u00E9rie : {2}\nValide du {3} au {4}\nEmpreintes du certificat :\n\t SHA 1: {5}\n\t SHA 256: {6}\nNom de l''algorithme de signature : {7}\nAlgorithme de cl\u00E9 publique du sujet : {8}\nVersion : {9}"}, + {"PKCS.10.with.weak", + "Demande de certificat PKCS #10 (version 1.0)\nSujet : %s\nFormat : %s\nCl\u00E9 publique : %s\nAlgorithme de signature : %s\n"}, + {"verified.by.s.in.s.weak", "V\u00E9rifi\u00E9 par %s dans %s avec un \u00E9l\u00E9ment %s"}, + {"whose.sigalg.risk", "%s utilise l'algorithme de signature %s, qui repr\u00E9sente un risque pour la s\u00E9curit\u00E9."}, + {"whose.key.risk", "%s utilise un \u00E9l\u00E9ment %s, qui repr\u00E9sente un risque pour la s\u00E9curit\u00E9."}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java index 67f367a0f8e..4f7013f71dc 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -357,8 +357,6 @@ public class Resources_it extends java.util.ListResourceBundle { {"Enter.alias.name.", "Immettere nome alias: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(INVIO se corrisponde al nome di <{0}>)"}, - {".PATTERN.printX509Cert", - "Proprietario: {0}\nEmittente: {1}\nNumero di serie: {2}\nValido da: {3} a: {4}\nCopie di certificato:\n\t SHA1: {5}\n\t SHA256: {6}\nNome algoritmo firma: {7}\nAlgoritmo di chiave pubblica oggetto: {8} ({9,number,#})\nVersione: {10}"}, {"What.is.your.first.and.last.name.", "Specificare nome e cognome"}, {"What.is.the.name.of.your.organizational.unit.", @@ -421,15 +419,12 @@ public class Resources_it extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "Specificare il valore -keysize per la generazione della chiave segreta"}, - {"verified.by.s.in.s", "Verificato da %s in %s"}, {"warning.not.verified.make.sure.keystore.is.correct", "AVVERTENZA: non verificato. Assicurarsi che -keystore sia corretto."}, {"Extensions.", "Estensioni: "}, {".Empty.value.", "(valore vuoto)"}, {"Extension.Request.", "Richiesta di estensione:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "Richiesta di certificato PKCS #10 (versione 1.0)\nOggetto: %s\nChiave pubblica: %s formato %s chiave\n"}, {"Unknown.keyUsage.type.", "Tipo keyUsage sconosciuto: "}, {"Unknown.extendedkeyUsage.type.", "Tipo extendedkeyUsage sconosciuto: "}, {"Unknown.AccessDescription.type.", "Tipo AccessDescription sconosciuto: "}, @@ -438,7 +433,33 @@ public class Resources_it extends java.util.ListResourceBundle { "Impossibile contrassegnare questa estensione come critica. "}, {"Odd.number.of.hex.digits.found.", "\u00C8 stato trovato un numero dispari di cifre esadecimali: "}, {"Unknown.extension.type.", "Tipo di estensione sconosciuto: "}, - {"command.{0}.is.ambiguous.", "il comando {0} \u00E8 ambiguo:"} + {"command.{0}.is.ambiguous.", "il comando {0} \u00E8 ambiguo:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "La richiesta di certificato"}, + {"the.issuer", "L'emittente"}, + {"the.generated.certificate", "Il certificato generato"}, + {"the.generated.crl", "La CRL generata"}, + {"the.generated.certificate.request", "La richiesta di certificato generata"}, + {"the.certificate", "Il certificato"}, + {"the.crl", "La CRL"}, + {"the.tsa.certificate", "Il certificato TSA"}, + {"the.input", "L'input"}, + {"reply", "Rispondi"}, + {"one.in.many", "%s #%d di %d"}, + {"alias.in.cacerts", "Emittente <%s> in cacerts"}, + {"alias.in.keystore", "Emittente <%s>"}, + {"with.weak", "%s (debole)"}, + {"key.bit", "Chiave %s a %d bit"}, + {"key.bit.weak", "Chiave %s a %d bit (debole)"}, + {".PATTERN.printX509Cert.with.weak", + "Proprietario: {0}\nEmittente: {1}\nNumero di serie: {2}\nValido da: {3} a: {4}\nImpronte digitali certificato:\n\t SHA1: {5}\n\t SHA256: {6}\nNome algoritmo firma: {7}\nAlgoritmo di chiave pubblica oggetto: {8}\nVersione: {9}"}, + {"PKCS.10.with.weak", + "Richiesta di certificato PKCS #10 (versione 1.0)\nOggetto: %s\nFormato: %s\nChiave pubblica: %s\nAlgoritmo firma: %s\n"}, + {"verified.by.s.in.s.weak", "Verificato da %s in %s con un %s"}, + {"whose.sigalg.risk", "%s utilizza l'algoritmo firma %s che \u00E8 considerato un rischio per la sicurezza."}, + {"whose.key.risk", "%s utilizza un %s che \u00E8 considerato un rischio per la sicurezza."}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java index 10b4cb5dd76..5d47830cf9c 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -357,8 +357,6 @@ public class Resources_ja extends java.util.ListResourceBundle { {"Enter.alias.name.", "\u5225\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(<{0}>\u3068\u540C\u3058\u5834\u5408\u306FRETURN\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044)"}, - {".PATTERN.printX509Cert", - "\u6240\u6709\u8005: {0}\n\u767A\u884C\u8005: {1}\n\u30B7\u30EA\u30A2\u30EB\u756A\u53F7: {2}\n\u6709\u52B9\u671F\u9593\u306E\u958B\u59CB\u65E5: {3}\u7D42\u4E86\u65E5: {4}\n\u8A3C\u660E\u66F8\u306E\u30D5\u30A3\u30F3\u30AC\u30D7\u30EA\u30F3\u30C8:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u540D: {7}\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u516C\u958B\u9375\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: {8} ({9,number,#})\n\u30D0\u30FC\u30B8\u30E7\u30F3: {10}"}, {"What.is.your.first.and.last.name.", "\u59D3\u540D\u306F\u4F55\u3067\u3059\u304B\u3002"}, {"What.is.the.name.of.your.organizational.unit.", @@ -421,15 +419,12 @@ public class Resources_ja extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "\u79D8\u5BC6\u9375\u306E\u751F\u6210\u6642\u306B\u306F -keysize\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044"}, - {"verified.by.s.in.s", "%s(%s\u5185)\u306B\u3088\u308A\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F"}, {"warning.not.verified.make.sure.keystore.is.correct", "\u8B66\u544A: \u691C\u8A3C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002-keystore\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}, {"Extensions.", "\u62E1\u5F35: "}, {".Empty.value.", "(\u7A7A\u306E\u5024)"}, {"Extension.Request.", "\u62E1\u5F35\u30EA\u30AF\u30A8\u30B9\u30C8:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "PKCS #10\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8(\u30D0\u30FC\u30B8\u30E7\u30F31.0)\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8: %s\n\u516C\u958B\u9375: %s \u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 %s \u30AD\u30FC\n"}, {"Unknown.keyUsage.type.", "\u4E0D\u660E\u306AkeyUsage\u30BF\u30A4\u30D7: "}, {"Unknown.extendedkeyUsage.type.", "\u4E0D\u660E\u306AextendedkeyUsage\u30BF\u30A4\u30D7: "}, {"Unknown.AccessDescription.type.", "\u4E0D\u660E\u306AAccessDescription\u30BF\u30A4\u30D7: "}, @@ -438,7 +433,33 @@ public class Resources_ja extends java.util.ListResourceBundle { "\u3053\u306E\u62E1\u5F35\u306F\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u3068\u3057\u3066\u30DE\u30FC\u30AF\u4ED8\u3051\u3067\u304D\u307E\u305B\u3093\u3002 "}, {"Odd.number.of.hex.digits.found.", "\u5947\u6570\u306E16\u9032\u6570\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: "}, {"Unknown.extension.type.", "\u4E0D\u660E\u306A\u62E1\u5F35\u30BF\u30A4\u30D7: "}, - {"command.{0}.is.ambiguous.", "\u30B3\u30DE\u30F3\u30C9{0}\u306F\u3042\u3044\u307E\u3044\u3067\u3059:"} + {"command.{0}.is.ambiguous.", "\u30B3\u30DE\u30F3\u30C9{0}\u306F\u3042\u3044\u307E\u3044\u3067\u3059:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8"}, + {"the.issuer", "\u767A\u884C\u8005"}, + {"the.generated.certificate", "\u751F\u6210\u3055\u308C\u305F\u8A3C\u660E\u66F8"}, + {"the.generated.crl", "\u751F\u6210\u3055\u308C\u305FCRL"}, + {"the.generated.certificate.request", "\u751F\u6210\u3055\u308C\u305F\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8"}, + {"the.certificate", "\u8A3C\u660E\u66F8"}, + {"the.crl", "CRL"}, + {"the.tsa.certificate", "TSA\u8A3C\u660E\u66F8"}, + {"the.input", "\u5165\u529B"}, + {"reply", "\u5FDC\u7B54"}, + {"one.in.many", "%s #%d / %d"}, + {"alias.in.cacerts", "cacerts\u5185\u306E\u767A\u884C\u8005<%s>"}, + {"alias.in.keystore", "\u767A\u884C\u8005<%s>"}, + {"with.weak", "%s (\u5F31)"}, + {"key.bit", "%d\u30D3\u30C3\u30C8%s\u9375"}, + {"key.bit.weak", "%d\u30D3\u30C3\u30C8%s\u9375(\u5F31)"}, + {".PATTERN.printX509Cert.with.weak", + "\u6240\u6709\u8005: {0}\n\u767A\u884C\u8005: {1}\n\u30B7\u30EA\u30A2\u30EB\u756A\u53F7: {2}\n\u6709\u52B9\u671F\u9593\u306E\u958B\u59CB\u65E5: {3}\u7D42\u4E86\u65E5: {4}\n\u8A3C\u660E\u66F8\u306E\u30D5\u30A3\u30F3\u30AC\u30D7\u30EA\u30F3\u30C8:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u540D: {7}\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u516C\u958B\u9375\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: {8}\n\u30D0\u30FC\u30B8\u30E7\u30F3: {9}"}, + {"PKCS.10.with.weak", + "PKCS #10\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8(\u30D0\u30FC\u30B8\u30E7\u30F31.0)\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8: %s\n\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 %s\n\u516C\u958B\u9375: %s\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %s\n"}, + {"verified.by.s.in.s.weak", "%s(%s\u5185)\u306B\u3088\u308A%s\u3067\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F"}, + {"whose.sigalg.risk", "%s\u306F\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u308B%s\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002"}, + {"whose.key.risk", "%s\u306F\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u308B%s\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002"}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java index 7af75578a3c..b25180899c3 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -325,7 +325,7 @@ public class Resources_ko extends java.util.ListResourceBundle { "\uD0A4 \uC800\uC7A5\uC18C\uC5D0 {0,number,integer}\uAC1C\uC758 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."}, {"Your.keystore.contains.keyStore.size.entries", "\uD0A4 \uC800\uC7A5\uC18C\uC5D0 {0,number,integer}\uAC1C\uC758 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."}, - {"Failed.to.parse.input", "\uC785\uB825\uAC12\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, + {"Failed.to.parse.input", "\uC785\uB825\uAC12\uC758 \uAD6C\uBB38\uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, {"Empty.input", "\uC785\uB825\uAC12\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."}, {"Not.X.509.certificate", "X.509 \uC778\uC99D\uC11C\uAC00 \uC544\uB2D9\uB2C8\uB2E4."}, {"alias.has.no.public.key", "{0}\uC5D0 \uACF5\uC6A9 \uD0A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}, @@ -357,8 +357,6 @@ public class Resources_ko extends java.util.ListResourceBundle { {"Enter.alias.name.", "\uBCC4\uCE6D \uC774\uB984 \uC785\uB825: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(<{0}>\uACFC(\uC640) \uB3D9\uC77C\uD55C \uACBD\uC6B0 Enter \uD0A4\uB97C \uB204\uB984)"}, - {".PATTERN.printX509Cert", - "\uC18C\uC720\uC790: {0}\n\uBC1C\uD589\uC790: {1}\n\uC77C\uB828 \uBC88\uD638: {2}\n\uC801\uD569\uD55C \uC2DC\uC791 \uB0A0\uC9DC: {3} \uC885\uB8CC \uB0A0\uC9DC: {4}\n\uC778\uC99D\uC11C \uC9C0\uBB38:\n\t SHA1: {5}\n\t SHA256: {6}\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998 \uC774\uB984: {7}\n\uC8FC\uCCB4 \uACF5\uC6A9 \uD0A4 \uC54C\uACE0\uB9AC\uC998: {8} ({9,number,#})\n\uBC84\uC804: {10}"}, {"What.is.your.first.and.last.name.", "\uC774\uB984\uACFC \uC131\uC744 \uC785\uB825\uD558\uC2ED\uC2DC\uC624."}, {"What.is.the.name.of.your.organizational.unit.", @@ -421,15 +419,12 @@ public class Resources_ko extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "\uBCF4\uC548 \uD0A4\uB97C \uC0DD\uC131\uD558\uB824\uBA74 -keysize\uB97C \uC81C\uACF5\uD558\uC2ED\uC2DC\uC624."}, - {"verified.by.s.in.s", "%s(%s)\uC5D0 \uC758\uD574 \uD655\uC778\uB428"}, {"warning.not.verified.make.sure.keystore.is.correct", "\uACBD\uACE0: \uD655\uC778\uB418\uC9C0 \uC54A\uC74C. -keystore\uAC00 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624."}, {"Extensions.", "\uD655\uC7A5: "}, {".Empty.value.", "(\uBE44\uC5B4 \uC788\uB294 \uAC12)"}, {"Extension.Request.", "\uD655\uC7A5 \uC694\uCCAD:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "PKCS #10 \uC778\uC99D\uC11C \uC694\uCCAD(1.0 \uBC84\uC804)\n\uC81C\uBAA9: %s\n\uACF5\uC6A9 \uD0A4: %s \uD615\uC2DD %s \uD0A4\n"}, {"Unknown.keyUsage.type.", "\uC54C \uC218 \uC5C6\uB294 keyUsage \uC720\uD615: "}, {"Unknown.extendedkeyUsage.type.", "\uC54C \uC218 \uC5C6\uB294 extendedkeyUsage \uC720\uD615: "}, {"Unknown.AccessDescription.type.", "\uC54C \uC218 \uC5C6\uB294 AccessDescription \uC720\uD615: "}, @@ -438,7 +433,33 @@ public class Resources_ko extends java.util.ListResourceBundle { "\uC774 \uD655\uC7A5\uC740 \uC911\uC694\uD55C \uAC83\uC73C\uB85C \uD45C\uC2DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "}, {"Odd.number.of.hex.digits.found.", "\uD640\uC218 \uAC1C\uC758 16\uC9C4\uC218\uAC00 \uBC1C\uACAC\uB428: "}, {"Unknown.extension.type.", "\uC54C \uC218 \uC5C6\uB294 \uD655\uC7A5 \uC720\uD615: "}, - {"command.{0}.is.ambiguous.", "{0} \uBA85\uB839\uC774 \uBAA8\uD638\uD568:"} + {"command.{0}.is.ambiguous.", "{0} \uBA85\uB839\uC774 \uBAA8\uD638\uD568:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "\uC778\uC99D\uC11C \uC694\uCCAD"}, + {"the.issuer", "\uBC1C\uD589\uC790"}, + {"the.generated.certificate", "\uC0DD\uC131\uB41C \uC778\uC99D\uC11C"}, + {"the.generated.crl", "\uC0DD\uC131\uB41C CRL"}, + {"the.generated.certificate.request", "\uC0DD\uC131\uB41C \uC778\uC99D\uC11C \uC694\uCCAD"}, + {"the.certificate", "\uC778\uC99D\uC11C"}, + {"the.crl", "CRL"}, + {"the.tsa.certificate", "TSA \uC778\uC99D\uC11C"}, + {"the.input", "\uC785\uB825"}, + {"reply", "\uD68C\uC2E0"}, + {"one.in.many", "%s #%d/%d"}, + {"alias.in.cacerts", "cacerts\uC758 <%s> \uBC1C\uD589\uC790"}, + {"alias.in.keystore", "<%s> \uBC1C\uD589\uC790"}, + {"with.weak", "%s(\uC57D\uD568)"}, + {"key.bit", "%d\uBE44\uD2B8 %s \uD0A4"}, + {"key.bit.weak", "%d\uBE44\uD2B8 %s \uD0A4(\uC57D\uD568)"}, + {".PATTERN.printX509Cert.with.weak", + "\uC18C\uC720\uC790: {0}\n\uBC1C\uD589\uC790: {1}\n\uC77C\uB828 \uBC88\uD638: {2}\n\uC801\uD569\uD55C \uC2DC\uC791 \uB0A0\uC9DC: {3} \uC885\uB8CC \uB0A0\uC9DC: {4}\n\uC778\uC99D\uC11C \uC9C0\uBB38:\n\t SHA1: {5}\n\t SHA256: {6}\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998 \uC774\uB984: {7}\n\uC8FC\uCCB4 \uACF5\uC6A9 \uD0A4 \uC54C\uACE0\uB9AC\uC998: {8}\n\uBC84\uC804: {9}"}, + {"PKCS.10.with.weak", + "PKCS #10 \uC778\uC99D\uC11C \uC694\uCCAD(1.0 \uBC84\uC804)\n\uC81C\uBAA9: %s\n\uD615\uC2DD: %s\n\uACF5\uC6A9 \uD0A4: %s\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998: %s\n"}, + {"verified.by.s.in.s.weak", "%s\uC774(\uAC00) %s\uC5D0\uC11C %s\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uD655\uC778"}, + {"whose.sigalg.risk", "%s\uC774(\uAC00) \uBCF4\uC548 \uC704\uD5D8\uC73C\uB85C \uAC04\uC8FC\uB418\uB294 %s \uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4."}, + {"whose.key.risk", "%s\uC774(\uAC00) \uBCF4\uC548 \uC704\uD5D8\uC73C\uB85C \uAC04\uC8FC\uB418\uB294 %s\uC744(\uB97C) \uC0AC\uC6A9\uD569\uB2C8\uB2E4."}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java index bc6618927ca..fa001322172 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -357,8 +357,6 @@ public class Resources_pt_BR extends java.util.ListResourceBundle { {"Enter.alias.name.", "Informe o nome do alias: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(RETURN se for igual ao de <{0}>)"}, - {".PATTERN.printX509Cert", - "Propriet\u00E1rio: {0}\nEmissor: {1}\nN\u00FAmero de s\u00E9rie: {2}\nV\u00E1lido de {3} at\u00E9 {4}\nFingerprints do certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNome do algoritmo de assinatura: {7}\nAlgoritmo de Chave P\u00FAblica do Assunto: {8} ({9,number,#})\nVers\u00E3o: {10}"}, {"What.is.your.first.and.last.name.", "Qual \u00E9 o seu nome e o seu sobrenome?"}, {"What.is.the.name.of.your.organizational.unit.", @@ -421,15 +419,12 @@ public class Resources_pt_BR extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "Forne\u00E7a o -keysize para a gera\u00E7\u00E3o da chave secreta"}, - {"verified.by.s.in.s", "Verificado por %s em %s"}, {"warning.not.verified.make.sure.keystore.is.correct", "ADVERT\u00CANCIA: n\u00E3o verificado. Certifique-se que -keystore esteja correto."}, {"Extensions.", "Extens\u00F5es: "}, {".Empty.value.", "(Valor vazio)"}, {"Extension.Request.", "Solicita\u00E7\u00E3o de Extens\u00E3o:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "Solicita\u00E7\u00E3o do Certificado PKCS #10 (Vers\u00E3o 1.0)\nAssunto: %s\nChave P\u00FAblica: %s formato %s chave\n"}, {"Unknown.keyUsage.type.", "Tipo de keyUsage desconhecido: "}, {"Unknown.extendedkeyUsage.type.", "Tipo de extendedkeyUsage desconhecido: "}, {"Unknown.AccessDescription.type.", "Tipo de AccessDescription desconhecido: "}, @@ -438,7 +433,33 @@ public class Resources_pt_BR extends java.util.ListResourceBundle { "Esta extens\u00E3o n\u00E3o pode ser marcada como cr\u00EDtica. "}, {"Odd.number.of.hex.digits.found.", "Encontrado n\u00FAmero \u00EDmpar de seis d\u00EDgitos: "}, {"Unknown.extension.type.", "Tipo de extens\u00E3o desconhecido: "}, - {"command.{0}.is.ambiguous.", "o comando {0} \u00E9 amb\u00EDguo:"} + {"command.{0}.is.ambiguous.", "o comando {0} \u00E9 amb\u00EDguo:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "A solicita\u00E7\u00E3o do certificado"}, + {"the.issuer", "O emissor"}, + {"the.generated.certificate", "O certificado gerado"}, + {"the.generated.crl", "A CRL gerada"}, + {"the.generated.certificate.request", "A solicita\u00E7\u00E3o do certificado gerada"}, + {"the.certificate", "O certificado"}, + {"the.crl", "A CRL"}, + {"the.tsa.certificate", "O certificado TSA"}, + {"the.input", "A entrada"}, + {"reply", "Resposta"}, + {"one.in.many", "%s #%d de %d"}, + {"alias.in.cacerts", "Emissor <%s> no cacerts"}, + {"alias.in.keystore", "Emissor <%s>"}, + {"with.weak", "%s (fraca)"}, + {"key.bit", "Chave %s de %d bits"}, + {"key.bit.weak", "Chave %s de %d bits (fraca)"}, + {".PATTERN.printX509Cert.with.weak", + "Propriet\u00E1rio: {0}\nEmissor: {1}\nN\u00FAmero de s\u00E9rie: {2}\nV\u00E1lido de: {3} at\u00E9: {4}\nFingerprints do certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNome do algoritmo de assinatura: {7}\nAlgoritmo de Chave P\u00FAblica do Assunto: {8}\nVers\u00E3o: {9}"}, + {"PKCS.10.with.weak", + "Solicita\u00E7\u00E3o do Certificado PKCS #10 (Vers\u00E3o 1.0)\nAssunto: %s\nFormato: %s\nChave P\u00FAblica: %s\nAlgoritmo de assinatura: %s\n"}, + {"verified.by.s.in.s.weak", "Verificado por %s em %s com um %s"}, + {"whose.sigalg.risk", "%s usa o algoritmo de assinatura %s que \u00E9 considerado um risco \u00E0 seguran\u00E7a."}, + {"whose.key.risk", "%s usa um %s que \u00E9 considerado um risco \u00E0 seguran\u00E7a."}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java index 4c1053ce9e8..bf53bf8b8ea 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -55,7 +55,7 @@ public class Resources_sv extends java.util.ListResourceBundle { {"Changes.an.entry.s.alias", "\u00C4ndrar postalias"}, //-changealias {"Deletes.an.entry", - "Tar bort post"}, //-delete + "Tar bort en post"}, //-delete {"Exports.certificate", "Exporterar certifikat"}, //-exportcert {"Generates.a.key.pair", @@ -183,7 +183,7 @@ public class Resources_sv extends java.util.ListResourceBundle { {"validity.number.of.days", "antal dagar f\u00F6r giltighet"}, //-validity {"Serial.ID.of.cert.to.revoke", - "Seriellt id f\u00F6r certifikat som ska \u00E5terkallas"}, //-id + "Serienummer p\u00E5 certifikat som ska \u00E5terkallas"}, //-id // keytool: Running part {"keytool.error.", "nyckelverktygsfel: "}, {"Illegal.option.", "Otill\u00E5tet alternativ: "}, @@ -278,7 +278,7 @@ public class Resources_sv extends java.util.ListResourceBundle { "Certifikatet har inte lagts till i nyckellagret"}, {".Storing.ksfname.", "[Lagrar {0}]"}, {"alias.has.no.public.key.certificate.", - "{0} saknar offentlig nyckel (certifikat)"}, + "{0} saknar \u00F6ppen nyckel (certifikat)"}, {"Cannot.derive.signature.algorithm", "Kan inte h\u00E4rleda signaturalgoritm"}, {"Alias.alias.does.not.exist", @@ -328,7 +328,7 @@ public class Resources_sv extends java.util.ListResourceBundle { {"Failed.to.parse.input", "Kunde inte tolka indata"}, {"Empty.input", "Inga indata"}, {"Not.X.509.certificate", "Inte ett X.509-certifikat"}, - {"alias.has.no.public.key", "{0} saknar offentlig nyckel"}, + {"alias.has.no.public.key", "{0} saknar \u00F6ppen nyckel"}, {"alias.has.no.X.509.certificate", "{0} saknar X.509-certifikat"}, {"New.certificate.self.signed.", "Nytt certifikat (sj\u00E4lvsignerat):"}, {"Reply.has.no.certificates", "Svaret saknar certifikat"}, @@ -357,8 +357,6 @@ public class Resources_sv extends java.util.ListResourceBundle { {"Enter.alias.name.", "Ange aliasnamn: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(RETURN om det \u00E4r det samma som f\u00F6r <{0}>)"}, - {".PATTERN.printX509Cert", - "\u00C4gare: {0}\nUtf\u00E4rdare: {1}\nSerienummer: {2}\nGiltigt fr\u00E5n: {3}, till: {4}\nCertifikatfingeravtryck:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgoritmnamn: {7}\n\u00C4mne f\u00F6r algoritm f\u00F6r \u00F6ppen nyckel: {8} ({9,number,#})\nVersion: {10}"}, {"What.is.your.first.and.last.name.", "Vad heter du i f\u00F6r- och efternamn?"}, {"What.is.the.name.of.your.organizational.unit.", @@ -383,7 +381,7 @@ public class Resources_sv extends java.util.ListResourceBundle { {".WARNING.WARNING.WARNING.", "***************** WARNING WARNING WARNING *****************"}, - {"Signer.d.", "Signerare #%d:"}, + {"Signer.d.", "Undertecknare %d:"}, {"Timestamp.", "Tidsst\u00E4mpel:"}, {"Signature.", "Signatur:"}, {"CRLs.", "CRL:er:"}, @@ -398,7 +396,7 @@ public class Resources_sv extends java.util.ListResourceBundle { "* Integriteten f\u00F6r den information som lagras i srckeystore*\n* har INTE verifierats! Om du vill verifiera dess integritet *\n* m\u00E5ste du ange l\u00F6senordet f\u00F6r srckeystore. *"}, {"Certificate.reply.does.not.contain.public.key.for.alias.", - "Certifikatsvaret inneh\u00E5ller inte n\u00E5gon offentlig nyckel f\u00F6r <{0}>"}, + "Certifikatsvaret inneh\u00E5ller inte n\u00E5gon \u00F6ppen nyckel f\u00F6r <{0}>"}, {"Incomplete.certificate.chain.in.reply", "Ofullst\u00E4ndig certifikatskedja i svaret"}, {"Certificate.chain.in.reply.does.not.verify.", @@ -421,15 +419,12 @@ public class Resources_sv extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "Ange -keysize f\u00F6r att skapa hemlig nyckel"}, - {"verified.by.s.in.s", "Verifierad av %s i %s"}, {"warning.not.verified.make.sure.keystore.is.correct", "VARNING: ej verifierad. Se till att -nyckellager \u00E4r korrekt."}, {"Extensions.", "Till\u00E4gg: "}, {".Empty.value.", "(Tomt v\u00E4rde)"}, {"Extension.Request.", "Till\u00E4ggsbeg\u00E4ran:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "PKCS #10 certifikatbeg\u00E4ran (version 1.0)\n\u00C4mne: %s\nAllm\u00E4n nyckel: %s-format %s-nyckel\n"}, {"Unknown.keyUsage.type.", "Ok\u00E4nd keyUsage-typ: "}, {"Unknown.extendedkeyUsage.type.", "Ok\u00E4nd extendedkeyUsage-typ: "}, {"Unknown.AccessDescription.type.", "Ok\u00E4nd AccessDescription-typ: "}, @@ -438,7 +433,33 @@ public class Resources_sv extends java.util.ListResourceBundle { "Detta till\u00E4gg kan inte markeras som kritiskt. "}, {"Odd.number.of.hex.digits.found.", "Udda antal hex-siffror p\u00E5tr\u00E4ffades: "}, {"Unknown.extension.type.", "Ok\u00E4nd till\u00E4ggstyp: "}, - {"command.{0}.is.ambiguous.", "kommandot {0} \u00E4r tvetydigt:"} + {"command.{0}.is.ambiguous.", "kommandot {0} \u00E4r tvetydigt:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "Certifikatbeg\u00E4ran"}, + {"the.issuer", "Utf\u00E4rdaren"}, + {"the.generated.certificate", "Det genererade certifikatet"}, + {"the.generated.crl", "Den genererade listan \u00F6ver \u00E5terkallade certifikat"}, + {"the.generated.certificate.request", "Den genererade certifikatbeg\u00E4ran"}, + {"the.certificate", "Certifikatet"}, + {"the.crl", "Listan \u00F6ver \u00E5terkallade certifikat"}, + {"the.tsa.certificate", "TSA-certifikatet"}, + {"the.input", "Indata"}, + {"reply", "Svar"}, + {"one.in.many", "%s %d av %d"}, + {"alias.in.cacerts", "Utf\u00E4rdaren <%s> i cacerts"}, + {"alias.in.keystore", "Utf\u00E4rdaren <%s>"}, + {"with.weak", "%s (svag)"}, + {"key.bit", "%d-bitars %s-nyckel"}, + {"key.bit.weak", "%d-bitars %s-nyckel (svag)"}, + {".PATTERN.printX509Cert.with.weak", + "\u00C4gare: {0}\nUtf\u00E4rdare: {1}\nSerienummer: {2}\nGiltigt fr\u00E5n: {3}, till: {4}\nCertifikatfingeravtryck:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgoritmnamn: {7}\nAlgoritm f\u00F6r \u00F6ppen nyckel f\u00F6r \u00E4mne: {8}\nVersion: {9}"}, + {"PKCS.10.with.weak", + "PKCS #10-certifikatbeg\u00E4ran (version 1.0)\n\u00C4mne: %s\nFormat: %s\n\u00D6ppen nyckel: %s\nSignaturalgoritm: %s\n"}, + {"verified.by.s.in.s.weak", "Verifierades av %s i %s med en %s"}, + {"whose.sigalg.risk", "%s anv\u00E4nder signaturalgoritmen %s, vilket anses utg\u00F6ra en s\u00E4kerhetsrisk."}, + {"whose.key.risk", "%s anv\u00E4nder en %s, vilket anses utg\u00F6ra en s\u00E4kerhetsrisk."}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java index 44cc80af76b..dbaf741de94 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -357,8 +357,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"Enter.alias.name.", "\u8F93\u5165\u522B\u540D: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(\u5982\u679C\u548C <{0}> \u76F8\u540C, \u5219\u6309\u56DE\u8F66)"}, - {".PATTERN.printX509Cert", - "\u6240\u6709\u8005: {0}\n\u53D1\u5E03\u8005: {1}\n\u5E8F\u5217\u53F7: {2}\n\u751F\u6548\u65F6\u95F4: {3}, \u5931\u6548\u65F6\u95F4: {4}\n\u8BC1\u4E66\u6307\u7EB9:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7B7E\u540D\u7B97\u6CD5\u540D\u79F0: {7}\n\u4E3B\u4F53\u516C\u5171\u5BC6\u94A5\u7B97\u6CD5: {8} ({9,number,#})\n\u7248\u672C: {10}"}, {"What.is.your.first.and.last.name.", "\u60A8\u7684\u540D\u5B57\u4E0E\u59D3\u6C0F\u662F\u4EC0\u4E48?"}, {"What.is.the.name.of.your.organizational.unit.", @@ -421,15 +419,12 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "\u8BF7\u63D0\u4F9B -keysize \u4EE5\u751F\u6210\u5BC6\u94A5"}, - {"verified.by.s.in.s", "\u7531 %s \u9A8C\u8BC1(\u5728 %s \u4E2D)"}, {"warning.not.verified.make.sure.keystore.is.correct", "\u8B66\u544A: \u672A\u9A8C\u8BC1\u3002\u8BF7\u786E\u4FDD\u5BC6\u94A5\u5E93\u662F\u6B63\u786E\u7684\u3002"}, {"Extensions.", "\u6269\u5C55: "}, {".Empty.value.", "(\u7A7A\u503C)"}, {"Extension.Request.", "\u6269\u5C55\u8BF7\u6C42:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "PKCS #10 \u8BC1\u4E66\u8BF7\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9898: %s\n\u516C\u5171\u5BC6\u94A5: %s \u683C\u5F0F %s \u5BC6\u94A5\n"}, {"Unknown.keyUsage.type.", "\u672A\u77E5 keyUsage \u7C7B\u578B: "}, {"Unknown.extendedkeyUsage.type.", "\u672A\u77E5 extendedkeyUsage \u7C7B\u578B: "}, {"Unknown.AccessDescription.type.", "\u672A\u77E5 AccessDescription \u7C7B\u578B: "}, @@ -438,7 +433,33 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { "\u65E0\u6CD5\u5C06\u6B64\u6269\u5C55\u6807\u8BB0\u4E3A\u201C\u4E25\u91CD\u201D\u3002"}, {"Odd.number.of.hex.digits.found.", "\u627E\u5230\u5947\u6570\u4E2A\u5341\u516D\u8FDB\u5236\u6570\u5B57: "}, {"Unknown.extension.type.", "\u672A\u77E5\u6269\u5C55\u7C7B\u578B: "}, - {"command.{0}.is.ambiguous.", "\u547D\u4EE4{0}\u4E0D\u660E\u786E:"} + {"command.{0}.is.ambiguous.", "\u547D\u4EE4{0}\u4E0D\u660E\u786E:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "\u8BC1\u4E66\u8BF7\u6C42"}, + {"the.issuer", "\u53D1\u5E03\u8005"}, + {"the.generated.certificate", "\u751F\u6210\u7684\u8BC1\u4E66"}, + {"the.generated.crl", "\u751F\u6210\u7684 CRL"}, + {"the.generated.certificate.request", "\u751F\u6210\u7684\u8BC1\u4E66\u8BF7\u6C42"}, + {"the.certificate", "\u8BC1\u4E66"}, + {"the.crl", "CRL"}, + {"the.tsa.certificate", "TSA \u8BC1\u4E66"}, + {"the.input", "\u8F93\u5165"}, + {"reply", "\u56DE\u590D"}, + {"one.in.many", "%s #%d/%d"}, + {"alias.in.cacerts", "cacerts \u4E2D\u7684\u53D1\u5E03\u8005 <%s>"}, + {"alias.in.keystore", "\u53D1\u5E03\u8005 <%s>"}, + {"with.weak", "%s (\u5F31)"}, + {"key.bit", "%d \u4F4D %s \u5BC6\u94A5"}, + {"key.bit.weak", "%d \u4F4D %s \u5BC6\u94A5 (\u5F31)"}, + {".PATTERN.printX509Cert.with.weak", + "\u6240\u6709\u8005: {0}\n\u53D1\u5E03\u8005: {1}\n\u5E8F\u5217\u53F7: {2}\n\u751F\u6548\u65F6\u95F4: {3}, \u5931\u6548\u65F6\u95F4: {4}\n\u8BC1\u4E66\u6307\u7EB9:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7B7E\u540D\u7B97\u6CD5\u540D\u79F0: {7}\n\u4E3B\u4F53\u516C\u5171\u5BC6\u94A5\u7B97\u6CD5: {8}\n\u7248\u672C: {9}"}, + {"PKCS.10.with.weak", + "PKCS #10 \u8BC1\u4E66\u8BF7\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u4F53: %s\n\u683C\u5F0F: %s\n\u516C\u5171\u5BC6\u94A5: %s\n\u7B7E\u540D\u7B97\u6CD5: %s\n"}, + {"verified.by.s.in.s.weak", "\u7531 %2$s \u4E2D\u7684 %1$s \u4EE5 %3$s \u9A8C\u8BC1"}, + {"whose.sigalg.risk", "%s \u4F7F\u7528\u7684 %s \u7B7E\u540D\u7B97\u6CD5\u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"}, + {"whose.key.risk", "%s \u4F7F\u7528\u7684 %s \u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java index 19e203733b6..c73206ec333 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -357,8 +357,6 @@ public class Resources_zh_TW extends java.util.ListResourceBundle { {"Enter.alias.name.", "\u8F38\u5165\u5225\u540D\u540D\u7A31: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(RETURN \u5982\u679C\u548C <{0}> \u7684\u76F8\u540C)"}, - {".PATTERN.printX509Cert", - "\u64C1\u6709\u8005: {0}\n\u767C\u51FA\u8005: {1}\n\u5E8F\u865F: {2}\n\u6709\u6548\u671F\u81EA: {3} \u5230: {4}\n\u6191\u8B49\u6307\u7D0B:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5\u540D\u7A31: {7}\n\u4E3B\u9AD4\u516C\u958B\u91D1\u9470\u6F14\u7B97\u6CD5: {8} ({9,number,#})\n\u7248\u672C: {10}"}, {"What.is.your.first.and.last.name.", "\u60A8\u7684\u540D\u5B57\u8207\u59D3\u6C0F\u70BA\u4F55\uFF1F"}, {"What.is.the.name.of.your.organizational.unit.", @@ -421,15 +419,12 @@ public class Resources_zh_TW extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "\u8ACB\u63D0\u4F9B -keysize \u4EE5\u7522\u751F\u79D8\u5BC6\u91D1\u9470"}, - {"verified.by.s.in.s", "\u7531 %s \u9A57\u8B49 (\u5728 %s \u4E2D)"}, {"warning.not.verified.make.sure.keystore.is.correct", "\u8B66\u544A: \u672A\u9A57\u8B49\u3002\u8ACB\u78BA\u5B9A -keystore \u6B63\u78BA\u3002"}, {"Extensions.", "\u64F4\u5145\u5957\u4EF6: "}, {".Empty.value.", "(\u7A7A\u767D\u503C)"}, {"Extension.Request.", "\u64F4\u5145\u5957\u4EF6\u8981\u6C42:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "PKCS #10 \u6191\u8B49\u8981\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9AD4: %s\n\u516C\u7528\u91D1\u9470: %s \u683C\u5F0F %s \u91D1\u9470\n"}, {"Unknown.keyUsage.type.", "\u4E0D\u660E\u7684 keyUsage \u985E\u578B: "}, {"Unknown.extendedkeyUsage.type.", "\u4E0D\u660E\u7684 extendedkeyUsage \u985E\u578B: "}, {"Unknown.AccessDescription.type.", "\u4E0D\u660E\u7684 AccessDescription \u985E\u578B: "}, @@ -438,7 +433,33 @@ public class Resources_zh_TW extends java.util.ListResourceBundle { "\u6B64\u64F4\u5145\u5957\u4EF6\u7121\u6CD5\u6A19\u793A\u70BA\u95DC\u9375\u3002"}, {"Odd.number.of.hex.digits.found.", "\u627E\u5230\u5341\u516D\u9032\u4F4D\u6578\u5B57\u7684\u5947\u6578: "}, {"Unknown.extension.type.", "\u4E0D\u660E\u7684\u64F4\u5145\u5957\u4EF6\u985E\u578B: "}, - {"command.{0}.is.ambiguous.", "\u547D\u4EE4 {0} \u4E0D\u660E\u78BA:"} + {"command.{0}.is.ambiguous.", "\u547D\u4EE4 {0} \u4E0D\u660E\u78BA:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "\u6191\u8B49\u8981\u6C42"}, + {"the.issuer", "\u767C\u884C\u4EBA"}, + {"the.generated.certificate", "\u7522\u751F\u7684\u6191\u8B49"}, + {"the.generated.crl", "\u7522\u751F\u7684 CRL"}, + {"the.generated.certificate.request", "\u7522\u751F\u7684\u6191\u8B49\u8981\u6C42"}, + {"the.certificate", "\u6191\u8B49"}, + {"the.crl", "CRL"}, + {"the.tsa.certificate", "TSA \u6191\u8B49"}, + {"the.input", "\u8F38\u5165"}, + {"reply", "\u56DE\u8986"}, + {"one.in.many", "%s #%d / %d"}, + {"alias.in.cacerts", "cacerts \u4E2D\u7684\u767C\u884C\u4EBA <%s>"}, + {"alias.in.keystore", "\u767C\u884C\u4EBA <%s>"}, + {"with.weak", "%s (\u4F4E\u5F37\u5EA6)"}, + {"key.bit", "%d \u4F4D\u5143\u7684 %s \u91D1\u9470"}, + {"key.bit.weak", "%d \u4F4D\u5143\u7684 %s \u91D1\u9470 (\u4F4E\u5F37\u5EA6)"}, + {".PATTERN.printX509Cert.with.weak", + "\u64C1\u6709\u8005: {0}\n\u767C\u884C\u4EBA: {1}\n\u5E8F\u865F: {2}\n\u6709\u6548\u671F\u81EA: {3} \u5230: {4}\n\u6191\u8B49\u6307\u7D0B:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5\u540D\u7A31: {7}\n\u4E3B\u9AD4\u516C\u958B\u91D1\u9470\u6F14\u7B97\u6CD5: {8}\n\u7248\u672C: {9}"}, + {"PKCS.10.with.weak", + "PKCS #10 \u6191\u8B49\u8981\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9AD4: %s\n\u683C\u5F0F: %s\n\u516C\u7528\u91D1\u9470: %s\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5: %s\n"}, + {"verified.by.s.in.s.weak", "\u7531 %2$s \u4E2D\u7684 %1$s \u4EE5 %3$s \u9A57\u8B49"}, + {"whose.sigalg.risk", "%s \u4F7F\u7528\u7684 %s \u7C3D\u7AE0\u6F14\u7B97\u6CD5\u5B58\u5728\u5B89\u5168\u98A8\u96AA\u3002"}, + {"whose.key.risk", "%s \u4F7F\u7528\u7684 %s \u5B58\u5728\u5B89\u5168\u98A8\u96AA\u3002"}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ko.java b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ko.java index 1218fec2dc8..ce223ef72ab 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ko.java +++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ko.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -99,7 +99,7 @@ public class AuthResources_ko extends java.util.ListResourceBundle { /*** EVERYTHING BELOW IS DEPRECATED ***/ // com.sun.security.auth.PolicyFile - {".error.parsing.", ": \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958 "}, + {".error.parsing.", ": \uAD6C\uBB38\uBD84\uC11D \uC624\uB958 "}, {"COLON", ": "}, {".error.adding.Permission.", ": \uAD8C\uD55C \uCD94\uAC00 \uC624\uB958 "}, {"SPACE", " "}, diff --git a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_sv.java b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_sv.java index 28a17eabb31..8e7e2825a69 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_sv.java +++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_sv.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -137,7 +137,7 @@ public class AuthResources_sv extends java.util.ListResourceBundle { // provided.null.name is the NullPointerException message when a // developer incorrectly passes a null name to the constructor of // subclasses of java.security.Principal - {"provided.null.name", "angav null-namn"} + {"provided.null.name", "null-namn angavs"} }; diff --git a/jdk/src/java.base/share/classes/sun/security/util/CertConstraintParameters.java b/jdk/src/java.base/share/classes/sun/security/util/CertConstraintParameters.java deleted file mode 100644 index 23880f7c6aa..00000000000 --- a/jdk/src/java.base/share/classes/sun/security/util/CertConstraintParameters.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ - -package sun.security.util; - -import java.security.Timestamp; -import java.security.cert.X509Certificate; -import java.util.Date; - -/** - * This class is a wrapper for keeping state and passing objects between PKIX, - * AlgorithmChecker, and DisabledAlgorithmConstraints. - */ -public class CertConstraintParameters { - // A certificate being passed to check against constraints. - private final X509Certificate cert; - // This is true if the trust anchor in the certificate chain matches a cert - // in AnchorCertificates - private final boolean trustedMatch; - // PKIXParameter date - private final Date pkixDate; - // Timestamp of the signed JAR file - private final Timestamp jarTimestamp; - - public CertConstraintParameters(X509Certificate c, boolean match, - Date pkixdate, Timestamp jarTime) { - cert = c; - trustedMatch = match; - pkixDate = pkixdate; - jarTimestamp = jarTime; - } - - public CertConstraintParameters(X509Certificate c) { - this(c, false, null, null); - } - - // Returns if the trust anchor has a match if anchor checking is enabled. - public boolean isTrustedMatch() { - return trustedMatch; - } - - public X509Certificate getCertificate() { - return cert; - } - - public Date getPKIXParamDate() { - return pkixDate; - } - - public Timestamp getJARTimestamp() { - return jarTimestamp; - } - -} diff --git a/jdk/src/java.base/share/classes/sun/security/util/ConstraintsParameters.java b/jdk/src/java.base/share/classes/sun/security/util/ConstraintsParameters.java new file mode 100644 index 00000000000..83e6d32ff8a --- /dev/null +++ b/jdk/src/java.base/share/classes/sun/security/util/ConstraintsParameters.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.security.util; + +import sun.security.validator.Validator; + +import java.security.AlgorithmParameters; +import java.security.Key; +import java.security.Timestamp; +import java.security.cert.X509Certificate; +import java.util.Date; + +/** + * This class contains parameters for checking against constraints that extend + * past the publicly available parameters in java.security.AlgorithmConstraints. + + * This is currently on passed between between PKIX, AlgorithmChecker, + * and DisabledAlgorithmConstraints. + */ +public class ConstraintsParameters { + /* + * The below 3 values are used the same as the permit() methods + * published in java.security.AlgorithmConstraints. + */ + // Algorithm string to be checked against constraints + private final String algorithm; + // AlgorithmParameters to the algorithm being checked + private final AlgorithmParameters algParams; + // Public Key being checked against constraints + private final Key publicKey; + + /* + * New values that are checked against constraints that the current public + * API does not support. + */ + // A certificate being passed to check against constraints. + private final X509Certificate cert; + // This is true if the trust anchor in the certificate chain matches a cert + // in AnchorCertificates + private final boolean trustedMatch; + // PKIXParameter date + private final Date pkixDate; + // Timestamp of the signed JAR file + private final Timestamp jarTimestamp; + private final String variant; + + public ConstraintsParameters(X509Certificate c, boolean match, + Date pkixdate, Timestamp jarTime, String variant) { + cert = c; + trustedMatch = match; + pkixDate = pkixdate; + jarTimestamp = jarTime; + this.variant = (variant == null ? Validator.VAR_GENERIC : variant); + algorithm = null; + algParams = null; + publicKey = null; + } + + public ConstraintsParameters(String algorithm, AlgorithmParameters params, + Key key, String variant) { + this.algorithm = algorithm; + algParams = params; + this.publicKey = key; + cert = null; + trustedMatch = false; + pkixDate = null; + jarTimestamp = null; + this.variant = (variant == null ? Validator.VAR_GENERIC : variant); + } + + + public ConstraintsParameters(X509Certificate c) { + this(c, false, null, null, + Validator.VAR_GENERIC); + } + + public ConstraintsParameters(Timestamp jarTime) { + this(null, false, null, jarTime, Validator.VAR_GENERIC); + } + + public String getAlgorithm() { + return algorithm; + } + + public AlgorithmParameters getAlgParams() { + return algParams; + } + + public Key getPublicKey() { + return publicKey; + } + // Returns if the trust anchor has a match if anchor checking is enabled. + public boolean isTrustedMatch() { + return trustedMatch; + } + + public X509Certificate getCertificate() { + return cert; + } + + public Date getPKIXParamDate() { + return pkixDate; + } + + public Timestamp getJARTimestamp() { + return jarTimestamp; + } + + public String getVariant() { + return variant; + } +} diff --git a/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java b/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java index 1e5600214bc..54eade39044 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java +++ b/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -44,16 +44,26 @@ import sun.util.calendar.CalendarSystem; */ class DerInputBuffer extends ByteArrayInputStream implements Cloneable { - DerInputBuffer(byte[] buf) { super(buf); } + boolean allowBER = true; - DerInputBuffer(byte[] buf, int offset, int len) { + // used by sun/security/util/DerInputBuffer/DerInputBufferEqualsHashCode.java + DerInputBuffer(byte[] buf) { + this(buf, true); + } + + DerInputBuffer(byte[] buf, boolean allowBER) { + super(buf); + this.allowBER = allowBER; + } + + DerInputBuffer(byte[] buf, int offset, int len, boolean allowBER) { super(buf, offset, len); + this.allowBER = allowBER; } DerInputBuffer dup() { try { DerInputBuffer retval = (DerInputBuffer)clone(); - retval.mark(Integer.MAX_VALUE); return retval; } catch (CloneNotSupportedException e) { @@ -147,8 +157,8 @@ class DerInputBuffer extends ByteArrayInputStream implements Cloneable { System.arraycopy(buf, pos, bytes, 0, len); skip(len); - // check to make sure no extra leading 0s for DER - if (len >= 2 && (bytes[0] == 0) && (bytes[1] >= 0)) { + // BER allows leading 0s but DER does not + if (!allowBER && (len >= 2 && (bytes[0] == 0) && (bytes[1] >= 0))) { throw new IOException("Invalid encoding: redundant leading 0s"); } diff --git a/jdk/src/java.base/share/classes/sun/security/util/DerInputStream.java b/jdk/src/java.base/share/classes/sun/security/util/DerInputStream.java index 94c9085a7bc..d8498c79625 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/DerInputStream.java +++ b/jdk/src/java.base/share/classes/sun/security/util/DerInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -80,6 +80,25 @@ public class DerInputStream { init(data, 0, data.length, true); } + /** + * Create a DER input stream from part of a data buffer with + * additional arg to control whether DER checks are enforced. + * The buffer is not copied, it is shared. Accordingly, the + * buffer should be treated as read-only. + * + * @param data the buffer from which to create the string (CONSUMED) + * @param offset the first index of data which will + * be read as DER input in the new stream + * @param len how long a chunk of the buffer to use, + * starting at "offset" + * @param allowBER whether to allow constructed indefinite-length + * encoding as well as tolerate leading 0s + */ + public DerInputStream(byte[] data, int offset, int len, + boolean allowBER) throws IOException { + init(data, offset, len, allowBER); + } + /** * Create a DER input stream from part of a data buffer. * The buffer is not copied, it is shared. Accordingly, the @@ -95,47 +114,27 @@ public class DerInputStream { init(data, offset, len, true); } - /** - * Create a DER input stream from part of a data buffer with - * additional arg to indicate whether to allow constructed - * indefinite-length encoding. - * The buffer is not copied, it is shared. Accordingly, the - * buffer should be treated as read-only. - * - * @param data the buffer from which to create the string (CONSUMED) - * @param offset the first index of data which will - * be read as DER input in the new stream - * @param len how long a chunk of the buffer to use, - * starting at "offset" - * @param allowIndefiniteLength whether to allow constructed - * indefinite-length encoding - */ - public DerInputStream(byte[] data, int offset, int len, - boolean allowIndefiniteLength) throws IOException { - init(data, offset, len, allowIndefiniteLength); - } - /* * private helper routine */ - private void init(byte[] data, int offset, int len, - boolean allowIndefiniteLength) throws IOException { + private void init(byte[] data, int offset, int len, boolean allowBER) throws IOException { if ((offset+2 > data.length) || (offset+len > data.length)) { throw new IOException("Encoding bytes too short"); } // check for indefinite length encoding if (DerIndefLenConverter.isIndefinite(data[offset+1])) { - if (!allowIndefiniteLength) { + if (!allowBER) { throw new IOException("Indefinite length BER encoding found"); } else { byte[] inData = new byte[len]; System.arraycopy(data, offset, inData, 0, len); DerIndefLenConverter derIn = new DerIndefLenConverter(); - buffer = new DerInputBuffer(derIn.convert(inData)); + buffer = new DerInputBuffer(derIn.convert(inData), allowBER); } - } else - buffer = new DerInputBuffer(data, offset, len); + } else { + buffer = new DerInputBuffer(data, offset, len, allowBER); + } buffer.mark(Integer.MAX_VALUE); } @@ -156,7 +155,7 @@ public class DerInputStream { */ public DerInputStream subStream(int len, boolean do_skip) throws IOException { - DerInputBuffer newbuf = buffer.dup(); + DerInputBuffer newbuf = buffer.dup(); newbuf.truncate(len); if (do_skip) { @@ -399,7 +398,8 @@ public class DerInputStream { dis.readFully(indefData, offset, readLen); dis.close(); DerIndefLenConverter derIn = new DerIndefLenConverter(); - buffer = new DerInputBuffer(derIn.convert(indefData)); + buffer = new DerInputBuffer(derIn.convert(indefData), buffer.allowBER); + if (tag != buffer.read()) throw new IOException("Indefinite length encoding" + " not supported"); @@ -427,7 +427,7 @@ public class DerInputStream { DerValue value; do { - value = new DerValue(newstr.buffer); + value = new DerValue(newstr.buffer, buffer.allowBER); vec.addElement(value); } while (newstr.available() > 0); diff --git a/jdk/src/java.base/share/classes/sun/security/util/DerValue.java b/jdk/src/java.base/share/classes/sun/security/util/DerValue.java index b47064abce9..4f48cdce7be 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/DerValue.java +++ b/jdk/src/java.base/share/classes/sun/security/util/DerValue.java @@ -1,5 +1,5 @@ -/* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. +/** + * Copyright (c) 1996, 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 @@ -225,6 +225,16 @@ public class DerValue { data = init(stringTag, value); } + // Creates a DerValue from a tag and some DER-encoded data w/ additional + // arg to control whether DER checks are enforced. + DerValue(byte tag, byte[] data, boolean allowBER) { + this.tag = tag; + buffer = new DerInputBuffer(data.clone(), allowBER); + length = data.length; + this.data = new DerInputStream(buffer); + this.data.mark(Integer.MAX_VALUE); + } + /** * Creates a DerValue from a tag and some DER-encoded data. * @@ -232,20 +242,16 @@ public class DerValue { * @param data the DER-encoded data */ public DerValue(byte tag, byte[] data) { - this.tag = tag; - buffer = new DerInputBuffer(data.clone()); - length = data.length; - this.data = new DerInputStream(buffer); - this.data.mark(Integer.MAX_VALUE); + this(tag, data, true); } /* * package private */ DerValue(DerInputBuffer in) throws IOException { + // XXX must also parse BER-encoded constructed // values such as sequences, sets... - tag = (byte)in.read(); byte lenByte = (byte)in.read(); length = DerInputStream.getLength(lenByte, in); @@ -260,7 +266,7 @@ public class DerValue { dis.readFully(indefData, offset, readLen); dis.close(); DerIndefLenConverter derIn = new DerIndefLenConverter(); - inbuf = new DerInputBuffer(derIn.convert(indefData)); + inbuf = new DerInputBuffer(derIn.convert(indefData), in.allowBER); if (tag != inbuf.read()) throw new IOException ("Indefinite length encoding not supported"); @@ -282,6 +288,12 @@ public class DerValue { } } + // Get an ASN.1/DER encoded datum from a buffer w/ additional + // arg to control whether DER checks are enforced. + DerValue(byte[] buf, boolean allowBER) throws IOException { + data = init(true, new ByteArrayInputStream(buf), allowBER); + } + /** * Get an ASN.1/DER encoded datum from a buffer. The * entire buffer must hold exactly one datum, including @@ -290,7 +302,14 @@ public class DerValue { * @param buf buffer holding a single DER-encoded datum. */ public DerValue(byte[] buf) throws IOException { - data = init(true, new ByteArrayInputStream(buf)); + this(buf, true); + } + + // Get an ASN.1/DER encoded datum from part of a buffer w/ additional + // arg to control whether DER checks are enforced. + DerValue(byte[] buf, int offset, int len, boolean allowBER) + throws IOException { + data = init(true, new ByteArrayInputStream(buf, offset, len), allowBER); } /** @@ -303,7 +322,13 @@ public class DerValue { * @param len how many bytes are in the encoded datum */ public DerValue(byte[] buf, int offset, int len) throws IOException { - data = init(true, new ByteArrayInputStream(buf, offset, len)); + this(buf, offset, len, true); + } + + // Get an ASN1/DER encoded datum from an input stream w/ additional + // arg to control whether DER checks are enforced. + DerValue(InputStream in, boolean allowBER) throws IOException { + data = init(false, in, allowBER); } /** @@ -316,10 +341,11 @@ public class DerValue { * which may be followed by additional data */ public DerValue(InputStream in) throws IOException { - data = init(false, in); + this(in, true); } - private DerInputStream init(byte stringTag, String value) throws IOException { + private DerInputStream init(byte stringTag, String value) + throws IOException { String enc = null; tag = stringTag; @@ -347,7 +373,7 @@ public class DerValue { byte[] buf = value.getBytes(enc); length = buf.length; - buffer = new DerInputBuffer(buf); + buffer = new DerInputBuffer(buf, true); DerInputStream result = new DerInputStream(buffer); result.mark(Integer.MAX_VALUE); return result; @@ -356,8 +382,8 @@ public class DerValue { /* * helper routine */ - private DerInputStream init(boolean fullyBuffered, InputStream in) - throws IOException { + private DerInputStream init(boolean fullyBuffered, InputStream in, + boolean allowBER) throws IOException { tag = (byte)in.read(); byte lenByte = (byte)in.read(); @@ -384,7 +410,7 @@ public class DerValue { byte[] bytes = IOUtils.readFully(in, length, true); - buffer = new DerInputBuffer(bytes); + buffer = new DerInputBuffer(bytes, allowBER); return new DerInputStream(buffer); } @@ -479,7 +505,8 @@ public class DerValue { if (buffer.read(bytes) != length) throw new IOException("short read on DerValue buffer"); if (isConstructed()) { - DerInputStream in = new DerInputStream(bytes); + DerInputStream in = new DerInputStream(bytes, 0, bytes.length, + buffer.allowBER); bytes = null; while (in.available() != 0) { bytes = append(bytes, in.getOctetString()); diff --git a/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java b/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java index 73914fe30ae..9051b392970 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java +++ b/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -25,6 +25,10 @@ package sun.security.util; +import sun.security.validator.Validator; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; import java.security.CryptoPrimitive; import java.security.AlgorithmParameters; import java.security.Key; @@ -32,10 +36,12 @@ import java.security.cert.CertPathValidatorException; import java.security.cert.CertPathValidatorException.BasicReason; import java.security.cert.X509Certificate; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; @@ -100,12 +106,6 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { @Override public final boolean permits(Set primitives, String algorithm, AlgorithmParameters parameters) { - - if (primitives == null || primitives.isEmpty()) { - throw new IllegalArgumentException( - "No cryptographic primitive specified"); - } - return checkAlgorithm(disabledAlgorithms, algorithm, decomposer); } @@ -133,6 +133,18 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { return checkConstraints(primitives, algorithm, key, parameters); } + public final void permits(ConstraintsParameters cp) + throws CertPathValidatorException { + permits(cp.getAlgorithm(), cp); + } + + public final void permits(String algorithm, Key key, + AlgorithmParameters params, String variant) + throws CertPathValidatorException { + permits(algorithm, new ConstraintsParameters(algorithm, params, key, + (variant == null) ? Validator.VAR_GENERIC : variant)); + } + /* * Check if a x509Certificate object is permitted. Check if all * algorithms are allowed, certificate constraints, and the @@ -140,18 +152,10 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { * * Uses new style permit() which throws exceptions. */ - public final void permits(Set primitives, - CertConstraintParameters cp) throws CertPathValidatorException { - checkConstraints(primitives, cp); - } - /* - * Check if Certificate object is within the constraints. - * Uses new style permit() which throws exceptions. - */ - public final void permits(Set primitives, - X509Certificate cert) throws CertPathValidatorException { - checkConstraints(primitives, new CertConstraintParameters(cert)); + public final void permits(String algorithm, ConstraintsParameters cp) + throws CertPathValidatorException { + algorithmConstraints.permits(algorithm, cp); } // Check if a string is contained inside the property @@ -174,7 +178,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { throw new IllegalArgumentException("The key cannot be null"); } - // check the signature algorithm + // check the signature algorithm with parameters if (algorithm != null && algorithm.length() != 0) { if (!permits(primitives, algorithm, parameters)) { return false; @@ -190,36 +194,6 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { return algorithmConstraints.permits(key); } - /* - * Check algorithm constraints with Certificate - * Uses new style permit() which throws exceptions. - */ - private void checkConstraints(Set primitives, - CertConstraintParameters cp) throws CertPathValidatorException { - - X509Certificate cert = cp.getCertificate(); - String algorithm = cert.getSigAlgName(); - - // Check signature algorithm is not disabled - if (!permits(primitives, algorithm, null)) { - throw new CertPathValidatorException( - "Algorithm constraints check failed on disabled "+ - "signature algorithm: " + algorithm, - null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); - } - - // Check key algorithm is not disabled - if (!permits(primitives, cert.getPublicKey().getAlgorithm(), null)) { - throw new CertPathValidatorException( - "Algorithm constraints check failed on disabled "+ - "public key algorithm: " + algorithm, - null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); - } - - // Check the certificate and key constraints - algorithmConstraints.permits(cp); - - } /** * Key and Certificate Constraints @@ -234,13 +208,13 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { * 'true' means the operation is allowed. * 'false' means it failed the constraints and is disallowed. * - * When passing CertConstraintParameters through permit(), an exception + * When passing ConstraintsParameters through permit(), an exception * will be thrown on a failure to better identify why the operation was * disallowed. */ private static class Constraints { - private Map> constraintsMap = new HashMap<>(); + private Map> constraintsMap = new HashMap<>(); private static class Holder { private static final Pattern DENY_AFTER_PATTERN = Pattern.compile( @@ -260,23 +234,22 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { // Check if constraint is a complete disabling of an // algorithm or has conditions. - String algorithm; - String policy; int space = constraintEntry.indexOf(' '); - if (space > 0) { - algorithm = AlgorithmDecomposer.hashName( - constraintEntry.substring(0, space). - toUpperCase(Locale.ENGLISH)); - policy = constraintEntry.substring(space + 1); - } else { - algorithm = constraintEntry.toUpperCase(Locale.ENGLISH); - if (!constraintsMap.containsKey(algorithm)) { - constraintsMap.putIfAbsent(algorithm, - new HashSet<>()); - } + String algorithm = AlgorithmDecomposer.hashName( + ((space > 0 ? constraintEntry.substring(0, space) : + constraintEntry). + toUpperCase(Locale.ENGLISH))); + List constraintList = + constraintsMap.getOrDefault(algorithm, + new ArrayList<>(1)); + constraintsMap.putIfAbsent(algorithm, constraintList); + if (space <= 0) { + constraintList.add(new DisabledConstraint(algorithm)); continue; } + String policy = constraintEntry.substring(space + 1); + // Convert constraint conditions into Constraint classes Constraint c, lastConstraint = null; // Allow only one jdkCA entry per constraint entry @@ -315,7 +288,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { c = new jdkCAConstraint(algorithm); jdkCALimit = true; - } else if(entry.startsWith("denyAfter") && + } else if (entry.startsWith("denyAfter") && (matcher = Holder.DENY_AFTER_PATTERN.matcher(entry)) .matches()) { if (debug != null) { @@ -332,6 +305,12 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { c = new DenyAfterConstraint(algorithm, year, month, day); denyAfterLimit = true; + } else if (entry.startsWith("usage")) { + String s[] = (entry.substring(5)).trim().split(" "); + c = new UsageConstraint(algorithm, s); + if (debug != null) { + debug.println("Constraints usage length is " + s.length); + } } else { throw new IllegalArgumentException("Error in security" + " property. Constraint unknown: " + entry); @@ -340,11 +319,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { // Link multiple conditions for a single constraint // into a linked list. if (lastConstraint == null) { - if (!constraintsMap.containsKey(algorithm)) { - constraintsMap.putIfAbsent(algorithm, - new HashSet<>()); - } - constraintsMap.get(algorithm).add(c); + constraintList.add(c); } else { lastConstraint.nextConstraint = c; } @@ -354,17 +329,17 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } // Get applicable constraints based off the signature algorithm - private Set getConstraints(String algorithm) { + private List getConstraints(String algorithm) { return constraintsMap.get(algorithm); } // Check if KeySizeConstraints permit the specified key public boolean permits(Key key) { - Set set = getConstraints(key.getAlgorithm()); - if (set == null) { + List list = getConstraints(key.getAlgorithm()); + if (list == null) { return true; } - for (Constraint constraint : set) { + for (Constraint constraint : list) { if (!constraint.permits(key)) { if (debug != null) { debug.println("keySizeConstraint: failed key " + @@ -377,31 +352,35 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } // Check if constraints permit this cert. - public void permits(CertConstraintParameters cp) + public void permits(String algorithm, ConstraintsParameters cp) throws CertPathValidatorException { X509Certificate cert = cp.getCertificate(); if (debug != null) { - debug.println("Constraints.permits(): " + cert.getSigAlgName()); + debug.println("Constraints.permits(): " + algorithm + + " Variant: " + cp.getVariant()); } // Get all signature algorithms to check for constraints - Set algorithms = - AlgorithmDecomposer.decomposeOneHash(cert.getSigAlgName()); - if (algorithms == null || algorithms.isEmpty()) { - return; + Set algorithms = new HashSet<>(); + if (algorithm != null) { + algorithms.addAll(AlgorithmDecomposer.decomposeOneHash(algorithm)); } - // Attempt to add the public key algorithm to the set - algorithms.add(cert.getPublicKey().getAlgorithm()); - + // Attempt to add the public key algorithm if cert provided + if (cert != null) { + algorithms.add(cert.getPublicKey().getAlgorithm()); + } + if (cp.getPublicKey() != null) { + algorithms.add(cp.getPublicKey().getAlgorithm()); + } // Check all applicable constraints - for (String algorithm : algorithms) { - Set set = getConstraints(algorithm); - if (set == null) { + for (String alg : algorithms) { + List list = getConstraints(alg); + if (list == null) { continue; } - for (Constraint constraint : set) { + for (Constraint constraint : list) { constraint.permits(cp); } } @@ -467,17 +446,17 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { /** * Check if an algorithm constraint is permitted with a given - * CertConstraintParameters. + * ConstraintsParameters. * * If the check inside of {@code permits()} fails, it must call - * {@code next()} with the same {@code CertConstraintParameters} + * {@code next()} with the same {@code ConstraintsParameters} * parameter passed if multiple constraints need to be checked. * * @param cp CertConstraintParameter containing certificate info * @throws CertPathValidatorException if constraint disallows. * */ - public abstract void permits(CertConstraintParameters cp) + public abstract void permits(ConstraintsParameters cp) throws CertPathValidatorException; /** @@ -491,12 +470,12 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { * were disallowed, the last constraint will throw * {@code CertPathValidatorException}. * - * @param cp CertConstraintParameters + * @param cp ConstraintsParameters * @return 'true' if constraint allows the operation, 'false' if * we are at the end of the constraint list or, * {@code nextConstraint} is null. */ - boolean next(CertConstraintParameters cp) + boolean next(ConstraintsParameters cp) throws CertPathValidatorException { if (nextConstraint != null) { nextConstraint.permits(cp); @@ -525,6 +504,14 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } return false; } + + String extendedMsg(ConstraintsParameters cp) { + return (cp.getCertificate() == null ? "." : + " used with certificate: " + + cp.getCertificate().getSubjectX500Principal() + + (cp.getVariant() != Validator.VAR_GENERIC ? + ". Usage was " + cp.getVariant() : ".")); + } } /* @@ -537,11 +524,11 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } /* - * Check if CertConstraintParameters has a trusted match, if it does + * Check if ConstraintsParameters has a trusted match, if it does * call next() for any following constraints. If it does not, exit * as this constraint(s) does not restrict the operation. */ - public void permits(CertConstraintParameters cp) + public void permits(ConstraintsParameters cp) throws CertPathValidatorException { if (debug != null) { debug.println("jdkCAConstraints.permits(): " + algorithm); @@ -554,8 +541,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } throw new CertPathValidatorException( "Algorithm constraints check failed on certificate " + - "anchor limits. " + algorithm + " used with " + - cp.getCertificate().getSubjectX500Principal(), + "anchor limits. " + algorithm + extendedMsg(cp), null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); } } @@ -615,7 +601,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { * constraints. Throw an exception if this is the last constraint. */ @Override - public void permits(CertConstraintParameters cp) + public void permits(ConstraintsParameters cp) throws CertPathValidatorException { Date currentDate; String errmsg; @@ -628,7 +614,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { errmsg = "PKIXParameter date: "; } else { currentDate = new Date(); - errmsg = "Certificate date: "; + errmsg = "Current date: "; } if (!denyAfterDate.after(currentDate)) { @@ -637,9 +623,9 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } throw new CertPathValidatorException( "denyAfter constraint check failed: " + algorithm + - " used with Constraint date: " + - dateFormat.format(denyAfterDate) + "; " - + errmsg + dateFormat.format(currentDate), + " used with Constraint date: " + + dateFormat.format(denyAfterDate) + "; " + errmsg + + dateFormat.format(currentDate) + extendedMsg(cp), null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); } } @@ -660,6 +646,54 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } } + /* + * The usage constraint is for the "usage" keyword. It checks against the + * variant value in ConstraintsParameters. + */ + private static class UsageConstraint extends Constraint { + String[] usages; + + UsageConstraint(String algorithm, String[] usages) { + this.algorithm = algorithm; + this.usages = usages; + } + + public void permits(ConstraintsParameters cp) + throws CertPathValidatorException { + for (String usage : usages) { + + String v = null; + if (usage.compareToIgnoreCase("TLSServer") == 0) { + v = Validator.VAR_TLS_SERVER; + } else if (usage.compareToIgnoreCase("TLSClient") == 0) { + v = Validator.VAR_TLS_CLIENT; + } else if (usage.compareToIgnoreCase("SignedJAR") == 0) { + v = Validator.VAR_PLUGIN_CODE_SIGNING; + } + + if (debug != null) { + debug.println("Checking if usage constraint \"" + v + + "\" matches \"" + cp.getVariant() + "\""); + // Because usage checking can come from many places + // a stack trace is very helpful. + ByteArrayOutputStream ba = new ByteArrayOutputStream(); + PrintStream ps = new PrintStream(ba); + (new Exception()).printStackTrace(ps); + debug.println(ba.toString()); + } + if (cp.getVariant().compareTo(v) == 0) { + if (next(cp)) { + return; + } + throw new CertPathValidatorException("Usage constraint " + + usage + " check failed: " + algorithm + + extendedMsg(cp), + null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); + } + } + } + } + /* * This class contains constraints dealing with the key size * support limits per algorithm. e.g. "keySize <= 1024" @@ -713,17 +747,22 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { * constraint Any permitted constraint will exit the linked list * to allow the operation. */ - public void permits(CertConstraintParameters cp) + public void permits(ConstraintsParameters cp) throws CertPathValidatorException { - if (!permitsImpl(cp.getCertificate().getPublicKey())) { + Key key = null; + if (cp.getPublicKey() != null) { + key = cp.getPublicKey(); + } else if (cp.getCertificate() != null) { + key = cp.getCertificate().getPublicKey(); + } + if (key != null && !permitsImpl(key)) { if (nextConstraint != null) { nextConstraint.permits(cp); return; } throw new CertPathValidatorException( "Algorithm constraints check failed on keysize limits. " - + algorithm + " " + size + "bit key used with " - + cp.getCertificate().getSubjectX500Principal(), + + algorithm + " " + size + "bit key" + extendedMsg(cp), null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); } } @@ -762,5 +801,26 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { return true; } } + + /* + * This constraint is used for the complete disabling of the algorithm. + */ + private static class DisabledConstraint extends Constraint { + DisabledConstraint(String algo) { + algorithm = algo; + } + + public void permits(ConstraintsParameters cp) + throws CertPathValidatorException { + throw new CertPathValidatorException( + "Algorithm constraints check failed on disabled " + + "algorithm: " + algorithm + extendedMsg(cp), + null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); + } + + public boolean permits(Key key) { + return false; + } + } } diff --git a/jdk/src/java.base/share/classes/sun/security/util/HostnameChecker.java b/jdk/src/java.base/share/classes/sun/security/util/HostnameChecker.java index afa0fe0bbcf..145dff297f3 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/HostnameChecker.java +++ b/jdk/src/java.base/share/classes/sun/security/util/HostnameChecker.java @@ -28,17 +28,15 @@ package sun.security.util; import java.io.IOException; import java.net.InetAddress; import java.net.UnknownHostException; -import java.util.*; - import java.security.Principal; import java.security.cert.*; - +import java.util.*; import javax.security.auth.x500.X500Principal; -import sun.security.ssl.ClientKeyExchangeService; -import sun.security.x509.X500Name; - import sun.net.util.IPAddressUtil; +import sun.security.ssl.ClientKeyExchangeService; +import sun.security.ssl.Debug; +import sun.security.x509.X500Name; /** * Class to check hostnames against the names specified in a certificate as @@ -61,6 +59,8 @@ public class HostnameChecker { private static final int ALTNAME_DNS = 2; private static final int ALTNAME_IP = 7; + private static final Debug debug = Debug.getInstance("ssl"); + // the algorithm to follow to perform the check. Currently unused. private final byte checkType; @@ -84,18 +84,27 @@ public class HostnameChecker { /** * Perform the check. * - * @exception CertificateException if the name does not match any of - * the names specified in the certificate + * @param expectedName the expected host name or ip address + * @param cert the certificate to check against + * @param chainsToPublicCA true if the certificate chains to a public + * root CA (as pre-installed in the cacerts file) + * @throws CertificateException if the name does not match any of + * the names specified in the certificate */ - public void match(String expectedName, X509Certificate cert) - throws CertificateException { + public void match(String expectedName, X509Certificate cert, + boolean chainsToPublicCA) throws CertificateException { if (isIpAddress(expectedName)) { matchIP(expectedName, cert); } else { - matchDNS(expectedName, cert); + matchDNS(expectedName, cert, chainsToPublicCA); } } + public void match(String expectedName, X509Certificate cert) + throws CertificateException { + match(expectedName, cert, false); + } + /** * Perform the check for Kerberos. */ @@ -185,20 +194,21 @@ public class HostnameChecker { * Certification Authorities are encouraged to use the dNSName instead. * * Matching is performed using the matching rules specified by - * [RFC2459]. If more than one identity of a given type is present in + * [RFC5280]. If more than one identity of a given type is present in * the certificate (e.g., more than one dNSName name, a match in any one * of the set is considered acceptable.) */ - private void matchDNS(String expectedName, X509Certificate cert) + private void matchDNS(String expectedName, X509Certificate cert, + boolean chainsToPublicCA) throws CertificateException { Collection> subjAltNames = cert.getSubjectAlternativeNames(); if (subjAltNames != null) { boolean foundDNS = false; - for ( List next : subjAltNames) { + for (List next : subjAltNames) { if (((Integer)next.get(0)).intValue() == ALTNAME_DNS) { foundDNS = true; String dnsName = (String)next.get(1); - if (isMatched(expectedName, dnsName)) { + if (isMatched(expectedName, dnsName, chainsToPublicCA)) { return; } } @@ -215,7 +225,8 @@ public class HostnameChecker { (X500Name.commonName_oid); if (derValue != null) { try { - if (isMatched(expectedName, derValue.getAsString())) { + if (isMatched(expectedName, derValue.getAsString(), + chainsToPublicCA)) { return; } } catch (IOException e) { @@ -261,7 +272,11 @@ public class HostnameChecker { * The template parameter * may contain the wildcard character * */ - private boolean isMatched(String name, String template) { + private boolean isMatched(String name, String template, + boolean chainsToPublicCA) { + if (hasIllegalWildcard(name, template, chainsToPublicCA)) { + return false; + } if (checkType == TYPE_TLS) { return matchAllWildcards(name, template); } else if (checkType == TYPE_LDAP) { @@ -271,6 +286,61 @@ public class HostnameChecker { } } + /** + * Returns true if the template contains an illegal wildcard character. + */ + private static boolean hasIllegalWildcard(String domain, String template, + boolean chainsToPublicCA) { + // not ok if it is a single wildcard character or "*." + if (template.equals("*") || template.equals("*.")) { + if (debug != null) { + debug.println("Certificate domain name has illegal single " + + "wildcard character: " + template); + } + return true; + } + + int lastWildcardIndex = template.lastIndexOf("*"); + + // ok if it has no wildcard character + if (lastWildcardIndex == -1) { + return false; + } + + String afterWildcard = template.substring(lastWildcardIndex); + int firstDotIndex = afterWildcard.indexOf("."); + + // not ok if there is no dot after wildcard (ex: "*com") + if (firstDotIndex == -1) { + if (debug != null) { + debug.println("Certificate domain name has illegal wildcard, " + + "no dot after wildcard character: " + template); + } + return true; + } + + // If the wildcarded domain is a top-level domain under which names + // can be registered, then a wildcard is not allowed. + + if (!chainsToPublicCA) { + return false; // skip check for non-public certificates + } + Optional rd = RegisteredDomain.from(domain) + .filter(d -> d.type() == RegisteredDomain.Type.ICANN); + + if (rd.isPresent()) { + String wDomain = afterWildcard.substring(firstDotIndex + 1); + if (rd.get().publicSuffix().equalsIgnoreCase(wDomain)) { + if (debug != null) { + debug.println("Certificate domain name has illegal " + + "wildcard for public suffix: " + template); + } + return true; + } + } + + return false; + } /** * Returns true if name matches against template.

            @@ -317,9 +387,9 @@ public class HostnameChecker { name = name.toLowerCase(Locale.ENGLISH); template = template.toLowerCase(Locale.ENGLISH); - // Retreive leftmost component - int templateIdx = template.indexOf('.'); - int nameIdx = name.indexOf('.'); + // Retrieve leftmost component + int templateIdx = template.indexOf("."); + int nameIdx = name.indexOf("."); if (templateIdx == -1) templateIdx = template.length(); @@ -344,7 +414,7 @@ public class HostnameChecker { */ private static boolean matchWildCards(String name, String template) { - int wildcardIdx = template.indexOf('*'); + int wildcardIdx = template.indexOf("*"); if (wildcardIdx == -1) return name.equals(template); @@ -367,7 +437,7 @@ public class HostnameChecker { // update the match scope name = name.substring(beforeStartIdx + beforeWildcard.length()); - wildcardIdx = afterWildcard.indexOf('*'); + wildcardIdx = afterWildcard.indexOf("*"); } return name.endsWith(afterWildcard); } diff --git a/jdk/src/java.base/share/classes/sun/security/util/RegisteredDomain.java b/jdk/src/java.base/share/classes/sun/security/util/RegisteredDomain.java new file mode 100644 index 00000000000..ec601d51db4 --- /dev/null +++ b/jdk/src/java.base/share/classes/sun/security/util/RegisteredDomain.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.security.util; + +import java.util.Optional; + +/** + * A domain that is registered under a "public suffix". The public suffix is + * a top-level domain under which names can be registered. For example, + * "com" and "co.uk" are public suffixes, and "example.com" and "example.co.uk" + * are registered domains. + *

            + * The primary purpose of this class is to determine if domains are safe to + * use in various use-cases. + */ +public interface RegisteredDomain { + + public enum Type { + /** + * An ICANN registered domain. + */ + ICANN, + /** + * A private registered domain. + */ + PRIVATE + } + + /** + * Returns the name of the registered domain. + * + * @return the name of the registered domain + */ + String name(); + + /** + * Returns the type of the registered domain. + * + * @return the type of the registered domain + */ + Type type(); + + /** + * Returns the public suffix of the registered domain. + * + * @return the public suffix of the registered domain + */ + String publicSuffix(); + + /** + * Returns an {@code Optional} representing the + * registered part of the specified domain. + * + * {@implNote} + * The default implementation is based on the legacy + * {@code sun.net.RegisteredDomain} class which is no longer maintained. + * It should be updated or replaced with an appropriate implementation. + * + * @param domain the domain name + * @return an {@code Optional}; the {@code Optional} is + * empty if the domain is unknown or not registerable + * @throws NullPointerException if domain is null + */ + public static Optional from(String domain) { + if (domain == null) { + throw new NullPointerException(); + } + return Optional.ofNullable(sun.net.RegisteredDomain.registeredDomain(domain)); + } +} diff --git a/jdk/src/java.base/share/classes/sun/security/util/Resources_sv.java b/jdk/src/java.base/share/classes/sun/security/util/Resources_sv.java index 4788f7b3109..c2571556cbf 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/Resources_sv.java +++ b/jdk/src/java.base/share/classes/sun/security/util/Resources_sv.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -53,9 +53,9 @@ public class Resources_sv extends java.util.ListResourceBundle { "CredOwner:\n\tIdentitetshavareklass = {0}\n\tIdentitetshavarenamn = {1}"}, // javax.security.auth.x500 - {"provided.null.name", "angav null-namn"}, - {"provided.null.keyword.map", "nullnyckelordsmappning tillhandah\u00F6lls"}, - {"provided.null.OID.map", "null-OID-mappning tillhandah\u00F6lls"}, + {"provided.null.name", "null-namn angavs"}, + {"provided.null.keyword.map", "nullnyckelordsmappning angavs"}, + {"provided.null.OID.map", "null-OID-mappning angavs"}, // javax.security.auth.Subject {"NEWLINE", "\n"}, @@ -63,7 +63,7 @@ public class Resources_sv extends java.util.ListResourceBundle { "ogiltigt null-AccessControlContext"}, {"invalid.null.action.provided", "ogiltig null-funktion"}, {"invalid.null.Class.provided", "ogiltig null-klass"}, - {"Subject.", "Innehavare:\n"}, + {"Subject.", "Subjekt:\n"}, {".Principal.", "\tIdentitetshavare: "}, {".Public.Credential.", "\tOffentlig inloggning: "}, {".Private.Credentials.inaccessible.", @@ -71,9 +71,9 @@ public class Resources_sv extends java.util.ListResourceBundle { {".Private.Credential.", "\tPrivat inloggning: "}, {".Private.Credential.inaccessible.", "\tPrivat inloggning \u00E4r inte tillg\u00E4nglig\n"}, - {"Subject.is.read.only", "Innehavare \u00E4r skrivskyddad"}, + {"Subject.is.read.only", "Subjektet \u00E4r skrivskyddad"}, {"attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set", - "f\u00F6rs\u00F6k att l\u00E4gga till ett objekt som inte \u00E4r en f\u00F6rekomst av java.security.Principal till en upps\u00E4ttning av identitetshavare"}, + "f\u00F6rs\u00F6k att l\u00E4gga till ett objekt som inte \u00E4r en instans av java.security.Principal till ett subjekts upps\u00E4ttning av identitetshavare"}, {"attempting.to.add.an.object.which.is.not.an.instance.of.class", "f\u00F6rs\u00F6ker l\u00E4gga till ett objekt som inte \u00E4r en instans av {0}"}, @@ -84,11 +84,11 @@ public class Resources_sv extends java.util.ListResourceBundle { {"Invalid.null.input.name", "Ogiltiga null-indata: namn"}, {"No.LoginModules.configured.for.name", "Inga inloggningsmoduler har konfigurerats f\u00F6r {0}"}, - {"invalid.null.Subject.provided", "ogiltig null-innehavare"}, + {"invalid.null.Subject.provided", "ogiltig null-subjekt"}, {"invalid.null.CallbackHandler.provided", "ogiltig null-CallbackHandler"}, {"null.subject.logout.called.before.login", - "null-innehavare - utloggning anropades f\u00F6re inloggning"}, + "null-subjekt - utloggning anropades f\u00F6re inloggning"}, {"unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor", "kan inte instansiera LoginModule, {0}, eftersom den inte tillhandah\u00E5ller n\u00E5gon icke-argumentskonstruktor"}, {"unable.to.instantiate.LoginModule", @@ -148,12 +148,12 @@ public class Resources_sv extends java.util.ListResourceBundle { // sun.security.pkcs11.SunPKCS11 {"PKCS11.Token.providerName.Password.", - "PKCS11-tecken [{0}] L\u00F6senord: "}, + "L\u00F6senord f\u00F6r PKCS11-token [{0}]: "}, /* --- DEPRECATED --- */ // javax.security.auth.Policy {"unable.to.instantiate.Subject.based.policy", - "den innehavarbaserade policyn kan inte skapas"} + "kan inte instansiera subjektbaserad policy"} }; diff --git a/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java b/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java index f8022c5ca94..0663f0573ae 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java +++ b/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,25 +28,23 @@ package sun.security.util; import java.io.ByteArrayInputStream; import java.io.IOException; import java.security.CodeSigner; -import java.security.CryptoPrimitive; +import java.security.GeneralSecurityException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.SignatureException; +import java.security.Timestamp; import java.security.cert.CertPath; import java.security.cert.X509Certificate; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.util.ArrayList; import java.util.Base64; -import java.util.Collections; -import java.util.EnumSet; import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.Set; import java.util.jar.Attributes; import java.util.jar.JarException; import java.util.jar.JarFile; @@ -61,9 +59,6 @@ public class SignatureFileVerifier { /* Are we debugging ? */ private static final Debug debug = Debug.getInstance("jar"); - private static final Set DIGEST_PRIMITIVE_SET = - Collections.unmodifiableSet(EnumSet.of(CryptoPrimitive.MESSAGE_DIGEST)); - private static final DisabledAlgorithmConstraints JAR_DISABLED_CHECK = new DisabledAlgorithmConstraints( DisabledAlgorithmConstraints.PROPERTY_JAR_DISABLED_ALGS); @@ -97,6 +92,14 @@ public class SignatureFileVerifier { /* for generating certpath objects */ private CertificateFactory certificateFactory = null; + /** Algorithms that have been checked if they are weak. */ + private Map permittedAlgs= new HashMap<>(); + + /** TSA timestamp of signed jar. The newest timestamp is used. If there + * was no TSA timestamp used when signed, current time is used ("null"). + */ + private Timestamp timestamp = null; + /** * Create the named SignatureFileVerifier. * @@ -222,15 +225,8 @@ public class SignatureFileVerifier { /** get digest from cache */ - private MessageDigest getDigest(String algorithm) throws SignatureException { - // check that algorithm is not restricted - if (!JAR_DISABLED_CHECK.permits(DIGEST_PRIMITIVE_SET, algorithm, null)) { - SignatureException e = - new SignatureException("SignatureFile check failed. " + - "Disabled algorithm used: " + algorithm); - throw e; - } - + private MessageDigest getDigest(String algorithm) + throws SignatureException { if (createdDigests == null) createdDigests = new HashMap<>(); @@ -302,6 +298,27 @@ public class SignatureFileVerifier { if (newSigners == null) return; + /* + * Look for the latest timestamp in the signature block. If an entry + * has no timestamp, use current time (aka null). + */ + for (CodeSigner s: newSigners) { + if (debug != null) { + debug.println("Gathering timestamp for: " + s.toString()); + } + if (s.getTimestamp() == null) { + timestamp = null; + break; + } else if (timestamp == null) { + timestamp = s.getTimestamp(); + } else { + if (timestamp.getTimestamp().before( + s.getTimestamp().getTimestamp())) { + timestamp = s.getTimestamp(); + } + } + } + Iterator> entries = sf.getEntries().entrySet().iterator(); @@ -344,6 +361,68 @@ public class SignatureFileVerifier { updateSigners(newSigners, signers, JarFile.MANIFEST_NAME); } + /** + * Check if algorithm is permitted using the permittedAlgs Map. + * If the algorithm is not in the map, check against disabled algorithms and + * store the result. If the algorithm is in the map use that result. + * False is returned for weak algorithm, true for good algorithms. + */ + boolean permittedCheck(String key, String algorithm) { + Boolean permitted = permittedAlgs.get(algorithm); + if (permitted == null) { + try { + JAR_DISABLED_CHECK.permits(algorithm, + new ConstraintsParameters(timestamp)); + } catch(GeneralSecurityException e) { + permittedAlgs.put(algorithm, Boolean.FALSE); + permittedAlgs.put(key.toUpperCase(), Boolean.FALSE); + if (debug != null) { + if (e.getMessage() != null) { + debug.println(key + ": " + e.getMessage()); + } else { + debug.println(key + ": " + algorithm + + " was disabled, no exception msg given."); + e.printStackTrace(); + } + } + return false; + } + + permittedAlgs.put(algorithm, Boolean.TRUE); + return true; + } + + // Algorithm has already been checked, return the value from map. + return permitted.booleanValue(); + } + + /** + * With a given header (*-DIGEST*), return a string that lists all the + * algorithms associated with the header. + * If there are none, return "Unknown Algorithm". + */ + String getWeakAlgorithms(String header) { + String w = ""; + try { + for (String key : permittedAlgs.keySet()) { + if (key.endsWith(header)) { + w += key.substring(0, key.length() - header.length()) + " "; + } + } + } catch (RuntimeException e) { + w = "Unknown Algorithm(s). Error processing " + header + ". " + + e.getMessage(); + } + + // This means we have an error in finding weak algorithms, run in + // debug mode to see permittedAlgs map's values. + if (w.length() == 0) { + return "Unknown Algorithm(s)"; + } + + return w; + } + /** * See if the whole manifest was signed. */ @@ -354,6 +433,10 @@ public class SignatureFileVerifier { { Attributes mattr = sf.getMainAttributes(); boolean manifestSigned = false; + // If only weak algorithms are used. + boolean weakAlgs = true; + // If a "*-DIGEST-MANIFEST" entry is found. + boolean validEntry = false; // go through all the attributes and process *-Digest-Manifest entries for (Map.Entry se : mattr.entrySet()) { @@ -363,6 +446,16 @@ public class SignatureFileVerifier { if (key.toUpperCase(Locale.ENGLISH).endsWith("-DIGEST-MANIFEST")) { // 16 is length of "-Digest-Manifest" String algorithm = key.substring(0, key.length()-16); + validEntry = true; + + // Check if this algorithm is permitted, skip if false. + if (!permittedCheck(key, algorithm)) { + continue; + } + + // A non-weak algorithm was used, any weak algorithms found do + // not need to be reported. + weakAlgs = false; manifestDigests.add(key); manifestDigests.add(se.getValue()); @@ -373,15 +466,14 @@ public class SignatureFileVerifier { Base64.getMimeDecoder().decode((String)se.getValue()); if (debug != null) { - debug.println("Signature File: Manifest digest " + - digest.getAlgorithm()); - debug.println( " sigfile " + toHex(expectedHash)); - debug.println( " computed " + toHex(computedHash)); - debug.println(); + debug.println("Signature File: Manifest digest " + + algorithm); + debug.println( " sigfile " + toHex(expectedHash)); + debug.println( " computed " + toHex(computedHash)); + debug.println(); } - if (MessageDigest.isEqual(computedHash, - expectedHash)) { + if (MessageDigest.isEqual(computedHash, expectedHash)) { manifestSigned = true; } else { //XXX: we will continue and verify each section @@ -389,15 +481,33 @@ public class SignatureFileVerifier { } } } + + if (debug != null) { + debug.println("PermittedAlgs mapping: "); + for (String key : permittedAlgs.keySet()) { + debug.println(key + " : " + + permittedAlgs.get(key).toString()); + } + } + + // If there were only weak algorithms entries used, throw an exception. + if (validEntry && weakAlgs) { + throw new SignatureException("Manifest hash check failed " + + "(DIGEST-MANIFEST). Disabled algorithm(s) used: " + + getWeakAlgorithms("-DIGEST-MANIFEST")); + } return manifestSigned; } - private boolean verifyManifestMainAttrs(Manifest sf, - ManifestDigester md) + private boolean verifyManifestMainAttrs(Manifest sf, ManifestDigester md) throws IOException, SignatureException { Attributes mattr = sf.getMainAttributes(); boolean attrsVerified = true; + // If only weak algorithms are used. + boolean weakAlgs = true; + // If a ATTR_DIGEST entry is found. + boolean validEntry = false; // go through all the attributes and process // digest entries for the manifest main attributes @@ -407,6 +517,16 @@ public class SignatureFileVerifier { if (key.toUpperCase(Locale.ENGLISH).endsWith(ATTR_DIGEST)) { String algorithm = key.substring(0, key.length() - ATTR_DIGEST.length()); + validEntry = true; + + // Check if this algorithm is permitted, skip if false. + if (!permittedCheck(key, algorithm)) { + continue; + } + + // A non-weak algorithm was used, any weak algorithms found do + // not need to be reported. + weakAlgs = false; MessageDigest digest = getDigest(algorithm); if (digest != null) { @@ -425,8 +545,7 @@ public class SignatureFileVerifier { debug.println(); } - if (MessageDigest.isEqual(computedHash, - expectedHash)) { + if (MessageDigest.isEqual(computedHash, expectedHash)) { // good } else { // we will *not* continue and verify each section @@ -442,6 +561,22 @@ public class SignatureFileVerifier { } } + if (debug != null) { + debug.println("PermittedAlgs mapping: "); + for (String key : permittedAlgs.keySet()) { + debug.println(key + " : " + + permittedAlgs.get(key).toString()); + } + } + + // If there were only weak algorithms entries used, throw an exception. + if (validEntry && weakAlgs) { + throw new SignatureException("Manifest Main Attribute check " + + "failed (" + ATTR_DIGEST + "). " + + "Disabled algorithm(s) used: " + + getWeakAlgorithms(ATTR_DIGEST)); + } + // this method returns 'true' if either: // . manifest main attributes were not signed, or // . manifest main attributes were signed and verified @@ -464,6 +599,10 @@ public class SignatureFileVerifier { { boolean oneDigestVerified = false; ManifestDigester.Entry mde = md.get(name,block.isOldStyle()); + // If only weak algorithms are used. + boolean weakAlgs = true; + // If a "*-DIGEST" entry is found. + boolean validEntry = false; if (mde == null) { throw new SecurityException( @@ -471,7 +610,6 @@ public class SignatureFileVerifier { } if (sfAttr != null) { - //sun.security.util.HexDumpEncoder hex = new sun.security.util.HexDumpEncoder(); //hex.encodeBuffer(data, System.out); @@ -482,6 +620,16 @@ public class SignatureFileVerifier { if (key.toUpperCase(Locale.ENGLISH).endsWith("-DIGEST")) { // 7 is length of "-Digest" String algorithm = key.substring(0, key.length()-7); + validEntry = true; + + // Check if this algorithm is permitted, skip if false. + if (!permittedCheck(key, algorithm)) { + continue; + } + + // A non-weak algorithm was used, any weak algorithms found do + // not need to be reported. + weakAlgs = false; MessageDigest digest = getDigest(algorithm); @@ -532,6 +680,22 @@ public class SignatureFileVerifier { } } } + + if (debug != null) { + debug.println("PermittedAlgs mapping: "); + for (String key : permittedAlgs.keySet()) { + debug.println(key + " : " + + permittedAlgs.get(key).toString()); + } + } + + // If there were only weak algorithms entries used, throw an exception. + if (validEntry && weakAlgs) { + throw new SignatureException("Manifest Main Attribute check " + + "failed (DIGEST). Disabled algorithm(s) used: " + + getWeakAlgorithms("DIGEST")); + } + return oneDigestVerified; } diff --git a/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java b/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java index 8d63ea2b8f5..9f9b36afcb3 100644 --- a/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java +++ b/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java @@ -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 @@ -33,7 +33,7 @@ import java.security.cert.*; import javax.security.auth.x500.X500Principal; import sun.security.action.GetBooleanAction; import sun.security.provider.certpath.AlgorithmChecker; -import sun.security.provider.certpath.PKIXTimestampParameters; +import sun.security.provider.certpath.PKIXExtendedParameters; /** * Validator implementation built on the PKIX CertPath API. This @@ -195,23 +195,22 @@ public final class PKIXValidator extends Validator { ("null or zero-length certificate chain"); } - // Check if 'parameter' affects 'pkixParameters' + // Use PKIXExtendedParameters for timestamp and variant additions PKIXBuilderParameters pkixParameters = null; - if (parameter instanceof Timestamp && plugin) { - try { - pkixParameters = new PKIXTimestampParameters( - (PKIXBuilderParameters) parameterTemplate.clone(), - (Timestamp) parameter); - } catch (InvalidAlgorithmParameterException e) { - // ignore exception - } - } else { - pkixParameters = (PKIXBuilderParameters) parameterTemplate.clone(); + try { + pkixParameters = new PKIXExtendedParameters( + (PKIXBuilderParameters) parameterTemplate.clone(), + (parameter instanceof Timestamp) ? + (Timestamp) parameter : null, + variant); + } catch (InvalidAlgorithmParameterException e) { + // ignore exception } // add new algorithm constraints checker if (constraints != null) { - pkixParameters.addCertPathChecker(new AlgorithmChecker(constraints)); + pkixParameters.addCertPathChecker( + new AlgorithmChecker(constraints, null, variant)); } // attach it to the PKIXBuilderParameters. diff --git a/jdk/src/java.base/share/classes/sun/security/validator/SimpleValidator.java b/jdk/src/java.base/share/classes/sun/security/validator/SimpleValidator.java index 58f7a5db419..a90c8c77382 100644 --- a/jdk/src/java.base/share/classes/sun/security/validator/SimpleValidator.java +++ b/jdk/src/java.base/share/classes/sun/security/validator/SimpleValidator.java @@ -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 @@ -155,12 +155,14 @@ public final class SimpleValidator extends Validator { // create default algorithm constraints checker TrustAnchor anchor = new TrustAnchor(anchorCert, null); - AlgorithmChecker defaultAlgChecker = new AlgorithmChecker(anchor); + AlgorithmChecker defaultAlgChecker = + new AlgorithmChecker(anchor, variant); // create application level algorithm constraints checker AlgorithmChecker appAlgChecker = null; if (constraints != null) { - appAlgChecker = new AlgorithmChecker(anchor, constraints); + appAlgChecker = new AlgorithmChecker(anchor, constraints, null, + null, variant); } // verify top down, starting at the certificate issued by diff --git a/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java b/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java index 1fc5bed4c83..364d47b5f4d 100644 --- a/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java @@ -536,13 +536,18 @@ public class X509CRLImpl extends X509CRL implements DerEncoder { * @return value of this CRL in a printable form. */ public String toString() { + return toStringWithAlgName("" + sigAlgId); + } + + // Specifically created for keytool to append a (weak) label to sigAlg + public String toStringWithAlgName(String name) { StringBuilder sb = new StringBuilder(); sb.append("X.509 CRL v") .append(version+1) .append('\n'); if (sigAlgId != null) sb.append("Signature Algorithm: ") - .append(sigAlgId) + .append(name) .append(", OID=") .append(sigAlgId.getOID()) .append('\n'); diff --git a/jdk/src/java.base/share/conf/net.properties b/jdk/src/java.base/share/conf/net.properties index b490e174a3f..ac94b30f119 100644 --- a/jdk/src/java.base/share/conf/net.properties +++ b/jdk/src/java.base/share/conf/net.properties @@ -3,7 +3,7 @@ # # This file may contain default values for the networking system properties. # These values are only used when the system properties are not specified -# on the command line or set programatically. +# on the command line or set programmatically. # For now, only the various proxy settings can be configured here. ############################################################ @@ -11,7 +11,7 @@ # settings when they do exist. # Set it to 'true' to enable this feature and check for platform # specific proxy settings -# Note that the system properties that do explicitely set proxies +# Note that the system properties that do explicitly set proxies # (like http.proxyHost) do take precedence over the system settings # even if java.net.useSystemProxies is set to true. diff --git a/jdk/src/java.base/share/conf/security/java.security b/jdk/src/java.base/share/conf/security/java.security index 5e778810bb7..a564f7c367b 100644 --- a/jdk/src/java.base/share/conf/security/java.security +++ b/jdk/src/java.base/share/conf/security/java.security @@ -116,6 +116,13 @@ security.provider.tbd=SunPKCS11 # Example: # jdk.security.provider.preferred=AES/GCM/NoPadding:SunJCE, \ # MessageDigest.SHA-256:SUN, Group.HmacSHA2:SunJCE +# +#ifdef solaris-sparc +# Optional Solaris-SPARC configuration for non-FIPS 140 configurations. +# jdk.security.provider.preferred=AES:SunJCE, SHA1:SUN, Group.SHA2:SUN, \ +# HmacSHA1:SunJCE, Group.HmacSHA2:SunJCE +# +#endif #jdk.security.provider.preferred= @@ -240,6 +247,7 @@ securerandom.strongAlgorithms=NativePRNGBlocking:SUN,DRBG:SUN # # The default value is an empty string, which is equivalent to # securerandom.drbg.config=Hash_DRBG,SHA-256,128,none +# securerandom.drbg.config= # @@ -262,23 +270,27 @@ policy.provider=sun.security.provider.PolicyFile # The default is to have a single system-wide policy file, # and a policy file in the user's home directory. +# policy.url.1=file:${java.home}/conf/security/java.policy policy.url.2=file:${user.home}/.java.policy # whether or not we expand properties in the policy file # if this is set to false, properties (${...}) will not be expanded in policy # files. +# policy.expandProperties=true # whether or not we allow an extra policy to be passed on the command line # with -Djava.security.policy=somefile. Comment out this line to disable # this feature. +# policy.allowSystemProperty=true # whether or not we look into the IdentityScope for trusted Identities # when encountering a 1.1 signed JAR file. If the identity is found # and is trusted, we grant it AllPermission. Note: the default policy # provider (sun.security.provider.PolicyFile) does not support this property. +# policy.ignoreIdentityScope=false # @@ -360,7 +372,6 @@ ssl.TrustManagerFactory.algorithm=PKIX # For this reason the default caching policy is to maintain these # results for 10 seconds. # -# networkaddress.cache.negative.ttl=10 # @@ -460,8 +471,10 @@ networkaddress.cache.negative.ttl=10 # Example, # krb5.kdc.bad.policy = tryLast # krb5.kdc.bad.policy = tryLess:2,2000 +# krb5.kdc.bad.policy = tryLast +# # Algorithm restrictions for certification path (CertPath) processing # # In some environments, certain algorithms or key lengths may be undesirable @@ -481,7 +494,8 @@ krb5.kdc.bad.policy = tryLast # (see below) # # Constraint: -# KeySizeConstraint | CAConstraint | DenyAfterConstraint +# KeySizeConstraint | CAConstraint | DenyAfterConstraint | +# UsageConstraint # # KeySizeConstraint: # keySize Operator KeyLength @@ -498,6 +512,9 @@ krb5.kdc.bad.policy = tryLast # DenyAfterConstraint: # denyAfter YYYY-MM-DD # +# UsageConstraint: +# usage [TLSServer] [TLSClient] [SignedJAR] +# # The "AlgorithmName" is the standard algorithm name of the disabled # algorithm. See "Java Cryptography Architecture Standard Algorithm Name # Documentation" for information about Standard Algorithm Names. Matching @@ -547,6 +564,19 @@ krb5.kdc.bad.policy = tryLast # Example: To deny usage of RSA 2048 bit certificates after Feb 3 2020, # use the following: "RSA keySize == 2048 & denyAfter 2020-02-03" # +# UsageConstraint: +# usage [TLSServer] [TLSClient] [SignedJAR] +# This constraint prohibits the specified algorithm for +# a specified usage. This should be used when disabling an algorithm +# for all usages is not practical. 'TLSServer' restricts the algorithm +# in TLS server certificate chains when server authentication is +# performed. 'TLSClient' restricts the algorithm in TLS client +# certificate chains when client authentication is performed. +# 'SignedJAR' constrains use of certificates in signed jar files. +# The usage type follows the keyword and more than one usage type can +# be specified with a whitespace delimiter. +# Example: "SHA1 usage TLSServer TLSClient" +# # When an algorithm must satisfy more than one constraint, it must be # delimited by an ampersand '&'. For example, to restrict certificates in a # chain that terminate at a distribution provided trust anchor and contain @@ -568,39 +598,10 @@ krb5.kdc.bad.policy = tryLast # jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048 # # -jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ +jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \ RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224 # -# RMI Registry Serial Filter -# -# The filter pattern uses the same format as jdk.serialFilter. -# This filter can override the builtin filter if additional types need to be -# allowed or rejected from the RMI Registry. -# -# Note: This property is currently used by the JDK Reference implementation. -# It is not guaranteed to be examined and used by other implementations. -# -#sun.rmi.registry.registryFilter=pattern;pattern -# -# RMI Distributed Garbage Collector (DGC) Serial Filter -# -# The filter pattern uses the same format as jdk.serialFilter. -# This filter can override the builtin filter if additional types need to be -# allowed or rejected from the RMI DGC. -# -# Note: This property is currently used by the JDK Reference implementation. -# It is not guaranteed to be examined and used by other implementations. -# -# The builtin DGC filter can approximately be represented as the filter pattern: -# -#sun.rmi.transport.dgcFilter=\ -# java.rmi.server.ObjID;\ -# java.rmi.server.UID;\ -# java.rmi.dgc.VMID;\ -# java.rmi.dgc.Lease;\ -# maxdepth=5;maxarray=10000 - # Algorithm restrictions for signed JAR files # # In some environments, certain algorithms or key lengths may be undesirable @@ -615,17 +616,20 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ # " DisabledAlgorithm { , DisabledAlgorithm } " # # DisabledAlgorithm: -# AlgorithmName [Constraint] +# AlgorithmName [Constraint] { '&' Constraint } # # AlgorithmName: # (see below) # # Constraint: -# KeySizeConstraint +# KeySizeConstraint | DenyAfterConstraint # # KeySizeConstraint: # keySize Operator KeyLength # +# DenyAfterConstraint: +# denyAfter YYYY-MM-DD +# # Operator: # <= | < | == | != | >= | > # @@ -636,9 +640,12 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ # implementation. It is not guaranteed to be examined and used by other # implementations. # +# See "jdk.certpath.disabledAlgorithms" for syntax descriptions. +# jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ DSA keySize < 1024 +# # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS/DTLS) processing # @@ -939,3 +946,32 @@ jdk.xml.dsig.secureValidationPolicy=\ # #jdk.serialFilter=pattern;pattern +# +# RMI Registry Serial Filter +# +# The filter pattern uses the same format as jdk.serialFilter. +# This filter can override the builtin filter if additional types need to be +# allowed or rejected from the RMI Registry. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +#sun.rmi.registry.registryFilter=pattern;pattern +# +# RMI Distributed Garbage Collector (DGC) Serial Filter +# +# The filter pattern uses the same format as jdk.serialFilter. +# This filter can override the builtin filter if additional types need to be +# allowed or rejected from the RMI DGC. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +# The builtin DGC filter can approximately be represented as the filter pattern: +# +#sun.rmi.transport.dgcFilter=\ +# java.rmi.server.ObjID;\ +# java.rmi.server.UID;\ +# java.rmi.dgc.VMID;\ +# java.rmi.dgc.Lease;\ +# maxdepth=5;maxarray=10000 diff --git a/jdk/src/java.base/share/legal/zlib.md b/jdk/src/java.base/share/legal/zlib.md index bbf40f9814b..69198f1ef4f 100644 --- a/jdk/src/java.base/share/legal/zlib.md +++ b/jdk/src/java.base/share/legal/zlib.md @@ -1,9 +1,9 @@ -## zlib v1.2.8 +## zlib v1.2.11 ### zlib License

             
            -Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
            +Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
             
             This software is provided 'as-is', without any express or implied
             warranty.  In no event will the authors be held liable for any damages
            diff --git a/jdk/src/java.base/share/lib/security/default.policy b/jdk/src/java.base/share/lib/security/default.policy
            index 7f7ad4ff4b3..94c2f153a9e 100644
            --- a/jdk/src/java.base/share/lib/security/default.policy
            +++ b/jdk/src/java.base/share/lib/security/default.policy
            @@ -20,9 +20,6 @@ grant codeBase "jrt:/java.corba" {
                 permission java.security.AllPermission;
             };
             
            -grant codeBase "jrt:/jdk.incubator.httpclient" {
            -};
            -
             grant codeBase "jrt:/java.scripting" {
                 permission java.security.AllPermission;
             };
            @@ -69,15 +66,7 @@ grant codeBase "jrt:/java.sql.rowset" {
             };
             
             grant codeBase "jrt:/java.xml.bind" {
            -    permission java.lang.RuntimePermission
            -                   "accessClassInPackage.com.sun.xml.internal.*";
            -    permission java.lang.RuntimePermission
            -                   "accessClassInPackage.com.sun.istack.internal";
            -    permission java.lang.RuntimePermission
            -                   "accessClassInPackage.com.sun.istack.internal.*";
            -    permission java.lang.RuntimePermission "accessDeclaredMembers";
            -    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
            -    permission java.util.PropertyPermission "*", "read";
            +    permission java.security.AllPermission;
             };
             
             grant codeBase "jrt:/java.xml.crypto" {
            @@ -102,21 +91,11 @@ grant codeBase "jrt:/java.xml.crypto" {
             };
             
             grant codeBase "jrt:/java.xml.ws" {
            -    permission java.lang.RuntimePermission
            -                   "accessClassInPackage.com.sun.org.apache.xml.internal.resolver";
            -    permission java.lang.RuntimePermission
            -                   "accessClassInPackage.com.sun.org.apache.xml.internal.resolver.tools";
            -    permission java.lang.RuntimePermission
            -                   "accessClassInPackage.com.sun.xml.internal.*";
            -    permission java.lang.RuntimePermission
            -                   "accessClassInPackage.com.sun.istack.internal";
            -    permission java.lang.RuntimePermission
            -                   "accessClassInPackage.com.sun.istack.internal.*";
            -    permission java.lang.RuntimePermission
            -                   "accessClassInPackage.com.sun.org.apache.xerces.internal.*";
            -    permission java.lang.RuntimePermission "accessDeclaredMembers";
            -    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
            -    permission java.util.PropertyPermission "*", "read";
            +    permission java.security.AllPermission;
            +};
            +
            +grant codeBase "jrt:/jdk.accessibility" {
            +    permission java.lang.RuntimePermission "accessClassInPackage.sun.awt";
             };
             
             grant codeBase "jrt:/jdk.charsets" {
            @@ -155,6 +134,10 @@ grant codeBase "jrt:/jdk.crypto.cryptoki" {
                 permission java.io.FilePermission "<>", "read";
             };
             
            +grant codeBase "jrt:/jdk.desktop" {
            +    permission java.lang.RuntimePermission "accessClassInPackage.com.sun.awt";
            +};
            +
             grant codeBase "jrt:/jdk.dynalink" {
                 permission java.security.AllPermission;
             };
            @@ -163,6 +146,10 @@ grant codeBase "jrt:/jdk.internal.le" {
                 permission java.security.AllPermission;
             };
             
            +grant codeBase "jrt:/jdk.internal.vm.compiler" {
            +    permission java.security.AllPermission;
            +};
            +
             grant codeBase "jrt:/jdk.jsobject" {
                 permission java.security.AllPermission;
             };
            @@ -198,14 +185,6 @@ grant codeBase "jrt:/jdk.zipfs" {
                 permission java.util.PropertyPermission "os.name", "read";
             };
             
            -grant codeBase "jrt:/jdk.accessibility" {
            -    permission java.lang.RuntimePermission "accessClassInPackage.sun.awt";
            -};
            -
            -grant codeBase "jrt:/jdk.desktop" {
            -    permission java.lang.RuntimePermission "accessClassInPackage.com.sun.awt";
            -};
            -
             // permissions needed by applications using java.desktop module
             grant {
                 permission java.lang.RuntimePermission "accessClassInPackage.com.sun.beans";
            diff --git a/jdk/src/java.base/share/native/include/jvm.h b/jdk/src/java.base/share/native/include/jvm.h
            index c90a557de8b..de90fd99dae 100644
            --- a/jdk/src/java.base/share/native/include/jvm.h
            +++ b/jdk/src/java.base/share/native/include/jvm.h
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 1997, 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
            @@ -455,14 +455,6 @@ JVM_AddModuleExportsToAll(JNIEnv *env, jobject from_module, const char* package)
             JNIEXPORT void JNICALL
             JVM_AddReadsModule(JNIEnv *env, jobject from_module, jobject source_module);
             
            -/*
            - * Add a package to a module.
            - *  module:  module that will contain the package
            - *  package: package to add to the module
            - */
            -JNIEXPORT void JNICALL
            -JVM_AddModulePackage(JNIEnv* env,  jobject module, const char* package);
            -
             /*
              * Reflection support functions
              */
            diff --git a/jdk/src/java.base/share/native/launcher/main.c b/jdk/src/java.base/share/native/launcher/main.c
            index acbff5ff316..8e27a2a2ed9 100644
            --- a/jdk/src/java.base/share/native/launcher/main.c
            +++ b/jdk/src/java.base/share/native/launcher/main.c
            @@ -130,10 +130,10 @@ main(int argc, char **argv)
             
                     // Add first arg, which is the app name
                     JLI_List_add(args, JLI_StringDup(argv[0]));
            -        // Append JAVA_OPTIONS
            -        if (JLI_AddArgsFromEnvVar(args, JAVA_OPTIONS)) {
            +        // Append JDK_JAVA_OPTIONS
            +        if (JLI_AddArgsFromEnvVar(args, JDK_JAVA_OPTIONS)) {
                         // JLI_SetTraceLauncher is not called yet
            -            // Show _JAVA_OPTIONS content along with JAVA_OPTIONS to aid diagnosis
            +            // Show _JAVA_OPTIONS content along with JDK_JAVA_OPTIONS to aid diagnosis
                         if (getenv(JLDEBUG_ENV_ENTRY)) {
                             char *tmp = getenv("_JAVA_OPTIONS");
                             if (NULL != tmp) {
            diff --git a/jdk/src/java.base/share/native/libjava/ClassLoader.c b/jdk/src/java.base/share/native/libjava/ClassLoader.c
            index 5a8d86156b9..f3803805c59 100644
            --- a/jdk/src/java.base/share/native/libjava/ClassLoader.c
            +++ b/jdk/src/java.base/share/native/libjava/ClassLoader.c
            @@ -72,23 +72,9 @@ getUTF(JNIEnv *env, jstring str, char* localBuf, int bufSize)
                 return utfStr;
             }
             
            -// The existence or signature of this method is not guaranteed since it
            -// supports a private method.  This method will be changed in 1.7.
            -JNIEXPORT jclass JNICALL
            -Java_java_lang_ClassLoader_defineClass0(JNIEnv *env,
            -                                        jobject loader,
            -                                        jstring name,
            -                                        jbyteArray data,
            -                                        jint offset,
            -                                        jint length,
            -                                        jobject pd)
            -{
            -    return Java_java_lang_ClassLoader_defineClass1(env, loader, name, data, offset,
            -                                                   length, pd, NULL);
            -}
            -
             JNIEXPORT jclass JNICALL
             Java_java_lang_ClassLoader_defineClass1(JNIEnv *env,
            +                                        jclass cls,
                                                     jobject loader,
                                                     jstring name,
                                                     jbyteArray data,
            @@ -163,6 +149,7 @@ Java_java_lang_ClassLoader_defineClass1(JNIEnv *env,
             
             JNIEXPORT jclass JNICALL
             Java_java_lang_ClassLoader_defineClass2(JNIEnv *env,
            +                                        jclass cls,
                                                     jobject loader,
                                                     jstring name,
                                                     jobject data,
            diff --git a/jdk/src/java.base/share/native/libjava/Module.c b/jdk/src/java.base/share/native/libjava/Module.c
            index 26067555a33..f1c13ad0cff 100644
            --- a/jdk/src/java.base/share/native/libjava/Module.c
            +++ b/jdk/src/java.base/share/native/libjava/Module.c
            @@ -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
            @@ -29,12 +29,12 @@
             #include "jni_util.h"
             #include "jvm.h"
             
            -#include "java_lang_reflect_Module.h"
            +#include "java_lang_Module.h"
             
             /*
              * Gets the UTF-8 chars for the string and translates '.' to '/'.  Does no
              * further validation, assumption being that both calling code in
            - * java.lang.reflect.Module and VM will do deeper validation.
            + * java.lang.Module and VM will do deeper validation.
              */
             static char*
             GetInternalPackageName(JNIEnv *env, jstring pkg, char* buf, jsize buf_size)
            @@ -68,35 +68,37 @@ GetInternalPackageName(JNIEnv *env, jstring pkg, char* buf, jsize buf_size)
             }
             
             JNIEXPORT void JNICALL
            -Java_java_lang_reflect_Module_defineModule0(JNIEnv *env, jclass cls, jobject module,
            +Java_java_lang_Module_defineModule0(JNIEnv *env, jclass cls, jobject module,
                                                         jboolean is_open, jstring version,
                                                         jstring location, jobjectArray packages)
             {
                 char** pkgs = NULL;
            -    jsize idx;
                 jsize num_packages = (*env)->GetArrayLength(env, packages);
             
                 if (num_packages != 0 && (pkgs = calloc(num_packages, sizeof(char*))) == NULL) {
                     JNU_ThrowOutOfMemoryError(env, NULL);
                     return;
            -    } else {
            -        int valid = 1;
            +    } else if ((*env)->EnsureLocalCapacity(env, (jint)num_packages) == 0) {
            +        jboolean failed = JNI_FALSE;
            +        int idx;
                     for (idx = 0; idx < num_packages; idx++) {
                         jstring pkg = (*env)->GetObjectArrayElement(env, packages, idx);
            -            pkgs[idx] = GetInternalPackageName(env, pkg, NULL, 0);
            -            if (pkgs[idx] == NULL) {
            -                valid = 0;
            +            char* name = GetInternalPackageName(env, pkg, NULL, 0);
            +            if (name != NULL) {
            +                pkgs[idx] = name;
            +            } else {
            +                failed = JNI_TRUE;
                             break;
                         }
                     }
            -
            -        if (valid != 0) {
            +        if (!failed) {
                         JVM_DefineModule(env, module, is_open, version, location,
            -                    (const char* const*)pkgs, num_packages);
            +                             (const char* const*)pkgs, num_packages);
                     }
                 }
             
                 if (num_packages > 0) {
            +        int idx;
                     for (idx = 0; idx < num_packages; idx++) {
                         if (pkgs[idx] != NULL) {
                             free(pkgs[idx]);
            @@ -107,14 +109,14 @@ Java_java_lang_reflect_Module_defineModule0(JNIEnv *env, jclass cls, jobject mod
             }
             
             JNIEXPORT void JNICALL
            -Java_java_lang_reflect_Module_addReads0(JNIEnv *env, jclass cls, jobject from, jobject to)
            +Java_java_lang_Module_addReads0(JNIEnv *env, jclass cls, jobject from, jobject to)
             {
                 JVM_AddReadsModule(env, from, to);
             }
             
             JNIEXPORT void JNICALL
            -Java_java_lang_reflect_Module_addExports0(JNIEnv *env, jclass cls, jobject from,
            -                                          jstring pkg, jobject to)
            +Java_java_lang_Module_addExports0(JNIEnv *env, jclass cls, jobject from,
            +                                  jstring pkg, jobject to)
             {
                 char buf[128];
                 char* pkg_name;
            @@ -134,8 +136,8 @@ Java_java_lang_reflect_Module_addExports0(JNIEnv *env, jclass cls, jobject from,
             }
             
             JNIEXPORT void JNICALL
            -Java_java_lang_reflect_Module_addExportsToAll0(JNIEnv *env, jclass cls, jobject from,
            -                                               jstring pkg)
            +Java_java_lang_Module_addExportsToAll0(JNIEnv *env, jclass cls, jobject from,
            +                                       jstring pkg)
             {
                 char buf[128];
                 char* pkg_name;
            @@ -155,8 +157,8 @@ Java_java_lang_reflect_Module_addExportsToAll0(JNIEnv *env, jclass cls, jobject
             }
             
             JNIEXPORT void JNICALL
            -Java_java_lang_reflect_Module_addExportsToAllUnnamed0(JNIEnv *env, jclass cls,
            -                                                      jobject from, jstring pkg)
            +Java_java_lang_Module_addExportsToAllUnnamed0(JNIEnv *env, jclass cls,
            +                                              jobject from, jstring pkg)
             {
                 char buf[128];
                 char* pkg_name;
            @@ -174,23 +176,3 @@ Java_java_lang_reflect_Module_addExportsToAllUnnamed0(JNIEnv *env, jclass cls,
                     }
                 }
             }
            -
            -JNIEXPORT void JNICALL
            -Java_java_lang_reflect_Module_addPackage0(JNIEnv *env, jclass cls, jobject m, jstring pkg)
            -{
            -    char buf[128];
            -    char* pkg_name;
            -
            -    if (pkg == NULL) {
            -        JNU_ThrowNullPointerException(env, "package is null");
            -        return;
            -    }
            -
            -    pkg_name = GetInternalPackageName(env, pkg, buf, (jsize)sizeof(buf));
            -    if (pkg_name != NULL) {
            -        JVM_AddModulePackage(env, m, pkg_name);
            -        if (pkg_name != buf) {
            -            free(pkg_name);
            -        }
            -    }
            -}
            diff --git a/jdk/src/java.base/share/native/libjimage/endian.hpp b/jdk/src/java.base/share/native/libjimage/endian.hpp
            index 81eca199191..b14c39ec0f3 100644
            --- a/jdk/src/java.base/share/native/libjimage/endian.hpp
            +++ b/jdk/src/java.base/share/native/libjimage/endian.hpp
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
              *
              * Redistribution and use in source and binary forms, with or without
              * modification, are permitted provided that the following conditions
            diff --git a/jdk/src/java.base/share/native/libjimage/imageDecompressor.cpp b/jdk/src/java.base/share/native/libjimage/imageDecompressor.cpp
            index e2dbb79ce6f..96a175c57e7 100644
            --- a/jdk/src/java.base/share/native/libjimage/imageDecompressor.cpp
            +++ b/jdk/src/java.base/share/native/libjimage/imageDecompressor.cpp
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
              *
              * Redistribution and use in source and binary forms, with or without
              * modification, are permitted provided that the following conditions
            diff --git a/jdk/src/java.base/share/native/libjimage/imageDecompressor.hpp b/jdk/src/java.base/share/native/libjimage/imageDecompressor.hpp
            index c5a758abbcb..ed98b32e8cb 100644
            --- a/jdk/src/java.base/share/native/libjimage/imageDecompressor.hpp
            +++ b/jdk/src/java.base/share/native/libjimage/imageDecompressor.hpp
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
              *
              * Redistribution and use in source and binary forms, with or without
              * modification, are permitted provided that the following conditions
            diff --git a/jdk/src/java.base/share/native/libjimage/imageFile.hpp b/jdk/src/java.base/share/native/libjimage/imageFile.hpp
            index 9e02d87460c..c32d2fed8c8 100644
            --- a/jdk/src/java.base/share/native/libjimage/imageFile.hpp
            +++ b/jdk/src/java.base/share/native/libjimage/imageFile.hpp
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
              *
              * Redistribution and use in source and binary forms, with or without
              * modification, are permitted provided that the following conditions
            diff --git a/jdk/src/java.base/share/native/libjimage/inttypes.hpp b/jdk/src/java.base/share/native/libjimage/inttypes.hpp
            index d66b05418f1..c5947265245 100644
            --- a/jdk/src/java.base/share/native/libjimage/inttypes.hpp
            +++ b/jdk/src/java.base/share/native/libjimage/inttypes.hpp
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
              *
              * Redistribution and use in source and binary forms, with or without
              * modification, are permitted provided that the following conditions
            @@ -47,4 +47,3 @@ typedef          long long s8;
             #endif
             
             #endif // LIBJIMAGE_INTTYPES_HPP
            -
            diff --git a/jdk/src/java.base/share/native/libjimage/jimage.hpp b/jdk/src/java.base/share/native/libjimage/jimage.hpp
            index 8521307bbf8..305c6e2b387 100644
            --- a/jdk/src/java.base/share/native/libjimage/jimage.hpp
            +++ b/jdk/src/java.base/share/native/libjimage/jimage.hpp
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
              *
              * Redistribution and use in source and binary forms, with or without
              * modification, are permitted provided that the following conditions
            @@ -202,4 +202,3 @@ extern "C" bool JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locatio
             
             typedef bool (*JImage_ResourcePath_t)(JImageFile* jimage, JImageLocationRef location,
                     char* buffer, jlong size);
            -
            diff --git a/jdk/src/java.base/share/native/libjimage/osSupport.hpp b/jdk/src/java.base/share/native/libjimage/osSupport.hpp
            index 8fa15e3c0a7..aeb6c6a79d7 100644
            --- a/jdk/src/java.base/share/native/libjimage/osSupport.hpp
            +++ b/jdk/src/java.base/share/native/libjimage/osSupport.hpp
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
              *
              * Redistribution and use in source and binary forms, with or without
              * modification, are permitted provided that the following conditions
            diff --git a/jdk/src/java.base/share/native/libjli/args.c b/jdk/src/java.base/share/native/libjli/args.c
            index d24301c3db9..9eb2317de6c 100644
            --- a/jdk/src/java.base/share/native/libjli/args.c
            +++ b/jdk/src/java.base/share/native/libjli/args.c
            @@ -34,7 +34,7 @@
                 #define NO_JNI
               #endif
               #define JLI_ReportMessage(...) printf(__VA_ARGS__)
            -  #define JAVA_OPTIONS "JAVA_OPTIONS"
            +  #define JDK_JAVA_OPTIONS "JDK_JAVA_OPTIONS"
               int IsWhiteSpaceOption(const char* name) { return 1; }
             #else
               #include "java.h"
            @@ -429,10 +429,6 @@ int isTerminalOpt(char *arg) {
             }
             
             jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name) {
            -
            -#ifndef ENABLE_JAVA_OPTIONS
            -    return JNI_FALSE;
            -#else
                 char *env = getenv(var_name);
                 char *p, *arg;
                 char quote;
            @@ -460,6 +456,11 @@ jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name) {
                         env++;
                     }
             
            +        // Trailing space
            +        if (*env == '\0') {
            +            break;
            +        }
            +
                     arg = p;
                     while (*env != '\0' && !isspace(*env)) {
                         if (*env == '"' || *env == '\'') {
            @@ -519,7 +520,6 @@ jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name) {
                 }
             
                 return JNI_TRUE;
            -#endif
             }
             
             #ifdef DEBUG_ARGFILE
            diff --git a/jdk/src/java.base/share/native/libjli/emessages.h b/jdk/src/java.base/share/native/libjli/emessages.h
            index 8c3c34199ea..2f94a60bce8 100644
            --- a/jdk/src/java.base/share/native/libjli/emessages.h
            +++ b/jdk/src/java.base/share/native/libjli/emessages.h
            @@ -36,20 +36,21 @@
             #define JNI_ERROR       "Error: A JNI error has occurred, please check your installation and try again"
             #define JNI_ERROR1      "Error: can't find JNI interfaces in: %s"
             
            -#define ARG_INFO_ENVVAR "NOTE: Picked up the following options via %s:\n  %s"
            +#define ARG_INFO_ENVVAR "NOTE: Picked up %s: %s"
             #define ARG_WARN        "Warning: %s option is no longer supported."
             
             #define ARG_ERROR1      "Error: %s requires class path specification"
             #define ARG_ERROR2      "Error: %s requires jar file specification"
             #define ARG_ERROR3      "Error: The -J option should not be followed by a space."
             #define ARG_ERROR4      "Error: %s requires module path specification"
            -#define ARG_ERROR5      "Error: %s requires module id"
            +#define ARG_ERROR5      "Error: %s requires module name"
             #define ARG_ERROR6      "Error: %s requires modules to be specified"
             #define ARG_ERROR7      "Error: %s can only be specified once"
             #define ARG_ERROR8      "Error: Unmatched quote in environment variable %s"
             #define ARG_ERROR9      "Error: Option %s is not allowed in environment variable %s"
             #define ARG_ERROR10     "Error: Option %s in %s is not allowed in environment variable %s"
             #define ARG_ERROR11     "Error: Cannot specify main class in environment variable %s"
            +#define ARG_ERROR12     "Error: %s requires module name"
             
             #define JVM_ERROR1      "Error: Could not create the Java Virtual Machine.\n" GEN_ERROR
             #define JVM_ERROR2      "Error: Could not detach main thread.\n" JNI_ERROR
            diff --git a/jdk/src/java.base/share/native/libjli/java.c b/jdk/src/java.base/share/native/libjli/java.c
            index f8265eeb110..927c09f5d14 100644
            --- a/jdk/src/java.base/share/native/libjli/java.c
            +++ b/jdk/src/java.base/share/native/libjli/java.c
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 1995, 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
            @@ -71,7 +71,10 @@ static jboolean printTo = USE_STDERR;     /* where to print version/usage */
             static jboolean printXUsage = JNI_FALSE;  /* print and exit*/
             static jboolean dryRun = JNI_FALSE;       /* initialize VM and exit */
             static char     *showSettings = NULL;     /* print but continue */
            -static char     *listModules = NULL;
            +static jboolean showResolvedModules = JNI_FALSE;
            +static jboolean listModules = JNI_FALSE;
            +static char     *describeModule = NULL;
            +static jboolean validateModules = JNI_FALSE;
             
             static const char *_program_name;
             static const char *_launcher_name;
            @@ -118,7 +121,10 @@ static void SetApplicationClassPath(const char**);
             static void PrintJavaVersion(JNIEnv *env, jboolean extraLF);
             static void PrintUsage(JNIEnv* env, jboolean doXUsage);
             static void ShowSettings(JNIEnv* env, char *optString);
            -static void ListModules(JNIEnv* env, char *optString);
            +static void ShowResolvedModules(JNIEnv* env);
            +static void ListModules(JNIEnv* env);
            +static void DescribeModule(JNIEnv* env, char* optString);
            +static jboolean ValidateModules(JNIEnv* env);
             
             static void SetPaths(int argc, char **argv);
             
            @@ -409,9 +415,31 @@ JavaMain(void * _args)
                     CHECK_EXCEPTION_LEAVE(1);
                 }
             
            -    if (listModules != NULL) {
            -        ListModules(env, listModules);
            +    // show resolved modules and continue
            +    if (showResolvedModules) {
            +        ShowResolvedModules(env);
                     CHECK_EXCEPTION_LEAVE(1);
            +    }
            +
            +    // list observable modules, then exit
            +    if (listModules) {
            +        ListModules(env);
            +        CHECK_EXCEPTION_LEAVE(1);
            +        LEAVE();
            +    }
            +
            +    // describe a module, then exit
            +    if (describeModule != NULL) {
            +        DescribeModule(env, describeModule);
            +        CHECK_EXCEPTION_LEAVE(1);
            +        LEAVE();
            +    }
            +
            +    // validate modules on the module path, then exit
            +    if (validateModules) {
            +        jboolean okay = ValidateModules(env);
            +        CHECK_EXCEPTION_LEAVE(1);
            +        if (!okay) ret = 1;
                     LEAVE();
                 }
             
            @@ -552,7 +580,8 @@ static jboolean
             IsLauncherOption(const char* name) {
                 return IsClassPathOption(name) ||
                        IsLauncherMainOption(name) ||
            -           JLI_StrCmp(name, "--list-modules") == 0;
            +           JLI_StrCmp(name, "--describe-module") == 0 ||
            +           JLI_StrCmp(name, "-d") == 0;
             }
             
             /*
            @@ -1199,7 +1228,7 @@ GetOpt(int *pargc, char ***pargv, char **poption, char **pvalue) {
             
                 } else if (JLI_StrCCmp(arg, "--") == 0 && (equals = JLI_StrChr(arg, '=')) != NULL) {
                     value = equals+1;
            -        if (JLI_StrCCmp(arg, "--list-modules=") == 0 ||
            +        if (JLI_StrCCmp(arg, "--describe-module=") == 0 ||
                         JLI_StrCCmp(arg, "--module=") == 0 ||
                         JLI_StrCCmp(arg, "--class-path=") == 0) {
                         kind = LAUNCHER_OPTION_WITH_ARGUMENT;
            @@ -1263,18 +1292,18 @@ ParseArguments(int *pargc, char ***pargv,
                         REPORT_ERROR (has_arg_any_len, ARG_ERROR1, arg);
                         SetClassPath(value);
                         mode = LM_CLASS;
            -        } else if (JLI_StrCmp(arg, "--list-modules") == 0 ||
            -                   JLI_StrCCmp(arg, "--list-modules=") == 0) {
            -            listModules = arg;
            -
            -            // set listModules to --list-modules= if argument is specified
            -            if (JLI_StrCmp(arg, "--list-modules") == 0 && has_arg) {
            -                static const char format[] = "%s=%s";
            -                size_t buflen = JLI_StrLen(option) + 2 + JLI_StrLen(value);
            -                listModules = JLI_MemAlloc(buflen);
            -                JLI_Snprintf(listModules, buflen, format, option, value);
            -            }
            -            return JNI_TRUE;
            +        } else if (JLI_StrCmp(arg, "--list-modules") == 0) {
            +            listModules = JNI_TRUE;
            +        } else if (JLI_StrCmp(arg, "--show-resolved-modules") == 0) {
            +            showResolvedModules = JNI_TRUE;
            +        } else if (JLI_StrCmp(arg, "--validate-modules") == 0) {
            +            AddOption("-Djdk.module.minimumBoot=true", NULL);
            +            validateModules = JNI_TRUE;
            +        } else if (JLI_StrCmp(arg, "--describe-module") == 0 ||
            +                   JLI_StrCCmp(arg, "--describe-module=") == 0 ||
            +                   JLI_StrCmp(arg, "-d") == 0) {
            +            REPORT_ERROR (has_arg_any_len, ARG_ERROR12, arg);
            +            describeModule = value;
             /*
              * Parse white-space options
              */
            @@ -1336,9 +1365,8 @@ ParseArguments(int *pargc, char ***pargv,
                         showSettings = arg;
                     } else if (JLI_StrCmp(arg, "-Xdiag") == 0) {
                         AddOption("-Dsun.java.launcher.diag=true", NULL);
            -            AddOption("-Djdk.launcher.traceResolver=true", NULL);
            -        } else if (JLI_StrCmp(arg, "-Xdiag:resolver") == 0) {
            -            AddOption("-Djdk.launcher.traceResolver=true", NULL);
            +        } else if (JLI_StrCmp(arg, "--show-module-resolution") == 0) {
            +            AddOption("-Djdk.module.showModuleResolution=true", NULL);
             /*
              * The following case provide backward compatibility with old-style
              * command line options.
            @@ -1399,7 +1427,10 @@ ParseArguments(int *pargc, char ***pargv,
                 }
             
                 if (*pwhat == NULL) {
            -        *pret = 1;
            +        /* LM_UNKNOWN okay for options that exit */
            +        if (!listModules && !describeModule && !validateModules) {
            +            *pret = 1;
            +        }
                 } else if (mode == LM_UNKNOWN) {
                     /* default to LM_CLASS if -m, -jar and -cp options are
                      * not specified */
            @@ -1828,21 +1859,61 @@ ShowSettings(JNIEnv *env, char *optString)
             }
             
             /**
            - * List modules supported by the runtime
            + * Show resolved modules
              */
             static void
            -ListModules(JNIEnv *env, char *optString)
            +ShowResolvedModules(JNIEnv *env)
            +{
            +    jmethodID showResolvedModulesID;
            +    jclass cls = GetLauncherHelperClass(env);
            +    NULL_CHECK(cls);
            +    NULL_CHECK(showResolvedModulesID = (*env)->GetStaticMethodID(env, cls,
            +            "showResolvedModules", "()V"));
            +    (*env)->CallStaticVoidMethod(env, cls, showResolvedModulesID);
            +}
            +
            +/**
            + * List observable modules
            + */
            +static void
            +ListModules(JNIEnv *env)
             {
                 jmethodID listModulesID;
            -    jstring joptString = NULL;
                 jclass cls = GetLauncherHelperClass(env);
                 NULL_CHECK(cls);
                 NULL_CHECK(listModulesID = (*env)->GetStaticMethodID(env, cls,
            -            "listModules", "(ZLjava/lang/String;)V"));
            +            "listModules", "()V"));
            +    (*env)->CallStaticVoidMethod(env, cls, listModulesID);
            +}
            +
            +/**
            + * Describe a module
            + */
            +static void
            +DescribeModule(JNIEnv *env, char *optString)
            +{
            +    jmethodID describeModuleID;
            +    jstring joptString = NULL;
            +    jclass cls = GetLauncherHelperClass(env);
            +    NULL_CHECK(cls);
            +    NULL_CHECK(describeModuleID = (*env)->GetStaticMethodID(env, cls,
            +            "describeModule", "(Ljava/lang/String;)V"));
                 NULL_CHECK(joptString = (*env)->NewStringUTF(env, optString));
            -    (*env)->CallStaticVoidMethod(env, cls, listModulesID,
            -                                 USE_STDOUT,
            -                                 joptString);
            +    (*env)->CallStaticVoidMethod(env, cls, describeModuleID, joptString);
            +}
            +
            +/**
            + * Validate modules
            + */
            +static jboolean
            +ValidateModules(JNIEnv *env)
            +{
            +    jmethodID validateModulesID;
            +    jclass cls = GetLauncherHelperClass(env);
            +    NULL_CHECK_RETURN_VALUE(cls, JNI_FALSE);
            +    validateModulesID = (*env)->GetStaticMethodID(env, cls, "validateModules", "()Z");
            +    NULL_CHECK_RETURN_VALUE(cls, JNI_FALSE);
            +    return (*env)->CallStaticBooleanMethod(env, cls, validateModulesID);
             }
             
             /*
            diff --git a/jdk/src/java.base/share/native/libjli/java.h b/jdk/src/java.base/share/native/libjli/java.h
            index d035a080d9d..842dcc9cf9d 100644
            --- a/jdk/src/java.base/share/native/libjli/java.h
            +++ b/jdk/src/java.base/share/native/libjli/java.h
            @@ -71,7 +71,7 @@
             
             #define SPLASH_FILE_ENV_ENTRY "_JAVA_SPLASH_FILE"
             #define SPLASH_JAR_ENV_ENTRY "_JAVA_SPLASH_JAR"
            -#define JAVA_OPTIONS "JAVA_OPTIONS"
            +#define JDK_JAVA_OPTIONS "JDK_JAVA_OPTIONS"
             
             /*
              * Pointers to the needed JNI invocation API, initialized by LoadJavaVM.
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java b/jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java
            deleted file mode 100644
            index 6f013dbb2fa..00000000000
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java
            +++ /dev/null
            @@ -1,10 +0,0 @@
            -(1)renamed
            -   adler32.c -> zadler32.c
            -   zcrc32c -> zcrc32.c
            -
            -(2)added _LP64 to make uLong a 32-bit int on 64-bit platform
            -   zconf.h:
            -   uLong -> 32-bit int
            -
            -(3)updated crc32.c/crc32()
            -   unsigned long      -> uLong
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/uncompr.c b/jdk/src/java.base/share/native/libzip/zlib-1.2.8/uncompr.c
            deleted file mode 100644
            index 1bcf06feeb0..00000000000
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/uncompr.c
            +++ /dev/null
            @@ -1,83 +0,0 @@
            -/*
            - * 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.
            - */
            -
            -/* uncompr.c -- decompress a memory buffer
            - * Copyright (C) 1995-2003, 2010 Jean-loup Gailly.
            - * For conditions of distribution and use, see copyright notice in zlib.h
            - */
            -
            -/* @(#) $Id$ */
            -
            -#define ZLIB_INTERNAL
            -#include "zlib.h"
            -
            -/* ===========================================================================
            -     Decompresses the source buffer into the destination buffer.  sourceLen is
            -   the byte length of the source buffer. Upon entry, destLen is the total
            -   size of the destination buffer, which must be large enough to hold the
            -   entire uncompressed data. (The size of the uncompressed data must have
            -   been saved previously by the compressor and transmitted to the decompressor
            -   by some mechanism outside the scope of this compression library.)
            -   Upon exit, destLen is the actual size of the compressed buffer.
            -
            -     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
            -   enough memory, Z_BUF_ERROR if there was not enough room in the output
            -   buffer, or Z_DATA_ERROR if the input data was corrupted.
            -*/
            -int ZEXPORT uncompress (dest, destLen, source, sourceLen)
            -    Bytef *dest;
            -    uLongf *destLen;
            -    const Bytef *source;
            -    uLong sourceLen;
            -{
            -    z_stream stream;
            -    int err;
            -
            -    stream.next_in = (z_const Bytef *)source;
            -    stream.avail_in = (uInt)sourceLen;
            -    /* Check for source > 64K on 16-bit machine: */
            -    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
            -
            -    stream.next_out = dest;
            -    stream.avail_out = (uInt)*destLen;
            -    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
            -
            -    stream.zalloc = (alloc_func)0;
            -    stream.zfree = (free_func)0;
            -
            -    err = inflateInit(&stream);
            -    if (err != Z_OK) return err;
            -
            -    err = inflate(&stream, Z_FINISH);
            -    if (err != Z_STREAM_END) {
            -        inflateEnd(&stream);
            -        if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
            -            return Z_DATA_ERROR;
            -        return err;
            -    }
            -    *destLen = stream.total_out;
            -
            -    err = inflateEnd(&stream);
            -    return err;
            -}
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/ChangeLog b/jdk/src/java.base/share/native/libzip/zlib/ChangeLog
            similarity index 96%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/ChangeLog
            rename to jdk/src/java.base/share/native/libzip/zlib/ChangeLog
            index f22aabaef53..30199a65a03 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/ChangeLog
            +++ b/jdk/src/java.base/share/native/libzip/zlib/ChangeLog
            @@ -1,10 +1,53 @@
             
                             ChangeLog file for zlib
             
            +Changes in 1.2.11 (15 Jan 2017)
            +- Fix deflate stored bug when pulling last block from window
            +- Permit immediate deflateParams changes before any deflate input
            +
            +Changes in 1.2.10 (2 Jan 2017)
            +- Avoid warnings on snprintf() return value
            +- Fix bug in deflate_stored() for zero-length input
            +- Fix bug in gzwrite.c that produced corrupt gzip files
            +- Remove files to be installed before copying them in Makefile.in
            +- Add warnings when compiling with assembler code
            +
            +Changes in 1.2.9 (31 Dec 2016)
            +- Fix contrib/minizip to permit unzipping with desktop API [Zouzou]
            +- Improve contrib/blast to return unused bytes
            +- Assure that gzoffset() is correct when appending
            +- Improve compress() and uncompress() to support large lengths
            +- Fix bug in test/example.c where error code not saved
            +- Remedy Coverity warning [Randers-Pehrson]
            +- Improve speed of gzprintf() in transparent mode
            +- Fix inflateInit2() bug when windowBits is 16 or 32
            +- Change DEBUG macro to ZLIB_DEBUG
            +- Avoid uninitialized access by gzclose_w()
            +- Allow building zlib outside of the source directory
            +- Fix bug that accepted invalid zlib header when windowBits is zero
            +- Fix gzseek() problem on MinGW due to buggy _lseeki64 there
            +- Loop on write() calls in gzwrite.c in case of non-blocking I/O
            +- Add --warn (-w) option to ./configure for more compiler warnings
            +- Reject a window size of 256 bytes if not using the zlib wrapper
            +- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE
            +- Add --debug (-d) option to ./configure to define ZLIB_DEBUG
            +- Fix bugs in creating a very large gzip header
            +- Add uncompress2() function, which returns the input size used
            +- Assure that deflateParams() will not switch functions mid-block
            +- Dramatically speed up deflation for level 0 (storing)
            +- Add gzfread(), duplicating the interface of fread()
            +- Add gzfwrite(), duplicating the interface of fwrite()
            +- Add deflateGetDictionary() function
            +- Use snprintf() for later versions of Microsoft C
            +- Fix *Init macros to use z_ prefix when requested
            +- Replace as400 with os400 for OS/400 support [Monnerat]
            +- Add crc32_z() and adler32_z() functions with size_t lengths
            +- Update Visual Studio project files [AraHaan]
            +
             Changes in 1.2.8 (28 Apr 2013)
             - Update contrib/minizip/iowin32.c for Windows RT [Vollant]
             - Do not force Z_CONST for C++
            -- Clean up contrib/vstudio [Ro§]
            +- Clean up contrib/vstudio [Roß]
             - Correct spelling error in zlib.h
             - Fix mixed line endings in contrib/vstudio
             
            @@ -34,7 +77,7 @@ Changes in 1.2.7.1 (24 Mar 2013)
             - Clean up the usage of z_const and respect const usage within zlib
             - Clean up examples/gzlog.[ch] comparisons of different types
             - Avoid shift equal to bits in type (caused endless loop)
            -- Fix unintialized value bug in gzputc() introduced by const patches
            +- Fix uninitialized value bug in gzputc() introduced by const patches
             - Fix memory allocation error in examples/zran.c [Nor]
             - Fix bug where gzopen(), gzclose() would write an empty file
             - Fix bug in gzclose() when gzwrite() runs out of memory
            @@ -194,7 +237,7 @@ Changes in 1.2.5.2 (17 Dec 2011)
             - Add a transparent write mode to gzopen() when 'T' is in the mode
             - Update python link in zlib man page
             - Get inffixed.h and MAKEFIXED result to match
            -- Add a ./config --solo option to make zlib subset with no libary use
            +- Add a ./config --solo option to make zlib subset with no library use
             - Add undocumented inflateResetKeep() function for CAB file decoding
             - Add --cover option to ./configure for gcc coverage testing
             - Add #define ZLIB_CONST option to use const in the z_stream interface
            @@ -564,7 +607,7 @@ Changes in 1.2.3.1 (16 August 2006)
             - Update make_vms.com [Zinser]
             - Use -fPIC for shared build in configure [Teredesai, Nicholson]
             - Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen]
            -- Use fdopen() (not _fdopen()) for Interix in zutil.h [BŠck]
            +- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bäck]
             - Add some FAQ entries about the contrib directory
             - Update the MVS question in the FAQ
             - Avoid extraneous reads after EOF in gzio.c [Brown]
            @@ -1178,7 +1221,7 @@ Changes in 1.0.6 (19 Jan 1998)
                     386 asm code replacing longest_match().
                contrib/iostream/ by Kevin Ruland 
                     A C++ I/O streams interface to the zlib gz* functions
            -   contrib/iostream2/  by Tyge Løvset 
            +   contrib/iostream2/  by Tyge Løvset 
                     Another C++ I/O streams interface
                contrib/untgz/  by "Pedro A. Aranda Guti\irrez" 
                     A very simple tar.gz file extractor using zlib
            @@ -1267,7 +1310,7 @@ Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]
             - fix array overlay in deflate.c which sometimes caused bad compressed data
             - fix inflate bug with empty stored block
             - fix MSDOS medium model which was broken in 0.99
            -- fix deflateParams() which could generated bad compressed data.
            +- fix deflateParams() which could generate bad compressed data.
             - Bytef is define'd instead of typedef'ed (work around Borland bug)
             - added an INDEX file
             - new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32),
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/README b/jdk/src/java.base/share/native/libzip/zlib/README
            similarity index 96%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/README
            rename to jdk/src/java.base/share/native/libzip/zlib/README
            index 5ca9d127eda..51106de4753 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/README
            +++ b/jdk/src/java.base/share/native/libzip/zlib/README
            @@ -1,6 +1,6 @@
             ZLIB DATA COMPRESSION LIBRARY
             
            -zlib 1.2.8 is a general purpose data compression library.  All the code is
            +zlib 1.2.11 is a general purpose data compression library.  All the code is
             thread safe.  The data format used by the zlib library is described by RFCs
             (Request for Comments) 1950 to 1952 in the files
             http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
            @@ -31,7 +31,7 @@ Mark Nelson  wrote an article about zlib for the Jan.  1997
             issue of Dr.  Dobb's Journal; a copy of the article is available at
             http://marknelson.us/1997/01/01/zlib-engine/ .
             
            -The changes made in version 1.2.8 are documented in the file ChangeLog.
            +The changes made in version 1.2.11 are documented in the file ChangeLog.
             
             Unsupported third party contributions are provided in directory contrib/ .
             
            @@ -84,7 +84,7 @@ Acknowledgments:
             
             Copyright notice:
             
            - (C) 1995-2013 Jean-loup Gailly and Mark Adler
            + (C) 1995-2017 Jean-loup Gailly and Mark Adler
             
               This software is provided 'as-is', without any express or implied
               warranty.  In no event will the authors be held liable for any damages
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/compress.c b/jdk/src/java.base/share/native/libzip/zlib/compress.c
            similarity index 81%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/compress.c
            rename to jdk/src/java.base/share/native/libzip/zlib/compress.c
            index cdc51e08172..a9d3b983486 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/compress.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/compress.c
            @@ -23,7 +23,7 @@
              */
             
             /* compress.c -- compress a memory buffer
            - * Copyright (C) 1995-2005 Jean-loup Gailly.
            + * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -52,16 +52,11 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
             {
                 z_stream stream;
                 int err;
            +    const uInt max = (uInt)-1;
            +    uLong left;
             
            -    stream.next_in = (z_const Bytef *)source;
            -    stream.avail_in = (uInt)sourceLen;
            -#ifdef MAXSEG_64K
            -    /* Check for source > 64K on 16-bit machine: */
            -    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
            -#endif
            -    stream.next_out = dest;
            -    stream.avail_out = (uInt)*destLen;
            -    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
            +    left = *destLen;
            +    *destLen = 0;
             
                 stream.zalloc = (alloc_func)0;
                 stream.zfree = (free_func)0;
            @@ -70,15 +65,26 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
                 err = deflateInit(&stream, level);
                 if (err != Z_OK) return err;
             
            -    err = deflate(&stream, Z_FINISH);
            -    if (err != Z_STREAM_END) {
            -        deflateEnd(&stream);
            -        return err == Z_OK ? Z_BUF_ERROR : err;
            -    }
            -    *destLen = stream.total_out;
            +    stream.next_out = dest;
            +    stream.avail_out = 0;
            +    stream.next_in = (z_const Bytef *)source;
            +    stream.avail_in = 0;
             
            -    err = deflateEnd(&stream);
            -    return err;
            +    do {
            +        if (stream.avail_out == 0) {
            +            stream.avail_out = left > (uLong)max ? max : (uInt)left;
            +            left -= stream.avail_out;
            +        }
            +        if (stream.avail_in == 0) {
            +            stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen;
            +            sourceLen -= stream.avail_in;
            +        }
            +        err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);
            +    } while (err == Z_OK);
            +
            +    *destLen = stream.total_out;
            +    deflateEnd(&stream);
            +    return err == Z_STREAM_END ? Z_OK : err;
             }
             
             /* ===========================================================================
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/crc32.h b/jdk/src/java.base/share/native/libzip/zlib/crc32.h
            similarity index 100%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/crc32.h
            rename to jdk/src/java.base/share/native/libzip/zlib/crc32.h
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.c b/jdk/src/java.base/share/native/libzip/zlib/deflate.c
            similarity index 76%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.c
            rename to jdk/src/java.base/share/native/libzip/zlib/deflate.c
            index 5cc66c5e537..d0ee5feadf7 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/deflate.c
            @@ -23,7 +23,7 @@
              */
             
             /* deflate.c -- compress data using the deflation algorithm
            - * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
            + * Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -76,7 +76,7 @@
             #include "deflate.h"
             
             const char deflate_copyright[] =
            -   " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler ";
            +   " deflate 1.2.11 Copyright 1995-2017 Jean-loup Gailly and Mark Adler ";
             /*
               If you use the zlib library in a product, an acknowledgment is welcome
               in the documentation of your product. If for some reason you cannot
            @@ -97,6 +97,8 @@ typedef enum {
             typedef block_state (*compress_func) OF((deflate_state *s, int flush));
             /* Compression function. Returns the block state after the call. */
             
            +local int deflateStateCheck      OF((z_streamp strm));
            +local void slide_hash     OF((deflate_state *s));
             local void fill_window    OF((deflate_state *s));
             local block_state deflate_stored OF((deflate_state *s, int flush));
             local block_state deflate_fast   OF((deflate_state *s, int flush));
            @@ -108,15 +110,16 @@ local block_state deflate_huff   OF((deflate_state *s, int flush));
             local void lm_init        OF((deflate_state *s));
             local void putShortMSB    OF((deflate_state *s, uInt b));
             local void flush_pending  OF((z_streamp strm));
            -local int read_buf        OF((z_streamp strm, Bytef *buf, unsigned size));
            +local unsigned read_buf   OF((z_streamp strm, Bytef *buf, unsigned size));
             #ifdef ASMV
            +#  pragma message("Assembler code may have bugs -- use at your own risk")
                   void match_init OF((void)); /* asm code initialization */
                   uInt longest_match  OF((deflate_state *s, IPos cur_match));
             #else
             local uInt longest_match  OF((deflate_state *s, IPos cur_match));
             #endif
             
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
             local  void check_match OF((deflate_state *s, IPos start, IPos match,
                                         int length));
             #endif
            @@ -172,21 +175,14 @@ local const config configuration_table[10] = {
              * meaning.
              */
             
            -#define EQUAL 0
            -/* result of memcmp for equal strings */
            -
            -#ifndef NO_DUMMY_DECL
            -struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
            -#endif
            -
             /* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */
            -#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0))
            +#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0))
             
             /* ===========================================================================
              * Update a hash value with the given input byte
            - * IN  assertion: all calls to to UPDATE_HASH are made with consecutive
            - *    input characters, so that a running hash key can be computed from the
            - *    previous key instead of complete recalculation each time.
            + * IN  assertion: all calls to UPDATE_HASH are made with consecutive input
            + *    characters, so that a running hash key can be computed from the previous
            + *    key instead of complete recalculation each time.
              */
             #define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask)
             
            @@ -197,9 +193,9 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
              * the previous length of the hash chain.
              * If this file is compiled with -DFASTEST, the compression level is forced
              * to 1, and no hash chains are maintained.
            - * IN  assertion: all calls to to INSERT_STRING are made with consecutive
            - *    input characters and the first MIN_MATCH bytes of str are valid
            - *    (except for the last MIN_MATCH-1 bytes of the input file).
            + * IN  assertion: all calls to INSERT_STRING are made with consecutive input
            + *    characters and the first MIN_MATCH bytes of str are valid (except for
            + *    the last MIN_MATCH-1 bytes of the input file).
              */
             #ifdef FASTEST
             #define INSERT_STRING(s, str, match_head) \
            @@ -221,6 +217,37 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
                 s->head[s->hash_size-1] = NIL; \
                 zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
             
            +/* ===========================================================================
            + * Slide the hash table when sliding the window down (could be avoided with 32
            + * bit values at the expense of memory usage). We slide even when level == 0 to
            + * keep the hash table consistent if we switch back to level > 0 later.
            + */
            +local void slide_hash(s)
            +    deflate_state *s;
            +{
            +    unsigned n, m;
            +    Posf *p;
            +    uInt wsize = s->w_size;
            +
            +    n = s->hash_size;
            +    p = &s->head[n];
            +    do {
            +        m = *--p;
            +        *p = (Pos)(m >= wsize ? m - wsize : NIL);
            +    } while (--n);
            +    n = wsize;
            +#ifndef FASTEST
            +    p = &s->prev[n];
            +    do {
            +        m = *--p;
            +        *p = (Pos)(m >= wsize ? m - wsize : NIL);
            +        /* If n is not on any hash chain, prev[n] is garbage but
            +         * its value will never be used.
            +         */
            +    } while (--n);
            +#endif
            +}
            +
             /* ========================================================================= */
             int ZEXPORT deflateInit_(strm, level, version, stream_size)
                 z_streamp strm;
            @@ -294,7 +321,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
             #endif
                 if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
                     windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
            -        strategy < 0 || strategy > Z_FIXED) {
            +        strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) {
                     return Z_STREAM_ERROR;
                 }
                 if (windowBits == 8) windowBits = 9;  /* until 256-byte window bug fixed */
            @@ -302,14 +329,15 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
                 if (s == Z_NULL) return Z_MEM_ERROR;
                 strm->state = (struct internal_state FAR *)s;
                 s->strm = strm;
            +    s->status = INIT_STATE;     /* to pass state test in deflateReset() */
             
                 s->wrap = wrap;
                 s->gzhead = Z_NULL;
            -    s->w_bits = windowBits;
            +    s->w_bits = (uInt)windowBits;
                 s->w_size = 1 << s->w_bits;
                 s->w_mask = s->w_size - 1;
             
            -    s->hash_bits = memLevel + 7;
            +    s->hash_bits = (uInt)memLevel + 7;
                 s->hash_size = 1 << s->hash_bits;
                 s->hash_mask = s->hash_size - 1;
                 s->hash_shift =  ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
            @@ -343,6 +371,31 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
                 return deflateReset(strm);
             }
             
            +/* =========================================================================
            + * Check for a valid deflate stream state. Return 0 if ok, 1 if not.
            + */
            +local int deflateStateCheck (strm)
            +    z_streamp strm;
            +{
            +    deflate_state *s;
            +    if (strm == Z_NULL ||
            +        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
            +        return 1;
            +    s = strm->state;
            +    if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE &&
            +#ifdef GZIP
            +                                           s->status != GZIP_STATE &&
            +#endif
            +                                           s->status != EXTRA_STATE &&
            +                                           s->status != NAME_STATE &&
            +                                           s->status != COMMENT_STATE &&
            +                                           s->status != HCRC_STATE &&
            +                                           s->status != BUSY_STATE &&
            +                                           s->status != FINISH_STATE))
            +        return 1;
            +    return 0;
            +}
            +
             /* ========================================================================= */
             int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
                 z_streamp strm;
            @@ -355,7 +408,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
                 unsigned avail;
                 z_const unsigned char *next;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL)
            +    if (deflateStateCheck(strm) || dictionary == Z_NULL)
                     return Z_STREAM_ERROR;
                 s = strm->state;
                 wrap = s->wrap;
            @@ -412,14 +465,35 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
                 return Z_OK;
             }
             
            +/* ========================================================================= */
            +int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength)
            +    z_streamp strm;
            +    Bytef *dictionary;
            +    uInt  *dictLength;
            +{
            +    deflate_state *s;
            +    uInt len;
            +
            +    if (deflateStateCheck(strm))
            +        return Z_STREAM_ERROR;
            +    s = strm->state;
            +    len = s->strstart + s->lookahead;
            +    if (len > s->w_size)
            +        len = s->w_size;
            +    if (dictionary != Z_NULL && len)
            +        zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len);
            +    if (dictLength != Z_NULL)
            +        *dictLength = len;
            +    return Z_OK;
            +}
            +
             /* ========================================================================= */
             int ZEXPORT deflateResetKeep (strm)
                 z_streamp strm;
             {
                 deflate_state *s;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL ||
            -        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {
            +    if (deflateStateCheck(strm)) {
                     return Z_STREAM_ERROR;
                 }
             
            @@ -434,7 +508,11 @@ int ZEXPORT deflateResetKeep (strm)
                 if (s->wrap < 0) {
                     s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
                 }
            -    s->status = s->wrap ? INIT_STATE : BUSY_STATE;
            +    s->status =
            +#ifdef GZIP
            +        s->wrap == 2 ? GZIP_STATE :
            +#endif
            +        s->wrap ? INIT_STATE : BUSY_STATE;
                 strm->adler =
             #ifdef GZIP
                     s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
            @@ -464,8 +542,8 @@ int ZEXPORT deflateSetHeader (strm, head)
                 z_streamp strm;
                 gz_headerp head;
             {
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            -    if (strm->state->wrap != 2) return Z_STREAM_ERROR;
            +    if (deflateStateCheck(strm) || strm->state->wrap != 2)
            +        return Z_STREAM_ERROR;
                 strm->state->gzhead = head;
                 return Z_OK;
             }
            @@ -476,7 +554,7 @@ int ZEXPORT deflatePending (strm, pending, bits)
                 int *bits;
                 z_streamp strm;
             {
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
                 if (pending != Z_NULL)
                     *pending = strm->state->pending;
                 if (bits != Z_NULL)
            @@ -493,7 +571,7 @@ int ZEXPORT deflatePrime (strm, bits, value)
                 deflate_state *s;
                 int put;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
                 s = strm->state;
                 if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
                     return Z_BUF_ERROR;
            @@ -518,9 +596,8 @@ int ZEXPORT deflateParams(strm, level, strategy)
             {
                 deflate_state *s;
                 compress_func func;
            -    int err = Z_OK;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
                 s = strm->state;
             
             #ifdef FASTEST
            @@ -534,13 +611,22 @@ int ZEXPORT deflateParams(strm, level, strategy)
                 func = configuration_table[s->level].func;
             
                 if ((strategy != s->strategy || func != configuration_table[level].func) &&
            -        strm->total_in != 0) {
            +        s->high_water) {
                     /* Flush the last buffer: */
            -        err = deflate(strm, Z_BLOCK);
            -        if (err == Z_BUF_ERROR && s->pending == 0)
            -            err = Z_OK;
            +        int err = deflate(strm, Z_BLOCK);
            +        if (err == Z_STREAM_ERROR)
            +            return err;
            +        if (strm->avail_out == 0)
            +            return Z_BUF_ERROR;
                 }
                 if (s->level != level) {
            +        if (s->level == 0 && s->matches != 0) {
            +            if (s->matches == 1)
            +                slide_hash(s);
            +            else
            +                CLEAR_HASH(s);
            +            s->matches = 0;
            +        }
                     s->level = level;
                     s->max_lazy_match   = configuration_table[level].max_lazy;
                     s->good_match       = configuration_table[level].good_length;
            @@ -548,7 +634,7 @@ int ZEXPORT deflateParams(strm, level, strategy)
                     s->max_chain_length = configuration_table[level].max_chain;
                 }
                 s->strategy = strategy;
            -    return err;
            +    return Z_OK;
             }
             
             /* ========================================================================= */
            @@ -561,12 +647,12 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
             {
                 deflate_state *s;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
                 s = strm->state;
            -    s->good_match = good_length;
            -    s->max_lazy_match = max_lazy;
            +    s->good_match = (uInt)good_length;
            +    s->max_lazy_match = (uInt)max_lazy;
                 s->nice_match = nice_length;
            -    s->max_chain_length = max_chain;
            +    s->max_chain_length = (uInt)max_chain;
                 return Z_OK;
             }
             
            @@ -593,14 +679,13 @@ uLong ZEXPORT deflateBound(strm, sourceLen)
             {
                 deflate_state *s;
                 uLong complen, wraplen;
            -    Bytef *str;
             
                 /* conservative upper bound for compressed data */
                 complen = sourceLen +
                           ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5;
             
                 /* if can't get parameters, return conservative bound plus zlib wrapper */
            -    if (strm == Z_NULL || strm->state == Z_NULL)
            +    if (deflateStateCheck(strm))
                     return complen + 6;
             
                 /* compute wrapper length */
            @@ -612,9 +697,11 @@ uLong ZEXPORT deflateBound(strm, sourceLen)
                 case 1:                                 /* zlib wrapper */
                     wraplen = 6 + (s->strstart ? 4 : 0);
                     break;
            +#ifdef GZIP
                 case 2:                                 /* gzip wrapper */
                     wraplen = 18;
                     if (s->gzhead != Z_NULL) {          /* user-supplied gzip header */
            +            Bytef *str;
                         if (s->gzhead->extra != Z_NULL)
                             wraplen += 2 + s->gzhead->extra_len;
                         str = s->gzhead->name;
            @@ -631,6 +718,7 @@ uLong ZEXPORT deflateBound(strm, sourceLen)
                             wraplen += 2;
                     }
                     break;
            +#endif
                 default:                                /* for compiler happiness */
                     wraplen = 6;
                 }
            @@ -658,10 +746,10 @@ local void putShortMSB (s, b)
             }
             
             /* =========================================================================
            - * Flush as much pending output as possible. All deflate() output goes
            - * through this function so some applications may wish to modify it
            - * to avoid allocating a large strm->next_out buffer and copying into it.
            - * (See also read_buf()).
            + * Flush as much pending output as possible. All deflate() output, except for
            + * some deflate_stored() output, goes through this function so some
            + * applications may wish to modify it to avoid allocating a large
            + * strm->next_out buffer and copying into it. (See also read_buf()).
              */
             local void flush_pending(strm)
                 z_streamp strm;
            @@ -678,13 +766,23 @@ local void flush_pending(strm)
                 strm->next_out  += len;
                 s->pending_out  += len;
                 strm->total_out += len;
            -    strm->avail_out  -= len;
            -    s->pending -= len;
            +    strm->avail_out -= len;
            +    s->pending      -= len;
                 if (s->pending == 0) {
                     s->pending_out = s->pending_buf;
                 }
             }
             
            +/* ===========================================================================
            + * Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1].
            + */
            +#define HCRC_UPDATE(beg) \
            +    do { \
            +        if (s->gzhead->hcrc && s->pending > (beg)) \
            +            strm->adler = crc32(strm->adler, s->pending_buf + (beg), \
            +                                s->pending - (beg)); \
            +    } while (0)
            +
             /* ========================================================================= */
             int ZEXPORT deflate (strm, flush)
                 z_streamp strm;
            @@ -693,203 +791,21 @@ int ZEXPORT deflate (strm, flush)
                 int old_flush; /* value of flush param for previous deflate call */
                 deflate_state *s;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL ||
            -        flush > Z_BLOCK || flush < 0) {
            +    if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) {
                     return Z_STREAM_ERROR;
                 }
                 s = strm->state;
             
                 if (strm->next_out == Z_NULL ||
            -        (strm->next_in == Z_NULL && strm->avail_in != 0) ||
            +        (strm->avail_in != 0 && strm->next_in == Z_NULL) ||
                     (s->status == FINISH_STATE && flush != Z_FINISH)) {
                     ERR_RETURN(strm, Z_STREAM_ERROR);
                 }
                 if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
             
            -    s->strm = strm; /* just in case */
                 old_flush = s->last_flush;
                 s->last_flush = flush;
             
            -    /* Write the header */
            -    if (s->status == INIT_STATE) {
            -#ifdef GZIP
            -        if (s->wrap == 2) {
            -            strm->adler = crc32(0L, Z_NULL, 0);
            -            put_byte(s, 31);
            -            put_byte(s, 139);
            -            put_byte(s, 8);
            -            if (s->gzhead == Z_NULL) {
            -                put_byte(s, 0);
            -                put_byte(s, 0);
            -                put_byte(s, 0);
            -                put_byte(s, 0);
            -                put_byte(s, 0);
            -                put_byte(s, s->level == 9 ? 2 :
            -                            (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
            -                             4 : 0));
            -                put_byte(s, OS_CODE);
            -                s->status = BUSY_STATE;
            -            }
            -            else {
            -                put_byte(s, (s->gzhead->text ? 1 : 0) +
            -                            (s->gzhead->hcrc ? 2 : 0) +
            -                            (s->gzhead->extra == Z_NULL ? 0 : 4) +
            -                            (s->gzhead->name == Z_NULL ? 0 : 8) +
            -                            (s->gzhead->comment == Z_NULL ? 0 : 16)
            -                        );
            -                put_byte(s, (Byte)(s->gzhead->time & 0xff));
            -                put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
            -                put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
            -                put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
            -                put_byte(s, s->level == 9 ? 2 :
            -                            (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
            -                             4 : 0));
            -                put_byte(s, s->gzhead->os & 0xff);
            -                if (s->gzhead->extra != Z_NULL) {
            -                    put_byte(s, s->gzhead->extra_len & 0xff);
            -                    put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
            -                }
            -                if (s->gzhead->hcrc)
            -                    strm->adler = crc32(strm->adler, s->pending_buf,
            -                                        s->pending);
            -                s->gzindex = 0;
            -                s->status = EXTRA_STATE;
            -            }
            -        }
            -        else
            -#endif
            -        {
            -            uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
            -            uInt level_flags;
            -
            -            if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
            -                level_flags = 0;
            -            else if (s->level < 6)
            -                level_flags = 1;
            -            else if (s->level == 6)
            -                level_flags = 2;
            -            else
            -                level_flags = 3;
            -            header |= (level_flags << 6);
            -            if (s->strstart != 0) header |= PRESET_DICT;
            -            header += 31 - (header % 31);
            -
            -            s->status = BUSY_STATE;
            -            putShortMSB(s, header);
            -
            -            /* Save the adler32 of the preset dictionary: */
            -            if (s->strstart != 0) {
            -                putShortMSB(s, (uInt)(strm->adler >> 16));
            -                putShortMSB(s, (uInt)(strm->adler & 0xffff));
            -            }
            -            strm->adler = adler32(0L, Z_NULL, 0);
            -        }
            -    }
            -#ifdef GZIP
            -    if (s->status == EXTRA_STATE) {
            -        if (s->gzhead->extra != Z_NULL) {
            -            uInt beg = s->pending;  /* start of bytes to update crc */
            -
            -            while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
            -                if (s->pending == s->pending_buf_size) {
            -                    if (s->gzhead->hcrc && s->pending > beg)
            -                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
            -                                            s->pending - beg);
            -                    flush_pending(strm);
            -                    beg = s->pending;
            -                    if (s->pending == s->pending_buf_size)
            -                        break;
            -                }
            -                put_byte(s, s->gzhead->extra[s->gzindex]);
            -                s->gzindex++;
            -            }
            -            if (s->gzhead->hcrc && s->pending > beg)
            -                strm->adler = crc32(strm->adler, s->pending_buf + beg,
            -                                    s->pending - beg);
            -            if (s->gzindex == s->gzhead->extra_len) {
            -                s->gzindex = 0;
            -                s->status = NAME_STATE;
            -            }
            -        }
            -        else
            -            s->status = NAME_STATE;
            -    }
            -    if (s->status == NAME_STATE) {
            -        if (s->gzhead->name != Z_NULL) {
            -            uInt beg = s->pending;  /* start of bytes to update crc */
            -            int val;
            -
            -            do {
            -                if (s->pending == s->pending_buf_size) {
            -                    if (s->gzhead->hcrc && s->pending > beg)
            -                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
            -                                            s->pending - beg);
            -                    flush_pending(strm);
            -                    beg = s->pending;
            -                    if (s->pending == s->pending_buf_size) {
            -                        val = 1;
            -                        break;
            -                    }
            -                }
            -                val = s->gzhead->name[s->gzindex++];
            -                put_byte(s, val);
            -            } while (val != 0);
            -            if (s->gzhead->hcrc && s->pending > beg)
            -                strm->adler = crc32(strm->adler, s->pending_buf + beg,
            -                                    s->pending - beg);
            -            if (val == 0) {
            -                s->gzindex = 0;
            -                s->status = COMMENT_STATE;
            -            }
            -        }
            -        else
            -            s->status = COMMENT_STATE;
            -    }
            -    if (s->status == COMMENT_STATE) {
            -        if (s->gzhead->comment != Z_NULL) {
            -            uInt beg = s->pending;  /* start of bytes to update crc */
            -            int val;
            -
            -            do {
            -                if (s->pending == s->pending_buf_size) {
            -                    if (s->gzhead->hcrc && s->pending > beg)
            -                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
            -                                            s->pending - beg);
            -                    flush_pending(strm);
            -                    beg = s->pending;
            -                    if (s->pending == s->pending_buf_size) {
            -                        val = 1;
            -                        break;
            -                    }
            -                }
            -                val = s->gzhead->comment[s->gzindex++];
            -                put_byte(s, val);
            -            } while (val != 0);
            -            if (s->gzhead->hcrc && s->pending > beg)
            -                strm->adler = crc32(strm->adler, s->pending_buf + beg,
            -                                    s->pending - beg);
            -            if (val == 0)
            -                s->status = HCRC_STATE;
            -        }
            -        else
            -            s->status = HCRC_STATE;
            -    }
            -    if (s->status == HCRC_STATE) {
            -        if (s->gzhead->hcrc) {
            -            if (s->pending + 2 > s->pending_buf_size)
            -                flush_pending(strm);
            -            if (s->pending + 2 <= s->pending_buf_size) {
            -                put_byte(s, (Byte)(strm->adler & 0xff));
            -                put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
            -                strm->adler = crc32(0L, Z_NULL, 0);
            -                s->status = BUSY_STATE;
            -            }
            -        }
            -        else
            -            s->status = BUSY_STATE;
            -    }
            -#endif
            -
                 /* Flush as much pending output as possible */
                 if (s->pending != 0) {
                     flush_pending(strm);
            @@ -918,15 +834,197 @@ int ZEXPORT deflate (strm, flush)
                     ERR_RETURN(strm, Z_BUF_ERROR);
                 }
             
            +    /* Write the header */
            +    if (s->status == INIT_STATE) {
            +        /* zlib header */
            +        uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
            +        uInt level_flags;
            +
            +        if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
            +            level_flags = 0;
            +        else if (s->level < 6)
            +            level_flags = 1;
            +        else if (s->level == 6)
            +            level_flags = 2;
            +        else
            +            level_flags = 3;
            +        header |= (level_flags << 6);
            +        if (s->strstart != 0) header |= PRESET_DICT;
            +        header += 31 - (header % 31);
            +
            +        putShortMSB(s, header);
            +
            +        /* Save the adler32 of the preset dictionary: */
            +        if (s->strstart != 0) {
            +            putShortMSB(s, (uInt)(strm->adler >> 16));
            +            putShortMSB(s, (uInt)(strm->adler & 0xffff));
            +        }
            +        strm->adler = adler32(0L, Z_NULL, 0);
            +        s->status = BUSY_STATE;
            +
            +        /* Compression must start with an empty pending buffer */
            +        flush_pending(strm);
            +        if (s->pending != 0) {
            +            s->last_flush = -1;
            +            return Z_OK;
            +        }
            +    }
            +#ifdef GZIP
            +    if (s->status == GZIP_STATE) {
            +        /* gzip header */
            +        strm->adler = crc32(0L, Z_NULL, 0);
            +        put_byte(s, 31);
            +        put_byte(s, 139);
            +        put_byte(s, 8);
            +        if (s->gzhead == Z_NULL) {
            +            put_byte(s, 0);
            +            put_byte(s, 0);
            +            put_byte(s, 0);
            +            put_byte(s, 0);
            +            put_byte(s, 0);
            +            put_byte(s, s->level == 9 ? 2 :
            +                     (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
            +                      4 : 0));
            +            put_byte(s, OS_CODE);
            +            s->status = BUSY_STATE;
            +
            +            /* Compression must start with an empty pending buffer */
            +            flush_pending(strm);
            +            if (s->pending != 0) {
            +                s->last_flush = -1;
            +                return Z_OK;
            +            }
            +        }
            +        else {
            +            put_byte(s, (s->gzhead->text ? 1 : 0) +
            +                     (s->gzhead->hcrc ? 2 : 0) +
            +                     (s->gzhead->extra == Z_NULL ? 0 : 4) +
            +                     (s->gzhead->name == Z_NULL ? 0 : 8) +
            +                     (s->gzhead->comment == Z_NULL ? 0 : 16)
            +                     );
            +            put_byte(s, (Byte)(s->gzhead->time & 0xff));
            +            put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
            +            put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
            +            put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
            +            put_byte(s, s->level == 9 ? 2 :
            +                     (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
            +                      4 : 0));
            +            put_byte(s, s->gzhead->os & 0xff);
            +            if (s->gzhead->extra != Z_NULL) {
            +                put_byte(s, s->gzhead->extra_len & 0xff);
            +                put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
            +            }
            +            if (s->gzhead->hcrc)
            +                strm->adler = crc32(strm->adler, s->pending_buf,
            +                                    s->pending);
            +            s->gzindex = 0;
            +            s->status = EXTRA_STATE;
            +        }
            +    }
            +    if (s->status == EXTRA_STATE) {
            +        if (s->gzhead->extra != Z_NULL) {
            +            ulg beg = s->pending;   /* start of bytes to update crc */
            +            uInt left = (s->gzhead->extra_len & 0xffff) - s->gzindex;
            +            while (s->pending + left > s->pending_buf_size) {
            +                uInt copy = s->pending_buf_size - s->pending;
            +                zmemcpy(s->pending_buf + s->pending,
            +                        s->gzhead->extra + s->gzindex, copy);
            +                s->pending = s->pending_buf_size;
            +                HCRC_UPDATE(beg);
            +                s->gzindex += copy;
            +                flush_pending(strm);
            +                if (s->pending != 0) {
            +                    s->last_flush = -1;
            +                    return Z_OK;
            +                }
            +                beg = 0;
            +                left -= copy;
            +            }
            +            zmemcpy(s->pending_buf + s->pending,
            +                    s->gzhead->extra + s->gzindex, left);
            +            s->pending += left;
            +            HCRC_UPDATE(beg);
            +            s->gzindex = 0;
            +        }
            +        s->status = NAME_STATE;
            +    }
            +    if (s->status == NAME_STATE) {
            +        if (s->gzhead->name != Z_NULL) {
            +            ulg beg = s->pending;   /* start of bytes to update crc */
            +            int val;
            +            do {
            +                if (s->pending == s->pending_buf_size) {
            +                    HCRC_UPDATE(beg);
            +                    flush_pending(strm);
            +                    if (s->pending != 0) {
            +                        s->last_flush = -1;
            +                        return Z_OK;
            +                    }
            +                    beg = 0;
            +                }
            +                val = s->gzhead->name[s->gzindex++];
            +                put_byte(s, val);
            +            } while (val != 0);
            +            HCRC_UPDATE(beg);
            +            s->gzindex = 0;
            +        }
            +        s->status = COMMENT_STATE;
            +    }
            +    if (s->status == COMMENT_STATE) {
            +        if (s->gzhead->comment != Z_NULL) {
            +            ulg beg = s->pending;   /* start of bytes to update crc */
            +            int val;
            +            do {
            +                if (s->pending == s->pending_buf_size) {
            +                    HCRC_UPDATE(beg);
            +                    flush_pending(strm);
            +                    if (s->pending != 0) {
            +                        s->last_flush = -1;
            +                        return Z_OK;
            +                    }
            +                    beg = 0;
            +                }
            +                val = s->gzhead->comment[s->gzindex++];
            +                put_byte(s, val);
            +            } while (val != 0);
            +            HCRC_UPDATE(beg);
            +        }
            +        s->status = HCRC_STATE;
            +    }
            +    if (s->status == HCRC_STATE) {
            +        if (s->gzhead->hcrc) {
            +            if (s->pending + 2 > s->pending_buf_size) {
            +                flush_pending(strm);
            +                if (s->pending != 0) {
            +                    s->last_flush = -1;
            +                    return Z_OK;
            +                }
            +            }
            +            put_byte(s, (Byte)(strm->adler & 0xff));
            +            put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
            +            strm->adler = crc32(0L, Z_NULL, 0);
            +        }
            +        s->status = BUSY_STATE;
            +
            +        /* Compression must start with an empty pending buffer */
            +        flush_pending(strm);
            +        if (s->pending != 0) {
            +            s->last_flush = -1;
            +            return Z_OK;
            +        }
            +    }
            +#endif
            +
                 /* Start a new block or continue the current one.
                  */
                 if (strm->avail_in != 0 || s->lookahead != 0 ||
                     (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
                     block_state bstate;
             
            -        bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
            -                    (s->strategy == Z_RLE ? deflate_rle(s, flush) :
            -                        (*(configuration_table[s->level].func))(s, flush));
            +        bstate = s->level == 0 ? deflate_stored(s, flush) :
            +                 s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
            +                 s->strategy == Z_RLE ? deflate_rle(s, flush) :
            +                 (*(configuration_table[s->level].func))(s, flush);
             
                     if (bstate == finish_started || bstate == finish_done) {
                         s->status = FINISH_STATE;
            @@ -968,7 +1066,6 @@ int ZEXPORT deflate (strm, flush)
                         }
                     }
                 }
            -    Assert(strm->avail_out > 0, "bug2");
             
                 if (flush != Z_FINISH) return Z_OK;
                 if (s->wrap <= 0) return Z_STREAM_END;
            @@ -1005,18 +1102,9 @@ int ZEXPORT deflateEnd (strm)
             {
                 int status;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
             
                 status = strm->state->status;
            -    if (status != INIT_STATE &&
            -        status != EXTRA_STATE &&
            -        status != NAME_STATE &&
            -        status != COMMENT_STATE &&
            -        status != HCRC_STATE &&
            -        status != BUSY_STATE &&
            -        status != FINISH_STATE) {
            -      return Z_STREAM_ERROR;
            -    }
             
                 /* Deallocate in reverse order of allocations: */
                 TRY_FREE(strm, strm->state->pending_buf);
            @@ -1047,7 +1135,7 @@ int ZEXPORT deflateCopy (dest, source)
                 ushf *overlay;
             
             
            -    if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
            +    if (deflateStateCheck(source) || dest == Z_NULL) {
                     return Z_STREAM_ERROR;
                 }
             
            @@ -1097,7 +1185,7 @@ int ZEXPORT deflateCopy (dest, source)
              * allocating a large strm->next_in buffer and copying from it.
              * (See also flush_pending()).
              */
            -local int read_buf(strm, buf, size)
            +local unsigned read_buf(strm, buf, size)
                 z_streamp strm;
                 Bytef *buf;
                 unsigned size;
            @@ -1121,7 +1209,7 @@ local int read_buf(strm, buf, size)
                 strm->next_in  += len;
                 strm->total_in += len;
             
            -    return (int)len;
            +    return len;
             }
             
             /* ===========================================================================
            @@ -1175,9 +1263,9 @@ local uInt longest_match(s, cur_match)
             {
                 unsigned chain_length = s->max_chain_length;/* max hash chain length */
                 register Bytef *scan = s->window + s->strstart; /* current string */
            -    register Bytef *match;                       /* matched string */
            +    register Bytef *match;                      /* matched string */
                 register int len;                           /* length of current match */
            -    int best_len = s->prev_length;              /* best match length so far */
            +    int best_len = (int)s->prev_length;         /* best match length so far */
                 int nice_match = s->nice_match;             /* stop if match long enough */
                 IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
                     s->strstart - (IPos)MAX_DIST(s) : NIL;
            @@ -1212,7 +1300,7 @@ local uInt longest_match(s, cur_match)
                 /* Do not look for matches beyond the end of the input. This is necessary
                  * to make deflate deterministic.
                  */
            -    if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
            +    if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead;
             
                 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
             
            @@ -1373,7 +1461,11 @@ local uInt longest_match(s, cur_match)
             
             #endif /* FASTEST */
             
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
            +
            +#define EQUAL 0
            +/* result of memcmp for equal strings */
            +
             /* ===========================================================================
              * Check that the match at match_start is indeed a match.
              */
            @@ -1399,7 +1491,7 @@ local void check_match(s, start, match, length)
             }
             #else
             #  define check_match(s, start, match, length)
            -#endif /* DEBUG */
            +#endif /* ZLIB_DEBUG */
             
             /* ===========================================================================
              * Fill the window when the lookahead becomes insufficient.
            @@ -1414,8 +1506,7 @@ local void check_match(s, start, match, length)
             local void fill_window(s)
                 deflate_state *s;
             {
            -    register unsigned n, m;
            -    register Posf *p;
            +    unsigned n;
                 unsigned more;    /* Amount of free space at the end of the window. */
                 uInt wsize = s->w_size;
             
            @@ -1442,35 +1533,11 @@ local void fill_window(s)
                      */
                     if (s->strstart >= wsize+MAX_DIST(s)) {
             
            -            zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
            +            zmemcpy(s->window, s->window+wsize, (unsigned)wsize - more);
                         s->match_start -= wsize;
                         s->strstart    -= wsize; /* we now have strstart >= MAX_DIST */
                         s->block_start -= (long) wsize;
            -
            -            /* Slide the hash table (could be avoided with 32 bit values
            -               at the expense of memory usage). We slide even when level == 0
            -               to keep the hash table consistent if we switch back to level > 0
            -               later. (Using level 0 permanently is not an optimal usage of
            -               zlib, so we don't care about this pathological case.)
            -             */
            -            n = s->hash_size;
            -            p = &s->head[n];
            -            do {
            -                m = *--p;
            -                *p = (Pos)(m >= wsize ? m-wsize : NIL);
            -            } while (--n);
            -
            -            n = wsize;
            -#ifndef FASTEST
            -            p = &s->prev[n];
            -            do {
            -                m = *--p;
            -                *p = (Pos)(m >= wsize ? m-wsize : NIL);
            -                /* If n is not on any hash chain, prev[n] is garbage but
            -                 * its value will never be used.
            -                 */
            -            } while (--n);
            -#endif
            +            slide_hash(s);
                         more += wsize;
                     }
                     if (s->strm->avail_in == 0) break;
            @@ -1576,70 +1643,199 @@ local void fill_window(s)
                if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
             }
             
            +/* Maximum stored block length in deflate format (not including header). */
            +#define MAX_STORED 65535
            +
            +/* Minimum of a and b. */
            +#define MIN(a, b) ((a) > (b) ? (b) : (a))
            +
             /* ===========================================================================
              * Copy without compression as much as possible from the input stream, return
              * the current block state.
            - * This function does not insert new strings in the dictionary since
            - * uncompressible data is probably not useful. This function is used
            - * only for the level=0 compression option.
            - * NOTE: this function should be optimized to avoid extra copying from
            - * window to pending_buf.
            + *
            + * In case deflateParams() is used to later switch to a non-zero compression
            + * level, s->matches (otherwise unused when storing) keeps track of the number
            + * of hash table slides to perform. If s->matches is 1, then one hash table
            + * slide will be done when switching. If s->matches is 2, the maximum value
            + * allowed here, then the hash table will be cleared, since two or more slides
            + * is the same as a clear.
            + *
            + * deflate_stored() is written to minimize the number of times an input byte is
            + * copied. It is most efficient with large input and output buffers, which
            + * maximizes the opportunites to have a single copy from next_in to next_out.
              */
             local block_state deflate_stored(s, flush)
                 deflate_state *s;
                 int flush;
             {
            -    /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
            -     * to pending_buf_size, and each stored block has a 5 byte header:
            +    /* Smallest worthy block size when not flushing or finishing. By default
            +     * this is 32K. This can be as small as 507 bytes for memLevel == 1. For
            +     * large input and output buffers, the stored block size will be larger.
                  */
            -    ulg max_block_size = 0xffff;
            -    ulg max_start;
            +    unsigned min_block = MIN(s->pending_buf_size - 5, s->w_size);
             
            -    if (max_block_size > s->pending_buf_size - 5) {
            -        max_block_size = s->pending_buf_size - 5;
            -    }
            -
            -    /* Copy as much as possible from input to output: */
            -    for (;;) {
            -        /* Fill the window as much as possible: */
            -        if (s->lookahead <= 1) {
            -
            -            Assert(s->strstart < s->w_size+MAX_DIST(s) ||
            -                   s->block_start >= (long)s->w_size, "slide too late");
            -
            -            fill_window(s);
            -            if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
            -
            -            if (s->lookahead == 0) break; /* flush the current block */
            -        }
            -        Assert(s->block_start >= 0L, "block gone");
            -
            -        s->strstart += s->lookahead;
            -        s->lookahead = 0;
            -
            -        /* Emit a stored block if pending_buf will be full: */
            -        max_start = s->block_start + max_block_size;
            -        if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
            -            /* strstart == 0 is possible when wraparound on 16-bit machine */
            -            s->lookahead = (uInt)(s->strstart - max_start);
            -            s->strstart = (uInt)max_start;
            -            FLUSH_BLOCK(s, 0);
            -        }
            -        /* Flush if we may have to slide, otherwise block_start may become
            -         * negative and the data will be gone:
            +    /* Copy as many min_block or larger stored blocks directly to next_out as
            +     * possible. If flushing, copy the remaining available input to next_out as
            +     * stored blocks, if there is enough space.
            +     */
            +    unsigned len, left, have, last = 0;
            +    unsigned used = s->strm->avail_in;
            +    do {
            +        /* Set len to the maximum size block that we can copy directly with the
            +         * available input data and output space. Set left to how much of that
            +         * would be copied from what's left in the window.
                      */
            -        if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
            -            FLUSH_BLOCK(s, 0);
            +        len = MAX_STORED;       /* maximum deflate stored block length */
            +        have = (s->bi_valid + 42) >> 3;         /* number of header bytes */
            +        if (s->strm->avail_out < have)          /* need room for header */
            +            break;
            +            /* maximum stored block length that will fit in avail_out: */
            +        have = s->strm->avail_out - have;
            +        left = s->strstart - s->block_start;    /* bytes left in window */
            +        if (len > (ulg)left + s->strm->avail_in)
            +            len = left + s->strm->avail_in;     /* limit len to the input */
            +        if (len > have)
            +            len = have;                         /* limit len to the output */
            +
            +        /* If the stored block would be less than min_block in length, or if
            +         * unable to copy all of the available input when flushing, then try
            +         * copying to the window and the pending buffer instead. Also don't
            +         * write an empty block when flushing -- deflate() does that.
            +         */
            +        if (len < min_block && ((len == 0 && flush != Z_FINISH) ||
            +                                flush == Z_NO_FLUSH ||
            +                                len != left + s->strm->avail_in))
            +            break;
            +
            +        /* Make a dummy stored block in pending to get the header bytes,
            +         * including any pending bits. This also updates the debugging counts.
            +         */
            +        last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0;
            +        _tr_stored_block(s, (char *)0, 0L, last);
            +
            +        /* Replace the lengths in the dummy stored block with len. */
            +        s->pending_buf[s->pending - 4] = len;
            +        s->pending_buf[s->pending - 3] = len >> 8;
            +        s->pending_buf[s->pending - 2] = ~len;
            +        s->pending_buf[s->pending - 1] = ~len >> 8;
            +
            +        /* Write the stored block header bytes. */
            +        flush_pending(s->strm);
            +
            +#ifdef ZLIB_DEBUG
            +        /* Update debugging counts for the data about to be copied. */
            +        s->compressed_len += len << 3;
            +        s->bits_sent += len << 3;
            +#endif
            +
            +        /* Copy uncompressed bytes from the window to next_out. */
            +        if (left) {
            +            if (left > len)
            +                left = len;
            +            zmemcpy(s->strm->next_out, s->window + s->block_start, left);
            +            s->strm->next_out += left;
            +            s->strm->avail_out -= left;
            +            s->strm->total_out += left;
            +            s->block_start += left;
            +            len -= left;
                     }
            +
            +        /* Copy uncompressed bytes directly from next_in to next_out, updating
            +         * the check value.
            +         */
            +        if (len) {
            +            read_buf(s->strm, s->strm->next_out, len);
            +            s->strm->next_out += len;
            +            s->strm->avail_out -= len;
            +            s->strm->total_out += len;
            +        }
            +    } while (last == 0);
            +
            +    /* Update the sliding window with the last s->w_size bytes of the copied
            +     * data, or append all of the copied data to the existing window if less
            +     * than s->w_size bytes were copied. Also update the number of bytes to
            +     * insert in the hash tables, in the event that deflateParams() switches to
            +     * a non-zero compression level.
            +     */
            +    used -= s->strm->avail_in;      /* number of input bytes directly copied */
            +    if (used) {
            +        /* If any input was used, then no unused input remains in the window,
            +         * therefore s->block_start == s->strstart.
            +         */
            +        if (used >= s->w_size) {    /* supplant the previous history */
            +            s->matches = 2;         /* clear hash */
            +            zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size);
            +            s->strstart = s->w_size;
            +        }
            +        else {
            +            if (s->window_size - s->strstart <= used) {
            +                /* Slide the window down. */
            +                s->strstart -= s->w_size;
            +                zmemcpy(s->window, s->window + s->w_size, s->strstart);
            +                if (s->matches < 2)
            +                    s->matches++;   /* add a pending slide_hash() */
            +            }
            +            zmemcpy(s->window + s->strstart, s->strm->next_in - used, used);
            +            s->strstart += used;
            +        }
            +        s->block_start = s->strstart;
            +        s->insert += MIN(used, s->w_size - s->insert);
                 }
            -    s->insert = 0;
            -    if (flush == Z_FINISH) {
            -        FLUSH_BLOCK(s, 1);
            +    if (s->high_water < s->strstart)
            +        s->high_water = s->strstart;
            +
            +    /* If the last block was written to next_out, then done. */
            +    if (last)
                     return finish_done;
            +
            +    /* If flushing and all input has been consumed, then done. */
            +    if (flush != Z_NO_FLUSH && flush != Z_FINISH &&
            +        s->strm->avail_in == 0 && (long)s->strstart == s->block_start)
            +        return block_done;
            +
            +    /* Fill the window with any remaining input. */
            +    have = s->window_size - s->strstart - 1;
            +    if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) {
            +        /* Slide the window down. */
            +        s->block_start -= s->w_size;
            +        s->strstart -= s->w_size;
            +        zmemcpy(s->window, s->window + s->w_size, s->strstart);
            +        if (s->matches < 2)
            +            s->matches++;           /* add a pending slide_hash() */
            +        have += s->w_size;          /* more space now */
                 }
            -    if ((long)s->strstart > s->block_start)
            -        FLUSH_BLOCK(s, 0);
            -    return block_done;
            +    if (have > s->strm->avail_in)
            +        have = s->strm->avail_in;
            +    if (have) {
            +        read_buf(s->strm, s->window + s->strstart, have);
            +        s->strstart += have;
            +    }
            +    if (s->high_water < s->strstart)
            +        s->high_water = s->strstart;
            +
            +    /* There was not enough avail_out to write a complete worthy or flushed
            +     * stored block to next_out. Write a stored block to pending instead, if we
            +     * have enough input for a worthy block, or if flushing and there is enough
            +     * room for the remaining input as a stored block in the pending buffer.
            +     */
            +    have = (s->bi_valid + 42) >> 3;         /* number of header bytes */
            +        /* maximum stored block length that will fit in pending: */
            +    have = MIN(s->pending_buf_size - have, MAX_STORED);
            +    min_block = MIN(have, s->w_size);
            +    left = s->strstart - s->block_start;
            +    if (left >= min_block ||
            +        ((left || flush == Z_FINISH) && flush != Z_NO_FLUSH &&
            +         s->strm->avail_in == 0 && left <= have)) {
            +        len = MIN(left, have);
            +        last = flush == Z_FINISH && s->strm->avail_in == 0 &&
            +               len == left ? 1 : 0;
            +        _tr_stored_block(s, (charf *)s->window + s->block_start, len, last);
            +        s->block_start += len;
            +        flush_pending(s->strm);
            +    }
            +
            +    /* We've done all we can with the available input and output. */
            +    return last ? finish_started : need_more;
             }
             
             /* ===========================================================================
            @@ -1916,7 +2112,7 @@ local block_state deflate_rle(s, flush)
                                      prev == *++scan && prev == *++scan &&
                                      prev == *++scan && prev == *++scan &&
                                      scan < strend);
            -                s->match_length = MAX_MATCH - (int)(strend - scan);
            +                s->match_length = MAX_MATCH - (uInt)(strend - scan);
                             if (s->match_length > s->lookahead)
                                 s->match_length = s->lookahead;
                         }
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.h b/jdk/src/java.base/share/native/libzip/zlib/deflate.h
            similarity index 93%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.h
            rename to jdk/src/java.base/share/native/libzip/zlib/deflate.h
            index 8be47fa013b..183c22d430a 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.h
            +++ b/jdk/src/java.base/share/native/libzip/zlib/deflate.h
            @@ -23,7 +23,7 @@
              */
             
             /* deflate.h -- internal compression state
            - * Copyright (C) 1995-2012 Jean-loup Gailly
            + * Copyright (C) 1995-2016 Jean-loup Gailly
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -75,13 +75,16 @@
             #define Buf_size 16
             /* size of bit buffer in bi_buf */
             
            -#define INIT_STATE    42
            -#define EXTRA_STATE   69
            -#define NAME_STATE    73
            -#define COMMENT_STATE 91
            -#define HCRC_STATE   103
            -#define BUSY_STATE   113
            -#define FINISH_STATE 666
            +#define INIT_STATE    42    /* zlib header -> BUSY_STATE */
            +#ifdef GZIP
            +#  define GZIP_STATE  57    /* gzip header -> BUSY_STATE | EXTRA_STATE */
            +#endif
            +#define EXTRA_STATE   69    /* gzip extra block -> NAME_STATE */
            +#define NAME_STATE    73    /* gzip file name -> COMMENT_STATE */
            +#define COMMENT_STATE 91    /* gzip comment -> HCRC_STATE */
            +#define HCRC_STATE   103    /* gzip header CRC -> BUSY_STATE */
            +#define BUSY_STATE   113    /* deflate -> FINISH_STATE */
            +#define FINISH_STATE 666    /* stream complete */
             /* Stream status */
             
             
            @@ -107,7 +110,7 @@ typedef struct static_tree_desc_s  static_tree_desc;
             typedef struct tree_desc_s {
                 ct_data *dyn_tree;           /* the dynamic tree */
                 int     max_code;            /* largest code with non zero frequency */
            -    static_tree_desc *stat_desc; /* the corresponding static tree */
            +    const static_tree_desc *stat_desc;  /* the corresponding static tree */
             } FAR tree_desc;
             
             typedef ush Pos;
            @@ -124,10 +127,10 @@ typedef struct internal_state {
                 Bytef *pending_buf;  /* output still pending */
                 ulg   pending_buf_size; /* size of pending_buf */
                 Bytef *pending_out;  /* next pending byte to output to the stream */
            -    uInt   pending;      /* nb of bytes in the pending buffer */
            +    ulg   pending;       /* nb of bytes in the pending buffer */
                 int   wrap;          /* bit 0 true for zlib, bit 1 true for gzip */
                 gz_headerp  gzhead;  /* gzip header information to write */
            -    uInt   gzindex;      /* where in extra, name, or comment */
            +    ulg   gzindex;       /* where in extra, name, or comment */
                 Byte  method;        /* can only be DEFLATED */
                 int   last_flush;    /* value of flush param for previous deflate call */
             
            @@ -273,7 +276,7 @@ typedef struct internal_state {
                 uInt matches;       /* number of string matches in current block */
                 uInt insert;        /* bytes at end of window left to insert */
             
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
                 ulg compressed_len; /* total bit length of compressed file mod 2^32 */
                 ulg bits_sent;      /* bit length of compressed data sent mod 2^32 */
             #endif
            @@ -299,7 +302,7 @@ typedef struct internal_state {
             /* Output a byte on the stream.
              * IN assertion: there is enough room in pending_buf.
              */
            -#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
            +#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
             
             
             #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
            @@ -333,7 +336,7 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
              * used.
              */
             
            -#ifndef DEBUG
            +#ifndef ZLIB_DEBUG
             /* Inline versions of _tr_tally for speed: */
             
             #if defined(GEN_TREES_H) || !defined(STDC)
            @@ -352,8 +355,8 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
                 flush = (s->last_lit == s->lit_bufsize-1); \
                }
             # define _tr_tally_dist(s, distance, length, flush) \
            -  { uch len = (length); \
            -    ush dist = (distance); \
            +  { uch len = (uch)(length); \
            +    ush dist = (ush)(distance); \
                 s->d_buf[s->last_lit] = dist; \
                 s->l_buf[s->last_lit++] = len; \
                 dist--; \
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzclose.c b/jdk/src/java.base/share/native/libzip/zlib/gzclose.c
            similarity index 100%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzclose.c
            rename to jdk/src/java.base/share/native/libzip/zlib/gzclose.c
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzguts.h b/jdk/src/java.base/share/native/libzip/zlib/gzguts.h
            similarity index 91%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzguts.h
            rename to jdk/src/java.base/share/native/libzip/zlib/gzguts.h
            index 5889f45c784..26464b4e6c8 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzguts.h
            +++ b/jdk/src/java.base/share/native/libzip/zlib/gzguts.h
            @@ -23,7 +23,7 @@
              */
             
             /* gzguts.h -- zlib internal header definitions for gz* operations
            - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
            + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -49,6 +49,10 @@
             #  include 
             #  include 
             #endif
            +
            +#ifndef _POSIX_SOURCE
            +#  define _POSIX_SOURCE
            +#endif
             #include 
             
             #ifdef _WIN32
            @@ -59,6 +63,10 @@
             #  include 
             #endif
             
            +#if defined(_WIN32) || defined(__CYGWIN__)
            +#  define WIDECHAR
            +#endif
            +
             #ifdef WINAPI_FAMILY
             #  define open _open
             #  define read _read
            @@ -119,18 +127,19 @@
             #  endif
             #endif
             
            -/* unlike snprintf (which is required in C99, yet still not supported by
            -   Microsoft more than a decade later!), _snprintf does not guarantee null
            -   termination of the result -- however this is only used in gzlib.c where
            +/* unlike snprintf (which is required in C99), _snprintf does not guarantee
            +   null termination of the result -- however this is only used in gzlib.c where
                the result is assured to fit in the space provided */
            -#ifdef _MSC_VER
            +#if defined(_MSC_VER) && _MSC_VER < 1900
             #  define snprintf _snprintf
             #endif
             
             #ifndef local
             #  define local static
             #endif
            -/* compile with -Dlocal if your debugger can't find static symbols */
            +/* since "static" is used to mean two completely different things in C, we
            +   define "local" for the non-static meaning of "static", for readability
            +   (compile with -Dlocal if your debugger can't find static symbols) */
             
             /* gz* functions always use library allocation functions */
             #ifndef STDC
            @@ -194,7 +203,7 @@ typedef struct {
                 char *path;             /* path or fd for error messages */
                 unsigned size;          /* buffer size, zero if not allocated yet */
                 unsigned want;          /* requested buffer size, default is GZBUFSIZE */
            -    unsigned char *in;      /* input buffer */
            +    unsigned char *in;      /* input buffer (double-sized when writing) */
                 unsigned char *out;     /* output buffer (double-sized when reading) */
                 int direct;             /* 0 if processing gzip, 1 if transparent */
                     /* just for reading */
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzlib.c b/jdk/src/java.base/share/native/libzip/zlib/gzlib.c
            similarity index 96%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzlib.c
            rename to jdk/src/java.base/share/native/libzip/zlib/gzlib.c
            index 4dce9b96ef7..a814dd8c7b6 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzlib.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/gzlib.c
            @@ -23,13 +23,13 @@
              */
             
             /* gzlib.c -- zlib functions common to reading and writing gzip files
            - * Copyright (C) 2004, 2010, 2011, 2012, 2013 Mark Adler
            + * Copyright (C) 2004-2017 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
             #include "gzguts.h"
             
            -#if defined(_WIN32) && !defined(__BORLANDC__)
            +#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__)
             #  define LSEEK _lseeki64
             #else
             #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
            @@ -118,7 +118,7 @@ local gzFile gz_open(path, fd, mode)
                 const char *mode;
             {
                 gz_statep state;
            -    size_t len;
            +    z_size_t len;
                 int oflag;
             #ifdef O_CLOEXEC
                 int cloexec = 0;
            @@ -212,10 +212,10 @@ local gzFile gz_open(path, fd, mode)
                 }
             
                 /* save the path name for error messages */
            -#ifdef _WIN32
            +#ifdef WIDECHAR
                 if (fd == -2) {
                     len = wcstombs(NULL, path, 0);
            -        if (len == (size_t)-1)
            +        if (len == (z_size_t)-1)
                         len = 0;
                 }
                 else
            @@ -226,7 +226,7 @@ local gzFile gz_open(path, fd, mode)
                     free(state);
                     return NULL;
                 }
            -#ifdef _WIN32
            +#ifdef WIDECHAR
                 if (fd == -2)
                     if (len)
                         wcstombs(state->path, path, len + 1);
            @@ -235,7 +235,7 @@ local gzFile gz_open(path, fd, mode)
                 else
             #endif
             #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
            -        snprintf(state->path, len + 1, "%s", (const char *)path);
            +        (void)snprintf(state->path, len + 1, "%s", (const char *)path);
             #else
                     strcpy(state->path, path);
             #endif
            @@ -263,7 +263,7 @@ local gzFile gz_open(path, fd, mode)
             
                 /* open the file with the appropriate flags (or just use fd) */
                 state->fd = fd > -1 ? fd : (
            -#ifdef _WIN32
            +#ifdef WIDECHAR
                     fd == -2 ? _wopen(path, oflag, 0666) :
             #endif
                     open((const char *)path, oflag, 0666));
            @@ -272,8 +272,10 @@ local gzFile gz_open(path, fd, mode)
                     free(state);
                     return NULL;
                 }
            -    if (state->mode == GZ_APPEND)
            +    if (state->mode == GZ_APPEND) {
            +        LSEEK(state->fd, 0, SEEK_END);  /* so gzoffset() is correct */
                     state->mode = GZ_WRITE;         /* simplify later checks */
            +    }
             
                 /* save the current position for rewinding (only if reading) */
                 if (state->mode == GZ_READ) {
            @@ -315,7 +317,7 @@ gzFile ZEXPORT gzdopen(fd, mode)
                 if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL)
                     return NULL;
             #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
            -    snprintf(path, 7 + 3 * sizeof(int), "", fd); /* for debugging */
            +    (void)snprintf(path, 7 + 3 * sizeof(int), "", fd);
             #else
                 sprintf(path, "", fd);   /* for debugging */
             #endif
            @@ -325,7 +327,7 @@ gzFile ZEXPORT gzdopen(fd, mode)
             }
             
             /* -- see zlib.h -- */
            -#ifdef _WIN32
            +#ifdef WIDECHAR
             gzFile ZEXPORT gzopen_w(path, mode)
                 const wchar_t *path;
                 const char *mode;
            @@ -353,6 +355,8 @@ int ZEXPORT gzbuffer(file, size)
                     return -1;
             
                 /* check and set requested size */
            +    if ((size << 1) < size)
            +        return -1;              /* need to be able to double it */
                 if (size < 2)
                     size = 2;               /* need two bytes to check magic header */
                 state->want = size;
            @@ -628,14 +632,13 @@ void ZLIB_INTERNAL gz_error(state, err, msg)
                     return;
                 }
             #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
            -    snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
            -             "%s%s%s", state->path, ": ", msg);
            +    (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
            +                   "%s%s%s", state->path, ": ", msg);
             #else
                 strcpy(state->msg, state->path);
                 strcat(state->msg, ": ");
                 strcat(state->msg, msg);
             #endif
            -    return;
             }
             
             #ifndef INT_MAX
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzread.c b/jdk/src/java.base/share/native/libzip/zlib/gzread.c
            similarity index 86%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzread.c
            rename to jdk/src/java.base/share/native/libzip/zlib/gzread.c
            index cd87098b95a..14394c59a9b 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzread.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/gzread.c
            @@ -23,7 +23,7 @@
              */
             
             /* gzread.c -- zlib functions for reading gzip files
            - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
            + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -36,6 +36,7 @@ local int gz_look OF((gz_statep));
             local int gz_decomp OF((gz_statep));
             local int gz_fetch OF((gz_statep));
             local int gz_skip OF((gz_statep, z_off64_t));
            +local z_size_t gz_read OF((gz_statep, voidp, z_size_t));
             
             /* Use read() to load a buffer -- return -1 on error, otherwise 0.  Read from
                state->fd, and update state->eof, state->err, and state->msg as appropriate.
            @@ -48,13 +49,17 @@ local int gz_load(state, buf, len, have)
                 unsigned *have;
             {
                 int ret;
            +    unsigned get, max = ((unsigned)-1 >> 2) + 1;
             
                 *have = 0;
                 do {
            -        ret = read(state->fd, buf + *have, len - *have);
            +        get = len - *have;
            +        if (get > max)
            +            get = max;
            +        ret = read(state->fd, buf + *have, get);
                     if (ret <= 0)
                         break;
            -        *have += ret;
            +        *have += (unsigned)ret;
                 } while (*have < len);
                 if (ret < 0) {
                     gz_error(state, Z_ERRNO, zstrerror());
            @@ -118,10 +123,8 @@ local int gz_look(state)
                     state->in = (unsigned char *)malloc(state->want);
                     state->out = (unsigned char *)malloc(state->want << 1);
                     if (state->in == NULL || state->out == NULL) {
            -            if (state->out != NULL)
            -                free(state->out);
            -            if (state->in != NULL)
            -                free(state->in);
            +            free(state->out);
            +            free(state->in);
                         gz_error(state, Z_MEM_ERROR, "out of memory");
                         return -1;
                     }
            @@ -308,33 +311,17 @@ local int gz_skip(state, len)
                 return 0;
             }
             
            -/* -- see zlib.h -- */
            -int ZEXPORT gzread(file, buf, len)
            -    gzFile file;
            -    voidp buf;
            -    unsigned len;
            -{
            -    unsigned got, n;
            +/* Read len bytes into buf from file, or less than len up to the end of the
            +   input.  Return the number of bytes read.  If zero is returned, either the
            +   end of file was reached, or there was an error.  state->err must be
            +   consulted in that case to determine which. */
            +local z_size_t gz_read(state, buf, len)
                 gz_statep state;
            -    z_streamp strm;
            -
            -    /* get internal structure */
            -    if (file == NULL)
            -        return -1;
            -    state = (gz_statep)file;
            -    strm = &(state->strm);
            -
            -    /* check that we're reading and that there's no (serious) error */
            -    if (state->mode != GZ_READ ||
            -            (state->err != Z_OK && state->err != Z_BUF_ERROR))
            -        return -1;
            -
            -    /* since an int is returned, make sure len fits in one, otherwise return
            -       with an error (this avoids the flaw in the interface) */
            -    if ((int)len < 0) {
            -        gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
            -        return -1;
            -    }
            +    voidp buf;
            +    z_size_t len;
            +{
            +    z_size_t got;
            +    unsigned n;
             
                 /* if len is zero, avoid unnecessary operations */
                 if (len == 0)
            @@ -344,32 +331,38 @@ int ZEXPORT gzread(file, buf, len)
                 if (state->seek) {
                     state->seek = 0;
                     if (gz_skip(state, state->skip) == -1)
            -            return -1;
            +            return 0;
                 }
             
                 /* get len bytes to buf, or less than len if at the end */
                 got = 0;
                 do {
            +        /* set n to the maximum amount of len that fits in an unsigned int */
            +        n = -1;
            +        if (n > len)
            +            n = (unsigned)len;
            +
                     /* first just try copying data from the output buffer */
                     if (state->x.have) {
            -            n = state->x.have > len ? len : state->x.have;
            +            if (state->x.have < n)
            +                n = state->x.have;
                         memcpy(buf, state->x.next, n);
                         state->x.next += n;
                         state->x.have -= n;
                     }
             
                     /* output buffer empty -- return if we're at the end of the input */
            -        else if (state->eof && strm->avail_in == 0) {
            +        else if (state->eof && state->strm.avail_in == 0) {
                         state->past = 1;        /* tried to read past end */
                         break;
                     }
             
                     /* need output data -- for small len or new stream load up our output
                        buffer */
            -        else if (state->how == LOOK || len < (state->size << 1)) {
            +        else if (state->how == LOOK || n < (state->size << 1)) {
                         /* get more output, looking for header if required */
                         if (gz_fetch(state) == -1)
            -                return -1;
            +                return 0;
                         continue;       /* no progress yet -- go back to copy above */
                         /* the copy above assures that we will leave with space in the
                            output buffer, allowing at least one gzungetc() to succeed */
            @@ -377,16 +370,16 @@ int ZEXPORT gzread(file, buf, len)
             
                     /* large len -- read directly into user buffer */
                     else if (state->how == COPY) {      /* read directly */
            -            if (gz_load(state, (unsigned char *)buf, len, &n) == -1)
            -                return -1;
            +            if (gz_load(state, (unsigned char *)buf, n, &n) == -1)
            +                return 0;
                     }
             
                     /* large len -- decompress directly into user buffer */
                     else {  /* state->how == GZIP */
            -            strm->avail_out = len;
            -            strm->next_out = (unsigned char *)buf;
            +            state->strm.avail_out = n;
            +            state->strm.next_out = (unsigned char *)buf;
                         if (gz_decomp(state) == -1)
            -                return -1;
            +                return 0;
                         n = state->x.have;
                         state->x.have = 0;
                     }
            @@ -398,8 +391,75 @@ int ZEXPORT gzread(file, buf, len)
                     state->x.pos += n;
                 } while (len);
             
            -    /* return number of bytes read into user buffer (will fit in int) */
            -    return (int)got;
            +    /* return number of bytes read into user buffer */
            +    return got;
            +}
            +
            +/* -- see zlib.h -- */
            +int ZEXPORT gzread(file, buf, len)
            +    gzFile file;
            +    voidp buf;
            +    unsigned len;
            +{
            +    gz_statep state;
            +
            +    /* get internal structure */
            +    if (file == NULL)
            +        return -1;
            +    state = (gz_statep)file;
            +
            +    /* check that we're reading and that there's no (serious) error */
            +    if (state->mode != GZ_READ ||
            +            (state->err != Z_OK && state->err != Z_BUF_ERROR))
            +        return -1;
            +
            +    /* since an int is returned, make sure len fits in one, otherwise return
            +       with an error (this avoids a flaw in the interface) */
            +    if ((int)len < 0) {
            +        gz_error(state, Z_STREAM_ERROR, "request does not fit in an int");
            +        return -1;
            +    }
            +
            +    /* read len or fewer bytes to buf */
            +    len = (unsigned)gz_read(state, buf, len);
            +
            +    /* check for an error */
            +    if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR)
            +        return -1;
            +
            +    /* return the number of bytes read (this is assured to fit in an int) */
            +    return (int)len;
            +}
            +
            +/* -- see zlib.h -- */
            +z_size_t ZEXPORT gzfread(buf, size, nitems, file)
            +    voidp buf;
            +    z_size_t size;
            +    z_size_t nitems;
            +    gzFile file;
            +{
            +    z_size_t len;
            +    gz_statep state;
            +
            +    /* get internal structure */
            +    if (file == NULL)
            +        return 0;
            +    state = (gz_statep)file;
            +
            +    /* check that we're reading and that there's no (serious) error */
            +    if (state->mode != GZ_READ ||
            +            (state->err != Z_OK && state->err != Z_BUF_ERROR))
            +        return 0;
            +
            +    /* compute bytes to read -- error on overflow */
            +    len = nitems * size;
            +    if (size && len / size != nitems) {
            +        gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t");
            +        return 0;
            +    }
            +
            +    /* read len or fewer bytes to buf, return the number of full items read */
            +    return len ? gz_read(state, buf, len) / size : 0;
             }
             
             /* -- see zlib.h -- */
            @@ -432,8 +492,8 @@ int ZEXPORT gzgetc(file)
                     return *(state->x.next)++;
                 }
             
            -    /* nothing there -- try gzread() */
            -    ret = gzread(file, buf, 1);
            +    /* nothing there -- try gz_read() */
            +    ret = (int)gz_read(state, buf, 1);
                 return ret < 1 ? -1 : buf[0];
             }
             
            @@ -475,7 +535,7 @@ int ZEXPORT gzungetc(c, file)
                 if (state->x.have == 0) {
                     state->x.have = 1;
                     state->x.next = state->out + (state->size << 1) - 1;
            -        state->x.next[0] = c;
            +        state->x.next[0] = (unsigned char)c;
                     state->x.pos--;
                     state->past = 0;
                     return c;
            @@ -497,7 +557,7 @@ int ZEXPORT gzungetc(c, file)
                 }
                 state->x.have++;
                 state->x.next--;
            -    state->x.next[0] = c;
            +    state->x.next[0] = (unsigned char)c;
                 state->x.pos--;
                 state->past = 0;
                 return c;
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzwrite.c b/jdk/src/java.base/share/native/libzip/zlib/gzwrite.c
            similarity index 64%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzwrite.c
            rename to jdk/src/java.base/share/native/libzip/zlib/gzwrite.c
            index 1955cf763b4..7a73b7cadf3 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzwrite.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/gzwrite.c
            @@ -23,7 +23,7 @@
              */
             
             /* gzwrite.c -- zlib functions for writing gzip files
            - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
            + * Copyright (C) 2004-2017 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -33,17 +33,19 @@
             local int gz_init OF((gz_statep));
             local int gz_comp OF((gz_statep, int));
             local int gz_zero OF((gz_statep, z_off64_t));
            +local z_size_t gz_write OF((gz_statep, voidpc, z_size_t));
             
             /* Initialize state for writing a gzip file.  Mark initialization by setting
            -   state->size to non-zero.  Return -1 on failure or 0 on success. */
            +   state->size to non-zero.  Return -1 on a memory allocation failure, or 0 on
            +   success. */
             local int gz_init(state)
                 gz_statep state;
             {
                 int ret;
                 z_streamp strm = &(state->strm);
             
            -    /* allocate input buffer */
            -    state->in = (unsigned char *)malloc(state->want);
            +    /* allocate input buffer (double size for gzprintf) */
            +    state->in = (unsigned char *)malloc(state->want << 1);
                 if (state->in == NULL) {
                     gz_error(state, Z_MEM_ERROR, "out of memory");
                     return -1;
            @@ -71,6 +73,7 @@ local int gz_init(state)
                         gz_error(state, Z_MEM_ERROR, "out of memory");
                         return -1;
                     }
            +        strm->next_in = NULL;
                 }
             
                 /* mark state as initialized */
            @@ -86,17 +89,17 @@ local int gz_init(state)
             }
             
             /* Compress whatever is at avail_in and next_in and write to the output file.
            -   Return -1 if there is an error writing to the output file, otherwise 0.
            -   flush is assumed to be a valid deflate() flush value.  If flush is Z_FINISH,
            -   then the deflate() state is reset to start a new gzip stream.  If gz->direct
            -   is true, then simply write to the output file without compressing, and
            -   ignore flush. */
            +   Return -1 if there is an error writing to the output file or if gz_init()
            +   fails to allocate memory, otherwise 0.  flush is assumed to be a valid
            +   deflate() flush value.  If flush is Z_FINISH, then the deflate() state is
            +   reset to start a new gzip stream.  If gz->direct is true, then simply write
            +   to the output file without compressing, and ignore flush. */
             local int gz_comp(state, flush)
                 gz_statep state;
                 int flush;
             {
            -    int ret, got;
            -    unsigned have;
            +    int ret, writ;
            +    unsigned have, put, max = ((unsigned)-1 >> 2) + 1;
                 z_streamp strm = &(state->strm);
             
                 /* allocate memory if this is the first time through */
            @@ -105,12 +108,16 @@ local int gz_comp(state, flush)
             
                 /* write directly if requested */
                 if (state->direct) {
            -        got = write(state->fd, strm->next_in, strm->avail_in);
            -        if (got < 0 || (unsigned)got != strm->avail_in) {
            -            gz_error(state, Z_ERRNO, zstrerror());
            -            return -1;
            +        while (strm->avail_in) {
            +            put = strm->avail_in > max ? max : strm->avail_in;
            +            writ = write(state->fd, strm->next_in, put);
            +            if (writ < 0) {
            +                gz_error(state, Z_ERRNO, zstrerror());
            +                return -1;
            +            }
            +            strm->avail_in -= (unsigned)writ;
            +            strm->next_in += writ;
                     }
            -        strm->avail_in = 0;
                     return 0;
                 }
             
            @@ -121,17 +128,21 @@ local int gz_comp(state, flush)
                        doing Z_FINISH then don't write until we get to Z_STREAM_END */
                     if (strm->avail_out == 0 || (flush != Z_NO_FLUSH &&
                         (flush != Z_FINISH || ret == Z_STREAM_END))) {
            -            have = (unsigned)(strm->next_out - state->x.next);
            -            if (have && ((got = write(state->fd, state->x.next, have)) < 0 ||
            -                         (unsigned)got != have)) {
            -                gz_error(state, Z_ERRNO, zstrerror());
            -                return -1;
            +            while (strm->next_out > state->x.next) {
            +                put = strm->next_out - state->x.next > (int)max ? max :
            +                      (unsigned)(strm->next_out - state->x.next);
            +                writ = write(state->fd, state->x.next, put);
            +                if (writ < 0) {
            +                    gz_error(state, Z_ERRNO, zstrerror());
            +                    return -1;
            +                }
            +                state->x.next += writ;
                         }
                         if (strm->avail_out == 0) {
                             strm->avail_out = state->size;
                             strm->next_out = state->out;
            +                state->x.next = state->out;
                         }
            -            state->x.next = strm->next_out;
                     }
             
                     /* compress */
            @@ -153,7 +164,8 @@ local int gz_comp(state, flush)
                 return 0;
             }
             
            -/* Compress len zeros to output.  Return -1 on error, 0 on success. */
            +/* Compress len zeros to output.  Return -1 on a write error or memory
            +   allocation failure by gz_comp(), or 0 on success. */
             local int gz_zero(state, len)
                 gz_statep state;
                 z_off64_t len;
            @@ -185,32 +197,14 @@ local int gz_zero(state, len)
                 return 0;
             }
             
            -/* -- see zlib.h -- */
            -int ZEXPORT gzwrite(file, buf, len)
            -    gzFile file;
            -    voidpc buf;
            -    unsigned len;
            -{
            -    unsigned put = len;
            +/* Write len bytes from buf to file.  Return the number of bytes written.  If
            +   the returned value is less than len, then there was an error. */
            +local z_size_t gz_write(state, buf, len)
                 gz_statep state;
            -    z_streamp strm;
            -
            -    /* get internal structure */
            -    if (file == NULL)
            -        return 0;
            -    state = (gz_statep)file;
            -    strm = &(state->strm);
            -
            -    /* check that we're writing and that there's no error */
            -    if (state->mode != GZ_WRITE || state->err != Z_OK)
            -        return 0;
            -
            -    /* since an int is returned, make sure len fits in one, otherwise return
            -       with an error (this avoids the flaw in the interface) */
            -    if ((int)len < 0) {
            -        gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
            -        return 0;
            -    }
            +    voidpc buf;
            +    z_size_t len;
            +{
            +    z_size_t put = len;
             
                 /* if len is zero, avoid unnecessary operations */
                 if (len == 0)
            @@ -233,14 +227,15 @@ int ZEXPORT gzwrite(file, buf, len)
                     do {
                         unsigned have, copy;
             
            -            if (strm->avail_in == 0)
            -                strm->next_in = state->in;
            -            have = (unsigned)((strm->next_in + strm->avail_in) - state->in);
            +            if (state->strm.avail_in == 0)
            +                state->strm.next_in = state->in;
            +            have = (unsigned)((state->strm.next_in + state->strm.avail_in) -
            +                              state->in);
                         copy = state->size - have;
                         if (copy > len)
            -                copy = len;
            +                copy = (unsigned)len;
                         memcpy(state->in + have, buf, copy);
            -            strm->avail_in += copy;
            +            state->strm.avail_in += copy;
                         state->x.pos += copy;
                         buf = (const char *)buf + copy;
                         len -= copy;
            @@ -250,19 +245,83 @@ int ZEXPORT gzwrite(file, buf, len)
                 }
                 else {
                     /* consume whatever's left in the input buffer */
            -        if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
            +        if (state->strm.avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
                         return 0;
             
                     /* directly compress user buffer to file */
            -        strm->avail_in = len;
            -        strm->next_in = (z_const Bytef *)buf;
            -        state->x.pos += len;
            -        if (gz_comp(state, Z_NO_FLUSH) == -1)
            -            return 0;
            +        state->strm.next_in = (z_const Bytef *)buf;
            +        do {
            +            unsigned n = (unsigned)-1;
            +            if (n > len)
            +                n = (unsigned)len;
            +            state->strm.avail_in = n;
            +            state->x.pos += n;
            +            if (gz_comp(state, Z_NO_FLUSH) == -1)
            +                return 0;
            +            len -= n;
            +        } while (len);
                 }
             
            -    /* input was all buffered or compressed (put will fit in int) */
            -    return (int)put;
            +    /* input was all buffered or compressed */
            +    return put;
            +}
            +
            +/* -- see zlib.h -- */
            +int ZEXPORT gzwrite(file, buf, len)
            +    gzFile file;
            +    voidpc buf;
            +    unsigned len;
            +{
            +    gz_statep state;
            +
            +    /* get internal structure */
            +    if (file == NULL)
            +        return 0;
            +    state = (gz_statep)file;
            +
            +    /* check that we're writing and that there's no error */
            +    if (state->mode != GZ_WRITE || state->err != Z_OK)
            +        return 0;
            +
            +    /* since an int is returned, make sure len fits in one, otherwise return
            +       with an error (this avoids a flaw in the interface) */
            +    if ((int)len < 0) {
            +        gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
            +        return 0;
            +    }
            +
            +    /* write len bytes from buf (the return value will fit in an int) */
            +    return (int)gz_write(state, buf, len);
            +}
            +
            +/* -- see zlib.h -- */
            +z_size_t ZEXPORT gzfwrite(buf, size, nitems, file)
            +    voidpc buf;
            +    z_size_t size;
            +    z_size_t nitems;
            +    gzFile file;
            +{
            +    z_size_t len;
            +    gz_statep state;
            +
            +    /* get internal structure */
            +    if (file == NULL)
            +        return 0;
            +    state = (gz_statep)file;
            +
            +    /* check that we're writing and that there's no error */
            +    if (state->mode != GZ_WRITE || state->err != Z_OK)
            +        return 0;
            +
            +    /* compute bytes to read -- error on overflow */
            +    len = nitems * size;
            +    if (size && len / size != nitems) {
            +        gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t");
            +        return 0;
            +    }
            +
            +    /* write len bytes to buf, return the number of full items written */
            +    return len ? gz_write(state, buf, len) / size : 0;
             }
             
             /* -- see zlib.h -- */
            @@ -299,7 +358,7 @@ int ZEXPORT gzputc(file, c)
                         strm->next_in = state->in;
                     have = (unsigned)((strm->next_in + strm->avail_in) - state->in);
                     if (have < state->size) {
            -            state->in[have] = c;
            +            state->in[have] = (unsigned char)c;
                         strm->avail_in++;
                         state->x.pos++;
                         return c & 0xff;
            @@ -307,8 +366,8 @@ int ZEXPORT gzputc(file, c)
                 }
             
                 /* no room in buffer or not initialized, use gz_write() */
            -    buf[0] = c;
            -    if (gzwrite(file, buf, 1) != 1)
            +    buf[0] = (unsigned char)c;
            +    if (gz_write(state, buf, 1) != 1)
                     return -1;
                 return c & 0xff;
             }
            @@ -319,11 +378,21 @@ int ZEXPORT gzputs(file, str)
                 const char *str;
             {
                 int ret;
            -    unsigned len;
            +    z_size_t len;
            +    gz_statep state;
            +
            +    /* get internal structure */
            +    if (file == NULL)
            +        return -1;
            +    state = (gz_statep)file;
            +
            +    /* check that we're writing and that there's no error */
            +    if (state->mode != GZ_WRITE || state->err != Z_OK)
            +        return -1;
             
                 /* write string */
            -    len = (unsigned)strlen(str);
            -    ret = gzwrite(file, str, len);
            +    len = strlen(str);
            +    ret = (int)gz_write(state, str, len);
                 return ret == 0 && len != 0 ? -1 : ret;
             }
             
            @@ -333,63 +402,73 @@ int ZEXPORT gzputs(file, str)
             /* -- see zlib.h -- */
             int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va)
             {
            -    int size, len;
            +    int len;
            +    unsigned left;
            +    char *next;
                 gz_statep state;
                 z_streamp strm;
             
                 /* get internal structure */
                 if (file == NULL)
            -        return -1;
            +        return Z_STREAM_ERROR;
                 state = (gz_statep)file;
                 strm = &(state->strm);
             
                 /* check that we're writing and that there's no error */
                 if (state->mode != GZ_WRITE || state->err != Z_OK)
            -        return 0;
            +        return Z_STREAM_ERROR;
             
                 /* make sure we have some buffer space */
                 if (state->size == 0 && gz_init(state) == -1)
            -        return 0;
            +        return state->err;
             
                 /* check for seek request */
                 if (state->seek) {
                     state->seek = 0;
                     if (gz_zero(state, state->skip) == -1)
            -            return 0;
            +            return state->err;
                 }
             
            -    /* consume whatever's left in the input buffer */
            -    if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
            -        return 0;
            -
            -    /* do the printf() into the input buffer, put length in len */
            -    size = (int)(state->size);
            -    state->in[size - 1] = 0;
            +    /* do the printf() into the input buffer, put length in len -- the input
            +       buffer is double-sized just for this function, so there is guaranteed to
            +       be state->size bytes available after the current contents */
            +    if (strm->avail_in == 0)
            +        strm->next_in = state->in;
            +    next = (char *)(state->in + (strm->next_in - state->in) + strm->avail_in);
            +    next[state->size - 1] = 0;
             #ifdef NO_vsnprintf
             #  ifdef HAS_vsprintf_void
            -    (void)vsprintf((char *)(state->in), format, va);
            -    for (len = 0; len < size; len++)
            -        if (state->in[len] == 0) break;
            +    (void)vsprintf(next, format, va);
            +    for (len = 0; len < state->size; len++)
            +        if (next[len] == 0) break;
             #  else
            -    len = vsprintf((char *)(state->in), format, va);
            +    len = vsprintf(next, format, va);
             #  endif
             #else
             #  ifdef HAS_vsnprintf_void
            -    (void)vsnprintf((char *)(state->in), size, format, va);
            -    len = strlen((char *)(state->in));
            +    (void)vsnprintf(next, state->size, format, va);
            +    len = strlen(next);
             #  else
            -    len = vsnprintf((char *)(state->in), size, format, va);
            +    len = vsnprintf(next, state->size, format, va);
             #  endif
             #endif
             
                 /* check that printf() results fit in buffer */
            -    if (len <= 0 || len >= (int)size || state->in[size - 1] != 0)
            +    if (len == 0 || (unsigned)len >= state->size || next[state->size - 1] != 0)
                     return 0;
             
            -    /* update buffer and position, defer compression until needed */
            -    strm->avail_in = (unsigned)len;
            -    strm->next_in = state->in;
            +    /* update buffer and position, compress first half if past that */
            +    strm->avail_in += (unsigned)len;
                 state->x.pos += len;
            +    if (strm->avail_in >= state->size) {
            +        left = strm->avail_in - state->size;
            +        strm->avail_in = state->size;
            +        if (gz_comp(state, Z_NO_FLUSH) == -1)
            +            return state->err;
            +        memcpy(state->in, state->in + state->size, left);
            +        strm->next_in = state->in;
            +        strm->avail_in = left;
            +    }
                 return len;
             }
             
            @@ -414,73 +493,82 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
                 int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
                     a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
             {
            -    int size, len;
            +    unsigned len, left;
            +    char *next;
                 gz_statep state;
                 z_streamp strm;
             
                 /* get internal structure */
                 if (file == NULL)
            -        return -1;
            +        return Z_STREAM_ERROR;
                 state = (gz_statep)file;
                 strm = &(state->strm);
             
                 /* check that can really pass pointer in ints */
                 if (sizeof(int) != sizeof(void *))
            -        return 0;
            +        return Z_STREAM_ERROR;
             
                 /* check that we're writing and that there's no error */
                 if (state->mode != GZ_WRITE || state->err != Z_OK)
            -        return 0;
            +        return Z_STREAM_ERROR;
             
                 /* make sure we have some buffer space */
                 if (state->size == 0 && gz_init(state) == -1)
            -        return 0;
            +        return state->error;
             
                 /* check for seek request */
                 if (state->seek) {
                     state->seek = 0;
                     if (gz_zero(state, state->skip) == -1)
            -            return 0;
            +            return state->error;
                 }
             
            -    /* consume whatever's left in the input buffer */
            -    if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
            -        return 0;
            -
            -    /* do the printf() into the input buffer, put length in len */
            -    size = (int)(state->size);
            -    state->in[size - 1] = 0;
            +    /* do the printf() into the input buffer, put length in len -- the input
            +       buffer is double-sized just for this function, so there is guaranteed to
            +       be state->size bytes available after the current contents */
            +    if (strm->avail_in == 0)
            +        strm->next_in = state->in;
            +    next = (char *)(strm->next_in + strm->avail_in);
            +    next[state->size - 1] = 0;
             #ifdef NO_snprintf
             #  ifdef HAS_sprintf_void
            -    sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8,
            -            a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
            +    sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12,
            +            a13, a14, a15, a16, a17, a18, a19, a20);
                 for (len = 0; len < size; len++)
            -        if (state->in[len] == 0) break;
            +        if (next[len] == 0)
            +            break;
             #  else
            -    len = sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8,
            -                  a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
            +    len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11,
            +                  a12, a13, a14, a15, a16, a17, a18, a19, a20);
             #  endif
             #else
             #  ifdef HAS_snprintf_void
            -    snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, a7, a8,
            -             a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
            -    len = strlen((char *)(state->in));
            +    snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9,
            +             a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
            +    len = strlen(next);
             #  else
            -    len = snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6,
            -                   a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18,
            -                   a19, a20);
            +    len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8,
            +                   a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
             #  endif
             #endif
             
                 /* check that printf() results fit in buffer */
            -    if (len <= 0 || len >= (int)size || state->in[size - 1] != 0)
            +    if (len == 0 || len >= state->size || next[state->size - 1] != 0)
                     return 0;
             
            -    /* update buffer and position, defer compression until needed */
            -    strm->avail_in = (unsigned)len;
            -    strm->next_in = state->in;
            +    /* update buffer and position, compress first half if past that */
            +    strm->avail_in += len;
                 state->x.pos += len;
            -    return len;
            +    if (strm->avail_in >= state->size) {
            +        left = strm->avail_in - state->size;
            +        strm->avail_in = state->size;
            +        if (gz_comp(state, Z_NO_FLUSH) == -1)
            +            return state->err;
            +        memcpy(state->in, state->in + state->size, left);
            +        strm->next_in = state->in;
            +        strm->avail_in = left;
            +    }
            +    return (int)len;
             }
             
             #endif
            @@ -494,7 +582,7 @@ int ZEXPORT gzflush(file, flush)
             
                 /* get internal structure */
                 if (file == NULL)
            -        return -1;
            +        return Z_STREAM_ERROR;
                 state = (gz_statep)file;
             
                 /* check that we're writing and that there's no error */
            @@ -509,11 +597,11 @@ int ZEXPORT gzflush(file, flush)
                 if (state->seek) {
                     state->seek = 0;
                     if (gz_zero(state, state->skip) == -1)
            -            return -1;
            +            return state->err;
                 }
             
                 /* compress remaining data with requested flush */
            -    gz_comp(state, flush);
            +    (void)gz_comp(state, flush);
                 return state->err;
             }
             
            @@ -544,13 +632,13 @@ int ZEXPORT gzsetparams(file, level, strategy)
                 if (state->seek) {
                     state->seek = 0;
                     if (gz_zero(state, state->skip) == -1)
            -            return -1;
            +            return state->err;
                 }
             
                 /* change compression parameters for subsequent input */
                 if (state->size) {
                     /* flush previous input with previous parameters before changing */
            -        if (strm->avail_in && gz_comp(state, Z_PARTIAL_FLUSH) == -1)
            +        if (strm->avail_in && gz_comp(state, Z_BLOCK) == -1)
                         return state->err;
                     deflateParams(strm, level, strategy);
                 }
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/infback.c b/jdk/src/java.base/share/native/libzip/zlib/infback.c
            similarity index 99%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/infback.c
            rename to jdk/src/java.base/share/native/libzip/zlib/infback.c
            index 7001b4bfe62..4c8283909c1 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/infback.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/infback.c
            @@ -23,7 +23,7 @@
              */
             
             /* infback.c -- inflate using a call-back interface
            - * Copyright (C) 1995-2011 Mark Adler
            + * Copyright (C) 1995-2016 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -85,7 +85,7 @@ int stream_size;
                 Tracev((stderr, "inflate: allocated\n"));
                 strm->state = (struct internal_state FAR *)state;
                 state->dmax = 32768U;
            -    state->wbits = windowBits;
            +    state->wbits = (uInt)windowBits;
                 state->wsize = 1U << windowBits;
                 state->window = window;
                 state->wnext = 0;
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.c b/jdk/src/java.base/share/native/libzip/zlib/inffast.c
            similarity index 86%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.c
            rename to jdk/src/java.base/share/native/libzip/zlib/inffast.c
            index 4b9cddd7040..4bfc995f4cc 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/inffast.c
            @@ -23,7 +23,7 @@
              */
             
             /* inffast.c -- fast decoding
            - * Copyright (C) 1995-2008, 2010, 2013 Mark Adler
            + * Copyright (C) 1995-2017 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -32,26 +32,9 @@
             #include "inflate.h"
             #include "inffast.h"
             
            -#ifndef ASMINF
            -
            -/* Allow machine dependent optimization for post-increment or pre-increment.
            -   Based on testing to date,
            -   Pre-increment preferred for:
            -   - PowerPC G3 (Adler)
            -   - MIPS R5000 (Randers-Pehrson)
            -   Post-increment preferred for:
            -   - none
            -   No measurable difference:
            -   - Pentium III (Anderson)
            -   - M68060 (Nikl)
            - */
            -#ifdef POSTINC
            -#  define OFF 0
            -#  define PUP(a) *(a)++
            +#ifdef ASMINF
            +#  pragma message("Assembler code may have bugs -- use at your own risk")
             #else
            -#  define OFF 1
            -#  define PUP(a) *++(a)
            -#endif
             
             /*
                Decode literal, length, and distance codes and write out the resulting
            @@ -120,9 +103,9 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
             
                 /* copy state to local variables */
                 state = (struct inflate_state FAR *)strm->state;
            -    in = strm->next_in - OFF;
            +    in = strm->next_in;
                 last = in + (strm->avail_in - 5);
            -    out = strm->next_out - OFF;
            +    out = strm->next_out;
                 beg = out - (start - strm->avail_out);
                 end = out + (strm->avail_out - 257);
             #ifdef INFLATE_STRICT
            @@ -143,9 +126,9 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
                    input data or output space */
                 do {
                     if (bits < 15) {
            -            hold += (unsigned long)(PUP(in)) << bits;
            +            hold += (unsigned long)(*in++) << bits;
                         bits += 8;
            -            hold += (unsigned long)(PUP(in)) << bits;
            +            hold += (unsigned long)(*in++) << bits;
                         bits += 8;
                     }
                     here = lcode[hold & lmask];
            @@ -158,14 +141,14 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
                         Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
                                 "inflate:         literal '%c'\n" :
                                 "inflate:         literal 0x%02x\n", here.val));
            -            PUP(out) = (unsigned char)(here.val);
            +            *out++ = (unsigned char)(here.val);
                     }
                     else if (op & 16) {                     /* length base */
                         len = (unsigned)(here.val);
                         op &= 15;                           /* number of extra bits */
                         if (op) {
                             if (bits < op) {
            -                    hold += (unsigned long)(PUP(in)) << bits;
            +                    hold += (unsigned long)(*in++) << bits;
                                 bits += 8;
                             }
                             len += (unsigned)hold & ((1U << op) - 1);
            @@ -174,9 +157,9 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
                         }
                         Tracevv((stderr, "inflate:         length %u\n", len));
                         if (bits < 15) {
            -                hold += (unsigned long)(PUP(in)) << bits;
            +                hold += (unsigned long)(*in++) << bits;
                             bits += 8;
            -                hold += (unsigned long)(PUP(in)) << bits;
            +                hold += (unsigned long)(*in++) << bits;
                             bits += 8;
                         }
                         here = dcode[hold & dmask];
            @@ -189,10 +172,10 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
                             dist = (unsigned)(here.val);
                             op &= 15;                       /* number of extra bits */
                             if (bits < op) {
            -                    hold += (unsigned long)(PUP(in)) << bits;
            +                    hold += (unsigned long)(*in++) << bits;
                                 bits += 8;
                                 if (bits < op) {
            -                        hold += (unsigned long)(PUP(in)) << bits;
            +                        hold += (unsigned long)(*in++) << bits;
                                     bits += 8;
                                 }
                             }
            @@ -220,30 +203,30 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
             #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
                                     if (len <= op - whave) {
                                         do {
            -                                PUP(out) = 0;
            +                                *out++ = 0;
                                         } while (--len);
                                         continue;
                                     }
                                     len -= op - whave;
                                     do {
            -                            PUP(out) = 0;
            +                            *out++ = 0;
                                     } while (--op > whave);
                                     if (op == 0) {
                                         from = out - dist;
                                         do {
            -                                PUP(out) = PUP(from);
            +                                *out++ = *from++;
                                         } while (--len);
                                         continue;
                                     }
             #endif
                                 }
            -                    from = window - OFF;
            +                    from = window;
                                 if (wnext == 0) {           /* very common case */
                                     from += wsize - op;
                                     if (op < len) {         /* some from window */
                                         len -= op;
                                         do {
            -                                PUP(out) = PUP(from);
            +                                *out++ = *from++;
                                         } while (--op);
                                         from = out - dist;  /* rest from output */
                                     }
            @@ -254,14 +237,14 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
                                     if (op < len) {         /* some from end of window */
                                         len -= op;
                                         do {
            -                                PUP(out) = PUP(from);
            +                                *out++ = *from++;
                                         } while (--op);
            -                            from = window - OFF;
            +                            from = window;
                                         if (wnext < len) {  /* some from start of window */
                                             op = wnext;
                                             len -= op;
                                             do {
            -                                    PUP(out) = PUP(from);
            +                                    *out++ = *from++;
                                             } while (--op);
                                             from = out - dist;      /* rest from output */
                                         }
            @@ -272,35 +255,35 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
                                     if (op < len) {         /* some from window */
                                         len -= op;
                                         do {
            -                                PUP(out) = PUP(from);
            +                                *out++ = *from++;
                                         } while (--op);
                                         from = out - dist;  /* rest from output */
                                     }
                                 }
                                 while (len > 2) {
            -                        PUP(out) = PUP(from);
            -                        PUP(out) = PUP(from);
            -                        PUP(out) = PUP(from);
            +                        *out++ = *from++;
            +                        *out++ = *from++;
            +                        *out++ = *from++;
                                     len -= 3;
                                 }
                                 if (len) {
            -                        PUP(out) = PUP(from);
            +                        *out++ = *from++;
                                     if (len > 1)
            -                            PUP(out) = PUP(from);
            +                            *out++ = *from++;
                                 }
                             }
                             else {
                                 from = out - dist;          /* copy direct from output */
                                 do {                        /* minimum length is three */
            -                        PUP(out) = PUP(from);
            -                        PUP(out) = PUP(from);
            -                        PUP(out) = PUP(from);
            +                        *out++ = *from++;
            +                        *out++ = *from++;
            +                        *out++ = *from++;
                                     len -= 3;
                                 } while (len > 2);
                                 if (len) {
            -                        PUP(out) = PUP(from);
            +                        *out++ = *from++;
                                     if (len > 1)
            -                            PUP(out) = PUP(from);
            +                            *out++ = *from++;
                                 }
                             }
                         }
            @@ -337,8 +320,8 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
                 hold &= (1U << bits) - 1;
             
                 /* update state and return */
            -    strm->next_in = in + OFF;
            -    strm->next_out = out + OFF;
            +    strm->next_in = in;
            +    strm->next_out = out;
                 strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
                 strm->avail_out = (unsigned)(out < end ?
                                              257 + (end - out) : 257 - (out - end));
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.h b/jdk/src/java.base/share/native/libzip/zlib/inffast.h
            similarity index 100%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.h
            rename to jdk/src/java.base/share/native/libzip/zlib/inffast.h
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffixed.h b/jdk/src/java.base/share/native/libzip/zlib/inffixed.h
            similarity index 100%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffixed.h
            rename to jdk/src/java.base/share/native/libzip/zlib/inffixed.h
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.c b/jdk/src/java.base/share/native/libzip/zlib/inflate.c
            similarity index 94%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.c
            rename to jdk/src/java.base/share/native/libzip/zlib/inflate.c
            index b159c1543a6..ca904e74427 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/inflate.c
            @@ -23,7 +23,7 @@
              */
             
             /* inflate.c -- zlib decompression
            - * Copyright (C) 1995-2012 Mark Adler
            + * Copyright (C) 1995-2016 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -116,6 +116,7 @@
             #endif
             
             /* function prototypes */
            +local int inflateStateCheck OF((z_streamp strm));
             local void fixedtables OF((struct inflate_state FAR *state));
             local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
                                        unsigned copy));
            @@ -125,12 +126,26 @@ local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
             local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
                                           unsigned len));
             
            +local int inflateStateCheck(strm)
            +z_streamp strm;
            +{
            +    struct inflate_state FAR *state;
            +    if (strm == Z_NULL ||
            +        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
            +        return 1;
            +    state = (struct inflate_state FAR *)strm->state;
            +    if (state == Z_NULL || state->strm != strm ||
            +        state->mode < HEAD || state->mode > SYNC)
            +        return 1;
            +    return 0;
            +}
            +
             int ZEXPORT inflateResetKeep(strm)
             z_streamp strm;
             {
                 struct inflate_state FAR *state;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
                 strm->total_in = strm->total_out = state->total = 0;
                 strm->msg = Z_NULL;
            @@ -155,7 +170,7 @@ z_streamp strm;
             {
                 struct inflate_state FAR *state;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
                 state->wsize = 0;
                 state->whave = 0;
            @@ -171,7 +186,7 @@ int windowBits;
                 struct inflate_state FAR *state;
             
                 /* get the state */
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
             
                 /* extract wrap request from windowBits parameter */
            @@ -180,7 +195,7 @@ int windowBits;
                     windowBits = -windowBits;
                 }
                 else {
            -        wrap = (windowBits >> 4) + 1;
            +        wrap = (windowBits >> 4) + 5;
             #ifdef GUNZIP
                     if (windowBits < 48)
                         windowBits &= 15;
            @@ -234,7 +249,9 @@ int stream_size;
                 if (state == Z_NULL) return Z_MEM_ERROR;
                 Tracev((stderr, "inflate: allocated\n"));
                 strm->state = (struct internal_state FAR *)state;
            +    state->strm = strm;
                 state->window = Z_NULL;
            +    state->mode = HEAD;     /* to pass state test in inflateReset2() */
                 ret = inflateReset2(strm, windowBits);
                 if (ret != Z_OK) {
                     ZFREE(strm, state);
            @@ -258,17 +275,17 @@ int value;
             {
                 struct inflate_state FAR *state;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
                 if (bits < 0) {
                     state->hold = 0;
                     state->bits = 0;
                     return Z_OK;
                 }
            -    if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
            +    if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR;
                 value &= (1L << bits) - 1;
            -    state->hold += value << state->bits;
            -    state->bits += bits;
            +    state->hold += (unsigned)value << state->bits;
            +    state->bits += (uInt)bits;
                 return Z_OK;
             }
             
            @@ -649,7 +666,7 @@ int flush;
                 static const unsigned short order[19] = /* permutation of code lengths */
                     {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
             
            -    if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
            +    if (inflateStateCheck(strm) || strm->next_out == Z_NULL ||
                     (strm->next_in == Z_NULL && strm->avail_in != 0))
                     return Z_STREAM_ERROR;
             
            @@ -669,6 +686,8 @@ int flush;
                         NEEDBITS(16);
             #ifdef GUNZIP
                         if ((state->wrap & 2) && hold == 0x8b1f) {  /* gzip header */
            +                if (state->wbits == 0)
            +                    state->wbits = 15;
                             state->check = crc32(0L, Z_NULL, 0);
                             CRC2(state->check, hold);
                             INITBITS();
            @@ -696,7 +715,7 @@ int flush;
                         len = BITS(4) + 8;
                         if (state->wbits == 0)
                             state->wbits = len;
            -            else if (len > state->wbits) {
            +            if (len > 15 || len > state->wbits) {
                             strm->msg = (char *)"invalid window size";
                             state->mode = BAD;
                             break;
            @@ -723,14 +742,16 @@ int flush;
                         }
                         if (state->head != Z_NULL)
                             state->head->text = (int)((hold >> 8) & 1);
            -            if (state->flags & 0x0200) CRC2(state->check, hold);
            +            if ((state->flags & 0x0200) && (state->wrap & 4))
            +                CRC2(state->check, hold);
                         INITBITS();
                         state->mode = TIME;
                     case TIME:
                         NEEDBITS(32);
                         if (state->head != Z_NULL)
                             state->head->time = hold;
            -            if (state->flags & 0x0200) CRC4(state->check, hold);
            +            if ((state->flags & 0x0200) && (state->wrap & 4))
            +                CRC4(state->check, hold);
                         INITBITS();
                         state->mode = OS;
                     case OS:
            @@ -739,7 +760,8 @@ int flush;
                             state->head->xflags = (int)(hold & 0xff);
                             state->head->os = (int)(hold >> 8);
                         }
            -            if (state->flags & 0x0200) CRC2(state->check, hold);
            +            if ((state->flags & 0x0200) && (state->wrap & 4))
            +                CRC2(state->check, hold);
                         INITBITS();
                         state->mode = EXLEN;
                     case EXLEN:
            @@ -748,7 +770,8 @@ int flush;
                             state->length = (unsigned)(hold);
                             if (state->head != Z_NULL)
                                 state->head->extra_len = (unsigned)hold;
            -                if (state->flags & 0x0200) CRC2(state->check, hold);
            +                if ((state->flags & 0x0200) && (state->wrap & 4))
            +                    CRC2(state->check, hold);
                             INITBITS();
                         }
                         else if (state->head != Z_NULL)
            @@ -766,7 +789,7 @@ int flush;
                                             len + copy > state->head->extra_max ?
                                             state->head->extra_max - len : copy);
                                 }
            -                    if (state->flags & 0x0200)
            +                    if ((state->flags & 0x0200) && (state->wrap & 4))
                                     state->check = crc32(state->check, next, copy);
                                 have -= copy;
                                 next += copy;
            @@ -785,9 +808,9 @@ int flush;
                                 if (state->head != Z_NULL &&
                                         state->head->name != Z_NULL &&
                                         state->length < state->head->name_max)
            -                        state->head->name[state->length++] = len;
            +                        state->head->name[state->length++] = (Bytef)len;
                             } while (len && copy < have);
            -                if (state->flags & 0x0200)
            +                if ((state->flags & 0x0200) && (state->wrap & 4))
                                 state->check = crc32(state->check, next, copy);
                             have -= copy;
                             next += copy;
            @@ -806,9 +829,9 @@ int flush;
                                 if (state->head != Z_NULL &&
                                         state->head->comment != Z_NULL &&
                                         state->length < state->head->comm_max)
            -                        state->head->comment[state->length++] = len;
            +                        state->head->comment[state->length++] = (Bytef)len;
                             } while (len && copy < have);
            -                if (state->flags & 0x0200)
            +                if ((state->flags & 0x0200) && (state->wrap & 4))
                                 state->check = crc32(state->check, next, copy);
                             have -= copy;
                             next += copy;
            @@ -820,7 +843,7 @@ int flush;
                     case HCRC:
                         if (state->flags & 0x0200) {
                             NEEDBITS(16);
            -                if (hold != (state->check & 0xffff)) {
            +                if ((state->wrap & 4) && hold != (state->check & 0xffff)) {
                                 strm->msg = (char *)"header crc mismatch";
                                 state->mode = BAD;
                                 break;
            @@ -1201,11 +1224,11 @@ int flush;
                             out -= left;
                             strm->total_out += out;
                             state->total += out;
            -                if (out)
            +                if ((state->wrap & 4) && out)
                                 strm->adler = state->check =
                                     UPDATE(state->check, put - out, out);
                             out = left;
            -                if ((
            +                if ((state->wrap & 4) && (
             #ifdef GUNZIP
                                  state->flags ? hold :
             #endif
            @@ -1264,10 +1287,10 @@ int flush;
                 strm->total_in += in;
                 strm->total_out += out;
                 state->total += out;
            -    if (state->wrap && out)
            +    if ((state->wrap & 4) && out)
                     strm->adler = state->check =
                         UPDATE(state->check, strm->next_out - out, out);
            -    strm->data_type = state->bits + (state->last ? 64 : 0) +
            +    strm->data_type = (int)state->bits + (state->last ? 64 : 0) +
                                   (state->mode == TYPE ? 128 : 0) +
                                   (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
                 if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
            @@ -1279,7 +1302,7 @@ int ZEXPORT inflateEnd(strm)
             z_streamp strm;
             {
                 struct inflate_state FAR *state;
            -    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
            +    if (inflateStateCheck(strm))
                     return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
                 if (state->window != Z_NULL) ZFREE(strm, state->window);
            @@ -1297,7 +1320,7 @@ uInt *dictLength;
                 struct inflate_state FAR *state;
             
                 /* check state */
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
             
                 /* copy dictionary */
            @@ -1322,7 +1345,7 @@ uInt dictLength;
                 int ret;
             
                 /* check state */
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
                 if (state->wrap != 0 && state->mode != DICT)
                     return Z_STREAM_ERROR;
            @@ -1354,7 +1377,7 @@ gz_headerp head;
                 struct inflate_state FAR *state;
             
                 /* check state */
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
                 if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
             
            @@ -1407,7 +1430,7 @@ z_streamp strm;
                 struct inflate_state FAR *state;
             
                 /* check parameters */
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
                 if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
             
            @@ -1454,7 +1477,7 @@ z_streamp strm;
             {
                 struct inflate_state FAR *state;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
                 return state->mode == STORED && state->bits == 0;
             }
            @@ -1469,8 +1492,7 @@ z_streamp source;
                 unsigned wsize;
             
                 /* check input */
            -    if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
            -        source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
            +    if (inflateStateCheck(source) || dest == Z_NULL)
                     return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)source->state;
             
            @@ -1491,6 +1513,7 @@ z_streamp source;
                 /* copy state */
                 zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
                 zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
            +    copy->strm = dest;
                 if (state->lencode >= state->codes &&
                     state->lencode <= state->codes + ENOUGH - 1) {
                     copy->lencode = copy->codes + (state->lencode - state->codes);
            @@ -1512,25 +1535,51 @@ int subvert;
             {
                 struct inflate_state FAR *state;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
                 state = (struct inflate_state FAR *)strm->state;
            -    state->sane = !subvert;
             #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
            +    state->sane = !subvert;
                 return Z_OK;
             #else
            +    (void)subvert;
                 state->sane = 1;
                 return Z_DATA_ERROR;
             #endif
             }
             
            +int ZEXPORT inflateValidate(strm, check)
            +z_streamp strm;
            +int check;
            +{
            +    struct inflate_state FAR *state;
            +
            +    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
            +    state = (struct inflate_state FAR *)strm->state;
            +    if (check)
            +        state->wrap |= 4;
            +    else
            +        state->wrap &= ~4;
            +    return Z_OK;
            +}
            +
             long ZEXPORT inflateMark(strm)
             z_streamp strm;
             {
                 struct inflate_state FAR *state;
             
            -    if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
            +    if (inflateStateCheck(strm))
            +        return -(1L << 16);
                 state = (struct inflate_state FAR *)strm->state;
            -    return ((long)(state->back) << 16) +
            +    return (long)(((unsigned long)((long)state->back)) << 16) +
                     (state->mode == COPY ? state->length :
                         (state->mode == MATCH ? state->was - state->length : 0));
             }
            +
            +unsigned long ZEXPORT inflateCodesUsed(strm)
            +z_streamp strm;
            +{
            +    struct inflate_state FAR *state;
            +    if (inflateStateCheck(strm)) return (unsigned long)-1;
            +    state = (struct inflate_state FAR *)strm->state;
            +    return (unsigned long)(state->next - state->codes);
            +}
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.h b/jdk/src/java.base/share/native/libzip/zlib/inflate.h
            similarity index 94%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.h
            rename to jdk/src/java.base/share/native/libzip/zlib/inflate.h
            index 090cb8a792f..060f7fc7a93 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.h
            +++ b/jdk/src/java.base/share/native/libzip/zlib/inflate.h
            @@ -23,7 +23,7 @@
              */
             
             /* inflate.h -- internal inflate state definition
            - * Copyright (C) 1995-2009 Mark Adler
            + * Copyright (C) 1995-2016 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -42,7 +42,7 @@
             
             /* Possible inflate modes between inflate() calls */
             typedef enum {
            -    HEAD,       /* i: waiting for magic header */
            +    HEAD = 16180,   /* i: waiting for magic header */
                 FLAGS,      /* i: waiting for method and flags (gzip) */
                 TIME,       /* i: waiting for modification time (gzip) */
                 OS,         /* i: waiting for extra flags and operating system (gzip) */
            @@ -101,11 +101,14 @@ typedef enum {
                     CHECK -> LENGTH -> DONE
              */
             
            -/* state maintained between inflate() calls.  Approximately 10K bytes. */
            +/* State maintained between inflate() calls -- approximately 7K bytes, not
            +   including the allocated sliding window, which is up to 32K bytes. */
             struct inflate_state {
            +    z_streamp strm;             /* pointer back to this zlib stream */
                 inflate_mode mode;          /* current inflate mode */
                 int last;                   /* true if processing last block */
            -    int wrap;                   /* bit 0 true for zlib, bit 1 true for gzip */
            +    int wrap;                   /* bit 0 true for zlib, bit 1 true for gzip,
            +                                   bit 2 true to validate check value */
                 int havedict;               /* true if dictionary provided */
                 int flags;                  /* gzip header method and flags (0 if zlib) */
                 unsigned dmax;              /* zlib header max distance (INFLATE_STRICT) */
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.c b/jdk/src/java.base/share/native/libzip/zlib/inftrees.c
            similarity index 96%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.c
            rename to jdk/src/java.base/share/native/libzip/zlib/inftrees.c
            index c4b0bf2dd4a..5b882ed0df6 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/inftrees.c
            @@ -23,7 +23,7 @@
              */
             
             /* inftrees.c -- generate Huffman trees for efficient decoding
            - * Copyright (C) 1995-2013 Mark Adler
            + * Copyright (C) 1995-2017 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -33,7 +33,7 @@
             #define MAXBITS 15
             
             const char inflate_copyright[] =
            -   " inflate 1.2.8 Copyright 1995-2013 Mark Adler ";
            +   " inflate 1.2.11 Copyright 1995-2017 Mark Adler ";
             /*
               If you use the zlib library in a product, an acknowledgment is welcome
               in the documentation of your product. If for some reason you cannot
            @@ -78,7 +78,7 @@ unsigned short FAR *work;
                 code FAR *next;             /* next available space in table */
                 const unsigned short FAR *base;     /* base value table to use */
                 const unsigned short FAR *extra;    /* extra bits table to use */
            -    int end;                    /* use base and extra for symbol > end */
            +    unsigned match;             /* use base and extra for symbol >= match */
                 unsigned short count[MAXBITS+1];    /* number of codes of each length */
                 unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
                 static const unsigned short lbase[31] = { /* Length codes 257..285 base */
            @@ -86,7 +86,7 @@ unsigned short FAR *work;
                     35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
                 static const unsigned short lext[31] = { /* Length codes 257..285 extra */
                     16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
            -        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78};
            +        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 77, 202};
                 static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
                     1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
                     257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
            @@ -205,19 +205,17 @@ unsigned short FAR *work;
                 switch (type) {
                 case CODES:
                     base = extra = work;    /* dummy value--not used */
            -        end = 19;
            +        match = 20;
                     break;
                 case LENS:
                     base = lbase;
            -        base -= 257;
                     extra = lext;
            -        extra -= 257;
            -        end = 256;
            +        match = 257;
                     break;
            -    default:            /* DISTS */
            +    default:    /* DISTS */
                     base = dbase;
                     extra = dext;
            -        end = -1;
            +        match = 0;
                 }
             
                 /* initialize state for loop */
            @@ -240,13 +238,13 @@ unsigned short FAR *work;
                 for (;;) {
                     /* create table entry */
                     here.bits = (unsigned char)(len - drop);
            -        if ((int)(work[sym]) < end) {
            +        if (work[sym] + 1U < match) {
                         here.op = (unsigned char)0;
                         here.val = work[sym];
                     }
            -        else if ((int)(work[sym]) > end) {
            -            here.op = (unsigned char)(extra[work[sym]]);
            -            here.val = base[work[sym]];
            +        else if (work[sym] >= match) {
            +            here.op = (unsigned char)(extra[work[sym] - match]);
            +            here.val = base[work[sym] - match];
                     }
                     else {
                         here.op = (unsigned char)(32 + 64);         /* end of block */
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.h b/jdk/src/java.base/share/native/libzip/zlib/inftrees.h
            similarity index 100%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.h
            rename to jdk/src/java.base/share/native/libzip/zlib/inftrees.h
            diff --git a/jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java b/jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java
            new file mode 100644
            index 00000000000..d5615a62140
            --- /dev/null
            +++ b/jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java
            @@ -0,0 +1,81 @@
            +(1) renamed adler32.c -> zadler32.c, zcrc32c -> zcrc32.c
            +
            +(2) zconf.h:
            +    - added _LP64 to make uLong a 32-bit int on 64-bit platform
            +    uLong -> 32-bit int
            +
            +--------------------------
            +35,37d10
            +< /* for _LP64 */
            +< #include 
            +<
            +421,424d393
            +<
            +< #ifdef _LP64
            +< typedef unsigned int  uLong;  /* 32 bits or more */
            +< #else
            +426d394
            +< #endif
            +--------------------------
            +
            +(3) updated crc32.c/crc32(), crc32_z()
            +   unsigned long      -> uLong
            +
            +--------------------------
            +
            +226,227c202,203
            +< uLong ZEXPORT crc32_z(crc, buf, len)
            +<     uLong crc;
            +---
            +> unsigned long ZEXPORT crc32_z(crc, buf, len)
            +>     unsigned long crc;
            +244c220
            +<             return (uLong)crc32_little(crc, buf, len);
            +---
            +>             return crc32_little(crc, buf, len);
            +246c222
            +<             return (uLong)crc32_big(crc, buf, len);
            +---
            +>             return crc32_big(crc, buf, len);
            +261,262c237,238
            +< uLong ZEXPORT crc32(crc, buf, len)
            +<     uLong crc;
            +---
            +> unsigned long ZEXPORT crc32(crc, buf, len)
            +>     unsigned long crc;
            +
            +--------------------------
            +
            +(4) gzread.c
            +
            +--------------------------
            +343c319
            +<             n = (unsigned)len;
            +---
            +>             n = len;
            +424c400
            +<     len = (unsigned)gz_read(state, buf, len);
            +---
            +>     len = gz_read(state, buf, len);
            +496c472
            +<     ret = (int)gz_read(state, buf, 1);
            +---
            +>     ret = gz_read(state, buf, 1);
            +--------------------------
            +
            +(5) gzwrite.c
            +
            +--------------------------
            +236c212
            +<                 copy = (unsigned)len;
            +---
            +>                 copy = len;
            +256c232
            +<                 n = (unsigned)len;
            +---
            +>                 n = len;
            +--------------------------
            +
            +
            +
            +  
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.c b/jdk/src/java.base/share/native/libzip/zlib/trees.c
            similarity index 95%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.c
            rename to jdk/src/java.base/share/native/libzip/zlib/trees.c
            index e4ecffea093..c3703c0e763 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/trees.c
            @@ -23,7 +23,7 @@
              */
             
             /* trees.c -- output deflated data using Huffman coding
            - * Copyright (C) 1995-2012 Jean-loup Gailly
            + * Copyright (C) 1995-2017 Jean-loup Gailly
              * detect_data_type() function provided freely by Cosmin Truta, 2006
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
            @@ -60,7 +60,7 @@
             
             #include "deflate.h"
             
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
             #  include 
             #endif
             
            @@ -146,13 +146,13 @@ struct static_tree_desc_s {
                 int     max_length;          /* max bit length for the codes */
             };
             
            -local static_tree_desc  static_l_desc =
            +local const static_tree_desc  static_l_desc =
             {static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
             
            -local static_tree_desc  static_d_desc =
            +local const static_tree_desc  static_d_desc =
             {static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS};
             
            -local static_tree_desc  static_bl_desc =
            +local const static_tree_desc  static_bl_desc =
             {(const ct_data *)0, extra_blbits, 0,   BL_CODES, MAX_BL_BITS};
             
             /* ===========================================================================
            @@ -176,18 +176,16 @@ local int  detect_data_type OF((deflate_state *s));
             local unsigned bi_reverse OF((unsigned value, int length));
             local void bi_windup      OF((deflate_state *s));
             local void bi_flush       OF((deflate_state *s));
            -local void copy_block     OF((deflate_state *s, charf *buf, unsigned len,
            -                              int header));
             
             #ifdef GEN_TREES_H
             local void gen_trees_header OF((void));
             #endif
             
            -#ifndef DEBUG
            +#ifndef ZLIB_DEBUG
             #  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
                /* Send a code of the given tree. c and tree must not have side effects */
             
            -#else /* DEBUG */
            +#else /* !ZLIB_DEBUG */
             #  define send_code(s, c, tree) \
                  { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
                    send_bits(s, tree[c].Code, tree[c].Len); }
            @@ -206,7 +204,7 @@ local void gen_trees_header OF((void));
              * Send a value on a given number of bits.
              * IN assertion: length <= 16 and value fits in length bits.
              */
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
             local void send_bits      OF((deflate_state *s, int value, int length));
             
             local void send_bits(s, value, length)
            @@ -232,12 +230,12 @@ local void send_bits(s, value, length)
                     s->bi_valid += length;
                 }
             }
            -#else /* !DEBUG */
            +#else /* !ZLIB_DEBUG */
             
             #define send_bits(s, value, length) \
             { int len = length;\
               if (s->bi_valid > (int)Buf_size - len) {\
            -    int val = value;\
            +    int val = (int)value;\
                 s->bi_buf |= (ush)val << s->bi_valid;\
                 put_short(s, s->bi_buf);\
                 s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
            @@ -247,7 +245,7 @@ local void send_bits(s, value, length)
                 s->bi_valid += len;\
               }\
             }
            -#endif /* DEBUG */
            +#endif /* ZLIB_DEBUG */
             
             
             /* the arguments must not have side effects */
            @@ -341,7 +339,7 @@ local void tr_static_init()
              * Genererate the file trees.h describing the static trees.
              */
             #ifdef GEN_TREES_H
            -#  ifndef DEBUG
            +#  ifndef ZLIB_DEBUG
             #    include 
             #  endif
             
            @@ -418,7 +416,7 @@ void ZLIB_INTERNAL _tr_init(s)
             
                 s->bi_buf = 0;
                 s->bi_valid = 0;
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
                 s->compressed_len = 0L;
                 s->bits_sent = 0L;
             #endif
            @@ -546,12 +544,12 @@ local void gen_bitlen(s, desc)
                     xbits = 0;
                     if (n >= base) xbits = extra[n-base];
                     f = tree[n].Freq;
            -        s->opt_len += (ulg)f * (bits + xbits);
            -        if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
            +        s->opt_len += (ulg)f * (unsigned)(bits + xbits);
            +        if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits);
                 }
                 if (overflow == 0) return;
             
            -    Trace((stderr,"\nbit length overflow\n"));
            +    Tracev((stderr,"\nbit length overflow\n"));
                 /* This happens for example on obj2 and pic of the Calgary corpus */
             
                 /* Find the first bit length which could increase: */
            @@ -578,9 +576,8 @@ local void gen_bitlen(s, desc)
                         m = s->heap[--h];
                         if (m > max_code) continue;
                         if ((unsigned) tree[m].Len != (unsigned) bits) {
            -                Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
            -                s->opt_len += ((long)bits - (long)tree[m].Len)
            -                              *(long)tree[m].Freq;
            +                Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
            +                s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
                             tree[m].Len = (ush)bits;
                         }
                         n--;
            @@ -602,7 +599,7 @@ local void gen_codes (tree, max_code, bl_count)
                 ushf *bl_count;            /* number of codes at each bit length */
             {
                 ush next_code[MAX_BITS+1]; /* next code value for each bit length */
            -    ush code = 0;              /* running code value */
            +    unsigned code = 0;         /* running code value */
                 int bits;                  /* bit index */
                 int n;                     /* code index */
             
            @@ -610,7 +607,8 @@ local void gen_codes (tree, max_code, bl_count)
                  * without bit reversal.
                  */
                 for (bits = 1; bits <= MAX_BITS; bits++) {
            -        next_code[bits] = code = (code + bl_count[bits-1]) << 1;
            +        code = (code + bl_count[bits-1]) << 1;
            +        next_code[bits] = (ush)code;
                 }
                 /* Check that the bit counts in bl_count are consistent. The last code
                  * must be all ones.
            @@ -623,7 +621,7 @@ local void gen_codes (tree, max_code, bl_count)
                     int len = tree[n].Len;
                     if (len == 0) continue;
                     /* Now reverse the bits */
            -        tree[n].Code = bi_reverse(next_code[len]++, len);
            +        tree[n].Code = (ush)bi_reverse(next_code[len]++, len);
             
                     Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
                          n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
            @@ -845,7 +843,7 @@ local int build_bl_tree(s)
                     if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
                 }
                 /* Update opt_len to include the bit length tree and counts */
            -    s->opt_len += 3*(max_blindex+1) + 5+5+4;
            +    s->opt_len += 3*((ulg)max_blindex+1) + 5+5+4;
                 Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
                         s->opt_len, s->static_len));
             
            @@ -893,11 +891,17 @@ void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
                 int last;         /* one if this is the last block for a file */
             {
                 send_bits(s, (STORED_BLOCK<<1)+last, 3);    /* send block type */
            -#ifdef DEBUG
            +    bi_windup(s);        /* align on byte boundary */
            +    put_short(s, (ush)stored_len);
            +    put_short(s, (ush)~stored_len);
            +    zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
            +    s->pending += stored_len;
            +#ifdef ZLIB_DEBUG
                 s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
                 s->compressed_len += (stored_len + 4) << 3;
            +    s->bits_sent += 2*16;
            +    s->bits_sent += stored_len<<3;
             #endif
            -    copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
             }
             
             /* ===========================================================================
            @@ -918,7 +922,7 @@ void ZLIB_INTERNAL _tr_align(s)
             {
                 send_bits(s, STATIC_TREES<<1, 3);
                 send_code(s, END_BLOCK, static_ltree);
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
                 s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
             #endif
                 bi_flush(s);
            @@ -926,7 +930,7 @@ void ZLIB_INTERNAL _tr_align(s)
             
             /* ===========================================================================
              * Determine the best encoding for the current block: dynamic trees, static
            - * trees or store, and output the encoded block to the zip file.
            + * trees or store, and write out the encoded block.
              */
             void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
                 deflate_state *s;
            @@ -998,7 +1002,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
                     send_bits(s, (STATIC_TREES<<1)+last, 3);
                     compress_block(s, (const ct_data *)static_ltree,
                                    (const ct_data *)static_dtree);
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
                     s->compressed_len += 3 + s->static_len;
             #endif
                 } else {
            @@ -1007,7 +1011,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
                                    max_blindex+1);
                     compress_block(s, (const ct_data *)s->dyn_ltree,
                                    (const ct_data *)s->dyn_dtree);
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
                     s->compressed_len += 3 + s->opt_len;
             #endif
                 }
            @@ -1019,7 +1023,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
             
                 if (last) {
                     bi_windup(s);
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
                     s->compressed_len += 7;  /* align on byte boundary */
             #endif
                 }
            @@ -1114,7 +1118,7 @@ local void compress_block(s, ltree, dtree)
                         send_code(s, code, dtree);       /* send the distance code */
                         extra = extra_dbits[code];
                         if (extra != 0) {
            -                dist -= base_dist[code];
            +                dist -= (unsigned)base_dist[code];
                             send_bits(s, dist, extra);   /* send the extra distance bits */
                         }
                     } /* literal or match pair ? */
            @@ -1217,34 +1221,7 @@ local void bi_windup(s)
                 }
                 s->bi_buf = 0;
                 s->bi_valid = 0;
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
                 s->bits_sent = (s->bits_sent+7) & ~7;
             #endif
             }
            -
            -/* ===========================================================================
            - * Copy a stored block, storing first the length and its
            - * one's complement if requested.
            - */
            -local void copy_block(s, buf, len, header)
            -    deflate_state *s;
            -    charf    *buf;    /* the input data */
            -    unsigned len;     /* its length */
            -    int      header;  /* true if block header must be written */
            -{
            -    bi_windup(s);        /* align on byte boundary */
            -
            -    if (header) {
            -        put_short(s, (ush)len);
            -        put_short(s, (ush)~len);
            -#ifdef DEBUG
            -        s->bits_sent += 2*16;
            -#endif
            -    }
            -#ifdef DEBUG
            -    s->bits_sent += (ulg)len<<3;
            -#endif
            -    while (len--) {
            -        put_byte(s, *buf++);
            -    }
            -}
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.h b/jdk/src/java.base/share/native/libzip/zlib/trees.h
            similarity index 100%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.h
            rename to jdk/src/java.base/share/native/libzip/zlib/trees.h
            diff --git a/jdk/src/java.base/share/native/libzip/zlib/uncompr.c b/jdk/src/java.base/share/native/libzip/zlib/uncompr.c
            new file mode 100644
            index 00000000000..bd4766ffbf4
            --- /dev/null
            +++ b/jdk/src/java.base/share/native/libzip/zlib/uncompr.c
            @@ -0,0 +1,117 @@
            +/*
            + * 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.
            + */
            +
            +/* uncompr.c -- decompress a memory buffer
            + * Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler
            + * For conditions of distribution and use, see copyright notice in zlib.h
            + */
            +
            +/* @(#) $Id$ */
            +
            +#define ZLIB_INTERNAL
            +#include "zlib.h"
            +
            +/* ===========================================================================
            +     Decompresses the source buffer into the destination buffer.  *sourceLen is
            +   the byte length of the source buffer. Upon entry, *destLen is the total size
            +   of the destination buffer, which must be large enough to hold the entire
            +   uncompressed data. (The size of the uncompressed data must have been saved
            +   previously by the compressor and transmitted to the decompressor by some
            +   mechanism outside the scope of this compression library.) Upon exit,
            +   *destLen is the size of the decompressed data and *sourceLen is the number
            +   of source bytes consumed. Upon return, source + *sourceLen points to the
            +   first unused input byte.
            +
            +     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough
            +   memory, Z_BUF_ERROR if there was not enough room in the output buffer, or
            +   Z_DATA_ERROR if the input data was corrupted, including if the input data is
            +   an incomplete zlib stream.
            +*/
            +int ZEXPORT uncompress2 (dest, destLen, source, sourceLen)
            +    Bytef *dest;
            +    uLongf *destLen;
            +    const Bytef *source;
            +    uLong *sourceLen;
            +{
            +    z_stream stream;
            +    int err;
            +    const uInt max = (uInt)-1;
            +    uLong len, left;
            +    Byte buf[1];    /* for detection of incomplete stream when *destLen == 0 */
            +
            +    len = *sourceLen;
            +    if (*destLen) {
            +        left = *destLen;
            +        *destLen = 0;
            +    }
            +    else {
            +        left = 1;
            +        dest = buf;
            +    }
            +
            +    stream.next_in = (z_const Bytef *)source;
            +    stream.avail_in = 0;
            +    stream.zalloc = (alloc_func)0;
            +    stream.zfree = (free_func)0;
            +    stream.opaque = (voidpf)0;
            +
            +    err = inflateInit(&stream);
            +    if (err != Z_OK) return err;
            +
            +    stream.next_out = dest;
            +    stream.avail_out = 0;
            +
            +    do {
            +        if (stream.avail_out == 0) {
            +            stream.avail_out = left > (uLong)max ? max : (uInt)left;
            +            left -= stream.avail_out;
            +        }
            +        if (stream.avail_in == 0) {
            +            stream.avail_in = len > (uLong)max ? max : (uInt)len;
            +            len -= stream.avail_in;
            +        }
            +        err = inflate(&stream, Z_NO_FLUSH);
            +    } while (err == Z_OK);
            +
            +    *sourceLen -= len + stream.avail_in;
            +    if (dest != buf)
            +        *destLen = stream.total_out;
            +    else if (stream.total_out && err == Z_BUF_ERROR)
            +        left = 1;
            +
            +    inflateEnd(&stream);
            +    return err == Z_STREAM_END ? Z_OK :
            +           err == Z_NEED_DICT ? Z_DATA_ERROR  :
            +           err == Z_BUF_ERROR && left + stream.avail_out ? Z_DATA_ERROR :
            +           err;
            +}
            +
            +int ZEXPORT uncompress (dest, destLen, source, sourceLen)
            +    Bytef *dest;
            +    uLongf *destLen;
            +    const Bytef *source;
            +    uLong sourceLen;
            +{
            +    return uncompress2(dest, destLen, source, &sourceLen);
            +}
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zadler32.c b/jdk/src/java.base/share/native/libzip/zlib/zadler32.c
            similarity index 93%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zadler32.c
            rename to jdk/src/java.base/share/native/libzip/zlib/zadler32.c
            index a3108315221..e1480226310 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zadler32.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/zadler32.c
            @@ -23,7 +23,7 @@
              */
             
             /* adler32.c -- compute the Adler-32 checksum of a data stream
            - * Copyright (C) 1995-2011 Mark Adler
            + * Copyright (C) 1995-2011, 2016 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -31,11 +31,9 @@
             
             #include "zutil.h"
             
            -#define local static
            -
             local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
             
            -#define BASE 65521      /* largest prime smaller than 65536 */
            +#define BASE 65521U     /* largest prime smaller than 65536 */
             #define NMAX 5552
             /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
             
            @@ -86,10 +84,10 @@ local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
             #endif
             
             /* ========================================================================= */
            -uLong ZEXPORT adler32(adler, buf, len)
            +uLong ZEXPORT adler32_z(adler, buf, len)
                 uLong adler;
                 const Bytef *buf;
            -    uInt len;
            +    z_size_t len;
             {
                 unsigned long sum2;
                 unsigned n;
            @@ -156,6 +154,15 @@ uLong ZEXPORT adler32(adler, buf, len)
                 return adler | (sum2 << 16);
             }
             
            +/* ========================================================================= */
            +uLong ZEXPORT adler32(adler, buf, len)
            +    uLong adler;
            +    const Bytef *buf;
            +    uInt len;
            +{
            +    return adler32_z(adler, buf, len);
            +}
            +
             /* ========================================================================= */
             local uLong adler32_combine_(adler1, adler2, len2)
                 uLong adler1;
            @@ -180,7 +187,7 @@ local uLong adler32_combine_(adler1, adler2, len2)
                 sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
                 if (sum1 >= BASE) sum1 -= BASE;
                 if (sum1 >= BASE) sum1 -= BASE;
            -    if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1);
            +    if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1);
                 if (sum2 >= BASE) sum2 -= BASE;
                 return sum1 | (sum2 << 16);
             }
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zconf.h b/jdk/src/java.base/share/native/libzip/zlib/zconf.h
            similarity index 93%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zconf.h
            rename to jdk/src/java.base/share/native/libzip/zlib/zconf.h
            index c7edbed7d12..9b920116be8 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zconf.h
            +++ b/jdk/src/java.base/share/native/libzip/zlib/zconf.h
            @@ -23,7 +23,7 @@
              */
             
             /* zconf.h -- configuration of the zlib compression library
            - * Copyright (C) 1995-2013 Jean-loup Gailly.
            + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -44,7 +44,7 @@
             #ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
             #  define Z_PREFIX_SET
             
            -/* all linked symbols */
            +/* all linked symbols and init macros */
             #  define _dist_code            z__dist_code
             #  define _length_code          z__length_code
             #  define _tr_align             z__tr_align
            @@ -56,6 +56,7 @@
             #  define adler32               z_adler32
             #  define adler32_combine       z_adler32_combine
             #  define adler32_combine64     z_adler32_combine64
            +#  define adler32_z             z_adler32_z
             #  ifndef Z_SOLO
             #    define compress              z_compress
             #    define compress2             z_compress2
            @@ -64,10 +65,14 @@
             #  define crc32                 z_crc32
             #  define crc32_combine         z_crc32_combine
             #  define crc32_combine64       z_crc32_combine64
            +#  define crc32_z               z_crc32_z
             #  define deflate               z_deflate
             #  define deflateBound          z_deflateBound
             #  define deflateCopy           z_deflateCopy
             #  define deflateEnd            z_deflateEnd
            +#  define deflateGetDictionary  z_deflateGetDictionary
            +#  define deflateInit           z_deflateInit
            +#  define deflateInit2          z_deflateInit2
             #  define deflateInit2_         z_deflateInit2_
             #  define deflateInit_          z_deflateInit_
             #  define deflateParams         z_deflateParams
            @@ -94,6 +99,8 @@
             #    define gzeof                 z_gzeof
             #    define gzerror               z_gzerror
             #    define gzflush               z_gzflush
            +#    define gzfread               z_gzfread
            +#    define gzfwrite              z_gzfwrite
             #    define gzgetc                z_gzgetc
             #    define gzgetc_               z_gzgetc_
             #    define gzgets                z_gzgets
            @@ -105,7 +112,6 @@
             #      define gzopen_w              z_gzopen_w
             #    endif
             #    define gzprintf              z_gzprintf
            -#    define gzvprintf             z_gzvprintf
             #    define gzputc                z_gzputc
             #    define gzputs                z_gzputs
             #    define gzread                z_gzread
            @@ -116,32 +122,39 @@
             #    define gztell                z_gztell
             #    define gztell64              z_gztell64
             #    define gzungetc              z_gzungetc
            +#    define gzvprintf             z_gzvprintf
             #    define gzwrite               z_gzwrite
             #  endif
             #  define inflate               z_inflate
             #  define inflateBack           z_inflateBack
             #  define inflateBackEnd        z_inflateBackEnd
            +#  define inflateBackInit       z_inflateBackInit
             #  define inflateBackInit_      z_inflateBackInit_
            +#  define inflateCodesUsed      z_inflateCodesUsed
             #  define inflateCopy           z_inflateCopy
             #  define inflateEnd            z_inflateEnd
            +#  define inflateGetDictionary  z_inflateGetDictionary
             #  define inflateGetHeader      z_inflateGetHeader
            +#  define inflateInit           z_inflateInit
            +#  define inflateInit2          z_inflateInit2
             #  define inflateInit2_         z_inflateInit2_
             #  define inflateInit_          z_inflateInit_
             #  define inflateMark           z_inflateMark
             #  define inflatePrime          z_inflatePrime
             #  define inflateReset          z_inflateReset
             #  define inflateReset2         z_inflateReset2
            +#  define inflateResetKeep      z_inflateResetKeep
             #  define inflateSetDictionary  z_inflateSetDictionary
            -#  define inflateGetDictionary  z_inflateGetDictionary
             #  define inflateSync           z_inflateSync
             #  define inflateSyncPoint      z_inflateSyncPoint
             #  define inflateUndermine      z_inflateUndermine
            -#  define inflateResetKeep      z_inflateResetKeep
            +#  define inflateValidate       z_inflateValidate
             #  define inflate_copyright     z_inflate_copyright
             #  define inflate_fast          z_inflate_fast
             #  define inflate_table         z_inflate_table
             #  ifndef Z_SOLO
             #    define uncompress            z_uncompress
            +#    define uncompress2           z_uncompress2
             #  endif
             #  define zError                z_zError
             #  ifndef Z_SOLO
            @@ -251,9 +264,19 @@
             #  define z_const
             #endif
             
            -/* Some Mac compilers merge all .h files incorrectly: */
            -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
            -#  define NO_DUMMY_DECL
            +#ifdef Z_SOLO
            +   typedef unsigned long z_size_t;
            +#else
            +#  define z_longlong long long
            +#  if defined(NO_SIZE_T)
            +     typedef unsigned NO_SIZE_T z_size_t;
            +#  elif defined(STDC)
            +#    include 
            +     typedef size_t z_size_t;
            +#  else
            +     typedef unsigned long z_size_t;
            +#  endif
            +#  undef z_longlong
             #endif
             
             /* Maximum value for memLevel in deflateInit2 */
            @@ -283,7 +306,7 @@
              Of course this will generally degrade compression (there's no free lunch).
             
                The memory requirements for inflate are (in bytes) 1 << windowBits
            - that is, 32K for windowBits=15 (default value) plus a few kilobytes
            + that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
              for small objects.
             */
             
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zcrc32.c b/jdk/src/java.base/share/native/libzip/zlib/zcrc32.c
            similarity index 92%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zcrc32.c
            rename to jdk/src/java.base/share/native/libzip/zlib/zcrc32.c
            index 0fe90df9799..c1965fd0e8d 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zcrc32.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/zcrc32.c
            @@ -23,7 +23,7 @@
              */
             
             /* crc32.c -- compute the CRC-32 of a data stream
            - * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler
            + * Copyright (C) 1995-2006, 2010, 2011, 2012, 2016 Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              *
              * Thanks to Rodney Brown  for his contribution of faster
            @@ -54,17 +54,15 @@
             
             #include "zutil.h"      /* for STDC and FAR definitions */
             
            -#define local static
            -
             /* Definitions for doing the crc four data bytes at a time. */
             #if !defined(NOBYFOUR) && defined(Z_U4)
             #  define BYFOUR
             #endif
             #ifdef BYFOUR
                local unsigned long crc32_little OF((unsigned long,
            -                        const unsigned char FAR *, unsigned));
            +                        const unsigned char FAR *, z_size_t));
                local unsigned long crc32_big OF((unsigned long,
            -                        const unsigned char FAR *, unsigned));
            +                        const unsigned char FAR *, z_size_t));
             #  define TBLS 8
             #else
             #  define TBLS 1
            @@ -225,10 +223,10 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
             #define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
             
             /* ========================================================================= */
            -uLong ZEXPORT crc32(crc, buf, len)
            +uLong ZEXPORT crc32_z(crc, buf, len)
                 uLong crc;
                 const unsigned char FAR *buf;
            -    uInt len;
            +    z_size_t len;
             {
                 if (buf == Z_NULL) return 0UL;
             
            @@ -259,8 +257,29 @@ uLong ZEXPORT crc32(crc, buf, len)
                 return crc ^ 0xffffffffUL;
             }
             
            +/* ========================================================================= */
            +uLong ZEXPORT crc32(crc, buf, len)
            +    uLong crc;
            +    const unsigned char FAR *buf;
            +    uInt len;
            +{
            +    return crc32_z(crc, buf, len);
            +}
            +
             #ifdef BYFOUR
             
            +/*
            +   This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit
            +   integer pointer type. This violates the strict aliasing rule, where a
            +   compiler can assume, for optimization purposes, that two pointers to
            +   fundamentally different types won't ever point to the same memory. This can
            +   manifest as a problem only if one of the pointers is written to. This code
            +   only reads from those pointers. So long as this code remains isolated in
            +   this compilation unit, there won't be a problem. For this reason, this code
            +   should not be copied and pasted into a compilation unit in which other code
            +   writes to the buffer that is passed to these routines.
            + */
            +
             /* ========================================================================= */
             #define DOLIT4 c ^= *buf4++; \
                     c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
            @@ -271,7 +290,7 @@ uLong ZEXPORT crc32(crc, buf, len)
             local unsigned long crc32_little(crc, buf, len)
                 unsigned long crc;
                 const unsigned char FAR *buf;
            -    unsigned len;
            +    z_size_t len;
             {
                 register z_crc_t c;
                 register const z_crc_t FAR *buf4;
            @@ -302,7 +321,7 @@ local unsigned long crc32_little(crc, buf, len)
             }
             
             /* ========================================================================= */
            -#define DOBIG4 c ^= *++buf4; \
            +#define DOBIG4 c ^= *buf4++; \
                     c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
                         crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
             #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
            @@ -311,7 +330,7 @@ local unsigned long crc32_little(crc, buf, len)
             local unsigned long crc32_big(crc, buf, len)
                 unsigned long crc;
                 const unsigned char FAR *buf;
            -    unsigned len;
            +    z_size_t len;
             {
                 register z_crc_t c;
                 register const z_crc_t FAR *buf4;
            @@ -324,7 +343,6 @@ local unsigned long crc32_big(crc, buf, len)
                 }
             
                 buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
            -    buf4--;
                 while (len >= 32) {
                     DOBIG32;
                     len -= 32;
            @@ -333,7 +351,6 @@ local unsigned long crc32_big(crc, buf, len)
                     DOBIG4;
                     len -= 4;
                 }
            -    buf4++;
                 buf = (const unsigned char FAR *)buf4;
             
                 if (len) do {
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zlib.h b/jdk/src/java.base/share/native/libzip/zlib/zlib.h
            similarity index 82%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zlib.h
            rename to jdk/src/java.base/share/native/libzip/zlib/zlib.h
            index 8779cadf207..e383d0e4508 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zlib.h
            +++ b/jdk/src/java.base/share/native/libzip/zlib/zlib.h
            @@ -23,9 +23,9 @@
              */
             
             /* zlib.h -- interface of the 'zlib' general purpose compression library
            -  version 1.2.8, April 28th, 2013
            +  version 1.2.11, January 15th, 2017
             
            -  Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
            +  Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
             
               This software is provided 'as-is', without any express or implied
               warranty.  In no event will the authors be held liable for any damages
            @@ -61,11 +61,11 @@
             extern "C" {
             #endif
             
            -#define ZLIB_VERSION "1.2.8"
            -#define ZLIB_VERNUM 0x1280
            +#define ZLIB_VERSION "1.2.11"
            +#define ZLIB_VERNUM 0x12b0
             #define ZLIB_VER_MAJOR 1
             #define ZLIB_VER_MINOR 2
            -#define ZLIB_VER_REVISION 8
            +#define ZLIB_VER_REVISION 11
             #define ZLIB_VER_SUBREVISION 0
             
             /*
            @@ -89,7 +89,8 @@ extern "C" {
               with "gz".  The gzip format is different from the zlib format.  gzip is a
               gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
             
            -    This library can optionally read and write gzip streams in memory as well.
            +    This library can optionally read and write gzip and raw deflate streams in
            +  memory as well.
             
                 The zlib format was designed to be compact and fast for use in memory
               and on communications channels.  The gzip format was designed for single-
            @@ -98,7 +99,7 @@ extern "C" {
             
                 The library does not install any signal handler.  The decoder checks
               the consistency of the compressed data, so the library should never crash
            -  even in case of corrupted input.
            +  even in the case of corrupted input.
             */
             
             typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
            @@ -111,7 +112,7 @@ typedef struct z_stream_s {
                 uInt     avail_in;  /* number of bytes available at next_in */
                 uLong    total_in;  /* total number of input bytes read so far */
             
            -    Bytef    *next_out; /* next output byte should be put there */
            +    Bytef    *next_out; /* next output byte will go here */
                 uInt     avail_out; /* remaining free space at next_out */
                 uLong    total_out; /* total number of bytes output so far */
             
            @@ -122,8 +123,9 @@ typedef struct z_stream_s {
                 free_func  zfree;   /* used to free the internal state */
                 voidpf     opaque;  /* private data object passed to zalloc and zfree */
             
            -    int     data_type;  /* best guess about the data type: binary or text */
            -    uLong   adler;      /* adler32 value of the uncompressed data */
            +    int     data_type;  /* best guess about the data type: binary or text
            +                           for deflate, or the decoding state for inflate */
            +    uLong   adler;      /* Adler-32 or CRC-32 value of the uncompressed data */
                 uLong   reserved;   /* reserved for future use */
             } z_stream;
             
            @@ -166,7 +168,9 @@ typedef gz_header FAR *gz_headerp;
             
                  zalloc must return Z_NULL if there is not enough memory for the object.
                If zlib is used in a multi-threaded application, zalloc and zfree must be
            -   thread safe.
            +   thread safe.  In that case, zlib is thread-safe.  When zalloc and zfree are
            +   Z_NULL on entry to the initialization function, they are set to internal
            +   routines that use the standard library functions malloc() and free().
             
                  On 16-bit systems, the functions zalloc and zfree must be able to allocate
                exactly 65536 bytes, but will not be required to allocate more than this if
            @@ -179,7 +183,7 @@ typedef gz_header FAR *gz_headerp;
             
                  The fields total_in and total_out can be used for statistics or progress
                reports.  After compression, total_in holds the total size of the
            -   uncompressed data and may be saved for use in the decompressor (particularly
            +   uncompressed data and may be saved for use by the decompressor (particularly
                if the decompressor wants to decompress everything in a single step).
             */
             
            @@ -224,7 +228,7 @@ typedef gz_header FAR *gz_headerp;
             #define Z_TEXT     1
             #define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
             #define Z_UNKNOWN  2
            -/* Possible values of the data_type field (though see inflate()) */
            +/* Possible values of the data_type field for deflate() */
             
             #define Z_DEFLATED   8
             /* The deflate compression method (the only one supported in this version) */
            @@ -282,11 +286,11 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
                 enough room in the output buffer), next_in and avail_in are updated and
                 processing will resume at this point for the next call of deflate().
             
            -  - Provide more output starting at next_out and update next_out and avail_out
            +  - Generate more output starting at next_out and update next_out and avail_out
                 accordingly.  This action is forced if the parameter flush is non zero.
                 Forcing flush frequently degrades the compression ratio, so this parameter
            -    should be set only when necessary (in interactive applications).  Some
            -    output may be provided even if flush is not set.
            +    should be set only when necessary.  Some output may be provided even if
            +    flush is zero.
             
                 Before the call of deflate(), the application should ensure that at least
               one of the actions is possible, by providing more input and/or consuming more
            @@ -295,7 +299,9 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
               output when it wants, for example when the output buffer is full (avail_out
               == 0), or after each call of deflate().  If deflate returns Z_OK and with
               zero avail_out, it must be called again after making room in the output
            -  buffer because there might be more output pending.
            +  buffer because there might be more output pending. See deflatePending(),
            +  which can be used if desired to determine whether or not there is more ouput
            +  in that case.
             
                 Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
               decide how much data to accumulate before producing output, in order to
            @@ -316,8 +322,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
               input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
               This completes the current deflate block and follows it with an empty fixed
               codes block that is 10 bits long.  This assures that enough bytes are output
            -  in order for the decompressor to finish the block before the empty fixed code
            -  block.
            +  in order for the decompressor to finish the block before the empty fixed
            +  codes block.
             
                 If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
               for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
            @@ -343,34 +349,38 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
             
                 If the parameter flush is set to Z_FINISH, pending input is processed,
               pending output is flushed and deflate returns with Z_STREAM_END if there was
            -  enough output space; if deflate returns with Z_OK, this function must be
            -  called again with Z_FINISH and more output space (updated avail_out) but no
            -  more input data, until it returns with Z_STREAM_END or an error.  After
            -  deflate has returned Z_STREAM_END, the only possible operations on the stream
            -  are deflateReset or deflateEnd.
            +  enough output space.  If deflate returns with Z_OK or Z_BUF_ERROR, this
            +  function must be called again with Z_FINISH and more output space (updated
            +  avail_out) but no more input data, until it returns with Z_STREAM_END or an
            +  error.  After deflate has returned Z_STREAM_END, the only possible operations
            +  on the stream are deflateReset or deflateEnd.
             
            -    Z_FINISH can be used immediately after deflateInit if all the compression
            -  is to be done in a single step.  In this case, avail_out must be at least the
            -  value returned by deflateBound (see below).  Then deflate is guaranteed to
            -  return Z_STREAM_END.  If not enough output space is provided, deflate will
            -  not return Z_STREAM_END, and it must be called again as described above.
            +    Z_FINISH can be used in the first deflate call after deflateInit if all the
            +  compression is to be done in a single step.  In order to complete in one
            +  call, avail_out must be at least the value returned by deflateBound (see
            +  below).  Then deflate is guaranteed to return Z_STREAM_END.  If not enough
            +  output space is provided, deflate will not return Z_STREAM_END, and it must
            +  be called again as described above.
             
            -    deflate() sets strm->adler to the adler32 checksum of all input read
            -  so far (that is, total_in bytes).
            +    deflate() sets strm->adler to the Adler-32 checksum of all input read
            +  so far (that is, total_in bytes).  If a gzip stream is being generated, then
            +  strm->adler will be the CRC-32 checksum of the input read so far.  (See
            +  deflateInit2 below.)
             
                 deflate() may update strm->data_type if it can make a good guess about
            -  the input data type (Z_BINARY or Z_TEXT).  In doubt, the data is considered
            -  binary.  This field is only for information purposes and does not affect the
            -  compression algorithm in any manner.
            +  the input data type (Z_BINARY or Z_TEXT).  If in doubt, the data is
            +  considered binary.  This field is only for information purposes and does not
            +  affect the compression algorithm in any manner.
             
                 deflate() returns Z_OK if some progress has been made (more input
               processed or more output produced), Z_STREAM_END if all input has been
               consumed and all output has been produced (only when flush is set to
               Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
            -  if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
            -  (for example avail_in or avail_out was zero).  Note that Z_BUF_ERROR is not
            -  fatal, and deflate() can be called again with more input and more output
            -  space to continue compressing.
            +  if next_in or next_out was Z_NULL or the state was inadvertently written over
            +  by the application), or Z_BUF_ERROR if no progress is possible (for example
            +  avail_in or avail_out was zero).  Note that Z_BUF_ERROR is not fatal, and
            +  deflate() can be called again with more input and more output space to
            +  continue compressing.
             */
             
             
            @@ -393,23 +403,21 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
             
                  Initializes the internal stream state for decompression.  The fields
                next_in, avail_in, zalloc, zfree and opaque must be initialized before by
            -   the caller.  If next_in is not Z_NULL and avail_in is large enough (the
            -   exact value depends on the compression method), inflateInit determines the
            -   compression method from the zlib header and allocates all data structures
            -   accordingly; otherwise the allocation will be deferred to the first call of
            -   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
            -   use default allocation functions.
            +   the caller.  In the current version of inflate, the provided input is not
            +   read or consumed.  The allocation of a sliding window will be deferred to
            +   the first call of inflate (if the decompression does not complete on the
            +   first call).  If zalloc and zfree are set to Z_NULL, inflateInit updates
            +   them to use default allocation functions.
             
                  inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
                memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
                version assumed by the caller, or Z_STREAM_ERROR if the parameters are
                invalid, such as a null pointer to the structure.  msg is set to null if
            -   there is no error message.  inflateInit does not perform any decompression
            -   apart from possibly reading the zlib header if present: actual decompression
            -   will be done by inflate().  (So next_in and avail_in may be modified, but
            -   next_out and avail_out are unused and unchanged.) The current implementation
            -   of inflateInit() does not process any header information -- that is deferred
            -   until inflate() is called.
            +   there is no error message.  inflateInit does not perform any decompression.
            +   Actual decompression will be done by inflate().  So next_in, and avail_in,
            +   next_out, and avail_out are unused and unchanged.  The current
            +   implementation of inflateInit() does not process any header information --
            +   that is deferred until inflate() is called.
             */
             
             
            @@ -425,17 +433,20 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
             
               - Decompress more input starting at next_in and update next_in and avail_in
                 accordingly.  If not all input can be processed (because there is not
            -    enough room in the output buffer), next_in is updated and processing will
            -    resume at this point for the next call of inflate().
            +    enough room in the output buffer), then next_in and avail_in are updated
            +    accordingly, and processing will resume at this point for the next call of
            +    inflate().
             
            -  - Provide more output starting at next_out and update next_out and avail_out
            +  - Generate more output starting at next_out and update next_out and avail_out
                 accordingly.  inflate() provides as much output as possible, until there is
                 no more input data or no more space in the output buffer (see below about
                 the flush parameter).
             
                 Before the call of inflate(), the application should ensure that at least
               one of the actions is possible, by providing more input and/or consuming more
            -  output, and updating the next_* and avail_* values accordingly.  The
            +  output, and updating the next_* and avail_* values accordingly.  If the
            +  caller of inflate() does not provide both available input and available
            +  output space, it is possible that there will be no progress made.  The
               application can consume the uncompressed output when it wants, for example
               when the output buffer is full (avail_out == 0), or after each call of
               inflate().  If inflate returns Z_OK and with zero avail_out, it must be
            @@ -452,7 +463,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
               gets to the end of that block, or when it runs out of data.
             
                 The Z_BLOCK option assists in appending to or combining deflate streams.
            -  Also to assist in this, on return inflate() will set strm->data_type to the
            +  To assist in this, on return inflate() always sets strm->data_type to the
               number of unused bits in the last byte taken from strm->next_in, plus 64 if
               inflate() is currently decoding the last block in the deflate stream, plus
               128 if inflate() returned immediately after decoding an end-of-block code or
            @@ -478,7 +489,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
               this case all pending input is processed and all pending output is flushed;
               avail_out must be large enough to hold all of the uncompressed data for the
               operation to complete.  (The size of the uncompressed data may have been
            -  saved by the compressor for this purpose.) The use of Z_FINISH is not
            +  saved by the compressor for this purpose.)  The use of Z_FINISH is not
               required to perform an inflation in one step.  However it may be used to
               inform inflate that a faster approach can be used for the single inflate()
               call.  Z_FINISH also informs inflate to not maintain a sliding window if the
            @@ -500,32 +511,33 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
               chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
               strm->adler to the Adler-32 checksum of all output produced so far (that is,
               total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
            -  below.  At the end of the stream, inflate() checks that its computed adler32
            +  below.  At the end of the stream, inflate() checks that its computed Adler-32
               checksum is equal to that saved by the compressor and returns Z_STREAM_END
               only if the checksum is correct.
             
                 inflate() can decompress and check either zlib-wrapped or gzip-wrapped
               deflate data.  The header type is detected automatically, if requested when
               initializing with inflateInit2().  Any information contained in the gzip
            -  header is not retained, so applications that need that information should
            -  instead use raw inflate, see inflateInit2() below, or inflateBack() and
            -  perform their own processing of the gzip header and trailer.  When processing
            +  header is not retained unless inflateGetHeader() is used.  When processing
               gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
            -  producted so far.  The CRC-32 is checked against the gzip trailer.
            +  produced so far.  The CRC-32 is checked against the gzip trailer, as is the
            +  uncompressed length, modulo 2^32.
             
                 inflate() returns Z_OK if some progress has been made (more input processed
               or more output produced), Z_STREAM_END if the end of the compressed data has
               been reached and all uncompressed output has been produced, Z_NEED_DICT if a
               preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
               corrupted (input stream not conforming to the zlib format or incorrect check
            -  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
            -  next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
            -  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
            -  output buffer when Z_FINISH is used.  Note that Z_BUF_ERROR is not fatal, and
            +  value, in which case strm->msg points to a string with a more specific
            +  error), Z_STREAM_ERROR if the stream structure was inconsistent (for example
            +  next_in or next_out was Z_NULL, or the state was inadvertently written over
            +  by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR
            +  if no progress was possible or if there was not enough room in the output
            +  buffer when Z_FINISH is used.  Note that Z_BUF_ERROR is not fatal, and
               inflate() can be called again with more input and more output space to
               continue decompressing.  If Z_DATA_ERROR is returned, the application may
               then call inflateSync() to look for a good compression block if a partial
            -  recovery of the data is desired.
            +  recovery of the data is to be attempted.
             */
             
             
            @@ -535,9 +547,8 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
                This function discards any unprocessed input and does not flush any pending
                output.
             
            -     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
            -   was inconsistent.  In the error case, msg may be set but then points to a
            -   static string (which must not be deallocated).
            +     inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state
            +   was inconsistent.
             */
             
             
            @@ -568,16 +579,29 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
                compression at the expense of memory usage.  The default value is 15 if
                deflateInit is used instead.
             
            +     For the current implementation of deflate(), a windowBits value of 8 (a
            +   window size of 256 bytes) is not supported.  As a result, a request for 8
            +   will result in 9 (a 512-byte window).  In that case, providing 8 to
            +   inflateInit2() will result in an error when the zlib header with 9 is
            +   checked against the initialization of inflate().  The remedy is to not use 8
            +   with deflateInit2() with this initialization, or at least in that case use 9
            +   with inflateInit2().
            +
                  windowBits can also be -8..-15 for raw deflate.  In this case, -windowBits
                determines the window size.  deflate() will then generate raw deflate data
            -   with no zlib header or trailer, and will not compute an adler32 check value.
            +   with no zlib header or trailer, and will not compute a check value.
             
                  windowBits can also be greater than 15 for optional gzip encoding.  Add
                16 to windowBits to write a simple gzip header and trailer around the
                compressed data instead of a zlib wrapper.  The gzip header will have no
                file name, no extra data, no comment, no modification time (set to zero), no
            -   header crc, and the operating system will be set to 255 (unknown).  If a
            -   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
            +   header crc, and the operating system will be set to the appropriate value,
            +   if the operating system was determined at compile time.  If a gzip stream is
            +   being written, strm->adler is a CRC-32 instead of an Adler-32.
            +
            +     For raw deflate or gzip encoding, a request for a 256-byte window is
            +   rejected as invalid, since only the zlib header provides a means of
            +   transmitting the window size to the decompressor.
             
                  The memLevel parameter specifies how much memory should be allocated
                for the internal compression state.  memLevel=1 uses minimum memory but is
            @@ -638,12 +662,12 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
                addition, the current implementation of deflate will use at most the window
                size minus 262 bytes of the provided dictionary.
             
            -     Upon return of this function, strm->adler is set to the adler32 value
            +     Upon return of this function, strm->adler is set to the Adler-32 value
                of the dictionary; the decompressor may later use this value to determine
            -   which dictionary has been used by the compressor.  (The adler32 value
            +   which dictionary has been used by the compressor.  (The Adler-32 value
                applies to the whole dictionary even if only a subset of the dictionary is
                actually used by the compressor.) If a raw deflate was requested, then the
            -   adler32 value is not computed and strm->adler is not set.
            +   Adler-32 value is not computed and strm->adler is not set.
             
                  deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
                parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
            @@ -652,6 +676,28 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
                not perform any compression: this will be done by deflate().
             */
             
            +ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm,
            +                                             Bytef *dictionary,
            +                                             uInt  *dictLength));
            +/*
            +     Returns the sliding dictionary being maintained by deflate.  dictLength is
            +   set to the number of bytes in the dictionary, and that many bytes are copied
            +   to dictionary.  dictionary must have enough space, where 32768 bytes is
            +   always enough.  If deflateGetDictionary() is called with dictionary equal to
            +   Z_NULL, then only the dictionary length is returned, and nothing is copied.
            +   Similary, if dictLength is Z_NULL, then it is not set.
            +
            +     deflateGetDictionary() may return a length less than the window size, even
            +   when more than the window size in input has been provided. It may return up
            +   to 258 bytes less in that case, due to how zlib's implementation of deflate
            +   manages the sliding window and lookahead for matches, where matches can be
            +   up to 258 bytes long. If the application needs the last window-size bytes of
            +   input, then that would need to be saved by the application outside of zlib.
            +
            +     deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
            +   stream state is inconsistent.
            +*/
            +
             ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
                                                 z_streamp source));
             /*
            @@ -672,10 +718,10 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
             
             ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
             /*
            -     This function is equivalent to deflateEnd followed by deflateInit,
            -   but does not free and reallocate all the internal compression state.  The
            -   stream will keep the same compression level and any other attributes that
            -   may have been set by deflateInit2.
            +     This function is equivalent to deflateEnd followed by deflateInit, but
            +   does not free and reallocate the internal compression state.  The stream
            +   will leave the compression level and any other attributes that may have been
            +   set unchanged.
             
                  deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
                stream state was inconsistent (such as zalloc or state being Z_NULL).
            @@ -686,20 +732,36 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
                                                   int strategy));
             /*
                  Dynamically update the compression level and compression strategy.  The
            -   interpretation of level and strategy is as in deflateInit2.  This can be
            +   interpretation of level and strategy is as in deflateInit2().  This can be
                used to switch between compression and straight copy of the input data, or
                to switch to a different kind of input data requiring a different strategy.
            -   If the compression level is changed, the input available so far is
            -   compressed with the old level (and may be flushed); the new level will take
            -   effect only at the next call of deflate().
            +   If the compression approach (which is a function of the level) or the
            +   strategy is changed, and if any input has been consumed in a previous
            +   deflate() call, then the input available so far is compressed with the old
            +   level and strategy using deflate(strm, Z_BLOCK).  There are three approaches
            +   for the compression levels 0, 1..3, and 4..9 respectively.  The new level
            +   and strategy will take effect at the next call of deflate().
             
            -     Before the call of deflateParams, the stream state must be set as for
            -   a call of deflate(), since the currently available input may have to be
            -   compressed and flushed.  In particular, strm->avail_out must be non-zero.
            +     If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
            +   not have enough output space to complete, then the parameter change will not
            +   take effect.  In this case, deflateParams() can be called again with the
            +   same parameters and more output space to try again.
             
            -     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
            -   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
            -   strm->avail_out was zero.
            +     In order to assure a change in the parameters on the first try, the
            +   deflate stream should be flushed using deflate() with Z_BLOCK or other flush
            +   request until strm.avail_out is not zero, before calling deflateParams().
            +   Then no more input data should be provided before the deflateParams() call.
            +   If this is done, the old level and strategy will be applied to the data
            +   compressed before deflateParams(), and the new level and strategy will be
            +   applied to the the data compressed after deflateParams().
            +
            +     deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
            +   state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
            +   there was not enough output space to complete the compression of the
            +   available input data before a change in the strategy or approach.  Note that
            +   in the case of a Z_BUF_ERROR, the parameters are not changed.  A return
            +   value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be
            +   retried with more output space.
             */
             
             ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
            @@ -817,7 +879,7 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
                is for use with other formats that use the deflate compressed data format
                such as zip.  Those formats provide their own check values.  If a custom
                format is developed using the raw deflate format for compressed data, it is
            -   recommended that a check value such as an adler32 or a crc32 be applied to
            +   recommended that a check value such as an Adler-32 or a CRC-32 be applied to
                the uncompressed data as is done in the zlib, gzip, and zip formats.  For
                most applications, the zlib format should be used as is.  Note that comments
                above on the use in deflateInit2() applies to the magnitude of windowBits.
            @@ -826,7 +888,10 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
                32 to windowBits to enable zlib and gzip decoding with automatic header
                detection, or add 16 to decode only the gzip format (the zlib format will
                return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is a
            -   crc32 instead of an adler32.
            +   CRC-32 instead of an Adler-32.  Unlike the gunzip utility and gzread() (see
            +   below), inflate() will not automatically decode concatenated gzip streams.
            +   inflate() will return Z_STREAM_END at the end of the gzip stream.  The state
            +   would need to be reset to continue decoding a subsequent gzip stream.
             
                  inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
                memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
            @@ -847,7 +912,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
                  Initializes the decompression dictionary from the given uncompressed byte
                sequence.  This function must be called immediately after a call of inflate,
                if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
            -   can be determined from the adler32 value returned by that call of inflate.
            +   can be determined from the Adler-32 value returned by that call of inflate.
                The compressor and decompressor must use exactly the same dictionary (see
                deflateSetDictionary).  For raw inflate, this function can be called at any
                time to set the dictionary.  If the provided dictionary is smaller than the
            @@ -858,7 +923,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
                  inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
                parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
                inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
            -   expected one (incorrect adler32 value).  inflateSetDictionary does not
            +   expected one (incorrect Adler-32 value).  inflateSetDictionary does not
                perform any decompression: this will be done by subsequent calls of
                inflate().
             */
            @@ -916,7 +981,7 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
             ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
             /*
                  This function is equivalent to inflateEnd followed by inflateInit,
            -   but does not free and reallocate all the internal decompression state.  The
            +   but does not free and reallocate the internal decompression state.  The
                stream will keep attributes that may have been set by inflateInit2.
             
                  inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
            @@ -928,7 +993,9 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
             /*
                  This function is the same as inflateReset, but it also permits changing
                the wrap and window size requests.  The windowBits parameter is interpreted
            -   the same as it is for inflateInit2.
            +   the same as it is for inflateInit2.  If the window size is changed, then the
            +   memory allocated for the window is freed, and the window will be reallocated
            +   by inflate() if needed.
             
                  inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
                stream state was inconsistent (such as zalloc or state being Z_NULL), or if
            @@ -980,7 +1047,7 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
                location in the input stream can be determined from avail_in and data_type
                as noted in the description for the Z_BLOCK flush parameter for inflate.
             
            -     inflateMark returns the value noted above or -1 << 16 if the provided
            +     inflateMark returns the value noted above, or -65536 if the provided
                source stream state was inconsistent.
             */
             
            @@ -1072,9 +1139,9 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
                This routine would normally be used in a utility that reads zip or gzip
                files and writes out uncompressed files.  The utility would decode the
                header and process the trailer on its own, hence this routine expects only
            -   the raw deflate stream to decompress.  This is different from the normal
            -   behavior of inflate(), which expects either a zlib or gzip header and
            -   trailer around the deflate stream.
            +   the raw deflate stream to decompress.  This is different from the default
            +   behavior of inflate(), which expects a zlib header and trailer around the
            +   deflate stream.
             
                  inflateBack() uses two subroutines supplied by the caller that are then
                called by inflateBack() for input and output.  inflateBack() calls those
            @@ -1083,12 +1150,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
                parameters and return types are defined above in the in_func and out_func
                typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
                number of bytes of provided input, and a pointer to that input in buf.  If
            -   there is no input available, in() must return zero--buf is ignored in that
            -   case--and inflateBack() will return a buffer error.  inflateBack() will call
            -   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
            -   should return zero on success, or non-zero on failure.  If out() returns
            -   non-zero, inflateBack() will return with an error.  Neither in() nor out()
            -   are permitted to change the contents of the window provided to
            +   there is no input available, in() must return zero -- buf is ignored in that
            +   case -- and inflateBack() will return a buffer error.  inflateBack() will
            +   call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].
            +   out() should return zero on success, or non-zero on failure.  If out()
            +   returns non-zero, inflateBack() will return with an error.  Neither in() nor
            +   out() are permitted to change the contents of the window provided to
                inflateBackInit(), which is also the buffer that out() uses to write from.
                The length written by out() will be at most the window size.  Any non-zero
                amount of input may be provided by in().
            @@ -1116,7 +1183,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
                using strm->next_in which will be Z_NULL only if in() returned an error.  If
                strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
                non-zero.  (in() will always be called before out(), so strm->next_in is
            -   assured to be defined if out() returns non-zero.) Note that inflateBack()
            +   assured to be defined if out() returns non-zero.)  Note that inflateBack()
                cannot return Z_OK.
             */
             
            @@ -1138,7 +1205,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
                  7.6: size of z_off_t
             
                 Compiler, assembler, and debug options:
            -     8: DEBUG
            +     8: ZLIB_DEBUG
                  9: ASMV or ASMINF -- use ASM code
                  10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
                  11: 0 (reserved)
            @@ -1188,7 +1255,8 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
                the byte length of the source buffer.  Upon entry, destLen is the total size
                of the destination buffer, which must be at least the value returned by
                compressBound(sourceLen).  Upon exit, destLen is the actual size of the
            -   compressed buffer.
            +   compressed data.  compress() is equivalent to compress2() with a level
            +   parameter of Z_DEFAULT_COMPRESSION.
             
                  compress returns Z_OK if success, Z_MEM_ERROR if there was not
                enough memory, Z_BUF_ERROR if there was not enough room in the output
            @@ -1204,7 +1272,7 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
                length of the source buffer.  Upon entry, destLen is the total size of the
                destination buffer, which must be at least the value returned by
                compressBound(sourceLen).  Upon exit, destLen is the actual size of the
            -   compressed buffer.
            +   compressed data.
             
                  compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
                memory, Z_BUF_ERROR if there was not enough room in the output buffer,
            @@ -1227,7 +1295,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
                uncompressed data.  (The size of the uncompressed data must have been saved
                previously by the compressor and transmitted to the decompressor by some
                mechanism outside the scope of this compression library.) Upon exit, destLen
            -   is the actual size of the uncompressed buffer.
            +   is the actual size of the uncompressed data.
             
                  uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
                enough memory, Z_BUF_ERROR if there was not enough room in the output
            @@ -1236,6 +1304,14 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
                buffer with the uncompressed data up to that point.
             */
             
            +ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest,   uLongf *destLen,
            +                                    const Bytef *source, uLong *sourceLen));
            +/*
            +     Same as uncompress, except that sourceLen is a pointer, where the
            +   length of the source is *sourceLen.  On return, *sourceLen is the number of
            +   source bytes consumed.
            +*/
            +
                                     /* gzip file access functions */
             
             /*
            @@ -1314,10 +1390,9 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
                default buffer size is 8192 bytes.  This function must be called after
                gzopen() or gzdopen(), and before any other calls that read or write the
                file.  The buffer memory allocation is always deferred to the first read or
            -   write.  Two buffers are allocated, either both of the specified size when
            -   writing, or one of the specified size and the other twice that size when
            -   reading.  A larger buffer size of, for example, 64K or 128K bytes will
            -   noticeably increase the speed of decompression (reading).
            +   write.  Three times that size in buffer space is allocated.  A larger buffer
            +   size of, for example, 64K or 128K bytes will noticeably increase the speed
            +   of decompression (reading).
             
                  The new buffer size also affects the maximum length for gzprintf().
             
            @@ -1328,10 +1403,12 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
             ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
             /*
                  Dynamically update the compression level or strategy.  See the description
            -   of deflateInit2 for the meaning of these parameters.
            +   of deflateInit2 for the meaning of these parameters.  Previously provided
            +   data is flushed before the parameter change.
             
            -     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
            -   opened for writing.
            +     gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
            +   opened for writing, Z_ERRNO if there is an error writing the flushed data,
            +   or Z_MEM_ERROR if there is a memory allocation error.
             */
             
             ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
            @@ -1359,7 +1436,35 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
                case.
             
                  gzread returns the number of uncompressed bytes actually read, less than
            -   len for end of file, or -1 for error.
            +   len for end of file, or -1 for error.  If len is too large to fit in an int,
            +   then nothing is read, -1 is returned, and the error state is set to
            +   Z_STREAM_ERROR.
            +*/
            +
            +ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
            +                                     gzFile file));
            +/*
            +     Read up to nitems items of size size from file to buf, otherwise operating
            +   as gzread() does.  This duplicates the interface of stdio's fread(), with
            +   size_t request and return types.  If the library defines size_t, then
            +   z_size_t is identical to size_t.  If not, then z_size_t is an unsigned
            +   integer type that can contain a pointer.
            +
            +     gzfread() returns the number of full items read of size size, or zero if
            +   the end of the file was reached and a full item could not be read, or if
            +   there was an error.  gzerror() must be consulted if zero is returned in
            +   order to determine if there was an error.  If the multiplication of size and
            +   nitems overflows, i.e. the product does not fit in a z_size_t, then nothing
            +   is read, zero is returned, and the error state is set to Z_STREAM_ERROR.
            +
            +     In the event that the end of file is reached and only a partial item is
            +   available at the end, i.e. the remaining uncompressed data length is not a
            +   multiple of size, then the final partial item is nevetheless read into buf
            +   and the end-of-file flag is set.  The length of the partial item read is not
            +   provided, but could be inferred from the result of gztell().  This behavior
            +   is the same as the behavior of fread() implementations in common libraries,
            +   but it prevents the direct use of gzfread() to read a concurrently written
            +   file, reseting and retrying on end-of-file, when size is not 1.
             */
             
             ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
            @@ -1370,19 +1475,33 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
                error.
             */
             
            +ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
            +                                      z_size_t nitems, gzFile file));
            +/*
            +     gzfwrite() writes nitems items of size size from buf to file, duplicating
            +   the interface of stdio's fwrite(), with size_t request and return types.  If
            +   the library defines size_t, then z_size_t is identical to size_t.  If not,
            +   then z_size_t is an unsigned integer type that can contain a pointer.
            +
            +     gzfwrite() returns the number of full items written of size size, or zero
            +   if there was an error.  If the multiplication of size and nitems overflows,
            +   i.e. the product does not fit in a z_size_t, then nothing is written, zero
            +   is returned, and the error state is set to Z_STREAM_ERROR.
            +*/
            +
             ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
             /*
                  Converts, formats, and writes the arguments to the compressed file under
                control of the format string, as in fprintf.  gzprintf returns the number of
            -   uncompressed bytes actually written, or 0 in case of error.  The number of
            -   uncompressed bytes written is limited to 8191, or one less than the buffer
            -   size given to gzbuffer().  The caller should assure that this limit is not
            -   exceeded.  If it is exceeded, then gzprintf() will return an error (0) with
            -   nothing written.  In this case, there may also be a buffer overflow with
            -   unpredictable consequences, which is possible only if zlib was compiled with
            -   the insecure functions sprintf() or vsprintf() because the secure snprintf()
            -   or vsnprintf() functions were not available.  This can be determined using
            -   zlibCompileFlags().
            +   uncompressed bytes actually written, or a negative zlib error code in case
            +   of error.  The number of uncompressed bytes written is limited to 8191, or
            +   one less than the buffer size given to gzbuffer().  The caller should assure
            +   that this limit is not exceeded.  If it is exceeded, then gzprintf() will
            +   return an error (0) with nothing written.  In this case, there may also be a
            +   buffer overflow with unpredictable consequences, which is possible only if
            +   zlib was compiled with the insecure functions sprintf() or vsprintf()
            +   because the secure snprintf() or vsnprintf() functions were not available.
            +   This can be determined using zlibCompileFlags().
             */
             
             ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
            @@ -1442,7 +1561,7 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
                  If the flush parameter is Z_FINISH, the remaining data is written and the
                gzip stream is completed in the output.  If gzwrite() is called again, a new
                gzip stream will be started in the output.  gzread() is able to read such
            -   concatented gzip streams.
            +   concatenated gzip streams.
             
                  gzflush should be called only when strictly necessary because it will
                degrade compression if called too often.
            @@ -1596,7 +1715,7 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
                return the updated checksum.  If buf is Z_NULL, this function returns the
                required initial value for the checksum.
             
            -     An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
            +     An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed
                much faster.
             
                Usage example:
            @@ -1609,6 +1728,12 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
                  if (adler != original_adler) error();
             */
             
            +ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf,
            +                                    z_size_t len));
            +/*
            +     Same as adler32(), but with a size_t length.
            +*/
            +
             /*
             ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
                                                       z_off_t len2));
            @@ -1638,6 +1763,12 @@ ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
                  if (crc != original_crc) error();
             */
             
            +ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf,
            +                                  z_size_t len));
            +/*
            +     Same as crc32(), but with a size_t length.
            +*/
            +
             /*
             ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
             
            @@ -1668,19 +1799,35 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
                                                      unsigned char FAR *window,
                                                      const char *version,
                                                      int stream_size));
            -#define deflateInit(strm, level) \
            -        deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
            -#define inflateInit(strm) \
            -        inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
            -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
            -        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
            -                      (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
            -#define inflateInit2(strm, windowBits) \
            -        inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
            -                      (int)sizeof(z_stream))
            -#define inflateBackInit(strm, windowBits, window) \
            -        inflateBackInit_((strm), (windowBits), (window), \
            -                      ZLIB_VERSION, (int)sizeof(z_stream))
            +#ifdef Z_PREFIX_SET
            +#  define z_deflateInit(strm, level) \
            +          deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
            +#  define z_inflateInit(strm) \
            +          inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
            +#  define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
            +          deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
            +                        (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
            +#  define z_inflateInit2(strm, windowBits) \
            +          inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
            +                        (int)sizeof(z_stream))
            +#  define z_inflateBackInit(strm, windowBits, window) \
            +          inflateBackInit_((strm), (windowBits), (window), \
            +                           ZLIB_VERSION, (int)sizeof(z_stream))
            +#else
            +#  define deflateInit(strm, level) \
            +          deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
            +#  define inflateInit(strm) \
            +          inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
            +#  define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
            +          deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
            +                        (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
            +#  define inflateInit2(strm, windowBits) \
            +          inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
            +                        (int)sizeof(z_stream))
            +#  define inflateBackInit(strm, windowBits, window) \
            +          inflateBackInit_((strm), (windowBits), (window), \
            +                           ZLIB_VERSION, (int)sizeof(z_stream))
            +#endif
             
             #ifndef Z_SOLO
             
            @@ -1700,10 +1847,10 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));  /* backward compatibility */
             #ifdef Z_PREFIX_SET
             #  undef z_gzgetc
             #  define z_gzgetc(g) \
            -          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
            +          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
             #else
             #  define gzgetc(g) \
            -          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
            +          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
             #endif
             
             /* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
            @@ -1761,19 +1908,16 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));  /* backward compatibility */
             
             #endif /* !Z_SOLO */
             
            -/* hack for buggy compilers */
            -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
            -    struct internal_state {int dummy;};
            -#endif
            -
             /* undocumented functions */
             ZEXTERN const char   * ZEXPORT zError           OF((int));
             ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
             ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table    OF((void));
             ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
            +ZEXTERN int            ZEXPORT inflateValidate OF((z_streamp, int));
            +ZEXTERN unsigned long  ZEXPORT inflateCodesUsed OF ((z_streamp));
             ZEXTERN int            ZEXPORT inflateResetKeep OF((z_streamp));
             ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
            -#if defined(_WIN32) && !defined(Z_SOLO)
            +#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO)
             ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
                                                         const char *mode));
             #endif
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.c b/jdk/src/java.base/share/native/libzip/zlib/zutil.c
            similarity index 88%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.c
            rename to jdk/src/java.base/share/native/libzip/zlib/zutil.c
            index e54347610c8..a0c88928068 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.c
            +++ b/jdk/src/java.base/share/native/libzip/zlib/zutil.c
            @@ -23,32 +23,30 @@
              */
             
             /* zutil.c -- target dependent utility functions for the compression library
            - * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly.
            + * Copyright (C) 1995-2017 Jean-loup Gailly
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
             /* @(#) $Id$ */
             
             #include "zutil.h"
            +
             #ifndef Z_SOLO
             #  include "gzguts.h"
             #endif
             
            -#ifndef NO_DUMMY_DECL
            -struct internal_state      {int dummy;}; /* for buggy compilers */
            -#endif
            -
             z_const char * const z_errmsg[10] = {
            -"need dictionary",     /* Z_NEED_DICT       2  */
            -"stream end",          /* Z_STREAM_END      1  */
            -"",                    /* Z_OK              0  */
            -"file error",          /* Z_ERRNO         (-1) */
            -"stream error",        /* Z_STREAM_ERROR  (-2) */
            -"data error",          /* Z_DATA_ERROR    (-3) */
            -"insufficient memory", /* Z_MEM_ERROR     (-4) */
            -"buffer error",        /* Z_BUF_ERROR     (-5) */
            -"incompatible version",/* Z_VERSION_ERROR (-6) */
            -""};
            +    (z_const char *)"need dictionary",     /* Z_NEED_DICT       2  */
            +    (z_const char *)"stream end",          /* Z_STREAM_END      1  */
            +    (z_const char *)"",                    /* Z_OK              0  */
            +    (z_const char *)"file error",          /* Z_ERRNO         (-1) */
            +    (z_const char *)"stream error",        /* Z_STREAM_ERROR  (-2) */
            +    (z_const char *)"data error",          /* Z_DATA_ERROR    (-3) */
            +    (z_const char *)"insufficient memory", /* Z_MEM_ERROR     (-4) */
            +    (z_const char *)"buffer error",        /* Z_BUF_ERROR     (-5) */
            +    (z_const char *)"incompatible version",/* Z_VERSION_ERROR (-6) */
            +    (z_const char *)""
            +};
             
             
             const char * ZEXPORT zlibVersion()
            @@ -85,7 +83,7 @@ uLong ZEXPORT zlibCompileFlags()
                 case 8:     flags += 2 << 6;        break;
                 default:    flags += 3 << 6;
                 }
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
                 flags += 1 << 8;
             #endif
             #if defined(ASMV) || defined(ASMINF)
            @@ -139,8 +137,8 @@ uLong ZEXPORT zlibCompileFlags()
                 return flags;
             }
             
            -#ifdef DEBUG
            -
            +#ifdef ZLIB_DEBUG
            +#include 
             #  ifndef verbose
             #    define verbose 0
             #  endif
            @@ -243,9 +241,11 @@ local ptr_table table[MAX_PTR];
             
             voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
             {
            -    voidpf buf = opaque; /* just to make some compilers happy */
            +    voidpf buf;
                 ulg bsize = (ulg)items*size;
             
            +    (void)opaque;
            +
                 /* If we allocate less than 65520 bytes, we assume that farmalloc
                  * will return a usable pointer which doesn't have to be normalized.
                  */
            @@ -268,6 +268,9 @@ voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
             void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
             {
                 int n;
            +
            +    (void)opaque;
            +
                 if (*(ush*)&ptr != 0) { /* object < 64K */
                     farfree(ptr);
                     return;
            @@ -283,7 +286,6 @@ void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
                     next_ptr--;
                     return;
                 }
            -    ptr = opaque; /* just to make some compilers happy */
                 Assert(0, "zcfree: ptr not found");
             }
             
            @@ -302,13 +304,13 @@ void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
             
             voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
             {
            -    if (opaque) opaque = 0; /* to make compiler happy */
            +    (void)opaque;
                 return _halloc((long)items, size);
             }
             
             void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
             {
            -    if (opaque) opaque = 0; /* to make compiler happy */
            +    (void)opaque;
                 _hfree(ptr);
             }
             
            @@ -330,7 +332,7 @@ voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
                 unsigned items;
                 unsigned size;
             {
            -    if (opaque) items += size - size; /* make compiler happy */
            +    (void)opaque;
                 return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
                                           (voidpf)calloc(items, size);
             }
            @@ -339,8 +341,8 @@ void ZLIB_INTERNAL zcfree (opaque, ptr)
                 voidpf opaque;
                 voidpf ptr;
             {
            +    (void)opaque;
                 free(ptr);
            -    if (opaque) return; /* make compiler happy */
             }
             
             #endif /* MY_ZCALLOC */
            diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.h b/jdk/src/java.base/share/native/libzip/zlib/zutil.h
            similarity index 89%
            rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.h
            rename to jdk/src/java.base/share/native/libzip/zlib/zutil.h
            index b82b14d4a5e..c9e1273efc0 100644
            --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.h
            +++ b/jdk/src/java.base/share/native/libzip/zlib/zutil.h
            @@ -23,7 +23,7 @@
              */
             
             /* zutil.h -- internal interface and configuration of the compression library
            - * Copyright (C) 1995-2013 Jean-loup Gailly.
            + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
              * For conditions of distribution and use, see copyright notice in zlib.h
              */
             
            @@ -60,7 +60,9 @@
             #ifndef local
             #  define local static
             #endif
            -/* compile with -Dlocal if your debugger can't find static symbols */
            +/* since "static" is used to mean two completely different things in C, we
            +   define "local" for the non-static meaning of "static", for readability
            +   (compile with -Dlocal if your debugger can't find static symbols) */
             
             typedef unsigned char  uch;
             typedef uch FAR uchf;
            @@ -122,28 +124,38 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
             #endif
             
             #ifdef AMIGA
            -#  define OS_CODE  0x01
            +#  define OS_CODE  1
             #endif
             
             #if defined(VAXC) || defined(VMS)
            -#  define OS_CODE  0x02
            +#  define OS_CODE  2
             #  define F_OPEN(name, mode) \
                  fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
             #endif
             
            +#ifdef __370__
            +#  if __TARGET_LIB__ < 0x20000000
            +#    define OS_CODE 4
            +#  elif __TARGET_LIB__ < 0x40000000
            +#    define OS_CODE 11
            +#  else
            +#    define OS_CODE 8
            +#  endif
            +#endif
            +
             #if defined(ATARI) || defined(atarist)
            -#  define OS_CODE  0x05
            +#  define OS_CODE  5
             #endif
             
             #ifdef OS2
            -#  define OS_CODE  0x06
            +#  define OS_CODE  6
             #  if defined(M_I86) && !defined(Z_SOLO)
             #    include 
             #  endif
             #endif
             
             #if defined(MACOS) || defined(TARGET_OS_MAC)
            -#  define OS_CODE  0x07
            +#  define OS_CODE  7
             #  ifndef Z_SOLO
             #    if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
             #      include  /* for fdopen */
            @@ -155,18 +167,24 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
             #  endif
             #endif
             
            -#ifdef TOPS20
            -#  define OS_CODE  0x0a
            +#ifdef __acorn
            +#  define OS_CODE 13
             #endif
             
            -#ifdef WIN32
            -#  ifndef __CYGWIN__  /* Cygwin is Unix, not Win32 */
            -#    define OS_CODE  0x0b
            -#  endif
            +#if defined(WIN32) && !defined(__CYGWIN__)
            +#  define OS_CODE  10
             #endif
             
            -#ifdef __50SERIES /* Prime/PRIMOS */
            -#  define OS_CODE  0x0f
            +#ifdef _BEOS_
            +#  define OS_CODE  16
            +#endif
            +
            +#ifdef __TOS_OS400__
            +#  define OS_CODE 18
            +#endif
            +
            +#ifdef __APPLE__
            +#  define OS_CODE 19
             #endif
             
             #if defined(_BEOS_) || defined(RISCOS)
            @@ -201,7 +219,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
                     /* common defaults */
             
             #ifndef OS_CODE
            -#  define OS_CODE  0x03  /* assume Unix */
            +#  define OS_CODE  3     /* assume Unix */
             #endif
             
             #ifndef F_OPEN
            @@ -240,7 +258,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
             #endif
             
             /* Diagnostic functions */
            -#ifdef DEBUG
            +#ifdef ZLIB_DEBUG
             #  include 
                extern int ZLIB_INTERNAL z_verbose;
                extern void ZLIB_INTERNAL z_error OF((char *m));
            diff --git a/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java b/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java
            index 78d9f7fc061..c08f0bfa868 100644
            --- a/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java
            +++ b/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 2003, 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
            @@ -617,7 +617,7 @@ final class ProcessImpl extends Process {
                 }
             
                 @Override
            -    public long getPid() {
            +    public long pid() {
                     return pid;
                 }
             
            diff --git a/jdk/src/java.base/unix/classes/module-info.java.extra b/jdk/src/java.base/unix/classes/module-info.java.extra
            index 43f85b0309a..2dc36bf4b53 100644
            --- a/jdk/src/java.base/unix/classes/module-info.java.extra
            +++ b/jdk/src/java.base/unix/classes/module-info.java.extra
            @@ -23,14 +23,5 @@
              * questions.
              */
             
            -// jdk.vm.compiler uses Unsafe and VM classes from jdk.internal.misc
            -exports jdk.internal.misc to jdk.vm.compiler;
            -opens   jdk.internal.misc to jdk.vm.compiler;
            -
            -// jdk.vm.compiler uses com.sun.crypto.provider to generate crypto intrinsics
            -opens com.sun.crypto.provider to jdk.vm.compiler;
            -
            -exports jdk.internal.module to jdk.vm.compiler;
            -
             // AOT uses jdk.internal.misc.Unsafe
             exports jdk.internal.misc to jdk.aot;
            diff --git a/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java b/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java
            index 01213c04360..878f6d52f59 100644
            --- a/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java
            +++ b/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java
            @@ -35,6 +35,7 @@ import java.net.URL;
             import java.security.GeneralSecurityException;
             import java.util.Base64;
             import java.util.Objects;
            +import java.util.Properties;
             
             import sun.net.www.HeaderParser;
             import sun.net.www.protocol.http.AuthenticationInfo;
            @@ -76,8 +77,15 @@ public class NTLMAuthentication extends AuthenticationInfo {
             
                 private String hostname;
                 /* Domain to use if not specified by user */
            -    private static String defaultDomain =
            -            GetPropertyAction.privilegedGetProperty("http.auth.ntlm.domain", "");
            +    private static final String defaultDomain;
            +    /* Whether cache is enabled for NTLM */
            +    private static final boolean ntlmCache;
            +    static {
            +        Properties props = GetPropertyAction.privilegedGetProperties();
            +        defaultDomain = props.getProperty("http.auth.ntlm.domain", "");
            +        String ntlmCacheProp = props.getProperty("jdk.ntlm.cache", "true");
            +        ntlmCache = Boolean.parseBoolean(ntlmCacheProp);
            +    }
             
                 public static boolean supportsTransparentAuth () {
                     return false;
            @@ -171,6 +179,11 @@ public class NTLMAuthentication extends AuthenticationInfo {
                     init (pw);
                 }
             
            +    @Override
            +    protected boolean useAuthCache() {
            +        return ntlmCache && super.useAuthCache();
            +    }
            +
                 /**
                  * @return true if this authentication supports preemptive authorization
                  */
            diff --git a/jdk/src/java.base/unix/native/launcher/jexec.c b/jdk/src/java.base/unix/native/launcher/jexec.c
            index d2888234674..bd6458c67a1 100644
            --- a/jdk/src/java.base/unix/native/launcher/jexec.c
            +++ b/jdk/src/java.base/unix/native/launcher/jexec.c
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 1999, 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
            @@ -332,7 +332,7 @@ const char * isJar(const char * path) {
             
                             if (end <= count) {
                                 end -= 4; // make sure there are 4 bytes to read at start
            -                    while (start < end) {
            +                    while (start <= end) {
                                     off_t xhid  = SH(buf, start);
                                     off_t xdlen = SH(buf, start + 2);
             
            diff --git a/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c b/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c
            index 6c0e1cc1cd1..2702849c4a2 100644
            --- a/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c
            +++ b/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 2014, 2016, 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
            @@ -244,7 +244,8 @@ Java_java_lang_ProcessHandleImpl_waitForProcessExit0(JNIEnv* env,
                     int status;
                     while (waitpid(pid, &status, 0) < 0) {
                         switch (errno) {
            -                case ECHILD: return 0;
            +                case ECHILD:
            +                    return java_lang_ProcessHandleImpl_NOT_A_CHILD; // No child
                             case EINTR: break;
                             default: return -1;
                         }
            @@ -269,9 +270,10 @@ Java_java_lang_ProcessHandleImpl_waitForProcessExit0(JNIEnv* env,
                     memset(&siginfo, 0, sizeof siginfo);
                     while (waitid(P_PID, pid, &siginfo, options) < 0) {
                         switch (errno) {
            -            case ECHILD: return 0;
            -            case EINTR: break;
            -            default: return -1;
            +                case ECHILD:
            +                    return java_lang_ProcessHandleImpl_NOT_A_CHILD; // No child
            +                case EINTR: break;
            +                default: return -1;
                         }
                     }
             
            diff --git a/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java b/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java
            index 988234daf51..d4063bdc606 100644
            --- a/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java
            +++ b/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 1995, 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
            @@ -523,7 +523,7 @@ final class ProcessImpl extends Process {
             
                 @Override
                 public CompletableFuture onExit() {
            -        return ProcessHandleImpl.completion(getPid(), false)
            +        return ProcessHandleImpl.completion(pid(), false)
                             .handleAsync((exitStatus, unusedThrowable) -> this);
                 }
             
            @@ -550,8 +550,8 @@ final class ProcessImpl extends Process {
                 private static native void terminateProcess(long handle);
             
                 @Override
            -    public long getPid() {
            -        return processHandle.getPid();
            +    public long pid() {
            +        return processHandle.pid();
                 }
             
                 private static native int getProcessId0(long handle);
            @@ -572,7 +572,7 @@ final class ProcessImpl extends Process {
                 @Override
                 public String toString() {
                     int exitCode = getExitCodeProcess(handle);
            -        return new StringBuilder("Process[pid=").append(getPid())
            +        return new StringBuilder("Process[pid=").append(pid())
                             .append(", exitValue=").append(exitCode == STILL_ACTIVE ? "\"not exited\"" : exitCode)
                             .append("]").toString();
                 }
            diff --git a/jdk/src/java.base/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java b/jdk/src/java.base/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java
            index 212e03e834f..a3a5059d9b7 100644
            --- a/jdk/src/java.base/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java
            +++ b/jdk/src/java.base/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java
            @@ -31,6 +31,7 @@ import java.net.PasswordAuthentication;
             import java.net.UnknownHostException;
             import java.net.URL;
             import java.util.Objects;
            +import java.util.Properties;
             import sun.net.www.HeaderParser;
             import sun.net.www.protocol.http.AuthenticationInfo;
             import sun.net.www.protocol.http.AuthScheme;
            @@ -51,12 +52,16 @@ public class NTLMAuthentication extends AuthenticationInfo {
                     NTLMAuthenticationCallback.getNTLMAuthenticationCallback();
             
                 private String hostname;
            -    private static String defaultDomain; /* Domain to use if not specified by user */
            -
            +    /* Domain to use if not specified by user */
            +    private static final String defaultDomain;
            +    /* Whether cache is enabled for NTLM */
            +    private static final boolean ntlmCache;
                 static {
            -        defaultDomain = GetPropertyAction
            -                .privilegedGetProperty("http.auth.ntlm.domain", "domain");
            -    };
            +        Properties props = GetPropertyAction.privilegedGetProperties();
            +        defaultDomain = props.getProperty("http.auth.ntlm.domain", "domain");
            +        String ntlmCacheProp = props.getProperty("jdk.ntlm.cache", "true");
            +        ntlmCache = Boolean.parseBoolean(ntlmCacheProp);
            +    }
             
                 private void init0() {
             
            @@ -136,6 +141,11 @@ public class NTLMAuthentication extends AuthenticationInfo {
                     init (pw);
                 }
             
            +    @Override
            +    protected boolean useAuthCache() {
            +        return ntlmCache && super.useAuthCache();
            +    }
            +
                 /**
                  * @return true if this authentication supports preemptive authorization
                  */
            diff --git a/jdk/src/java.base/windows/native/libjli/cmdtoargs.c b/jdk/src/java.base/windows/native/libjli/cmdtoargs.c
            index f984885ed01..955775f9d42 100644
            --- a/jdk/src/java.base/windows/native/libjli/cmdtoargs.c
            +++ b/jdk/src/java.base/windows/native/libjli/cmdtoargs.c
            @@ -205,9 +205,9 @@ void JLI_CmdToArgs(char* cmdline) {
                 size_t i, cnt;
             
                 JLI_List envArgs = JLI_List_new(1);
            -    if (JLI_AddArgsFromEnvVar(envArgs, JAVA_OPTIONS)) {
            +    if (JLI_AddArgsFromEnvVar(envArgs, JDK_JAVA_OPTIONS)) {
                     // JLI_SetTraceLauncher is not called yet
            -        // Show _JAVA_OPTIONS content along with JAVA_OPTIONS to aid diagnosis
            +        // Show _JAVA_OPTIONS content along with JDK_JAVA_OPTIONS to aid diagnosis
                     if (getenv(JLDEBUG_ENV_ENTRY)) {
                         char *tmp = getenv("_JAVA_OPTIONS");
                         if (NULL != tmp) {
            diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java
            index 6211692d5c9..ad3a56a701f 100644
            --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java
            +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java
            @@ -1,5 +1,5 @@
             /*
            - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
            + * Copyright (c) 1996, 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
            @@ -25,29 +25,27 @@
             
             package java.awt.datatransfer;
             
            -import sun.datatransfer.DataFlavorUtil;
            -
            +import java.io.IOException;
            +import java.util.Arrays;
            +import java.util.HashSet;
             import java.util.Objects;
             import java.util.Set;
            -import java.util.HashSet;
            -import java.util.Arrays;
             
            -import java.io.IOException;
            +import sun.datatransfer.DataFlavorUtil;
             
             /**
            - * A class that implements a mechanism to transfer data using
            - * cut/copy/paste operations.
            + * A class that implements a mechanism to transfer data using cut/copy/paste
            + * operations.
              * 

            - * {@link FlavorListener}s may be registered on an instance of the - * Clipboard class to be notified about changes to the set of - * {@link DataFlavor}s available on this clipboard (see - * {@link #addFlavorListener}). + * {@link FlavorListener}s may be registered on an instance of the Clipboard + * class to be notified about changes to the set of {@link DataFlavor}s + * available on this clipboard (see {@link #addFlavorListener}). * + * @author Amy Fowler + * @author Alexander Gerasimov * @see java.awt.Toolkit#getSystemClipboard * @see java.awt.Toolkit#getSystemSelection - * - * @author Amy Fowler - * @author Alexander Gerasimov + * @since 1.1 */ public class Clipboard { @@ -57,6 +55,7 @@ public class Clipboard { * The owner of the clipboard. */ protected ClipboardOwner owner; + /** * Contents of the clipboard. */ @@ -70,9 +69,9 @@ public class Clipboard { private Set flavorListeners; /** - * A set of DataFlavors that is available on - * this local clipboard. It is used for tracking changes - * of DataFlavors available on this clipboard. + * A set of {@code DataFlavor}s that is available on this local clipboard. + * It is used for tracking changes of {@code DataFlavor}s available on this + * clipboard. * * @since 1.5 */ @@ -80,7 +79,8 @@ public class Clipboard { /** * Creates a clipboard object. - * @param name for the clipboard + * + * @param name for the clipboard * @see java.awt.Toolkit#getSystemClipboard */ public Clipboard(String name) { @@ -89,8 +89,8 @@ public class Clipboard { /** * Returns the name of this clipboard object. - * @return the name of this clipboard object * + * @return the name of this clipboard object * @see java.awt.Toolkit#getSystemClipboard */ public String getName() { @@ -98,27 +98,25 @@ public class Clipboard { } /** - * Sets the current contents of the clipboard to the specified - * transferable object and registers the specified clipboard owner - * as the owner of the new contents. + * Sets the current contents of the clipboard to the specified transferable + * object and registers the specified clipboard owner as the owner of the + * new contents. *

            - * If there is an existing owner different from the argument - * owner, that owner is notified that it no longer - * holds ownership of the clipboard contents via an invocation - * of ClipboardOwner.lostOwnership() on that owner. - * An implementation of setContents() is free not - * to invoke lostOwnership() directly from this method. - * For example, lostOwnership() may be invoked later on - * a different thread. The same applies to FlavorListeners - * registered on this clipboard. + * If there is an existing owner different from the argument {@code owner}, + * that owner is notified that it no longer holds ownership of the clipboard + * contents via an invocation of {@code ClipboardOwner.lostOwnership()} on + * that owner. An implementation of {@code setContents()} is free not to + * invoke {@code lostOwnership()} directly from this method. For example, + * {@code lostOwnership()} may be invoked later on a different thread. The + * same applies to {@code FlavorListener}s registered on this clipboard. *

            - * The method throws IllegalStateException if the clipboard - * is currently unavailable. For example, on some platforms, the system + * The method throws {@code IllegalStateException} if the clipboard is + * currently unavailable. For example, on some platforms, the system * clipboard is unavailable while it is accessed by another application. * - * @param contents the transferable object representing the - * clipboard content - * @param owner the object which owns the clipboard content + * @param contents the transferable object representing the clipboard + * content + * @param owner the object which owns the clipboard content * @throws IllegalStateException if the clipboard is currently unavailable * @see java.awt.Toolkit#getSystemClipboard */ @@ -137,15 +135,14 @@ public class Clipboard { } /** - * Returns a transferable object representing the current contents - * of the clipboard. If the clipboard currently has no contents, - * it returns null. The parameter Object requestor is - * not currently used. The method throws - * IllegalStateException if the clipboard is currently - * unavailable. For example, on some platforms, the system clipboard is + * Returns a transferable object representing the current contents of the + * clipboard. If the clipboard currently has no contents, it returns + * {@code null}. The parameter Object requestor is not currently used. The + * method throws {@code IllegalStateException} if the clipboard is currently + * unavailable. For example, on some platforms, the system clipboard is * unavailable while it is accessed by another application. * - * @param requestor the object requesting the clip data (not used) + * @param requestor the object requesting the clip data (not used) * @return the current transferable object on the clipboard * @throws IllegalStateException if the clipboard is currently unavailable * @see java.awt.Toolkit#getSystemClipboard @@ -154,18 +151,14 @@ public class Clipboard { return contents; } - /** - * Returns an array of DataFlavors in which the current - * contents of this clipboard can be provided. If there are no - * DataFlavors available, this method returns a zero-length - * array. - * - * @return an array of DataFlavors in which the current - * contents of this clipboard can be provided + * Returns an array of {@code DataFlavor}s in which the current contents of + * this clipboard can be provided. If there are no {@code DataFlavor}s + * available, this method returns a zero-length array. * + * @return an array of {@code DataFlavor}s in which the current contents of + * this clipboard can be provided * @throws IllegalStateException if this clipboard is currently unavailable - * * @since 1.5 */ public DataFlavor[] getAvailableDataFlavors() { @@ -178,17 +171,14 @@ public class Clipboard { /** * Returns whether or not the current contents of this clipboard can be - * provided in the specified DataFlavor. + * provided in the specified {@code DataFlavor}. * - * @param flavor the requested DataFlavor for the contents - * - * @return true if the current contents of this clipboard - * can be provided in the specified DataFlavor; - * false otherwise - * - * @throws NullPointerException if flavor is null + * @param flavor the requested {@code DataFlavor} for the contents + * @return {@code true} if the current contents of this clipboard can be + * provided in the specified {@code DataFlavor}; {@code false} + * otherwise + * @throws NullPointerException if {@code flavor} is {@code null} * @throws IllegalStateException if this clipboard is currently unavailable - * * @since 1.5 */ public boolean isDataFlavorAvailable(DataFlavor flavor) { @@ -204,25 +194,20 @@ public class Clipboard { } /** - * Returns an object representing the current contents of this clipboard - * in the specified DataFlavor. - * The class of the object returned is defined by the representation - * class of flavor. + * Returns an object representing the current contents of this clipboard in + * the specified {@code DataFlavor}. The class of the object returned is + * defined by the representation class of {@code flavor}. * - * @param flavor the requested DataFlavor for the contents - * - * @return an object representing the current contents of this clipboard - * in the specified DataFlavor - * - * @throws NullPointerException if flavor is null + * @param flavor the requested {@code DataFlavor} for the contents + * @return an object representing the current contents of this clipboard in + * the specified {@code DataFlavor} + * @throws NullPointerException if {@code flavor} is {@code null} * @throws IllegalStateException if this clipboard is currently unavailable - * @throws UnsupportedFlavorException if the requested DataFlavor - * is not available - * @throws IOException if the data in the requested DataFlavor - * can not be retrieved - * + * @throws UnsupportedFlavorException if the requested {@code DataFlavor} is + * not available + * @throws IOException if the data in the requested {@code DataFlavor} can + * not be retrieved * @see DataFlavor#getRepresentationClass - * * @since 1.5 */ public Object getData(DataFlavor flavor) @@ -238,15 +223,12 @@ public class Clipboard { return cntnts.getTransferData(flavor); } - /** - * Registers the specified FlavorListener to receive - * FlavorEvents from this clipboard. - * If listener is null, no exception - * is thrown and no action is performed. - * - * @param listener the listener to be added + * Registers the specified {@code FlavorListener} to receive + * {@code FlavorEvent}s from this clipboard. If {@code listener} is + * {@code null}, no exception is thrown and no action is performed. * + * @param listener the listener to be added * @see #removeFlavorListener * @see #getFlavorListeners * @see FlavorListener @@ -267,16 +249,14 @@ public class Clipboard { } /** - * Removes the specified FlavorListener so that it no longer - * receives FlavorEvents from this Clipboard. - * This method performs no function, nor does it throw an exception, if - * the listener specified by the argument was not previously added to this - * Clipboard. - * If listener is null, no exception - * is thrown and no action is performed. - * - * @param listener the listener to be removed + * Removes the specified {@code FlavorListener} so that it no longer + * receives {@code FlavorEvent}s from this {@code Clipboard}. This method + * performs no function, nor does it throw an exception, if the listener + * specified by the argument was not previously added to this + * {@code Clipboard}. If {@code listener} is {@code null}, no exception is + * thrown and no action is performed. * + * @param listener the listener to be removed * @see #addFlavorListener * @see #getFlavorListeners * @see FlavorListener @@ -291,11 +271,11 @@ public class Clipboard { } /** - * Returns an array of all the FlavorListeners currently - * registered on this Clipboard. + * Returns an array of all the {@code FlavorListener}s currently registered + * on this {@code Clipboard}. * - * @return all of this clipboard's FlavorListeners or an empty - * array if no listeners are currently registered + * @return all of this clipboard's {@code FlavorListener}s or an empty array + * if no listeners are currently registered * @see #addFlavorListener * @see #removeFlavorListener * @see FlavorListener @@ -308,9 +288,9 @@ public class Clipboard { } /** - * Checks change of the DataFlavors and, if necessary, - * notifies all listeners that have registered interest for notification - * on FlavorEvents. + * Checks change of the {@code DataFlavor}s and, if necessary, notifies all + * listeners that have registered interest for notification on + * {@code FlavorEvent}s. * * @since 1.5 */ @@ -330,12 +310,11 @@ public class Clipboard { } /** - * Returns a set of DataFlavors currently available - * on this clipboard. - * - * @return a set of DataFlavors currently available - * on this clipboard + * Returns a set of {@code DataFlavor}s currently available on this + * clipboard. * + * @return a set of {@code DataFlavor}s currently available on this + * clipboard * @since 1.5 */ private Set getAvailableDataFlavorSet() { diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java index 4c68a3b5624..03fc7b37f75 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -26,31 +26,28 @@ package java.awt.datatransfer; /** - * Defines the interface for classes that will provide data to - * a clipboard. An instance of this interface becomes the owner - * of the contents of a clipboard (clipboard owner) if it is - * passed as an argument to - * {@link java.awt.datatransfer.Clipboard#setContents} method of - * the clipboard and this method returns successfully. - * The instance remains the clipboard owner until another application - * or another object within this application asserts ownership - * of this clipboard. + * Defines the interface for classes that will provide data to a clipboard. An + * instance of this interface becomes the owner of the contents of a clipboard + * (clipboard owner) if it is passed as an argument to + * {@link Clipboard#setContents} method of the clipboard and this method returns + * successfully. The instance remains the clipboard owner until another + * application or another object within this application asserts ownership of + * this clipboard. * - * @see java.awt.datatransfer.Clipboard - * - * @author Amy Fowler + * @author Amy Fowler + * @see Clipboard + * @since 1.1 */ - public interface ClipboardOwner { /** - * Notifies this object that it is no longer the clipboard owner. - * This method will be called when another application or another - * object within this application asserts ownership of the clipboard. + * Notifies this object that it is no longer the clipboard owner. This + * method will be called when another application or another object within + * this application asserts ownership of the clipboard. * - * @param clipboard the clipboard that is no longer owned - * @param contents the contents which this owner had placed on the clipboard + * @param clipboard the clipboard that is no longer owned + * @param contents the contents which this owner had placed on the + * {@code clipboard} */ public void lostOwnership(Clipboard clipboard, Transferable contents); - } diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java index becfd0563ba..9d3df2aa0cd 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -25,9 +25,6 @@ package java.awt.datatransfer; -import sun.datatransfer.DataFlavorUtil; -import sun.reflect.misc.ReflectUtil; - import java.io.ByteArrayInputStream; import java.io.CharArrayReader; import java.io.Externalizable; @@ -46,54 +43,52 @@ import java.util.Arrays; import java.util.Collections; import java.util.Objects; +import sun.datatransfer.DataFlavorUtil; +import sun.reflect.misc.ReflectUtil; + /** * A {@code DataFlavor} provides meta information about data. {@code DataFlavor} - * is typically used to access data on the clipboard, or during - * a drag and drop operation. + * is typically used to access data on the clipboard, or during a drag and drop + * operation. *

            - * An instance of {@code DataFlavor} encapsulates a content type as - * defined in RFC 2045 - * and RFC 2046. - * A content type is typically referred to as a MIME type. + * An instance of {@code DataFlavor} encapsulates a content type as defined in + * RFC 2045 and + * RFC 2046. A content type is + * typically referred to as a MIME type. *

            - * A content type consists of a media type (referred - * to as the primary type), a subtype, and optional parameters. See - * RFC 2045 - * for details on the syntax of a MIME type. + * A content type consists of a media type (referred to as the primary type), a + * subtype, and optional parameters. See + * RFC 2045 for details on the + * syntax of a MIME type. *

            - * The JRE data transfer implementation interprets the parameter "class" - * of a MIME type as a representation class. - * The representation class reflects the class of the object being - * transferred. In other words, the representation class is the type of - * object returned by {@link Transferable#getTransferData}. - * For example, the MIME type of {@link #imageFlavor} is - * {@code "image/x-java-image;class=java.awt.Image"}, - * the primary type is {@code image}, the subtype is - * {@code x-java-image}, and the representation class is - * {@code java.awt.Image}. When {@code getTransferData} is invoked - * with a {@code DataFlavor} of {@code imageFlavor}, an instance of - * {@code java.awt.Image} is returned. - * It's important to note that {@code DataFlavor} does no error checking - * against the representation class. It is up to consumers of - * {@code DataFlavor}, such as {@code Transferable}, to honor the representation - * class. + * The JRE data transfer implementation interprets the parameter + * "class" of a MIME type as a representation class. The + * representation class reflects the class of the object being transferred. In + * other words, the representation class is the type of object returned by + * {@link Transferable#getTransferData}. For example, the MIME type of + * {@link #imageFlavor} is {@code "image/x-java-image;class=java.awt.Image"}, + * the primary type is {@code image}, the subtype is {@code x-java-image}, and + * the representation class is {@code java.awt.Image}. When + * {@code getTransferData} is invoked with a {@code DataFlavor} of + * {@code imageFlavor}, an instance of {@code java.awt.Image} is returned. It's + * important to note that {@code DataFlavor} does no error checking against the + * representation class. It is up to consumers of {@code DataFlavor}, such as + * {@code Transferable}, to honor the representation class. *
            - * Note, if you do not specify a representation class when - * creating a {@code DataFlavor}, the default - * representation class is used. See appropriate documentation for - * {@code DataFlavor}'s constructors. + * Note, if you do not specify a representation class when creating a + * {@code DataFlavor}, the default representation class is used. See appropriate + * documentation for {@code DataFlavor}'s constructors. *

            - * Also, {@code DataFlavor} instances with the "text" primary - * MIME type may have a "charset" parameter. Refer to + * Also, {@code DataFlavor} instances with the "text" primary MIME + * type may have a "charset" parameter. Refer to * RFC 2046 and - * {@link #selectBestTextFlavor} for details on "text" MIME types - * and the "charset" parameter. + * {@link #selectBestTextFlavor} for details on "text" MIME types and + * the "charset" parameter. *

            - * Equality of {@code DataFlavors} is determined by the primary type, - * subtype, and representation class. Refer to {@link #equals(DataFlavor)} for - * details. When determining equality, any optional parameters are ignored. - * For example, the following produces two {@code DataFlavors} that - * are considered identical: + * Equality of {@code DataFlavors} is determined by the primary type, subtype, + * and representation class. Refer to {@link #equals(DataFlavor)} for details. + * When determining equality, any optional parameters are ignored. For example, + * the following produces two {@code DataFlavors} that are considered identical: *

              *   DataFlavor flavor1 = new DataFlavor(Object.class, "X-test/test; class=<java.lang.Object>; foo=bar");
              *   DataFlavor flavor2 = new DataFlavor(Object.class, "X-test/test; class=<java.lang.Object>; x=y");
            @@ -104,14 +99,15 @@ import java.util.Objects;
              * As such, asking a {@code Transferable} for either {@code DataFlavor} returns
              * the same results.
              * 

            - * For more information on using data transfer with Swing see - * the - * How to Use Drag and Drop and Data Transfer, - * section in Java Tutorial. + * For more information on using data transfer with Swing see the + * How + * to Use Drag and Drop and Data Transfer, section in + * The Java Tutorial. * - * @author Blake Sullivan - * @author Laurence P. G. Cable - * @author Jeff Dunn + * @author Blake Sullivan + * @author Laurence P. G. Cable + * @author Jeff Dunn + * @since 1.1 */ public class DataFlavor implements Externalizable, Cloneable { @@ -119,13 +115,13 @@ public class DataFlavor implements Externalizable, Cloneable { private static final Class ioInputStreamClass = InputStream.class; /** - * Tries to load a class from: the bootstrap loader, the system loader, - * the context loader (if one is present) and finally the loader specified. + * Tries to load a class from: the bootstrap loader, the system loader, the + * context loader (if one is present) and finally the loader specified. * - * @param className the name of the class to be loaded - * @param fallback the fallback loader + * @param className the name of the class to be loaded + * @param fallback the fallback loader * @return the class loaded - * @exception ClassNotFoundException if class is not found + * @throws ClassNotFoundException if class is not found */ protected static final Class tryToLoadClass(String className, ClassLoader fallback) @@ -195,99 +191,99 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * The DataFlavor representing a Java Unicode String class, - * where: + * The {@code DataFlavor} representing a Java Unicode String class, where: *

                  *     representationClass = java.lang.String
            -     *     mimeType           = "application/x-java-serialized-object"
            +     *     mimeType            = "application/x-java-serialized-object"
                  * 
            */ public static final DataFlavor stringFlavor = createConstant(java.lang.String.class, "Unicode String"); /** - * The DataFlavor representing a Java Image class, - * where: + * The {@code DataFlavor} representing a Java Image class, where: *
                  *     representationClass = java.awt.Image
                  *     mimeType            = "image/x-java-image"
                  * 
            + * Will be {@code null} if {@code java.awt.Image} is not visible, the + * {@code java.desktop} module is not loaded, or the {@code java.desktop} + * module is not in the run-time image. */ public static final DataFlavor imageFlavor = createConstant("image/x-java-image; class=java.awt.Image", "Image"); /** - * The DataFlavor representing plain text with Unicode - * encoding, where: + * The {@code DataFlavor} representing plain text with Unicode encoding, + * where: *
                  *     representationClass = InputStream
                  *     mimeType            = "text/plain; charset=unicode"
                  * 
            - * This DataFlavor has been deprecated because - * (1) Its representation is an InputStream, an 8-bit based representation, - * while Unicode is a 16-bit character set; and (2) The charset "unicode" - * is not well-defined. "unicode" implies a particular platform's - * implementation of Unicode, not a cross-platform implementation. + * This {@code DataFlavor} has been deprecated because: + *
              + *
            • Its representation is an InputStream, an 8-bit based representation, + * while Unicode is a 16-bit character set
            • + *
            • The charset "unicode" is not well-defined. "unicode" implies a + * particular platform's implementation of Unicode, not a cross-platform + * implementation
            • + *
            * - * @deprecated as of 1.3. Use DataFlavor.getReaderForText(Transferable) - * instead of Transferable.getTransferData(DataFlavor.plainTextFlavor). + * @deprecated as of 1.3. Use {@link #getReaderForText} instead of + * {@code Transferable.getTransferData(DataFlavor.plainTextFlavor)}. */ @Deprecated public static final DataFlavor plainTextFlavor = createConstant("text/plain; charset=unicode; class=java.io.InputStream", "Plain Text"); /** - * A MIME Content-Type of application/x-java-serialized-object represents - * a graph of Java object(s) that have been made persistent. - * - * The representation class associated with this DataFlavor - * identifies the Java type of an object returned as a reference - * from an invocation java.awt.datatransfer.getTransferData. + * A MIME Content-Type of application/x-java-serialized-object represents a + * graph of Java object(s) that have been made persistent. + *

            + * The representation class associated with this {@code DataFlavor} + * identifies the Java type of an object returned as a reference from an + * invocation {@code java.awt.datatransfer.getTransferData}. */ public static final String javaSerializedObjectMimeType = "application/x-java-serialized-object"; /** - * To transfer a list of files to/from Java (and the underlying - * platform) a DataFlavor of this type/subtype and - * representation class of java.util.List is used. - * Each element of the list is required/guaranteed to be of type - * java.io.File. + * To transfer a list of files to/from Java (and the underlying platform) a + * {@code DataFlavor} of this type/subtype and representation class of + * {@code java.util.List} is used. Each element of the list is + * required/guaranteed to be of type {@code java.io.File}. */ public static final DataFlavor javaFileListFlavor = createConstant("application/x-java-file-list;class=java.util.List", null); /** - * To transfer a reference to an arbitrary Java object reference that - * has no associated MIME Content-type, across a Transferable - * interface WITHIN THE SAME JVM, a DataFlavor - * with this type/subtype is used, with a representationClass - * equal to the type of the class/interface being passed across the - * Transferable. + * To transfer a reference to an arbitrary Java object reference that has no + * associated MIME Content-type, across a {@code Transferable} interface + * WITHIN THE SAME JVM, a {@code DataFlavor} with this type/subtype is used, + * with a {@code representationClass} equal to the type of the + * class/interface being passed across the {@code Transferable}. *

            - * The object reference returned from - * Transferable.getTransferData for a DataFlavor - * with this MIME Content-Type is required to be - * an instance of the representation Class of the DataFlavor. + * The object reference returned from {@code Transferable.getTransferData} + * for a {@code DataFlavor} with this MIME Content-Type is required to be an + * instance of the representation Class of the {@code DataFlavor}. */ public static final String javaJVMLocalObjectMimeType = "application/x-java-jvm-local-objectref"; /** * In order to pass a live link to a Remote object via a Drag and Drop - * ACTION_LINK operation a Mime Content Type of - * application/x-java-remote-object should be used, - * where the representation class of the DataFlavor - * represents the type of the Remote interface to be - * transferred. + * {@code ACTION_LINK} operation a Mime Content Type of + * application/x-java-remote-object should be used, where the representation + * class of the {@code DataFlavor} represents the type of the {@code Remote} + * interface to be transferred. */ public static final String javaRemoteObjectMimeType = "application/x-java-remote-object"; /** * Represents a piece of an HTML markup. The markup consists of the part * selected on the source side. Therefore some tags in the markup may be - * unpaired. If the flavor is used to represent the data in - * a {@link Transferable} instance, no additional changes will be made. - * This DataFlavor instance represents the same HTML markup as DataFlavor + * unpaired. If the flavor is used to represent the data in a + * {@link Transferable} instance, no additional changes will be made. This + * DataFlavor instance represents the same HTML markup as DataFlavor * instances which content MIME type does not contain document parameter * and representation class is the String class. *

                  *     representationClass = String
            -     *     mimeType           = "text/html"
            +     *     mimeType            = "text/html"
                  * 
            * * @since 1.8 @@ -296,12 +292,12 @@ public class DataFlavor implements Externalizable, Cloneable { /** * Represents a piece of an HTML markup. If possible, the markup received - * from a native system is supplemented with pair tags to be - * a well-formed HTML markup. If the flavor is used to represent the data in - * a {@link Transferable} instance, no additional changes will be made. + * from a native system is supplemented with pair tags to be a well-formed + * HTML markup. If the flavor is used to represent the data in a + * {@link Transferable} instance, no additional changes will be made. *
                  *     representationClass = String
            -     *     mimeType           = "text/html"
            +     *     mimeType            = "text/html"
                  * 
            * * @since 1.8 @@ -309,25 +305,23 @@ public class DataFlavor implements Externalizable, Cloneable { public static DataFlavor fragmentHtmlFlavor = initHtmlDataFlavor("fragment"); /** - * Represents a piece of an HTML markup. If possible, the markup - * received from a native system is supplemented with additional - * tags to make up a well-formed HTML document. If the flavor is used to - * represent the data in a {@link Transferable} instance, - * no additional changes will be made. + * Represents a piece of an HTML markup. If possible, the markup received + * from a native system is supplemented with additional tags to make up a + * well-formed HTML document. If the flavor is used to represent the data in + * a {@link Transferable} instance, no additional changes will be made. *
                  *     representationClass = String
            -     *     mimeType           = "text/html"
            +     *     mimeType            = "text/html"
                  * 
            * * @since 1.8 */ - public static DataFlavor allHtmlFlavor = initHtmlDataFlavor("all"); + public static DataFlavor allHtmlFlavor = initHtmlDataFlavor("all"); /** - * Constructs a new DataFlavor. This constructor is - * provided only for the purpose of supporting the - * Externalizable interface. It is not - * intended for public (client) use. + * Constructs a new {@code DataFlavor}. This constructor is provided only + * for the purpose of supporting the {@code Externalizable} interface. It is + * not intended for public (client) use. * * @since 1.2 */ @@ -336,10 +330,10 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Constructs a fully specified DataFlavor. + * Constructs a fully specified {@code DataFlavor}. * - * @exception NullPointerException if either primaryType, - * subType or representationClass is null + * @throws NullPointerException if either {@code primaryType}, + * {@code subType} or {@code representationClass} is {@code null} */ private DataFlavor(String primaryType, String subType, MimeTypeParameterList params, Class representationClass, String humanPresentableName) { super(); @@ -377,19 +371,21 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Constructs a DataFlavor that represents a Java class. + * Constructs a {@code DataFlavor} that represents a Java class. *

            - * The returned DataFlavor will have the following - * characteristics: + * The returned {@code DataFlavor} will have the following characteristics: *

                  *    representationClass = representationClass
                  *    mimeType            = application/x-java-serialized-object
                  * 
            - * @param representationClass the class used to transfer data in this flavor - * @param humanPresentableName the human-readable string used to identify - * this flavor; if this parameter is null - * then the value of the MIME Content Type is used - * @exception NullPointerException if representationClass is null + * + * @param representationClass the class used to transfer data in this + * flavor + * @param humanPresentableName the human-readable string used to identify + * this flavor; if this parameter is {@code null} then the value of + * the MIME Content Type is used + * @throws NullPointerException if {@code representationClass} is + * {@code null} */ public DataFlavor(Class representationClass, String humanPresentableName) { this("application", "x-java-serialized-object", null, representationClass, humanPresentableName); @@ -399,33 +395,31 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Constructs a DataFlavor that represents a - * MimeType. + * Constructs a {@code DataFlavor} that represents a {@code MimeType}. *

            - * The returned DataFlavor will have the following - * characteristics: + * The returned {@code DataFlavor} will have the following characteristics: *

            - * If the mimeType is + * If the {@code mimeType} is * "application/x-java-serialized-object; class=<representation class>", * the result is the same as calling - * new DataFlavor(Class.forName(<representation class>). + * {@code new DataFlavor(Class.forName()}. *

            * Otherwise: *

                  *     representationClass = InputStream
                  *     mimeType            = mimeType
                  * 
            - * @param mimeType the string used to identify the MIME type for this flavor; - * if the mimeType does not specify a - * "class=" parameter, or if the class is not successfully - * loaded, then an IllegalArgumentException - * is thrown - * @param humanPresentableName the human-readable string used to identify - * this flavor; if this parameter is null - * then the value of the MIME Content Type is used - * @exception IllegalArgumentException if mimeType is - * invalid or if the class is not successfully loaded - * @exception NullPointerException if mimeType is null + * + * @param mimeType the string used to identify the MIME type for this + * flavor; if the {@code mimeType} does not specify a "class=" + * parameter, or if the class is not successfully loaded, then an + * {@code IllegalArgumentException} is thrown + * @param humanPresentableName the human-readable string used to identify + * this flavor; if this parameter is {@code null} then the value of + * the MIME Content Type is used + * @throws IllegalArgumentException if {@code mimeType} is invalid or if the + * class is not successfully loaded + * @throws NullPointerException if {@code mimeType} is {@code null} */ public DataFlavor(String mimeType, String humanPresentableName) { super(); @@ -442,30 +436,29 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Constructs a DataFlavor that represents a - * MimeType. + * Constructs a {@code DataFlavor} that represents a {@code MimeType}. *

            - * The returned DataFlavor will have the following - * characteristics: + * The returned {@code DataFlavor} will have the following characteristics: *

            * If the mimeType is * "application/x-java-serialized-object; class=<representation class>", * the result is the same as calling - * new DataFlavor(Class.forName(<representation class>). + * {@code new DataFlavor(Class.forName()}. *

            * Otherwise: *

                  *     representationClass = InputStream
                  *     mimeType            = mimeType
                  * 
            - * @param mimeType the string used to identify the MIME type for this flavor - * @param humanPresentableName the human-readable string used to - * identify this flavor - * @param classLoader the class loader to use - * @exception ClassNotFoundException if the class is not loaded - * @exception IllegalArgumentException if mimeType is - * invalid - * @exception NullPointerException if mimeType is null + * + * @param mimeType the string used to identify the MIME type for this + * flavor + * @param humanPresentableName the human-readable string used to identify + * this flavor + * @param classLoader the class loader to use + * @throws ClassNotFoundException if the class is not loaded + * @throws IllegalArgumentException if {@code mimeType} is invalid + * @throws NullPointerException if {@code mimeType} is {@code null} */ public DataFlavor(String mimeType, String humanPresentableName, ClassLoader classLoader) throws ClassNotFoundException { super(); @@ -480,20 +473,19 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Constructs a DataFlavor from a mimeType string. - * The string can specify a "class=<fully specified Java class name>" - * parameter to create a DataFlavor with the desired - * representation class. If the string does not contain "class=" parameter, - * java.io.InputStream is used as default. + * Constructs a {@code DataFlavor} from a {@code mimeType} string. The + * string can specify a "class=<fully specified Java class name>" + * parameter to create a {@code DataFlavor} with the desired representation + * class. If the string does not contain "class=" parameter, + * {@code java.io.InputStream} is used as default. * - * @param mimeType the string used to identify the MIME type for this flavor; - * if the class specified by "class=" parameter is not - * successfully loaded, then an - * ClassNotFoundException is thrown - * @exception ClassNotFoundException if the class is not loaded - * @exception IllegalArgumentException if mimeType is - * invalid - * @exception NullPointerException if mimeType is null + * @param mimeType the string used to identify the MIME type for this + * flavor; if the class specified by "class=" parameter is not + * successfully loaded, then a {@code ClassNotFoundException} is + * thrown + * @throws ClassNotFoundException if the class is not loaded + * @throws IllegalArgumentException if {@code mimeType} is invalid + * @throws NullPointerException if {@code mimeType} is {@code null} */ public DataFlavor(String mimeType) throws ClassNotFoundException { super(); @@ -507,20 +499,17 @@ public class DataFlavor implements Externalizable, Cloneable { } } - /** - * Common initialization code called from various constructors. - * - * @param mimeType the MIME Content Type (must have a class= param) - * @param humanPresentableName the human Presentable Name or - * null - * @param classLoader the fallback class loader to resolve against - * - * @throws MimeTypeParseException - * @throws ClassNotFoundException - * @throws NullPointerException if mimeType is null - * - * @see #tryToLoadClass - */ + /** + * Common initialization code called from various constructors. + * + * @param mimeType the MIME Content Type (must have a class= param) + * @param humanPresentableName the human Presentable Name or {@code null} + * @param classLoader the fallback class loader to resolve against + * @throws MimeTypeParseException + * @throws ClassNotFoundException + * @throws NullPointerException if {@code mimeType} is {@code null} + * @see #tryToLoadClass + */ private void initialize(String mimeType, String humanPresentableName, ClassLoader classLoader) throws MimeTypeParseException, ClassNotFoundException { if (mimeType == null) { throw new NullPointerException("mimeType"); @@ -554,15 +543,15 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * String representation of this DataFlavor and its - * parameters. The resulting String contains the name of - * the DataFlavor class, this flavor's MIME type, and its - * representation class. If this flavor has a primary MIME type of "text", - * supports the charset parameter, and has an encoded representation, the - * flavor's charset is also included. See selectBestTextFlavor - * for a list of text flavors which support the charset parameter. + * String representation of this {@code DataFlavor} and its parameters. The + * resulting {@code String} contains the name of the {@code DataFlavor} + * class, this flavor's MIME type, and its representation class. If this + * flavor has a primary MIME type of "text", supports the charset parameter, + * and has an encoded representation, the flavor's charset is also included. + * See {@code selectBestTextFlavor} for a list of text flavors which support + * the charset parameter. * - * @return string representation of this DataFlavor + * @return string representation of this {@code DataFlavor} * @see #selectBestTextFlavor */ public String toString() { @@ -596,19 +585,19 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Returns a DataFlavor representing plain text with Unicode + * Returns a {@code DataFlavor} representing plain text with Unicode * encoding, where: *
                  *     representationClass = java.io.InputStream
                  *     mimeType            = "text/plain;
                  *                            charset=<platform default Unicode encoding>"
                  * 
            - * Sun's implementation for Microsoft Windows uses the encoding utf-16le. - * Sun's implementation for Solaris and Linux uses the encoding - * iso-10646-ucs-2. + * @implNote Oracle's implementation for Microsoft Windows and macOS uses + * the encoding {@code utf-16le}. Oracle's implementation for Solaris and + * Linux uses the encoding {@code iso-10646-ucs-2}. * - * @return a DataFlavor representing plain text - * with Unicode encoding + * @return a {@code DataFlavor} representing plain text with Unicode + * encoding * @since 1.3 */ public static final DataFlavor getTextPlainUnicodeFlavor() { @@ -618,10 +607,10 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Selects the best text DataFlavor from an array of - * DataFlavors. Only DataFlavor.stringFlavor, and - * equivalent flavors, and flavors that have a primary MIME type of "text", - * are considered for selection. + * Selects the best text {@code DataFlavor} from an array of + * {@code DataFlavor}s. Only {@code DataFlavor.stringFlavor}, and equivalent + * flavors, and flavors that have a primary MIME type of "text", are + * considered for selection. *

            * Flavors are first sorted by their MIME types in the following order: *

              @@ -643,9 +632,10 @@ public class DataFlavor implements Externalizable, Cloneable { *
            • "text/plain" *
            • "text/<other>" *
            - *

            For example, "text/sgml" will be selected over - * "text/html", and DataFlavor.stringFlavor will be chosen - * over DataFlavor.plainTextFlavor. + *

            + * For example, "text/sgml" will be selected over "text/html", and + * {@code DataFlavor.stringFlavor} will be chosen over + * {@code DataFlavor.plainTextFlavor}. *

            * If two or more flavors share the best MIME type in the array, then that * MIME type will be checked to see if it supports the charset parameter. @@ -665,8 +655,8 @@ public class DataFlavor implements Externalizable, Cloneable { *

          • "application/x-java-serialized-object" *
          • "text/plain" * - * The following MIME types do not support, or are treated as though they - * do not support, the charset parameter: + * The following MIME types do not support, or are treated as though they do + * not support, the charset parameter: *
              *
            • "text/rtf" *
            • "text/tab-separated-values" @@ -676,25 +666,24 @@ public class DataFlavor implements Externalizable, Cloneable { *
            * For "text/<other>" MIME types, the first time the JRE needs to * determine whether the MIME type supports the charset parameter, it will - * check whether the parameter is explicitly listed in an arbitrarily - * chosen DataFlavor which uses that MIME type. If so, the JRE - * will assume from that point on that the MIME type supports the charset - * parameter and will not check again. If the parameter is not explicitly - * listed, the JRE will assume from that point on that the MIME type does - * not support the charset parameter and will not check again. Because - * this check is performed on an arbitrarily chosen - * DataFlavor, developers must ensure that all - * DataFlavors with a "text/<other>" MIME type specify - * the charset parameter if it is supported by that MIME type. Developers - * should never rely on the JRE to substitute the platform's default - * charset for a "text/<other>" DataFlavor. Failure to adhere to this - * restriction will lead to undefined behavior. + * check whether the parameter is explicitly listed in an arbitrarily chosen + * {@code DataFlavor} which uses that MIME type. If so, the JRE will assume + * from that point on that the MIME type supports the charset parameter and + * will not check again. If the parameter is not explicitly listed, the JRE + * will assume from that point on that the MIME type does not support the + * charset parameter and will not check again. Because this check is + * performed on an arbitrarily chosen {@code DataFlavor}, developers must + * ensure that all {@code DataFlavor}s with a "text/<other>" MIME type + * specify the charset parameter if it is supported by that MIME type. + * Developers should never rely on the JRE to substitute the platform's + * default charset for a "text/<other>" DataFlavor. Failure to adhere + * to this restriction will lead to undefined behavior. *

            * If the best MIME type in the array does not support the charset * parameter, the flavors which share that MIME type will then be sorted by * their representation classes in the following order: - * java.io.InputStream, java.nio.ByteBuffer, - * [B, <all others>. + * {@code java.io.InputStream}, {@code java.nio.ByteBuffer}, {@code [B}, + * <all others>. *

            * If two or more flavors share the best representation class, or if no * flavor has one of the three specified representations, then one of those @@ -702,9 +691,9 @@ public class DataFlavor implements Externalizable, Cloneable { *

            * If the best MIME type in the array does support the charset parameter, * the flavors which share that MIME type will then be sorted by their - * representation classes in the following order: - * java.io.Reader, java.lang.String, - * java.nio.CharBuffer, [C, <all others>. + * representation classes in the following order: {@code java.io.Reader}, + * {@code java.lang.String}, {@code java.nio.CharBuffer}, {@code [C}, + * <all others>. *

            * If two or more flavors share the best representation class, and that * representation is one of the four explicitly listed, then one of those @@ -714,23 +703,22 @@ public class DataFlavor implements Externalizable, Cloneable { * "UTF-16BE", "UTF-16LE", and their aliases, are considered best. After * them, the platform default charset and its aliases are selected. * "US-ASCII" and its aliases are worst. All other charsets are chosen in - * alphabetical order, but only charsets supported by this implementation - * of the Java platform will be considered. + * alphabetical order, but only charsets supported by this implementation of + * the Java platform will be considered. *

            * If two or more flavors share the best charset, the flavors will then * again be sorted by their representation classes in the following order: - * java.io.InputStream, java.nio.ByteBuffer, - * [B, <all others>. + * {@code java.io.InputStream}, {@code java.nio.ByteBuffer}, {@code [B}, + * <all others>. *

            * If two or more flavors share the best representation class, or if no * flavor has one of the three specified representations, then one of those * flavors will be chosen non-deterministically. * - * @param availableFlavors an array of available DataFlavors + * @param availableFlavors an array of available {@code DataFlavor}s * @return the best (highest fidelity) flavor according to the rules - * specified above, or null, - * if availableFlavors is null, - * has zero length, or contains no text flavors + * specified above, or {@code null}, if {@code availableFlavors} is + * {@code null}, has zero length, or contains no text flavors * @since 1.3 */ public static final DataFlavor selectBestTextFlavor( @@ -752,40 +740,33 @@ public class DataFlavor implements Externalizable, Cloneable { /** * Gets a Reader for a text flavor, decoded, if necessary, for the expected * charset (encoding). The supported representation classes are - * java.io.Reader, java.lang.String, - * java.nio.CharBuffer, [C, - * java.io.InputStream, java.nio.ByteBuffer, - * and [B. + * {@code java.io.Reader}, {@code java.lang.String}, + * {@code java.nio.CharBuffer}, {@code [C}, {@code java.io.InputStream}, + * {@code java.nio.ByteBuffer}, and {@code [B}. *

            * Because text flavors which do not support the charset parameter are * encoded in a non-standard format, this method should not be called for - * such flavors. However, in order to maintain backward-compatibility, - * if this method is called for such a flavor, this method will treat the - * flavor as though it supports the charset parameter and attempt to - * decode it accordingly. See selectBestTextFlavor for a list - * of text flavors which do not support the charset parameter. + * such flavors. However, in order to maintain backward-compatibility, if + * this method is called for such a flavor, this method will treat the + * flavor as though it supports the charset parameter and attempt to decode + * it accordingly. See {@code selectBestTextFlavor} for a list of text + * flavors which do not support the charset parameter. * - * @param transferable the Transferable whose data will be - * requested in this flavor - * - * @return a Reader to read the Transferable's - * data - * - * @exception IllegalArgumentException if the representation class - * is not one of the seven listed above - * @exception IllegalArgumentException if the Transferable - * has null data - * @exception NullPointerException if the Transferable is - * null - * @exception UnsupportedEncodingException if this flavor's representation - * is java.io.InputStream, - * java.nio.ByteBuffer, or [B and - * this flavor's encoding is not supported by this - * implementation of the Java platform - * @exception UnsupportedFlavorException if the Transferable - * does not support this flavor - * @exception IOException if the data cannot be read because of an - * I/O error + * @param transferable the {@code Transferable} whose data will be + * requested in this flavor + * @return a {@code Reader} to read the {@code Transferable}'s data + * @throws IllegalArgumentException if the representation class is not one + * of the seven listed above + * @throws IllegalArgumentException if the {@code Transferable} has + * {@code null} data + * @throws NullPointerException if the {@code Transferable} is {@code null} + * @throws UnsupportedEncodingException if this flavor's representation is + * {@code java.io.InputStream}, {@code java.nio.ByteBuffer}, or + * {@code [B} and this flavor's encoding is not supported by this + * implementation of the Java platform + * @throws UnsupportedFlavorException if the {@code Transferable} does not + * support this flavor + * @throws IOException if the data cannot be read because of an I/O error * @see #selectBestTextFlavor * @since 1.3 */ @@ -837,7 +818,8 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Returns the MIME type string for this DataFlavor. + * Returns the MIME type string for this {@code DataFlavor}. + * * @return the MIME type string for this flavor */ public String getMimeType() { @@ -845,12 +827,12 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Returns the Class which objects supporting this - * DataFlavor will return when this DataFlavor - * is requested. - * @return the Class which objects supporting this - * DataFlavor will return when this DataFlavor - * is requested + * Returns the {@code Class} which objects supporting this + * {@code DataFlavor} will return when this {@code DataFlavor} is requested. + * + * @return the {@code Class} which objects supporting this + * {@code DataFlavor} will return when this {@code DataFlavor} is + * requested */ public Class getRepresentationClass() { return representationClass; @@ -858,39 +840,42 @@ public class DataFlavor implements Externalizable, Cloneable { /** * Returns the human presentable name for the data format that this - * DataFlavor represents. This name would be localized - * for different countries. + * {@code DataFlavor} represents. This name would be localized for different + * countries. + * * @return the human presentable name for the data format that this - * DataFlavor represents + * {@code DataFlavor} represents */ public String getHumanPresentableName() { return humanPresentableName; } /** - * Returns the primary MIME type for this DataFlavor. - * @return the primary MIME type of this DataFlavor + * Returns the primary MIME type for this {@code DataFlavor}. + * + * @return the primary MIME type of this {@code DataFlavor} */ public String getPrimaryType() { return (mimeType != null) ? mimeType.getPrimaryType() : null; } /** - * Returns the sub MIME type of this DataFlavor. - * @return the Sub MIME type of this DataFlavor + * Returns the sub MIME type of this {@code DataFlavor}. + * + * @return the Sub MIME type of this {@code DataFlavor} */ public String getSubType() { return (mimeType != null) ? mimeType.getSubType() : null; } /** - * Returns the human presentable name for this DataFlavor - * if paramName equals "humanPresentableName". Otherwise - * returns the MIME type value associated with paramName. + * Returns the human presentable name for this {@code DataFlavor} if + * {@code paramName} equals "humanPresentableName". Otherwise returns the + * MIME type value associated with {@code paramName}. * - * @param paramName the parameter name requested - * @return the value of the name parameter, or null - * if there is no associated value + * @param paramName the parameter name requested + * @return the value of the name parameter, or {@code null} if there is no + * associated value */ public String getParameter(String paramName) { if (paramName.equals("humanPresentableName")) { @@ -903,9 +888,10 @@ public class DataFlavor implements Externalizable, Cloneable { /** * Sets the human presentable name for the data format that this - * DataFlavor represents. This name would be localized - * for different countries. - * @param humanPresentableName the new human presentable name + * {@code DataFlavor} represents. This name would be localized for different + * countries. + * + * @param humanPresentableName the new human presentable name */ public void setHumanPresentableName(String humanPresentableName) { this.humanPresentableName = humanPresentableName; @@ -914,22 +900,21 @@ public class DataFlavor implements Externalizable, Cloneable { /** * {@inheritDoc} *

            - * The equals comparison for the {@code DataFlavor} class is implemented - * as follows: Two DataFlavors are considered equal if and - * only if their MIME primary type and subtype and representation class are - * equal. Additionally, if the primary type is "text", the subtype denotes - * a text flavor which supports the charset parameter, and the - * representation class is not java.io.Reader, - * java.lang.String, java.nio.CharBuffer, or - * [C, the charset parameter must also be equal. - * If a charset is not explicitly specified for one or both - * DataFlavors, the platform default encoding is assumed. See - * selectBestTextFlavor for a list of text flavors which - * support the charset parameter. + * The equals comparison for the {@code DataFlavor} class is implemented as + * follows: Two {@code DataFlavor}s are considered equal if and only if + * their MIME primary type and subtype and representation class are equal. + * Additionally, if the primary type is "text", the subtype denotes a text + * flavor which supports the charset parameter, and the representation class + * is not {@code java.io.Reader}, {@code java.lang.String}, + * {@code java.nio.CharBuffer}, or {@code [C}, the {@code charset} parameter + * must also be equal. If a charset is not explicitly specified for one or + * both {@code DataFlavor}s, the platform default encoding is assumed. See + * {@code selectBestTextFlavor} for a list of text flavors which support the + * charset parameter. * - * @param o the Object to compare with this - * @return true if that is equivalent to this - * DataFlavor; false otherwise + * @param o the {@code Object} to compare with {@code this} + * @return {@code true} if {@code that} is equivalent to this + * {@code DataFlavor}; {@code false} otherwise * @see #selectBestTextFlavor */ public boolean equals(Object o) { @@ -937,14 +922,13 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * This method has the same behavior as {@link #equals(Object)}. - * The only difference being that it takes a {@code DataFlavor} instance - * as a parameter. + * This method has the same behavior as {@link #equals(Object)}. The only + * difference being that it takes a {@code DataFlavor} instance as a + * parameter. * - * @param that the DataFlavor to compare with - * this - * @return true if that is equivalent to this - * DataFlavor; false otherwise + * @param that the {@code DataFlavor} to compare with {@code this} + * @return {@code true} if {@code that} is equivalent to this + * {@code DataFlavor}; {@code false} otherwise * @see #selectBestTextFlavor */ public boolean equals(DataFlavor that) { @@ -995,17 +979,16 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Compares only the mimeType against the passed in - * String and representationClass is - * not considered in the comparison. + * Compares only the {@code mimeType} against the passed in {@code String} + * and {@code representationClass} is not considered in the comparison. If + * {@code representationClass} needs to be compared, then + * {@code equals(new DataFlavor(s))} may be used. * - * If representationClass needs to be compared, then - * equals(new DataFlavor(s)) may be used. - * @deprecated As inconsistent with hashCode() contract, - * use isMimeTypeEqual(String) instead. - * @param s the {@code mimeType} to compare. - * @return true if the String (MimeType) is equal; false otherwise or if - * {@code s} is {@code null} + * @param s the {@code mimeType} to compare + * @return {@code true} if the String (MimeType) is equal; {@code false} + * otherwise or if {@code s} is {@code null} + * @deprecated As inconsistent with {@code hashCode()} contract, use + * {@link #isMimeTypeEqual(String)} instead. */ @Deprecated public boolean equals(String s) { @@ -1015,14 +998,13 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Returns hash code for this DataFlavor. - * For two equal DataFlavors, hash codes are equal. - * For the String - * that matches DataFlavor.equals(String), it is not - * guaranteed that DataFlavor's hash code is equal - * to the hash code of the String. + * Returns hash code for this {@code DataFlavor}. For two equal + * {@code DataFlavor}s, hash codes are equal. For the {@code String} that + * matches {@code DataFlavor.equals(String)}, it is not guaranteed that + * {@code DataFlavor}'s hash code is equal to the hash code of the + * {@code String}. * - * @return a hash code for this DataFlavor + * @return a hash code for this {@code DataFlavor} */ public int hashCode() { int total = 0; @@ -1066,10 +1048,9 @@ public class DataFlavor implements Externalizable, Cloneable { /** * Identical to {@link #equals(DataFlavor)}. * - * @param that the DataFlavor to compare with - * this - * @return true if that is equivalent to this - * DataFlavor; false otherwise + * @param that the {@code DataFlavor} to compare with {@code this} + * @return {@code true} if {@code that} is equivalent to this + * {@code DataFlavor}; {@code false} otherwise * @see #selectBestTextFlavor * @since 1.3 */ @@ -1078,15 +1059,15 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Returns whether the string representation of the MIME type passed in - * is equivalent to the MIME type of this DataFlavor. - * Parameters are not included in the comparison. + * Returns whether the string representation of the MIME type passed in is + * equivalent to the MIME type of this {@code DataFlavor}. Parameters are + * not included in the comparison. * - * @param mimeType the string representation of the MIME type - * @return true if the string representation of the MIME type passed in is - * equivalent to the MIME type of this DataFlavor; - * false otherwise - * @throws NullPointerException if mimeType is null + * @param mimeType the string representation of the MIME type + * @return {@code true} if the string representation of the MIME type passed + * in is equivalent to the MIME type of this {@code DataFlavor}; + * {@code false} otherwise + * @throws NullPointerException if mimeType is {@code null} */ public boolean isMimeTypeEqual(String mimeType) { // JCK Test DataFlavor0117: if 'mimeType' is null, throw NPE @@ -1104,26 +1085,24 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Compares the mimeType of two DataFlavor - * objects. No parameters are considered. + * Compares the {@code mimeType} of two {@code DataFlavor} objects. No + * parameters are considered. * - * @param dataFlavor the DataFlavor to be compared - * @return true if the MimeTypes are equal, - * otherwise false + * @param dataFlavor the {@code DataFlavor} to be compared + * @return {@code true} if the {@code MimeType}s are equal, otherwise + * {@code false} */ - public final boolean isMimeTypeEqual(DataFlavor dataFlavor) { return isMimeTypeEqual(dataFlavor.mimeType); } /** - * Compares the mimeType of two DataFlavor - * objects. No parameters are considered. + * Compares the {@code mimeType} of two {@code DataFlavor} objects. No + * parameters are considered. * - * @return true if the MimeTypes are equal, - * otherwise false + * @return {@code true} if the {@code MimeType}s are equal, otherwise + * {@code false} */ - private boolean isMimeTypeEqual(MimeType mtype) { if (this.mimeType == null) { return (mtype == null); @@ -1135,8 +1114,8 @@ public class DataFlavor implements Externalizable, Cloneable { * Checks if the representation class is one of the standard text * representation classes. * - * @return true if the representation class is one of the standard text - * representation classes, otherwise false + * @return {@code true} if the representation class is one of the standard + * text representation classes, otherwise {@code false} */ private boolean isStandardTextRepresentationClass() { return isRepresentationClassReader() @@ -1145,16 +1124,18 @@ public class DataFlavor implements Externalizable, Cloneable { || char[].class.equals(representationClass); } - /** - * Does the DataFlavor represent a serialized object? - * @return whether or not a serialized object is represented - */ + /** + * Does the {@code DataFlavor} represent a serialized object? + * + * @return whether or not a serialized object is represented + */ public boolean isMimeTypeSerializedObject() { return isMimeTypeEqual(javaSerializedObjectMimeType); } /** * Returns the default representation class. + * * @return the default representation class */ public final Class getDefaultRepresentationClass() { @@ -1163,30 +1144,30 @@ public class DataFlavor implements Externalizable, Cloneable { /** * Returns the name of the default representation class. + * * @return the name of the default representation class */ public final String getDefaultRepresentationClassAsString() { return getDefaultRepresentationClass().getName(); } - /** - * Does the DataFlavor represent a - * java.io.InputStream? - * @return whether or not this {@code DataFlavor} represent a - * {@code java.io.InputStream} - */ + /** + * Does the {@code DataFlavor} represent a {@code java.io.InputStream}? + * + * @return whether or not this {@code DataFlavor} represent a + * {@code java.io.InputStream} + */ public boolean isRepresentationClassInputStream() { return ioInputStreamClass.isAssignableFrom(representationClass); } /** - * Returns whether the representation class for this - * DataFlavor is java.io.Reader or a subclass - * thereof. - * @return whether or not the representation class for this - * {@code DataFlavor} is {@code java.io.Reader} or a subclass - * thereof + * Returns whether the representation class for this {@code DataFlavor} is + * {@code java.io.Reader} or a subclass thereof. * + * @return whether or not the representation class for this + * {@code DataFlavor} is {@code java.io.Reader} or a subclass + * thereof * @since 1.4 */ public boolean isRepresentationClassReader() { @@ -1194,13 +1175,12 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Returns whether the representation class for this - * DataFlavor is java.nio.CharBuffer or a - * subclass thereof. - * @return whether or not the representation class for this - * {@code DataFlavor} is {@code java.nio.CharBuffer} or a subclass - * thereof + * Returns whether the representation class for this {@code DataFlavor} is + * {@code java.nio.CharBuffer} or a subclass thereof. * + * @return whether or not the representation class for this + * {@code DataFlavor} is {@code java.nio.CharBuffer} or a subclass + * thereof * @since 1.4 */ public boolean isRepresentationClassCharBuffer() { @@ -1208,103 +1188,100 @@ public class DataFlavor implements Externalizable, Cloneable { } /** - * Returns whether the representation class for this - * DataFlavor is java.nio.ByteBuffer or a - * subclass thereof. - * @return whether or not the representation class for this - * {@code DataFlavor} is {@code java.nio.ByteBuffer} or a subclass - * thereof + * Returns whether the representation class for this {@code DataFlavor} is + * {@code java.nio.ByteBuffer} or a subclass thereof. * + * @return whether or not the representation class for this + * {@code DataFlavor} is {@code java.nio.ByteBuffer} or a subclass + * thereof * @since 1.4 */ public boolean isRepresentationClassByteBuffer() { return java.nio.ByteBuffer.class.isAssignableFrom(representationClass); } - /** - * Returns true if the representation class can be serialized. - * @return true if the representation class can be serialized - */ - + /** + * Returns {@code true} if the representation class can be serialized. + * + * @return {@code true} if the representation class can be serialized + */ public boolean isRepresentationClassSerializable() { return java.io.Serializable.class.isAssignableFrom(representationClass); } - /** - * Returns true if the representation class is Remote. - * @return true if the representation class is Remote - */ + /** + * Returns {@code true} if the representation class is {@code Remote}. + * + * @return {@code true} if the representation class is {@code Remote} + */ public boolean isRepresentationClassRemote() { return DataFlavorUtil.RMI.isRemote(representationClass); } - /** - * Returns true if the DataFlavor specified represents - * a serialized object. - * @return true if the DataFlavor specified represents - * a Serialized Object - */ - + /** + * Returns {@code true} if the {@code DataFlavor} specified represents a + * serialized object. + * + * @return {@code true} if the {@code DataFlavor} specified represents a + * Serialized Object + */ public boolean isFlavorSerializedObjectType() { return isRepresentationClassSerializable() && isMimeTypeEqual(javaSerializedObjectMimeType); } /** - * Returns true if the DataFlavor specified represents - * a remote object. - * @return true if the DataFlavor specified represents - * a Remote Object + * Returns {@code true} if the {@code DataFlavor} specified represents a + * remote object. + * + * @return {@code true} if the {@code DataFlavor} specified represents a + * Remote Object */ - public boolean isFlavorRemoteObjectType() { return isRepresentationClassRemote() && isRepresentationClassSerializable() && isMimeTypeEqual(javaRemoteObjectMimeType); } - - /** - * Returns true if the DataFlavor specified represents - * a list of file objects. - * @return true if the DataFlavor specified represents - * a List of File objects - */ - - public boolean isFlavorJavaFileListType() { + /** + * Returns {@code true} if the {@code DataFlavor} specified represents a + * list of file objects. + * + * @return {@code true} if the {@code DataFlavor} specified represents a + * {@code java.util.List} of {@code java.io.File} objects + */ + public boolean isFlavorJavaFileListType() { if (mimeType == null || representationClass == null) return false; return java.util.List.class.isAssignableFrom(representationClass) && mimeType.match(javaFileListFlavor.mimeType); - } + } /** - * Returns whether this DataFlavor is a valid text flavor for - * this implementation of the Java platform. Only flavors equivalent to - * DataFlavor.stringFlavor and DataFlavors with - * a primary MIME type of "text" can be valid text flavors. + * Returns whether this {@code DataFlavor} is a valid text flavor for this + * implementation of the Java platform. Only flavors equivalent to + * {@code DataFlavor.stringFlavor} and {@code DataFlavor}s with a primary + * MIME type of "text" can be valid text flavors. *

            * If this flavor supports the charset parameter, it must be equivalent to - * DataFlavor.stringFlavor, or its representation must be - * java.io.Reader, java.lang.String, - * java.nio.CharBuffer, [C, - * java.io.InputStream, java.nio.ByteBuffer, or - * [B. If the representation is - * java.io.InputStream, java.nio.ByteBuffer, or - * [B, then this flavor's charset parameter must - * be supported by this implementation of the Java platform. If a charset - * is not specified, then the platform default charset, which is always - * supported, is assumed. + * {@code DataFlavor.stringFlavor}, or its representation must be + * {@code java.io.Reader}, {@code java.lang.String}, + * {@code java.nio.CharBuffer}, {@code [C}, {@code java.io.InputStream}, + * {@code java.nio.ByteBuffer}, or {@code [B}. If the representation is + * {@code java.io.InputStream}, {@code java.nio.ByteBuffer}, or {@code [B}, + * then this flavor's {@code charset} parameter must be supported by this + * implementation of the Java platform. If a charset is not specified, then + * the platform default charset, which is always supported, is assumed. *

            - * If this flavor does not support the charset parameter, its - * representation must be java.io.InputStream, - * java.nio.ByteBuffer, or [B. + * If this flavor does not support the charset parameter, its representation + * must be {@code java.io.InputStream}, {@code java.nio.ByteBuffer}, or + * {@code [B}. *

            - * See selectBestTextFlavor for a list of text flavors which - * support the charset parameter. + * See {@code selectBestTextFlavor} for a list of text flavors which support + * the charset parameter. * - * @return true if this DataFlavor is a valid - * text flavor as described above; false otherwise + * @return {@code true} if this {@code DataFlavor} is a valid text flavor as + * described above; {@code false} otherwise * @see #selectBestTextFlavor * @since 1.4 */ @@ -1313,10 +1290,9 @@ public class DataFlavor implements Externalizable, Cloneable { DataFlavorUtil.isFlavorNoncharsetTextType(this)); } - /** - * Serializes this DataFlavor. - */ - + /** + * Serializes this {@code DataFlavor}. + */ public synchronized void writeExternal(ObjectOutput os) throws IOException { if (mimeType != null) { mimeType.setParameter("humanPresentableName", humanPresentableName); @@ -1329,12 +1305,11 @@ public class DataFlavor implements Externalizable, Cloneable { os.writeObject(representationClass); } - /** - * Restores this DataFlavor from a Serialized state. - */ - - public synchronized void readExternal(ObjectInput is) throws IOException , ClassNotFoundException { - String rcn = null; + /** + * Restores this {@code DataFlavor} from a Serialized state. + */ + public synchronized void readExternal(ObjectInput is) throws IOException , ClassNotFoundException { + String rcn = null; mimeType = (MimeType)is.readObject(); if (mimeType != null) { @@ -1361,13 +1336,13 @@ public class DataFlavor implements Externalizable, Cloneable { DataFlavor.tryToLoadClass(rcn, getClass().getClassLoader()); } } - } - - /** - * Returns a clone of this DataFlavor. - * @return a clone of this DataFlavor - */ + } + /** + * Returns a clone of this {@code DataFlavor}. + * + * @return a clone of this {@code DataFlavor} + */ public Object clone() throws CloneNotSupportedException { Object newObj = super.clone(); if (mimeType != null) { @@ -1376,41 +1351,37 @@ public class DataFlavor implements Externalizable, Cloneable { return newObj; } // clone() - /** - * Called on DataFlavor for every MIME Type parameter - * to allow DataFlavor subclasses to handle special - * parameters like the text/plain charset - * parameters, whose values are case insensitive. (MIME type parameter - * values are supposed to be case sensitive. - *

            - * This method is called for each parameter name/value pair and should - * return the normalized representation of the parameterValue. - * - * This method is never invoked by this implementation from 1.1 onwards. - * - * @param parameterName the parameter name - * @param parameterValue the parameter value - * @return the parameter value - * @deprecated - */ + /** + * Called on {@code DataFlavor} for every MIME Type parameter to allow + * {@code DataFlavor} subclasses to handle special parameters like the + * text/plain {@code charset} parameters, whose values are case insensitive. + * (MIME type parameter values are supposed to be case sensitive. + *

            + * This method is called for each parameter name/value pair and should + * return the normalized representation of the {@code parameterValue}. + * + * @param parameterName the parameter name + * @param parameterValue the parameter value + * @return the parameter value + * @deprecated This method is never invoked by this implementation from 1.1 + * onwards + */ @Deprecated protected String normalizeMimeTypeParameter(String parameterName, String parameterValue) { return parameterValue; } - /** - * Called for each MIME type string to give DataFlavor subtypes - * the opportunity to change how the normalization of MIME types is - * accomplished. One possible use would be to add default - * parameter/value pairs in cases where none are present in the MIME - * type string passed in. - * - * This method is never invoked by this implementation from 1.1 onwards. - * - * @param mimeType the mime type - * @return the mime type - * @deprecated - */ + /** + * Called for each MIME type string to give {@code DataFlavor} subtypes the + * opportunity to change how the normalization of MIME types is + * accomplished. One possible use would be to add default parameter/value + * pairs in cases where none are present in the MIME type string passed in. + * + * @param mimeType the mime type + * @return the mime type + * @deprecated This method is never invoked by this implementation from 1.1 + * onwards + */ @Deprecated protected String normalizeMimeType(String mimeType) { return mimeType; @@ -1430,8 +1401,9 @@ public class DataFlavor implements Externalizable, Cloneable { private String humanPresentableName; - /** Java class of objects this DataFlavor represents **/ - + /** + * Java class of objects this DataFlavor represents. + **/ private Class representationClass; } // class DataFlavor diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorEvent.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorEvent.java index 3e627e69603..8f38c86560d 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorEvent.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -22,29 +22,27 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt.datatransfer; import java.util.EventObject; - /** - * FlavorEvent is used to notify interested parties - * that available {@link DataFlavor}s have changed in the - * {@link Clipboard} (the event source). - * - * @see FlavorListener + * {@code FlavorEvent} is used to notify interested parties that available + * {@link DataFlavor}s have changed in the {@link Clipboard} (the event source). * * @author Alexander Gerasimov + * @see FlavorListener * @since 1.5 */ public class FlavorEvent extends EventObject { + private static final long serialVersionUID = -5842664112252414548L; /** - * Constructs a FlavorEvent object. - * - * @param source the Clipboard that is the source of the event + * Constructs a {@code FlavorEvent} object. * + * @param source the {@code Clipboard} that is the source of the event * @throws IllegalArgumentException if the {@code source} is {@code null} */ public FlavorEvent(Clipboard source) { diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorListener.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorListener.java index cc048335f7a..d23f4e88e99 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorListener.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -22,11 +22,11 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt.datatransfer; import java.util.EventListener; - /** * Defines an object which listens for {@link FlavorEvent}s. * @@ -34,22 +34,21 @@ import java.util.EventListener; * @since 1.5 */ public interface FlavorListener extends EventListener { + /** - * Invoked when the target {@link Clipboard} of the listener - * has changed its available {@link DataFlavor}s. + * Invoked when the target {@link Clipboard} of the listener has changed its + * available {@link DataFlavor}s. *

            - * Some notifications may be redundant — they are not - * caused by a change of the set of DataFlavors available - * on the clipboard. - * For example, if the clipboard subsystem supposes that - * the system clipboard's contents has been changed but it - * can't ascertain whether its DataFlavors have been changed - * because of some exceptional condition when accessing the - * clipboard, the notification is sent to ensure from omitting - * a significant notification. Ordinarily, those redundant - * notifications should be occasional. + * Some notifications may be redundant — they are not caused by a + * change of the set of DataFlavors available on the clipboard. For example, + * if the clipboard subsystem supposes that the system clipboard's contents + * has been changed but it can't ascertain whether its DataFlavors have been + * changed because of some exceptional condition when accessing the + * clipboard, the notification is sent to ensure from omitting a significant + * notification. Ordinarily, those redundant notifications should be + * occasional. * - * @param e a FlavorEvent object + * @param e a {@code FlavorEvent} object */ void flavorsChanged(FlavorEvent e); } diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorMap.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorMap.java index 4f250659bea..848d4ef7d88 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorMap.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -27,49 +27,45 @@ package java.awt.datatransfer; import java.util.Map; - /** - * A two-way Map between "natives" (Strings), which correspond to platform- - * specific data formats, and "flavors" (DataFlavors), which correspond to - * platform-independent MIME types. FlavorMaps need not be symmetric, but + * A two-way Map between "natives" (Strings), which correspond to + * platform-specific data formats, and "flavors" (DataFlavors), which correspond + * to platform-independent MIME types. FlavorMaps need not be symmetric, but * typically are. * - * * @since 1.2 */ public interface FlavorMap { /** - * Returns a Map of the specified DataFlavors to - * their corresponding String native. The returned - * Map is a modifiable copy of this FlavorMap's - * internal data. Client code is free to modify the Map - * without affecting this object. + * Returns a {@code Map} of the specified {@code DataFlavor}s to their + * corresponding {@code String} native. The returned {@code Map} is a + * modifiable copy of this {@code FlavorMap}'s internal data. Client code is + * free to modify the {@code Map} without affecting this object. * - * @param flavors an array of DataFlavors which will be the - * key set of the returned Map. If null is - * specified, a mapping of all DataFlavors currently - * known to this FlavorMap to their corresponding - * String natives will be returned. - * @return a java.util.Map of DataFlavors to - * String natives + * @param flavors an array of {@code DataFlavor}s which will be the key set + * of the returned {@code Map}. If {@code null} is specified, a + * mapping of all {@code DataFlavor}s currently known to this + * {@code FlavorMap} to their corresponding {@code String} natives + * will be returned. + * @return a {@code java.util.Map} of {@code DataFlavor}s to {@code String} + * natives */ - Map getNativesForFlavors(DataFlavor[] flavors); + Map getNativesForFlavors(DataFlavor[] flavors); /** - * Returns a Map of the specified String natives - * to their corresponding DataFlavor. The returned - * Map is a modifiable copy of this FlavorMap's - * internal data. Client code is free to modify the Map - * without affecting this object. + * Returns a {@code Map} of the specified {@code String} natives to their + * corresponding {@code DataFlavor}. The returned {@code Map} is a + * modifiable copy of this {@code FlavorMap}'s internal data. Client code is + * free to modify the {@code Map} without affecting this object. * - * @param natives an array of Strings which will be the - * key set of the returned Map. If null is - * specified, a mapping of all String natives currently - * known to this FlavorMap to their corresponding - * DataFlavors will be returned. - * @return a java.util.Map of String natives to - * DataFlavors + * @param natives an array of {@code String}s which will be the key set of + * the returned {@code Map}. If {@code null} is specified, a mapping + * of all {@code String} natives currently known to this + * {@code FlavorMap} to their corresponding {@code DataFlavor}s will + * be returned. + * @return a {@code java.util.Map} of {@code String} natives to + * {@code DataFlavor}s */ - Map getFlavorsForNatives(String[] natives); + Map getFlavorsForNatives(String[] natives); } diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorTable.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorTable.java index 8ff6004c9b7..3f4907185d8 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorTable.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/FlavorTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -27,56 +27,52 @@ package java.awt.datatransfer; import java.util.List; - /** * A FlavorMap which relaxes the traditional 1-to-1 restriction of a Map. A - * flavor is permitted to map to any number of natives, and likewise a native - * is permitted to map to any number of flavors. FlavorTables need not be + * flavor is permitted to map to any number of natives, and likewise a native is + * permitted to map to any number of flavors. FlavorTables need not be * symmetric, but typically are. * * @author David Mendenhall - * * @since 1.4 */ public interface FlavorTable extends FlavorMap { /** - * Returns a List of String natives to which the - * specified DataFlavor corresponds. The List - * will be sorted from best native to worst. That is, the first native will - * best reflect data in the specified flavor to the underlying native - * platform. The returned List is a modifiable copy of this - * FlavorTable's internal data. Client code is free to modify - * the List without affecting this object. + * Returns a {@code List} of {@code String} natives to which the specified + * {@code DataFlavor} corresponds. The {@code List} will be sorted from best + * native to worst. That is, the first native will best reflect data in the + * specified flavor to the underlying native platform. The returned + * {@code List} is a modifiable copy of this {@code FlavorTable}'s internal + * data. Client code is free to modify the {@code List} without affecting + * this object. * - * @param flav the DataFlavor whose corresponding natives - * should be returned. If null is specified, all - * natives currently known to this FlavorTable are - * returned in a non-deterministic order. - * @return a java.util.List of java.lang.String - * objects which are platform-specific representations of platform- - * specific data formats + * @param flav the {@code DataFlavor} whose corresponding natives should be + * returned. If {@code null} is specified, all natives currently + * known to this {@code FlavorTable} are returned in a + * non-deterministic order. + * @return a {@code java.util.List} of {@code java.lang.String} objects + * which are platform-specific representations of platform-specific + * data formats */ List getNativesForFlavor(DataFlavor flav); /** - * Returns a List of DataFlavors to which the - * specified String corresponds. The List will be - * sorted from best DataFlavor to worst. That is, the first - * DataFlavor will best reflect data in the specified - * native to a Java application. The returned List is a - * modifiable copy of this FlavorTable's internal data. - * Client code is free to modify the List without affecting - * this object. + * Returns a {@code List} of {@code DataFlavor}s to which the specified + * {@code String} corresponds. The {@code List} will be sorted from best + * {@code DataFlavor} to worst. That is, the first {@code DataFlavor} will + * best reflect data in the specified native to a Java application. The + * returned {@code List} is a modifiable copy of this {@code FlavorTable}'s + * internal data. Client code is free to modify the {@code List} without + * affecting this object. * - * @param nat the native whose corresponding DataFlavors - * should be returned. If null is specified, all - * DataFlavors currently known to this - * FlavorTable are returned in a non-deterministic - * order. - * @return a java.util.List of DataFlavor - * objects into which platform-specific data in the specified, - * platform-specific native can be translated + * @param nat the native whose corresponding {@code DataFlavor}s should be + * returned. If {@code null} is specified, all {@code DataFlavor}s + * currently known to this {@code FlavorTable} are returned in a + * non-deterministic order. + * @return a {@code java.util.List} of {@code DataFlavor} objects into which + * platform-specific data in the specified, platform-specific native + * can be translated */ List getFlavorsForNative(String nat); } diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeType.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeType.java index 671b107d880..bc03f880885 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeType.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -26,20 +26,18 @@ package java.awt.datatransfer; import java.io.Externalizable; -import java.io.ObjectOutput; -import java.io.ObjectInput; import java.io.IOException; -import java.util.Enumeration; +import java.io.ObjectInput; +import java.io.ObjectOutput; import java.util.Locale; - /** - * A Multipurpose Internet Mail Extension (MIME) type, as defined - * in RFC 2045 and 2046. - * - * THIS IS *NOT* - REPEAT *NOT* - A PUBLIC CLASS! DataFlavor IS - * THE PUBLIC INTERFACE, AND THIS IS PROVIDED AS A ***PRIVATE*** - * (THAT IS AS IN *NOT* PUBLIC) HELPER CLASS! + * A Multipurpose Internet Mail Extension (MIME) type, as defined in RFC 2045 + * and 2046. + *

            + * THIS IS *NOT* - REPEAT *NOT* - A PUBLIC CLASS! DataFlavor IS THE PUBLIC + * INTERFACE, AND THIS IS PROVIDED AS A ***PRIVATE*** (THAT IS AS IN *NOT* + * PUBLIC) HELPER CLASS! */ class MimeType implements Externalizable, Cloneable { @@ -50,45 +48,45 @@ class MimeType implements Externalizable, Cloneable { static final long serialVersionUID = -6568722458793895906L; /** - * Constructor for externalization; this constructor should not be - * called directly by an application, since the result will be an - * uninitialized, immutable MimeType object. + * Constructor for externalization; this constructor should not be called + * directly by an application, since the result will be an uninitialized, + * immutable {@code MimeType} object. */ public MimeType() { } /** - * Builds a MimeType from a String. + * Builds a {@code MimeType} from a {@code String}. * - * @param rawdata text used to initialize the MimeType - * @throws NullPointerException if rawdata is null + * @param rawdata text used to initialize the {@code MimeType} + * @throws NullPointerException if {@code rawdata} is {@code null} */ public MimeType(String rawdata) throws MimeTypeParseException { parse(rawdata); } /** - * Builds a MimeType with the given primary and sub - * type but has an empty parameter list. + * Builds a {@code MimeType} with the given primary and sub type but has an + * empty parameter list. * - * @param primary the primary type of this MimeType - * @param sub the subtype of this MimeType - * @throws NullPointerException if either primary or - * sub is null + * @param primary the primary type of this {@code MimeType} + * @param sub the subtype of this {@code MimeType} + * @throws NullPointerException if either {@code primary} or {@code sub} is + * {@code null} */ public MimeType(String primary, String sub) throws MimeTypeParseException { this(primary, sub, new MimeTypeParameterList()); } /** - * Builds a MimeType with a pre-defined - * and valid (or empty) parameter list. + * Builds a {@code MimeType} with a pre-defined and valid (or empty) + * parameter list. * - * @param primary the primary type of this MimeType - * @param sub the subtype of this MimeType - * @param mtpl the requested parameter list - * @throws NullPointerException if either primary, - * sub or mtpl is null + * @param primary the primary type of this {@code MimeType} + * @param sub the subtype of this {@code MimeType} + * @param mtpl the requested parameter list + * @throws NullPointerException if either {@code primary}, {@code sub} or + * {@code mtpl} is {@code null} */ public MimeType(String primary, String sub, MimeTypeParameterList mtpl) throws MimeTypeParseException { @@ -121,13 +119,12 @@ MimeTypeParseException { } // hashCode() /** - * MimeTypes are equal if their primary types, - * subtypes, and parameters are all equal. No default values - * are taken into account. - * @param thatObject the object to be evaluated as a - * MimeType - * @return true if thatObject is - * a MimeType; otherwise returns false + * {@code MimeType}s are equal if their primary types, subtypes, and + * parameters are all equal. No default values are taken into account. + * + * @param thatObject the object to be evaluated as a {@code MimeType} + * @return {@code true} if {@code thatObject} is a {@code MimeType}; + * otherwise returns {@code false} */ public boolean equals(Object thatObject) { if (!(thatObject instanceof MimeType)) { @@ -144,7 +141,7 @@ MimeTypeParseException { /** * A routine for parsing the MIME type out of a String. * - * @throws NullPointerException if rawdata is null + * @throws NullPointerException if {@code rawdata} is {@code null} */ private void parse(String rawdata) throws MimeTypeParseException { int slashIndex = rawdata.indexOf('/'); @@ -213,8 +210,8 @@ MimeTypeParameterList(rawdata.substring(semIndex)); } /** - * Retrieve the value associated with the given name, or null if there - * is no current association. + * Retrieve the value associated with the given name, or {@code null} if + * there is no current association. */ public String getParameter(String name) { return parameters.get(name); @@ -247,23 +244,21 @@ MimeTypeParameterList(rawdata.substring(semIndex)); } /** - * Return a String representation of this object - * without the parameter list. + * Return a String representation of this object without the parameter list. */ public String getBaseType() { return primaryType + "/" + subType; } /** - * Returns true if the primary type and the - * subtype of this object are the same as the specified - * type; otherwise returns false. + * Returns {@code true} if the primary type and the subtype of this object + * are the same as the specified {@code type}; otherwise returns + * {@code false}. * - * @param type the type to compare to this's type - * @return true if the primary type and the - * subtype of this object are the same as the - * specified type; otherwise returns - * false + * @param type the type to compare to {@code this}'s type + * @return {@code true} if the primary type and the subtype of this object + * are the same as the specified {@code type}; otherwise returns + * {@code false} */ public boolean match(MimeType type) { if (type == null) @@ -275,17 +270,15 @@ MimeTypeParameterList(rawdata.substring(semIndex)); } /** - * Returns true if the primary type and the - * subtype of this object are the same as the content type - * described in rawdata; otherwise returns - * false. + * Returns {@code true} if the primary type and the subtype of this object + * are the same as the content type described in {@code rawdata}; otherwise + * returns {@code false}. * - * @param rawdata the raw data to be examined - * @return true if the primary type and the - * subtype of this object are the same as the content type - * described in rawdata; otherwise returns - * false; if rawdata is - * null, returns false + * @param rawdata the raw data to be examined + * @return {@code true} if the primary type and the subtype of this object + * are the same as the content type described in {@code rawdata}; + * otherwise returns {@code false}; if {@code rawdata} is + * {@code null}, returns {@code false} */ public boolean match(String rawdata) throws MimeTypeParseException { if (rawdata == null) @@ -294,11 +287,11 @@ MimeTypeParameterList(rawdata.substring(semIndex)); } /** - * The object implements the writeExternal method to save its contents - * by calling the methods of DataOutput for its primitive values or - * calling the writeObject method of ObjectOutput for objects, strings - * and arrays. - * @exception IOException Includes any I/O exceptions that may occur + * The object implements the writeExternal method to save its contents by + * calling the methods of DataOutput for its primitive values or calling the + * writeObject method of ObjectOutput for objects, strings and arrays. + * + * @throws IOException Includes any I/O exceptions that may occur */ public void writeExternal(ObjectOutput out) throws IOException { String s = toString(); // contains ASCII chars only @@ -314,13 +307,14 @@ MimeTypeParameterList(rawdata.substring(semIndex)); } /** - * The object implements the readExternal method to restore its - * contents by calling the methods of DataInput for primitive - * types and readObject for objects, strings and arrays. The - * readExternal method must read the values in the same sequence - * and with the same types as were written by writeExternal. - * @exception ClassNotFoundException If the class for an object being - * restored cannot be found. + * The object implements the readExternal method to restore its contents by + * calling the methods of DataInput for primitive types and readObject for + * objects, strings and arrays. The readExternal method must read the values + * in the same sequence and with the same types as were written by + * writeExternal. + * + * @throws ClassNotFoundException If the class for an object being restored + * cannot be found */ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { @@ -339,9 +333,9 @@ ClassNotFoundException { /** * Returns a clone of this object. + * * @return a clone of this object */ - public Object clone() { MimeType newObj = null; try { @@ -368,7 +362,7 @@ ClassNotFoundException { /** * Determines whether or not a given string is a legal token. * - * @throws NullPointerException if s is null + * @throws NullPointerException if {@code s} is {@code null} */ private boolean isValidToken(String s) { int len = s.length(); @@ -388,7 +382,5 @@ ClassNotFoundException { /** * A string that holds all the special chars. */ - private static final String TSPECIALS = "()<>@,;:\\\"/[]?="; - } // class MimeType diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeTypeParameterList.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeTypeParameterList.java index 9c1b888ec1f..c19365ef600 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeTypeParameterList.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeTypeParameterList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -31,10 +31,9 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; - /** - * An object that encapsulates the parameter list of a MimeType - * as defined in RFC 2045 and 2046. + * An object that encapsulates the parameter list of a MimeType as defined in + * RFC 2045 and 2046. * * @author jeff.dunn@eng.sun.com */ @@ -71,9 +70,9 @@ class MimeTypeParameterList implements Cloneable { } // hashCode() /** - * Two parameter lists are considered equal if they have exactly - * the same set of parameter names and associated values. The - * order of the parameters is not considered. + * Two parameter lists are considered equal if they have exactly the same + * set of parameter names and associated values. The order of the parameters + * is not considered. */ public boolean equals(Object thatObject) { //System.out.println("MimeTypeParameterList.equals("+this+","+thatObject+")"); @@ -246,16 +245,16 @@ class MimeTypeParameterList implements Cloneable { } /** - * Retrieve the value associated with the given name, or null if there - * is no current association. + * Retrieve the value associated with the given name, or {@code null} if + * there is no current association. */ public String get(String name) { return parameters.get(name.trim().toLowerCase()); } /** - * Set the value to be associated with the given name, replacing - * any previous association. + * Set the value to be associated with the given name, replacing any + * previous association. */ public void set(String name, String value) { parameters.put(name.trim().toLowerCase(), value); @@ -294,18 +293,20 @@ class MimeTypeParameterList implements Cloneable { } /** + * Returns a clone of this object. + * * @return a clone of this object */ @SuppressWarnings("unchecked") // Cast from clone - public Object clone() { - MimeTypeParameterList newObj = null; - try { - newObj = (MimeTypeParameterList)super.clone(); - } catch (CloneNotSupportedException cannotHappen) { - } - newObj.parameters = (Hashtable)parameters.clone(); - return newObj; - } + public Object clone() { + MimeTypeParameterList newObj = null; + try { + newObj = (MimeTypeParameterList)super.clone(); + } catch (CloneNotSupportedException cannotHappen) { + } + newObj.parameters = (Hashtable)parameters.clone(); + return newObj; + } private Hashtable parameters; @@ -319,8 +320,8 @@ class MimeTypeParameterList implements Cloneable { } /** - * return the index of the first non white space character in - * rawdata at or after index i. + * Returns the index of the first non white space character in + * {@code rawdata} at or after index {@code i}. */ private static int skipWhiteSpace(String rawdata, int i) { int length = rawdata.length(); @@ -374,7 +375,8 @@ class MimeTypeParameterList implements Cloneable { } /** - * A routine that knows how to strip the quotes and escape sequences from the given value. + * A routine that knows how to strip the quotes and escape sequences from + * the given value. */ private static String unquote(String value) { int valueLength = value.length(); @@ -400,5 +402,4 @@ class MimeTypeParameterList implements Cloneable { * A string that holds all the special chars. */ private static final String TSPECIALS = "()<>@,;:\\\"/[]?="; - } diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeTypeParseException.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeTypeParseException.java index aede9d5372a..61e41160914 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeTypeParseException.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeTypeParseException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,12 +25,11 @@ package java.awt.datatransfer; - /** - * A class to encapsulate MimeType parsing related exceptions + * A class to encapsulate MimeType parsing related exceptions. * - * @serial exclude * @since 1.3 + * @serial exclude */ public class MimeTypeParseException extends Exception { @@ -47,7 +46,7 @@ public class MimeTypeParseException extends Exception { /** * Constructs a MimeTypeParseException with the specified detail message. * - * @param s the detail message. + * @param s the detail message */ public MimeTypeParseException(String s) { super(s); diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/StringSelection.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/StringSelection.java index aecf3f40f52..17ed9cfa940 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/StringSelection.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/StringSelection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -25,22 +25,21 @@ package java.awt.datatransfer; -import java.io.*; - +import java.io.IOException; +import java.io.StringReader; /** - * A Transferable which implements the capability required - * to transfer a String. + * A {@code Transferable} which implements the capability required to transfer a + * {@code String}. + *

            + * This {@code Transferable} properly supports {@code DataFlavor.stringFlavor} + * and all equivalent flavors. Support for {@code DataFlavor.plainTextFlavor} + * and all equivalent flavors is deprecated. No other {@code DataFlavor}s + * are supported. * - * This Transferable properly supports - * DataFlavor.stringFlavor - * and all equivalent flavors. Support for - * DataFlavor.plainTextFlavor - * and all equivalent flavors is deprecated. No other - * DataFlavors are supported. - * - * @see java.awt.datatransfer.DataFlavor#stringFlavor - * @see java.awt.datatransfer.DataFlavor#plainTextFlavor + * @see DataFlavor#stringFlavor + * @see DataFlavor#plainTextFlavor + * @since 1.1 */ public class StringSelection implements Transferable, ClipboardOwner { @@ -56,23 +55,23 @@ public class StringSelection implements Transferable, ClipboardOwner { private String data; /** - * Creates a Transferable capable of transferring - * the specified String. - * @param data the string to be transferred + * Creates a {@code Transferable} capable of transferring the specified + * {@code String}. + * + * @param data the string to be transferred */ public StringSelection(String data) { this.data = data; } /** - * Returns an array of flavors in which this Transferable - * can provide the data. DataFlavor.stringFlavor - * is properly supported. - * Support for DataFlavor.plainTextFlavor is - * deprecated. + * Returns an array of flavors in which this {@code Transferable} can + * provide the data. {@code DataFlavor.stringFlavor} is properly supported. + * Support for {@code DataFlavor.plainTextFlavor} is deprecated. * - * @return an array of length two, whose elements are DataFlavor. - * stringFlavor and DataFlavor.plainTextFlavor + * @return an array of length two, whose elements are + * {@code DataFlavor.stringFlavor} and + * {@code DataFlavor.plainTextFlavor} */ public DataFlavor[] getTransferDataFlavors() { // returning flavors itself would allow client code to modify @@ -82,14 +81,14 @@ public class StringSelection implements Transferable, ClipboardOwner { /** * Returns whether the requested flavor is supported by this - * Transferable. + * {@code Transferable}. * - * @param flavor the requested flavor for the data - * @return true if flavor is equal to - * DataFlavor.stringFlavor or - * DataFlavor.plainTextFlavor; false if flavor - * is not one of the above flavors - * @throws NullPointerException if flavor is null + * @param flavor the requested flavor for the data + * @return {@code true} if {@code flavor} is equal to + * {@code DataFlavor.stringFlavor} or + * {@code DataFlavor.plainTextFlavor}; {@code false} if + * {@code flavor} is not one of the above flavors + * @throws NullPointerException if {@code flavor} is {@code null} */ public boolean isDataFlavorSupported(DataFlavor flavor) { // JCK Test StringSelection0003: if 'flavor' is null, throw NPE @@ -102,27 +101,27 @@ public class StringSelection implements Transferable, ClipboardOwner { } /** - * Returns the Transferable's data in the requested - * DataFlavor if possible. If the desired flavor is - * DataFlavor.stringFlavor, or an equivalent flavor, - * the String representing the selection is - * returned. If the desired flavor is - * DataFlavor.plainTextFlavor, - * or an equivalent flavor, a Reader is returned. + * Returns the {@code Transferable}'s data in the requested + * {@code DataFlavor} if possible. If the desired flavor is + * {@code DataFlavor.stringFlavor}, or an equivalent flavor, the + * {@code String} representing the selection is returned. If the desired + * flavor is {@code DataFlavor.plainTextFlavor}, or an equivalent flavor, a + * {@code Reader} is returned. + *
            * Note: The behavior of this method for - * DataFlavor.plainTextFlavor - * and equivalent DataFlavors is inconsistent with the - * definition of DataFlavor.plainTextFlavor. + * {@code DataFlavor.plainTextFlavor} + * and equivalent {@code DataFlavor}s is inconsistent with the definition of + * {@code DataFlavor.plainTextFlavor}. * - * @param flavor the requested flavor for the data + * @param flavor the requested flavor for the data * @return the data in the requested flavor, as outlined above - * @throws UnsupportedFlavorException if the requested data flavor is - * not equivalent to either DataFlavor.stringFlavor - * or DataFlavor.plainTextFlavor + * @throws UnsupportedFlavorException if the requested data flavor is not + * equivalent to either {@code DataFlavor.stringFlavor} or + * {@code DataFlavor.plainTextFlavor} * @throws IOException if an IOException occurs while retrieving the data. * By default, StringSelection never throws this exception, but a * subclass may. - * @throws NullPointerException if flavor is null + * @throws NullPointerException if {@code flavor} is {@code null} * @see java.io.Reader */ public Object getTransferData(DataFlavor flavor) diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java index 2c3601f0b3b..3ae8a0c2b50 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,9 +25,6 @@ package java.awt.datatransfer; -import sun.datatransfer.DataFlavorUtil; -import sun.datatransfer.DesktopDatatransferService; - import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -45,11 +42,14 @@ import java.util.Map; import java.util.Objects; import java.util.Set; +import sun.datatransfer.DataFlavorUtil; +import sun.datatransfer.DesktopDatatransferService; + /** * The SystemFlavorMap is a configurable map between "natives" (Strings), which * correspond to platform-specific data formats, and "flavors" (DataFlavors), - * which correspond to platform-independent MIME types. This mapping is used - * by the data transfer subsystem to transfer data between Java and native + * which correspond to platform-independent MIME types. This mapping is used by + * the data transfer subsystem to transfer data between Java and native * applications, and between Java applications in separate VMs. * * @since 1.2 @@ -57,8 +57,7 @@ import java.util.Set; public final class SystemFlavorMap implements FlavorMap, FlavorTable { /** - * Constant prefix used to tag Java types converted to native platform - * type. + * Constant prefix used to tag Java types converted to native platform type. */ private static String JavaMIME = "JAVA_DATAFLAVOR:"; @@ -93,14 +92,15 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { /** * Maps native Strings to Lists of DataFlavors (or base type Strings for * text DataFlavors). - * Do not use the field directly, use getNativeToFlavor() instead. + *

            + * Do not use the field directly, use {@link #getNativeToFlavor} instead. */ private final Map> nativeToFlavor = new HashMap<>(); /** - * Accessor to nativeToFlavor map. Since we use lazy initialization we must + * Accessor to nativeToFlavor map. Since we use lazy initialization we must * use this accessor instead of direct access to the field which may not be - * initialized yet. This method will initialize the field if needed. + * initialized yet. This method will initialize the field if needed. * * @return nativeToFlavor */ @@ -114,14 +114,15 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { /** * Maps DataFlavors (or base type Strings for text DataFlavors) to Lists of * native Strings. - * Do not use the field directly, use getFlavorToNative() instead. + *

            + * Do not use the field directly, use {@link #getFlavorToNative} instead. */ private final Map> flavorToNative = new HashMap<>(); /** - * Accessor to flavorToNative map. Since we use lazy initialization we must + * Accessor to flavorToNative map. Since we use lazy initialization we must * use this accessor instead of direct access to the field which may not be - * initialized yet. This method will initialize the field if needed. + * initialized yet. This method will initialize the field if needed. * * @return flavorToNative */ @@ -133,9 +134,10 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Maps a text DataFlavor primary mime-type to the native. Used only to store - * standard mappings registered in the flavormap.properties - * Do not use this field directly, use getTextTypeToNative() instead. + * Maps a text DataFlavor primary mime-type to the native. Used only to + * store standard mappings registered in the {@code flavormap.properties}. + *

            + * Do not use this field directly, use {@link #getTextTypeToNative} instead. */ private Map> textTypeToNative = new HashMap<>(); @@ -145,9 +147,9 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { private boolean isMapInitialized = false; /** - * An accessor to textTypeToNative map. Since we use lazy initialization we - * must use this accessor instead of direct access to the field which may not - * be initialized yet. This method will initialize the field if needed. + * An accessor to textTypeToNative map. Since we use lazy initialization we + * must use this accessor instead of direct access to the field which may + * not be initialized yet. This method will initialize the field if needed. * * @return textTypeToNative */ @@ -175,8 +177,8 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { /** * Dynamic mapping generation used for text mappings should not be applied * to the DataFlavors and String natives for which the mappings have been - * explicitly specified with setFlavorsForNative() or - * setNativesForFlavor(). This keeps all such keys. + * explicitly specified with {@link #setFlavorsForNative} or + * {@link #setNativesForFlavor}. This keeps all such keys. */ private Set disabledMappingGenerationKeys = new HashSet<>(); @@ -193,8 +195,8 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Initializes a SystemFlavorMap by reading flavormap.properties - * For thread-safety must be called under lock on this. + * Initializes a SystemFlavorMap by reading {@code flavormap.properties}. + * For thread-safety must be called under lock on {@code this}. */ private void initSystemFlavorMap() { if (isMapInitialized) { @@ -366,10 +368,10 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Semantically equivalent to 'nativeToFlavor.get(nat)'. This method - * handles the case where 'nat' is not found in 'nativeToFlavor'. In that - * case, a new DataFlavor is synthesized, stored, and returned, if and - * only if the specified native is encoded as a Java MIME type. + * Semantically equivalent to 'nativeToFlavor.get(nat)'. This method handles + * the case where 'nat' is not found in 'nativeToFlavor'. In that case, a + * new DataFlavor is synthesized, stored, and returned, if and only if the + * specified native is encoded as a Java MIME type. */ private LinkedHashSet nativeToFlavorLookup(String nat) { LinkedHashSet flavors = getNativeToFlavor().get(nat); @@ -480,27 +482,25 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Returns a List of String natives to which the - * specified DataFlavor can be translated by the data transfer - * subsystem. The List will be sorted from best native to - * worst. That is, the first native will best reflect data in the specified - * flavor to the underlying native platform. + * Returns a {@code List} of {@code String} natives to which the specified + * {@code DataFlavor} can be translated by the data transfer subsystem. The + * {@code List} will be sorted from best native to worst. That is, the first + * native will best reflect data in the specified flavor to the underlying + * native platform. *

            - * If the specified DataFlavor is previously unknown to the - * data transfer subsystem and the data transfer subsystem is unable to - * translate this DataFlavor to any existing native, then - * invoking this method will establish a - * mapping in both directions between the specified DataFlavor - * and an encoded version of its MIME type as its native. - * - * @param flav the DataFlavor whose corresponding natives - * should be returned. If null is specified, all - * natives currently known to the data transfer subsystem are - * returned in a non-deterministic order. - * @return a java.util.List of java.lang.String - * objects which are platform-specific representations of platform- - * specific data formats + * If the specified {@code DataFlavor} is previously unknown to the data + * transfer subsystem and the data transfer subsystem is unable to translate + * this {@code DataFlavor} to any existing native, then invoking this method + * will establish a mapping in both directions between the specified + * {@code DataFlavor} and an encoded version of its MIME type as its native. * + * @param flav the {@code DataFlavor} whose corresponding natives should be + * returned. If {@code null} is specified, all natives currently + * known to the data transfer subsystem are returned in a + * non-deterministic order. + * @return a {@code java.util.List} of {@code java.lang.String} objects + * which are platform-specific representations of platform-specific + * data formats * @see #encodeDataFlavor * @since 1.4 */ @@ -566,33 +566,30 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Returns a List of DataFlavors to which the - * specified String native can be translated by the data - * transfer subsystem. The List will be sorted from best - * DataFlavor to worst. That is, the first - * DataFlavor will best reflect data in the specified - * native to a Java application. + * Returns a {@code List} of {@code DataFlavor}s to which the specified + * {@code String} native can be translated by the data transfer subsystem. + * The {@code List} will be sorted from best {@code DataFlavor} to worst. + * That is, the first {@code DataFlavor} will best reflect data in the + * specified native to a Java application. *

            * If the specified native is previously unknown to the data transfer * subsystem, and that native has been properly encoded, then invoking this * method will establish a mapping in both directions between the specified - * native and a DataFlavor whose MIME type is a decoded - * version of the native. + * native and a {@code DataFlavor} whose MIME type is a decoded version of + * the native. *

            - * If the specified native is not a properly encoded native and the - * mappings for this native have not been altered with - * setFlavorsForNative, then the contents of the - * List is platform dependent, but null - * cannot be returned. - * - * @param nat the native whose corresponding DataFlavors - * should be returned. If null is specified, all - * DataFlavors currently known to the data transfer - * subsystem are returned in a non-deterministic order. - * @return a java.util.List of DataFlavor - * objects into which platform-specific data in the specified, - * platform-specific native can be translated + * If the specified native is not a properly encoded native and the mappings + * for this native have not been altered with {@code setFlavorsForNative}, + * then the contents of the {@code List} is platform dependent, but + * {@code null} cannot be returned. * + * @param nat the native whose corresponding {@code DataFlavor}s should be + * returned. If {@code null} is specified, all {@code DataFlavor}s + * currently known to the data transfer subsystem are returned in a + * non-deterministic order. + * @return a {@code java.util.List} of {@code DataFlavor} objects into which + * platform-specific data in the specified, platform-specific native + * can be translated * @see #encodeJavaMIMEType * @since 1.4 */ @@ -741,24 +738,23 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Returns a Map of the specified DataFlavors to - * their most preferred String native. Each native value will - * be the same as the first native in the List returned by - * getNativesForFlavor for the specified flavor. + * Returns a {@code Map} of the specified {@code DataFlavor}s to their most + * preferred {@code String} native. Each native value will be the same as + * the first native in the List returned by {@code getNativesForFlavor} for + * the specified flavor. *

            - * If a specified DataFlavor is previously unknown to the - * data transfer subsystem, then invoking this method will establish a - * mapping in both directions between the specified DataFlavor - * and an encoded version of its MIME type as its native. - * - * @param flavors an array of DataFlavors which will be the - * key set of the returned Map. If null is - * specified, a mapping of all DataFlavors known to the - * data transfer subsystem to their most preferred - * String natives will be returned. - * @return a java.util.Map of DataFlavors to - * String natives + * If a specified {@code DataFlavor} is previously unknown to the data + * transfer subsystem, then invoking this method will establish a mapping in + * both directions between the specified {@code DataFlavor} and an encoded + * version of its MIME type as its native. * + * @param flavors an array of {@code DataFlavor}s which will be the key set + * of the returned {@code Map}. If {@code null} is specified, a + * mapping of all {@code DataFlavor}s known to the data transfer + * subsystem to their most preferred {@code String} natives will be + * returned. + * @return a {@code java.util.Map} of {@code DataFlavor}s to {@code String} + * natives * @see #getNativesForFlavor * @see #encodeDataFlavor */ @@ -785,26 +781,23 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Returns a Map of the specified String natives - * to their most preferred DataFlavor. Each - * DataFlavor value will be the same as the first - * DataFlavor in the List returned by - * getFlavorsForNative for the specified native. + * Returns a {@code Map} of the specified {@code String} natives to their + * most preferred {@code DataFlavor}. Each {@code DataFlavor} value will be + * the same as the first {@code DataFlavor} in the List returned by + * {@code getFlavorsForNative} for the specified native. *

            * If a specified native is previously unknown to the data transfer * subsystem, and that native has been properly encoded, then invoking this * method will establish a mapping in both directions between the specified - * native and a DataFlavor whose MIME type is a decoded - * version of the native. - * - * @param natives an array of Strings which will be the - * key set of the returned Map. If null is - * specified, a mapping of all supported String natives - * to their most preferred DataFlavors will be - * returned. - * @return a java.util.Map of String natives to - * DataFlavors + * native and a {@code DataFlavor} whose MIME type is a decoded version of + * the native. * + * @param natives an array of {@code String}s which will be the key set of + * the returned {@code Map}. If {@code null} is specified, a mapping + * of all supported {@code String} natives to their most preferred + * {@code DataFlavor}s will be returned. + * @return a {@code java.util.Map} of {@code String} natives to + * {@code DataFlavor}s * @see #getFlavorsForNative * @see #encodeJavaMIMEType */ @@ -828,22 +821,19 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Adds a mapping from the specified DataFlavor (and all - * DataFlavors equal to the specified DataFlavor) - * to the specified String native. - * Unlike getNativesForFlavor, the mapping will only be - * established in one direction, and the native will not be encoded. To - * establish a two-way mapping, call - * addFlavorForUnencodedNative as well. The new mapping will - * be of lower priority than any existing mapping. - * This method has no effect if a mapping from the specified or equal - * DataFlavor to the specified String native - * already exists. - * - * @param flav the DataFlavor key for the mapping - * @param nat the String native value for the mapping - * @throws NullPointerException if flav or nat is null + * Adds a mapping from the specified {@code DataFlavor} (and all + * {@code DataFlavor}s equal to the specified {@code DataFlavor}) to the + * specified {@code String} native. Unlike {@code getNativesForFlavor}, the + * mapping will only be established in one direction, and the native will + * not be encoded. To establish a two-way mapping, call + * {@code addFlavorForUnencodedNative} as well. The new mapping will be of + * lower priority than any existing mapping. This method has no effect if a + * mapping from the specified or equal {@code DataFlavor} to the specified + * {@code String} native already exists. * + * @param flav the {@code DataFlavor} key for the mapping + * @param nat the {@code String} native value for the mapping + * @throws NullPointerException if flav or nat is {@code null} * @see #addFlavorForUnencodedNative * @since 1.4 */ @@ -862,30 +852,27 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Discards the current mappings for the specified DataFlavor - * and all DataFlavors equal to the specified - * DataFlavor, and creates new mappings to the - * specified String natives. - * Unlike getNativesForFlavor, the mappings will only be - * established in one direction, and the natives will not be encoded. To - * establish two-way mappings, call setFlavorsForNative - * as well. The first native in the array will represent the highest - * priority mapping. Subsequent natives will represent mappings of - * decreasing priority. + * Discards the current mappings for the specified {@code DataFlavor} and + * all {@code DataFlavor}s equal to the specified {@code DataFlavor}, and + * creates new mappings to the specified {@code String} natives. Unlike + * {@code getNativesForFlavor}, the mappings will only be established in one + * direction, and the natives will not be encoded. To establish two-way + * mappings, call {@code setFlavorsForNative} as well. The first native in + * the array will represent the highest priority mapping. Subsequent natives + * will represent mappings of decreasing priority. *

            * If the array contains several elements that reference equal - * String natives, this method will establish new mappings - * for the first of those elements and ignore the rest of them. + * {@code String} natives, this method will establish new mappings for the + * first of those elements and ignore the rest of them. *

            * It is recommended that client code not reset mappings established by the * data transfer subsystem. This method should only be used for * application-level mappings. * - * @param flav the DataFlavor key for the mappings - * @param natives the String native values for the mappings - * @throws NullPointerException if flav or natives is null - * or if natives contains null elements - * + * @param flav the {@code DataFlavor} key for the mappings + * @param natives the {@code String} native values for the mappings + * @throws NullPointerException if flav or natives is {@code null} or if + * natives contains {@code null} elements * @see #setFlavorsForNative * @since 1.4 */ @@ -903,20 +890,19 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Adds a mapping from a single String native to a single - * DataFlavor. Unlike getFlavorsForNative, the - * mapping will only be established in one direction, and the native will - * not be encoded. To establish a two-way mapping, call - * addUnencodedNativeForFlavor as well. The new mapping will - * be of lower priority than any existing mapping. - * This method has no effect if a mapping from the specified - * String native to the specified or equal - * DataFlavor already exists. - * - * @param nat the String native key for the mapping - * @param flav the DataFlavor value for the mapping - * @throws NullPointerException if nat or flav is null + * Adds a mapping from a single {@code String} native to a single + * {@code DataFlavor}. Unlike {@code getFlavorsForNative}, the mapping will + * only be established in one direction, and the native will not be encoded. + * To establish a two-way mapping, call {@code addUnencodedNativeForFlavor} + * as well. The new mapping will be of lower priority than any existing + * mapping. This method has no effect if a mapping from the specified + * {@code String} native to the specified or equal {@code DataFlavor} + * already exists. * + * @param nat the {@code String} native key for the mapping + * @param flav the {@code DataFlavor} value for the mapping + * @throws NullPointerException if {@code nat} or {@code flav} is + * {@code null} * @see #addUnencodedNativeForFlavor * @since 1.4 */ @@ -935,29 +921,27 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Discards the current mappings for the specified String - * native, and creates new mappings to the specified - * DataFlavors. Unlike getFlavorsForNative, the - * mappings will only be established in one direction, and the natives need - * not be encoded. To establish two-way mappings, call - * setNativesForFlavor as well. The first - * DataFlavor in the array will represent the highest priority - * mapping. Subsequent DataFlavors will represent mappings of + * Discards the current mappings for the specified {@code String} native, + * and creates new mappings to the specified {@code DataFlavor}s. Unlike + * {@code getFlavorsForNative}, the mappings will only be established in one + * direction, and the natives need not be encoded. To establish two-way + * mappings, call {@code setNativesForFlavor} as well. The first + * {@code DataFlavor} in the array will represent the highest priority + * mapping. Subsequent {@code DataFlavor}s will represent mappings of * decreasing priority. *

            * If the array contains several elements that reference equal - * DataFlavors, this method will establish new mappings - * for the first of those elements and ignore the rest of them. + * {@code DataFlavor}s, this method will establish new mappings for the + * first of those elements and ignore the rest of them. *

            * It is recommended that client code not reset mappings established by the * data transfer subsystem. This method should only be used for * application-level mappings. * - * @param nat the String native key for the mappings - * @param flavors the DataFlavor values for the mappings - * @throws NullPointerException if nat or flavors is null - * or if flavors contains null elements - * + * @param nat the {@code String} native key for the mappings + * @param flavors the {@code DataFlavor} values for the mappings + * @throws NullPointerException if {@code nat} or {@code flavors} is + * {@code null} or if {@code flavors} contains {@code null} elements * @see #setNativesForFlavor * @since 1.4 */ @@ -975,23 +959,22 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Encodes a MIME type for use as a String native. The format - * of an encoded representation of a MIME type is implementation-dependent. - * The only restrictions are: + * Encodes a MIME type for use as a {@code String} native. The format of an + * encoded representation of a MIME type is implementation-dependent. The + * only restrictions are: *

              - *
            • The encoded representation is null if and only if the - * MIME type String is null.
            • - *
            • The encoded representations for two non-null MIME type - * Strings are equal if and only if these Strings - * are equal according to String.equals(Object).
            • + *
            • The encoded representation is {@code null} if and only if the MIME + * type {@code String} is {@code null}
            • + *
            • The encoded representations for two non-{@code null} MIME type + * {@code String}s are equal if and only if these {@code String}s are + * equal according to {@code String.equals(Object)}
            • *
            - *

            * The reference implementation of this method returns the specified MIME - * type String prefixed with JAVA_DATAFLAVOR:. + * type {@code String} prefixed with {@code JAVA_DATAFLAVOR:}. * - * @param mimeType the MIME type to encode - * @return the encoded String, or null if - * mimeType is null + * @param mimeType the MIME type to encode + * @return the encoded {@code String}, or {@code null} if {@code mimeType} + * is {@code null} */ public static String encodeJavaMIMEType(String mimeType) { return (mimeType != null) @@ -1000,27 +983,26 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Encodes a DataFlavor for use as a String - * native. The format of an encoded DataFlavor is - * implementation-dependent. The only restrictions are: + * Encodes a {@code DataFlavor} for use as a {@code String} native. The + * format of an encoded {@code DataFlavor} is implementation-dependent. The + * only restrictions are: *

              - *
            • The encoded representation is null if and only if the - * specified DataFlavor is null or its MIME type - * String is null.
            • - *
            • The encoded representations for two non-null - * DataFlavors with non-null MIME type - * Strings are equal if and only if the MIME type - * Strings of these DataFlavors are equal - * according to String.equals(Object).
            • + *
            • The encoded representation is {@code null} if and only if the + * specified {@code DataFlavor} is {@code null} or its MIME type + * {@code String} is {@code null}
            • + *
            • The encoded representations for two non-{@code null} + * {@code DataFlavor}s with non-{@code null} MIME type {@code String}s + * are equal if and only if the MIME type {@code String}s of these + * {@code DataFlavor}s are equal according to + * {@code String.equals(Object)}
            • *
            - *

            * The reference implementation of this method returns the MIME type - * String of the specified DataFlavor prefixed - * with JAVA_DATAFLAVOR:. + * {@code String} of the specified {@code DataFlavor} prefixed with + * {@code JAVA_DATAFLAVOR:}. * - * @param flav the DataFlavor to encode - * @return the encoded String, or null if - * flav is null or has a null MIME type + * @param flav the {@code DataFlavor} to encode + * @return the encoded {@code String}, or {@code null} if {@code flav} is + * {@code null} or has a {@code null} MIME type */ public static String encodeDataFlavor(DataFlavor flav) { return (flav != null) @@ -1029,23 +1011,23 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Returns whether the specified String is an encoded Java - * MIME type. + * Returns whether the specified {@code String} is an encoded Java MIME + * type. * - * @param str the String to test - * @return true if the String is encoded; - * false otherwise + * @param str the {@code String} to test + * @return {@code true} if the {@code String} is encoded; {@code false} + * otherwise */ public static boolean isJavaMIMEType(String str) { return (str != null && str.startsWith(JavaMIME, 0)); } /** - * Decodes a String native for use as a Java MIME type. + * Decodes a {@code String} native for use as a Java MIME type. * - * @param nat the String to decode - * @return the decoded Java MIME type, or null if nat is not - * an encoded String native + * @param nat the {@code String} to decode + * @return the decoded Java MIME type, or {@code null} if {@code nat} is not + * an encoded {@code String} native */ public static String decodeJavaMIMEType(String nat) { return (isJavaMIMEType(nat)) @@ -1054,14 +1036,13 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } /** - * Decodes a String native for use as a - * DataFlavor. + * Decodes a {@code String} native for use as a {@code DataFlavor}. * - * @param nat the String to decode - * @return the decoded DataFlavor, or null if - * nat is not an encoded String native - * @throws ClassNotFoundException if the class of the data flavor - * is not loaded + * @param nat the {@code String} to decode + * @return the decoded {@code DataFlavor}, or {@code null} if {@code nat} is + * not an encoded {@code String} native + * @throws ClassNotFoundException if the class of the data flavor is not + * loaded */ public static DataFlavor decodeDataFlavor(String nat) throws ClassNotFoundException diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Transferable.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Transferable.java index 3ba437748ab..24439218fc5 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Transferable.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Transferable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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,47 +28,50 @@ package java.awt.datatransfer; import java.io.IOException; /** - * Defines the interface for classes that can be used to provide data - * for a transfer operation. + * Defines the interface for classes that can be used to provide data for a + * transfer operation. *

            * For information on using data transfer with Swing, see * - * How to Use Drag and Drop and Data Transfer, - * a section in The Java Tutorial, for more information. + * How to Use Drag and Drop and Data Transfer, a section in + * The Java Tutorial, for more information. * - * @author Amy Fowler + * @author Amy Fowler + * @since 1.1 */ - public interface Transferable { /** * Returns an array of DataFlavor objects indicating the flavors the data - * can be provided in. The array should be ordered according to preference - * for providing the data (from most richly descriptive to least descriptive). + * can be provided in. The array should be ordered according to preference + * for providing the data (from most richly descriptive to least + * descriptive). + * * @return an array of data flavors in which this data can be transferred */ public DataFlavor[] getTransferDataFlavors(); /** - * Returns whether or not the specified data flavor is supported for - * this object. - * @param flavor the requested flavor for the data + * Returns whether or not the specified data flavor is supported for this + * object. + * + * @param flavor the requested flavor for the data * @return boolean indicating whether or not the data flavor is supported */ public boolean isDataFlavorSupported(DataFlavor flavor); /** - * Returns an object which represents the data to be transferred. The class - * of the object returned is defined by the representation class of the flavor. + * Returns an object which represents the data to be transferred. The class + * of the object returned is defined by the representation class of the + * flavor. * - * @param flavor the requested flavor for the data + * @param flavor the requested flavor for the data * @return an object which represents the data to be transferred + * @throws IOException if the data is no longer available in the requested + * flavor + * @throws UnsupportedFlavorException if the requested data flavor is not + * supported * @see DataFlavor#getRepresentationClass - * @exception IOException if the data is no longer available - * in the requested flavor. - * @exception UnsupportedFlavorException if the requested data flavor is - * not supported. */ public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException; - } diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/UnsupportedFlavorException.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/UnsupportedFlavorException.java index b3d9f17d21c..17f4a3f2108 100644 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/UnsupportedFlavorException.java +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/UnsupportedFlavorException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -27,9 +27,10 @@ package java.awt.datatransfer; /** * Signals that the requested data is not supported in this flavor. - * @see Transferable#getTransferData * - * @author Amy Fowler + * @author Amy Fowler + * @see Transferable#getTransferData + * @since 1.1 */ public class UnsupportedFlavorException extends Exception { @@ -41,8 +42,8 @@ public class UnsupportedFlavorException extends Exception { /** * Constructs an UnsupportedFlavorException. * - * @param flavor the flavor object which caused the exception. May - * be null. + * @param flavor the flavor object which caused the exception. May be + * {@code null}. */ public UnsupportedFlavorException(DataFlavor flavor) { super((flavor != null) ? flavor.getHumanPresentableName() : null); diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package-info.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package-info.java new file mode 100644 index 00000000000..c13a4be834b --- /dev/null +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package-info.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces and classes for transferring data between and within + * applications. It defines the notion of a "transferable" object, which is an + * object capable of being transferred between or within applications. An object + * identifies itself as being transferable by implementing the Transferable + * interface. + *

            + * It also provides a clipboard mechanism, which is an object that temporarily + * holds a transferable object that can be transferred between or within an + * application. The clipboard is typically used for copy and paste operations. + * Although it is possible to create a clipboard to use within an application, + * most applications will use the system clipboard to ensure the data can be + * transferred across applications running on the platform. + * + * @since 1.1 + */ +package java.awt.datatransfer; diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package.html b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package.html deleted file mode 100644 index c3b55e88340..00000000000 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - -Provides interfaces and classes for transferring data -between and within applications. It defines the notion of a -"transferable" object, which is an object capable of being -transferred between or within applications. An object identifies -itself as being transferable by implementing the Transferable -interface. -

            -It also provides a clipboard mechanism, which is an object that -temporarily holds a transferable object that can be transferred -between or within an application. The clipboard is typically used -for copy and paste operations. Although it is possible to create -a clipboard to use within an application, most applications will -use the system clipboard to ensure the data can be transferred -across applications running on the platform. - - - -@since 1.1 - - diff --git a/jdk/src/java.datatransfer/share/classes/module-info.java b/jdk/src/java.datatransfer/share/classes/module-info.java index ea3f9c2a53c..67d982b596a 100644 --- a/jdk/src/java.datatransfer/share/classes/module-info.java +++ b/jdk/src/java.datatransfer/share/classes/module-info.java @@ -24,10 +24,15 @@ */ /** - * Defines an API for transferring data between and within applications. + * Defines the API for transferring data between and within applications. + * + * @moduleGraph + * @since 9 */ module java.datatransfer { exports java.awt.datatransfer; + exports sun.datatransfer to java.desktop; + uses sun.datatransfer.DesktopDatatransferService; } diff --git a/jdk/src/java.datatransfer/share/classes/sun/datatransfer/DataFlavorUtil.java b/jdk/src/java.datatransfer/share/classes/sun/datatransfer/DataFlavorUtil.java index 8bdc82b7b10..3c4126cdf3e 100644 --- a/jdk/src/java.datatransfer/share/classes/sun/datatransfer/DataFlavorUtil.java +++ b/jdk/src/java.datatransfer/share/classes/sun/datatransfer/DataFlavorUtil.java @@ -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 @@ -51,9 +51,8 @@ import java.util.SortedSet; import java.util.TreeSet; import java.util.function.Supplier; - /** - * Utility class with different datatransfer helper functions + * Utility class with different datatransfer helper functions. * * @since 9 */ @@ -64,11 +63,11 @@ public class DataFlavorUtil { } private static Comparator getCharsetComparator() { - return CharsetComparator.INSTANCE; + return CharsetComparator.INSTANCE; } public static Comparator getDataFlavorComparator() { - return DataFlavorComparator.INSTANCE; + return DataFlavorComparator.INSTANCE; } public static Comparator getIndexOrderComparator(Map indexMap) { @@ -83,7 +82,8 @@ public class DataFlavorUtil { * Tracks whether a particular text/* MIME type supports the charset * parameter. The Map is initialized with all of the standard MIME types * listed in the DataFlavor.selectBestTextFlavor method comment. Additional - * entries may be added during the life of the JRE for text/ types. + * entries may be added during the life of the JRE for text/<other> + * types. */ private static final Map textMIMESubtypeCharsetSupport; @@ -127,11 +127,11 @@ public class DataFlavorUtil { } /** - * Returns a {@code SortedSet} of Strings which are a total order of the standard - * character sets supported by the JRE. The ordering follows the same principles as - * {@link java.awt.datatransfer.DataFlavor#selectBestTextFlavor(java.awt.datatransfer.DataFlavor[])}. - * So as to avoid loading all available character converters, optional, non-standard, - * character sets are not included. + * Returns a {@code SortedSet} of Strings which are a total order of the + * standard character sets supported by the JRE. The ordering follows the + * same principles as {@link DataFlavor#selectBestTextFlavor(DataFlavor[])}. + * So as to avoid loading all available character converters, optional, + * non-standard, character sets are not included. */ public static Set standardEncodings() { return StandardEncodingsHolder.standardEncodings; @@ -154,9 +154,8 @@ public class DataFlavorUtil { } /** - * Tests only whether the flavor's MIME type supports the charset - * parameter. Must only be called for flavors with a primary type of - * "text". + * Tests only whether the flavor's MIME type supports the charset parameter. + * Must only be called for flavors with a primary type of "text". */ public static boolean doesSubtypeSupportCharset(DataFlavor flavor) { String subType = flavor.getSubType(); @@ -188,10 +187,9 @@ public class DataFlavorUtil { return ret_val; } - /** - * Returns whether this flavor is a text type which supports the - * 'charset' parameter. + * Returns whether this flavor is a text type which supports the 'charset' + * parameter. */ public static boolean isFlavorCharsetTextType(DataFlavor flavor) { // Although stringFlavor doesn't actually support the charset @@ -247,9 +245,9 @@ public class DataFlavorUtil { /** * If the specified flavor is a text flavor which supports the "charset" * parameter, then this method returns that parameter, or the default - * charset if no such parameter was specified at construction. For non- - * text DataFlavors, and for non-charset text flavors, this method returns - * null. + * charset if no such parameter was specified at construction. For non-text + * DataFlavors, and for non-charset text flavors, this method returns + * {@code null}. */ public static String getTextCharset(DataFlavor flavor) { if (!isFlavorCharsetTextType(flavor)) { @@ -278,16 +276,16 @@ public class DataFlavorUtil { /** * Helper method to compare two objects by their Integer indices in the - * given map. If the map doesn't contain an entry for either of the - * objects, the fallback index will be used for the object instead. + * given map. If the map doesn't contain an entry for either of the objects, + * the fallback index will be used for the object instead. * - * @param indexMap the map which maps objects into Integer indexes. - * @param obj1 the first object to be compared. - * @param obj2 the second object to be compared. - * @param fallbackIndex the Integer to be used as a fallback index. - * @return a negative integer, zero, or a positive integer as the - * first object is mapped to a less, equal to, or greater - * index than the second. + * @param indexMap the map which maps objects into Integer indexes + * @param obj1 the first object to be compared + * @param obj2 the second object to be compared + * @param fallbackIndex the Integer to be used as a fallback index + * @return a negative integer, zero, or a positive integer as the first + * object is mapped to a less, equal to, or greater index than the + * second */ static int compareIndices(Map indexMap, T obj1, T obj2, @@ -342,21 +340,20 @@ public class DataFlavorUtil { *

            * Charsets are ordered according to the following rules: *

              - *
            • All unsupported charsets are equal. + *
            • All unsupported charsets are equal
            • *
            • Any unsupported charset is worse than any supported charset. *
            • Unicode charsets, such as "UTF-16", "UTF-8", "UTF-16BE" and - * "UTF-16LE", are considered best. - *
            • After them, platform default charset is selected. - *
            • "US-ASCII" is the worst of supported charsets. - *
            • For all other supported charsets, the lexicographically less - * one is considered the better. + * "UTF-16LE", are considered best
            • + *
            • After them, platform default charset is selected
            • + *
            • "US-ASCII" is the worst of supported charsets
            • + *
            • For all other supported charsets, the lexicographically less one + * is considered the better
            • *
            * - * @param charset1 the first charset to be compared - * @param charset2 the second charset to be compared. - * @return a negative integer, zero, or a positive integer as the - * first argument is worse, equal to, or better than the - * second. + * @param charset1 the first charset to be compared + * @param charset2 the second charset to be compared + * @return a negative integer, zero, or a positive integer as the first + * argument is worse, equal to, or better than the second */ public int compare(String charset1, String charset2) { charset1 = getEncoding(charset1); @@ -372,20 +369,20 @@ public class DataFlavorUtil { } /** - * Returns encoding for the specified charset according to the - * following rules: + * Returns encoding for the specified charset according to the following + * rules: *
              - *
            • If the charset is null, then null will - * be returned. + *
            • If the charset is {@code null}, then {@code null} will be + * returned
            • *
            • Iff the charset specifies an encoding unsupported by this JRE, - * UNSUPPORTED_CHARSET will be returned. + * {@code UNSUPPORTED_CHARSET} will be returned
            • *
            • If the charset specifies an alias name, the corresponding * canonical name will be returned iff the charset is a known - * Unicode, ASCII, or default charset. + * Unicode, ASCII, or default charset
            • *
            * - * @param charset the charset. - * @return an encoding for this charset. + * @param charset the charset + * @return an encoding for this charset */ static String getEncoding(String charset) { if (charset == null) { @@ -408,12 +405,13 @@ public class DataFlavorUtil { /** * An IndexedComparator which compares two DataFlavors. For text flavors, * the comparison follows the rules outlined in - * DataFlavor.selectBestTextFlavor. For non-text flavors, unknown - * application MIME types are preferred, followed by known - * application/x-java-* MIME types. Unknown application types are preferred - * because if the user provides his own data flavor, it will likely be the - * most descriptive one. For flavors which are otherwise equal, the - * flavors' string representation are compared in the alphabetical order. + * {@link DataFlavor#selectBestTextFlavor selectBestTextFlavor}. For + * non-text flavors, unknown application MIME types are preferred, followed + * by known application/x-java-* MIME types. Unknown application types are + * preferred because if the user provides his own data flavor, it will + * likely be the most descriptive one. For flavors which are otherwise + * equal, the flavors' string representation are compared in the + * alphabetical order. */ private static class DataFlavorComparator implements Comparator { @@ -614,7 +612,7 @@ public class DataFlavorUtil { } } - /* + /** * Given the Map that maps objects to Integer indices and a boolean value, * this Comparator imposes a direct or reverse order on set of objects. *

            @@ -623,9 +621,9 @@ public class DataFlavorUtil { * only if the index of A is greater than the index of B. An object that * doesn't have an associated index is less or equal than any other object. *

            - * If the specified boolean value is SELECT_WORST, the Comparator imposes the - * reverse index-based order: an object A is greater than an object B if and - * only if A is less than B with the direct index-based order. + * If the specified boolean value is SELECT_WORST, the Comparator imposes + * the reverse index-based order: an object A is greater than an object B if + * and only if A is less than B with the direct index-based order. */ private static class IndexOrderComparator implements Comparator { private final Map indexMap; @@ -643,25 +641,24 @@ public class DataFlavorUtil { private static class TextFlavorComparator extends DataFlavorComparator { static final TextFlavorComparator INSTANCE = new TextFlavorComparator(); + /** - * Compares two DataFlavor objects. Returns a negative - * integer, zero, or a positive integer as the first - * DataFlavor is worse than, equal to, or better than the - * second. + * Compares two {@code DataFlavor} objects. Returns a negative integer, + * zero, or a positive integer as the first {@code DataFlavor} is worse + * than, equal to, or better than the second. *

            - * DataFlavors are ordered according to the rules outlined - * for selectBestTextFlavor. + * {@code DataFlavor}s are ordered according to the rules outlined for + * {@link DataFlavor#selectBestTextFlavor selectBestTextFlavor}. * - * @param flavor1 the first DataFlavor to be compared - * @param flavor2 the second DataFlavor to be compared + * @param flavor1 the first {@code DataFlavor} to be compared + * @param flavor2 the second {@code DataFlavor} to be compared * @return a negative integer, zero, or a positive integer as the first * argument is worse, equal to, or better than the second * @throws ClassCastException if either of the arguments is not an - * instance of DataFlavor + * instance of {@code DataFlavor} * @throws NullPointerException if either of the arguments is - * null - * - * @see java.awt.datatransfer.DataFlavor#selectBestTextFlavor + * {@code null} + * @see DataFlavor#selectBestTextFlavor */ public int compare(DataFlavor flavor1, DataFlavor flavor2) { if (flavor1.isFlavorTextType()) { @@ -679,8 +676,8 @@ public class DataFlavorUtil { } /** - * A fallback implementation of {@link sun.datatransfer.DesktopDatatransferService} - * used if there is no desktop. + * A fallback implementation of {@link DesktopDatatransferService} used if + * there is no desktop. */ private static final class DefaultDesktopDatatransferService implements DesktopDatatransferService { static final DesktopDatatransferService INSTANCE = getDesktopService(); @@ -697,9 +694,8 @@ public class DataFlavorUtil { } /** - * System singleton FlavorTable. - * Only used if there is no desktop - * to provide an appropriate FlavorMap. + * System singleton FlavorTable. Only used if there is no desktop to + * provide an appropriate FlavorMap. */ private volatile FlavorMap flavorMap; @@ -754,8 +750,8 @@ public class DataFlavorUtil { } /** - * A class that provides access to java.rmi.Remote and java.rmi.MarshalledObject - * without creating a static dependency. + * A class that provides access to {@code java.rmi.Remote} and + * {@code java.rmi.MarshalledObject} without creating a static dependency. */ public static class RMI { private static final Class remoteClass = getClass("java.rmi.Remote"); @@ -788,7 +784,8 @@ public class DataFlavorUtil { } /** - * Returns java.rmi.Remote.class if RMI is present; otherwise {@code null}. + * Returns {@code java.rmi.Remote.class} if RMI is present; otherwise + * {@code null}. */ static Class remoteClass() { return remoteClass; @@ -802,8 +799,8 @@ public class DataFlavorUtil { } /** - * Returns a new MarshalledObject containing the serialized representation - * of the given object. + * Returns a new MarshalledObject containing the serialized + * representation of the given object. */ public static Object newMarshalledObject(Object obj) throws IOException { try { @@ -836,6 +833,5 @@ public class DataFlavorUtil { throw new AssertionError(x); } } - } } diff --git a/jdk/src/java.datatransfer/share/classes/sun/datatransfer/DesktopDatatransferService.java b/jdk/src/java.datatransfer/share/classes/sun/datatransfer/DesktopDatatransferService.java index 37499195bed..27740e22d12 100644 --- a/jdk/src/java.datatransfer/share/classes/sun/datatransfer/DesktopDatatransferService.java +++ b/jdk/src/java.datatransfer/share/classes/sun/datatransfer/DesktopDatatransferService.java @@ -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 @@ -31,8 +31,8 @@ import java.util.LinkedHashSet; import java.util.function.Supplier; /** - * Contains services which desktop provides to the datatransfer system - * to enrich it's functionality + * Contains services which desktop provides to the datatransfer system to enrich + * it's functionality. * * @author Petr Pchelko * @since 9 @@ -40,57 +40,55 @@ import java.util.function.Supplier; public interface DesktopDatatransferService { /** - * If desktop is present - invokes a {@code Runnable} on - * the event dispatch thread. Otherwise invokes a {@code run()} - * method directly. + * If desktop is present - invokes a {@code Runnable} on the event dispatch + * thread. Otherwise invokes a {@code run()} method directly. * - * @param r a {@code Runnable} to invoke + * @param r a {@code Runnable} to invoke */ void invokeOnEventThread(Runnable r); /** - * Get a platform-dependent default unicode encoding to use in - * datatransfer system. + * Get a platform-dependent default unicode encoding to use in datatransfer + * system. * * @return default unicode encoding */ String getDefaultUnicodeEncoding(); /** - * Takes an appropriate {@code FlavorMap} from the desktop. - * If no appropriate table is found - uses a provided supplier to - * instantiate a table. If the desktop is absent - creates and returns - * a system singleton. + * Takes an appropriate {@code FlavorMap} from the desktop. If no + * appropriate table is found - uses a provided supplier to instantiate a + * table. If the desktop is absent - creates and returns a system singleton. * - * @param supplier a constructor that should be used to create a new instance of - * the {@code FlavorMap} + * @param supplier a constructor that should be used to create a new + * instance of the {@code FlavorMap} * @return a {@code FlavorMap} */ FlavorMap getFlavorMap(Supplier supplier); /** - * Checks if desktop is present + * Checks if desktop is present. * * @return {@code true} is the desktop is present */ boolean isDesktopPresent(); /** - * Returns platform-specific mappings for the specified native format. - * If there are no platform-specific mappings for this native, the method - * returns an empty {@code Set} + * Returns platform-specific mappings for the specified native format. If + * there are no platform-specific mappings for this native, the method + * returns an empty {@code Set}. * - * @param nat a native format to return flavors for + * @param nat a native format to return flavors for * @return set of platform-specific mappings for a native format */ LinkedHashSet getPlatformMappingsForNative(String nat); /** - * Returns platform-specific mappings for the specified flavor. - * If there are no platform-specific mappings for this flavor, the method - * returns an empty {@code Set} + * Returns platform-specific mappings for the specified flavor. If there are + * no platform-specific mappings for this flavor, the method returns an + * empty {@code Set}. * - * @param df {@code DataFlavor} to return mappings for + * @param df {@code DataFlavor} to return mappings for * @return set of platform-specific mappings for a {@code DataFlavor} */ LinkedHashSet getPlatformMappingsForFlavor(DataFlavor df); @@ -98,8 +96,8 @@ public interface DesktopDatatransferService { /** * This method is called for text flavor mappings established while parsing * the default flavor mappings file. It stores the "eoln" and "terminators" - * parameters which are not officially part of the MIME type. They are - * MIME parameters specific to the flavormap.properties file format. + * parameters which are not officially part of the MIME type. They are MIME + * parameters specific to the flavormap.properties file format. */ void registerTextFlavorProperties(String nat, String charset, String eoln, String terminators); diff --git a/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java b/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java index 8e105132eaa..175af75f73d 100644 --- a/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java +++ b/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java @@ -78,7 +78,7 @@ public final class JRSUIConstants { return "THUMB_START"; } else if (hit == WINDOW_TITLE_BAR_HEIGHT) { return "WINDOW_TITLE_BAR_HEIGHT"; - } else if (hit == THUMB_START) { + } else if (hit == ANIMATION_FRAME) { return "ANIMATION_FRAME"; } return getClass().getSimpleName(); diff --git a/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIControl.java b/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIControl.java index 115002b5825..e3579449b75 100644 --- a/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIControl.java +++ b/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -114,6 +114,7 @@ public final class JRSUIControl { changes.putAll(other.changes); } + @SuppressWarnings("deprecation") protected synchronized void finalize() throws Throwable { if (cfDictionaryPtr == 0) return; disposeCFDictionary(cfDictionaryPtr); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/Application.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/Application.java index c0a4009bd6c..9bcafeae1b1 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/Application.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/Application.java @@ -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 @@ -29,7 +29,24 @@ import java.awt.Image; import java.awt.PopupMenu; import java.awt.Toolkit; import java.awt.Window; -import java.awt.desktop.*; +import java.awt.desktop.AboutHandler; +import java.awt.desktop.AppForegroundListener; +import java.awt.desktop.AppHiddenListener; +import java.awt.desktop.AppReopenedListener; +import java.awt.desktop.OpenFilesEvent; +import java.awt.desktop.OpenFilesHandler; +import java.awt.desktop.OpenURIEvent; +import java.awt.desktop.OpenURIHandler; +import java.awt.desktop.PreferencesHandler; +import java.awt.desktop.PrintFilesEvent; +import java.awt.desktop.PrintFilesHandler; +import java.awt.desktop.QuitHandler; +import java.awt.desktop.QuitResponse; +import java.awt.desktop.QuitStrategy; +import java.awt.desktop.ScreenSleepListener; +import java.awt.desktop.SystemEventListener; +import java.awt.desktop.SystemSleepListener; +import java.awt.desktop.UserSessionListener; import java.beans.Beans; import javax.swing.JMenuBar; @@ -108,10 +125,10 @@ public class Application { * * @see AppForegroundListener * @see AppHiddenListener - * @see AppReOpenedListener - * @see AppScreenSleepListener - * @see AppSystemSleepListener - * @see AppUserSessionListener + * @see AppReopenedListener + * @see ScreenSleepListener + * @see SystemSleepListener + * @see UserSessionListener * * @param listener * @since Java for Mac OS X 10.6 Update 3 @@ -126,10 +143,10 @@ public class Application { * * @see AppForegroundListener * @see AppHiddenListener - * @see AppReOpenedListener - * @see AppScreenSleepListener - * @see AppSystemSleepListener - * @see AppUserSessionListener + * @see AppReopenedListener + * @see ScreenSleepListener + * @see SystemSleepListener + * @see UserSessionListener * * @param listener * @since Java for Mac OS X 10.6 Update 3 @@ -144,7 +161,7 @@ public class Application { * * Setting the {@link AboutHandler} to {@code null} reverts it to the default Cocoa About window. * - * @param aboutHandler the handler to respond to the {@link AboutHandler#handleAbout()} message + * @param aboutHandler the handler to respond to the {@link AboutHandler#handleAbout} message * @since Java for Mac OS X 10.6 Update 3 * @since Java for Mac OS X 10.5 Update 8 */ @@ -167,7 +184,7 @@ public class Application { /** * Installs the handler which is notified when the application is asked to open a list of files. - * The {@link OpenFilesHandler#openFiles(AppEvent.OpenFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist. + * The {@link OpenFilesHandler#openFiles(OpenFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist. * See the Info.plist Key Reference for more information about adding a {@code CFBundleDocumentTypes} key to your app's Info.plist. * * @param openFileHandler @@ -180,7 +197,7 @@ public class Application { /** * Installs the handler which is notified when the application is asked to print a list of files. - * The {@link PrintFilesHandler#printFiles(AppEvent.PrintFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist. + * The {@link PrintFilesHandler#printFiles(PrintFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist. * See the Info.plist Key Reference for more information about adding a {@code CFBundleDocumentTypes} key to your app's Info.plist. * * @param printFileHandler @@ -193,10 +210,10 @@ public class Application { /** * Installs the handler which is notified when the application is asked to open a URL. - * The {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleURLTypes} array present in it's Info.plist. + * The {@link OpenURIHandler#openURI(OpenURIEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleURLTypes} array present in it's Info.plist. * See the Info.plist Key Reference for more information about adding a {@code CFBundleURLTypes} key to your app's Info.plist. * - * Setting the handler to {@code null} causes all {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} requests to be enqueued until another handler is set. + * Setting the handler to {@code null} causes all {@link OpenURIHandler#openURI(OpenURIEvent)} requests to be enqueued until another handler is set. * * @param openURIHandler * @since Java for Mac OS X 10.6 Update 3 diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationAdapter.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationAdapter.java index aba03e9f744..da1c967b090 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationAdapter.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationAdapter.java @@ -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 @@ -25,12 +25,26 @@ package com.apple.eawt; +import java.awt.desktop.AboutHandler; +import java.awt.desktop.AppForegroundListener; +import java.awt.desktop.AppHiddenListener; +import java.awt.desktop.AppReopenedListener; +import java.awt.desktop.OpenFilesHandler; +import java.awt.desktop.OpenURIHandler; +import java.awt.desktop.PreferencesHandler; +import java.awt.desktop.PrintFilesHandler; +import java.awt.desktop.QuitHandler; +import java.awt.desktop.ScreenSleepListener; +import java.awt.desktop.SystemEventListener; +import java.awt.desktop.SystemSleepListener; +import java.awt.desktop.UserSessionListener; + /** * An abstract adapter class for receiving {@code ApplicationEvents}. * * ApplicationEvents are deprecated. Use individual app event listeners or handlers instead. * - * @see Application#addAppEventListener(AppEventListener) + * @see Application#addAppEventListener(SystemEventListener) * * @see AboutHandler * @see PreferencesHandler @@ -39,14 +53,14 @@ package com.apple.eawt; * @see PrintFilesHandler * @see QuitHandler * - * @see AppReOpenedListener + * @see AppReopenedListener * @see AppForegroundListener * @see AppHiddenListener * @see UserSessionListener * @see ScreenSleepListener * @see SystemSleepListener * - * @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse}. + * @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReopenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse}. * @since 1.4 */ @SuppressWarnings("deprecation") diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationEvent.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationEvent.java index 49617f6c852..98c1bc5cbe7 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationEvent.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationEvent.java @@ -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 @@ -25,12 +25,18 @@ package com.apple.eawt; +import java.awt.desktop.AboutHandler; +import java.awt.desktop.AppReopenedListener; +import java.awt.desktop.OpenFilesHandler; +import java.awt.desktop.PreferencesHandler; +import java.awt.desktop.PrintFilesHandler; +import java.awt.desktop.QuitHandler; import java.util.EventObject; /** * The class of events sent to the deprecated ApplicationListener callbacks. * - * @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse} + * @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReopenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse} * @since 1.4 */ @Deprecated diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationListener.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationListener.java index eabcb92aafe..74bec650a12 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationListener.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/ApplicationListener.java @@ -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 @@ -25,12 +25,25 @@ package com.apple.eawt; +import java.awt.desktop.AboutHandler; +import java.awt.desktop.AppForegroundListener; +import java.awt.desktop.AppHiddenListener; +import java.awt.desktop.AppReopenedListener; +import java.awt.desktop.OpenFilesHandler; +import java.awt.desktop.OpenURIHandler; +import java.awt.desktop.PreferencesHandler; +import java.awt.desktop.PrintFilesHandler; +import java.awt.desktop.QuitHandler; +import java.awt.desktop.ScreenSleepListener; +import java.awt.desktop.SystemEventListener; +import java.awt.desktop.SystemSleepListener; +import java.awt.desktop.UserSessionListener; import java.util.EventListener; /** * ApplicationEvents are deprecated. Use individual AppEvent listeners or handlers instead. * - * @see Application#addAppEventListener(AppEventListener) + * @see Application#addAppEventListener(SystemEventListener) * * @see AboutHandler * @see PreferencesHandler @@ -39,7 +52,7 @@ import java.util.EventListener; * @see PrintFilesHandler * @see QuitHandler * - * @see AppReOpenedListener + * @see AppReopenedListener * @see AppForegroundListener * @see AppHiddenListener * @see UserSessionListener @@ -47,7 +60,7 @@ import java.util.EventListener; * @see SystemSleepListener * * @since 1.4 - * @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse} + * @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReopenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse} */ @SuppressWarnings("deprecation") @Deprecated @@ -146,7 +159,7 @@ public interface ApplicationListener extends EventListener { * event is sent from another application, include that code as part of this handler. * * @param event the Reopen Application event - * @deprecated use {@link AppReOpenedListener} + * @deprecated use {@link AppReopenedListener} */ @Deprecated public void handleReOpenApplication(ApplicationEvent event); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenAdapter.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenAdapter.java index 4a124da6e38..79fcd34b920 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenAdapter.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenAdapter.java @@ -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 @@ -25,13 +25,15 @@ package com.apple.eawt; +import java.awt.Window; + import com.apple.eawt.event.FullScreenEvent; /** * Abstract adapter class for receiving fullscreen events. This class is provided * as a convenience for creating listeners. * - * Subclasses registered with {@link FullScreenUtilities#addFullScreenListenerTo(javax.swing.RootPaneContainer, FullScreenListener)} + * Subclasses registered with {@link FullScreenUtilities#addFullScreenListenerTo(Window, FullScreenListener)} * will receive all entering/entered/exiting/exited full screen events. * * @see FullScreenUtilities diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenListener.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenListener.java index 737a67f6f83..d3490efcde7 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenListener.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenListener.java @@ -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 @@ -37,25 +37,25 @@ import java.util.EventListener; public interface FullScreenListener extends EventListener { /** * Invoked when a window has started to enter full screen. - * @param event containing the specific window entering full screen. + * @param e containing the specific window entering full screen. */ public void windowEnteringFullScreen(final FullScreenEvent e); /** * Invoked when a window has fully entered full screen. - * @param event containing the specific window which has entered full screen. + * @param e containing the specific window which has entered full screen. */ public void windowEnteredFullScreen(final FullScreenEvent e); /** * Invoked when a window has started to exit full screen. - * @param event containing the specific window exiting full screen. + * @param e containing the specific window exiting full screen. */ public void windowExitingFullScreen(final FullScreenEvent e); /** * Invoked when a window has fully exited full screen. - * @param event containing the specific window which has exited full screen. + * @param e containing the specific window which has exited full screen. */ public void windowExitedFullScreen(final FullScreenEvent e); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenUtilities.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenUtilities.java index 682c07e721d..38472121b8b 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenUtilities.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/FullScreenUtilities.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -36,7 +36,7 @@ import com.apple.eawt.event.GestureUtilities; /** * Utility class perform animated full screen actions to top-level {@link Window}s. * - * This class manages the relationship between {@link Windows}s and the {@link FullScreenListener}s + * This class manages the relationship between {@link Window}s and the {@link FullScreenListener}s * attached to them. It's design is similar to the Java SE 6u10 {@link com.sun.awt.AWTUtilities} * class which adds additional functionality to AWT Windows, without adding new API to the * {@link java.awt.Window} class. diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/MacQuitResponse.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/MacQuitResponse.java index ab37dfc93d9..5b9eb054c33 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/MacQuitResponse.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/MacQuitResponse.java @@ -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 @@ -25,11 +25,14 @@ package com.apple.eawt; +import java.awt.desktop.QuitEvent; +import java.awt.desktop.QuitHandler; import java.awt.desktop.QuitResponse; +import java.awt.desktop.QuitStrategy; /** * Used to respond to a request to quit the application. - * The QuitResponse may be used after the {@link QuitHandler#handleQuitRequestWith(AppEvent.QuitEvent, MacQuitResponse)} method has returned, and may be used from any thread. + * The QuitResponse may be used after the {@link QuitHandler#handleQuitRequestWith(QuitEvent, QuitResponse)} method has returned, and may be used from any thread. * * @see Application#setQuitHandler(QuitHandler) * @see QuitHandler diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java index c9c0c9bcf4d..8f1363f774c 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java @@ -73,8 +73,7 @@ class _AppDockIconHandler { public void setDockIconImage(final Image image) { try { final CImage cImage = CImage.createFromImage(image); - final long nsImagePtr = getNSImagePtrFrom(cImage); - nativeSetDockIconImage(nsImagePtr); + cImage.execute(_AppDockIconHandler::nativeSetDockIconImage); } catch (final Throwable e) { throw new RuntimeException(e); } @@ -101,16 +100,4 @@ class _AppDockIconHandler { void setDockIconProgress(int value) { nativeSetDockIconProgress(value); } - - static long getNSImagePtrFrom(final CImage cImage) { - if (cImage == null) return 0; - - try { - final Field cImagePtrField = CFRetainedResource.class.getDeclaredField("ptr"); - cImagePtrField.setAccessible(true); - return cImagePtrField.getLong(cImage); - } catch (final Throwable e) { - throw new RuntimeException(e); - } - } } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java index e017b32538a..7eb35adc58a 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java @@ -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 @@ -25,9 +25,13 @@ package com.apple.eawt; +import java.awt.Container; import java.awt.Frame; -import javax.swing.*; + +import javax.swing.JFrame; +import javax.swing.JLayeredPane; +import javax.swing.JMenuBar; import javax.swing.plaf.MenuBarUI; import com.apple.laf.ScreenMenuBar; @@ -102,10 +106,15 @@ class _AppMenuBarHandler { return; } - final MenuBarUI ui = menuBar.getUI(); + Container parent = menuBar.getParent(); + if (parent instanceof JLayeredPane) { + ((JLayeredPane) parent).remove(menuBar); + } + + MenuBarUI ui = menuBar.getUI(); if (!(ui instanceof AquaMenuBarUI)) { - // Aqua was not installed - throw new IllegalStateException("Application.setDefaultMenuBar() only works with the Aqua Look and Feel"); + ui = new AquaMenuBarUI(); + menuBar.setUI(ui); } final AquaMenuBarUI aquaUI = (AquaMenuBarUI)ui; diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GestureAdapter.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GestureAdapter.java index 6e17f534218..0f6c6d9ee7f 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GestureAdapter.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GestureAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -29,7 +29,7 @@ package com.apple.eawt.event; * Abstract adapter class for receiving gesture events. This class is provided * as a convenience for creating listeners. * - * Subclasses registered with {@link GestureUtilities#addGestureListenerTo()} + * Subclasses registered with {@link GestureUtilities#addGestureListenerTo} * will receive all phase, magnification, rotation, and swipe events. * * @see GestureUtilities diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GestureEvent.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GestureEvent.java index 7c35589d54e..6e313b086d5 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GestureEvent.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GestureEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -26,6 +26,7 @@ package com.apple.eawt.event; import java.awt.*; +import java.awt.event.InputEvent; /** * Abstract event all gestures inherit from. diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GesturePhaseListener.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GesturePhaseListener.java index c0fc3431c14..e6d90db7b98 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GesturePhaseListener.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/GesturePhaseListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -39,13 +39,13 @@ package com.apple.eawt.event; public interface GesturePhaseListener extends GestureListener { /** * Invoked when the user has started a continuous gesture. - * @param event representing the start of a continuous gesture. + * @param e representing the start of a continuous gesture. */ public void gestureBegan(final GesturePhaseEvent e); /** * Invoked when the user has stopped a continuous gesture. - * @param event representing the end of a continuous gesture. + * @param e representing the end of a continuous gesture. */ public void gestureEnded(final GesturePhaseEvent e); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/MagnificationListener.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/MagnificationListener.java index 35130ba7061..d327b70287f 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/MagnificationListener.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/MagnificationListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -37,7 +37,7 @@ package com.apple.eawt.event; public interface MagnificationListener extends GestureListener { /** * Invoked when a magnification gesture is performed by the user. - * @param event containing the scale of the magnification. + * @param e containing the scale of the magnification. */ public void magnify(final MagnificationEvent e); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/RotationListener.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/RotationListener.java index ae3ed067770..9fcbed76175 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/RotationListener.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/RotationListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -37,7 +37,7 @@ package com.apple.eawt.event; public interface RotationListener extends GestureListener { /** * Invoked when a rotation gesture is performed by the user. - * @param event containing an abstract measure of rotation. + * @param e containing an abstract measure of rotation. */ public void rotate(final RotationEvent e); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/SwipeListener.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/SwipeListener.java index cfbbdc2aa07..598eb38185f 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/SwipeListener.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/SwipeListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -38,25 +38,25 @@ package com.apple.eawt.event; public interface SwipeListener extends GestureListener { /** * Invoked when an upwards swipe gesture is performed by the user. - * @param event representing the occurrence of a swipe. + * @param e representing the occurrence of a swipe. */ public void swipedUp(final SwipeEvent e); /** * Invoked when a downward swipe gesture is performed by the user. - * @param event representing the occurrence of a swipe. + * @param e representing the occurrence of a swipe. */ public void swipedDown(final SwipeEvent e); /** * Invoked when a leftward swipe gesture is performed by the user. - * @param event representing the occurrence of a swipe. + * @param e representing the occurrence of a swipe. */ public void swipedLeft(final SwipeEvent e); /** * Invoked when a rightward swipe gesture is performed by the user. - * @param event representing the occurrence of a swipe. + * @param e representing the occurrence of a swipe. */ public void swipedRight(final SwipeEvent e); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/package-info.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/package-info.java new file mode 100644 index 00000000000..bb8020d6b19 --- /dev/null +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/package-info.java @@ -0,0 +1,34 @@ +/* + * 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 + * 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. + */ + +/** + * Classes for receiving gesture events. Provides a mechanism to receive various + * gesture events on JComponents. Gesture notifications are relayed up the + * component hierarchy from the deepest component under the cursor to the + * top-level container. Events may be consumed by deeper components to prevent + * them from propagating to higher components. Gesture listeners are added to + * components using the GestureUtilities helper class. + */ +package com.apple.eawt.event; diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/package.html b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/package.html deleted file mode 100644 index 0946e60f309..00000000000 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/event/package.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - -Classes for receiving gesture events. - -Provides a mechanism to receive various gesture events on JComponents. Gesture notifications are relayed up the component hierarchy from the deepest component under the cursor to the top-level container. Events may be consumed by deeper components to prevent them from propagating to higher components. - -Gesture listeners are added to components using the GestureUtilities helper class. - - diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/package-info.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/package-info.java new file mode 100644 index 00000000000..105bc093af6 --- /dev/null +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/package-info.java @@ -0,0 +1,36 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes for integrating Java applications with the native + * application environment. These classes provide a simple way to implement + * native features to fine tune Java applications on Mac OS X. These listeners + * and handlers can help make Java applications behaviors and user interface + * indistinguishable from native applications. For further information on the + * Mac OS X user interface, consult the + * Aqua Human Interface Guidelines. + */ +package com.apple.eawt; diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/package.html b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/package.html deleted file mode 100644 index 81bc1a8d3f8..00000000000 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/package.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - -Provides classes for integrating Java applications with the native application environment. - -These classes provide a simple way to implement native features to fine tune Java applications on Mac OS X. These listeners and handlers can help make Java applications behaviors and user interface indistinguishable from native applications. For further information on the Mac OS X user interface, consult the Aqua Human Interface Guidelines. - diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eio/package-info.java b/jdk/src/java.desktop/macosx/classes/com/apple/eio/package-info.java new file mode 100644 index 00000000000..ba664d653ec --- /dev/null +++ b/jdk/src/java.desktop/macosx/classes/com/apple/eio/package-info.java @@ -0,0 +1,36 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes to allow you to take advantage of functionality of the + * underlying Mac OS X operating system. The classes in this package provide + * access to features of Mac OS X that may or may not be present on other + * platforms. It should be noted that depending on any of these features ties + * Java applications to Mac OS X. For more thorough explanation of some of the + * topics discussed here, please refer to + * Inside Mac OS X: System Overview. + */ +package com.apple.eio; diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eio/package.html b/jdk/src/java.desktop/macosx/classes/com/apple/eio/package.html deleted file mode 100644 index 922b5b4b84f..00000000000 --- a/jdk/src/java.desktop/macosx/classes/com/apple/eio/package.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - -Provides classes to allow you to take advantage of functionality of the underlying Mac OS X operating system. -The classes in this package provide access to features of Mac OS X that may or may not be present on other platforms. It should be noted that depending on any of these features ties Java applications to Mac OS X. For more thorough explanation of some of the topics discussed here, please refer to Inside Mac OS X: System Overview. - diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonBorder.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonBorder.java index aa2947cb87d..f58c518d2d4 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonBorder.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonBorder.java @@ -37,7 +37,7 @@ import com.apple.laf.AquaUtilControlSize.*; import com.apple.laf.AquaUtils.*; public abstract class AquaButtonBorder extends AquaBorder implements Border, UIResource { - public static final RecyclableSingleton fDynamic = new RecyclableSingletonFromDefaultConstructor(Dynamic.class); + private static final RecyclableSingleton fDynamic = new RecyclableSingletonFromDefaultConstructor(Dynamic.class); public static AquaButtonBorder getDynamicButtonBorder() { return fDynamic.get(); } @@ -47,12 +47,12 @@ public abstract class AquaButtonBorder extends AquaBorder implements Border, UIR return fToggle.get(); } - public static final RecyclableSingleton fToolBar = new RecyclableSingletonFromDefaultConstructor(Toolbar.class); + private static final RecyclableSingleton fToolBar = new RecyclableSingletonFromDefaultConstructor(Toolbar.class); public static Border getToolBarButtonBorder() { return fToolBar.get(); } - public static final RecyclableSingleton fBevel = new RecyclableSingleton() { + private static final RecyclableSingleton fBevel = new RecyclableSingleton() { protected Named getInstance() { return new Named(Widget.BUTTON_BEVEL, new SizeDescriptor(new SizeVariant().alterMargins(2, 4, 2, 4))); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonCheckBoxUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonCheckBoxUI.java index d467ccab533..bef9fe83fc5 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonCheckBoxUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonCheckBoxUI.java @@ -34,8 +34,8 @@ import com.apple.laf.AquaUtilControlSize.*; import com.apple.laf.AquaUtils.*; public class AquaButtonCheckBoxUI extends AquaButtonLabeledUI { - protected static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaButtonCheckBoxUI.class); - protected static final RecyclableSingleton sizingIcon = new RecyclableSingleton() { + private static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaButtonCheckBoxUI.class); + private static final RecyclableSingleton sizingIcon = new RecyclableSingleton() { protected ImageIcon getInstance() { return new ImageIcon(AquaNativeResources.getRadioButtonSizerImage()); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java index 0d48390c6f8..aa48414e801 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java @@ -138,7 +138,7 @@ public class AquaButtonExtendedTypes { return typeDefinitions.get().get(name); } - protected static final RecyclableSingleton> typeDefinitions = new RecyclableSingleton>() { + private static final RecyclableSingleton> typeDefinitions = new RecyclableSingleton>() { protected Map getInstance() { return getAllTypes(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java index c05f191ef38..5f6a076c755 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java @@ -42,9 +42,9 @@ import com.apple.laf.AquaUtilControlSize.*; import com.apple.laf.AquaUtils.RecyclableSingleton; public abstract class AquaButtonLabeledUI extends AquaButtonToggleUI implements Sizeable { - protected static RecyclableSizingIcon regularIcon = new RecyclableSizingIcon(18); - protected static RecyclableSizingIcon smallIcon = new RecyclableSizingIcon(16); - protected static RecyclableSizingIcon miniIcon = new RecyclableSizingIcon(14); + private static final RecyclableSizingIcon regularIcon = new RecyclableSizingIcon(18); + private static final RecyclableSizingIcon smallIcon = new RecyclableSizingIcon(16); + private static final RecyclableSizingIcon miniIcon = new RecyclableSizingIcon(14); protected static class RecyclableSizingIcon extends RecyclableSingleton { final int iconSize; diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonRadioUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonRadioUI.java index cb465345853..a8da1803fdb 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonRadioUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonRadioUI.java @@ -34,8 +34,8 @@ import com.apple.laf.AquaUtilControlSize.*; import com.apple.laf.AquaUtils.*; public class AquaButtonRadioUI extends AquaButtonLabeledUI { - protected static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaButtonRadioUI.class); - protected static final RecyclableSingleton sizingIcon = new RecyclableSingleton() { + private static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaButtonRadioUI.class); + private static final RecyclableSingleton sizingIcon = new RecyclableSingleton() { protected ImageIcon getInstance() { return new ImageIcon(AquaNativeResources.getRadioButtonSizerImage()); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonToggleUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonToggleUI.java index d61126e7e97..d4f55f3c874 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonToggleUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonToggleUI.java @@ -32,7 +32,7 @@ import com.apple.laf.AquaUtils.*; public class AquaButtonToggleUI extends AquaButtonUI { // Create PLAF - static final RecyclableSingleton aquaToggleButtonUI = new RecyclableSingletonFromDefaultConstructor(AquaButtonToggleUI.class); + private static final RecyclableSingleton aquaToggleButtonUI = new RecyclableSingletonFromDefaultConstructor(AquaButtonToggleUI.class); public static ComponentUI createUI(final JComponent b) { return aquaToggleButtonUI.get(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java index 4d6d463fa5c..b173ee114e1 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java @@ -48,7 +48,7 @@ public class AquaButtonUI extends BasicButtonUI implements Sizeable { private static final String BUTTON_TYPE = "JButton.buttonType"; private static final String SEGMENTED_BUTTON_POSITION = "JButton.segmentPosition"; - protected static final RecyclableSingleton buttonUI = new RecyclableSingletonFromDefaultConstructor(AquaButtonUI.class); + private static final RecyclableSingleton buttonUI = new RecyclableSingletonFromDefaultConstructor(AquaButtonUI.class); public static ComponentUI createUI(final JComponent c) { return buttonUI.get(); } @@ -462,7 +462,7 @@ public class AquaButtonUI extends BasicButtonUI implements Sizeable { return d; } - static final RecyclableSingleton fHierListener = new RecyclableSingletonFromDefaultConstructor(AquaHierarchyButtonListener.class); + private static final RecyclableSingleton fHierListener = new RecyclableSingletonFromDefaultConstructor(AquaHierarchyButtonListener.class); static AquaHierarchyButtonListener getAquaHierarchyButtonListener() { return fHierListener.get(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java index 88faf6b06e8..7336fbd703c 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, 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 @@ -25,18 +25,29 @@ package com.apple.laf; -import java.awt.*; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; import java.awt.Insets; +import java.awt.Point; import java.awt.Rectangle; -import java.awt.event.*; +import java.awt.Toolkit; +import java.awt.event.InputEvent; +import java.awt.event.MouseEvent; -import javax.swing.*; +import javax.swing.Box; +import javax.swing.JComboBox; +import javax.swing.JList; +import javax.swing.ListCellRenderer; +import javax.swing.SwingUtilities; import javax.swing.plaf.basic.BasicComboPopup; import sun.lwawt.macosx.CPlatformWindow; @SuppressWarnings("serial") // Superclass is not serializable across versions -class AquaComboBoxPopup extends BasicComboPopup { +final class AquaComboBoxPopup extends BasicComboPopup { static final int FOCUS_RING_PAD_LEFT = 6; static final int FOCUS_RING_PAD_RIGHT = 6; static final int FOCUS_RING_PAD_BOTTOM = 5; @@ -154,9 +165,15 @@ class AquaComboBoxPopup extends BasicComboPopup { protected JList createList() { return new JList(comboBox.getModel()) { @Override + @SuppressWarnings("deprecation") public void processMouseEvent(MouseEvent e) { if (e.isMetaDown()) { - e = new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(), e.getModifiers() ^ InputEvent.META_MASK, e.getX(), e.getY(), e.getXOnScreen(), e.getYOnScreen(), e.getClickCount(), e.isPopupTrigger(), MouseEvent.NOBUTTON); + e = new MouseEvent((Component) e.getSource(), e.getID(), + e.getWhen(), + e.getModifiers() ^ InputEvent.META_MASK, + e.getX(), e.getY(), e.getXOnScreen(), + e.getYOnScreen(), e.getClickCount(), + e.isPopupTrigger(), MouseEvent.NOBUTTON); } super.processMouseEvent(e); } @@ -195,9 +212,6 @@ class AquaComboBoxPopup extends BasicComboPopup { //System.err.println("GetBestScreenBounds p: "+ p.x + ", " + p.y); final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); final GraphicsDevice[] gs = ge.getScreenDevices(); - //System.err.println(" gs.length = " + gs.length); - final Rectangle comboBoxBounds = comboBox.getBounds(); - for (final GraphicsDevice gd : gs) { final GraphicsConfiguration[] gc = gd.getConfigurations(); for (final GraphicsConfiguration element0 : gc) { @@ -209,15 +223,14 @@ class AquaComboBoxPopup extends BasicComboPopup { } // Hmm. Origin's off screen, but is any part on? + final Rectangle comboBoxBounds = comboBox.getBounds(); comboBoxBounds.setLocation(p); for (final GraphicsDevice gd : gs) { final GraphicsConfiguration[] gc = gd.getConfigurations(); for (final GraphicsConfiguration element0 : gc) { final Rectangle gcBounds = element0.getBounds(); if (gcBounds.intersects(comboBoxBounds)) { - if (gcBounds.contains(p)) { - return getAvailableScreenArea(gcBounds, element0); - } + return getAvailableScreenArea(gcBounds, element0); } } } @@ -228,8 +241,15 @@ class AquaComboBoxPopup extends BasicComboPopup { private Rectangle getAvailableScreenArea(Rectangle bounds, GraphicsConfiguration gc) { Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc); - return new Rectangle(0, insets.top, bounds.width, - bounds.height - insets.top); + return new Rectangle(bounds.x + insets.left, bounds.y + insets.top, + bounds.width - insets.left - insets.right, + bounds.height - insets.top - insets.bottom); + } + + private int getComboBoxEdge(int py, boolean bottom) { + int offset = bottom ? 9 : -9; + // if py is less than new y we have a clipped combo, so leave it alone. + return Math.min((py / 2) + offset, py); } @Override @@ -240,7 +260,7 @@ class AquaComboBoxPopup extends BasicComboPopup { if (isPopdown && !isTableCellEditor) { // place the popup just below the button, which is // near the center of a large combo box - py = Math.min((py / 2) + 9, py); // if py is less than new y we have a clipped combo, so leave it alone. + py = getComboBoxEdge(py, true); } // px & py are relative to the combo box @@ -285,8 +305,12 @@ class AquaComboBoxPopup extends BasicComboPopup { // Make sure it's all on the screen - shift it by the amount it's off p.x += px; p.y += py; // Screen location of px & py - if (p.x < scrBounds.x) px -= (p.x + scrBounds.x); - if (p.y < scrBounds.y) py -= (p.y + scrBounds.y); + if (p.x < scrBounds.x) { + px = px + (scrBounds.x - p.x); + } + if (p.y < scrBounds.y) { + py = py + (scrBounds.y - p.y); + } final Point top = new Point(0, 0); SwingUtilities.convertPointFromScreen(top, comboBox); @@ -318,22 +342,27 @@ class AquaComboBoxPopup extends BasicComboPopup { } final Rectangle r = new Rectangle(px, py, pw, ph); - if (py + ph > scrBounds.y + scrBounds.height) { - if (ph <= -scrBounds.y ) { - // popup goes above - r.y = -ph ; - } else { - // a full screen height popup - r.y = scrBounds.y + Math.max(0, (scrBounds.height - ph) / 2 ); - r.height = Math.min(scrBounds.height, ph); - } + if (r.y + r.height < top.y + scrBounds.y + scrBounds.height) { + return r; + } + // Check whether it goes below the bottom of the screen, if so flip it + int newY = getComboBoxEdge(comboBoxBounds.height, false) - ph - comboBoxInsets.top; + if (newY > top.y + scrBounds.y) { + return new Rectangle(px, newY, r.width, r.height); + } else { + // There are no place at top, move popup to the center of the screen + r.y = top.y + scrBounds.y + Math.max(0, (scrBounds.height - ph) / 2 ); + r.height = Math.min(scrBounds.height, ph); } return r; } // The one to use when itemCount <= maxRowCount. Size never adjusts for arrows // We want it positioned so the selected item is right above the combo box - protected Rectangle computePopupBoundsForMenu(final int px, final int py, final int pw, final int ph, final int itemCount, final Rectangle scrBounds) { + protected Rectangle computePopupBoundsForMenu(final int px, final int py, + final int pw, final int ph, + final int itemCount, + final Rectangle scrBounds) { //System.err.println("computePopupBoundsForMenu: " + px + "," + py + " " + pw + "," + ph); //System.err.println("itemCount: " +itemCount +" src: "+ scrBounds); int elementSize = 0; //kDefaultItemSize; diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java index 3cc7b55f871..e501b122727 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java @@ -594,7 +594,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable { } @SuppressWarnings("unchecked") - static final RecyclableSingleton, AquaComboBoxUI>> APPLICATOR = new + private static final RecyclableSingleton, AquaComboBoxUI>> APPLICATOR = new RecyclableSingleton, AquaComboBoxUI>>() { @Override protected ClientPropertyApplicator, AquaComboBoxUI> getInstance() { diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaFileView.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaFileView.java index b69d2d09e7c..6e0aa18ac49 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaFileView.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaFileView.java @@ -75,7 +75,7 @@ class AquaFileView extends FileView { private static native int getNativeLSInfo(final byte[] pathBytes, final boolean isDirectory); private static native String getNativePathForResolvedAlias(final byte[] absolutePath, final boolean isDirectory); - static final RecyclableSingleton machineName = new RecyclableSingleton() { + private static final RecyclableSingleton machineName = new RecyclableSingleton() { @Override protected String getInstance() { return getNativeMachineName(); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaGroupBorder.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaGroupBorder.java index 2916eb15ebd..59a437d4aaf 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaGroupBorder.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaGroupBorder.java @@ -35,17 +35,17 @@ import com.apple.laf.AquaUtilControlSize.*; import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor; public abstract class AquaGroupBorder extends AquaBorder { - static final RecyclableSingletonFromDefaultConstructor tabbedPaneGroupBorder = new RecyclableSingletonFromDefaultConstructor(TabbedPane.class); + private static final RecyclableSingletonFromDefaultConstructor tabbedPaneGroupBorder = new RecyclableSingletonFromDefaultConstructor(TabbedPane.class); public static Border getTabbedPaneGroupBorder() { return tabbedPaneGroupBorder.get(); } - static final RecyclableSingletonFromDefaultConstructor titleBorderGroupBorder = new RecyclableSingletonFromDefaultConstructor(Titled.class); + private static final RecyclableSingletonFromDefaultConstructor titleBorderGroupBorder = new RecyclableSingletonFromDefaultConstructor(Titled.class); public static Border getBorderForTitledBorder() { return titleBorderGroupBorder.get(); } - static final RecyclableSingletonFromDefaultConstructor titlelessGroupBorder = new RecyclableSingletonFromDefaultConstructor(Titleless.class); + private static final RecyclableSingletonFromDefaultConstructor titlelessGroupBorder = new RecyclableSingletonFromDefaultConstructor(Titleless.class); public static Border getTitlelessBorder() { return titlelessGroupBorder.get(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaHighlighter.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaHighlighter.java index 9f4f81f7458..7b1a1c8d507 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaHighlighter.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaHighlighter.java @@ -37,7 +37,7 @@ import javax.swing.text.*; import com.apple.laf.AquaUtils.RecyclableSingleton; public class AquaHighlighter extends DefaultHighlighter implements UIResource { - static final RecyclableSingleton instance = new RecyclableSingleton() { + private static final RecyclableSingleton instance = new RecyclableSingleton() { protected LayerPainter getInstance() { return new AquaHighlightPainter(null); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java index 5d43a41e502..1970bc776ae 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java @@ -240,14 +240,14 @@ public class AquaImageFactory { } } - protected static final NamedImageSingleton northArrow = new NamedImageSingleton("NSMenuScrollUp"); - protected static final IconUIResourceSingleton northArrowIcon = new IconUIResourceSingleton(northArrow); - protected static final NamedImageSingleton southArrow = new NamedImageSingleton("NSMenuScrollDown"); - protected static final IconUIResourceSingleton southArrowIcon = new IconUIResourceSingleton(southArrow); - protected static final NamedImageSingleton westArrow = new NamedImageSingleton("NSMenuSubmenuLeft"); - protected static final IconUIResourceSingleton westArrowIcon = new IconUIResourceSingleton(westArrow); - protected static final NamedImageSingleton eastArrow = new NamedImageSingleton("NSMenuSubmenu"); - protected static final IconUIResourceSingleton eastArrowIcon = new IconUIResourceSingleton(eastArrow); + private static final NamedImageSingleton northArrow = new NamedImageSingleton("NSMenuScrollUp"); + private static final IconUIResourceSingleton northArrowIcon = new IconUIResourceSingleton(northArrow); + private static final NamedImageSingleton southArrow = new NamedImageSingleton("NSMenuScrollDown"); + private static final IconUIResourceSingleton southArrowIcon = new IconUIResourceSingleton(southArrow); + private static final NamedImageSingleton westArrow = new NamedImageSingleton("NSMenuSubmenuLeft"); + private static final IconUIResourceSingleton westArrowIcon = new IconUIResourceSingleton(westArrow); + private static final NamedImageSingleton eastArrow = new NamedImageSingleton("NSMenuSubmenu"); + private static final IconUIResourceSingleton eastArrowIcon = new IconUIResourceSingleton(eastArrow); static Image getArrowImageForDirection(final int direction) { switch(direction) { diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameBorder.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameBorder.java index 4a72d0fd371..58fc7da278f 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameBorder.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameBorder.java @@ -55,7 +55,7 @@ public class AquaInternalFrameBorder implements Border, UIResource { private static final int kContentTester = 100; // For getting region insets - static final RecyclableSingleton documentWindowFrame = new RecyclableSingleton() { + private static final RecyclableSingleton documentWindowFrame = new RecyclableSingleton() { protected AquaInternalFrameBorder getInstance() { return new AquaInternalFrameBorder(WindowType.DOCUMENT); } @@ -64,7 +64,7 @@ public class AquaInternalFrameBorder implements Border, UIResource { return documentWindowFrame.get(); } - static final RecyclableSingleton utilityWindowFrame = new RecyclableSingleton() { + private static final RecyclableSingleton utilityWindowFrame = new RecyclableSingleton() { protected AquaInternalFrameBorder getInstance() { return new AquaInternalFrameBorder(WindowType.UTILITY); } @@ -73,7 +73,7 @@ public class AquaInternalFrameBorder implements Border, UIResource { return utilityWindowFrame.get(); } - static final RecyclableSingleton dialogWindowFrame = new RecyclableSingleton() { + private static final RecyclableSingleton dialogWindowFrame = new RecyclableSingleton() { protected AquaInternalFrameBorder getInstance() { return new AquaInternalFrameBorder(WindowType.DOCUMENT); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java index af2aaf05ed6..3a40c49ae3f 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java @@ -137,6 +137,7 @@ public final class AquaInternalFrameDockIconUI extends DesktopIconUI } @Override + @SuppressWarnings("deprecation") public void mouseEntered(final MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0) return; String title = fFrame.getTitle(); @@ -146,6 +147,7 @@ public final class AquaInternalFrameDockIconUI extends DesktopIconUI } @Override + @SuppressWarnings("deprecation") public void mouseExited(final MouseEvent e) { if (fDockLabel != null && (e.getModifiers() & InputEvent.BUTTON1_MASK) == 0) fDockLabel.hide(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java index fd6bccf2260..4b09210e9e4 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java @@ -147,7 +147,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo southPane = c; } - static final RecyclableSingleton closeIcon = new RecyclableSingleton() { + private static final RecyclableSingleton closeIcon = new RecyclableSingleton() { @Override protected Icon getInstance() { return new AquaInternalFrameButtonIcon(Widget.TITLE_BAR_CLOSE_BOX); @@ -157,7 +157,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo return closeIcon.get(); } - static final RecyclableSingleton minimizeIcon = new RecyclableSingleton() { + private static final RecyclableSingleton minimizeIcon = new RecyclableSingleton() { @Override protected Icon getInstance() { return new AquaInternalFrameButtonIcon(Widget.TITLE_BAR_COLLAPSE_BOX); @@ -167,7 +167,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo return minimizeIcon.get(); } - static final RecyclableSingleton zoomIcon = new RecyclableSingleton() { + private static final RecyclableSingleton zoomIcon = new RecyclableSingleton() { @Override protected Icon getInstance() { return new AquaInternalFrameButtonIcon(Widget.TITLE_BAR_ZOOM_BOX); @@ -555,6 +555,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo } @Override + @SuppressWarnings("deprecation") public void mouseDragged(final MouseEvent e) { // do not forward drags // if (didForwardEvent(e)) return; @@ -621,7 +622,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo return didForwardEvent; } - + @SuppressWarnings("deprecation") boolean didForwardEventInternal(final MouseEvent e) { if (fDraggingFrame) return false; @@ -737,7 +738,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo } } // end class PaletteListener - static final InternalFrameShadow documentWindowShadow = new InternalFrameShadow() { + private static final InternalFrameShadow documentWindowShadow = new InternalFrameShadow() { @Override Border getForegroundShadowBorder() { return new AquaUtils.SlicedShadowBorder(new Painter() { @@ -777,7 +778,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo } }; - static final InternalFrameShadow paletteWindowShadow = new InternalFrameShadow() { + private static final InternalFrameShadow paletteWindowShadow = new InternalFrameShadow() { @Override Border getForegroundShadowBorder() { return new AquaUtils.SlicedShadowBorder(new Painter() { @@ -833,7 +834,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo } } - static final RecyclableSingleton RESIZE_ICON = new RecyclableSingleton() { + private static final RecyclableSingleton RESIZE_ICON = new RecyclableSingleton() { @Override protected Icon getInstance() { return new AquaIcon.ScalingJRSUIIcon(11, 11) { @@ -927,11 +928,15 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo return (w - x) + (h - y) < 12; } + @SuppressWarnings("deprecation") void forwardEventToFrame(final MouseEvent e) { final Point pt = new Point(); final Component c = getComponentToForwardTo(e, pt); if (c == null) return; - c.dispatchEvent(new MouseEvent(c, e.getID(), e.getWhen(), e.getModifiers(), pt.x, pt.y, e.getClickCount(), e.isPopupTrigger(), e.getButton())); + c.dispatchEvent( + new MouseEvent(c, e.getID(), e.getWhen(), e.getModifiers(), + pt.x, pt.y, e.getClickCount(), + e.isPopupTrigger(), e.getButton())); } Component getComponentToForwardTo(final MouseEvent e, final Point dst) { @@ -993,6 +998,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo public void mouseMoved(final MouseEvent e) { } @Override + @SuppressWarnings("deprecation") public void mouseWheelMoved(final MouseWheelEvent e) { final Point pt = new Point(); final Component c = getComponentToForwardTo(e, pt); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java index d6395accd00..cb32bfc7978 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java @@ -37,7 +37,7 @@ import com.apple.laf.AquaUtils.RecyclableSingleton; import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor; public class AquaKeyBindings { - static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaKeyBindings.class); + private static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaKeyBindings.class); static AquaKeyBindings instance() { return instance.get(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaLabelUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaLabelUI.java index bb24f60a6a7..fb5682d0541 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaLabelUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaLabelUI.java @@ -37,7 +37,7 @@ import com.apple.laf.AquaUtils.RecyclableSingleton; import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor; public class AquaLabelUI extends BasicLabelUI { - protected static final RecyclableSingleton aquaLabelUI = new RecyclableSingletonFromDefaultConstructor(AquaLabelUI.class); + private static final RecyclableSingleton aquaLabelUI = new RecyclableSingletonFromDefaultConstructor(AquaLabelUI.class); public static ComponentUI createUI(final JComponent c) { return aquaLabelUI.get(); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuBarUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuBarUI.java index 7aaf0893e71..affb99b766c 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuBarUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuBarUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, 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 @@ -50,7 +50,7 @@ public class AquaMenuBarUI extends BasicMenuBarUI implements ScreenMenuBarProvid public void uninstallUI(final JComponent c) { if (fScreenMenuBar != null) { final JFrame frame = (JFrame)(c.getTopLevelAncestor()); - if (frame.getMenuBar() == fScreenMenuBar) { + if (frame != null && frame.getMenuBar() == fScreenMenuBar) { frame.setMenuBar((MenuBar)null); } fScreenMenuBar = null; diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java index 53feb4184be..69c22af8eb4 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java @@ -74,7 +74,10 @@ public class AquaMenuPainter { kUCapsLockGlyph = 0x21EA; static final int ALT_GRAPH_MASK = 1 << 5; // New to Java2 - static final int sUnsupportedModifiersMask = ~(InputEvent.CTRL_MASK | InputEvent.ALT_MASK | InputEvent.SHIFT_MASK | InputEvent.META_MASK | ALT_GRAPH_MASK); + @SuppressWarnings("deprecation") + static final int sUnsupportedModifiersMask = + ~(InputEvent.CTRL_MASK | InputEvent.ALT_MASK | InputEvent.SHIFT_MASK + | InputEvent.META_MASK | ALT_GRAPH_MASK); interface Client { public void paintBackground(Graphics g, JComponent c, int menuWidth, int menuHeight); @@ -86,6 +89,7 @@ public class AquaMenuPainter { } // Return a string with the proper modifier glyphs + @SuppressWarnings("deprecation") private static String getKeyModifiersUnicode(final int modifiers, final boolean isLeftToRight) { final StringBuilder buf = new StringBuilder(2); // Order (from StandardMenuDef.c): control, option(alt), shift, cmd @@ -121,7 +125,7 @@ public class AquaMenuPainter { return buf.toString(); } - static final RecyclableSingleton sPainter = new RecyclableSingletonFromDefaultConstructor(AquaMenuPainter.class); + private static final RecyclableSingleton sPainter = new RecyclableSingletonFromDefaultConstructor(AquaMenuPainter.class); static AquaMenuPainter instance() { return sPainter.get(); } @@ -135,9 +139,9 @@ public class AquaMenuPainter { protected Border getInstance() { return UIManager.getBorder(borderName); } } - protected final RecyclableBorder menuBarPainter = new RecyclableBorder("MenuBar.backgroundPainter"); - protected final RecyclableBorder selectedMenuBarItemPainter = new RecyclableBorder("MenuBar.selectedBackgroundPainter"); - protected final RecyclableBorder selectedMenuItemPainter = new RecyclableBorder("MenuItem.selectedBackgroundPainter"); + private static final RecyclableBorder menuBarPainter = new RecyclableBorder("MenuBar.backgroundPainter"); + private static final RecyclableBorder selectedMenuBarItemPainter = new RecyclableBorder("MenuBar.selectedBackgroundPainter"); + private static final RecyclableBorder selectedMenuItemPainter = new RecyclableBorder("MenuItem.selectedBackgroundPainter"); public void paintMenuBarBackground(final Graphics g, final int width, final int height, final JComponent c) { g.setColor(c == null ? Color.white : c.getBackground()); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMnemonicHandler.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMnemonicHandler.java index be5ab659c01..76c97358828 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMnemonicHandler.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMnemonicHandler.java @@ -34,7 +34,7 @@ import com.apple.laf.AquaUtils.RecyclableSingleton; import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor; public class AquaMnemonicHandler { - static final RecyclableSingleton altProcessor = new RecyclableSingletonFromDefaultConstructor(AltProcessor.class); + private static final RecyclableSingleton altProcessor = new RecyclableSingletonFromDefaultConstructor(AltProcessor.class); public static KeyEventPostProcessor getInstance() { return altProcessor.get(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaNativeResources.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaNativeResources.java index 48c69422f26..1aa700dcf5c 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaNativeResources.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaNativeResources.java @@ -54,7 +54,7 @@ public class AquaNativeResources { } } - static final RecyclableSingleton sBackgroundColor = new RecyclableSingleton() { + private static final RecyclableSingleton sBackgroundColor = new RecyclableSingleton() { @Override protected Color getInstance() { final long backgroundID = getWindowBackgroundColor(); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaPanelUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaPanelUI.java index f03a7f949be..b6509ef3254 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaPanelUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaPanelUI.java @@ -35,7 +35,7 @@ import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor; import java.awt.Graphics; public class AquaPanelUI extends BasicPanelUI { - static RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaPanelUI.class); + private static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaPanelUI.class); public static ComponentUI createUI(final JComponent c) { return instance.get(); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaPopupMenuSeparatorUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaPopupMenuSeparatorUI.java index be4a06f5c78..64291c1f8b1 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaPopupMenuSeparatorUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaPopupMenuSeparatorUI.java @@ -34,7 +34,7 @@ import javax.swing.plaf.basic.BasicSeparatorUI; import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor; public class AquaPopupMenuSeparatorUI extends BasicSeparatorUI { - protected static RecyclableSingletonFromDefaultConstructor instance = new RecyclableSingletonFromDefaultConstructor(AquaPopupMenuSeparatorUI.class); + private static final RecyclableSingletonFromDefaultConstructor instance = new RecyclableSingletonFromDefaultConstructor(AquaPopupMenuSeparatorUI.class); public static ComponentUI createUI(final JComponent c) { return instance.get(); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaProgressBarUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaProgressBarUI.java index 1745c910b9c..bf66a1b4b08 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaProgressBarUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaProgressBarUI.java @@ -46,7 +46,7 @@ import com.apple.laf.AquaUtils.RecyclableSingleton; public class AquaProgressBarUI extends ProgressBarUI implements ChangeListener, PropertyChangeListener, AncestorListener, Sizeable { private static final boolean ADJUSTTIMER = true; - protected static final RecyclableSingleton sizeDescriptor = new RecyclableSingleton() { + private static final RecyclableSingleton sizeDescriptor = new RecyclableSingleton() { @Override protected SizeDescriptor getInstance() { return new SizeDescriptor(new SizeVariant(146, 20)) { diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollBarUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollBarUI.java index 92e342325ad..9d87013c48e 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollBarUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollBarUI.java @@ -154,7 +154,7 @@ public class AquaScrollBarUI extends ScrollBarUI { return State.ACTIVE; } - static final RecyclableSingleton> hitToPressedPartMap = new RecyclableSingleton>(){ + private static final RecyclableSingleton> hitToPressedPartMap = new RecyclableSingleton>(){ @Override protected Map getInstance() { final Map map = new HashMap(7); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollRegionBorder.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollRegionBorder.java index 596506f6a90..d09aa654b5c 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollRegionBorder.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollRegionBorder.java @@ -40,7 +40,7 @@ import com.apple.laf.AquaUtilControlSize.SizeVariant; import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor; public class AquaScrollRegionBorder extends AquaBorder { - static final RecyclableSingletonFromDefaultConstructor instance = new RecyclableSingletonFromDefaultConstructor(AquaScrollRegionBorder.class); + private static final RecyclableSingletonFromDefaultConstructor instance = new RecyclableSingletonFromDefaultConstructor(AquaScrollRegionBorder.class); public static AquaScrollRegionBorder getScrollRegionBorder() { return instance.get(); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaSliderUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaSliderUI.java index 65ed9d7b8c1..3775fc859e4 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaSliderUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaSliderUI.java @@ -45,7 +45,7 @@ public class AquaSliderUI extends BasicSliderUI implements Sizeable { // static final Dimension roundThumbSize = new Dimension(21 + 4, 21 + 4); // +2px on both sides for focus fuzz // static final Dimension pointingThumbSize = new Dimension(19 + 4, 22 + 4); - protected static final RecyclableSingleton roundThumbDescriptor = new RecyclableSingleton() { + private static final RecyclableSingleton roundThumbDescriptor = new RecyclableSingleton() { protected SizeDescriptor getInstance() { return new SizeDescriptor(new SizeVariant(25, 25)) { public SizeVariant deriveSmall(final SizeVariant v) { @@ -57,7 +57,7 @@ public class AquaSliderUI extends BasicSliderUI implements Sizeable { }; } }; - protected static final RecyclableSingleton pointingThumbDescriptor = new RecyclableSingleton() { + private static final RecyclableSingleton pointingThumbDescriptor = new RecyclableSingleton() { protected SizeDescriptor getInstance() { return new SizeDescriptor(new SizeVariant(23, 26)) { public SizeVariant deriveSmall(final SizeVariant v) { diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java index ad78bc26ca3..798df58442c 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, 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 @@ -515,6 +515,7 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing /** * Adds the specified mnemonic at the specified index. */ + @SuppressWarnings("deprecation") private void addMnemonic(final int index, final int mnemonic) { if (mnemonicToIndexMap == null) { initMnemonics(); @@ -3731,7 +3732,6 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing *

            * This should be used if the ActionMap can be shared. * - * @param c JComponent to install the ActionMap on. * @param loaderClass Class object that gets loadActionMap invoked * on. * @param defaultsKey Key to use to defaults table to check for diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderBorder.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderBorder.java index 17f412b8d42..68aafa5119e 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderBorder.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderBorder.java @@ -126,7 +126,7 @@ public class AquaTableHeaderBorder extends AbstractBorder { return State.ACTIVE; } - static final RecyclableSingleton alternateBorder = new RecyclableSingleton() { + private static final RecyclableSingleton alternateBorder = new RecyclableSingleton() { @Override protected Border getInstance() { return BorderFactory.createRaisedBevelBorder(); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderUI.java index 35b87aac27e..85577ce46ca 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderUI.java @@ -67,7 +67,7 @@ public class AquaTableHeaderUI extends BasicTableHeaderUI { super.uninstallDefaults(); } - static final RecyclableSingleton> TABLE_HEADER_APPLICATORS = new RecyclableSingleton>() { + private static final RecyclableSingleton> TABLE_HEADER_APPLICATORS = new RecyclableSingleton>() { @Override @SuppressWarnings("unchecked") protected ClientPropertyApplicator getInstance() { diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextFieldBorder.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextFieldBorder.java index 6f161b70469..29191725d20 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextFieldBorder.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextFieldBorder.java @@ -36,7 +36,7 @@ import com.apple.laf.AquaUtilControlSize.*; import com.apple.laf.AquaUtils.*; public class AquaTextFieldBorder extends AquaBorder { - protected static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaTextFieldBorder.class); + private static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaTextFieldBorder.class); public static AquaTextFieldBorder getTextFieldBorder() { return instance.get(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextFieldSearch.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextFieldSearch.java index 4117d895f6e..ba7ea8de064 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextFieldSearch.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextFieldSearch.java @@ -90,7 +90,7 @@ public class AquaTextFieldSearch { return (c.getClientProperty(FIND_POPUP_KEY) instanceof JPopupMenu); } - protected static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(SearchFieldBorder.class); + private static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(SearchFieldBorder.class); public static SearchFieldBorder getSearchTextFieldBorder() { return instance.get(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextPasswordFieldUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextPasswordFieldUI.java index 82f32a50287..0cdcc9c8006 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextPasswordFieldUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTextPasswordFieldUI.java @@ -38,7 +38,7 @@ import com.apple.laf.AquaUtils.RecyclableSingleton; import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor; public class AquaTextPasswordFieldUI extends AquaTextFieldUI { - static final RecyclableSingleton capsLockPainter = new RecyclableSingletonFromDefaultConstructor(CapsLockSymbolPainter.class); + private static final RecyclableSingleton capsLockPainter = new RecyclableSingletonFromDefaultConstructor(CapsLockSymbolPainter.class); static CapsLockSymbolPainter getCapsLockPainter() { return capsLockPainter.get(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolBarSeparatorUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolBarSeparatorUI.java index a3d7b6ef581..555ea8b33a2 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolBarSeparatorUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolBarSeparatorUI.java @@ -34,7 +34,7 @@ import javax.swing.plaf.basic.BasicToolBarSeparatorUI; import com.apple.laf.AquaUtils.*; public class AquaToolBarSeparatorUI extends BasicToolBarSeparatorUI { - protected static RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaToolBarSeparatorUI.class); + private static final RecyclableSingleton instance = new RecyclableSingletonFromDefaultConstructor(AquaToolBarSeparatorUI.class); public static ComponentUI createUI(final JComponent c) { return instance.get(); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolBarUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolBarUI.java index 05773dd6429..7ea41a4ae35 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolBarUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolBarUI.java @@ -35,7 +35,7 @@ import javax.swing.plaf.basic.BasicToolBarUI; import com.apple.laf.AquaUtils.*; public class AquaToolBarUI extends BasicToolBarUI implements SwingConstants { - private static RecyclableSingleton toolBarBorder = new RecyclableSingletonFromDefaultConstructor(ToolBarBorder.class); + private static final RecyclableSingleton toolBarBorder = new RecyclableSingletonFromDefaultConstructor(ToolBarBorder.class); public static Border getToolBarBorder() { return toolBarBorder.get(); } diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolTipUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolTipUI.java index 9a9f5b31de1..19e9c1cb593 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolTipUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaToolTipUI.java @@ -34,7 +34,7 @@ import javax.swing.plaf.basic.BasicToolTipUI; import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor; public class AquaToolTipUI extends BasicToolTipUI { - static final RecyclableSingletonFromDefaultConstructor sharedAquaInstance = new RecyclableSingletonFromDefaultConstructor(AquaToolTipUI.class); + private static final RecyclableSingletonFromDefaultConstructor sharedAquaInstance = new RecyclableSingletonFromDefaultConstructor(AquaToolTipUI.class); public static ComponentUI createUI(final JComponent c) { return sharedAquaInstance.get(); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtilControlSize.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtilControlSize.java index 999d24a7886..63ab4383c0e 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtilControlSize.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtilControlSize.java @@ -49,7 +49,7 @@ public class AquaUtilControlSize { void applySizeFor(final JComponent c, final Size size); } - protected static final RecyclableSingleton sizeListener + private static final RecyclableSingleton sizeListener = new RecyclableSingletonFromDefaultConstructor<>(PropertySizeListener.class); protected static PropertySizeListener getSizeListener() { return sizeListener.get(); diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuPropertyListener.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuPropertyListener.java index cce93832795..1176a82cfc1 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuPropertyListener.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenuPropertyListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -39,7 +39,7 @@ class ScreenMenuPropertyListener implements PropertyChangeListener { /** * This method gets called when a bound property is changed. - * @param evt A PropertyChangeEvent object describing the event source + * @param e A PropertyChangeEvent object describing the event source * and the property that has changed. */ public void propertyChange(final PropertyChangeEvent e) { diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties b/jdk/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties index b85ed0c8547..83105561c30 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties @@ -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 @@ FileChooser.saveButton.textAndMnemonic=Speichern FileChooser.openButton.textAndMnemonic=\u00D6ffnen FileChooser.saveDialogTitle.textAndMnemonic=Speichern FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen -FileChooser.updateButton.textAndMnemonic=Updaten +FileChooser.updateButton.textAndMnemonic=Aktualisieren FileChooser.helpButton.textAndMnemonic=Hilfe FileChooser.directoryOpenButton.textAndMnemonic=\u00D6ffnen diff --git a/jdk/src/java.desktop/macosx/classes/sun/awt/CGraphicsEnvironment.java b/jdk/src/java.desktop/macosx/classes/sun/awt/CGraphicsEnvironment.java index f84397a76fe..ce5ed8b141e 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/awt/CGraphicsEnvironment.java +++ b/jdk/src/java.desktop/macosx/classes/sun/awt/CGraphicsEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, 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 @@ -79,6 +79,10 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment { /** Available CoreGraphics displays. */ private final Map devices = new HashMap<>(5); + /** + * The key in the {@link #devices} for the main display. + */ + private int mainDisplayID; /** Reference to the display reconfiguration callback context. */ private final long displayReconfigContext; @@ -120,6 +124,7 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment { } @Override + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { try { super.finalize(); @@ -136,15 +141,15 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment { final Map old = new HashMap<>(devices); devices.clear(); - int mainID = getMainDisplayID(); + mainDisplayID = getMainDisplayID(); // initialization of the graphics device may change // list of displays on hybrid systems via an activation // of discrete video. // So, we initialize the main display first, and then // retrieve actual list of displays. - if (!old.containsKey(mainID)) { - old.put(mainID, new CGraphicsDevice(mainID)); + if (!old.containsKey(mainDisplayID)) { + old.put(mainDisplayID, new CGraphicsDevice(mainDisplayID)); } for (final int id : getDisplayIDs()) { @@ -157,7 +162,6 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment { @Override public synchronized GraphicsDevice getDefaultScreenDevice() throws HeadlessException { - final int mainDisplayID = getMainDisplayID(); CGraphicsDevice d = devices.get(mainDisplayID); if (d == null) { // we do not expect that this may happen, the only response diff --git a/jdk/src/java.desktop/macosx/classes/sun/font/CCharToGlyphMapper.java b/jdk/src/java.desktop/macosx/classes/sun/font/CCharToGlyphMapper.java index d2f9a548763..5a2cf766cf6 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/font/CCharToGlyphMapper.java +++ b/jdk/src/java.desktop/macosx/classes/sun/font/CCharToGlyphMapper.java @@ -75,37 +75,9 @@ public class CCharToGlyphMapper extends CharToGlyphMapper { } } - if (code < 0x0590) { + if (code < FontUtilities.MIN_LAYOUT_CHARCODE) { continue; - } else if (code <= 0x05ff) { - // Hebrew 0x0590->0x05ff - return true; - } else if (code >= 0x0600 && code <= 0x06ff) { - // Arabic - return true; - } else if (code >= 0x0900 && code <= 0x0d7f) { - // if Indic, assume shaping for conjuncts, reordering: - // 0900 - 097F Devanagari - // 0980 - 09FF Bengali - // 0A00 - 0A7F Gurmukhi - // 0A80 - 0AFF Gujarati - // 0B00 - 0B7F Oriya - // 0B80 - 0BFF Tamil - // 0C00 - 0C7F Telugu - // 0C80 - 0CFF Kannada - // 0D00 - 0D7F Malayalam - return true; - } else if (code >= 0x0e00 && code <= 0x0e7f) { - // if Thai, assume shaping for vowel, tone marks - return true; - } else if (code >= 0x200c && code <= 0x200d) { - // zwj or zwnj - return true; - } else if (code >= 0x202a && code <= 0x202e) { - // directional control - return true; - } else if (code >= 0x206a && code <= 0x206f) { - // directional control + } else if (FontUtilities.isComplexCharCode(code)) { return true; } else if (code >= 0x10000) { i += 1; // Empty glyph slot after surrogate diff --git a/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java b/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java index 049dbb58619..15abdda711d 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java +++ b/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -211,6 +211,10 @@ public final class CFont extends PhysicalFont implements FontSubstitution { ArrayList listOfString = new ArrayList(); getCascadeList(nativeFontPtr, listOfString); + // add JRE "Lucida Sans Regular" to the cascade list to enable fallback + // to happen to this JRE font in case the intended glyph is missing in + // fonts provided in the CoreText provided cascaded list + listOfString.add("Lucida Sans Regular"); FontManager fm = FontManagerFactory.getInstance(); int numFonts = 1 + listOfString.size(); PhysicalFont[] fonts = new PhysicalFont[numFonts]; @@ -246,6 +250,7 @@ public final class CFont extends PhysicalFont implements FontSubstitution { return compFont; } + @SuppressWarnings("deprecation") protected synchronized void finalize() { if (nativeFontPtr != 0) { disposeNativeFont(nativeFontPtr); diff --git a/jdk/src/java.desktop/macosx/classes/sun/font/CStrike.java b/jdk/src/java.desktop/macosx/classes/sun/font/CStrike.java index ed3838886c9..7eba9678020 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/font/CStrike.java +++ b/jdk/src/java.desktop/macosx/classes/sun/font/CStrike.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, 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 @@ -127,6 +127,7 @@ public final class CStrike extends PhysicalStrike { return nativeStrikePtr; } + @SuppressWarnings("deprecation") protected synchronized void finalize() throws Throwable { if (nativeStrikePtr != 0) { disposeNativeStrikePtr(nativeStrikePtr); diff --git a/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLLayer.java b/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLLayer.java index 641f95bae04..553cd7183d6 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLLayer.java +++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLLayer.java @@ -108,7 +108,7 @@ public class CGLLayer extends CFRetainedResource { OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { - validate(getPointer(), cglsd); + execute(ptr -> validate(ptr, cglsd)); } finally { rq.unlock(); } @@ -124,7 +124,7 @@ public class CGLLayer extends CFRetainedResource { private void setScale(final int _scale) { if (scale != _scale) { scale = _scale; - nativeSetScale(getPointer(), scale); + execute(ptr -> nativeSetScale(ptr, scale)); } } @@ -138,7 +138,7 @@ public class CGLLayer extends CFRetainedResource { OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { - blitTexture(getPointer()); + execute(ptr -> blitTexture(ptr)); } finally { rq.unlock(); } diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java index a024da398b5..e43c4db68a0 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java @@ -1224,6 +1224,7 @@ public abstract class LWComponentPeer * Changes the target of the AWTEvent from awt component to appropriate * swing delegate. */ + @SuppressWarnings("deprecation") private AWTEvent createDelegateEvent(final AWTEvent e) { // TODO modifiers should be changed to getModifiers()|getModifiersEx()? AWTEvent delegateEvent = null; diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java index e6e1ec38c3d..f9d7db6c862 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java @@ -302,6 +302,7 @@ final class LWListPeer extends LWComponentPeer } @Override + @SuppressWarnings("deprecation") protected void processMouseEvent(final MouseEvent e) { super.processMouseEvent(e); if (e.getID() == MouseEvent.MOUSE_CLICKED && e.getClickCount() == 2) { @@ -314,6 +315,7 @@ final class LWListPeer extends LWComponentPeer } @Override + @SuppressWarnings("deprecation") protected void processKeyEvent(final KeyEvent e) { super.processKeyEvent(e); if (e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_ENTER) { diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java index daa02981c27..a6eec6eec3b 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java @@ -358,13 +358,6 @@ public abstract class LWToolkit extends SunToolkit implements Runnable { // ---- NON-COMPONENT PEERS ---- // - @Override - public final ColorModel getColorModel() throws HeadlessException { - return GraphicsEnvironment.getLocalGraphicsEnvironment() - .getDefaultScreenDevice() - .getDefaultConfiguration().getColorModel(); - } - @Override public final boolean isDesktopSupported() { return true; diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java index 6a0f49a92b1..2d3ce3e9a10 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java @@ -93,6 +93,7 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer { InputEvent triggerEvent = trigger.getTriggerEvent(); Point dragOrigin = new Point(trigger.getDragOrigin()); + @SuppressWarnings("deprecation") int extModifiers = (triggerEvent.getModifiers() | triggerEvent.getModifiersEx()); long timestamp = triggerEvent.getWhen(); int clickCount = ((triggerEvent instanceof MouseEvent) ? (((MouseEvent) triggerEvent).getClickCount()) : 1); diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CFRetainedResource.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CFRetainedResource.java index f69ad201ef8..de0553501e6 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CFRetainedResource.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CFRetainedResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -25,6 +25,10 @@ package sun.lwawt.macosx; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + /** * Safely holds and disposes of native AppKit resources, using the * correct AppKit threading and Objective-C GC semantics. @@ -36,6 +40,10 @@ public class CFRetainedResource { // TODO this pointer should be private and accessed via CFNativeAction class protected volatile long ptr; + private final ReadWriteLock lock = new ReentrantReadWriteLock(); + private final Lock writeLock = lock.writeLock(); + private final Lock readLock = lock.readLock(); + /** * @param ptr CFRetained native object pointer * @param disposeOnAppKitThread is the object needs to be CFReleased on the main thread @@ -50,21 +58,31 @@ public class CFRetainedResource { * @param ptr CFRetained native object pointer */ protected void setPtr(final long ptr) { - synchronized (this) { - if (this.ptr != 0) dispose(); + writeLock.lock(); + try { + if (this.ptr != 0) { + dispose(); + } this.ptr = ptr; + } finally { + writeLock.unlock(); } } /** - * Manually CFReleases the native resource + * Manually CFReleases the native resource. */ protected void dispose() { long oldPtr = 0L; - synchronized (this) { - if (ptr == 0) return; + writeLock.lock(); + try { + if (ptr == 0) { + return; + } oldPtr = ptr; ptr = 0; + } finally { + writeLock.unlock(); } nativeCFRelease(oldPtr, disposeOnAppKitThread); // perform outside of the synchronized block @@ -109,9 +127,14 @@ public class CFRetainedResource { * * @param action The native operation */ - public final synchronized void execute(final CFNativeAction action) { - if (ptr != 0) { - action.run(ptr); + public final void execute(final CFNativeAction action) { + readLock.lock(); + try { + if (ptr != 0) { + action.run(ptr); + } + } finally { + readLock.unlock(); } } @@ -127,14 +150,20 @@ public class CFRetainedResource { * @return result of the native operation, usually the native pointer to * some other data */ - final synchronized long executeGet(final CFNativeActionGet action) { - if (ptr != 0) { - return action.run(ptr); + final long executeGet(final CFNativeActionGet action) { + readLock.lock(); + try { + if (ptr != 0) { + return action.run(ptr); + } + } finally { + readLock.unlock(); } return 0; } @Override + @SuppressWarnings("deprecation") protected final void finalize() throws Throwable { dispose(); } diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CImage.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CImage.java index 61f41a2c70f..8985d631ccb 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CImage.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CImage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -32,6 +32,8 @@ import java.awt.image.*; import java.util.Arrays; import java.util.List; import java.awt.image.MultiResolutionImage; +import java.util.concurrent.atomic.AtomicReference; + import sun.awt.image.MultiResolutionCachedImage; import sun.awt.image.SunWritableRaster; @@ -254,15 +256,26 @@ public class CImage extends CFRetainedResource { /** @return A MultiResolution image created from nsImagePtr, or null. */ private Image toImage() { - if (ptr == 0) return null; + if (ptr == 0) { + return null; + } - final Dimension2D size = nativeGetNSImageSize(ptr); + AtomicReference sizeRef = new AtomicReference<>(); + execute(ptr -> { + sizeRef.set(nativeGetNSImageSize(ptr)); + }); + final Dimension2D size = sizeRef.get(); + if (size == null) { + return null; + } final int w = (int)size.getWidth(); final int h = (int)size.getHeight(); - - Dimension2D[] sizes - = nativeGetNSImageRepresentationSizes(ptr, - size.getWidth(), size.getHeight()); + AtomicReference repRef = new AtomicReference<>(); + execute(ptr -> { + repRef.set(nativeGetNSImageRepresentationSizes(ptr, size.getWidth(), + size.getHeight())); + }); + Dimension2D[] sizes = repRef.get(); return sizes == null || sizes.length < 2 ? new MultiResolutionCachedImage(w, h, (width, height) @@ -275,18 +288,18 @@ public class CImage extends CFRetainedResource { final BufferedImage bimg = new BufferedImage(dstWidth, dstHeight, BufferedImage.TYPE_INT_ARGB_PRE); final DataBufferInt dbi = (DataBufferInt)bimg.getRaster().getDataBuffer(); final int[] buffer = SunWritableRaster.stealData(dbi, 0); - nativeCopyNSImageIntoArray(ptr, buffer, srcWidth, srcHeight, dstWidth, dstHeight); + execute(ptr->nativeCopyNSImageIntoArray(ptr, buffer, srcWidth, srcHeight, dstWidth, dstHeight)); SunWritableRaster.markDirty(dbi); return bimg; } /** If nsImagePtr != 0 then scale this NSImage. @return *this* */ CImage resize(final double w, final double h) { - if (ptr != 0) nativeSetNSImageSize(ptr, w, h); + execute(ptr -> nativeSetNSImageSize(ptr, w, h)); return this; } void resizeRepresentations(double w, double h) { - if (ptr != 0) nativeResizeNSImageRepresentations(ptr, w, h); + execute(ptr -> nativeResizeNSImageRepresentations(ptr, w, h)); } } diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java index 3deba1e33f9..891972ff130 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -57,15 +57,19 @@ public class CInputMethodDescriptor implements InputMethodDescriptor { } static Object[] getAvailableLocalesInternal() { - List workList = nativeGetAvailableLocales(); + List workList = nativeGetAvailableLocales(); + Locale currentLocale = CInputMethod.getNativeLocale(); - if (workList != null) { + if (workList == null || workList.isEmpty()) { + return new Object[] { + currentLocale != null ? currentLocale : Locale.getDefault() + }; + } else { + if (currentLocale != null && !workList.contains(currentLocale)) { + workList.add(currentLocale); + } return workList.toArray(); } - - return new Object[] { - Locale.getDefault() - }; } /** @@ -119,5 +123,5 @@ public class CInputMethodDescriptor implements InputMethodDescriptor { } private static native void nativeInit(); - private static native List nativeGetAvailableLocales(); + private static native List nativeGetAvailableLocales(); } diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuItem.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuItem.java index 0230c4e842f..f7cd2ceba74 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuItem.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuItem.java @@ -63,7 +63,7 @@ public class CMenuItem extends CMenuComponent implements MenuItemPeer { CMenuComponent parent = (CMenuComponent)LWToolkit.targetToPeer(getTarget().getParent()); return parent.executeGet(ptr->nativeCreate(ptr, isSeparator())); } - + @SuppressWarnings("deprecation") public void setLabel(String label, char keyChar, int keyCode, int modifiers) { int keyMask = modifiers; if (keyCode == KeyEvent.VK_UNDEFINED) { @@ -113,7 +113,13 @@ public class CMenuItem extends CMenuComponent implements MenuItemPeer { */ public final void setImage(final java.awt.Image img) { CImage cimg = CImage.getCreator().createFromImage(img); - execute(ptr -> nativeSetImage(ptr, cimg == null ? 0L : cimg.ptr)); + execute(ptr -> { + if (cimg == null) { + nativeSetImage(ptr, 0L); + } else { + cimg.execute(imgPtr -> nativeSetImage(ptr, imgPtr)); + } + }); } /** diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java index 65a4392ca9f..a98b5529845 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -44,6 +44,9 @@ class CPlatformComponent extends CFRetainedResource super(0, true); } + /** + * Used by JAWT. + */ public long getPointer() { return ptr; } @@ -61,7 +64,7 @@ class CPlatformComponent extends CFRetainedResource // translates values from the coordinate system of the top-level window // to the coordinate system of the content view final Insets insets = platformWindow.getPeer().getInsets(); - nativeSetBounds(getPointer(), x - insets.left, y - insets.top, w, h); + execute(ptr->nativeSetBounds(ptr, x - insets.left, y - insets.top, w, h)); } @Override diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java index 1f42ab9de68..2c2593fd73c 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java @@ -106,11 +106,6 @@ public class CPlatformLWWindow extends CPlatformWindow { public void updateIconImages() { } - @Override - public long getNSWindowPtr() { - return 0; - } - @Override public SurfaceData getSurfaceData() { return null; diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java index de99473a176..c0172f60ff0 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java @@ -265,9 +265,8 @@ final class CPlatformResponder { static class DeltaAccumulator { - static final double MIN_THRESHOLD = 0.1; - static final double MAX_THRESHOLD = 0.5; double accumulatedDelta; + boolean accumulate; int getRoundedDelta(double delta, int scrollPhase) { @@ -278,25 +277,23 @@ final class CPlatformResponder { roundDelta = delta > 0 ? 1 : -1; } } else { // trackpad - boolean begin = scrollPhase == NSEvent.SCROLL_PHASE_BEGAN; - boolean end = scrollPhase == NSEvent.SCROLL_MASK_PHASE_ENDED - || scrollPhase == NSEvent.SCROLL_MASK_PHASE_CANCELLED; - - if (begin) { + if (scrollPhase == NSEvent.SCROLL_PHASE_BEGAN) { accumulatedDelta = 0; + accumulate = true; } + else if (scrollPhase == NSEvent.SCROLL_PHASE_MOMENTUM_BEGAN) { + accumulate = true; + } + if (accumulate) { - accumulatedDelta += delta; + accumulatedDelta += delta; - double absAccumulatedDelta = Math.abs(accumulatedDelta); - if (absAccumulatedDelta > MAX_THRESHOLD) { roundDelta = (int) Math.round(accumulatedDelta); - accumulatedDelta -= roundDelta; - } - if (end) { - if (roundDelta == 0 && absAccumulatedDelta > MIN_THRESHOLD) { - roundDelta = accumulatedDelta > 0 ? 1 : -1; + accumulatedDelta -= roundDelta; + + if (scrollPhase == NSEvent.SCROLL_PHASE_ENDED) { + accumulate = false; } } } diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformView.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformView.java index 5dcf376646a..f6e1c14c937 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformView.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,9 @@ package sun.lwawt.macosx; import java.awt.*; import java.awt.geom.Rectangle2D; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; import sun.awt.CGraphicsConfig; import sun.awt.CGraphicsEnvironment; @@ -83,7 +86,7 @@ public class CPlatformView extends CFRetainedResource { * Cocoa coordinates). */ public void setBounds(int x, int y, int width, int height) { - CWrapper.NSView.setFrame(ptr, x, y, width, height); + execute(ptr->CWrapper.NSView.setFrame(ptr, x, y, width, height)); } // REMIND: CGLSurfaceData expects top-level's size @@ -96,7 +99,7 @@ public class CPlatformView extends CFRetainedResource { } public void setToolTip(String msg) { - CWrapper.NSView.setToolTip(ptr, msg); + execute(ptr -> CWrapper.NSView.setToolTip(ptr, msg)); } // ---------------------------------------------------------------------- @@ -147,18 +150,25 @@ public class CPlatformView extends CFRetainedResource { } public void setAutoResizable(boolean toResize) { - nativeSetAutoResizable(this.getAWTView(), toResize); + execute(ptr -> nativeSetAutoResizable(ptr, toResize)); } public boolean isUnderMouse() { - return nativeIsViewUnderMouse(getAWTView()); + AtomicBoolean ref = new AtomicBoolean(); + execute(ptr -> { + ref.set(nativeIsViewUnderMouse(ptr)); + }); + return ref.get(); } public GraphicsDevice getGraphicsDevice() { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); CGraphicsEnvironment cge = (CGraphicsEnvironment)ge; - int displayID = nativeGetNSViewDisplayID(getAWTView()); - GraphicsDevice gd = cge.getScreenDevice(displayID); + AtomicInteger ref = new AtomicInteger(); + execute(ptr -> { + ref.set(nativeGetNSViewDisplayID(ptr)); + }); + GraphicsDevice gd = cge.getScreenDevice(ref.get()); if (gd == null) { // this could possibly happen during device removal // use the default screen device in this case @@ -168,8 +178,15 @@ public class CPlatformView extends CFRetainedResource { } public Point getLocationOnScreen() { - Rectangle r = nativeGetLocationOnScreen(this.getAWTView()).getBounds(); - return new Point(r.x, r.y); + AtomicReference ref = new AtomicReference<>(); + execute(ptr -> { + ref.set(nativeGetLocationOnScreen(ptr).getBounds()); + }); + Rectangle r = ref.get(); + if (r != null) { + return new Point(r.x, r.y); + } + return new Point(0, 0); } // ---------------------------------------------------------------------- diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java index 102851f3b87..ead8c72cd9c 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java @@ -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 @@ -35,6 +35,9 @@ import java.beans.*; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Arrays; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReference; import javax.swing.*; @@ -201,16 +204,16 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo c.setStyleBits(FULLSCREENABLE, fullscrenable); }}, new Property(WINDOW_SHADOW_REVALIDATE_NOW) { public void applyProperty(final CPlatformWindow c, final Object value) { - nativeRevalidateNSWindowShadow(c.getNSWindowPtr()); + c.execute(ptr -> nativeRevalidateNSWindowShadow(ptr)); }}, new Property(WINDOW_DOCUMENT_FILE) { public void applyProperty(final CPlatformWindow c, final Object value) { if (value == null || !(value instanceof java.io.File)) { - nativeSetNSWindowRepresentedFilename(c.getNSWindowPtr(), null); + c.execute(ptr->nativeSetNSWindowRepresentedFilename(ptr, null)); return; } final String filename = ((java.io.File)value).getAbsolutePath(); - nativeSetNSWindowRepresentedFilename(c.getNSWindowPtr(), filename); + c.execute(ptr->nativeSetNSWindowRepresentedFilename(ptr, filename)); }} }) { @SuppressWarnings("deprecation") @@ -232,6 +235,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo private volatile boolean isInFullScreen; private volatile boolean isIconifyAnimationActive; + private volatile boolean isZoomed; private Window target; private LWWindowPeer peer; @@ -260,7 +264,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo contentView = createContentView(); contentView.initialize(peer, responder); - final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L; Rectangle bounds; if (!IS(DECORATED, styleBits)) { // For undecorated frames the move/resize event does not come if the frame is centered on the screen @@ -269,9 +272,26 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo } else { bounds = _peer.constrainBounds(_target.getBounds()); } - final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), - ownerPtr, styleBits, bounds.x, bounds.y, bounds.width, bounds.height); - setPtr(nativeWindowPtr); + AtomicLong ref = new AtomicLong(); + contentView.execute(viewPtr -> { + boolean hasOwnerPtr = false; + + if (owner != null) { + hasOwnerPtr = 0L != owner.executeGet(ownerPtr -> { + ref.set(nativeCreateNSWindow(viewPtr, ownerPtr, styleBits, + bounds.x, bounds.y, + bounds.width, bounds.height)); + return 1; + }); + } + + if (!hasOwnerPtr) { + ref.set(nativeCreateNSWindow(viewPtr, 0, + styleBits, bounds.x, bounds.y, + bounds.width, bounds.height)); + } + }); + setPtr(ref.get()); if (target instanceof javax.swing.RootPaneContainer) { final javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane(); @@ -435,30 +455,31 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo // this is the counter-point to -[CWindow _nativeSetStyleBit:] private void setStyleBits(final int mask, final boolean value) { - nativeSetNSWindowStyleBits(getNSWindowPtr(), mask, value ? mask : 0); + execute(ptr -> nativeSetNSWindowStyleBits(ptr, mask, value ? mask : 0)); } private native void _toggleFullScreenMode(final long model); public void toggleFullScreen() { - _toggleFullScreenMode(getNSWindowPtr()); + execute(this::_toggleFullScreenMode); } @Override // PlatformWindow public void setMenuBar(MenuBar mb) { - final long nsWindowPtr = getNSWindowPtr(); CMenuBar mbPeer = (CMenuBar)LWToolkit.targetToPeer(mb); - if (mbPeer != null) { - mbPeer.execute(ptr -> nativeSetNSWindowMenuBar(nsWindowPtr, ptr)); - } else { - nativeSetNSWindowMenuBar(nsWindowPtr, 0); - } + execute(nsWindowPtr->{ + if (mbPeer != null) { + mbPeer.execute(ptr -> nativeSetNSWindowMenuBar(nsWindowPtr, ptr)); + } else { + nativeSetNSWindowMenuBar(nsWindowPtr, 0); + } + }); } @Override // PlatformWindow public void dispose() { contentView.dispose(); - nativeDispose(getNSWindowPtr()); + execute(CPlatformWindow::nativeDispose); CPlatformWindow.super.dispose(); } @@ -471,7 +492,11 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo @Override // PlatformWindow public Insets getInsets() { - return nativeGetNSWindowInsets(getNSWindowPtr()); + AtomicReference ref = new AtomicReference<>(); + execute(ptr -> { + ref.set(nativeGetNSWindowInsets(ptr)); + }); + return ref.get() != null ? ref.get() : new Insets(0, 0, 0, 0); } @Override // PlatformWindow @@ -497,16 +522,16 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo @Override // PlatformWindow public void setBounds(int x, int y, int w, int h) { - nativeSetNSWindowBounds(getNSWindowPtr(), x, y, w, h); + execute(ptr -> nativeSetNSWindowBounds(ptr, x, y, w, h)); } public void setMaximizedBounds(int x, int y, int w, int h) { - nativeSetNSWindowStandardFrame(getNSWindowPtr(), x, y, w, h); + execute(ptr -> nativeSetNSWindowStandardFrame(ptr, x, y, w, h)); } private boolean isMaximized() { return undecorated ? this.normalBounds != null - : CWrapper.NSWindow.isZoomed(getNSWindowPtr()); + : isZoomed; } private void maximize() { @@ -514,7 +539,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo return; } if (!undecorated) { - CWrapper.NSWindow.zoom(getNSWindowPtr()); + execute(CWrapper.NSWindow::zoom); } else { deliverZoom(true); @@ -533,7 +558,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo return; } if (!undecorated) { - CWrapper.NSWindow.zoom(getNSWindowPtr()); + execute(CWrapper.NSWindow::zoom); } else { deliverZoom(false); @@ -549,8 +574,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo @Override // PlatformWindow public void setVisible(boolean visible) { - final long nsWindowPtr = getNSWindowPtr(); - // Configure stuff updateIconImages(); updateFocusabilityForAutoRequestFocus(false); @@ -558,7 +581,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo boolean wasMaximized = isMaximized(); if (visible && target.isLocationByPlatform()) { - nativeSetNSWindowLocationByPlatform(getNSWindowPtr()); + execute(CPlatformWindow::nativeSetNSWindowLocationByPlatform); } // Actually show or hide the window @@ -566,30 +589,44 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo if (blocker == null || !visible) { // If it ain't blocked, or is being hidden, go regular way if (visible) { - CWrapper.NSWindow.makeFirstResponder(nsWindowPtr, contentView.getAWTView()); + contentView.execute(viewPtr -> { + execute(ptr -> CWrapper.NSWindow.makeFirstResponder(ptr, + viewPtr)); + }); boolean isPopup = (target.getType() == Window.Type.POPUP); - if (isPopup) { - // Popups in applets don't activate applet's process - CWrapper.NSWindow.orderFrontRegardless(nsWindowPtr); - } else { - CWrapper.NSWindow.orderFront(nsWindowPtr); - } + execute(ptr -> { + if (isPopup) { + // Popups in applets don't activate applet's process + CWrapper.NSWindow.orderFrontRegardless(ptr); + } else { + CWrapper.NSWindow.orderFront(ptr); + } - boolean isKeyWindow = CWrapper.NSWindow.isKeyWindow(nsWindowPtr); - if (!isKeyWindow) { - CWrapper.NSWindow.makeKeyWindow(nsWindowPtr); - } + boolean isKeyWindow = CWrapper.NSWindow.isKeyWindow(ptr); + if (!isKeyWindow) { + CWrapper.NSWindow.makeKeyWindow(ptr); + } + }); } else { - // immediately hide the window - CWrapper.NSWindow.orderOut(nsWindowPtr); - // process the close - CWrapper.NSWindow.close(nsWindowPtr); + execute(ptr->{ + // immediately hide the window + CWrapper.NSWindow.orderOut(ptr); + // process the close + CWrapper.NSWindow.close(ptr); + }); } } else { // otherwise, put it in a proper z-order - CWrapper.NSWindow.orderWindow(nsWindowPtr, CWrapper.NSWindow.NSWindowBelow, - ((CPlatformWindow)blocker.getPlatformWindow()).getNSWindowPtr()); + CPlatformWindow bw + = (CPlatformWindow) blocker.getPlatformWindow(); + bw.execute(blockerPtr -> { + execute(ptr -> { + CWrapper.NSWindow.orderWindow(ptr, + CWrapper.NSWindow.NSWindowBelow, + blockerPtr); + }); + }); } this.visible = visible; @@ -608,7 +645,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo } switch (frameState) { case Frame.ICONIFIED: - CWrapper.NSWindow.miniaturize(nsWindowPtr); + execute(CWrapper.NSWindow::miniaturize); break; case Frame.MAXIMIZED_BOTH: maximize(); @@ -632,7 +669,11 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo if (visible) { // Order myself above my parent if (owner != null && owner.isVisible()) { - CWrapper.NSWindow.orderWindow(nsWindowPtr, CWrapper.NSWindow.NSWindowAbove, owner.getNSWindowPtr()); + owner.execute(ownerPtr -> { + execute(ptr -> { + CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr); + }); + }); applyWindowLevel(target); } @@ -642,7 +683,11 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo if (p instanceof LWWindowPeer) { CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow(); if (pw != null && pw.isVisible()) { - CWrapper.NSWindow.orderWindow(pw.getNSWindowPtr(), CWrapper.NSWindow.NSWindowAbove, nsWindowPtr); + pw.execute(childPtr -> { + execute(ptr -> { + CWrapper.NSWindow.orderWindow(childPtr, CWrapper.NSWindow.NSWindowAbove, ptr); + }); + }); pw.applyWindowLevel(w); } } @@ -658,25 +703,22 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo @Override // PlatformWindow public void setTitle(String title) { - nativeSetNSWindowTitle(getNSWindowPtr(), title); + execute(ptr -> nativeSetNSWindowTitle(ptr, title)); } // Should be called on every window key property change. @Override // PlatformWindow public void updateIconImages() { - final long nsWindowPtr = getNSWindowPtr(); final CImage cImage = getImageForTarget(); - nativeSetNSWindowMinimizedIcon(nsWindowPtr, cImage == null ? 0L : cImage.ptr); - } - - public long getNSWindowPtr() { - final long nsWindowPtr = ptr; - if (nsWindowPtr == 0L) { - if(logger.isLoggable(PlatformLogger.Level.FINE)) { - logger.fine("NSWindow already disposed?", new Exception("Pointer to native NSWindow is invalid.")); + execute(ptr -> { + if (cImage == null) { + nativeSetNSWindowMinimizedIcon(ptr, 0L); + } else { + cImage.execute(imagePtr -> { + nativeSetNSWindowMinimizedIcon(ptr, imagePtr); + }); } - } - return nsWindowPtr; + }); } public SurfaceData getSurfaceData() { @@ -685,13 +727,11 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo @Override // PlatformWindow public void toBack() { - final long nsWindowPtr = getNSWindowPtr(); - nativePushNSWindowToBack(nsWindowPtr); + execute(CPlatformWindow::nativePushNSWindowToBack); } @Override // PlatformWindow public void toFront() { - final long nsWindowPtr = getNSWindowPtr(); LWCToolkit lwcToolkit = (LWCToolkit) Toolkit.getDefaultToolkit(); Window w = DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(); final ComponentAccessor acc = AWTAccessor.getComponentAccessor(); @@ -701,7 +741,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo lwcToolkit.activateApplicationIgnoringOtherApps(); } updateFocusabilityForAutoRequestFocus(false); - nativePushNSWindowToFront(nsWindowPtr); + execute(CPlatformWindow::nativePushNSWindowToFront); updateFocusabilityForAutoRequestFocus(true); } @@ -728,7 +768,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo @Override public void setSizeConstraints(int minW, int minH, int maxW, int maxH) { - nativeSetNSWindowMinMax(getNSWindowPtr(), minW, minH, maxW, maxH); + execute(ptr -> nativeSetNSWindowMinMax(ptr, minW, minH, maxW, maxH)); } @Override @@ -745,19 +785,22 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo @Override public boolean requestWindowFocus() { - - long ptr = getNSWindowPtr(); - if (CWrapper.NSWindow.canBecomeMainWindow(ptr)) { - CWrapper.NSWindow.makeMainWindow(ptr); - } - CWrapper.NSWindow.makeKeyAndOrderFront(ptr); + execute(ptr -> { + if (CWrapper.NSWindow.canBecomeMainWindow(ptr)) { + CWrapper.NSWindow.makeMainWindow(ptr); + } + CWrapper.NSWindow.makeKeyAndOrderFront(ptr); + }); return true; } @Override public boolean isActive() { - long ptr = getNSWindowPtr(); - return CWrapper.NSWindow.isKeyWindow(ptr); + AtomicBoolean ref = new AtomicBoolean(); + execute(ptr -> { + ref.set(CWrapper.NSWindow.isKeyWindow(ptr)); + }); + return ref.get(); } @Override @@ -773,21 +816,21 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo @Override public void setOpacity(float opacity) { - CWrapper.NSWindow.setAlphaValue(getNSWindowPtr(), opacity); + execute(ptr -> CWrapper.NSWindow.setAlphaValue(ptr, opacity)); } @Override public void setOpaque(boolean isOpaque) { - CWrapper.NSWindow.setOpaque(getNSWindowPtr(), isOpaque); + execute(ptr -> CWrapper.NSWindow.setOpaque(ptr, isOpaque)); boolean isTextured = (peer == null) ? false : peer.isTextured(); if (!isTextured) { if (!isOpaque) { - CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), 0); + execute(ptr -> CWrapper.NSWindow.setBackgroundColor(ptr, 0)); } else if (peer != null) { Color color = peer.getBackground(); if (color != null) { int rgb = color.getRGB(); - CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), rgb); + execute(ptr->CWrapper.NSWindow.setBackgroundColor(ptr, rgb)); } } } @@ -800,12 +843,12 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo @Override public void enterFullScreenMode() { isFullScreenMode = true; - nativeEnterFullScreenMode(getNSWindowPtr()); + execute(CPlatformWindow::nativeEnterFullScreenMode); } @Override public void exitFullScreenMode() { - nativeExitFullScreenMode(getNSWindowPtr()); + execute(CPlatformWindow::nativeExitFullScreenMode); isFullScreenMode = false; } @@ -824,7 +867,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo int prevWindowState = peer.getState(); if (prevWindowState == windowState) return; - final long nsWindowPtr = getNSWindowPtr(); if ((windowState & Frame.ICONIFIED) != 0) { // Treat all state bit masks with ICONIFIED bit as ICONIFIED state. windowState = Frame.ICONIFIED; @@ -836,18 +878,18 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo // the zoom call toggles between the normal and the max states unmaximize(); } - CWrapper.NSWindow.miniaturize(nsWindowPtr); + execute(CWrapper.NSWindow::miniaturize); break; case Frame.MAXIMIZED_BOTH: if (prevWindowState == Frame.ICONIFIED) { // let's return into the normal states first - CWrapper.NSWindow.deminiaturize(nsWindowPtr); + execute(CWrapper.NSWindow::deminiaturize); } maximize(); break; case Frame.NORMAL: if (prevWindowState == Frame.ICONIFIED) { - CWrapper.NSWindow.deminiaturize(nsWindowPtr); + execute(CWrapper.NSWindow::deminiaturize); } else if (prevWindowState == Frame.MAXIMIZED_BOTH) { // the zoom call toggles between the normal and the max states unmaximize(); @@ -871,15 +913,15 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo // We are going to show a modal window. Previously displayed window will be // blocked/disabled. So we have to send mouse exited event to it now, since // all mouse events are discarded for blocked/disabled windows. - nativeSynthesizeMouseEnteredExitedEvents(getNSWindowPtr(), CocoaConstants.NSMouseExited); + execute(ptr -> nativeSynthesizeMouseEnteredExitedEvents(ptr, CocoaConstants.NSMouseExited)); } - nativeSetEnabled(getNSWindowPtr(), !blocked); + execute(ptr -> nativeSetEnabled(ptr, !blocked)); checkBlockingAndOrder(); } - public final void invalidateShadow(){ - nativeRevalidateNSWindowShadow(getNSWindowPtr()); + public final void invalidateShadow() { + execute(ptr -> nativeRevalidateNSWindowShadow(ptr)); } // ---------------------------------------------------------------------- @@ -974,6 +1016,11 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo protected void deliverMoveResizeEvent(int x, int y, int width, int height, boolean byUser) { + AtomicBoolean ref = new AtomicBoolean(); + execute(ptr -> { + ref.set(CWrapper.NSWindow.isZoomed(ptr)); + }); + isZoomed = ref.get(); checkZoom(); final Rectangle oldB = nativeBounds; @@ -1067,11 +1114,11 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo pWindow.orderAboveSiblings(); - final long nsWindowPtr = pWindow.getNSWindowPtr(); - CWrapper.NSWindow.orderFrontRegardless(nsWindowPtr); - CWrapper.NSWindow.makeKeyAndOrderFront(nsWindowPtr); - CWrapper.NSWindow.makeMainWindow(nsWindowPtr); - + pWindow.execute(ptr -> { + CWrapper.NSWindow.orderFrontRegardless(ptr); + CWrapper.NSWindow.makeKeyAndOrderFront(ptr); + CWrapper.NSWindow.makeMainWindow(ptr); + }); return true; } @@ -1110,7 +1157,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo // which is going to become 'main window', are placed above their siblings. CPlatformWindow rootOwner = getRootOwner(); if (rootOwner.isVisible() && !rootOwner.isIconified()) { - CWrapper.NSWindow.orderFront(rootOwner.getNSWindowPtr()); + rootOwner.execute(CWrapper.NSWindow::orderFront); } // Do not order child windows of iconified owner. if (!rootOwner.isIconified()) { @@ -1137,10 +1184,13 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo // the window should be ordered above its siblings; otherwise the window is just ordered // above its nearest parent. if (pw.isOneOfOwnersOrSelf(this)) { - CWrapper.NSWindow.orderFront(pw.getNSWindowPtr()); + pw.execute(CWrapper.NSWindow::orderFront); } else { - CWrapper.NSWindow.orderWindow(pw.getNSWindowPtr(), CWrapper.NSWindow.NSWindowAbove, - pw.owner.getNSWindowPtr()); + pw.owner.execute(ownerPtr -> { + pw.execute(ptr -> { + CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr); + }); + }); } pw.applyWindowLevel(w); } @@ -1162,9 +1212,9 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo protected void applyWindowLevel(Window target) { if (target.isAlwaysOnTop() && target.getType() != Window.Type.POPUP) { - CWrapper.NSWindow.setLevel(getNSWindowPtr(), CWrapper.NSWindow.NSFloatingWindowLevel); + execute(ptr->CWrapper.NSWindow.setLevel(ptr, CWrapper.NSWindow.NSFloatingWindowLevel)); } else if (target.getType() == Window.Type.POPUP) { - CWrapper.NSWindow.setLevel(getNSWindowPtr(), CWrapper.NSWindow.NSPopUpMenuWindowLevel); + execute(ptr->CWrapper.NSWindow.setLevel(ptr, CWrapper.NSWindow.NSPopUpMenuWindowLevel)); } } diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPopupMenu.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPopupMenu.java index b73f67a0f79..95f83055cbc 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPopupMenu.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPopupMenu.java @@ -46,6 +46,7 @@ final class CPopupMenu extends CMenu implements PopupMenuPeer { private native long nativeShowPopupMenu(long modelPtr, int x, int y); @Override + @SuppressWarnings("deprecation") public void show(Event e) { Component origin = (Component)e.target; if (origin != null) { diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java index cb1ee148707..1e492b9103c 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java @@ -68,6 +68,7 @@ public class CPrinterDialogPeer extends LWWindowPeer { public void setResizable(boolean resizable) {} public void setEnabled(boolean enable) {} public void setBounds(int x, int y, int width, int height) {} + @SuppressWarnings("deprecation") public boolean handleEvent(Event e) { return false; } public void setForeground(Color c) {} public void setBackground(Color c) {} diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java index 2d54d62b799..e54e1532666 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, 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 @@ -556,6 +556,7 @@ public final class CPrinterJob extends RasterPrinterJob { // The following methods are CPrinterJob specific. @Override + @SuppressWarnings("deprecation") protected void finalize() { synchronized (fNSPrintInfoLock) { if (fNSPrintInfo != -1) { diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java index 940858e1d4f..744b85a0a05 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, 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 @@ -174,7 +174,8 @@ class CRobot implements RobotPeer { @Override public int getRGBPixel(int x, int y) { int c[] = new int[1]; - getScreenPixels(new Rectangle(x, y, 1, 1), c); + double scale = fDevice.getScaleFactor(); + getScreenPixels(new Rectangle(x, y, (int) scale, (int) scale), c); return c[0]; } @@ -198,7 +199,8 @@ class CRobot implements RobotPeer { boolean isMouseMove); private native void keyEvent(int javaKeyCode, boolean keydown); private void getScreenPixels(Rectangle r, int[] pixels){ - nativeGetScreenPixels(r.x, r.y, r.width, r.height, pixels); + double scale = fDevice.getScaleFactor(); + nativeGetScreenPixels(r.x, r.y, r.width, r.height, scale, pixels); } - private native void nativeGetScreenPixels(int x, int y, int width, int height, int[] pixels); + private native void nativeGetScreenPixels(int x, int y, int width, int height, double scale, int[] pixels); } diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java index bcbb242f949..dc168a4ab1f 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTrayIcon.java @@ -36,6 +36,7 @@ import java.awt.image.BufferedImage; import java.awt.peer.TrayIconPeer; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import java.util.concurrent.atomic.AtomicReference; import static sun.awt.AWTAccessor.*; @@ -91,10 +92,6 @@ public class CTrayIcon extends CFRetainedResource implements TrayIconPeer { return nativeCreate(); } - private long getModel() { - return ptr; - } - private native long nativeCreate(); //invocation from the AWTTrayIcon.m @@ -168,7 +165,7 @@ public class CTrayIcon extends CFRetainedResource implements TrayIconPeer { @Override public void setToolTip(String tooltip) { - nativeSetToolTip(getModel(), tooltip); + execute(ptr -> nativeSetToolTip(ptr, tooltip)); } //adds tooltip to the NSStatusBar's NSButton. @@ -197,7 +194,12 @@ public class CTrayIcon extends CFRetainedResource implements TrayIconPeer { } CImage cimage = CImage.getCreator().createFromImage(image); - setNativeImage(getModel(), cimage.ptr, target.isImageAutoSize()); + boolean imageAutoSize = target.isImageAutoSize(); + cimage.execute(imagePtr -> { + execute(ptr -> { + setNativeImage(ptr, imagePtr, imageAutoSize); + }); + }); } private native void setNativeImage(final long model, final long nsimage, final boolean autosize); @@ -377,7 +379,14 @@ public class CTrayIcon extends CFRetainedResource implements TrayIconPeer { private void showMessageDialog() { Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); - Point2D iconLoc = nativeGetIconLocation(getModel()); + AtomicReference ref = new AtomicReference<>(); + execute(ptr -> { + ref.set(nativeGetIconLocation(ptr)); + }); + Point2D iconLoc = ref.get(); + if (iconLoc == null) { + return; + } int dialogY = (int)iconLoc.getY(); int dialogX = (int)iconLoc.getX(); diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java index 2312fbb94be..5c658ef8e33 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java @@ -73,13 +73,13 @@ public class CViewPlatformEmbeddedFrame implements PlatformWindow { @Override public void dispose() { - CWrapper.NSView.removeFromSuperview(view.getAWTView()); + view.execute(CWrapper.NSView::removeFromSuperview); view.dispose(); } @Override public void setVisible(boolean visible) { - CWrapper.NSView.setHidden(view.getAWTView(), !visible); + view.execute(ptr -> CWrapper.NSView.setHidden(ptr, !visible)); } @Override diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java index ee44dbf09c9..a8cad346cff 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java @@ -204,14 +204,14 @@ public final class CWarningWindow extends CPlatformWindow @Override public void setVisible(boolean visible) { synchronized (lock) { - final long nsWindowPtr = getNSWindowPtr(); - - // Actually show or hide the window - if (visible) { - CWrapper.NSWindow.orderFront(nsWindowPtr); - } else { - CWrapper.NSWindow.orderOut(nsWindowPtr); - } + execute(ptr -> { + // Actually show or hide the window + if (visible) { + CWrapper.NSWindow.orderFront(ptr); + } else { + CWrapper.NSWindow.orderOut(ptr); + } + }); this.visible = visible; @@ -219,8 +219,13 @@ public final class CWarningWindow extends CPlatformWindow if (visible) { // Order myself above my parent if (owner != null && owner.isVisible()) { - CWrapper.NSWindow.orderWindow(nsWindowPtr, - CWrapper.NSWindow.NSWindowAbove, owner.getNSWindowPtr()); + owner.execute(ownerPtr -> { + execute(ptr -> { + CWrapper.NSWindow.orderWindow(ptr, + CWrapper.NSWindow.NSWindowAbove, + ownerPtr); + }); + }); // do not allow security warning to be obscured by other windows applyWindowLevel(ownerWindow); diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java index 9c463003a93..6f5e5c85c9a 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java @@ -358,18 +358,6 @@ public final class LWCToolkit extends LWToolkit { return new OSXPlatformFont(name, style); } - @Override - protected int getScreenHeight() { - return GraphicsEnvironment.getLocalGraphicsEnvironment() - .getDefaultScreenDevice().getDefaultConfiguration().getBounds().height; - } - - @Override - protected int getScreenWidth() { - return GraphicsEnvironment.getLocalGraphicsEnvironment() - .getDefaultScreenDevice().getDefaultConfiguration().getBounds().width; - } - @Override protected void initializeDesktopProperties() { super.initializeDesktopProperties(); @@ -532,6 +520,7 @@ public final class LWCToolkit extends LWToolkit { * @since 1.1 */ @Override + @SuppressWarnings("deprecation") public int getMenuShortcutKeyMask() { return Event.META_MASK; } @@ -768,6 +757,7 @@ public final class LWCToolkit extends LWToolkit { * stroke. */ @Override + @SuppressWarnings("deprecation") public int getFocusAcceleratorKeyMask() { return InputEvent.CTRL_MASK | InputEvent.ALT_MASK; } @@ -777,6 +767,7 @@ public final class LWCToolkit extends LWToolkit { * printable character. */ @Override + @SuppressWarnings("deprecation") public boolean isPrintableCharacterModifiersMask(int mods) { return ((mods & (InputEvent.META_MASK | InputEvent.CTRL_MASK)) == 0); } diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/NSEvent.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/NSEvent.java index 5710988643d..252ce1122c9 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/NSEvent.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/NSEvent.java @@ -36,8 +36,8 @@ final class NSEvent { static final int SCROLL_PHASE_UNSUPPORTED = 1; static final int SCROLL_PHASE_BEGAN = 2; static final int SCROLL_PHASE_CONTINUED = 3; - static final int SCROLL_MASK_PHASE_CANCELLED = 4; - static final int SCROLL_MASK_PHASE_ENDED = 5; + static final int SCROLL_PHASE_MOMENTUM_BEGAN = 4; + static final int SCROLL_PHASE_ENDED = 5; private int type; private int modifierFlags; diff --git a/jdk/src/java.desktop/macosx/native/include/jawt_md.h b/jdk/src/java.desktop/macosx/native/include/jawt_md.h index c6859fdbf90..94a13c9ab40 100644 --- a/jdk/src/java.desktop/macosx/native/include/jawt_md.h +++ b/jdk/src/java.desktop/macosx/native/include/jawt_md.h @@ -37,7 +37,7 @@ extern "C" { #endif /* - * Mac OS X specific declarations for AWT native interface. + * MacOS specific declarations for AWT native interface. * See notes in jawt.h for an example of use. */ diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.h b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.h index 5045be3a59c..f217605ed7c 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.h +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -41,6 +41,8 @@ CALayer *windowLayer; } +@property (atomic, retain) CALayer *windowLayer; + - (id) initWithWindowLayer: (CALayer *)windowLayer; - (void) setBounds: (CGRect)rect; diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.m index 39fc4c2b82a..c03ff90a375 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -38,11 +38,15 @@ self = [super init]; if (self == nil) return self; - windowLayer = aWindowLayer; + self.windowLayer = aWindowLayer; return self; } +- (void) dealloc { + self.windowLayer = nil; + [super dealloc]; +} - (CALayer *) layer { return layer; diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m index 208d22d69ff..186a002dd5f 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m @@ -381,6 +381,13 @@ static BOOL shouldUsePressAndHold() { } else { clickCount = [event clickCount]; } + + jdouble deltaX = [event deltaX]; + jdouble deltaY = [event deltaY]; + if ([AWTToolkit hasPreciseScrollingDeltas: event]) { + deltaX = [event scrollingDeltaX] * 0.1; + deltaY = [event scrollingDeltaY] * 0.1; + } static JNF_CLASS_CACHE(jc_NSEvent, "sun/lwawt/macosx/NSEvent"); static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IIIIIIIIDDI)V"); @@ -391,8 +398,8 @@ static BOOL shouldUsePressAndHold() { [event buttonNumber], (jint)localPoint.x, (jint)localPoint.y, (jint)absP.x, (jint)absP.y, - [event deltaY], - [event deltaX], + deltaY, + deltaX, [AWTToolkit scrollStateWithEvent: event]); CHECK_NULL(jEvent); diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m index d3ee81c2175..c394854a5c6 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -276,7 +276,7 @@ Java_sun_lwawt_macosx_CRobot_keyEvent JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CRobot_nativeGetScreenPixels (JNIEnv *env, jobject peer, - jint x, jint y, jint width, jint height, jintArray pixels) + jint x, jint y, jint width, jint height, jdouble scale, jintArray pixels) { JNF_COCOA_ENTER(env); @@ -285,10 +285,11 @@ Java_sun_lwawt_macosx_CRobot_nativeGetScreenPixels jint picWidth = width; jint picHeight = height; - CGRect screenRect = CGRectMake(picX, picY, picWidth, picHeight); + CGRect screenRect = CGRectMake(picX / scale, picY / scale, + picWidth / scale, picHeight / scale); CGImageRef screenPixelsImage = CGWindowListCreateImage(screenRect, kCGWindowListOptionOnScreenOnly, - kCGNullWindowID, kCGWindowImageDefault); + kCGNullWindowID, kCGWindowImageBestResolution); if (screenPixelsImage == NULL) { return; diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m index 8057972d301..bfce2fde5c7 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m @@ -139,7 +139,14 @@ static NSSize ScaledImageSizeForStatusBar(NSSize imageSize, BOOL autosize) { jint clickCount; clickCount = [event clickCount]; - + + jdouble deltaX = [event deltaX]; + jdouble deltaY = [event deltaY]; + if ([AWTToolkit hasPreciseScrollingDeltas: event]) { + deltaX = [event scrollingDeltaX] * 0.1; + deltaY = [event scrollingDeltaY] * 0.1; + } + static JNF_CLASS_CACHE(jc_NSEvent, "sun/lwawt/macosx/NSEvent"); static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IIIIIIIIDDI)V"); jobject jEvent = JNFNewObject(env, jctor_NSEvent, @@ -149,8 +156,8 @@ static NSSize ScaledImageSizeForStatusBar(NSSize imageSize, BOOL autosize) { [event buttonNumber], (jint)localPoint.x, (jint)localPoint.y, (jint)absP.x, (jint)absP.y, - [event deltaY], - [event deltaX], + deltaY, + deltaX, [AWTToolkit scrollStateWithEvent: event]); CHECK_NULL(jEvent); diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m index 5a91adf70b5..01b495be605 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m @@ -136,7 +136,7 @@ static NSObject *sAttributeNamesLOCK = nil; fJavaRole = [javaRole retain]; fAccessible = (*env)->NewWeakGlobalRef(env, accessible); - + (*env)->ExceptionClear(env); // in case of OOME jobject jcomponent = [(AWTView *)fView awtComponent:env]; fComponent = (*env)->NewWeakGlobalRef(env, jcomponent); (*env)->DeleteLocalRef(env, jcomponent); diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h index c581cb45be1..34532ecb05f 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h @@ -42,6 +42,7 @@ extern jint* gButtonDownMasks; + (long) getEventCount; + (void) eventCountPlusPlus; + (jint) scrollStateWithEvent: (NSEvent*) event; ++ (BOOL) hasPreciseScrollingDeltas: (NSEvent*) event; @end /* diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m index 41e966894ce..8cba8ccb8a9 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m @@ -47,7 +47,7 @@ #define SCROLL_PHASE_UNSUPPORTED 1 #define SCROLL_PHASE_BEGAN 2 #define SCROLL_PHASE_CONTINUED 3 -#define SCROLL_PHASE_CANCELLED 4 +#define SCROLL_PHASE_MOMENTUM_BEGAN 4 #define SCROLL_PHASE_ENDED 5 int gNumberOfButtons; @@ -85,16 +85,33 @@ static long eventCount; return 0; } - NSEventPhase phase = [event phase]; - NSEventPhase momentumPhase = [event momentumPhase]; - - if (!phase && !momentumPhase) return SCROLL_PHASE_UNSUPPORTED; - switch (phase) { - case NSEventPhaseBegan: return SCROLL_PHASE_BEGAN; - case NSEventPhaseCancelled: return SCROLL_PHASE_CANCELLED; - case NSEventPhaseEnded: return SCROLL_PHASE_ENDED; - default: return SCROLL_PHASE_CONTINUED; + if ([event phase]) { + // process a phase of manual scrolling + switch ([event phase]) { + case NSEventPhaseBegan: return SCROLL_PHASE_BEGAN; + case NSEventPhaseCancelled: return SCROLL_PHASE_ENDED; + case NSEventPhaseEnded: return SCROLL_PHASE_ENDED; + default: return SCROLL_PHASE_CONTINUED; + } } + + if ([event momentumPhase]) { + // process a phase of automatic scrolling + switch ([event momentumPhase]) { + case NSEventPhaseBegan: return SCROLL_PHASE_MOMENTUM_BEGAN; + case NSEventPhaseCancelled: return SCROLL_PHASE_ENDED; + case NSEventPhaseEnded: return SCROLL_PHASE_ENDED; + default: return SCROLL_PHASE_CONTINUED; + } + } + // phase and momentum phase both are not set + return SCROLL_PHASE_UNSUPPORTED; +} + ++ (BOOL) hasPreciseScrollingDeltas: (NSEvent*) event { + return [event type] == NSScrollWheel + && [event respondsToSelector:@selector(hasPreciseScrollingDeltas)] + && [event hasPreciseScrollingDeltas]; } @end diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/QuartzSurfaceData.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/QuartzSurfaceData.m index 01f24de6ec7..017c46aa013 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/QuartzSurfaceData.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/QuartzSurfaceData.m @@ -284,28 +284,21 @@ PRINT(" contextQuartzLinearGradientPath"); CGFloat components[component_size]; CGGradientRef gradient = NULL; - for (int i = 0; i < num_locations; i++) { + for (i = 0; i < num_locations; i++) { locations[i] = gradientInfo->fractionsdata[i]; -//fprintf(stderr, "locations[%d] %f\n", i, locations[i]); } for (i = 0; i < component_size; i++) { components[i] = gradientInfo->colordata[i]; -//fprintf(stderr, "components[%d] %f, gradientInfo->colordata[%d] %f\n", -// i, components[i], i, gradientInfo->colordata[i]); } CGContextSaveGState(cgRef); gradient = CGGradientCreateWithColorComponents(colorspace, components, locations, num_locations); -//fprintf(stderr, "gradientInfo->start.x %f, gradientInfo->start.y %f\n", -// gradientInfo->start.x, gradientInfo->start.y); -//fprintf(stderr, "gradientInfo->end.x %f, gradientInfo->end.y %f\n", -// gradientInfo->end.x, gradientInfo->end.y); if (qsdo->isEvenOddFill) { CGContextEOClip(cgRef); } else { CGContextClip(cgRef); } CGContextDrawLinearGradient(cgRef, gradient, gradientInfo->start, gradientInfo->end, kCGGradientDrawsAfterEndLocation); - + CGContextRestoreGState(cgRef); CGColorSpaceRelease(colorspace); CGGradientRelease(gradient); @@ -332,27 +325,19 @@ PRINT(" contextQuartzRadialGradientPath"); CGFloat startRadius = gradientInfo->radius; CGFloat endRadius = gradientInfo->radius; - for (int i = 0; i < num_locations; i++) { + for (i = 0; i < num_locations; i++) { locations[i] = gradientInfo->fractionsdata[i]; -//fprintf(stderr, "locations[%d] %f\n", i, locations[i]); } for (i = 0; i < component_size; i++) { components[i] = gradientInfo->colordata[i]; -//fprintf(stderr, "components[%d] %f, gradientInfo->colordata[%d] %f\n", -// i, components[i], i, gradientInfo->colordata[i]); } CGContextSaveGState(cgRef); gradient = CGGradientCreateWithColorComponents(colorspace, components, locations, num_locations); -//fprintf(stderr, "gradientInfo->start.x %f, gradientInfo->start.y %f\n", -// gradientInfo->start.x, gradientInfo->start.y); -//fprintf(stderr, "gradientInfo->end.x %f, gradientInfo->end.y %f\n", -// gradientInfo->end.x, gradientInfo->end.y); if (qsdo->isEvenOddFill) { CGContextEOClip(cgRef); } else { CGContextClip(cgRef); } -//fprintf(stderr, "gradientInfo->startRadius %f, gradientInfo->endRadius %f\n",startRadius,endRadius); CGContextDrawRadialGradient(cgRef, gradient, gradientInfo->start, 0, gradientInfo->end, endRadius, kCGGradientDrawsAfterEndLocation); CGContextRestoreGState(cgRef); @@ -944,54 +929,41 @@ void setupGradient(JNIEnv *env, QuartzSDOps* qsdo, jfloat* javaFloatGraphicsStat if (colorArray != NULL) { jint length = (*env)->GetArrayLength(env, colorArray); -//fprintf(stderr, "length %d\n", length); jint* jcolorData = (jint*)(*env)->GetPrimitiveArrayCritical(env, colorArray, NULL); - CGFloat* colors= (CGFloat*)calloc(0, sizeof(CGFloat)*length); + qsdo->gradientInfo->colordata = (CGFloat*)malloc(sizeof(CGFloat)*4*length); + memset(qsdo->gradientInfo->colordata, 0, sizeof(CGFloat)*4*length); if (jcolorData != NULL) { - jint i; + int i; for (i=0; igradientInfo->colordata[i*4] = ((jcolorData[i]>>16)&0xff)*kColorConversionMultiplier; + + qsdo->gradientInfo->colordata[i*4+1] = ((jcolorData[i]>>8)&0xff)*kColorConversionMultiplier; + + qsdo->gradientInfo->colordata[i*4+2] = ((jcolorData[i]>>0)&0xff)*kColorConversionMultiplier; + + qsdo->gradientInfo->colordata[i*4+3] = ((jcolorData[i]>>24)&0xff)*kColorConversionMultiplier; } } (*env)->ReleasePrimitiveArrayCritical(env, colorArray, jcolorData, 0); - qsdo->gradientInfo->colordata = (CGFloat*)calloc(0, sizeof(CGFloat)*4*length); - for (int i = 0; i < length; i++) - { - jint c1 = colors[i]; -//fprintf(stderr, "c1 %x\n", c1); - qsdo->gradientInfo->colordata[i*4] = ((c1>>16)&0xff)*kColorConversionMultiplier; -//fprintf(stderr, "qsdo->gradientInfo->colordata[%d] %f\n", i*4, qsdo->gradientInfo->colordata[i*4]); - - qsdo->gradientInfo->colordata[i*4+1] = ((c1>>8)&0xff)*kColorConversionMultiplier; -//fprintf(stderr, "qsdo->gradientInfo->colordata[%d] %f\n", i*4+1, qsdo->gradientInfo->colordata[i*4+1]); - - qsdo->gradientInfo->colordata[i*4+2] = ((c1>>0)&0xff)*kColorConversionMultiplier; -//fprintf(stderr, "qsdo->gradientInfo->colordata[%d] %f\n", i*4+2, qsdo->gradientInfo->colordata[i*4+2]); - - qsdo->gradientInfo->colordata[i*4+3] = ((c1>>24)&0xff)*kColorConversionMultiplier; -//fprintf(stderr, "qsdo->gradientInfo->colordata[%d] %f\n", i*4+3, qsdo->gradientInfo->colordata[i*4+3]); - } - free(colors); } jobject fractionsArray = ((*env)->GetObjectArrayElement(env, qsdo->javaGraphicsStatesObjects, sun_java2d_OSXSurfaceData_kFractionsArrayIndex)); if (fractionsArray != NULL) { jint length = (*env)->GetArrayLength(env, fractionsArray); -//fprintf(stderr, "fractions length %d\n", length); qsdo->gradientInfo->fractionsLength = length; jfloat* jfractionsData = (jfloat*)(*env)->GetPrimitiveArrayCritical(env, fractionsArray, NULL); if (jfractionsData != NULL) { + int i; qsdo->gradientInfo->fractionsdata = (CGFloat *)malloc(sizeof(CGFloat) *length); - jint i; + memset(qsdo->gradientInfo->fractionsdata, 0, sizeof(CGFloat)*length); for (i=0; igradientInfo->fractionsdata[i] = jfractionsData[i]; -//fprintf(stderr, "jfrationsData[%d] %f, qsdo->gradientInfo->fractionsdata[%d] = %f\n", i, jfractionsData[i], i, qsdo->gradientInfo->fractionsdata[i]); } (*env)->ReleasePrimitiveArrayCritical(env, fractionsArray, jfractionsData, 0); } diff --git a/jdk/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties b/jdk/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties index 8075f3ef4b4..5a4499f09ef 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties +++ b/jdk/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties @@ -93,7 +93,7 @@ pressed=nedtryckt resizable=storleks\u00E4ndringsbar selectable=valbar selected=vald -showing=visas +showing=visar singleline=en rad transient=tillf\u00E4llig visible=synlig diff --git a/jdk/src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java b/jdk/src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java index 1ba10acd72f..e699937bd7f 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java +++ b/jdk/src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 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 @@ -27,6 +27,8 @@ package com.sun.awt; import java.awt.*; +import javax.swing.JRootPane; + import sun.awt.AWTAccessor; import sun.awt.SunToolkit; @@ -323,7 +325,7 @@ public final class AWTUtilities { * is thrown. *

            If the window is a {@code Frame} or a {@code Dialog}, the window must * be undecorated prior to enabling the per-pixel translucency effect (see - * {@link Frame#setUndecorated()} and/or {@link Dialog#setUndecorated()}). + * {@link Frame#setUndecorated} and/or {@link Dialog#setUndecorated}). * If the window becomes decorated through a subsequent call to the * corresponding {@code setUndecorated()} method, the per-pixel * translucency effect will be disabled and the opaque property reset to @@ -431,7 +433,7 @@ public final class AWTUtilities { * *

            * The most common example when the 'mixing-cutout' shape is needed is a - * glass pane component. The {@link JRootPane#setGlassPane()} method + * glass pane component. The {@link JRootPane#setGlassPane} method * automatically sets the empty-shape as the 'mixing-cutout' shape * for the given glass pane component. If a developer needs some other * 'mixing-cutout' shape for the glass pane (which is rare), this must be @@ -456,8 +458,7 @@ public final class AWTUtilities { "The component argument should not be null."); } - AWTAccessor.getComponentAccessor().setMixingCutoutShape(component, - shape); + component.setMixingCutoutShape(shape); } } diff --git a/jdk/src/java.desktop/share/classes/com/sun/awt/SecurityWarning.java b/jdk/src/java.desktop/share/classes/com/sun/awt/SecurityWarning.java index a33a8b3493f..02c65c0c227 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/awt/SecurityWarning.java +++ b/jdk/src/java.desktop/share/classes/com/sun/awt/SecurityWarning.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 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 @@ -59,7 +59,7 @@ public final class SecurityWarning { * * The returned value is not valid until the peer has been created. Before * invoking this method a developer must call the {@link Window#pack()}, - * {@link Window#setVisible()}, or some other method that creates the peer. + * {@link Window#setVisible}, or some other method that creates the peer. * * @param window the window to get the security warning size for * diff --git a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java index ee178527dac..81baecc21cb 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java +++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java @@ -1439,51 +1439,72 @@ public class BMPImageReader extends ImageReader implements BMPConstants { decodeRLE8(imSize, padding, values, bdata); } + private boolean copyRLE8ScanlineToDst(int lineNo, + byte[] val, + byte[] bdata) { + // Return value + boolean isSuccess = false; + + // Reusing the code to copy 1 row of pixels or scanline to required + // destination buffer. + if (lineNo >= sourceRegion.y && + lineNo < sourceRegion.y + sourceRegion.height) { + if (noTransform) { + int pos = lineNo * width; + for(int i = 0; i < width; i++) + bdata[pos++] = val[i]; + processImageUpdate(bi, 0, lineNo, + destinationRegion.width, 1, 1, 1, + new int[]{0}); + isSuccess = true; + } else if ((lineNo - sourceRegion.y) % scaleY == 0) { + int lineStride = + ((ComponentSampleModel)sampleModel).getScanlineStride(); + int currentLine = (lineNo - sourceRegion.y) / scaleY + + destinationRegion.y; + int pos = currentLine * lineStride; + pos += destinationRegion.x; + for (int i = sourceRegion.x; + i < sourceRegion.x + sourceRegion.width; + i += scaleX) + bdata[pos++] = val[i]; + processImageUpdate(bi, 0, currentLine, + destinationRegion.width, 1, 1, 1, + new int[]{0}); + isSuccess = true; + } + // Ensure to reset the scanline buffer once the copy is complete. + for(int scIndex = 0; scIndex < width; scIndex++) { + val[scIndex] = 0; + } + } + + return isSuccess; + } + private void decodeRLE8(int imSize, int padding, byte[] values, byte[] bdata) throws IOException { - byte val[] = new byte[width * height]; + byte val[] = new byte[width]; int count = 0, l = 0; int value; boolean flag = false; int lineNo = isBottomUp ? height - 1 : 0; - int lineStride = - ((ComponentSampleModel)sampleModel).getScanlineStride(); int finished = 0; - while (count != imSize) { + // Ensure image source has sufficient data to decode + while ((count + 1) < imSize) { value = values[count++] & 0xff; if (value == 0) { switch(values[count++] & 0xff) { case 0: // End-of-scanline marker - if (lineNo >= sourceRegion.y && - lineNo < sourceRegion.y + sourceRegion.height) { - if (noTransform) { - int pos = lineNo * width; - for(int i = 0; i < width; i++) - bdata[pos++] = val[i]; - processImageUpdate(bi, 0, lineNo, - destinationRegion.width, 1, 1, 1, - new int[]{0}); - finished++; - } else if ((lineNo - sourceRegion.y) % scaleY == 0) { - int currentLine = (lineNo - sourceRegion.y) / scaleY + - destinationRegion.y; - int pos = currentLine * lineStride; - pos += destinationRegion.x; - for (int i = sourceRegion.x; - i < sourceRegion.x + sourceRegion.width; - i += scaleX) - bdata[pos++] = val[i]; - processImageUpdate(bi, 0, currentLine, - destinationRegion.width, 1, 1, 1, - new int[]{0}); - finished++; - } + // Copy the decoded scanline to destination + if (copyRLE8ScanlineToDst(lineNo, val, bdata)) { + finished++; } processImageProgress(100.0F * finished / destinationRegion.height); lineNo += isBottomUp ? -1 : 1; @@ -1492,26 +1513,62 @@ public class BMPImageReader extends ImageReader implements BMPConstants { if (abortRequested()) { flag = true; } - break; case 1: // End-of-RLE marker flag = true; + + // Check if the last decoded scanline was copied to + // destination bitmap + if (l != 0) { + // Copy the decoded scanline to destination + if (copyRLE8ScanlineToDst(lineNo, val, bdata)) { + finished++; + } + processImageProgress(100.0F * finished / destinationRegion.height); + lineNo += isBottomUp ? -1 : 1; + l = 0; + } break; case 2: // delta or vector marker - int xoff = values[count++] & 0xff; - int yoff = values[count] & 0xff; - // Move to the position xoff, yoff down - l += xoff + yoff*width; + if ((count+1) < imSize) { + int xoff = values[count++] & 0xff; + int yoff = values[count++] & 0xff; + + // Check if the yOffset shifts the decoding to another + // row. In such cases, the decoded pixels in scanline + // buffer-val must be copied to the destination image. + if (yoff != 0) { + // Copy the decoded scanline to destination + if (copyRLE8ScanlineToDst(lineNo, val, bdata)) { + finished++; + } + processImageProgress(100.0F * finished + / destinationRegion.height); + lineNo += isBottomUp ? -yoff : yoff; + } + + // Move to the position xoff, yoff down + l += xoff + yoff*width; + l %= width; + } break; default: int end = values[count-1] & 0xff; - for (int i=0; i markerSequence = new ArrayList<>(); diff --git a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriter.java b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriter.java index f1660f8a159..3fbc55c82b9 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriter.java +++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -143,6 +143,7 @@ final class ChunkStream extends ImageOutputStreamImpl { } @Override + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { // Empty finalizer (for improved performance; no need to call // super.finalize() in this case) @@ -279,6 +280,7 @@ final class IDATOutputStream extends ImageOutputStreamImpl { } @Override + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { // Empty finalizer (for improved performance; no need to call // super.finalize() in this case) diff --git a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFBaseJPEGCompressor.java b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFBaseJPEGCompressor.java index 46185618913..d78cb1cbdd9 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFBaseJPEGCompressor.java +++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFBaseJPEGCompressor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -74,13 +74,13 @@ public abstract class TIFFBaseJPEGCompressor extends TIFFCompressor { /** * ImageWriteParam for JPEG writer. - * May be initialized by {@link #initJPEGWriter()}. + * May be initialized by {@link #initJPEGWriter}. */ protected JPEGImageWriteParam JPEGParam = null; /** * The JPEG writer. - * May be initialized by {@link #initJPEGWriter()}. + * May be initialized by {@link #initJPEGWriter}. */ protected ImageWriter JPEGWriter = null; @@ -95,7 +95,7 @@ public abstract class TIFFBaseJPEGCompressor extends TIFFCompressor { * Stream metadata equivalent to a tables-only stream such as in * the {@code JPEGTables}. Default value is {@code null}. * This should be set by any subclass which sets - * {@link writeAbbreviatedStream} to {@code true}. + * {@link #writeAbbreviatedStream} to {@code true}. */ protected IIOMetadata JPEGStreamMetadata = null; @@ -435,6 +435,7 @@ public abstract class TIFFBaseJPEGCompressor extends TIFFCompressor { return compDataLength; } + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); if(JPEGWriter != null) { diff --git a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDecompressor.java b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDecompressor.java index acfa6985f3c..a1b04390977 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDecompressor.java +++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDecompressor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -1322,7 +1322,7 @@ public abstract class TIFFDecompressor { * Sets the index of the planar configuration band to be decoded. This value * is ignored for chunky (interleaved) images. * - * @param the index of the planar band to decode + * @param planarBand the index of the planar band to decode */ public void setPlanarBand(int planarBand) { this.planarBand = planarBand; } @@ -2069,7 +2069,7 @@ public abstract class TIFFDecompressor { *

            The default implementation calls {@code decodeRaw(byte[] b, * ...)} and copies the resulting data into {@code f}. * - * @param f a {@code double} array to be written. + * @param d a {@code double} array to be written. * @param dstOffset the starting offset in {@code f} to be * written. * @param bitsPerPixel the number of bits for each pixel. diff --git a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGDecompressor.java b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGDecompressor.java index 966ca9575d9..384687f8344 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGDecompressor.java +++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGDecompressor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -139,6 +139,7 @@ public class TIFFJPEGDecompressor extends TIFFDecompressor { JPEGReader.read(0, JPEGParam); } + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); JPEGReader.dispose(); diff --git a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFOldJPEGDecompressor.java b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFOldJPEGDecompressor.java index 2837754ddb2..67dd60f8a79 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFOldJPEGDecompressor.java +++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFOldJPEGDecompressor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -610,6 +610,7 @@ public class TIFFOldJPEGDecompressor extends TIFFJPEGDecompressor { JPEGReader.read(0, JPEGParam); } + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); JPEGReader.dispose(); diff --git a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriter.java b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriter.java index 8fd3a459fe1..90bc2c41ab2 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriter.java +++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -58,8 +58,6 @@ import com.sun.imageio.plugins.common.I18N; * * The encoding process may clip, subsample using the parameters * specified in the {@code ImageWriteParam}. - * - * @see com.sun.media.imageio.plugins.WBMPImageWriteParam */ public class WBMPImageWriter extends ImageWriter { /** The output stream to write into */ diff --git a/jdk/src/java.desktop/share/classes/com/sun/imageio/stream/StreamFinalizer.java b/jdk/src/java.desktop/share/classes/com/sun/imageio/stream/StreamFinalizer.java index 36954988f1b..be1e659ee6e 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/imageio/stream/StreamFinalizer.java +++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/stream/StreamFinalizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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,6 +60,7 @@ public class StreamFinalizer { this.stream = stream; } + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { try { stream.close(); diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKColorType.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKColorType.java index 1d619c1e984..85358c84185 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKColorType.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKColorType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, 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 @@ -138,9 +138,9 @@ public class GTKColorType extends ColorType { * arguments to scale. * * @param color Color to alter - * @param hFactory Amount to scale the hue + * @param hFactor Amount to scale the hue * @param lFactor Amount to scale the lightness - * @param sFactory Amount to sacle saturation + * @param sFactor Amount to sacle saturation * @return newly created color */ static Color adjustColor(Color color, float hFactor, float lFactor, diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKGraphicsUtils.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKGraphicsUtils.java index b1b30da2454..956726234ff 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKGraphicsUtils.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKGraphicsUtils.java @@ -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 @@ -82,7 +82,7 @@ class GTKGraphicsUtils extends SynthGraphicsUtils { * render the text as html nor will it offset by the insets of the * component. * - * @param ss SynthContext + * @param context SynthContext * @param g Graphics used to render string in. * @param text Text to render * @param bounds Bounds of the text to be drawn. diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java index 23c3f872fb6..2c45d6f1e3e 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java @@ -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 @@ -319,7 +319,7 @@ class GTKStyle extends SynthStyle implements GTKConstants { * insets will be placed in it, otherwise a new Insets object will be * created and returned. * - * @param context SynthContext identifying requestor + * @param state SynthContext identifying requestor * @param insets Where to place Insets * @return Insets. */ diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java index 16f56e2f9c9..f4d6c8e5146 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java @@ -236,7 +236,7 @@ public class MotifDesktopIconUI extends BasicDesktopIconUI } }); } - + @SuppressWarnings("deprecation") void forwardEventToParent(MouseEvent e) { getParent().dispatchEvent(new MouseEvent( getParent(), e.getID(), e.getWhen(), e.getModifiers(), @@ -329,7 +329,7 @@ public class MotifDesktopIconUI extends BasicDesktopIconUI } }); } - + @SuppressWarnings("deprecation") void forwardEventToParent(MouseEvent e) { getParent().dispatchEvent(new MouseEvent( getParent(), e.getID(), e.getWhen(), e.getModifiers(), diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java index 47bed21ffb8..c15a7b773cd 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -89,7 +89,6 @@ public class MotifGraphicsUtils implements SwingConstants * drawStringInRect() does not clip to the rectangle, but instead * uses this rectangle and the desired justification to compute the point * at which to begin drawing the text. - * @see #drawString */ public static void drawStringInRect(Graphics g, String aString, int x, int y, int width, int height, int justification) { @@ -139,10 +138,11 @@ public class MotifGraphicsUtils implements SwingConstants } /** - * This method is not being used to paint menu item since + * @deprecated This method is not being used to paint menu item since * 6.0 This code left for compatibility only. Do not use or * override it, this will not cause any visible effect. */ + @Deprecated(since = "9") public static void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java index 3d38e3b4b71..a12485928f5 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java @@ -361,7 +361,7 @@ public class MotifInternalFrameTitlePane } }); } - + @SuppressWarnings("deprecation") void forwardEventToParent(MouseEvent e) { getParent().dispatchEvent(new MouseEvent( getParent(), e.getID(), e.getWhen(), e.getModifiers(), diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java index 7c8fd8a7bca..dc459e81be5 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java @@ -523,7 +523,8 @@ public class MotifLookAndFeel extends BasicLookAndFeel Object optionPaneMessageAreaBorder = new BorderUIResource.EmptyBorderUIResource(10,10,12,10); - + @SuppressWarnings("deprecation") + final int metaMask = KeyEvent.META_MASK; Object[] defaults = { "Desktop.background", table.get("desktop"), @@ -635,8 +636,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel "Menu.submenuPopupOffsetX", -2, "Menu.submenuPopupOffsetY", 3, "Menu.shortcutKeys", new int[]{ - SwingUtilities2.getSystemMnemonicKeyMask(), - KeyEvent.META_MASK + SwingUtilities2.getSystemMnemonicKeyMask(), metaMask }, "Menu.cancelMode", "hideMenuTree", diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.java index 402bcc528b1..a0b182b8019 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.java @@ -107,6 +107,7 @@ public class MotifPopupMenuUI extends BasicPopupMenuUI { }; } + @SuppressWarnings("deprecation") public boolean isPopupTrigger(MouseEvent e) { return ((e.getID()==MouseEvent.MOUSE_PRESSED) && ((e.getModifiers() & MouseEvent.BUTTON3_MASK)!=0)); diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java index 208a96840f6..a2a85e9cbff 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java @@ -155,6 +155,7 @@ public class MotifTextUI { /** * Default bindings all keymaps implementing the Motif feel. */ + @SuppressWarnings("deprecation") static final JTextComponent.KeyBinding[] defaultBindings = { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, InputEvent.CTRL_MASK), diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java index eb47262b29c..10a9e358cd5 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java @@ -36,7 +36,6 @@ import java.awt.event.*; import javax.swing.*; - import com.sun.java.swing.plaf.windows.TMSchema.State; import static com.sun.java.swing.plaf.windows.TMSchema.State.*; import com.sun.java.swing.plaf.windows.TMSchema.Part; @@ -383,18 +382,25 @@ class AnimationController implements ActionListener, PropertyChangeListener { updateProgress(); if (! isDone()) { Graphics2D g = (Graphics2D) _g.create(); - skin.paintSkinRaw(g, dx, dy, dw, dh, startState); - float alpha; - if (isForward) { - alpha = progress; + if (skin.haveToSwitchStates()) { + skin.paintSkinRaw(g, dx, dy, dw, dh, state); + g.setComposite(AlphaComposite.SrcOver.derive(1 - progress)); + skin.paintSkinRaw(g, dx, dy, dw, dh, startState); } else { - alpha = 1 - progress; + skin.paintSkinRaw(g, dx, dy, dw, dh, startState); + float alpha; + if (isForward) { + alpha = progress; + } else { + alpha = 1 - progress; + } + g.setComposite(AlphaComposite.SrcOver.derive(alpha)); + skin.paintSkinRaw(g, dx, dy, dw, dh, state); } - g.setComposite(AlphaComposite.SrcOver.derive(alpha)); - skin.paintSkinRaw(g, dx, dy, dw, dh, state); g.dispose(); } else { skin.paintSkinRaw(_g, dx, dy, dw, dh, state); + skin.switchStates(false); } } boolean isDone() { diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/TMSchema.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/TMSchema.java index 0bca0dd2172..f45a077e91d 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/TMSchema.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/TMSchema.java @@ -121,6 +121,12 @@ class TMSchema { LBP_LISTBOX(Control.LISTBOX, 0), + LBCP_BORDER_HSCROLL (Control.LISTBOX, 1), + LBCP_BORDER_HVSCROLL (Control.LISTBOX, 2), + LBCP_BORDER_NOSCROLL (Control.LISTBOX, 3), + LBCP_BORDER_VSCROLL (Control.LISTBOX, 4), + LBCP_ITEM (Control.LISTBOX, 5), + LVP_LISTVIEW(Control.LISTVIEW, 0), PP_PROGRESS (Control.PROGRESS, 0), @@ -343,6 +349,12 @@ class TMSchema { stateMap.put(Part.HP_HEADERSORTARROW, new State[] {SORTEDDOWN, SORTEDUP}); + State[] listBoxStates = new State[] { NORMAL, PRESSED, HOT, DISABLED}; + stateMap.put(Part.LBCP_BORDER_HSCROLL, listBoxStates); + stateMap.put(Part.LBCP_BORDER_HVSCROLL, listBoxStates); + stateMap.put(Part.LBCP_BORDER_NOSCROLL, listBoxStates); + stateMap.put(Part.LBCP_BORDER_VSCROLL, listBoxStates); + State[] scrollBarStates = new State[] { NORMAL, HOT, PRESSED, DISABLED, HOVER }; stateMap.put(Part.SBP_SCROLLBAR, scrollBarStates); stateMap.put(Part.SBP_THUMBBTNVERT, scrollBarStates); diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java index 80217555bcb..c14f328c0fa 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java @@ -41,6 +41,7 @@ import static com.sun.java.swing.plaf.windows.XPStyle.Skin; import sun.swing.DefaultLookup; import sun.swing.StringUIClientPropertyKey; +import com.sun.java.swing.plaf.windows.WindowsBorders.DashedBorder; /** * Windows combo box. @@ -97,6 +98,9 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { } else if (source instanceof XPComboBoxButton) { rv = ((XPComboBoxButton) source) .getWindowsComboBoxUI().comboBox; + } else if (source instanceof JTextField && + ((JTextField) source).getParent() instanceof JComboBox) { + rv = (JComboBox) ((JTextField) source).getParent(); } return rv; } @@ -149,6 +153,8 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { //is initialized after installListeners is invoked comboBox.addMouseListener(rolloverListener); arrowButton.addMouseListener(rolloverListener); + // set empty border as default to see vista animated border + comboBox.setBorder(new EmptyBorder(0,0,0,0)); } } @@ -224,6 +230,9 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { state = State.DISABLED; } else if (isPopupVisible(comboBox)) { state = State.PRESSED; + } else if (comboBox.isEditable() + && comboBox.getEditor().getEditorComponent().isFocusOwner()) { + state = State.PRESSED; } else if (isRollover) { state = State.HOT; } @@ -242,7 +251,7 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { skin = xp.getSkin(c, Part.CP_READONLY); } if (skin == null) { - skin = xp.getSkin(c, Part.CP_COMBOBOX); + skin = xp.getSkin(c, Part.CP_BORDER); } skin.paintSkin(g, 0, 0, c.getWidth(), c.getHeight(), state); } @@ -330,11 +339,16 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { public Dimension getMinimumSize( JComponent c ) { Dimension d = super.getMinimumSize(c); if (XPStyle.getXP() != null) { - d.width += 5; + d.width += 7; + boolean isEditable = false; + if (c instanceof JComboBox) { + isEditable = ((JComboBox) c).isEditable(); + } + d.height += isEditable ? 4 : 6; } else { d.width += 4; + d.height += 2; } - d.height += 2; return d; } @@ -368,7 +382,7 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { } protected ComboPopup createPopup() { - return super.createPopup(); + return new WinComboPopUp(comboBox); } /** @@ -414,8 +428,10 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { @SuppressWarnings("serial") // Superclass is not serializable across versions private class XPComboBoxButton extends XPStyle.GlyphButton { + private State prevState = null; + public XPComboBoxButton(XPStyle xp) { - super(null, + super(comboBox, (! xp.isSkinDefined(comboBox, Part.CP_DROPDOWNBUTTONRIGHT)) ? Part.CP_DROPDOWNBUTTON : (comboBox.getComponentOrientation() == ComponentOrientation.RIGHT_TO_LEFT) @@ -428,18 +444,33 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { @Override protected State getState() { State rv; + + getModel().setPressed(comboBox.isPopupVisible()); + rv = super.getState(); XPStyle xp = XPStyle.getXP(); if (rv != State.DISABLED - && comboBox != null && ! comboBox.isEditable() - && xp != null && xp.isSkinDefined(comboBox, - Part.CP_DROPDOWNBUTTONRIGHT)) { + && comboBox != null && ! comboBox.isEditable() + && xp != null && xp.isSkinDefined(comboBox, + Part.CP_DROPDOWNBUTTONRIGHT)) { /* * for non editable ComboBoxes Vista seems to have the * same glyph for all non DISABLED states */ rv = State.NORMAL; } + if (rv == State.NORMAL && (prevState == State.HOT || prevState == State.PRESSED)) { + /* + * State NORMAL of combobox button cannot overpaint states HOT or PRESSED + * Therefore HOT state must be painted from alpha 1 to 0 and not as usual that + * NORMAL state is painted from alpha 0 to alpha 1. + */ + skin.switchStates(true); + } + if (rv != prevState) { + prevState = rv; + } + return rv; } @@ -484,6 +515,39 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { } } + @SuppressWarnings("serial") // Same-version serialization only + protected class WinComboPopUp extends BasicComboPopup { + private Skin listBoxBorder = null; + private XPStyle xp; + + public WinComboPopUp(JComboBox combo) { + super(combo); + xp = XPStyle.getXP(); + if (xp != null && xp.isSkinDefined(combo, Part.LBCP_BORDER_NOSCROLL)) { + this.listBoxBorder = new Skin(combo, Part.LBCP_BORDER_NOSCROLL); + this.setBorder(new EmptyBorder(1,1,1,1)); + } + } + + protected KeyListener createKeyListener() { + return new InvocationKeyHandler(); + } + + protected class InvocationKeyHandler extends BasicComboPopup.InvocationKeyHandler { + protected InvocationKeyHandler() { + WinComboPopUp.this.super(); + } + } + + protected void paintComponent(Graphics g) { + super.paintComponent(g); + if (this.listBoxBorder != null) { + this.listBoxBorder.paintSkinRaw(g, this.getX(), this.getY(), + this.getWidth(), this.getHeight(), State.HOT); + } + } + } + /** * Subclassed to highlight selected item in an editable combo box. @@ -498,6 +562,7 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { protected JTextField createEditorComponent() { JTextField editor = super.createEditorComponent(); Border border = (Border)UIManager.get("ComboBox.editorBorder"); + if (border != null) { editor.setBorder(border); } @@ -524,6 +589,31 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { private static final Object BORDER_KEY = new StringUIClientPropertyKey("BORDER_KEY"); private static final Border NULL_BORDER = new EmptyBorder(0, 0, 0, 0); + + // Create own version of DashedBorder with more space on left side + private class WindowsComboBoxDashedBorder extends DashedBorder { + + public WindowsComboBoxDashedBorder(Color color, int thickness) { + super(color, thickness); + } + + public WindowsComboBoxDashedBorder(Color color) { + super(color); + } + + @Override + public Insets getBorderInsets(Component c, Insets i) { + return new Insets(0,2,0,0); + } + } + + public WindowsComboBoxRenderer() { + super(); + + // correct space on the left side of text items in the combo popup list + Insets i = getBorder().getBorderInsets(this); + setBorder(new EmptyBorder(0, 2, 0, i.right)); + } /** * {@inheritDoc} */ @@ -542,7 +632,7 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { if (index == -1 && isSelected) { Border border = component.getBorder(); Border dashedBorder = - new WindowsBorders.DashedBorder(list.getForeground()); + new WindowsComboBoxDashedBorder(list.getForeground()); component.setBorder(dashedBorder); //store current border in client property if needed if (component.getClientProperty(BORDER_KEY) == null) { diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java index 598b0815ad0..fa50e94ec92 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java @@ -672,7 +672,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel "ComboBox.buttonHighlight", ControlHighlightColor, "ComboBox.selectionBackground", SelectionBackgroundColor, "ComboBox.selectionForeground", SelectionTextColor, - "ComboBox.editorBorder", new XPValue(new EmptyBorder(1,2,1,1), + "ComboBox.editorBorder", new XPValue(new EmptyBorder(1,4,1,1), new EmptyBorder(1,4,1,4)), "ComboBox.disabledBackground", new XPColorValue(Part.CP_COMBOBOX, State.DISABLED, diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java index 8f730949684..be22c7300da 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java @@ -165,8 +165,11 @@ public class WindowsRootPaneUI extends BasicRootPaneUI { } public boolean postProcessKeyEvent(KeyEvent ev) { - if(ev.isConsumed()) { - // do not manage consumed event + if(ev.isConsumed() && ev.getKeyCode() != KeyEvent.VK_ALT) { + // mnemonic combination, it's consumed, but we need + // set altKeyPressed to false, otherwise after selection + // component by mnemonic combination a menu will be open + altKeyPressed = false; return false; } if (ev.getKeyCode() == KeyEvent.VK_ALT) { diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java index 30f348d9770..eb8080ba3c9 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java @@ -63,6 +63,7 @@ public class WindowsTabbedPaneUI extends BasicTabbedPaneUI { private boolean contentOpaque = true; + @SuppressWarnings("deprecation") protected void installDefaults() { super.installDefaults(); contentOpaque = UIManager.getBoolean("TabbedPane.contentOpaque"); diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java index 0dbe039f54c..2c60209186f 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, 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 @@ -127,7 +127,7 @@ class XPStyle { * * @param part a Part * @param state a String - * @param attributeKey a String + * @param prop a String * @return a String or null if key is not found * in the current style * @@ -172,7 +172,6 @@ class XPStyle { /** Get a named Dimension value from the current style * - * @param key a String * @return a Dimension or null if key is not found * in the current style * @@ -189,7 +188,6 @@ class XPStyle { /** Get a named Point (e.g. a location or an offset) value * from the current style * - * @param key a String * @return a Point or null if key is not found * in the current style * @@ -205,7 +203,6 @@ class XPStyle { /** Get a named Insets value from the current style * - * @param key a String * @return an Insets object or null if key is not found * in the current style * @@ -223,7 +220,6 @@ class XPStyle { /** Get a named Color value from the current style * - * @param part a Part * @return a Color or null if key is not found * in the current style */ @@ -479,6 +475,7 @@ class XPStyle { private final String string; private Dimension size = null; + private boolean switchStates = false; Skin(Component component, Part part) { this(component, part, null); @@ -513,6 +510,14 @@ class XPStyle { return (insets != null) ? insets : new Insets(0, 0, 0, 0); } + boolean haveToSwitchStates() { + return switchStates; + } + + void switchStates(boolean b) { + switchStates = b; + } + private int getWidth(State state) { if (size == null) { size = getPartSize(part, state); @@ -689,7 +694,7 @@ class XPStyle { @SuppressWarnings("serial") // Superclass is not serializable across versions static class GlyphButton extends JButton { - private Skin skin; + protected Skin skin; public GlyphButton(Component parent, Part part) { XPStyle xp = getXP(); diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AbstractMidiDevice.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AbstractMidiDevice.java index 672b76f926b..bea9f5daf24 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AbstractMidiDevice.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AbstractMidiDevice.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -444,6 +444,7 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice * close this device if discarded by the garbage collector. */ @Override + @SuppressWarnings("deprecation") protected final void finalize() { close(); } diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AbstractMixer.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AbstractMixer.java index 7389e8dbeac..c040c558419 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AbstractMixer.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AbstractMixer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -90,7 +90,7 @@ abstract class AbstractMixer extends AbstractLine implements Mixer { /** * Constructs a new AbstractMixer. - * @param mixer the mixer with which this line is associated + * @param mixerInfo the mixer with which this line is associated * @param controls set of supported controls */ protected AbstractMixer(Mixer.Info mixerInfo, diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AudioSynthesizer.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AudioSynthesizer.java index b7d292a57e5..4f01291c22d 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AudioSynthesizer.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AudioSynthesizer.java @@ -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 @@ -27,6 +27,7 @@ package com.sun.media.sound; import java.util.Map; +import javax.sound.midi.MidiSystem; import javax.sound.midi.MidiUnavailableException; import javax.sound.midi.Synthesizer; import javax.sound.sampled.AudioFormat; diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java index 7553353153a..ef995f81294 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -163,7 +163,6 @@ abstract class SunFileReader extends AudioFileReader { * rllong * Protected helper method to read 64 bits and changing the order of * each bytes. - * @param DataInputStream * @return 32 bits swapped value. * @exception IOException */ @@ -187,7 +186,6 @@ abstract class SunFileReader extends AudioFileReader { /** * big2little * Protected helper method to swap the order of bytes in a 32 bit int - * @param int * @return 32 bits swapped value */ final int big2little(int i) { @@ -207,7 +205,6 @@ abstract class SunFileReader extends AudioFileReader { /** * rlshort * Protected helper method to read 16 bits value. Swap high with low byte. - * @param DataInputStream * @return the swapped value. * @exception IOException */ @@ -229,7 +226,6 @@ abstract class SunFileReader extends AudioFileReader { /** * big2little * Protected helper method to swap the order of bytes in a 16 bit short - * @param int * @return 16 bits swapped value */ final short big2littleShort(short i) { diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileWriter.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileWriter.java index 50b200fa75e..9e78425c865 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileWriter.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -69,7 +69,6 @@ abstract class SunFileWriter extends AudioFileWriter { * rllong * Protected helper method to read 64 bits and changing the order of * each bytes. - * @param DataInputStream * @return 32 bits swapped value. * @exception IOException */ @@ -93,7 +92,6 @@ abstract class SunFileWriter extends AudioFileWriter { /** * big2little * Protected helper method to swap the order of bytes in a 32 bit int - * @param int * @return 32 bits swapped value */ final int big2little(int i) { @@ -113,7 +111,6 @@ abstract class SunFileWriter extends AudioFileWriter { /** * rlshort * Protected helper method to read 16 bits value. Swap high with low byte. - * @param DataInputStream * @return the swapped value. * @exception IOException */ @@ -135,7 +132,6 @@ abstract class SunFileWriter extends AudioFileWriter { /** * big2little * Protected helper method to swap the order of bytes in a 16 bit short - * @param int * @return 16 bits swapped value */ final short big2littleShort(short i) { diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/Toolkit.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/Toolkit.java index 1b903a3bcf1..2105248c907 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/Toolkit.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/Toolkit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -54,7 +54,7 @@ public final class Toolkit { /** * Swaps bytes. - * @throws ArrayOutOfBoundsException if len is not a multiple of 2. + * @throws ArrayIndexOutOfBoundsException if len is not a multiple of 2. */ static void getByteSwapped(byte[] b, int off, int len) { diff --git a/jdk/src/java.desktop/share/classes/java/applet/AppletContext.java b/jdk/src/java.desktop/share/classes/java/applet/AppletContext.java index 3863aedb0e3..2a34faa6e77 100644 --- a/jdk/src/java.desktop/share/classes/java/applet/AppletContext.java +++ b/jdk/src/java.desktop/share/classes/java/applet/AppletContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -114,8 +114,13 @@ public interface AppletContext { * document is to be displayed. * The target argument is interpreted as follows: * - *
            - * + *
            Target ArgumentDescription
            + * + * + * + * + * + * * * - *
            Target arguments and their descriptions
            Target ArgumentDescription
            {@code "_self"} Show in the window and frame that * contain the applet.
            {@code "_parent"}Show in the applet's parent frame. If @@ -130,7 +135,8 @@ public interface AppletContext { * a target named name does not already exist, a * new top-level window with the specified name is created, * and the document is shown there.
            + *

          • *

            * An applet viewer or browser is free to ignore {@code showDocument}. * diff --git a/jdk/src/java.desktop/share/classes/java/applet/package-info.java b/jdk/src/java.desktop/share/classes/java/applet/package-info.java new file mode 100644 index 00000000000..351a58be015 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/applet/package-info.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides the classes necessary to create an applet and the classes an applet + * uses to communicate with its applet context. + *

            + * The applet framework involves two entities: the applet and the + * applet context. An applet is an embeddable window (see the Panel + * class) with a few extra methods that the applet context can use to + * initialize, start, and stop the applet. + *

            + * The applet context is an application that is responsible for loading and + * running applets. For example, the applet context could be a Web browser or an + * applet development environment. + *

            + * The APIs in this package are all deprecated. Alternative technologies such as + * Java Web Start or installable applications should be used instead. + * See JEP 289 and + * the Oracle White Paper + * + * "Migrating from Java Applets to plugin-free Java technologies" for more + * information. + * + * @since 1.0 + */ +package java.applet; diff --git a/jdk/src/java.desktop/share/classes/java/applet/package.html b/jdk/src/java.desktop/share/classes/java/applet/package.html deleted file mode 100644 index a95395b900e..00000000000 --- a/jdk/src/java.desktop/share/classes/java/applet/package.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - -Provides the classes necessary to create an applet and the classes an applet -uses to communicate with its applet context. -

            -The applet framework involves two -entities: the applet and the applet context. An applet is an -embeddable window (see the Panel class) with a few extra methods that the applet -context can use to initialize, start, and stop the applet. -

            -The applet context is an application that is responsible for loading and running -applets. For example, the applet context could be a Web browser or an applet -development environment. -

            -The APIs in this package are all deprecated. Alternative technologies such as Java Web Start -or installable applications should be used instead. See JEP 289 -and the Oracle White Paper -"Migrating from Java Applets to plugin-free Java technologies" for more information. -

            - - -@since 1.0 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java b/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java index 9250597ac81..fe0b169b467 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java @@ -292,8 +292,12 @@ public abstract class AWTEvent extends EventObject { /** * Constructs an AWTEvent object from the parameters of a 1.0-style event. + * * @param event the old-style event + * @deprecated It is recommended that {@link #AWTEvent(Object, int)} be used + * instead */ + @Deprecated(since = "9") public AWTEvent(Event event) { this(event.target, event.id); } @@ -436,6 +440,7 @@ public abstract class AWTEvent extends EventObject { * event class in java.awt.event because we don't want to make * it public and it needs to be called from java.awt. */ + @SuppressWarnings("deprecation") Event convertToOld() { Object src = getSource(); int newid = id; diff --git a/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java b/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java index 6e85f2b1bbf..8406294c5e9 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java +++ b/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -90,8 +90,13 @@ public class AWTKeyStroke implements Serializable { /** * Constructs an {@code AWTKeyStroke} with default values. * The default values used are: - * + * + *
            + * + * * + * + * * * * @@ -108,6 +113,7 @@ public class AWTKeyStroke implements Serializable { * * * + * *
            AWTKeyStroke default values
            PropertyDefault Value
            Key Char{@code KeyEvent.CHAR_UNDEFINED}On key release?{@code false}
            * * {@code AWTKeyStroke}s should not be constructed @@ -350,6 +356,7 @@ public class AWTKeyStroke implements Serializable { * @throws NullPointerException if {@code anEvent} is null * @return the {@code AWTKeyStroke} that precipitated the event */ + @SuppressWarnings("deprecation") public static AWTKeyStroke getAWTKeyStrokeForEvent(KeyEvent anEvent) { int id = anEvent.getID(); switch(id) { @@ -397,6 +404,7 @@ public class AWTKeyStroke implements Serializable { * @throws IllegalArgumentException if {@code s} is {@code null}, * or is formatted incorrectly */ + @SuppressWarnings("deprecation") public static AWTKeyStroke getAWTKeyStroke(String s) { if (s == null) { throw new IllegalArgumentException("String cannot be null"); @@ -708,6 +716,7 @@ public class AWTKeyStroke implements Serializable { } } + @SuppressWarnings("deprecation") private static int mapOldModifiers(int modifiers) { if ((modifiers & InputEvent.SHIFT_MASK) != 0) { modifiers |= InputEvent.SHIFT_DOWN_MASK; @@ -737,6 +746,7 @@ public class AWTKeyStroke implements Serializable { return modifiers; } + @SuppressWarnings("deprecation") private static int mapNewModifiers(int modifiers) { if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { modifiers |= InputEvent.SHIFT_MASK; diff --git a/jdk/src/java.desktop/share/classes/java/awt/AWTPermission.java b/jdk/src/java.desktop/share/classes/java/awt/AWTPermission.java index 5eedadb383b..c1a2b0baaf9 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/AWTPermission.java +++ b/jdk/src/java.desktop/share/classes/java/awt/AWTPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -44,13 +44,17 @@ import java.security.BasicPermission; * permission allows and a discussion of the risks of granting code * the permission. * - * + *
            + * + * * * * * * - * + * + * * * * @@ -182,6 +186,7 @@ import java.security.BasicPermission; * so that keyboard is emulated using the mouse, an applet may guess what * is being typed. * + * *
            AWTPermission target names, descriptions, and associated risks + *
            Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
            accessClipboardPosting and retrieval of information to and from the AWT clipboard
            * * @see java.security.BasicPermission diff --git a/jdk/src/java.desktop/share/classes/java/awt/AlphaComposite.java b/jdk/src/java.desktop/share/classes/java/awt/AlphaComposite.java index dc650632d08..5abb31fe62d 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/AlphaComposite.java +++ b/jdk/src/java.desktop/share/classes/java/awt/AlphaComposite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -73,8 +73,9 @@ import sun.java2d.SunCompositeContext; * equation in the Porter and Duff paper: * *

            - * - * * * * * * * * * * * * * * * * * * * * * * * * * * *
            Factor  Definition + * + * + *
            Factors
            Factor  Definition *
            Asthe alpha component of the source pixel *
            Csa color component of the source pixel in premultiplied form *
            Adthe alpha component of the destination pixel @@ -113,8 +114,9 @@ import sun.java2d.SunCompositeContext; * the blending equation in the Porter and Duff paper: * *
            - * - *
            Factor  Definition + * + * + * + *
            Factors
            Factor  Definition *
            Csr one of the raw color components of the source pixel *
            Cdr one of the raw color components of the destination pixel *
            Aac the "extra" alpha component from the AlphaComposite instance @@ -205,7 +207,7 @@ import sun.java2d.SunCompositeContext; * appropriate conversions are performed before and after the compositing * operation. * - *

            Implementation Caveats

            + *

            Implementation Caveats

            * *
              *
            • diff --git a/jdk/src/java.desktop/share/classes/java/awt/Component.java b/jdk/src/java.desktop/share/classes/java/awt/Component.java index dca2674c2fd..7c8a387499b 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Component.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -58,6 +58,7 @@ import java.security.AccessControlContext; import javax.accessibility.*; import java.applet.Applet; import javax.swing.JComponent; +import javax.swing.JRootPane; import sun.awt.ComponentFactory; import sun.security.action.GetPropertyAction; @@ -5036,6 +5037,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * * Returns whether or not event was dispatched to an ancestor */ + @SuppressWarnings("deprecation") boolean dispatchMouseWheelToAncestor(MouseWheelEvent e) { int newX, newY; newX = e.getX() + getX(); // Coordinates take into account at least @@ -6231,7 +6233,7 @@ public abstract class Component implements ImageObserver, MenuContainer, /** * Indicates whether a class or its superclasses override coalesceEvents. * Must be called with lock on coalesceMap and privileged. - * @see checkCoalescing + * @see #checkCoalescing */ private static boolean isCoalesceEventsOverriden(Class clazz) { assert Thread.holdsLock(coalesceMap); @@ -7235,12 +7237,17 @@ public abstract class Component implements ImageObserver, MenuContainer, * recommendations for Windows and Unix are listed below. These * recommendations are used in the Sun AWT implementations. * - * + *
              + * + * * * * * * + * + * * * * @@ -7256,6 +7263,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * * * + * *
              Recommended default values for a Component's focus traversal + * keys
              IdentifierMeaningDefault
              KeyboardFocusManager.FORWARD_TRAVERSAL_KEYSNormal forward keyboard traversalGo up one focus traversal cyclenone
              * * To disable a traversal key, use an empty Set; Collections.EMPTY_SET is @@ -10379,7 +10387,11 @@ public abstract class Component implements ImageObserver, MenuContainer, } /** - * Sets a 'mixing-cutout' shape for the given component. + * Sets a 'mixing-cutout' shape for this lightweight component. + * + * This method is used exclusively for the purposes of the + * Heavyweight/Lightweight Components Mixing feature and will + * have no effect if applied to a heavyweight component. * * By default a lightweight component is treated as an opaque rectangle for * the purposes of the Heavyweight/Lightweight Components Mixing feature. @@ -10392,7 +10404,7 @@ public abstract class Component implements ImageObserver, MenuContainer, *
            • {@code null} - reverts the default cutout shape (the rectangle equal * to the component's {@code getBounds()}) *
            • empty-shape - does not cut out anything from heavyweight - * components. This makes the given lightweight component effectively + * components. This makes this lightweight component effectively * transparent. Note that descendants of the lightweight component still * affect the shapes of heavyweight components. An example of an * empty-shape is {@code new Rectangle()}. @@ -10401,21 +10413,16 @@ public abstract class Component implements ImageObserver, MenuContainer, *
            *

            * The most common example when the 'mixing-cutout' shape is needed is a - * glass pane component. The {@link JRootPane#setGlassPane()} method + * glass pane component. The {@link JRootPane#setGlassPane} method * automatically sets the empty-shape as the 'mixing-cutout' shape * for the given glass pane component. If a developer needs some other * 'mixing-cutout' shape for the glass pane (which is rare), this must be * changed manually after installing the glass pane to the root pane. - *

            - * Note that the 'mixing-cutout' shape neither affects painting, nor the - * mouse events handling for the given component. It is used exclusively - * for the purposes of the Heavyweight/Lightweight Components Mixing - * feature. * * @param shape the new 'mixing-cutout' shape * @since 9 */ - void setMixingCutoutShape(Shape shape) { + public void setMixingCutoutShape(Shape shape) { Region region = shape == null ? null : Region.getInstance(shape, null); synchronized (getTreeLock()) { diff --git a/jdk/src/java.desktop/share/classes/java/awt/Container.java b/jdk/src/java.desktop/share/classes/java/awt/Container.java index 13d5e23ed1c..37f813df141 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Container.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Container.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -3064,12 +3064,17 @@ public class Container extends Component { * recommendations for Windows and Unix are listed below. These * recommendations are used in the Sun AWT implementations. * - * + *
            + * + * * * * * * + * + * * * * @@ -3086,10 +3091,11 @@ public class Container extends Component { * * * - * * * * + * *
            Recommended default values for a Container's focus traversal + * keys
            IdentifierMeaningDefault
            KeyboardFocusManager.FORWARD_TRAVERSAL_KEYSNormal forward keyboard traversalnone
            KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS + * KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYSGo down one focus traversal cyclenone
            * * To disable a traversal key, use an empty Set; Collections.EMPTY_SET is @@ -4728,6 +4734,7 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener { * Listen for drag events posted in other hw components so we can * track enter/exit regardless of where a drag originated */ + @SuppressWarnings("deprecation") public void eventDispatched(AWTEvent e) { boolean isForeignDrag = (e instanceof MouseEvent) && !(e instanceof SunDropTargetEvent) && @@ -4826,6 +4833,7 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener { * If the target has been removed, we don't bother to send the * message. */ + @SuppressWarnings("deprecation") void retargetMouseEvent(Component target, int id, MouseEvent e) { if (target == null) { return; // mouse is over another hw component or target is disabled diff --git a/jdk/src/java.desktop/share/classes/java/awt/Desktop.java b/jdk/src/java.desktop/share/classes/java/awt/Desktop.java index fac3def4de0..de415da2eb5 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Desktop.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Desktop.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -25,9 +25,12 @@ package java.awt; +import java.awt.desktop.AboutEvent; import java.awt.desktop.AboutHandler; import java.awt.desktop.OpenFilesHandler; +import java.awt.desktop.OpenURIEvent; import java.awt.desktop.OpenURIHandler; +import java.awt.desktop.PreferencesEvent; import java.awt.desktop.PreferencesHandler; import java.awt.desktop.PrintFilesHandler; import java.awt.desktop.QuitHandler; @@ -42,8 +45,9 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; -import sun.awt.SunToolkit; import javax.swing.JMenuBar; + +import sun.awt.SunToolkit; import sun.security.util.SecurityConstants; /** @@ -335,7 +339,7 @@ public class Desktop { * most of the platforms support the {@link Desktop.Action#OPEN} * action. But for a specific file, there may not be an * application registered to open it. In this case, {@link - * #isSupported} may return {@code true}, but the corresponding + * #isSupported(Action)} may return {@code true}, but the corresponding * action method will throw an {@link IOException}. * * @param action the specified {@link Action} @@ -720,7 +724,7 @@ public class Desktop { * default behavior. * * @param aboutHandler the handler to respond to the - * {@link java.awt.desktop.AboutHandler#handleAbout} )} message + * {@link java.awt.desktop.AboutHandler#handleAbout(AboutEvent)} message * * @throws SecurityException if a security manager exists and it * denies the @@ -828,7 +832,7 @@ public class Desktop { * open a URL. * * Setting the handler to {@code null} causes all - * {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} requests to be + * {@link OpenURIHandler#openURI(OpenURIEvent)} requests to be * enqueued until another handler is set. * * @implNote Please note that for Mac OS, notifications @@ -988,8 +992,6 @@ public class Desktop { /** * Sets the default menu bar to use when there are no active frames. * - * @implNote Aqua Look and Feel should be active to support this on Mac OS. - * * @param menuBar to use when no other frames are active * @throws SecurityException if a security manager exists and it denies the * {@code RuntimePermission("canProcessApplicationEvents")} permission. diff --git a/jdk/src/java.desktop/share/classes/java/awt/Event.java b/jdk/src/java.desktop/share/classes/java/awt/Event.java index b00b09876ea..da33b237625 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Event.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Event.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -24,8 +24,7 @@ */ package java.awt; -import java.awt.event.*; -import java.io.*; +import java.awt.event.KeyEvent; /** * NOTE: The {@code Event} class is obsolete and is @@ -56,9 +55,12 @@ import java.io.*; * {@code Event} class ({@code PGUP}, * {@code PGDN}, {@code F1}, {@code F2}, etc). * + * @deprecated It is recommended that {@code AWTEvent} and its subclasses be + * used instead * @author Sami Shaio * @since 1.0 */ +@Deprecated(since = "9") public class Event implements java.io.Serializable { private transient long data; diff --git a/jdk/src/java.desktop/share/classes/java/awt/EventQueue.java b/jdk/src/java.desktop/share/classes/java/awt/EventQueue.java index 6dc5fb44b58..47da0d31bf9 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/EventQueue.java +++ b/jdk/src/java.desktop/share/classes/java/awt/EventQueue.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -668,12 +668,16 @@ public class EventQueue { * dispatched depends upon the type of the event and the * type of the event's source object: * - * + *
            + * + * * * * * * + * + * * * * @@ -694,6 +698,7 @@ public class EventQueue { * * * + * *
            Event types, source types, and dispatch methods
            Event TypeSource TypeDispatched To
            ActiveEventAnyOtherNo action (ignored)
            * * @param event an instance of {@code java.awt.AWTEvent}, diff --git a/jdk/src/java.desktop/share/classes/java/awt/Font.java b/jdk/src/java.desktop/share/classes/java/awt/Font.java index 18046fd9ea3..2440a665c7c 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Font.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Font.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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,6 +41,7 @@ import java.security.AccessController; import java.security.PrivilegedExceptionAction; import java.text.AttributedCharacterIterator.Attribute; import java.text.CharacterIterator; +import java.util.EventListener; import java.util.Hashtable; import java.util.Locale; import java.util.Map; diff --git a/jdk/src/java.desktop/share/classes/java/awt/Graphics.java b/jdk/src/java.desktop/share/classes/java/awt/Graphics.java index 932a89d5ade..317a93fad22 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Graphics.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Graphics.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -1159,8 +1159,18 @@ public abstract class Graphics { /** * Disposes of this graphics context once it is no longer referenced. + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. * @see #dispose */ + @Deprecated(since="9") public void finalize() { dispose(); } diff --git a/jdk/src/java.desktop/share/classes/java/awt/Graphics2D.java b/jdk/src/java.desktop/share/classes/java/awt/Graphics2D.java index ec5f9bd73bb..ed6f406b2f0 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Graphics2D.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Graphics2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -78,7 +78,7 @@ import java.util.Map; *

            * When creating a {@code Graphics2D} object, the * {@code GraphicsConfiguration} - * specifies the default transform for + * specifies the default transform for * the target of the {@code Graphics2D} (a * {@link Component} or {@link Image}). This default transform maps the * user space coordinate system to screen and printer device coordinates @@ -129,7 +129,7 @@ import java.util.Map; * of their particular rendering processes are: *

              *
            1. - * {@code Shape} operations + * {@code Shape} operations *
                *
              1. * If the operation is a {@code draw(Shape)} operation, then @@ -160,7 +160,7 @@ import java.util.Map; * colors to render in device space. *
              *
            2. - * Text operations + * Text operations *
                *
              1. * The following steps are used to determine the set of glyphs required @@ -201,7 +201,7 @@ import java.util.Map; * the colors to render in device space. *
              *
            3. - * {@code Image} Operations + * {@code Image} Operations *
                *
              1. * The region of interest is defined by the bounding box of the source diff --git a/jdk/src/java.desktop/share/classes/java/awt/GridBagLayout.java b/jdk/src/java.desktop/share/classes/java/awt/GridBagLayout.java index 1ecf40840ea..9196ceb64b7 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/GridBagLayout.java +++ b/jdk/src/java.desktop/share/classes/java/awt/GridBagLayout.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -122,13 +122,16 @@ import java.util.Arrays; * are not. Baseline relative values are calculated relative to the * baseline. Valid values are: * - *
                + *
                + * + * * - * - * - * + * + * + * * + * + * * * * - *
                Absolute, relative and baseline values as described above

                Absolute Values

                Orientation Relative Values

                Baseline Relative Values

                Absolute Values

                Orientation Relative Values

                Baseline Relative Values

                *
                  @@ -169,7 +172,8 @@ import java.util.Arrays; *
                *
                + *
            *
            {@link GridBagConstraints#weightx}, * {@link GridBagConstraints#weighty} *
            Used to determine how to distribute space, which is @@ -197,13 +201,14 @@ import java.util.Arrays; *

            * The following figure shows a baseline layout and includes a * component that spans rows: - *

            - * + *
            + * + * * - *
            Baseline Layout
            * The following text describes this graphic (Figure 1). *
            + *
            * This layout consists of three components: *
            • A panel that starts in row 0 and ends in row 1. The panel * has a baseline-resize behavior of {@code CONSTANT_DESCENT} and has @@ -252,19 +257,20 @@ import java.util.Arrays; * left-to-right container and Figure 3 shows the layout for a horizontal, * right-to-left container. * - *
              - * + *
              + * + * * * - * + * * * * - *
              Figures
              * The preceding text describes this graphic (Figure 1). * * The preceding text describes this graphic (Figure 2). *
              Figure 2: Horizontal, Left-to-RightFigure 3: Horizontal, Right-to-Left
              + *
            *

            * Each of the ten components has the {@code fill} field * of its associated {@code GridBagConstraints} object diff --git a/jdk/src/java.desktop/share/classes/java/awt/GridLayout.java b/jdk/src/java.desktop/share/classes/java/awt/GridLayout.java index a5eab8ad9ab..9859215ddbc 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/GridLayout.java +++ b/jdk/src/java.desktop/share/classes/java/awt/GridLayout.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -55,20 +55,21 @@ package java.awt; * If the container's {@code ComponentOrientation} property is horizontal * and right-to-left, the example produces the output shown in Figure 2. * - * - * + *
            + * + * * * - * * * - * + * * * * diff --git a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java index 1e9e2f4bfd0..564d64f56de 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java +++ b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -415,6 +415,7 @@ public abstract class KeyboardFocusManager * Initializes a KeyboardFocusManager. */ public KeyboardFocusManager() { + @SuppressWarnings("deprecation") AWTKeyStroke[][] defaultFocusTraversalKeyStrokes = { { AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_TAB, 0, false), @@ -1038,12 +1039,16 @@ public abstract class KeyboardFocusManager * recommendations for Windows and Unix are listed below. These * recommendations are used in the Sun AWT implementations. * - *
            Figures
            Shows 6 buttons in rows of 2. Row 1 shows buttons 1 then 2.
  * Row 2 shows buttons 3 then 4. Row 3 shows buttons 5 then 6. * Shows 6 buttons in rows of 2. Row 1 shows buttons 2 then 1.
+ * <td style=Shows 6 buttons in rows of 2. Row 1 shows buttons 2 then 1.
  * Row 2 shows buttons 4 then 3. Row 3 shows buttons 6 then 5. *
            Figure 1: Horizontal, Left-to-RightFigure 2: Horizontal, Right-to-Left
            + *
            + * + * * * * * * + * + * * * * @@ -1066,6 +1071,7 @@ public abstract class KeyboardFocusManager * * * + * *
            Recommended default values for focus traversal keys
            IdentifierMeaningDefault
            {@code KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS}Normal forward keyboard traversalGo down one focus traversal cyclenone
            * * To disable a traversal key, use an empty {@code Set}; diff --git a/jdk/src/java.desktop/share/classes/java/awt/LinearGradientPaint.java b/jdk/src/java.desktop/share/classes/java/awt/LinearGradientPaint.java index ad70a60ac0a..179405dfd11 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/LinearGradientPaint.java +++ b/jdk/src/java.desktop/share/classes/java/awt/LinearGradientPaint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -91,10 +91,9 @@ import java.beans.ConstructorProperties; *

            * This image demonstrates the example code above for each * of the three cycle methods: - *

            + *

            * image showing the output of the example code - *

            * * @see java.awt.Paint * @see java.awt.Graphics2D#setPaint diff --git a/jdk/src/java.desktop/share/classes/java/awt/Menu.java b/jdk/src/java.desktop/share/classes/java/awt/Menu.java index 4bd1bba8a0e..acadfeb414e 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Menu.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Menu.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -29,7 +29,9 @@ import java.awt.event.KeyEvent; import java.awt.peer.MenuPeer; import java.io.IOException; import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.util.Enumeration; +import java.util.EventListener; import java.util.Vector; import javax.accessibility.Accessible; diff --git a/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java b/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java index 8d0d51d6360..6a6d3043bc4 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java +++ b/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -29,7 +29,9 @@ import java.awt.event.KeyEvent; import java.awt.peer.MenuBarPeer; import java.io.IOException; import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.util.Enumeration; +import java.util.EventListener; import java.util.Vector; import javax.accessibility.Accessible; @@ -44,7 +46,7 @@ import sun.awt.AWTAccessor; * the menu bar with a {@code Frame} object, call the * frame's {@code setMenuBar} method. *

            - * + * * This is what a menu bar might look like: *

            * 0); diff --git a/jdk/src/java.desktop/share/classes/java/awt/MenuShortcut.java b/jdk/src/java.desktop/share/classes/java/awt/MenuShortcut.java index 57526ff4e6d..0704b32c000 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/MenuShortcut.java +++ b/jdk/src/java.desktop/share/classes/java/awt/MenuShortcut.java @@ -180,6 +180,7 @@ public class MenuShortcut implements java.io.Serializable * @return a string representation of this MenuShortcut. * @since 1.1 */ + @SuppressWarnings("deprecation") public String toString() { int modifiers = 0; if (!GraphicsEnvironment.isHeadless()) { diff --git a/jdk/src/java.desktop/share/classes/java/awt/PaintContext.java b/jdk/src/java.desktop/share/classes/java/awt/PaintContext.java index faca59d2c8b..f1e93fd03cc 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/PaintContext.java +++ b/jdk/src/java.desktop/share/classes/java/awt/PaintContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,8 +25,10 @@ package java.awt; -import java.awt.image.Raster; +import java.awt.geom.AffineTransform; +import java.awt.geom.Rectangle2D; import java.awt.image.ColorModel; +import java.awt.image.Raster; /** * The {@code PaintContext} interface defines the encapsulated diff --git a/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java b/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java index 48460749d6e..7e8737a8310 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java +++ b/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java @@ -154,6 +154,7 @@ public class PopupMenu extends Menu { * parent's hierarchy * @exception RuntimeException if the parent is not showing on screen */ + @SuppressWarnings("deprecation") public void show(Component origin, int x, int y) { // Use localParent for thread safety. MenuContainer localParent = parent; diff --git a/jdk/src/java.desktop/share/classes/java/awt/PrintJob.java b/jdk/src/java.desktop/share/classes/java/awt/PrintJob.java index fcc6afebf2a..9012608584f 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/PrintJob.java +++ b/jdk/src/java.desktop/share/classes/java/awt/PrintJob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -79,8 +79,18 @@ public abstract class PrintJob { /** * Ends this print job once it is no longer referenced. + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. * @see #end */ + @Deprecated(since="9") public void finalize() { end(); } diff --git a/jdk/src/java.desktop/share/classes/java/awt/RadialGradientPaint.java b/jdk/src/java.desktop/share/classes/java/awt/RadialGradientPaint.java index a58fdf6b8ad..51bea64a373 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/RadialGradientPaint.java +++ b/jdk/src/java.desktop/share/classes/java/awt/RadialGradientPaint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -79,18 +79,18 @@ import java.beans.ConstructorProperties; * The gradient color proportions are equal for any particular line drawn * from the focus point. The following figure shows that the distance AB * is equal to the distance BC, and the distance AD is equal to the distance DE. - *

            + *

            * image showing the
  * distance AB=BC, and AD=DE - *

            + *

            * If the gradient and graphics rendering transforms are uniformly scaled and * the user sets the focus so that it coincides with the center of the circle, * the gradient color proportions are equal for any line drawn from the center. * The following figure shows the distances AB, BC, AD, and DE. They are all equal. - *

            + *

            * image showing the
  * distance of AB, BC, AD, and DE are all equal - *

            + *

            * Note that some minor variations in distances may occur due to sampling at * the granularity of a pixel. * If no cycle method is specified, {@code NO_CYCLE} will be chosen by @@ -116,11 +116,9 @@ import java.beans.ConstructorProperties; *

            * This image demonstrates the example code above, with default * (centered) focus for each of the three cycle methods: - *

            + *

            * image showing the
  * output of the sameple code - *

            - * *

            * It is also possible to specify a non-centered focus point, as * in the following code: @@ -139,10 +137,9 @@ import java.beans.ConstructorProperties; *

            * This image demonstrates the previous example code, with non-centered * focus for each of the three cycle methods: - *

            + *

            * image showing the
  * output of the sample code - *

            * * @see java.awt.Paint * @see java.awt.Graphics2D#setPaint diff --git a/jdk/src/java.desktop/share/classes/java/awt/Rectangle.java b/jdk/src/java.desktop/share/classes/java/awt/Rectangle.java index fcc5cf3c729..ecc531c1473 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Rectangle.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Rectangle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -39,7 +39,7 @@ import java.beans.Transient; * that create a {@code Rectangle}, and the methods that can modify * one, do not prevent setting a negative value for width or height. *

            - * + * * A {@code Rectangle} whose width or height is exactly zero has location * along those axes with zero dimension, but is otherwise considered empty. * The {@link #isEmpty} method will return true for such a {@code Rectangle}. @@ -49,7 +49,7 @@ import java.beans.Transient; * will include the location of the {@code Rectangle} on that axis in the * result as if the {@link #add(Point)} method were being called. *

            - * + * * A {@code Rectangle} whose width or height is negative has neither * location nor dimension along those axes with negative dimensions. * Such a {@code Rectangle} is treated as non-existent along those axes. diff --git a/jdk/src/java.desktop/share/classes/java/awt/Robot.java b/jdk/src/java.desktop/share/classes/java/awt/Robot.java index 8483ed35297..1f24684d093 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Robot.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Robot.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -27,6 +27,9 @@ package java.awt; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; +import java.awt.geom.AffineTransform; +import java.awt.image.BaseMultiResolutionImage; +import java.awt.image.MultiResolutionImage; import java.awt.image.BufferedImage; import java.awt.image.DataBufferInt; import java.awt.image.DirectColorModel; @@ -38,6 +41,7 @@ import sun.awt.AWTPermissions; import sun.awt.ComponentFactory; import sun.awt.SunToolkit; import sun.awt.image.SunWritableRaster; +import sun.swing.SwingUtilities2; /** * This class is used to generate native system input events @@ -95,15 +99,14 @@ public class Robot { /** * Creates a Robot for the given screen device. Coordinates passed - * to Robot method calls like mouseMove and createScreenCapture will - * be interpreted as being in the same coordinate system as the - * specified screen. Note that depending on the platform configuration, - * multiple screens may either: + * to Robot method calls like mouseMove, getPixelColor and + * createScreenCapture will be interpreted as being in the same coordinate + * system as the specified screen. Note that depending on the platform + * configuration, multiple screens may either: *

            - * This constructor is meant for the latter case. *

            * If screen devices are reconfigured such that the coordinate system is * affected, the behavior of existing Robot objects is undefined. @@ -137,6 +140,7 @@ public class Robot { initLegalButtonMask(); } + @SuppressWarnings("deprecation") private static synchronized void initLegalButtonMask() { if (LEGAL_BUTTON_MASK != 0) return; @@ -390,6 +394,11 @@ public class Robot { * @return Color of the pixel */ public synchronized Color getPixelColor(int x, int y) { + AffineTransform tx = GraphicsEnvironment. + getLocalGraphicsEnvironment().getDefaultScreenDevice(). + getDefaultConfiguration().getDefaultTransform(); + x = (int) (x * tx.getScaleX()); + y = (int) (y * tx.getScaleY()); Color color = new Color(peer.getRGBPixel(x, y)); return color; } @@ -405,13 +414,70 @@ public class Robot { * @see AWTPermission */ public synchronized BufferedImage createScreenCapture(Rectangle screenRect) { + return createCompatibleImage(screenRect, false)[0]; + } + + /** + * Creates an image containing pixels read from the screen. + * This image does not include the mouse cursor. + * This method can be used in case there is a scaling transform + * from user space to screen (device) space. + * Typically this means that the display is a high resolution screen, + * although strictly it means any case in which there is such a transform. + * Returns a {@link java.awt.image.MultiResolutionImage}. + *

            + * For a non-scaled display, the {@code MultiResolutionImage} + * will have one image variant: + *

              + *
            • Base Image with user specified size. + *
            + *

            + * For a high resolution display where there is a scaling transform, + * the {@code MultiResolutionImage} will have two image variants: + *

              + *
            • Base Image with user specified size. This is scaled from the screen. + *
            • Native device resolution image with device size pixels. + *
            + *

            + * Example: + *

            {@code
            +     *      Image nativeResImage;
            +     *      MultiResolutionImage mrImage = robot.createMultiResolutionScreenCapture(frame.getBounds());
            +     *      List resolutionVariants = mrImage.getResolutionVariants();
            +     *      if (resolutionVariants.size() > 1) {
            +     *          nativeResImage = resolutionVariants.get(1);
            +     *      } else {
            +     *          nativeResImage = resolutionVariants.get(0);
            +     *      }
            +     * }
            + * @param screenRect Rect to capture in screen coordinates + * @return The captured image + * @throws IllegalArgumentException if {@code screenRect} width and height are not greater than zero + * @throws SecurityException if {@code readDisplayPixels} permission is not granted + * @see SecurityManager#checkPermission + * @see AWTPermission + * + * @since 9 + */ + public synchronized MultiResolutionImage + createMultiResolutionScreenCapture(Rectangle screenRect) { + + return new BaseMultiResolutionImage( + createCompatibleImage(screenRect, true)); + } + + private synchronized BufferedImage[] + createCompatibleImage(Rectangle screenRect, boolean isHiDPI) { + checkScreenCaptureAllowed(); checkValidRect(screenRect); - BufferedImage image; + BufferedImage lowResolutionImage; + BufferedImage highResolutionImage; DataBufferInt buffer; WritableRaster raster; + BufferedImage[] imageArray; if (screenCapCM == null) { /* @@ -421,31 +487,98 @@ public class Robot { */ screenCapCM = new DirectColorModel(24, - /* red mask */ 0x00FF0000, - /* green mask */ 0x0000FF00, - /* blue mask */ 0x000000FF); + /* red mask */ 0x00FF0000, + /* green mask */ 0x0000FF00, + /* blue mask */ 0x000000FF); } + int[] bandmasks = new int[3]; + bandmasks[0] = screenCapCM.getRedMask(); + bandmasks[1] = screenCapCM.getGreenMask(); + bandmasks[2] = screenCapCM.getBlueMask(); + // need to sync the toolkit prior to grabbing the pixels since in some // cases rendering to the screen may be delayed Toolkit.getDefaultToolkit().sync(); + GraphicsConfiguration gc = GraphicsEnvironment + .getLocalGraphicsEnvironment() + .getDefaultScreenDevice(). + getDefaultConfiguration(); + gc = SwingUtilities2.getGraphicsConfigurationAtPoint( + gc, screenRect.getCenterX(), screenRect.getCenterY()); + + AffineTransform tx = gc.getDefaultTransform(); + double uiScaleX = tx.getScaleX(); + double uiScaleY = tx.getScaleY(); int pixels[]; - int[] bandmasks = new int[3]; - pixels = peer.getRGBPixels(screenRect); - buffer = new DataBufferInt(pixels, pixels.length); + if (uiScaleX == 1 && uiScaleY == 1) { - bandmasks[0] = screenCapCM.getRedMask(); - bandmasks[1] = screenCapCM.getGreenMask(); - bandmasks[2] = screenCapCM.getBlueMask(); + pixels = peer.getRGBPixels(screenRect); + buffer = new DataBufferInt(pixels, pixels.length); - raster = Raster.createPackedRaster(buffer, screenRect.width, screenRect.height, screenRect.width, bandmasks, null); - SunWritableRaster.makeTrackable(buffer); + bandmasks[0] = screenCapCM.getRedMask(); + bandmasks[1] = screenCapCM.getGreenMask(); + bandmasks[2] = screenCapCM.getBlueMask(); - image = new BufferedImage(screenCapCM, raster, false, null); + raster = Raster.createPackedRaster(buffer, screenRect.width, + screenRect.height, screenRect.width, bandmasks, null); + SunWritableRaster.makeTrackable(buffer); - return image; + highResolutionImage = new BufferedImage(screenCapCM, raster, + false, null); + imageArray = new BufferedImage[1]; + imageArray[0] = highResolutionImage; + + } else { + + int sX = (int) Math.floor(screenRect.x * uiScaleX); + int sY = (int) Math.floor(screenRect.y * uiScaleY); + int sWidth = (int) Math.ceil(screenRect.width * uiScaleX); + int sHeight = (int) Math.ceil(screenRect.height * uiScaleY); + int temppixels[]; + Rectangle scaledRect = new Rectangle(sX, sY, sWidth, sHeight); + temppixels = peer.getRGBPixels(scaledRect); + + // HighResolutionImage + pixels = temppixels; + buffer = new DataBufferInt(pixels, pixels.length); + raster = Raster.createPackedRaster(buffer, scaledRect.width, + scaledRect.height, scaledRect.width, bandmasks, null); + SunWritableRaster.makeTrackable(buffer); + + highResolutionImage = new BufferedImage(screenCapCM, raster, + false, null); + + + // LowResolutionImage + lowResolutionImage = new BufferedImage(screenRect.width, + screenRect.height, highResolutionImage.getType()); + Graphics2D g = lowResolutionImage.createGraphics(); + g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, + RenderingHints.VALUE_INTERPOLATION_BILINEAR); + g.setRenderingHint(RenderingHints.KEY_RENDERING, + RenderingHints.VALUE_RENDER_QUALITY); + g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + g.drawImage(highResolutionImage, 0, 0, + screenRect.width, screenRect.height, + 0, 0, scaledRect.width, scaledRect.height, null); + g.dispose(); + + if(!isHiDPI) { + imageArray = new BufferedImage[1]; + imageArray[0] = lowResolutionImage; + } else { + imageArray = new BufferedImage[2]; + imageArray[0] = lowResolutionImage; + imageArray[1] = highResolutionImage; + } + + } + + return imageArray; } private static void checkValidRect(Rectangle rect) { diff --git a/jdk/src/java.desktop/share/classes/java/awt/Scrollbar.java b/jdk/src/java.desktop/share/classes/java/awt/Scrollbar.java index 7bec1ef7956..c6b37805e29 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Scrollbar.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Scrollbar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -296,12 +296,16 @@ public class Scrollbar extends Component implements Adjustable, Accessible { * The default properties of the scroll bar are listed in * the following table: * - * + *
            + * + * * * * * * + * + * * * * * * + * *
            Scrollbar default properties
            PropertyDescriptionDefault Value
            orientationindicates whether the scroll bar is vertical @@ -347,6 +351,7 @@ public class Scrollbar extends Component implements Adjustable, Accessible { *
            on either side of the bubble
            10
            * * @exception HeadlessException if GraphicsEnvironment.isHeadless() diff --git a/jdk/src/java.desktop/share/classes/java/awt/Shape.java b/jdk/src/java.desktop/share/classes/java/awt/Shape.java index 209063c46a2..d8c385f200c 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Shape.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Shape.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -43,7 +43,7 @@ import java.awt.geom.Rectangle2D; * object that describes the trajectory path of the {@code Shape} * outline. *

            - * Definition of insideness: + * Definition of insideness: * A point is considered to lie inside a * {@code Shape} if and only if: *

              diff --git a/jdk/src/java.desktop/share/classes/java/awt/SystemTray.java b/jdk/src/java.desktop/share/classes/java/awt/SystemTray.java index 46ed1ff807c..c5c5507a2e9 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/SystemTray.java +++ b/jdk/src/java.desktop/share/classes/java/awt/SystemTray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -25,15 +25,17 @@ package java.awt; -import java.util.Vector; +import java.awt.event.ActionListener; import java.awt.peer.SystemTrayPeer; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; -import sun.awt.AppContext; -import sun.awt.SunToolkit; -import sun.awt.HeadlessToolkit; +import java.util.Vector; + import sun.awt.AWTAccessor; import sun.awt.AWTPermissions; +import sun.awt.AppContext; +import sun.awt.HeadlessToolkit; +import sun.awt.SunToolkit; /** * The {@code SystemTray} class represents the system tray for a @@ -366,11 +368,15 @@ public class SystemTray { * Adds a {@code PropertyChangeListener} to the list of listeners for the * specific property. The following properties are currently supported: * - * + *
              + * + * * * * * + * + * * * * * + * *
              SystemTray properties
              PropertyDescription
              {@code trayIcons}The {@code SystemTray}'s array of {@code TrayIcon} objects. @@ -387,6 +393,7 @@ public class SystemTray { * when the system tray becomes available or unavailable on the desktop.
              * The property is accessed by the {@link #getSystemTray} method.
              *

              * The {@code listener} listens to property changes only in this context. diff --git a/jdk/src/java.desktop/share/classes/java/awt/Taskbar.java b/jdk/src/java.desktop/share/classes/java/awt/Taskbar.java index 112ccb59001..82a64d0f380 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Taskbar.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Taskbar.java @@ -274,6 +274,10 @@ public class Taskbar { /** * Requests user attention to the specified window. * + * Has no effect if a window representation is not displayable in + * the task area. Whether it is displayable is dependent on all + * of window type, platform, and implementation. + * * @param w window * @throws SecurityException if a security manager exists and it denies the * {@code RuntimePermission("canProcessApplicationEvents")} permission. @@ -375,6 +379,10 @@ public class Taskbar { * for the specified window. * It may be disabled by system settings. * + * Has no effect if a window representation is not displayable in + * the task area. Whether it is displayable is dependent on all + * of window type, platform, and implementation. + * * @param w window to update * @param badge image to affix to the icon * @throws SecurityException if a security manager exists and it denies the @@ -409,6 +417,11 @@ public class Taskbar { /** * Displays a determinate progress bar in the task area for the specified * window. + * + * Has no effect if a window representation is not displayable in + * the task area. Whether it is displayable is dependent on all + * of window type, platform, and implementation. + * *
              * The visual behavior is platform and {@link State} dependent. *
              @@ -437,6 +450,10 @@ public class Taskbar { /** * Sets a progress state for a specified window. + * + * Has no effect if a window representation is not displayable in + * the task area. Whether it is displayable is dependent on all + * of window type, platform, and implementation. *
              * Each state displays a progress in a platform-dependent way. *
              diff --git a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java index f4bfd11072e..baa74568fcb 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -451,7 +451,7 @@ public abstract class Toolkit { * * @param s the error message * @param e the original exception - * @throws the new AWTError including the cause (the original exception) + * @throws AWTError the new AWTError including the cause (the original exception) */ private static void newAWTError(Throwable e, String s) { AWTError newAWTError = new AWTError(s); @@ -1067,6 +1067,7 @@ public abstract class Toolkit { * @see java.awt.MenuShortcut * @since 1.1 */ + @SuppressWarnings("deprecation") public int getMenuShortcutKeyMask() throws HeadlessException { GraphicsEnvironment.checkHeadless(); diff --git a/jdk/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java b/jdk/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java index 3adc80fa59f..f3c11c0b4ce 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java +++ b/jdk/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -751,7 +751,17 @@ public class ICC_Profile implements Serializable { /** * Frees the resources associated with an ICC_Profile object. + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") protected void finalize () { if (cmmProfile != null) { CMSManager.getModule().freeProfile(cmmProfile); @@ -1071,7 +1081,7 @@ public class ICC_Profile implements Serializable { * when loading this profile. * If deferring is enabled, then the deferred activation * code will take care of access privileges. - * @see activateDeferredProfile() + * @see #activateDeferredProfile() */ static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) { if (!ProfileDeferralMgr.deferring) { @@ -1864,7 +1874,8 @@ public class ICC_Profile implements Serializable { return PCMM.class.getResourceAsStream("profiles/" + fileName); } - }, null, new FilePermission("<>", "read")); + }, null, new FilePermission("<>", "read"), + new RuntimePermission("accessSystemModules")); } /** diff --git a/jdk/src/java.desktop/share/classes/java/awt/color/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/color/package-info.java new file mode 100644 index 00000000000..ea9d72f7e05 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/color/package-info.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes for color spaces. It contains an implementation of a color + * space based on the International Color Consortium (ICC) Profile Format + * Specification, Version 3.4, August 15, 1997. It also contains color profiles + * based on the ICC Profile Format Specification. + * + * @since 1.2 + */ +package java.awt.color; diff --git a/jdk/src/java.desktop/share/classes/java/awt/color/package.html b/jdk/src/java.desktop/share/classes/java/awt/color/package.html deleted file mode 100644 index 41fa95a2f8d..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/color/package.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - -Provides classes for color spaces. It contains an -implementation of a color space based on the International Color -Consortium (ICC) Profile Format Specification, Version 3.4, August 15, -1997. It also contains color profiles based on the ICC Profile Format -Specification. - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppForegroundEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppForegroundEvent.java index 9d7107b84db..d5442b5b18f 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppForegroundEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppForegroundEvent.java @@ -30,8 +30,8 @@ package java.awt.desktop; * Event sent when the application has become the foreground app, and when it is * no longer the foreground app. * - * @see AppForegroundListener#appRaisedToForeground(AppEvent.AppForegroundEvent) - * @see AppForegroundListener#appMovedToBackground(AppEvent.AppForegroundEvent) + * @see AppForegroundListener#appRaisedToForeground(AppForegroundEvent) + * @see AppForegroundListener#appMovedToBackground(AppForegroundEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppHiddenEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppHiddenEvent.java index 1a41cc271a3..39ac364ce63 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppHiddenEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppHiddenEvent.java @@ -29,8 +29,8 @@ package java.awt.desktop; /** * Event sent when the application has been hidden or shown. * - * @see AppHiddenListener#appHidden(AppEvent.AppHiddenEvent) - * @see AppHiddenListener#appUnhidden(AppEvent.AppHiddenEvent) + * @see AppHiddenListener#appHidden(AppHiddenEvent) + * @see AppHiddenListener#appUnhidden(AppHiddenEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppReopenedEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppReopenedEvent.java index 2e7f9f14be6..526cd872de8 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppReopenedEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppReopenedEvent.java @@ -29,7 +29,7 @@ package java.awt.desktop; /** * Event sent when the application is asked to re-open itself. * - * @see AppReopenedListener#appReopened(AppEvent.AppReopenedEvent) + * @see AppReopenedListener#appReopened(AppReopenedEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java index aa9b8aa82ad..5989a1b1f6e 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -42,7 +42,6 @@ public class FilesEvent extends AppEvent { /** * Constructs a {@code FilesEvent} * @param files files - * @param searchTerm searchTerm */ FilesEvent(final List files) { this.files = files; diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/OpenURIEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/OpenURIEvent.java index 61b0aae7ee2..d29ce26ef45 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/OpenURIEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/OpenURIEvent.java @@ -31,7 +31,7 @@ import java.net.URI; /** * Event sent when the app is asked to open a {@code URI}. * - * @see OpenURIHandler#openURI(AppEvent.OpenURIEvent) + * @see OpenURIHandler#openURI(OpenURIEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/PrintFilesEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/PrintFilesEvent.java index 0ec9d006395..c3e5a46c328 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/PrintFilesEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/PrintFilesEvent.java @@ -33,7 +33,7 @@ import java.util.List; /** * Event sent when the app is asked to print a list of files. * - * @see PrintFilesHandler#printFiles(AppEvent.PrintFilesEvent) + * @see PrintFilesHandler#printFiles(PrintFilesEvent) * @since 9 */ public final class PrintFilesEvent extends FilesEvent { diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/QuitEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/QuitEvent.java index ea9f4b48d7c..c0e1bd4b217 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/QuitEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/QuitEvent.java @@ -28,7 +28,7 @@ package java.awt.desktop; /** * Event sent when the application is asked to quit. * - * @see QuitHandler#handleQuitRequestWith(AppEvent.QuitEvent, QuitResponse) + * @see QuitHandler#handleQuitRequestWith(QuitEvent, QuitResponse) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepEvent.java index 880187878e8..3f6505ccad0 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepEvent.java @@ -28,8 +28,8 @@ package java.awt.desktop; * Event sent when the displays attached to the system enter and exit power save * sleep. * - * @see ScreenSleepListener#screenAboutToSleep(AppEvent.ScreenSleepEvent) - * @see ScreenSleepListener#screenAwoke(AppEvent.ScreenSleepEvent) + * @see ScreenSleepListener#screenAboutToSleep(ScreenSleepEvent) + * @see ScreenSleepListener#screenAwoke(ScreenSleepEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/SystemSleepEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/SystemSleepEvent.java index b9fab3bd137..b38b76d710b 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/SystemSleepEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/SystemSleepEvent.java @@ -28,8 +28,8 @@ package java.awt.desktop; /** * Event sent when the system enters and exits power save sleep. * - * @see SystemSleepListener#systemAboutToSleep(AppEvent.SystemSleepEvent) - * @see SystemSleepListener#systemAwoke(AppEvent.SystemSleepEvent) + * @see SystemSleepListener#systemAboutToSleep(SystemSleepEvent) + * @see SystemSleepListener#systemAwoke(SystemSleepEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/UserSessionEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/UserSessionEvent.java index 5daca855d3e..aaf1ceace16 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/UserSessionEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/UserSessionEvent.java @@ -29,8 +29,8 @@ package java.awt.desktop; * * Some systems may provide a reason of a user session change. * - * @see UserSessionListener#userSessionActivated(AppEvent.UserSessionEvent) - * @see UserSessionListener#userSessionDeactivated(AppEvent.UserSessionEvent) + * @see UserSessionListener#userSessionActivated(UserSessionEvent) + * @see UserSessionListener#userSessionDeactivated(UserSessionEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/package-info.java new file mode 100644 index 00000000000..7f74a1f2ed7 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/package-info.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces and classes for interaction with various desktop + * capabilities. + * + * @since 9 + */ +package java.awt.desktop; diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/package.html b/jdk/src/java.desktop/share/classes/java/awt/desktop/package.html deleted file mode 100644 index c0043f4fc64..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/package.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - -Provides interfaces and classes for interaction with various -desktop capabilities. - -@since 9 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceContext.java b/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceContext.java index 63ceb3f1706..1de393a51cb 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceContext.java +++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -65,7 +65,7 @@ import sun.awt.ComponentFactory; * itself between the platform and the * listeners provided by the initiator of the drag operation. *

              - * + * * By default, {@code DragSourceContext} sets the cursor as appropriate * for the current state of the drag and drop operation. For example, if * the user has chosen {@linkplain DnDConstants#ACTION_MOVE the move action}, diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceDragEvent.java b/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceDragEvent.java index b8d89d2b575..141603f1320 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceDragEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceDragEvent.java @@ -281,6 +281,7 @@ public class DragSourceDragEvent extends DragSourceEvent { * The mouse modifiers have higher priority than overlaying key * modifiers. */ + @SuppressWarnings("deprecation") private void setNewModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_DOWN_MASK; @@ -305,6 +306,7 @@ public class DragSourceDragEvent extends DragSourceEvent { /** * Sets old modifiers by the new ones. */ + @SuppressWarnings("deprecation") private void setOldModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_MASK; diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/dnd/package-info.java new file mode 100644 index 00000000000..c9561defd87 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/package-info.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Drag and Drop is a direct manipulation gesture found in many Graphical User + * Interface systems that provides a mechanism to transfer information between + * two entities logically associated with presentation elements in the GUI. + * Normally driven by a physical gesture of a human user using an appropriate + * input device, Drag and Drop provides both a mechanism to enable continuous + * feedback regarding the possible outcome of any subsequent data transfer to + * the user during navigation over the presentation elements in the GUI, and the + * facilities to provide for any subsequent data negotiation and transfer. + *

              + * This package defines the classes and interfaces necessary to perform Drag and + * Drop operations in Java. It defines classes for the drag-source and the + * drop-target, as well as events for transferring the data being dragged. This + * package also provides a means for giving visual feedback to the user + * throughout the duration of the Drag and Drop operation. + *

              + * A typical Drag and Drop operation can be decomposed into the following states + * (not entirely sequentially): + *

                + *
              • A {@code DragSource} comes into existence, associated with some + * presentation element ({@code Component}) in the GUI, to initiate a Drag + * and Drop of some potentially {@code Transferable} data.
              • + *
              • 1 or more {@code DropTarget}(s) come into/go out of existence, + * associated with presentation elements in the GUI (Components), + * potentially capable of consuming {@code Transferable} data types.
              • + *
              • A {@code DragGestureRecognizer} is obtained from the + * {@code DragSource} and is associated with a {@code Component} in order to + * track and identify any Drag initiating gesture by the user over the + * {@code Component}.
              • + *
              • A user makes a Drag gesture over the {@code Component}, which the + * registered {@code DragGestureRecognizer} detects, and notifies its + * {@code DragGestureListener} of. + *

                + * Note: Although this API consistently refers to the stimulus for a drag + * and drop operation being a physical gesture by a human user, this does + * not preclude a programmatically driven DnD operation given the + * appropriate implementation of a {@code DragSource}. This package + * contains the abstract class {@code MouseDragGestureRecognizer} for + * recognizing mouse device gestures. Other abstract subclasses may be + * provided by the platform to support other input devices or particular + * {@code Component} class semantics.

              • + *
              • The {@code DragGestureListener} causes the {@code DragSource} to + * initiate the Drag and Drop operation on behalf of the user, perhaps + * animating the GUI Cursor and/or rendering an {@code Image} of the item(s) + * that are the subject of the operation.
              • + *
              • As the user gestures navigate over {@code Component}(s) in the GUI + * with associated {@code DropTarget}(s), the {@code DragSource} receives + * notifications in order to provide "Drag Over" feedback effects, and the + * {@code DropTarget}(s) receive notifications in order to provide + * "Drag Under" feedback effects based upon the operation(s) supported and + * the data type(s) involved.
              • + *
              + *

              + * The gesture itself moves a logical cursor across the GUI hierarchy, + * intersecting the geometry of GUI Component(s), possibly resulting in the + * logical "Drag" cursor entering, crossing, and subsequently leaving + * {@code Component}(s) and associated {@code DropTarget}(s). + *

              + * The {@code DragSource} object manifests "Drag Over" feedback to the user, in + * the typical case by animating the GUI {@code Cursor} associated with the + * logical cursor. + *

              + * {@code DropTarget} objects manifest "Drag Under" feedback to the user, in the + * typical case, by rendering animations into their associated GUI + * {@code Component}(s) under the GUI Cursor. + *

              + * The determination of the feedback effects, and the ultimate success or + * failure of the data transfer, should one occur, is parameterized as follows: + *

                + *
              • By the transfer "operation" selected by the user, and supported by + * both the {@code DragSource} and {@code DropTarget}: Copy, Move or + * Reference(link).
              • + *
              • By the intersection of the set of data types provided by the + * {@code DragSource} and the set of data types comprehensible by the + * {@code DropTarget}.
              • + *
              • When the user terminates the drag operation, normally resulting in a + * successful Drop, both the {@code DragSource} and {@code DropTarget} + * receive notifications that include, and result in the type negotiation + * and transfer of, the information associated with the {@code DragSource} + * via a {@code Transferable} object.
              • + *
              + * + * @since 1.2 + */ +package java.awt.dnd; diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/package.html b/jdk/src/java.desktop/share/classes/java/awt/dnd/package.html deleted file mode 100644 index 467348506a5..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/dnd/package.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - -Drag and Drop is a direct manipulation gesture found in many Graphical -User Interface systems that provides a mechanism to transfer -information between two entities logically associated with presentation -elements in the GUI. Normally driven by a physical gesture of a -human user using an appropriate input device, Drag and Drop provides both -a mechanism to enable continuous feedback regarding the -possible outcome of any subsequent data transfer to the user during -navigation over the presentation elements in the GUI, and the facilities -to provide for any subsequent data negotiation and transfer. -

              -This package defines the classes and interfaces necessary to perform Drag -and Drop operations in Java. It -defines classes for the drag-source and the drop-target, as well as -events for transferring the data being dragged. This package also provides -a means for giving visual feedback to the user throughout the -duration of the Drag and Drop operation. -

              -A typical Drag and Drop operation can be decomposed into the following -states (not entirely sequentially): -

                -
              • A DragSource comes into existence, -associated with some presentation -element (Component) in the GUI, to initiate a Drag and Drop of -some potentially Transferable data. -

                -
              • 1 or more DropTarget(s) come into/go out of -existence, associated -with presentation elements in the GUI (Components), potentially -capable of consuming Transferable data types. -

                -
              • A DragGestureRecognizer is -obtained from the DragSource and is -associated with a Component in order -to track and identify any Drag -initiating gesture by the user over the Component. -

                -
              • A user makes a Drag gesture over the Component, -which the registered -DragGestureRecognizer detects, and notifies its -DragGestureListener of. -

                -Note: Although this API consistently refers to the stimulus for a -drag and drop operation being a physical gesture by a human user, this -does not preclude a programmatically driven DnD operation given the -appropriate implementation of a DragSource. This package -contains the abstract class MouseDragGestureRecognizer for -recognizing mouse device gestures. Other abstract subclasses may be -provided by the platform to support other input devices or -particular Component class semantics. -

                -

              • The DragGestureListener causes the -DragSource to initiate the Drag -and Drop operation on behalf of the user, perhaps animating the -GUI Cursor and/or rendering an Image of the item(s) that are the -subject of the operation. -

                -
              • As the user gestures navigate over Component(s) -in the GUI with -associated DropTarget(s), the DragSource -receives notifications in order -to provide "Drag Over" feedback effects, and the DropTarget(s) -receive notifications in order to provide "Drag Under" feedback effects -based upon the operation(s) supported and the data type(s) involved. -
              -

              - -The gesture itself moves a logical cursor across the GUI hierarchy, -intersecting the geometry of GUI Component(s), possibly resulting in -the logical "Drag" cursor entering, crossing, and subsequently -leaving Component(s) and associated DropTarget(s). -

              -The DragSource object manifests "Drag Over" feedback to the user, in the typical case by animating the GUI Cursor associated with the -logical cursor. -

              -DropTarget objects manifest "Drag Under" feedback to the user, in -the typical case, by rendering animations into their associated GUI -Component(s) under the GUI Cursor. -

              -The determination of the feedback effects, and the ultimate success -or failure of the data transfer, should one occur, is parameterized -as follows: -

                -
              • By the transfer "operation" selected by the user, and supported by -both the DragSource and DropTarget: Copy, Move or Reference(link). -

                -
              • By the intersection of the set of data types provided by the -DragSource and the set of data types comprehensible by the -DropTarget. -

                -
              • When the user terminates the drag operation, normally resulting in a -successful Drop, both the DragSource and DropTarget -receive -notifications that include, and result in the type negotiation and -transfer of, the information associated with the DragSource via a -Transferable object. -
              - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package-info.java new file mode 100644 index 00000000000..8505e24ea6a --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package-info.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides for interfacing with the underlying window system in order to access + * its platform-dependent drag-and-drop facilities. This package is only used by + * AWT toolkit developers. + * + * @since 1.2 + */ +package java.awt.dnd.peer; diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package.html b/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package.html deleted file mode 100644 index 6c83292c2c6..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -Provides for interfacing with the underlying window system -in order to access its platform-dependent drag-and-drop facilities. -This package is only used by AWT toolkit developers. - - -

              Package Specification

              - -##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT ##### - - -

              Related Documentation

              - -For overviews, tutorials, examples, guides, and tool documentation, please see: - - - - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/ActionEvent.java b/jdk/src/java.desktop/share/classes/java/awt/event/ActionEvent.java index 6ce79554eeb..3d422453e51 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/event/ActionEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/event/ActionEvent.java @@ -26,7 +26,6 @@ package java.awt.event; import java.awt.AWTEvent; -import java.awt.Event; import java.lang.annotation.Native; /** @@ -63,25 +62,25 @@ public class ActionEvent extends AWTEvent { * The shift modifier. An indicator that the shift key was held * down during the event. */ - public static final int SHIFT_MASK = Event.SHIFT_MASK; + public static final int SHIFT_MASK = 1 << 0; /** * The control modifier. An indicator that the control key was held * down during the event. */ - public static final int CTRL_MASK = Event.CTRL_MASK; + public static final int CTRL_MASK = 1 << 1; /** * The meta modifier. An indicator that the meta key was held * down during the event. */ - public static final int META_MASK = Event.META_MASK; + public static final int META_MASK = 1 << 2; /** * The alt modifier. An indicator that the alt key was held * down during the event. */ - public static final int ALT_MASK = Event.ALT_MASK; + public static final int ALT_MASK = 1 << 3; /** @@ -274,6 +273,7 @@ public class ActionEvent extends AWTEvent { * * @return a string identifying the event and its associated command */ + @SuppressWarnings("deprecation") public String paramString() { String typeStr; switch(id) { diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java b/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java index ec9bd0be0a1..09a08a0d010 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -62,51 +62,76 @@ public abstract class InputEvent extends ComponentEvent { /** * The Shift key modifier constant. - * It is recommended that SHIFT_DOWN_MASK be used instead. + * + * @deprecated It is recommended that SHIFT_DOWN_MASK and + * {@link #getModifiersEx()} be used instead */ + @Deprecated(since = "9") public static final int SHIFT_MASK = Event.SHIFT_MASK; /** * The Control key modifier constant. - * It is recommended that CTRL_DOWN_MASK be used instead. + * + * @deprecated It is recommended that CTRL_DOWN_MASK and + * {@link #getModifiersEx()} be used instead */ + @Deprecated(since = "9") public static final int CTRL_MASK = Event.CTRL_MASK; /** * The Meta key modifier constant. - * It is recommended that META_DOWN_MASK be used instead. + * + * @deprecated It is recommended that META_DOWN_MASK and + * {@link #getModifiersEx()} be used instead */ + @Deprecated(since = "9") public static final int META_MASK = Event.META_MASK; /** * The Alt key modifier constant. - * It is recommended that ALT_DOWN_MASK be used instead. + * + * @deprecated It is recommended that ALT_DOWN_MASK and + * {@link #getModifiersEx()} be used instead */ + @Deprecated(since = "9") public static final int ALT_MASK = Event.ALT_MASK; /** * The AltGraph key modifier constant. + * + * @deprecated It is recommended that ALT_GRAPH_DOWN_MASK and + * {@link #getModifiersEx()} be used instead */ + @Deprecated(since = "9") public static final int ALT_GRAPH_MASK = 1 << 5; /** * The Mouse Button1 modifier constant. - * It is recommended that BUTTON1_DOWN_MASK be used instead. + * + * @deprecated It is recommended that BUTTON1_DOWN_MASK and + * {@link #getModifiersEx()} be used instead */ + @Deprecated(since = "9") public static final int BUTTON1_MASK = 1 << 4; /** * The Mouse Button2 modifier constant. - * It is recommended that BUTTON2_DOWN_MASK be used instead. - * Note that BUTTON2_MASK has the same value as ALT_MASK. + * + * @deprecated It is recommended that BUTTON2_DOWN_MASK and + * {@link #getModifiersEx()} be used instead. Note that + * BUTTON2_MASK has the same value as ALT_MASK. */ + @Deprecated(since = "9") public static final int BUTTON2_MASK = Event.ALT_MASK; /** * The Mouse Button3 modifier constant. - * It is recommended that BUTTON3_DOWN_MASK be used instead. - * Note that BUTTON3_MASK has the same value as META_MASK. + * + * @deprecated It is recommended that BUTTON3_DOWN_MASK and + * {@link #getModifiersEx()} be used instead. Note that + * BUTTON3_MASK has the same value as META_MASK. */ + @Deprecated(since = "9") public static final int BUTTON3_MASK = Event.META_MASK; /** @@ -159,7 +184,7 @@ public abstract class InputEvent extends ComponentEvent { /** * An array of extended modifiers for additional buttons. - * @see getButtonDownMasks + * @see #getButtonDownMasks() * There are twenty buttons fit into 4byte space. * one more bit is reserved for FIRST_HIGH_BIT. * @since 1.7 @@ -382,7 +407,7 @@ public abstract class InputEvent extends ComponentEvent { * @return whether or not the Shift modifier is down on this event */ public boolean isShiftDown() { - return (modifiers & SHIFT_MASK) != 0; + return (modifiers & SHIFT_DOWN_MASK) != 0; } /** @@ -390,7 +415,7 @@ public abstract class InputEvent extends ComponentEvent { * @return whether or not the Control modifier is down on this event */ public boolean isControlDown() { - return (modifiers & CTRL_MASK) != 0; + return (modifiers & CTRL_DOWN_MASK) != 0; } /** @@ -398,7 +423,7 @@ public abstract class InputEvent extends ComponentEvent { * @return whether or not the Meta modifier is down on this event */ public boolean isMetaDown() { - return (modifiers & META_MASK) != 0; + return (modifiers & META_DOWN_MASK) != 0; } /** @@ -406,7 +431,7 @@ public abstract class InputEvent extends ComponentEvent { * @return whether or not the Alt modifier is down on this event */ public boolean isAltDown() { - return (modifiers & ALT_MASK) != 0; + return (modifiers & ALT_DOWN_MASK) != 0; } /** @@ -414,7 +439,7 @@ public abstract class InputEvent extends ComponentEvent { * @return whether or not the AltGraph modifier is down on this event */ public boolean isAltGraphDown() { - return (modifiers & ALT_GRAPH_MASK) != 0; + return (modifiers & ALT_GRAPH_DOWN_MASK) != 0; } /** @@ -428,8 +453,12 @@ public abstract class InputEvent extends ComponentEvent { /** * Returns the modifier mask for this event. + * * @return the modifier mask for this event + * @deprecated It is recommended that extended modifier keys and + * {@link #getModifiersEx()} be used instead */ + @Deprecated(since = "9") public int getModifiers() { return modifiers & (JDK_1_3_MODIFIERS | HIGH_MODIFIERS); } diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java b/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java index 0ca378d556b..b68d6586191 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java @@ -1110,6 +1110,8 @@ public class KeyEvent extends InputEvent { * * Event source can be changed during processing, but in some cases * we need to be able to obtain original source. + * + * @since 1.8 */ private Component originalSource; @@ -1169,6 +1171,7 @@ public class KeyEvent extends InputEvent { * @see #getKeyLocation() * @since 1.4 */ + @SuppressWarnings("deprecation") public KeyEvent(Component source, int id, long when, int modifiers, int keyCode, char keyChar, int keyLocation) { super(source, id, when, modifiers); @@ -1561,7 +1564,10 @@ public class KeyEvent extends InputEvent { * @return string a text description of the combination of modifier * keys that were held down during the event * @see InputEvent#getModifiersExText(int) + * @deprecated It is recommended that extended modifier keys and + * {@link InputEvent#getModifiersExText(int)} be used instead */ + @Deprecated(since = "9") public static String getKeyModifiersText(int modifiers) { StringBuilder buf = new StringBuilder(); if ((modifiers & InputEvent.META_MASK) != 0) { @@ -1696,6 +1702,7 @@ public class KeyEvent extends InputEvent { * * @return a string identifying the event and its attributes */ + @SuppressWarnings("deprecation") public String paramString() { StringBuilder str = new StringBuilder(100); @@ -1821,6 +1828,7 @@ public class KeyEvent extends InputEvent { * Sets new modifiers by the old ones. The key modifiers * override overlapping mouse modifiers. */ + @SuppressWarnings("deprecation") private void setNewModifiers() { if ((modifiers & SHIFT_MASK) != 0) { modifiers |= SHIFT_DOWN_MASK; @@ -1845,6 +1853,7 @@ public class KeyEvent extends InputEvent { /** * Sets old modifiers by the new ones. */ + @SuppressWarnings("deprecation") private void setOldModifiers() { if ((modifiers & SHIFT_DOWN_MASK) != 0) { modifiers |= SHIFT_MASK; @@ -1871,6 +1880,7 @@ public class KeyEvent extends InputEvent { * override overlapping mouse modifiers. * @serial */ + @SuppressWarnings("deprecation") private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java b/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java index 2ae987b8144..a4e166844c0 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java @@ -733,6 +733,7 @@ public class MouseEvent extends InputEvent { * @see InputEvent#getMaskForButton(int) * @since 1.6 */ + @SuppressWarnings("deprecation") public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int button) @@ -943,6 +944,7 @@ public class MouseEvent extends InputEvent { * @see InputEvent#getModifiersExText(int) * @since 1.4 */ + @SuppressWarnings("deprecation") public static String getMouseModifiersText(int modifiers) { StringBuilder buf = new StringBuilder(); if ((modifiers & InputEvent.ALT_MASK) != 0) { @@ -1007,6 +1009,7 @@ public class MouseEvent extends InputEvent { * * @return a string identifying the event and its attributes */ + @SuppressWarnings("deprecation") public String paramString() { StringBuilder str = new StringBuilder(80); @@ -1066,6 +1069,7 @@ public class MouseEvent extends InputEvent { * Sets new modifiers by the old ones. * Also sets button. */ + @SuppressWarnings("deprecation") private void setNewModifiers() { if ((modifiers & BUTTON1_MASK) != 0) { modifiers |= BUTTON1_DOWN_MASK; @@ -1120,6 +1124,7 @@ public class MouseEvent extends InputEvent { /** * Sets old modifiers by the new ones. */ + @SuppressWarnings("deprecation") private void setOldModifiers() { if (id == MOUSE_PRESSED || id == MOUSE_RELEASED @@ -1168,6 +1173,7 @@ public class MouseEvent extends InputEvent { * Sets new modifiers by the old ones. * @serial */ + @SuppressWarnings("deprecation") private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/event/package-info.java new file mode 100644 index 00000000000..c4dc383729f --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/event/package-info.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces and classes for dealing with different types of events + * fired by AWT components. See the {@link java.awt.AWTEvent java.awt.AWTEvent} + * class for details on the AWT event model. Events are fired by event sources. + * An event listener registers with an event source to receive notifications + * about the events of a particular type. This package defines events and event + * listeners, as well as event listener adapters, which are convenience classes + * to make easier the process of writing event listeners. + * + * @since 1.1 + */ +package java.awt.event; diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/package.html b/jdk/src/java.desktop/share/classes/java/awt/event/package.html deleted file mode 100644 index 0e2ae752b3e..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/event/package.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - -Provides interfaces and classes for dealing with different -types of events fired by AWT components. See the java.awt.AWTEvent -class for details on the AWT event model. Events are fired by event -sources. An event listener registers with an event source to receive -notifications about the events of a particular type. This package -defines events and event listeners, as well as event listener -adapters, which are convenience classes to make easier the process of -writing event listeners. - - - -@since 1.1 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/font/CharArrayIterator.java b/jdk/src/java.desktop/share/classes/java/awt/font/CharArrayIterator.java index 5c35beaa9f1..c7a00bdb67b 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/font/CharArrayIterator.java +++ b/jdk/src/java.desktop/share/classes/java/awt/font/CharArrayIterator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -47,7 +47,7 @@ class CharArrayIterator implements CharacterIterator { * Sets the position to getBeginIndex() and returns the character at that * position. * @return the first character in the text, or DONE if the text is empty - * @see getBeginIndex + * @see #getBeginIndex */ public char first() { @@ -59,7 +59,7 @@ class CharArrayIterator implements CharacterIterator { * Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) * and returns the character at that position. * @return the last character in the text, or DONE if the text is empty - * @see getEndIndex + * @see #getEndIndex */ public char last() { @@ -76,7 +76,7 @@ class CharArrayIterator implements CharacterIterator { * Gets the character at the current position (as returned by getIndex()). * @return the character at the current position or DONE if the current * position is off the end of the text. - * @see getIndex + * @see #getIndex */ public char current() { diff --git a/jdk/src/java.desktop/share/classes/java/awt/font/LineBreakMeasurer.java b/jdk/src/java.desktop/share/classes/java/awt/font/LineBreakMeasurer.java index 0467c0d24ca..079ee9ff55c 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/font/LineBreakMeasurer.java +++ b/jdk/src/java.desktop/share/classes/java/awt/font/LineBreakMeasurer.java @@ -115,26 +115,27 @@ import java.awt.font.FontRenderContext; *
              {@code
                * public void paint(Graphics graphics) {
                *
              - *     Point2D pen = new Point2D(10, 20);
              + *     float dx = 0f, dy = 5f;
                *     Graphics2D g2d = (Graphics2D)graphics;
                *     FontRenderContext frc = g2d.getFontRenderContext();
                *
              - *     // let styledText be an AttributedCharacterIterator containing at least
              - *     // one character
              + *     AttributedString text = new AttributedString(".....");
              + *     AttributedCharacterIterator paragraph = text.getIterator();
                *
              - *     LineBreakMeasurer measurer = new LineBreakMeasurer(styledText, frc);
              - *     float wrappingWidth = getSize().width - 15;
              + *     LineBreakMeasurer measurer = new LineBreakMeasurer(paragraph, frc);
              + *     measurer.setPosition(paragraph.getBeginIndex());
              + *     float wrappingWidth = (float)getSize().width;
                *
              - *     while (measurer.getPosition() < fStyledText.length()) {
              + *     while (measurer.getPosition() < paragraph.getEndIndex()) {
                *
                *         TextLayout layout = measurer.nextLayout(wrappingWidth);
                *
              - *         pen.y += (layout.getAscent());
              + *         dy += (layout.getAscent());
                *         float dx = layout.isLeftToRight() ?
                *             0 : (wrappingWidth - layout.getAdvance());
                *
              - *         layout.draw(graphics, pen.x + dx, pen.y);
              - *         pen.y += layout.getDescent() + layout.getLeading();
              + *         layout.draw(graphics, dx, dy);
              + *         dy += layout.getDescent() + layout.getLeading();
                *     }
                * }
                * }
              diff --git a/jdk/src/java.desktop/share/classes/java/awt/font/NumericShaper.java b/jdk/src/java.desktop/share/classes/java/awt/font/NumericShaper.java index 05b7aff76ac..76b390c065d 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/font/NumericShaper.java +++ b/jdk/src/java.desktop/share/classes/java/awt/font/NumericShaper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -106,12 +106,16 @@ import jdk.internal.misc.SharedSecrets; * multiple decimal digits sets are specified for the same Unicode * range, one of the sets will take precedence as follows. * - * + *
              + * + * * * * * * + * + * * * * * * + * + * * * * * * + * *
              NumericShaper constants precedence
              Unicode Range{@code NumericShaper} ConstantsPrecedence
              Arabic{@link NumericShaper#ARABIC NumericShaper.ARABIC}
              @@ -123,12 +127,15 @@ import jdk.internal.misc.SharedSecrets; * {@link NumericShaper.Range#EASTERN_ARABIC}
              {@link NumericShaper.Range#EASTERN_ARABIC}
              Tai Tham{@link NumericShaper.Range#TAI_THAM_HORA}
              * {@link NumericShaper.Range#TAI_THAM_THAM}
              {@link NumericShaper.Range#TAI_THAM_THAM}
              * * @since 1.4 diff --git a/jdk/src/java.desktop/share/classes/java/awt/font/TextAttribute.java b/jdk/src/java.desktop/share/classes/java/awt/font/TextAttribute.java index c9ae83659f6..9f27573e21d 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/font/TextAttribute.java +++ b/jdk/src/java.desktop/share/classes/java/awt/font/TextAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -96,15 +96,18 @@ import jdk.internal.misc.SharedSecrets; *
            * *

            Summary of attributes

            - * - * - * - * - * - * + *
            KeyValue TypePrincipal ConstantsDefault Value
            + * + * + * + * + * + * + * * + * + * * * * @@ -114,7 +117,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -126,7 +129,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -138,7 +141,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -150,7 +153,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -162,7 +165,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -174,7 +177,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -186,7 +189,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -198,7 +201,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -210,7 +213,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -222,7 +225,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -234,7 +237,7 @@ import jdk.internal.misc.SharedSecrets; * * * - * + * * * * @@ -246,6 +249,7 @@ import jdk.internal.misc.SharedSecrets; * * * + * *
            Key, value type, principal constants, and + * default value behavior of all TextAttributes
            KeyValue TypePrincipal ConstantsDefault Value
            {@link #FAMILY}String"Default" (use platform default)
            {@link #WEIGHT}NumberWEIGHT_REGULAR, WEIGHT_BOLDWIDTH_CONDENSED, WIDTH_REGULAR,
            WIDTH_EXTENDED
            WIDTH_REGULAR
            {@link #POSTURE}NumberPOSTURE_REGULAR, POSTURE_OBLIQUEnone12.0
            {@link #TRANSFORM}{@link TransformAttribute}See TransformAttribute {@link TransformAttribute#IDENTITY IDENTITY}SUPERSCRIPT_SUPER, SUPERSCRIPT_SUB0 (use the standard glyphs and metrics)
            {@link #FONT}{@link java.awt.Font}nonenonenull (draw text using font glyphs)
            {@link #FOREGROUND}{@link java.awt.Paint}nonenonenull (do not render background)
            {@link #UNDERLINE}IntegerUNDERLINE_ONSTRIKETHROUGH_ONfalse (do not render strikethrough)
            {@link #RUN_DIRECTION}BooleanRUN_DIRECTION_LTR
            RUN_DIRECTION_RTL
            none0 (use base line direction)
            {@link #JUSTIFICATION}NumberJUSTIFICATION_FULL(see class)null (do not apply input highlighting)
            {@link #INPUT_METHOD_UNDERLINE}IntegerUNDERLINE_LOW_ONE_PIXEL,
            UNDERLINE_LOW_TWO_PIXEL
            SWAP_COLORS_ONfalse (do not swap colors)
            {@link #NUMERIC_SHAPING}{@link java.awt.font.NumericShaper}noneKERNING_ON0 (do not request kerning)
            {@link #LIGATURES}IntegerLIGATURES_ONTRACKING_LOOSE, TRACKING_TIGHT0 (do not add tracking)
            * * @see java.awt.Font diff --git a/jdk/src/java.desktop/share/classes/java/awt/font/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/font/package-info.java new file mode 100644 index 00000000000..6cdcd3dc367 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/font/package-info.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interface relating to fonts. It contains support for + * representing Type 1, Type 1 Multiple Master fonts, OpenType fonts, and + * TrueType fonts. + * + * @since 1.2 + */ +package java.awt.font; diff --git a/jdk/src/java.desktop/share/classes/java/awt/font/package.html b/jdk/src/java.desktop/share/classes/java/awt/font/package.html deleted file mode 100644 index 22e71ba1c59..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/font/package.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -Provides classes and interface relating to fonts. It -contains support for representing Type 1, Type 1 Multiple Master -fonts, OpenType fonts, and TrueType fonts. - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java b/jdk/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java index 019abbeb5c1..4bdb3d189f2 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java +++ b/jdk/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ import java.beans.ConstructorProperties; * [ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ] * [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ] * - *

            Handling 90-Degree Rotations

            + *

            Handling 90-Degree Rotations

            *

            * In some variations of the {@code rotate} methods in the * {@code AffineTransform} class, a double-precision argument diff --git a/jdk/src/java.desktop/share/classes/java/awt/geom/Arc2D.java b/jdk/src/java.desktop/share/classes/java/awt/geom/Arc2D.java index c5bb52aca24..00e553bbbbb 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/geom/Arc2D.java +++ b/jdk/src/java.desktop/share/classes/java/awt/geom/Arc2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -33,11 +33,11 @@ import java.io.Serializable; * start angle, angular extent (length of the arc), and a closure type * ({@code OPEN}, {@code CHORD}, or {@code PIE}). *

            - * + * * The arc is a partial section of a full ellipse which * inscribes the framing rectangle of its parent {@link RectangularShape}. * - * + * * The angles are specified relative to the non-square * framing rectangle such that 45 degrees always falls on the line from * the center of the ellipse to the upper right corner of the framing diff --git a/jdk/src/java.desktop/share/classes/java/awt/geom/Line2D.java b/jdk/src/java.desktop/share/classes/java/awt/geom/Line2D.java index e93b9e32ac8..98f70b7eb8a 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/geom/Line2D.java +++ b/jdk/src/java.desktop/share/classes/java/awt/geom/Line2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -31,12 +31,7 @@ import java.io.Serializable; /** * This {@code Line2D} represents a line segment in {@code (x,y)} - * coordinate space. This class, like all of the Java 2D API, uses a - * default coordinate system called user space in which the y-axis - * values increase downward and x-axis values increase to the right. For - * more information on the user space coordinate system, see the - * - * Coordinate Systems section of the Java 2D Programmer's Guide. + * coordinate space. *

            * This class is only the abstract superclass for all objects that * store a 2D line segment. @@ -623,7 +618,7 @@ public abstract class Line2D implements Shape, Cloneable { * specified line segment * @param y2 the Y coordinate of the end point of the * specified line segment - * @return {@code } if this line segment and the specified line segment + * @return {@code true} if this line segment and the specified line segment * intersect each other; {@code false} otherwise. * @since 1.2 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/geom/Path2D.java b/jdk/src/java.desktop/share/classes/java/awt/geom/Path2D.java index 9ef2bb1bfd8..0c946b5c0ac 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/geom/Path2D.java +++ b/jdk/src/java.desktop/share/classes/java/awt/geom/Path2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -846,7 +846,7 @@ public abstract class Path2D implements Shape, Cloneable { * path. * * @serialData - * + * *

              *
            1. The default serializable fields. * There are no default serializable fields as of 1.6. @@ -876,13 +876,18 @@ public abstract class Path2D implements Shape, Cloneable { *

              * The following byte value constants are used in the serialized form * of {@code Path2D} objects: - * + * + *
              + * + * * * * * * * + * + * * * * @@ -956,6 +961,7 @@ public abstract class Path2D implements Shape, Cloneable { * * * + * *
              Constants
              Constant NameByte ValueFollowed byDescription
              {@code SERIAL_STORAGE_FLT_ARRAY}0x300x61There are no more path segments following.
              * * @since 1.6 @@ -1605,7 +1611,7 @@ public abstract class Path2D implements Shape, Cloneable { * path. * * @serialData - * + * *

                *
              1. The default serializable fields. * There are no default serializable fields as of 1.6. @@ -1635,13 +1641,17 @@ public abstract class Path2D implements Shape, Cloneable { *

                * The following byte value constants are used in the serialized form * of {@code Path2D} objects: - * + *
                + * + * * * * * * * + * + * * * * @@ -1715,6 +1725,7 @@ public abstract class Path2D implements Shape, Cloneable { * * * + * *
                Constants
                Constant NameByte ValueFollowed byDescription
                {@code SERIAL_STORAGE_FLT_ARRAY}0x300x61There are no more path segments following.
                * * @since 1.6 diff --git a/jdk/src/java.desktop/share/classes/java/awt/geom/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/geom/package-info.java new file mode 100644 index 00000000000..2ef69baf446 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/geom/package-info.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides the Java 2D classes for defining and performing operations on + * objects related to two-dimensional geometry. Some important features of the + * package include: + *

                  + *
                • classes for manipulating geometry, such as AffineTransform and the + * PathIterator interface which is implemented by all Shape objects.
                • + *
                • classes that implement the Shape interface, such as CubicCurve2D, + * Ellipse2D, Line2D, Rectangle2D, and GeneralShape.
                • + *
                • the Area class which provides mechanisms for add (union), subtract, + * intersect, and exclusiveOR operations on other Shape objects.
                • + *
                + * + * @since 1.2 + */ +package java.awt.geom; diff --git a/jdk/src/java.desktop/share/classes/java/awt/geom/package.html b/jdk/src/java.desktop/share/classes/java/awt/geom/package.html deleted file mode 100644 index de8b62c9a6f..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/geom/package.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - -Provides the Java 2D classes for defining and performing operations -on objects related to two-dimensional geometry. Some important features -of the package include: -
                  -
                • classes for manipulating geometry, such as AffineTransform and -the PathIterator interface which is implemented by all Shape objects. - -
                • classes that implement the Shape interface, such as -CubicCurve2D, Ellipse2D, Line2D, Rectangle2D, and GeneralShape. - -
                • the Area class which provides mechanisms for add (union), subtract, -intersect, and exclusiveOR operations on other Shape objects. -
                - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/im/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/im/package-info.java new file mode 100644 index 00000000000..bc21b5bad2c --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/im/package-info.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces for the input method framework. This package + * enables text editing components to receive text input through input methods. + * Input methods are software components that let the user enter text in ways + * other than simple typing on a keyboard. They are commonly used to enter + * Japanese, Chinese, or Korean - languages using thousands of different + * characters - on keyboards with far fewer keys. However, the framework also + * supports input methods for other languages and the use of entirely different + * input mechanisms, such as handwriting or speech recognition. + * + *

                Related Documentation

                + * For overviews, tutorials, examples, guides, and tool documentation, please + * see {@extLink imf_overview Input Method Framework Overview}. + * + * @since 1.2 + */ +package java.awt.im; diff --git a/jdk/src/java.desktop/share/classes/java/awt/im/package.html b/jdk/src/java.desktop/share/classes/java/awt/im/package.html deleted file mode 100644 index 552ca18e0a4..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/im/package.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - -

                Provides classes and interfaces for the input method framework. -This package enables text editing components to receive text input -through input methods. Input methods are software components that let -the user enter text in ways other than simple typing on a keyboard. -They are commonly used to enter Japanese, Chinese, or Korean - -languages using thousands of different characters - on keyboards with -far fewer keys. However, the framework also supports input methods -for other languages and the use of entirely different input -mechanisms, such as handwriting or speech recognition.

                - -

                Package Specification

                - - - -

                Related Documentation

                - -

                For overviews, tutorials, examples, guides, and tool -documentation, please see:

                - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/im/spi/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/im/spi/package-info.java new file mode 100644 index 00000000000..ca2e5337413 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/im/spi/package-info.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces that enable the development of input methods that can be + * used with any Java runtime environment. Input methods are software components + * that let the user enter text in ways other than simple typing on a keyboard. + * They are commonly used to enter Japanese, Chinese, or Korean - languages + * using thousands of different characters - on keyboards with far fewer keys. + * However, this package also allows the development of input methods for other + * languages and the use of entirely different input mechanisms, such as + * handwriting recognition. + * + *

                Packaging Input Methods

                + * Input methods can be made available by adding them to the application's class + * path. The main JAR file of an input method must contain the file: + *
                + *     META-INF/services/java.awt.im.spi.InputMethodDescriptor
                + * 
                + * The file should contain a list of fully-qualified class names, one per line, + * of classes implementing the {@code java.awt.im.spi.InputMethodDescriptor} + * interface. Space and tab characters surrounding each name, as well as blank + * lines, are ignored. The comment character is {@code '#'} + * ({@code \u005Cu0023}); on each line all characters following the first + * comment character are ignored. The file must be encoded in UTF-8. + *

                + * For example, if the fully-qualified name of the class that implements + * {@code java.awt.im.spi.InputMethodDesciptor} for the Foo input + * method is {@code com.sun.ime.FooInputMethodDescriptor}, the file + * {@code META-INF/services/java.awt.im.spi.InputMethodDescriptor} + * contains a line: + *

                + *     com.sun.ime.FooInputMethodDescriptor
                + * 
                + * The input method must also provide at least two classes: one class + * implementing the {@code java.awt.im.spi.InputMethodDescriptor} interface, one + * class implementing the {@code java.awt.im.spi.InputMethod} interface. The + * input method should separate the implementations for these interfaces, so + * that loading of the class implementing {@code InputMethod} can be deferred + * until actually needed. + * + *

                Loading Input Methods

                + * The input method framework will usually defer loading of input method + * classes until they are absolutely needed. It loads only the + * {@code InputMethodDescriptor} implementations during AWT initialization. It + * loads an {@code InputMethod} implementation when the input method has been + * selected. + * + *

                Java Input Methods and Peered Text + * Components

                + * The Java input method framework intends to support all combinations of input + * methods (host input methods and Java input methods) and components (peered + * and lightweight). However, because of limitations in the underlying platform, + * it may not always be possible to enable the communication between Java input + * methods and peered AWT components. Support for this specific combination is + * therefore platform dependent. In Sun's Java SE Runtime Environments, this + * combination is supported on Windows, but not on Solaris. + * + *

                Related Documentation

                + * For overviews, tutorials, examples, guides, and tool documentation, please + * see {@extLink imf_overview Input Method Framework Overview}. + * + * @since 1.3 + */ +package java.awt.im.spi; diff --git a/jdk/src/java.desktop/share/classes/java/awt/im/spi/package.html b/jdk/src/java.desktop/share/classes/java/awt/im/spi/package.html deleted file mode 100644 index 2e63c9297cd..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/im/spi/package.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - Package java.awt.im.spi Description - - - - - -

                Provides interfaces that enable the development of input methods -that can be used with any Java runtime environment. Input methods are -software components that let the user enter text in ways other than -simple typing on a keyboard. They are commonly used to enter -Japanese, Chinese, or Korean - languages using thousands of different -characters - on keyboards with far fewer keys. However, this package -also allows the development of input methods for other languages and -the use of entirely different input mechanisms, such as handwriting -recognition.

                - -

                Package Specification

                - - - -

                Packaging Input Methods

                - -

                Input methods can be made available by adding them to the application's -class path. The main JAR file of an input method must contain the -file:

                - -
                    META-INF/services/java.awt.im.spi.InputMethodDescriptor
                - -

                The file should contain a list of fully-qualified class names, one -per line, of classes implementing the -java.awt.im.spi.InputMethodDescriptor interface. Space -and tab characters surrounding each name, as well as blank lines, are -ignored. The comment character is '#' -(\u0023); on each line all characters following the -first comment character are ignored. The file must be encoded in -UTF-8.

                - -

                For example, if the fully-qualified name of the class that -implements java.awt.im.spi.InputMethodDesciptor for the -Foo input method is -com.sun.ime.FooInputMethodDescriptor, the file -META-INF/services/java.awt.im.spi.InputMethodDescriptor -contains a line:

                - -
                    com.sun.ime.FooInputMethodDescriptor
                - -

                The input method must also provide at least two classes: one class -implementing the java.awt.im.spi.InputMethodDescriptor -interface, one class implementing the -java.awt.im.spi.InputMethod interface. The input method -should separate the implementations for these interfaces, so that -loading of the class implementing InputMethod can be -deferred until actually needed.

                - -

                Loading Input Methods

                - -

                The input method framework will usually defer loading of input -method classes until they are absolutely needed. It loads only the -InputMethodDescriptor implementations during AWT -initialization. It loads an InputMethod implementation -when the input method has been selected.

                - -

                Java Input Methods and Peered Text -Components

                - -

                The Java input method framework intends to support all -combinations of input methods (host input methods and Java input -methods) and components (peered and lightweight). However, because of -limitations in the underlying platform, it may not always be possible -to enable the communication between Java input methods and peered AWT -components. Support for this specific combination is therefore -platform dependent. In Sun's Java SE Runtime Environments, this -combination is supported on Windows, but not on Solaris.

                - -

                Related Documentation

                - -

                For overviews, tutorials, examples, guides, and tool -documentation, please see:

                - - - -@since 1.3 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java b/jdk/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java index 89c43879ac3..aa105ccea75 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java @@ -29,7 +29,8 @@ import java.awt.Image; /** * This class provides default implementations of several {@code Image} methods - * for classes that want to implement the {@MultiResolutionImage} interface. + * for classes that want to implement the {@code MultiResolutionImage} + * interface. * * For example, *
                 {@code
                diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java b/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java
                index 9c226320a0b..2be7f7e844f 100644
                --- a/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java
                +++ b/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java
                @@ -1,5 +1,5 @@
                 /*
                - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
                + * Copyright (c) 1995, 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
                @@ -31,10 +31,10 @@ import java.awt.color.ICC_ColorSpace;
                 import sun.java2d.cmm.CMSManager;
                 import sun.java2d.cmm.ColorTransform;
                 import sun.java2d.cmm.PCMM;
                -import java.awt.Toolkit;
                 import java.util.Collections;
                 import java.util.Map;
                 import java.util.WeakHashMap;
                +import java.util.Arrays;
                 
                 /**
                  * The {@code ColorModel} abstract class encapsulates the
                @@ -362,7 +362,14 @@ public abstract class ColorModel implements Transparency{
                             this.transparency         = transparency;
                         }
                 
                -        nBits = bits.clone();
                +        /*
                +         * We need significant bits value only for the length
                +         * of number of components, so we truncate remaining part.
                +         * It also helps in hashCode calculation since bits[] can contain
                +         * different values after the length of number of components between
                +         * two ColorModels.
                +         */
                +        nBits = Arrays.copyOf(bits, numComponents);
                         this.pixel_bits = pixel_bits;
                         if (pixel_bits <= 0) {
                             throw new IllegalArgumentException("Number of pixel bits must "+
                @@ -1441,69 +1448,53 @@ public abstract class ColorModel implements Transparency{
                     }
                 
                     /**
                -     * Tests if the specified {@code Object} is an instance of
                -     * {@code ColorModel} and if it equals this
                -     * {@code ColorModel}.
                -     * @param obj the {@code Object} to test for equality
                -     * @return {@code true} if the specified {@code Object}
                -     * is an instance of {@code ColorModel} and equals this
                -     * {@code ColorModel}; {@code false} otherwise.
                +     * This method simply delegates to the default implementation in {@code Object}
                +     * which is identical to an {@code ==} test since this class cannot enforce the
                +     * issues of a proper equality test among multiple independent subclass
                +     * branches.
                +     * Subclasses are encouraged to override this method and provide equality
                +     * testing for their own properties in addition to equality tests for the
                +     * following common base properties of {@code ColorModel}:
                +     * 
                  + *
                • Support for alpha component.
                • + *
                • Is alpha premultiplied.
                • + *
                • Number of bits per pixel.
                • + *
                • Type of transparency like Opaque, Bitmask or Translucent.
                • + *
                • Number of components in a pixel.
                • + *
                • {@code ColorSpace} type.
                • + *
                • Type of the array used to represent pixel values.
                • + *
                • Number of significant bits per color and alpha component.
                • + *
                + * @param obj the reference object with which to compare. + * @return {@code true} if this object is the same as the obj + * argument; {@code false} otherwise. */ + @Override public boolean equals(Object obj) { - if (!(obj instanceof ColorModel)) { - return false; - } - ColorModel cm = (ColorModel) obj; - - if (this == cm) { - return true; - } - if (supportsAlpha != cm.hasAlpha() || - isAlphaPremultiplied != cm.isAlphaPremultiplied() || - pixel_bits != cm.getPixelSize() || - transparency != cm.getTransparency() || - numComponents != cm.getNumComponents()) - { - return false; - } - - int[] nb = cm.getComponentSize(); - - if ((nBits != null) && (nb != null)) { - for (int i = 0; i < numComponents; i++) { - if (nBits[i] != nb[i]) { - return false; - } - } - } else { - return ((nBits == null) && (nb == null)); - } - - return true; + return super.equals(obj); } /** - * Returns the hash code for this ColorModel. - * - * @return a hash code for this ColorModel. + * This method simply delegates to the default implementation in {@code Object} + * which returns the system ID for the class. + * Subclasses are encouraged to override this method and provide a hash + * for their own properties in addition to hashing the values of the + * following common base properties of {@code ColorModel}: + *
                  + *
                • Support for alpha component.
                • + *
                • Is alpha premultiplied.
                • + *
                • Number of bits per pixel.
                • + *
                • Type of transparency like Opaque, Bitmask or Translucent.
                • + *
                • Number of components in a pixel.
                • + *
                • {@code ColorSpace} type.
                • + *
                • Type of the array used to represent pixel values.
                • + *
                • Number of significant bits per color and alpha component.
                • + *
                + * @return a hash code value for this object. */ + @Override public int hashCode() { - - int result = 0; - - result = (supportsAlpha ? 2 : 3) + - (isAlphaPremultiplied ? 4 : 5) + - pixel_bits * 6 + - transparency * 7 + - numComponents * 8; - - if (nBits != null) { - for (int i = 0; i < numComponents; i++) { - result = result + nBits[i] * (i + 9); - } - } - - return result; + return super.hashCode(); } /** @@ -1629,7 +1620,17 @@ public abstract class ColorModel implements Transparency{ * Disposes of system resources associated with this * {@code ColorModel} once this {@code ColorModel} is no * longer referenced. + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") public void finalize() { } diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/ComponentColorModel.java b/jdk/src/java.desktop/share/classes/java/awt/image/ComponentColorModel.java index 60c5b0dfbd2..1e6a4d9c337 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/ComponentColorModel.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/ComponentColorModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -27,6 +27,7 @@ package java.awt.image; import java.awt.color.ColorSpace; import java.awt.color.ICC_ColorSpace; +import java.util.Arrays; /** * A {@code ColorModel} class that works with pixel values that @@ -200,6 +201,7 @@ public class ComponentColorModel extends ColorModel { private float[] diffMinMax; private float[] compOffset; private float[] compScale; + private volatile int hashCode; /** * Constructs a {@code ComponentColorModel} from the specified @@ -2927,22 +2929,59 @@ public class ComponentColorModel extends ColorModel { } /** - * Compares this color model with another for equality. - * - * @param obj The object to compare with this color model. - * @return {@code true} if the color model objects are equal, - * {@code false} if they are not. + * Tests if the specified {@code Object} is an instance + * of {@code ComponentColorModel} and equals this + * {@code ComponentColorModel}. + * @param obj the {@code Object} to test for equality + * @return {@code true} if the specified {@code Object} + * is an instance of {@code ComponentColorModel} and equals this + * {@code ComponentColorModel}; {@code false} otherwise. */ + @Override public boolean equals(Object obj) { - if (!super.equals(obj)) { + if (!(obj instanceof ComponentColorModel)) { return false; } - if (obj.getClass() != getClass()) { + ComponentColorModel cm = (ComponentColorModel) obj; + if (supportsAlpha != cm.hasAlpha() || + isAlphaPremultiplied != cm.isAlphaPremultiplied() || + pixel_bits != cm.getPixelSize() || + transparency != cm.getTransparency() || + numComponents != cm.getNumComponents() || + (!(colorSpace.equals(cm.colorSpace))) || + transferType != cm.transferType) + { + return false; + } + + if (!(Arrays.equals(nBits, cm.getComponentSize()))) { return false; } return true; } -} + /** + * Returns the hash code for this ComponentColorModel. + * + * @return a hash code for this ComponentColorModel. + */ + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = 7; + result = 89 * result + this.pixel_bits; + result = 89 * result + Arrays.hashCode(this.nBits); + result = 89 * result + this.transparency; + result = 89 * result + (this.supportsAlpha ? 1 : 0); + result = 89 * result + (this.isAlphaPremultiplied ? 1 : 0); + result = 89 * result + this.numComponents; + result = 89 * result + this.colorSpace.hashCode(); + result = 89 * result + this.transferType; + hashCode = result; + } + return result; + } +} \ No newline at end of file diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java index e1c32674858..d6fadd97c31 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -42,7 +42,7 @@ import static sun.java2d.StateTrackable.State.*; * Values stored in the byte array(s) of this {@code DataBuffer} are treated as * unsigned values. *

                - * + * * Note that some implementations may function more efficiently * if they can maintain control over how the data for an image is * stored. diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java index 4ca5471cd18..cfd78cd8f0e 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -31,7 +31,7 @@ import static sun.java2d.StateTrackable.State.*; * This class extends {@code DataBuffer} and stores data internally * in {@code double} form. *

                - * + * * Note that some implementations may function more efficiently * if they can maintain control over how the data for an image is * stored. diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java index 48e0cf437ff..259f0699780 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -31,7 +31,7 @@ import static sun.java2d.StateTrackable.State.*; * This class extends {@code DataBuffer} and stores data internally * in {@code float} form. *

                - * + * * Note that some implementations may function more efficiently * if they can maintain control over how the data for an image is * stored. diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java index cdf43cedb2a..58d8e658f17 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ import static sun.java2d.StateTrackable.State.*; * This class extends {@code DataBuffer} and stores data internally * as integers. *

                - * + * * Note that some implementations may function more efficiently * if they can maintain control over how the data for an image is * stored. diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java index 1c90a5fd171..90d8148fbb8 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -40,7 +40,7 @@ import static sun.java2d.StateTrackable.State.*; /** * This class extends {@code DataBuffer} and stores data internally as shorts. *

                - * + * * Note that some implementations may function more efficiently * if they can maintain control over how the data for an image is * stored. diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java index d2009f90a0e..f8ec77a0711 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -42,7 +42,7 @@ import static sun.java2d.StateTrackable.State.*; * shorts. Values stored in the short array(s) of this {@code DataBuffer} * are treated as unsigned values. *

                - * + * * Note that some implementations may function more efficiently * if they can maintain control over how the data for an image is * stored. diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java b/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java index bc6e8051f89..2ef638ee0f5 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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,6 +28,7 @@ package java.awt.image; import java.awt.Transparency; import java.awt.color.ColorSpace; import java.math.BigInteger; +import java.util.Arrays; /** * The {@code IndexColorModel} class is a {@code ColorModel} @@ -54,7 +55,7 @@ import java.math.BigInteger; * {@code IndexColorModel} objects are never pre-multiplied with * the alpha components. *

                - * + * * The transparency of an {@code IndexColorModel} object is * determined by examining the alpha components of the colors in the * colormap and choosing the most specific value after considering @@ -85,7 +86,7 @@ import java.math.BigInteger; * and {@code getNumComponents} returns 4. * *

                - * + * * The values used to index into the colormap are taken from the least * significant n bits of pixel representations where * n is based on the pixel size specified in the constructor. @@ -129,6 +130,7 @@ public class IndexColorModel extends ColorModel { private int transparent_index = -1; private boolean allgrayopaque; private BigInteger validBits; + private volatile int hashCode; private sun.awt.image.BufImgSurfaceData.ICMColorData colorData = null; @@ -1512,7 +1514,17 @@ public class IndexColorModel extends ColorModel { * Disposes of system resources associated with this * {@code ColorModel} once this {@code ColorModel} is no * longer referenced. + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") public void finalize() { } @@ -1532,4 +1544,100 @@ public class IndexColorModel extends ColorModel { + " isAlphaPre = "+isAlphaPremultiplied ); } + + /** + * Tests if the specified {@code Object} is an + * instance of {@code IndexColorModel} + * and if it equals this {@code IndexColorModel} + * @param obj the {@code Object} to test for equality + * @return {@code true} if the specified {@code Object} + * equals this {@code IndexColorModel}; {@code false} otherwise. + */ + @Override + public boolean equals(Object obj) { + + if (!(obj instanceof IndexColorModel)) { + return false; + } + + IndexColorModel cm = (IndexColorModel) obj; + if (supportsAlpha != cm.hasAlpha() || + isAlphaPremultiplied != cm.isAlphaPremultiplied() || + pixel_bits != cm.getPixelSize() || + transparency != cm.getTransparency() || + numComponents != cm.getNumComponents() || + (!(colorSpace.equals(cm.colorSpace))) || + transferType != cm.transferType || + map_size != cm.map_size || + transparent_index != cm.transparent_index) + { + return false; + } + + if (!(Arrays.equals(nBits, cm.getComponentSize()))) { + return false; + } + + // verify whether we have to check equality of all bits in validBits + boolean testValidBits; + if (validBits == cm.validBits) { + testValidBits = false; + } else if (validBits == null || cm.validBits == null) { + return false; + } else if (validBits.equals(cm.validBits)) { + testValidBits = false; + } else { + testValidBits = true; + } + + if (testValidBits) { + for (int i = 0; i < map_size; i++) { + if (rgb[i] != cm.rgb[i] || + validBits.testBit(i) != cm.validBits.testBit(i)) + { + return false; + } + } + } else { + for (int i = 0; i < map_size; i++) { + if (rgb[i] != cm.rgb[i]) { + return false; + } + } + } + return true; + } + + /** + * Returns the hash code for IndexColorModel. + * + * @return a hash code for IndexColorModel + */ + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + /* + * We are intentionally not calculating hashCode for validBits, + * because it is only used for 8-bit indexed screens and they + * are very rare. It is very unlikely for 2 IndexColorModels + * to have different valiBits and have same value for all + * other properties. + */ + result = 7; + result = 89 * result + this.pixel_bits; + result = 89 * result + Arrays.hashCode(this.nBits); + result = 89 * result + this.transparency; + result = 89 * result + (this.supportsAlpha ? 1 : 0); + result = 89 * result + (this.isAlphaPremultiplied ? 1 : 0); + result = 89 * result + this.numComponents; + result = 89 * result + this.colorSpace.hashCode(); + result = 89 * result + this.transferType; + result = 89 * result + Arrays.hashCode(this.rgb); + result = 89 * result + this.map_size; + result = 89 * result + this.transparent_index; + hashCode = result; + } + return result; + } } diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java b/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java index 0db6ff17441..bb432f9d513 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -27,6 +27,7 @@ package java.awt.image; import java.awt.Transparency; import java.awt.color.ColorSpace; +import java.util.Arrays; /** * The {@code PackedColorModel} class is an abstract @@ -88,6 +89,7 @@ public abstract class PackedColorModel extends ColorModel { int[] maskArray; int[] maskOffsets; float[] scaleFactors; + private volatile int hashCode; /** * Constructs a {@code PackedColorModel} from a color mask array, @@ -393,25 +395,63 @@ public abstract class PackedColorModel extends ColorModel { * is an instance of {@code PackedColorModel} and equals this * {@code PackedColorModel}; {@code false} otherwise. */ + @Override public boolean equals(Object obj) { if (!(obj instanceof PackedColorModel)) { return false; } - if (!super.equals(obj)) { + PackedColorModel cm = (PackedColorModel) obj; + + if (supportsAlpha != cm.hasAlpha() || + isAlphaPremultiplied != cm.isAlphaPremultiplied() || + pixel_bits != cm.getPixelSize() || + transparency != cm.getTransparency() || + numComponents != cm.getNumComponents() || + (!(colorSpace.equals(cm.colorSpace))) || + transferType != cm.transferType) + { return false; } - PackedColorModel cm = (PackedColorModel) obj; int numC = cm.getNumComponents(); for(int i=0; i < numC; i++) { if (maskArray[i] != cm.getMask(i)) { return false; } } + + if (!(Arrays.equals(nBits, cm.getComponentSize()))) { + return false; + } + return true; } + /** + * Returns the hash code for this PackedColorModel. + * + * @return a hash code for this PackedColorModel. + */ + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = 7; + result = 89 * result + this.pixel_bits; + result = 89 * result + Arrays.hashCode(this.nBits); + result = 89 * result + this.transparency; + result = 89 * result + (this.supportsAlpha ? 1 : 0); + result = 89 * result + (this.isAlphaPremultiplied ? 1 : 0); + result = 89 * result + this.numComponents; + result = 89 * result + this.colorSpace.hashCode(); + result = 89 * result + this.transferType; + result = 89 * result + Arrays.hashCode(this.maskArray); + hashCode = result; + } + return result; + } + private static final int[] createBitsArray(int[]colorMaskArray, int alphaMask) { int numColors = colorMaskArray.length; @@ -480,4 +520,4 @@ public abstract class PackedColorModel extends ColorModel { return count; } -} +} \ No newline at end of file diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java b/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java index b84d9e90ba5..bfd7eb0958b 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java @@ -27,6 +27,8 @@ package java.awt.image; import java.awt.color.ColorSpace; import java.awt.geom.Rectangle2D; +import java.awt.AlphaComposite; +import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.geom.Point2D; import java.awt.RenderingHints; @@ -193,9 +195,10 @@ public class RescaleOp implements BufferedImageOp, RasterOp { int nBands, int nElems) { - byte[][] lutData = new byte[scale.length][nElems]; + byte[][] lutData = new byte[nBands][nElems]; + int band; - for (int band=0; band numSrcColorComp && srcCM.hasAlpha()) { @@ -374,102 +414,41 @@ public class RescaleOp implements BufferedImageOp, RasterOp { dstCM = dst.getColorModel(); if(srcCM.getColorSpace().getType() != - dstCM.getColorSpace().getType()) { + dstCM.getColorSpace().getType()) { needToConvert = true; dst = createCompatibleDestImage(src, null); } } - boolean scaleAlpha = true; - - // - // The number of sets of scaling constants may be one, - // in which case the same constants are applied to all color - // (but NOT alpha) components. Otherwise, the number of sets - // of scaling constants may equal the number of Source color - // components, in which case NO rescaling of the alpha component - // (if present) is performed. - // - if (numSrcColorComp == scaleConst || scaleConst == 1) { - scaleAlpha = false; - } - // // Try to use a native BI rescale operation first // if (ImagingLib.filter(this, src, dst) == null) { + if (src.getRaster().getNumBands() != + dst.getRaster().getNumBands()) { + needToDraw = true; + dst = createCompatibleDestImage(src, null); + } + // // Native BI rescale failed - convert to rasters // WritableRaster srcRaster = src.getRaster(); WritableRaster dstRaster = dst.getRaster(); - if (!scaleAlpha) { - if (srcCM.hasAlpha()) { - // Do not rescale Alpha component - int minx = srcRaster.getMinX(); - int miny = srcRaster.getMinY(); - int[] bands = new int[numSrcColorComp]; - for (int i=0; i < numSrcColorComp; i++) { - bands[i] = i; - } - srcRaster = - srcRaster.createWritableChild(minx, miny, - srcRaster.getWidth(), - srcRaster.getHeight(), - minx, miny, - bands); - } - if (dstCM.hasAlpha()) { - int minx = dstRaster.getMinX(); - int miny = dstRaster.getMinY(); - int[] bands = new int[numSrcColorComp]; - for (int i=0; i < numSrcColorComp; i++) { - bands[i] = i; - } - dstRaster = - dstRaster.createWritableChild(minx, miny, - dstRaster.getWidth(), - dstRaster.getHeight(), - minx, miny, - bands); - } - } - // // Call the raster filter method // - filterRasterImpl(srcRaster, dstRaster, scaleConst); - - // - // here copy the unscaled src alpha to destination alpha channel - // - if (!scaleAlpha) { - Raster srcAlphaRaster = null; - WritableRaster dstAlphaRaster = null; - - if (srcCM.hasAlpha()) { - srcAlphaRaster = src.getAlphaRaster(); - } - if (dstCM.hasAlpha()) { - dstAlphaRaster = dst.getAlphaRaster(); - if (srcAlphaRaster != null) { - dstAlphaRaster.setRect(srcAlphaRaster); - } else { - int alpha = 0xff << 24; - for (int cy=0; cy < dst.getHeight(); cy++) { - for (int cx=0; cx < dst.getWidth(); cx++) { - int color = dst.getRGB(cx, cy); - - dst.setRGB(cx, cy, color | alpha); - } - } - } - } - } + filterRasterImpl(srcRaster, dstRaster, scaleConst, false); } + if (needToDraw) { + Graphics2D g = origDst.createGraphics(); + g.setComposite(AlphaComposite.Src); + g.drawImage(dst, 0, 0, width, height, null); + g.dispose(); + } if (needToConvert) { // ColorModels are not the same ColorConvertOp ccop = new ColorConvertOp(hints); @@ -497,10 +476,11 @@ public class RescaleOp implements BufferedImageOp, RasterOp { * stated in the class comments. */ public final WritableRaster filter (Raster src, WritableRaster dst) { - return filterRasterImpl(src, dst, length); + return filterRasterImpl(src, dst, length, true); } - private WritableRaster filterRasterImpl(Raster src, WritableRaster dst, int scaleConst) { + private WritableRaster filterRasterImpl(Raster src, WritableRaster dst, + int scaleConst, boolean sCheck) { int numBands = src.getNumBands(); int width = src.getWidth(); int height = src.getHeight(); @@ -527,7 +507,7 @@ public class RescaleOp implements BufferedImageOp, RasterOp { // Make sure that the arrays match // Make sure that the low/high/constant arrays match - if (scaleConst != 1 && scaleConst != src.getNumBands()) { + if (sCheck && scaleConst != 1 && scaleConst != src.getNumBands()) { throw new IllegalArgumentException("Number of scaling constants "+ "does not equal the number of"+ " of bands in the src raster"); @@ -598,8 +578,14 @@ public class RescaleOp implements BufferedImageOp, RasterOp { srcPix = src.getPixel(sX, sY, srcPix); tidx = 0; for (int z=0; z - - - - - - -Provides classes for creating and modifying images. -Images are processed using a streaming framework that involves an -image producer, optional image filters, and an image consumer. This -framework makes it possible to progressively render an image while it -is being fetched and generated. Moreover, the framework allows an -application to discard the storage used by an image and to regenerate -it at any time. This package provides a number of image producers, -consumers, and filters that you can configure for your image -processing needs. - - -@since 1.0 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package-info.java new file mode 100644 index 00000000000..dc02c0d5c2a --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces for producing rendering-independent images. + * + * @since 1.2 + */ +package java.awt.image.renderable; diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package.html b/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package.html deleted file mode 100644 index c75fb1f166b..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - -Provides classes and interfaces for producing -rendering-independent images. - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/package-info.java new file mode 100644 index 00000000000..682a371dd83 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/package-info.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Contains all of the classes for creating user interfaces and for painting + * graphics and images. A user interface object such as a button or a scrollbar + * is called, in AWT terminology, a component. The Component class is the root + * of all AWT components. See Component for a detailed description of properties + * that all AWT components share. + *

                + * Some components fire events when a user interacts with the components. The + * AWTEvent class and its subclasses are used to represent the events that AWT + * components can fire. See AWTEvent for a description of the AWT event model. + *

                + * A container is a component that can contain components and other containers. + * A container can also have a layout manager that controls the visual placement + * of components in the container. The AWT package contains several layout + * manager classes and an interface for building your own layout manager. See + * Container and LayoutManager for more information. + *

                + * Each {@code Component} object is limited in its maximum size and its location + * because the values are stored as an integer. Also, a platform may further + * restrict maximum size and location coordinates. The exact maximum values are + * dependent on the platform. There is no way to change these maximum values, + * either in Java code or in native code. These limitations also impose + * restrictions on component layout. If the bounds of a Component object exceed + * a platform limit, there is no way to properly arrange them within a Container + * object. The object's bounds are defined by any object's coordinate in + * combination with its size on a respective axis. + * + *

                Additional Specification

                + * + * + * @since 1.0 + */ +package java.awt; diff --git a/jdk/src/java.desktop/share/classes/java/awt/package.html b/jdk/src/java.desktop/share/classes/java/awt/package.html deleted file mode 100644 index ebab6ec0eb4..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/package.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -Contains all of the classes for creating user -interfaces and for painting graphics and images. A user interface object such as a button or a -scrollbar is called, in AWT terminology, a component. The Component class is the root of all -AWT components. See Component for a detailed description of properties that all AWT -components share. -

                -Some components fire events when a user interacts with the components. The AWTEvent -class and its subclasses are used to represent the events that AWT components can fire. See -AWTEvent for a description of the AWT event model. -

                -A container is a component that can contain components and other containers. A con -tainer can also have a layout manager that controls the visual placement of components in the -container. The AWT package contains several layout manager classes and an interface for -building your own layout manager. See Container and LayoutManager for more information. -

                -Each {@code Component} object is limited in its maximum size and -its location because the values are stored as an integer. -Also, a platform may further restrict maximum size and location -coordinates. The exact maximum values are dependent on the platform. -There is no way to change these maximum values, either in Java -code or in native code. -These limitations also impose restrictions on component layout. -If the bounds of a Component object exceed a platform limit, -there is no way to properly arrange them within a Container object. -The object's bounds are defined by any object's coordinate -in combination with its size on a respective axis. - - -

                Additional Specification

                - - - - -@since 1.0 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/peer/DesktopPeer.java b/jdk/src/java.desktop/share/classes/java/awt/peer/DesktopPeer.java index 9751458cf07..67eda40dd6c 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/peer/DesktopPeer.java +++ b/jdk/src/java.desktop/share/classes/java/awt/peer/DesktopPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,18 +24,21 @@ */ package java.awt.peer; -import java.io.File; -import java.io.IOException; -import java.net.URI; import java.awt.Desktop.Action; import java.awt.desktop.AboutHandler; -import java.awt.desktop.SystemEventListener; import java.awt.desktop.OpenFilesHandler; +import java.awt.desktop.OpenURIEvent; import java.awt.desktop.OpenURIHandler; +import java.awt.desktop.PreferencesEvent; import java.awt.desktop.PreferencesHandler; import java.awt.desktop.PrintFilesHandler; import java.awt.desktop.QuitHandler; import java.awt.desktop.QuitStrategy; +import java.awt.desktop.SystemEventListener; +import java.io.File; +import java.io.IOException; +import java.net.URI; + import javax.swing.JMenuBar; /** @@ -162,7 +165,7 @@ public interface DesktopPeer { * the default behavior * * @param preferencesHandler the handler to respond to the - * {@link java.awt.desktop.PreferencesHandler#handlePreferences(java.awt.PreferencesEvent) } + * {@link java.awt.desktop.PreferencesHandler#handlePreferences(PreferencesEvent) } */ default void setPreferencesHandler(final PreferencesHandler preferencesHandler) { } @@ -191,7 +194,7 @@ public interface DesktopPeer { * open a URL. * * Setting the handler to {@code null} causes all - * {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} requests to be + * {@link OpenURIHandler#openURI(OpenURIEvent)} requests to be * enqueued until another handler is set. * * @param openURIHandler handler diff --git a/jdk/src/java.desktop/share/classes/java/awt/peer/PopupMenuPeer.java b/jdk/src/java.desktop/share/classes/java/awt/peer/PopupMenuPeer.java index 3d3b677a19c..3e42310527d 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/peer/PopupMenuPeer.java +++ b/jdk/src/java.desktop/share/classes/java/awt/peer/PopupMenuPeer.java @@ -46,5 +46,6 @@ public interface PopupMenuPeer extends MenuPeer { * * @see PopupMenu#show(java.awt.Component, int, int) */ + @SuppressWarnings("deprecation") void show(Event e); } diff --git a/jdk/src/java.desktop/share/classes/java/awt/peer/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/peer/package-info.java new file mode 100644 index 00000000000..49b68401db0 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/peer/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides for interfacing with the underlying window system. It is for + * accessing the platform-specific facilities in order to build AWT toolkits. It + * is only used by AWT toolkit developers. + */ +package java.awt.peer; diff --git a/jdk/src/java.desktop/share/classes/java/awt/peer/package.html b/jdk/src/java.desktop/share/classes/java/awt/peer/package.html deleted file mode 100644 index aeb98b2115d..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/peer/package.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -Provides for interfacing with the underlying window system. -It is for accessing the platform-specific facilities in order to -build AWT toolkits. It is only used by AWT toolkit developers. - - -

                Package Specification

                - -##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT ##### - - -

                Related Documentation

                - -For overviews, tutorials, examples, guides, and tool documentation, please see: - - - - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/print/PrinterJob.java b/jdk/src/java.desktop/share/classes/java/awt/print/PrinterJob.java index 0e4d7f96e05..f549388c957 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/print/PrinterJob.java +++ b/jdk/src/java.desktop/share/classes/java/awt/print/PrinterJob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -27,12 +27,12 @@ package java.awt.print; import java.awt.AWTError; import java.awt.HeadlessException; -import java.util.Enumeration; import javax.print.DocFlavor; import javax.print.PrintService; import javax.print.PrintServiceLookup; import javax.print.StreamPrintServiceFactory; +import javax.print.attribute.AttributeSet; import javax.print.attribute.PrintRequestAttributeSet; import javax.print.attribute.standard.Media; import javax.print.attribute.standard.MediaPrintableArea; @@ -40,8 +40,6 @@ import javax.print.attribute.standard.MediaSize; import javax.print.attribute.standard.MediaSizeName; import javax.print.attribute.standard.OrientationRequested; -import sun.security.action.GetPropertyAction; - /** * The {@code PrinterJob} class is the principal class that controls * printing. An application calls methods in this class to set up a job, diff --git a/jdk/src/java.desktop/share/classes/java/awt/print/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/print/package-info.java new file mode 100644 index 00000000000..76dfb743339 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/print/package-info.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces for a general printing API. The API includes + * such features as: + *
                  + *
                • the ability to specify document types
                • + *
                • mechanisms for control of page setup and page formats
                • + *
                • the ability to manage job control dialogs
                • + *
                + * + * @since 1.2 + */ +package java.awt.print; diff --git a/jdk/src/java.desktop/share/classes/java/awt/print/package.html b/jdk/src/java.desktop/share/classes/java/awt/print/package.html deleted file mode 100644 index 6c708d59c67..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/print/package.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - -Provides classes and interfaces for a general printing API. The -API includes such features as: -
                  -
                • the ability to specify document types -
                • mechanisms for control of page setup and page formats -
                • the ability to manage job control dialogs -
                - - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/beans/ChangeListenerMap.java b/jdk/src/java.desktop/share/classes/java/beans/ChangeListenerMap.java index fa8be4722f3..8f246b00cfb 100644 --- a/jdk/src/java.desktop/share/classes/java/beans/ChangeListenerMap.java +++ b/jdk/src/java.desktop/share/classes/java/beans/ChangeListenerMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 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 @@ -39,8 +39,8 @@ import java.util.Set; * for the {@link PropertyChangeSupport PropertyChangeSupport} class * and the {@link VetoableChangeSupport VetoableChangeSupport} class. * - * @see PropertyChangeListenerMap - * @see VetoableChangeListenerMap + * @see PropertyChangeSupport.PropertyChangeListenerMap + * @see VetoableChangeSupport.VetoableChangeListenerMap * * @author Sergey A. Malenkov */ diff --git a/jdk/src/java.desktop/share/classes/java/beans/beancontext/package-info.java b/jdk/src/java.desktop/share/classes/java/beans/beancontext/package-info.java new file mode 100644 index 00000000000..f1b22cf7da0 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/beans/beancontext/package-info.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces relating to bean context. A bean context is a + * container for beans and defines the execution environment for the beans it + * contains. There can be several beans in a single bean context, and a bean + * context can be nested within another bean context. This package also + * contains events and listener interface for beans being added and removed from + * a bean context. + * + * @since 1.2 + */ +package java.beans.beancontext; diff --git a/jdk/src/java.desktop/share/classes/java/beans/beancontext/package.html b/jdk/src/java.desktop/share/classes/java/beans/beancontext/package.html deleted file mode 100644 index 739356e24fa..00000000000 --- a/jdk/src/java.desktop/share/classes/java/beans/beancontext/package.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - -Provides classes and interfaces relating to bean context. -A bean context is a container for beans and defines the execution -environment for the beans it contains. There can be several beans in -a single bean context, and a bean context can be nested within another -bean context. This package also contains events and listener -interface for beans being added and removed from a bean context. - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/beans/package-info.java b/jdk/src/java.desktop/share/classes/java/beans/package-info.java new file mode 100644 index 00000000000..c841669ac0e --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/beans/package-info.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Contains classes related to developing beans -- components based on + * the JavaBeans™ architecture. A few of the classes are used by beans + * while they run in an application. For example, the event classes are used by + * beans that fire property and vetoable change events (see + * {@link java.beans.PropertyChangeEvent}). However, most of the classes in this + * package are meant to be used by a bean editor (that is, a development + * environment for customizing and putting together beans to create an + * application). In particular, these classes help the bean editor create a user + * interface that the user can use to customize the bean. For example, a bean + * may contain a property of a special type that a bean editor may not know how + * to handle. By using the {@code PropertyEditor} interface, a bean developer + * can provide an editor for this special type. + *

                + * To minimize the resources used by a bean, the classes used by bean editors + * are loaded only when the bean is being edited. They are not needed while the + * bean is running in an application and therefore not loaded. This information + * is kept in what's called a bean-info (see {@link java.beans.BeanInfo}). + *

                + * Unless explicitly stated, null values or empty Strings are not valid + * parameters for the methods in this package. You may expect to see exceptions + * if these parameters are used. + * + *

                Long-Term Persistence

                + * As of v1.4, the {@code java.beans} package provides support for long-term + * persistence -- reading and writing a bean as a textual representation of + * its property values. The property values are treated as beans, and are + * recursively read or written to capture their publicly available state. This + * approach is suitable for long-term storage because it relies only on public + * API, rather than the likely-to-change private implementation. + * + *

                Note: The persistence scheme cannot automatically + * instantiate custom inner classes, such as you might use for event handlers. + * By using the {@link java.beans.EventHandler} class instead of inner classes + * for custom event handlers, you can avoid this problem.
                + *

                + * You read and write beans in XML format using the + * {@link java.beans.XMLDecoder} and {@link java.beans.XMLEncoder} classes, + * respectively. One notable feature of the persistence scheme is that reading + * in a bean requires no special knowledge of the bean. + *

                + * Writing out a bean, on the other hand, sometimes requires special knowledge + * of the bean's type. If the bean's state can be expressed using only the + * no-argument constructor and public getter and setter methods for properties, + * no special knowledge is required. Otherwise, the bean requires a custom + * persistence delegate -- an object that is in charge of writing out + * beans of a particular type. All classes provided in the JDK that descend from + * {@code java.awt.Component}, as well as all their properties, automatically + * have persistence delegates. + *

                + * If you need (or choose) to provide a persistence delegate for a bean, you can + * do so either by using a {@link java.beans.DefaultPersistenceDelegate} + * instance or by creating your own subclass of {@code PersistenceDelegate}. If + * the only reason a bean needs a persistence delegate is because you want to + * invoke the bean's constructor with property values as arguments, you can + * create the bean's persistence delegate with the one-argument + * {@code DefaultPersistenceDelegate} constructor. Otherwise, you need to + * implement your own persistence delegate, for which you're likely to need the + * following classes: + *

                + *
                {@link java.beans.PersistenceDelegate}
                + *
                The abstract class from which all persistence delegates descend. Your + * subclass should use its knowledge of the bean's type to provide whatever + * {@code Statement}s and {@code Expression}s are necessary to create the + * bean and restore its state.
                + *
                {@link java.beans.Statement}
                + *
                Represents the invocation of a single method on an object. Includes + * a set of arguments to the method.
                + *
                {@link java.beans.Expression}
                + *
                A subclass of {@code Statement} used for methods that return a + * value.
                + *
                + *

                + * Once you create a persistence delegate, you register it using the + * {@code setPersistenceDelegate} method of {@code XMLEncoder}. + * + *

                Related Documentation

                + * For overview, architecture, and tutorial documentation, please see: + * + */ +package java.beans; diff --git a/jdk/src/java.desktop/share/classes/java/beans/package.html b/jdk/src/java.desktop/share/classes/java/beans/package.html deleted file mode 100644 index 81a9cdafd7b..00000000000 --- a/jdk/src/java.desktop/share/classes/java/beans/package.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - -Contains classes related to developing -beans -- components -based on the JavaBeans™ architecture. -A few of the -classes are used by beans while they run in an application. -For example, the event classes are -used by beans that fire property and vetoable change -events (see -{@link java.beans.PropertyChangeEvent}). However, most of the classes in this -package are meant to be used by a bean editor (that is, a development environment -for customizing and putting together beans to create an application). In -particular, these classes help the bean editor create a user -interface that the user can use to customize the bean. For example, a bean may -contain a property of a special type that a bean editor may not know how to handle. -By using the PropertyEditor interface, a bean developer can -provide an editor for this special type. - -

                -To minimize the resources used by a bean, the classes used by bean editors are loaded only -when the bean is being edited. They are not needed while the bean is running in an application -and therefore not loaded. This information is kept in what's called a bean-info (see {@link java.beans.BeanInfo}). - -

                -Unless explicitly stated, null values or empty Strings are not valid -parameters for the methods in this package. You may expect to see -exceptions if these parameters are used. - - -

                Long-Term Persistence

                - -As of v1.4, -the java.beans package provides support for -long-term persistence -- reading and -writing a bean as a textual representation of its property values. -The property values are treated as beans, -and are recursively read or written to capture -their publicly available state. -This approach is suitable for long-term storage -because it relies only on public API, -rather than the likely-to-change private implementation. - -
                -
                -Note: -The persistence scheme cannot automatically instantiate -custom inner classes, such as you might use for event handlers. -By using the {@link java.beans.EventHandler} class -instead of inner classes for custom event handlers, -you can avoid this problem. -
                -
                - -

                - -You read and write beans in XML format using the -{@link java.beans.XMLDecoder} -and -{@link java.beans.XMLEncoder} -classes, respectively. -One notable feature of the persistence scheme is that -reading in a bean requires no special knowledge of the bean. - -

                -Writing out a bean, on the other hand, -sometimes requires special knowledge of the bean's type. -If the bean's state can be -expressed using only the no-argument constructor and -public getter and setter methods for properties, -no special knowledge is required. -Otherwise, the bean requires a custom persistence delegate -- -an object that is in charge of writing out beans of a particular type. -All classes provided in the JDK that descend -from java.awt.Component, -as well as all their properties, -automatically have persistence delegates. - -

                - -If you need (or choose) to provide a persistence delegate for a bean, -you can do so either by using a -{@link java.beans.DefaultPersistenceDelegate} -instance -or by creating your own subclass of PersistenceDelegate. -If the only reason a bean needs a persistence delegate -is because you want to invoke the bean's constructor with -property values as arguments, -you can create the bean's persistence delegate -with the one-argument -DefaultPersistenceDelegate -constructor. -Otherwise, -you need to implement your own persistence delegate, -for which you're likely to need the following classes: - -

                -
                {@link java.beans.PersistenceDelegate} -
                The abstract class from which all persistence delegates descend. - Your subclass should use its knowledge of the bean's type to provide - whatever Statements and Expressions - are necessary to create the bean - and restore its state. -
                {@link java.beans.Statement} -
                Represents the invocation of a single method on an object. - Includes a set of arguments to the method. -
                {@link java.beans.Expression} -
                A subclass of Statement - used for methods that return a value. -
                - -

                -Once you create a persistence delegate, -you register it using the -setPersistenceDelegate method of -XMLEncoder. - - -

                Related Documentation

                - -For overview, architecture, and tutorial documentation, please see: - - - - diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibilityProvider.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibilityProvider.java index 59b8ab18d8d..2f73a162074 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibilityProvider.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibilityProvider.java @@ -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 @@ -22,25 +22,26 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package javax.accessibility; /** * Service Provider Interface (SPI) for Assistive Technology. *

                - * This service provider class provides mappings from the platform - * specific accessibility APIs to the Java Accessibility API. + * This service provider class provides mappings from the platform specific + * accessibility APIs to the Java Accessibility API. *

                * Each service provider implementation is named and can be activated via the * {@link #activate} method. Service providers can be loaded when the default * {@link java.awt.Toolkit toolkit} is initialized. * * @apiNote There will typically be one provider per platform, such as Windows - * or Linux, to support accessibility for screen readers and magnifiers. However, - * more than one service provider can be activated. For example, a test tool - * which provides visual results obtained by interrogating the Java Accessibility - * API can be activated along with the activation of the support for screen readers - * and screen magnifiers. - * + * or Linux, to support accessibility for screen readers and + * magnifiers. However, more than one service provider can be + * activated. For example, a test tool which provides visual results + * obtained by interrogating the Java Accessibility API can be + * activated along with the activation of the support for screen + * readers and screen magnifiers. * @see java.awt.Toolkit#getDefaultToolkit * @see java.util.ServiceLoader * @since 9 @@ -50,25 +51,34 @@ public abstract class AccessibilityProvider { /** * Initializes a new accessibility provider. * - * @throws SecurityException - * If a security manager has been installed and it denies - * {@link RuntimePermission} {@code "accessibilityProvider"} + * @throws SecurityException If a security manager has been installed and it + * denies {@link RuntimePermission} {@code "accessibilityProvider"} */ protected AccessibilityProvider() { - // Use a permission check when calling a private constructor to check that - // the proper security permission has been granted before the Object superclass - // is called. If an exception is thrown before the Object superclass is - // constructed a finalizer in a subclass of this class will not be run. - // This protects against a finalizer vulnerability. + // Use a permission check when calling a private constructor to check + // that the proper security permission has been granted before the + // {@code Object} superclass is called. If an exception is thrown before + // the {@code Object} superclass is constructed a finalizer in a + // subclass of this class will not be run. This protects against a + // finalizer vulnerability. this(checkPermission()); } + /** + * Allows to check a permission before the {@code Object} is called. + * + * @param ignore unused stub to call a {@link #checkPermission()}} + */ private AccessibilityProvider(Void ignore) { } /** * If this code is running with a security manager and if the permission - * "accessibilityProvider" has not been granted SecurityException will be thrown. + * {@code "accessibilityProvider"} has not been granted + * {@code SecurityException} will be thrown. * + * @return {@code null} if {@code SecurityException} was not thrown + * @throws SecurityException If a security manager has been installed and it + * denies {@link RuntimePermission} {@code "accessibilityProvider"} */ private static Void checkPermission() { SecurityManager sm = System.getSecurityManager(); @@ -78,7 +88,7 @@ public abstract class AccessibilityProvider { } /** - * Returns the name of this service provider. This name is used to locate a + * Returns the name of this service provider. This name is used to locate a * requested service provider. * * @return the name of this service provider @@ -89,5 +99,4 @@ public abstract class AccessibilityProvider { * Activates the support provided by this service provider. */ public abstract void activate(); - } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/Accessible.java b/jdk/src/java.desktop/share/classes/javax/accessibility/Accessible.java index c7793715a84..b458c21b347 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/Accessible.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/Accessible.java @@ -26,26 +26,26 @@ package javax.accessibility; /** - * Interface Accessible is the main interface for the accessibility package. - * All components that support - * the accessibility package must implement this interface. - * It contains a single method, {@link #getAccessibleContext}, which - * returns an instance of the class {@link AccessibleContext}. + * Interface {@code Accessible} is the main interface for the accessibility + * package. All components that support the accessibility package must implement + * this interface. It contains a single method, {@link #getAccessibleContext}, + * which returns an instance of the class {@link AccessibleContext}. * - * @author Peter Korn - * @author Hans Muller - * @author Willie Walker + * @author Peter Korn + * @author Hans Muller + * @author Willie Walker */ public interface Accessible { /** - * Returns the AccessibleContext associated with this object. In most - * cases, the return value should not be null if the object implements - * interface Accessible. If a component developer creates a subclass - * of an object that implements Accessible, and that subclass - * is not Accessible, the developer should override the - * getAccessibleContext method to return null. - * @return the AccessibleContext associated with this object + * Returns the {@code AccessibleContext} associated with this object. In + * most cases, the return value should not be {@code null} if the object + * implements interface {@code Accessible}. If a component developer creates + * a subclass of an object that implements {@code Accessible}, and that + * subclass is not {@code Accessible}, the developer should override the + * {@code getAccessibleContext} method to return {@code null}. + * + * @return the {@code AccessibleContext} associated with this object */ public AccessibleContext getAccessibleContext(); } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleAction.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleAction.java index e4b7bb86792..f816cddcc1a 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleAction.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -26,31 +26,31 @@ package javax.accessibility; /** - * The AccessibleAction interface should be supported by any object - * that can perform one or more actions. This interface - * provides the standard mechanism for an assistive technology to determine - * what those actions are as well as tell the object to perform them. - * Any object that can be manipulated should support this - * interface. Applications can determine if an object supports the - * AccessibleAction interface by first obtaining its AccessibleContext (see - * {@link Accessible}) and then calling the {@link AccessibleContext#getAccessibleAction} - * method. If the return value is not null, the object supports this interface. + * The {@code AccessibleAction} interface should be supported by any object that + * can perform one or more actions. This interface provides the standard + * mechanism for an assistive technology to determine what those actions are as + * well as tell the object to perform them. Any object that can be manipulated + * should support this interface. Applications can determine if an object + * supports the {@code AccessibleAction} interface by first obtaining its + * {@code AccessibleContext} (see {@link Accessible}) and then calling the + * {@link AccessibleContext#getAccessibleAction} method. If the return value is + * not {@code null}, the object supports this interface. * + * @author Peter Korn + * @author Hans Muller + * @author Willie Walker + * @author Lynn Monsanto * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleContext#getAccessibleAction - * - * @author Peter Korn - * @author Hans Muller - * @author Willie Walker - * @author Lynn Monsanto */ public interface AccessibleAction { /** - * An action which causes a tree node to - * collapse if expanded and expand if collapsed. + * An action which causes a tree node to collapse if expanded and expand if + * collapsed. + * * @since 1.5 */ public static final String TOGGLE_EXPAND = @@ -58,6 +58,7 @@ public interface AccessibleAction { /** * An action which increments a value. + * * @since 1.5 */ public static final String INCREMENT = @@ -66,6 +67,7 @@ public interface AccessibleAction { /** * An action which decrements a value. + * * @since 1.5 */ public static final String DECREMENT = @@ -73,6 +75,7 @@ public interface AccessibleAction { /** * An action which causes a component to execute its default action. + * * @since 1.6 */ public static final String CLICK = new String("click"); @@ -80,33 +83,34 @@ public interface AccessibleAction { /** * An action which causes a popup to become visible if it is hidden and * hidden if it is visible. + * * @since 1.6 */ public static final String TOGGLE_POPUP = new String("toggle popup"); /** - * Returns the number of accessible actions available in this object - * If there are more than one, the first one is considered the "default" - * action of the object. + * Returns the number of accessible actions available in this object If + * there are more than one, the first one is considered the "default" action + * of the object. * - * @return the zero-based number of Actions in this object + * @return the zero-based number of actions in this object */ public int getAccessibleActionCount(); /** * Returns a description of the specified action of the object. * - * @param i zero-based index of the actions - * @return a String description of the action + * @param i zero-based index of the actions + * @return a {@code String} description of the action * @see #getAccessibleActionCount */ public String getAccessibleActionDescription(int i); /** - * Performs the specified Action on the object + * Performs the specified action on the object. * - * @param i zero-based index of actions - * @return true if the action was performed; otherwise false. + * @param i zero-based index of actions + * @return {@code true} if the action was performed; otherwise {@code false} * @see #getAccessibleActionCount */ public boolean doAccessibleAction(int i); diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleAttributeSequence.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleAttributeSequence.java index a0f12496d98..1eca65e7439 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleAttributeSequence.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleAttributeSequence.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -22,51 +22,44 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package javax.accessibility; import javax.swing.text.AttributeSet; - /** - *

                The AccessibleAttributeSequence provides information about - * a contiguous sequence of text attributes + * This class collects together the span of text that share the same contiguous + * set of attributes, along with that set of attributes. It is used by + * implementors of the class {@code AccessibleContext} in order to generate + * {@code ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED} events. * - * @see Accessible - * @see Accessible#getAccessibleContext * @see AccessibleContext - * @see AccessibleContext#getAccessibleText - * @see AccessibleTextSequence - * - * @author Lynn Monsanto - */ - -/** - * This class collects together the span of text that share the same - * contiguous set of attributes, along with that set of attributes. It - * is used by implementors of the class {@code AccessibleContext} in - * order to generate {@code ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED} events. - * - * @see javax.accessibility.AccessibleContext - * @see javax.accessibility.AccessibleContext#ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED + * @see AccessibleContext#ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED */ public class AccessibleAttributeSequence { - /** The start index of the text sequence */ + + /** + * The start index of the text sequence. + */ public int startIndex; - /** The end index of the text sequence */ + /** + * The end index of the text sequence. + */ public int endIndex; - /** The text attributes */ + /** + * The text attributes. + */ public AttributeSet attributes; /** * Constructs an {@code AccessibleAttributeSequence} with the given * parameters. * - * @param start the beginning index of the span of text - * @param end the ending index of the span of text - * @param attr the {@code AttributeSet} shared by this text span - * + * @param start the beginning index of the span of text + * @param end the ending index of the span of text + * @param attr the {@code AttributeSet} shared by this text span * @since 1.6 */ public AccessibleAttributeSequence(int start, int end, AttributeSet attr) { @@ -74,5 +67,4 @@ public class AccessibleAttributeSequence { endIndex = end; attributes = attr; } - }; diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java index 5e2d97b43e5..b5b3f2aa704 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -27,30 +27,31 @@ package javax.accessibility; import java.util.Enumeration; import java.util.Hashtable; -import java.util.Vector; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; + import sun.awt.AWTAccessor; /** - *

                Base class used to maintain a strongly typed enumeration. This is - * the superclass of {@link AccessibleState} and {@link AccessibleRole}. - *

                The toDisplayString method allows you to obtain the localized string - * for a locale independent key from a predefined ResourceBundle for the - * keys defined in this class. This localized string is intended to be + * Base class used to maintain a strongly typed enumeration. This is the + * superclass of {@link AccessibleState} and {@link AccessibleRole}. + *

                + * The {@link #toDisplayString()} method allows you to obtain the localized + * string for a locale independent key from a predefined {@code ResourceBundle} + * for the keys defined in this class. This localized string is intended to be * readable by humans. * + * @author Willie Walker + * @author Peter Korn + * @author Lynn Monsanto * @see AccessibleRole * @see AccessibleState - * - * @author Willie Walker - * @author Peter Korn - * @author Lynn Monsanto */ public abstract class AccessibleBundle { private static Hashtable> table = new Hashtable<>(); + private final String defaultResourceBundleName = "com.sun.accessibility.internal.resources.accessibility"; @@ -72,23 +73,24 @@ public abstract class AccessibleBundle { } /** - * The locale independent name of the state. This is a programmatic - * name that is not intended to be read by humans. + * The locale independent name of the state. This is a programmatic name + * that is not intended to be read by humans. + * * @see #toDisplayString */ protected String key = null; /** - * Obtains the key as a localized string. - * If a localized string cannot be found for the key, the - * locale independent key stored in the role will be returned. - * This method is intended to be used only by subclasses so that they - * can specify their own resource bundles which contain localized + * Obtains the key as a localized string. If a localized string cannot be + * found for the key, the locale independent key stored in the role will be + * returned. This method is intended to be used only by subclasses so that + * they can specify their own resource bundles which contain localized * strings for their keys. - * @param resourceBundleName the name of the resource bundle to use for - * lookup - * @param locale the locale for which to obtain a localized string - * @return a localized String for the key. + * + * @param resourceBundleName the name of the resource bundle to use for + * lookup + * @param locale the locale for which to obtain a localized string + * @return a localized string for the key */ protected String toDisplayString(String resourceBundleName, Locale locale) { @@ -108,12 +110,12 @@ public abstract class AccessibleBundle { } /** - * Obtains the key as a localized string. - * If a localized string cannot be found for the key, the - * locale independent key stored in the role will be returned. + * Obtains the key as a localized string. If a localized string cannot be + * found for the key, the locale independent key stored in the role will be + * returned. * - * @param locale the locale for which to obtain a localized string - * @return a localized String for the key. + * @param locale the locale for which to obtain a localized string + * @return a localized string for the key */ public String toDisplayString(Locale locale) { return toDisplayString(defaultResourceBundleName, locale); @@ -121,7 +123,8 @@ public abstract class AccessibleBundle { /** * Gets localized string describing the key using the default locale. - * @return a localized String describing the key for the default locale + * + * @return a localized string describing the key using the default locale */ public String toDisplayString() { return toDisplayString(Locale.getDefault()); @@ -129,14 +132,15 @@ public abstract class AccessibleBundle { /** * Gets localized string describing the key using the default locale. - * @return a localized String describing the key using the default locale + * + * @return a localized string describing the key using the default locale * @see #toDisplayString */ public String toString() { return toDisplayString(); } - /* + /** * Loads the Accessibility resource bundle if necessary. */ private void loadResourceBundle(String resourceBundleName, @@ -164,5 +168,4 @@ public abstract class AccessibleBundle { } } } - } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleComponent.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleComponent.java index 598e8fff153..f8953776bb3 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleComponent.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,36 +25,40 @@ package javax.accessibility; -import java.awt.*; -import java.awt.event.*; +import java.awt.Color; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.event.FocusListener; /** - * The AccessibleComponent interface should be supported by any object - * that is rendered on the screen. This interface provides the standard - * mechanism for an assistive technology to determine and set the - * graphical representation of an object. Applications can determine - * if an object supports the AccessibleComponent interface by first - * obtaining its AccessibleContext - * and then calling the - * {@link AccessibleContext#getAccessibleComponent} method. - * If the return value is not null, the object supports this interface. + * The {@code AccessibleComponent} interface should be supported by any object + * that is rendered on the screen. This interface provides the standard + * mechanism for an assistive technology to determine and set the graphical + * representation of an object. Applications can determine if an object supports + * the {@code AccessibleComponent} interface by first obtaining its + * {@code AccessibleContext} and then calling the + * {@link AccessibleContext#getAccessibleComponent} method. If the return value + * is not {@code null}, the object supports this interface. * + * @author Peter Korn + * @author Hans Muller + * @author Willie Walker * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleContext#getAccessibleComponent - * - * @author Peter Korn - * @author Hans Muller - * @author Willie Walker */ public interface AccessibleComponent { /** * Gets the background color of this object. * - * @return the background color, if supported, of the object; - * otherwise, null + * @return the background color, if supported, of the object; otherwise, + * {@code null} * @see #setBackground */ public Color getBackground(); @@ -62,7 +66,7 @@ public interface AccessibleComponent { /** * Sets the background color of this object. * - * @param c the new Color for the background + * @param c the new color for the background * @see #setBackground */ public void setBackground(Color c); @@ -70,8 +74,8 @@ public interface AccessibleComponent { /** * Gets the foreground color of this object. * - * @return the foreground color, if supported, of the object; - * otherwise, null + * @return the foreground color, if supported, of the object; otherwise, + * {@code null} * @see #setForeground */ public Color getForeground(); @@ -79,58 +83,59 @@ public interface AccessibleComponent { /** * Sets the foreground color of this object. * - * @param c the new Color for the foreground + * @param c the new color for the foreground * @see #getForeground */ public void setForeground(Color c); /** - * Gets the Cursor of this object. + * Gets the cursor of this object. * - * @return the Cursor, if supported, of the object; otherwise, null + * @return the cursor, if supported, of the object; otherwise, {@code null} * @see #setCursor */ public Cursor getCursor(); /** - * Sets the Cursor of this object. + * Sets the cursor of this object. * - * @param cursor the new Cursor for the object + * @param cursor the new cursor for the object * @see #getCursor */ public void setCursor(Cursor cursor); /** - * Gets the Font of this object. + * Gets the font of this object. * - * @return the Font,if supported, for the object; otherwise, null + * @return the font, if supported, for the object; otherwise, {@code null} * @see #setFont */ public Font getFont(); /** - * Sets the Font of this object. + * Sets the font of this object. * - * @param f the new Font for the object + * @param f the new font for the object * @see #getFont */ public void setFont(Font f); /** - * Gets the FontMetrics of this object. + * Gets the {@code FontMetrics} of this object. * - * @param f the Font - * @return the FontMetrics, if supported, the object; otherwise, null + * @param f the font for which font metrics is to be obtained + * @return the {@code FontMetrics}, if supported, the object; otherwise, + * {@code null} * @see #getFont */ public FontMetrics getFontMetrics(Font f); /** - * Determines if the object is enabled. Objects that are enabled - * will also have the AccessibleState.ENABLED state set in their - * AccessibleStateSets. + * Determines if the object is enabled. Objects that are enabled will also + * have the {@code AccessibleState.ENABLED} state set in their + * {@code AccessibleStateSets}. * - * @return true if object is enabled; otherwise, false + * @return {@code true} if object is enabled; otherwise, {@code false} * @see #setEnabled * @see AccessibleContext#getAccessibleStateSet * @see AccessibleState#ENABLED @@ -141,21 +146,23 @@ public interface AccessibleComponent { /** * Sets the enabled state of the object. * - * @param b if true, enables this object; otherwise, disables it + * @param b if {@code true}, enables this object; otherwise, disables it * @see #isEnabled */ public void setEnabled(boolean b); /** - * Determines if the object is visible. Note: this means that the - * object intends to be visible; however, it may not be - * showing on the screen because one of the objects that this object - * is contained by is currently not visible. To determine if an object is - * showing on the screen, use isShowing(). - *

                Objects that are visible will also have the - * AccessibleState.VISIBLE state set in their AccessibleStateSets. + * Determines if the object is visible. Note: this means that the object + * intends to be visible; however, it may not be showing on the screen + * because one of the objects that this object is contained by is currently + * not visible. To determine if an object is showing on the screen, use + * {@link #isShowing()} + *

                + * Objects that are visible will also have the + * {@code AccessibleState.VISIBLE} state set in their + * {@code AccessibleStateSets}. * - * @return true if object is visible; otherwise, false + * @return {@code true} if object is visible; otherwise, {@code false} * @see #setVisible * @see AccessibleContext#getAccessibleStateSet * @see AccessibleState#VISIBLE @@ -166,29 +173,28 @@ public interface AccessibleComponent { /** * Sets the visible state of the object. * - * @param b if true, shows this object; otherwise, hides it + * @param b if {@code true}, shows this object; otherwise, hides it * @see #isVisible */ public void setVisible(boolean b); /** - * Determines if the object is showing. This is determined by checking - * the visibility of the object and its ancestors. - * Note: this - * will return true even if the object is obscured by another (for example, - * it is underneath a menu that was pulled down). + * Determines if the object is showing. This is determined by checking the + * visibility of the object and its ancestors. Note: this will return + * {@code true} even if the object is obscured by another (for example, it + * is underneath a menu that was pulled down). * - * @return true if object is showing; otherwise, false + * @return {@code true} if object is showing; otherwise, {@code false} */ public boolean isShowing(); /** - * Checks whether the specified point is within this object's bounds, - * where the point's x and y coordinates are defined to be relative to the + * Checks whether the specified point is within this object's bounds, where + * the point's x and y coordinates are defined to be relative to the * coordinate system of the object. * - * @param p the Point relative to the coordinate system of the object - * @return true if object contains Point; otherwise false + * @param p the point relative to the coordinate system of the object + * @return {@code true} if object contains point; otherwise {@code false} * @see #getBounds */ public boolean contains(Point p); @@ -196,21 +202,21 @@ public interface AccessibleComponent { /** * Returns the location of the object on the screen. * - * @return the location of the object on screen; null if this object - * is not on the screen + * @return the location of the object on screen; {@code null} if this object + * is not on the screen * @see #getBounds * @see #getLocation */ public Point getLocationOnScreen(); /** - * Gets the location of the object relative to the parent in the form - * of a point specifying the object's top-left corner in the screen's - * coordinate space. + * Gets the location of the object relative to the parent in the form of a + * point specifying the object's top-left corner in the screen's coordinate + * space. * - * @return An instance of Point representing the top-left corner of the - * object's bounds in the coordinate space of the screen; null if - * this object or its parent are not on the screen + * @return An instance of {@code Point} representing the top-left corner of + * the object's bounds in the coordinate space of the screen; + * {@code null} if this object or its parent are not on the screen * @see #getBounds * @see #getLocationOnScreen */ @@ -218,40 +224,41 @@ public interface AccessibleComponent { /** * Sets the location of the object relative to the parent. - * @param p the new position for the top-left corner + * + * @param p the new position for the top-left corner * @see #getLocation */ public void setLocation(Point p); /** - * Gets the bounds of this object in the form of a Rectangle object. - * The bounds specify this object's width, height, and location - * relative to its parent. + * Gets the bounds of this object in the form of a {@code Rectangle} object. + * The bounds specify this object's width, height, and location relative to + * its parent. * - * @return A rectangle indicating this component's bounds; null if - * this object is not on the screen. + * @return A rectangle indicating this component's bounds; {@code null} if + * this object is not on the screen. * @see #contains */ public Rectangle getBounds(); /** - * Sets the bounds of this object in the form of a Rectangle object. - * The bounds specify this object's width, height, and location - * relative to its parent. + * Sets the bounds of this object in the form of a {@code Rectangle} object. + * The bounds specify this object's width, height, and location relative to + * its parent. * - * @param r rectangle indicating this component's bounds + * @param r rectangle indicating this component's bounds * @see #getBounds */ public void setBounds(Rectangle r); /** - * Returns the size of this object in the form of a Dimension object. - * The height field of the Dimension object contains this object's - * height, and the width field of the Dimension object contains this - * object's width. + * Returns the size of this object in the form of a {@code Dimension} + * object. The {@code height} field of the {@code Dimension} object contains + * this object's height, and the {@code width} field of the + * {@code Dimension} object contains this object's width. * - * @return A Dimension object that indicates the size of this component; - * null if this object is not on the screen + * @return A {@code Dimension} object that indicates the size of this + * component; {@code null} if this object is not on the screen * @see #setSize */ public Dimension getSize(); @@ -259,27 +266,27 @@ public interface AccessibleComponent { /** * Resizes this object so that it has width and height. * - * @param d The dimension specifying the new size of the object. + * @param d The dimension specifying the new size of the object * @see #getSize */ public void setSize(Dimension d); /** - * Returns the Accessible child, if one exists, contained at the local - * coordinate Point. + * Returns the {@code Accessible} child, if one exists, contained at the + * local coordinate {@code Point}. * - * @param p The point relative to the coordinate system of this object. - * @return the Accessible, if it exists, at the specified location; - * otherwise null + * @param p The point relative to the coordinate system of this object + * @return the {@code Accessible}, if it exists, at the specified location; + * otherwise {@code null} */ public Accessible getAccessibleAt(Point p); /** - * Returns whether this object can accept focus or not. Objects that - * can accept focus will also have the AccessibleState.FOCUSABLE state - * set in their AccessibleStateSets. + * Returns whether this object can accept focus or not. Objects that can + * accept focus will also have the {@code AccessibleState.FOCUSABLE} state + * set in their {@code AccessibleStateSets}. * - * @return true if object can accept focus; otherwise false + * @return {@code true} if object can accept focus; otherwise {@code false} * @see AccessibleContext#getAccessibleStateSet * @see AccessibleState#FOCUSABLE * @see AccessibleState#FOCUSED @@ -288,9 +295,9 @@ public interface AccessibleComponent { public boolean isFocusTraversable(); /** - * Requests focus for this object. If this object cannot accept focus, - * nothing will happen. Otherwise, the object will attempt to take - * focus. + * Requests focus for this object. If this object cannot accept focus, + * nothing will happen. Otherwise, the object will attempt to take focus. + * * @see #isFocusTraversable */ public void requestFocus(); @@ -299,7 +306,7 @@ public interface AccessibleComponent { * Adds the specified focus listener to receive focus events from this * component. * - * @param l the focus listener + * @param l the focus listener * @see #removeFocusListener */ public void addFocusListener(FocusListener l); @@ -308,7 +315,7 @@ public interface AccessibleComponent { * Removes the specified focus listener so it no longer receives focus * events from this component. * - * @param l the focus listener + * @param l the focus listener * @see #addFocusListener */ public void removeFocusListener(FocusListener l); diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java index c3a30f3a5ae..9c0d4b50c15 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,66 +25,63 @@ package javax.accessibility; +import java.awt.IllegalComponentStateException; +import java.beans.BeanProperty; +import java.beans.JavaBean; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.util.Locale; + import sun.awt.AWTAccessor; import sun.awt.AppContext; -import java.util.Locale; -import java.beans.JavaBean; -import java.beans.BeanProperty; -import java.beans.PropertyChangeListener; -import java.beans.PropertyChangeSupport; -import java.beans.PropertyChangeEvent; -import java.awt.IllegalComponentStateException; - -import javax.swing.SwingContainer; - /** - * AccessibleContext represents the minimum information all accessible objects - * return. This information includes the accessible name, description, role, - * and state of the object, as well as information about its parent and - * children. AccessibleContext also contains methods for - * obtaining more specific accessibility information about a component. - * If the component supports them, these methods will return an object that - * implements one or more of the following interfaces: + * {@code AccessibleContext} represents the minimum information all accessible + * objects return. This information includes the accessible name, description, + * role, and state of the object, as well as information about its parent and + * children. {@code AccessibleContext} also contains methods for obtaining more + * specific accessibility information about a component. If the component + * supports them, these methods will return an object that implements one or + * more of the following interfaces: *

                  - *
                • {@link AccessibleAction} - the object can perform one or more actions. - * This interface provides the standard mechanism for an assistive - * technology to determine what those actions are and tell the object - * to perform them. Any object that can be manipulated should - * support this interface. - *
                • {@link AccessibleComponent} - the object has a graphical representation. - * This interface provides the standard mechanism for an assistive - * technology to determine and set the graphical representation of the - * object. Any object that is rendered on the screen should support - * this interface. - *
                • {@link AccessibleSelection} - the object allows its children to be - * selected. This interface provides the standard mechanism for an - * assistive technology to determine the currently selected children of the object - * as well as modify its selection set. Any object that has children - * that can be selected should support this interface. - *
                • {@link AccessibleText} - the object presents editable textual information - * on the display. This interface provides the standard mechanism for - * an assistive technology to access that text via its content, attributes, - * and spatial location. Any object that contains editable text should - * support this interface. - *
                • {@link AccessibleValue} - the object supports a numerical value. This - * interface provides the standard mechanism for an assistive technology - * to determine and set the current value of the object, as well as obtain its - * minimum and maximum values. Any object that supports a numerical value - * should support this interface.
                + *
              2. {@link AccessibleAction} - the object can perform one or more actions. + * This interface provides the standard mechanism for an assistive technology + * to determine what those actions are and tell the object to perform them. + * Any object that can be manipulated should support this interface. + *
              3. {@link AccessibleComponent} - the object has a graphical + * representation. This interface provides the standard mechanism for an + * assistive technology to determine and set the graphical representation of + * the object. Any object that is rendered on the screen should support this + * interface. + *
              4. {@link AccessibleSelection} - the object allows its children to be + * selected. This interface provides the standard mechanism for an assistive + * technology to determine the currently selected children of the object as + * well as modify its selection set. Any object that has children that can be + * selected should support this interface. + *
              5. {@link AccessibleText} - the object presents editable textual + * information on the display. This interface provides the standard mechanism + * for an assistive technology to access that text via its content, + * attributes, and spatial location. Any object that contains editable text + * should support this interface. + *
              6. {@link AccessibleValue} - the object supports a numerical value. This + * interface provides the standard mechanism for an assistive technology to + * determine and set the current value of the object, as well as obtain its + * minimum and maximum values. Any object that supports a numerical value + * should support this interface. + * * - * @author Peter Korn - * @author Hans Muller - * @author Willie Walker - * @author Lynn Monsanto + * @author Peter Korn + * @author Hans Muller + * @author Willie Walker + * @author Lynn Monsanto */ @JavaBean(description = "Minimal information that all accessible objects return") -@SwingContainer(false) public abstract class AccessibleContext { /** - * The AppContext that should be used to dispatch events for this - * AccessibleContext + * The {@code AppContext} that should be used to dispatch events for this + * {@code AccessibleContext}. */ private volatile AppContext targetAppContext; @@ -112,115 +109,118 @@ public abstract class AccessibleContext { }); } - /** - * Constant used to determine when the accessibleName property has - * changed. The old value in the PropertyChangeEvent will be the old - * accessibleName and the new value will be the new accessibleName. - * - * @see #getAccessibleName - * @see #addPropertyChangeListener - */ - public static final String ACCESSIBLE_NAME_PROPERTY = "AccessibleName"; - - /** - * Constant used to determine when the accessibleDescription property has - * changed. The old value in the PropertyChangeEvent will be the - * old accessibleDescription and the new value will be the new - * accessibleDescription. - * - * @see #getAccessibleDescription - * @see #addPropertyChangeListener - */ - public static final String ACCESSIBLE_DESCRIPTION_PROPERTY = "AccessibleDescription"; - - /** - * Constant used to determine when the accessibleStateSet property has - * changed. The old value will be the old AccessibleState and the new - * value will be the new AccessibleState in the accessibleStateSet. - * For example, if a component that supports the vertical and horizontal - * states changes its orientation from vertical to horizontal, the old - * value will be AccessibleState.VERTICAL and the new value will be - * AccessibleState.HORIZONTAL. Please note that either value can also - * be null. For example, when a component changes from being enabled - * to disabled, the old value will be AccessibleState.ENABLED - * and the new value will be null. - * - * @see #getAccessibleStateSet - * @see AccessibleState - * @see AccessibleStateSet - * @see #addPropertyChangeListener - */ - public static final String ACCESSIBLE_STATE_PROPERTY = "AccessibleState"; - - /** - * Constant used to determine when the accessibleValue property has - * changed. The old value in the PropertyChangeEvent will be a Number - * representing the old value and the new value will be a Number - * representing the new value - * - * @see #getAccessibleValue - * @see #addPropertyChangeListener - */ - public static final String ACCESSIBLE_VALUE_PROPERTY = "AccessibleValue"; - - /** - * Constant used to determine when the accessibleSelection has changed. - * The old and new values in the PropertyChangeEvent are currently - * reserved for future use. - * - * @see #getAccessibleSelection - * @see #addPropertyChangeListener - */ - public static final String ACCESSIBLE_SELECTION_PROPERTY = "AccessibleSelection"; - - /** - * Constant used to determine when the accessibleText caret has changed. - * The old value in the PropertyChangeEvent will be an - * integer representing the old caret position, and the new value will - * be an integer representing the new/current caret position. - * - * @see #addPropertyChangeListener - */ - public static final String ACCESSIBLE_CARET_PROPERTY = "AccessibleCaret"; - - /** - * Constant used to determine when the visual appearance of the object - * has changed. The old and new values in the PropertyChangeEvent are - * currently reserved for future use. - * - * @see #addPropertyChangeListener - */ - public static final String ACCESSIBLE_VISIBLE_DATA_PROPERTY = "AccessibleVisibleData"; - - /** - * Constant used to determine when Accessible children are added/removed - * from the object. If an Accessible child is being added, the old - * value will be null and the new value will be the Accessible child. If an - * Accessible child is being removed, the old value will be the Accessible - * child, and the new value will be null. - * - * @see #addPropertyChangeListener - */ - public static final String ACCESSIBLE_CHILD_PROPERTY = "AccessibleChild"; - - /** - * Constant used to determine when the active descendant of a component - * has changed. The active descendant is used for objects such as - * list, tree, and table, which may have transient children. When the - * active descendant has changed, the old value of the property change - * event will be the Accessible representing the previous active child, and - * the new value will be the Accessible representing the current active - * child. - * - * @see #addPropertyChangeListener - */ - public static final String ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY = "AccessibleActiveDescendant"; + /** + * Constant used to determine when the {@link #accessibleName} property has + * changed. The old value in the {@code PropertyChangeEvent} will be the old + * {@code accessibleName} and the new value will be the new + * {@code accessibleName}. + * + * @see #getAccessibleName + * @see #addPropertyChangeListener + */ + public static final String ACCESSIBLE_NAME_PROPERTY = "AccessibleName"; /** - * Constant used to indicate that the table caption has changed - * The old value in the PropertyChangeEvent will be an Accessible - * representing the previous table caption and the new value will - * be an Accessible representing the new table caption. + * Constant used to determine when the {@link #accessibleDescription} + * property has changed. The old value in the {@code PropertyChangeEvent} + * will be the old {@code accessibleDescription} and the new value will be + * the new {@code accessibleDescription}. + * + * @see #getAccessibleDescription + * @see #addPropertyChangeListener + */ + public static final String ACCESSIBLE_DESCRIPTION_PROPERTY = "AccessibleDescription"; + + /** + * Constant used to determine when the {@code accessibleStateSet} property + * has changed. The old value will be the old {@code AccessibleState} and + * the new value will be the new {@code AccessibleState} in the + * {@code accessibleStateSet}. For example, if a component that supports the + * vertical and horizontal states changes its orientation from vertical to + * horizontal, the old value will be {@code AccessibleState.VERTICAL} and + * the new value will be {@code AccessibleState.HORIZONTAL}. Please note + * that either value can also be {@code null}. For example, when a component + * changes from being enabled to disabled, the old value will be + * {@code AccessibleState.ENABLED} and the new value will be {@code null}. + * + * @see #getAccessibleStateSet + * @see AccessibleState + * @see AccessibleStateSet + * @see #addPropertyChangeListener + */ + public static final String ACCESSIBLE_STATE_PROPERTY = "AccessibleState"; + + /** + * Constant used to determine when the {@code accessibleValue} property has + * changed. The old value in the {@code PropertyChangeEvent} will be a + * {@code Number} representing the old value and the new value will be a + * {@code Number} representing the new value. + * + * @see #getAccessibleValue + * @see #addPropertyChangeListener + */ + public static final String ACCESSIBLE_VALUE_PROPERTY = "AccessibleValue"; + + /** + * Constant used to determine when the {@code accessibleSelection} has + * changed. The old and new values in the {@code PropertyChangeEvent} are + * currently reserved for future use. + * + * @see #getAccessibleSelection + * @see #addPropertyChangeListener + */ + public static final String ACCESSIBLE_SELECTION_PROPERTY = "AccessibleSelection"; + + /** + * Constant used to determine when the {@code accessibleText} caret has + * changed. The old value in the {@code PropertyChangeEvent} will be an + * integer representing the old caret position, and the new value will be an + * integer representing the new/current caret position. + * + * @see #addPropertyChangeListener + */ + public static final String ACCESSIBLE_CARET_PROPERTY = "AccessibleCaret"; + + /** + * Constant used to determine when the visual appearance of the object has + * changed. The old and new values in the {@code PropertyChangeEvent} are + * currently reserved for future use. + * + * @see #addPropertyChangeListener + */ + public static final String ACCESSIBLE_VISIBLE_DATA_PROPERTY = "AccessibleVisibleData"; + + /** + * Constant used to determine when {@code Accessible} children are + * added/removed from the object. If an {@code Accessible} child is being + * added, the old value will be {@code null} and the new value will be the + * {@code Accessible} child. If an {@code Accessible} child is being + * removed, the old value will be the {@code Accessible} child, and the new + * value will be {@code null}. + * + * @see #addPropertyChangeListener + */ + public static final String ACCESSIBLE_CHILD_PROPERTY = "AccessibleChild"; + + /** + * Constant used to determine when the active descendant of a component has + * changed. The active descendant is used for objects such as list, tree, + * and table, which may have transient children. When the active descendant + * has changed, the old value of the property change event will be the + * {@code Accessible} representing the previous active child, and the new + * value will be the {@code Accessible} representing the current active + * child. + * + * @see #addPropertyChangeListener + */ + public static final String ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY = "AccessibleActiveDescendant"; + + /** + * Constant used to indicate that the table caption has changed. The old + * value in the {@code PropertyChangeEvent} will be an {@code Accessible} + * representing the previous table caption and the new value will be an + * {@code Accessible} representing the new table caption. + * * @see Accessible * @see AccessibleTable */ @@ -228,10 +228,11 @@ public abstract class AccessibleContext { "accessibleTableCaptionChanged"; /** - * Constant used to indicate that the table summary has changed - * The old value in the PropertyChangeEvent will be an Accessible - * representing the previous table summary and the new value will - * be an Accessible representing the new table summary. + * Constant used to indicate that the table summary has changed. The old + * value in the {@code PropertyChangeEvent} will be an {@code Accessible} + * representing the previous table summary and the new value will be an + * {@code Accessible} representing the new table summary. + * * @see Accessible * @see AccessibleTable */ @@ -239,10 +240,11 @@ public abstract class AccessibleContext { "accessibleTableSummaryChanged"; /** - * Constant used to indicate that table data has changed. - * The old value in the PropertyChangeEvent will be null and the - * new value will be an AccessibleTableModelChange representing - * the table change. + * Constant used to indicate that table data has changed. The old value in + * the {@code PropertyChangeEvent} will be {@code null} and the new value + * will be an {@code AccessibleTableModelChange} representing the table + * change. + * * @see AccessibleTable * @see AccessibleTableModelChange */ @@ -250,10 +252,11 @@ public abstract class AccessibleContext { "accessibleTableModelChanged"; /** - * Constant used to indicate that the row header has changed - * The old value in the PropertyChangeEvent will be null and the - * new value will be an AccessibleTableModelChange representing - * the header change. + * Constant used to indicate that the row header has changed. The old value + * in the {@code PropertyChangeEvent} will be {@code null} and the new value + * will be an {@code AccessibleTableModelChange} representing the header + * change. + * * @see AccessibleTable * @see AccessibleTableModelChange */ @@ -261,19 +264,21 @@ public abstract class AccessibleContext { "accessibleTableRowHeaderChanged"; /** - * Constant used to indicate that the row description has changed - * The old value in the PropertyChangeEvent will be null and the - * new value will be an Integer representing the row index. + * Constant used to indicate that the row description has changed. The old + * value in the {@code PropertyChangeEvent} will be {@code null} and the new + * value will be an {@code Integer} representing the row index. + * * @see AccessibleTable */ public static final String ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED = "accessibleTableRowDescriptionChanged"; /** - * Constant used to indicate that the column header has changed - * The old value in the PropertyChangeEvent will be null and the - * new value will be an AccessibleTableModelChange representing - * the header change. + * Constant used to indicate that the column header has changed. The old + * value in the {@code PropertyChangeEvent} will be {@code null} and the new + * value will be an {@code AccessibleTableModelChange} representing the + * header change. + * * @see AccessibleTable * @see AccessibleTableModelChange */ @@ -281,20 +286,22 @@ public abstract class AccessibleContext { "accessibleTableColumnHeaderChanged"; /** - * Constant used to indicate that the column description has changed - * The old value in the PropertyChangeEvent will be null and the - * new value will be an Integer representing the column index. + * Constant used to indicate that the column description has changed. The + * old value in the {@code PropertyChangeEvent} will be {@code null} and the + * new value will be an {@code Integer} representing the column index. + * * @see AccessibleTable */ public static final String ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED = "accessibleTableColumnDescriptionChanged"; /** - * Constant used to indicate that the supported set of actions - * has changed. The old value in the PropertyChangeEvent will - * be an Integer representing the old number of actions supported - * and the new value will be an Integer representing the new - * number of actions supported. + * Constant used to indicate that the supported set of actions has changed. + * The old value in the {@code PropertyChangeEvent} will be an + * {@code Integer} representing the old number of actions supported and the + * new value will be an {@code Integer} representing the new number of + * actions supported. + * * @see AccessibleAction */ public static final String ACCESSIBLE_ACTION_PROPERTY = @@ -302,30 +309,33 @@ public abstract class AccessibleContext { /** * Constant used to indicate that a hypertext element has received focus. - * The old value in the PropertyChangeEvent will be an Integer - * representing the start index in the document of the previous element - * that had focus and the new value will be an Integer representing - * the start index in the document of the current element that has - * focus. A value of -1 indicates that an element does not or did - * not have focus. + * The old value in the {@code PropertyChangeEvent} will be an + * {@code Integer} representing the start index in the document of the + * previous element that had focus and the new value will be an + * {@code Integer} representing the start index in the document of the + * current element that has focus. A value of -1 indicates that an element + * does not or did not have focus. + * * @see AccessibleHyperlink */ public static final String ACCESSIBLE_HYPERTEXT_OFFSET = "AccessibleHypertextOffset"; /** - * PropertyChangeEvent which indicates that text has changed. + * {@code PropertyChangeEvent} which indicates that text has changed. *
                - * For text insertion, the oldValue is null and the newValue - * is an AccessibleTextSequence specifying the text that was - * inserted. + * For text insertion, the {@code oldValue} is {@code null} and the + * {@code newValue} is an {@code AccessibleTextSequence} specifying the text + * that was inserted. *
                - * For text deletion, the oldValue is an AccessibleTextSequence - * specifying the text that was deleted and the newValue is null. + * For text deletion, the {@code oldValue} is an + * {@code AccessibleTextSequence} specifying the text that was deleted and + * the {@code newValue} is {@code null}. *
                - * For text replacement, the oldValue is an AccessibleTextSequence - * specifying the old text and the newValue is an AccessibleTextSequence - * specifying the new text. + * For text replacement, the {@code oldValue} is an + * {@code AccessibleTextSequence} specifying the old text and the + * {@code newValue} is an {@code AccessibleTextSequence} specifying the new + * text. * * @see #getAccessibleText * @see #addPropertyChangeListener @@ -335,53 +345,51 @@ public abstract class AccessibleContext { = "AccessibleText"; /** - * PropertyChangeEvent which indicates that a significant change - * has occurred to the children of a component like a tree or text. - * This change notifies the event listener that it needs to - * reacquire the state of the subcomponents. The oldValue is - * null and the newValue is the component whose children have - * become invalid. + * {@code PropertyChangeEvent} which indicates that a significant change has + * occurred to the children of a component like a tree or text. This change + * notifies the event listener that it needs to reacquire the state of the + * subcomponents. The {@code oldValue} is {@code null} and the + * {@code newValue} is the component whose children have become invalid. * * @see #getAccessibleText * @see #addPropertyChangeListener * @see AccessibleTextSequence - * * @since 1.5 */ public static final String ACCESSIBLE_INVALIDATE_CHILDREN = "accessibleInvalidateChildren"; - /** - * PropertyChangeEvent which indicates that text attributes have changed. + /** + * {@code PropertyChangeEvent} which indicates that text attributes have + * changed. *
                - * For attribute insertion, the oldValue is null and the newValue - * is an AccessibleAttributeSequence specifying the attributes that were - * inserted. + * For attribute insertion, the {@code oldValue} is {@code null} and the + * {@code newValue} is an {@code AccessibleAttributeSequence} specifying the + * attributes that were inserted. *
                - * For attribute deletion, the oldValue is an AccessibleAttributeSequence - * specifying the attributes that were deleted and the newValue is null. + * For attribute deletion, the {@code oldValue} is an + * {@code AccessibleAttributeSequence} specifying the attributes that were + * deleted and the {@code newValue} is {@code null}. *
                - * For attribute replacement, the oldValue is an AccessibleAttributeSequence - * specifying the old attributes and the newValue is an - * AccessibleAttributeSequence specifying the new attributes. + * For attribute replacement, the {@code oldValue} is an + * {@code AccessibleAttributeSequence} specifying the old attributes and the + * {@code newValue} is an {@code AccessibleAttributeSequence} specifying the + * new attributes. * * @see #getAccessibleText * @see #addPropertyChangeListener * @see AccessibleAttributeSequence - * * @since 1.5 */ public static final String ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED = "accessibleTextAttributesChanged"; - /** - * PropertyChangeEvent which indicates that a change has occurred - * in a component's bounds. - * The oldValue is the old component bounds and the newValue is - * the new component bounds. + /** + * {@code PropertyChangeEvent} which indicates that a change has occurred in + * a component's bounds. The {@code oldValue} is the old component bounds + * and the {@code newValue} is the new component bounds. * * @see #addPropertyChangeListener - * * @since 1.5 */ public static final String ACCESSIBLE_COMPONENT_BOUNDS_CHANGED = @@ -416,12 +424,13 @@ public abstract class AccessibleContext { * * @see #addPropertyChangeListener * @see #removePropertyChangeListener - * @see #firePropertyChangeListener + * @see #firePropertyChange */ private PropertyChangeSupport accessibleChangeSupport = null; /** - * Used to represent the context's relation set + * Used to represent the context's relation set. + * * @see #getAccessibleRelationSet */ private AccessibleRelationSet relationSet @@ -430,18 +439,17 @@ public abstract class AccessibleContext { private Object nativeAXResource; /** - * Gets the accessibleName property of this object. The accessibleName - * property of an object is a localized String that designates the purpose - * of the object. For example, the accessibleName property of a label - * or button might be the text of the label or button itself. In the - * case of an object that doesn't display its name, the accessibleName - * should still be set. For example, in the case of a text field used - * to enter the name of a city, the accessibleName for the en_US locale - * could be 'city.' - * - * @return the localized name of the object; null if this - * object does not have a name + * Gets the {@code accessibleName} property of this object. The + * {@code accessibleName} property of an object is a localized + * {@code String} that designates the purpose of the object. For example, + * the {@code accessibleName} property of a label or button might be the + * text of the label or button itself. In the case of an object that doesn't + * display its name, the {@code accessibleName} should still be set. For + * example, in the case of a text field used to enter the name of a city, + * the {@code accessibleName} for the {@code en_US} locale could be 'city.' * + * @return the localized name of the object; {@code null} if this object + * does not have a name * @see #setAccessibleName */ public String getAccessibleName() { @@ -449,12 +457,11 @@ public abstract class AccessibleContext { } /** - * Sets the localized accessible name of this object. Changing the - * name will cause a PropertyChangeEvent to be fired for the - * ACCESSIBLE_NAME_PROPERTY property. - * - * @param s the new localized name of the object. + * Sets the localized accessible name of this object. Changing the name will + * cause a {@code PropertyChangeEvent} to be fired for the + * {@code ACCESSIBLE_NAME_PROPERTY} property. * + * @param s the new localized name of the object * @see #getAccessibleName * @see #addPropertyChangeListener */ @@ -467,15 +474,14 @@ public abstract class AccessibleContext { } /** - * Gets the accessibleDescription property of this object. The - * accessibleDescription property of this object is a short localized - * phrase describing the purpose of the object. For example, in the - * case of a 'Cancel' button, the accessibleDescription could be + * Gets the {@code accessibleDescription} property of this object. The + * {@code accessibleDescription} property of this object is a short + * localized phrase describing the purpose of the object. For example, in + * the case of a 'Cancel' button, the {@code accessibleDescription} could be * 'Ignore changes and close dialog box.' * - * @return the localized description of the object; null if - * this object does not have a description - * + * @return the localized description of the object; {@code null} if this + * object does not have a description * @see #setAccessibleDescription */ public String getAccessibleDescription() { @@ -483,12 +489,11 @@ public abstract class AccessibleContext { } /** - * Sets the accessible description of this object. Changing the - * name will cause a PropertyChangeEvent to be fired for the - * ACCESSIBLE_DESCRIPTION_PROPERTY property. - * - * @param s the new localized description of the object + * Sets the accessible description of this object. Changing the name will + * cause a {@code PropertyChangeEvent} to be fired for the + * {@code ACCESSIBLE_DESCRIPTION_PROPERTY} property. * + * @param s the new localized description of the object * @see #setAccessibleName * @see #addPropertyChangeListener */ @@ -502,33 +507,36 @@ public abstract class AccessibleContext { } /** - * Gets the role of this object. The role of the object is the generic - * purpose or use of the class of this object. For example, the role - * of a push button is AccessibleRole.PUSH_BUTTON. The roles in - * AccessibleRole are provided so component developers can pick from - * a set of predefined roles. This enables assistive technologies to - * provide a consistent interface to various tweaked subclasses of - * components (e.g., use AccessibleRole.PUSH_BUTTON for all components - * that act like a push button) as well as distinguish between subclasses - * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes - * and AccessibleRole.RADIO_BUTTON for radio buttons). - *

                Note that the AccessibleRole class is also extensible, so - * custom component developers can define their own AccessibleRole's - * if the set of predefined roles is inadequate. + * Gets the role of this object. The role of the object is the generic + * purpose or use of the class of this object. For example, the role of a + * push button is {@code AccessibleRole.PUSH_BUTTON}. The roles in + * {@code AccessibleRole} are provided so component developers can pick from + * a set of predefined roles. This enables assistive technologies to provide + * a consistent interface to various tweaked subclasses of components (e.g., + * use {@code AccessibleRole.PUSH_BUTTON} for all components that act like a + * push button) as well as distinguish between subclasses that behave + * differently (e.g., {@code AccessibleRole.CHECK_BOX} for check boxes and + * {@code AccessibleRole.RADIO_BUTTON} for radio buttons). + *

                + * Note that the {@code AccessibleRole} class is also extensible, so custom + * component developers can define their own {@code AccessibleRole}'s if the + * set of predefined roles is inadequate. * - * @return an instance of AccessibleRole describing the role of the object + * @return an instance of {@code AccessibleRole} describing the role of the + * object * @see AccessibleRole */ public abstract AccessibleRole getAccessibleRole(); /** - * Gets the state set of this object. The AccessibleStateSet of an object - * is composed of a set of unique AccessibleStates. A change in the - * AccessibleStateSet of an object will cause a PropertyChangeEvent to - * be fired for the ACCESSIBLE_STATE_PROPERTY property. + * Gets the state set of this object. The {@code AccessibleStateSet} of an + * object is composed of a set of unique {@code AccessibleStates}. A change + * in the {@code AccessibleStateSet} of an object will cause a + * {@code PropertyChangeEvent} to be fired for the + * {@code ACCESSIBLE_STATE_PROPERTY} property. * - * @return an instance of AccessibleStateSet containing the - * current state set of the object + * @return an instance of {@code AccessibleStateSet} containing the current + * state set of the object * @see AccessibleStateSet * @see AccessibleState * @see #addPropertyChangeListener @@ -536,22 +544,22 @@ public abstract class AccessibleContext { public abstract AccessibleStateSet getAccessibleStateSet(); /** - * Gets the Accessible parent of this object. + * Gets the {@code Accessible} parent of this object. * - * @return the Accessible parent of this object; null if this - * object does not have an Accessible parent + * @return the {@code Accessible} parent of this object; {@code null} if + * this object does not have an {@code Accessible} parent */ public Accessible getAccessibleParent() { return accessibleParent; } /** - * Sets the Accessible parent of this object. This is meant to be used - * only in the situations where the actual component's parent should - * not be treated as the component's accessible parent and is a method - * that should only be called by the parent of the accessible child. + * Sets the {@code Accessible} parent of this object. This is meant to be + * used only in the situations where the actual component's parent should + * not be treated as the component's accessible parent and is a method that + * should only be called by the parent of the accessible child. * - * @param a - Accessible to be set as the parent + * @param a - {@code Accessible} to be set as the parent */ public void setAccessibleParent(Accessible a) { accessibleParent = a; @@ -560,9 +568,8 @@ public abstract class AccessibleContext { /** * Gets the 0-based index of this object in its accessible parent. * - * @return the 0-based index of this object in its parent; -1 if this - * object does not have an accessible parent. - * + * @return the 0-based index of this object in its parent; -1 if this object + * does not have an accessible parent. * @see #getAccessibleParent * @see #getAccessibleChildrenCount * @see #getAccessibleChild @@ -577,13 +584,13 @@ public abstract class AccessibleContext { public abstract int getAccessibleChildrenCount(); /** - * Returns the specified Accessible child of the object. The Accessible - * children of an Accessible object are zero-based, so the first child - * of an Accessible child is at index 0, the second child is at index 1, - * and so on. + * Returns the specified {@code Accessible} child of the object. The + * {@code Accessible} children of an {@code Accessible} object are + * zero-based, so the first child of an {@code Accessible} child is at index + * 0, the second child is at index 1, and so on. * - * @param i zero-based index of child - * @return the Accessible child of the object + * @param i zero-based index of child + * @return the {@code Accessible} child of the object * @see #getAccessibleChildrenCount */ public abstract Accessible getAccessibleChild(int i); @@ -592,21 +599,21 @@ public abstract class AccessibleContext { * Gets the locale of the component. If the component does not have a * locale, then the locale of its parent is returned. * - * @return this component's locale. If this component does not have - * a locale, the locale of its parent is returned. - * - * @exception IllegalComponentStateException - * If the Component does not have its own locale and has not yet been - * added to a containment hierarchy such that the locale can be - * determined from the containing parent. + * @return this component's locale. If this component does not have a + * locale, the locale of its parent is returned. + * @throws IllegalComponentStateException If the component does not have its + * own locale and has not yet been added to a containment hierarchy + * such that the locale can be determined from the containing + * parent */ public abstract Locale getLocale() throws IllegalComponentStateException; /** - * Adds a PropertyChangeListener to the listener list. - * The listener is registered for all Accessible properties and will - * be called when those properties change. + * Adds a {@code PropertyChangeListener} to the listener list. The listener + * is registered for all {@code Accessible} properties and will be called + * when those properties change. * + * @param listener The PropertyChangeListener to be added * @see #ACCESSIBLE_NAME_PROPERTY * @see #ACCESSIBLE_DESCRIPTION_PROPERTY * @see #ACCESSIBLE_STATE_PROPERTY @@ -614,8 +621,6 @@ public abstract class AccessibleContext { * @see #ACCESSIBLE_SELECTION_PROPERTY * @see #ACCESSIBLE_TEXT_PROPERTY * @see #ACCESSIBLE_VISIBLE_DATA_PROPERTY - * - * @param listener The PropertyChangeListener to be added */ public void addPropertyChangeListener(PropertyChangeListener listener) { if (accessibleChangeSupport == null) { @@ -625,11 +630,11 @@ public abstract class AccessibleContext { } /** - * Removes a PropertyChangeListener from the listener list. - * This removes a PropertyChangeListener that was registered - * for all properties. + * Removes a {@code PropertyChangeListener} from the listener list. This + * removes a {@code PropertyChangeListener} that was registered for all + * properties. * - * @param listener The PropertyChangeListener to be removed + * @param listener The PropertyChangeListener to be removed */ public void removePropertyChangeListener(PropertyChangeListener listener) { if (accessibleChangeSupport != null) { @@ -638,10 +643,11 @@ public abstract class AccessibleContext { } /** - * Gets the AccessibleAction associated with this object that supports - * one or more actions. + * Gets the {@code AccessibleAction} associated with this object that + * supports one or more actions. * - * @return AccessibleAction if supported by object; else return null + * @return {@code AccessibleAction} if supported by object; else return + * {@code null} * @see AccessibleAction */ public AccessibleAction getAccessibleAction() { @@ -649,10 +655,11 @@ public abstract class AccessibleContext { } /** - * Gets the AccessibleComponent associated with this object that has a - * graphical representation. + * Gets the {@code AccessibleComponent} associated with this object that has + * a graphical representation. * - * @return AccessibleComponent if supported by object; else return null + * @return {@code AccessibleComponent} if supported by object; else return + * {@code null} * @see AccessibleComponent */ public AccessibleComponent getAccessibleComponent() { @@ -660,10 +667,11 @@ public abstract class AccessibleContext { } /** - * Gets the AccessibleSelection associated with this object which allows its - * Accessible children to be selected. + * Gets the {@code AccessibleSelection} associated with this object which + * allows its {@code Accessible} children to be selected. * - * @return AccessibleSelection if supported by object; else return null + * @return {@code AccessibleSelection} if supported by object; else return + * {@code null} * @see AccessibleSelection */ public AccessibleSelection getAccessibleSelection() { @@ -671,10 +679,11 @@ public abstract class AccessibleContext { } /** - * Gets the AccessibleText associated with this object presenting + * Gets the {@code AccessibleText} associated with this object presenting * text on the display. * - * @return AccessibleText if supported by object; else return null + * @return {@code AccessibleText} if supported by object; else return + * {@code null} * @see AccessibleText */ public AccessibleText getAccessibleText() { @@ -682,10 +691,11 @@ public abstract class AccessibleContext { } /** - * Gets the AccessibleEditableText associated with this object + * Gets the {@code AccessibleEditableText} associated with this object * presenting editable text on the display. * - * @return AccessibleEditableText if supported by object; else return null + * @return {@code AccessibleEditableText} if supported by object; else + * return {@code null} * @see AccessibleEditableText * @since 1.4 */ @@ -693,12 +703,12 @@ public abstract class AccessibleContext { return null; } - /** - * Gets the AccessibleValue associated with this object that supports a - * Numerical value. + * Gets the {@code AccessibleValue} associated with this object that + * supports a {@code Numerical} value. * - * @return AccessibleValue if supported by object; else return null + * @return {@code AccessibleValue} if supported by object; else return + * {@code null} * @see AccessibleValue */ public AccessibleValue getAccessibleValue() { @@ -706,11 +716,11 @@ public abstract class AccessibleContext { } /** - * Gets the AccessibleIcons associated with an object that has - * one or more associated icons + * Gets the {@code AccessibleIcons} associated with an object that has one + * or more associated icons. * - * @return an array of AccessibleIcon if supported by object; - * otherwise return null + * @return an array of {@code AccessibleIcon} if supported by object; + * otherwise return {@code null} * @see AccessibleIcon * @since 1.3 */ @@ -719,10 +729,10 @@ public abstract class AccessibleContext { } /** - * Gets the AccessibleRelationSet associated with an object + * Gets the {@code AccessibleRelationSet} associated with an object. * - * @return an AccessibleRelationSet if supported by object; - * otherwise return null + * @return an {@code AccessibleRelationSet} if supported by object; + * otherwise return {@code null} * @see AccessibleRelationSet * @since 1.3 */ @@ -731,10 +741,10 @@ public abstract class AccessibleContext { } /** - * Gets the AccessibleTable associated with an object + * Gets the {@code AccessibleTable} associated with an object. * - * @return an AccessibleTable if supported by object; - * otherwise return null + * @return an {@code AccessibleTable} if supported by object; otherwise return + * {@code null} * @see AccessibleTable * @since 1.3 */ @@ -743,16 +753,17 @@ public abstract class AccessibleContext { } /** - * Support for reporting bound property changes. If oldValue and - * newValue are not equal and the PropertyChangeEvent listener list - * is not empty, then fire a PropertyChange event to each listener. - * In general, this is for use by the Accessible objects themselves - * and should not be called by an application program. - * @param propertyName The programmatic name of the property that - * was changed. - * @param oldValue The old value of the property. - * @param newValue The new value of the property. - * @see java.beans.PropertyChangeSupport + * Support for reporting bound property changes. If {@code oldValue} and + * {@code newValue} are not equal and the {@code PropertyChangeEvent} + * listener list is not empty, then fire a {@code PropertyChange} event to + * each listener. In general, this is for use by the {@code Accessible} + * objects themselves and should not be called by an application program. + * + * @param propertyName The programmatic name of the property that was + * changed + * @param oldValue The old value of the property + * @param newValue The new value of the property + * @see PropertyChangeSupport * @see #addPropertyChangeListener * @see #removePropertyChangeListener * @see #ACCESSIBLE_NAME_PROPERTY diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleEditableText.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleEditableText.java index bf31f3d0f37..878ba590aff 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleEditableText.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleEditableText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -25,109 +25,102 @@ package javax.accessibility; -import java.util.*; -import java.awt.*; -import javax.swing.text.*; +import javax.swing.text.AttributeSet; /** - *

                The AccessibleEditableText interface should be implemented by all - * classes that present editable textual information on the display. - * Along with the AccessibleText interface, this interface provides - * the standard mechanism for an assistive technology to access - * that text via its content, attributes, and spatial location. - * Applications can determine if an object supports the AccessibleEditableText - * interface by first obtaining its AccessibleContext (see {@link Accessible}) - * and then calling the {@link AccessibleContext#getAccessibleEditableText} - * method of AccessibleContext. If the return value is not null, the object - * supports this interface. + * The {@code AccessibleEditableText} interface should be implemented by all + * classes that present editable textual information on the display. Along with + * the {@code AccessibleText} interface, this interface provides the standard + * mechanism for an assistive technology to access that text via its content, + * attributes, and spatial location. Applications can determine if an object + * supports the {@code AccessibleEditableText} interface by first obtaining its + * {@code AccessibleContext} (see {@link Accessible}) and then calling the + * {@link AccessibleContext#getAccessibleEditableText} method of + * {@code AccessibleContext}. If the return value is not {@code null}, the + * object supports this interface. * + * @author Lynn Monsanto * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleContext#getAccessibleText * @see AccessibleContext#getAccessibleEditableText - * - * @author Lynn Monsanto * @since 1.4 */ - public interface AccessibleEditableText extends AccessibleText { /** * Sets the text contents to the specified string. * - * @param s the string to set the text contents + * @param s the string to set the text contents */ public void setTextContents(String s); /** - * Inserts the specified string at the given index/ + * Inserts the specified string at the given index. * - * @param index the index in the text where the string will - * be inserted - * @param s the string to insert in the text + * @param index the index in the text where the string will be inserted + * @param s the string to insert in the text */ public void insertTextAtIndex(int index, String s); /** * Returns the text string between two indices. * - * @param startIndex the starting index in the text - * @param endIndex the ending index in the text + * @param startIndex the starting index in the text + * @param endIndex the ending index in the text * @return the text string between the indices */ public String getTextRange(int startIndex, int endIndex); /** - * Deletes the text between two indices + * Deletes the text between two indices. * - * @param startIndex the starting index in the text - * @param endIndex the ending index in the text + * @param startIndex the starting index in the text + * @param endIndex the ending index in the text */ public void delete(int startIndex, int endIndex); /** * Cuts the text between two indices into the system clipboard. * - * @param startIndex the starting index in the text - * @param endIndex the ending index in the text + * @param startIndex the starting index in the text + * @param endIndex the ending index in the text */ public void cut(int startIndex, int endIndex); /** - * Pastes the text from the system clipboard into the text - * starting at the specified index. + * Pastes the text from the system clipboard into the text starting at the + * specified index. * - * @param startIndex the starting index in the text + * @param startIndex the starting index in the text */ public void paste(int startIndex); /** - * Replaces the text between two indices with the specified - * string. + * Replaces the text between two indices with the specified string. * - * @param startIndex the starting index in the text - * @param endIndex the ending index in the text - * @param s the string to replace the text between two indices + * @param startIndex the starting index in the text + * @param endIndex the ending index in the text + * @param s the string to replace the text between two indices */ public void replaceText(int startIndex, int endIndex, String s); /** * Selects the text between two indices. * - * @param startIndex the starting index in the text - * @param endIndex the ending index in the text + * @param startIndex the starting index in the text + * @param endIndex the ending index in the text */ public void selectText(int startIndex, int endIndex); /** * Sets attributes for the text between two indices. * - * @param startIndex the starting index in the text - * @param endIndex the ending index in the text - * @param as the attribute set + * @param startIndex the starting index in the text + * @param endIndex the ending index in the text + * @param as the attribute set * @see AttributeSet */ public void setAttributes(int startIndex, int endIndex, AttributeSet as); - } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedComponent.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedComponent.java index d51383c4ffe..9a980639861 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedComponent.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -26,48 +26,46 @@ package javax.accessibility; /** - * The AccessibleExtendedComponent interface should be supported by any object - * that is rendered on the screen. This interface provides the standard - * mechanism for an assistive technology to determine the extended - * graphical representation of an object. Applications can determine - * if an object supports the AccessibleExtendedComponent interface by first - * obtaining its AccessibleContext - * and then calling the - * {@link AccessibleContext#getAccessibleComponent} method. - * If the return value is not null and the type of the return value is - * AccessibleExtendedComponent, the object supports this interface. + * The {@code AccessibleExtendedComponent} interface should be supported by any + * object that is rendered on the screen. This interface provides the standard + * mechanism for an assistive technology to determine the extended graphical + * representation of an object. Applications can determine if an object supports + * the {@code AccessibleExtendedComponent} interface by first obtaining its + * {@code AccessibleContext} and then calling the + * {@link AccessibleContext#getAccessibleComponent} method. If the return value + * is not {@code null} and the type of the return value is + * {@code AccessibleExtendedComponent}, the object supports this interface. * + * @author Lynn Monsanto * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleContext#getAccessibleComponent - * - * @author Lynn Monsanto * @since 1.4 */ public interface AccessibleExtendedComponent extends AccessibleComponent { /** - * Returns the tool tip text + * Returns the tool tip text. * - * @return the tool tip text, if supported, of the object; - * otherwise, null + * @return the tool tip text, if supported, of the object; otherwise, + * {@code null} */ public String getToolTipText(); /** - * Returns the titled border text + * Returns the titled border text. * - * @return the titled border text, if supported, of the object; - * otherwise, null + * @return the titled border text, if supported, of the object; otherwise, + * {@code null} */ public String getTitledBorderText(); /** - * Returns key bindings associated with this object + * Returns key bindings associated with this object. * - * @return the key bindings, if supported, of the object; - * otherwise, null + * @return the key bindings, if supported, of the object; otherwise, + * {@code null} * @see AccessibleKeyBinding */ public AccessibleKeyBinding getAccessibleKeyBinding(); diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedTable.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedTable.java index 87385639db1..ca16c72472d 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedTable.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -22,52 +22,49 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package javax.accessibility; /** - * Class AccessibleExtendedTable provides extended information about - * a user-interface component that presents data in a two-dimensional - * table format. - * Applications can determine if an object supports the - * AccessibleExtendedTable interface by first obtaining its - * AccessibleContext and then calling the - * {@link AccessibleContext#getAccessibleTable} method. - * If the return value is not null and the type of the return value is - * AccessibleExtendedTable, the object supports this interface. - * - * @author Lynn Monsanto - * @since 1.4 - */ + * Class {@code AccessibleExtendedTable} provides extended information about a + * user-interface component that presents data in a two-dimensional table + * format. Applications can determine if an object supports the + * {@code AccessibleExtendedTable} interface by first obtaining its + * {@code AccessibleContext} and then calling the + * {@link AccessibleContext#getAccessibleTable} method. If the return value is + * not {@code null} and the type of the return value is + * {@code AccessibleExtendedTable}, the object supports this interface. + * + * @author Lynn Monsanto + * @since 1.4 + */ public interface AccessibleExtendedTable extends AccessibleTable { - /** - * Returns the row number of an index in the table. - * - * @param index the zero-based index in the table. The index is - * the table cell offset from row == 0 and column == 0. - * @return the zero-based row of the table if one exists; - * otherwise -1. - */ - public int getAccessibleRow(int index); - - /** - * Returns the column number of an index in the table. - * - * @param index the zero-based index in the table. The index is - * the table cell offset from row == 0 and column == 0. - * @return the zero-based column of the table if one exists; - * otherwise -1. - */ - public int getAccessibleColumn(int index); + /** + * Returns the row number of an index in the table. + * + * @param index the zero-based index in the table. The index is the table + * cell offset from row == 0 and column == 0. + * @return the zero-based row of the table if one exists; otherwise -1 + */ + public int getAccessibleRow(int index); /** - * Returns the index at a row and column in the table. - * - * @param r zero-based row of the table - * @param c zero-based column of the table - * @return the zero-based index in the table if one exists; - * otherwise -1. The index is the table cell offset from - * row == 0 and column == 0. - */ - public int getAccessibleIndex(int r, int c); + * Returns the column number of an index in the table. + * + * @param index the zero-based index in the table. The index is the table + * cell offset from row == 0 and column == 0. + * @return the zero-based column of the table if one exists; otherwise -1 + */ + public int getAccessibleColumn(int index); + + /** + * Returns the index at a row and column in the table. + * + * @param r zero-based row of the table + * @param c zero-based column of the table + * @return the zero-based index in the table if one exists; otherwise -1. + * The index is the table cell offset from row == 0 and column == 0. + */ + public int getAccessibleIndex(int r, int c); } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedText.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedText.java index dc58f8c0956..dd8a5f5f184 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedText.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleExtendedText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -25,29 +25,25 @@ package javax.accessibility; - -import java.util.*; -import java.awt.*; -import javax.swing.text.*; - +import java.awt.Rectangle; /** - *

                The AccessibleExtendedText interface contains additional methods - * not provided by the AccessibleText interface - * - * Applications can determine if an object supports the AccessibleExtendedText - * interface by first obtaining its AccessibleContext (see {@link Accessible}) - * and then calling the {@link AccessibleContext#getAccessibleText} method of - * AccessibleContext. If the return value is an instance of - * AccessibleExtendedText, the object supports this interface. + * The {@code AccessibleExtendedText} interface contains additional methods not + * provided by the {@code AccessibleText} interface. + *

                + * Applications can determine if an object supports the + * {@code AccessibleExtendedText} interface by first obtaining its + * {@code AccessibleContext} (see {@link Accessible}) and then calling the + * {@link AccessibleContext#getAccessibleText} method of + * {@code AccessibleContext}. If the return value is an instance of + * {@code AccessibleExtendedText}, the object supports this interface. * + * @author Peter Korn + * @author Lynn Monsanto * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleContext#getAccessibleText - * - * @author Peter Korn - * @author Lynn Monsanto * @since 1.5 */ public interface AccessibleExtendedText { @@ -73,25 +69,24 @@ public interface AccessibleExtendedText { public static final int ATTRIBUTE_RUN = 5; // BugID: 4849720 /** - * Returns the text between two indices + * Returns the text between two indices. * - * @param startIndex the start index in the text - * @param endIndex the end index in the text - * @return the text string if the indices are valid. - * Otherwise, null is returned. + * @param startIndex the start index in the text + * @param endIndex the end index in the text + * @return the text string if the indices are valid. Otherwise, {@code null} + * is returned. */ public String getTextRange(int startIndex, int endIndex); /** * Returns the {@code AccessibleTextSequence} at a given index. * - * @param part the {@code CHARACTER}, {@code WORD}, - * {@code SENTENCE}, {@code LINE} or {@code ATTRIBUTE_RUN} - * to retrieve - * @param index an index within the text - * @return an {@code AccessibleTextSequence} specifying the text - * if part and index are valid. Otherwise, null is returned. - * + * @param part the {@code CHARACTER}, {@code WORD}, {@code SENTENCE}, + * {@code LINE} or {@code ATTRIBUTE_RUN} to retrieve + * @param index an index within the text + * @return an {@code AccessibleTextSequence} specifying the text if + * {@code part} and {@code index} are valid. Otherwise, {@code null} + * is returned. * @see AccessibleText#CHARACTER * @see AccessibleText#WORD * @see AccessibleText#SENTENCE @@ -101,13 +96,12 @@ public interface AccessibleExtendedText { /** * Returns the {@code AccessibleTextSequence} after a given index. * - * @param part the {@code CHARACTER}, {@code WORD}, - * {@code SENTENCE}, {@code LINE} or {@code ATTRIBUTE_RUN} - * to retrieve - * @param index an index within the text - * @return an {@code AccessibleTextSequence} specifying the text - * if part and index are valid. Otherwise, null is returned. - * + * @param part the {@code CHARACTER}, {@code WORD}, {@code SENTENCE}, + * {@code LINE} or {@code ATTRIBUTE_RUN} to retrieve + * @param index an index within the text + * @return an {@code AccessibleTextSequence} specifying the text if + * {@code part} and {@code index} are valid. Otherwise, {@code null} + * is returned. * @see AccessibleText#CHARACTER * @see AccessibleText#WORD * @see AccessibleText#SENTENCE @@ -117,13 +111,12 @@ public interface AccessibleExtendedText { /** * Returns the {@code AccessibleTextSequence} before a given index. * - * @param part the {@code CHARACTER}, {@code WORD}, - * {@code SENTENCE}, {@code LINE} or {@code ATTRIBUTE_RUN} - * to retrieve - * @param index an index within the text - * @return an {@code AccessibleTextSequence} specifying the text - * if part and index are valid. Otherwise, null is returned. - * + * @param part the {@code CHARACTER}, {@code WORD}, {@code SENTENCE}, + * {@code LINE} or {@code ATTRIBUTE_RUN} to retrieve + * @param index an index within the text + * @return an {@code AccessibleTextSequence} specifying the text if + * {@code part} and {@code index} are valid. Otherwise, {@code null} + * is returned. * @see AccessibleText#CHARACTER * @see AccessibleText#WORD * @see AccessibleText#SENTENCE @@ -133,10 +126,10 @@ public interface AccessibleExtendedText { /** * Returns the bounding rectangle of the text between two indices. * - * @param startIndex the start index in the text - * @param endIndex the end index in the text + * @param startIndex the start index in the text + * @param endIndex the end index in the text * @return the bounding rectangle of the text if the indices are valid. - * Otherwise, null is returned. + * Otherwise, {@code null} is returned. */ public Rectangle getTextBounds(int startIndex, int endIndex); } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleHyperlink.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleHyperlink.java index 603f880b87c..2df088b13d4 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleHyperlink.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleHyperlink.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,116 +25,103 @@ package javax.accessibility; - -import java.util.*; -import java.awt.*; -import javax.swing.text.*; - - /** - * Encapsulation of a link, or set of links (e.g. client side imagemap) - * in a Hypertext document + * Encapsulation of a link, or set of links (e.g. client side imagemap) in a + * Hypertext document * + * @author Peter Korn * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleText * @see AccessibleContext#getAccessibleText - * - * @author Peter Korn */ public abstract class AccessibleHyperlink implements AccessibleAction { - /** - * Since the document a link is associated with may have - * changed, this method returns whether or not this Link is still valid - * (with respect to the document it references). - * - * @return a flag indicating whether this link is still valid with - * respect to the AccessibleHypertext it belongs to - */ - public abstract boolean isValid(); + /** + * Since the document a link is associated with may have changed, this + * method returns whether or not this Link is still valid (with respect to + * the document it references). + * + * @return a flag indicating whether this link is still valid with respect + * to the {@code AccessibleHypertext} it belongs to + */ + public abstract boolean isValid(); - /** - * Returns the number of accessible actions available in this Link - * If there are more than one, the first one is NOT considered the - * "default" action of this LINK object (e.g. in an HTML imagemap). - * In general, links will have only one AccessibleAction in them. - * - * @return the zero-based number of Actions in this object - */ - public abstract int getAccessibleActionCount(); + /** + * Returns the number of accessible actions available in this Link If there + * are more than one, the first one is NOT considered the "default" action + * of this LINK object (e.g. in an HTML imagemap). In general, links will + * have only one {@code AccessibleAction} in them. + * + * @return the zero-based number of actions in this object + */ + public abstract int getAccessibleActionCount(); - /** - * Performs the specified Action on the object - * - * @param i zero-based index of actions - * @return true if the action was performed; otherwise false. - * @see #getAccessibleActionCount - */ - public abstract boolean doAccessibleAction(int i); + /** + * Performs the specified action on the object. + * + * @param i zero-based index of actions + * @return {@code true} if the action was performed; otherwise {@code false} + * @see #getAccessibleActionCount + */ + public abstract boolean doAccessibleAction(int i); - /** - * Returns a String description of this particular - * link action. This should be a text string - * associated with anchoring text, this should be the - * anchor text. E.g. from HTML: - * <a HREF="http://www.sun.com/access">Accessibility</a> - * this method would return "Accessibility". - * - * Similarly, from this HTML: - * <a HREF="#top"><img src="top-hat.gif" alt="top hat"></a> - * this method would return "top hat" - * - * @param i zero-based index of the actions - * @return a String description of the action - * @see #getAccessibleActionCount - */ - public abstract String getAccessibleActionDescription(int i); + /** + * Returns a string description of this particular link action. This should + * be a text string associated with anchoring text, this should be the + * anchor text. E.g. from HTML: <a + * HREF="http://www.sun.com/access">Accessibility</a> this method + * would return "Accessibility". + *

                + * Similarly, from this HTML: <a HREF="#top"><img src="top-hat.gif" + * alt="top hat"></a> this method would return "top hat" + * + * @param i zero-based index of the actions + * @return a string description of the action + * @see #getAccessibleActionCount + */ + public abstract String getAccessibleActionDescription(int i); - /** - * Returns an object that represents the link action, - * as appropriate for that link. E.g. from HTML: - * <a HREF="http://www.sun.com/access">Accessibility</a> - * this method would return a - * java.net.URL("http://www.sun.com/access.html"); - * - * @param i zero-based index of the actions - * @return an Object representing the hypertext link itself - * @see #getAccessibleActionCount - */ - public abstract Object getAccessibleActionObject(int i); + /** + * Returns an object that represents the link action, as appropriate for + * that link. E.g. from HTML: <a + * HREF="http://www.sun.com/access">Accessibility</a> this method + * would return a java.net.URL("http://www.sun.com/access.html"); + * + * @param i zero-based index of the actions + * @return an object representing the hypertext link itself + * @see #getAccessibleActionCount + */ + public abstract Object getAccessibleActionObject(int i); - /** - * Returns an object that represents the link anchor, - * as appropriate for that link. E.g. from HTML: - * <a href="http://www.sun.com/access">Accessibility</a> - * this method would return a String containing the text: - * "Accessibility". - * - * Similarly, from this HTML: - * <a HREF="#top"><img src="top-hat.gif" alt="top hat"></a> - * this might return the object ImageIcon("top-hat.gif", "top hat"); - * - * @param i zero-based index of the actions - * @return an Object representing the hypertext anchor - * @see #getAccessibleActionCount - */ - public abstract Object getAccessibleActionAnchor(int i); + /** + * Returns an object that represents the link anchor, as appropriate for + * that link. E.g. from HTML: <a + * href="http://www.sun.com/access">Accessibility</a> this method + * would return a {@code String} containing the text: "Accessibility". + *

                + * Similarly, from this HTML: <a HREF="#top"><img src="top-hat.gif" + * alt="top hat"></a> this might return the object + * ImageIcon("top-hat.gif", "top hat"); + * + * @param i zero-based index of the actions + * @return an object representing the hypertext anchor + * @see #getAccessibleActionCount + */ + public abstract Object getAccessibleActionAnchor(int i); - /** - * Gets the index with the hypertext document at which this - * link begins - * - * @return index of start of link - */ - public abstract int getStartIndex(); + /** + * Gets the index with the hypertext document at which this link begins. + * + * @return index of start of link + */ + public abstract int getStartIndex(); - /** - * Gets the index with the hypertext document at which this - * link ends - * - * @return index of end of link - */ - public abstract int getEndIndex(); + /** + * Gets the index with the hypertext document at which this link ends. + * + * @return index of end of link + */ + public abstract int getEndIndex(); } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleHypertext.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleHypertext.java index 74b868078b3..1e09b729c3a 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleHypertext.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleHypertext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,56 +25,50 @@ package javax.accessibility; - -import java.util.*; -import java.awt.*; -import javax.swing.text.*; - - /** - *

                The AccessibleHypertext class is the base class for all - * classes that present hypertext information on the display. This class - * provides the standard mechanism for an assistive technology to access - * that text via its content, attributes, and spatial location. - * It also provides standard mechanisms for manipulating hyperlinks. - * Applications can determine if an object supports the AccessibleHypertext - * interface by first obtaining its AccessibleContext (see {@link Accessible}) - * and then calling the {@link AccessibleContext#getAccessibleText} - * method of AccessibleContext. If the return value is a class which extends - * AccessibleHypertext, then that object supports AccessibleHypertext. + * The {@code AccessibleHypertext} class is the base class for all classes that + * present hypertext information on the display. This class provides the + * standard mechanism for an assistive technology to access that text via its + * content, attributes, and spatial location. It also provides standard + * mechanisms for manipulating hyperlinks. Applications can determine if an + * object supports the {@code AccessibleHypertext} interface by first obtaining + * its {@code AccessibleContext} (see {@link Accessible}) and then calling the + * {@link AccessibleContext#getAccessibleText} method of + * {@code AccessibleContext}. If the return value is a class which extends + * {@code AccessibleHypertext}, then that object supports + * {@code AccessibleHypertext}. * + * @author Peter Korn * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleText * @see AccessibleContext#getAccessibleText - * - * @author Peter Korn */ public interface AccessibleHypertext extends AccessibleText { /** * Returns the number of links within this hypertext document. * - * @return number of links in this hypertext doc. + * @return number of links in this hypertext doc */ public abstract int getLinkCount(); /** * Returns the nth Link of this Hypertext document. * - * @param linkIndex within the links of this Hypertext + * @param linkIndex within the links of this Hypertext * @return Link object encapsulating the nth link(s) */ public abstract AccessibleHyperlink getLink(int linkIndex); /** - * Returns the index into an array of hyperlinks that - * is associated with this character index, or -1 if there - * is no hyperlink associated with this index. + * Returns the index into an array of hyperlinks that is associated with + * this character index, or -1 if there is no hyperlink associated with this + * index. * - * @param charIndex index within the text - * @return index into the set of hyperlinks for this hypertext doc. + * @param charIndex index within the text + * @return index into the set of hyperlinks for this hypertext doc */ public abstract int getLinkIndex(int charIndex); } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleIcon.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleIcon.java index d44789257e2..5a506bbc3ac 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleIcon.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleIcon.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -26,57 +26,51 @@ package javax.accessibility; /** - * The AccessibleIcon interface should be supported by any object - * that has an associated icon (e.g., buttons). This interface - * provides the standard mechanism for an assistive technology - * to get descriptive information about icons. - * Applications can determine - * if an object supports the AccessibleIcon interface by first - * obtaining its AccessibleContext (see - * {@link Accessible}) and then calling the - * {@link AccessibleContext#getAccessibleIcon} method. - * If the return value is not null, the object supports this interface. + * The {@code AccessibleIcon} interface should be supported by any object that + * has an associated icon (e.g., buttons). This interface provides the standard + * mechanism for an assistive technology to get descriptive information about + * icons. Applications can determine if an object supports the + * {@code AccessibleIcon} interface by first obtaining its + * {@code AccessibleContext} (see {@link Accessible}) and then calling the + * {@link AccessibleContext#getAccessibleIcon} method. If the return value is + * not {@code null}, the object supports this interface. * + * @author Lynn Monsanto * @see Accessible * @see AccessibleContext - * - * @author Lynn Monsanto * @since 1.3 */ public interface AccessibleIcon { /** - * Gets the description of the icon. This is meant to be a brief - * textual description of the object. For example, it might be - * presented to a blind user to give an indication of the purpose - * of the icon. + * Gets the description of the icon. This is meant to be a brief textual + * description of the object. For example, it might be presented to a blind + * user to give an indication of the purpose of the icon. * * @return the description of the icon */ public String getAccessibleIconDescription(); /** - * Sets the description of the icon. This is meant to be a brief - * textual description of the object. For example, it might be - * presented to a blind user to give an indication of the purpose - * of the icon. + * Sets the description of the icon. This is meant to be a brief textual + * description of the object. For example, it might be presented to a blind + * user to give an indication of the purpose of the icon. * - * @param description the description of the icon + * @param description the description of the icon */ public void setAccessibleIconDescription(String description); /** - * Gets the width of the icon + * Gets the width of the icon. * - * @return the width of the icon. + * @return the width of the icon */ public int getAccessibleIconWidth(); /** - * Gets the height of the icon + * Gets the height of the icon. * - * @return the height of the icon. + * @return the height of the icon */ public int getAccessibleIconHeight(); - } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleKeyBinding.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleKeyBinding.java index 5fd20ffc2df..a7e32a35c92 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleKeyBinding.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleKeyBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -26,38 +26,36 @@ package javax.accessibility; /** - * The AccessibleKeyBinding interface should be supported by any object + * The {@code AccessibleKeyBinding} interface should be supported by any object * that has a keyboard bindings such as a keyboard mnemonic and/or keyboard - * shortcut which can be used to select the object. This interface provides - * the standard mechanism for an assistive technology to determine the - * key bindings which exist for this object. - * Any object that has such key bindings should support this - * interface. + * shortcut which can be used to select the object. This interface provides the + * standard mechanism for an assistive technology to determine the key bindings + * which exist for this object. Any object that has such key bindings should + * support this interface. * + * @author Lynn Monsanto * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext - * - * @author Lynn Monsanto * @since 1.4 */ public interface AccessibleKeyBinding { /** - * Returns the number of key bindings for this object + * Returns the number of key bindings for this object. * * @return the zero-based number of key bindings for this object */ public int getAccessibleKeyBindingCount(); /** - * Returns a key binding for this object. The value returned is an - * java.lang.Object which must be cast to appropriate type depending + * Returns a key binding for this object. The value returned is an + * {@code java.lang.Object} which must be cast to appropriate type depending * on the underlying implementation of the key. * - * @param i zero-based index of the key bindings - * @return a javax.lang.Object which specifies the key binding + * @param i zero-based index of the key bindings + * @return a {@code javax.lang.Object} which specifies the key binding * @see #getAccessibleKeyBindingCount */ - public java.lang.Object getAccessibleKeyBinding(int i); + public Object getAccessibleKeyBinding(int i); } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRelation.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRelation.java index 3a6ed056b53..5f8088646c2 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRelation.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRelation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -25,39 +25,36 @@ package javax.accessibility; -import java.util.Vector; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - /** - *

                Class AccessibleRelation describes a relation between the - * object that implements the AccessibleRelation and one or more other - * objects. The actual relations that an object has with other - * objects are defined as an AccessibleRelationSet, which is a composed - * set of AccessibleRelations. - *

                The toDisplayString method allows you to obtain the localized string - * for a locale independent key from a predefined ResourceBundle for the - * keys defined in this class. - *

                The constants in this class present a strongly typed enumeration - * of common object roles. If the constants in this class are not sufficient - * to describe the role of an object, a subclass should be generated - * from this class and it should provide constants in a similar manner. + * Class {@code AccessibleRelation} describes a relation between the object that + * implements the {@code AccessibleRelation} and one or more other objects. The + * actual relations that an object has with other objects are defined as an + * {@code AccessibleRelationSet}, which is a composed set of + * {@code AccessibleRelations}. + *

                + * The {@link #toDisplayString()} method allows you to obtain the localized + * string for a locale independent key from a predefined {@code ResourceBundle} + * for the keys defined in this class. + *

                + * The constants in this class present a strongly typed enumeration of common + * object roles. If the constants in this class are not sufficient to describe + * the role of an object, a subclass should be generated from this class and it + * should provide constants in a similar manner. * - * @author Lynn Monsanto + * @author Lynn Monsanto * @since 1.3 */ public class AccessibleRelation extends AccessibleBundle { - /* - * The group of objects that participate in the relation. - * The relation may be one-to-one or one-to-many. For - * example, in the case of a LABEL_FOR relation, the target - * vector would contain a list of objects labeled by the object - * that implements this AccessibleRelation. In the case of a - * MEMBER_OF relation, the target vector would contain all - * of the components that are members of the same group as the - * object that implements this AccessibleRelation. + /** + * The group of objects that participate in the relation. The relation may + * be one-to-one or one-to-many. For example, in the case of a + * {@code LABEL_FOR} relation, the target vector would contain a list of + * objects labeled by the object that implements this + * {@code AccessibleRelation}. In the case of a {@code MEMBER_OF} relation, + * the target vector would contain all of the components that are members of + * the same group as the object that implements this + * {@code AccessibleRelation}. */ private Object [] target = new Object[0]; @@ -84,8 +81,7 @@ public class AccessibleRelation extends AccessibleBundle { public static final String LABELED_BY = new String("labeledBy"); /** - * Indicates an object is a member of a group of one or more - * target objects. + * Indicates an object is a member of a group of one or more target objects. * * @see #getTarget * @see #CONTROLLER_FOR @@ -96,8 +92,7 @@ public class AccessibleRelation extends AccessibleBundle { public static final String MEMBER_OF = new String("memberOf"); /** - * Indicates an object is a controller for one or more target - * objects. + * Indicates an object is a controller for one or more target objects. * * @see #getTarget * @see #CONTROLLED_BY @@ -108,8 +103,7 @@ public class AccessibleRelation extends AccessibleBundle { public static final String CONTROLLER_FOR = new String("controllerFor"); /** - * Indicates an object is controlled by one or more target - * objects. + * Indicates an object is controlled by one or more target objects. * * @see #getTarget * @see #CONTROLLER_FOR @@ -120,83 +114,73 @@ public class AccessibleRelation extends AccessibleBundle { public static final String CONTROLLED_BY = new String("controlledBy"); /** - * Indicates an object is logically contiguous with a second - * object where the second object occurs after the object. - * An example is a paragraph of text that runs to the end of - * a page and continues on the next page with an intervening - * text footer and/or text header. The two parts of - * the paragraph are separate text elements but are related - * in that the second element is a continuation - * of the first - * element. In other words, the first element "flows to" - * the second element. + * Indicates an object is logically contiguous with a second object where + * the second object occurs after the object. An example is a paragraph of + * text that runs to the end of a page and continues on the next page with + * an intervening text footer and/or text header. The two parts of the + * paragraph are separate text elements but are related in that the second + * element is a continuation of the first element. In other words, the first + * element "flows to" the second element. * * @since 1.5 */ public static final String FLOWS_TO = "flowsTo"; /** - * Indicates an object is logically contiguous with a second - * object where the second object occurs before the object. - * An example is a paragraph of text that runs to the end of - * a page and continues on the next page with an intervening - * text footer and/or text header. The two parts of - * the paragraph are separate text elements but are related - * in that the second element is a continuation of the first - * element. In other words, the second element "flows from" - * the second element. + * Indicates an object is logically contiguous with a second object where + * the second object occurs before the object. An example is a paragraph of + * text that runs to the end of a page and continues on the next page with + * an intervening text footer and/or text header. The two parts of the + * paragraph are separate text elements but are related in that the second + * element is a continuation of the first element. In other words, the + * second element "flows from" the second element. * * @since 1.5 */ public static final String FLOWS_FROM = "flowsFrom"; /** - * Indicates that an object is a subwindow of one or more - * objects. + * Indicates that an object is a subwindow of one or more objects. * * @since 1.5 */ public static final String SUBWINDOW_OF = "subwindowOf"; /** - * Indicates that an object is a parent window of one or more - * objects. + * Indicates that an object is a parent window of one or more objects. * * @since 1.5 */ public static final String PARENT_WINDOW_OF = "parentWindowOf"; /** - * Indicates that an object has one or more objects - * embedded in it. + * Indicates that an object has one or more objects embedded in it. * * @since 1.5 */ public static final String EMBEDS = "embeds"; /** - * Indicates that an object is embedded in one or more - * objects. + * Indicates that an object is embedded in one or more objects. * * @since 1.5 */ public static final String EMBEDDED_BY = "embeddedBy"; /** - * Indicates that an object is a child node of one - * or more objects. + * Indicates that an object is a child node of one or more objects. * * @since 1.5 */ public static final String CHILD_NODE_OF = "childNodeOf"; /** - * Identifies that the target group for a label has changed + * Identifies that the target group for a label has changed. */ public static final String LABEL_FOR_PROPERTY = "labelForProperty"; /** - * Identifies that the objects that are doing the labeling have changed + * Identifies that the objects that are doing the labeling have changed. */ public static final String LABELED_BY_PROPERTY = "labeledByProperty"; @@ -206,34 +190,33 @@ public class AccessibleRelation extends AccessibleBundle { public static final String MEMBER_OF_PROPERTY = "memberOfProperty"; /** - * Identifies that the controller for the target object has changed + * Identifies that the controller for the target object has changed. */ public static final String CONTROLLER_FOR_PROPERTY = "controllerForProperty"; /** * Identifies that the target object that is doing the controlling has - * changed + * changed. */ public static final String CONTROLLED_BY_PROPERTY = "controlledByProperty"; /** - * Indicates the FLOWS_TO relation between two objects - * has changed. + * Indicates the {@code FLOWS_TO} relation between two objects has changed. * * @since 1.5 */ public static final String FLOWS_TO_PROPERTY = "flowsToProperty"; /** - * Indicates the FLOWS_FROM relation between two objects - * has changed. + * Indicates the {@code FLOWS_FROM} relation between two objects has + * changed. * * @since 1.5 */ public static final String FLOWS_FROM_PROPERTY = "flowsFromProperty"; /** - * Indicates the SUBWINDOW_OF relation between two or more objects + * Indicates the {@code SUBWINDOW_OF} relation between two or more objects * has changed. * * @since 1.5 @@ -241,23 +224,23 @@ public class AccessibleRelation extends AccessibleBundle { public static final String SUBWINDOW_OF_PROPERTY = "subwindowOfProperty"; /** - * Indicates the PARENT_WINDOW_OF relation between two or more objects - * has changed. + * Indicates the {@code PARENT_WINDOW_OF} relation between two or more + * objects has changed. * * @since 1.5 */ public static final String PARENT_WINDOW_OF_PROPERTY = "parentWindowOfProperty"; /** - * Indicates the EMBEDS relation between two or more objects - * has changed. + * Indicates the {@code EMBEDS} relation between two or more objects has + * changed. * * @since 1.5 */ public static final String EMBEDS_PROPERTY = "embedsProperty"; /** - * Indicates the EMBEDDED_BY relation between two or more objects + * Indicates the {@code EMBEDDED_BY} relation between two or more objects * has changed. * * @since 1.5 @@ -265,7 +248,7 @@ public class AccessibleRelation extends AccessibleBundle { public static final String EMBEDDED_BY_PROPERTY = "embeddedByProperty"; /** - * Indicates the CHILD_NODE_OF relation between two or more objects + * Indicates the {@code CHILD_NODE_OF} relation between two or more objects * has changed. * * @since 1.5 @@ -273,12 +256,13 @@ public class AccessibleRelation extends AccessibleBundle { public static final String CHILD_NODE_OF_PROPERTY = "childNodeOfProperty"; /** - * Create a new AccessibleRelation using the given locale independent key. - * The key String should be a locale independent key for the relation. - * It is not intended to be used as the actual String to display - * to the user. To get the localized string, use toDisplayString. + * Create a new {@code AccessibleRelation} using the given locale + * independent key. The key {@code String} should be a locale independent + * key for the relation. It is not intended to be used as the actual + * {@code String} to display to the user. To get the localized string, use + * {@link #toDisplayString()}. * - * @param key the locale independent name of the relation. + * @param key the locale independent name of the relation * @see AccessibleBundle#toDisplayString */ public AccessibleRelation(String key) { @@ -287,13 +271,14 @@ public class AccessibleRelation extends AccessibleBundle { } /** - * Creates a new AccessibleRelation using the given locale independent key. - * The key String should be a locale independent key for the relation. - * It is not intended to be used as the actual String to display - * to the user. To get the localized string, use toDisplayString. + * Creates a new {@code AccessibleRelation} using the given locale + * independent key. The key {@code String} should be a locale independent + * key for the relation. It is not intended to be used as the actual + * {@code String} to display to the user. To get the localized string, use + * {@link #toDisplayString()}. * - * @param key the locale independent name of the relation. - * @param target the target object for this relation + * @param key the locale independent name of the relation + * @param target the target object for this relation * @see AccessibleBundle#toDisplayString */ public AccessibleRelation(String key, Object target) { @@ -303,25 +288,25 @@ public class AccessibleRelation extends AccessibleBundle { } /** - * Creates a new AccessibleRelation using the given locale independent key. - * The key String should be a locale independent key for the relation. - * It is not intended to be used as the actual String to display - * to the user. To get the localized string, use toDisplayString. + * Creates a new {@code AccessibleRelation} using the given locale + * independent key. The key {@code String} should be a locale independent + * key for the relation. It is not intended to be used as the actual + * {@code String} to display to the user. To get the localized string, use + * {@link #toDisplayString()}. * - * @param key the locale independent name of the relation. - * @param target the target object(s) for this relation + * @param key the locale independent name of the relation + * @param target the target object(s) for this relation * @see AccessibleBundle#toDisplayString */ - public AccessibleRelation(String key, Object [] target) { + public AccessibleRelation(String key, Object[] target) { this.key = key; this.target = target; } /** - * Returns the key for this relation + * Returns the key for this relation. * * @return the key for this relation - * * @see #CONTROLLER_FOR * @see #CONTROLLED_BY * @see #LABEL_FOR @@ -333,7 +318,7 @@ public class AccessibleRelation extends AccessibleBundle { } /** - * Returns the target objects for this relation + * Returns the target objects for this relation. * * @return an array containing the target objects for this relation */ @@ -349,9 +334,9 @@ public class AccessibleRelation extends AccessibleBundle { } /** - * Sets the target object for this relation + * Sets the target object for this relation. * - * @param target the target object for this relation + * @param target the target object for this relation */ public void setTarget(Object target) { this.target = new Object[1]; @@ -359,9 +344,9 @@ public class AccessibleRelation extends AccessibleBundle { } /** - * Sets the target objects for this relation + * Sets the target objects for this relation. * - * @param target an array containing the target objects for this relation + * @param target an array containing the target objects for this relation */ public void setTarget(Object [] target) { this.target = target; diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRelationSet.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRelationSet.java index 613db08feb7..06b83d08c71 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRelationSet.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRelationSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -26,24 +26,22 @@ package javax.accessibility; import java.util.Vector; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; /** - * Class AccessibleRelationSet determines a component's relation set. The - * relation set of a component is a set of AccessibleRelation objects that - * describe the component's relationships with other components. + * Class {@code AccessibleRelationSet} determines a component's relation set. + * The relation set of a component is a set of {@code AccessibleRelation} + * objects that describe the component's relationships with other components. * + * @author Lynn Monsanto * @see AccessibleRelation - * - * @author Lynn Monsanto * @since 1.3 */ public class AccessibleRelationSet { /** - * Each entry in the Vector represents an AccessibleRelation. + * Each entry in the {@code Vector} represents an + * {@code AccessibleRelation}. + * * @see #add * @see #addAll * @see #remove @@ -63,11 +61,11 @@ public class AccessibleRelationSet { } /** - * Creates a new relation with the initial set of relations contained in - * the array of relations passed in. Duplicate entries are ignored. + * Creates a new relation with the initial set of relations contained in the + * array of relations passed in. Duplicate entries are ignored. * - * @param relations an array of AccessibleRelation describing the - * relation set. + * @param relations an array of {@code AccessibleRelation} describing the + * relation set */ public AccessibleRelationSet(AccessibleRelation[] relations) { if (relations.length != 0) { @@ -79,14 +77,14 @@ public class AccessibleRelationSet { } /** - * Adds a new relation to the current relation set. If the relation - * is already in the relation set, the target(s) of the specified - * relation is merged with the target(s) of the existing relation. - * Otherwise, the new relation is added to the relation set. + * Adds a new relation to the current relation set. If the relation is + * already in the relation set, the target(s) of the specified relation is + * merged with the target(s) of the existing relation. Otherwise, the new + * relation is added to the relation set. * - * @param relation the relation to add to the relation set - * @return true if relation is added to the relation set; false if the - * relation set is unchanged + * @param relation the relation to add to the relation set + * @return {@code true} if relation is added to the relation set; + * {@code false} if the relation set is unchanged */ public boolean add(AccessibleRelation relation) { if (relations == null) { @@ -117,10 +115,11 @@ public class AccessibleRelationSet { } /** - * Adds all of the relations to the existing relation set. Duplicate - * entries are ignored. + * Adds all of the relations to the existing relation set. Duplicate entries + * are ignored. * - * @param relations AccessibleRelation array describing the relation set. + * @param relations {@code AccessibleRelation} array describing the + * relation set */ public void addAll(AccessibleRelation[] relations) { if (relations.length != 0) { @@ -134,15 +133,14 @@ public class AccessibleRelationSet { } /** - * Removes a relation from the current relation set. If the relation - * is not in the set, the relation set will be unchanged and the - * return value will be false. If the relation is in the relation - * set, it will be removed from the set and the return value will be - * true. + * Removes a relation from the current relation set. If the relation is not + * in the set, the relation set will be unchanged and the return value will + * be {@code false}. If the relation is in the relation set, it will be + * removed from the set and the return value will be {@code true}. * - * @param relation the relation to remove from the relation set - * @return true if the relation is in the relation set; false if the - * relation set is unchanged + * @param relation the relation to remove from the relation set + * @return {@code true} if the relation is in the relation set; + * {@code false} if the relation set is unchanged */ public boolean remove(AccessibleRelation relation) { if (relations == null) { @@ -163,6 +161,7 @@ public class AccessibleRelationSet { /** * Returns the number of relations in the relation set. + * * @return the number of relations in the relation set */ public int size() { @@ -174,10 +173,12 @@ public class AccessibleRelationSet { } /** - * Returns whether the relation set contains a relation - * that matches the specified key. - * @param key the AccessibleRelation key - * @return true if the relation is in the relation set; otherwise false + * Returns whether the relation set contains a relation that matches the + * specified key. + * + * @param key the {@code AccessibleRelation} key + * @return {@code true} if the relation is in the relation set; otherwise + * {@code false} */ public boolean contains(String key) { return get(key) != null; @@ -185,9 +186,10 @@ public class AccessibleRelationSet { /** * Returns the relation that matches the specified key. - * @param key the AccessibleRelation key + * + * @param key the {@code AccessibleRelation} key * @return the relation, if one exists, that matches the specified key. - * Otherwise, null is returned. + * Otherwise, {@code null} is returned. */ public AccessibleRelation get(String key) { if (relations == null) { @@ -205,8 +207,10 @@ public class AccessibleRelationSet { } /** - * Returns the current relation set as an array of AccessibleRelation - * @return AccessibleRelation array contacting the current relation. + * Returns the current relation set as an array of + * {@code AccessibleRelation}. + * + * @return {@code AccessibleRelation} array contacting the current relation */ public AccessibleRelation[] toArray() { if (relations == null) { @@ -222,10 +226,10 @@ public class AccessibleRelationSet { } /** - * Creates a localized String representing all the relations in the set + * Creates a localized string representing all the relations in the set * using the default locale. * - * @return comma separated localized String + * @return comma separated localized string * @see AccessibleBundle#toDisplayString */ public String toString() { diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleResourceBundle.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleResourceBundle.java index dd95dded346..80a78967dd3 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleResourceBundle.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleResourceBundle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,19 +29,20 @@ import java.util.ListResourceBundle; /** * A resource bundle containing the localized strings in the accessibility - * package. This is meant only for internal use by Java Accessibility and - * is not meant to be used by assistive technologies or applications. + * package. This is meant only for internal use by Java Accessibility and is not + * meant to be used by assistive technologies or applications. * - * @author Willie Walker - * @deprecated This class is deprecated as of version 1.3 of the - * Java Platform. + * @author Willie Walker + * @deprecated This class is deprecated as of version 1.3 of the Java Platform */ @Deprecated public class AccessibleResourceBundle extends ListResourceBundle { /** - * Returns the mapping between the programmatic keys and the - * localized display strings. + * Returns the mapping between the programmatic keys and the localized + * display strings. + * + * @return an array of an {@code Object} array representing a key-value pair */ public Object[][] getContents() { // The table holding the mapping between the programmatic keys diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRole.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRole.java index 3ce6c35d093..3e410aea636 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRole.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRole.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,32 +25,30 @@ package javax.accessibility; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - /** - *

                Class AccessibleRole determines the role of a component. The role of a - * component describes its generic function. (E.G., -* "push button," "table," or "list.") - *

                The toDisplayString method allows you to obtain the localized string - * for a locale independent key from a predefined ResourceBundle for the - * keys defined in this class. - *

                The constants in this class present a strongly typed enumeration - * of common object roles. A public constructor for this class has been - * purposely omitted and applications should use one of the constants - * from this class. If the constants in this class are not sufficient - * to describe the role of an object, a subclass should be generated - * from this class and it should provide constants in a similar manner. + * Class {@code AccessibleRole} determines the role of a component. The role of + * a component describes its generic function. (E.G., "push button," "table," or + * "list.") + *

                + * The {@link #toDisplayString()} method allows you to obtain the localized + * string for a locale independent key from a predefined {@code ResourceBundle} + * for the keys defined in this class. + *

                + * The constants in this class present a strongly typed enumeration of common + * object roles. A public constructor for this class has been purposely omitted + * and applications should use one of the constants from this class. If the + * constants in this class are not sufficient to describe the role of an object, + * a subclass should be generated from this class and it should provide + * constants in a similar manner. * - * @author Willie Walker - * @author Peter Korn - * @author Lynn Monsanto + * @author Willie Walker + * @author Peter Korn + * @author Lynn Monsanto */ public class AccessibleRole extends AccessibleBundle { -// If you add or remove anything from here, make sure you -// update AccessibleResourceBundle.java. + // If you add or remove anything from here, make sure you + // update AccessibleResourceBundle.java. /** * Object is used to alert the user about something. @@ -65,8 +63,8 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("columnheader"); /** - * Object that can be drawn into and is used to trap - * events. + * Object that can be drawn into and is used to trap events. + * * @see #FRAME * @see #GLASS_PANE * @see #LAYERED_PANE @@ -75,14 +73,15 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("canvas"); /** - * A list of choices the user can select from. Also optionally - * allows the user to enter a choice of their own. + * A list of choices the user can select from. Also optionally allows the + * user to enter a choice of their own. */ public static final AccessibleRole COMBO_BOX = new AccessibleRole("combobox"); /** - * An iconified internal frame in a DESKTOP_PANE. + * An iconified internal frame in a {@code DESKTOP_PANE}. + * * @see #DESKTOP_PANE * @see #INTERNAL_FRAME */ @@ -90,11 +89,12 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("desktopicon"); /** - * An object containing a collection of {@code Accessibles} that - * together represents {@code HTML} content. The child - * {@code Accessibles} would include objects implementing - * {@code AccessibleText}, {@code AccessibleHypertext}, - * {@code AccessibleIcon}, and other interfaces. + * An object containing a collection of {@code Accessibles} that together + * represents {@code HTML} content. The child {@code Accessibles} would + * include objects implementing {@code AccessibleText}, + * {@code AccessibleHypertext}, {@code AccessibleIcon}, and other + * interfaces. + * * @see #HYPERLINK * @see AccessibleText * @see AccessibleHypertext @@ -106,10 +106,10 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("htmlcontainer"); /** - * A frame-like object that is clipped by a desktop pane. The - * desktop pane, internal frame, and desktop icon objects are - * often used to create multiple document interfaces within an - * application. + * A frame-like object that is clipped by a desktop pane. The desktop pane, + * internal frame, and desktop icon objects are often used to create + * multiple document interfaces within an application. + * * @see #DESKTOP_ICON * @see #DESKTOP_PANE * @see #FRAME @@ -118,8 +118,9 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("internalframe"); /** - * A pane that supports internal frames and - * iconified versions of those internal frames. + * A pane that supports internal frames and iconified versions of those + * internal frames. + * * @see #DESKTOP_ICON * @see #INTERNAL_FRAME */ @@ -127,7 +128,8 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("desktoppane"); /** - * A specialized pane whose primary use is inside a DIALOG + * A specialized pane whose primary use is inside a {@code DIALOG}. + * * @see #DIALOG */ public static final AccessibleRole OPTION_PANE @@ -135,6 +137,7 @@ public class AccessibleRole extends AccessibleBundle { /** * A top level window with no title or border. + * * @see #FRAME * @see #DIALOG */ @@ -142,8 +145,9 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("window"); /** - * A top level window with a title bar, border, menu bar, etc. It is - * often used as the primary window for an application. + * A top level window with a title bar, border, menu bar, etc. It is often + * used as the primary window for an application. + * * @see #DIALOG * @see #CANVAS * @see #WINDOW @@ -152,9 +156,10 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("frame"); /** - * A top level window with title bar and a border. A dialog is similar - * to a frame, but it has fewer properties and is often used as a - * secondary window for an application. + * A top level window with title bar and a border. A dialog is similar to a + * frame, but it has fewer properties and is often used as a secondary + * window for an application. + * * @see #FRAME * @see #WINDOW */ @@ -169,34 +174,34 @@ public class AccessibleRole extends AccessibleBundle { /** - * A pane that allows the user to navigate through - * and select the contents of a directory. May be used - * by a file chooser. + * A pane that allows the user to navigate through and select the contents + * of a directory. May be used by a file chooser. + * * @see #FILE_CHOOSER */ public static final AccessibleRole DIRECTORY_PANE = new AccessibleRole("directorypane"); /** - * A specialized dialog that displays the files in the directory - * and lets the user select a file, browse a different directory, - * or specify a filename. May use the directory pane to show the - * contents of a directory. + * A specialized dialog that displays the files in the directory and lets + * the user select a file, browse a different directory, or specify a + * filename. May use the directory pane to show the contents of a directory. + * * @see #DIRECTORY_PANE */ public static final AccessibleRole FILE_CHOOSER = new AccessibleRole("filechooser"); /** - * An object that fills up space in a user interface. It is often - * used in interfaces to tweak the spacing between components, - * but serves no other purpose. + * An object that fills up space in a user interface. It is often used in + * interfaces to tweak the spacing between components, but serves no other + * purpose. */ public static final AccessibleRole FILLER = new AccessibleRole("filler"); /** - * A hypertext anchor + * A hypertext anchor. */ public static final AccessibleRole HYPERLINK = new AccessibleRole("hyperlink"); @@ -216,6 +221,7 @@ public class AccessibleRole extends AccessibleBundle { /** * A specialized pane that has a glass pane and a layered pane as its * children. + * * @see #GLASS_PANE * @see #LAYERED_PANE */ @@ -223,8 +229,8 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("rootpane"); /** - * A pane that is guaranteed to be painted on top - * of all panes beneath it. + * A pane that is guaranteed to be painted on top of all panes beneath it. + * * @see #ROOT_PANE * @see #CANVAS */ @@ -233,9 +239,10 @@ public class AccessibleRole extends AccessibleBundle { /** * A specialized pane that allows its children to be drawn in layers, - * providing a form of stacking order. This is usually the pane that - * holds the menu bar as well as the pane that contains most of the - * visual components in a window. + * providing a form of stacking order. This is usually the pane that holds + * the menu bar as well as the pane that contains most of the visual + * components in a window. + * * @see #GLASS_PANE * @see #ROOT_PANE */ @@ -243,9 +250,10 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("layeredpane"); /** - * An object that presents a list of objects to the user and allows the - * user to select one or more of them. A list is usually contained - * within a scroll pane. + * An object that presents a list of objects to the user and allows the user + * to select one or more of them. A list is usually contained within a + * scroll pane. + * * @see #SCROLL_PANE * @see #LIST_ITEM */ @@ -253,8 +261,9 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("list"); /** - * An object that presents an element in a list. A list is usually - * contained within a scroll pane. + * An object that presents an element in a list. A list is usually contained + * within a scroll pane. + * * @see #SCROLL_PANE * @see #LIST */ @@ -262,10 +271,10 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("listitem"); /** - * An object usually drawn at the top of the primary dialog box of - * an application that contains a list of menus the user can choose - * from. For example, a menu bar might contain menus for "File," - * "Edit," and "Help." + * An object usually drawn at the top of the primary dialog box of an + * application that contains a list of menus the user can choose from. For + * example, a menu bar might contain menus for "File," "Edit," and "Help." + * * @see #MENU * @see #POPUP_MENU * @see #LAYERED_PANE @@ -274,9 +283,9 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("menubar"); /** - * A temporary window that is usually used to offer the user a - * list of choices, and then hides when the user selects one of - * those choices. + * A temporary window that is usually used to offer the user a list of + * choices, and then hides when the user selects one of those choices. + * * @see #MENU * @see #MENU_ITEM */ @@ -284,12 +293,12 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("popupmenu"); /** - * An object usually found inside a menu bar that contains a list - * of actions the user can choose from. A menu can have any object - * as its children, but most often they are menu items, other menus, - * or rudimentary objects such as radio buttons, check boxes, or - * separators. For example, an application may have an "Edit" menu - * that contains menu items for "Cut" and "Paste." + * An object usually found inside a menu bar that contains a list of actions + * the user can choose from. A menu can have any object as its children, but + * most often they are menu items, other menus, or rudimentary objects such + * as radio buttons, check boxes, or separators. For example, an application + * may have an "Edit" menu that contains menu items for "Cut" and "Paste." + * * @see #MENU_BAR * @see #MENU_ITEM * @see #SEPARATOR @@ -301,10 +310,11 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("menu"); /** - * An object usually contained in a menu that presents an action - * the user can choose. For example, the "Cut" menu item in an - * "Edit" menu would be an action the user can select to cut the - * selected area of text in a document. + * An object usually contained in a menu that presents an action the user + * can choose. For example, the "Cut" menu item in an "Edit" menu would be + * an action the user can select to cut the selected area of text in a + * document. + * * @see #MENU_BAR * @see #SEPARATOR * @see #POPUP_MENU @@ -313,11 +323,11 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("menuitem"); /** - * An object usually contained in a menu to provide a visual - * and logical separation of the contents in a menu. For example, - * the "File" menu of an application might contain menu items for - * "Open," "Close," and "Exit," and will place a separator between - * "Close" and "Exit" menu items. + * An object usually contained in a menu to provide a visual and logical + * separation of the contents in a menu. For example, the "File" menu of an + * application might contain menu items for "Open," "Close," and "Exit," and + * will place a separator between "Close" and "Exit" menu items. + * * @see #MENU * @see #MENU_ITEM */ @@ -325,19 +335,21 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("separator"); /** - * An object that presents a series of panels (or page tabs), one at a - * time, through some mechanism provided by the object. The most common - * mechanism is a list of tabs at the top of the panel. The children of - * a page tab list are all page tabs. + * An object that presents a series of panels (or page tabs), one at a time, + * through some mechanism provided by the object. The most common mechanism + * is a list of tabs at the top of the panel. The children of a page tab + * list are all page tabs. + * * @see #PAGE_TAB */ public static final AccessibleRole PAGE_TAB_LIST = new AccessibleRole("pagetablist"); /** - * An object that is a child of a page tab list. Its sole child is - * the panel that is to be presented to the user when the user - * selects the page tab from the list of tabs in the page tab list. + * An object that is a child of a page tab list. Its sole child is the panel + * that is to be presented to the user when the user selects the page tab + * from the list of tabs in the page tab list. + * * @see #PAGE_TAB_LIST */ public static final AccessibleRole PAGE_TAB @@ -356,8 +368,8 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("progressbar"); /** - * A text object used for passwords, or other places where the - * text contents is not shown visibly to the user + * A text object used for passwords, or other places where the text contents + * is not shown visibly to the user. */ public static final AccessibleRole PASSWORD_TEXT = new AccessibleRole("passwordtext"); @@ -365,6 +377,7 @@ public class AccessibleRole extends AccessibleBundle { /** * An object the user can manipulate to tell the application to do * something. + * * @see #CHECK_BOX * @see #TOGGLE_BUTTON * @see #RADIO_BUTTON @@ -373,8 +386,9 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("pushbutton"); /** - * A specialized push button that can be checked or unchecked, but - * does not provide a separate indicator for the current state. + * A specialized push button that can be checked or unchecked, but does not + * provide a separate indicator for the current state. + * * @see #PUSH_BUTTON * @see #CHECK_BOX * @see #RADIO_BUTTON @@ -383,8 +397,9 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("togglebutton"); /** - * A choice that can be checked or unchecked and provides a - * separate indicator for the current state. + * A choice that can be checked or unchecked and provides a separate + * indicator for the current state. + * * @see #PUSH_BUTTON * @see #TOGGLE_BUTTON * @see #RADIO_BUTTON @@ -393,8 +408,9 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("checkbox"); /** - * A specialized check box that will cause other radio buttons in the - * same group to become unchecked when this one is checked. + * A specialized check box that will cause other radio buttons in the same + * group to become unchecked when this one is checked. + * * @see #PUSH_BUTTON * @see #TOGGLE_BUTTON * @see #CHECK_BOX @@ -409,8 +425,9 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("rowheader"); /** - * An object that allows a user to incrementally view a large amount - * of information. Its children can include scroll bars and a viewport. + * An object that allows a user to incrementally view a large amount of + * information. Its children can include scroll bars and a viewport. + * * @see #SCROLL_BAR * @see #VIEWPORT */ @@ -418,24 +435,26 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("scrollpane"); /** - * An object usually used to allow a user to incrementally view a - * large amount of data. Usually used only by a scroll pane. + * An object usually used to allow a user to incrementally view a large + * amount of data. Usually used only by a scroll pane. + * * @see #SCROLL_PANE */ public static final AccessibleRole SCROLL_BAR = new AccessibleRole("scrollbar"); /** - * An object usually used in a scroll pane. It represents the portion - * of the entire data that the user can see. As the user manipulates - * the scroll bars, the contents of the viewport can change. + * An object usually used in a scroll pane. It represents the portion of the + * entire data that the user can see. As the user manipulates the scroll + * bars, the contents of the viewport can change. + * * @see #SCROLL_PANE */ public static final AccessibleRole VIEWPORT = new AccessibleRole("viewport"); /** - * An object that allows the user to select from a bounded range. For + * An object that allows the user to select from a bounded range. For * example, a slider might be used to select a number between 0 and 100. */ public static final AccessibleRole SLIDER @@ -443,54 +462,56 @@ public class AccessibleRole extends AccessibleBundle { /** * A specialized panel that presents two other panels at the same time. - * Between the two panels is a divider the user can manipulate to make - * one panel larger and the other panel smaller. + * Between the two panels is a divider the user can manipulate to make one + * panel larger and the other panel smaller. */ public static final AccessibleRole SPLIT_PANE = new AccessibleRole("splitpane"); /** - * An object used to present information in terms of rows and columns. - * An example might include a spreadsheet application. + * An object used to present information in terms of rows and columns. An + * example might include a spreadsheet application. */ public static final AccessibleRole TABLE = new AccessibleRole("table"); /** - * An object that presents text to the user. The text is usually - * editable by the user as opposed to a label. + * An object that presents text to the user. The text is usually editable by + * the user as opposed to a label. + * * @see #LABEL */ public static final AccessibleRole TEXT = new AccessibleRole("text"); /** - * An object used to present hierarchical information to the user. - * The individual nodes in the tree can be collapsed and expanded - * to provide selective disclosure of the tree's contents. + * An object used to present hierarchical information to the user. The + * individual nodes in the tree can be collapsed and expanded to provide + * selective disclosure of the tree's contents. */ public static final AccessibleRole TREE = new AccessibleRole("tree"); /** - * A bar or palette usually composed of push buttons or toggle buttons. - * It is often used to provide the most frequently used functions for an + * A bar or palette usually composed of push buttons or toggle buttons. It + * is often used to provide the most frequently used functions for an * application. */ public static final AccessibleRole TOOL_BAR = new AccessibleRole("toolbar"); /** - * An object that provides information about another object. The - * accessibleDescription property of the tool tip is often displayed - * to the user in a small "help bubble" when the user causes the - * mouse to hover over the object associated with the tool tip. + * An object that provides information about another object. The + * {@code accessibleDescription} property of the tool tip is often displayed + * to the user in a small "help bubble" when the user causes the mouse to + * hover over the object associated with the tool tip. */ public static final AccessibleRole TOOL_TIP = new AccessibleRole("tooltip"); /** * An AWT component, but nothing else is known about it. + * * @see #SWING_COMPONENT * @see #UNKNOWN */ @@ -499,6 +520,7 @@ public class AccessibleRole extends AccessibleBundle { /** * A Swing component, but nothing else is known about it. + * * @see #AWT_COMPONENT * @see #UNKNOWN */ @@ -506,8 +528,9 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("swingcomponent"); /** - * The object contains some Accessible information, but its role is + * The object contains some {@code Accessible} information, but its role is * not known. + * * @see #AWT_COMPONENT * @see #SWING_COMPONENT */ @@ -515,42 +538,42 @@ public class AccessibleRole extends AccessibleBundle { = new AccessibleRole("unknown"); /** - * A STATUS_BAR is an simple component that can contain - * multiple labels of status information to the user. + * A {@code STATUS_BAR} is an simple component that can contain multiple + * labels of status information to the user. */ public static final AccessibleRole STATUS_BAR = new AccessibleRole("statusbar"); /** - * A DATE_EDITOR is a component that allows users to edit - * java.util.Date and java.util.Time objects + * A {@code DATE_EDITOR} is a component that allows users to edit + * {@code java.util.Date} and {@code java.util.Time} objects. */ public static final AccessibleRole DATE_EDITOR = new AccessibleRole("dateeditor"); /** - * A SPIN_BOX is a simple spinner component and its main use - * is for simple numbers. + * A {@code SPIN_BOX} is a simple spinner component and its main use is for + * simple numbers. */ public static final AccessibleRole SPIN_BOX = new AccessibleRole("spinbox"); /** - * A FONT_CHOOSER is a component that lets the user pick various + * A {@code FONT_CHOOSER} is a component that lets the user pick various * attributes for fonts. */ public static final AccessibleRole FONT_CHOOSER = new AccessibleRole("fontchooser"); /** - * A GROUP_BOX is a simple container that contains a border - * around it and contains components inside it. + * A {@code GROUP_BOX} is a simple container that contains a border around + * it and contains components inside it. */ public static final AccessibleRole GROUP_BOX = new AccessibleRole("groupbox"); /** - * A text header + * A text header. * * @since 1.5 */ @@ -558,7 +581,7 @@ public class AccessibleRole extends AccessibleBundle { new AccessibleRole("header"); /** - * A text footer + * A text footer. * * @since 1.5 */ @@ -566,7 +589,7 @@ public class AccessibleRole extends AccessibleBundle { new AccessibleRole("footer"); /** - * A text paragraph + * A text paragraph. * * @since 1.5 */ @@ -574,7 +597,7 @@ public class AccessibleRole extends AccessibleBundle { new AccessibleRole("paragraph"); /** - * A ruler is an object used to measure distance + * A ruler is an object used to measure distance. * * @since 1.5 */ @@ -582,9 +605,8 @@ public class AccessibleRole extends AccessibleBundle { new AccessibleRole("ruler"); /** - * A role indicating the object acts as a formula for - * calculating a value. An example is a formula in - * a spreadsheet cell. + * A role indicating the object acts as a formula for calculating a value. + * An example is a formula in a spreadsheet cell. * * @since 1.5 */ @@ -592,8 +614,7 @@ public class AccessibleRole extends AccessibleBundle { new AccessibleRole("editbar"); /** - * A role indicating the object monitors the progress - * of some operation. + * A role indicating the object monitors the progress of some operation. * * @since 1.5 */ @@ -643,16 +664,16 @@ public class AccessibleRole extends AccessibleBundle { // = new AccessibleRole("treenode"); /** - * Creates a new AccessibleRole using the given locale independent key. - * This should not be a public method. Instead, it is used to create + * Creates a new {@code AccessibleRole} using the given locale independent + * key. This should not be a public method. Instead, it is used to create * the constants in this file to make it a strongly typed enumeration. * Subclasses of this class should enforce similar policy. *

                - * The key String should be a locale independent key for the role. - * It is not intended to be used as the actual String to display - * to the user. To get the localized string, use toDisplayString. + * The key {@code String} should be a locale independent key for the role. + * It is not intended to be used as the actual {@code String} to display to + * the user. To get the localized string, use {@link #toDisplayString()}. * - * @param key the locale independent name of the role. + * @param key the locale independent name of the role * @see AccessibleBundle#toDisplayString */ protected AccessibleRole(String key) { diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleSelection.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleSelection.java index ddda5305273..6eb154a756a 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleSelection.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleSelection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -26,89 +26,90 @@ package javax.accessibility; /** - * This AccessibleSelection interface - * provides the standard mechanism for an assistive technology to determine - * what the current selected children are, as well as modify the selection set. - * Any object that has children that can be selected should support - * the AccessibleSelection interface. Applications can determine if an object supports the - * AccessibleSelection interface by first obtaining its AccessibleContext (see - * {@link Accessible}) and then calling the - * {@link AccessibleContext#getAccessibleSelection} method. - * If the return value is not null, the object supports this interface. + * This {@code AccessibleSelection} interface provides the standard mechanism + * for an assistive technology to determine what the current selected children + * are, as well as modify the selection set. Any object that has children that + * can be selected should support the {@code AccessibleSelection} interface. + * Applications can determine if an object supports the + * {@code AccessibleSelection} interface by first obtaining its + * {@code AccessibleContext} (see {@link Accessible}) and then calling the + * {@link AccessibleContext#getAccessibleSelection} method. If the return value + * is not {@code null}, the object supports this interface. * + * @author Peter Korn + * @author Hans Muller + * @author Willie Walker * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleContext#getAccessibleSelection - * - * @author Peter Korn - * @author Hans Muller - * @author Willie Walker */ public interface AccessibleSelection { /** - * Returns the number of Accessible children currently selected. - * If no children are selected, the return value will be 0. + * Returns the number of {@code Accessible} children currently selected. If + * no children are selected, the return value will be 0. * - * @return the number of items currently selected. + * @return the number of items currently selected */ - public int getAccessibleSelectionCount(); + public int getAccessibleSelectionCount(); /** - * Returns an Accessible representing the specified selected child - * of the object. If there isn't a selection, or there are - * fewer children selected than the integer passed in, the return - * value will be null. - *

                Note that the index represents the i-th selected child, which - * is different from the i-th child. + * Returns an {@code Accessible} representing the specified selected child + * of the object. If there isn't a selection, or there are fewer children + * selected than the integer passed in, the return value will be + * {@code null}. + *

                + * Note that the index represents the i-th selected child, which is + * different from the i-th child. * - * @param i the zero-based index of selected children + * @param i the zero-based index of selected children * @return the i-th selected child * @see #getAccessibleSelectionCount */ - public Accessible getAccessibleSelection(int i); + public Accessible getAccessibleSelection(int i); /** * Determines if the current child of this object is selected. * - * @return true if the current child of this object is selected; else false. - * @param i the zero-based index of the child in this Accessible object. + * @param i the zero-based index of the child in this {@code Accessible} + * object + * @return {@code true} if the current child of this object is selected; + * else {@code false} * @see AccessibleContext#getAccessibleChild */ - public boolean isAccessibleChildSelected(int i); + public boolean isAccessibleChildSelected(int i); /** - * Adds the specified Accessible child of the object to the object's - * selection. If the object supports multiple selections, - * the specified child is added to any existing selection, otherwise - * it replaces any existing selection in the object. If the - * specified child is already selected, this method has no effect. + * Adds the specified {@code Accessible} child of the object to the object's + * selection. If the object supports multiple selections, the specified + * child is added to any existing selection, otherwise it replaces any + * existing selection in the object. If the specified child is already + * selected, this method has no effect. * - * @param i the zero-based index of the child + * @param i the zero-based index of the child * @see AccessibleContext#getAccessibleChild */ - public void addAccessibleSelection(int i); + public void addAccessibleSelection(int i); /** - * Removes the specified child of the object from the object's - * selection. If the specified item isn't currently selected, this - * method has no effect. + * Removes the specified child of the object from the object's selection. If + * the specified item isn't currently selected, this method has no effect. * - * @param i the zero-based index of the child + * @param i the zero-based index of the child * @see AccessibleContext#getAccessibleChild */ - public void removeAccessibleSelection(int i); + public void removeAccessibleSelection(int i); /** - * Clears the selection in the object, so that no children in the - * object are selected. + * Clears the selection in the object, so that no children in the object are + * selected. */ - public void clearAccessibleSelection(); + public void clearAccessibleSelection(); /** - * Causes every child of the object to be selected - * if the object supports multiple selections. + * Causes every child of the object to be selected if the object supports + * multiple selections. */ - public void selectAllAccessibleSelection(); + public void selectAllAccessibleSelection(); } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleState.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleState.java index 3417d3ecdcf..0c1573cad0d 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleState.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleState.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,27 +25,24 @@ package javax.accessibility; -import java.util.Vector; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - /** - *

                Class AccessibleState describes a component's particular state. The actual - * state of the component is defined as an AccessibleStateSet, which is a - * composed set of AccessibleStates. - *

                The toDisplayString method allows you to obtain the localized string - * for a locale independent key from a predefined ResourceBundle for the - * keys defined in this class. - *

                The constants in this class present a strongly typed enumeration - * of common object roles. A public constructor for this class has been - * purposely omitted and applications should use one of the constants - * from this class. If the constants in this class are not sufficient - * to describe the role of an object, a subclass should be generated - * from this class and it should provide constants in a similar manner. + * Class {@code AccessibleState} describes a component's particular state. The + * actual state of the component is defined as an {@code AccessibleStateSet}, + * which is a composed set of {@code AccessibleStates}. + *

                + * The {@link #toDisplayString()} method allows you to obtain the localized + * string for a locale independent key from a predefined {@code ResourceBundle} + * for the keys defined in this class. + *

                + * The constants in this class present a strongly typed enumeration of common + * object roles. A public constructor for this class has been purposely omitted + * and applications should use one of the constants from this class. If the + * constants in this class are not sufficient to describe the role of an object, + * a subclass should be generated from this class and it should provide + * constants in a similar manner. * - * @author Willie Walker - * @author Peter Korn + * @author Willie Walker + * @author Peter Korn */ public class AccessibleState extends AccessibleBundle { @@ -53,11 +50,12 @@ public class AccessibleState extends AccessibleBundle { // update AccessibleResourceBundle.java. /** - * Indicates a window is currently the active window. This includes - * windows, dialogs, frames, etc. In addition, this state is used - * to indicate the currently active child of a component such as a - * list, table, or tree. For example, the active child of a list - * is the child that is drawn with a rectangle around it. + * Indicates a window is currently the active window. This includes windows, + * dialogs, frames, etc. In addition, this state is used to indicate the + * currently active child of a component such as a list, table, or tree. For + * example, the active child of a list is the child that is drawn with a + * rectangle around it. + * * @see AccessibleRole#WINDOW * @see AccessibleRole#FRAME * @see AccessibleRole#DIALOG @@ -66,28 +64,30 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("active"); /** - * Indicates this object is currently pressed. This is usually - * associated with buttons and indicates the user has pressed a - * mouse button while the pointer was over the button and has - * not yet released the mouse button. + * Indicates this object is currently pressed. This is usually associated + * with buttons and indicates the user has pressed a mouse button while the + * pointer was over the button and has not yet released the mouse button. + * * @see AccessibleRole#PUSH_BUTTON */ public static final AccessibleState PRESSED = new AccessibleState("pressed"); /** - * Indicates that the object is armed. This is usually used on buttons - * that have been pressed but not yet released, and the mouse pointer - * is still over the button. + * Indicates that the object is armed. This is usually used on buttons that + * have been pressed but not yet released, and the mouse pointer is still + * over the button. + * * @see AccessibleRole#PUSH_BUTTON */ public static final AccessibleState ARMED = new AccessibleState("armed"); /** - * Indicates the current object is busy. This is usually used on objects - * such as progress bars, sliders, or scroll bars to indicate they are - * in a state of transition. + * Indicates the current object is busy. This is usually used on objects + * such as progress bars, sliders, or scroll bars to indicate they are in a + * state of transition. + * * @see AccessibleRole#PROGRESS_BAR * @see AccessibleRole#SCROLL_BAR * @see AccessibleRole#SLIDER @@ -96,8 +96,9 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("busy"); /** - * Indicates this object is currently checked. This is usually used on + * Indicates this object is currently checked. This is usually used on * objects such as toggle buttons, radio buttons, and check boxes. + * * @see AccessibleRole#TOGGLE_BUTTON * @see AccessibleRole#RADIO_BUTTON * @see AccessibleRole#CHECK_BOX @@ -106,19 +107,21 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("checked"); /** - * Indicates the user can change the contents of this object. This - * is usually used primarily for objects that allow the user to - * enter text. Other objects, such as scroll bars and sliders, - * are automatically editable if they are enabled. + * Indicates the user can change the contents of this object. This is + * usually used primarily for objects that allow the user to enter text. + * Other objects, such as scroll bars and sliders, are automatically + * editable if they are enabled. + * * @see #ENABLED */ public static final AccessibleState EDITABLE = new AccessibleState("editable"); /** - * Indicates this object allows progressive disclosure of its children. - * This is usually used with hierarchical objects such as trees and - * is often paired with the EXPANDED or COLLAPSED states. + * Indicates this object allows progressive disclosure of its children. This + * is usually used with hierarchical objects such as trees and is often + * paired with the {@code EXPANDED} or {@code COLLAPSED} states. + * * @see #EXPANDED * @see #COLLAPSED * @see AccessibleRole#TREE @@ -127,9 +130,10 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("expandable"); /** - * Indicates this object is collapsed. This is usually paired with the - * EXPANDABLE state and is used on objects that provide progressive + * Indicates this object is collapsed. This is usually paired with the + * {@code EXPANDABLE} state and is used on objects that provide progressive * disclosure such as trees. + * * @see #EXPANDABLE * @see #EXPANDED * @see AccessibleRole#TREE @@ -138,9 +142,10 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("collapsed"); /** - * Indicates this object is expanded. This is usually paired with the - * EXPANDABLE state and is used on objects that provide progressive + * Indicates this object is expanded. This is usually paired with the + * {@code EXPANDABLE} state and is used on objects that provide progressive * disclosure such as trees. + * * @see #EXPANDABLE * @see #COLLAPSED * @see AccessibleRole#TREE @@ -149,18 +154,19 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("expanded"); /** - * Indicates this object is enabled. The absence of this state from an - * object's state set indicates this object is not enabled. An object - * that is not enabled cannot be manipulated by the user. In a graphical - * display, it is usually grayed out. + * Indicates this object is enabled. The absence of this state from an + * object's state set indicates this object is not enabled. An object that + * is not enabled cannot be manipulated by the user. In a graphical display, + * it is usually grayed out. */ public static final AccessibleState ENABLED = new AccessibleState("enabled"); /** - * Indicates this object can accept keyboard focus, which means all - * events resulting from typing on the keyboard will normally be - * passed to it when it has focus. + * Indicates this object can accept keyboard focus, which means all events + * resulting from typing on the keyboard will normally be passed to it when + * it has focus. + * * @see #FOCUSED */ public static final AccessibleState FOCUSABLE @@ -168,15 +174,16 @@ public class AccessibleState extends AccessibleBundle { /** * Indicates this object currently has the keyboard focus. + * * @see #FOCUSABLE */ public static final AccessibleState FOCUSED = new AccessibleState("focused"); /** - * Indicates this object is minimized and is represented only by an - * icon. This is usually only associated with frames and internal - * frames. + * Indicates this object is minimized and is represented only by an icon. + * This is usually only associated with frames and internal frames. + * * @see AccessibleRole#FRAME * @see AccessibleRole#INTERNAL_FRAME */ @@ -184,20 +191,21 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("iconified"); /** - * Indicates something must be done with this object before the - * user can interact with an object in a different window. This - * is usually associated only with dialogs. + * Indicates something must be done with this object before the user can + * interact with an object in a different window. This is usually associated + * only with dialogs. + * * @see AccessibleRole#DIALOG */ public static final AccessibleState MODAL = new AccessibleState("modal"); /** - * Indicates this object paints every pixel within its - * rectangular region. A non-opaque component paints only some of - * its pixels, allowing the pixels underneath it to "show through". - * A component that does not fully paint its pixels therefore - * provides a degree of transparency. + * Indicates this object paints every pixel within its rectangular region. A + * non-opaque component paints only some of its pixels, allowing the pixels + * underneath it to "show through". A component that does not fully paint + * its pixels therefore provides a degree of transparency. + * * @see Accessible#getAccessibleContext * @see AccessibleContext#getAccessibleComponent * @see AccessibleComponent#getBounds @@ -207,6 +215,7 @@ public class AccessibleState extends AccessibleBundle { /** * Indicates the size of this object is not fixed. + * * @see Accessible#getAccessibleContext * @see AccessibleContext#getAccessibleComponent * @see AccessibleComponent#getSize @@ -217,8 +226,9 @@ public class AccessibleState extends AccessibleBundle { /** - * Indicates this object allows more than one of its children to - * be selected at the same time. + * Indicates this object allows more than one of its children to be selected + * at the same time. + * * @see Accessible#getAccessibleContext * @see AccessibleContext#getAccessibleSelection * @see AccessibleSelection @@ -227,9 +237,10 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("multiselectable"); /** - * Indicates this object is the child of an object that allows its - * children to be selected, and that this child is one of those - * children that can be selected. + * Indicates this object is the child of an object that allows its children + * to be selected, and that this child is one of those children that can be + * selected. + * * @see #SELECTED * @see Accessible#getAccessibleContext * @see AccessibleContext#getAccessibleSelection @@ -239,9 +250,10 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("selectable"); /** - * Indicates this object is the child of an object that allows its - * children to be selected, and that this child is one of those - * children that has been selected. + * Indicates this object is the child of an object that allows its children + * to be selected, and that this child is one of those children that has + * been selected. + * * @see #SELECTABLE * @see Accessible#getAccessibleContext * @see AccessibleContext#getAccessibleSelection @@ -251,29 +263,31 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("selected"); /** - * Indicates this object, the object's parent, the object's parent's - * parent, and so on, are all visible. Note that this does not - * necessarily mean the object is painted on the screen. It might - * be occluded by some other showing object. + * Indicates this object, the object's parent, the object's parent's parent, + * and so on, are all visible. Note that this does not necessarily mean the + * object is painted on the screen. It might be occluded by some other + * showing object. + * * @see #VISIBLE */ public static final AccessibleState SHOWING = new AccessibleState("showing"); /** - * Indicates this object is visible. Note: this means that the - * object intends to be visible; however, it may not in fact be - * showing on the screen because one of the objects that this object - * is contained by is not visible. + * Indicates this object is visible. Note: this means that the object + * intends to be visible; however, it may not in fact be showing on the + * screen because one of the objects that this object is contained by is not + * visible. + * * @see #SHOWING */ public static final AccessibleState VISIBLE = new AccessibleState("visible"); /** - * Indicates the orientation of this object is vertical. This is - * usually associated with objects such as scrollbars, sliders, and - * progress bars. + * Indicates the orientation of this object is vertical. This is usually + * associated with objects such as scrollbars, sliders, and progress bars. + * * @see #VERTICAL * @see AccessibleRole#SCROLL_BAR * @see AccessibleRole#SLIDER @@ -283,9 +297,9 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("vertical"); /** - * Indicates the orientation of this object is horizontal. This is - * usually associated with objects such as scrollbars, sliders, and - * progress bars. + * Indicates the orientation of this object is horizontal. This is usually + * associated with objects such as scrollbars, sliders, and progress bars. + * * @see #HORIZONTAL * @see AccessibleRole#SCROLL_BAR * @see AccessibleRole#SLIDER @@ -295,39 +309,38 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("horizontal"); /** - * Indicates this (text) object can contain only a single line of text + * Indicates this (text) object can contain only a single line of text. */ public static final AccessibleState SINGLE_LINE = new AccessibleState("singleline"); /** - * Indicates this (text) object can contain multiple lines of text + * Indicates this (text) object can contain multiple lines of text. */ public static final AccessibleState MULTI_LINE = new AccessibleState("multiline"); /** - * Indicates this object is transient. An assistive technology should - * not add a PropertyChange listener to an object with transient state, - * as that object will never generate any events. Transient objects - * are typically created to answer Java Accessibility method queries, - * but otherwise do not remain linked to the underlying object (for - * example, those objects underneath lists, tables, and trees in Swing, - * where only one actual UI Component does shared rendering duty for - * all of the data objects underneath the actual list/table/tree elements). + * Indicates this object is transient. An assistive technology should not + * add a {@code PropertyChange} listener to an object with transient state, + * as that object will never generate any events. Transient objects are + * typically created to answer Java Accessibility method queries, but + * otherwise do not remain linked to the underlying object (for example, + * those objects underneath lists, tables, and trees in Swing, where only + * one actual {@code UI Component} does shared rendering duty for all of the + * data objects underneath the actual list/table/tree elements). * * @since 1.5 - * */ public static final AccessibleState TRANSIENT = new AccessibleState("transient"); /** - * Indicates this object is responsible for managing its - * subcomponents. This is typically used for trees and tables - * that have a large number of subcomponents and where the - * objects are created only when needed and otherwise remain virtual. - * The application should not manage the subcomponents directly. + * Indicates this object is responsible for managing its subcomponents. This + * is typically used for trees and tables that have a large number of + * subcomponents and where the objects are created only when needed and + * otherwise remain virtual. The application should not manage the + * subcomponents directly. * * @since 1.5 */ @@ -335,10 +348,9 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState ("managesDescendants"); /** - * Indicates that the object state is indeterminate. An example - * is selected text that is partially bold and partially not - * bold. In this case the attributes associated with the selected - * text are indeterminate. + * Indicates that the object state is indeterminate. An example is selected + * text that is partially bold and partially not bold. In this case the + * attributes associated with the selected text are indeterminate. * * @since 1.5 */ @@ -346,10 +358,9 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState ("indeterminate"); /** - * A state indicating that text is truncated by a bounding rectangle - * and that some of the text is not displayed on the screen. An example - * is text in a spreadsheet cell that is truncated by the bounds of - * the cell. + * A state indicating that text is truncated by a bounding rectangle and + * that some of the text is not displayed on the screen. An example is text + * in a spreadsheet cell that is truncated by the bounds of the cell. * * @since 1.5 */ @@ -357,16 +368,16 @@ public class AccessibleState extends AccessibleBundle { = new AccessibleState("truncated"); /** - * Creates a new AccessibleState using the given locale independent key. - * This should not be a public method. Instead, it is used to create + * Creates a new {@code AccessibleState} using the given locale independent + * key. This should not be a public method. Instead, it is used to create * the constants in this file to make it a strongly typed enumeration. * Subclasses of this class should enforce similar policy. *

                - * The key String should be a locale independent key for the state. - * It is not intended to be used as the actual String to display - * to the user. To get the localized string, use toDisplayString. + * The key {@code String} should be a locale independent key for the state. + * It is not intended to be used as the actual {@code String} to display to + * the user. To get the localized string, use {@link #toDisplayString()}. * - * @param key the locale independent name of the state. + * @param key the locale independent name of the state * @see AccessibleBundle#toDisplayString */ protected AccessibleState(String key) { diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleStateSet.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleStateSet.java index 602b83855db..a8f0968c172 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleStateSet.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleStateSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -26,24 +26,21 @@ package javax.accessibility; import java.util.Vector; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; /** - * Class AccessibleStateSet determines a component's state set. The state set - * of a component is a set of AccessibleState objects and descriptions. E.G., The - * current overall state of the object, such as whether it is enabled, - * has focus, etc. + * Class {@code AccessibleStateSet} determines a component's state set. The + * state set of a component is a set of {@code AccessibleState} objects and + * descriptions. E.G., The current overall state of the object, such as whether + * it is enabled, has focus, etc. * + * @author Willie Walker * @see AccessibleState - * - * @author Willie Walker */ public class AccessibleStateSet { /** - * Each entry in the Vector represents an AccessibleState. + * Each entry in the {@code Vector} represents an {@code AccessibleState}. + * * @see #add * @see #addAll * @see #remove @@ -61,10 +58,11 @@ public class AccessibleStateSet { } /** - * Creates a new state with the initial set of states contained in - * the array of states passed in. Duplicate entries are ignored. + * Creates a new state with the initial set of states contained in the array + * of states passed in. Duplicate entries are ignored. * - * @param states an array of AccessibleState describing the state set. + * @param states an array of {@code AccessibleState} describing the state + * set */ public AccessibleStateSet(AccessibleState[] states) { if (states.length != 0) { @@ -78,14 +76,14 @@ public class AccessibleStateSet { } /** - * Adds a new state to the current state set if it is not already - * present. If the state is already in the state set, the state - * set is unchanged and the return value is false. Otherwise, - * the state is added to the state set and the return value is - * true. - * @param state the state to add to the state set - * @return true if state is added to the state set; false if the state set - * is unchanged + * Adds a new state to the current state set if it is not already present. + * If the state is already in the state set, the state set is unchanged and + * the return value is {@code false}. Otherwise, the state is added to the + * state set and the return value is {@code true}. + * + * @param state the state to add to the state set + * @return {@code true} if state is added to the state set; {@code false} if + * the state set is unchanged */ public boolean add(AccessibleState state) { // [[[ PENDING: WDW - the implementation of this does not need @@ -104,9 +102,10 @@ public class AccessibleStateSet { } /** - * Adds all of the states to the existing state set. Duplicate entries - * are ignored. - * @param states AccessibleState array describing the state set. + * Adds all of the states to the existing state set. Duplicate entries are + * ignored. + * + * @param states {@code AccessibleState} array describing the state set */ public void addAll(AccessibleState[] states) { if (states.length != 0) { @@ -122,14 +121,14 @@ public class AccessibleStateSet { } /** - * Removes a state from the current state set. If the state is not - * in the set, the state set will be unchanged and the return value - * will be false. If the state is in the state set, it will be removed - * from the set and the return value will be true. + * Removes a state from the current state set. If the state is not in the + * set, the state set will be unchanged and the return value will be + * {@code false}. If the state is in the state set, it will be removed from + * the set and the return value will be {@code true}. * - * @param state the state to remove from the state set - * @return true if the state is in the state set; false if the state set - * will be unchanged + * @param state the state to remove from the state set + * @return {@code true} if the state is in the state set; {@code false} if + * the state set will be unchanged */ public boolean remove(AccessibleState state) { if (states == null) { @@ -150,8 +149,10 @@ public class AccessibleStateSet { /** * Checks if the current state is in the state set. - * @param state the state - * @return true if the state is in the state set; otherwise false + * + * @param state the state + * @return {@code true} if the state is in the state set; otherwise + * {@code false} */ public boolean contains(AccessibleState state) { if (states == null) { @@ -162,8 +163,9 @@ public class AccessibleStateSet { } /** - * Returns the current state set as an array of AccessibleState - * @return AccessibleState array containing the current state. + * Returns the current state set as an array of {@code AccessibleState}. + * + * @return {@code AccessibleState} array containing the current state */ public AccessibleState[] toArray() { if (states == null) { @@ -178,10 +180,10 @@ public class AccessibleStateSet { } /** - * Creates a localized String representing all the states in the set - * using the default locale. + * Creates a localized string representing all the states in the set using + * the default locale. * - * @return comma separated localized String + * @return comma separated localized string * @see AccessibleBundle#toDisplayString */ public String toString() { diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleStreamable.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleStreamable.java index 176290346d3..8288d8642fc 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleStreamable.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleStreamable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -25,41 +25,40 @@ package javax.accessibility; -import java.io.InputStream; import java.awt.datatransfer.DataFlavor; +import java.io.InputStream; /** - * - * The {@code AccessibleStreamable} interface should be implemented - * by the {@code AccessibleContext} of any component that presents the - * raw stream behind a component on the display screen. Examples of such - * components are HTML, bitmap images and MathML. An object that implements - * {@code AccessibleStreamable} provides two things: a list of MIME - * types supported by the object and a streaming interface for each MIME type to - * get the data. + * The {@code AccessibleStreamable} interface should be implemented by the + * {@code AccessibleContext} of any component that presents the raw stream + * behind a component on the display screen. Examples of such components are + * HTML, bitmap images and MathML. An object that implements + * {@code AccessibleStreamable} provides two things: a list of MIME types + * supported by the object and a streaming interface for each MIME type to get + * the data. * * @author Lynn Monsanto * @author Peter Korn - * - * @see javax.accessibility.AccessibleContext + * @see AccessibleContext * @since 1.5 */ public interface AccessibleStreamable { - /** - * Returns an array of DataFlavor objects for the MIME types - * this object supports. - * - * @return an array of DataFlavor objects for the MIME types - * this object supports. - */ - DataFlavor[] getMimeTypes(); /** - * Returns an InputStream for a DataFlavor - * - * @param flavor the DataFlavor - * @return an ImputStream if an ImputStream for this DataFlavor exists. - * Otherwise, null is returned. - */ - InputStream getStream(DataFlavor flavor); + * Returns an array of {@code DataFlavor} objects for the MIME types this + * object supports. + * + * @return an array of {@code DataFlavor} objects for the MIME types this + * object supports + */ + DataFlavor[] getMimeTypes(); + + /** + * Returns an {@code InputStream} for a {@code DataFlavor}. + * + * @param flavor the {@code DataFlavor} + * @return an {@code ImputStream} if an input stream for this + * {@code DataFlavor} exists. Otherwise, {@code null} is returned. + */ + InputStream getStream(DataFlavor flavor); } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTable.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTable.java index 74c7a03dc0d..c3ca7bb7899 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTable.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -26,10 +26,10 @@ package javax.accessibility; /** - * Class AccessibleTable describes a user-interface component that + * Class {@code AccessibleTable} describes a user-interface component that * presents data in a two-dimensional table format. * - * @author Lynn Monsanto + * @author Lynn Monsanto * @since 1.3 */ public interface AccessibleTable { @@ -44,7 +44,7 @@ public interface AccessibleTable { /** * Sets the caption for the table. * - * @param a the caption for the table + * @param a the caption for the table */ public void setAccessibleCaption(Accessible a); @@ -56,9 +56,9 @@ public interface AccessibleTable { public Accessible getAccessibleSummary(); /** - * Sets the summary description of the table + * Sets the summary description of the table. * - * @param a the summary description of the table + * @param a the summary description of the table */ public void setAccessibleSummary(Accessible a); @@ -77,73 +77,69 @@ public interface AccessibleTable { public int getAccessibleColumnCount(); /** - * Returns the Accessible at a specified row and column - * in the table. + * Returns the {@code Accessible} at a specified row and column in the + * table. * - * @param r zero-based row of the table - * @param c zero-based column of the table - * @return the Accessible at the specified row and column + * @param r zero-based row of the table + * @param c zero-based column of the table + * @return the {@code Accessible} at the specified row and column */ public Accessible getAccessibleAt(int r, int c); /** - * Returns the number of rows occupied by the Accessible at - * a specified row and column in the table. + * Returns the number of rows occupied by the {@code Accessible} at a + * specified row and column in the table. * - * @param r zero-based row of the table - * @param c zero-based column of the table - * @return the number of rows occupied by the Accessible at a - * given specified (row, column) + * @param r zero-based row of the table + * @param c zero-based column of the table + * @return the number of rows occupied by the {@code Accessible} at a given + * specified (row, column) */ public int getAccessibleRowExtentAt(int r, int c); /** - * Returns the number of columns occupied by the Accessible at - * a specified row and column in the table. + * Returns the number of columns occupied by the {@code Accessible} at a + * specified row and column in the table. * - * @param r zero-based row of the table - * @param c zero-based column of the table - * @return the number of columns occupied by the Accessible at a - * given specified row and column + * @param r zero-based row of the table + * @param c zero-based column of the table + * @return the number of columns occupied by the {@code Accessible} at a + * given specified row and column */ public int getAccessibleColumnExtentAt(int r, int c); /** - * Returns the row headers as an AccessibleTable. + * Returns the row headers as an {@code AccessibleTable}. * - * @return an AccessibleTable representing the row - * headers + * @return an {@code AccessibleTable} representing the row headers */ public AccessibleTable getAccessibleRowHeader(); /** * Sets the row headers. * - * @param table an AccessibleTable representing the - * row headers + * @param table an {@code AccessibleTable} representing the row headers */ public void setAccessibleRowHeader(AccessibleTable table); /** - * Returns the column headers as an AccessibleTable. + * Returns the column headers as an {@code AccessibleTable}. * - * @return an AccessibleTable representing the column - * headers + * @return an {@code AccessibleTable} representing the column headers */ public AccessibleTable getAccessibleColumnHeader(); /** * Sets the column headers. * - * @param table an AccessibleTable representing the - * column headers + * @param table an {@code AccessibleTable} representing the column headers */ public void setAccessibleColumnHeader(AccessibleTable table); /** * Returns the description of the specified row in the table. * - * @param r zero-based row of the table + * @param r zero-based row of the table * @return the description of the row */ public Accessible getAccessibleRowDescription(int r); @@ -151,15 +147,15 @@ public interface AccessibleTable { /** * Sets the description text of the specified row of the table. * - * @param r zero-based row of the table - * @param a the description of the row + * @param r zero-based row of the table + * @param a the description of the row */ public void setAccessibleRowDescription(int r, Accessible a); /** * Returns the description text of the specified column in the table. * - * @param c zero-based column of the table + * @param c zero-based column of the table * @return the text description of the column */ public Accessible getAccessibleColumnDescription(int c); @@ -167,56 +163,54 @@ public interface AccessibleTable { /** * Sets the description text of the specified column in the table. * - * @param c zero-based column of the table - * @param a the text description of the column + * @param c zero-based column of the table + * @param a the text description of the column */ public void setAccessibleColumnDescription(int c, Accessible a); /** - * Returns a boolean value indicating whether the accessible at - * a specified row and column is selected. + * Returns a boolean value indicating whether the accessible at a specified + * row and column is selected. * - * @param r zero-based row of the table - * @param c zero-based column of the table - * @return the boolean value true if the accessible at the - * row and column is selected. Otherwise, the boolean value - * false + * @param r zero-based row of the table + * @param c zero-based column of the table + * @return the boolean value {@code true} if the accessible at the row and + * column is selected. Otherwise, the boolean value {@code false} */ public boolean isAccessibleSelected(int r, int c); /** - * Returns a boolean value indicating whether the specified row - * is selected. + * Returns a boolean value indicating whether the specified row is selected. * - * @param r zero-based row of the table - * @return the boolean value true if the specified row is selected. - * Otherwise, false. + * @param r zero-based row of the table + * @return the boolean value {@code true} if the specified row is selected. + * Otherwise, {@code false}. */ public boolean isAccessibleRowSelected(int r); /** - * Returns a boolean value indicating whether the specified column - * is selected. + * Returns a boolean value indicating whether the specified column is + * selected. * - * @param c zero-based column of the table - * @return the boolean value true if the specified column is selected. - * Otherwise, false. + * @param c zero-based column of the table + * @return the boolean value {@code true} if the specified column is + * selected. Otherwise, {@code false}. */ public boolean isAccessibleColumnSelected(int c); /** * Returns the selected rows in a table. * - * @return an array of selected rows where each element is a - * zero-based row of the table + * @return an array of selected rows where each element is a zero-based row + * of the table */ - public int [] getSelectedAccessibleRows(); + public int[] getSelectedAccessibleRows(); /** * Returns the selected columns in a table. * - * @return an array of selected columns where each element is a - * zero-based column of the table + * @return an array of selected columns where each element is a zero-based + * column of the table */ - public int [] getSelectedAccessibleColumns(); + public int[] getSelectedAccessibleColumns(); } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTableModelChange.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTableModelChange.java index 03cdf9ab666..fdcd597768d 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTableModelChange.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTableModelChange.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -26,31 +26,30 @@ package javax.accessibility; /** - * The AccessibleTableModelChange interface describes a change to - * the table model. The attributes of the model change can be - * obtained by the following methods: + * The {@code AccessibleTableModelChange} interface describes a change to the + * table model. The attributes of the model change can be obtained by the + * following methods: *

                  - *
                • public int getType() - *
                • public int getFirstRow(); - *
                • public int getLastRow(); - *
                • public int getFirstColumn(); - *
                • public int getLastColumn(); + *
                • {@code public int getType();} + *
                • {@code public int getFirstRow();} + *
                • {@code public int getLastRow();} + *
                • {@code public int getFirstColumn();} + *
                • {@code public int getLastColumn();} *
                * The model change type returned by getType() will be one of: *
                  - *
                • INSERT - one or more rows and/or columns have been inserted - *
                • UPDATE - some of the table data has changed - *
                • DELETE - one or more rows and/or columns have been deleted + *
                • {@code INSERT} - one or more rows and/or columns have been inserted + *
                • {@code UPDATE} - some of the table data has changed + *
                • {@code DELETE} - one or more rows and/or columns have been deleted *
                - * The affected area of the table can be determined by the other - * four methods which specify ranges of rows and columns + * The affected area of the table can be determined by the other four methods + * which specify ranges of rows and columns * + * @author Lynn Monsanto * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleContext#getAccessibleTable - * - * @author Lynn Monsanto * @since 1.3 */ public interface AccessibleTableModelChange { @@ -71,34 +70,39 @@ public interface AccessibleTableModelChange { public static final int DELETE = -1; /** - * Returns the type of event. - * @return the type of event - * @see #INSERT - * @see #UPDATE - * @see #DELETE + * Returns the type of event. + * + * @return the type of event + * @see #INSERT + * @see #UPDATE + * @see #DELETE */ public int getType(); /** * Returns the first row that changed. + * * @return the first row that changed */ public int getFirstRow(); /** * Returns the last row that changed. + * * @return the last row that changed */ public int getLastRow(); /** * Returns the first column that changed. + * * @return the first column that changed */ public int getFirstColumn(); /** * Returns the last column that changed. + * * @return the last column that changed */ public int getLastColumn(); diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleText.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleText.java index 238a61aef24..68de08e4bb5 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleText.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,29 +25,27 @@ package javax.accessibility; +import java.awt.Point; +import java.awt.Rectangle; -import java.util.*; -import java.awt.*; -import javax.swing.text.*; - +import javax.swing.text.AttributeSet; /** - *

                The AccessibleText interface should be implemented by all - * classes that present textual information on the display. This interface - * provides the standard mechanism for an assistive technology to access - * that text via its content, attributes, and spatial location. - * Applications can determine if an object supports the AccessibleText - * interface by first obtaining its AccessibleContext (see {@link Accessible}) - * and then calling the {@link AccessibleContext#getAccessibleText} method of - * AccessibleContext. If the return value is not null, the object supports this - * interface. + * The {@code AccessibleText} interface should be implemented by all classes + * that present textual information on the display. This interface provides the + * standard mechanism for an assistive technology to access that text via its + * content, attributes, and spatial location. Applications can determine if an + * object supports the {@code AccessibleText} interface by first obtaining its + * {@code AccessibleContext} (see {@link Accessible}) and then calling the + * {@link AccessibleContext#getAccessibleText} method of + * {@code AccessibleContext}. If the return value is not {@code null}, the + * object supports this interface. * + * @author Peter Korn * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleContext#getAccessibleText - * - * @author Peter Korn */ public interface AccessibleText { @@ -74,13 +72,13 @@ public interface AccessibleText { /** * Constant used to indicate that the part of the text that should be * retrieved is a sentence. - * - * A sentence is a string of words which expresses an assertion, - * a question, a command, a wish, an exclamation, or the performance - * of an action. In English locales, the string usually begins with - * a capital letter and concludes with appropriate end punctuation; - * such as a period, question or exclamation mark. Other locales may - * use different capitalization and/or punctuation. + *

                + * A sentence is a string of words which expresses an assertion, a question, + * a command, a wish, an exclamation, or the performance of an action. In + * English locales, the string usually begins with a capital letter and + * concludes with appropriate end punctuation; such as a period, question or + * exclamation mark. Other locales may use different capitalization and/or + * punctuation. * * @see #getAtIndex * @see #getAfterIndex @@ -89,29 +87,29 @@ public interface AccessibleText { public static final int SENTENCE = 3; /** - * Given a point in local coordinates, return the zero-based index - * of the character under that Point. If the point is invalid, - * this method returns -1. + * Given a point in local coordinates, return the zero-based index of the + * character under that point. If the point is invalid, this method returns + * -1. * - * @param p the Point in local coordinates - * @return the zero-based index of the character under Point p; if - * Point is invalid return -1. + * @param p the point in local coordinates + * @return the zero-based index of the character under {@code Point p}; if + * point is invalid return -1. */ public int getIndexAtPoint(Point p); /** - * Determines the bounding box of the character at the given - * index into the string. The bounds are returned in local - * coordinates. If the index is invalid an empty rectangle is returned. + * Determines the bounding box of the character at the given index into the + * string. The bounds are returned in local coordinates. If the index is + * invalid an empty rectangle is returned. * - * @param i the index into the String - * @return the screen coordinates of the character's bounding box, - * if index is invalid return an empty rectangle. + * @param i the index into the string + * @return the screen coordinates of the character's bounding box, if index + * is invalid return an empty rectangle. */ public Rectangle getCharacterBounds(int i); /** - * Returns the number of characters (valid indicies) + * Returns the number of characters (valid indicies). * * @return the number of characters */ @@ -119,61 +117,62 @@ public interface AccessibleText { /** * Returns the zero-based offset of the caret. + *

                + * Note: That to the right of the caret will have the same index value as + * the offset (the caret is between two characters). * - * Note: That to the right of the caret will have the same index - * value as the offset (the caret is between two characters). - * @return the zero-based offset of the caret. + * @return the zero-based offset of the caret */ public int getCaretPosition(); /** - * Returns the String at a given index. + * Returns the {@code String} at a given index. * - * @param part the CHARACTER, WORD, or SENTENCE to retrieve - * @param index an index within the text + * @param part the CHARACTER, WORD, or SENTENCE to retrieve + * @param index an index within the text * @return the letter, word, or sentence */ public String getAtIndex(int part, int index); /** - * Returns the String after a given index. + * Returns the {@code String} after a given index. * - * @param part the CHARACTER, WORD, or SENTENCE to retrieve - * @param index an index within the text + * @param part the CHARACTER, WORD, or SENTENCE to retrieve + * @param index an index within the text * @return the letter, word, or sentence */ public String getAfterIndex(int part, int index); /** - * Returns the String before a given index. + * Returns the {@code String} before a given index. * - * @param part the CHARACTER, WORD, or SENTENCE to retrieve - * @param index an index within the text + * @param part the CHARACTER, WORD, or SENTENCE to retrieve + * @param index an index within the text * @return the letter, word, or sentence */ public String getBeforeIndex(int part, int index); /** - * Returns the AttributeSet for a given character at a given index + * Returns the {@code AttributeSet} for a given character at a given index. * - * @param i the zero-based index into the text - * @return the AttributeSet of the character + * @param i the zero-based index into the text + * @return the {@code AttributeSet} of the character */ public AttributeSet getCharacterAttribute(int i); /** - * Returns the start offset within the selected text. - * If there is no selection, but there is - * a caret, the start and end offsets will be the same. + * Returns the start offset within the selected text. If there is no + * selection, but there is a caret, the start and end offsets will be the + * same. * * @return the index into the text of the start of the selection */ public int getSelectionStart(); /** - * Returns the end offset within the selected text. - * If there is no selection, but there is - * a caret, the start and end offsets will be the same. + * Returns the end offset within the selected text. If there is no + * selection, but there is a caret, the start and end offsets will be the + * same. * * @return the index into the text of the end of the selection */ @@ -182,7 +181,7 @@ public interface AccessibleText { /** * Returns the portion of the text that is selected. * - * @return the String portion of the text that is selected + * @return the {@code String} portion of the text that is selected */ public String getSelectedText(); } diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTextSequence.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTextSequence.java index 195d1fb7263..a50667ce770 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTextSequence.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleTextSequence.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -22,50 +22,41 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package javax.accessibility; - /** - *

                The AccessibleTextSequence provides information about - * a contiguous sequence of text. + * This class collects together key details of a span of text. It is used by + * implementors of the class {@code AccessibleExtendedText} in order to return + * the requested triplet of a {@code String}, and the start and end + * indicies/offsets into a larger body of text that the {@code String} comes + * from. * - * @see Accessible - * @see Accessible#getAccessibleContext - * @see AccessibleContext - * @see AccessibleContext#getAccessibleText - * @see AccessibleAttributeSequence - * - * @author Lynn Monsanto - */ - -/** - * This class collects together key details of a span of text. It - * is used by implementors of the class {@code AccessibleExtendedText} in - * order to return the requested triplet of a {@code String}, and the - * start and end indicies/offsets into a larger body of text that the - * {@code String} comes from. - * - * @see javax.accessibility.AccessibleExtendedText + * @see AccessibleExtendedText */ public class AccessibleTextSequence { - /** The start index of the text sequence */ + /** + * The start index of the text sequence. + */ public int startIndex; - /** The end index of the text sequence */ + /** + * The end index of the text sequence. + */ public int endIndex; - /** The text */ + /** + * The text. + */ public String text; /** - * Constructs an {@code AccessibleTextSequence} with the given - * parameters. - * - * @param start the beginning index of the span of text - * @param end the ending index of the span of text - * @param txt the {@code String} shared by this text span + * Constructs an {@code AccessibleTextSequence} with the given parameters. * + * @param start the beginning index of the span of text + * @param end the ending index of the span of text + * @param txt the {@code String} shared by this text span * @since 1.6 */ public AccessibleTextSequence(int start, int end, String txt) { diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleValue.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleValue.java index 448eaac4f37..419e17b4345 100644 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleValue.java +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleValue.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -26,31 +26,28 @@ package javax.accessibility; /** - * The AccessibleValue interface should be supported by any object - * that supports a numerical value (e.g., a scroll bar). This interface - * provides the standard mechanism for an assistive technology to determine - * and set the numerical value as well as get the minimum and maximum values. - * Applications can determine - * if an object supports the AccessibleValue interface by first - * obtaining its AccessibleContext (see - * {@link Accessible}) and then calling the - * {@link AccessibleContext#getAccessibleValue} method. - * If the return value is not null, the object supports this interface. + * The {@code AccessibleValue} interface should be supported by any object that + * supports a numerical value (e.g., a scroll bar). This interface provides the + * standard mechanism for an assistive technology to determine and set the + * numerical value as well as get the minimum and maximum values. Applications + * can determine if an object supports the {@code AccessibleValue} interface by + * first obtaining its {@code AccessibleContext} (see {@link Accessible}) and + * then calling the {@link AccessibleContext#getAccessibleValue} method. If the + * return value is not {@code null}, the object supports this interface. * + * @author Peter Korn + * @author Hans Muller + * @author Willie Walker * @see Accessible * @see Accessible#getAccessibleContext * @see AccessibleContext * @see AccessibleContext#getAccessibleValue - * - * @author Peter Korn - * @author Hans Muller - * @author Willie Walker */ public interface AccessibleValue { /** - * Get the value of this object as a Number. If the value has not been - * set, the return value will be null. + * Get the value of this object as a {@code Number}. If the value has not + * been set, the return value will be {@code null}. * * @return value of the object * @see #setCurrentAccessibleValue @@ -58,35 +55,35 @@ public interface AccessibleValue { public Number getCurrentAccessibleValue(); /** - * Set the value of this object as a Number. + * Set the value of this object as a {@code Number}. * - * @param n the number to use for the value - * @return True if the value was set; else False + * @param n the number to use for the value + * @return {@code true} if the value was set; else {@code false} * @see #getCurrentAccessibleValue */ public boolean setCurrentAccessibleValue(Number n); -// /** -// * Get the description of the value of this object. -// * -// * @return description of the value of the object -// */ -// public String getAccessibleValueDescription(); + // /** + // * Get the description of the value of this object. + // * + // * @return description of the value of the object + // */ + // public String getAccessibleValueDescription(); /** - * Get the minimum value of this object as a Number. + * Get the minimum value of this object as a {@code Number}. * - * @return Minimum value of the object; null if this object does not - * have a minimum value + * @return minimum value of the object; {@code null} if this object does not + * have a minimum value * @see #getMaximumAccessibleValue */ public Number getMinimumAccessibleValue(); /** - * Get the maximum value of this object as a Number. + * Get the maximum value of this object as a {@code Number}. * - * @return Maximum value of the object; null if this object does not - * have a maximum value + * @return maximum value of the object; {@code null} if this object does not + * have a maximum value * @see #getMinimumAccessibleValue */ public Number getMaximumAccessibleValue(); diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/package-info.java b/jdk/src/java.desktop/share/classes/javax/accessibility/package-info.java new file mode 100644 index 00000000000..959c192900f --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/accessibility/package-info.java @@ -0,0 +1,275 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Defines a contract between user-interface components and an assistive + * technology that provides access to those components. If a Java application + * fully supports the Java Accessibility API, then it should be compatible with, + * and friendly toward, assistive technologies such as screen readers, screen + * magnifiers, etc. With a Java application that fully supports the Java + * Accessibility API, no screen reader off screen model would be necessary + * because the API provides all of the information normally contained in an off + * screen model. + *

                + * The Java Accessibility API package consists of 8 Java programming language + * interfaces, and 6 Java programming language classes. These are described + * below. + * + *

                Interface + * Accessible

                + * Interface Accessible is the main interface of + * the Java Accessibility API. All components that support the Java + * Accessibility API must implement this interface. It contains a single method, + * {@code getAccessibleContext}, that returns an instance of the class + * AccessibleContext. Sun thinks that + * implementing this interface is the absolute minimum requirement of every + * object that is part of the user interface of a Java application, if that + * program is to be compatible with assistive technologies. + * + *

                Class + * AccessibleContext

                + * AccessibleContext represents the minimum + * information all accessible objects return and is obtained by calling the + * {@code getAccessibleContext} method on an object that implements the + * Accessible interface. This information includes the + * accessible name, description, role, and + * state of the object, as well as information + * about the parent and children of the object.  In addition, + * JavaBeans™ property change support is also included to allow assistive + * technologies learn when the values of the accessible properties change. + * AccessibleContext also contains methods for obtaining more specific + * accessibility information about a component. If the component supports it, + * these methods will return an object that implements one or more of the + * following interfaces: + *
                  + *
                • AccessibleAction - the object + * can perform one or more actions. This interface provides the standard + * mechanism for an assistive technology to determine what those actions are + * and tell the object to perform those actions. Any object that can be + * manipulated should return an object that implements this interface when + * the {@code getAccessibleAction} method is called on an AccessibleContext. + *
                • + *
                • AccessibleComponent - the + * object has a graphical representation. This interface provides the + * standard mechanism for an assistive technology to determine and set the + * graphical representation of the object. Any object that is rendered on + * the screen should return an object that implements this interface when + * the {@code getAccessibleComponent} method is called on an + * AccessibleContext.
                • + *
                • AccessibleSelection - the + * object allows its children to be selected. This interface provides the + * standard mechanism for an assistive technology to determine the currently + * selected children as well as modify the selection set. Any object that + * has children that can be selected should return an object that implements + * this interface when the {@code getAccessibleSelection} method is called + * on an AccessibleContext.
                • + *
                • AccessibleText - the object + * presents editable textual information on the display. This interface + * provides the standard mechanism for an assistive technology to access + * that text via its content, attributes, and spatial location. Any object + * that contains editable text should return an object that implements this + * interface when the {@code getAccessibleText} method is called on an + * AccessibleContext.
                • + *
                • AccessibleHypertext - the + * object presents hypertext information on the display. This interface + * provides the standard mechanism for an assistive technology to access that + * hypertext via its content, attributes, and spatial location. Any object + * that contains hypertext should return an object that implements this + * interface when the {@code getAccessibleText} method is called on an + * AccessibleContext.
                • + *
                • AccessibleValue - the object + * supports a numerical value. This interface provides the standard + * mechanism for an assistive technology to determine and set the current + * value of the object, as well as the minimum and maximum values. Any + * object that supports a numerical value should return an object that + * implements this interface when the {@code getAccessibleValue} method is + * called on an AccessibleContext.
                • + *
                + * + *

                Class + * AccessibleRole

                + * This class encapsulates the Accessible object's role in the user interface + * and is obtained by calling the {@code getAccessibleRole} method on an + * AccessibleContext. Accessible roles include + * "Check box", "Menu Item", "Panel", etc. These roles are identified by the + * constants in this class such as {@code AccessibleRole.CHECK_BOX, + * AccessibleRole.MENU_ITEM,} and {@code AccessibleRole.PANEL}. The constants in + * this class present a strongly typed enumeration of common object roles. A + * public constructor for this class has been purposely omitted and applications + * should use one of the constants from this class. Although this class + * pre-defines a large list of standard roles, it is extensible so additional + * programmer-defined roles can be added in the future without needing to modify + * the base class. + * + *

                Class + * AccessibleState

                + * This class encapsulates a particular state of the Accessible object. + * Accessible states include things like "Armed", "Busy", "Checked", "Focused", + * etc. These roles are identified by the constants in this class such as + * {@code AccessibleState.ARMED, AccessibleState.BUSY, AccessibleState.CHECKED,} + * and {@code AccessibleState.FOCUSED}. The sum of all the states of an + * Accessible object is called the + * AccessibleStateSet, and can be obtained by + * calling the {@code getAccessibleStateSet} method on an + * AccessibleContext. + *

                + * The constants in this class present a strongly typed enumeration of common + * object roles. A public constructor for this class has been purposely omitted + * and applications should use one of the constants from this class. Although + * this class pre-defines a large list of standard roles, it is extensible so + * additional, programmer-defined roles can be added in the future without + * needing to modify the base class. + * + *

                Class + * AccessibleStateSet

                + * This class encapsulates a collection of states of the Accessible object and + * is obtained by calling the {@code getAccessibleStateSet} method on an + * AccessibleContext. Since an object might + * have multiple states (e.g. it might be both "Checked" and "Focused"), this + * class is needed to encapsulate a collection of these states. Methods in the + * class provide for retrieving the individual + * AccessibleStates on the state set. + * + *

                Class + * AccessibleBundle

                + * This class is used to maintain a strongly typed enumeration. It is the super + * class of both the AccessibleRole and + * AccessibleState classes. Programmers normally + * do not interact with this class directly, but will instead use the + * AccessibleRole and + * AccessibleState classes. + * + *

                Interface + * AccessibleAction

                + * The AccessibleAction interface should be + * supported by any object that can perform one or more actions. This interface + * provides the standard mechanism for an assistive technology to determine what + * those actions are as well as tell the object to perform those actions. Any + * object that can be manipulated should support this interface. + *

                + * Applications can determine if an object supports the AccessibleAction + * interface by first obtaining its + * AccessibleContext (see + * Accessible) and then calling the + * {@code getAccessibleAction} method of + * AccessibleContext. If the return value is + * not {@code null}, the object supports this interface. + * + *

                + * Interface AccessibleComponent

                + * The AccessibleComponent interface + * should be supported by any object that is rendered on the screen. This + * interface provides the standard mechanism for an assistive technology to + * determine and set the graphical representation of an object.

                Applications + * can determine if an object supports the AccessibleComponent interface by + * first obtaining its AccessibleContext (see + * Accessible) and then calling the + * {@code getAccessibleComponent} method of + * AccessibleContext. If the return value is + * not {@code null}, the object supports this interface. + * + *

                + * Interface AccessibleSelection

                + * The AccessibleSelection interface + * provides the standard mechanism for an assistive technology to determine what + * the current selected children are, as well as modify the selection set. Any + * object that has children that can be selected should support this the + * AccessibleSelection interface. + *

                + * Applications can determine if an object supports the AccessibleSelection + * interface by first obtaining its + * AccessibleContext (see + * Accessible) and then calling the + * {@code getAccessibleSelection} method of + * AccessibleContext. If the return value is + * not {@code null}, the object supports this interface. + * + *

                Interface + * AccessibleText

                + * Interface AccessibleText is the contract + * for making rich, editable text Accessible. Not all text displayed on the + * screen is rich and editable (e.g. text contained in buttons, labels, menus, + * etc., which users aren't expected to manipulate). However, objects containing + * editable text must implement interface AccessibleText if they are to + * interoperate with assistive technologies. + *

                + * This interface provides support for going between pixel coordinates and the + * text at a given pixel coordinate, for retrieving the letter, word, and + * sentence at, before, or after a given position in the text. This interface + * provides support for retrieving the attributes of the character at a given + * position in the text (font, font size, style, etc.), as well as getting the + * selected text (if any), the length of the text, and the location of the text + * caret. + *

                + * Applications can determine if an object supports the AccessibleText interface + * by first obtaining its AccessibleContext + * (see Accessible) and then calling the + * {@code getAccessibleText} method of + * AccessibleContext. If the return value is + * not {@code null}, the object supports this interface. + * + *

                + * Interface AccessibleHypertext

                + * The AccessibleHypertext interface + * should be supported by any object that presents hypertext information on the + * display. This interface provides the standard mechanism for an assistive + * technology to access that text via its content, attributes, and spatial + * location. It also provides standard mechanisms for manipulating + * hyperlinks. Applications can determine if + * an object supports the AccessibleHypertext interface by first obtaining its + * AccessibleContext (see + * Accessible) and then calling the + * AccessibleContext.getAccessibleText() method of + * AccessibleContext. If the return value is a + * class which extends AccessibleHypertext, then that object supports + * AccessibleHypertext. + * + *

                + * Interface AccessibleHyperlink

                + * An object that is a hyperlink should support the + * AccessibleHyperlink interface.  + * An object that implements this interface will be returned by calling the + * getLink method on an AccessibleHypertext + * object. + * + *

                Interface + * AccessibleValue

                + * The AccessibleValue interface should be + * supported by any object that supports a numerical value (e.g., a scroll bar). + * This interface provides the standard mechanism for an assistive technology to + * determine and set the numerical value as well as get the minimum and maximum + * values. + *

                + * Applications can determine if an object supports the AccessibleValue + * interface by first obtaining its + * AccessibleContext (see + * Accessible) and then calling the + * {@code getAccessibleValue} method of + * AccessibleContext. If the return value is + * not {@code null}, the object supports this interface. + * + * @since 1.2 + */ +package javax.accessibility; diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/package.html b/jdk/src/java.desktop/share/classes/javax/accessibility/package.html deleted file mode 100644 index 4d1037aeb8b..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/accessibility/package.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - -Defines a contract between user-interface components and an assistive technology -that provides access to those components. If a Java application fully supports -the Java Accessibility API, then it should be compatible with, and friendly -toward, assistive technologies such as screen readers, screen magnifiers, -etc. With a Java application that fully supports the Java Accessibility -API, no screen reader off screen model would be necessary because the API -provides all of the information normally contained in an off screen model. - -

                The Java Accessibility API package consists of 8 Java programming language -interfaces, and 6 Java programming language classes. These are described -below. -

                -Interface Accessible

                -Interface Accessible is the main interface -of the Java Accessibility API. All components that support the Java Accessibility -API must implement this interface. It contains a single method, getAccessibleContext, -that returns an instance of the class AccessibleContext. -Sun thinks that implementing this interface is the absolute minimum requirement -of every object that is part of the user interface of a Java application, -if that program is to be compatible with assistive technologies. -

                -Class -AccessibleContext

                -AccessibleContext represents the minimum -information all accessible objects return and is obtained by calling the -getAccessibleContext method on an object that implements the Accessible -interface. This information includes the accessible name, description, -role, and state -of the object, as well as information about the parent and children of -the object.  In addition, JavaBeans TM -property change support is also included to allow assisitive technologies -learn when the values of the accessible properties change. AccessibleContext -also contains methods for obtaining more specific accessibility information -about a component. If the component supports it, these methods will return -an object that implements one or more of the following interfaces: -
                  -
                • -AccessibleAction - the object can -perform one or more actions. This interface provides the standard mechanism -for an assistive technology to determine what those actions are and tell -the object to perform those actions. Any object that can be manipulated -should return an object that implements this interface when the getAccessibleAction -method is called on an AccessibleContext.
                • - -
                • -AccessibleComponent - the object -has a graphical representation. This interface provides the standard mechanism -for an assistive technology to determine and set the graphical representation -of the object. Any object that is rendered on the screen should return -an object that implements this interface when the getAccessibleComponent -method is called on an AccessibleContext.
                • - -
                • -AccessibleSelection - the object -allows its children to be selected. This interface provides the standard -mechanism for an assistive technology to determine the currently selected -children as well as modify the selection set. Any object that has children -that can be selected should return an object that implements this interface -when the getAccessibleSelection method is called on an AccessibleContext.
                • - -
                • -AccessibleText - the object presents -editable textual information on the display. This interface provides the -standard mechanism for an assistive technology to access that text via -its content, attributes, and spatial location. Any object that contains -editable text should return an object that implements this interface when -the getAccessibleText method is called on an AccessibleContext.
                • - -
                • -AccessibleHypertext - the object -presents hypertext information on the display. This interface provides -the standard mechanism for an assistive technology to access that hypertext -via its content, attributes, and spatial location. Any object that contains -hypertext should return an object that implements this interface when the -getAccessibleText method is called on an AccessibleContext.
                • - -
                • -AccessibleValue - the object supports -a numerical value. This interface provides the standard mechanism for an -assistive technology to determine and set the current value of the object, -as well as the minimum and maximum values. Any object that supports a numerical -value should return an object that implements this interface when the getAccessibleValue -method is called on an AccessibleContext.
                • -
                - -

                -Class AccessibleRole

                -This class encapsulates the Accessible object's role in the user interface -and is obtained by calling the getAccessibleRole method on an -AccessibleContext. Accessible roles include -"Check box", "Menu Item", "Panel", etc. These roles are identified by the -constants in this class such as AccessibleRole.CHECK_BOX, AccessibleRole.MENU_ITEM, -and AccessibleRole.PANEL. The constants in this class present -a strongly typed enumeration of common object roles. A public constructor -for this class has been purposely omitted and applications should use one -of the constants from this class. Although this class pre-defines a large -list of standard roles, it is extensible so additional programmer-defined -roles can be added in the future without needing to modify the base class. - -

                -Class AccessibleState

                -This class encapsulates a particular state of the Accessible object. Accessible -states include things like "Armed", "Busy", "Checked", "Focused", etc. -These roles are identified by the constants in this class such as AccessibleState.ARMED, -AccessibleState.BUSY, AccessibleState.CHECKED, and AccessibleState.FOCUSED. -The sum of all the states of an Accessible object is called the AccessibleStateSet, -and can be obtained by calling the getAccessibleStateSet method -on an AccessibleContext. - -

                The constants in this class present a strongly typed enumeration of -common object roles. A public constructor for this class has been purposely -omitted and applications should use one of the constants from this class. -Although this class pre-defines a large list of standard roles, it is extensible -so additional, programmer-defined roles can be added in the future without -needing to modify the base class. - -

                -Class -AccessibleStateSet

                -This class encapsulates a collection of states of the Accessible object -and is obtained by calling the getAccessibleStateSet method on -an AccessibleContext. Since an object -might have multiple states (e.g. it might be both "Checked" and "Focused"), -this class is needed to encapsulate a collection of these states. Methods -in the class provide for retrieving the individual AccessibleStates -on the state set. -

                -Class AccessibleBundle

                -This class is used to maintain a strongly typed enumeration. It is the -super class of both the AccessibleRole and -AccessibleState classes. Programmers normally -do not interact with this class directly, but will instead use the AccessibleRole -and AccessibleState classes. - -

                -Interface -AccessibleAction

                -The AccessibleAction interface should -be supported by any object that can perform one or more actions. This interface -provides the standard mechanism for an assistive technology to determine -what those actions are as well as tell the object to perform those actions. -Any object that can be manipulated should support this interface. - -

                Applications can determine if an object supports the AccessibleAction -interface by first obtaining its AccessibleContext -(see Accessible) and then calling the getAccessibleAction -method of AccessibleContext. If the return -value is not null, the object supports this interface. -

                -Interface -AccessibleComponent

                -The AccessibleComponent interface -should be supported by any object that is rendered on the screen. This -interface provides the standard mechanism for an assistive technology to -determine and set the graphical representation of an object. - -

                Applications can determine if an object supports the AccessibleComponent -interface by first obtaining its AccessibleContext -(see Accessible) and then calling the getAccessibleComponent -method of AccessibleContext. If the return -value is not null, the object supports this interface. -

                -Interface -AccessibleSelection

                -The AccessibleSelection interface -provides the standard mechanism for an assistive technology to determine -what the current selected children are, as well as modify the selection -set. Any object that has children that can be selected should support this -the AccessibleSelection interface. - -

                Applications can determine if an object supports the AccessibleSelection -interface by first obtaining its AccessibleContext -(see Accessible) and then calling the getAccessibleSelection -method of AccessibleContext. If the return -value is not null, the object supports this interface. -

                -Interface AccessibleText

                -Interface AccessibleText is the contract -for making rich, editable text Accessible. Not all text displayed on the -screen is rich and editable (e.g. text contained in buttons, labels, menus, -etc., which users aren't expected to manipulate). However, objects containing -editable text must implement interface AccessibleText if they are to interoperate -with assistive technologies. - -

                This interface provides support for going between pixel coordinates -and the text at a given pixel coordinate, for retrieving the letter, word, -and sentence at, before, or after a given position in the text. This interface -provides support for retrieving the attributes of the character at a given -position in the text (font, font size, style, etc.), as well as getting -the selected text (if any), the length of the text, and the location of -the text caret. - -

                Applications can determine if an object supports the AccessibleText -interface by first obtaining its AccessibleContext -(see Accessible) and then calling the getAccessibleText -method of AccessibleContext. If the return -value is not null, the object supports this interface. -

                -Interface AccessibleHypertext

                -The AccessibleHypertext interface -should be supported by any object that presents hypertext information on -the display. This interface provides the standard mechanism for an assistive -technology to access that text via its content, attributes, and spatial -location. It also provides standard mechanisms for manipulating hyperlinks. -Applications can determine if an object supports the AccessibleHypertext -interface by first obtaining its AccessibleContext -(see Accessible) and then calling the AccessibleContext.getAccessibleText() -method of AccessibleContext. If the return -value is a class which extends AccessibleHypertext, then that object supports -AccessibleHypertext. -

                -Interface -AccessibleHyperlink

                -An object that is a hyperlink should support the AccessibleHyperlink -interface.  An object that implements this interface will be returned -by calling the getLink method on an AccessibleHypertext -object. -

                -Interface -AccessibleValue

                -The AccessibleValue interface should -be supported by any object that supports a numerical value (e.g., a scroll -bar). This interface provides the standard mechanism for an assistive technology -to determine and set the numerical value as well as get the minimum and -maximum values. - -

                Applications can determine if an object supports the AccessibleValue -interface by first obtaining its AccessibleContext -(see Accessible) and then calling the getAccessibleValue -method of AccessibleContext. If the return -value is not null, the object supports this interface. - -@since 1.2 - - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/event/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/event/package-info.java new file mode 100644 index 00000000000..2c2ebcf7f95 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/event/package-info.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * A package of the Java Image I/O API dealing with synchronous notification of + * events during the reading and writing of images. + *

                + * The {@code IIOReadProgressListener} interface allows for notification of the + * percentage of an image that has been read successfully. + *

                + * The {@code IIOReadUpdateListener} interface allows for notification of the + * portions of an image that have been read. This is useful, for example, for + * implementing dynamic display of an image as it is loaded. + *

                + * The {@code IIOReadWarningListener} interface allows for notification of + * non-fatal errors during reading. + *

                + * The {@code IIOWriteWarningListener} and {@code IIOWriteProgressListener} + * interfaces perform analogous functions for writers. + * + * @since 1.4 + */ +package javax.imageio.event; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/event/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/event/package.html deleted file mode 100644 index 000ab8bde0a..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/event/package.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - -A package of the Java Image I/O API dealing with synchronous -notification of events during the reading and writing of images. - -

                - -The IIOReadProgressListener interface allows for -notification of the percentage of an image that has been read -successfully. - -

                - -The IIOReadUpdateListener interface allows for -notification of the portions of an image that have been read. This is -useful, for example, for implementing dynamic display of an image as -it is loaded. - -

                - -The IIOReadWarningListener interface allows for -notification of non-fatal errors during reading. - -

                - -The IIOWriteWarningListener and -IIOWriteProgressListener interfaces perform analogous -functions for writers. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadata.java b/jdk/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadata.java index c9ac7374a00..08f31278c28 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadata.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadata.java @@ -28,7 +28,6 @@ package javax.imageio.metadata; import org.w3c.dom.Node; import java.lang.reflect.Method; -import java.lang.reflect.Module; import java.security.AccessController; import java.security.PrivilegedAction; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/metadata/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/metadata/package-info.java new file mode 100644 index 00000000000..e9d75bcf1a5 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/metadata/package-info.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * A package of the Java Image I/O API dealing with reading and writing + * metadata. + *

                + * When reading an image, its per-stream and per-image metadata is made + * available as an {@code IIOMetadata} object. The internals of this object are + * specific to the plug-in that created it. Its contents may be accessed in the + * form of an XML {@code Document}, which is implemented as a tree of + * {@code IIOMetadataNode} objects. + *

                + * When writing an image, its metadata may be set by defining or modifying an + * {@code IIOMetadata} object. Such an object may be obtained from an + * {@code ImageWriter} or {@code ImageTranscoder} (from the + * {@code javax.imageio} package). Once such an object has been obtained, its + * contents may be set of modified via a {@code Document} consisting of + * {@code IIOMetadataNode}s. The document format may optionally be described + * using an {@code IIOMetadataFormat} object. + *

                + * The format of the metadata contained in the XML {@code Document} is + * identified by a string which appears as the root node of the tree of + * {@code IIOMetadataNode} objects. This string contains a version number, e.g. + * "javax_imageio_jpeg_image_1.0". Readers and writers may support multiple + * versions of the same basic format and the Image I/O API has methods that + * allow specifying which version to use by passing the string to the + * method/constructor used to obtain an {@code IIOMetadata} object. In some + * cases, a more recent version may not be strictly compatible with a program + * written expecting an older version (for an example, see the Native Metadata + * Format section of the JPEG Metadata Usage Notes below). + *

                + * Plug-ins may choose to support a + * standard (plug-in neutral) format + * . This format does not provide lossless encoding of metadata, but allows + * a portion of the metadata to be accessed in a generic manner. + *

                + * Each of the standard plug-ins supports a so-called "native" metadata format, + * which encodes its metadata losslessly: + *

                + * @since 1.4 + */ +package javax.imageio.metadata; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/metadata/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/metadata/package.html deleted file mode 100644 index da369489951..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/metadata/package.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - -A package of the Java Image I/O API dealing with reading and writing -metadata. - -

                - -When reading an image, its per-stream and per-image metadata is made -available as an IIOMetadata object. The internals of -this object are specific to the plug-in that created it. Its contents -may be accessed in the form of an XML Document, which is -implemented as a tree of IIOMetadataNode objects. - -

                - -When writing an image, its metadata may be set by defining or -modifying an IIOMetadata object. Such an object may be -obtained from an ImageWriter or -ImageTranscoder (from the -javax.imageio package). Once such an object has -been obtained, its contents may be set of modified via a -Document consisting of IIOMetadataNodes. -The document format may optionally be described using an -IIOMetadataFormat object. - -

                - -The format of the metadata contained in the XML Document -is identified by a string which appears as the root node of the tree -of IIOMetadataNode objects. This string contains a version -number, e.g. "javax_imageio_jpeg_image_1.0". Readers and writers may -support multiple versions of the same basic format and the Image I/O -API has methods that allow specifying which version to use by passing -the string to the method/constructor used to obtain an IIOMetadata -object. In some cases, a more recent version may not be strictly -compatible with a program written expecting an older version (for -an example, see the Native Metadata Format section of the JPEG Metadata -Usage Notes below). - -

                - -Plug-ins may choose to support a standard (plug-in neutral) -format. This format does not provide lossless encoding of -metadata, but allows a portion of the metadata to be accessed in a -generic manner. - -

                - -Each of the standard plug-ins supports a so-called "native" metadata -format, which encodes its metadata losslessly: - -

                - -@since 1.4 - - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/package-info.java new file mode 100644 index 00000000000..342a6afc146 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/package-info.java @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * The main package of the Java Image I/O API. + *

                + * Many common image I/O operations may be performed using the static methods of + * the {@code ImageIO} class. + *

                + * This package contains the basic classes and interfaces for describing the + * contents of image files, including metadata and thumbnails + * ({@code IIOImage}); for controlling the image reading process + * ({@code ImageReader}, {@code ImageReadParam}, and {@code ImageTypeSpecifier}) + * and image writing process ({@code ImageWriter} and {@code ImageWriteParam}); + * for performing transcoding between formats ({@code ImageTranscoder}), and for + * reporting errors ({@code IIOException}). + *

                + * All implementations of javax.imageio provide the following standard image + * format plug-ins: + *

                + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
                 ReadingWritingNotesMetadata
                + * BMPyesyesnoneBMP + * metadata format
                GIF + * yesyesGIF plug-in notes + * GIF + * metadata format
                JPEGyesyesnone + * JPEG metadata format
                PNGyesyesnonePNG + * metadata format
                + * TIFFyesyes + * TIFF plug-in notes + * TIFF metadata format
                + * WBMPyesyesnone + * WBMP metadata format
                + *
                + *
                + *
                + *
                + * + *

                Standard Plug-in Notes

                + * + *

                Standard plug-in for GIF image format

                + * ImageIO provides {@code ImageReader} and {@code ImageWriter}plug-ins for the + * Graphics + * Interchange Format (GIF) image format. These are the "standard" GIF + * plug-ins, meaning those that are included in the JRE, as distinct from those + * included in standard extensions, or 3rd party plug-ins. The following notes + * and metadata specification apply to the standard plug-ins. + * + *

                Writing GIF images

                + * The GIF image writer plug-in guarantees lossless writing for images which + * meet the following requirements: + *
                  + *
                • the number of bands is 1;
                • + *
                • the number of bits per sample is not greater than 8;
                • + *
                • the size of a color component is not greater than 8;
                • + *
                + *

                + * By default the GIF writer plug-in creates version "89a" images. This can be + * changed to "87a" by explicitly setting the version in the stream metadata + * (see + * + * GIF Stream Metadata Format Specification). + * + * + *

                + * The GIF writer plug-in supports the creation of animated GIF images through + * the standard sequence writing methods defined in the {@code ImageWriter} + * class. + * + * + * + * + *

                + * A global color table is written to the output stream if one of the following + * conditions is met: + *

                  + *
                • stream metadata containing a GlobalColorTable element is supplied; + *
                • + *
                • a sequence is being written and image metadata containing a + * LocalColorTable element is supplied for the first image in the sequence; + *
                • + *
                • image metadata is not supplied or does not contain a LocalColorTable + * element.
                • + *
                + *

                + * In the first case the global color table in the stream metadata is used, in + * the second the local color table in the image metadata is used, and in the + * third a global color table is created from the ColorModel or SampleModel of + * the (first) image. + *

                + * A local color table is written to the output stream only if image metadata + * containing a LocalColorTable element is supplied to the writer, or no image + * metadata is supplied to the writer and the local color table which would be + * generated from the image itself is not equal to the global color table. + *

                + * A Graphic Control Extension block is written to the output stream only if + * image metadata containing a GraphicControlExtension element is supplied to + * the writer, or no image metadata is supplied and the local color table + * generated from the image requires a transparent index. Application, Plain + * Text, and Comment Extension blocks are written only if they are supplied to + * the writer via image metadata. + * + * + *

                + * The writing of interlaced images can be controlled by the progressive mode of + * the provided {@code ImageWriteParam} instance. If progressive mode is + * {@code MODE_DISABLED} then a non-interlaced image will be written. If + * progressive mode is {@code MODE_DEFAULT} then an interlaced image will be + * written. If progressive mode is {@code MODE_COPY_FROM_METADATA}, then the + * metadata setting is used (if it is provided, otherwise an interlaced image + * will be written). + *

                + * The GIF image writer plug-in supports setting output stream metadata from + * metadata supplied to the writer in either the native GIF stream metadata + * format + * + * javax_imageio_gif_stream_1.0 or the standard metadata format + * javax_imageio_1.0, + * and setting output image metadata from metadata supplied to the writer in + * either the native GIF image metadata format + * + * javax_imageio_gif_image_1.0 or the standard metadata format + * javax_imageio_1.0. + * The mapping of standard metadata format to the GIF native stream and image + * metadata formats is given in the tables + * here. + * + * @since 1.4 + */ +package javax.imageio; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/package.html deleted file mode 100644 index 63d6dcfeb26..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/package.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - - -The main package of the Java Image I/O API. - -

                - -Many common image I/O operations may be performed using the static -methods of the ImageIO class. - -

                - -This package contains the basic classes and interfaces for describing -the contents of image files, including metadata and thumbnails -(IIOImage); for controlling the image reading process -(ImageReader, ImageReadParam, and -ImageTypeSpecifier) and image writing process -(ImageWriter and ImageWriteParam); for -performing transcoding between formats (ImageTranscoder), -and for reporting errors (IIOException). - -

                -All implementations of javax.imageio provide the following standard -image format plug-ins: -

                -
                - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  Reading WritingNotes Metadata
                BMPyesyesnone - BMP metadata format
                GIFyesyes - GIF plug-in notes - GIF metadata format
                JPEGyesyesnone - JPEG metadata format
                PNGyesyesnone - PNG metadata format
                TIFFyesyes - TIFF plug-in notes - TIFF metadata format
                WBMPyesyesnone - WBMP metadata format
                -
                -
                -
                -
                - -

                Standard Plug-in Notes

                -

                Standard plug-in for GIF image format

                - - -

                -ImageIO provides ImageReader and ImageWriter -plug-ins for the -Graphics Interchange Format (GIF) image format. - -These are the "standard" GIF plug-ins, meaning those that are included in the -JRE, as distinct from those included in standard extensions, or 3rd party -plug-ins. The following notes and metadata specification apply to the -standard plug-ins. - -

                Writing GIF images

                - The GIF image writer plug-in guarantees lossless writing for images which meet - the following requirements: -
                  -
                • the number of bands is 1; -
                • the number of bits per sample is not greater than 8; -
                • the size of a color component is not greater than 8; -
                - -

                - By default the GIF writer plug-in creates version "89a" images. This can be - changed to "87a" by explicitly setting the version in the - stream metadata (see - GIF Stream Metadata Format Specification). -

                - - - -

                - The GIF writer plug-in supports the creation of animated GIF images through - the standard sequence writing methods defined in the - ImageWriter class. - - -

                - - -

                - A global color table is written to the output stream if one of the - following conditions is met: -

                  -
                • stream metadata containing a GlobalColorTable element is - supplied;
                • -
                • a sequence is being written and image metadata containing a - LocalColorTable element is supplied for the first image in the - sequence;
                • -
                • image metadata is not supplied or does not contain a LocalColorTable - element.
                • -
                - -

                - In the first case the global color table in the stream metadata is - used, in the second the local color table in the image metadata is - used, and in the third a global color table is created from the - ColorModel or SampleModel of the (first) image. -

                - -

                - A local color table is written to the output stream only if image - metadata containing a LocalColorTable element is supplied to the - writer, or no image metadata is supplied to the writer and the local - color table which would be generated from the image itself is not - equal to the global color table. -

                - -

                - A Graphic Control Extension block is written to the output stream only - if image metadata containing a GraphicControlExtension element is - supplied to the writer, or no image metadata is supplied and the - local color table generated from the image requires a transparent - index. Application, Plain Text, and Comment Extension blocks are - written only if they are supplied to the writer via image metadata. - -

                - - -

                - - The writing of interlaced images can be controlled by the progressive - mode of the provided ImageWriteParam instance. - If progressive mode is - MODE_DISABLED then a non-interlaced image will be written. If - progressive mode is MODE_DEFAULT then an interlaced image will - be written. If progressive mode is MODE_COPY_FROM_METADATA, then - the metadata setting is used (if it is provided, otherwise an interlaced - image will be written). -

                - -

                - The GIF image writer plug-in supports setting output stream metadata from - metadata supplied to the writer in either the native GIF stream - metadata format - javax_imageio_gif_stream_1.0 or the standard metadata format - - javax_imageio_1.0, and setting - output image metadata from metadata supplied to the writer in either - the native GIF image metadata format - javax_imageio_gif_image_1.0 or the standard metadata format - javax_imageio_1.0. - - The mapping of standard metadata format to the GIF native stream and - image metadata formats is given in the tables here . -

                - - - - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package-info.java new file mode 100644 index 00000000000..d423a14321d --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Package containing the public classes used by the built-in BMP plug-in. + * + * @since 1.5 + */ +package javax.imageio.plugins.bmp; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package.html deleted file mode 100644 index 36467da7f5f..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - -Package containing the public classes used by the built-in BMP plug-in. - -@since 1.5 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package-info.java new file mode 100644 index 00000000000..cd437729871 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package-info.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Classes supporting the built-in JPEG plug-in. + *

                + * This package contains some support classes for the built-in JPEG reader and + * writer plug-ins. Classes are provided for representing quantization and + * Huffman tables, and extensions of {@code ImageReadParam} and + * {@code ImageWriteParam} are provided to supply tables during the reading and + * writing process. For more information about the operation of the built-in + * JPEG plug-ins, see the + * JPEG metadata format + * specification and usage notes. + * + * @since 1.4 + */ +package javax.imageio.plugins.jpeg; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package.html deleted file mode 100644 index 60d4e8eeaf4..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - -Classes supporting the built-in JPEG plug-in. - -

                - -This package contains some support classes for the built-in JPEG -reader and writer plug-ins. Classes are provided for representing -quantization and Huffman tables, and extensions of -ImageReadParam and ImageWriteParam are -provided to supply tables during the reading and writing process. For -more information about the operation of the built-in JPEG plug-ins, -see the JPEG -metadata format specification and usage notes. - -
                -
                -
                - - - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFDirectory.java b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFDirectory.java index 7678762203f..8b522da3ed6 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFDirectory.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFDirectory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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,8 +63,8 @@ import com.sun.imageio.plugins.tiff.TIFFImageMetadata; *

                A {@code TIFFDirectory} is aware of the tag numbers in the * group of {@link TIFFTagSet}s associated with it. When * a {@code TIFFDirectory} is created from a native image metadata - * object, these tag sets are derived from the tagSets attribute - * of the TIFFIFD node.

                + * object, these tag sets are derived from the {@code tagSets} attribute + * of the {@code TIFFIFD} node.

                * *

                A {@code TIFFDirectory} might also have a parent {@link TIFFTag}. * This will occur if the directory represents an IFD other than the root @@ -73,8 +73,8 @@ import com.sun.imageio.plugins.tiff.TIFFImageMetadata; * {@link TIFFTag#isIFDPointer} method of this parent {@code TIFFTag} * must return {@code true}. When a {@code TIFFDirectory} is * created from a native image metadata object, the parent tag set is set - * from the parentTagName attribute of the corresponding - * TIFFIFD node. Note that a {@code TIFFDirectory} instance + * from the {@code parentTagName} attribute of the corresponding + * {@code TIFFIFD} node. Note that a {@code TIFFDirectory} instance * which has a non-{@code null} parent tag will be contained in the * data field of a {@code TIFFField} instance which has a tag field * equal to the contained directory's parent tag.

                @@ -133,8 +133,8 @@ public class TIFFDirectory implements Cloneable { * an image metadata object. The supplied object must support an image * metadata format supported by the TIFF {@link javax.imageio.ImageWriter} * plug-in. This will usually be either the TIFF native image metadata - * format javax_imageio_tiff_image_1.0 or the Java - * Image I/O standard metadata format javax_imageio_1.0. + * format {@code javax_imageio_tiff_image_1.0} or the Java + * Image I/O standard metadata format {@code javax_imageio_1.0}. * * @param tiffImageMetadata A metadata object which supports a compatible * image metadata format. diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java index 7d4152c3db4..abc041abca0 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java @@ -62,7 +62,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * BYTE + * {@code BYTE} * * {@link TIFFTag#TIFF_BYTE} @@ -77,7 +77,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * ASCII + * {@code ASCII} * * {@link TIFFTag#TIFF_ASCII} @@ -92,7 +92,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * SHORT + * {@code SHORT} * * {@link TIFFTag#TIFF_SHORT} @@ -107,7 +107,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * LONG + * {@code LONG} * * {@link TIFFTag#TIFF_LONG} @@ -122,7 +122,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * RATIONAL + * {@code RATIONAL} * * {@link TIFFTag#TIFF_RATIONAL} @@ -137,7 +137,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * SBYTE + * {@code SBYTE} * * {@link TIFFTag#TIFF_SBYTE} @@ -152,7 +152,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * UNDEFINED + * {@code UNDEFINED} * * {@link TIFFTag#TIFF_UNDEFINED} @@ -167,7 +167,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * SSHORT + * {@code SSHORT} * * {@link TIFFTag#TIFF_SSHORT} @@ -182,7 +182,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * SLONG + * {@code SLONG} * * {@link TIFFTag#TIFF_SLONG} @@ -197,7 +197,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * SRATIONAL + * {@code SRATIONAL} * * {@link TIFFTag#TIFF_SRATIONAL} @@ -212,7 +212,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * FLOAT + * {@code FLOAT} * * {@link TIFFTag#TIFF_FLOAT} @@ -227,7 +227,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * DOUBLE + * {@code DOUBLE} * * {@link TIFFTag#TIFF_DOUBLE} @@ -242,7 +242,7 @@ import com.sun.imageio.plugins.tiff.TIFFIFD; * *
            - * IFD + * {@code IFD} * * {@link TIFFTag#TIFF_IFD_POINTER} @@ -941,14 +941,14 @@ public final class TIFFField implements Cloneable { /** * Returns the {@code TIFFField} as a node named either - * "TIFFField" or "TIFFIFD" as described in the + * {@code "TIFFField"} or {@code "TIFFIFD"} as described in the * TIFF native image metadata specification. The node will be named - * "TIFFIFD" if and only if {@link #hasDirectory()} returns + * {@code "TIFFIFD"} if and only if {@link #hasDirectory()} returns * {@code true} and the field's type is either {@link TIFFTag#TIFF_LONG} * or {@link TIFFTag#TIFF_IFD_POINTER}. * - * @return a {@code Node} named "TIFFField" or - * "TIFFIFD". + * @return a {@code Node} named {@code "TIFFField"} or + * {@code "TIFFIFD"}. */ public Node getAsNativeNode() { return new TIFFFieldNode(this); diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package-info.java new file mode 100644 index 00000000000..80defcc7a12 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package-info.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Public classes used by the built-in TIFF plug-ins. + *

            + * This package contains classes supporting the built-in TIFF reader and writer + * plug-ins. Classes are provided for simplifying interaction with metadata, + * including Exif metadata common in digital photography, and an extension of + * {@link javax.imageio.ImageReadParam} which permits specifying which metadata + * tags are allowed to be read. For more information about the operation of the + * built-in TIFF plug-ins, see the + * TIFF metadata format + * specification and usage notes. + * + * @since 9 + */ +package javax.imageio.plugins.tiff; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package.html deleted file mode 100644 index 7c70425fd08..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -Public classes used by the built-in TIFF plug-ins. - -

            -This package contains classes supporting the built-in TIFF reader and writer -plug-ins. Classes are provided for simplifying interaction with metadata, -including Exif metadata common in digital photography, and an extension of -{@link javax.imageio.ImageReadParam} which permits specifying which metadata -tags are allowed to be read. For more information about the operation of the -built-in TIFF plug-ins, see the -TIFF metadata format -specification and usage notes. - -
            -
            -
            - -@since 9 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/spi/IIORegistry.java b/jdk/src/java.desktop/share/classes/javax/imageio/spi/IIORegistry.java index d2e16246d5b..f4a3157b32d 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/spi/IIORegistry.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/spi/IIORegistry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -104,10 +104,8 @@ import java.util.ServiceConfigurationError; * sees fit. * *

            For more details on declaring service providers, and the JAR - * format in general, see the - * JAR File Specification. - * + * format in general, see the + * JAR File Specification. */ public final class IIORegistry extends ServiceRegistry { diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java b/jdk/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java index e5961b90e4a..dc2f2322100 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java @@ -28,7 +28,6 @@ package javax.imageio.spi; import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.Method; -import java.lang.reflect.Module; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Arrays; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java b/jdk/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java index 465f155374e..0d87431fbbf 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -104,9 +104,8 @@ import java.util.ServiceLoader; * sees fit, so long as it has the appropriate runtime permission. * *

            For more details on declaring service providers, and the JAR - * format in general, see the - * JAR File Specification. + * format in general, see the + * JAR File Specification. * * @see RegisterableService * @see java.util.ServiceLoader @@ -706,7 +705,17 @@ public class ServiceRegistry { * * @exception Throwable if an error occurs during superclass * finalization. + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") public void finalize() throws Throwable { deregisterAll(); super.finalize(); @@ -846,6 +855,7 @@ class SubRegistry { poset.clear(); } + @SuppressWarnings("deprecation") public synchronized void finalize() { clear(); } diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/spi/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/spi/package-info.java new file mode 100644 index 00000000000..bdaf57c698f --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/spi/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * A package of the Java Image I/O API containing the plug-in interfaces for + * readers, writers, transcoders, and streams, and a runtime registry. + *

            + * The {@code javax.imageio.spi} package contains service provider interfaces + * for reading, writing, and transcoding images, and obtaining image input and + * output streams, as well as a run-time registry that discovers installed + * instances of Image I/O service providers and allows new instances to be + * registered dynamically. + * + * @since 1.4 + */ +package javax.imageio.spi; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/spi/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/spi/package.html deleted file mode 100644 index 404e0a66289..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/spi/package.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - -A package of the Java Image I/O API containing the plug-in interfaces -for readers, writers, transcoders, and streams, and a runtime -registry. - -

            - - -The javax.imageio.spi package contains service -provider interfaces for reading, writing, and transcoding images, and -obtaining image input and output streams, as well as a run-time registry -that discovers installed instances of Image I/O service providers and allows new -instances to be registered dynamically. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageInputStream.java b/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageInputStream.java index f354f7a113a..e5974900161 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageInputStream.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -260,7 +260,17 @@ public class FileCacheImageInputStream extends ImageInputStreamImpl { /** * {@inheritDoc} + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") protected void finalize() throws Throwable { // Empty finalizer: for performance reasons we instead use the // Disposer mechanism for ensuring that the underlying diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileImageInputStream.java b/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileImageInputStream.java index b7129085317..7ecc28767a0 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileImageInputStream.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileImageInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -155,7 +155,17 @@ public class FileImageInputStream extends ImageInputStreamImpl { /** * {@inheritDoc} + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") protected void finalize() throws Throwable { // Empty finalizer: for performance reasons we instead use the // Disposer mechanism for ensuring that the underlying diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileImageOutputStream.java b/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileImageOutputStream.java index c76d09f4b71..e75c40396d8 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileImageOutputStream.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/stream/FileImageOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -163,7 +163,17 @@ public class FileImageOutputStream extends ImageOutputStreamImpl { /** * {@inheritDoc} + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") protected void finalize() throws Throwable { // Empty finalizer: for performance reasons we instead use the // Disposer mechanism for ensuring that the underlying diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStreamImpl.java b/jdk/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStreamImpl.java index 3d17e278e99..c7cdc47cdaf 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStreamImpl.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStreamImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -867,7 +867,17 @@ public abstract class ImageInputStreamImpl implements ImageInputStream { * * @exception Throwable if an error occurs during superclass * finalization. + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") protected void finalize() throws Throwable { if (!isClosed) { try { diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageInputStream.java b/jdk/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageInputStream.java index 87774c1d94f..4fcb0f40b81 100644 --- a/jdk/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageInputStream.java +++ b/jdk/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -178,7 +178,17 @@ public class MemoryCacheImageInputStream extends ImageInputStreamImpl { /** * {@inheritDoc} + * + * @deprecated The {@code finalize} method has been deprecated. + * Subclasses that override {@code finalize} in order to perform cleanup + * should be modified to use alternative cleanup mechanisms and + * to remove the overriding {@code finalize} method. + * When overriding the {@code finalize} method, its implementation must explicitly + * ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}. + * See the specification for {@link Object#finalize()} for further + * information about migration options. */ + @Deprecated(since="9") protected void finalize() throws Throwable { // Empty finalizer: for performance reasons we instead use the // Disposer mechanism for ensuring that the underlying diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/stream/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/stream/package-info.java new file mode 100644 index 00000000000..b28caf0ef0d --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/stream/package-info.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * A package of the Java Image I/O API dealing with low-level I/O from files and + * streams. + *

            + * The {@code ImageInputStream} interface unifies streaming and file-based + * operations. An abstract base class, {@code ImageInputStreamImpl} is provided + * to simplify writing a new {@code ImageInputStream} class. Concrete + * implementation classes ({@code FileImageInputStream}, + * {@code FileCacheImageInputStream}, and {@code MemoryCacheImageInputStream}) + * are provided that allow input to come from a {@code File} or + * {@code InputStream} with or without the use of a temporary cache file. + *

            + * The {@code ImageOutputStream} interface performs an analogous function for + * output. An abstract base class, {@code ImageOutputStreamImpl} is provided, + * along with concrete implementation classes ({@code FileImageOutputStream}, + * {@code FileCacheImageOutputStream}, and {@code MemoryCacheImageOutputStream}) + * are provided that allow output to go to a {@code File} or + * {@code OutputStream} with or without the use of a temporary cache file. + *

            + * The {@code IIOByteBuffer} class provides an alternative way to perform reads + * of sequences of bytes that reduces the amount of internal data copying. + * + * @since 1.4 + */ +package javax.imageio.stream; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/stream/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/stream/package.html deleted file mode 100644 index 41f84b8fb61..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/stream/package.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - -A package of the Java Image I/O API dealing with low-level I/O from -files and streams. - -

            - -The ImageInputStream interface unifies streaming and -file-based operations. An abstract base class, -ImageInputStreamImpl is provided to simplify writing -a new ImageInputStream class. Concrete implementation -classes (FileImageInputStream, -FileCacheImageInputStream, and -MemoryCacheImageInputStream) are provided that allow -input to come from a File or InputStream -with or without the use of a temporary cache file. - -

            - -The ImageOutputStream interface performs an analogous -function for output. An abstract base class, -ImageOutputStreamImpl is provided, along with -concrete implementation classes (FileImageOutputStream, -FileCacheImageOutputStream, and -MemoryCacheImageOutputStream) are provided that allow -output to go to a File or OutputStream with -or without the use of a temporary cache file. - -

            - -The IIOByteBuffer class provides an alternative way to -perform reads of sequences of bytes that reduces the amount of -internal data copying. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/print/DocFlavor.java b/jdk/src/java.desktop/share/classes/javax/print/DocFlavor.java index 27f3bb3a32f..e97a48f6b18 100644 --- a/jdk/src/java.desktop/share/classes/javax/print/DocFlavor.java +++ b/jdk/src/java.desktop/share/classes/javax/print/DocFlavor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -194,10 +194,14 @@ import java.io.Serializable; * constructor can be used to create an arbitrary doc flavor. *

              *
            • Preformatted text - * + *
              + * + * * * * + * + * * * * @@ -214,6 +218,7 @@ import java.io.Serializable; * * * + * *
              MIME-Types and their descriptions
              MIME-TypeDescription
              {@code "text/plain"}Plain text in the default character set (US-ASCII)"text/html; charset=xxx"HyperText Markup Language in character set xxx
              *

              * In general, preformatted text print data is provided either in a character @@ -222,11 +227,15 @@ import java.io.Serializable; * *

            • Preformatted page description language (PDL) documents * - * + *
              + * + * * * * - * + * + * + * * * * @@ -238,6 +247,7 @@ import java.io.Serializable; * * * + * *
              MIME-Types and their descriptions
              MIME-TypeDescription
              {@code "application/pdf"}Portable Document Format document
              {@code "application/vnd.hp-PCL"}Printer Control Language document
              *

              * In general, preformatted PDL print data is provided in a byte oriented @@ -245,11 +255,14 @@ import java.io.Serializable; * *

            • Preformatted images * - * + *
              + * + * * * * - * + * + * * * * @@ -262,6 +275,7 @@ import java.io.Serializable; * * * + * *
              MIME-Types and their descriptions
              MIME-TypeDescription
              {@code "image/gif"}Graphics Interchange Format image{@code "image/png"}Portable Network Graphics image
              *

              * In general, preformatted image print data is provided in a byte oriented @@ -269,14 +283,19 @@ import java.io.Serializable; * *

            • Preformatted autosense print data * - * + *
              + * + * * * * - * + * + * * * * + * + * *
              MIME-Types and their descriptions
              MIME-TypeDescription
              {@code "application/octet-stream"}The print data format is unspecified (just an octet stream)
              *

              * The printer decides how to interpret the print data; the way this diff --git a/jdk/src/java.desktop/share/classes/javax/print/MimeType.java b/jdk/src/java.desktop/share/classes/javax/print/MimeType.java index c9d1f614af0..e96859e9c4c 100644 --- a/jdk/src/java.desktop/share/classes/javax/print/MimeType.java +++ b/jdk/src/java.desktop/share/classes/javax/print/MimeType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -50,7 +50,6 @@ import java.util.Vector; *

            • * Since not all Java profiles include the AWT, the Jini Print Service should * not depend on an AWT class. - *

              *

            • * The implementation of class java.awt.datatransfer.MimeType does not * guarantee @@ -76,7 +75,6 @@ import java.util.Vector; *
            • Quoting backslash characters inside parameter values are removed. *
            • The parameters are arranged in ascending order of parameter name. *
            - *

            * * @author Alan Kaminsky */ diff --git a/jdk/src/java.desktop/share/classes/javax/print/StreamPrintServiceFactory.java b/jdk/src/java.desktop/share/classes/javax/print/StreamPrintServiceFactory.java index a7da64e61f3..cd1523a94b2 100644 --- a/jdk/src/java.desktop/share/classes/javax/print/StreamPrintServiceFactory.java +++ b/jdk/src/java.desktop/share/classes/javax/print/StreamPrintServiceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -44,9 +44,7 @@ import java.util.ServiceConfigurationError; * A typical output document format may be Postscript(TM). *

            * This class is implemented by a service and located by the - * implementation using the - * - * SPI JAR File specification. + * implementation using the {@link java.util.ServiceLoader} facility. *

            * Applications locate instances of this class by calling the * {@link #lookupStreamPrintServiceFactories(DocFlavor, String)} method. diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/package-info.java b/jdk/src/java.desktop/share/classes/javax/print/attribute/package-info.java new file mode 100644 index 00000000000..f9c571f56c0 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/package-info.java @@ -0,0 +1,376 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces that describe the types of Java™ Print + * Service attributes and how they can be collected into attribute sets. + * + *

            What is an Attribute?

            + * When setting up a print job, a client specifies two things: print data + * and processing instructions. The print data is the actual content to + * be printed. The processing instructions tell the printer how to print the + * print data, such as: what media to use, how many copies to print, and whether + * to print on one or both sides of a sheet. The client specifies these + * processing instructions with the attribute definitions of the Java Print + * Service API. + *

            + * The print data and the processing instructions are separate entities. This + * means that: + *

              + *
            • You can print the same print data at different times using different + * processing instructions.
              For example, you can print a slide + * presentation on US letter-sized white paper, double-sided, stapled, 20 + * copies to make handouts for a talk; and you could print the same slide + * presentation on US letter-sized transparencies, single-sided, one copy to + * make the actual slides for the talk.
            • + *
            • You can use the same processing instructions at different times to + * print different data. For example, you could set your default processing + * instructions to: US letter-sized paper, double sided, stapled. Whenever + * you print a job, it prints with these settings, unless you explicitly + * override them.
            • + *
            + *

            + * The processing instruction does not specify how the print job processes the + * request; each processing instruction is only a description of the results of + * a print job. The print job determines the manner in which it achieves the + * results specified by the processing instructions. Representing processing + * instructions as descriptive items provides more flexibility for implementing + * print jobs. + * + *

            Attribute Categories and Values

            + * Each printer has a set of capabilities, such as the ability to print on + * different paper sizes or the ability to print more than one copy. Each of the + * capabilities has a range of values. For example, a printer's orientation + * capability might have this range of values: [landscape, portrait]. For each + * print request, the capability is set to one of these values. The Java Print + * Service API uses the term attribute category to refer to a printer + * capability and the term attribute value to refer to the value of the + * capability. + *

            + * In the Java Print Service API, an attribute category is represented by a Java + * class implementing the Attribute interface. + * Attribute values are instances of such a class or one of its subclasses. For + * example, to specify the number of copies, an application constructs an + * instance of the Copies class with the + * number of desired copies and uses the {@code Copies} instance as part of the + * print request. In this case, the {@code Copies} class represents the + * attribute category, and the {@code Copies} instance represents the attribute + * value. + * + *

            Attribute Roles

            + * When submitting a print job to a printer, the client provides the attributes + * describing the characteristics of the print data, such as the document name, + * and how the print data should be printed, such as double-sided, five copies. + * If a print job consists of multiple pieces of print data, different pieces + * might have different processing instructions, such as 8 x 11 inch media for + * the first document, and 11 x 17 inch media for another document. + *

            + * Once the printer starts processing the print job, additional information + * about the job becomes available, which might include: the job state (such as + * completed or queued) and the number of pages printed so far. + * These pieces of information are also attributes. Attributes can also describe + * the printer itself, such as: the printer name, the printer location, and the + * number of jobs queued. + *

            + * The Java Print Service API defines these different kinds of attributes with + * five subinterfaces of {@code Attribute}: + *

              + *
            • DocAttribute specifies a + * characteristic of an individual document and the print job settings to be + * applied to an individual document.
            • + *
            • PrintRequestAttribute + * specifies a setting applied to a whole print job and to all the documents + * in the print job.
            • + *
            • PrintJobAttribute reports the + * status of a print job.
            • + *
            • PrintServiceAttribute + * reports the status of a print service.
            • + *
            • SupportedValuesAttribute + * gives the supported values for another attribute.
            • + *
            + * Each attribute class implements one or more of these tagging subinterfaces to + * indicate where the attribute can be used in the API. If an attribute class + * implements multiple tagging subinterfaces, the attribute can be used in + * multiple contexts. For example, the media attribute can apply to one document + * in a print job as a {@code DocAttribute} or to an entire print job as a + * {@code PrintRequestAttribute}. Certain low-level attributes are never used on + * their own but are always aggregated into higher-level attributes. These + * low-level attribute classes only implement interface + * Attribute, not any of the tagging subinterfaces. + *

            + * The Java Print Service API defines a group of standard attribute classes + * modeled upon the attributes in the Internet Printing Protocol (IPP) version + * 1.1. The standard attribute classes are in the subpackage + * javax.print.attribute.standard to keep the actual attribute classes + * conceptually separate from the generic apparatus defined in package + * javax.print.attribute. + * + *

            Attribute Sets

            + * A client usually needs to provide more than one processing instruction when + * submitting a print job. For example, the client might need to specify a + * media size of A4 and a landscape orientation. To send more than one + * processing instruction, the client collects the attributes into an attribute + * set, which the Java Print Service API represents with the + * AttributeSet interface. + *

            + * The {@code AttributeSet} interface is similar to the + * Map interface: it provides a map of + * key to values, in which each key is unique and can contain no more than one + * value. However, the {@code AttributeSet} interface is designed to + * specifically support the needs of the Java Print Service API. An {@code + * AttributeSet} requires that: + *

              + *
            1. Each key in an {@code AttributeSet} corresponds to a category, and + * the value of the key can only be one of the attribute values that belong + * to the category represented by the key. Thus, unlike a {@code Map}, an + * {@code AttributeSet} restricts the possible values of a key: an attribute + * category cannot be set to an attribute value that does not belong to that + * category.
            2. + *
            3. No two attributes from the same category can exist in the same set. + * For example, an attribute collection must not contain both a "one-sided" + * attribute and a "two-sided" attribute because these two attributes give + * the printer conflicting instructions.
            4. + *
            5. Only attributes implementing the {@code Attribute} interface can be + * added to the set.
            6. + *
            + *

            + * The javax.print.attribute package includes + * HashAttributeSet as a concrete + * implementation of the attribute set interface. {@code HashAttributeSet} + * provides an attribute set based on a hash map. You can use this + * implementation or provide your own implementation of interface + * {@code AttributeSet}. + *

            + * The Java Print Service API provides four specializations of an attribute set + * that are restricted to contain just one of the four kinds of attributes, as + * discussed in the Attribute Roles section: + *

            + * Notice that only four kinds of attribute sets are listed here, but there are + * five kinds of attributes. Interface + * SupportedValuesAttribute + * denotes an attribute that gives the supported values for another attribute. + * Supported-values attributes are never aggregated into attribute sets, so + * there is no attribute set subinterface defined for them. + *

            + * In some contexts, an attribute set is read-only, which means that the client + * is only allowed to examine an attribute set's contents but not change them. + * In other contexts, the attribute set is read-write, which means that the + * client is allowed both to examine and to change an attribute set's contents. + * For a read-only attribute set, calling a mutating operation throws an + * {@code UnmodifiableSetException}. + *

            + * Package javax.print.attribute includes one concrete implementation of each of + * the attribute set subinterfaces: + *

            + * All of these classes extend + * HashAttributeSet and enforce the + * restriction that the attribute set is only allowed to contain the + * corresponding kind of attribute. + * + *

            Attribute Class Design

            + * An attribute value is a small, atomic data item, such as an integer or an + * enumerated value. The Java Print Service API does not use primitive data + * types, such as int, to represent attribute values for these reasons: + *
              + *
            • Primitive data types are not type-safe. For example, a compiler + * should not allow a "copies" attribute value to be used for a "sides" + * attribute.
            • + *
            • Some attributes must be represented as a record of several values. + * One example is printer resolution, which requires two numbers, such as + * 600 and 300 representing 600 x 300 dpi.
            • + *
            + * For type-safety and to represent all attributes uniformly, the Java Print + * Service API defines each attribute category as a class, such as class + * {@code Copies}, class Sides, and class + * PrinterResolution. Each + * attribute class wraps one or more primitive data items containing the + * attribute's value. Attribute set operations perform frequent comparisons + * between attribute category objects when adding attributes, finding existing + * attributes in the same category, and looking up an attribute given its + * category. Because an attribute category is represented by a class, fast + * attribute-value comparisons can be performed with the {@code Class.equals} + * method. + *

            + * Even though the Java Print Service API includes a large number of different + * attribute categories, there are only a few different types of attribute + * values. Most attributes can be represented by a small number of data types, + * such as: integer values, integer ranges, text, or an enumeration of integer + * values. The type of the attribute value that a category accepts is called the + * attribute's abstract syntax. To provide consistency and reduce code + * duplication, the Java Print Service API defines abstract syntax classes to + * represent each abstract syntax, and these classes are used as the parent of + * standard attributes whenever possible. The abstract syntax classes are: + *

              + *
            • EnumSyntax provides a type-safe + * enumeration in which enumerated values are represented as singleton + * objects. Each enumeration singleton is an instance of the enumeration + * class that wraps a hidden int value.
            • + *
            • IntegerSyntax is the abstract syntax + * for integer-valued attributes.
            • + *
            • TextSyntax is the abstract syntax for + * text-valued attributes, and includes a locale giving the text string's + * natural language.
            • + *
            • SetOfIntegerSyntax is the + * abstract syntax for attributes representing a range or set of integers + *
            • ResolutionSyntax is the abstract + * syntax for attributes representing resolution values, such as 600x300 + * dpi.
            • + *
            • Size2DSyntax is the abstract syntax + * for attributes representing a two-dimensional size, such as a paper size + * of 8.5 x 11 inches.
            • + *
            • DateTimeSyntax is the abstract + * syntax for attributes whose value is a date and time.
            • + *
            • URISyntax is the abstract syntax for + * attributes whose value is a Uniform Resource Indicator.
            • + *
            + * The abstract syntax classes are independent of the attributes that use them. + * In fact, applications that have nothing to do with printing can use the + * abstract syntax classes. Although most of the standard attribute classes + * extend one of the abstract syntax classes, no attribute class is required to + * extend one of these classes. The abstract syntax classes merely provide a + * convenient implementation that can be shared by many attribute classes. + *

            + * Each attribute class implements the {@code Attribute} interface, either + * directly or indirectly, to mark it as a printing attribute. An attribute + * class that can appear in restricted attribute sets in certain contexts also + * implements one or more subinterfaces of {@code Attribute}. Most attribute + * classes also extend the appropriate abstract syntax class to get the + * implementation. Consider the {@code Sides} attribute class: + *

            + *
            {@code
            + * public class Sides
            + *     extends EnumSyntax
            + *     implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
            + * {
            + *     public final Object getCategory()
            + *     {
            + *         return Sides.class;
            + *     }
            + * ...
            + * }}
            + * 
            + *
            + *

            + * Since every attribute class implements {@code Attribute}, every attribute + * class must provide an implementation for the + * {@link javax.print.attribute.Attribute#getCategory() getCategory} method, + * which returns the attribute category. In the case of {@code Sides}, the + * {@code getCategory} method returns {@code Sides.class}. The + * {@code getCategory} method is final to ensure that any vendor-defined + * subclasses of a standard attribute class appear in the same category. Every + * attribute object is immutable once constructed so that attribute object + * references can be passed around freely. To get a different attribute value, + * construct a different attribute object. + * + *

            Attribute Vendors

            + * The Java Print Service API is designed so that vendors can: + *
              + *
            • define new vendor-specific values for any standard attribute defined + * in javax.print.attribute.standard + * .
            • + *
            • define new attribute categories representing the vendor printer's + * proprietary capabilities not already supported by the standard + * attributes.
            • + *
            + * To define a new value for an attribute, a client can construct instances of + * such attributes with arbitrary values at runtime. However, an enumerated + * attribute using an abstract syntax class of {@code EnumSyntax} specifies all + * the possible attribute values at compile time as singleton instances of the + * attribute class. This means that new enumerated values cannot be constructed + * at run time. To define new vendor-specific values for a standard enumerated + * attribute, the vendor must define a new attribute class specifying the new + * singleton instances. To ensure that the new attribute values fall in the same + * category as the standard attribute values, the new attribute class must be a + * subclass of the standard attribute class. + *

            + * To define a new attribute category, a vendor defines a new attribute class. + * This attribute class, like the standard attribute classes, implements + * {@code Attribute} or one of its subinterfaces and extends an abstract syntax + * class. The vendor can either use an existing abstract syntax class or define + * a new one. The new vendor-defined attribute can be used wherever an + * {@code Attribute} is used, such as in an {@code AttributeSet}. + * + *

            Using Attributes

            + * A typical printing application uses the {@code PrintRequestAttributeSet} + * because print-request attributes are the types of attributes that client + * usually specifies. This example demonstrates creating an attribute set of + * print-request attributes and locating a printer that can print the document + * according to the specified attributes: + *
            + *
            {@code
            + * FileInputStream psStream;
            + * try {
            + *     psstream = new FileInputStream("file.ps");
            + * } catch (FileNotFoundException ffne) {
            + * }
            + * if (psstream == null) {
            + *     return;
            + * }
            + * //Set the document type. See the DocFlavor documentation for
            + * //more information.
            + * DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
            + * Doc myDoc = new SimpleDoc(pstream, psInFormat, null);
            + * PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
            + * aset.add(new Copies(5));
            + * aset.add(MediaSize.A4);
            + * aset.add(Sides.DUPLEX);
            + * PrintService[] services =
            + *     PrintServiceLookup.lookupPrintServices(psInFormat, aset);
            + * if (services.length > 0) {
            + *     DocPrintJob job = services[0].createPrintJob();
            + *     try {
            + *         job.print(myDoc, aset);
            + *     } catch (PrintException pe) {}
            + * }
            + * }
            + *
            + *

            + * Please note: In the javax.print APIs, a null reference parameter to methods + * is incorrect unless explicitly documented on the method as having a + * meaningful interpretation. Usage to the contrary is incorrect coding and may + * result in a run time exception either immediately or at some later time. + * IllegalArgumentException and NullPointerException are examples of typical and + * acceptable run time exceptions for such cases. + * + * @since 1.4 + */ +package javax.print.attribute; diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/package.html b/jdk/src/java.desktop/share/classes/javax/print/attribute/package.html deleted file mode 100644 index aeedb0df2c2..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/print/attribute/package.html +++ /dev/null @@ -1,404 +0,0 @@ - - - -javax.print.attribute package - - - -Provides classes and interfaces -that describe the types of JavaTM Print -Service attributes and how they can be collected into attribute sets. -

            What is an Attribute?

            -When setting up a print job, -a client specifies two things: -print data and processing instructions. -The print data is the actual content to be printed. -The processing instructions tell the printer how to print the print data, -such as: what media to use, how many copies to print, and -whether to print on one or both sides of a sheet. The client specifies -these processing instructions with the attribute definitions of the Java -Print Service API. -

            -The print data and the processing instructions -are separate entities. This means that: -

              -
            • You can print the same print data -at different times using different processing instructions. -
              -For example, you can print a slide presentation -on US letter-sized white paper, -double-sided, stapled, 20 copies -to make handouts for a talk; -and you could print the same slide presentation -on US letter-sized transparencies, -single-sided, one copy -to make the actual slides for the talk. -
            • You can use the same processing instructions -at different times to print different data. -For example, you could set your default processing -instructions to: US letter-sized paper, double sided, stapled. -Whenever you print a job, it prints with these settings, -unless you explicitly override them. -
            -

            - -The processing instruction does not specify how the print job -processes the request; each processing instruction is only a description -of the results of a print job. The print job determines the manner in -which it achieves the results specified by the processing instructions. -Representing processing instructions as descriptive items -provides more flexibility for implementing print jobs. -

            Attribute Categories and Values

            -Each printer has a set of capabilities, such as the ability to print on -different paper sizes or the ability to print more than one copy. Each of -the capabilities has a range of values. For example, a printer's orientation -capability might have this range of values: [landscape, portrait]. -For each print request, the capability is set to one of these values. The -Java Print Service API uses the term attribute category to refer to -a printer capability and the term attribute value to refer to the value -of the capability. -

            -In the Java Print Service API, an attribute category is represented by a Java -class implementing the Attribute interface. -Attribute values are instances of such a class or -one of its subclasses. For example, to specify the number of copies, an -application constructs an instance of the -Copies class with the -number of desired copies and uses the Copies instance as part of -the print request. In this case, the Copies class represents the -attribute category, and the Copies instance represents the -attribute value. - -

            Attribute Roles

            - -When submitting a print job to a printer, the client provides the -attributes describing the characteristics of the print data, such as -the document name, and how the print data should be printed, such as -double-sided, five copies. If a print job consists of multiple -pieces of print data, different pieces might have different processing -instructions, such as 8 x 11 inch media for the first document, and -11 x 17 inch media for another document. -

            -Once the printer starts processing the print job, -additional information about the job becomes available, which might include: -the job state (such as completed or queued) and -the number of pages printed so far. These pieces of information are also -attributes. Attributes can also describe the printer itself, such as: -the printer name, the printer location, and the number of jobs queued. -

            - -The Java Print Service API defines these different kinds of attributes -with five subinterfaces of Attribute: -

            -Each attribute class -implements one or more of these tagging subinterfaces -to indicate where the attribute can be used in the API. -If an attribute class implements multiple tagging subinterfaces, -the attribute can be used in multiple contexts. For example, the media -attribute can apply to one document in a print job as a DocAttribute -or to an entire print job as a PrintRequestAttribute. -Certain low-level attributes -are never used on their own -but are always aggregated into higher-level attributes. -These low-level attribute classes only -implement interface Attribute, -not any of the tagging subinterfaces. -

            -The Java Print Service API defines a group of -standard attribute classes modeled upon the attributes in -the Internet Printing Protocol (IPP) version 1.1. The -standard attribute classes are in the subpackage -javax.print.attribute.standard to keep the actual -attribute classes conceptually separate from the generic -apparatus defined in package javax.print.attribute. - -

            Attribute Sets

            -A client usually needs to provide more than one processing -instruction when submitting a print job. For example, the client might need to -specify a media size of A4 and a landscape orientation. To send more than one -processing instruction, the client collects the attributes into an -attribute set, which the Java Print Service API represents with the -AttributeSet - interface. -

            -The AttributeSet interface is similar to the -Map interface: it provides a map of -key to values, in which each key is unique and can contain no more than one -value. However, the AttributeSet interface is designed to -specifically support the needs of the Java Print Service API. An -AttributeSet requires that: -

              -
            1. Each key in an AttributeSet corresponds to a category, and -the value of the key can only be one of the attribute values that belong -to the category represented by the key. Thus, unlike a Map, an -AttributeSet restricts the possible values of a key: an -attribute category cannot be set to an attribute value that does not belong to -that category. -
            2. No two attributes from the same category can exist in the same set. -For example, an attribute collection -must not contain both a "one-sided" attribute and a "two-sided" attribute -because these two attributes give the printer conflicting instructions. -
            3. Only attributes implementing the Attribute interface can -be added to the set. -
            - -

            -The javax.print.attribute package includes -HashAttributeSet -as a concrete implementation of the attribute set interface. -HashAttributeSet provides an attribute set based on a hash map. -You can use this implementation or provide your own implementation -of interface AttributeSet. -

            -The Java Print Service API provides four specializations of an attribute set -that are restricted to contain just one of the four kinds of attributes, -as discussed in the Attribute Roles section: -

            -Notice that only four kinds of attribute sets are listed here, but there are -five kinds of attributes. Interface -SupportedValuesAttribute -denotes an attribute that gives the supported values for another attribute. -Supported-values attributes are never aggregated into attribute sets, -so there is no attribute set subinterface defined for them. - -

            -In some contexts, an attribute set is read-only, which means that the -client is only allowed to examine an attribute set's -contents but not change them. In other contexts, the attribute set is read-write, -which means that the client is allowed both to examine and to change an -attribute set's contents. For a read-only attribute set, calling a mutating -operation throws an UnmodifiableSetException. -

            -Package javax.print.attribute includes -one concrete implementation of each of the attribute set subinterfaces: -

            -All of these classes extend HashAttributeSet -and enforce the restriction that the attribute set is only allowed to contain -the corresponding kind of attribute. -

            Attribute Class Design

            -An attribute value is a small, atomic data item, -such as an integer or an enumerated value. The Java Print Service API -does not use primitive data types, such as int, to represent attribute -values for these reasons: -
              -
            • Primitive data types are not type-safe. For example, a compiler -should not allow a "copies" attribute value to -be used for a "sides" attribute. -
            • Some attributes must be represented as a record of several -values. One example is printer resolution, which requires two -numbers, such as 600 and 300 representing 600 x 300 dpi. -
            -For type-safety and to represent all attributes uniformly, the Java -Print Service API defines each attribute category as a class, such as -class Copies, class Sides, and class -PrinterResolution. Each -attribute class wraps one or more primitive data items containing the -attribute's value. Attribute set operations perform frequent -comparisons between attribute category objects when adding attributes, -finding existing attributes in the same category, and looking -up an attribute given its category. Because an attribute category is -represented by a class, fast attribute-value comparisons can be performed -with the Class.equals method. -

            -Even though the Java Print Service API includes a large number of -different attribute categories, there are only a few different types -of attribute values. Most attributes can be represented by a small -number of data types, such as: integer values, integer ranges, text, -or an enumeration of integer values. The type of the attribute value that -a category accepts is called the attribute's abstract syntax. To -provide consistency and reduce code duplication, the Java Print Service -API defines abstract syntax classes to represent each -abstract syntax, and these classes are used as the parent of standard -attributes whenever possible. The abstract syntax classes are: -

              -
            • EnumSyntax -provides a type-safe enumeration in which enumerated -values are represented as singleton objects. Each enumeration -singleton is an instance of the enumeration class that wraps a hidden -int value. -
            • IntegerSyntax - is the abstract syntax for integer-valued attributes. -
            • TextSyntax is -the abstract syntax for text-valued attributes, and -includes a locale giving the text string's natural language. -
            • SetOfIntegerSyntax - is the abstract syntax for attributes -representing a range or set of integers -
            • ResolutionSyntax - is the abstract syntax for attributes representing - resolution values, such as 600x300 dpi. -
            • Size2DSyntax - is the abstract syntax for attributes representing a -two-dimensional size, such as a paper size of 8.5 x 11 inches. -
            • DateTimeSyntax - is the abstract syntax for attributes whose value is a date and time. -
            • URISyntax is the -abstract syntax for attributes whose value is a Uniform Resource -Indicator. -
            -The abstract syntax classes are independent of the attributes that -use them. In fact, applications that have nothing to do with -printing can use the abstract syntax classes. Although most of the -standard attribute classes extend one of the abstract syntax classes, -no attribute class is required to extend one of these classes. The -abstract syntax classes merely provide a convenient implementation that -can be shared by many attribute classes. -

            -Each attribute class implements the Attribute interface, either -directly or indirectly, to mark it as a printing attribute. An -attribute class that can appear in restricted attribute sets in -certain contexts also implements one or more subinterfaces of -Attribute. Most attribute classes also extend the appropriate -abstract syntax class to get the implementation. Consider the -Sides attribute class: -

            -
            -public class Sides
            -  extends EnumSyntax
            -  implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
            -  {
            -  public final Object getCategory()
            -    {
            -    return Sides.class;
            -    }
            -  ...
            -  }
            -
            -
            -

            -Since every attribute class implements Attribute, every attribute -class must provide an implementation for the -{@link javax.print.attribute.Attribute#getCategory() getCategory} method, -which returns the attribute category. In the case of Sides, the -getCategory method returns Sides.class. The -getCategory method is final to ensure that any vendor-defined -subclasses of a standard attribute class appear in the same category. -Every attribute object is immutable once constructed so that attribute object -references can be passed around freely. To get a different attribute -value, construct a different attribute object. - -

            Attribute Vendors

            - -The Java Print Service API is designed so that vendors can: -
              -
            • define new vendor-specific values for any standard attribute -defined in -javax.print.attribute.standard. -
            • define new attribute categories representing the vendor printer's -proprietary capabilities not already supported by the standard -attributes. -
            -To define a new value for an attribute, a client can construct -instances of such attributes with arbitrary values at runtime. -However, an enumerated attribute using an abstract syntax class -of EnumSyntax specifies all the possible attribute values -at compile time as singleton instances of the attribute class. This -means that new enumerated values cannot be constructed at run time. -To define new vendor-specific values for a standard enumerated -attribute, the vendor must define a new attribute class specifying -the new singleton instances. To ensure that the new attribute values -fall in the same category as the standard attribute values, the new -attribute class must be a subclass of the standard attribute class. -

            -To define a new attribute category, a vendor defines a new attribute -class. This attribute class, like the standard attribute classes, -implements Attribute or one of its subinterfaces and extends an -abstract syntax class. The vendor can either use an existing -abstract syntax class or define a new one. The new vendor-defined -attribute can be used wherever an Attribute is used, such as in an -AttributeSet. - -

            Using Attributes

            - -A typical printing application uses the PrintRequestAttributeSet -because print-request attributes are the types of attributes that -client usually specifies. This example demonstrates creating an attribute -set of print-request attributes and locating a printer that can -print the document according to the specified attributes: -
            -
            -
            -FileInputStream psStream;
            -try {
            -   psstream = new FileInputStream("file.ps");
            -} catch (FileNotFoundException ffne) {
            -}
            -if (psstream == null) {
            -    return;
            -}
            -//Set the document type.  See the DocFlavor documentation for
            -//more information.
            -DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
            -Doc myDoc = new SimpleDoc(pstream, psInFormat, null);  
            -PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
            -aset.add(new Copies(5));
            -aset.add(MediaSize.A4);
            -aset.add(Sides.DUPLEX);
            -
            -PrintService[] services = 
            -		PrintServiceLookup.lookupPrintServices(psInFormat, aset);
            -if (services.length > 0) {
            -   DocPrintJob job = services[0].createPrintJob();
            -   try {
            -	job.print(myDoc, aset);
            -   } catch (PrintException pe) {}
            -}
            -
            -
            -

            -Please note: In the javax.print APIs, a null reference parameter to methods -is incorrect unless explicitly documented on the method as having a meaningful -interpretation. Usage to the contrary is incorrect coding and may result -in a run time exception either immediately or at some later time. -IllegalArgumentException and NullPointerException are examples of -typical and acceptable run time exceptions for such cases. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/Chromaticity.java b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/Chromaticity.java index a9ac9a10c0b..afe46620cae 100644 --- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/Chromaticity.java +++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/Chromaticity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -42,7 +42,10 @@ import javax.print.attribute.PrintJobAttribute; * {@link #MONOCHROME MONOCHROME} or {@link #COLOR COLOR} * for a monochrome or color document. * - * + *
            + * + * * * * + * + * * * * + * *
            Shows effects of specifying MONOCHROME or COLOR Chromaticity + * attributes
            * Chromaticity
            Attribute @@ -54,6 +57,8 @@ import javax.print.attribute.PrintJobAttribute; * Effect on
            Color Document *
            * {@link #MONOCHROME MONOCHROME} @@ -76,6 +81,7 @@ import javax.print.attribute.PrintJobAttribute; * Printed as is, in color *
            *

            * IPP Compatibility: Chromaticity is not an IPP attribute at present. diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/Finishings.java b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/Finishings.java index 8369f7f4da8..e4be4c98a2a 100644 --- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/Finishings.java +++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/Finishings.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -40,7 +40,8 @@ import javax.print.attribute.PrintJobAttribute; * for purposes of finishing. *

            * Standard Finishings values are: - * + *
            + * * *
            Standard Finishings values
            *   @@ -76,7 +77,8 @@ import javax.print.attribute.PrintJobAttribute; *

            * The following Finishings values are more specific; they indicate a * corner or an edge as if the document were a portrait document: - * + *
            + * * *
            Specific Finishings values
            *   diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/JobKOctets.java b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/JobKOctets.java index c50dc9f3b7d..5be4b258294 100644 --- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/JobKOctets.java +++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/JobKOctets.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -66,11 +66,15 @@ import javax.print.attribute.PrintJobAttribute; * specified by the doc's {@link javax.print.DocFlavor DocFlavor}, as * shown in the table below. * - * + *
            + * + * * * * * + * + * * * * @@ -107,6 +111,7 @@ import javax.print.attribute.PrintJobAttribute; * * * + * *
            Table showing computation of doc sizes
            Representation ClassDocument Size
            byte[]Length of the byte arrayjava.awt.print.PageableImplementation dependent*
            *

            * * In these cases the Print Service itself generates the print data sent diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MediaPrintableArea.java b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MediaPrintableArea.java index cfe9a34cbf8..05937b5dcaf 100644 --- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MediaPrintableArea.java +++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MediaPrintableArea.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -24,7 +24,9 @@ */ package javax.print.attribute.standard; +import javax.print.DocFlavor; import javax.print.attribute.Attribute; +import javax.print.attribute.AttributeSet; import javax.print.attribute.DocAttribute; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java index 7f06e953572..86a84de83d0 100644 --- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java +++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -70,7 +70,7 @@ import javax.print.attribute.PrintJobAttribute; * The standard MultipleDocumentHandling values are: *

              *
            • - * {@link #SINGLE_DOCUMENT + * {@link #SINGLE_DOCUMENT * SINGLE_DOCUMENT}. If a print job has multiple * documents -- say, the document data is called {@code a} and * {@code b} -- then the result of processing all the document data @@ -85,7 +85,7 @@ import javax.print.attribute.PrintJobAttribute; * each copy ({@code a(*),b(*)}) to start on a new media sheet. * *
            • - * {@link #SEPARATE_DOCUMENTS_UNCOLLATED_COPIES + * {@link #SEPARATE_DOCUMENTS_UNCOLLATED_COPIES * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES}. If a print job * has multiple documents -- say, the document data is called {@code a} and * {@code b} -- then the result of processing the data in each document @@ -98,7 +98,7 @@ import javax.print.attribute.PrintJobAttribute; * {@code a(*),a(*),...,b(*),b(*)...}. * *
            • - * {@link #SEPARATE_DOCUMENTS_COLLATED_COPIES + * {@link #SEPARATE_DOCUMENTS_COLLATED_COPIES * SEPARATE_DOCUMENTS_COLLATED_COPIES}. If a print job * has multiple documents -- say, the document data is called {@code a} and * {@code b} -- then the result of processing the data in each document @@ -111,7 +111,7 @@ import javax.print.attribute.PrintJobAttribute; * {@code a(*),b(*),a(*),b(*),...}. * *
            • - * {@link #SINGLE_DOCUMENT_NEW_SHEET + * {@link #SINGLE_DOCUMENT_NEW_SHEET * SINGLE_DOCUMENT_NEW_SHEET}. Same as SINGLE_DOCUMENT, * except that the printer must ensure that the first impression of each * document instance in the job is placed on a new media sheet. This value diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package-info.java b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package-info.java new file mode 100644 index 00000000000..1e44ec9af61 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package-info.java @@ -0,0 +1,637 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Package javax.print.attribute.standard contains classes for specific printing + * attributes. The parent package, + * javax.print.attribute, provides classes and interfaces that describe the + * types of Java Print Service attributes and how they can be collected into + * attribute sets. + *

              + * An attribute represents a printing feature that a print service can provide. + * For each attribute, a print service either does or does not support the + * attribute. For each possible value of a supported attribute, a print service + * either does or does not support the value. + *

              + * The API requires every print service to support certain attributes; other + * attributes are optional and the service can choose whether or not to support + * them. Each attribute has a set of values that it accepts. The API requires + * every print service to support certain values for certain attributes; other + * attribute values are optional and the service can choose whether or not to + * support them. These support requirements are recorded in the documentation + * for each attribute class. + *

              + * Package javax.print.attribute.standard contains standard printing attributes + * and standard printing attribute values that are widely used in the printing + * domain. A print service vendor can provide new vendor-specific printing + * attributes in addition to the standard ones. A vendor can also provide + * vendor-specific extensions (subclasses) of the standard printing attributes + * -- for example, to provide additional vendor-specific values for an existing + * standard attribute. Of course, if a vendor wants clients to be able to use + * any added or extended attributes, the vendor must publish the new attribute + * classes. + *

              + * Many of the standard attribute classes extend one of the abstract syntax + * classes of the javax.print.attribute package. These abstract syntax classes + * each represent a different type. The + * EnumSyntax class, for example, represents a type-safe enumeration. The + * abstract syntax class provides a wrapper for the attribute value. + *

              + * If an attribute class extends {@code EnumSyntax}, and the value of the + * attribute is an IPP-compatible value, the attribute's {@code toString} method + * returns the IPP string representation of the attribute value, such as + * "processing-stopped" for the JobState attribute. + * However, because the {@code EnumSyntax} class is extensible, vendors can + * define their own attribute values. If an attribute uses the + * {@code EnumSyntax} class and is set to one of these vendor-defined values + * then the {@code toString} method will not return the IPP string + * representation of the value. + *

              + * A printing client application will typically not need to use all the printing + * attribute classes in package javax.print.attribute.standard, just the ones + * that pertain to the application. + *

              + * The attribute classes in package javax.print.attribute.standard are based on + * the Internet Printing Protocol (IPP) attributes as defined in the Internet + * RFC document, RFC 2911 Internet Printing Protocol/1.1: Model and + * Semantics dated September 2000. See + * RFC 2911 for more + * information. The descriptive text for each attribute class was taken largely + * from the above documents. The above authors' contribution to the API is + * gratefully acknowledged. + * + *

              Attribute Organization

              + * There are five kinds of printing attributes: doc attributes, print request + * attributes, print job attributes, print service attributes, and + * supported-values attributes. + * + *

              Doc Attributes

              + * Doc attributes specify the characteristics of an individual doc and the print + * job settings to be applied to an individual doc. A doc attribute class + * implements interface DocAttribute. A doc + * attribute can appear in a + * DocAttributeSet. + * + *

              Print Request Attributes

              + * Print request attributes specify the settings to be applied to a whole print + * job and to all the docs in the print job. A print request attribute class + * implements interface + * PrintRequestAttribute. A print request attribute can appear in a + * PrintRequestAttributeSet. + *

              + * Some attributes are doc attributes but not print request attributes and may + * only be specified at the doc level. Some attributes are print request + * attributes but not doc attributes and may only be specified at the Print + * Request level. Some attributes are both doc attributes and print request + * attributes and may be specified either at the doc level or at the Print + * Request level. + *

              + * When specified at the doc level, an attribute applies just to that one doc. + * When specified at the Print Request level, an attribute applies to the whole + * job, including all the docs in the job. However, an attribute specified at + * the doc level overrides an attribute in the same category specified at the + * Print Request level. + * + *

              Print Job Attributes

              + * Print job attributes report the status of a Print Job. A print job attribute + * class implements interface + * PrintJobAttribute. A print job attribute can appear in a + * PrintJobAttributeSet. + *

              + * Some attributes are both print request attributes and print job attributes; a + * client may include such attributes in a Print Request to specify + * characteristics for the ensuing Print Job, and those attributes then also + * appear in the Print Job's attribute set. Some attributes are print job + * attributes but not print request attributes; the print service itself adds + * these attributes to the Print Job's attribute set. + * + *

              Print Service Attributes

              + * Print service attributes report the status of a print service. A print + * service attribute class implements interface + * PrintServiceAttribute. A print + * service attribute can appear in a + * PrintServiceAttributeSet. + * + *

              Supported-Values Attributes

              + * A supported-value attribute indicates the legal values for another attribute + * that a print service supports. A supported-values attribute class implements + * interface + * SupportedValuesAttribute. However, supported-values attributes never + * appear in attribute sets, so there is no restricted + * AttributeSet subinterface for them. + * + *

              Attribute Table

              + * The table below lists all the printing attributes. The table shows the + * tagging interfaces each attribute class implements in addition to interface + * Attribute, thus indicating how each + * attribute is used in the API. For each doc attribute and print request + * attribute, the column marked "SupportedValuesAttribute" lists the + * supported-values attribute class, if any, with which a print service + * indicates the supported values for that attribute category. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
              Attribute ClassDoc
              Attribute
              Print
              Request
              Attribute
              Print
              Job
              Attribute
              Print
              Service
              Attribute
              SupportedValuesAttribute
              CompressionX    
              DocumentNameX    
              ChromaticityXXX  
              Copies XX CopiesSupported
              FinishingsXXX  
              JobHoldUntil XX  
              JobImpressions XX  + * JobImpressionsSupported
              JobKOctets XX JobKOctetsSupported
              JobMediaSheets XX  + * JobMediaSheetsSupported
              JobName XX  
              JobPriority XX JobPrioritySupported
              JobSheets XX  
              MediaXXX  
              MediaSize     
              + * MultipleDocumentHandling XX  
              NumberUpXXX NumberUpSupported
              OrientationRequestedXXX  
              PageRangesXXX  
              + * PresentationDirectionXXX  
              PrinterResolutionXXX  
              PrintQualityXXX  
              RequestingUserName XX  
              SheetCollateXXX  
              SidesXXX  
              DateTimeAtCompleted  X  
              DateTimeAtCreation  X  
              DateTimeAtProcessing  X  
              + * JobImpressionsCompleted  X  
              JobKOctetsProcessed  X  
              + * JobMediaSheetsCompleted  X  
              + * JobMessageFromOperator  X  
              + * JobOriginatingUserName  X  
              JobState  X  
              JobStateReasons
              + * Contains zero or more --
                X  
              -- JobStateReason     
              NumberOfDocuments  X  
              + * NumberOfInterveningJobs  X  
              OutputDeviceAssigned  X  
              ColorSupported   X 
              PagesPerMinute   X 
              PagesPerMinuteColor   X 
              PDLOverrideSupported   X 
              + * PrinterIsAcceptingJobs   X 
              PrinterInfo   X 
              PrinterLocation   X 
              + * PrinterMessageFromOperator   X 
              PrinterMakeAndModel   X 
              PrinterMoreInfo   X 
              + * PrinterMoreInfoManufacturer   X 
              PrinterName   X 
              PrinterState   X 
              PrinterStateReasons
              + * Contains zero or more --
                 X 
              -- PrinterStateReason     
              -- Severity     
              QueuedJobCount   X 
              + * ReferenceUriSchemesSupported     
              + *

              + * Please note: In the javax.print APIs, a null reference parameter to methods + * is incorrect unless explicitly documented on the method as having a + * meaningful interpretation. Usage to the contrary is incorrect coding and may + * result in a run time exception either immediately or at some later time. + * IllegalArgumentException and NullPointerException are examples of typical and + * acceptable run time exceptions for such cases. + * + * @since 1.4 + */ +package javax.print.attribute.standard; diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package.html b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package.html deleted file mode 100644 index 78d29368527..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package.html +++ /dev/null @@ -1,292 +0,0 @@ - - - -javax.print.attribute.standard package - - - -Package javax.print.attribute.standard -contains classes for specific printing attributes. -The parent package, - -javax.print.attribute, -provides classes and interfaces that describe the types of Java -Print Service attributes and how they can be collected into attribute -sets. -

              -An attribute represents a printing feature -that a print service can provide. -For each attribute, -a print service either does or does not support the attribute. -For each possible value of a supported attribute, -a print service either does or does not support the value. -

              -The API requires every print service -to support certain attributes; -other attributes are optional -and the service can choose whether or not to support them. -Each attribute has a set of values that it accepts. The API -requires every print service to support certain values for -certain attributes; -other attribute values are optional -and the service can choose whether or not to support them. -These support requirements are recorded in the documentation -for each attribute class. -

              -Package javax.print.attribute.standard -contains standard printing attributes -and standard printing attribute values -that are widely used in the printing domain. -A print service vendor -can provide new vendor-specific printing attributes -in addition to the standard ones. -A vendor can also provide -vendor-specific extensions (subclasses) -of the standard printing attributes -- -for example, -to provide additional vendor-specific values -for an existing standard attribute. -Of course, -if a vendor wants clients -to be able to use any added or extended attributes, -the vendor must publish the new attribute classes. -

              -Many of the standard attribute classes extend one of -the abstract syntax classes of the javax.print.attribute package. -These abstract syntax classes each represent a -different type. The -EnumSyntax class, for example, represents a type-safe -enumeration. The abstract syntax class provides a wrapper for the attribute -value. -

              -If an attribute class extends EnumSyntax, and the value of the -attribute is an IPP-compatible value, the attribute's toString -method returns the IPP string representation of the attribute value, such as -"processing-stopped" for the -JobState attribute. However, because the -EnumSyntax class is extensible, vendors can define their own -attribute values. If an attribute uses the EnumSyntax class -and is set to one of these vendor-defined values then the toString - method will not return the IPP string representation of the value. -

              -A printing client application -will typically not need to use -all the printing attribute classes -in package javax.print.attribute.standard, -just the ones that pertain to the application. -

              -The attribute classes in package javax.print.attribute.standard -are based on the Internet Printing Protocol (IPP) attributes -as defined in the Internet RFC document, -RFC 2911 Internet Printing Protocol/1.1: Model and Semantics -dated September 2000. -See RFC 2911 -for more information. -The descriptive text for each attribute class -was taken largely from the above documents. -The above authors' contribution to the API -is gratefully acknowledged. - -

              Attribute Organization

              -There are five kinds of printing attributes: -doc attributes, -print request attributes, -print job attributes, -print service attributes, -and supported-values attributes. - -

              Doc Attributes

              -Doc attributes specify the characteristics of an individual doc -and the print job settings to be applied to an individual doc. -A doc attribute class implements interface -DocAttribute. -A doc attribute can appear in a - -DocAttributeSet. - -

              Print Request Attributes

              -Print request attributes -specify the settings to be applied to a whole print job -and to all the docs in the print job. -A print request attribute class implements interface - -PrintRequestAttribute. -A print request attribute can appear in a - -PrintRequestAttributeSet. - -

              -Some attributes are doc attributes -but not print request attributes -and may only be specified at the doc level. -Some attributes are print request attributes -but not doc attributes -and may only be specified at the Print Request level. -Some attributes are both doc attributes -and print request attributes -and may be specified either at the doc level -or at the Print Request level. -

              -When specified at the doc level, -an attribute applies just to that one doc. -When specified at the Print Request level, -an attribute applies to the whole job, -including all the docs in the job. -However, an attribute specified at the doc level -overrides an attribute in the same category -specified at the Print Request level. - -

              Print Job Attributes

              -Print job attributes report the status of a Print Job. -A print job attribute class implements interface -PrintJobAttribute. -A print job attribute -can appear in a -PrintJobAttributeSet. -

              -Some attributes are both print request attributes -and print job attributes; -a client may include such attributes in a Print Request -to specify characteristics for the ensuing Print Job, -and those attributes then also appear -in the Print Job's attribute set. -Some attributes are print job attributes -but not print request attributes; -the print service itself -adds these attributes to the Print Job's attribute set. - -

              Print Service Attributes

              -Print service attributes report the status -of a print service. -A print service attribute class implements interface - -PrintServiceAttribute. -A print service attribute -can appear in a -PrintServiceAttributeSet. - -

              Supported-Values Attributes

              -A supported-value attribute -indicates the legal values for another attribute -that a print service supports. -A supported-values attribute class implements interface - -SupportedValuesAttribute. -However, supported-values attributes -never appear in attribute sets, -so there is no restricted -AttributeSet -subinterface for them. - -

              Attribute Table

              -The table below lists all the printing attributes. -The table shows the tagging interfaces -each attribute class implements -in addition to interface -Attribute, -thus indicating how each attribute is used in the API. -For each doc attribute and print request attribute, -the column marked "SupportedValuesAttribute" -lists the supported-values attribute class, if any, -with which a print service -indicates the supported values for that attribute category. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              Attribute ClassDoc
              Attribute
              Print
              Request
              Attribute
              Print
              Job
              Attribute
              Print
              Service
              Attribute
              SupportedValuesAttribute
              CompressionX    
              DocumentNameX    
              ChromaticityXXX  
              Copies XX CopiesSupported
              FinishingsXXX  
              JobHoldUntil XX  
              JobImpressions XX JobImpressionsSupported
              JobKOctets XX JobKOctetsSupported
              JobMediaSheets XX JobMediaSheetsSupported
              JobName XX  
              JobPriority XX JobPrioritySupported
              JobSheets XX  
              MediaXXX  
              MediaSize     
              MultipleDocumentHandling XX  
              NumberUpXXX NumberUpSupported
              OrientationRequestedXXX  
              PageRangesXXX  
              PresentationDirectionXXX  
              PrinterResolutionXXX  
              PrintQualityXXX  
              RequestingUserName XX  
              SheetCollateXXX  
              SidesXXX  
              DateTimeAtCompleted  X  
              DateTimeAtCreation  X  
              DateTimeAtProcessing  X  
              JobImpressionsCompleted  X  
              JobKOctetsProcessed  X  
              JobMediaSheetsCompleted  X  
              JobMessageFromOperator  X  
              JobOriginatingUserName  X  
              JobState  X  
              JobStateReasons
              Contains zero or more --
                X  
              -- JobStateReason     
              NumberOfDocuments  X  
              NumberOfInterveningJobs  X  
              OutputDeviceAssigned  X  
              ColorSupported   X 
              PagesPerMinute   X 
              PagesPerMinuteColor   X 
              PDLOverrideSupported   X 
              PrinterIsAcceptingJobs   X 
              PrinterInfo   X 
              PrinterLocation   X 
              PrinterMessageFromOperator   X 
              PrinterMakeAndModel   X 
              PrinterMoreInfo   X 
              PrinterMoreInfoManufacturer   X 
              PrinterName   X 
              PrinterState   X 
              PrinterStateReasons
              Contains zero or more --
                 X 
              -- PrinterStateReason     
              -- Severity     
              QueuedJobCount   X 
              ReferenceUriSchemesSupported     
              -

              -Please note: In the javax.print APIs, a null reference parameter to methods -is incorrect unless explicitly documented on the method as having a meaningful -interpretation. Usage to the contrary is incorrect coding and may result -in a run time exception either immediately or at some later time. -IllegalArgumentException and NullPointerException are examples of -typical and acceptable run time exceptions for such cases. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/print/event/package-info.java b/jdk/src/java.desktop/share/classes/javax/print/event/package-info.java new file mode 100644 index 00000000000..ca65f565da9 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/print/event/package-info.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Package javax.print.event contains event classes and listener interfaces. + *

              + * They may be used to monitor both print services (such as printers going + * on-line & off-line), and the progress of a specific print job. + *

              + * Please note: In the javax.print APIs, a null reference parameter to methods + * is incorrect unless explicitly documented on the method as having a + * meaningful interpretation. Usage to the contrary is incorrect coding and may + * result in a run time exception either immediately or at some later time. + * IllegalArgumentException and NullPointerException are examples of typical and + * acceptable run time exceptions for such cases. + * + * @since 1.4 + */ +package javax.print.event; diff --git a/jdk/src/java.desktop/share/classes/javax/print/event/package.html b/jdk/src/java.desktop/share/classes/javax/print/event/package.html deleted file mode 100644 index 6e49d8b4fda..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/print/event/package.html +++ /dev/null @@ -1,45 +0,0 @@ - - - -javax.print.event package - - - -Package javax.print.event contains event classes and listener interfaces. -

              -They may be used to monitor both print services (such as printers going -on-line & off-line), and the progress of a specific print job. -

              -Please note: In the javax.print APIs, a null reference parameter to methods -is incorrect unless explicitly documented on the method as having a meaningful -interpretation. Usage to the contrary is incorrect coding and may result -in a run time exception either immediately or at some later time. -IllegalArgumentException and NullPointerException are examples of -typical and acceptable run time exceptions for such cases. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/print/package-info.java b/jdk/src/java.desktop/share/classes/javax/print/package-info.java new file mode 100644 index 00000000000..b2ef3d7e155 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/print/package-info.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides the principal classes and interfaces for the Java™ Print + * Service API. The Java Print Service API enables client and server + * applications to: + *

                + *
              • Discover and select print services based on their capabilities
              • + *
              • Specify the format of print data
              • + *
              • Submit print jobs to services that support the document type to be + * printed.
              • + *
              + * + *

              Print Service Discovery

              + * An application invokes the static methods of the abstract class + * {@link javax.print.PrintServiceLookup PrintServiceLookup} to locate print + * services that have the capabilities to satisfy the application's print + * request. For example, to print a double-sided document, the application first + * needs to find printers that have the double-sided printing capability. + *

              + * The JDK includes {@code PrintServiceLookup} implementations that can locate + * the standard platform printers. To locate other types of printers, such as + * IPP printers or JINI printers, a print-service provider can write + * implementations of {@code PrintServiceLookup}. The print-service provider can + * dynamically install these {@code PrintServiceLookup} implementations using + * the {@link java.util.ServiceLoader} facility. + * + *

              Attribute Definitions

              + * The {@link javax.print.attribute} and {@link javax.print.attribute.standard} + * packages define print attributes, which describe the capabilities of a print + * service, specify the requirements of a print job, and track the progress of + * a print job. + *

              + * The {@code javax.print.attribute} package describes the types of attributes + * and how they can be collected into sets. The + * {@code javax.print.attribute.standard} package enumerates all of the standard + * attributes supported by the API, most of which are implementations of + * attributes specified in the IETF Specification, + * RFC 2911 Internet Printing + * Protocol, 1.1: Model and Semantics, dated September 2000. The attributes + * specified in {@code javax.print.attribute.standard} include common + * capabilities, such as: resolution, copies, media sizes, job priority, and + * page ranges. + * + *

              Document Type Specification

              + * The {@link javax.print.DocFlavor DocFlavor} class represents the print data + * format, such as JPEG or PostScript. A {@code DocFlavor} object consists of a + * MIME type, which describes the format, and a document representation class + * name that indicates how the document is delivered to the printer or output + * stream. An application uses the {@code DocFlavor} and an attribute set to + * find printers that can print the document type specified by the + * {@code DocFlavor} and have the capabilities specified by the attribute set. + * + *

              Using the API

              + * A typical application using the Java Print Service API performs these steps + * to process a print request: + *
                + *
              1. Chooses a {@code DocFlavor}.
              2. + *
              3. Creates a set of attributes.
              4. + *
              5. Locates a print service that can handle the print request as + * specified by the {@code DocFlavor} and the attribute set.
              6. + *
              7. Creates a {@link javax.print.Doc Doc} object encapsulating the + * {@code DocFlavor} and the actual print data, which can take many forms + * including: a Postscript file, a JPEG image, a URL, or plain text.
              8. + *
              9. Gets a print job, represented by + * {@link javax.print.DocPrintJob DocPrintJob}, from the print service.
              10. + *
              11. Calls the print method of the print job.
              12. + *
              + * The following code sample demonstrates a typical use of the Java Print + * Service API: locating printers that can print five double-sided copies of a + * Postscript document on size A4 paper, creating a print job from one of the + * returned print services, and calling print. + *
              + *
              {@code
              + * FileInputStream psStream;
              + * try {
              + *     psStream = new FileInputStream("file.ps");
              + * } catch (FileNotFoundException ffne) {
              + * }
              + * if (psStream == null) {
              + *     return;
              + * }
              + * DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
              + * Doc myDoc = new SimpleDoc(psStream, psInFormat, null);
              + * PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
              + * aset.add(new Copies(5));
              + * aset.add(MediaSizeName.ISO_A4);
              + * aset.add(Sides.DUPLEX);
              + * PrintService[] services =
              + * PrintServiceLookup.lookupPrintServices(psInFormat, aset);
              + * if (services.length > 0) {
              + *     DocPrintJob job = services[0].createPrintJob();
              + *     try {
              + *         job.print(myDoc, aset);
              + *     } catch (PrintException pe) {}
              + * }
              + * }
              + *
              + *

              + * Please note: In the javax.print APIs, a null reference parameter to methods + * is incorrect unless explicitly documented on the method as having a + * meaningful interpretation. Usage to the contrary is incorrect coding and may + * result in a run time exception either immediately or at some later time. + * IllegalArgumentException and NullPointerException are examples of typical and + * acceptable run time exceptions for such cases. + * + * @since 1.4 + */ +package javax.print; diff --git a/jdk/src/java.desktop/share/classes/javax/print/package.html b/jdk/src/java.desktop/share/classes/javax/print/package.html deleted file mode 100644 index e306ac6d77c..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/print/package.html +++ /dev/null @@ -1,147 +0,0 @@ - - - -javax.print package - - - -Provides the principal classes and interfaces for the -JavaTM Print Service API. -The Java Print Service API enables client and server applications to: -

                -
              • Discover and select print services based on their capabilities -
              • Specify the format of print data -
              • Submit print jobs to services that support the document type to -be printed. -
              - - -

              Print Service Discovery

              -

              -An application invokes the static methods of the abstract class -{@link javax.print.PrintServiceLookup PrintServiceLookup} to locate print -services that have the capabilities to satisfy the application's print -request. For example, to print a double-sided document, the application -first needs to find printers that have the double-sided printing capability. -

              -The JDK includes PrintServiceLookup implementations that -can locate the standard platform printers. To locate other types of printers, -such as IPP printers or JINI printers, a print-service provider can write -implementations of PrintServiceLookup. The print-service provider -can dynamically install these PrintServiceLookup implementations -using the - -SPI JAR file specification. - -

              Attribute Definitions

              - -The {@link javax.print.attribute} and {@link javax.print.attribute.standard} -packages define print attributes, which describe the capabilities of a print -service, specify the requirements of a print job, and track the progress of -a print job. -

              -The javax.print.attribute package describes the types of attributes and -how they can be collected into sets. The javax.print.attribute.standard -package enumerates all of the standard attributes supported by the API, most -of which are implementations of attributes specified in the IETF Specification, - -RFC 2911 Internet Printing Protocol, 1.1: Model and Semantics, dated -September 2000. The attributes specified in javax.print.attribute.standard -include common capabilities, such as: resolution, copies, media sizes, -job priority, and page ranges. - -

              Document Type Specification

              - -The {@link javax.print.DocFlavor DocFlavor} class represents the print data -format, such as JPEG or PostScript. A DocFlavor object -consists of a MIME type, which describes the format, and a document -representation class name that indicates how the document is delivered -to the printer or output stream. An application uses the -DocFlavor and an attribute set to find printers that can -print the document type specified by the DocFlavor and have -the capabilities specified by the attribute set. - -

              Using the API

              - -A typical application using the Java Print Service API performs these steps -to process a print request: -
                -
              1. Chooses a DocFlavor.
              2. -
              3. Creates a set of attributes.
              4. -
              5. Locates a print service that can handle the print request as specified -by the DocFlavor and the attribute set.
              6. -
              7. Creates a {@link javax.print.Doc Doc} object encapsulating the -DocFlavor -and the actual print data, which can take many forms including: a Postscript -file, a JPEG image, a URL, or plain text.
              8. -
              9. Gets a print job, represented by {@link javax.print.DocPrintJob DocPrintJob}, - from the print service.
              10. -
              11. Calls the print method of the print job.
              12. -
              -The following code sample demonstrates a typical use of the Java Print -Service API: locating printers that can print five double-sided copies -of a Postscript document on size A4 paper, creating a print job from -one of the returned print services, and calling print. - -
              -
              -FileInputStream psStream;
              -try {
              -   psStream = new FileInputStream("file.ps");
              -} catch (FileNotFoundException ffne) {
              -}
              -if (psStream == null) {
              -    return;
              -}
              -
              -DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
              -Doc myDoc = new SimpleDoc(psStream, psInFormat, null);  
              -PrintRequestAttributeSet aset = 
              -	new HashPrintRequestAttributeSet();
              -aset.add(new Copies(5));
              -aset.add(MediaSizeName.ISO_A4);
              -aset.add(Sides.DUPLEX);
              -PrintService[] services = 
              -  PrintServiceLookup.lookupPrintServices(psInFormat, aset);
              -if (services.length > 0) {
              -   DocPrintJob job = services[0].createPrintJob();
              -   try {
              -	job.print(myDoc, aset);
              -   } catch (PrintException pe) {}
              -}
              -
              -
              -

              -Please note: In the javax.print APIs, a null reference parameter to methods -is incorrect unless explicitly documented on the method as having a meaningful -interpretation. Usage to the contrary is incorrect coding and may result -in a run time exception either immediately or at some later time. -IllegalArgumentException and NullPointerException are examples of -typical and acceptable run time exceptions for such cases. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java index 8c6a5904378..0fe40e84342 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java @@ -59,7 +59,7 @@ public class MetaMessage extends MidiMessage { * * @see MidiMessage#getStatus */ - public static final int META = 0xFF; // 255 + public static final int META = 0xFF; // 255 /** * The length of the actual message in the data array. This is used to diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java index f7b8b9b5b3a..6ca01acb05b 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,15 +47,15 @@ package javax.sound.midi; * {@code MidiMessage} includes methods to get, but not set, these values. * Setting them is a subclass responsibility. *

              - * The MIDI standard expresses MIDI data in + * The MIDI standard expresses MIDI data in * bytes. However, because JavaTM uses signed bytes, the Java Sound * API uses integers instead of bytes when expressing MIDI data. For example, * the {@link #getStatus()} method of {@code MidiMessage} returns MIDI status * bytes as integers. If you are processing MIDI data that originated outside * Java Sound and now is encoded as signed bytes, the bytes can be * converted to integers using this conversion: - * - *

              {@code int i = (int)(byte & 0xFF)}
              + *

              + * {@code int i = (int)(byte & 0xFF)} *

              * If you simply need to pass a known MIDI byte value as a method parameter, it * can be expressed directly as an integer, using (for example) decimal or diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java index 7a58b1a728b..0515b71aa2f 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -74,13 +74,16 @@ import com.sun.media.sound.ReferenceCountingDevice; * following table lists the available property keys and which methods consider * them: * - * - * + *
              MIDI System Property Keys
              + * + * * * * * * + * + * * * * @@ -101,6 +104,7 @@ import com.sun.media.sound.ReferenceCountingDevice; * * * + * *
              MIDI System Property Keys
              Property KeyInterfaceAffected Method
              {@code javax.sound.midi.Receiver}{@link Receiver}{@link Transmitter}{@link #getTransmitter}
              * * The property value consists of the provider class name and the device name, diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/Sequence.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/Sequence.java index b8cfba0adcb..f8b8aaac27d 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/Sequence.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/Sequence.java @@ -58,7 +58,7 @@ public class Sequence { * * @see #Sequence(float, int) */ - public static final float PPQ = 0.0f; + public static final float PPQ = 0.0f; /** * The SMPTE-based timing type with 24 frames per second (resolution is @@ -66,7 +66,7 @@ public class Sequence { * * @see #Sequence(float, int) */ - public static final float SMPTE_24 = 24.0f; + public static final float SMPTE_24 = 24.0f; /** * The SMPTE-based timing type with 25 frames per second (resolution is @@ -74,7 +74,7 @@ public class Sequence { * * @see #Sequence(float, int) */ - public static final float SMPTE_25 = 25.0f; + public static final float SMPTE_25 = 25.0f; /** * The SMPTE-based timing type with 29.97 frames per second (resolution is @@ -82,7 +82,7 @@ public class Sequence { * * @see #Sequence(float, int) */ - public static final float SMPTE_30DROP = 29.97f; + public static final float SMPTE_30DROP = 29.97f; /** * The SMPTE-based timing type with 30 frames per second (resolution is @@ -90,7 +90,7 @@ public class Sequence { * * @see #Sequence(float, int) */ - public static final float SMPTE_30 = 30.0f; + public static final float SMPTE_30 = 30.0f; // Variables diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/Sequencer.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/Sequencer.java index 4050f385cc8..c1e94908602 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/Sequencer.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/Sequencer.java @@ -733,7 +733,7 @@ public interface Sequencer extends MidiDevice { * information from its internal clock. This is not a legal slave sync * mode. */ - public static final SyncMode INTERNAL_CLOCK = new SyncMode("Internal Clock"); + public static final SyncMode INTERNAL_CLOCK = new SyncMode("Internal Clock"); /** * A master or slave synchronization mode that specifies the use of MIDI @@ -745,7 +745,7 @@ public interface Sequencer extends MidiDevice { * receiver. MIDI clock messages are sent at a rate of 24 per quarter * note. */ - public static final SyncMode MIDI_SYNC = new SyncMode("MIDI Sync"); + public static final SyncMode MIDI_SYNC = new SyncMode("MIDI Sync"); /** * A master or slave synchronization mode that specifies the use of MIDI @@ -756,13 +756,13 @@ public interface Sequencer extends MidiDevice { * sequencer sends MIDI Time Code messages to its receiver. (See the * MIDI 1.0 Detailed Specification for a description of MIDI Time Code.) */ - public static final SyncMode MIDI_TIME_CODE = new SyncMode("MIDI Time Code"); + public static final SyncMode MIDI_TIME_CODE = new SyncMode("MIDI Time Code"); /** * A slave synchronization mode indicating that no timing information * should be sent to the receiver. This is not a legal master sync mode. */ - public static final SyncMode NO_SYNC = new SyncMode("No Timing"); + public static final SyncMode NO_SYNC = new SyncMode("No Timing"); } } diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/ShortMessage.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/ShortMessage.java index 8d0a9a22253..c02deda21bf 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/ShortMessage.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/ShortMessage.java @@ -61,35 +61,35 @@ public class ShortMessage extends MidiMessage { * * @see MidiMessage#getStatus */ - public static final int MIDI_TIME_CODE = 0xF1; // 241 + public static final int MIDI_TIME_CODE = 0xF1; // 241 /** * Status byte for Song Position Pointer message (0xF2, or 242). * * @see MidiMessage#getStatus */ - public static final int SONG_POSITION_POINTER = 0xF2; // 242 + public static final int SONG_POSITION_POINTER = 0xF2; // 242 /** * Status byte for MIDI Song Select message (0xF3, or 243). * * @see MidiMessage#getStatus */ - public static final int SONG_SELECT = 0xF3; // 243 + public static final int SONG_SELECT = 0xF3; // 243 /** * Status byte for Tune Request message (0xF6, or 246). * * @see MidiMessage#getStatus */ - public static final int TUNE_REQUEST = 0xF6; // 246 + public static final int TUNE_REQUEST = 0xF6; // 246 /** * Status byte for End of System Exclusive message (0xF7, or 247). * * @see MidiMessage#getStatus */ - public static final int END_OF_EXCLUSIVE = 0xF7; // 247 + public static final int END_OF_EXCLUSIVE = 0xF7; // 247 // System real-time messages @@ -98,80 +98,80 @@ public class ShortMessage extends MidiMessage { * * @see MidiMessage#getStatus */ - public static final int TIMING_CLOCK = 0xF8; // 248 + public static final int TIMING_CLOCK = 0xF8; // 248 /** * Status byte for Start message (0xFA, or 250). * * @see MidiMessage#getStatus */ - public static final int START = 0xFA; // 250 + public static final int START = 0xFA; // 250 /** * Status byte for Continue message (0xFB, or 251). * * @see MidiMessage#getStatus */ - public static final int CONTINUE = 0xFB; // 251 + public static final int CONTINUE = 0xFB; // 251 /** * Status byte for Stop message (0xFC, or 252). * * @see MidiMessage#getStatus */ - public static final int STOP = 0xFC; //252 + public static final int STOP = 0xFC; //252 /** * Status byte for Active Sensing message (0xFE, or 254). * * @see MidiMessage#getStatus */ - public static final int ACTIVE_SENSING = 0xFE; // 254 + public static final int ACTIVE_SENSING = 0xFE; // 254 /** * Status byte for System Reset message (0xFF, or 255). * * @see MidiMessage#getStatus */ - public static final int SYSTEM_RESET = 0xFF; // 255 + public static final int SYSTEM_RESET = 0xFF; // 255 // Channel voice message upper nibble defines /** * Command value for Note Off message (0x80, or 128). */ - public static final int NOTE_OFF = 0x80; // 128 + public static final int NOTE_OFF = 0x80; // 128 /** * Command value for Note On message (0x90, or 144). */ - public static final int NOTE_ON = 0x90; // 144 + public static final int NOTE_ON = 0x90; // 144 /** * Command value for Polyphonic Key Pressure (Aftertouch) message (0xA0, or * 160). */ - public static final int POLY_PRESSURE = 0xA0; // 160 + public static final int POLY_PRESSURE = 0xA0; // 160 /** * Command value for Control Change message (0xB0, or 176). */ - public static final int CONTROL_CHANGE = 0xB0; // 176 + public static final int CONTROL_CHANGE = 0xB0; // 176 /** * Command value for Program Change message (0xC0, or 192). */ - public static final int PROGRAM_CHANGE = 0xC0; // 192 + public static final int PROGRAM_CHANGE = 0xC0; // 192 /** * Command value for Channel Pressure (Aftertouch) message (0xD0, or 208). */ - public static final int CHANNEL_PRESSURE = 0xD0; // 208 + public static final int CHANNEL_PRESSURE = 0xD0; // 208 /** * Command value for Pitch Bend message (0xE0, or 224). */ - public static final int PITCH_BEND = 0xE0; // 224 + public static final int PITCH_BEND = 0xE0; // 224 /** * Constructs a new {@code ShortMessage}. The contents of the new message diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java index de478c3be31..b561faad898 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java @@ -81,7 +81,7 @@ public class SysexMessage extends MidiMessage { * * @see MidiMessage#getStatus */ - public static final int SYSTEM_EXCLUSIVE = 0xF0; // 240 + public static final int SYSTEM_EXCLUSIVE = 0xF0; // 240 /** * Status byte for Special System Exclusive message (0xF7, or 247), which is @@ -90,7 +90,7 @@ public class SysexMessage extends MidiMessage { * * @see MidiMessage#getStatus */ - public static final int SPECIAL_SYSTEM_EXCLUSIVE = 0xF7; // 247 + public static final int SPECIAL_SYSTEM_EXCLUSIVE = 0xF7; // 247 /** * The data bytes for this system exclusive message. These are initialized diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/VoiceStatus.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/VoiceStatus.java index 2d679613e01..0019a74f1b8 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/VoiceStatus.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/VoiceStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,7 @@ package javax.sound.midi; * given type of {@code Synthesizer} always has a fixed number of voices, equal * to the maximum number of simultaneous notes it is capable of sounding. *

              - * If the voice is not currently processing + * If the voice is not currently processing * a MIDI note, it is considered inactive. A voice is inactive when it has been * given no note-on commands, or when every note-on command received has been * terminated by a corresponding note-off (or by an "all notes off" message). diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/package-info.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/package-info.java new file mode 100644 index 00000000000..fe0bb38f555 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/package-info.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI + * (Musical Instrument Digital Interface) data. + * + *

              Related Documentation

              + * For more information on using Java Sound see: + * + * + * @since 1.3 + */ +package javax.sound.midi; diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/package.html b/jdk/src/java.desktop/share/classes/javax/sound/midi/package.html deleted file mode 100644 index 247e6f5fd78..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/package.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - -Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI -(Musical Instrument Digital Interface) data. - -

              Related Documentation

              - -For overviews, tutorials, examples, and guides, -please see: - - - -@since 1.3 - - diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package-info.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package-info.java new file mode 100644 index 00000000000..b843f507b22 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package-info.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Supplies interfaces for service providers to implement when offering new MIDI + * devices, MIDI file readers and writers, or sound bank readers. + * + *

              Related Documentation

              + * For more information on using Java Sound see: + * + * + * @since 1.3 + */ +package javax.sound.midi.spi; diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package.html b/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package.html deleted file mode 100644 index 6101ded4c1e..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -Supplies interfaces for service providers to implement when -offering new MIDI devices, MIDI file readers and writers, or sound bank readers. - - -

              Related Documentation

              - -For overviews, tutorials, examples, and guides, -please see: - - - -@since 1.3 - - diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioFormat.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioFormat.java index 38cadf49354..8baf0b68e9e 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioFormat.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioFormat.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -89,13 +89,16 @@ import java.util.Objects; * The following table lists some common properties which service providers * should use, if applicable: * - * - * + *
              Audio Format Properties
              + * + * * * * * * + * + * * * * @@ -112,6 +115,7 @@ import java.util.Objects; * * * + * *
              Audio Format Properties
              Property keyValue typeDescription
              "bitrate"{@link java.lang.Integer Integer}{@link java.lang.Integer Integer}encoding/conversion quality, 1..100
              *

              * Vendors of service providers (plugins) are encouraged to seek information diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioPermission.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioPermission.java index 13655254bf0..4b67d19f7eb 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioPermission.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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,13 +41,17 @@ import java.security.BasicPermission; * permission allows, as well as a discussion of the risks of granting code the * permission. * - * + *
              + * + * * * * * * - * + * + * * * * * + * *
              Permission target name, what the permission allows, and associated + * risks
              Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
              playAudio playback through the audio device or devices on the system. @@ -69,6 +73,7 @@ import java.security.BasicPermission; * using that mixer. * This permission can enable an applet or application to eavesdrop on a user.
              * * @author Kara Kytle diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java index e567b392102..ac3cacb28c9 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -72,13 +72,16 @@ import com.sun.media.sound.JDK13Services; * {@link Properties#load(InputStream) Properties.load}. The following table * lists the available property keys and which methods consider them: * - * - * + *
              Audio System Property Keys
              + * + * * * * * * + * + * * * * @@ -99,6 +102,7 @@ import com.sun.media.sound.JDK13Services; * * * + * *
              Audio System Property Keys
              Property KeyInterfaceAffected Method(s)
              {@code javax.sound.sampled.Clip}{@link Clip}{@link TargetDataLine}{@link #getLine}, {@link #getTargetDataLine}
              * * The property value consists of the provider class name and the mixer name, diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/BooleanControl.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/BooleanControl.java index 4f81d7c6514..a1abf92cef6 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/BooleanControl.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/BooleanControl.java @@ -141,14 +141,14 @@ public abstract class BooleanControl extends Control { * Represents a control for the mute status of a line. Note that mute * status does not affect gain. */ - public static final Type MUTE = new Type("Mute"); + public static final Type MUTE = new Type("Mute"); /** * Represents a control for whether reverberation is applied to a line. * Note that the status of this control not affect the reverberation * settings for a line, but does affect whether these settings are used. */ - public static final Type APPLY_REVERB = new Type("Apply Reverb"); + public static final Type APPLY_REVERB = new Type("Apply Reverb"); /** * Constructs a new boolean control type. diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/FloatControl.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/FloatControl.java index 485225b85f0..af310211d5f 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/FloatControl.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/FloatControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -361,8 +361,8 @@ public abstract class FloatControl extends Control { * loudness is unaffected. Note that gain measures dB, not amplitude. * The relationship between a gain in decibels and the corresponding * linear amplitude multiplier is: - * - *

              {@code linearScalar = pow(10.0, gainDB/20.0)}
              + *

              + * {@code linearScalar = pow(10.0, gainDB/20.0)} *

              * The {@code FloatControl} class has methods to impose a maximum and * minimum allowable value for gain. However, because an audio signal @@ -386,7 +386,7 @@ public abstract class FloatControl extends Control { * @see #REVERB_RETURN * @see #VOLUME */ - public static final Type MASTER_GAIN = new Type("Master Gain"); + public static final Type MASTER_GAIN = new Type("Master Gain"); /** * Represents a control for the auxiliary send gain on a line. @@ -394,7 +394,7 @@ public abstract class FloatControl extends Control { * @see #MASTER_GAIN * @see #AUX_RETURN */ - public static final Type AUX_SEND = new Type("AUX Send"); + public static final Type AUX_SEND = new Type("AUX Send"); /** * Represents a control for the auxiliary return gain on a line. @@ -402,7 +402,7 @@ public abstract class FloatControl extends Control { * @see #MASTER_GAIN * @see #AUX_SEND */ - public static final Type AUX_RETURN = new Type("AUX Return"); + public static final Type AUX_RETURN = new Type("AUX Return"); /** * Represents a control for the pre-reverb gain on a line. This control @@ -413,7 +413,7 @@ public abstract class FloatControl extends Control { * @see #REVERB_RETURN * @see EnumControl.Type#REVERB */ - public static final Type REVERB_SEND = new Type("Reverb Send"); + public static final Type REVERB_SEND = new Type("Reverb Send"); /** * Represents a control for the post-reverb gain on a line. This control @@ -423,7 +423,7 @@ public abstract class FloatControl extends Control { * @see #MASTER_GAIN * @see #REVERB_SEND */ - public static final Type REVERB_RETURN = new Type("Reverb Return"); + public static final Type REVERB_RETURN = new Type("Reverb Return"); /** * Represents a control for the volume on a line. @@ -431,7 +431,7 @@ public abstract class FloatControl extends Control { /* * $$kk: 08.30.99: ISSUE: what units? linear or dB? */ - public static final Type VOLUME = new Type("Volume"); + public static final Type VOLUME = new Type("Volume"); /** * Represents a control for the relative pan (left-right positioning) of @@ -442,7 +442,7 @@ public abstract class FloatControl extends Control { * * @see #BALANCE */ - public static final Type PAN = new Type("Pan"); + public static final Type PAN = new Type("Pan"); /** * Represents a control for the relative balance of a stereo signal @@ -452,7 +452,7 @@ public abstract class FloatControl extends Control { * * @see #PAN */ - public static final Type BALANCE = new Type("Balance"); + public static final Type BALANCE = new Type("Balance"); /** * Represents a control that changes the sample rate of audio playback. @@ -470,7 +470,7 @@ public abstract class FloatControl extends Control { * doubling the sample rate has the effect of doubling the frequencies * in the sound's spectrum, which raises the pitch by an octave. */ - public static final Type SAMPLE_RATE = new Type("Sample Rate"); + public static final Type SAMPLE_RATE = new Type("Sample Rate"); /** * Constructs a new float control type. diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java index 19fb585eae5..ca57d1de22a 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java @@ -220,7 +220,7 @@ public class LineEvent extends EventObject { * @see #CLOSE * @see Line#open */ - public static final Type OPEN = new Type("Open"); + public static final Type OPEN = new Type("Open"); /** * A type of event that is sent when a line closes, freeing the system @@ -229,7 +229,7 @@ public class LineEvent extends EventObject { * @see #OPEN * @see Line#close */ - public static final Type CLOSE = new Type("Close"); + public static final Type CLOSE = new Type("Close"); /** * A type of event that is sent when a line begins to engage in active @@ -239,7 +239,7 @@ public class LineEvent extends EventObject { * @see #STOP * @see DataLine#start */ - public static final Type START = new Type("Start"); + public static final Type START = new Type("Start"); /** * A type of event that is sent when a line ceases active input or @@ -249,7 +249,7 @@ public class LineEvent extends EventObject { * @see #START * @see DataLine#stop */ - public static final Type STOP = new Type("Stop"); + public static final Type STOP = new Type("Stop"); /** * A type of event that is sent when a line ceases to engage in active diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/ReverbType.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/ReverbType.java index 20fb453e205..e1199dbe6c5 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/ReverbType.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/ReverbType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -69,12 +69,11 @@ package javax.sound.sampled; *

              * The following table shows what parameter values an implementation might use * for a representative set of reverberation settings. - *

              - * - * Reverberation Types and Parameters - * - * * + *
              + * + * * * * @@ -83,7 +82,8 @@ package javax.sound.sampled; * * * - * + * + * * * * @@ -128,7 +128,7 @@ package javax.sound.sampled; * * * - * + * *
              Reverb types and params: decay time, late intensity, late delay, + * early intensity, and early delay
              TypeDecay Time (ms)Early Intensity (dB)Early Delay(ms)
              Cavern2250-7.00.6
              * * @author Kara Kytle diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/SourceDataLine.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/SourceDataLine.java index 7749b3a86fc..b5e20f0702a 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/SourceDataLine.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/SourceDataLine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -159,9 +159,9 @@ public interface SourceDataLine extends DataLine { *

              * The number of bytes to write must represent an integral number of sample * frames, such that: - *
              - *

              {@code [ bytes written ] % [frame size in bytes ] == 0}
              - *
              + *

              + * {@code [ bytes written ] % [frame size in bytes ] == 0} + *

              * The return value will always meet this requirement. A request to write a * number of bytes representing a non-integral number of sample frames * cannot be fulfilled and may result in an diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/TargetDataLine.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/TargetDataLine.java index acacdbcccae..944c8e03d92 100644 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/TargetDataLine.java +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/TargetDataLine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -149,9 +149,9 @@ public interface TargetDataLine extends DataLine { *

              * The number of bytes to be read must represent an integral number of * sample frames, such that: - *
              - *

              {@code [ bytes read ] % [frame size in bytes ] == 0}
              - *
              + *

              + * {@code [ bytes read ] % [frame size in bytes ] == 0} + *

              * The return value will always meet this requirement. A request to read a * number of bytes representing a non-integral number of sample frames * cannot be fulfilled and may result in an IllegalArgumentException. diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/package-info.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/package-info.java new file mode 100644 index 00000000000..e298c19c9d0 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/package-info.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces and classes for capture, processing, and playback of + * sampled audio data. + * + *

              Related Documentation

              + * For more information on using Java Sound see: + * + * + * @since 1.3 + */ +package javax.sound.sampled; diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/package.html b/jdk/src/java.desktop/share/classes/javax/sound/sampled/package.html deleted file mode 100644 index f5c00c27767..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/package.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -Provides interfaces and classes for capture, processing, and playback of sampled audio data. - - - -

              Related Documentation

              - -For overviews, tutorials, examples, and guides, -please see: - - - -@since 1.3 - - diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package-info.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package-info.java new file mode 100644 index 00000000000..199bce22723 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package-info.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Supplies abstract classes for service providers to subclass when offering new + * audio devices, sound file readers and writers, or audio format converters. + * + *

              Related Documentation

              + * For more information on using Java Sound see: + * + * + * @since 1.3 + */ +package javax.sound.sampled.spi; diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package.html b/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package.html deleted file mode 100644 index 93db4a2a9e0..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -Supplies abstract classes for service providers to subclass when -offering new audio devices, sound file readers and writers, or audio format converters. - - -

              Related Documentation

              - -For overviews, tutorials, examples, and guides, -please see: - - - -@since 1.3 - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/Action.java b/jdk/src/java.desktop/share/classes/javax/swing/Action.java index 8a7ae6ea1db..05f8c667be3 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/Action.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/Action.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -69,7 +69,7 @@ import java.beans.*; * are desired, and use simple ActionListeners elsewhere. *
              * - *

              Swing Components Supporting Action

              + *

              Swing Components Supporting Action

              *

              * Many of Swing's components have an Action property. When * an Action is set on a component, the following things @@ -94,36 +94,39 @@ import java.beans.*; * Action that is null) results in the * button's corresponding property being set to null. * - * - * - * + *
              Component Property - * Components - * Action Key - * Notes - *
              + * + * + * + * + * + * * + * * + * * + * * + * * + * * + * * + * * + * * *
              Supported Action properties
              Component Property + * Components + * Action Key + * Notes + *
              enabled * All * The isEnabled method *   - *
              toolTipText * All * SHORT_DESCRIPTION *   - *
              actionCommand * All * ACTION_COMMAND_KEY *   - *
              mnemonic * All buttons * MNEMONIC_KEY * A null value or Action results in the * button's mnemonic property being set to * '\0'. - *
              text * All buttons * NAME @@ -139,7 +142,7 @@ import java.beans.*; * true if the Action has a * non-null value for LARGE_ICON_KEY or * SMALL_ICON. - *
              displayedMnemonicIndex * All buttons * DISPLAYED_MNEMONIC_INDEX_KEY @@ -150,7 +153,7 @@ import java.beans.*; * mnemonic index is not updated. In any subsequent changes to * DISPLAYED_MNEMONIC_INDEX_KEY, null * is treated as -1. - *
              icon * All buttons except of JCheckBox, * JToggleButton and JRadioButton. @@ -160,13 +163,13 @@ import java.beans.*; * SMALL_ICON. All other buttons will use * LARGE_ICON_KEY; if the value is null they * use SMALL_ICON. - *
              accelerator * All JMenuItem subclasses, with the exception of * JMenu. * ACCELERATOR_KEY *   - *
              selected * JToggleButton, JCheckBox, * JRadioButton, JCheckBoxMenuItem and @@ -191,6 +194,7 @@ import java.beans.*; * use the same {@code Action} that defines a value for the * {@code SELECTED_KEY} property with multiple mutually * exclusive buttons. + *
              *

              * JPopupMenu, JToolBar and JMenu @@ -384,8 +388,8 @@ public interface Action extends ActionListener { * @param sender the object to check, can be null * @return {@code true} if the action should be performed with the sender * object, must be false if the action is disabled. - * @see isEnabled - * @see setEnabled + * @see #isEnabled + * @see #setEnabled */ default boolean accept(Object sender) { return isEnabled(); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/ActionPropertyChangeListener.java b/jdk/src/java.desktop/share/classes/javax/swing/ActionPropertyChangeListener.java index 0d33a113091..1b97bb0a753 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/ActionPropertyChangeListener.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/ActionPropertyChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -45,7 +45,7 @@ import java.lang.ref.ReferenceQueue; * a strong reference will be held to the containing class, which in most * cases defeats the purpose of this class. * - * @param T the type of JComponent the underlying Action is attached to + * @param the type of JComponent the underlying Action is attached to * * @author Georges Saab * @see AbstractButton diff --git a/jdk/src/java.desktop/share/classes/javax/swing/Autoscroller.java b/jdk/src/java.desktop/share/classes/javax/swing/Autoscroller.java index 6def2376145..979c359e560 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/Autoscroller.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/Autoscroller.java @@ -82,6 +82,7 @@ class Autoscroller implements ActionListener { /** * Starts the timer targeting the passed in component. */ + @SuppressWarnings("deprecation") private void start(JComponent c, MouseEvent e) { Point screenLocation = c.getLocationOnScreen(); @@ -156,6 +157,7 @@ class Autoscroller implements ActionListener { * ActionListener method. Invoked when the Timer fires. This will scroll * if necessary. */ + @SuppressWarnings("deprecation") public void actionPerformed(ActionEvent x) { JComponent component = Autoscroller.component; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/BoxLayout.java b/jdk/src/java.desktop/share/classes/javax/swing/BoxLayout.java index ceaa943b97c..e0ed50f1679 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/BoxLayout.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/BoxLayout.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -36,9 +36,10 @@ import java.io.PrintStream; * vertically or horizontally. The components will not wrap so, for * example, a vertical arrangement of components will stay vertically * arranged when the frame is resized. - * + *
              + * * - *
              Example:
              + * *

              The following text describes this graphic. diff --git a/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java b/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java index ac8216af4a6..5bcf6efb407 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java @@ -239,6 +239,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable { /** * {@inheritDoc} */ + @SuppressWarnings("deprecation") public void setPressed(boolean b) { if((isPressed() == b) || !isEnabled()) { return; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java b/jdk/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java index 31bb7dd6596..3ac3755b82f 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,7 @@ import sun.swing.DefaultLookup; /** * Renders an item in a list. *

              - * Implementation Note: + * Implementation Note: * This class overrides * invalidate, * validate, diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java b/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java index cbaa3ef2845..3f824833c0d 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java @@ -1235,6 +1235,7 @@ implements ItemSelectable,ListDataListener,ActionListener, Accessible { * * @see EventListenerList */ + @SuppressWarnings("deprecation") protected void fireActionEvent() { if (!firingActionEvent) { // Set flag to ensure that an infinite loop is not created diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java index 02813cbcbf3..e832abb1d75 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java @@ -429,6 +429,7 @@ public abstract class JComponent extends Container implements Serializable, * Returns the Set of KeyStrokes to use if the component * is managing focus for forward focus traversal. */ + @SuppressWarnings("deprecation") static Set getManagingFocusForwardTraversalKeys() { synchronized(JComponent.class) { if (managingFocusForwardTraversalKeys == null) { @@ -445,6 +446,7 @@ public abstract class JComponent extends Container implements Serializable, * Returns the Set of KeyStrokes to use if the component * is managing focus for backward focus traversal. */ + @SuppressWarnings("deprecation") static Set getManagingFocusBackwardTraversalKeys() { synchronized(JComponent.class) { if (managingFocusBackwardTraversalKeys == null) { @@ -2886,6 +2888,7 @@ public abstract class JComponent extends Container implements Serializable, * * @since 1.3 */ + @SuppressWarnings("deprecation") protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) { InputMap map = getInputMap(condition, false); @@ -3730,7 +3733,11 @@ public abstract class JComponent extends Container implements Serializable, * Fire PropertyChange listener, if one is registered, * when focus events happen * @since 1.3 + * @deprecated This class is no longer used or needed. + * {@code java.awt.Component.AccessibleAWTComponent} provides + * the same functionality and it is handled in {@code Component}. */ + @Deprecated protected class AccessibleFocusHandler implements FocusListener { public void focusGained(FocusEvent event) { if (accessibleContext != null) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java b/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java index 9fdafb65e0a..f80c41f1f98 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java @@ -812,7 +812,7 @@ public class JEditorPane extends JTextComponent { /** * Scrolls the view to the given reference location - * (that is, the value returned by the UL.getRef + * (that is, the value returned by the URL.getRef * method for the URL being displayed). By default, this * method only knows how to locate a reference in an * HTMLDocument. The implementation calls the diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java b/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java index b37dd05050a..04a1e76aeee 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java @@ -1754,6 +1754,7 @@ public class JFileChooser extends JComponent implements Accessible { * the event * @see EventListenerList */ + @SuppressWarnings("deprecation") protected void fireActionPerformed(String command) { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java b/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java index b30f3a52f7f..41706345cd9 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -54,8 +54,15 @@ import javax.swing.text.*; * JFormattedTextField allows * configuring what action should be taken when focus is lost. The possible * configurations are: - * - * + * + *

              Value

              Description

              + * + * + * + * + * + * * *
              Possible JFormattedTextField configurations and their descriptions + *
              ValueDescription
              JFormattedTextField.REVERT * Revert the display to match that of getValue, * possibly losing the current edit. @@ -71,6 +78,7 @@ import javax.swing.text.*; *
              JFormattedTextField.PERSIST * Do nothing, don't obtain a new * AbstractFormatter, and don't update the value. + *
              * The default is JFormattedTextField.COMMIT_OR_REVERT, * refer to {@link #setFocusLostBehavior} for more information on this. diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java b/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java index 833b09e6e73..1eca7759098 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java @@ -286,8 +286,7 @@ public final class JLayer super.remove(oldGlassPane); } if (glassPane != null) { - AWTAccessor.getComponentAccessor().setMixingCutoutShape(glassPane, - new Rectangle()); + glassPane.setMixingCutoutShape(new Rectangle()); glassPane.setVisible(isGlassPaneVisible); super.addImpl(glassPane, null, 0); } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JLayeredPane.java b/jdk/src/java.desktop/share/classes/javax/swing/JLayeredPane.java index 6de8a0bd750..62da29d7303 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JLayeredPane.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JLayeredPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -47,9 +47,10 @@ import javax.accessibility.*; * How to Use a Layered Pane, * a section in The Java Tutorial. * - * + *
              + * * - * + *
              Example
              + * *

              The following text describes this image. diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JList.java b/jdk/src/java.desktop/share/classes/javax/swing/JList.java index 5e9866356a0..8471d7bd67e 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JList.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -145,7 +145,7 @@ import static sun.swing.SwingUtilities2.Section.*; * Responsibility for listening to selection changes in order to keep the list's * visual representation up to date lies with the list's {@code ListUI}. *

              - * + * * Painting of cells in a {@code JList} is handled by a delegate called a * cell renderer, installed on the list as the {@code cellRenderer} property. * The renderer provides a {@code java.awt.Component} that is used @@ -201,7 +201,7 @@ import static sun.swing.SwingUtilities2.Section.*; * To avoid these calculations, you can set a {@code fixedCellWidth} and * {@code fixedCellHeight} on the list, or have these values calculated * automatically based on a single prototype value: - * + * *

                * {@code
                * JList bigDataList = new JList(bigData);
              @@ -962,9 +962,13 @@ public class JList extends JComponent implements Scrollable, Accessible
                    * 

              * A description of these layouts follows: * - * - * + *

              Value

              Description

              + * + * + * + * + * *
              Describes layouts VERTICAL,HORIZONTAL_WRAP, and VERTICAL_WRAP + *
              ValueDescription
              VERTICAL * Cells are layed out vertically in a single column. *
              HORIZONTAL_WRAP @@ -978,7 +982,8 @@ public class JList extends JComponent implements Scrollable, Accessible * necessary. If the {@code visibleRowCount} property is less than * or equal to zero, wrapping is determined by the height of the * list; otherwise wrapping is done at {@code visibleRowCount} rows. - *
              + *

              *

              * The default value of this property is VERTICAL. * @@ -1516,6 +1521,7 @@ public class JList extends JComponent implements Scrollable, Accessible * @see JComponent#setToolTipText * @see JComponent#getToolTipText */ + @SuppressWarnings("deprecation") public String getToolTipText(MouseEvent event) { if(event != null) { Point p = event.getPoint(); @@ -3394,15 +3400,18 @@ public class JList extends JComponent implements Scrollable, Accessible } public AccessibleSelection getAccessibleSelection() { - return getCurrentAccessibleContext().getAccessibleSelection(); + AccessibleContext ac = getCurrentAccessibleContext(); + return ac != null ? ac.getAccessibleSelection() : null; } public AccessibleText getAccessibleText() { - return getCurrentAccessibleContext().getAccessibleText(); + AccessibleContext ac = getCurrentAccessibleContext(); + return ac != null ? ac.getAccessibleText() : null; } public AccessibleValue getAccessibleValue() { - return getCurrentAccessibleContext().getAccessibleValue(); + AccessibleContext ac = getCurrentAccessibleContext(); + return ac != null ? ac.getAccessibleValue() : null; } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java b/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java index cf80c9827a9..e449df3e65c 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java @@ -412,6 +412,7 @@ public class JMenuItem extends AbstractButton implements Accessible,MenuElement * @param path the MenuElement path array * @param manager the MenuSelectionManager */ + @SuppressWarnings("deprecation") public void processMouseEvent(MouseEvent e,MenuElement path[],MenuSelectionManager manager) { processMenuDragMouseEvent( new MenuDragMouseEvent(e.getComponent(), e.getID(), @@ -435,6 +436,7 @@ public class JMenuItem extends AbstractButton implements Accessible,MenuElement * @param path the MenuElement path array * @param manager the MenuSelectionManager */ + @SuppressWarnings("deprecation") public void processKeyEvent(KeyEvent e,MenuElement path[],MenuSelectionManager manager) { if (DEBUG) { System.out.println("in JMenuItem.processKeyEvent/3 for " + getText() + diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JOptionPane.java b/jdk/src/java.desktop/share/classes/javax/swing/JOptionPane.java index a61f1507253..653520be418 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JOptionPane.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JOptionPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -73,12 +73,15 @@ import sun.awt.AWTAccessor; * showXxxDialog methods shown below: *

              * - * - * + *
              + * + * * * * * + * + * * * * @@ -95,6 +98,7 @@ import sun.awt.AWTAccessor; * * * + * *
              Common JOptionPane method names and their descriptions
              Method NameDescription
              showConfirmDialogAsks a confirming question, like yes/no/cancel.showOptionDialogThe Grand Unification of the above three.
              * *
              @@ -107,7 +111,8 @@ import sun.awt.AWTAccessor; * All dialogs are modal. Each showXxxDialog method blocks * the caller until the user's interaction is complete. * - * + *
              + * * * * @@ -121,7 +126,7 @@ import sun.awt.AWTAccessor; *
              Common dialog
              iconmessage
              * * The basic appearance of one of these dialog boxes is generally - * similar to the picture at the right, although the various + * similar to the picture above, although the various * look-and-feels are * ultimately responsible for the final result. In particular, the * look-and-feels will adjust the layout to accommodate the option pane's @@ -143,7 +148,7 @@ import sun.awt.AWTAccessor; * in which case a default Frame is used as the parent, * and the dialog will be * centered on the screen (depending on the {@literal L&F}). - *
              message
              + *
              message
              * A descriptive message to be placed in the dialog box. * In the most common usage, message is just a String or * String constant. diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java b/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java index f225b2d44ee..e793d76b399 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java @@ -1385,6 +1385,7 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement { * @param path the MenuElement path array * @param manager the MenuSelectionManager */ + @SuppressWarnings("deprecation") public void processKeyEvent(KeyEvent e, MenuElement path[], MenuSelectionManager manager) { MenuKeyEvent mke = new MenuKeyEvent(e.getComponent(), e.getID(), diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java b/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java index 3228af034da..3e9ffc72f46 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -70,9 +70,11 @@ import sun.security.action.GetBooleanAction; * can be used to obtain the JRootPane that contains * a given component. * - * + * + *
              + * * - * @@ -541,8 +543,10 @@ public class JRootPane extends JComponent implements Accessible { layeredPane.remove(menuBar); menuBar = menu; - if(menuBar != null) + if(menuBar != null) { + menuBar.updateUI(); layeredPane.add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER); + } } /** @@ -663,8 +667,7 @@ public class JRootPane extends JComponent implements Accessible { throw new NullPointerException("glassPane cannot be set to null."); } - AWTAccessor.getComponentAccessor().setMixingCutoutShape(glass, - new Rectangle()); + glass.setMixingCutoutShape(new Rectangle()); boolean visible = false; if (glassPane != null && glassPane.getParent() == this) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JScrollPane.java b/jdk/src/java.desktop/share/classes/javax/swing/JScrollPane.java index a51509baec3..53b0a36e126 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JScrollPane.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JScrollPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -55,9 +55,10 @@ import java.beans.Transient; * a section in The Java Tutorial. Note that * JScrollPane does not support heavyweight components. * - *
              Example
              + * * The following text describes this graphic. *
              + *
              + * * - *
              Example
              + * *

              The following text describes this image. diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JSpinner.java b/jdk/src/java.desktop/share/classes/javax/swing/JSpinner.java index b9a26cf4b40..7356bacf4bc 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JSpinner.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JSpinner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -1202,7 +1202,7 @@ public class JSpinner extends JComponent implements Accessible * on the new JFormattedTextField. * * @param spinner the spinner whose model this editor will monitor - * @param decimalFormatPattern the initial pattern for the + * @param format the initial pattern for the * DecimalFormat object that's used to display * and parse the value of the text field. * @exception IllegalArgumentException if the spinners model is not diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java b/jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java index 184ca2c2d0b..b6d50b4ade4 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java @@ -1900,7 +1900,7 @@ public class JTabbedPane extends JComponent * Returns the accessible name of this object, or {@code null} if * there is no accessible name. * - * @return the accessible name of this object, nor {@code null}. + * @return the accessible name of this object, or {@code null}. * @since 1.6 */ public String getAccessibleName() { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java b/jdk/src/java.desktop/share/classes/javax/swing/JTable.java index 94391d6e46b..e698994adf2 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JTable.java @@ -3410,8 +3410,10 @@ public class JTable extends JComponent implements TableModelListener, Scrollable // Convert the event to the renderer's coordinate system Rectangle cellRect = getCellRect(hitRowIndex, hitColumnIndex, false); p.translate(-cellRect.x, -cellRect.y); + @SuppressWarnings("deprecation") + final int modifiers = event.getModifiers(); MouseEvent newEvent = new MouseEvent(component, event.getID(), - event.getWhen(), event.getModifiers(), + event.getWhen(), modifiers, p.x, p.y, event.getXOnScreen(), event.getYOnScreen(), diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java b/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java index d3ec0dad46b..b8e3ffe0671 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java @@ -485,6 +485,7 @@ public class JTextField extends JTextComponent implements SwingConstants { * first order. * @see EventListenerList */ + @SuppressWarnings("deprecation") protected void fireActionPerformed() { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java b/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java index 56de72a03fb..b66465d1bd9 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java @@ -372,6 +372,7 @@ public class JToggleButton extends AbstractButton implements Accessible { /** * Sets the pressed state of the toggle button. */ + @SuppressWarnings("deprecation") public void setPressed(boolean b) { if ((isPressed() == b) || !isEnabled()) { return; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JTree.java b/jdk/src/java.desktop/share/classes/javax/swing/JTree.java index 7739b9bcd3e..0dfcaebf0db 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JTree.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -44,7 +44,7 @@ import sun.swing.SwingUtilities2.Section; import static sun.swing.SwingUtilities2.Section.*; /** - * + * * A control that displays a set of hierarchical data as an outline. * You can find task-oriented documentation and examples of using trees in * How to Use Trees, @@ -1568,9 +1568,10 @@ public class JTree extends JComponent implements Scrollable, Accessible Rectangle pathBounds = getPathBounds(path); p.translate(-pathBounds.x, -pathBounds.y); + @SuppressWarnings("deprecation") + final int modifiers = event.getModifiers(); newEvent = new MouseEvent(rComponent, event.getID(), - event.getWhen(), - event.getModifiers(), + event.getWhen(), modifiers, p.x, p.y, event.getXOnScreen(), event.getYOnScreen(), diff --git a/jdk/src/java.desktop/share/classes/javax/swing/KeyboardManager.java b/jdk/src/java.desktop/share/classes/javax/swing/KeyboardManager.java index e083576d819..40cd7aebe4d 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/KeyboardManager.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/KeyboardManager.java @@ -207,6 +207,7 @@ class KeyboardManager { * want a crack at the event. * If one of them wants it, then it will "DO-THE-RIGHT-THING" */ + @SuppressWarnings("deprecation") public boolean fireKeyboardAction(KeyEvent e, boolean pressed, Container topAncestor) { if (e.isConsumed()) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/LookAndFeel.java b/jdk/src/java.desktop/share/classes/javax/swing/LookAndFeel.java index bd8ea835b6c..0356defe226 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/LookAndFeel.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/LookAndFeel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -91,7 +91,7 @@ import java.util.StringTokenizer; * to provide a specific set of defaults. These are documented in the * classes that require the specific default. * - *

              ComponentUIs and defaults

              + *

              ComponentUIs and defaults

              * * All {@code ComponentUIs} typically need to set various properties * on the {@code JComponent} the {@code ComponentUI} is providing the @@ -121,7 +121,7 @@ import java.util.StringTokenizer; * provided by this class as they handle the necessary checking and install * the property using the recommended guidelines. * - *

              Exceptions

              + *

              Exceptions

              * * All of the install methods provided by {@code LookAndFeel} need to * access the defaults if the value of the property being changed is diff --git a/jdk/src/java.desktop/share/classes/javax/swing/MenuSelectionManager.java b/jdk/src/java.desktop/share/classes/javax/swing/MenuSelectionManager.java index 6df0d6701a1..bb9c66464f3 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/MenuSelectionManager.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/MenuSelectionManager.java @@ -212,6 +212,7 @@ public class MenuSelectionManager { * * @param event a MouseEvent object */ + @SuppressWarnings("deprecation") public void processMouseEvent(MouseEvent event) { int screenX,screenY; Point p; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/SizeSequence.java b/jdk/src/java.desktop/share/classes/javax/swing/SizeSequence.java index 131032d8491..24b4c845994 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/SizeSequence.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/SizeSequence.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -53,11 +53,10 @@ package javax.swing; * The following figure shows the relationship between size and position data * for a multi-column component. * - *
              + *

              * The first item begins at position 0, the second at the position equal
  to the size of the previous item, and so on. - *

              *

              * In the figure, the first index (0) corresponds to the first column, * the second index (1) to the second column, and so on. diff --git a/jdk/src/java.desktop/share/classes/javax/swing/SwingUtilities.java b/jdk/src/java.desktop/share/classes/javax/swing/SwingUtilities.java index abd6b055887..3f72d64c73f 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/SwingUtilities.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/SwingUtilities.java @@ -346,6 +346,7 @@ public class SwingUtilities implements SwingConstants * * @return the new mouse event */ + @SuppressWarnings("deprecation") public static MouseEvent convertMouseEvent(Component source, MouseEvent sourceEvent, Component destination) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java b/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java index 40da1c24a02..26a122cd513 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -575,7 +575,7 @@ public abstract class SwingWorker implements RunnableFuture { * For example: * *

              -     * class SwingWorkerCompletionWaiter extends PropertyChangeListener {
              +     * class SwingWorkerCompletionWaiter implements PropertyChangeListener {
                    *     private JDialog dialog;
                    *
                    *     public SwingWorkerCompletionWaiter(JDialog dialog) {
              diff --git a/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java b/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java
              index c645d936b11..a751ad8e99a 100644
              --- a/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java
              +++ b/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java
              @@ -89,6 +89,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
                    */
                   protected boolean heavyWeightPopupEnabled = false;
               
              +    @SuppressWarnings("deprecation")
                   ToolTipManager() {
                       enterTimer = new Timer(750, new insideTimerAction());
                       enterTimer.setRepeats(false);
              diff --git a/jdk/src/java.desktop/share/classes/javax/swing/border/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/border/package-info.java
              new file mode 100644
              index 00000000000..a964f6d7ceb
              --- /dev/null
              +++ b/jdk/src/java.desktop/share/classes/javax/swing/border/package-info.java
              @@ -0,0 +1,53 @@
              +/*
              + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
              + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
              + *
              + * This code is free software; you can redistribute it and/or modify it
              + * under the terms of the GNU General Public License version 2 only, as
              + * published by the Free Software Foundation.  Oracle designates this
              + * particular file as subject to the "Classpath" exception as provided
              + * by Oracle in the LICENSE file that accompanied this code.
              + *
              + * This code is distributed in the hope that it will be useful, but WITHOUT
              + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
              + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
              + * version 2 for more details (a copy is included in the LICENSE file that
              + * accompanied this code).
              + *
              + * You should have received a copy of the GNU General Public License version
              + * 2 along with this work; if not, write to the Free Software Foundation,
              + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
              + *
              + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
              + * or visit www.oracle.com if you need additional information or have any
              + * questions.
              + */
              +
              +/**
              + * Provides classes and interface for drawing specialized borders around a Swing
              + * component. You can subclass these classes to create customized borders for
              + * your components instead of using the default borders provided by the
              + * look-and-feel being used.
              + * 

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *

              Related Documentation

              + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + * + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.border; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/border/package.html b/jdk/src/java.desktop/share/classes/javax/swing/border/package.html deleted file mode 100644 index b83b1deaf55..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/border/package.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - -Provides classes and interface for drawing -specialized borders around a Swing component. -You can subclass these classes to create customized borders -for your components instead of using the default borders -provided by the look-and-feel being used. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - - -

              Related Documentation

              - -For overviews, tutorials, examples, guides, and tool documentation, please see: - - - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/colorchooser/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/colorchooser/package-info.java new file mode 100644 index 00000000000..091e99c0721 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/colorchooser/package-info.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Contains classes and interfaces used by the {@code JColorChooser} component. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *

              Related Documentation

              + * This document forms the complete API specification. For overviews, tutorials, + * examples, guides, and tool documentation, please see: + *
                + *
              • How to Use Color Choosers, + * a section in The Java Tutorial
              • + *
              • {@extLink i18n_overview Internationalization Overview}
              • + *
              • {@extLink imf_overview Input Method Framework Overview}
              • + *
              + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.colorchooser; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/colorchooser/package.html b/jdk/src/java.desktop/share/classes/javax/swing/colorchooser/package.html deleted file mode 100644 index 43ff5ee8739..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/colorchooser/package.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - -Contains classes and interfaces used by the JColorChooser -component. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - - -

              Related Documentation

              - -This document forms the complete API specification. For overviews, tutorials, -examples, guides, and tool documentation, please see: - - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/event/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/event/package-info.java new file mode 100644 index 00000000000..33dca2dd10a --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/event/package-info.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides for events fired by Swing components. It contains event classes and + * corresponding event listener interfaces for events fired by Swing components + * in addition to those events in the {@link java.awt.event} package. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *

              Related Documentation

              + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + * + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.event; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/event/package.html b/jdk/src/java.desktop/share/classes/javax/swing/event/package.html deleted file mode 100644 index 070ae428a9b..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/event/package.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -Provides for events fired by Swing components. It contains -event classes and corresponding event listener interfaces for events -fired by Swing components in addition to those events in the -java.awt.event package. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -

              Related Documentation

              - -For overviews, tutorials, examples, guides, and tool documentation, please see: - - - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/filechooser/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/filechooser/package-info.java new file mode 100644 index 00000000000..14823199f0b --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/filechooser/package-info.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Contains classes and interfaces used by the {@code JFileChooser} component. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *

              Related Documentation

              + * This document forms the complete API specification. For overviews, tutorials, + * examples, guides, and tool documentation, please see: + *
                + *
              • How to Use File Choosers, + * a section in The Java Tutorial
              • + *
              • {@extLink i18n_overview Internationalization Overview}
              • + *
              • {@extLink imf_overview Input Method Framework Overview}
              • + *
              + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.filechooser; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/filechooser/package.html b/jdk/src/java.desktop/share/classes/javax/swing/filechooser/package.html deleted file mode 100644 index fa06236262c..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/filechooser/package.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - -Contains classes and interfaces used by the JFileChooser component. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - - -

              Related Documentation

              - -This document forms the complete API specification. For overviews, tutorials, -examples, guides, and tool documentation, please see: - - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/package-info.java new file mode 100644 index 00000000000..0749cf7e7ef --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/package-info.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides a set of "lightweight" (all-Java language) components + * that, to the maximum degree possible, work the same on all platforms. For a + * programmer's guide to using these components, see + * Creating a GUI with JFC/Swing, a trail in + * The Java Tutorial. For other resources, see + * Related Documentation. + * + *

              Swing's Threading Policy

              + * In general Swing is not thread safe. All Swing components and related + * classes, unless otherwise documented, must be accessed on the event + * dispatching thread. + *

              + * Typical Swing applications do processing in response to an event generated + * from a user gesture. For example, clicking on a {@code JButton} notifies all + * {@code ActionListeners} added to the {@code JButton}. As all events generated + * from a user gesture are dispatched on the event dispatching thread, most + * developers are not impacted by the restriction. + *

              + * Where the impact lies, however, is in constructing and showing a Swing + * application. Calls to an application's {@code main} method, or methods in + * {@code Applet}, are not invoked on the event dispatching thread. As such, + * care must be taken to transfer control to the event dispatching thread when + * constructing and showing an application or applet. The preferred way to + * transfer control and begin working with Swing is to use {@code invokeLater}. + * The {@code invokeLater} method schedules a {@code Runnable} to be processed + * on the event dispatching thread. The following two examples work equally well + * for transferring control and starting up a Swing application: + *

              + * import javax.swing.SwingUtilities;
              + *
              + * public class MyApp implements Runnable {
              + *     public void run() {
              + *         // Invoked on the event dispatching thread.
              + *         // Construct and show GUI.
              + *     }
              + *
              + *     public static void main(String[] args) {
              + *         SwingUtilities.invokeLater(new MyApp());
              + *     }
              + * }
              + * Or:
              + * import javax.swing.SwingUtilities;
              + *
              + * public class MyApp {
              + *     MyApp(String[] args) {
              + *         // Invoked on the event dispatching thread.
              + *         // Do any initialization here.
              + *     }
              + *
              + *     public void show() {
              + *         // Show the UI.
              + *     }
              + *
              + *     public static void main(final String[] args) {
              + *         // Schedule a job for the event-dispatching thread:
              + *         // creating and showing this application's GUI.
              + *         SwingUtilities.invokeLater(new Runnable() {
              + *             public void run() {
              + *                 new MyApp(args).show();
              + *             }
              + *         });
              + *     }
              + * }
              + * This restriction also applies to models attached to Swing components. For + * example, if a {@code TableModel} is attached to a {@code JTable}, the + * {@code TableModel} should only be modified on the event dispatching thread. + * If you modify the model on a separate thread you run the risk of exceptions + * and possible display corruption. + *

              + * As all events are delivered on the event dispatching thread, care must be + * taken in event processing. In particular, a long running task, such as + * network io or computational intensive processing, executed on the event + * dispatching thread blocks the event dispatching thread from dispatching any + * other events. While the event dispatching thread is blocked the application + * is completely unresponsive to user input. Refer to + * {@link javax.swing.SwingWorker} for the preferred way to do such processing + * when working with Swing. + *

              + * More information on this topic can be found in the + * Swing tutorial, + * in particular the section on + * + * Concurrency in Swing. + * + *

              Related Documentation

              + * For overviews, tutorials, examples, guides, and other documentation, + * please see: + * + * + * @serial exclude + */ +package javax.swing; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/package.html b/jdk/src/java.desktop/share/classes/javax/swing/package.html deleted file mode 100644 index 934bb9025da..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/package.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - swing package - - - - -

              Provides a set of "lightweight" -(all-Java language) components that, -to the maximum degree possible, work the same on all platforms. -For a programmer's guide to using these components, see -Creating -a GUI with JFC/Swing, a trail in The Java Tutorial. -For other resources, see -Related Documentation. - -

              Swing's Threading Policy

              - -In general Swing is not thread safe. All Swing components and related -classes, unless otherwise documented, must be accessed on the event -dispatching thread. -

              -Typical Swing applications do processing in response to an event -generated from a user gesture. For example, clicking on a {@code -JButton} notifies all {@code ActionListeners} added to the {@code -JButton}. As all events generated from a user gesture are -dispatched on the event dispatching thread, most developers are not -impacted by the restriction. -

              -Where the impact lies, however, is in constructing and showing a -Swing application. Calls to an application's {@code main} method, -or methods in {@code Applet}, are not invoked on the event -dispatching thread. As such, care must be taken to transfer control -to the event dispatching thread when constructing and showing an -application or applet. The preferred way to transfer control and begin -working with Swing is to use {@code invokeLater}. The {@code -invokeLater} method schedules a {@code Runnable} to be processed on -the event dispatching thread. The following two examples work equally -well for transferring control and starting up a Swing application: -

              -import javax.swing.SwingUtilities;
              -
              -public class MyApp implements Runnable {
              -    public void run() {
              -        // Invoked on the event dispatching thread.
              -        // Construct and show GUI.
              -    }
              -
              -    public static void main(String[] args) {
              -        SwingUtilities.invokeLater(new MyApp());
              -    }
              -}
              -
              -Or: -
              -import javax.swing.SwingUtilities;
              -
              -public class MyApp {
              -    MyApp(String[] args) {
              -        // Invoked on the event dispatching thread.
              -        // Do any initialization here.
              -    }
              -
              -    public void show() {
              -        // Show the UI.
              -    }
              -
              -    public static void main(final String[] args) {
              -        // Schedule a job for the event-dispatching thread:
              -        // creating and showing this application's GUI.
              -        SwingUtilities.invokeLater(new Runnable() {
              -            public void run() {
              -                new MyApp(args).show();
              -            }
              -        });
              -    }
              -}
              -
              -This restriction also applies to models attached to Swing components. -For example, if a {@code TableModel} is attached to a {@code -JTable}, the {@code TableModel} should only be modified on the -event dispatching thread. If you modify the model on a separate -thread you run the risk of exceptions and possible display -corruption. -

              -As all events are delivered on the event dispatching thread, care must -be taken in event processing. In particular, a long running task, such -as network io or computational intensive processing, executed on the -event dispatching thread blocks the event dispatching thread from -dispatching any other events. While the event dispatching thread is -blocked the application is completely unresponsive to user -input. Refer to {@link javax.swing.SwingWorker} for the preferred way to do such -processing when working with Swing. -

              -More information on this topic can be found in the -Swing tutorial, -in particular the section on -Concurrency in Swing. - - -

              -Related Documentation -

              -

              For overviews, tutorials, examples, guides, and other documentation, please see: - -

              - -@serial exclude - - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java index b7f2ff6207b..403fe6abfdb 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java @@ -1839,6 +1839,7 @@ public class BasicComboBoxUI extends ComboBoxUI { // key. If it finds a key event that wasn't a navigation key it // dispatches it to JComboBox.selectWithKeyChar() so that it can do // type-ahead. + @SuppressWarnings("deprecation") public void keyPressed( KeyEvent e ) { if ( isNavigationKey(e.getKeyCode(), e.getModifiers()) ) { lastTime = 0L; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java index f2b72e006b8..91afce1d5f3 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java @@ -528,6 +528,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup { */ protected JList createList() { return new JList( comboBox.getModel() ) { + @SuppressWarnings("deprecation") public void processMouseEvent(MouseEvent e) { if (BasicGraphicsUtils.isMenuShortcutKeyDown(e)) { // Fix for 4234053. Filter out the Control Key from the list. @@ -1238,6 +1239,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup { protected MouseEvent convertMouseEvent( MouseEvent e ) { Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(), e.getPoint(), list ); + @SuppressWarnings("deprecation") MouseEvent newEvent = new MouseEvent( (Component)e.getSource(), e.getID(), e.getWhen(), diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java index 2760b1dcfd2..4122573a7d2 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java @@ -382,6 +382,7 @@ public class BasicGraphicsUtils return c.getComponentOrientation().isLeftToRight(); } + @SuppressWarnings("deprecation") static boolean isMenuShortcutKeyDown(InputEvent event) { return (event.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java index dbcfb308b7c..86d6686e41a 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java @@ -1024,7 +1024,7 @@ public class BasicInternalFrameUI extends InternalFrameUI return; } } - + @SuppressWarnings("deprecation") public void mouseDragged(MouseEvent e) { if ( startingBounds == null ) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java index 39585e86db8..2e43229aee8 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -583,8 +583,14 @@ public class BasicListUI extends ListUI /** * The preferredSize of the list depends upon the layout orientation. - * + * + *
              + * + * * + * + * * * *
              Describes the preferred size for each layout orientation + *
              Layout OrientationPreferred Size
              JList.VERTICAL * The preferredSize of the list is total height of the rows @@ -626,6 +632,7 @@ public class BasicListUI extends ListUI * Max cell height is either the fixed * cell height, or is determined by iterating through all the cells * to find the maximum height from the ListCellRenderer. + *
              * The above specifies the raw preferred width and height. The resulting * preferred width is the above width + insets.left + insets.right and diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java index e797c937d33..44d062bf3a5 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java @@ -1026,6 +1026,7 @@ public class BasicMenuItemUI extends MenuItemUI manager.processMouseEvent(e); } } + @SuppressWarnings("deprecation") public void mouseEntered(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); int modifiers = e.getModifiers(); @@ -1037,6 +1038,7 @@ public class BasicMenuItemUI extends MenuItemUI manager.setSelectedPath(getPath()); } } + @SuppressWarnings("deprecation") public void mouseExited(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java index 98afcc95679..01a38ce8804 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java @@ -123,6 +123,7 @@ public class BasicMenuUI extends BasicMenuItemUI getPropertyPrefix() + ".actionMap"); } + @SuppressWarnings("deprecation") void updateMnemonicBinding() { int mnemonic = menuItem.getModel().getMnemonic(); int[] shortcutKeys = (int[])DefaultLookup.get(menuItem, this, diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java index 737d4d0d2b2..d98a5c703c8 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java @@ -268,6 +268,7 @@ public class BasicPopupMenuUI extends PopupMenuUI { return list; } + @SuppressWarnings("deprecation") public boolean isPopupTrigger(MouseEvent e) { return ((e.getID()==MouseEvent.MOUSE_RELEASED) && ((e.getModifiers() & MouseEvent.BUTTON3_MASK)!=0)); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java index 5b0c9612486..79a41312374 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java @@ -328,6 +328,7 @@ public class BasicSplitPaneUI extends SplitPaneUI /** * Installs the UI defaults. */ + @SuppressWarnings("deprecation") protected void installDefaults(){ LookAndFeel.installBorder(splitPane, "SplitPane.border"); LookAndFeel.installColors(splitPane, "SplitPane.background", diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java index b80d7efa54a..a7985bd87a6 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java @@ -868,6 +868,7 @@ public class BasicTableUI extends TableUI public void keyReleased(KeyEvent e) { } + @SuppressWarnings("deprecation") public void keyTyped(KeyEvent e) { KeyStroke keyStroke = KeyStroke.getKeyStroke(e.getKeyChar(), e.getModifiers()); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java index 8acc5d7298e..42fc80b49a7 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -525,7 +525,7 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory { * adding 'TAB' and 'SHIFT-TAB' to traversalKeysSet in case * editor is non editable */ - + @SuppressWarnings("deprecation") void updateFocusTraversalKeys() { /* * Fix for 4514331 Non-editable JTextArea and similar @@ -1283,14 +1283,13 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory { * text component (i.e. the root of the hierarchy) that * can be traversed to determine how the model is being * represented spatially. - *

              - * NOTE:The View hierarchy can + *

              + * NOTE:The View hierarchy can * be traversed from the root view, and other things * can be done as well. Things done in this way cannot * be protected like simple method calls through the TextUI. * Therefore, proper operation in the presence of concurrency * must be arranged by any logic that calls this method! - * * * @param tc the text component for which this UI is installed * @return the view @@ -1783,7 +1782,7 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory { * * @param axis may be either X_AXIS or Y_AXIS * @param len specifies where a break is desired in the span - * @param the current allocation of the view + * @param a the current allocation of the view * @return the fragment of the view that represents the given span * if the view can be broken, otherwise null */ diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/LazyActionMap.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/LazyActionMap.java index d4e38541e25..3187cdd1a52 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/LazyActionMap.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/LazyActionMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, 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 @@ -73,7 +73,6 @@ class LazyActionMap extends ActionMapUIResource { *

              * This should be used if the ActionMap can be shared. * - * @param c JComponent to install the ActionMap on. * @param loaderClass Class object that gets loadActionMap invoked * on. * @param defaultsKey Key to use to defaults table to check for diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/package-info.java new file mode 100644 index 00000000000..552be4dcd96 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/package-info.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides user interface objects built according to the Basic look and feel. + * The Basic look and feel provides default behavior used by many look and feel + * packages. It contains components, layout managers, events, event listeners, + * and adapters. You can subclass the classes in this package to create your own + * customized look and feel. + *

              + * These classes are designed to be used while the corresponding + * {@code LookAndFeel} class has been installed + * (UIManager.setLookAndFeel(new XXXLookAndFeel())). + * Using them while a different {@code LookAndFeel} is installed may produce + * unexpected results, including exceptions. Additionally, changing the + * {@code LookAndFeel} maintained by the {@code UIManager} without updating the + * corresponding {@code ComponentUI} of any {@code JComponent}s may also produce + * unexpected results, such as the wrong colors showing up, and is generally not + * encouraged. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.plaf.basic; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/package.html deleted file mode 100644 index 347fc7cf9c8..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/package.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - -Provides user interface objects built according to the -Basic look and feel. The Basic look and feel provides default -behavior used by many look and feel packages. -It contains components, layout managers, -events, event listeners, and adapters. -You can subclass the classes in -this package to create your own customized look and feel. - -

              These classes are designed to be used while the -corresponding LookAndFeel class has been -installed -(UIManager.setLookAndFeel(new XXXLookAndFeel())). -Using them while a different LookAndFeel is installed -may produce unexpected results, including exceptions. -Additionally, changing the LookAndFeel -maintained by the UIManager without updating the -corresponding ComponentUI of any -JComponents may also produce unexpected results, -such as the wrong colors showing up, and is generally not -encouraged. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java index dae37d5e7be..0ded39cc52b 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,7 +42,7 @@ import sun.swing.SwingUtilities2; * All colors returned by {@code DefaultMetalTheme} are completely * opaque. * - *

              Font Style

              + *

              Font Style

              * * {@code DefaultMetalTheme} uses bold fonts for many controls. To make all * controls (with the exception of the internal frame title bars and diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFontDesktopProperty.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFontDesktopProperty.java index 94d591aeb8b..254325e0297 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFontDesktopProperty.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFontDesktopProperty.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -65,8 +65,6 @@ class MetalFontDesktopProperty extends com.sun.java.swing.plaf.windows.DesktopPr * Creates a MetalFontDesktopProperty. * * @param key Key used in looking up desktop value. - * @param toolkit Toolkit used to fetch property from, can be null - * in which default will be used. * @param type Type of font being used, corresponds to MetalTheme font * type. */ diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalIconFactory.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalIconFactory.java index b7cf9644fbe..b433ef1d059 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalIconFactory.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalIconFactory.java @@ -33,6 +33,8 @@ import java.io.Serializable; import java.util.Enumeration; import java.util.Vector; import sun.swing.CachedPainter; +import static sun.swing.SwingUtilities2.setAntialiasingHintForScaledGraphics; +import static sun.swing.SwingUtilities2.getAndSetAntialisingHintForScaledGraphics; /** * Factory object that vends Icons for @@ -1247,9 +1249,15 @@ public class MetalIconFactory implements Serializable { protected void drawCheck(Component c, Graphics g, int x, int y) { int controlSize = getControlSize(); - g.fillRect( x+3, y+5, 2, controlSize-8 ); - g.drawLine( x+(controlSize-4), y+3, x+5, y+(controlSize-6) ); - g.drawLine( x+(controlSize-4), y+4, x+5, y+(controlSize-5) ); + int csx = controlSize - 3; + int csy1 = controlSize - 6; + int csy2 = controlSize - 4; + int csy3 = controlSize - 3; + int[] xPoints = {3, 5, 5, csx, csx, 5, 5, 3}; + int[] yPoints = {5, 5, csy1, 2, 4, csy2, csy3, csy3}; + g.translate(x, y); + g.fillPolygon(xPoints, yPoints, 8); + g.translate(-x, -y); } public int getIconWidth() { @@ -1323,8 +1331,12 @@ public class MetalIconFactory implements Serializable { } public void paintIcon(Component c, Graphics g, int x, int y) { + + Object aaHint = getAndSetAntialisingHintForScaledGraphics(g); + if (MetalLookAndFeel.usingOcean()) { paintOceanIcon(c, g, x, y); + setAntialiasingHintForScaledGraphics(g, aaHint); return; } JRadioButton rb = (JRadioButton)c; @@ -1358,51 +1370,25 @@ public class MetalIconFactory implements Serializable { // draw Dark Circle (start at top, go clockwise) g.setColor(darkCircle); - g.drawLine( 4, 0, 7, 0); - g.drawLine( 8, 1, 9, 1); - g.drawLine(10, 2, 10, 3); - g.drawLine(11, 4, 11, 7); - g.drawLine(10, 8, 10, 9); - g.drawLine( 9,10, 8,10); - g.drawLine( 7,11, 4,11); - g.drawLine( 3,10, 2,10); - g.drawLine( 1, 9, 1, 8); - g.drawLine( 0, 7, 0, 4); - g.drawLine( 1, 3, 1, 2); - g.drawLine( 2, 1, 3, 1); + g.drawOval(0, 0, 11, 11); // draw Inner Left (usually) White Arc // start at lower left corner, go clockwise g.setColor(whiteInnerLeftArc); - g.drawLine( 2, 9, 2, 8); - g.drawLine( 1, 7, 1, 4); - g.drawLine( 2, 2, 2, 3); - g.drawLine( 2, 2, 3, 2); - g.drawLine( 4, 1, 7, 1); - g.drawLine( 8, 2, 9, 2); + g.drawArc(1, 1, 10, 10, 60, 160); // draw Outer Right White Arc // start at upper right corner, go clockwise g.setColor(whiteOuterRightArc); - g.drawLine(10, 1, 10, 1); - g.drawLine(11, 2, 11, 3); - g.drawLine(12, 4, 12, 7); - g.drawLine(11, 8, 11, 9); - g.drawLine(10,10, 10,10); - g.drawLine( 9,11, 8,11); - g.drawLine( 7,12, 4,12); - g.drawLine( 3,11, 2,11); + g.drawArc(-1, -1, 13, 13, 235, 180); // selected dot if ( drawDot ) { g.setColor(dotColor); - g.fillRect( 4, 4, 4, 4); - g.drawLine( 4, 3, 7, 3); - g.drawLine( 8, 4, 8, 7); - g.drawLine( 7, 8, 4, 8); - g.drawLine( 3, 7, 3, 4); + g.fillOval(2, 2, 7, 7); } g.translate(-x, -y); + setAntialiasingHintForScaledGraphics(g, aaHint); } public int getIconWidth() { @@ -2051,16 +2037,17 @@ public class MetalIconFactory implements Serializable { g.setColor( b.getForeground() ); } } - if( MetalUtils.isLeftToRight(b) ) { - g.drawLine( 0, 0, 0, 7 ); - g.drawLine( 1, 1, 1, 6 ); - g.drawLine( 2, 2, 2, 5 ); - g.drawLine( 3, 3, 3, 4 ); + if (MetalUtils.isLeftToRight(b)) { + int[] xPoints = {0, 3, 3, 0}; + int[] yPoints = {0, 3, 4, 7}; + g.fillPolygon(xPoints, yPoints, 4); + g.drawPolygon(xPoints, yPoints, 4); + } else { - g.drawLine( 4, 0, 4, 7 ); - g.drawLine( 3, 1, 3, 6 ); - g.drawLine( 2, 2, 2, 5 ); - g.drawLine( 1, 3, 1, 4 ); + int[] xPoints = {4, 4, 1, 1}; + int[] yPoints = {0, 7, 4, 3}; + g.fillPolygon(xPoints, yPoints, 4); + g.drawPolygon(xPoints, yPoints, 4); } g.translate( -x, -y ); @@ -2138,10 +2125,7 @@ public class MetalIconFactory implements Serializable { g.setColor( MetalLookAndFeel.getMenuDisabledForeground()); } - g.drawLine( 2, 2, 2, 6 ); - g.drawLine( 3, 2, 3, 6 ); - g.drawLine( 4, 4, 8, 0 ); - g.drawLine( 4, 5, 9, 0 ); + drawCheck(g); } g.translate( -x, -y ); } @@ -2217,15 +2201,18 @@ public class MetalIconFactory implements Serializable { g.setColor( MetalLookAndFeel.getMenuDisabledForeground() ); } - g.drawLine( 2, 2, 2, 6 ); - g.drawLine( 3, 2, 3, 6 ); - g.drawLine( 4, 4, 8, 0 ); - g.drawLine( 4, 5, 9, 0 ); + drawCheck(g); } g.translate( -x, -y ); } + private void drawCheck(Graphics g) { + int[] xPoints = {2, 3, 3, 8, 9, 3, 2}; + int[] yPoints = {2, 2, 5, 0, 0, 6, 6}; + g.drawPolygon(xPoints, yPoints, 7); + } + public int getIconWidth() { return menuCheckIconSize.width; } public int getIconHeight() { return menuCheckIconSize.height; } @@ -2252,9 +2239,8 @@ public class MetalIconFactory implements Serializable { else { g.setColor(MetalLookAndFeel.getControlHighlight()); } - g.drawLine( 2, 9, 7, 9 ); - g.drawLine( 9, 2, 9, 7 ); - g.drawLine( 8, 8, 8, 8 ); + + g.drawArc(-1, -1, 10, 10, 245, 140); if (isPressed || isArmed) { g.setColor(MetalLookAndFeel.getControlInfo()); @@ -2266,14 +2252,8 @@ public class MetalIconFactory implements Serializable { else { g.setColor( MetalLookAndFeel.getMenuDisabledForeground() ); } - g.drawLine( 2, 0, 6, 0 ); - g.drawLine( 2, 8, 6, 8 ); - g.drawLine( 0, 2, 0, 6 ); - g.drawLine( 8, 2, 8, 6 ); - g.drawLine( 1, 1, 1, 1 ); - g.drawLine( 7, 1, 7, 1 ); - g.drawLine( 1, 7, 1, 7 ); - g.drawLine( 7, 7, 7, 7 ); + + g.drawOval(0, 0, 8, 8); if (isSelected) { if (isEnabled) { @@ -2288,11 +2268,9 @@ public class MetalIconFactory implements Serializable { else { g.setColor(MetalLookAndFeel.getMenuDisabledForeground()); } - g.drawLine( 3, 2, 5, 2 ); - g.drawLine( 2, 3, 6, 3 ); - g.drawLine( 2, 4, 6, 4 ); - g.drawLine( 2, 5, 6, 5 ); - g.drawLine( 3, 6, 5, 6 ); + + g.fillOval(2, 2, 4, 4); + g.drawOval(2, 2, 4, 4); } g.translate( -x, -y ); @@ -2300,8 +2278,12 @@ public class MetalIconFactory implements Serializable { public void paintIcon( Component c, Graphics g, int x, int y ) { + + Object aaHint = getAndSetAntialisingHintForScaledGraphics(g); + if (MetalLookAndFeel.usingOcean()) { paintOceanIcon(c, g, x, y); + setAntialiasingHintForScaledGraphics(g, aaHint); return; } JMenuItem b = (JMenuItem) c; @@ -2319,55 +2301,24 @@ public class MetalIconFactory implements Serializable { if ( isPressed || isArmed ) { g.setColor( MetalLookAndFeel.getPrimaryControl() ); - g.drawLine( 3, 1, 8, 1 ); - g.drawLine( 2, 9, 7, 9 ); - g.drawLine( 1, 3, 1, 8 ); - g.drawLine( 9, 2, 9, 7 ); - g.drawLine( 2, 2, 2, 2 ); - g.drawLine( 8, 8, 8, 8 ); + g.drawOval(1, 1, 8, 8); g.setColor( MetalLookAndFeel.getControlInfo() ); - g.drawLine( 2, 0, 6, 0 ); - g.drawLine( 2, 8, 6, 8 ); - g.drawLine( 0, 2, 0, 6 ); - g.drawLine( 8, 2, 8, 6 ); - g.drawLine( 1, 1, 1, 1 ); - g.drawLine( 7, 1, 7, 1 ); - g.drawLine( 1, 7, 1, 7 ); - g.drawLine( 7, 7, 7, 7 ); + g.drawOval(0, 0, 8, 8); } else { g.setColor( MetalLookAndFeel.getControlHighlight() ); - g.drawLine( 3, 1, 8, 1 ); - g.drawLine( 2, 9, 7, 9 ); - g.drawLine( 1, 3, 1, 8 ); - g.drawLine( 9, 2, 9, 7 ); - g.drawLine( 2, 2, 2, 2 ); - g.drawLine( 8, 8, 8, 8 ); + g.drawOval(1, 1, 8, 8); g.setColor( MetalLookAndFeel.getControlDarkShadow() ); - g.drawLine( 2, 0, 6, 0 ); - g.drawLine( 2, 8, 6, 8 ); - g.drawLine( 0, 2, 0, 6 ); - g.drawLine( 8, 2, 8, 6 ); - g.drawLine( 1, 1, 1, 1 ); - g.drawLine( 7, 1, 7, 1 ); - g.drawLine( 1, 7, 1, 7 ); - g.drawLine( 7, 7, 7, 7 ); + g.drawOval(0, 0, 8, 8); } } else { g.setColor( MetalLookAndFeel.getMenuDisabledForeground() ); - g.drawLine( 2, 0, 6, 0 ); - g.drawLine( 2, 8, 6, 8 ); - g.drawLine( 0, 2, 0, 6 ); - g.drawLine( 8, 2, 8, 6 ); - g.drawLine( 1, 1, 1, 1 ); - g.drawLine( 7, 1, 7, 1 ); - g.drawLine( 1, 7, 1, 7 ); - g.drawLine( 7, 7, 7, 7 ); + g.drawOval(0, 0, 8, 8); } if ( isSelected ) @@ -2388,14 +2339,12 @@ public class MetalIconFactory implements Serializable { g.setColor( MetalLookAndFeel.getMenuDisabledForeground() ); } - g.drawLine( 3, 2, 5, 2 ); - g.drawLine( 2, 3, 6, 3 ); - g.drawLine( 2, 4, 6, 4 ); - g.drawLine( 2, 5, 6, 5 ); - g.drawLine( 3, 6, 5, 6 ); + g.fillOval(2, 2, 4, 4); + g.drawOval(2, 2, 4, 4); } g.translate( -x, -y ); + setAntialiasingHintForScaledGraphics(g, aaHint); } public int getIconWidth() { return menuCheckIconSize.width; } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java index 9320bd1d095..f0552b158f7 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java @@ -290,89 +290,94 @@ public class MetalLookAndFeel extends BasicLookAndFeel /** * Populates {@code table} with system colors. The following values are * added to {@code table}: - * - * - * + * + *
              Key - * Value - *
              + * + * + * + * + * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * *
              Metal's system color mapping
              Key + * Value + *
              "desktop" * {@code theme.getDesktopColor()} - *
              "activeCaption" * {@code theme.getWindowTitleBackground()} - *
              "activeCaptionText" * {@code theme.getWindowTitleForeground()} - *
              "activeCaptionBorder" * {@code theme.getPrimaryControlShadow()} - *
              "inactiveCaption" * {@code theme.getWindowTitleInactiveBackground()} - *
              "inactiveCaptionText" * {@code theme.getWindowTitleInactiveForeground()} - *
              "inactiveCaptionBorder" * {@code theme.getControlShadow()} - *
              "window" * {@code theme.getWindowBackground()} - *
              "windowBorder" * {@code theme.getControl()} - *
              "windowText" * {@code theme.getUserTextColor()} - *
              "menu" * {@code theme.getMenuBackground()} - *
              "menuText" * {@code theme.getMenuForeground()} - *
              "text" * {@code theme.getWindowBackground()} - *
              "textText" * {@code theme.getUserTextColor()} - *
              "textHighlight" * {@code theme.getTextHighlightColor()} - *
              "textHighlightText" * {@code theme.getHighlightedTextColor()} - *
              "textInactiveText" * {@code theme.getInactiveSystemTextColor()} - *
              "control" * {@code theme.getControl()} - *
              "controlText" * {@code theme.getControlTextColor()} - *
              "controlHighlight" * {@code theme.getControlHighlight()} - *
              "controlLtHighlight" * {@code theme.getControlHighlight()} - *
              "controlShadow" * {@code theme.getControlShadow()} - *
              "controlDkShadow" * {@code theme.getControlDarkShadow()} - *
              "scrollbar" * {@code theme.getControl()} - *
              "info" * {@code theme.getPrimaryControl()} - *
              "infoText" * {@code theme.getPrimaryControlInfo()} + *
              * The value {@code theme} corresponds to the current {@code MetalTheme}. * diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java index 1d163f22bfa..18edf3d7569 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -338,7 +338,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI * and sets this value; the default is null, implying a native operating * system window title pane. * - * @param content the JComponent to use for the window title pane. + * @param titlePane the JComponent to use for the window title pane. */ private void setTitlePane(JRootPane root, JComponent titlePane) { JLayeredPane layeredPane = root.getLayeredPane(); @@ -434,7 +434,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI /** * Returns the amount of space the layout would like to have. * - * @param the Container for which this layout manager is being used + * @param parent the Container for which this layout manager is being used * @return a Dimension object containing the layout's preferred size */ public Dimension preferredLayoutSize(Container parent) { @@ -486,7 +486,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI /** * Returns the minimum amount of space the layout needs. * - * @param the Container for which this layout manager is being used + * @param parent the Container for which this layout manager is being used * @return a Dimension object containing the layout's minimum size */ public Dimension minimumLayoutSize(Container parent) { @@ -537,7 +537,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI /** * Returns the maximum amount of space the layout can use. * - * @param the Container for which this layout manager is being used + * @param target the Container for which this layout manager is being used * @return a Dimension object containing the layout's maximum size */ public Dimension maximumLayoutSize(Container target) { @@ -601,7 +601,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI * Instructs the layout manager to perform the layout for the specified * container. * - * @param the Container for which this layout manager is being used + * @param parent the Container for which this layout manager is being used */ public void layoutContainer(Container parent) { JRootPane root = (JRootPane) parent; @@ -898,6 +898,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI w.setCursor(lastCursor); } + @SuppressWarnings("deprecation") public void mouseClicked(MouseEvent ev) { Window w = (Window)ev.getSource(); Frame f = null; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java index d851a162685..d753708bf56 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java @@ -192,6 +192,7 @@ public class MetalToolTipUI extends BasicToolTipUI { // that subclasses that randomly invoke this method will see varying // results. If this becomes an issue, MetalToolTipUI should no longer be // shared. + @SuppressWarnings("deprecation") public String getAcceleratorString() { if (tip == null || isAcceleratorHidden()) { return ""; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalTreeUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalTreeUI.java index 0e333ba630f..6781762c817 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalTreeUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalTreeUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,9 +44,11 @@ import javax.swing.plaf.basic.*; * visually render the spacing and delineation between nodes. The following * hints are supported: * - * + *
              + * * - * + * * * * - * + * * * * - * + * * * *
              Descriptions of supported hints: Angled, Horizontal, and None + *

              Angled

              AngledA line is drawn connecting the child to the parent. For handling * of the root node refer to * {@link javax.swing.JTree#setRootVisible} and @@ -54,11 +56,11 @@ import javax.swing.plaf.basic.*; *

              Horizontal

              HorizontalA horizontal line is drawn dividing the children of the root node.

              None

              NoneDo not draw any visual indication between nodes.
              diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package-info.java new file mode 100644 index 00000000000..dbd8c71940a --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package-info.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides user interface objects built according to the Java look and feel + * (once codenamed Metal), which is the default look and feel. + *

              + * These classes are designed to be used while the corresponding + * {@code LookAndFeel} class has been installed + * (UIManager.setLookAndFeel(new XXXLookAndFeel())). + * Using them while a different {@code LookAndFeel} is installed may produce + * unexpected results, including exceptions. Additionally, changing the + * {@code LookAndFeel} maintained by the {@code UIManager} without updating the + * corresponding {@code ComponentUI} of any {@code JComponent}s may also produce + * unexpected results, such as the wrong colors showing up, and is generally not + * encouraged. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.plaf.metal; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package.html deleted file mode 100644 index db16ddda090..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - -Provides user interface objects built according to -the Java look and feel (once codenamed Metal), -which is the default look and feel. - -

              These classes are designed to be used while the -corresponding LookAndFeel class has been -installed -(UIManager.setLookAndFeel(new XXXLookAndFeel())). -Using them while a different LookAndFeel is installed -may produce unexpected results, including exceptions. -Additionally, changing the LookAndFeel -maintained by the UIManager without updating the -corresponding ComponentUI of any -JComponents may also produce unexpected results, -such as the wrong colors showing up, and is generally not -encouraged. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package-info.java new file mode 100644 index 00000000000..6857c3f74ab --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package-info.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides user interface objects that combine two or more look and feels. When + * a component asks for its UI, this look and feel returns a multiplexing UI + * that handles all communications with both the default look and feel and one + * or more auxiliary look and feels. For example, if a user combines an + * auxiliary audio look and feel with the Motif look and feel, the + * {@code JButton.getUI} method would return an instance of + * {@code MultiButtonUI}, which would handle both a {@code MotifButtonUI} and an + * {@code AudioButtonUI}. + *

              + * For more information, see + * + * Using the Multiplexing Look and Feel. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.plaf.multi; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package.html deleted file mode 100644 index 32b0d6b21af..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - -Provides user interface objects that combine two or more look and feels. -When a component asks -for its UI, this look and feel returns a -multiplexing UI that handles all communications with both the -default look and feel and one or more auxiliary look and feels. -For example, if -a user combines an auxiliary audio look and feel -with the Motif look and feel, -the JButton.getUI method -would return an instance of MultiButtonUI, -which would handle both a -MotifButtonUI and an AudioButtonUI. - -

              - -For more information, see -Using -the Multiplexing Look and Feel. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java index ef49aab21a4..a6191620dfe 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -934,9 +934,7 @@ public final class NimbusStyle extends SynthStyle { *

              The actual code path for determining the proper state is the same as * in Synth.

              * - * @param ctx * @param lastState a 1 element array, allowing me to do pass-by-reference. - * @return */ private RuntimeState getNextState(RuntimeState[] states, int[] lastState, diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package-info.java new file mode 100644 index 00000000000..21f93aa34c2 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package-info.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides user interface objects built according to the cross-platform Nimbus + * look and feel. + *

              + * Nimbus uses instances of the {@link javax.swing.Painter} interface to paint + * components. With each Swing component it associates a foreground and a + * background {@code Painter}, and there may be several painters for different + * component states. + *

              + * Nimbus allows customizing many of its properties, including painters, by + * altering the {@link javax.swing.UIDefaults} table. Here's an example: + *

              + * UIManager.put("ProgressBar.tileWidth", myTileWidth);
              + * UIManager.put("ProgressBar[Enabled].backgroundPainter", myBgPainter);
              + * UIManager.put("ProgressBar[Enabled].foregroundPainter", myFgPainter);
              + * 
              + *

              + * Per-component customization is also possible. When rendering a component, + * Nimbus checks its client property named "Nimbus.Overrides". The value of this + * property should be an instance of {@code UIDefaults}. Settings from that + * table override the UIManager settings, but for that particular component + * instance only. An optional client property, + * "Nimbus.Overrides.InheritDefaults" of type Boolean, specifies whether the + * overriding settings should be merged with default ones ({@code true}), or + * replace them ({@code false}). By default they are merged: + *

              + * JProgressBar bar = new JProgressBar();
              + * UIDefaults overrides = new UIDefaults();
              + * overrides.put("ProgressBar.cycleTime", 330);
              + * ...
              + * bar.putClientProperty("Nimbus.Overrides", overrides);
              + * bar.putClientProperty("Nimbus.Overrides.InheritDefaults", false);
              + * 
              + *

              + * Colors in Nimbus are derived from a core set of + * primary colors. There + * are also + * secondary colors, + * which are derived from primary ones, but serve themselves as base colors for + * other derived colors. The derivation mechanism allows for runtime + * customization, i.e. if a primary or secondary color is changed, all colors + * that are derived from it are automatically updated. The method + * {@link javax.swing.plaf.nimbus.NimbusLookAndFeel#getDerivedColor(java.lang.String, float, float, float, int, boolean)} + * may be used to create a derived color. + *

              + * These classes are designed to be used while the corresponding + * {@code LookAndFeel} class has been installed + * (UIManager.setLookAndFeel(new XXXLookAndFeel())). + * Using them while a different {@code LookAndFeel} is installed may produce + * unexpected results, including exceptions. Additionally, changing the + * {@code LookAndFeel} maintained by the {@code UIManager} without updating the + * corresponding {@code ComponentUI} of any {@code JComponent}s may also produce + * unexpected results, such as the wrong colors showing up, and is generally not + * encouraged. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.7 + * @serial exclude + */ +package javax.swing.plaf.nimbus; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package.html deleted file mode 100644 index f91d73781fd..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - -Provides user interface objects built according to the cross-platform -Nimbus look and feel. - -

              Nimbus uses instances of the {@link javax.swing.Painter} interface to paint -components. With each Swing component it associates a foreground and a -background {@code Painter}, and there may be several painters for different -component states. - -

              Nimbus allows customizing many of its properties, including painters, by -altering the {@link javax.swing.UIDefaults} table. Here's an example: -

              -    UIManager.put("ProgressBar.tileWidth", myTileWidth);
              -    UIManager.put("ProgressBar[Enabled].backgroundPainter", myBgPainter);
              -    UIManager.put("ProgressBar[Enabled].foregroundPainter", myFgPainter);
              -
              - -

              Per-component customization is also possible. When rendering a component, -Nimbus checks its client property named "Nimbus.Overrides". The value of this -property should be an instance of {@code UIDefaults}. Settings from that table -override the UIManager settings, but for that particular component instance -only. An optional client property, "Nimbus.Overrides.InheritDefaults" of type -Boolean, specifies whether the overriding settings should be merged with -default ones ({@code true}), or replace them ({@code false}). By default they -are merged: -

              -    JProgressBar bar = new JProgressBar();
              -    UIDefaults overrides = new UIDefaults();
              -    overrides.put("ProgressBar.cycleTime", 330);
              -    ...
              -    bar.putClientProperty("Nimbus.Overrides", overrides);
              -    bar.putClientProperty("Nimbus.Overrides.InheritDefaults", false);
              -
              - -

              Colors in Nimbus are derived from a core set of -primary colors. There are also -secondary colors, which are -derived from primary ones, but serve themselves as base colors for other -derived colors. The derivation mechanism allows for runtime customization, -i.e. if a primary or secondary color is changed, all colors that are derived -from it are automatically updated. The method -{@link javax.swing.plaf.nimbus.NimbusLookAndFeel#getDerivedColor(java.lang.String, float, float, float, int, boolean)} -may be used to create a derived color. - -

              These classes are designed to be used while the -corresponding LookAndFeel class has been -installed -(UIManager.setLookAndFeel(new XXXLookAndFeel())). -Using them while a different LookAndFeel is installed -may produce unexpected results, including exceptions. -Additionally, changing the LookAndFeel -maintained by the UIManager without updating the -corresponding ComponentUI of any -JComponents may also produce unexpected results, -such as the wrong colors showing up, and is generally not -encouraged. - -

              Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.7 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/package-info.java new file mode 100644 index 00000000000..d29ebe69052 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/package-info.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides one interface and many abstract classes that Swing uses to provide + * its pluggable look-and-feel capabilities. Its classes are subclassed and + * implemented by look and feel UIs such as Basic and the Java look and feel + * (Metal). This package is only used by developers who cannot create a new + * look and feel by subclassing existing look-and-feel components (such as those + * provided by the {@code javax.swing.plaf.basic} and + * {@code javax.swing.plaf.metal} packages). + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.plaf; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/package.html deleted file mode 100644 index 0fc8c538143..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/package.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - -Provides one interface and many abstract classes that -Swing uses to provide its pluggable look-and-feel capabilities. Its -classes are subclassed and implemented by look and feel UIs -such as Basic and the Java look and feel (Metal). -This package is only used by developers who -cannot create a new look and feel by subclassing existing -look-and-feel components (such as those provided -by the javax.swing.plaf.basic and -javax.swing.plaf.metal packages). - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java index 8e6c2898e3e..bc101d2f7c5 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java @@ -80,6 +80,7 @@ public class SynthSplitPaneUI extends BasicSplitPaneUI * Installs the UI defaults. */ @Override + @SuppressWarnings("deprecation") protected void installDefaults() { updateStyle(splitPane); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package-info.java new file mode 100644 index 00000000000..e8bf9e5a70c --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package-info.java @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Synth is a skinnable look and feel in which all painting is delegated. Synth + * does not provide a default look. In order to use Synth you need to specify a + * file, or provide a + * {@link javax.swing.plaf.synth.SynthStyleFactory}. Both configuration options + * require an understanding of the synth architecture, which is described below, + * as well as an understanding of Swing's architecture. + *

              + * Unless otherwise specified null is not a legal value to any of the methods + * defined in the synth package and if passed in will result in a + * {@code NullPointerException}. + * + *

              Synth

              + * Each {@link javax.swing.plaf.ComponentUI} implementation in Synth associates + * itself with one {@link javax.swing.plaf.synth.SynthStyle} per + * {@link javax.swing.plaf.synth.Region}, most {@code Components} only have one + * {@code Region} and therefor only one {@code SynthStyle}. {@code SynthStyle} + * is used to access all style related properties: fonts, colors + * and other {@code Component} properties. In addition {@code SynthStyle}s are + * used to obtain {@link javax.swing.plaf.synth.SynthPainter}s for painting the + * background, border, focus and other portions of a {@code Component}. The + * {@code ComponentUI}s obtain {@code SynthStyle}s from a + * {@link javax.swing.plaf.synth.SynthStyleFactory}. A {@code SynthStyleFactory} + * can be provided directly by way of + * {@link javax.swing.plaf.synth.SynthLookAndFeel#setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory)}, + * or indirectly by way of {@link javax.swing.plaf.synth.SynthLookAndFeel#load}. + * The following example uses the {@code SynthLookAndFeel.load()} method to + * configure a {@code SynthLookAndFeel} and sets it as the current look and + * feel: + *
              + *
              {@code
              + *     SynthLookAndFeel laf = new SynthLookAndFeel();
              + *     laf.load(MyClass.class.getResourceAsStream("laf.xml"), MyClass.class);
              + *     UIManager.setLookAndFeel(laf);
              + * }
              + *
              + *

              + * Many {@code JComponent}s are broken down into smaller pieces and identified + * by the type safe enumeration in {@link javax.swing.plaf.synth.Region}. For + * example, a {@code JTabbedPane} consists of a {@code Region} for the + * {@code JTabbedPane}({@link javax.swing.plaf.synth.Region#TABBED_PANE}), the + * content area ({@link javax.swing.plaf.synth.Region#TABBED_PANE_CONTENT}), the + * area behind the tabs + * ({@link javax.swing.plaf.synth.Region#TABBED_PANE_TAB_AREA}), and the tabs + * ({@link javax.swing.plaf.synth.Region#TABBED_PANE_TAB}). Each + * {@code Region} of each {@code JComponent} will have a {@code SynthStyle}. + * This allows you to customize individual pieces of each region of each + * {@code JComponent}. + *

              + * Many of the Synth methods take a {@link javax.swing.plaf.synth.SynthContext}. + * This is used to provide information about the current {@code Component} and + * includes: the {@link javax.swing.plaf.synth.SynthStyle} associated with the + * current {@link javax.swing.plaf.synth.Region}, the state of the + * {@code Component} as a bitmask (refer to + * {@link javax.swing.plaf.synth.SynthConstants} for the valid states), and a + * {@link javax.swing.plaf.synth.Region} identifying the portion of the + * {@code Component} being painted. + *

              + * All text rendering by non-{@code JTextComponent}s is delegated to a + * {@link javax.swing.plaf.synth.SynthGraphicsUtils}, which is obtained using + * the {@link javax.swing.plaf.synth.SynthStyle} method + * {@link javax.swing.plaf.synth.SynthStyle#getGraphicsUtils}. You can customize + * text rendering by supplying your own + * {@link javax.swing.plaf.synth.SynthGraphicsUtils}. + * + *

              Notes on specific components

              + *

              JTree

              + * Synth provides a region for the cells of a tree: + * {@code Region.TREE_CELL}. To specify the colors of the + * renderer you'll want to provide a style for the + * {@code TREE_CELL} region. The following illustrates this: + *
              {@code
              + *   
              + *   
              + * }
              + *

              + * This specifies a color combination of red on white, when selected, and white + * on red when not selected. To see the background you need to specify that + * labels are not opaque. The following XML fragment does that: + *

              {@code
              + *   
              + *   
              + * }
              + * + *

              JList and JTable

              + * The colors that the renderers for JList and JTable use are specified by way + * of the list and table Regions. The following XML fragment illustrates how to + * specify red on white, when selected, and white on red when not selected: + *
              {@code
              + *   
              + *   
              + *   
              + * }
              + */ +package javax.swing.plaf.synth; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package.html deleted file mode 100644 index 6662e81b1a4..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - -

              - Synth is a skinnable look and feel in which all painting is - delegated. Synth does not provide a default look. In - order to use Synth you need to specify a - file, or - provide a {@link - javax.swing.plaf.synth.SynthStyleFactory}. Both - configuration options require an - understanding of the synth architecture, which is described - below, as well as an understanding of Swing's architecture. -

              -

              - Unless otherwise specified null is not a legal value to any of - the methods defined in the synth package and if passed in will - result in a NullPointerException. - - -

              Synth

              -

              - Each {@link javax.swing.plaf.ComponentUI} implementation in Synth associates - itself with one {@link - javax.swing.plaf.synth.SynthStyle} per {@link - javax.swing.plaf.synth.Region}, most - Components only have one Region and - therefor only one SynthStyle. - SynthStyle - is used to access all style related properties: fonts, colors - and other Component properties. In addition - SynthStyles are used to obtain - {@link javax.swing.plaf.synth.SynthPainter}s for painting the background, border, - focus and other portions of a Component. The ComponentUIs obtain - SynthStyles from a - {@link javax.swing.plaf.synth.SynthStyleFactory}. - A SynthStyleFactory - can be provided directly by way of - {@link javax.swing.plaf.synth.SynthLookAndFeel#setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory)}, - or indirectly by way of - {@link javax.swing.plaf.synth.SynthLookAndFeel#load}. The - following example uses the SynthLookAndFeel.load() - method to configure a SynthLookAndFeel and sets it - as the current look and feel: -

              -
              -
              -  SynthLookAndFeel laf = new SynthLookAndFeel();
              -  laf.load(MyClass.class.getResourceAsStream("laf.xml"), MyClass.class);
              -  UIManager.setLookAndFeel(laf);
              -      
              -
              -

              - Many JComponents are broken down into smaller - pieces and identified by the type safe enumeration in - {@link javax.swing.plaf.synth.Region}. For example, a JTabbedPane - consists of a Region for the - JTabbedPane ({@link - javax.swing.plaf.synth.Region#TABBED_PANE}), the content - area ({@link - javax.swing.plaf.synth.Region#TABBED_PANE_CONTENT}), the - area behind the tabs ({@link - javax.swing.plaf.synth.Region#TABBED_PANE_TAB_AREA}), and the - tabs ({@link - javax.swing.plaf.synth.Region#TABBED_PANE_TAB}). Each - Region of each - JComponent will have a - SynthStyle. This allows - you to customize individual pieces of each region of each - JComponent. -

              - Many of the Synth methods take a {@link javax.swing.plaf.synth.SynthContext}. This - is used to provide information about the current - Component and includes: the - {@link javax.swing.plaf.synth.SynthStyle} associated with the current - {@link javax.swing.plaf.synth.Region}, the state of the Component - as a bitmask (refer to {@link - javax.swing.plaf.synth.SynthConstants} for the valid - states), and a {@link javax.swing.plaf.synth.Region} identifying the portion of - the Component being painted. -

              - All text rendering by non-JTextComponents is - delegated to a {@link - javax.swing.plaf.synth.SynthGraphicsUtils}, which is - obtained using the {@link javax.swing.plaf.synth.SynthStyle} method - {@link javax.swing.plaf.synth.SynthStyle#getGraphicsUtils}. You can - customize text rendering - by supplying your own {@link javax.swing.plaf.synth.SynthGraphicsUtils}. - -

              - -

              Notes on specific components

              - -

              JTree

              -

              - Synth provides a region for the cells of a tree: - Region.TREE_CELL. To specify the colors of the - renderer you'll want to provide a style for the - TREE_CELL region. The following illustrates this: -

              -  <style id="treeCellStyle">
              -    <opaque value="TRUE"/>
              -    <state>
              -      <color value="WHITE" type="TEXT_FOREGROUND"/>
              -      <color value="RED" type="TEXT_BACKGROUND"/>
              -    </state>
              -    <state value="SELECTED">
              -      <color value="RED" type="TEXT_FOREGROUND"/>
              -      <color value="WHITE" type="BACKGROUND"/>
              -    </state>
              -  </style>
              -  <bind style="treeCellStyle" type="region" key="TreeCell"/>
              -
              -

              - This specifies a color combination of red on white, when - selected, and white on red when not selected. To see the - background you need to specify that labels are not opaque. The - following XML fragment does that: -

              -  <style id="labelStyle">
              -    <opaque value="FALSE"/>
              -  </style>
              -  <bind style="labelStyle" type="region" key="Label"/>
              -
              - -

              JList and JTable

              -

              - The colors that the renderers for JList and JTable use are - specified by way of the list and table Regions. The following - XML fragment illustrates how to specify red on white, when - selected, and white on red when not selected: -

              -  <style id="style">
              -    <opaque value="TRUE"/>
              -    <state>
              -      <color value="WHITE" type="TEXT_FOREGROUND"/>
              -      <color value="RED" type="TEXT_BACKGROUND"/>
              -      <color value="RED" type="BACKGROUND"/>
              -    </state>
              -    <state value="SELECTED">
              -      <color value="RED" type="TEXT_FOREGROUND"/>
              -      <color value="WHITE" type="TEXT_BACKGROUND"/>
              -    </state>
              -  </style>
              -  <bind style="style" type="region" key="Table"/>
              -  <bind style="style" type="region" key="List"/>
              -
              - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableCellRenderer.java b/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableCellRenderer.java index 0a7504da6ea..541a4e7343f 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableCellRenderer.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableCellRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,7 +41,7 @@ import sun.swing.DefaultLookup; * in a JTable. *

              * - * Implementation Note: + * Implementation Note: * This class inherits from JLabel, a standard component class. * However JTable employs a unique mechanism for rendering * its cells and therefore requires some slightly modified behavior diff --git a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java b/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java index 5d29fa945ab..5ba2838c432 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java @@ -384,6 +384,7 @@ public class JTableHeader extends JComponent implements TableColumnModelListener * renderer and, therefore, the proper tip * @return the tool tip for this component */ + @SuppressWarnings("deprecation") public String getToolTipText(MouseEvent event) { String tip = null; Point p = event.getPoint(); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/table/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/table/package-info.java new file mode 100644 index 00000000000..1ce7bd07ca9 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/table/package-info.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces for dealing with {@code javax.swing.JTable}. + * {@code JTable} is Swing's grid or tabular view for constructing user + * interfaces for tabular data structures inside an application. Use this + * package if you want control over how tables are constructed, updated, and + * rendered, as well as how data associated with the tables are viewed and + * managed. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *

              Related Documentation

              + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + * + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.table; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/table/package.html b/jdk/src/java.desktop/share/classes/javax/swing/table/package.html deleted file mode 100644 index cf944823e91..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/table/package.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - -Provides classes and interfaces for dealing with -javax.swing.JTable. -JTable is Swing's grid or tabular view for -constructing user interfaces for tabular data structures inside -an application. Use this package if you want control over how tables -are constructed, updated, and rendered, as well as how data associated -with the tables are viewed and managed. - -

              - -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - - -

              Related Documentation

              - -For overviews, tutorials, examples, guides, and tool documentation, please see: - - - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java index 50457771068..8d973e63b65 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java @@ -372,6 +372,7 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou /** * Selects word based on the MouseEvent */ + @SuppressWarnings("deprecation") private void selectWord(MouseEvent e) { if (selectedWordEvent != null && selectedWordEvent.getX() == e.getX() @@ -405,6 +406,7 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou * @param e the mouse event * @see MouseListener#mouseClicked */ + @SuppressWarnings("deprecation") public void mouseClicked(MouseEvent e) { if (getComponent() == null) { return; @@ -513,6 +515,7 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou /** * Adjusts the caret location based on the MouseEvent. */ + @SuppressWarnings("deprecation") private void adjustCaret(MouseEvent e) { if ((e.getModifiers() & ActionEvent.SHIFT_MASK) != 0 && getDot() != -1) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java index dc48035a5b4..355b76c0d16 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -2179,9 +2179,6 @@ public class DefaultEditorKit extends EditorKit { /** * Create this action with the appropriate identifier. - * @param nm the name of the action, Action.NAME. - * @param select whether to extend the selection when - * changing the caret position. */ SelectWordAction() { super(selectWordAction); @@ -2209,9 +2206,6 @@ public class DefaultEditorKit extends EditorKit { /** * Create this action with the appropriate identifier. - * @param nm the name of the action, Action.NAME. - * @param select whether to extend the selection when - * changing the caret position. */ SelectLineAction() { super(selectLineAction); @@ -2239,9 +2233,6 @@ public class DefaultEditorKit extends EditorKit { /** * Create this action with the appropriate identifier. - * @param nm the name of the action, Action.NAME. - * @param select whether to extend the selection when - * changing the caret position. */ SelectParagraphAction() { super(selectParagraphAction); @@ -2269,9 +2260,6 @@ public class DefaultEditorKit extends EditorKit { /** * Create this action with the appropriate identifier. - * @param nm the name of the action, Action.NAME. - * @param select whether to extend the selection when - * changing the caret position. */ SelectAllAction() { super(selectAllAction); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java index 16fbdfe8315..175bcaffab8 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -39,6 +39,7 @@ import java.util.ArrayList; import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serializable; +import java.util.Arrays; import javax.swing.event.*; import javax.swing.undo.AbstractUndoableEdit; import javax.swing.undo.CannotRedoException; @@ -1263,7 +1264,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc int offs, int len) { attr = a; this.type = type; - this.data = txt; + this.data = txt == null ? null : Arrays.copyOf(txt, txt.length); this.offs = offs; this.len = len; this.direction = OriginateDirection; @@ -1323,7 +1324,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc * @return the array */ public char[] getArray() { - return data; + return data == null ? null : Arrays.copyOf(data, data.length); } @@ -1796,8 +1797,6 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc /** * Pushes a new element onto the stack that represents * the current path. - * @param record Whether or not the push should be - * recorded as an element change or not. * @param isFracture true if pushing on an element that was created * as the result of a fracture. */ diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphPainter1.java b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphPainter1.java index f1326cda127..ba68c1edf0b 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphPainter1.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphPainter1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -198,7 +198,7 @@ class GlyphPainter1 extends GlyphView.GlyphPainter { * @param v the view * @param p0 the location in the model where the * fragment should start its representation >= 0 - * @param pos the graphic location along the axis that the + * @param x the graphic location along the axis that the * broken view would occupy >= 0; this may be useful for * things like tab calculations * @param len specifies the distance into the view diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphPainter2.java b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphPainter2.java index 74e5b3eef1b..3a070bb4040 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphPainter2.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphPainter2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -193,7 +193,7 @@ class GlyphPainter2 extends GlyphView.GlyphPainter { * @param v the view to find the model location to break at. * @param p0 the location in the model where the * fragment should start it's representation >= 0. - * @param pos the graphic location along the axis that the + * @param x the graphic location along the axis that the * broken view would occupy >= 0. This may be useful for * things like tab calculations. * @param len specifies the distance into the view diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java b/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java index 241070327b2..6ea7ea75a0a 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -135,7 +135,7 @@ import sun.swing.SwingAccessor; * the action (In the case that the ActionEvent * sent to the action doesn't contain the target text component as its source). *

              - * The input method framework + * The {@extLink imf_overview Input Method Framework} * lets text components interact with input methods, separate software * components that preprocess events to let users enter thousands of * different characters using keyboards with far fewer keys. @@ -157,11 +157,15 @@ import sun.swing.SwingAccessor; * Keyboard event and input method events are handled in the following stages, * with each stage capable of consuming the event: * - * + *
              + * + * * - * - * - * + * + * + * + * + * * * * @@ -181,6 +185,7 @@ import sun.swing.SwingAccessor; * * * + * *
              Stages of keyboard and input method event handling

              Stage

              KeyEvent

              InputMethodEvent

              StageKeyEventInputMethodEvent
              1. input methods (generated here)
              5. keymap handling using the current keymap
              6. keyboard handling in JComponent (e.g. accelerators, component navigation, etc.)
              * *

              @@ -4103,6 +4108,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A get(FOCUSED_COMPONENT); } + @SuppressWarnings("deprecation") private int getCurrentEventModifiers() { int modifiers = 0; AWTEvent currentEvent = EventQueue.getCurrentEvent(); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java b/jdk/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java index 670599f917a..6f5ea467a89 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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,11 +37,15 @@ import javax.swing.*; * location in the Document model. The following characters can * be specified: * - * + *
              + * + * * * - * + * * + * + * * * * @@ -66,6 +70,7 @@ import javax.swing.*; * * * + * *
              Valid characters and their descriptions
              Character 

              Description

              Description
              #Any valid number, uses Character.isDigit.
              *Anything.
              HAny hex character (0-9, a-f or A-F).
              * *

              diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java index a40409c5b09..1cadf02df3d 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -899,7 +899,6 @@ public class ParagraphView extends FlowView implements TabExpander { /** * Range represented by a row in the paragraph is only * a subset of the total range of the paragraph element. - * @see View#getRange */ public int getStartOffset() { int offs = Integer.MAX_VALUE; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/PlainView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/PlainView.java index 4430b4e1c89..9d1b4fc1292 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/PlainView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/PlainView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -31,7 +31,6 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Objects; import javax.swing.event.*; -import java.lang.reflect.Module; import java.lang.ref.SoftReference; import java.util.HashMap; @@ -511,8 +510,8 @@ public class PlainView extends View implements TabExpander { * Provides a mapping from the view coordinate space to the logical * coordinate space of the model. * - * @param fx the X coordinate >= 0 - * @param fy the Y coordinate >= 0 + * @param x the X coordinate >= 0 + * @param y the Y coordinate >= 0 * @param a the allocated region to render into * @return the location within the model that best represents the * given point in the view >= 0 diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/StringContent.java b/jdk/src/java.desktop/share/classes/javax/swing/text/StringContent.java index d6b897fd93f..4f26f54d8b8 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/StringContent.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/StringContent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -351,6 +351,7 @@ public final class StringContent implements AbstractDocument.Content, Serializab return rec.offset; } + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { // schedule the record to be removed later // on another thread. diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/StyleContext.java b/jdk/src/java.desktop/share/classes/javax/swing/text/StyleContext.java index f0b0a08bcc9..bdd8c26528b 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/StyleContext.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/StyleContext.java @@ -794,7 +794,7 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon * @param attributes the attributes */ public SmallAttributeSet(Object[] attributes) { - this.attributes = attributes; + this.attributes = Arrays.copyOf(attributes, attributes.length); updateResolveParent(); } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java index cc286d8697a..a9a7f67ffe7 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -78,6 +78,7 @@ public abstract class TableView extends BoxView { super(elem, View.Y_AXIS); rows = new Vector(); gridValid = false; + totalColumnRequirements = new SizeRequirements(); } /** @@ -377,6 +378,11 @@ public abstract class TableView extends BoxView { r.preferred = (int) pref; r.maximum = (int) max; r.alignment = 0; + + totalColumnRequirements.minimum = r.minimum; + totalColumnRequirements.preferred = r.preferred; + totalColumnRequirements.maximum = r.maximum; + return r; } @@ -406,6 +412,13 @@ public abstract class TableView extends BoxView { * into consideration any constraining maximums. */ void calculateColumnRequirements(int axis) { + + for (SizeRequirements req : columnRequirements) { + req.minimum = 0; + req.preferred = 0; + req.maximum = Integer.MAX_VALUE; + } + // pass 1 - single column cells boolean hasMultiColumn = false; int nrows = getRowCount(); @@ -576,6 +589,9 @@ public abstract class TableView extends BoxView { int[] columnSpans; int[] columnOffsets; + + SizeRequirements totalColumnRequirements; + SizeRequirements[] columnRequirements; Vector rows; boolean gridValid; @@ -646,6 +662,53 @@ public abstract class TableView extends BoxView { invalidateGrid(); } + @Override + protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r) { + SizeRequirements req = new SizeRequirements(); + req.minimum = totalColumnRequirements.minimum; + req.maximum = totalColumnRequirements.maximum; + req.preferred = totalColumnRequirements.preferred; + req.alignment = 0f; + return req; + } + + @Override + public float getMinimumSpan(int axis) { + float value; + + if (axis == View.X_AXIS) { + value = totalColumnRequirements.minimum + getLeftInset() + getRightInset(); + } else { + value = super.getMinimumSpan(axis); + } + return value; + } + + @Override + public float getMaximumSpan(int axis) { + float value; + + if (axis == View.X_AXIS) { + // We're flexible. + value = (float) Integer.MAX_VALUE; + } else { + value = super.getMaximumSpan(axis); + } + return value; + } + + @Override + public float getPreferredSpan(int axis) { + float value; + + if (axis == View.X_AXIS) { + value = totalColumnRequirements.preferred + getLeftInset() + getRightInset(); + } else { + value = super.getPreferredSpan(axis); + } + return value; + } + /** * Perform layout for the major axis of the box (i.e. the * axis that it represents). The results of the layout should diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/TextLayoutStrategy.java b/jdk/src/java.desktop/share/classes/javax/swing/text/TextLayoutStrategy.java index 53924e0f511..581b5204108 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/TextLayoutStrategy.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/TextLayoutStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -88,9 +88,8 @@ class TextLayoutStrategy extends FlowView.FlowStrategy { * Gives notification from the document that attributes were changed * in a location that this view is responsible for. * - * @param changes the change information from the associated document - * @param a the current allocation of the view - * @param f the factory to use to rebuild if the view has children + * @param e the change information from the associated document + * @param alloc the current allocation of the view inside of the insets. * @see View#changedUpdate */ public void changedUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) { @@ -117,9 +116,9 @@ class TextLayoutStrategy extends FlowView.FlowStrategy { * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * - * @param row the row to fill in with views. This is assumed + * @param rowIndex the row to fill in with views. This is assumed * to be empty on entry. - * @param pos The current position in the children of + * @param p0 The current position in the children of * this views element from which to start. * @return the position to start the next row */ @@ -157,7 +156,7 @@ class TextLayoutStrategy extends FlowView.FlowStrategy { * calculated by the LineBreakMeasurer, this is implemented * to do nothing. * - * @param r the row to adjust to the current layout + * @param rowIndex the row to adjust to the current layout * span. * @param desiredSpan the current layout span >= 0 * @param x the location r starts at. diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/Utilities.java b/jdk/src/java.desktop/share/classes/javax/swing/text/Utilities.java index b7516201f17..96cf88abe96 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/Utilities.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/Utilities.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1245,7 +1245,7 @@ public class Utilities { * * @param v View to query * @param pos the position to convert >= 0 - * @param a the allocated region to render into + * @param alloc the allocated region to render into * @param direction the direction from the current position that can * be thought of as the arrow keys typically found on a keyboard; * this may be one of the following: diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSS.java b/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSS.java index c6e715f6672..1acce37568c 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSS.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSS.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -948,7 +948,6 @@ public class CSS implements Serializable { * Returns the size of a font from the passed in string. * * @param size CSS string describing font size - * @param baseFontSize size to use for relative units. */ float getPointSize(String size, StyleSheet ss) { int relSize, absSize, diff, index; @@ -1658,8 +1657,8 @@ public class CSS implements Serializable { * value, this method returns a CssValue object to associate with the * CSS attribute. * - * @param the CSS.Attribute - * @param a String containing the value associated HTML.Attribtue. + * @param cssAttr the CSS.Attribute + * @param htmlAttrValue a String containing the value associated HTML.Attribute. */ Object getCssValue(CSS.Attribute cssAttr, String htmlAttrValue) { CssValue value = (CssValue)valueConvertor.get(cssAttr); @@ -1670,7 +1669,7 @@ public class CSS implements Serializable { /** * Maps an HTML.Attribute object to its appropriate CSS.Attributes. * - * @param HTML.Attribute + * @param hAttr HTML.Attribute * @return CSS.Attribute[] */ private CSS.Attribute[] getCssAttribute(HTML.Attribute hAttr) { @@ -1685,7 +1684,7 @@ public class CSS implements Serializable { * based on the tag associated with the attribute and the * value of the attribute. * - * @param AttributeSet containing HTML attributes. + * @param tag the AttributeSet containing HTML attributes. * @return CSS.Attribute mapping for HTML.Attribute.ALIGN. */ private CSS.Attribute getCssAlignAttribute(HTML.Tag tag, @@ -1711,7 +1710,7 @@ public class CSS implements Serializable { /** * Fetches the tag associated with the HTML AttributeSet. * - * @param AttributeSet containing the HTML attributes. + * @param htmlAttrSet the AttributeSet containing the HTML attributes. * @return HTML.Tag */ private HTML.Tag getHTMLTag(AttributeSet htmlAttrSet) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/FormView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/html/FormView.java index 3ca0dd18e0d..b36edc8c8fe 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/FormView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/FormView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,11 +46,16 @@ import javax.swing.text.*; *

              * The following table shows what components get built * by this view. - * + * + *
              + * + * * * * * + * + * * * * @@ -99,6 +104,7 @@ import javax.swing.text.*; * * * + * *
              Shows what components get built by this view
              Element TypeComponent built
              input, type buttonJButtoninput, type fileJTextField
              * * @author Timothy Prinzing @@ -209,7 +215,7 @@ public class FormView extends ComponentView implements ActionListener { * Creates a component for an <INPUT> element based on the * value of the "type" attribute. * - * @param set of attributes associated with the <INPUT> element. + * @param attr set of attributes associated with the <INPUT> element. * @param model the value of the StyleConstants.ModelAttribute * @return the component. */ @@ -653,8 +659,6 @@ public class FormView extends ComponentView implements ActionListener { * action. * * @param buffer the buffer that contains that data to submit - * @param targetElement the element that triggered the - * form submission */ private void getFormData(StringBuilder buffer) { Element formE = getFormElement(); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/FrameView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/html/FrameView.java index b6d18c14e36..7bf7b7b7f71 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/FrameView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/FrameView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -143,8 +143,7 @@ class FrameView extends ComponentView implements HyperlinkListener { * contains it is editable. And then proceeds to call * the superclass to do the paint(). * - * @param parent View - * @see text.ComponentView#paint + * @see javax.swing.text.ComponentView#paint */ public void paint(Graphics g, Shape allocation) { @@ -289,8 +288,6 @@ class FrameView extends ComponentView implements HyperlinkListener { * firing the event to the outermost JEditorPane, this * method also invokes the setPage() method and explicitly * replaces the current document with the destination url. - * - * @param HyperlinkEvent */ public void hyperlinkUpdate(HyperlinkEvent evt) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java b/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java index d61d1f8de5b..f1f3be6eee4 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -183,7 +183,8 @@ import static sun.swing.SwingUtilities2.IMPLIED_CR; *

              The following table shows the example document and the results * of various methods described above.

              * - * + *
              + * * * * @@ -999,17 +1000,17 @@ public class HTMLDocument extends DefaultStyledDocument { * * *

              Invoking setInnerHTML(elem, "<ul><li>") - * results in the following structure (new elements are in red).

              + * results in the following structure (new elements are in red).

              * *
                    *     <body>
                    *       |
                    *     <div>
                    *         \
              -     *         <ul>
              +     *         <ul>
                    *           \
              -     *           <li>
              +     *           <li>
                    * 
              * *

              Parameter elem must not be a leaf element, @@ -1083,15 +1084,15 @@ public class HTMLDocument extends DefaultStyledDocument { * * *

              Invoking setOuterHTML(elem, "<ul><li>") - * results in the following structure (new elements are in red).

              + * results in the following structure (new elements are in red).

              * *
                    *    <body>
                    *      |
              -     *     <ul>
              +     *     <ul>
                    *       \
              -     *       <li>
              +     *       <li>
                    * 
              * *

              If either elem or htmlText @@ -1157,16 +1158,16 @@ public class HTMLDocument extends DefaultStyledDocument { * *

              Invoking insertAfterStart(elem, * "<ul><li>") results in the following structure - * (new elements are in red).

              + * (new elements are in red).

              * *
                    *        <body>
                    *          |
                    *        <div>
                    *       /  |  \
              -     *    <ul> <p> <p>
              +     *    <ul> <p> <p>
                    *     /
              -     *  <li>
              +     *  <li>
                    * 
              * *

              Unlike the insertBeforeStart method, new @@ -1229,17 +1230,17 @@ public class HTMLDocument extends DefaultStyledDocument { * * *

              Invoking insertBeforeEnd(elem, "<ul><li>") - * results in the following structure (new elements are in red).

              + * results in the following structure (new elements are in red).

              * *
                    *        <body>
                    *          |
                    *        <div>
                    *       /  |  \
              -     *     <p> <p> <ul>
              +     *     <p> <p> <ul>
                    *               \
              -     *               <li>
              +     *               <li>
                    * 
              * *

              Unlike the insertAfterEnd method, new elements @@ -1300,14 +1301,14 @@ public class HTMLDocument extends DefaultStyledDocument { * *

              Invoking insertBeforeStart(elem, * "<ul><li>") results in the following structure - * (new elements are in red).

              + * (new elements are in red).

              * *
                    *        <body>
                    *         /  \
              -     *      <ul> <div>
              +     *      <ul> <div>
                    *       /    /  \
              -     *     <li> <p>  <p>
              +     *     <li> <p>  <p>
                    * 
              * *

              Unlike the insertAfterStart method, new @@ -1360,15 +1361,15 @@ public class HTMLDocument extends DefaultStyledDocument { * * *

              Invoking insertAfterEnd(elem, "<ul><li>") - * results in the following structure (new elements are in red).

              + * results in the following structure (new elements are in red).

              * *
                    *        <body>
                    *         /  \
              -     *      <div> <ul>
              +     *      <div> <ul>
                    *       / \    \
              -     *     <p> <p>  <li>
              +     *     <p> <p>  <li>
                    * 
              * *

              Unlike the insertBeforeEnd method, new elements @@ -2129,8 +2130,13 @@ public class HTMLDocument extends DefaultStyledDocument { *

              * The assignment of the actions described is shown in the * following table for the tags defined in HTML.Tag. - *

              HTML Content of example above
              ExampleinsertAfterStart
              + * + *
              + * + * * + * + * * *
              HTML tags and assigned actions
              TagAction
              HTML.Tag.A CharacterAction *
              HTML.Tag.ADDRESS CharacterAction *
              HTML.Tag.APPLET HiddenAction @@ -2203,6 +2209,7 @@ public class HTMLDocument extends DefaultStyledDocument { *
              HTML.Tag.U CharacterAction *
              HTML.Tag.UL BlockAction *
              HTML.Tag.VAR CharacterAction + *
              *

              * Once </html> is encountered, the Actions are no longer notified. @@ -3385,10 +3392,17 @@ public class HTMLDocument extends DefaultStyledDocument { * be iterated over picking up the data of the form. * The following are the model assignments for the * various type of form elements. - * + * + *
              + * + * * * + * + * * * * *
              Model assignments for the various types of form elements + *
              Element Type * Model Type + *
              input, type button * {@link DefaultButtonModel} @@ -3419,6 +3433,7 @@ public class HTMLDocument extends DefaultStyledDocument { *
              textarea * {@link PlainDocument} + *
              * */ diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java b/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java index d5d995e9fba..230bd2f6b99 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1118,10 +1118,17 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible { * table describes what this factory will build by * default. * - * + *
              + * + * + * + * + * + * * - * * * * + * *
              Describes the tag and view created by this factory by default + *
              Tag + * View created + *
              TagView created - *
              HTML.Tag.CONTENTInlineView *
              HTML.Tag.IMPLIEDjavax.swing.text.html.ParagraphView @@ -1192,6 +1199,7 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible { *
              HTML.Tag.FRAMEFrameView *
              */ public static class HTMLFactory implements ViewFactory { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/NoFramesView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/html/NoFramesView.java index 5f4789cfc5c..73b609e7c9d 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/NoFramesView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/NoFramesView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,7 +59,7 @@ class NoFramesView extends BlockView { * @param g the rendering surface to use * @param allocation the allocated region to render into * @see #isVisible - * @see text.ParagraphView#paint + * @see javax.swing.text.ParagraphView#paint */ public void paint(Graphics g, Shape allocation) { Container host = getContainer(); @@ -126,7 +126,7 @@ class NoFramesView extends BlockView { * typically the view is told to render into the span * that is returned, although there is no guarantee; * the parent may choose to resize or break the view - * @see text.ParagraphView#getPreferredSpan + * @see javax.swing.text.ParagraphView#getPreferredSpan */ public float getPreferredSpan(int axis) { if (!visible) { @@ -143,7 +143,7 @@ class NoFramesView extends BlockView { * @param axis may be either View.X_AXIS or * View.Y_AXIS * @return the minimum span the view can be rendered into - * @see text.ParagraphView#getMinimumSpan + * @see javax.swing.text.ParagraphView#getMinimumSpan */ public float getMinimumSpan(int axis) { if (!visible) { @@ -160,7 +160,7 @@ class NoFramesView extends BlockView { * @param axis may be either View.X_AXIS or * View.Y_AXIS * @return the maximum span the view can be rendered into - * @see text.ParagraphView#getMaximumSpan + * @see javax.swing.text.ParagraphView#getMaximumSpan */ public float getMaximumSpan(int axis) { if (!visible) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/text/html/package-info.java new file mode 100644 index 00000000000..a5bab382ddc --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/package-info.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides the class {@code HTMLEditorKit} and supporting classes for creating + * HTML text editors. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *

              Package Specification

              + * + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.text.html; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/package.html b/jdk/src/java.desktop/share/classes/javax/swing/text/html/package.html deleted file mode 100644 index c9c41b8cc22..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/package.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - -Provides the class HTMLEditorKit and supporting classes -for creating HTML text editors. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -

              Package Specification

              - - - - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java b/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java index 9aa36bf39b2..3a31d25be34 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java @@ -2119,8 +2119,11 @@ class Parser implements DTDConstants { } /* To account for extra read()'s that happened */ - for (int j = 0; j < i; j++) { - addString(charsToAdd[j]); + if (i > 0) { + for (int j = 0; j < i; j++) { + addString(charsToAdd[j]); + } + continue; } switch (ch) { case -1: diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/package-info.java new file mode 100644 index 00000000000..4549d5df5b8 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/package-info.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides the default HTML parser, along with support classes. As the stream + * is parsed, the parser notifies a delegate, which must implement the + * {@code HTMLEditorKit.ParserCallback} interface. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @see javax.swing.text.html.HTMLEditorKit.ParserCallback + * @since 1.2 + * @serial exclude + */ +package javax.swing.text.html.parser; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/package.html b/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/package.html deleted file mode 100644 index 05c53989142..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/package.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - -Provides the default HTML parser, along with support classes. -As the stream is parsed, -the parser notifies a delegate, -which must implement -the HTMLEditorKit.ParserCallback interface. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@see javax.swing.text.html.HTMLEditorKit.ParserCallback -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/text/package-info.java new file mode 100644 index 00000000000..424af3b6033 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/package-info.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces that deal with editable and noneditable text + * components. Examples of text components are text fields and text areas, of + * which password fields and document editors are special instantiations. + * Features that are supported by this package include selection/highlighting, + * editing, style, and key mapping. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *

              Related Documentation

              + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + * + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.text; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/package.html b/jdk/src/java.desktop/share/classes/javax/swing/text/package.html deleted file mode 100644 index 1c38c251066..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/package.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -Provides classes and interfaces that deal with editable -and noneditable text components. Examples of text components are text -fields and text areas, of which password fields and document editors -are special instantiations. Features that are supported by this -package include selection/highlighting, editing, style, -and key mapping. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -

              Related Documentation

              - -For overviews, tutorials, examples, guides, and tool documentation, please see: - - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFGenerator.java b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFGenerator.java index 226080f999a..fe04ed4826c 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFGenerator.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -42,12 +42,8 @@ import javax.swing.text.*; *

              Note that this is a lossy conversion since RTF's model of * text does not exactly correspond with LightText's. * - * @see LTAttributedText - * @see LTRTFFilter - * @see LTTextAcceptor * @see java.io.OutputStream */ - class RTFGenerator extends Object { /* These dictionaries map Colors, font names, or Style objects diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFParser.java b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFParser.java index 2b4969dda1e..f9a04159c72 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFParser.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -32,11 +32,11 @@ import java.lang.*; * and passes a stream of control words, text, and begin/end group * indications to its subclass. * - * Normally programmers will only use RTFFilter, a subclass of this class that knows what to + * Normally programmers will only use RTFReader, a subclass of this class that knows what to * do with the tokens this class parses. * * @see AbstractFilter - * @see RTFFilter + * @see RTFReader */ abstract class RTFParser extends AbstractFilter { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/package-info.java new file mode 100644 index 00000000000..1fda47d4055 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/package-info.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides a class ({@code RTFEditorKit}) for creating Rich-Text-Format text + * editors. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.text.rtf; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/package.html b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/package.html deleted file mode 100644 index 9b62f229a93..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/package.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - -Provides a class (RTFEditorKit) for creating Rich-Text-Format -text editors. - -

              - -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java index c7cdfc366ea..73fc667c185 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,10 +60,16 @@ import sun.swing.DefaultLookup; * that have a value of type {@code UIResource} are refreshed from the * defaults table. The following table lists the mapping between * {@code DefaultTreeCellRenderer} property and defaults table key: - * - * - *
              Property: - * Key: + * + * + * + * + * + * + * + * * *
              Properties
              Property: + * Key: + *
              "leafIcon""Tree.leafIcon" *
              "closedIcon""Tree.closedIcon" *
              "openIcon""Tree.openIcon" @@ -72,9 +78,10 @@ import sun.swing.DefaultLookup; *
              "backgroundSelectionColor""Tree.selectionBackground" *
              "backgroundNonSelectionColor""Tree.textBackground" *
              "borderSelectionColor""Tree.selectionBorderColor" + *
              *

              - * Implementation Note: + * Implementation Note: * This class overrides * invalidate, * validate, diff --git a/jdk/src/java.desktop/share/classes/javax/swing/tree/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/tree/package-info.java new file mode 100644 index 00000000000..ce57345e815 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/package-info.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces for dealing with {@code javax.swing.JTree}. + * You use these classes and interfaces if you want control over how trees are + * constructed, updated, and rendered, as well as how data associated with the + * tree nodes are viewed and managed. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *

              Related Documentation

              + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + * + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.tree; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/tree/package.html b/jdk/src/java.desktop/share/classes/javax/swing/tree/package.html deleted file mode 100644 index e820b3cb364..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/tree/package.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - -Provides classes and interfaces for dealing with -javax.swing.JTree. You use these classes and interfaces if you want -control over how trees are constructed, updated, and rendered, as well -as how data associated with the tree nodes are viewed and managed. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - - -

              Related Documentation

              - -For overviews, tutorials, examples, guides, and tool documentation, please see: - - - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/undo/UndoManager.java b/jdk/src/java.desktop/share/classes/javax/swing/undo/UndoManager.java index cb85826e611..42c2494c6e5 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/undo/UndoManager.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/undo/UndoManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -57,11 +57,12 @@ import sun.swing.text.UndoableEditLockSupport; * upper-case letter in bold are significant, those in lower-case * and italicized are insignificant. *

              - * - * + * + *
              + * *
              Figure 1
              * - *
              Figure 1 + *
              Figure 1 *
              *

              * As shown in figure 1, if D was just added, the @@ -70,11 +71,12 @@ import sun.swing.text.UndoableEditLockSupport; * index of the next edit to 3 (edit c), as shown in the following * figure. *

              - * - * + * + *
              + * *
              Figure 2
              * - *
              Figure 2 + *
              Figure 2 *
              *

              * The last significant edit is A, so that invoking @@ -82,11 +84,12 @@ import sun.swing.text.UndoableEditLockSupport; * b, and A, in that order, setting the index of the * next edit to 0, as shown in the following figure. *

              - * - * + * + *
              + * *
              Figure 3
              * - *
              Figure 3 + *
              Figure 3 *
              *

              * Invoking redo results in invoking redo on @@ -108,11 +111,12 @@ import sun.swing.text.UndoableEditLockSupport; * the new edit is added after c, as shown in the following * figure. *

              - * - * + * + *
              + * *
              Figure 4
              * - *
              Figure 4 + *
              Figure 4 *
              *

              * Once end has been invoked on an UndoManager diff --git a/jdk/src/java.desktop/share/classes/javax/swing/undo/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/undo/package-info.java new file mode 100644 index 00000000000..789f0f34997 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/undo/package-info.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Allows developers to provide support for undo/redo in applications such as + * text editors. + *

              + * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *

              Related Documentation

              + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + * + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.undo; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/undo/package.html b/jdk/src/java.desktop/share/classes/javax/swing/undo/package.html deleted file mode 100644 index bf6d809fafb..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/undo/package.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - -Allows developers to provide support for undo/redo -in applications such as text editors. - -

              -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -

              Related Documentation

              - -For overviews, tutorials, examples, guides, and tool documentation, please see: - - - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/module-info.java b/jdk/src/java.desktop/share/classes/module-info.java index bb7abf11909..17bff50f8c7 100644 --- a/jdk/src/java.desktop/share/classes/module-info.java +++ b/jdk/src/java.desktop/share/classes/module-info.java @@ -26,11 +26,33 @@ /** * Defines the AWT and Swing user interface toolkits, plus APIs for * accessibility, audio, imaging, printing, and JavaBeans. + * + * @uses java.awt.im.spi.InputMethodDescriptor + * @uses javax.accessibility.AccessibilityProvider + * @uses javax.imageio.spi.ImageInputStreamSpi + * @uses javax.imageio.spi.ImageOutputStreamSpi + * @uses javax.imageio.spi.ImageReaderSpi + * @uses javax.imageio.spi.ImageTranscoderSpi + * @uses javax.imageio.spi.ImageWriterSpi + * @uses javax.print.PrintServiceLookup + * @uses javax.print.StreamPrintServiceFactory + * @uses javax.sound.midi.spi.MidiDeviceProvider + * @uses javax.sound.midi.spi.MidiFileReader + * @uses javax.sound.midi.spi.MidiFileWriter + * @uses javax.sound.midi.spi.SoundbankReader + * @uses javax.sound.sampled.spi.AudioFileReader + * @uses javax.sound.sampled.spi.AudioFileWriter + * @uses javax.sound.sampled.spi.FormatConversionProvider + * @uses javax.sound.sampled.spi.MixerProvider + * + * @moduleGraph + * @since 9 */ module java.desktop { + requires java.prefs; + requires transitive java.datatransfer; requires transitive java.xml; - requires java.prefs; exports java.applet; exports java.awt; @@ -88,9 +110,6 @@ module java.desktop { exports sun.awt to jdk.accessibility; - exports com.sun.awt to - jdk.desktop; - opens javax.swing.plaf.basic to jdk.jconsole; opens com.sun.java.swing.plaf.windows to @@ -114,10 +133,17 @@ module java.desktop { uses javax.sound.sampled.spi.FormatConversionProvider; uses javax.sound.sampled.spi.MixerProvider; - provides sun.datatransfer.DesktopDatatransferService with sun.awt.datatransfer.DesktopDatatransferServiceImpl; - provides java.net.ContentHandlerFactory with sun.awt.www.content.MultimediaContentHandlers; - provides javax.print.PrintServiceLookup with sun.print.PrintServiceLookupProvider; - provides javax.print.StreamPrintServiceFactory with sun.print.PSStreamPrinterFactory; + provides sun.datatransfer.DesktopDatatransferService with + sun.awt.datatransfer.DesktopDatatransferServiceImpl; + + provides java.net.ContentHandlerFactory with + sun.awt.www.content.MultimediaContentHandlers; + + provides javax.print.PrintServiceLookup with + sun.print.PrintServiceLookupProvider; + + provides javax.print.StreamPrintServiceFactory with + sun.print.PSStreamPrinterFactory; provides javax.sound.midi.spi.MidiDeviceProvider with com.sun.media.sound.MidiInDeviceProvider, @@ -125,14 +151,17 @@ module java.desktop { com.sun.media.sound.RealTimeSequencerProvider, com.sun.media.sound.SoftProvider; - provides javax.sound.midi.spi.MidiFileReader with com.sun.media.sound.StandardMidiFileReader; - provides javax.sound.midi.spi.MidiFileWriter with com.sun.media.sound.StandardMidiFileWriter; + provides javax.sound.midi.spi.MidiFileReader with + com.sun.media.sound.StandardMidiFileReader; + + provides javax.sound.midi.spi.MidiFileWriter with + com.sun.media.sound.StandardMidiFileWriter; provides javax.sound.midi.spi.SoundbankReader with - com.sun.media.sound.AudioFileSoundbankReader, - com.sun.media.sound.DLSSoundbankReader, - com.sun.media.sound.JARSoundbankReader, - com.sun.media.sound.SF2SoundbankReader; + com.sun.media.sound.AudioFileSoundbankReader, + com.sun.media.sound.DLSSoundbankReader, + com.sun.media.sound.JARSoundbankReader, + com.sun.media.sound.SF2SoundbankReader; provides javax.sound.sampled.spi.AudioFileReader with com.sun.media.sound.AiffFileReader, @@ -158,4 +187,3 @@ module java.desktop { com.sun.media.sound.DirectAudioDeviceProvider, com.sun.media.sound.PortMixerProvider; } - diff --git a/jdk/src/java.desktop/share/classes/sun/applet/AppletSecurity.java b/jdk/src/java.desktop/share/classes/sun/applet/AppletSecurity.java index d28374bf5cf..f5384fb2cc1 100644 --- a/jdk/src/java.desktop/share/classes/sun/applet/AppletSecurity.java +++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletSecurity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -109,7 +109,8 @@ class AppletSecurity extends AWTSecurityManager { /** * get the current (first) instance of an AppletClassLoader on the stack. */ - @SuppressWarnings("deprecation") + @SuppressWarnings({"deprecation", + "removal"}) // SecurityManager.currentClassLoader() private AppletClassLoader currentAppletClassLoader() { // try currentClassLoader first @@ -298,7 +299,8 @@ class AppletSecurity extends AWTSecurityManager { * @exception SecurityException if the caller does not have * permission to access the AWT event queue. */ - @SuppressWarnings("deprecation") + @SuppressWarnings({"deprecation", + "removal"}) // SecurityManager.checkAwtEventQueueAccess public void checkAwtEventQueueAccess() { AppContext appContext = AppContext.getAppContext(); AppletClassLoader appletClassLoader = currentAppletClassLoader(); diff --git a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ko.java b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ko.java index 2705f8dea7d..3b9e685341e 100644 --- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ko.java +++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ko.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -138,7 +138,7 @@ public class MsgAppletViewer_ko extends ListResourceBundle { {"appletpanel.fileexception", "\uB85C\uB4DC \uC911 {0} \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {1}"}, {"appletpanel.filedeath", "\uB85C\uB4DC \uC911 {0}\uC774(\uAC00) \uC885\uB8CC\uB428: {1}"}, {"appletpanel.fileerror", "\uB85C\uB4DC \uC911 {0} \uC624\uB958 \uBC1C\uC0DD: {1}"}, - {"appletpanel.badattribute.exception", "HTML \uAD6C\uBB38 \uBD84\uC11D \uC911: width/height \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, + {"appletpanel.badattribute.exception", "HTML \uAD6C\uBB38\uBD84\uC11D \uC911: width/height \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, {"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream\uC5D0 \uB110\uC774 \uC544\uB2CC \uB85C\uB354\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."}, {"appletprops.title", "AppletViewer \uC18D\uC131"}, {"appletprops.label.http.server", "HTTP \uD504\uB85D\uC2DC \uC11C\uBC84:"}, diff --git a/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java b/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java index 29a435c96b9..39b14d8d7dc 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java @@ -93,12 +93,6 @@ public final class AWTAccessor { * its parent. */ Rectangle getBounds(Component comp); - /* - * Sets the shape of a lw component to cut out from hw components. - * - * See 6797587, 6776743, 6768307, and 6768332 for details - */ - void setMixingCutoutShape(Component comp, Shape shape); /** * Sets GraphicsConfiguration value for the component. diff --git a/jdk/src/java.desktop/share/classes/sun/awt/CustomCursor.java b/jdk/src/java.desktop/share/classes/sun/awt/CustomCursor.java index 6dad03c8c71..2b65c5dbe8c 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/CustomCursor.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/CustomCursor.java @@ -66,7 +66,8 @@ public abstract class CustomCursor extends Cursor { // Scale image to nearest supported size. Dimension nativeSize = toolkit.getBestCursorSize(width, height); - if (nativeSize.width != width || nativeSize.height != height) { + if ((nativeSize.width != width || nativeSize.height != height) && + (nativeSize.width != 0 && nativeSize.height != 0)) { cursor = cursor.getScaledInstance(nativeSize.width, nativeSize.height, Image.SCALE_DEFAULT); diff --git a/jdk/src/java.desktop/share/classes/sun/awt/HToolkit.java b/jdk/src/java.desktop/share/classes/sun/awt/HToolkit.java index fb569e3b56b..31ecb3ac736 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/HToolkit.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/HToolkit.java @@ -174,18 +174,6 @@ public final class HToolkit extends SunToolkit implements ComponentFactory { return null; } - @Override - public int getScreenHeight() - throws HeadlessException { - throw new HeadlessException(); - } - - @Override - public int getScreenWidth() - throws HeadlessException { - throw new HeadlessException(); - } - @Override public Dimension getScreenSize() throws HeadlessException { diff --git a/jdk/src/java.desktop/share/classes/sun/awt/HeadlessToolkit.java b/jdk/src/java.desktop/share/classes/sun/awt/HeadlessToolkit.java index eae02678586..d603c87bf81 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/HeadlessToolkit.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/HeadlessToolkit.java @@ -172,16 +172,6 @@ public final class HeadlessToolkit extends Toolkit return null; } - public int getScreenHeight() - throws HeadlessException { - throw new HeadlessException(); - } - - public int getScreenWidth() - throws HeadlessException { - throw new HeadlessException(); - } - @Override public Dimension getScreenSize() throws HeadlessException { diff --git a/jdk/src/java.desktop/share/classes/sun/awt/NullComponentPeer.java b/jdk/src/java.desktop/share/classes/sun/awt/NullComponentPeer.java index f95df58145f..90fdc124603 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/NullComponentPeer.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/NullComponentPeer.java @@ -126,6 +126,7 @@ public class NullComponentPeer implements LightweightPeer, public void coalescePaintEvent(PaintEvent e) { } + @SuppressWarnings("deprecation") public boolean handleEvent(Event e) { return false; } diff --git a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java index de1d303a1a9..57e36f27add 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java @@ -30,6 +30,7 @@ import java.awt.event.InputEvent; import java.awt.event.KeyEvent; import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; +import java.awt.image.ColorModel; import java.awt.image.DataBuffer; import java.awt.image.DataBufferInt; import java.awt.image.ImageObserver; @@ -560,10 +561,17 @@ public abstract class SunToolkit extends Toolkit @Override public Dimension getScreenSize() { - return new Dimension(getScreenWidth(), getScreenHeight()); + return GraphicsEnvironment.getLocalGraphicsEnvironment() + .getDefaultScreenDevice().getDefaultConfiguration() + .getBounds().getSize(); + } + + @Override + public ColorModel getColorModel() throws HeadlessException { + return GraphicsEnvironment.getLocalGraphicsEnvironment() + .getDefaultScreenDevice().getDefaultConfiguration() + .getColorModel(); } - protected abstract int getScreenWidth(); - protected abstract int getScreenHeight(); @Override @SuppressWarnings("deprecation") @@ -1049,6 +1057,7 @@ public abstract class SunToolkit extends Toolkit /** * Returns key modifiers used by Swing to set up a focus accelerator key stroke. */ + @SuppressWarnings("deprecation") public int getFocusAcceleratorKeyMask() { return InputEvent.ALT_MASK; } @@ -1059,6 +1068,7 @@ public abstract class SunToolkit extends Toolkit * the way things work on Windows: here, pressing ctrl + alt allows user to enter * characters from the extended character set (like euro sign or math symbols) */ + @SuppressWarnings("deprecation") public boolean isPrintableCharacterModifiersMask(int mods) { return ((mods & InputEvent.ALT_MASK) == (mods & InputEvent.CTRL_MASK)); } diff --git a/jdk/src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java b/jdk/src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java index 8d37a2d6a1d..ac42b424152 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -472,6 +472,7 @@ public class BufImgSurfaceData extends SurfaceData { this.pData = pData; } + @SuppressWarnings("deprecation") public void finalize() { if (pData != 0L) { BufImgSurfaceData.freeNativeICMData(pData); diff --git a/jdk/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java b/jdk/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java index ac00075c16a..c04aac4a1c5 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -24,14 +24,16 @@ */ package sun.awt.image; + +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.image.DataBuffer; +import java.awt.image.DataBufferByte; +import java.awt.image.MultiPixelPackedSampleModel; import java.awt.image.Raster; -import java.awt.image.WritableRaster; import java.awt.image.RasterFormatException; import java.awt.image.SampleModel; -import java.awt.image.MultiPixelPackedSampleModel; -import java.awt.image.DataBufferByte; -import java.awt.Rectangle; -import java.awt.Point; +import java.awt.image.WritableRaster; /** * This class is useful for describing 1, 2, or 4 bit image data diff --git a/jdk/src/java.desktop/share/classes/sun/awt/resources/awt_sv.properties b/jdk/src/java.desktop/share/classes/sun/awt/resources/awt_sv.properties index d114d9ff98d..39d6ffd1994 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/resources/awt_sv.properties +++ b/jdk/src/java.desktop/share/classes/sun/awt/resources/awt_sv.properties @@ -71,7 +71,7 @@ AWT.f21=F21 AWT.f22=F22 AWT.f23=F23 AWT.f24=F24 -AWT.printScreen=Print Screen +AWT.printScreen=Sk\u00E4rmutskrift AWT.insert=Insert AWT.help=Hj\u00E4lp AWT.windows=Windows diff --git a/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java b/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java index 622a04d472e..bc136d75cfa 100644 --- a/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java +++ b/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java @@ -93,20 +93,25 @@ public final class CompositeFont extends Font2D { * better that it is handled internally to the CompositeFont class. */ if (fm.getEUDCFont() != null) { + int msCnt = numMetricsSlots; + int fbCnt = numSlots - msCnt; numSlots++; if (componentNames != null) { componentNames = new String[numSlots]; - System.arraycopy(compNames, 0, componentNames, 0, numSlots-1); - componentNames[numSlots-1] = - fm.getEUDCFont().getFontName(null); + System.arraycopy(compNames, 0, componentNames, 0, msCnt); + componentNames[msCnt] = fm.getEUDCFont().getFontName(null); + System.arraycopy(compNames, msCnt, + componentNames, msCnt+1, fbCnt); } if (componentFileNames != null) { componentFileNames = new String[numSlots]; System.arraycopy(compFileNames, 0, - componentFileNames, 0, numSlots-1); + componentFileNames, 0, msCnt); + System.arraycopy(compFileNames, msCnt, + componentFileNames, msCnt+1, fbCnt); } components = new PhysicalFont[numSlots]; - components[numSlots-1] = fm.getEUDCFont(); + components[msCnt] = fm.getEUDCFont(); deferredInitialisation = new boolean[numSlots]; if (defer) { for (int i=0; i= strikes.length) { + slot = 0; + } PhysicalStrike strike = strikes[slot]; if (strike == null) { strike = diff --git a/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java b/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java index 67aee9e18db..657ffa16ce5 100644 --- a/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java +++ b/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java @@ -626,7 +626,11 @@ class ExtendedTextSourceLabel extends ExtendedTextLabel implements Decoration.La glyphinfo = gv.getGlyphInfo(); } catch (Exception e) { - System.out.println(source); + if (DEBUG) { + System.err.println(source); + e.printStackTrace(); + } + glyphinfo = new float[gv.getNumGlyphs() * numvals]; } int numGlyphs = gv.getNumGlyphs(); @@ -775,7 +779,7 @@ class ExtendedTextSourceLabel extends ExtendedTextLabel implements Decoration.La if (gx == gxlimit) { tgt = charInfo.length / numvals; } else { - tgt = indices[gx]-1; + tgt = indices[gx]; } if (DEBUG) { System.err.println("gx=" + gx + " gxlimit=" + gxlimit + diff --git a/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java b/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java index 7b6cac69765..16d1d41dd7b 100644 --- a/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java +++ b/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java @@ -27,6 +27,7 @@ package sun.font; import java.io.File; import java.awt.Font; +import java.io.IOException; import java.util.Collection; import java.util.HashMap; import java.util.concurrent.ConcurrentHashMap; @@ -132,6 +133,16 @@ public class FontFamily { FileFont newFont = (FileFont)font; File newDir = (new File(newFont.platName)).getParentFile(); + if (existDir != null) { + try { + existDir = existDir.getCanonicalFile(); + } catch (IOException ignored) {} + } + if (newDir != null) { + try { + newDir = newDir.getCanonicalFile(); + } catch (IOException ignored) {} + } return java.util.Objects.equals(newDir, existDir); } diff --git a/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java b/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java index 4c0abc9eec8..d2ae86ef3b4 100644 --- a/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java +++ b/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -3633,6 +3633,7 @@ public final class SunGraphics2D * enough to know that if our override is empty then it should not * mark us as finalizeable. */ + @SuppressWarnings("deprecation") public void finalize() { // DO NOT REMOVE THIS METHOD } diff --git a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java index a3bddaa39b0..d578fa89470 100644 --- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java +++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java @@ -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 @@ -153,11 +153,11 @@ public class MarlinRenderingEngine extends RenderingEngine * The specified {@code src} {@link Shape} is widened according * to the parameters specified by the {@link BasicStroke} object. * Adjustments are made to the path as appropriate for the - * {@link VALUE_STROKE_NORMALIZE} hint if the {@code normalize} - * boolean parameter is true. + * {@link java.awt.RenderingHints#VALUE_STROKE_NORMALIZE} hint if the + * {@code normalize} boolean parameter is true. * Adjustments are made to the path as appropriate for the - * {@link VALUE_ANTIALIAS_ON} hint if the {@code antialias} - * boolean parameter is true. + * {@link java.awt.RenderingHints#VALUE_ANTIALIAS_ON} hint if the + * {@code antialias} boolean parameter is true. *

              * The geometry of the widened path is forwarded to the indicated * {@link PathConsumer2D} object as it is calculated. diff --git a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/RegionClipSpanIterator.java b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/RegionClipSpanIterator.java index 69bba24c2a6..cf8193f0c42 100644 --- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/RegionClipSpanIterator.java +++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/RegionClipSpanIterator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -383,6 +383,7 @@ public class RegionClipSpanIterator implements SpanIterator { */ //public native void dispose(); + @SuppressWarnings("deprecation") protected void finalize() { //dispose(); } diff --git a/jdk/src/java.desktop/share/classes/sun/print/DialogOnTop.java b/jdk/src/java.desktop/share/classes/sun/print/DialogOnTop.java new file mode 100644 index 00000000000..821e4e0beee --- /dev/null +++ b/jdk/src/java.desktop/share/classes/sun/print/DialogOnTop.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.print; + +import javax.print.attribute.Attribute; +import javax.print.attribute.PrintRequestAttribute; + +/* + * An implementation class used to request the dialog be set always-on-top. + * It needs to be read and honoured by the dialog code which will use + * java.awt.Window.setAlwaysOnTop(true) in cases where it is supported. + */ +public class DialogOnTop implements PrintRequestAttribute { + + private static final long serialVersionUID = -1901909867156076547L; + + long id; + + public DialogOnTop() { + } + + public DialogOnTop(long id) { + this.id = id; + } + + public final Class getCategory() { + return DialogOnTop.class; + } + + public long getID() { + return id; + } + + public final String getName() { + return "dialog-on-top"; + } + + public String toString() { + return "dialog-on-top"; + } +} diff --git a/jdk/src/java.desktop/share/classes/sun/print/PeekGraphics.java b/jdk/src/java.desktop/share/classes/sun/print/PeekGraphics.java index b76321d84a3..c273ca1d071 100644 --- a/jdk/src/java.desktop/share/classes/sun/print/PeekGraphics.java +++ b/jdk/src/java.desktop/share/classes/sun/print/PeekGraphics.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1336,6 +1336,7 @@ public class PeekGraphics extends Graphics2D /** * Empty finalizer as no clean up needed here. */ + @SuppressWarnings("deprecation") public void finalize() { } diff --git a/jdk/src/java.desktop/share/classes/sun/print/PrintJob2D.java b/jdk/src/java.desktop/share/classes/sun/print/PrintJob2D.java index b62c4eb1298..9d9b2009af3 100644 --- a/jdk/src/java.desktop/share/classes/sun/print/PrintJob2D.java +++ b/jdk/src/java.desktop/share/classes/sun/print/PrintJob2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -942,6 +942,7 @@ public class PrintJob2D extends PrintJob implements Printable, Runnable { * Ends this print job once it is no longer referenced. * @see #end */ + @SuppressWarnings("deprecation") public void finalize() { end(); } diff --git a/jdk/src/java.desktop/share/classes/sun/print/ProxyGraphics.java b/jdk/src/java.desktop/share/classes/sun/print/ProxyGraphics.java index eefb49ee75a..5d50ab8ba9d 100644 --- a/jdk/src/java.desktop/share/classes/sun/print/ProxyGraphics.java +++ b/jdk/src/java.desktop/share/classes/sun/print/ProxyGraphics.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -1099,6 +1099,7 @@ public class ProxyGraphics extends Graphics { /** * Empty finalizer as no clean up needed here. */ + @SuppressWarnings("deprecation") public void finalize() { } diff --git a/jdk/src/java.desktop/share/classes/sun/print/ProxyGraphics2D.java b/jdk/src/java.desktop/share/classes/sun/print/ProxyGraphics2D.java index 6ded8e98eab..2fc626721e2 100644 --- a/jdk/src/java.desktop/share/classes/sun/print/ProxyGraphics2D.java +++ b/jdk/src/java.desktop/share/classes/sun/print/ProxyGraphics2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1264,6 +1264,7 @@ public class ProxyGraphics2D extends Graphics2D implements PrinterGraphics { /** * Empty finalizer as no clean up needed here. */ + @SuppressWarnings("deprecation") public void finalize() { } diff --git a/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java b/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java index 4988a20cc68..018ac519d00 100644 --- a/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java +++ b/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java @@ -785,7 +785,9 @@ public abstract class RasterPrinterJob extends PrinterJob { PrintService pservice = getPrintService(); PageFormat pageFrmAttrib = attributeToPageFormat(pservice, attributes); + setParentWindowID(attributes); PageFormat page = pageDialog(pageFrmAttrib); + clearParentWindowID(); // If user cancels the dialog, pageDialog() will return the original // page object and as per spec, we should return null in that case. @@ -828,6 +830,9 @@ public abstract class RasterPrinterJob extends PrinterJob { int x = gcBounds.x+50; int y = gcBounds.y+50; ServiceDialog pageDialog; + if (onTop != null) { + attributes.add(onTop); + } if (w instanceof Frame) { pageDialog = new ServiceDialog(gc, x, y, service, DocFlavor.SERVICE_FORMATTED.PAGEABLE, @@ -837,6 +842,7 @@ public abstract class RasterPrinterJob extends PrinterJob { DocFlavor.SERVICE_FORMATTED.PAGEABLE, attributes, (Dialog)w); } + Rectangle dlgBounds = pageDialog.getBounds(); // if portion of dialog is not within the gc boundary @@ -923,7 +929,9 @@ public abstract class RasterPrinterJob extends PrinterJob { } + setParentWindowID(attributes); boolean ret = printDialog(); + clearParentWindowID(); this.attributes = attributes; return ret; @@ -2539,4 +2547,26 @@ public abstract class RasterPrinterJob extends PrinterJob { return new String(out_chars, 0, pos); } } + + private DialogOnTop onTop = null; + + private long parentWindowID = 0L; + + /* Called from native code */ + private long getParentWindowID() { + return parentWindowID; + } + + private void clearParentWindowID() { + parentWindowID = 0L; + onTop = null; + } + + private void setParentWindowID(PrintRequestAttributeSet attrs) { + parentWindowID = 0L; + onTop = (DialogOnTop)attrs.get(DialogOnTop.class); + if (onTop != null) { + parentWindowID = onTop.getID(); + } + } } diff --git a/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java b/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java index 5dd2b4de046..c253332231b 100644 --- a/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java +++ b/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java @@ -184,6 +184,9 @@ public class ServiceDialog extends JDialog implements ActionListener { isAWT = true; } + if (attributes.get(DialogOnTop.class) != null) { + setAlwaysOnTop(true); + } Container c = getContentPane(); c.setLayout(new BorderLayout()); @@ -275,6 +278,10 @@ public class ServiceDialog extends JDialog implements ActionListener { this.asOriginal = attributes; this.asCurrent = new HashPrintRequestAttributeSet(attributes); + if (attributes.get(DialogOnTop.class) != null) { + setAlwaysOnTop(true); + } + Container c = getContentPane(); c.setLayout(new BorderLayout()); diff --git a/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java b/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java index 1d7b69da8bf..2629e44c36a 100644 --- a/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java +++ b/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java @@ -1831,6 +1831,7 @@ public class FilePane extends JPanel implements PropertyChangeListener { private class Handler implements MouseListener { private MouseListener doubleClickListener; + @SuppressWarnings("deprecation") public void mouseClicked(MouseEvent evt) { JComponent source = (JComponent)evt.getSource(); diff --git a/jdk/src/java.desktop/share/classes/sun/swing/LightweightContent.java b/jdk/src/java.desktop/share/classes/sun/swing/LightweightContent.java index a18d056aa2f..169332a44d1 100644 --- a/jdk/src/java.desktop/share/classes/sun/swing/LightweightContent.java +++ b/jdk/src/java.desktop/share/classes/sun/swing/LightweightContent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/jdk/src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java b/jdk/src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java index e3012853966..f263f2b3b4d 100644 --- a/jdk/src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java +++ b/jdk/src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java @@ -175,6 +175,7 @@ public class MenuItemLayoutHelper { arrowSize.origWidth = arrowSize.width; } + @SuppressWarnings("deprecation") private String getAccText(String acceleratorDelimiter) { String accText = ""; KeyStroke accelerator = mi.getAccelerator(); diff --git a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java index f55290b1ca1..c39043aa269 100644 --- a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java +++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java @@ -1460,7 +1460,7 @@ public class SwingUtilities2 { * * @param ie InputEvent to check */ - + @SuppressWarnings("deprecation") private static boolean isAccessClipboardGesture(InputEvent ie) { boolean allowedGesture = false; if (ie instanceof KeyEvent) { //we can validate only keyboard gestures @@ -2129,6 +2129,7 @@ public class SwingUtilities2 { return -1; } + @SuppressWarnings("deprecation") public static int getSystemMnemonicKeyMask() { Toolkit toolkit = Toolkit.getDefaultToolkit(); if (toolkit instanceof SunToolkit) { @@ -2163,6 +2164,41 @@ public class SwingUtilities2 { return false; } + /** + * Enables the antialiasing rendering hint for the scaled graphics and + * returns the previous hint value. + * The returned null value indicates that the passed graphics is not + * instance of Graphics2D. + * + * @param g the graphics + * @return the previous antialiasing rendering hint value if the passed + * graphics is instance of Graphics2D, null otherwise. + */ + public static Object getAndSetAntialisingHintForScaledGraphics(Graphics g) { + if (isScaledGraphics(g) && isLocalDisplay()) { + Graphics2D g2d = (Graphics2D) g; + Object hint = g2d.getRenderingHint(RenderingHints.KEY_ANTIALIASING); + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + return hint; + } + return null; + } + + /** + * Sets the antialiasing rendering hint if its value is not null. + * Null hint value indicates that the passed graphics is not instance of + * Graphics2D. + * + * @param g the graphics + * @param hint the antialiasing rendering hint + */ + public static void setAntialiasingHintForScaledGraphics(Graphics g, Object hint) { + if (hint != null) { + ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, hint); + } + } + public static boolean isFloatingPointScale(AffineTransform tx) { int type = tx.getType() & ~(TYPE_FLIP | TYPE_TRANSLATION); if (type == 0) { @@ -2195,6 +2231,35 @@ public class SwingUtilities2 { return UIManager.getBoolean(key); } + /** + * + * Returns the graphics configuration which bounds contain the given + * point + * + * @param current the default configuration which is checked in the first place + * @param x the x coordinate of the given point + * @param y the y coordinate of the given point + * @return the graphics configuration + */ + public static GraphicsConfiguration getGraphicsConfigurationAtPoint(GraphicsConfiguration current, double x, double y) { + + if (current.getBounds().contains(x, y)) { + return current; + } + + GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); + GraphicsDevice[] devices = env.getScreenDevices(); + + for (GraphicsDevice device : devices) { + GraphicsConfiguration config = device.getDefaultConfiguration(); + if (config.getBounds().contains(x, y)) { + return config; + } + } + + return current; + } + /** * Used to listen to "blit" repaints in RepaintManager. */ diff --git a/jdk/src/java.desktop/share/legal/colorimaging.md b/jdk/src/java.desktop/share/legal/colorimaging.md index e5a011b4823..12ceea85a42 100644 --- a/jdk/src/java.desktop/share/legal/colorimaging.md +++ b/jdk/src/java.desktop/share/legal/colorimaging.md @@ -1,5 +1,7 @@ ## Eastman Kodak Company: Kodak Color Management System (kcms) and portions of color management and imaging software -### Notice - +### Eastman Kodak Notice +

               Portions Copyright Eastman Kodak Company 1991-2003
              +
              + diff --git a/jdk/src/java.desktop/share/legal/jpeg.md b/jdk/src/java.desktop/share/legal/jpeg.md index 681d9f5bf8a..da64b2f7683 100644 --- a/jdk/src/java.desktop/share/legal/jpeg.md +++ b/jdk/src/java.desktop/share/legal/jpeg.md @@ -1,4 +1,4 @@ -## JPEG rb6 +## Independent JPEG Group: JPEG release 6b ### JPEG License
              diff --git a/jdk/src/java.desktop/share/legal/libpng.md b/jdk/src/java.desktop/share/legal/libpng.md
              index cd9f613d29f..5619bd1c8bb 100644
              --- a/jdk/src/java.desktop/share/legal/libpng.md
              +++ b/jdk/src/java.desktop/share/legal/libpng.md
              @@ -1,6 +1,6 @@
              -## Libpng v 1.6.23
              +## libpng v1.6.23
               
              -### Libpng License
              +### libpng License
               
               
               This copy of the libpng notices is provided for your convenience.  In case of
              diff --git a/jdk/src/java.desktop/share/legal/mesa3d.md b/jdk/src/java.desktop/share/legal/mesa3d.md
              index 50c2114af6a..3d2168e3247 100644
              --- a/jdk/src/java.desktop/share/legal/mesa3d.md
              +++ b/jdk/src/java.desktop/share/legal/mesa3d.md
              @@ -1,6 +1,6 @@
               ## Mesa 3-D Graphics Library v4.1
               
              -### Mesa 3-D Graphics Library License
              +### Mesa License
               
               
               Mesa 3-D graphics library
              diff --git a/jdk/src/java.desktop/share/native/include/jawt.h b/jdk/src/java.desktop/share/native/include/jawt.h
              index 8cb2cb8564d..2079b0bc1b3 100644
              --- a/jdk/src/java.desktop/share/native/include/jawt.h
              +++ b/jdk/src/java.desktop/share/native/include/jawt.h
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 1999, 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
              @@ -38,18 +38,22 @@ extern "C" {
                * The AWT native interface allows a native C or C++ application a means
                * by which to access native structures in AWT.  This is to facilitate moving
                * legacy C and C++ applications to Java and to target the needs of the
              - * community who, at present, wish to do their own native rendering to canvases
              - * for performance reasons.  Standard extensions such as Java3D also require a
              - * means to access the underlying native data structures of AWT.
              + * developers who need to do their own native rendering to canvases
              + * for performance or other reasons.
                *
              - * There may be future extensions to this API depending on demand.
              + * Conversely it also provides mechanisms for an application which already
              + * has a native window to provide that to AWT for AWT rendering.
                *
              - * A VM does not have to implement this API in order to pass the JCK.
              - * It is recommended, however, that this API is implemented on VMs that support
              - * standard extensions, such as Java3D.
              + * Since every platform may be different in its native data structures
              + * and APIs for windowing systems the application must necessarily
              + * provided per-platform source and compile and deliver per-platform
              + * native code  to use this API.
              + *
              + * These interfaces are not part of the Java SE specification and
              + * a VM is not required to implement this API. However it is strongly
              + * recommended that all implementations which support headful AWT
              + * also support these interfaces.
                *
              - * Since this is a native API, any program which uses it cannot be considered
              - * 100% pure java.
                */
               
               /*
              @@ -58,7 +62,7 @@ extern "C" {
                * For each platform, there is a native drawing surface structure.  This
                * platform-specific structure can be found in jawt_md.h.  It is recommended
                * that additional platforms follow the same model.  It is also recommended
              - * that VMs on Win32 and Solaris support the existing structures in jawt_md.h.
              + * that VMs on all platforms support the existing structures in jawt_md.h.
                *
                *******************
                * EXAMPLE OF USAGE:
              @@ -98,8 +102,8 @@ extern "C" {
                *     jboolean result;
                *     jint lock;
                *
              - *     // Get the AWT
              - *     awt.version = JAWT_VERSION_1_3;
              + *     // Get the AWT. Request version 9 to access features in that release.
              + *     awt.version = JAWT_VERSION_9;
                *     result = JAWT_GetAWT(env, &awt);
                *     assert(result != JNI_FALSE);
                *
              @@ -154,7 +158,7 @@ typedef struct jawt_DrawingSurfaceInfo {
                   /*
                    * Pointer to the platform-specific information.  This can be safely
                    * cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a
              -     * JAWT_X11DrawingSurfaceInfo on Solaris. On Mac OS X this is a
              +     * JAWT_X11DrawingSurfaceInfo on Linux and Solaris. On Mac OS X this is a
                    * pointer to a NSObject that conforms to the JAWT_SurfaceLayers
                    * protocol. See jawt_md.h for details.
                    */
              @@ -237,7 +241,8 @@ typedef struct jawt_DrawingSurface {
               typedef struct jawt {
                   /*
                    * Version of this structure.  This must always be set before
              -     * calling JAWT_GetAWT()
              +     * calling JAWT_GetAWT(). It affects the functions returned.
              +     * Must be one of the known pre-defined versions.
                    */
                   jint version;
                   /*
              @@ -332,6 +337,13 @@ typedef struct jawt {
               _JNI_IMPORT_OR_EXPORT_
               jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);
               
              +/*
              + * Specify one of these constants as the JAWT.version
              + * Specifying an earlier version will limit the available functions to
              + * those provided in that earlier version of JAWT.
              + * See the "Since" note on each API. Methods with no "Since"
              + * may be presumed to be present in JAWT_VERSION_1_3.
              + */
               #define JAWT_VERSION_1_3 0x00010003
               #define JAWT_VERSION_1_4 0x00010004
               #define JAWT_VERSION_1_7 0x00010007
              diff --git a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc
              index 8d817243038..027d8d790d7 100644
              --- a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc
              +++ b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc
              @@ -52,6 +52,9 @@ hb_jdk_get_glyph (hb_font_t *font HB_UNUSED,
               
                   *glyph = (hb_codepoint_t)
                         env->CallIntMethod(font2D, sunFontIDs.f2dCharToGlyphMID, u);
              +    if ((int)*glyph < 0) {
              +        *glyph = 0;
              +    }
                   return (*glyph != 0);
               }
               
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java
              index 62658c7e92e..f33fb5a4f2e 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 2009, 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
              @@ -25,17 +25,34 @@
               
               package sun.awt.X11;
               
              -import java.awt.*;
              -import java.awt.event.*;
              -import java.awt.peer.TrayIconPeer;
              -import sun.awt.*;
              -
              -import java.awt.image.*;
              -import java.text.BreakIterator;
              -import java.util.concurrent.ArrayBlockingQueue;
              +import java.awt.BorderLayout;
              +import java.awt.Button;
              +import java.awt.Color;
              +import java.awt.Component;
              +import java.awt.Container;
              +import java.awt.Dimension;
              +import java.awt.Font;
              +import java.awt.Frame;
              +import java.awt.GridLayout;
              +import java.awt.Image;
              +import java.awt.Insets;
              +import java.awt.Label;
              +import java.awt.MouseInfo;
              +import java.awt.Panel;
              +import java.awt.Point;
              +import java.awt.Rectangle;
              +import java.awt.Toolkit;
              +import java.awt.Window;
              +import java.awt.event.ActionEvent;
              +import java.awt.event.ActionListener;
              +import java.awt.event.MouseAdapter;
              +import java.awt.event.MouseEvent;
               import java.security.AccessController;
               import java.security.PrivilegedAction;
              -import java.lang.reflect.InvocationTargetException;
              +import java.text.BreakIterator;
              +import java.util.concurrent.ArrayBlockingQueue;
              +
              +import sun.awt.SunToolkit;
               
               /**
                * An utility window class. This is a base class for Tooltip and Balloon.
              @@ -81,16 +98,16 @@ public abstract class InfoWindow extends Window {
                       Dimension size = getSize();
                       Rectangle scrSize = getGraphicsConfiguration().getBounds();
               
              -        if (corner.x < scrSize.width/2 && corner.y < scrSize.height/2) { // 1st square
              +        if (corner.x < scrSize.x + scrSize.width/2 && corner.y < scrSize.y + scrSize.height/2) { // 1st square
                           setLocation(corner.x + indent, corner.y + indent);
               
              -        } else if (corner.x >= scrSize.width/2 && corner.y < scrSize.height/2) { // 2nd square
              +        } else if (corner.x >= scrSize.x + scrSize.width/2 && corner.y < scrSize.y + scrSize.height/2) { // 2nd square
                           setLocation(corner.x - indent - size.width, corner.y + indent);
               
              -        } else if (corner.x < scrSize.width/2 && corner.y >= scrSize.height/2) { // 3rd square
              +        } else if (corner.x < scrSize.x + scrSize.width/2 && corner.y >= scrSize.y + scrSize.height/2) { // 3rd square
                           setLocation(corner.x + indent, corner.y - indent - size.height);
               
              -        } else if (corner.x >= scrSize.width/2 && corner.y >= scrSize.height/2) { // 4th square
              +        } else if (corner.x >= scrSize.x +scrSize.width/2 && corner.y >= scrSize.y +scrSize.height/2) { // 4th square
                           setLocation(corner.x - indent - size.width, corner.y - indent - size.height);
                       }
               
              @@ -429,7 +446,7 @@ public abstract class InfoWindow extends Window {
                               gtkImagesLoaded = true;
                           }
                       }
              -
              +        @SuppressWarnings("deprecation")
                       private class ActionPerformer extends MouseAdapter {
                           public void mouseClicked(MouseEvent e) {
                               // hide the balloon by any click
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java
              index 2bb0fab22b5..5ef2e3ac0bf 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java
              @@ -385,7 +385,7 @@ final class ListHelper implements XScrollbarClient {
                       }
                       return false;
                   }
              -
              +    @SuppressWarnings("deprecation")
                   void handleVSBEvent(MouseEvent e, Rectangle bounds, int x, int y) {
                       int sbHeight = hsbVis ? bounds.height - SCROLLBAR_WIDTH : bounds.height;
               
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java
              index bb74478d299..a96fefc2207 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 2005, 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
              @@ -25,17 +25,15 @@
               package sun.awt.X11;
               
               import java.awt.*;
              -import java.awt.peer.*;
               import java.awt.event.*;
              -import java.awt.image.ColorModel;
               
               import sun.awt.*;
               
              +import java.awt.peer.ComponentPeer;
               import java.util.ArrayList;
               import java.util.Vector;
               import sun.util.logging.PlatformLogger;
               import sun.java2d.SurfaceData;
              -import sun.java2d.SunGraphics2D;
               
               /**
                * The abstract class XBaseMenuWindow is the superclass
              @@ -656,28 +654,37 @@ public abstract class XBaseMenuWindow extends XWindow {
                    *
                    ************************************************/
               
              +    GraphicsConfiguration getCurrentGraphicsConfiguration() {
              +        Component hw = SunToolkit.getHeavyweightComponent(target);
              +        XWindow peer = AWTAccessor.getComponentAccessor().getPeer(hw);
              +        if (peer != null && peer.graphicsConfig != null) {
              +            return peer.graphicsConfig;
              +        }
              +        return graphicsConfig;
              +    }
              +
                   /**
                    * Checks if window fits below specified item
                    * returns rectangle that the window fits to or null.
                    * @param itemBounds rectangle of item in global coordinates
                    * @param windowSize size of submenu window to fit
              -     * @param screenSize size of screen
              +     * @param screenBounds size of screen
                    */
              -    Rectangle fitWindowBelow(Rectangle itemBounds, Dimension windowSize, Dimension screenSize) {
              +    Rectangle fitWindowBelow(Rectangle itemBounds, Dimension windowSize, Rectangle screenBounds) {
                       int width = windowSize.width;
                       int height = windowSize.height;
                       //Fix for 6267162: PIT: Popup Menu gets hidden below the screen when opened
                       //near the periphery of the screen, XToolkit
                       //Window should be moved if it's outside top-left screen bounds
              -        int x = (itemBounds.x > 0) ? itemBounds.x : 0;
              -        int y = (itemBounds.y + itemBounds.height > 0) ? itemBounds.y + itemBounds.height : 0;
              -        if (y + height <= screenSize.height) {
              +        int x = (itemBounds.x > screenBounds.x) ? itemBounds.x : screenBounds.x;
              +        int y = (itemBounds.y + itemBounds.height > screenBounds.y) ? itemBounds.y + itemBounds.height : screenBounds.y;
              +        if (y + height <= screenBounds.y + screenBounds.height) {
                           //move it to the left if needed
              -            if (width > screenSize.width) {
              -                width = screenSize.width;
              +            if (width > screenBounds.width) {
              +                width = screenBounds.width;
                           }
              -            if (x + width > screenSize.width) {
              -                x = screenSize.width - width;
              +            if (x + width > screenBounds.x + screenBounds.width) {
              +                x = screenBounds.x + screenBounds.width - width;
                           }
                           return new Rectangle(x, y, width, height);
                       } else {
              @@ -690,23 +697,23 @@ public abstract class XBaseMenuWindow extends XWindow {
                    * returns rectangle that the window fits to or null.
                    * @param itemBounds rectangle of item in global coordinates
                    * @param windowSize size of submenu window to fit
              -     * @param screenSize size of screen
              +     * @param screenBounds size of screen
                    */
              -    Rectangle fitWindowAbove(Rectangle itemBounds, Dimension windowSize, Dimension screenSize) {
              +    Rectangle fitWindowAbove(Rectangle itemBounds, Dimension windowSize, Rectangle screenBounds) {
                       int width = windowSize.width;
                       int height = windowSize.height;
                       //Fix for 6267162: PIT: Popup Menu gets hidden below the screen when opened
                       //near the periphery of the screen, XToolkit
                       //Window should be moved if it's outside bottom-left screen bounds
              -        int x = (itemBounds.x > 0) ? itemBounds.x : 0;
              -        int y = (itemBounds.y > screenSize.height) ? screenSize.height - height : itemBounds.y - height;
              -        if (y >= 0) {
              +        int x = (itemBounds.x > screenBounds.x) ? itemBounds.x : screenBounds.x;
              +        int y = (itemBounds.y > screenBounds.y + screenBounds.height) ? screenBounds.y + screenBounds.height - height : itemBounds.y - height;
              +        if (y >= screenBounds.y) {
                           //move it to the left if needed
              -            if (width > screenSize.width) {
              -                width = screenSize.width;
              +            if (width > screenBounds.width) {
              +                width = screenBounds.width;
                           }
              -            if (x + width > screenSize.width) {
              -                x = screenSize.width - width;
              +            if (x + width > screenBounds.x + screenBounds.width) {
              +                x = screenBounds.x + screenBounds.width - width;
                           }
                           return new Rectangle(x, y, width, height);
                       } else {
              @@ -719,23 +726,23 @@ public abstract class XBaseMenuWindow extends XWindow {
                    * returns rectangle that the window fits to or null.
                    * @param itemBounds rectangle of item in global coordinates
                    * @param windowSize size of submenu window to fit
              -     * @param screenSize size of screen
              +     * @param screenBounds size of screen
                    */
              -    Rectangle fitWindowRight(Rectangle itemBounds, Dimension windowSize, Dimension screenSize) {
              +    Rectangle fitWindowRight(Rectangle itemBounds, Dimension windowSize, Rectangle screenBounds) {
                       int width = windowSize.width;
                       int height = windowSize.height;
                       //Fix for 6267162: PIT: Popup Menu gets hidden below the screen when opened
                       //near the periphery of the screen, XToolkit
                       //Window should be moved if it's outside top-left screen bounds
              -        int x = (itemBounds.x + itemBounds.width > 0) ? itemBounds.x + itemBounds.width : 0;
              -        int y = (itemBounds.y > 0) ? itemBounds.y : 0;
              -        if (x + width <= screenSize.width) {
              +        int x = (itemBounds.x + itemBounds.width > screenBounds.x) ? itemBounds.x + itemBounds.width : screenBounds.x;
              +        int y = (itemBounds.y > screenBounds.y) ? itemBounds.y : screenBounds.y;
              +        if (x + width <= screenBounds.x + screenBounds.width) {
                           //move it to the top if needed
              -            if (height > screenSize.height) {
              -                height = screenSize.height;
              +            if (height > screenBounds.height) {
              +                height = screenBounds.height;
                           }
              -            if (y + height > screenSize.height) {
              -                y = screenSize.height - height;
              +            if (y + height > screenBounds.y + screenBounds.height) {
              +                y = screenBounds.y + screenBounds.height - height;
                           }
                           return new Rectangle(x, y, width, height);
                       } else {
              @@ -748,23 +755,23 @@ public abstract class XBaseMenuWindow extends XWindow {
                    * returns rectangle that the window fits to or null.
                    * @param itemBounds rectangle of item in global coordinates
                    * @param windowSize size of submenu window to fit
              -     * @param screenSize size of screen
              +     * @param screenBounds size of screen
                    */
              -    Rectangle fitWindowLeft(Rectangle itemBounds, Dimension windowSize, Dimension screenSize) {
              +    Rectangle fitWindowLeft(Rectangle itemBounds, Dimension windowSize, Rectangle screenBounds) {
                       int width = windowSize.width;
                       int height = windowSize.height;
                       //Fix for 6267162: PIT: Popup Menu gets hidden below the screen when opened
                       //near the periphery of the screen, XToolkit
                       //Window should be moved if it's outside top-right screen bounds
              -        int x = (itemBounds.x < screenSize.width) ? itemBounds.x - width : screenSize.width - width;
              -        int y = (itemBounds.y > 0) ? itemBounds.y : 0;
              -        if (x >= 0) {
              +        int x = (itemBounds.x < screenBounds.x + screenBounds.width) ? itemBounds.x - width : screenBounds.x + screenBounds.width - width;
              +        int y = (itemBounds.y > screenBounds.y) ? itemBounds.y : screenBounds.y;
              +        if (x >= screenBounds.x) {
                           //move it to the top if needed
              -            if (height > screenSize.height) {
              -                height = screenSize.height;
              +            if (height > screenBounds.height) {
              +                height = screenBounds.height;
                           }
              -            if (y + height > screenSize.height) {
              -                y = screenSize.height - height;
              +            if (y + height > screenBounds.y + screenBounds.height) {
              +                y = screenBounds.y + screenBounds.height - height;
                           }
                           return new Rectangle(x, y, width, height);
                       } else {
              @@ -777,12 +784,12 @@ public abstract class XBaseMenuWindow extends XWindow {
                    * to fit it on screen - move it to the
                    * top-left edge and cut by screen dimensions
                    * @param windowSize size of submenu window to fit
              -     * @param screenSize size of screen
              +     * @param screenBounds size of screen
                    */
              -    Rectangle fitWindowToScreen(Dimension windowSize, Dimension screenSize) {
              -        int width = (windowSize.width < screenSize.width) ? windowSize.width : screenSize.width;
              -        int height = (windowSize.height < screenSize.height) ? windowSize.height : screenSize.height;
              -        return new Rectangle(0, 0, width, height);
              +    Rectangle fitWindowToScreen(Dimension windowSize, Rectangle screenBounds) {
              +        int width = (windowSize.width < screenBounds.width) ? windowSize.width : screenBounds.width;
              +        int height = (windowSize.height < screenBounds.height) ? windowSize.height : screenBounds.height;
              +        return new Rectangle(screenBounds.x, screenBounds.y, width, height);
                   }
               
               
              @@ -1087,7 +1094,9 @@ public abstract class XBaseMenuWindow extends XWindow {
                                     }
                                 } else {
                                     //Invoke action event
              -                      item.action(mouseEvent.getWhen(), mouseEvent.getModifiers());
              +                      @SuppressWarnings("deprecation")
              +                      final int modifiers = mouseEvent.getModifiers();
              +                      item.action(mouseEvent.getWhen(), modifiers);
                                     ungrabInput();
                                 }
                             } else {
              @@ -1200,7 +1209,9 @@ public abstract class XBaseMenuWindow extends XWindow {
                             if (citem instanceof XMenuPeer) {
                                 cwnd.selectItem(citem, true);
                             } else if (citem != null) {
              -                  citem.action(event.getWhen(), event.getModifiers());
              +                  @SuppressWarnings("deprecation")
              +                  final int modifiers = event.getModifiers();
              +                  citem.action(event.getWhen(), modifiers);
                                 ungrabInput();
                             }
                             break;
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java
              index 221093fa66b..dd5a016ab11 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java
              @@ -528,12 +528,12 @@ public class XBaseWindow {
                                   if (maxBounds.width != Integer.MAX_VALUE) {
                                       hints.set_max_width(scaleUp(maxBounds.width));
                                   } else {
              -                        hints.set_max_width(XToolkit.getDefaultScreenWidth());
              +                        hints.set_max_width(XToolkit.getMaxWindowWidthInPixels());
                                   }
                                   if (maxBounds.height != Integer.MAX_VALUE) {
                                       hints.set_max_height(scaleUp(maxBounds.height));
                                   } else {
              -                        hints.set_max_height(XToolkit.getDefaultScreenHeight());
              +                        hints.set_max_height(XToolkit.getMaxWindowHeightInPixels());
                                   }
                               } else {
                                   hints.set_max_width(scaleUp(width));
              @@ -545,12 +545,12 @@ public class XBaseWindow {
                                   if (maxBounds.width != Integer.MAX_VALUE) {
                                       hints.set_max_width(scaleUp(maxBounds.width));
                                   } else {
              -                        hints.set_max_width(scaleUp(XToolkit.getDefaultScreenWidth()));
              +                        hints.set_max_width(XToolkit.getMaxWindowWidthInPixels());
                                   }
                                   if (maxBounds.height != Integer.MAX_VALUE) {
                                       hints.set_max_height(scaleUp(maxBounds.height));
                                   } else {
              -                        hints.set_max_height(scaleUp(XToolkit.getDefaultScreenHeight()));
              +                        hints.set_max_height(XToolkit.getMaxWindowHeightInPixels());
                                   }
                               } else {
                                   // Leave intact
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java
              index 2e2bd0ef2a7..604272c90f3 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java
              @@ -120,7 +120,9 @@ public class XButtonPeer extends XComponentPeer implements ButtonPeer {
                             if (XToolkit.isLeftMouseButton(e)) {
                                 if (armed)
                                 {
              -                      action(e.getWhen(),e.getModifiers());
              +                      @SuppressWarnings("deprecation")
              +                      final int modifiers = e.getModifiers();
              +                      action(e.getWhen(), modifiers);
                                 }
                                 pressed = false;
                                 armed = false;
              @@ -168,7 +170,9 @@ public class XButtonPeer extends XComponentPeer implements ButtonPeer {
                                 pressed=true;
                                 armed=true;
                                 repaint();
              -                  action(e.getWhen(),e.getModifiers());
              +                  @SuppressWarnings("deprecation")
              +                  final int modifiers = e.getModifiers();
              +                  action(e.getWhen(), modifiers);
                             }
               
                             break;
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java
              index 54155cf128e..69e92bdaea7 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 2003, 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
              @@ -42,7 +42,7 @@ import sun.util.logging.PlatformLogger;
               
               // TODO: make painting more efficient (i.e. when down arrow is pressed, only two items should need to be repainted.
               
              -public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelStateListener {
              +public final class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelStateListener {
                   private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XChoicePeer");
               
                   private static final int MAX_UNFURLED_ITEMS = 10;  // Maximum number of
              @@ -482,7 +482,7 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
                       firstPress = false;
                       dragStartIdx = -1;
                   }
              -
              +    @SuppressWarnings("deprecation")
                   public void mouseDragged(MouseEvent e) {
                       /*
                        * fix for 5003166. On Motif user are unable to drag
              @@ -741,6 +741,16 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
                       }
                   }
               
              +    @Override
              +    protected void initGraphicsConfiguration() {
              +        super.initGraphicsConfiguration();
              +        // The popup have the same graphic config, so update it at the same time
              +        if (unfurledChoice != null) {
              +            unfurledChoice.initGraphicsConfiguration();
              +            unfurledChoice.doValidateSurface();
              +        }
              +    }
              +
                   /**************************************************************************/
                   /* Common functionality between List & Choice
                      /**************************************************************************/
              @@ -749,7 +759,7 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
                    * Inner class for the unfurled Choice list
                    * Much, much more docs
                    */
              -    class UnfurledChoice extends XWindow /*implements XScrollbarClient*/ {
              +    final class UnfurledChoice extends XWindow /*implements XScrollbarClient*/ {
               
                       // First try - use Choice as the target
               
              @@ -785,7 +795,7 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
                               numItemsDisplayed = Math.min(MAX_UNFURLED_ITEMS, numItems);
                           }
                           Point global = XChoicePeer.this.toGlobal(0,0);
              -            Rectangle screen = graphicsConfig.getBounds();
              +            Rectangle screenBounds = graphicsConfig.getBounds();
               
                           if (alignUnder != null) {
                               Rectangle choiceRec = XChoicePeer.this.getBounds();
              @@ -807,19 +817,19 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
                               height = 2*BORDER_WIDTH +
                                   numItemsDisplayed*(helper.getItemHeight()+2*ITEM_MARGIN);
                           }
              -            // Don't run off the edge of the screen
              -            if (x < 0) {
              -                x = 0;
              +            // Don't run off the edge of the screenBounds
              +            if (x < screenBounds.x) {
              +                x = screenBounds.x;
                           }
              -            else if (x + width > screen.width) {
              -                x = screen.width - width;
              +            else if (x + width > screenBounds.x + screenBounds.width) {
              +                x = screenBounds.x + screenBounds.width - width;
                           }
               
              -            if (y + height > screen.height) {
              +            if (y + height > screenBounds.y + screenBounds.height) {
                               y = global.y - height;
                           }
              -            if (y < 0) {
              -                y = 0;
              +            if (y < screenBounds.y) {
              +                y = screenBounds.y;
                           }
                           return new Rectangle(x, y, width, height);
                       }
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XContentWindow.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XContentWindow.java
              index 74444b8d2d6..c430ac45aaa 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XContentWindow.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XContentWindow.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 2003, 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
              @@ -139,6 +139,12 @@ public final class XContentWindow extends XWindow {
               
                   @Override
                   public void handleExposeEvent(XEvent xev) {
              +        if(parentFrame.isTargetUndecorated() &&
              +           XWM.getWMID() != XWM.UNITY_COMPIZ_WM &&
              +                width <= 0 && height <= 0) {
              +            // WM didn't send initial ConfigureNotify, so set the bounds here
              +            setContentBounds(parentFrame.getDimensions());
              +        }
                       if (width <= 0 || height <= 0) {
                           return;
                       }
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedServerTester.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedServerTester.java
              index 1bbae4f91f9..ab85a33064c 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedServerTester.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedServerTester.java
              @@ -452,6 +452,7 @@ public class XEmbedServerTester implements XEventDispatcher {
                       waitWindowActivated(res);
                       return res;
                   }
              +    @SuppressWarnings("deprecation")
                   private int activateServerNoWait(int prev) {
                       xembedLog.fine("Activating server");
                       int res = getEventPos();
              @@ -467,6 +468,7 @@ public class XEmbedServerTester implements XEventDispatcher {
                       robot.mouseRelease(InputEvent.BUTTON1_MASK);
                       return res;
                   }
              +    @SuppressWarnings("deprecation")
                   private int deactivateServer() {
                       xembedLog.fine("Deactivating server");
                       int res = getEventPos();
              @@ -480,6 +482,7 @@ public class XEmbedServerTester implements XEventDispatcher {
                       waitWindowDeactivated(res);
                       return res;
                   }
              +    @SuppressWarnings("deprecation")
                   private int focusServer() {
                       xembedLog.fine("Focusing server");
                       boolean weFocused = focused;
              @@ -740,6 +743,7 @@ public class XEmbedServerTester implements XEventDispatcher {
                   private void ungrabKey() {
                       sendMessage(XEmbedHelper.NON_STANDARD_XEMBED_GTK_UNGRAB_KEY, 0, accel_keysym, accel_mods);
                   }
              +    @SuppressWarnings("deprecation")
                   private int showModalDialog() {
                       xembedLog.fine("Showing modal dialog");
                       int res = getEventPos();
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java
              index e28817f06f8..cbebaee1525 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java
              @@ -573,7 +573,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
                           repaint();
                       }
                   }
              -
              +    @SuppressWarnings("deprecation")
                   void mousePressed(MouseEvent mouseEvent) {
                       if (log.isLoggable(PlatformLogger.Level.FINER)) {
                           log.finer(mouseEvent.toString() + ", hsb " + hsbVis + ", vsb " + vsbVis);
              @@ -641,6 +641,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
                           isMousePressed = true;
                       }
                   }
              +    @SuppressWarnings("deprecation")
                   void mouseReleased(MouseEvent mouseEvent) {
                       if (isEnabled() && mouseEvent.getButton() == MouseEvent.BUTTON1) {
                           //winReleaseCursorFocus();
              @@ -685,6 +686,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
                       }
                   }
               
              +    @SuppressWarnings("deprecation")
                   void mouseDragged(MouseEvent mouseEvent) {
                       // TODO: can you drag w/ any other buttons?  what about multiple buttons?
                       if (isEnabled() &&
              @@ -810,7 +812,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
                             break;
                       }
                   }
              -
              +    @SuppressWarnings("deprecation")
                   void keyPressed(KeyEvent e) {
                       int keyCode = e.getKeyCode();
                       if (log.isLoggable(PlatformLogger.Level.FINE)) {
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java
              index 65dda8489f1..4f48d7d389d 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java
              @@ -298,25 +298,25 @@ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
                    */
                   protected Rectangle getSubmenuBounds(Rectangle itemBounds, Dimension windowSize) {
                       Rectangle globalBounds = toGlobal(itemBounds);
              -        Dimension screenSize = graphicsConfig.getBounds().getSize();
              +        Rectangle screenBounds = getCurrentGraphicsConfiguration().getBounds();
                       Rectangle res;
              -        res = fitWindowBelow(globalBounds, windowSize, screenSize);
              +        res = fitWindowBelow(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        res = fitWindowAbove(globalBounds, windowSize, screenSize);
              +        res = fitWindowAbove(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        res = fitWindowRight(globalBounds, windowSize, screenSize);
              +        res = fitWindowRight(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        res = fitWindowLeft(globalBounds, windowSize, screenSize);
              +        res = fitWindowLeft(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        return fitWindowToScreen(windowSize, screenSize);
              +        return fitWindowToScreen(windowSize, screenBounds);
                   }
               
                   /**
              @@ -503,6 +503,7 @@ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
                    * This function is called from XWindow
                    * @see XWindow.handleF10onEDT()
                    */
              +    @SuppressWarnings("deprecation")
                   void handleF10KeyPress(KeyEvent event) {
                       int keyState = event.getModifiers();
                       if (((keyState & InputEvent.ALT_MASK) != 0) ||
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuWindow.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuWindow.java
              index 76d034adf89..ab929c324c2 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuWindow.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuWindow.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2002, 2014, 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
              @@ -278,25 +278,25 @@ public class XMenuWindow extends XBaseMenuWindow {
                    */
                   protected Rectangle getSubmenuBounds(Rectangle itemBounds, Dimension windowSize) {
                       Rectangle globalBounds = toGlobal(itemBounds);
              -        Dimension screenSize = graphicsConfig.getBounds().getSize();
              +        Rectangle screenBounds = getCurrentGraphicsConfiguration().getBounds();
                       Rectangle res;
              -        res = fitWindowRight(globalBounds, windowSize, screenSize);
              +        res = fitWindowRight(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        res = fitWindowBelow(globalBounds, windowSize, screenSize);
              +        res = fitWindowBelow(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        res = fitWindowAbove(globalBounds, windowSize, screenSize);
              +        res = fitWindowAbove(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        res = fitWindowLeft(globalBounds, windowSize, screenSize);
              +        res = fitWindowLeft(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        return fitWindowToScreen(windowSize, screenSize);
              +        return fitWindowToScreen(windowSize, screenBounds);
                  }
               
                   /**
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java
              index b976a2d71b3..27170b3fa1a 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2002, 2014, 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
              @@ -131,6 +131,7 @@ public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer {
                   /*
                    * From PopupMenuPeer
                    */
              +    @SuppressWarnings("deprecation")
                   public void show(Event e) {
                       target = (Component)e.target;
                       // Get menus from the target.
              @@ -215,25 +216,25 @@ public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer {
                    */
                   protected Rectangle getWindowBounds(Point origin, Dimension windowSize) {
                       Rectangle globalBounds = new Rectangle(origin.x, origin.y, 0, 0);
              -        Dimension screenSize = graphicsConfig.getBounds().getSize();
              +        Rectangle screenBounds = getCurrentGraphicsConfiguration().getBounds();
                       Rectangle res;
              -        res = fitWindowRight(globalBounds, windowSize, screenSize);
              +        res = fitWindowRight(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        res = fitWindowLeft(globalBounds, windowSize, screenSize);
              +        res = fitWindowLeft(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        res = fitWindowBelow(globalBounds, windowSize, screenSize);
              +        res = fitWindowBelow(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        res = fitWindowAbove(globalBounds, windowSize, screenSize);
              +        res = fitWindowAbove(globalBounds, windowSize, screenBounds);
                       if (res != null) {
                           return res;
                       }
              -        return fitWindowToScreen(windowSize, screenSize);
              +        return fitWindowToScreen(windowSize, screenBounds);
                  }
               
                   /************************************************
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java
              index 0dbd8e00e9b..4bfe673cfeb 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 2003, 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
              @@ -33,7 +33,6 @@ import sun.awt.AWTAccessor;
               import sun.awt.SunToolkit;
               import sun.awt.UNIXToolkit;
               import sun.awt.X11GraphicsConfig;
              -import sun.awt.X11GraphicsEnvironment;
               
               class XRobotPeer implements RobotPeer {
               
              @@ -77,14 +76,7 @@ class XRobotPeer implements RobotPeer {
               
                   @Override
                   public void mouseMove(int x, int y) {
              -        X11GraphicsEnvironment x11ge = (X11GraphicsEnvironment)
              -                GraphicsEnvironment.getLocalGraphicsEnvironment();
              -        if(x11ge.runningXinerama()) {
              -            Rectangle sb = xgc.getBounds();
              -            mouseMoveImpl(xgc, xgc.scaleUp(x + sb.x), xgc.scaleUp(y + sb.y));
              -        } else {
              -            mouseMoveImpl(xgc, xgc.scaleUp(x), xgc.scaleUp(y));
              -        }
              +        mouseMoveImpl(xgc, xgc.scaleUp(x), xgc.scaleUp(y));
                   }
               
                   @Override
              @@ -115,8 +107,7 @@ class XRobotPeer implements RobotPeer {
                   @Override
                   public int getRGBPixel(int x, int y) {
                       int pixelArray[] = new int[1];
              -        getRGBPixelsImpl(xgc, x, y, 1, 1, xgc.getScale(), pixelArray,
              -                         useGtk);
              +        getRGBPixelsImpl(xgc, x, y, 1, 1, pixelArray, useGtk);
                       return pixelArray[0];
                   }
               
              @@ -124,7 +115,7 @@ class XRobotPeer implements RobotPeer {
                   public int [] getRGBPixels(Rectangle bounds) {
                       int pixelArray[] = new int[bounds.width*bounds.height];
                       getRGBPixelsImpl(xgc, bounds.x, bounds.y, bounds.width, bounds.height,
              -                         xgc.getScale(), pixelArray, useGtk);
              +                            pixelArray, useGtk);
                       return pixelArray;
                   }
               
              @@ -140,6 +131,5 @@ class XRobotPeer implements RobotPeer {
                   private static synchronized native void keyReleaseImpl(int keycode);
               
                   private static synchronized native void getRGBPixelsImpl(X11GraphicsConfig xgc,
              -            int x, int y, int width, int height, int scale,
              -            int pixelArray[], boolean isGtkSupported);
              +            int x, int y, int width, int height, int pixelArray[], boolean isGtkSupported);
               }
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java
              index 80156180b31..d6f1d23129c 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java
              @@ -468,6 +468,7 @@ class XScrollPanePeer extends XComponentPeer implements ScrollPanePeer, XScrollb
                    * MouseEvent.MOUSE_EXITED
                    * MouseEvent.MOUSE_DRAGGED
                    */
              +    @SuppressWarnings("deprecation")
                   public void handleJavaMouseEvent( MouseEvent mouseEvent ) {
                       super.handleJavaMouseEvent(mouseEvent);
                       int modifiers = mouseEvent.getModifiers();
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java
              index ca43f7a501b..eece0075923 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java
              @@ -457,6 +457,7 @@ abstract class XScrollbar {
                    * MouseEvent.MOUSE_EXITED
                    * MouseEvent.MOUSE_DRAGGED
                    */
              +    @SuppressWarnings("deprecation")
                   public void handleMouseEvent(int id, int modifiers, int x, int y) {
                       if ((modifiers & InputEvent.BUTTON1_MASK) == 0) {
                           return;
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java
              index cf32749eea8..f7de3576ee0 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java
              @@ -126,6 +126,7 @@ class XScrollbarPeer extends XComponentPeer implements ScrollbarPeer, XScrollbar
                    * MouseEvent.MOUSE_EXITED
                    * MouseEvent.MOUSE_DRAGGED
                    */
              +    @SuppressWarnings("deprecation")
                   public void handleJavaMouseEvent( MouseEvent mouseEvent ) {
                       super.handleJavaMouseEvent(mouseEvent);
               
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java
              index 5d769203159..78107842321 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java
              @@ -1344,6 +1344,7 @@ final class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
                           }
                       }
               
              +        @SuppressWarnings("deprecation")
                       private static MouseEvent newMouseEvent(
                           Component source, Point point, MouseEvent template )
                       {
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java
              index 77514760937..49349f43f69 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java
              @@ -40,7 +40,6 @@ import java.awt.dnd.peer.DragSourceContextPeer;
               import java.awt.font.TextAttribute;
               import java.awt.im.InputMethodHighlight;
               import java.awt.im.spi.InputMethodDescriptor;
              -import java.awt.image.ColorModel;
               import java.awt.peer.*;
               import java.beans.PropertyChangeListener;
               import java.security.AccessController;
              @@ -108,12 +107,17 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
                   static UIDefaults uidefaults;
                   static final X11GraphicsEnvironment localEnv;
                   private static final X11GraphicsDevice device;
              -    private static final X11GraphicsConfig config;
                   private static final long display;
                   static int awt_multiclick_time;
                   static boolean securityWarningEnabled;
               
              -    private static volatile int screenWidth = -1, screenHeight = -1; // Dimensions of default screen
              +    /**
              +     * Dimensions of default virtual screen in pixels. These values are used to
              +     * limit the maximum size of the window.
              +     */
              +    private static volatile int maxWindowWidthInPixels = -1;
              +    private static volatile int maxWindowHeightInPixels = -1;
              +
                   static long awt_defaultFg; // Pixel
                   private static XMouseInfoPeer xPeer;
               
              @@ -122,13 +126,11 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
                       if (GraphicsEnvironment.isHeadless()) {
                           localEnv = null;
                           device = null;
              -            config = null;
                           display = 0;
                       } else {
                           localEnv = (X11GraphicsEnvironment) GraphicsEnvironment
                               .getLocalGraphicsEnvironment();
                           device = (X11GraphicsDevice) localEnv.getDefaultScreenDevice();
              -            config = (X11GraphicsConfig) device.getDefaultConfiguration();
                           display = device.getDisplay();
                           setupModifierMap();
                           initIDs();
              @@ -652,8 +654,8 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
                               @Override
                               public void displayChanged() {
                                   // 7045370: Reset the cached values
              -                    XToolkit.screenWidth = -1;
              -                    XToolkit.screenHeight = -1;
              +                    XToolkit.maxWindowWidthInPixels = -1;
              +                    XToolkit.maxWindowHeightInPixels = -1;
                               }
               
                               @Override
              @@ -670,7 +672,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
                   }
               
                   private static void initScreenSize() {
              -        if (screenWidth == -1 || screenHeight == -1) {
              +        if (maxWindowWidthInPixels == -1 || maxWindowHeightInPixels == -1) {
                           awtLock();
                           try {
                               XWindowAttributes pattr = new XWindowAttributes();
              @@ -678,8 +680,8 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
                                   XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(),
                                                                    XToolkit.getDefaultRootWindow(),
                                                                    pattr.pData);
              -                    screenWidth  = config.scaleDown(pattr.get_width());
              -                    screenHeight = config.scaleDown(pattr.get_height());
              +                    maxWindowWidthInPixels = pattr.get_width();
              +                    maxWindowHeightInPixels = pattr.get_height();
                               } finally {
                                   pattr.dispose();
                               }
              @@ -689,24 +691,14 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
                       }
                   }
               
              -    static int getDefaultScreenWidth() {
              +    static int getMaxWindowWidthInPixels() {
                       initScreenSize();
              -        return screenWidth;
              +        return maxWindowWidthInPixels;
                   }
               
              -    static int getDefaultScreenHeight() {
              +    static int getMaxWindowHeightInPixels() {
                       initScreenSize();
              -        return screenHeight;
              -    }
              -
              -    @Override
              -    protected int getScreenWidth() {
              -        return getDefaultScreenWidth();
              -    }
              -
              -    @Override
              -    protected int getScreenHeight() {
              -        return getDefaultScreenHeight();
              +        return maxWindowHeightInPixels;
                   }
               
                   private static Rectangle getWorkArea(long root, int scale)
              @@ -1373,20 +1365,6 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
                   static native long getDefaultXColormap();
                   static native long getDefaultScreenData();
               
              -    static ColorModel screenmodel;
              -
              -    static ColorModel getStaticColorModel() {
              -        if (screenmodel == null) {
              -            screenmodel = config.getColorModel ();
              -        }
              -        return screenmodel;
              -    }
              -
              -    @Override
              -    public ColorModel getColorModel() {
              -        return getStaticColorModel();
              -    }
              -
                   /**
                    * Returns a new input method adapter descriptor for native input methods.
                    */
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java
              index b4b949c513e..88dff8435a7 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java
              @@ -477,6 +477,7 @@ public class XTrayIconPeer implements TrayIconPeer,
                           e.setSource(xtiPeer.target);
                           XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), e);
                       }
              +        @SuppressWarnings("deprecation")
                       public void mouseClicked(MouseEvent e) {
                           if ((e.getClickCount() == 1 || xtiPeer.balloon.isVisible()) &&
                               e.getButton() == MouseEvent.BUTTON1)
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
              index 0c5cc361c76..be062352d74 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
              @@ -339,12 +339,13 @@ class XWindow extends XBaseWindow implements X11ComponentPeer {
                       return graphicsConfig.getColorModel (transparency);
                   }
               
              +    @Override
                   public ColorModel getColorModel() {
                       if (graphicsConfig != null) {
                           return graphicsConfig.getColorModel ();
                       }
                       else {
              -            return XToolkit.getStaticColorModel();
              +            return Toolkit.getDefaultToolkit().getColorModel();
                       }
                   }
               
              @@ -621,7 +622,7 @@ class XWindow extends XBaseWindow implements X11ComponentPeer {
                       // 4 and 5 buttons are usually considered assigned to a first wheel
                       return button == XConstants.buttons[3] || button == XConstants.buttons[4];
                   }
              -
              +    @SuppressWarnings("deprecation")
                   static int getXModifiers(AWTKeyStroke stroke) {
                       int mods = stroke.getModifiers();
                       int res = 0;
              diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java
              index 0ac2a16243a..2e570129f84 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 1997, 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
              @@ -181,6 +181,7 @@ public abstract class X11InputMethod extends InputMethodAdapter {
                       }
                   }
               
              +    @SuppressWarnings("deprecation")
                   protected void finalize() throws Throwable {
                       dispose();
                       super.finalize();
              diff --git a/jdk/src/java.desktop/unix/classes/sun/java2d/opengl/GLXSurfaceData.java b/jdk/src/java.desktop/unix/classes/sun/java2d/opengl/GLXSurfaceData.java
              index fc7f3d90351..bfe9a26426e 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/java2d/opengl/GLXSurfaceData.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/java2d/opengl/GLXSurfaceData.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 2003, 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
              @@ -112,11 +112,13 @@ public abstract class GLXSurfaceData extends OGLSurfaceData {
                   }
               
                   public static class GLXWindowSurfaceData extends GLXSurfaceData {
              +        protected final int scale;
               
                       public GLXWindowSurfaceData(X11ComponentPeer peer,
                                                   GLXGraphicsConfig gc)
                       {
                           super(peer, gc, peer.getColorModel(), WINDOW);
              +            scale = gc.getScale();
                       }
               
                       public SurfaceData getReplacement() {
              @@ -126,6 +128,8 @@ public abstract class GLXSurfaceData extends OGLSurfaceData {
                       public Rectangle getBounds() {
                           Rectangle r = peer.getBounds();
                           r.x = r.y = 0;
              +            r.width = (int) Math.ceil(r.width * scale);
              +            r.height = (int) Math.ceil(r.height * scale);
                           return r;
                       }
               
              @@ -135,6 +139,16 @@ public abstract class GLXSurfaceData extends OGLSurfaceData {
                       public Object getDestination() {
                           return peer.getTarget();
                       }
              +
              +        @Override
              +        public double getDefaultScaleX() {
              +            return scale;
              +        }
              +
              +        @Override
              +        public double getDefaultScaleY() {
              +            return scale;
              +        }
                   }
               
                   /**
              @@ -177,6 +191,7 @@ public abstract class GLXSurfaceData extends OGLSurfaceData {
               
                       private Image offscreenImage;
                       private int width, height;
              +        private final int scale;
               
                       public GLXOffScreenSurfaceData(X11ComponentPeer peer,
                                                      GLXGraphicsConfig gc,
              @@ -186,11 +201,12 @@ public abstract class GLXSurfaceData extends OGLSurfaceData {
                       {
                           super(peer, gc, cm, type);
               
              -            this.width = width;
              -            this.height = height;
              +            scale = gc.getDevice().getScaleFactor();
              +            this.width = width * scale;
              +            this.height = height * scale;
                           offscreenImage = image;
               
              -            initSurface(width, height);
              +            initSurface(this.width, this.height);
                       }
               
                       public SurfaceData getReplacement() {
              @@ -201,6 +217,8 @@ public abstract class GLXSurfaceData extends OGLSurfaceData {
                           if (type == FLIP_BACKBUFFER) {
                               Rectangle r = peer.getBounds();
                               r.x = r.y = 0;
              +                r.width = (int) Math.ceil(r.width * scale);
              +                r.height = (int) Math.ceil(r.height * scale);
                               return r;
                           } else {
                               return new Rectangle(width, height);
              @@ -213,5 +231,15 @@ public abstract class GLXSurfaceData extends OGLSurfaceData {
                       public Object getDestination() {
                           return offscreenImage;
                       }
              +
              +        @Override
              +        public double getDefaultScaleX() {
              +            return scale;
              +        }
              +
              +        @Override
              +        public double getDefaultScaleY() {
              +            return scale;
              +        }
                   }
               }
              diff --git a/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java b/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java
              index 4d1832801c6..aeb95e5fa8f 100644
              --- a/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java
              +++ b/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java
              @@ -59,6 +59,7 @@ import java.nio.charset.Charset;
               
               import java.util.Iterator;
               import java.util.HashSet;
              +import java.util.Map;
               
               
               public class IPPPrintService implements PrintService, SunPrinterJobService {
              @@ -1758,6 +1759,19 @@ public class IPPPrintService implements PrintService, SunPrinterJobService {
               
                                   if (responseMap != null && responseMap.length > 0) {
                                       getAttMap = responseMap[0];
              +                        // If there is extra hashmap created due to duplicate
              +                        // key/attribute present in IPPresponse, then use that
              +                        // map too by appending to getAttMap after removing the
              +                        // duplicate key/value
              +                        if (responseMap.length > 1) {
              +                            for (int i = 1; i < responseMap.length; i++) {
              +                                for (Map.Entry entry : responseMap[i].entrySet()) {
              +                                    if (!getAttMap.containsKey(entry.getValue())) {
              +                                        getAttMap.put(entry.getKey(), entry.getValue());
              +                                    }
              +                                }
              +                            }
              +                        }
                                   }
                               } else {
                                   debug_println(debugPrefix+"opGetAttributes - null input stream");
              diff --git a/jdk/src/java.desktop/unix/legal/fontconfig.md b/jdk/src/java.desktop/unix/legal/fontconfig.md
              index abdebf351e7..50f353d86cd 100644
              --- a/jdk/src/java.desktop/unix/legal/fontconfig.md
              +++ b/jdk/src/java.desktop/unix/legal/fontconfig.md
              @@ -1,6 +1,6 @@
              -## FontConfig v2.5
              +## Fontconfig v2.5
               
              -### FontConfig License
              +### Fontconfig License
               
               
               Copyright 2001,2003 Keith Packard
              diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c
              index 8d6b0642a1c..3c7d64218f8 100644
              --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c
              +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c
              @@ -2021,10 +2021,14 @@ Java_sun_awt_X11GraphicsDevice_enumDisplayModes
                                                X11GD_AddDisplayMode(env, arrayList,
                                                       mode->width, mode->height,
                                                             BIT_DEPTH_MULTI, (int)(rate +.2));
              +                                 if ((*env)->ExceptionCheck(env)) {
              +                                     goto ret0;
              +                                 }
                                                break;
                                           }
                                       }
                                   }
              +ret0:
                                   awt_XRRFreeOutputInfo(output_info);
                               }
                           }
              @@ -2052,12 +2056,12 @@ Java_sun_awt_X11GraphicsDevice_enumDisplayModes
                                                            BIT_DEPTH_MULTI,
                                                            rates[j]);
                                       if ((*env)->ExceptionCheck(env)) {
              -                            break;
              +                            goto ret1;
                                       }
                                   }
                               }
                           }
              -
              +ret1:
                           awt_XRRFreeScreenConfigInfo(config);
                       }
                   }
              diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c
              index b69e2c03965..3b08c197ec4 100644
              --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c
              +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 1999, 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
              @@ -276,7 +276,6 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env,
                                            jint jy,
                                            jint jwidth,
                                            jint jheight,
              -                             jint scale,
                                            jintArray pixelArray,
                                            jboolean useGtk) {
                   XImage *image;
              @@ -298,11 +297,6 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env,
               
                   AWT_LOCK();
               
              -    jint sx = jx * scale;
              -    jint sy = jy * scale;
              -    jint swidth = jwidth * scale;
              -    jint sheight = jheight * scale;
              -
                   rootWindow = XRootWindow(awt_display, adata->awt_visInfo.screen);
               
                   if (!useGtk) {
              @@ -314,10 +308,10 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env,
                   }
               
                   if (!XGetWindowAttributes(awt_display, rootWindow, &attr)
              -            || sx + swidth <= attr.x
              -            || attr.x + attr.width <= sx
              -            || sy + sheight <= attr.y
              -            || attr.y + attr.height <= sy) {
              +            || jx + jwidth <= attr.x
              +            || attr.x + attr.width <= jx
              +            || jy + jheight <= attr.y
              +            || attr.y + attr.height <= jy) {
               
                       AWT_UNLOCK();
                       return; // Does not intersect with root window
              @@ -326,26 +320,25 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env,
                   gboolean gtk_failed = TRUE;
                   jint _x, _y;
               
              -    jint x = MAX(sx, attr.x);
              -    jint y = MAX(sy, attr.y);
              -    jint width = MIN(sx + swidth, attr.x + attr.width) - x;
              -    jint height = MIN(sy + sheight, attr.y + attr.height) - y;
              +    jint x = MAX(jx, attr.x);
              +    jint y = MAX(jy, attr.y);
              +    jint width = MIN(jx + jwidth, attr.x + attr.width) - x;
              +    jint height = MIN(jy + jheight, attr.y + attr.height) - y;
               
              -
              -    int dx = attr.x > sx ? attr.x - sx : 0;
              -    int dy = attr.y > sy ? attr.y - sy : 0;
              +    int dx = attr.x > jx ? attr.x - jx : 0;
              +    int dy = attr.y > jy ? attr.y - jy : 0;
               
                   int index;
               
                   if (useGtk) {
                       gtk->gdk_threads_enter();
                       gtk_failed = gtk->get_drawable_data(env, pixelArray, x, y, width,
              -                                            height, jwidth, dx, dy, scale);
              +                                            height, jwidth, dx, dy, 1);
                       gtk->gdk_threads_leave();
                   }
               
                   if (gtk_failed) {
              -        image = getWindowImage(awt_display, rootWindow, sx, sy, swidth, sheight);
              +        image = getWindowImage(awt_display, rootWindow, x, y, width, height);
               
                       ary = (*env)->GetPrimitiveArrayCritical(env, pixelArray, NULL);
               
              @@ -355,15 +348,10 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env,
                           return;
                       }
               
              -        dx /= scale;
              -        dy /= scale;
              -        width /= scale;
              -        height /= scale;
              -
                       /* convert to Java ARGB pixels */
                       for (_y = 0; _y < height; _y++) {
                           for (_x = 0; _x < width; _x++) {
              -                jint pixel = (jint) XGetPixel(image, _x * scale, _y * scale);
              +                jint pixel = (jint) XGetPixel(image, _x, _y);
                                                                             /* Note ignore upper
                                                                              * 32-bits on 64-bit
                                                                              * OSes.
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java b/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java
              index e7548a6f169..d873ad0cdac 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java
              @@ -523,9 +523,9 @@ public class Win32GraphicsDevice extends GraphicsDevice implements
                       dynamicColorModel = null;
                       defaultConfig = null;
                       configs = null;
              +        initScaleFactors();
                       // pass on to all top-level windows on this display
                       topLevels.notifyListeners();
              -        initScaleFactors();
                   }
               
                   /**
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsEnvironment.java b/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsEnvironment.java
              index 464541c2b53..ae3fac94559 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsEnvironment.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsEnvironment.java
              @@ -203,9 +203,6 @@ public final class Win32GraphicsEnvironment extends SunGraphicsEnvironment {
                               }
                           }
                       }
              -        // Reset the static GC for the (possibly new) default screen
              -        WToolkit.resetGC();
              -
                       // notify SunDisplayChanger list (e.g. VolatileSurfaceManagers and
                       // CachingSurfaceManagers) about the display change event
                       displayChanger.notifyListeners();
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java
              index 36469af2eac..5479c431fe0 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java
              @@ -95,6 +95,7 @@ final class WButtonPeer extends WComponentPeer implements ButtonPeer {
                   private static native void initIDs();
               
                   @Override
              +    @SuppressWarnings("deprecation")
                   public boolean handleJavaKeyEvent(KeyEvent e) {
                        switch (e.getID()) {
                           case KeyEvent.KEY_RELEASED:
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java
              index 27a0c156187..a09b5ea06f2 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java
              @@ -263,6 +263,7 @@ final class WFileDialogPeer extends WWindowPeer implements FileDialogPeer {
                   void disable() {}
                   @Override
                   public void reshape(int x, int y, int width, int height) {}
              +    @SuppressWarnings("deprecation")
                   public boolean handleEvent(Event e) { return false; }
                   @Override
                   public void setForeground(Color c) {}
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java
              index 4bd8f7b5e98..7b65aab6625 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 1997, 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
              @@ -132,6 +132,7 @@ final class WInputMethod extends InputMethodAdapter
                   }
               
                   @Override
              +    @SuppressWarnings("deprecation")
                   protected void finalize() throws Throwable
                   {
                       // Release the resources used by the native input context.
              @@ -588,6 +589,9 @@ final class WInputMethod extends InputMethodAdapter
                               Component client = getClientComponent();
               
                               if (client != null) {
              +                    if (!client.isShowing()) {
              +                        return;
              +                    }
                                   if (haveActiveClient()) {
                                           Rectangle rc = inputContext.getTextLocation(TextHitInfo.leading(0));
                                           x = rc.x;
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WMenuItemPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WMenuItemPeer.java
              index 5a581193b8d..2175bc6a22c 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WMenuItemPeer.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WMenuItemPeer.java
              @@ -71,7 +71,7 @@ class WMenuItemPeer extends WObjectPeer implements MenuItemPeer {
                       enable(false);
                   }
               
              -    public void readShortcutLabel() {
              +    private void readShortcutLabel() {
                       //Fix for 6288578: PIT. Windows: Shortcuts displayed for the menuitems in a popup menu
                       WMenuPeer ancestor = parent;
                       while (ancestor != null && !(ancestor instanceof WMenuBarPeer)) {
              @@ -115,7 +115,7 @@ class WMenuItemPeer extends WObjectPeer implements MenuItemPeer {
                       readShortcutLabel();
                   }
               
              -    protected void checkMenuCreation()
              +    void checkMenuCreation()
                   {
                       // fix for 5088782: check if menu peer is created successfully
                       if (pData == 0)
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WObjectPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WObjectPeer.java
              index b5324076486..a79864a0aea 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WObjectPeer.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WObjectPeer.java
              @@ -36,14 +36,14 @@ abstract class WObjectPeer {
                   // The Windows handle for the native widget.
                   volatile long pData;
                   // if the native peer has been destroyed
              -    volatile boolean destroyed = false;
              +    private volatile boolean destroyed;
                   // The associated AWT object.
              -    Object target;
              +    volatile Object target;
               
                   private volatile boolean disposed;
               
                   // set from JNI if any errors in creating the peer occur
              -    protected Error createError = null;
              +    volatile Error createError = null;
               
                   // used to synchronize the state of this peer
                   private final Object stateLock = new Object();
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPopupMenuPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPopupMenuPeer.java
              index d37858dff6b..b9103c2b12c 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPopupMenuPeer.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPopupMenuPeer.java
              @@ -70,6 +70,7 @@ final class WPopupMenuPeer extends WMenuPeer implements PopupMenuPeer {
               
                   private native void createMenu(WComponentPeer parent);
               
              +    @SuppressWarnings("deprecation")
                   public void show(Event e) {
                       Component origin = (Component)e.target;
                       WComponentPeer peer = (WComponentPeer) WToolkit.targetToPeer(origin);
              @@ -97,6 +98,7 @@ final class WPopupMenuPeer extends WMenuPeer implements PopupMenuPeer {
                    */
                   void show(Component origin, Point p) {
                       WComponentPeer peer = (WComponentPeer) WToolkit.targetToPeer(origin);
              +        @SuppressWarnings("deprecation")
                       Event e = new Event(origin, 0, Event.MOUSE_DOWN, p.x, p.y, 0, 0);
                       if (peer == null) {
                           Component nativeOrigin = WToolkit.getNativeContainer(origin);
              @@ -107,5 +109,6 @@ final class WPopupMenuPeer extends WMenuPeer implements PopupMenuPeer {
                       _show(e);
                   }
               
              +    @SuppressWarnings("deprecation")
                   private native void _show(Event e);
               }
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java
              index d4ae0eb491e..f2a0042e9cf 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java
              @@ -135,6 +135,7 @@ class WPrintDialogPeer extends WWindowPeer implements DialogPeer {
                   void disable() {}
                   @Override
                   public void reshape(int x, int y, int width, int height) {}
              +    @SuppressWarnings("deprecation")
                   public boolean handleEvent(Event e) { return false; }
                   @Override
                   public void setForeground(Color c) {}
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTextFieldPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTextFieldPeer.java
              index 387fbfcb80e..6917d4d421c 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTextFieldPeer.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTextFieldPeer.java
              @@ -43,6 +43,7 @@ final class WTextFieldPeer extends WTextComponentPeer implements TextFieldPeer {
                   }
               
                   @Override
              +    @SuppressWarnings("deprecation")
                   public boolean handleJavaKeyEvent(KeyEvent e) {
                       switch (e.getID()) {
                          case KeyEvent.KEY_TYPED:
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java
              index 097f68dac31..e606e870ecc 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java
              @@ -80,8 +80,6 @@ public final class WToolkit extends SunToolkit implements Runnable {
                   // Desktop property which specifies whether XP visual styles are in effect
                   public static final String XPSTYLE_THEME_ACTIVE = "win.xpstyle.themeActive";
               
              -    static GraphicsConfiguration config;
              -
                   // System clipboard.
                   WClipboard clipboard;
               
              @@ -144,21 +142,6 @@ public final class WToolkit extends SunToolkit implements Runnable {
               
                   private static native void disableCustomPalette();
               
              -    /*
              -     * Reset the static GraphicsConfiguration to the default.  Called on
              -     * startup and when display settings have changed.
              -     */
              -    public static void resetGC() {
              -        if (GraphicsEnvironment.isHeadless()) {
              -            config = null;
              -        } else {
              -          config = (GraphicsEnvironment
              -                  .getLocalGraphicsEnvironment()
              -          .getDefaultScreenDevice()
              -          .getDefaultConfiguration());
              -        }
              -    }
              -
                   /*
                    * NOTE: The following embedded*() methods are non-public API intended
                    * for internal use only.  The methods are unsupported and could go
              @@ -615,21 +598,6 @@ public final class WToolkit extends SunToolkit implements Runnable {
                   static native ColorModel makeColorModel();
                   static ColorModel screenmodel;
               
              -    static ColorModel getStaticColorModel() {
              -        if (GraphicsEnvironment.isHeadless()) {
              -            throw new IllegalArgumentException();
              -        }
              -        if (config == null) {
              -            resetGC();
              -        }
              -        return config.getColorModel();
              -    }
              -
              -    @Override
              -    public ColorModel getColorModel() {
              -        return getStaticColorModel();
              -    }
              -
                   @Override
                   public Insets getScreenInsets(GraphicsConfiguration gc)
                   {
              @@ -643,20 +611,6 @@ public final class WToolkit extends SunToolkit implements Runnable {
                       return ge.getXResolution();
                   }
               
              -    @Override
              -    protected int getScreenWidth() {
              -        return GraphicsEnvironment.getLocalGraphicsEnvironment()
              -                .getDefaultScreenDevice().getDefaultConfiguration()
              -                .getBounds().width;
              -    }
              -
              -    @Override
              -    protected int getScreenHeight() {
              -        return GraphicsEnvironment.getLocalGraphicsEnvironment()
              -                .getDefaultScreenDevice().getDefaultConfiguration()
              -                .getBounds().height;
              -    }
              -
                   private native Insets getScreenInsets(int screen);
               
               
              diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java
              index 3aaca2b033c..d1a296495f5 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java
              @@ -38,6 +38,7 @@ import java.awt.geom.AffineTransform;
               import sun.awt.*;
               
               import sun.java2d.pipe.Region;
              +import sun.swing.SwingUtilities2;
               
               public class WWindowPeer extends WPanelPeer implements WindowPeer,
                      DisplayChangedListener
              @@ -80,6 +81,8 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
                    * WindowStateEvent is posted to the EventQueue.
                    */
                   private WindowListener windowListener;
              +    private float scaleX;
              +    private float scaleY;
               
                   /**
                    * Initialize JNI field IDs
              @@ -190,7 +193,10 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
               
                       // Express our interest in display changes
                       GraphicsConfiguration gc = getGraphicsConfiguration();
              -        ((Win32GraphicsDevice)gc.getDevice()).addDisplayChangedListener(this);
              +        Win32GraphicsDevice gd = (Win32GraphicsDevice) gc.getDevice();
              +        gd.addDisplayChangedListener(this);
              +        scaleX = gd.getDefaultScaleX();
              +        scaleY = gd.getDefaultScaleY();
               
                       initActiveWindowsTracking((Window)target);
               
              @@ -539,6 +545,21 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
               
                       AWTAccessor.getComponentAccessor().
                           setGraphicsConfiguration((Component)target, winGraphicsConfig);
              +
              +        checkDPIChange(oldDev, newDev);
              +    }
              +
              +    private void checkDPIChange(Win32GraphicsDevice oldDev,
              +                                Win32GraphicsDevice newDev) {
              +        float newScaleX = newDev.getDefaultScaleX();
              +        float newScaleY = newDev.getDefaultScaleY();
              +
              +        if (scaleX != newScaleX || scaleY != newScaleY) {
              +            windowDPIChange(oldDev.getScreen(), scaleX, scaleY,
              +                            newDev.getScreen(), newScaleX, newScaleY);
              +            scaleX = newScaleX;
              +            scaleY = newScaleY;
              +        }
                   }
               
                   /**
              @@ -610,9 +631,42 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
                        sysW = width;
                        sysH = height;
               
              +         int cx = x + width / 2;
              +         int cy = y + height / 2;
              +         GraphicsConfiguration current = getGraphicsConfiguration();
              +         GraphicsConfiguration other = SwingUtilities2.getGraphicsConfigurationAtPoint(current, cx, cy);
              +         if (!current.equals(other)) {
              +             AffineTransform tx = other.getDefaultTransform();
              +             double otherScaleX = tx.getScaleX();
              +             double otherScaleY = tx.getScaleY();
              +             initScales();
              +             if (scaleX != otherScaleX || scaleY != otherScaleY) {
              +                 x = (int) Math.floor(x * otherScaleX / scaleX);
              +                 y = (int) Math.floor(y * otherScaleY / scaleY);
              +             }
              +         }
              +
                        super.setBounds(x, y, width, height, op);
                    }
               
              +    private final void initScales() {
              +
              +        if (scaleX >= 1 && scaleY >= 1) {
              +            return;
              +        }
              +
              +        GraphicsConfiguration gc = getGraphicsConfiguration();
              +        if (gc instanceof Win32GraphicsConfig) {
              +            Win32GraphicsDevice gd = ((Win32GraphicsConfig) gc).getDevice();
              +            scaleX = gd.getDefaultScaleX();
              +            scaleY = gd.getDefaultScaleY();
              +        } else {
              +            AffineTransform tx = gc.getDefaultTransform();
              +            scaleX = (float) tx.getScaleX();
              +            scaleY = (float) tx.getScaleY();
              +        }
              +    }
              +
                   @Override
                   public void print(Graphics g) {
                       // We assume we print the whole frame,
              @@ -781,6 +835,9 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
                       }
                   }
               
              +    native void windowDPIChange(int prevScreen, float prevScaleX, float prevScaleY,
              +                                int newScreen, float newScaleX, float newScaleY);
              +
                   /*
                    * The method maps the list of the active windows to the window's AppContext,
                    * then the method registers ActiveWindowListener, GuiDisposedListener listeners;
              diff --git a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java
              index a6583027e66..144a7698bcc 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DGraphicsConfig.java
              @@ -186,7 +186,17 @@ public class D3DGraphicsConfig
                       SurfaceData sd = d3dvsm.getPrimarySurfaceData();
                       if (sd instanceof D3DSurfaceData) {
                           D3DSurfaceData d3dsd = (D3DSurfaceData)sd;
              -            D3DSurfaceData.swapBuffers(d3dsd, x1, y1, x2, y2);
              +            double scaleX = sd.getDefaultScaleX();
              +            double scaleY = sd.getDefaultScaleY();
              +            if (scaleX > 1 || scaleY > 1) {
              +                int sx1 = (int) Math.floor(x1 * scaleX);
              +                int sy1 = (int) Math.floor(y1 * scaleY);
              +                int sx2 = (int) Math.ceil(x2 * scaleX);
              +                int sy2 = (int) Math.ceil(y2 * scaleY);
              +                D3DSurfaceData.swapBuffers(d3dsd, sx1, sy1, sx2, sy2);
              +            } else {
              +                D3DSurfaceData.swapBuffers(d3dsd, x1, y1, x2, y2);
              +            }
                       } else {
                           // the surface was likely lost could not have been restored
                           Graphics g = peer.getGraphics();
              diff --git a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DSurfaceData.java b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DSurfaceData.java
              index e2b08016e56..986f293d703 100644
              --- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DSurfaceData.java
              +++ b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DSurfaceData.java
              @@ -766,7 +766,17 @@ public class D3DSurfaceData extends SurfaceData implements AccelSurface {
                               final Component target = (Component)sd.getPeer().getTarget();
                               SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
                                   public void run() {
              -                        target.repaint(x1, y1, x2, y2);
              +                        double scaleX = sd.getDefaultScaleX();
              +                        double scaleY = sd.getDefaultScaleY();
              +                        if (scaleX > 1 || scaleY > 1) {
              +                            int sx1 = (int) Math.floor(x1 / scaleX);
              +                            int sy1 = (int) Math.floor(y1 / scaleY);
              +                            int sx2 = (int) Math.ceil(x2 / scaleX);
              +                            int sy2 = (int) Math.ceil(y2 / scaleY);
              +                            target.repaint(sx1, sy1, sx2 - sx1, sy2 - sy1);
              +                        } else {
              +                            target.repaint(x1, y1, x2 - x1, y2 - y1);
              +                        }
                                   }
                               });
                               return;
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp
              index 7ffdb5d7e52..63b9334b576 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 2003, 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
              @@ -205,14 +205,19 @@ static BOOL initShellProcs()
               static jstring jstringFromSTRRET(JNIEnv* env, LPITEMIDLIST pidl, STRRET* pStrret) {
                   switch (pStrret->uType) {
                       case STRRET_CSTR :
              -            return JNU_NewStringPlatform(env, reinterpret_cast(pStrret->cStr));
              +            if (pStrret->cStr != NULL) {
              +                return JNU_NewStringPlatform(env, reinterpret_cast(pStrret->cStr));
              +            }
              +            break;
                       case STRRET_OFFSET :
                           // Note : this may need to be WCHAR instead
                           return JNU_NewStringPlatform(env,
                                                        (CHAR*)pidl + pStrret->uOffset);
                       case STRRET_WSTR :
              -            return env->NewString(reinterpret_cast(pStrret->pOleStr),
              -                static_cast(wcslen(pStrret->pOleStr)));
              +            if (pStrret->pOleStr != NULL) {
              +                return env->NewString(reinterpret_cast(pStrret->pOleStr),
              +                    static_cast(wcslen(pStrret->pOleStr)));
              +            }
                   }
                   return NULL;
               }
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp
              index edd513263d9..cf89de40460 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 1996, 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
              @@ -950,8 +950,11 @@ AwtComponent::SetWindowPos(HWND wnd, HWND after,
                   return 1;
               }
               
              +void AwtComponent::Reshape(int x, int y, int w, int h) {
              +    ReshapeNoScale(ScaleUpX(x), ScaleUpY(y), ScaleUpX(w), ScaleUpY(h));
              +}
               
              -void AwtComponent::Reshape(int x, int y, int w, int h)
              +void AwtComponent::ReshapeNoScale(int x, int y, int w, int h)
               {
               #if defined(DEBUG)
                   RECT        rc;
              @@ -960,11 +963,6 @@ void AwtComponent::Reshape(int x, int y, int w, int h)
                   DTRACE_PRINTLN4("AwtComponent::Reshape from %d, %d, %d, %d", rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top);
               #endif
               
              -    x = ScaleUpX(x);
              -    y = ScaleUpY(y);
              -    w = ScaleUpX(w);
              -    h = ScaleUpY(h);
              -
                   AwtWindow* container = GetContainer();
                   AwtComponent* parent = GetParent();
                   if (container != NULL && container == parent) {
              @@ -1507,6 +1505,9 @@ LRESULT AwtComponent::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
                         mr = WmSysCommand(static_cast(wParam & 0xFFF0),
                                           GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
                         break;
              +      case WM_ENTERSIZEMOVE:
              +          mr = WmEnterSizeMove();
              +          break;
                     case WM_EXITSIZEMOVE:
                         mr = WmExitSizeMove();
                         break;
              @@ -2053,6 +2054,11 @@ MsgRouting AwtComponent::WmSysCommand(UINT uCmdType, int xPos, int yPos)
                   return mrDoDefault;
               }
               
              +MsgRouting AwtComponent::WmEnterSizeMove()
              +{
              +    return mrDoDefault;
              +}
              +
               MsgRouting AwtComponent::WmExitSizeMove()
               {
                   return mrDoDefault;
              @@ -3805,6 +3811,9 @@ void AwtComponent::OpenCandidateWindow(int x, int y)
                   UINT bits = 1;
                   POINT p = {0, 0}; // upper left corner of the client area
                   HWND hWnd = GetHWnd();
              +    if (!::IsWindowVisible(hWnd)) {
              +        return;
              +    }
                   HWND hTop = GetTopLevelParentForWindow(hWnd);
                   ::ClientToScreen(hTop, &p);
                   if (!m_bitsCandType) {
              @@ -4077,6 +4086,9 @@ void AwtComponent::SendInputMethodEvent(jint id, jstring text,
               //
               void AwtComponent::InquireCandidatePosition()
               {
              +    if (!::IsWindowVisible(GetHWnd())) {
              +        return;
              +    }
                   JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
               
                   // get global reference of WInputMethod class (run only once)
              @@ -4214,7 +4226,7 @@ MsgRouting AwtComponent::WmDrawItem(UINT ctrlId, DRAWITEMSTRUCT &drawInfo)
                   JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
               
                   if (drawInfo.CtlType == ODT_MENU) {
              -        if (drawInfo.itemData != 0) {
              +        if (IsMenu((HMENU)drawInfo.hwndItem) && drawInfo.itemData != 0) {
                           AwtMenu* menu = (AwtMenu*)(drawInfo.itemData);
                           menu->DrawItem(drawInfo);
                       }
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.h b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.h
              index 0d6bf7a0079..d91df640d21 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.h
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.h
              @@ -275,6 +275,7 @@ public:
                   virtual void Show();
                   virtual void Hide();
                   virtual void Reshape(int x, int y, int w, int h);
              +    void ReshapeNoScale(int x, int y, int w, int h);
               
                   /*
                    * Fix for 4046446.
              @@ -582,6 +583,7 @@ public:
                   virtual MsgRouting WmNcPaint(HRGN hrgn);
                   virtual MsgRouting WmNcHitTest(UINT x, UINT y, LRESULT &retVal);
                   virtual MsgRouting WmSysCommand(UINT uCmdType, int xPos, int yPos);
              +    virtual MsgRouting WmEnterSizeMove();
                   virtual MsgRouting WmExitSizeMove();
                   virtual MsgRouting WmEnterMenuLoop(BOOL isTrackPopupMenu);
                   virtual MsgRouting WmExitMenuLoop(BOOL isTrackPopupMenu);
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Menu.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Menu.cpp
              index d452f148012..2b576fafc33 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Menu.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Menu.cpp
              @@ -34,6 +34,13 @@
               /* IMPORTANT! Read the README.JNI file for notes on JNI converted AWT code.
                */
               
              +/***********************************************************************/
              +// struct for _DelItem() method
              +struct DelItemStruct {
              +    jobject menuitem;
              +    jint index;
              +};
              +
               /************************************************************************
                * AwtMenuItem fields
                */
              @@ -64,7 +71,6 @@ void AwtMenu::Dispose()
                       ::DestroyMenu(m_hMenu);
                       m_hMenu = NULL;
                   }
              -
                   AwtMenuItem::Dispose();
               }
               
              @@ -73,7 +79,7 @@ LPCTSTR AwtMenu::GetClassName() {
               }
               
               /* Create a new AwtMenu object and menu.   */
              -AwtMenu* AwtMenu::Create(jobject self, AwtMenu* parentMenu)
              +AwtMenu* AwtMenu::Create(jobject self, jobject parent)
               {
                   JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
               
              @@ -85,6 +91,9 @@ AwtMenu* AwtMenu::Create(jobject self, AwtMenu* parentMenu)
                           return NULL;
                       }
               
              +        JNI_CHECK_NULL_GOTO(parent, "peer", done);
              +        AwtMenu* parentMenu = (AwtMenu*) JNI_GET_PDATA(parent);
              +
                       target = env->GetObjectField(self, AwtObject::targetID);
                       JNI_CHECK_NULL_GOTO(target, "null target", done);
               
              @@ -119,6 +128,46 @@ done:
                   return menu;
               }
               
              +void AwtMenu::_AddSeparator(void *param)
              +{
              +    if (AwtToolkit::IsMainThread()) {
              +        JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
              +
              +        jobject self = (jobject)param;
              +        AwtMenu *m = NULL;
              +        PDATA pData;
              +        JNI_CHECK_PEER_GOTO(self, ret);
              +        m = (AwtMenu *)pData;
              +        m->AddSeparator();
              +ret:
              +        env->DeleteGlobalRef(self);
              +    } else {
              +        AwtToolkit::GetInstance().InvokeFunction(AwtMenu::_AddSeparator, param);
              +    }
              +}
              +
              +void AwtMenu::_DelItem(void *param)
              +{
              +    if (AwtToolkit::IsMainThread()) {
              +        JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
              +
              +        DelItemStruct *dis = (DelItemStruct*) param;
              +        jobject self = dis->menuitem;
              +        jint index = dis->index;
              +
              +        AwtMenu *m = NULL;
              +        PDATA pData;
              +        JNI_CHECK_PEER_GOTO(self, ret);
              +        m = (AwtMenu *)pData;
              +        m->DeleteItem(static_cast(index));
              +ret:
              +        env->DeleteGlobalRef(self);
              +        delete dis;
              +    } else {
              +        AwtToolkit::GetInstance().InvokeFunction(AwtMenu::_DelItem, param);
              +    }
              +}
              +
               void AwtMenu::UpdateLayout()
               {
                   UpdateLayout(GetHMenu());
              @@ -323,24 +372,6 @@ BOOL AwtMenu::IsTopMenu()
                   return (GetMenuBar() == GetMenuContainer());
               }
               
              -LRESULT AwtMenu::WinThreadExecProc(ExecuteArgs * args)
              -{
              -    switch( args->cmdId ) {
              -        case MENU_ADDSEPARATOR:
              -            this->AddSeparator();
              -            break;
              -
              -        case MENU_DELITEM:
              -            this->DeleteItem(static_cast(args->param1));
              -            break;
              -
              -        default:
              -            AwtMenuItem::WinThreadExecProc(args);
              -            break;
              -    }
              -    return 0L;
              -}
              -
               /************************************************************************
                * WMenuPeer native methods
                */
              @@ -382,15 +413,14 @@ Java_sun_awt_windows_WMenuPeer_addSeparator(JNIEnv *env, jobject self)
               {
                   TRY;
               
              -    PDATA pData;
              -    JNI_CHECK_PEER_RETURN(self);
              +    jobject selfGlobalRef = env->NewGlobalRef(self);
               
              -    AwtObject::WinThreadExec(self, AwtMenu::MENU_ADDSEPARATOR);
              +    AwtToolkit::GetInstance().SyncCall(AwtMenu::_AddSeparator, selfGlobalRef);
              +    // selfGlobalRef is deleted in _AddSeparator
               
                   CATCH_BAD_ALLOC;
               }
               
              -
               /*
                * Class:     sun_awt_windows_WMenuPeer
                * Method:    delItem
              @@ -402,10 +432,12 @@ Java_sun_awt_windows_WMenuPeer_delItem(JNIEnv *env, jobject self,
               {
                   TRY;
               
              -    PDATA pData;
              -    JNI_CHECK_PEER_RETURN(self);
              +    DelItemStruct *dis = new DelItemStruct;
              +    dis->menuitem = env->NewGlobalRef(self);
              +    dis->index = index;
               
              -    AwtObject::WinThreadExec(self, AwtMenu::MENU_DELITEM, index);
              +    AwtToolkit::GetInstance().SyncCall(AwtMenu::_DelItem, dis);
              +    // global refs and dis are deleted in _DelItem
               
                   CATCH_BAD_ALLOC;
               }
              @@ -421,13 +453,8 @@ Java_sun_awt_windows_WMenuPeer_createMenu(JNIEnv *env, jobject self,
               {
                   TRY;
               
              -    PDATA pData;
              -    JNI_CHECK_PEER_RETURN(menuBar);
              -
              -    AwtMenuBar* awtMenuBar = (AwtMenuBar *)pData;
              -    AwtToolkit::CreateComponent(self, awtMenuBar,
              -                                (AwtToolkit::ComponentFactory)AwtMenu::Create,FALSE);
              -    JNI_CHECK_PEER_CREATION_RETURN(self);
              +    AwtToolkit::CreateComponent(self, menuBar,
              +                                (AwtToolkit::ComponentFactory)AwtMenu::Create);
               
                   CATCH_BAD_ALLOC;
               }
              @@ -443,13 +470,8 @@ Java_sun_awt_windows_WMenuPeer_createSubMenu(JNIEnv *env, jobject self,
               {
                   TRY;
               
              -    PDATA pData;
              -    JNI_CHECK_PEER_RETURN(menu);
              -
              -    AwtMenu* awtMenu = (AwtMenu *)pData;
              -    AwtToolkit::CreateComponent(self, awtMenu,
              -                                (AwtToolkit::ComponentFactory)AwtMenu::Create,FALSE);
              -    JNI_CHECK_PEER_CREATION_RETURN(self);
              +    AwtToolkit::CreateComponent(self, menu,
              +                                (AwtToolkit::ComponentFactory)AwtMenu::Create);
               
                   CATCH_BAD_ALLOC;
               }
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Menu.h b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Menu.h
              index f0070921b12..c156433716a 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Menu.h
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Menu.h
              @@ -42,13 +42,6 @@ class AwtMenuBar;
               
               class AwtMenu : public AwtMenuItem {
               public:
              -    // id's for methods executed on toolkit thread
              -    enum {
              -        MENU_ADDSEPARATOR = MENUITEM_LAST+1,
              -        MENU_DELITEM,
              -        MENU_LAST
              -    };
              -
                   /* method ids for java.awt.Menu */
                   static jmethodID countItemsMID;
                   static jmethodID getItemMID;
              @@ -61,7 +54,7 @@ public:
                   virtual LPCTSTR GetClassName();
               
                   /* Create a new AwtMenu.  This must be run on the main thread. */
              -    static AwtMenu* Create(jobject self, AwtMenu* parentMenu);
              +    static AwtMenu* Create(jobject self, jobject parent);
               
                   INLINE HMENU GetHMenu() { return m_hMenu; }
                   INLINE void SetHMenu(HMENU hMenu) {
              @@ -94,9 +87,9 @@ public:
                   void MeasureItem(HDC hDC, MEASUREITEMSTRUCT& measureInfo);
                   void MeasureItems(HDC hDC, MEASUREITEMSTRUCT& measureInfo);
               
              -    virtual LRESULT WinThreadExecProc(ExecuteArgs * args);
              -
                   // invoked on Toolkit thread
              +    static void _AddSeparator(void *param);
              +    static void _DelItem(void *param);
                   static void _CreateMenu(void *param);
                   static void _CreateSubMenu(void *param);
                   virtual BOOL IsSeparator() { return FALSE; }
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuBar.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuBar.cpp
              index b62775f8b1b..2801d4ced0e 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuBar.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuBar.cpp
              @@ -29,6 +29,12 @@
               /* IMPORTANT! Read the README.JNI file for notes on JNI converted AWT code.
                */
               
              +/***********************************************************************/
              +// struct for _DelItem() method
              +struct DelItemStruct {
              +    jobject menuitem;
              +    jint index;
              +};
               /***********************************************************************/
               // struct for _AddMenu() method
               struct AddMenuStruct {
              @@ -130,18 +136,6 @@ HWND AwtMenuBar::GetOwnerHWnd()
                       return myFrame->GetHWnd();
               }
               
              -void AwtMenuBar::SendDrawItem(AwtMenuItem* awtMenuItem,
              -                              DRAWITEMSTRUCT& drawInfo)
              -{
              -    awtMenuItem->DrawItem(drawInfo);
              -}
              -
              -void AwtMenuBar::SendMeasureItem(AwtMenuItem* awtMenuItem,
              -                                 HDC hDC, MEASUREITEMSTRUCT& measureInfo)
              -{
              -    awtMenuItem->MeasureItem(hDC, measureInfo);
              -}
              -
               int AwtMenuBar::CountItem(jobject menuBar)
               {
                   JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
              @@ -164,9 +158,9 @@ AwtMenuItem* AwtMenuBar::GetItem(jobject target, long index)
               
                   jobject menuItemPeer = GetPeerForTarget(env, menu);
                   PDATA pData;
              +    AwtMenuItem* awtMenuItem = NULL;
                   JNI_CHECK_PEER_GOTO(menuItemPeer, done);
              -
              -    AwtMenuItem* awtMenuItem = (AwtMenuItem*)pData;
              +    awtMenuItem = (AwtMenuItem*)pData;
               
               done:
                   env->DeleteLocalRef(menu);
              @@ -215,20 +209,6 @@ void AwtMenuBar::RedrawMenuBar() {
                   VERIFY(::DrawMenuBar(GetOwnerHWnd()));
               }
               
              -LRESULT AwtMenuBar::WinThreadExecProc(ExecuteArgs * args)
              -{
              -    switch( args->cmdId ) {
              -        case MENUBAR_DELITEM:
              -            this->DeleteItem(static_cast(args->param1));
              -            break;
              -
              -        default:
              -            AwtMenu::WinThreadExecProc(args);
              -            break;
              -    }
              -    return 0L;
              -}
              -
               void AwtMenuBar::_AddMenu(void *param)
               {
                   JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
              @@ -257,6 +237,28 @@ ret:
                   delete ams;
               }
               
              +void AwtMenuBar::_DelItem(void *param)
              +{
              +    if (AwtToolkit::IsMainThread()) {
              +        JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
              +
              +        DelItemStruct *dis = (DelItemStruct*) param;
              +        jobject self = dis->menuitem;
              +        jint index = dis->index;
              +
              +        AwtMenuBar *m = NULL;
              +        PDATA pData;
              +        JNI_CHECK_PEER_GOTO(self, ret);
              +        m = (AwtMenuBar *)pData;
              +        m->DeleteItem(static_cast(index));
              +ret:
              +        env->DeleteGlobalRef(self);
              +        delete dis;
              +    } else {
              +        AwtToolkit::GetInstance().InvokeFunction(AwtMenuBar::_DelItem, param);
              +    }
              +}
              +
               /************************************************************************
                * MenuBar native methods
                */
              @@ -325,9 +327,12 @@ Java_sun_awt_windows_WMenuBarPeer_delMenu(JNIEnv *env, jobject self,
               {
                   TRY;
               
              -    PDATA pData;
              -    JNI_CHECK_PEER_RETURN(self);
              -    AwtObject::WinThreadExec(self, AwtMenuBar::MENUBAR_DELITEM, (LPARAM)index);
              +    DelItemStruct *dis = new DelItemStruct;
              +    dis->menuitem = env->NewGlobalRef(self);
              +    dis->index = index;
              +
              +    AwtToolkit::GetInstance().SyncCall(AwtMenuBar::_DelItem, dis);
              +    // global refs and dis are deleted in _DelItem
               
                   CATCH_BAD_ALLOC;
               }
              @@ -346,9 +351,6 @@ Java_sun_awt_windows_WMenuBarPeer_create(JNIEnv *env, jobject self,
                   AwtToolkit::CreateComponent(self, frame,
                                               (AwtToolkit::ComponentFactory)
                                               AwtMenuBar::Create);
              -    PDATA pData;
              -    JNI_CHECK_PEER_CREATION_RETURN(self);
              -
                   CATCH_BAD_ALLOC;
               }
               
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuBar.h b/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuBar.h
              index 797cf0a58bd..3e60a9b399a 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuBar.h
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuBar.h
              @@ -42,10 +42,6 @@ class AwtFrame;
               
               class AwtMenuBar : public AwtMenu {
               public:
              -    // id's for methods executed on toolkit thread
              -    enum MenuExecIds {
              -        MENUBAR_DELITEM = MENU_LAST+1
              -    };
               
                   /* java.awt.MenuBar method ids */
                   static jmethodID getMenuCountMID;
              @@ -73,20 +69,15 @@ public:
                   AwtMenuItem* GetItem(jobject target, long index);
                   int CountItem(jobject menuBar);
               
              -    void SendDrawItem(AwtMenuItem* awtMenuItem,
              -                      DRAWITEMSTRUCT& drawInfo);
              -    void SendMeasureItem(AwtMenuItem* awtMenuItem,
              -                         HDC hDC, MEASUREITEMSTRUCT& measureInfo);
                   void DrawItem(DRAWITEMSTRUCT& drawInfo);
                   void MeasureItem(HDC hDC, MEASUREITEMSTRUCT& measureInfo);
               
                   void AddItem(AwtMenuItem* item);
                   void DeleteItem(UINT index);
               
              -    virtual LRESULT WinThreadExecProc(ExecuteArgs * args);
              -
                   // called on Toolkit thread
                   static void _AddMenu(void *param);
              +    static void _DelItem(void *param);
               protected:
                   AwtFrame* m_frame;
               };
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp
              index 80fc977e00d..f00d5ba31c7 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp
              @@ -50,6 +50,16 @@ struct SetLabelStruct {
                   jobject menuitem;
                   jstring label;
               };
              +// struct for _SetEnable() method
              +struct SetEnableStruct {
              +    jobject menuitem;
              +    jboolean isEnabled;
              +};
              +// struct for _setState() method
              +struct SetStateStruct {
              +    jobject menuitem;
              +    jboolean isChecked;
              +};
               /************************************************************************
                * AwtMenuItem fields
                */
              @@ -104,6 +114,7 @@ void AwtMenuItem::RemoveCmdID()
               {
                   if (m_freeId) {
                       AwtToolkit::GetInstance().RemoveCmdID( GetID() );
              +        m_freeId = FALSE;
                   }
               }
               void AwtMenuItem::Dispose()
              @@ -206,13 +217,12 @@ AwtMenuItem* AwtMenuItem::Create(jobject peer, jobject menuPeer)
                       if (env->EnsureLocalCapacity(1) < 0) {
                           return NULL;
                       }
              -        PDATA pData;
              -        JNI_CHECK_PEER_RETURN_NULL(menuPeer);
              +        JNI_CHECK_NULL_RETURN_NULL(menuPeer, "peer");
               
                       /* target is a java.awt.MenuItem  */
                       target = env->GetObjectField(peer, AwtObject::targetID);
               
              -        AwtMenu* menu = (AwtMenu *)pData;
              +        AwtMenu* menu = (AwtMenu *)JNI_GET_PDATA(menuPeer);
                       item = new AwtMenuItem();
                       jboolean isCheckbox =
                           (jboolean)env->GetBooleanField(peer, AwtMenuItem::isCheckboxID);
              @@ -223,7 +233,9 @@ AwtMenuItem* AwtMenuItem::Create(jobject peer, jobject menuPeer)
                       item->LinkObjects(env, peer);
                       item->SetMenuContainer(menu);
                       item->SetNewID();
              -        menu->AddItem(item);
              +        if (menu != NULL) {
              +            menu->AddItem(item);
              +        }
                   } catch (...) {
                       env->DeleteLocalRef(target);
                       throw;
              @@ -764,30 +776,6 @@ void AwtMenuItem::UpdateContainerLayout() {
                   }
               }
               
              -LRESULT AwtMenuItem::WinThreadExecProc(ExecuteArgs * args)
              -{
              -    switch( args->cmdId ) {
              -        case MENUITEM_ENABLE:
              -        {
              -            BOOL        isEnabled = (BOOL)args->param1;
              -            this->Enable(isEnabled);
              -        }
              -        break;
              -
              -        case MENUITEM_SETSTATE:
              -        {
              -            BOOL        isChecked = (BOOL)args->param1;
              -            this->SetState(isChecked);
              -        }
              -        break;
              -
              -        default:
              -            AwtObject::WinThreadExecProc(args);
              -            break;
              -    }
              -    return 0L;
              -}
              -
               void AwtMenuItem::_SetLabel(void *param) {
                   if (AwtToolkit::IsMainThread()) {
                       JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
              @@ -887,6 +875,53 @@ ret:
                   }
               }
               
              +void AwtMenuItem::_SetEnable(void *param)
              +{
              +    if (AwtToolkit::IsMainThread()) {
              +        JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
              +
              +        SetEnableStruct *ses = (SetEnableStruct*) param;
              +        jobject self = ses->menuitem;
              +        jboolean isEnabled = ses->isEnabled;
              +
              +        AwtMenuItem *m = NULL;
              +
              +        PDATA pData;
              +        JNI_CHECK_PEER_GOTO(self, ret);
              +
              +        m = (AwtMenuItem *)pData;
              +
              +        m->Enable(isEnabled);
              +ret:
              +        env->DeleteGlobalRef(self);
              +        delete ses;
              +    } else {
              +        AwtToolkit::GetInstance().InvokeFunction(AwtMenuItem::_SetEnable, param);
              +    }
              +}
              +
              +void AwtMenuItem::_SetState(void *param)
              +{
              +    if (AwtToolkit::IsMainThread()) {
              +        JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
              +
              +        SetStateStruct *sts = (SetStateStruct*) param;
              +        jobject self = sts->menuitem;
              +        jboolean isChecked = sts->isChecked;
              +
              +        AwtMenuItem *m = NULL;
              +
              +        PDATA pData;
              +        JNI_CHECK_PEER_GOTO(self, ret);
              +        m = (AwtMenuItem *)pData;
              +        m->SetState(isChecked);
              +ret:
              +        env->DeleteGlobalRef(self);
              +        delete sts;
              +    } else {
              +        AwtToolkit::GetInstance().InvokeFunction(AwtMenuItem::_SetState, param);
              +    }
              +}
               BOOL AwtMenuItem::IsSeparator() {
                   JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
                   if (env->EnsureLocalCapacity(2) < 0) {
              @@ -1050,13 +1085,9 @@ Java_sun_awt_windows_WMenuItemPeer_create(JNIEnv *env, jobject self,
               {
                   TRY;
               
              -    JNI_CHECK_NULL_RETURN(menu, "null Menu");
                   AwtToolkit::CreateComponent(self, menu,
                                               (AwtToolkit::ComponentFactory)
                                               AwtMenuItem::Create);
              -    PDATA pData;
              -    JNI_CHECK_PEER_CREATION_RETURN(self);
              -
                   CATCH_BAD_ALLOC;
               }
               
              @@ -1071,9 +1102,12 @@ Java_sun_awt_windows_WMenuItemPeer_enable(JNIEnv *env, jobject self,
               {
                   TRY;
               
              -    PDATA pData;
              -    JNI_CHECK_PEER_RETURN(self);
              -    AwtObject::WinThreadExec(self, AwtMenuItem::MENUITEM_ENABLE, (LPARAM)on );
              +    SetEnableStruct *ses = new SetEnableStruct;
              +    ses->menuitem = env->NewGlobalRef(self);
              +    ses->isEnabled = on;
              +
              +    AwtToolkit::GetInstance().SyncCall(AwtMenuItem::_SetEnable, ses);
              +    // global refs and ses are deleted in _SetEnable
               
                   CATCH_BAD_ALLOC;
               }
              @@ -1112,9 +1146,12 @@ Java_sun_awt_windows_WCheckboxMenuItemPeer_setState(JNIEnv *env, jobject self,
               {
                   TRY;
               
              -    PDATA pData;
              -    JNI_CHECK_PEER_RETURN(self);
              -    AwtObject::WinThreadExec(self, AwtMenuItem::MENUITEM_SETSTATE, (LPARAM)on);
              +    SetStateStruct *sts = new SetStateStruct;
              +    sts->menuitem = env->NewGlobalRef(self);
              +    sts->isChecked = on;
              +
              +    AwtToolkit::GetInstance().SyncCall(AwtMenuItem::_SetState, sts);
              +    // global refs and sts are deleted in _SetState
               
                   CATCH_BAD_ALLOC;
               }
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.h b/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.h
              index e06a146a5b3..9bbb1fe2c9d 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.h
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.h
              @@ -45,13 +45,6 @@ class AwtMenu;
               
               class AwtMenuItem : public AwtObject {
               public:
              -    // id's for methods executed on toolkit thread
              -    enum {
              -        MENUITEM_ENABLE,
              -        MENUITEM_SETSTATE,
              -        MENUITEM_LAST
              -    };
              -
                   /* java.awt.MenuComponent fields */
                   static jfieldID fontID;
                   static jfieldID appContextID;
              @@ -154,13 +147,14 @@ public:
                    */
                   MsgRouting WmNotify(UINT notifyCode);
               
              -    virtual LRESULT WinThreadExecProc(ExecuteArgs * args);
                   virtual BOOL IsDisabledAndPopup() {
                       return FALSE;
                   }
                   virtual BOOL IsSeparator();
               
                   // invoked on Toolkit thread
              +    static void _SetState(void *param);
              +    static void _SetEnable(void *param);
                   static void _SetLabel(void *param);
                   static void _UpdateLayout(void *param);
               
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PopupMenu.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PopupMenu.cpp
              index 0a04e0e8db5..4cfb6d7eb20 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PopupMenu.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PopupMenu.cpp
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 1996, 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
              @@ -65,7 +65,7 @@ LPCTSTR AwtPopupMenu::GetClassName() {
               }
               
               /* Create a new AwtPopupMenu object and menu.   */
              -AwtPopupMenu* AwtPopupMenu::Create(jobject self, AwtComponent* parent)
              +AwtPopupMenu* AwtPopupMenu::Create(jobject self, jobject parent)
               {
                   JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
               
              @@ -77,6 +77,9 @@ AwtPopupMenu* AwtPopupMenu::Create(jobject self, AwtComponent* parent)
                           return NULL;
                       }
               
              +        JNI_CHECK_NULL_GOTO(parent, "peer", done);
              +        AwtComponent* awtParent = (AwtComponent*) JNI_GET_PDATA(parent);
              +
                       target = env->GetObjectField(self, AwtObject::targetID);
                       JNI_CHECK_NULL_GOTO(target, "null target", done);
               
              @@ -94,7 +97,7 @@ AwtPopupMenu* AwtPopupMenu::Create(jobject self, AwtComponent* parent)
                       popupMenu->SetHMenu(hMenu);
               
                       popupMenu->LinkObjects(env, self);
              -        popupMenu->SetParent(parent);
              +        popupMenu->SetParent(awtParent);
                   } catch (...) {
                       env->DeleteLocalRef(target);
                       throw;
              @@ -274,12 +277,8 @@ Java_sun_awt_windows_WPopupMenuPeer_createMenu(JNIEnv *env, jobject self,
               {
                   TRY;
               
              -    PDATA pData;
              -    JNI_CHECK_PEER_RETURN(parent);
              -    AwtComponent* awtParent = (AwtComponent *)pData;
                   AwtToolkit::CreateComponent(
              -        self, awtParent, (AwtToolkit::ComponentFactory)AwtPopupMenu::Create, FALSE);
              -    JNI_CHECK_PEER_CREATION_RETURN(self);
              +        self, parent, (AwtToolkit::ComponentFactory)AwtPopupMenu::Create);
               
                   CATCH_BAD_ALLOC;
               }
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PopupMenu.h b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PopupMenu.h
              index f149b752168..15670ec077a 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PopupMenu.h
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PopupMenu.h
              @@ -47,7 +47,7 @@ public:
                   virtual LPCTSTR GetClassName();
               
                   /* Create a new AwtPopupMenu.  This must be run on the main thread. */
              -    static AwtPopupMenu* Create(jobject self, AwtComponent* parent);
              +    static AwtPopupMenu* Create(jobject self, jobject parent);
               
                   /* Display the popup modally. */
                   void Show(JNIEnv *env, jobject event, BOOL isTrayIconPopup);
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp
              index 6f75291d62f..15601391abe 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp
              @@ -54,6 +54,7 @@ jmethodID AwtPrintControl::getDevmodeID;
               jmethodID AwtPrintControl::setDevmodeID;
               jmethodID AwtPrintControl::getDevnamesID;
               jmethodID AwtPrintControl::setDevnamesID;
              +jmethodID AwtPrintControl::getParentWindowID;
               jfieldID  AwtPrintControl::driverDoesMultipleCopiesID;
               jfieldID  AwtPrintControl::driverDoesCollationID;
               jmethodID AwtPrintControl::getWin32MediaID;
              @@ -240,6 +241,11 @@ void AwtPrintControl::initIDs(JNIEnv *env, jclass cls)
                   DASSERT(AwtPrintControl::dialogOwnerPeerID != NULL);
                   CHECK_NULL(AwtPrintControl::dialogOwnerPeerID);
               
              +    AwtPrintControl::getParentWindowID = env->GetMethodID(cls,
              +                                       "getParentWindowID", "()J");
              +    DASSERT(AwtPrintControl::getParentWindowID != NULL);
              +    CHECK_NULL(AwtPrintControl::getParentWindowID);
              +
                   AwtPrintControl::getPrintDCID = env->GetMethodID(cls, "getPrintDC", "()J");
                   DASSERT(AwtPrintControl::getPrintDCID != NULL);
                   CHECK_NULL(AwtPrintControl::getPrintDCID);
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.h b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.h
              index 5f66377c4ec..bc782c41469 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.h
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.h
              @@ -47,6 +47,7 @@ public:
                   static jmethodID setDevmodeID;
                   static jmethodID getDevnamesID;
                   static jmethodID setDevnamesID;
              +    static jmethodID getParentWindowID;
                   static jmethodID getWin32MediaID;
                   static jmethodID setWin32MediaID;
                   static jmethodID getWin32MediaTrayID;
              @@ -97,6 +98,10 @@ public:
                                                LPTSTR pPrinterName,
                                                LPDEVMODE *pDevMode);
               
              +    inline static HWND getParentID(JNIEnv *env, jobject self) {
              +      return (HWND)env->CallLongMethod(self, getParentWindowID);
              +    }
              +
                   inline static  HDC getPrintDC(JNIEnv *env, jobject self) {
                     return (HDC)env->CallLongMethod(self, getPrintDCID);
                   }
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintDialog.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintDialog.cpp
              index 7a7e7a76fb6..0669aa1adf4 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintDialog.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintDialog.cpp
              @@ -248,6 +248,11 @@ Java_sun_awt_windows_WPrintDialogPeer__1show(JNIEnv *env, jobject peer)
                     pd.lpfnPrintHook = (LPPRINTHOOKPROC)PrintDialogHookProc;
                     pd.lpfnSetupHook = (LPSETUPHOOKPROC)PrintDialogHookProc;
                     pd.Flags |= PD_ENABLESETUPHOOK | PD_ENABLEPRINTHOOK;
              +      HWND parent = AwtPrintControl::getParentID(env, control);
              +      if (parent != NULL && ::IsWindow(parent)) {
              +          // Windows native modality is requested (used by JavaFX).
              +          pd.hwndOwner = parent;
              +      }
                     /*
                         Fix for 6488834.
                         To disable Win32 native parent modality we have to set
              @@ -255,7 +260,7 @@ Java_sun_awt_windows_WPrintDialogPeer__1show(JNIEnv *env, jobject peer)
                         parentless dialogs we use NULL to show them in the taskbar,
                         and for all other dialogs AwtToolkit's HWND is used.
                     */
              -      if (awtParent != NULL)
              +      else if (awtParent != NULL)
                     {
                         pd.hwndOwner = AwtToolkit::GetInstance().GetHWnd();
                     }
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp
              index 53057bb4dbd..653fff7efb1 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp
              @@ -521,12 +521,18 @@ Java_sun_awt_windows_WPageDialogPeer__1show(JNIEnv *env, jobject peer)
                   AwtComponent *awtParent = (parent != NULL) ? (AwtComponent *)JNI_GET_PDATA(parent) : NULL;
                   HWND hwndOwner = awtParent ? awtParent->GetHWnd() : NULL;
               
              +
                   jboolean doIt = JNI_FALSE; // Assume the user will cancel the dialog.
                   PAGESETUPDLG setup;
                   memset(&setup, 0, sizeof(setup));
               
                   setup.lStructSize = sizeof(setup);
               
              +    HWND parentID = AwtPrintControl::getParentID(env, self);
              +    if (parentID != NULL && ::IsWindow(parentID)) {
              +        // windows native modality is requested (used by JavaFX).
              +        setup.hwndOwner = parentID;
              +    }
                   /*
                     Fix for 6488834.
                     To disable Win32 native parent modality we have to set
              @@ -534,7 +540,7 @@ Java_sun_awt_windows_WPageDialogPeer__1show(JNIEnv *env, jobject peer)
                     parentless dialogs we use NULL to show them in the taskbar,
                     and for all other dialogs AwtToolkit's HWND is used.
                   */
              -    if (awtParent != NULL)
              +    else if (awtParent != NULL)
                   {
                       setup.hwndOwner = AwtToolkit::GetInstance().GetHWnd();
                   }
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp
              index 6666a6e2c95..12432ebf14f 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
                * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
                *
                * This code is free software; you can redistribute it and/or modify it
              @@ -224,24 +224,11 @@ void AwtRobot::GetRGBPixels(jint x, jint y, jint width, jint height, jintArray p
                       AwtWin32GraphicsDevice::SelectPalette(hdcMem, primaryIndex);
                   AwtWin32GraphicsDevice::RealizePalette(hdcMem, primaryIndex);
               
              -    Devices::InstanceAccess devices;
              -    AwtWin32GraphicsDevice *device = devices->GetDevice(primaryIndex);
              -    int sWidth = (device == NULL) ? width : device->ScaleUpX(width);
              -    int sHeight = (device == NULL) ? height : device->ScaleUpY(height);
              -
                   // copy screen image to offscreen bitmap
                   // CAPTUREBLT flag is required to capture WS_EX_LAYERED windows' contents
                   // correctly on Win2K/XP
              -    if (width == sWidth && height == sHeight) {
              -        VERIFY(::BitBlt(hdcMem, 0, 0, width, height, hdcScreen, x, y,
              -               SRCCOPY | CAPTUREBLT) != 0);
              -    } else {
              -        int sX = (device == NULL) ? x : device->ScaleUpX(x);
              -        int sY = (device == NULL) ? y : device->ScaleUpY(y);
              -        VERIFY(::StretchBlt(hdcMem, 0, 0, width, height,
              -               hdcScreen, sX, sY, sWidth, sHeight,
              -               SRCCOPY | CAPTUREBLT) != 0);
              -    }
              +    VERIFY(::BitBlt(hdcMem, 0, 0, width, height, hdcScreen, x, y,
              +           SRCCOPY | CAPTUREBLT) != 0);
               
                   static const int BITS_PER_PIXEL = 32;
                   static const int BYTES_PER_PIXEL = BITS_PER_PIXEL/8;
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp
              index 36501fdf0fd..56f2bfdd0ea 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp
              @@ -153,6 +153,16 @@ struct SetFullScreenExclusiveModeStateStruct {
                   jboolean isFSEMState;
               };
               
              +// struct for _WindowDPIChange() method
              +struct ScaleStruct {
              +    jobject window;
              +    jint prevScreen;
              +    jfloat prevScaleX;
              +    jfloat prevScaleY;
              +    jint screen;
              +    jfloat scaleX;
              +    jfloat scaleY;
              +};
               
               /************************************************************************
                * AwtWindow fields
              @@ -228,6 +238,10 @@ AwtWindow::AwtWindow() {
                   m_alwaysOnTop = false;
               
                   fullScreenExclusiveModeState = FALSE;
              +    m_winSizeMove = FALSE;
              +    prevScaleRec.screen = -1;
              +    prevScaleRec.scaleX = -1.0f;
              +    prevScaleRec.scaleY = -1.0f;
               }
               
               AwtWindow::~AwtWindow()
              @@ -1792,6 +1806,19 @@ MsgRouting AwtWindow::WmSizing()
                   return mrDoDefault;
               }
               
              +MsgRouting AwtWindow::WmEnterSizeMove()
              +{
              +    m_winSizeMove = TRUE;
              +    return mrDoDefault;
              +}
              +
              +MsgRouting AwtWindow::WmExitSizeMove()
              +{
              +    m_winSizeMove = FALSE;
              +    CheckWindowDPIChange();
              +    return mrDoDefault;
              +}
              +
               /*
                * Override AwtComponent's size handling to first update the
                * java AWT target's dimension fields directly, since Windows
              @@ -2074,6 +2101,67 @@ void AwtWindow::CheckIfOnNewScreen() {
                   }
               }
               
              +void AwtWindow::CheckWindowDPIChange() {
              +
              +    if (prevScaleRec.screen != -1 ) {
              +        float prevScaleX = prevScaleRec.scaleX;
              +        float prevScaleY = prevScaleRec.scaleY;
              +
              +        if (prevScaleX >= 1 && prevScaleY >= 1) {
              +            Devices::InstanceAccess devices;
              +            AwtWin32GraphicsDevice* device = devices->GetDevice(m_screenNum);
              +            if (device) {
              +                float scaleX = device->GetScaleX();
              +                float scaleY = device->GetScaleY();
              +                if (prevScaleX != scaleX || prevScaleY != scaleY) {
              +                    WindowDPIChange(prevScaleRec.screen, prevScaleX, prevScaleY,
              +                                    m_screenNum, scaleX, scaleY);
              +                }
              +            }
              +        }
              +        prevScaleRec.screen = -1;
              +    }
              +}
              +
              +void AwtWindow::WindowDPIChange(int prevScreen,
              +                                float prevScaleX, float prevScaleY,
              +                                int screen, float scaleX,
              +                                float scaleY)
              +{
              +    int x;
              +    int y;
              +    int w;
              +    int h;
              +    RECT rect;
              +
              +    if (prevScaleX == scaleX && prevScaleY == scaleY) {
              +        return;
              +    }
              +
              +    ::GetWindowRect(GetHWnd(), &rect);
              +    x = rect.left;
              +    y = rect.top;
              +    w = (rect.right - rect.left) * scaleX / prevScaleX;
              +    h = (rect.bottom - rect.top) * scaleY / prevScaleY;
              +
              +    if (prevScreen != screen) {
              +        Devices::InstanceAccess devices;
              +        AwtWin32GraphicsDevice* device = devices->GetDevice(screen);
              +        if (device) {
              +            RECT bounds;
              +            if (MonitorBounds(device->GetMonitor(), &bounds)) {
              +                x = x < bounds.left ? bounds.left : x;
              +                y = y < bounds.top ? bounds.top : y;
              +
              +                x = (x + w > bounds.right) ? bounds.right - w : x;
              +                y = (y + h > bounds.bottom) ? bounds.bottom - h : y;
              +            }
              +        }
              +    }
              +
              +    ReshapeNoScale(x, y, w, h);
              +}
              +
               BOOL AwtWindow::IsFocusableWindow() {
                   /*
                    * For Window/Frame/Dialog to accept focus it should:
              @@ -3102,6 +3190,41 @@ void AwtWindow::_GetNativeWindowSize(void* param) {
               
                   env->DeleteGlobalRef(self);
               }
              +
              +void AwtWindow::_WindowDPIChange(void* param)
              +{
              +    JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
              +
              +    ScaleStruct *ss = (ScaleStruct *)param;
              +    jobject self = ss->window;
              +    jint prevScreen = ss->prevScreen;
              +    jfloat prevScaleX = ss->prevScaleX;
              +    jfloat prevScaleY = ss->prevScaleY;
              +    jint screen = ss->screen;
              +    jfloat scaleX = ss->scaleX;
              +    jfloat scaleY = ss->scaleY;
              +
              +    PDATA pData;
              +    JNI_CHECK_PEER_GOTO(self, ret);
              +    AwtWindow *window = (AwtWindow *)pData;
              +
              +    if (window->m_winSizeMove) {
              +        if (window->prevScaleRec.screen == -1) {
              +            window->prevScaleRec.screen = prevScreen;
              +            window->prevScaleRec.scaleX = prevScaleX;
              +            window->prevScaleRec.scaleY = prevScaleY;
              +        }
              +    }
              +    else {
              +        window->WindowDPIChange(prevScreen, prevScaleX, prevScaleY,
              +                                screen, scaleX, scaleY);
              +    }
              +
              +ret:
              +    env->DeleteGlobalRef(self);
              +    delete ss;
              +}
              +
               extern "C" int getSystemMetricValue(int msgType);
               extern "C" {
               
              @@ -3800,4 +3923,30 @@ Java_sun_awt_windows_WWindowPeer_repositionSecurityWarning(JNIEnv *env,
                   CATCH_BAD_ALLOC;
               }
               
              +/*
              +* Class:     sun_awt_windows_WWindowPeer
              +* Method:    windowDPIChange
              +* Signature: (IFFIFF)V
              +*/
              +JNIEXPORT void JNICALL
              +Java_sun_awt_windows_WWindowPeer_windowDPIChange(JNIEnv *env, jobject self,
              +    jint prevScreen, jfloat prevScaleX, jfloat prevScaleY,
              +    jint screen, jfloat scaleX, jfloat scaleY)
              +{
              +    TRY;
              +
              +    ScaleStruct *ss = new ScaleStruct;
              +    ss->window = env->NewGlobalRef(self);
              +    ss->prevScreen = prevScreen;
              +    ss->prevScaleX = prevScaleX;
              +    ss->prevScaleY = prevScaleY;
              +    ss->screen = screen;
              +    ss->scaleX = scaleX;
              +    ss->scaleY = scaleY;
              +
              +    AwtToolkit::GetInstance().InvokeFunction(AwtWindow::_WindowDPIChange, ss);
              +    // global refs and ss are deleted in _WindowDPIChange
              +
              +    CATCH_BAD_ALLOC;
              +}
               } /* extern "C" */
              diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.h b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.h
              index 9dd91a97423..55f5b0e795f 100644
              --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.h
              +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.h
              @@ -173,6 +173,8 @@ public:
                   virtual MsgRouting WmMove(int x, int y);
                   virtual MsgRouting WmSize(UINT type, int w, int h);
                   virtual MsgRouting WmSizing();
              +    virtual MsgRouting WmEnterSizeMove();
              +    virtual MsgRouting WmExitSizeMove();
                   virtual MsgRouting WmPaint(HDC hDC);
                   virtual MsgRouting WmSettingChange(UINT wFlag, LPCTSTR pszSection);
                   virtual MsgRouting WmNcCalcSize(BOOL fCalcValidRects,
              @@ -242,6 +244,7 @@ public:
                   static void _RepositionSecurityWarning(void* param);
                   static void _SetFullScreenExclusiveModeState(void* param);
                   static void _GetNativeWindowSize(void* param);
              +    static void _WindowDPIChange(void* param);
               
                   inline static BOOL IsResizing() {
                       return sm_resizing;
              @@ -384,7 +387,19 @@ protected:
               private:
                   int m_screenNum;
               
              +    typedef struct {
              +        jint screen;
              +        jfloat scaleX;
              +        jfloat scaleY;
              +    } ScaleRec;
              +
              +    BOOL m_winSizeMove;
              +    ScaleRec prevScaleRec;
              +
                   void InitOwner(AwtWindow *owner);
              +    void CheckWindowDPIChange();
              +    void WindowDPIChange(int prevScreen, float prevScaleX, float prevScaleY,
              +                         int newScreen, float scaleX, float scaleY);
               
                   Type m_windowType;
                   void InitType(JNIEnv *env, jobject peer);
              diff --git a/jdk/src/java.instrument/share/classes/java/lang/instrument/ClassFileTransformer.java b/jdk/src/java.instrument/share/classes/java/lang/instrument/ClassFileTransformer.java
              index 17c5bede590..896f30904de 100644
              --- a/jdk/src/java.instrument/share/classes/java/lang/instrument/ClassFileTransformer.java
              +++ b/jdk/src/java.instrument/share/classes/java/lang/instrument/ClassFileTransformer.java
              @@ -25,7 +25,6 @@
               
               package java.lang.instrument;
               
              -import java.lang.reflect.Module;
               import java.security.AccessController;
               import java.security.PrivilegedAction;
               import java.security.ProtectionDomain;
              @@ -191,6 +190,9 @@ public interface ClassFileTransformer {
                    *         if the input does not represent a well-formed class file
                    * @return a well-formed class file buffer (the result of the transform),
                    *         or {@code null} if no transform is performed
              +     *
              +     * @revised 9
              +     * @spec JPMS
                    */
                   default byte[]
                   transform(  ClassLoader         loader,
              @@ -229,6 +231,7 @@ public interface ClassFileTransformer {
                    *         or {@code null} if no transform is performed
                    *
                    * @since  9
              +     * @spec JPMS
                    */
                   default byte[]
                   transform(  Module              module,
              diff --git a/jdk/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java b/jdk/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java
              index 97986c2e610..fb94e384116 100644
              --- a/jdk/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java
              +++ b/jdk/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java
              @@ -25,7 +25,6 @@
               
               package java.lang.instrument;
               
              -import java.lang.reflect.Module;
               import java.security.ProtectionDomain;
               import java.util.List;
               import java.util.Map;
              @@ -346,7 +345,7 @@ public interface Instrumentation {
               
               
                   /**
              -     * Determines whether a class is modifiable by
              +     * Tests whether a class is modifiable by
                    * {@linkplain #retransformClasses retransformation}
                    * or {@linkplain #redefineClasses redefinition}.
                    * If a class is modifiable then this method returns true.
              @@ -711,9 +710,13 @@ public interface Instrumentation {
                    *         {@code extraProvides} map contains a service provider type that
                    *         is not a member of the module or an implementation of the service;
                    *         or {@code extraProvides} maps a key to an empty list
              +     * @throws UnmodifiableModuleException if the module cannot be modified
                    * @throws NullPointerException if any of the arguments are {@code null} or
                    *         any of the Sets or Maps contains a {@code null} key or value
              +     *
              +     * @see #isModifiableModule(Module)
                    * @since 9
              +     * @spec JPMS
                    */
                   void redefineModule(Module module,
                                       Set extraReads,
              @@ -721,4 +724,20 @@ public interface Instrumentation {
                                       Map> extraOpens,
                                       Set> extraUses,
                                       Map, List>> extraProvides);
              +
              +    /**
              +     * Tests whether a module can be modified with {@link #redefineModule
              +     * redefineModule}. If a module is modifiable then this method returns
              +     * {@code true}. If a module is not modifiable then this method returns
              +     * {@code false}. This method always returns {@code true} when the module
              +     * is an unnamed module (as redefining an unnamed module is a no-op).
              +     *
              +     * @param module the module to test if it can be modified
              +     * @return {@code true} if the module is modifiable, otherwise {@code false}
              +     * @throws NullPointerException if the module is {@code null}
              +     *
              +     * @since 9
              +     * @spec JPMS
              +     */
              +    boolean isModifiableModule(Module module);
               }
              diff --git a/jdk/src/java.base/share/classes/java/lang/StackFramePermission.java b/jdk/src/java.instrument/share/classes/java/lang/instrument/UnmodifiableModuleException.java
              similarity index 58%
              rename from jdk/src/java.base/share/classes/java/lang/StackFramePermission.java
              rename to jdk/src/java.instrument/share/classes/java/lang/instrument/UnmodifiableModuleException.java
              index 58dcba496be..be037b21cf6 100644
              --- a/jdk/src/java.base/share/classes/java/lang/StackFramePermission.java
              +++ b/jdk/src/java.instrument/share/classes/java/lang/instrument/UnmodifiableModuleException.java
              @@ -1,5 +1,5 @@
               /*
              - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
              + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
                * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
                *
                * This code is free software; you can redistribute it and/or modify it
              @@ -22,29 +22,35 @@
                * or visit www.oracle.com if you need additional information or have any
                * questions.
                */
              -package java.lang;
              +
              +package java.lang.instrument;
               
               /**
              - * Permission to access {@link StackWalker.StackFrame}.
              + * Thrown to indicate that a module cannot be modified.
                *
              - * @see java.lang.StackWalker.Option#RETAIN_CLASS_REFERENCE
              - * @see StackWalker.StackFrame#getDeclaringClass()
              + * @see Instrumentation#redefineModule
              + * @since 9
              + * @spec JPMS
                */
              -public class StackFramePermission extends java.security.BasicPermission {
              -    private static final long serialVersionUID = 2841894854386706014L;
              +
              +public class UnmodifiableModuleException extends RuntimeException {
              +    private static final long serialVersionUID = 6912511912351080644L;
               
                   /**
              -     * Creates a new {@code StackFramePermission} object.
              -     *
              -     * @param name Permission name.  Must be "retainClassReference".
              -     *
              -     * @throws IllegalArgumentException if {@code name} is invalid.
              -     * @throws NullPointerException if {@code name} is {@code null}.
              +     * Constructs an {@code UnmodifiableModuleException} with no
              +     * detail message.
                    */
              -    public StackFramePermission(String name) {
              -        super(name);
              -        if (!name.equals("retainClassReference")) {
              -            throw new IllegalArgumentException("name: " + name);
              -        }
              +    public UnmodifiableModuleException() {
              +        super();
              +    }
              +
              +    /**
              +     * Constructs an {@code UnmodifiableModuleException} with the
              +     * specified detail message.
              +     *
              +     * @param  msg the detail message.
              +     */
              +    public UnmodifiableModuleException(String msg) {
              +        super(msg);
                   }
               }
              diff --git a/jdk/src/java.instrument/share/classes/java/lang/instrument/package-info.java b/jdk/src/java.instrument/share/classes/java/lang/instrument/package-info.java
              new file mode 100644
              index 00000000000..9519bf21948
              --- /dev/null
              +++ b/jdk/src/java.instrument/share/classes/java/lang/instrument/package-info.java
              @@ -0,0 +1,326 @@
              +/*
              + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
              + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
              + *
              + * This code is free software; you can redistribute it and/or modify it
              + * under the terms of the GNU General Public License version 2 only, as
              + * published by the Free Software Foundation.  Oracle designates this
              + * particular file as subject to the Classpath exception as provided
              + * by Oracle in the LICENSE file that accompanied this code.
              + *
              + * This code is distributed in the hope that it will be useful, but WITHOUT
              + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
              + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
              + * version 2 for more details (a copy is included in the LICENSE file that
              + * accompanied this code).
              + *
              + * You should have received a copy of the GNU General Public License version
              + * 2 along with this work; if not, write to the Free Software Foundation,
              + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
              + *
              + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
              + * or visit www.oracle.com if you need additional information or have any
              + * questions.
              + */
              +
              +/*
              + * Copyright 2003 Wily Technology, Inc.
              + */
              +
              +/**
              + * Provides services that allow Java programming language agents to instrument
              + * programs running on the JVM. The mechanism for instrumentation is modification
              + * of the byte-codes of methods.
              + *
              + * 

              An agent is deployed as a JAR file. An attribute in the JAR file manifest + * specifies the agent class which will be loaded to start the agent. Agents can + * be started in several ways: + * + *

                + *
              1. For implementations that support a command-line interface, an agent + * can be started by specifying an option on the command-line.

              2. + * + *
              3. An implementation may support a mechanism to start agents some time + * after the VM has started. For example, an implementation may provide a + * mechanism that allows a tool to attach to a running application, and + * initiate the loading of the tool's agent into the running application.

              4. + * + *
              5. An agent may be packaged with an application in an executable JAR + * file.

              6. + *
              + * + *

              Each of these ways to start an agent is described below. + * + * + *

              Starting an Agent from the Command-Line Interface

              + * + *

              Where an implementation provides a means to start agents from the + * command-line interface, an agent is started by adding the following option + * to the command-line: + * + *

              {@code + * -javaagent:[=] + * }
              + * + * where {@code } is the path to the agent JAR file and + * {@code } is the agent options. + * + *

              The manifest of the agent JAR file must contain the attribute {@code + * Premain-Class} in its main manifest. The value of this attribute is the + * name of the agent class. The agent class must implement a public + * static {@code premain} method similar in principle to the {@code main} + * application entry point. After the Java Virtual Machine (JVM) has + * initialized, the {@code premain} method will be called, then the real + * application {@code main} method. The {@code premain} method must return + * in order for the startup to proceed. + * + *

              The {@code premain} method has one of two possible signatures. The + * JVM first attempts to invoke the following method on the agent class: + * + *

              {@code + * public static void premain(String agentArgs, Instrumentation inst) + * }
              + * + *

              If the agent class does not implement this method then the JVM will + * attempt to invoke: + *

              {@code + * public static void premain(String agentArgs) + * }
              + + *

              The agent class may also have an {@code agentmain} method for use when + * the agent is started after VM startup (see below). When the agent is started + * using a command-line option, the {@code agentmain} method is not invoked. + * + *

              Each agent is passed its agent options via the {@code agentArgs} parameter. + * The agent options are passed as a single string, any additional parsing + * should be performed by the agent itself. + * + *

              If the agent cannot be started (for example, because the agent class + * cannot be loaded, or because the agent class does not have an appropriate + * {@code premain} method), the JVM will abort. If a {@code premain} method + * throws an uncaught exception, the JVM will abort. + * + *

              An implementation is not required to provide a way to start agents + * from the command-line interface. When it does, then it supports the + * {@code -javaagent} option as specified above. The {@code -javaagent} option + * may be used multiple times on the same command-line, thus starting multiple + * agents. The {@code premain} methods will be called in the order that the + * agents are specified on the command line. More than one agent may use the + * same {@code }. + * + *

              There are no modeling restrictions on what the agent {@code premain} + * method may do. Anything application {@code main} can do, including creating + * threads, is legal from {@code premain}. + * + * + *

              Starting an Agent After VM Startup

              + * + *

              An implementation may provide a mechanism to start agents sometime after + * the the VM has started. The details as to how this is initiated are + * implementation specific but typically the application has already started and + * its {@code main} method has already been invoked. In cases where an + * implementation supports the starting of agents after the VM has started the + * following applies: + * + *

                + * + *
              1. The manifest of the agent JAR must contain the attribute {@code + * Agent-Class} in its main manfiest. The value of this attribute is the name + * of the agent class.

              2. + * + *
              3. The agent class must implement a public static {@code agentmain} + * method.

              4. + * + *
              + * + *

              The {@code agentmain} method has one of two possible signatures. The JVM + * first attempts to invoke the following method on the agent class: + * + *

              {@code + * public static void agentmain(String agentArgs, Instrumentation inst) + * }
              + * + *

              If the agent class does not implement this method then the JVM will + * attempt to invoke: + * + *

              {@code + * public static void agentmain(String agentArgs) + * }
              + * + *

              The agent class may also have a {@code premain} method for use when the + * agent is started using a command-line option. When the agent is started after + * VM startup the {@code premain} method is not invoked. + * + *

              The agent is passed its agent options via the {@code agentArgs} + * parameter. The agent options are passed as a single string, any additional + * parsing should be performed by the agent itself. + * + *

              The {@code agentmain} method should do any necessary initialization + * required to start the agent. When startup is complete the method should + * return. If the agent cannot be started (for example, because the agent class + * cannot be loaded, or because the agent class does not have a conformant + * {@code agentmain} method), the JVM will not abort. If the {@code agentmain} + * method throws an uncaught exception it will be ignored (but may be logged + * by the JVM for troubleshooting purposes). + * + * + *

              Including an Agent in an Executable JAR file

              + * + *

              The JAR File Specification defines manifest attributes for standalone + * applications that are packaged as executable JAR files. If an + * implementation supports a mechanism to start an application as an executable + * JAR then the main manifest may include the {@code Launcher-Agent-Class} + * attribute to specify the class name of an agent to start before the application + * {@code main} method is invoked. The Java virtual machine attempts to + * invoke the following method on the agent class: + * + *

              {@code + * public static void agentmain(String agentArgs, Instrumentation inst) + * }
              + * + *

              If the agent class does not implement this method then the JVM will + * attempt to invoke: + * + *

              {@code + * public static void agentmain(String agentArgs) + * }
              + * + *

              The value of the {@code agentArgs} parameter is always the empty string. + * + *

              The {@code agentmain} method should do any necessary initialization + * required to start the agent and return. If the agent cannot be started, for + * example the agent class cannot be loaded, the agent class does not define a + * conformant {@code agentmain} method, or the {@code agentmain} method throws + * an uncaught exception or error, the JVM will abort. + * + * + *

              Loading agent classes and the modules/classes available to the agent + * class

              + * + *

              Classes loaded from the agent JAR file are loaded by the + * {@linkplain ClassLoader#getSystemClassLoader() system class loader} and are + * members of the system class loader's {@linkplain ClassLoader#getUnnamedModule() + * unnamed module}. The system class loader typically defines the class containing + * the application {@code main} method too. + * + *

              The classes visible to the agent class are the classes visible to the system + * class loader and minimally include: + * + *

                + * + *
              • The classes in packages exported by the modules in the {@linkplain + * ModuleLayer#boot() boot layer}. Whether the boot layer contains all platform + * modules or not will depend on the initial module or how the application was + * started.

              • + * + *
              • The classes that can be defined by the system class loader (typically + * the class path) to be members of its unnamed module.

              • + * + *
              • Any classes that the agent arranges to be defined by the bootstrap + * class loader to be members of its unnamed module.

              • + * + *
              + * + *

              If agent classes need to link to classes in platform (or other) modules + * that are not in the boot layer then the application may need to be started in + * a way that ensures that these modules are in the boot layer. In the JDK + * implementation for example, the {@code --add-modules} command line option can + * be used to add modules to the set of root modules to resolve at startup.

              + * + *

              Supporting classes that the agent arranges to be loaded by the bootstrap + * class loader (by means of {@link Instrumentation#appendToBootstrapClassLoaderSearch + * appendToBootstrapClassLoaderSearch} or the {@code Boot-Class-Path} attribute + * specified below), must link only to classes defined to the bootstrap class loader. + * There is no guarantee that all platform classes can be defined by the boot + * class loader. + * + *

              If a custom system class loader is configured (by means of the system property + * {@code java.system.class.loader} as specified in the {@link + * ClassLoader#getSystemClassLoader() getSystemClassLoader} method) then it must + * define the {@code appendToClassPathForInstrumentation} method as specified in + * {@link Instrumentation#appendToSystemClassLoaderSearch appendToSystemClassLoaderSearch}. + * In other words, a custom system class loader must support the mechanism to + * add an agent JAR file to the system class loader search. + * + *

              Manifest Attributes

              + * + *

              The following manifest attributes are defined for an agent JAR file: + * + *

              + * + *
              {@code Premain-Class}
              + *
              When an agent is specified at JVM launch time this attribute specifies + * the agent class. That is, the class containing the {@code premain} method. + * When an agent is specified at JVM launch time this attribute is required. If + * the attribute is not present the JVM will abort. Note: this is a class name, + * not a file name or path.
              + * + *
              {@code Agent-Class}
              + *
              If an implementation supports a mechanism to start agents sometime after + * the VM has started then this attribute specifies the agent class. That is, + * the class containing the {@code agentmain} method. This attribute is required + * if it is not present the agent will not be started. Note: this is a class name, + * not a file name or path.
              + * + *
              {@code Launcher-Agent-Class}
              + *
              If an implementation supports a mechanism to start an application as an + * executable JAR then the main manifest may include this attribute to specify + * the class name of an agent to start before the application {@code main} + * method is invoked.
              + * + *
              {@code Boot-Class-Path}
              + *
              A list of paths to be searched by the bootstrap class loader. Paths + * represent directories or libraries (commonly referred to as JAR or zip + * libraries on many platforms). These paths are searched by the bootstrap class + * loader after the platform specific mechanisms of locating a class have failed. + * Paths are searched in the order listed. Paths in the list are separated by one + * or more spaces. A path takes the syntax of the path component of a hierarchical + * URI. The path is absolute if it begins with a slash character ('/'), otherwise + * it is relative. A relative path is resolved against the absolute path of the + * agent JAR file. Malformed and non-existent paths are ignored. When an agent is + * started sometime after the VM has started then paths that do not represent a + * JAR file are ignored. This attribute is optional.
              + * + *
              {@code Can-Redefine-Classes}
              + *
              Boolean ({@code true} or {@code false}, case irrelevant). Is the ability + * to redefine classes needed by this agent. Values other than {@code true} are + * considered {@code false}. This attribute is optional, the default is {@code + * false}.
              + * + *
              {@code Can-Retransform-Classes}
              + *
              Boolean ({@code true} or {@code false}, case irrelevant). Is the ability + * to retransform classes needed by this agent. Values other than {@code true} + * are considered {@code false}. This attribute is optional, the default is + * {@code false}.
              + * + *
              {@code Can-Set-Native-Method-Prefix}
              + *
              Boolean ({@code true} or {@code false}, case irrelevant). Is the ability + * to set native method prefix needed by this agent. Values other than {@code + * true} are considered {@code false}. This attribute is optional, the default + * is {@code false}.
              + * + *
              + * + *

              An agent JAR file may have both the {@code Premain-Class} and {@code + * Agent-Class} attributes present in the manifest. When the agent is started + * on the command-line using the {@code -javaagent} option then the {@code + * Premain-Class} attribute specifies the name of the agent class and the {@code + * Agent-Class} attribute is ignored. Similarly, if the agent is started sometime + * after the VM has started, then the {@code Agent-Class} attribute specifies + * the name of the agent class (the value of {@code Premain-Class} attribute is + * ignored). + * + * + *

              Instrumenting code in modules

              + * + *

              As an aid to agents that deploy supporting classes on the search path of + * the bootstrap class loader, or the search path of the class loader that loads + * the main agent class, the Java virtual machine arranges for the module of + * transformed classes to read the unnamed module of both class loaders. + * + * @since 1.5 + * @revised 1.6 + * @revised 9 + */ + +package java.lang.instrument; \ No newline at end of file diff --git a/jdk/src/java.instrument/share/classes/java/lang/instrument/package.html b/jdk/src/java.instrument/share/classes/java/lang/instrument/package.html deleted file mode 100644 index e7f8d8f6996..00000000000 --- a/jdk/src/java.instrument/share/classes/java/lang/instrument/package.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - - - -Provides services that allow Java programming language agents to instrument programs running on the JVM. -The mechanism for instrumentation is modification of the byte-codes of methods. - -

              Package Specification

              - -

              -An agent is deployed as a JAR file. An attribute in the JAR file manifest specifies the -agent class which will be loaded to start the agent. For implementations that support a command-line -interface, an agent is started by specifying an option on the command-line. -Implementations may also support a mechanism to start agents some time after the VM has -started. For example, an implementation may provide a mechanism that allows a tool to -attach to a running application, and initiate the loading of the tool's agent into -the running application. The details as to how the load is initiated, is implementation -dependent. - -

              Command-Line Interface

              - -

              -An implementation is not required to provide a way to start agents from the -command-line interface. On implementations that do provide a way to start agents -from the command-line interface, an agent is started by adding this option to -the command-line: -

              --javaagent:jarpath[=options] -
              -jarpath is the path to the agent JAR file. -options is the agent options. -This switch may be used multiple times on the same command-line, -thus creating multiple agents. -More than one agent may use the same jarpath. -An agent JAR file must conform to the JAR file specification. - -

              -The manifest of the agent JAR file must contain the attribute Premain-Class. The -value of this attribute is the name of the agent class. The agent class must implement a -public static premain method similar in principle to the main application -entry point. After the Java Virtual Machine (JVM) has initialized, each premain method -will be called in the order the agents were specified, then the real application -main method will be called. -Each premain method must return in order for the startup sequence to proceed. - -

              -The premain method has one of two possible signatures. The JVM first attempts to -invoke the following method on the agent class: - -

              -public static void -premain(String agentArgs, Instrumentation inst); - -
              - -

              -If the agent class does not implement this method then the JVM will attempt to invoke: - -

              -public static void -premain(String agentArgs); - -
              - -

              -The agent class may also have an agentmain method for use when the agent is started -after VM startup. When the agent is started using a command-line option, the agentmain -method is not invoked. - - -

              -The agent class will be loaded by the system class loader -(see {@link java.lang.ClassLoader#getSystemClassLoader ClassLoader.getSystemClassLoader}). This is -the class loader which typically loads the class containing the application main method. -The system class loader must support a mechanism to add an agent JAR file to the system class path. -If it is a custom system class loader then it must define the -appendToClassPathForInstrumentation method as specified in -{@link Instrumentation#appendToSystemClassLoaderSearch appendToSystemClassLoaderSearch}. -The premain methods will be run under the same security and classloader -rules as the application main method. -There are no modeling restrictions on what the agent premain method may do. -Anything application main can do, including creating threads, is legal from premain. - -

              -Each agent is passed its agent options via the agentArgs parameter. -The agent options are passed as a single string, -any additional parsing should be performed by the agent itself. - -

              -If the agent cannot be resolved -(for example, because the agent class cannot be loaded, -or because the agent class does not have an appropriate premain method), the JVM will abort. -If a premain method throws an uncaught exception, the JVM will abort. - - - -

              Starting Agents After VM Startup

              - -

              -An implementation may provide a mechanism to start agents sometime after the -the VM has started. The details as to how this is initiated are implementation -specific but typically the application has already started and its -main method has already been invoked. In cases where an implementation -supports the starting of agents after the VM has started the following applies: - -

                -
              1. The manifest of the agent JAR must contain the attribute Agent-Class. - The value of this attribute is the name of the agent class.

              2. - -
              3. The agent class must implement a public static agentmain method.

              4. - -
              5. The system class loader ( - {@link java.lang.ClassLoader#getSystemClassLoader ClassLoader.getSystemClassLoader}) must - support a mechanism to add an agent JAR file to the system class path. - If it is a custom system class loader then it must define the - appendToClassPathForInstrumentation method as specified in - {@link Instrumentation#appendToSystemClassLoaderSearch appendToSystemClassLoaderSearch}.

              6. -
              - -

              -The agent JAR is appended to the system class path. This is the class loader that typically loads -the class containing the application main method. The agent class is loaded and the -JVM attempts to invoke the agentmain method. The JVM first attempts to invoke -the following method on the agent class: - -

              -public static void -agentmain(String agentArgs, Instrumentation inst); - -
              - -

              -If the agent class does not implement this method then the JVM will attempt to invoke: - -

              -public static void -agentmain(String agentArgs); - -
              - -

              -The agent class may also have an premain method for use when the agent is started -using a command-line option. When the agent is started after VM startup the premain -method is not invoked. - - -

              -The agent is passed its agent options via the agentArgs parameter. -The agent options are passed as a single string, -any additional parsing should be performed by the agent itself. - -

              -The agentmain method should do any necessary initialization -required to start the agent. When startup is complete the method should -return. If the agent cannot be started -(for example, because the agent class cannot be loaded, -or because the agent class does not have a conformant agentmain method), the JVM will -not abort. If the agentmain method throws an uncaught exception it will be ignored. - - - -

              Manifest Attributes

              -The following manifest attributes are defined for an agent JAR file: -
              -
              -
              Premain-Class
              -
              - When an agent is specified at JVM launch time this attribute - specifies the agent class. - That is, the class containing the premain method. - When an agent is specified at JVM launch time this attribute - is required. If the attribute is not present the JVM will abort. - Note: this is a class name, not a file name or path. -
              - -
              Agent-Class
              -
              - If an implementation supports a mechanism to start agents - sometime after the VM has started then this attribute specifies - the agent class. - That is, the class containing the agentmain method. - This attribute is required, if it is not present the agent - will not be started. - Note: this is a class name, not a file name or path. -
              - -
              Boot-Class-Path
              -
              - A list of paths to be searched by the bootstrap class - loader. Paths represent directories or libraries - (commonly referred to as JAR or zip libraries on - many platforms). - These paths are searched by the - bootstrap class loader after the platform specific - mechanisms of locating a class have failed. - Paths are searched in the order listed. - Paths in the list are separated by one or more spaces. - A path takes the syntax of the path component of a - hierarchical URI. The path is - absolute if it begins with a slash character ('/'), - otherwise it is relative. A relative path is resolved - against the absolute path of the agent JAR file. - Malformed and non-existent paths are ignored. - When an agent is started sometime after the VM has - started then paths that do not represent a JAR file - are ignored. - This attribute is optional. -
              -
              Can-Redefine-Classes
              -
              - Boolean (true or false, case irrelevant). - Is the ability to redefine classes - needed by this agent. - Values other than true are considered false. - This attribute is optional, the default is false. -
              -
              Can-Retransform-Classes
              -
              - Boolean (true or false, case irrelevant). - Is the ability to retransform classes - needed by this agent. - Values other than true are considered false. - This attribute is optional, the default is false. -
              -
              Can-Set-Native-Method-Prefix
              -
              - Boolean (true or false, case irrelevant). - Is the ability to set native method prefix needed by this agent. - Values other than true are considered false. - This attribute is optional, the default is false. -
              -
              -
              - -

              -An agent JAR file may have both the Premain-Class and Agent-Class -attributes present in the manifest. When the agent is started on the command-line using -the -javaagent option then the Premain-Class attribute -specifies the name of the agent class and the Agent-Class attribute is -ignored. Similarly, if the agent is started sometime after the VM has started, then -the Agent-Class attribute specifies the name of the agent class -(the value of Premain-Class attribute is ignored). - - -

              Instrumenting code in modules

              - -As an aid to agents that deploy supporting classes on the search path of the -bootstrap class loader, or the search path of the class loader that loads -the main agent class, the Java virtual machine arranges for the module of -transformed classes to read the unnamed module of both class loaders. - - -

              Related Documentation

              - -For tool documentation, please see: - - -@since 1.5 -@revised 1.6 - - - diff --git a/jdk/src/java.instrument/share/classes/module-info.java b/jdk/src/java.instrument/share/classes/module-info.java index 27587d2c250..526aed6bd42 100644 --- a/jdk/src/java.instrument/share/classes/module-info.java +++ b/jdk/src/java.instrument/share/classes/module-info.java @@ -26,8 +26,14 @@ /** * Defines services that allow agents to * instrument programs running on the JVM. + * + * @moduleGraph + * @since 9 */ module java.instrument { exports java.lang.instrument; + + // allow java launcher to load agents in executable JAR files + exports sun.instrument to java.base; } diff --git a/jdk/src/java.instrument/share/classes/sun/instrument/InstrumentationImpl.java b/jdk/src/java.instrument/share/classes/sun/instrument/InstrumentationImpl.java index b2c2a24e50d..4669dcac8a0 100644 --- a/jdk/src/java.instrument/share/classes/sun/instrument/InstrumentationImpl.java +++ b/jdk/src/java.instrument/share/classes/sun/instrument/InstrumentationImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -23,11 +23,10 @@ * questions. */ - package sun.instrument; +import java.lang.instrument.UnmodifiableModuleException; import java.lang.reflect.Method; -import java.lang.reflect.Module; import java.lang.reflect.AccessibleObject; import java.lang.instrument.ClassFileTransformer; import java.lang.instrument.ClassDefinition; @@ -132,6 +131,13 @@ public class InstrumentationImpl implements Instrumentation { return isModifiableClass0(mNativeAgent, theClass); } + public boolean isModifiableModule(Module module) { + if (module == null) { + throw new NullPointerException("'module' is null"); + } + return true; + } + public boolean isRetransformClassesSupported() { // ask lazily since there is some overhead @@ -243,6 +249,9 @@ public class InstrumentationImpl implements Instrumentation { if (!module.isNamed()) return; + if (!isModifiableModule(module)) + throw new UnmodifiableModuleException(module.getName()); + // copy and check reads extraReads = new HashSet<>(extraReads); if (extraReads.contains(null)) @@ -312,7 +321,7 @@ public class InstrumentationImpl implements Instrumentation { return Collections.emptyMap(); Map> result = new HashMap<>(); - Set packages = Set.of(module.getPackages()); + Set packages = module.getPackages(); for (Map.Entry> e : map.entrySet()) { String pkg = e.getKey(); if (pkg == null) @@ -546,4 +555,15 @@ public class InstrumentationImpl implements Instrumentation { classfileBuffer); } } + + + /** + * Invoked by the java launcher to load a java agent that is packaged with + * the main application in an executable JAR file. + */ + public static void loadAgent(String path) { + loadAgent0(path); + } + + private static native void loadAgent0(String path); } diff --git a/jdk/src/java.instrument/share/classes/sun/instrument/TransformerManager.java b/jdk/src/java.instrument/share/classes/sun/instrument/TransformerManager.java index dcac4b7ad8f..29665440f9f 100644 --- a/jdk/src/java.instrument/share/classes/sun/instrument/TransformerManager.java +++ b/jdk/src/java.instrument/share/classes/sun/instrument/TransformerManager.java @@ -25,10 +25,8 @@ package sun.instrument; - import java.lang.instrument.Instrumentation; import java.lang.instrument.ClassFileTransformer; -import java.lang.reflect.Module; import java.security.ProtectionDomain; /* diff --git a/jdk/src/java.instrument/share/native/libinstrument/InstrumentationImplNativeMethods.c b/jdk/src/java.instrument/share/native/libinstrument/InstrumentationImplNativeMethods.c index 6d117bef5e9..7b2ca5de9e2 100644 --- a/jdk/src/java.instrument/share/native/libinstrument/InstrumentationImplNativeMethods.c +++ b/jdk/src/java.instrument/share/native/libinstrument/InstrumentationImplNativeMethods.c @@ -159,3 +159,20 @@ JNIEXPORT void JNICALL Java_sun_instrument_InstrumentationImpl_setNativeMethodPr (JNIEnv * jnienv, jobject implThis, jlong agent, jobjectArray prefixArray, jboolean isRetransformable) { setNativeMethodPrefixes(jnienv, (JPLISAgent*)(intptr_t)agent, prefixArray, isRetransformable); } + + +/* + * Class: sun_instrument_InstrumentationImpl + * Method: loadAgent0 + */ +JNIEXPORT void JNICALL Java_sun_instrument_InstrumentationImpl_loadAgent0 + (JNIEnv* env, jclass clazz, jstring jarfile) +{ + extern jint loadAgent(JNIEnv* env, jstring path); + if (loadAgent(env, jarfile) != JNI_OK) { + if (!(*env)->ExceptionCheck(env)) { + createAndThrowInternalError(env); + } + } +} + diff --git a/jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c b/jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c index 625ea1ad13d..dad02634dc8 100644 --- a/jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c +++ b/jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -106,7 +106,7 @@ getBooleanAttribute(const jarAttribute* attributes, const char* name) { * convert them to JVM TI capabilities. */ void -convertCapabilityAtrributes(const jarAttribute* attributes, JPLISAgent* agent) { +convertCapabilityAttributes(const jarAttribute* attributes, JPLISAgent* agent) { /* set redefineClasses capability */ if (getBooleanAttribute(attributes, "Can-Redefine-Classes")) { addRedefineClassesCapability(agent); @@ -229,7 +229,7 @@ DEF_Agent_OnLoad(JavaVM *vm, char *tail, void * reserved) { /* * Convert JAR attributes into agent capabilities */ - convertCapabilityAtrributes(attributes, agent); + convertCapabilityAttributes(attributes, agent); /* * Track (record) the agent class name and options data @@ -386,7 +386,7 @@ DEF_Agent_OnAttach(JavaVM* vm, char *args, void * reserved) { /* * Convert JAR attributes into agent capabilities */ - convertCapabilityAtrributes(attributes, agent); + convertCapabilityAttributes(attributes, agent); /* * Create the java.lang.instrument.Instrumentation instance @@ -435,6 +435,109 @@ JNIEXPORT void JNICALL DEF_Agent_OnUnload(JavaVM *vm) { } +/** + * Invoked by the java launcher to load an agent in the main executable JAR. + * The Launcher-Agent-Class attribute in the main manifest of the JAR file + * is the agent class. + * + * Returns JNI_OK if the agent is loaded and initialized; JNI_ERR if this + * function fails, possibly with a pending exception. + */ +jint loadAgent(JNIEnv* env, jstring path) { + JavaVM* vm; + JPLISAgent* agent; + const char* jarfile = NULL; + jarAttribute* attributes = NULL; + char* agentClass = NULL; + char* bootClassPath; + int oldLen, newLen; + jint result = JNI_ERR; + + if ((*env)->GetJavaVM(env, &vm) < 0) { + return JNI_ERR; + } + + // create JPLISAgent with JVMTI environment + if (createNewJPLISAgent(vm, &agent) != JPLIS_INIT_ERROR_NONE) { + return JNI_ERR; + } + + // get path to JAR file as UTF-8 string + jarfile = (*env)->GetStringUTFChars(env, path, NULL); + if (jarfile == NULL) { + return JNI_ERR; + } + + // read the attributes in the main section of JAR manifest + attributes = readAttributes(jarfile); + if (attributes == NULL) { + goto releaseAndReturn; + } + + // Launcher-Agent-Class is required + agentClass = getAttribute(attributes, "Launcher-Agent-Class"); + if (agentClass == NULL) { + goto releaseAndReturn; + } + + // The value of Launcher-Agent-Class is in UTF-8, convert it to modified UTF-8 + oldLen = (int) strlen(agentClass); + newLen = modifiedUtf8LengthOfUtf8(agentClass, oldLen); + if (newLen == oldLen) { + agentClass = strdup(agentClass); + } else { + char* str = (char*) malloc(newLen + 1); + if (str != NULL) { + convertUtf8ToModifiedUtf8(agentClass, oldLen, str, newLen); + } + agentClass = str; + } + if (agentClass == NULL) { + jthrowable oome = createThrowable(env, "java/lang/OutOfMemoryError", NULL); + if (oome != NULL) (*env)->Throw(env, oome); + goto releaseAndReturn; + } + + // Boot-Class-Path + bootClassPath = getAttribute(attributes, "Boot-Class-Path"); + if (bootClassPath != NULL) { + appendBootClassPath(agent, jarfile, bootClassPath); + } + + // Can-XXXX capabilities + convertCapabilityAttributes(attributes, agent); + + // Create the java.lang.instrument.Instrumentation object + if (!createInstrumentationImpl(env, agent)) { + goto releaseAndReturn; + } + + // Enable the ClassFileLoadHook + if (!setLivePhaseEventHandlers(agent)) { + goto releaseAndReturn; + } + + // invoke the agentmain method + if (!startJavaAgent(agent, env, agentClass, "", agent->mAgentmainCaller)) { + goto releaseAndReturn; + } + + // initialization complete + result = JNI_OK; + + releaseAndReturn: + if (agentClass != NULL) { + free(agentClass); + } + if (attributes != NULL) { + freeAttributes(attributes); + } + if (jarfile != NULL) { + (*env)->ReleaseStringUTFChars(env, path, jarfile); + } + + return result; +} /* * JVMTI callback support diff --git a/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.h b/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.h index 008b2fabc6a..08d61636839 100644 --- a/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.h +++ b/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.h @@ -66,7 +66,7 @@ typedef struct _JPLISEnvironment JPLISEnvironment; #define JPLIS_INSTRUMENTIMPL_AGENTMAININVOKER_METHODSIGNATURE "(Ljava/lang/String;Ljava/lang/String;)V" #define JPLIS_INSTRUMENTIMPL_TRANSFORM_METHODNAME "transform" #define JPLIS_INSTRUMENTIMPL_TRANSFORM_METHODSIGNATURE \ - "(Ljava/lang/reflect/Module;Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/Class;Ljava/security/ProtectionDomain;[BZ)[B" + "(Ljava/lang/Module;Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/Class;Ljava/security/ProtectionDomain;[BZ)[B" /* diff --git a/jdk/src/java.logging/share/classes/java/util/logging/Level.java b/jdk/src/java.logging/share/classes/java/util/logging/Level.java index 526161bafa9..2af2c6d83d6 100644 --- a/jdk/src/java.logging/share/classes/java/util/logging/Level.java +++ b/jdk/src/java.logging/share/classes/java/util/logging/Level.java @@ -24,10 +24,10 @@ */ package java.util.logging; + import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; -import java.lang.reflect.Module; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; diff --git a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java index 7e8ec41d84f..74bda0a928f 100644 --- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java +++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -23,7 +23,6 @@ * questions. */ - package java.util.logging; import java.io.*; @@ -43,7 +42,6 @@ import java.util.stream.Stream; import jdk.internal.misc.JavaAWTAccess; import jdk.internal.misc.SharedSecrets; import sun.util.logging.internal.LoggingProviderImpl; -import java.lang.reflect.Module; import static jdk.internal.logger.DefaultLoggerFinder.isSystem; /** @@ -1839,6 +1837,7 @@ public class LogManager { * logging configuration file. * * @see #updateConfiguration(java.io.InputStream, java.util.function.Function) + * @since 9 */ public void updateConfiguration(Function> mapper) throws IOException { @@ -1888,7 +1887,7 @@ public class LogManager { * The registered {@linkplain #addConfigurationListener configuration * listeners} will be invoked after the configuration is successfully updated. *

              - * + *
              * * * @@ -2035,6 +2034,7 @@ public class LogManager { * @throws IOException if there are problems reading from the stream, * or the given stream is not in the * {@linkplain java.util.Properties properties file} format. + * @since 9 */ public void updateConfiguration(InputStream ins, Function> mapper) diff --git a/jdk/src/java.logging/share/classes/java/util/logging/Logger.java b/jdk/src/java.logging/share/classes/java/util/logging/Logger.java index 1cfd6f98659..dea269302d2 100644 --- a/jdk/src/java.logging/share/classes/java/util/logging/Logger.java +++ b/jdk/src/java.logging/share/classes/java/util/logging/Logger.java @@ -23,11 +23,9 @@ * questions. */ - package java.util.logging; import java.lang.ref.WeakReference; -import java.lang.reflect.Module; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; @@ -664,7 +662,7 @@ public class Logger { * a new logger is created. *

              * If a new logger is created its log level will be configured - * based on the LogManager configuration and it will configured + * based on the LogManager configuration and it will be configured * to also send logging output to its parent's Handlers. It will * be registered in the LogManager global namespace. *

              @@ -726,7 +724,7 @@ public class Logger { * *

              * If a new logger is created its log level will be configured - * based on the LogManager and it will configured to also send logging + * based on the LogManager and it will be configured to also send logging * output to its parent's Handlers. It will be registered in * the LogManager global namespace. *

              diff --git a/jdk/src/java.logging/share/classes/java/util/logging/SimpleFormatter.java b/jdk/src/java.logging/share/classes/java/util/logging/SimpleFormatter.java index 9844729324f..fe81640654b 100644 --- a/jdk/src/java.logging/share/classes/java/util/logging/SimpleFormatter.java +++ b/jdk/src/java.logging/share/classes/java/util/logging/SimpleFormatter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -36,7 +36,7 @@ import jdk.internal.logger.SurrogateLogger; * format. The summary will typically be 1 or 2 lines. * *

              - * + * * Configuration: * The {@code SimpleFormatter} is initialized with the * format string diff --git a/jdk/src/java.logging/share/classes/java/util/logging/package.html b/jdk/src/java.logging/share/classes/java/util/logging/package.html index 503db8146e8..16891121119 100644 --- a/jdk/src/java.logging/share/classes/java/util/logging/package.html +++ b/jdk/src/java.logging/share/classes/java/util/logging/package.html @@ -115,8 +115,7 @@ for all arguments except for the initial Level argument (if any).

              For an overview of control flow, please refer to the - -Java Logging Overview. +{@extLink logging_overview Java Logging Overview}

              diff --git a/jdk/src/java.logging/share/classes/module-info.java b/jdk/src/java.logging/share/classes/module-info.java index 293d3873da1..272d561291a 100644 --- a/jdk/src/java.logging/share/classes/module-info.java +++ b/jdk/src/java.logging/share/classes/module-info.java @@ -25,9 +25,13 @@ /** * Defines the Java Logging API. + * + * @moduleGraph + * @since 9 */ module java.logging { exports java.util.logging; + provides jdk.internal.logger.DefaultLoggerFinder with sun.util.logging.internal.LoggingProviderImpl; } diff --git a/jdk/src/java.logging/share/classes/sun/util/logging/internal/LoggingProviderImpl.java b/jdk/src/java.logging/share/classes/sun/util/logging/internal/LoggingProviderImpl.java index 1ccf2cf7c92..432228a88d0 100644 --- a/jdk/src/java.logging/share/classes/sun/util/logging/internal/LoggingProviderImpl.java +++ b/jdk/src/java.logging/share/classes/sun/util/logging/internal/LoggingProviderImpl.java @@ -32,7 +32,6 @@ import java.util.ResourceBundle; import java.util.function.Supplier; import java.lang.System.LoggerFinder; import java.lang.System.Logger; -import java.lang.reflect.Module; import java.util.Objects; import java.util.logging.LogManager; import jdk.internal.logger.DefaultLoggerFinder; diff --git a/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnector.java b/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnector.java index 7684567c1ca..16eeff47d4b 100644 --- a/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnector.java +++ b/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnector.java @@ -38,11 +38,11 @@ import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.ObjectStreamClass; import java.io.Serializable; +import java.lang.module.ModuleDescriptor; import java.lang.ref.WeakReference; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Module; import java.lang.reflect.Proxy; import java.net.MalformedURLException; import java.rmi.MarshalledObject; @@ -107,6 +107,8 @@ import sun.rmi.server.UnicastRef2; import sun.rmi.transport.LiveRef; import java.io.NotSerializableException; +import static java.lang.module.ModuleDescriptor.Modifier.SYNTHETIC; + /** *

              A connection to a remote RMI connector. Usually, such * connections are made using {@link @@ -2020,8 +2022,14 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable Module rmiModule = RemoteRef.class.getModule(); String pkg = packageOf(pRefClassName); - assert pkg != null && pkg.length() > 0 && !pkg.equals(packageOf(proxyRefCName)); - Module m = Modules.defineModule(cl, "jdk.remoteref", Collections.singleton(pkg)); + assert pkg != null && pkg.length() > 0 && + !pkg.equals(packageOf(proxyRefCName)); + + ModuleDescriptor descriptor = + ModuleDescriptor.newModule("jdk.remoteref", Set.of(SYNTHETIC)) + .packages(Set.of(pkg)) + .build(); + Module m = Modules.defineModule(cl, descriptor, null); // jdk.remoteref needs to read to java.base and jmxModule Modules.addReads(m, Object.class.getModule()); diff --git a/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/package.html b/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/package.html index 9669be24397..fb58ff80547 100644 --- a/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/package.html +++ b/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/package.html @@ -98,7 +98,7 @@ questions. constructor.

              -

              Connector addresses generated by the +

              Connector addresses generated by the server

              If the serviceURL you specify has an empty URL @@ -157,7 +157,7 @@ questions. port.

              -

              Connector addresses based on directory +

              Connector addresses based on directory entries

              As an alternative to the generated addresses just described, diff --git a/jdk/src/java.management.rmi/share/classes/module-info.java b/jdk/src/java.management.rmi/share/classes/module-info.java index ae6fc006c99..7a471066957 100644 --- a/jdk/src/java.management.rmi/share/classes/module-info.java +++ b/jdk/src/java.management.rmi/share/classes/module-info.java @@ -24,34 +24,37 @@ */ /** - * Defines the RMI Connector for the Java Management Extensions (JMX) Remote API. - *

              - * The {@linkplain javax.management.remote.rmi RMI connector} is a connector - * for the JMX Remote API that uses RMI to transmit client requests to a remote - * MBean server. + * Defines the {@linkplain javax.management.remote.rmi RMI connector} + * for the Java Management Extensions (JMX) Remote API. + * + *

              + *
              Providers:
              + *
              This module provides the + * {@link javax.management.remote.JMXConnectorProvider} service, + * which creates JMX connector clients using the RMI protocol. + * Instances of {@code JMXConnector} can be obtained via the + * {@link javax.management.remote.JMXConnectorFactory#newJMXConnector + * JMXConnectorFactory.newJMXConnector} factory method. + * It also provides the {@link javax.management.remote.JMXConnectorServerProvider} service, + * which creates JMX connector servers using the RMI protocol. + * Instances of {@code JMXConnectorServer} can be obtained via the + * {@link javax.management.remote.JMXConnectorServerFactory#newJMXConnectorServer + * JMXConnectorServerFactory.newJMXConnectorServer} factory method. + *
              + *
              * * @provides javax.management.remote.JMXConnectorProvider - * A provider of {@code JMXConnector} for the RMI protocol.
              - * Instances of {@code JMXConnector} using the RMI protocol - * are usually created by the {@link - * javax.management.remote.JMXConnectorFactory} which will locate - * and load the appropriate {@code JMXConnectorProvider} service - * implementation for the given protocol. - * * @provides javax.management.remote.JMXConnectorServerProvider - * A provider of {@code JMXConnectorServer} for the RMI protocol.
              - * Instances of {@code JMXConnectorServer} using the RMI protocol - * are usually created by the {@link - * javax.management.remote.JMXConnectorServerFactory} which will locate - * and load the appropriate {@code JMXConnectorServerProvider} service - * implementation for the given protocol. * + * @moduleGraph + * @since 9 */ module java.management.rmi { + requires java.naming; + requires transitive java.management; requires transitive java.rmi; - requires java.naming; exports javax.management.remote.rmi; @@ -66,9 +69,9 @@ module java.management.rmi { // The java.management.rmi module provides implementations // of the JMXConnectorProvider and JMXConnectorServerProvider // services supporting the RMI protocol. - provides javax.management.remote.JMXConnectorProvider - with com.sun.jmx.remote.protocol.rmi.ClientProvider; - provides javax.management.remote.JMXConnectorServerProvider - with com.sun.jmx.remote.protocol.rmi.ServerProvider; + provides javax.management.remote.JMXConnectorProvider with + com.sun.jmx.remote.protocol.rmi.ClientProvider; + provides javax.management.remote.JMXConnectorServerProvider with + com.sun.jmx.remote.protocol.rmi.ServerProvider; } diff --git a/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java b/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java index 7ad4760a869..108b3c9ae59 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java +++ b/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -34,15 +34,15 @@ import sun.management.LockInfoCompositeData; * an ownable synchronizer, or the {@link Condition Condition} * object associated with synchronizers. *

              - * An ownable synchronizer is + * An ownable synchronizer is * a synchronizer that may be exclusively owned by a thread and uses * {@link AbstractOwnableSynchronizer AbstractOwnableSynchronizer} * (or its subclass) to implement its synchronization property. - * {@link ReentrantLock ReentrantLock} and - * {@link ReentrantReadWriteLock ReentrantReadWriteLock} are + * {@link ReentrantLock ReentrantLock} and the write-lock (but not + * the read-lock) of {@link ReentrantReadWriteLock ReentrantReadWriteLock} are * two examples of ownable synchronizers provided by the platform. * - *

              MXBean Mapping

              + *

              MXBean Mapping

              * {@code LockInfo} is mapped to a {@link CompositeData CompositeData} * as specified in the {@link #from from} method. * @@ -105,10 +105,11 @@ public class LockInfo { * given {@code CompositeData}. * The given {@code CompositeData} must contain the following attributes: *
              - *
              Updating configuration properties
              PropertyResulting Behavior
              + *
              + * * - * - * + * + * * * * diff --git a/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java b/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java index 9a6252add85..90018468ff9 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java +++ b/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -67,7 +67,7 @@ import sun.management.spi.PlatformMBeanProvider.PlatformComponent; * the management interface of a component of the Java virtual * machine. * - *

              Platform MXBeans

              + *

              Platform MXBeans

              *

              * A platform MXBean is a managed bean that * conforms to the JMX @@ -83,7 +83,7 @@ import sun.management.spi.PlatformMBeanProvider.PlatformComponent; * See * the specification of MXBeans for details. * - * + * *

              Each platform MXBean is a {@link PlatformManagedObject} * and it has a unique * {@link javax.management.ObjectName ObjectName} for @@ -141,7 +141,8 @@ import sun.management.spi.PlatformMBeanProvider.PlatformComponent; * interfaces: * *

              - *
              The attributes and the types the given CompositeData contains
              Attribute NameTypeAttribute NameType
              className
              + *
              + * * * * @@ -184,7 +185,8 @@ import sun.management.spi.PlatformMBeanProvider.PlatformComponent; * the following management interfaces. * *
              - *
              The list of Management Interfaces and their single instances
              Management InterfaceObjectName
              + *
              + * * * * @@ -201,7 +203,8 @@ import sun.management.spi.PlatformMBeanProvider.PlatformComponent; * A Java virtual machine may have one or more instances of the following * management interfaces. *
              - *
              The list of Management Interfaces and their single instances
              Management InterfaceObjectName
              + *
              + * * * * diff --git a/jdk/src/java.management/share/classes/java/lang/management/ManagementPermission.java b/jdk/src/java.management/share/classes/java/lang/management/ManagementPermission.java index 31d00cf1c7e..d32155e1681 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/ManagementPermission.java +++ b/jdk/src/java.management/share/classes/java/lang/management/ManagementPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -34,7 +34,8 @@ package java.lang.management; * provides a summary description of what the permission allows, * and discusses the risks of granting code the permission. * - *
              The list of Management Interfaces and their single instances
              Management InterfaceObjectName
              + *
              + * * * * diff --git a/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java b/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java index b5a5856794d..881bdcf90b1 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java +++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -212,10 +212,11 @@ public class MemoryNotificationInfo { * The given {@code CompositeData} must contain * the following attributes: *
              - *
              Table shows permission target name, what the permission allows, and associated risks
              Permission Target NameWhat the Permission Allows
              + *
              + * * - * - * + * + * * * * diff --git a/jdk/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java b/jdk/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java index 6a151910397..06158979745 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java +++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -71,7 +71,7 @@ package java.lang.management; * (only supported by some garbage-collected memory pools) * * - *

              1. Memory Usage

              + *

              1. Memory Usage

              * * The {@link #getUsage} method provides an estimate * of the current usage of a memory pool. @@ -86,14 +86,14 @@ package java.lang.management; * the current memory usage. An implementation should document when * this is the case. * - *

              2. Peak Memory Usage

              + *

              2. Peak Memory Usage

              * * The Java virtual machine maintains the peak memory usage of a memory * pool since the virtual machine was started or the peak was reset. * The peak memory usage is returned by the {@link #getPeakUsage} method * and reset by calling the {@link #resetPeakUsage} method. * - *

              3. Usage Threshold

              + *

              3. Usage Threshold

              * * Each memory pool has a manageable attribute * called the usage threshold which has a default value supplied @@ -141,7 +141,7 @@ package java.lang.management; * threshold notification mechanisms. * *
                - *
              1. Polling + *
              2. Polling *

                * An application can continuously monitor its memory usage * by calling either the {@link #getUsage} method for all @@ -231,7 +231,7 @@ package java.lang.management; * } *


                *
              3. - *
              4. Usage Threshold Notifications + *
              5. Usage Threshold Notifications *

                * Usage threshold notification will be emitted by {@link MemoryMXBean}. * When the Java virtual machine detects that the memory usage of @@ -304,7 +304,7 @@ package java.lang.management; *

              6. *
              * - *

              4. Collection Usage Threshold

              + *

              4. Collection Usage Threshold

              * * Collection usage threshold is a manageable attribute only applicable * to some garbage-collected memory pools. diff --git a/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java b/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java index 39e0019f184..66c78d93042 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java +++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -36,10 +36,11 @@ import sun.management.MemoryUsageCompositeData; * the heap or non-heap memory of the Java virtual machine as a whole. * *

              A {@code MemoryUsage} object contains four values: - *

              The attributes and the types the given CompositeData contains
              Attribute NameTypeAttribute NameType
              poolName
              + *
              + * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + *
              Describes the MemoryUsage object content
              {@code init} represents the initial amount of memory (in bytes) that + * {@code init} represents the initial amount of memory (in bytes) that * the Java virtual machine requests from the operating system * for memory management during startup. The Java virtual machine * may request additional memory from the operating system and @@ -48,13 +49,13 @@ import sun.management.MemoryUsageCompositeData; *
              {@code used} represents the amount of memory currently used (in bytes). + * {@code used} represents the amount of memory currently used (in bytes). *
              {@code committed} represents the amount of memory (in bytes) that is + * {@code committed} represents the amount of memory (in bytes) that is * guaranteed to be available for use by the Java virtual machine. * The amount of committed memory may change over time (increase * or decrease). The Java virtual machine may release memory to @@ -64,8 +65,8 @@ import sun.management.MemoryUsageCompositeData; *
              {@code max} represents the maximum amount of memory (in bytes) + * {@code max} represents the maximum amount of memory (in bytes) * that can be used for memory management. Its value may be undefined. * The maximum amount of memory may change over time if defined. * The amount of used and committed memory will always be less than @@ -252,10 +253,11 @@ public class MemoryUsage { * must contain the following attributes: * *
              - * + *
              + * * - * - * + * + * * * * diff --git a/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java b/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java index 78601f85072..81b66afd2b4 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java +++ b/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -106,10 +106,11 @@ public class MonitorInfo extends LockInfo { * * mapped type for the {@link LockInfo} class: *
              - *
              The attributes and the types the given CompositeData contains
              Attribute NameTypeAttribute NameType
              init
              + *
              + * * - * - * + * + * * * * diff --git a/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java b/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java index 866567a366d..def09b4a00b 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java +++ b/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -312,7 +312,8 @@ public interface RuntimeMXBean extends PlatformManagedObject { * {@link javax.management.openmbean.TabularData TabularData} * with two items in each row as follows: *
              - *
              The attributes and their types the given CompositeData contains
              Attribute NameTypeAttribute NameType
              lockedStackFrame
              + *
              + * * * * diff --git a/jdk/src/java.management/share/classes/java/lang/management/ThreadInfo.java b/jdk/src/java.management/share/classes/java/lang/management/ThreadInfo.java index edf758e8731..c3838572cfe 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/ThreadInfo.java +++ b/jdk/src/java.management/share/classes/java/lang/management/ThreadInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -61,7 +61,7 @@ import static java.lang.Thread.State.*; *
            • Thread priority
            • * * - *

              Synchronization Statistics

              + *

              Synchronization Statistics

              *
                *
              • The number of times that the thread has blocked for * synchronization or waited for notification.
              • @@ -695,10 +695,11 @@ public class ThreadInfo { * The given {@code CompositeData} must contain the following attributes * unless otherwise specified below: *
                - *
              Name and Type for each item
              Item NameItem Type
              + *
              + * * - * - * + * + * * * * @@ -759,16 +760,17 @@ public class ThreadInfo { * * * - * + * *
              The attributes and their types the given CompositeData contains
              Attribute NameTypeAttribute NameType
              threadId{@code java.lang.String}
              stackTracestackTrace{@code javax.management.openmbean.CompositeData[]} *

              * Each element is a {@code CompositeData} representing * StackTraceElement containing the following attributes: *

              - * + *
              + * * - * - * + * + * * * * @@ -841,6 +843,9 @@ public class ThreadInfo { * @return a {@code ThreadInfo} object represented * by {@code cd} if {@code cd} is not {@code null}; * {@code null} otherwise. + * + * @revised 9 + * @spec JPMS */ public static ThreadInfo from(CompositeData cd) { if (cd == null) { diff --git a/jdk/src/java.management/share/classes/java/lang/management/package.html b/jdk/src/java.management/share/classes/java/lang/management/package.html index 652253b39bc..f1d22738272 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/package.html +++ b/jdk/src/java.management/share/classes/java/lang/management/package.html @@ -1,5 +1,5 @@ - - - - - - - - diff --git a/jdk/src/java.management/share/classes/module-info.java b/jdk/src/java.management/share/classes/module-info.java index ef7940a10ab..2b2054cb724 100644 --- a/jdk/src/java.management/share/classes/module-info.java +++ b/jdk/src/java.management/share/classes/module-info.java @@ -28,6 +28,12 @@ *

              * The JMX API consists of interfaces for monitoring and management of the * JVM and other components in the Java runtime. + * + * @uses javax.management.remote.JMXConnectorProvider + * @uses javax.management.remote.JMXConnectorServerProvider + * + * @moduleGraph + * @since 9 */ module java.management { @@ -40,25 +46,30 @@ module java.management { exports javax.management.relation; exports javax.management.remote; exports javax.management.timer; + exports com.sun.jmx.remote.internal to - java.management.rmi, - jdk.management.agent; + java.management.rmi, + jdk.management.agent; exports com.sun.jmx.remote.security to - java.management.rmi, - jdk.management.agent; - exports com.sun.jmx.remote.util to java.management.rmi; + java.management.rmi, + jdk.management.agent; + exports com.sun.jmx.remote.util to + java.management.rmi; exports sun.management to jdk.jconsole, jdk.management, jdk.management.agent; - exports sun.management.counter to jdk.management.agent; - exports sun.management.counter.perf to jdk.management.agent; - exports sun.management.spi to jdk.management; + exports sun.management.counter to + jdk.management.agent; + exports sun.management.counter.perf to + jdk.management.agent; + exports sun.management.spi to + jdk.management; uses javax.management.remote.JMXConnectorProvider; uses javax.management.remote.JMXConnectorServerProvider; uses sun.management.spi.PlatformMBeanProvider; - provides javax.security.auth.spi.LoginModule - with com.sun.jmx.remote.security.FileLoginModule; + provides javax.security.auth.spi.LoginModule with + com.sun.jmx.remote.security.FileLoginModule; } diff --git a/jdk/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java b/jdk/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java index 4eb5742b2ba..5336177ba50 100644 --- a/jdk/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java +++ b/jdk/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java @@ -45,7 +45,6 @@ import jdk.internal.misc.SharedSecrets; import java.util.ArrayList; import java.util.List; -import java.lang.reflect.Module; import java.lang.reflect.UndeclaredThrowableException; import java.security.PrivilegedAction; import java.util.Collections; @@ -181,8 +180,7 @@ public class ManagementFactoryHelper { return AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Class run() { - Optional logging = java.lang.reflect.Layer.boot() - .findModule("java.logging"); + Optional logging = ModuleLayer.boot().findModule("java.logging"); if (logging.isPresent()) { return Class.forName(logging.get(), className); } diff --git a/jdk/src/java.management/share/classes/sun/management/MemoryPoolImpl.java b/jdk/src/java.management/share/classes/sun/management/MemoryPoolImpl.java index 1a91b8f28d6..881207ae63e 100644 --- a/jdk/src/java.management/share/classes/sun/management/MemoryPoolImpl.java +++ b/jdk/src/java.management/share/classes/sun/management/MemoryPoolImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -304,8 +304,7 @@ class MemoryPoolImpl implements MemoryPoolMXBean { getCount()); } void triggerAction() { - // Should not reach here - throw new AssertionError("Should not reach here"); + // do nothing } void clearAction() { // do nothing @@ -332,8 +331,7 @@ class MemoryPoolImpl implements MemoryPoolMXBean { gcSensor.getCount()); } void triggerAction() { - // Should not reach here - throw new AssertionError("Should not reach here"); + // do nothing } void clearAction() { // do nothing diff --git a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java index 8bef0da95ca..31b9c5c87d0 100644 --- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java +++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -382,6 +382,7 @@ abstract class AbstractLdapNamingEnumeration listArg = ne.listArg; } + @SuppressWarnings("deprecation") protected final void finalize() { cleanup(); } diff --git a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapClient.java b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapClient.java index f6b42d341fb..c6159711d13 100644 --- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapClient.java +++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -474,6 +474,7 @@ public final class LdapClient implements PooledConnection { } } + @SuppressWarnings("deprecation") protected void finalize() { if (debug > 0) System.err.println("LdapClient: finalize " + this); forceClose(pooled); diff --git a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapCtx.java b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapCtx.java index 5308478c9f9..6484c3945ab 100644 --- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapCtx.java +++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapCtx.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -2609,6 +2609,7 @@ final public class LdapCtx extends ComponentDirContext // ----------------- Connection --------------------- + @SuppressWarnings("deprecation") protected void finalize() { try { close(); diff --git a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java index a1d53b277f2..e5e04a12ee2 100644 --- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java +++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -129,6 +129,7 @@ final class DefaultCallbackHandler implements CallbackHandler { } } + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { clearPassword(); } diff --git a/jdk/src/java.naming/share/classes/com/sun/naming/internal/VersionHelper.java b/jdk/src/java.naming/share/classes/com/sun/naming/internal/VersionHelper.java index c29a88dc40c..43dbc075138 100644 --- a/jdk/src/java.naming/share/classes/com/sun/naming/internal/VersionHelper.java +++ b/jdk/src/java.naming/share/classes/com/sun/naming/internal/VersionHelper.java @@ -176,7 +176,7 @@ public final class VersionHelper { InputStream getResourceAsStream(Class c, String name) { PrivilegedAction act = () -> { try { - java.lang.reflect.Module m = c.getModule(); + Module m = c.getModule(); return c.getModule().getResourceAsStream(resolveName(c,name)); } catch (IOException x) { return null; diff --git a/jdk/src/java.naming/share/classes/javax/naming/CompositeName.java b/jdk/src/java.naming/share/classes/javax/naming/CompositeName.java index 50534a2b5a6..17d64ae28c7 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/CompositeName.java +++ b/jdk/src/java.naming/share/classes/javax/naming/CompositeName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -78,7 +78,8 @@ import java.util.Properties; *the string form of a composite name and its corresponding structural form *({@code CompositeName}). * -

              The attributes and their types the given CompositeData contains
              Attribute NameTypeAttribute NameType
              moduleName
              +
              @@ -144,7 +145,8 @@ import java.util.Properties; * string forms of two composite names simply involves concatenating * their string forms together. -
              examples showing string + form of composite name and its corresponding structural form (CompositeName)
              String Name
              +
              diff --git a/jdk/src/java.naming/share/classes/javax/naming/Context.java b/jdk/src/java.naming/share/classes/javax/naming/Context.java index 76050396c26..2d7834c3f99 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/Context.java +++ b/jdk/src/java.naming/share/classes/javax/naming/Context.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -137,7 +137,7 @@ import java.util.Hashtable; * known to protect it. * *

              - * + * *

              Resource Files

              *

              * To simplify the task of setting up the environment @@ -184,7 +184,7 @@ import java.util.Hashtable; * {@code jndiprovider.properties}. * *

              - * + * * Certain methods in the JNDI class library make use of the standard * JNDI properties that specify lists of JNDI factories: *

                diff --git a/jdk/src/java.naming/share/classes/javax/naming/InitialContext.java b/jdk/src/java.naming/share/classes/javax/naming/InitialContext.java index 0fce1c94758..0e2d35d9e53 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/InitialContext.java +++ b/jdk/src/java.naming/share/classes/javax/naming/InitialContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -36,7 +36,7 @@ import com.sun.naming.internal.ResourceManager; * The initial context implements the Context interface and * provides the starting point for resolution of names. *

                - * + * * When the initial context is constructed, its environment * is initialized with properties defined in the environment parameter * passed to the constructor, and in any diff --git a/jdk/src/java.naming/share/classes/javax/naming/directory/package.html b/jdk/src/java.naming/share/classes/javax/naming/directory/package.html index c1f1860e5cf..c339eb2f043 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/directory/package.html +++ b/jdk/src/java.naming/share/classes/javax/naming/directory/package.html @@ -45,7 +45,7 @@ This package allows applications to retrieve and update attributes associated with objects stored in a directory, and to search for objects using specified attributes. -

                The Directory Context

                +

                The Directory Context

                The DirContext interface represents a directory context. @@ -82,7 +82,7 @@ that support more sophisticated search filters.

                Package Specification

                The JNDI API Specification and related documents can be found in the -JNDI documentation. +{@extLink jndi_overview JNDI documentation}. @since 1.3 diff --git a/jdk/src/java.naming/share/classes/javax/naming/event/package.html b/jdk/src/java.naming/share/classes/javax/naming/event/package.html index f63baf85dd8..899981e77f9 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/event/package.html +++ b/jdk/src/java.naming/share/classes/javax/naming/event/package.html @@ -40,7 +40,7 @@ independent of any specific naming or directory service implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way. -

                Naming Events

                +

                Naming Events

                This package defines a NamingEvent class to represent an event that is generated by a naming/directory service. @@ -78,7 +78,7 @@ class ChangeHandler implements ObjectChangeListener { - +

                Threading Issues

                When an event is dispatched to a listener, the listener method (such @@ -117,7 +117,7 @@ and the listener is automatically deregistered. The JNDI API Specification and related documents can be found in the -JNDI documentation. +{@extLink jndi_overview JNDI documentation}. @since 1.3 diff --git a/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html b/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html index f6bf021b5f2..e43cdc54670 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html +++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html @@ -48,7 +48,7 @@ The core interface in this package is LdapContext, which defines methods on a context for performing extended operations and handling controls. -

                Extended Operations

                +

                Extended Operations

                This package defines the interface ExtendedRequest to represent the argument to an extended operation, @@ -125,7 +125,7 @@ public class GetTimeResponse() implements ExtendedResponse { } -

                Controls

                +

                Controls

                This package defines the interface Control to represent an LDAPv3 control. It can be a control that is sent to an LDAP server @@ -203,7 +203,7 @@ Context ctx = ectx.createSubsubcontext("cn=newobj"); Control[] respCtls = ectx.getResponseControls(); if (respCtls != null) { // Find the one we want - for (int i = 0; i < respCtls; i++) { + for (int i = 0; i < respCtls; i++) { if(respCtls[i] instanceof ChangeIDControl) { ChangeIDControl cctl = (ChangeIDControl)respCtls[i]; System.out.println(cctl.getChangeID()); @@ -258,7 +258,7 @@ public class VendorXControlFactory extends ControlFactory {

                Package Specification

                The JNDI API Specification and related documents can be found in the -JNDI documentation. +{@extLink jndi_overview JNDI documentation}. @since 1.3 diff --git a/jdk/src/java.naming/share/classes/javax/naming/package.html b/jdk/src/java.naming/share/classes/javax/naming/package.html index 2f5d919e41c..817720fdbb2 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/package.html +++ b/jdk/src/java.naming/share/classes/javax/naming/package.html @@ -40,7 +40,7 @@ implementation. Thus a variety of services--new, emerging, and already deployed ones--can be accessed in a common way. -

                Context

                +

                Context

                This package defines the notion of a context, represented by the Context interface. @@ -63,7 +63,7 @@ printer.print(report); -

                Names

                +

                Names

                Every naming method in the Context interface has two @@ -82,7 +82,7 @@ The overloads that accept string names are likely to be more useful for simple applications, such as those that simply read in a name and look up the corresponding object. -

                Bindings

                +

                Bindings

                The Binding class represents a name-to-object binding. It is a tuple containing the name of the bound object, @@ -95,7 +95,7 @@ The NameClassPair is useful when you only want information about the object's class and do not want to pay the extra cost of getting the object. -

                References

                +

                References

                Objects are stored in naming and directory services in different ways. If an object store supports storing Java objects, it might support storing an object in its serialized form. @@ -112,7 +112,7 @@ JNDI clients have the illusion that what is stored in the directory are Java objects. -

                The Initial Context

                +

                The Initial Context

                In JNDI, all naming and directory operations are performed relative to a context. There are no absolute roots. @@ -122,7 +122,7 @@ which provides a starting point for naming and directory operations. Once you have an initial context, you can use it to look up other contexts and objects. -

                Exceptions

                +

                Exceptions

                JNDI defines a class hierarchy for exceptions that can be thrown in the course of performing naming and directory operations. The root of @@ -135,7 +135,7 @@ Otherwise, programs should catch NamingException.

                Package Specification

                The JNDI API Specification and related documents can be found in the -JNDI documentation. +{@extLink jndi_overview JNDI documentation}. @since 1.3 diff --git a/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java b/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java index c78f5d332c8..e18e73096bc 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java +++ b/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -136,7 +136,7 @@ public interface ObjectFactory { * *

                * Name and Context Parameters.     - * + * * * The {@code name} and {@code nameCtx} parameters may * optionally be used to specify the name of the object being created. diff --git a/jdk/src/java.naming/share/classes/javax/naming/spi/package.html b/jdk/src/java.naming/share/classes/javax/naming/spi/package.html index 84075e07956..73ee0f9d30e 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/spi/package.html +++ b/jdk/src/java.naming/share/classes/javax/naming/spi/package.html @@ -47,7 +47,7 @@ through which JNDI applications access different naming and directory services. -

                Plug-in Architecture

                +

                Plug-in Architecture

                The service provider package allows different implementations to be plugged in dynamically. @@ -56,7 +56,7 @@ These different implementations include those for the and implementations for contexts that can be reached from the initial context. -

                Java Object Support

                +

                Java Object Support

                The service provider package provides support for implementors of the @@ -68,7 +68,7 @@ it is natural for you to expect to get back a printer object on which to operate. -

                Multiple Naming Systems (Federation)

                +

                Multiple Naming Systems (Federation)

                JNDI operations allow applications to supply names that span multiple naming systems. So in the process of completing @@ -82,7 +82,7 @@ different providers to cooperate to complete JNDI operations.

                Package Specification

                The JNDI SPI Specification and related documents can be found in the -JNDI documentation. +{@extLink jndi_overview JNDI documentation}. @since 1.3 diff --git a/jdk/src/java.naming/share/classes/module-info.java b/jdk/src/java.naming/share/classes/module-info.java index f524a4c0bcd..4a4fb79f6a8 100644 --- a/jdk/src/java.naming/share/classes/module-info.java +++ b/jdk/src/java.naming/share/classes/module-info.java @@ -25,6 +25,9 @@ /** * Defines the Java Naming and Directory Interface (JNDI) API. + * + * @moduleGraph + * @since 9 */ module java.naming { requires java.security.sasl; @@ -34,13 +37,17 @@ module java.naming { exports javax.naming.event; exports javax.naming.ldap; exports javax.naming.spi; + exports com.sun.jndi.toolkit.ctx to jdk.naming.dns; exports com.sun.jndi.toolkit.url to jdk.naming.dns, jdk.naming.rmi; + uses javax.naming.ldap.StartTlsResponse; uses javax.naming.spi.InitialContextFactory; - provides java.security.Provider with sun.security.provider.certpath.ldap.JdkLDAP; + + provides java.security.Provider with + sun.security.provider.certpath.ldap.JdkLDAP; } diff --git a/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java b/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java index b6e53c4cb8a..1fe279b9ab8 100644 --- a/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java +++ b/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java @@ -188,8 +188,8 @@ import java.lang.Double; * administrator to replace the default preferences implementation with an * alternative implementation. * - *

                Implementation note: In Sun's JRE, the {@code PreferencesFactory} - * implementation is located as follows: + * @implNote + * The {@code PreferencesFactory} implementation is located as follows: * *

                  * diff --git a/jdk/src/java.prefs/share/classes/module-info.java b/jdk/src/java.prefs/share/classes/module-info.java index 4826cd2241b..170317902cf 100644 --- a/jdk/src/java.prefs/share/classes/module-info.java +++ b/jdk/src/java.prefs/share/classes/module-info.java @@ -25,11 +25,16 @@ /** * Defines the Preferences API. + * + * @uses java.util.prefs.PreferencesFactory + * + * @moduleGraph + * @since 9 */ module java.prefs { requires java.xml; exports java.util.prefs; + uses java.util.prefs.PreferencesFactory; } - diff --git a/jdk/src/java.rmi/share/classes/java/rmi/Remote.java b/jdk/src/java.rmi/share/classes/java/rmi/Remote.java index 86a53a32bc9..57814d24c53 100644 --- a/jdk/src/java.rmi/share/classes/java/rmi/Remote.java +++ b/jdk/src/java.rmi/share/classes/java/rmi/Remote.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -40,7 +40,8 @@ package java.rmi; * java.rmi.activation.Activatable. * *

                  For complete details on RMI, see the RMI Specification which describes the RMI API and system. + * href="{@docRoot}/../specs/rmi/index.html">RMI Specification which + * describes the RMI API and system. * * @since 1.1 * @author Ann Wollrath diff --git a/jdk/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java b/jdk/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java index 8652492670b..2cd4733fb25 100644 --- a/jdk/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java +++ b/jdk/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java @@ -60,7 +60,20 @@ public interface ActivationInstantiator extends Remote { * initialization data, and * *

                1. returning a MarshalledObject containing the stub for the - * remote object it created
              + * remote object it created. + * + *

              In order for activation to be successful, one of the following requirements + * must be met, otherwise {@link ActivationException} is thrown: + * + *

              • The class to be activated and the special activation constructor are both public, + * and the class resides in a package that is + * {@linkplain Module#isExported(String,Module) exported} + * to at least the {@code java.rmi} module; or + * + *
              • The class to be activated resides in a package that is + * {@linkplain Module#isOpen(String,Module) open} + * to at least the {@code java.rmi} module. + *
              * * @param id the object's activation identifier * @param desc the object's descriptor diff --git a/jdk/src/java.rmi/share/classes/java/rmi/activation/Activator.java b/jdk/src/java.rmi/share/classes/java/rmi/activation/Activator.java index 18fd82ca3a1..dca2b69b089 100644 --- a/jdk/src/java.rmi/share/classes/java/rmi/activation/Activator.java +++ b/jdk/src/java.rmi/share/classes/java/rmi/activation/Activator.java @@ -48,7 +48,7 @@ import java.rmi.activation.UnknownObjectException; * The Activator works closely with * ActivationSystem, which provides a means for registering * groups and objects within those groups, and ActivationMonitor, - * which recives information about active and inactive objects and inactive + * which receives information about active and inactive objects and inactive * groups.

              * * The activator is responsible for monitoring and detecting when diff --git a/jdk/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java b/jdk/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java index f18c66eaf4a..a12e319d783 100644 --- a/jdk/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java +++ b/jdk/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -107,8 +107,9 @@ import sun.rmi.transport.LiveRef; * the binary name of the root class with the suffix {@code _Stub}. * *

            • The stub class is loaded by name using the class loader of the root - * class. The stub class must extend {@link RemoteStub} and must have a - * public constructor that has one parameter of type {@link RemoteRef}. + * class. The stub class must be public, it must extend {@link RemoteStub}, it must + * reside in a package that is exported to at least the {@code java.rmi} module, and it + * must have a public constructor that has one parameter of type {@link RemoteRef}. * *
            • Finally, an instance of the stub class is constructed with a * {@link RemoteRef}. @@ -124,12 +125,21 @@ import sun.rmi.transport.LiveRef; * *
                * - *
              • The proxy's class is defined by the class loader of the remote - * object's class. + *
              • The proxy's class is defined according to the specifications for the + * + * {@code Proxy} + * + * class, using the class loader of the remote object's class. * *
              • The proxy implements all the remote interfaces implemented by the * remote object's class. * + *
              • Each remote interface must either be public and reside in a package that is + * {@linkplain Module#isExported(String,Module) exported} + * to at least the {@code java.rmi} module, or it must reside in a package that is + * {@linkplain Module#isOpen(String,Module) open} + * to at least the {@code java.rmi} module. + * *
              • The proxy's invocation handler is a {@link * RemoteObjectInvocationHandler} instance constructed with a * {@link RemoteRef}. @@ -161,9 +171,9 @@ import sun.rmi.transport.LiveRef; * By default, server sockets created by {@link RMISocketFactory} * listen on all network interfaces. See the * {@link RMISocketFactory} class and the section - * RMI Socket Factories + * RMI Socket Factories * in the - * Java RMI Specification. + * Java RMI Specification. * * @author Ann Wollrath * @author Peter Jones diff --git a/jdk/src/java.rmi/share/classes/module-info.java b/jdk/src/java.rmi/share/classes/module-info.java index 7b975859f12..e038e263f71 100644 --- a/jdk/src/java.rmi/share/classes/module-info.java +++ b/jdk/src/java.rmi/share/classes/module-info.java @@ -25,6 +25,24 @@ /** * Defines the Remote Method Invocation (RMI) API. + * + *

                The JDK implementation of this module includes + * the {@index rmiregistry rmiregistry tool} tool to start a remote + * object registry, and the {@index rmid rmid tool} tool to start + * the activation system daemon. + * + *

                + *

                + *
                Tool Guides:
                + *
                {@extLink rmiregistry_tool_reference rmiregistry}, + * {@extLink rmid_tool_reference rmid} + *
                + *
                + * + * @uses java.rmi.server.RMIClassLoaderSpi + * + * @moduleGraph + * @since 9 */ module java.rmi { requires java.logging; @@ -35,6 +53,7 @@ module java.rmi { exports java.rmi.registry; exports java.rmi.server; exports javax.rmi.ssl; + // com.sun.rmi.rmid contains permissions classes that must be // accessible to the security manager at initialization time exports com.sun.rmi.rmid to java.base; @@ -48,5 +67,6 @@ module java.rmi { java.management.rmi, jdk.management.agent, jdk.jconsole; + uses java.rmi.server.RMIClassLoaderSpi; } diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/log/LogInputStream.java b/jdk/src/java.rmi/share/classes/sun/rmi/log/LogInputStream.java index 319e9741155..649fa22516d 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/log/LogInputStream.java +++ b/jdk/src/java.rmi/share/classes/sun/rmi/log/LogInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -128,6 +128,7 @@ class LogInputStream extends InputStream { /** * Closes the stream when garbage is collected. */ + @SuppressWarnings("deprecation") protected void finalize() throws IOException { close(); } diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java b/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java index d45cfac685e..6b75a2a6ecb 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java +++ b/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java @@ -102,10 +102,10 @@ public class RegistryImpl extends java.rmi.server.RemoteServer private static final String REGISTRY_FILTER_PROPNAME = "sun.rmi.registry.registryFilter"; /** Registry max depth of remote invocations. **/ - private static int REGISTRY_MAX_DEPTH = 5; + private static final int REGISTRY_MAX_DEPTH = 20; /** Registry maximum array size in remote invocations. **/ - private static int REGISTRY_MAX_ARRAY_SIZE = 10000; + private static final int REGISTRY_MAX_ARRAY_SIZE = 10000; /** * The registryFilter created from the value of the {@code "sun.rmi.registry.registryFilter"} diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_de.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_de.properties index 4198822fd6b..757228cc3cb 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_de.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_de.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: Aktivierungsgruppe inaktiv: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: Warnung: Systemeigenschaft sun.rmi.activation.execPolicy\nnicht angegeben, und keine ExecPermissions/ExecOptionPermissions\nerteilt. Darauf folgende Aktivierungsversuche sind m\u00F6glicherweise aufgrund erfolgloser\nBerechtigungspr\u00FCfungen ExecPermission/ExecOptionPermission nicht erfolgreich. Weitere\nDokumentation zur Konfiguration von rmid-Sicherheit finden Sie unter:\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: Warnung: Es wurde keine Systemeigenschaft sun.rmi.activation.execPolicy\nangegeben und keine ExecPermissions/ExecOptionPermissions\nerteilt. Nachfolgende Aktivierungsversuche scheitern m\u00F6glicherweise aufgrund\nnicht erfolgreicher Berechtigungspr\u00FCfungen ExecPermission/ExecOptionPermission. \nInformationen zur Sicherheitskonfiguration finden Sie in der rmid-Dokumentation.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_es.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_es.properties index b250cb83461..1cc1b6477b8 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_es.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_es.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: grupo de activaci\u00F3n inactivo: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: advertencia: no se han especificado las propiedades del sistema sun.rmi.activation.execPolicy\ny no se han otorgado ExecPermissions/ExecOptionPermissions;\nlos intentos de activaci\u00F3n posteriores pueden fallar debido a\ncomprobaciones de permiso ExecPermission/ExecOptionPermission incorrectas. Para\nobtener documentaci\u00F3n sobre c\u00F3mo configurar la seguridad rmid, rem\u00EDtase a:\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: advertencia: no se han especificado las propiedades del sistema sun.rmi.activation.execPolicy\ny no se han otorgado ExecPermissions/ExecOptionPermissions;\nlos intentos de activaci\u00F3n posteriores pueden fallar debido a\ncomprobaciones de permiso ExecPermission/ExecOptionPermission incorrectas. \nPara configurar la seguridad, consulte la documentaci\u00F3n sobre rmid.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_fr.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_fr.properties index d589941496d..807b24a16e4 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_fr.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_fr.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid : groupe d''activation inactif : {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: avertissement : propri\u00E9t\u00E9 syst\u00E8me sun.rmi.activation.execPolicy\nnon sp\u00E9cifi\u00E9e et ExecPermissions/ExecOptionPermissions\nnon autoris\u00E9s ; les tentatives d'activation suivantes risquent d'\u00E9chouer en raison de la v\u00E9rification des droits\nExecPermission/ExecOptionPermission. Pour obtenir de la\ndocumentation sur la configuration de la s\u00E9curit\u00E9 rmid, reportez-vous \u00E0 :\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://javasun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main : avertissement : propri\u00E9t\u00E9 syst\u00E8me sun.rmi.activation.execPolicy\nnon indiqu\u00E9e et ExecPermissions/ExecOptionPermissions\nnon accord\u00E9s ; les tentatives d'activation suivantes risquent d'\u00E9chouer en raison de la v\u00E9rification des droits\nExecPermission/ExecOptionPermission. \nPour configurer la s\u00E9curit\u00E9, reportez-vous \u00E0 la documentation rmid.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_it.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_it.properties index d415613ad90..21c8b8f35c1 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_it.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_it.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: gruppo attivazione inattivo: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: avvertenza: sistema sun.rmi.activation.execPolicy\nPropriet\u00E0 non specificata e nessun ExecPermissions/ExecOptionPermissions\ngarantito. I tentativi di attivazione successivi potrebbero fallire a causa di \ncontrolli di autorizzazione ExecPermission/ExecOptionPermission non andati a buon fine. Per\nla documentazione e le modalit\u00E0 di configurazione della sicurezza rmid, fare riferimento a (informazioni in inglese):\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: avvertenza: propriet\u00E0 di sistema sun.rmi.activation.execPolicy\nnon specificata e nessun ExecPermissions/ExecOptionPermissions\nconcesso. I tentativi di attivazione successivi potrebbero fallire a causa di \ncontrolli di autorizzazione ExecPermission/ExecOptionPermission non riusciti.\nPer configurare la sicurezza, fare riferimento alla documentazione rmid.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ja.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ja.properties index 7d5ae8eb1f4..51960acef0a 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ja.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ja.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: \u8D77\u52D5\u30B0\u30EB\u30FC\u30D7\u304C\u505C\u6B62 # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A:sun.rmi.activation.execPolicy\u30B7\u30B9\u30C6\u30E0\n\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u3001\u307E\u305F\u306F\nExecPermissions/ExecOptionPermissions\u304C\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002\nExecPermissions/ExecOptionPermissions\u30A2\u30AF\u30BB\u30B9\u6A29\u691C\u67FB\u3067\u8A31\u53EF\u3055\u308C\n\u306A\u3044\u305F\u3081\u3001\u5F8C\u306B\u7D9A\u304F\u8D77\u52D5\u306F\u5931\u6557\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\nrmid\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u69CB\u6210\u65B9\u6CD5\u306B\u3064\u3044\u3066\u306F\u3001\u6B21\u306E\u30DE\u30CB\u30E5\u30A2\u30EB\u3092\u53C2\u7167\u3057\u3066\n\u304F\u3060\u3055\u3044\u3002\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A:sun.rmi.activation.execPolicy\u30B7\u30B9\u30C6\u30E0\n\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u3001\u307E\u305F\u306FExecPermissions/ExecOptionPermissions\u304C\n\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002ExecPermissions/ExecOptionPermissions\u30A2\u30AF\u30BB\u30B9\u6A29\u691C\u67FB\u3067\u8A31\u53EF\u3055\u308C\n\u306A\u3044\u305F\u3081\u3001\u5F8C\u306B\u7D9A\u304F\u8D77\u52D5\u306F\u5931\u6557\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\n\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u3092\u78BA\u8A8D\u3059\u308B\u306B\u306F\u3001rmid\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ko.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ko.properties index 1fd81e8e2f1..da505f2c3d8 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ko.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ko.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: \uD65C\uC131\uD654 \uADF8\uB8F9 \uBE44\uD65C\uC131: {0 # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: \uACBD\uACE0: sun.rmi.activation.execPolicy \uC2DC\uC2A4\uD15C \uC18D\uC131\uC774\n\uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC73C\uBA70 ExecPermissions/ExecOptionPermissions\uAC00 \uBD80\uC5EC\uB418\uC9C0\n\uC54A\uC558\uC2B5\uB2C8\uB2E4. \uD65C\uC131\uD654\uB97C \uACC4\uC18D \uC2DC\uB3C4\uD558\uBA74 ExecPermission/ExecOptionPermission\n\uAD8C\uD55C \uAC80\uC0AC \uC2E4\uD328\uB85C \uC778\uD574 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\nrmid \uBCF4\uC548 \uAD6C\uC131 \uBC29\uBC95\uC5D0 \uB300\uD55C \uC124\uBA85\uC11C\uB294 \uB2E4\uC74C \uC6F9 \uC0AC\uC774\uD2B8\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: \uACBD\uACE0: sun.rmi.activation.execPolicy \uC2DC\uC2A4\uD15C \uC18D\uC131\uC774\n\uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC73C\uBA70 ExecPermissions/ExecOptionPermissions\uAC00 \uBD80\uC5EC\uB418\uC9C0\n\uC54A\uC558\uC2B5\uB2C8\uB2E4. \uD65C\uC131\uD654\uB97C \uACC4\uC18D \uC2DC\uB3C4\uD558\uBA74 ExecPermission/ExecOptionPermission\n\uAD8C\uD55C \uAC80\uC0AC \uC2E4\uD328\uB85C \uC778\uD574 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\uBCF4\uC548\uC744 \uAD6C\uC131\uD558\uB824\uBA74 rmid \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_pt_BR.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_pt_BR.properties index cdbdcdf06e6..a4e6087b3ae 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_pt_BR.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_pt_BR.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: grupo de ativa\u00E7\u00E3o inativo: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: advert\u00EAncia: propriedade do sistema sun.rmi.activation.execPolicy\nn\u00E3o registrada e nenhuma ExecPermission/ExecOptionPermission\nconcedida; as tentativas de ativa\u00E7\u00E3o seguintes podem falhar devido a verifica\u00E7\u00F5es malsucedidas da permiss\u00E3o\nExecPermission/ExecOptionPermission. Para obter\ndocumenta\u00E7\u00E3o sobre como configurar a seguran\u00E7a rmid, consulte:\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: warning: sun.rmi.activation.execPolicy system\npropriedade n\u00E3o especificada e nenhuma permiss\u00E3o ExecPermissions/ExecOptionPermissions\nconcedida; as tentativas subsequentes de ativa\u00E7\u00E3o poder\u00E3o falhar por causa das\nverifica\u00E7\u00F5es malsucedidas da permiss\u00E3o ExecPermission/ExecOptionPermission. \nPara configurar a seguran\u00E7a, consulte a documenta\u00E7\u00E3o do rmid.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_sv.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_sv.properties index d1bb850ede9..bfa7b84292f 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_sv.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_sv.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: aktiveringsgruppen \u00E4r inaktiv: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: varning: systemegenskapen sun.rmi.activation.execPolicy\n\u00E4r inte specificerad och inga ExecPermissions/ExecOptionPermissions\nhar utdelats. Efterf\u00F6ljande aktiveringsf\u00F6rs\u00F6k kanske inte utf\u00F6rs p\u00E5 grund av ej utf\u00F6rda\nkontroller av ExecPermission/ExecOptionPermission-beh\u00F6righet. Mer\ninformation om hur du konfigurerar rmid-s\u00E4kerhet finns i:\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: Varning: Systemegenskapen sun.rmi.activation.execPolicy\nhar inte angetts och inga ExecPermissions/ExecOptionPermissions har\ntilldelats. Efterf\u00F6ljande aktiveringsf\u00F6rs\u00F6k kanske inte utf\u00F6rs p\u00E5 grund\nav ej utf\u00F6rda ExecPermission/ExecOptionPermission-beh\u00F6righetskontroller. \nOm du vill konfigurera s\u00E4kerhet l\u00E4ser du i dokumentationen f\u00F6r rmid. # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_CN.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_CN.properties index 6bb22560066..5c3ef01c62a 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_CN.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_CN.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: \u6FC0\u6D3B\u7EC4\u65E0\u6548: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A: sun.rmi.activation.execPolicy \u7CFB\u7EDF\n\u5C5E\u6027\u672A\u88AB\u6307\u5B9A\u4E14 ExecPermissions/ExecOptionPermissions\n\u5747\u672A\u88AB\u6388\u6743\u3002\u968F\u540E\u7684\u6FC0\u6D3B\u5C1D\u8BD5\u5931\u8D25, \u539F\u56E0\u662F\u5BF9\nExecPermission/ExecOptionPermission \u7684\u6743\u9650\u68C0\u67E5\u5931\u8D25\u3002\u6709\u5173\u5982\u4F55\n\u914D\u7F6E rmid \u5B89\u5168\u6027\u7684\u6587\u6863\u8BF4\u660E, \u8BF7\u53C2\u9605: \n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A: \u672A\u6307\u5B9A sun.rmi.activation.execPolicy\n\u7CFB\u7EDF\u5C5E\u6027\u5E76\u4E14\u672A\u6388\u4E88 ExecPermissions/ExecOptionPermissions\u3002\n\u7531\u4E8E\u5BF9 ExecPermission/ExecOptionPermission \u7684\n\u6743\u9650\u68C0\u67E5\u5931\u8D25, \u968F\u540E\u7684\u6FC0\u6D3B\u5C1D\u8BD5\u53EF\u80FD\u4F1A\u5931\u8D25\u3002\n\u8981\u914D\u7F6E\u5B89\u5168\u6027, \u8BF7\u53C2\u9605 rmid \u6587\u6863\u3002\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_TW.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_TW.properties index 1a32abcb448..e7f018d089a 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_TW.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_TW.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: \u555F\u52D5\u7FA4\u7D44\u672A\u5728\u4F7F\u7528\u4E2D # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A: sun.rmi.activation.execPolicy \u7CFB\u7D71\n\u5C6C\u6027\u672A\u6307\u5B9A\uFF0C\u4E26\u4E14\u672A\u6388\u4E88 ExecPermissions/ExecOptionPermissions; \n\u5F8C\u7E8C\u7684\u555F\u52D5\u5617\u8A66\u53EF\u80FD\u6703\u56E0\u70BA\u672A\u6210\u529F\u7684\nExecPermission/ExecOptionPermission \u6B0A\u9650\u6AA2\u67E5\u800C\u5931\u6557\u3002\u5982\u9700\n\u95DC\u65BC\u5982\u4F55\u8A2D\u5B9A rmid \u5B89\u5168\u7684\u8AAA\u660E\u6587\u4EF6\uFF0C\u8ACB\u53C3\u8003:\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A: sun.rmi.activation.execPolicy \u7CFB\u7D71\n\u5C6C\u6027\u672A\u6307\u5B9A\uFF0C\u800C\u4E14\u672A\u6388\u4E88 ExecPermissions/ExecOptionPermissions;\n\u5F8C\u7E8C\u7684\u555F\u52D5\u5617\u8A66\u53EF\u80FD\u6703\u56E0\u70BA\u4E0D\u6210\u529F\u7684\nExecPermission/ExecOptionPermission \u6B0A\u9650\u6AA2\u67E5\u800C\u5931\u6557\u3002\n\u5982\u9700\u8A2D\u5B9A\u5B89\u5168\uFF0C\u8ACB\u53C3\u8003 rmid \u6587\u4EF6\u3002\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java b/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java index fae0e36570b..42857ec967c 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java +++ b/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -440,6 +440,7 @@ final class ConnectionMultiplexer { /** * Shut down connection upon finalization. */ + @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/TCPChannel.java b/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/TCPChannel.java index d073e890737..d8099df6e18 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/TCPChannel.java +++ b/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/TCPChannel.java @@ -296,11 +296,15 @@ public class TCPChannel implements Channel { out.flush(); } } catch (IOException e) { - if (e instanceof RemoteException) + try { + conn.close(); + } catch (Exception ex) {} + if (e instanceof RemoteException) { throw (RemoteException) e; - else + } else { throw new ConnectIOException( "error during JRMP connection establishment", e); + } } } else { try { diff --git a/jdk/src/java.scripting/share/classes/module-info.java b/jdk/src/java.scripting/share/classes/module-info.java index b0a5baffc39..b07ccc4fb1f 100644 --- a/jdk/src/java.scripting/share/classes/module-info.java +++ b/jdk/src/java.scripting/share/classes/module-info.java @@ -25,9 +25,25 @@ /** * Defines the Scripting API. + * + *

                The JDK implementation of this module includes a language-independent + * command-line script shell, {@index jrunscript jrunscript tool}, + * that supports executing JavaScript and other languages if its corresponding + * script engine is installed. + * + *

                + *

                + *
                Tool Guides: + *
                {@extLink jrunscript_tool_reference jrunscript}
                + *
                + * + * @uses javax.script.ScriptEngineFactory + * + * @moduleGraph + * @since 9 */ module java.scripting { exports javax.script; + uses javax.script.ScriptEngineFactory; } - diff --git a/jdk/src/java.se.ee/share/classes/module-info.java b/jdk/src/java.se.ee/share/classes/module-info.java index a9caf752162..08510b9400e 100644 --- a/jdk/src/java.se.ee/share/classes/module-info.java +++ b/jdk/src/java.se.ee/share/classes/module-info.java @@ -26,10 +26,16 @@ /** * Defines the full API of the Java SE Platform. *

                - * This module requires {@code java.se} and supplements it with modules - * that define CORBA and Java EE APIs. These modules are upgradeable. + * This module requires the {@code java.se} + * module and supplements it with modules that define the CORBA and Java EE + * APIs. These modules are upgradeable. + * + * @moduleGraph + * @since 9 */ -@SuppressWarnings("deprecation") +// suppress warning for java.corba and other modules +@SuppressWarnings({"deprecation", "removal"}) +@Deprecated(since="9", forRemoval=true) module java.se.ee { requires transitive java.se; diff --git a/jdk/src/java.se/share/classes/module-info.java b/jdk/src/java.se/share/classes/module-info.java index 1e1c0ed6abd..392260dd330 100644 --- a/jdk/src/java.se/share/classes/module-info.java +++ b/jdk/src/java.se/share/classes/module-info.java @@ -26,8 +26,21 @@ /** * Defines the core Java SE API. *

                - * The modules defining CORBA and Java EE APIs are not required by - * this module, but they are required by {@code java.se.ee}. + * The modules defining the CORBA and Java EE APIs are not required by + * this module, but they are required by the + * {@code java.se.ee} module. + * + *

                + *
                Optional for the Java SE Platform:
                + *
                + * Java Native Interface (JNI)
                + * Java Virtual Machine Tool Interface (JVM TI)
                + * Java Debug Wire Protocol (JDWP)
                + *
                + *
                + * + * @moduleGraph + * @since 9 */ module java.se { requires transitive java.compiler; diff --git a/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java b/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java index 8e03a365c3a..edfce9f13dc 100644 --- a/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java +++ b/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -100,9 +100,9 @@ public final class KerberosPrincipal *

                If the input name does not contain a realm, the default realm * is used. The default realm can be specified either in a Kerberos * configuration file or via the java.security.krb5.realm - * system property. For more information, see - * - * Kerberos Requirements. Additionally, if a security manager is + * system property. For more information, see the + * {@extLink security_guide_jgss_tutorial Kerberos Requirements}. + * Additionally, if a security manager is * installed, a {@link ServicePermission} must be granted and the service * principal of the permission must minimally be inside the * {@code KerberosPrincipal}'s realm. For example, if the result of @@ -140,9 +140,9 @@ public final class KerberosPrincipal *

                If the input name does not contain a realm, the default realm * is used. The default realm can be specified either in a Kerberos * configuration file or via the java.security.krb5.realm - * system property. For more information, see - * - * Kerberos Requirements. Additionally, if a security manager is + * system property. For more information, see the + * {@extLink security_guide_jgss_tutorial Kerberos Requirements}. + * Additionally, if a security manager is * installed, a {@link ServicePermission} must be granted and the service * principal of the permission must minimally be inside the * {@code KerberosPrincipal}'s realm. For example, if the result of diff --git a/jdk/src/java.security.jgss/share/classes/jgss-overview.html b/jdk/src/java.security.jgss/share/classes/jgss-overview.html deleted file mode 100644 index 05ece20975e..00000000000 --- a/jdk/src/java.security.jgss/share/classes/jgss-overview.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Java(tm) Authentication and Authorization Classes - - - This package contains GSS-API utilities for using in conjunction with Sun Microsystem's implementation of Java GSS-API. - - diff --git a/jdk/src/java.security.jgss/share/classes/module-info.java b/jdk/src/java.security.jgss/share/classes/module-info.java index 78a72496ace..13d7a12f750 100644 --- a/jdk/src/java.security.jgss/share/classes/module-info.java +++ b/jdk/src/java.security.jgss/share/classes/module-info.java @@ -27,11 +27,16 @@ * Defines the Java binding of the IETF Generic Security Services API (GSS-API). *

                * This module also contains GSS-API mechanisms including Kerberos v5 and SPNEGO. + * + * @moduleGraph + * @since 9 */ module java.security.jgss { requires java.naming; + exports javax.security.auth.kerberos; exports org.ietf.jgss; + exports sun.security.jgss to jdk.security.jgss; exports sun.security.jgss.krb5 to @@ -48,8 +53,9 @@ module java.security.jgss { opens sun.net.www.protocol.http.spnego to java.base; - provides java.security.Provider with sun.security.jgss.SunProvider; - provides sun.security.ssl.ClientKeyExchangeService - with sun.security.krb5.internal.ssl.Krb5KeyExchangeService; + provides java.security.Provider with + sun.security.jgss.SunProvider; + provides sun.security.ssl.ClientKeyExchangeService with + sun.security.krb5.internal.ssl.Krb5KeyExchangeService; } diff --git a/jdk/src/java.security.jgss/share/classes/org/ietf/jgss/package.html b/jdk/src/java.security.jgss/share/classes/org/ietf/jgss/package.html index 2049a263abe..4c2d4cd006a 100644 --- a/jdk/src/java.security.jgss/share/classes/org/ietf/jgss/package.html +++ b/jdk/src/java.security.jgss/share/classes/org/ietf/jgss/package.html @@ -2,7 +2,7 @@ javax.sql.rowset Package - + Standard interfaces and base classes for JDBC RowSet @@ -48,7 +48,7 @@ that a standard RowSet implementation either implements or extends.

              • 5.0 Related Documentation
              -

              1.0 Package Specification

              +

              1.0 Package Specification

              This package specifies five standard JDBC RowSet interfaces. All five extend the RowSet interface described in the JDBC 3.0 @@ -63,7 +63,7 @@ developers who intend to provide their own compliant RowSet impleme should pay particular attention to the assertions detailed in specification interfaces. -

              2.0 Standard RowSet Definitions

              +

              2.0 Standard RowSet Definitions

              • JdbcRowSet - A wrapper around a ResultSet object that makes it possible to use the result set as a @@ -136,7 +136,7 @@ column matches, a JoinRowSet object establishes relationships betwe RowSet instances without the need to touch the originating data source.
              -

              3.0 Implementer's Guide

              +

              3.0 Implementer's Guide

              Compliant implementations of JDBC RowSet Implementations must follow the assertions described in this specification. In accordance with the terms of the Java Community Process, a @@ -173,47 +173,40 @@ the BaseRowSet class as a basis for their implementations. The following table illustrates the features that the BaseRowSet abstract class provides.
              -
            • composition examples + showing string names and composite names
              String Names
              +
              + + + + + + + - - - - - - + +the standard RowSet properties. - - + +by compliant implementations. - - + + - - + +
              Features in BaseRowSet
              FeatureDetails
              Feature
              -
              Details
              -
              Properties
              -
              Provides standard JavaBeans property manipulation + PropertiesProvides standard JavaBeans property manipulation mechanisms to allow applications to get and set RowSet command and property values. Refer to the documentation of the javax.sql.RowSet interface (available in the JDBC 3.0 specification) for more details on -the standard RowSet properties.
              -
              Event notification
              -
              Provides standard JavaBeans event notifications + Event notificationProvides standard JavaBeans event notifications to registered event listeners. Refer to the documentation of javax.sql.RowSetEvent interface (available in the JDBC 3.0 specification) for more details on how to register and handle standard RowSet events generated -by compliant implementations.
              -
              Setters for a RowSet object's command
              -
              Provides a complete set of setter methods - for setting RowSet command parameters.
              -
              Setters for a RowSet object's commandProvides a complete set of setter methods + for setting RowSet command parameters.
              Streams
              -
              Provides fields for storing of stream instances - in addition to providing a set of constants for stream type designation.
              -
              StreamsProvides fields for storing of stream instances + in addition to providing a set of constants for stream type designation.
              @@ -289,13 +282,13 @@ match column as a basis for adding the RowSet object. -

              4.0 Related Specifications

              +

              4.0 Related Specifications

              -

              5.0 Related Documentation

              +

              5.0 Related Documentation

              • JDBC RowSet Tutorial diff --git a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html index b5aada863b4..786b906fec9 100644 --- a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html +++ b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html @@ -1,5 +1,5 @@ - - + + - - - - - DISPLAY - 2 - - - THERMOMETER - 1 - - - CLOCK - 4 - - - diff --git a/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/Module.java b/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/Module.java deleted file mode 100644 index d955b9c2f91..00000000000 --- a/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/Module.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package checker; - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/** - * Represents available modules. - */ -public enum Module { - - DISPLAY, CLOCK, THERMOMETER, HEATER, SPEAKER, GSM, LED; -} diff --git a/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/PluginChecker.java b/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/PluginChecker.java deleted file mode 100644 index 6db5bae4141..00000000000 --- a/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/PluginChecker.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ -package checker; - -import javax.annotation.processing.ProcessingEnvironment; -import javax.annotation.processing.RoundEnvironment; -import javax.annotation.processing.SupportedAnnotationTypes; -import javax.annotation.processing.SupportedSourceVersion; -import javax.lang.model.SourceVersion; -import javax.lang.model.element.Element; -import javax.lang.model.element.TypeElement; -import javax.tools.Diagnostic; -import javax.xml.bind.JAXBContext; -import java.io.File; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -import javax.xml.bind.JAXBException; - -/** - * Reads the device configuration from the XML file specified by -Adevice=device.xml. - * For each class in a project, checks required modules. If the device doesn't have - * the required module, then a compilation error will be shown. - */ -@SupportedAnnotationTypes("checker.RequireContainer") -@SupportedSourceVersion(SourceVersion.RELEASE_8) -public class PluginChecker extends javax.annotation.processing.AbstractProcessor { - - /** - * Name of the option to get the path to the xml with device configuration. - */ - public static final String DEVICE_OPTION = "device"; - private Device device; - - /** - * Only the device option is supported. - * - * {@inheritDoc} - */ - @Override - public Set getSupportedOptions() { - return new HashSet<>(Arrays.asList(DEVICE_OPTION)); - } - - /** - * Initializes the processor by loading the device configuration. - * - * {@inheritDoc} - */ - @Override - public synchronized void init(ProcessingEnvironment processingEnv) { - super.init(processingEnv); - try { - String deviceOption = processingEnv.getOptions().get(DEVICE_OPTION); - device = (Device) JAXBContext.newInstance(Device.class) - .createUnmarshaller().unmarshal(new File(deviceOption)); - } catch (JAXBException e) { - throw new RuntimeException( - "Please specify device by -Adevice=device.xml\n" - + e.toString(), e); - } - } - - /** - * Processes @Require annotations and checks that Device meets requirements. - * - * {@inheritDoc} - */ - @Override - public boolean process(Set annotations, - RoundEnvironment roundEnv) { - for (Element el : roundEnv.getElementsAnnotatedWith(RequireContainer.class)) { - for (Require req : el.getAnnotationsByType(Require.class)) { - //for every Require annotation checks if device has module of required version. - Integer version = device.getSupportedModules().get(req.value()); - - if (version == null - || version < req.minVersion() - || version > req.maxVersion()) { - //if module is optional then show only warning not error - if (req.optional()) { - processingEnv.getMessager() - .printMessage(Diagnostic.Kind.WARNING, - "Plugin [" + el + "] requires " + req - + "\n but device " + (version == null - ? "doesn't have such module." - + " This module is optional." - + " So plugin will work but miss" - + " some functionality" - : "has " + version - + " version of that module")); - } else { - processingEnv.getMessager() - .printMessage(Diagnostic.Kind.ERROR, - "Plugin [" + el + "] requires " + req - + "\n but device " - + (version == null - ? "doesn't have such module" - : "has " + version - + " version of that module")); - } - } - } - return true; - } - return false; - } -} diff --git a/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/Require.java b/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/Require.java deleted file mode 100644 index 6681c2810e2..00000000000 --- a/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/Require.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ -package checker; - -import java.lang.annotation.Repeatable; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -/** - * Indicates that a plug-in depends on a module. - */ -@Retention(RetentionPolicy.CLASS) -@Repeatable(RequireContainer.class) -public @interface Require { - - /** - * Returns the required module. - * - * @return required module. - */ - Module value(); - - /** - * Returns the minimum supported version of a module. - * - * @return minimum supported version of a module. - */ - int minVersion() default 1; - - /** - * Returns the maximum supported version of a module. - * - * @return maximum supported version of a module. - */ - int maxVersion() default Integer.MAX_VALUE; - - /** - * Returns true if a module is optional. A module is optional if a system - * works without that module but is missing some functionality. Returns false if a system - * won't work without the specified module. - * - * @return true if module is optional. False otherwise. - */ - boolean optional() default false; -} diff --git a/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/RequireContainer.java b/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/RequireContainer.java deleted file mode 100644 index e50f569adb8..00000000000 --- a/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/RequireContainer.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package checker; - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -/** - * A container for the repeatable @Require annotation. - */ -@Retention(RetentionPolicy.CLASS) -public @interface RequireContainer { - - Require[] value(); -} diff --git a/jdk/src/sample/share/annotations/DependencyChecker/Plugins/src/plugins/BoilerPlugin.java b/jdk/src/sample/share/annotations/DependencyChecker/Plugins/src/plugins/BoilerPlugin.java deleted file mode 100644 index 3a9d842e5b0..00000000000 --- a/jdk/src/sample/share/annotations/DependencyChecker/Plugins/src/plugins/BoilerPlugin.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ -package plugins; - -import checker.Module; -import checker.Require; - -/** - * BoilerPlugin provides support for boiling water and keeping water warm. - */ -@Require(value = Module.CLOCK, maxVersion = 3) -@Require(value = Module.THERMOMETER) -@Require(value = Module.HEATER) -@Require(value = Module.LED, optional = true) //will use if present -public class BoilerPlugin { - - /** - * Heats water up to 100 degrees Celsius. - */ - public void boil() { - boil(100); - } - - /** - * Heats water up to temperature. - * - * @param temperature - desired temperature of the water in the boiler - */ - public void boil(int temperature) { - /* - * Turn on heater and wait while temperature reaches desired temperature - * in Celsius. Finally, turn off heater. - * If present, the LED light changes color according to the temperature. - */ - } - - /** - * Keeps desired temperature. - * - * @param temperature - desired temperature of the water in the boiler - * @param seconds - period of time for checking temperature in seconds - */ - public void keepWarm(int temperature, int seconds) { - //Every n seconds check temperature and warm up, if necessary. - } - -} diff --git a/jdk/src/sample/share/annotations/DependencyChecker/Plugins/src/plugins/ExtendedBoilerPlugin.java b/jdk/src/sample/share/annotations/DependencyChecker/Plugins/src/plugins/ExtendedBoilerPlugin.java deleted file mode 100644 index b7be61025a0..00000000000 --- a/jdk/src/sample/share/annotations/DependencyChecker/Plugins/src/plugins/ExtendedBoilerPlugin.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ -package plugins; - -import checker.Module; -import checker.Require; -import java.util.Calendar; - -/** - * Introduces new features for BoilerPlugin. Features are boiling water by an - * SMS and boiling water by date with notification by a phone call. - */ -@Require(value = Module.SPEAKER) -@Require(value = Module.GSM, minVersion = 3) -@Require(value = Module.DISPLAY) -public class ExtendedBoilerPlugin extends BoilerPlugin { - - /** - * Boils water at the appointed time and wakes you up by a ring and phone - * call. Shows "Good morning" and a quote of the day from the Internet on the - * display. - * - * @param calendar - date and time when water should be boiled - * @param phoneNumber - phone number to call - */ - public void boilAndWakeUp(Calendar calendar, int phoneNumber) { - //implementation - } - - /** - * Boils water at the appointed time by getting an SMS of fixed format. - * Sends an SMS on finish. - * - * @param sms - text of SMS - */ - public void boilBySMS(String sms) { - //implementation - } -} diff --git a/jdk/src/sample/share/annotations/DependencyChecker/Plugins/src/plugins/TimerPlugin.java b/jdk/src/sample/share/annotations/DependencyChecker/Plugins/src/plugins/TimerPlugin.java deleted file mode 100644 index 678785c5cf4..00000000000 --- a/jdk/src/sample/share/annotations/DependencyChecker/Plugins/src/plugins/TimerPlugin.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ -package plugins; - -import checker.Module; -import checker.Require; - -/** - * Timer plug-in is used to support an alarm and a timer. It depends on Display and - * Clock modules. - */ -@Require(Module.DISPLAY) -@Require(value = Module.CLOCK, maxVersion = 3) -public class TimerPlugin { - - /** - * Sets timer. - * - * @param time - the remaining time. - */ - public void timer(long time) { - //start timer - //show the remaining time on display - } - - /** - * Sets alarm. - * - * @param time - the alarm time. - */ - public void alarm(long time) { - //start alarm - //show current time and alarm time on display - } -} diff --git a/jdk/src/sample/share/annotations/Validator/src/PositiveIntegerSupplier.java b/jdk/src/sample/share/annotations/Validator/src/PositiveIntegerSupplier.java deleted file mode 100644 index 0a149139b53..00000000000 --- a/jdk/src/sample/share/annotations/Validator/src/PositiveIntegerSupplier.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ -import java.util.function.Supplier; - -/** - * Supplies a positive number. - */ -@Validate(value = Validator.INTEGER_NUMBER, - description = "It's not an Integer ") -@Validate(value = Validator.POSITIVE_NUMBER, - description = "It's not a positive Number") -public class PositiveIntegerSupplier implements Supplier { - - /** - * Returns a string representation of a positive integer. - * - * @return string representation of a positive integer. - */ - @Override - public String get() { - return "20005"; //random number - } -} diff --git a/jdk/src/sample/share/annotations/Validator/src/SupplierValidator.java b/jdk/src/sample/share/annotations/Validator/src/SupplierValidator.java deleted file mode 100644 index 479ac8643e1..00000000000 --- a/jdk/src/sample/share/annotations/Validator/src/SupplierValidator.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ -import javax.xml.bind.ValidationException; -import java.util.function.Supplier; - -/** - * Validates the supplier. - */ -public class SupplierValidator { - - /** - * Validates the supplier. - * - * @param supplier - Supplier that needs to be validated. - * @return true if supplier has passed validation check. False otherwise. - */ - public static boolean validate(Supplier supplier) { - for (Validate annotation - : supplier.getClass().getAnnotationsByType(Validate.class)) { - try { - annotation.value().validate(supplier); - } catch (ValidationException e) { - System.out.println(annotation.description()); - e.printStackTrace(); - return false; - } - } - return true; - } -} diff --git a/jdk/src/sample/share/annotations/Validator/src/Validate.java b/jdk/src/sample/share/annotations/Validator/src/Validate.java deleted file mode 100644 index e0404ea9471..00000000000 --- a/jdk/src/sample/share/annotations/Validator/src/Validate.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ -import java.lang.annotation.Repeatable; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -/** - * Indicates that the class should be validated by the specified validator. - */ -@Retention(RetentionPolicy.RUNTIME) -@Repeatable(ValidateContainer.class) -public @interface Validate { - - /** - * Returns the validator that should validate the annotated class. - * - * @return Validator that should validate annotated class. - */ - Validator value(); - - /** - * Returns text to describe the failure of the validation check. - * - * @return text to describe the failure of the validation check. - */ - String description() default ""; -} - -/** - * A container for the repeatable @Validate annotation. - * - * @author Andrey Nazarov - */ -@Retention(RetentionPolicy.RUNTIME) -@interface ValidateContainer { - - Validate[] value(); -} diff --git a/jdk/src/sample/share/annotations/Validator/src/Validator.java b/jdk/src/sample/share/annotations/Validator/src/Validator.java deleted file mode 100644 index 9e074f5a8e5..00000000000 --- a/jdk/src/sample/share/annotations/Validator/src/Validator.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ -import javax.xml.bind.ValidationException; -import java.util.function.Supplier; - -/** - * Enum of Validator implementations. - */ -public enum Validator { - - /** - * This validator checks that the string represents an integer. - */ - INTEGER_NUMBER { - /** - * Checks that the string represents an integer. - * - * @param string - a string supplier - * @throws ValidationException if the validation check fails - */ - @Override - void validate(Supplier string) throws ValidationException { - try { - Integer.parseInt((String) string.get()); - } catch (NumberFormatException ex) { - throw new ValidationException("Error while validating " - + string.get()); - } - } - }, - /** - * This validator checks that the string represents a positive number. - */ - POSITIVE_NUMBER { - /** - * Checks that the string represents a positive number. - * - * @param string - an string supplier - * @throws ValidationException if the validation check fails - */ - @Override - void validate(Supplier string) throws ValidationException { - try { - if (Double.compare(0.0, Double.parseDouble( - (String) string.get())) > 0) { - throw new Exception(); - } - } catch (Exception ex) { - throw new ValidationException("Error while validating " - + string.get()); - } - } - }; - - /** - * Checks that the supplier is valid. - * - * @param string - a string supplier - * @throws ValidationException if validation check fails - */ - abstract void validate(Supplier string) throws ValidationException; - -} diff --git a/jdk/src/sample/share/annotations/index.html b/jdk/src/sample/share/annotations/index.html deleted file mode 100644 index f2818f5369e..00000000000 --- a/jdk/src/sample/share/annotations/index.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - Repeating Annotations Demo - - -

                Repeating Annotations Demo

                - -

                - This demo shows how to use repeating annotations at runtime and at compile time. -

                - -
                  -
                • Dependency checker.

                  - -

                  - Shows how to define repeating annotations and process them at compile time. - The problem domain is some code that performs useful operations on hardware devices. - The code relies on "modules" to be present on the devices. Applicability of the code to a particular - device is checked while compiling the code for a particular device. - A set of modules provided by a device is listed in an xml file that turns red during the compilation - phase and is compared with the required module set specified by annotations. - For instance, there is kettle with hardware modules: thermometer, display, and clock. - There is also a boiler plug-in that requires clock, thermometer, heater, and optionally an LED light. - - Build the PluginChecker annotation processor first. - Then, run javac with the annotation processor against plug-in sources using the following command:

                  - - javac -cp "PluginChecker.jar" -processor checker.PluginChecker -Adevice=Kettle.xml -proc:only <source - files> - -

                  - where PluginChecker.jar - path to jar file that contains PluginChecker annotation processor - class.
                  - Kettle.xml - path to device descriptor Kettle.xml
                  - <source files> - source files in Plugins/src -

                  - For more information, see the source files. -

                  - - -
                • Validator.

                  - -

                  - Shows how to define repeating annotations and process them at runtime. - A problem domain is code that needs to validate provided Suppliers for conformance to some criteria. - The criteria are implemented by the Validator class which is applied by using annotations that are placed in - the code whenever validation is needed. For more information, see the - source files. -

                  - -

                  -

                  -

                  - Sources: Validator/src/ -
                - - diff --git a/jdk/src/sample/share/forkjoin/mergesort/MergeDemo.java b/jdk/src/sample/share/forkjoin/mergesort/MergeDemo.java deleted file mode 100644 index 528f383f2f3..00000000000 --- a/jdk/src/sample/share/forkjoin/mergesort/MergeDemo.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.util.Arrays; -import java.util.Random; - -import static java.lang.Integer.parseInt; - -/** - * MergeExample is a class that runs a demo benchmark of the {@code ForkJoin} framework - * by benchmarking a {@link MergeSort} algorithm that is implemented using - * {@link java.util.concurrent.RecursiveAction}. - * The {@code ForkJoin} framework is setup with different parallelism levels - * and the sort is executed with arrays of different sizes to see the - * trade offs by using multiple threads for different sizes of the array. - */ -public class MergeDemo { - // Use a fixed seed to always get the same random values back - private final Random random = new Random(759123751834L); - private static final int ITERATIONS = 10; - - /** - * Represents the formula {@code f(n) = start + (step * n)} for n = 0 & n < iterations - */ - private static class Range { - private final int start; - private final int step; - private final int iterations; - - private Range(int start, int step, int iterations) { - this.start = start; - this.step = step; - this.iterations = iterations; - } - - /** - * Parses start, step and iterations from args - * @param args the string array containing the arguments - * @param start which element to start the start argument from - * @return the constructed range - */ - public static Range parse(String[] args, int start) { - if (args.length < start + 3) { - throw new IllegalArgumentException("Too few elements in array"); - } - return new Range(parseInt(args[start]), parseInt(args[start + 1]), parseInt(args[start + 2])); - } - - public int get(int iteration) { - return start + (step * iteration); - } - - public int getIterations() { - return iterations; - } - - @Override - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append(start).append(" ").append(step).append(" ").append(iterations); - return builder.toString(); - } - } - - /** - * Wraps the different parameters that is used when running the MergeExample. - * {@code sizes} represents the different array sizes - * {@code parallelism} represents the different parallelism levels - */ - private static class Configuration { - private final Range sizes; - private final Range parallelism; - - private final static Configuration defaultConfig = new Configuration(new Range(20000, 20000, 10), - new Range(2, 2, 10)); - - private Configuration(Range sizes, Range parallelism) { - this.sizes = sizes; - this.parallelism = parallelism; - } - - /** - * Parses the arguments and attempts to create a configuration containing the - * parameters for creating the array sizes and parallelism sizes - * @param args the input arguments - * @return the configuration - */ - public static Configuration parse(String[] args) { - if (args.length == 0) { - return defaultConfig; - } else { - try { - if (args.length == 6) { - return new Configuration(Range.parse(args, 0), Range.parse(args, 3)); - } - } catch (NumberFormatException e) { - System.err.println("MergeExample: error: Argument was not a number."); - } - System.err.println("MergeExample " + - " "); - System.err.println("example: MergeExample 20000 10000 3 1 1 4"); - System.err.println("example: will run with arrays of sizes 20000, 30000, 40000" + - " and parallelism: 1, 2, 3, 4"); - return null; - } - } - - /** - * Creates an array for reporting the test result time in - * @return an array containing {@code sizes.iterations * parallelism.iterations} elements - */ - private long[][] createTimesArray() { - return new long[sizes.getIterations()][parallelism.getIterations()]; - } - - @Override - public String toString() { - StringBuilder builder = new StringBuilder(""); - if (this == defaultConfig) { - builder.append("Default configuration. "); - } - builder.append("Running with parameters: "); - builder.append(sizes); - builder.append(" "); - builder.append(parallelism); - return builder.toString(); - } - } - - /** - * Generates an array of {@code elements} random elements - * @param elements the number of elements requested in the array - * @return an array of {@code elements} random elements - */ - private int[] generateArray(int elements) { - int[] array = new int[elements]; - for (int i = 0; i < elements; ++i) { - array[i] = random.nextInt(); - } - return array; - } - - /** - * Runs the test - * @param config contains the settings for the test - */ - private void run(Configuration config) { - Range sizes = config.sizes; - Range parallelism = config.parallelism; - - // Run a couple of sorts to make the JIT compile / optimize the code - // which should produce somewhat more fair times - warmup(); - - long[][] times = config.createTimesArray(); - - for (int size = 0; size < sizes.getIterations(); size++) { - runForSize(parallelism, sizes.get(size), times, size); - } - - printResults(sizes, parallelism, times); - } - - /** - * Prints the results as a table - * @param sizes the different sizes of the arrays - * @param parallelism the different parallelism levels used - * @param times the median times for the different sizes / parallelism - */ - private void printResults(Range sizes, Range parallelism, long[][] times) { - System.out.println("Time in milliseconds. Y-axis: number of elements. X-axis parallelism used."); - long[] sums = new long[times[0].length]; - System.out.format("%8s ", ""); - for (int i = 0; i < times[0].length; i++) { - System.out.format("%4d ", parallelism.get(i)); - } - System.out.println(""); - for (int size = 0; size < sizes.getIterations(); size++) { - System.out.format("%8d: ", sizes.get(size)); - for (int i = 0; i < times[size].length; i++) { - sums[i] += times[size][i]; - System.out.format("%4d ", times[size][i]); - } - System.out.println(""); - } - System.out.format("%8s: ", "Total"); - for (long sum : sums) { - System.out.format("%4d ", sum); - } - System.out.println(""); - } - - private void runForSize(Range parallelism, int elements, long[][] times, int size) { - for (int step = 0; step < parallelism.getIterations(); step++) { - long time = runForParallelism(ITERATIONS, elements, parallelism.get(step)); - times[size][step] = time; - } - } - - /** - * Runs iterations number of test sorts of a random array of element length - * @param iterations number of iterations - * @param elements number of elements in the random array - * @param parallelism parallelism for the ForkJoin framework - * @return the median time of runs - */ - private long runForParallelism(int iterations, int elements, int parallelism) { - MergeSort mergeSort = new MergeSort(parallelism); - long[] times = new long[iterations]; - - for (int i = 0; i < iterations; i++) { - // Suggest the VM to run a garbage collection to reduce the risk of getting one - // while running the test run - System.gc(); - long start = System.currentTimeMillis(); - mergeSort.sort(generateArray(elements)); - times[i] = System.currentTimeMillis() - start; - } - - return medianValue(times); - } - - /** - * Calculates the median value of the array - * @param times array of times - * @return the median value - */ - private long medianValue(long[] times) { - if (times.length == 0) { - throw new IllegalArgumentException("Empty array"); - } - // Make a copy of times to avoid having side effects on the parameter value - Arrays.sort(times.clone()); - long median = times[times.length / 2]; - if (times.length > 1 && times.length % 2 != 0) { - median = (median + times[times.length / 2 + 1]) / 2; - } - return median; - } - - /** - * Generates 1000 arrays of 1000 elements and sorts them as a warmup - */ - private void warmup() { - MergeSort mergeSort = new MergeSort(Runtime.getRuntime().availableProcessors()); - for (int i = 0; i < 1000; i++) { - mergeSort.sort(generateArray(1000)); - } - } - - public static void main(String[] args) { - Configuration configuration = Configuration.parse(args); - if (configuration == null) { - System.exit(1); - } - System.out.println(configuration); - new MergeDemo().run(configuration); - } -} diff --git a/jdk/src/sample/share/forkjoin/mergesort/MergeSort.java b/jdk/src/sample/share/forkjoin/mergesort/MergeSort.java deleted file mode 100644 index 0ae48dcd11a..00000000000 --- a/jdk/src/sample/share/forkjoin/mergesort/MergeSort.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.util.Arrays; -import java.util.concurrent.ForkJoinPool; -import java.util.concurrent.ForkJoinTask; -import java.util.concurrent.RecursiveAction; - -/** - * A class for sorting an array of {@code ints} in parallel. - * A {@code ForkJoinPool} is used for the parallelism, using the merge sort - * algorithm the array is split into halves and a new sub task is created - * for each part. Each sub task is dispatched to the {@code ForkJoinPool} - * which will schedule the task to a {@code Thread}. - * This happens until the size of the array is at most 2 - * elements long. At this point the array is sorted using a simple compare - * and possibly a swap. The tasks then finish by using insert sort to - * merge the two just sorted arrays. - * - * The idea of this class is to demonstrate the usage of RecursiveAction not - * to implement the best possible parallel merge sort. This version creates - * a small array for each merge (creating a lot of objects), this could - * be avoided by keeping a single array. - */ -public class MergeSort { - private final ForkJoinPool pool; - - private static class MergeSortTask extends RecursiveAction { - private final int[] array; - private final int low; - private final int high; - private static final int THRESHOLD = 8; - - /** - * Creates a {@code MergeSortTask} containing the array and the bounds of the array - * - * @param array the array to sort - * @param low the lower element to start sorting at - * @param high the non-inclusive high element to sort to - */ - protected MergeSortTask(int[] array, int low, int high) { - this.array = array; - this.low = low; - this.high = high; - } - - @Override - protected void compute() { - if (high - low <= THRESHOLD) { - Arrays.sort(array, low, high); - } else { - int middle = low + ((high - low) >> 1); - // Execute the sub tasks and wait for them to finish - invokeAll(new MergeSortTask(array, low, middle), new MergeSortTask(array, middle, high)); - // Then merge the results - merge(middle); - } - } - - /** - * Merges the two sorted arrays this.low, middle - 1 and middle, this.high - 1 - * @param middle the index in the array where the second sorted list begins - */ - private void merge(int middle) { - if (array[middle - 1] < array[middle]) { - return; // the arrays are already correctly sorted, so we can skip the merge - } - int[] copy = new int[high - low]; - System.arraycopy(array, low, copy, 0, copy.length); - int copyLow = 0; - int copyHigh = high - low; - int copyMiddle = middle - low; - - for (int i = low, p = copyLow, q = copyMiddle; i < high; i++) { - if (q >= copyHigh || (p < copyMiddle && copy[p] < copy[q]) ) { - array[i] = copy[p++]; - } else { - array[i] = copy[q++]; - } - } - } - } - - /** - * Creates a {@code MergeSort} containing a ForkJoinPool with the indicated parallelism level - * @param parallelism the parallelism level used - */ - public MergeSort(int parallelism) { - pool = new ForkJoinPool(parallelism); - } - - /** - * Sorts all the elements of the given array using the ForkJoin framework - * @param array the array to sort - */ - public void sort(int[] array) { - ForkJoinTask job = pool.submit(new MergeSortTask(array, 0, array.length)); - job.join(); - } -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/build.properties b/jdk/src/sample/share/jmx/jmx-scandir/build.properties deleted file mode 100644 index cad4a6aea34..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/build.properties +++ /dev/null @@ -1,58 +0,0 @@ -# IMPORTANT NOTE -# -# If you made a private copy of this project you may have to update the -# nbjdk.home variable at the end of this file. -# -# To be able to run the test-suite, you will also have to set the -# variable: -# -# libs.junit.classpath= -# - -main.dir=. - -src.dir=${main.dir}/src -test.src.dir=${main.dir}/test - -build.dir=build -classes.dir=${build.dir}/classes - -dist.dir=dist -jar=${dist.dir}/jmx-scandir.jar -javadoc.dir=${dist.dir}/javadoc - -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results - -build.sysclasspath=ignore -# E.g.: cp=lib/x.jar:lib/y.jar -cp= -extra.run.cp= - -# To be able to run the test-suite, set the following property: -# libs.junit.classpath=... - -javac.test.classpath=\ - ${classes.dir}:\ - ${libs.junit.classpath} - -main.agent.class=com.sun.jmx.examples.scandir.ScanDirAgent -main.client.class=com.sun.jmx.examples.scandir.ScanDirClient -main.class=${main.client.class} - -run.jvmargs=-Djava.util.logging.config.file=logging.properties -common.jvmargs=${run.jvmargs} -Djavax.net.ssl.keyStore=keystore -Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.trustStore=truststore -Djavax.net.ssl.trustStorePassword=trustword -client.jvmargs=${common.jvmargs} -agent.jvmargs=${common.jvmargs} -Dcom.sun.management.config.file=src/etc/management.properties -Dscandir.config.file=src/etc/testconfig.xml - -client.args=localhost 4545 - -run.cp=${cp}:${classes.dir}:${extra.run.cp} -run.test.classpath=${run.cp}:${build.test.classes.dir} - -debug=true -deprecation=false - -# Update this variable if need be to point to the JDK 6 location. -# -nbjdk.home=${basedir}/../../.. diff --git a/jdk/src/sample/share/jmx/jmx-scandir/build.xml b/jdk/src/sample/share/jmx/jmx-scandir/build.xml deleted file mode 100644 index e54fcec428e..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/build.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set property 'main.client.class' (e.g. in build.properties) - - - - - - - - - Must set property 'main.agent.class' (e.g. in build.properties) - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set libs.junit.classpath variable to the JUnit classpath in the build.properties file. - - - - - - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - Must select some files in the IDE or set test.includes - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/index.html b/jdk/src/sample/share/jmx/jmx-scandir/index.html deleted file mode 100644 index c235e20ad9d..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/index.html +++ /dev/null @@ -1,2217 +0,0 @@ - - - - - - - JMX™ "scandir" Example - - - -

                Java™ Management Extensions (JMX™) scandir Example

                - -

                Introduction

                - -

                Generating the Java Documentation

                - -
                  -

                  Before reading further, you will need to generate the - Java Documentation for the example's sources.

                  -

                  In the example root directory (where the build.xml - file is located) run the following command: -

                  ant javadoc
                  -

                  -

                  Alternatively you can open the jmx-scandir project with the - NetBeans IDE and generate the Javadoc from its Build - menu. -

                  -

                  If building the documentation fails, please make sure to read the - note at the beginning of this document.

                  -
                - -

                Overview of the scandir Example

                - -
                  -

                  The JMX scandir example is built around the - following MBeans:

                  -
                    -
                  • The first MBean we will present here is the - DirectoryScannerMXBean.
                    A - DirectoryScannerMXBean is an MBean that scans a - file system starting at a given root directory, and then looks - for files that match the given criteria. When such a file is - found, the DirectoryScannerMXBean takes the - action for which it was configured: emit a notification, - and/or log a record for this file, - and/or delete that file. The code that would actually - delete the file is commented out - so that nothing valuable is - lost if the example is run by mistake on the wrong set of - directories.
                    DirectoryScannerMXBeans are - created by the ScanManagerMXBean - see next item on the list, from its - configuration. -
                  • -
                  • - The ScanManagerMXBean is the actual entry point of the - application. It reads the application's - configuration, and from that configuration, - will create a ResultLogManager and some DirectoryScannerMXBeans. -
                    The ScanManagerMXBean lets you start, stop, and - schedule directory scans. The - ScanManagerMXBean is a singleton - MBean: there can be at most one instance of such - an MBean registered in a given MBeanServer. -
                  • -
                  • The ScanDirConfigMXBean is an MBean which is able to - load/save the configuration to/from an XML file. It - will also let you modify that configuration - by e.g. - creating new directory scanners in there. - The corresponding MBeans will be created later, only - when you later - ask the ScanManagerMXBean to apply the - configuration again.
                    - The ScanDirConfigMXBean is created by the - ScanManagerMXBean, when the - ScanManagerMXBean is registered. - It is also possible to create an alternate - ScanDirConfigMXBean, and to switch the - ScanDirConfigMXBean to use one or the other - configuration. -
                    An example of XML configuration file is given - here. Although you could edit such a file by - hand, it is easier to do it programmatically (or - with JConsole) through - the ScanDirConfigMXBean interface. -
                  • -
                  • The ResultLogManagerMXBean is in charge of managing result logs. -
                    Directory Scanners can be configured to log a - ResultRecord whenever they take action upon a file that - matches their criteria. The ResultLogManagerMXBean is - responsible for logging these result records. - The ResultLogManagerMXBean can be configured to log - such records to a flat file, or into a log held in memory, or - both. Both logs (file and memory) can be configured with a - maximum capacity. -
                    When the maximum capacity of the memory - log is reached, its first entry (i.e. its oldest entry) is - removed to make place for the latest one. -
                    When the maximum - capacity of the file log is reached, the file is - renamed by appending a tilde '~' to its name and a - new result log is created. -
                    The ResultLogManagerMXBean - will let you interactively clear these result logs, change their - capacity, and decide where (memory or file) to log. - The memory log is useful in that its content can be interactively - returned by the ResultLogManagerMXBean, while - the file log doesn't have this facility.
                    - The result logs are intended to be used by e.g. an offline - program that would take some actions on the files that - matched the scan criteria: -
                    The scandir application - could be configured to only produce logs (i.e. takes no - action but logging the matching files), and the real - action could be performed by another program or module (e.g. mail the result log to the engineer who - maintains the lab, or parse that log and delete all the - files listed there, or parse the log and prepare and send - a single mail to each owner of matching files, containing - the list of files they should consider deleting).
                    - The ResultLogManagerMXBean is a singleton - MBean created by the ScanManagerMXBean - which reads and writes its configuration from the - ScanDirConfigMXBean. -
                  • -
                  -

                  An application main() method is - provided in the ScanDirAgent class. The main() simply registers - a ScanManagerMXBean in the platform MBeanServer, and - then waits for someone to call close() on the - ScanManagerMXBean. -

                  -

                  When the ScanManagerMXBean is registered, it - will create a default ScanDirConfigMXBean bound - to a default XML config file. -

                  -

                  The application's default XML config file is determined as - follows: -

                    -
                  1. If the property scandir.config.file is - defined, the default application file will be the - file pointed to by this property. If that file - doesn't exist, it will be created when - ScanDirConfigMXBean.save() is - invoked. -
                  2. -
                  3. Otherwise the application config file is - assumed to be a file called jmx-scandir.xml, - located in the user's directory (as defined by - the System property user.home). - If that file doesn't exists, it will be created when - ScanDirConfigMXBean.save() is - invoked. -
                  4. -
                  -

                  It is worth noting that this project is defined to - run with the following properties: -

                  -Djava.util.logging.config.file=logging.properties
                  -
                  -Dscandir.config.file=src/etc/testconfig.xml
                  - With ScanDirAgent defined as the project's - main class. Hence when you invoke from the NetBeans IDE - Run Project on the jmx-scandir project, - or Run file on the ScanDirAgent, the - application starts with the test configuration provided in - src/etc/testconfig.xml -

                  -
                -

                API Documentation and Sources

                -
                  -

                  Once generated, the Javadoc of example classes can - be found starting from dist/javadoc/index.html.

                  -

                  You can view the sources in the src subdirectory.

                  -
                -

                Patterns, Best Practices, and Common Pitfalls

                -
                  -

                  This section discusses some common patterns and - design choices that this example demonstrates, and some pitfalls that - it avoids. -

                -

                MBeans or MXBeans?

                -
                  -

                  What is an MXBean? MXBeans made their appearance in - J2SE 5.0 (Tiger), with the Management and Monitoring - API of the JVM. However, Java SE 6 is the first - Java SE release that contains a standard framework which - makes it possible to create and register your own MXBeans. -

                  -

                  MXBeans are a special kind of MBean, which once registered - in the MBeanServer, get automatically transformed into - OpenMBeans. From a developer point of view, nothing changes: - A Wombat MBean can become an MXBean simply by renaming - its WombatMBean interface into WombatMXBean.

                  -

                  Using MXBeans rather than plain Standard MBean brings its - own advantages:

                  -
                    -
                  • - Generic tools, like JConsole, will be able to - display and interact with your MXBeans nicely, even - if your MXBean interfaces reference custom types - - e.g. custom Java enums. This is because all the types - exposed by your MXBeans are converted to Open Types. - Just look at the ScanDirConfigMXBean with JConsole and you will - understand the benefits. -
                  • -
                  • - When writing a programmatic client, you can obtain - a proxy that implements the original MXBean interface, - and forget about the Open Type conversion. - The JUnit unit tests that come with this example - use this feature very widely. Have a look at them. -
                  • -
                  • - The MXBean framework also lets you nicely navigate - from one MXBean to another: your MXBeans can - have attributes and parameters which are proxies - to other MXBeans! We demonstrate this in the - ScanManagerMXBean which exposes a list - of DirectoryScannerMXBean and points - towards a ScanDirConfigMXBean. -
                  • -
                  -

                  In short, MXBeans are so much easier to use that - this example doesn't even have a single regular - Standard MBean. -

                  -

                  See also What is an MXBean? - and Inter-MXBean References. -

                  -
                  Hint: In order to simplify the task of coding a - JMX programmatic client, we recommend that getters, setters, and - operations defined in MBean and MXBean interfaces throw - IOException. Proxy objects will then be able - to rethrow directly any IOException received from - their underlying MBean Server connection, without wrapping - them into UndeclaredThrowableExceptions.
                  - Since the life cycle of the proxy object is not directly tied to - the life cycle of the MBean it proxies, you may also want to - have all methods in the MBean or MXBean interface throw - InstanceNotFoundException or more generally - JMException. -
                  -
                -

                MBean Names - aka ObjectNames

                -
                  -

                  As you must know if you've been studying JMX, MBeans are - named objects. The names of MBeans are represented by - instances of ObjectName. An ObjectName is - composed of a domain, followed by a colon ':', - followed by a comma-separated list of key=value - pairs.
                  - The ordering of the key=value pairs is not - important, but ObjectNames are case sensitive - (both keys and values are case sensitive) and white space - is not ignored.
                  - A common pitfall for JMX beginners is to inadvertently - insert white space after commas into an ObjectName, - and expect that two ObjectNames which differ only by such white - space will be considered identical. This is not the - case.
                  - As an example, the ObjectName 'D:k1=v1, k2=v2, k3=v3' has - three keys, which are 'k1', ' k2', - and ' k3': beware - of the space in the name of the second and third - keys!
                  - It is therefore a different ObjectName from - 'D:k1=v1,k2=v2,k3=v3' (the keys are now - 'k1', 'k2', and - 'k3'), but the same ObjectName as - 'D: k2=v2, k3=v3,k1=v1', and yet different - from 'D:k2=v2, k3=v3, k1=v1'! -

                  In this example, we are following the rules - for ObjectName suggested in the JMX Best Practices:

                  -
                    -
                  • ObjectNames should be predictable -
                  • -
                  • The domain part of our ObjectNames starts with a Java - package name -
                  • -
                  • Our ObjectNames contain a type= - key property. This property is different for every - object type in our domain. -
                  • -
                  • For every ObjectName with a given type, we have the same set of key - properties with the same syntax and semantics for their values - in - fact we only use an additional name= key. -
                  • -
                  • When there can only be one instance of a given type - there aren't any other key properties than type=. - The ObjectNames of the ScanManagerMXBean and ResultLogManagerMXBean, which are both singleton MBeans, are - composed in this way. -
                  • -
                  • When there can be several instances of a given type, - we differentiate them by further key properties. - To achieve this, we are using the most usual key property - in addition to type=: the name= key. - In this example, a key property list of the form - type=X,name=Y is always enough to uniquely name - an MBean. Tools like jconsole are usually aware - of the semantics of the type= key and - name= key, and are therefore able to - display this form of name in a way that - is easier to read than other name forms. -
                  • -
                  -

                  The rules listed above are implemented by a couple - of static helper functions in the ScanManager class. See the code of the - makeSingletonName and - makeMBeanName methods. -

                  -
                -

                Inter MBean Navigation

                -
                  -

                  One of the most common problems that needs to be solved - when designing a management interface with JMX is to - choose a representation for inter-MBean relationships.
                  - Prior to Java 6, there were basically three possible - choices:

                  -
                    -
                  • Make the relation appear in the ObjectName. - For instance, if MBean B was contained in - MBean A, you could choose to name MBean B so - that its parent relationship with MBean A - appeared in its name.
                    - The obvious limitation of this solution is that - it only allows to model one such relation (an - MBean has only one name) and the relation must - be fixed - it cannot change during the life of - the MBean since the name of an MBean cannot - change.
                    - This scheme is therefore mostly used when - the application MBeans are modeling objects - which are conceptually contained within - each other in a tree-like structure. -
                    For instance, most MBean names defined by - J2EE Management (JSR 77) follow - this scheme. -
                  • -
                  • Design getters and setters (or operations) which - return ObjectName or - ObjectName[] values. The ObjectNames - point to the MBeans which are related to that - object. For instance , GlassFish - defines MBeans which also use this pattern. -
                  • -
                  • Use the JMX RelationService. The JMX RelationService - is quite powerful, but simple relationships often - do not justify that overhead. -
                  • -
                  -

                  In Java 6, these three possibilities still remain, but - the new MXBean framework brings up an interesting - alternative. Instead of returning an ObjectName or - an ObjectName array, an MXBean can return a proxy - to its related MXBeans. This is how we have chosen to - implement our inter MBean relationships in this - example: -
                  For instance the - ScanManagerMXBean/DirectoryScannerMXBean - relationship and the - ScanManagerMXBean/ScanDirConfigMXBean - relationships are implemented in this way. -

                  - The additional benefit, as compared to returning ObjectNames or - using the RelationService is that interface type of the MBeans - which are pointed to by the relationship becomes directly - apparent. The method: -

                  -            public Map<String,DirectoryScannerMXBean> getDirectoryScanners();
                  -        
                  - makes it immediately obvious that the MBeans to which we point are - DirectoryScannerMXBeans. It would have been much less obvious in prior - versions of Java SE, were the returned type would have had to be - Map<String,ObjectName>, or - even worse just Map. -

                  -

                  However, it must be clear that the behaviour will be - quite different when an MXBean is returned as compared - to when a simple bean is returned. -

                  -

                  When an MXBean is returned, the remote client sees either - an ObjectName, if it is a generic client like jconsole, or - a proxy to a remote MXBean, if the client is working with the - MXBean interface. Invoking an operation on one of the - proxy returned by a method such as - getDirectoryScanners will cause the - MBean to be invoked on the remote server side. -

                  -

                  If getDirectoryScanners were - defined as: -

                  -            public Map<String,DirectoryScannerConfig> getDirectoryScanners();
                  -        
                  - then invoking a method on one of the returned objects - would have absolutely no effect on the remote - server side - because the returned objects in this - case would simply be a bunch of serialized data objects. -

                  -

                  It is worth noting that although an MXBean interface - can have getters and operations which return an MXBean - interface, a regular standard MBean shouldn't have - any getters or methods which return MBean interfaces or - MXBean interfaces. -

                  -

                  For more information see also Inter-MXBean References. -

                  -
                -

                The MBeanRegistration interface, or how an MBean can - know or provide its own name

                -
                  -

                  - Sometimes, an MBean needs to have a reference to the - MBeanServer in which it is registered, or needs to know - with which ObjectName it has been registered. -

                  -

                  - Sometimes also, an MBean may need to perform some - checks before being registered, or will need - to carry out some actions right after it has been - successfully registered in the MBeanServer. -

                  -

                  - Sometimes again, an MBean may need to perform some - checks, or some cleaning actions, just before, or - just after, it is unregistered. -

                  -

                  - When an MBean has such needs, the easiest solution - for it is to implement the MBeanRegistration - interface. -

                  -

                  The MBeanRegistration interface is a callback - interface which defines pre and post registration and - unregistration callbacks. -

                  -

                  - When an MBean implementing this interface is created - (with createMBean) or registered - (with registerMBean) in an MBeanServer, - the MBeanServer will call the preRegister - and postRegister method implemented by - the MBean. The preRegister method - has an MBeanServer and ObjectName - parameter, which are passed by the MBeanServer to the - MBean. The MBean can store the reference it is being passed - in a private instance variable for later use. -

                  -

                  - Most of the MXBeans we have defined in this example - implement the MBeanRegistration interface. The table - below show how our MBeans use this interface to control - their own names, make sanity checks, perform - initialization steps or cleanup actions. -

                  -


                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  MBean Requirementcallbackuse case example
                  get a reference to the MBeanServerpreRegisterThe ScanManagerMXBean needs a reference - to the MBeanServer in order to create and - register other MBeans, such as the - ResultLogManagerMXBean, and the - DirectoryScannerMXBeans. -
                  reject registration if conditions are - not met. - preRegisterThe ScanManagerMXBean will throw - an IllegalArgumentException in preRegister - if the ObjectName it is being passed is - illegal. Throwing an exception in - preRegister makes the registration fail. -
                  get my client-assigned MBean namepreRegisterThe ScanDirConfigMXBean propagates the - value of the name= property of - the ObjectName it is given into its - ScanManagerConfig bean. -
                  provide my own default ObjectName if none - was given to the MBeanServer - preRegisterThe name that is returned by preRegister - is the ObjectName with which the MBean will be - eventually registered. - The ScanDirConfigMXBean is able to suggest - a value for its own ObjectName if none was - provided. Similarly, the ScanManagerMXBean - always returns its singleton ObjectName - defined by ScanManagerMXBean.SCAN_MANAGER_NAME. -
                  perform initialization stepspreRegisterThe ScanDirConfigMXBean uses preRegister - to initialize its internal ScanManagerConfig bean. -
                  perform initialization steps, once it is - known that the registration was successful. - postRegisterThe postRegister method - can be used to implement - initialization steps that need to be done once it - is known that the registration was successful, or to - undo any action performed by preRegister once it - is known that registration was not successful. - The postRegister method has a Boolean parameter - which tells the MBean whether it was or wasn't - successfully registered in the MBeanServer. - The ScanManagerMXBean uses postRegister to create - and register other MBeans, such as the - ResultLogManagerMXBean and the default - ScanDirConfigMXBean. - Note that postRegister is not expected to throw any - exception. If an exception needs to be thrown, it should - be thrown in preRegister. -
                  check whether the MBean can be deregisteredpreDeregisterThe ScanManagerMXBean uses this method to verify - that its state allows it to be deregistered. - In particular, it will refuse to be deregistered - if it is in the RUNNING or SCHEDULED state. - If preDeregister throws an exception, the unregisterMBean - call will fail and the MBean will remain registered in - the MBeanServer. - Take particular care when implementing business logic - in this method: if the logic you implement has an - unfortunate bug which makes it always throw an - exception, you will never be able to unregister - that MBean. -
                  clean up resources, refusing to be deregistered if - it fails - preDeregisterThe ScanManagerMXBean uses this method to unregister - all the other MBeans it has created and registered in the - MBeanServer. This includes the ResultLogManagerMXBean, the - ScanDirConfigMXBeans it has created, and the - DirectoryScannerMXBeans it has created when - applying its configuration. -
                  clean up resources which need to be released in - a best-effort way, when it is known that the MBean is no - longer registered. - postDeregisterpostDeregister is only called if the MBean was succesfully - unregistered. - The ScanManagerMXBean uses this method to cancel - its internal java.util.Timer. -
                  -

                  -
                -

                The Singleton MBean Pattern

                -
                  -

                  - A singleton MBean is an MBean which can only have one - instance registered in a given MBeanServer.
                  - A singleton MBean usually has a well-known name, - which can be defined as a constant. In that case, - clients no longer need to call new ObjectName(...) - and catch the declared MalformedObjectNameException. -

                  -

                  There are already quite a few examples of singleton - MBeans in the java.lang.management API. The - ThreadingMXBean, ClassLoadingMXBean, RuntimeMXBean, etc. - are all singleton MBeans. -

                  -

                  In this example, we have two singleton MBeans: - The ScanManagerMXBean and the - ResultLogManagerMXBean. But in fact, - the only real singleton MBean is the - ScanManagerMXBean. The - ResultLogManagerMXBean just happens to - be a singleton MBean because it has a 1-1 relationship - with the ScanManagerMXBean. -

                  -

                  The ScanManagerMXBean implements the - singleton MBean pattern in this way: -

                  -
                    -
                  • The ScanManagerMXBean name has a single - key property: type=ScanManagerMXBean.
                  • -
                  • Its name is defined by an ObjectName constant called - SCAN_MANAGER_NAME in the ScanManager class
                  • -
                  • The ScanManagerMXBean enforces its status of - singleton MBean. It will refuse to be registered - with a name other than - the SCAN_MANAGER_NAME. You can therefore depend on - the fact that the ScanManagerMXBean will always - be registered with its singleton SCAN_MANAGER_NAME - (see preRegister) -
                  • -
                  • You are not obliged to provide a name when you - register the ScanManagerMXBean: if you pass null, - then the ScanManager will be registered with - its singleton SCAN_MANAGER_NAME - (see preRegister). -
                  • -
                  • The ScanManager class has a no-arg static - register method that will register - the singleton instance in the Platform MBeanServer. - This static register method returns - a proxy to the registered singleton. -
                  • -
                  • The ScanManager class has also a static - register method that will create - a singleton instance in a (possibly remote) - MBeanServerConnection - using - createMBean. - This static register method - also returns a proxy to the registered singleton. -
                  • -
                  • Only the MBeanServer has a reference to the - singleton instance. The singleton instance is - not returned to the caller, and not kept - in any other static data structure. -
                  • -
                  -

                  - On the other hand, the ResultLogManagerMXBean - has a much more relaxed implementation of the pattern: -
                  It simply provides its own singleton name if it is - registered with a null ObjectName, but will not enforce - the use of that name. -

                  -

                  Note that all singleton MBean names in this example - are created using the ScanManager.makeSingletonName - method, which implements the pattern for ObjectNames suggested - in the JMX Best Practices. -

                  -
                -

                Managing the Life Cycle of dependent MBeans

                -
                  -

                  A common task that many JMX applications have - is to manage the life cycle of MBeans registered - in the MBeanServer.

                  -

                  In this example, we have decided to follow a simple - pattern:

                  -
                    -
                  • The application is initialized simply - by registering the singleton - ScanManagerMXBean in - the MBeanServer. -
                  • -
                  • The ScanManagerMXBean will then - in turn register any other MBean that the - application might need: -
                      -
                    • It creates and registers the singleton - ResultLogManagerMXBean -
                    • -
                    • It creates and registers the default - ScanDirConfigMXBean - which loads the initial configuration -
                    • -
                    • It creates as many - DirectoryScannerMXBeans as - needed when the configuration is applied -
                    • -
                    • It lets you create alternate - ScanDirConfigMXBean, to - which you can later switch in order - to apply a new alternate configuration. -
                    • -
                    -
                  • -
                  • When a new configuration is applied (or if the - current configuration is reapplied), the - ScanManagerMXBean will unregister - any DirectoryScannerMXBeans it has - previously registered, and will re-create - brand new DirectoryScannerMXBeans - from the applied configuration. -
                  • -
                  • When you unregister the ScanManagerMXBean, - it does all the cleanup for you, by unregistering - all the MBeans that it has created during the - course of the application. -
                  • -
                  -

                  The ScanManagerMXBean makes use of its - MBeanRegistration interface in order - to register the other MBeans it needs (see the - ScanManager.postRegister method) and to unregister - every MBean it has created (see the ScanManager.preDeregister - method). -

                  -

                  You will note that the ScanManagerMXBean - will only allow itself to be deregistered if it can be - closed - that is if there's no other action in - progress. - This is to make sure that the deregistration of - dependent MBeans will work smoothly. -
                  - The deregistration of related MBeans will happen - in the ScanManager.preDeregister - method. -
                  - If one of these MBeans could not be deregistered, - then the ScanManagerMXBean will throw - an exception, refusing to be deregistered. -
                  This leaves you a chance to try to deregister it - again later. Since the ScanManagerMXBean - has switched its state to CLOSED before starting - to unregister its dependent MBeans, it will refuse - any further actions, ensuring that e.g. nobody - can try to start it or schedule it while it - is in that partially-deregistered state. -

                  -

                  Handling the LifeCycle of all the application's - MBeans in a single MBean is usually a good design - pattern, especially if the application is a - module which is intended to share a JVM - or - an MBeanServer - with other modules. -

                  -

                  This is specially useful if the application needs to - be loaded and unloaded on demand: in that - case, simply registering or unregistering the top level - MBean (in our example the ScanManagerMXBean) does - the trick. -

                  -
                -

                Emitting Notifications

                -
                  -

                  In order to emit notifications, an MBean must be - an instance of NotificationEmitter. - The NotificationEmitter interface defines methods - that the MBeanServer will call on the MBean in order - to register NotificationListeners with the MBean. -

                  -

                  It is worth noting that the MBean may not be - invoked each time a JMX client wants to register - a listener. For instance, the RMIConnectorServer - registers only once a single listener with each MBean - which is a NotificationEmitter. - In that specific case, the listener may even be registered - with the MBean before any client has actually subscribed - for notifications from that particular MBean. -

                  -

                  An MBean can therefore make no assumption about - which client or how many clients have registered for - notifications. -

                  -

                  It is also worth noting that the logic of the - methods defined in NotificationEmitter would not - be trivial to implement from scratch. Fortunately - the JMX API defines a helper class, called - NotificationBroadcasterSupport, which - provides an implementation for these methods. -

                  -

                  There are actually three ways for an MBean to - implement NotificationEmitter, of which only two - are recommended. -

                  -
                - -

                Extending NotificationBroadcasterSupport

                -
                  -

                  This is the simplest way of coding an MBean which - is a NotificationEmitter: -

                  -

                  Simply extend NotificationBroadcasterSupport, - then override its getNotificationInfo method - which returns the MBeanNotificationInfo[] array - that should be included in your MBean's MBeanInfo - and that's it. -
                  You just need to call the sendNotification method - inherited from NotificationBroadcasterSupport whenever - your MBean needs to send a notification. -

                  -

                  In our example, both the ScanDirConfigMXBean and ResultLogManagerMXBean extend - NotificationBroadcasterSupport in order - to send notifications. -

                  -
                -

                The Delegation Pattern: delegating to a - NotificationBroadcasterSupport delegate

                -
                  -

                  There may be cases however where delegating to a - wrapped NotificationBroadcasterSupport - object may be preferred to extending - NotificationBroadcasterSupport. -

                  -

                  For instance, if your MBeans already derive from - some base class, extending NotificationBroadcasterSupport - might not be an option. -

                  -

                  Similarly, if you do not want to have the inherited - public void sendNotification(Notification notification) - method appear in the Javadoc of the concrete class of your - MBean, you may want to consider using the delegation - pattern instead of extending - NotificationBroadcasterSupport -

                  -

                  In our example both the ScanManagerMXBean and the DirectoryScannerMXBean use the delegation - pattern rather than extending - NotificationBroadcasterSupport. - In the end, choosing between one or the other method - is more a question of taste, although the delegation - pattern could be considered more flexible since it - doesn't require extending any given superclass. -

                  -

                  It may be also worth noting that some tools like - the JMX Module of NetBeans IDE, will be able to - generate for you all the code that delegates to a - wrapped NotificationBroadcasterSupport. -

                  -
                - -

                Implementing NotificationEmitter from scratch

                -
                  -

                  This is the last possibility for an MBean that - needs to send notifications: simply implement - NotificationEmitter from scratch. This is highly - discouraged since that logic is not trivial, and - already provided by - NotificationBroadcasterSupport anyway. -

                  -
                - -

                Beware of Synchronization Locks

                -
                  - -

                  One thing you must keep in mind when sending - notifications is not to send them from within - a synchronized block, or while holding a lock on - some resource.

                  -

                  Indeed, what happens when you send a notification - may vary greatly depending on whether the client - which has registered for notifications has done - so through a JMXConnector (like the - JMXRMIConnector) - or through a direct reference to the MBeanServer - (by calling - MBeanServer.addNotificationListener). -

                  -

                  In this latter case, the listener will be invoked - synchronously in the same thread that your MBean is - using to send its notification. If by misfortune, the - code of that listener now re-enters your MBean through a - call that flows through a JMXConnector, a deadlock - could occur. It is therefore very important to release - any lock you may have before calling - sendNotification.

                  -

                  An easy way to do that is demonstrated in the - ScanManager class. The ScanManager - has an internal private queue of pending notifications. - When a notification needs to be sent (e.g. because the - ScanManager state is being switched), the notification - is simply prepared and put into the pending notification - queue. - The notification queue is then processed later on, - at the end of the method, when the processing is finally - completed and all the locks have been released. -
                  At this point the notification queue might already - have been emptied by another thread - in which case - the pending notifications will have already been - removed from the queue. Which thread actually gets - to send the notifications is of no importance. The - important point is that all the locks detained by - your MBean code in that thread were released before - the notification was sent. -

                  -

                  In our example the ScanManager class - ensures this by: -

                    -
                  • Only calling sendNotification - in its private sendQueuedNotifications - method. -
                  • -
                  • Only calling sendQueuedNotifications - when all locks have been released. -
                  • -
                  • Never calling a method that calls - sendQueuedNotifications from within - a synchronized block.
                  • -
                  -

                  -
                - - - -

                Don't subclass Notification

                -
                  -

                  Another common best practice when you want - to improve interoperability is to use directly - the Notification base classes provided in the - JMX™ API. Do not create your own - subclasses of these standard classes. -

                  -

                  Indeed, if you code your own subclass, a generic - client, like jconsole, will not be able to receive - that notification unless it has that custom - subclass in its classpath. -

                  -

                  - If you want your application to be interoperable, it is - therefore preferable not to subclass any of the standard - Notification classes. You can define your own - Notification type string, and if you need to send - additional data, you can put a CompositeData, or a - HashMap of serializable standard types in the - Notification's user data fields. -

                  -

                  In this example, we are using directly the - standard notification classes: -

                    -
                  • The ScanManagerMXBean and the DirectoryScannerMXBean both use directly - AttributeChangeNotification to notify - changes in their State attribute. -
                  • -
                  • The DirectoryScannerMXBean - also uses the base Notification - class directly in order to notify whenever - it finds a matching file. -
                    In that case, we simply use the base - Notification - class with a new - com.sun.jmx.examples.scandir.filematch - type. -
                  • -
                  • The ScanDirConfigMXBean and ResultLogManagerMXBean also both use the base - Notification class. -
                  • -
                  -

                  Careful readers will have noted that the ScanManagerMXBean and the DirectoryScannerMXBean both use the - AttributeChangeNotification class - to notify about their state change, whereas the - ScanDirConfigMXBean uses the base - Notification class. -

                  -

                  In fact, this is because the semantics of these - notifications is not exactly the same - although - both denote a state change: -

                    -

                    In the case of ScanManagerMXBean - and DirectoryScannerMXBean, the - notification which is emitted is more about a - state transition, from one state to another. - For instance, going from RUNNING - to STOPPED, or from - SCHEDULED to STOPPED. -
                    In that case, the - AttributeChangeNotification was - more appropriate because it made it possible - to send the previous and the new value of the - state attribute, thus reflecting the whole - state transition. -

                    -

                    In the case of the ScanDirConfigMXBean - however, what is of interest is the state in - which the MBean has arrived. Using the base - Notification class with three different - notification type strings - - com.sun.jmx.examples.scandir.config.loaded, - com.sun.jmx.examples.scandir.config.modified, - and - com.sun.jmx.examples.scandir.config.saved - - was therefore closer to what we wanted to model. -

                    -
                  -

                  -
                - -

                Configuration MBeans

                -
                  -

                  A common practice when designing a management application is - to have an MBean, or a set of MBeans, dedicated to configuration. - Separating configuration from control and monitoring allows - more appropriate logic, and often simplifies the design and - implementation of the management interface. -

                  -

                  - In our example, the ScanDirConfigMXBean is dedicated to the application configuration. -

                  -

                  The ScanDirConfigMXBean will let you interactively - modify, save, or load the application configuration. The modifications - will not be taken into account until it is applied, by invoking - applyConfiguration on the ScanManagerMXBean. - It is also possible to create many configurations, by creating as - many ScanDirConfigMXBeans, and then to choose and apply - one of these configurations by calling - ScanManagerMXBean.setConfigurationMBean and then - ScanManagerMXBean.applyConfiguration. -

                  -

                  In this way, all configurations aspects are gathered and concentrated - inside the ScanDirConfigMXBean instead of being scattered - throughout all the MBeans that compose the application. -

                  -

                  In order to save and store the application configuration data, the - ScanDirConfigMXBean uses a set of XML serializable Java beans - defined in the com.sun.jmx.examples.scandir.config package. These beans are very - simple Java beans which have been lightly annotated for XML binding. -

                  -

                  It is worth noting that these same beans can also be handled by the - MXBean framework (our beans don't contain recursive data structures) and can - therefore be used directly as attributes and parameters of MXBeans, without - needing to be Java-serializable (the MXBean framework transform them in - CompositeData objects - which are serializable). -

                  -

                  The same ScanManagerConfig bean that we use to read from and write to the - XML configuration file is thus also used as attribute of the ScanDirConfigMXBean. It is transformed into a CompositeData - by the MXBean framework, and can be easily introspected with - jconsole. -

                  -
                -

                MBeans Must Be Thread-Safe

                -
                  -

                  A question often asked by newcomers to JMX technology - is whether the MBeanServer is thread-safe. Well, the MBeanServer is - thread safe, but it doesn't put any locks on the MBeans it contains. The - MBeans can be concurrently accessed by multiple threads, and must therefore - take care of their own thread safety. -

                  -

                  In this example, we have been using two methods to ensure thread - safety for our MBeans: synchronized blocks, and semaphores. -

                  -

                  Using synchronized blocks is probably the most common and easiest way - to implement thread safety in Java. When dealing with MBeans though, here - are a couple of rules to keep in mind: -

                    -
                  • Don't send notifications from within a synchronized block: there's - no way to tell whether the listener's code will be executed in the - same thread or a different thread, and holding a lock in these - conditions is therefore dangerous, as it could lead to deadlocks.
                  • -
                  • Also avoid invoking another MBean from a synchronized block - unless you are completely in control of both MBeans, and you can - ascertain that it won't lead to any deadlock. Indeed, if you invoke an - MBean exposed by another application, it can be sometime hard to - know with certainty whether holding a lock while invoking that - MBean will have any side effect. Maybe that MBean will make - further calls to other MBeans which will in turn try to call - your MBean, or maybe it will emit a - notification, and we'll be back to the considerations just - above.
                  • -
                  -

                  -

                  Another means of implementing thread-safe code is to use semaphores. - The ScanManagerMXBean uses a semaphore called - sequencer to ensure - that critical code sections are not executed concurrently. In this - MBean, we use Semaphore.tryAcquire to lock the sequencer - semaphore before entering the critical section. If the - Semaphore.tryAcquire returns true then we enter the critical - section. If it returns false, we throw an IllegalStateException, stating - that we couldn't acquire the lock. The code looks like this: -

                  -        if (!sequencer.tryAcquire())
                  -            throw new IllegalStateException("resource locked");
                  -        try {
                  -            // critical code here ...
                  -        } finally {
                  -            // Always use try/finally to ensure that the semaphore
                  -            // will be released, even if exceptions or errors are raised!
                  -            sequencer.release();
                  -        }
                  -    
                  -

                  -

                  Using Semaphore.tryAcquire and throwing an exception if - the semaphore is already locked makes it safer to call other MBeans - from within the critical section: in potential deadlock situations - the calling code will get the IllegalStateException - instead of being blocked on the deadlocked lock. -

                  -

                  It is worth noting that each of these techniques has its own - advantages and disadvantages - which can make one of them more or less - appropriate depending on the inner logic of the MBean you're implementing. -

                  -

                  Careful readers will also have noted that we used - IllegalStateException directly, instead of defining - our own subclass of RuntimeException, which could have had a more - precise semantics. If you define a new exception for your JMX application, - you must keep in mind that your client will need to have the class - of your exception in its classpath to get that exception. - Otherwise your client will get a completely different exception, indicating a - deserialization issue. -

                  -
                - -

                Waiting for Notifications

                -
                  -

                  Implementing code that needs to wait for notifications is sometimes - difficult. Because notifications are asynchronous, doing something - like: -

                  -          // register a notification listener
                  -          ...
                  -          // start a management action
                  -          ...
                  -          // wait for a notification
                  -          ...
                  -          // do something based on whether the expected notification
                  -          // is received
                  -          ...
                  -        
                  - is not always trivial. However, there's a very easy way to do that: use - a blocking queue of notifications. -
                  -       final BlockingQueue<Notification> notifQueue =
                  -                new LinkedBlockingQueue<Notification>();
                  -
                  -       final NotificationListener listener = new NotificationListener() {
                  -            public void handleNotification(Notification notification,
                  -                                           Object handback) {
                  -                try {
                  -                    // Just put the received notification in the queue.
                  -                    // It will be consumed later on.
                  -                    //
                  -                    notifQueue.put(notification);
                  -                } catch (InterruptedException ex) {
                  -                    // OK
                  -                }
                  -            }
                  -          };
                  -
                  -       // register the listener - possibly also as a JMXConnectionNotification
                  -       // listener to get Notification Lost notification
                  -       ...
                  -       // start management action
                  -       ...
                  -       // wait for notification
                  -       while (expected notif not received and delay not expired) {
                  -            Notification n = notifQueue.poll(3,TimeUnit.SECONDS);
                  -            // if expected notif, do something
                  -            ...
                  -       }
                  -       // if expected notification not received do something else.
                  -       ....
                  -       
                  -

                  -

                  You will note that this is a technique we've been using in the ScanDirAgent class and in the example unit tests. -

                  -
                - -

                Holding hard references to other MBeans: proxy or direct reference?

                -
                  -

                  We have seen that MXBeans will let you return proxy references to other - MXBeans. But should that MXBean hold a direct reference to the MXBeans it - relates to, or would it be better for it to hold only a proxy? -

                  -

                  - As a general rule it is better when an MBean reference is - only held by the MBeanServer. It is a better design - to hold a reference to a proxy, rather than to hold - a hard reference to an MBean. However there are two cases - when holding a hard reference might be preferred: -

                    -
                  1. When MBean A needs to call a method of method B which - is not part of its MBean interface
                  2. -
                  3. When the overhead of going through the MBeanServer - plus the MXBean framework is too great (frequently-called - method, with creation of OpenType)
                  4. -
                  - However - holding a hard reference is only advisable - when both MBeans are created by the same piece of code, - and the application can ensure that the life cycle - of each MBean is consistent with regard to the other. -

                  -

                  In our example, the ScanManagerMXBean holds only proxy references to the ScanDirConfigMXBean and the DirectoryScannerMXBeans.
                  - However it holds a direct reference to the ResultLogManager. This makes it possible to pass a direct - reference to the DirectoryScannerMXBeans, - which can then log their results - more efficiently, and would also make it possible to remove - the log method from the ResultLogManagerMXBean interface - leaving it in the - ResultLogManager class (possibly as a package method) - should we wish to do so. -

                  - -
                - -

                Agent Class

                -
                  -

                  The ScanDirAgent is the Agent class for the scandir application. - This class contains the main method to start a standalone - scandir application. -

                  -

                  The main method simply registers a ScanManagerMXBean in the platform MBeanServer, and then waits - for someone to call ScanManagerMXBean.close. -

                  -

                  - When the ScanManagerMXBean state is switched to - ScanManagerMXBean.ScanState.CLOSED, the - ScanManagerMXBean is unregistered, and the application - terminates (i.e. the main thread completes). -

                  -

                  Standalone JMX applications usually have an Agent class that contain - their main method, which performs all the MBean - registration steps. - However, it is usually not a bad idea if that class can - be easily turned into an MBean. Indeed, this will make your - application easier to integrate in an environment where it would - no longer be standalone and would no longer control the implementation - of main. In our example the Agent - class could be easily turned into an MBean, exposing its three - init, waitForClose and cleanup - method. However we didn't go as far as turning it into an MBean since - the application can be already easily started by registering an instance - of ScanManagerMXBean. -

                  -
                -

                Secure Client Class

                -
                  -

                  The ScanDirClient is an example class that shows how a - programmatic client can connect to a secured scandir application. - This class contains a main method which creates and - configures a JMXConnector client to connect with - a secured scandir daemon. This class will not work with - the default unsecured agent since it requires mutual authentication. -

                  -

                  How to secure a JMX scandir application and run - the secure ScanDirClient is discussed later in this document. -

                  -

                  The ScanDirClient is not really part of the - application - and is given here only for the sake of - the example. -

                  -
                - -

                Testing the scandir Example

                -
                  -

                  Make sure that you have access to junit.jar (either 3.8.1 or 3.8.2). - Make sure also that you have junit.jar in your - CLASSPATH.
                  - Then in the example root directory (where the build.xml - file is located) run the following command: -

                  ant test -Dlibs.junit.classpath=path to junit jar (either 3.8.1 or 3.8.2)
                  -

                  -

                  Alternatively you can open the jmx-scandir project with the - NetBeans IDE and test the jmx-scandir project from the - Run menu. -

                  - -
                - -

                Running the scandir Example

                -
                  -

                  In the example root directory (where the build.xml - file is located) run the following commands: -

                  ant jar
                  -ant run-single -Drun.class=com.sun.jmx.examples.scandir.ScanDirAgent -Djavac.includes=src
                  - or simply
                  ant run
                  -

                  - -

                  This will run the example using the configuration - file provided in the src/etc directory. -

                  -

                  Alternatively you can open the jmx-scandir project with the - NetBeans IDE. You can run the example by - selecting the ScanDirAgent file - and run it with Run File in the - Run menu or simply - set the jmx-scandir project as main project and - select Run Main Project from the - main menu. Both targets will use the configuration - file provided in the src/etc directory. -

                  -

                  When the application is started, you can connect to - it with jconsole. -

                  -
                  - Note: You can also run the scandir - application directly from the java - command line. Make sure to build the project jar - first. -
                  On Unix systems: -
                  ant jar
                  -java -Djava.util.logging.config.file=logging.properties \
                  -     -Dscandir.config.file=src/etc/testconfig.xml \
                  -     -jar dist/jmx-scandir.jar
                  -
                  On Windows systems: -

                  ant jar
                  -java  -Djava.util.logging.config.file=logging.properties -  -Dscandir.config.file=src\etc\testconfig.xml -  -jar dist\jmx-scandir.jar

                  -
                  -
                - -

                Playing with JConsole

                -
                  -

                  Run the example as explained in the previous section, so - that it uses the provided src/etc/testconfig.xml - configuration file. Then start - jconsole. In the connection window choose the process that runs - com.sun.jmx.examples.scandir.ScanDirAgent or - jmx-scandir.jar. -

                  -

                  - - -
                  - jconsole connection window - connect to local process - - jconsole connection window - connect to local process -
                  -
                  -

                  -

                  Open the MBeans tab, and look for the - ScanDirConfigMXBean. - Click on its Attributes node and double click on its - Configuration attribute, to look at - the loaded configuration - values in bold can - be expanded by a double-click. -

                  -

                  jconsole MBean tab: ScanDirConfigMXBean
                  -

                  -

                  Now go to the ScanManagerMXBean, click on - its Notifications node, and subscribe - for notifications. Then click on the - Operations node and invoke the - start() operation: -

                  -

                  jconsole MBean tab: ScanDirConfigMXBean
                  -

                  -

                  You can see that the notifications counter was - incremented by three: you have just scheduled, - run, and completed a batch of directory scans. -

                  -

                  Now go to the ResultLogManagerMXBean, - click on its Attributes node, and - expand its MemoryLog attribute: -

                  -

                  jconsole MBean tab: ScanDirConfigMXBean
                  -

                  -

                  You can see that the directory scan results have - been logged.

                  -

                  To make the application terminate go back to the - ScanManagerMXBean and invoke - close(). The ScanDirAgent - will receive the notification, step out of - the application main thread, and the application - will terminate. -

                  -

                  This is of course a very limited scenario. Feel free - to improvise with all the features of the example, creating - a new configuration - - ScanManagerMXBean.createOtherConfigurationMBean - - adding multiple directory scanners to that configuration - - ScanDirConfigMXBean.addDirectoryScanner - - then switching the ScanManagerMXBean current - configuration by changing the value of the ConfigurationMBean - attribute - ScanManagerMXBean.setConfigurationMBean - - then applying the new configuration - - ScanManagerMXBean.applyConfiguration(true) - - then scheduling repeated directory scans every 10 seconds - - ScanManagerMXBean.schedule(0,10000) - - subscribing for notifications, etc... -

                  -
                - - -

                Turning the example into a Secure JMX Application

                - -

                Configuring the JVM Agent for Secure Remote Connection

                -
                  -

                  The easiest way to configure the - JVM Agent for Secure Remote - Connection is to use your own management.properties file. - In this example, we have copied the default - $JRE/conf/management/management.properties - file to the example's src/etc directory and - modified it in this way: -

                    -
                  • We have set the RMI port to 4545 - this is just a - random port number we have picked up. Feel free to use your - own value suited to your environment. -
                    # For setting the JMX RMI agent port use the following line
                    -com.sun.management.jmxremote.port=4545
                    -
                  • -
                  • We have switched on SSL mutual authentication -
                    # For RMI monitoring with SSL client authentication use the following line
                    -com.sun.management.jmxremote.ssl.need.client.auth=true
                    -
                  • -
                  • We have also secured the RMI Registry with SSL -
                    # For using an SSL/TLS protected RMI Registry use the following line
                    -com.sun.management.jmxremote.registry.ssl=true
                    -
                  • -
                  • We have provided our own password file -
                    # For a non-default password file location use the following line
                    -com.sun.management.jmxremote.password.file=src/etc/password.properties
                    -
                  • -
                  • We have provided our own access file -
                    # For a non-default password file location use the following line
                    -com.sun.management.jmxremote.access.file=src/etc/access.properties
                    -
                  • -
                  -

                  You will note that we haven't provided any value - for the other security properties, like - com.sun.management.jmxremote.authenticate=true, - because these properties already default to a value - which enables security by default. - Note however that protecting the RMI Registry with SSL - improves the application security, but only as long as - mutual authentication is also switched on. Otherwise, just - anybody would be able to connect to the registry and - get the RMIServer stub. -

                  -

                  We do recommend that you use the most secure configuration - when you deploy a JMX agent - which means switching on - SSL protection for the RMI registry and requiring - mutual authentication, as we show in this example. -

                  -

                  We will use the com.sun.management.config.file - system property to pass our management.properties - file to the ScanDirAgent. -

                  -
                - -

                Creating a password and access file

                -
                  -

                  As explained above, we have created our own - password file - and access file - for access control and authorization. -

                  -

                  In the password file, we have defined two logins: - guest and admin. The password for - guest is guestpasswd and the password - for admin is adminpasswd. -

                  -

                  In the access file, we have mapped these two logins - to access rights: the admin login has read-write - access, while the guest login only has read-only. -

                  -

                  Before starting the ScanDirAgent, you will - need to restrict access permission to the password file, - in such a way that nobody but you can read it. Otherwise, the - JVM Agent will refuse to start the JMXConnectorServer, as it will - fear that security can be compromised if other parties can - have read access to the password file. How to restrict - read access to the password file is explained in detail - here. -

                  -

                  As we have seen above, the location - of our access and password files is configured in our own management.properties - file. -

                  -
                -

                Keystore and Truststore

                -
                  -

                  Using SSL with mutual authentication means that both - client and server will need a keystore and a truststore - to store their own certificates, and the certificates of - the parties they trust. Usually, client and server will - have their own keystore and truststore. -

                  -

                  For the sake of simplicity - and to get you started - without the tedious necessity of creating your own keystore - and truststore, we are providing a dummy keystore and - truststore, containing a certificate self-signed by duke. - The password for our keystore is password, and the - password for our truststore is trustword. - We suggest that you first get the example running with the - keystore and truststore we are providing before attempting - to use your own keystore and truststore. -

                  -

                  A secure application will obviously need to use its own - keystore and truststore, and should not rely on the keystore - and truststore we are providing here! -

                  -

                  How to create your own keystore and truststore, is explained - in here. - As shown later, - we will need to use system properties to pass our truststore - and keystore to the ScanDirAgent. -

                  -
                -

                Starting a Secure scandir agent

                -
                  -

                  To start a secure scandir agent, go to the - scandir example root directory and type the - following command:

                  -

                  On Unix Systems: -

                  ant jar
                  -java \
                  -    -Djava.util.logging.config.file=logging.properties \
                  -    -Djavax.net.ssl.keyStore=keystore \
                  -    -Djavax.net.ssl.keyStorePassword=password \
                  -    -Djavax.net.ssl.trustStore=truststore \
                  -    -Djavax.net.ssl.trustStorePassword=trustword \
                  -    -Dcom.sun.management.config.file=src/etc/management.properties \
                  -    -Dscandir.config.file=src/etc/testconfig.xml \
                  -    -jar dist/jmx-scandir.jar
                  -

                  -

                  On Windows Systems: -

                  ant jar
                  -java -  -Djava.util.logging.config.file=logging.properties -  -Djavax.net.ssl.keyStore=keystore -  -Djavax.net.ssl.keyStorePassword=password -  -Djavax.net.ssl.trustStore=truststore -  -Djavax.net.ssl.trustStorePassword=trustword -  -Dcom.sun.management.config.file=src\etc\management.properties -  -Dscandir.config.file=src\etc\testconfig.xml -  -jar dist\jmx-scandir.jar

                  -

                  -

                  If you start jconsole now, you will see that you - are still able to connect to the agent using the - local connection. However, if you try to connect - through the remote connector, using - localhost:4545, - the connection will fail, even if you provide a correct login/password - pair. Indeed, since the JMXConnectorServer is now protected with SSL, - jconsole must also be configured with the appropriate SSL parameters - so that it can authenticate the server and get authenticated by the - server too as the SSL configuration of the server requires mutual - authentication. -

                  -

                  The next section will discuss how to connect to the - secure agent. -

                  -
                - -

                Connecting to the Secure JMX Application

                -
                  -

                  We will now see how to connect to the secure agent, - using jconsole, and using a programmatic client. -

                  -
                - -

                Using jconsole to connect to the secure agent

                -
                  -

                  The only special thing you need to do in order to - be able to connect to your secure agent with - jconsole, is to give it a keystore (containing - its client certificate) and a truststore (containing - the certificates of the servers it can trust). - In our example, we use the same keystore/truststore - pair on the client and server side - but this is - not what a real application would do. - Indeed a real application would have different - certificates for the client and the server, and - thus use different keystores (and probably truststores). - More information on SSL authentication can be obtained from the Java™ Secure Socket Extension (JSSE) Reference Guide. -

                  -

                  To start jconsole with our provided keystore and - truststore, go to the scandir example root directory and - type in the following command: -

                  jconsole -  -J-Djava.util.logging.config.file=logging.properties -  -J-Djavax.net.ssl.keyStore=keystore -  -J-Djavax.net.ssl.keyStorePassword=password -  -J-Djavax.net.ssl.trustStore=truststore -  -J-Djavax.net.ssl.trustStorePassword=trustword

                  -

                  -

                  The -J-Djava.util.logging.config.file=logging.properties - flag is not mandatory, but passing a logging.properties - may help you debug connection problems if anything goes wrong. -

                  -

                  In jconsole connection window, choose to connect to a - remote process, using the address localhost:4545 - and the guest login: -

                  -

                  jconsole connection window
                  -

                  -

                  You will see that the agent will let view all the - MBeans and their attributes, but will reject any - attribute modification or remote method invocation. -

                  -
                  -

                  Note: if jconsole fails to connect and show - you this screen - you have probably misspelled some of the properties on jconsole - command line, or you didn't start jconsole from the - scandir example root directory where our truststore - and keystore files are located. This article - Troubleshooting connection problems in JConsole - may help - you figure out what is going wrong. -

                  -
                  -
                - -

                Writing a programmatic client to connect to the secure agent

                -
                  -

                  - In this section we will show the steps involved in writing - a programmatic client that will connect to our secure agent. -

                  -

                  The ScanDirClient is an example class that shows how a - programmatic client can connect to a secured scandir application. - This class contains a main method which creates and - configures a JMXConnector client to connect with - the secured scandir agent. -

                  -

                  The secure client differs only from a non secure client in - so far as it needs to use SSL RMI Factories and credentials to - connect to the secure agent. The steps required mainly involve: -

                    -
                  • Creating an empty environment map: -
                    -            // Create an environment map to hold connection properties
                    -            // like credentials etc... We will later pass this map
                    -            // to the JMX Connector.
                    -            //
                    -            System.out.println("\nInitialize the environment map");
                    -            final Map<String,Object> env = new HashMap<String,Object>();
                    -           
                    -
                  • -
                  • Putting the client's credentials in that map: - (here the client will log in as guest) -
                    -            // Provide the credentials required by the server
                    -            // to successfully perform user authentication
                    -            //
                    -            final String[] credentials = new String[] { "guest" , "guestpasswd" };
                    -            env.put("jmx.remote.credentials", credentials);
                    -           
                    -
                  • -
                  • Providing an SslRMIClientSocketFactory to interact - with the secure RMI Registry: -
                    -            // Provide the SSL/TLS-based RMI Client Socket Factory required
                    -            // by the JNDI/RMI Registry Service Provider to communicate with
                    -            // the SSL/TLS-protected RMI Registry
                    -            //
                    -            env.put("com.sun.jndi.rmi.factory.socket",
                    -                    new SslRMIClientSocketFactory());
                    -           
                    -
                  • -
                  • Creating a JMXConnector and connecting with the - secure server: -
                    -            // Create the RMI connector client and
                    -            // connect it to the secure RMI connector server.
                    -            // args[0] is the server's host - localhost
                    -            // args[1] is the secure server port - 4545
                    -            //
                    -            System.out.println("\nCreate the RMI connector client and " +
                    -                    "connect it to the RMI connector server");
                    -            final JMXServiceURL url = new JMXServiceURL(
                    -                    "service:jmx:rmi:///jndi/rmi://"+args[0]+":"+args[1]+
                    -                    "/jmxrmi");
                    -            final JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
                    -           
                    -
                  • -
                  -

                  For this to work, we also need to start the ScanDirClient - with the appropriate system properties that will point to our - keystore and truststore. To start the secure - client, go to the scandir example root directory and type - the following command: -

                  ant jar
                  -java -  -Djava.util.logging.config.file=logging.properties -  -Djavax.net.ssl.keyStore=keystore -  -Djavax.net.ssl.keyStorePassword=password -  -Djavax.net.ssl.trustStore=truststore -  -Djavax.net.ssl.trustStorePassword=trustword -  -classpath dist/jmx-scandir.jar -  com.sun.jmx.examples.scandir.ScanDirClient localhost 4545 -

                  -

                  -

                  You should be seeing this trace: -

                  -
                  -
                  -Initialize the environment map
                  -
                  -Create the RMI connector client and connect it to the RMI connector server
                  -Connecting to: service:jmx:rmi:///jndi/rmi://localhost:4545/jmxrmi
                  -
                  -Get the MBeanServerConnection
                  -
                  -Get ScanDirConfigMXBean from ScanManagerMXBean
                  -
                  -Get 'Configuration' attribute on ScanDirConfigMXBean
                  -
                  -Configuration:
                  -
                  -<ScanManager xmlns="jmx:com.sun.jmx.examples.scandir.config" name="testconfig">
                  -    <InitialResultLogConfig>
                  -        <LogFileMaxRecords>2048</LogFileMaxRecords>
                  -        <LogFileName>build/scandir.log</LogFileName>
                  -        <MemoryMaxRecords>128</MemoryMaxRecords>
                  -    </InitialResultLogConfig>
                  -    <DirectoryScannerList>
                  -        <DirectoryScanner name="scan-build">
                  -            <Actions>NOTIFY LOGRESULT</Actions>
                  -            <ExcludeFiles/>
                  -            <IncludeFiles>
                  -                <FileFilter>
                  -                    <FilePattern>.*\.class</FilePattern>
                  -                    <SizeExceedsMaxBytes>4096</SizeExceedsMaxBytes>
                  -                </FileFilter>
                  -            </IncludeFiles>
                  -            <RootDirectory>build</RootDirectory>
                  -        </DirectoryScanner>
                  -    </DirectoryScannerList>
                  -</ScanManager>
                  -
                  -Invoke 'close' on ScanManagerMXBean
                  -
                  -Got expected security exception: java.lang.SecurityException: Access denied!
                  -Invalid access level for requested MBeanServer operation.
                  -
                  -Close the connection to the server
                  -
                  -Bye! Bye!
                  -
                  -
                  -

                  If the ScanDirClient fails to connect with - the secure agent, then this article - Troubleshooting connection problems in JConsole - may help - you figure out what is going wrong. Indeed the connection steps - performed by the ScanDirClient are very similar to - those performed by jconsole, and the problems you - could encounter are identical. Just remember that - jconsole needs the extra -J flag to pass - system properties to the VM, which is not needed with regular - java launcher invocations. -

                  -
                - -

                Conclusion

                -
                  -

                  - In this document, we have presented an advanced - JMX example, and shown how to run a secure - JMX agent in a production environment. - We have also shown how to connect to such a - secure agent with both jconsole and a programmatic - client. We have also discuss various JMX - design-patterns and best practices. - Readers who would wish to learn more about JMX, and - Monitoring and Management of the JVM, are invited - to follow the links given in reference below. -

                  -
                -

                References

                -
                  -
                1. JMX Best Practices: This document describes best practices that - have been identified for modeling using the JMX API.
                2. -
                3. Monitoring and Management Using JMX: How to enable, configure, and - connect to the JVM JMX agent.
                4. -
                5. Using JConsole: JConsole is a JMX-Compliant monitoring tool which allows - you to interact graphically with your own MBeans. -
                6. -
                7. Monitoring and Management for the Java Platform: The Java Platform - Standard Edition (Java SE) 6 provides comprehensive monitoring and - management support for the Java platform.
                8. -
                9. List of JMX-related Blogs: This page provides links to the - different web logs written by members of the Sun team working on the - JMX API.
                10. -
                11. Java™ Secure Socket Extension (JSSE) Reference Guide: - comprehensive documentation about the Java™ Secure Socket - Extension (JSSE) -
                12. -
                13. Java SE 6 Documentation Index: This document covers the - Java™ Platform, Standard Edition 6 JDK.
                14. -
                -

                -


                -

                - - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/logging.properties b/jdk/src/sample/share/jmx/jmx-scandir/logging.properties deleted file mode 100644 index 1714beec628..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/logging.properties +++ /dev/null @@ -1,17 +0,0 @@ -handlers= java.util.logging.ConsoleHandler - -.level=INFO - - -java.util.logging.FileHandler.pattern = %h/java%u.log -java.util.logging.FileHandler.limit = 50000 -java.util.logging.FileHandler.count = 1 -java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter - -java.util.logging.ConsoleHandler.level = FINEST -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter - -javax.management.level=INFO -com.sun.jmx.level=INFO -com.sun.jmx.examples.level=FINE - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/manifest.mf b/jdk/src/sample/share/jmx/jmx-scandir/manifest.mf deleted file mode 100644 index 328e8e5bc3b..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/nbproject/file-targets.xml b/jdk/src/sample/share/jmx/jmx-scandir/nbproject/file-targets.xml deleted file mode 100644 index 42da880998b..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/nbproject/file-targets.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - Must set property 'includes' - - - - - - - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/nbproject/jdk.xml b/jdk/src/sample/share/jmx/jmx-scandir/nbproject/jdk.xml deleted file mode 100644 index 2b85b77e928..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/nbproject/jdk.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/nbproject/netbeans-targets.xml b/jdk/src/sample/share/jmx/jmx-scandir/nbproject/netbeans-targets.xml deleted file mode 100644 index facdb4ee8fa..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/nbproject/netbeans-targets.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/nbproject/project.xml b/jdk/src/sample/share/jmx/jmx-scandir/nbproject/project.xml deleted file mode 100644 index a988de6d9d2..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/nbproject/project.xml +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - org.netbeans.modules.ant.freeform - - - jmx-scandir - - user.build.properties - build.properties - ${nbjdk.home}/jre/lib/rt.jar - - - - - ${main.dir} - - - - java - ${src.dir} - - - - java - test - - - - - jar - - - clean - - - clean - jar - - - run - - - - show-info - - - - show-javadoc - - - - debug - - - - compile-selected - - includes - ${src.dir} - \.java$ - relative-path - - , - - - - - run - - main.class - ${src.dir} - \.java$ - java-name - - - - - - - - debug - - main.class - ${src.dir} - \.java$ - java-name - - - - - - - - debug-fix - - class - ${src.dir} - \.java$ - relative-path-noext - - - - - - - test - - - - folder - ${classes.dir} - jar - - - jar - ${jar} - jar - - - folder - ${build.test.classes.dir} - jar - - - - - - ${src.dir} - - - - test - - - ${main.dir}/index.html - - - - - - - - - - - - - - run-agent - - - - run-client - - - - - - - - ${src.dir} - ${cp} - ${run.cp} - ${nbjdk.bootclasspath} - ${classes.dir} - ${jar} - ${javadoc.dir} - 1.5 - - - test - - ${build.test.classes.dir} - 1.5 - - - - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/DirectoryScanner.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/DirectoryScanner.java deleted file mode 100644 index 0ff58a210ce..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/DirectoryScanner.java +++ /dev/null @@ -1,591 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import static com.sun.jmx.examples.scandir.ScanManager.getNextSeqNumber; -import com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState; -import static com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState.*; -import static com.sun.jmx.examples.scandir.config.DirectoryScannerConfig.Action.*; -import com.sun.jmx.examples.scandir.config.XmlConfigUtils; -import com.sun.jmx.examples.scandir.config.DirectoryScannerConfig; -import com.sun.jmx.examples.scandir.config.DirectoryScannerConfig.Action; -import com.sun.jmx.examples.scandir.config.ResultRecord; -import java.io.File; -import java.io.FileFilter; -import java.io.IOException; -import java.util.Arrays; -import java.util.Collections; -import java.util.EnumSet; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.management.AttributeChangeNotification; -import javax.management.InstanceNotFoundException; -import javax.management.ListenerNotFoundException; -import javax.management.MBeanNotificationInfo; -import javax.management.Notification; -import javax.management.NotificationBroadcasterSupport; -import javax.management.NotificationEmitter; -import javax.management.NotificationFilter; -import javax.management.NotificationListener; - -/** - * A DirectoryScanner is an MBean that - * scans a file system starting at a given root directory, - * and then looks for files that match a given criteria. - *

                - * When such a file is found, the DirectoryScanner takes - * the action for which it was configured: emit a notification, - * and or log a {@link - * com.sun.jmx.examples.scandir.config.ResultRecord} for this file, - * and or delete that file. - *

                - *

                - * The code that would actually delete the file is commented out - so that - * nothing valuable is lost if this example is run by mistake on the wrong - * set of directories.
                - * Logged results are logged by sending them to the {@link ResultLogManager}. - *

                - *

                - * DirectoryScannerMXBeans are created, initialized, and - * registered by the {@link ScanManagerMXBean}. - * The {@link ScanManagerMXBean} will also schedule and run them in - * background by calling their {@link #scan} method. - *

                - *

                Client code is not expected to create or register directly any such - * MBean. Instead, clients are expected to modify the configuration, using - * the {@link ScanDirConfigMXBean}, and then apply it, using the {@link - * ScanManagerMXBean}. Instances of DirectoryScannerMXBeans - * will then be created and registered (or unregistered and garbage collected) - * as a side effect of applying that configuration. - *

                - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public class DirectoryScanner implements - DirectoryScannerMXBean, NotificationEmitter { - - /** - * The type for com.sun.jmx.examples.scandir.filematch notifications. - * Notifications of this type will be emitted whenever a file that - * matches this {@code DirectoryScanner} criteria is found, but only if - * this {@code DirectoryScanner} was configured to {@link - * Action#NOTIFY notify} for matching files. - **/ - public static final String FILE_MATCHES_NOTIFICATION = - "com.sun.jmx.examples.scandir.filematch"; - - /** - * A logger for this class. - **/ - private static final Logger LOG = - Logger.getLogger(DirectoryScanner.class.getName()); - - // Attribute : State - // - private volatile ScanState state = STOPPED; - - // The DirectoryScanner delegates the implementation of - // the NotificationEmitter interface to a wrapped instance - // of NotificationBroadcasterSupport. - // - private final NotificationBroadcasterSupport broadcaster; - - // The root directory at which this DirectoryScanner will start - // scanning. Constructed from config.getRootDirectory(). - // - private final File rootFile; - - // This DirectoryScanner config - this is a constant which is - // provided at construction time by the {@link ScanManager}. - // - private final DirectoryScannerConfig config; - - // The set of actions for which this DirectoryScanner is configured. - // Constructed from config.getActions() - // - final Set actions; - - // The ResultLogManager that this DirectoryScanner will use to log - // info. This is a hard reference to another MBean, provided - // at construction time by the ScanManager. - // The ScanManager makes sure that the life cycle of these two MBeans - // is consistent. - // - final ResultLogManager logManager; - - /** - * Constructs a new {@code DirectoryScanner}. - *

                This constructor is - * package protected, and this MBean cannot be created by a remote - * client, because it needs a reference to the {@link ResultLogManager}, - * which cannot be provided from remote. - *

                - *

                This is a conscious design choice: {@code DirectoryScanner} MBeans - * are expected to be completely managed (created, registered, unregistered) - * by the {@link ScanManager} which does provide this reference. - *

                - * - * @param config This {@code DirectoryScanner} configuration. - * @param logManager The info log manager with which to log the info - * records. - * @throws IllegalArgumentException if one of the parameter is null, or if - * the provided {@code config} doesn't have its {@code name} set, - * or if the {@link DirectoryScannerConfig#getRootDirectory - * root directory} provided in the {@code config} is not acceptable - * (not provided or not found or not readable, etc...). - **/ - public DirectoryScanner(DirectoryScannerConfig config, - ResultLogManager logManager) - throws IllegalArgumentException { - if (logManager == null) - throw new IllegalArgumentException("log=null"); - if (config == null) - throw new IllegalArgumentException("config=null"); - if (config.getName() == null) - throw new IllegalArgumentException("config.name=null"); - - broadcaster = new NotificationBroadcasterSupport(); - - // Clone the config: ensure data encapsulation. - // - this.config = XmlConfigUtils.xmlClone(config); - - // Checks that the provided root directory is valid. - // Throws IllegalArgumentException if it isn't. - // - rootFile = validateRoot(config.getRootDirectory()); - - // Initialize the Set for which this DirectoryScanner - // is configured. - // - if (config.getActions() == null) - actions = Collections.emptySet(); - else - actions = EnumSet.copyOf(Arrays.asList(config.getActions())); - this.logManager = logManager; - } - - // see DirectoryScannerMXBean - public void stop() { - // switch state to stop and send AttributeValueChangeNotification - setStateAndNotify(STOPPED); - } - - // see DirectoryScannerMXBean - public String getRootDirectory() { - return rootFile.getAbsolutePath(); - } - - - // see DirectoryScannerMXBean - public ScanState getState() { - return state; - } - - // see DirectoryScannerMXBean - public DirectoryScannerConfig getConfiguration() { - return config; - } - - // see DirectoryScannerMXBean - public String getCurrentScanInfo() { - final ScanTask currentOrLastTask = currentTask; - if (currentOrLastTask == null) return "Never Run"; - return currentOrLastTask.getScanInfo(); - } - - // This variable points to the current (or latest) scan. - // - private volatile ScanTask currentTask = null; - - // see DirectoryScannerMXBean - public void scan() { - final ScanTask task; - - synchronized (this) { - final LinkedList list; - switch (state) { - case RUNNING: - case SCHEDULED: - throw new IllegalStateException(state.toString()); - case STOPPED: - case COMPLETED: - // only accept to scan if state is STOPPED or COMPLETED. - list = new LinkedList(); - list.add(rootFile); - break; - default: - throw new IllegalStateException(String.valueOf(state)); - } - - // Create a new ScanTask object for our root directory file. - // - currentTask = task = new ScanTask(list,this); - - // transient state... will be switched to RUNNING when - // task.execute() is called. This code could in fact be modified - // to use java.util.concurent.Future and, to push the task to - // an executor. We would then need to wait for the task to - // complete before returning. However, this wouldn't buy us - // anything - since this method should wait for the task to - // finish anyway: so why would we do it? - // As it stands, we simply call task.execute() in the current - // thread - brave and fearless readers may want to attempt the - // modification ;-) - // - setStateAndNotify(SCHEDULED); - } - task.execute(); - } - - // This method is invoked to carry out the configured actions on a - // matching file. - // Do not call this method from within synchronized() { } as this - // method may send notifications! - // - void actOn(File file) { - - // Which action were actually taken - // - final Set taken = new HashSet(); - boolean logresult = false; - - // Check out which actions are configured and carry them out. - // - for (Action action : actions) { - switch (action) { - case DELETE: - if (deleteFile(file)) { - // Delete succeeded: add DELETE to the set of - // actions carried out. - taken.add(DELETE); - } - break; - case NOTIFY: - if (notifyMatch(file)) { - // Notify succeeded: add NOTIFY to the set of - // actions carried out. - taken.add(NOTIFY); - } - break; - case LOGRESULT: - // LOGRESULT was configured - log actions carried out. - // => we must execute this action as the last action. - // simply set logresult=true for now. We will do - // the logging later - logresult = true; - break; - default: - LOG.fine("Failed to execute action: " +action + - " - action not supported"); - break; - } - } - - // Now is time for logging: - if (logresult) { - taken.add(LOGRESULT); - if (!logResult(file,taken.toArray(new Action[taken.size()]))) - taken.remove(LOGRESULT); // just for the last trace below... - } - - LOG.finest("File processed: "+taken+" - "+file.getAbsolutePath()); - } - - // Deletes a matching file. - private boolean deleteFile(File file) { - try { - // file.delete() is commented so that we don't do anything - // bad if the example is mistakenly run on the wrong set of - // directories. - // - /* file.delete(); */ - System.out.println("DELETE not implemented for safety reasons."); - return true; - } catch (Exception x) { - LOG.fine("Failed to delete: "+file.getAbsolutePath()); - } - return false; - } - - // Notifies of a matching file. - private boolean notifyMatch(File file) { - try { - final Notification n = - new Notification(FILE_MATCHES_NOTIFICATION,this, - getNextSeqNumber(), - file.getAbsolutePath()); - - // This method *is not* called from any synchronized block, so - // we can happily call broadcaster.sendNotification() here. - // Note that verifying whether a method is called from within - // a synchronized block demends a thoroughful code reading, - // examining each of the 'parent' methods in turn. - // - broadcaster.sendNotification(n); - return true; - } catch (Exception x) { - LOG.fine("Failed to notify: "+file.getAbsolutePath()); - } - return false; - } - - // Logs a result with the ResultLogManager - private boolean logResult(File file,Action[] actions) { - try { - logManager.log(new ResultRecord(config, actions,file)); - return true; - } catch (Exception x) { - LOG.fine("Failed to log: "+file.getAbsolutePath()); - } - return false; - } - - - // Contextual object used to store info about current - // (or last) scan. - // - private static class ScanTask { - - // List of Files that remain to scan. - // When files are discovered they are added to the list. - // When they are being handled, they are removed from the list. - // When the list is empty, the scanning is finished. - // - private final LinkedList list; - private final DirectoryScanner scan; - - // Some statistics... - // - private volatile long scanned=0; - private volatile long matching=0; - - private volatile String info="Not started"; - - ScanTask(LinkedList list, DirectoryScanner scan) { - this.list = list; this.scan = scan; - } - - public void execute() { - scan(list); - } - - private void scan(LinkedList list) { - scan.scan(this,list); - } - - public String getScanInfo() { - return info+" - ["+scanned+" scanned, "+matching+" matching]"; - } - } - - // The actual scan logic. Switches state to RUNNING, - // and scan the list of given dirs. - // The list is a live object which is updated by this method. - // This would allow us to implement methods like "pause" and "resume", - // since all the info needed to resume would be in the list. - // - private void scan(ScanTask task, LinkedList list) { - setStateAndNotify(RUNNING); - task.info = "In Progress"; - try { - - // The FileFilter will tell us which files match and which don't. - // - final FileFilter filter = config.buildFileFilter(); - - // We have two condition to end the loop: either the list is - // empty, meaning there's nothing more to scan, or the state of - // the DirectoryScanner was asynchronously switched to STOPPED by - // another thread, e.g. because someone called "stop" on the - // ScanManagerMXBean - // - while (!list.isEmpty() && state == RUNNING) { - - // Get and remove the first element in the list. - // - final File current = list.poll(); - - // Increment number of file scanned. - task.scanned++; - - // If 'current' is a file, it's already been matched by our - // file filter (see below): act on it. - // Note that for the first iteration of this loop, there will - // be one single file in the list: the root directory for this - // scanner. - // - if (current.isFile()) { - task.matching++; - actOn(current); - } - - // If 'current' is a directory, then - // find files and directories that match the file filter - // in this directory - // - if (current.isDirectory()) { - - // Gets matching files and directories - final File[] content = current.listFiles(filter); - if (content == null) continue; - - // Adds all matching file to the list. - list.addAll(0,Arrays.asList(content)); - } - } - - // The loop terminated. If the list is empty, then we have - // completed our task. If not, then somebody must have called - // stop() on this directory scanner. - // - if (list.isEmpty()) { - task.info = "Successfully Completed"; - setStateAndNotify(COMPLETED); - } - } catch (Exception x) { - // We got an exception: stop the scan - // - task.info = "Failed: "+x; - if (LOG.isLoggable(Level.FINEST)) - LOG.log(Level.FINEST,"scan task failed: "+x,x); - else if (LOG.isLoggable(Level.FINE)) - LOG.log(Level.FINE,"scan task failed: "+x); - setStateAndNotify(STOPPED); - } catch (Error e) { - // We got an Error: - // Should not happen unless we ran out of memory or - // whatever - don't even try to notify, but - // stop the scan anyway! - // - state=STOPPED; - task.info = "Error: "+e; - - // rethrow error. - // - throw e; - } - } - - /** - * MBeanNotification support - delegates to broadcaster. - */ - public void addNotificationListener(NotificationListener listener, - NotificationFilter filter, Object handback) - throws IllegalArgumentException { - broadcaster.addNotificationListener(listener, filter, handback); - } - - // Switch this object state to the desired value an send - // a notification. Don't call this method from within a - // synchronized block! - // - private final void setStateAndNotify(ScanState desired) { - final ScanState old = state; - if (old == desired) return; - state = desired; - final AttributeChangeNotification n = - new AttributeChangeNotification(this, - getNextSeqNumber(),System.currentTimeMillis(), - "state change","State",ScanState.class.getName(), - String.valueOf(old),String.valueOf(desired)); - broadcaster.sendNotification(n); - } - - - /** - * The {@link DirectoryScannerMXBean} may send two types of - * notifications: filematch, and state attribute changed. - **/ - public MBeanNotificationInfo[] getNotificationInfo() { - return new MBeanNotificationInfo[] { - new MBeanNotificationInfo( - new String[] {FILE_MATCHES_NOTIFICATION}, - Notification.class.getName(), - "Emitted when a file that matches the scan criteria is found" - ), - new MBeanNotificationInfo( - new String[] {AttributeChangeNotification.ATTRIBUTE_CHANGE}, - AttributeChangeNotification.class.getName(), - "Emitted when the State attribute changes" - ) - }; - } - - /** - * MBeanNotification support - delegates to broadcaster. - */ - public void removeNotificationListener(NotificationListener listener) - throws ListenerNotFoundException { - broadcaster.removeNotificationListener(listener); - } - - /** - * MBeanNotification support - delegates to broadcaster. - */ - public void removeNotificationListener(NotificationListener listener, - NotificationFilter filter, Object handback) - throws ListenerNotFoundException { - broadcaster.removeNotificationListener(listener, filter, handback); - } - - // Validates the given root directory, returns a File object for - // that directory. - // Throws IllegalArgumentException if the given root is not - // acceptable. - // - private static File validateRoot(String root) { - if (root == null) - throw new IllegalArgumentException("no root specified"); - if (root.length() == 0) - throw new IllegalArgumentException("specified root \"\" is invalid"); - final File f = new File(root); - if (!f.canRead()) - throw new IllegalArgumentException("can't read "+root); - if (!f.isDirectory()) - throw new IllegalArgumentException("no such directory: "+root); - return f; - } - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/DirectoryScannerMXBean.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/DirectoryScannerMXBean.java deleted file mode 100644 index 2ca35488d04..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/DirectoryScannerMXBean.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState; -import com.sun.jmx.examples.scandir.config.DirectoryScannerConfig; -import java.io.IOException; -import javax.management.InstanceNotFoundException; - -/** - * A DirectoryScannerMXBean is an MBean that - * scans a file system starting at a given root directory, - * and then looks for files that match a given criteria. - *

                - * When such a file is found, the DirectoryScannerMXBean takes - * the actions for which it was configured: see {@link #scan scan()}. - *

                - * DirectoryScannerMXBeans are created, initialized, and - * registered by the {@link ScanManagerMXBean}. - * The {@link ScanManagerMXBean} will also schedule and run them in - * background by calling their {@link #scan} method. - *

                - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public interface DirectoryScannerMXBean { - /** - * Get The {@link DirectoryScanner} state. - * @return the current state of the DirectoryScanner. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public ScanState getState() - throws IOException, InstanceNotFoundException; - - /** - * Stops the current scan if {@link ScanState#RUNNING running}. - * After this method completes the state of the application will - * be {@link ScanState#STOPPED STOPPED}. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void stop() - throws IOException, InstanceNotFoundException; - - /** - * Scans the file system starting at the specified {@link #getRootDirectory - * root directory}. - *

                If a file that matches this DirectoryScannerMXBean - * {@link #getConfiguration} criteria is found, - * the DirectoryScannerMXBean takes the {@link - * DirectoryScannerConfig#getActions() actions} for which - * it was {@link #getConfiguration configured}: emit a notification, - * and or log a {@link - * com.sun.jmx.examples.scandir.config.ResultRecord} for this file, - * and or delete that file. - *

                - *

                - * The code that would actually delete the file is commented out - so that - * nothing valuable is lost if this example is run by mistake on the wrong - * set of directories. - *

                - *

                This method returns only when the directory scan is completed, or - * if it was {@link #stop stopped} by another thread. - *

                - * @throws IllegalStateException if already {@link ScanState#RUNNING} - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void scan() - throws IOException, InstanceNotFoundException; - - /** - * Gets the root directory at which this DirectoryScannerMXBean - * will start scanning the file system. - *

                - * This is a shortcut to {@link #getConfiguration - * getConfiguration()}.{@link - * DirectoryScannerConfig#getRootDirectory - * getRootDirectory()}. - *

                - * @return This DirectoryScannerMXBean root directory. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public String getRootDirectory() - throws IOException, InstanceNotFoundException; - - /** - * The configuration data from which this {@link DirectoryScanner} was - * created. - *

                - * You cannot change this configuration here. You can however - * {@link ScanDirConfigMXBean#setConfiguration modify} the - * {@link ScanDirConfigMXBean} configuration, and ask the - * {@link ScanManagerMXBean} to {@link ScanManagerMXBean#applyConfiguration - * apply} it. This will get all DirectoryScannerMXBean - * replaced by new MBeans created from the modified configuration. - *

                - * - * @return This DirectoryScannerMXBean configuration data. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public DirectoryScannerConfig getConfiguration() - throws IOException, InstanceNotFoundException; - - /** - * A short string describing what's happening in current/latest scan. - * @return a short info string. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public String getCurrentScanInfo() - throws IOException, InstanceNotFoundException; -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ResultLogManager.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ResultLogManager.java deleted file mode 100644 index a0a4bb9f43d..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ResultLogManager.java +++ /dev/null @@ -1,534 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import static com.sun.jmx.examples.scandir.ScanManager.getNextSeqNumber; -import com.sun.jmx.examples.scandir.config.ResultLogConfig; -import com.sun.jmx.examples.scandir.config.XmlConfigUtils; -import com.sun.jmx.examples.scandir.config.ResultRecord; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; -import java.util.logging.Logger; -import javax.management.MBeanNotificationInfo; -import javax.management.MBeanRegistration; -import javax.management.MBeanServer; -import javax.management.Notification; -import javax.management.NotificationBroadcasterSupport; -import javax.management.ObjectName; -import javax.xml.bind.JAXBException; - -/** - * The ResultLogManager is in charge of managing result logs. - * {@link DirectoryScanner DirectoryScanners} can be configured to log a - * {@link ResultRecord} whenever they take action upon a file that - * matches their set of matching criteria. - * The ResultLogManagerMXBean is responsible for storing these - * results in its result logs. - *

                The ResultLogManagerMXBean can be configured to log - * these records to a flat file, or into a log held in memory, or both. - * Both logs (file and memory) can be configured with a maximum capacity. - *
                When the maximum capacity of the memory log is reached - its first - * entry (i.e. its eldest entry) is removed to make place for the latest. - *
                When the maximum capacity of the file log is reached, the file is - * renamed by appending a tilde '~' to its name and a new result log is created. - * - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public class ResultLogManager extends NotificationBroadcasterSupport - implements ResultLogManagerMXBean, MBeanRegistration { - - /** - * The default singleton name of the {@link ResultLogManagerMXBean}. - **/ - public static final ObjectName RESULT_LOG_MANAGER_NAME = - ScanManager.makeSingletonName(ResultLogManagerMXBean.class); - - /** - * A logger for this class. - **/ - private static final Logger LOG = - Logger.getLogger(ResultLogManager.class.getName()); - - // The memory log - // - private final List memoryLog; - - // Whether the memory log capacity was reached. In that case every - // new entry triggers the deletion of the eldest one. - // - private volatile boolean memCapacityReached = false; - - // The maximum number of record that the memory log can - // contain. - // - private volatile int memCapacity; - - // The maximum number of record that the ResultLogManager can - // log in the log file before creating a new file. - // - private volatile long fileCapacity; - - // The current log file. - // - private volatile File logFile; - - // The OutputStream of the current log file. - // - private volatile OutputStream logStream = null; - - // number of record that this object has logged in the log file - // since the log file was created. Creating a new file or clearing - // the log file reset this value to '0' - // - private volatile long logCount = 0; - - // The ResultLogManager config - modified whenever - // ScanManager.applyConfiguration is called. - // - private volatile ResultLogConfig config; - - /** - * Create a new ResultLogManagerMXBean. This constructor is package - * protected: only the {@link ScanManager} can create a - * ResultLogManager. - **/ - ResultLogManager() { - // Instantiate the memory log - override the add() method so that - // it removes the head of the list when the maximum capacity is - // reached. Note that add() is the only method we will be calling, - // otherwise we would have to override all the other flavors - // of adding methods. Note also that this implies that the memoryLog - // will *always* remain encapsulated in this object and is *never* - // handed over (otherwise we wouldn't be able to ensure that - // add() is the only method ever called to add a record). - // - memoryLog = - Collections.synchronizedList(new LinkedList() { - public synchronized boolean add(ResultRecord e) { - final int max = getMemoryLogCapacity(); - while (max > 0 && size() >= max) { - memCapacityReached = true; - removeFirst(); - } - return super.add(e); - } - }); - - // default memory capacity - memCapacity = 2048; - - // default file capacity: 0 means infinite ;-) - fileCapacity = 0; - - // by default logging to file is disabled. - logFile = null; - - // Until the ScanManager apply a new configuration, we're going to - // work with a default ResultLogConfig object. - config = new ResultLogConfig(); - config.setMemoryMaxRecords(memCapacity); - config.setLogFileName(getLogFileName(false)); - config.setLogFileMaxRecords(fileCapacity); - } - - - /** - * Allows the MBean to perform any operations it needs before being - * registered in the MBean server. - *

                If the name of the MBean is not - * specified, the MBean can provide a name for its registration. If - * any exception is raised, the MBean will not be registered in the - * MBean server.

                - *

                The {@code ResultLogManager} uses this method to supply its own - * default singleton ObjectName (if name parameter is null). - * @param server The MBean server in which the MBean will be registered. - * @param name The object name of the MBean. This name is null if the - * name parameter to one of the createMBean or registerMBean methods in - * the MBeanServer interface is null. In that case, this method must - * return a non-null ObjectName for the new MBean. - * @return The name under which the MBean is to be registered. This value - * must not be null. If the name parameter is not null, it will usually - * but not necessarily be the returned value. - * @throws Exception This exception will be caught by the MBean server and - * re-thrown as an MBeanRegistrationException. - */ - public ObjectName preRegister(MBeanServer server, ObjectName name) - throws Exception { - if (name == null) - name = RESULT_LOG_MANAGER_NAME; - objectName = name; - mbeanServer = server; - return name; - } - - /** - * Allows the MBean to perform any operations needed after having - * been registered in the MBean server or after the registration has - * failed. - *

                This implementation does nothing.

                - * @param registrationDone Indicates whether or not the MBean has been - * successfully registered in the MBean server. The value false means - * that the registration has failed. - */ - public void postRegister(Boolean registrationDone) { - // Don't need to do anything here. - } - - /** - * Allows the MBean to perform any operations it needs before being - * unregistered by the MBean server. - *

                This implementation does nothing.

                - * @throws Exception This exception will be caught by the MBean server and - * re-thrown as an MBeanRegistrationException. - */ - public void preDeregister() throws Exception { - // Don't need to do anything here. - } - - /** - * Allows the MBean to perform any operations needed after having been - * unregistered in the MBean server. - *

                Closes the log file stream, if it is still open.

                - */ - public void postDeregister() { - try { - if (logStream != null) { - synchronized(this) { - logStream.flush(); - logStream.close(); - logFile = null; - logStream = null; - } - } - } catch (Exception x) { - LOG.finest("Failed to close log properly: "+x); - } - } - - /** - * Create a new empty log file from the given basename, renaming - * previously existing file by appending '~' to its name. - **/ - private File createNewLogFile(String basename) throws IOException { - return XmlConfigUtils.createNewXmlFile(basename); - } - - /** - * Check whether a new log file should be created. - * If a new file needs to be created, creates it, renaming - * previously existing file by appending '~' to its name. - * Also reset the log count and file capacity. - * Sends a notification indicating that the log file was changed. - * Returns the new log stream; - * Creation of a new file can be forced by passing force=true. - **/ - private OutputStream checkLogFile(String basename, long maxRecords, - boolean force) - throws IOException { - final OutputStream newStream; - synchronized(this) { - if ((force==false) && (logCount < maxRecords)) - return logStream; - final OutputStream oldStream = logStream; - - // First close the stream. On some platforms you cannot rename - // a file that has open streams... - // - if (oldStream != null) { - oldStream.flush(); - oldStream.close(); - } - final File newFile = (basename==null)?null:createNewLogFile(basename); - - newStream = (newFile==null)?null:new FileOutputStream(newFile,true); - logStream = newStream; - logFile = newFile; - fileCapacity = maxRecords; - logCount = 0; - } - sendNotification(new Notification(LOG_FILE_CHANGED,objectName, - getNextSeqNumber(), - basename)); - return newStream; - } - - // see ResultLogManagerMXBean - public void log(ResultRecord record) - throws IOException { - if (memCapacity > 0) logToMemory(record); - if (logFile != null) logToFile(record); - } - - // see ResultLogManagerMXBean - public ResultRecord[] getMemoryLog() { - return memoryLog.toArray(new ResultRecord[0]); - } - - // see ResultLogManagerMXBean - public int getMemoryLogCapacity() { - return memCapacity; - } - - // see ResultLogManagerMXBean - public void setMemoryLogCapacity(int maxRecords) { - synchronized(this) { - memCapacity = maxRecords; - if (memoryLog.size() < memCapacity) - memCapacityReached = false; - config.setMemoryMaxRecords(maxRecords); - } - } - - // see ResultLogManagerMXBean - public void setLogFileCapacity(long maxRecords) - throws IOException { - synchronized (this) { - fileCapacity = maxRecords; - config.setLogFileMaxRecords(maxRecords); - } - checkLogFile(getLogFileName(),fileCapacity,false); - } - - // see ResultLogManagerMXBean - public long getLogFileCapacity() { - return fileCapacity; - } - - // see ResultLogManagerMXBean - public long getLoggedCount() { - return logCount; - } - - // see ResultLogManagerMXBean - public void newLogFile(String logname, long maxRecord) - throws IOException { - checkLogFile(logname,maxRecord,true); - config.setLogFileName(getLogFileName(false)); - config.setLogFileMaxRecords(getLogFileCapacity()); - } - - // see ResultLogManagerMXBean - public String getLogFileName() { - return getLogFileName(true); - } - - // see ResultLogManagerMXBean - public void clearLogs() throws IOException { - clearMemoryLog(); - clearLogFile(); - } - - // Clear the memory log, sends a notification indicating that - // the memory log was cleared. - // - private void clearMemoryLog()throws IOException { - synchronized(this) { - memoryLog.clear(); - memCapacityReached = false; - } - sendNotification(new Notification(MEMORY_LOG_CLEARED, - objectName, - getNextSeqNumber(),"memory log cleared")); - } - - // Clears the log file. - // - private void clearLogFile() throws IOException { - // simply force the creation of a new log file. - checkLogFile(getLogFileName(),fileCapacity,true); - } - - // Log a record to the memory log. Send a notification if the - // maximum capacity of the memory log is reached. - // - private void logToMemory(ResultRecord record) { - - final boolean before = memCapacityReached; - final boolean after; - synchronized(this) { - memoryLog.add(record); - after = memCapacityReached; - } - if (before==false && after==true) - sendNotification(new Notification(MEMORY_LOG_MAX_CAPACITY, - objectName, - getNextSeqNumber(),"memory log capacity reached")); - } - - - // Log a record to the memory log. Send a notification if the - // maximum capacity of the memory log is reached. - // - private void logToFile(ResultRecord record) throws IOException { - final String basename; - final long maxRecords; - synchronized (this) { - if (logFile == null) return; - basename = getLogFileName(false); - maxRecords = fileCapacity; - } - - // Get the stream into which we should log. - final OutputStream stream = - checkLogFile(basename,maxRecords,false); - - // logging to file now disabled - too bad. - if (stream == null) return; - - synchronized (this) { - try { - XmlConfigUtils.write(record,stream,true); - stream.flush(); - // don't increment logCount if we were not logging in logStream. - if (stream == logStream) logCount++; - } catch (JAXBException x) { - final IllegalArgumentException iae = - new IllegalArgumentException("bad record",x); - LOG.finest("Failed to log record: "+x); - throw iae; - } - } - } - - /** - * The notification type which indicates that the log file was switched: - * com.sun.jmx.examples.scandir.log.file.switched. - * The message contains the name of the new file (or null if log to file - * is now disabled). - **/ - public final static String LOG_FILE_CHANGED = - "com.sun.jmx.examples.scandir.log.file.switched"; - - /** - * The notification type which indicates that the memory log capacity has - * been reached: - * com.sun.jmx.examples.scandir.log.memory.full. - **/ - public final static String MEMORY_LOG_MAX_CAPACITY = - "com.sun.jmx.examples.scandir.log.memory.full"; - - /** - * The notification type which indicates that the memory log was - * cleared: - * com.sun.jmx.examples.scandir.log.memory.cleared. - **/ - public final static String MEMORY_LOG_CLEARED = - "com.sun.jmx.examples.scandir.log.memory.cleared"; - - /** - * This MBean emits three kind of notifications: - *
                -     *    com.sun.jmx.examples.scandir.log.file.switched
                -     *    com.sun.jmx.examples.scandir.log.memory.full
                -     *    com.sun.jmx.examples.scandir.log.memory.cleared
                -     * 
                - **/ - public MBeanNotificationInfo[] getNotificationInfo() { - return new MBeanNotificationInfo[] { - new MBeanNotificationInfo(new String[] { - LOG_FILE_CHANGED}, - Notification.class.getName(), - "Emitted when the log file is switched") - , - new MBeanNotificationInfo(new String[] { - MEMORY_LOG_MAX_CAPACITY}, - Notification.class.getName(), - "Emitted when the memory log capacity is reached") - , - new MBeanNotificationInfo(new String[] { - MEMORY_LOG_CLEARED}, - Notification.class.getName(), - "Emitted when the memory log is cleared") - }; - } - - // Return the name of the log file, or null if logging to file is - // disabled. - private String getLogFileName(boolean absolute) { - synchronized (this) { - if (logFile == null) return null; - if (absolute) return logFile.getAbsolutePath(); - return logFile.getPath(); - } - } - - // This method is be called by the ScanManagerMXBean when a configuration - // is applied. - // - void setConfig(ResultLogConfig logConfigBean) throws IOException { - if (logConfigBean == null) - throw new IllegalArgumentException("logConfigBean is null"); - synchronized (this) { - config = logConfigBean; - setMemoryLogCapacity(config.getMemoryMaxRecords()); - } - final String filename = config.getLogFileName(); - final String logname = getLogFileName(false); - if ((filename != null && !filename.equals(logname)) - || (filename == null && logname != null)) { - newLogFile(config.getLogFileName(), - config.getLogFileMaxRecords()); - } else { - setLogFileCapacity(config.getLogFileMaxRecords()); - } - } - - // This method is called by the ScanManagerMXBean when - // applyCurrentResultLogConfig() is called. - // - ResultLogConfig getConfig() { - return config; - } - - - // Set by preRegister(). - private MBeanServer mbeanServer; - private ObjectName objectName; - - - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ResultLogManagerMXBean.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ResultLogManagerMXBean.java deleted file mode 100644 index eb1f0f6a4f1..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ResultLogManagerMXBean.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import com.sun.jmx.examples.scandir.config.ResultRecord; -import java.io.IOException; -import javax.management.InstanceNotFoundException; - -/** - * The ResultLogManagerMXBean is in charge of managing result logs. - * {@link DirectoryScanner DirectoryScanners} can be configured to log a - * {@link ResultRecord} whenever they take action upon a file that - * matches their set of matching criteria. - * The ResultLogManagerMXBean is responsible for storing these - * results in its result logs. - *

                The ResultLogManagerMXBean - * will let you interactively clear these result logs, change their - * capacity, and decide where (memory or file or both) the - * {@link ResultRecord ResultRecords} should be stored. - *

                The memory log is useful in so far that its content can be interactively - * returned by the ResultLogManagerMXBean. - * The file log doesn't have this facility. - *

                The result logs are intended to be used by e.g. an offline program that - * would take some actions on the files that were matched by the scanners - * criteria: - *

                The scandir application could be configured to only produce logs - * (i.e. takes no action but logging the matching files), and the real - * action (e.g. mail the result log to the engineer which maintains the lab, - * or parse the log and prepare and send a single mail to the matching - * files owners, containing the list of file he/she should consider deleting) - * could be performed by such another program/module. - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public interface ResultLogManagerMXBean { - - /** - * Creates a new log file in which to store results. - *

                When this method is called, the {@link ResultLogManager} will stop - * logging in its current log file and use the new specified file instead. - * If that file already exists, it will be renamed by appending a '~' to - * its name, and a new empty file with the name specified by - * basename will be created. - *

                - *

                Calling this method has no side effect on the {@link - * com.sun.jmx.examples.scandir.config.ScanManagerConfig#getInitialResultLogConfig - * InitialResultLogConfig} held in the {@link ScanDirConfigMXBean} - * configuration. To apply these new values to the - * {@link ScanDirConfigMXBean} - * configuration, you must call {@link - * ScanManagerMXBean#applyCurrentResultLogConfig - * ScanManagerMXBean.applyCurrentResultLogConfig}. - *

                - * @param basename The name of the new log file. This will be the - * new name returned by {@link #getLogFileName}. - * @param maxRecord maximum number of records to log in the specified file - * before creating a new file. maxRecord will be the - * new value returned by {@link #getLogFileCapacity}. - * When that maximum number of - * records is reached the {@link ResultLogManager} will rename - * the file by appending a '~' to its name, and a new empty - * log file will be created. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void newLogFile(String basename, long maxRecord) - throws IOException, InstanceNotFoundException; - - /** - * Logs a result record to the active result logs (memory,file,both,or none) - * depending on how this MBean is currently configured. - * @see #getLogFileName() - * @see #getMemoryLogCapacity() - * @param record The result record to log. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - */ - public void log(ResultRecord record) - throws IOException, InstanceNotFoundException; - - /** - * Gets the name of the current result log file. - *

                null means that no log file is configured: logging - * to file is disabled. - *

                - * @return The name of the current result log file, or null - * if logging to file is disabled. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public String getLogFileName() - throws IOException, InstanceNotFoundException; - - /** - * Gets the whole content of the memory log. This cannot exceed - * {@link #getMemoryLogCapacity} records. - * - * @return the whole content of the memory log. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public ResultRecord[] getMemoryLog() - throws IOException, InstanceNotFoundException; - - /** - * Gets the maximum number of records that can be logged in the - * memory log. - *

                - * A non positive value - 0 or negative - means that - * logging in memory is disabled. - *

                - *

                The memory log is a FIFO: when its maximum capacity is reached, its - * head element is removed to make place for a new element at its tail. - *

                - * @return The maximum number of records that can be logged in the - * memory log. A value {@code <= 0} means that logging in memory is - * disabled. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public int getMemoryLogCapacity() - throws IOException, InstanceNotFoundException; - - /** - * Sets the maximum number of records that can be logged in the - * memory log. - *

                The memory log is a FIFO: when its maximum capacity is reached, its - * head element is removed to make place for a new element at its tail. - *

                - * @param size The maximum number of result records that can be logged in the memory log.

                - * A non positive value - 0 or negative - means that - * logging in memory is disabled. It will also have the side - * effect of clearing the memory log. - *

                - * - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - */ - public void setMemoryLogCapacity(int size) - throws IOException, InstanceNotFoundException; - - /** - * Sets the maximum number of records that can be logged in the result log - * file. - *

                When that maximum number of - * records is reached the {@link ResultLogManager} will rename - * the result log file by appending a '~' to its name, and a new empty - * log file will be created. - *

                - *

                If logging to file is disabled calling this method - * is irrelevant. - *

                - * @param maxRecord maximum number of records to log in the result log file. - * @see #getLogFileName() - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void setLogFileCapacity(long maxRecord) - throws IOException, InstanceNotFoundException; - - /** - * Gets the maximum number of records that can be logged in the result log - * file. - *

                When that maximum number of - * records is reached the {@link ResultLogManager} will rename - * the result log file by appending a '~' to its name, and a new empty - * log file will be created. - *

                - * @see #getLogFileName() - * @return The maximum number of records that can be logged in the result - * log file. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public long getLogFileCapacity() - throws IOException, InstanceNotFoundException; - - /** - * Gets The number of records that have been logged in the - * current result log file. This will always be less than - * {@link #getLogFileCapacity()}. - * @return The number of records in the - * current result log file. - * - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public long getLoggedCount() - throws IOException, InstanceNotFoundException; - - /** - * Clears the memory log and result log file. - * - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void clearLogs() - throws IOException, InstanceNotFoundException; -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirAgent.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirAgent.java deleted file mode 100644 index f4bf1b6c803..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirAgent.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState; -import java.io.IOException; -import java.lang.management.ManagementFactory; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import javax.management.JMException; -import javax.management.Notification; -import javax.management.NotificationEmitter; -import javax.management.NotificationListener; - -/** - *

                - * The ScanDirAgent is the Agent class for the scandir - * application. - * This class contains the {@link #main} method to start a standalone - * scandir application. - *

                - *

                - * The {@link #main main()} method simply registers a {@link - * ScanManagerMXBean} in the platform MBeanServer - see {@link #init init}, - * and then waits for someone to call {@link ScanManagerMXBean#close close} - * on that MBean. - *

                - *

                - * When the {@link ScanManagerMXBean} state is switched to {@link - * ScanManagerMXBean.ScanState#CLOSED CLOSED}, {@link #cleanup cleanup} is - * called, the {@link ScanManagerMXBean} is unregistered, and the application - * terminates (i.e. the main thread completes). - *

                - * @author Sun Microsystems, 2006 - All rights reserved. - **/ -public class ScanDirAgent { - - /** - * A logger for this class. - **/ - private static final Logger LOG = - Logger.getLogger(ScanDirAgent.class.getName()); - - // Proxy to the ScanManagerMXBean - created by init(); - // - private volatile ScanManagerMXBean proxy = null; - - // A queue to put received Notifications. - // - private final BlockingQueue queue; - - // A listener that will put notifications into the queue. - // - private final NotificationListener listener; - - /** - * Creates a new instance of ScanDirAgent - * You will need to call {@link #init()} later on in order to initialize - * the application. - * @see #main - **/ - public ScanDirAgent() { - // Initialize the notification queue - queue = new LinkedBlockingQueue(); - - // Creates the listener. - listener = new NotificationListener() { - public void handleNotification(Notification notification, - Object handback) { - try { - // Just put the received notification in the queue. - // It will be consumed later on by 'waitForClose()' - // - LOG.finer("Queuing received notification "+notification); - queue.put(notification); - } catch (InterruptedException ex) { - // OK - } - } - }; - } - - /** - * Initialize the application by registering a ScanManagerMXBean in - * the platform MBeanServer - * @throws java.io.IOException Registration failed for communication-related reasons. - * @throws javax.management.JMException Registration failed for JMX-related reasons. - */ - public void init() throws IOException, JMException { - - // Registers the ScanManagerMXBean singleton in the - // platform MBeanServer - // - proxy = ScanManager.register(); - - // Registers a NotificationListener with the ScanManagerMXBean in - // order to receive state changed notifications. - // - ((NotificationEmitter)proxy).addNotificationListener(listener,null,null); - } - - /** - * Cleanup after close: unregister the ScanManagerMXBean singleton. - * @throws java.io.IOException Cleanup failed for communication-related reasons. - * @throws javax.management.JMException Cleanup failed for JMX-related reasons. - */ - public void cleanup() throws IOException, JMException { - try { - ((NotificationEmitter)proxy). - removeNotificationListener(listener,null,null); - } finally { - ManagementFactory.getPlatformMBeanServer(). - unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } - } - - /** - * Wait for someone to call 'close()' on the ScanManagerMXBean singleton. - * Every time its state changes, the ScanManagerMXBean emits a notification. - * We don't rely on the notification content (if we were using a remote - * connection, we could miss some notifications) - we simply use the - * state change notifications to react more quickly to state changes. - * We do so simply by polling the {@link BlockingQueue} in which our - * listener is pushing notifications, and checking the ScanManagerMXBean - * state every time that a notification is received. - *

                - * We can do so because we know that once the ScanManagerMXBean state is - * switched to 'CLOSED', it will remain 'CLOSED' whatsoever.
                - * Therefore we don't need to concern ourselves with the possibility of - * missing the window in which the ScanManagerMXBean state's will be - * CLOSED, because that particular window stays opened forever. - *

                - * Had we wanted to wait for 'RUNNING', we would have needed to apply - * a different strategy - e.g. by taking into account the actual content - * of the state changed notifications we received. - * @throws java.io.IOException wait failed - a communication problem occurred. - * @throws javax.management.JMException wait failed - the MBeanServer threw an exception. - */ - public void waitForClose() throws IOException, JMException { - - // Wait until state is closed - while(proxy.getState() != ScanState.CLOSED ) { - try { - // Wake up at least every 30 seconds - if we missed a - // notification - we will at least get a chance to - // call getState(). 30 seconds is obviously quite - // arbitrary - if this were a real daemon - id'be tempted - // to wait 30 minutes - knowing that any incoming - // notification will wake me up anyway. - // Note: we simply use the state change notifications to - // react more quickly to state changes: see javadoc above. - // - queue.poll(30,TimeUnit.SECONDS); - } catch (InterruptedException ex) { - // OK - } - } - } - - /** - * The agent's main: {@link #init registers} a {@link ScanManagerMXBean}, - * {@link #waitForClose waits} until its state is {@link - * ScanManagerMXBean.ScanState#CLOSED CLOSED}, {@link #cleanup cleanup} - * and exits. - * @param args the command line arguments - ignored - * @throws java.io.IOException A communication problem occurred. - * @throws javax.management.JMException A JMX problem occurred. - */ - public static void main(String[] args) - throws IOException, JMException { - System.out.println("Initializing ScanManager..."); - final ScanDirAgent agent = new ScanDirAgent(); - agent.init(); - try { - System.out.println("Waiting for ScanManager to close..."); - agent.waitForClose(); - } finally { - System.out.println("Cleaning up..."); - agent.cleanup(); - } - } -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirClient.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirClient.java deleted file mode 100644 index 442a607f1cb..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirClient.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.HashMap; -import java.util.Map; -import javax.management.MBeanServerConnection; -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXConnectorFactory; -import javax.management.remote.JMXServiceURL; -import javax.rmi.ssl.SslRMIClientSocketFactory; - -/** - * The ScanDirClient class is a very simple programmatic client example - * which is able to connect to a secured JMX scandir application. - *

                The program initialize the connection environment map with the - * appropriate properties and credentials, and then connects to the - * secure JMX scandir daemon.

                - *

                It gets the application's current configuration and prints it on - * its System.out.

                - *

                The {@link #main main} method takes two arguments: the host on which - * the server is running (localhost), and the port number - * that was configured to start the server RMI Connector (4545). - *

                - * @author Sun Microsystems, 2006 - All rights reserved. - **/ -public class ScanDirClient { - - // This class has only a main. - private ScanDirClient() { } - - /** - * The usage string for the ScanDirClient. - */ - public static final String USAGE = ScanDirClient.class.getSimpleName() + - " "; - - /** - * Connects to a secured JMX scandir application. - * @param args The {@code main} method takes two parameters: - *
                  - *
                • args[0] must be the server's host
                • - *
                • args[1] must be the rmi port number at which the - * JMX scandir daemon is listening for connections - * - that is, the port number of its JMX RMI Connector which - * was configured in {@code management.properties} - *
                • - *
                    - **/ - public static void main(String[] args) { - try { - // Check args - // - if (args==null || args.length!=2) { - System.err.println("Bad number of arguments: usage is: \n\t" + - USAGE); - System.exit(1); - } - try { - InetAddress.getByName(args[0]); - } catch (UnknownHostException x) { - System.err.println("No such host: " + args[0]+ - "\n usage is: \n\t" + USAGE); - System.exit(2); - } catch (Exception x) { - System.err.println("Bad address: " + args[0]+ - "\n usage is: \n\t" + USAGE); - System.exit(2); - } - try { - if (Integer.parseInt(args[1]) <= 0) { - System.err.println("Bad port value: " + args[1]+ - "\n usage is: \n\t" + USAGE); - System.exit(2); - } - } catch (Exception x) { - System.err.println("Bad argument: " + args[1]+ - "\n usage is: \n\t" + USAGE); - System.exit(2); - } - - // Create an environment map to hold connection properties - // like credentials etc... We will later pass this map - // to the JMX Connector. - // - System.out.println("\nInitialize the environment map"); - final Map env = new HashMap(); - - // Provide the credentials required by the server - // to successfully perform user authentication - // - final String[] credentials = new String[] { "guest" , "guestpasswd" }; - env.put("jmx.remote.credentials", credentials); - - // Provide the SSL/TLS-based RMI Client Socket Factory required - // by the JNDI/RMI Registry Service Provider to communicate with - // the SSL/TLS-protected RMI Registry - // - env.put("com.sun.jndi.rmi.factory.socket", - new SslRMIClientSocketFactory()); - - // Create the RMI connector client and - // connect it to the RMI connector server - // args[0] is the server's host - localhost - // args[1] is the secure server port - 4545 - // - System.out.println("\nCreate the RMI connector client and " + - "connect it to the RMI connector server"); - final JMXServiceURL url = new JMXServiceURL( - "service:jmx:rmi:///jndi/rmi://"+args[0]+":"+args[1] + - "/jmxrmi"); - - System.out.println("Connecting to: "+url); - final JMXConnector jmxc = JMXConnectorFactory.connect(url, env); - - // Get an MBeanServerConnection - // - System.out.println("\nGet the MBeanServerConnection"); - final MBeanServerConnection mbsc = jmxc.getMBeanServerConnection(); - - // Create a proxy for the ScanManager MXBean - // - final ScanManagerMXBean proxy = - ScanManager.newSingletonProxy(mbsc); - - // Get the ScanDirConfig MXBean from the scan manager - // - System.out.println( - "\nGet ScanDirConfigMXBean from ScanManagerMXBean"); - final ScanDirConfigMXBean configMBean = - proxy.getConfigurationMBean(); - - // Print the scan dir configuration - // - System.out.println( - "\nGet 'Configuration' attribute on ScanDirConfigMXBean"); - System.out.println("\nConfiguration:\n" + - configMBean.getConfiguration()); - - // Try to invoke the "close" method on the ScanManager MXBean. - // - // Should get a SecurityException as the user "guest" doesn't - // have readwrite access. - // - System.out.println("\nInvoke 'close' on ScanManagerMXBean"); - try { - proxy.close(); - } catch (SecurityException e) { - System.out.println("\nGot expected security exception: " + e); - } - - // Close MBeanServer connection - // - System.out.println("\nClose the connection to the server"); - jmxc.close(); - System.out.println("\nBye! Bye!"); - } catch (Exception e) { - System.out.println("\nGot unexpected exception: " + e); - e.printStackTrace(); - System.exit(3); - } - } -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirConfig.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirConfig.java deleted file mode 100644 index 7ecd8a1ffde..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirConfig.java +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import static com.sun.jmx.examples.scandir.ScanManager.getNextSeqNumber; -import static com.sun.jmx.examples.scandir.ScanDirConfigMXBean.SaveState.*; -import com.sun.jmx.examples.scandir.config.XmlConfigUtils; -import com.sun.jmx.examples.scandir.config.DirectoryScannerConfig; -import com.sun.jmx.examples.scandir.config.FileMatch; -import com.sun.jmx.examples.scandir.config.ScanManagerConfig; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Date; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.management.*; -import javax.xml.bind.JAXBException; - -/** - *

                    The ScanDirConfig MBean is in charge of the - * scandir application configuration. - *

                    - *

                    The ScanDirConfig MBean is able to - * load and save the scandir application configuration to and from an - * XML file. - *

                    - *

                    - * It will let you also interactively modify that configuration, which you - * can later save to the file, by calling {@link #save}, or discard, by - * reloading the file without saving - see {@link #load}. - *

                    - *

                    - * There can be as many ScanDirConfigMXBean registered - * in the MBeanServer as you like, but only one of them will be identified as - * the current configuration of the {@link ScanManagerMXBean}. - * You can switch to another configuration by calling {@link - * ScanManagerMXBean#setConfigurationMBean - * ScanManagerMXBean.setConfigurationMBean}. - *

                    - *

                    - * Once the current configuration has been loaded (by calling {@link #load}) - * or modified (by calling one of {@link #addDirectoryScanner - * addDirectoryScanner}, {@link #removeDirectoryScanner removeDirectoryScanner} - * or {@link #setConfiguration setConfiguration}) it can be pushed - * to the {@link ScanManagerMXBean} by calling {@link - * ScanManagerMXBean#applyConfiguration - * ScanManagerMXBean.applyConfiguration(true)} - - * true means that we apply the configuration from memory, - * without first reloading the file. - *

                    - *

                    - * The ScanDirConfig uses the XML annotated Java Beans defined - * in the {@link com.sun.jmx.examples.scandir.config} package. - *

                    - *

                    - * Note: The ScanDirConfig should probably use - * {@code java.nio.channels.FileLock} and lock its configuration file so that - * two ScanDirConfig object do not share the same file, but it - * doesn't. Feel free to improve the application in that way. - *

                    - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public class ScanDirConfig extends NotificationBroadcasterSupport - implements ScanDirConfigMXBean, MBeanRegistration { - - /** - * A logger for this class. - **/ - private static final Logger LOG = - Logger.getLogger(ScanDirConfig.class.getName()); - - // We will emit a notification when the save state of this object - // chenges. We use directly the base notification class, with a - // notification type that indicates the new state at which the - // object has arrived. - // - // All these notification types will have the same prefix, which is - // 'com.sun.jmx.examples.scandir.config'. - // - private final static String NOTIFICATION_PREFIX = - ScanManagerConfig.class.getPackage().getName(); - - /** - * The com.sun.jmx.examples.scandir.config.saved notification - * indicates that the configuration data was saved. - **/ - public final static String NOTIFICATION_SAVED = - NOTIFICATION_PREFIX+".saved"; - /** - * The com.sun.jmx.examples.scandir.config.loaded notification - * indicates that the configuration data was loaded. - **/ - public final static String NOTIFICATION_LOADED = - NOTIFICATION_PREFIX+".loaded"; - - /** - * The com.sun.jmx.examples.scandir.config.modified notification - * indicates that the configuration data was modified. - **/ - public final static String NOTIFICATION_MODIFIED = - NOTIFICATION_PREFIX+".modified"; - - // The array of MBeanNotificationInfo that will be exposed in the - // ScanDirConfigMXBean MBeanInfo. - // We will pass this array to the NotificationBroadcasterSupport - // constructor. - // - private static MBeanNotificationInfo[] NOTIFICATION_INFO = { - new MBeanNotificationInfo( - new String[] {NOTIFICATION_SAVED}, - Notification.class.getName(), - "Emitted when the configuration is saved"), - new MBeanNotificationInfo( - new String[] {NOTIFICATION_LOADED}, - Notification.class.getName(), - "Emitted when the configuration is loaded"), - new MBeanNotificationInfo( - new String[] {NOTIFICATION_MODIFIED}, - Notification.class.getName(), - "Emitted when the configuration is modified"), - }; - - // The ScanDirConfigMXBean configuration data. - private volatile ScanManagerConfig config; - - // The name of the configuration file - private String filename = null; - - // The name of this configuration. This is usually both equal to - // config.getName() and objectName.getKeyProperty(name). - private volatile String configname = null; - - // This object save state. CREATED is the initial state. - // - private volatile SaveState status = CREATED; - - /** - * Creates a new {@link ScanDirConfigMXBean}. - *

                    {@code ScanDirConfigMXBean} can be created by the {@link - * ScanManagerMXBean}, or directly by a remote client, using - * {@code createMBean} or {@code registerMBean}. - *

                    - *

                    {@code ScanDirConfigMXBean} created by the {@link - * ScanManagerMXBean} will be unregistered by the - * {@code ScanManagerMXBean}. {@code ScanDirConfigMXBean} created - * directly by a remote client will not be unregistered by the - * {@code ScanManagerMXBean} - this will remain to the responsibility of - * the code/client that created them. - *

                    - *

                    This object is created empty, you should call load() if you want it - * to load its data from the configuration file. - *

                    - * @param filename The configuration file used by this MBean. - * Can be null (in which case load() and save() will fail). - * Can point to a file that does not exists yet (in which case - * load() will fail if called before save(), and save() will - * attempt to create that file). Can point to an existing file, - * in which case load() will load that file and save() will save - * to that file. - * - **/ - public ScanDirConfig(String filename) { - this(filename,null); - } - - /** - * Create a new ScanDirConfig MBean with an initial configuration. - * @param filename The name of the configuration file. - * @param initialConfig an initial configuration. - **/ - public ScanDirConfig(String filename, ScanManagerConfig initialConfig) { - super(NOTIFICATION_INFO); - this.filename = filename; - this.config = initialConfig; - } - - - // see ScanDirConfigMXBean - public void load() throws IOException { - if (filename == null) - throw new UnsupportedOperationException("load"); - - synchronized(this) { - config = new XmlConfigUtils(filename).readFromFile(); - if (configname != null) config = config.copy(configname); - else configname = config.getName(); - - status=LOADED; - } - sendNotification(NOTIFICATION_LOADED); - } - - // see ScanDirConfigMXBean - public void save() throws IOException { - if (filename == null) - throw new UnsupportedOperationException("load"); - synchronized (this) { - new XmlConfigUtils(filename).writeToFile(config); - status = SAVED; - } - sendNotification(NOTIFICATION_SAVED); - } - - // see ScanDirConfigMXBean - public ScanManagerConfig getConfiguration() { - synchronized (this) { - return XmlConfigUtils.xmlClone(config); - } - } - - - // sends a notification indicating the new save state. - private void sendNotification(String type) { - final Object source = (objectName==null)?this:objectName; - final Notification n = new Notification(type,source, - getNextSeqNumber(), - "The configuration is "+ - type.substring(type.lastIndexOf('.')+1)); - sendNotification(n); - } - - - /** - * Allows the MBean to perform any operations it needs before being - * registered in the MBean server. If the name of the MBean is not - * specified, the MBean can provide a name for its registration. If - * any exception is raised, the MBean will not be registered in the - * MBean server. - * @param server The MBean server in which the MBean will be registered. - * @param name The object name of the MBean. This name is null if the - * name parameter to one of the createMBean or registerMBean methods in - * the MBeanServer interface is null. In that case, this method will - * try to guess its MBean name by examining its configuration data. - * If its configuration data is null (nothing was provided in the - * constructor) or doesn't contain a name, this method returns {@code null}, - * and registration will fail. - *

                    - * Otherwise, if {@code name} wasn't {@code null} or if a default name could - * be constructed, the name of the configuration will be set to - * the value of the ObjectName's {@code name=} key, and the configuration - * data will always be renamed to reflect this change. - *

                    - * - * @return The name under which the MBean is to be registered. - * @throws Exception This exception will be caught by the MBean server and - * re-thrown as an MBeanRegistrationException. - */ - public ObjectName preRegister(MBeanServer server, ObjectName name) - throws Exception { - if (name == null) { - if (config == null) return null; - if (config.getName() == null) return null; - name = ScanManager. - makeMBeanName(ScanDirConfigMXBean.class,config.getName()); - } - objectName = name; - mbeanServer = server; - synchronized (this) { - configname = name.getKeyProperty("name"); - if (config == null) config = new ScanManagerConfig(configname); - else config = config.copy(configname); - } - return name; - } - - /** - * Allows the MBean to perform any operations needed after having - * been registered in the MBean server or after the registration has - * failed. - *

                    This implementation does nothing

                    - * @param registrationDone Indicates whether or not the MBean has been - * successfully registered in the MBean server. The value false means - * that the registration has failed. - */ - public void postRegister(Boolean registrationDone) { - // Nothing to do here. - } - - /** - * Allows the MBean to perform any operations it needs before being - * unregistered by the MBean server. - *

                    This implementation does nothing

                    - * @throws Exception This exception will be caught by the MBean server and - * re-thrown as an MBeanRegistrationException. - */ - public void preDeregister() throws Exception { - // Nothing to do here. - } - - /** - * Allows the MBean to perform any operations needed after having been - * unregistered in the MBean server. - *

                    This implementation does nothing

                    - */ - public void postDeregister() { - // Nothing to do here. - } - - // see ScanDirConfigMXBean - public String getConfigFilename() { - return filename; - } - - // see ScanDirConfigMXBean - public void setConfiguration(ScanManagerConfig config) { - synchronized (this) { - if (config == null) { - this.config = null; - return; - } - - if (configname == null) - configname = config.getName(); - - this.config = config.copy(configname); - status = MODIFIED; - } - sendNotification(NOTIFICATION_MODIFIED); - } - - // see ScanDirConfigMXBean - public DirectoryScannerConfig - addDirectoryScanner(String name, String dir, String filePattern, - long sizeExceedsMaxBytes, long sinceLastModified) { - final DirectoryScannerConfig scanner = - new DirectoryScannerConfig(name); - scanner.setRootDirectory(dir); - if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { - final FileMatch filter = new FileMatch(); - filter.setFilePattern(filePattern); - filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); - if (sinceLastModified > 0) - filter.setLastModifiedBefore(new Date(new Date().getTime() - -sinceLastModified)); - scanner.addIncludeFiles(filter); - } - synchronized (this) { - config.putScan(scanner); - status = MODIFIED; - } - LOG.fine("config: "+config); - sendNotification(NOTIFICATION_MODIFIED); - return scanner; - } - - // see ScanDirConfigMXBean - public DirectoryScannerConfig removeDirectoryScanner(String name) - throws IOException, InstanceNotFoundException { - final DirectoryScannerConfig scanner; - synchronized (this) { - scanner = config.removeScan(name); - if (scanner == null) - throw new IllegalArgumentException(name+": scanner not found"); - status = MODIFIED; - } - sendNotification(NOTIFICATION_MODIFIED); - return scanner; - } - - // see ScanDirConfigMXBean - public SaveState getSaveState() { - return status; - } - - // These methods are used by ScanManager to guess a configuration name from - // a configuration filename. - // - static String DEFAULT = "DEFAULT"; - - private static String getBasename(String name) { - final int dot = name.indexOf('.'); - if (dot<0) return name; - if (dot==0) return getBasename(name.substring(1)); - return name.substring(0,dot); - } - - static String guessConfigName(String configFileName,String defaultFile) { - try { - if (configFileName == null) return DEFAULT; - final File f = new File(configFileName); - if (f.canRead()) { - final String confname = XmlConfigUtils.read(f).getName(); - if (confname != null && confname.length()>0) return confname; - } - final File f2 = new File(defaultFile); - if (f.equals(f2)) return DEFAULT; - final String guess = getBasename(f.getName()); - if (guess == null) return DEFAULT; - if (guess.length()==0) return DEFAULT; - return guess; - } catch (Exception x) { - return DEFAULT; - } - } - - // Set by preRegister() - private volatile MBeanServer mbeanServer; - private volatile ObjectName objectName; - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirConfigMXBean.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirConfigMXBean.java deleted file mode 100644 index eb4f375f1ab..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanDirConfigMXBean.java +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import com.sun.jmx.examples.scandir.config.DirectoryScannerConfig; -import com.sun.jmx.examples.scandir.config.ScanManagerConfig; -import java.io.IOException; -import javax.management.InstanceNotFoundException; - -/** - *

                    The ScanDirConfigMXBean is in charge of the - * scandir application configuration. - *

                    - *

                    The ScanDirConfigMXBean is an MBean which is able to - * load and save the scandir application configuration to and from an - * XML file. - *

                    - *

                    - * It will let you also interactively modify that configuration, which you - * can later save to the file, by calling {@link #save}, or discard, by - * reloading the file without saving - see {@link #load}. - *

                    - *

                    - * There can be as many ScanDirConfigMXBean registered - * in the MBeanServer as you like, but only one of them will be identified as - * the current configuration of the {@link ScanManagerMXBean}. - * You can switch to another configuration by calling {@link - * ScanManagerMXBean#setConfigurationMBean - * ScanManagerMXBean.setConfigurationMBean}. - *

                    - *

                    - * Once the current configuration has been loaded (by calling {@link #load}) - * or modified (by calling one of {@link #addDirectoryScanner - * addDirectoryScanner}, {@link #removeDirectoryScanner removeDirectoryScanner} - * or {@link #setConfiguration setConfiguration}) it can be pushed - * to the {@link ScanManagerMXBean} by calling {@link - * ScanManagerMXBean#applyConfiguration - * ScanManagerMXBean.applyConfiguration(true)} - - * true means that we apply the configuration from memory, - * without first reloading the file. - *

                    - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public interface ScanDirConfigMXBean { - /** - * This state tells whether the configuration reflected by the - * {@link ScanDirConfigMXBean} was loaded in memory, saved to the - * configuration file, or modified since last saved. - * Note that this state doesn't tell whether the configuration was - * applied by the {@link ScanManagerMXBean}. - **/ - public enum SaveState { - /** - * Initial state: the {@link ScanDirConfigMXBean} is created, but - * neither {@link #load} or {@link #save} was yet called. - **/ - CREATED, - - /** - * The configuration reflected by the {@link ScanDirConfigMXBean} has - * been loaded, but not modified yet. - **/ - LOADED, - - /** - * The configuration was modified. The modifications are held in memory. - * Call {@link #save} to save them to the file, or {@link #load} to - * reload the file and discard them. - **/ - MODIFIED, - - /** - * The configuration was saved. - **/ - SAVED - }; - - /** - * Loads the configuration from the {@link - * #getConfigFilename configuration file}. - *

                    Any unsaved modification will be lost. The {@link #getSaveState state} - * is switched to {@link SaveState#LOADED LOADED}. - *

                    - *

                    - * This action has no effect on the {@link ScanManagerMXBean} until - * {@link ScanManagerMXBean#getConfigurationMBean ScanManagerMXBean} - * points to this MBean and {@link ScanManagerMXBean#applyConfiguration - * ScanManagerMXBean.applyConfiguration} is called. - *

                    - * @see #getSaveState() - * @throws IOException The configuration couldn't be loaded from the file, - * e.g. because the file doesn't exist or isn't - * readable. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void load() - throws IOException, InstanceNotFoundException; - - /** - * Saves the configuration to the {@link - * #getConfigFilename configuration file}. - * - *

                    If the configuration file doesn't exists, this method will - * attempt to create it. Otherwise, the existing file will - * be renamed by appending a '~' to its name, and a new file - * will be created, in which the configuration will be saved. - * The {@link #getSaveState state} - * is switched to {@link SaveState#SAVED SAVED}. - *

                    - *

                    - * This action has no effect on the {@link ScanManagerMXBean}. - *

                    - * @see #getSaveState() - * - * @throws IOException The configuration couldn't be saved to the file, - * e.g. because the file couldn't be created. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void save() - throws IOException, InstanceNotFoundException; - - /** - * Gets the name of the configuration file. - *

                    If the configuration file doesn't exists, {@link #load} will fail - * and {@link #save} will attempt to create the file. - *

                    - * - * @return The configuration file name for this MBean. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public String getConfigFilename() - throws IOException, InstanceNotFoundException; - - /** - * Gets the current configuration data. - *

                    - * This method returns the configuration data which is currently held - * in memory. - *

                    - *

                    Call {@link #load} to reload the data from the configuration - * file, and {@link #save} to save the data to the configuration - * file. - *

                    - * @see #getSaveState() - * @return The current configuration data in memory. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public ScanManagerConfig getConfiguration() - throws IOException, InstanceNotFoundException; - - /** - * Sets the current configuration data. - *

                    - * This method replaces the configuration data in memory. - * The {@link #getSaveState state} is switched to {@link - * SaveState#MODIFIED MODIFIED}. - *

                    - *

                    Calling {@link #load} will reload the data from the configuration - * file, and all modifications will be lost. - * Calling {@link #save} will save the modified data to the configuration - * file. - *

                    - *

                    - * This action has no effect on the {@link ScanManagerMXBean} until - * {@link ScanManagerMXBean#getConfigurationMBean ScanManagerMXBean} - * points to this MBean and {@link ScanManagerMXBean#applyConfiguration - * ScanManagerMXBean.applyConfiguration} is called. - *

                    - * @param config The new configuration data. - * @see #getSaveState() - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - */ - public void setConfiguration(ScanManagerConfig config) - throws IOException, InstanceNotFoundException; - - /** - * Adds a new directory scanner to the current configuration data. - *

                    - * This method updates the configuration data in memory, adding - * a {@link DirectoryScannerConfig} to the {@link - * ScanManagerConfig#getScanList directory scanner list}. - * The {@link #getSaveState state} is switched to {@link - * SaveState#MODIFIED MODIFIED}. - *

                    - *

                    Calling {@link #load} will reload the data from the configuration - * file, and all modifications will be lost. - * Calling {@link #save} will save the modified data to the configuration - * file. - *

                    - *

                    - * This action has no effect on the {@link ScanManagerMXBean} until - * {@link ScanManagerMXBean#getConfigurationMBean ScanManagerMXBean} - * points to this MBean and {@link ScanManagerMXBean#applyConfiguration - * ScanManagerMXBean.applyConfiguration} is called. - *

                    - * @param name A name for the new directory scanner. This is the value - * that will be later used in the {@link DirectoryScannerMXBean} - * ObjectName for the name= key. - * @param dir The root directory at which this scanner will start scanning. - * @param filePattern A {@link java.util.regex.Pattern regular expression} - * to match against a selected file name. - * @param sizeExceedsMaxBytes Only file whose size exceeds that limit will - * be selected. or a - * negative value means no limit. - * @param sinceLastModified Select files which haven't been modified for - * that number of milliseconds - i.e. - * {@code sinceLastModified=3600000} will exclude files which - * have been modified in the last hour. - * The date of last modification is ignored if 0 or a - * negative value is provided. - * @see #getSaveState() - * @return The added DirectoryScannerConfig. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public DirectoryScannerConfig - addDirectoryScanner(String name, String dir, String filePattern, - long sizeExceedsMaxBytes, long sinceLastModified) - throws IOException, InstanceNotFoundException; - - /** - * Removes a directory scanner from the current configuration data. - *

                    - * This method updates the configuration data in memory, removing - * a {@link DirectoryScannerConfig} from the {@link - * ScanManagerConfig#getScanList directory scanner list}. - * The {@link #getSaveState state} is switched to {@link - * SaveState#MODIFIED MODIFIED}. - *

                    - *

                    Calling {@link #load} will reload the data from the configuration - * file, and all modifications will be lost. - * Calling {@link #save} will save the modified data to the configuration - * file. - *

                    - *

                    - * This action has no effect on the {@link ScanManagerMXBean} until - * {@link ScanManagerMXBean#getConfigurationMBean ScanManagerMXBean} - * points to this MBean and {@link ScanManagerMXBean#applyConfiguration - * ScanManagerMXBean.applyConfiguration} is called. - *

                    - * @param name The name of the new directory scanner. This is the value - * that is used in the {@link DirectoryScannerMXBean} - * ObjectName for the name= key. - * @return The removed DirectoryScannerConfig. - * @throws IllegalArgumentException if there's no directory scanner by - * that name in the current configuration data. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public DirectoryScannerConfig - removeDirectoryScanner(String name) - throws IOException, InstanceNotFoundException; - - /** - * Gets the save state of the current configuration data. - *

                    - * {@link SaveState#CREATED CREATED} means that the configuration data was just - * created. It has not been loaded from the configuration file. - * Calling {@link #load} will load the data from the configuration file. - * Calling {@link #save} will write the empty data to the configuration - * file. - *

                    - *

                    - * {@link SaveState#LOADED LOADED} means that the configuration data - * was loaded from the configuration file. - *

                    - *

                    - * {@link SaveState#MODIFIED MODIFIED} means that the configuration data - * was modified since it was last loaded or saved. - * Calling {@link #load} will reload the data from the configuration file, - * and all modifications will be lost. - * Calling {@link #save} will write the modified data to the configuration - * file. - *

                    - *

                    - * {@link SaveState#SAVED SAVED} means that the configuration data - * was saved to the configuration file. - *

                    - *

                    - * This state doesn't indicate whether this MBean configuration data - * was {@link ScanManagerMXBean#applyConfiguration applied} by the - * {@link ScanManagerMXBean}. - *

                    - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - * @return The save state of the {@code ScanDirConfigMXBean}. - */ - public SaveState getSaveState() - throws IOException, InstanceNotFoundException; - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanManager.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanManager.java deleted file mode 100644 index e34b12ac573..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanManager.java +++ /dev/null @@ -1,1160 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import static com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState.*; -import com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState; -import com.sun.jmx.examples.scandir.config.DirectoryScannerConfig; -import com.sun.jmx.examples.scandir.config.ScanManagerConfig; -import java.io.File; - -import java.io.IOException; -import java.lang.management.ManagementFactory; -import java.util.ArrayList; -import java.util.Collections; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Timer; -import java.util.TimerTask; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.Semaphore; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.management.AttributeChangeNotification; -import javax.management.InstanceNotFoundException; -import javax.management.JMException; -import javax.management.JMX; -import javax.management.ListenerNotFoundException; -import javax.management.MBeanNotificationInfo; -import javax.management.MBeanRegistration; -import javax.management.MBeanServer; -import javax.management.MBeanServerConnection; -import javax.management.MalformedObjectNameException; -import javax.management.Notification; -import javax.management.NotificationBroadcasterSupport; -import javax.management.NotificationEmitter; -import javax.management.NotificationFilter; -import javax.management.NotificationListener; -import javax.management.ObjectInstance; -import javax.management.ObjectName; - -/** - *

                    - * The ScanManager is responsible for applying a configuration, - * starting and scheduling directory scans, and reporting application state. - *

                    - *

                    - * The ScanManager MBean is a singleton MBean which controls - * scan session. The ScanManager name is defined by - * {@link #SCAN_MANAGER_NAME ScanManager.SCAN_MANAGER_NAME}. - *

                    - *

                    - * The ScanManager MBean is the entry point of the scandir - * application management interface. It is from this MBean that all other MBeans - * will be created and registered. - *

                    - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public class ScanManager implements ScanManagerMXBean, - NotificationEmitter, MBeanRegistration { - - /** - * A logger for this class. - **/ - private static final Logger LOG = - Logger.getLogger(ScanManager.class.getName()); - - /** - * The name of the ScanManager singleton MBean. - **/ - public final static ObjectName SCAN_MANAGER_NAME = - makeSingletonName(ScanManagerMXBean.class); - - /** - * Sequence number used for sending notifications. We use this - * sequence number throughout the application. - **/ - private static long seqNumber=0; - - /** - * The NotificationBroadcasterSupport object used to handle - * listener registration. - **/ - private final NotificationBroadcasterSupport broadcaster; - - /** - * The MBeanServer in which this MBean is registered. We obtain - * this reference by implementing the {@link MBeanRegistration} - * interface. - **/ - private volatile MBeanServer mbeanServer; - - /** - * A queue of pending notifications we are about to send. - * We're using a BlockingQueue in order to avoid sending - * notifications from within a synchronized block. - **/ - private final BlockingQueue pendingNotifs; - - /** - * The state of the scan session. - **/ - private volatile ScanState state = STOPPED; - - /** - * The list of DirectoryScannerMBean that are run by a scan session. - **/ - private final Map scanmap; - - /** - * The list of ScanDirConfigMXBean that were created by this MBean. - **/ - private final Map configmap; - - // The ResultLogManager for this application. - private final ResultLogManager log; - - /** - * We use a semaphore to ensure proper sequencing of exclusive - * action. The logic we have implemented is to fail - rather - * than block, if an exclusive action is already in progress. - **/ - private final Semaphore sequencer = new Semaphore(1); - - // A proxy to the current ScanDirConfigMXBean which holds the current - // configuration data. - // - private volatile ScanDirConfigMXBean config = null; - - // Avoid to write parameters twices when creating a new ConcurrentHashMap. - // - private static Map newConcurrentHashMap() { - return new ConcurrentHashMap(); - } - - // Avoid to write parameters twices when creating a new HashMap. - // - private static Map newHashMap() { - return new HashMap(); - } - - /** - * Creates a default singleton ObjectName for a given class. - * @param clazz The interface class of the MBean for which we want to obtain - * a default singleton name, or its implementation class. - * Give one or the other depending on what you wish to see in - * the value of the key {@code type=}. - * @return A default singleton name for a singleton MBean class. - * @throws IllegalArgumentException if the name can't be created - * for some unfathomable reason (e.g. an unexpected - * exception was raised). - **/ - public final static ObjectName makeSingletonName(Class clazz) { - try { - final Package p = clazz.getPackage(); - final String packageName = (p==null)?null:p.getName(); - final String className = clazz.getSimpleName(); - final String domain; - if (packageName == null || packageName.length()==0) { - // We use a reference to ScanDirAgent.class to ease - // to keep track of possible class renaming. - domain = ScanDirAgent.class.getSimpleName(); - } else { - domain = packageName; - } - final ObjectName name = new ObjectName(domain,"type",className); - return name; - } catch (Exception x) { - final IllegalArgumentException iae = - new IllegalArgumentException(String.valueOf(clazz),x); - throw iae; - } - } - - /** - * Creates a default ObjectName with keys type= and - * name= for an instance of a given MBean interface class. - * @param clazz The interface class of the MBean for which we want to obtain - * a default name, or its implementation class. - * Give one or the other depending on what you wish to see in - * the value of the key {@code type=}. - * @param name The value of the name= key. - * @return A default name for an instance of the given MBean interface class. - * @throws IllegalArgumentException if the name can't be created. - * (e.g. an unexpected exception was raised). - **/ - public static final ObjectName makeMBeanName(Class clazz, String name) { - try { - return ObjectName. - getInstance(makeSingletonName(clazz) - .toString()+",name="+name); - } catch (MalformedObjectNameException x) { - final IllegalArgumentException iae = - new IllegalArgumentException(String.valueOf(name),x); - throw iae; - } - } - - /** - * Return the ObjectName for a DirectoryScannerMXBean of that name. - * This is {@code makeMBeanName(DirectoryScannerMXBean.class,name)}. - * @param name The value of the name= key. - * @return the ObjectName for a DirectoryScannerMXBean of that name. - */ - public static final ObjectName makeDirectoryScannerName(String name) { - return makeMBeanName(DirectoryScannerMXBean.class,name); - } - - /** - * Return the ObjectName for a {@code ScanDirConfigMXBean} of that name. - * This is {@code makeMBeanName(ScanDirConfigMXBean.class,name)}. - * @param name The value of the name= key. - * @return the ObjectName for a {@code ScanDirConfigMXBean} of that name. - */ - public static final ObjectName makeScanDirConfigName(String name) { - return makeMBeanName(ScanDirConfigMXBean.class,name); - } - - /** - * Create and register a new singleton instance of the ScanManager - * MBean in the given {@link MBeanServerConnection}. - * @param mbs The MBeanServer in which the new singleton instance - * should be created. - * @throws JMException The MBeanServer connection raised an exception - * while trying to instantiate and register the singleton MBean - * instance. - * @throws IOException There was a connection problem while trying to - * communicate with the underlying MBeanServer. - * @return A proxy for the registered MBean. - **/ - public static ScanManagerMXBean register(MBeanServerConnection mbs) - throws IOException, JMException { - final ObjectInstance moi = - mbs.createMBean(ScanManager.class.getName(),SCAN_MANAGER_NAME); - final ScanManagerMXBean proxy = - JMX.newMXBeanProxy(mbs,moi.getObjectName(), - ScanManagerMXBean.class,true); - return proxy; - } - - /** - * Creates a new {@code ScanManagerMXBean} proxy over the given - * {@code MBeanServerConnection}. Does not check whether a - * {@code ScanManagerMXBean} - * is actually registered in that {@code MBeanServerConnection}. - * @return a new {@code ScanManagerMXBean} proxy. - * @param mbs The {@code MBeanServerConnection} which holds the - * {@code ScanManagerMXBean} to proxy. - */ - public static ScanManagerMXBean - newSingletonProxy(MBeanServerConnection mbs) { - final ScanManagerMXBean proxy = - JMX.newMXBeanProxy(mbs,SCAN_MANAGER_NAME, - ScanManagerMXBean.class,true); - return proxy; - } - - /** - * Creates a new {@code ScanManagerMXBean} proxy over the platform - * {@code MBeanServer}. This is equivalent to - * {@code newSingletonProxy(ManagementFactory.getPlatformMBeanServer())}. - * @return a new {@code ScanManagerMXBean} proxy. - **/ - public static ScanManagerMXBean newSingletonProxy() { - return newSingletonProxy(ManagementFactory.getPlatformMBeanServer()); - } - - /** - * Create and register a new singleton instance of the ScanManager - * MBean in the given {@link MBeanServerConnection}. - * @throws JMException The MBeanServer connection raised an exception - * while trying to instantiate and register the singleton MBean - * instance. - * @throws IOException There was a connection problem while trying to - * communicate with the underlying MBeanServer. - * @return A proxy for the registered MBean. - **/ - public static ScanManagerMXBean register() - throws IOException, JMException { - final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); - return register(mbs); - } - - /** - * Create a new ScanManager MBean - **/ - public ScanManager() { - broadcaster = new NotificationBroadcasterSupport(); - pendingNotifs = new LinkedBlockingQueue(100); - scanmap = newConcurrentHashMap(); - configmap = newConcurrentHashMap(); - log = new ResultLogManager(); - } - - - // Creates a new DirectoryScannerMXBean, from the given configuration data. - DirectoryScannerMXBean createDirectoryScanner(DirectoryScannerConfig config) { - return new DirectoryScanner(config,log); - } - - // Applies a configuration. - // throws IllegalStateException if lock can't be acquired. - // Unregisters all existing directory scanners, the create and registers - // new directory scanners according to the given config. - // Then pushes the log config to the result log manager. - // - private void applyConfiguration(ScanManagerConfig bean) - throws IOException, JMException { - if (bean == null) return; - if (!sequencer.tryAcquire()) { - throw new IllegalStateException("Can't acquire lock"); - } - try { - unregisterScanners(); - final DirectoryScannerConfig[] scans = bean.getScanList(); - if (scans == null) return; - for (DirectoryScannerConfig scan : scans) { - addDirectoryScanner(scan); - } - log.setConfig(bean.getInitialResultLogConfig()); - } finally { - sequencer.release(); - } - } - - // See ScanManagerMXBean - public void applyConfiguration(boolean fromMemory) - throws IOException, JMException { - if (fromMemory == false) config.load(); - applyConfiguration(config.getConfiguration()); - } - - // See ScanManagerMXBean - public void applyCurrentResultLogConfig(boolean toMemory) - throws IOException, JMException { - final ScanManagerConfig bean = config.getConfiguration(); - bean.setInitialResultLogConfig(log.getConfig()); - config.setConfiguration(bean); - if (toMemory==false) config.save(); - } - - // See ScanManagerMXBean - public void setConfigurationMBean(ScanDirConfigMXBean config) { - this.config = config; - } - - // See ScanManagerMXBean - public ScanDirConfigMXBean getConfigurationMBean() { - return config; - } - - // Creates and registers a new directory scanner. - // Called by applyConfiguration. - // throws IllegalStateException if state is not STOPPED or COMPLETED - // (you cannot change the config while scanning is scheduled or running). - // - private DirectoryScannerMXBean addDirectoryScanner( - DirectoryScannerConfig bean) - throws JMException { - try { - final DirectoryScannerMXBean scanner; - final ObjectName scanName; - synchronized (this) { - if (state != STOPPED && state != COMPLETED) - throw new IllegalStateException(state.toString()); - scanner = createDirectoryScanner(bean); - scanName = makeDirectoryScannerName(bean.getName()); - } - LOG.fine("server: "+mbeanServer); - LOG.fine("scanner: "+scanner); - LOG.fine("scanName: "+scanName); - final ObjectInstance moi = - mbeanServer.registerMBean(scanner,scanName); - final ObjectName moiName = moi.getObjectName(); - final DirectoryScannerMXBean proxy = - JMX.newMXBeanProxy(mbeanServer,moiName, - DirectoryScannerMXBean.class,true); - scanmap.put(moiName,proxy); - return proxy; - } catch (RuntimeException x) { - final String msg = "Operation failed: "+x; - if (LOG.isLoggable(Level.FINEST)) - LOG.log(Level.FINEST,msg,x); - else LOG.fine(msg); - throw x; - } catch (JMException x) { - final String msg = "Operation failed: "+x; - if (LOG.isLoggable(Level.FINEST)) - LOG.log(Level.FINEST,msg,x); - else LOG.fine(msg); - throw x; - } - } - - // See ScanManagerMXBean - public ScanDirConfigMXBean createOtherConfigurationMBean(String name, - String filename) - throws JMException { - final ScanDirConfig profile = new ScanDirConfig(filename); - final ObjectName profName = makeScanDirConfigName(name); - final ObjectInstance moi = mbeanServer.registerMBean(profile,profName); - final ScanDirConfigMXBean proxy = - JMX.newMXBeanProxy(mbeanServer,profName, - ScanDirConfigMXBean.class,true); - configmap.put(moi.getObjectName(),proxy); - return proxy; - } - - - // See ScanManagerMXBean - public Map getDirectoryScanners() { - final Map proxyMap = newHashMap(); - for (Entry item : scanmap.entrySet()){ - proxyMap.put(item.getKey().getKeyProperty("name"),item.getValue()); - } - return proxyMap; - } - - // --------------------------------------------------------------- - // State Management - // --------------------------------------------------------------- - - /** - * For each operation, this map stores a list of states from - * which the corresponding operation can be legally called. - * For instance, it is legal to call "stop" regardless of the - * application state. However, "schedule" can be called only if - * the application state is STOPPED, etc... - **/ - private final static Map> allowedStates; - static { - allowedStates = newHashMap(); - // You can always call stop - allowedStates.put("stop",EnumSet.allOf(ScanState.class)); - - // You can only call closed when stopped - allowedStates.put("close",EnumSet.of(STOPPED,COMPLETED,CLOSED)); - - // You can call schedule only when the current task is - // completed or stopped. - allowedStates.put("schedule",EnumSet.of(STOPPED,COMPLETED)); - - // switch reserved for background task: goes from SCHEDULED to - // RUNNING when it enters the run() method. - allowedStates.put("scan-running",EnumSet.of(SCHEDULED)); - - // switch reserved for background task: goes from RUNNING to - // SCHEDULED when it has completed but needs to reschedule - // itself for specified interval. - allowedStates.put("scan-scheduled",EnumSet.of(RUNNING)); - - // switch reserved for background task: - // goes from RUNNING to COMPLETED upon successful completion - allowedStates.put("scan-done",EnumSet.of(RUNNING)); - } - - // Get this object's state. No need to synchronize because - // state is volatile. - // See ScanManagerMXBean - public ScanState getState() { - return state; - } - - /** - * Enqueue a state changed notification for the given states. - **/ - private void queueStateChangedNotification( - long sequence, - long time, - ScanState old, - ScanState current) { - final AttributeChangeNotification n = - new AttributeChangeNotification(SCAN_MANAGER_NAME,sequence,time, - "ScanManager State changed to "+current,"State", - ScanState.class.getName(),old.toString(),current.toString()); - // Queue the notification. We have created an unlimited queue, so - // this method should always succeed. - try { - if (!pendingNotifs.offer(n,2,TimeUnit.SECONDS)) { - LOG.fine("Can't queue Notification: "+n); - } - } catch (InterruptedException x) { - LOG.fine("Can't queue Notification: "+x); - } - } - - /** - * Send all notifications present in the queue. - **/ - private void sendQueuedNotifications() { - Notification n; - while ((n = pendingNotifs.poll()) != null) { - broadcaster.sendNotification(n); - } - } - - /** - * Checks that the current state is allowed for the given operation, - * and if so, switch its value to the new desired state. - * This operation also enqueue the appropriate state changed - * notification. - **/ - private ScanState switchState(ScanState desired,String forOperation) { - return switchState(desired,allowedStates.get(forOperation)); - } - - /** - * Checks that the current state is one of the allowed states, - * and if so, switch its value to the new desired state. - * This operation also enqueue the appropriate state changed - * notification. - **/ - private ScanState switchState(ScanState desired,EnumSet allowed) { - final ScanState old; - final long timestamp; - final long sequence; - synchronized(this) { - old = state; - if (!allowed.contains(state)) - throw new IllegalStateException(state.toString()); - state = desired; - timestamp = System.currentTimeMillis(); - sequence = getNextSeqNumber(); - } - LOG.fine("switched state: "+old+" -> "+desired); - if (old != desired) - queueStateChangedNotification(sequence,timestamp,old,desired); - return old; - } - - - // --------------------------------------------------------------- - // schedule() creates a new SessionTask that will be executed later - // (possibly right away if delay=0) by a Timer thread. - // --------------------------------------------------------------- - - // The timer used by this object. Lazzy evaluation. Cleaned in - // postDeregister() - // - private Timer timer = null; - - // See ScanManagerMXBean - public void schedule(long delay, long interval) { - if (!sequencer.tryAcquire()) { - throw new IllegalStateException("Can't acquire lock"); - } - try { - LOG.fine("scheduling new task: state="+state); - final ScanState old = switchState(SCHEDULED,"schedule"); - final boolean scheduled = - scheduleSession(new SessionTask(interval),delay); - if (scheduled) - LOG.fine("new task scheduled: state="+state); - } finally { - sequencer.release(); - } - sendQueuedNotifications(); - } - - // Schedule a SessionTask. The session task may reschedule - // a new identical task when it eventually ends. - // We use this logic so that the 'interval' time is measured - // starting at the end of the task that finishes, rather than - // at its beginning. Therefore if a repeated task takes x ms, - // it will be repeated every x+interval ms. - // - private synchronized boolean scheduleSession(SessionTask task, long delay) { - if (state == STOPPED) return false; - if (timer == null) timer = new Timer("ScanManager"); - tasklist.add(task); - timer.schedule(task,delay); - return true; - } - - // --------------------------------------------------------------- - // start() is equivalent to schedule(0,0) - // --------------------------------------------------------------- - - // See ScanManagerMXBean - public void start() throws IOException, InstanceNotFoundException { - schedule(0,0); - } - - // --------------------------------------------------------------- - // Methods used to implement stop() - stop() is asynchronous, - // and needs to notify any running background task that it needs - // to stop. It also needs to prevent scheduled task from being - // run. - // --------------------------------------------------------------- - - // See ScanManagerMXBean - public void stop() { - if (!sequencer.tryAcquire()) - throw new IllegalStateException("Can't acquire lock"); - int errcount = 0; - final StringBuilder b = new StringBuilder(); - - try { - switchState(STOPPED,"stop"); - - errcount += cancelSessionTasks(b); - errcount += stopDirectoryScanners(b); - } finally { - sequencer.release(); - } - - sendQueuedNotifications(); - if (errcount > 0) { - b.insert(0,"stop partially failed with "+errcount+" error(s):"); - throw new RuntimeException(b.toString()); - } - } - - // See ScanManagerMXBean - public void close() { - switchState(CLOSED,"close"); - sendQueuedNotifications(); - } - - // Appends exception to a StringBuilder message. - // - private void append(StringBuilder b,String prefix,Throwable t) { - final String first = (prefix==null)?"\n":"\n"+prefix; - b.append(first).append(String.valueOf(t)); - Throwable cause = t; - while ((cause = cause.getCause())!=null) { - b.append(first).append("Caused by:").append(first); - b.append('\t').append(String.valueOf(cause)); - } - } - - // Cancels all scheduled session tasks - // - private int cancelSessionTasks(StringBuilder b) { - int errcount = 0; - // Stops scheduled tasks if any... - // - for (SessionTask task : tasklist) { - try { - task.cancel(); - tasklist.remove(task); - } catch (Exception ex) { - errcount++; - append(b,"\t",ex); - } - } - return errcount; - } - - // Stops all DirectoryScanners configured for this object. - // - private int stopDirectoryScanners(StringBuilder b) { - int errcount = 0; - // Stops directory scanners if any... - // - for (DirectoryScannerMXBean s : scanmap.values()) { - try { - s.stop(); - } catch (Exception ex) { - errcount++; - append(b,"\t",ex); - } - } - return errcount; - } - - - // --------------------------------------------------------------- - // We start scanning in background in a Timer thread. - // The methods below implement that logic. - // --------------------------------------------------------------- - - private void scanAllDirectories() - throws IOException, InstanceNotFoundException { - - int errcount = 0; - final StringBuilder b = new StringBuilder(); - for (ObjectName key : scanmap.keySet()) { - final DirectoryScannerMXBean s = scanmap.get(key); - try { - if (state == STOPPED) return; - s.scan(); - } catch (Exception ex) { - LOG.log(Level.FINE,key + " failed to scan: "+ex,ex); - errcount++; - append(b,"\t",ex); - } - } - if (errcount > 0) { - b.insert(0,"scan partially performed with "+errcount+" error(s):"); - throw new RuntimeException(b.toString()); - } - } - - // List of scheduled session task. Needed by stop() to cancel - // scheduled sessions. There's usually at most 1 session in - // this list (unless there's a bug somewhere ;-)) - // - private final ConcurrentLinkedQueue tasklist = - new ConcurrentLinkedQueue(); - - // Used to give a unique id to session task - useful for - // debugging. - // - private volatile static long taskcount = 0; - - /** - * A session task will be scheduled to run in background in a - * timer thread. There can be at most one session task running - * at a given time (this is ensured by using a timer - which is - * a single threaded object). - * - * If the session needs to be repeated, it will reschedule an - * identical session when it finishes to run. This ensure that - * two session runs are separated by the given interval time. - * - **/ - private class SessionTask extends TimerTask { - - /** - * Delay after which the next iteration of this task will - * start. This delay is measured starting at the end of - * the previous iteration. - **/ - final long delayBeforeNext; - - /** - * A unique id for this task. - **/ - final long taskid; - - /** - * Whether it's been cancelled by stop() - **/ - volatile boolean cancelled=false; - - /** - * create a new SessionTask. - **/ - SessionTask(long scheduleNext) { - delayBeforeNext = scheduleNext; - taskid = taskcount++; - } - - /** - * When run() begins, the state is switched to RUNNING. - * When run() ends then: - * If the task is repeated, the state will be switched - * to SCHEDULED (because a new task was scheduled). - * Otherwise the state will be switched to either - * STOPPED (if it was stopped before it could complete) - * or COMPLETED (if it completed gracefully) - * This method is used to switch to the desired state and - * send the appropriate notifications. - * When entering the method, we check whether the state is - * STOPPED. If so, we return false - and the SessionTask will - * stop. Otherwise, we switch the state to the desired value. - **/ - private boolean notifyStateChange(ScanState newState,String condition) { - synchronized (ScanManager.this) { - if (state == STOPPED || state == CLOSED) return false; - switchState(newState,condition); - } - sendQueuedNotifications(); - return true; - } - - // Cancels this task. - public boolean cancel() { - cancelled=true; - return super.cancel(); - } - - /** - * Invoke all directories scanners in sequence. At each - * step, checks to see whether the task should stop. - **/ - private boolean execute() { - final String tag = "Scheduled session["+taskid+"]"; - try { - if (cancelled) { - LOG.finer(tag+" cancelled: done"); - return false; - } - if (!notifyStateChange(RUNNING,"scan-running")) { - LOG.finer(tag+" stopped: done"); - return false; - } - scanAllDirectories(); - } catch (Exception x) { - if (LOG.isLoggable(Level.FINEST)) { - LOG.log(Level.FINEST, - tag+" failed to scan: "+x,x); - } else if (LOG.isLoggable(Level.FINE)) { - LOG.fine(tag+" failed to scan: "+x); - } - } - return true; - } - - /** - * Schedule an identical task for next iteration. - **/ - private boolean scheduleNext() { - final String tag = "Scheduled session["+taskid+"]"; - - // We need now to reschedule a new task for after 'delayBeforeNext' ms. - try { - LOG.finer(tag+": scheduling next session for "+ delayBeforeNext + "ms"); - if (cancelled || !notifyStateChange(SCHEDULED,"scan-scheduled")) { - LOG.finer(tag+" stopped: do not reschedule"); - return false; - } - final SessionTask nextTask = new SessionTask(delayBeforeNext); - if (!scheduleSession(nextTask,delayBeforeNext)) return false; - LOG.finer(tag+": next session successfully scheduled"); - } catch (Exception x) { - if (LOG.isLoggable(Level.FINEST)) { - LOG.log(Level.FINEST,tag+ - " failed to schedule next session: "+x,x); - } else if (LOG.isLoggable(Level.FINE)) { - LOG.fine(tag+" failed to schedule next session: "+x); - } - } - return true; - } - - - /** - * The run method: - * executes scanning logic, the schedule next iteration if needed. - **/ - public void run() { - final String tag = "Scheduled session["+taskid+"]"; - LOG.entering(SessionTask.class.getName(),"run"); - LOG.finer(tag+" starting..."); - try { - if (execute()==false) return; - - LOG.finer(tag+" terminating - state is "+state+ - ((delayBeforeNext >0)?(" next session is due in "+delayBeforeNext+" ms."): - " no additional session scheduled")); - - // if delayBeforeNext <= 0 we are done, either because the session was - // stopped or because it successfully completed. - if (delayBeforeNext <= 0) { - if (!notifyStateChange(COMPLETED,"scan-done")) - LOG.finer(tag+" stopped: done"); - else - LOG.finer(tag+" completed: done"); - return; - } - - // we need to reschedule a new session for 'delayBeforeNext' ms. - scheduleNext(); - - } finally { - tasklist.remove(this); - LOG.finer(tag+" finished..."); - LOG.exiting(SessionTask.class.getName(),"run"); - } - } - } - - // --------------------------------------------------------------- - // --------------------------------------------------------------- - - // --------------------------------------------------------------- - // MBean Notification support - // The methods below are imported from {@link NotificationEmitter} - // --------------------------------------------------------------- - - /** - * Delegates the implementation of this method to the wrapped - * {@code NotificationBroadcasterSupport} object. - **/ - public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException { - broadcaster.addNotificationListener(listener, filter, handback); - } - - - /** - * We emit an {@code AttributeChangeNotification} when the {@code State} - * attribute changes. - **/ - public MBeanNotificationInfo[] getNotificationInfo() { - return new MBeanNotificationInfo[] { - new MBeanNotificationInfo(new String[] { - AttributeChangeNotification.ATTRIBUTE_CHANGE}, - AttributeChangeNotification.class.getName(), - "Emitted when the State attribute changes") - }; - } - - /** - * Delegates the implementation of this method to the wrapped - * {@code NotificationBroadcasterSupport} object. - **/ - public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException { - broadcaster.removeNotificationListener(listener); - } - - /** - * Delegates the implementation of this method to the wrapped - * {@code NotificationBroadcasterSupport} object. - **/ - public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException { - broadcaster.removeNotificationListener(listener, filter, handback); - } - - /** - * Returns and increment the sequence number used for - * notifications. We use the same sequence number throughout the - * application - this is why this method is only package protected. - * @return A unique sequence number for the next notification. - */ - static synchronized long getNextSeqNumber() { - return seqNumber++; - } - - // --------------------------------------------------------------- - // End of MBean Notification support - // --------------------------------------------------------------- - - // --------------------------------------------------------------- - // MBeanRegistration support - // The methods below are imported from {@link MBeanRegistration} - // --------------------------------------------------------------- - - /** - * Allows the MBean to perform any operations it needs before being - * registered in the MBean server. If the name of the MBean is not - * specified, the MBean can provide a name for its registration. If - * any exception is raised, the MBean will not be registered in the - * MBean server. - *

                    In this implementation, we check that the provided name is - * either {@code null} or equals to {@link #SCAN_MANAGER_NAME}. If it - * isn't then we throw an IllegalArgumentException, otherwise we return - * {@link #SCAN_MANAGER_NAME}.

                    - *

                    This ensures that there will be a single instance of ScanManager - * registered in a given MBeanServer, and that it will always be - * registered with the singleton's {@link #SCAN_MANAGER_NAME}.

                    - *

                    We do not need to check whether an MBean by that name is - * already registered because the MBeanServer will perform - * this check just after having called preRegister().

                    - * @param server The MBean server in which the MBean will be registered. - * @param name The object name of the MBean. This name is null if the - * name parameter to one of the createMBean or registerMBean methods in - * the MBeanServer interface is null. In that case, this method must - * return a non-null ObjectName for the new MBean. - * @return The name under which the MBean is to be registered. This value - * must not be null. If the name parameter is not null, it will usually - * but not necessarily be the returned value. - * @throws Exception This exception will be caught by the MBean server and - * re-thrown as an MBeanRegistrationException. - */ - public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception { - if (name != null) { - if (!SCAN_MANAGER_NAME.equals(name)) - throw new IllegalArgumentException(String.valueOf(name)); - } - mbeanServer = server; - return SCAN_MANAGER_NAME; - } - - // Returns the default configuration filename - static String getDefaultConfigurationFileName() { - // This is a file calles 'jmx-scandir.xml' located - // in the user directory. - final String user = System.getProperty("user.home"); - final String defconf = user+File.separator+"jmx-scandir.xml"; - return defconf; - } - - /** - * Allows the MBean to perform any operations needed after having - * been registered in the MBean server or after the registration has - * failed. - *

                    - * If registration was not successful, the method returns immediately. - *

                    - * If registration is successful, register the {@link ResultLogManager} - * and default {@link ScanDirConfigMXBean}. If registering these - * MBean fails, the {@code ScanManager} state will be switched to - * {@link #close CLOSED}, and postRegister ends there. - *

                    - *

                    Otherwise the {@code ScanManager} will ask the - * {@link ScanDirConfigMXBean} to load its configuration. - * If it succeeds, the configuration will be {@link - * #applyConfiguration applied}. Otherwise, the method simply returns, - * assuming that the user will later create/update a configuration and - * apply it. - * @param registrationDone Indicates whether or not the MBean has been - * successfully registered in the MBean server. The value false means - * that the registration has failed. - */ - public void postRegister(Boolean registrationDone) { - if (!registrationDone) return; - Exception test=null; - try { - mbeanServer.registerMBean(log, - ResultLogManager.RESULT_LOG_MANAGER_NAME); - final String defconf = getDefaultConfigurationFileName(); - final String conf = System.getProperty("scandir.config.file",defconf); - final String confname = ScanDirConfig.guessConfigName(conf,defconf); - final ObjectName defaultProfileName = - makeMBeanName(ScanDirConfigMXBean.class,confname); - if (!mbeanServer.isRegistered(defaultProfileName)) - mbeanServer.registerMBean(new ScanDirConfig(conf), - defaultProfileName); - config = JMX.newMXBeanProxy(mbeanServer,defaultProfileName, - ScanDirConfigMXBean.class,true); - configmap.put(defaultProfileName,config); - } catch (Exception x) { - LOG.config("Failed to populate MBeanServer: "+x); - close(); - return; - } - try { - config.load(); - } catch (Exception x) { - LOG.finest("No config to load: "+x); - test = x; - } - if (test == null) { - try { - applyConfiguration(config.getConfiguration()); - } catch (Exception x) { - if (LOG.isLoggable(Level.FINEST)) - LOG.log(Level.FINEST,"Failed to apply config: "+x,x); - LOG.config("Failed to apply config: "+x); - } - } - } - - // Unregisters all created DirectoryScanners - private void unregisterScanners() throws JMException { - unregisterMBeans(scanmap); - } - - // Unregisters all created ScanDirConfigs - private void unregisterConfigs() throws JMException { - unregisterMBeans(configmap); - } - - // Unregisters all MBeans named by the given map - private void unregisterMBeans(Map map) throws JMException { - for (ObjectName key : map.keySet()) { - if (mbeanServer.isRegistered(key)) - mbeanServer.unregisterMBean(key); - map.remove(key); - } - } - - // Unregisters the ResultLogManager. - private void unregisterResultLogManager() throws JMException { - final ObjectName name = ResultLogManager.RESULT_LOG_MANAGER_NAME; - if (mbeanServer.isRegistered(name)) { - mbeanServer.unregisterMBean(name); - } - } - - /** - * Allows the MBean to perform any operations it needs before being - * unregistered by the MBean server. - * This implementation also unregisters all the MXBeans - * that were created by this object. - * @throws IllegalStateException if the lock can't be acquire, or if - * the MBean's state doesn't allow the MBean to be unregistered - * (e.g. because it's scheduled or running). - * @throws Exception This exception will be caught by the MBean server and - * re-thrown as an MBeanRegistrationException. - */ - public void preDeregister() throws Exception { - try { - close(); - if (!sequencer.tryAcquire()) - throw new IllegalStateException("can't acquire lock"); - try { - unregisterScanners(); - unregisterConfigs(); - unregisterResultLogManager(); - } finally { - sequencer.release(); - } - } catch (Exception x) { - LOG.log(Level.FINEST,"Failed to unregister: "+x,x); - throw x; - } - } - - /** - * Allows the MBean to perform any operations needed after having been - * unregistered in the MBean server. - * Cancels the internal timer - if any. - */ - public synchronized void postDeregister() { - if (timer != null) { - try { - timer.cancel(); - } catch (Exception x) { - if (LOG.isLoggable(Level.FINEST)) - LOG.log(Level.FINEST,"Failed to cancel timer",x); - else if (LOG.isLoggable(Level.FINE)) - LOG.fine("Failed to cancel timer: "+x); - } finally { - timer = null; - } - } - } - - // --------------------------------------------------------------- - // End of MBeanRegistration support - // --------------------------------------------------------------- - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanManagerMXBean.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanManagerMXBean.java deleted file mode 100644 index 1f6d4ff3a18..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/ScanManagerMXBean.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import java.io.IOException; -import java.util.Map; -import javax.management.InstanceNotFoundException; -import javax.management.JMException; - -/** - * The ScanManagerMXBean is responsible for applying a - * configuration, starting and scheduling directory scans, and reporting - * application state. - *

                    - * The ScanManagerMXBean is a singleton MBean: there can be - * at most one instance of such an MBean registered in a given MBeanServer. - * The name of that MBean is a constant defined in - * {@link ScanManager#SCAN_MANAGER_NAME ScanManager.SCAN_MANAGER_NAME}. - *

                    - *

                    - * The ScanManagerMXBean is the entry point of the scandir - * application management interface. It is from this MBean that all other - * MBeans will be created and registered. - *

                    - * - * @author Sun Microsystems, 2006 - All rights reserved. - **/ -public interface ScanManagerMXBean { - /** - * This state tells whether directory scans are running, scheduled, - * successfully completed, or stopped. - *

                    - * The {@link #CLOSED} state means - * that the {@link ScanManagerMXBean} was closed and is no longer usable. - * This state is used when the {@link ScanManagerMXBean} needs to be - * unregistered. - *

                    - **/ - public enum ScanState { - /** - * Scanning of directories is in process. - **/ - RUNNING, - - /** - * Scanning of directories is not in process, but is scheduled - * for a later date. - **/ - SCHEDULED, - - /** - * Scanning is successfully completed. - **/ - COMPLETED, - - /** - * Scanning is stopped. No scanning is scheduled. - **/ - STOPPED, - - /** - * close() was called. - **/ - CLOSED - - } - - /** - * Returns the current state of the application. - * @return the current state of the application. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public ScanState getState() - throws IOException, InstanceNotFoundException; - - /** - * Schedule a scan session for a later date. - *

                    - * A scan session is a background task that will sequentially call {@link - * DirectoryScannerMXBean#scan scan()} on every {@link - * DirectoryScannerMXBean} configured for this MBean. - *

                    - * @see #getDirectoryScanners - * @param delay The first scan session will be started after - * the given delay. 0 means start now. - * @param interval Scan session will be rescheduled periodically - * at the specified interval. The interval starts at the - * the end of the scan session: if a scan session takes - * on average x milliseconds to complete, then a scan session will - * be started on average every x+interval milliseconds. - * if (interval == 0) then scan session will not be - * rescheduled, and will run only once. - * @throws IllegalStateException if a scan session is already - * running or scheduled, or the MBean is closed. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void schedule(long delay, long interval) - throws IOException, InstanceNotFoundException; - - - /** - * Stops current running or scheduled scan sessions if any. - *

                    - * A scan session is a background task that will sequentially call {@link - * DirectoryScannerMXBean#scan scan()} on every {@link - * DirectoryScannerMXBean} configured for this MBean. - *

                    - *

                    - * Scan sessions are started/scheduled by calls to {@link #start start} or - * {@link #schedule schedule}. - *

                    - * After this method completes the state of the application will - * be {@link ScanState#STOPPED}. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void stop() - throws IOException, InstanceNotFoundException; - - /** - * Switches the state to CLOSED. - * When closed, this MBean cannot be used any more. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void close() - throws IOException, InstanceNotFoundException; - - /** - * Starts a scan session immediately. - * This is equivalent to {@link #schedule(long,long) schedule(0,0)}. - * @throws IllegalStateException if a scan session is already - * running or scheduled, or the MBean is closed. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public void start() - throws IOException, InstanceNotFoundException; - - /** - * Gets the list of directory scanners configured for this MBean. - * @return A {@code Map} where the - * key in the map is the value of the name= key - * of the {@link DirectoryScannerMXBean} ObjectName. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws JMException The MBeanServer failed to call the underlying MBean. - **/ - public Map getDirectoryScanners() - throws IOException, JMException; - - /** - * Apply the configuration handled by the {@link - * #getConfigurationMBean configuration MBean}. - *

                    - * When the configuration is applied, all the {@link DirectoryScannerMXBean} - * created by this MBean will be unregistered, and new {@link - * DirectoryScannerMXBean} will be created and registered from the - * new {@link ScanDirConfigMXBean#getConfiguration configuration data}. - *

                    - *

                    - * The initial result log configuration held by the {@link - * #getConfigurationMBean configuration MBean} will also be pushed to the - * {@link ResultLogManagerMXBean}. If you don't want to lose your current - * {@link ResultLogManagerMXBean} configuration, you should therefore call - * {@link #applyCurrentResultLogConfig - * applyCurrentResultLogConfig} before calling - * {@link #applyConfiguration applyConfiguration} - *

                    - * @param fromMemory if {@code true}, the configuration will be applied - * from memory. if {@code false}, the {@code ScanManagerMXBean} will - * ask the {@link - * #getConfigurationMBean configuration MBean} to {@link - * ScanDirConfigMXBean#load reload its configuration} before applying - * it. - * @throws IllegalStateException if a scan session is - * running or scheduled, or the MBean is closed. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws JMException The MBeanServer failed to call the underlying MBean. - **/ - public void applyConfiguration(boolean fromMemory) - throws IOException, JMException; - /** - * Replaces the {@link - * #getConfigurationMBean configuration MBean}'s {@link - * com.sun.jmx.examples.scandir.config.ScanManagerConfig#getInitialResultLogConfig - * initial result log configuration} with the current {@link - * ResultLogManagerMXBean} - * configuration. This prevents the ResultLogManagerMXBean - * current configuration from being reset when {@link #applyConfiguration - * applyConfiguration} is called. - * @param toMemory if {@code true} only replaces the initial result log - * configuration held in memory. - * if {@code false}, the {@link - * #getConfigurationMBean configuration MBean} will be asked to commit - * the whole configuration to the configuration file. - * - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws JMException The MBeanServer failed to call the underlying MBean. - **/ - public void applyCurrentResultLogConfig(boolean toMemory) - throws IOException, JMException; - - /** - * Instruct the {@code ScanManagerMXBean} to use another {@link - * ScanDirConfigMXBean configuration MBean}. - *

                    This method doesn't {@link #applyConfiguration apply} the new - * configuration. If you want to apply the new configuration, you should - * additionally call {@link #applyConfiguration - * applyConfiguration(true|false)}. Note that you cannot apply a - * configuration as long as a scan session is scheduled or running. - * In that case you will need to wait for that session to complete - * or call {@link #stop} to stop it. - *

                    - * @param config A proxy to the {@link ScanDirConfigMXBean} that holds - * the new configuration for the application. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - */ - public void setConfigurationMBean(ScanDirConfigMXBean config) - throws IOException, InstanceNotFoundException; - /** - * Gets the current configuration MBean. - * @return A proxy to the current configuration MBean. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws InstanceNotFoundException The underlying MBean is not - * registered in the MBeanServer. - **/ - public ScanDirConfigMXBean getConfigurationMBean() - throws IOException, InstanceNotFoundException; - /** - * This method creates a new alternate {@link ScanDirConfigMXBean}. - * - *

                    You will need to call {@link #setConfigurationMBean - * setConfigurationMBean} if you - * want this new {@link ScanDirConfigMXBean} to become the - * current configuration MBean. - *

                    - *

                    - * This new {@link ScanDirConfigMXBean} will be unregistered automatically - * by the {@code ScanManagerMXBean} when the {@code ScanManagerMXBean} - * is unregistered. - *

                    - * @param name The short name for the new {@link ScanDirConfigMXBean}. - * This name will be used in the ObjectName name= key - * of the new {@link ScanDirConfigMXBean}. - * @param filename The path of the file from which the new {@link - * ScanDirConfigMXBean} can {@link ScanDirConfigMXBean#load load} or - * {@link ScanDirConfigMXBean#save save} its configuration data. - * Note that even if the file exists and contain a valid - * configuration, you will still need to call {@link - * ScanDirConfigMXBean#load load} to make the {@link - * ScanDirConfigMXBean} load its configuration data. - * @throws IOException A connection problem occurred when accessing - * the underlying resource. - * @throws JMException The MBeanServer failed to call the underlying MBean. - * @return A proxy to the created {@link ScanDirConfigMXBean}. - */ - public ScanDirConfigMXBean createOtherConfigurationMBean(String name, - String filename) - throws JMException, IOException; -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/DirectoryScannerConfig.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/DirectoryScannerConfig.java deleted file mode 100644 index b3f8e9ff6f4..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/DirectoryScannerConfig.java +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir.config; - -import java.io.File; -import java.io.FileFilter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.logging.Logger; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlList; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * The DirectoryScannerConfig Java Bean is used to model - * the configuration of a {@link - * com.sun.jmx.examples.scandir.DirectoryScannerMXBean}. - *

                    - * This class is annotated for XML binding. - *

                    - * @author Sun Microsystems, 2006 - All rights reserved. - */ -@XmlRootElement(name="DirectoryScanner", - namespace=XmlConfigUtils.NAMESPACE) -public class DirectoryScannerConfig { - - // - // A logger for this class. - // - // private static final Logger LOG = - // Logger.getLogger(DirectoryScannerConfig.class.getName()); - - /** - * This enumeration is used to model the actions that a {@link - * com.sun.jmx.examples.scandir.DirectoryScannerMXBean - * DirectoryScannerMXBean} should take when a file matches its set - * of matching criteria. - **/ - public enum Action { - /** - * Indicates that the {@code DirectoryScannerMXBean} should - * emit a {@code Notification} when a matching file is found. - */ - NOTIFY, - /** - * Indicates that the {@code DirectoryScannerMXBean} should - * delete the matching files. - */ - DELETE, - /** - * Indicates that the {@code DirectoryScannerMXBean} should - * log the actions that were taken on the matching files. - */ - LOGRESULT }; - - // A short name for the Directory Scanner - // This name is used for the value of the {@code name=} key in the - // {@code DirectoryScannerMXBean} ObjectName. - private String name; - - // The root directory of the Directory Scanner - private String rootDirectory; - - // List of filters identifying files that should be selected. - // A file is selected if at least one filter matches. - // - private final List includeFiles = - new ArrayList(); - - // List of filters identifying files that should be excluded. - // A file is excluded if at least one filter matches. - // - private final List excludeFiles = - new ArrayList(); - - - // The actions that this Directory Scanner should carry out when a - // file is selected. Default is NOTIFY and LOGRESULT. - // - private Action[] actions = { Action.NOTIFY, Action.LOGRESULT }; - - /** - * Creates a new instance of {@code DirectoryScannerConfig}. - * We keep this empty constructor to make XML binding easier. - * You shouldn't use this constructor directly: - * use {@link #DirectoryScannerConfig(String) - * DirectoryScannerConfig(String name)} instead. - * @deprecated

                    Tagged deprecated so that a compiler warning is issued. - * Use {@link #DirectoryScannerConfig(String) - * DirectoryScannerConfig(String name)} instead. - *

                    - **/ - public DirectoryScannerConfig() { - this(null); - } - - /** - * Creates a new instance of {@code DirectoryScannerConfig}. - * @param name A short name for the Directory Scanner. This name is used for - * the value of the {@code name=} key in the - * {@code DirectoryScannerMXBean} ObjectName. - **/ - public DirectoryScannerConfig(String name) { - this.name = name; - rootDirectory = null; - } - - /** - * Gets the root directory configured for that Directory Scanner. - * @return the root directory at which the directory scanner should start - * scanning. - **/ - @XmlElement(name="RootDirectory",namespace=XmlConfigUtils.NAMESPACE) - public String getRootDirectory() { - return rootDirectory; - } - - /** - * Configures a root directory for that Directory Scanner. - * @param root The root directory at which the directory scanner should - * start scanning. - **/ - public void setRootDirectory(String root) { - rootDirectory=root; - } - - - /** - * Gets the short name of this directory scanner. - * - *

                    - * This name is used for the value of the {@code name=} key in the - * {@code DirectoryScannerMXBean} ObjectName. - *

                    - * - * @return the short name of this directory scanner. - **/ - @XmlAttribute(name="name",required=true) - public String getName() { - return this.name; - } - - /** - * Setter for property {@link #getName() name}. - * Once set its value cannot change. - * @param name New value of property name. - * @throws IllegalArgumentException if {@code name} is already set to a - * different non null value. - */ - public void setName(String name) { - if (this.name == null) - this.name = name; - else if (name == null) - throw new IllegalArgumentException("name=null"); - else if (!name.equals(this.name)) - throw new IllegalArgumentException("name="+name); - } - - /** - * Getter for property includeFiles. - * This is an array of filters identifying files that should be selected. - * A file is selected if at least one filter matches. - * @return Value of property includeFiles. - */ - @XmlElementWrapper(name="IncludeFiles", - namespace=XmlConfigUtils.NAMESPACE) - @XmlElementRef - public FileMatch[] getIncludeFiles() { - synchronized(includeFiles) { - return includeFiles.toArray(new FileMatch[0]); - } - } - - /** - * Adds a filter to the includeFiles property. - * A file is selected if at least one filter matches. - * @param include A filter identifying files that should be selected. - */ - public void addIncludeFiles(FileMatch include) { - if (include == null) - throw new IllegalArgumentException("null"); - synchronized (includeFiles) { - includeFiles.add(include); - } - } - - /** - * Setter for property includeFiles. - * @param includeFiles New value of property includeFiles. - * This is an array of filters identifying files - * that should be selected. A file is selected if at least - * one filter matches. - */ - public void setIncludeFiles(FileMatch[] includeFiles) { - synchronized (this.includeFiles) { - this.includeFiles.clear(); - if (includeFiles == null) return; - this.includeFiles.addAll(Arrays.asList(includeFiles)); - } - } - - /** - * Getter for property excludeFiles. - * This is an array of filters identifying files that should be excluded. - * A file is excluded if at least one filter matches. - * @return Value of property excludeFiles. - */ - @XmlElementWrapper(name="ExcludeFiles", - namespace=XmlConfigUtils.NAMESPACE) - @XmlElementRef - public FileMatch[] getExcludeFiles() { - synchronized(excludeFiles) { - return excludeFiles.toArray(new FileMatch[0]); - } - } - - /** - * Setter for property excludeFiles. - * @param excludeFiles New value of property excludeFiles. - * This is an array of filters identifying files - * that should be excluded. A file is excluded if at least - * one filter matches. - */ - public void setExcludeFiles(FileMatch[] excludeFiles) { - synchronized (this.excludeFiles) { - this.excludeFiles.clear(); - if (excludeFiles == null) return; - this.excludeFiles.addAll(Arrays.asList(excludeFiles)); - } - } - - /** - * Adds a filter to the excludeFiles property. - * A file is excluded if at least one filter matches. - * @param exclude A filter identifying files that should be excluded. - */ - public void addExcludeFiles(FileMatch exclude) { - if (exclude == null) - throw new IllegalArgumentException("null"); - synchronized (excludeFiles) { - this.excludeFiles.add(exclude); - } - } - - /** - * Gets the list of actions that this Directory Scanner should carry - * out when a file is selected. Default is NOTIFY and LOGRESULT. - - * @return The list of actions that this Directory Scanner should carry - * out when a file is selected. - */ - @XmlElement(name="Actions",namespace=XmlConfigUtils.NAMESPACE) - @XmlList - public Action[] getActions() { - return (actions == null)?null:actions.clone(); - } - - /** - * Sets the list of actions that this Directory Scanner should carry - * out when a file is selected. Default is NOTIFY and LOGRESULT. - - * @param actions The list of actions that this Directory Scanner should - * carry out when a file is selected. - */ - public void setActions(Action[] actions) { - this.actions = (actions == null)?null:actions.clone(); - } - - /** - * Builds a {@code FileFilter} from the {@link #getIncludeFiles - * includeFiles} and {@link #getExcludeFiles excludeFiles} lists. - * A file will be accepted if it is selected by at least one of - * the filters in {@link #getIncludeFiles includeFiles}, and is - * not excluded by any of the filters in {@link - * #getExcludeFiles excludeFiles}. If there's no filter in - * {@link #getIncludeFiles includeFiles}, then a file is accepted - * simply if it is not excluded by any of the filters in {@link - * #getExcludeFiles excludeFiles}. - * - * @return A new {@code FileFilter} created from the current snapshot - * of the {@link #getIncludeFiles - * includeFiles} and {@link #getExcludeFiles excludeFiles} lists. - * Later modification of these lists will not affect the - * returned {@code FileFilter}. - **/ - public FileFilter buildFileFilter() { - final FileFilter[] ins = getIncludeFiles(); - final FileFilter[] outs = getExcludeFiles(); - final FileFilter filter = new FileFilter() { - public boolean accept(File f) { - boolean result = false; - // If no include filter, all files are included. - if (ins != null) { - for (FileFilter in: ins) { - // if one filter accepts it, file is included - if (!in.accept(f)) continue; - - // file is accepted, include it - result=true; - break; - } - } else result= true; - if (result == false) return false; - - // The file is in the include list. Let's see if it's not - // in the exclude list... - // - if (outs != null) { - for (FileFilter out: outs) { - // if one filter accepts it, file is excluded - if (!out.accept(f)) continue; - - // file is accepted, exclude it. - result=false; - break; - } - } - return result; - } - }; - return filter; - } - - // Used for equality - see equals(). - private Object[] toArray() { - final Object[] thisconfig = { - name,rootDirectory,actions,excludeFiles,includeFiles - }; - return thisconfig; - } - - @Override - public boolean equals(Object o) { - if (o == this) return true; - if (!(o instanceof DirectoryScannerConfig)) return false; - final DirectoryScannerConfig other = (DirectoryScannerConfig)o; - final Object[] thisconfig = toArray(); - final Object[] otherconfig = other.toArray(); - return Arrays.deepEquals(thisconfig,otherconfig); - } - - @Override - public int hashCode() { - final String key = name; - if (key == null) return 0; - else return key.hashCode(); - } - - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/FileMatch.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/FileMatch.java deleted file mode 100644 index 31f44ce0d0e..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/FileMatch.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir.config; - -import java.io.File; -import java.io.FileFilter; -import java.util.Arrays; -import java.util.Date; -import java.util.logging.Logger; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * The FileMatch Java Bean is used to model - * the configuration of a {@link FileFilter} which - * matches {@link File files} against a set of criteria. - *

                    - * The FileMatch class also implements - * {@link FileFilter} - applying an {@code AND} on all - * its conditions. {@code OR} conditions can be obtained - * by supplying several instances of FileMatch - * to the encapsulating {@link DirectoryScannerConfig}, which - * respectively applies an {@code OR} on all its - * {@code } elements. - *

                    - * - *

                    - * This class is annotated for XML binding. - *

                    - * @author Sun Microsystems, 2006 - All rights reserved. - */ -@XmlRootElement(name="FileFilter", - namespace=XmlConfigUtils.NAMESPACE) -public class FileMatch implements FileFilter { - - // - // A logger for this class. - // - // private static final Logger LOG = - // Logger.getLogger(FileMatch.class.getName()); - - /** - * A regular expression against which directory names should be matched. - */ - private String directoryPattern; - - /** - * A regular expression against which file names should be matched. - */ - private String filePattern; - - /** - * File whose size in bytes exceeds this limit will be selected. - */ - private long sizeExceedsMaxBytes; - - /** - * A file which will be selected only if it was last modified after - * this date - */ - private Date lastModifiedAfter; - - /** - * A file which will be selected only if it was last modified before - * this date - */ - private Date lastModifiedBefore; - - /** - * Creates a new instance of FileMatch - */ - public FileMatch() { - } - - /** - * Getter for property directoryPattern. This is a regular expression - * against which directory names should be matched. - * Applies only to directory, and tells whether a directory should be - * included or excluded from the search. - *

                    If File.isDirectory() && directoryPattern!=null && - * File.getName().matches(directoryPattern), - * then File matches this filter.
                    - * If File.isDirectory() && directoryPattern!=null && - * File.getName().matches(directoryPattern)==false, - * then File doesn't match this filter.
                    - *

                    - * @see java.util.regex.Pattern - * @see java.lang.String#matches(java.lang.String) - * @return Value of property directoryPattern. - */ - @XmlElement(name="DirectoryPattern",namespace=XmlConfigUtils.NAMESPACE) - public String getDirectoryPattern() { - return this.directoryPattern; - } - - /** - * Setter for property directoryPattern. - * @param directoryPattern New value of property directoryPattern. - * This is a regular expression - * against which directory names should be {@link #getDirectoryPattern - * matched}. - * @see java.util.regex.Pattern - * @see java.lang.String#matches(java.lang.String) - */ - public void setDirectoryPattern(String directoryPattern) { - this.directoryPattern = directoryPattern; - } - - /** - * Getter for property filePattern. This is a regular expression - * against which file names should be matched. - * Applies only to files. - *

                    - * If File.isDirectory()==false && filePattern!=null && - * File.getName().matches(filePattern)==false, - * then File doesn't match this filter. - *

                    - * @see java.util.regex.Pattern - * @see java.lang.String#matches(java.lang.String) - * @return Value of property filePatern. - */ - @XmlElement(name="FilePattern",namespace=XmlConfigUtils.NAMESPACE) - public String getFilePattern() { - return this.filePattern; - } - - /** - * Setter for property filePattern. - * @param filePattern New value of property filePattern. - * This is a regular expression - * against which file names should be {@link #getFilePattern matched}. - * @see java.util.regex.Pattern - * @see java.lang.String#matches(java.lang.String) - */ - public void setFilePattern(String filePattern) { - this.filePattern = filePattern; - } - - /** - * Getter for property sizeExceedsMaxBytes. - * Ignored if 0 or negative. Otherwise, files whose size in bytes does - * not exceed this limit will be excluded by this filter. - * - * @return Value of property sizeExceedsMaxBytes. - */ - @XmlElement(name="SizeExceedsMaxBytes",namespace=XmlConfigUtils.NAMESPACE) - public long getSizeExceedsMaxBytes() { - return this.sizeExceedsMaxBytes; - } - - /** - * Setter for property sizeExceedsMaxBytes. - * @param sizeLimitInBytes New value of property sizeExceedsMaxBytes. - * Ignored if 0 or negative. Otherwise, files whose size in bytes does - * not exceed this limit will be excluded by this filter. - * - */ - public void setSizeExceedsMaxBytes(long sizeLimitInBytes) { - this.sizeExceedsMaxBytes = sizeLimitInBytes; - } - - /** - * Getter for property {@code lastModifiedAfter}. - * A file will be selected only if it was last modified after - * {@code lastModifiedAfter}. - *
                    This condition is ignored if {@code lastModifiedAfter} is - * {@code null}. - * @return Value of property {@code lastModifiedAfter}. - */ - @XmlElement(name="LastModifiedAfter",namespace=XmlConfigUtils.NAMESPACE) - public Date getLastModifiedAfter() { - return (lastModifiedAfter==null)?null:(Date)lastModifiedAfter.clone(); - } - - /** - * Setter for property {@code lastModifiedAfter}. - * @param lastModifiedAfter A file will be selected only if it was - * last modified after {@code lastModifiedAfter}. - *
                    This condition is ignored if {@code lastModifiedAfter} is - * {@code null}. - */ - public void setLastModifiedAfter(Date lastModifiedAfter) { - this.lastModifiedAfter = - (lastModifiedAfter==null)?null:(Date)lastModifiedAfter.clone(); - } - - /** - * Getter for property {@code lastModifiedBefore}. - * A file will be selected only if it was last modified before - * {@code lastModifiedBefore}. - *
                    This condition is ignored if {@code lastModifiedBefore} is - * {@code null}. - * @return Value of property {@code lastModifiedBefore}. - */ - @XmlElement(name="LastModifiedBefore",namespace=XmlConfigUtils.NAMESPACE) - public Date getLastModifiedBefore() { - return (lastModifiedBefore==null)?null:(Date)lastModifiedBefore.clone(); - } - - /** - * Setter for property {@code lastModifiedBefore}. - * @param lastModifiedBefore A file will be selected only if it was - * last modified before {@code lastModifiedBefore}. - *
                    This condition is ignored if {@code lastModifiedBefore} is - * {@code null}. - */ - public void setLastModifiedBefore(Date lastModifiedBefore) { - this.lastModifiedBefore = - (lastModifiedBefore==null)?null:(Date)lastModifiedBefore.clone(); - } - - // Accepts or rejects a file with regards to the values of the fields - // configured in this bean. The accept() method is the implementation - // of FileFilter.accept(File); - // - /** - * A file is accepted when all the criteria that have been set - * are matched. - * @param f The file to match against the configured criteria. - * @return {@code true} if the file matches all criteria, - * {@code false} otherwise. - */ - public boolean accept(File f) { - - // Directories are accepted if they match against the directory pattern. - // - if (f.isDirectory()) { - if (directoryPattern != null - && !f.getName().matches(directoryPattern)) - return false; - else return true; - } - - // If we reach here, the f is not a directory. - // - // Files are accepted if they match all other conditions. - - // Check whether f matches filePattern - if (filePattern != null - && !f.getName().matches(filePattern)) - return false; - - // Check whether f exceeeds size limit - if (sizeExceedsMaxBytes > 0 && f.length() <= sizeExceedsMaxBytes) - return false; - - // Check whether f was last modified after lastModifiedAfter - if (lastModifiedAfter != null && - lastModifiedAfter.after(new Date(f.lastModified()))) - return false; - - // Check whether f was last modified before lastModifiedBefore - if (lastModifiedBefore != null && - lastModifiedBefore.before(new Date(f.lastModified()))) - return false; - - // All conditions were met: accept file. - return true; - } - - // used by equals() - private Object[] toArray() { - final Object[] thisconfig = { - directoryPattern, filePattern, lastModifiedAfter, - lastModifiedBefore, sizeExceedsMaxBytes - }; - return thisconfig; - } - - @Override - public boolean equals(Object o) { - if (o == this) return true; - if (!(o instanceof FileMatch)) return false; - final FileMatch other = (FileMatch)o; - final Object[] thisconfig = toArray(); - final Object[] otherconfig = other.toArray(); - return Arrays.deepEquals(thisconfig,otherconfig); - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(toArray()); - } - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/ResultLogConfig.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/ResultLogConfig.java deleted file mode 100644 index 5f3d668c359..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/ResultLogConfig.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir.config; - -import java.util.Arrays; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * The ResultLogConfig Java Bean is used to model - * the initial configuration of the {@link - * com.sun.jmx.examples.scandir.ResultLogManagerMXBean}. - * - *

                    - * This class is annotated for XML binding. - *

                    - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -@XmlRootElement(name="ResultLogConfig", - namespace=XmlConfigUtils.NAMESPACE) -public class ResultLogConfig { - - // - // A logger for this class. - // - // private static final Logger LOG = - // Logger.getLogger(ResultLogConfig.class.getName()); - - /** - * The path to the result log file. {@code null} means that logging to - * file is disabled. - */ - private String logFileName; - - /** - * Maximum number of record that will be logged in the log file before - * switching to a new log file. - */ - private long logFileMaxRecords; - - /** - * The maximum number of records that can be contained in the memory log. - * When this number is reached, the memory log drops its eldest record - * to make way for the new one. - */ - private int memoryMaxRecords; - - /** - * Creates a new instance of ResultLogConfig - */ - public ResultLogConfig() { - } - - /** - * Gets the path to the result log file. {@code null} means that logging to - * file is disabled. - * @return the path to the result log file. - */ - @XmlElement(name="LogFileName",namespace=XmlConfigUtils.NAMESPACE) - public String getLogFileName() { - return this.logFileName; - } - - /** - * Sets the path to the result log file. {@code null} means that - * logging to file is disabled. - * @param logFileName the path to the result log file. - */ - public void setLogFileName(String logFileName) { - this.logFileName = logFileName; - } - - /** - * Gets the maximum number of record that will be logged in the log file - * before switching to a new log file. - * A 0 or negative value means no limit. - * @return the maximum number of record that will be logged in the log file. - */ - @XmlElement(name="LogFileMaxRecords",namespace=XmlConfigUtils.NAMESPACE) - public long getLogFileMaxRecords() { - return this.logFileMaxRecords; - } - - /** - * Sets the maximum number of record that will be logged in the log file - * before switching to a new log file. - * A 0 or negative value means no limit. - * @param logFileMaxRecords the maximum number of record that will be - * logged in the log file. - */ - public void setLogFileMaxRecords(long logFileMaxRecords) { - this.logFileMaxRecords = logFileMaxRecords; - } - - /** - * Gets the maximum number of records that can be contained in the memory - * log. - * When this number is reached, the memory log drops its eldest record - * to make way for the new one. - * @return the maximum number of records that can be contained in the - * memory log. - */ - @XmlElement(name="MemoryMaxRecords",namespace=XmlConfigUtils.NAMESPACE) - public int getMemoryMaxRecords() { - return this.memoryMaxRecords; - } - - /** - * Sets the maximum number of records that can be contained in the memory - * log. - * When this number is reached, the memory log drops its eldest record - * to make way for the new one. - * @param memoryMaxRecords the maximum number of records that can be - * contained in the memory log. - */ - public void setMemoryMaxRecords(int memoryMaxRecords) { - this.memoryMaxRecords = memoryMaxRecords; - } - - private Object[] toArray() { - final Object[] thisconfig = { - memoryMaxRecords,logFileMaxRecords,logFileName - }; - return thisconfig; - } - - @Override - public boolean equals(Object o) { - if (o == this) return true; - if (!(o instanceof ResultLogConfig)) return false; - final ResultLogConfig other = (ResultLogConfig)o; - return Arrays.deepEquals(toArray(),other.toArray()); - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(toArray()); - } -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/ResultRecord.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/ResultRecord.java deleted file mode 100644 index 5e3188aedbc..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/ResultRecord.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir.config; - -import java.util.Date; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlList; -import javax.xml.bind.annotation.XmlRootElement; -import com.sun.jmx.examples.scandir.config.DirectoryScannerConfig.Action; -import java.io.File; -import java.util.Arrays; - -/** - * The ResultRecord Java Bean is used to write the - * results of a directory scan to a result log. - * - *

                    - * This class is annotated for XML binding. - *

                    - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -@XmlRootElement(name="ResultRecord",namespace=XmlConfigUtils.NAMESPACE) -public class ResultRecord { - - /** - * The name of the file for which this result record is built. - */ - private String filename; - - /** - * The Date at which this result was obtained. - */ - private Date date; - - /** - * The short name of the directory scanner which performed the operation. - * @see DirectoryScannerConfig#getName() - */ - private String directoryScanner; - - /** - * The list of actions that were successfully carried out. - */ - private Action[] actions; - - /** - * Creates a new empty instance of ResultRecord. - */ - public ResultRecord() { - } - - /** - * Creates a new instance of ResultRecord. - * @param scan The DirectoryScannerConfig for which this result was - * obtained. - * @param actions The list of actions that were successfully carried out. - * @param f The file for which these actions were successfully carried out. - */ - public ResultRecord(DirectoryScannerConfig scan, Action[] actions, - File f) { - directoryScanner = scan.getName(); - this.actions = actions; - date = new Date(); - filename = f.getAbsolutePath(); - } - - /** - * Gets the name of the file for which this result record is built. - * @return The name of the file for which this result record is built. - */ - @XmlElement(name="Filename",namespace=XmlConfigUtils.NAMESPACE) - public String getFilename() { - return this.filename; - } - - /** - * Sets the name of the file for which this result record is being built. - * @param filename the name of the file for which this result record is - * being built. - */ - public void setFilename(String filename) { - this.filename = filename; - } - - /** - * Gets the Date at which this result was obtained. - * @return the Date at which this result was obtained. - */ - @XmlElement(name="Date",namespace=XmlConfigUtils.NAMESPACE) - public Date getDate() { - synchronized(this) { - return (date==null)?null:(new Date(date.getTime())); - } - } - - /** - * Sets the Date at which this result was obtained. - * @param date the Date at which this result was obtained. - */ - public void setDate(Date date) { - synchronized (this) { - this.date = (date==null)?null:(new Date(date.getTime())); - } - } - - /** - * Gets the short name of the directory scanner which performed the - * operation. - * @see DirectoryScannerConfig#getName() - * @return the short name of the directory scanner which performed the - * operation. - */ - @XmlElement(name="DirectoryScanner",namespace=XmlConfigUtils.NAMESPACE) - public String getDirectoryScanner() { - return this.directoryScanner; - } - - /** - * Sets the short name of the directory scanner which performed the - * operation. - * @see DirectoryScannerConfig#getName() - * @param directoryScanner the short name of the directory scanner which - * performed the operation. - */ - public void setDirectoryScanner(String directoryScanner) { - this.directoryScanner = directoryScanner; - } - - /** - * Gets the list of actions that were successfully carried out. - * @return the list of actions that were successfully carried out. - */ - @XmlElement(name="Actions",namespace=XmlConfigUtils.NAMESPACE) - @XmlList - public Action[] getActions() { - return (actions == null)?null:actions.clone(); - } - - /** - * Sets the list of actions that were successfully carried out. - * @param actions the list of actions that were successfully carried out. - */ - public void setActions(Action[] actions) { - this.actions = (actions == null)?null:actions.clone(); - } - - // Used for equality - private Object[] toArray() { - final Object[] thisconfig = { - filename, date, directoryScanner, actions - }; - return thisconfig; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof ResultRecord)) return false; - return Arrays.deepEquals(toArray(),((ResultRecord)o).toArray()); - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(toArray()); - } -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/ScanManagerConfig.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/ScanManagerConfig.java deleted file mode 100644 index e1afcce3814..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/ScanManagerConfig.java +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir.config; - -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * The ScanManagerConfig Java Bean is used to model - * the configuration of the {@link - * com.sun.jmx.examples.scandir.ScanManagerMXBean ScanManagerMXBean}. - * - * The {@link - * com.sun.jmx.examples.scandir.ScanManagerMXBean ScanManagerMXBean} will - * use this configuration to initialize the {@link - * com.sun.jmx.examples.scandir.ResultLogManagerMXBean ResultLogManagerMXBean} - * and create the {@link - * com.sun.jmx.examples.scandir.DirectoryScannerMXBean DirectoryScannerMXBeans} - *

                    - * This class is annotated for XML binding. - *

                    - * - * @author Sun Microsystems, 2006 - All rights reserved. - **/ -@XmlRootElement(name="ScanManager", - namespace="jmx:com.sun.jmx.examples.scandir.config") -public class ScanManagerConfig { - - // A logger for this class - // - // private static final Logger LOG = - // Logger.getLogger(ScanManagerConfig.class.getName()); - - /** - * A set of DirectoryScannerConfig objects indexed by their names. - **/ - private final Map directoryScanners; - - /** - * The initial Result Log configuration. - */ - private ResultLogConfig initialResultLogConfig; - - /** - * Holds value of property name. The name of the configuration - * usually corresponds to - * the value of the {@code name=} key of the {@code ObjectName} - * of the {@link - * com.sun.jmx.examples.scandir.ScanDirConfigMXBean - * ScanDirConfigMXBean} which owns this configuration. - **/ - private String name; - - /** - * Creates a new instance of ScanManagerConfig. - *

                    You should not use this constructor directly, but use - * {@link #ScanManagerConfig(String)} instead. - *

                    - *

                    This constructor is tagged deprecated so that the compiler - * will generate a warning if it is used by mistake. - *

                    - * @deprecated Use {@link #ScanManagerConfig(String)} instead. This - * constructor is used through reflection by the XML - * binding framework. - */ - public ScanManagerConfig() { - this(null,true); - } - - /** - * Creates a new instance of ScanManagerConfig. - * @param name The name of the configuration which usually corresponds to - * the value of the {@code name=} key of the {@code ObjectName} - * of the {@link - * com.sun.jmx.examples.scandir.ScanDirConfigMXBean - * ScanDirConfigMXBean} which owns this configuration. - **/ - public ScanManagerConfig(String name) { - this(name,false); - } - - // Our private constructor... - private ScanManagerConfig(String name, boolean allowsNull) { - if (name == null && allowsNull==false) - throw new IllegalArgumentException("name=null"); - this.name = name; - directoryScanners = new LinkedHashMap(); - this.initialResultLogConfig = new ResultLogConfig(); - this.initialResultLogConfig.setMemoryMaxRecords(1024); - } - - // Creates an array for deep equality. - private Object[] toArray() { - final Object[] thisconfig = { - name,directoryScanners,initialResultLogConfig - }; - return thisconfig; - } - - // equals - @Override - public boolean equals(Object o) { - if (o == this) return true; - if (!(o instanceof ScanManagerConfig)) return false; - final ScanManagerConfig other = (ScanManagerConfig)o; - if (this.directoryScanners.size() != other.directoryScanners.size()) - return false; - return Arrays.deepEquals(toArray(),other.toArray()); - } - - @Override - public int hashCode() { - final String key = name; - if (key == null) return 0; - else return key.hashCode(); - } - - /** - * Gets the name of this configuration. The name of the configuration - * usually corresponds to - * the value of the {@code name=} key of the {@code ObjectName} - * of the {@link - * com.sun.jmx.examples.scandir.ScanDirConfigMXBean - * ScanDirConfigMXBean} which owns this configuration. - * @return The name of this configuration. - */ - @XmlAttribute(name="name",required=true) - public String getName() { - return this.name; - } - - /** - * Sets the name of this configuration. The name of the configuration - * usually corresponds to - * the value of the {@code name=} key of the {@code ObjectName} - * of the {@link - * com.sun.jmx.examples.scandir.ScanDirConfigMXBean - * ScanDirConfigMXBean} which owns this configuration. - *

                    Once set this value cannot change.

                    - * @param name The name of this configuration. - */ - public void setName(String name) { - if (this.name == null) - this.name = name; - else if (name == null) - throw new IllegalArgumentException("name=null"); - else if (!name.equals(this.name)) - throw new IllegalArgumentException("name="+name); - } - - /** - * Gets the list of Directory Scanner configured by this - * configuration. From each element in this list, the - * {@link com.sun.jmx.examples.scandir.ScanManagerMXBean ScanManagerMXBean} - * will create, initialize, and register a {@link - * com.sun.jmx.examples.scandir.DirectoryScannerMXBean}. - * @return The list of Directory Scanner configured by this configuration. - */ - @XmlElementWrapper(name="DirectoryScannerList", - namespace=XmlConfigUtils.NAMESPACE) - @XmlElementRef - public DirectoryScannerConfig[] getScanList() { - return directoryScanners.values().toArray(new DirectoryScannerConfig[0]); - } - - /** - * Sets the list of Directory Scanner configured by this - * configuration. From each element in this list, the - * {@link com.sun.jmx.examples.scandir.ScanManagerMXBean ScanManagerMXBean} - * will create, initialize, and register a {@link - * com.sun.jmx.examples.scandir.DirectoryScannerMXBean}. - * @param scans The list of Directory Scanner configured by this configuration. - */ - public void setScanList(DirectoryScannerConfig[] scans) { - directoryScanners.clear(); - for (DirectoryScannerConfig scan : scans) - directoryScanners.put(scan.getName(),scan); - } - - /** - * Get a directory scanner by its name. - * - * @param name The name of the directory scanner. This is the - * value returned by {@link - * DirectoryScannerConfig#getName()}. - * @return The named {@code DirectoryScannerConfig} - */ - public DirectoryScannerConfig getScan(String name) { - return directoryScanners.get(name); - } - - /** - * Adds a directory scanner to the list. - *

                    If a directory scanner - * configuration by that name already exists in the list, it will - * be replaced by the given scan. - *

                    - * @param scan The {@code DirectoryScannerConfig} to add to the list. - * @return The replaced {@code DirectoryScannerConfig}, or {@code null} - * if there was no {@code DirectoryScannerConfig} by that name - * in the list. - */ - public DirectoryScannerConfig putScan(DirectoryScannerConfig scan) { - return this.directoryScanners.put(scan.getName(),scan); - } - - // XML value of this object. - public String toString() { - return XmlConfigUtils.toString(this); - } - - /** - * Removes the named directory scanner from the list. - * - * @param name The name of the directory scanner. This is the - * value returned by {@link - * DirectoryScannerConfig#getName()}. - * @return The removed {@code DirectoryScannerConfig}, or {@code null} - * if there was no directory scanner by that name in the list. - */ - public DirectoryScannerConfig removeScan(String name) { - return this.directoryScanners.remove(name); - } - - /** - * Gets the initial Result Log Configuration. - * @return The initial Result Log Configuration. - */ - @XmlElement(name="InitialResultLogConfig",namespace=XmlConfigUtils.NAMESPACE) - public ResultLogConfig getInitialResultLogConfig() { - return this.initialResultLogConfig; - } - - /** - * Sets the initial Result Log Configuration. - * @param initialLogConfig The initial Result Log Configuration. - */ - public void setInitialResultLogConfig(ResultLogConfig initialLogConfig) { - this.initialResultLogConfig = initialLogConfig; - } - - /** - * Creates a copy of this object, with the specified name. - * @param newname the name of the copy. - * @return A copy of this object. - **/ - public ScanManagerConfig copy(String newname) { - return copy(newname,this); - } - - // Copy by XML cloning, then change the name. - // - private static ScanManagerConfig - copy(String newname, ScanManagerConfig other) { - ScanManagerConfig newbean = XmlConfigUtils.xmlClone(other); - newbean.name = newname; - return newbean; - } -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/XmlConfigUtils.java b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/XmlConfigUtils.java deleted file mode 100644 index a3e663d329d..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/XmlConfigUtils.java +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir.config; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.logging.Logger; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; - -/** - * The class XmlConfigUtils is used to deal with XML serialization - * and XML files. - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public class XmlConfigUtils { - - /** - * A URI for our XML configuration namespace. This doesn't start with - * http:// because we are not going to publish this private schema - * anywhere. - **/ - public static final String NAMESPACE = - "jmx:com.sun.jmx.examples.scandir.config"; - /** - * A logger for this class. - **/ - private static final Logger LOG = - Logger.getLogger(XmlConfigUtils.class.getName()); - - // Our JAXBContext. - private static JAXBContext context; - - // The file name of the XML file in which an instance of this object - // will read and write XML data. - final String file; - - /** - * Creates a new instance of XmlConfigUtils. - * @param file The file name of the XML file in which an instance of this - * object will read and write XML data. - */ - public XmlConfigUtils(String file) { - this.file = file; - } - - /** - * Write the given bean to the XML file. - *

                    - * Performs an atomic write, first writing in {@code .new}, then - * renaming {@code } to {@code ~}, then renaming - * renaming {@code .new} to {@code }. - *

                    - * @param bean The configuration to write in the XML file. - * @throws IOException if write to file failed. - **/ - public synchronized void writeToFile(ScanManagerConfig bean) - throws IOException { - - // Creates a new file named .new - final File f = newXmlTmpFile(file); - try { - final FileOutputStream out = new FileOutputStream(f); - boolean failed = true; - try { - // writes to .new - write(bean,out,false); - - // no exception: set failed=false for finaly {} block. - failed = false; - } finally { - out.close(); - // An exception was raised: delete temporary file. - if (failed == true) f.delete(); - } - - // rename to ~ and .new to - commit(file,f); - } catch (JAXBException x) { - final IOException io = - new IOException("Failed to write SessionConfigBean to " + - file+": "+x,x); - throw io; - } - } - - /** - * Creates an XML string representation of the given bean. - * @throws IllegalArgumentException if the bean class is not known by the - * underlying XMLbinding context. - * @return An XML string representation of the given bean. - **/ - public static String toString(Object bean) { - try { - final ByteArrayOutputStream baos = new ByteArrayOutputStream(); - final Marshaller m = createMarshaller(); - m.setProperty(m.JAXB_FRAGMENT,Boolean.TRUE); - m.marshal(bean, baos); - return baos.toString(); - } catch (JAXBException x) { - final IllegalArgumentException iae = - new IllegalArgumentException( - "Failed to write SessionConfigBean: "+x,x); - throw iae; - } - } - - /** - * Creates an XML clone of the given bean. - *

                    - * In other words, this method XML-serializes the given bean, and - * XML-deserializes a copy of that bean. - *

                    - * @return A deep-clone of the given bean. - * @throws IllegalArgumentException if the bean class is not known by the - * underlying XML binding context. - * @param bean The bean to clone. - */ - public static ScanManagerConfig xmlClone(ScanManagerConfig bean) { - final Object clone = copy(bean); - return (ScanManagerConfig)clone; - } - - /** - * Creates an XML clone of the given bean. - *

                    - * In other words, this method XML-serializes the given bean, and - * XML-deserializes a copy of that bean. - *

                    - * @throws IllegalArgumentException if the bean class is not known by the - * underlying XML binding context. - * @return A deep-clone of the given bean. - **/ - private static Object copy(Object bean) { - try { - final ByteArrayOutputStream baos = new ByteArrayOutputStream(); - final Marshaller m = createMarshaller(); - m.marshal(bean, baos); - final ByteArrayInputStream bais = - new ByteArrayInputStream(baos.toByteArray()); - return createUnmarshaller().unmarshal(bais); - } catch (JAXBException x) { - final IllegalArgumentException iae = - new IllegalArgumentException("Failed to write SessionConfigBean: "+x,x); - throw iae; - } - } - - /** - * Creates an XML clone of the given bean. - *

                    - * In other words, this method XML-serializes the given bean, and - * XML-deserializes a copy of that bean. - *

                    - * @return A deep-clone of the given bean. - * @throws IllegalArgumentException if the bean class is not known by the - * underlying XML binding context. - * @param bean The bean to clone. - */ - public static DirectoryScannerConfig xmlClone(DirectoryScannerConfig bean) { - final Object clone = copy(bean); - return (DirectoryScannerConfig)clone; - } - - /** - * Reads the configuration from the XML configuration file. - * @throws IOException if it fails to read the configuration. - * @return A {@code ScanManagerConfig} bean read from the - * XML configuration file. - **/ - public synchronized ScanManagerConfig readFromFile() throws IOException { - final File f = new File(file); - if (!f.exists()) - throw new IOException("No such file: "+file); - if (!f.canRead()) - throw new IOException("Can't read file: "+file); - try { - return read(f); - } catch (JAXBException x) { - final IOException io = - new IOException("Failed to read SessionConfigBean from " + - file+": "+x,x); - throw io; - } - } - - /** - * Reads the configuration from the given XML configuration file. - * @param f the file to read from. - * @return A {@code ScanManagerConfig} bean read from the - * XML configuration file. - * @throws javax.xml.bind.JAXBException if it fails to read the configuration. - */ - public static ScanManagerConfig read(File f) - throws JAXBException { - final Unmarshaller u = createUnmarshaller(); - return (ScanManagerConfig) u.unmarshal(f); - - } - - /** - * Writes the given bean to the given output stream. - * @param bean the bean to write. - * @param os the output stream to write to. - * @param fragment whether the {@code } header should be - * included. The header is not included if the bean is just an - * XML fragment encapsulated in a higher level XML element. - * @throws JAXBException An XML Binding exception occurred. - **/ - public static void write(ScanManagerConfig bean, OutputStream os, - boolean fragment) - throws JAXBException { - writeXml((Object)bean,os,fragment); - } - - /** - * Writes the given bean to the given output stream. - * @param bean the bean to write. - * @param os the output stream to write to. - * @param fragment whether the {@code } header should be - * included. The header is not included if the bean is just an - * XML fragment encapsulated in a higher level XML element. - * @throws JAXBException An XML Binding exception occurred. - **/ - public static void write(ResultRecord bean, OutputStream os, boolean fragment) - throws JAXBException { - writeXml((Object)bean,os,fragment); - } - - /** - * Writes the given bean to the given output stream. - * @param bean the bean to write. - * @param os the output stream to write to. - * @param fragment whether the {@code } header should be - * included. The header is not included if the bean is just an - * XML fragment encapsulated in a higher level XML element. - * @throws JAXBException An XML Binding exception occurred. - **/ - private static void writeXml(Object bean, OutputStream os, boolean fragment) - throws JAXBException { - final Marshaller m = createMarshaller(); - if (fragment) m.setProperty(m.JAXB_FRAGMENT,Boolean.TRUE); - m.marshal(bean,os); - } - - // Creates a JAXB Unmarshaller. - private static Unmarshaller createUnmarshaller() throws JAXBException { - return getContext().createUnmarshaller(); - } - - // Creates a JAXB Marshaller - for nicely XML formatted output. - private static Marshaller createMarshaller() throws JAXBException { - final Marshaller m = getContext().createMarshaller(); - m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE); - return m; - } - - // Creates a JAXBContext if needed, and returns it. - // The JAXBContext instance we create will be able to handle the - // ScanManagerConfig and ResultRecord classes, plus all the property - // classes they reference (DirectoryScannerBean etc...). - // - private static synchronized JAXBContext getContext() throws JAXBException { - if (context == null) - context = JAXBContext.newInstance(ScanManagerConfig.class, - ResultRecord.class); - return context; - } - - - // Creates a new XML temporary file called .new - // This method is used to implement atomic writing to file. - // The usual sequence is: - // - // Final tmp = newXmlTmpFile(basename); - // boolean failed = true; - // try { - // ... write to 'tmp' ... - // // no exception: set failed=false for finaly {} block. - // failed = false; - // } finally - // // failed==true means there was an exception and - // // commit won't be called... - // if (failed==true) tmp.delete(); - // } - // commit(tmp,basename) - // - private static File newXmlTmpFile(String basename) throws IOException { - final File f = new File(basename+".new"); - if (!f.createNewFile()) - throw new IOException("file "+f.getName()+" already exists"); - - try { - final OutputStream newStream = new FileOutputStream(f); - try { - final String decl = - ""; - newStream.write(decl.getBytes("UTF-8")); - newStream.flush(); - } finally { - newStream.close(); - } - } catch (IOException x) { - f.delete(); - throw x; - } - return f; - } - - // Commit the temporary file by renaming to ~ - // and tmpFile to . - private static File commit(String basename, File tmpFile) - throws IOException { - try { - final String backupName = basename+"~"; - final File desired = new File(basename); - final File backup = new File(backupName); - backup.delete(); - if (desired.exists()) { - if (!desired.renameTo(new File(backupName))) - throw new IOException("can't rename to "+backupName); - } - if (!tmpFile.renameTo(new File(basename))) - throw new IOException("can't rename to "+basename); - } catch (IOException x) { - tmpFile.delete(); - throw x; - } - return new File(basename); - } - - /** - * Creates a new committed XML file for {@code }, containing only - * the {@code } header. - *

                    This method will rename {@code } to {@code ~}, - * if it exists. - *

                    - * @return A newly created XML file containing the regular - * {@code } header. - * @param basename The name of the new file. - * @throws IOException if the new XML file couldn't be created. - */ - public static File createNewXmlFile(String basename) throws IOException { - return commit(basename,newXmlTmpFile(basename)); - } - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/package.html b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/package.html deleted file mode 100644 index 5390c298870..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/package.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - com.sun.jmx.examples.scandir.config - - -

                    - This package defines plain Java Beans, annotated for - XML bindings, and used to store and model the scandir - application configuration. -

                    -

                    All the Java Beans defined in this package have been - designed to be naturally serialized by JAXB. - Their bean properties were designed to minimize - the number of XML annotation required, as well as - making them transparently convertible by the - JMX MXBean framework. -

                    -

                    The {@link com.sun.jmx.examples.scandir.config.ScanManagerConfig} - bean corresponds to the root element of the application's configuration. - From an instance of this element, the - {@link com.sun.jmx.examples.scandir.ScanManagerMXBean} will be - able to initialize the - {@link com.sun.jmx.examples.scandir.ResultLogManagerMXBean} and will - create, register and initialize - {@link com.sun.jmx.examples.scandir.DirectoryScannerMXBean DirectoryScannerMXBeans} -

                    -

                    The {@link com.sun.jmx.examples.scandir.config.XmlConfigUtils} class is a simple utility - classes used to deal with XML and XML configuration files. -

                    -

                    The {@link com.sun.jmx.examples.scandir.config.ResultRecord ResultRecords} - are used to store the results of directory scans in the result logs - managed by the {@link com.sun.jmx.examples.scandir.ResultLogManagerMXBean} -

                    - - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/package.html b/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/package.html deleted file mode 100644 index 54d317217ee..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/package.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - com.sun.jmx.examples.scandir - - -

                    - This package defines the set of MBeans which compose the - management interface of the scandir application. -

                    - - - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/etc/access.properties b/jdk/src/sample/share/jmx/jmx-scandir/src/etc/access.properties deleted file mode 100644 index 4f120b37ed8..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/etc/access.properties +++ /dev/null @@ -1,51 +0,0 @@ -###################################################################### -# Default Access Control File for Remote JMX(TM) Monitoring -###################################################################### -# -# Access control file for Remote JMX API access to monitoring. -# This file defines the allowed access for different roles. The -# password file (jmxremote.password by default) defines the roles and their -# passwords. To be functional, a role must have an entry in -# both the password and the access files. -# -# Default location of this file is $JRE/conf/management/jmxremote.access -# You can specify an alternate location by specifying a property in -# the management config file $JRE/conf/management/management.properties -# (See that file for details) -# -# The file format for password and access files is syntactically the same -# as the Properties file format. The syntax is described in the Javadoc -# for java.util.Properties.load. -# Typical access file has multiple lines, where each line is blank, -# a comment (like this one), or an access control entry. -# -# An access control entry consists of a role name, and an -# associated access level. The role name is any string that does not -# itself contain spaces or tabs. It corresponds to an entry in the -# password file (jmxremote.password). The access level is one of the -# following: -# "readonly" grants access to read attributes of MBeans. -# For monitoring, this means that a remote client in this -# role can read measurements but cannot perform any action -# that changes the environment of the running program. -# "readwrite" grants access to read and write attributes of MBeans, -# to invoke operations on them, and to create or remove them. -# This access should be granted to only trusted clients, -# since they can potentially interfere with the smooth -# operation of a running program -# -# A given role should have at most one entry in this file. If a role -# has no entry, it has no access. -# If multiple entries are found for the same role name, then the last -# access entry is used. -# -# -# Default access control entries: -# o The "monitorRole" role has readonly access. -# o The "controlRole" role has readwrite access. -# -# monitorRole readonly -# controlRole readwrite - -guest readonly -admin readwrite diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/etc/management.properties b/jdk/src/sample/share/jmx/jmx-scandir/src/etc/management.properties deleted file mode 100644 index bad0407e323..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/etc/management.properties +++ /dev/null @@ -1,273 +0,0 @@ -##################################################################### -# Default Configuration File for Java Platform Management -##################################################################### -# -# The Management Configuration file (in java.util.Properties format) -# will be read if one of the following system properties is set: -# -Dcom.sun.management.jmxremote.port= -# or -Dcom.sun.management.snmp.port= -# or -Dcom.sun.management.config.file= -# -# The default Management Configuration file is: -# -# $JRE/conf/management/management.properties -# -# Another location for the Management Configuration File can be specified -# by the following property on the Java command line: -# -# -Dcom.sun.management.config.file= -# -# If -Dcom.sun.management.config.file= is set, the port -# number for the management agent can be specified in the config file -# using the following lines: -# -# ################ Management Agent Port ######################### -# -# For setting the JMX RMI agent port use the following line -com.sun.management.jmxremote.port=4545 -# -# For setting the SNMP agent port use the following line -# com.sun.management.snmp.port= - -##################################################################### -# Optional Instrumentation -##################################################################### -# -# By default only the basic instrumentation with low overhead is on. -# The following properties allow to selectively turn on optional -# instrumentation which are off by default and may have some -# additional overhead. -# -# com.sun.management.enableThreadContentionMonitoring -# -# This option enables thread contention monitoring if the -# Java virtual machine supports such instrumentation. -# Refer to the specification for the java.lang.management.ThreadMBean -# interface - see isThreadContentionMonitoringSupported() method. -# - -# To enable thread contention monitoring, uncomment the following line -# com.sun.management.enableThreadContentionMonitoring - -##################################################################### -# SNMP Management Properties -##################################################################### -# -# If the system property -Dcom.sun.management.snmp.port= -# is set then -# - The SNMP agent (with the Java virtual machine MIB) is started -# that listens on the specified port for incoming SNMP requests. -# - the following properties for read for SNMP management. -# -# The configuration can be specified only at startup time. -# Later changes to the above system property (e.g. via setProperty method), this -# config file, or the ACL file has no effect to the running SNMP agent. -# - -# -# ##################### SNMP Trap Port ######################### -# -# com.sun.management.snmp.trap= -# Specifies the remote port number at which managers are expected -# to listen for trap. For each host defined in the ACL file, -# the SNMP agent will send traps at : -# Default for this property is 162. -# - -# To set port for sending traps to a different port use the following line -# com.sun.management.snmp.trap= - -# -# ################ SNMP listen interface ######################### -# -# com.sun.management.snmp.interface= -# Specifies the local interface on which the SNMP agent will bind. -# This is usefull when running on machines which have several -# interfaces defined. It makes it possible to listen to a specific -# subnet accessible through that interface. -# Default for this property is "localhost". -# -# The format of the value for that property is any string accepted -# by java.net.InetAddress.getByName(String). -# - -# For restricting the port on which SNMP agent listens use the following line -# com.sun.management.snmp.interface= - -# -# #################### SNMP ACL file ######################### -# -# com.sun.management.snmp.acl=true|false -# Default for this property is true. (Case for true/false ignored) -# If this property is specified as false then the ACL file -# is not checked: all manager hosts are allowed all access. -# - -# For SNMP without checking ACL file uncomment the following line -# com.sun.management.snmp.acl=false - -# -# com.sun.management.snmp.acl.file=filepath -# Specifies location for ACL file -# This is optional - default location is -# $JRE/conf/management/snmp.acl -# -# If the property "com.sun.management.snmp.acl" is set to false, -# then this property and the ACL file are ignored. -# Otherwise the ACL file must exist and be in the valid format. -# If the ACL file is empty or non existent then no access is allowed. -# -# The SNMP agent will read the ACL file at startup time. -# Modification to the ACL file has no effect to any running SNMP -# agents which read that ACL file at startup. -# - -# For a non-default acl file location use the following line -# com.sun.management.snmp.acl.file=filepath - -##################################################################### -# RMI Management Properties -##################################################################### -# -# If system property -Dcom.sun.management.jmxremote.port= -# is set then -# - A MBean server is started -# - JRE Platform MBeans are registered in the MBean server -# - RMI connector is published in a private readonly registry at -# specified port using a well known name, "jmxrmi" -# - the following properties are read for JMX remote management. -# -# The configuration can be specified only at startup time. -# Later changes to above system property (e.g. via setProperty method), -# this config file, the password file, or the access file have no effect to the -# running MBean server, the connector, or the registry. -# - -# -# ###################### RMI SSL ############################# -# -# com.sun.management.jmxremote.ssl=true|false -# Default for this property is true. (Case for true/false ignored) -# If this property is specified as false then SSL is not used. -# - -# For RMI monitoring without SSL use the following line -# com.sun.management.jmxremote.ssl=false - -# com.sun.management.jmxremote.ssl.enabled.cipher.suites= -# The value of this property is a string that is a comma-separated list -# of SSL/TLS cipher suites to enable. This property can be specified in -# conjunction with the previous property "com.sun.management.jmxremote.ssl" -# in order to control which particular SSL/TLS cipher suites are enabled -# for use by accepted connections. If this property is not specified then -# the SSL/TLS RMI Server Socket Factory uses the SSL/TLS cipher suites that -# are enabled by default. -# - -# com.sun.management.jmxremote.ssl.enabled.protocols= -# The value of this property is a string that is a comma-separated list -# of SSL/TLS protocol versions to enable. This property can be specified in -# conjunction with the previous property "com.sun.management.jmxremote.ssl" -# in order to control which particular SSL/TLS protocol versions are -# enabled for use by accepted connections. If this property is not -# specified then the SSL/TLS RMI Server Socket Factory uses the SSL/TLS -# protocol versions that are enabled by default. -# - -# com.sun.management.jmxremote.ssl.need.client.auth=true|false -# Default for this property is false. (Case for true/false ignored) -# If this property is specified as true in conjunction with the previous -# property "com.sun.management.jmxremote.ssl" then the SSL/TLS RMI Server -# Socket Factory will require client authentication. -# - -# For RMI monitoring with SSL client authentication use the following line -com.sun.management.jmxremote.ssl.need.client.auth=true - -# com.sun.management.jmxremote.registry.ssl=true|false -# Default for this property is false. (Case for true/false ignored) -# If this property is specified as true then the RMI registry used -# to bind the RMIServer remote object is protected with SSL/TLS -# RMI Socket Factories that can be configured with the properties: -# com.sun.management.jmxremote.ssl.enabled.cipher.suites -# com.sun.management.jmxremote.ssl.enabled.protocols -# com.sun.management.jmxremote.ssl.need.client.auth -# If the two properties below are true at the same time, i.e. -# com.sun.management.jmxremote.ssl=true -# com.sun.management.jmxremote.registry.ssl=true -# then the RMIServer remote object and the RMI registry are -# both exported with the same SSL/TLS RMI Socket Factories. -# - -# For using an SSL/TLS protected RMI registry use the following line -com.sun.management.jmxremote.registry.ssl=true - -# -# ################ RMI User authentication ################ -# -# com.sun.management.jmxremote.authenticate=true|false -# Default for this property is true. (Case for true/false ignored) -# If this property is specified as false then no authentication is -# performed and all users are allowed all access. -# - -# For RMI monitoring without any checking use the following line -# com.sun.management.jmxremote.authenticate=false - -# -# ################ RMI Login configuration ################### -# -# com.sun.management.jmxremote.login.config= -# Specifies the name of a JAAS login configuration entry to use when -# authenticating users of RMI monitoring. -# -# Setting this property is optional - the default login configuration -# specifies a file-based authentication that uses the password file. -# -# When using this property to override the default login configuration -# then the named configuration entry must be in a file that gets loaded -# by JAAS. In addition, the login module(s) specified in the configuration -# should use the name and/or password callbacks to acquire the user's -# credentials. See the NameCallback and PasswordCallback classes in the -# javax.security.auth.callback package for more details. -# -# If the property "com.sun.management.jmxremote.authenticate" is set to -# false, then this property and the password & access files are ignored. -# - -# For a non-default login configuration use the following line -# com.sun.management.jmxremote.login.config= - -# -# ################ RMI Password file location ################## -# -# com.sun.management.jmxremote.password.file=filepath -# Specifies location for password file -# This is optional - default location is -# $JRE/conf/management/jmxremote.password -# -# If the property "com.sun.management.jmxremote.authenticate" is set to -# false, then this property and the password & access files are ignored. -# Otherwise the password file must exist and be in the valid format. -# If the password file is empty or non-existent then no access is allowed. -# - -# For a non-default password file location use the following line -com.sun.management.jmxremote.password.file=src/etc/password.properties - -# -# ################ RMI Access file location ##################### -# -# com.sun.management.jmxremote.access.file=filepath -# Specifies location for access file -# This is optional - default location is -# $JRE/conf/management/jmxremote.access -# -# If the property "com.sun.management.jmxremote.authenticate" is set to -# false, then this property and the password & access files are ignored. -# Otherwise, the access file must exist and be in the valid format. -# If the access file is empty or non-existent then no access is allowed. -# - -# For a non-default password file location use the following line -com.sun.management.jmxremote.access.file=src/etc/access.properties diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/etc/password.properties b/jdk/src/sample/share/jmx/jmx-scandir/src/etc/password.properties deleted file mode 100644 index 28e662242bc..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/etc/password.properties +++ /dev/null @@ -1,55 +0,0 @@ -############################################################## -# Password File for Remote JMX Monitoring -############################################################## -# -# Password file for Remote JMX API access to monitoring. This -# file defines the different roles and their passwords. The access -# control file (jmxremote.access by default) defines the allowed -# access for each role. To be functional, a role must have an entry -# in both the password and the access files. -# -# Default location of this file is $JRE/conf/management/jmxremote.password -# You can specify an alternate location by specifying a property in -# the management config file $JRE/conf/management/management.properties -# or by specifying a system property (See that file for details). - - -############################################################## -# File permissions of the jmxremote.password file -############################################################## -# Since there are cleartext passwords stored in this file, -# this file must be readable by ONLY the owner, -# otherwise the program will exit with an error. -# -# The file format for password and access files is syntactically the same -# as the Properties file format. The syntax is described in the Javadoc -# for java.util.Properties.load. -# Typical password file has multiple lines, where each line is blank, -# a comment (like this one), or a password entry. -# -# -# A password entry consists of a role name and an associated -# password. The role name is any string that does not itself contain -# spaces or tabs. The password is again any string that does not -# contain spaces or tabs. Note that passwords appear in the clear in -# this file, so it is a good idea not to use valuable passwords. -# -# A given role should have at most one entry in this file. If a role -# has no entry, it has no access. -# If multiple entries are found for the same role name, then the last one -# is used. -# -# In a typical installation, this file can be read by anybody on the -# local machine, and possibly by people on other machines. -# For # security, you should either restrict the access to this file, -# or specify another, less accessible file in the management config file -# as described above. -# -# Following are two commented-out entries. The "measureRole" role has -# password "QED". The "controlRole" role has password "R&D". -# -# monitorRole QED -# controlRole R&D - -guest guestpasswd -admin adminpasswd diff --git a/jdk/src/sample/share/jmx/jmx-scandir/src/etc/testconfig.xml b/jdk/src/sample/share/jmx/jmx-scandir/src/etc/testconfig.xml deleted file mode 100644 index cf0fecea1d7..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/src/etc/testconfig.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - 2048 - build/scandir.log - 128 - - - - NOTIFY LOGRESULT - - - - .*\.class - 4096 - - - build - - - diff --git a/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/DirectoryScannerTest.java b/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/DirectoryScannerTest.java deleted file mode 100644 index 06d1559fc49..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/DirectoryScannerTest.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import com.sun.jmx.examples.scandir.config.DirectoryScannerConfig; -import com.sun.jmx.examples.scandir.config.ResultRecord; -import com.sun.jmx.examples.scandir.config.ScanManagerConfig; -import java.util.LinkedList; -import java.util.concurrent.BlockingQueue; -import junit.framework.*; -import com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState; -import static com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState.*; -import com.sun.jmx.examples.scandir.ScanManagerTest.Call; -import java.util.EnumSet; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import javax.management.AttributeChangeNotification; -import javax.management.Notification; -import javax.management.NotificationEmitter; -import javax.management.NotificationFilter; -import javax.management.NotificationListener; - -import static com.sun.jmx.examples.scandir.ScanManagerTest.*; -import static com.sun.jmx.examples.scandir.TestUtils.*; -import java.io.File; -import java.lang.management.ManagementFactory; -import java.util.List; - -/** - * Unit tests for {@code DirectoryScanner} - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public class DirectoryScannerTest extends TestCase { - - public DirectoryScannerTest(String testName) { - super(testName); - } - - protected void setUp() throws Exception { - } - - protected void tearDown() throws Exception { - } - - public static Test suite() { - TestSuite suite = new TestSuite(DirectoryScannerTest.class); - - return suite; - } - - private void doTestOperation( - DirectoryScannerMXBean proxy, - Call op, - EnumSet after, - String testName) - throws Exception { - System.out.println("doTestOperation: "+testName); - - final LinkedBlockingQueue queue = - new LinkedBlockingQueue(); - - NotificationListener listener = new NotificationListener() { - public void handleNotification(Notification notification, - Object handback) { - try { - queue.put(notification); - } catch (Exception x) { - System.err.println("Failed to queue notif: "+x); - } - } - }; - NotificationFilter filter = null; - Object handback = null; - final ScanState before; - final NotificationEmitter emitter = (NotificationEmitter) - makeNotificationEmitter(proxy,DirectoryScannerMXBean.class); - emitter.addNotificationListener(listener, filter, handback); - before = proxy.getState(); - op.call(); - try { - final Notification notification = - queue.poll(3000,TimeUnit.MILLISECONDS); - assertEquals(AttributeChangeNotification.ATTRIBUTE_CHANGE, - notification.getType()); - assertEquals(AttributeChangeNotification.class, - notification.getClass()); - assertEquals(getObjectName(proxy), - notification.getSource()); - AttributeChangeNotification acn = - (AttributeChangeNotification)notification; - assertEquals("State",acn.getAttributeName()); - assertEquals(ScanState.class.getName(),acn.getAttributeType()); - assertEquals(before,ScanState.valueOf((String)acn.getOldValue())); - assertContained(after,ScanState.valueOf((String)acn.getNewValue())); - emitter.removeNotificationListener(listener,filter,handback); - } finally { - try { - op.cancel(); - } catch (Exception x) { - System.err.println("Failed to cleanup: "+x); - } - } - } - - - /** - * Test of getRootDirectory method, of class com.sun.jmx.examples.scandir.DirectoryScanner. - */ - public void testGetRootDirectory() throws Exception { - System.out.println("getRootDirectory"); - - final ScanManagerMXBean manager = ScanManager.register(); - try { - final String tmpdir = System.getProperty("java.io.tmpdir"); - final ScanDirConfigMXBean config = manager.getConfigurationMBean(); - System.err.println("Configuration MXBean is: " + config); - final DirectoryScannerConfig bean = - config.addDirectoryScanner("test",tmpdir,".*",0,0); - final String root = bean.getRootDirectory(); - if (root == null) - throw new NullPointerException("bean.getRootDirectory()"); - if (config.getConfiguration().getScan("test").getRootDirectory() == null) - throw new NullPointerException("config.getConfig().getScan(\"test\").getRootDirectory()"); - manager.applyConfiguration(true); - final DirectoryScannerMXBean proxy = - manager.getDirectoryScanners().get("test"); - final File tmpFile = new File(tmpdir); - final File rootFile = new File(proxy.getRootDirectory()); - assertEquals(tmpFile,rootFile); - } catch (Exception x) { - x.printStackTrace(); - throw x; - } finally { - try { - ManagementFactory.getPlatformMBeanServer(). - unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } catch (Exception x) { - System.err.println("Failed to cleanup: "+x); - } - } - } - - - /** - * Test of scan method, of class com.sun.jmx.examples.scandir.DirectoryScanner. - */ - public void testScan() throws Exception { - System.out.println("scan"); - - final ScanManagerMXBean manager = ScanManager.register(); - try { - final String tmpdir = System.getProperty("java.io.tmpdir"); - final ScanDirConfigMXBean config = manager.getConfigurationMBean(); - final DirectoryScannerConfig bean = - config.addDirectoryScanner("test1",tmpdir,".*",0,0); - config.addDirectoryScanner("test2",tmpdir,".*",0,0); - config.addDirectoryScanner("test3",tmpdir,".*",0,0); - manager.applyConfiguration(true); - final DirectoryScannerMXBean proxy = - manager.getDirectoryScanners().get("test1"); - final Call op = new Call() { - public void call() throws Exception { - final BlockingQueue queue = - new LinkedBlockingQueue(); - final NotificationListener listener = new NotificationListener() { - public void handleNotification(Notification notification, - Object handback) { - try { - queue.put(notification); - } catch (Exception e) { - e.printStackTrace(); - } - } - }; - manager.start(); - while(true) { - final Notification n = queue.poll(10,TimeUnit.SECONDS); - if (n == null) break; - final AttributeChangeNotification at = - (AttributeChangeNotification) n; - if (RUNNING == ScanState.valueOf((String)at.getNewValue())) - break; - else { - System.err.println("New state: "+(String)at.getNewValue() - +" isn't "+RUNNING); - } - } - assertContained(EnumSet.of(SCHEDULED,RUNNING,COMPLETED), - proxy.getState()); - } - public void cancel() throws Exception { - manager.stop(); - } - }; - doTestOperation(proxy,op, - EnumSet.of(RUNNING,SCHEDULED,COMPLETED), - "scan"); - } catch (Exception x) { - x.printStackTrace(); - throw x; - } finally { - try { - manager.stop(); - } catch (Exception x) { - System.err.println("Failed to stop: "+x); - } - try { - ManagementFactory.getPlatformMBeanServer(). - unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } catch (Exception x) { - System.err.println("Failed to cleanup: "+x); - } - } - } - - /** - * Test of getState method, of class com.sun.jmx.examples.scandir.DirectoryScanner. - */ - public void testGetState() { - System.out.println("getState"); - - final DirectoryScannerConfig bean = - new DirectoryScannerConfig("test"); - bean.setRootDirectory(System.getProperty("java.io.tmpdir")); - final ResultLogManager log = new ResultLogManager(); - DirectoryScanner instance = - new DirectoryScanner(bean,log); - - ScanState expResult = STOPPED; - ScanState result = instance.getState(); - assertEquals(STOPPED, result); - instance.scan(); - result = instance.getState(); - assertEquals(COMPLETED, result); - } - - /** - * Test of addNotificationListener method, of class com.sun.jmx.examples.scandir.DirectoryScanner. - */ - public void testAddNotificationListener() throws Exception { - System.out.println("addNotificationListener"); - - final ScanManagerMXBean manager = ScanManager.register(); - final Call op = new Call() { - public void call() throws Exception { - manager.start(); - } - public void cancel() throws Exception { - manager.stop(); - } - }; - try { - final String tmpdir = System.getProperty("java.io.tmpdir"); - final ScanDirConfigMXBean config = manager.getConfigurationMBean(); - final DirectoryScannerConfig bean = - config.addDirectoryScanner("test1",tmpdir,".*",0,0); - manager.applyConfiguration(true); - final DirectoryScannerMXBean proxy = - manager.getDirectoryScanners().get("test1"); - doTestOperation(proxy,op, - EnumSet.of(RUNNING,SCHEDULED), - "scan"); - } finally { - try { - ManagementFactory.getPlatformMBeanServer(). - unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } catch (Exception x) { - System.err.println("Failed to cleanup: "+x); - } - } - } - - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/ScanDirConfigTest.java b/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/ScanDirConfigTest.java deleted file mode 100644 index c7e95994838..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/ScanDirConfigTest.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import com.sun.jmx.examples.scandir.config.XmlConfigUtils; -import com.sun.jmx.examples.scandir.config.FileMatch; -import java.io.FileOutputStream; -import java.io.IOException; -import java.lang.management.ManagementFactory; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import junit.framework.*; -import com.sun.jmx.examples.scandir.config.DirectoryScannerConfig; -import com.sun.jmx.examples.scandir.config.ScanManagerConfig; -import java.io.File; -import java.util.concurrent.BlockingQueue; -import javax.management.*; - -/** - * Unit tests for {@code ScanDirConfig} - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public class ScanDirConfigTest extends TestCase { - - public ScanDirConfigTest(String testName) { - super(testName); - } - - protected void setUp() throws Exception { - } - - protected void tearDown() throws Exception { - } - - public static Test suite() { - TestSuite suite = new TestSuite(ScanDirConfigTest.class); - - return suite; - } - - /** - * Test of load method, of class com.sun.jmx.examples.scandir.ScanDirConfig. - */ - public void testLoad() throws Exception { - System.out.println("load"); - - final File file = File.createTempFile("testconf",".xml"); - final ScanDirConfig instance = new ScanDirConfig(file.getAbsolutePath()); - final ScanManagerConfig bean = - new ScanManagerConfig("testLoad"); - final DirectoryScannerConfig dir = - new DirectoryScannerConfig("tmp"); - dir.setRootDirectory(file.getParent()); - bean.putScan(dir); - XmlConfigUtils.write(bean,new FileOutputStream(file),false); - instance.load(); - - assertEquals(bean,instance.getConfiguration()); - bean.removeScan(dir.getName()); - XmlConfigUtils.write(bean,new FileOutputStream(file),false); - - assertNotSame(bean,instance.getConfiguration()); - - instance.load(); - - assertEquals(bean,instance.getConfiguration()); - - } - - /** - * Test of save method, of class com.sun.jmx.examples.scandir.ScanDirConfig. - */ - public void testSave() throws Exception { - System.out.println("save"); - - final File file = File.createTempFile("testconf",".xml"); - final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); - final ScanManagerMXBean manager = ScanManager.register(mbs); - - try { - final ScanDirConfigMXBean instance = - manager.createOtherConfigurationMBean("testSave",file.getAbsolutePath()); - assertTrue(mbs.isRegistered( - ScanManager.makeScanDirConfigName("testSave"))); - final ScanManagerConfig bean = - new ScanManagerConfig("testSave"); - final DirectoryScannerConfig dir = - new DirectoryScannerConfig("tmp"); - dir.setRootDirectory(file.getParent()); - bean.putScan(dir); - instance.setConfiguration(bean); - instance.save(); - final ScanManagerConfig loaded = - new XmlConfigUtils(file.getAbsolutePath()).readFromFile(); - assertEquals(instance.getConfiguration(),loaded); - assertEquals(bean,loaded); - - instance.getConfiguration().removeScan("tmp"); - instance.save(); - assertNotSame(loaded,instance.getConfiguration()); - final ScanManagerConfig loaded2 = - new XmlConfigUtils(file.getAbsolutePath()).readFromFile(); - assertEquals(instance.getConfiguration(),loaded2); - } finally { - manager.close(); - mbs.unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } - final ObjectName all = - new ObjectName(ScanManager.SCAN_MANAGER_NAME.getDomain()+":*"); - assertEquals(0,mbs.queryNames(all,null).size()); - } - - /** - * Test of saveTo method, of class com.sun.jmx.examples.scandir.ScanProfile. - */ - /* - public void testSaveTo() throws Exception { - System.out.println("saveTo"); - - String filename = ""; - ScanDirConfig instance = null; - - instance.saveTo(filename); - - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); - } - */ - - /** - * Test of getXmlConfigString method, of class com.sun.jmx.examples.scandir.ScanDirConfig. - */ - public void testGetXmlConfigString() throws Exception { - System.out.println("getXmlConfigString"); - - try { - final File file = File.createTempFile("testconf",".xml"); - final ScanDirConfig instance = new ScanDirConfig(file.getAbsolutePath()); - final ScanManagerConfig bean = - new ScanManagerConfig("testGetXmlConfigString"); - final DirectoryScannerConfig dir = - new DirectoryScannerConfig("tmp"); - dir.setRootDirectory(file.getParent()); - bean.putScan(dir); - instance.setConfiguration(bean); - System.out.println("Expected: " + XmlConfigUtils.toString(bean)); - System.out.println("Received: " + - instance.getConfiguration().toString()); - assertEquals(XmlConfigUtils.toString(bean), - instance.getConfiguration().toString()); - } catch (Exception x) { - x.printStackTrace(); - throw x; - } - } - - - /** - * Test of addNotificationListener method, of class - * com.sun.jmx.examples.scandir.ScanDirConfig. - */ - public void testAddNotificationListener() throws Exception { - System.out.println("addNotificationListener"); - - final File file = File.createTempFile("testconf",".xml"); - final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); - final ScanManagerMXBean manager = ScanManager.register(mbs); - - try { - final ScanDirConfigMXBean instance = - TestUtils.makeNotificationEmitter( - manager.createOtherConfigurationMBean("testSave", - file.getAbsolutePath()), - ScanDirConfigMXBean.class); - assertTrue(mbs.isRegistered( - ScanManager.makeScanDirConfigName("testSave"))); - DirectoryScannerConfig dir = - instance.addDirectoryScanner("tmp",file.getParent(),".*",0,0); - - final BlockingQueue queue = - new LinkedBlockingQueue(); - final NotificationListener listener = new NotificationListener() { - public void handleNotification(Notification notification, - Object handback) { - queue.add(notification); - } - }; - NotificationFilter filter = null; - Object handback = null; - - ((NotificationEmitter)instance).addNotificationListener(listener, - filter, handback); - - instance.save(); - final ScanManagerConfig loaded = - new XmlConfigUtils(file.getAbsolutePath()).readFromFile(); - assertEquals(instance.getConfiguration(),loaded); - - final ScanManagerConfig newConfig = - instance.getConfiguration(); - newConfig.removeScan("tmp"); - instance.setConfiguration(newConfig); - instance.save(); - assertNotSame(loaded,instance.getConfiguration()); - final ScanManagerConfig loaded2 = - new XmlConfigUtils(file.getAbsolutePath()).readFromFile(); - assertEquals(instance.getConfiguration(),loaded2); - instance.load(); - for (int i=0;i<4;i++) { - final Notification n = queue.poll(3,TimeUnit.SECONDS); - assertNotNull(n); - assertEquals(TestUtils.getObjectName(instance),n.getSource()); - switch(i) { - case 0: case 2: - assertEquals(ScanDirConfig.NOTIFICATION_SAVED,n.getType()); - break; - case 1: - assertEquals(ScanDirConfig.NOTIFICATION_MODIFIED,n.getType()); - break; - case 3: - assertEquals(ScanDirConfig.NOTIFICATION_LOADED,n.getType()); - break; - default: break; - } - } - } finally { - manager.close(); - mbs.unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } - final ObjectName all = - new ObjectName(ScanManager.SCAN_MANAGER_NAME.getDomain()+":*"); - assertEquals(0,mbs.queryNames(all,null).size()); - } - - /** - * Test of getConfigFilename method, of class - * com.sun.jmx.examples.scandir.ScanDirConfig. - */ - public void testGetConfigFilename() throws Exception { - System.out.println("getConfigFilename"); - - final File file = File.createTempFile("testconf",".xml"); - final ScanDirConfig instance = new ScanDirConfig(file.getAbsolutePath()); - - String result = instance.getConfigFilename(); - assertEquals(file.getAbsolutePath(), new File(result).getAbsolutePath()); - - } - - /** - * Test of addDirectoryScanner method, of class - * com.sun.jmx.examples.scandir.ScanDirConfig. - */ - public void testAddDirectoryScanner() throws IOException { - System.out.println("addDirectoryScanner"); - - System.out.println("save"); - - final File file = File.createTempFile("testconf",".xml"); - final ScanDirConfig instance = new ScanDirConfig(file.getAbsolutePath()); - final ScanManagerConfig bean = - new ScanManagerConfig("testSave"); - final DirectoryScannerConfig dir = - new DirectoryScannerConfig("tmp"); - dir.setRootDirectory(file.getParent()); - FileMatch filter = new FileMatch(); - filter.setFilePattern(".*"); - dir.setIncludeFiles(new FileMatch[] { - filter - }); - instance.setConfiguration(bean); - instance.addDirectoryScanner(dir.getName(), - dir.getRootDirectory(), - filter.getFilePattern(), - filter.getSizeExceedsMaxBytes(), - 0); - instance.save(); - final ScanManagerConfig loaded = - new XmlConfigUtils(file.getAbsolutePath()).readFromFile(); - assertNotNull(loaded.getScan(dir.getName())); - assertEquals(dir,loaded.getScan(dir.getName())); - assertEquals(instance.getConfiguration(),loaded); - assertEquals(instance.getConfiguration().getScan(dir.getName()),dir); - } - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/ScanManagerTest.java b/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/ScanManagerTest.java deleted file mode 100644 index 94e3c981187..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/ScanManagerTest.java +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import javax.management.InstanceNotFoundException; -import javax.management.Notification; -import junit.framework.*; -import static com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState.*; -import com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState; -import java.io.IOException; -import java.lang.management.ManagementFactory; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.logging.Logger; -import javax.management.AttributeChangeNotification; -import javax.management.JMException; -import javax.management.JMX; -import javax.management.ListenerNotFoundException; -import javax.management.MBeanNotificationInfo; -import javax.management.MBeanRegistration; -import javax.management.MBeanServer; -import javax.management.MBeanServerConnection; -import javax.management.NotificationBroadcasterSupport; -import javax.management.NotificationEmitter; -import javax.management.NotificationFilter; -import javax.management.NotificationListener; -import javax.management.ObjectInstance; -import javax.management.ObjectName; - -import static com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState.*; - -/** - * Unit tests for {@code ScanManager} - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public class ScanManagerTest extends TestCase { - - public ScanManagerTest(String testName) { - super(testName); - } - - protected void setUp() throws Exception { - } - - protected void tearDown() throws Exception { - } - - public static Test suite() { - TestSuite suite = new TestSuite(ScanManagerTest.class); - - return suite; - } - - /** - * Test of makeSingletonName method, of class com.sun.jmx.examples.scandir.ScanManager. - */ - public void testMakeSingletonName() { - System.out.println("makeSingletonName"); - - Class clazz = ScanManagerMXBean.class; - - ObjectName expResult = ScanManager.SCAN_MANAGER_NAME; - ObjectName result = ScanManager.makeSingletonName(clazz); - assertEquals(expResult, result); - - } - - /** - * Test of register method, of class com.sun.jmx.examples.scandir.ScanManager. - */ - public void testRegister() throws Exception { - System.out.println("register"); - - MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); - - - ScanManagerMXBean result = ScanManager.register(mbs); - try { - assertEquals(STOPPED,result.getState()); - } finally { - try { - mbs.unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } catch (Exception x) { - System.err.println("Failed to cleanup: "+x); - } - } - - } - - public interface Call { - public void call() throws Exception; - public void cancel() throws Exception; - } - - /** - * Test of addNotificationListener method, of class com.sun.jmx.examples.scandir.ScanManager. - */ - public void testAddNotificationListener() throws Exception { - System.out.println("addNotificationListener"); - - final ScanManagerMXBean manager = ScanManager.register(); - final Call op = new Call() { - public void call() throws Exception { - manager.schedule(100000,0); - } - public void cancel() throws Exception { - manager.stop(); - } - }; - try { - doTestOperation(manager,op, - EnumSet.of(RUNNING,SCHEDULED), - "schedule"); - } finally { - try { - ManagementFactory.getPlatformMBeanServer(). - unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } catch (Exception x) { - System.err.println("Failed to cleanup: "+x); - } - } - } - - /** - * Test of addNotificationListener method, of class com.sun.jmx.examples.scandir.ScanManager. - */ - private void doTestOperation( - ScanManagerMXBean proxy, - Call op, - EnumSet after, - String testName) - throws Exception { - System.out.println("doTestOperation: "+testName); - - final LinkedBlockingQueue queue = - new LinkedBlockingQueue(); - - NotificationListener listener = new NotificationListener() { - public void handleNotification(Notification notification, - Object handback) { - try { - queue.put(notification); - } catch (Exception x) { - System.err.println("Failed to queue notif: "+x); - } - } - }; - NotificationFilter filter = null; - Object handback = null; - final ScanState before; - final NotificationEmitter emitter = (NotificationEmitter)proxy; - emitter.addNotificationListener(listener, filter, handback); - before = proxy.getState(); - op.call(); - try { - final Notification notification = - queue.poll(3000,TimeUnit.MILLISECONDS); - assertEquals(AttributeChangeNotification.ATTRIBUTE_CHANGE, - notification.getType()); - assertEquals(AttributeChangeNotification.class, - notification.getClass()); - assertEquals(ScanManager.SCAN_MANAGER_NAME, - notification.getSource()); - AttributeChangeNotification acn = - (AttributeChangeNotification)notification; - assertEquals("State",acn.getAttributeName()); - assertEquals(ScanState.class.getName(),acn.getAttributeType()); - assertEquals(before,ScanState.valueOf((String)acn.getOldValue())); - assertContained(after,ScanState.valueOf((String)acn.getNewValue())); - emitter.removeNotificationListener(listener,filter,handback); - } finally { - try { - op.cancel(); - } catch (Exception x) { - System.err.println("Failed to cleanup: "+x); - } - } - } - - /** - * Test of preRegister method, of class com.sun.jmx.examples.scandir.ScanManager. - */ - public void testPreRegister() throws Exception { - System.out.println("preRegister"); - - MBeanServer server = ManagementFactory.getPlatformMBeanServer(); - ObjectName name = new ObjectName("DownUnder:type=Wombat"); - ScanManager instance = new ScanManager(); - - ObjectName expResult = ScanManager.SCAN_MANAGER_NAME; - ObjectName result; - try { - result = instance.preRegister(server, name); - throw new RuntimeException("bad name accepted!"); - } catch (IllegalArgumentException x) { - // OK! - result = instance.preRegister(server, null); - } - assertEquals(expResult, result); - result = instance.preRegister(server, ScanManager.SCAN_MANAGER_NAME); - assertEquals(expResult, result); - } - - - /** - * Test of getState method, of class com.sun.jmx.examples.scandir.ScanManager. - */ - public void testGetState() throws IOException, InstanceNotFoundException { - System.out.println("getState"); - - ScanManager instance = new ScanManager(); - - ScanState expResult = ScanState.STOPPED; - ScanState result = instance.getState(); - assertEquals(expResult, result); - instance.start(); - final ScanState afterStart = instance.getState(); - assertContained(EnumSet.of(RUNNING,SCHEDULED,COMPLETED),afterStart); - instance.stop(); - assertEquals(STOPPED,instance.getState()); - instance.schedule(1000000L,1000000L); - assertEquals(SCHEDULED,instance.getState()); - instance.stop(); - assertEquals(STOPPED,instance.getState()); - } - - /** - * Test of schedule method, of class com.sun.jmx.examples.scandir.ScanManager. - */ - public void testSchedule() throws Exception { - System.out.println("schedule"); - - final long delay = 10000L; - final long interval = 10000L; - - final ScanManagerMXBean manager = ScanManager.register(); - final Call op = new Call() { - public void call() throws Exception { - manager.schedule(delay,interval); - assertEquals(SCHEDULED,manager.getState()); - } - public void cancel() throws Exception { - manager.stop(); - } - }; - try { - doTestOperation(manager,op,EnumSet.of(SCHEDULED), - "schedule"); - } finally { - try { - ManagementFactory.getPlatformMBeanServer(). - unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } catch (Exception x) { - System.err.println("Failed to cleanup: "+x); - } - } - } - - public static void assertContained(EnumSet allowed, - ScanState state) { - final String msg = String.valueOf(state) + " is not one of " + allowed; - assertTrue(msg,allowed.contains(state)); - } - - /** - * Test of stop method, of class com.sun.jmx.examples.scandir.ScanManager. - */ - public void testStop() throws Exception { - System.out.println("stop"); - final ScanManagerMXBean manager = ScanManager.register(); - try { - manager.schedule(1000000,0); - assertContained(EnumSet.of(SCHEDULED),manager.getState()); - final Call op = new Call() { - public void call() throws Exception { - manager.stop(); - assertEquals(STOPPED,manager.getState()); - } - public void cancel() throws Exception { - if (manager.getState() != STOPPED) - manager.stop(); - } - }; - doTestOperation(manager,op,EnumSet.of(STOPPED),"stop"); - } finally { - try { - ManagementFactory.getPlatformMBeanServer(). - unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } catch (Exception x) { - System.err.println("Failed to cleanup: "+x); - } - } - } - - /** - * Test of start method, of class com.sun.jmx.examples.scandir.ScanManager. - */ - public void testStart() throws Exception { - final ScanManagerMXBean manager = ScanManager.register(); - try { - final Call op = new Call() { - public void call() throws Exception { - assertEquals(STOPPED,manager.getState()); - manager.start(); - assertContained(EnumSet.of(RUNNING,SCHEDULED,COMPLETED), - manager.getState()); - } - public void cancel() throws Exception { - manager.stop(); - } - }; - doTestOperation(manager,op,EnumSet.of(RUNNING,SCHEDULED,COMPLETED), - "start"); - } finally { - try { - ManagementFactory.getPlatformMBeanServer(). - unregisterMBean(ScanManager.SCAN_MANAGER_NAME); - } catch (Exception x) { - System.err.println("Failed to cleanup: "+x); - } - } - } - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/TestUtils.java b/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/TestUtils.java deleted file mode 100644 index 483294992c7..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/TestUtils.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir; - -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Proxy; -import java.util.logging.Logger; -import javax.management.JMX; -import javax.management.MBeanServerConnection; -import javax.management.MBeanServerInvocationHandler; -import javax.management.NotificationEmitter; -import javax.management.ObjectName; - -/** - * A utility class defining static methods used by our tests. - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public class TestUtils { - - /** - * A logger for this class. - **/ - private static final Logger LOG = - Logger.getLogger(TestUtils.class.getName()); - - /** Creates a new instance of TestUtils */ - private TestUtils() { - } - - /** - * Returns the ObjectName of the MBean that a proxy object - * is proxying. - **/ - public static ObjectName getObjectName(Object proxy) { - if (!(proxy instanceof Proxy)) - throw new IllegalArgumentException("not a "+Proxy.class.getName()); - final Proxy p = (Proxy) proxy; - final InvocationHandler handler = - Proxy.getInvocationHandler(proxy); - if (handler instanceof MBeanServerInvocationHandler) - return ((MBeanServerInvocationHandler)handler).getObjectName(); - throw new IllegalArgumentException("not a JMX Proxy"); - } - - /** - * Transfroms a proxy implementing T in a proxy implementing T plus - * NotificationEmitter - * - **/ - public static T makeNotificationEmitter(T proxy, - Class mbeanInterface) { - if (proxy instanceof NotificationEmitter) - return proxy; - if (proxy == null) return null; - if (!(proxy instanceof Proxy)) - throw new IllegalArgumentException("not a "+Proxy.class.getName()); - final Proxy p = (Proxy) proxy; - final InvocationHandler handler = - Proxy.getInvocationHandler(proxy); - if (!(handler instanceof MBeanServerInvocationHandler)) - throw new IllegalArgumentException("not a JMX Proxy"); - final MBeanServerInvocationHandler h = - (MBeanServerInvocationHandler)handler; - final ObjectName name = h.getObjectName(); - final MBeanServerConnection mbs = h.getMBeanServerConnection(); - final boolean isMXBean = h.isMXBean(); - final T newProxy; - if (isMXBean) - newProxy = JMX.newMXBeanProxy(mbs,name,mbeanInterface,true); - else - newProxy = JMX.newMBeanProxy(mbs,name,mbeanInterface,true); - return newProxy; - } - -} diff --git a/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/config/XmlConfigUtilsTest.java b/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/config/XmlConfigUtilsTest.java deleted file mode 100644 index e4cea497dcb..00000000000 --- a/jdk/src/sample/share/jmx/jmx-scandir/test/com/sun/jmx/examples/scandir/config/XmlConfigUtilsTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.jmx.examples.scandir.config; - -import junit.framework.*; -import java.io.File; - -/** - * Unit tests for {@code XmlConfigUtils} - * - * @author Sun Microsystems, 2006 - All rights reserved. - */ -public class XmlConfigUtilsTest extends TestCase { - - public XmlConfigUtilsTest(String testName) { - super(testName); - } - - protected void setUp() throws Exception { - } - - protected void tearDown() throws Exception { - } - - public static Test suite() { - TestSuite suite = new TestSuite(XmlConfigUtilsTest.class); - - return suite; - } - - - /** - * Test of writeToFile method, of class XmlConfigUtils. - */ - public void testWriteToFile() throws Exception { - System.out.println("writeToFile"); - - final File file = File.createTempFile("test",".xml"); - file.deleteOnExit(); - - final String tmp = System.getProperty("java.io.tmpdir"); - - DirectoryScannerConfig dir1 = - new DirectoryScannerConfig("scan2"); - dir1.setRootDirectory(tmp); - ScanManagerConfig bean = new ScanManagerConfig("session2"); - bean.putScan(dir1); - XmlConfigUtils instance = new XmlConfigUtils(file.getPath()); - - instance.writeToFile(bean); - } - - /** - * Test of readFromFile method, of class com.sun.jmx.examples.scandir.config.XmlConfigUtils. - */ - public void testReadFromFile() throws Exception { - System.out.println("readFromFile"); - - final String tmp = System.getProperty("java.io.tmpdir"); - final File file = File.createTempFile("test",".xml"); - file.deleteOnExit(); - - DirectoryScannerConfig dir1 = - new DirectoryScannerConfig("scan1"); - dir1.setRootDirectory(tmp); - ScanManagerConfig bean = new ScanManagerConfig("session1"); - bean.putScan(dir1); - XmlConfigUtils instance = new XmlConfigUtils(file.getPath()); - - instance.writeToFile(bean); - - ScanManagerConfig expResult = bean; - ScanManagerConfig result = instance.readFromFile(); - System.out.println(result); - assertEquals(expResult, result); - - - } - -} diff --git a/jdk/src/sample/share/lambda/BulkDataOperations/index.html b/jdk/src/sample/share/lambda/BulkDataOperations/index.html deleted file mode 100644 index cd118fc564c..00000000000 --- a/jdk/src/sample/share/lambda/BulkDataOperations/index.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - Bulk Data Operations Demo - - -

                    Bulk Data Operations Demo

                    - -

                    - This demo shows how to use bulk data operations with the new JDK8 - Collections API. - The demo also demonstrates new features of JDK8 such as lambda expressions - and method/constructor references. -

                    - -
                      -
                    • CSV Processor

                      - -

                      - Analyzes a CSV file, finds and collects useful information, computes - different statistics. For more information, see the source file. -

                      - Source: src/CSVProcessor.java -
                    • Grep

                      - -

                      - Behaves like the standard Linux tool Grep. For more information, see - the source file. -

                      - Source: src/Grep.java -
                    • PasswordGenerator

                      - -

                      - Produces a password of desired length. For more information see - source file. -

                      - Source: src/PasswordGenerator.java -
                    • WC

                      - -

                      - Counts newlines, words, characters, and the maximum line length of a - text file. For more information, see the source - file. -

                      - Source: src/WC.java -
                    - - diff --git a/jdk/src/sample/share/lambda/BulkDataOperations/src/CSVProcessor.java b/jdk/src/sample/share/lambda/BulkDataOperations/src/CSVProcessor.java deleted file mode 100644 index ded9030209d..00000000000 --- a/jdk/src/sample/share/lambda/BulkDataOperations/src/CSVProcessor.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation, and proper error handling, might not be present in - * this sample code. - */ - -import java.io.BufferedReader; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.*; -import java.util.function.*; -import java.util.regex.Pattern; -import java.util.stream.Collector; -import java.util.stream.Collectors; - -import static java.lang.Double.parseDouble; -import static java.util.stream.Collectors.*; - -/** - * CSVProcessor is a tool for processing CSV files. There are several - * command-line options. Consult the {@link #printUsageAndExit} method for - * instructions and command line parameters. This sample shows examples of the - * following features: - *
                      - *
                    • Lambda and bulk operations. Working with streams: map(...), filter(...), - * sorted(...) methods. The collect(...) method with different collectors: - * Collectors.maxBy(...), Collectors.minBy(...), Collectors.toList(), - * Collectors.toCollection(...), Collectors.groupingBy(...), - * Collectors.toDoubleSummaryStatistics(...), and a custom Collector.
                    • - *
                    • Static method reference for printing values.
                    • - *
                    • Try-with-resources feature for closing files.
                    • - *
                    • Switch by String feature.
                    • - *
                    • Other new APIs: Pattern.asPredicate(), BinaryOperator - * BufferedReader.lines(), Collection.forEach(...), Comparator.comparing(...), - * Comparator.reversed(), Arrays.stream(...).
                    • - *
                    - * - */ -public class CSVProcessor { - - //Number of characters that may be read - private static final int READ_AHEAD_LIMIT = 100_000_000; - - /** - * The main method for the CSVProcessor program. Run the program with an - * empty argument list to see possible arguments. - * - * @param args the argument list for CSVProcessor. - */ - public static void main(String[] args) { - if (args.length < 2) { - printUsageAndExit(); - } - try (BufferedReader br = new BufferedReader( - Files.newBufferedReader(Paths.get(args[args.length - 1])))) { - //Assume that the first line contains column names. - List header = Arrays.stream(br.readLine().split(",")) - .map(String::trim).collect(toList()); - //Calculate an index of the column in question. - int column = getColumnNumber(header, args[1]); - switch (args[0]) { - case "sort": - verifyArgumentNumber(args, 4); - //Define the sort order. - boolean isAsc; - switch (args[2].toUpperCase()) { - case "ASC": - isAsc = true; - break; - case "DESC": - isAsc = false; - break; - default: - printUsageAndExit("Illegal argument" + args[2]); - return;//Should not be reached. - } - /* - * Create a comparator that compares lines by comparing - * values in the specified column. - */ - Comparator cmp - = Comparator.comparing(str -> getCell(str, column), - String.CASE_INSENSITIVE_ORDER); - /* - * sorted(...) is used to sort records. - * forEach(...) is used to output sorted records. - */ - br.lines().sorted(isAsc ? cmp : cmp.reversed()) - .forEach(System.out::println); - break; - case "search": - verifyArgumentNumber(args, 4); - /* - * Records are filtered by a regex. - * forEach(...) is used to output filtered records. - */ - Predicate pattern - = Pattern.compile(args[2]).asPredicate(); - br.lines().filter(str -> pattern.test(getCell(str, column))) - .forEach(System.out::println); - break; - case "groupby": - verifyArgumentNumber(args, 3); - /* - * Group lines by values in the column with collect(...), and - * print with forEach(...) for every distinct value within - * the column. - */ - br.lines().collect( - Collectors.groupingBy(str -> getCell(str, column), - toCollection(TreeSet::new))) - .forEach((str, set) -> { - System.out.println(str + ":"); - set.forEach(System.out::println); - }); - break; - case "stat": - verifyArgumentNumber(args, 3); - - /* - * BufferedReader will be read several times. - * Mark this point to return here after each pass. - * BufferedReader will be read right after the headers line - * because it is already read. - */ - br.mark(READ_AHEAD_LIMIT); - - /* - * Statistics can be collected by a custom collector in one - * pass. One pass is preferable. - */ - System.out.println( - br.lines().collect(new Statistics(column))); - - /* - * Alternatively, statistics can be collected - * by a built-in API in several passes. - * This method demonstrates how separate operations can be - * implemented using a built-in API. - */ - br.reset(); - statInSeveralPasses(br, column); - break; - default: - printUsageAndExit("Illegal argument" + args[0]); - } - } catch (IOException e) { - printUsageAndExit(e.toString()); - } - } - - private static void statInSeveralPasses(BufferedReader br, int column) - throws IOException { - System.out.println("#-----Statistics in several passes-------#"); - //Create a comparator to compare records by the column. - Comparator comparator - = Comparator.comparing( - (String str) -> parseDouble(getCell(str, column))); - //Find max record by using Collectors.maxBy(...) - System.out.println( - "Max: " + br.lines().collect(maxBy(comparator)).get()); - br.reset(); - //Find min record by using Collectors.minBy(...) - System.out.println( - "Min: " + br.lines().collect(minBy(comparator)).get()); - br.reset(); - //Compute the average value and sum with - //Collectors.toDoubleSummaryStatistics(...) - DoubleSummaryStatistics doubleSummaryStatistics - = br.lines().collect(summarizingDouble( - str -> parseDouble(getCell(str, column)))); - System.out.println("Average: " + doubleSummaryStatistics.getAverage()); - System.out.println("Sum: " + doubleSummaryStatistics.getSum()); - } - - private static void verifyArgumentNumber(String[] args, int n) { - if (args.length != n) { - printUsageAndExit("Expected " + n + " arguments but was " - + args.length); - } - } - - private static int getColumnNumber(List header, String name) { - int column = header.indexOf(name); - if (column == -1) { - printUsageAndExit("There is no column with name " + name); - } - return column; - } - - private static String getCell(String record, int column) { - return record.split(",")[column].trim(); - } - - private static void printUsageAndExit(String... str) { - System.out.println("Usages:"); - - System.out.println("CSVProcessor sort COLUMN_NAME ASC|DESC FILE"); - System.out.println("Sort lines by column COLUMN_NAME in CSV FILE\n"); - - System.out.println("CSVProcessor search COLUMN_NAME REGEX FILE"); - System.out.println("Search for REGEX in column COLUMN_NAME in CSV FILE\n"); - - System.out.println("CSVProcessor groupby COLUMN_NAME FILE"); - System.out.println("Split lines into different groups according to column " - + "COLUMN_NAME value\n"); - - System.out.println("CSVProcessor stat COLUMN_NAME FILE"); - System.out.println("Compute max/min/average/sum statistics by column " - + "COLUMN_NAME\n"); - - Arrays.asList(str).forEach(System.err::println); - System.exit(1); - } - - /* - * This is a custom implementation of the Collector interface. - * Statistics are objects gather max,min,sum,average statistics. - */ - private static class Statistics - implements Collector { - - - /* - * This implementation does not need to be thread safe because - * the parallel implementation of - * {@link java.util.stream.Stream#collect Stream.collect()} - * provides the necessary partitioning and isolation for safe parallel - * execution. - */ - private String maxRecord; - private String minRecord; - - private double sum; - private int lineCount; - private final BinaryOperator maxOperator; - private final BinaryOperator minOperator; - private final int column; - - public Statistics(int column) { - this.column = column; - Comparator cmp = Comparator.comparing( - (String str) -> parseDouble(getCell(str, column))); - maxOperator = BinaryOperator.maxBy(cmp); - minOperator = BinaryOperator.minBy(cmp); - } - - /* - * Process line. - */ - public Statistics accept(String line) { - maxRecord = maxRecord == null - ? line : maxOperator.apply(maxRecord, line); - minRecord = minRecord == null - ? line : minOperator.apply(minRecord, line); - - sum += parseDouble(getCell(line, column)); - lineCount++; - return this; - } - - - /* - * Merge two Statistics. - */ - public Statistics combine(Statistics stat) { - maxRecord = maxOperator.apply(maxRecord, stat.getMaxRecord()); - minRecord = minOperator.apply(minRecord, stat.getMinRecord()); - sum += stat.getSum(); - lineCount += stat.getLineCount(); - return this; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("#------Statistics------#\n"); - sb.append("Max: ").append(getMaxRecord()).append("\n"); - sb.append("Min: ").append(getMinRecord()).append("\n"); - sb.append("Sum = ").append(getSum()).append("\n"); - sb.append("Average = ").append(average()).append("\n"); - sb.append("#------Statistics------#\n"); - return sb.toString(); - } - - @Override - public Supplier supplier() { - return () -> new Statistics(column); - } - - @Override - public BiConsumer accumulator() { - return Statistics::accept; - } - - @Override - public BinaryOperator combiner() { - return Statistics::combine; - - } - - @Override - public Function finisher() { - return stat -> stat; - } - - @Override - public Set characteristics() { - return EnumSet.of(Characteristics.IDENTITY_FINISH); - } - - private String getMaxRecord() { - return maxRecord; - } - - private String getMinRecord() { - return minRecord; - } - - private double getSum() { - return sum; - } - - private double average() { - return sum / lineCount; - } - - private int getLineCount() { - return lineCount; - } - - } - -} diff --git a/jdk/src/sample/share/lambda/BulkDataOperations/src/Grep.java b/jdk/src/sample/share/lambda/BulkDataOperations/src/Grep.java deleted file mode 100644 index cb4bdf765cb..00000000000 --- a/jdk/src/sample/share/lambda/BulkDataOperations/src/Grep.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation, and proper error handling, might not be present in - * this sample code. - */ - -import java.io.IOException; -import java.io.UncheckedIOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Arrays; -import java.util.List; -import java.util.regex.Pattern; -import java.util.stream.Stream; - -import static java.util.stream.Collectors.toList; - -/** - * Grep prints lines matching a regex. See {@link #printUsageAndExit(String...)} - * method for instructions and command line parameters. This sample shows - * examples of using next features: - *
                      - *
                    • Lambda and bulk operations. Working with streams: - * map(...),filter(...),flatMap(...),limit(...) methods.
                    • - *
                    • Static method reference for printing values.
                    • - *
                    • New Collections API forEach(...) method.
                    • - *
                    • Try-with-resources feature.
                    • - *
                    • new Files.walk(...), Files.lines(...) API.
                    • - *
                    • Streams that need to be closed.
                    • - *
                    - * - */ -public class Grep { - - private static void printUsageAndExit(String... str) { - System.out.println("Usage: " + Grep.class.getSimpleName() - + " [OPTION]... PATTERN FILE..."); - System.out.println("Search for PATTERN in each FILE. " - + "If FILE is a directory then whole file tree of the directory" - + " will be processed."); - System.out.println("Example: grep -m 100 'hello world' menu.h main.c"); - System.out.println("Options:"); - System.out.println(" -m NUM: stop analysis after NUM matches"); - Arrays.asList(str).forEach(System.err::println); - System.exit(1); - } - - /** - * The main method for the Grep program. Run program with empty argument - * list to see possible arguments. - * - * @param args the argument list for Grep. - * @throws java.io.IOException If an I/O error occurs. - */ - public static void main(String[] args) throws IOException { - long maxCount = Long.MAX_VALUE; - if (args.length < 2) { - printUsageAndExit(); - } - int i = 0; - //parse OPTIONS - while (args[i].startsWith("-")) { - switch (args[i]) { - case "-m": - try { - maxCount = Long.parseLong(args[++i]); - } catch (NumberFormatException ex) { - printUsageAndExit(ex.toString()); - } - break; - default: - printUsageAndExit("Unexpected option " + args[i]); - } - i++; - } - //parse PATTERN - Pattern pattern = Pattern.compile(args[i++]); - if (i == args.length) { - printUsageAndExit("There are no files for input"); - } - - try { - /* - * First obtain the list of all paths. - * For a small number of arguments there is little to be gained - * by producing this list in parallel. For one argument - * there will be no parallelism. - * - * File names are converted to paths. If a path is a directory then - * Stream is populated with whole file tree of the directory by - * flatMap() method. Files are filtered from directories. - */ - List files = Arrays.stream(args, i, args.length) - .map(Paths::get) - // flatMap will ensure each I/O-based stream will be closed - .flatMap(Grep::getPathStream) - .filter(Files::isRegularFile) - .collect(toList()); - /* - * Then operate on that list in parallel. - * This is likely to give a more even distribution of work for - * parallel execution. - * - * Lines are extracted from files. Lines are filtered by pattern. - * Stream is limited by number of matches. Each remaining string is - * displayed in std output by method reference System.out::println. - */ - files.parallelStream() - // flatMap will ensure each I/O-based stream will be closed - .flatMap(Grep::path2Lines) - .filter(pattern.asPredicate()) - .limit(maxCount) - .forEachOrdered(System.out::println); - } catch (UncheckedIOException ioe) { - printUsageAndExit(ioe.toString()); - } - } - - /** - * Flattens file system hierarchy into a stream. This code is not inlined - * for the reason of Files.walk() throwing a checked IOException that must - * be caught. - * - * @param path - the file or directory - * @return Whole file tree starting from path, a stream with one element - - * the path itself - if it is a file. - */ - private static Stream getPathStream(Path path) { - try { - return Files.walk(path); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } - - /** - * Produces a stream of lines from a file. The result is a stream in order - * to close it later. This code is not inlined for the reason of - * Files.lines() throwing a checked IOException that must be caught. - * - * @param path - the file to read - * @return stream of lines from the file - */ - private static Stream path2Lines(Path path) { - try { - return Files.lines(path); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } -} diff --git a/jdk/src/sample/share/lambda/BulkDataOperations/src/PasswordGenerator.java b/jdk/src/sample/share/lambda/BulkDataOperations/src/PasswordGenerator.java deleted file mode 100644 index e4677985929..00000000000 --- a/jdk/src/sample/share/lambda/BulkDataOperations/src/PasswordGenerator.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation, and proper error handling, might not be present in - * this sample code. - */ - -import java.security.SecureRandom; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.IntStream; - -/** - * Generates password of desired length. See {@link #usage} method - * for instructions and command line parameters. This sample shows usages of: - *
                      - *
                    • Method references.
                    • - *
                    • Lambda and bulk operations. A stream of random integers is mapped to - * chars, limited by desired length and printed in standard output as password - * string.
                    • - *
                    - * - */ -public class PasswordGenerator { - - private static void usage() { - System.out.println("Usage: PasswordGenerator LENGTH"); - System.out.println( - "Password Generator produces password of desired LENGTH."); - } - - private static final List PASSWORD_CHARS = new ArrayList<>(); - - //Valid symbols. - static { - IntStream.rangeClosed('0', '9').forEach(PASSWORD_CHARS::add); // 0-9 - IntStream.rangeClosed('A', 'Z').forEach(PASSWORD_CHARS::add); // A-Z - IntStream.rangeClosed('a', 'z').forEach(PASSWORD_CHARS::add); // a-z - } - - /** - * The main method for the PasswordGenerator program. Run program with empty - * argument list to see possible arguments. - * - * @param args the argument list for PasswordGenerator. - */ - public static void main(String[] args) { - - if (args.length != 1) { - usage(); - return; - } - - long passwordLength; - try { - passwordLength = Long.parseLong(args[0]); - if (passwordLength < 1) { - printMessageAndUsage("Length has to be positive"); - return; - } - } catch (NumberFormatException ex) { - printMessageAndUsage("Unexpected number format" + args[0]); - return; - } - /* - * Stream of random integers is created containing Integer values - * in range from 0 to PASSWORD_CHARS.size(). - * The stream is limited by passwordLength. - * Valid chars are selected by generated index. - */ - new SecureRandom().ints(passwordLength, 0, PASSWORD_CHARS.size()) - .map(PASSWORD_CHARS::get) - .forEach(i -> System.out.print((char) i)); - } - - private static void printMessageAndUsage(String message) { - System.err.println(message); - usage(); - } - -} diff --git a/jdk/src/sample/share/lambda/BulkDataOperations/src/WC.java b/jdk/src/sample/share/lambda/BulkDataOperations/src/WC.java deleted file mode 100644 index c724f159a19..00000000000 --- a/jdk/src/sample/share/lambda/BulkDataOperations/src/WC.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation, and proper error handling, might not be present in - * this sample code. - */ - -import java.io.BufferedReader; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.util.function.Consumer; -import java.util.regex.Pattern; - -/** - * WC - Prints newline, word, and character counts for each file. See - * the {@link #usage} method for instructions and command line parameters. This - * sample shows usages of: - *
                      - *
                    • Lambda and bulk operations. Shows how to create a custom collector to - * gather custom statistics. Implements the collection of statistics using a - * built-in API.
                    • - *
                    • Constructor reference.
                    • - *
                    • Try-with-resources feature.
                    • - *
                    - * - */ -public class WC { - - //The number of characters that may be read. - private static final int READ_AHEAD_LIMIT = 100_000_000; - - //The pattern for splitting strings by non word characters to get words. - private static final Pattern nonWordPattern = Pattern.compile("\\W"); - - /** - * The main method for the WC program. Run the program with an empty - * argument list to see possible arguments. - * - * @param args the argument list for WC - * @throws java.io.IOException If an input exception occurred. - */ - public static void main(String[] args) throws IOException { - - if (args.length != 1) { - usage(); - return; - } - - try (BufferedReader reader = new BufferedReader( - new FileReader(args[0]))) { - reader.mark(READ_AHEAD_LIMIT); - /* - * Statistics can be gathered in four passes using a built-in API. - * The method demonstrates how separate operations can be - * implemented using a built-in API. - */ - collectInFourPasses(reader); - /* - * Usage of several passes to collect data is not the best way. - * Statistics can be gathered by a custom collector in one pass. - */ - reader.reset(); - collectInOnePass(reader); - } catch (FileNotFoundException e) { - usage(); - System.err.println(e); - } - } - - private static void collectInFourPasses(BufferedReader reader) - throws IOException { - /* - * Input is read as a stream of lines by lines(). - * Every line is turned into a stream of chars by the flatMapToInt(...) - * method. - * Length of the stream is counted by count(). - */ - System.out.println("Character count = " - + reader.lines().flatMapToInt(String::chars).count()); - /* - * Input is read as a stream of lines by lines(). - * Every line is split by nonWordPattern into words by flatMap(...) - * method. - * Empty lines are removed by the filter(...) method. - * Length of the stream is counted by count(). - */ - reader.reset(); - System.out.println("Word count = " - + reader.lines() - .flatMap(nonWordPattern::splitAsStream) - .filter(str -> !str.isEmpty()).count()); - - reader.reset(); - System.out.println("Newline count = " + reader.lines().count()); - /* - * Input is read as a stream of lines by lines(). - * Every line is mapped to its length. - * Maximum of the lengths is calculated. - */ - reader.reset(); - System.out.println("Max line length = " - + reader.lines().mapToInt(String::length).max().getAsInt()); - } - - private static void collectInOnePass(BufferedReader reader) { - /* - * The collect() method has three parameters: - * The first parameter is the {@code WCStatistic} constructor reference. - * collect() will create {@code WCStatistics} instances, where - * statistics will be aggregated. - * The second parameter shows how {@code WCStatistics} will process - * String. - * The third parameter shows how to merge two {@code WCStatistic} - * instances. - * - * Also {@code Collector} can be used, which would be more reusable - * solution. See {@code CSVProcessor} example for how {@code Collector} - * can be implemented. - * - * Note that the any performance increase when going parallel will - * depend on the size of the input (lines) and the cost per-element. - */ - WCStatistics wc = reader.lines().parallel() - .collect(WCStatistics::new, - WCStatistics::accept, - WCStatistics::combine); - System.out.println(wc); - } - - private static void usage() { - System.out.println("Usage: " + WC.class.getSimpleName() + " FILE"); - System.out.println("Print newline, word," - + " character counts and max line length for FILE."); - } - - private static class WCStatistics implements Consumer { - /* - * @implNote This implementation does not need to be thread safe because - * the parallel implementation of - * {@link java.util.stream.Stream#collect Stream.collect()} - * provides the necessary partitioning and isolation for safe parallel - * execution. - */ - - private long characterCount; - private long lineCount; - private long wordCount; - private long maxLineLength; - - - /* - * Processes line. - */ - @Override - public void accept(String line) { - characterCount += line.length(); - lineCount++; - wordCount += nonWordPattern.splitAsStream(line) - .filter(str -> !str.isEmpty()).count(); - maxLineLength = Math.max(maxLineLength, line.length()); - } - - /* - * Merges two WCStatistics. - */ - public void combine(WCStatistics stat) { - wordCount += stat.wordCount; - lineCount += stat.lineCount; - characterCount += stat.characterCount; - maxLineLength = Math.max(maxLineLength, stat.maxLineLength); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("#------WCStatistic------#\n"); - sb.append("Character count = ").append(characterCount).append('\n'); - sb.append("Word count = ").append(wordCount).append('\n'); - sb.append("Newline count = ").append(lineCount).append('\n'); - sb.append("Max line length = ").append(maxLineLength).append('\n'); - return sb.toString(); - } - } -} diff --git a/jdk/src/sample/share/lambda/DefaultMethods/ArrayIterator.java b/jdk/src/sample/share/lambda/DefaultMethods/ArrayIterator.java deleted file mode 100644 index 2eca80149b8..00000000000 --- a/jdk/src/sample/share/lambda/DefaultMethods/ArrayIterator.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import java.util.Iterator; -import java.util.NoSuchElementException; - -/** - * The code sample illustrates the usage of default methods in the JDK 8. Most - * implementations of {@link Iterator} don't provide a useful - * {@link Iterator#remove()} method, however, - * they still have to implement this method to throw - * an UnsupportedOperationException. With the default method, the same - * default behavior in interface Iterator itself can be provided. - */ -public class ArrayIterator { - - /** Close the constructor because ArrayIterator is part of the utility - * class. - */ - protected ArrayIterator() { - throw new UnsupportedOperationException(); - } - - /** - * Returns an iterator that goes over the elements in the array. - * - * @param type of an array element - * @param array source array to iterate over it - * @return an iterator that goes over the elements in the array - */ - public static Iterator iterator(final E[] array) { - return new Iterator() { - /** - * Index of the current position - * - */ - private int index = 0; - - /** - * Returns the next element in the iteration - * - * @return the next element in the iteration - * @throws NoSuchElementException if the iteration has no more - * elements - */ - @Override - public boolean hasNext() { - return (index < array.length); - } - - /** - * Returns {@code true} if the iteration has more elements. (In - * other words, returns {@code true} if {@link #next} returns - * an element, rather than throwing an exception.) - * - * @return {@code true} if the iteration has more elements - */ - @Override - public E next() { - if (!hasNext()) { - throw new NoSuchElementException(); - } - return array[index++]; - } - - /** - * This method does not need to be overwritten in JDK 8. - */ - //@Override - //public void remove() { - // throw UnsupportedOperationException( - // "Arrays don't support remove.") - //} - }; - } - - /** - * Sample usage of the ArrayIterator - * - * @param args command-line arguments - */ - public static void main(final String[] args) { - Iterator it = ArrayIterator.iterator( - new String[]{"one", "two", "three"}); - - while (it.hasNext()) { - System.out.println(it.next()); - } - } -} diff --git a/jdk/src/sample/share/lambda/DefaultMethods/DiamondInheritance.java b/jdk/src/sample/share/lambda/DefaultMethods/DiamondInheritance.java deleted file mode 100644 index 9214d58a788..00000000000 --- a/jdk/src/sample/share/lambda/DefaultMethods/DiamondInheritance.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * This sample diamond interface inheritance with default methods. - * If there's not already a unique method implementation to inherit, - * you must provide it. The inheritance diagram is similar to the following: - *
                    - *                   Animal
                    - *                    /   \
                    - *                 Horse   Bird
                    - *                    \   /
                    - *                   Pegasus
                    - * 
                    - * - * Both {@link Horse} and {@link Bird} interfaces implements the go - * method. The {@link Pegasus} class have to overrides the - * go method. - * - * The new syntax of super-call is used here: - *
                    - *     <interface_name>.super.<method>(...);
                    - *     For example:  Horse.super.go();
                    - * 
                    So, Pegasus moves like a horse. - */ -public class DiamondInheritance { - - /** - * Base interface to illustrate the diamond inheritance. - * - * @see DiamondInheritance - */ - public interface Animal { - - /** - * Return string representation of the "go" action for concrete animal - * - * @return string representation of the "go" action for concrete animal - */ - String go(); - } - - /** - * Interface to illustrate the diamond inheritance. - * - * @see DiamondInheritance - */ - public interface Horse extends Animal { - - /** - * Return string representation of the "go" action for horse - * - * @return string representation of the "go" action for horse - */ - @Override - default String go() { - return this.getClass().getSimpleName() + " walks on four legs"; - } - } - - /** - * Interface to illustrate the diamond inheritance. - * - * @see DiamondInheritance - */ - public interface Bird extends Animal { - - /** - * Return string representation of the "go" action for bird - * - * @return string representation of the "go" action for bird - */ - @Override - default String go() { - return this.getClass().getSimpleName() + " walks on two legs"; - } - - /** - * Return string representation of the "fly" action for bird - * - * @return string representation of the "fly" action for bird - */ - default String fly() { - return "I can fly"; - } - } - - /** - * Class to illustrate the diamond inheritance. Pegasus must mix horse and - * bird behavior. - * - * @see DiamondInheritance - */ - public static class Pegasus implements Horse, Bird { - - /** - * Return string representation of the "go" action for the fictitious - * creature Pegasus - * - * @return string representation of the "go" action for the fictitious - * creature Pegasus - */ - @Override - public String go() { - return Horse.super.go(); - } - } - - /** - * Illustrate the behavior of the {@link Pegasus} class - * - * @param args command line arguments - */ - public static void main(final String[] args) { - System.out.println(new Pegasus().go()); - } -} diff --git a/jdk/src/sample/share/lambda/DefaultMethods/Inheritance.java b/jdk/src/sample/share/lambda/DefaultMethods/Inheritance.java deleted file mode 100644 index 961de2c24d5..00000000000 --- a/jdk/src/sample/share/lambda/DefaultMethods/Inheritance.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * The sample illustrates rules to resolve conflicts between inheritance - * candidates with default methods. There are two simple rules: - *
                      - *
                    • Class wins. If the superclass has a concrete or abstract declaration of - * this method, then it is preferred over all defaults.
                    • - *
                    • Subtype wins. If an interface extends another interface, and both provide - * a default, then the more specific interface wins.
                    • - *
                    - */ -public class Inheritance { - - /** - * The behavior of an creature that can swim - */ - public interface Swimable { - - /** - * Return string representation of the swim action for a creature that - * can swim - * - * @return string representation of the swim action for a creature - * that can swim - */ - default String swim() { - return "I can swim."; - } - } - - /** - * The abstract class that overrides {@link #swim} method - */ - public abstract static class Fish implements Swimable { - - /** - * Return string representation of the swim action for a fish - * - * @return string representation of the swim action for a fish - */ - @Override - public String swim() { - return this.getClass().getSimpleName() + " swims under water"; - } - } - - /** - * This class is used for the illustration rule of 1. See the source code - * of the {@link #main} method. - *
                    -     *      System.out.println(new Tuna().swim()); //"Tuna swims under water" output is suspected here
                    -     * 
                    - */ - public static class Tuna extends Fish implements Swimable { - } - - /** - * The behavior of an creature that can dive: the interface that overrides - * {@link #swim} method (subtype of {@link Swimable}) - */ - public interface Diveable extends Swimable { - - /** - * Return string representation of the swim action for a creature that - * can dive - * - * @return string representation of the swim action for a creature - * that can dive - */ - @Override - default String swim() { - return "I can swim on the surface of the water."; - } - - /** - * Return string representation of the dive action for a creature that - * can dive - * - * @return string representation of the dive action for a creature - * that can dive - */ - default String dive() { - return "I can dive."; - } - } - - /** - * This class is used for the illustration of rule 2. See the source code - * of the {@link #main} method - *
                    -     *      //"I can swim on the surface of the water." output is suspected here
                    -     *      System.out.println(new Duck().swim());
                    -     * 
                    - */ - public static class Duck implements Swimable, Diveable { - } - - /** - * Illustrate behavior of the classes: {@link Tuna} and {@link Duck} - * - * @param args command line arguments - */ - public static void main(final String[] args) { - // Illustrates rule 1. The Fish.swim() implementation wins - //"Tuna swims under water" is output - System.out.println(new Tuna().swim()); - - // Illustrates rule 2. The Diveable.swim() implementation wins - //"I can swim on the surface of the water." is output - System.out.println(new Duck().swim()); - } -} diff --git a/jdk/src/sample/share/lambda/DefaultMethods/MixIn.java b/jdk/src/sample/share/lambda/DefaultMethods/MixIn.java deleted file mode 100644 index d9ed81dee27..00000000000 --- a/jdk/src/sample/share/lambda/DefaultMethods/MixIn.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import java.io.IOException; -import java.lang.reflect.Field; - -/** - * The example illustrates how to use the default method for mixin. - * @see BuildType - * @see Debuggable - */ -public class MixIn { - - /** - * Implement this interface for a class that must be in debug print - */ - public interface Debuggable { - - /** - * Print the class name and all fields to a string. Uses reflection to - * obtain and access fields of this object. - * - * @return the string formatted like the following:
                    -         * State of the: <Class Name>
                    -         * <member name> : <value>
                    -         * ...
                    -         * 
                    - */ - default String toDebugString() { - StringBuilder sb = new StringBuilder(); - sb.append("State of the: ").append( - this.getClass().getSimpleName()).append("\n"); - for (Class cls = this.getClass(); - cls != null; - cls = cls.getSuperclass()) { - for (Field f : cls.getDeclaredFields()) { - try { - f.setAccessible(true); - sb.append(f.getName()).append(" : "). - append(f.get(this)).append("\n"); - } catch (IllegalAccessException e) { - } - } - } - return sb.toString(); - } - } - - /** - * Sample exception class to demonstrate mixin. This enum inherits the - * behavior of the {@link Debuggable} - */ - public static enum BuildType implements Debuggable { - - BUILD(0, "-build"), - PLAN(0, "-plan"), - EXCLUDE(1, "-exclude"), - TOTAL(2, "-total"); - - private final int compareOrder; - private final String pathSuffix; - - private BuildType(int compareOrder, String pathSuffix) { - this.compareOrder = compareOrder; - this.pathSuffix = pathSuffix; - } - - public int getCompareOrder() { - return compareOrder; - } - - public String getPathSuffix() { - return pathSuffix; - } - } - - /** - * Illustrate the behavior of the MixClass - * - * @param args command-line arguments - * @throws java.io.IOException internal demo error - */ - public static void main(final String[] args) throws IOException { - System.out.println(BuildType.BUILD.toDebugString()); - } -} diff --git a/jdk/src/sample/share/lambda/DefaultMethods/Reflection.java b/jdk/src/sample/share/lambda/DefaultMethods/Reflection.java deleted file mode 100644 index 78424a240e8..00000000000 --- a/jdk/src/sample/share/lambda/DefaultMethods/Reflection.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.stream.Stream; - -/** - * The code sample illustrates changes in the reflection API linked - * default methods. Since Java SE 8, a new method is added into the class - * java.lang.reflect.Method, with which you can reflectively - * determine whether or not a default method provided by an interface - * (Method.isDefault()). - */ -public class Reflection { - - /** - * Base interface to illustrate the new reflection API. - * - * @see Dog - */ - public interface Animal { - - /** - * Return string representation of the eat action for Animal - * - * @return string representation of the eat action for Animal - */ - default String eat() { - return this.getClass().getSimpleName() - + " eats like an ordinary animal"; - } - - /** - * Return string representation of the sleep action for Animal - * - * @return string representation of the sleep action for Animal - */ - default String sleep() { - return this.getClass().getSimpleName() - + " sleeps like an ordinary animal"; - } - - /** - * Return string representation of the go action for Animal - * - * @return string representation of the go action for Animal - */ - String go(); - } - - /** - * Dog class to illustrate the new reflection API. You can see that: - *
                      - *
                    • the {@link #go} and {@link #sleep} methods are not default. - * {@link #go} is not the default implementation and the {@link #sleep} - * method implementation wins as subtype (according with {@link Inheritance} - * rule. 2)
                    • - *
                    • the {@link #eat} is a simple default method that is not overridden - * in this class. - *
                    • - *
                    - */ - public static class Dog implements Animal { - - /** - * Return string representation of the go action for Dog - * - * @return string representation of the go action for Dog - */ - @Override - public String go() { - return "Dog walks on four legs"; - } - - /** - * Return string representation of the sleep action for Dog - * - * @return string representation of the sleep action for Dog - */ - @Override - public String sleep() { - return "Dog sleeps"; - } - } - - /** - * Illustrate the usage of the method java.lang.reflect.Method.isDefault() - * - * @param args command-line arguments - * @throws NoSuchMethodException internal demo error - */ - public static void main(final String[] args) throws NoSuchMethodException { - Dog dog = new Dog(); - Stream.of(Dog.class.getMethod("eat"), Dog.class.getMethod("go"), Dog.class.getMethod("sleep")) - .forEach((m) -> { - System.out.println("Method name: " + m.getName()); - System.out.println(" isDefault: " + m.isDefault()); - System.out.print(" invoke: "); - try { - m.invoke(dog); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { - } - System.out.println(); - }); - } -} diff --git a/jdk/src/sample/share/lambda/DefaultMethods/SimplestUsage.java b/jdk/src/sample/share/lambda/DefaultMethods/SimplestUsage.java deleted file mode 100644 index a971858f589..00000000000 --- a/jdk/src/sample/share/lambda/DefaultMethods/SimplestUsage.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * The sample illustrates the simplest use case of the default methods. - */ -public class SimplestUsage { - - /** - * The Animal interface provides the default implementation - * of the {@link #eat} method. - */ - public interface Animal { - - /** - * Return string representation of the eat action for Animal - * - * @return string representation of the eat action for Animal - */ - default String eat() { - return this.getClass().getSimpleName() - + " eats like an ordinary animal"; - } - } - - /** - * The Dog class doesn't have its own implementation of the {@link #eat} - * method and uses the default implementation. - */ - public static class Dog implements Animal { - } - - /** - * The Mosquito class implements {@link #eat} method, its own implementation - * overrides the default implementation. - * - */ - public static class Mosquito implements Animal { - - /** - * Return string representation of the eat action for Mosquito - * - * @return string representation of the eat action for Mosquito - */ - @Override - public String eat() { - return "Mosquito consumes blood"; - } - } - - /** - * Illustrate behavior of the classes: {@link Dog} and {@link Mosquito} - * - * @param args command-line arguments - */ - public static void main(String[] args) { - // "Dog eats like an ordinary animal" is output - System.out.println(new Dog().eat()); - - // "Mosquito consumes blood" is output - System.out.println(new Mosquito().eat()); - } -} diff --git a/jdk/src/sample/share/nbproject/project.xml b/jdk/src/sample/share/nbproject/project.xml deleted file mode 100644 index 8417326b624..00000000000 --- a/jdk/src/sample/share/nbproject/project.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - org.netbeans.modules.ant.freeform - - - JDK Samples - - - - - jmx/jmx-scandir - scripting/scriptpad - webservices/EbayClient - webservices/EbayServer - - - - diff --git a/jdk/src/sample/share/nio/chatserver/ChatServer.java b/jdk/src/sample/share/nio/chatserver/ChatServer.java deleted file mode 100644 index 001c449b55d..00000000000 --- a/jdk/src/sample/share/nio/chatserver/ChatServer.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.net.SocketAddress; -import java.net.StandardSocketOptions; -import java.nio.channels.*; -import java.util.*; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; - -/** - * Implements a chat server, this class holds the list of {@code clients} connected to the server. - * It sets up a server socket using AsynchronousServerSocketChannel listening to a specified port. - */ -public class ChatServer implements Runnable { - private final List connections = Collections.synchronizedList(new ArrayList()); - private int port; - private final AsynchronousServerSocketChannel listener; - private final AsynchronousChannelGroup channelGroup; - - /** - * - * @param port to listen to - * @throws java.io.IOException when failing to start the server - */ - public ChatServer(int port) throws IOException { - channelGroup = AsynchronousChannelGroup.withFixedThreadPool(Runtime.getRuntime().availableProcessors(), - Executors.defaultThreadFactory()); - this.port = port; - listener = createListener(channelGroup); - } - - /** - * - * @return The socket address that the server is bound to - * @throws java.io.IOException if an I/O error occurs - */ - public SocketAddress getSocketAddress() throws IOException { - return listener.getLocalAddress(); - } - - /** - * Start accepting connections - */ - public void run() { - - // call accept to wait for connections, tell it to call our CompletionHandler when there - // is a new incoming connection - listener.accept(null, new CompletionHandler() { - @Override - public void completed(AsynchronousSocketChannel result, Void attachment) { - // request a new accept and handle the incoming connection - listener.accept(null, this); - handleNewConnection(result); - } - - @Override - public void failed(Throwable exc, Void attachment) { - } - }); - } - - /** - * Shuts down the server - * @throws InterruptedException if terminated while waiting for shutdown - * @throws IOException if failing to shutdown the channel group - */ - public void shutdown() throws InterruptedException, IOException { - channelGroup.shutdownNow(); - channelGroup.awaitTermination(1, TimeUnit.SECONDS); - } - - /* - * Creates a listener and starts accepting connections - */ - private AsynchronousServerSocketChannel createListener(AsynchronousChannelGroup channelGroup) throws IOException { - final AsynchronousServerSocketChannel listener = openChannel(channelGroup); - listener.setOption(StandardSocketOptions.SO_REUSEADDR, true); - listener.bind(new InetSocketAddress(port)); - return listener; - } - - private AsynchronousServerSocketChannel openChannel(AsynchronousChannelGroup channelGroup) throws IOException { - return AsynchronousServerSocketChannel.open(channelGroup); - } - - /** - * Creates a new client and adds it to the list of connections. - * Sets the clients handler to the initial state of NameReader - * - * @param channel the newly accepted channel - */ - private void handleNewConnection(AsynchronousSocketChannel channel) { - Client client = new Client(channel, new ClientReader(this, new NameReader(this))); - try { - channel.setOption(StandardSocketOptions.TCP_NODELAY, true); - } catch (IOException e) { - // ignore - } - connections.add(client); - client.run(); - } - - /** - * Sends a message to all clients except the source. - * The method is synchronized as it is desired that messages are sent to - * all clients in the same order as received. - * - * @param client the message source - * @param message the message to be sent - */ - public void writeMessageToClients(Client client, String message) { - synchronized (connections) { - for (Client clientConnection : connections) { - if (clientConnection != client) { - clientConnection.writeMessageFrom(client, message); - } - } - } - } - - public void removeClient(Client client) { - connections.remove(client); - } - - private static void usage() { - System.err.println("ChatServer [-port ]"); - System.exit(1); - } - - public static void main(String[] args) throws IOException { - int port = 5000; - if (args.length != 0 && args.length != 2) { - usage(); - } else if (args.length == 2) { - try { - if (args[0].equals("-port")) { - port = Integer.parseInt(args[1]); - } else { - usage(); - } - } catch (NumberFormatException e) { - usage(); - } - } - System.out.println("Running on port " + port); - new ChatServer(port).run(); - } -} diff --git a/jdk/src/sample/share/nio/chatserver/Client.java b/jdk/src/sample/share/nio/chatserver/Client.java deleted file mode 100644 index 79198b0caf5..00000000000 --- a/jdk/src/sample/share/nio/chatserver/Client.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.IOException; -import java.nio.ByteBuffer; -import java.nio.channels.AsynchronousSocketChannel; -import java.nio.channels.CompletionHandler; -import java.util.LinkedList; -import java.util.Queue; -import java.util.concurrent.atomic.AtomicReference; - -/** - * Client represents a remote connection to the chat server. - * It contains methods for reading and writing messages from the - * channel. - * Messages are considered to be separated by newline, so incomplete - * messages are buffered in the {@code Client}. - * - * All reads and writes are asynchronous and uses the nio2 asynchronous - * elements. - */ -class Client { - private final AsynchronousSocketChannel channel; - private AtomicReference reader; - private String userName; - private final StringBuilder messageBuffer = new StringBuilder(); - - private final Queue queue = new LinkedList(); - private boolean writing = false; - - public Client(AsynchronousSocketChannel channel, ClientReader reader) { - this.channel = channel; - this.reader = new AtomicReference(reader); - } - - /** - * Enqueues a write of the buffer to the channel. - * The call is asynchronous so the buffer is not safe to modify after - * passing the buffer here. - * - * @param buffer the buffer to send to the channel - */ - private void writeMessage(final ByteBuffer buffer) { - boolean threadShouldWrite = false; - - synchronized(queue) { - queue.add(buffer); - // Currently no thread writing, make this thread dispatch a write - if (!writing) { - writing = true; - threadShouldWrite = true; - } - } - - if (threadShouldWrite) { - writeFromQueue(); - } - } - - private void writeFromQueue() { - ByteBuffer buffer; - - synchronized (queue) { - buffer = queue.poll(); - if (buffer == null) { - writing = false; - } - } - - // No new data in buffer to write - if (writing) { - writeBuffer(buffer); - } - } - - private void writeBuffer(ByteBuffer buffer) { - channel.write(buffer, buffer, new CompletionHandler() { - @Override - public void completed(Integer result, ByteBuffer buffer) { - if (buffer.hasRemaining()) { - channel.write(buffer, buffer, this); - } else { - // Go back and check if there is new data to write - writeFromQueue(); - } - } - - @Override - public void failed(Throwable exc, ByteBuffer attachment) { - } - }); - } - - /** - * Sends a message - * @param string the message - */ - public void writeStringMessage(String string) { - writeMessage(ByteBuffer.wrap(string.getBytes())); - } - - /** - * Send a message from a specific client - * @param client the message is sent from - * @param message to send - */ - public void writeMessageFrom(Client client, String message) { - if (reader.get().acceptsMessages()) { - writeStringMessage(client.getUserName() + ": " + message); - } - } - - /** - * Enqueue a read - * @param completionHandler callback on completed read - */ - public void read(CompletionHandler completionHandler) { - ByteBuffer input = ByteBuffer.allocate(256); - if (!channel.isOpen()) { - return; - } - channel.read(input, input, completionHandler); - } - - /** - * Closes the channel - */ - public void close() { - try { - channel.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - /** - * Run the current states actions. - */ - public void run() { - reader.get().run(this); - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public void setReader(ClientReader reader) { - this.reader.set(reader); - } - - public String getUserName() { - return userName; - } - - public void appendMessage(String message) { - synchronized (messageBuffer) { - messageBuffer.append(message); - } - } - - /** - * @return the next newline separated message in the buffer. null is returned if the buffer - * doesn't contain any newline. - */ - public String nextMessage() { - synchronized(messageBuffer) { - int nextNewline = messageBuffer.indexOf("\n"); - if (nextNewline == -1) { - return null; - } - String message = messageBuffer.substring(0, nextNewline + 1); - messageBuffer.delete(0, nextNewline + 1); - return message; - } - } -} diff --git a/jdk/src/sample/share/nio/chatserver/ClientReader.java b/jdk/src/sample/share/nio/chatserver/ClientReader.java deleted file mode 100644 index 09051c86d97..00000000000 --- a/jdk/src/sample/share/nio/chatserver/ClientReader.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.ByteBuffer; -import java.nio.channels.CompletionHandler; - -/** - * Handles a cycle of reading / writing on the {@code Client}. - */ -class ClientReader { - private final DataReader callback; - private final ChatServer chatServer; - - ClientReader(ChatServer chatServer, DataReader callback) { - this.chatServer = chatServer; - this.callback = callback; - } - - public boolean acceptsMessages() { - return callback.acceptsMessages(); - } - - /** - * Runs a cycle of doing a beforeRead action and then enqueuing a new - * read on the client. Handles closed channels and errors while reading. - * If the client is still connected a new round of actions are called. - */ - public void run(final Client client) { - callback.beforeRead(client); - client.read(new CompletionHandler() { - @Override - public void completed(Integer result, ByteBuffer buffer) { - // if result is negative or zero the connection has been closed or something gone wrong - if (result < 1) { - client.close(); - System.out.println("Closing connection to " + client); - chatServer.removeClient(client); - } else { - callback.onData(client, buffer, result); - // enqueue next round of actions - client.run(); - } - } - - @Override - public void failed(Throwable exc, ByteBuffer buffer) { - client.close(); - chatServer.removeClient(client); - } - }); - } -} diff --git a/jdk/src/sample/share/nio/chatserver/DataReader.java b/jdk/src/sample/share/nio/chatserver/DataReader.java deleted file mode 100644 index 980e481af9a..00000000000 --- a/jdk/src/sample/share/nio/chatserver/DataReader.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.ByteBuffer; - -public interface DataReader { - void beforeRead(Client client); - void onData(Client client, ByteBuffer buffer, int bytes); - boolean acceptsMessages(); -} diff --git a/jdk/src/sample/share/nio/chatserver/MessageReader.java b/jdk/src/sample/share/nio/chatserver/MessageReader.java deleted file mode 100644 index 273e6833871..00000000000 --- a/jdk/src/sample/share/nio/chatserver/MessageReader.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.ByteBuffer; - -/** - * Writes all messages in our buffer to the other clients - * and appends new data read from the socket to our buffer - */ -class MessageReader implements DataReader { - private final ChatServer chatServer; - - public MessageReader(ChatServer chatServer) { - this.chatServer = chatServer; - } - - public boolean acceptsMessages() { - return true; - } - - /** - * Write all full messages in our buffer to - * the other clients - * - * @param client the client to read messages from - */ - @Override - public void beforeRead(Client client) { - // Check if we have any messages buffered and send them - String message = client.nextMessage(); - while (message != null) { - chatServer.writeMessageToClients(client, message); - message = client.nextMessage(); - } - } - - /** - * Append the read buffer to the clients message buffer - * @param client the client to append messages to - * @param buffer the buffer we received from the socket - * @param bytes the number of bytes read into the buffer - */ - @Override - public void onData(Client client, ByteBuffer buffer, int bytes) { - buffer.flip(); - // Just append the message on the buffer - client.appendMessage(new String(buffer.array(), 0, bytes)); - } -} diff --git a/jdk/src/sample/share/nio/chatserver/NameReader.java b/jdk/src/sample/share/nio/chatserver/NameReader.java deleted file mode 100644 index fc39053c2a3..00000000000 --- a/jdk/src/sample/share/nio/chatserver/NameReader.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.ByteBuffer; - -/** - * The first state a newly connected {@code Client} is in, this - * handles writing out the welcoming message and reads the response - * up to a newline. When a newline character have been received - * it changes the handler from NameReader to MessageReader on the - * client. - */ -class NameReader implements DataReader { - private final StringBuilder buffer = new StringBuilder(); - private final ChatServer chatServer; - private boolean once = true; - private static final String NEWLINE = "\n"; - - public NameReader(ChatServer chatServer) { - this.chatServer = chatServer; - } - - /** - * Writes the welcoming message to the client the first time this method - * is called. - * - * @param client the client to receive the message - */ - @Override - public void beforeRead(Client client) { - // if it is a long name that takes more than one read we only want to display Name: once. - if (once) { - client.writeStringMessage("Name: "); - once = false; - } - } - - public boolean acceptsMessages() { - return false; - } - - /** - * Receives incoming data from the socket, searches for a newline - * and tries to set the username if one is found - */ - @Override - public void onData(Client client, ByteBuffer buffer, int bytes) { - buffer.flip(); - String name; - name = this.buffer.append(new String(buffer.array(), 0, bytes)).toString(); - if (name.contains(NEWLINE)) { - onUserNameRead(client, name); - } - } - - /** - * Splits the name on the newlines, takes the first as the username - * and appends everything else to the clients message buffer. - * Sets the clients handler to MessageReader. - * - * @param client the client to set the username for - * @param name the string containing the buffered input - */ - private void onUserNameRead(Client client, String name) { - String[] strings = name.split(NEWLINE, 2); - client.setUserName(strings[0].trim()); - sendRemainingParts(client, strings); - client.setReader(new ClientReader(chatServer, new MessageReader(chatServer))); - client.writeStringMessage("Welcome " + client.getUserName() + "\n"); - } - - /** - * Appends the remaining parts to the clients message buffer - * - * @param client the client - * @param strings the messages to append to the buffer - */ - private void sendRemainingParts(Client client, String[] strings) { - for (int i = 1; i < strings.length; ++i) { - client.appendMessage(strings[i]); - } - } -} diff --git a/jdk/src/sample/share/nio/chatserver/README.txt b/jdk/src/sample/share/nio/chatserver/README.txt deleted file mode 100644 index ec9b4764a1c..00000000000 --- a/jdk/src/sample/share/nio/chatserver/README.txt +++ /dev/null @@ -1,62 +0,0 @@ -A Simple Chat Server Example - -INTRODUCTION -============ -This directory contains a very simple chat server, the server takes input from a -socket ("user") and sends it to all other connected sockets ("users") along with -the provided name the user was asked for when first connecting. - -The server was written to demonstrate the asynchronous I/O API in JDK 7. -The sample assumes the reader has some familiarity with the subject matter. - -SETUP -===== - -The server must be built with version 7 (or later) of the JDK. -The server is built with: - - % mkdir build - % javac -source 7 -target 7 -d build *.java - -EXECUTION -========= - - % java -classpath build ChatServer [-port ] - - Usage: ChatServer [options] - options: - -port port port number - default: 5000 - -CLIENT EXECUTION -================ - -No client binary is included in the sample. -Connections can be made using for example the telnet command or any program -that supports a raw TCP connection to a port. - -SOURCE CODE OVERVIEW -==================== -ChatServer is the main class, it handles the startup and handles incoming -connections on the listening sockets. It keeps a list of connected client -and provides methods for sending a message to them. - -Client represents a connected user, it provides methods for reading/writing -from/to the underlying socket. It also contains a buffer of input read from -the user. - -DataReader provides the interface of the two states a user can -be in. Waiting for a name (and not receiving any messages while doing so, implemented -by NameReader) and waiting for messages from the user (implemented by MessageReader). - -ClientReader contains the "main loop" for a connected client. - -NameReader is the initial state for a new client, it sends the user a string and -waits for a response before changing the state to MessageReader. - -MessageReader is the main state for a client, it checks for new messages to send to -other clients and reads messages from the client. - -FINALLY -======= -This is a sample: it is not production quality and isn't optimized for performance. diff --git a/jdk/src/sample/share/nio/file/AclEdit.java b/jdk/src/sample/share/nio/file/AclEdit.java deleted file mode 100644 index 90af86518b6..00000000000 --- a/jdk/src/sample/share/nio/file/AclEdit.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.file.*; -import java.nio.file.attribute.*; -import java.io.IOException; -import java.util.*; -import java.util.regex.Pattern; - -/** - * Sample utility for editing a file's ACL. - */ - -public class AclEdit { - - // parse string as list of ACE permissions separated by / - static Set parsePermissions(String permsString) { - Set perms = new HashSet(); - String[] result = permsString.split("/"); - for (String s : result) { - if (s.equals("")) - continue; - try { - perms.add(AclEntryPermission.valueOf(s.toUpperCase())); - } catch (IllegalArgumentException x) { - System.err.format("Invalid permission '%s'\n", s); - System.exit(-1); - } - } - return perms; - } - - // parse string as list of ACE flags separated by / - static Set parseFlags(String flagsString) { - Set flags = new HashSet(); - String[] result = flagsString.split("/"); - for (String s : result) { - if (s.equals("")) - continue; - try { - flags.add(AclEntryFlag.valueOf(s.toUpperCase())); - } catch (IllegalArgumentException x) { - System.err.format("Invalid flag '%s'\n", s); - System.exit(-1); - } - } - return flags; - } - - // parse ACE type - static AclEntryType parseType(String typeString) { - // FIXME: support audit and alarm types in the future - if (typeString.equalsIgnoreCase("allow")) - return AclEntryType.ALLOW; - if (typeString.equalsIgnoreCase("deny")) - return AclEntryType.DENY; - System.err.format("Invalid type '%s'\n", typeString); - System.exit(-1); - return null; // keep compiler happy - } - - /** - * Parse string of the form: - * [user|group:]:[:flags]: - */ - static AclEntry parseAceString(String s, - UserPrincipalLookupService lookupService) - { - String[] result = s.split(":"); - - // must have at least 3 components (username:perms:type) - if (result.length < 3) - usage(); - - int index = 0; - int remaining = result.length; - - // optional first component can indicate user or group type - boolean isGroup = false; - if (result[index].equalsIgnoreCase("user") || - result[index].equalsIgnoreCase("group")) - { - if (--remaining < 3) - usage(); - isGroup = result[index++].equalsIgnoreCase("group"); - } - - // user and permissions required - String userString = result[index++]; remaining--; - String permsString = result[index++]; remaining--; - - // flags are optional - String flagsString = ""; - String typeString = null; - if (remaining == 1) { - typeString = result[index++]; - } else { - if (remaining == 2) { - flagsString = result[index++]; - typeString = result[index++]; - } else { - usage(); - } - } - - // lookup UserPrincipal - UserPrincipal user = null; - try { - user = (isGroup) ? - lookupService.lookupPrincipalByGroupName(userString) : - lookupService.lookupPrincipalByName(userString); - } catch (UserPrincipalNotFoundException x) { - System.err.format("Invalid %s '%s'\n", - ((isGroup) ? "group" : "user"), - userString); - System.exit(-1); - } catch (IOException x) { - System.err.format("Lookup of '%s' failed: %s\n", userString, x); - System.exit(-1); - } - - // map string representation of permissions, flags, and type - Set perms = parsePermissions(permsString); - Set flags = parseFlags(flagsString); - AclEntryType type = parseType(typeString); - - // build the ACL entry - return AclEntry.newBuilder() - .setType(type) - .setPrincipal(user) - .setPermissions(perms).setFlags(flags).build(); - } - - static void usage() { - System.err.println("usage: java AclEdit [ACL-operation] file"); - System.err.println(""); - System.err.println("Example 1: Prepends access control entry to the begining of the myfile's ACL"); - System.err.println(" java AclEdit A+alice:read_data/read_attributes:allow myfile"); - System.err.println(""); - System.err.println("Example 2: Remove the entry at index 6 of myfile's ACL"); - System.err.println(" java AclEdit A6- myfile"); - System.err.println(""); - System.err.println("Example 3: Replace the entry at index 2 of myfile's ACL"); - System.err.println(" java AclEdit A2=bob:write_data/append_data:deny myfile"); - System.exit(-1); - } - - static enum Action { - PRINT, - ADD, - REMOVE, - REPLACE; - } - - /** - * Main class: parses arguments and prints or edits ACL - */ - public static void main(String[] args) throws IOException { - Action action = null; - int index = -1; - String entryString = null; - - // parse arguments - if (args.length < 1 || args[0].equals("-help") || args[0].equals("-?")) - usage(); - - if (args.length == 1) { - action = Action.PRINT; - } else { - String s = args[0]; - - // A[index]+entry - if (Pattern.matches("^A[0-9]*\\+.*", s)) { - String[] result = s.split("\\+", 2); - if (result.length == 2) { - if (result[0].length() < 2) { - index = 0; - } else { - index = Integer.parseInt(result[0].substring(1)); - } - entryString = result[1]; - action = Action.ADD; - } - } - - // Aindex- - if (Pattern.matches("^A[0-9]+\\-", s)) { - String[] result = s.split("\\-", 2); - if (result.length == 2) { - index = Integer.parseInt(result[0].substring(1)); - entryString = result[1]; - action = Action.REMOVE; - } - } - - // Aindex=entry - if (Pattern.matches("^A[0-9]+=.*", s)) { - String[] result = s.split("=", 2); - if (result.length == 2) { - index = Integer.parseInt(result[0].substring(1)); - entryString = result[1]; - action = Action.REPLACE; - } - } - } - if (action == null) - usage(); - - int fileArg = (action == Action.PRINT) ? 0 : 1; - Path file = Paths.get(args[fileArg]); - - // read file's ACL - AclFileAttributeView view = - Files.getFileAttributeView(file, AclFileAttributeView.class); - if (view == null) { - System.err.println("ACLs not supported on this platform"); - System.exit(-1); - } - List acl = view.getAcl(); - - switch (action) { - // print ACL - case PRINT : { - for (int i=0; i= acl.size()) { - acl.add(entry); - } else { - acl.add(index, entry); - } - view.setAcl(acl); - break; - } - - // remove ACE - case REMOVE: { - if (index >= acl.size()) { - System.err.format("Index '%d' is invalid", index); - System.exit(-1); - } - acl.remove(index); - view.setAcl(acl); - break; - } - - // replace ACE - case REPLACE: { - if (index >= acl.size()) { - System.err.format("Index '%d' is invalid", index); - System.exit(-1); - } - AclEntry entry = parseAceString(entryString, file - .getFileSystem().getUserPrincipalLookupService()); - acl.set(index, entry); - view.setAcl(acl); - break; - } - } - } -} diff --git a/jdk/src/sample/share/nio/file/Chmod.java b/jdk/src/sample/share/nio/file/Chmod.java deleted file mode 100644 index 05c16b99631..00000000000 --- a/jdk/src/sample/share/nio/file/Chmod.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.file.*; -import java.nio.file.attribute.*; -import static java.nio.file.attribute.PosixFilePermission.*; -import static java.nio.file.FileVisitResult.*; -import java.io.IOException; -import java.util.*; - -/** - * Sample code that changes the permissions of files in a similar manner to the - * chmod(1) program. - */ - -public class Chmod { - - /** - * Compiles a list of one or more symbolic mode expressions that - * may be used to change a set of file permissions. This method is - * intended for use where file permissions are required to be changed in - * a manner similar to the UNIX chmod program. - * - *

                    The {@code exprs} parameter is a comma separated list of expressions - * where each takes the form: - *

                    - * who operator [permissions] - *
                    - * where who is one or more of the characters {@code 'u'}, {@code 'g'}, - * {@code 'o'}, or {@code 'a'} meaning the owner (user), group, others, or - * all (owner, group, and others) respectively. - * - *

                    operator is the character {@code '+'}, {@code '-'}, or {@code - * '='} signifying how permissions are to be changed. {@code '+'} means the - * permissions are added, {@code '-'} means the permissions are removed, and - * {@code '='} means the permissions are assigned absolutely. - * - *

                    permissions is a sequence of zero or more of the following: - * {@code 'r'} for read permission, {@code 'w'} for write permission, and - * {@code 'x'} for execute permission. If permissions is omitted - * when assigned absolutely, then the permissions are cleared for - * the owner, group, or others as identified by who. When omitted - * when adding or removing then the expression is ignored. - * - *

                    The following examples demonstrate possible values for the {@code - * exprs} parameter: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
                    {@code u=rw} Sets the owner permissions to be read and write.
                    {@code ug+w} Sets the owner write and group write permissions.
                    {@code u+w,o-rwx} Sets the owner write, and removes the others read, others write - * and others execute permissions.
                    {@code o=} Sets the others permission to none (others read, others write and - * others execute permissions are removed if set)
                    - * - * @param exprs - * List of one or more symbolic mode expressions - * - * @return A {@code Changer} that may be used to changer a set of - * file permissions - * - * @throws IllegalArgumentException - * If the value of the {@code exprs} parameter is invalid - */ - public static Changer compile(String exprs) { - // minimum is who and operator (u= for example) - if (exprs.length() < 2) - throw new IllegalArgumentException("Invalid mode"); - - // permissions that the changer will add or remove - final Set toAdd = new HashSet(); - final Set toRemove = new HashSet(); - - // iterate over each of expression modes - for (String expr: exprs.split(",")) { - // minimum of who and operator - if (expr.length() < 2) - throw new IllegalArgumentException("Invalid mode"); - - int pos = 0; - - // who - boolean u = false; - boolean g = false; - boolean o = false; - boolean done = false; - for (;;) { - switch (expr.charAt(pos)) { - case 'u' : u = true; break; - case 'g' : g = true; break; - case 'o' : o = true; break; - case 'a' : u = true; g = true; o = true; break; - default : done = true; - } - if (done) - break; - pos++; - } - if (!u && !g && !o) - throw new IllegalArgumentException("Invalid mode"); - - // get operator and permissions - char op = expr.charAt(pos++); - String mask = (expr.length() == pos) ? "" : expr.substring(pos); - - // operator - boolean add = (op == '+'); - boolean remove = (op == '-'); - boolean assign = (op == '='); - if (!add && !remove && !assign) - throw new IllegalArgumentException("Invalid mode"); - - // who= means remove all - if (assign && mask.length() == 0) { - assign = false; - remove = true; - mask = "rwx"; - } - - // permissions - boolean r = false; - boolean w = false; - boolean x = false; - for (int i=0; i change(Set perms) { - perms.addAll(toAdd); - perms.removeAll(toRemove); - return perms; - } - }; - } - - /** - * A task that changes a set of {@link PosixFilePermission} elements. - */ - public interface Changer { - /** - * Applies the changes to the given set of permissions. - * - * @param perms - * The set of permissions to change - * - * @return The {@code perms} parameter - */ - Set change(Set perms); - } - - /** - * Changes the permissions of the file using the given Changer. - */ - static void chmod(Path file, Changer changer) { - try { - Set perms = Files.getPosixFilePermissions(file); - Files.setPosixFilePermissions(file, changer.change(perms)); - } catch (IOException x) { - System.err.println(x); - } - } - - /** - * Changes the permission of each file and directory visited - */ - static class TreeVisitor implements FileVisitor { - private final Changer changer; - - TreeVisitor(Changer changer) { - this.changer = changer; - } - - @Override - public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) { - chmod(dir, changer); - return CONTINUE; - } - - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { - chmod(file, changer); - return CONTINUE; - } - - @Override - public FileVisitResult postVisitDirectory(Path dir, IOException exc) { - if (exc != null) - System.err.println("WARNING: " + exc); - return CONTINUE; - } - - @Override - public FileVisitResult visitFileFailed(Path file, IOException exc) { - System.err.println("WARNING: " + exc); - return CONTINUE; - } - } - - static void usage() { - System.err.println("java Chmod [-R] symbolic-mode-list file..."); - System.exit(-1); - } - - public static void main(String[] args) throws IOException { - if (args.length < 2) - usage(); - int argi = 0; - int maxDepth = 0; - if (args[argi].equals("-R")) { - if (args.length < 3) - usage(); - argi++; - maxDepth = Integer.MAX_VALUE; - } - - // compile the symbolic mode expressions - Changer changer = compile(args[argi++]); - TreeVisitor visitor = new TreeVisitor(changer); - - Set opts = Collections.emptySet(); - while (argi < args.length) { - Path file = Paths.get(args[argi]); - Files.walkFileTree(file, opts, maxDepth, visitor); - argi++; - } - } -} diff --git a/jdk/src/sample/share/nio/file/Copy.java b/jdk/src/sample/share/nio/file/Copy.java deleted file mode 100644 index 0d61ef3466d..00000000000 --- a/jdk/src/sample/share/nio/file/Copy.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.file.*; -import static java.nio.file.StandardCopyOption.*; -import java.nio.file.attribute.*; -import static java.nio.file.FileVisitResult.*; -import java.io.IOException; -import java.util.*; - -/** - * Sample code that copies files in a similar manner to the cp(1) program. - */ - -public class Copy { - - /** - * Returns {@code true} if okay to overwrite a file ("cp -i") - */ - static boolean okayToOverwrite(Path file) { - String answer = System.console().readLine("overwrite %s (yes/no)? ", file); - return (answer.equalsIgnoreCase("y") || answer.equalsIgnoreCase("yes")); - } - - /** - * Copy source file to target location. If {@code prompt} is true then - * prompt user to overwrite target if it exists. The {@code preserve} - * parameter determines if file attributes should be copied/preserved. - */ - static void copyFile(Path source, Path target, boolean prompt, boolean preserve) { - CopyOption[] options = (preserve) ? - new CopyOption[] { COPY_ATTRIBUTES, REPLACE_EXISTING } : - new CopyOption[] { REPLACE_EXISTING }; - if (!prompt || Files.notExists(target) || okayToOverwrite(target)) { - try { - Files.copy(source, target, options); - } catch (IOException x) { - System.err.format("Unable to copy: %s: %s%n", source, x); - } - } - } - - /** - * A {@code FileVisitor} that copies a file-tree ("cp -r") - */ - static class TreeCopier implements FileVisitor { - private final Path source; - private final Path target; - private final boolean prompt; - private final boolean preserve; - - TreeCopier(Path source, Path target, boolean prompt, boolean preserve) { - this.source = source; - this.target = target; - this.prompt = prompt; - this.preserve = preserve; - } - - @Override - public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) { - // before visiting entries in a directory we copy the directory - // (okay if directory already exists). - CopyOption[] options = (preserve) ? - new CopyOption[] { COPY_ATTRIBUTES } : new CopyOption[0]; - - Path newdir = target.resolve(source.relativize(dir)); - try { - Files.copy(dir, newdir, options); - } catch (FileAlreadyExistsException x) { - // ignore - } catch (IOException x) { - System.err.format("Unable to create: %s: %s%n", newdir, x); - return SKIP_SUBTREE; - } - return CONTINUE; - } - - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { - copyFile(file, target.resolve(source.relativize(file)), - prompt, preserve); - return CONTINUE; - } - - @Override - public FileVisitResult postVisitDirectory(Path dir, IOException exc) { - // fix up modification time of directory when done - if (exc == null && preserve) { - Path newdir = target.resolve(source.relativize(dir)); - try { - FileTime time = Files.getLastModifiedTime(dir); - Files.setLastModifiedTime(newdir, time); - } catch (IOException x) { - System.err.format("Unable to copy all attributes to: %s: %s%n", newdir, x); - } - } - return CONTINUE; - } - - @Override - public FileVisitResult visitFileFailed(Path file, IOException exc) { - if (exc instanceof FileSystemLoopException) { - System.err.println("cycle detected: " + file); - } else { - System.err.format("Unable to copy: %s: %s%n", file, exc); - } - return CONTINUE; - } - } - - static void usage() { - System.err.println("java Copy [-ip] source... target"); - System.err.println("java Copy -r [-ip] source-dir... target"); - System.exit(-1); - } - - public static void main(String[] args) throws IOException { - boolean recursive = false; - boolean prompt = false; - boolean preserve = false; - - // process options - int argi = 0; - while (argi < args.length) { - String arg = args[argi]; - if (!arg.startsWith("-")) - break; - if (arg.length() < 2) - usage(); - for (int i=1; i 1) { - source[i++] = Paths.get(args[argi++]); - remaining--; - } - Path target = Paths.get(args[argi]); - - // check if target is a directory - boolean isDir = Files.isDirectory(target); - - // copy each source file/directory to target - for (i=0; i opts = EnumSet.of(FileVisitOption.FOLLOW_LINKS); - TreeCopier tc = new TreeCopier(source[i], dest, prompt, preserve); - Files.walkFileTree(source[i], opts, Integer.MAX_VALUE, tc); - } else { - // not recursive so source must not be a directory - if (Files.isDirectory(source[i])) { - System.err.format("%s: is a directory%n", source[i]); - continue; - } - copyFile(source[i], dest, prompt, preserve); - } - } - } -} diff --git a/jdk/src/sample/share/nio/file/DiskUsage.java b/jdk/src/sample/share/nio/file/DiskUsage.java deleted file mode 100644 index 7d30bdfe227..00000000000 --- a/jdk/src/sample/share/nio/file/DiskUsage.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.file.*; -import java.nio.file.attribute.*; -import java.io.IOException; - -/** - * Example utility that works like the df(1M) program to print out disk space - * information - */ - -public class DiskUsage { - - static final long K = 1024; - - static void printFileStore(FileStore store) throws IOException { - long total = store.getTotalSpace() / K; - long used = (store.getTotalSpace() - store.getUnallocatedSpace()) / K; - long avail = store.getUsableSpace() / K; - - String s = store.toString(); - if (s.length() > 20) { - System.out.println(s); - s = ""; - } - System.out.format("%-20s %12d %12d %12d\n", s, total, used, avail); - } - - public static void main(String[] args) throws IOException { - System.out.format("%-20s %12s %12s %12s\n", "Filesystem", "kbytes", "used", "avail"); - if (args.length == 0) { - FileSystem fs = FileSystems.getDefault(); - for (FileStore store: fs.getFileStores()) { - printFileStore(store); - } - } else { - for (String file: args) { - FileStore store = Files.getFileStore(Paths.get(file)); - printFileStore(store); - } - } - } -} diff --git a/jdk/src/sample/share/nio/file/FileType.java b/jdk/src/sample/share/nio/file/FileType.java deleted file mode 100644 index d001d6018b0..00000000000 --- a/jdk/src/sample/share/nio/file/FileType.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.file.*; -import java.io.IOException; - -public class FileType { - public static void main(String[] args) throws IOException { - if (args.length == 0) { - System.err.println("usage: java FileType file..."); - System.exit(-1); - } - for (String arg: args) { - Path file = Paths.get(arg); - String type; - if (Files.isDirectory(file)) { - type = "directory"; - } else { - type = Files.probeContentType(file); - if (type == null) - type = ""; - } - System.out.format("%s\t%s%n", file, type); - } - } -} diff --git a/jdk/src/sample/share/nio/file/WatchDir.java b/jdk/src/sample/share/nio/file/WatchDir.java deleted file mode 100644 index 4c738209f8b..00000000000 --- a/jdk/src/sample/share/nio/file/WatchDir.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.file.*; -import static java.nio.file.StandardWatchEventKinds.*; -import static java.nio.file.LinkOption.*; -import java.nio.file.attribute.*; -import java.io.IOException; - -/** - * Example to watch a directory (or tree) for changes to files. - */ - -public class WatchDir { - - private final WatchService watcher; - private final boolean recursive; - private boolean trace = false; - private int count; - - @SuppressWarnings("unchecked") - static WatchEvent cast(WatchEvent event) { - return (WatchEvent)event; - } - - /** - * Register the given directory with the WatchService - */ - private void register(Path dir) throws IOException { - WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY); - count++; - if (trace) - System.out.format("register: %s\n", dir); - } - - /** - * Register the given directory, and all its sub-directories, with the - * WatchService. - */ - private void registerAll(final Path start) throws IOException { - // register directory and sub-directories - Files.walkFileTree(start, new SimpleFileVisitor() { - @Override - public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) - throws IOException - { - register(dir); - return FileVisitResult.CONTINUE; - } - }); - } - - /** - * Creates a WatchService and registers the given directory - */ - WatchDir(Path dir, boolean recursive) throws IOException { - this.watcher = FileSystems.getDefault().newWatchService(); - this.recursive = recursive; - - if (recursive) { - System.out.format("Scanning %s ...\n", dir); - registerAll(dir); - System.out.println("Done."); - } else { - register(dir); - } - - // enable trace after initial registration - this.trace = true; - } - - /** - * Process all events for keys queued to the watcher - */ - void processEvents() { - for (;;) { - - // wait for key to be signalled - WatchKey key; - try { - key = watcher.take(); - } catch (InterruptedException x) { - return; - } - - for (WatchEvent event: key.pollEvents()) { - WatchEvent.Kind kind = event.kind(); - - // TBD - provide example of how OVERFLOW event is handled - if (kind == OVERFLOW) { - continue; - } - - // Context for directory entry event is the file name of entry - WatchEvent ev = cast(event); - Path name = ev.context(); - Path child = ((Path)key.watchable()).resolve(name); - - // print out event - System.out.format("%s: %s\n", event.kind().name(), child); - - // if directory is created, and watching recursively, then - // register it and its sub-directories - if (recursive && (kind == ENTRY_CREATE)) { - try { - if (Files.isDirectory(child, NOFOLLOW_LINKS)) { - registerAll(child); - } - } catch (IOException x) { - // ignore to keep sample readbale - } - } - } - - // reset key - boolean valid = key.reset(); - if (!valid) { - // directory no longer accessible - count--; - if (count == 0) - break; - } - } - } - - static void usage() { - System.err.println("usage: java WatchDir [-r] dir"); - System.exit(-1); - } - - public static void main(String[] args) throws IOException { - // parse arguments - if (args.length == 0 || args.length > 2) - usage(); - boolean recursive = false; - int dirArg = 0; - if (args[0].equals("-r")) { - if (args.length < 2) - usage(); - recursive = true; - dirArg++; - } - - // register directory and process its events - Path dir = Paths.get(args[dirArg]); - new WatchDir(dir, recursive).processEvents(); - } -} diff --git a/jdk/src/sample/share/nio/file/Xdd.java b/jdk/src/sample/share/nio/file/Xdd.java deleted file mode 100644 index c0c7f8778a3..00000000000 --- a/jdk/src/sample/share/nio/file/Xdd.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.file.*; -import java.nio.file.attribute.*; -import java.io.IOException; - -/** - * Example code to list/set/get/delete the user-defined attributes of a file. - */ - -public class Xdd { - - static void usage() { - System.out.println("Usage: java Xdd "); - System.out.println(" java Xdd -set = "); - System.out.println(" java Xdd -get "); - System.out.println(" java Xdd -del "); - System.exit(-1); - } - - public static void main(String[] args) throws IOException { - // one or three parameters - if (args.length != 1 && args.length != 3) - usage(); - - Path file = (args.length == 1) ? - Paths.get(args[0]) : Paths.get(args[2]); - - // check that user defined attributes are supported by the file store - FileStore store = Files.getFileStore(file); - if (!store.supportsFileAttributeView(UserDefinedFileAttributeView.class)) { - System.err.format("UserDefinedFileAttributeView not supported on %s\n", store); - System.exit(-1); - - } - UserDefinedFileAttributeView view = - Files.getFileAttributeView(file, UserDefinedFileAttributeView.class); - - // list user defined attributes - if (args.length == 1) { - System.out.println(" Size Name"); - System.out.println("-------- --------------------------------------"); - for (String name: view.list()) { - System.out.format("%8d %s\n", view.size(name), name); - } - return; - } - - // Add/replace a file's user defined attribute - if (args[0].equals("-set")) { - // name=value - String[] s = args[1].split("="); - if (s.length != 2) - usage(); - String name = s[0]; - String value = s[1]; - view.write(name, Charset.defaultCharset().encode(value)); - return; - } - - // Print out the value of a file's user defined attribute - if (args[0].equals("-get")) { - String name = args[1]; - int size = view.size(name); - ByteBuffer buf = ByteBuffer.allocateDirect(size); - view.read(name, buf); - buf.flip(); - System.out.println(Charset.defaultCharset().decode(buf).toString()); - return; - } - - // Delete a file's user defined attribute - if (args[0].equals("-del")) { - view.delete(args[1]); - return; - } - - // option not recognized - usage(); - } - } diff --git a/jdk/src/sample/share/nio/multicast/MulticastAddress.java b/jdk/src/sample/share/nio/multicast/MulticastAddress.java deleted file mode 100644 index 05f5ca5030f..00000000000 --- a/jdk/src/sample/share/nio/multicast/MulticastAddress.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.net.InetAddress; -import java.net.NetworkInterface; -import java.net.UnknownHostException; -import java.net.SocketException; - -/** - * Parses and represents a multicast address. - */ - -class MulticastAddress { - private final InetAddress group; - private final int port; - private final NetworkInterface interf; - - private MulticastAddress(InetAddress group, int port, NetworkInterface interf) { - this.group = group; - this.port = port; - this.interf = interf; - } - - InetAddress group() { - return group; - } - - int port() { - return port; - } - - /** - * @return The network interface, may be {@code null} - */ - NetworkInterface interf() { - return interf; - } - - /** - * Parses a string of the form "group:port[@interface]", returning - * a MulticastAddress representing the address - */ - static MulticastAddress parse(String s) { - String[] components = s.split("@"); - if (components.length > 2) - throw new IllegalArgumentException("At most one '@' expected"); - - // get group and port - String target = components[0]; - int len = components[0].length(); - int colon = components[0].lastIndexOf(':'); - if ((colon < 1) || (colon > (len-2))) - throw new IllegalArgumentException("group:port expected"); - String groupString = target.substring(0, colon); - int port = -1; - try { - port = Integer.parseInt(target.substring(colon+1, len)); - } catch (NumberFormatException x) { - throw new IllegalArgumentException(x); - } - - // handle IPv6 literal address - if (groupString.charAt(0) == '[') { - len = groupString.length(); - if (groupString.charAt(len-1) != ']') - throw new IllegalArgumentException("missing ']'"); - groupString = groupString.substring(1,len-1); - if (groupString.length() == 0) - throw new IllegalArgumentException("missing IPv6 address"); - } - - // get group address - InetAddress group = null; - try { - group = InetAddress.getByName(groupString); - } catch (UnknownHostException x) { - throw new IllegalArgumentException(x); - } - if (!group.isMulticastAddress()) { - throw new IllegalArgumentException("'" + group.getHostAddress() + - "' is not multicast address"); - } - - // optional interface - NetworkInterface interf = null; - if (components.length == 2) { - try { - interf = NetworkInterface.getByName(components[1]); - } catch (SocketException x) { - throw new IllegalArgumentException(x); - } - if (interf == null) { - throw new IllegalArgumentException("'" + components[1] + - "' is not valid interface"); - } - } - return new MulticastAddress(group, port, interf); - } -} diff --git a/jdk/src/sample/share/nio/multicast/Reader.java b/jdk/src/sample/share/nio/multicast/Reader.java deleted file mode 100644 index 303c3568a28..00000000000 --- a/jdk/src/sample/share/nio/multicast/Reader.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.channels.*; -import java.nio.charset.*; -import java.nio.ByteBuffer; -import java.net.*; -import java.io.IOException; -import java.util.*; - -public class Reader { - - static void usage() { - System.err.println("usage: java Reader group:port@interf [-only source...] [-block source...]"); - System.exit(-1); - } - - static void printDatagram(SocketAddress sa, ByteBuffer buf) { - System.out.format("-- datagram from %s --\n", - ((InetSocketAddress)sa).getAddress().getHostAddress()); - System.out.println(Charset.defaultCharset().decode(buf)); - } - - static void parseAddessList(String s, List list) - throws UnknownHostException - { - String[] sources = s.split(","); - for (int i=0; i includeList = new ArrayList(); - List excludeList = new ArrayList(); - int argc = 1; - while (argc < args.length) { - String option = args[argc++]; - if (argc >= args.length) - usage(); - String value = args[argc++]; - if (option.equals("-only")) { - parseAddessList(value, includeList); - continue; - } - if (option.equals("-block")) { - parseAddessList(value, excludeList); - continue; - } - usage(); - } - if (!includeList.isEmpty() && !excludeList.isEmpty()) { - usage(); - } - - // create and bind socket - ProtocolFamily family = StandardProtocolFamily.INET; - if (target.group() instanceof Inet6Address) { - family = StandardProtocolFamily.INET6; - } - DatagramChannel dc = DatagramChannel.open(family) - .setOption(StandardSocketOptions.SO_REUSEADDR, true) - .bind(new InetSocketAddress(target.port())); - - if (includeList.isEmpty()) { - // join group and block addresses on the exclude list - MembershipKey key = dc.join(target.group(), target.interf()); - for (InetAddress source: excludeList) { - key.block(source); - } - } else { - // join with source-specific membership for each source - for (InetAddress source: includeList) { - dc.join(target.group(), target.interf(), source); - } - } - - // register socket with Selector - Selector sel = Selector.open(); - dc.configureBlocking(false); - dc.register(sel, SelectionKey.OP_READ); - - // print out each datagram that we receive - ByteBuffer buf = ByteBuffer.allocateDirect(4096); - for (;;) { - int updated = sel.select(); - if (updated > 0) { - Iterator iter = sel.selectedKeys().iterator(); - while (iter.hasNext()) { - SelectionKey sk = iter.next(); - iter.remove(); - - DatagramChannel ch = (DatagramChannel)sk.channel(); - SocketAddress sa = ch.receive(buf); - if (sa != null) { - buf.flip(); - printDatagram(sa, buf); - buf.rewind(); - buf.limit(buf.capacity()); - } - } - } - } - } -} diff --git a/jdk/src/sample/share/nio/multicast/Sender.java b/jdk/src/sample/share/nio/multicast/Sender.java deleted file mode 100644 index f8685f6d981..00000000000 --- a/jdk/src/sample/share/nio/multicast/Sender.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.channels.*; -import java.nio.charset.Charset; -import java.net.*; -import java.io.IOException; -import java.util.*; - -/** - * Sample multicast sender to send a message in a multicast datagram - * to a given group. - */ - -public class Sender { - - private static void usage() { - System.err.println("usage: java Sender group:port[@interface] message"); - System.exit(-1); - } - - public static void main(String[] args) throws IOException { - if (args.length < 2) - usage(); - - MulticastAddress target = MulticastAddress.parse(args[0]); - - // create socket - ProtocolFamily family = StandardProtocolFamily.INET; - if (target.group() instanceof Inet6Address) - family = StandardProtocolFamily.INET6; - DatagramChannel dc = DatagramChannel.open(family).bind(new InetSocketAddress(0)); - if (target.interf() != null) { - dc.setOption(StandardSocketOptions.IP_MULTICAST_IF, target.interf()); - } - - // send multicast packet - dc.send(Charset.defaultCharset().encode(args[1]), - new InetSocketAddress(target.group(), target.port())); - dc.close(); - } - -} diff --git a/jdk/src/sample/share/nio/server/AcceptHandler.java b/jdk/src/sample/share/nio/server/AcceptHandler.java deleted file mode 100644 index 41c2570d61f..00000000000 --- a/jdk/src/sample/share/nio/server/AcceptHandler.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.channels.*; -import javax.net.ssl.*; - -/** - * A single threaded Handler that performs accepts SocketChannels and - * registers the Channels with the read/write Selector. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class AcceptHandler implements Handler { - - private ServerSocketChannel channel; - private Dispatcher dsp; - - private SSLContext sslContext; - - AcceptHandler(ServerSocketChannel ssc, Dispatcher dsp, - SSLContext sslContext) { - channel = ssc; - this.dsp = dsp; - this.sslContext = sslContext; - } - - public void handle(SelectionKey sk) throws IOException { - - if (!sk.isAcceptable()) - return; - - SocketChannel sc = channel.accept(); - if (sc == null) { - return; - } - - ChannelIO cio = (sslContext != null ? - ChannelIOSecure.getInstance( - sc, false /* non-blocking */, sslContext) : - ChannelIO.getInstance( - sc, false /* non-blocking */)); - - RequestHandler rh = new RequestHandler(cio); - dsp.register(cio.getSocketChannel(), SelectionKey.OP_READ, rh); - } -} diff --git a/jdk/src/sample/share/nio/server/Acceptor.java b/jdk/src/sample/share/nio/server/Acceptor.java deleted file mode 100644 index cfdaf0ef07c..00000000000 --- a/jdk/src/sample/share/nio/server/Acceptor.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.channels.*; -import javax.net.ssl.*; - -/** - * A Runnable class which sits in a loop accepting SocketChannels, - * then registers the Channels with the read/write Selector. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class Acceptor implements Runnable { - - private ServerSocketChannel ssc; - private Dispatcher d; - - private SSLContext sslContext; - - Acceptor(ServerSocketChannel ssc, Dispatcher d, SSLContext sslContext) { - this.ssc = ssc; - this.d = d; - this.sslContext = sslContext; - } - - public void run() { - for (;;) { - try { - SocketChannel sc = ssc.accept(); - - ChannelIO cio = (sslContext != null ? - ChannelIOSecure.getInstance( - sc, false /* non-blocking */, sslContext) : - ChannelIO.getInstance( - sc, false /* non-blocking */)); - - RequestHandler rh = new RequestHandler(cio); - - d.register(cio.getSocketChannel(), SelectionKey.OP_READ, rh); - - } catch (IOException x) { - x.printStackTrace(); - break; - } - } - } -} diff --git a/jdk/src/sample/share/nio/server/B1.java b/jdk/src/sample/share/nio/server/B1.java deleted file mode 100644 index c6d7e90890a..00000000000 --- a/jdk/src/sample/share/nio/server/B1.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.channels.*; - -/** - * A blocking/single-threaded server which completely services - * each connection before moving to the next. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -public class B1 extends Server { - - B1(int port, int backlog, boolean secure) throws Exception { - super(port, backlog, secure); - } - - void runServer() throws Exception { - for (;;) { - - SocketChannel sc = ssc.accept(); - - ChannelIO cio = (sslContext != null ? - ChannelIOSecure.getInstance( - sc, true /* blocking */, sslContext) : - ChannelIO.getInstance( - sc, true /* blocking */)); - - RequestServicer svc = new RequestServicer(cio); - svc.run(); - } - } -} diff --git a/jdk/src/sample/share/nio/server/BN.java b/jdk/src/sample/share/nio/server/BN.java deleted file mode 100644 index c765a8b946c..00000000000 --- a/jdk/src/sample/share/nio/server/BN.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.channels.*; - -/** - * A Blocking/Multi-threaded Server which creates a new thread for each - * connection. This is not efficient for large numbers of connections. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -public class BN extends Server { - - BN(int port, int backlog, boolean secure) throws Exception { - super(port, backlog, secure); - } - - void runServer() throws IOException { - for (;;) { - - SocketChannel sc = ssc.accept(); - - ChannelIO cio = (sslContext != null ? - ChannelIOSecure.getInstance( - sc, true /* blocking */, sslContext) : - ChannelIO.getInstance( - sc, true /* blocking */)); - - RequestServicer svc = new RequestServicer(cio); - Thread th = new Thread(svc); - th.start(); - } - } -} diff --git a/jdk/src/sample/share/nio/server/BP.java b/jdk/src/sample/share/nio/server/BP.java deleted file mode 100644 index 9540f1cf8c2..00000000000 --- a/jdk/src/sample/share/nio/server/BP.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.channels.*; -import java.util.concurrent.*; - -/** - * A multi-threaded server which creates a pool of threads for use - * by the server. The Thread pool decides how to schedule those threads. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -public class BP extends Server { - - private static final int POOL_MULTIPLE = 4; - - BP(int port, int backlog, boolean secure) throws Exception { - super(port, backlog, secure); - } - - void runServer() throws Exception { - - ExecutorService xec = Executors.newFixedThreadPool( - Runtime.getRuntime().availableProcessors() * POOL_MULTIPLE); - - for (;;) { - - SocketChannel sc = ssc.accept(); - - ChannelIO cio = (sslContext != null ? - ChannelIOSecure.getInstance( - sc, true /* blocking */, sslContext) : - ChannelIO.getInstance( - sc, true /* blocking */)); - - RequestServicer svc = new RequestServicer(cio); - xec.execute(svc); - } - } -} diff --git a/jdk/src/sample/share/nio/server/ChannelIO.java b/jdk/src/sample/share/nio/server/ChannelIO.java deleted file mode 100644 index 7d1ca18635f..00000000000 --- a/jdk/src/sample/share/nio/server/ChannelIO.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.*; -import java.nio.channels.*; - -/** - * A helper class for properly sizing inbound byte buffers and - * redirecting I/O calls to the proper SocketChannel call. - *

                    - * Many of these calls may seem unnecessary until you consider - * that they are placeholders for the secure variant, which is much - * more involved. See ChannelIOSecure for more information. - * - * @author Brad R. Wetmore - * @author Mark Reinhold - */ -class ChannelIO { - - protected SocketChannel sc; - - /* - * All of the inbound request data lives here until we determine - * that we've read everything, then we pass that data back to the - * caller. - */ - protected ByteBuffer requestBB; - static private int requestBBSize = 4096; - - protected ChannelIO(SocketChannel sc, boolean blocking) - throws IOException { - this.sc = sc; - sc.configureBlocking(blocking); - } - - static ChannelIO getInstance(SocketChannel sc, boolean blocking) - throws IOException { - ChannelIO cio = new ChannelIO(sc, blocking); - cio.requestBB = ByteBuffer.allocate(requestBBSize); - - return cio; - } - - SocketChannel getSocketChannel() { - return sc; - } - - /* - * Return a ByteBuffer with "remaining" space to work. If you have to - * reallocate the ByteBuffer, copy the existing info into the new buffer. - */ - protected void resizeRequestBB(int remaining) { - if (requestBB.remaining() < remaining) { - // Expand buffer for large request - ByteBuffer bb = ByteBuffer.allocate(requestBB.capacity() * 2); - requestBB.flip(); - bb.put(requestBB); - requestBB = bb; - } - } - - /* - * Perform any handshaking processing. - *

                    - * This variant is for Servers without SelectionKeys (e.g. - * blocking). - *

                    - * return true when we're done with handshaking. - */ - boolean doHandshake() throws IOException { - return true; - } - - /* - * Perform any handshaking processing. - *

                    - * This variant is for Servers with SelectionKeys, so that - * we can register for selectable operations (e.g. selectable - * non-blocking). - *

                    - * return true when we're done with handshaking. - */ - boolean doHandshake(SelectionKey sk) throws IOException { - return true; - } - - /* - * Resize (if necessary) the inbound data buffer, and then read more - * data into the read buffer. - */ - int read() throws IOException { - /* - * Allocate more space if less than 5% remains - */ - resizeRequestBB(requestBBSize/20); - return sc.read(requestBB); - } - - /* - * All data has been read, pass back the request in one buffer. - */ - ByteBuffer getReadBuf() { - return requestBB; - } - - /* - * Write the src buffer into the socket channel. - */ - int write(ByteBuffer src) throws IOException { - return sc.write(src); - } - - /* - * Perform a FileChannel.TransferTo on the socket channel. - */ - long transferTo(FileChannel fc, long pos, long len) throws IOException { - return fc.transferTo(pos, len, sc); - } - - /* - * Flush any outstanding data to the network if possible. - *

                    - * This isn't really necessary for the insecure variant, but needed - * for the secure one where intermediate buffering must take place. - *

                    - * Return true if successful. - */ - boolean dataFlush() throws IOException { - return true; - } - - /* - * Start any connection shutdown processing. - *

                    - * This isn't really necessary for the insecure variant, but needed - * for the secure one where intermediate buffering must take place. - *

                    - * Return true if successful, and the data has been flushed. - */ - boolean shutdown() throws IOException { - return true; - } - - /* - * Close the underlying connection. - */ - void close() throws IOException { - sc.close(); - } - -} diff --git a/jdk/src/sample/share/nio/server/ChannelIOSecure.java b/jdk/src/sample/share/nio/server/ChannelIOSecure.java deleted file mode 100644 index 74bf652b7f1..00000000000 --- a/jdk/src/sample/share/nio/server/ChannelIOSecure.java +++ /dev/null @@ -1,650 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.*; -import java.nio.channels.*; -import javax.net.ssl.*; -import javax.net.ssl.SSLEngineResult.*; - -/** - * A helper class which performs I/O using the SSLEngine API. - *

                    - * Each connection has a SocketChannel and a SSLEngine that is - * used through the lifetime of the Channel. We allocate byte buffers - * for use as the outbound and inbound network buffers. - * - *

                    - *               Application Data
                    - *               src      requestBB
                    - *                |           ^
                    - *                |     |     |
                    - *                v     |     |
                    - *           +----+-----|-----+----+
                    - *           |          |          |
                    - *           |       SSL|Engine    |
                    - *   wrap()  |          |          |  unwrap()
                    - *           | OUTBOUND | INBOUND  |
                    - *           |          |          |
                    - *           +----+-----|-----+----+
                    - *                |     |     ^
                    - *                |     |     |
                    - *                v           |
                    - *            outNetBB     inNetBB
                    - *                   Net data
                    - * 
                    - * - * These buffers handle all of the intermediary data for the SSL - * connection. To make things easy, we'll require outNetBB be - * completely flushed before trying to wrap any more data, but we - * could certainly remove that restriction by using larger buffers. - *

                    - * There are many, many ways to handle compute and I/O strategies. - * What follows is a relatively simple one. The reader is encouraged - * to develop the strategy that best fits the application. - *

                    - * In most of the non-blocking operations in this class, we let the - * Selector tell us when we're ready to attempt an I/O operation (by the - * application repeatedly calling our methods). Another option would be - * to attempt the operation and return from the method when no forward - * progress can be made. - *

                    - * There's lots of room for enhancements and improvement in this example. - *

                    - * We're checking for SSL/TLS end-of-stream truncation attacks via - * sslEngine.closeInbound(). When you reach the end of a input stream - * via a read() returning -1 or an IOException, we call - * sslEngine.closeInbound() to signal to the sslEngine that no more - * input will be available. If the peer's close_notify message has not - * yet been received, this could indicate a trucation attack, in which - * an attacker is trying to prematurely close the connection. The - * closeInbound() will throw an exception if this condition were - * present. - * - * @author Brad R. Wetmore - * @author Mark Reinhold - */ -class ChannelIOSecure extends ChannelIO { - - private SSLEngine sslEngine = null; - - private int appBBSize; - private int netBBSize; - - /* - * All I/O goes through these buffers. - *

                    - * It might be nice to use a cache of ByteBuffers so we're - * not alloc/dealloc'ing ByteBuffer's for each new SSLEngine. - *

                    - * We use our superclass' requestBB for our application input buffer. - * Outbound application data is supplied to us by our callers. - */ - private ByteBuffer inNetBB; - private ByteBuffer outNetBB; - - /* - * An empty ByteBuffer for use when one isn't available, say - * as a source buffer during initial handshake wraps or for close - * operations. - */ - private static ByteBuffer hsBB = ByteBuffer.allocate(0); - - /* - * The FileChannel we're currently transferTo'ing (reading). - */ - private ByteBuffer fileChannelBB = null; - - /* - * During our initial handshake, keep track of the next - * SSLEngine operation that needs to occur: - * - * NEED_WRAP/NEED_UNWRAP - * - * Once the initial handshake has completed, we can short circuit - * handshake checks with initialHSComplete. - */ - private HandshakeStatus initialHSStatus; - private boolean initialHSComplete; - - /* - * We have received the shutdown request by our caller, and have - * closed our outbound side. - */ - private boolean shutdown = false; - - /* - * Constructor for a secure ChannelIO variant. - */ - protected ChannelIOSecure(SocketChannel sc, boolean blocking, - SSLContext sslc) throws IOException { - super(sc, blocking); - - /* - * We're a server, so no need to use host/port variant. - * - * The first call for a server is a NEED_UNWRAP. - */ - sslEngine = sslc.createSSLEngine(); - sslEngine.setUseClientMode(false); - initialHSStatus = HandshakeStatus.NEED_UNWRAP; - initialHSComplete = false; - - // Create a buffer using the normal expected packet size we'll - // be getting. This may change, depending on the peer's - // SSL implementation. - netBBSize = sslEngine.getSession().getPacketBufferSize(); - inNetBB = ByteBuffer.allocate(netBBSize); - outNetBB = ByteBuffer.allocate(netBBSize); - outNetBB.position(0); - outNetBB.limit(0); - } - - /* - * Static factory method for creating a secure ChannelIO object. - *

                    - * We need to allocate different sized application data buffers - * based on whether we're secure or not. We can't determine - * this until our sslEngine is created. - */ - static ChannelIOSecure getInstance(SocketChannel sc, boolean blocking, - SSLContext sslc) throws IOException { - - ChannelIOSecure cio = new ChannelIOSecure(sc, blocking, sslc); - - // Create a buffer using the normal expected application size we'll - // be getting. This may change, depending on the peer's - // SSL implementation. - cio.appBBSize = cio.sslEngine.getSession().getApplicationBufferSize(); - cio.requestBB = ByteBuffer.allocate(cio.appBBSize); - - return cio; - } - - /* - * Calls up to the superclass to adjust the buffer size - * by an appropriate increment. - */ - protected void resizeRequestBB() { - resizeRequestBB(appBBSize); - } - - /* - * Adjust the inbount network buffer to an appropriate size. - */ - private void resizeResponseBB() { - ByteBuffer bb = ByteBuffer.allocate(netBBSize); - inNetBB.flip(); - bb.put(inNetBB); - inNetBB = bb; - } - - /* - * Writes bb to the SocketChannel. - *

                    - * Returns true when the ByteBuffer has no remaining data. - */ - private boolean tryFlush(ByteBuffer bb) throws IOException { - super.write(bb); - return !bb.hasRemaining(); - } - - /* - * Perform any handshaking processing. - *

                    - * This variant is for Servers without SelectionKeys (e.g. - * blocking). - */ - boolean doHandshake() throws IOException { - return doHandshake(null); - } - - /* - * Perform any handshaking processing. - *

                    - * If a SelectionKey is passed, register for selectable - * operations. - *

                    - * In the blocking case, our caller will keep calling us until - * we finish the handshake. Our reads/writes will block as expected. - *

                    - * In the non-blocking case, we just received the selection notification - * that this channel is ready for whatever the operation is, so give - * it a try. - *

                    - * return: - * true when handshake is done. - * false while handshake is in progress - */ - boolean doHandshake(SelectionKey sk) throws IOException { - - SSLEngineResult result; - - if (initialHSComplete) { - return initialHSComplete; - } - - /* - * Flush out the outgoing buffer, if there's anything left in - * it. - */ - if (outNetBB.hasRemaining()) { - - if (!tryFlush(outNetBB)) { - return false; - } - - // See if we need to switch from write to read mode. - - switch (initialHSStatus) { - - /* - * Is this the last buffer? - */ - case FINISHED: - initialHSComplete = true; - // Fall-through to reregister need for a Read. - - case NEED_UNWRAP: - if (sk != null) { - sk.interestOps(SelectionKey.OP_READ); - } - break; - } - - return initialHSComplete; - } - - - switch (initialHSStatus) { - - case NEED_UNWRAP: - if (sc.read(inNetBB) == -1) { - sslEngine.closeInbound(); - return initialHSComplete; - } - -needIO: - while (initialHSStatus == HandshakeStatus.NEED_UNWRAP) { - resizeRequestBB(); // expected room for unwrap - inNetBB.flip(); - result = sslEngine.unwrap(inNetBB, requestBB); - inNetBB.compact(); - - initialHSStatus = result.getHandshakeStatus(); - - switch (result.getStatus()) { - - case OK: - switch (initialHSStatus) { - case NOT_HANDSHAKING: - throw new IOException( - "Not handshaking during initial handshake"); - - case NEED_TASK: - initialHSStatus = doTasks(); - break; - - case FINISHED: - initialHSComplete = true; - break needIO; - } - - break; - - case BUFFER_UNDERFLOW: - // Resize buffer if needed. - netBBSize = sslEngine.getSession().getPacketBufferSize(); - if (netBBSize > inNetBB.capacity()) { - resizeResponseBB(); - } - - /* - * Need to go reread the Channel for more data. - */ - if (sk != null) { - sk.interestOps(SelectionKey.OP_READ); - } - break needIO; - - case BUFFER_OVERFLOW: - // Reset the application buffer size. - appBBSize = - sslEngine.getSession().getApplicationBufferSize(); - break; - - default: //CLOSED: - throw new IOException("Received" + result.getStatus() + - "during initial handshaking"); - } - } // "needIO" block. - - /* - * Just transitioned from read to write. - */ - if (initialHSStatus != HandshakeStatus.NEED_WRAP) { - break; - } - - // Fall through and fill the write buffers. - - case NEED_WRAP: - /* - * The flush above guarantees the out buffer to be empty - */ - outNetBB.clear(); - result = sslEngine.wrap(hsBB, outNetBB); - outNetBB.flip(); - - initialHSStatus = result.getHandshakeStatus(); - - switch (result.getStatus()) { - case OK: - - if (initialHSStatus == HandshakeStatus.NEED_TASK) { - initialHSStatus = doTasks(); - } - - if (sk != null) { - sk.interestOps(SelectionKey.OP_WRITE); - } - - break; - - default: // BUFFER_OVERFLOW/BUFFER_UNDERFLOW/CLOSED: - throw new IOException("Received" + result.getStatus() + - "during initial handshaking"); - } - break; - - default: // NOT_HANDSHAKING/NEED_TASK/FINISHED - throw new RuntimeException("Invalid Handshaking State" + - initialHSStatus); - } // switch - - return initialHSComplete; - } - - /* - * Do all the outstanding handshake tasks in the current Thread. - */ - private SSLEngineResult.HandshakeStatus doTasks() { - - Runnable runnable; - - /* - * We could run this in a separate thread, but - * do in the current for now. - */ - while ((runnable = sslEngine.getDelegatedTask()) != null) { - runnable.run(); - } - return sslEngine.getHandshakeStatus(); - } - - /* - * Read the channel for more information, then unwrap the - * (hopefully application) data we get. - *

                    - * If we run out of data, we'll return to our caller (possibly using - * a Selector) to get notification that more is available. - *

                    - * Each call to this method will perform at most one underlying read(). - */ - int read() throws IOException { - SSLEngineResult result; - - if (!initialHSComplete) { - throw new IllegalStateException(); - } - - int pos = requestBB.position(); - - if (sc.read(inNetBB) == -1) { - sslEngine.closeInbound(); // probably throws exception - return -1; - } - - do { - resizeRequestBB(); // expected room for unwrap - inNetBB.flip(); - result = sslEngine.unwrap(inNetBB, requestBB); - inNetBB.compact(); - - /* - * Could check here for a renegotation, but we're only - * doing a simple read/write, and won't have enough state - * transitions to do a complete handshake, so ignore that - * possibility. - */ - switch (result.getStatus()) { - - case BUFFER_OVERFLOW: - // Reset the application buffer size. - appBBSize = sslEngine.getSession().getApplicationBufferSize(); - break; - - case BUFFER_UNDERFLOW: - // Resize buffer if needed. - netBBSize = sslEngine.getSession().getPacketBufferSize(); - if (netBBSize > inNetBB.capacity()) { - resizeResponseBB(); - - break; // break, next read will support larger buffer. - } - case OK: - if (result.getHandshakeStatus() == HandshakeStatus.NEED_TASK) { - doTasks(); - } - break; - - default: - throw new IOException("sslEngine error during data read: " + - result.getStatus()); - } - } while ((inNetBB.position() != 0) && - result.getStatus() != Status.BUFFER_UNDERFLOW); - - return (requestBB.position() - pos); - } - - /* - * Try to write out as much as possible from the src buffer. - */ - int write(ByteBuffer src) throws IOException { - - if (!initialHSComplete) { - throw new IllegalStateException(); - } - - return doWrite(src); - } - - /* - * Try to flush out any existing outbound data, then try to wrap - * anything new contained in the src buffer. - *

                    - * Return the number of bytes actually consumed from the buffer, - * but the data may actually be still sitting in the output buffer, - * waiting to be flushed. - */ - private int doWrite(ByteBuffer src) throws IOException { - int retValue = 0; - - if (outNetBB.hasRemaining() && !tryFlush(outNetBB)) { - return retValue; - } - - /* - * The data buffer is empty, we can reuse the entire buffer. - */ - outNetBB.clear(); - - SSLEngineResult result = sslEngine.wrap(src, outNetBB); - retValue = result.bytesConsumed(); - - outNetBB.flip(); - - switch (result.getStatus()) { - - case OK: - if (result.getHandshakeStatus() == HandshakeStatus.NEED_TASK) { - doTasks(); - } - break; - - default: - throw new IOException("sslEngine error during data write: " + - result.getStatus()); - } - - /* - * Try to flush the data, regardless of whether or not - * it's been selected. Odds of a write buffer being full - * is less than a read buffer being empty. - */ - if (outNetBB.hasRemaining()) { - tryFlush(outNetBB); - } - - return retValue; - } - - /* - * Perform a FileChannel.TransferTo on the socket channel. - *

                    - * We have to copy the data into an intermediary app ByteBuffer - * first, then send it through the SSLEngine. - *

                    - * We return the number of bytes actually read out of the - * filechannel. However, the data may actually be stuck - * in the fileChannelBB or the outNetBB. The caller - * is responsible for making sure to call dataFlush() - * before shutting down. - */ - long transferTo(FileChannel fc, long pos, long len) throws IOException { - - if (!initialHSComplete) { - throw new IllegalStateException(); - } - - if (fileChannelBB == null) { - fileChannelBB = ByteBuffer.allocate(appBBSize); - fileChannelBB.limit(0); - } - - fileChannelBB.compact(); - int fileRead = fc.read(fileChannelBB); - fileChannelBB.flip(); - - /* - * We ignore the return value here, we return the - * number of bytes actually consumed from the file. - * We'll flush the output buffer before we start shutting down. - */ - doWrite(fileChannelBB); - - return fileRead; - } - - /* - * Flush any remaining data. - *

                    - * Return true when the fileChannelBB and outNetBB are empty. - */ - boolean dataFlush() throws IOException { - boolean fileFlushed = true; - - if ((fileChannelBB != null) && fileChannelBB.hasRemaining()) { - doWrite(fileChannelBB); - fileFlushed = !fileChannelBB.hasRemaining(); - } else if (outNetBB.hasRemaining()) { - tryFlush(outNetBB); - } - - return (fileFlushed && !outNetBB.hasRemaining()); - } - - /* - * Begin the shutdown process. - *

                    - * Close out the SSLEngine if not already done so, then - * wrap our outgoing close_notify message and try to send it on. - *

                    - * Return true when we're done passing the shutdown messsages. - */ - boolean shutdown() throws IOException { - - if (!shutdown) { - sslEngine.closeOutbound(); - shutdown = true; - } - - if (outNetBB.hasRemaining() && tryFlush(outNetBB)) { - return false; - } - - /* - * By RFC 2616, we can "fire and forget" our close_notify - * message, so that's what we'll do here. - */ - outNetBB.clear(); - SSLEngineResult result = sslEngine.wrap(hsBB, outNetBB); - if (result.getStatus() != Status.CLOSED) { - throw new SSLException("Improper close state"); - } - outNetBB.flip(); - - /* - * We won't wait for a select here, but if this doesn't work, - * we'll cycle back through on the next select. - */ - if (outNetBB.hasRemaining()) { - tryFlush(outNetBB); - } - - return (!outNetBB.hasRemaining() && - (result.getHandshakeStatus() != HandshakeStatus.NEED_WRAP)); - } - - /* - * close() is not overridden - */ -} diff --git a/jdk/src/sample/share/nio/server/Content.java b/jdk/src/sample/share/nio/server/Content.java deleted file mode 100644 index 52e06faca03..00000000000 --- a/jdk/src/sample/share/nio/server/Content.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/** - * An Sendable interface extension that adds additional - * methods for additional information, such as Files - * or Strings. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -interface Content extends Sendable { - - String type(); - - // Returns -1 until prepare() invoked - long length(); - -} diff --git a/jdk/src/sample/share/nio/server/Dispatcher.java b/jdk/src/sample/share/nio/server/Dispatcher.java deleted file mode 100644 index 9474c12765f..00000000000 --- a/jdk/src/sample/share/nio/server/Dispatcher.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.channels.*; - -/** - * Base class for the Dispatchers. - *

                    - * Servers use these to obtain ready status, and then to dispatch jobs. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -interface Dispatcher extends Runnable { - - void register(SelectableChannel ch, int ops, Handler h) - throws IOException; - -} diff --git a/jdk/src/sample/share/nio/server/Dispatcher1.java b/jdk/src/sample/share/nio/server/Dispatcher1.java deleted file mode 100644 index 533e4b81e8b..00000000000 --- a/jdk/src/sample/share/nio/server/Dispatcher1.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.channels.*; -import java.util.*; - -/** - * A single-threaded dispatcher. - *

                    - * When a SelectionKey is ready, it dispatches the job in this - * thread. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class Dispatcher1 implements Dispatcher { - - private Selector sel; - - Dispatcher1() throws IOException { - sel = Selector.open(); - } - - // Doesn't really need to be runnable - public void run() { - for (;;) { - try { - dispatch(); - } catch (IOException x) { - x.printStackTrace(); - } - } - } - - private void dispatch() throws IOException { - sel.select(); - for (Iterator i = sel.selectedKeys().iterator(); i.hasNext(); ) { - SelectionKey sk = (SelectionKey)i.next(); - i.remove(); - Handler h = (Handler)sk.attachment(); - h.handle(sk); - } - } - - public void register(SelectableChannel ch, int ops, Handler h) - throws IOException { - ch.register(sel, ops, h); - } -} diff --git a/jdk/src/sample/share/nio/server/DispatcherN.java b/jdk/src/sample/share/nio/server/DispatcherN.java deleted file mode 100644 index 7b601b0faa4..00000000000 --- a/jdk/src/sample/share/nio/server/DispatcherN.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.channels.*; -import java.util.*; - -/** - * A Multi-threaded dispatcher. - *

                    - * In this example, one thread does accepts, and the second - * does read/writes. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class DispatcherN implements Dispatcher { - - private Selector sel; - - DispatcherN() throws IOException { - sel = Selector.open(); - } - - public void run() { - for (;;) { - try { - dispatch(); - } catch (IOException x) { - x.printStackTrace(); - } - } - } - - private Object gate = new Object(); - - private void dispatch() throws IOException { - sel.select(); - for (Iterator i = sel.selectedKeys().iterator(); i.hasNext(); ) { - SelectionKey sk = (SelectionKey)i.next(); - i.remove(); - Handler h = (Handler)sk.attachment(); - h.handle(sk); - } - synchronized (gate) { } - } - - public void register(SelectableChannel ch, int ops, Handler h) - throws IOException { - synchronized (gate) { - sel.wakeup(); - ch.register(sel, ops, h); - } - } - -} diff --git a/jdk/src/sample/share/nio/server/FileContent.java b/jdk/src/sample/share/nio/server/FileContent.java deleted file mode 100644 index 82c44a9b2be..00000000000 --- a/jdk/src/sample/share/nio/server/FileContent.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.net.*; -import java.nio.channels.*; -import java.nio.charset.*; - -/** - * A Content type that provides for transferring files. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class FileContent implements Content { - - private static File ROOT = new File("root"); - - private File fn; - - FileContent(URI uri) { - fn = new File(ROOT, - uri.getPath() - .replace('/', - File.separatorChar)); - } - - private String type = null; - - public String type() { - if (type != null) - return type; - String nm = fn.getName(); - if (nm.endsWith(".html")) - type = "text/html; charset=iso-8859-1"; - else if ((nm.indexOf('.') < 0) || nm.endsWith(".txt")) - type = "text/plain; charset=iso-8859-1"; - else - type = "application/octet-stream"; - return type; - } - - private FileChannel fc = null; - private long length = -1; - private long position = -1; // NB only; >= 0 if transferring - - public long length() { - return length; - } - - public void prepare() throws IOException { - if (fc == null) - fc = new RandomAccessFile(fn, "r").getChannel(); - length = fc.size(); - position = 0; // NB only - } - - public boolean send(ChannelIO cio) throws IOException { - if (fc == null) - throw new IllegalStateException(); - if (position < 0) // NB only - throw new IllegalStateException(); - - /* - * Short-circuit if we're already done. - */ - if (position >= length) { - return false; - } - - position += cio.transferTo(fc, position, length - position); - return (position < length); - } - - public void release() throws IOException { - if (fc != null) { - fc.close(); - fc = null; - } - } -} diff --git a/jdk/src/sample/share/nio/server/Handler.java b/jdk/src/sample/share/nio/server/Handler.java deleted file mode 100644 index 110feb7a0e3..00000000000 --- a/jdk/src/sample/share/nio/server/Handler.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.channels.*; - -/** - * Base class for the Handlers. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -interface Handler { - - void handle(SelectionKey sk) throws IOException; - -} diff --git a/jdk/src/sample/share/nio/server/MalformedRequestException.java b/jdk/src/sample/share/nio/server/MalformedRequestException.java deleted file mode 100644 index 89b0db65ddb..00000000000 --- a/jdk/src/sample/share/nio/server/MalformedRequestException.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/** - * Exception class used when a request can't be properly parsed. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class MalformedRequestException extends Exception { - - MalformedRequestException() { } - - MalformedRequestException(String msg) { - super(msg); - } - - MalformedRequestException(Exception x) { - super(x); - } -} diff --git a/jdk/src/sample/share/nio/server/N1.java b/jdk/src/sample/share/nio/server/N1.java deleted file mode 100644 index d02bc931c23..00000000000 --- a/jdk/src/sample/share/nio/server/N1.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.nio.channels.*; - -/** - * A non-blocking/single-threaded server. All accept() and - * read()/write() operations are performed by a single thread, but only - * after being selected for those operations by a Selector. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -public class N1 extends Server { - - N1(int port, int backlog, boolean secure) throws Exception { - super(port, backlog, secure); - ssc.configureBlocking(false); - } - - void runServer() throws Exception { - Dispatcher d = new Dispatcher1(); - d.register(ssc, SelectionKey.OP_ACCEPT, - new AcceptHandler(ssc, d, sslContext)); - d.run(); - } -} diff --git a/jdk/src/sample/share/nio/server/N2.java b/jdk/src/sample/share/nio/server/N2.java deleted file mode 100644 index 2a216127cb6..00000000000 --- a/jdk/src/sample/share/nio/server/N2.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/** - * A non-blocking/dual-threaded which performs accept()s in one thread, - * and services requests in a second. Both threads use select(). - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -public class N2 extends Server { - - N2(int port, int backlog, boolean secure) throws Exception { - super(port, backlog, secure); - } - - void runServer() throws Exception { - Dispatcher d = new DispatcherN(); - Acceptor a = new Acceptor(ssc, d, sslContext); - new Thread(a).start(); - d.run(); - } -} diff --git a/jdk/src/sample/share/nio/server/README.txt b/jdk/src/sample/share/nio/server/README.txt deleted file mode 100644 index c012b82846b..00000000000 --- a/jdk/src/sample/share/nio/server/README.txt +++ /dev/null @@ -1,279 +0,0 @@ - A Simple NIO-based HTTP/HTTPS Server Example - - -INTRODUCTION -============ -This directory contains a simple HTTP/HTTPS server. HTTP/HTTPS are two -common network protocols that provide for data transfer, and are more -fully described in RFC 2616 and RFC 2818 (Available at -http://www.ietf.org ). HTTPS is essentially HTTP after the connection -has been secured with SSL/TLS. TLS is the successor to SSL, and is -described in RFC 2246. - -This server was written to demonstrate some of the functionality new to -the Java 2 platform. The demo is not meant to be a full tutorial, and -assumes the reader has some familiarity with the subject matter. - -In particular, it shows: - - New I/O (java.nio, java.nio.channels, java.util.regex, java.nio.charset) - - Introduced in version 1.4 of the platform, NIO was designed to - overcome some of the scalability limitations found in the - existing blocking java.net.* API's, and to address other - concepts such as Regular Expression parsing and Character - Sets. - - This server demonstrates: - - ByteBuffer - Blocking and Non-Blocking I/O - SocketChannel - ServerSocketChannel - Selector - CharacterSet - Pattern matching using Regular Expressions - - JSSE (javax.net.ssl) - - Introduced in version 1.4 of the platform, JSSE provides - network security using SSL/TLS for java.net.Socket-based - traffic. In version 1.5, the SSLEngine API was introduced - which separates the SSL/TLS functionality from the underlying - I/O model. By making this separation, applications can adapt - I/O and compute strategies to best fit their circumstances. - - This server demonstrates: - - Using SSLEngine to create a HTTPS server - Creating simple key material for use with HTTPS - - Concurrency Library (java.util.concurrent) - - Introduced in version 1.5 of the platform, the concurrency - library provides a mechanism which decouples task submission - from the mechanics of how each task will be run. - - This server demonstrates: - - A ThreadPool with a fixed number of threads, which is - based on the number of available processors. - - -SETUP -===== - -The server must be built on version 1.5 (or later) of the platform. -Invoking the following should be sufficient: - - % mkdir build - % javac -d build *.java - -The following creates the document root: - - % mkdir root - -All documents should be placed in this directory. - -For HTTPS, the server authenticates itself to clients by using simple -Public Key Infrastructure (PKI) credentials in the form of -X509Certificates. You must create the server's credentials before -attempting to run the server in "-secure" mode. The server is -currently hardcoded to look for its credentials in a file called -"testkeys". - -In this example, we'll create credentials for a fictional widget web -site owned by the ubiquitous "Xyzzy, Inc.". When you run this in your -own environment, replace "widgets.xyzzy.com" with the hostname of your -server. - -The easiest way to create the SSL/TLS credentials is to use the -java keytool, by doing the following: - - ( represents your end-of-line key) - - % keytool -genkey -keyalg rsa -keystore testkeys -alias widgets - Enter keystore password: passphrase - What is your first and last name? - [Unknown]: widgets.xyzzy.com - What is the name of your organizational unit? - [Unknown]: Consumer Widgets Group - What is the name of your organization? - [Unknown]: Xyzzy, Inc. - What is the name of your City or Locality? - [Unknown]: Arcata - What is the name of your State or Province? - [Unknown]: CA - What is the two-letter country code for this unit? - [Unknown]: US - Is CN=widgets.xyzzy.com, OU=Consumer Widgets Group, O="Xyzzy, Inc.", - L=Arcata, ST=CA, C=US correct? - [no]: yes - - Enter key password for - (RETURN if same as keystore password): - -This directory also contain a very simple URL reader (URLDumper), which -connects to a specified URL and places all output into a specified file. - - -SERVER EXECUTION -================ - - % java -classpath build Server N1 - - Usage: Server [options] - type: - B1 Blocking/Single-threaded Server - BN Blocking/Multi-threaded Server - BP Blocking/Pooled-thread Server - N1 Nonblocking/Single-threaded Server - N2 Nonblocking/Dual-threaded Server - - options: - -port port port number - default: 8000 - -backlog backlog backlog - default: 1024 - -secure encrypt with SSL/TLS - default is insecure - -"http://" URLs should be used with insecure mode, and -"https://" for secure mode. - -The "B*" servers use classic blocking I/O: in other words, calls to -read()/write() will not return until the I/O operation has completed. The -"N*" servers use non-blocking mode and Selectors to determine which -Channels are ready to perform I/O. - -B1: A single-threaded server which completely services each - connection before moving to the next. - -B2: A multi-threaded server which creates a new thread for each - connection. This is not efficient for large numbers of - connections. - -BP: A multi-threaded server which creates a pool of threads for use - by the server. The Thread pool decides how to schedule those - threads. - -N1: A single-threaded server. All accept() and read()/write() - operations are performed by a single thread, but only after - being selected for those operations by a Selector. - -N2: A dual-threaded server which performs accept()s in one thread, and - services requests in a second. Both threads use select(). - - -CLIENT EXECUTION -================ -You can test the server using any standard browser such as Internet -Explorer or Mozilla, but since the browser will not trust the -credentials you just created, you may need to accept the credentials -via the browser's pop-up dialog box. - -Alternatively, to use the certificates using the simple included JSSE -client URLDumper, export the server certificate into a new truststore, -and then run the application using the new truststore. - - % keytool -export -keystore testkeys -alias widgets -file widgets.cer - Enter keystore password: passphrase - Certificate stored in file - - % keytool -import -keystore trustCerts -alias widgetServer \ - -file widgets.cer - Enter keystore password: passphrase - Owner: CN=widgets.xyzzy.com, OU=Consumer, O="xyzzy, inc.", L=Arcata, - ST=CA, C=US - Issuer: CN=widgets.xyzzy.com, OU=Consumer, O="xyzzy, inc.", - L=Arcata, ST=CA, C=US - Serial number: 4086cc7a - Valid from: Wed Apr 21 12:33:14 PDT 2004 until: Tue Jul 20 12:33:14 - PDT 2004 - Certificate fingerprints: - MD5: 39:71:42:CD:BF:0D:A9:8C:FB:8B:4A:CD:F8:6D:19:1F - SHA1: 69:5D:38:E9:F4:6C:E5:A7:4C:EA:45:8E:FB:3E:F3:9A:84:01:6F:22 - Trust this certificate? [no]: yes - Certificate was added to keystore - - % java -classpath build -Djavax.net.ssl.trustStore=trustCerts \ - -Djavax.net.ssl.TrustStorePassword=passphrase \ - URLDumper https://widgets.xyzzy.com:8000/ outputFile - -NOTE: The server must be run with "-secure" in order to receive -"https://" URLs. - -WARNING: This is just a simple example for code exposition, you should -spend more time understanding PKI security concerns. - - -SOURCE CODE OVERVIEW -==================== - -The main class is Server, which handles program startup, and is -subclassed by the "B*" and "N*" server classes. - -Following a successful accept(), the "B*" variants each create a -RequestServicer object to perform the actual request/reply operations. The -primary differences between the different "B*" servers is how the -RequestServicer is actually run: - - B1: RequestServicer.run() is directly called. - BN: A new thread is started, and the thread calls RequestServicer.run(). - BP: A ThreadPool is created, and the pool framework is given Runnable - tasks to complete. - -In the "N*" variations, a Dispatcher object is created, which is -responsible for performing the select, and then issuing the -corresponding handler: - - N1: A single thread is used for all accept()/read()/write() operations - N2: Similar to N1, but a separate thread is used for the accept() - operations. - -In all cases, once the connection has been accepted, a ChannelIO object -is created to handle all I/O. In the insecure case, the corresponding -SocketChannel methods are directly called. However in the secure case, -more manipulations are needed to first secure the channel, then -encrypt/decrypt the data, and finally properly send any shutdown -messages. ChannelIOSecure extends ChannelIO, and provides the secure -variants of the corresponding ChannelIO calls. - -RequestServicer and RequestHandler are the main drivers for the -blocking and non-blocking variants, respectively. They are responsible -for: - - Performing any initial handshaking - - Reading the request data - All data is stored in a local buffer in the ChannelIO - structure. - - Parsing the request - The request data is obtained from the ChannelIO object, and - is processed by Request class, which represents the - parsed URI address. - - Locating/preparing/sending the data or reporting error conditions. - A Reply object is created which represents the entire object to send, - including the HTTP/HTTPS headers. - - Shutdown/closing the channel. - - -CLOSING THOUGHTS -================ -This example represents a simple server: it is not production quality. -It was primarily meant to demonstrate the new APIs in versions 1.4 and -1.5 of the platform. - -This example could certainly be expanded to address other areas of -concern: for example, assigning multiple threads to handle the selected -Channels, or delegating SSLEngine tasks to multiple threads. There are -so many ways to implement compute and I/O strategies, we encourage you -to experiment and find what works best for your situation. - -To steal a phrase from many textbooks: - - "It is left as an exercise for the reader..." - diff --git a/jdk/src/sample/share/nio/server/Reply.java b/jdk/src/sample/share/nio/server/Reply.java deleted file mode 100644 index c128ee80716..00000000000 --- a/jdk/src/sample/share/nio/server/Reply.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.*; -import java.nio.charset.*; - -/** - * An object used for sending Content to the requestor. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class Reply implements Sendable { - - /** - * A helper class which define the HTTP response codes - */ - static class Code { - - private int number; - private String reason; - private Code(int i, String r) { number = i; reason = r; } - public String toString() { return number + " " + reason; } - - static Code OK = new Code(200, "OK"); - static Code BAD_REQUEST = new Code(400, "Bad Request"); - static Code NOT_FOUND = new Code(404, "Not Found"); - static Code METHOD_NOT_ALLOWED = new Code(405, "Method Not Allowed"); - - } - - private Code code; - private Content content; - private boolean headersOnly; - - Reply(Code rc, Content c) { - this(rc, c, null); - } - - Reply(Code rc, Content c, Request.Action head) { - code = rc; - content = c; - headersOnly = (head == Request.Action.HEAD); - } - - private static String CRLF = "\r\n"; - private static Charset ascii = Charset.forName("US-ASCII"); - - private ByteBuffer hbb = null; - - private ByteBuffer headers() { - CharBuffer cb = CharBuffer.allocate(1024); - for (;;) { - try { - cb.put("HTTP/1.0 ").put(code.toString()).put(CRLF); - cb.put("Server: niossl/0.1").put(CRLF); - cb.put("Content-type: ").put(content.type()).put(CRLF); - cb.put("Content-length: ") - .put(Long.toString(content.length())).put(CRLF); - cb.put(CRLF); - break; - } catch (BufferOverflowException x) { - assert(cb.capacity() < (1 << 16)); - cb = CharBuffer.allocate(cb.capacity() * 2); - continue; - } - } - cb.flip(); - return ascii.encode(cb); - } - - public void prepare() throws IOException { - content.prepare(); - hbb = headers(); - } - - public boolean send(ChannelIO cio) throws IOException { - - if (hbb == null) - throw new IllegalStateException(); - - if (hbb.hasRemaining()) { - if (cio.write(hbb) <= 0) - return true; - } - - if (!headersOnly) { - if (content.send(cio)) - return true; - } - - if (!cio.dataFlush()) - return true; - - return false; - } - - public void release() throws IOException { - content.release(); - } -} diff --git a/jdk/src/sample/share/nio/server/Request.java b/jdk/src/sample/share/nio/server/Request.java deleted file mode 100644 index fa36d1eb354..00000000000 --- a/jdk/src/sample/share/nio/server/Request.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.net.*; -import java.nio.*; -import java.nio.charset.*; -import java.util.regex.*; - -/** - * An encapsulation of the request received. - *

                    - * The static method parse() is responsible for creating this - * object. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class Request { - - /** - * A helper class for parsing HTTP command actions. - */ - static class Action { - - private String name; - private Action(String name) { this.name = name; } - public String toString() { return name; } - - static Action GET = new Action("GET"); - static Action PUT = new Action("PUT"); - static Action POST = new Action("POST"); - static Action HEAD = new Action("HEAD"); - - static Action parse(String s) { - if (s.equals("GET")) - return GET; - if (s.equals("PUT")) - return PUT; - if (s.equals("POST")) - return POST; - if (s.equals("HEAD")) - return HEAD; - throw new IllegalArgumentException(s); - } - } - - private Action action; - private String version; - private URI uri; - - Action action() { return action; } - String version() { return version; } - URI uri() { return uri; } - - private Request(Action a, String v, URI u) { - action = a; - version = v; - uri = u; - } - - public String toString() { - return (action + " " + version + " " + uri); - } - - static boolean isComplete(ByteBuffer bb) { - int p = bb.position() - 4; - if (p < 0) - return false; - return (((bb.get(p + 0) == '\r') && - (bb.get(p + 1) == '\n') && - (bb.get(p + 2) == '\r') && - (bb.get(p + 3) == '\n'))); - } - - private static Charset ascii = Charset.forName("US-ASCII"); - - /* - * The expected message format is first compiled into a pattern, - * and is then compared against the inbound character buffer to - * determine if there is a match. This convienently tokenizes - * our request into usable pieces. - * - * This uses Matcher "expression capture groups" to tokenize - * requests like: - * - * GET /dir/file HTTP/1.1 - * Host: hostname - * - * into: - * - * group[1] = "GET" - * group[2] = "/dir/file" - * group[3] = "1.1" - * group[4] = "hostname" - * - * The text in between the parens are used to captured the regexp text. - */ - private static Pattern requestPattern - = Pattern.compile("\\A([A-Z]+) +([^ ]+) +HTTP/([0-9\\.]+)$" - + ".*^Host: ([^ ]+)$.*\r\n\r\n\\z", - Pattern.MULTILINE | Pattern.DOTALL); - - static Request parse(ByteBuffer bb) throws MalformedRequestException { - - CharBuffer cb = ascii.decode(bb); - Matcher m = requestPattern.matcher(cb); - if (!m.matches()) - throw new MalformedRequestException(); - Action a; - try { - a = Action.parse(m.group(1)); - } catch (IllegalArgumentException x) { - throw new MalformedRequestException(); - } - URI u; - try { - u = new URI("http://" - + m.group(4) - + m.group(2)); - } catch (URISyntaxException x) { - throw new MalformedRequestException(); - } - return new Request(a, m.group(3), u); - } -} diff --git a/jdk/src/sample/share/nio/server/RequestHandler.java b/jdk/src/sample/share/nio/server/RequestHandler.java deleted file mode 100644 index 91d2bda6711..00000000000 --- a/jdk/src/sample/share/nio/server/RequestHandler.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.*; -import java.nio.channels.*; - -/** - * Primary driver class used by non-blocking Servers to receive, - * prepare, send, and shutdown requests. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class RequestHandler implements Handler { - - private ChannelIO cio; - private ByteBuffer rbb = null; - - private boolean requestReceived = false; - private Request request = null; - private Reply reply = null; - - private static int created = 0; - - RequestHandler(ChannelIO cio) { - this.cio = cio; - - // Simple heartbeat to let user know we're alive. - synchronized (RequestHandler.class) { - created++; - if ((created % 50) == 0) { - System.out.println("."); - created = 0; - } else { - System.out.print("."); - } - } - } - - // Returns true when request is complete - // May expand rbb if more room required - // - private boolean receive(SelectionKey sk) throws IOException { - ByteBuffer tmp = null; - - if (requestReceived) { - return true; - } - - if (!cio.doHandshake(sk)) { - return false; - } - - if ((cio.read() < 0) || Request.isComplete(cio.getReadBuf())) { - rbb = cio.getReadBuf(); - return (requestReceived = true); - } - return false; - } - - // When parse is successfull, saves request and returns true - // - private boolean parse() throws IOException { - try { - request = Request.parse(rbb); - return true; - } catch (MalformedRequestException x) { - reply = new Reply(Reply.Code.BAD_REQUEST, - new StringContent(x)); - } - return false; - } - - // Ensures that reply field is non-null - // - private void build() throws IOException { - Request.Action action = request.action(); - if ((action != Request.Action.GET) && - (action != Request.Action.HEAD)) { - reply = new Reply(Reply.Code.METHOD_NOT_ALLOWED, - new StringContent(request.toString())); - } - reply = new Reply(Reply.Code.OK, - new FileContent(request.uri()), action); - } - - public void handle(SelectionKey sk) throws IOException { - try { - - if (request == null) { - if (!receive(sk)) - return; - rbb.flip(); - if (parse()) - build(); - try { - reply.prepare(); - } catch (IOException x) { - reply.release(); - reply = new Reply(Reply.Code.NOT_FOUND, - new StringContent(x)); - reply.prepare(); - } - if (send()) { - // More bytes remain to be written - sk.interestOps(SelectionKey.OP_WRITE); - } else { - // Reply completely written; we're done - if (cio.shutdown()) { - cio.close(); - reply.release(); - } - } - } else { - if (!send()) { // Should be rp.send() - if (cio.shutdown()) { - cio.close(); - reply.release(); - } - } - } - } catch (IOException x) { - String m = x.getMessage(); - if (!m.equals("Broken pipe") && - !m.equals("Connection reset by peer")) { - System.err.println("RequestHandler: " + x.toString()); - } - - try { - /* - * We had a failure here, so we'll try to be nice - * before closing down and send off a close_notify, - * but if we can't get the message off with one try, - * we'll just shutdown. - */ - cio.shutdown(); - } catch (IOException e) { - // ignore - } - - cio.close(); - if (reply != null) { - reply.release(); - } - } - - } - - private boolean send() throws IOException { - try { - return reply.send(cio); - } catch (IOException x) { - if (x.getMessage().startsWith("Resource temporarily")) { - System.err.println("## RTA"); - return true; - } - throw x; - } - } -} diff --git a/jdk/src/sample/share/nio/server/RequestServicer.java b/jdk/src/sample/share/nio/server/RequestServicer.java deleted file mode 100644 index 88d40b5d57c..00000000000 --- a/jdk/src/sample/share/nio/server/RequestServicer.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.*; - -/** - * Primary driver class used by blocking Servers to receive, - * prepare, send, and shutdown requests. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class RequestServicer implements Runnable { - - private ChannelIO cio; - - private static int created = 0; - - RequestServicer(ChannelIO cio) { - this.cio = cio; - - // Simple heartbeat to let user know we're alive. - synchronized (RequestServicer.class) { - created++; - if ((created % 50) == 0) { - System.out.println("."); - created = 0; - } else { - System.out.print("."); - } - } - } - - private void service() throws IOException { - Reply rp = null; - try { - ByteBuffer rbb = receive(); // Receive - Request rq = null; - try { // Parse - rq = Request.parse(rbb); - } catch (MalformedRequestException x) { - rp = new Reply(Reply.Code.BAD_REQUEST, - new StringContent(x)); - } - if (rp == null) rp = build(rq); // Build - do {} while (rp.send(cio)); // Send - do {} while (!cio.shutdown()); - cio.close(); - rp.release(); - } catch (IOException x) { - String m = x.getMessage(); - if (!m.equals("Broken pipe") && - !m.equals("Connection reset by peer")) { - System.err.println("RequestHandler: " + x.toString()); - } - - try { - /* - * We had a failure here, so we'll try to be nice - * before closing down and send off a close_notify, - * but if we can't get the message off with one try, - * we'll just shutdown. - */ - cio.shutdown(); - } catch (IOException e) { - // ignore - } - - cio.close(); - if (rp != null) { - rp.release(); - } - } - } - - public void run() { - try { - service(); - } catch (IOException x) { - x.printStackTrace(); - } - } - - ByteBuffer receive() throws IOException { - - do {} while (!cio.doHandshake()); - - for (;;) { - int read = cio.read(); - ByteBuffer bb = cio.getReadBuf(); - if ((read < 0) || (Request.isComplete(bb))) { - bb.flip(); - return bb; - } - } - } - - Reply build(Request rq) throws IOException { - - Reply rp = null; - Request.Action action = rq.action(); - if ((action != Request.Action.GET) && - (action != Request.Action.HEAD)) - rp = new Reply(Reply.Code.METHOD_NOT_ALLOWED, - new StringContent(rq.toString())); - else - rp = new Reply(Reply.Code.OK, - new FileContent(rq.uri()), action); - try { - rp.prepare(); - } catch (IOException x) { - rp.release(); - rp = new Reply(Reply.Code.NOT_FOUND, - new StringContent(x)); - rp.prepare(); - } - return rp; - } -} diff --git a/jdk/src/sample/share/nio/server/Sendable.java b/jdk/src/sample/share/nio/server/Sendable.java deleted file mode 100644 index 44ac84826ae..00000000000 --- a/jdk/src/sample/share/nio/server/Sendable.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; - -/** - * Method definitions used for preparing, sending, and release - * content. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -interface Sendable { - - void prepare() throws IOException; - - // Sends (some) content to the given channel. - // Returns true if more bytes remain to be written. - // Throws IllegalStateException if not prepared. - // - boolean send(ChannelIO cio) throws IOException; - - void release() throws IOException; -} diff --git a/jdk/src/sample/share/nio/server/Server.java b/jdk/src/sample/share/nio/server/Server.java deleted file mode 100644 index 1ac64213b33..00000000000 --- a/jdk/src/sample/share/nio/server/Server.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.net.*; -import java.nio.channels.*; -import java.security.*; -import javax.net.ssl.*; - -/** - * The main server base class. - *

                    - * This class is responsible for setting up most of the server state - * before the actual server subclasses take over. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -public abstract class Server { - - ServerSocketChannel ssc; - SSLContext sslContext = null; - - static private int PORT = 8000; - static private int BACKLOG = 1024; - static private boolean SECURE = false; - - Server(int port, int backlog, - boolean secure) throws Exception { - - if (secure) { - createSSLContext(); - } - - ssc = ServerSocketChannel.open(); - ssc.socket().setReuseAddress(true); - ssc.socket().bind(new InetSocketAddress(port), backlog); - } - - /* - * If this is a secure server, we now setup the SSLContext we'll - * use for creating the SSLEngines throughout the lifetime of - * this process. - */ - private void createSSLContext() throws Exception { - - char[] passphrase = "passphrase".toCharArray(); - - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(new FileInputStream("testkeys"), passphrase); - - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); - kmf.init(ks, passphrase); - - TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); - tmf.init(ks); - - sslContext = SSLContext.getInstance("TLS"); - sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); - } - - abstract void runServer() throws Exception; - - static private void usage() { - System.out.println( - "Usage: Server [options]\n" - + " type:\n" - + " B1 Blocking/Single-threaded Server\n" - + " BN Blocking/Multi-threaded Server\n" - + " BP Blocking/Pooled-Thread Server\n" - + " N1 Nonblocking/Single-threaded Server\n" - + " N2 Nonblocking/Dual-threaded Server\n" - + "\n" - + " options:\n" - + " -port port port number\n" - + " default: " + PORT + "\n" - + " -backlog backlog backlog\n" - + " default: " + BACKLOG + "\n" - + " -secure encrypt with SSL/TLS"); - System.exit(1); - } - - /* - * Parse the arguments, decide what type of server to run, - * see if there are any defaults to change. - */ - static private Server createServer(String args[]) throws Exception { - if (args.length < 1) { - usage(); - } - - int port = PORT; - int backlog = BACKLOG; - boolean secure = SECURE; - - for (int i = 1; i < args.length; i++) { - if (args[i].equals("-port")) { - checkArgs(i, args.length); - port = Integer.valueOf(args[++i]); - } else if (args[i].equals("-backlog")) { - checkArgs(i, args.length); - backlog = Integer.valueOf(args[++i]); - } else if (args[i].equals("-secure")) { - secure = true; - } else { - usage(); - } - } - - Server server = null; - - if (args[0].equals("B1")) { - server = new B1(port, backlog, secure); - } else if (args[0].equals("BN")) { - server = new BN(port, backlog, secure); - } else if (args[0].equals("BP")) { - server = new BP(port, backlog, secure); - } else if (args[0].equals("N1")) { - server = new N1(port, backlog, secure); - } else if (args[0].equals("N2")) { - server = new N2(port, backlog, secure); - } - - return server; - } - - static private void checkArgs(int i, int len) { - if ((i + 1) >= len) { - usage(); - } - } - - static public void main(String args[]) throws Exception { - Server server = createServer(args); - - if (server == null) { - usage(); - } - - System.out.println("Server started."); - server.runServer(); - } -} diff --git a/jdk/src/sample/share/nio/server/StringContent.java b/jdk/src/sample/share/nio/server/StringContent.java deleted file mode 100644 index 267b338549f..00000000000 --- a/jdk/src/sample/share/nio/server/StringContent.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.nio.*; -import java.nio.charset.*; - -/** - * A Content type that provides for transferring Strings. - * - * @author Mark Reinhold - * @author Brad R. Wetmore - */ -class StringContent implements Content { - - private static Charset ascii = Charset.forName("US-ASCII"); - - private String type; // MIME type - private String content; - - StringContent(CharSequence c, String t) { - content = c.toString(); - if (!content.endsWith("\n")) - content += "\n"; - type = t + "; charset=iso-8859-1"; - } - - StringContent(CharSequence c) { - this(c, "text/plain"); - } - - StringContent(Exception x) { - StringWriter sw = new StringWriter(); - x.printStackTrace(new PrintWriter(sw)); - type = "text/plain; charset=iso-8859-1"; - content = sw.toString(); - } - - public String type() { - return type; - } - - private ByteBuffer bb = null; - - private void encode() { - if (bb == null) - bb = ascii.encode(CharBuffer.wrap(content)); - } - - public long length() { - encode(); - return bb.remaining(); - } - - public void prepare() { - encode(); - bb.rewind(); - } - - public boolean send(ChannelIO cio) throws IOException { - if (bb == null) - throw new IllegalStateException(); - cio.write(bb); - - return bb.hasRemaining(); - } - - public void release() throws IOException { - } -} diff --git a/jdk/src/sample/share/nio/server/URLDumper.java b/jdk/src/sample/share/nio/server/URLDumper.java deleted file mode 100644 index 30166e77d7f..00000000000 --- a/jdk/src/sample/share/nio/server/URLDumper.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -import java.io.*; -import java.net.*; - -/** - * A simple example to illustrate using a URL to access a resource - * and then store the result to a File. - *

                    - * Any type of URL can be used: http, https, ftp, etc. - * - * @author Brad R. Wetmore - * @author Mark Reinhold - */ -public class URLDumper { - public static void main(String[] args) throws Exception { - - if (args.length != 2) { - System.out.println("Usage: URLDumper "); - System.exit(1); - } - - String location = args[0]; - String file = args[1]; - - URL url = new URL(location); - FileOutputStream fos = new FileOutputStream(file); - - byte [] bytes = new byte [4096]; - - InputStream is = url.openStream(); - - int read; - - while ((read = is.read(bytes)) != -1) { - fos.write(bytes, 0, read); - } - - is.close(); - fos.close(); - } -} diff --git a/jdk/src/sample/share/scripting/scriptpad/README.txt b/jdk/src/sample/share/scripting/scriptpad/README.txt deleted file mode 100644 index ab4bd5fed96..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/README.txt +++ /dev/null @@ -1,122 +0,0 @@ -Scriptpad Sample - -* Introduction - -Scriptpad is a notepad like editor to open/edit/save and run -script (JavaScript) files. This sample demonstrates the use of -javax.script (JSR-223) API and JavaScript engine that is bundled -with JDK 6. - -Scriptpad sample demonstrates how to use Javascript to use Java -classes and objects to perform various tasks such as to modify, -customize Swing GUI or to connect to a running application and -monitor it using JMX (Java Management Extensions) API. - -* How to run Scriptpad? - -Scriptpad can be run with the following command: - - java -jar ./build/scriptpad.jar - -(be sure to use the correct version of java). You can -open/edit/save scripts using menu items under "File" menu. -To run currently edited script, you can use "Tools->Run" menu. - -For example, you may enter - - alert("hello, world"); - -in the editor and run the same with "Tools->Run" menu. -You will see an alert box with the message "hello, world". - -In addition to being a simple script editor/runner, scriptpad -can be used to connect to a JMX MBean server ("Tools->JMX Connect" -menu). User can specify JMX hostname and port. After connecting, -user can use "monitoring and management" script functions defined -in "mm.js" (see below). - -* Scriptpad Sources - -com.sun.demo.scriptpad.Main class is the entry point of this -sample. This class creates ScriptEngine and evaluates few -JavaScript "files" -- which are stored as resources (please -refer to src/resources/*.js). Actual code for the scriptpad's -main functionality lives in these JavaScript files. - -1. conc.js - -- simple concurrency utilities for JavaScript - -2. gui.js - -- simple GUI utilities for JavaScript - -3. mm.js - -- Monitoring and Management utilities for JavaScript - -4. scriptpad.js - -- This creates main "notepad"-like GUI for open/edit/save - and run script files - -5. Main.js - -- This script file can be used under "jrunscript" tool. - jrunscript is an experimental tool shipped with JDK (under - $JDK_HOME/bin directory). The scriptpad application can be - run by the following commands: - - cd ./src/resources - $JDK_HOME/bin/jrunscript -f Main.js -f - - - -* Extending Scriptpad: - -It is possible to extend scriptpad using scripts. There is a global -object called "application". This object has 2 fields and a method. - - Fields of the application object: - - frame -> JFrame of the scriptpad - editor -> editor pane of the scriptpad - - Method of the application object: - - addTool -> adds a menu item under "Tools" menu - - Example script to add "Tools->Hello" menu item: - - application.addTool("Hello", - function() { alert("hello, world"); }); - -After running the above script, you can click Tools->Hello menu item -and you'll see an alert box. - -Scriptpad customization may also be done by defining a file named -"scriptpad.js" under your home directory,. If this file is found, -scriptpad loads this file just after initializating everything. -In your initialization file, you can additional script functions -by "load" function. - -* Script Samples: - -On clicking the menu items under "Examples" menu, scriptpad shows -built-in examples in the editor. Also, there are few script samples -under the ./src/scripts directory. - -* Monitoring and Management with Scriptpad: - -(1) Start the application with the JMX agent - here's an example of - how the Java2D demo is started - - java -Dcom.sun.management.jmxremote.port=1090 \ - -Dcom.sun.management.jmxremote.ssl=false \ - -Dcom.sun.management.jmxremote.authenticate=false \ - -jar $JDK_HOME/demo/jfc/Font2DTest/Font2DTest.jar - -(2) Start scriptpad and click on "Tools->JMX Connect" menu. - In the prompt, enter "localhost:1090" to connect to the above - program. - -After connecting to a MBeanServer (using "Tools->JMX Connect"), -you can run any script that uses functions defined in "mm.js". -For example, it is possible to load and run management scripts that -are part of JConsole script shell plugin under the directory: - - $JDK_HOME/demo/scripting/jconsole-plugin/src/scripts diff --git a/jdk/src/sample/share/scripting/scriptpad/build.properties b/jdk/src/sample/share/scripting/scriptpad/build.properties deleted file mode 100644 index efcd5913bdd..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/build.properties +++ /dev/null @@ -1,22 +0,0 @@ -main.dir=. - -src.dir=${main.dir}/src - -build.dir=build -classes.dir=${build.dir}/classes -jar=${build.dir}/scriptpad.jar -javadoc.dir=${build.dir}/javadoc - -build.sysclasspath=ignore -# E.g.: cp=lib/x.jar:lib/y.jar -cp= -extra.run.cp= - -main.class=com.sun.sample.scriptpad.Main - -run.cp=${cp}:${classes.dir}:${extra.run.cp} - -debug=true -deprecation=false - -nbjdk.home=${basedir}/../../.. diff --git a/jdk/src/sample/share/scripting/scriptpad/build.xml b/jdk/src/sample/share/scripting/scriptpad/build.xml deleted file mode 100644 index 5f203d51e71..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/build.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set property 'main.class' (e.g. in build.properties) - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jdk/src/sample/share/scripting/scriptpad/nbproject/file-targets.xml b/jdk/src/sample/share/scripting/scriptpad/nbproject/file-targets.xml deleted file mode 100644 index 0904977a663..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/nbproject/file-targets.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - Must set property 'includes' - - - - - - - diff --git a/jdk/src/sample/share/scripting/scriptpad/nbproject/jdk.xml b/jdk/src/sample/share/scripting/scriptpad/nbproject/jdk.xml deleted file mode 100644 index 2b85b77e928..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/nbproject/jdk.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jdk/src/sample/share/scripting/scriptpad/nbproject/netbeans-targets.xml b/jdk/src/sample/share/scripting/scriptpad/nbproject/netbeans-targets.xml deleted file mode 100644 index b53c34d907f..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/nbproject/netbeans-targets.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jdk/src/sample/share/scripting/scriptpad/nbproject/project.xml b/jdk/src/sample/share/scripting/scriptpad/nbproject/project.xml deleted file mode 100644 index 32135c776df..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/nbproject/project.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - org.netbeans.modules.ant.freeform - - - Scriptpad - - user.build.properties - build.properties - ${nbjdk.home}/jre/lib/rt.jar - - - - - ${main.dir} - - - - java - ${src.dir} - - - ${build.dir} - - - - - jar - - - clean - - - clean - jar - - - run - - - - show-javadoc - - - - debug - - - - compile-selected - - includes - ${src.dir} - \.java$ - relative-path - - , - - - - - run - - main.class - ${src.dir} - \.java$ - java-name - - - - - - - - debug - - main.class - ${src.dir} - \.java$ - java-name - - - - - - - - debug-fix - - class - ${src.dir} - \.java$ - relative-path-noext - - - - - - - - jar - ${jar} - jar - clean - - - - - - ${src.dir} - - - ${main.dir}/README.txt - - - - - - - - - - - - - - - - - ${src.dir} - ${cp} - ${run.cp} - ${nbjdk.bootclasspath} - ${classes.dir} - ${jar} - ${javadoc.dir} - 1.5 - - - - diff --git a/jdk/src/sample/share/scripting/scriptpad/src/META-INF/manifest.mf b/jdk/src/sample/share/scripting/scriptpad/src/META-INF/manifest.mf deleted file mode 100644 index 76eda3014d1..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/META-INF/manifest.mf +++ /dev/null @@ -1,2 +0,0 @@ -Main-Class: com.sun.sample.scriptpad.Main - diff --git a/jdk/src/sample/share/scripting/scriptpad/src/com/sun/sample/scriptpad/Main.java b/jdk/src/sample/share/scripting/scriptpad/src/com/sun/sample/scriptpad/Main.java deleted file mode 100644 index aaeb58d0916..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/com/sun/sample/scriptpad/Main.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -package com.sun.sample.scriptpad; - -import javax.script.*; -import java.io.*; - -/** - * This is the entry point of "Scriptpad" sample. This class creates - * ScriptEngine and evaluates few JavaScript "files" -- which are stored - * as resources (please refer to src/resources/*.js). Actual code for the - * scriptpad's main functionality lives in these JavaScript files. - */ -public class Main { - public static void main(String[] args) throws Exception { - - // create a ScriptEngineManager - ScriptEngineManager m = new ScriptEngineManager(); - // get an instance of JavaScript script engine - ScriptEngine engine = m.getEngineByName("js"); - - // expose the current script engine as a global variable - engine.put("engine", engine); - - // evaluate few scripts that are bundled in "resources" - eval(engine, "conc.js"); - eval(engine, "gui.js"); - eval(engine, "scriptpad.js"); - eval(engine, "mm.js"); - } - - private static void eval(ScriptEngine engine, String name) - throws Exception { - /* - * This class is compiled into a jar file. The jar file - * contains few scripts under /resources URL. - */ - InputStream is = Main.class.getResourceAsStream("/resources/" + name); - // current script file name for better error messages - engine.put(ScriptEngine.FILENAME, name); - // evaluate the script in the InputStream - engine.eval(new InputStreamReader(is)); - } -} diff --git a/jdk/src/sample/share/scripting/scriptpad/src/resources/Main.js b/jdk/src/sample/share/scripting/scriptpad/src/resources/Main.js deleted file mode 100644 index a1c332db310..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/resources/Main.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * This script can be loaded in jrunscript to start scriptpad. - * - * jrunscript -f Main.js -f - - */ - -load("conc.js"); -load("gui.js"); -load("scriptpad.js"); -load("mm.js"); diff --git a/jdk/src/sample/share/scripting/scriptpad/src/resources/conc.js b/jdk/src/sample/share/scripting/scriptpad/src/resources/conc.js deleted file mode 100644 index aaca49aea79..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/resources/conc.js +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * Concurrency utilities for JavaScript. These are based on - * java.lang and java.util.concurrent API. The following functions - * provide a simpler API for scripts. Instead of directly using java.lang - * and java.util.concurrent classes, scripts can use functions and - * objects exported from here. - */ - -// shortcut for j.u.c lock classes -var Lock = java.util.concurrent.locks.ReentrantLock; -var RWLock = java.util.concurrent.locks.ReentrantReadWriteLock; - -// check if there is a build in sync function, define one if missing -if (typeof sync === "undefined") { - var sync = function(func, obj) { - if (arguments.length < 1 || arguments.length > 2 ) { - throw "sync(function [,object]) parameter count mismatch"; - } - - var syncobj = (arguments.length == 2 ? obj : this); - - if (!syncobj._syncLock) { - syncobj._syncLock = new Lock(); - } - - return function() { - syncobj._syncLock.lock(); - try { - func.apply(null, arguments); - } finally { - syncobj._syncLock.unlock(); - } - }; - }; - sync.docString = "synchronize a function, optionally on an object"; -} - -/** - * Wrapper for java.lang.Object.wait - * - * can be called only within a sync method - */ -function wait(object) { - var objClazz = java.lang.Class.forName('java.lang.Object'); - var waitMethod = objClazz.getMethod('wait', null); - waitMethod.invoke(object, null); -} -wait.docString = "convenient wrapper for java.lang.Object.wait method"; - -/** - * Wrapper for java.lang.Object.notify - * - * can be called only within a sync method - */ -function notify(object) { - var objClazz = java.lang.Class.forName('java.lang.Object'); - var notifyMethod = objClazz.getMethod('notify', null); - notifyMethod.invoke(object, null); -} -notify.docString = "convenient wrapper for java.lang.Object.notify method"; - -/** - * Wrapper for java.lang.Object.notifyAll - * - * can be called only within a sync method - */ -function notifyAll(object) { - var objClazz = java.lang.Class.forName('java.lang.Object'); - var notifyAllMethod = objClazz.getMethod('notifyAll', null); - notifyAllMethod.invoke(object, null); -} -notifyAll.docString = "convenient wrapper for java.lang.Object.notifyAll method"; - -/** - * Creates a java.lang.Runnable from a given script - * function. - */ -Function.prototype.runnable = function() { - var args = arguments; - var func = this; - return new java.lang.Runnable() { - run: function() { - func.apply(null, args); - } - } -}; - -/** - * Executes the function on a new Java Thread. - */ -Function.prototype.thread = function() { - var t = new java.lang.Thread(this.runnable.apply(this, arguments)); - t.start(); - return t; -}; - -/** - * Executes the function on a new Java daemon Thread. - */ -Function.prototype.daemon = function() { - var t = new java.lang.Thread(this.runnable.apply(this, arguments)); - t.setDaemon(true); - t.start(); - return t; -}; - -/** - * Creates a java.util.concurrent.Callable from a given script - * function. - */ -Function.prototype.callable = function() { - var args = arguments; - var func = this; - return new java.util.concurrent.Callable() { - call: function() { return func.apply(null, args); } - } -}; - -/** - * Registers the script function so that it will be called exit. - */ -Function.prototype.atexit = function () { - var args = arguments; - java.lang.Runtime.getRuntime().addShutdownHook( - new java.lang.Thread(this.runnable.apply(this, args))); -}; - -/** - * Executes the function asynchronously. - * - * @return a java.util.concurrent.FutureTask - */ -Function.prototype.future = (function() { - // default executor for future - var juc = java.util.concurrent; - var theExecutor = juc.Executors.newSingleThreadExecutor(); - // clean-up the default executor at exit - (function() { theExecutor.shutdown(); }).atexit(); - return function() { - return theExecutor.submit(this.callable.apply(this, arguments)); - }; -})(); - -/** - * Executes a function after acquiring given lock. On return, - * (normal or exceptional), lock is released. - * - * @param lock lock that is locked and unlocked - */ -Function.prototype.sync = function (lock) { - if (arguments.length == 0) { - throw "lock is missing"; - } - var res = new Array(arguments.length - 1); - for (var i = 0; i < res.length; i++) { - res[i] = arguments[i + 1]; - } - lock.lock(); - try { - this.apply(null, res); - } finally { - lock.unlock(); - } -}; - -/** - * Causes current thread to sleep for specified - * number of milliseconds - * - * @param interval in milliseconds - */ -function sleep(interval) { - java.lang.Thread.sleep(interval); -} -sleep.docString = "wrapper for java.lang.Thread.sleep method"; - -/** - * Schedules a task to be executed once in N milliseconds specified. - * - * @param callback function or expression to evaluate - * @param interval in milliseconds to sleep - * @return timeout ID (which is nothing but Thread instance) - */ -function setTimeout(callback, interval) { - if (! (callback instanceof Function)) { - callback = new Function(callback); - } - - // start a new thread that sleeps given time - // and calls callback in an infinite loop - return (function() { - try { - sleep(interval); - } catch (x) { } - callback(); - }).daemon(); -} -setTimeout.docString = "calls given callback once after specified interval"; - -/** - * Cancels a timeout set earlier. - * @param tid timeout ID returned from setTimeout - */ -function clearTimeout(tid) { - // we just interrupt the timer thread - tid.interrupt(); -} -clearTimeout.docString = "interrupt a setTimeout timer"; - -/** - * Schedules a task to be executed once in - * every N milliseconds specified. - * - * @param callback function or expression to evaluate - * @param interval in milliseconds to sleep - * @return timeout ID (which is nothing but Thread instance) - */ -function setInterval(callback, interval) { - if (! (callback instanceof Function)) { - callback = new Function(callback); - } - - // start a new thread that sleeps given time - // and calls callback in an infinite loop - return (function() { - while (true) { - try { - sleep(interval); - } catch (x) { - break; - } - callback(); - } - }).daemon(); -} -setInterval.docString = "calls given callback every specified interval"; - -/** - * Cancels a timeout set earlier. - * @param tid timeout ID returned from setTimeout - */ -function clearInterval(tid) { - // we just interrupt the timer thread - tid.interrupt(); -} -clearInterval.docString = "interrupt a setInterval timer"; - -/** - * Simple access to thread local storage. - * - * Script sample: - * - * __thread.x = 44; - * function f() { - * __thread.x = 'hello'; - * print(__thread.x); - * } - * f.thread(); // prints 'hello' - * print(__thread.x); // prints 44 in main thread - */ -var __thread = (function () { - var map = new Object(); - return new JSAdapter({ - __has__: function(name) { - return map[name] != undefined; - }, - __get__: function(name) { - if (map[name] != undefined) { - return map[name].get(); - } else { - return undefined; - } - }, - __put__: sync(function(name, value) { - if (map[name] == undefined) { - var tmp = new java.lang.ThreadLocal(); - tmp.set(value); - map[name] = tmp; - } else { - map[name].set(value); - } - }), - __delete__: function(name) { - if (map[name] != undefined) { - map[name].set(null); - } - } - }); -})(); - diff --git a/jdk/src/sample/share/scripting/scriptpad/src/resources/gui.js b/jdk/src/sample/share/scripting/scriptpad/src/resources/gui.js deleted file mode 100644 index d62b92f76d0..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/resources/gui.js +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * Few user interface utilities. - */ - -if (this.window === undefined) { - this.window = null; -} - -/** - * Swing invokeLater - invokes given function in AWT event thread - */ -Function.prototype.invokeLater = function() { - var SwingUtilities = javax.swing.SwingUtilities; - var func = this; - var args = arguments; - SwingUtilities.invokeLater(new java.lang.Runnable() { - run: function() { - func.apply(func, args); - } - }); -}; - -/** - * Swing invokeAndWait - invokes given function in AWT event thread - * and waits for it's completion - */ -Function.prototype.invokeAndWait = function() { - var SwingUtilities = javax.swing.SwingUtilities; - var func = this; - var args = arguments; - SwingUtilities.invokeAndWait(new java.lang.Runnable() { - run: function() { - func.apply(func, args); - } - }); -}; - -/** - * Am I running in AWT event dispatcher thread? - */ -function isEventThread() { - var SwingUtilities = javax.swing.SwingUtilities; - return SwingUtilities.isEventDispatchThread(); -} -isEventThread.docString = "returns whether the current thread is GUI thread"; - -/** - * Opens a file dialog box - * - * @param curDir current directory [optional] - * @param save flag tells whether this is a save dialog or not - * @return selected file or else null - */ -function fileDialog(curDir, save) { - var result; - function _fileDialog() { - if (curDir == undefined) { - curDir = new java.io.File("."); - } - - var JFileChooser = javax.swing.JFileChooser; - var dialog = new JFileChooser(curDir); - var res = save ? dialog.showSaveDialog(window): - dialog.showOpenDialog(window); - - if (res == JFileChooser.APPROVE_OPTION) { - result = dialog.getSelectedFile(); - } else { - result = null; - } - } - - if (isEventThread()) { - _fileDialog(); - } else { - _fileDialog.invokeAndWait(); - } - - return result; -} -fileDialog.docString = "show a file dialog box"; - -/** - * Opens a color chooser dialog box - * - * @param title of the dialog box [optional] - * @param color default color [optional] - * @return chosen color or default color - */ -function colorDialog(title, color) { - var result; - - function _colorDialog() { - if (title == undefined) { - title = "Choose Color"; - } - - if (color == undefined) { - color = java.awt.Color.BLACK; - } - - var chooser = new javax.swing.JColorChooser(); - var res = chooser.showDialog(window, title, color); - result = res ? res : color; - } - - if (isEventThread()) { - _colorDialog(); - } else { - _colorDialog.invokeAndWait(); - } - - return result; -} -colorDialog.docString = "shows a color chooser dialog box"; - -/** - * Shows a message box - * - * @param msg message to be shown - * @param title title of message box [optional] - * @param msgType type of message box [constants in JOptionPane] - */ -function msgBox(msg, title, msgType) { - function _msgBox() { - var JOptionPane = javax.swing.JOptionPane; - if (msg === undefined) msg = "undefined"; - if (msg === null) msg = "null"; - if (title == undefined) title = msg; - if (msgType == undefined) msgType = JOptionPane.INFORMATION_MESSAGE; - JOptionPane.showMessageDialog(window, msg, title, msgType); - } - - if (isEventThread()) { - _msgBox(); - } else { - _msgBox.invokeAndWait(); - } -} -msgBox.docString = "shows MessageBox to the user"; - -/** - * Shows an information alert box - * - * @param msg message to be shown - * @param title title of message box [optional] - */ -function alert(msg, title) { - var JOptionPane = javax.swing.JOptionPane; - msgBox(msg, title, JOptionPane.INFORMATION_MESSAGE); -} -alert.docString = "shows an alert message box to the user"; - -/** - * Shows an error alert box - * - * @param msg message to be shown - * @param title title of message box [optional] - */ -function error(msg, title) { - var JOptionPane = javax.swing.JOptionPane; - msgBox(msg, title, JOptionPane.ERROR_MESSAGE); -} -error.docString = "shows an error message box to the user"; - -/** - * Shows a warning alert box - * - * @param msg message to be shown - * @param title title of message box [optional] - */ -function warn(msg, title) { - var JOptionPane = javax.swing.JOptionPane; - msgBox(msg, title, JOptionPane.WARNING_MESSAGE); -} -warn.docString = "shows a warning message box to the user"; - -/** - * Shows a prompt dialog box - * - * @param question question to be asked - * @param answer default answer suggested [optional] - * @return answer given by user - */ -function prompt(question, answer) { - var result; - function _prompt() { - var JOptionPane = javax.swing.JOptionPane; - if (answer == undefined) answer = ""; - result = JOptionPane.showInputDialog(window, question, answer); - } - - if (isEventThread()) { - _prompt(); - } else { - _prompt.invokeAndWait(); - } - - return result; -} -prompt.docString = "shows a prompt box to the user and returns the answer"; - -/** - * Shows a confirmation dialog box - * - * @param msg message to be shown - * @param title title of message box [optional] - * @return boolean (yes->true, no->false) - */ -function confirm(msg, title) { - var result; - var JOptionPane = javax.swing.JOptionPane; - - function _confirm() { - if (title == undefined) title = msg; - var optionType = JOptionPane.YES_NO_OPTION; - result = JOptionPane.showConfirmDialog(window, msg, title, optionType); - } - - if (isEventThread()) { - _confirm(); - } else { - _confirm.invokeAndWait(); - } - - return result == JOptionPane.YES_OPTION; -} -confirm.docString = "shows a confirmation message box to the user"; - -/** - * Exit the process after confirmation from user - * - * @param exitCode return code to OS [optional] - */ -function exit(exitCode) { - if (exitCode == undefined) exitCode = 0; - if (confirm("Do you really want to exit?")) { - java.lang.System.exit(exitCode); - } -} -exit.docString = "exits jconsole"; - -// synonym to exit -var quit = exit; - -// if echo function is not defined, define it as synonym -// for println function -if (this.echo == undefined) { - function echo(str) { - println(str); - } -} - diff --git a/jdk/src/sample/share/scripting/scriptpad/src/resources/mm.js b/jdk/src/sample/share/scripting/scriptpad/src/resources/mm.js deleted file mode 100644 index 07efad27801..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/resources/mm.js +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * This is a collection of utilities for Monitoring - * and management API. - * - * File dependency: - * conc.js -> for concurrency utilities - */ - -// At any time, we maintain atmost one MBeanServer -// connection. And so, we store the same as a global -// variable. -var mmConnection = null; - -function jmxConnect(hostport) { - if (mmConnection != null) { - // close the existing connection - try { - mmConnection.close(); - } catch (e) { - } - } - - var JMXServiceURL = javax.management.remote.JMXServiceURL; - var JMXConnectorFactory = javax.management.remote.JMXConnectorFactory; - - var urlPath = "/jndi/rmi://" + hostport + "/jmxrmi"; - var url = new JMXServiceURL("rmi", "", 0, urlPath); - var jmxc = JMXConnectorFactory.connect(url); - // note that the "mmConnection" is a global variable! - mmConnection = jmxc.getMBeanServerConnection(); -} -jmxConnect.docString = "connects to the given host, port (specified as name:port)"; - -function mbeanConnection() { - if (mmConnection == null) { - throw "Not connected to MBeanServer yet!"; - } - - return mmConnection; -} -mbeanConnection.docString = "returns the current MBeanServer connection"; - -/** - * Returns a platform MXBean proxy for given MXBean name and interface class - */ -function newPlatformMXBeanProxy(name, intf) { - var factory = java.lang.management.ManagementFactory; - return factory.newPlatformMXBeanProxy(mbeanConnection(), name, intf); -} -newPlatformMXBeanProxy.docString = "returns a proxy for a platform MXBean"; - -/** - * Wraps a string to ObjectName if needed. - */ -function objectName(objName) { - var ObjectName = Packages.javax.management.ObjectName; - if (objName instanceof ObjectName) { - return objName; - } else { - return new ObjectName(objName); - } -} -objectName.docString = "creates JMX ObjectName for a given String"; - -/** - * Creates a new (M&M) Attribute object - * - * @param name name of the attribute - * @param value value of the attribute - */ -function attribute(name, value) { - var Attribute = Packages.javax.management.Attribute; - return new Attribute(name, value); -} -attribute.docString = "returns a new JMX Attribute using name and value given"; - -/** - * Returns MBeanInfo for given ObjectName. Strings are accepted. - */ -function mbeanInfo(objName) { - objName = objectName(objName); - return mbeanConnection().getMBeanInfo(objName); -} -mbeanInfo.docString = "returns MBeanInfo of a given ObjectName"; - -/** - * Returns ObjectInstance for a given ObjectName. - */ -function objectInstance(objName) { - objName = objectName(objName); - return mbeanConnection().objectInstance(objectName); -} -objectInstance.docString = "returns ObjectInstance for a given ObjectName"; - -/** - * Queries with given ObjectName and QueryExp. - * QueryExp may be null. - * - * @return set of ObjectNames. - */ -function queryNames(objName, query) { - objName = objectName(objName); - if (query == undefined) query = null; - return mbeanConnection().queryNames(objName, query); -} -queryNames.docString = "returns QueryNames using given ObjectName and optional query"; - -/** - * Queries with given ObjectName and QueryExp. - * QueryExp may be null. - * - * @return set of ObjectInstances. - */ -function queryMBeans(objName, query) { - objName = objectName(objName); - if (query == undefined) query = null; - return mbeanConnection().queryMBeans(objName, query); -} -queryMBeans.docString = "return MBeans using given ObjectName and optional query"; - -// wraps a script array as java.lang.Object[] -function objectArray(array) { - return Java.to(array, "java.lang.Object[]"); -} - -// wraps a script (string) array as java.lang.String[] -function stringArray(array) { - return Java.to(array, "java.lang.String[]"); -} - -// script array to Java List -function toAttrList(array) { - var AttributeList = Packages.javax.management.AttributeList; - if (array instanceof AttributeList) { - return array; - } - var list = new AttributeList(array.length); - for (var index = 0; index < array.length; index++) { - list.add(array[index]); - } - return list; -} - -// Java Collection (Iterable) to script array -function toArray(collection) { - if (collection instanceof Array) { - return collection; - } - var itr = collection.iterator(); - var array = new Array(); - while (itr.hasNext()) { - array[array.length] = itr.next(); - } - return array; -} - -// gets MBean attributes -function getMBeanAttributes(objName, attributeNames) { - objName = objectName(objName); - return mbeanConnection().getAttributes(objName,stringArray(attributeNames)); -} -getMBeanAttributes.docString = "returns specified Attributes of given ObjectName"; - -// gets MBean attribute -function getMBeanAttribute(objName, attrName) { - objName = objectName(objName); - return mbeanConnection().getAttribute(objName, attrName); -} -getMBeanAttribute.docString = "returns a single Attribute of given ObjectName"; - -// sets MBean attributes -function setMBeanAttributes(objName, attrList) { - objName = objectName(objName); - attrList = toAttrList(attrList); - return mbeanConnection().setAttributes(objName, attrList); -} -setMBeanAttributes.docString = "sets specified Attributes of given ObjectName"; - -// sets MBean attribute -function setMBeanAttribute(objName, attrName, attrValue) { - var Attribute = Packages.javax.management.Attribute; - objName = objectName(objName); - mbeanConnection().setAttribute(objName, new Attribute(attrName, attrValue)); -} -setMBeanAttribute.docString = "sets a single Attribute of given ObjectName"; - -// invokes an operation on given MBean -function invokeMBean(objName, operation, params, signature) { - objName = objectName(objName); - params = objectArray(params); - signature = stringArray(signature); - return mbeanConnection().invoke(objName, operation, params, signature); -} -invokeMBean.docString = "invokes MBean operation on given ObjectName"; - -/** - * Wraps a MBean specified by ObjectName as a convenient - * script object -- so that setting/getting MBean attributes - * and invoking MBean method can be done with natural syntax. - * - * @param objName ObjectName of the MBean - * @param async asynchornous mode [optional, default is false] - * @return script wrapper for MBean - * - * With async mode, all field, operation access is async. Results - * will be of type FutureTask. When you need value, call 'get' on it. - */ -function mbean(objName, async) { - var index; - objName = objectName(objName); - var info = mbeanInfo(objName); - var attrs = info.attributes; - var attrMap = new Object; - for (index in attrs) { - attrMap[attrs[index].name] = attrs[index]; - } - var opers = info.operations; - var operMap = new Object; - for (index in opers) { - operMap[opers[index].name] = opers[index]; - } - - function isAttribute(name) { - return name in attrMap; - } - - function isOperation(name) { - return name in operMap; - } - - return new JSAdapter() { - __has__: function (name) { - return isAttribute(name) || isOperation(name); - }, - __get__: function (name) { - if (isAttribute(name)) { - if (async) { - return getMBeanAttribute.future(objName, name); - } else { - return getMBeanAttribute(objName, name); - } - } else { - return undefined; - } - }, - __call__: function(name) { - if (isOperation(name)) { - var oper = operMap[name]; - - var params = []; - for (var j = 1; j < arguments.length; j++) { - params[j-1]= arguments[j]; - } - - var sigs = oper.signature; - - var sigNames = new Array(sigs.length); - for (var index in sigs) { - sigNames[index] = sigs[index].getType(); - } - - if (async) { - return invokeMBean.future(objName, name, params, sigNames); - } else { - return invokeMBean(objName, name, params, sigNames); - } - } else { - return undefined; - } - }, - __put__: function (name, value) { - if (isAttribute(name)) { - if (async) { - setMBeanAttribute.future(objName, name, value); - } else { - setMBeanAttribute(objName, name, value); - } - } else { - return undefined; - } - } - }; -} -mbean.docString = "returns a conveninent script wrapper for a MBean of given ObjectName"; - -if (this.application != undefined) { - this.application.addTool("JMX Connect", - // connect to a JMX MBean Server - function () { - var url = prompt("Connect to JMX server (host:port)"); - if (url != null) { - try { - jmxConnect(url); - alert("connected!"); - } catch (e) { - error(e, "Can not connect to " + url); - } - } - }); -} diff --git a/jdk/src/sample/share/scripting/scriptpad/src/resources/scriptpad.js b/jdk/src/sample/share/scripting/scriptpad/src/resources/scriptpad.js deleted file mode 100644 index 807d05e1ba2..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/resources/scriptpad.js +++ /dev/null @@ -1,662 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * This script creates a simple Notepad-like interface, which - * serves as a simple script editor, runner. - * - * File dependency: - * - * gui.js -> for basic GUI functions - */ - -/* - * globalThis is used for actionHelpGlobals() and showFrame(). - */ -var globalThis = this; - -/* - * JavaImporter helps in avoiding pollution of JavaScript - * global namespace. We can import multiple Java packages - * with this and use the JavaImporter object with "with" - * statement. - */ -var guiPkgs = new JavaImporter(java.awt, java.awt.event, - javax.swing, javax.swing.undo, - javax.swing.event, javax.swing.text); - -// main entry point of the scriptpad application -var main = function() { - function createEditor() { - var c = new guiPkgs.JTextArea(); - c.setDragEnabled(true); - c.setFont(new guiPkgs.Font("monospaced", guiPkgs.Font.PLAIN, 12)); - return c; - } - - /*const*/ var titleSuffix = "- Scriptpad"; - /*const*/ var defaultTitle = "Untitled" + titleSuffix; - - // Scriptpad's main frame - var frame; - // Scriptpad's main editor - var editor; - - // To track the current file name - var curFileName = null; - - // To track whether the current document - // has been modified or not - var docChanged = false; - - // check and alert user for unsaved - // but modified document - function checkDocChanged() { - if (docChanged) { - // ignore zero-content untitled document - if (curFileName == null && - editor.document.length == 0) { - return; - } - - if (confirm("Do you want to save the changes?", - "The document has changed")) { - actionSave(); - } - } - } - - // set a document listener to track - // whether that is modified or not - function setDocListener() { - var doc = editor.getDocument(); - docChanged = false; - doc.addDocumentListener( new guiPkgs.DocumentListener() { - equals: function(o) { - return this === o; }, - toString: function() { - return "doc listener"; }, - changeUpdate: function() { - docChanged = true; }, - insertUpdate: function() { - docChanged = true; }, - removeUpdate: function() { - docChanged = true; } - }); - } - - // menu action functions - - // "File" menu - - // create a "new" document - function actionNew() { - checkDocChanged(); - curFileName = null; - editor.setDocument(new guiPkgs.PlainDocument()); - setDocListener(); - frame.setTitle(defaultTitle); - editor.revalidate(); - } - - // open an existing file - function actionOpen() { - checkDocChanged(); - var f = fileDialog(); - if (f == null) { - return; - } - - if (f.isFile() && f.canRead()) { - frame.setTitle(f.getName() + titleSuffix); - editor.setDocument(new guiPkgs.PlainDocument()); - var progress = new guiPkgs.JProgressBar(); - progress.setMinimum(0); - progress.setMaximum(f.length()); - var doc = editor.getDocument(); - var inp = new java.io.FileReader(f); - var buff = java.lang.reflect.Array.newInstance( - java.lang.Character.TYPE, 4096); - var nch; - while ((nch = inp.read(buff, 0, buff.length)) != -1) { - doc.insertString(doc.getLength(), - new java.lang.String(buff, 0, nch), null); - progress.setValue(progress.getValue() + nch); - } - inp.close(); - curFileName = f.getAbsolutePath(); - setDocListener(); - } else { - error("Can not open file: " + f, - "Error opening file: " + f); - } - } - - // open script from a URL - function actionOpenURL() { - checkDocChanged(); - var url = prompt("Address:"); - if (url == null) { - return; - } - - try { - var u = new java.net.URL(url); - editor.setDocument(new guiPkgs.PlainDocument()); - frame.setTitle(url + titleSuffix); - var progress = new guiPkgs.JProgressBar(); - progress.setMinimum(0); - progress.setIndeterminate(true); - var doc = editor.getDocument(); - var inp = new java.io.InputStreamReader(u.openStream()); - var buff = java.lang.reflect.Array.newInstance( - java.lang.Character.TYPE, 4096); - var nch; - while ((nch = inp.read(buff, 0, buff.length)) != -1) { - doc.insertString(doc.getLength(), - new java.lang.String(buff, 0, nch), null); - progress.setValue(progress.getValue() + nch); - } - curFileName = null; - setDocListener(); - } catch (e) { - error("Error opening URL: " + e, - "Can not open URL: " + url); - } - } - - // factored out "save" function used by - // save, save as menu actions - function save(file) { - var doc = editor.getDocument(); - frame.setTitle(file.getName() + titleSuffix); - curFileName = file; - var progress = new guiPkgs.JProgressBar(); - progress.setMinimum(0); - progress.setMaximum(file.length()); - var out = new java.io.FileWriter(file); - var text = new guiPkgs.Segment(); - text.setPartialReturn(true); - var charsLeft = doc.getLength(); - var offset = 0; - var min; - - while (charsLeft > 0) { - doc.getText(offset, Math.min(4096, charsLeft), text); - out.write(text.array, text.offset, text.count); - charsLeft -= text.count; - offset += text.count; - progress.setValue(offset); - java.lang.Thread.sleep(10); - } - - out.flush(); - out.close(); - docChanged = false; - } - - // file-save as menu - function actionSaveAs() { - var ret = fileDialog(null, true); - if (ret == null) { - return; - } - save(ret); - } - - // file-save menu - function actionSave() { - if (curFileName) { - save(new java.io.File(curFileName)); - } else { - actionSaveAs(); - } - } - - // exit from scriptpad - function actionExit() { - checkDocChanged(); - java.lang.System.exit(0); - } - - // "Edit" menu - - // cut the currently selected text - function actionCut() { - editor.cut(); - } - - // copy the currently selected text to clipboard - function actionCopy() { - editor.copy(); - } - - // paste clipboard content to document - function actionPaste() { - editor.paste(); - } - - // select all the text in editor - function actionSelectAll() { - editor.selectAll(); - } - - // "Tools" menu - - // run the current document as JavaScript - function actionRun() { - var doc = editor.getDocument(); - var script = doc.getText(0, doc.getLength()); - var oldFile = engine.get(javax.script.ScriptEngine.FILENAME); - try { - if (engine == undefined) { - var m = new javax.script.ScriptEngineManager(); - engine = m.getEngineByName("nashorn"); - } - engine.put(javax.script.ScriptEngine.FILENAME, frame.title); - engine.eval(script, context); - } catch (e) { - error(e, "Script Error"); - e.printStackTrace(); - } finally { - engine.put(javax.script.ScriptEngine.FILENAME, oldFile); - } - } - - // "Examples" menu - - // show given script as new document - function showScript(title, str) { - actionNew(); - frame.setTitle("Example - " + title + titleSuffix); - var doc = editor.document; - doc.insertString(0, str, null); - } - - // "hello world" - function actionHello() { - showScript(actionEval.title, - "alert('Hello, world');"); - } - actionHello.title = "Hello, World"; - - // eval the "hello world"! - function actionEval() { - showScript(actionEval.title, - "eval(\"alert('Hello, world')\");"); - } - actionEval.title = "Eval"; - - // show how to access Java static methods - function actionJavaStatic() { - showScript(arguments.callee.title, - "// Just use Java syntax\n" + - "var props = java.lang.System.getProperties();\n" + - "alert(props.get('os.name'));"); - } - actionJavaStatic.title = "Java Static Calls"; - - // show how to access Java classes, methods - function actionJavaAccess() { - showScript(arguments.callee.title, - "// just use new JavaClass();\n" + - "var fr = new javax.swing.JFrame();\n" + - "// call all public methods as in Java\n" + - "fr.setTitle('hello');\n" + - "fr.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n" + - "fr.setSize(200, 200);\n" + - "fr.setVisible(true);"); - } - actionJavaAccess.title = "Java Object Access"; - - // show how to use Java bean conventions - function actionJavaBean() { - showScript(arguments.callee.title, - "var fr = new javax.swing.JFrame();\n" + - "fr.setSize(200, 200);\n" + - "// access public get/set methods as fields\n" + - "fr.defaultCloseOperation = javax.swing.WindowConstants.DISPOSE_ON_CLOSE;\n" + - "fr.title = 'hello';\n" + - "fr.visible = true;"); - } - actionJavaBean.title = "Java Beans"; - - // show how to implement Java interface - function actionJavaInterface() { - showScript(arguments.callee.title, - "// use Java anonymizer class-like syntax!\n" + - "var r = new java.lang.Runnable() {\n" + - " run: function() {\n" + - " alert('hello');\n" + - " }\n" + - " };\n" + - "// use the above Runnable to create a Thread\n" + - "new java.lang.Thread(r).start();\n" + - "// For simple one method interfaces, just pass script function\n" + - "new java.lang.Thread(function() { alert('world'); }).start();"); - } - actionJavaInterface.title = "Java Interfaces"; - - // show how to import Java classes, packages - function actionJavaImport() { - showScript(arguments.callee.title, - "// use Java-like import *...\n" + - "// importPackage(java.io);\n" + - "// or import a specific class\n" + - "// importClass(java.io.File);\n" + - "// or better - import just within a scope!\n" + - "var ioPkgs = JavaImporter(java.io);\n" + - "with (ioPkgs) { alert(new File('.').absolutePath); }"); - } - actionJavaImport.title = "Java Import"; - - // "Help" menu - - /* - * Shows a one liner help message for each - * global function. Note that this function - * depends on docString meta-data for each - * function. - */ - function actionHelpGlobals() { - var names = new java.util.ArrayList(); - for (var i in globalThis) { - var func = globalThis[i]; - if (typeof(func) == "function" && - ("docString" in func)) { - names.add(i); - } - } - java.util.Collections.sort(names); - var helpDoc = new java.lang.StringBuffer(); - helpDoc.append(""); - var itr = names.iterator(); - while (itr.hasNext()) { - var name = itr.next(); - helpDoc.append(""); - } - helpDoc.append("
                    "); - helpDoc.append(name); - helpDoc.append(""); - helpDoc.append(globalThis[name].docString); - helpDoc.append("
                    "); - - var helpEditor = new guiPkgs.JEditorPane(); - helpEditor.setContentType("text/html"); - helpEditor.setEditable(false); - helpEditor.setText(helpDoc.toString()); - - var scroller = new guiPkgs.JScrollPane(); - var port = scroller.getViewport(); - port.add(helpEditor); - - var helpFrame = new guiPkgs.JFrame("Help - Global Functions"); - helpFrame.getContentPane().add("Center", scroller); - helpFrame.setDefaultCloseOperation(guiPkgs.WindowConstants.DISPOSE_ON_CLOSE); - helpFrame.pack(); - helpFrame.setSize(500, 600); - helpFrame.setVisible(true); - } - - // show a simple about message for scriptpad - function actionAbout() { - alert("Scriptpad\nVersion 1.1", "Scriptpad"); - } - - /* - * This data is used to construct menu bar. - * This way adding a menu is easier. Just add - * top level menu or add an item to an existing - * menu. "action" should be a function that is - * called back on clicking the correponding menu. - */ - var menuData = [ - { - menu: "File", - items: [ - { name: "New", action: actionNew , accel: guiPkgs.KeyEvent.VK_N }, - { name: "Open...", action: actionOpen, accel: guiPkgs.KeyEvent.VK_O }, - { name: "Open URL...", action: actionOpenURL, accel: guiPkgs.KeyEvent.VK_U }, - { name: "Save", action: actionSave, accel: guiPkgs.KeyEvent.VK_S }, - { name: "Save As...", action: actionSaveAs }, - { name: "-" }, - { name: "Exit", action: actionExit, accel: guiPkgs.KeyEvent.VK_Q } - ] - }, - - { - menu: "Edit", - items: [ - { name: "Cut", action: actionCut, accel: guiPkgs.KeyEvent.VK_X }, - { name: "Copy", action: actionCopy, accel: guiPkgs.KeyEvent.VK_C }, - { name: "Paste", action: actionPaste, accel: guiPkgs.KeyEvent.VK_V }, - { name: "-" }, - { name: "Select All", action: actionSelectAll, accel: guiPkgs.KeyEvent.VK_A } - ] - }, - - { - menu: "Tools", - items: [ - { name: "Run", action: actionRun, accel: guiPkgs.KeyEvent.VK_R } - ] - }, - - { - menu: "Examples", - items: [ - { name: actionHello.title, action: actionHello }, - { name: actionEval.title, action: actionEval }, - { name: actionJavaStatic.title, action: actionJavaStatic }, - { name: actionJavaAccess.title, action: actionJavaAccess }, - { name: actionJavaBean.title, action: actionJavaBean }, - { name: actionJavaInterface.title, action: actionJavaInterface }, - { name: actionJavaImport.title, action: actionJavaImport } - ] - }, - - { - menu: "Help", - items: [ - { name: "Global Functions", action: actionHelpGlobals }, - { name: "-" }, - { name: "About Scriptpad", action: actionAbout } - ] - } - ]; - - function setMenuAccelerator(mi, accel) { - var keyStroke = guiPkgs.KeyStroke.getKeyStroke(accel, - guiPkgs.Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false); - mi.setAccelerator(keyStroke); - } - - // create a menubar using the above menu data - function createMenubar() { - var mb = new guiPkgs.JMenuBar(); - for (var m in menuData) { - var items = menuData[m].items; - var menu = new guiPkgs.JMenu(menuData[m].menu); - - for (var i in items) { - if (items[i].name.equals("-")) { - menu.addSeparator(); - } else { - var mi = new guiPkgs.JMenuItem(items[i].name); - var action = items[i].action; - mi.addActionListener(action); - var accel = items[i].accel; - if (accel) { - setMenuAccelerator(mi, accel); - } - menu.add(mi); - } - } - - mb.add(menu); - } - - return mb; - } - - // function to add a new menu item under "Tools" menu - function addTool(menuItem, action, accel) { - if (typeof(action) != "function") { - return; - } - - var toolsIndex = -1; - // find the index of the "Tools" menu - for (var i in menuData) { - if (menuData[i].menu.equals("Tools")) { - toolsIndex = i; - break; - } - } - if (toolsIndex == -1) { - return; - } - var toolsMenu = frame.getJMenuBar().getMenu(toolsIndex); - var mi = new guiPkgs.JMenuItem(menuItem); - mi.addActionListener(action); - if (accel) { - setMenuAccelerator(mi, accel); - } - toolsMenu.add(mi); - } - - // create Scriptpad frame - function createFrame() { - frame = new guiPkgs.JFrame(); - frame.setTitle(defaultTitle); - frame.setBackground(guiPkgs.Color.lightGray); - frame.getContentPane().setLayout(new guiPkgs.BorderLayout()); - - // create notepad panel - var notepad = new guiPkgs.JPanel(); - notepad.setBorder(guiPkgs.BorderFactory.createEtchedBorder()); - notepad.setLayout(new guiPkgs.BorderLayout()); - - // create editor - editor = createEditor(); - var scroller = new guiPkgs.JScrollPane(); - var port = scroller.getViewport(); - port.add(editor); - - // add editor to notepad panel - var panel = new guiPkgs.JPanel(); - panel.setLayout(new guiPkgs.BorderLayout()); - panel.add("Center", scroller); - notepad.add("Center", panel); - - // add notepad panel to frame - frame.getContentPane().add("Center", notepad); - - // set menu bar to frame and show the frame - frame.setJMenuBar(createMenubar()); - frame.setDefaultCloseOperation(guiPkgs.JFrame.EXIT_ON_CLOSE); - frame.pack(); - frame.setSize(500, 600); - } - - // show Scriptpad frame - function showFrame() { - // set global variable by the name "window" - globalThis.window = frame; - - // open new document - actionNew(); - - frame.setVisible(true); - } - - // create and show Scriptpad frame - createFrame(); - showFrame(); - - /* - * Application object has two fields "frame", "editor" - * which are current JFrame and editor and a method - * called "addTool" to add new menu item to "Tools" menu. - */ - return { - frame: frame, - editor: editor, - addTool: addTool - }; -}; - -/* - * Call the main and store Application object - * in a global variable named "application". - */ -var application = main(); - -if (this.load == undefined) { - function load(file) { - var ioPkgs = new JavaImporter(java.io); - with (ioPkgs) { - var stream = new FileInputStream(file); - var bstream = new BufferedInputStream(stream); - var reader = new BufferedReader(new InputStreamReader(bstream)); - var oldFilename = engine.get(engine.FILENAME); - engine.put(engine.FILENAME, file); - try { - engine.eval(reader, context); - } finally { - engine.put(engine.FILENAME, oldFilename); - } - stream.close(); - } - } - load.docString = "loads the given script file"; -} - -/* - * Load user specific init file under home dir, if found. - */ -function loadUserInit() { - var home = java.lang.System.getProperty("user.home"); - var f = new java.io.File(home, "scriptpad.js"); - if (f.exists()) { - engine.eval(new java.io.FileReader(f)); - } -} - -loadUserInit(); diff --git a/jdk/src/sample/share/scripting/scriptpad/src/scripts/README.txt b/jdk/src/sample/share/scripting/scriptpad/src/scripts/README.txt deleted file mode 100644 index 72e162d6fff..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/scripts/README.txt +++ /dev/null @@ -1,52 +0,0 @@ -Sample scripts: - -(1) browse.js - - -- Open and run this script in scriptpad. You will see - Tools->Browse menu. Using this you can start your - desktop default browser with the given URL. - -(2) insertfile.js - - -- Open and run this script in scriptpad. You will see - "Tools->Insert File..." menu. Using this you can start - insert content of a selected file into currently - edited document - -(3) linewrap.js - - -- Open and run this script in scriptpad. You will see - "Tools->Line Wrap" menu. Using this you can toggle - the line wrapping mode of the editor - -(4) mail.js - - -- Open and run this script in scriptpad. You will see - Tools->Mail menu. Using this you can start your - desktop default mail client with the given "To" mail id. - -(5) memmonitor.js - - -- This is a simple Monitoring & Management script. To use this, - you need an application to monitor. You can use memory.bat - or memory.sh in the current directory to start an application - that will be monitored. After that please follow these steps: - - 1. Start the target application using memory.sh or memory.bat - 2. Start scriptpad - 3. Use "Tools->JMX Connect" menu and specify "localhost:1090" - to connect - 4. Open "memmonitor.js" and run it (using "Tools->Run") - in scriptpad - 5. A new "Tools-Memory Monitor" menu appears. Use this menu - and specify 4 and 500 as threshold and interval values. - 6. In the target application shell (where memory.bat/.sh was - started), enter an integer value and press "enter". - 7. You'll see an alert box from scriptpad -- alerting you for - memory threshold exceeded! - -(6) textcolor.js - - -- Open and run this script in scriptpad. You will see - "Tools->Selected Text Color..." menu. Using this you - change the color of "selected text" in the editor. diff --git a/jdk/src/sample/share/scripting/scriptpad/src/scripts/browse.js b/jdk/src/sample/share/scripting/scriptpad/src/scripts/browse.js deleted file mode 100644 index fbe50e1a414..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/scripts/browse.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * This function uses new Swing Desktop API in JDK 6. - * To use this with scriptpad, open this in scriptpad - * and use "Tools->Run Script" menu. - */ -function browse() { - var desktop = null; - // Before more Desktop API is used, first check - // whether the API is supported by this particular - // virtual machine (VM) on this particular host. - if (java.awt.Desktop.isDesktopSupported()) { - desktop = java.awt.Desktop.getDesktop(); - } else { - alert("no desktop support"); - return; - } - - if (desktop.isSupported(java.awt.Desktop.Action.BROWSE)) { - var url = prompt("Address:"); - if (url != null) { - desktop.browse(new java.net.URI(url)); - } - } else { - alert("no browser support"); - } -} - -if (this.application != undefined) { - // add "Browse" menu item under "Tools" menu - this.application.addTool("Browse", browse); -} diff --git a/jdk/src/sample/share/scripting/scriptpad/src/scripts/insertfile.js b/jdk/src/sample/share/scripting/scriptpad/src/scripts/insertfile.js deleted file mode 100644 index 07a7ac28d19..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/scripts/insertfile.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * This script adds "Insert File" mode menu item to "Tools" menu. - * When selected, this menu shows a file dialog box and inserts - * contents of the selected file into current document (at the - * current caret position). - */ -if (this.application) { - application.addTool("Insert File...", - function() { - var file = fileDialog(); - - if (file) { - var reader = new java.io.FileReader(file); - var arr = java.lang.reflect.Array.newInstance( - java.lang.Character.TYPE, 8*1024); // 8K at a time - var buf = new java.lang.StringBuffer(); - var numChars; - - while ((numChars = reader.read(arr, 0, arr.length)) > 0) { - buf.append(arr, 0, numChars); - } - - var pos = application.editor.caretPosition; - var doc = application.editor.document; - - doc.insertString(pos, buf.toString(), null); - } - }); -} diff --git a/jdk/src/sample/share/scripting/scriptpad/src/scripts/linewrap.js b/jdk/src/sample/share/scripting/scriptpad/src/scripts/linewrap.js deleted file mode 100644 index 989473a6cf1..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/scripts/linewrap.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * This script adds "Line Wrap" mode menu item to "Tools" menu. - * When selected, this menu toggles the current word wrap mode - * of the editor. - */ - -function toggleLineWrap() { - var wrap = application.editor.lineWrap; - application.editor.lineWrap = !wrap; -} - -application.addTool("Line Wrap", toggleLineWrap); diff --git a/jdk/src/sample/share/scripting/scriptpad/src/scripts/mail.js b/jdk/src/sample/share/scripting/scriptpad/src/scripts/mail.js deleted file mode 100644 index cabe5c47541..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/scripts/mail.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * This function uses new Swing Desktop API in JDK 6. - * To use this with scriptpad, open this in scriptpad - * and use "Tools->Run Script" menu. - */ -function mail() { - var desktop = null; - // Before more Desktop API is used, first check - // whether the API is supported by this particular - // virtual machine (VM) on this particular host. - if (java.awt.Desktop.isDesktopSupported()) { - desktop = java.awt.Desktop.getDesktop(); - } else { - alert("no desktop support"); - return; - } - - if (desktop.isSupported(java.awt.Desktop.Action.MAIL)) { - var mailTo = prompt("Mail To:"); - if (mailTo != null) { - desktop.mail(new java.net.URI("mailto", mailTo, null)); - } - } -} - -if (this.application != undefined) { - // add "Mail" menu item under "Tools" menu - this.application.addTool("Mail", mail); -} diff --git a/jdk/src/sample/share/scripting/scriptpad/src/scripts/memmonitor.js b/jdk/src/sample/share/scripting/scriptpad/src/scripts/memmonitor.js deleted file mode 100644 index 0744e303b78..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/scripts/memmonitor.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -// this checker function runs asynchronously -function memoryChecker(memoryBean, threshold, interval) { - while (true) { - var memUsage = memoryBean.HeapMemoryUsage; - var usage = memUsage.get("used") / (1024 * 1024); - - println("usage: " + usage); - - if (usage > threshold) { - alert("Hey! heap usage threshold exceeded!"); - // after first alert just return. - return; - } - - java.lang.Thread.sleep(interval); - } -} - -// add "Tools->Memory Monitor" menu item -if (this.application != undefined) { - this.application.addTool("Memory Monitor", - function () { - // show threshold box with default of 50 MB - var threshold = prompt("Threshold (mb)", 50); - - // show interval box with default of 1000 millisec. - var interval = prompt("Sample Interval (ms):", 1000); - var memoryBean = mbean("java.lang:type=Memory"); - - // ".future" makes the function to be called - // asynchronously in a separate thread. - memoryChecker.future(memoryBean, threshold, interval); - }); -} diff --git a/jdk/src/sample/share/scripting/scriptpad/src/scripts/memory.bat b/jdk/src/sample/share/scripting/scriptpad/src/scripts/memory.bat deleted file mode 100644 index 9478c0966c1..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/scripts/memory.bat +++ /dev/null @@ -1,35 +0,0 @@ -@echo off -REM -REM Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. -REM -REM Redistribution and use in source and binary forms, with or without -REM modification, are permitted provided that the following conditions -REM are met: -REM -REM - Redistributions of source code must retain the above copyright -REM notice, this list of conditions and the following disclaimer. -REM -REM - Redistributions in binary form must reproduce the above copyright -REM notice, this list of conditions and the following disclaimer in the -REM documentation and/or other materials provided with the distribution. -REM -REM - Neither the name of Oracle nor the names of its -REM contributors may be used to endorse or promote products derived -REM from this software without specific prior written permission. -REM -REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -REM IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -REM THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -REM PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -REM CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -REM EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -REM PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -REM PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -REM LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -REM NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -REM SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -REM - - -jrunscript -J-Dcom.sun.management.jmxremote.port=1090 -J-Dcom.sun.management.jmxremote.ssl=false -J-Dcom.sun.management.jmxremote.authenticate=false memory.js - diff --git a/jdk/src/sample/share/scripting/scriptpad/src/scripts/memory.js b/jdk/src/sample/share/scripting/scriptpad/src/scripts/memory.js deleted file mode 100644 index b8252fbfbcc..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/scripts/memory.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * This script serves as a simple "monitored application". - * Start this script using memory.bat or memory.sh in the - * current directory. - */ - -java.lang.System.out.print("Enter a number and press enter:"); -var input = java.lang.System["in"].read(); - -// allocate an integer array of "big enough" size! -var a = java.lang.reflect.Array.newInstance( - java.lang.Integer.TYPE, input * 1024 * 1024); - -// sleep some time... -java.lang.Thread.sleep(10*60*1000); diff --git a/jdk/src/sample/share/scripting/scriptpad/src/scripts/memory.sh b/jdk/src/sample/share/scripting/scriptpad/src/scripts/memory.sh deleted file mode 100644 index 8da155bbdba..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/scripts/memory.sh +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -jrunscript -J-Dcom.sun.management.jmxremote.port=1090 -J-Dcom.sun.management.jmxremote.ssl=false -J-Dcom.sun.management.jmxremote.authenticate=false memory.js diff --git a/jdk/src/sample/share/scripting/scriptpad/src/scripts/textcolor.js b/jdk/src/sample/share/scripting/scriptpad/src/scripts/textcolor.js deleted file mode 100644 index b9d86cc37f0..00000000000 --- a/jdk/src/sample/share/scripting/scriptpad/src/scripts/textcolor.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - -/* - * This script adds "Selected Text Color" menu item to "Tools" menu. - * When selected, this menu changes the "selected text" color. - */ -if (this.application) { - application.addTool("Selected Text Color...", - function() { - var color = application.editor.selectedTextColor; - color = colorDialog("Selected Text Color", color); - application.editor.selectedTextColor = color; - }); -} diff --git a/jdk/src/sample/share/try-with-resources/index.html b/jdk/src/sample/share/try-with-resources/index.html deleted file mode 100644 index 97aecf317d0..00000000000 --- a/jdk/src/sample/share/try-with-resources/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - Try-with-Resources Feature Demo - - -

                    Try-with-Resources Feature Demo

                    - -

                    - This demo shows how to use the try-with-resources feature introduced in JDK7. -

                    - -
                      -
                    • Custom AutoCloseable.

                      - -

                      - Shows how to use a custom resource with the try-with-resources construct. - For more information, see the source file. -

                      - Source: src/CustomAutoCloseableSample.java - -
                    • Unzip

                      - -

                      - Extracts archived files. For more information, see the source file. -

                      - Source: src/Unzip.java -
                    • ZipCat

                      - -

                      Prints data about a specified file from an archive. For more information, see the source file.

                      - Source: src/ZipCat.java - -
                    - - diff --git a/jdk/src/sample/share/try-with-resources/src/CustomAutoCloseableSample.java b/jdk/src/sample/share/try-with-resources/src/CustomAutoCloseableSample.java deleted file mode 100644 index 9bbe09aa1ed..00000000000 --- a/jdk/src/sample/share/try-with-resources/src/CustomAutoCloseableSample.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation, and proper error handling, might not be present in - * this sample code. - */ - -import java.io.BufferedOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; - -/** - * This sample demonstrates the ability to create custom resource that - * implements the {@code AutoCloseable} interface. This resource can be used in - * the try-with-resources construct. - */ -public class CustomAutoCloseableSample { - - /** - * The main method for the CustomAutoCloseableSample program. - * - * @param args is not used. - */ - public static void main(String[] args) { - /* - * TeeStream will be closed automatically after the try block. - */ - try (TeeStream teeStream = new TeeStream(System.out, Paths.get("out.txt")); - PrintStream out = new PrintStream(teeStream)) { - out.print("Hello, world"); - } catch (Exception e) { - e.printStackTrace(); - System.exit(1); - } - } - - /** - * Passes the output through to the specified output stream while copying it into a file. - * The TeeStream functionality is similar to the Unix tee utility. - * TeeStream implements AutoCloseable interface. See OutputStream for details. - */ - public static class TeeStream extends OutputStream { - - private final OutputStream fileStream; - private final OutputStream outputStream; - - /** - * Creates a TeeStream. - * - * @param outputStream an output stream. - * @param outputFile an path to file. - * @throws IOException If an I/O error occurs. - */ - public TeeStream(OutputStream outputStream, Path outputFile) throws IOException { - this.fileStream = new BufferedOutputStream(Files.newOutputStream(outputFile)); - this.outputStream = outputStream; - } - - /** - * Writes the specified byte to the specified output stream - * and copies it to the file. - * - * @param b the byte to be written. - * @throws IOException If an I/O error occurs. - */ - @Override - public void write(int b) throws IOException { - fileStream.write(b); - outputStream.write(b); - } - - /** - * Flushes this output stream and forces any buffered output bytes - * to be written out. - * The flush method of TeeStream flushes - * the specified output stream and the file output stream. - * - * @throws IOException if an I/O error occurs. - */ - @Override - public void flush() throws IOException { - outputStream.flush(); - fileStream.flush(); - } - - /** - * Closes underlying streams and resources. - * The external output stream won't be closed. - * This method is the member of AutoCloseable interface and - * it will be invoked automatically after the try-with-resources block. - * - * @throws IOException If an I/O error occurs. - */ - @Override - public void close() throws IOException { - try (OutputStream file = fileStream) { - flush(); - } - } - } -} diff --git a/jdk/src/sample/share/try-with-resources/src/Unzip.java b/jdk/src/sample/share/try-with-resources/src/Unzip.java deleted file mode 100644 index d75eba52c78..00000000000 --- a/jdk/src/sample/share/try-with-resources/src/Unzip.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation, and proper error handling, might not be present in - * this sample code. - */ - -import java.io.IOException; -import java.io.UncheckedIOException; -import java.nio.file.*; - -import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; - -/** - * Extract (unzip) a file to the current directory. - */ -public class Unzip { - - /** - * The main method for the Unzip program. Run the program with an empty - * argument list to see possible arguments. - * - * @param args the argument list for {@code Unzip}. - */ - public static void main(String[] args) { - if (args.length != 1) { - System.out.println("Usage: Unzip zipfile"); - } - final Path destDir = Paths.get("."); - /* - * Create AutoCloseable FileSystem. It will be closed automatically - * after the try block. - */ - try (FileSystem zipFileSystem = FileSystems.newFileSystem(Paths.get(args[0]), null)) { - - Path top = zipFileSystem.getPath("/"); - Files.walk(top).skip(1).forEach(file -> { - Path target = destDir.resolve(top.relativize(file).toString()); - System.out.println("Extracting " + target); - try { - Files.copy(file, target, REPLACE_EXISTING); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - }); - } catch (UncheckedIOException | IOException e) { - e.printStackTrace(); - System.exit(1); - } - } -} diff --git a/jdk/src/sample/share/try-with-resources/src/ZipCat.java b/jdk/src/sample/share/try-with-resources/src/ZipCat.java deleted file mode 100644 index 4bbf513a538..00000000000 --- a/jdk/src/sample/share/try-with-resources/src/ZipCat.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation, and proper error handling, might not be present in - * this sample code. - */ - -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.FileSystem; -import java.nio.file.FileSystems; -import java.nio.file.Files; -import java.nio.file.Paths; - -/** - * Prints data of the specified file to standard output from a zip archive. - */ -public class ZipCat { - - /** - * The main method for the ZipCat program. Run the program with an empty - * argument list to see possible arguments. - * - * @param args the argument list for ZipCat - */ - public static void main(String[] args) { - if (args.length != 2) { - System.out.println("Usage: ZipCat zipfile fileToPrint"); - } - /* - * Creates AutoCloseable FileSystem and BufferedReader. - * They will be closed automatically after the try block. - * If reader initialization fails, then zipFileSystem will be closed - * automatically. - */ - try (FileSystem zipFileSystem - = FileSystems.newFileSystem(Paths.get(args[0]),null); - InputStream input - = Files.newInputStream(zipFileSystem.getPath(args[1]))) { - byte[] buffer = new byte[1024]; - int len; - while ((len = input.read(buffer)) != -1) { - System.out.write(buffer, 0, len); - } - - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } - } -} diff --git a/jdk/src/sample/share/vm/clr-jvm/Makefile b/jdk/src/sample/share/vm/clr-jvm/Makefile deleted file mode 100644 index 0a5c3316668..00000000000 --- a/jdk/src/sample/share/vm/clr-jvm/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -all: jinvoker.dll invoked.class invoker.exe - -jinvoker.dll: jinvoker.obj Makefile - cl /LD /o jinvoker.dll jinvoker.obj - -jinvoker.obj: jinvoker.cpp jinvokerExp.h Makefile - cl /Fojinvoker.obj /DJINVOKEREEXPORT /c jinvoker.cpp - -invoked.class: invoked.java Makefile - javac invoked.java - -invoker.exe: invoker.cs Makefile - csc /unsafe invoker.cs diff --git a/jdk/src/sample/share/vm/clr-jvm/README.txt b/jdk/src/sample/share/vm/clr-jvm/README.txt deleted file mode 100644 index 52ed44e6d82..00000000000 --- a/jdk/src/sample/share/vm/clr-jvm/README.txt +++ /dev/null @@ -1,54 +0,0 @@ -This sample provides Java "Hello World" program that is invoked -from C# application in the same process. - -The problem of direct call of the JVM API from CLR applications -by PInvoke interface is the JVM API functions do not have static -adresses, they need to be got by JNI_CreateJavaVM() call. -The sample contains C++ libraty that wraps JVM API calls by the -static functions that are called from the C# application by -PInvoke interface. - -The sample contains the following files: - -Makefile - make file -README.txt - this readme -invoked.java - the invoked HelloWorld Java program -invoker.cs - C# invoker application -jinvoker.cpp - C++ wrapper -jinvokerExp.h - wrapper library exports - -After the success making the following files are produced: - -invoked.class - the compiled HelloWorld class -invoker.exe - the executable .NET program that invokes Java -jinvoker.dll - the wrapper library - -The following environment needs to be set for the correct sample -build and execution: - -INCLUDE must contain the paths to: - 1. MS Visual C++ standard include - 2. .NET SDK include - 3. Java includes - Example: %MSDEV%/VC98/Include;%DOTNET%/Include;%JAVA_HOME%/include;%JAVA_HOME%/include/win32 - -LIB must contain the paths to: - 1. MS Visual C++ standard libraries - 2. .NET SDK libraries - 3. jvm.dll - Example: %MSDEV%/VC98/Lib;%DOTNET%/Lib;%JAVA_HOME%/jre/bin/client - -PATH must contain the paths to: - 1. MS Visual C++ standard bin - 2. MS Dev common bin - 3. .NET SDK libraries - 4. Java bin - 5. jvm.dll - Example: %MSDEV%/VC98/Bin;%MSDEV%/Common/MSDev98/Bin;%DOTNET%/Lib;%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin/client;%PATH% - -To run the sample please do: - - invoker.exe invoked - - ---Dmitry Ryashchentsev diff --git a/jdk/src/sample/share/vm/clr-jvm/invoked.java b/jdk/src/sample/share/vm/clr-jvm/invoked.java deleted file mode 100644 index 307de742347..00000000000 --- a/jdk/src/sample/share/vm/clr-jvm/invoked.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -public class invoked { - public static void main(String args[]) { - - // Print Hello to show we are in JVM - System.out.println("Hello from Java!!!"); - System.exit(0); - } -} diff --git a/jdk/src/sample/share/vm/clr-jvm/invoker.cs b/jdk/src/sample/share/vm/clr-jvm/invoker.cs deleted file mode 100644 index 86555056213..00000000000 --- a/jdk/src/sample/share/vm/clr-jvm/invoker.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -using System; -using System.Runtime.InteropServices; - -class jinvoker{ - - public static int Main(string[] aArgs){ - - // Print Hello to show we are in CLR - Console.WriteLine("Hello from C#"); - if(aArgs.Length > 0) - // invoke JVM - return InvokeMain(aArgs[0]); - else - return -1; - } - - // Link the JVM API functions and the wrappers - - [DllImport("jvm.dll")] public unsafe static extern int JNI_CreateJavaVM(void** ppVm, void** ppEnv, void* pArgs); - [DllImport("jinvoker.dll")] public unsafe static extern int MakeJavaVMInitArgs( void** ppArgs ); - [DllImport("jinvoker.dll")] public unsafe static extern void FreeJavaVMInitArgs( void* pArgs ); - [DllImport("jinvoker.dll")] public unsafe static extern int FindClass( void* pEnv, String sClass, void** ppClass ); - [DllImport("jinvoker.dll")] public unsafe static extern int GetStaticMethodID( void* pEnv, - void* pClass, - String szName, - String szArgs, - void** ppMid); - - [DllImport("jinvoker.dll")] public unsafe static extern int NewObjectArray( void* pEnv, - int nDimension, - String sType, - void** ppArray ); - - [DllImport("jinvoker.dll")] public unsafe static extern int CallStaticVoidMethod( void* pEnv, - void* pClass, - void* pMid, - void* pArgs); - - [DllImport("jinvoker.dll")] public unsafe static extern int DestroyJavaVM( void* pJVM ); - - public unsafe static int InvokeMain( String sClass ){ - - void* pJVM; // JVM struct - void* pEnv; // JVM environment - void* pVMArgs; // VM args - void* pClass; // Class struct of the executed method - void* pMethod; // The executed method struct - void* pArgs; // The executed method arguments struct - - // Fill the pVMArgs structs - MakeJavaVMInitArgs( &pVMArgs ); - - // Create JVM - int nRes = JNI_CreateJavaVM( &pJVM, &pEnv, pVMArgs ); - if( nRes == 0 ){ - - // Find the executed method class - if(FindClass( pEnv, sClass, &pClass) == 0 ) - - // Find the executed method - if( GetStaticMethodID( pEnv, pClass, "main", "([Ljava/lang/String;)V", &pMethod ) == 0 ) - - // Create empty String[] array to pass to the main() - if( NewObjectArray( pEnv, 0, "java/lang/String", &pArgs ) == 0 ){ - - // Call main() - nRes = CallStaticVoidMethod( pEnv, pClass, pMethod, pArgs ); - if( nRes != -1 ) - Console.WriteLine("Result:"+nRes); - else - Console.WriteLine("Exception"); - - }else{ - Console.WriteLine("Error while making args array"); - nRes = -100; - } - else{ - Console.WriteLine("can not find method main(String[])"); - nRes = -101; - } - else{ - Console.WriteLine("can not find class:"+sClass); - nRes = -102; - } - - // Destroy the JVM - DestroyJavaVM( pJVM ); - - }else - Console.WriteLine("Can not create Java VM"); - - // Free the JVM args structs - FreeJavaVMInitArgs(pVMArgs); - - return nRes; - } -} diff --git a/jdk/src/sample/share/vm/clr-jvm/jinvoker.cpp b/jdk/src/sample/share/vm/clr-jvm/jinvoker.cpp deleted file mode 100644 index a1d1f1abfd6..00000000000 --- a/jdk/src/sample/share/vm/clr-jvm/jinvoker.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include -#include -#include "jinvokerExp.h" - -static int g_nExitCode = 0; - -void system_exit(jint nCode){ - g_nExitCode = nCode; -} - -/* -Allocating and providing the JVM init argumets. -By MakeJavaVMInitArgs() it is provided two options: providing CLASSPATH -environment variable value and function java.lang.System.exit() -redefinition in order to get the exit code. -See the description of the JNI API in -http://jre.sfbay/java/re/jdk/6/promoted/latest/docs/technotes/guides/jni/spec/invocation.html#wp9502 -*/ - -int MakeJavaVMInitArgs( void** ppArgs ){ - - int nOptSize = 2; - JavaVMInitArgs* pArgs = new JavaVMInitArgs(); - JavaVMOption* pOptions = new JavaVMOption[nOptSize]; - - //provide CLASSPATH value to java.class.path - - char* szClassPath = getenv("CLASSPATH"); - if( szClassPath == NULL ) - szClassPath = "."; - - pOptions[0].optionString = new char[strlen("-Djava.class.path=")+ - strlen(szClassPath)+1]; - sprintf( pOptions[0].optionString, "-Djava.class.path=%s", szClassPath ); - - //redefine java.lang.System.exit() - - pOptions[1].optionString = "exit"; - pOptions[1].extraInfo = system_exit; - - //Fill the arguments - - memset(pArgs, 0, sizeof(JavaVMInitArgs)); - pArgs->version = 0x00010002; - pArgs->options = pOptions; - pArgs->nOptions = nOptSize; - pArgs->ignoreUnrecognized = JNI_TRUE; - - *ppArgs = pArgs; - - return 0; -} - -/* -Free the allocated JVM init argumets -*/ - -void FreeJavaVMInitArgs( void* pArgs ){ - delete ((JavaVMInitArgs*)pArgs)->options[0].optionString; - delete ((JavaVMInitArgs*)pArgs)->options; - delete pArgs; -} - -/* -Static wrapper on FindClass() JNI function. -See the description in -http://jre.sfbay/java/re/jdk/6/promoted/latest/docs/technotes/guides/jni/spec/functions.html#wp16027 -*/ - -int FindClass( JNIEnv* pEnv, - const char* szClass, - jclass* pClass ){ - - *pClass = pEnv->FindClass( szClass ); - - if(pEnv->ExceptionCheck() == JNI_TRUE){ - pEnv->ExceptionDescribe(); - return -1; - } - if(*pClass != NULL) - return 0; - else - return -2; - -} - -/* -Static wrapper on GetStaticMethodID() JNI function. -See the description in -http://jre.sfbay/java/re/jdk/6/promoted/latest/docs/technotes/guides/jni/spec/functions.html#wp20949 -*/ - -int GetStaticMethodID(JNIEnv* pEnv, - jclass pClass, - const char* szName, - const char* szArgs, - jmethodID* pMid){ - - *pMid = pEnv->GetStaticMethodID( pClass, szName, szArgs); - - if(pEnv->ExceptionCheck() == JNI_TRUE){ - pEnv->ExceptionDescribe(); - return -1; - } - - if( *pMid != NULL ) - return 0; - else - return -2; -} - -/* -Static wrapper on NewObjectArray() JNI function. -See the description in -http://jre.sfbay/java/re/jdk/6/promoted/latest/docs/technotes/guides/jni/spec/functions.html#wp21619 -*/ - -int NewObjectArray( JNIEnv* pEnv, - int nDimension, - const char* szType, - jobjectArray* pArray ){ - - *pArray = pEnv->NewObjectArray( nDimension, pEnv->FindClass( szType ), NULL); - - if(pEnv->ExceptionCheck() == JNI_TRUE){ - pEnv->ExceptionDescribe(); - return -1; - } - - if( pArray != NULL ) - return 0; - else - return -2; - -} - -/* -Static wrapper on CallStaticVoidMethod() JNI function. -See the description in -http://jre.sfbay/java/re/jdk/6/promoted/latest/docs/technotes/guides/jni/spec/functions.html#wp4796 -*/ - -int CallStaticVoidMethod( JNIEnv* pEnv, - jclass pClass, - jmethodID pMid, - void* pArgs){ - - g_nExitCode = 0; - pEnv->CallStaticVoidMethod( pClass, pMid, pArgs); - if( pEnv->ExceptionCheck() == JNI_TRUE ){ - pEnv->ExceptionDescribe(); - return -1; - }else - return g_nExitCode; -} - -/* -Static wrapper on DestroyJavaVM() JNI function. -See the description in -http://jre.sfbay/java/re/jdk/6/promoted/latest/docs/technotes/guides/jni/spec/invocation.html#destroy_java_vm -*/ - -int DestroyJavaVM( JavaVM* pJVM ){ - pJVM->DestroyJavaVM(); - return 0; -} diff --git a/jdk/src/sample/share/vm/clr-jvm/jinvokerExp.h b/jdk/src/sample/share/vm/clr-jvm/jinvokerExp.h deleted file mode 100644 index 75849f504ad..00000000000 --- a/jdk/src/sample/share/vm/clr-jvm/jinvokerExp.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#include -#include - -#ifdef JINVOKEREEXPORT -#define JINVOKERAPI __declspec(dllexport) -#else -#define JINVOKERAPI __declspec(dllimport) -#endif - -// Create JNI_CreateJavaVM() args structures -extern "C" int JINVOKERAPI MakeJavaVMInitArgs( void** ppArgs ); - -// Free JNI_CreateJavaVM() args structures -extern "C" void JINVOKERAPI FreeJavaVMInitArgs( void* pArgs ); - -// Static wrapper on FindClass() JNI function. -extern "C" int JINVOKERAPI FindClass( JNIEnv* pEnv, - const char* szName, - jclass* ppClass ); - -// Static wrapper on GetStaticMethodID() JNI function. -extern "C" int JINVOKERAPI GetStaticMethodID( JNIEnv* pEnv, - jclass pClass, - const char* szName, - const char* szArgs, - jmethodID* ppMid ); - -// Static wrapper on NewObjectArray() JNI function. -extern "C" int JINVOKERAPI NewObjectArray( JNIEnv* pEnv, - int nDimension, - const char* szType, - jobjectArray* pArray ); - -// Static wrapper on CallStaticVoidMethod() JNI function. -extern "C" int JINVOKERAPI CallStaticVoidMethod( JNIEnv* pEnv, - jclass pClass, - jmethodID pMid, - void* pArgs); - -// Static wrapper on DestroyJavaVM() JNI function. -extern "C" int JINVOKERAPI DestroyJavaVM( JavaVM* pEnv ); diff --git a/jdk/src/sample/share/vm/jvm-clr/Makefile b/jdk/src/sample/share/vm/jvm-clr/Makefile deleted file mode 100644 index 18799614398..00000000000 --- a/jdk/src/sample/share/vm/jvm-clr/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# - Neither the name of Oracle nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -all: invoker.dll invoker.class invoked.exe - -invoker.dll: invoker.obj Makefile - cl /LD /o invoker.dll invoker.obj mscoree.lib - -invoker.obj: invoker.cpp invokerExp.h invoker.h Makefile - cl /Foinvoker.obj /DINVOKEREXPORT /c invoker.cpp - -invoker.class: invoker.java Makefile - javac invoker.java - -invoked.exe: invoked.cs Makefile - csc invoked.cs diff --git a/jdk/src/sample/share/vm/jvm-clr/README.txt b/jdk/src/sample/share/vm/jvm-clr/README.txt deleted file mode 100644 index 1d1c2f4bb12..00000000000 --- a/jdk/src/sample/share/vm/jvm-clr/README.txt +++ /dev/null @@ -1,51 +0,0 @@ -This sample provides C# "Hello World" program that is invoked -from Java application in the same process. - -There is no way to invoke .NET methods from Java classes directly, -it is necessary to use native code level. -The sample contains C++ library that can invoke any .NET program by mscorlib library. -Using the JNI the Java application invokes the C# "Hello World". - -The sample contains the following files: - -Makefile - make file -README.txt - this readme -invoked.cs - the invoked HelloWorld Java program -invoker.java - C# invoker application -invoker.cpp - C++ wrapper -invokerExp.h - wrapper library exports -invoker.h - javah generated file with the native method definition - -After the success making the following files are produced: - -invoked.exe - the executable HelloWorld .NET program -invoker.class - the compiled Java class that invokes the .NET program -invoker.dll - the wrapper library - -The following environment needs to be set for the correct sample -build and execution: - -INCLUDE must contain the paths to: - 1. MS Visual C++ standard include - 2. .NET SDK include - 3. Java includes - Example: %MSDEV%/VC98/Include;%DOTNET%/Include;%JAVA_HOME%/include;%JAVA_HOME%/include/win32 - -LIB must contain the paths to: - 1. MS Visual C++ standard libraries - 2. .NET SDK libraries - Example: %MSDEV%/VC98/Lib;%DOTNET%/Lib - -PATH must contain the paths to: - 1. MS Visual C++ standard bin - 2. MS Dev common bin - 3. .NET SDK libraries - 4. Java bin - Example: %MSDEV%/VC98/Bin;%MSDEV%/Common/MSDev98/Bin;%DOTNET%/Lib;%JAVA_HOME%/bin;%PATH% - -To run the sample please do: - -java invoker invoked.exe - - ---Dmitry Ryashchentsev diff --git a/jdk/src/sample/share/vm/jvm-clr/invoked.cs b/jdk/src/sample/share/vm/jvm-clr/invoked.cs deleted file mode 100644 index 6aa0606ceee..00000000000 --- a/jdk/src/sample/share/vm/jvm-clr/invoked.cs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - - -using System; - -class App{ - - public static int Main(){ - - // Print Hello to show we are in CLR - Console.WriteLine("Hello from C#!!!"); - return 0; - } -} diff --git a/jdk/src/sample/share/vm/jvm-clr/invoker.cpp b/jdk/src/sample/share/vm/jvm-clr/invoker.cpp deleted file mode 100644 index 67f325431bb..00000000000 --- a/jdk/src/sample/share/vm/jvm-clr/invoker.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#define _WIN32_WINNT 0x0400 -#include "windows.h" -#include "Oleauto.h" -#include "stdio.h" -#include "mscoree.h" -#include "corerror.h" -#include "jni.h" -#include "invokerExp.h" -#include "invoker.h" - -#import raw_interfaces_only - -using namespace mscorlib; - -// The CLR assembly invocation function - -int __stdcall invokeCLR( WCHAR* wszApplication){ - - //Initializes the COM library - - CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - ICorRuntimeHost* pHost = NULL; - IUnknown* pAppDomainThunk = NULL; - _AppDomain* pAppDomain = NULL; - long lReturn = 0; - - // Load CLR into the process - - HRESULT hr = CorBindToRuntimeEx(NULL,NULL,0,CLSID_CorRuntimeHost,IID_ICorRuntimeHost,(VOID**)&pHost); - - if(!FAILED(hr)) { - - // Start the CLR - - hr = pHost->Start(); - if(!FAILED(hr)) { - - // Get the _AppDomain interface - - hr = pHost->GetDefaultDomain(&pAppDomainThunk); - if(!FAILED(hr)) { - - hr = pAppDomainThunk->QueryInterface(__uuidof(_AppDomain), (void**)&pAppDomain); - if(!FAILED(hr)) { - - // Execute assembly - - hr = pAppDomain->ExecuteAssembly_2(_bstr_t(wszApplication), &lReturn); - if (FAILED(hr)) { - - printf("_AppDomain::ExecuteAssembly_2 failed with hr=0x%x.\n", hr); - lReturn = -1; - } - - }else{ - printf("Can't get System::_AppDomain interface\n"); - lReturn = -2; - } - - }else{ - printf("ICorRuntimeHost->GetDefaultDomain failed with hr=0x%x.\n", hr); - lReturn = -3; - } - }else{ - printf("ICorRuntimeHost->Start failed with hr=0x%x.\n", hr); - lReturn = -4; - } - - }else{ - printf("CorBindToRuntimeHost failed with hr=0x%x.\n", hr); - lReturn = -5; - } - - // print the error message description if needed - - if(FAILED(hr)){ - LPVOID lpMsgBuf = NULL; - - FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - hr, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &lpMsgBuf, - 0, - NULL ); - if(lpMsgBuf != NULL) - printf("Message:%s\n",lpMsgBuf); - else - printf("No translation of 0x%x\n",hr); - } - - // close COM library - - CoUninitialize(); - - return lReturn; -} - -// Wrapper function that allows to ASCIZ string to provide the assemble path - -int __stdcall invokeCLR( const char* szApplication){ - - int nLength = strlen(szApplication)+1; - - WCHAR* wszApplication = new WCHAR[nLength]; - - mbstowcs(wszApplication, szApplication, nLength); - - int nReturn = invokeCLR( wszApplication); - - delete wszApplication; - - return nReturn; -} - -// native method enter-point - -JNIEXPORT jint JNICALL Java_invoker_invokeCLR( JNIEnv* pEnv, - jclass pClass, - jstring jsApplication) { - - const char* szApplication = pEnv->GetStringUTFChars(jsApplication, NULL); - - int nResult = invokeCLR( szApplication); - - pEnv->ReleaseStringUTFChars(jsApplication,szApplication); - - return nResult; -} diff --git a/jdk/src/sample/share/vm/jvm-clr/invoker.h b/jdk/src/sample/share/vm/jvm-clr/invoker.h deleted file mode 100644 index a018a4e4430..00000000000 --- a/jdk/src/sample/share/vm/jvm-clr/invoker.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class invoker */ - -#ifndef _Included_invoker -#define _Included_invoker -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: invoker - * Method: invokeCLR - * Signature: (Ljava/lang/String;)I - */ -JNIEXPORT jint JNICALL Java_invoker_invokeCLR - (JNIEnv *, jclass, jstring); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/jdk/src/sample/share/vm/jvm-clr/invoker.java b/jdk/src/sample/share/vm/jvm-clr/invoker.java deleted file mode 100644 index 66dc6c457d2..00000000000 --- a/jdk/src/sample/share/vm/jvm-clr/invoker.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -public class invoker { - - static { - - // Load the wrapper library - System.loadLibrary("invoker"); - } - - // the native enter-pointer to invoke the CLR assembly - public static native int invokeCLR(String sApplication); - - public static void main(String args[]) { - - // Print Hello to show we are in JVM - System.out.println("Hello from JVM!!!"); - - if( args.length >= 1 ){ - String sApplication = args[0]; - - // Invoke CLR assembly - int nResult = invokeCLR(sApplication); - - System.exit(nResult); - - }else - System.out.println("Usage: java invoker "); - } -} diff --git a/jdk/src/sample/share/vm/jvm-clr/invokerExp.h b/jdk/src/sample/share/vm/jvm-clr/invokerExp.h deleted file mode 100644 index d7a353936f6..00000000000 --- a/jdk/src/sample/share/vm/jvm-clr/invokerExp.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -#ifndef _invoker_h -#define _invoker_h - -#ifdef INVOKEREXPORT -#define INVOKERAPI __declspec(dllexport) -#else -#define INVOKERAPI __declspec(dllimport) -#endif - -// The CLR assembly invocation function - -INVOKERAPI int __stdcall invokeCLR( const char* szApplication ); -#endif diff --git a/jdk/src/sample/solaris/dtrace/README.txt b/jdk/src/sample/solaris/dtrace/README.txt deleted file mode 100644 index c3d12b2aeb1..00000000000 --- a/jdk/src/sample/solaris/dtrace/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -DTrace HotSpot probes samples -============================= - -This directory contains the list of D scripts which could be used to trace -Java application with help of Solaris(tm) 10 Dynamic Tracing (DTrace) -probes. - -The directory is organized as: - -* helpers/ - - This directory contains the auxiliary script to launch Java application - with D script to debug. See more comments in the scripts. - -* hotspot/ - - This directory contains D scripts which demonstrate usage of 'hotspot' - provider probes. - - -* hotspot_jni/ - - This directory contains D scripts which demonstrate usage of 'hotspot_jni' - provider probes. - - - -Requirements to run DTrace -========================== - -1. dtrace framework should be installed; (check if /usr/sbin/dtrace exists) - -2. the user should have the following rights: - dtrace_proc, dtrace_user, dtrace_kernel - - To give a user a privilege on login, insert a line into the - /etc/user_attr file of the form: - user-name::::defaultpriv=basic,dtrace_proc,dtrace_user,dtrace_kernel - - or - - To give a running process an DTrace privilege, use the ppriv(1) command: - # ppriv -s A+privilege process-ID diff --git a/jdk/src/sample/solaris/dtrace/helpers/dtrace_helper.d b/jdk/src/sample/solaris/dtrace/helpers/dtrace_helper.d deleted file mode 100644 index 896b175e430..00000000000 --- a/jdk/src/sample/solaris/dtrace/helpers/dtrace_helper.d +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/sbin/dtrace -s -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Description: - * dtrace -c option launches the command specified in the -c argument and - * starts tracing the process. Typically, you can run a D script and trace - * a Java application as follows: - * dscript.d -Zc "java HelloWorld" - * - * The -Z option is needed to permit probe descriptions that match zero - * probes because Hotspot probes definitions are located in libjvm.so which - * has not been yet loaded and thus can't be enabled until the application - * is started. - * - * Straightforward attempt to run D script may fail, e.g.: - * dscript.d -c "java HelloWorld" - * "probe description hotspotPID:::probename does not match any probes" - * - * This is because DTrace tries to enable probes before libjvm.so is loaded. - * The -Z option requires Solaris patch 118822-30 installed on your system. - * - * In case you don't have this Solaris patch use dtrace_helper.d script. - * This script waits until the Hotspot DTrace probes are loaded and then - * stops the Java process (passed as '-c' options). After the process is - * stopped, another D script (passed as first argument) is called to do real - * trace of Java process. - * - * Usage example: - * dtrace_helper.d -c "java ..." ../hotspot/class_loading_stat.d - */ - -#pragma D option quiet -#pragma D option destructive - - -pid$target::dlopen:entry -{ - self->filename = arg0; -} - - -pid$target::dlopen:return -/self->filename && basename(copyinstr(self->filename)) == "libjvm.so"/ -{ - printf(" loaded %s\n", basename(copyinstr(self->filename))); - self->filename = 0; - - stop(); - printf(" stopped java process with pid=%d \n", $target); - - printf(" run: %s -p %d &", $1, $target); - system("(%s -p %d) &", $1, $target); - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot/README.txt b/jdk/src/sample/solaris/dtrace/hotspot/README.txt deleted file mode 100644 index b511b9c5179..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot/README.txt +++ /dev/null @@ -1,87 +0,0 @@ -============================ -'hotspot' PROBES DESCRIPTION -============================ - -This directory contains D scripts which demonstrate usage of 'hotspot' provider probes. - -The 'hotspot' provider makes available probes that can be used to track the -lifespan of the VM, thread start and stop events, GC and memory pool -statistics, method compilations, and monitor activity. With a startup flag, -additional probes are enabled which can be used to monitor the running Java -program, such as method enter and return probes, and object allocations. All -of the hotspot probes originate in the VM library (libjvm.so), so they are -also provided from programs which embed the VM. - -Many of the probes in the provider have arguments that can be examined to -provide further details on the state of the VM. Many of these probes' -arguments are opaque IDs which can be used to link probe firings to each -other, however strings and other data are also provided. When string values -are provided, they are always present as a pair: a pointer to unterminated -modified UTF-8 data (see JVM spec: 4.4.7) , and a length value which -indicates the extent of that data. Because the string data (even when none -of the characters are outside the ASCII range) is not guaranteed to be -terminated by a NULL character, it is necessary to use the length-terminated -copyinstr() intrinsic to read the string data from the process. - -You can find more information about HotSpot probes here: -http://java.sun.com/javase/6/docs/technotes/guides/vm/dtrace.html - - -=========== -THE SCRIPTS -=========== - -The following scripts/samples which demonstrate 'hotspot' probes usage are -available: - -- class_loading_stat.d - The script collects statistics about loaded and unloaded Java classes and - dump current state to stdout every N seconds. - -- gc_time_stat.d - The script measures the duration of a time spent in GC. - The duration is measured for every memory pool every N seconds. - -- hotspot_calls_tree.d - The script prints calls tree of fired 'hotspot' probes. - -- method_compile_stat.d - The script prints statistics about N methods with largest/smallest - compilation time every M seconds. - -- method_invocation_stat.d - The script collects statistics about Java method invocations. - -- method_invocation_stat_filter.d - The script collects statistics about Java method invocations. - You can specify package, class or method name to trace. - -- method_invocation_tree.d - The script prints tree of Java and JNI method invocations. - -- monitors.d - The script traces monitor related probes. - -- object_allocation_stat.d - The script collects statistics about N object allocations every M seconds. - - -========== -HOW TO RUN -========== - -To run any D script from hotspot directory you can do either: - - # dscript.d -c "java ..." - - or if you don't have Solaris 10 patch which allows to specify probes that - don't yet exist ( Hotspot DTrace probes are defined in libjvm.so and as - result they could be not been yet loaded when you try to attach D script to - the Java process) do: - - # ../helpers/dtrace_helper.d -c "java ..." dscript.d - - or if your application is already running you can just simply attach - the D script like: - - # dscript.d -p JAVA_PID diff --git a/jdk/src/sample/solaris/dtrace/hotspot/class_loading_stat.d b/jdk/src/sample/solaris/dtrace/hotspot/class_loading_stat.d deleted file mode 100644 index 71976208af6..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot/class_loading_stat.d +++ /dev/null @@ -1,157 +0,0 @@ -#!/usr/sbin/dtrace -Zs -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. class_loading_stat.d -c "java ..." INTERVAL_SECS - * 2. class_loading_stat.d -p JAVA_PID INTERVAL_SECS - * - * This script collects statistics about loaded and unloaded Java classes - * and dump current state to stdout every INTERVAL_SECS seconds. If - * INTERVAL_SECS is not set then 10 seconds interval is used. - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option aggrate=100ms - - -self char *str_ptr; -self string class_name; -self string package_name; - -int INTERVAL_SECS; - -:::BEGIN -{ - SAMPLE_NAME = "hotspot class loadin tracing"; - - INTERVAL_SECS = $1 ? $1 : 10; - SAMPLING_TIME = timestamp + INTERVAL_SECS * 1000000000ull; - - LOADED_CLASSES_CNT = 0; - UNLOADED_CLASSES_CNT = 0; - - LINE_SEP = - "------------------------------------------------------------------------"; - - printf("BEGIN %s\n\n", SAMPLE_NAME); -} - -/* - * hotspot:::class-loaded, hotspot:::class-unloaded probe arguments: - * arg0: char*, class name passed as mUTF8 string - * arg1: uintptr_t, class name length - * arg2: void*, class loader ID, which is unique identifier for - * a class loader in the VM. - * arg3: uintptr_t, class is shared or not - */ -hotspot$target:::class-loaded -{ - LOADED_CLASSES_CNT ++; - - self->str_ptr = (char*) copyin(arg0, arg1+1); - self->str_ptr[arg1] = '\0'; - self->class_name = (string) self->str_ptr; - - self->package_name = dirname(self->class_name); - - @classes_loaded[self->package_name] = count(); -} - -hotspot$target:::class-unloaded -{ - UNLOADED_CLASSES_CNT ++; - - self->str_ptr = (char*) copyin(arg0, arg1+1); - self->str_ptr[arg1] = '\0'; - self->class_name = (string) self->str_ptr; - - self->package_name = dirname(self->class_name); - - @classes_unloaded[self->package_name] = count(); -} - - -tick-1sec -/timestamp > SAMPLING_TIME/ -{ - printf("%s\n", LINE_SEP); - printf("%Y\n", walltimestamp); - printf("%s\n", LINE_SEP); - - printf("Loaded classes by package:\n"); - printa("%10@d %s\n", @classes_loaded); - - printf("\n"); - printf("Unloaded classes by package:\n"); - printa("%10@d %s\n", @classes_unloaded); - - printf("\n"); - printf("Number of loaded classes: %10d\n", LOADED_CLASSES_CNT); - printf("Number of unloaded classes: %10d\n", UNLOADED_CLASSES_CNT); - - SAMPLING_TIME = timestamp + INTERVAL_SECS * 1000000000ull; -} - - -:::END -{ - printf("%s\n", LINE_SEP); - printf("%Y\n", walltimestamp); - printf("%s\n", LINE_SEP); - - printf("Loaded classes by package:\n"); - printa("%10@d %s\n", @classes_loaded); - - printf("\n"); - printf("Unloaded classes by package:\n"); - printa("%10@d %s\n", @classes_unloaded); - - printf("\n"); - printf("Number of loaded classes: %10d\n", LOADED_CLASSES_CNT); - printf("Number of unloaded classes: %10d\n", UNLOADED_CLASSES_CNT); - - printf("\nEND of %s\n", SAMPLE_NAME); -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot/gc_time_stat.d b/jdk/src/sample/solaris/dtrace/hotspot/gc_time_stat.d deleted file mode 100644 index eb6f8665608..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot/gc_time_stat.d +++ /dev/null @@ -1,203 +0,0 @@ -#!/usr/sbin/dtrace -Zs -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. gc_time_stat.d -c "java ..." INTERVAL_SECS - * 2. gc_time_stat.d -p JAVA_PID INTERVAL_SECS - * - * This script measures the duration of a time spent in GC. The duration is - * measured for every memory pool every INTERVAL_SECS seconds. If - * INTERVAL_SECS is not set then 10 seconds interval is used. - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option aggrate=100ms - - -string TEST_NAME; -self char *str_ptr; -self string mgr_name; -self string pool_name; - -int INTERVAL_SECS; - -:::BEGIN -{ - SAMPLE_NAME = "hotspot GC tracing"; - - START_TIME = timestamp; - gc_total_time = 0; - gc_total_count = 0; - - INTERVAL_SECS = $1 ? $1 : 10; - SAMPLING_TIME = timestamp + INTERVAL_SECS * 1000000000ull; - - LINE_SEP = "--------------------------------------------------------"; - - printf("BEGIN %s\n\n", SAMPLE_NAME); -} - - -/* - * hotspot:::gc-begin - * arg0: uintptr_t, boolean value which indicates - * if this is to be a full GC or not - */ -hotspot$target:::gc-begin -{ - self->gc_ts = timestamp; - printf("\nGC started: %Y\n", walltimestamp); - printf("%20s | %-20s | %10s\n", "manager", "pool", "time (ms)"); - printf(" %s\n", LINE_SEP); -} - -hotspot$target:::gc-end -/self->gc_ts/ -{ - self->time = (timestamp - self->gc_ts) / 1000; - - printf(" %s\n", LINE_SEP); - printf(" %40s | %10d\n", "GC total", self->time); - - gc_total_time += self->time; - gc_total_count ++; - self->gc_ts = 0; -} - -/* - * hotspot:::mem-pool-gc-begin, hotspot:::mem-pool-gc-end - * arg0: char*, a pointer to mUTF-8 string data which contains the name - * of the manager which manages this memory pool - * arg1: uintptr_t, the length of the manager name (in bytes - * arg2: char*, a pointer to mUTF-8 string data which contains the name - * of the memory pool - * arg3: uintptr_t, the length of the memory pool name (in bytes) - * arg4: uintptr_t, the initial size of the memory pool (in bytes) - * arg5: uintptr_t, the amount of memory in use in the memory pool - * (in bytes) - * arg6: uintptr_t, the number of committed pages in the memory pool - * arg7: uintptr_t, the maximum size of the memory pool - */ -hotspot$target:::mem-pool-gc-begin -{ - self->str_ptr = (char*) copyin(arg0, arg1+1); - self->str_ptr[arg1] = '\0'; - self->mgr_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg2, arg3+1); - self->str_ptr[arg3] = '\0'; - self->pool_name = (string) self->str_ptr; - - self->mem_pool_ts[self->mgr_name, self->pool_name] = timestamp; -} - -hotspot$target:::mem-pool-gc-end -{ - self->str_ptr = (char*) copyin(arg0, arg1+1); - self->str_ptr[arg1] = '\0'; - self->mgr_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg2, arg3+1); - self->str_ptr[arg3] = '\0'; - self->pool_name = (string) self->str_ptr; - - self->time = - (timestamp - self->mem_pool_ts[self->mgr_name, self->pool_name]) / 1000; - - printf( - "%20s | %-20s | %10d\n", self->mgr_name, self->pool_name, self->time); - - @mem_pool_total_time[self->mgr_name, self->pool_name] = sum(self->time); - self->mem_pool_ts[self->mgr_name, self->pool_name] = 0; - - @mem_pool_count[self->mgr_name, self->pool_name] = count(); -} - -tick-1sec -/timestamp > SAMPLING_TIME/ -{ - trace_time = (timestamp - START_TIME) / 1000; - - printf(" %s\n", LINE_SEP); - printf("\nGC statistics, time: %Y\n\n", walltimestamp); - printf("%20s | %-20s | %10s\n", "manager", "pool", "total time"); - printf(" %s\n", LINE_SEP); - printa("%20s | %-20s | %10@d\n", @mem_pool_total_time); - printf(" %s\n", LINE_SEP); - printf(" %40s | %10d\n", "total", gc_total_time); - - printf("\n"); - printf("%20s | %-20s | %10s\n", "manager", "pool", "# of calls"); - printf(" %s\n", LINE_SEP); - printa("%20s | %-20s | %10@d\n", @mem_pool_count); - printf(" %s\n", LINE_SEP); - printf(" %40s | %10d\n", "total", gc_total_count); - - SAMPLING_TIME = timestamp + INTERVAL_SECS * 1000000000ull; -} - -:::END -{ - trace_time = (timestamp - START_TIME) / 1000; - - printf(" %s\n", LINE_SEP); - printf("\nGC statistics, time: %Y\n\n", walltimestamp); - printf("%20s | %-20s | %10s\n", "manager", "pool", "total time"); - printf(" %s\n", LINE_SEP); - printa("%20s | %-20s | %10@d\n", @mem_pool_total_time); - printf(" %s\n", LINE_SEP); - printf(" %40s | %10d\n", "total", gc_total_time); - - printf("\n"); - printf("%20s | %-20s | %10s\n", "manager", "pool", "# of calls"); - printf(" %s\n", LINE_SEP); - printa("%20s | %-20s | %10@d\n", @mem_pool_count); - printf(" %s\n", LINE_SEP); - printf(" %40s | %10d\n", "total", gc_total_count); - - - printf("\nEND of %s\n", SAMPLE_NAME); -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot/hotspot_calls_tree.d b/jdk/src/sample/solaris/dtrace/hotspot/hotspot_calls_tree.d deleted file mode 100644 index a5af496b45b..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot/hotspot_calls_tree.d +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/sbin/dtrace -Zs -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. hotspot_calls_tree.d -c "java ..." - * 2. hotspot_calls_tree.d -p JAVA_PID - * - * This script prints calls tree of fired 'hotspot' probes. - * - * Notes: - * The script uses 'monitors' probes which are disabled by default since - * it incurs performance overhead to the application. To enable them, you - * need to turn on the ExtendedDTraceProbes VM option. You can either - * start the application with -XX:+ExtendedDTraceProbes option or use the - * jinfo command to enable it at runtime as follows: - * - * jinfo -flag +ExtendedDTraceProbes - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option aggrate=100ms - -self int indent; -string PAUSE_AT_STARTUP_FILE; - -:::BEGIN -{ - SAMPLE_NAME = "hotspot probes tracing"; - - printf("BEGIN %s\n\n", SAMPLE_NAME); - - self->indent = 10; -} - -hotspot$target:::class-loaded, -hotspot$target:::class-unloaded, -hotspot$target:::compiled-method-load, -hotspot$target:::compiled-method-unload, -hotspot$target:::monitor-notify, -hotspot$target:::monitor-notifyAll -{ - printf("%d %*s <-> %s\n", curcpu->cpu_id, self->indent, "", probename); -} - -hotspot$target:::vm-init-begin, -hotspot$target:::gc-begin, -hotspot$target:::mem-pool-gc-begin, -hotspot$target:::thread-start, -hotspot$target:::method-compile-begin, -hotspot$target:::monitor-contended-enter, -hotspot$target:::monitor-wait -{ - self->indent ++; - printf("%d %*s -> %s\n", curcpu->cpu_id, self->indent, "", probename); -} - -hotspot$target:::vm-init-end, -hotspot$target:::vm-shutdown, -hotspot$target:::gc-end, -hotspot$target:::mem-pool-gc-end, -hotspot$target:::thread-stop, -hotspot$target:::method-compile-end, -hotspot$target:::monitor-contended-entered, -hotspot$target:::monitor-contended-exit, -hotspot$target:::monitor-waited -{ - printf("%d %*s <- %s\n", curcpu->cpu_id, self->indent, "", probename); - self->indent --; -} - -:::END -{ - printf("\nEND of %s\n", SAMPLE_NAME); -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot/method_compile_stat.d b/jdk/src/sample/solaris/dtrace/hotspot/method_compile_stat.d deleted file mode 100644 index 0d3812e17bf..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot/method_compile_stat.d +++ /dev/null @@ -1,274 +0,0 @@ -#!/usr/sbin/dtrace -Zs -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. method_compile_stat.d -c "java ..." TOP_RESULTS_COUNT INTERVAL_SECS - * 2. method_compile_stat.d -p JAVA_PID TOP_RESULTS_COUNT INTERVAL_SECS - * - * This script prints statistics about TOP_RESULTS_COUNT (default is 25) - * methods with largest/smallest compilation time every INTERVAL_SECS - * (default is 60) seconds. - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option aggrate=100ms - - -self char *str_ptr; -self string class_name; -self string method_name; -self string signature; - -int INTERVAL_SECS; - -:::BEGIN -{ - SAMPLE_NAME = "hotspot methods compilation tracing"; - - TOP_RESULTS_COUNT = $1 ? $1 : 25; - INTERVAL_SECS = $2 ? $2 : 60; - - COMPILED_METHODS_COUNT = 0; - LOADED_METHODS_CNT = 0; - UNLOADED_METHODS_CNT = 0; - - SAMPLING_TIME = timestamp + INTERVAL_SECS * 1000000000ull; - - LINE_SEP = - "------------------------------------------------------------------------"; - - printf("BEGIN %s\n\n", SAMPLE_NAME); -} - -/* - * hotspot:::method-compile-begin - * arg0: char*, a pointer to mUTF-8 string containing the name of - * the compiler - * arg1: uintptr_t, the length of the compiler name (in bytes) - * arg2: char*, a pointer to mUTF-8 string containing the class name of - * the method being compiled - * arg3: uintptr_t, the length of the class name (in bytes) - * arg4: char*, a pointer to mUTF-8 string containing the method name of - * the method being compiled - * arg5: uintptr_t, the length of the method name (in bytes) - * arg6: char*, a pointer to mUTF-8 string containing the signature of - * the method being compiled - * arg7: uintptr_t, the length of the signature(in bytes) - */ -hotspot$target:::method-compile-begin -{ - /*compiler_name, len, class_name, len, method_name, len, signature, len*/ - - self->str_ptr = (char*) copyin(arg0, arg1+1); - self->str_ptr[arg1] = '\0'; - compiler_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg2, arg3+1); - self->str_ptr[arg3] = '\0'; - self->class_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg4, arg5+1); - self->str_ptr[arg5] = '\0'; - self->method_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg6, arg7+1); - self->str_ptr[arg7] = '\0'; - self->signature = (string) self->str_ptr; - - self->ts[self->class_name, self->method_name, self->signature] = timestamp; -} - -/* - * hotspot:::method-compile-end - * arg0: char*, a pointer to mUTF-8 string containing the name of - * the compiler - * arg1: uintptr_t, the length of the compiler name (in bytes) - * arg2: char*, a pointer to mUTF-8 string containing the class name of - * the method being compiled - * arg3: uintptr_t, the length of the class name (in bytes) - * arg4: char*, a pointer to mUTF-8 string containing the method name of - * the method being compiled - * arg5: uintptr_t, the length of the method name (in bytes) - * arg6: char*, a pointer to mUTF-8 string containing the signature of - * the method being compiled - * arg7: uintptr_t, the length of the signature(in bytes) - * arg8: uintptr_t, boolean value which indicates if method - * has been compiled successfuly - */ -hotspot$target:::method-compile-end -{ - /* compiler_name, len, class_name, len, method_name, len, - signature, len, isSuccess */ - - self->str_ptr = (char*) copyin(arg0, arg1+1); - self->str_ptr[arg1] = '\0'; - compiler_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg2, arg3+1); - self->str_ptr[arg3] = '\0'; - self->class_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg4, arg5+1); - self->str_ptr[arg5] = '\0'; - self->method_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg6, arg7+1); - self->str_ptr[arg7] = '\0'; - self->signature = (string) self->str_ptr; -} - -/* - * Method was successfuly compiled - */ -hotspot$target:::method-compile-end -/arg8 && self->ts[self->class_name, self->method_name, self->signature]/ -{ - /* compiler_name, len, class_name, len, method_name, len, - signature, len, isSuccess */ - - COMPILED_METHODS_COUNT++; - - @compile_time_top[self->class_name, self->method_name, self->signature] = - avg((timestamp - - self->ts[self->class_name, self->method_name, self->signature]) / 1000); - - @compile_time_last[self->class_name, self->method_name, self->signature] = - avg((timestamp - - self->ts[self->class_name, self->method_name, self->signature]) / 1000); - - self->ts[self->class_name, self->method_name, self->signature] = 0; -} - -/* - * Method compilation was failed - */ -hotspot$target:::method-compile-end -/arg8 != 1 && self->ts[self->class_name, self->method_name, self->signature]/ -{ - /* compiler_name, len, class_name, len, method_name, len, - signature, len, isSuccess */ - - @fail_compile_count[self->class_name, - self->method_name, self->signature] = count(); -} - -hotspot$target:::compiled-method-load -{ - /* class_name, len, method_name, len, signature, len, code_address, size */ - - LOADED_METHODS_CNT ++; -} - -hotspot$target:::compiled-method-unload -{ - /* class_name, len, method_name, len, signature, len, code_address, size */ - - UNLOADED_METHODS_CNT ++; -} - - -tick-1sec -/timestamp > SAMPLING_TIME/ -{ - trunc(@compile_time_top, TOP_RESULTS_COUNT); - trunc(@compile_time_last, -TOP_RESULTS_COUNT); - - printf("\n"); - printf("%s\n", LINE_SEP); - printf("%Y\n", walltimestamp); - printf("%s\n", LINE_SEP); - - printf( - "\nTop %d methods with largest compilation time (in milleseconds):\n", - TOP_RESULTS_COUNT); - printa("%10@d %s::%s%s\n", @compile_time_top); - - printf( - "\nTop %d methods with smallest compilation time (in milleseconds):\n", - TOP_RESULTS_COUNT); - printa("%10@d %s::%s%s\n", @compile_time_last); - - printf("\n"); - printf("Compiled methods: %10d\n", COMPILED_METHODS_COUNT); - printf("Loaded compiled methods: %10d\n", LOADED_METHODS_CNT); - printf("Unoaded compiled methods: %10d\n", UNLOADED_METHODS_CNT); - - printf("\nFailed compilation:\n"); - printa("%10@d %s::%s%s\n", @fail_compile_count); - - SAMPLING_TIME = timestamp + INTERVAL_SECS * 1000000000ull; -} - -:::END -{ - trunc(@compile_time_top, TOP_RESULTS_COUNT); - trunc(@compile_time_last, -TOP_RESULTS_COUNT); - - printf("\n"); - printf("%s\n", LINE_SEP); - printf("%Y\n", walltimestamp); - printf("%s\n", LINE_SEP); - - printf( - "\nTop %d methods with largest compilation time (in milleseconds):\n", - TOP_RESULTS_COUNT); - printa("%10@d %s::%s%s\n", @compile_time_top); - - printf( - "\nTop %d methods with smallest compilation time (in milleseconds):\n", - TOP_RESULTS_COUNT); - printa("%10@d %s::%s%s\n", @compile_time_last); - - printf("\n"); - printf("Compiled methods: %10d\n", COMPILED_METHODS_COUNT); - printf("Loaded compiled methods: %10d\n", LOADED_METHODS_CNT); - printf("Unoaded compiled methods: %10d\n", UNLOADED_METHODS_CNT); - - printf("\nFailed compilations:\n"); - printa("%10@d %s::%s%s\n", @fail_compile_count); - - printf("\nEND of %s\n", SAMPLE_NAME); -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot/method_invocation_stat.d b/jdk/src/sample/solaris/dtrace/hotspot/method_invocation_stat.d deleted file mode 100644 index 1b64b8b9c90..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot/method_invocation_stat.d +++ /dev/null @@ -1,210 +0,0 @@ -#!/usr/sbin/dtrace -Zs -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. method_invocation_stat.d -c "java ..." - * 2. method_invocation_stat.d -p JAVA_PID - * - * This script collects statistics about Java method invocations. - * - * Notes: - * - These probes are disabled by default since it incurs performance - * overhead to the application. To trace the method-entry and - * method-exit probes, you need to turn on the ExtendedDTraceProbes VM - * option. - * You can either start the application with -XX:+ExtendedDTraceProbes - * option or use the jinfo command to enable it at runtime as follows: - * - * jinfo -flag +ExtendedDTraceProbes - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option bufsize=16m -#pragma D option aggrate=100ms - - -self char *str_ptr; -self string class_name; -self string method_name; -self string signature; -self string package_name; -self string last_class_name; - -long long JAVA_CALLS; -long long JNI_CALLS; -long long SYS_CALLS; - -int SYS_DEEP; -long long LAST_SYS_TS; - -long long START_TIME; -long long JAVA_TIME; -long long RUN_TIME; -long long SYS_TIME; - -BEGIN -{ - SAMPLE_NAME = "hotspot method invocation tracing"; - - START_TIME = timestamp; - SYS_TIME = 0; - - printf("BEGIN %s\n\n", SAMPLE_NAME); -} - -/* - * hotspot:::method-entry, hotspot:::method-return probe arguments: - * arg0: uintptr_t, Java thread id - * arg1: char*, a pointer to mUTF-8 string containing the name of - * the class of the method being entered - * arg2: uintptr_t, the length of the class name (in bytes) - * arg3: char*, a pointer to mUTF-8 string data which contains the - * name of the method being entered - * arg4: uintptr_t, the length of the method name (in bytes) - * arg5: char*, a pointer to mUTF-8 string data which contains the - * signature of the method being entered - * arg6: uintptr_t, the length of the signature(in bytes) - */ -hotspot$target:::method-entry -{ - self->str_ptr = (char*) copyin(arg1, arg2+1); - self->str_ptr[arg2] = '\0'; - self->class_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg3, arg4+1); - self->str_ptr[arg4] = '\0'; - self->method_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg5, arg6+1); - self->str_ptr[arg6] = '\0'; - self->signature = (string) self->str_ptr; - - - self->package_name = dirname(self->class_name); - - JAVA_CALLS ++; - @method_calls[self->class_name, - self->method_name, self->signature] = count(); - @class_calls[self->class_name] = count(); - @package_calls[self->package_name] = count(); -} - - -hotspot_jni$target:::*-entry -{ - JNI_CALLS ++; - - @jni_calls[probename] = count(); -} - -syscall:::entry -/pid == $target && SYS_DEEP == 0/ -{ - LAST_SYS_TS = timestamp; -} - -syscall:::entry -/pid == $target/ -{ - SYS_DEEP ++; - @sys_calls[probefunc] = count(); - SYS_CALLS ++; -} - -syscall:::return -/pid == $target/ -{ - SYS_DEEP --; -} - -syscall:::return -/pid == $target && SYS_DEEP == 0/ -{ - SYS_TIME += (timestamp - LAST_SYS_TS); -} - - -:::END -{ - RUN_TIME = (timestamp - START_TIME); - JAVA_TIME = (RUN_TIME - SYS_TIME); - - printf("System calls:\n"); - printa("%10@d %s\n", @sys_calls); - printf("\n"); - - printf("JNI calls:\n"); - printa("%10@d %s\n", @jni_calls); - printf("\n"); - - printf("Top packages calls:\n"); - printa("%10@d %s\n", @package_calls); - printf("\n"); - - printf("Top class calls:\n"); - printa("%10@d %s\n", @class_calls); - printf("\n"); - - printf("Top method calls:\n"); - printa("%10@d %s:%s:%s\n", @method_calls); - printf("\n"); - - printf("=======================================\n"); - printf("JAVA_CALLS: %10d\n", JAVA_CALLS); - printf(" JNI_CALLS: %10d\n", JNI_CALLS); - printf(" SYS_CALLS: %10d\n", SYS_CALLS); - printf("\n"); - - printf("Run time: %15d\n", RUN_TIME); - printf("Syscall time: %15d\n", SYS_TIME); - printf("Java+JNI time: %15d\n", JAVA_TIME); - printf("\n"); -} - -:::END -{ - printf("\nEND %s\n", SAMPLE_NAME); -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot/method_invocation_stat_filter.d b/jdk/src/sample/solaris/dtrace/hotspot/method_invocation_stat_filter.d deleted file mode 100644 index a36d3656bd7..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot/method_invocation_stat_filter.d +++ /dev/null @@ -1,204 +0,0 @@ -#!/usr/sbin/dtrace -Zs - -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. method_invocation_stat_filter.d -c "java ..." p|c|m package|class_name|method_name - * 2. method_invocation_stat_filter.d -p JAVA_PID p|c|m package|class_name|method_name - * - * example: - * method_invocation_stat_filter.d -c "java -version" '"p"' '"sun/util"' - * - * This script collects statistics about Java method invocations. - * - * Notes: - * - These probes are disabled by default since it incurs performance - * overhead to the application. To trace the method-entry and - * method-exit probes, you need to turn on the ExtendedDTraceProbes VM - * option. - * You can either start the application with -XX:+ExtendedDTraceProbes - * option or use the jinfo command to enable it at runtime as follows: - * - * jinfo -flag +ExtendedDTraceProbes - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option bufsize=16m -#pragma D option aggrate=100ms - - -self char *str_ptr; -self string class_name; -self string method_name; -self string signature; -self string package_name; -self string last_class_name; - -long long JAVA_CALLS; - -long long START_TIME; -long long JAVA_TIME; -long long RUN_TIME; - -string FILTER_TYPE; -string FILTER_VALUE; - - -:::BEGIN -{ - SAMPLE_NAME = "hotspot method invocation tracing"; - - START_TIME = timestamp; - - FILTER_TYPE = $1; - FILTER_VALUE = $2; - - START_TIME = timestamp; - - printf("BEGIN %s\n\n", SAMPLE_NAME); -} - -/* - * hotspot:::method-entry, hotspot:::method-return probe arguments: - * arg0: uintptr_t, Java thread id - * arg1: char*, a pointer to mUTF-8 string containing the name of - * the class of the method being entered - * arg2: uintptr_t, the length of the class name (in bytes) - * arg3: char*, a pointer to mUTF-8 string data which contains the - * name of the method being entered - * arg4: uintptr_t, the length of the method name (in bytes) - * arg5: char*, a pointer to mUTF-8 string data which contains the - * signature of the method being entered - * arg6: uintptr_t, the length of the signature(in bytes) - */ -hotspot$target:::method-entry -{ - self->str_ptr = (char*) copyin(arg1, arg2+1); - self->str_ptr[arg2] = '\0'; - self->class_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg3, arg4+1); - self->str_ptr[arg4] = '\0'; - self->method_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg5, arg6+1); - self->str_ptr[arg6] = '\0'; - self->signature = (string) self->str_ptr; - - - self->package_name = dirname(self->class_name); -} - -hotspot$target:::method-entry -/FILTER_TYPE == ""/ -{ - JAVA_CALLS ++; - @method_calls[self->class_name, - self->method_name, self->signature] = count(); - @class_calls[self->class_name] = count(); - @package_calls[self->package_name] = count(); -} - -hotspot$target:::method-entry -/FILTER_TYPE == "p" && self->package_name == FILTER_VALUE/ -{ - JAVA_CALLS ++; - @method_calls[self->class_name, - self->method_name, self->signature] = count(); - @class_calls[self->class_name] = count(); - @package_calls[self->package_name] = count(); -} - -hotspot$target:::method-entry -/FILTER_TYPE == "c" && self->class_name == FILTER_VALUE/ -{ - JAVA_CALLS ++; - @method_calls[self->class_name, - self->method_name, self->signature] = count(); - @class_calls[self->class_name] = count(); - @package_calls[self->package_name] = count(); -} - -hotspot$target:::method-entry -/FILTER_TYPE == "m" && self->method_name == FILTER_VALUE/ -{ - JAVA_CALLS ++; - @method_calls[self->class_name, - self->method_name, self->signature] = count(); - @class_calls[self->class_name] = count(); - @package_calls[self->package_name] = count(); -} - - -:::END -{ - RUN_TIME = (timestamp - START_TIME); - JAVA_TIME = RUN_TIME; - - printf("Top packages calls:\n"); - printa("%10@d %s\n", @package_calls); - printf("\n"); - - printf("Top class calls:\n"); - printa("%10@d %s\n", @class_calls); - printf("\n"); - - printf("Top method calls:\n"); - printa("%10@d %s:%s:%s\n", @method_calls); - printf("\n"); - - printf("=======================================\n"); - printf("JAVA_CALLS: %10d\n", JAVA_CALLS); - printf("\n"); - - printf("Run time: %15d\n", RUN_TIME); - printf("\n"); -} - -:::END -{ - printf("\nEND of %s\n", SAMPLE_NAME); -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot/method_invocation_tree.d b/jdk/src/sample/solaris/dtrace/hotspot/method_invocation_tree.d deleted file mode 100644 index d27fe2729f5..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot/method_invocation_tree.d +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/sbin/dtrace -Zs -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. method_invocation_tree.d -c "java ..." - * 2. method_invocation_tree.d -p JAVA_PID - * - * This script prints tree of Java and JNI method invocations. - * - * Notes: - * - These probes are disabled by default since it incurs performance - * overhead to the application. To trace the method-entry and - * method-exit probes, you need to turn on the ExtendedDTraceProbes VM - * option. - * You can either start the application with -XX:+ExtendedDTraceProbes - * option or use the jinfo command to enable it at runtime as follows: - * - * jinfo -flag +ExtendedDTraceProbes - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option bufsize=16m -#pragma D option aggrate=100ms - -self char *str_ptr; -self string class_name; -self string method_name; -self string signature; - -self int indent; - -BEGIN -{ - SAMPLE_NAME = "hotspot method invocation tracing"; - - printf("BEGIN %s\n\n", SAMPLE_NAME); -} - -hotspot$target:::* -/!self->indent/ -{ - self->indent = 0; -} - -/* - * hotspot:::method-entry, hotspot:::method-return probe arguments: - * arg0: uintptr_t, Java thread id - * arg1: char*, a pointer to mUTF-8 string containing the name of - * the class of the method being entered - * arg2: uintptr_t, the length of the class name (in bytes) - * arg3: char*, a pointer to mUTF-8 string data which contains the - * name of the method being entered - * arg4: uintptr_t, the length of the method name (in bytes) - * arg5: char*, a pointer to mUTF-8 string data which contains the - * signature of the method being entered - * arg6: uintptr_t, the length of the signature(in bytes) - */ - -hotspot$target:::method-return -{ - self->indent --; - METHOD_RETURN_CNT ++ -} - -hotspot$target:::method-entry -{ - self->indent ++; - METHOD_ENTRY_CNT ++; - - self->str_ptr = (char*) copyin(arg1, arg2+1); - self->str_ptr[arg2] = '\0'; - self->class_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg3, arg4+1); - self->str_ptr[arg4] = '\0'; - self->method_name = (string) self->str_ptr; - - self->str_ptr = (char*) copyin(arg5, arg6+1); - self->str_ptr[arg6] = '\0'; - self->signature = (string) self->str_ptr; - - printf("%-10u%*s%s:%s:%s\n", - tid, self->indent, "", self->class_name, - self->method_name, self->signature); - -} - -hotspot_jni$target:::*_entry -{ - printf("%-10u%*sJNI:%s\n", tid, self->indent+1, "", probename); -} - -:::END -{ - printf("METHOD_ENTRY_CNT: %10d\n", METHOD_ENTRY_CNT); - printf("METHOD_RETURN_CNT: %10d\n", METHOD_RETURN_CNT); - - printf("\nEND of %s\n", SAMPLE_NAME); -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot/monitors.d b/jdk/src/sample/solaris/dtrace/hotspot/monitors.d deleted file mode 100644 index fba030e8791..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot/monitors.d +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/sbin/dtrace -Zs -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. monitors.d -c "java ..." - * 2. monitors.d -p JAVA_PID - * - * The script traces monitor related probes. - * - * Notes: - * - These probes are disabled by default since it incurs performance - * overhead to the application. To trace the monitor-* probes, you need - * to turn on the ExtendedDTraceProbes VM option. - * You can either start the application with -XX:+ExtendedDTraceProbes - * option or use the jinfo command to enable it at runtime as follows: - * - * jinfo -flag +ExtendedDTraceProbes - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option aggrate=100ms - - -self string thread_name; -self char* str_ptr; - -:::BEGIN -{ - SAMPLE_NAME = "hotspot monitors tracing"; - - printf("BEGIN %s\n\n", SAMPLE_NAME); -} - -/* - * hotspot:::thread-start, hotspot:::thread-stop probe arguments: - * arg0: char*, thread name passed as mUTF8 string - * arg1: uintptr_t, thread name length - * arg2: uintptr_t, Java thread id - * arg3: uintptr_t, native/OS thread id - * arg4: uintptr_t, is a daemon or not - */ -hotspot$target:::thread-start -{ - self->str_ptr = (char*) copyin(arg0, arg1+1); - self->str_ptr[arg1] = '\0'; - self->thread_name = (string) self->str_ptr; - - printf("thread-start: id=%d, is_daemon=%d, name=%s, os_id=%d\n", - arg2, arg4, self->thread_name, arg3); - - threads[arg2] = self->thread_name; -} - - -hotspot$target:::thread-stop -{ - self->str_ptr = (char*) copyin(arg0, arg1+1); - self->str_ptr[arg1] = '\0'; - self->thread_name = (string) self->str_ptr; - - - printf("thread-stop: id=%d, is_daemon=%d, name=%s, os_id=%d\n", - arg2, arg4, self->thread_name, arg3); -} - -/* - * - * hotspot::monitor-contended-enter, hotspot::monitor-contended-entered - * - * arg0: uintptr_t, the Java thread identifier for the thread peforming - * the monitor operation - * arg1: uintptr_t, a unique, but opaque identifier for the specific - * monitor that the action is performed upon - * arg2: char*, a pointer to mUTF-8 string data which contains the - * name of the class of the object being acted upon - * arg3: uintptr_t, the length of the class name (in bytes) - */ - -hotspot$target:::monitor-contended-enter -{ - /* (uintptr_t thread_id, uintptr_t monitor_id, - char* obj_class_name, uintptr_t obj_class_name_len) */ - - self->str_ptr = (char*) copyin(arg2, arg3+1); - self->str_ptr[arg3] = '\0'; - self->class_name = (string) self->str_ptr; - - monitors[arg1] = self->class_name; - - monitors_enter[arg1] = arg0; - printf("%s: -> enter monitor (%d) %s\n", - threads[arg0], arg1, monitors[arg1]); -} - -hotspot$target:::monitor-contended-entered -{ - /* (uintptr_t thread_id, uintptr_t monitor_id, char* obj_class_name, - uintptr_t obj_class_name_len) */ - - monitors_entered[arg1] = arg0; - printf("%s: <- entered monitor (%d) %s\n", - threads[arg0], arg1, monitors[arg1]); -} - - -:::END -{ - printf("\nEND of %s\n", SAMPLE_NAME); -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot/object_allocation_stat.d b/jdk/src/sample/solaris/dtrace/hotspot/object_allocation_stat.d deleted file mode 100644 index bfb8981a6ab..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot/object_allocation_stat.d +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/sbin/dtrace -Zs - -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. object_allocation_stat.d -c "java ..." TOP_RESULTS_COUNT INTERVAL_SECS - * 2. object_allocation_stat.d -p JAVA_PID TOP_RESULTS_COUNT INTERVAL_SECS - * - * This script collects statistics about TOP_RESULTS_COUNT (default is 25) - * object allocations every INTERVAL_SECS (default is 60) seconds. - * - * The results are displayed in ascending order which means that the highest - * allocated type is listed last. The script can be improved to sort the - * results in reverse order when DTrace supports it. - * - * Notes: - * - The object-alloc probe is disabled by default since it incurs - * performance overhead to the application. To trace object-alloc probe, - * you need to turn on the ExtendedDTraceProbes VM option. - * You can either start the application with -XX:+ExtendedDTraceProbes - * option or use the jinfo command to enable it at runtime as follows: - * - * jinfo -flag +ExtendedDTraceProbes - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option bufsize=16m -#pragma D option aggrate=100ms - - -self char *str_ptr; -self string class_name; - -long long ALLOCATED_OBJECTS_CNT; - -int INTERVAL_SECS; - -:::BEGIN -{ - SAMPLE_NAME = "hotspot object allocation tracing"; - - TOP_RESULTS_COUNT = $1 ? $1 : 25; - INTERVAL_SECS = $2 ? $2 : 60; - - ALLOCATED_OBJECTS_CNT = 0; - - SAMPLING_TIME = timestamp + INTERVAL_SECS * 1000000000ull; - - LINE_SEP = - "------------------------------------------------------------------------"; - - printf("BEGIN %s\n\n", SAMPLE_NAME); -} - -/* - * hotspot:::object-alloc probe arguments: - * arg0: uintptr_t, Java thread id - * arg1: char*, a pointer to mUTF-8 string containing the name of - * the class of the object being allocated - * arg2: uintptr_t, the length of the class name (in bytes) - * arg3: uintptr_t, the size of the object being allocated - */ -hotspot$target:::object-alloc -{ - ALLOCATED_OBJECTS_CNT ++; - - self->str_ptr = (char*) copyin(arg1, arg2+1); - self->str_ptr[arg2] = '\0'; - self->class_name = (string) self->str_ptr; - - - @allocs_count[self->class_name] = count(); - @allocs_size[self->class_name] = sum(arg3); -} - -tick-1sec -/timestamp > SAMPLING_TIME/ -{ - printf("\n"); - printf("%s\n", LINE_SEP); - printf("%Y\n", walltimestamp); - printf("%s\n", LINE_SEP); - - printf("\n"); - printf("Top %d allocations by size:\n", TOP_RESULTS_COUNT); - trunc(@allocs_size, TOP_RESULTS_COUNT); - printa("%10@d %s\n", @allocs_size); - - printf("\n"); - printf("Top %d allocations by count:\n", TOP_RESULTS_COUNT); - trunc(@allocs_count, TOP_RESULTS_COUNT); - printa("%10@d %s\n", @allocs_count); - - printf("\nTotal number of allocated objects: %d\n", ALLOCATED_OBJECTS_CNT); - - SAMPLING_TIME = timestamp + INTERVAL_SECS * 1000000000ull; -} - -:::END -{ - printf("\n"); - printf("%s\n", LINE_SEP); - printf("%Y\n", walltimestamp); - printf("%s\n", LINE_SEP); - - printf("\n"); - printf("Top %d allocations by size:\n", TOP_RESULTS_COUNT); - trunc(@allocs_size, TOP_RESULTS_COUNT); - printa("%10@d %s\n", @allocs_size); - - printf("\n"); - printf("Top %d allocations by count:\n", TOP_RESULTS_COUNT); - trunc(@allocs_count, TOP_RESULTS_COUNT); - printa("%10@d %s\n", @allocs_count); - - printf("\nTotal number of allocated objects: %d\n", ALLOCATED_OBJECTS_CNT); - - printf("\nEND of %s\n", SAMPLE_NAME); -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot_jni/CriticalSection.d b/jdk/src/sample/solaris/dtrace/hotspot_jni/CriticalSection.d deleted file mode 100644 index 510784f7e77..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot_jni/CriticalSection.d +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/sbin/dtrace -Zs - -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. CriticalSection.d -c "java ..." - * 2. CriticalSection.d -p JAVA_PID - * - * The script inspect a JNI application for Critical Section violations. - * - * Critical section is the space between calls to JNI methods: - * - GetPrimitiveArrayCritical and ReleasePrimitiveArrayCritical; or - * - GetStringCritical and ReleaseStringCritical. - * - * Inside a critical section, native code must not call other JNI functions, - * or any system call that may cause the current thread to block and wait - * for another Java thread. (For example, the current thread must not call - * read on a stream being written by another Java thread.) - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option bufsize=16m -#pragma D option aggrate=100ms - - -self int in_critical_section; -self string critical_section_name; - -int CRITICAL_SECTION_VIOLATION_CNT; - -:::BEGIN -{ - SAMPLE_NAME = "critical section violation checks"; - - printf("BEGIN %s\n", SAMPLE_NAME); -} - -/* - * Multiple pairs of GetPrimitiveArrayCritical/ReleasePrimitiveArrayCritical, - * GetStringCritical/ReleaseStringCritical may be nested - */ -hotspot_jni$target:::*_entry -/self->in_critical_section > 0 && - probename != "GetPrimitiveArrayCritical_entry" && - probename != "GetStringCritical_entry" && - probename != "ReleasePrimitiveArrayCritical_entry" && - probename != "ReleaseStringCritical_entry" && - probename != "GetPrimitiveArrayCritical_return" && - probename != "GetStringCritical_return" && - probename != "ReleasePrimitiveArrayCritical_return" && - probename != "ReleaseStringCritical_return"/ -{ - printf("\nJNI call %s made from JNI critical region '%s'\n", - probename, self->critical_section_name); - - printf("Jstack:\n"); - jstack(50, 500); - - CRITICAL_SECTION_VIOLATION_CNT ++; -} - -syscall:::entry -/pid == $target && self->in_critical_section > 0/ -{ - printf("\nSystem call %s made in JNI critical region '%s'\n", - probefunc, self->critical_section_name); - - printf("Jstack:\n"); - jstack(50, 500); - - CRITICAL_SECTION_VIOLATION_CNT ++; -} - -hotspot_jni$target:::ReleasePrimitiveArrayCritical_entry, -hotspot_jni$target:::ReleaseStringCritical_entry -/self->in_critical_section > 0/ -{ - self->in_critical_section --; -} - -hotspot_jni$target:::GetPrimitiveArrayCritical_return -{ - self->in_critical_section ++; - self->critical_section_name = "GetPrimitiveArrayCritical"; -} - -hotspot_jni$target:::GetStringCritical_return -{ - self->in_critical_section ++; - self->critical_section_name = "GetStringCritical"; -} - - -:::END -{ - printf("%d critical section violations have been discovered\n", - CRITICAL_SECTION_VIOLATION_CNT); - - printf("\nEND of %s\n", SAMPLE_NAME); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot_jni/CriticalSection_slow.d b/jdk/src/sample/solaris/dtrace/hotspot_jni/CriticalSection_slow.d deleted file mode 100644 index a676aa3d819..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot_jni/CriticalSection_slow.d +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/sbin/dtrace -Zs - -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. CriticalSection_slow.d -c "java ..." - * 2. CriticalSection_slow.d -p JAVA_PID - * - * The script inspect a JNI application for Critical Section violations. - * - * Critical section is the space between calls to JNI methods: - * - GetPrimitiveArrayCritical and ReleasePrimitiveArrayCritical; or - * - GetStringCritical and ReleaseStringCritical. - * - * Inside a critical section, native code must not call other JNI functions, - * or any system call that may cause the current thread to block and wait - * for another Java thread. (For example, the current thread must not call - * read on a stream being written by another Java thread.) - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option bufsize=16m -#pragma D option aggrate=100ms - - -self int in_critical_section; -self string critical_section_name; - -self char *str_ptr; -self string class_name; -self string method_name; -self string signature; - -self int indent; -self int JAVA_STACK_DEEP; - -int CRITICAL_SECTION_VIOLATION_CNT; - -:::BEGIN -{ - SAMPLE_NAME = "critical section violation checks"; - - printf("BEGIN %s\n", SAMPLE_NAME); -} - -hotspot$target:::* -/!self->JAVA_STACK_DEEP/ -{ - self->JAVA_STACK_DEEP = 0; -} - - -hotspot$target:::method-return -/self->JAVA_STACK_DEEP > 0/ -{ - self->JAVA_STACK_DEEP --; -} - -hotspot$target:::method-entry -{ - self->JAVA_STACK_DEEP ++; - - self->str_ptr = (char*) copyin(arg1, arg2+1); - self->str_ptr[arg2] = '\0'; - self->method_name = strjoin( (string) self->str_ptr, ":"); - - self->str_ptr = (char*) copyin(arg3, arg4+1); - self->str_ptr[arg4] = '\0'; - self->method_name = strjoin(self->method_name, (string) self->str_ptr); - self->method_name = strjoin(self->method_name, ":"); - - self->str_ptr = (char*) copyin(arg5, arg6+1); - self->str_ptr[arg6] = '\0'; - self->method_name = strjoin(self->method_name, (string) self->str_ptr); - - self->JAVA_STACK[self->JAVA_STACK_DEEP] = self->method_name; - -/* printf("%-10u%*s%s\n", - * curcpu->cpu_id, self->indent, "", self->method_name); - */ -} - - -/* - * Multiple pairs of GetPrimitiveArrayCritical/ReleasePrimitiveArrayCritical, - * GetStringCritical/ReleaseStringCritical may be nested - */ -hotspot_jni$target:::*_entry -/self->in_critical_section > 0 && - probename != "GetPrimitiveArrayCritical_entry" && - probename != "GetStringCritical_entry" && - probename != "ReleasePrimitiveArrayCritical_entry" && - probename != "ReleaseStringCritical_entry" && - probename != "GetPrimitiveArrayCritical_return" && - probename != "GetStringCritical_return" && - probename != "ReleasePrimitiveArrayCritical_return" && - probename != "ReleaseStringCritical_return"/ -{ - printf("JNI call %s made from JNI critical region '%s' from %s\n", - probename, self->critical_section_name, - self->JAVA_STACK[self->JAVA_STACK_DEEP]); - - CRITICAL_SECTION_VIOLATION_CNT ++; -} - -syscall:::entry -/pid == $target && self->in_critical_section > 0/ -{ - printf("system call %s made in JNI critical region '%s' from %s\n", - probefunc, self->critical_section_name, - self->JAVA_STACK[self->JAVA_STACK_DEEP]); - - CRITICAL_SECTION_VIOLATION_CNT ++; -} - -hotspot_jni$target:::ReleasePrimitiveArrayCritical_entry, -hotspot_jni$target:::ReleaseStringCritical_entry -/self->in_critical_section > 0/ -{ - self->in_critical_section --; -} - -hotspot_jni$target:::GetPrimitiveArrayCritical_return -{ - self->in_critical_section ++; - self->critical_section_name = "GetPrimitiveArrayCritical"; -} - -hotspot_jni$target:::GetStringCritical_return -{ - self->in_critical_section ++; - self->critical_section_name = "GetStringCritical"; -} - - -:::END -{ - printf("%d critical section violations have been discovered\n", - CRITICAL_SECTION_VIOLATION_CNT); - - printf("\nEND of %s\n", SAMPLE_NAME); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot_jni/README.txt b/jdk/src/sample/solaris/dtrace/hotspot_jni/README.txt deleted file mode 100644 index 0c15a941160..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot_jni/README.txt +++ /dev/null @@ -1,64 +0,0 @@ -================================ -'hotspot_jni' PROBES DESCRIPTION -================================ - -This directory contains D scripts which demonstrate usage of 'hotspot_jni' -provider probes. - -In order to call from native code to Java code, due to embedding of the VM -in an application or execution of native code within a Java application, the -native code must make a call through the JNI interface. The JNI interface -provides a number of methods for invoking Java code and examining the state -of the VM. DTrace probes are provided at the entry point and return point -for each of these methods. The probes are provided by the hotspot_jni -provider. The name of the probe is the name of the JNI method, appended with -"-entry" for entry probes, and "-return" for return probes. The arguments -available at each entry probe are the arguments that were provided to the -function (with the exception of the Invoke* methods, which omit the -arguments that are passed to the Java method). The return probes have the -return value of the method as an argument (if available). - -You can find more information about HotSpot probes here: -http://java.sun.com/javase/6/docs/technotes/guides/vm/dtrace.html - -=========== -THE SCRIPTS -=========== - -The following scripts/samples which demonstrate hotspot_jni probes usage are -available: - -- CriticalSection.d - Inspect a JNI application for Critical Section violations. - -- CriticalSection_slow.d - Do the same as CriticalSection.d but provide more debugging info. - -- hotspot_jni_calls_stat.d - This script collects statistics about how many times particular JNI method - has been called. - -- hotspot_jni_calls_tree.d - The script prints tree of JNI method calls. - -See more details in the scripts. - - -========== -HOW TO RUN -========== -To run any dscript from hotspot directory you can do either: - - # dscript.d -c "java ..." - - or if you don't have Solaris 10 patch which allows to specify probes that - don't yet exist ( Hotspot DTrace probes are defined in libjvm.so and as - result they could be not been yet loaded when you try to attach dscript to - the Java process) do: - - # ../helpers/dtrace_helper.d -c "java ..." dscript.d - - or if your application is already running you can just simply attach - the D script like: - - # dscript.d -p JAVA_PID diff --git a/jdk/src/sample/solaris/dtrace/hotspot_jni/hotspot_jni_calls_stat.d b/jdk/src/sample/solaris/dtrace/hotspot_jni/hotspot_jni_calls_stat.d deleted file mode 100644 index 8db9e16577f..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot_jni/hotspot_jni_calls_stat.d +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/sbin/dtrace -Zs - -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. hotspot_jni_calls_stat.d -c "java ..." - * 2. hotspot_jni_calls_stat.d -p JAVA_PID - * - * This script collects statistics about how many times particular JNI - * method has been called. - * - */ - - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option bufsize=16m -#pragma D option aggrate=100ms - - -:::BEGIN -{ - printf("BEGIN hotspot_jni tracing\n"); -} - - -hotspot_jni$target:::*-entry -{ - JNI_CALLS ++; - @jni_calls[probename] = count(); -} - -:::END -{ - printa("%10@d %s\n", @jni_calls); - printf("\n"); - printf("Total number of JNI calls: %d\n", JNI_CALLS); - - printf("\nEND hotspot_jni tracing.\n"); -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/src/sample/solaris/dtrace/hotspot_jni/hotspot_jni_calls_tree.d b/jdk/src/sample/solaris/dtrace/hotspot_jni/hotspot_jni_calls_tree.d deleted file mode 100644 index 7aeb20895ab..00000000000 --- a/jdk/src/sample/solaris/dtrace/hotspot_jni/hotspot_jni_calls_tree.d +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/sbin/dtrace -Zs - -/* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Oracle nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* -*/ - -/* - * Usage: - * 1. hotspot_jni_calls_tree.d -c "java ..." - * 2. hotspot_jni_calls_tree.d -p JAVA_PID - * - * The script prints tree of JNI method calls. - * - */ - -#pragma D option quiet -#pragma D option destructive -#pragma D option defaultargs -#pragma D option bufsize=16m -#pragma D option aggrate=100ms - - -self int indent; - -:::BEGIN -{ - printf("BEGIN hotspot_jni tracing\n"); -} - - -hotspot_jni$target:::* -/!self->indent/ -{ - self->indent = 11; -} - -hotspot_jni$target:::*-entry -{ - self->indent++; - printf("%d %*s -> %s\n", curcpu->cpu_id, self->indent, "", probename); -} - - -hotspot_jni$target:::*-return -{ - printf("%d %*s <- %s\n", curcpu->cpu_id, self->indent, "", probename); - self->indent--; -} - -:::END -{ - printf("\nEND hotspot_jni tracing.\n"); - -} - -syscall::rexit:entry, -syscall::exit:entry -/pid == $target/ -{ - exit(0); -} diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index f94c56a05e4..f73299c549e 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -125,6 +125,8 @@ java/beans/Introspector/8132566/OverrideUserDefPropertyInfoTest.java 8132565 gen java/lang/StringCoding/CheckEncodings.sh 7008363 generic-all +jdk/internal/misc/JavaLangAccess/NewUnsafeString.java 8176188 generic-all + ############################################################################ # jdk_instrument @@ -147,6 +149,7 @@ java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 generic- com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java 8030957 aix-all com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java 8030957 aix-all +sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java 8174734 generic-all ############################################################################ @@ -167,8 +170,6 @@ java/net/MulticastSocket/Test.java 7145658 macosx-a java/net/DatagramSocket/SendDatagramToBadAddress.java 7143960 macosx-all -java/net/httpclient/TimeoutOrdering.java 8170940 solaris-all,windows-all - ############################################################################ # jdk_nio @@ -177,14 +178,10 @@ java/nio/channels/Selector/Wakeup.java 6963118 windows- java/nio/channels/DatagramChannel/ChangingAddress.java 7141822 macosx-all -java/nio/channels/Selector/OutOfBand.java 7132677 macosx-all - java/nio/file/WatchService/Basic.java 7158947 solaris-all Solaris 11 java/nio/file/WatchService/MayFlies.java 7158947 solaris-all Solaris 11 java/nio/file/WatchService/LotsOfEvents.java 7158947 solaris-all Solaris 11 -sun/nio/cs/OLD/TestIBMDB.java 8167525 generic-all - ############################################################################ # jdk_rmi @@ -199,8 +196,6 @@ java/rmi/activation/Activatable/extLoadedImpl/ext.sh 8062724 generic- java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup.java 8169569 windows-all -sun/rmi/rmic/newrmic/equivalence/run.sh 8145980 generic-all - java/rmi/registry/readTest/CodebaseTest.java 8173324 windows-all ############################################################################ @@ -214,13 +209,20 @@ sun/security/tools/keytool/ListKeychainStore.sh 8156889 macosx-a sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 8026393 generic-all javax/net/ssl/DTLS/PacketLossRetransmission.java 8169086 macosx-x64 +javax/net/ssl/DTLS/RespondToRetransmit.java 8169086 macosx-x64 + +sun/security/ssl/X509KeyManager/PreferredKey.java 8176354 generic-all ############################################################################ # jdk_sound -javax/sound/sampled/DirectAudio/bug6372428.java 8055097 generic-all -javax/sound/sampled/Clip/bug5070081.java 8055097 generic-all -javax/sound/sampled/DataLine/LongFramePosition.java 8055097 generic-all +javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java 8178401 windows-all + +javax/sound/sampled/Clip/ClipCloseLoss.java 8178403 generic-all + +javax/sound/sampled/DirectAudio/bug6372428.java 8055097 generic-all +javax/sound/sampled/Clip/bug5070081.java 8055097 generic-all +javax/sound/sampled/DataLine/LongFramePosition.java 8055097 generic-all javax/sound/sampled/Clip/Drain/ClipDrain.java 7062792 generic-all @@ -251,15 +253,11 @@ sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8157338 generic- tools/pack200/CommandLineTests.java 8059906 generic-all -tools/launcher/ArgsEnvVar.java 8173712 generic-all tools/launcher/FXLauncherTest.java 8068049 linux-all,macosx-all -tools/jimage/JImageExtractTest.java 8169713 generic-all -tools/jimage/JImageListTest.java 8169713 generic-all -tools/jimage/JImageVerifyTest.java 8169713 generic-all - - -tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java 8169971 windows-x64 +tools/jimage/JImageExtractTest.java 8170120 generic-all +tools/jimage/JImageListTest.java 8170120 generic-all +tools/jimage/JImageVerifyTest.java 8170120 generic-all ############################################################################ @@ -267,7 +265,7 @@ tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java 8169971 windows- com/sun/jdi/RedefineImplementor.sh 8004127 generic-all -com/sun/jdi/JdbMethodExitTest.sh 6902121 generic-all +com/sun/jdi/JdbMethodExitTest.sh 8171483 generic-all com/sun/jdi/RepStep.java 8043571 generic-all @@ -283,9 +281,6 @@ com/sun/jdi/sde/SourceDebugExtensionTest.java 8158066 windows- # jdk_util -java/util/BitSet/BitSetStreamTest.java 8079538 generic-all - - ############################################################################ # jdk_instrument @@ -296,9 +291,11 @@ java/util/BitSet/BitSetStreamTest.java 8079538 generic- sun/tools/jcmd/TestJcmdSanity.java 8031482 windows-all +sun/tools/jstat/jstatClassloadOutput1.sh 8173942 generic-all + sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java 8057732 generic-all -demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java 8151899 generic-all +com/sun/tools/attach/StartManagementAgent.java 8179700 generic-all ############################################################################ @@ -308,6 +305,6 @@ com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java 8169942 linux-i5 javax/rmi/PortableRemoteObject/8146975/RmiIiopReturnValueTest.java 8169737 linux-all -javax/xml/ws/clientjar/TestWsImport.java 8170370 generic-all +org/omg/CORBA/OrbPropertiesTest.java 8175177 generic-all ############################################################################ diff --git a/jdk/test/TEST.ROOT b/jdk/test/TEST.ROOT index e822c4f2aae..b9cb4a27a3f 100644 --- a/jdk/test/TEST.ROOT +++ b/jdk/test/TEST.ROOT @@ -18,7 +18,7 @@ keys=2d dnd i18n intermittent randomness headful othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation java/lang/ProcessHandle # Tests that cannot run concurrently -exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream javax/rmi com/sun/corba/cachedSocket +exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream java/util/BitSet/stream javax/rmi com/sun/corba/cachedSocket # Group definitions groups=TEST.groups [closed/TEST.groups] @@ -26,8 +26,8 @@ groups=TEST.groups [closed/TEST.groups] # Allow querying of various System properties in @requires clauses requires.properties=sun.arch.data.model java.runtime.name -# Tests using jtreg 4.2 b05 features -requiredVersion=4.2 b05 +# Tests using jtreg 4.2 b07 features +requiredVersion=4.2 b07 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../ notation to reach them @@ -35,3 +35,6 @@ external.lib.roots = ../../ # Use new module options useNewOptions=true + +# Use --patch-module instead of -Xmodule: +useNewPatchModule=true diff --git a/jdk/test/TEST.groups b/jdk/test/TEST.groups index 3c8b8c60caf..07f876ce3db 100644 --- a/jdk/test/TEST.groups +++ b/jdk/test/TEST.groups @@ -28,8 +28,6 @@ tier1 = \ :jdk_lang \ :jdk_util \ - -java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java \ - -java/util/concurrent/forkjoin/FJExceptionTableLeak.java \ sun/nio/cs/ISO8859x.java \ java/nio/Buffer \ com/sun/crypto/provider/Cipher \ @@ -37,8 +35,6 @@ tier1 = \ tools/pack200 tier2 = \ - java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java \ - java/util/concurrent/forkjoin/FJExceptionTableLeak.java \ :jdk_io \ :jdk_nio \ -sun/nio/cs/ISO8859x.java \ @@ -74,9 +70,11 @@ jdk_lang = \ sun/reflect \ jdk/internal/reflect \ jdk/lambda \ + jdk/internal/loader \ jdk/internal/misc \ jdk/internal/ref \ jdk/internal/jimage \ + jdk/internal/math \ jdk/modules \ vm @@ -91,6 +89,7 @@ jdk_util = \ jdk_util_other = \ java/util \ sun/util \ + jdk/internal/util \ -:jdk_collections \ -:jdk_concurrent \ -:jdk_stream @@ -145,8 +144,7 @@ jdk_stream = \ java/util/stream jdk_math = \ - java/math \ - jdk/internal/math + java/math jdk_io = \ java/io @@ -181,6 +179,7 @@ jdk_security2 = \ jdk_security3 = \ javax/security \ -javax/security/auth/kerberos \ + com/sun/jarsigner \ com/sun/security \ -com/sun/security/jgss \ com/sun/org/apache/xml/internal/security \ @@ -211,7 +210,8 @@ jdk_text = \ jdk_management = \ java/lang/management \ com/sun/management \ - sun/management + sun/management \ + jdk/internal/agent jdk_instrument = \ java/lang/instrument @@ -249,8 +249,7 @@ svc_tools = \ sun/tools \ -sun/tools/java \ -sun/tools/jrunscript \ - sun/jvmstat \ - demo/jvmti + sun/jvmstat jdk_tools = \ :core_tools \ @@ -269,12 +268,11 @@ jdk_other = \ javax/transaction \ javax/xml \ -javax/xml/crypto \ - jdk/asm \ jdk/internal/jline \ com/sun/jndi \ com/sun/corba \ - lib/testlibrary \ - sample + org/omg/CORBA \ + lib/testlibrary # # SCTP is its own group as it is highly sensitive to kernel/network config @@ -466,7 +464,6 @@ jdk = \ needs_jdk = \ :jdk_jdi \ com/sun/tools \ - demo \ jdk/security/jarsigner \ sun/security/tools/jarsigner \ sun/security/tools/policytool \ @@ -714,7 +711,7 @@ needs_compact2 = \ java/security/BasicPermission/Wildcard.java \ java/util/Arrays/ParallelPrefix.java \ java/util/Arrays/SetAllTest.java \ - java/util/BitSet/BitSetStreamTest.java \ + java/util/BitSet/stream/BitSetStreamTest.java \ java/util/Collection/CollectionDefaults.java \ java/util/Collections/CheckedIdentityMap.java \ java/util/Collections/CheckedMapBash.java \ @@ -776,7 +773,6 @@ compact1_minimal = \ javax \ jdk \ lib \ - sample \ sun \ vm \ -:needs_full_vm_compact1 \ diff --git a/jdk/test/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java b/jdk/test/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java index 8aabcae42c7..26071d4bb7b 100644 --- a/jdk/test/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java +++ b/jdk/test/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -102,4 +102,4 @@ public class ScreenMenuMemoryLeakTest { Objects.requireNonNull(menuItem, "The menu item should still be available at this point"); sMenu.remove(menuItem); } -} \ No newline at end of file +} diff --git a/jdk/test/com/oracle/security/ucrypto/TestAES.java b/jdk/test/com/oracle/security/ucrypto/TestAES.java index 717e3186d97..bf460d420a6 100644 --- a/jdk/test/com/oracle/security/ucrypto/TestAES.java +++ b/jdk/test/com/oracle/security/ucrypto/TestAES.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 7088989 8014374 8167512 + * @bug 7088989 8014374 8167512 8173708 * @summary Ensure the AES ciphers of OracleUcrypto provider works correctly * @key randomness * @run main TestAES @@ -177,6 +177,12 @@ public class TestAES extends UcryptoTest { k += c.doFinal(eout, firstPartLen+1, eout.length - firstPartLen - 1, dout, k); if (!checkArrays(in, in.length, dout, k)) testPassed = false; } catch(Exception ex) { + if (ex instanceof BadPaddingException && + algos[i].indexOf("CFB128") != -1 && + p.getName().equals("OracleUcrypto")) { + System.out.println("Ignore due to a pre-S11.3 bug: " + ex); + continue; + } System.out.println("Unexpected Exception: " + algos[i]); ex.printStackTrace(); testPassed = false; diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java index edc43d61ae3..80732762297 100644 --- a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java +++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java @@ -17,7 +17,7 @@ * 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 + * or visit www.oracle.com if you need additional information or have any * questions. */ diff --git a/jdk/test/com/sun/java/swing/plaf/windows/Test8173145.java b/jdk/test/com/sun/java/swing/plaf/windows/Test8173145.java new file mode 100644 index 00000000000..cb7bb12abe8 --- /dev/null +++ b/jdk/test/com/sun/java/swing/plaf/windows/Test8173145.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + @bug 8173145 + @summary Menu is activated after using mnemonic Alt/Key combination + @modules java.desktop/com.sun.java.swing.plaf.windows + @run main Test8173145 +*/ + +import java.awt.*; +import java.awt.event.KeyEvent; +import java.lang.reflect.InvocationTargetException; + +import javax.swing.*; + +public class Test8173145 { + + private volatile static JButton btn; + private volatile static boolean uiCreated; + + public static void main(String[] args) throws InvocationTargetException, InterruptedException, AWTException { + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + try { + uiCreated = createGUI(); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + + if (uiCreated) { + test(); + } else { + //no windows l&f, skip the test + } + } + + private static void test() { + final Robot robot; + try { + robot = new Robot(); + } catch (AWTException e) { + throw new RuntimeException(e); + } + robot.setAutoDelay(100); + robot.waitForIdle(); + + robot.keyPress(KeyEvent.VK_ALT); + robot.keyPress(KeyEvent.VK_M); + robot.keyRelease(KeyEvent.VK_M); + robot.keyRelease(KeyEvent.VK_ALT); + + Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); + + if (focusOwner != btn) { + throw new RuntimeException("Wrong focus owner"); + } + } + + private static boolean createGUI() { + try { + UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); + } catch (Exception e) { + return false; + } + JFrame f = new JFrame(); + + JPanel panel = new JPanel(); + btn = new JButton("Mmmmm"); + btn.setMnemonic(KeyEvent.VK_M); + btn.setDisplayedMnemonicIndex(0); + panel.add(btn); + + JTextField tf = new JTextField(); + tf.setColumns(10); + panel.add(tf); + + f.setJMenuBar(getMenuBar()); + f.add(panel); + f.pack(); + f.setVisible(true); + tf.requestFocus(); + return true; + } + + static JMenuBar getMenuBar() { + JMenuBar menuBar; + JMenu menu; + + menuBar = new JMenuBar(); + + menu = new JMenu("Menu"); + menuBar.add(menu); + + JMenuItem mi = new JMenuItem("test"); + menu.add(mi); + + return menuBar; + } +} diff --git a/jdk/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java b/jdk/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java index 3c0d03c9326..8f100851283 100644 --- a/jdk/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java +++ b/jdk/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java @@ -26,9 +26,9 @@ */ /* @test - * @bug 7089914 + * @bug 7089914 8174720 * @requires (os.family == "windows") - * @modules java.desktop/com.sun.java.swing.plaf.windows + * @modules java.desktop/com.sun.java.swing.plaf.windows:open * @summary Focus on image icons are not visible in javaws cache with high contrast mode * @author Sean Chou */ diff --git a/jdk/test/com/sun/jdi/AcceptTimeout.java b/jdk/test/com/sun/jdi/AcceptTimeout.java index 313a2812035..d9479d52129 100644 --- a/jdk/test/com/sun/jdi/AcceptTimeout.java +++ b/jdk/test/com/sun/jdi/AcceptTimeout.java @@ -24,8 +24,7 @@ /* @test * @bug 6198277 * @summary Test that each ListeningConnector that supports a "timeout" argument will - * timeout with TransportTimeoutException - * @modules jdk.jdi + * timeout with TransportTimeoutException */ import com.sun.jdi.Bootstrap; import com.sun.jdi.connect.Connector; diff --git a/jdk/test/com/sun/jdi/AccessSpecifierTest.java b/jdk/test/com/sun/jdi/AccessSpecifierTest.java index d1c6e143395..1c4df30bb56 100644 --- a/jdk/test/com/sun/jdi/AccessSpecifierTest.java +++ b/jdk/test/com/sun/jdi/AccessSpecifierTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4359628 - * @summary Test fix for JDI: methods Accessible.is...() lie about array types + * @test + * @bug 4359628 + * @summary Test fix for JDI: methods Accessible.is...() lie about array types + * @author Tim Bell * - * @author Tim Bell - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g AccessSpecifierTest.java - * @run driver AccessSpecifierTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g AccessSpecifierTest.java + * @run driver AccessSpecifierTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/AfterThreadDeathTest.java b/jdk/test/com/sun/jdi/AfterThreadDeathTest.java index 93c21e6bc46..61435a64a61 100644 --- a/jdk/test/com/sun/jdi/AfterThreadDeathTest.java +++ b/jdk/test/com/sun/jdi/AfterThreadDeathTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4364671 - * @summary Creating a StepRequest on a nonexistant thread fails + * @test + * @bug 4364671 + * @summary Creating a StepRequest on a nonexistant thread fails + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g AfterThreadDeathTest.java - * @run driver AfterThreadDeathTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g AfterThreadDeathTest.java + * @run driver AfterThreadDeathTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/AllLineLocations.java b/jdk/test/com/sun/jdi/AllLineLocations.java index 939880c5cca..6b171aec53c 100644 --- a/jdk/test/com/sun/jdi/AllLineLocations.java +++ b/jdk/test/com/sun/jdi/AllLineLocations.java @@ -22,17 +22,16 @@ */ /** - * @test - * @bug 4248728 - * @summary Test ReferenceType.allLineLocations - * @author Gordon Hirsch + * @test + * @bug 4248728 + * @summary Test ReferenceType.allLineLocations + * @author Gordon Hirsch * - * @modules jdk.jdi - * @run build JDIScaffold VMConnection - * @run compile -g RefTypes.java - * @run build AllLineLocations + * @run build JDIScaffold VMConnection + * @run compile -g RefTypes.java + * @run build AllLineLocations * - * @run driver AllLineLocations RefTypes + * @run driver AllLineLocations RefTypes */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/ArgumentValuesTest.java b/jdk/test/com/sun/jdi/ArgumentValuesTest.java index 13c6b2a48fb..bcce51bc562 100644 --- a/jdk/test/com/sun/jdi/ArgumentValuesTest.java +++ b/jdk/test/com/sun/jdi/ArgumentValuesTest.java @@ -1,13 +1,38 @@ -/** hard coded linenumbers in other tests - DO NOT CHANGE - * @test/nodynamiccopyright/ - * @bug 4490824 - * @summary JDI: provide arguments when no debug attributes present +/* + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * @author jjh + * 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. * - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile ArgumentValuesTest.java - * @run driver ArgumentValuesTest + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// THIS TEST IS LINE NUMBER SENSITIVE + +/** + * @test + * @bug 4490824 + * @summary JDI: provide arguments when no debug attributes present + * + * @author jjh + * + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile ArgumentValuesTest.java + * @run driver ArgumentValuesTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; @@ -35,26 +60,26 @@ class ArgumentValuesTarg { static List intList; public static void noArgs() { - int index = 0; // line 38 + int index = 0; // line NO_ARGS_LINE_1 } public static void allArgs(char p_char, byte p_byte, short p_short, int p_int, long p_long, float p_float, double p_double, int p_iarray[], int p_marray[][], String p_sarray1[], String p_string) { - int index = 0; // line 45 + int index = 0; // line ALL_ARGS_LINE_1 } public static void varArgs(String ... p1) { - int index = 0; // line 49 + int index = 0; // line VAR_ARGS_LINE_1 } public static void genericArgs(List p1) { - int index = 0; // line 53 + int index = 0; // line GENERIC_ARGS_LINE_1 } public void instanceMethod(char p_char, byte p_byte) { - int index = 0; // line 57 + int index = 0; // line INSTANCE_METHOD_LINE_1 } public static void main(String[] args) { @@ -81,6 +106,12 @@ class ArgumentValuesTarg { /********** test program **********/ public class ArgumentValuesTest extends TestScaffold { + static final int NO_ARGS_LINE_1 = 63; + static final int ALL_ARGS_LINE_1 = 70; + static final int VAR_ARGS_LINE_1 = 74; + static final int GENERIC_ARGS_LINE_1 = 78; + static final int INSTANCE_METHOD_LINE_1 = 82; + // Must be in same order as args to allArgs(....) String fieldNames[] = {"s_char1", "s_byte1", "s_short1", "s_int1", "s_long1", "s_float1", "s_double1", "s_iarray1", @@ -118,7 +149,7 @@ public class ArgumentValuesTest extends TestScaffold { { System.out.println("----- Testing each type of arg"); - bpe = resumeTo("ArgumentValuesTarg", 45); + bpe = resumeTo("ArgumentValuesTarg", ALL_ARGS_LINE_1); StackFrame frame = bpe.thread().frame(0); Method mmm = frame.location().method(); @@ -147,7 +178,7 @@ public class ArgumentValuesTest extends TestScaffold { // a method with no params { System.out.println("----- Testing no args"); - bpe = resumeTo("ArgumentValuesTarg", 38); + bpe = resumeTo("ArgumentValuesTarg", NO_ARGS_LINE_1); StackFrame frame = bpe.thread().frame(0); Method mmm = frame.location().method(); @@ -165,7 +196,7 @@ public class ArgumentValuesTest extends TestScaffold { // as a String[3] in the method. { System.out.println("----- Testing var args"); - bpe = resumeTo("ArgumentValuesTarg", 49); + bpe = resumeTo("ArgumentValuesTarg", VAR_ARGS_LINE_1); StackFrame frame = bpe.thread().frame(0); Method mmm = frame.location().method(); @@ -199,7 +230,7 @@ public class ArgumentValuesTest extends TestScaffold { // a method with with one generic param { System.out.println("----- Testing generic args"); - bpe = resumeTo("ArgumentValuesTarg", 53); + bpe = resumeTo("ArgumentValuesTarg", GENERIC_ARGS_LINE_1); StackFrame frame = bpe.thread().frame(0); Method mmm = frame.location().method(); @@ -224,7 +255,7 @@ public class ArgumentValuesTest extends TestScaffold { // test instance method call { System.out.println("----- Testing instance method call"); - bpe = resumeTo("ArgumentValuesTarg", 57); + bpe = resumeTo("ArgumentValuesTarg", INSTANCE_METHOD_LINE_1); StackFrame frame = bpe.thread().frame(0); Method mmm = frame.location().method(); diff --git a/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh b/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh index 8d8df5cfc0e..2b98636a4f2 100644 --- a/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh +++ b/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -98,7 +98,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/ArrayRangeTest.java b/jdk/test/com/sun/jdi/ArrayRangeTest.java index c7df22fabbd..aa86011b165 100644 --- a/jdk/test/com/sun/jdi/ArrayRangeTest.java +++ b/jdk/test/com/sun/jdi/ArrayRangeTest.java @@ -22,18 +22,16 @@ */ /** - * @test - * @bug 4439631 - * @bug 4448721 - * @bug 4448603 - * @summary Test access to ranges within ArrayReferences + * @test + * @bug 4439631 + * @bug 4448721 + * @bug 4448603 + * @summary Test access to ranges within ArrayReferences + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g ArrayRangeTest.java - * @run driver ArrayRangeTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g ArrayRangeTest.java + * @run driver ArrayRangeTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/BacktraceFieldTest.java b/jdk/test/com/sun/jdi/BacktraceFieldTest.java index 7136eb97121..294b858e2f7 100644 --- a/jdk/test/com/sun/jdi/BacktraceFieldTest.java +++ b/jdk/test/com/sun/jdi/BacktraceFieldTest.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 4446677 - * @bug 8158237 - * @summary debuggee used to crash when debugging under jbuilder + * @test + * @bug 4446677 + * @bug 8158237 + * @summary debuggee used to crash when debugging under jbuilder + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g BacktraceFieldTest.java - * @run driver BacktraceFieldTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g BacktraceFieldTest.java + * @run driver BacktraceFieldTest */ /* diff --git a/jdk/test/com/sun/jdi/BreakpointTest.java b/jdk/test/com/sun/jdi/BreakpointTest.java index 1266f0a274b..9012c1c2033 100644 --- a/jdk/test/com/sun/jdi/BreakpointTest.java +++ b/jdk/test/com/sun/jdi/BreakpointTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -21,19 +21,20 @@ * questions. */ +// THIS TEST IS LINE NUMBER SENSITIVE + /** - * @test - * @bug 6496524 - * @summary Setting breakpoint in jdb crashes Hotspot JVM + * @test + * @bug 6496524 + * @key intermittent + * @summary Setting breakpoint in jdb crashes Hotspot JVM + * @author jjh * - * @author jjh - * - * @key intermittent - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g BreakpointTest.java - * @run driver BreakpointTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g BreakpointTest.java + * @run driver BreakpointTest */ + import com.sun.jdi.*; import com.sun.jdi.event.*; import com.sun.jdi.request.*; @@ -47,7 +48,6 @@ import java.util.*; class BreakpointTarg { public final static int BKPT_LINE = 56; - // LINE NUMBER SENSITIVE public static long count; static void doit() { diff --git a/jdk/test/com/sun/jdi/BreakpointWithFullGC.sh b/jdk/test/com/sun/jdi/BreakpointWithFullGC.sh index 81baff826e4..b6e2210500d 100644 --- a/jdk/test/com/sun/jdi/BreakpointWithFullGC.sh +++ b/jdk/test/com/sun/jdi/BreakpointWithFullGC.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/com/sun/jdi/CatchAllTest.sh b/jdk/test/com/sun/jdi/CatchAllTest.sh index 52d1864384b..fb0ab6aa3e6 100644 --- a/jdk/test/com/sun/jdi/CatchAllTest.sh +++ b/jdk/test/com/sun/jdi/CatchAllTest.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -76,7 +76,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/CatchCaughtTest.sh b/jdk/test/com/sun/jdi/CatchCaughtTest.sh index 47a0d356e36..0322b5ebf87 100644 --- a/jdk/test/com/sun/jdi/CatchCaughtTest.sh +++ b/jdk/test/com/sun/jdi/CatchCaughtTest.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -67,7 +67,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/CatchPatternTest.sh b/jdk/test/com/sun/jdi/CatchPatternTest.sh index 0a45b388a4d..b4a45d626f9 100644 --- a/jdk/test/com/sun/jdi/CatchPatternTest.sh +++ b/jdk/test/com/sun/jdi/CatchPatternTest.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -108,7 +108,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java b/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java index a4f8450b7d0..60712f8aacd 100644 --- a/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java +++ b/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java @@ -27,10 +27,8 @@ * @summary Test ClassLoaderReference.visibleClasses() which is * a direct pass-through of the JVMDI function GetClassLoaderClasses * for inclusion of primitive arrays. - * * @author Robert Field * - * @modules jdk.jdi * @run build TestScaffold VMConnection TargetListener TargetAdapter * @run compile -g ClassLoaderClassesTest.java * @run driver ClassLoaderClassesTest diff --git a/jdk/test/com/sun/jdi/ClassesByName.java b/jdk/test/com/sun/jdi/ClassesByName.java index 1e920328044..3857a9b03cf 100644 --- a/jdk/test/com/sun/jdi/ClassesByName.java +++ b/jdk/test/com/sun/jdi/ClassesByName.java @@ -24,16 +24,14 @@ /** * @test * @bug 4287992 + * @summary ClassesByName verifies that all the classes in the + * loaded class list can be found with classesByName.. * @author Robert Field * - * @modules jdk.jdi * @run build JDIScaffold VMConnection * @run compile -g HelloWorld.java * @run build ClassesByName * - * @summary ClassesByName verifies that all the classes in the - * loaded class list can be found with classesByName.. - * * @run driver ClassesByName HelloWorld */ import com.sun.jdi.*; diff --git a/jdk/test/com/sun/jdi/ClassesByName2Test.java b/jdk/test/com/sun/jdi/ClassesByName2Test.java index 2a7c5288cc3..c6407edcb28 100644 --- a/jdk/test/com/sun/jdi/ClassesByName2Test.java +++ b/jdk/test/com/sun/jdi/ClassesByName2Test.java @@ -22,16 +22,17 @@ */ /** - * @test - * @bug 4406439 4925740 - * @summary ClassesByName2 verifies that all the classes in the loaded class list can be found with classesByName.. + * @test + * @bug 4406439 4925740 + * @summary ClassesByName2 verifies that all the classes in the loaded class list can be found with classesByName.. + * @author Tim Bell (based on ClassesByName by Robert Field) * - * @author Tim Bell (based on ClassesByName by Robert Field) + * @modules jdk.jdi + * java.desktop * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g ClassesByName2Test.java - * @run driver ClassesByName2Test + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g ClassesByName2Test.java + * @run driver ClassesByName2Test */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh b/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh index c5beb904d30..a3da8253c11 100644 --- a/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh +++ b/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -70,7 +70,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/CompatibleConnectors.java b/jdk/test/com/sun/jdi/CompatibleConnectors.java index 189e1b2a6d0..57e0f146b55 100644 --- a/jdk/test/com/sun/jdi/CompatibleConnectors.java +++ b/jdk/test/com/sun/jdi/CompatibleConnectors.java @@ -27,7 +27,6 @@ * * This test checks that VirtualMachineManager creates Connectors that * are "compatible" those created by 1.4 or earilier releases. - * @modules jdk.jdi */ import com.sun.jdi.*; diff --git a/jdk/test/com/sun/jdi/ConnectedVMs.java b/jdk/test/com/sun/jdi/ConnectedVMs.java index 7e41bb17d99..9bf0267c0cd 100644 --- a/jdk/test/com/sun/jdi/ConnectedVMs.java +++ b/jdk/test/com/sun/jdi/ConnectedVMs.java @@ -22,20 +22,18 @@ */ /** - * @test - * @bug 4329140 - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g InstTarg.java - * @run driver ConnectedVMs Kill - * @run driver ConnectedVMs Resume-to-exit - * @run driver ConnectedVMs dispose() - * @run driver ConnectedVMs exit() - * + * @test + * @bug 4329140 * @summary ConnectedVMs checks the method * VirtualMachineManager.connectedVirtualMachines() + * @author Robert Field + * + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g InstTarg.java + * @run driver ConnectedVMs Kill + * @run driver ConnectedVMs Resume-to-exit + * @run driver ConnectedVMs dispose() + * @run driver ConnectedVMs exit() */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/ConstantPoolInfo.java b/jdk/test/com/sun/jdi/ConstantPoolInfo.java index 540d26e381d..097ab535cf2 100644 --- a/jdk/test/com/sun/jdi/ConstantPoolInfo.java +++ b/jdk/test/com/sun/jdi/ConstantPoolInfo.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 5024104 - * @summary Test ReferenceType.majorVersion(), minorVersion, constantPoolCount and ConstantPool apis. + * @test + * @bug 5024104 + * @summary Test ReferenceType.majorVersion(), minorVersion, constantPoolCount and ConstantPool apis. + * @author Swamy Venkataramanappa * - * @author Swamy Venkataramanappa - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection - * @run compile -g ConstantPoolInfo.java - * @run driver ConstantPoolInfo + * @run build TestScaffold VMConnection + * @run compile -g ConstantPoolInfo.java + * @run driver ConstantPoolInfo */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/ConstantPoolInfoGC.java b/jdk/test/com/sun/jdi/ConstantPoolInfoGC.java index aacf78765a0..8aa57053c98 100644 --- a/jdk/test/com/sun/jdi/ConstantPoolInfoGC.java +++ b/jdk/test/com/sun/jdi/ConstantPoolInfoGC.java @@ -22,16 +22,16 @@ */ /* - * @test - * @bug 6822627 - * @summary Test that ReferenceType.constantPool does not produce an NPE + * @test + * @bug 6822627 + * @summary Test that ReferenceType.constantPool does not produce an NPE + * @author Egor Ushakov * - * @author Egor Ushakov + * @modules jdk.jdi/com.sun.tools.jdi:+open * - * @modules jdk.jdi/com.sun.tools.jdi:+open - * @run build TestScaffold VMConnection - * @run compile -g ConstantPoolInfoGC.java - * @run main/othervm ConstantPoolInfoGC + * @run build TestScaffold VMConnection + * @run compile -g ConstantPoolInfoGC.java + * @run main/othervm ConstantPoolInfoGC */ import com.sun.jdi.ReferenceType; diff --git a/jdk/test/com/sun/jdi/CountEvent.java b/jdk/test/com/sun/jdi/CountEvent.java index 40086b3bfa6..37573b47a58 100644 --- a/jdk/test/com/sun/jdi/CountEvent.java +++ b/jdk/test/com/sun/jdi/CountEvent.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 4315352 - * @summary disabling EventRequest expired with addCountFilter() throws - * InternalException. + * @test + * @bug 4315352 + * @summary disabling EventRequest expired with addCountFilter() throws + * InternalException. + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetAdapter TargetListener - * @run compile -g CountEvent.java - * @run driver CountEvent + * @run build TestScaffold VMConnection TargetAdapter TargetListener + * @run compile -g CountEvent.java + * @run driver CountEvent */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/CountFilterTest.java b/jdk/test/com/sun/jdi/CountFilterTest.java index e71de811a3e..681a765eca5 100644 --- a/jdk/test/com/sun/jdi/CountFilterTest.java +++ b/jdk/test/com/sun/jdi/CountFilterTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4321339 - * @summary Check correct processing of filters after a count filter + * @test + * @bug 4321339 + * @summary Check correct processing of filters after a count filter + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g CountFilterTest.java - * @run driver CountFilterTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g CountFilterTest.java + * @run driver CountFilterTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/DebuggerThreadTest.java b/jdk/test/com/sun/jdi/DebuggerThreadTest.java index 182c232e19a..496f023539a 100644 --- a/jdk/test/com/sun/jdi/DebuggerThreadTest.java +++ b/jdk/test/com/sun/jdi/DebuggerThreadTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4513488 - * @summary Test for JDI: Internal JDI helper threads should setDaemon(true) + * @test + * @bug 4513488 + * @summary Test for JDI: Internal JDI helper threads should setDaemon(true) + * @author Tim Bell * - * @author Tim Bell - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g DebuggerThreadTest.java - * @run driver DebuggerThreadTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g DebuggerThreadTest.java + * @run driver DebuggerThreadTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/DeferredStepTest.sh b/jdk/test/com/sun/jdi/DeferredStepTest.sh index 528404fefc7..82e97ff19b9 100644 --- a/jdk/test/com/sun/jdi/DeferredStepTest.sh +++ b/jdk/test/com/sun/jdi/DeferredStepTest.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -53,7 +53,7 @@ public class $classname { static class jj1 implements Runnable { public void run() { int count = 0; - + for ( int ii = 0; ii < 10; ii++) { // line 6 int intInPotato04 = 666; // line 7 ++count; // line 8; @1 breakpoint @@ -65,7 +65,7 @@ public class $classname { static class jj2 implements Runnable { public void run() { int count2 = 0; - + for (int ii = 0; ii < 10; ii++) { // line 18 String StringInPotato05 = "I am"; // line 19 ++count2; // line 20; @1 breakpoint @@ -139,7 +139,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done @@ -157,7 +157,7 @@ This test should be run and checked manually. If this works right, you should see StepEvents/Breakpoint events for lines 8, 9, 6, 7, 8, 9, 6, .... for thread jj11 and - 20, 21, 18, 19, 20, 21, 18, ... for thread jj2 + 20, 21, 18, 19, 20, 21, 18, ... for thread jj2 Since both threads are running at the same time, these events can be intermixed. @@ -179,5 +179,5 @@ Kill the test and rerun it if this happens. EOF runit -#jdbFailIfPresent "Nothing suspended" +#jdbFailIfPresent "Nothing suspended" #pass diff --git a/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java b/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java index a37cbb33133..df805d97ce9 100644 --- a/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java +++ b/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java @@ -22,17 +22,16 @@ */ /** - * @test - * @bug 4528948 - * @summary Unable to finish a debugging in NetBeans IDE + * @test + * @bug 4528948 + * @summary Unable to finish a debugging in NetBeans IDE + * @author jjh * - * @author jjh + * @library .. * - * @library .. - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g DeleteAllBkptsTest.java - * @run driver DeleteAllBkptsTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g DeleteAllBkptsTest.java + * @run driver DeleteAllBkptsTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java b/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java index 7d4d8078798..c096ec7dbb8 100644 --- a/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java +++ b/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4331872 - * @summary erm.deleteEventRequests(erm.breakpointRequests()) throws exception + * @test + * @bug 4331872 + * @summary erm.deleteEventRequests(erm.breakpointRequests()) throws exception + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g DeleteEventRequestsTest.java - * @run driver DeleteEventRequestsTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g DeleteEventRequestsTest.java + * @run driver DeleteEventRequestsTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/DeoptimizeWalk.sh b/jdk/test/com/sun/jdi/DeoptimizeWalk.sh index e8fc44c4281..06eadb4e833 100644 --- a/jdk/test/com/sun/jdi/DeoptimizeWalk.sh +++ b/jdk/test/com/sun/jdi/DeoptimizeWalk.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -96,7 +96,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java b/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java index 728130b4fff..15cb1ded7cc 100644 --- a/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java +++ b/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java @@ -22,15 +22,14 @@ */ /** - * @test - * @bug 6431735 - * @summary Unexpected ClassCastException in ThreadReference.forceEarlyReturn - * @author Jim Holmlund + * @test + * @bug 6431735 + * @summary Unexpected ClassCastException in ThreadReference.forceEarlyReturn + * @author Jim Holmlund * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g EarlyReturnNegativeTest.java - * @run driver EarlyReturnNegativeTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g EarlyReturnNegativeTest.java + * @run driver EarlyReturnNegativeTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/EarlyReturnTest.java b/jdk/test/com/sun/jdi/EarlyReturnTest.java index e76310c2cae..ac7e5329d92 100644 --- a/jdk/test/com/sun/jdi/EarlyReturnTest.java +++ b/jdk/test/com/sun/jdi/EarlyReturnTest.java @@ -22,22 +22,21 @@ */ /* - * @test - * @bug 6175634 - * @summary Allow early return from methods + * @test + * @bug 6175634 + * @summary Allow early return from methods * - * @bug 6431720 - * @summary Unexpected InvalidTypeException when call ThreadReference.forceEarlyReturn with VoidValue + * @bug 6431720 + * @summary Unexpected InvalidTypeException when call ThreadReference.forceEarlyReturn with VoidValue * - * @bug 6432855 - * @summary Need a way to create JDI VoidValue for use in ThreadReference.forceEarlyReturn + * @bug 6432855 + * @summary Need a way to create JDI VoidValue for use in ThreadReference.forceEarlyReturn * - * @author Tim Bell (based on MethodExitReturnValuesTest by Jim Holmlund) + * @author Tim Bell (based on MethodExitReturnValuesTest by Jim Holmlund) * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g EarlyReturnTest.java - * @run driver EarlyReturnTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g EarlyReturnTest.java + * @run driver EarlyReturnTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/EnumTest.java b/jdk/test/com/sun/jdi/EnumTest.java index 660479b5a36..324f335b90f 100644 --- a/jdk/test/com/sun/jdi/EnumTest.java +++ b/jdk/test/com/sun/jdi/EnumTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4728816 - * @summary JPDA: Add support for enums + * @test + * @bug 4728816 + * @summary JPDA: Add support for enums + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g EnumTest.java - * @run driver EnumTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g EnumTest.java + * @run driver EnumTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/EvalArgs.sh b/jdk/test/com/sun/jdi/EvalArgs.sh index aa3e75fdb74..b1c2f65df1b 100644 --- a/jdk/test/com/sun/jdi/EvalArgs.sh +++ b/jdk/test/com/sun/jdi/EvalArgs.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ # @test # @bug 4663146 -# @summary Arguments match no method error +# @summary Arguments match no method error # @author Jim Holmlund/Suvasis # # @run shell/timeout=300 EvalArgs.sh @@ -72,13 +72,13 @@ public class $classname { System.out.println( ffjj1(myjj1)); System.out.println( ffjj1(myjj2)); - System.out.println("$classname.ffoverload($classname.jjboolean) = " + + System.out.println("$classname.ffoverload($classname.jjboolean) = " + $classname.ffoverload($classname.jjboolean)); - System.out.println("$classname.ffoverload($classname.jjbyte) = " + + System.out.println("$classname.ffoverload($classname.jjbyte) = " + $classname.ffoverload($classname.jjbyte)); - System.out.println("$classname.ffoverload($classname.jjchar) = " + + System.out.println("$classname.ffoverload($classname.jjchar) = " + $classname.ffoverload($classname.jjchar)); - System.out.println("$classname.ffoverload($classname.jjdouble) = " + + System.out.println("$classname.ffoverload($classname.jjdouble) = " + $classname.ffoverload($classname.jjdouble)); @@ -94,11 +94,11 @@ public class $classname { public static String ffjj1(jj1 arg) { return arg.me; } - + public static String ffjj2(jj2 arg) { return arg.me; } - + static String ffboolean(boolean p1) { return "ffbool: p1 = " + p1; } @@ -106,31 +106,31 @@ public class $classname { static String ffbyte(byte p1) { return "ffbyte: p1 = " + p1; } - + static String ffchar(char p1) { return "ffchar: p1 = " + p1; } - + static String ffdouble(double p1) { return "ffdouble: p1 = " + p1; } - + static String fffloat(float p1) { return "fffloat: p1 = " + p1; } - + static String ffint(int p1) { return "ffint: p1 = " + p1; } - + static String fflong(long p1) { return "fflong: p1 = " + p1; } - + static String ffshort(short p1) { return "ffshort: p1 = " + p1; } - + static String ffintArray(int[] p1) { return "ffintArray: p1 = " + p1; } @@ -139,15 +139,15 @@ public class $classname { public static String ffoverload(jj1 arg) { return arg.me; } - + static String ffoverload(boolean p1) { return "ffoverload: boolean p1 = " + p1; } -/*** +/*** static String ffoverload(byte p1) { return "ffoverload: byte p1 = " + p1; } -***/ +***/ static String ffoverload(char p1) { return "ffoverload: char p1 = " + p1; } @@ -159,11 +159,11 @@ public class $classname { static String ffoverload(float p1) { return "ffoverload: float p1 = " + p1; } -/*** +/*** static String ffoverload(int p1) { return "ffoverload: int p1 = " + p1; } -***/ +***/ static String ffoverload(long p1) { return "ffoverload: long p1 = " + p1; } @@ -171,7 +171,7 @@ public class $classname { static String ffoverload(short p1) { return "ffoverload: short p1 = " + p1; } - + static String ffoverload(int[] p1) { return "ffoverload: int array p1 = " + p1; } @@ -184,7 +184,7 @@ public class $classname { public String toString() { return me; } - + } static class jj2 extends jj1 { @@ -227,7 +227,7 @@ dojdbCmds() # Provide a visual break in the output cmd print 1 - # Verify mixing primitive types works ok + # Verify mixing primitive types works ok # These should work even though the arg types are # not the same because there is only one # method with each name. @@ -302,7 +302,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java b/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java index 397373c451c..c050cb792eb 100644 --- a/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java +++ b/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java @@ -22,21 +22,20 @@ */ /** - * @test - * @bug 4425852 - * @author Robert Field + * @test + * @bug 4425852 + * @author Robert Field * - * @modules jdk.jdi - * @run build VMConnection - * @run compile -g EventQueueDisconnectTest.java - * @run driver EventQueueDisconnectTest - * - * @summary EventQueueDisconnectTest checks to see that - * VMDisconnectedException is never thrown before VMDisconnectEvent. + * @summary EventQueueDisconnectTest checks to see that + * VMDisconnectedException is never thrown before VMDisconnectEvent. * * Failure mode for this test is throwing VMDisconnectedException * on vm.eventQueue().remove(); * Does not use a scaffold since we don't want that hiding the exception. + * + * @run build VMConnection + * @run compile -g EventQueueDisconnectTest.java + * @run driver EventQueueDisconnectTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/ExceptionEvents.java b/jdk/test/com/sun/jdi/ExceptionEvents.java index 8835c4603f6..18015a9c71d 100644 --- a/jdk/test/com/sun/jdi/ExceptionEvents.java +++ b/jdk/test/com/sun/jdi/ExceptionEvents.java @@ -22,43 +22,41 @@ */ /** - * @test - * @bug 4407397 - * @summary Test the requesting of exception events + * @test + * @bug 4407397 + * @key intermittent + * @summary Test the requesting of exception events + * @author Robert Field * - * @author Robert Field + * @run build TestScaffold VMConnection + * @run compile -g ExceptionEvents.java * - * @key intermittent - * @modules jdk.jdi - * @run build TestScaffold VMConnection - * @run compile -g ExceptionEvents.java - * - * @run driver ExceptionEvents N A StackOverflowCaughtTarg java.lang.Exception - * @run driver ExceptionEvents C A StackOverflowCaughtTarg null - * @run driver ExceptionEvents C A StackOverflowCaughtTarg java.lang.Error - * @run driver ExceptionEvents C A StackOverflowCaughtTarg java.lang.StackOverflowError - * @run driver ExceptionEvents N A StackOverflowCaughtTarg java.lang.NullPointerException + * @run driver ExceptionEvents N A StackOverflowCaughtTarg java.lang.Exception + * @run driver ExceptionEvents C A StackOverflowCaughtTarg null + * @run driver ExceptionEvents C A StackOverflowCaughtTarg java.lang.Error + * @run driver ExceptionEvents C A StackOverflowCaughtTarg java.lang.StackOverflowError + * @run driver ExceptionEvents N A StackOverflowCaughtTarg java.lang.NullPointerException - * @run driver ExceptionEvents N T StackOverflowCaughtTarg java.lang.Exception - * @run driver ExceptionEvents C T StackOverflowCaughtTarg null - * @run driver ExceptionEvents C T StackOverflowCaughtTarg java.lang.Error - * @run driver ExceptionEvents C T StackOverflowCaughtTarg java.lang.StackOverflowError - * @run driver ExceptionEvents N T StackOverflowCaughtTarg java.lang.NullPointerException + * @run driver ExceptionEvents N T StackOverflowCaughtTarg java.lang.Exception + * @run driver ExceptionEvents C T StackOverflowCaughtTarg null + * @run driver ExceptionEvents C T StackOverflowCaughtTarg java.lang.Error + * @run driver ExceptionEvents C T StackOverflowCaughtTarg java.lang.StackOverflowError + * @run driver ExceptionEvents N T StackOverflowCaughtTarg java.lang.NullPointerException - * @run driver ExceptionEvents N N StackOverflowCaughtTarg java.lang.Exception - * @run driver ExceptionEvents C N StackOverflowCaughtTarg null - * @run driver ExceptionEvents C N StackOverflowCaughtTarg java.lang.Error - * @run driver ExceptionEvents C N StackOverflowCaughtTarg java.lang.StackOverflowError - * @run driver ExceptionEvents N N StackOverflowCaughtTarg java.lang.NullPointerException + * @run driver ExceptionEvents N N StackOverflowCaughtTarg java.lang.Exception + * @run driver ExceptionEvents C N StackOverflowCaughtTarg null + * @run driver ExceptionEvents C N StackOverflowCaughtTarg java.lang.Error + * @run driver ExceptionEvents C N StackOverflowCaughtTarg java.lang.StackOverflowError + * @run driver ExceptionEvents N N StackOverflowCaughtTarg java.lang.NullPointerException - * @run driver ExceptionEvents N A StackOverflowUncaughtTarg java.lang.Exception - * @run driver ExceptionEvents U A StackOverflowUncaughtTarg null - * @run driver ExceptionEvents U A StackOverflowUncaughtTarg java.lang.Error - * @run driver ExceptionEvents U A StackOverflowUncaughtTarg java.lang.StackOverflowError - * @run driver ExceptionEvents N A StackOverflowUncaughtTarg java.lang.NullPointerException + * @run driver ExceptionEvents N A StackOverflowUncaughtTarg java.lang.Exception + * @run driver ExceptionEvents U A StackOverflowUncaughtTarg null + * @run driver ExceptionEvents U A StackOverflowUncaughtTarg java.lang.Error + * @run driver ExceptionEvents U A StackOverflowUncaughtTarg java.lang.StackOverflowError + * @run driver ExceptionEvents N A StackOverflowUncaughtTarg java.lang.NullPointerException - * @run driver ExceptionEvents N T StackOverflowUncaughtTarg java.lang.NullPointerException - * @run driver ExceptionEvents N N StackOverflowUncaughtTarg java.lang.NullPointerException + * @run driver ExceptionEvents N T StackOverflowUncaughtTarg java.lang.NullPointerException + * @run driver ExceptionEvents N N StackOverflowUncaughtTarg java.lang.NullPointerException */ import com.sun.jdi.*; diff --git a/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java b/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java index d8a30da9c64..f3c60121f44 100644 --- a/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java +++ b/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java @@ -22,17 +22,16 @@ */ /** - * @test - * @bug 4453310 - * @summary Test the deletion of event requests that are expired - * by virtue of addCountFilter. + * @test + * @bug 4453310 + * @summary Test the deletion of event requests that are expired + * by virtue of addCountFilter. * - * @author Robert Field + * @author Robert Field * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g ExpiredRequestDeletionTest.java - * @run driver ExpiredRequestDeletionTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g ExpiredRequestDeletionTest.java + * @run driver ExpiredRequestDeletionTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/FetchLocals.java b/jdk/test/com/sun/jdi/FetchLocals.java index 67d865d9c32..1195a8db14d 100644 --- a/jdk/test/com/sun/jdi/FetchLocals.java +++ b/jdk/test/com/sun/jdi/FetchLocals.java @@ -1,13 +1,37 @@ -/** hard coded linenumbers in test - DO NOT CHANGE - * @test/nodynamiccopyright/ - * @bug 4386002 4429245 - * @summary Test fix for: Incorrect values reported for some locals of type long +/* + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * @author Tim Bell + * 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. * - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g FetchLocals.java - * @run driver FetchLocals + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// THIS TEST IS LINE NUMBER SENSITIVE + +/** + * @test + * @bug 4386002 4429245 + * @summary Test fix for: Incorrect values reported for some locals of type long + * @author Tim Bell + * + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g FetchLocals.java + * @run driver FetchLocals */ import com.sun.jdi.*; import com.sun.jdi.event.*; @@ -59,7 +83,7 @@ class FetchLocalsDebugee { System.out.println(f); System.out.print("d is: "); System.out.println(d); - System.out.println(); // Thie is Line 63... + System.out.println(); // This is FetchLocals::LINE if (w == 0xde00ad00be00ef00L) { System.out.print ("The debugger was here. w modified to: 0x"); System.out.println(Long.toHexString(w)); @@ -87,6 +111,7 @@ class FetchLocalsDebugee { } public class FetchLocals extends TestScaffold { + static final int LINE = 86; FetchLocals (String args[]) { super(args); @@ -355,7 +380,7 @@ public class FetchLocals extends TestScaffold { * Get to the bottom of testMethod(): */ try { - BreakpointEvent bpe = resumeTo("FetchLocalsDebugee", 63); + BreakpointEvent bpe = resumeTo("FetchLocalsDebugee", LINE); /* * Fetch values from fields; what did we get? */ diff --git a/jdk/test/com/sun/jdi/FieldWatchpoints.java b/jdk/test/com/sun/jdi/FieldWatchpoints.java index a465e9c63c6..60ee1018021 100644 --- a/jdk/test/com/sun/jdi/FieldWatchpoints.java +++ b/jdk/test/com/sun/jdi/FieldWatchpoints.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4408582 - * @summary Test fix for: JDWP: WatchpointEvents outside of class filtered out + * @test + * @bug 4408582 + * @summary Test fix for: JDWP: WatchpointEvents outside of class filtered out + * @author Tim Bell * - * @author Tim Bell - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g FieldWatchpoints.java - * @run driver FieldWatchpoints + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g FieldWatchpoints.java + * @run driver FieldWatchpoints */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/FilterMatch.java b/jdk/test/com/sun/jdi/FilterMatch.java index 478ec77f04a..07217583540 100644 --- a/jdk/test/com/sun/jdi/FilterMatch.java +++ b/jdk/test/com/sun/jdi/FilterMatch.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4331522 - * @summary addClassFilter("Foo") acts like "Foo*" + * @test + * @bug 4331522 + * @summary addClassFilter("Foo") acts like "Foo*" + * @author Robert Field/Jim Holmlund * - * @author Robert Field/Jim Holmlund - * - * @modules jdk.jdi - * @run build JDIScaffold VMConnection - * @run compile -g HelloWorld.java - * @run driver FilterMatch + * @run build JDIScaffold VMConnection + * @run compile -g HelloWorld.java + * @run driver FilterMatch */ /* Look at patternMatch in JDK file: diff --git a/jdk/test/com/sun/jdi/FilterNoMatch.java b/jdk/test/com/sun/jdi/FilterNoMatch.java index 1c3d6b81656..bf823aba603 100644 --- a/jdk/test/com/sun/jdi/FilterNoMatch.java +++ b/jdk/test/com/sun/jdi/FilterNoMatch.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4331522 - * @summary addClassFilter("Foo") acts like "Foo*" + * @test + * @bug 4331522 + * @summary addClassFilter("Foo") acts like "Foo*" + * @author Robert Field/Jim Holmlund * - * @author Robert Field/Jim Holmlund - * - * @modules jdk.jdi - * @run build JDIScaffold VMConnection - * @run compile -g HelloWorld.java - * @run driver FilterNoMatch + * @run build JDIScaffold VMConnection + * @run compile -g HelloWorld.java + * @run driver FilterNoMatch */ /* This tests the patternMatch function in JDK file: diff --git a/jdk/test/com/sun/jdi/FinalLocalsTest.java b/jdk/test/com/sun/jdi/FinalLocalsTest.java index f8e8deb39de..a76ee82f69a 100644 --- a/jdk/test/com/sun/jdi/FinalLocalsTest.java +++ b/jdk/test/com/sun/jdi/FinalLocalsTest.java @@ -22,18 +22,16 @@ */ /** - * @test - * @bug 4326648 4768329 - * @summary Test to verify that table entries are generated for all final - * locals when a class is built for debug, even if they could be - * inlined otherwise. + * @test + * @bug 4326648 4768329 + * @summary Test to verify that table entries are generated for all final + * locals when a class is built for debug, even if they could be + * inlined otherwise. + * @author Tim Bell * - * @author Tim Bell - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g FinalLocalsTest.java - * @run driver FinalLocalsTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g FinalLocalsTest.java + * @run driver FinalLocalsTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/FinalizerTest.java b/jdk/test/com/sun/jdi/FinalizerTest.java index 6ac34c7894f..1163607b133 100644 --- a/jdk/test/com/sun/jdi/FinalizerTest.java +++ b/jdk/test/com/sun/jdi/FinalizerTest.java @@ -22,16 +22,15 @@ */ /** - * @test - * @bug 4272800 4274208 4392010 - * @summary Test debugger operations in finalize() methods - * @author Gordon Hirsch (modified for HotSpot by tbell & rfield) + * @test + * @bug 4272800 4274208 4392010 + * @summary Test debugger operations in finalize() methods + * @author Gordon Hirsch (modified for HotSpot by tbell & rfield) * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g FinalizerTest.java + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g FinalizerTest.java * - * @run driver FinalizerTest + * @run driver FinalizerTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/FramesTest.java b/jdk/test/com/sun/jdi/FramesTest.java index 88065b8ea9d..b60e7253e47 100644 --- a/jdk/test/com/sun/jdi/FramesTest.java +++ b/jdk/test/com/sun/jdi/FramesTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4434232 - * @summary Test ThreadReference.frames(int,int) + * @test + * @bug 4434232 + * @summary Test ThreadReference.frames(int,int) + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g FramesTest.java - * @run driver FramesTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g FramesTest.java + * @run driver FramesTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/GenericsTest.java b/jdk/test/com/sun/jdi/GenericsTest.java index 375839a37d3..28a3d69a8d6 100644 --- a/jdk/test/com/sun/jdi/GenericsTest.java +++ b/jdk/test/com/sun/jdi/GenericsTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4421040 - * @summary JPDA: Add support for JSR-014 Generics + * @test + * @bug 4421040 + * @summary JPDA: Add support for JSR-014 Generics + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g GenericsTest.java - * @run driver GenericsTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g GenericsTest.java + * @run driver GenericsTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/GetLocalVariables.java b/jdk/test/com/sun/jdi/GetLocalVariables.java index bc21ffde62d..866048f92f0 100644 --- a/jdk/test/com/sun/jdi/GetLocalVariables.java +++ b/jdk/test/com/sun/jdi/GetLocalVariables.java @@ -1,14 +1,39 @@ -/** hard coded linenumbers in this test - DO NOT CHANGE - * @test/nodynamiccopyright/ - * @bug 4359312 4450091 - * @summary Test PTR 1421 JVM exceptions making a call to LocalVariable.type().name() +/* + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * @author Tim Bell (based on the PTR 1421 report submitted by IBM). + * 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. * - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g GetLocalVariables.java - * @run driver GetLocalVariables + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ + +// THIS TEST IS LINE NUMBER SENSITIVE + +/** + * @test + * @bug 4359312 4450091 + * @summary Test PTR 1421 JVM exceptions making a call to LocalVariable.type().name() + * @author Tim Bell (based on the PTR 1421 report submitted by IBM). + * + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g GetLocalVariables.java + * @run driver GetLocalVariables + */ + import com.sun.jdi.*; import com.sun.jdi.event.*; import com.sun.jdi.request.*; @@ -194,7 +219,7 @@ class GetLocalVariablesTarg { l_long, l_float, l_double, l_iarray, l_marray, l_string); - e1.test_1(); // <-- this is line 197 + e1.test_1(); // RESUME_TO_LINE e3.test_1(); e4.test_1(); e5.test_1(); @@ -231,6 +256,7 @@ class GetLocalVariablesTarg { /********** test program **********/ public class GetLocalVariables extends TestScaffold { + static final int RESUME_TO_LINE = 222; ReferenceType targetClass; ThreadReference mainThread; @@ -257,7 +283,7 @@ public class GetLocalVariables extends TestScaffold { mainThread = bpe.thread(); EventRequestManager erm = vm().eventRequestManager(); - bpe = resumeTo("GetLocalVariablesTarg", 197); + bpe = resumeTo("GetLocalVariablesTarg", RESUME_TO_LINE); /* * We've arrived. Look around at some variables. */ diff --git a/jdk/test/com/sun/jdi/GetLocalVariables2Test.java b/jdk/test/com/sun/jdi/GetLocalVariables2Test.java index 65029676bcc..422471501f2 100644 --- a/jdk/test/com/sun/jdi/GetLocalVariables2Test.java +++ b/jdk/test/com/sun/jdi/GetLocalVariables2Test.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4349534 4690242 4695338 - * @summary regression - bad LocalVariableTable attribute when no initialization needed + * @test + * @bug 4349534 4690242 4695338 + * @summary regression - bad LocalVariableTable attribute when no initialization needed + * @author Tim Bell * - * @author Tim Bell - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g GetLocalVariables2Test.java - * @run driver GetLocalVariables2Test + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g GetLocalVariables2Test.java + * @run driver GetLocalVariables2Test */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/GetLocalVariables3Test.sh b/jdk/test/com/sun/jdi/GetLocalVariables3Test.sh index 2910897d989..15ee917b23a 100644 --- a/jdk/test/com/sun/jdi/GetLocalVariables3Test.sh +++ b/jdk/test/com/sun/jdi/GetLocalVariables3Test.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -67,7 +67,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/GetLocalVariables4Test.sh b/jdk/test/com/sun/jdi/GetLocalVariables4Test.sh index bba2d90a86a..b4cff66a37d 100644 --- a/jdk/test/com/sun/jdi/GetLocalVariables4Test.sh +++ b/jdk/test/com/sun/jdi/GetLocalVariables4Test.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -69,7 +69,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/GetSetLocalTest.java b/jdk/test/com/sun/jdi/GetSetLocalTest.java index deaa0b4ac80..e4420e94af2 100644 --- a/jdk/test/com/sun/jdi/GetSetLocalTest.java +++ b/jdk/test/com/sun/jdi/GetSetLocalTest.java @@ -1,13 +1,37 @@ -/** hard coded linenumbers in other tests - DO NOT CHANGE - * @test/nodynamiccopyright/ - * @bug 4300412 - * @summary Test GetLocal* and SetLocal* functions +/* + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * @author Serguei Spitsyn + * 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. * - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g GetSetLocalTest.java - * @run driver GetSetLocalTest + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// THIS TEST IS LINE NUMBER SENSITIVE + +/** + * @test + * @bug 4300412 + * @summary Test GetLocal* and SetLocal* functions + * @author Serguei Spitsyn + * + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g GetSetLocalTest.java + * @run driver GetSetLocalTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; @@ -35,7 +59,7 @@ class GetSetLocalTarg { int result; { { boolean bool_1 = false; - intArg++; + intArg++; // START_LINE } boolean bool_2 = true; @@ -111,7 +135,7 @@ class GetSetLocalTarg { } Object obj_2 = new Object(); - intArg++; // <-- Last stop is at this point. + intArg++; // STOP_LINE. Last stop is at this point. // Only obj_2 and intArg are valid // Note: even result is not valid here! } @@ -125,6 +149,8 @@ class GetSetLocalTarg { /********** test program **********/ public class GetSetLocalTest extends TestScaffold { + static final int START_LINE = 62; + static final int STOP_LINE = 138; ReferenceType targetClass; ThreadReference mainThread; @@ -635,7 +661,7 @@ public class GetSetLocalTest extends TestScaffold { println("EventRequestManager"); StackFrame frame = null; - for (int line = 38; line < 118; line += 4) { + for (int line = START_LINE; line <= STOP_LINE; line += 4) { println("\n resumeTo(GetSetLocalTarg, " + line + ")"); bpe = resumeTo("GetSetLocalTarg", line); frame = bpe.thread().frame(0); diff --git a/jdk/test/com/sun/jdi/GetUninitializedStringValue.java b/jdk/test/com/sun/jdi/GetUninitializedStringValue.java index 66bec8e876d..eb9ae7251c4 100644 --- a/jdk/test/com/sun/jdi/GetUninitializedStringValue.java +++ b/jdk/test/com/sun/jdi/GetUninitializedStringValue.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 8021897 - * @summary Test getting the value for an uninitialized String object + * @test + * @bug 8021897 + * @summary Test getting the value for an uninitialized String object + * @author Staffan Larsen * - * @author Staffan Larsen - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g GetUninitializedStringValue.java - * @run driver GetUninitializedStringValue + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g GetUninitializedStringValue.java + * @run driver GetUninitializedStringValue */ import com.sun.jdi.ReferenceType; import com.sun.jdi.StackFrame; diff --git a/jdk/test/com/sun/jdi/HomeTest.java b/jdk/test/com/sun/jdi/HomeTest.java index dcc23a013ea..d2905fd0ead 100644 --- a/jdk/test/com/sun/jdi/HomeTest.java +++ b/jdk/test/com/sun/jdi/HomeTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4446294 - * @summary JDI spec/impl: default "home" for CommandLineLaunch isn't java.home + * @test + * @bug 4446294 + * @summary JDI spec/impl: default "home" for CommandLineLaunch isn't java.home + * @author Tim Bell (based on "HomeTest.java" by Eugene I. Latkin) * - * @author Tim Bell (based on "HomeTest.java" by Eugene I. Latkin) - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g HomeTest.java - * @run driver HomeTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g HomeTest.java + * @run driver HomeTest */ import com.sun.jdi.*; import com.sun.jdi.connect.*; diff --git a/jdk/test/com/sun/jdi/ImmutableResourceTest.sh b/jdk/test/com/sun/jdi/ImmutableResourceTest.sh index 133925e4b19..b8b37f7e623 100644 --- a/jdk/test/com/sun/jdi/ImmutableResourceTest.sh +++ b/jdk/test/com/sun/jdi/ImmutableResourceTest.sh @@ -21,13 +21,15 @@ # questions. # -# @test -# @bug 6287579 -# @summary SubClasses of ListResourceBundle should fix getContents() -# @author Tim Bell # -# @run shell ImmutableResourceTest.sh +# @test +# @bug 6287579 +# @summary SubClasses of ListResourceBundle should fix getContents() +# @author Tim Bell # +# @modules jdk.jdi/com.sun.tools.example.debug.tty +# +# @run shell ImmutableResourceTest.sh # # Beginning of subroutines: diff --git a/jdk/test/com/sun/jdi/InstanceFilter.java b/jdk/test/com/sun/jdi/InstanceFilter.java index 43cfeddaab0..9514779cf5b 100644 --- a/jdk/test/com/sun/jdi/InstanceFilter.java +++ b/jdk/test/com/sun/jdi/InstanceFilter.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 4312961 - * @summary Verify that an instance filter on a MethodEntryRequest works - * properly. + * @test + * @bug 4312961 + * @summary Verify that an instance filter on a MethodEntryRequest works + * properly. + * @author Robert Field/Jim Holmlund * - * @author Robert Field/Jim Holmlund - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetAdapter TargetListener - * @run compile -g InstanceFilter.java - * @run driver InstanceFilter + * @run build TestScaffold VMConnection TargetAdapter TargetListener + * @run compile -g InstanceFilter.java + * @run driver InstanceFilter */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/InstancesTest.java b/jdk/test/com/sun/jdi/InstancesTest.java index 6f5cbb4c98d..9ef725794c9 100644 --- a/jdk/test/com/sun/jdi/InstancesTest.java +++ b/jdk/test/com/sun/jdi/InstancesTest.java @@ -22,15 +22,14 @@ */ /** - * @test - * @bug 5024119 - * @summary Add ReferenceType.getAllInstances () method to JDI. - * @author jjh + * @test + * @bug 5024119 + * @summary Add ReferenceType.getAllInstances () method to JDI. + * @author jjh * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g InstancesTest.java - * @run driver InstancesTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g InstancesTest.java + * @run driver InstancesTest */ /* diff --git a/jdk/test/com/sun/jdi/InterfaceMethodsTest.java b/jdk/test/com/sun/jdi/InterfaceMethodsTest.java index 953893b0d8a..163235b42e2 100644 --- a/jdk/test/com/sun/jdi/InterfaceMethodsTest.java +++ b/jdk/test/com/sun/jdi/InterfaceMethodsTest.java @@ -22,16 +22,15 @@ */ /** - * @test - * @bug 8031195 - * @bug 8071657 - * @bug 8165827 - * @summary JDI: Add support for static, private and default methods in interfaces + * @test + * @bug 8031195 + * @bug 8071657 + * @bug 8165827 + * @summary JDI: Add support for static, private and default methods in interfaces * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run build InterfaceMethodsTest - * @run driver InterfaceMethodsTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run build InterfaceMethodsTest + * @run driver InterfaceMethodsTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/InterruptHangTest.java b/jdk/test/com/sun/jdi/InterruptHangTest.java index 0e7a24ab785..b93bff7ad8d 100644 --- a/jdk/test/com/sun/jdi/InterruptHangTest.java +++ b/jdk/test/com/sun/jdi/InterruptHangTest.java @@ -26,16 +26,14 @@ import com.sun.jdi.event.*; import com.sun.jdi.request.*; /** - * @test - * @bug 6459476 - * @summary Debuggee is blocked, looks like running + * @test + * @bug 6459476 + * @summary Debuggee is blocked, looks like running + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g InterruptHangTest.java - * @run driver InterruptHangTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g InterruptHangTest.java + * @run driver InterruptHangTest */ /** diff --git a/jdk/test/com/sun/jdi/InvokeHangTest.java b/jdk/test/com/sun/jdi/InvokeHangTest.java index 56ccbc23677..528a25c62c6 100644 --- a/jdk/test/com/sun/jdi/InvokeHangTest.java +++ b/jdk/test/com/sun/jdi/InvokeHangTest.java @@ -22,17 +22,18 @@ */ /** - * @test - * @bug 6293795 - * @summary Backend hangs when invokeMethod is called from a JDI eventHandler + * @test + * @bug 6293795 + * @summary Backend hangs when invokeMethod is called from a JDI eventHandler + * @author jjh * - * @author jjh + * @library /test/lib + * @modules java.management + * jdk.jdi * - * @modules jdk.jdi - * @library /test/lib - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g InvokeHangTest.java - * @run driver InvokeHangTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g InvokeHangTest.java + * @run driver InvokeHangTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/InvokeTest.java b/jdk/test/com/sun/jdi/InvokeTest.java index 09fcc775e86..bacfc38bf91 100644 --- a/jdk/test/com/sun/jdi/InvokeTest.java +++ b/jdk/test/com/sun/jdi/InvokeTest.java @@ -22,17 +22,16 @@ */ /** - * @test - * @bug 4451941 4527072 - * @summary Test argument types for invoke + * @test + * @bug 4451941 4527072 + * @summary Test argument types for invoke + * @author Robert Field * - * @author Robert Field + * @library .. * - * @library .. - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g InvokeTest.java - * @run driver InvokeTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g InvokeTest.java + * @run driver InvokeTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/JITDebug.sh b/jdk/test/com/sun/jdi/JITDebug.sh index 0f8378618a9..21ac8d9f27b 100644 --- a/jdk/test/com/sun/jdi/JITDebug.sh +++ b/jdk/test/com/sun/jdi/JITDebug.sh @@ -24,17 +24,16 @@ # # -# @test JITDebug.sh 1.7 03/09/05 -# @bug 4291701 4376819 4422312 4522770 4913748 -# @summary Test JIT debugging - assure that launching on -# uncaught exception works -# @author Tim Bell -# Based on test/java/awt/TEMPLATE/AutomaticShellTest.sh +# @test JITDebug.sh 1.7 03/09/05 +# @bug 4291701 4376819 4422312 4522770 4913748 +# @summary Test JIT debugging - assure that launching on +# uncaught exception works +# @author Tim Bell +# Based on test/java/awt/TEMPLATE/AutomaticShellTest.sh # -# @modules jdk.jdi -# @run build TestScaffold VMConnection TargetListener TargetAdapter -# @run compile -g JITDebug.java -# @run shell JITDebug.sh +# @run build TestScaffold VMConnection TargetListener TargetAdapter +# @run compile -g JITDebug.java +# @run shell JITDebug.sh # Beginning of subroutines: status=1 diff --git a/jdk/test/com/sun/jdi/Java_gTest.java b/jdk/test/com/sun/jdi/Java_gTest.java index 5d4c811e465..a87da73eea9 100644 --- a/jdk/test/com/sun/jdi/Java_gTest.java +++ b/jdk/test/com/sun/jdi/Java_gTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4500906 4433599 4740097 - * @summary vmexec= debug java fails for SunCommandLineLauncher + * @test + * @bug 4500906 4433599 4740097 + * @summary vmexec= debug java fails for SunCommandLineLauncher + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g Java_gTest.java - * @run driver Java_gTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g Java_gTest.java + * @run driver Java_gTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/JdbExprTest.sh b/jdk/test/com/sun/jdi/JdbExprTest.sh index a3c4ce168f4..a8c11e0a82e 100644 --- a/jdk/test/com/sun/jdi/JdbExprTest.sh +++ b/jdk/test/com/sun/jdi/JdbExprTest.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -53,7 +53,7 @@ class $classname { public static void bkpt() { int i = 0; //@1 breakpoint } - + public static void main(String[] args) { bkpt(); } @@ -73,7 +73,7 @@ dojdbCmds() cmd print java.lang.Long.MIN_VALUE jdbFailIfNotPresent " \= \-9223372036854775808" 3 - + cmd print 9223372036854775807L jdbFailIfNotPresent "9223372036854775807L = 9223372036854775807" 3 cmd print 9223372036854775807 @@ -83,7 +83,7 @@ dojdbCmds() jdbFailIfNotPresent "\-9223372036854775807L = \-9223372036854775807" 3 cmd print -9223372036854775807 jdbFailIfNotPresent "\-9223372036854775807 = \-9223372036854775807" 3 - + cmd print -1 jdbFailIfNotPresent "\-1 = \-1" 3 cmd print 1L @@ -92,7 +92,7 @@ dojdbCmds() jdbFailIfNotPresent "\-1L = \-1" 3 cmd print 0x1 jdbFailIfNotPresent "0x1 = 1" 3 - + cmd set $classname.aLong = 9223372036854775807L cmd print $classname.aLong jdbFailIfNotPresent "$classname.aLong = 9223372036854775807" 3 @@ -142,7 +142,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/JdbLockTest.sh b/jdk/test/com/sun/jdi/JdbLockTest.sh index 6558b98a679..ac5b33e594c 100644 --- a/jdk/test/com/sun/jdi/JdbLockTest.sh +++ b/jdk/test/com/sun/jdi/JdbLockTest.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2003, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -94,7 +94,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/LambdaBreakpointTest.java b/jdk/test/com/sun/jdi/LambdaBreakpointTest.java index 2423b737e47..c0a31bead1b 100644 --- a/jdk/test/com/sun/jdi/LambdaBreakpointTest.java +++ b/jdk/test/com/sun/jdi/LambdaBreakpointTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -21,19 +21,18 @@ * questions. */ -/********** LINE NUMBER SENSITIVE! *****************************************************************/ +// THIS TEST IS LINE NUMBER SENSITIVE /** - * @test - * @summary Test setting breakpoints on lambda calls + * @test + * @summary Test setting breakpoints on lambda calls + * @author Staffan Larsen * - * @author Staffan Larsen - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g LambdaBreakpointTest.java - * @run driver LambdaBreakpointTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g LambdaBreakpointTest.java + * @run driver LambdaBreakpointTest */ + import java.util.List; import com.sun.jdi.LocalVariable; @@ -50,22 +49,17 @@ import com.sun.jdi.event.StepEvent; /********** target program **********/ class LambdaBreakpointTestTarg { - - static int[] breakpointLines = { - 63, 67, 64, 65, 66, 68 - }; - public static void main(String[] args) { test(); } private static void test() { - Runnable r = () -> { // B1: L62 - String from = "lambda"; // B3: L63 - System.out.println("Hello from " + from); // B4: L64 - }; // B5: L65 - r.run(); // B2: L66 - System.out.println("Goodbye."); // B6: L67 + Runnable r = () -> { // LambdaBreakpointTest::TEST_LINE_1, BKPT_LINES[0] + String from = "lambda"; // LambdaBreakpointTest::TEST_LINE_2, BKPT_LINES[2] + System.out.println("Hello from " + from); // LambdaBreakpointTest::TEST_LINE_3, BKPT_LINES[3] + }; // LambdaBreakpointTest::TEST_LINE_4, BKPT_LINES[4] + r.run(); // LambdaBreakpointTest::TEST_LINE_5, BKPT_LINES[1] + System.out.println("Goodbye."); // LambdaBreakpointTest::TEST_LINE_6, BKPT_LINES[5] } } @@ -73,6 +67,21 @@ class LambdaBreakpointTestTarg { /********** test program **********/ public class LambdaBreakpointTest extends TestScaffold { + private static final int TEST_LINE_1 = 57; + private static final int TEST_LINE_2 = TEST_LINE_1 + 1; + private static final int TEST_LINE_3 = TEST_LINE_1 + 2; + private static final int TEST_LINE_4 = TEST_LINE_1 + 3; + private static final int TEST_LINE_5 = TEST_LINE_1 + 4; + private static final int TEST_LINE_6 = TEST_LINE_1 + 5; + + private static final int[] BKPT_LINES = { + TEST_LINE_1, + TEST_LINE_5, + TEST_LINE_2, + TEST_LINE_3, + TEST_LINE_4, + TEST_LINE_6, + }; LambdaBreakpointTest (String args[]) { super(args); @@ -92,7 +101,7 @@ public class LambdaBreakpointTest extends TestScaffold { startToMain("LambdaBreakpointTestTarg"); // Put a breakpoint on each location in the order they should happen - for (int line : LambdaBreakpointTestTarg.breakpointLines) { + for (int line : BKPT_LINES) { System.out.println("Running to line: " + line); BreakpointEvent be = resumeTo("LambdaBreakpointTestTarg", line); int stoppedAt = be.location().lineNumber(); diff --git a/jdk/test/com/sun/jdi/LambdaStepTest.java b/jdk/test/com/sun/jdi/LambdaStepTest.java index 2b594f83997..a5fd06a6ebd 100644 --- a/jdk/test/com/sun/jdi/LambdaStepTest.java +++ b/jdk/test/com/sun/jdi/LambdaStepTest.java @@ -22,15 +22,13 @@ */ /** - * @test - * @summary Test stepping through lambdas + * @test + * @summary Test stepping through lambdas + * @author Staffan Larsen * - * @author Staffan Larsen - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g LambdaStepTest.java - * @run driver LambdaStepTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g LambdaStepTest.java + * @run driver LambdaStepTest */ import com.sun.jdi.LocalVariable; import com.sun.jdi.ObjectReference; diff --git a/jdk/test/com/sun/jdi/LaunchCommandLine.java b/jdk/test/com/sun/jdi/LaunchCommandLine.java index 3a55a5ce66d..e75a5bc982d 100644 --- a/jdk/test/com/sun/jdi/LaunchCommandLine.java +++ b/jdk/test/com/sun/jdi/LaunchCommandLine.java @@ -22,17 +22,16 @@ */ /** - * @test - * @bug 4245011 - * @summary Test launcher command line construction - * @author Gordon Hirsch + * @test + * @bug 4245011 + * @summary Test launcher command line construction + * @author Gordon Hirsch * - * @modules jdk.jdi - * @run build JDIScaffold VMConnection - * @run compile -g HelloWorld.java - * @run build LaunchCommandLine + * @run build JDIScaffold VMConnection + * @run compile -g HelloWorld.java + * @run build LaunchCommandLine * - * @run driver LaunchCommandLine + * @run driver LaunchCommandLine */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/LineNumberInfo.java b/jdk/test/com/sun/jdi/LineNumberInfo.java index 5b7ff743efa..5172dc16154 100644 --- a/jdk/test/com/sun/jdi/LineNumberInfo.java +++ b/jdk/test/com/sun/jdi/LineNumberInfo.java @@ -27,7 +27,6 @@ * @summary Test javac regressions in the generation of line number info * @author Gordon Hirsch * - * @modules jdk.jdi * @run build TestScaffold VMConnection TargetListener TargetAdapter * @run compile -XDstringConcat=inline -g LineNumberInfo.java ControlFlow.java * diff --git a/jdk/test/com/sun/jdi/LineNumberOnBraceTest.java b/jdk/test/com/sun/jdi/LineNumberOnBraceTest.java index 49b558c76cd..413ea98270f 100644 --- a/jdk/test/com/sun/jdi/LineNumberOnBraceTest.java +++ b/jdk/test/com/sun/jdi/LineNumberOnBraceTest.java @@ -1,13 +1,37 @@ +/* + * 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 + * 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. + */ + +// THIS TEST IS LINE NUMBER SENSITIVE + /** - * @test/nodynamiccopyright/ - * @bug 4952629 4870514 - * @summary REGRESSION: javac generates a spurious line number entry on } else { + * @test + * @bug 4952629 4870514 + * @summary REGRESSION: javac generates a spurious line number entry on } else { + * @author jjh * - * @author jjh - * - * @run build VMConnection TargetListener TargetAdapter - * @run compile -g LineNumberOnBraceTest.java - * @run driver LineNumberOnBraceTest + * @run build VMConnection TargetListener TargetAdapter + * @run compile -g LineNumberOnBraceTest.java + * @run driver LineNumberOnBraceTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; @@ -15,29 +39,27 @@ import com.sun.jdi.request.*; import java.util.*; - /********** LINE NUMBER SENSITIVE! *****************************************************************/ class LineNumberOnBraceTarg { - public final static int stopLine = 29; // THIS MUST BE THE LINE NUMBER OF THE // stopline LINE - public final static int stopLine2 = 35; // THIS MUST BE THE LINE NUMBER OF THE // stopline2 LINE - + public final static int STOP_LINE = 50; // THIS MUST BE THE LINE NUMBER OF // STOP_LINE LINE + public final static int STOP_LINE_2 = 56; // THIS MUST BE THE LINE NUMBER OF // STOP_LINE_2 LINE public static void main(String[] args){ System.out.println("Howdy!"); if (args.length == 0) { - System.out.println("No args to debuggee"); // stopLine + System.out.println("No args to debuggee"); // STOP_LINE } else { System.out.println("Some args to debuggee"); } - if (args.length == 0) { + if (args.length == 0) { // STOP_LINE + 4 boolean b1 = false; - if (b1) { // stopLine2 + if (b1) { // STOP_LINE_2 System.out.println("In 2nd else"); // bug 4870514 is that we stop here. } } else { System.out.println("In 2nd else"); } - System.out.println("Goodbye from LineNumberOnBraceTarg!"); // stopLine2 + 6 + System.out.println("Goodbye from LineNumberOnBraceTarg!"); } // This isn't part of the test; it is just here @@ -78,7 +100,7 @@ public class LineNumberOnBraceTest extends TestScaffold { targetClass = bpe.location().declaringType(); mainThread = bpe.thread(); - resumeTo("LineNumberOnBraceTarg", LineNumberOnBraceTarg.stopLine); + resumeTo("LineNumberOnBraceTarg", LineNumberOnBraceTarg.STOP_LINE); StepEvent stepev = stepOverLine(mainThread); // step to 2nd if (args.length // Bug 4952629 is that javac outputs a line number @@ -87,24 +109,23 @@ public class LineNumberOnBraceTest extends TestScaffold { int ln = stepev.location().lineNumber(); System.out.println("Debuggee is stopped at line " + ln); - if (ln != LineNumberOnBraceTarg.stopLine + 4) { + if (ln != LineNumberOnBraceTarg.STOP_LINE + 4) { failure("FAIL: Bug 4952629: Should be at line " + - (LineNumberOnBraceTarg.stopLine + 4) + + (LineNumberOnBraceTarg.STOP_LINE + 4) + ", am at " + ln); } else { System.out.println("Passed test for 4952629"); } // Test for bug 4870514 - System.out.println("Resuming to " + LineNumberOnBraceTarg.stopLine2); - resumeTo("LineNumberOnBraceTarg", LineNumberOnBraceTarg.stopLine2); - System.out.println("Stopped at " + LineNumberOnBraceTarg.stopLine2); + System.out.println("Resuming to " + LineNumberOnBraceTarg.STOP_LINE_2); + resumeTo("LineNumberOnBraceTarg", LineNumberOnBraceTarg.STOP_LINE_2); + System.out.println("Stopped at " + LineNumberOnBraceTarg.STOP_LINE_2); stepev = stepOverLine(mainThread); ln = stepev.location().lineNumber(); System.out.println("Debuggee is stopped at line " + ln); - if (ln == LineNumberOnBraceTarg.stopLine2 + 1) { - failure("FAIL: bug 4870514: Incorrectly stopped at " + - (LineNumberOnBraceTarg.stopLine2 + 1)); + if (ln <= LineNumberOnBraceTarg.STOP_LINE_2 + 1) { + failure("FAIL: bug 4870514: Incorrectly stopped at " + ln); } else { System.out.println("Passed test for 4870514"); } diff --git a/jdk/test/com/sun/jdi/ListenAddress.java b/jdk/test/com/sun/jdi/ListenAddress.java index 25613905141..46ec16a263c 100644 --- a/jdk/test/com/sun/jdi/ListenAddress.java +++ b/jdk/test/com/sun/jdi/ListenAddress.java @@ -26,7 +26,6 @@ * @summary Test that startListening(Map) method of the com.sun.jdi.SocketListen * Connector returns an address that is usable for the address option on * remove debuggees. - * @modules jdk.jdi */ import java.net.InetAddress; import java.net.Inet4Address; diff --git a/jdk/test/com/sun/jdi/LocalVariableEqual.java b/jdk/test/com/sun/jdi/LocalVariableEqual.java index ed3ef665fc1..7663bfaad0e 100644 --- a/jdk/test/com/sun/jdi/LocalVariableEqual.java +++ b/jdk/test/com/sun/jdi/LocalVariableEqual.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4916263 - * @summary Test + * @test + * @bug 4916263 + * @summary Test + * @author Serguei Spitsyn * - * @author Serguei Spitsyn - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g LocalVariableEqual.java - * @run driver LocalVariableEqual + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g LocalVariableEqual.java + * @run driver LocalVariableEqual */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/LocationTest.java b/jdk/test/com/sun/jdi/LocationTest.java index 52a34e29658..64b91a660cd 100644 --- a/jdk/test/com/sun/jdi/LocationTest.java +++ b/jdk/test/com/sun/jdi/LocationTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4419453 - * @summary Test that Method.location() returns the right values + * @test + * @bug 4419453 + * @summary Test that Method.location() returns the right values + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g LocationTest.java - * @run driver LocationTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g LocationTest.java + * @run driver LocationTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/MethodEntryExitEvents.java b/jdk/test/com/sun/jdi/MethodEntryExitEvents.java index 174505f399d..5901546614b 100644 --- a/jdk/test/com/sun/jdi/MethodEntryExitEvents.java +++ b/jdk/test/com/sun/jdi/MethodEntryExitEvents.java @@ -22,17 +22,16 @@ */ /** - * @test - * @bug 4409241 4432820 - * @summary Test the bug fix for: MethodExitEvents disappear when Object-Methods are called from main - * @author Tim Bell + * @test + * @bug 4409241 4432820 + * @summary Test the bug fix for: MethodExitEvents disappear when Object-Methods are called from main + * @author Tim Bell * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g MethodEntryExitEvents.java - * @run driver MethodEntryExitEvents SUSPEND_EVENT_THREAD MethodEntryExitEventsDebugee - * @run driver MethodEntryExitEvents SUSPEND_NONE MethodEntryExitEventsDebugee - * @run driver MethodEntryExitEvents SUSPEND_ALL MethodEntryExitEventsDebugee + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g MethodEntryExitEvents.java + * @run driver MethodEntryExitEvents SUSPEND_EVENT_THREAD MethodEntryExitEventsDebugee + * @run driver MethodEntryExitEvents SUSPEND_NONE MethodEntryExitEventsDebugee + * @run driver MethodEntryExitEvents SUSPEND_ALL MethodEntryExitEventsDebugee */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/MethodExitReturnValuesTest.java b/jdk/test/com/sun/jdi/MethodExitReturnValuesTest.java index d9131b00b00..9f55258ce04 100644 --- a/jdk/test/com/sun/jdi/MethodExitReturnValuesTest.java +++ b/jdk/test/com/sun/jdi/MethodExitReturnValuesTest.java @@ -22,15 +22,14 @@ */ /** - * @test - * @bug 4195445 6204179 - * @summary JDWP, JDI: Add return value to Method Exit Event - * @author Jim Holmlund + * @test + * @bug 4195445 6204179 + * @summary JDWP, JDI: Add return value to Method Exit Event + * @author Jim Holmlund * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g MethodExitReturnValuesTest.java - * @run driver MethodExitReturnValuesTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g MethodExitReturnValuesTest.java + * @run driver MethodExitReturnValuesTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/MixedSuspendTest.sh b/jdk/test/com/sun/jdi/MixedSuspendTest.sh index e18b20bd120..a676d8e14bd 100644 --- a/jdk/test/com/sun/jdi/MixedSuspendTest.sh +++ b/jdk/test/com/sun/jdi/MixedSuspendTest.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,16 +23,14 @@ # questions. # -# @test -# @bug 6224859 -# @summary JDWP: Mixing application suspends and debugger suspends can cause hangs -# -# @author Jim Holmlund -# -# @key intermittent -# @modules jdk.jdi -# @run build TestScaffold VMConnection TargetListener TargetAdapter -# @run shell MixedSuspendTest.sh +# @test +# @bug 6224859 +# @key intermittent +# @summary JDWP: Mixing application suspends and debugger suspends can cause hangs +# @author Jim Holmlund +# +# @run build TestScaffold VMConnection TargetListener TargetAdapter +# @run shell MixedSuspendTest.sh classname=MixedSuspendTarg @@ -84,7 +82,7 @@ public class $classname extends Thread { int i = 0; } } - + System.out.println("Debuggee: end of thread"); } @@ -113,7 +111,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/ModificationWatchpoints.java b/jdk/test/com/sun/jdi/ModificationWatchpoints.java index 482f8b78ef9..48f259eb4a6 100644 --- a/jdk/test/com/sun/jdi/ModificationWatchpoints.java +++ b/jdk/test/com/sun/jdi/ModificationWatchpoints.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 4409582 - * @summary Test all info returned by modification watchpoints + * @test + * @bug 4409582 + * @summary Test all info returned by modification watchpoints + * @author Daniel Prusa (or someone in the FFJ group) + * @author Robert Field (modified to JDIScaffold) * - * @author Daniel Prusa (or someone in the FFJ group) - * @author Robert Field (modified to JDIScaffold) - * - * @modules jdk.jdi - * @run build JDIScaffold VMConnection - * @run compile -g ModificationWatchpoints.java - * @run driver ModificationWatchpoints + * @run build JDIScaffold VMConnection + * @run compile -g ModificationWatchpoints.java + * @run driver ModificationWatchpoints */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/ModulesTest.java b/jdk/test/com/sun/jdi/ModulesTest.java index 359293f6297..e3495af74fd 100644 --- a/jdk/test/com/sun/jdi/ModulesTest.java +++ b/jdk/test/com/sun/jdi/ModulesTest.java @@ -22,14 +22,13 @@ */ /** - * @test - * @bug 8049365 - * @summary Tests the JDI and JDWP update for modules + * @test + * @bug 8049365 + * @summary Tests the JDI and JDWP update for modules * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g ModulesTest.java - * @run driver ModulesTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g ModulesTest.java + * @run driver ModulesTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/MonitorEventTest.java b/jdk/test/com/sun/jdi/MonitorEventTest.java index 8f33071dc3e..d8e10b21cfd 100644 --- a/jdk/test/com/sun/jdi/MonitorEventTest.java +++ b/jdk/test/com/sun/jdi/MonitorEventTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4401399 - * @summary Simple basic test of jdi Monitor request and event. + * @test + * @bug 4401399 + * @summary Simple basic test of jdi Monitor request and event. + * @author Swamy Venkataramanappa * - * @author Swamy Venkataramanappa - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g MonitorEventTest.java - * @run driver MonitorEventTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g MonitorEventTest.java + * @run driver MonitorEventTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/MonitorFrameInfo.java b/jdk/test/com/sun/jdi/MonitorFrameInfo.java index 420170644c5..796039c93e4 100644 --- a/jdk/test/com/sun/jdi/MonitorFrameInfo.java +++ b/jdk/test/com/sun/jdi/MonitorFrameInfo.java @@ -22,17 +22,16 @@ */ /** - * @test - * @bug 6230699 - * @summary Test ThreadReference.ownedMonitorsAndFrames() - * @bug 6701700 - * @summary MonitorInfo objects aren't invalidated when the owning thread is resumed - * @author Swamy Venkataramanappa + * @test + * @bug 6230699 + * @summary Test ThreadReference.ownedMonitorsAndFrames() + * @bug 6701700 + * @summary MonitorInfo objects aren't invalidated when the owning thread is resumed + * @author Swamy Venkataramanappa * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g MonitorFrameInfo.java - * @run driver MonitorFrameInfo + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g MonitorFrameInfo.java + * @run driver MonitorFrameInfo */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/MultiBreakpointsTest.java b/jdk/test/com/sun/jdi/MultiBreakpointsTest.java index eda894ee470..0d007cd410d 100644 --- a/jdk/test/com/sun/jdi/MultiBreakpointsTest.java +++ b/jdk/test/com/sun/jdi/MultiBreakpointsTest.java @@ -23,16 +23,14 @@ /** - * @test - * @bug 4359247 - * @summary Breakpoints on multiple threads have problems. + * @test + * @bug 4359247 + * @summary Breakpoints on multiple threads have problems. + * @author tbell, jjh * - * @author tbell, jjh - * - * @modules jdk.jdi - * @build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g MultiBreakpointsTest.java - * @run driver MultiBreakpointsTest + * @build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g MultiBreakpointsTest.java + * @run driver MultiBreakpointsTest */ /* diff --git a/jdk/test/com/sun/jdi/NativeInstanceFilter.java b/jdk/test/com/sun/jdi/NativeInstanceFilter.java index c14960860e1..04cb2acb4ec 100644 --- a/jdk/test/com/sun/jdi/NativeInstanceFilter.java +++ b/jdk/test/com/sun/jdi/NativeInstanceFilter.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 6426034 - * @summary Instance filter doesn't filter event if it occurs in native method + * @test + * @bug 6426034 + * @summary Instance filter doesn't filter event if it occurs in native method + * @author Keith McGuigan * - * @author Keith McGuigan - * - * @modules jdk.jdi - * @run build JDIScaffold VMConnection - * @compile -XDignore.symbol.file NativeInstanceFilterTarg.java - * @run driver NativeInstanceFilter + * @run build JDIScaffold VMConnection + * @compile -XDignore.symbol.file NativeInstanceFilterTarg.java + * @run driver NativeInstanceFilter */ /* diff --git a/jdk/test/com/sun/jdi/NewInstanceTest.java b/jdk/test/com/sun/jdi/NewInstanceTest.java index 3950462cbd2..42069f17ef5 100644 --- a/jdk/test/com/sun/jdi/NewInstanceTest.java +++ b/jdk/test/com/sun/jdi/NewInstanceTest.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 4419450 - * @summary Test newInstance() for arrays - currently covers - * only reference type arrays (see bug #4450091). + * @test + * @bug 4419450 + * @summary Test newInstance() for arrays - currently covers + * only reference type arrays (see bug #4450091). + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g NewInstanceTest.java - * @run driver NewInstanceTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g NewInstanceTest.java + * @run driver NewInstanceTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/NoLaunchOptionTest.java b/jdk/test/com/sun/jdi/NoLaunchOptionTest.java index fdaa4adc374..2927dd32ead 100644 --- a/jdk/test/com/sun/jdi/NoLaunchOptionTest.java +++ b/jdk/test/com/sun/jdi/NoLaunchOptionTest.java @@ -30,8 +30,9 @@ import jdk.testlibrary.ProcessTools; * @bug 4554734 4724714 * @summary Test for -Xrunjdwp:[onthrow,onuncaught] suboptions require launch suboption * @author Tim Bell + * * @library /lib/testlibrary - * @modules jdk.jdi + * * @run compile -g NoLaunchOptionTest.java * @build jdk.testlibrary.* VMConnection * @run driver NoLaunchOptionTest diff --git a/jdk/test/com/sun/jdi/NoLocInfoTest.java b/jdk/test/com/sun/jdi/NoLocInfoTest.java index 71263c2fc39..4bb75bbc6a8 100644 --- a/jdk/test/com/sun/jdi/NoLocInfoTest.java +++ b/jdk/test/com/sun/jdi/NoLocInfoTest.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 4642611 - * @summary Test that method.allLineLocations() should - * throw AbsentInformationException exception + * @test + * @bug 4642611 + * @summary Test that method.allLineLocations() should + * throw AbsentInformationException exception + * @author Serguei Spitsyn * - * @author Serguei Spitsyn - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g:none NoLocInfoTest.java - * @run driver NoLocInfoTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g:none NoLocInfoTest.java + * @run driver NoLocInfoTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/NullLocalVariable.sh b/jdk/test/com/sun/jdi/NullLocalVariable.sh index ce38929471f..14447d1cb2d 100644 --- a/jdk/test/com/sun/jdi/NullLocalVariable.sh +++ b/jdk/test/com/sun/jdi/NullLocalVariable.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -40,10 +40,10 @@ public class badscope { public static final void main(String args[]) { try { System.out.println("hi!"); // @1 breakpoint - } catch (Exception e) { + } catch (Exception e) { e.printStackTrace(); } finally { - System.out.println("done"); + System.out.println("done"); } } } @@ -71,7 +71,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/NullThreadGroupNameTest.java b/jdk/test/com/sun/jdi/NullThreadGroupNameTest.java index 2afad2121cb..dbc18ec5e77 100644 --- a/jdk/test/com/sun/jdi/NullThreadGroupNameTest.java +++ b/jdk/test/com/sun/jdi/NullThreadGroupNameTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,13 +22,12 @@ */ /** - * @test - * @bug 7105883 - * @summary Ensure that JDWP doesn't crash with a null thread group name + * @test + * @bug 7105883 + * @summary Ensure that JDWP doesn't crash with a null thread group name * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run driver NullThreadGroupNameTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run driver NullThreadGroupNameTest */ import com.sun.jdi.*; import com.sun.jdi.connect.*; diff --git a/jdk/test/com/sun/jdi/OnThrowTest.java b/jdk/test/com/sun/jdi/OnThrowTest.java index ce9725663c6..a62970591ca 100644 --- a/jdk/test/com/sun/jdi/OnThrowTest.java +++ b/jdk/test/com/sun/jdi/OnThrowTest.java @@ -22,16 +22,15 @@ */ /* - * @test OnThrowTest.java - * @bug 6263814 - * @summary Test for -agentlib::[onthrow,launch] - * @author Kelly O'Hair + * @test OnThrowTest.java + * @bug 6263814 + * @summary Test for -agentlib::[onthrow,launch] + * @author Kelly O'Hair * - * @modules jdk.jdi - * @run compile -g OnThrowTest.java - * @run compile -g OnThrowTarget.java - * @run compile -g VMConnection.java - * @run driver OnThrowTest + * @run compile -g OnThrowTest.java + * @run compile -g OnThrowTarget.java + * @run compile -g VMConnection.java + * @run driver OnThrowTest */ import java.io.File; diff --git a/jdk/test/com/sun/jdi/OptionTest.java b/jdk/test/com/sun/jdi/OptionTest.java index 967146c737f..9d7dbb2abe1 100644 --- a/jdk/test/com/sun/jdi/OptionTest.java +++ b/jdk/test/com/sun/jdi/OptionTest.java @@ -22,16 +22,15 @@ */ /* - * @test OptionTest - * @bug 5095072 - * @summary Test for misc jdwp options, just that the option is parsed - * @author Kelly O'Hair (copied from Tim Bell's NoLaunchOptionTest) + * @test OptionTest + * @bug 5095072 + * @summary Test for misc jdwp options, just that the option is parsed + * @author Kelly O'Hair (copied from Tim Bell's NoLaunchOptionTest) * - * @modules jdk.jdi - * @run compile -g OptionTest.java - * @run compile -g HelloWorld.java - * @run compile -g VMConnection.java - * @run driver OptionTest + * @run compile -g OptionTest.java + * @run compile -g HelloWorld.java + * @run compile -g VMConnection.java + * @run driver OptionTest */ import java.net.ServerSocket; diff --git a/jdk/test/com/sun/jdi/PopAndInvokeTest.java b/jdk/test/com/sun/jdi/PopAndInvokeTest.java index 65cd5a5a0d4..7f265f937ee 100644 --- a/jdk/test/com/sun/jdi/PopAndInvokeTest.java +++ b/jdk/test/com/sun/jdi/PopAndInvokeTest.java @@ -22,17 +22,16 @@ */ /** - * @test - * @bug 6517249 - * @modules jdk.jdi - * @ignore 6951287 - * @summary JDWP: Cannot do an invokeMethod after a popFrames operation + * @test + * @bug 6517249 + * @summary JDWP: Cannot do an invokeMethod after a popFrames operation + * @author jjh * - * @author jjh + * @ignore 6951287 * - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g PopAndInvokeTest.java - * @run driver PopAndInvokeTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g PopAndInvokeTest.java + * @run driver PopAndInvokeTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/PopAndStepTest.java b/jdk/test/com/sun/jdi/PopAndStepTest.java index a0150fae110..598a78bf34c 100644 --- a/jdk/test/com/sun/jdi/PopAndStepTest.java +++ b/jdk/test/com/sun/jdi/PopAndStepTest.java @@ -1,17 +1,39 @@ -/* /nodynamiccopyright/ */ // DO NOT DELETE ANY LINES!!!! +/* + * 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 + * 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. + */ + // THIS TEST IS LINE NUMBER SENSITIVE + /** - * @test - * @bug 4530424 - * @summary Hin says that doing a step over after a popframe acts like a resume. + * @test + * @bug 4530424 + * @summary Hin says that doing a step over after a popframe acts like a resume. + * @author jjh * - * @author jjh + * @library .. * - * @library .. - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g PopAndStepTest.java - * @run driver PopAndStepTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g PopAndStepTest.java + * @run driver PopAndStepTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; @@ -19,25 +41,23 @@ import com.sun.jdi.request.*; import java.util.*; - /********** LINE NUMBER SENSITIVE! *****************************************************************/ - class PopAndStepTarg { public void B() { - System.out.println("debuggee: in B"); - System.out.println("debuggee: in B, back to A"); // add line breakpoint here line 27 !!! + System.out.println("debuggee: in B"); // B_LINE_1 + System.out.println("debuggee: in B, back to A"); // B_LINE_2 } public void A() { - System.out.println("debuggee: in A, about to call B"); // line 31 - B(); - System.out.println("debuggee: in A, back from B"); // line 33 - throw new RuntimeException("debuggee: Got to line 34"); + System.out.println("debuggee: in A, about to call B"); // A_LINE_1 + B(); // A_LINE_2 + System.out.println("debuggee: in A, back from B"); // A_LINE_3 + throw new RuntimeException("debuggee: Got to line A_LINE_4:" + PopAndStepTest.A_LINE_4); // A_LINE_4 } public static void main(String[] args) { - System.out.println("debuggee: Howdy!"); // line 38 - PopAndStepTarg xxx = new PopAndStepTarg(); // line 40 - xxx.A(); // line 41 + System.out.println("debuggee: Howdy!"); // MAIN_LINE_1 + PopAndStepTarg xxx = new PopAndStepTarg(); // MAIN_LINE_2 + xxx.A(); // MAIN_LINE_3 System.out.println("debugee: Goodbye from PopAndStepTarg!"); } } @@ -46,6 +66,18 @@ class PopAndStepTarg { /********** test program **********/ public class PopAndStepTest extends TestScaffold { + static final int B_LINE_1 = 46; + static final int B_LINE_2 = B_LINE_1 + 1; + + static final int A_LINE_1 = 51; + static final int A_LINE_2 = A_LINE_1 + 1; + static final int A_LINE_3 = A_LINE_1 + 2; + static final int A_LINE_4 = A_LINE_1 + 3; + + static final int MAIN_LINE_1 = 58; + static final int MAIN_LINE_2 = MAIN_LINE_1 + 1; + static final int MAIN_LINE_3 = MAIN_LINE_1 + 2; + ReferenceType targetClass; ThreadReference mainThread; @@ -116,10 +148,10 @@ public class PopAndStepTest extends TestScaffold { BreakpointEvent bpe = startToMain("PopAndStepTarg"); targetClass = bpe.location().declaringType(); mainThread = bpe.thread(); - getDebuggeeLineNum(38); + getDebuggeeLineNum(MAIN_LINE_1); - println("Resuming to line 27"); - bpe = resumeTo("PopAndStepTarg", 27); getDebuggeeLineNum(27); + println("Resuming to line B_LINE_2 : " + B_LINE_2); + bpe = resumeTo("PopAndStepTarg", B_LINE_2); getDebuggeeLineNum(B_LINE_2); // The failure is this: // create step request @@ -141,21 +173,21 @@ public class PopAndStepTest extends TestScaffold { srInto.enable(); // This fails mainThread.popFrames(frameFor("A")); //srInto.enable(); // if the enable is moved here, it passes - println("Popped back to line 41 in main, the call to A()"); - println("Stepping into line 31"); - waitForRequestedEvent(srInto); // println + println("Popped back to line MAIN_LINE_3(" + MAIN_LINE_3 + ") in main, the call to A()"); + println("Stepping into line A_LINE_1:" + A_LINE_1); + waitForRequestedEvent(srInto); // println srInto.disable(); - getDebuggeeLineNum(31); + getDebuggeeLineNum(A_LINE_1); // The failure occurs here. - println("Stepping over to line 32"); - stepOverLine(mainThread); // println - getDebuggeeLineNum(32); + println("Stepping over to line A_LINE_2:" + A_LINE_2); + stepOverLine(mainThread); // println + getDebuggeeLineNum(A_LINE_2); - println("Stepping over to line 33"); - stepOverLine(mainThread); // call to B() - getDebuggeeLineNum(33); + println("Stepping over to line A_LINE_3:" + A_LINE_3); + stepOverLine(mainThread); // call to B() + getDebuggeeLineNum(A_LINE_3); vm().exit(0); diff --git a/jdk/test/com/sun/jdi/PopAsynchronousTest.java b/jdk/test/com/sun/jdi/PopAsynchronousTest.java index 2adf47e7c56..203b5475c80 100644 --- a/jdk/test/com/sun/jdi/PopAsynchronousTest.java +++ b/jdk/test/com/sun/jdi/PopAsynchronousTest.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 4467564 - * @summary Test the popping of frames in an asynchronous context - * (that is, when suspended by the debugger at random points) + * @test + * @bug 4467564 + * @summary Test the popping of frames in an asynchronous context + * (that is, when suspended by the debugger at random points) + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g PopAsynchronousTest.java - * @run driver PopAsynchronousTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g PopAsynchronousTest.java + * @run driver PopAsynchronousTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/PopSynchronousTest.java b/jdk/test/com/sun/jdi/PopSynchronousTest.java index 674e17e26c8..29809bfaabe 100644 --- a/jdk/test/com/sun/jdi/PopSynchronousTest.java +++ b/jdk/test/com/sun/jdi/PopSynchronousTest.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 4467564 - * @summary Test the popping of frames in synchronous context - * (that is, when stopped at an event) + * @test + * @bug 4467564 + * @summary Test the popping of frames in synchronous context + * (that is, when stopped at an event) + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g PopSynchronousTest.java - * @run driver PopSynchronousTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g PopSynchronousTest.java + * @run driver PopSynchronousTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/ProcessAttachTest.java b/jdk/test/com/sun/jdi/ProcessAttachTest.java index 6ee43f52e65..29a08909740 100644 --- a/jdk/test/com/sun/jdi/ProcessAttachTest.java +++ b/jdk/test/com/sun/jdi/ProcessAttachTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, 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 @@ -23,13 +23,11 @@ import java.io.IOException; import java.io.InputStream; -import java.util.List; import java.util.Map; import jdk.testlibrary.ProcessTools; import com.sun.jdi.Bootstrap; -import com.sun.jdi.ThreadReference; import com.sun.jdi.VirtualMachine; import com.sun.jdi.connect.AttachingConnector; import com.sun.jdi.connect.Connector; @@ -86,7 +84,7 @@ public class ProcessAttachTest { is.read(); // Attach a debugger - tryDebug(p.getPid()); + tryDebug(p.pid()); } finally { p.destroyForcibly(); } diff --git a/jdk/test/com/sun/jdi/RedefineChangeClassOrder.sh b/jdk/test/com/sun/jdi/RedefineChangeClassOrder.sh index b14a42201b3..0113c3304b9 100644 --- a/jdk/test/com/sun/jdi/RedefineChangeClassOrder.sh +++ b/jdk/test/com/sun/jdi/RedefineChangeClassOrder.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2006, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -135,7 +135,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/RedefineCrossEvent.java b/jdk/test/com/sun/jdi/RedefineCrossEvent.java index 69f24b33b99..c61dd3cb92f 100644 --- a/jdk/test/com/sun/jdi/RedefineCrossEvent.java +++ b/jdk/test/com/sun/jdi/RedefineCrossEvent.java @@ -22,52 +22,52 @@ */ /** - * @test - * @bug 4628726 - * @summary Test class redefinition at each event cross tested with other tests + * @test + * @bug 4628726 + * @summary Test class redefinition at each event cross tested with other tests + * @author Robert Field * - * @author Robert Field + * @modules java.corba + * jdk.jdi * - * @modules java.corba - * jdk.jdi - * @run build TestScaffold VMConnection TargetAdapter TargetListener - * @run compile -g AccessSpecifierTest.java - * @run compile -g AfterThreadDeathTest.java - * @run compile -g ArrayRangeTest.java - * @run compile -g BacktraceFieldTest.java - * @run compile -g ClassesByName2Test.java - * @run compile -g DebuggerThreadTest.java - * @run compile -g DeleteEventRequestsTest.java - * @run compile -g ExceptionEvents.java - * @run compile -g ExpiredRequestDeletionTest.java - * @run compile -g FieldWatchpoints.java - * @run build InstanceFilter - * @run compile -g LocationTest.java - * @run compile -g NewInstanceTest.java - * @run compile -g PopSynchronousTest.java - * @run compile -g RepStepTarg.java - * @run compile -g RequestReflectionTest.java + * @run build TestScaffold VMConnection TargetAdapter TargetListener + * @run compile -g AccessSpecifierTest.java + * @run compile -g AfterThreadDeathTest.java + * @run compile -g ArrayRangeTest.java + * @run compile -g BacktraceFieldTest.java + * @run compile -g ClassesByName2Test.java + * @run compile -g DebuggerThreadTest.java + * @run compile -g DeleteEventRequestsTest.java + * @run compile -g ExceptionEvents.java + * @run compile -g ExpiredRequestDeletionTest.java + * @run compile -g FieldWatchpoints.java + * @run build InstanceFilter + * @run compile -g LocationTest.java + * @run compile -g NewInstanceTest.java + * @run compile -g PopSynchronousTest.java + * @run compile -g RepStepTarg.java + * @run compile -g RequestReflectionTest.java * - * @run driver AccessSpecifierTest -redefstart -redefevent - * @run driver AfterThreadDeathTest -redefstart -redefevent - * @run driver ArrayRangeTest -redefstart -redefevent - * @run driver BacktraceFieldTest -redefstart -redefevent - * @run driver ClassesByName2Test -redefstart -redefevent - * @run driver DebuggerThreadTest -redefstart -redefevent - * @run driver DeleteEventRequestsTest -redefstart -redefevent - * @run driver ExceptionEvents -redefstart -redefevent N A StackOverflowCaughtTarg java.lang.Exception - * @run driver ExceptionEvents -redefstart -redefevent C A StackOverflowCaughtTarg null - * @run driver ExceptionEvents -redefstart -redefevent C A StackOverflowCaughtTarg java.lang.StackOverflowError - * @run driver ExceptionEvents -redefstart -redefevent N A StackOverflowCaughtTarg java.lang.NullPointerException - * @run driver ExceptionEvents -redefstart -redefevent C T StackOverflowCaughtTarg java.lang.Error - * @run driver ExceptionEvents -redefstart -redefevent N T StackOverflowCaughtTarg java.lang.NullPointerException - * @run driver ExceptionEvents -redefstart -redefevent N N StackOverflowCaughtTarg java.lang.Exception - * @run driver ExceptionEvents -redefstart -redefevent C N StackOverflowCaughtTarg java.lang.Error - * @run driver ExceptionEvents -redefstart -redefevent N A StackOverflowUncaughtTarg java.lang.Exception - * @run driver ExpiredRequestDeletionTest -redefstart -redefevent - * @run driver FieldWatchpoints -redefstart -redefevent - * @run driver InstanceFilter -redefstart -redefevent - * @run driver LocationTest -redefstart -redefevent - * @run driver NewInstanceTest -redefstart -redefevent - * @run driver RequestReflectionTest -redefstart -redefevent + * @run driver AccessSpecifierTest -redefstart -redefevent + * @run driver AfterThreadDeathTest -redefstart -redefevent + * @run driver ArrayRangeTest -redefstart -redefevent + * @run driver BacktraceFieldTest -redefstart -redefevent + * @run driver ClassesByName2Test -redefstart -redefevent + * @run driver DebuggerThreadTest -redefstart -redefevent + * @run driver DeleteEventRequestsTest -redefstart -redefevent + * @run driver ExceptionEvents -redefstart -redefevent N A StackOverflowCaughtTarg java.lang.Exception + * @run driver ExceptionEvents -redefstart -redefevent C A StackOverflowCaughtTarg null + * @run driver ExceptionEvents -redefstart -redefevent C A StackOverflowCaughtTarg java.lang.StackOverflowError + * @run driver ExceptionEvents -redefstart -redefevent N A StackOverflowCaughtTarg java.lang.NullPointerException + * @run driver ExceptionEvents -redefstart -redefevent C T StackOverflowCaughtTarg java.lang.Error + * @run driver ExceptionEvents -redefstart -redefevent N T StackOverflowCaughtTarg java.lang.NullPointerException + * @run driver ExceptionEvents -redefstart -redefevent N N StackOverflowCaughtTarg java.lang.Exception + * @run driver ExceptionEvents -redefstart -redefevent C N StackOverflowCaughtTarg java.lang.Error + * @run driver ExceptionEvents -redefstart -redefevent N A StackOverflowUncaughtTarg java.lang.Exception + * @run driver ExpiredRequestDeletionTest -redefstart -redefevent + * @run driver FieldWatchpoints -redefstart -redefevent + * @run driver InstanceFilter -redefstart -redefevent + * @run driver LocationTest -redefstart -redefevent + * @run driver NewInstanceTest -redefstart -redefevent + * @run driver RequestReflectionTest -redefstart -redefevent */ diff --git a/jdk/test/com/sun/jdi/RedefineCrossStart.java b/jdk/test/com/sun/jdi/RedefineCrossStart.java index 51869c6cf36..5bacec137d3 100644 --- a/jdk/test/com/sun/jdi/RedefineCrossStart.java +++ b/jdk/test/com/sun/jdi/RedefineCrossStart.java @@ -22,29 +22,28 @@ */ /** - * @test - * @bug 4628726 - * @summary Test class redefinition at start only (they use breakpoint - * or resumeTo()) cross tested with other tests. - * ExceptionEvents/StackOverflowUncaughtTarg are here because they hit - * an unrelated crash in event testing. + * @test + * @bug 4628726 + * @summary Test class redefinition at start only (they use breakpoint + * or resumeTo()) cross tested with other tests. + * ExceptionEvents/StackOverflowUncaughtTarg are here because they hit + * an unrelated crash in event testing. * - * @author Robert Field + * @author Robert Field * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g CountEvent.java - * @run compile -g CountFilterTest.java - * @run compile -g FramesTest.java - * @run compile -g InvokeTest.java + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g CountEvent.java + * @run compile -g CountFilterTest.java + * @run compile -g FramesTest.java + * @run compile -g InvokeTest.java * - * @run driver CountEvent -redefstart - * @run driver CountFilterTest -redefstart - * @run driver FramesTest -redefstart - * @run driver InvokeTest -redefstart + * @run driver CountEvent -redefstart + * @run driver CountFilterTest -redefstart + * @run driver FramesTest -redefstart + * @run driver InvokeTest -redefstart * - * @run driver ExceptionEvents -redefstart U A StackOverflowUncaughtTarg null - * @run driver ExceptionEvents -redefstart U A StackOverflowUncaughtTarg java.lang.Error - * @run driver ExceptionEvents -redefstart U A StackOverflowUncaughtTarg java.lang.StackOverflowError - * @run driver PopSynchronousTest -redefstart + * @run driver ExceptionEvents -redefstart U A StackOverflowUncaughtTarg null + * @run driver ExceptionEvents -redefstart U A StackOverflowUncaughtTarg java.lang.Error + * @run driver ExceptionEvents -redefstart U A StackOverflowUncaughtTarg java.lang.StackOverflowError + * @run driver PopSynchronousTest -redefstart */ diff --git a/jdk/test/com/sun/jdi/RedefineException.sh b/jdk/test/com/sun/jdi/RedefineException.sh index c2f0555f79e..19ea8cc70a1 100644 --- a/jdk/test/com/sun/jdi/RedefineException.sh +++ b/jdk/test/com/sun/jdi/RedefineException.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -75,7 +75,7 @@ public class $1 { } System.out.println("a2: done"); } - + public void a3() throws Exception { int a3local = 3; String a3string = "a3"; @@ -105,7 +105,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/RedefineImplementor.sh b/jdk/test/com/sun/jdi/RedefineImplementor.sh index dd7f83e8a0c..071ceec26e9 100644 --- a/jdk/test/com/sun/jdi/RedefineImplementor.sh +++ b/jdk/test/com/sun/jdi/RedefineImplementor.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2006, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -81,7 +81,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/RedefineIntConstantToLong.sh b/jdk/test/com/sun/jdi/RedefineIntConstantToLong.sh index bd3bb514d52..049d6b6451c 100644 --- a/jdk/test/com/sun/jdi/RedefineIntConstantToLong.sh +++ b/jdk/test/com/sun/jdi/RedefineIntConstantToLong.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2006, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -50,13 +50,13 @@ public final class $1 { } public long m2(int j) { - System.out.println(System.getProperty("line.separator") + + System.out.println(System.getProperty("line.separator") + "**** public long m2(int j) with value: " + j); return j; } public long m2(long j) { - System.out.println(System.getProperty("line.separator") + + System.out.println(System.getProperty("line.separator") + "**** public long m2(long j) with value: " + j); return j; } @@ -102,7 +102,7 @@ mysetup() for ii in . $TESTSRC $TESTSRC/.. ; do if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh + . $ii/ShellScaffold.sh break fi done diff --git a/jdk/test/com/sun/jdi/ReferrersTest.java b/jdk/test/com/sun/jdi/ReferrersTest.java index 3293b089f31..385292061b6 100644 --- a/jdk/test/com/sun/jdi/ReferrersTest.java +++ b/jdk/test/com/sun/jdi/ReferrersTest.java @@ -22,15 +22,14 @@ */ /** - * @test - * @bug 5089849 - * @summary Add support for backtracking reference graph. - * @author jjh + * @test + * @bug 5089849 + * @summary Add support for backtracking reference graph. + * @author jjh * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g ReferrersTest.java - * @run driver ReferrersTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g ReferrersTest.java + * @run driver ReferrersTest */ /* diff --git a/jdk/test/com/sun/jdi/RepStep.java b/jdk/test/com/sun/jdi/RepStep.java index fce9c2bda8b..252cf4d2eea 100644 --- a/jdk/test/com/sun/jdi/RepStep.java +++ b/jdk/test/com/sun/jdi/RepStep.java @@ -22,18 +22,16 @@ */ /** - * @test - * @bug 4334008 - * @author Robert Field - * - * @modules jdk.jdi - * @run compile -g RepStepTarg.java - * @run build VMConnection RepStep - * - * @run driver RepStep - * + * @test + * @bug 4334008 * @summary RepStep detects missed step events due to lack of * frame pop events (in back-end). + * @author Robert Field + * + * @run compile -g RepStepTarg.java + * @run build VMConnection RepStep + * + * @run driver RepStep */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/RequestReflectionTest.java b/jdk/test/com/sun/jdi/RequestReflectionTest.java index 41e3e4f4b7c..7983b87e387 100644 --- a/jdk/test/com/sun/jdi/RequestReflectionTest.java +++ b/jdk/test/com/sun/jdi/RequestReflectionTest.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 4425840 - * @author Robert Field + * @test + * @bug 4425840 + * @summary RequestReflectionTest checks to see that reflective + * accessors on EventRequests return what they are given. + * @author Robert Field * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g RequestReflectionTest.java - * @run driver RequestReflectionTest - * - * @summary RequestReflectionTest checks to see that reflective - * accessors on EventRequests return what they are given. + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g RequestReflectionTest.java + * @run driver RequestReflectionTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/ResumeOneThreadTest.java b/jdk/test/com/sun/jdi/ResumeOneThreadTest.java index 39bc76a0743..68a43c65a0a 100644 --- a/jdk/test/com/sun/jdi/ResumeOneThreadTest.java +++ b/jdk/test/com/sun/jdi/ResumeOneThreadTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 6700889 - * @summary Thread resume invalidates all stack frames, even from other threads + * @test + * @bug 6700889 + * @summary Thread resume invalidates all stack frames, even from other threads + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g ResumeOneThreadTest.java - * @run driver ResumeOneThreadTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g ResumeOneThreadTest.java + * @run driver ResumeOneThreadTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/SDENullTest.java b/jdk/test/com/sun/jdi/SDENullTest.java index 32c08b74482..d5e4c9da07a 100644 --- a/jdk/test/com/sun/jdi/SDENullTest.java +++ b/jdk/test/com/sun/jdi/SDENullTest.java @@ -22,16 +22,15 @@ */ /** - * @test - * @bug 4621289 - * @summary vm.setDefaultStratum(null) causes a Null Ptr exception + * @test + * @bug 4621289 + * @summary vm.setDefaultStratum(null) causes a Null Ptr exception * - * @author jjh + * @author jjh * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g SDENullTest.java - * @run driver SDENullTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g SDENullTest.java + * @run driver SDENullTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/SimulResumerTest.java b/jdk/test/com/sun/jdi/SimulResumerTest.java index 7d9fae6c2a9..e27fa353087 100644 --- a/jdk/test/com/sun/jdi/SimulResumerTest.java +++ b/jdk/test/com/sun/jdi/SimulResumerTest.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 6751643 - * @summary ThreadReference.ownedMonitors() can return null + * @test + * @bug 6751643 + * @key intermittent + * @summary ThreadReference.ownedMonitors() can return null + * @author jjh * - * @author jjh - * - * @key intermittent - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g SimulResumerTest.java - * @run driver SimulResumerTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g SimulResumerTest.java + * @run driver SimulResumerTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/SourceNameFilterTest.java b/jdk/test/com/sun/jdi/SourceNameFilterTest.java index ae3a0a2fd9f..ec5d097f562 100644 --- a/jdk/test/com/sun/jdi/SourceNameFilterTest.java +++ b/jdk/test/com/sun/jdi/SourceNameFilterTest.java @@ -22,18 +22,16 @@ */ /** - * @test - * @bug 4836939 6646613 - * @summary JDI add addSourceNameFilter to ClassPrepareRequest + * @test + * @bug 4836939 6646613 + * @summary JDI add addSourceNameFilter to ClassPrepareRequest + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g SourceNameFilterTest.java - * @run driver SourceNameFilterTest - * @run compile -g:none SourceNameFilterTest.java - * @run driver SourceNameFilterTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g SourceNameFilterTest.java + * @run driver SourceNameFilterTest + * @run compile -g:none SourceNameFilterTest.java + * @run driver SourceNameFilterTest */ // The compile -g:none suppresses the lineNumber table to trigger bug 6646613. diff --git a/jdk/test/com/sun/jdi/StepTest.java b/jdk/test/com/sun/jdi/StepTest.java index 4e829e94bfa..8d07334f715 100644 --- a/jdk/test/com/sun/jdi/StepTest.java +++ b/jdk/test/com/sun/jdi/StepTest.java @@ -22,16 +22,15 @@ */ /** - * @test - * @bug 4270488 4787861 - * @author Gordon Hirsch + * @test + * @bug 4270488 4787861 + * @author Gordon Hirsch * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetAdapter TargetListener - * @run compile -g MethodCalls.java - * @run compile -g MethodCallsReflection.java - * @run compile -g ControlFlow.java - * @run build StepTest + * @run build TestScaffold VMConnection TargetAdapter TargetListener + * @run compile -g MethodCalls.java + * @run compile -g MethodCallsReflection.java + * @run compile -g ControlFlow.java + * @run build StepTest * * @summary StepTest starts at a method named "go()" in the debuggee and * repetitively steps. It will do a step into until the maximum @@ -46,21 +45,21 @@ * for the debuggee files- MethodCalls.java, ... * See LineNumberInfo.java for more info. * - * +--- maximum stack depth in debuggee - * | +--- step granularity: "line" or "min" - * | | +---Expected number of steps - * | | | +--- Debuggee command Line - * V V V V Workaround-----+ - * V - * @run driver StepTest 2 line 2 MethodCalls - * @run driver StepTest 3 line 14 MethodCalls + * +--- maximum stack depth in debuggee + * | +--- step granularity: "line" or "min" + * | | +---Expected number of steps + * | | | +--- Debuggee command Line + * V V V V Workaround-----+ + * V + * @run driver StepTest 2 line 2 MethodCalls + * @run driver StepTest 3 line 14 MethodCalls * - * @run driver StepTest 2 line 18 MethodCallsReflection 12 + * @run driver StepTest 2 line 18 MethodCallsReflection 12 * - * @run driver StepTest 2 min 4 MethodCalls - * @run driver StepTest 3 min 43 MethodCalls + * @run driver StepTest 2 min 4 MethodCalls + * @run driver StepTest 3 min 43 MethodCalls * - * @run driver StepTest 2 line 65 ControlFlow 64 + * @run driver StepTest 2 line 65 ControlFlow 64 */ /* diff --git a/jdk/test/com/sun/jdi/SuspendThreadTest.java b/jdk/test/com/sun/jdi/SuspendThreadTest.java index 49b488864d5..5e386724568 100644 --- a/jdk/test/com/sun/jdi/SuspendThreadTest.java +++ b/jdk/test/com/sun/jdi/SuspendThreadTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 6485605 - * @summary com.sun.jdi.InternalException: Inconsistent suspend policy in internal event handler + * @test + * @bug 6485605 + * @summary com.sun.jdi.InternalException: Inconsistent suspend policy in internal event handler + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g SuspendThreadTest.java - * @run driver SuspendThreadTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g SuspendThreadTest.java + * @run driver SuspendThreadTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/TEST.properties b/jdk/test/com/sun/jdi/TEST.properties new file mode 100644 index 00000000000..8db30faef7c --- /dev/null +++ b/jdk/test/com/sun/jdi/TEST.properties @@ -0,0 +1,2 @@ +modules = jdk.jdi + diff --git a/jdk/test/com/sun/jdi/TemplateTest.java b/jdk/test/com/sun/jdi/TemplateTest.java index cff19abd733..4f5425a656a 100644 --- a/jdk/test/com/sun/jdi/TemplateTest.java +++ b/jdk/test/com/sun/jdi/TemplateTest.java @@ -25,16 +25,14 @@ // TEMPLATE: change bug number and fill out and // TEMPLATE: delete TEMPLATE lines /** - * @test - * @bug 0000000 - * @summary + * @test + * @bug 0000000 + * @summary + * @author * - * @author - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g TemplateTest.java - * @run driver TemplateTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g TemplateTest.java + * @run driver TemplateTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/ThreadGroupTest.java b/jdk/test/com/sun/jdi/ThreadGroupTest.java index cdd0f361f8d..bcd6ea32eb5 100644 --- a/jdk/test/com/sun/jdi/ThreadGroupTest.java +++ b/jdk/test/com/sun/jdi/ThreadGroupTest.java @@ -22,16 +22,15 @@ */ /** - * @test - * @bug 4893530 - * @summary If JDI is initially started from a thread group that is subsequently - * destroyed this should not impact subsequent thread creation by - * the virtual machine manager. + * @test + * @bug 4893530 + * @summary If JDI is initially started from a thread group that is subsequently + * destroyed this should not impact subsequent thread creation by + * the virtual machine manager. * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile ThreadGroupTest.java - * @run driver ThreadGroupTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile ThreadGroupTest.java + * @run driver ThreadGroupTest */ import com.sun.jdi.*; import com.sun.jdi.connect.*; diff --git a/jdk/test/com/sun/jdi/TwoThreadsTest.java b/jdk/test/com/sun/jdi/TwoThreadsTest.java index ca981d9b6e9..3e560ea5bb9 100644 --- a/jdk/test/com/sun/jdi/TwoThreadsTest.java +++ b/jdk/test/com/sun/jdi/TwoThreadsTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 6296125 - * @summary JDI: Disabling an EventRequest can cause a multi-threaded debuggee to hang + * @test + * @bug 6296125 + * @summary JDI: Disabling an EventRequest can cause a multi-threaded debuggee to hang + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g TwoThreadsTest.java - * @run driver TwoThreadsTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g TwoThreadsTest.java + * @run driver TwoThreadsTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/UTF8Test.java b/jdk/test/com/sun/jdi/UTF8Test.java index 1325a0a48db..945a5354124 100644 --- a/jdk/test/com/sun/jdi/UTF8Test.java +++ b/jdk/test/com/sun/jdi/UTF8Test.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 5033550 - * @summary JDWP back end uses modified UTF-8 + * @test + * @bug 5033550 + * @summary JDWP back end uses modified UTF-8 + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g UTF8Test.java - * @run driver UTF8Test + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g UTF8Test.java + * @run driver UTF8Test */ /* diff --git a/jdk/test/com/sun/jdi/UnpreparedByName.java b/jdk/test/com/sun/jdi/UnpreparedByName.java index aa7c6639f1e..43ec5678a91 100644 --- a/jdk/test/com/sun/jdi/UnpreparedByName.java +++ b/jdk/test/com/sun/jdi/UnpreparedByName.java @@ -22,18 +22,17 @@ */ /** - * @test - * @bug 4368402 - * @summary UnpreparedByName verifies that unprepared classes - * won't be returned by classesByName. - * @author Robert Field + * @test + * @bug 4368402 + * @summary UnpreparedByName verifies that unprepared classes + * won't be returned by classesByName. + * @author Robert Field * - * @modules jdk.jdi - * @run build JDIScaffold VMConnection - * @run compile -g InnerTarg.java - * @run build UnpreparedByName + * @run build JDIScaffold VMConnection + * @run compile -g InnerTarg.java + * @run build UnpreparedByName * - * @run driver UnpreparedByName InnerTarg + * @run driver UnpreparedByName InnerTarg */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/UnpreparedClasses.java b/jdk/test/com/sun/jdi/UnpreparedClasses.java index 4e96fb6415e..fd21a76089d 100644 --- a/jdk/test/com/sun/jdi/UnpreparedClasses.java +++ b/jdk/test/com/sun/jdi/UnpreparedClasses.java @@ -22,18 +22,17 @@ */ /** - * @test - * @bug 4368402 - * @summary UnpreparedClasses verifies that all the classes in the - * loaded class list are prepared classes. - * @author Robert Field + * @test + * @bug 4368402 + * @summary UnpreparedClasses verifies that all the classes in the + * loaded class list are prepared classes. + * @author Robert Field * - * @modules jdk.jdi - * @run build JDIScaffold VMConnection - * @run compile -g InnerTarg.java - * @run build UnpreparedClasses + * @run build JDIScaffold VMConnection + * @run compile -g InnerTarg.java + * @run build UnpreparedClasses * - * @run driver UnpreparedClasses InnerTarg + * @run driver UnpreparedClasses InnerTarg */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/VMDeathLastTest.java b/jdk/test/com/sun/jdi/VMDeathLastTest.java index 0df54af3894..47b59c96ff0 100644 --- a/jdk/test/com/sun/jdi/VMDeathLastTest.java +++ b/jdk/test/com/sun/jdi/VMDeathLastTest.java @@ -22,17 +22,15 @@ */ /** - * @test - * @bug 4420844 4449394 - * @summary Checks that no events are sent after VMDeath, and test vm.canBeModified + * @test + * @bug 4420844 4449394 + * @summary Checks that no events are sent after VMDeath, and test vm.canBeModified + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g HelloWorld.java - * @run build VMDeathLastTest - * @run driver VMDeathLastTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g HelloWorld.java + * @run build VMDeathLastTest + * @run driver VMDeathLastTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/VMDeathRequestTest.java b/jdk/test/com/sun/jdi/VMDeathRequestTest.java index 784ddaf4a30..67eaad369a2 100644 --- a/jdk/test/com/sun/jdi/VMDeathRequestTest.java +++ b/jdk/test/com/sun/jdi/VMDeathRequestTest.java @@ -22,22 +22,20 @@ */ /** - * @test - * @bug 4419314 - * @author Robert Field - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g HelloWorld.java - * @run build VMDeathRequestTest - * @run driver VMDeathRequestTest - * + * @test + * @bug 4419314 * @summary VMDeathRequestTest checks to see that * VMDisconnectedException is never thrown before VMDisconnectEvent. * * Failure mode for this test is throwing VMDisconnectedException * on vm.eventQueue().remove(); * Does not use a scaffold since we don't want that hiding the exception. + * @author Robert Field + * + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g HelloWorld.java + * @run build VMDeathRequestTest + * @run driver VMDeathRequestTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/VarargsTest.java b/jdk/test/com/sun/jdi/VarargsTest.java index 4bb015e8950..4bdeb15d24a 100644 --- a/jdk/test/com/sun/jdi/VarargsTest.java +++ b/jdk/test/com/sun/jdi/VarargsTest.java @@ -22,16 +22,14 @@ */ /** - * @test - * @bug 4870984 - * @summary JPDA: Add support for RFE 4856541 - varargs + * @test + * @bug 4870984 + * @summary JPDA: Add support for RFE 4856541 - varargs + * @author jjh * - * @author jjh - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g VarargsTest.java - * @run driver VarargsTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g VarargsTest.java + * @run driver VarargsTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/Vars.java b/jdk/test/com/sun/jdi/Vars.java index edffff3f720..bb5e955679a 100644 --- a/jdk/test/com/sun/jdi/Vars.java +++ b/jdk/test/com/sun/jdi/Vars.java @@ -22,15 +22,13 @@ */ /** - * @test - * @summary Test Method.variables() and the like. + * @test + * @summary Test Method.variables() and the like. + * @author Robert Field * - * @author Robert Field - * - * @modules jdk.jdi - * @run build JDIScaffold VMConnection - * @run compile -g Vars.java - * @run driver Vars + * @run build JDIScaffold VMConnection + * @run compile -g Vars.java + * @run driver Vars */ import com.sun.jdi.*; diff --git a/jdk/test/com/sun/jdi/VisibleMethods.java b/jdk/test/com/sun/jdi/VisibleMethods.java index 2cc088571e5..95c42b8b651 100644 --- a/jdk/test/com/sun/jdi/VisibleMethods.java +++ b/jdk/test/com/sun/jdi/VisibleMethods.java @@ -22,16 +22,14 @@ */ /** - * @test - * @summary Test ReferenceType.visibleMethods - * @bug 8028430 + * @test + * @summary Test ReferenceType.visibleMethods + * @bug 8028430 + * @author Staffan Larsen * - * @author Staffan Larsen - * - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g VisibleMethods.java - * @run driver VisibleMethods + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g VisibleMethods.java + * @run driver VisibleMethods */ import com.sun.jdi.Method; import com.sun.jdi.ReferenceType; diff --git a/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java b/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java index dd3dec369fa..a726e19192f 100644 --- a/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java +++ b/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java @@ -30,7 +30,6 @@ * to encapsulate the transport. This tests that the connectors are * created and that they have an "address" argument. * - * @modules jdk.jdi/com.sun.tools.jdi * @build GeneratedConnectors NullTransportService SimpleLaunchingConnector * @run main/othervm GeneratedConnectors */ diff --git a/jdk/test/com/sun/jdi/redefine/RedefineTest.java b/jdk/test/com/sun/jdi/redefine/RedefineTest.java index 1f8d1256900..1ef2a0c3b10 100644 --- a/jdk/test/com/sun/jdi/redefine/RedefineTest.java +++ b/jdk/test/com/sun/jdi/redefine/RedefineTest.java @@ -22,20 +22,20 @@ */ /** - * @test - * @bug 4287595 - * @bug 4462989 - * @bug 4531511 - * @summary Test class redefinition + * @test + * @bug 4287595 + * @bug 4462989 + * @bug 4531511 + * @summary Test class redefinition * - * @author Robert Field + * @author Robert Field * - * @library .. - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g RedefineTest.java - * @run shell RedefineSetUp.sh - * @run driver RedefineTest + * @library .. + * + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g RedefineTest.java + * @run shell RedefineSetUp.sh + * @run driver RedefineTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/redefineMethod/RedefineTest.java b/jdk/test/com/sun/jdi/redefineMethod/RedefineTest.java index d504a0e5cdc..a3ae8b00d9e 100644 --- a/jdk/test/com/sun/jdi/redefineMethod/RedefineTest.java +++ b/jdk/test/com/sun/jdi/redefineMethod/RedefineTest.java @@ -22,19 +22,18 @@ */ /** - * @test - * @bug 4628726 - * @summary Test class redefinition - method data line numbers and local vars, + * @test + * @bug 4628726 + * @summary Test class redefinition - method data line numbers and local vars, + * @author Robert Field * - * @author Robert Field + * @library .. * - * @library .. - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g RedefineTest.java - * @run shell RedefineSetUp.sh - * @run driver RedefineTest -repeat 3 - * @run driver RedefineTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g RedefineTest.java + * @run shell RedefineSetUp.sh + * @run driver RedefineTest -repeat 3 + * @run driver RedefineTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/sde/FilterMangleTest.java b/jdk/test/com/sun/jdi/sde/FilterMangleTest.java index 349a73ffbb1..96461095c15 100644 --- a/jdk/test/com/sun/jdi/sde/FilterMangleTest.java +++ b/jdk/test/com/sun/jdi/sde/FilterMangleTest.java @@ -1,31 +1,30 @@ /** - * @test - * @bug 4836939 - * @summary JDI add addSourceNameFilter to ClassPrepareRequest + * @test + * @bug 4836939 + * @key intermittent + * @summary JDI add addSourceNameFilter to ClassPrepareRequest + * @author Robert Field / Jim Holmlund * - * @author Robert Field / Jim Holmlund + * @library .. * - * @key intermittent - * @library .. - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter InstallSDE - * @run compile FilterMangleTest.java - * @run compile -g onion/pickle/Mangle.java - * @run driver FilterMangleTest - * @run driver FilterMangleTest SDE-pMangle.java* - * @run driver FilterMangleTest SDE-pMangle.jav* - * @run driver FilterMangleTest SDE-pMangle.j* - * @run driver FilterMangleTest SDE-p*Mangle.java - * @run driver FilterMangleTest SDE-p*angle.java - * @run driver FilterMangleTest SDE-p*java - * @run driver FilterMangleTest SDE-pMangle.xyz - * @run driver FilterMangleTest SDE-pIncl.rats* - * @run driver FilterMangleTest SDE-pIncl.rat* - * @run driver FilterMangleTest SDE-p*angle.rats - * @run driver FilterMangleTest SDE-f*Incl.rat - * @run driver FilterMangleTest SDE-ffred - * @run driver FilterMangleTest SDE-f*ratsx - * @run driver FilterMangleTest SDE-fMangle.javax* + * @run build TestScaffold VMConnection TargetListener TargetAdapter InstallSDE + * @run compile FilterMangleTest.java + * @run compile -g onion/pickle/Mangle.java + * @run driver FilterMangleTest + * @run driver FilterMangleTest SDE-pMangle.java* + * @run driver FilterMangleTest SDE-pMangle.jav* + * @run driver FilterMangleTest SDE-pMangle.j* + * @run driver FilterMangleTest SDE-p*Mangle.java + * @run driver FilterMangleTest SDE-p*angle.java + * @run driver FilterMangleTest SDE-p*java + * @run driver FilterMangleTest SDE-pMangle.xyz + * @run driver FilterMangleTest SDE-pIncl.rats* + * @run driver FilterMangleTest SDE-pIncl.rat* + * @run driver FilterMangleTest SDE-p*angle.rats + * @run driver FilterMangleTest SDE-f*Incl.rat + * @run driver FilterMangleTest SDE-ffred + * @run driver FilterMangleTest SDE-f*ratsx + * @run driver FilterMangleTest SDE-fMangle.javax* */ /* diff --git a/jdk/test/com/sun/jdi/sde/MangleStepTest.java b/jdk/test/com/sun/jdi/sde/MangleStepTest.java index 0d135f9411d..15f1d1ff0fc 100644 --- a/jdk/test/com/sun/jdi/sde/MangleStepTest.java +++ b/jdk/test/com/sun/jdi/sde/MangleStepTest.java @@ -1,21 +1,20 @@ /** - * @test - * @bug 4390869 - * @bug 4460328 - * @summary Test Stepping in the new SourceDebugExtension facility + * @test + * @bug 4390869 + * @bug 4460328 + * @summary Test Stepping in the new SourceDebugExtension facility + * @author Robert Field * - * @author Robert Field + * @library .. * - * @library .. - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter InstallSDE - * @run compile MangleStepTest.java - * @run compile -g onion/pickle/Mangle.java - * @run driver MangleStepTest unset - * @run driver MangleStepTest Java - * @run driver MangleStepTest XYZ - * @run driver MangleStepTest Rats - * @run driver MangleStepTest bogus + * @run build TestScaffold VMConnection TargetListener TargetAdapter InstallSDE + * @run compile MangleStepTest.java + * @run compile -g onion/pickle/Mangle.java + * @run driver MangleStepTest unset + * @run driver MangleStepTest Java + * @run driver MangleStepTest XYZ + * @run driver MangleStepTest Rats + * @run driver MangleStepTest bogus */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/sde/MangleTest.java b/jdk/test/com/sun/jdi/sde/MangleTest.java index c766ffa5616..301bef0d59f 100644 --- a/jdk/test/com/sun/jdi/sde/MangleTest.java +++ b/jdk/test/com/sun/jdi/sde/MangleTest.java @@ -1,17 +1,16 @@ /** - * @test - * @bug 4390869 - * @bug 4460328 - * @summary Test the new SourceDebugExtension facility + * @test + * @bug 4390869 + * @bug 4460328 + * @summary Test the new SourceDebugExtension facility + * @author Robert Field * - * @author Robert Field + * @library .. * - * @library .. - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter InstallSDE - * @run compile MangleTest.java - * @run compile -g onion/pickle/Mangle.java - * @run driver MangleTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter InstallSDE + * @run compile MangleTest.java + * @run compile -g onion/pickle/Mangle.java + * @run driver MangleTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/sde/SourceDebugExtensionTest.java b/jdk/test/com/sun/jdi/sde/SourceDebugExtensionTest.java index 62b65147ea0..fb4372f85d6 100644 --- a/jdk/test/com/sun/jdi/sde/SourceDebugExtensionTest.java +++ b/jdk/test/com/sun/jdi/sde/SourceDebugExtensionTest.java @@ -1,17 +1,16 @@ /** - * @test - * @bug 4390869 - * @bug 4460328 - * @summary Test the new SourceDebugExtension facility + * @test + * @bug 4390869 + * @bug 4460328 + * @summary Test the new SourceDebugExtension facility + * @author Robert Field * - * @author Robert Field + * @library .. * - * @library .. - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter InstallSDE - * @run compile SourceDebugExtensionTest.java - * @run compile -g SourceDebugExtensionTarg.java - * @run driver SourceDebugExtensionTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter InstallSDE + * @run compile SourceDebugExtensionTest.java + * @run compile -g SourceDebugExtensionTarg.java + * @run driver SourceDebugExtensionTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jdi/sde/TemperatureTableTest.java b/jdk/test/com/sun/jdi/sde/TemperatureTableTest.java index 130e72a28ac..36c3e71c35f 100644 --- a/jdk/test/com/sun/jdi/sde/TemperatureTableTest.java +++ b/jdk/test/com/sun/jdi/sde/TemperatureTableTest.java @@ -1,17 +1,16 @@ /** - * @test - * @bug 4390869 - * @bug 4460328 - * @summary Test the new SourceDebugExtension facility + * @test + * @bug 4390869 + * @bug 4460328 + * @summary Test the new SourceDebugExtension facility + * @author Robert Field * - * @author Robert Field + * @library .. * - * @library .. - * @modules jdk.jdi - * @run build TestScaffold VMConnection TargetListener TargetAdapter InstallSDE HelloWorld - * @run compile TemperatureTableTest.java - * @run compile -g TemperatureTableServlet.java - * @run driver TemperatureTableTest + * @run build TestScaffold VMConnection TargetListener TargetAdapter InstallSDE HelloWorld + * @run compile TemperatureTableTest.java + * @run compile -g TemperatureTableServlet.java + * @run driver TemperatureTableTest */ import com.sun.jdi.*; import com.sun.jdi.event.*; diff --git a/jdk/test/com/sun/jndi/dns/Parser.java b/jdk/test/com/sun/jndi/dns/Parser.java index 58c7bd578b3..2cc4fb584c4 100644 --- a/jdk/test/com/sun/jndi/dns/Parser.java +++ b/jdk/test/com/sun/jndi/dns/Parser.java @@ -26,7 +26,6 @@ * @bug 8035105 * @summary DNS resource record parsing * @modules jdk.naming.dns/com.sun.jndi.dns:+open - * @compile --add-modules jdk.naming.dns Parser.java */ import com.sun.jndi.dns.ResourceRecord; diff --git a/jdk/test/com/sun/jndi/dns/Test6991580.java b/jdk/test/com/sun/jndi/dns/Test6991580.java index b8763bbbd0b..191cfd12c29 100644 --- a/jdk/test/com/sun/jndi/dns/Test6991580.java +++ b/jdk/test/com/sun/jndi/dns/Test6991580.java @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -37,7 +37,6 @@ import java.awt.event.ActionListener; * @summary IPv6 Nameservers in resolv.conf throws NumberFormatException * @modules java.desktop * jdk.naming.dns/com.sun.jndi.dns - * @compile --add-modules jdk.naming.dns IPv6NameserverPlatformParsingTest.java * @run main/manual Test6991580 */ diff --git a/jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java b/jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java index f75eb88d1b0..e18442dba50 100644 --- a/jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java +++ b/jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -29,7 +29,6 @@ * java.rmi/sun.rmi.server java.rmi/sun.rmi.transport java.rmi/sun.rmi.transport.tcp * @library ../../../../../../java/rmi/testlibrary * @build TestLibrary - * @compile --add-modules jdk.naming.rmi ContextWithNullProperties.java * @run main/othervm ContextWithNullProperties */ diff --git a/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanDoubleInvocationTest.java b/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanDoubleInvocationTest.java index 3bfd07f89cf..34def0074d9 100644 --- a/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanDoubleInvocationTest.java +++ b/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanDoubleInvocationTest.java @@ -27,7 +27,6 @@ * @summary Basic Test for the DiagnosticCommandMBean * @author Frederic Parain, Shanliang JIANG * - * @modules jdk.management * @run main/othervm DcmdMBeanDoubleInvocationTest */ diff --git a/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanInvocationTest.java b/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanInvocationTest.java index a42070d646b..f28e77a75ed 100644 --- a/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanInvocationTest.java +++ b/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanInvocationTest.java @@ -27,7 +27,6 @@ * @summary Basic Test for the DiagnosticCommandMBean * @author Frederic Parain, Shanliang JIANG * - * @modules jdk.management * @run main/othervm DcmdMBeanInvocationTest */ diff --git a/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanPermissionsTest.java b/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanPermissionsTest.java index 748e49a0915..545890f7347 100644 --- a/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanPermissionsTest.java +++ b/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanPermissionsTest.java @@ -27,7 +27,9 @@ * @summary Permissions Tests for the DiagnosticCommandMBean * @author Frederic Parain * - * @modules jdk.management + * @modules java.logging + * java.management + * * @run main/othervm DcmdMBeanPermissionsTest */ diff --git a/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTest.java b/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTest.java index 8f988b2934a..3cc9f40b895 100644 --- a/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTest.java +++ b/jdk/test/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTest.java @@ -27,7 +27,6 @@ * @summary Basic Test for the DiagnosticCommandMBean * @author Frederic Parain, Shanliang JIANG * - * @modules jdk.management * @run main/othervm DcmdMBeanTest */ diff --git a/jdk/test/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java b/jdk/test/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java index c580c49df17..db33387b4b7 100644 --- a/jdk/test/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java +++ b/jdk/test/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ * @summary Sanity Test for GarbageCollectorMXBean.getLastGcInfo(). * @author Mandy Chung * - * @modules jdk.management * @run main/othervm -XX:-ExplicitGCInvokesConcurrent LastGCInfo */ // Passing "-XX:-ExplicitGCInvokesConcurrent" to force System.gc() diff --git a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java index 1f98e2b6709..4a0f1d845ef 100644 --- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java +++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java @@ -66,6 +66,7 @@ public class CheckOrigin { "-XX:+UseCodeAging", "-XX:+UseCerealGC", // Should be ignored. "-XX:Flags=" + flagsFile.getAbsolutePath(), + "-Djdk.attach.allowAttachSelf", "-cp", System.getProperty("test.class.path"), "CheckOrigin", "-runtests"); diff --git a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions.java b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions.java index 7e3f247d36d..a40b9d41492 100644 --- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions.java +++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions.java @@ -27,7 +27,6 @@ * @summary Basic Test for HotSpotDiagnosticMXBean.getDiagnosticOptions() * @author Daniel Fuchs * - * @modules jdk.management * @run main GetDiagnosticOptions */ diff --git a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetDoubleVMOption.java b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetDoubleVMOption.java index d181677d2ba..4c9f8f36916 100644 --- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetDoubleVMOption.java +++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetDoubleVMOption.java @@ -27,7 +27,6 @@ * @summary Basic Test for HotSpotDiagnosticMXBean.getVMOption() and double values * @author Jaroslav Bachorik * - * @modules jdk.management * @run main/othervm -XX:CompileThresholdScaling=0.14 GetDoubleVMOption */ diff --git a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetVMOption.java b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetVMOption.java index 49edcc14415..f380338001d 100644 --- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetVMOption.java +++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetVMOption.java @@ -27,7 +27,6 @@ * @summary Basic Test for HotSpotDiagnosticMXBean.getVMOption() * @author Mandy Chung * - * @modules jdk.management * @run main/othervm -XX:+HeapDumpOnOutOfMemoryError GetVMOption */ diff --git a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/SetAllVMOptions.java b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/SetAllVMOptions.java index c630ef4d467..b433228cda4 100644 --- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/SetAllVMOptions.java +++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/SetAllVMOptions.java @@ -27,7 +27,6 @@ * @summary Basic Test for HotSpotDiagnosticMXBean.setVMOption() * @author Tomas Hurka, Daniel Fuchs * - * @modules jdk.management * @run main SetAllVMOptions */ diff --git a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java index d11ec33fa7c..8cad178234a 100644 --- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java +++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java @@ -29,7 +29,6 @@ * @author Mandy Chung * @author Jaroslav Bachorik * - * @modules jdk.management * @run main/othervm -XX:+HeapDumpOnOutOfMemoryError SetVMOption */ diff --git a/jdk/test/com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java b/jdk/test/com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java index 44307313787..b4f08ceb2ce 100644 --- a/jdk/test/com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java +++ b/jdk/test/com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java @@ -26,7 +26,6 @@ * @bug 4858522 6191542 * @summary Basic unit test of OperatingSystemMXBean.getCommittedVirtualMemorySize() * @author Steve Bohne - * @modules jdk.management */ /* diff --git a/jdk/test/com/sun/management/OperatingSystemMXBean/GetFreePhysicalMemorySize.java b/jdk/test/com/sun/management/OperatingSystemMXBean/GetFreePhysicalMemorySize.java index 6747bc9c730..6d843ccbdb0 100644 --- a/jdk/test/com/sun/management/OperatingSystemMXBean/GetFreePhysicalMemorySize.java +++ b/jdk/test/com/sun/management/OperatingSystemMXBean/GetFreePhysicalMemorySize.java @@ -26,7 +26,6 @@ * @bug 4858522 * @summary Basic unit test of OperatingSystemMXBean.getFreePhysicalMemorySize() * @author Steve Bohne - * @modules jdk.management */ /* diff --git a/jdk/test/com/sun/management/OperatingSystemMXBean/GetFreeSwapSpaceSize.java b/jdk/test/com/sun/management/OperatingSystemMXBean/GetFreeSwapSpaceSize.java index 82ed7250ba8..3df910d73c2 100644 --- a/jdk/test/com/sun/management/OperatingSystemMXBean/GetFreeSwapSpaceSize.java +++ b/jdk/test/com/sun/management/OperatingSystemMXBean/GetFreeSwapSpaceSize.java @@ -26,7 +26,6 @@ * @bug 4858522 * @summary Basic unit test of OperatingSystemMXBean.getFreeSwapSpaceSize() * @author Steve Bohne - * @modules jdk.management */ /* diff --git a/jdk/test/com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java b/jdk/test/com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java index 697717836bb..bbf26e099f3 100644 --- a/jdk/test/com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java +++ b/jdk/test/com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java @@ -26,7 +26,6 @@ * @bug 7028071 * @summary Basic unit test of OperatingSystemMXBean.getProcessCpuLoad() * - * @modules jdk.management * @run main GetProcessCpuLoad */ diff --git a/jdk/test/com/sun/management/OperatingSystemMXBean/GetProcessCpuTime.java b/jdk/test/com/sun/management/OperatingSystemMXBean/GetProcessCpuTime.java index 1e1132a3bac..f65b2616ae9 100644 --- a/jdk/test/com/sun/management/OperatingSystemMXBean/GetProcessCpuTime.java +++ b/jdk/test/com/sun/management/OperatingSystemMXBean/GetProcessCpuTime.java @@ -26,7 +26,6 @@ * @bug 4858522 * @summary Basic unit test of OperatingSystemMXBean.getProcessCpuTime() * @author Steve Bohne - * @modules jdk.management */ /* diff --git a/jdk/test/com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java b/jdk/test/com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java index 701b1fa0139..71ee209258a 100644 --- a/jdk/test/com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java +++ b/jdk/test/com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java @@ -26,7 +26,6 @@ * @bug 7028071 * @summary Basic unit test of OperatingSystemMXBean.getProcessCpuLoad() * - * @modules jdk.management * @run main GetSystemCpuLoad */ diff --git a/jdk/test/com/sun/management/OperatingSystemMXBean/GetTotalPhysicalMemorySize.java b/jdk/test/com/sun/management/OperatingSystemMXBean/GetTotalPhysicalMemorySize.java index 57eb80fc9c9..b3f55485924 100644 --- a/jdk/test/com/sun/management/OperatingSystemMXBean/GetTotalPhysicalMemorySize.java +++ b/jdk/test/com/sun/management/OperatingSystemMXBean/GetTotalPhysicalMemorySize.java @@ -26,7 +26,6 @@ * @bug 4858522 * @summary Basic unit test of OperatingSystemMXBean.getTotalPhysicalMemorySize() * @author Steve Bohne - * @modules jdk.management */ /* diff --git a/jdk/test/com/sun/management/OperatingSystemMXBean/MemoryStatusOverflow.java b/jdk/test/com/sun/management/OperatingSystemMXBean/MemoryStatusOverflow.java index 046dbcbce95..d016a11de59 100644 --- a/jdk/test/com/sun/management/OperatingSystemMXBean/MemoryStatusOverflow.java +++ b/jdk/test/com/sun/management/OperatingSystemMXBean/MemoryStatusOverflow.java @@ -29,7 +29,6 @@ * the GlobalMemoryStatus function can return incorrect information, * reporting a value of -1 to indicate an overflow. * - * @modules jdk.management * @run main MemoryStatusOverflow */ diff --git a/jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.java b/jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.java index 8d5e7c919ba..b1151f97426 100644 --- a/jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.java +++ b/jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.java @@ -25,14 +25,13 @@ * @test * @bug 4858522 * @summary Basic unit test of OperatingSystemMXBean.getTotalSwapSpaceSize() - * - * @library /lib/testlibrary - * @modules jdk.management - * @build TestTotalSwap jdk.testlibrary.* - * @run main TestTotalSwap - * * @author Steve Bohne * @author Jaroslav Bachorik + * + * @library /lib/testlibrary + * + * @build TestTotalSwap jdk.testlibrary.* + * @run main TestTotalSwap */ /* diff --git a/jdk/test/com/sun/management/TEST.properties b/jdk/test/com/sun/management/TEST.properties new file mode 100644 index 00000000000..b6ae4201475 --- /dev/null +++ b/jdk/test/com/sun/management/TEST.properties @@ -0,0 +1,2 @@ +modules = jdk.management + diff --git a/jdk/test/com/sun/management/ThreadMXBean/ThreadAllocatedMemory.java b/jdk/test/com/sun/management/ThreadMXBean/ThreadAllocatedMemory.java index 1729662347e..1fc134234dd 100644 --- a/jdk/test/com/sun/management/ThreadMXBean/ThreadAllocatedMemory.java +++ b/jdk/test/com/sun/management/ThreadMXBean/ThreadAllocatedMemory.java @@ -26,7 +26,6 @@ * @bug 6173675 * @summary Basic test of ThreadMXBean.getThreadAllocatedBytes * @author Paul Hohensee - * @modules jdk.management */ import java.lang.management.*; diff --git a/jdk/test/com/sun/management/ThreadMXBean/ThreadAllocatedMemoryArray.java b/jdk/test/com/sun/management/ThreadMXBean/ThreadAllocatedMemoryArray.java index 378abcada17..cbd3d1d3cab 100644 --- a/jdk/test/com/sun/management/ThreadMXBean/ThreadAllocatedMemoryArray.java +++ b/jdk/test/com/sun/management/ThreadMXBean/ThreadAllocatedMemoryArray.java @@ -26,7 +26,6 @@ * @bug 6173675 * @summary Basic test of ThreadMXBean.getThreadAllocatedBytes(long[]) * @author Paul Hohensee - * @modules jdk.management */ import java.lang.management.*; diff --git a/jdk/test/com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java b/jdk/test/com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java index 2e1046cc36e..c7fded7399e 100644 --- a/jdk/test/com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java +++ b/jdk/test/com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java @@ -24,11 +24,10 @@ /* * @test * @bug 6173675 + * @key randomness * @summary Basic test of ThreadMXBean.getThreadCpuTime(long[]) and * getThreadUserTime(long[]). * @author Paul Hohensee - * @key randomness - * @modules jdk.management */ import java.lang.management.*; diff --git a/jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh b/jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh index a131bb522ba..ef089a39786 100644 --- a/jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh +++ b/jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh @@ -24,10 +24,9 @@ # # @test # @bug 4858522 -# @summary +# @summary # @author Steve Bohne # -# @modules jdk.management # @run shell GetMaxFileDescriptorCount.sh # @@ -40,7 +39,7 @@ if [ "${COMPILEJAVA}" = "" ]; then fi runOne() -{ +{ echo "runOne $@" $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d $TESTCLASSES \ $TESTSRC/$@.java || exit 2 diff --git a/jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh b/jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh index f49069843c1..9074fabd005 100644 --- a/jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh +++ b/jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh @@ -24,10 +24,9 @@ # # @test # @bug 4858522 -# @summary +# @summary # @author Steve Bohne # -# @modules jdk.management # @run shell GetOpenFileDescriptorCount.sh # @@ -39,7 +38,7 @@ if [ "${COMPILEJAVA}" = "" ]; then COMPILEJAVA="${TESTJAVA}" fi runOne() -{ +{ echo "runOne $@" $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d $TESTCLASSES \ $TESTSRC/$@.java || exit 2 diff --git a/jdk/test/com/sun/management/VMOptionOpenDataTest.java b/jdk/test/com/sun/management/VMOptionOpenDataTest.java index 5d255085250..12904a04b85 100644 --- a/jdk/test/com/sun/management/VMOptionOpenDataTest.java +++ b/jdk/test/com/sun/management/VMOptionOpenDataTest.java @@ -38,7 +38,6 @@ import static javax.management.openmbean.SimpleType.*; * @test * @bug 8042901 * @summary Check that MappedMXBeanType.toOpenTypeData supports VMOption - * @modules jdk.management/com.sun.management * @author Shanliang Jiang */ public class VMOptionOpenDataTest { diff --git a/jdk/test/com/sun/net/httpserver/EchoHandler.java b/jdk/test/com/sun/net/httpserver/EchoHandler.java new file mode 100644 index 00000000000..0b9de1f3d62 --- /dev/null +++ b/jdk/test/com/sun/net/httpserver/EchoHandler.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.*; +import java.util.concurrent.*; +import java.util.logging.*; +import java.io.*; +import java.net.*; +import java.security.*; +import javax.net.ssl.*; +import com.sun.net.httpserver.*; + +/** + * Implements a basic static EchoHandler for an HTTP server + */ +public class EchoHandler implements HttpHandler { + + byte[] read(InputStream is) throws IOException { + byte[] buf = new byte[1024]; + byte[] result = new byte[0]; + + while (true) { + int n = is.read(buf); + if (n > 0) { + byte[] b1 = new byte[result.length + n]; + System.arraycopy(result, 0, b1, 0, result.length); + System.arraycopy(buf, 0, b1, result.length, n); + result = b1; + } else if (n == -1) { + return result; + } + } + } + + public void handle (HttpExchange t) + throws IOException + { + InputStream is = t.getRequestBody(); + Headers map = t.getRequestHeaders(); + String fixedrequest = map.getFirst ("XFixed"); + + // return the number of bytes received (no echo) + String summary = map.getFirst ("XSummary"); + if (fixedrequest != null && summary == null) { + byte[] in = read(is); + t.sendResponseHeaders(200, in.length); + OutputStream os = t.getResponseBody(); + os.write(in); + close(os); + close(is); + } else { + OutputStream os = t.getResponseBody(); + byte[] buf = new byte[64 * 1024]; + t.sendResponseHeaders(200, 0); + int n, count=0;; + + while ((n = is.read(buf)) != -1) { + if (summary == null) { + os.write(buf, 0, n); + } + count += n; + } + if (summary != null) { + String s = Integer.toString(count); + os.write(s.getBytes()); + } + close(os); + close(is); + } + } + + protected void close(OutputStream os) throws IOException { + os.close(); + } + protected void close(InputStream is) throws IOException { + is.close(); + } +} diff --git a/jdk/test/com/sun/net/httpserver/FileServerHandler.java b/jdk/test/com/sun/net/httpserver/FileServerHandler.java index 00ccd7d1a43..bff78443839 100644 --- a/jdk/test/com/sun/net/httpserver/FileServerHandler.java +++ b/jdk/test/com/sun/net/httpserver/FileServerHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -31,210 +31,122 @@ import javax.net.ssl.*; import com.sun.net.httpserver.*; /** - * Implements a basic static content HTTP server + * Implements a basic static content HTTP file server handler * which understands text/html, text/plain content types * * Must be given an abs pathname to the document root. * Directory listings together with text + html files * can be served. * - * File Server created on files sub-path - * - * Echo server created on echo sub-path */ public class FileServerHandler implements HttpHandler { - public static void main (String[] args) throws Exception { - if (args.length != 3) { - System.out.println ("usage: java FileServerHandler rootDir port logfilename"); - System.exit(1); - } - Logger logger = Logger.getLogger("com.sun.net.httpserver"); - ConsoleHandler ch = new ConsoleHandler(); - logger.setLevel(Level.ALL); - ch.setLevel(Level.ALL); - logger.addHandler(ch); + String docroot; - String rootDir = args[0]; - int port = Integer.parseInt (args[1]); - String logfile = args[2]; - HttpServer server = HttpServer.create (new InetSocketAddress (port), 0); - HttpHandler h = new FileServerHandler (rootDir); - HttpHandler h1 = new EchoHandler (); + public FileServerHandler (String docroot) { + this.docroot = docroot; + } - HttpContext c = server.createContext ("/files", h); - c.getFilters().add (new LogFilter (new File (logfile))); - HttpContext c1 = server.createContext ("/echo", h1); - c.getFilters().add (new LogFilter (new File (logfile))); - c1.getFilters().add (new LogFilter (new File (logfile))); - server.setExecutor (Executors.newCachedThreadPool()); - server.start (); + int invocation = 1; + public void handle (HttpExchange t) + throws IOException + { + InputStream is = t.getRequestBody(); + Headers map = t.getRequestHeaders(); + Headers rmap = t.getResponseHeaders(); + URI uri = t.getRequestURI(); + String path = uri.getPath(); + + int x = 0; + while (is.read () != -1) x++; + is.close(); + File f = new File (docroot, path); + if (!f.exists()) { + notfound (t, path); + return; + } + String fixedrequest = map.getFirst ("XFixed"); + + String method = t.getRequestMethod(); + if (method.equals ("HEAD")) { + rmap.set ("Content-Length", Long.toString (f.length())); + t.sendResponseHeaders (200, -1); + t.close(); + } else if (!method.equals("GET")) { + t.sendResponseHeaders (405, -1); + t.close(); + return; } - String docroot; - - FileServerHandler (String docroot) { - this.docroot = docroot; + if (path.endsWith (".html") || path.endsWith (".htm")) { + rmap.set ("Content-Type", "text/html"); + } else { + rmap.set ("Content-Type", "text/plain"); } - - int invocation = 1; - public void handle (HttpExchange t) - throws IOException - { - InputStream is = t.getRequestBody(); - Headers map = t.getRequestHeaders(); - Headers rmap = t.getResponseHeaders(); - URI uri = t.getRequestURI(); - String path = uri.getPath(); - - int x = 0; - while (is.read () != -1) x++; - is.close(); - File f = new File (docroot, path); - if (!f.exists()) { - notfound (t, path); + if (f.isDirectory()) { + if (!path.endsWith ("/")) { + moved (t); return; } - String fixedrequest = map.getFirst ("XFixed"); - - String method = t.getRequestMethod(); - if (method.equals ("HEAD")) { - rmap.set ("Content-Length", Long.toString (f.length())); - t.sendResponseHeaders (200, -1); - t.close(); - } else if (!method.equals("GET")) { - t.sendResponseHeaders (405, -1); - t.close(); - return; + rmap.set ("Content-Type", "text/html"); + t.sendResponseHeaders (200, 0); + String[] list = f.list(); + OutputStream os = t.getResponseBody(); + PrintStream p = new PrintStream (os); + p.println ("

                    Directory listing for: " + path+ "

                    "); + p.println ("
                      "); + for (int i=0; i"+list[i]+""); } - - if (path.endsWith (".html") || path.endsWith (".htm")) { - rmap.set ("Content-Type", "text/html"); + p.println ("


                    "); + p.flush(); + p.close(); + } else { + int clen; + if (fixedrequest != null) { + clen = (int) f.length(); } else { - rmap.set ("Content-Type", "text/plain"); + clen = 0; } - if (f.isDirectory()) { - if (!path.endsWith ("/")) { - moved (t); - return; - } - rmap.set ("Content-Type", "text/html"); - t.sendResponseHeaders (200, 0); - String[] list = f.list(); - OutputStream os = t.getResponseBody(); - PrintStream p = new PrintStream (os); - p.println ("

                    Directory listing for: " + path+ "

                    "); - p.println ("


                    "); - p.flush(); - p.close(); - } else { - int clen; - if (fixedrequest != null) { - clen = (int) f.length(); - } else { - clen = 0; - } - t.sendResponseHeaders (200, clen); - OutputStream os = t.getResponseBody(); - FileInputStream fis = new FileInputStream (f); - int count = 0; - try { + t.sendResponseHeaders (200, clen); + OutputStream os = t.getResponseBody(); + FileInputStream fis = new FileInputStream (f); + int count = 0; + try { byte[] buf = new byte [16 * 1024]; int len; while ((len=fis.read (buf)) != -1) { os.write (buf, 0, len); count += len; } - } catch (IOException e) { - e.printStackTrace(); - } - fis.close(); - os.close(); + } catch (IOException e) { + e.printStackTrace(); } - } - - void moved (HttpExchange t) throws IOException { - Headers req = t.getRequestHeaders(); - Headers map = t.getResponseHeaders(); - URI uri = t.getRequestURI(); - String host = req.getFirst ("Host"); - String location = "http://"+host+uri.getPath() + "/"; - map.set ("Content-Type", "text/html"); - map.set ("Location", location); - t.sendResponseHeaders (301, -1); - t.close(); - } - - void notfound (HttpExchange t, String p) throws IOException { - t.getResponseHeaders().set ("Content-Type", "text/html"); - t.sendResponseHeaders (404, 0); - OutputStream os = t.getResponseBody(); - String s = "

                    File not found

                    "; - s = s + p + "

                    "; - os.write (s.getBytes()); + fis.close(); os.close(); - t.close(); } } -class EchoHandler implements HttpHandler { - - byte[] read(InputStream is) throws IOException { - byte[] buf = new byte[1024]; - byte[] result = new byte[0]; - - while (true) { - int n = is.read(buf); - if (n > 0) { - byte[] b1 = new byte[result.length + n]; - System.arraycopy(result, 0, b1, 0, result.length); - System.arraycopy(buf, 0, b1, result.length, n); - result = b1; - } else if (n == -1) { - return result; - } - } + void moved (HttpExchange t) throws IOException { + Headers req = t.getRequestHeaders(); + Headers map = t.getResponseHeaders(); + URI uri = t.getRequestURI(); + String host = req.getFirst ("Host"); + String location = "http://"+host+uri.getPath() + "/"; + map.set ("Content-Type", "text/html"); + map.set ("Location", location); + t.sendResponseHeaders (301, -1); + t.close(); } - public void handle (HttpExchange t) - throws IOException - { - InputStream is = t.getRequestBody(); - Headers map = t.getRequestHeaders(); - String fixedrequest = map.getFirst ("XFixed"); - - // return the number of bytes received (no echo) - String summary = map.getFirst ("XSummary"); - if (fixedrequest != null && summary == null) { - byte[] in = read(is); - t.sendResponseHeaders(200, in.length); - OutputStream os = t.getResponseBody(); - os.write(in); - os.close(); - is.close(); - } else { - OutputStream os = t.getResponseBody(); - byte[] buf = new byte[64 * 1024]; - t.sendResponseHeaders(200, 0); - int n, count=0;; - - while ((n = is.read(buf)) != -1) { - if (summary == null) { - os.write(buf, 0, n); - } - count += n; - } - if (summary != null) { - String s = Integer.toString(count); - os.write(s.getBytes()); - } - os.close(); - is.close(); - } + void notfound (HttpExchange t, String p) throws IOException { + t.getResponseHeaders().set ("Content-Type", "text/html"); + t.sendResponseHeaders (404, 0); + OutputStream os = t.getResponseBody(); + String s = "

                    File not found

                    "; + s = s + p + "

                    "; + os.write (s.getBytes()); + os.close(); + t.close(); } } - diff --git a/jdk/test/com/sun/net/httpserver/SimpleFileServer.java b/jdk/test/com/sun/net/httpserver/SimpleFileServer.java new file mode 100644 index 00000000000..0d32f37bda3 --- /dev/null +++ b/jdk/test/com/sun/net/httpserver/SimpleFileServer.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.*; +import java.util.concurrent.*; +import java.util.logging.*; +import java.io.*; +import java.net.*; +import java.security.*; +import javax.net.ssl.*; +import com.sun.net.httpserver.*; + +/** + * Implements a basic static content HTTP server + * which understands text/html, text/plain content types + * + * Must be given an abs pathname to the document root. + * Directory listings together with text + html files + * can be served. + * + * File Server created on files sub-path + * + * Echo server created on echo sub-path + */ +public class SimpleFileServer { + + public static void main (String[] args) throws Exception { + if (args.length != 3) { + System.out.println ("usage: java FileServerHandler rootDir port logfilename"); + System.exit(1); + } + Logger logger = Logger.getLogger("com.sun.net.httpserver"); + ConsoleHandler ch = new ConsoleHandler(); + logger.setLevel(Level.ALL); + ch.setLevel(Level.ALL); + logger.addHandler(ch); + + String rootDir = args[0]; + int port = Integer.parseInt (args[1]); + String logfile = args[2]; + HttpServer server = HttpServer.create (new InetSocketAddress (port), 0); + HttpHandler h = new FileServerHandler (rootDir); + HttpHandler h1 = new EchoHandler (); + + HttpContext c = server.createContext ("/files", h); + c.getFilters().add (new LogFilter (new File (logfile))); + HttpContext c1 = server.createContext ("/echo", h1); + c.getFilters().add (new LogFilter (new File (logfile))); + c1.getFilters().add (new LogFilter (new File (logfile))); + server.setExecutor (Executors.newCachedThreadPool()); + server.start (); + } +} diff --git a/jdk/test/com/sun/net/httpserver/SimpleHttpServerTest.java b/jdk/test/com/sun/net/httpserver/SimpleHttpServerTest.java index c33ded954b4..e9d420ac8d3 100644 --- a/jdk/test/com/sun/net/httpserver/SimpleHttpServerTest.java +++ b/jdk/test/com/sun/net/httpserver/SimpleHttpServerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/com/sun/net/httpserver/StopNoStartTest.java b/jdk/test/com/sun/net/httpserver/StopNoStartTest.java index c10d767e7d7..4eef659ae41 100644 --- a/jdk/test/com/sun/net/httpserver/StopNoStartTest.java +++ b/jdk/test/com/sun/net/httpserver/StopNoStartTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/com/sun/net/httpserver/bugs/B6433018.java b/jdk/test/com/sun/net/httpserver/bugs/B6433018.java index 3193530aebc..f9ff8465598 100644 --- a/jdk/test/com/sun/net/httpserver/bugs/B6433018.java +++ b/jdk/test/com/sun/net/httpserver/bugs/B6433018.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -103,4 +103,3 @@ public class B6433018 { } } } - diff --git a/jdk/test/com/sun/tools/attach/AttachSelf.java b/jdk/test/com/sun/tools/attach/AttachSelf.java new file mode 100644 index 00000000000..4e214929ba8 --- /dev/null +++ b/jdk/test/com/sun/tools/attach/AttachSelf.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import com.sun.tools.attach.VirtualMachine; + +import java.io.IOException; + +/** + * @test + * @modules jdk.attach + * @run main AttachSelf + * @run main/othervm -Djdk.attach.allowAttachSelf AttachSelf + * @run main/othervm -Djdk.attach.allowAttachSelf=true AttachSelf + * @run main/othervm -Djdk.attach.allowAttachSelf=false AttachSelf + */ + +public class AttachSelf { + + public static void main(String[] args) throws Exception { + + String value = System.getProperty("jdk.attach.allowAttachSelf"); + boolean canAttachSelf = (value != null) && !value.equals("false"); + + String vmid = "" + ProcessHandle.current().pid(); + + VirtualMachine vm = null; + try { + vm = VirtualMachine.attach(vmid); + if (!canAttachSelf) + throw new RuntimeException("Attached to self not expected"); + } catch (IOException ioe) { + if (canAttachSelf) + throw ioe; + } finally { + if (vm != null) vm.detach(); + } + + } + +} + diff --git a/jdk/test/com/sun/tools/attach/BasicTests.java b/jdk/test/com/sun/tools/attach/BasicTests.java index 720ae0004dd..2a394d0182a 100644 --- a/jdk/test/com/sun/tools/attach/BasicTests.java +++ b/jdk/test/com/sun/tools/attach/BasicTests.java @@ -40,16 +40,17 @@ import com.sun.tools.attach.VirtualMachineDescriptor; /* * @test * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757 - * @summary Basic unit tests for the VM attach mechanism. * @key intermittent + * @summary Basic unit tests for the VM attach mechanism. This test will perform + * a number of basic attach tests. + * * @library /lib/testlibrary * @modules java.instrument - * java.management + * jdk.attach * jdk.jartool/sun.tools.jar + * * @run build jdk.testlibrary.* Agent BadAgent RedefineAgent Application RedefineDummy RunnerUtil * @run main BasicTests - * - * This test will perform a number of basic attach tests. */ public class BasicTests { diff --git a/jdk/test/com/sun/tools/attach/PermissionTest.java b/jdk/test/com/sun/tools/attach/PermissionTest.java index 3254431a9a1..9b034a21fcb 100644 --- a/jdk/test/com/sun/tools/attach/PermissionTest.java +++ b/jdk/test/com/sun/tools/attach/PermissionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,17 +31,15 @@ import jdk.testlibrary.ProcessThread; /* * @test * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757 - * @summary Basic unit tests for the VM attach mechanism. - * @modules jdk.jartool/sun.tools.jar + * @summary Basic unit tests for the VM attach mechanism. Unit test for Attach + * API - this checks that a SecurityException is thrown as expected. + * * @library /lib/testlibrary - * @modules java.management - * jdk.attach + * @modules jdk.attach * jdk.jartool/sun.tools.jar + * * @run build jdk.testlibrary.* Application * @run main PermissionTest - * - * Unit test for Attach API - - * this checks that a SecurityException is thrown as expected. */ public class PermissionTest { diff --git a/jdk/test/com/sun/tools/attach/ProviderTest.java b/jdk/test/com/sun/tools/attach/ProviderTest.java index 685cc47f7ac..ed762907af2 100644 --- a/jdk/test/com/sun/tools/attach/ProviderTest.java +++ b/jdk/test/com/sun/tools/attach/ProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,16 +31,15 @@ import com.sun.tools.attach.spi.AttachProvider; /* * @test * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757 - * @summary Basic unit tests for the VM attach mechanism. - * @modules jdk.jartool/sun.tools.jar + * @summary Basic unit tests for the VM attach mechanism. The test will attach + * and detach to/from the running Application. + * * @library /lib/testlibrary - * @modules java.management - * jdk.attach + * @modules jdk.attach * jdk.jartool/sun.tools.jar + * * @run build jdk.testlibrary.* SimpleProvider * @run main ProviderTest - * - * The test will attach and detach to/from the running Application. */ public class ProviderTest { diff --git a/jdk/test/com/sun/tools/attach/RunnerUtil.java b/jdk/test/com/sun/tools/attach/RunnerUtil.java index 71c25082580..1d7f0ccba26 100644 --- a/jdk/test/com/sun/tools/attach/RunnerUtil.java +++ b/jdk/test/com/sun/tools/attach/RunnerUtil.java @@ -48,7 +48,10 @@ public class RunnerUtil { */ public static ProcessThread startApplication(String... additionalOpts) throws Throwable { String classpath = System.getProperty("test.class.path", "."); - String[] myArgs = concat(additionalOpts, new String [] { "-XX:+UsePerfData", "-Dattach.test=true", "-classpath", classpath, "Application" }); + String[] myArgs = concat(additionalOpts, new String [] { + "-XX:+UsePerfData", "-XX:+EnableDynamicAgentLoading", + "-Dattach.test=true", "-classpath", classpath, "Application" + }); String[] args = Utils.addTestJavaOpts(myArgs); ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args); ProcessThread pt = new ProcessThread("runApplication", (line) -> line.equals(Application.READY_MSG), pb); diff --git a/jdk/test/com/sun/tools/attach/StartManagementAgent.java b/jdk/test/com/sun/tools/attach/StartManagementAgent.java index 85256fb68c2..1a5234b3408 100644 --- a/jdk/test/com/sun/tools/attach/StartManagementAgent.java +++ b/jdk/test/com/sun/tools/attach/StartManagementAgent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,11 +39,12 @@ import jdk.testlibrary.Utils; /* * @test * @summary Test for VirtualMachine.startManagementAgent and VirtualMachine.startLocalManagementAgent - * @modules jdk.jartool/sun.tools.jar + * * @library /lib/testlibrary - * @modules jdk.management.agent + * @modules java.management * jdk.attach * jdk.jartool/sun.tools.jar + * * @run build Application SimpleProvider jdk.testlibrary.* * @run main/timeout=300 StartManagementAgent */ diff --git a/jdk/test/com/sun/tools/attach/TempDirTest.java b/jdk/test/com/sun/tools/attach/TempDirTest.java index ae388c860b8..5be1bc3aa56 100644 --- a/jdk/test/com/sun/tools/attach/TempDirTest.java +++ b/jdk/test/com/sun/tools/attach/TempDirTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,10 +37,11 @@ import jdk.testlibrary.ProcessThread; * @test * @bug 8033104 * @summary Test to make sure attach and jvmstat works correctly when java.io.tmpdir is set - * @modules jdk.jartool/sun.tools.jar + * * @library /lib/testlibrary - * @modules java.management + * @modules jdk.attach * jdk.jartool/sun.tools.jar + * * @run build jdk.testlibrary.* Application RunnerUtil * @run main/timeout=200 TempDirTest */ diff --git a/jdk/test/com/sun/tools/attach/java.policy.allow b/jdk/test/com/sun/tools/attach/java.policy.allow index 6c93a65f247..3e63a207f61 100644 --- a/jdk/test/com/sun/tools/attach/java.policy.allow +++ b/jdk/test/com/sun/tools/attach/java.policy.allow @@ -8,7 +8,8 @@ grant { permission com.sun.tools.attach.AttachPermission "createAttachProvider"; /* implementation specific */ - permission java.lang.RuntimePermission "accessClassInPackage.sun.misc"; + permission java.lang.RuntimePermission "manageProcess"; + permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.misc"; permission java.lang.RuntimePermission "accessClassInPackage.sun.tools.attach"; permission java.lang.RuntimePermission "accessClassInPackage.sun.jvmstat.monitor"; permission java.lang.RuntimePermission "loadLibrary.attach"; diff --git a/jdk/test/com/sun/tools/attach/modules/Agent.java b/jdk/test/com/sun/tools/attach/modules/Agent.java new file mode 100644 index 00000000000..7d91502d837 --- /dev/null +++ b/jdk/test/com/sun/tools/attach/modules/Agent.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.lang.instrument.Instrumentation; + +public class Agent { + + public static void agentmain(String agentArgs, Instrumentation inst) { + } +} diff --git a/jdk/test/com/sun/tools/attach/modules/Driver.java b/jdk/test/com/sun/tools/attach/modules/Driver.java new file mode 100644 index 00000000000..7323709fcf0 --- /dev/null +++ b/jdk/test/com/sun/tools/attach/modules/Driver.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @modules jdk.attach + * @build m/* Agent + * @run main/othervm -Djdk.attach.allowAttachSelf m/p.Main jmx javaagent + * @run main/othervm -Djdk.attach.allowAttachSelf m/p.Main javaagent jmx + * @run main/othervm --limit-modules=jdk.attach -Djdk.attach.allowAttachSelf m/p.Main jmx javaagent + * @run main/othervm --limit-modules=jdk.attach -Djdk.attach.allowAttachSelf m/p.Main javaagent jmx + * @summary Basic test to ensure that a JMX agent or a tool agent can be loaded/started in + * a modular application. + */ + diff --git a/jdk/test/com/sun/tools/attach/modules/m/module-info.java b/jdk/test/com/sun/tools/attach/modules/m/module-info.java new file mode 100644 index 00000000000..ae7e4d18cef --- /dev/null +++ b/jdk/test/com/sun/tools/attach/modules/m/module-info.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m { + exports p; + requires jdk.attach; +} diff --git a/jdk/test/com/sun/tools/attach/modules/m/p/Main.java b/jdk/test/com/sun/tools/attach/modules/m/p/Main.java new file mode 100644 index 00000000000..b58822b5127 --- /dev/null +++ b/jdk/test/com/sun/tools/attach/modules/m/p/Main.java @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p; + +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.jar.Attributes; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.jar.JarOutputStream; +import java.util.jar.Manifest; + +import com.sun.tools.attach.VirtualMachine; + +public class Main { + + public static void main(String[] args) throws Exception { + System.out.println("#modules loaded: " + moduleInfoCont()); + + String vmid = "" + ProcessHandle.current().pid(); + VirtualMachine vm = VirtualMachine.attach(vmid); + + for (String test : args) { + switch (test) { + case "jmx" : + startJMXAgent(vm); + break; + case "javaagent" : + startJavaAgent(vm, createAgentJar()); + break; + } + + System.out.println("#modules loaded: " + moduleInfoCont()); + } + } + + /** + * Locates module-info.class resources to get a count of the module of system + * modules. + */ + static long moduleInfoCont() { + ClassLoader scl = ClassLoader.getSystemClassLoader(); + return scl.resources("module-info.class").count(); + } + + /** + * Starts a JMX agent and checks that java.management is loaded. + */ + static void startJMXAgent(VirtualMachine vm) throws Exception { + System.out.println("Start JMX agent"); + vm.startLocalManagementAgent(); + + // types in java.management should be visible + Class.forName("javax.management.MXBean"); + } + + /** + * Loads a java agent into the VM and checks that java.instrument is loaded. + */ + static void startJavaAgent(VirtualMachine vm, Path agent) throws Exception { + System.out.println("Load java agent ..."); + vm.loadAgent(agent.toString()); + + // the Agent class should be visible + Class.forName("Agent"); + + // types in java.instrument should be visible + Class.forName("java.lang.instrument.Instrumentation"); + } + + /** + * Creates a java agent, return the file path to the agent JAR file. + */ + static Path createAgentJar() throws IOException { + Manifest man = new Manifest(); + Attributes attrs = man.getMainAttributes(); + attrs.put(Attributes.Name.MANIFEST_VERSION, "1.0.0"); + attrs.put(new Attributes.Name("Agent-Class"), "Agent"); + Path agent = Paths.get("agent.jar"); + Path dir = Paths.get(System.getProperty("test.classes")); + createJarFile(agent, man, dir, "Agent.class"); + return agent; + } + + /** + * Creates a JAR file. + * + * Equivalent to {@code jar cfm -C

                    file...} + * + * The input files are resolved against the given directory. Any input + * files that are directories are processed recursively. + */ + static void createJarFile(Path jarfile, Manifest man, Path dir, String... files) + throws IOException + { + // create the target directory + Path parent = jarfile.getParent(); + if (parent != null) + Files.createDirectories(parent); + + List entries = new ArrayList<>(); + for (String file : files) { + Files.find(dir.resolve(file), Integer.MAX_VALUE, + (p, attrs) -> attrs.isRegularFile()) + .map(e -> dir.relativize(e)) + .forEach(entries::add); + } + + try (OutputStream out = Files.newOutputStream(jarfile); + JarOutputStream jos = new JarOutputStream(out)) + { + if (man != null) { + JarEntry je = new JarEntry(JarFile.MANIFEST_NAME); + jos.putNextEntry(je); + man.write(jos); + jos.closeEntry(); + } + + for (Path entry : entries) { + String name = toJarEntryName(entry); + jos.putNextEntry(new JarEntry(name)); + Files.copy(dir.resolve(entry), jos); + jos.closeEntry(); + } + } + } + + /** + * Map a file path to the equivalent name in a JAR file + */ + static String toJarEntryName(Path file) { + Path normalized = file.normalize(); + return normalized.subpath(0, normalized.getNameCount()) + .toString() + .replace(File.separatorChar, '/'); + } +} diff --git a/jdk/test/demo/jvmti/Context.java b/jdk/test/demo/jvmti/Context.java deleted file mode 100644 index 2bb822ffbaa..00000000000 --- a/jdk/test/demo/jvmti/Context.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* - * - * Sample target application for jvmti demos - * - * java Context [threadCount [iterationCount [sleepContention]]] - * Default: java Context 5 10 0 - * - * threadCount Number of threads - * iterationCount Total turns taken for all threads - * sleepContention Time for main thread to sleep while holding lock - * (creates monitor contention on all other threads) - * - */ - -/* Used to sync up turns and keep track of who's turn it is */ -final class TurnChecker { - int thread_index; - TurnChecker(int thread_index) { - this.thread_index = thread_index; - } -} - -/* Creates a bunch of threads that sequentially take turns */ -public final class Context extends Thread { - /* Used to track threads */ - private static long startTime; - private static TurnChecker turn = new TurnChecker(-1); - private static int total_turns_taken; - - /* Used for each Context thread */ - private final int thread_count; - private final int thread_index; - private final int thread_turns; - - /* Main program */ - public static void main(String[] argv) throws InterruptedException { - int default_thread_count = 5; - int default_thread_turns = 10; - int default_contention_sleep = 0; - int expected_turns_taken; - long sleepTime = 10L; - - /* Override defaults */ - if ( argv.length >= 1 ) { - default_thread_count = Integer.parseInt(argv[0]); - } - if ( argv.length >= 2 ) { - expected_turns_taken = Integer.parseInt(argv[1]); - default_thread_turns = expected_turns_taken/default_thread_count; - } - expected_turns_taken = default_thread_count*default_thread_turns; - if ( argv.length >= 3 ) { - default_contention_sleep = Integer.parseInt(argv[2]); - } - - System.out.println("Context started with " - + default_thread_count + " threads and " - + default_thread_turns + " turns per thread"); - - /* Get all threads running (they will block until we set turn) */ - for (int i = 0; i < default_thread_count; i++) { - new Context(default_thread_count, i, default_thread_turns).start(); - } - - /* Sleep to make sure thread_index 0 make it to the wait call */ - System.out.println("Context sleeping, so threads will start wait"); - Thread.yield(); - Thread.sleep(sleepTime); - - /* Save start time */ - startTime = System.currentTimeMillis(); - - /* This triggers the starting of taking turns */ - synchronized (turn) { - turn.thread_index = 0; - turn.notifyAll(); - } - System.out.println("Context sleeping, so threads can run"); - Thread.yield(); - Thread.sleep(sleepTime); - - /* Wait for threads to finish (after everyone has had their turns) */ - while ( true ) { - boolean done; - done = false; - synchronized (turn) { - if ( total_turns_taken == expected_turns_taken ) { - done = true; - } - /* Create some monitor contention by sleeping with lock */ - if ( default_contention_sleep > 0 ) { - System.out.println("Context sleeping, to create contention"); - Thread.yield(); - Thread.sleep((long)default_contention_sleep); - } - } - if ( done ) - break; - System.out.println("Context sleeping, so threads will complete"); - Thread.sleep(sleepTime); - } - - long endTime = System.currentTimeMillis(); - long totalTime = endTime - startTime; - - System.out.println("Total time (milliseconds): " + totalTime); - System.out.println("Milliseconds per thread: " + - ((double)totalTime / (default_thread_count))); - - System.out.println("Context completed"); - System.exit(0); - } - - /* Thread object to run */ - Context(int thread_count, int thread_index, int thread_turns) { - this.thread_count = thread_count; - this.thread_index = thread_index; - this.thread_turns = thread_turns; - } - - /* Main for thread */ - public void run() { - int next_thread_index = (thread_index + 1) % thread_count; - int turns_taken = 0; - - try { - - /* Loop until we make sure we get all our turns */ - for (int i = 0; i < thread_turns * thread_count; i++) { - synchronized (turn) { - /* Keep waiting for our turn */ - while (turn.thread_index != thread_index) - turn.wait(); - /* MY TURN! Each thread gets thread_turns */ - total_turns_taken++; - turns_taken++; - System.out.println("Turn #" + total_turns_taken - + " taken by thread " + thread_index - + ", " + turns_taken - + " turns taken by this thread"); - /* Give next thread a turn */ - turn.thread_index = next_thread_index; - turn.notifyAll(); - } - /* If we've had all our turns, break out of this loop */ - if (thread_turns == turns_taken) { - System.out.println("Loop end: thread got " + turns_taken - + " turns, expected " + thread_turns); - break; - } - } - } catch (InterruptedException intEx) { - System.out.println("Got an InterruptedException:" + intEx); - /* skip */ - } - - /* Make sure we got all our turns */ - if ( thread_turns != turns_taken ) { - System.out.println("ERROR: thread got " + turns_taken - + " turns, expected " + thread_turns); - System.exit(1); - } - } -} diff --git a/jdk/test/demo/jvmti/DemoRun.java b/jdk/test/demo/jvmti/DemoRun.java deleted file mode 100644 index 1e5f47dd9b3..00000000000 --- a/jdk/test/demo/jvmti/DemoRun.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * 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. - */ - - -/* DemoRun: - * - * Support classes for java jvmti demo tests - * - */ - -import java.io.InputStream; -import java.io.IOException; -import java.io.File; -import java.io.BufferedInputStream; -import java.io.PrintStream; - -/* - * Helper class to direct process output to a StringBuffer - */ -class MyInputStream implements Runnable { - private String name; - private BufferedInputStream in; - private StringBuffer buffer; - - /* Create MyInputStream that saves all output to a StringBuffer */ - MyInputStream(String name, InputStream in) { - this.name = name; - this.in = new BufferedInputStream(in); - buffer = new StringBuffer(4096); - Thread thr = new Thread(this); - thr.setDaemon(true); - thr.start(); - } - - /* Dump the buffer */ - void dump(PrintStream x) { - String str = buffer.toString(); - x.println(""); - x.println(str); - x.println(""); - } - - /* Check to see if a pattern is inside the output. */ - boolean contains(String pattern) { - String str = buffer.toString(); - return str.contains(pattern); - } - - /* Runs as a separate thread capturing all output in a StringBuffer */ - public void run() { - try { - byte b[] = new byte[100]; - for (;;) { - int n = in.read(b); - String str; - if (n < 0) { - break; - } - str = new String(b, 0, n); - buffer.append(str); - System.out.print(str); - } - } catch (IOException ioe) { /* skip */ } - } -} - -/* - * Main JVMTI Demo Run class. - */ -public class DemoRun { - - private String demo_name; - private String demo_options; - private MyInputStream output; - private MyInputStream error; - - /* Create a Demo run process */ - public DemoRun(String name, String options) - { - demo_name = name; - demo_options = options; - } - - /* - * Execute a process with an -agentpath or -agentlib command option - */ - public void runit(String class_name) - { - runit(class_name, null); - } - - /* - * Execute a process with an -agentpath or -agentlib command option - * plus any set of other java options. - */ - public void runit(String class_name, String vm_options[]) - { - String sdk_home = System.getProperty("java.home"); - String cdir = System.getProperty("test.classes", "."); - String os_arch = System.getProperty("os.arch"); - String os_name = System.getProperty("os.name"); - String libprefix = os_name.contains("Windows")?"":"lib"; - String libsuffix = os_name.contains("Windows")?".dll": - os_name.contains("OS X")?".dylib":".so"; - String java = sdk_home - + File.separator + "bin" - + File.separator + "java"; - /* Array of strings to be passed in for exec: - * 1. java - * 2. -Dtest.classes=. - * 3. -Xcheck:jni (Just because it finds bugs) - * 4. -Xverify:all (Make sure verification is on full blast) - * 5. -agent - * vm_options - * 6+i. classname - */ - int nvm_options = 0; - if ( vm_options != null ) nvm_options = vm_options.length; - String cmd[] = new String[1 + 7 + nvm_options]; - String cmdLine; - int exitStatus; - int i,j; - - i = 0; - cmdLine = ""; - cmdLine += (cmd[i++] = java); - cmdLine += " "; - cmdLine += (cmd[i++] = "-cp"); - cmdLine += " "; - cmdLine += (cmd[i++] = cdir); - cmdLine += " "; - cmdLine += (cmd[i++] = "-Dtest.classes=" + cdir); - cmdLine += " "; - cmdLine += (cmd[i++] = "-Xcheck:jni"); - cmdLine += " "; - cmdLine += (cmd[i++] = "-Xverify:all"); - String libname = sdk_home - + File.separator + "demo" - + File.separator + "jvmti" - + File.separator + demo_name - + File.separator + "lib" - + File.separator + libprefix + demo_name + libsuffix; - cmdLine += " "; - cmdLine += (cmd[i++] = "-agentpath:" + libname - + (demo_options.equals("") ? "" : ("=" + demo_options))); - /* Add any special VM options */ - for ( j = 0; j < nvm_options; j++ ) { - cmdLine += " "; - cmdLine += (cmd[i++] = vm_options[j]); - } - /* Add classname */ - cmdLine += " "; - cmdLine += (cmd[i++] = class_name); - - /* Begin process */ - Process p; - - System.out.println("Starting: " + cmdLine); - try { - p = Runtime.getRuntime().exec(cmd); - } catch ( IOException e ) { - throw new RuntimeException("Test failed - exec got IO exception"); - } - - /* Save process output in StringBuffers */ - output = new MyInputStream("Input Stream", p.getInputStream()); - error = new MyInputStream("Error Stream", p.getErrorStream()); - - /* Wait for process to complete, and if exit code is non-zero we fail */ - try { - exitStatus = p.waitFor(); - if ( exitStatus != 0) { - System.out.println("Exit code is " + exitStatus); - error.dump(System.out); - output.dump(System.out); - throw new RuntimeException("Test failed - " + - "exit return code non-zero " + - "(exitStatus==" + exitStatus + ")"); - } - } catch ( InterruptedException e ) { - throw new RuntimeException("Test failed - process interrupted"); - } - System.out.println("Completed: " + cmdLine); - } - - /* Does the pattern appear in the output of this process */ - public boolean output_contains(String pattern) - { - return output.contains(pattern) || error.contains(pattern); - } -} diff --git a/jdk/test/demo/jvmti/heapViewer/HeapViewerTest.java b/jdk/test/demo/jvmti/heapViewer/HeapViewerTest.java deleted file mode 100644 index a49416a3293..00000000000 --- a/jdk/test/demo/jvmti/heapViewer/HeapViewerTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* @test - * @bug 5033539 - * @summary Test jvmti demo heapViewer - * - * @compile ../DemoRun.java - * @compile ../HeapUser.java - * @build HeapViewerTest - * @run main HeapViewerTest HeapUser - */ - -public class HeapViewerTest { - - public static void main(String args[]) throws Exception { - DemoRun demo; - - /* Run demo that uses JVMTI heapViewer agent (no options) */ - demo = new DemoRun("heapViewer", "" /* options to heapViewer */ ); - demo.runit(args[0]); - - /* Make sure patterns in output look ok */ - if (demo.output_contains("ERROR")) { - throw new RuntimeException("Test failed - ERROR seen in output"); - } - - /* Must be a pass. */ - System.out.println("Test passed - cleanly terminated"); - } -} diff --git a/jdk/test/demo/jvmti/versionCheck/FailsWhenJvmtiVersionDiffers.java b/jdk/test/demo/jvmti/versionCheck/FailsWhenJvmtiVersionDiffers.java deleted file mode 100644 index d169b938fb0..00000000000 --- a/jdk/test/demo/jvmti/versionCheck/FailsWhenJvmtiVersionDiffers.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -/* @test - * @bug 5039613 - * @summary Test jvmti demo versionCheck - * - * @compile ../DemoRun.java ../Hello.java - * @build FailsWhenJvmtiVersionDiffers - * @run main FailsWhenJvmtiVersionDiffers Hello - */ - -public class FailsWhenJvmtiVersionDiffers { - - public static void main(String args[]) throws Exception { - DemoRun demo; - - /* Run demo that uses JVMTI versionCheck agent (no options) */ - demo = new DemoRun("versionCheck", "" /* options to versionCheck */ ); - demo.runit(args[0]); - - /* Make sure patterns in output look ok */ - if (demo.output_contains("ERROR")) { - System.out.println( - "NOTE: The jmvti.h file doesn't match the JVMTI in the VM.\n" - +" This may or may not be a serious issue.\n" - +" Check the jtr file for details.\n" - +" Call your local serviceability representative for help." - ); - throw new RuntimeException("Test failed - ERROR seen in output"); - } - - /* Must be a pass. */ - System.out.println("Test passed - cleanly terminated"); - } -} diff --git a/jdk/test/java/awt/Choice/ChoicePopupLocation/ChoicePopupLocation.java b/jdk/test/java/awt/Choice/ChoicePopupLocation/ChoicePopupLocation.java new file mode 100644 index 00000000000..88f01802428 --- /dev/null +++ b/jdk/test/java/awt/Choice/ChoicePopupLocation/ChoicePopupLocation.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.Choice; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; +import java.awt.Insets; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.Toolkit; +import java.awt.event.InputEvent; + +/** + * @test + * @bug 8176448 + * @run main/timeout=300 ChoicePopupLocation + */ +public final class ChoicePopupLocation { + + private static final int SIZE = 350; + private static int frameWidth; + + public static void main(final String[] args) throws Exception { + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + GraphicsDevice[] sds = ge.getScreenDevices(); + Point left = null; + Point right = null; + for (GraphicsDevice sd : sds) { + GraphicsConfiguration gc = sd.getDefaultConfiguration(); + Rectangle bounds = gc.getBounds(); + if (left == null || left.x > bounds.x) { + left = new Point(bounds.x, bounds.y + bounds.height / 2); + } + if (right == null || right.x < bounds.x + bounds.width) { + right = new Point(bounds.x + bounds.width, + bounds.y + bounds.height / 2); + } + + Point point = new Point(bounds.x, bounds.y); + Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc); + while (point.y < bounds.y + bounds.height - insets.bottom - SIZE ) { + while (point.x < bounds.x + bounds.width - insets.right - SIZE) { + test(point); + point.translate(bounds.width / 5, 0); + } + point.setLocation(bounds.x, point.y + bounds.height / 5); + } + + } + if (left != null) { + left.translate(-50, 0); + test(left); + } + if (right != null) { + right.translate(-frameWidth + 50, 0); + test(right); + } + } + + private static void test(final Point tmp) throws Exception { + Choice choice = new Choice(); + for (int i = 1; i < 7; i++) { + choice.add("Long-long-long-long-long text in the item-" + i); + } + Frame frame = new Frame(); + try { + frame.setAlwaysOnTop(true); + frame.setLayout(new FlowLayout()); + frame.add(choice); + frame.pack(); + frameWidth = frame.getWidth(); + frame.setSize(frameWidth, SIZE); + frame.setVisible(true); + frame.setLocation(tmp.x, tmp.y); + openPopup(choice); + } finally { + frame.dispose(); + } + } + + private static void openPopup(final Choice choice) throws Exception { + Robot robot = new Robot(); + robot.setAutoDelay(100); + robot.setAutoWaitForIdle(true); + robot.waitForIdle(); + Point pt = choice.getLocationOnScreen(); + robot.mouseMove(pt.x + choice.getWidth() / 2, + pt.y + choice.getHeight() / 2); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + int x = pt.x + choice.getWidth() / 2; + int y = pt.y + choice.getHeight() / 2 + 70; + robot.mouseMove(x, y); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.waitForIdle(); + if (choice.getSelectedIndex() == 0) { + throw new RuntimeException(); + } + } +} diff --git a/jdk/test/java/awt/Choice/UnfocusableToplevel/UnfocusableToplevel.java b/jdk/test/java/awt/Choice/UnfocusableToplevel/UnfocusableToplevel.java index 17587f9526c..35819bdc2a7 100644 --- a/jdk/test/java/awt/Choice/UnfocusableToplevel/UnfocusableToplevel.java +++ b/jdk/test/java/awt/Choice/UnfocusableToplevel/UnfocusableToplevel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.html b/jdk/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.html index 2367cfc6b4a..356ad0f8126 100644 --- a/jdk/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.html +++ b/jdk/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.html @@ -1,5 +1,5 @@ - m3 cycle - resolveRequiresAndUses(finder, "m1"); + resolveAndBind(finder, "m1"); + } + + + /** + * Basic test to detect reading a module with the same name as itself + * + * The test consists of three configurations: + * - Configuration cf1: m1, m2 requires transitive m1 + * - Configuration cf2: m1 requires m2 + */ + @Test(expectedExceptions = { ResolutionException.class }) + public void testReadModuleWithSameNameAsSelf() { + ModuleDescriptor descriptor1_v1 = newBuilder("m1") + .build(); + + ModuleDescriptor descriptor2 = newBuilder("m2") + .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") + .build(); + + ModuleDescriptor descriptor1_v2 = newBuilder("m1") + .requires("m2") + .build(); + + ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1_v1, descriptor2); + Configuration cf1 = resolve(finder1, "m2"); + assertTrue(cf1.modules().size() == 2); + + // resolve should throw ResolutionException + ModuleFinder finder2 = ModuleUtils.finderOf(descriptor1_v2); + resolve(cf1, finder2, "m1"); + } + + + /** + * Basic test to detect reading two modules with the same name + * + * The test consists of three configurations: + * - Configuration cf1: m1, m2 requires transitive m1 + * - Configuration cf2: m1, m3 requires transitive m1 + * - Configuration cf3(cf1,cf2): m4 requires m2, m3 + */ + @Test(expectedExceptions = { ResolutionException.class }) + public void testReadTwoModuleWithSameName() { + ModuleDescriptor descriptor1 = newBuilder("m1") + .build(); + + ModuleDescriptor descriptor2 = newBuilder("m2") + .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") + .build(); + + ModuleDescriptor descriptor3 = newBuilder("m3") + .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") + .build(); + + ModuleDescriptor descriptor4 = newBuilder("m4") + .requires("m2") + .requires("m3") + .build(); + + ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2); + Configuration cf1 = resolve(finder1, "m2"); + assertTrue(cf1.modules().size() == 2); + + ModuleFinder finder2 = ModuleUtils.finderOf(descriptor1, descriptor3); + Configuration cf2 = resolve(finder2, "m3"); + assertTrue(cf2.modules().size() == 2); + + // should throw ResolutionException as m4 will read modules named "m1". + ModuleFinder finder3 = ModuleUtils.finderOf(descriptor4); + Configuration.resolve(finder3, List.of(cf1, cf2), ModuleFinder.of(), Set.of("m4")); } @@ -1699,19 +1619,16 @@ public class ConfigurationTest { @Test(expectedExceptions = { ResolutionException.class }) public void testPackageSuppliedByTwoOthers() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") .requires("m3") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .exports("p") .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .exports("p", Set.of("m1")) .build(); @@ -1719,7 +1636,7 @@ public class ConfigurationTest { = ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3); // m2 and m3 export package p to module m1 - resolveRequires(finder, "m1"); + resolve(finder, "m1"); } @@ -1730,21 +1647,19 @@ public class ConfigurationTest { @Test(expectedExceptions = { ResolutionException.class }) public void testPackageSuppliedBySelfAndOther() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") - .contains("p") + .packages(Set.of("p")) .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .exports("p") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); // m1 contains package p, module m2 exports package p to m1 - resolveRequires(finder, "m1"); + resolve(finder, "m1"); } @@ -1753,20 +1668,18 @@ public class ConfigurationTest { * a module that also contains a package p. */ public void testContainsPackageInSelfAndOther() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") - .contains("p") + .packages(Set.of("p")) .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") - .contains("p") + ModuleDescriptor descriptor2 = newBuilder("m2") + .packages(Set.of("p")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 2); assertTrue(cf.findModule("m1").isPresent()); @@ -1787,18 +1700,17 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testExportSamePackageAsBootLayer() { - ModuleDescriptor descriptor - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor = newBuilder("m1") .requires("java.base") .exports("java.lang") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor); - Configuration bootConfiguration = Layer.boot().configuration(); + Configuration bootConfiguration = ModuleLayer.boot().configuration(); // m1 contains package java.lang, java.base exports package java.lang to m1 - resolveRequires(bootConfiguration, finder, "m1"); + resolve(bootConfiguration, finder, "m1"); } @@ -1806,15 +1718,14 @@ public class ConfigurationTest { * Test "uses p.S" where p is contained in the same module. */ public void testContainsService1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("p") + ModuleDescriptor descriptor1 = newBuilder("m1") + .packages(Set.of("p")) .uses("p.S") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 1); assertTrue(cf.findModule("m1").isPresent()); @@ -1826,13 +1737,11 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testContainsService2() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("p") + ModuleDescriptor descriptor1 = newBuilder("m1") + .packages(Set.of("p")) .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") .uses("p.S") .build(); @@ -1840,7 +1749,7 @@ public class ConfigurationTest { ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); // m2 does not read a module that exports p - resolveRequires(finder, "m2"); + resolve(finder, "m2"); } @@ -1848,16 +1757,14 @@ public class ConfigurationTest { * Test "provides p.S" where p is contained in the same module. */ public void testContainsService3() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("p") - .contains("q") - .provides("p.S", "q.S1") + ModuleDescriptor descriptor1 = newBuilder("m1") + .packages(Set.of("p", "q")) + .provides("p.S", List.of("q.S1")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 1); assertTrue(cf.findModule("m1").isPresent()); @@ -1869,22 +1776,19 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testContainsService4() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("p") + ModuleDescriptor descriptor1 = newBuilder("m1") + .packages(Set.of("p")) .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") - .contains("q") - .provides("p.S", "q.S1") + .provides("p.S", List.of("q.S1")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); // m2 does not read a module that exports p - resolveRequires(finder, "m2"); + resolve(finder, "m2"); } @@ -1893,15 +1797,14 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testServiceTypePackageNotExported1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .uses("p.S") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); // m1 does not read a module that exports p - resolveRequires(finder, "m1"); + resolve(finder, "m1"); } @@ -1910,40 +1813,14 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testServiceTypePackageNotExported2() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("q") - .provides("p.S", "q.T") + ModuleDescriptor descriptor1 = newBuilder("m1") + .provides("p.S", List.of("q.T")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); // m1 does not read a module that exports p - resolveRequires(finder, "m1"); - } - - - /** - * Test "provides p.S with q.T" where q.T is not local - */ - @Test(expectedExceptions = { ResolutionException.class }) - public void testProviderPackageNotLocal() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .exports("p") - .exports("q") - .build(); - - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") - .requires("m1") - .provides("p.S", "q.T") - .build(); - - ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - - // q.T not in module m2 - resolveRequires(finder, "m2"); + resolve(finder, "m1"); } @@ -1966,26 +1843,9 @@ public class ConfigurationTest { public Object[][] createPlatformMatches() { return new Object[][]{ - { "linux-*-*", "*-*-*" }, - { "*-arm-*", "*-*-*" }, - { "*-*-2.6", "*-*-*" }, - - { "linux-arm-*", "*-*-*" }, - { "linux-*-2.6", "*-*-*" }, - { "*-arm-2.6", "*-*-*" }, - - { "linux-arm-2.6", "*-*-*" }, - - { "linux-*-*", "linux-*-*" }, - { "*-arm-*", "*-arm-*" }, - { "*-*-2.6", "*-*-2.6" }, - - { "linux-arm-*", "linux-arm-*" }, - { "linux-arm-*", "linux-*-*" }, - { "linux-*-2.6", "linux-*-2.6" }, - { "linux-*-2.6", "linux-arm-*" }, - - { "linux-arm-2.6", "linux-arm-2.6" }, + { "", "" }, + { "linux-arm", "" }, + { "linux-arm", "linux-arm" }, }; @@ -1995,9 +1855,9 @@ public class ConfigurationTest { public Object[][] createBad() { return new Object[][] { - { "linux-*-*", "solaris-*-*" }, - { "linux-x86-*", "linux-arm-*" }, - { "linux-*-2.4", "linux-x86-2.6" }, + { "linux-x64", "linux-arm" }, + { "linux-x64", "windows-x64" }, + }; } @@ -2005,38 +1865,25 @@ public class ConfigurationTest { * Test creating a configuration containing platform specific modules. */ @Test(dataProvider = "platformmatch") - public void testPlatformMatch(String s1, String s2) { + public void testPlatformMatch(String s1, String s2) throws IOException { - ModuleDescriptor.Builder builder - = ModuleDescriptor.module("m1").requires("m2"); + ModuleDescriptor base = ModuleDescriptor.newModule("java.base").build(); + Path system = writeModule(base, null); - String[] s = s1.split("-"); - if (!s[0].equals("*")) - builder.osName(s[0]); - if (!s[1].equals("*")) - builder.osArch(s[1]); - if (!s[2].equals("*")) - builder.osVersion(s[2]); + ModuleDescriptor descriptor1 = ModuleDescriptor.newModule("m1") + .requires("m2") + .build(); + Path dir1 = writeModule(descriptor1, s1); - ModuleDescriptor descriptor1 = builder.build(); + ModuleDescriptor descriptor2 = ModuleDescriptor.newModule("m2").build(); + Path dir2 = writeModule(descriptor2, s2); - builder = ModuleDescriptor.module("m2"); + ModuleFinder finder = ModuleFinder.of(system, dir1, dir2); - s = s2.split("-"); - if (!s[0].equals("*")) - builder.osName(s[0]); - if (!s[1].equals("*")) - builder.osArch(s[1]); - if (!s[2].equals("*")) - builder.osVersion(s[2]); + Configuration cf = resolve(finder, "m1"); - ModuleDescriptor descriptor2 = builder.build(); - - ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - - Configuration cf = resolveRequires(finder, "m1"); - - assertTrue(cf.modules().size() == 2); + assertTrue(cf.modules().size() == 3); + assertTrue(cf.findModule("java.base").isPresent()); assertTrue(cf.findModule("m1").isPresent()); assertTrue(cf.findModule("m2").isPresent()); } @@ -2046,24 +1893,60 @@ public class ConfigurationTest { * platforms. */ @Test(dataProvider = "platformmismatch", - expectedExceptions = ResolutionException.class ) - public void testPlatformMisMatch(String s1, String s2) { + expectedExceptions = FindException.class ) + public void testPlatformMisMatch(String s1, String s2) throws IOException { testPlatformMatch(s1, s2); } - // no parents @Test(expectedExceptions = { IllegalArgumentException.class }) public void testResolveRequiresWithNoParents() { ModuleFinder empty = ModuleFinder.of(); - Configuration.resolveRequires(empty, List.of(), empty, Set.of()); + Configuration.resolve(empty, List.of(), empty, Set.of()); } @Test(expectedExceptions = { IllegalArgumentException.class }) public void testResolveRequiresAndUsesWithNoParents() { ModuleFinder empty = ModuleFinder.of(); - Configuration.resolveRequiresAndUses(empty, List.of(), empty, Set.of()); + Configuration.resolveAndBind(empty, List.of(), empty, Set.of()); + } + + + // parents with modules for specific platforms + @Test(dataProvider = "platformmatch") + public void testResolveRequiresWithCompatibleParents(String s1, String s2) + throws IOException + { + ModuleDescriptor base = ModuleDescriptor.newModule("java.base").build(); + Path system = writeModule(base, null); + + ModuleDescriptor descriptor1 = ModuleDescriptor.newModule("m1").build(); + Path dir1 = writeModule(descriptor1, s1); + + ModuleDescriptor descriptor2 = ModuleDescriptor.newModule("m2").build(); + Path dir2 = writeModule(descriptor2, s2); + + ModuleFinder finder1 = ModuleFinder.of(system, dir1); + Configuration cf1 = resolve(finder1, "m1"); + + ModuleFinder finder2 = ModuleFinder.of(system, dir2); + Configuration cf2 = resolve(finder2, "m2"); + + Configuration cf3 = Configuration.resolve(ModuleFinder.of(), + List.of(cf1, cf2), + ModuleFinder.of(), + Set.of()); + assertTrue(cf3.parents().size() == 2); + } + + + @Test(dataProvider = "platformmismatch", + expectedExceptions = IllegalArgumentException.class ) + public void testResolveRequiresWithConflictingParents(String s1, String s2) + throws IOException + { + testResolveRequiresWithCompatibleParents(s1, s2); } @@ -2074,72 +1957,72 @@ public class ConfigurationTest { @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull1() { - resolveRequires((ModuleFinder)null, ModuleFinder.of()); + resolve((ModuleFinder)null, ModuleFinder.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull2() { - resolveRequires(ModuleFinder.of(), (ModuleFinder)null); + resolve(ModuleFinder.of(), (ModuleFinder)null); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull3() { Configuration empty = Configuration.empty(); - Configuration.resolveRequires(null, List.of(empty), ModuleFinder.of(), Set.of()); + Configuration.resolve(null, List.of(empty), ModuleFinder.of(), Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull4() { ModuleFinder empty = ModuleFinder.of(); - Configuration.resolveRequires(empty, null, empty, Set.of()); + Configuration.resolve(empty, null, empty, Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull5() { - Configuration cf = Layer.boot().configuration(); - Configuration.resolveRequires(ModuleFinder.of(), List.of(cf), null, Set.of()); + Configuration cf = ModuleLayer.boot().configuration(); + Configuration.resolve(ModuleFinder.of(), List.of(cf), null, Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull6() { ModuleFinder empty = ModuleFinder.of(); - Configuration cf = Layer.boot().configuration(); - Configuration.resolveRequires(empty, List.of(cf), empty, null); + Configuration cf = ModuleLayer.boot().configuration(); + Configuration.resolve(empty, List.of(cf), empty, null); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull1() { - resolveRequiresAndUses((ModuleFinder) null, ModuleFinder.of()); + resolveAndBind((ModuleFinder) null, ModuleFinder.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull2() { - resolveRequiresAndUses(ModuleFinder.of(), (ModuleFinder) null); + resolveAndBind(ModuleFinder.of(), (ModuleFinder) null); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull3() { Configuration empty = Configuration.empty(); - Configuration.resolveRequiresAndUses(null, List.of(empty), ModuleFinder.of(), Set.of()); + Configuration.resolveAndBind(null, List.of(empty), ModuleFinder.of(), Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull4() { ModuleFinder empty = ModuleFinder.of(); - Configuration.resolveRequiresAndUses(empty, null, empty, Set.of()); + Configuration.resolveAndBind(empty, null, empty, Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull5() { - Configuration cf = Layer.boot().configuration(); - Configuration.resolveRequiresAndUses(ModuleFinder.of(), List.of(cf), null, Set.of()); + Configuration cf = ModuleLayer.boot().configuration(); + Configuration.resolveAndBind(ModuleFinder.of(), List.of(cf), null, Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull6() { ModuleFinder empty = ModuleFinder.of(); - Configuration cf = Layer.boot().configuration(); - Configuration.resolveRequiresAndUses(empty, List.of(cf), empty, null); + Configuration cf = ModuleLayer.boot().configuration(); + Configuration.resolveAndBind(empty, List.of(cf), empty, null); } @Test(expectedExceptions = { NullPointerException.class }) @@ -2151,88 +2034,94 @@ public class ConfigurationTest { @Test(expectedExceptions = { UnsupportedOperationException.class }) public void testImmutableSet1() { - Configuration cf = Layer.boot().configuration(); + Configuration cf = ModuleLayer.boot().configuration(); ResolvedModule base = cf.findModule("java.base").get(); cf.modules().add(base); } @Test(expectedExceptions = { UnsupportedOperationException.class }) public void testImmutableSet2() { - Configuration cf = Layer.boot().configuration(); + Configuration cf = ModuleLayer.boot().configuration(); ResolvedModule base = cf.findModule("java.base").get(); base.reads().add(base); } /** - * Invokes parent.resolveRequires(...) + * Invokes parent.resolve(...) */ - private Configuration resolveRequires(Configuration parent, - ModuleFinder before, - ModuleFinder after, - String... roots) { - return parent.resolveRequires(before, after, Set.of(roots)); + private Configuration resolve(Configuration parent, + ModuleFinder before, + ModuleFinder after, + String... roots) { + return parent.resolve(before, after, Set.of(roots)); } - private Configuration resolveRequires(Configuration parent, - ModuleFinder before, - String... roots) { - return resolveRequires(parent, before, ModuleFinder.of(), roots); + private Configuration resolve(Configuration parent, + ModuleFinder before, + String... roots) { + return resolve(parent, before, ModuleFinder.of(), roots); } - private Configuration resolveRequires(ModuleFinder before, - ModuleFinder after, - String... roots) { - return resolveRequires(Configuration.empty(), before, after, roots); + private Configuration resolve(ModuleFinder before, + ModuleFinder after, + String... roots) { + return resolve(Configuration.empty(), before, after, roots); } - private Configuration resolveRequires(ModuleFinder before, - String... roots) { - return resolveRequires(Configuration.empty(), before, roots); + private Configuration resolve(ModuleFinder before, + String... roots) { + return resolve(Configuration.empty(), before, roots); } /** - * Invokes parent.resolveRequiresAndUses(...) + * Invokes parent.resolveAndBind(...) */ - private Configuration resolveRequiresAndUses(Configuration parent, - ModuleFinder before, - ModuleFinder after, - String... roots) { - return parent.resolveRequiresAndUses(before, after, Set.of(roots)); + private Configuration resolveAndBind(Configuration parent, + ModuleFinder before, + ModuleFinder after, + String... roots) { + return parent.resolveAndBind(before, after, Set.of(roots)); } - private Configuration resolveRequiresAndUses(Configuration parent, - ModuleFinder before, - String... roots) { - return resolveRequiresAndUses(parent, before, ModuleFinder.of(), roots); + private Configuration resolveAndBind(Configuration parent, + ModuleFinder before, + String... roots) { + return resolveAndBind(parent, before, ModuleFinder.of(), roots); } - private Configuration resolveRequiresAndUses(ModuleFinder before, - ModuleFinder after, - String... roots) { - return resolveRequiresAndUses(Configuration.empty(), before, after, roots); + private Configuration resolveAndBind(ModuleFinder before, + ModuleFinder after, + String... roots) { + return resolveAndBind(Configuration.empty(), before, after, roots); } - private Configuration resolveRequiresAndUses(ModuleFinder before, - String... roots) { - return resolveRequiresAndUses(Configuration.empty(), before, roots); + private Configuration resolveAndBind(ModuleFinder before, + String... roots) { + return resolveAndBind(Configuration.empty(), before, roots); } /** - * Returns {@code true} if the configuration contains module mn1 - * that reads module mn2. + * Writes a module-info.class. If {@code targetPlatform} is not null then + * it includes the ModuleTarget class file attribute with the target platform. */ - static boolean reads(Configuration cf, String mn1, String mn2) { - Optional om1 = cf.findModule(mn1); - if (!om1.isPresent()) - return false; - - return om1.get().reads().stream() - .map(ResolvedModule::name) - .anyMatch(mn2::equals); + static Path writeModule(ModuleDescriptor descriptor, String targetPlatform) + throws IOException + { + ModuleTarget target; + if (targetPlatform != null) { + target = new ModuleTarget(targetPlatform); + } else { + target = null; + } + String name = descriptor.name(); + Path dir = Files.createTempDirectory(name); + Path mi = dir.resolve("module-info.class"); + try (OutputStream out = Files.newOutputStream(mi)) { + ModuleInfoWriter.write(descriptor, target, out); + } + return dir; } - - } diff --git a/jdk/test/java/lang/module/ModuleDescriptorTest.java b/jdk/test/java/lang/module/ModuleDescriptorTest.java index 276ecf71048..83518001b37 100644 --- a/jdk/test/java/lang/module/ModuleDescriptorTest.java +++ b/jdk/test/java/lang/module/ModuleDescriptorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -24,6 +24,7 @@ /** * @test * @modules java.base/jdk.internal.module + * java.base/jdk.internal.misc * @run testng ModuleDescriptorTest * @summary Basic test for java.lang.module.ModuleDescriptor and its builder */ @@ -40,16 +41,22 @@ import java.lang.module.ModuleDescriptor.Requires; import java.lang.module.ModuleDescriptor.Provides; import java.lang.module.ModuleDescriptor.Requires.Modifier; import java.lang.module.ModuleDescriptor.Version; -import java.lang.reflect.Module; import java.nio.ByteBuffer; +import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; import java.util.HashSet; +import java.util.Iterator; import java.util.List; +import java.util.Objects; +import java.util.Optional; import java.util.Set; +import java.util.stream.Collectors; import static java.lang.module.ModuleDescriptor.Requires.Modifier.*; +import jdk.internal.misc.JavaLangModuleAccess; +import jdk.internal.misc.SharedSecrets; import jdk.internal.module.ModuleInfoWriter; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -58,8 +65,8 @@ import static org.testng.Assert.*; @Test public class ModuleDescriptorTest { - @DataProvider(name = "invalidjavaidentifiers") - public Object[][] invalidJavaIdentifiers() { + @DataProvider(name = "invalidNames") + public Object[][] invalidNames() { return new Object[][]{ { null, null }, @@ -77,6 +84,32 @@ public class ModuleDescriptorTest { { "foo.bar.1gus", null }, { "foo.bar.[gus]", null }, + { "class", null }, + { "interface", null }, + { "true", null }, + { "false", null }, + { "null", null }, + + { "x.class", null }, + { "x.interface", null }, + { "x.true", null }, + { "x.false", null }, + { "x.null", null }, + + { "class.x", null }, + { "interface.x", null }, + { "true.x", null }, + { "false.x", null }, + { "null.x", null }, + + { "x.class.x", null }, + { "x.interface.x", null }, + { "x.true.x", null }, + { "x.false.x", null }, + { "x.null.x", null }, + + { "_", null }, + }; } @@ -84,21 +117,27 @@ public class ModuleDescriptorTest { // requires private Requires requires(Set mods, String mn) { - return ModuleDescriptor.module("m") - .requires(mods, mn) - .build() - .requires() - .iterator() - .next(); + return requires(mods, mn, null); } private Requires requires(Set mods, String mn, Version v) { - return ModuleDescriptor.module("m") - .requires(mods, mn, v) - .build() - .requires() - .iterator() - .next(); + Builder builder = ModuleDescriptor.newModule("m"); + if (v == null) { + builder.requires(mods, mn); + } else { + builder.requires(mods, mn, v); + } + Set requires = builder.build().requires(); + assertTrue(requires.size() == 2); + Iterator iterator = requires.iterator(); + Requires r = iterator.next(); + if (r.name().equals("java.base")) { + r = iterator.next(); + } else { + Requires other = iterator.next(); + assertEquals(other.name(), "java.base"); + } + return r; } private Requires requires(String mn) { @@ -107,7 +146,7 @@ public class ModuleDescriptorTest { public void testRequiresWithRequires() { Requires r1 = requires("foo"); - ModuleDescriptor descriptor = ModuleDescriptor.module("m").requires(r1).build(); + ModuleDescriptor descriptor = ModuleDescriptor.newModule("m").requires(r1).build(); Requires r2 = descriptor.requires().iterator().next(); assertEquals(r1, r2); } @@ -162,31 +201,31 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = IllegalStateException.class) public void testRequiresWithDuplicatesRequires() { Requires r = requires("foo"); - ModuleDescriptor.module("m").requires(r).requires(r); + ModuleDescriptor.newModule("m").requires(r).requires(r); } @Test(expectedExceptions = IllegalArgumentException.class) public void testRequiresSelfWithRequires() { Requires r = requires("foo"); - ModuleDescriptor.module("foo").requires(r); + ModuleDescriptor.newModule("foo").requires(r); } @Test(expectedExceptions = IllegalArgumentException.class) public void testRequiresSelfWithNoModifier() { - ModuleDescriptor.module("m").requires("m"); + ModuleDescriptor.newModule("m").requires("m"); } @Test(expectedExceptions = IllegalArgumentException.class) public void testRequiresSelfWithOneModifier() { - ModuleDescriptor.module("m").requires(Set.of(TRANSITIVE), "m"); + ModuleDescriptor.newModule("m").requires(Set.of(TRANSITIVE), "m"); } @Test(expectedExceptions = IllegalArgumentException.class) public void testRequiresSelfWithAllModifiers() { - ModuleDescriptor.module("m").requires(EnumSet.allOf(Modifier.class), "m"); + ModuleDescriptor.newModule("m").requires(EnumSet.allOf(Modifier.class), "m"); } - @Test(dataProvider = "invalidjavaidentifiers", + @Test(dataProvider = "invalidNames", expectedExceptions = IllegalArgumentException.class ) public void testRequiresWithBadModuleName(String mn, String ignore) { requires(EnumSet.noneOf(Modifier.class), mn); @@ -194,17 +233,17 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = NullPointerException.class) public void testRequiresWithNullRequires() { - ModuleDescriptor.module("m").requires((Requires) null); + ModuleDescriptor.newModule("m").requires((Requires) null); } @Test(expectedExceptions = NullPointerException.class) public void testRequiresWithNullModifiers() { - ModuleDescriptor.module("m").requires(null, "foo"); + ModuleDescriptor.newModule("m").requires(null, "foo"); } @Test(expectedExceptions = NullPointerException.class) public void testRequiresWithNullVersion() { - ModuleDescriptor.module("m").requires(Set.of(), "foo", null); + ModuleDescriptor.newModule("m").requires(Set.of(), "foo", null); } public void testRequiresCompare() { @@ -284,7 +323,7 @@ public class ModuleDescriptorTest { // exports private Exports exports(Set mods, String pn) { - return ModuleDescriptor.module("foo") + return ModuleDescriptor.newModule("foo") .exports(mods, pn) .build() .exports() @@ -297,7 +336,7 @@ public class ModuleDescriptorTest { } private Exports exports(Set mods, String pn, String target) { - return ModuleDescriptor.module("foo") + return ModuleDescriptor.newModule("foo") .exports(mods, pn, Set.of(target)) .build() .exports() @@ -312,7 +351,7 @@ public class ModuleDescriptorTest { public void testExportsExports() { Exports e1 = exports("p"); - ModuleDescriptor descriptor = ModuleDescriptor.module("m").exports(e1).build(); + ModuleDescriptor descriptor = ModuleDescriptor.newModule("m").exports(e1).build(); Exports e2 = descriptor.exports().iterator().next(); assertEquals(e1, e2); } @@ -341,7 +380,7 @@ public class ModuleDescriptorTest { targets.add("bar"); targets.add("gus"); Exports e - = ModuleDescriptor.module("foo") + = ModuleDescriptor.newModule("foo") .exports("p", targets) .build() .exports() @@ -380,69 +419,80 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = IllegalStateException.class) public void testExportsWithDuplicate1() { Exports e = exports("p"); - ModuleDescriptor.module("foo").exports(e).exports(e); + ModuleDescriptor.newModule("foo").exports(e).exports(e); } @Test(expectedExceptions = IllegalStateException.class) public void testExportsWithDuplicate2() { - ModuleDescriptor.module("foo").exports("p").exports("p"); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testExportsOnContainedPackage() { - ModuleDescriptor.module("foo").contains("p").exports("p"); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testExportsToTargetOnContainedPackage() { - ModuleDescriptor.module("foo").contains("p").exports("p", Set.of("bar")); + ModuleDescriptor.newModule("foo").exports("p").exports("p"); } @Test(expectedExceptions = IllegalArgumentException.class ) public void testExportsWithEmptySet() { - ModuleDescriptor.module("foo").exports("p", Collections.emptySet()); + ModuleDescriptor.newModule("foo").exports("p", Collections.emptySet()); } - @Test(dataProvider = "invalidjavaidentifiers", + @Test(dataProvider = "invalidNames", expectedExceptions = IllegalArgumentException.class ) public void testExportsWithBadName(String pn, String ignore) { - ModuleDescriptor.module("foo").exports(pn); + ModuleDescriptor.newModule("foo").exports(pn); } @Test(expectedExceptions = NullPointerException.class ) public void testExportsWithNullExports() { - ModuleDescriptor.module("foo").exports((Exports) null); + ModuleDescriptor.newModule("foo").exports((Exports) null); } @Test(expectedExceptions = NullPointerException.class ) public void testExportsWithNullTargets() { - ModuleDescriptor.module("foo").exports("p", (Set) null); + ModuleDescriptor.newModule("foo").exports("p", (Set) null); } - public void testExportsEqualsAndHashCode() { - Exports e1, e2; - - e1 = exports("p"); - e2 = exports("p"); + public void testExportsCompare() { + Exports e1 = exports("p"); + Exports e2 = exports("p"); assertEquals(e1, e2); assertTrue(e1.hashCode() == e2.hashCode()); + assertTrue(e1.compareTo(e2) == 0); + assertTrue(e2.compareTo(e1) == 0); + } - e1 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); - e2 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); + public void testExportsCompareWithSameModifiers() { + Exports e1 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); + Exports e2 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); assertEquals(e1, e2); assertTrue(e1.hashCode() == e2.hashCode()); + assertTrue(e1.compareTo(e2) == 0); + assertTrue(e2.compareTo(e1) == 0); + } - e1 = exports("p"); - e2 = exports("q"); + public void testExportsCompareWithDifferentModifiers() { + Exports e1 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); + Exports e2 = exports("p"); assertNotEquals(e1, e2); + assertTrue(e1.compareTo(e2) == 1); + assertTrue(e2.compareTo(e1) == -1); + } - e1 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); - e2 = exports(Set.of(), "p"); + public void testExportsCompareWithSameTargets() { + Exports e1 = exports("p", "x"); + Exports e2 = exports("p", "x"); + assertEquals(e1, e2); + assertTrue(e1.hashCode() == e2.hashCode()); + assertTrue(e1.compareTo(e2) == 0); + assertTrue(e2.compareTo(e1) == 0); + } + + public void testExportsCompareWithDifferentTargets() { + Exports e1 = exports("p", "y"); + Exports e2 = exports("p", "x"); assertNotEquals(e1, e2); + assertTrue(e1.compareTo(e2) == 1); + assertTrue(e2.compareTo(e1) == -1); } public void testExportsToString() { - String s = ModuleDescriptor.module("foo") + String s = ModuleDescriptor.newModule("foo") .exports("p1", Set.of("bar")) .build() .exports() @@ -457,7 +507,7 @@ public class ModuleDescriptorTest { // opens private Opens opens(Set mods, String pn) { - return ModuleDescriptor.module("foo") + return ModuleDescriptor.newModule("foo") .opens(mods, pn) .build() .opens() @@ -470,7 +520,7 @@ public class ModuleDescriptorTest { } private Opens opens(Set mods, String pn, String target) { - return ModuleDescriptor.module("foo") + return ModuleDescriptor.newModule("foo") .opens(mods, pn, Set.of(target)) .build() .opens() @@ -484,7 +534,7 @@ public class ModuleDescriptorTest { public void testOpensOpens() { Opens o1 = opens("p"); - ModuleDescriptor descriptor = ModuleDescriptor.module("m").opens(o1).build(); + ModuleDescriptor descriptor = ModuleDescriptor.newModule("m").opens(o1).build(); Opens o2 = descriptor.opens().iterator().next(); assertEquals(o1, o2); } @@ -513,7 +563,7 @@ public class ModuleDescriptorTest { Set targets = new HashSet<>(); targets.add("bar"); targets.add("gus"); - Opens o = ModuleDescriptor.module("foo") + Opens o = ModuleDescriptor.newModule("foo") .opens("p", targets) .build() .opens() @@ -528,98 +578,83 @@ public class ModuleDescriptorTest { assertTrue(o.targets().contains("gus")); } - /* - - public void testOpensToAllWithModifier() { - Exports e = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); - assertEquals(e, e); - assertTrue(e.modifiers().size() == 1); - assertTrue(e.modifiers().contains(Exports.Modifier.SYNTHETIC)); - assertEquals(e.source(), "p"); - assertFalse(e.isQualified()); - assertTrue(e.targets().isEmpty()); - } - - public void testOpensToTargetWithModifier() { - Exports e = exports(Set.of(Exports.Modifier.SYNTHETIC), "p", Set.of("bar")); - assertEquals(e, e); - assertTrue(e.modifiers().size() == 1); - assertTrue(e.modifiers().contains(Exports.Modifier.SYNTHETIC)); - assertEquals(e.source(), "p"); - assertTrue(e.isQualified()); - assertTrue(e.targets().size() == 1); - assertTrue(e.targets().contains("bar")); - } - - - */ - @Test(expectedExceptions = IllegalStateException.class) public void testOpensWithDuplicate1() { Opens o = opens("p"); - ModuleDescriptor.module("foo").opens(o).opens(o); + ModuleDescriptor.newModule("foo").opens(o).opens(o); } @Test(expectedExceptions = IllegalStateException.class) public void testOpensWithDuplicate2() { - ModuleDescriptor.module("foo").opens("p").opens("p"); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testOpensOnContainedPackage() { - ModuleDescriptor.module("foo").contains("p").opens("p"); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testOpensToTargetOnContainedPackage() { - ModuleDescriptor.module("foo").contains("p").opens("p", Set.of("bar")); + ModuleDescriptor.newModule("foo").opens("p").opens("p"); } @Test(expectedExceptions = IllegalArgumentException.class ) public void testOpensWithEmptySet() { - ModuleDescriptor.module("foo").opens("p", Collections.emptySet()); + ModuleDescriptor.newModule("foo").opens("p", Collections.emptySet()); } - @Test(dataProvider = "invalidjavaidentifiers", + @Test(dataProvider = "invalidNames", expectedExceptions = IllegalArgumentException.class ) public void testOpensWithBadName(String pn, String ignore) { - ModuleDescriptor.module("foo").opens(pn); + ModuleDescriptor.newModule("foo").opens(pn); } @Test(expectedExceptions = NullPointerException.class ) public void testOpensWithNullExports() { - ModuleDescriptor.module("foo").opens((Opens) null); + ModuleDescriptor.newModule("foo").opens((Opens) null); } @Test(expectedExceptions = NullPointerException.class ) public void testOpensWithNullTargets() { - ModuleDescriptor.module("foo").opens("p", (Set) null); + ModuleDescriptor.newModule("foo").opens("p", (Set) null); } - public void testOpensEqualsAndHashCode() { - Opens o1, o2; - - o1 = opens("p"); - o2 = opens("p"); - assertEquals(o1, o2); - assertTrue(o1.hashCode() == o1.hashCode()); - - o1 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); - o2 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); + public void testOpensCompare() { + Opens o1 = opens("p"); + Opens o2 = opens("p"); assertEquals(o1, o2); assertTrue(o1.hashCode() == o2.hashCode()); + assertTrue(o1.compareTo(o2) == 0); + assertTrue(o2.compareTo(o1) == 0); + } - o1 = opens("p"); - o2 = opens("q"); - assertNotEquals(o1, o2); + public void testOpensCompareWithSameModifiers() { + Opens o1 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); + Opens o2 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); + assertEquals(o1, o2); + assertTrue(o1.hashCode() == o2.hashCode()); + assertTrue(o1.compareTo(o2) == 0); + assertTrue(o2.compareTo(o1) == 0); + } - o1 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); - o2 = opens(Set.of(), "p"); + public void testOpensCompareWithDifferentModifiers() { + Opens o1 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); + Opens o2 = opens("p"); assertNotEquals(o1, o2); + assertTrue(o1.compareTo(o2) == 1); + assertTrue(o2.compareTo(o1) == -1); + } + + public void testOpensCompareWithSameTargets() { + Opens o1 = opens("p", "x"); + Opens o2 = opens("p", "x"); + assertEquals(o1, o2); + assertTrue(o1.hashCode() == o2.hashCode()); + assertTrue(o1.compareTo(o2) == 0); + assertTrue(o2.compareTo(o1) == 0); + } + + public void testOpensCompareWithDifferentTargets() { + Opens o1 = opens("p", "y"); + Opens o2 = opens("p", "x"); + assertNotEquals(o1, o2); + assertTrue(o1.compareTo(o2) == 1); + assertTrue(o2.compareTo(o1) == -1); } public void testOpensToString() { - String s = ModuleDescriptor.module("foo") + String s = ModuleDescriptor.newModule("foo") .opens("p1", Set.of("bar")) .build() .opens() @@ -635,7 +670,7 @@ public class ModuleDescriptorTest { public void testUses() { Set uses - = ModuleDescriptor.module("foo") + = ModuleDescriptor.newModule("foo") .uses("p.S") .uses("q.S") .build() @@ -647,30 +682,44 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = IllegalStateException.class) public void testUsesWithDuplicate() { - ModuleDescriptor.module("foo").uses("p.S").uses("p.S"); + ModuleDescriptor.newModule("foo").uses("p.S").uses("p.S"); } - @Test(dataProvider = "invalidjavaidentifiers", + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUsesWithSimpleIdentifier() { + ModuleDescriptor.newModule("foo").uses("S"); + } + + @Test(dataProvider = "invalidNames", expectedExceptions = IllegalArgumentException.class ) public void testUsesWithBadName(String service, String ignore) { - ModuleDescriptor.module("foo").uses(service); + ModuleDescriptor.newModule("foo").uses(service); } // provides private Provides provides(String st, String pc) { - return ModuleDescriptor.module("foo") - .provides(st, pc) + return ModuleDescriptor.newModule("foo") + .provides(st, List.of(pc)) .build() .provides() .iterator() .next(); } + private Provides provides(String st, List pns) { + return ModuleDescriptor.newModule("foo") + .provides(st, pns) + .build() + .provides() + .iterator() + .next(); + } + public void testProvidesWithProvides() { Provides p1 = provides("p.S", "q.S1"); - ModuleDescriptor descriptor = ModuleDescriptor.module("m") + ModuleDescriptor descriptor = ModuleDescriptor.newModule("m") .provides(p1) .build(); Provides p2 = descriptor.provides().iterator().next(); @@ -679,7 +728,7 @@ public class ModuleDescriptorTest { public void testProvides() { - Set set = ModuleDescriptor.module("foo") + Set set = ModuleDescriptor.newModule("foo") .provides("p.S", List.of("q.P1", "q.P2")) .build() .provides(); @@ -696,59 +745,86 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = IllegalStateException.class ) public void testProvidesWithDuplicateProvides() { Provides p = provides("p.S", "q.S2"); - ModuleDescriptor.module("m").provides("p.S", "q.S1").provides(p); + ModuleDescriptor.newModule("m").provides("p.S", List.of("q.S1")).provides(p); } @Test(expectedExceptions = IllegalArgumentException.class ) public void testProvidesWithEmptySet() { - ModuleDescriptor.module("foo").provides("p.Service", Collections.emptyList()); + ModuleDescriptor.newModule("foo").provides("p.Service", Collections.emptyList()); } - @Test(dataProvider = "invalidjavaidentifiers", + @Test(expectedExceptions = IllegalArgumentException.class ) + public void testProvidesWithSimpleIdentifier1() { + ModuleDescriptor.newModule("foo").provides("S", List.of("q.P")); + } + + @Test(expectedExceptions = IllegalArgumentException.class ) + public void testProvidesWithSimpleIdentifier2() { + ModuleDescriptor.newModule("foo").provides("p.S", List.of("P")); + } + + @Test(dataProvider = "invalidNames", expectedExceptions = IllegalArgumentException.class ) public void testProvidesWithBadService(String service, String ignore) { - ModuleDescriptor.module("foo").provides(service, "p.Provider"); + ModuleDescriptor.newModule("foo").provides(service, List.of("p.Provider")); } - @Test(dataProvider = "invalidjavaidentifiers", + @Test(dataProvider = "invalidNames", expectedExceptions = IllegalArgumentException.class ) public void testProvidesWithBadProvider(String provider, String ignore) { - ModuleDescriptor.module("foo").provides("p.Service", provider); + List names = new ArrayList<>(); // allows nulls + names.add(provider); + ModuleDescriptor.newModule("foo").provides("p.Service", names); } @Test(expectedExceptions = NullPointerException.class ) public void testProvidesWithNullProvides() { - ModuleDescriptor.module("foo").provides((Provides) null); + ModuleDescriptor.newModule("foo").provides((Provides) null); } @Test(expectedExceptions = NullPointerException.class ) public void testProvidesWithNullProviders() { - ModuleDescriptor.module("foo").provides("p.S", (List) null); + ModuleDescriptor.newModule("foo").provides("p.S", (List) null); } - public void testProvidesEqualsAndHashCode() { - Provides p1, p2; - - p1 = provides("p.S", "q.S1"); - p2 = provides("p.S", "q.S1"); + public void testProvidesCompare() { + Provides p1 = provides("p.S", "q.S1"); + Provides p2 = provides("p.S", "q.S1"); assertEquals(p1, p2); assertTrue(p1.hashCode() == p2.hashCode()); - - p1 = provides("p.S", "q.S1"); - p2 = provides("p.S", "q.S2"); - assertNotEquals(p1, p2); - - p1 = provides("p.S", "q.S1"); - p2 = provides("p.S2", "q.S1"); - assertNotEquals(p1, p2); + assertTrue(p1.compareTo(p2) == 0); + assertTrue(p2.compareTo(p1) == 0); } - // contains + public void testProvidesCompareWithDifferentService() { + Provides p1 = provides("p.S2", "q.S1"); + Provides p2 = provides("p.S1", "q.S1"); + assertNotEquals(p1, p2); + assertTrue(p1.compareTo(p2) == 1); + assertTrue(p2.compareTo(p1) == -1); + } - public void testContains() { - Set packages = ModuleDescriptor.module("foo") - .contains("p") - .contains("q") + public void testProvidesCompareWithDifferentProviders1() { + Provides p1 = provides("p.S", "q.S2"); + Provides p2 = provides("p.S", "q.S1"); + assertNotEquals(p1, p2); + assertTrue(p1.compareTo(p2) == 1); + assertTrue(p2.compareTo(p1) == -1); + } + + public void testProvidesCompareWithDifferentProviders2() { + Provides p1 = provides("p.S", List.of("q.S1", "q.S2")); + Provides p2 = provides("p.S", "q.S1"); + assertNotEquals(p1, p2); + assertTrue(p1.compareTo(p2) == 1); + assertTrue(p2.compareTo(p1) == -1); + } + + // packages + + public void testPackages1() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p", "q")) .build() .packages(); assertTrue(packages.size() == 2); @@ -756,56 +832,147 @@ public class ModuleDescriptorTest { assertTrue(packages.contains("q")); } - public void testContainsWithEmptySet() { - Set packages = ModuleDescriptor.module("foo") - .contains(Collections.emptySet()) + public void testPackages2() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .packages(Set.of("q")) + .build() + .packages(); + assertTrue(packages.size() == 2); + assertTrue(packages.contains("p")); + assertTrue(packages.contains("q")); + } + + + public void testPackagesWithEmptySet() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Collections.emptySet()) .build() .packages(); assertTrue(packages.size() == 0); } - @Test(expectedExceptions = IllegalStateException.class) - public void testContainsWithDuplicate() { - ModuleDescriptor.module("foo").contains("p").contains("p"); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testContainsWithExportedPackage() { - ModuleDescriptor.module("foo").exports("p").contains("p"); - } - - @Test(dataProvider = "invalidjavaidentifiers", - expectedExceptions = IllegalArgumentException.class ) - public void testContainsWithBadName(String pn, String ignore) { - ModuleDescriptor.module("foo").contains(pn); - } - - - // packages - - public void testPackages() { - Set packages = ModuleDescriptor.module("foo") - .exports("p") - .contains("q") + public void testPackagesDuplicate() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .packages(Set.of("p")) .build() .packages(); - assertTrue(packages.size() == 2); + assertTrue(packages.size() == 1); assertTrue(packages.contains("p")); - assertTrue(packages.contains("q")); } + public void testPackagesAndExportsPackage1() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .exports("p") + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndExportsPackage2() { + Set packages = ModuleDescriptor.newModule("foo") + .exports("p") + .packages(Set.of("p")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndOpensPackage1() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .opens("p") + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndOpensPackage2() { + Set packages = ModuleDescriptor.newModule("foo") + .opens("p") + .packages(Set.of("p")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndProvides1() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .provides("q.S", List.of("p.T")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndProvides2() { + Set packages = ModuleDescriptor.newModule("foo") + .provides("q.S", List.of("p.T")) + .packages(Set.of("p")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndMainClass1() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .mainClass("p.Main") + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndMainClass2() { + Set packages = ModuleDescriptor.newModule("foo") + .mainClass("p.Main") + .packages(Set.of("p")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndAll() { + Set packages = ModuleDescriptor.newModule("foo") + .exports("p1") + .opens("p2") + .packages(Set.of("p3")) + .provides("q.S", List.of("p4.T")) + .mainClass("p5.Main") + .build() + .packages(); + assertTrue(Objects.equals(packages, Set.of("p1", "p2", "p3", "p4", "p5"))); + } + + @Test(dataProvider = "invalidNames", + expectedExceptions = IllegalArgumentException.class ) + public void testPackagesWithBadName(String pn, String ignore) { + Set pkgs = new HashSet<>(); // allows nulls + pkgs.add(pn); + ModuleDescriptor.newModule("foo").packages(pkgs); + } // name public void testModuleName() { - String mn = ModuleDescriptor.module("foo").build().name(); + String mn = ModuleDescriptor.newModule("foo").build().name(); assertEquals(mn, "foo"); } - @Test(dataProvider = "invalidjavaidentifiers", + @Test(dataProvider = "invalidNames", expectedExceptions = IllegalArgumentException.class ) public void testBadModuleName(String mn, String ignore) { - ModuleDescriptor.module(mn); + ModuleDescriptor.newModule(mn); } @@ -813,7 +980,7 @@ public class ModuleDescriptorTest { public void testVersion1() { Version v1 = Version.parse("1.0"); - Version v2 = ModuleDescriptor.module("foo") + Version v2 = ModuleDescriptor.newModule("foo") .version(v1) .build() .version() @@ -823,7 +990,7 @@ public class ModuleDescriptorTest { public void testVersion2() { String vs = "1.0"; - Version v1 = ModuleDescriptor.module("foo") + Version v1 = ModuleDescriptor.newModule("foo") .version(vs) .build() .version() @@ -834,86 +1001,279 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = NullPointerException.class ) public void testNullVersion1() { - ModuleDescriptor.module("foo").version((Version) null); + ModuleDescriptor.newModule("foo").version((Version) null); } @Test(expectedExceptions = IllegalArgumentException.class ) public void testNullVersion2() { - ModuleDescriptor.module("foo").version((String) null); + ModuleDescriptor.newModule("foo").version((String) null); } @Test(expectedExceptions = IllegalArgumentException.class ) public void testEmptyVersion() { - ModuleDescriptor.module("foo").version(""); + ModuleDescriptor.newModule("foo").version(""); + } + + + @DataProvider(name = "unparseableVersions") + public Object[][] unparseableVersions() { + return new Object[][]{ + + { null, "A1" }, // no version < unparseable + { "A1", "A2" }, // unparseable < unparseable + { "A1", "1.0" }, // unparseable < parseable + + }; + } + + /** + * Basic test for unparseable module versions + */ + @Test(dataProvider = "unparseableVersions") + public void testUnparseableModuleVersion(String vs1, String vs2) { + ModuleDescriptor descriptor1 = newModule("m", vs1); + ModuleDescriptor descriptor2 = newModule("m", vs2); + + if (vs1 != null && !isParsableVersion(vs1)) { + assertFalse(descriptor1.version().isPresent()); + assertTrue(descriptor1.rawVersion().isPresent()); + assertEquals(descriptor1.rawVersion().get(), vs1); + } + + if (vs2 != null && !isParsableVersion(vs2)) { + assertFalse(descriptor2.version().isPresent()); + assertTrue(descriptor2.rawVersion().isPresent()); + assertEquals(descriptor2.rawVersion().get(), vs2); + } + + assertFalse(descriptor1.equals(descriptor2)); + assertFalse(descriptor2.equals(descriptor1)); + assertTrue(descriptor1.compareTo(descriptor2) == -1); + assertTrue(descriptor2.compareTo(descriptor1) == 1); + } + + /** + * Basic test for requiring a module with an unparseable version recorded + * at compile version. + */ + @Test(dataProvider = "unparseableVersions") + public void testUnparseableCompiledVersion(String vs1, String vs2) { + Requires r1 = newRequires("m", vs1); + Requires r2 = newRequires("m", vs2); + + if (vs1 != null && !isParsableVersion(vs1)) { + assertFalse(r1.compiledVersion().isPresent()); + assertTrue(r1.rawCompiledVersion().isPresent()); + assertEquals(r1.rawCompiledVersion().get(), vs1); + } + + if (vs2 != null && !isParsableVersion(vs2)) { + assertFalse(r2.compiledVersion().isPresent()); + assertTrue(r2.rawCompiledVersion().isPresent()); + assertEquals(r2.rawCompiledVersion().get(), vs2); + } + + assertFalse(r1.equals(r2)); + assertFalse(r2.equals(r1)); + assertTrue(r1.compareTo(r2) == -1); + assertTrue(r2.compareTo(r1) == 1); + } + + private ModuleDescriptor newModule(String name, String vs) { + JavaLangModuleAccess JLMA = SharedSecrets.getJavaLangModuleAccess(); + Builder builder = JLMA.newModuleBuilder(name, false, Set.of()); + if (vs != null) + builder.version(vs); + builder.requires("java.base"); + ByteBuffer bb = ModuleInfoWriter.toByteBuffer(builder.build()); + return ModuleDescriptor.read(bb); + } + + private Requires newRequires(String name, String vs) { + JavaLangModuleAccess JLMA = SharedSecrets.getJavaLangModuleAccess(); + Builder builder = JLMA.newModuleBuilder("foo", false, Set.of()); + if (vs == null) { + builder.requires(name); + } else { + JLMA.requires(builder, Set.of(), name, vs); + } + Set requires = builder.build().requires(); + Iterator iterator = requires.iterator(); + ModuleDescriptor.Requires r = iterator.next(); + if (r.name().equals("java.base")) { + r = iterator.next(); + } + return r; + } + + private boolean isParsableVersion(String vs) { + try { + Version.parse(vs); + return true; + } catch (IllegalArgumentException e) { + return false; + } } // toNameAndVersion public void testToNameAndVersion() { - ModuleDescriptor md1 = ModuleDescriptor.module("foo").build(); + ModuleDescriptor md1 = ModuleDescriptor.newModule("foo").build(); assertEquals(md1.toNameAndVersion(), "foo"); - ModuleDescriptor md2 = ModuleDescriptor.module("foo").version("1.0").build(); + ModuleDescriptor md2 = ModuleDescriptor.newModule("foo").version("1.0").build(); assertEquals(md2.toNameAndVersion(), "foo@1.0"); } // open modules - public void testOpenModules() { - ModuleDescriptor descriptor = ModuleDescriptor.openModule("m") - .requires("java.base") - .contains("p") + public void testOpenModule() { + ModuleDescriptor descriptor = ModuleDescriptor.newOpenModule("foo") + .requires("bar") + .exports("p") + .provides("p.Service", List.of("q.ServiceImpl")) .build(); + + // modifiers + assertTrue(descriptor.modifiers().contains(ModuleDescriptor.Modifier.OPEN)); assertTrue(descriptor.isOpen()); - assertTrue(descriptor.packages().size() == 1); - assertTrue(descriptor.packages().contains("p")); - assertTrue(descriptor.exports().isEmpty()); + + // requires + assertTrue(descriptor.requires().size() == 2); + Set names = descriptor.requires() + .stream() + .map(Requires::name) + .collect(Collectors.toSet()); + assertEquals(names, Set.of("bar", "java.base")); + + // packages + assertEquals(descriptor.packages(), Set.of("p", "q")); + + // exports + assertTrue(descriptor.exports().size() == 1); + names = descriptor.exports() + .stream() + .map(Exports::source) + .collect(Collectors.toSet()); + assertEquals(names, Set.of("p")); + + // opens + assertTrue(descriptor.opens().isEmpty()); } @Test(expectedExceptions = IllegalStateException.class) - public void testOpensOnWeakModule1() { - ModuleDescriptor.openModule("foo").opens("p"); + public void testOpensOnOpenModule1() { + ModuleDescriptor.newOpenModule("foo").opens("p"); } @Test(expectedExceptions = IllegalStateException.class) - public void testOpensOnWeakModule2() { - ModuleDescriptor.openModule("foo").opens("p", Set.of("bar")); + public void testOpensOnOpenModule2() { + ModuleDescriptor.newOpenModule("foo").opens("p", Set.of("bar")); } public void testIsOpen() { - assertFalse(ModuleDescriptor.module("m").build().isOpen()); - assertFalse(ModuleDescriptor.automaticModule("m").build().isOpen()); - assertTrue(ModuleDescriptor.openModule("m").build().isOpen()); + assertFalse(ModuleDescriptor.newModule("m").build().isOpen()); + assertFalse(ModuleDescriptor.newAutomaticModule("m").build().isOpen()); + assertTrue(ModuleDescriptor.newOpenModule("m").build().isOpen()); } // automatic modules + public void testAutomaticModule() { + ModuleDescriptor descriptor = ModuleDescriptor.newAutomaticModule("foo") + .packages(Set.of("p")) + .provides("p.Service", List.of("q.ServiceImpl")) + .build(); + + // modifiers + assertTrue(descriptor.modifiers().contains(ModuleDescriptor.Modifier.AUTOMATIC)); + assertTrue(descriptor.isAutomatic()); + + // requires + assertTrue(descriptor.requires().size() == 1); + Set names = descriptor.requires() + .stream() + .map(Requires::name) + .collect(Collectors.toSet()); + assertEquals(names, Set.of("java.base")); + + // packages + assertEquals(descriptor.packages(), Set.of("p", "q")); + assertTrue(descriptor.exports().isEmpty()); + assertTrue(descriptor.opens().isEmpty()); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testRequiresOnAutomaticModule() { + ModuleDescriptor.newAutomaticModule("foo").requires("java.base"); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testExportsOnAutomaticModule1() { + ModuleDescriptor.newAutomaticModule("foo").exports("p"); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testExportsOnAutomaticModule2() { + ModuleDescriptor.newAutomaticModule("foo").exports("p", Set.of("bar")); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testOpensOnAutomaticModule1() { + ModuleDescriptor.newAutomaticModule("foo").opens("p"); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testOpensOnAutomaticModule2() { + ModuleDescriptor.newAutomaticModule("foo").opens("p", Set.of("bar")); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testUsesOnAutomaticModule() { + ModuleDescriptor.newAutomaticModule("foo").uses("p.Service"); + } + public void testIsAutomatic() { - ModuleDescriptor descriptor1 = ModuleDescriptor.module("foo").build(); + ModuleDescriptor descriptor1 = ModuleDescriptor.newModule("foo").build(); assertFalse(descriptor1.isAutomatic()); - ModuleDescriptor descriptor2 = ModuleDescriptor.openModule("foo").build(); + ModuleDescriptor descriptor2 = ModuleDescriptor.newOpenModule("foo").build(); assertFalse(descriptor2.isAutomatic()); - ModuleDescriptor descriptor3 = ModuleDescriptor.automaticModule("foo").build(); + ModuleDescriptor descriptor3 = ModuleDescriptor.newAutomaticModule("foo").build(); assertTrue(descriptor3.isAutomatic()); } - // isSynthetic - public void testIsSynthetic() { - assertFalse(Object.class.getModule().getDescriptor().isSynthetic()); - ModuleDescriptor descriptor1 = ModuleDescriptor.module("foo").build(); - assertFalse(descriptor1.isSynthetic()); + // newModule with modifiers - ModuleDescriptor descriptor2 = ModuleDescriptor.openModule("foo").build(); - assertFalse(descriptor2.isSynthetic()); + public void testNewModuleToBuildAutomaticModule() { + Set ms = Set.of(ModuleDescriptor.Modifier.AUTOMATIC); + ModuleDescriptor descriptor = ModuleDescriptor.newModule("foo", ms).build(); + assertTrue(descriptor.modifiers().equals(ms)); + assertTrue(descriptor.isAutomatic()); + } - ModuleDescriptor descriptor3 = ModuleDescriptor.automaticModule("foo").build(); - assertFalse(descriptor3.isSynthetic()); + public void testNewModuleToBuildOpenModule() { + Set ms = Set.of(ModuleDescriptor.Modifier.OPEN); + ModuleDescriptor descriptor = ModuleDescriptor.newModule("foo", ms).build(); + assertTrue(descriptor.modifiers().equals(ms)); + assertTrue(descriptor.isOpen()); + + ms = Set.of(ModuleDescriptor.Modifier.OPEN, ModuleDescriptor.Modifier.SYNTHETIC); + descriptor = ModuleDescriptor.newModule("foo", ms).build(); + assertTrue(descriptor.modifiers().equals(ms)); + assertTrue(descriptor.isOpen()); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testNewModuleToBuildAutomaticAndOpenModule() { + Set ms = Set.of(ModuleDescriptor.Modifier.AUTOMATIC, + ModuleDescriptor.Modifier.OPEN); + ModuleDescriptor.newModule("foo", ms); } @@ -921,71 +1281,23 @@ public class ModuleDescriptorTest { public void testMainClass() { String mainClass - = ModuleDescriptor.module("foo").mainClass("p.Main").build().mainClass().get(); + = ModuleDescriptor.newModule("foo").mainClass("p.Main").build().mainClass().get(); assertEquals(mainClass, "p.Main"); } - @Test(dataProvider = "invalidjavaidentifiers", + @Test(expectedExceptions = IllegalArgumentException.class) + public void testMainClassWithSimpleIdentifier() { + ModuleDescriptor.newModule("foo").mainClass("Main"); + } + + @Test(dataProvider = "invalidNames", expectedExceptions = IllegalArgumentException.class ) public void testMainClassWithBadName(String mainClass, String ignore) { - Builder builder = ModuleDescriptor.module("foo"); + Builder builder = ModuleDescriptor.newModule("foo"); builder.mainClass(mainClass); } - // osName - - public void testOsName() { - String osName = ModuleDescriptor.module("foo").osName("Linux").build().osName().get(); - assertEquals(osName, "Linux"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testNullOsName() { - ModuleDescriptor.module("foo").osName(null); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testEmptyOsName() { - ModuleDescriptor.module("foo").osName(""); - } - - - // osArch - - public void testOsArch() { - String osArch = ModuleDescriptor.module("foo").osName("arm").build().osName().get(); - assertEquals(osArch, "arm"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testNullOsArch() { - ModuleDescriptor.module("foo").osArch(null); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testEmptyOsArch() { - ModuleDescriptor.module("foo").osArch(""); - } - - - // osVersion - - public void testOsVersion() { - String osVersion = ModuleDescriptor.module("foo").osName("11.2").build().osName().get(); - assertEquals(osVersion, "11.2"); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testNullOsVersion() { - ModuleDescriptor.module("foo").osVersion(null); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testEmptyOsVersion() { - ModuleDescriptor.module("foo").osVersion(""); - } - // reads private static InputStream EMPTY_INPUT_STREAM = new InputStream() { @@ -1002,7 +1314,9 @@ public class ModuleDescriptorTest { } }; - // basic test reading module-info.class + /** + * Basic test reading module-info.class + */ public void testRead() throws Exception { Module base = Object.class.getModule(); @@ -1019,11 +1333,12 @@ public class ModuleDescriptorTest { assertEquals(descriptor.name(), "java.base"); } } + /** * Test ModuleDescriptor with a packager finder */ public void testReadsWithPackageFinder() throws Exception { - ModuleDescriptor descriptor = ModuleDescriptor.module("foo") + ModuleDescriptor descriptor = ModuleDescriptor.newModule("foo") .requires("java.base") .build(); @@ -1044,7 +1359,7 @@ public class ModuleDescriptorTest { */ @Test(expectedExceptions = InvalidModuleDescriptorException.class) public void testReadsWithBadPackageFinder() throws Exception { - ModuleDescriptor descriptor = ModuleDescriptor.module("foo") + ModuleDescriptor descriptor = ModuleDescriptor.newModule("foo") .requires("java.base") .exports("p") .build(); @@ -1077,7 +1392,7 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = InvalidModuleDescriptorException.class) public void testReadOfJavaBaseWithRequires() { ModuleDescriptor descriptor - = ModuleDescriptor.module("java.base") + = ModuleDescriptor.newModule("java.base") .requires("other") .build(); ByteBuffer bb = ModuleInfoWriter.toByteBuffer(descriptor); @@ -1087,7 +1402,8 @@ public class ModuleDescriptorTest { // The requires table must have an entry for java.base @Test(expectedExceptions = InvalidModuleDescriptorException.class) public void testReadWithEmptyRequires() { - ModuleDescriptor descriptor = ModuleDescriptor.module("m1").build(); + ModuleDescriptor descriptor = SharedSecrets.getJavaLangModuleAccess() + .newModuleBuilder("m1", false, Set.of()).build(); ByteBuffer bb = ModuleInfoWriter.toByteBuffer(descriptor); ModuleDescriptor.read(bb); } @@ -1095,10 +1411,8 @@ public class ModuleDescriptorTest { // The requires table must have an entry for java.base @Test(expectedExceptions = InvalidModuleDescriptorException.class) public void testReadWithNoRequiresBase() { - ModuleDescriptor descriptor - = ModuleDescriptor.module("m1") - .requires("m2") - .build(); + ModuleDescriptor descriptor = SharedSecrets.getJavaLangModuleAccess() + .newModuleBuilder("m1", false, Set.of()).requires("m2").build(); ByteBuffer bb = ModuleInfoWriter.toByteBuffer(descriptor); ModuleDescriptor.read(bb); } @@ -1138,22 +1452,50 @@ public class ModuleDescriptorTest { // equals/hashCode/compareTo/toString public void testEqualsAndHashCode() { - ModuleDescriptor md1 = ModuleDescriptor.module("foo").build(); - ModuleDescriptor md2 = ModuleDescriptor.module("foo").build(); + ModuleDescriptor md1 = ModuleDescriptor.newModule("m").build(); + ModuleDescriptor md2 = ModuleDescriptor.newModule("m").build(); assertEquals(md1, md1); assertEquals(md1.hashCode(), md2.hashCode()); + assertTrue(md1.compareTo(md2) == 0); + assertTrue(md2.compareTo(md1) == 0); } - public void testCompare() { - ModuleDescriptor md1 = ModuleDescriptor.module("foo").build(); - ModuleDescriptor md2 = ModuleDescriptor.module("bar").build(); - int n = "foo".compareTo("bar"); - assertTrue(md1.compareTo(md2) == n); - assertTrue(md2.compareTo(md1) == -n); + @DataProvider(name = "sortedModuleDescriptors") + public Object[][] sortedModuleDescriptors() { + return new Object[][]{ + + { ModuleDescriptor.newModule("m2").build(), + ModuleDescriptor.newModule("m1").build() + }, + + { ModuleDescriptor.newModule("m").version("2").build(), + ModuleDescriptor.newModule("m").version("1").build() + }, + + { ModuleDescriptor.newModule("m").version("1").build(), + ModuleDescriptor.newModule("m").build() + }, + + { ModuleDescriptor.newOpenModule("m").build(), + ModuleDescriptor.newModule("m").build() + }, + + }; + } + + @Test(dataProvider = "sortedModuleDescriptors") + public void testCompare(ModuleDescriptor md1, ModuleDescriptor md2) { + assertNotEquals(md1, md2); + assertTrue(md1.compareTo(md2) == 1); + assertTrue(md2.compareTo(md1) == -1); } public void testToString() { - String s = ModuleDescriptor.module("m1").requires("m2").exports("p1").build().toString(); + String s = ModuleDescriptor.newModule("m1") + .requires("m2") + .exports("p1") + .build() + .toString(); assertTrue(s.contains("m1")); assertTrue(s.contains("m2")); assertTrue(s.contains("p1")); diff --git a/jdk/test/java/lang/module/ModuleFinderTest.java b/jdk/test/java/lang/module/ModuleFinderTest.java index 278b4b98714..79feee5694b 100644 --- a/jdk/test/java/lang/module/ModuleFinderTest.java +++ b/jdk/test/java/lang/module/ModuleFinderTest.java @@ -373,7 +373,7 @@ public class ModuleFinderTest { /** - * Test ModuleModule with a JAR file containing a .class file in the top + * Test ModuleFinder with a JAR file containing a .class file in the top * level directory. */ public void testOfOneJarFileWithTopLevelClass() throws Exception { @@ -386,6 +386,7 @@ public class ModuleFinderTest { assertTrue(false); } catch (FindException e) { assertTrue(e.getCause() instanceof InvalidModuleDescriptorException); + assertTrue(e.getCause().getMessage().contains("Mojo.class")); } finder = ModuleFinder.of(jar); @@ -394,11 +395,12 @@ public class ModuleFinderTest { assertTrue(false); } catch (FindException e) { assertTrue(e.getCause() instanceof InvalidModuleDescriptorException); + assertTrue(e.getCause().getMessage().contains("Mojo.class")); } } /** - * Test ModuleModule with a JAR file containing a .class file in the top + * Test ModuleFinder with a JAR file containing a .class file in the top * level directory. */ public void testOfOneExplodedModuleWithTopLevelClass() throws Exception { @@ -411,6 +413,7 @@ public class ModuleFinderTest { assertTrue(false); } catch (FindException e) { assertTrue(e.getCause() instanceof InvalidModuleDescriptorException); + assertTrue(e.getCause().getMessage().contains("Mojo.class")); } finder = ModuleFinder.of(m_dir); @@ -419,6 +422,7 @@ public class ModuleFinderTest { assertTrue(false); } catch (FindException e) { assertTrue(e.getCause() instanceof InvalidModuleDescriptorException); + assertTrue(e.getCause().getMessage().contains("Mojo.class")); } } @@ -471,36 +475,10 @@ public class ModuleFinderTest { * Test ModuleFinder.of with a file path to a directory containing a file * that will not be recognized as a module. */ - public void testOfWithUnrecognizedEntryInDirectory() throws Exception { + public void testOfWithUnrecognizedEntryInDirectory1() throws Exception { Path dir = Files.createTempDirectory(USER_DIR, "mods"); Files.createTempFile(dir, "m", ".junk"); - ModuleFinder finder = ModuleFinder.of(dir); - try { - finder.find("java.rhubarb"); - assertTrue(false); - } catch (FindException e) { - // expected - } - - finder = ModuleFinder.of(dir); - try { - finder.findAll(); - assertTrue(false); - } catch (FindException e) { - // expected - } - } - - - /** - * Test ModuleFinder.of with a file path to a directory containing a file - * starting with ".", the file should be ignored. - */ - public void testOfWithHiddenEntryInDirectory() throws Exception { - Path dir = Files.createTempDirectory(USER_DIR, "mods"); - Files.createTempFile(dir, ".marker", ""); - ModuleFinder finder = ModuleFinder.of(dir); assertFalse(finder.find("java.rhubarb").isPresent()); @@ -509,6 +487,24 @@ public class ModuleFinderTest { } + /** + * Test ModuleFinder.of with a file path to a directory containing a file + * that will not be recognized as a module. + */ + public void testOfWithUnrecognizedEntryInDirectory2() throws Exception { + Path dir = Files.createTempDirectory(USER_DIR, "mods"); + createModularJar(dir.resolve("m1.jar"), "m1"); + Files.createTempFile(dir, "m2", ".junk"); + + ModuleFinder finder = ModuleFinder.of(dir); + assertTrue(finder.find("m1").isPresent()); + assertFalse(finder.find("m2").isPresent()); + + finder = ModuleFinder.of(dir); + assertTrue(finder.findAll().size() == 1); + } + + /** * Test ModuleFinder.of with a directory that contains two * versions of the same module @@ -532,6 +528,30 @@ public class ModuleFinderTest { } + /** + * Test ModuleFinder.of with a directory containing hidden files + */ + public void testOfWithHiddenFiles() throws Exception { + Path dir = Files.createTempDirectory(USER_DIR, "mods"); + createExplodedModule(dir.resolve("m"), "m", + "com/.ignore", + "com/foo/.ignore", + "com/foo/foo.properties"); + + ModuleFinder finder = ModuleFinder.of(dir); + ModuleReference mref = finder.find("m").orElse(null); + assertNotNull(mref); + + Set expectedPackages; + if (System.getProperty("os.name").startsWith("Windows")) { + expectedPackages = Set.of("com", "com.foo"); + } else { + expectedPackages = Set.of("com.foo"); + } + assertEquals(mref.descriptor().packages(), expectedPackages); + } + + /** * Test ModuleFinder.of with a truncated module-info.class */ @@ -748,7 +768,7 @@ public class ModuleFinderTest { vs = mid.substring(i+1); } ModuleDescriptor.Builder builder - = ModuleDescriptor.module(mn).requires("java.base"); + = ModuleDescriptor.newModule(mn).requires("java.base"); if (vs != null) builder.version(vs); return builder.build(); diff --git a/jdk/test/java/lang/module/ModuleFinderWithSecurityManager.java b/jdk/test/java/lang/module/ModuleFinderWithSecurityManager.java new file mode 100644 index 00000000000..0fe6a0b6467 --- /dev/null +++ b/jdk/test/java/lang/module/ModuleFinderWithSecurityManager.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @run main/othervm ModuleFinderWithSecurityManager allow + * @run main/othervm ModuleFinderWithSecurityManager deny + * @summary Basic test for ModuleFinder.ofSystem() with security manager + */ + +import java.lang.module.ModuleFinder; +import java.lang.module.ModuleReference; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Set; + +public class ModuleFinderWithSecurityManager { + public static void main(String[] args) throws Exception { + boolean allow = args[0].equals("allow"); + + // set security policy to allow access + if (allow) { + String testSrc = System.getProperty("test.src"); + if (testSrc == null) + testSrc = "."; + Path policyFile = Paths.get(testSrc, "java.policy"); + System.setProperty("java.security.policy", policyFile.toString()); + } + + System.setSecurityManager(new SecurityManager()); + + ModuleFinder finder = null; + try { + finder = ModuleFinder.ofSystem(); + if (!allow) throw new RuntimeException("SecurityException expected"); + } catch (SecurityException e) { + if (allow) throw new RuntimeException("SecurityException not expected"); + } + + // no additional permissions should be required to locate modules + if (finder != null) { + ModuleReference base = finder.find("java.base").orElse(null); + if (base == null) + throw new RuntimeException("java.base not found"); + Set allModules = finder.findAll(); + if (!allModules.contains(base)) + throw new RuntimeException("java.base not in all modules"); + } + } +} diff --git a/jdk/test/java/lang/module/ModuleNamesTest.java b/jdk/test/java/lang/module/ModuleNamesTest.java index c0790eab202..afeadacec86 100644 --- a/jdk/test/java/lang/module/ModuleNamesTest.java +++ b/jdk/test/java/lang/module/ModuleNamesTest.java @@ -235,7 +235,7 @@ public class ModuleNamesTest { */ private Builder newBuilder(String mn) { return SharedSecrets.getJavaLangModuleAccess() - .newModuleBuilder(mn, false, false, false); + .newModuleBuilder(mn, false, Set.of()); } /** diff --git a/jdk/test/java/lang/module/ModuleReader/ModuleReaderTest.java b/jdk/test/java/lang/module/ModuleReader/ModuleReaderTest.java index d956c249651..773b114f338 100644 --- a/jdk/test/java/lang/module/ModuleReader/ModuleReaderTest.java +++ b/jdk/test/java/lang/module/ModuleReader/ModuleReaderTest.java @@ -37,7 +37,6 @@ import java.io.InputStream; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReader; import java.lang.module.ModuleReference; -import java.lang.reflect.Module; import java.net.URI; import java.net.URL; import java.net.URLConnection; @@ -79,14 +78,60 @@ public class ModuleReaderTest { "java/lang/Object.class" }; + // (directory) resources that may be in the base module + private static final String[] MAYBE_BASE_RESOURCES = { + "java", + "java/", + "java/lang", + "java/lang/", + }; + + // resource names that should not be found in the base module + private static final String[] NOT_BASE_RESOURCES = { + "NotFound", + "/java", + "//java", + "/java/lang", + "//java/lang", + "java//lang", + "/java/lang/Object.class", + "//java/lang/Object.class", + "java/lang/Object.class/", + "java//lang//Object.class", + "./java/lang/Object.class", + "java/./lang/Object.class", + "java/lang/./Object.class", + "../java/lang/Object.class", + "java/../lang/Object.class", + "java/lang/../Object.class", + }; + // resources in test module (can't use module-info.class as a test // resource as it will be modified by the jmod tool) private static final String[] TEST_RESOURCES = { "p/Main.class" }; - // a resource that is not in the base or test module - private static final String NOT_A_RESOURCE = "NotAResource"; + // (directory) resources that may be in the test module + private static final String[] MAYBE_TEST_RESOURCES = { + "p", + "p/" + }; + + // resource names that should not be found in the test module + private static final String[] NOT_TEST_RESOURCES = { + "NotFound", + "/p", + "//p", + "/p/Main.class", + "//p/Main.class", + "p/Main.class/", + "p//Main.class", + "./p/Main.class", + "p/./Main.class", + "../p/Main.class", + "p/../p/Main.class" + }; @BeforeTest @@ -122,14 +167,23 @@ public class ModuleReaderTest { testOpen(reader, name, expectedBytes); testRead(reader, name, expectedBytes); testList(reader, name); - } - // test "not found" - assertFalse(reader.find(NOT_A_RESOURCE).isPresent()); - assertFalse(reader.open(NOT_A_RESOURCE).isPresent()); - assertFalse(reader.read(NOT_A_RESOURCE).isPresent()); + // test resources that may be in the base module + for (String name : MAYBE_BASE_RESOURCES) { + Optional ouri = reader.find(name); + ouri.ifPresent(uri -> { + if (name.endsWith("/")) + assertTrue(uri.toString().endsWith("/")); + }); + } + // test "not found" in java.base module + for (String name : NOT_BASE_RESOURCES) { + assertFalse(reader.find(name).isPresent()); + assertFalse(reader.open(name).isPresent()); + assertFalse(reader.read(name).isPresent()); + } // test nulls try { @@ -216,13 +270,13 @@ public class ModuleReaderTest { */ void test(Path mp) throws IOException { - ModuleFinder finder = new ModulePath(Runtime.version(), true, mp); + ModuleFinder finder = ModulePath.of(Runtime.version(), true, mp); ModuleReference mref = finder.find(TEST_MODULE).get(); ModuleReader reader = mref.open(); try (reader) { - // test each of the known resources in the module + // test resources in test module for (String name : TEST_RESOURCES) { byte[] expectedBytes = Files.readAllBytes(MODS_DIR @@ -235,10 +289,22 @@ public class ModuleReaderTest { testList(reader, name); } - // test "not found" - assertFalse(reader.find(NOT_A_RESOURCE).isPresent()); - assertFalse(reader.open(NOT_A_RESOURCE).isPresent()); - assertFalse(reader.read(NOT_A_RESOURCE).isPresent()); + // test resources that may be in the test module + for (String name : MAYBE_TEST_RESOURCES) { + System.out.println(name); + Optional ouri = reader.find(name); + ouri.ifPresent(uri -> { + if (name.endsWith("/")) + assertTrue(uri.toString().endsWith("/")); + }); + } + + // test "not found" in test module + for (String name : NOT_TEST_RESOURCES) { + assertFalse(reader.find(name).isPresent()); + assertFalse(reader.open(name).isPresent()); + assertFalse(reader.read(name).isPresent()); + } // test nulls try { @@ -353,9 +419,6 @@ public class ModuleReaderTest { for (String e : names) { assertTrue(reader.find(e).isPresent()); } - - // should not contain directories - names.forEach(e -> assertFalse(e.endsWith("/"))); } } diff --git a/jdk/test/java/lang/module/ModuleReferenceTest.java b/jdk/test/java/lang/module/ModuleReferenceTest.java index bf2db124de5..f3cbb28babd 100644 --- a/jdk/test/java/lang/module/ModuleReferenceTest.java +++ b/jdk/test/java/lang/module/ModuleReferenceTest.java @@ -31,6 +31,7 @@ import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleReader; import java.lang.module.ModuleReference; import java.net.URI; +import java.util.Set; import org.testng.annotations.Test; import static org.testng.Assert.*; @@ -49,10 +50,10 @@ public class ModuleReferenceTest { public void testBasic() throws Exception { ModuleDescriptor descriptor - = ModuleDescriptor.module("m") + = ModuleDescriptor.newModule("m") .exports("p") .exports("q") - .contains("p.internal") + .packages(Set.of("p.internal")) .build(); URI uri = URI.create("module:/m"); @@ -71,7 +72,7 @@ public class ModuleReferenceTest { public void testNullLocation() { ModuleDescriptor descriptor - = ModuleDescriptor.module("m") + = ModuleDescriptor.newModule("m") .exports("p") .build(); ModuleReference mref = newModuleReference(descriptor, null); diff --git a/jdk/test/java/lang/module/MultiReleaseJarTest.java b/jdk/test/java/lang/module/MultiReleaseJarTest.java index 7daddb11993..4c58e930b08 100644 --- a/jdk/test/java/lang/module/MultiReleaseJarTest.java +++ b/jdk/test/java/lang/module/MultiReleaseJarTest.java @@ -65,7 +65,7 @@ public class MultiReleaseJarTest { private static final String MODULE_INFO = "module-info.class"; - private static final int RELEASE = Runtime.version().major(); + private static final int VERSION = Runtime.version().major(); // are multi-release JARs enabled? private static final boolean MULTI_RELEASE; @@ -80,7 +80,7 @@ public class MultiReleaseJarTest { public void testBasic() throws Exception { String name = "m1"; - ModuleDescriptor descriptor = ModuleDescriptor.module(name) + ModuleDescriptor descriptor = ModuleDescriptor.newModule(name) .requires("java.base") .build(); @@ -88,8 +88,8 @@ public class MultiReleaseJarTest { .moduleInfo("module-info.class", descriptor) .resource("p/Main.class") .resource("p/Helper.class") - .resource("META-INF/versions/9/p/Helper.class") - .resource("META-INF/versions/9/p/internal/Helper9.class") + .resource("META-INF/versions/" + VERSION + "/p/Helper.class") + .resource("META-INF/versions/" + VERSION + "/p/internal/Helper.class") .build(); // find the module @@ -117,12 +117,12 @@ public class MultiReleaseJarTest { public void testModuleInfoInVersionedSection() throws Exception { String name = "m1"; - ModuleDescriptor descriptor1 = ModuleDescriptor.module(name) + ModuleDescriptor descriptor1 = ModuleDescriptor.newModule(name) .requires("java.base") .build(); // module descriptor for versioned section - ModuleDescriptor descriptor2 = ModuleDescriptor.module(name) + ModuleDescriptor descriptor2 = ModuleDescriptor.newModule(name) .requires("java.base") .requires("jdk.unsupported") .build(); @@ -131,9 +131,9 @@ public class MultiReleaseJarTest { .moduleInfo(MODULE_INFO, descriptor1) .resource("p/Main.class") .resource("p/Helper.class") - .moduleInfo("META-INF/versions/9/" + MODULE_INFO, descriptor2) - .resource("META-INF/versions/9/p/Helper.class") - .resource("META-INF/versions/9/p/internal/Helper9.class") + .moduleInfo("META-INF/versions/" + VERSION + "/" + MODULE_INFO, descriptor2) + .resource("META-INF/versions/" + VERSION + "/p/Helper.class") + .resource("META-INF/versions/" + VERSION + "/p/internal/Helper.class") .build(); // find the module @@ -161,8 +161,8 @@ public class MultiReleaseJarTest { Path jar = new JarBuilder(name) .resource("p/Main.class") .resource("p/Helper.class") - .resource("META-INF/versions/9/p/Helper.class") - .resource("META-INF/versions/9/p/internal/Helper9.class") + .resource("META-INF/versions/" + VERSION + "/p/Helper.class") + .resource("META-INF/versions/" + VERSION + "/p/internal/Helper.class") .build(); // find the module @@ -188,19 +188,19 @@ public class MultiReleaseJarTest { public void testModuleReader() throws Exception { String name = "m1"; - ModuleDescriptor descriptor1 = ModuleDescriptor.module(name) + ModuleDescriptor descriptor1 = ModuleDescriptor.newModule(name) .requires("java.base") .build(); // module descriptor for versioned section - ModuleDescriptor descriptor2 = ModuleDescriptor.module(name) + ModuleDescriptor descriptor2 = ModuleDescriptor.newModule(name) .requires("java.base") .requires("jdk.unsupported") .build(); Path jar = new JarBuilder(name) .moduleInfo(MODULE_INFO, descriptor1) - .moduleInfo("META-INF/versions/9/" + MODULE_INFO, descriptor2) + .moduleInfo("META-INF/versions/" + VERSION + "/" + MODULE_INFO, descriptor2) .build(); // find the module @@ -243,7 +243,7 @@ public class MultiReleaseJarTest { String expectedTail = "!/"; if (MULTI_RELEASE) - expectedTail += "META-INF/versions/" + RELEASE + "/"; + expectedTail += "META-INF/versions/" + VERSION + "/"; expectedTail += MODULE_INFO; assertTrue(uri.toString().endsWith(expectedTail)); diff --git a/jdk/test/java/lang/module/customfs/ModulesInCustomFileSystem.java b/jdk/test/java/lang/module/customfs/ModulesInCustomFileSystem.java new file mode 100644 index 00000000000..64586dad24b --- /dev/null +++ b/jdk/test/java/lang/module/customfs/ModulesInCustomFileSystem.java @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @modules jdk.zipfs + * @library /lib/testlibrary + * @build ModulesInCustomFileSystem JarUtils m1/* m2/* + * @run testng/othervm ModulesInCustomFileSystem + * @summary Test ModuleFinder to find modules in a custom file system + */ + +import java.io.File; +import java.lang.module.Configuration; +import java.lang.module.ModuleFinder; +import java.lang.module.ModuleReader; +import java.lang.module.ModuleReference; +import java.lang.reflect.Method; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Set; + +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +@Test +public class ModulesInCustomFileSystem { + + /** + * Test exploded modules in a JAR file system. + */ + public void testExplodedModulesInJarFileSystem() throws Exception { + Path m1 = findModuleDirectory("m1"); + Path m2 = findModuleDirectory("m2"); + Path mlib = m1.getParent(); + assertEquals(mlib, m2.getParent()); + + // create JAR file containing m1/** and m2/** + Path jar = Files.createTempDirectory("mlib").resolve("modules.jar"); + JarUtils.createJarFile(jar, mlib); + testJarFileSystem(jar); + } + + /** + * Test modular JARs in a JAR file system + */ + public void testModularJARsInJarFileSystem() throws Exception { + Path m1 = findModuleDirectory("m1"); + Path m2 = findModuleDirectory("m2"); + Path contents = Files.createTempDirectory("contents"); + JarUtils.createJarFile(contents.resolve("m1.jar"), m1); + JarUtils.createJarFile(contents.resolve("m2.jar"), m2); + + // create JAR file containing m1.jar and m2.jar + Path jar = Files.createTempDirectory("mlib").resolve("modules.jar"); + JarUtils.createJarFile(jar, contents); + testJarFileSystem(jar); + } + + /** + * Opens a JAR file as a file system + */ + private void testJarFileSystem(Path jar) throws Exception { + ClassLoader scl = ClassLoader.getSystemClassLoader(); + try (FileSystem fs = FileSystems.newFileSystem(jar, scl)) { + // ModuleFinder to find modules in top-level directory + Path top = fs.getPath("/"); + ModuleFinder finder = ModuleFinder.of(top); + + // list the modules + listAllModules(finder); + + // load modules into child layer, invoking m1/p.Main + loadAndRunModule(finder); + } + } + + /** + * List all modules that the finder finds and the resources in the module. + */ + private void listAllModules(ModuleFinder finder) throws Exception { + for (ModuleReference mref : finder.findAll()) { + System.out.println(mref.descriptor()); + try (ModuleReader reader = mref.open()) { + reader.list().forEach(name -> System.out.format(" %s%n", name)); + } + } + } + + /** + * Creates a child layer with m1 and m2, invokes m1/p.Main to ensure that + * classes can be loaded. + */ + private void loadAndRunModule(ModuleFinder finder) throws Exception { + ModuleLayer bootLayer = ModuleLayer.boot(); + Configuration cf = bootLayer.configuration() + .resolve(finder, ModuleFinder.of(), Set.of("m1")); + ClassLoader scl = ClassLoader.getSystemClassLoader(); + ModuleLayer layer = bootLayer.defineModulesWithOneLoader(cf, scl); + Class c = layer.findLoader("m1").loadClass("p.Main"); + Method m = c.getMethod("main", String[].class); + m.invoke(null, (Object)new String[0]); + } + + /** + * Find the directory for a module on the module path + */ + private Path findModuleDirectory(String name) { + String mp = System.getProperty("jdk.module.path"); + for (String element : mp.split(File.pathSeparator)) { + Path dir = Paths.get(element).resolve(name); + if (Files.exists(dir)) { + return dir; + } + } + assertFalse(true); + return null; + } +} diff --git a/jdk/test/java/lang/module/customfs/m1/module-info.java b/jdk/test/java/lang/module/customfs/m1/module-info.java new file mode 100644 index 00000000000..bc420ad2ba5 --- /dev/null +++ b/jdk/test/java/lang/module/customfs/m1/module-info.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m1 { + exports p; + requires m2; +} diff --git a/jdk/test/java/lang/module/customfs/m1/p/Main.java b/jdk/test/java/lang/module/customfs/m1/p/Main.java new file mode 100644 index 00000000000..65e45a8dac9 --- /dev/null +++ b/jdk/test/java/lang/module/customfs/m1/p/Main.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p; + +public class Main { + public static void main(String[] args) { + q.Hello.hello(); + } +} diff --git a/jdk/test/java/lang/module/customfs/m2/module-info.java b/jdk/test/java/lang/module/customfs/m2/module-info.java new file mode 100644 index 00000000000..72b35d933cf --- /dev/null +++ b/jdk/test/java/lang/module/customfs/m2/module-info.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m2 { + exports q; +} diff --git a/jdk/test/demo/jvmti/Hello.java b/jdk/test/java/lang/module/customfs/m2/q/Hello.java similarity index 83% rename from jdk/test/demo/jvmti/Hello.java rename to jdk/test/java/lang/module/customfs/m2/q/Hello.java index 3161d28b7b9..5f912cd51ad 100644 --- a/jdk/test/demo/jvmti/Hello.java +++ b/jdk/test/java/lang/module/customfs/m2/q/Hello.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,15 +21,10 @@ * questions. */ - -/* - * - * Sample target application for jvmti demos - * - */ +package q; public class Hello { - public static void main(String args[]) { - System.out.println("Hello"); + public static void hello() { + System.out.println("hello"); } } diff --git a/jdk/test/java/lang/module/java.policy b/jdk/test/java/lang/module/java.policy new file mode 100644 index 00000000000..179334bc98a --- /dev/null +++ b/jdk/test/java/lang/module/java.policy @@ -0,0 +1,4 @@ +grant { + // ModuleFinder.ofSystem() needs this + permission java.lang.RuntimePermission "accessSystemModules"; +}; diff --git a/jdk/test/java/lang/ref/ReferenceEnqueue.java b/jdk/test/java/lang/ref/ReferenceEnqueue.java index c246591f12a..ddc89fc7f27 100644 --- a/jdk/test/java/lang/ref/ReferenceEnqueue.java +++ b/jdk/test/java/lang/ref/ReferenceEnqueue.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 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 @@ -22,17 +22,23 @@ */ /* @test - * @bug 4268317 8132306 + * @bug 4268317 8132306 8175797 * @summary Test if Reference.enqueue() works properly with GC + * @run main ReferenceEnqueue + * @run main/othervm -Djdk.lang.ref.disableClearBeforeEnqueue=true ReferenceEnqueue */ import java.lang.ref.*; +import java.util.ArrayList; +import java.util.List; public class ReferenceEnqueue { public static void main(String args[]) throws Exception { - for (int i=0; i < 5; i++) + for (int i=0; i < 5; i++) { new WeakRef().run(); + new ExplicitEnqueue().run(); + } System.out.println("Test passed."); } @@ -76,4 +82,50 @@ public class ReferenceEnqueue { } } } + + static class ExplicitEnqueue { + final ReferenceQueue queue = new ReferenceQueue<>(); + final List> refs = new ArrayList<>(); + final int iterations = 1000; + final boolean disableClearBeforeEnqueue = + Boolean.getBoolean("jdk.lang.ref.disableClearBeforeEnqueue"); + + ExplicitEnqueue() { + this.refs.add(new SoftReference<>(new Object(), queue)); + this.refs.add(new WeakReference<>(new Object(), queue)); + // Can't test PhantomReference because get() always returns null. + } + + void run() throws InterruptedException { + for (Reference ref : refs) { + if (ref.enqueue() == false) { + throw new RuntimeException("Error: enqueue failed"); + } + if (disableClearBeforeEnqueue && ref.get() == null) { + throw new RuntimeException("Error: clearing should be disabled"); + } + if (!disableClearBeforeEnqueue && ref.get() != null) { + throw new RuntimeException("Error: referent must be cleared"); + } + } + + System.gc(); + for (int i = 0; refs.size() > 0 && i < iterations; i++) { + Reference ref = (Reference)queue.poll(); + if (ref == null) { + System.gc(); + Thread.sleep(100); + continue; + } + + if (refs.remove(ref) == false) { + throw new RuntimeException("Error: unknown reference " + ref); + } + } + + if (!refs.isEmpty()) { + throw new RuntimeException("Error: not all references are removed"); + } + } + } } diff --git a/jdk/test/java/lang/reflect/AccessibleObject/CanAccessTest.java b/jdk/test/java/lang/reflect/AccessibleObject/CanAccessTest.java new file mode 100644 index 00000000000..ba641215b05 --- /dev/null +++ b/jdk/test/java/lang/reflect/AccessibleObject/CanAccessTest.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @build CanAccessTest + * @modules java.base/jdk.internal.misc:+open + * @run testng/othervm --illegal-access=deny CanAccessTest + * @summary Test AccessibleObject::canAccess method + */ + +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.security.SecureClassLoader; + +import jdk.internal.misc.Unsafe; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +@Test +public class CanAccessTest { + private static Unsafe INSTANCE = Unsafe.getUnsafe(); + + /** + * null object parameter for Constructor + */ + public void testConstructor() throws Exception { + Constructor ctor = Unsafe.class.getDeclaredConstructor(); + assertFalse(ctor.canAccess(null)); + assertTrue(ctor.trySetAccessible()); + + try { + // non-null object parameter + ctor.canAccess(INSTANCE); + assertTrue(false); + } catch (IllegalArgumentException expected) {} + } + + /** + * Test protected constructors + */ + public void testProtectedConstructor() throws Exception { + TestLoader.testProtectedConstructorNonOpenedPackage(); + + Constructor ctor = TestLoader.class.getDeclaredConstructor(); + assertTrue(ctor.canAccess(null)); + } + + /** + * null object parameter for static members + */ + public void testStaticMember() throws Exception { + Method m = Unsafe.class.getDeclaredMethod("throwIllegalAccessError"); + assertFalse(m.canAccess(null)); + assertTrue(m.trySetAccessible()); + + try { + // non-null object parameter + m.canAccess(INSTANCE); + assertTrue(false); + } catch (IllegalArgumentException expected) { } + } + + /** + * Test protected static + */ + public void testProtectedStatic() throws Exception { + Method m = TestLoader.testProtectedStatic(); + assertFalse(m.canAccess(null)); + } + + /** + * the specified object must be an instance of the declaring class + * for instance members + */ + public void testInstanceMethod() throws Exception { + Method m = Unsafe.class.getDeclaredMethod("addressSize0"); + assertFalse(m.canAccess(INSTANCE)); + + try { + m.canAccess(null); + assertTrue(false); + } catch (IllegalArgumentException expected) { } + } + + /** + * the specified object must be an instance of the declaring class + * for instance members + */ + public void testInvalidInstanceObject() throws Exception { + Class clazz = Class.forName("sun.security.x509.X500Name"); + Method m = clazz.getDeclaredMethod("size"); + + try { + m.canAccess(INSTANCE); + assertTrue(false); + } catch (IllegalArgumentException expected) { } + } + + + static class TestLoader extends SecureClassLoader { + public static Method testProtectedStatic() throws Exception { + Method m = ClassLoader.class.getDeclaredMethod("registerAsParallelCapable"); + assertTrue(m.canAccess(null)); + return m; + } + + protected TestLoader() throws Exception { + Constructor ctor = SecureClassLoader.class.getDeclaredConstructor(); + assertFalse(ctor.canAccess(null)); + assertFalse(ctor.trySetAccessible()); + } + + public static void testProtectedConstructorNonOpenedPackage() throws Exception { + new TestLoader(); + } + } +} diff --git a/jdk/test/java/lang/reflect/AccessibleObject/ModuleSetAccessibleTest.java b/jdk/test/java/lang/reflect/AccessibleObject/ModuleSetAccessibleTest.java index da5d264b1fd..18a05a2600a 100644 --- a/jdk/test/java/lang/reflect/AccessibleObject/ModuleSetAccessibleTest.java +++ b/jdk/test/java/lang/reflect/AccessibleObject/ModuleSetAccessibleTest.java @@ -26,18 +26,16 @@ * @build ModuleSetAccessibleTest * @modules java.base/java.lang:open * java.base/jdk.internal.misc:+open - * @run testng ModuleSetAccessibleTest + * @run testng/othervm --illegal-access=deny ModuleSetAccessibleTest * @summary Test java.lang.reflect.AccessibleObject with modules */ -import java.lang.module.ModuleDescriptor; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InaccessibleObjectException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.lang.reflect.Module; import jdk.internal.misc.Unsafe; diff --git a/jdk/test/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java b/jdk/test/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java new file mode 100644 index 00000000000..923ca0b69da --- /dev/null +++ b/jdk/test/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @build TrySetAccessibleTest + * @modules java.base/java.lang:open + * java.base/jdk.internal.perf + * java.base/jdk.internal.misc:+open + * @run testng/othervm --illegal-access=deny TrySetAccessibleTest + * @summary Test AccessibleObject::trySetAccessible method + */ + +import java.lang.reflect.AccessibleObject; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import jdk.internal.misc.Unsafe; +import jdk.internal.perf.Perf; + +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +@Test +public class TrySetAccessibleTest { + /** + * Invoke a private constructor on a public class in an exported package + */ + public void testPrivateConstructorInExportedPackage() throws Exception { + Constructor ctor = Perf.class.getDeclaredConstructor(); + + try { + ctor.newInstance(); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertFalse(ctor.trySetAccessible()); + assertFalse(ctor.canAccess(null)); + } + + /** + * Invoke a private constructor on a public class in an open package + */ + public void testPrivateConstructorInOpenedPackage() throws Exception { + Constructor ctor = Unsafe.class.getDeclaredConstructor(); + + try { + ctor.newInstance(); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertTrue(ctor.trySetAccessible()); + assertTrue(ctor.canAccess(null)); + Unsafe unsafe = (Unsafe) ctor.newInstance(); + } + + /** + * Invoke a private method on a public class in an exported package + */ + public void testPrivateMethodInExportedPackage() throws Exception { + Method m = Perf.class.getDeclaredMethod("getBytes", String.class); + try { + m.invoke(null); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertFalse(m.trySetAccessible()); + assertFalse(m.canAccess(null)); + } + + + /** + * Invoke a private method on a public class in an open package + */ + public void testPrivateMethodInOpenedPackage() throws Exception { + Method m = Unsafe.class.getDeclaredMethod("throwIllegalAccessError"); + assertFalse(m.canAccess(null)); + + try { + m.invoke(null); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertTrue(m.trySetAccessible()); + assertTrue(m.canAccess(null)); + try { + m.invoke(null); + assertTrue(false); + } catch (InvocationTargetException e) { + // thrown by throwIllegalAccessError + assertTrue(e.getCause() instanceof IllegalAccessError); + } + } + + /** + * Invoke a private method on a public class in an exported package + */ + public void testPrivateFieldInExportedPackage() throws Exception { + Field f = Perf.class.getDeclaredField("instance"); + try { + f.get(null); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertFalse(f.trySetAccessible()); + assertFalse(f.canAccess(null)); + try { + f.get(null); + assertTrue(false); + } catch (IllegalAccessException expected) {} + } + + /** + * Access a private field in a public class that is an exported package + */ + public void testPrivateFieldInOpenedPackage() throws Exception { + Field f = Unsafe.class.getDeclaredField("theUnsafe"); + + try { + f.get(null); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertTrue(f.trySetAccessible()); + assertTrue(f.canAccess(null)); + Unsafe unsafe = (Unsafe) f.get(null); + } + + + /** + * Invoke a public constructor on a public class in a non-exported package + */ + public void testPublicConstructorInNonExportedPackage() throws Exception { + Class clazz = Class.forName("sun.security.x509.X500Name"); + Constructor ctor = clazz.getConstructor(String.class); + + try { + ctor.newInstance("cn=duke"); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertFalse(ctor.trySetAccessible()); + assertFalse(ctor.canAccess(null)); + assertTrue(ctor.trySetAccessible() == ctor.isAccessible()); + } + + + /** + * Access a public field in a public class that in a non-exported package + */ + public void testPublicFieldInNonExportedPackage() throws Exception { + Class clazz = Class.forName("sun.security.x509.X500Name"); + Field f = clazz.getField("SERIALNUMBER_OID"); + + try { + f.get(null); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertFalse(f.trySetAccessible()); + assertFalse(f.canAccess(null)); + } + + + /** + * Test that the Class constructor cannot be make accessible. + */ + public void testJavaLangClass() throws Exception { + + // non-public constructor + Constructor ctor + = Class.class.getDeclaredConstructor(ClassLoader.class, Class.class); + AccessibleObject[] ctors = { ctor }; + + assertFalse(ctor.trySetAccessible()); + assertFalse(ctor.canAccess(null)); + } + +} diff --git a/jdk/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java b/jdk/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java index 55e11f1b3ec..da7b16938f0 100644 --- a/jdk/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java +++ b/jdk/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java @@ -23,7 +23,6 @@ import java.lang.module.Configuration; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; import java.lang.reflect.Proxy; import java.nio.file.Path; import java.nio.file.Paths; @@ -88,12 +87,12 @@ public class ProxyClassAccessTest { @Test public void testNoReadAccess() throws Exception { ModuleFinder finder = ModuleFinder.of(MODS_DIR); - Layer bootLayer = Layer.boot(); + ModuleLayer bootLayer = ModuleLayer.boot(); Configuration cf = bootLayer .configuration() - .resolveRequiresAndUses(ModuleFinder.of(), finder, modules); + .resolveAndBind(ModuleFinder.of(), finder, modules); ClassLoader parentLoader = this.getClass().getClassLoader(); - Layer layer = bootLayer.defineModulesWithOneLoader(cf, parentLoader); + ModuleLayer layer = bootLayer.defineModulesWithOneLoader(cf, parentLoader); ClassLoader loader = layer.findLoader("m1"); Class[] interfaces = new Class[] { diff --git a/jdk/test/java/lang/reflect/Proxy/ProxyForMethodHandle.java b/jdk/test/java/lang/reflect/Proxy/ProxyForMethodHandle.java index 1c45901783d..a5877018705 100644 --- a/jdk/test/java/lang/reflect/Proxy/ProxyForMethodHandle.java +++ b/jdk/test/java/lang/reflect/Proxy/ProxyForMethodHandle.java @@ -28,7 +28,6 @@ import java.lang.invoke.MethodType; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Module; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/jdk/test/java/lang/reflect/Proxy/ProxyLayerTest.java b/jdk/test/java/lang/reflect/Proxy/ProxyLayerTest.java index 5b04c93596b..c420ab4ee99 100644 --- a/jdk/test/java/lang/reflect/Proxy/ProxyLayerTest.java +++ b/jdk/test/java/lang/reflect/Proxy/ProxyLayerTest.java @@ -24,7 +24,6 @@ import java.lang.module.Configuration; import java.lang.module.ModuleFinder; import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Layer; import java.lang.reflect.Proxy; import java.nio.file.Path; import java.nio.file.Paths; @@ -70,18 +69,18 @@ public class ProxyLayerTest { } /** - * Test proxy implementing interfaces in a Layer defined in + * Test proxy implementing interfaces in a layer defined in * an unnamed module */ @Test public void testProxyInUnnamed() throws Exception { ModuleFinder finder = ModuleFinder.of(MODS_DIR); - Layer bootLayer = Layer.boot(); + ModuleLayer bootLayer = ModuleLayer.boot(); Configuration cf = bootLayer .configuration() - .resolveRequiresAndUses(ModuleFinder.of(), finder, Arrays.asList(modules)); + .resolveAndBind(ModuleFinder.of(), finder, Arrays.asList(modules)); ClassLoader scl = ClassLoader.getSystemClassLoader(); - Layer layer = bootLayer.defineModulesWithOneLoader(cf, scl); + ModuleLayer layer = bootLayer.defineModulesWithOneLoader(cf, scl); ClassLoader loader = layer.findLoader("m1"); @@ -110,12 +109,12 @@ public class ProxyLayerTest { @Test public void testProxyInDynamicModule() throws Exception { ModuleFinder finder = ModuleFinder.of(MODS_DIR); - Layer bootLayer = Layer.boot(); + ModuleLayer bootLayer = ModuleLayer.boot(); Configuration cf = bootLayer .configuration() - .resolveRequiresAndUses(ModuleFinder.of(), finder, Arrays.asList(modules)); + .resolveAndBind(ModuleFinder.of(), finder, Arrays.asList(modules)); ClassLoader scl = ClassLoader.getSystemClassLoader(); - Layer layer = bootLayer.defineModulesWithOneLoader(cf, scl); + ModuleLayer layer = bootLayer.defineModulesWithOneLoader(cf, scl); ClassLoader loader = layer.findLoader("m1"); @@ -140,12 +139,12 @@ public class ProxyLayerTest { @Test public void testNoReadAccess() throws Exception { ModuleFinder finder = ModuleFinder.of(MODS_DIR); - Layer bootLayer = Layer.boot(); + ModuleLayer bootLayer = ModuleLayer.boot(); Configuration cf = bootLayer .configuration() - .resolveRequiresAndUses(ModuleFinder.of(), finder, Arrays.asList(modules)); + .resolveAndBind(ModuleFinder.of(), finder, Arrays.asList(modules)); ClassLoader scl = ClassLoader.getSystemClassLoader(); - Layer layer = bootLayer.defineModulesWithOneLoader(cf, scl); + ModuleLayer layer = bootLayer.defineModulesWithOneLoader(cf, scl); ClassLoader loader = layer.findLoader("m1"); diff --git a/jdk/test/java/lang/reflect/Proxy/ProxyModuleMapping.java b/jdk/test/java/lang/reflect/Proxy/ProxyModuleMapping.java index bd8d1b042b3..4985adf97ac 100644 --- a/jdk/test/java/lang/reflect/Proxy/ProxyModuleMapping.java +++ b/jdk/test/java/lang/reflect/Proxy/ProxyModuleMapping.java @@ -23,7 +23,6 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Module; import java.lang.reflect.Proxy; /* diff --git a/jdk/test/java/lang/reflect/Proxy/src/test/jdk/test/Main.java b/jdk/test/java/lang/reflect/Proxy/src/test/jdk/test/Main.java index 188e3d9e084..0a342d25c78 100644 --- a/jdk/test/java/lang/reflect/Proxy/src/test/jdk/test/Main.java +++ b/jdk/test/java/lang/reflect/Proxy/src/test/jdk/test/Main.java @@ -25,7 +25,6 @@ package jdk.test; import java.net.URL; import java.net.URLClassLoader; -import java.lang.reflect.Module; import static jdk.test.ProxyTest.*; public class Main { diff --git a/jdk/test/java/lang/reflect/Proxy/src/test/jdk/test/ProxyTest.java b/jdk/test/java/lang/reflect/Proxy/src/test/jdk/test/ProxyTest.java index bbe260bf159..ee5c0241bae 100644 --- a/jdk/test/java/lang/reflect/Proxy/src/test/jdk/test/ProxyTest.java +++ b/jdk/test/java/lang/reflect/Proxy/src/test/jdk/test/ProxyTest.java @@ -26,7 +26,6 @@ package jdk.test; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Module; import java.lang.reflect.Proxy; import java.util.Arrays; diff --git a/jdk/test/java/lang/reflect/PublicMethods/PublicMethodsTest.java b/jdk/test/java/lang/reflect/PublicMethods/PublicMethodsTest.java index 0859c8d7747..d603efe3f63 100644 --- a/jdk/test/java/lang/reflect/PublicMethods/PublicMethodsTest.java +++ b/jdk/test/java/lang/reflect/PublicMethods/PublicMethodsTest.java @@ -57,6 +57,8 @@ import static java.util.stream.Collectors.toMap; /* * @test * @bug 8062389 + * @modules jdk.compiler + * jdk.zipfs * @summary Nearly exhaustive test of Class.getMethod() and Class.getMethods() * @run main PublicMethodsTest */ diff --git a/jdk/test/java/net/Inet6Address/B6206527.java b/jdk/test/java/net/Inet6Address/B6206527.java index 74455cbe65b..4fc90e170c0 100644 --- a/jdk/test/java/net/Inet6Address/B6206527.java +++ b/jdk/test/java/net/Inet6Address/B6206527.java @@ -25,10 +25,14 @@ * @test 1.1 05/01/05 * @bug 6206527 * @summary "cannot assign address" when binding ServerSocket on Suse 9 + * @library /lib/testlibrary + * @build jdk.testlibrary.NetworkConfiguration + * @run main B6206527 */ import java.net.*; import java.util.*; +import jdk.testlibrary.NetworkConfiguration; public class B6206527 { @@ -53,21 +57,12 @@ public class B6206527 { ss.bind(new InetSocketAddress(addr, 0)); } - public static Inet6Address getLocalAddr () throws Exception { - Enumeration e = NetworkInterface.getNetworkInterfaces(); - while (e.hasMoreElements()) { - NetworkInterface ifc = (NetworkInterface) e.nextElement(); - Enumeration addrs = ifc.getInetAddresses(); - while (addrs.hasMoreElements()) { - InetAddress a = (InetAddress)addrs.nextElement(); - if (a instanceof Inet6Address) { - Inet6Address ia6 = (Inet6Address) a; - if (ia6.isLinkLocalAddress()) { - return ia6; - } - } - } - } - return null; + public static Inet6Address getLocalAddr() throws Exception { + Optional oaddr = NetworkConfiguration.probe() + .ip6Addresses() + .filter(a -> a.isLinkLocalAddress()) + .findFirst(); + + return oaddr.orElseGet(() -> null); } } diff --git a/jdk/test/java/net/Inet6Address/B6558853.java b/jdk/test/java/net/Inet6Address/B6558853.java index bece91872da..3c546c2f02c 100644 --- a/jdk/test/java/net/Inet6Address/B6558853.java +++ b/jdk/test/java/net/Inet6Address/B6558853.java @@ -21,43 +21,42 @@ * questions. */ -/** +/* * @test * @bug 6558853 * @summary getHostAddress() on connections using IPv6 link-local addrs should have zone id + * @library /lib/testlibrary + * @build jdk.testlibrary.NetworkConfiguration + * @run main B6558853 */ + import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.*; -import java.util.Enumeration; +import java.util.Optional; +import jdk.testlibrary.NetworkConfiguration; public class B6558853 implements Runnable { private InetAddress addr = null; private int port = 0; public static void main(String[] args) throws Exception { - ServerSocket ss = new ServerSocket(0); - int port = ss.getLocalPort(); - Enumeration l = NetworkInterface.getNetworkInterfaces(); - InetAddress dest = null; - while (l.hasMoreElements() && dest == null) { - NetworkInterface nif = l.nextElement(); - if (!nif.isUp()) - continue; + Optional oaddr = NetworkConfiguration.probe() + .ip6Addresses() + .filter(a -> a.isLinkLocalAddress()) + .findFirst(); - for (InterfaceAddress a : nif.getInterfaceAddresses()) { - if (a.getAddress() instanceof Inet6Address) { - Inet6Address a6 = (Inet6Address) a.getAddress(); - if (a6.isLinkLocalAddress()) { - dest = a6; - } - break; - } - } + if (!oaddr.isPresent()) { + System.out.println("No suitable interface found. Exiting."); + return; } + + Inet6Address dest = oaddr.get(); System.out.println("Using " + dest); - if (dest != null) { + + try (ServerSocket ss = new ServerSocket(0)) { + int port = ss.getLocalPort(); B6558853 test = new B6558853(dest, port); Thread thread = new Thread(test); thread.start(); diff --git a/jdk/test/java/net/InetAddress/CheckJNI.java b/jdk/test/java/net/InetAddress/CheckJNI.java index ad121d180ba..89f00a9c1a7 100644 --- a/jdk/test/java/net/InetAddress/CheckJNI.java +++ b/jdk/test/java/net/InetAddress/CheckJNI.java @@ -24,11 +24,15 @@ /* @test @bug 4889870 4890033 @summary java -Xcheck:jni failing in net code on Solaris / [Datagram]Socket.getLocalAddress() failure + @library /lib/testlibrary + @build jdk.testlibrary.NetworkConfiguration @run main/othervm -Xcheck:jni CheckJNI */ import java.net.*; import java.util.*; +import java.util.stream.Collectors; +import jdk.testlibrary.NetworkConfiguration; public class CheckJNI { static Socket s; @@ -49,32 +53,23 @@ public class CheckJNI { dg2 = new DatagramSocket (0, InetAddress.getByName ("127.0.0.1")); testDatagrams (dg1, dg2); - /* Use NetworkInterface to find link local IPv6 addrs to test */ + /* Find link local IPv6 addrs to test */ + List addrs = NetworkConfiguration.probe() + .ip6Addresses() + .filter(Inet6Address::isLinkLocalAddress) + .collect(Collectors.toList()); - Enumeration ifs = NetworkInterface.getNetworkInterfaces(); - server = new ServerSocket (0); + server = new ServerSocket(0); + for (Inet6Address ia6 : addrs) { + System.out.println("Address:" + ia6); + System.out.println("Testing IPv6 Socket"); + s = new Socket(ia6, server.getLocalPort()); + s.close(); - while (ifs.hasMoreElements()) { - NetworkInterface nif = (NetworkInterface)ifs.nextElement(); - if (!nif.isUp()) - continue; - Enumeration addrs = nif.getInetAddresses(); - while (addrs.hasMoreElements()) { - InetAddress addr = (InetAddress) addrs.nextElement(); - if (addr instanceof Inet6Address) { - Inet6Address ia6 = (Inet6Address) addr; - if (ia6.isLinkLocalAddress()) { - System.out.println ("Testing IPv6 Socket"); - s = new Socket (ia6, server.getLocalPort()); - s.close(); - - System.out.println ("Testing IPv6 DatagramSocket"); - dg1 = new DatagramSocket (0, ia6); - dg2 = new DatagramSocket (0, ia6); - testDatagrams (dg1, dg2); - } - } - } + System.out.println("Testing IPv6 DatagramSocket"); + dg1 = new DatagramSocket(0, ia6); + dg2 = new DatagramSocket(0, ia6); + testDatagrams(dg1, dg2); } server.close(); System.out.println ("OK"); diff --git a/jdk/test/java/net/MulticastSocket/B6427403.java b/jdk/test/java/net/MulticastSocket/B6427403.java index b910ae6857e..d6e87899ce9 100644 --- a/jdk/test/java/net/MulticastSocket/B6427403.java +++ b/jdk/test/java/net/MulticastSocket/B6427403.java @@ -23,15 +23,12 @@ /* * @test - * * @bug 6427403 - * * @summary java.net.MulticastSocket.joinGroup() reports 'socket closed' - * */ import java.net.*; import java.io.*; -import java.util.*; + public class B6427403 { public static void main( String[] args ) throws IOException { InetAddress lh = InetAddress.getLocalHost(); @@ -39,4 +36,4 @@ public class B6427403 { ms.joinGroup( InetAddress.getByName("224.80.80.80") ); ms.close(); } -} +} \ No newline at end of file diff --git a/jdk/test/java/net/MulticastSocket/JoinLeave.java b/jdk/test/java/net/MulticastSocket/JoinLeave.java new file mode 100644 index 00000000000..93dd93930b6 --- /dev/null +++ b/jdk/test/java/net/MulticastSocket/JoinLeave.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4091811 4148753 4102731 + * @summary Test java.net.MulticastSocket joinGroup and leaveGroup + * @library /lib/testlibrary + * @build jdk.testlibrary.NetworkConfiguration + * @run main JoinLeave + */ + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.net.InetAddress; +import java.net.MulticastSocket; +import java.net.NetworkInterface; +import jdk.testlibrary.NetworkConfiguration; + +public class JoinLeave { + + public static void main(String args[]) throws IOException { + InetAddress ip4Group = InetAddress.getByName("224.80.80.80"); + InetAddress ip6Group = InetAddress.getByName("ff02::a"); + + NetworkConfiguration nc = NetworkConfiguration.probe(); + nc.ip4MulticastInterfaces().forEach(nic -> joinLeave(ip4Group, nic)); + nc.ip6MulticastInterfaces().forEach(nic -> joinLeave(ip6Group, nic)); + } + + static void joinLeave(InetAddress group, NetworkInterface nif) + { + System.out.println("Joining:" + group + " on " + nif); + try (MulticastSocket soc = new MulticastSocket()) { + soc.setNetworkInterface(nif); + soc.joinGroup(group); + soc.leaveGroup(group); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } +} diff --git a/jdk/test/java/net/MulticastSocket/NetworkInterfaceEmptyGetInetAddressesTest.java b/jdk/test/java/net/MulticastSocket/NetworkInterfaceEmptyGetInetAddressesTest.java new file mode 100644 index 00000000000..5eb3bdf51ab --- /dev/null +++ b/jdk/test/java/net/MulticastSocket/NetworkInterfaceEmptyGetInetAddressesTest.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8175325 + * @summary test NetworkInterface getInterfaceAddresses method on the NetworkInterface returned + * from the getNetworkInterface invocation on a MulticastSocket bound to a wildcard address. + * + */ + +import java.net.MulticastSocket; +import java.net.NetworkInterface; +import java.net.SocketException; + +public class NetworkInterfaceEmptyGetInetAddressesTest { + + static int exceptionCount = 0; + + public static void testMethods(NetworkInterface netIf) throws Exception { + testNetworkInterface_getInterfaceAddresses(netIf); + + if (exceptionCount > 0) { + throw new RuntimeException("Unexpected Exceptions in test"); + } + } + + private static void testNetworkInterface_getInterfaceAddresses( + NetworkInterface netIf) { + try { + netIf.getInterfaceAddresses(); + } catch (Exception ex) { + ex.printStackTrace(); + incrementExceptionCount(); + } + } + + private static void incrementExceptionCount() { + exceptionCount++; + } + + public static void main(String[] args) throws Exception { + MulticastSocket mcastSock = null; + try { + mcastSock = new MulticastSocket(); + System.out.println("macst socket address == " + + mcastSock.getLocalAddress()); + NetworkInterface netIf = mcastSock.getNetworkInterface(); + testMethods(netIf); + } finally { + if (mcastSock != null) { + mcastSock.close(); + } + } + } +} diff --git a/jdk/test/java/net/MulticastSocket/SetOutgoingIf.java b/jdk/test/java/net/MulticastSocket/SetOutgoingIf.java index 1acfa16ef38..53cb28e5f2f 100644 --- a/jdk/test/java/net/MulticastSocket/SetOutgoingIf.java +++ b/jdk/test/java/net/MulticastSocket/SetOutgoingIf.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, 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 @@ -40,6 +40,10 @@ public class SetOutgoingIf { return osname.contains("Windows"); } + static boolean isMacOS() { + return System.getProperty("os.name").contains("OS X"); + } + private static boolean hasIPv6() throws Exception { List nics = Collections.list( NetworkInterface.getNetworkInterfaces()); @@ -71,7 +75,7 @@ public class SetOutgoingIf { int index = 1; for (NetworkInterface nic : Collections.list(NetworkInterface.getNetworkInterfaces())) { // we should use only network interfaces with multicast support which are in "up" state - if (!nic.isLoopback() && nic.supportsMulticast() && nic.isUp()) { + if (!nic.isLoopback() && nic.supportsMulticast() && nic.isUp() && !isTestExcludedInterface(nic)) { NetIf netIf = NetIf.create(nic); // now determine what (if any) type of addresses are assigned to this interface @@ -91,6 +95,8 @@ public class SetOutgoingIf { netIfs.add(netIf); debug("Using: " + nic); } + } else { + System.out.println("Ignore NetworkInterface nic == " + nic); } } if (netIfs.size() <= 1) { @@ -170,6 +176,15 @@ public class SetOutgoingIf { } } + private static boolean isTestExcludedInterface(NetworkInterface nif) { + if (isMacOS() && nif.getName().contains("awdl")) + return true; + String dName = nif.getDisplayName(); + if (isWindows() && dName != null && dName.contains("Teredo")) + return true; + return false; + } + private static boolean debug = true; static void debug(String message) { diff --git a/jdk/test/java/net/NetworkConfigurationProbe.java b/jdk/test/java/net/NetworkConfigurationProbe.java new file mode 100644 index 00000000000..8b8127a55e2 --- /dev/null +++ b/jdk/test/java/net/NetworkConfigurationProbe.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary NOT A TEST. Captures the network interface configuration. + * @library /lib/testlibrary + * @build jdk.testlibrary.NetworkConfiguration + * @run main NetworkConfigurationProbe + */ + +import java.net.Inet4Address; +import java.net.Inet6Address; +import java.net.NetworkInterface; +import jdk.testlibrary.NetworkConfiguration; +import static java.util.stream.Collectors.joining; +import static java.lang.System.out; + +/** + * Not a test. Captures the network interface configuration. + */ +public class NetworkConfigurationProbe { + + public static void main(String... args) throws Exception { + NetworkConfiguration.printSystemConfiguration(out); + + NetworkConfiguration nc = NetworkConfiguration.probe(); + String list; + list = nc.ip4MulticastInterfaces() + .map(NetworkInterface::getName) + .collect(joining(" ")); + out.println("ip4MulticastInterfaces: " + list); + + list = nc.ip4Addresses() + .map(Inet4Address::toString) + .collect(joining(" ")); + out.println("ip4Addresses: " + list); + + list = nc.ip6MulticastInterfaces() + .map(NetworkInterface::getName) + .collect(joining(" ")); + out.println("ip6MulticastInterfaces: " + list); + + list = nc.ip6Addresses() + .map(Inet6Address::toString) + .collect(joining(" ")); + out.println("ip6Addresses: " + list); + } +} diff --git a/jdk/test/java/net/ProxySelector/B8035158.java b/jdk/test/java/net/ProxySelector/B8035158.java index 432e457c303..5ebca0e860d 100644 --- a/jdk/test/java/net/ProxySelector/B8035158.java +++ b/jdk/test/java/net/ProxySelector/B8035158.java @@ -158,8 +158,6 @@ public class B8035158 { t.add(new TestCase("google.com|bing.com|yahoo.com", "http://127.0.0.1", false)); t.add(new TestCase("google.com|bing.com|yahoo.com", "http://yahoo.com", false)); - // example from - // http://docs.oracle.com/javase/7/docs/technotes/guides/net/proxies.html t.add(new TestCase("localhost|host.example.com", "http://localhost", false)); t.add(new TestCase("localhost|host.example.com", diff --git a/jdk/test/java/net/Socket/LinkLocal.java b/jdk/test/java/net/Socket/LinkLocal.java index 35cd96ac6a7..e62522cb581 100644 --- a/jdk/test/java/net/Socket/LinkLocal.java +++ b/jdk/test/java/net/Socket/LinkLocal.java @@ -26,9 +26,15 @@ * @bug 4469866 * @summary Connecting to a link-local IPv6 address should not * causes a SocketException to be thrown. + * @library /lib/testlibrary + * @build jdk.testlibrary.NetworkConfiguration + * @run main LinkLocal */ +import jdk.testlibrary.NetworkConfiguration; + import java.net.*; -import java.util.Enumeration; +import java.util.List; +import java.util.stream.Collectors; public class LinkLocal { @@ -134,22 +140,13 @@ public class LinkLocal { * IPv6 address. */ if (args.length == 0) { - Enumeration nifs = NetworkInterface.getNetworkInterfaces(); - while (nifs.hasMoreElements()) { - NetworkInterface ni = (NetworkInterface)nifs.nextElement(); - if (!ni.isUp()) - continue; + List addrs = NetworkConfiguration.probe() + .ip6Addresses() + .filter(Inet6Address::isLinkLocalAddress) + .collect(Collectors.toList()); - Enumeration addrs = ni.getInetAddresses(); - while (addrs.hasMoreElements()) { - InetAddress addr = (InetAddress)addrs.nextElement(); - - if (addr instanceof Inet6Address && - addr.isLinkLocalAddress()) { - - TestAddress(addr); - } - } + for (Inet6Address addr : addrs) { + TestAddress(addr); } } diff --git a/jdk/test/java/net/SocketPermission/SocketPermissionTest.java b/jdk/test/java/net/SocketPermission/SocketPermissionTest.java index b77b425c93a..e67802afc33 100644 --- a/jdk/test/java/net/SocketPermission/SocketPermissionTest.java +++ b/jdk/test/java/net/SocketPermission/SocketPermissionTest.java @@ -25,13 +25,17 @@ * @test * @bug 8047031 * @summary SocketPermission tests for legacy socket types + * @library /lib/testlibrary + * @build jdk.testlibrary.NetworkConfiguration * @run testng/othervm SocketPermissionTest */ + import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.MulticastSocket; +import java.net.NetworkInterface; import java.net.ServerSocket; import java.net.Socket; import java.net.SocketPermission; @@ -44,11 +48,14 @@ import java.security.Permissions; import java.security.Policy; import java.security.PrivilegedExceptionAction; import java.security.ProtectionDomain; +import java.util.Optional; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; + import static org.testng.Assert.*; +import static jdk.testlibrary.NetworkConfiguration.probe; import static java.nio.charset.StandardCharsets.UTF_8; public class SocketPermissionTest { @@ -210,12 +217,17 @@ public class SocketPermissionTest { new SocketPermission(addr, "listen,resolve"), new SocketPermission("229.227.226.221", "connect,accept")); - // Positive - AccessController.doPrivileged((PrivilegedExceptionAction) () -> { - s.joinGroup(group); - s.leaveGroup(group); - return null; - }, acc); + // Positive ( requires a functional network interface ) + Optional onif = probe().ip4MulticastInterfaces().findFirst(); + if (!onif.isPresent()) { + s.setNetworkInterface(onif.get()); + + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + s.joinGroup(group); + s.leaveGroup(group); + return null; + }, acc); + } // Negative try { diff --git a/jdk/test/java/net/URL/JarHandlerPkgPrefix/JarHandlerPkgPrefix.java b/jdk/test/java/net/URL/JarHandlerPkgPrefix/JarHandlerPkgPrefix.java new file mode 100644 index 00000000000..0ad66fa2303 --- /dev/null +++ b/jdk/test/java/net/URL/JarHandlerPkgPrefix/JarHandlerPkgPrefix.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import handlers.jar.Handler; + +import java.net.URL; +import java.net.URLClassLoader; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +/* + * @test + * @bug 8174151 + * @summary Test for java.protocol.handler.pkgs with jar protocol handler + * @library /lib/testlibrary/java/util/jar + * @compile handlers/jar/Handler.java + * @run main/othervm -Djava.protocol.handler.pkgs=handlers JarHandlerPkgPrefix + */ +public class JarHandlerPkgPrefix { + + static void createJar(Path p) throws Exception { + JarBuilder jb = new JarBuilder(p.toString()); + jb.addEntry("resource.txt", "CONTENTS".getBytes()); + jb.build(); + } + + public static void main(String[] args) throws Exception { + Path jarPath = Paths.get(System.getProperty("user.dir", "."), "test.jar"); + try { + createJar(jarPath); + + URL j = new URL("jar:file:" + jarPath.toString() + "!/"); + URLClassLoader ucl = new URLClassLoader(new URL[]{j}); + ucl.findResource("resource.txt"); + + URL r = new URL("jar:file:" + jarPath.toString() + "!/resource.txt"); + if (!Handler.URLS.contains(r)) + throw new AssertionError("jar: URL handler not invoked"); + } + finally { + Files.delete(jarPath); + } + } +} \ No newline at end of file diff --git a/jdk/test/java/net/URL/JarHandlerPkgPrefix/handlers/jar/Handler.java b/jdk/test/java/net/URL/JarHandlerPkgPrefix/handlers/jar/Handler.java new file mode 100644 index 00000000000..b0309a99aab --- /dev/null +++ b/jdk/test/java/net/URL/JarHandlerPkgPrefix/handlers/jar/Handler.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package handlers.jar; + +import java.io.IOException; +import java.net.URL; +import java.net.URLConnection; +import java.net.URLStreamHandler; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +public class Handler extends URLStreamHandler { + public static Set URLS = Collections.synchronizedSet(new HashSet<>()); + + @Override + protected URLConnection openConnection(URL u) throws IOException { + URLS.add(u); + return null; + } +} diff --git a/jdk/test/java/net/URLConnection/SetDefaultUseCaches.java b/jdk/test/java/net/URLConnection/SetDefaultUseCaches.java index 2c12889d23d..73c822ac2c9 100644 --- a/jdk/test/java/net/URLConnection/SetDefaultUseCaches.java +++ b/jdk/test/java/net/URLConnection/SetDefaultUseCaches.java @@ -22,46 +22,95 @@ */ /* @test - * @bug 8163449 + * @bug 8163449 8175261 * @summary Allow per protocol setting for URLConnection defaultUseCaches - * @run main/othervm SetDefaultUseCaches + * @run testng/othervm SetDefaultUseCaches */ -import java.net.*; -import java.io.*; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.net.URL; +import java.net.URLConnection; +import org.testng.annotations.Test; +import static org.testng.Assert.*; public class SetDefaultUseCaches { - static void testAssert(boolean value, boolean comparator) { - if (value != comparator) { - System.err.println("Expected " + comparator + " Got " + value); - throw new RuntimeException("Test failed:"); - } else - System.err.println("OK"); + + final URL fileURL = uncheckURL("file:///a/b.txt"); + final URL httpURL = uncheckURL("http://www.foo.com/"); + final URL jarFileURL = uncheckURL("jar:file:///a/b.jar!/anEntry"); + final URL jarHttpURL = uncheckURL("jar:http://www.foo.com/a/b.jar!/anEntry"); + + @Test + public void test() throws Exception { + // check JAR both before and after other protocol tests as JAR URLs + // effectively wrap/embed other URLs. The syntax is jar:!/{entry} + checkJAR(true); + checkJAR(false); + checkJAR(true); + + checkHTTP(); + checkFile(); + + // ensure that JAR URLs still respect their per-protocol value + checkJAR(false); + checkJAR(true); + checkJAR(false); } - public static void main(String s[]) throws Exception { - URL url = new URL("http://www.foo.com/"); - URL url1 = new URL("file:///a/b.txt"); - + void checkHTTP() throws IOException { // check default default is true - URLConnection urlc = url.openConnection(); - testAssert(urlc.getDefaultUseCaches(), true); + URLConnection httpURLConn = httpURL.openConnection(); + assertTrue(httpURLConn.getDefaultUseCaches()); // set default for http to false and check URLConnection.setDefaultUseCaches("HTTP", false); - urlc = url.openConnection(); - testAssert(urlc.getDefaultUseCaches(), true); - testAssert(urlc.getUseCaches(), false); - testAssert(URLConnection.getDefaultUseCaches("http"), false); + httpURLConn = httpURL.openConnection(); + assertTrue(httpURLConn.getDefaultUseCaches()); + assertFalse(httpURLConn.getUseCaches()); + assertFalse(URLConnection.getDefaultUseCaches("http")); + } - URLConnection urlc1 = url1.openConnection(); - testAssert(urlc1.getDefaultUseCaches(), true); + void checkFile() throws IOException { + URLConnection fileURLConn = fileURL.openConnection(); + assertTrue(fileURLConn.getDefaultUseCaches()); // set default default to false and check other values the same - urlc.setDefaultUseCaches(false); - urlc1.setDefaultUseCaches("fiLe", true); - testAssert(urlc1.getDefaultUseCaches(), false); - testAssert(URLConnection.getDefaultUseCaches("fiLE"), true); + fileURLConn.setDefaultUseCaches(false); + fileURLConn.setDefaultUseCaches("fiLe", true); + assertFalse(fileURLConn.getDefaultUseCaches()); + assertTrue(URLConnection.getDefaultUseCaches("fiLE")); + } + + void checkJAR(boolean defaultValue) throws IOException { + URLConnection.setDefaultUseCaches("JAR", defaultValue); + assertEquals(URLConnection.getDefaultUseCaches("JAr"), defaultValue); + + URLConnection jarFileURLConn = jarFileURL.openConnection(); + URLConnection jarHttpURLConn = jarHttpURL.openConnection(); + assertEquals(jarFileURLConn.getUseCaches(), defaultValue); + assertEquals(jarHttpURLConn.getUseCaches(), defaultValue); + jarFileURLConn.setUseCaches(!defaultValue); + jarHttpURLConn.setUseCaches(!defaultValue); + assertEquals(jarFileURLConn.getUseCaches(), !defaultValue); + assertEquals(jarHttpURLConn.getUseCaches(), !defaultValue); + + URLConnection.setDefaultUseCaches("JaR", !defaultValue); // case-insensitive + assertEquals(URLConnection.getDefaultUseCaches("jAR"), !defaultValue); + + jarFileURLConn = jarFileURL.openConnection(); + jarHttpURLConn = jarHttpURL.openConnection(); + assertEquals(jarFileURLConn.getUseCaches(), !defaultValue); + assertEquals(jarHttpURLConn.getUseCaches(), !defaultValue); + jarFileURLConn.setUseCaches(defaultValue); + jarHttpURLConn.setUseCaches(defaultValue); + assertEquals(jarFileURLConn.getUseCaches(), defaultValue); + assertEquals(jarHttpURLConn.getUseCaches(), defaultValue); + } + + static URL uncheckURL(String url) { + try { return new URL(url); } + catch (IOException e) { throw new UncheckedIOException(e); } } } diff --git a/jdk/test/java/net/httpclient/HandshakePhase.java b/jdk/test/java/net/httpclient/HandshakePhase.java deleted file mode 100644 index 2585ce78f70..00000000000 --- a/jdk/test/java/net/httpclient/HandshakePhase.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * 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. - */ - -import java.io.IOException; -import java.io.UncheckedIOException; -import java.net.InetSocketAddress; -import java.net.URI; -import java.nio.ByteBuffer; -import java.nio.CharBuffer; -import java.nio.channels.ServerSocketChannel; -import java.nio.channels.SocketChannel; -import java.nio.charset.CharacterCodingException; -import java.nio.charset.StandardCharsets; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.Arrays; -import java.util.Base64; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -import static java.lang.String.format; -import static java.util.Objects.requireNonNull; - -// -// Performs a simple opening handshake and yields the channel. -// -// Client Request: -// -// GET /chat HTTP/1.1 -// Host: server.example.com -// Upgrade: websocket -// Connection: Upgrade -// Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== -// Origin: http://example.com -// Sec-WebSocket-Protocol: chat, superchat -// Sec-WebSocket-Version: 13 -// -// -// Server Response: -// -// HTTP/1.1 101 Switching Protocols -// Upgrade: websocket -// Connection: Upgrade -// Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= -// Sec-WebSocket-Protocol: chat -// -final class HandshakePhase { - - private final ServerSocketChannel ssc; - - HandshakePhase(InetSocketAddress address) { - requireNonNull(address); - try { - ssc = ServerSocketChannel.open(); - ssc.bind(address); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } - - // - // Returned CF completes normally after the handshake has been performed - // - CompletableFuture afterHandshake( - Function, List> mapping) { - return CompletableFuture.supplyAsync( - () -> { - SocketChannel socketChannel = accept(); - try { - StringBuilder request = new StringBuilder(); - if (!readRequest(socketChannel, request)) { - throw new IllegalStateException(); - } - List strings = Arrays.asList( - request.toString().split("\r\n") - ); - List response = mapping.apply(strings); - writeResponse(socketChannel, response); - return socketChannel; - } catch (Throwable t) { - try { - socketChannel.close(); - } catch (IOException ignored) { } - throw t; - } - }); - } - - CompletableFuture afterHandshake() { - return afterHandshake((request) -> { - List response = new LinkedList<>(); - Iterator iterator = request.iterator(); - if (!iterator.hasNext()) { - throw new IllegalStateException("The request is empty"); - } - if (!"GET / HTTP/1.1".equals(iterator.next())) { - throw new IllegalStateException - ("Unexpected status line: " + request.get(0)); - } - response.add("HTTP/1.1 101 Switching Protocols"); - Map requestHeaders = new HashMap<>(); - while (iterator.hasNext()) { - String header = iterator.next(); - String[] split = header.split(": "); - if (split.length != 2) { - throw new IllegalStateException - ("Unexpected header: " + header - + ", split=" + Arrays.toString(split)); - } - if (requestHeaders.put(split[0], split[1]) != null) { - throw new IllegalStateException - ("Duplicating headers: " + Arrays.toString(split)); - } - } - if (requestHeaders.containsKey("Sec-WebSocket-Protocol")) { - throw new IllegalStateException("Subprotocols are not expected"); - } - if (requestHeaders.containsKey("Sec-WebSocket-Extensions")) { - throw new IllegalStateException("Extensions are not expected"); - } - expectHeader(requestHeaders, "Connection", "Upgrade"); - response.add("Connection: Upgrade"); - expectHeader(requestHeaders, "Upgrade", "websocket"); - response.add("Upgrade: websocket"); - expectHeader(requestHeaders, "Sec-WebSocket-Version", "13"); - String key = requestHeaders.get("Sec-WebSocket-Key"); - if (key == null) { - throw new IllegalStateException("Sec-WebSocket-Key is missing"); - } - MessageDigest sha1 = null; - try { - sha1 = MessageDigest.getInstance("SHA-1"); - } catch (NoSuchAlgorithmException e) { - throw new InternalError(e); - } - String x = key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; - sha1.update(x.getBytes(StandardCharsets.ISO_8859_1)); - String v = Base64.getEncoder().encodeToString(sha1.digest()); - response.add("Sec-WebSocket-Accept: " + v); - return response; - }); - } - - private String expectHeader(Map headers, - String name, - String value) { - String v = headers.get(name); - if (!value.equals(v)) { - throw new IllegalStateException( - format("Expected '%s: %s', actual: '%s: %s'", - name, value, name, v) - ); - } - return v; - } - - URI getURI() { - InetSocketAddress a; - try { - a = (InetSocketAddress) ssc.getLocalAddress(); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - return URI.create("ws://" + a.getHostName() + ":" + a.getPort()); - } - - private int read(SocketChannel socketChannel, ByteBuffer buffer) { - try { - int num = socketChannel.read(buffer); - if (num == -1) { - throw new IllegalStateException("Unexpected EOF"); - } - assert socketChannel.isBlocking() && num > 0; - return num; - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } - - private SocketChannel accept() { - SocketChannel socketChannel = null; - try { - socketChannel = ssc.accept(); - socketChannel.configureBlocking(true); - } catch (IOException e) { - if (socketChannel != null) { - try { - socketChannel.close(); - } catch (IOException ignored) { } - } - throw new UncheckedIOException(e); - } - return socketChannel; - } - - private boolean readRequest(SocketChannel socketChannel, - StringBuilder request) { - ByteBuffer buffer = ByteBuffer.allocateDirect(512); - read(socketChannel, buffer); - CharBuffer decoded; - buffer.flip(); - try { - decoded = - StandardCharsets.ISO_8859_1.newDecoder().decode(buffer); - } catch (CharacterCodingException e) { - throw new UncheckedIOException(e); - } - request.append(decoded); - return Pattern.compile("\r\n\r\n").matcher(request).find(); - } - - private void writeResponse(SocketChannel socketChannel, - List response) { - String s = response.stream().collect(Collectors.joining("\r\n")) - + "\r\n\r\n"; - ByteBuffer encoded; - try { - encoded = - StandardCharsets.ISO_8859_1.newEncoder().encode(CharBuffer.wrap(s)); - } catch (CharacterCodingException e) { - throw new UncheckedIOException(e); - } - write(socketChannel, encoded); - } - - private void write(SocketChannel socketChannel, ByteBuffer buffer) { - try { - while (buffer.hasRemaining()) { - socketChannel.write(buffer); - } - } catch (IOException e) { - try { - socketChannel.close(); - } catch (IOException ignored) { } - throw new UncheckedIOException(e); - } - } -} diff --git a/jdk/test/java/net/httpclient/HttpEchoHandler.java b/jdk/test/java/net/httpclient/HttpEchoHandler.java new file mode 100644 index 00000000000..914d89161ac --- /dev/null +++ b/jdk/test/java/net/httpclient/HttpEchoHandler.java @@ -0,0 +1,87 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import com.sun.net.httpserver.*; +import java.net.*; +import jdk.incubator.http.*; +import java.io.*; +import java.util.concurrent.*; +import javax.net.ssl.*; +import java.nio.file.*; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Random; +import jdk.testlibrary.SimpleSSLContext; +import static jdk.incubator.http.HttpRequest.*; +import static jdk.incubator.http.HttpResponse.*; +import java.util.logging.ConsoleHandler; +import java.util.logging.Level; +import java.util.logging.Logger; + +public class HttpEchoHandler implements HttpHandler { + public HttpEchoHandler() {} + + @Override + public void handle(HttpExchange t) + throws IOException { + try { + System.err.println("EchoHandler received request to " + t.getRequestURI()); + InputStream is = t.getRequestBody(); + Headers map = t.getRequestHeaders(); + Headers map1 = t.getResponseHeaders(); + map1.add("X-Hello", "world"); + map1.add("X-Bye", "universe"); + String fixedrequest = map.getFirst("XFixed"); + File outfile = File.createTempFile("foo", "bar"); + FileOutputStream fos = new FileOutputStream(outfile); + int count = (int) is.transferTo(fos); + is.close(); + fos.close(); + InputStream is1 = new FileInputStream(outfile); + OutputStream os = null; + // return the number of bytes received (no echo) + String summary = map.getFirst("XSummary"); + if (fixedrequest != null && summary == null) { + t.sendResponseHeaders(200, count); + os = t.getResponseBody(); + is1.transferTo(os); + } else { + t.sendResponseHeaders(200, 0); + os = t.getResponseBody(); + is1.transferTo(os); + + if (summary != null) { + String s = Integer.toString(count); + os.write(s.getBytes()); + } + } + outfile.delete(); + os.close(); + is1.close(); + } catch (Throwable e) { + e.printStackTrace(); + throw new IOException(e); + } + } +} diff --git a/jdk/test/java/net/httpclient/LightWeightHttpServer.java b/jdk/test/java/net/httpclient/LightWeightHttpServer.java index a0d6e9ac9c7..d80a382d669 100644 --- a/jdk/test/java/net/httpclient/LightWeightHttpServer.java +++ b/jdk/test/java/net/httpclient/LightWeightHttpServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -23,8 +23,9 @@ /** * library /lib/testlibrary/ / - * build jdk.testlibrary.SimpleSSLContext ProxyServer EchoHandler + * build jdk.testlibrary.SimpleSSLContext ProxyServer * compile ../../../com/sun/net/httpserver/LogFilter.java + * compile ../../../com/sun/net/httpserver/EchoHandler.java * compile ../../../com/sun/net/httpserver/FileServerHandler.java */ import com.sun.net.httpserver.Headers; diff --git a/jdk/test/java/net/httpclient/ManyRequests.java b/jdk/test/java/net/httpclient/ManyRequests.java index 47f21c60d0f..8803b397528 100644 --- a/jdk/test/java/net/httpclient/ManyRequests.java +++ b/jdk/test/java/net/httpclient/ManyRequests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -23,22 +23,30 @@ /* * @test - * @bug 8087112 + * @bug 8087112 8180044 * @modules jdk.incubator.httpclient * java.logging * jdk.httpserver * @library /lib/testlibrary/ / - * @build jdk.testlibrary.SimpleSSLContext EchoHandler + * @build jdk.testlibrary.SimpleSSLContext * @compile ../../../com/sun/net/httpserver/LogFilter.java + * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java * @run main/othervm/timeout=40 -Djdk.httpclient.HttpClient.log=ssl ManyRequests + * @run main/othervm/timeout=40 -Dtest.insertDelay=true ManyRequests + * @run main/othervm/timeout=40 -Dtest.chunkSize=64 ManyRequests + * @run main/othervm/timeout=40 -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequests * @summary Send a large number of requests asynchronously */ + // * @run main/othervm/timeout=40 -Djdk.httpclient.HttpClient.log=ssl ManyRequests import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsParameters; import com.sun.net.httpserver.HttpsServer; +import com.sun.net.httpserver.HttpExchange; import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import jdk.incubator.http.HttpClient; import jdk.incubator.http.HttpRequest; import java.net.InetSocketAddress; @@ -65,7 +73,10 @@ public class ManyRequests { Logger logger = Logger.getLogger("com.sun.net.httpserver"); logger.setLevel(Level.ALL); logger.info("TEST"); - + System.out.println("Sending " + REQUESTS + + " requests; delay=" + INSERT_DELAY + + ", chunks=" + CHUNK_SIZE + + ", XFixed=" + XFIXED); SSLContext ctx = new SimpleSSLContext().get(); InetSocketAddress addr = new InetSocketAddress(0); @@ -86,11 +97,36 @@ public class ManyRequests { //static final int REQUESTS = 1000; static final int REQUESTS = 20; + static final boolean INSERT_DELAY = Boolean.getBoolean("test.insertDelay"); + static final int CHUNK_SIZE = Math.max(0, + Integer.parseInt(System.getProperty("test.chunkSize", "0"))); + static final boolean XFIXED = Boolean.getBoolean("test.XFixed"); + + static class TestEchoHandler extends EchoHandler { + final Random rand = new Random(); + @Override + public void handle(HttpExchange e) throws IOException { + System.out.println("Server: received " + e.getRequestURI()); + super.handle(e); + } + protected void close(OutputStream os) throws IOException { + if (INSERT_DELAY) { + try { Thread.sleep(rand.nextInt(200)); } catch (InterruptedException e) {} + } + super.close(os); + } + protected void close(InputStream is) throws IOException { + if (INSERT_DELAY) { + try { Thread.sleep(rand.nextInt(200)); } catch (InterruptedException e) {} + } + super.close(is); + } + } static void test(HttpsServer server, HttpClient client) throws Exception { int port = server.getAddress().getPort(); - URI uri = new URI("https://127.0.0.1:" + port + "/foo/x"); - server.createContext("/foo", new EchoHandler()); + URI baseURI = new URI("https://127.0.0.1:" + port + "/foo/x"); + server.createContext("/foo", new TestEchoHandler()); server.start(); RequestLimiter limiter = new RequestLimiter(40); @@ -99,24 +135,32 @@ public class ManyRequests { HashMap bodies = new HashMap<>(); for (int i=0; i client.sendAsync(r, asByteArray())) + .thenCompose((v) -> { + System.out.println("Client: sendAsync: " + r.uri()); + return client.sendAsync(r, asByteArray()); + }) .thenCompose((resp) -> { limiter.requestComplete(); if (resp.statusCode() != 200) { String s = "Expected 200, got: " + resp.statusCode(); + System.out.println(s + " from " + + resp.request().uri().getPath()); return completedWithIOException(s); } else { counter++; - System.out.println("Result from " + counter); + System.out.println("Result (" + counter + ") from " + + resp.request().uri().getPath()); } return CompletableFuture.completedStage(resp.body()) .thenApply((b) -> new Pair<>(resp, b)); diff --git a/jdk/test/java/net/httpclient/ManyRequests2.java b/jdk/test/java/net/httpclient/ManyRequests2.java new file mode 100644 index 00000000000..26c281fca61 --- /dev/null +++ b/jdk/test/java/net/httpclient/ManyRequests2.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8087112 8180044 + * @modules jdk.incubator.httpclient + * java.logging + * jdk.httpserver + * @library /lib/testlibrary/ / + * @build jdk.testlibrary.SimpleSSLContext + * @compile ../../../com/sun/net/httpserver/LogFilter.java + * @compile ../../../com/sun/net/httpserver/EchoHandler.java + * @compile ../../../com/sun/net/httpserver/FileServerHandler.java + * @build ManyRequests ManyRequests2 + * @run main/othervm/timeout=40 -Dtest.XFixed=true ManyRequests2 + * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.insertDelay=true ManyRequests2 + * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.chunkSize=64 ManyRequests2 + * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequests2 + * @summary Send a large number of requests asynchronously. The server echoes back using known content length. + */ + // * @run main/othervm/timeout=40 -Djdk.httpclient.HttpClient.log=ssl ManyRequests + +public class ManyRequests2 { + + public static void main(String[] args) throws Exception { + ManyRequests.main(args); + } +} diff --git a/jdk/test/java/net/httpclient/ProxyAuthTest.java b/jdk/test/java/net/httpclient/ProxyAuthTest.java index 54f480e9cee..43ba69032e0 100644 --- a/jdk/test/java/net/httpclient/ProxyAuthTest.java +++ b/jdk/test/java/net/httpclient/ProxyAuthTest.java @@ -20,6 +20,7 @@ * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any + * questions. */ /* diff --git a/jdk/test/java/net/httpclient/RequestBodyTest.java b/jdk/test/java/net/httpclient/RequestBodyTest.java index 9ebab7f4a07..446eb0324f5 100644 --- a/jdk/test/java/net/httpclient/RequestBodyTest.java +++ b/jdk/test/java/net/httpclient/RequestBodyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -28,6 +28,7 @@ * jdk.httpserver * @library /lib/testlibrary/ * @compile ../../../com/sun/net/httpserver/LogFilter.java + * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java * @build LightWeightHttpServer * @build jdk.testlibrary.SimpleSSLContext @@ -104,6 +105,7 @@ public class RequestBodyTest { SSLContext ctx = LightWeightHttpServer.ctx; client = HttpClient.newBuilder() .sslContext(ctx) + .version(HttpClient.Version.HTTP_1_1) .followRedirects(HttpClient.Redirect.ALWAYS) .executor(exec) .build(); diff --git a/jdk/test/java/net/httpclient/SmallTimeout.java b/jdk/test/java/net/httpclient/SmallTimeout.java new file mode 100644 index 00000000000..c06994c417b --- /dev/null +++ b/jdk/test/java/net/httpclient/SmallTimeout.java @@ -0,0 +1,165 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.IOException; +import java.net.ServerSocket; +import java.net.URI; +import jdk.incubator.http.HttpClient; +import jdk.incubator.http.HttpRequest; +import jdk.incubator.http.HttpResponse; +import jdk.incubator.http.HttpTimeoutException; +import java.time.Duration; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.LinkedBlockingQueue; +import static java.lang.System.out; +import static jdk.incubator.http.HttpResponse.BodyHandler.discard; + +/** + * @test + * @bug 8178147 + * @summary Ensures that small timeouts do not cause hangs due to race conditions + * @run main/othervm SmallTimeout + */ + +// To enable logging use. Not enabled by default as it changes the dynamics +// of the test. +// @run main/othervm -Djdk.httpclient.HttpClient.log=all,frames:all SmallTimeout + +public class SmallTimeout { + + static int[] TIMEOUTS = {2, 1, 3, 2, 100, 1}; + + // A queue for placing timed out requests so that their order can be checked. + static LinkedBlockingQueue queue = new LinkedBlockingQueue<>(); + + static volatile boolean error; + + public static void main(String[] args) throws Exception { + HttpClient client = HttpClient.newHttpClient(); + + try (ServerSocket ss = new ServerSocket(0, 20)) { + int port = ss.getLocalPort(); + URI uri = new URI("http://127.0.0.1:" + port + "/"); + + HttpRequest[] requests = new HttpRequest[TIMEOUTS.length]; + + out.println("--- TESTING Async"); + for (int i = 0; i < TIMEOUTS.length; i++) { + requests[i] = HttpRequest.newBuilder(uri) + .timeout(Duration.ofMillis(TIMEOUTS[i])) + .GET() + .build(); + + final HttpRequest req = requests[i]; + CompletableFuture> response = client + .sendAsync(req, discard(null)) + .whenComplete((HttpResponse r, Throwable t) -> { + if (r != null) { + out.println("Unexpected response: " + r); + error = true; + } + if (t != null) { + if (!(t.getCause() instanceof HttpTimeoutException)) { + out.println("Wrong exception type:" + t.toString()); + Throwable c = t.getCause() == null ? t : t.getCause(); + c.printStackTrace(); + error = true; + } else { + out.println("Caught expected timeout: " + t.getCause()); + } + } + if (t == null && r == null) { + out.println("Both response and throwable are null!"); + error = true; + } + queue.add(req); + }); + } + System.out.println("All requests submitted. Waiting ..."); + + checkReturn(requests); + + if (error) + throw new RuntimeException("Failed. Check output"); + + // Repeat blocking in separate threads. Use queue to wait. + out.println("--- TESTING Sync"); + + // For running blocking response tasks + ExecutorService executor = Executors.newCachedThreadPool(); + + for (int i = 0; i < TIMEOUTS.length; i++) { + requests[i] = HttpRequest.newBuilder(uri) + .timeout(Duration.ofMillis(TIMEOUTS[i])) + .GET() + .build(); + + final HttpRequest req = requests[i]; + executor.execute(() -> { + try { + client.send(req, discard(null)); + } catch (HttpTimeoutException e) { + out.println("Caught expected timeout: " + e); + queue.offer(req); + } catch (IOException | InterruptedException ee) { + Throwable c = ee.getCause() == null ? ee : ee.getCause(); + c.printStackTrace(); + error = true; + } + }); + } + System.out.println("All requests submitted. Waiting ..."); + + checkReturn(requests); + + executor.shutdownNow(); + + if (error) + throw new RuntimeException("Failed. Check output"); + + } finally { + ((ExecutorService) client.executor()).shutdownNow(); + } + } + + static void checkReturn(HttpRequest[] requests) throws InterruptedException { + // wait for exceptions and check order + for (int j = 0; j < TIMEOUTS.length; j++) { + HttpRequest req = queue.take(); + out.println("Got request from queue " + req + ", order: " + getRequest(req, requests)); + } + out.println("Return ok"); + } + + /** Returns the index of the request in the array. */ + static String getRequest(HttpRequest req, HttpRequest[] requests) { + for (int i=0; i resp = client.send(r, discard(null)); + System.out.printf("Client: response is %d\n", resp.statusCode()); + if (resp.version() != HTTP_1_1) { + throw new RuntimeException(); + } + //System.out.printf("Client: response body is %s\n", resp.body()); + } + + static void initServer() throws Exception { + InetSocketAddress addr = new InetSocketAddress (0); + s1 = HttpServer.create (addr, 0); + HttpHandler h = new Handler(); + + HttpContext c1 = s1.createContext("/", h); + + executor = Executors.newCachedThreadPool(); + s1.setExecutor(executor); + s1.start(); + + port = s1.getAddress().getPort(); + uri = new URI("http://127.0.0.1:" + Integer.toString(port) + "/foo"); + System.out.println("HTTP server port = " + port); + } +} + +class Handler implements HttpHandler { + int counter = 0; + + void checkHeader(Headers h) { + counter++; + if (counter == 1 && h.containsKey("Upgrade")) { + VersionTest.error = true; + } + if (counter > 1 && !h.containsKey("Upgrade")) { + VersionTest.error = true; + } + } + + @Override + public synchronized void handle(HttpExchange t) + throws IOException + { + String reply = "Hello world"; + int len = reply.length(); + Headers h = t.getRequestHeaders(); + checkHeader(h); + System.out.printf("Sending response 200\n"); + t.sendResponseHeaders(200, len); + OutputStream o = t.getResponseBody(); + o.write(reply.getBytes()); + t.close(); + } +} diff --git a/jdk/test/java/net/httpclient/http2/BasicTest.java b/jdk/test/java/net/httpclient/http2/BasicTest.java index 730ed699800..9744eda9034 100644 --- a/jdk/test/java/net/httpclient/http2/BasicTest.java +++ b/jdk/test/java/net/httpclient/http2/BasicTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -62,11 +62,11 @@ public class BasicTest { sslContext = sslct.get(); client = getClient(); httpServer = new Http2TestServer(false, 0, exec, sslContext); - httpServer.addHandler(new EchoHandler(), "/"); + httpServer.addHandler(new Http2EchoHandler(), "/"); httpPort = httpServer.getAddress().getPort(); httpsServer = new Http2TestServer(true, 0, exec, sslContext); - httpsServer.addHandler(new EchoHandler(), "/"); + httpsServer.addHandler(new Http2EchoHandler(), "/"); httpsPort = httpsServer.getAddress().getPort(); httpURIString = "http://127.0.0.1:" + httpPort + "/foo/"; @@ -94,6 +94,7 @@ public class BasicTest { } catch (Throwable tt) { System.err.println("tt caught"); tt.printStackTrace(); + throw tt; } finally { httpServer.stop(); httpsServer.stop(); @@ -223,7 +224,7 @@ public class BasicTest { CompletableFuture[] responses = new CompletableFuture[LOOPS]; final Path source = TestUtil.getAFile(FILESIZE); HttpRequest request = HttpRequest.newBuilder(uri) - .POST(fromFile(tempFile())) + .POST(fromFile(source)) .build(); for (int i = 0; i < LOOPS; i++) { responses[i] = client.sendAsync(request, asFile(tempFile())) diff --git a/jdk/test/java/net/httpclient/http2/ErrorTest.java b/jdk/test/java/net/httpclient/http2/ErrorTest.java index 66b2509bff3..9a8815df14b 100644 --- a/jdk/test/java/net/httpclient/http2/ErrorTest.java +++ b/jdk/test/java/net/httpclient/http2/ErrorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -31,7 +31,7 @@ * jdk.incubator.httpclient/jdk.incubator.http.internal.frame * jdk.incubator.httpclient/jdk.incubator.http.internal.hpack * java.security.jgss - * @run testng/othervm -Djdk.httpclient.HttpClient.log=ssl,errors ErrorTest + * @run testng/othervm/timeout=60 -Djavax.net.debug=ssl -Djdk.httpclient.HttpClient.log=all ErrorTest * @summary check exception thrown when bad TLS parameters selected */ @@ -76,11 +76,14 @@ public class ErrorTest { Http2TestServer httpsServer = null; try { + SSLContext serverContext = (new SimpleSSLContext()).get(); + SSLParameters p = serverContext.getSupportedSSLParameters(); + p.setApplicationProtocols(new String[]{"h2"}); httpsServer = new Http2TestServer(true, 0, exec, - sslContext); - httpsServer.addHandler(new EchoHandler(), "/"); + serverContext); + httpsServer.addHandler(new Http2EchoHandler(), "/"); int httpsPort = httpsServer.getAddress().getPort(); String httpsURIString = "https://127.0.0.1:" + httpsPort + "/bar/"; diff --git a/jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java b/jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java new file mode 100644 index 00000000000..d6de84aca6c --- /dev/null +++ b/jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java @@ -0,0 +1,241 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8087112 + * @library /lib/testlibrary server + * @build jdk.testlibrary.SimpleSSLContext + * @modules jdk.incubator.httpclient/jdk.incubator.http.internal.common + * jdk.incubator.httpclient/jdk.incubator.http.internal.frame + * jdk.incubator.httpclient/jdk.incubator.http.internal.hpack + * @run testng/othervm -Djdk.httpclient.HttpClient.log=ssl,requests,responses,errors FixedThreadPoolTest + */ + +import java.net.*; +import jdk.incubator.http.*; +import static jdk.incubator.http.HttpClient.Version.HTTP_2; +import javax.net.ssl.*; +import java.nio.file.*; +import java.util.concurrent.*; +import jdk.testlibrary.SimpleSSLContext; +import static jdk.incubator.http.HttpRequest.BodyProcessor.fromFile; +import static jdk.incubator.http.HttpRequest.BodyProcessor.fromString; +import static jdk.incubator.http.HttpResponse.BodyHandler.asFile; +import static jdk.incubator.http.HttpResponse.BodyHandler.asString; + +import org.testng.annotations.Test; + +@Test +public class FixedThreadPoolTest { + static int httpPort, httpsPort; + static Http2TestServer httpServer, httpsServer; + static HttpClient client = null; + static ExecutorService exec; + static SSLContext sslContext; + + static String httpURIString, httpsURIString; + + static void initialize() throws Exception { + try { + SimpleSSLContext sslct = new SimpleSSLContext(); + sslContext = sslct.get(); + client = getClient(); + httpServer = new Http2TestServer(false, 0, exec, sslContext); + httpServer.addHandler(new Http2EchoHandler(), "/"); + httpPort = httpServer.getAddress().getPort(); + + httpsServer = new Http2TestServer(true, 0, exec, sslContext); + httpsServer.addHandler(new Http2EchoHandler(), "/"); + + httpsPort = httpsServer.getAddress().getPort(); + httpURIString = "http://127.0.0.1:" + httpPort + "/foo/"; + httpsURIString = "https://127.0.0.1:" + httpsPort + "/bar/"; + + httpServer.start(); + httpsServer.start(); + } catch (Throwable e) { + System.err.println("Throwing now"); + e.printStackTrace(); + throw e; + } + } + + @Test(timeOut=3000000) + public static void test() throws Exception { + try { + initialize(); + simpleTest(false); + simpleTest(true); + streamTest(false); + streamTest(true); + paramsTest(); + Thread.sleep(1000 * 4); + } catch (Exception | Error tt) { + tt.printStackTrace(); + throw tt; + } finally { + httpServer.stop(); + httpsServer.stop(); + exec.shutdownNow(); + } + } + + static HttpClient getClient() { + if (client == null) { + exec = Executors.newCachedThreadPool(); + client = HttpClient.newBuilder() + .executor(Executors.newFixedThreadPool(2)) + .sslContext(sslContext) + .version(HTTP_2) + .build(); + } + return client; + } + + static URI getURI(boolean secure) { + if (secure) + return URI.create(httpsURIString); + else + return URI.create(httpURIString); + } + + static void checkStatus(int expected, int found) throws Exception { + if (expected != found) { + System.err.printf ("Test failed: wrong status code %d/%d\n", + expected, found); + throw new RuntimeException("Test failed"); + } + } + + static void checkStrings(String expected, String found) throws Exception { + if (!expected.equals(found)) { + System.err.printf ("Test failed: wrong string %s/%s\n", + expected, found); + throw new RuntimeException("Test failed"); + } + } + + static Void compareFiles(Path path1, Path path2) { + return TestUtil.compareFiles(path1, path2); + } + + static Path tempFile() { + return TestUtil.tempFile(); + } + + static final String SIMPLE_STRING = "Hello world Goodbye world"; + + static final int LOOPS = 32; + static final int FILESIZE = 64 * 1024 + 200; + + static void streamTest(boolean secure) throws Exception { + URI uri = getURI(secure); + System.err.printf("streamTest %b to %s\n" , secure, uri); + + HttpClient client = getClient(); + Path src = TestUtil.getAFile(FILESIZE * 4); + HttpRequest req = HttpRequest.newBuilder(uri) + .POST(fromFile(src)) + .build(); + + Path dest = Paths.get("streamtest.txt"); + dest.toFile().delete(); + CompletableFuture response = client.sendAsync(req, asFile(dest)) + .thenApply(resp -> { + if (resp.statusCode() != 200) + throw new RuntimeException(); + return resp.body(); + }); + response.join(); + compareFiles(src, dest); + System.err.println("DONE"); + } + + static void paramsTest() throws Exception { + System.err.println("paramsTest"); + Http2TestServer server = new Http2TestServer(true, 0, exec, sslContext); + server.addHandler((t -> { + SSLSession s = t.getSSLSession(); + String prot = s.getProtocol(); + if (prot.equals("TLSv1.2")) { + t.sendResponseHeaders(200, -1); + } else { + System.err.printf("Protocols =%s\n", prot); + t.sendResponseHeaders(500, -1); + } + }), "/"); + server.start(); + int port = server.getAddress().getPort(); + URI u = new URI("https://127.0.0.1:"+port+"/foo"); + HttpClient client = getClient(); + HttpRequest req = HttpRequest.newBuilder(u).build(); + HttpResponse resp = client.sendAsync(req, asString()).get(); + int stat = resp.statusCode(); + if (stat != 200) { + throw new RuntimeException("paramsTest failed " + + Integer.toString(stat)); + } + } + + static void simpleTest(boolean secure) throws Exception { + URI uri = getURI(secure); + System.err.println("Request to " + uri); + + // Do a simple warmup request + + HttpClient client = getClient(); + HttpRequest req = HttpRequest.newBuilder(uri) + .POST(fromString(SIMPLE_STRING)) + .build(); + HttpResponse response = client.sendAsync(req, asString()).get(); + HttpHeaders h = response.headers(); + + checkStatus(200, response.statusCode()); + + String responseBody = response.body(); + checkStrings(SIMPLE_STRING, responseBody); + + checkStrings(h.firstValue("x-hello").get(), "world"); + checkStrings(h.firstValue("x-bye").get(), "universe"); + + // Do loops asynchronously + + CompletableFuture[] responses = new CompletableFuture[LOOPS]; + final Path source = TestUtil.getAFile(FILESIZE); + HttpRequest request = HttpRequest.newBuilder(uri) + .POST(fromFile(source)) + .build(); + for (int i = 0; i < LOOPS; i++) { + responses[i] = client.sendAsync(request, asFile(tempFile())) + //.thenApply(resp -> compareFiles(resp.body(), source)); + .thenApply(resp -> { + System.out.printf("Resp status %d body size %d\n", + resp.statusCode(), resp.body().toFile().length()); + return compareFiles(resp.body(), source); + }); + } + CompletableFuture.allOf(responses).join(); + System.err.println("DONE"); + } +} diff --git a/jdk/test/java/net/httpclient/http2/RedirectTest.java b/jdk/test/java/net/httpclient/http2/RedirectTest.java index 634467e06e1..cf0278585f3 100644 --- a/jdk/test/java/net/httpclient/http2/RedirectTest.java +++ b/jdk/test/java/net/httpclient/http2/RedirectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -79,7 +79,7 @@ public class RedirectTest { httpServer.addHandler(new RedirectHandler(sup(altURIString1)), "/foo"); altServer.addHandler(new RedirectHandler(sup(altURIString2)), "/redir"); - altServer.addHandler(new EchoHandler(), "/redir/again"); + altServer.addHandler(new Http2EchoHandler(), "/redir/again"); httpServer.start(); altServer.start(); diff --git a/jdk/test/java/net/httpclient/http2/Timeout.java b/jdk/test/java/net/httpclient/http2/Timeout.java index 0793ea8a39f..04f0ca93c85 100644 --- a/jdk/test/java/net/httpclient/http2/Timeout.java +++ b/jdk/test/java/net/httpclient/http2/Timeout.java @@ -32,6 +32,7 @@ import java.time.Duration; import java.util.concurrent.TimeUnit; import java.util.concurrent.CompletionException; import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLParameters; import javax.net.ssl.SSLServerSocketFactory; import javax.net.ssl.SSLSocket; import static jdk.incubator.http.HttpRequest.BodyProcessor.fromString; @@ -75,6 +76,9 @@ public class Timeout { Thread server = new Thread(() -> { while (true) { System.out.println("server: ready"); + SSLParameters params = ssocket.getSSLParameters(); + params.setApplicationProtocols(new String[]{"h2"}); + ssocket.setSSLParameters(params); ready = true; try (SSLSocket socket = (SSLSocket) ssocket.accept()) { diff --git a/jdk/test/java/net/httpclient/http2/server/Http2EchoHandler.java b/jdk/test/java/net/httpclient/http2/server/Http2EchoHandler.java new file mode 100644 index 00000000000..c1ebebe0d2f --- /dev/null +++ b/jdk/test/java/net/httpclient/http2/server/Http2EchoHandler.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.*; +import jdk.incubator.http.internal.common.HttpHeadersImpl; + +public class Http2EchoHandler implements Http2Handler { + public Http2EchoHandler() {} + + @Override + public void handle(Http2TestExchange t) + throws IOException { + try { + System.err.println("EchoHandler received request to " + t.getRequestURI()); + InputStream is = t.getRequestBody(); + HttpHeadersImpl map = t.getRequestHeaders(); + HttpHeadersImpl map1 = t.getResponseHeaders(); + map1.addHeader("X-Hello", "world"); + map1.addHeader("X-Bye", "universe"); + String fixedrequest = map.firstValue("XFixed").orElse(null); + File outfile = File.createTempFile("foo", "bar"); + //System.err.println ("QQQ = " + outfile.toString()); + FileOutputStream fos = new FileOutputStream(outfile); + int count = (int) is.transferTo(fos); + System.err.printf("EchoHandler read %d bytes\n", count); + is.close(); + fos.close(); + InputStream is1 = new FileInputStream(outfile); + OutputStream os = null; + // return the number of bytes received (no echo) + String summary = map.firstValue("XSummary").orElse(null); + if (fixedrequest != null && summary == null) { + t.sendResponseHeaders(200, count); + os = t.getResponseBody(); + int count1 = (int)is1.transferTo(os); + System.err.printf("EchoHandler wrote %d bytes\n", count1); + } else { + t.sendResponseHeaders(200, 0); + os = t.getResponseBody(); + int count1 = (int)is1.transferTo(os); + System.err.printf("EchoHandler wrote %d bytes\n", count1); + + if (summary != null) { + String s = Integer.toString(count); + os.write(s.getBytes()); + } + } + outfile.delete(); + os.close(); + is1.close(); + } catch (Throwable e) { + e.printStackTrace(); + throw new IOException(e); + } + } +} diff --git a/jdk/test/java/net/httpclient/http2/server/Http2TestServerConnection.java b/jdk/test/java/net/httpclient/http2/server/Http2TestServerConnection.java index a49f06df24f..f88f8daa2aa 100644 --- a/jdk/test/java/net/httpclient/http2/server/Http2TestServerConnection.java +++ b/jdk/test/java/net/httpclient/http2/server/Http2TestServerConnection.java @@ -392,9 +392,11 @@ public class Http2TestServerConnection { //System.err.println ("Stream window size = " + winsize); final InputStream bis; - if (endStreamReceived) { + if (endStreamReceived && queue.size() == 0) { + System.err.println("Server: got END_STREAM for stream " + streamid); bis = NullInputStream.INSTANCE; } else { + System.err.println("Server: creating input stream for stream " + streamid); bis = new BodyInputStream(queue, streamid, this); } try (bis; diff --git a/jdk/test/java/net/httpclient/security/Driver.java b/jdk/test/java/net/httpclient/security/Driver.java index 64b56084d41..5b58757adc3 100644 --- a/jdk/test/java/net/httpclient/security/Driver.java +++ b/jdk/test/java/net/httpclient/security/Driver.java @@ -127,6 +127,7 @@ public class Driver { cmd.add("-Dtest.src=" + testSrc); cmd.add("-Dtest.classes=" + testClasses); cmd.add("-Djava.security.manager"); + cmd.add("--add-modules=jdk.incubator.httpclient"); cmd.add("-Djava.security.policy=" + testSrc + sep + policy); cmd.add("-Dport.number=" + Integer.toString(Utils.getFreePort())); cmd.add("-Dport.number1=" + Integer.toString(Utils.getFreePort())); diff --git a/jdk/test/java/net/httpclient/websocket/ConnectionHandover.java b/jdk/test/java/net/httpclient/websocket/ConnectionHandover.java new file mode 100644 index 00000000000..e89ce790404 --- /dev/null +++ b/jdk/test/java/net/httpclient/websocket/ConnectionHandover.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.incubator.http.HttpClient; +import jdk.incubator.http.WebSocket; + +import java.io.IOException; +import java.net.URI; + +/* + * @test + * @bug 8164625 + * @summary Verifies HttpClient yields the connection to the WebSocket + * @run main/othervm -Djdk.httpclient.HttpClient.log=trace ConnectionHandover + */ +public class ConnectionHandover { + + static { + LoggingHelper.setupLogging(); + } + + /* + * An I/O channel associated with the connection is closed by WebSocket.abort(). + * If this connection is returned to the connection pool, then the second + * attempt to use it would fail with a ClosedChannelException. + * + * The assumption is that since the WebSocket client is connecting to the + * same URI, the pooled connection is to be used. + */ + public static void main(String[] args) throws IOException { + try (DummyWebSocketServer server = new DummyWebSocketServer()) { + server.open(); + URI uri = server.getURI(); + WebSocket.Builder webSocketBuilder = + HttpClient.newHttpClient().newWebSocketBuilder(uri, new WebSocket.Listener() { }); + + WebSocket ws1 = webSocketBuilder.buildAsync().join(); + try { + ws1.abort(); + } catch (IOException ignored) { } + + WebSocket ws2 = webSocketBuilder.buildAsync().join(); // Exception here if the connection was pooled + try { + ws2.abort(); + } catch (IOException ignored) { } + } + } +} diff --git a/jdk/test/java/net/httpclient/websocket/DummyWebSocketServer.java b/jdk/test/java/net/httpclient/websocket/DummyWebSocketServer.java new file mode 100644 index 00000000000..a76fc21a609 --- /dev/null +++ b/jdk/test/java/net/httpclient/websocket/DummyWebSocketServer.java @@ -0,0 +1,278 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.Closeable; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.net.InetSocketAddress; +import java.net.URI; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.channels.ClosedByInterruptException; +import java.nio.channels.ServerSocketChannel; +import java.nio.channels.SocketChannel; +import java.nio.charset.CharacterCodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; +import java.util.Base64; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.function.Function; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import static java.lang.String.format; +import static java.lang.System.Logger.Level.ERROR; +import static java.lang.System.Logger.Level.INFO; +import static java.lang.System.Logger.Level.TRACE; +import static java.nio.charset.StandardCharsets.ISO_8859_1; +import static java.util.Arrays.asList; +import static java.util.Objects.requireNonNull; + +/** + * Dummy WebSocket Server. + * + * Performs simpler version of the WebSocket Opening Handshake over HTTP (i.e. + * no proxying, cookies, etc.) Supports sequential connections, one at a time, + * i.e. in order for a client to connect to the server the previous client must + * disconnect first. + * + * Expected client request: + * + * GET /chat HTTP/1.1 + * Host: server.example.com + * Upgrade: websocket + * Connection: Upgrade + * Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== + * Origin: http://example.com + * Sec-WebSocket-Protocol: chat, superchat + * Sec-WebSocket-Version: 13 + * + * This server response: + * + * HTTP/1.1 101 Switching Protocols + * Upgrade: websocket + * Connection: Upgrade + * Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= + * Sec-WebSocket-Protocol: chat + */ +public final class DummyWebSocketServer implements Closeable { + + private final static System.Logger log = System.getLogger(DummyWebSocketServer.class.getName()); + private final AtomicBoolean started = new AtomicBoolean(); + private final Thread thread; + private volatile ServerSocketChannel ssc; + private volatile InetSocketAddress address; + + public DummyWebSocketServer() { + this(defaultMapping()); + } + + public DummyWebSocketServer(Function, List> mapping) { + requireNonNull(mapping); + thread = new Thread(() -> { + try { + while (!Thread.currentThread().isInterrupted()) { + log.log(INFO, "Accepting next connection at: " + ssc); + SocketChannel channel = ssc.accept(); + log.log(INFO, "Accepted: " + channel); + try { + channel.configureBlocking(true); + StringBuilder request = new StringBuilder(); + if (!readRequest(channel, request)) { + throw new IOException("Bad request"); + } + List strings = asList(request.toString().split("\r\n")); + List response = mapping.apply(strings); + writeResponse(channel, response); + // Read until the thread is interrupted or an error occurred + // or the input is shutdown + ByteBuffer b = ByteBuffer.allocate(1024); + while (channel.read(b) != -1) { + b.clear(); + } + } catch (IOException e) { + log.log(TRACE, () -> "Error in connection: " + channel, e); + } finally { + log.log(INFO, "Closed: " + channel); + close(channel); + } + } + } catch (ClosedByInterruptException ignored) { + } catch (IOException e) { + log.log(ERROR, e); + } finally { + close(ssc); + log.log(INFO, "Stopped at: " + getURI()); + } + }); + thread.setName("DummyWebSocketServer"); + thread.setDaemon(false); + } + + public void open() throws IOException { + log.log(INFO, "Starting"); + if (!started.compareAndSet(false, true)) { + throw new IllegalStateException("Already started"); + } + ssc = ServerSocketChannel.open(); + try { + ssc.configureBlocking(true); + ssc.bind(new InetSocketAddress("localhost", 0)); + address = (InetSocketAddress) ssc.getLocalAddress(); + thread.start(); + } catch (IOException e) { + close(ssc); + } + log.log(INFO, "Started at: " + getURI()); + } + + @Override + public void close() { + log.log(INFO, "Stopping: " + getURI()); + thread.interrupt(); + } + + URI getURI() { + if (!started.get()) { + throw new IllegalStateException("Not yet started"); + } + return URI.create("ws://" + address.getHostName() + ":" + address.getPort()); + } + + private boolean readRequest(SocketChannel channel, StringBuilder request) + throws IOException + { + ByteBuffer buffer = ByteBuffer.allocate(512); + int num = channel.read(buffer); + if (num == -1) { + return false; + } + CharBuffer decoded; + buffer.flip(); + try { + decoded = ISO_8859_1.newDecoder().decode(buffer); + } catch (CharacterCodingException e) { + throw new UncheckedIOException(e); + } + request.append(decoded); + return Pattern.compile("\r\n\r\n").matcher(request).find(); + } + + private void writeResponse(SocketChannel channel, List response) + throws IOException + { + String s = response.stream().collect(Collectors.joining("\r\n")) + + "\r\n\r\n"; + ByteBuffer encoded; + try { + encoded = ISO_8859_1.newEncoder().encode(CharBuffer.wrap(s)); + } catch (CharacterCodingException e) { + throw new UncheckedIOException(e); + } + while (encoded.hasRemaining()) { + channel.write(encoded); + } + } + + private static Function, List> defaultMapping() { + return request -> { + List response = new LinkedList<>(); + Iterator iterator = request.iterator(); + if (!iterator.hasNext()) { + throw new IllegalStateException("The request is empty"); + } + if (!"GET / HTTP/1.1".equals(iterator.next())) { + throw new IllegalStateException + ("Unexpected status line: " + request.get(0)); + } + response.add("HTTP/1.1 101 Switching Protocols"); + Map requestHeaders = new HashMap<>(); + while (iterator.hasNext()) { + String header = iterator.next(); + String[] split = header.split(": "); + if (split.length != 2) { + throw new IllegalStateException + ("Unexpected header: " + header + + ", split=" + Arrays.toString(split)); + } + if (requestHeaders.put(split[0], split[1]) != null) { + throw new IllegalStateException + ("Duplicating headers: " + Arrays.toString(split)); + } + } + if (requestHeaders.containsKey("Sec-WebSocket-Protocol")) { + throw new IllegalStateException("Subprotocols are not expected"); + } + if (requestHeaders.containsKey("Sec-WebSocket-Extensions")) { + throw new IllegalStateException("Extensions are not expected"); + } + expectHeader(requestHeaders, "Connection", "Upgrade"); + response.add("Connection: Upgrade"); + expectHeader(requestHeaders, "Upgrade", "websocket"); + response.add("Upgrade: websocket"); + expectHeader(requestHeaders, "Sec-WebSocket-Version", "13"); + String key = requestHeaders.get("Sec-WebSocket-Key"); + if (key == null) { + throw new IllegalStateException("Sec-WebSocket-Key is missing"); + } + MessageDigest sha1 = null; + try { + sha1 = MessageDigest.getInstance("SHA-1"); + } catch (NoSuchAlgorithmException e) { + throw new InternalError(e); + } + String x = key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + sha1.update(x.getBytes(ISO_8859_1)); + String v = Base64.getEncoder().encodeToString(sha1.digest()); + response.add("Sec-WebSocket-Accept: " + v); + return response; + }; + } + + protected static String expectHeader(Map headers, + String name, + String value) { + String v = headers.get(name); + if (!value.equals(v)) { + throw new IllegalStateException( + format("Expected '%s: %s', actual: '%s: %s'", + name, value, name, v) + ); + } + return v; + } + + private static void close(AutoCloseable... acs) { + for (AutoCloseable ac : acs) { + try { + ac.close(); + } catch (Exception ignored) { } + } + } +} diff --git a/jdk/test/java/net/MulticastSocket/Leave.java b/jdk/test/java/net/httpclient/websocket/LoggingHelper.java similarity index 65% rename from jdk/test/java/net/MulticastSocket/Leave.java rename to jdk/test/java/net/httpclient/websocket/LoggingHelper.java index 0ca23b34ee5..026d8ad4132 100644 --- a/jdk/test/java/net/MulticastSocket/Leave.java +++ b/jdk/test/java/net/httpclient/websocket/LoggingHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,26 +21,18 @@ * questions. */ -/* - * @test - * @bug 4102731 - * @summary Test the java.net.multicastsocket.leave method - * - */ +import java.io.File; -import java.net.*; -import java.io.*; +public final class LoggingHelper { -public class Leave { - - public static void main(String args[]) throws Exception { - MulticastSocket socket = null; - InetAddress mca = null; - - mca = InetAddress.getByName("224.80.80.80"); - socket = new MulticastSocket(); - socket.joinGroup(mca); - socket.leaveGroup(mca); - socket.close(); + /* + * I wish we had a support for java.util.logging in jtreg similar to what we + * have for security policy files: + * + * @run main/othervm/jul=logging.properties ClassUnderTest + */ + public static void setupLogging() { + String path = System.getProperty("test.src") + File.separator + "logging.properties"; + System.setProperty("java.util.logging.config.file", path); } } diff --git a/jdk/test/java/net/httpclient/websocket/logging.properties b/jdk/test/java/net/httpclient/websocket/logging.properties new file mode 100644 index 00000000000..fb8a8dbdfc5 --- /dev/null +++ b/jdk/test/java/net/httpclient/websocket/logging.properties @@ -0,0 +1,5 @@ +handlers=java.util.logging.ConsoleHandler +.level=ALL +java.util.logging.ConsoleHandler.level=ALL +java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter +java.util.logging.SimpleFormatter.format=%4$s: %5$s [%1$tc]%n diff --git a/jdk/test/java/net/httpclient/whitebox/Driver.java b/jdk/test/java/net/httpclient/whitebox/Driver.java index c85b8f076c6..5b9e3438989 100644 --- a/jdk/test/java/net/httpclient/whitebox/Driver.java +++ b/jdk/test/java/net/httpclient/whitebox/Driver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -26,5 +26,6 @@ * @bug 8151299 8164704 * @modules jdk.incubator.httpclient * @run testng jdk.incubator.httpclient/jdk.incubator.http.SelectorTest + * @run testng jdk.incubator.httpclient/jdk.incubator.http.RawChannelTest * @run testng jdk.incubator.httpclient/jdk.incubator.http.ResponseHeadersTest */ diff --git a/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java b/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java new file mode 100644 index 00000000000..7e9ca255795 --- /dev/null +++ b/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java @@ -0,0 +1,318 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.incubator.http; + +import jdk.incubator.http.internal.websocket.RawChannel; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.UncheckedIOException; +import java.net.ServerSocket; +import java.net.Socket; +import java.net.URI; +import java.nio.ByteBuffer; +import java.nio.channels.SelectionKey; +import java.util.Random; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; + +import static jdk.incubator.http.HttpResponse.BodyHandler.discard; +import static org.testng.Assert.assertEquals; + +/* + * This test exercises mechanics of _independent_ reads and writes on the + * RawChannel. It verifies that the underlying implementation can manage more + * than a single type of notifications at the same time. + */ +public class RawChannelTest { + + private final AtomicLong clientWritten = new AtomicLong(); + private final AtomicLong serverWritten = new AtomicLong(); + private final AtomicLong clientRead = new AtomicLong(); + private final AtomicLong serverRead = new AtomicLong(); + + /* + * Since at this level we don't have any control over the low level socket + * parameters, this latch ensures a write to the channel will stall at least + * once (socket's send buffer filled up). + */ + private final CountDownLatch writeStall = new CountDownLatch(1); + private final CountDownLatch initialWriteStall = new CountDownLatch(1); + + /* + * This one works similarly by providing means to ensure a read from the + * channel will stall at least once (no more data available on the socket). + */ + private final CountDownLatch readStall = new CountDownLatch(1); + private final CountDownLatch initialReadStall = new CountDownLatch(1); + + private final AtomicInteger writeHandles = new AtomicInteger(); + private final AtomicInteger readHandles = new AtomicInteger(); + + private final CountDownLatch exit = new CountDownLatch(1); + + @Test + public void test() throws Exception { + try (ServerSocket server = new ServerSocket(0)) { + int port = server.getLocalPort(); + new TestServer(server).start(); + + final RawChannel chan = channelOf(port); + initialWriteStall.await(); + + // It's very important not to forget the initial bytes, possibly + // left from the HTTP thingy + int initialBytes = chan.initialByteBuffer().remaining(); + print("RawChannel has %s initial bytes", initialBytes); + clientRead.addAndGet(initialBytes); + + // tell the server we have read the initial bytes, so + // that it makes sure there is something for us to + // read next in case the initialBytes have already drained the + // channel dry. + initialReadStall.countDown(); + + chan.registerEvent(new RawChannel.RawEvent() { + + private final ByteBuffer reusableBuffer = ByteBuffer.allocate(32768); + + @Override + public int interestOps() { + return SelectionKey.OP_WRITE; + } + + @Override + public void handle() { + int i = writeHandles.incrementAndGet(); + print("OP_WRITE #%s", i); + if (i > 3) { // Fill up the send buffer not more than 3 times + try { + chan.shutdownOutput(); + } catch (IOException e) { + e.printStackTrace(); + } + return; + } + long total = 0; + try { + long n; + do { + ByteBuffer[] array = {reusableBuffer.slice()}; + n = chan.write(array, 0, 1); + total += n; + } while (n > 0); + print("OP_WRITE clogged SNDBUF with %s bytes", total); + clientWritten.addAndGet(total); + chan.registerEvent(this); + writeStall.countDown(); // signal send buffer is full + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + }); + + chan.registerEvent(new RawChannel.RawEvent() { + + @Override + public int interestOps() { + return SelectionKey.OP_READ; + } + + @Override + public void handle() { + int i = readHandles.incrementAndGet(); + print("OP_READ #%s", i); + ByteBuffer read = null; + long total = 0; + while (true) { + try { + read = chan.read(); + } catch (IOException e) { + e.printStackTrace(); + } + if (read == null) { + print("OP_READ EOF"); + break; + } else if (!read.hasRemaining()) { + print("OP_READ stall"); + try { + chan.registerEvent(this); + } catch (IOException e) { + e.printStackTrace(); + } + readStall.countDown(); + break; + } + int r = read.remaining(); + total += r; + clientRead.addAndGet(r); + } + print("OP_READ read %s bytes (%s total)", total, clientRead.get()); + } + }); + exit.await(); // All done, we need to compare results: + assertEquals(clientRead.get(), serverWritten.get()); + assertEquals(serverRead.get(), clientWritten.get()); + } + } + + private static RawChannel channelOf(int port) throws Exception { + URI uri = URI.create("http://127.0.0.1:" + port + "/"); + print("raw channel to %s", uri.toString()); + HttpRequest req = HttpRequest.newBuilder(uri).build(); + HttpResponse r = HttpClient.newHttpClient().send(req, discard(null)); + r.body(); + return ((HttpResponseImpl) r).rawChannel(); + } + + private class TestServer extends Thread { // Powered by Slowpokes + + private final ServerSocket server; + + TestServer(ServerSocket server) throws IOException { + this.server = server; + } + + @Override + public void run() { + try (Socket s = server.accept()) { + InputStream is = s.getInputStream(); + OutputStream os = s.getOutputStream(); + + processHttp(is, os); + + Thread reader = new Thread(() -> { + try { + long n = readSlowly(is); + print("Server read %s bytes", n); + serverRead.addAndGet(n); + s.shutdownInput(); + } catch (Exception e) { + e.printStackTrace(); + } + }); + + Thread writer = new Thread(() -> { + try { + long n = writeSlowly(os); + print("Server written %s bytes", n); + serverWritten.addAndGet(n); + s.shutdownOutput(); + } catch (Exception e) { + e.printStackTrace(); + } + }); + + reader.start(); + writer.start(); + + reader.join(); + writer.join(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + exit.countDown(); + } + } + + private void processHttp(InputStream is, OutputStream os) + throws IOException + { + os.write("HTTP/1.1 200 OK\r\nContent-length: 0\r\n\r\n".getBytes()); + + // write some initial bytes + byte[] initial = byteArrayOfSize(1024); + os.write(initial); + os.flush(); + serverWritten.addAndGet(initial.length); + initialWriteStall.countDown(); + + byte[] buf = new byte[1024]; + String s = ""; + while (true) { + int n = is.read(buf); + if (n <= 0) { + throw new RuntimeException("Unexpected end of request"); + } + s = s + new String(buf, 0, n); + if (s.contains("\r\n\r\n")) { + break; + } + } + } + + private long writeSlowly(OutputStream os) throws Exception { + byte[] first = byteArrayOfSize(1024); + long total = first.length; + os.write(first); + os.flush(); + + // wait until initial bytes were read + initialReadStall.await(); + + // make sure there is something to read, otherwise readStall + // will never be counted down. + first = byteArrayOfSize(1024); + os.write(first); + os.flush(); + total += first.length; + + // Let's wait for the signal from the raw channel that its read has + // stalled, and then continue sending a bit more stuff + readStall.await(); + for (int i = 0; i < 32; i++) { + byte[] b = byteArrayOfSize(1024); + os.write(b); + os.flush(); + total += b.length; + TimeUnit.MILLISECONDS.sleep(1); + } + return total; + } + + private long readSlowly(InputStream is) throws Exception { + // Wait for the raw channel to fill up its send buffer + writeStall.await(); + long overall = 0; + byte[] array = new byte[1024]; + for (int n = 0; n != -1; n = is.read(array)) { + TimeUnit.MILLISECONDS.sleep(1); + overall += n; + } + return overall; + } + } + + private static void print(String format, Object... args) { + System.out.println(Thread.currentThread() + ": " + String.format(format, args)); + } + + private static byte[] byteArrayOfSize(int bound) { + return new byte[new Random().nextInt(1 + bound)]; + } +} diff --git a/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/ResponseHeadersTest.java b/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/ResponseHeadersTest.java index 91a05f91d73..bf2c6d751e6 100644 --- a/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/ResponseHeadersTest.java +++ b/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/ResponseHeadersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -214,10 +214,6 @@ public class ResponseHeadersTest { protected ByteBuffer readImpl() throws IOException { throw new AssertionError("Bad test assumption: should not have reached here!"); } - @Override - protected int readImpl(ByteBuffer buffer) throws IOException { - throw new AssertionError("Bad test assumption: should not have reached here!"); - } } public static HttpHeaders createResponseHeaders(ByteBuffer buffer) diff --git a/jdk/test/java/net/ipv6tests/B6521014.java b/jdk/test/java/net/ipv6tests/B6521014.java index 4dbc928e9b3..5efa77d9663 100644 --- a/jdk/test/java/net/ipv6tests/B6521014.java +++ b/jdk/test/java/net/ipv6tests/B6521014.java @@ -25,13 +25,15 @@ * @test * @bug 6521014 6543428 * @summary IOException thrown when Socket tries to bind to an local IPv6 address on SuSE Linux + * @library /lib/testlibrary + * @build jdk.testlibrary.NetworkConfiguration + * @run main B6521014 */ - import java.net.*; import java.io.*; import java.util.*; - +import jdk.testlibrary.NetworkConfiguration; /* * @@ -52,38 +54,26 @@ import java.util.*; */ public class B6521014 { - static InetAddress sin; - - static Inet6Address getLocalAddr () throws Exception { - Enumeration e = NetworkInterface.getNetworkInterfaces(); - while (e.hasMoreElements()) { - NetworkInterface ifc = (NetworkInterface) e.nextElement(); - if (!ifc.isUp()) - continue; - Enumeration addrs = ifc.getInetAddresses(); - while (addrs.hasMoreElements()) { - InetAddress a = (InetAddress)addrs.nextElement(); - if (a instanceof Inet6Address) { - Inet6Address ia6 = (Inet6Address) a; - if (ia6.isLinkLocalAddress()) { - // remove %scope suffix - return (Inet6Address)InetAddress.getByAddress(ia6.getAddress()); - } - } - } + static Inet6Address removeScope(Inet6Address addr) { + try { + return (Inet6Address)InetAddress.getByAddress(addr.getAddress()); + } catch (IOException e) { + throw new UncheckedIOException(e); } - return null; } - static void test1() throws Exception { - ServerSocket ssock; - Socket sock; - int port; + static Optional getLocalAddr() throws Exception { + return NetworkConfiguration.probe() + .ip6Addresses() + .filter(Inet6Address::isLinkLocalAddress) + .map(B6521014::removeScope) + .findFirst(); + } - ssock = new ServerSocket(0); - port = ssock.getLocalPort(); - sock = new Socket(); - try { + static void test1(Inet6Address sin) throws Exception { + try (ServerSocket ssock = new ServerSocket(0); + Socket sock = new Socket()) { + int port = ssock.getLocalPort(); sock.connect(new InetSocketAddress(sin, port), 100); } catch (SocketTimeoutException e) { // time out exception is okay @@ -91,36 +81,29 @@ public class B6521014 { } } - static void test2() throws Exception { - Socket sock; - ServerSocket ssock; - int port; - - ssock = new ServerSocket(0); - ssock.setSoTimeout(100); - port = ssock.getLocalPort(); - sock = new Socket(); - sock.bind(new InetSocketAddress(sin, 0)); - try { + static void test2(Inet6Address sin) throws Exception { + try (ServerSocket ssock = new ServerSocket(0); + Socket sock = new Socket()) { + int port = ssock.getLocalPort(); + ssock.setSoTimeout(100); + sock.bind(new InetSocketAddress(sin, 0)); sock.connect(new InetSocketAddress(sin, port), 100); - } catch (SocketTimeoutException e) { + } catch (SocketTimeoutException expected) { // time out exception is okay System.out.println("timed out when connecting."); } } public static void main(String[] args) throws Exception { - sin = getLocalAddr(); - if (sin == null) { + Optional oaddr = getLocalAddr(); + if (!oaddr.isPresent()) { System.out.println("Cannot find a link-local address."); return; } - try { - test1(); - test2(); - } catch (IOException e) { - throw new RuntimeException("Test failed: cannot create socket.", e); - } + Inet6Address addr = oaddr.get(); + System.out.println("Using " + addr); + test1(addr); + test2(addr); } } diff --git a/jdk/test/java/net/ipv6tests/Tests.java b/jdk/test/java/net/ipv6tests/Tests.java index 95a20245562..d258b982be8 100644 --- a/jdk/test/java/net/ipv6tests/Tests.java +++ b/jdk/test/java/net/ipv6tests/Tests.java @@ -27,7 +27,10 @@ import java.util.*; public class Tests { - static boolean isWindows = System.getProperty("os.name").startsWith("Windows"); + static final boolean isWindows = + System.getProperty("os.name").startsWith("Windows"); + static final boolean isMacOS = + System.getProperty("os.name").contains("OS X"); /** * performs a simple exchange of data between the two sockets @@ -278,6 +281,8 @@ public class Tests { String dName = nic.getDisplayName(); if (dName != null && dName.contains("Teredo")) continue; + } else if (isMacOS && nic.getName().contains("awdl")) { + continue; } try { if (nic.isUp() && !nic.isLoopback()) diff --git a/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java b/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java index b39ffd1539b..6d287738eee 100644 --- a/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java +++ b/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java @@ -53,8 +53,7 @@ import static java.util.Arrays.asList; /* * @test * @bug 8064924 - * @modules java.compiler - * jdk.compiler + * @modules jdk.compiler * @summary Basic test for URLStreamHandlerProvider * @library /lib/testlibrary * @build jdk.testlibrary.FileUtils jdk.testlibrary.JDKToolFinder diff --git a/jdk/test/java/nio/channels/AsyncCloseAndInterrupt.java b/jdk/test/java/nio/channels/AsyncCloseAndInterrupt.java index 8f6bf999f11..654697f3cda 100644 --- a/jdk/test/java/nio/channels/AsyncCloseAndInterrupt.java +++ b/jdk/test/java/nio/channels/AsyncCloseAndInterrupt.java @@ -25,6 +25,7 @@ * @bug 4460583 4470470 4840199 6419424 6710579 6596323 6824135 6395224 7142919 * 8151582 8068693 8153209 * @run main/othervm AsyncCloseAndInterrupt + * @key intermittent * @summary Comprehensive test of asynchronous closing and interruption * @author Mark Reinhold */ diff --git a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java index f98fca05391..64861b4c865 100644 --- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java +++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java @@ -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 @@ -23,24 +23,27 @@ /* @test * @bug 4607272 6842687 6878369 6944810 7023403 - * @summary Unit test for AsynchronousSocketChannel + * @summary Unit test for AsynchronousSocketChannel(use -Dseed=X to set PRNG seed) + * @library /lib/testlibrary/ + * @build jdk.testlibrary.* * @run main Basic -skipSlowConnectTest * @key randomness intermittent */ -import java.nio.ByteBuffer; -import java.nio.channels.*; -import static java.net.StandardSocketOptions.*; -import java.net.*; -import java.util.Random; -import java.util.concurrent.*; -import java.util.concurrent.atomic.*; import java.io.Closeable; import java.io.IOException; +import java.net.*; +import static java.net.StandardSocketOptions.*; +import java.nio.ByteBuffer; +import java.nio.channels.*; +import java.util.Random; import java.util.Set; +import java.util.concurrent.*; +import java.util.concurrent.atomic.*; +import jdk.testlibrary.RandomFactory; public class Basic { - static final Random rand = new Random(); + private static final Random RAND = RandomFactory.getRandom(); static boolean skipSlowConnectTest = false; @@ -327,8 +330,10 @@ public class Basic { new AtomicReference(); // write bytes to fill socket buffer + final AtomicInteger numCompleted = new AtomicInteger(); ch.write(genBuffer(), ch, new CompletionHandler() { public void completed(Integer result, AsynchronousSocketChannel ch) { + numCompleted.incrementAndGet(); ch.write(genBuffer(), ch, this); } public void failed(Throwable x, AsynchronousSocketChannel ch) { @@ -336,10 +341,21 @@ public class Basic { } }); - // give time for socket buffer to fill up. - Thread.sleep(5*1000); + // give time for socket buffer to fill up - + // take pauses until the handler is no longer being invoked + // because all writes are being pended which guarantees that + // the internal channel state indicates it is writing + int prevNumCompleted = numCompleted.get(); + do { + Thread.sleep(1000); + if (numCompleted.get() == prevNumCompleted) { + break; + } + prevNumCompleted = numCompleted.get(); + } while (true); - // attempt a concurrent write - should fail with WritePendingException + // attempt a concurrent write - + // should fail with WritePendingException try { ch.write(genBuffer()); throw new RuntimeException("WritePendingException expected"); @@ -497,12 +513,12 @@ public class Basic { // trickle the writing do { int rem = src.remaining(); - int size = (rem <= 100) ? rem : 50 + rand.nextInt(rem - 100); + int size = (rem <= 100) ? rem : 50 + RAND.nextInt(rem - 100); ByteBuffer buf = ByteBuffer.allocate(size); for (int i=0; i 1) - len += rand.nextInt(max); + len += RAND.nextInt(max); ByteBuffer[] bufs = new ByteBuffer[len]; for (int i=0; i= 6); - } - return true; - } + private static final boolean isMacOs = + System.getProperty("os.name").equals("Mac OS X"); static NetworkConfiguration probe() throws IOException { Map> ip4Interfaces = new HashMap>(); Map> ip6Interfaces = new HashMap>(); - boolean isIPv6Supported = isIPv6Supported(); // find the interfaces that support IPv4 and IPv6 List nifs = Collections .list(NetworkInterface.getNetworkInterfaces()); for (NetworkInterface nif: nifs) { // ignore intertaces that are down or don't support multicast - if (!nif.isUp() || !nif.supportsMulticast() || nif.isLoopback()) + if (!nif.isUp() || !nif.supportsMulticast() || nif.isLoopback() + || (isMacOs && nif.getName().contains("awdl"))) continue; List addrs = Collections.list(nif.getInetAddresses()); @@ -92,7 +85,7 @@ class NetworkConfiguration { } list.add(addr); ip4Interfaces.put(nif, list); - } else if (isIPv6Supported && (addr instanceof Inet6Address)) { + } else if (addr instanceof Inet6Address) { List list = ip6Interfaces.get(nif); if (list == null) { list = new LinkedList(); diff --git a/jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java b/jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java index 102d7db900d..b3b361f0a0c 100644 --- a/jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java +++ b/jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,7 +58,7 @@ public class InterruptDeadlock { if (n > 0) pos += n; // fc.size is important here as it is position sensitive - if (pos > fc.size()) + if (pos >= fc.size()) pos = 0L; } } catch (ClosedChannelException x) { diff --git a/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java b/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java index f81712c1f97..3855b2c47ad 100644 --- a/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java +++ b/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java @@ -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 @@ -27,7 +27,7 @@ * @summary (fc) Infinite loop FileChannel.truncate * @library /lib/testlibrary * @build jdk.testlibrary.Utils - * @run main/othervm LoopingTruncate + * @run main/othervm/timeout=300 LoopingTruncate */ import java.nio.ByteBuffer; @@ -36,6 +36,7 @@ import java.nio.channels.ClosedByInterruptException; import java.nio.file.Files; import java.nio.file.Path; import static java.nio.file.StandardOpenOption.*; +import java.util.concurrent.TimeUnit; import static jdk.testlibrary.Utils.adjustTimeout; public class LoopingTruncate { @@ -50,11 +51,21 @@ public class LoopingTruncate { Path path = Files.createTempFile("LoopingTruncate.tmp", null); try (FileChannel fc = FileChannel.open(path, CREATE, WRITE)) { fc.position(FATEFUL_SIZE + 1L); + System.out.println(" Writing large file..."); + long t0 = System.nanoTime(); fc.write(ByteBuffer.wrap(new byte[] {0})); + long t1 = System.nanoTime(); + System.out.printf(" Wrote large file in %d ns (%d ms) %n", + t1 - t0, TimeUnit.NANOSECONDS.toMillis(t1 - t0)); Thread th = new Thread(() -> { try { + System.out.println(" Truncating large file..."); + long t2 = System.nanoTime(); fc.truncate(FATEFUL_SIZE); + long t3 = System.nanoTime(); + System.out.printf(" Truncated large file in %d ns (%d ms) %n", + t3 - t2, TimeUnit.NANOSECONDS.toMillis(t3 - t2)); } catch (ClosedByInterruptException ignore) { } catch (Exception e) { throw new RuntimeException(e); @@ -76,5 +87,8 @@ public class LoopingTruncate { } finally { Files.deleteIfExists(path); } + + System.out.println("Test succeeded."); + System.out.flush(); } } diff --git a/jdk/test/java/nio/channels/FileChannel/Transfer.java b/jdk/test/java/nio/channels/FileChannel/Transfer.java index 04a0f3251b2..43d7202408c 100644 --- a/jdk/test/java/nio/channels/FileChannel/Transfer.java +++ b/jdk/test/java/nio/channels/FileChannel/Transfer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -22,45 +22,45 @@ */ /* @test - * @bug 4434723 4482726 4559072 4638365 4795550 5081340 5103988 6253145 - * 6984545 - * @summary Test FileChannel.transferFrom and transferTo + * @bug 4434723 4482726 4559072 4795550 5081340 5103988 6984545 + * @summary Test FileChannel.transferFrom and transferTo (use -Dseed=X to set PRNG seed) * @library .. + * @library /lib/testlibrary/ + * @build jdk.testlibrary.* + * @run testng/timeout=300 Transfer * @key randomness */ -import java.io.*; -import java.net.*; -import java.nio.*; -import java.nio.channels.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStreamReader; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.io.Reader; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; +import java.nio.channels.NonReadableChannelException; +import java.nio.channels.Pipe; +import java.nio.channels.ServerSocketChannel; +import java.nio.channels.SocketChannel; import java.nio.channels.spi.SelectorProvider; -import java.nio.file.StandardOpenOption; -import java.nio.file.FileAlreadyExistsException; import java.util.Random; +import java.util.concurrent.TimeUnit; +import jdk.testlibrary.RandomFactory; + +import org.testng.annotations.Test; public class Transfer { - private static Random generator = new Random(); + private static Random generator = RandomFactory.getRandom(); - private static int[] testSizes = { - 0, 10, 1023, 1024, 1025, 2047, 2048, 2049 }; - - public static void main(String[] args) throws Exception { - testFileChannel(); - for (int i=0; i 0) { - sc.write(bb); - } - bb.clear(); - } - } catch (IOException x) { - x.printStackTrace(); - } finally { - try { - sc.close(); - } catch (IOException ignore) { } - } - } - } - } diff --git a/jdk/test/java/nio/channels/FileChannel/Transfer4GBFile.java b/jdk/test/java/nio/channels/FileChannel/Transfer4GBFile.java new file mode 100644 index 00000000000..22240e767bf --- /dev/null +++ b/jdk/test/java/nio/channels/FileChannel/Transfer4GBFile.java @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 4638365 + * @key intermittent + * @summary Test FileChannel.transferFrom and transferTo for 4GB files + * @run testng/timeout=300 Transfer4GBFile + */ + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.PrintStream; +import java.io.RandomAccessFile; +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; +import java.nio.file.StandardOpenOption; +import java.nio.file.FileAlreadyExistsException; +import java.util.concurrent.TimeUnit; + +import org.testng.annotations.Test; + +public class Transfer4GBFile { + + private static PrintStream err = System.err; + private static PrintStream out = System.out; + + // Test transferTo with large file + @Test + public void xferTest04() throws Exception { // for bug 4638365 + File source = File.createTempFile("blah", null); + source.deleteOnExit(); + long testSize = ((long)Integer.MAX_VALUE) * 2; + initTestFile(source, 10); + RandomAccessFile raf = new RandomAccessFile(source, "rw"); + FileChannel fc = raf.getChannel(); + out.println(" Writing large file..."); + long t0 = System.nanoTime(); + fc.write(ByteBuffer.wrap("Use the source!".getBytes()), testSize - 40); + long t1 = System.nanoTime(); + out.printf(" Wrote large file in %d ns (%d ms) %n", + t1 - t0, TimeUnit.NANOSECONDS.toMillis(t1 - t0)); + + fc.close(); + raf.close(); + + File sink = File.createTempFile("sink", null); + sink.deleteOnExit(); + + FileInputStream fis = new FileInputStream(source); + FileChannel sourceChannel = fis.getChannel(); + + raf = new RandomAccessFile(sink, "rw"); + FileChannel sinkChannel = raf.getChannel(); + + long bytesWritten = sourceChannel.transferTo(testSize -40, 10, + sinkChannel); + if (bytesWritten != 10) { + throw new RuntimeException("Transfer test 4 failed " + + bytesWritten); + } + sourceChannel.close(); + sinkChannel.close(); + + source.delete(); + sink.delete(); + } + + // Test transferFrom with large file + @Test + public void xferTest05() throws Exception { // for bug 4638365 + // Create a source file & large sink file for the test + File source = File.createTempFile("blech", null); + source.deleteOnExit(); + initTestFile(source, 100); + + // Create the sink file as a sparse file if possible + File sink = null; + FileChannel fc = null; + while (fc == null) { + sink = File.createTempFile("sink", null); + // re-create as a sparse file + sink.delete(); + try { + fc = FileChannel.open(sink.toPath(), + StandardOpenOption.CREATE_NEW, + StandardOpenOption.WRITE, + StandardOpenOption.SPARSE); + } catch (FileAlreadyExistsException ignore) { + // someone else got it + } + } + sink.deleteOnExit(); + + long testSize = ((long)Integer.MAX_VALUE) * 2; + try { + out.println(" Writing large file..."); + long t0 = System.nanoTime(); + fc.write(ByteBuffer.wrap("Use the source!".getBytes()), + testSize - 40); + long t1 = System.nanoTime(); + out.printf(" Wrote large file in %d ns (%d ms) %n", + t1 - t0, TimeUnit.NANOSECONDS.toMillis(t1 - t0)); + } catch (IOException e) { + // Can't set up the test, abort it + err.println("xferTest05 was aborted."); + return; + } finally { + fc.close(); + } + + // Get new channels for the source and sink and attempt transfer + FileChannel sourceChannel = new FileInputStream(source).getChannel(); + try { + FileChannel sinkChannel = new RandomAccessFile(sink, "rw").getChannel(); + try { + long bytesWritten = sinkChannel.transferFrom(sourceChannel, + testSize - 40, 10); + if (bytesWritten != 10) { + throw new RuntimeException("Transfer test 5 failed " + + bytesWritten); + } + } finally { + sinkChannel.close(); + } + } finally { + sourceChannel.close(); + } + + source.delete(); + sink.delete(); + } + + /** + * Creates file blah of specified size in bytes. + */ + private static void initTestFile(File blah, long size) throws Exception { + if (blah.exists()) + blah.delete(); + FileOutputStream fos = new FileOutputStream(blah); + BufferedWriter awriter + = new BufferedWriter(new OutputStreamWriter(fos, "8859_1")); + + for(int i=0; i 0) { + sc.write(bb); + } + bb.clear(); + } + } catch (IOException x) { + x.printStackTrace(); + } finally { + try { + sc.close(); + } catch (IOException ignore) { } + } + } + } +} diff --git a/jdk/test/java/nio/channels/FileChannel/Transfers.java b/jdk/test/java/nio/channels/FileChannel/Transfers.java index a414b591cc5..30bf5294fed 100644 --- a/jdk/test/java/nio/channels/FileChannel/Transfers.java +++ b/jdk/test/java/nio/channels/FileChannel/Transfers.java @@ -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 @@ -25,6 +25,7 @@ * @summary Comprehensive test for FileChannel.transfer{From,To} * @bug 4708120 * @author Mark Reinhold + * @run main/timeout=300 Transfers */ import java.io.*; diff --git a/jdk/test/java/nio/channels/Selector/ChangingInterests.java b/jdk/test/java/nio/channels/Selector/ChangingInterests.java index bd8ab27a1b5..c5164c42d9b 100644 --- a/jdk/test/java/nio/channels/Selector/ChangingInterests.java +++ b/jdk/test/java/nio/channels/Selector/ChangingInterests.java @@ -1,5 +1,5 @@ /* - * 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 @@ -51,12 +51,26 @@ public class ChangingInterests { return "(" + s + ")"; } - static void write1(SocketChannel peer) throws IOException { - peer.write(ByteBuffer.wrap(new byte[1])); - // give time for other end to be readable - try { - Thread.sleep(50); - } catch (InterruptedException ignore) { } + /** + * Writes two bytes to 'out' and reads one byte from 'in' so + * as to make 'in' readable. + */ + static void makeReadable(SocketChannel out, SocketChannel in) throws IOException { + out.write(ByteBuffer.wrap(new byte[2])); + ByteBuffer oneByte = ByteBuffer.wrap(new byte[1]); + do { + int n = in.read(oneByte); + if (n == 1) { + break; + } else if (n == 0) { + try { + Thread.sleep(50); + } catch (InterruptedException ignore) { } + } else { + throw new RuntimeException + ("Expected to read 0 or 1 byte; actual number was " + n); + } + } while (true); } static void drain(SocketChannel sc) throws IOException { @@ -147,7 +161,7 @@ public class ChangingInterests { sc.configureBlocking(false); // ensure that channel "sc" is readable - write1(peer); + makeReadable(peer, sc); try (Selector sel = Selector.open()) { SelectionKey key = sc.register(sel, 0); @@ -172,7 +186,7 @@ public class ChangingInterests { drain(sc); testForSpin(sel); System.out.println("Make channel readable again"); - write1(peer); + makeReadable(peer, sc); } System.out.println(); diff --git a/jdk/test/java/nio/channels/Selector/OutOfBand.java b/jdk/test/java/nio/channels/Selector/OutOfBand.java index 78322fafb92..e2d76b75b9f 100644 --- a/jdk/test/java/nio/channels/Selector/OutOfBand.java +++ b/jdk/test/java/nio/channels/Selector/OutOfBand.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -23,6 +23,9 @@ /* @test * @bug 6213702 + * @requires (os.family != "mac") | (os.version == "10.10.5") + * | (os.simpleVersion != "10.8" & os.simpleVersion != "10.9" + * & os.simpleVersion != "10.10") * @summary OOB data causes a SocketChannel, with OOBINLINE disabled, to be * selected */ diff --git a/jdk/test/java/nio/channels/Selector/SelectAndClose.java b/jdk/test/java/nio/channels/Selector/SelectAndClose.java index a545e945bc6..747afbedbae 100644 --- a/jdk/test/java/nio/channels/Selector/SelectAndClose.java +++ b/jdk/test/java/nio/channels/Selector/SelectAndClose.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -23,25 +23,27 @@ /* @test * @bug 5004077 - * @key intermittent * @summary Check blocking of select and close */ import java.nio.channels.*; import java.io.IOException; +import java.util.concurrent.CountDownLatch; public class SelectAndClose { static Selector selector; - static boolean awakened = false; - static boolean closed = false; + static volatile boolean awakened = false; + static volatile boolean closed = false; public static void main(String[] args) throws Exception { selector = Selector.open(); // Create and start a selector in a separate thread. + final CountDownLatch selectLatch = new CountDownLatch(1); new Thread(new Runnable() { public void run() { try { + selectLatch.countDown(); selector.select(); awakened = true; } catch (IOException e) { @@ -51,10 +53,11 @@ public class SelectAndClose { }).start(); // Wait for above thread to get to select() before we call close. - Thread.sleep(3000); + selectLatch.await(); + Thread.sleep(2000); // Try to close. This should wakeup select. - new Thread(new Runnable() { + Thread closeThread = new Thread(new Runnable() { public void run() { try { selector.close(); @@ -63,10 +66,11 @@ public class SelectAndClose { System.err.println(e); } } - }).start(); + }); + closeThread.start(); // Wait for select() to be awakened, which should be done by close. - Thread.sleep(3000); + closeThread.join(); if (!awakened) selector.wakeup(); diff --git a/jdk/test/java/nio/channels/Selector/SelectTimeout.java b/jdk/test/java/nio/channels/Selector/SelectTimeout.java index 797a36386ae..cc4de4bacf3 100644 --- a/jdk/test/java/nio/channels/Selector/SelectTimeout.java +++ b/jdk/test/java/nio/channels/Selector/SelectTimeout.java @@ -30,14 +30,13 @@ */ import java.io.IOException; import java.nio.channels.Selector; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; public class SelectTimeout { private static final long BIG_TIMEOUT = 100_000_001_000L; // 8165000 private static final long BIGGER_TIMEOUT = 850_000_000_000_000L; // 8172547 - private static final long SLEEP_MILLIS = 10000; - - private static volatile Exception theException; - private static volatile boolean isTimedOut; + private static final long SLEEP_MILLIS = 10_000; public static void main(String[] args) throws IOException, InterruptedException { @@ -59,17 +58,18 @@ public class SelectTimeout { private static boolean test(final long timeout) throws InterruptedException, IOException { - theException = null; + AtomicReference theException = + new AtomicReference<>(); + AtomicBoolean isTimedOut = new AtomicBoolean(); Selector selector = Selector.open(); Thread t = new Thread(() -> { try { - isTimedOut = false; selector.select(timeout); - isTimedOut = true; + isTimedOut.set(true); } catch (IOException ioe) { - theException = ioe; + theException.set(ioe); } }); t.start(); @@ -77,8 +77,8 @@ public class SelectTimeout { t.join(SLEEP_MILLIS); boolean result; - if (theException == null) { - if (timeout > SLEEP_MILLIS && isTimedOut) { + if (theException.get() == null) { + if (timeout > SLEEP_MILLIS && isTimedOut.get()) { System.err.printf("Test timed out early with timeout %d%n", timeout); result = false; @@ -88,11 +88,12 @@ public class SelectTimeout { } } else { System.err.printf("Test failed with timeout %d%n", timeout); - theException.printStackTrace(); + theException.get().printStackTrace(); result = false; } t.interrupt(); + selector.close(); return result; } diff --git a/jdk/test/java/nio/channels/Selector/SelectorLimit.java b/jdk/test/java/nio/channels/Selector/SelectorLimit.java index cc34a30de11..6b7fb485294 100644 --- a/jdk/test/java/nio/channels/Selector/SelectorLimit.java +++ b/jdk/test/java/nio/channels/Selector/SelectorLimit.java @@ -66,15 +66,6 @@ public class SelectorLimit { static final int MIN_KEYS = 100; public static void main(String[] args) throws Exception { - // win9X can't handle many connections at once - String osName = System.getProperty("os.name"); - if (osName.toLowerCase().startsWith("win")) { - if (!(osName.equals("Windows NT") - || osName.equals("Windows 2000") - || osName.equals("Windows XP"))) - return; - } - ServerSocketChannel ssc = ServerSocketChannel.open(); TestUtil.bind(ssc); Listener lth = new Listener(ssc); diff --git a/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java b/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java index f193634b3fc..92b1aef5c6d 100644 --- a/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java +++ b/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java @@ -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 @@ -26,8 +26,9 @@ * @summary Invoking wakeup on closed Selector can throw NPE if close resets interrupt status */ -import java.nio.channels.Selector; import java.io.IOException; +import java.nio.channels.ClosedSelectorException; +import java.nio.channels.Selector; public class WakeupAfterClose { @@ -40,6 +41,9 @@ public class WakeupAfterClose { sel.select(); } catch (IOException x) { x.printStackTrace(); + } catch (ClosedSelectorException y) { + System.err.println + ("Caught expected ClosedSelectorException"); } } }; diff --git a/jdk/test/java/nio/channels/SocketChannel/VectorIO.java b/jdk/test/java/nio/channels/SocketChannel/VectorIO.java index 4242be4dfa2..8f585afb21a 100644 --- a/jdk/test/java/nio/channels/SocketChannel/VectorIO.java +++ b/jdk/test/java/nio/channels/SocketChannel/VectorIO.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -22,8 +22,10 @@ */ /* @test - * @summary Test socketchannel vector IO - * @library .. + * @summary Test socketchannel vector IO (use -Dseed=X to set PRNG seed) + * @library .. /lib/testlibrary/ + * @build jdk.testlibrary.RandomFactory + * @run main VectorIO * @key randomness */ @@ -32,11 +34,11 @@ import java.net.*; import java.nio.*; import java.nio.channels.*; import java.util.*; - +import jdk.testlibrary.RandomFactory; public class VectorIO { - static Random generator = new Random(); + private static Random generator = RandomFactory.getRandom(); static int testSize; @@ -85,8 +87,11 @@ public class VectorIO { while (rem > 0L) { long bytesWritten = sc.write(bufs); if (bytesWritten == 0) { - if (sc.isBlocking()) + if (sc.isBlocking()) { throw new RuntimeException("write did not block"); + } else { + System.err.println("Non-blocking write() wrote zero bytes"); + } Thread.sleep(50); } else { rem -= bytesWritten; @@ -100,8 +105,6 @@ public class VectorIO { static class Server extends TestThread { - static Random generator = new Random(); - final int testSize; final ServerSocketChannel ssc; @@ -140,8 +143,10 @@ public class VectorIO { for (;;) { sc = ssc.accept(); - if (sc != null) + if (sc != null) { + System.err.println("accept() succeeded"); break; + } Thread.sleep(50); } @@ -154,8 +159,12 @@ public class VectorIO { if (bytesRead < 0) break; if (bytesRead == 0) { - if (sc.isBlocking()) + if (sc.isBlocking()) { throw new RuntimeException("read did not block"); + } else { + System.err.println + ("Non-blocking read() read zero bytes"); + } Thread.sleep(50); } avail -= bytesRead; diff --git a/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java b/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java index 3e48ace3274..368437a3803 100644 --- a/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java +++ b/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java @@ -1,5 +1,5 @@ /* - * 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 @@ -36,6 +36,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.Random; @@ -46,6 +47,9 @@ public class AdaptorCloseAndInterrupt { final DatagramChannel peer; final int port; + final AtomicBoolean isClosed = new AtomicBoolean(); + final AtomicBoolean isInterrupted = new AtomicBoolean(); + public AdaptorCloseAndInterrupt() { listener = null; peer = null; @@ -96,6 +100,7 @@ public class AdaptorCloseAndInterrupt { try { sc.socket().getInputStream().read(new byte[100]); + System.err.format("close() was invoked: %s%n", isClosed.get()); throw new RuntimeException("read should not have completed"); } catch (ClosedChannelException expected) {} @@ -119,7 +124,10 @@ public class AdaptorCloseAndInterrupt { sc.socket().getInputStream().read(new byte[100]); throw new RuntimeException("read should not have completed"); } catch (ClosedByInterruptException expected) { - Thread.currentThread().interrupted(); + System.out.format("interrupt() was invoked: %s%n", + isInterrupted.get()); + System.out.format("scReadAsyncInterrupt was interrupted: %s%n", + Thread.currentThread().interrupted()); } if (!sc.socket().isClosed()) @@ -140,6 +148,7 @@ public class AdaptorCloseAndInterrupt { try { dc.socket().receive(new DatagramPacket(new byte[100], 100)); + System.err.format("close() was invoked: %s%n", isClosed.get()); throw new RuntimeException("receive should not have completed"); } catch (ClosedChannelException expected) {} @@ -159,7 +168,16 @@ public class AdaptorCloseAndInterrupt { dc.socket().receive(new DatagramPacket(new byte[100], 100)); throw new RuntimeException("receive should not have completed"); } catch (ClosedByInterruptException expected) { - Thread.currentThread().interrupted(); + System.out.format("interrupt() was invoked: %s%n", + isInterrupted.get()); + System.out.format("dcReceiveAsyncInterrupt was interrupted: %s%n", + Thread.currentThread().interrupted()); + } catch (SocketTimeoutException unexpected) { + System.err.format("Receive thread interrupt invoked: %s%n", + isInterrupted.get()); + System.err.format("Receive thread was interrupted: %s%n", + Thread.currentThread().isInterrupted()); + throw unexpected; } if (!dc.socket().isClosed()) @@ -175,6 +193,7 @@ public class AdaptorCloseAndInterrupt { try { ssc.socket().accept(); + System.err.format("close() was invoked: %s%n", isClosed.get()); throw new RuntimeException("accept should not have completed"); } catch (ClosedChannelException expected) {} @@ -193,7 +212,10 @@ public class AdaptorCloseAndInterrupt { ssc.socket().accept(); throw new RuntimeException("accept should not have completed"); } catch (ClosedByInterruptException expected) { - Thread.currentThread().interrupted(); + System.out.format("interrupt() was invoked: %s%n", + isInterrupted.get()); + System.out.format("ssAcceptAsyncInterrupt was interrupted: %s%n", + Thread.currentThread().interrupted()); } if (!ssc.socket().isClosed()) @@ -204,6 +226,7 @@ public class AdaptorCloseAndInterrupt { AdaptorCloseAndInterrupt.pool.schedule(new Callable() { public Void call() throws Exception { sc.close(); + isClosed.set(true); return null; } }, new Random().nextInt(1000), TimeUnit.MILLISECONDS); @@ -214,6 +237,7 @@ public class AdaptorCloseAndInterrupt { AdaptorCloseAndInterrupt.pool.schedule(new Callable() { public Void call() throws Exception { current.interrupt(); + isInterrupted.set(true); return null; } }, new Random().nextInt(1000), TimeUnit.MILLISECONDS); diff --git a/jdk/test/java/nio/charset/Charset/CharsetContainmentTest.java b/jdk/test/java/nio/charset/Charset/CharsetContainmentTest.java index 42c25775576..a3983f22ac2 100644 --- a/jdk/test/java/nio/charset/Charset/CharsetContainmentTest.java +++ b/jdk/test/java/nio/charset/Charset/CharsetContainmentTest.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4626545 4696726 - @summary Checks the inter containment relationships between NIO charsets + * @bug 4626545 4696726 + * @summary Checks the inter containment relationships between NIO charsets + * @modules jdk.charsets */ import java.nio.charset.*; diff --git a/jdk/test/java/nio/charset/Charset/Contains.java b/jdk/test/java/nio/charset/Charset/Contains.java index ed785bfe123..30280983088 100644 --- a/jdk/test/java/nio/charset/Charset/Contains.java +++ b/jdk/test/java/nio/charset/Charset/Contains.java @@ -24,6 +24,7 @@ /* @test * @summary Unit test for charset containment * @bug 6798572 + * @modules jdk.charsets */ import java.nio.charset.*; diff --git a/jdk/test/java/nio/charset/Charset/NIOCharsetAvailabilityTest.java b/jdk/test/java/nio/charset/Charset/NIOCharsetAvailabilityTest.java index 601ca24faa9..73e70930f55 100644 --- a/jdk/test/java/nio/charset/Charset/NIOCharsetAvailabilityTest.java +++ b/jdk/test/java/nio/charset/Charset/NIOCharsetAvailabilityTest.java @@ -25,6 +25,7 @@ * @test * @bug 4777124 6920545 6911753 8073924 * @summary Verify that all Charset subclasses are available through the API + * @modules jdk.charsets */ import java.net.URI; diff --git a/jdk/test/java/nio/charset/Charset/RegisteredCharsets.java b/jdk/test/java/nio/charset/Charset/RegisteredCharsets.java index 4fd3dbb3228..c501eb852a5 100644 --- a/jdk/test/java/nio/charset/Charset/RegisteredCharsets.java +++ b/jdk/test/java/nio/charset/Charset/RegisteredCharsets.java @@ -25,6 +25,7 @@ * @bug 4473201 4696726 4652234 4482298 4784385 4966197 4267354 5015668 6911753 8071447 * @summary Check that registered charsets are actually registered + * @modules jdk.charsets */ import java.io.*; diff --git a/jdk/test/java/nio/charset/CharsetEncoder/Flush.java b/jdk/test/java/nio/charset/CharsetEncoder/Flush.java index 02aad13d302..89b26376ae4 100644 --- a/jdk/test/java/nio/charset/CharsetEncoder/Flush.java +++ b/jdk/test/java/nio/charset/CharsetEncoder/Flush.java @@ -24,6 +24,7 @@ /* @test * @bug 6227608 * @summary Test proper handling of flush() + * @modules jdk.charsets * @author Martin Buchholz */ diff --git a/jdk/test/java/nio/charset/RemovingSunIO/SunioAlias.java b/jdk/test/java/nio/charset/RemovingSunIO/SunioAlias.java index fe9c3598acf..07f20b87f05 100644 --- a/jdk/test/java/nio/charset/RemovingSunIO/SunioAlias.java +++ b/jdk/test/java/nio/charset/RemovingSunIO/SunioAlias.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4454622 - @summary Check if all supported sun.io encoding names are supported in nio.charset + * @bug 4454622 + * @summary Check if all supported sun.io encoding names are supported in nio.charset + * @modules jdk.charsets */ import java.util.HashMap; diff --git a/jdk/test/java/nio/charset/coders/Check.java b/jdk/test/java/nio/charset/coders/Check.java index 8f7781a49fd..4a1a3178aad 100644 --- a/jdk/test/java/nio/charset/coders/Check.java +++ b/jdk/test/java/nio/charset/coders/Check.java @@ -24,6 +24,7 @@ /* @test * @bug 4712786 * @summary Check charsets against reference files + * @modules jdk.charsets * * @build Util * @run main Check shift_jis ref.shift_jis diff --git a/jdk/test/java/nio/charset/coders/ResetISO2022JP.java b/jdk/test/java/nio/charset/coders/ResetISO2022JP.java index ba621aba795..a8947930f0f 100644 --- a/jdk/test/java/nio/charset/coders/ResetISO2022JP.java +++ b/jdk/test/java/nio/charset/coders/ResetISO2022JP.java @@ -22,9 +22,10 @@ */ /* @test - @bug 6226510 - @summary Check that ISO-2022-JP's encoder correctly resets to ASCII mode - @author Martin Buchholz + * @bug 6226510 + * @summary Check that ISO-2022-JP's encoder correctly resets to ASCII mode + * @modules jdk.charsets + * @author Martin Buchholz */ import java.nio.*; diff --git a/jdk/test/java/nio/file/FileStore/Basic.java b/jdk/test/java/nio/file/FileStore/Basic.java index 14479e3cc9b..c2b482d8fbd 100644 --- a/jdk/test/java/nio/file/FileStore/Basic.java +++ b/jdk/test/java/nio/file/FileStore/Basic.java @@ -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 @@ -24,8 +24,11 @@ /* @test * @bug 4313887 6873621 6979526 7006126 7020517 * @summary Unit test for java.nio.file.FileStore - * @library .. * @key intermittent + * @library .. + * @library .. /lib/testlibrary + * @build jdk.testlibrary.FileUtils + * @run main Basic */ import java.nio.file.*; @@ -33,6 +36,8 @@ import java.nio.file.attribute.*; import java.io.File; import java.io.IOException; import java.util.*; +import jdk.testlibrary.FileUtils; + public class Basic { @@ -110,31 +115,36 @@ public class Basic { /** * Test: Enumerate all FileStores */ - FileStore prev = null; - for (FileStore store: FileSystems.getDefault().getFileStores()) { - System.out.format("%s (name=%s type=%s)\n", store, store.name(), - store.type()); + if (FileUtils.areFileSystemsAccessible()) { + FileStore prev = null; + for (FileStore store: FileSystems.getDefault().getFileStores()) { + System.out.format("%s (name=%s type=%s)\n", store, store.name(), + store.type()); - // check space attributes are accessible - try { - store.getTotalSpace(); - store.getUnallocatedSpace(); - store.getUsableSpace(); - } catch (NoSuchFileException nsfe) { - // ignore exception as the store could have been - // deleted since the iterator was instantiated - System.err.format("%s was not found\n", store); - } catch (AccessDeniedException ade) { - // ignore exception as the lack of ability to access the - // store due to lack of file permission or similar does not - // reflect whether the space attributes would be accessible - // were access to be permitted - System.err.format("%s is inaccessible\n", store); + // check space attributes are accessible + try { + store.getTotalSpace(); + store.getUnallocatedSpace(); + store.getUsableSpace(); + } catch (NoSuchFileException nsfe) { + // ignore exception as the store could have been + // deleted since the iterator was instantiated + System.err.format("%s was not found\n", store); + } catch (AccessDeniedException ade) { + // ignore exception as the lack of ability to access the + // store due to lack of file permission or similar does not + // reflect whether the space attributes would be accessible + // were access to be permitted + System.err.format("%s is inaccessible\n", store); + } + + // two distinct FileStores should not be equal + assertTrue(!store.equals(prev)); + prev = store; } - - // two distinct FileStores should not be equal - assertTrue(!store.equals(prev)); - prev = store; + } else { + System.err.println + ("Skipping FileStore check due to file system access failure"); } } } diff --git a/jdk/test/java/nio/file/FileSystem/Basic.java b/jdk/test/java/nio/file/FileSystem/Basic.java index 4b02ff498e7..bc4c77b021b 100644 --- a/jdk/test/java/nio/file/FileSystem/Basic.java +++ b/jdk/test/java/nio/file/FileSystem/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, 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 @@ -30,10 +30,16 @@ */ import java.io.File; -import java.nio.file.*; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; +import java.nio.file.Files; +import java.nio.file.FileStore; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.ProviderNotFoundException; import java.util.HashMap; import jdk.testlibrary.FileUtils; @@ -47,6 +53,20 @@ public class Basic { throw new RuntimeException(msg); } + static void checkFileStores(FileSystem fs) throws IOException { + // sanity check method + if (FileUtils.areFileSystemsAccessible()) { + System.out.println("\n--- Begin FileStores ---"); + for (FileStore store: fs.getFileStores()) { + System.out.println(store); + } + System.out.println("--- EndFileStores ---\n"); + } else { + System.err.println + ("Skipping FileStore check due to file system access failure"); + } + } + static void checkSupported(FileSystem fs, String... views) { for (String view: views) { check(fs.supportedFileAttributeViews().contains(view), @@ -70,7 +90,9 @@ public class Basic { } } - public static void main(String[] args) throws IOException, URISyntaxException { + public static void main(String[] args) + throws IOException, URISyntaxException { + String os = System.getProperty("os.name"); FileSystem fs = FileSystems.getDefault(); // close should throw UOE @@ -85,15 +107,11 @@ public class Basic { check(fs.provider().getScheme().equals("file"), "should use 'file' scheme"); - // santity check method - need to re-visit this in future as I/O errors - // are possible - for (FileStore store: fs.getFileStores()) { - System.out.println(store); - } + // sanity check FileStores + checkFileStores(fs); // sanity check supportedFileAttributeViews checkSupported(fs, "basic"); - String os = System.getProperty("os.name"); if (os.equals("SunOS")) checkSupported(fs, "posix", "unix", "owner", "acl", "user"); if (os.equals("Linux")) diff --git a/jdk/test/java/nio/file/WatchService/DeleteInterference.java b/jdk/test/java/nio/file/WatchService/DeleteInterference.java index 459b17ecbc7..fc889ad873e 100644 --- a/jdk/test/java/nio/file/WatchService/DeleteInterference.java +++ b/jdk/test/java/nio/file/WatchService/DeleteInterference.java @@ -15,6 +15,10 @@ * 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. */ /** diff --git a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java index 042dfd94146..6990c1e8d89 100644 --- a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java +++ b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -23,22 +23,25 @@ /* @test * @bug 6907760 6929532 - * @summary Tests WatchService behavior when lots of events are pending + * @summary Tests WatchService behavior when lots of events are pending (use -Dseed=X to set PRNG seed) * @library .. + * @library /lib/testlibrary/ + * @build jdk.testlibrary.* * @run main/timeout=180 LotsOfEvents * @key randomness */ -import java.nio.file.*; -import static java.nio.file.StandardWatchEventKinds.*; import java.io.IOException; import java.io.OutputStream; +import java.nio.file.*; +import static java.nio.file.StandardWatchEventKinds.*; import java.util.*; import java.util.concurrent.TimeUnit; +import jdk.testlibrary.RandomFactory; public class LotsOfEvents { - static final Random rand = new Random(); + private static final Random RAND = RandomFactory.getRandom(); public static void main(String[] args) throws Exception { Path dir = TestUtil.createTemporaryDirectory(); @@ -70,7 +73,7 @@ public class LotsOfEvents { Thread.sleep(1000); // check that we see the create events (or overflow) - drainAndCheckOverflowEvents(watcher, ENTRY_CREATE, n); + drainAndCheckOverflowEvents(dir, watcher, ENTRY_CREATE, n); // delete the files for (int i=0; i expectedKind, int count) throws IOException, InterruptedException @@ -123,8 +127,25 @@ public class LotsOfEvents { } // check that all expected events were received or there was an overflow - if (nread < count && !gotOverflow) - throw new RuntimeException("Insufficient events"); + if (nread < count && !gotOverflow) { + System.err.printf("Test directory %s contains %d files%n", + dir, Files.list(dir).count()); + + long timeBeforePoll = System.nanoTime(); + key = watcher.poll(15, TimeUnit.SECONDS); + long timeAfterPoll = System.nanoTime(); + if (key == null) { + System.err.println("key still null after extra polling"); + } else { + List> events = key.pollEvents(); + System.err.printf("Retrieved key with %d events after %d ns%n", + events.size(), timeAfterPoll - timeBeforePoll); + } + + throw new RuntimeException("Insufficient " + + expectedKind.name() + " events: expected " + + count + ", received " + nread); + } } /** @@ -134,14 +155,14 @@ public class LotsOfEvents { throws IOException, InterruptedException { // this test uses a random number of files - final int nfiles = 5 + rand.nextInt(10); + final int nfiles = 5 + RAND.nextInt(10); DirectoryEntry[] entries = new DirectoryEntry[nfiles]; for (int i=0; i c = FileSystems.getDefault().provider().getClass(); - Class expected = Class.forName("TestProvider", false, - ClassLoader.getSystemClassLoader()); + private static String SET_DEFAULT_FSP = + "-Djava.nio.file.spi.DefaultFileSystemProvider=TestProvider"; - if (c != expected) - throw new RuntimeException(); + private static final ToolProvider JAR_TOOL = ToolProvider.findFirst("jar") + .orElseThrow(() -> + new RuntimeException("jar tool not found") + ); + + /** + * Test override of default FileSystemProvider with the main application + * on the class path. + */ + public void testClassPath() throws Exception { + String moduleClasses = moduleClasses(); + String testClasses = System.getProperty("test.classes"); + String classpath = moduleClasses + File.pathSeparator + testClasses; + int exitValue = exec(SET_DEFAULT_FSP, "-cp", classpath, "p.Main"); + assertTrue(exitValue == 0); + } + + /** + * Test override of default FileSystemProvider with the main application + * on the module path as an exploded module. + */ + public void testExplodedModule() throws Exception { + String modulePath = System.getProperty("jdk.module.path"); + int exitValue = exec(SET_DEFAULT_FSP, "-p", modulePath, "-m", "m/p.Main"); + assertTrue(exitValue == 0); + } + + /** + * Test override of default FileSystemProvider with the main application + * on the module path as a modular JAR. + */ + public void testModularJar() throws Exception { + String jarFile = createModularJar(); + int exitValue = exec(SET_DEFAULT_FSP, "-p", jarFile, "-m", "m/p.Main"); + assertTrue(exitValue == 0); + } + + /** + * Test override of default FileSystemProvider where the main application + * is a module that is patched by an exploded patch. + */ + public void testExplodedModuleWithExplodedPatch() throws Exception { + Path patchdir = Files.createTempDirectory("patch"); + String modulePath = System.getProperty("jdk.module.path"); + int exitValue = exec(SET_DEFAULT_FSP, + "--patch-module", "m=" + patchdir, + "-p", modulePath, + "-m", "m/p.Main"); + assertTrue(exitValue == 0); + } + + /** + * Test override of default FileSystemProvider where the main application + * is a module that is patched by an exploded patch. + */ + public void testExplodedModuleWithJarPatch() throws Exception { + Path patchdir = Files.createTempDirectory("patch"); + Files.createDirectory(patchdir.resolve("m.properties")); + Path patch = createJarFile(patchdir); + String modulePath = System.getProperty("jdk.module.path"); + int exitValue = exec(SET_DEFAULT_FSP, + "--patch-module", "m=" + patch, + "-p", modulePath, + "-m", "m/p.Main"); + assertTrue(exitValue == 0); + } + + /** + * Returns the directory containing the classes for module "m". + */ + private String moduleClasses() { + String mp = System.getProperty("jdk.module.path"); + for (String dir : mp.split(File.pathSeparator)) { + Path m = Paths.get(dir, "m"); + if (Files.exists(m)) return m.toString(); + } + assertFalse(true); + return null; + } + + /** + * Creates a modular JAR containing module "m". + */ + private String createModularJar() throws Exception { + Path dir = Paths.get(moduleClasses()); + Path jar = createJarFile(dir); + return jar.toString(); + } + + /** + * Creates a JAR file containing the entries in the given file tree. + */ + private Path createJarFile(Path dir) throws Exception { + Path jar = Files.createTempDirectory("tmp").resolve("m.jar"); + String[] args = { "--create", "--file=" + jar, "-C", dir.toString(), "." }; + int ret = JAR_TOOL.run(System.out, System.out, args); + assertTrue(ret == 0); + return jar; + } + + /** + * Invokes the java launcher with the given arguments, returning the exit code. + */ + private int exec(String... args) throws Exception { + return ProcessTools.executeTestJava(args) + .outputTo(System.out) + .errorTo(System.out) + .getExitValue(); } } diff --git a/jdk/test/java/nio/file/spi/TestProvider.java b/jdk/test/java/nio/file/spi/TestProvider.java index f0538e5067b..6832e86d20f 100644 --- a/jdk/test/java/nio/file/spi/TestProvider.java +++ b/jdk/test/java/nio/file/spi/TestProvider.java @@ -77,7 +77,7 @@ public class TestProvider extends FileSystemProvider { LinkOption... options) throws IOException { - throw new ReadOnlyFileSystemException(); + throw new RuntimeException("not implemented"); } @Override @@ -110,19 +110,20 @@ public class TestProvider extends FileSystemProvider { @Override public void delete(Path file) throws IOException { - throw new ReadOnlyFileSystemException(); + Path delegate = theFileSystem.unwrap(file); + defaultProvider.delete(delegate); } @Override public void createSymbolicLink(Path link, Path target, FileAttribute... attrs) throws IOException { - throw new ReadOnlyFileSystemException(); + throw new RuntimeException("not implemented"); } @Override public void createLink(Path link, Path existing) throws IOException { - throw new ReadOnlyFileSystemException(); + throw new RuntimeException("not implemented"); } @Override @@ -136,14 +137,14 @@ public class TestProvider extends FileSystemProvider { public void copy(Path source, Path target, CopyOption... options) throws IOException { - throw new ReadOnlyFileSystemException(); + throw new RuntimeException("not implemented"); } @Override public void move(Path source, Path target, CopyOption... options) throws IOException { - throw new ReadOnlyFileSystemException(); + throw new RuntimeException("not implemented"); } @Override @@ -158,7 +159,8 @@ public class TestProvider extends FileSystemProvider { public void createDirectory(Path dir, FileAttribute... attrs) throws IOException { - throw new ReadOnlyFileSystemException(); + Path delegate = theFileSystem.unwrap(dir); + defaultProvider.createDirectory(delegate, attrs); } @Override @@ -167,13 +169,8 @@ public class TestProvider extends FileSystemProvider { FileAttribute... attrs) throws IOException { - if (options.contains(StandardOpenOption.READ) && options.size() == 1) { - Path delegate = theFileSystem.unwrap(file); - options = Collections.singleton(StandardOpenOption.READ); - return defaultProvider.newByteChannel(delegate, options, attrs); - } - - throw new RuntimeException("not implemented"); + Path delegate = theFileSystem.unwrap(file); + return defaultProvider.newByteChannel(delegate, options, attrs); } @Override @@ -236,7 +233,7 @@ public class TestProvider extends FileSystemProvider { @Override public boolean isReadOnly() { - return true; + return false; } @Override @@ -419,7 +416,7 @@ public class TestProvider extends FileSystemProvider { @Override public File toFile() { - return delegate.toFile(); + return new File(toString()); } @Override diff --git a/jdk/test/java/nio/file/spi/m/module-info.java b/jdk/test/java/nio/file/spi/m/module-info.java new file mode 100644 index 00000000000..84480470711 --- /dev/null +++ b/jdk/test/java/nio/file/spi/m/module-info.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module m { +} diff --git a/jdk/test/java/nio/file/spi/m/p/Main.java b/jdk/test/java/nio/file/spi/m/p/Main.java new file mode 100644 index 00000000000..4704c679021 --- /dev/null +++ b/jdk/test/java/nio/file/spi/m/p/Main.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p; + +import java.io.File; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; + +/** + * Launched by SetDefaultProvider to test startup with the default file system + * provider overridden. + */ + +public class Main { + public static void main(String[] args) throws Exception { + FileSystem fs = FileSystems.getDefault(); + if (fs.getClass().getModule() == Object.class.getModule()) + throw new RuntimeException("FileSystemProvider not overridden"); + + // exercise the file system + Path dir = Files.createTempDirectory("tmp"); + if (dir.getFileSystem() != fs) + throw new RuntimeException("'dir' not in default file system"); + System.out.println("created: " + dir); + + Path foo = Files.createFile(dir.resolve("foo")); + if (foo.getFileSystem() != fs) + throw new RuntimeException("'foo' not in default file system"); + System.out.println("created: " + foo); + + // exercise interop with java.io.File + File file = foo.toFile(); + Path path = file.toPath(); + if (path.getFileSystem() != fs) + throw new RuntimeException("'path' not in default file system"); + if (!path.equals(foo)) + throw new RuntimeException(path + " not equal to " + foo); + } +} diff --git a/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java b/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java index e29e24aea8a..2d5562fed61 100644 --- a/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java +++ b/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -21,24 +21,18 @@ * questions. */ -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.ObjectOutputStream; import java.io.Serializable; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; +import java.rmi.AlreadyBoundException; import java.rmi.MarshalledObject; import java.rmi.NotBoundException; import java.rmi.Remote; import java.rmi.RemoteException; -import java.rmi.AlreadyBoundException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; -import java.util.Objects; import java.security.Security; +import java.util.Objects; import org.testng.Assert; import org.testng.TestNG; @@ -57,7 +51,8 @@ import org.testng.annotations.Test; * @summary Test filters for the RMI Registry * @run testng/othervm RegistryFilterTest * @run testng/othervm - * -Dsun.rmi.registry.registryFilter=!java.lang.Long;!RegistryFilterTest$RejectableClass + * -Dsun.rmi.registry.registryFilter=!java.lang.Long;!RegistryFilterTest$RejectableClass;maxdepth=19 + * -Dtest.maxdepth=19 * RegistryFilterTest * @run testng/othervm/policy=security.policy * -Djava.security.properties=${test.src}/java.security-extra1 @@ -68,6 +63,8 @@ public class RegistryFilterTest { private static int port; private static Registry registry; + static final int REGISTRY_MAX_DEPTH = 20; + static final int REGISTRY_MAX_ARRAY = 10000; static final String registryFilter = @@ -125,7 +122,7 @@ public class RegistryFilterTest { /* - * Test registry rejects an object with the max array size + 1. + * Test registry rejects an object with the max array size + 1. */ @Test(dataProvider="bindData") public void simpleBind(String name, Remote obj, boolean blacklisted) throws RemoteException, AlreadyBoundException, NotBoundException { @@ -139,9 +136,9 @@ public class RegistryFilterTest { } /* - * Test registry rejects an object with a well known class - * if blacklisted in the security properties. - */ + * Test registry rejects an object with a well known class + * if blacklisted in the security properties. + */ @Test public void simpleRejectableClass() throws RemoteException, AlreadyBoundException, NotBoundException { RejectableClass r1 = null; @@ -150,9 +147,46 @@ public class RegistryFilterTest { r1 = new RejectableClass(); registry.bind(name, r1); registry.unbind(name); - Assert.assertNull(registryFilter, "Registry filter should not have rejected"); + Assert.assertNull(registryFilter, "Registry filter should have rejected"); } catch (Exception rex) { - Assert.assertNotNull(registryFilter, "Registry filter should have rejected"); + Assert.assertNotNull(registryFilter, "Registry filter should not have rejected"); + } + } + + /* + * Test registry does not reject an object with depth at the built-in limit. + */ + @Test + public void simpleDepthBuiltinNonRejectable() throws RemoteException, AlreadyBoundException, NotBoundException { + int depthOverride = Integer.getInteger("test.maxdepth", REGISTRY_MAX_DEPTH); + depthOverride = Math.min(depthOverride, REGISTRY_MAX_DEPTH); + System.out.printf("overrideDepth: %d, filter: %s%n", depthOverride, registryFilter); + try { + String name = "reject2"; + DepthRejectableClass r1 = DepthRejectableClass.create(depthOverride); + registry.bind(name, r1); + registry.unbind(name); + } catch (Exception rex) { + Assert.fail("Registry filter should not have rejected depth: " + + depthOverride); + } + } + + /* + * Test registry rejects an object with depth at the limit + 1. + */ + @Test + public void simpleDepthRejectable() throws RemoteException, AlreadyBoundException, NotBoundException { + int depthOverride = Integer.getInteger("test.maxdepth", REGISTRY_MAX_DEPTH); + depthOverride = Math.min(depthOverride, REGISTRY_MAX_DEPTH); + System.out.printf("overrideDepth: %d, filter: %s%n", depthOverride, registryFilter); + try { + String name = "reject3"; + DepthRejectableClass r1 = DepthRejectableClass.create(depthOverride + 1); + registry.bind(name, r1); + Assert.fail("Registry filter should have rejected depth: " + depthOverride + 1); + } catch (Exception rex) { + // Rejection expected } } @@ -173,6 +207,7 @@ public class RegistryFilterTest { return super.toString() + "//" + Objects.toString(obj); } } + /** * A simple Serializable Remote object that is passed by value. * It and its contents are checked by the Registry serial filter. @@ -183,4 +218,25 @@ public class RegistryFilterTest { RejectableClass() {} } + /** + * A simple Serializable Remote object that is passed by value. + * It and its contents are checked by the Registry serial filter. + */ + static class DepthRejectableClass implements Serializable, Remote { + private static final long serialVersionUID = 362498820763181264L; + private final DepthRejectableClass next; + + private DepthRejectableClass(DepthRejectableClass next) { + this.next = next; + } + + static DepthRejectableClass create(int depth) { + DepthRejectableClass next = new DepthRejectableClass(null); + for (int i = 1; i < depth; i++) { + next = new DepthRejectableClass(next); + } + return next; + } + } + } diff --git a/jdk/test/java/security/AccessController/LimitedDoPrivilegedWithNullPerms.java b/jdk/test/java/security/AccessController/LimitedDoPrivilegedWithNullPerms.java index 13b2db47c0f..b42d88da335 100644 --- a/jdk/test/java/security/AccessController/LimitedDoPrivilegedWithNullPerms.java +++ b/jdk/test/java/security/AccessController/LimitedDoPrivilegedWithNullPerms.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013,2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/java/security/AccessController/LimitedDoPrivilegedWithThread.java b/jdk/test/java/security/AccessController/LimitedDoPrivilegedWithThread.java index 955f39d86fb..2995893e1a3 100644 --- a/jdk/test/java/security/AccessController/LimitedDoPrivilegedWithThread.java +++ b/jdk/test/java/security/AccessController/LimitedDoPrivilegedWithThread.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013,2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/java/security/Provider/DefaultProviderList.java b/jdk/test/java/security/Provider/DefaultProviderList.java index 4aaeffeeacf..9a015b0b340 100644 --- a/jdk/test/java/security/Provider/DefaultProviderList.java +++ b/jdk/test/java/security/Provider/DefaultProviderList.java @@ -33,7 +33,6 @@ import java.security.Security; import java.util.Arrays; import java.util.Iterator; import java.util.ServiceLoader; -import java.lang.reflect.Module; public class DefaultProviderList { diff --git a/jdk/test/java/security/SignedObject/Chain.java b/jdk/test/java/security/SignedObject/Chain.java index 13939996edb..65e1ebbd7f3 100644 --- a/jdk/test/java/security/SignedObject/Chain.java +++ b/jdk/test/java/security/SignedObject/Chain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -33,7 +33,6 @@ import java.util.Arrays; /* * @test * @bug 8050374 - * @key intermittent * @summary Verify a chain of signed objects */ public class Chain { @@ -137,8 +136,17 @@ public class Chain { PrivateKey[] privKeys = new PrivateKey[N]; PublicKey[] pubKeys = new PublicKey[N]; PublicKey[] anotherPubKeys = new PublicKey[N]; - KeyPairGenerator kpg = KeyPairGenerator.getInstance( - test.keyAlg.name); + Signature signature; + KeyPairGenerator kpg; + if (test.provider != Provider.Default) { + signature = Signature.getInstance(test.sigAlg.name, + test.provider.name); + kpg = KeyPairGenerator.getInstance( + test.keyAlg.name, test.provider.name); + } else { + signature = Signature.getInstance(test.sigAlg.name); + kpg = KeyPairGenerator.getInstance(test.keyAlg.name); + } for (int j=0; j < N; j++) { KeyPair kp = kpg.genKeyPair(); KeyPair anotherKp = kpg.genKeyPair(); @@ -154,14 +162,6 @@ public class Chain { } } - Signature signature; - if (test.provider != Provider.Default) { - signature = Signature.getInstance(test.sigAlg.name, - test.provider.name); - } else { - signature = Signature.getInstance(test.sigAlg.name); - } - // Create a chain of signed objects SignedObject[] objects = new SignedObject[N]; objects[0] = new SignedObject(str, privKeys[0], signature); diff --git a/jdk/test/java/security/modules/ModularTest.java b/jdk/test/java/security/modules/ModularTest.java index 9e67094944f..56635c99b8d 100644 --- a/jdk/test/java/security/modules/ModularTest.java +++ b/jdk/test/java/security/modules/ModularTest.java @@ -164,9 +164,9 @@ public abstract class ModularTest { final Builder builder; if (moduleType == MODULE_TYPE.EXPLICIT) { System.out.format(" %nGenerating ModuleDescriptor object"); - builder = ModuleDescriptor.module(moduleName).exports(pkg); + builder = ModuleDescriptor.newModule(moduleName).exports(pkg); if (isService && serviceInterface != null && serviceImpl != null) { - builder.provides(serviceInterface, serviceImpl); + builder.provides(serviceInterface, List.of(serviceImpl)); } else { if (serviceInterface != null) { builder.uses(serviceInterface); diff --git a/jdk/test/java/security/testlibrary/Proc.java b/jdk/test/java/security/testlibrary/Proc.java index 7248757e0cd..dc1f9e7aea4 100644 --- a/jdk/test/java/security/testlibrary/Proc.java +++ b/jdk/test/java/security/testlibrary/Proc.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -176,6 +176,14 @@ public class Proc { prop.put(a, b); return this; } + // Inherit the value of a system property + public Proc inheritProp(String k) { + String v = System.getProperty(k); + if (v != null) { + prop.put(k, v); + } + return this; + } // Sets classpath. If not called, Proc will choose a classpath. If called // with no arg, no classpath will be used. Can be called multiple times. public Proc cp(String... s) { diff --git a/jdk/test/java/sql/driverModuleTests/DriverManagerModuleTests.java b/jdk/test/java/sql/driverModuleTests/DriverManagerModuleTests.java new file mode 100644 index 00000000000..aad39cdb1dd --- /dev/null +++ b/jdk/test/java/sql/driverModuleTests/DriverManagerModuleTests.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.sql.Connection; +import java.sql.Driver; +import java.sql.DriverManager; +import java.sql.SQLException; +import static org.testng.Assert.*; +import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +/* + * @test + * @library /java/sql/modules + * @build luckydogdriver/* mystubdriver/* + * @run testng/othervm DriverManagerModuleTests + * @summary Tests that a JDBC Driver that is a module can be loaded + * via the service-provider loading mechanism. + */ +public class DriverManagerModuleTests { + + private final String LUCKYDOGDRIVER_URL = "jdbc:tennis:myDB"; + private static final String STUBDRIVERURL = "jdbc:stub:myDB"; + private static final String CONNECTION_CLASS_NAME = "com.luckydogtennis.StubConnection"; + + @BeforeClass + public static void setUpClass() throws Exception { + } + + @AfterClass + public static void tearDownClass() throws Exception { + } + + @BeforeMethod + public void setUpMethod() throws Exception { + } + + @AfterMethod + public void tearDownMethod() throws Exception { + } + + /** + * Validate JDBC drivers as modules will be accessible. One driver will be + * loaded and registered via the service-provider loading mechanism. The + * other driver will need to be explictly loaded + * + * @throws java.lang.Exception + */ + @Test + public void test() throws Exception { + System.out.println("\n$$$ runing Test()\n"); + dumpRegisteredDrivers(); + Driver d = DriverManager.getDriver(STUBDRIVERURL); + assertNotNull(d, "StubDriver should not be null"); + assertTrue(isDriverRegistered(d)); + Driver d2 = null; + + // This driver should not be found until it is explictly loaded + try { + d2 = DriverManager.getDriver(LUCKYDOGDRIVER_URL); + } catch (SQLException e) { + // ignore expected Exception + } + assertNull(d2, "LuckyDogDriver should be null"); + loadDriver(); + d2 = DriverManager.getDriver(LUCKYDOGDRIVER_URL); + assertNotNull(d2, "LuckyDogDriver should not be null"); + assertTrue(isDriverRegistered(d2), "Driver was NOT registered"); + + dumpRegisteredDrivers(); + DriverManager.deregisterDriver(d2); + assertFalse(isDriverRegistered(d2), "Driver IS STILL registered"); + dumpRegisteredDrivers(); + + } + + /** + * Validate that a Connection can be obtained from a JDBC driver which is a + * module and loaded via the service-provider loading mechanism. + * + * @throws java.lang.Exception + */ + @Test + public void test00() throws Exception { + System.out.println("\n$$$ runing Test00()\n"); + Connection con = DriverManager.getConnection(STUBDRIVERURL); + assertNotNull(con, "Returned Connection should not be NULL"); + System.out.println("con=" + con.getClass().getName()); + assertTrue(con.getClass().getName().equals(CONNECTION_CLASS_NAME)); + + } + + /** + * Utility method to see if a driver is registered + */ + private static void dumpRegisteredDrivers() { + System.out.println("\n+++ Loaded Drivers +++"); + + DriverManager.drivers().forEach(d -> System.out.println("\t\t### Driver:" + d)); + + System.out.println("++++++++++++++++++++++++"); + } + + /** + * Utility method to load the LuckyDogDriver + */ + private static void loadDriver() { + try { + Class.forName("luckydogtennis.LuckyDogDriver"); + } catch (ClassNotFoundException ex) { + System.out.println("**** Error: luckydogtennis.LuckyDogDriver not found"); + } + System.out.println("Driver Loaded"); + } + + /** + * Utility method to see if a driver is registered + */ + private static boolean isDriverRegistered(Driver d) { + return DriverManager.drivers().filter(driver-> driver == d).findFirst().isPresent(); + + } +} diff --git a/jdk/test/java/sql/modules/luckydogdriver/luckydogtennis/LuckyDogDriver.java b/jdk/test/java/sql/modules/luckydogdriver/luckydogtennis/LuckyDogDriver.java new file mode 100644 index 00000000000..39f69133035 --- /dev/null +++ b/jdk/test/java/sql/modules/luckydogdriver/luckydogtennis/LuckyDogDriver.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package luckydogtennis; + +import java.sql.Connection; +import java.sql.Driver; +import java.sql.DriverManager; +import java.sql.DriverPropertyInfo; +import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; + +public class LuckyDogDriver implements Driver { + + static { + registerDriver(); + System.out.println("*****in static block LuckyDogDriver"); + } + + private static void registerDriver() { + try { + DriverManager.registerDriver(new LuckyDogDriver()); + } catch (SQLException ex) { + Logger.getLogger(LuckyDogDriver.class.getName()).log(Level.SEVERE, null, ex); + } + } + + public LuckyDogDriver() { + System.out.println("*****in LuckyDogDriver Constructor"); + } + + @Override + public Connection connect(String url, Properties info) throws SQLException { + if (acceptsURL(url)) { + return new StubConnection(); + } + return null; + } + + @Override + public boolean acceptsURL(String url) throws SQLException { + return url.matches("^jdbc:tennis:.*"); + } + + @Override + public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMajorVersion() { + return 1; + } + + @Override + public int getMinorVersion() { + return 0; + } + + @Override + public boolean jdbcCompliant() { + return true; + } + + @Override + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + throw new UnsupportedOperationException("Not supported yet."); + } +} diff --git a/jdk/test/java/sql/modules/luckydogdriver/luckydogtennis/StubConnection.java b/jdk/test/java/sql/modules/luckydogdriver/luckydogtennis/StubConnection.java new file mode 100644 index 00000000000..3faece2ca33 --- /dev/null +++ b/jdk/test/java/sql/modules/luckydogdriver/luckydogtennis/StubConnection.java @@ -0,0 +1,315 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package luckydogtennis; + +import java.sql.Array; +import java.sql.Blob; +import java.sql.CallableStatement; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.NClob; +import java.sql.PreparedStatement; +import java.sql.SQLClientInfoException; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Savepoint; +import java.sql.Statement; +import java.sql.Struct; +import java.util.Map; +import java.util.Properties; +import java.util.concurrent.Executor; + +public class StubConnection implements Connection{ + + @Override + public Statement createStatement() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CallableStatement prepareCall(String sql) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String nativeSQL(String sql) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAutoCommit(boolean autoCommit) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getAutoCommit() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void commit() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void close() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isClosed() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public DatabaseMetaData getMetaData() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setReadOnly(boolean readOnly) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isReadOnly() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCatalog(String catalog) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCatalog() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTransactionIsolation(int level) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getTransactionIsolation() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLWarning getWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Map> getTypeMap() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTypeMap(Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setHoldability(int holdability) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getHoldability() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Savepoint setSavepoint() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Savepoint setSavepoint(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback(Savepoint savepoint) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void releaseSavepoint(Savepoint savepoint) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob createClob() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob createBlob() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob createNClob() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML createSQLXML() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isValid(int timeout) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClientInfo(String name, String value) throws SQLClientInfoException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClientInfo(Properties properties) throws SQLClientInfoException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getClientInfo(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Properties getClientInfo() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array createArrayOf(String typeName, Object[] elements) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Struct createStruct(String typeName, Object[] attributes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSchema(String schema) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getSchema() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void abort(Executor executor) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getNetworkTimeout() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } +} diff --git a/jdk/test/java/sql/modules/luckydogdriver/module-info.java b/jdk/test/java/sql/modules/luckydogdriver/module-info.java new file mode 100644 index 00000000000..5f98bc3ecd1 --- /dev/null +++ b/jdk/test/java/sql/modules/luckydogdriver/module-info.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module luckydogdriver { + requires transitive java.logging; + requires transitive java.sql; + exports luckydogtennis; +} diff --git a/jdk/test/java/sql/modules/mystubdriver/com/luckydogtennis/StubConnection.java b/jdk/test/java/sql/modules/mystubdriver/com/luckydogtennis/StubConnection.java new file mode 100644 index 00000000000..16971149b4d --- /dev/null +++ b/jdk/test/java/sql/modules/mystubdriver/com/luckydogtennis/StubConnection.java @@ -0,0 +1,315 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.luckydogtennis; + +import java.sql.Array; +import java.sql.Blob; +import java.sql.CallableStatement; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.NClob; +import java.sql.PreparedStatement; +import java.sql.SQLClientInfoException; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Savepoint; +import java.sql.Statement; +import java.sql.Struct; +import java.util.Map; +import java.util.Properties; +import java.util.concurrent.Executor; + +public class StubConnection implements Connection{ + + @Override + public Statement createStatement() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CallableStatement prepareCall(String sql) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String nativeSQL(String sql) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setAutoCommit(boolean autoCommit) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getAutoCommit() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void commit() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void close() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isClosed() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public DatabaseMetaData getMetaData() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setReadOnly(boolean readOnly) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isReadOnly() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCatalog(String catalog) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getCatalog() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTransactionIsolation(int level) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getTransactionIsolation() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLWarning getWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearWarnings() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Map> getTypeMap() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTypeMap(Map> map) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setHoldability(int holdability) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getHoldability() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Savepoint setSavepoint() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Savepoint setSavepoint(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void rollback(Savepoint savepoint) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void releaseSavepoint(Savepoint savepoint) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Clob createClob() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Blob createBlob() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NClob createNClob() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public SQLXML createSQLXML() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isValid(int timeout) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClientInfo(String name, String value) throws SQLClientInfoException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setClientInfo(Properties properties) throws SQLClientInfoException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getClientInfo(String name) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Properties getClientInfo() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Array createArrayOf(String typeName, Object[] elements) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Struct createStruct(String typeName, Object[] attributes) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSchema(String schema) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getSchema() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void abort(Executor executor) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getNetworkTimeout() throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } +} diff --git a/jdk/test/java/sql/modules/mystubdriver/com/luckydogtennis/StubDriver.java b/jdk/test/java/sql/modules/mystubdriver/com/luckydogtennis/StubDriver.java new file mode 100644 index 00000000000..d080deefbf2 --- /dev/null +++ b/jdk/test/java/sql/modules/mystubdriver/com/luckydogtennis/StubDriver.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.luckydogtennis; + +import java.sql.Connection; +import java.sql.Driver; +import java.sql.DriverManager; +import java.sql.DriverPropertyInfo; +import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; + +public class StubDriver implements Driver { + + static { + System.out.println("*****in static block StubDriver"); + registerDriver(); + } + + private static void registerDriver() { + try { + DriverManager.registerDriver(new StubDriver()); + } catch (SQLException ex) { + Logger.getLogger(StubDriver.class.getName()).log(Level.SEVERE, null, ex); + } + } + + public StubDriver() { + System.out.println("*****in StubDriver Constructor*************"); + /* + for (StackTraceElement ste : Thread.currentThread().getStackTrace()) { + System.out.println(ste); + } + System.out.println("******************"); + */ + } + + @Override + public Connection connect(String url, Properties info) throws SQLException { + if (acceptsURL(url)) { + return new StubConnection(); + } + return null; + } + + @Override + public boolean acceptsURL(String url) throws SQLException { + return url.matches("^jdbc:stub:.*"); + } + + @Override + public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getMajorVersion() { + return 1; + } + + @Override + public int getMinorVersion() { + return 0; + } + + @Override + public boolean jdbcCompliant() { + return true; + } + + @Override + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + throw new UnsupportedOperationException("Not supported yet."); + } +} diff --git a/jdk/test/java/sql/modules/mystubdriver/module-info.java b/jdk/test/java/sql/modules/mystubdriver/module-info.java new file mode 100644 index 00000000000..ce15e831130 --- /dev/null +++ b/jdk/test/java/sql/modules/mystubdriver/module-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module mystubdriver { + requires transitive java.logging; + requires transitive java.sql; + exports com.luckydogtennis; + provides java.sql.Driver with + com.luckydogtennis.StubDriver; +} diff --git a/jdk/test/java/time/TEST.properties b/jdk/test/java/time/TEST.properties deleted file mode 100644 index f522b84681a..00000000000 --- a/jdk/test/java/time/TEST.properties +++ /dev/null @@ -1,6 +0,0 @@ -# Threeten test uses TestNG -TestNG.dirs = . -othervm.dirs = tck/java/time/chrono test/java/time/chrono test/java/time/format -lib.dirs = ../../lib/testlibrary -lib.build = jdk.testlibrary.RandomFactory -modules = java.base/java.time:open java.base/java.time.chrono:open java.base/java.time.zone:open diff --git a/jdk/test/java/time/nontestng/java/time/chrono/Bug8178823.java b/jdk/test/java/time/nontestng/java/time/chrono/Bug8178823.java new file mode 100644 index 00000000000..d8449315993 --- /dev/null +++ b/jdk/test/java/time/nontestng/java/time/chrono/Bug8178823.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package nontestng.java.time.chrono; + +import java.time.chrono.HijrahChronology; + +/* @test + * @bug 8178823 + * @build Bug8178823 + * @run main/othervm/policy=bug8178823.policy -Djava.security.manager nontestng.java.time.chrono.Bug8178823 + * @summary Test Hijrah calendar is initialized with the security manager. + */ +public class Bug8178823 { + public static void main(String[] args) { + HijrahChronology.INSTANCE.isLeapYear(2017); + } +} diff --git a/jdk/test/java/time/nontestng/java/time/chrono/bug8178823.policy b/jdk/test/java/time/nontestng/java/time/chrono/bug8178823.policy new file mode 100644 index 00000000000..48cec7fb71a --- /dev/null +++ b/jdk/test/java/time/nontestng/java/time/chrono/bug8178823.policy @@ -0,0 +1 @@ +// Empty policy file for Bug8178823 diff --git a/jdk/test/java/time/tck/TEST.properties b/jdk/test/java/time/tck/TEST.properties new file mode 100644 index 00000000000..2374566eefb --- /dev/null +++ b/jdk/test/java/time/tck/TEST.properties @@ -0,0 +1,5 @@ +# java.time tests use TestNG +TestNG.dirs = .. +othervm.dirs = java/time/chrono +lib.dirs = ../../../lib/testlibrary +lib.build = jdk.testlibrary.RandomFactory diff --git a/jdk/test/java/time/tck/java/time/AbstractTCKTest.java b/jdk/test/java/time/tck/java/time/AbstractTCKTest.java index d96011469a5..6272ea723cb 100644 --- a/jdk/test/java/time/tck/java/time/AbstractTCKTest.java +++ b/jdk/test/java/time/tck/java/time/AbstractTCKTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -69,14 +69,35 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.ObjectStreamConstants; import java.io.Serializable; -import java.lang.reflect.Field; import java.util.Formatter; +import java.util.Map; /** * Base test class. */ public abstract class AbstractTCKTest { + /** + * Map from package name to the serialVersionUID of the .Ser class for the package. + */ + private static Map serialVersionUIDs = Map.of( + "java.time", -7683839454370182990L, + "java.time.chrono", -6103370247208168577L, + "java.time.zone", -8885321777449118786L + ); + + /** + * Returns the serialVersionUID for the class. + * The SUIDs are defined by the specification for each class. + * @param serClass the class to return the SUID of + * @return returns the serialVersionUID for the class + */ + public final static long getSUID(Class serClass) { + String pkgName = serClass.getPackageName(); + return serialVersionUIDs.get(pkgName); + } + + protected static boolean isIsoLeap(long year) { if (year % 4 != 0) { return false; @@ -111,10 +132,8 @@ public abstract class AbstractTCKTest { protected static void assertSerializedBySer(Object object, byte[] expectedBytes, byte[]... matches) throws Exception { String serClass = object.getClass().getPackage().getName() + ".Ser"; - Class serCls = Class.forName(serClass); - Field field = serCls.getDeclaredField("serialVersionUID"); - field.setAccessible(true); - long serVer = (Long) field.get(null); + long serVer = getSUID(object.getClass()); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (ObjectOutputStream oos = new ObjectOutputStream(baos) ) { oos.writeObject(object); @@ -172,9 +191,8 @@ public abstract class AbstractTCKTest { * @throws Exception if an unexpected condition occurs */ protected static void assertNotSerializable(Class serClass) throws Exception { - Field field = serClass.getDeclaredField("serialVersionUID"); - field.setAccessible(true); - long serVer = (Long) field.get(null); + long serVer = getSUID(serClass); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (DataOutputStream out = new DataOutputStream(baos)) { out.writeShort(ObjectStreamConstants.STREAM_MAGIC); @@ -201,7 +219,6 @@ public abstract class AbstractTCKTest { fail("Class should not be deserializable " + serClass.getName()); } - /** * Utility method to dump a byte array in a java syntax. * @param bytes and array of bytes diff --git a/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java b/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java index 991b447a506..1234083e297 100644 --- a/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java +++ b/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 @@ -104,8 +104,6 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; import java.time.Clock; import java.time.DateTimeException; import java.time.Duration; @@ -470,24 +468,12 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- @Test(expectedExceptions=NullPointerException.class) public void constructor_nullTime() throws Throwable { - Constructor con = OffsetDateTime.class.getDeclaredConstructor(LocalDateTime.class, ZoneOffset.class); - con.setAccessible(true); - try { - con.newInstance(null, OFFSET_PONE); - } catch (InvocationTargetException ex) { - throw ex.getCause(); - } + OffsetDateTime.of(null, OFFSET_PONE); } @Test(expectedExceptions=NullPointerException.class) public void constructor_nullOffset() throws Throwable { - Constructor con = OffsetDateTime.class.getDeclaredConstructor(LocalDateTime.class, ZoneOffset.class); - con.setAccessible(true); - try { - con.newInstance(LocalDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30)), null); - } catch (InvocationTargetException ex) { - throw ex.getCause(); - } + OffsetDateTime.of(LocalDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30)), null); } //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/tck/java/time/TCKOffsetTime.java b/jdk/test/java/time/tck/java/time/TCKOffsetTime.java index 016cfc3e9d8..738bb86c2f4 100644 --- a/jdk/test/java/time/tck/java/time/TCKOffsetTime.java +++ b/jdk/test/java/time/tck/java/time/TCKOffsetTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 @@ -89,8 +89,6 @@ import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; import java.time.Clock; import java.time.DateTimeException; import java.time.Instant; @@ -465,28 +463,16 @@ public class TCKOffsetTime extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - // constructor + // constructor via factory //----------------------------------------------------------------------- @Test(expectedExceptions=NullPointerException.class) public void constructor_nullTime() throws Throwable { - Constructor con = OffsetTime.class.getDeclaredConstructor(LocalTime.class, ZoneOffset.class); - con.setAccessible(true); - try { - con.newInstance(null, OFFSET_PONE); - } catch (InvocationTargetException ex) { - throw ex.getCause(); - } + OffsetTime.of(null, OFFSET_PONE); } @Test(expectedExceptions=NullPointerException.class) public void constructor_nullOffset() throws Throwable { - Constructor con = OffsetTime.class.getDeclaredConstructor(LocalTime.class, ZoneOffset.class); - con.setAccessible(true); - try { - con.newInstance(LocalTime.of(11, 30, 0, 0), null); - } catch (InvocationTargetException ex) { - throw ex.getCause(); - } + OffsetTime.of(LocalTime.of(11, 30, 0, 0), null); } //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java index c6f3abee38c..34c79c396e1 100644 --- a/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java +++ b/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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,8 +63,11 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import tck.java.time.AbstractTCKTest; -import java.io.*; -import java.lang.reflect.Field; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectStreamConstants; import java.time.DateTimeException; import java.time.ZoneId; import java.time.zone.ZoneRulesException; @@ -153,10 +156,8 @@ public class TCKZoneIdSerialization extends AbstractTCKTest { private ZoneId deserialize(String id) throws Exception { String serClass = ZoneId.class.getPackage().getName() + ".Ser"; - Class serCls = Class.forName(serClass); - Field field = serCls.getDeclaredField("serialVersionUID"); - field.setAccessible(true); - long serVer = (Long) field.get(null); + long serVer = getSUID(ZoneId.class); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (DataOutputStream dos = new DataOutputStream(baos)) { dos.writeShort(ObjectStreamConstants.STREAM_MAGIC); diff --git a/jdk/test/java/time/test/TEST.properties b/jdk/test/java/time/test/TEST.properties new file mode 100644 index 00000000000..0a36c095408 --- /dev/null +++ b/jdk/test/java/time/test/TEST.properties @@ -0,0 +1,5 @@ +# java.time tests use TestNG +TestNG.dirs = .. +othervm.dirs = java/time/chrono java/time/format +lib.dirs = ../../../lib/testlibrary +lib.build = jdk.testlibrary.RandomFactory diff --git a/jdk/test/java/time/test/java/time/TEST.properties b/jdk/test/java/time/test/java/time/TEST.properties new file mode 100644 index 00000000000..75b4dd4403f --- /dev/null +++ b/jdk/test/java/time/test/java/time/TEST.properties @@ -0,0 +1,2 @@ +# java.time test system clock +modules = java.base/java.time:open diff --git a/jdk/test/java/time/test/java/time/temporal/TestIsoWeekFields.java b/jdk/test/java/time/test/java/time/temporal/TestIsoWeekFields.java index 672295e4def..71916c1762e 100644 --- a/jdk/test/java/time/test/java/time/temporal/TestIsoWeekFields.java +++ b/jdk/test/java/time/test/java/time/temporal/TestIsoWeekFields.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014,2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/java/util/Arrays/ParallelPrefix.java b/jdk/test/java/util/Arrays/ParallelPrefix.java index 2b3fb70fca1..7772c6e4c75 100644 --- a/jdk/test/java/util/Arrays/ParallelPrefix.java +++ b/jdk/test/java/util/Arrays/ParallelPrefix.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -179,119 +179,65 @@ public class ParallelPrefix { @Test public void testNPEs() { // null array - assertThrows( () -> Arrays.parallelPrefix((int[]) null, Integer::max), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix((long []) null, Long::max), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix((double []) null, Double::max), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix((String []) null, String::concat), - NullPointerException.class, "should throw NPE"); + assertThrowsNPE(() -> Arrays.parallelPrefix((int[]) null, Integer::max)); + assertThrowsNPE(() -> Arrays.parallelPrefix((long []) null, Long::max)); + assertThrowsNPE(() -> Arrays.parallelPrefix((double []) null, Double::max)); + assertThrowsNPE(() -> Arrays.parallelPrefix((String []) null, String::concat)); // null array w/ range - assertThrows( () -> Arrays.parallelPrefix((int[]) null, 0, 0, Integer::max), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix((long []) null, 0, 0, Long::max), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix((double []) null, 0, 0, Double::max), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix((String []) null, 0, 0, String::concat), - NullPointerException.class, "should throw NPE"); + assertThrowsNPE(() -> Arrays.parallelPrefix((int[]) null, 0, 0, Integer::max)); + assertThrowsNPE(() -> Arrays.parallelPrefix((long []) null, 0, 0, Long::max)); + assertThrowsNPE(() -> Arrays.parallelPrefix((double []) null, 0, 0, Double::max)); + assertThrowsNPE(() -> Arrays.parallelPrefix((String []) null, 0, 0, String::concat)); // null op - assertThrows( () -> Arrays.parallelPrefix(new int[] {}, null), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix(new long[] {}, null), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix(new double[] {}, null), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix(new String[] {}, null), - NullPointerException.class, "should throw NPE"); + assertThrowsNPE(() -> Arrays.parallelPrefix(new int[] {}, null)); + assertThrowsNPE(() -> Arrays.parallelPrefix(new long[] {}, null)); + assertThrowsNPE(() -> Arrays.parallelPrefix(new double[] {}, null)); + assertThrowsNPE(() -> Arrays.parallelPrefix(new String[] {}, null)); // null op w/ range - assertThrows( () -> Arrays.parallelPrefix(new int[] {}, 0, 0, null), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix(new long[] {}, 0, 0, null), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix(new double[] {}, 0, 0, null), - NullPointerException.class, "should throw NPE"); - assertThrows( () -> Arrays.parallelPrefix(new String[] {}, 0, 0, null), - NullPointerException.class, "should throw NPE"); + assertThrowsNPE(() -> Arrays.parallelPrefix(new int[] {}, 0, 0, null)); + assertThrowsNPE(() -> Arrays.parallelPrefix(new long[] {}, 0, 0, null)); + assertThrowsNPE(() -> Arrays.parallelPrefix(new double[] {}, 0, 0, null)); + assertThrowsNPE(() -> Arrays.parallelPrefix(new String[] {}, 0, 0, null)); } @Test public void testIAEs() { - assertThrows( () -> Arrays.parallelPrefix(new int[] {}, 1, 0, Integer::max), - IllegalArgumentException.class, "should throw IAE"); - assertThrows( () -> Arrays.parallelPrefix(new long[] {}, 1, 0, Long::max), - IllegalArgumentException.class, "should throw IAE"); - assertThrows( () -> Arrays.parallelPrefix(new double[] {}, 1, 0, Double::max), - IllegalArgumentException.class, "should throw IAE"); - assertThrows( () -> Arrays.parallelPrefix(new String[] {}, 1, 0, String::concat), - IllegalArgumentException.class, "should throw IAE"); + assertThrowsIAE(() -> Arrays.parallelPrefix(new int[] {}, 1, 0, Integer::max)); + assertThrowsIAE(() -> Arrays.parallelPrefix(new long[] {}, 1, 0, Long::max)); + assertThrowsIAE(() -> Arrays.parallelPrefix(new double[] {}, 1, 0, Double::max)); + assertThrowsIAE(() -> Arrays.parallelPrefix(new String[] {}, 1, 0, String::concat)); } @Test - public void testAIOBEs() { + public void testAIOOBEs() { // bad "fromIndex" - assertThrows( () -> Arrays.parallelPrefix(new int[] {}, -1, 0, Integer::max), - ArrayIndexOutOfBoundsException.class, "should throw AIOBE"); - assertThrows( () -> Arrays.parallelPrefix(new long[] {}, -1, 0, Long::max), - ArrayIndexOutOfBoundsException.class, "should throw AIOBE"); - assertThrows( () -> Arrays.parallelPrefix(new double[] {}, -1, 0, Double::max), - ArrayIndexOutOfBoundsException.class, "should throw AIOBE"); - assertThrows( () -> Arrays.parallelPrefix(new String[] {}, -1, 0, String::concat), - ArrayIndexOutOfBoundsException.class, "should throw AIOBE"); + assertThrowsAIOOB(() -> Arrays.parallelPrefix(new int[] {}, -1, 0, Integer::max)); + assertThrowsAIOOB(() -> Arrays.parallelPrefix(new long[] {}, -1, 0, Long::max)); + assertThrowsAIOOB(() -> Arrays.parallelPrefix(new double[] {}, -1, 0, Double::max)); + assertThrowsAIOOB(() -> Arrays.parallelPrefix(new String[] {}, -1, 0, String::concat)); // bad "toIndex" - assertThrows( () -> Arrays.parallelPrefix(new int[] {}, 0, 1, Integer::max), - ArrayIndexOutOfBoundsException.class, "should throw AIOBE"); - assertThrows( () -> Arrays.parallelPrefix(new long[] {}, 0, 1, Long::max), - ArrayIndexOutOfBoundsException.class, "should throw AIOBE"); - assertThrows( () -> Arrays.parallelPrefix(new double[] {}, 0, 1, Double::max), - ArrayIndexOutOfBoundsException.class, "should throw AIOBE"); - assertThrows( () -> Arrays.parallelPrefix(new String[] {}, 0, 1, String::concat), - ArrayIndexOutOfBoundsException.class, "should throw AIOBE"); + assertThrowsAIOOB(() -> Arrays.parallelPrefix(new int[] {}, 0, 1, Integer::max)); + assertThrowsAIOOB(() -> Arrays.parallelPrefix(new long[] {}, 0, 1, Long::max)); + assertThrowsAIOOB(() -> Arrays.parallelPrefix(new double[] {}, 0, 1, Double::max)); + assertThrowsAIOOB(() -> Arrays.parallelPrefix(new String[] {}, 0, 1, String::concat)); } // "library" code - public interface Thrower { - - public void run() throws T; + private void assertThrowsNPE(ThrowingRunnable r) { + assertThrows(NullPointerException.class, r); } - - public static void assertThrows(Thrower thrower, Class throwable) { - assertThrows(thrower, throwable, null); + private void assertThrowsIAE(ThrowingRunnable r) { + assertThrows(IllegalArgumentException.class, r); } - public static void assertThrows(Thrower thrower, Class throwable, String message) { - Throwable thrown; - try { - thrower.run(); - thrown = null; - } catch (Throwable caught) { - thrown = caught; - } - - assertInstance(thrown, throwable, - ((null != message) ? message : "") + - " Failed to throw " + throwable.getCanonicalName()); - } - - public static void assertThrows(Class throwable, String message, Thrower... throwers) { - for(Thrower thrower : throwers) { - assertThrows(thrower, throwable, message); - } - } - - public static void assertInstance(Object actual, Class expected) { - assertInstance(expected.isInstance(actual), null); - } - - public static void assertInstance(Object actual, Class expected, String message) { - assertTrue(expected.isInstance(actual), message); + private void assertThrowsAIOOB(ThrowingRunnable r) { + assertThrows(ArrayIndexOutOfBoundsException.class, r); } static void assertArraysEqual(int[] actual, int[] expected) { diff --git a/jdk/test/java/util/Arrays/StreamAndSpliterator.java b/jdk/test/java/util/Arrays/StreamAndSpliterator.java index b475e7e6f39..47994f14e7a 100644 --- a/jdk/test/java/util/Arrays/StreamAndSpliterator.java +++ b/jdk/test/java/util/Arrays/StreamAndSpliterator.java @@ -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 @@ -32,7 +32,9 @@ import org.testng.annotations.Test; import java.util.Arrays; import java.util.Spliterators; -import static org.testng.Assert.assertNotNull; +import org.testng.Assert.ThrowingRunnable; + +import static org.testng.Assert.assertThrows; public class StreamAndSpliterator { @Test @@ -124,25 +126,11 @@ public class StreamAndSpliterator { assertThrowsAIOOB(() -> Spliterators.spliterator(new String[]{}, 0, 1, 0)); } - void assertThrowsNPE(Runnable r) { - NullPointerException caught = null; - try { - r.run(); - } - catch (NullPointerException e) { - caught = e; - } - assertNotNull(caught, "NullPointerException not thrown"); + void assertThrowsNPE(ThrowingRunnable r) { + assertThrows(NullPointerException.class, r); } - void assertThrowsAIOOB(Runnable r) { - ArrayIndexOutOfBoundsException caught = null; - try { - r.run(); - } - catch (ArrayIndexOutOfBoundsException e) { - caught = e; - } - assertNotNull(caught, "ArrayIndexOutOfBoundsException not thrown"); + void assertThrowsAIOOB(ThrowingRunnable r) { + assertThrows(ArrayIndexOutOfBoundsException.class, r); } } diff --git a/jdk/test/java/util/BitSet/BitSetStreamTest.java b/jdk/test/java/util/BitSet/stream/BitSetStreamTest.java similarity index 50% rename from jdk/test/java/util/BitSet/BitSetStreamTest.java rename to jdk/test/java/util/BitSet/stream/BitSetStreamTest.java index 87f9f05a753..e6bf02715fe 100644 --- a/jdk/test/java/util/BitSet/BitSetStreamTest.java +++ b/jdk/test/java/util/BitSet/stream/BitSetStreamTest.java @@ -1,5 +1,5 @@ /* - * 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 @@ -21,32 +21,41 @@ * questions. */ +import java.util.ArrayList; +import java.util.BitSet; +import java.util.Collection; +import java.util.List; +import java.util.PrimitiveIterator; +import java.util.Random; +import java.util.Spliterator; +import java.util.SpliteratorOfIntDataBuilder; +import java.util.SpliteratorTestHelper; +import java.util.function.IntConsumer; +import java.util.function.IntSupplier; +import java.util.function.Supplier; +import java.util.stream.IntStream; + import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import java.lang.Integer; -import java.lang.Object; -import java.lang.System; -import java.util.BitSet; -import java.util.OptionalInt; -import java.util.PrimitiveIterator; -import java.util.Random; -import java.util.function.IntSupplier; -import java.util.stream.Collectors; -import java.util.stream.IntStream; +import static java.util.stream.Collectors.toList; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertThrows; import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; /** * @test * @summary test BitSet stream * @bug 8012645 8076442 - * @run testng BitSetStreamTest + * @requires os.maxMemory >= 2g + * @library ../../stream/bootlib + * @build java.base/java.util.SpliteratorTestHelper + * java.base/java.util.SpliteratorOfIntDataBuilder + * @run testng/othervm -Xms512m -Xmx1024m BitSetStreamTest */ -public class BitSetStreamTest { +public class BitSetStreamTest extends SpliteratorTestHelper { static class Fibs implements IntSupplier { private int n1 = 0; private int n2 = 1; @@ -118,6 +127,91 @@ public class BitSetStreamTest { assertFalse(it.hasNext()); } + static Object[][] spliteratorOfIntDataProvider; + + @DataProvider(name = "BitSet.stream.spliterator") + public static Object[][] spliteratorOfIntDataProvider() { + if (spliteratorOfIntDataProvider != null) { + return spliteratorOfIntDataProvider; + } + + List data = new ArrayList<>(); + + Object[][] bitStreamTestcases = new Object[][] { + { "none", IntStream.empty().toArray() }, + { "index 0", IntStream.of(0).toArray() }, + { "index 255", IntStream.of(255).toArray() }, + { "index 0 and 255", IntStream.of(0, 255).toArray() }, + { "index Integer.MAX_VALUE", IntStream.of(Integer.MAX_VALUE).toArray() }, + { "index Integer.MAX_VALUE - 1", IntStream.of(Integer.MAX_VALUE - 1).toArray() }, + { "index 0 and Integer.MAX_VALUE", IntStream.of(0, Integer.MAX_VALUE).toArray() }, + { "every bit", IntStream.range(0, 255).toArray() }, + { "step 2", IntStream.range(0, 255).map(f -> f * 2).toArray() }, + { "step 3", IntStream.range(0, 255).map(f -> f * 3).toArray() }, + { "step 5", IntStream.range(0, 255).map(f -> f * 5).toArray() }, + { "step 7", IntStream.range(0, 255).map(f -> f * 7).toArray() }, + { "1, 10, 100, 1000", IntStream.of(1, 10, 100, 1000).toArray() }, + }; + for (Object[] tc : bitStreamTestcases) { + String description = (String)tc[0]; + int[] exp = (int[])tc[1]; + SpliteratorOfIntDataBuilder db = new SpliteratorOfIntDataBuilder( + data, IntStream.of(exp).boxed().collect(toList())); + + db.add("BitSet.stream.spliterator() {" + description + "}", () -> + IntStream.of(exp).collect(BitSet::new, BitSet::set, BitSet::or). + stream().spliterator() + ); + } + return spliteratorOfIntDataProvider = data.toArray(new Object[0][]); + } + + @Test(dataProvider = "BitSet.stream.spliterator") + public void testIntNullPointerException(String description, Collection exp, Supplier s) { + assertThrows(NullPointerException.class, () -> s.get().forEachRemaining((IntConsumer) null)); + assertThrows(NullPointerException.class, () -> s.get().tryAdvance((IntConsumer) null)); + } + + @Test(dataProvider = "BitSet.stream.spliterator") + public void testIntForEach(String description, Collection exp, Supplier s) { + testForEach(exp, s, intBoxingConsumer()); + } + + @Test(dataProvider = "BitSet.stream.spliterator") + public void testIntTryAdvance(String description, Collection exp, Supplier s) { + testTryAdvance(exp, s, intBoxingConsumer()); + } + + @Test(dataProvider = "BitSet.stream.spliterator") + public void testIntMixedTryAdvanceForEach(String description, Collection exp, Supplier s) { + testMixedTryAdvanceForEach(exp, s, intBoxingConsumer()); + } + + @Test(dataProvider = "BitSet.stream.spliterator") + public void testIntMixedTraverseAndSplit(String description, Collection exp, Supplier s) { + testMixedTraverseAndSplit(exp, s, intBoxingConsumer()); + } + + @Test(dataProvider = "BitSet.stream.spliterator") + public void testIntSplitAfterFullTraversal(String description, Collection exp, Supplier s) { + testSplitAfterFullTraversal(s, intBoxingConsumer()); + } + + @Test(dataProvider = "BitSet.stream.spliterator") + public void testIntSplitOnce(String description, Collection exp, Supplier s) { + testSplitOnce(exp, s, intBoxingConsumer()); + } + + @Test(dataProvider = "BitSet.stream.spliterator") + public void testIntSplitSixDeep(String description, Collection exp, Supplier s) { + testSplitSixDeep(exp, s, intBoxingConsumer()); + } + + @Test(dataProvider = "BitSet.stream.spliterator") + public void testIntSplitUntilNull(String description, Collection exp, Supplier s) { + testSplitUntilNull(exp, s, intBoxingConsumer()); + } + @Test public void testRandomStream() { final int size = 1024 * 1024; diff --git a/jdk/test/java/util/Collections/EmptyNavigableMap.java b/jdk/test/java/util/Collections/EmptyNavigableMap.java index 359d30f4ab6..e874d32f595 100644 --- a/jdk/test/java/util/Collections/EmptyNavigableMap.java +++ b/jdk/test/java/util/Collections/EmptyNavigableMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, 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 @@ -36,10 +36,12 @@ import java.util.Iterator; import java.util.NavigableMap; import java.util.SortedMap; import java.util.TreeMap; + +import org.testng.Assert; +import org.testng.Assert.ThrowingRunnable; import org.testng.annotations.Test; import org.testng.annotations.DataProvider; -import static org.testng.Assert.fail; import static org.testng.Assert.assertTrue; import static org.testng.Assert.assertFalse; @@ -65,26 +67,27 @@ public class EmptyNavigableMap { ((null != message) ? message : "") + " Not empty. "); } - public interface Thrower { - - public void run() throws T; - } - - public static void assertThrows(Thrower thrower, Class throwable) { - assertThrows(thrower, throwable, null); - } - - public static void assertThrows(Thrower thrower, Class throwable, String message) { - Throwable result; + private void assertThrows(Class throwableClass, + ThrowingRunnable runnable, + String message) { try { - thrower.run(); - fail(((null != message) ? message : "") + "Failed to throw " + throwable.getCanonicalName() + ". "); - return; - } catch (Throwable caught) { - result = caught; + Assert.assertThrows(throwableClass, runnable); + } catch (AssertionError e) { + throw new AssertionError(String.format("%s%n%s", + ((null != message) ? message : ""), e.getMessage()), e); } + } - assertInstance(result, throwable, ((null != message) ? message : "") + "Failed to throw " + throwable.getCanonicalName() + ". "); + private void assertThrowsCCE(ThrowingRunnable r, String s) { + assertThrows(ClassCastException.class, r, s); + } + + private void assertThrowsNPE(ThrowingRunnable r, String s) { + assertThrows(NullPointerException.class, r, s); + } + + private void assertThrowsIAE(ThrowingRunnable r, String s) { + assertThrows(IllegalArgumentException.class, r, s); } public static final boolean isDescending(SortedMap set) { @@ -121,10 +124,9 @@ public class EmptyNavigableMap { */ @Test(dataProvider = "NavigableMap", dataProviderClass = EmptyNavigableMap.class) public void testContainsRequiresComparable(String description, NavigableMap navigableMap) { - assertThrows(() -> { + assertThrowsCCE(() -> { navigableMap.containsKey(new Object()); }, - ClassCastException.class, description + ": Compareable should be required"); } @@ -175,14 +177,12 @@ public class EmptyNavigableMap { */ @Test(dataProvider = "NavigableMap", dataProviderClass = EmptyNavigableMap.class) public void testHeadMap(String description, NavigableMap navigableMap) { - assertThrows( + assertThrowsNPE( () -> { NavigableMap ss = navigableMap.headMap(null, false); }, - NullPointerException.class, description + ": Must throw NullPointerException for null element"); - assertThrows( + assertThrowsCCE( () -> { NavigableMap ss = navigableMap.headMap(new Object(), true); }, - ClassCastException.class, description + ": Must throw ClassCastException for non-Comparable element"); NavigableMap ss = navigableMap.headMap("1", false); @@ -203,50 +203,44 @@ public class EmptyNavigableMap { */ @Test(dataProvider = "NavigableMap", dataProviderClass = EmptyNavigableMap.class) public void testSubMap(String description, NavigableMap navigableMap) { - assertThrows( + assertThrowsNPE( () -> { SortedMap ss = navigableMap.subMap(null, BigInteger.TEN); }, - NullPointerException.class, description + ": Must throw NullPointerException for null element"); - assertThrows( + assertThrowsNPE( () -> { SortedMap ss = navigableMap.subMap(BigInteger.ZERO, null); }, - NullPointerException.class, description + ": Must throw NullPointerException for null element"); - assertThrows( + assertThrowsNPE( () -> { SortedMap ss = navigableMap.subMap(null, null); }, - NullPointerException.class, description + ": Must throw NullPointerException for null element"); Object obj1 = new Object(); Object obj2 = new Object(); - assertThrows( + assertThrowsCCE( () -> { SortedMap ss = navigableMap.subMap(obj1, BigInteger.TEN); }, - ClassCastException.class, description - + ": Must throw ClassCastException for parameter which is not Comparable."); + description + ": Must throw ClassCastException for parameter which is not Comparable."); - assertThrows( + assertThrowsCCE( () -> { SortedMap ss = navigableMap.subMap(BigInteger.ZERO, obj2); }, - ClassCastException.class, description - + ": Must throw ClassCastException for parameter which is not Comparable."); + description + ": Must throw ClassCastException for parameter which is not Comparable."); - assertThrows( + assertThrowsCCE( () -> { SortedMap ss = navigableMap.subMap(obj1, obj2); }, - ClassCastException.class, description - + ": Must throw ClassCastException for parameter which is not Comparable."); + description + ": Must throw ClassCastException for parameter which is not Comparable."); // minimal range navigableMap.subMap(BigInteger.ZERO, false, BigInteger.ZERO, false); @@ -257,12 +251,11 @@ public class EmptyNavigableMap { Object first = isDescending(navigableMap) ? BigInteger.TEN : BigInteger.ZERO; Object last = (BigInteger.ZERO == first) ? BigInteger.TEN : BigInteger.ZERO; - assertThrows( + assertThrowsIAE( () -> { navigableMap.subMap(last, true, first, false); }, - IllegalArgumentException.class, description - + ": Must throw IllegalArgumentException when fromElement is not less than toElement."); + description + ": Must throw IllegalArgumentException when fromElement is not less than toElement."); navigableMap.subMap(first, true, last, false); } @@ -280,10 +273,9 @@ public class EmptyNavigableMap { // slightly smaller NavigableMap ns = subMap.subMap(first, false, last, false); // slight expansion - assertThrows(() -> { + assertThrowsIAE(() -> { ns.subMap(first, true, last, true); }, - IllegalArgumentException.class, description + ": Expansion should not be allowed"); // much smaller @@ -301,10 +293,9 @@ public class EmptyNavigableMap { NavigableMap ns = subMap.headMap(BigInteger.ONE, false); // slight expansion - assertThrows(() -> { + assertThrowsIAE(() -> { ns.headMap(BigInteger.ONE, true); }, - IllegalArgumentException.class, description + ": Expansion should not be allowed"); // much smaller @@ -322,10 +313,9 @@ public class EmptyNavigableMap { NavigableMap ns = subMap.tailMap(BigInteger.ONE, false); // slight expansion - assertThrows(() -> { + assertThrowsIAE(() -> { ns.tailMap(BigInteger.ONE, true); }, - IllegalArgumentException.class, description + ": Expansion should not be allowed"); // much smaller @@ -337,15 +327,15 @@ public class EmptyNavigableMap { */ @Test(dataProvider = "NavigableMap", dataProviderClass = EmptyNavigableMap.class) public void testTailMap(String description, NavigableMap navigableMap) { - assertThrows(() -> { + assertThrowsNPE(() -> { navigableMap.tailMap(null); }, - NullPointerException.class, description + ": Must throw NullPointerException for null element"); - assertThrows(() -> { + assertThrowsCCE(() -> { navigableMap.tailMap(new Object()); - }, ClassCastException.class); + }, + description); NavigableMap ss = navigableMap.tailMap("1", true); diff --git a/jdk/test/java/util/Collections/EmptyNavigableSet.java b/jdk/test/java/util/Collections/EmptyNavigableSet.java index afe216da8d7..7ee13b80c1e 100644 --- a/jdk/test/java/util/Collections/EmptyNavigableSet.java +++ b/jdk/test/java/util/Collections/EmptyNavigableSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, 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 @@ -37,10 +37,12 @@ import java.util.NoSuchElementException; import java.util.NavigableSet; import java.util.SortedSet; import java.util.TreeSet; + +import org.testng.Assert; +import org.testng.Assert.ThrowingRunnable; import org.testng.annotations.Test; import org.testng.annotations.DataProvider; -import static org.testng.Assert.fail; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertSame; import static org.testng.Assert.assertTrue; @@ -67,26 +69,31 @@ public class EmptyNavigableSet { ((null != message) ? message : "") + " Not empty. "); } - public interface Thrower { - - public void run() throws T; - } - - public static void assertThrows(Thrower thrower, Class throwable) { - assertThrows(thrower, throwable, null); - } - - public static void assertThrows(Thrower thrower, Class throwable, String message) { - Throwable result; + private void assertThrows(Class throwableClass, + ThrowingRunnable runnable, + String message) { try { - thrower.run(); - fail(((null != message) ? message : "") + "Failed to throw " + throwable.getCanonicalName() + ". "); - return; - } catch (Throwable caught) { - result = caught; + Assert.assertThrows(throwableClass, runnable); + } catch (AssertionError e) { + throw new AssertionError(String.format("%s%n%s", + ((null != message) ? message : ""), e.getMessage()), e); } + } - assertInstance(result, throwable, ((null != message) ? message : "") + "Failed to throw " + throwable.getCanonicalName() + ". "); + private void assertThrowsCCE(ThrowingRunnable r, String s) { + assertThrows(ClassCastException.class, r, s); + } + + private void assertThrowsNPE(ThrowingRunnable r, String s) { + assertThrows(NullPointerException.class, r, s); + } + + private void assertThrowsIAE(ThrowingRunnable r, String s) { + assertThrows(IllegalArgumentException.class, r, s); + } + + private void assertThrowsNSEE(ThrowingRunnable r, String s) { + assertThrows(NoSuchElementException.class, r, s); } public static final boolean isDescending(SortedSet set) { @@ -123,10 +130,9 @@ public class EmptyNavigableSet { */ @Test(dataProvider = "NavigableSet", dataProviderClass = EmptyNavigableSet.class) public void testContainsRequiresComparable(String description, NavigableSet navigableSet) { - assertThrows(() -> { + assertThrowsCCE(() -> { navigableSet.contains(new Object()); }, - ClassCastException.class, description + ": Compareable should be required"); } @@ -176,9 +182,9 @@ public class EmptyNavigableSet { */ @Test(dataProvider = "NavigableSet", dataProviderClass = EmptyNavigableSet.class) public void testFirst(String description, NavigableSet navigableSet) { - assertThrows(() -> { + assertThrowsNSEE(() -> { navigableSet.first(); - }, NoSuchElementException.class, description); + }, description); } /** @@ -186,14 +192,12 @@ public class EmptyNavigableSet { */ @Test(dataProvider = "NavigableSet", dataProviderClass = EmptyNavigableSet.class) public void testHeadSet(String description, NavigableSet navigableSet) { - assertThrows( + assertThrowsNPE( () -> { NavigableSet ns = navigableSet.headSet(null, false); }, - NullPointerException.class, description + ": Must throw NullPointerException for null element"); - assertThrows( + assertThrowsCCE( () -> { NavigableSet ns = navigableSet.headSet(new Object(), true); }, - ClassCastException.class, description + ": Must throw ClassCastException for non-Comparable element"); NavigableSet ns = navigableSet.headSet("1", false); @@ -206,9 +210,9 @@ public class EmptyNavigableSet { */ @Test(dataProvider = "NavigableSet", dataProviderClass = EmptyNavigableSet.class) public void testLast(String description, NavigableSet navigableSet) { - assertThrows(() -> { + assertThrowsNSEE(() -> { navigableSet.last(); - }, NoSuchElementException.class, description); + }, description); } /** @@ -224,50 +228,44 @@ public class EmptyNavigableSet { */ @Test(dataProvider = "NavigableSet", dataProviderClass = EmptyNavigableSet.class) public void testSubSet(String description, NavigableSet navigableSet) { - assertThrows( + assertThrowsNPE( () -> { SortedSet ss = navigableSet.subSet(null, BigInteger.TEN); }, - NullPointerException.class, description + ": Must throw NullPointerException for null element"); - assertThrows( + assertThrowsNPE( () -> { SortedSet ss = navigableSet.subSet(BigInteger.ZERO, null); }, - NullPointerException.class, description + ": Must throw NullPointerException for null element"); - assertThrows( + assertThrowsNPE( () -> { SortedSet ss = navigableSet.subSet(null, null); }, - NullPointerException.class, description + ": Must throw NullPointerException for null element"); Object obj1 = new Object(); Object obj2 = new Object(); - assertThrows( + assertThrowsCCE( () -> { SortedSet ss = navigableSet.subSet(obj1, BigInteger.TEN); }, - ClassCastException.class, description - + ": Must throw ClassCastException for parameter which is not Comparable."); + description + ": Must throw ClassCastException for parameter which is not Comparable."); - assertThrows( + assertThrowsCCE( () -> { SortedSet ss = navigableSet.subSet(BigInteger.ZERO, obj2); }, - ClassCastException.class, description - + ": Must throw ClassCastException for parameter which is not Comparable."); + description + ": Must throw ClassCastException for parameter which is not Comparable."); - assertThrows( + assertThrowsCCE( () -> { SortedSet ss = navigableSet.subSet(obj1, obj2); }, - ClassCastException.class, description - + ": Must throw ClassCastException for parameter which is not Comparable."); + description + ": Must throw ClassCastException for parameter which is not Comparable."); // minimal range navigableSet.subSet(BigInteger.ZERO, false, BigInteger.ZERO, false); @@ -278,11 +276,11 @@ public class EmptyNavigableSet { Object first = isDescending(navigableSet) ? BigInteger.TEN : BigInteger.ZERO; Object last = (BigInteger.ZERO == first) ? BigInteger.TEN : BigInteger.ZERO; - assertThrows( + assertThrowsIAE( () -> { navigableSet.subSet(last, true, first, false); }, - IllegalArgumentException.class, description + description + ": Must throw IllegalArgumentException when fromElement is not less than toElement."); navigableSet.subSet(first, true, last, false); @@ -301,10 +299,9 @@ public class EmptyNavigableSet { // slightly smaller NavigableSet ns = subSet.subSet(first, false, last, false); // slight expansion - assertThrows(() -> { + assertThrowsIAE(() -> { ns.subSet(first, true, last, true); }, - IllegalArgumentException.class, description + ": Expansion should not be allowed"); // much smaller @@ -322,10 +319,9 @@ public class EmptyNavigableSet { NavigableSet ns = subSet.headSet(BigInteger.ONE, false); // slight expansion - assertThrows(() -> { + assertThrowsIAE(() -> { ns.headSet(BigInteger.ONE, true); }, - IllegalArgumentException.class, description + ": Expansion should not be allowed"); // much smaller @@ -343,10 +339,9 @@ public class EmptyNavigableSet { NavigableSet ns = subSet.tailSet(BigInteger.ONE, false); // slight expansion - assertThrows(() -> { + assertThrowsIAE(() -> { ns.tailSet(BigInteger.ONE, true); }, - IllegalArgumentException.class, description + ": Expansion should not be allowed"); // much smaller @@ -358,15 +353,14 @@ public class EmptyNavigableSet { */ @Test(dataProvider = "NavigableSet", dataProviderClass = EmptyNavigableSet.class) public void testTailSet(String description, NavigableSet navigableSet) { - assertThrows(() -> { + assertThrowsNPE(() -> { navigableSet.tailSet(null); }, - NullPointerException.class, description + ": Must throw NullPointerException for null element"); - assertThrows(() -> { + assertThrowsCCE(() -> { navigableSet.tailSet(new Object()); - }, ClassCastException.class); + }, description); NavigableSet ss = navigableSet.tailSet("1", true); diff --git a/jdk/test/java/util/Iterator/PrimitiveIteratorDefaults.java b/jdk/test/java/util/Iterator/PrimitiveIteratorDefaults.java index 2880578b194..a94323d7e2c 100644 --- a/jdk/test/java/util/Iterator/PrimitiveIteratorDefaults.java +++ b/jdk/test/java/util/Iterator/PrimitiveIteratorDefaults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -21,16 +21,16 @@ * questions. */ -import org.testng.annotations.Test; - import java.util.PrimitiveIterator; import java.util.function.Consumer; import java.util.function.DoubleConsumer; import java.util.function.IntConsumer; import java.util.function.LongConsumer; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; +import org.testng.Assert.ThrowingRunnable; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertThrows; /** * @test @@ -53,8 +53,8 @@ public class PrimitiveIteratorDefaults { } }; - executeAndCatch(() -> i.forEachRemaining((IntConsumer) null)); - executeAndCatch(() -> i.forEachRemaining((Consumer) null)); + assertThrowsNPE(() -> i.forEachRemaining((IntConsumer) null)); + assertThrowsNPE(() -> i.forEachRemaining((Consumer) null)); } public void testLongForEachRemainingWithNull() { @@ -70,8 +70,8 @@ public class PrimitiveIteratorDefaults { } }; - executeAndCatch(() -> i.forEachRemaining((LongConsumer) null)); - executeAndCatch(() -> i.forEachRemaining((Consumer) null)); + assertThrowsNPE(() -> i.forEachRemaining((LongConsumer) null)); + assertThrowsNPE(() -> i.forEachRemaining((Consumer) null)); } public void testDoubleForEachRemainingWithNull() { @@ -87,29 +87,12 @@ public class PrimitiveIteratorDefaults { } }; - executeAndCatch(() -> i.forEachRemaining((DoubleConsumer) null)); - executeAndCatch(() -> i.forEachRemaining((Consumer) null)); + assertThrowsNPE(() -> i.forEachRemaining((DoubleConsumer) null)); + assertThrowsNPE(() -> i.forEachRemaining((Consumer) null)); } - private void executeAndCatch(Runnable r) { - executeAndCatch(NullPointerException.class, r); - } - - private void executeAndCatch(Class expected, Runnable r) { - Exception caught = null; - try { - r.run(); - } - catch (Exception e) { - caught = e; - } - - assertNotNull(caught, - String.format("No Exception was thrown, expected an Exception of %s to be thrown", - expected.getName())); - assertTrue(expected.isInstance(caught), - String.format("Exception thrown %s not an instance of %s", - caught.getClass().getName(), expected.getName())); + private void assertThrowsNPE(ThrowingRunnable r) { + assertThrows(NullPointerException.class, r); } } diff --git a/jdk/test/java/util/Map/Defaults.java b/jdk/test/java/util/Map/Defaults.java index 7b2956f8846..02292ad1b04 100644 --- a/jdk/test/java/util/Map/Defaults.java +++ b/jdk/test/java/util/Map/Defaults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -53,15 +53,19 @@ import java.util.function.BiFunction; import java.util.function.Function; import java.util.function.Supplier; +import org.testng.Assert.ThrowingRunnable; import org.testng.annotations.Test; import org.testng.annotations.DataProvider; + import static java.util.Objects.requireNonNull; + import static org.testng.Assert.fail; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertSame; +import static org.testng.Assert.assertThrows; public class Defaults { @@ -159,14 +163,8 @@ public class Defaults { @Test(dataProvider = "Map rw=true keys=nonNull values=nonNull") public static void testReplaceAllNoNullReplacement(String description, Map map) { - assertThrows( - () -> { map.replaceAll(null); }, - NullPointerException.class, - description); - assertThrows( - () -> { map.replaceAll((k,v) -> null); }, - NullPointerException.class, - description + " should not allow replacement with null value"); + assertThrowsNPE(() -> map.replaceAll(null)); + assertThrowsNPE(() -> map.replaceAll((k,v) -> null)); //should not allow replacement with null value } @Test(dataProvider = "Map rw=true keys=withNull values=withNull") @@ -209,7 +207,7 @@ public class Defaults { public void testReplaceKVNoNulls(String description, Map map) { assertTrue(map.containsKey(FIRST_KEY), "expected key missing"); assertSame(map.get(FIRST_KEY), FIRST_VALUE, "found wrong value"); - assertThrows( () -> {map.replace(FIRST_KEY, null);}, NullPointerException.class, description + ": should throw NPE"); + assertThrowsNPE(() -> map.replace(FIRST_KEY, null)); assertSame(map.replace(FIRST_KEY, EXTRA_VALUE), FIRST_VALUE, description + ": replaced wrong value"); assertSame(map.get(FIRST_KEY), EXTRA_VALUE, "found wrong value"); } @@ -248,8 +246,13 @@ public class Defaults { public void testReplaceKVVNoNulls(String description, Map map) { assertTrue(map.containsKey(FIRST_KEY), "expected key missing"); assertSame(map.get(FIRST_KEY), FIRST_VALUE, "found wrong value"); - assertThrows( () -> {map.replace(FIRST_KEY, FIRST_VALUE, null);}, NullPointerException.class, description + ": should throw NPE"); - assertThrows( () -> {if (!map.replace(FIRST_KEY, null, EXTRA_VALUE)) throw new NullPointerException("default returns false rather than throwing");}, NullPointerException.class, description + ": should throw NPE"); + assertThrowsNPE(() -> map.replace(FIRST_KEY, FIRST_VALUE, null)); + assertThrowsNPE( + () -> { + if (!map.replace(FIRST_KEY, null, EXTRA_VALUE)) { + throw new NullPointerException("default returns false rather than throwing"); + } + }); assertTrue(map.replace(FIRST_KEY, FIRST_VALUE, EXTRA_VALUE), description + ": replaced wrong value"); assertSame(map.get(FIRST_KEY), EXTRA_VALUE, "found wrong value"); } @@ -319,9 +322,7 @@ public class Defaults { @Test(dataProvider = "Map rw=true keys=all values=all") public void testComputeIfAbsentNullFunction(String description, Map map) { - assertThrows( () -> { map.computeIfAbsent(KEYS[1], null);}, - NullPointerException.class, - "Should throw NPE"); + assertThrowsNPE(() -> map.computeIfAbsent(KEYS[1], null)); } @Test(dataProvider = "Map rw=true keys=withNull values=withNull") @@ -366,9 +367,7 @@ public class Defaults { @Test(dataProvider = "Map rw=true keys=all values=all") public void testComputeIfPresentNullFunction(String description, Map map) { - assertThrows( () -> { map.computeIfPresent(KEYS[1], null);}, - NullPointerException.class, - "Should throw NPE"); + assertThrowsNPE(() -> map.computeIfPresent(KEYS[1], null)); } @Test(dataProvider = "Map rw=true keys=withNull values=withNull") @@ -459,9 +458,7 @@ public class Defaults { @Test(dataProvider = "Map rw=true keys=all values=all") public void testComputeNullFunction(String description, Map map) { - assertThrows( () -> { map.compute(KEYS[1], null);}, - NullPointerException.class, - "Should throw NPE"); + assertThrowsNPE(() -> map.compute(KEYS[1], null)); } @Test(dataProvider = "MergeCases") @@ -531,9 +528,7 @@ public class Defaults { @Test(dataProvider = "Map rw=true keys=all values=all") public void testMergeNullMerger(String description, Map map) { - assertThrows( () -> { map.merge(KEYS[1], VALUES[1], null);}, - NullPointerException.class, - "Should throw NPE"); + assertThrowsNPE(() -> map.merge(KEYS[1], VALUES[1], null)); } /** A function that flipflops between running two other functions. */ @@ -973,41 +968,8 @@ public class Defaults { return cases; } - public interface Thrower { - - public void run() throws T; - } - - public static void assertThrows(Thrower thrower, Class throwable) { - assertThrows(thrower, throwable, null); - } - - public static void assertThrows(Thrower thrower, Class throwable, String message) { - Throwable thrown; - try { - thrower.run(); - thrown = null; - } catch (Throwable caught) { - thrown = caught; - } - - assertInstance(thrown, throwable, - ((null != message) ? message : "") + - " Failed to throw " + throwable.getCanonicalName()); - } - - public static void assertThrows(Class throwable, String message, Thrower... throwers) { - for (Thrower thrower : throwers) { - assertThrows(thrower, throwable, message); - } - } - - public static void assertInstance(Object actual, Class expected) { - assertInstance(expected.isInstance(actual), null); - } - - public static void assertInstance(Object actual, Class expected, String message) { - assertTrue(expected.isInstance(actual), message); + public static void assertThrowsNPE(ThrowingRunnable r) { + assertThrows(NullPointerException.class, r); } /** diff --git a/jdk/test/java/util/Random/RandomTest.java b/jdk/test/java/util/Random/RandomTest.java index 3055f5cbbcb..6b16e5b6b7e 100644 --- a/jdk/test/java/util/Random/RandomTest.java +++ b/jdk/test/java/util/Random/RandomTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -21,14 +21,13 @@ * questions. */ -import org.testng.Assert; -import org.testng.annotations.Test; - import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.LongAdder; import java.util.function.BiConsumer; +import org.testng.annotations.Test; + import static org.testng.Assert.*; /** @@ -172,12 +171,12 @@ public class RandomTest { */ public void testBadStreamSize() { Random r = new Random(); - executeAndCatchIAE(() -> r.ints(-1L)); - executeAndCatchIAE(() -> r.ints(-1L, 2, 3)); - executeAndCatchIAE(() -> r.longs(-1L)); - executeAndCatchIAE(() -> r.longs(-1L, -1L, 1L)); - executeAndCatchIAE(() -> r.doubles(-1L)); - executeAndCatchIAE(() -> r.doubles(-1L, .5, .6)); + assertThrowsIAE(() -> r.ints(-1L)); + assertThrowsIAE(() -> r.ints(-1L, 2, 3)); + assertThrowsIAE(() -> r.longs(-1L)); + assertThrowsIAE(() -> r.longs(-1L, -1L, 1L)); + assertThrowsIAE(() -> r.doubles(-1L)); + assertThrowsIAE(() -> r.doubles(-1L, .5, .6)); } /** @@ -186,10 +185,10 @@ public class RandomTest { */ public void testBadStreamBounds() { Random r = new Random(); - executeAndCatchIAE(() -> r.ints(2, 1)); - executeAndCatchIAE(() -> r.ints(10, 42, 42)); - executeAndCatchIAE(() -> r.longs(-1L, -1L)); - executeAndCatchIAE(() -> r.longs(10, 1L, -2L)); + assertThrowsIAE(() -> r.ints(2, 1)); + assertThrowsIAE(() -> r.ints(10, 42, 42)); + assertThrowsIAE(() -> r.longs(-1L, -1L)); + assertThrowsIAE(() -> r.longs(10, 1L, -2L)); testDoubleBadOriginBound((o, b) -> r.doubles(10, o, b)); } @@ -198,45 +197,28 @@ public class RandomTest { static final double FINITE = Math.PI; void testDoubleBadOriginBound(BiConsumer bi) { - executeAndCatchIAE(() -> bi.accept(17.0, 2.0)); - executeAndCatchIAE(() -> bi.accept(0.0, 0.0)); - executeAndCatchIAE(() -> bi.accept(Double.NaN, FINITE)); - executeAndCatchIAE(() -> bi.accept(FINITE, Double.NaN)); - executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY)); + assertThrowsIAE(() -> bi.accept(17.0, 2.0)); + assertThrowsIAE(() -> bi.accept(0.0, 0.0)); + assertThrowsIAE(() -> bi.accept(Double.NaN, FINITE)); + assertThrowsIAE(() -> bi.accept(FINITE, Double.NaN)); + assertThrowsIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY)); // Returns NaN -// executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, FINITE)); -// executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY)); +// assertThrowsIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, FINITE)); +// assertThrowsIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY)); - executeAndCatchIAE(() -> bi.accept(FINITE, Double.NEGATIVE_INFINITY)); + assertThrowsIAE(() -> bi.accept(FINITE, Double.NEGATIVE_INFINITY)); // Returns Double.MAX_VALUE -// executeAndCatchIAE(() -> bi.accept(FINITE, Double.POSITIVE_INFINITY)); +// assertThrowsIAE(() -> bi.accept(FINITE, Double.POSITIVE_INFINITY)); - executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY)); - executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, FINITE)); - executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY)); + assertThrowsIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY)); + assertThrowsIAE(() -> bi.accept(Double.POSITIVE_INFINITY, FINITE)); + assertThrowsIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY)); } - private void executeAndCatchIAE(Runnable r) { - executeAndCatch(IllegalArgumentException.class, r); - } - - private void executeAndCatch(Class expected, Runnable r) { - Exception caught = null; - try { - r.run(); - } - catch (Exception e) { - caught = e; - } - - assertNotNull(caught, - String.format("No Exception was thrown, expected an Exception of %s to be thrown", - expected.getName())); - Assert.assertTrue(expected.isInstance(caught), - String.format("Exception thrown %s not an instance of %s", - caught.getClass().getName(), expected.getName())); + private void assertThrowsIAE(ThrowingRunnable r) { + assertThrows(IllegalArgumentException.class, r); } /** diff --git a/jdk/test/java/util/ResourceBundle/getBaseBundleName/resources/PropertyBundle.properties b/jdk/test/java/util/ResourceBundle/getBaseBundleName/resources/PropertyBundle.properties index 343c648257f..92af2a65289 100644 --- a/jdk/test/java/util/ResourceBundle/getBaseBundleName/resources/PropertyBundle.properties +++ b/jdk/test/java/util/ResourceBundle/getBaseBundleName/resources/PropertyBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 20013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -21,4 +21,3 @@ # questions. # dummy=foo - diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java index eb14465c841..9bfa56c51ab 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -28,7 +28,7 @@ import java.util.ResourceBundle; import java.util.Set; import java.util.spi.AbstractResourceBundleProvider; -import jdk.test.resources.MyResourcesProvider; +import jdk.test.resources.spi.MyResourcesProvider; public class MyResourcesAsia extends AbstractResourceBundleProvider implements MyResourcesProvider diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/module-info.java index 0b821d5c042..b518406bf89 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/module-info.java @@ -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 @@ -24,6 +24,6 @@ module asiabundles { requires test; - provides jdk.test.resources.MyResourcesProvider + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.asia.MyResourcesAsia; } diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java index b16d4126342..177c7c6fded 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -28,7 +28,7 @@ import java.util.ResourceBundle; import java.util.Set; import java.util.spi.AbstractResourceBundleProvider; -import jdk.test.resources.MyResourcesProvider; +import jdk.test.resources.spi.MyResourcesProvider; public class MyResourcesEU extends AbstractResourceBundleProvider implements MyResourcesProvider diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/module-info.java index 67a55c88cfa..242595e46df 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/module-info.java @@ -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 @@ -24,6 +24,6 @@ module eubundles { requires test; - provides jdk.test.resources.MyResourcesProvider + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.eu.MyResourcesEU; } diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProviderImpl.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProviderImpl.java index eef21d29416..b5198c41e3c 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProviderImpl.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProviderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -26,6 +26,7 @@ package jdk.test.resources; import java.util.Locale; import java.util.ResourceBundle; import java.util.spi.AbstractResourceBundleProvider; +import jdk.test.resources.spi.MyResourcesProvider; public class MyResourcesProviderImpl extends AbstractResourceBundleProvider implements MyResourcesProvider diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/spi/MyResourcesProvider.java similarity index 90% rename from jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProvider.java rename to jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/spi/MyResourcesProvider.java index eacdd25ee73..32045008616 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProvider.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/spi/MyResourcesProvider.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package jdk.test.resources; +package jdk.test.resources.spi; import java.util.spi.ResourceBundleProvider; diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/module-info.java index 3ca685b7fd5..c9686ab8365 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/module-info.java @@ -22,7 +22,7 @@ */ module test { - exports jdk.test.resources to eubundles, asiabundles; - uses jdk.test.resources.MyResourcesProvider; - provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl; + exports jdk.test.resources.spi to eubundles, asiabundles; + uses jdk.test.resources.spi.MyResourcesProvider; + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl; } diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java index 72d1010156b..f0c819e6db0 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java @@ -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 @@ -24,7 +24,7 @@ package jdk.test.resources.asia; import java.util.Locale; -import jdk.test.resources.MyResourcesProvider; +import jdk.test.resources.spi.MyResourcesProvider; public class MyResourcesAsia extends MyResourcesProvider { public MyResourcesAsia() { diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/module-info.java index 0b821d5c042..b518406bf89 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/module-info.java @@ -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 @@ -24,6 +24,6 @@ module asiabundles { requires test; - provides jdk.test.resources.MyResourcesProvider + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.asia.MyResourcesAsia; } diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java index f95a44f9a36..12fb957b317 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java @@ -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 @@ -24,7 +24,7 @@ package jdk.test.resources.eu; import java.util.Locale; -import jdk.test.resources.MyResourcesProvider; +import jdk.test.resources.spi.MyResourcesProvider; public class MyResourcesEU extends MyResourcesProvider { public MyResourcesEU() { diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/module-info.java index 67a55c88cfa..242595e46df 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/module-info.java @@ -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 @@ -24,6 +24,6 @@ module eubundles { requires test; - provides jdk.test.resources.MyResourcesProvider + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.eu.MyResourcesEU; } diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProviderImpl.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProviderImpl.java index ef9c683397f..78fd0c06e36 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProviderImpl.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProviderImpl.java @@ -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 @@ -24,6 +24,7 @@ package jdk.test.resources; import java.util.Locale; +import jdk.test.resources.spi.MyResourcesProvider; public class MyResourcesProviderImpl extends MyResourcesProvider { public MyResourcesProviderImpl() { diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/spi/MyResourcesProvider.java similarity index 93% rename from jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProvider.java rename to jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/spi/MyResourcesProvider.java index 2ff0ceb18d7..124bc498f79 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProvider.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/spi/MyResourcesProvider.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package jdk.test.resources; +package jdk.test.resources.spi; import java.util.Locale; diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/module-info.java index 3ca685b7fd5..2f68a75dc6f 100644 --- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/module-info.java @@ -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 @@ -22,7 +22,7 @@ */ module test { - exports jdk.test.resources to eubundles, asiabundles; - uses jdk.test.resources.MyResourcesProvider; - provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl; + exports jdk.test.resources.spi to eubundles, asiabundles; + uses jdk.test.resources.spi.MyResourcesProvider; + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl; } diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java index a62c8beb4ae..f14ace513e6 100644 --- a/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java +++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java @@ -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 @@ -24,7 +24,7 @@ package jdk.test.resources.asia; import java.util.Locale; -import jdk.test.resources.MyResourcesProvider; +import jdk.test.resources.spi.MyResourcesProvider; /** * diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/module-info.java index 9c51bcca58d..045de7d8f0b 100644 --- a/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/module-info.java @@ -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 @@ -24,6 +24,6 @@ module asiabundles { requires mainbundles; - provides jdk.test.resources.MyResourcesProvider + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.asia.MyResourcesAsia; } diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java index 689512002e0..6a5048aa81a 100644 --- a/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java +++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java @@ -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 @@ -24,7 +24,7 @@ package jdk.test.resources.eu; import java.util.Locale; -import jdk.test.resources.MyResourcesProvider; +import jdk.test.resources.spi.MyResourcesProvider; /** * diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/module-info.java index 4a003a57fc9..b76e0b4c7a6 100644 --- a/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/module-info.java @@ -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 @@ -24,6 +24,6 @@ module eubundles { requires mainbundles; - provides jdk.test.resources.MyResourcesProvider + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.eu.MyResourcesEU; } diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesMain.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesMain.java index ccb353cfe19..0809b790459 100644 --- a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesMain.java +++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesMain.java @@ -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 @@ -24,6 +24,7 @@ package jdk.test.resources; import java.util.Locale; +import jdk.test.resources.spi.MyResourcesProvider; public class MyResourcesMain extends MyResourcesProvider { public MyResourcesMain() { diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/spi/MyResourcesProvider.java similarity index 95% rename from jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesProvider.java rename to jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/spi/MyResourcesProvider.java index 3cbbe563368..c6cb2dcc9db 100644 --- a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesProvider.java +++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/spi/MyResourcesProvider.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package jdk.test.resources; +package jdk.test.resources.spi; import java.util.Arrays; import java.util.Collections; diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/module-info.java index 64769aff1e7..d7e2db31709 100644 --- a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/module-info.java @@ -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 @@ -22,7 +22,7 @@ */ module mainbundles { - exports jdk.test.resources to test, eubundles, asiabundles; - provides jdk.test.resources.MyResourcesProvider + exports jdk.test.resources.spi to test, eubundles, asiabundles; + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.MyResourcesMain; } diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/test/module-info.java index 2d9e6e2990c..08d1dccdcec 100644 --- a/jdk/test/java/util/ResourceBundle/modules/basic/src/test/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/test/module-info.java @@ -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 @@ -23,5 +23,5 @@ module test { requires mainbundles; - uses jdk.test.resources.MyResourcesProvider; + uses jdk.test.resources.spi.MyResourcesProvider; } diff --git a/jdk/test/java/util/ResourceBundle/modules/cache/CacheTest.java b/jdk/test/java/util/ResourceBundle/modules/cache/CacheTest.java index 15d75aec5e4..7952ec59d2c 100644 --- a/jdk/test/java/util/ResourceBundle/modules/cache/CacheTest.java +++ b/jdk/test/java/util/ResourceBundle/modules/cache/CacheTest.java @@ -89,6 +89,7 @@ public class CacheTest { assertTrue(executeTestJava("--class-path", MODS_DIR.resolve(TEST_MODULE).toString(), "--module-path", MODS_DIR.resolve(MAIN_BUNDLES_MODULE).toString(), "--add-modules", MAIN_BUNDLES_MODULE, + "--illegal-access=deny", MAIN_CLASS, "cache") .outputTo(System.out) .errorTo(System.out) @@ -111,6 +112,7 @@ public class CacheTest { assertTrue(executeTestJava("--class-path", MODS_DIR.resolve(TEST_MODULE).toString(), "--module-path", MODS_DIR.resolve(MAIN_BUNDLES_MODULE).toString(), "--add-modules", MAIN_BUNDLES_MODULE, + "--illegal-access=deny", MAIN_CLASS) .outputTo(System.out) .errorTo(System.out) diff --git a/jdk/test/java/util/ResourceBundle/modules/cache/src/test/jdk/test/Main.java b/jdk/test/java/util/ResourceBundle/modules/cache/src/test/jdk/test/Main.java index a6ae87208bd..234e841f691 100644 --- a/jdk/test/java/util/ResourceBundle/modules/cache/src/test/jdk/test/Main.java +++ b/jdk/test/java/util/ResourceBundle/modules/cache/src/test/jdk/test/Main.java @@ -23,7 +23,6 @@ package jdk.test; -import java.lang.reflect.Module; import java.util.MissingResourceException; import java.util.ResourceBundle; @@ -56,4 +55,4 @@ public class Main { jdk.test.util.Bundles.getBundle(); } } -} \ No newline at end of file +} diff --git a/jdk/test/java/lang/invoke/modules/ModuleAccessControlTest.java b/jdk/test/java/util/ResourceBundle/modules/casesensitive/CaseInsensitiveNameClash.java similarity index 57% rename from jdk/test/java/lang/invoke/modules/ModuleAccessControlTest.java rename to jdk/test/java/util/ResourceBundle/modules/casesensitive/CaseInsensitiveNameClash.java index 32adfd9d5e0..b3eef5d3d6c 100644 --- a/jdk/test/java/lang/invoke/modules/ModuleAccessControlTest.java +++ b/jdk/test/java/util/ResourceBundle/modules/casesensitive/CaseInsensitiveNameClash.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,61 +21,52 @@ * questions. */ +/* + * @test + * @bug 8177980 + * @library /lib/testlibrary + * @modules jdk.compiler + * @build CompilerUtils jdk.testlibrary.ProcessTools CaseInsensitiveNameClash + * @run testng CaseInsensitiveNameClash + */ + +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.Arrays; -import java.util.List; - -import static jdk.testlibrary.ProcessTools.executeTestJava; +import jdk.testlibrary.ProcessTools; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import static org.testng.Assert.*; -/** - * @test - * @library /lib/testlibrary - * @modules jdk.compiler - * @build CompilerUtils jdk.testlibrary.* - * @run testng ModuleAccessControlTest - * @summary Driver for testing module access checking by MethodHandles.Lookup - */ - -public class ModuleAccessControlTest { +public class CaseInsensitiveNameClash { private static final String TEST_SRC = System.getProperty("test.src"); private static final Path SRC_DIR = Paths.get(TEST_SRC, "src"); private static final Path MODS_DIR = Paths.get("mods"); - // the names of the modules in this test - private static List modules = Arrays.asList("m1", "m2"); - + private static final String MODULE = "resbundle"; + private static final String MAIN_CLASS = MODULE + "/jdk.test.Main"; /** - * Compiles all modules used by the test + * Compiles the module used by the test */ @BeforeTest public void compileAll() throws Exception { - for (String mn : modules) { - Path msrc = SRC_DIR.resolve(mn); - assertTrue(CompilerUtils - .compile(msrc, MODS_DIR, "--module-source-path", SRC_DIR.toString())); - } + Path msrc = SRC_DIR.resolve(MODULE); + assertTrue(CompilerUtils.compile(msrc, MODS_DIR, + "--module-source-path", SRC_DIR.toString())); + Path propsFile = Paths.get("jdk", "test", "main.properties"); + Files.copy(msrc.resolve(propsFile), MODS_DIR.resolve(MODULE).resolve(propsFile)); } - /** - * Launch the test - */ @Test - public void runTest() throws Exception { - int exitValue = executeTestJava("--module-path", MODS_DIR.toString(), - "-m", "m1/p1.Main") - .outputTo(System.out) - .errorTo(System.out) - .getExitValue(); - - assertTrue(exitValue == 0); + public void test() throws Exception { + assertTrue(ProcessTools.executeTestJava("--module-path", MODS_DIR.toString(), + "-m", MAIN_CLASS) + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); } - } diff --git a/jdk/test/java/util/ResourceBundle/modules/casesensitive/src/resbundle/jdk/test/Main.java b/jdk/test/java/util/ResourceBundle/modules/casesensitive/src/resbundle/jdk/test/Main.java new file mode 100644 index 00000000000..73ff726bd3c --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/casesensitive/src/resbundle/jdk/test/Main.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.test; + +import java.util.ResourceBundle; + +public class Main { + public static void main(String[] args) throws Exception { + ResourceBundle bundle = ResourceBundle.getBundle("jdk.test.main"); + if (!bundle.getString("key").equals("value")) { + throw new RuntimeException("Expected: value but get " + bundle.getString("key")); + } + } +} diff --git a/jdk/test/java/util/ResourceBundle/modules/casesensitive/src/resbundle/jdk/test/main.properties b/jdk/test/java/util/ResourceBundle/modules/casesensitive/src/resbundle/jdk/test/main.properties new file mode 100644 index 00000000000..7b89edbafe4 --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/casesensitive/src/resbundle/jdk/test/main.properties @@ -0,0 +1 @@ +key=value diff --git a/jdk/test/java/util/ResourceBundle/modules/casesensitive/src/resbundle/module-info.java b/jdk/test/java/util/ResourceBundle/modules/casesensitive/src/resbundle/module-info.java new file mode 100644 index 00000000000..fdb2838915d --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/casesensitive/src/resbundle/module-info.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module resbundle { +} diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/run.sh b/jdk/test/java/util/ResourceBundle/modules/layer/run.sh new file mode 100644 index 00000000000..556f114a9c0 --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/layer/run.sh @@ -0,0 +1,52 @@ +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# @test +# @bug 8180375 +# @summary Tests resource bundles are correctly loaded from +# modules through ".spi.Provider" types. + +set -e + +if [ -z "$TESTJAVA" ]; then + if [ $# -lt 1 ]; then exit 1; fi + TESTJAVA="$1"; shift + COMPILEJAVA="${TESTJAVA}" + TESTSRC="`pwd`" + TESTCLASSES="`pwd`" +fi + +JAVAC="$COMPILEJAVA/bin/javac" +JAVA="$TESTJAVA/bin/java" + +rm -rf mods +$JAVAC --module-source-path $TESTSRC/src -d mods --module m1,m2 + +mkdir -p mods/m1/p/resources mods/m2/p/resources +cp $TESTSRC/src/m1/p/resources/*.properties mods/m1/p/resources +cp $TESTSRC/src/m2/p/resources/*.properties mods/m2/p/resources + +mkdir classes +$JAVAC -d classes $TESTSRC/src/Main.java + +$JAVA -cp classes Main diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/Main.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/Main.java new file mode 100644 index 00000000000..a0fb8c15305 --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/Main.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.lang.module.Configuration; +import java.lang.module.ModuleFinder; +import java.lang.reflect.Method; +import java.nio.file.Paths; +import java.util.List; +import java.util.Locale; +import java.util.ResourceBundle; + +public class Main { + public static void main(String... args) throws Exception { + ModuleFinder afterFinder = ModuleFinder.of(Paths.get("mods")); + + Configuration cf = ModuleLayer.boot().configuration() + .resolveAndBind(ModuleFinder.of(), afterFinder, + List.of("m1", "m2")); + + System.out.println("Configuration: " + cf); + + ModuleLayer l = ModuleLayer.defineModulesWithManyLoaders(cf, + List.of(ModuleLayer.boot()), + ClassLoader.getPlatformClassLoader()) + .layer(); + + Module m1 = l.findModule("m1").get(); + ResourceBundle bundle = + ResourceBundle.getBundle("p.resources.MyResource", + Locale.US, m1); + ResourceBundle jabundle = + ResourceBundle.getBundle("p.resources.MyResource", + Locale.JAPANESE, m1); + + String enResult = bundle.getString("key"); + String jaResult = jabundle.getString("key"); + if (!"hi".equals(enResult) || !"ja".equals(jaResult)) { + throw new RuntimeException("Unexpected resources loaded: en: " + + enResult + ", ja: " + jaResult); + } + + Class c = Class.forName(m1, "p.Main"); + Method m = c.getDeclaredMethod("run"); + m.invoke(null); + } +} diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/module-info.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/module-info.java new file mode 100644 index 00000000000..de3da2e3b3a --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/module-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m1 { + exports p; + exports p.resources.spi; + uses p.resources.spi.MyResourceProvider; + provides p.resources.spi.MyResourceProvider with p.internal.BundleProvider; +} diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/Main.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/Main.java new file mode 100644 index 00000000000..97e4ef17b22 --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/Main.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p; + +import java.util.Locale; +import java.util.ResourceBundle; +import java.io.InputStream; + +public class Main { + public static void main(String... args) { + run(); + } + + public static void run() { + ClassLoader loader = + Main.class.getModule().getLayer().findLoader("m1"); + ClassLoader loader2 = + Main.class.getModule().getLayer().findLoader("m2"); + + ResourceBundle bundle = + ResourceBundle.getBundle("p.resources.MyResource", Locale.US); + ResourceBundle bundle1 = + ResourceBundle.getBundle("p.resources.MyResource", Locale.JAPANESE); + + String enResult = bundle.getString("key"); + String jaResult = bundle1.getString("key"); + if (!"hi".equals(enResult) || !"ja".equals(jaResult)) { + throw new RuntimeException("Unexpected resources loaded: en: " + + enResult + ", ja: " + jaResult); + } + } +} diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/internal/BundleProvider.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/internal/BundleProvider.java new file mode 100644 index 00000000000..2d9b80261b3 --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/internal/BundleProvider.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p.internal; + +import p.resources.spi.MyResourceProvider; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.util.Locale; +import java.util.PropertyResourceBundle; +import java.util.ResourceBundle; +import java.util.spi.AbstractResourceBundleProvider; + +public class BundleProvider extends AbstractResourceBundleProvider + implements MyResourceProvider { + public BundleProvider() { + super(); + } + @Override + public ResourceBundle getBundle(String baseName, Locale locale) { + if (locale.equals(Locale.ENGLISH) || locale.equals(Locale.ROOT)) { + return super.getBundle(baseName, locale); + } + + return null; + } + +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/MyResource.properties similarity index 73% rename from jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties rename to jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/MyResource.properties index c0267b823ea..6757999cab5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties +++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/MyResource.properties @@ -1,12 +1,10 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. +# 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 @@ -23,4 +21,4 @@ # questions. # -FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} +key=hi diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/spi/MyResourceProvider.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/spi/MyResourceProvider.java new file mode 100644 index 00000000000..2974da2614f --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/spi/MyResourceProvider.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p.resources.spi; + +import java.util.spi.ResourceBundleProvider; + + +public interface MyResourceProvider extends ResourceBundleProvider { +} diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/module-info.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/module-info.java new file mode 100644 index 00000000000..78f5a40f627 --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/module-info.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m2 { + requires m1; + provides p.resources.spi.MyResourceProvider with p.internal.BundleProvider; +} diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/internal/BundleProvider.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/internal/BundleProvider.java new file mode 100644 index 00000000000..42edf475064 --- /dev/null +++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/internal/BundleProvider.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p.internal; + +import p.resources.spi.MyResourceProvider; + + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.util.Locale; +import java.util.ResourceBundle; +import java.util.spi.AbstractResourceBundleProvider; + +public class BundleProvider extends AbstractResourceBundleProvider + implements MyResourceProvider { + public BundleProvider() { + super(); + } + @Override + public ResourceBundle getBundle(String baseName, Locale locale) { + if (locale.equals(Locale.JAPANESE)) { + return super.getBundle(baseName, locale); + } + return null; + } +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/resources/MyResource_ja.properties similarity index 73% rename from jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties rename to jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/resources/MyResource_ja.properties index c0267b823ea..38ffe0d3b94 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties +++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/resources/MyResource_ja.properties @@ -1,12 +1,10 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. +# 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 @@ -23,4 +21,4 @@ # questions. # -FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} +key=ja diff --git a/jdk/test/java/util/ResourceBundle/modules/security/src/test/jdk/test/Main.java b/jdk/test/java/util/ResourceBundle/modules/security/src/test/jdk/test/Main.java index ecea6abd576..88b9222f137 100644 --- a/jdk/test/java/util/ResourceBundle/modules/security/src/test/jdk/test/Main.java +++ b/jdk/test/java/util/ResourceBundle/modules/security/src/test/jdk/test/Main.java @@ -24,7 +24,6 @@ package jdk.test; import p1.Bundle; -import java.lang.reflect.Module; import java.util.ResourceBundle; public class Main { diff --git a/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java similarity index 93% rename from jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/MyResourcesProvider.java rename to jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java index 29fc236fa85..798b6884454 100644 --- a/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/MyResourcesProvider.java +++ b/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package jdk.test.resources; +package jdk.test.resources.spi; import java.util.Locale; import java.util.spi.AbstractResourceBundleProvider; diff --git a/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/module-info.java index 7725c44188d..3478bae3464 100644 --- a/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/module-info.java @@ -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 @@ -22,6 +22,6 @@ */ module bundles { - exports jdk.test.resources to test; - provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProvider; + exports jdk.test.resources.spi to test; + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.spi.MyResourcesProvider; } diff --git a/jdk/test/java/util/ResourceBundle/modules/simple/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/simple/src/test/module-info.java index c5ac262f6df..b9aa906b264 100644 --- a/jdk/test/java/util/ResourceBundle/modules/simple/src/test/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/simple/src/test/module-info.java @@ -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 @@ -24,5 +24,5 @@ module test { requires bundles; - uses jdk.test.resources.MyResourcesProvider; + uses jdk.test.resources.spi.MyResourcesProvider; } diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/embargo/jdk/embargo/TestWithNoModuleArg.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/embargo/jdk/embargo/TestWithNoModuleArg.java index 5e100abc89b..1b7aef1ecdd 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/embargo/jdk/embargo/TestWithNoModuleArg.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/embargo/jdk/embargo/TestWithNoModuleArg.java @@ -23,7 +23,6 @@ package jdk.embargo; -import java.lang.reflect.Module; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/embargo/jdk/embargo/TestWithUnnamedModuleArg.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/embargo/jdk/embargo/TestWithUnnamedModuleArg.java index 8f2ca8e1206..b2df284acfc 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/embargo/jdk/embargo/TestWithUnnamedModuleArg.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/embargo/jdk/embargo/TestWithUnnamedModuleArg.java @@ -23,7 +23,6 @@ package jdk.embargo; -import java.lang.reflect.Module; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/spi/MyResourcesProvider.java similarity index 93% rename from jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/MyResourcesProvider.java rename to jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/spi/MyResourcesProvider.java index 86d9daf2089..8448f1a6336 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/MyResourcesProvider.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/spi/MyResourcesProvider.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package jdk.test.resources.exported.classes; +package jdk.test.resources.exported.classes.spi; import java.util.Locale; import java.util.spi.AbstractResourceBundleProvider; diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/module-info.java index a110e88d28d..71a68af7fde 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/module-info.java @@ -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 @@ -25,6 +25,6 @@ module exported.named.bundles { // unqualified exports to verify that resource bundles are not picked // up by other named modules exports jdk.test.resources.exported.classes; - provides jdk.test.resources.exported.classes.MyResourcesProvider - with jdk.test.resources.exported.classes.MyResourcesProvider; + provides jdk.test.resources.exported.classes.spi.MyResourcesProvider + with jdk.test.resources.exported.classes.spi.MyResourcesProvider; } diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/spi/MyResourcesProvider.java similarity index 94% rename from jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/MyResourcesProvider.java rename to jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/spi/MyResourcesProvider.java index 70c391c0956..95b9f0b899c 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/MyResourcesProvider.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/spi/MyResourcesProvider.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package jdk.test.resources.classes; +package jdk.test.resources.classes.spi; import java.util.Locale; import java.util.ResourceBundle; diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/spi/MyResourcesProvider.java similarity index 94% rename from jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/MyResourcesProvider.java rename to jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/spi/MyResourcesProvider.java index 73b92fbde35..dcf2f41d530 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/MyResourcesProvider.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/spi/MyResourcesProvider.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package jdk.test.resources.props; +package jdk.test.resources.props.spi; import java.util.Locale; import java.util.ResourceBundle; diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/module-info.java index a9fd37f1ed0..78e9a033bcc 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/module-info.java @@ -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 @@ -22,10 +22,10 @@ */ module named.bundles { - exports jdk.test.resources.classes to test; // exports only to test - exports jdk.test.resources.props to test; // exports only to test - provides jdk.test.resources.classes.MyResourcesProvider - with jdk.test.resources.classes.MyResourcesProvider; - provides jdk.test.resources.props.MyResourcesProvider - with jdk.test.resources.props.MyResourcesProvider; + exports jdk.test.resources.classes.spi to test; // exports only to test + exports jdk.test.resources.props.spi to test; // exports only to test + provides jdk.test.resources.classes.spi.MyResourcesProvider + with jdk.test.resources.classes.spi.MyResourcesProvider; + provides jdk.test.resources.props.spi.MyResourcesProvider + with jdk.test.resources.props.spi.MyResourcesProvider; } diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/pkg/jdk/pkg/test/Main.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/pkg/jdk/pkg/test/Main.java index 54ac2e7d686..8706ab2838b 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/pkg/jdk/pkg/test/Main.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/pkg/jdk/pkg/test/Main.java @@ -23,7 +23,6 @@ package jdk.pkg.test; -import java.lang.reflect.Module; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/jdk/test/TestWithNoModuleArg.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/jdk/test/TestWithNoModuleArg.java index 19de28a8be1..3a16a412b1c 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/jdk/test/TestWithNoModuleArg.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/jdk/test/TestWithNoModuleArg.java @@ -23,7 +23,6 @@ package jdk.test; -import java.lang.reflect.Module; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/jdk/test/TestWithUnnamedModuleArg.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/jdk/test/TestWithUnnamedModuleArg.java index d36b53f864a..fc6cd208f2c 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/jdk/test/TestWithUnnamedModuleArg.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/jdk/test/TestWithUnnamedModuleArg.java @@ -23,7 +23,6 @@ package jdk.test; -import java.lang.reflect.Module; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/module-info.java index 00954c88c86..e6068550dc6 100644 --- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/module-info.java @@ -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 @@ -22,8 +22,8 @@ */ module test { - // jdk.test.resources.classes.MyResourcesProvider is in named.bundles. + // jdk.test.resources.classes.spi.MyResourcesProvider is in named.bundles. requires named.bundles; - uses jdk.test.resources.classes.MyResourcesProvider; - uses jdk.test.resources.props.MyResourcesProvider; + uses jdk.test.resources.classes.spi.MyResourcesProvider; + uses jdk.test.resources.props.spi.MyResourcesProvider; } diff --git a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java similarity index 96% rename from jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/MyResourcesProvider.java rename to jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java index ca4cec531e8..ee8a676983c 100644 --- a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/MyResourcesProvider.java +++ b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package jdk.test.resources; +package jdk.test.resources.spi; import java.io.BufferedInputStream; import java.io.InputStream; diff --git a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/module-info.java index 7725c44188d..3478bae3464 100644 --- a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/module-info.java @@ -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 @@ -22,6 +22,6 @@ */ module bundles { - exports jdk.test.resources to test; - provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProvider; + exports jdk.test.resources.spi to test; + provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.spi.MyResourcesProvider; } diff --git a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/test/module-info.java index c5ac262f6df..b9aa906b264 100644 --- a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/test/module-info.java +++ b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/test/module-info.java @@ -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 @@ -24,5 +24,5 @@ module test { requires bundles; - uses jdk.test.resources.MyResourcesProvider; + uses jdk.test.resources.spi.MyResourcesProvider; } diff --git a/jdk/test/java/util/Scanner/ScannerStreamTest.java b/jdk/test/java/util/Scanner/ScannerStreamTest.java index 98d28a71a5a..99d21dce1c1 100644 --- a/jdk/test/java/util/Scanner/ScannerStreamTest.java +++ b/jdk/test/java/util/Scanner/ScannerStreamTest.java @@ -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 @@ -33,6 +33,7 @@ import java.util.List; import java.util.Scanner; import java.util.function.Consumer; import java.util.function.Supplier; +import java.util.regex.Matcher; import java.util.regex.MatchResult; import java.util.regex.Pattern; import java.util.stream.LambdaTestHelpers; @@ -44,7 +45,7 @@ import static org.testng.Assert.*; /** * @test - * @bug 8072722 + * @bug 8072722 8150488 * @summary Tests of stream support in java.util.Scanner * @library ../stream/bootlib * @build java.base/java.util.stream.OpTestCase @@ -56,19 +57,22 @@ public class ScannerStreamTest extends OpTestCase { static File inputFile = new File(System.getProperty("test.src", "."), "input.txt"); - @DataProvider(name = "Patterns") - public static Object[][] makeStreamTestData() { + @DataProvider(name = "Tokens") + public static Object[][] makeTokensTestData() { // each inner array is [String description, String input, String delimiter] // delimiter may be null List data = new ArrayList<>(); data.add(new Object[] { "default delimiter", "abc def ghi", null }); data.add(new Object[] { "fixed delimiter", "abc,def,,ghi", "," }); - data.add(new Object[] { "regexp delimiter", "###abc##def###ghi###j", "#+" }); + data.add(new Object[] { "regex delimiter", "###abc##def###ghi###j", "#+" }); return data.toArray(new Object[0][]); } + /* + * Creates a scanner over the input, applying a delimiter if non-null. + */ Scanner makeScanner(String input, String delimiter) { Scanner sc = new Scanner(input); if (delimiter != null) { @@ -77,7 +81,11 @@ public class ScannerStreamTest extends OpTestCase { return sc; } - @Test(dataProvider = "Patterns") + /* + * Given input and a delimiter, tests that tokens() returns the same + * results that would be provided by a Scanner hasNext/next loop. + */ + @Test(dataProvider = "Tokens") public void tokensTest(String description, String input, String delimiter) { // derive expected result by using conventional loop Scanner sc = makeScanner(input, delimiter); @@ -93,6 +101,9 @@ public class ScannerStreamTest extends OpTestCase { .exercise(); } + /* + * Creates a Scanner over the given input file. + */ Scanner makeFileScanner(File file) { try { return new Scanner(file, "UTF-8"); @@ -101,7 +112,12 @@ public class ScannerStreamTest extends OpTestCase { } } - public void findAllTest() { + /* + * Tests that the matches produced by findAll(pat) are the same + * as what are returned by findWithinHorizon(pat, 0). This tests + * a single pattern against a single input file. + */ + public void findAllFileTest() { // derive expected result by using conventional loop Pattern pat = Pattern.compile("[A-Z]{7,}"); List expected = new ArrayList<>(); @@ -116,10 +132,66 @@ public class ScannerStreamTest extends OpTestCase { Supplier> ss = () -> makeFileScanner(inputFile).findAll(pat).map(MatchResult::group); - withData(TestData.Factory.ofSupplier("findAllTest", ss)) + withData(TestData.Factory.ofSupplier("findAllFileTest", ss)) .stream(LambdaTestHelpers.identity()) .expectedResult(expected) .exercise(); } + @DataProvider(name = "FindAllZero") + public static Object[][] makeFindAllZeroTestData() { + // each inner array is [String input, String patternString] + List data = new ArrayList<>(); + + data.add(new Object[] { "aaaaa", "a*" }); + data.add(new Object[] { "aaaaab", "a*" }); + data.add(new Object[] { "aaaaabb", "a*" }); + data.add(new Object[] { "aaaaabbb", "a*" }); + data.add(new Object[] { "aaabbaaaa", "a*" }); + data.add(new Object[] { "aaabbaaaab", "a*" }); + data.add(new Object[] { "aaabbaaaabb", "a*" }); + data.add(new Object[] { "aaabbaaaabbb", "a*" }); + data.add(new Object[] { "aaabbaaaa", "a*|b*" }); + data.add(new Object[] { "aaabbaaaab", "a*|b*" }); + data.add(new Object[] { "aaabbaaaabb", "a*|b*" }); + data.add(new Object[] { "aaabbaaaabbb", "a*|b*" }); + + return data.toArray(new Object[0][]); + } + + /* + * Tests findAll() using a pattern against an input string. + * The results from findAll() should equal the results obtained + * using a loop around Matcher.find(). + * + * The provided regexes should allow zero-length matches. + * This primarily tests the auto-advance feature of findAll() that + * occurs if the regex match is of zero length to see if it has the + * same behavior as Matcher.find()'s auto-advance (JDK-8150488). + * Without auto-advance, findAll() would return an infinite stream + * of zero-length matches. Apply a limit to the stream so + * that an infinite stream will be truncated. The limit must be + * high enough that the resulting truncated stream won't be + * mistaken for a correct expected result. + */ + @Test(dataProvider = "FindAllZero") + public void findAllZeroTest(String input, String patternString) { + Pattern pattern = Pattern.compile(patternString); + + // generate expected result using Matcher.find() + Matcher m = pattern.matcher(input); + List expected = new ArrayList<>(); + while (m.find()) { + expected.add(m.group()); + } + + Supplier> ss = () -> new Scanner(input).findAll(pattern) + .limit(100) + .map(MatchResult::group); + + withData(TestData.Factory.ofSupplier("findAllZeroTest", ss)) + .stream(LambdaTestHelpers.identity()) + .expectedResult(expected) + .exercise(); + } } diff --git a/jdk/test/java/util/ServiceLoader/modules/BadProvidersTest.java b/jdk/test/java/util/ServiceLoader/BadProvidersTest.java similarity index 71% rename from jdk/test/java/util/ServiceLoader/modules/BadProvidersTest.java rename to jdk/test/java/util/ServiceLoader/BadProvidersTest.java index c28e3b91911..fbe406e8146 100644 --- a/jdk/test/java/util/ServiceLoader/modules/BadProvidersTest.java +++ b/jdk/test/java/util/ServiceLoader/BadProvidersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -24,7 +24,8 @@ /** * @test * @library /lib/testlibrary - * @modules jdk.compiler + * @modules java.base/jdk.internal.org.objectweb.asm + * jdk.compiler * @build CompilerUtils * @run testng/othervm BadProvidersTest * @summary Basic test of ServiceLoader with bad provider and bad provider @@ -33,7 +34,6 @@ import java.lang.module.Configuration; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -45,6 +45,10 @@ import java.util.ServiceLoader.Provider; import java.util.Set; import java.util.stream.Collectors; +import jdk.internal.org.objectweb.asm.ClassWriter; +import jdk.internal.org.objectweb.asm.MethodVisitor; +import static jdk.internal.org.objectweb.asm.Opcodes.*; + import org.testng.annotations.Test; import org.testng.annotations.DataProvider; import static org.testng.Assert.*; @@ -87,14 +91,14 @@ public class BadProvidersTest { private List loadProviders(Path mp, String moduleName) throws Exception { ModuleFinder finder = ModuleFinder.of(mp); - Layer bootLayer = Layer.boot(); + ModuleLayer bootLayer = ModuleLayer.boot(); Configuration cf = bootLayer.configuration() - .resolveRequiresAndUses(finder, ModuleFinder.of(), Set.of(moduleName)); + .resolveAndBind(finder, ModuleFinder.of(), Set.of(moduleName)); ClassLoader scl = ClassLoader.getSystemClassLoader(); - Layer layer = Layer.boot().defineModulesWithOneLoader(cf, scl); + ModuleLayer layer = ModuleLayer.boot().defineModulesWithOneLoader(cf, scl); Class service = layer.findLoader(moduleName).loadClass(TEST_SERVICE); @@ -192,5 +196,68 @@ public class BadProvidersTest { loadProviders(mods, TEST2_MODULE).forEach(Provider::get); } + + /** + * Test a service provider that defines more than one no-args + * public static "provider" method. + */ + @Test(expectedExceptions = ServiceConfigurationError.class) + public void testWithTwoFactoryMethods() throws Exception { + Path mods = compileTest(TEST1_MODULE); + + ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + + ClassWriter.COMPUTE_FRAMES); + cw.visit(V1_9, + ACC_PUBLIC + ACC_SUPER, + "p/ProviderFactory", + null, + "java/lang/Object", + null); + + // public static p.Service provider() + MethodVisitor mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, + "provider", + "()Lp/Service;", + null, + null); + mv.visitTypeInsn(NEW, "p/ProviderFactory$1"); + mv.visitInsn(DUP); + mv.visitMethodInsn(INVOKESPECIAL, + "p/ProviderFactory$1", + "", "()V", + false); + mv.visitInsn(ARETURN); + mv.visitMaxs(0, 0); + mv.visitEnd(); + + // public static p.ProviderFactory$1 provider() + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, + "provider", + "()Lp/ProviderFactory$1;", + null, + null); + mv.visitTypeInsn(NEW, "p/ProviderFactory$1"); + mv.visitInsn(DUP); + mv.visitMethodInsn(INVOKESPECIAL, + "p/ProviderFactory$1", + "", + "()V", + false); + mv.visitInsn(ARETURN); + mv.visitMaxs(0, 0); + mv.visitEnd(); + + cw.visitEnd(); + + // write the class bytes into the compiled module directory + Path classFile = mods.resolve(TEST1_MODULE) + .resolve("p") + .resolve("ProviderFactory.class"); + Files.write(classFile, cw.toByteArray()); + + // load providers and instantiate each one + loadProviders(mods, TEST1_MODULE).forEach(Provider::get); + } + } diff --git a/jdk/test/java/util/ServiceLoader/modules/Basic.java b/jdk/test/java/util/ServiceLoader/ModulesTest.java similarity index 81% rename from jdk/test/java/util/ServiceLoader/modules/Basic.java rename to jdk/test/java/util/ServiceLoader/ModulesTest.java index 7833c0e2771..622eea0d1fd 100644 --- a/jdk/test/java/util/ServiceLoader/modules/Basic.java +++ b/jdk/test/java/util/ServiceLoader/ModulesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -23,23 +23,31 @@ /** * @test - * @library modules + * @modules java.scripting + * @library modules /lib/testlibrary * @build bananascript/* - * @compile src/pearscript/org/pear/PearScriptEngineFactory.java - * src/pearscript/org/pear/PearScript.java - * @run testng/othervm Basic + * @build JarUtils + * @compile classpath/pearscript/org/pear/PearScriptEngineFactory.java + * classpath/pearscript/org/pear/PearScript.java + * @run testng/othervm ModulesTest * @summary Basic test for ServiceLoader with a provider deployed as a module. */ import java.lang.module.Configuration; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Optional; +import java.util.ServiceLoader; import java.util.ServiceLoader.Provider; +import java.util.Set; import java.util.stream.Collectors; import javax.script.ScriptEngineFactory; @@ -56,16 +64,16 @@ import static org.testng.Assert.*; * with a service configuration file. */ -public class Basic { +public class ModulesTest { // Copy the services configuration file for "pearscript" into place. @BeforeTest public void setup() throws Exception { - Path src = Paths.get(System.getProperty("test.src", "")); - Path classes = Paths.get(System.getProperty("test.classes", "")); + Path src = Paths.get(System.getProperty("test.src")); + Path classes = Paths.get(System.getProperty("test.classes")); String st = ScriptEngineFactory.class.getName(); Path config = Paths.get("META-INF", "services", st); - Path source = src.resolve("src").resolve("pearscript").resolve(config); + Path source = src.resolve("classpath").resolve("pearscript").resolve(config); Path target = classes.resolve(config); Files.createDirectories(target.getParent()); Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING); @@ -204,7 +212,7 @@ public class Basic { // iterator ServiceLoader loader - = ServiceLoader.load(ScriptEngineFactory.class, pcl); + = ServiceLoader.load(ScriptEngineFactory.class, pcl); Set names = collectAll(loader) .stream() .map(ScriptEngineFactory::getEngineName) @@ -222,13 +230,51 @@ public class Basic { assertFalse(names.contains("PearScriptEngine")); } + /** + * Basic test of ServiceLoader.load where the service provider module is an + * automatic module. + */ + @Test + public void testWithAutomaticModule() throws Exception { + Path classes = Paths.get(System.getProperty("test.classes")); + Path jar = Files.createTempDirectory("lib").resolve("pearscript.jar"); + JarUtils.createJarFile(jar, classes, "META-INF", "org"); + + ModuleFinder finder = ModuleFinder.of(jar); + ModuleLayer bootLayer = ModuleLayer.boot(); + Configuration parent = bootLayer.configuration(); + Configuration cf = parent.resolveAndBind(finder, ModuleFinder.of(), Set.of()); + assertTrue(cf.modules().size() == 1); + + ClassLoader scl = ClassLoader.getSystemClassLoader(); + ModuleLayer layer = bootLayer.defineModulesWithOneLoader(cf, scl); + assertTrue(layer.modules().size() == 1); + + ClassLoader loader = layer.findLoader("pearscript"); + ScriptEngineFactory factory; + + // load using the class loader as context + factory = ServiceLoader.load(ScriptEngineFactory.class, loader) + .findFirst() + .orElse(null); + assertNotNull(factory); + assertTrue(factory.getClass().getClassLoader() == loader); + + // load using the layer as context + factory = ServiceLoader.load(layer, ScriptEngineFactory.class) + .findFirst() + .orElse(null); + assertNotNull(factory); + assertTrue(factory.getClass().getClassLoader() == loader); + } + /** * Basic test of ServiceLoader.load, using the class loader for * a module in a custom layer as the context. */ @Test public void testWithCustomLayer1() { - Layer layer = createCustomLayer("bananascript"); + ModuleLayer layer = createCustomLayer("bananascript"); ClassLoader loader = layer.findLoader("bananascript"); List providers @@ -257,7 +303,7 @@ public class Basic { */ @Test public void testWithCustomLayer2() { - Layer layer = createCustomLayer("bananascript"); + ModuleLayer layer = createCustomLayer("bananascript"); List factories = collectAll(ServiceLoader.load(layer, ScriptEngineFactory.class)); @@ -292,7 +338,7 @@ public class Basic { */ @Test public void testWithCustomLayer3() { - Layer bootLayer = Layer.boot(); + ModuleLayer bootLayer = ModuleLayer.boot(); Configuration cf0 = bootLayer.configuration(); // boot layer should contain "bananascript" @@ -311,21 +357,22 @@ public class Basic { ModuleFinder finder = ModuleFinder.of(dir); // layer1 - Configuration cf1 = cf0.resolveRequiresAndUses(finder, ModuleFinder.of(), Set.of()); - Layer layer1 = bootLayer.defineModulesWithOneLoader(cf1, scl); + Configuration cf1 = cf0.resolveAndBind(finder, ModuleFinder.of(), Set.of()); + ModuleLayer layer1 = bootLayer.defineModulesWithOneLoader(cf1, scl); assertTrue(layer1.modules().size() == 1); // layer2 - Configuration cf2 = cf0.resolveRequiresAndUses(finder, ModuleFinder.of(), Set.of()); - Layer layer2 = bootLayer.defineModulesWithOneLoader(cf2, scl); + Configuration cf2 = cf0.resolveAndBind(finder, ModuleFinder.of(), Set.of()); + ModuleLayer layer2 = bootLayer.defineModulesWithOneLoader(cf2, scl); assertTrue(layer2.modules().size() == 1); // layer3 with layer1 and layer2 as parents - Configuration cf3 = Configuration.resolveRequiresAndUses(finder, + Configuration cf3 = Configuration.resolveAndBind(finder, List.of(cf1, cf2), ModuleFinder.of(), Set.of()); - Layer layer3 = Layer.defineModulesWithOneLoader(cf3, List.of(layer1, layer2), scl).layer(); + ModuleLayer layer3 + = ModuleLayer.defineModulesWithOneLoader(cf3, List.of(layer1, layer2), scl).layer(); assertTrue(layer3.modules().size() == 1); @@ -389,12 +436,12 @@ public class Basic { @Test(expectedExceptions = { NullPointerException.class }) public void testLoadNull3() { class S { } - ServiceLoader.load((Layer) null, S.class); + ServiceLoader.load((ModuleLayer) null, S.class); } @Test(expectedExceptions = { NullPointerException.class }) public void testLoadNull4() { - ServiceLoader.load(Layer.empty(), null); + ServiceLoader.load(ModuleLayer.empty(), null); } @Test(expectedExceptions = { NullPointerException.class }) @@ -403,19 +450,19 @@ public class Basic { } /** - * Create a custom Layer by resolving the given module names. The modules + * Create a custom layer by resolving the given module names. The modules * are located in the {@code ${test.classes}/modules} directory. */ - private Layer createCustomLayer(String... modules) { + private ModuleLayer createCustomLayer(String... modules) { Path dir = Paths.get(System.getProperty("test.classes", "."), "modules"); ModuleFinder finder = ModuleFinder.of(dir); Set roots = new HashSet<>(); Collections.addAll(roots, modules); - Layer bootLayer = Layer.boot(); + ModuleLayer bootLayer = ModuleLayer.boot(); Configuration parent = bootLayer.configuration(); - Configuration cf = parent.resolveRequires(finder, ModuleFinder.of(), roots); + Configuration cf = parent.resolve(finder, ModuleFinder.of(), roots); ClassLoader scl = ClassLoader.getSystemClassLoader(); - Layer layer = bootLayer.defineModulesWithOneLoader(cf, scl); + ModuleLayer layer = bootLayer.defineModulesWithOneLoader(cf, scl); assertTrue(layer.modules().size() == 1); return layer; } diff --git a/jdk/test/java/util/ServiceLoader/NoInterferenceTest.java b/jdk/test/java/util/ServiceLoader/NoInterferenceTest.java new file mode 100644 index 00000000000..05f08f83210 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/NoInterferenceTest.java @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @library /lib/testlibrary + * @modules jdk.compiler + * @build CompilerUtils + * @run testng NoInterferenceTest + * @summary Basic test of ServiceLoader that ensures there is no interference + * when there are two service interfaces of the same name in a layer + * or overridden in a child layer. + */ + +import java.lang.module.Configuration; +import java.lang.module.ModuleFinder; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; +import java.util.ServiceLoader; +import java.util.Set; + +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +public class NoInterferenceTest { + + private static final String TEST_SRC = System.getProperty("test.src"); + private static final Path SRC_DIR = Paths.get(TEST_SRC, "modules"); + private static final Path MODS_DIR = Paths.get("mods"); + private static final List MODULES = Arrays.asList("s1", "p1", "s2", "p2"); + + @BeforeTest + void compile() throws Exception { + Files.createDirectory(MODS_DIR); + for (String name : MODULES) { + Path src = SRC_DIR.resolve(name); + Path output = Files.createDirectory(MODS_DIR.resolve(name)); + assertTrue(CompilerUtils.compile(src, output, "-p", MODS_DIR.toString())); + } + } + + @Test + public void test() throws Exception { + ModuleFinder empty = ModuleFinder.of(); + ModuleFinder finder = ModuleFinder.of(MODS_DIR); + + ModuleLayer bootLayer = ModuleLayer.boot(); + + Configuration cf0 = bootLayer.configuration(); + Configuration cf1 = cf0.resolveAndBind(finder, empty, Set.of("s1", "s2")); + Configuration cf2 = cf1.resolveAndBind(finder, empty, Set.of("s1", "s2")); + + // cf1 contains s1, p1, s2, p2 + assertTrue(cf1.modules().size() == 4); + + // cf1 contains s1, p1, s2, p2 + assertTrue(cf2.modules().size() == 4); + + ClassLoader scl = ClassLoader.getSystemClassLoader(); + + ModuleLayer layer1 = bootLayer.defineModulesWithManyLoaders(cf1, scl); + testLayer(layer1); + + ModuleLayer layer2 = layer1.defineModulesWithManyLoaders(cf2, scl); + testLayer(layer2); + } + + /** + * Tests that the layer contains s1, p1, s2, and p2. + * + * Tests loading instances of s1/p.S and s2/p.S. + */ + private void testLayer(ModuleLayer layer) throws Exception { + assertTrue(layer.modules().size() == 4); + Module s1 = layer.findModule("s1").get(); + Module p1 = layer.findModule("p1").get(); + Module s2 = layer.findModule("s2").get(); + Module p2 = layer.findModule("p2").get(); + + // p1 reads s1 + assertTrue(p1.canRead(s1)); + assertFalse(p1.canRead(s2)); + + // p2 reads s2 + assertTrue(p2.canRead(s2)); + assertFalse(p2.canRead(s1)); + + // iterate over implementations of s1/p.S + { + ClassLoader loader = layer.findLoader("s1"); + Class service = loader.loadClass("p.S"); + + List list = collectAll(ServiceLoader.load(service, loader)); + assertTrue(list.size() == 1); + assertTrue(list.get(0).getClass().getModule() == p1); + + list = collectAll(ServiceLoader.load(layer, service)); + assertTrue(list.size() == 1); + assertTrue(list.get(0).getClass().getModule() == p1); + } + + // iterate over implementations of s2/p.S + { + ClassLoader loader = layer.findLoader("s2"); + Class service = loader.loadClass("p.S"); + + List list = collectAll(ServiceLoader.load(service, loader)); + assertTrue(list.size() == 1); + assertTrue(list.get(0).getClass().getModule() == p2); + + list = collectAll(ServiceLoader.load(layer, service)); + assertTrue(list.size() == 1); + assertTrue(list.get(0).getClass().getModule() == p2); + } + } + + private List collectAll(ServiceLoader loader) { + List list = new ArrayList<>(); + Iterator iterator = loader.iterator(); + while (iterator.hasNext()) { + list.add(iterator.next()); + } + return list; + } +} \ No newline at end of file diff --git a/jdk/test/java/util/ServiceLoader/ReloadTest.java b/jdk/test/java/util/ServiceLoader/ReloadTest.java new file mode 100644 index 00000000000..e6b7ae7652f --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/ReloadTest.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @library modules + * @modules java.scripting + * @run testng/othervm ReloadTest + * @summary Basic test of ServiceLoader.reload + */ + +import java.util.ConcurrentModificationException; +import java.util.Iterator; +import java.util.List; +import java.util.ServiceLoader; +import java.util.ServiceLoader.Provider; +import java.util.Spliterator; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import static java.util.ServiceLoader.*; +import javax.script.ScriptEngineFactory; + +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +@Test +public class ReloadTest { + + public void testReload() { + ServiceLoader sl = load(ScriptEngineFactory.class); + List names1 = sl.stream() + .map(Provider::get) + .map(ScriptEngineFactory::getEngineName) + .collect(Collectors.toList()); + assertFalse(names1.isEmpty()); + sl.reload(); + List names2 = sl.stream() + .map(Provider::get) + .map(ScriptEngineFactory::getEngineName) + .collect(Collectors.toList()); + assertEquals(names1, names2); + } + + @Test(expectedExceptions = { ConcurrentModificationException.class }) + public void testIteratorHasNext() { + ServiceLoader sl = load(ScriptEngineFactory.class); + Iterator iterator = sl.iterator(); + sl.reload(); + iterator.hasNext(); + } + + @Test(expectedExceptions = { ConcurrentModificationException.class }) + public void testIteratorNext() { + ServiceLoader sl = load(ScriptEngineFactory.class); + Iterator iterator = sl.iterator(); + assertTrue(iterator.hasNext()); + sl.reload(); + iterator.next(); + } + + @Test(expectedExceptions = { ConcurrentModificationException.class }) + public void testStreamFindAny() { + ServiceLoader sl = load(ScriptEngineFactory.class); + Stream> stream = sl.stream(); + sl.reload(); + stream.findAny(); + } + + @Test(expectedExceptions = { ConcurrentModificationException.class }) + public void testSpliteratorTryAdvance() { + ServiceLoader sl = load(ScriptEngineFactory.class); + Stream> stream = sl.stream(); + Spliterator> spliterator = stream.spliterator(); + sl.reload(); + spliterator.tryAdvance(System.out::println); + } + +} diff --git a/jdk/test/java/util/ServiceLoader/modules/badfactories/badreturntype/ProviderFactory.java b/jdk/test/java/util/ServiceLoader/badfactories/badreturntype/ProviderFactory.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badfactories/badreturntype/ProviderFactory.java rename to jdk/test/java/util/ServiceLoader/badfactories/badreturntype/ProviderFactory.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badfactories/classnotpublic/ProviderFactory.java b/jdk/test/java/util/ServiceLoader/badfactories/classnotpublic/ProviderFactory.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badfactories/classnotpublic/ProviderFactory.java rename to jdk/test/java/util/ServiceLoader/badfactories/classnotpublic/ProviderFactory.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badfactories/classnotpublic/Service.java b/jdk/test/java/util/ServiceLoader/badfactories/classnotpublic/Service.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badfactories/classnotpublic/Service.java rename to jdk/test/java/util/ServiceLoader/badfactories/classnotpublic/Service.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badfactories/methodnotpublic/ProviderFactory.java b/jdk/test/java/util/ServiceLoader/badfactories/methodnotpublic/ProviderFactory.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badfactories/methodnotpublic/ProviderFactory.java rename to jdk/test/java/util/ServiceLoader/badfactories/methodnotpublic/ProviderFactory.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badfactories/methodnotpublic/Service.java b/jdk/test/java/util/ServiceLoader/badfactories/methodnotpublic/Service.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badfactories/methodnotpublic/Service.java rename to jdk/test/java/util/ServiceLoader/badfactories/methodnotpublic/Service.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badfactories/returnsnull/ProviderFactory.java b/jdk/test/java/util/ServiceLoader/badfactories/returnsnull/ProviderFactory.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badfactories/returnsnull/ProviderFactory.java rename to jdk/test/java/util/ServiceLoader/badfactories/returnsnull/ProviderFactory.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badfactories/returnsnull/Service.java b/jdk/test/java/util/ServiceLoader/badfactories/returnsnull/Service.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badfactories/returnsnull/Service.java rename to jdk/test/java/util/ServiceLoader/badfactories/returnsnull/Service.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badfactories/throwsexception/ProviderFactory.java b/jdk/test/java/util/ServiceLoader/badfactories/throwsexception/ProviderFactory.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badfactories/throwsexception/ProviderFactory.java rename to jdk/test/java/util/ServiceLoader/badfactories/throwsexception/ProviderFactory.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badfactories/throwsexception/Service.java b/jdk/test/java/util/ServiceLoader/badfactories/throwsexception/Service.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badfactories/throwsexception/Service.java rename to jdk/test/java/util/ServiceLoader/badfactories/throwsexception/Service.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badproviders/ctornotpublic/Provider.java b/jdk/test/java/util/ServiceLoader/badproviders/ctornotpublic/Provider.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badproviders/ctornotpublic/Provider.java rename to jdk/test/java/util/ServiceLoader/badproviders/ctornotpublic/Provider.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badproviders/ctornotpublic/Service.java b/jdk/test/java/util/ServiceLoader/badproviders/ctornotpublic/Service.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badproviders/ctornotpublic/Service.java rename to jdk/test/java/util/ServiceLoader/badproviders/ctornotpublic/Service.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badproviders/notasubtype/Provider.java b/jdk/test/java/util/ServiceLoader/badproviders/notasubtype/Provider.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badproviders/notasubtype/Provider.java rename to jdk/test/java/util/ServiceLoader/badproviders/notasubtype/Provider.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badproviders/notpublic/Provider.java b/jdk/test/java/util/ServiceLoader/badproviders/notpublic/Provider.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badproviders/notpublic/Provider.java rename to jdk/test/java/util/ServiceLoader/badproviders/notpublic/Provider.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badproviders/notpublic/Service.java b/jdk/test/java/util/ServiceLoader/badproviders/notpublic/Service.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badproviders/notpublic/Service.java rename to jdk/test/java/util/ServiceLoader/badproviders/notpublic/Service.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badproviders/throwsexception/Provider.java b/jdk/test/java/util/ServiceLoader/badproviders/throwsexception/Provider.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badproviders/throwsexception/Provider.java rename to jdk/test/java/util/ServiceLoader/badproviders/throwsexception/Provider.java diff --git a/jdk/test/java/util/ServiceLoader/modules/badproviders/throwsexception/Service.java b/jdk/test/java/util/ServiceLoader/badproviders/throwsexception/Service.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/badproviders/throwsexception/Service.java rename to jdk/test/java/util/ServiceLoader/badproviders/throwsexception/Service.java diff --git a/jdk/test/java/util/ServiceLoader/basic/basic.sh b/jdk/test/java/util/ServiceLoader/basic/basic.sh index 4ffd56a4411..1a3a34864d2 100644 --- a/jdk/test/java/util/ServiceLoader/basic/basic.sh +++ b/jdk/test/java/util/ServiceLoader/basic/basic.sh @@ -76,6 +76,7 @@ if [ \! -d $EXTD ]; then (cd $JARD; "$JAR" ${TESTTOOLVMOPTS} -cf ../p$n.jar *) done + cp p2.jar p2dup.jar mv p3.jar $EXTD cp $TESTCLASSES/Load.class $TESTD @@ -117,6 +118,8 @@ go "$TESTD" "" FooProvider1 go ".${SEP}p2.jar" "" FooProvider2 +go ".${SEP}p2.jar${SEP}p2dup.jar" "" FooProvider2 + go "${P3JAR}${SEP}p2.jar" "" FooProvider3 FooProvider2 go "$TESTD${SEP}p2.jar" "" FooProvider1 FooProvider2 diff --git a/jdk/test/java/util/ServiceLoader/modules/src/pearscript/META-INF/services/javax.script.ScriptEngineFactory b/jdk/test/java/util/ServiceLoader/classpath/pearscript/META-INF/services/javax.script.ScriptEngineFactory similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/src/pearscript/META-INF/services/javax.script.ScriptEngineFactory rename to jdk/test/java/util/ServiceLoader/classpath/pearscript/META-INF/services/javax.script.ScriptEngineFactory diff --git a/jdk/test/java/util/ServiceLoader/modules/src/pearscript/org/pear/PearScript.java b/jdk/test/java/util/ServiceLoader/classpath/pearscript/org/pear/PearScript.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/src/pearscript/org/pear/PearScript.java rename to jdk/test/java/util/ServiceLoader/classpath/pearscript/org/pear/PearScript.java diff --git a/jdk/test/java/util/ServiceLoader/modules/src/pearscript/org/pear/PearScriptEngineFactory.java b/jdk/test/java/util/ServiceLoader/classpath/pearscript/org/pear/PearScriptEngineFactory.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/src/pearscript/org/pear/PearScriptEngineFactory.java rename to jdk/test/java/util/ServiceLoader/classpath/pearscript/org/pear/PearScriptEngineFactory.java diff --git a/jdk/test/java/util/ServiceLoader/inheritance/NoInheritanceTest.java b/jdk/test/java/util/ServiceLoader/inheritance/NoInheritanceTest.java new file mode 100644 index 00000000000..a7834a99847 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/inheritance/NoInheritanceTest.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @build test/* + * @run main/othervm test/p.Main + * @summary Basic test of ServiceLoader to ensure that static provider methods + * are explicitly declared and not inherited from super classes + */ diff --git a/jdk/test/java/util/ServiceLoader/inheritance/test/module-info.java b/jdk/test/java/util/ServiceLoader/inheritance/test/module-info.java new file mode 100644 index 00000000000..668a2290ad4 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/inheritance/test/module-info.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import p.Main.*; + +module test { + exports p; + uses S; + provides S with P1, P2, P3; +} diff --git a/jdk/test/java/util/ServiceLoader/inheritance/test/p/Main.java b/jdk/test/java/util/ServiceLoader/inheritance/test/p/Main.java new file mode 100644 index 00000000000..d11f0bae35e --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/inheritance/test/p/Main.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p; + +import java.util.List; +import java.util.ServiceLoader; +import java.util.stream.Collectors; + +/** + * Basic test of ServiceLoader with a provider interface and 3 provider + * implementations. + * + * The provider interface (test.Main.Provider) defines a static factory method + * name "provider" that locates a provider implementation. At least one of the + * provider implementations does not define a static "provider" method. + */ + +public class Main { + public static void main(String[] args) { + List providers = ServiceLoader.load(S.class).stream() + .map(ServiceLoader.Provider::get) + .collect(Collectors.toList()); + if (providers.size() != 3) + throw new RuntimeException("Expected 3 providers"); + } + + /** + * Service type + */ + public static interface S { + } + + /** + * Base implementation, its static provider method should never be called + */ + public static class BaseProvider implements S { + protected BaseProvider() { } + public static S provider() { + throw new RuntimeException("Should not get here"); + } + } + + /** + * Provider implementation with public constructor. + */ + public static class P1 extends BaseProvider { + public P1() { } + } + + /** + * Provider implementation with static factory method. + */ + public static class P2 extends BaseProvider { + private P2() { } + public static P2 provider() { + return new P2(); + } + } + + /** + * Provider implementation with static factory method and public + * constructor. + */ + public static class P3 extends BaseProvider { + public P3() { + throw new RuntimeException("Should not get here"); + } + private P3(int x) { } + public static S provider() { + return new P3(0); + } + } +} diff --git a/jdk/test/java/util/ServiceLoader/modules/modules/bananascript/module-info.java b/jdk/test/java/util/ServiceLoader/modules/bananascript/module-info.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/modules/bananascript/module-info.java rename to jdk/test/java/util/ServiceLoader/modules/bananascript/module-info.java diff --git a/jdk/test/java/util/ServiceLoader/modules/modules/bananascript/org/banana/BananaScript.java b/jdk/test/java/util/ServiceLoader/modules/bananascript/org/banana/BananaScript.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/modules/bananascript/org/banana/BananaScript.java rename to jdk/test/java/util/ServiceLoader/modules/bananascript/org/banana/BananaScript.java diff --git a/jdk/test/java/util/ServiceLoader/modules/modules/bananascript/org/banana/BananaScriptEngineFactory.java b/jdk/test/java/util/ServiceLoader/modules/bananascript/org/banana/BananaScriptEngineFactory.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/modules/bananascript/org/banana/BananaScriptEngineFactory.java rename to jdk/test/java/util/ServiceLoader/modules/bananascript/org/banana/BananaScriptEngineFactory.java diff --git a/jdk/test/java/util/ServiceLoader/modules/p1/module-info.java b/jdk/test/java/util/ServiceLoader/modules/p1/module-info.java new file mode 100644 index 00000000000..e3ed70f88e3 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/modules/p1/module-info.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module p1 { + requires s1; + provides p.S with q.P; +} diff --git a/jdk/test/java/util/ServiceLoader/modules/p1/q/P.java b/jdk/test/java/util/ServiceLoader/modules/p1/q/P.java new file mode 100644 index 00000000000..26a0186ac25 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/modules/p1/q/P.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package q; + +import p.S; + +public class P implements S { } diff --git a/jdk/test/java/util/ServiceLoader/modules/p2/module-info.java b/jdk/test/java/util/ServiceLoader/modules/p2/module-info.java new file mode 100644 index 00000000000..aeb81471512 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/modules/p2/module-info.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module p2 { + requires s2; + provides p.S with q.P; +} diff --git a/jdk/test/java/util/ServiceLoader/modules/p2/q/P.java b/jdk/test/java/util/ServiceLoader/modules/p2/q/P.java new file mode 100644 index 00000000000..26a0186ac25 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/modules/p2/q/P.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package q; + +import p.S; + +public class P implements S { } diff --git a/jdk/test/java/util/ServiceLoader/modules/s1/module-info.java b/jdk/test/java/util/ServiceLoader/modules/s1/module-info.java new file mode 100644 index 00000000000..784ad40a8df --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/modules/s1/module-info.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module s1 { + exports p; + uses p.S; +} diff --git a/jdk/test/java/util/ServiceLoader/modules/s1/p/S.java b/jdk/test/java/util/ServiceLoader/modules/s1/p/S.java new file mode 100644 index 00000000000..e9ecc6f9949 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/modules/s1/p/S.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p; + +public interface S { } diff --git a/jdk/test/java/util/ServiceLoader/modules/s2/module-info.java b/jdk/test/java/util/ServiceLoader/modules/s2/module-info.java new file mode 100644 index 00000000000..b1d8f3ed462 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/modules/s2/module-info.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module s2 { + exports p; +} diff --git a/jdk/test/java/util/ServiceLoader/modules/s2/p/S.java b/jdk/test/java/util/ServiceLoader/modules/s2/p/S.java new file mode 100644 index 00000000000..e9ecc6f9949 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/modules/s2/p/S.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p; + +public interface S { } diff --git a/jdk/test/java/util/ServiceLoader/modules/modules/test1/module-info.java b/jdk/test/java/util/ServiceLoader/modules/test1/module-info.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/modules/test1/module-info.java rename to jdk/test/java/util/ServiceLoader/modules/test1/module-info.java diff --git a/jdk/test/java/util/ServiceLoader/modules/modules/test1/p/ProviderFactory.java b/jdk/test/java/util/ServiceLoader/modules/test1/p/ProviderFactory.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/modules/test1/p/ProviderFactory.java rename to jdk/test/java/util/ServiceLoader/modules/test1/p/ProviderFactory.java diff --git a/jdk/test/java/util/ServiceLoader/modules/modules/test1/p/Service.java b/jdk/test/java/util/ServiceLoader/modules/test1/p/Service.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/modules/test1/p/Service.java rename to jdk/test/java/util/ServiceLoader/modules/test1/p/Service.java diff --git a/jdk/test/java/util/ServiceLoader/modules/modules/test2/module-info.java b/jdk/test/java/util/ServiceLoader/modules/test2/module-info.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/modules/test2/module-info.java rename to jdk/test/java/util/ServiceLoader/modules/test2/module-info.java diff --git a/jdk/test/java/util/ServiceLoader/modules/modules/test2/p/Provider.java b/jdk/test/java/util/ServiceLoader/modules/test2/p/Provider.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/modules/test2/p/Provider.java rename to jdk/test/java/util/ServiceLoader/modules/test2/p/Provider.java diff --git a/jdk/test/java/util/ServiceLoader/modules/modules/test2/p/Service.java b/jdk/test/java/util/ServiceLoader/modules/test2/p/Service.java similarity index 100% rename from jdk/test/java/util/ServiceLoader/modules/modules/test2/p/Service.java rename to jdk/test/java/util/ServiceLoader/modules/test2/p/Service.java diff --git a/jdk/test/java/util/ServiceLoader/nouses/NoUsesTest.java b/jdk/test/java/util/ServiceLoader/nouses/NoUsesTest.java new file mode 100644 index 00000000000..641574b77d1 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/nouses/NoUsesTest.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @modules java.scripting + * @build test/* + * @run main/othervm test/p.Main + * @summary Basic test of ServiceLoader.load from named modules that does + * does delcare the use + */ diff --git a/jdk/test/java/util/ServiceLoader/nouses/test/module-info.java b/jdk/test/java/util/ServiceLoader/nouses/test/module-info.java new file mode 100644 index 00000000000..1bcf5944728 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/nouses/test/module-info.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module test { + exports p; + requires java.scripting; +} diff --git a/jdk/test/java/util/ServiceLoader/nouses/test/p/Main.java b/jdk/test/java/util/ServiceLoader/nouses/test/p/Main.java new file mode 100644 index 00000000000..ce8ee0fcbb6 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/nouses/test/p/Main.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p; + +import java.util.ServiceConfigurationError; +import java.util.ServiceLoader; +import javax.script.ScriptEngineFactory; + +public class Main { + + public static void main(String[] args) { + Module thisModule = Main.class.getModule(); + assertTrue(thisModule.isNamed()); + + // this module does not declare that it uses ScriptEngineFactory + assertFalse(thisModule.canUse(ScriptEngineFactory.class)); + try { + ServiceLoader.load(ScriptEngineFactory.class); + assertTrue(false); + } catch (ServiceConfigurationError expected) { } + + // invoke addUses and retry + thisModule.addUses(ScriptEngineFactory.class); + ServiceLoader.load(ScriptEngineFactory.class).findFirst(); + } + + static void assertFalse(boolean value) { + if (value) throw new RuntimeException(); + } + + static void assertTrue(boolean value) { + if (!value) throw new RuntimeException(); + } +} diff --git a/jdk/test/java/util/ServiceLoader/security/SecurityTest.java b/jdk/test/java/util/ServiceLoader/security/SecurityTest.java new file mode 100644 index 00000000000..5a680355277 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/security/SecurityTest.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @build test/* + * @run testng/othervm test/p.Tests + * @summary Tests to exercise ServiceLoader with a security manager + */ diff --git a/jdk/test/java/util/ServiceLoader/security/test/module-info.java b/jdk/test/java/util/ServiceLoader/security/test/module-info.java new file mode 100644 index 00000000000..f9d02cfb345 --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/security/test/module-info.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import p.Tests.*; + +module test { + uses S1; + uses S2; + provides S1 with P1; + provides S2 with P2; + requires testng; + exports p to testng; +} diff --git a/jdk/test/java/util/ServiceLoader/security/test/p/Tests.java b/jdk/test/java/util/ServiceLoader/security/test/p/Tests.java new file mode 100644 index 00000000000..bccc14cc9bd --- /dev/null +++ b/jdk/test/java/util/ServiceLoader/security/test/p/Tests.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p; + +import java.security.AccessControlContext; +import java.security.AccessControlException; +import java.security.AccessController; +import java.security.AllPermission; +import java.security.CodeSource; +import java.security.Permission; +import java.security.PermissionCollection; +import java.security.Permissions; +import java.security.PrivilegedAction; +import java.security.ProtectionDomain; +import java.util.ServiceConfigurationError; +import java.util.ServiceLoader; +import java.util.ServiceLoader.Provider; +import static java.security.AccessController.doPrivileged; + +import org.testng.annotations.Test; +import org.testng.annotations.BeforeTest; +import static org.testng.Assert.*; + +/** + * Basic tests with a security manager to ensure that the provider code + * is run with permissions restricted by whatever created the ServiceLoader + * object. + */ + +public class Tests { + + static final Permission PERM = new RuntimePermission("eatMuffin"); + + static PrivilegedAction> loadAction(Class service) { + return () -> ServiceLoader.load(service); + } + + static AccessControlContext withPermissions(Permission... perms) { + Permissions p = new Permissions(); + for (Permission perm : perms) { + p.add(perm); + } + ProtectionDomain pd = new ProtectionDomain(null, p); + return new AccessControlContext(new ProtectionDomain[]{ pd }); + } + + static AccessControlContext noPermissions() { + return withPermissions(/*empty*/); + } + + @BeforeTest + public void setSecurityManager() { + class Policy extends java.security.Policy { + private final Permissions perms; + public Policy(Permission... permissions) { + perms = new Permissions(); + for (Permission permission : permissions) { + perms.add(permission); + } + } + public PermissionCollection getPermissions(CodeSource cs) { + return perms; + } + public PermissionCollection getPermissions(ProtectionDomain pd) { + return perms; + } + public boolean implies(ProtectionDomain pd, Permission p) { + return perms.implies(p); + } + public void refresh() { } + } + Policy policy = new Policy(new AllPermission()); + Policy.setPolicy(policy); + System.setSecurityManager(new SecurityManager()); + } + + @Test + public void testConstructorUsingIteratorWithPermission() { + ServiceLoader sl = doPrivileged(loadAction(S1.class), withPermissions(PERM)); + S1 obj = sl.iterator().next(); + } + + @Test + public void testConstructorUsingStreamWithPermission() { + ServiceLoader sl = doPrivileged(loadAction(S1.class), withPermissions(PERM)); + assertTrue(sl.stream().map(Provider::get).count() == 1); + } + + @Test + public void testConstructorUsingIteratorNoPermission() { + ServiceLoader sl = doPrivileged(loadAction(S1.class), noPermissions()); + try { + sl.iterator().next(); + assertTrue(false); + } catch (ServiceConfigurationError e) { + assertTrue(e.getCause() instanceof AccessControlException); + } + } + + @Test + public void testConstructorUsingStreamNoPermission() { + ServiceLoader sl = doPrivileged(loadAction(S1.class), noPermissions()); + try { + sl.stream().map(Provider::get).count(); + assertTrue(false); + } catch (ServiceConfigurationError e) { + assertTrue(e.getCause() instanceof AccessControlException); + } + } + + @Test + public void testFactoryMethodUsingIteratorWithPermission() { + ServiceLoader sl = doPrivileged(loadAction(S2.class), withPermissions(PERM)); + S2 obj = sl.iterator().next(); + } + + @Test + public void testFactoryMethodUsingStreamWithPermission() { + ServiceLoader sl = doPrivileged(loadAction(S2.class), withPermissions(PERM)); + assertTrue(sl.stream().map(Provider::get).count() == 1); + } + + @Test + public void testFactoryMethodUsingIteratorNoPermission() { + ServiceLoader sl = doPrivileged(loadAction(S2.class), noPermissions()); + try { + sl.iterator().next(); + assertTrue(false); + } catch (ServiceConfigurationError e) { + assertTrue(e.getCause() instanceof AccessControlException); + } + } + + @Test + public void testFactoryMethodUsingStreamNoPermission() { + ServiceLoader sl = doPrivileged(loadAction(S2.class), noPermissions()); + try { + sl.stream().map(Provider::get).count(); + assertTrue(false); + } catch (ServiceConfigurationError e) { + assertTrue(e.getCause() instanceof AccessControlException); + } + } + + + // service types and implementations + + public static interface S1 { } + public static interface S2 { } + + public static class P1 implements S1 { + public P1() { + AccessController.getContext().checkPermission(PERM); + } + } + public static class P2 implements S2 { + private P2() { + AccessController.getContext().checkPermission(PERM); + } + public static S2 provider() { + return new P2(); + } + } +} diff --git a/jdk/test/java/util/Spliterator/SpliteratorCollisions.java b/jdk/test/java/util/Spliterator/SpliteratorCollisions.java index 733dff4b21c..da9de48f705 100644 --- a/jdk/test/java/util/Spliterator/SpliteratorCollisions.java +++ b/jdk/test/java/util/Spliterator/SpliteratorCollisions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -24,20 +24,19 @@ /** * @test * @bug 8005698 + * @library ../stream/bootlib + * @build java.base/java.util.SpliteratorTestHelper * @run testng SpliteratorCollisions * @summary Spliterator traversing and splitting hash maps containing colliding hashes - * @author Brent Christian */ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; @@ -45,19 +44,15 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.TreeSet; -import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; import java.util.function.UnaryOperator; -import static org.testng.Assert.*; -import static org.testng.Assert.assertEquals; +public class SpliteratorCollisions extends SpliteratorTestHelper { -@Test -public class SpliteratorCollisions { - - private static List SIZES = Arrays.asList(0, 1, 10, 100, 1000); + private static final List SIZES = Arrays.asList(0, 1, 10, 100, 1000); private static class SpliteratorDataBuilder { List data; @@ -214,492 +209,134 @@ public class SpliteratorCollisions { } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testNullPointerException(String description, Collection exp, Supplier s) { - executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining(null)); - executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance(null)); + void testNullPointerException(String description, + Collection exp, + Supplier> s) { + assertThrowsNPE(() -> s.get().forEachRemaining(null)); + assertThrowsNPE(() -> s.get().tryAdvance(null)); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testNullPointerExceptionWithNull(String description, Collection exp, Supplier s) { - executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining(null)); - executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance(null)); + void testNullPointerExceptionWithNull(String description, + Collection exp, + Supplier> s) { + assertThrowsNPE(() -> s.get().forEachRemaining(null)); + assertThrowsNPE(() -> s.get().tryAdvance(null)); } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testForEach(String description, Collection exp, Supplier s) { - testForEach(exp, s, (Consumer b) -> b); + void testForEach(String description, + Collection exp, + Supplier> s) { + testForEach(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testForEachWithNull(String description, Collection exp, Supplier s) { - testForEach(exp, s, (Consumer b) -> b); + void testForEachWithNull(String description, + Collection exp, + Supplier> s) { + testForEach(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testTryAdvance(String description, Collection exp, Supplier s) { - testTryAdvance(exp, s, (Consumer b) -> b); + void testTryAdvance(String description, + Collection exp, + Supplier> s) { + testTryAdvance(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testTryAdvanceWithNull(String description, Collection exp, Supplier s) { - testTryAdvance(exp, s, (Consumer b) -> b); + void testTryAdvanceWithNull(String description, + Collection exp, + Supplier> s) { + testTryAdvance(exp, s, UnaryOperator.identity()); } -/* skip this test until 8013649 is fixed - @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testMixedTryAdvanceForEach(String description, Collection exp, Supplier s) { - testMixedTryAdvanceForEach(exp, s, (Consumer b) -> b); - } - - @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testMixedTryAdvanceForEachWithNull(String description, Collection exp, Supplier s) { - testMixedTryAdvanceForEach(exp, s, (Consumer b) -> b); - } -*/ - @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitAfterFullTraversal(String description, Collection exp, Supplier s) { - testSplitAfterFullTraversal(s, (Consumer b) -> b); + void testMixedTryAdvanceForEach(String description, + Collection exp, + Supplier> s) { + testMixedTryAdvanceForEach(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitAfterFullTraversalWithNull(String description, Collection exp, Supplier s) { - testSplitAfterFullTraversal(s, (Consumer b) -> b); + void testMixedTryAdvanceForEachWithNull(String description, + Collection exp, + Supplier> s) { + testMixedTryAdvanceForEach(exp, s, UnaryOperator.identity()); + } + + @Test(dataProvider = "HashableIntSpliterator") + void testMixedTraverseAndSplit(String description, + Collection exp, + Supplier> s) { + testMixedTraverseAndSplit(exp, s, UnaryOperator.identity()); + } + + @Test(dataProvider = "HashableIntSpliteratorWithNull") + void testMixedTraverseAndSplitWithNull(String description, + Collection exp, + Supplier> s) { + testMixedTraverseAndSplit(exp, s, UnaryOperator.identity()); + } + + @Test(dataProvider = "HashableIntSpliterator") + void testSplitAfterFullTraversal(String description, + Collection exp, + Supplier> s) { + testSplitAfterFullTraversal(s, UnaryOperator.identity()); + } + + @Test(dataProvider = "HashableIntSpliteratorWithNull") + void testSplitAfterFullTraversalWithNull(String description, + Collection exp, + Supplier> s) { + testSplitAfterFullTraversal(s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitOnce(String description, Collection exp, Supplier s) { - testSplitOnce(exp, s, (Consumer b) -> b); + void testSplitOnce(String description, + Collection exp, + Supplier> s) { + testSplitOnce(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitOnceWithNull(String description, Collection exp, Supplier s) { - testSplitOnce(exp, s, (Consumer b) -> b); + void testSplitOnceWithNull(String description, + Collection exp, + Supplier> s) { + testSplitOnce(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitSixDeep(String description, Collection exp, Supplier s) { - testSplitSixDeep(exp, s, (Consumer b) -> b); + void testSplitSixDeep(String description, + Collection exp, + Supplier> s) { + testSplitSixDeep(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitSixDeepWithNull(String description, Collection exp, Supplier s) { - testSplitSixDeep(exp, s, (Consumer b) -> b); + void testSplitSixDeepWithNull(String description, + Collection exp, + Supplier> s) { + testSplitSixDeep(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitUntilNull(String description, Collection exp, Supplier s) { - testSplitUntilNull(exp, s, (Consumer b) -> b); + void testSplitUntilNull(String description, + Collection exp, + Supplier> s) { + testSplitUntilNull(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitUntilNullWithNull(String description, Collection exp, Supplier s) { - testSplitUntilNull(exp, s, (Consumer b) -> b); - } - - private static > void testForEach( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - ArrayList fromForEach = new ArrayList<>(); - spliterator = supplier.get(); - Consumer addToFromForEach = boxingAdapter.apply(fromForEach::add); - spliterator.forEachRemaining(addToFromForEach); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - // assert that size, tryAdvance, and forEach are consistent - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, exp.size()); - } - if (exp.contains(null)) { - assertTrue(fromForEach.contains(null)); - } - assertEquals(fromForEach.size(), exp.size()); - - assertContents(fromForEach, exp, isOrdered); - } - - private static > void testTryAdvance( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - spliterator = supplier.get(); - ArrayList fromTryAdvance = new ArrayList<>(); - Consumer addToFromTryAdvance = boxingAdapter.apply(fromTryAdvance::add); - while (spliterator.tryAdvance(addToFromTryAdvance)) { } - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - // assert that size, tryAdvance, and forEach are consistent - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, exp.size()); - } - assertEquals(fromTryAdvance.size(), exp.size()); - - assertContents(fromTryAdvance, exp, isOrdered); - } - - private static > void testMixedTryAdvanceForEach( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - // tryAdvance first few elements, then forEach rest - ArrayList dest = new ArrayList<>(); - spliterator = supplier.get(); - Consumer addToDest = boxingAdapter.apply(dest::add); - for (int i = 0; i < 10 && spliterator.tryAdvance(addToDest); i++) { } - spliterator.forEachRemaining(addToDest); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, dest.size()); - } - assertEquals(dest.size(), exp.size()); - - if (isOrdered) { - assertEquals(dest, exp); - } - else { - assertContentsUnordered(dest, exp); - } - } - - private static > void testSplitAfterFullTraversal( - Supplier supplier, - UnaryOperator> boxingAdapter) { - // Full traversal using tryAdvance - Spliterator spliterator = supplier.get(); - while (spliterator.tryAdvance(boxingAdapter.apply(e -> { }))) { } - Spliterator split = spliterator.trySplit(); - assertNull(split); - - // Full traversal using forEach - spliterator = supplier.get(); - spliterator.forEachRemaining(boxingAdapter.apply(e -> { - })); - split = spliterator.trySplit(); - assertNull(split); - - // Full traversal using tryAdvance then forEach - spliterator = supplier.get(); - spliterator.tryAdvance(boxingAdapter.apply(e -> { })); - spliterator.forEachRemaining(boxingAdapter.apply(e -> { - })); - split = spliterator.trySplit(); - assertNull(split); - } - - private static > void testSplitOnce( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - ArrayList fromSplit = new ArrayList<>(); - Spliterator s1 = supplier.get(); - Spliterator s2 = s1.trySplit(); - long s1Size = s1.getExactSizeIfKnown(); - long s2Size = (s2 != null) ? s2.getExactSizeIfKnown() : 0; - - Consumer addToFromSplit = boxingAdapter.apply(fromSplit::add); - if (s2 != null) - s2.forEachRemaining(addToFromSplit); - s1.forEachRemaining(addToFromSplit); - - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, fromSplit.size()); - if (s1Size >= 0 && s2Size >= 0) - assertEquals(sizeIfKnown, s1Size + s2Size); - } - assertContents(fromSplit, exp, isOrdered); - } - - private static > void testSplitSixDeep( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - for (int depth=0; depth < 6; depth++) { - List dest = new ArrayList<>(); - spliterator = supplier.get(); - - assertSpliterator(spliterator); - - // verify splitting with forEach - visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), false); - assertContents(dest, exp, isOrdered); - - // verify splitting with tryAdvance - dest.clear(); - spliterator = supplier.get(); - visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), true); - assertContents(dest, exp, isOrdered); - } - } - - private static > void visit(int depth, int curLevel, - List dest, S spliterator, UnaryOperator> boxingAdapter, - int rootCharacteristics, boolean useTryAdvance) { - if (curLevel < depth) { - long beforeSize = spliterator.getExactSizeIfKnown(); - Spliterator split = spliterator.trySplit(); - if (split != null) { - assertSpliterator(split, rootCharacteristics); - assertSpliterator(spliterator, rootCharacteristics); - - if ((rootCharacteristics & Spliterator.SUBSIZED) != 0 && - (rootCharacteristics & Spliterator.SIZED) != 0) { - assertEquals(beforeSize, split.estimateSize() + spliterator.estimateSize()); - } - visit(depth, curLevel + 1, dest, split, boxingAdapter, rootCharacteristics, useTryAdvance); - } - visit(depth, curLevel + 1, dest, spliterator, boxingAdapter, rootCharacteristics, useTryAdvance); - } - else { - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - if (useTryAdvance) { - Consumer addToDest = boxingAdapter.apply(dest::add); - int count = 0; - while (spliterator.tryAdvance(addToDest)) { - ++count; - } - - if (sizeIfKnown >= 0) - assertEquals(sizeIfKnown, count); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - - Spliterator split = spliterator.trySplit(); - assertNull(split); - } - else { - List leafDest = new ArrayList<>(); - Consumer addToLeafDest = boxingAdapter.apply(leafDest::add); - spliterator.forEachRemaining(addToLeafDest); - - if (sizeIfKnown >= 0) - assertEquals(sizeIfKnown, leafDest.size()); - - // Assert that forEach now produces no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - Spliterator split = spliterator.trySplit(); - assertNull(split); - - dest.addAll(leafDest); - } - } - } - - private static > void testSplitUntilNull( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - Spliterator s = supplier.get(); - boolean isOrdered = s.hasCharacteristics(Spliterator.ORDERED); - assertSpliterator(s); - - List splits = new ArrayList<>(); - Consumer c = boxingAdapter.apply(splits::add); - - testSplitUntilNull(new SplitNode(c, s)); - assertContents(splits, exp, isOrdered); - } - - private static class SplitNode { - // Constant for every node - final Consumer c; - final int rootCharacteristics; - - final Spliterator s; - - SplitNode(Consumer c, Spliterator s) { - this(c, s.characteristics(), s); - } - - private SplitNode(Consumer c, int rootCharacteristics, Spliterator s) { - this.c = c; - this.rootCharacteristics = rootCharacteristics; - this.s = s; - } - - SplitNode fromSplit(Spliterator split) { - return new SplitNode<>(c, rootCharacteristics, split); - } - } - - /** - * Set the maximum stack capacity to 0.25MB. This should be more than enough to detect a bad spliterator - * while not unduly disrupting test infrastructure given the test data sizes that are used are small. - * Note that j.u.c.ForkJoinPool sets the max queue size to 64M (1 << 26). - */ - private static final int MAXIMUM_STACK_CAPACITY = 1 << 18; // 0.25MB - - private static void testSplitUntilNull(SplitNode e) { - // Use an explicit stack to avoid a StackOverflowException when testing a Spliterator - // that when repeatedly split produces a right-balanced (and maybe degenerate) tree, or - // for a spliterator that is badly behaved. - Deque> stack = new ArrayDeque<>(); - stack.push(e); - - int iteration = 0; - while (!stack.isEmpty()) { - assertTrue(iteration++ < MAXIMUM_STACK_CAPACITY, "Exceeded maximum stack modification count of 1 << 18"); - - e = stack.pop(); - Spliterator parentAndRightSplit = e.s; - - long parentEstimateSize = parentAndRightSplit.estimateSize(); - assertTrue(parentEstimateSize >= 0, - String.format("Split size estimate %d < 0", parentEstimateSize)); - - long parentSize = parentAndRightSplit.getExactSizeIfKnown(); - Spliterator leftSplit = parentAndRightSplit.trySplit(); - if (leftSplit == null) { - parentAndRightSplit.forEachRemaining(e.c); - continue; - } - - assertSpliterator(leftSplit, e.rootCharacteristics); - assertSpliterator(parentAndRightSplit, e.rootCharacteristics); - - if (parentEstimateSize != Long.MAX_VALUE && leftSplit.estimateSize() > 0 && parentAndRightSplit.estimateSize() > 0) { - assertTrue(leftSplit.estimateSize() < parentEstimateSize, - String.format("Left split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - assertTrue(parentAndRightSplit.estimateSize() < parentEstimateSize, - String.format("Right split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - } - else { - assertTrue(leftSplit.estimateSize() <= parentEstimateSize, - String.format("Left split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - assertTrue(parentAndRightSplit.estimateSize() <= parentEstimateSize, - String.format("Right split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - } - - long leftSize = leftSplit.getExactSizeIfKnown(); - long rightSize = parentAndRightSplit.getExactSizeIfKnown(); - if (parentSize >= 0 && leftSize >= 0 && rightSize >= 0) - assertEquals(parentSize, leftSize + rightSize, - String.format("exact left split size %d + exact right split size %d != parent exact split size %d", - leftSize, rightSize, parentSize)); - - // Add right side to stack first so left side is popped off first - stack.push(e.fromSplit(parentAndRightSplit)); - stack.push(e.fromSplit(leftSplit)); - } - } - - private static void assertSpliterator(Spliterator s, int rootCharacteristics) { - if ((rootCharacteristics & Spliterator.SUBSIZED) != 0) { - assertTrue(s.hasCharacteristics(Spliterator.SUBSIZED), - "Child split is not SUBSIZED when root split is SUBSIZED"); - } - assertSpliterator(s); - } - - private static void assertSpliterator(Spliterator s) { - if (s.hasCharacteristics(Spliterator.SUBSIZED)) { - assertTrue(s.hasCharacteristics(Spliterator.SIZED)); - } - if (s.hasCharacteristics(Spliterator.SIZED)) { - assertTrue(s.estimateSize() != Long.MAX_VALUE); - assertTrue(s.getExactSizeIfKnown() >= 0); - } - try { - s.getComparator(); - assertTrue(s.hasCharacteristics(Spliterator.SORTED)); - } catch (IllegalStateException e) { - assertFalse(s.hasCharacteristics(Spliterator.SORTED)); - } - } - - private static void assertContents(Collection actual, Collection expected, boolean isOrdered) { - if (isOrdered) { - assertEquals(actual, expected); - } - else { - assertContentsUnordered(actual, expected); - } - } - - private static void assertContentsUnordered(Iterable actual, Iterable expected) { - assertEquals(toBoxedMultiset(actual), toBoxedMultiset(expected)); - } - - private static Map toBoxedMultiset(Iterable c) { - Map result = new HashMap<>(); - c.forEach(e -> { - if (result.containsKey(e)) { - result.put(e, new HashableInteger(result.get(e).value + 1, 10)); - } else { - result.put(e, new HashableInteger(1, 10)); - } - }); - return result; - } - - private void executeAndCatch(Class expected, Runnable r) { - Exception caught = null; - try { - r.run(); - } - catch (Exception e) { - caught = e; - } - - assertNotNull(caught, - String.format("No Exception was thrown, expected an Exception of %s to be thrown", - expected.getName())); - assertTrue(expected.isInstance(caught), - String.format("Exception thrown %s not an instance of %s", - caught.getClass().getName(), expected.getName())); + void testSplitUntilNullWithNull(String description, + Collection exp, + Supplier> s) { + testSplitUntilNull(exp, s, UnaryOperator.identity()); } } diff --git a/jdk/test/java/util/Spliterator/SpliteratorFailFastTest.java b/jdk/test/java/util/Spliterator/SpliteratorFailFastTest.java index a0e71d24921..84d6ca9d6ab 100644 --- a/jdk/test/java/util/Spliterator/SpliteratorFailFastTest.java +++ b/jdk/test/java/util/Spliterator/SpliteratorFailFastTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -21,9 +21,6 @@ * questions. */ -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - import java.util.ArrayList; import java.util.Arrays; import java.util.ConcurrentModificationException; @@ -42,8 +39,11 @@ import java.util.Vector; import java.util.WeakHashMap; import java.util.function.Supplier; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; +import org.testng.Assert.ThrowingRunnable; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertThrows; /** * @test @@ -125,7 +125,7 @@ public class SpliteratorFailFastTest extends SpliteratorLateBindingFailFastHelpe }); source.update(); - executeAndCatch(() -> s.tryAdvance(e -> { + assertThrowsCME(() -> s.tryAdvance(e -> { })); } @@ -137,7 +137,7 @@ public class SpliteratorFailFastTest extends SpliteratorLateBindingFailFastHelpe }); source.update(); - executeAndCatch(() -> s.forEachRemaining(e -> { + assertThrowsCME(() -> s.forEachRemaining(e -> { })); } } @@ -147,7 +147,7 @@ public class SpliteratorFailFastTest extends SpliteratorLateBindingFailFastHelpe Source source = ss.get(); Spliterator s = source.spliterator(); - executeAndCatch(() -> s.forEachRemaining(e -> { + assertThrowsCME(() -> s.forEachRemaining(e -> { source.update(); })); } @@ -161,7 +161,7 @@ public class SpliteratorFailFastTest extends SpliteratorLateBindingFailFastHelpe s.estimateSize(); source.update(); - executeAndCatch(() -> s.tryAdvance(e -> { + assertThrowsCME(() -> s.tryAdvance(e -> { })); } @@ -172,30 +172,13 @@ public class SpliteratorFailFastTest extends SpliteratorLateBindingFailFastHelpe s.estimateSize(); source.update(); - executeAndCatch(() -> s.forEachRemaining(e -> { + assertThrowsCME(() -> s.forEachRemaining(e -> { })); } } - private void executeAndCatch(Runnable r) { - executeAndCatch(ConcurrentModificationException.class, r); - } - - private void executeAndCatch(Class expected, Runnable r) { - Exception caught = null; - try { - r.run(); - } - catch (Exception e) { - caught = e; - } - - assertNotNull(caught, - String.format("No Exception was thrown, expected an Exception of %s to be thrown", - expected.getName())); - assertTrue(expected.isInstance(caught), - String.format("Exception thrown %s not an instance of %s", - caught.getClass().getName(), expected.getName())); + private void assertThrowsCME(ThrowingRunnable r) { + assertThrows(ConcurrentModificationException.class, r); } } diff --git a/jdk/test/java/util/Spliterator/SpliteratorLateBindingFailFastHelper.java b/jdk/test/java/util/Spliterator/SpliteratorLateBindingFailFastHelper.java index a3c53b77b64..cc89340efd7 100644 --- a/jdk/test/java/util/Spliterator/SpliteratorLateBindingFailFastHelper.java +++ b/jdk/test/java/util/Spliterator/SpliteratorLateBindingFailFastHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java b/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java index a8338ca4e5f..ca45ab758bc 100644 --- a/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java +++ b/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -24,6 +24,9 @@ /** * @test * @summary Spliterator traversing and splitting tests + * @library ../stream/bootlib + * @build java.base/java.util.SpliteratorOfIntDataBuilder + * java.base/java.util.SpliteratorTestHelper * @run testng SpliteratorTraversingAndSplittingTest * @bug 8020016 8071477 8072784 8169838 */ @@ -38,11 +41,9 @@ import java.util.AbstractSet; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; -import java.util.BitSet; import java.util.Collection; import java.util.Collections; import java.util.Comparator; -import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.IdentityHashMap; @@ -58,6 +59,8 @@ import java.util.RandomAccess; import java.util.Set; import java.util.SortedSet; import java.util.Spliterator; +import java.util.SpliteratorOfIntDataBuilder; +import java.util.SpliteratorTestHelper; import java.util.Spliterators; import java.util.Stack; import java.util.TreeMap; @@ -82,14 +85,8 @@ import java.util.function.IntConsumer; import java.util.function.LongConsumer; import java.util.function.Supplier; import java.util.function.UnaryOperator; -import java.util.stream.IntStream; -import static java.util.stream.Collectors.toList; -import static org.testng.Assert.*; -import static org.testng.Assert.assertEquals; - -@Test -public class SpliteratorTraversingAndSplittingTest { +public class SpliteratorTraversingAndSplittingTest extends SpliteratorTestHelper { private static final List SIZES = Arrays.asList(0, 1, 10, 42); @@ -668,83 +665,52 @@ public class SpliteratorTraversingAndSplittingTest { } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testNullPointerException(String description, Collection exp, Supplier s) { - executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining(null)); - executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance(null)); + public void testNullPointerException(String description, Collection exp, Supplier> s) { + assertThrowsNPE(() -> s.get().forEachRemaining(null)); + assertThrowsNPE(() -> s.get().tryAdvance(null)); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testForEach(String description, Collection exp, Supplier s) { - testForEach(exp, s, (Consumer b) -> b); + public void testForEach(String description, Collection exp, Supplier> s) { + testForEach(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testTryAdvance(String description, Collection exp, Supplier s) { - testTryAdvance(exp, s, (Consumer b) -> b); + public void testTryAdvance(String description, Collection exp, Supplier> s) { + testTryAdvance(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testMixedTryAdvanceForEach(String description, Collection exp, Supplier s) { - testMixedTryAdvanceForEach(exp, s, (Consumer b) -> b); + public void testMixedTryAdvanceForEach(String description, Collection exp, Supplier> s) { + testMixedTryAdvanceForEach(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitAfterFullTraversal(String description, Collection exp, Supplier s) { - testSplitAfterFullTraversal(s, (Consumer b) -> b); + public void testMixedTraverseAndSplit(String description, Collection exp, Supplier> s) { + testMixedTraverseAndSplit(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitOnce(String description, Collection exp, Supplier s) { - testSplitOnce(exp, s, (Consumer b) -> b); + public void testSplitAfterFullTraversal(String description, Collection exp, Supplier> s) { + testSplitAfterFullTraversal(s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitSixDeep(String description, Collection exp, Supplier s) { - testSplitSixDeep(exp, s, (Consumer b) -> b); + public void testSplitOnce(String description, Collection exp, Supplier> s) { + testSplitOnce(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitUntilNull(String description, Collection exp, Supplier s) { - testSplitUntilNull(exp, s, (Consumer b) -> b); + public void testSplitSixDeep(String description, Collection exp, Supplier> s) { + testSplitSixDeep(exp, s, UnaryOperator.identity()); + } + + @Test(dataProvider = "Spliterator") + public void testSplitUntilNull(String description, Collection exp, Supplier> s) { + testSplitUntilNull(exp, s, UnaryOperator.identity()); } // - - private static class SpliteratorOfIntDataBuilder { - List data; - - List exp; - - SpliteratorOfIntDataBuilder(List data, List exp) { - this.data = data; - this.exp = exp; - } - - void add(String description, List expected, Supplier s) { - description = joiner(description).toString(); - data.add(new Object[]{description, expected, s}); - } - - void add(String description, Supplier s) { - add(description, exp, s); - } - - StringBuilder joiner(String description) { - return new StringBuilder(description). - append(" {"). - append("size=").append(exp.size()). - append("}"); - } - } - private static class SpliteratorOfIntCharDataBuilder { List data; @@ -888,30 +854,6 @@ public class SpliteratorTraversingAndSplittingTest { cdb.add("CharBuffer.wrap(\"%s\".toCharArray())", s -> CharBuffer.wrap(s.toCharArray())); } - - Object[][] bitStreamTestcases = new Object[][] { - { "none", IntStream.empty().toArray() }, - { "index 0", IntStream.of(0).toArray() }, - { "index 255", IntStream.of(255).toArray() }, - { "index 0 and 255", IntStream.of(0, 255).toArray() }, - { "every bit", IntStream.range(0, 255).toArray() }, - { "step 2", IntStream.range(0, 255).map(f -> f * 2).toArray() }, - { "step 3", IntStream.range(0, 255).map(f -> f * 3).toArray() }, - { "step 5", IntStream.range(0, 255).map(f -> f * 5).toArray() }, - { "step 7", IntStream.range(0, 255).map(f -> f * 7).toArray() }, - { "1, 10, 100, 1000", IntStream.of(1, 10, 100, 1000).toArray() }, - }; - for (Object[] tc : bitStreamTestcases) { - String description = (String)tc[0]; - int[] exp = (int[])tc[1]; - SpliteratorOfIntDataBuilder db = new SpliteratorOfIntDataBuilder( - data, IntStream.of(exp).boxed().collect(toList())); - - db.add("BitSet.stream.spliterator() {" + description + "}", () -> - IntStream.of(exp).collect(BitSet::new, BitSet::set, BitSet::or). - stream().spliterator() - ); - } return spliteratorOfIntDataProvider = data.toArray(new Object[0][]); } @@ -922,32 +864,10 @@ public class SpliteratorTraversingAndSplittingTest { return exp; } - private static UnaryOperator> intBoxingConsumer() { - class BoxingAdapter implements Consumer, IntConsumer { - private final Consumer b; - - BoxingAdapter(Consumer b) { - this.b = b; - } - - @Override - public void accept(Integer value) { - throw new IllegalStateException(); - } - - @Override - public void accept(int value) { - b.accept(value); - } - } - - return b -> new BoxingAdapter(b); - } - @Test(dataProvider = "Spliterator.OfInt") public void testIntNullPointerException(String description, Collection exp, Supplier s) { - executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((IntConsumer) null)); - executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance((IntConsumer) null)); + assertThrowsNPE(() -> s.get().forEachRemaining((IntConsumer) null)); + assertThrowsNPE(() -> s.get().tryAdvance((IntConsumer) null)); } @Test(dataProvider = "Spliterator.OfInt") @@ -965,6 +885,11 @@ public class SpliteratorTraversingAndSplittingTest { testMixedTryAdvanceForEach(exp, s, intBoxingConsumer()); } + @Test(dataProvider = "Spliterator.OfInt") + public void testIntMixedTraverseAndSplit(String description, Collection exp, Supplier s) { + testMixedTraverseAndSplit(exp, s, intBoxingConsumer()); + } + @Test(dataProvider = "Spliterator.OfInt") public void testIntSplitAfterFullTraversal(String description, Collection exp, Supplier s) { testSplitAfterFullTraversal(s, intBoxingConsumer()); @@ -1082,32 +1007,10 @@ public class SpliteratorTraversingAndSplittingTest { return exp; } - private static UnaryOperator> longBoxingConsumer() { - class BoxingAdapter implements Consumer, LongConsumer { - private final Consumer b; - - BoxingAdapter(Consumer b) { - this.b = b; - } - - @Override - public void accept(Long value) { - throw new IllegalStateException(); - } - - @Override - public void accept(long value) { - b.accept(value); - } - } - - return b -> new BoxingAdapter(b); - } - @Test(dataProvider = "Spliterator.OfLong") public void testLongNullPointerException(String description, Collection exp, Supplier s) { - executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((LongConsumer) null)); - executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance((LongConsumer) null)); + assertThrowsNPE(() -> s.get().forEachRemaining((LongConsumer) null)); + assertThrowsNPE(() -> s.get().tryAdvance((LongConsumer) null)); } @Test(dataProvider = "Spliterator.OfLong") @@ -1125,6 +1028,11 @@ public class SpliteratorTraversingAndSplittingTest { testMixedTryAdvanceForEach(exp, s, longBoxingConsumer()); } + @Test(dataProvider = "Spliterator.OfLong") + public void testLongMixedTraverseAndSplit(String description, Collection exp, Supplier s) { + testMixedTraverseAndSplit(exp, s, longBoxingConsumer()); + } + @Test(dataProvider = "Spliterator.OfLong") public void testLongSplitAfterFullTraversal(String description, Collection exp, Supplier s) { testSplitAfterFullTraversal(s, longBoxingConsumer()); @@ -1242,32 +1150,10 @@ public class SpliteratorTraversingAndSplittingTest { return exp; } - private static UnaryOperator> doubleBoxingConsumer() { - class BoxingAdapter implements Consumer, DoubleConsumer { - private final Consumer b; - - BoxingAdapter(Consumer b) { - this.b = b; - } - - @Override - public void accept(Double value) { - throw new IllegalStateException(); - } - - @Override - public void accept(double value) { - b.accept(value); - } - } - - return b -> new BoxingAdapter(b); - } - @Test(dataProvider = "Spliterator.OfDouble") public void testDoubleNullPointerException(String description, Collection exp, Supplier s) { - executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((DoubleConsumer) null)); - executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance((DoubleConsumer) null)); + assertThrowsNPE(() -> s.get().forEachRemaining((DoubleConsumer) null)); + assertThrowsNPE(() -> s.get().tryAdvance((DoubleConsumer) null)); } @Test(dataProvider = "Spliterator.OfDouble") @@ -1285,6 +1171,11 @@ public class SpliteratorTraversingAndSplittingTest { testMixedTryAdvanceForEach(exp, s, doubleBoxingConsumer()); } + @Test(dataProvider = "Spliterator.OfDouble") + public void testDoubleMixedTraverseAndSplit(String description, Collection exp, Supplier s) { + testMixedTraverseAndSplit(exp, s, doubleBoxingConsumer()); + } + @Test(dataProvider = "Spliterator.OfDouble") public void testDoubleSplitAfterFullTraversal(String description, Collection exp, Supplier s) { testSplitAfterFullTraversal(s, doubleBoxingConsumer()); @@ -1305,392 +1196,4 @@ public class SpliteratorTraversingAndSplittingTest { testSplitUntilNull(exp, s, doubleBoxingConsumer()); } - // - - private static > void testForEach( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - ArrayList fromForEach = new ArrayList<>(); - spliterator = supplier.get(); - Consumer addToFromForEach = boxingAdapter.apply(fromForEach::add); - spliterator.forEachRemaining(addToFromForEach); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - // assert that size, tryAdvance, and forEach are consistent - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, exp.size()); - } - assertEquals(fromForEach.size(), exp.size()); - - assertContents(fromForEach, exp, isOrdered); - } - - private static > void testTryAdvance( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - spliterator = supplier.get(); - ArrayList fromTryAdvance = new ArrayList<>(); - Consumer addToFromTryAdvance = boxingAdapter.apply(fromTryAdvance::add); - while (spliterator.tryAdvance(addToFromTryAdvance)) { } - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - // assert that size, tryAdvance, and forEach are consistent - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, exp.size()); - } - assertEquals(fromTryAdvance.size(), exp.size()); - - assertContents(fromTryAdvance, exp, isOrdered); - } - - private static > void testMixedTryAdvanceForEach( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - // tryAdvance first few elements, then forEach rest - ArrayList dest = new ArrayList<>(); - spliterator = supplier.get(); - Consumer addToDest = boxingAdapter.apply(dest::add); - for (int i = 0; i < 10 && spliterator.tryAdvance(addToDest); i++) { } - spliterator.forEachRemaining(addToDest); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, dest.size()); - } - assertEquals(dest.size(), exp.size()); - - if (isOrdered) { - assertEquals(dest, exp); - } - else { - assertContentsUnordered(dest, exp); - } - } - - private static > void testSplitAfterFullTraversal( - Supplier supplier, - UnaryOperator> boxingAdapter) { - // Full traversal using tryAdvance - Spliterator spliterator = supplier.get(); - while (spliterator.tryAdvance(boxingAdapter.apply(e -> { }))) { } - Spliterator split = spliterator.trySplit(); - assertNull(split); - - // Full traversal using forEach - spliterator = supplier.get(); - spliterator.forEachRemaining(boxingAdapter.apply(e -> { - })); - split = spliterator.trySplit(); - assertNull(split); - - // Full traversal using tryAdvance then forEach - spliterator = supplier.get(); - spliterator.tryAdvance(boxingAdapter.apply(e -> { })); - spliterator.forEachRemaining(boxingAdapter.apply(e -> { - })); - split = spliterator.trySplit(); - assertNull(split); - } - - private static > void testSplitOnce( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - ArrayList fromSplit = new ArrayList<>(); - Spliterator s1 = supplier.get(); - Spliterator s2 = s1.trySplit(); - long s1Size = s1.getExactSizeIfKnown(); - long s2Size = (s2 != null) ? s2.getExactSizeIfKnown() : 0; - Consumer addToFromSplit = boxingAdapter.apply(fromSplit::add); - if (s2 != null) - s2.forEachRemaining(addToFromSplit); - s1.forEachRemaining(addToFromSplit); - - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, fromSplit.size()); - if (s1Size >= 0 && s2Size >= 0) - assertEquals(sizeIfKnown, s1Size + s2Size); - } - assertContents(fromSplit, exp, isOrdered); - } - - private static > void testSplitSixDeep( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - for (int depth=0; depth < 6; depth++) { - List dest = new ArrayList<>(); - spliterator = supplier.get(); - - assertRootSpliterator(spliterator); - - // verify splitting with forEach - visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), false); - assertContents(dest, exp, isOrdered); - - // verify splitting with tryAdvance - dest.clear(); - spliterator = supplier.get(); - visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), true); - assertContents(dest, exp, isOrdered); - } - } - - private static > void visit(int depth, int curLevel, - List dest, S spliterator, UnaryOperator> boxingAdapter, - int rootCharacteristics, boolean useTryAdvance) { - if (curLevel < depth) { - long beforeSize = spliterator.getExactSizeIfKnown(); - Spliterator split = spliterator.trySplit(); - if (split != null) { - assertSpliterator(split, rootCharacteristics); - assertSpliterator(spliterator, rootCharacteristics); - - if ((rootCharacteristics & Spliterator.SUBSIZED) != 0 && - (rootCharacteristics & Spliterator.SIZED) != 0) { - assertEquals(beforeSize, split.estimateSize() + spliterator.estimateSize()); - } - visit(depth, curLevel + 1, dest, split, boxingAdapter, rootCharacteristics, useTryAdvance); - } - visit(depth, curLevel + 1, dest, spliterator, boxingAdapter, rootCharacteristics, useTryAdvance); - } - else { - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - if (useTryAdvance) { - Consumer addToDest = boxingAdapter.apply(dest::add); - int count = 0; - while (spliterator.tryAdvance(addToDest)) { - ++count; - } - - if (sizeIfKnown >= 0) - assertEquals(sizeIfKnown, count); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - - Spliterator split = spliterator.trySplit(); - assertNull(split); - } - else { - List leafDest = new ArrayList<>(); - Consumer addToLeafDest = boxingAdapter.apply(leafDest::add); - spliterator.forEachRemaining(addToLeafDest); - - if (sizeIfKnown >= 0) - assertEquals(sizeIfKnown, leafDest.size()); - - // Assert that forEach now produces no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - Spliterator split = spliterator.trySplit(); - assertNull(split); - - dest.addAll(leafDest); - } - } - } - - private static > void testSplitUntilNull( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - Spliterator s = supplier.get(); - boolean isOrdered = s.hasCharacteristics(Spliterator.ORDERED); - assertRootSpliterator(s); - - List splits = new ArrayList<>(); - Consumer c = boxingAdapter.apply(splits::add); - - testSplitUntilNull(new SplitNode(c, s)); - assertContents(splits, exp, isOrdered); - } - - private static class SplitNode { - // Constant for every node - final Consumer c; - final int rootCharacteristics; - - final Spliterator s; - - SplitNode(Consumer c, Spliterator s) { - this(c, s.characteristics(), s); - } - - private SplitNode(Consumer c, int rootCharacteristics, Spliterator s) { - this.c = c; - this.rootCharacteristics = rootCharacteristics; - this.s = s; - } - - SplitNode fromSplit(Spliterator split) { - return new SplitNode<>(c, rootCharacteristics, split); - } - } - - /** - * Set the maximum stack capacity to 0.25MB. This should be more than enough to detect a bad spliterator - * while not unduly disrupting test infrastructure given the test data sizes that are used are small. - * Note that j.u.c.ForkJoinPool sets the max queue size to 64M (1 << 26). - */ - private static final int MAXIMUM_STACK_CAPACITY = 1 << 18; // 0.25MB - - private static void testSplitUntilNull(SplitNode e) { - // Use an explicit stack to avoid a StackOverflowException when testing a Spliterator - // that when repeatedly split produces a right-balanced (and maybe degenerate) tree, or - // for a spliterator that is badly behaved. - Deque> stack = new ArrayDeque<>(); - stack.push(e); - - int iteration = 0; - while (!stack.isEmpty()) { - assertTrue(iteration++ < MAXIMUM_STACK_CAPACITY, "Exceeded maximum stack modification count of 1 << 18"); - - e = stack.pop(); - Spliterator parentAndRightSplit = e.s; - - long parentEstimateSize = parentAndRightSplit.estimateSize(); - assertTrue(parentEstimateSize >= 0, - String.format("Split size estimate %d < 0", parentEstimateSize)); - - long parentSize = parentAndRightSplit.getExactSizeIfKnown(); - Spliterator leftSplit = parentAndRightSplit.trySplit(); - if (leftSplit == null) { - parentAndRightSplit.forEachRemaining(e.c); - continue; - } - - assertSpliterator(leftSplit, e.rootCharacteristics); - assertSpliterator(parentAndRightSplit, e.rootCharacteristics); - - if (parentEstimateSize != Long.MAX_VALUE && leftSplit.estimateSize() > 0 && parentAndRightSplit.estimateSize() > 0) { - assertTrue(leftSplit.estimateSize() < parentEstimateSize, - String.format("Left split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - assertTrue(parentAndRightSplit.estimateSize() < parentEstimateSize, - String.format("Right split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - } - else { - assertTrue(leftSplit.estimateSize() <= parentEstimateSize, - String.format("Left split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - assertTrue(parentAndRightSplit.estimateSize() <= parentEstimateSize, - String.format("Right split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - } - - long leftSize = leftSplit.getExactSizeIfKnown(); - long rightSize = parentAndRightSplit.getExactSizeIfKnown(); - if (parentSize >= 0 && leftSize >= 0 && rightSize >= 0) - assertEquals(parentSize, leftSize + rightSize, - String.format("exact left split size %d + exact right split size %d != parent exact split size %d", - leftSize, rightSize, parentSize)); - - // Add right side to stack first so left side is popped off first - stack.push(e.fromSplit(parentAndRightSplit)); - stack.push(e.fromSplit(leftSplit)); - } - } - - private static void assertRootSpliterator(Spliterator s) { - assertFalse(s.hasCharacteristics(Spliterator.SIZED | Spliterator.CONCURRENT), - "Root spliterator should not be SIZED and CONCURRENT"); - - assertSpliterator(s); - } - - private static void assertSpliterator(Spliterator s, int rootCharacteristics) { - if ((rootCharacteristics & Spliterator.SUBSIZED) != 0) { - assertTrue(s.hasCharacteristics(Spliterator.SUBSIZED), - "Child split is not SUBSIZED when root split is SUBSIZED"); - } - assertSpliterator(s); - } - - private static void assertSpliterator(Spliterator s) { - if (s.hasCharacteristics(Spliterator.SUBSIZED)) { - assertTrue(s.hasCharacteristics(Spliterator.SIZED)); - } - if (s.hasCharacteristics(Spliterator.SIZED)) { - assertTrue(s.estimateSize() != Long.MAX_VALUE); - assertTrue(s.getExactSizeIfKnown() >= 0); - } - try { - s.getComparator(); - assertTrue(s.hasCharacteristics(Spliterator.SORTED)); - } catch (IllegalStateException e) { - assertFalse(s.hasCharacteristics(Spliterator.SORTED)); - } - } - - private static void assertContents(Collection actual, Collection expected, boolean isOrdered) { - if (isOrdered) { - assertEquals(actual, expected); - } - else { - assertContentsUnordered(actual, expected); - } - } - - private static void assertContentsUnordered(Iterable actual, Iterable expected) { - assertEquals(toBoxedMultiset(actual), toBoxedMultiset(expected)); - } - - private static Map toBoxedMultiset(Iterable c) { - Map result = new HashMap<>(); - c.forEach(e -> { - if (result.containsKey(e)) result.put(e, result.get(e) + 1); - else result.put(e, 1); - }); - return result; - } - - private void executeAndCatch(Class expected, Runnable r) { - Exception caught = null; - try { - r.run(); - } - catch (Exception e) { - caught = e; - } - - assertNotNull(caught, - String.format("No Exception was thrown, expected an Exception of %s to be thrown", - expected.getName())); - assertTrue(expected.isInstance(caught), - String.format("Exception thrown %s not an instance of %s", - caught.getClass().getName(), expected.getName())); - } - } diff --git a/jdk/test/java/util/TimeZone/UTCAliasTest.java b/jdk/test/java/util/TimeZone/UTCAliasTest.java index aa7079326c0..ffe7b63fd71 100644 --- a/jdk/test/java/util/TimeZone/UTCAliasTest.java +++ b/jdk/test/java/util/TimeZone/UTCAliasTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -27,6 +27,7 @@ * @summary Make sure that "UTC" is an alias of "Etc/UTC" as defined in the tzdata backward. * @modules java.base/sun.util.calendar * @compile -XDignore.symbol.file UTCAliasTest.java + * @run main UTCAliasTest */ import java.util.*; diff --git a/jdk/test/java/util/concurrent/ArrayBlockingQueue/IteratorConsistency.java b/jdk/test/java/util/concurrent/ArrayBlockingQueue/IteratorConsistency.java deleted file mode 100644 index 0068e3804e3..00000000000 --- a/jdk/test/java/util/concurrent/ArrayBlockingQueue/IteratorConsistency.java +++ /dev/null @@ -1,755 +0,0 @@ -/* - * 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. - */ - -/* - * This file is available under and governed by the GNU General Public - * License version 2 only, as published by the Free Software Foundation. - * However, the following notice accompanied the original version of this - * file: - * - * Written by Martin Buchholz with assistance from members of JCP - * JSR-166 Expert Group and released to the public domain, as - * explained at http://creativecommons.org/publicdomain/zero/1.0/ - */ - -import java.lang.ref.WeakReference; -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.ArrayDeque; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; -import java.util.Queue; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ThreadLocalRandom; - -/* - * @test - * @bug 7014263 - * @modules java.base/java.util.concurrent:open - * @summary White box testing of ArrayBlockingQueue iterators. - */ - -/** - * Tightly coupled to the implementation of ArrayBlockingQueue. - * Uses reflection to inspect queue and iterator state. - */ -@SuppressWarnings({"unchecked", "rawtypes"}) -public class IteratorConsistency { - final ThreadLocalRandom rnd = ThreadLocalRandom.current(); - final int CAPACITY = 20; - Field itrsField; - Field itemsField; - Field takeIndexField; - Field headField; - Field nextField; - Field prevTakeIndexField; - - void test(String[] args) throws Throwable { - itrsField = ArrayBlockingQueue.class.getDeclaredField("itrs"); - itemsField = ArrayBlockingQueue.class.getDeclaredField("items"); - takeIndexField = ArrayBlockingQueue.class.getDeclaredField("takeIndex"); - headField = Class.forName("java.util.concurrent.ArrayBlockingQueue$Itrs").getDeclaredField("head"); - nextField = Class.forName("java.util.concurrent.ArrayBlockingQueue$Itrs$Node").getDeclaredField("next"); - prevTakeIndexField = Class.forName("java.util.concurrent.ArrayBlockingQueue$Itr").getDeclaredField("prevTakeIndex"); - itrsField.setAccessible(true); - itemsField.setAccessible(true); - takeIndexField.setAccessible(true); - headField.setAccessible(true); - nextField.setAccessible(true); - prevTakeIndexField.setAccessible(true); - test(CAPACITY, true); - test(CAPACITY, false); - } - - Object itrs(ArrayBlockingQueue q) { - try { return itrsField.get(q); } - catch (Throwable ex) { throw new AssertionError(ex); } - } - - int takeIndex(ArrayBlockingQueue q) { - try { return takeIndexField.getInt(q); } - catch (Throwable ex) { throw new AssertionError(ex); } - } - - List trackedIterators(Object itrs) { - try { - List its = new ArrayList<>(); - if (itrs != null) - for (Object p = headField.get(itrs); p != null; p = nextField.get(p)) - its.add(((WeakReference)(p)).get()); - Collections.reverse(its); - return its; - } catch (Throwable ex) { throw new AssertionError(ex); } - } - - List trackedIterators(ArrayBlockingQueue q) { - return trackedIterators(itrs(q)); - } - - List attachedIterators(Object itrs) { - try { - List its = new ArrayList<>(); - if (itrs != null) - for (Object p = headField.get(itrs); p != null; p = nextField.get(p)) { - Iterator it = ((WeakReference)(p)).get(); - if (it != null && !isDetached(it)) - its.add(it); - } - Collections.reverse(its); - return its; - } catch (Throwable ex) { unexpected(ex); return null; } - } - - List attachedIterators(ArrayBlockingQueue q) { - return attachedIterators(itrs(q)); - } - - Object[] internalArray(ArrayBlockingQueue q) { - try { return (Object[]) itemsField.get(q); } - catch (Throwable ex) { throw new AssertionError(ex); } - } - - void printInternalArray(ArrayBlockingQueue q) { - System.err.println(Arrays.toString(internalArray(q))); - } - - void checkExhausted(Iterator it) { - if (rnd.nextBoolean()) { - check(!it.hasNext()); - check(isDetached(it)); - } - if (rnd.nextBoolean()) { - it.forEachRemaining(e -> { throw new AssertionError(); }); - checkDetached(it); - } - if (rnd.nextBoolean()) - try { it.next(); fail("should throw"); } - catch (NoSuchElementException success) {} - } - - boolean isDetached(Iterator it) { - try { - return prevTakeIndexField.getInt(it) < 0; - } catch (IllegalAccessException t) { unexpected(t); return false; } - } - - void checkDetached(Iterator it) { - check(isDetached(it)); - } - - void removeUsingIterator(ArrayBlockingQueue q, Object element) { - Iterator it = q.iterator(); - while (it.hasNext()) { - Object x = it.next(); - if (element.equals(x)) - it.remove(); - checkRemoveThrowsISE(it); - } - } - - void checkRemoveThrowsISE(Iterator it) { - if (rnd.nextBoolean()) - return; - try { it.remove(); fail("should throw"); } - catch (IllegalStateException success) {} - } - - void checkRemoveHasNoEffect(Iterator it, Collection c) { - if (rnd.nextBoolean()) - return; - int size = c.size(); - it.remove(); // no effect - equal(c.size(), size); - checkRemoveThrowsISE(it); - } - - void checkIterationSanity(Queue q) { - if (rnd.nextBoolean()) - return; - int size = q.size(); - Object[] a = q.toArray(); - Object[] b = new Object[size+2]; - Arrays.fill(b, Boolean.TRUE); - Object[] c = q.toArray(b); - equal(a.length, size); - check(b == c); - check(b[size] == null); - check(b[size+1] == Boolean.TRUE); - equal(q.toString(), Arrays.toString(a)); - Integer[] xx = null, yy = null; - if (size > 0) { - xx = new Integer[size - 1]; - Arrays.fill(xx, 42); - yy = ((Queue)q).toArray(xx); - for (Integer zz : xx) - equal(42, zz); - } - Iterator it = q.iterator(); - for (int i = 0; i < size; i++) { - check(it.hasNext()); - Object x = it.next(); - check(x == a[i]); - check(x == b[i]); - if (xx != null) check(x == yy[i]); - } - check(!it.hasNext()); - } - - private static void waitForFinalizersToRun() { - for (int i = 0; i < 2; i++) - tryWaitForFinalizersToRun(); - } - - private static void tryWaitForFinalizersToRun() { - System.gc(); - final CountDownLatch fin = new CountDownLatch(1); - new Object() { protected void finalize() { fin.countDown(); }}; - System.gc(); - try { fin.await(); } - catch (InterruptedException ie) { throw new Error(ie); } - } - - void test(int capacity, boolean fair) { - //---------------------------------------------------------------- - // q.clear will clear out itrs. - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - List its = new ArrayList<>(); - for (int i = 0; i < capacity; i++) - check(q.add(i)); - check(itrs(q) == null); - for (int i = 0; i < capacity; i++) { - its.add(q.iterator()); - equal(trackedIterators(q), its); - q.poll(); - q.add(capacity+i); - } - q.clear(); - check(itrs(q) == null); - int j = 0; - for (Iterator it : its) { - if (rnd.nextBoolean()) - check(it.hasNext()); - equal(it.next(), j++); - checkExhausted(it); - } - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // q emptying will clear out itrs. - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - List its = new ArrayList<>(); - for (int i = 0; i < capacity; i++) - q.add(i); - check(itrs(q) == null); - for (int i = 0; i < capacity; i++) { - its.add(q.iterator()); - equal(trackedIterators(q), its); - q.poll(); - q.add(capacity+i); - } - for (int i = 0; i < capacity; i++) - q.poll(); - check(itrs(q) == null); - int j = 0; - for (Iterator it : its) { - if (rnd.nextBoolean()) - check(it.hasNext()); - equal(it.next(), j++); - checkExhausted(it); - } - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Advancing 2 cycles will remove iterators. - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - List its = new ArrayList<>(); - for (int i = 0; i < capacity; i++) - q.add(i); - check(itrs(q) == null); - for (int i = capacity; i < 3 * capacity; i++) { - its.add(q.iterator()); - equal(trackedIterators(q), its); - q.poll(); - q.add(i); - } - for (int i = 3 * capacity; i < 4 * capacity; i++) { - equal(trackedIterators(q), its.subList(capacity,2*capacity)); - q.poll(); - q.add(i); - } - check(itrs(q) == null); - int j = 0; - for (Iterator it : its) { - if (rnd.nextBoolean()) - check(it.hasNext()); - equal(it.next(), j++); - checkExhausted(it); - } - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Interior removal of elements used by an iterator will cause - // it to be untracked. - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - q.add(0); - for (int i = 1; i < 2 * capacity; i++) { - q.add(i); - Integer[] elts = { -1, -2, -3 }; - for (Integer elt : elts) q.add(elt); - equal(q.remove(), i - 1); - Iterator it = q.iterator(); - equal(it.next(), i); - equal(it.next(), elts[0]); - Collections.shuffle(Arrays.asList(elts)); - check(q.remove(elts[0])); - check(q.remove(elts[1])); - equal(trackedIterators(q), Collections.singletonList(it)); - check(q.remove(elts[2])); - check(itrs(q) == null); - equal(it.next(), -2); - if (rnd.nextBoolean()) checkExhausted(it); - if (rnd.nextBoolean()) checkDetached(it); - } - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Check iterators on an empty q - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - for (int i = 0; i < 4; i++) { - Iterator it = q.iterator(); - check(itrs(q) == null); - if (rnd.nextBoolean()) checkExhausted(it); - if (rnd.nextBoolean()) checkDetached(it); - checkRemoveThrowsISE(it); - } - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Check "interior" removal of iterator's last element - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - List its = new ArrayList<>(); - for (int i = 0; i < capacity; i++) - q.add(i); - for (int i = 0; i < capacity; i++) { - Iterator it = q.iterator(); - its.add(it); - for (int j = 0; j < i; j++) - equal(j, it.next()); - equal(attachedIterators(q), its); - } - q.remove(capacity - 1); - equal(attachedIterators(q), its); - for (int i = 1; i < capacity - 1; i++) { - q.remove(capacity - i - 1); - Iterator it = its.get(capacity - i); - checkDetached(it); - equal(attachedIterators(q), its.subList(0, capacity - i)); - if (rnd.nextBoolean()) check(it.hasNext()); - equal(it.next(), capacity - i); - checkExhausted(it); - } - equal(attachedIterators(q), its.subList(0, 2)); - q.remove(0); - check(q.isEmpty()); - check(itrs(q) == null); - Iterator it = its.get(0); - equal(it.next(), 0); - checkRemoveHasNoEffect(it, q); - checkExhausted(it); - checkDetached(it); - checkRemoveHasNoEffect(its.get(1), q); - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Check "interior" removal of alternating elements, straddling 2 cycles - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - List its = new ArrayList<>(); - // Move takeIndex to middle - for (int i = 0; i < capacity/2; i++) { - check(q.add(i)); - equal(q.poll(), i); - } - check(takeIndex(q) == capacity/2); - for (int i = 0; i < capacity; i++) - q.add(i); - for (int i = 0; i < capacity; i++) { - Iterator it = q.iterator(); - its.add(it); - for (int j = 0; j < i; j++) - equal(j, it.next()); - equal(attachedIterators(q), its); - } - // Remove all even elements, in either direction using - // q.remove(), or iterator.remove() - switch (rnd.nextInt(3)) { - case 0: - for (int i = 0; i < capacity; i+=2) { - check(q.remove(i)); - equal(attachedIterators(q), its); - } - break; - case 1: - for (int i = capacity - 2; i >= 0; i-=2) { - check(q.remove(i)); - equal(attachedIterators(q), its); - } - break; - case 2: - Iterator it = q.iterator(); - while (it.hasNext()) { - int i = (Integer) it.next(); - if ((i & 1) == 0) - it.remove(); - } - equal(attachedIterators(q), its); - break; - default: throw new AssertionError(); - } - - for (int i = 0; i < capacity; i++) { - Iterator it = its.get(i); - boolean even = ((i & 1) == 0); - if (even) { - if (rnd.nextBoolean()) check(it.hasNext()); - equal(i, it.next()); - for (int j = i+1; j < capacity; j += 2) - equal(j, it.next()); - check(!isDetached(it)); - check(!it.hasNext()); - check(isDetached(it)); - } else { /* odd */ - if (rnd.nextBoolean()) check(it.hasNext()); - checkRemoveHasNoEffect(it, q); - equal(i, it.next()); - for (int j = i+2; j < capacity; j += 2) - equal(j, it.next()); - check(!isDetached(it)); - check(!it.hasNext()); - check(isDetached(it)); - } - } - equal(trackedIterators(q), Collections.emptyList()); - check(itrs(q) == null); - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Check garbage collection of discarded iterators - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - List its = new ArrayList<>(); - for (int i = 0; i < capacity; i++) - q.add(i); - for (int i = 0; i < capacity; i++) { - its.add(q.iterator()); - equal(attachedIterators(q), its); - } - its = null; - waitForFinalizersToRun(); - List trackedIterators = trackedIterators(q); - equal(trackedIterators.size(), capacity); - for (Iterator x : trackedIterators) - check(x == null); - Iterator it = q.iterator(); - equal(trackedIterators(q), Collections.singletonList(it)); - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Check garbage collection of discarded iterators, - // with a randomly retained subset. - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - List its = new ArrayList<>(); - List retained = new ArrayList<>(); - final int size = 1 + rnd.nextInt(capacity); - for (int i = 0; i < size; i++) - q.add(i); - for (int i = 0; i < size; i++) { - Iterator it = q.iterator(); - its.add(it); - equal(attachedIterators(q), its); - } - // Leave sufficient gaps in retained - for (int i = 0; i < size; i+= 2+rnd.nextInt(3)) - retained.add(its.get(i)); - its = null; - waitForFinalizersToRun(); - List trackedIterators = trackedIterators(q); - equal(trackedIterators.size(), size); - for (Iterator it : trackedIterators) - check((it == null) ^ retained.contains(it)); - Iterator it = q.iterator(); // trigger another sweep - retained.add(it); - equal(trackedIterators(q), retained); - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Check incremental sweeping of discarded iterators. - // Excessively white box?! - //---------------------------------------------------------------- - try { - final int SHORT_SWEEP_PROBES = 4; - final int LONG_SWEEP_PROBES = 16; - final int PROBE_HOP = LONG_SWEEP_PROBES + 6 * SHORT_SWEEP_PROBES; - final int PROBE_HOP_COUNT = 10; - // Expect around 8 sweeps per PROBE_HOP - final int SWEEPS_PER_PROBE_HOP = 8; - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - List its = new ArrayList<>(); - for (int i = 0; i < capacity; i++) - q.add(i); - for (int i = 0; i < PROBE_HOP_COUNT * PROBE_HOP; i++) { - its.add(q.iterator()); - equal(attachedIterators(q), its); - } - // make some garbage, separated by PROBE_HOP - for (int i = 0; i < its.size(); i += PROBE_HOP) - its.set(i, null); - waitForFinalizersToRun(); - int retries; - for (retries = 0; - trackedIterators(q).contains(null) && retries < 1000; - retries++) - // one round of sweeping - its.add(q.iterator()); - check(retries >= PROBE_HOP_COUNT * (SWEEPS_PER_PROBE_HOP - 2)); - check(retries <= PROBE_HOP_COUNT * (SWEEPS_PER_PROBE_HOP + 2)); - Iterator itsit = its.iterator(); - while (itsit.hasNext()) - if (itsit.next() == null) - itsit.remove(); - equal(trackedIterators(q), its); - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Check safety of iterator.remove while in detached mode. - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - List its = new ArrayList<>(); - for (int i = 0; i < capacity/2; i++) { - q.add(i); - q.remove(); - } - check(takeIndex(q) == capacity/2); - for (int i = 0; i < capacity; i++) - q.add(i); - for (int i = 0; i < capacity; i++) { - Iterator it = q.iterator(); - its.add(it); - for (int j = 0; j < i; j++) - equal(j, it.next()); - equal(attachedIterators(q), its); - } - for (int i = capacity - 1; i >= 0; i--) { - Iterator it = its.get(i); - equal(i, it.next()); // last element - check(!isDetached(it)); - check(!it.hasNext()); // first hasNext failure - check(isDetached(it)); - int size = q.size(); - check(q.contains(i)); - switch (rnd.nextInt(3)) { - case 0: - it.remove(); - check(!q.contains(i)); - equal(q.size(), size - 1); - break; - case 1: - // replace i with impostor - if (q.remainingCapacity() == 0) { - check(q.remove(i)); - check(q.add(-1)); - } else { - check(q.add(-1)); - check(q.remove(i)); - } - it.remove(); // should have no effect - equal(size, q.size()); - check(q.contains(-1)); - check(q.remove(-1)); - break; - case 2: - // replace i with true impostor - if (i != 0) { - check(q.remove(i)); - check(q.add(i)); - } - it.remove(); - check(!q.contains(i)); - equal(q.size(), size - 1); - break; - default: throw new AssertionError(); - } - checkRemoveThrowsISE(it); - check(isDetached(it)); - check(!trackedIterators(q).contains(it)); - } - check(q.isEmpty()); - check(itrs(q) == null); - for (Iterator it : its) - checkExhausted(it); - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Check dequeues bypassing iterators' current positions. - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - Queue its0 = new ArrayDeque<>(); - Queue itsMid = new ArrayDeque<>(); - List its = new ArrayList<>(); - for (int i = 0; i < capacity; i++) - q.add(i); - for (int i = 0; i < 2 * capacity + 1; i++) { - Iterator it = q.iterator(); - its.add(it); - its0.add(it); - } - for (int i = 0; i < 2 * capacity + 1; i++) { - Iterator it = q.iterator(); - for (int j = 0; j < capacity/2; j++) - equal(j, it.next()); - its.add(it); - itsMid.add(it); - } - for (int i = capacity; i < 3 * capacity; i++) { - Iterator it; - - it = its0.remove(); - checkRemoveThrowsISE(it); - if (rnd.nextBoolean()) check(it.hasNext()); - equal(0, it.next()); - int victim = i - capacity; - for (int j = victim + (victim == 0 ? 1 : 0); j < i; j++) { - if (rnd.nextBoolean()) check(it.hasNext()); - equal(j, it.next()); - } - checkExhausted(it); - - it = itsMid.remove(); - if (victim >= capacity/2) - checkRemoveHasNoEffect(it, q); - equal(capacity/2, it.next()); - if (victim > capacity/2) - checkRemoveHasNoEffect(it, q); - for (int j = Math.max(victim, capacity/2 + 1); j < i; j++) { - if (rnd.nextBoolean()) check(it.hasNext()); - equal(j, it.next()); - } - checkExhausted(it); - - if (rnd.nextBoolean()) { - equal(victim, q.remove()); - } else { - ArrayList list = new ArrayList(1); - q.drainTo(list, 1); - equal(list.size(), 1); - equal(victim, list.get(0)); - } - check(q.add(i)); - } - // takeIndex has wrapped twice. - Iterator it0 = its0.remove(); - Iterator itMid = itsMid.remove(); - check(isDetached(it0)); - check(isDetached(itMid)); - if (rnd.nextBoolean()) check(it0.hasNext()); - if (rnd.nextBoolean()) check(itMid.hasNext()); - checkRemoveThrowsISE(it0); - checkRemoveHasNoEffect(itMid, q); - if (rnd.nextBoolean()) equal(0, it0.next()); - if (rnd.nextBoolean()) equal(capacity/2, itMid.next()); - check(isDetached(it0)); - check(isDetached(itMid)); - equal(capacity, q.size()); - equal(0, q.remainingCapacity()); - } catch (Throwable t) { unexpected(t); } - - //---------------------------------------------------------------- - // Check collective sanity of iteration, toArray() and toString() - //---------------------------------------------------------------- - try { - ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); - for (int i = 0; i < capacity; i++) { - checkIterationSanity(q); - equal(capacity, q.size() + q.remainingCapacity()); - q.add(i); - } - for (int i = 0; i < (capacity + (capacity >> 1)); i++) { - checkIterationSanity(q); - equal(capacity, q.size() + q.remainingCapacity()); - equal(i, q.peek()); - equal(i, q.poll()); - checkIterationSanity(q); - equal(capacity, q.size() + q.remainingCapacity()); - q.add(capacity + i); - } - for (int i = 0; i < capacity; i++) { - checkIterationSanity(q); - equal(capacity, q.size() + q.remainingCapacity()); - int expected = i + capacity + (capacity >> 1); - equal(expected, q.peek()); - equal(expected, q.poll()); - } - checkIterationSanity(q); - } catch (Throwable t) { unexpected(t); } - - } - - //--------------------- Infrastructure --------------------------- - volatile int passed = 0, failed = 0; - void pass() {passed++;} - void fail() {failed++; Thread.dumpStack();} - void fail(String msg) {System.err.println(msg); fail();} - void unexpected(Throwable t) {failed++; t.printStackTrace();} - void check(boolean cond) {if (cond) pass(); else fail();} - void equal(Object x, Object y) { - if (x == null ? y == null : x.equals(y)) pass(); - else fail(x + " not equal to " + y);} - public static void main(String[] args) throws Throwable { - new IteratorConsistency().instanceMain(args);} - public void instanceMain(String[] args) throws Throwable { - try {test(args);} catch (Throwable t) {unexpected(t);} - System.err.printf("%nPassed = %d, failed = %d%n%n", passed, failed); - if (failed > 0) throw new AssertionError("Some tests failed");} -} diff --git a/jdk/test/java/util/concurrent/ArrayBlockingQueue/WhiteBox.java b/jdk/test/java/util/concurrent/ArrayBlockingQueue/WhiteBox.java new file mode 100644 index 00000000000..890748faa5b --- /dev/null +++ b/jdk/test/java/util/concurrent/ArrayBlockingQueue/WhiteBox.java @@ -0,0 +1,759 @@ +/* + * 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. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * Written by Martin Buchholz with assistance from members of JCP + * JSR-166 Expert Group and released to the public domain, as + * explained at http://creativecommons.org/publicdomain/zero/1.0/ + */ + +/* + * @test + * @modules java.base/java.util.concurrent:open + * @run testng WhiteBox + * @summary White box tests of implementation details + */ + +import static org.testng.Assert.*; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.lang.ref.WeakReference; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.Queue; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.TimeUnit; +import java.util.function.BooleanSupplier; + +@Test +public class WhiteBox { + final ThreadLocalRandom rnd = ThreadLocalRandom.current(); + final MethodHandles.Lookup lookup = MethodHandles.lookup(); + final VarHandle ITRS, ITEMS, TAKEINDEX, PUTINDEX, COUNT, HEAD, NEXT, PREVTAKEINDEX; + + WhiteBox() throws ReflectiveOperationException { + Class qClass = ArrayBlockingQueue.class; + Class itrClass = Class.forName(qClass.getName() + "$Itr"); + Class itrsClass = Class.forName(qClass.getName() + "$Itrs"); + Class nodeClass = Class.forName(itrsClass.getName() + "$Node"); + ITRS = findVarHandle(qClass, "itrs", itrsClass); + ITEMS = findVarHandle(qClass, "items", Object[].class); + TAKEINDEX = findVarHandle(qClass, "takeIndex", int.class); + PUTINDEX = findVarHandle(qClass, "putIndex", int.class); + COUNT = findVarHandle(qClass, "count", int.class); + HEAD = findVarHandle(itrsClass, "head", nodeClass); + NEXT = findVarHandle(nodeClass, "next", nodeClass); + PREVTAKEINDEX = findVarHandle(itrClass, "prevTakeIndex", int.class); + } + + VarHandle findVarHandle(Class recv, String name, Class type) + throws ReflectiveOperationException { + return MethodHandles.privateLookupIn(recv, lookup) + .findVarHandle(recv, name, type); + } + + Object itrs(ArrayBlockingQueue q) { return ITRS.get(q); } + Object[] items(ArrayBlockingQueue q) { return (Object[]) ITEMS.get(q); } + int takeIndex(ArrayBlockingQueue q) { return (int) TAKEINDEX.get(q); } + int putIndex(ArrayBlockingQueue q) { return (int) PUTINDEX.get(q); } + int count(ArrayBlockingQueue q) { return (int) COUNT.get(q); } + Object head(Object itrs) { return HEAD.get(itrs); } + Object next(Object node) { return NEXT.get(node); } + int prevTakeIndex(Iterator itr) { return (int) PREVTAKEINDEX.get(itr); } + + boolean isDetached(Iterator it) { + return prevTakeIndex(it) < 0; + } + + void assertIteratorExhausted(Iterator it) { + if (rnd.nextBoolean()) { + assertTrue(!it.hasNext()); + assertTrue(isDetached(it)); + } + if (rnd.nextBoolean()) { + it.forEachRemaining(e -> { throw new AssertionError(); }); + assertTrue(isDetached(it)); + } + if (rnd.nextBoolean()) + try { it.next(); fail("should throw"); } + catch (NoSuchElementException success) {} + } + + List trackedIterators(ArrayBlockingQueue q) { + List its = new ArrayList<>(); + Object itrs = itrs(q); + if (itrs != null) { + for (Object p = head(itrs); p != null; p = next(p)) + its.add(((WeakReference)(p)).get()); + Collections.reverse(its); + } + return its; + } + + List attachedIterators(ArrayBlockingQueue q) { + List its = new ArrayList<>(); + Object itrs = itrs(q); + if (itrs != null) { + for (Object p = head(itrs); p != null; p = next(p)) { + Iterator it = ((WeakReference)(p)).get(); + if (it != null && !isDetached(it)) + its.add(it); + } + Collections.reverse(its); + } + return its; + } + + void assertRemoveThrowsISE(Iterator it) { + if (rnd.nextBoolean()) + try { it.remove(); fail("should throw"); } + catch (IllegalStateException success) {} + } + + void assertRemoveHasNoEffect(Iterator it, Collection c) { + if (rnd.nextBoolean()) { + int size = c.size(); + it.remove(); // no effect + assertEquals(c.size(), size); + assertRemoveThrowsISE(it); + } + } + + void checkIterationSanity(Queue q) { + if (rnd.nextBoolean()) + return; + int size = q.size(); + Object[] a = q.toArray(); + Object[] b = new Object[size+2]; + Arrays.fill(b, Boolean.TRUE); + Object[] c = q.toArray(b); + assertEquals(a.length, size); + assertSame(b, c); + assertNull(b[size]); + assertSame(b[size+1], Boolean.TRUE); + assertEquals(q.toString(), Arrays.toString(a)); + Integer[] xx = null, yy = null; + if (size > 0) { + xx = new Integer[size - 1]; + Arrays.fill(xx, 42); + yy = ((Queue)q).toArray(xx); + for (Integer zz : xx) + assertEquals(42, (int) zz); + } + Iterator it = q.iterator(); + for (int i = 0; i < size; i++) { + if (rnd.nextBoolean()) assertTrue(it.hasNext()); + Object x = it.next(); + assertSame(x, a[i]); + assertSame(x, b[i]); + if (xx != null) assertSame(x, yy[i]); + } + if (rnd.nextBoolean()) assertTrue(!it.hasNext()); + } + + /** + * Instead of having putIndex (and takeIndex) at the initial + * default of 0, move them to a random location. + */ + void randomizePutIndex(ArrayBlockingQueue q) { + assertTrue(q.isEmpty()); + int capacity = q.remainingCapacity(); + int n = rnd.nextInt(capacity + 1); + int putIndex = putIndex(q); + for (int i = n; i-->0; ) q.add(Boolean.TRUE); + for (int i = n; i-->0; ) q.remove(); + assertEquals(putIndex(q), (putIndex + n) % items(q).length); + } + + /** No guarantees, but effective in practice. */ + static void forceFullGc() { + CountDownLatch finalizeDone = new CountDownLatch(1); + WeakReference ref = new WeakReference(new Object() { + protected void finalize() { finalizeDone.countDown(); }}); + try { + for (int i = 0; i < 10; i++) { + System.gc(); + if (finalizeDone.await(1L, TimeUnit.SECONDS) && ref.get() == null) { + System.runFinalization(); // try to pick up stragglers + return; + } + } + } catch (InterruptedException unexpected) { + throw new AssertionError("unexpected InterruptedException"); + } + throw new AssertionError("failed to do a \"full\" gc"); + } + + static void gcAwait(BooleanSupplier s) { + for (int i = 0; i < 10; i++) { + if (s.getAsBoolean()) + return; + forceFullGc(); + } + throw new AssertionError("failed to satisfy condition"); + } + + public void clear_willClearItrs() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(2, 10); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + randomizePutIndex(q); + List its = new ArrayList<>(); + for (int i = 0; i < capacity; i++) + assertTrue(q.add(i)); + assertNull(itrs(q)); + for (int i = 0; i < capacity; i++) { + its.add(q.iterator()); + assertEquals(trackedIterators(q), its); + q.poll(); + q.add(capacity + i); + } + q.clear(); + assertNull(itrs(q)); + int j = 0; + for (Iterator it : its) { + assertTrue(isDetached(it)); + if (rnd.nextBoolean()) assertTrue(it.hasNext()); + if (rnd.nextBoolean()) { + assertEquals(it.next(), j); + assertIteratorExhausted(it); + } + j++; + } + } + + public void queueEmptyingWillClearItrs() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(2, 10); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + randomizePutIndex(q); + List its = new ArrayList<>(); + for (int i = 0; i < capacity; i++) + q.add(i); + assertNull(itrs(q)); + for (int i = 0; i < capacity; i++) { + its.add(q.iterator()); + assertEquals(trackedIterators(q), its); + q.poll(); + q.add(capacity+i); + } + for (int i = 0; i < capacity; i++) + q.poll(); + assertNull(itrs(q)); + int j = 0; + for (Iterator it : its) { + assertTrue(isDetached(it)); + if (rnd.nextBoolean()) assertTrue(it.hasNext()); + if (rnd.nextBoolean()) { + assertEquals(it.next(), j); + assertIteratorExhausted(it); + } + j++; + } + } + + public void advancing2CyclesWillRemoveIterators() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(2, 10); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + List its = new ArrayList<>(); + for (int i = 0; i < capacity; i++) + q.add(i); + assertNull(itrs(q)); + for (int i = capacity; i < 3 * capacity; i++) { + its.add(q.iterator()); + assertEquals(trackedIterators(q), its); + q.poll(); + q.add(i); + } + for (int i = 3 * capacity; i < 4 * capacity; i++) { + assertEquals(trackedIterators(q), its.subList(capacity,2*capacity)); + q.poll(); + q.add(i); + } + assertNull(itrs(q)); + int j = 0; + for (Iterator it : its) { + assertTrue(isDetached(it)); + if (rnd.nextBoolean()) assertTrue(it.hasNext()); + if (rnd.nextBoolean()) { + assertEquals(it.next(), j); + assertIteratorExhausted(it); + } + j++; + } + } + + /** + * Interior removal of elements used by an iterator will cause it + * to be untracked. + */ + public void interiorRemovalOfElementsUsedByIterator() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(10, 20); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + randomizePutIndex(q); + q.add(0); + for (int i = 1; i < 2 * capacity; i++) { + q.add(i); + Integer[] elts = { -1, -2, -3 }; + for (Integer elt : elts) q.add(elt); + assertEquals(q.remove(), i - 1); + Iterator it = q.iterator(); + assertEquals(it.next(), i); + assertEquals(it.next(), elts[0]); + Collections.shuffle(Arrays.asList(elts)); + assertTrue(q.remove(elts[0])); + assertTrue(q.remove(elts[1])); + assertEquals(trackedIterators(q), Collections.singletonList(it)); + assertTrue(q.remove(elts[2])); + assertNull(itrs(q)); + assertEquals(it.next(), -2); + assertIteratorExhausted(it); + assertTrue(isDetached(it)); + } + } + + public void iteratorsOnEmptyQueue() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(1, 10); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + randomizePutIndex(q); + for (int i = 0; i < 4; i++) { + Iterator it = q.iterator(); + assertNull(itrs(q)); + assertIteratorExhausted(it); + assertTrue(isDetached(it)); + assertRemoveThrowsISE(it); + } + } + + public void interiorRemovalOfIteratorsLastElement() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(3, 10); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + randomizePutIndex(q); + List its = new ArrayList<>(); + for (int i = 0; i < capacity; i++) + q.add(i); + for (int i = 0; i < capacity; i++) { + Iterator it = q.iterator(); + its.add(it); + for (int j = 0; j < i; j++) + assertEquals(j, it.next()); + assertEquals(attachedIterators(q), its); + } + q.remove(capacity - 1); + assertEquals(attachedIterators(q), its); + for (int i = 1; i < capacity - 1; i++) { + q.remove(capacity - i - 1); + Iterator it = its.get(capacity - i); + assertTrue(isDetached(it)); + assertEquals(attachedIterators(q), its.subList(0, capacity - i)); + if (rnd.nextBoolean()) assertTrue(it.hasNext()); + assertEquals(it.next(), capacity - i); + assertIteratorExhausted(it); + } + assertEquals(attachedIterators(q), its.subList(0, 2)); + q.remove(0); + assertTrue(q.isEmpty()); + assertNull(itrs(q)); + Iterator it = its.get(0); + assertEquals(it.next(), 0); + assertRemoveHasNoEffect(it, q); + assertIteratorExhausted(it); + assertTrue(isDetached(it)); + assertRemoveHasNoEffect(its.get(1), q); + } + + /** + * Checks "interior" removal of alternating elements, straddling 2 cycles + */ + public void interiorRemovalOfAlternatingElements() { + boolean fair = rnd.nextBoolean(); + int capacity = 2 * rnd.nextInt(2, 10); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + List its = new ArrayList<>(); + // Move takeIndex to middle + for (int i = 0; i < capacity/2; i++) { + assertTrue(q.add(i)); + assertEquals(q.poll(), i); + } + assertEquals(takeIndex(q), capacity/2); + for (int i = 0; i < capacity; i++) + q.add(i); + for (int i = 0; i < capacity; i++) { + Iterator it = q.iterator(); + its.add(it); + for (int j = 0; j < i; j++) + assertEquals(j, it.next()); + assertEquals(attachedIterators(q), its); + } + + // Remove all even elements, in either direction, using + // q.remove(), or iterator.remove() + switch (rnd.nextInt(3)) { + case 0: + for (int i = 0; i < capacity; i+=2) assertTrue(q.remove(i)); + break; + case 1: + for (int i = capacity - 2; i >= 0; i-=2) assertTrue(q.remove(i)); + break; + case 2: + Iterator it = q.iterator(); + while (it.hasNext()) { + int i = (Integer) it.next(); + if ((i & 1) == 0) + it.remove(); + } + break; + default: throw new AssertionError(); + } + assertEquals(attachedIterators(q), its); + + for (int i = 0; i < capacity; i++) { + Iterator it = its.get(i); + boolean even = ((i & 1) == 0); + if (even) { + if (rnd.nextBoolean()) assertTrue(it.hasNext()); + assertEquals(i, it.next()); + for (int j = i+1; j < capacity; j += 2) + assertEquals(j, it.next()); + assertTrue(!isDetached(it)); + assertTrue(!it.hasNext()); + assertTrue(isDetached(it)); + } else { /* odd */ + if (rnd.nextBoolean()) assertTrue(it.hasNext()); + assertRemoveHasNoEffect(it, q); + assertEquals(i, it.next()); + for (int j = i+2; j < capacity; j += 2) + assertEquals(j, it.next()); + assertTrue(!isDetached(it)); + assertTrue(!it.hasNext()); + assertTrue(isDetached(it)); + } + } + assertEquals(trackedIterators(q), Collections.emptyList()); + assertNull(itrs(q)); + } + + public void garbageCollectionOfUnreachableIterators() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(1, 10); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + randomizePutIndex(q); + List its = new ArrayList<>(); + for (int i = 0; i < capacity; i++) q.add(i); + for (int i = 0; i < capacity; i++) its.add(q.iterator()); + assertEquals(attachedIterators(q), its); + its = null; + gcAwait(() -> { + List trackedIterators = trackedIterators(q); + assertEquals(trackedIterators.size(), capacity); + for (Iterator x : trackedIterators) + if (x != null) return false; + return true; + }); + Iterator it = q.iterator(); // + assertEquals(trackedIterators(q), Collections.singletonList(it)); + } + + public void garbageCollectionOfUnreachableIteratorsWithRandomlyRetainedSubset() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(10, 20); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + randomizePutIndex(q); + List its = new ArrayList<>(); + List retained = new ArrayList<>(); + final int size = 1 + rnd.nextInt(capacity); + for (int i = 0; i < size; i++) q.add(i); + for (int i = 0; i < size; i++) its.add(q.iterator()); + assertEquals(attachedIterators(q), its); + // Leave sufficient gaps in retained + for (int i = 0; i < size; i+= 2+rnd.nextInt(3)) + retained.add(its.get(i)); + its = null; + gcAwait(() -> { + List trackedIterators = trackedIterators(q); + assertEquals(trackedIterators.size(), size); + for (Iterator it : trackedIterators) + if ((it != null) ^ retained.contains(it)) return false; + return true; + }); + Iterator it = q.iterator(); // trigger another sweep + retained.add(it); + assertEquals(trackedIterators(q), retained); + } + + /** + * Checks incremental sweeping of unreachable iterators. + * Excessively white box?! + */ + public void incrementalSweepingOfUnreachableIterators() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(10, 20); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + randomizePutIndex(q); + final int SHORT_SWEEP_PROBES = 4; + final int LONG_SWEEP_PROBES = 16; + final int PROBE_HOP = LONG_SWEEP_PROBES + 6 * SHORT_SWEEP_PROBES; + final int PROBE_HOP_COUNT = 10; + // Expect around 8 sweeps per PROBE_HOP + final int SWEEPS_PER_PROBE_HOP = 8; + List its = new ArrayList<>(); + for (int i = 0; i < capacity; i++) + q.add(i); + for (int i = 0; i < PROBE_HOP_COUNT * PROBE_HOP; i++) + its.add(q.iterator()); + assertEquals(attachedIterators(q), its); + // make some garbage, separated by PROBE_HOP + for (int i = 0; i < its.size(); i += PROBE_HOP) + its.set(i, null); + its.removeIf(it -> it == null); + forceFullGc(); + int retries; + for (retries = 0; + trackedIterators(q).contains(null) && retries < 1000; + retries++) + // one round of sweeping + its.add(q.iterator()); + assertTrue(retries >= PROBE_HOP_COUNT * (SWEEPS_PER_PROBE_HOP - 2)); + assertTrue(retries <= PROBE_HOP_COUNT * (SWEEPS_PER_PROBE_HOP + 2)); + assertEquals(trackedIterators(q), its); + } + + public void Iterator_remove_safetyWhileInDetachedMode() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(10, 20); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + List its = new ArrayList<>(); + for (int i = 0; i < capacity/2; i++) { + q.add(i); + q.remove(); + } + assertEquals(takeIndex(q), capacity/2); + for (int i = 0; i < capacity; i++) + q.add(i); + for (int i = 0; i < capacity; i++) { + Iterator it = q.iterator(); + its.add(it); + for (int j = 0; j < i; j++) + assertEquals(j, it.next()); + } + assertEquals(attachedIterators(q), its); + for (int i = capacity - 1; i >= 0; i--) { + Iterator it = its.get(i); + assertEquals(i, it.next()); // last element + assertTrue(!isDetached(it)); + assertTrue(!it.hasNext()); // first hasNext failure + assertTrue(isDetached(it)); + int size = q.size(); + assertTrue(q.contains(i)); + switch (rnd.nextInt(3)) { + case 0: + it.remove(); + assertTrue(!q.contains(i)); + assertEquals(q.size(), size - 1); + break; + case 1: + // replace i with impostor + if (q.remainingCapacity() == 0) { + assertTrue(q.remove(i)); + assertTrue(q.add(-1)); + } else { + assertTrue(q.add(-1)); + assertTrue(q.remove(i)); + } + it.remove(); // should have no effect + assertEquals(size, q.size()); + assertTrue(q.contains(-1)); + assertTrue(q.remove(-1)); + break; + case 2: + // replace i with true impostor + if (i != 0) { + assertTrue(q.remove(i)); + assertTrue(q.add(i)); + } + it.remove(); + assertTrue(!q.contains(i)); + assertEquals(q.size(), size - 1); + break; + default: throw new AssertionError(); + } + assertRemoveThrowsISE(it); + assertTrue(isDetached(it)); + assertTrue(!trackedIterators(q).contains(it)); + } + assertTrue(q.isEmpty()); + assertNull(itrs(q)); + for (Iterator it : its) + assertIteratorExhausted(it); + } + + /** + * Checks dequeues bypassing iterators' current positions. + */ + public void dequeuesBypassingIteratorCurrentPositions() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(10, 20); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + Queue its0 = new ArrayDeque<>(); + Queue itsMid = new ArrayDeque<>(); + List its = new ArrayList<>(); + for (int i = 0; i < capacity; i++) + q.add(i); + for (int i = 0; i < 2 * capacity + 1; i++) { + Iterator it = q.iterator(); + its.add(it); + its0.add(it); + } + for (int i = 0; i < 2 * capacity + 1; i++) { + Iterator it = q.iterator(); + for (int j = 0; j < capacity/2; j++) + assertEquals(j, it.next()); + its.add(it); + itsMid.add(it); + } + for (int i = capacity; i < 3 * capacity; i++) { + Iterator it; + + it = its0.remove(); + assertRemoveThrowsISE(it); + if (rnd.nextBoolean()) assertTrue(it.hasNext()); + assertEquals(0, it.next()); + int victim = i - capacity; + for (int j = victim + (victim == 0 ? 1 : 0); j < i; j++) { + if (rnd.nextBoolean()) assertTrue(it.hasNext()); + assertEquals(j, it.next()); + } + assertIteratorExhausted(it); + + it = itsMid.remove(); + if (victim >= capacity/2) + assertRemoveHasNoEffect(it, q); + assertEquals(capacity/2, it.next()); + if (victim > capacity/2) + assertRemoveHasNoEffect(it, q); + for (int j = Math.max(victim, capacity/2 + 1); j < i; j++) { + if (rnd.nextBoolean()) assertTrue(it.hasNext()); + assertEquals(j, it.next()); + } + assertIteratorExhausted(it); + + if (rnd.nextBoolean()) { + assertEquals(victim, q.remove()); + } else { + ArrayList list = new ArrayList(1); + q.drainTo(list, 1); + assertEquals(list.size(), 1); + assertEquals(victim, list.get(0)); + } + assertTrue(q.add(i)); + } + // takeIndex has wrapped twice. + Iterator it0 = its0.remove(); + Iterator itMid = itsMid.remove(); + assertTrue(isDetached(it0)); + assertTrue(isDetached(itMid)); + if (rnd.nextBoolean()) assertTrue(it0.hasNext()); + if (rnd.nextBoolean()) assertTrue(itMid.hasNext()); + assertRemoveThrowsISE(it0); + assertRemoveHasNoEffect(itMid, q); + if (rnd.nextBoolean()) assertEquals(0, it0.next()); + if (rnd.nextBoolean()) assertEquals(capacity/2, itMid.next()); + assertTrue(isDetached(it0)); + assertTrue(isDetached(itMid)); + assertEquals(capacity, q.size()); + assertEquals(0, q.remainingCapacity()); + } + + /** + * Checks collective sanity of iteration, toArray() and toString(). + */ + public void collectiveSanity() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(10, 20); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + randomizePutIndex(q); + for (int i = 0; i < capacity; i++) { + checkIterationSanity(q); + assertEquals(capacity, q.size() + q.remainingCapacity()); + q.add(i); + } + for (int i = 0; i < (capacity + (capacity >> 1)); i++) { + checkIterationSanity(q); + assertEquals(capacity, q.size() + q.remainingCapacity()); + assertEquals(i, q.peek()); + assertEquals(i, q.poll()); + checkIterationSanity(q); + assertEquals(capacity, q.size() + q.remainingCapacity()); + q.add(capacity + i); + } + for (int i = 0; i < capacity; i++) { + checkIterationSanity(q); + assertEquals(capacity, q.size() + q.remainingCapacity()); + int expected = i + capacity + (capacity >> 1); + assertEquals(expected, q.peek()); + assertEquals(expected, q.poll()); + } + checkIterationSanity(q); + } + + public void iteratorsDetachedWhenExhaustedAndLastRetRemoved() { + boolean fair = rnd.nextBoolean(); + int capacity = rnd.nextInt(2, 10); + ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair); + randomizePutIndex(q); + int size = rnd.nextInt(1, capacity + 1); + for (int i = 0; i < size; i++) q.add(i); + Iterator it = q.iterator(); + for (int i = 0; i < size - 1; i++) assertEquals(i, it.next()); + assertEquals(trackedIterators(q), Collections.singletonList(it)); + assertFalse(isDetached(it)); + switch (rnd.nextInt(2)) { + case 0: assertTrue(q.remove(size - 1)); break; + case 1: assertTrue(q.removeIf(e -> e.equals(size - 1))); break; + default: throw new AssertionError(); + } + assertEquals(size - 1, it.next()); // should trigger detach + assertNull(itrs(q)); + assertTrue(isDetached(it)); + assertRemoveHasNoEffect(it, q); + } +} diff --git a/jdk/test/java/util/concurrent/ScheduledThreadPoolExecutor/GCRetention.java b/jdk/test/java/util/concurrent/ScheduledThreadPoolExecutor/GCRetention.java index 76e5eb9a5f8..f1a764b51ad 100644 --- a/jdk/test/java/util/concurrent/ScheduledThreadPoolExecutor/GCRetention.java +++ b/jdk/test/java/util/concurrent/ScheduledThreadPoolExecutor/GCRetention.java @@ -34,12 +34,12 @@ /* * @test * @summary Ensure that waiting pool threads don't retain refs to tasks. - * @library /lib/testlibrary/ */ -import static java.util.concurrent.TimeUnit.MILLISECONDS; - +import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.List; import java.util.concurrent.Delayed; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -47,10 +47,8 @@ import java.util.concurrent.RunnableScheduledFuture; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import jdk.testlibrary.Utils; public class GCRetention { - static final long LONG_DELAY_MS = Utils.adjustTimeout(10_000); /** * A custom thread pool with a custom RunnableScheduledFuture, for the @@ -80,53 +78,48 @@ public class GCRetention { } } - int countRefsCleared(WeakReference[] refs) { - int count = 0; - for (WeakReference ref : refs) - if (ref.get() == null) - count++; - return count; + void removeAll(ReferenceQueue q, int n) throws InterruptedException { + for (int j = n; j--> 0; ) { + if (q.poll() == null) { + for (;;) { + System.gc(); + if (q.remove(1000) != null) + break; + System.out.printf( + "%d/%d unqueued references remaining%n", j, n); + } + } + } + check(q.poll() == null); } void test(String[] args) throws Throwable { - CustomPool pool = new CustomPool(10); + final CustomPool pool = new CustomPool(10); final int size = 100; - WeakReference[] refs = new WeakReference[size]; - Future[] futures = new Future[size]; - for (int i = 0; i < size; i++) { - final Object x = new Object(); - refs[i] = new WeakReference(x); - // Create a Runnable with a strong ref to x. - Runnable r = new Runnable() { - public void run() { System.out.println(x); } - }; - // Schedule a custom task with a strong reference to r. - // Later tasks have earlier expiration, to ensure multiple - // residents of queue head. - futures[i] = pool.schedule(r, size*2-i, TimeUnit.MINUTES); - } - Thread.sleep(10); - for (int i = 0; i < size; i++) { - if (futures[i] != null) { - futures[i].cancel(false); - futures[i] = null; - } + final ReferenceQueue q = new ReferenceQueue<>(); + final List> refs = new ArrayList<>(size); + final List> futures = new ArrayList<>(size); + + // Schedule custom tasks with strong references. + class Task implements Runnable { + final Object x; + Task() { refs.add(new WeakReference<>(x = new Object(), q)); } + public void run() { System.out.println(x); } } + // Give tasks added later earlier expiration, to ensure + // multiple residents of queue head. + for (int i = size; i--> 0; ) + futures.add(pool.schedule(new Task(), i + 1, TimeUnit.MINUTES)); + futures.forEach(future -> future.cancel(false)); + futures.clear(); + pool.purge(); - int cleared = 0; - for (int i = 0; - i < 10 && (cleared = countRefsCleared(refs)) < size; - i++) { - System.gc(); - System.runFinalization(); - Thread.sleep(10); - } + removeAll(q, size); + for (WeakReference ref : refs) check(ref.get() == null); + pool.shutdown(); - pool.awaitTermination(LONG_DELAY_MS, MILLISECONDS); - if (cleared < size) - throw new Error(String.format - ("references to %d/%d tasks retained (\"leaked\")", - size - cleared, size)); + // rely on test harness to handle timeout + pool.awaitTermination(1L, TimeUnit.DAYS); } //--------------------- Infrastructure --------------------------- diff --git a/jdk/test/java/util/concurrent/tck/ForkJoinPool9Test.java b/jdk/test/java/util/concurrent/tck/ForkJoinPool9Test.java index 08cdfeb86dc..8a87e473a6f 100644 --- a/jdk/test/java/util/concurrent/tck/ForkJoinPool9Test.java +++ b/jdk/test/java/util/concurrent/tck/ForkJoinPool9Test.java @@ -32,9 +32,14 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ +import static java.util.concurrent.TimeUnit.MILLISECONDS; + import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; -import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ForkJoinPool; +import java.util.concurrent.ForkJoinTask; +import java.util.concurrent.Future; import junit.framework.Test; import junit.framework.TestSuite; @@ -53,29 +58,43 @@ public class ForkJoinPool9Test extends JSR166TestCase { */ public void testCommonPoolThreadContextClassLoader() throws Throwable { if (!testImplementationDetails) return; + + // Ensure common pool has at least one real thread + String prop = System.getProperty( + "java.util.concurrent.ForkJoinPool.common.parallelism"); + if ("0".equals(prop)) return; + VarHandle CCL = MethodHandles.privateLookupIn(Thread.class, MethodHandles.lookup()) .findVarHandle(Thread.class, "contextClassLoader", ClassLoader.class); ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); boolean haveSecurityManager = (System.getSecurityManager() != null); - CompletableFuture.runAsync( - () -> { - assertSame(systemClassLoader, - Thread.currentThread().getContextClassLoader()); - assertSame(systemClassLoader, - CCL.get(Thread.currentThread())); - if (haveSecurityManager) - assertThrows( - SecurityException.class, - () -> System.getProperty("foo"), - () -> Thread.currentThread().setContextClassLoader(null)); - - // TODO ? -// if (haveSecurityManager -// && Thread.currentThread().getClass().getSimpleName() -// .equals("InnocuousForkJoinWorkerThread")) -// assertThrows(SecurityException.class, /* ?? */); - }).join(); + CountDownLatch taskStarted = new CountDownLatch(1); + Runnable runInCommonPool = () -> { + taskStarted.countDown(); + assertTrue(ForkJoinTask.inForkJoinPool()); + assertSame(ForkJoinPool.commonPool(), + ForkJoinTask.getPool()); + assertSame(systemClassLoader, + Thread.currentThread().getContextClassLoader()); + assertSame(systemClassLoader, + CCL.get(Thread.currentThread())); + if (haveSecurityManager) + assertThrows( + SecurityException.class, + () -> System.getProperty("foo"), + () -> Thread.currentThread().setContextClassLoader(null)); + // TODO ? +// if (haveSecurityManager +// && Thread.currentThread().getClass().getSimpleName() +// .equals("InnocuousForkJoinWorkerThread")) +// assertThrows(SecurityException.class, /* ?? */); + }; + Future f = ForkJoinPool.commonPool().submit(runInCommonPool); + // Ensure runInCommonPool is truly running in the common pool, + // by giving this thread no opportunity to "help" on get(). + assertTrue(taskStarted.await(LONG_DELAY_MS, MILLISECONDS)); + assertNull(f.get()); } } diff --git a/jdk/test/java/util/concurrent/tck/JSR166TestCase.java b/jdk/test/java/util/concurrent/tck/JSR166TestCase.java index 80eb346db4e..1037eb8f3e7 100644 --- a/jdk/test/java/util/concurrent/tck/JSR166TestCase.java +++ b/jdk/test/java/util/concurrent/tck/JSR166TestCase.java @@ -1326,20 +1326,60 @@ public class JSR166TestCase extends TestCase { startTime = System.nanoTime(); else if (millisElapsedSince(startTime) > timeoutMillis) { threadAssertTrue(thread.isAlive()); - return; + fail("timed out waiting for thread to enter wait state"); } Thread.yield(); } } /** - * Waits up to LONG_DELAY_MS for the given thread to enter a wait - * state: BLOCKED, WAITING, or TIMED_WAITING. + * Spin-waits up to the specified number of milliseconds for the given + * thread to enter a wait state: BLOCKED, WAITING, or TIMED_WAITING, + * and additionally satisfy the given condition. + */ + void waitForThreadToEnterWaitState( + Thread thread, long timeoutMillis, Callable waitingForGodot) { + long startTime = 0L; + for (;;) { + Thread.State s = thread.getState(); + if (s == Thread.State.BLOCKED || + s == Thread.State.WAITING || + s == Thread.State.TIMED_WAITING) { + try { + if (waitingForGodot.call()) + return; + } catch (Throwable fail) { threadUnexpectedException(fail); } + } + else if (s == Thread.State.TERMINATED) + fail("Unexpected thread termination"); + else if (startTime == 0L) + startTime = System.nanoTime(); + else if (millisElapsedSince(startTime) > timeoutMillis) { + threadAssertTrue(thread.isAlive()); + fail("timed out waiting for thread to enter wait state"); + } + Thread.yield(); + } + } + + /** + * Spin-waits up to LONG_DELAY_MS milliseconds for the given thread to + * enter a wait state: BLOCKED, WAITING, or TIMED_WAITING. */ void waitForThreadToEnterWaitState(Thread thread) { waitForThreadToEnterWaitState(thread, LONG_DELAY_MS); } + /** + * Spin-waits up to LONG_DELAY_MS milliseconds for the given thread to + * enter a wait state: BLOCKED, WAITING, or TIMED_WAITING, + * and additionally satisfy the given condition. + */ + void waitForThreadToEnterWaitState( + Thread thread, Callable waitingForGodot) { + waitForThreadToEnterWaitState(thread, LONG_DELAY_MS, waitingForGodot); + } + /** * Returns the number of milliseconds since time given by * startNanoTime, which must have been previously returned from a diff --git a/jdk/test/java/util/concurrent/tck/LinkedTransferQueueTest.java b/jdk/test/java/util/concurrent/tck/LinkedTransferQueueTest.java index 55965e6188a..6a22b0e20a9 100644 --- a/jdk/test/java/util/concurrent/tck/LinkedTransferQueueTest.java +++ b/jdk/test/java/util/concurrent/tck/LinkedTransferQueueTest.java @@ -42,6 +42,7 @@ import java.util.List; import java.util.NoSuchElementException; import java.util.Queue; import java.util.concurrent.BlockingQueue; +import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executors; import java.util.concurrent.ExecutorService; @@ -766,9 +767,11 @@ public class LinkedTransferQueueTest extends JSR166TestCase { }}); threadStarted.await(); - waitForThreadToEnterWaitState(t); - assertEquals(1, q.getWaitingConsumerCount()); - assertTrue(q.hasWaitingConsumer()); + Callable oneConsumer + = new Callable() { public Boolean call() { + return q.hasWaitingConsumer() + && q.getWaitingConsumerCount() == 1; }}; + waitForThreadToEnterWaitState(t, oneConsumer); assertTrue(q.offer(one)); assertEquals(0, q.getWaitingConsumerCount()); @@ -790,7 +793,7 @@ public class LinkedTransferQueueTest extends JSR166TestCase { /** * transfer waits until a poll occurs. The transfered element - * is returned by this associated poll. + * is returned by the associated poll. */ public void testTransfer2() throws InterruptedException { final LinkedTransferQueue q = new LinkedTransferQueue<>(); @@ -804,8 +807,11 @@ public class LinkedTransferQueueTest extends JSR166TestCase { }}); threadStarted.await(); - waitForThreadToEnterWaitState(t); - assertEquals(1, q.size()); + Callable oneElement + = new Callable() { public Boolean call() { + return !q.isEmpty() && q.size() == 1; }}; + waitForThreadToEnterWaitState(t, oneElement); + assertSame(five, q.poll()); checkEmpty(q); awaitTermination(t); @@ -868,7 +874,7 @@ public class LinkedTransferQueueTest extends JSR166TestCase { /** * transfer waits until a take occurs. The transfered element - * is returned by this associated take. + * is returned by the associated take. */ public void testTransfer5() throws InterruptedException { final LinkedTransferQueue q = new LinkedTransferQueue<>(); diff --git a/jdk/test/java/util/concurrent/tck/PhaserTest.java b/jdk/test/java/util/concurrent/tck/PhaserTest.java index 1b4d083d73c..832fe3c5ada 100644 --- a/jdk/test/java/util/concurrent/tck/PhaserTest.java +++ b/jdk/test/java/util/concurrent/tck/PhaserTest.java @@ -550,7 +550,7 @@ public class PhaserTest extends JSR166TestCase { }}); await(pleaseArrive); - waitForThreadToEnterWaitState(t, SHORT_DELAY_MS); + waitForThreadToEnterWaitState(t); assertEquals(0, phaser.arrive()); awaitTermination(t); @@ -578,7 +578,7 @@ public class PhaserTest extends JSR166TestCase { }}); await(pleaseArrive); - waitForThreadToEnterWaitState(t, SHORT_DELAY_MS); + waitForThreadToEnterWaitState(t); t.interrupt(); assertEquals(0, phaser.arrive()); awaitTermination(t); @@ -594,20 +594,20 @@ public class PhaserTest extends JSR166TestCase { public void testArriveAndAwaitAdvanceAfterInterrupt() { final Phaser phaser = new Phaser(); assertEquals(0, phaser.register()); - final CountDownLatch pleaseInterrupt = new CountDownLatch(1); + final CountDownLatch pleaseArrive = new CountDownLatch(1); Thread t = newStartedThread(new CheckedRunnable() { public void realRun() { Thread.currentThread().interrupt(); assertEquals(0, phaser.register()); - pleaseInterrupt.countDown(); + pleaseArrive.countDown(); assertTrue(Thread.currentThread().isInterrupted()); assertEquals(1, phaser.arriveAndAwaitAdvance()); - assertTrue(Thread.currentThread().isInterrupted()); + assertTrue(Thread.interrupted()); }}); - await(pleaseInterrupt); - waitForThreadToEnterWaitState(t, SHORT_DELAY_MS); + await(pleaseArrive); + waitForThreadToEnterWaitState(t); Thread.currentThread().interrupt(); assertEquals(1, phaser.arriveAndAwaitAdvance()); assertTrue(Thread.interrupted()); @@ -628,11 +628,11 @@ public class PhaserTest extends JSR166TestCase { assertFalse(Thread.currentThread().isInterrupted()); pleaseInterrupt.countDown(); assertEquals(1, phaser.arriveAndAwaitAdvance()); - assertTrue(Thread.currentThread().isInterrupted()); + assertTrue(Thread.interrupted()); }}); await(pleaseInterrupt); - waitForThreadToEnterWaitState(t, SHORT_DELAY_MS); + waitForThreadToEnterWaitState(t); t.interrupt(); Thread.currentThread().interrupt(); assertEquals(1, phaser.arriveAndAwaitAdvance()); @@ -807,7 +807,7 @@ public class PhaserTest extends JSR166TestCase { assertEquals(THREADS, phaser.getArrivedParties()); assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); for (Thread thread : threads) - waitForThreadToEnterWaitState(thread, SHORT_DELAY_MS); + waitForThreadToEnterWaitState(thread); for (Thread thread : threads) assertTrue(thread.isAlive()); assertState(phaser, 0, THREADS + 1, 1); diff --git a/jdk/test/java/util/concurrent/tck/StampedLockTest.java b/jdk/test/java/util/concurrent/tck/StampedLockTest.java index ea0b8f9892b..65ef48d046b 100644 --- a/jdk/test/java/util/concurrent/tck/StampedLockTest.java +++ b/jdk/test/java/util/concurrent/tck/StampedLockTest.java @@ -299,7 +299,6 @@ public class StampedLockTest extends JSR166TestCase { * interruptible operations throw InterruptedException when pre-interrupted */ public void testInterruptibleOperationsThrowInterruptedExceptionWhenPreInterrupted() { - final CountDownLatch running = new CountDownLatch(1); final StampedLock lock = new StampedLock(); Action[] interruptibleLockActions = { @@ -364,7 +363,6 @@ public class StampedLockTest extends JSR166TestCase { * interruptible operations throw InterruptedException when write locked and interrupted */ public void testInterruptibleOperationsThrowInterruptedExceptionWriteLockedInterrupted() { - final CountDownLatch running = new CountDownLatch(1); final StampedLock lock = new StampedLock(); long s = lock.writeLock(); @@ -387,7 +385,6 @@ public class StampedLockTest extends JSR166TestCase { * interruptible operations throw InterruptedException when read locked and interrupted */ public void testInterruptibleOperationsThrowInterruptedExceptionReadLockedInterrupted() { - final CountDownLatch running = new CountDownLatch(1); final StampedLock lock = new StampedLock(); long s = lock.readLock(); @@ -506,29 +503,32 @@ public class StampedLockTest extends JSR166TestCase { } /** - * A writelock succeeds only after a reading thread unlocks + * writeLock() succeeds only after a reading thread unlocks */ public void testWriteAfterReadLock() throws InterruptedException { - final CountDownLatch running = new CountDownLatch(1); + final CountDownLatch aboutToLock = new CountDownLatch(1); final StampedLock lock = new StampedLock(); long rs = lock.readLock(); Thread t = newStartedThread(new CheckedRunnable() { public void realRun() { - running.countDown(); + aboutToLock.countDown(); long s = lock.writeLock(); + assertTrue(lock.isWriteLocked()); + assertFalse(lock.isReadLocked()); lock.unlockWrite(s); }}); - running.await(); - waitForThreadToEnterWaitState(t, MEDIUM_DELAY_MS); + aboutToLock.await(); + waitForThreadToEnterWaitState(t); assertFalse(lock.isWriteLocked()); + assertTrue(lock.isReadLocked()); lock.unlockRead(rs); awaitTermination(t); - assertFalse(lock.isWriteLocked()); + assertUnlocked(lock); } /** - * A writelock succeeds only after reading threads unlock + * writeLock() succeeds only after reading threads unlock */ public void testWriteAfterMultipleReadLocks() { final StampedLock lock = new StampedLock(); @@ -551,35 +551,36 @@ public class StampedLockTest extends JSR166TestCase { assertFalse(lock.isWriteLocked()); lock.unlockRead(s); awaitTermination(t2); - assertFalse(lock.isWriteLocked()); + assertUnlocked(lock); } /** - * Readlocks succeed only after a writing thread unlocks + * readLock() succeed only after a writing thread unlocks */ public void testReadAfterWriteLock() { final StampedLock lock = new StampedLock(); final CountDownLatch threadsStarted = new CountDownLatch(2); final long s = lock.writeLock(); - Thread t1 = newStartedThread(new CheckedRunnable() { + final Runnable acquireReleaseReadLock = new CheckedRunnable() { public void realRun() { threadsStarted.countDown(); long rs = lock.readLock(); + assertTrue(lock.isReadLocked()); + assertFalse(lock.isWriteLocked()); lock.unlockRead(rs); - }}); - Thread t2 = newStartedThread(new CheckedRunnable() { - public void realRun() { - threadsStarted.countDown(); - long rs = lock.readLock(); - lock.unlockRead(rs); - }}); + }}; + Thread t1 = newStartedThread(acquireReleaseReadLock); + Thread t2 = newStartedThread(acquireReleaseReadLock); await(threadsStarted); - waitForThreadToEnterWaitState(t1, MEDIUM_DELAY_MS); - waitForThreadToEnterWaitState(t2, MEDIUM_DELAY_MS); + waitForThreadToEnterWaitState(t1); + waitForThreadToEnterWaitState(t2); + assertTrue(lock.isWriteLocked()); + assertFalse(lock.isReadLocked()); releaseWriteLock(lock, s); awaitTermination(t1); awaitTermination(t2); + assertUnlocked(lock); } /** @@ -765,22 +766,24 @@ public class StampedLockTest extends JSR166TestCase { */ public void testValidateOptimisticWriteLocked2() throws InterruptedException { - final CountDownLatch running = new CountDownLatch(1); + final CountDownLatch locked = new CountDownLatch(1); final StampedLock lock = new StampedLock(); final long p = assertValid(lock, lock.tryOptimisticRead()); Thread t = newStartedThread(new CheckedInterruptedRunnable() { public void realRun() throws InterruptedException { lock.writeLockInterruptibly(); - running.countDown(); + locked.countDown(); lock.writeLockInterruptibly(); }}); - running.await(); + locked.await(); assertFalse(lock.validate(p)); assertEquals(0L, lock.tryOptimisticRead()); + waitForThreadToEnterWaitState(t); t.interrupt(); awaitTermination(t); + assertTrue(lock.isWriteLocked()); } /** diff --git a/jdk/test/java/util/concurrent/tck/SubmissionPublisherTest.java b/jdk/test/java/util/concurrent/tck/SubmissionPublisherTest.java index 2b4fea03a84..102d1b5e3ef 100644 --- a/jdk/test/java/util/concurrent/tck/SubmissionPublisherTest.java +++ b/jdk/test/java/util/concurrent/tck/SubmissionPublisherTest.java @@ -560,17 +560,21 @@ public class SubmissionPublisherTest extends JSR166TestCase { } /** - * Negative request causes error + * Non-positive request causes error */ public void testRequest3() { SubmissionPublisher p = basicPublisher(); TestSubscriber s1 = new TestSubscriber(); TestSubscriber s2 = new TestSubscriber(); + TestSubscriber s3 = new TestSubscriber(); p.subscribe(s1); p.subscribe(s2); + p.subscribe(s3); + s3.awaitSubscribe(); s2.awaitSubscribe(); s1.awaitSubscribe(); s1.sn.request(-1L); + s3.sn.request(0L); p.submit(1); p.submit(2); p.close(); @@ -580,6 +584,9 @@ public class SubmissionPublisherTest extends JSR166TestCase { s1.awaitError(); assertEquals(1, s1.errors); assertTrue(s1.lastError instanceof IllegalArgumentException); + s3.awaitError(); + assertEquals(1, s3.errors); + assertTrue(s3.lastError instanceof IllegalArgumentException); } /** diff --git a/jdk/test/java/util/jar/Pack200/SecurityTest.java b/jdk/test/java/util/jar/Pack200/SecurityTest.java new file mode 100644 index 00000000000..93b24818356 --- /dev/null +++ b/jdk/test/java/util/jar/Pack200/SecurityTest.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8179645 + * @run main/othervm SecurityTest + * @summary Verify Pack200 initialization with security manager + */ + +import java.util.jar.Pack200; + +public class SecurityTest { + public static void main(String... args) { + System.setSecurityManager(new SecurityManager()); + Pack200.newPacker(); + Pack200.newUnpacker(); + } +} diff --git a/jdk/test/java/util/logging/LocalizedLevelName.java b/jdk/test/java/util/logging/LocalizedLevelName.java index 627789f200e..4bb75b6dafd 100644 --- a/jdk/test/java/util/logging/LocalizedLevelName.java +++ b/jdk/test/java/util/logging/LocalizedLevelName.java @@ -21,7 +21,6 @@ * questions. */ -import java.lang.reflect.Module; import java.util.*; import java.util.logging.*; diff --git a/jdk/test/java/util/logging/Logger/logrb/resources/PropertyBundle.properties b/jdk/test/java/util/logging/Logger/logrb/resources/PropertyBundle.properties index 343c648257f..92af2a65289 100644 --- a/jdk/test/java/util/logging/Logger/logrb/resources/PropertyBundle.properties +++ b/jdk/test/java/util/logging/Logger/logrb/resources/PropertyBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 20013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -21,4 +21,3 @@ # questions. # dummy=foo - diff --git a/jdk/test/java/util/logging/Logger/setResourceBundle/resources/PropertyBundle.properties b/jdk/test/java/util/logging/Logger/setResourceBundle/resources/PropertyBundle.properties index 343c648257f..92af2a65289 100644 --- a/jdk/test/java/util/logging/Logger/setResourceBundle/resources/PropertyBundle.properties +++ b/jdk/test/java/util/logging/Logger/setResourceBundle/resources/PropertyBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 20013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -21,4 +21,3 @@ # questions. # dummy=foo - diff --git a/jdk/test/java/util/logging/LoggingDeadlock2.java b/jdk/test/java/util/logging/LoggingDeadlock2.java index ca4f3302438..4aa3121abc1 100644 --- a/jdk/test/java/util/logging/LoggingDeadlock2.java +++ b/jdk/test/java/util/logging/LoggingDeadlock2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -263,7 +263,7 @@ public class LoggingDeadlock2 { sleep(ms); System.err.println("Timeout reached: " + ms); if (process.isAlive()) { - long pid = process.getPid(); + long pid = process.pid(); ProcessBuilder jstack = new ProcessBuilder(jstackExe, String.valueOf(pid)); System.err.println("Dumping subprocess stack: " + pid); Process p = jstack.inheritIO().start(); diff --git a/jdk/test/java/util/logging/TestLoggerWeakRefLeak.java b/jdk/test/java/util/logging/TestLoggerWeakRefLeak.java index b18f5224942..394e23dac19 100644 --- a/jdk/test/java/util/logging/TestLoggerWeakRefLeak.java +++ b/jdk/test/java/util/logging/TestLoggerWeakRefLeak.java @@ -41,8 +41,8 @@ import sun.tools.attach.HotSpotVirtualMachine; * @modules jdk.attach/sun.tools.attach * java.logging * @build jdk.testlibrary.ProcessTools - * @run main/othervm TestLoggerWeakRefLeak Logger - * @run main/othervm TestLoggerWeakRefLeak AnonymousLogger + * @run main/othervm -Djdk.attach.allowAttachSelf TestLoggerWeakRefLeak Logger + * @run main/othervm -Djdk.attach.allowAttachSelf TestLoggerWeakRefLeak AnonymousLogger */ public class TestLoggerWeakRefLeak { diff --git a/jdk/test/java/util/logging/modules/pkgs/p3/test/ResourceBundleTest.java b/jdk/test/java/util/logging/modules/pkgs/p3/test/ResourceBundleTest.java index 03d26146837..0eef17a3f67 100644 --- a/jdk/test/java/util/logging/modules/pkgs/p3/test/ResourceBundleTest.java +++ b/jdk/test/java/util/logging/modules/pkgs/p3/test/ResourceBundleTest.java @@ -23,7 +23,6 @@ package p3.test; -import java.lang.reflect.Module; import java.util.logging.Logger; import java.util.MissingResourceException; import java.util.PropertyResourceBundle; diff --git a/jdk/test/java/util/regex/RegExTest.java b/jdk/test/java/util/regex/RegExTest.java index 64eb2d0f76c..d60c1caaf3d 100644 --- a/jdk/test/java/util/regex/RegExTest.java +++ b/jdk/test/java/util/regex/RegExTest.java @@ -35,6 +35,7 @@ * 8027645 8035076 8039124 8035975 8074678 6854417 8143854 8147531 7071819 * 8151481 4867170 7080302 6728861 6995635 6736245 4916384 * 6328855 6192895 6345469 6988218 6693451 7006761 8140212 8143282 8158482 + * 8176029 * * @library /lib/testlibrary * @build jdk.testlibrary.* @@ -4567,10 +4568,15 @@ public class RegExTest { String linebreaks = new String (new char[] { 0x0A, 0x0B, 0x0C, 0x0D, 0x85, 0x2028, 0x2029 }); String crnl = "\r\n"; - if (!Pattern.compile("\\R+").matcher(linebreaks).matches() || - !Pattern.compile("\\R").matcher(crnl).matches() || - Pattern.compile("\\R\\R").matcher(crnl).matches()) + if (!(Pattern.compile("\\R+").matcher(linebreaks).matches() && + Pattern.compile("\\R").matcher(crnl).matches() && + Pattern.compile("\\Rabc").matcher(crnl + "abc").matches() && + Pattern.compile("\\Rabc").matcher("\rabc").matches() && + Pattern.compile("\\R\\R").matcher(crnl).matches() && // backtracking + Pattern.compile("\\R\\n").matcher(crnl).matches()) && // backtracking + !Pattern.compile("((? data; + + List exp; + + public SpliteratorOfIntDataBuilder(List data, List exp) { + this.data = data; + this.exp = exp; + } + + public void add(String description, List expected, Supplier s) { + description = joiner(description).toString(); + data.add(new Object[]{description, expected, s}); + } + + public void add(String description, Supplier s) { + add(description, exp, s); + } + + StringBuilder joiner(String description) { + return new StringBuilder(description). + append(" {"). + append("size=").append(exp.size()). + append("}"); + } + } + diff --git a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/SpliteratorTestHelper.java b/jdk/test/java/util/stream/bootlib/java.base/java/util/SpliteratorTestHelper.java similarity index 86% rename from jdk/test/java/util/stream/bootlib/java.base/java/util/stream/SpliteratorTestHelper.java rename to jdk/test/java/util/stream/bootlib/java.base/java/util/SpliteratorTestHelper.java index a3446ffd6cc..8bbf20d7901 100644 --- a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/SpliteratorTestHelper.java +++ b/jdk/test/java/util/stream/bootlib/java.base/java/util/SpliteratorTestHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -20,24 +20,12 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package java.util.stream; +package java.util; -import org.testng.annotations.Test; - -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Deque; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Spliterator; import java.util.function.*; +import java.util.stream.LambdaTestHelpers; import static org.testng.Assert.*; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.fail; /** * Assertion methods for spliterators, to be called from other tests @@ -71,6 +59,28 @@ public class SpliteratorTestHelper { public static void testIntSpliterator(Supplier supplier, ContentAsserter asserter) { + testSpliterator(supplier, intBoxingConsumer(), asserter); + } + + public static void testLongSpliterator(Supplier supplier) { + testLongSpliterator(supplier, defaultContentAsserter()); + } + + public static void testLongSpliterator(Supplier supplier, + ContentAsserter asserter) { + testSpliterator(supplier, longBoxingConsumer(), asserter); + } + + public static void testDoubleSpliterator(Supplier supplier) { + testDoubleSpliterator(supplier, defaultContentAsserter()); + } + + public static void testDoubleSpliterator(Supplier supplier, + ContentAsserter asserter) { + testSpliterator(supplier, doubleBoxingConsumer(), asserter); + } + + public static UnaryOperator> intBoxingConsumer() { class BoxingAdapter implements Consumer, IntConsumer { private final Consumer b; @@ -89,15 +99,10 @@ public class SpliteratorTestHelper { } } - testSpliterator(supplier, BoxingAdapter::new, asserter); + return b -> new BoxingAdapter(b); } - public static void testLongSpliterator(Supplier supplier) { - testLongSpliterator(supplier, defaultContentAsserter()); - } - - public static void testLongSpliterator(Supplier supplier, - ContentAsserter asserter) { + public static UnaryOperator> longBoxingConsumer() { class BoxingAdapter implements Consumer, LongConsumer { private final Consumer b; @@ -116,15 +121,10 @@ public class SpliteratorTestHelper { } } - testSpliterator(supplier, BoxingAdapter::new, asserter); + return b -> new BoxingAdapter(b); } - public static void testDoubleSpliterator(Supplier supplier) { - testDoubleSpliterator(supplier, defaultContentAsserter()); - } - - public static void testDoubleSpliterator(Supplier supplier, - ContentAsserter asserter) { + public static UnaryOperator> doubleBoxingConsumer() { class BoxingAdapter implements Consumer, DoubleConsumer { private final Consumer b; @@ -143,10 +143,10 @@ public class SpliteratorTestHelper { } } - testSpliterator(supplier, BoxingAdapter::new, asserter); + return b -> new BoxingAdapter(b); } - static > void testSpliterator(Supplier supplier, + public static > void testSpliterator(Supplier supplier, UnaryOperator> boxingAdapter, ContentAsserter asserter) { ArrayList fromForEach = new ArrayList<>(); @@ -167,7 +167,54 @@ public class SpliteratorTestHelper { testSplitUntilNull(exp, supplier, boxingAdapter, asserter); } - // + public static > void testForEach( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testForEach(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testTryAdvance( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testTryAdvance(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testMixedTryAdvanceForEach( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testMixedTryAdvanceForEach(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testMixedTraverseAndSplit( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testMixedTraverseAndSplit(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testSplitOnce( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testSplitOnce(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testSplitSixDeep( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testSplitSixDeep(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testSplitUntilNull( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testSplitUntilNull(exp, supplier, boxingAdapter, defaultContentAsserter()); + } private static > void testNullPointerException(Supplier s) { S sp = s.get(); @@ -175,22 +222,22 @@ public class SpliteratorTestHelper { // directly test the primitive methods if (sp instanceof Spliterator.OfInt) { Spliterator.OfInt psp = (Spliterator.OfInt) sp; - executeAndCatch(NullPointerException.class, () -> psp.forEachRemaining((IntConsumer) null)); - executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((IntConsumer) null)); + assertThrowsNPE(() -> psp.forEachRemaining((IntConsumer) null)); + assertThrowsNPE(() -> psp.tryAdvance((IntConsumer) null)); } else if (sp instanceof Spliterator.OfLong) { Spliterator.OfLong psp = (Spliterator.OfLong) sp; - executeAndCatch(NullPointerException.class, () -> psp.forEachRemaining((LongConsumer) null)); - executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((LongConsumer) null)); + assertThrowsNPE(() -> psp.forEachRemaining((LongConsumer) null)); + assertThrowsNPE(() -> psp.tryAdvance((LongConsumer) null)); } else if (sp instanceof Spliterator.OfDouble) { Spliterator.OfDouble psp = (Spliterator.OfDouble) sp; - executeAndCatch(NullPointerException.class, () -> psp.forEachRemaining((DoubleConsumer) null)); - executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((DoubleConsumer) null)); + assertThrowsNPE(() -> psp.forEachRemaining((DoubleConsumer) null)); + assertThrowsNPE(() -> psp.tryAdvance((DoubleConsumer) null)); } else { - executeAndCatch(NullPointerException.class, () -> sp.forEachRemaining(null)); - executeAndCatch(NullPointerException.class, () -> sp.tryAdvance(null)); + assertThrowsNPE(() -> sp.forEachRemaining(null)); + assertThrowsNPE(() -> sp.tryAdvance(null)); } } @@ -219,6 +266,9 @@ public class SpliteratorTestHelper { if (sizeIfKnown >= 0) { assertEquals(sizeIfKnown, exp.size()); } + if (exp.contains(null)) { + assertTrue(fromForEach.contains(null)); + } assertEquals(fromForEach.size(), exp.size()); asserter.assertContents(fromForEach, exp, isOrdered); @@ -329,7 +379,7 @@ public class SpliteratorTestHelper { asserter.assertContents(dest, exp, isOrdered); } - private static > void testSplitAfterFullTraversal( + public static > void testSplitAfterFullTraversal( Supplier supplier, UnaryOperator> boxingAdapter) { // Full traversal using tryAdvance @@ -601,24 +651,11 @@ public class SpliteratorTestHelper { } } - private static void executeAndCatch(Class expected, Runnable r) { - Exception caught = null; - try { - r.run(); - } - catch (Exception e) { - caught = e; - } - - assertNotNull(caught, - String.format("No Exception was thrown, expected an Exception of %s to be thrown", - expected.getName())); - assertTrue(expected.isInstance(caught), - String.format("Exception thrown %s not an instance of %s", - caught.getClass().getName(), expected.getName())); + public static void assertThrowsNPE(ThrowingRunnable r) { + assertThrows(NullPointerException.class, r); } - static void mixedTraverseAndSplit(Consumer b, Spliterator splTop) { + public static void mixedTraverseAndSplit(Consumer b, Spliterator splTop) { Spliterator spl1, spl2, spl3; splTop.tryAdvance(b); spl2 = splTop.trySplit(); @@ -642,7 +679,7 @@ public class SpliteratorTestHelper { splTop.forEachRemaining(b); } - static void mixedTraverseAndSplit(IntConsumer b, Spliterator.OfInt splTop) { + public static void mixedTraverseAndSplit(IntConsumer b, Spliterator.OfInt splTop) { Spliterator.OfInt spl1, spl2, spl3; splTop.tryAdvance(b); spl2 = splTop.trySplit(); @@ -665,7 +702,8 @@ public class SpliteratorTestHelper { splTop.tryAdvance(b); splTop.forEachRemaining(b); } - static void mixedTraverseAndSplit(LongConsumer b, Spliterator.OfLong splTop) { + + public static void mixedTraverseAndSplit(LongConsumer b, Spliterator.OfLong splTop) { Spliterator.OfLong spl1, spl2, spl3; splTop.tryAdvance(b); spl2 = splTop.trySplit(); @@ -689,7 +727,7 @@ public class SpliteratorTestHelper { splTop.forEachRemaining(b); } - static void mixedTraverseAndSplit(DoubleConsumer b, Spliterator.OfDouble splTop) { + public static void mixedTraverseAndSplit(DoubleConsumer b, Spliterator.OfDouble splTop) { Spliterator.OfDouble spl1, spl2, spl3; splTop.tryAdvance(b); spl2 = splTop.trySplit(); @@ -712,4 +750,5 @@ public class SpliteratorTestHelper { splTop.tryAdvance(b); splTop.forEachRemaining(b); } + } diff --git a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/DoubleStreamTestScenario.java b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/DoubleStreamTestScenario.java index f1ff3382468..c717e221f98 100644 --- a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/DoubleStreamTestScenario.java +++ b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/DoubleStreamTestScenario.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -27,6 +27,7 @@ import java.util.EnumSet; import java.util.PrimitiveIterator; import java.util.Set; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.function.Consumer; import java.util.function.DoubleConsumer; import java.util.function.Function; diff --git a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/IntStreamTestScenario.java b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/IntStreamTestScenario.java index 526638d0cb8..37bf656ebe9 100644 --- a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/IntStreamTestScenario.java +++ b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/IntStreamTestScenario.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 @@ -27,6 +27,7 @@ import java.util.EnumSet; import java.util.PrimitiveIterator; import java.util.Set; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.IntConsumer; diff --git a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/LongStreamTestScenario.java b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/LongStreamTestScenario.java index acc2492d6f6..9cfc8c6fd48 100644 --- a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/LongStreamTestScenario.java +++ b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/LongStreamTestScenario.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -27,6 +27,7 @@ import java.util.EnumSet; import java.util.PrimitiveIterator; import java.util.Set; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.LongConsumer; diff --git a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/StreamTestScenario.java b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/StreamTestScenario.java index 899dfdb52b2..bf7b4e65237 100644 --- a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/StreamTestScenario.java +++ b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/StreamTestScenario.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 @@ -27,6 +27,7 @@ import java.util.EnumSet; import java.util.Iterator; import java.util.Set; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.function.Consumer; import java.util.function.Function; diff --git a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/DoubleNodeTest.java b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/DoubleNodeTest.java index c1e8a309e89..d96bd8c676a 100644 --- a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/DoubleNodeTest.java +++ b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/DoubleNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.List; import java.util.PrimitiveIterator; import java.util.Spliterators; +import java.util.SpliteratorTestHelper; import java.util.function.Function; import org.testng.annotations.DataProvider; diff --git a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/IntNodeTest.java b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/IntNodeTest.java index e050e63d37b..459dad4f176 100644 --- a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/IntNodeTest.java +++ b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/IntNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.List; import java.util.PrimitiveIterator; import java.util.Spliterators; +import java.util.SpliteratorTestHelper; import java.util.function.Function; import org.testng.annotations.DataProvider; diff --git a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/LongNodeTest.java b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/LongNodeTest.java index d266fd7d04e..dbe28c8ecc0 100644 --- a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/LongNodeTest.java +++ b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/LongNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.List; import java.util.PrimitiveIterator; import java.util.Spliterators; +import java.util.SpliteratorTestHelper; import java.util.function.Function; import org.testng.annotations.DataProvider; diff --git a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/NodeTest.java b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/NodeTest.java index da710033fda..61532a5972c 100644 --- a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/NodeTest.java +++ b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/NodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.SpliteratorTestHelper; import java.util.function.Function; import org.testng.annotations.DataProvider; diff --git a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/SliceSpliteratorTest.java b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/SliceSpliteratorTest.java index 7aa27bf5b88..ef0e848fe79 100644 --- a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/SliceSpliteratorTest.java +++ b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/SliceSpliteratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -30,6 +30,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import static java.util.stream.Collectors.toList; import static org.testng.Assert.assertEquals; diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/RangeTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/RangeTest.java index 20ae203bb63..f9d3385bd05 100644 --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/RangeTest.java +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/RangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -25,10 +25,10 @@ package org.openjdk.tests.java.util.stream; import java.util.Arrays; import java.util.Optional; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.stream.IntStream; import java.util.stream.LongStream; import java.util.stream.OpTestCase; -import java.util.stream.SpliteratorTestHelper; import java.util.stream.Stream; import java.util.stream.TestData; diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SpliteratorTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SpliteratorTest.java index d69c585b72d..395b2b65b2f 100644 --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SpliteratorTest.java +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SpliteratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -29,6 +29,7 @@ import java.util.Iterator; import java.util.List; import java.util.function.Supplier; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.stream.*; import static org.testng.Assert.*; diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java index 0d07e7cb67a..d3b0d254c41 100644 --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java @@ -1,5 +1,5 @@ /* - * 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 @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.Comparator; import java.util.List; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.function.Consumer; import java.util.function.DoubleConsumer; import java.util.function.Function; @@ -46,7 +47,6 @@ import java.util.stream.LambdaTestHelpers; import java.util.stream.LongStream; import java.util.stream.LongStreamTestDataProvider; import java.util.stream.OpTestCase; -import java.util.stream.SpliteratorTestHelper; import java.util.stream.Stream; import java.util.stream.StreamSupport; import java.util.stream.StreamTestDataProvider; diff --git a/jdk/test/java/util/zip/TestExtraTime.java b/jdk/test/java/util/zip/TestExtraTime.java index 80570498d53..9633bfa6b83 100644 --- a/jdk/test/java/util/zip/TestExtraTime.java +++ b/jdk/test/java/util/zip/TestExtraTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -31,9 +31,13 @@ import java.io.*; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.nio.file.attribute.BasicFileAttributeView; +import java.nio.file.attribute.FileOwnerAttributeView; import java.nio.file.attribute.FileTime; +import java.nio.file.attribute.PosixFilePermission; import java.time.Instant; import java.util.Arrays; +import java.util.Set; import java.util.TimeZone; import java.util.concurrent.TimeUnit; import java.util.zip.ZipEntry; @@ -147,6 +151,28 @@ public class TestExtraTime { // ZipFile Path zpath = Paths.get(System.getProperty("test.dir", "."), "TestExtraTime.zip"); + Path zparent = zpath.getParent(); + if (zparent != null && !Files.isWritable(zparent)) { + System.err.format("zpath %s parent %s is not writable%n", + zpath, zparent); + } + if (Files.exists(zpath)) { + System.err.format("zpath %s already exists%n", zpath); + if (Files.isDirectory(zpath)) { + System.err.format("%n%s contents:%n", zpath); + Files.list(zpath).forEach(System.err::println); + } + FileOwnerAttributeView foav = Files.getFileAttributeView(zpath, + FileOwnerAttributeView.class); + System.err.format("zpath %s owner: %s%n", zpath, foav.getOwner()); + System.err.format("zpath %s permissions:%n", zpath); + Set perms = + Files.getPosixFilePermissions(zpath); + perms.stream().forEach(System.err::println); + } + if (Files.isSymbolicLink(zpath)) { + System.err.format("zpath %s is a symbolic link%n", zpath); + } Files.copy(new ByteArrayInputStream(baos.toByteArray()), zpath); try (ZipFile zf = new ZipFile(zpath.toFile())) { ze = zf.getEntry("TestExtraTime.java"); diff --git a/jdk/test/javax/accessibility/JList/AccessibleJListChildNPETest.java b/jdk/test/javax/accessibility/JList/AccessibleJListChildNPETest.java new file mode 100644 index 00000000000..118519565d6 --- /dev/null +++ b/jdk/test/javax/accessibility/JList/AccessibleJListChildNPETest.java @@ -0,0 +1,103 @@ +/* +* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* This code is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License version 2 only, as +* published by the Free Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +* version 2 for more details (a copy is included in the LICENSE file that +* accompanied this code). +* +* You should have received a copy of the GNU General Public License version +* 2 along with this work; if not, write to the Free Software Foundation, +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +* +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +* or visit www.oracle.com if you need additional information or have any +* questions. +*/ + +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import javax.accessibility.Accessible; +import javax.accessibility.AccessibleContext; +import javax.swing.AbstractListModel; +import javax.swing.JFrame; +import javax.swing.JList; +import javax.swing.SwingUtilities; +import javax.swing.WindowConstants; + +/* @test + @bug 8076249 + @summary NPE in AccessBridge while editing JList model + @author Mikhail Cherkasov + @run main AccessibleJListChildNPETest +*/ +public class AccessibleJListChildNPETest { + + private static String[] model = { "1", "2", "3", "4", "5", "6" }; + private static JList list; + + public static void main(String[] args) throws InvocationTargetException, InterruptedException { + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + JFrame frame = new JFrame(); + frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + final MyModel dataModel = new MyModel(Arrays.asList(model)); + list = new JList<>(dataModel); + frame.getContentPane().add(list); + frame.pack(); + frame.setVisible(true); + + } + }); + + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + AccessibleContext ac = list.getAccessibleContext(); + MyModel model = (MyModel)list.getModel(); + Accessible accessibleChild = ac.getAccessibleChild(model.getSize()-1); + model.removeFirst(); + accessibleChild.getAccessibleContext().getAccessibleSelection(); + accessibleChild.getAccessibleContext().getAccessibleText(); + accessibleChild.getAccessibleContext().getAccessibleValue(); + } + }); + } + + protected static class MyModel extends AbstractListModel { + private List items = new ArrayList<>(); + + MyModel(final List newItems) { + super(); + items.addAll(newItems); + fireIntervalAdded(this, 0, getSize() - 1); + } + + void removeFirst() { + if(getSize() > 0) { + items.remove(0); + fireIntervalRemoved(this, 0, 0); + } + } + + @Override + public int getSize() { + return items.size(); + } + + @Override + public String getElementAt(int index) { + return items.get(index); + } + } +} diff --git a/jdk/test/javax/imageio/AllowSearch.java b/jdk/test/javax/imageio/AllowSearch.java new file mode 100644 index 00000000000..ec0d727c9cc --- /dev/null +++ b/jdk/test/javax/imageio/AllowSearch.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4420318 + * @summary Checks that an IllegalStateException is thrown by getNumImages(true) + * when seekForwardOnly is true + * @modules java.desktop/com.sun.imageio.plugins.gif + * java.desktop/com.sun.imageio.plugins.jpeg + * java.desktop/com.sun.imageio.plugins.png + */ + +import java.io.File; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.stream.ImageInputStream; + +import com.sun.imageio.plugins.gif.GIFImageReader; +import com.sun.imageio.plugins.jpeg.JPEGImageReader; +import com.sun.imageio.plugins.png.PNGImageReader; + +public class AllowSearch { + + private static void test(ImageReader reader, String format) + throws IOException { + File f = File.createTempFile("imageio", ".tmp"); + ImageInputStream stream = ImageIO.createImageInputStream(f); + reader.setInput(stream, true); + + boolean gotISE = false; + try { + int numImages = reader.getNumImages(true); + } catch (IOException ioe) { + gotISE = false; + } catch (IllegalStateException ise) { + gotISE = true; + } + + if (!gotISE) { + throw new RuntimeException("Failed to get desired exception for " + + format + " reader!"); + } + } + + public static void main(String[] args) throws IOException { + ImageReader gifReader = new GIFImageReader(null); + ImageReader jpegReader = new JPEGImageReader(null); + ImageReader pngReader = new PNGImageReader(null); + + test(gifReader, "GIF"); + test(jpegReader, "JPEG"); + test(pngReader, "PNG"); + } +} diff --git a/jdk/test/javax/imageio/AppContextTest.java b/jdk/test/javax/imageio/AppContextTest.java new file mode 100644 index 00000000000..1132f652d03 --- /dev/null +++ b/jdk/test/javax/imageio/AppContextTest.java @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4421190 + * @summary Tests that Image I/O statics may be referenced properly from + * multiple AppContexts, as would be the case for multiple Applets in a + * single VM. Each AppContext should get its own copy of the registry + * and the caching parameters in the ImageIO class. + * @modules java.desktop/sun.awt + */ + +import java.io.File; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.spi.IIORegistry; + +import sun.awt.SunToolkit; + +class TestThread extends Thread { + + IIORegistry registry; + boolean useCache; + File cacheDirectory; + boolean cacheSettingsOK = false; + String threadName; + + boolean gotCrosstalk = false; + + public TestThread(ThreadGroup tg, + boolean useCache, File cacheDirectory, + String threadName) { + super(tg, threadName); + this.useCache = useCache; + this.cacheDirectory = cacheDirectory; + this.threadName = threadName; + } + + public void run() { +// System.out.println("Thread " + threadName + " in thread group " + +// getThreadGroup().getName()); + + // Create a new AppContext as though we were an applet + SunToolkit.createNewAppContext(); + + // Get default registry and store reference + this.registry = IIORegistry.getDefaultInstance(); + + for (int i = 0; i < 10; i++) { +// System.out.println(threadName + +// ": setting cache parameters to " + +// useCache + ", " + cacheDirectory); + ImageIO.setUseCache(useCache); + ImageIO.setCacheDirectory(cacheDirectory); + + try { + sleep(1000L); + } catch (InterruptedException e) { + } + +// System.out.println(threadName + ": reading cache parameters"); + boolean newUseCache = ImageIO.getUseCache(); + File newCacheDirectory = ImageIO.getCacheDirectory(); + if (newUseCache != useCache || + newCacheDirectory != cacheDirectory) { +// System.out.println(threadName + ": got " + +// newUseCache + ", " + +// newCacheDirectory); +// System.out.println(threadName + ": crosstalk encountered!"); + gotCrosstalk = true; + } + } + } + + public IIORegistry getRegistry() { + return registry; + } + + public boolean gotCrosstalk() { + return gotCrosstalk; + } +} + +public class AppContextTest { + + public AppContextTest() { + ThreadGroup tg0 = new ThreadGroup("ThreadGroup0"); + ThreadGroup tg1 = new ThreadGroup("ThreadGroup1"); + + TestThread t0 = + new TestThread(tg0, false, null, "TestThread 0"); + TestThread t1 = + new TestThread(tg1, true, new File("."), "TestThread 1"); + + t0.start(); + t1.start(); + + try { + t0.join(); + } catch (InterruptedException ie0) { + } + try { + t1.join(); + } catch (InterruptedException ie1) { + } + + if (t0.gotCrosstalk() || t1.gotCrosstalk()) { + throw new RuntimeException("ImageIO methods had crosstalk!"); + } + + if (t0.getRegistry() == t1.getRegistry()) { + throw new RuntimeException("ThreadGroups had same IIORegistry!"); + } + } + + public static void main(String[] args) throws IOException { + new AppContextTest(); + } +} diff --git a/jdk/test/javax/imageio/AppletResourceTest.html b/jdk/test/javax/imageio/AppletResourceTest.html new file mode 100644 index 00000000000..cea6d8e7062 --- /dev/null +++ b/jdk/test/javax/imageio/AppletResourceTest.html @@ -0,0 +1,40 @@ + + + + + + AppletResourceTest + + + + + diff --git a/jdk/test/javax/imageio/AppletResourceTest.java b/jdk/test/javax/imageio/AppletResourceTest.java new file mode 100644 index 00000000000..b81e8cf5404 --- /dev/null +++ b/jdk/test/javax/imageio/AppletResourceTest.java @@ -0,0 +1,439 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4481957 + * @key headful + * @summary Tests that applet-supplied ImageReader, ImageWriter, and + * IIOMetadataFormat implementations do not throw unexpected exceptions + * when indirectly attempting to access ResourceBundles + * @run main AppletResourceTest + * @run applet AppletResourceTest.html + */ + +import java.applet.Applet; +import java.awt.Rectangle; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.Iterator; +import java.util.ListResourceBundle; +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.Vector; + +import javax.imageio.IIOException; +import javax.imageio.ImageReadParam; +import javax.imageio.ImageReader; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.event.IIOReadWarningListener; +import javax.imageio.metadata.IIOInvalidTreeException; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.spi.ImageReaderSpi; + +import org.w3c.dom.Node; + +public class AppletResourceTest extends Applet { + + public static void main(String[] argv) { + new AppletResourceTest().init(); + } + + public void init() { + DummyImageReaderImpl reader; + MyReadWarningListener listener = new MyReadWarningListener(); + Locale[] locales = {new Locale("ru"), + new Locale("fr"), + new Locale("uk")}; + + reader = new DummyImageReaderImpl(new DummyImageReaderSpiImpl()); + reader.setAvailableLocales(locales); + reader.setLocale(new Locale("fr")); + reader.addIIOReadWarningListener(listener); + + String baseName = "AppletResourceTest$BugStats"; + try { + reader.processWarningOccurred("WarningMessage"); + reader.processWarningOccurred(baseName, "water"); + } catch (MissingResourceException mre) { + throw new RuntimeException("Test failed: couldn't load resource"); + } + + + } + + private class MyReadWarningListener implements IIOReadWarningListener { + public void warningOccurred(ImageReader source, + String warning) + { + System.out.println("warning occurred: " + warning); + } + } + + public static class BugStats extends ListResourceBundle { + + public Object[][] getContents(){ + return contents; + } + + private Object[][] contents = { + {"coffee", new String("coffee from Stats class")}, + {"tea", new String("tea from Stats class")}, + {"water", new String("water from Stats class")} + }; + } + + + public static class DummyImageReaderImpl extends ImageReader { + + public DummyImageReaderImpl(ImageReaderSpi originatingProvider) { + super(originatingProvider); + } + + public int getNumImages(boolean allowSearch) throws IOException { + return 5; + } + + public int getWidth(int imageIndex) throws IOException { + if (input == null) + throw new IllegalStateException(); + if (imageIndex >= 5 || imageIndex < 0) + throw new IndexOutOfBoundsException(); + + return 10; + } + + public int getHeight(int imageIndex) throws IOException { + if (input == null) + throw new IllegalStateException(); + if (imageIndex >= 5 || imageIndex < 0) + throw new IndexOutOfBoundsException(); + + return 15; + } + + public Iterator getImageTypes(int imageIndex) throws IOException { + if (input == null) + throw new IllegalStateException(); + if (imageIndex >= 5 || imageIndex < 0) + throw new IndexOutOfBoundsException(); + + Vector imageTypes = new Vector(); + imageTypes.add(ImageTypeSpecifier.createFromBufferedImageType + (BufferedImage.TYPE_BYTE_GRAY )); + return imageTypes.iterator(); + } + + public IIOMetadata getStreamMetadata() throws IOException { + return new DummyIIOMetadataImpl(true, null, null, null, null); + } + + public IIOMetadata getImageMetadata(int imageIndex) + throws IOException { + + if (input == null) + throw new IllegalStateException(); + if (imageIndex >= 5 || imageIndex < 0) + throw new IndexOutOfBoundsException(); + if (seekForwardOnly) { + if (imageIndex < minIndex) + throw new IndexOutOfBoundsException(); + minIndex = imageIndex; + } + return new DummyIIOMetadataImpl(true, null, null, null, null); + } + + + public BufferedImage read(int imageIndex, ImageReadParam param) + throws IOException { + if (input == null) + throw new IllegalStateException(); + if (imageIndex >= 5 || imageIndex < 0) + throw new IndexOutOfBoundsException(); + if (seekForwardOnly) { + if (imageIndex < minIndex) + throw new IndexOutOfBoundsException(); + minIndex = imageIndex; + } + + return getDestination(param, getImageTypes(imageIndex), 10, 15); + } + +// protected methods - now public + + public boolean abortRequested() { + return super.abortRequested(); + } + + public void clearAbortRequest() { + super.clearAbortRequest(); + } + + public void processImageComplete() { + super.processImageComplete(); + } + + public void processImageProgress(float percentageDone) { + super.processImageProgress(percentageDone); + } + + public void processImageStarted(int imageIndex) { + super.processImageStarted(imageIndex); + } + + public void processImageUpdate(BufferedImage theImage, + int minX, + int minY, + int width, + int height, + int periodX, + int periodY, + int[] bands) { + super.processImageUpdate(theImage, + minX, + minY, + width, + height, + periodX, + periodY, + bands); + } + + public void processPassComplete(BufferedImage theImage) { + super. processPassComplete(theImage); + } + + public void processPassStarted(BufferedImage theImage, + int pass, int minPass, + int maxPass, + int minX, + int minY, + int periodX, + int periodY, + int[] bands) { + super.processPassStarted(theImage, + pass, + minPass, + maxPass, + minX, + minY, + periodX, + periodY, + bands); + } + + public void processReadAborted() { + super.processReadAborted(); + } + + public void processSequenceComplete() { + super.processSequenceComplete(); + } + + public void processSequenceStarted(int minIndex) { + super.processSequenceStarted(minIndex); + } + + public void processThumbnailComplete() { + super.processThumbnailComplete(); + } + + public void processThumbnailPassComplete(BufferedImage theThumbnail) { + super.processThumbnailPassComplete(theThumbnail); + } + + public void processThumbnailPassStarted(BufferedImage theThumbnail, + int pass, + int minPass, + int maxPass, + int minX, + int minY, + int periodX, + int periodY, + int[] bands) { + super.processThumbnailPassStarted(theThumbnail, + pass, + minPass, + maxPass, + minX, + minY, + periodX, + periodY, + bands); + } + + public void processThumbnailProgress(float percentageDone) { + super.processThumbnailProgress(percentageDone); + } + + public void processThumbnailStarted(int imageIndex, int thumbnailIndex) { + super.processThumbnailStarted(imageIndex, thumbnailIndex); + } + + public void processThumbnailUpdate(BufferedImage theThumbnail, + int minX, + int minY, + int width, + int height, + int periodX, + int periodY, + int[] bands) { + super.processThumbnailUpdate(theThumbnail, + minX, + minY, + width, + height, + periodX, + periodY, + bands); + } + + public void processWarningOccurred(String warning) { + super.processWarningOccurred(warning); + } + + + + public static Rectangle getSourceRegion(ImageReadParam param, + int srcWidth, + int srcHeight) { + return ImageReader.getSourceRegion(param, srcWidth, srcHeight); + } + + public static void computeRegions(ImageReadParam param, + int srcWidth, + int srcHeight, + BufferedImage image, + Rectangle srcRegion, + Rectangle destRegion) { + ImageReader.computeRegions(param, + srcWidth, + srcHeight, + image, + srcRegion, + destRegion); + } + + public static void checkReadParamBandSettings(ImageReadParam param, + int numSrcBands, + int numDstBands) { + ImageReader.checkReadParamBandSettings( param, + numSrcBands, + numDstBands); + } + + public static BufferedImage getDestination(ImageReadParam param, + Iterator imageTypes, + int width, + int height) throws IIOException { + return ImageReader.getDestination(param, + imageTypes, + width, + height); + } + + public void setAvailableLocales(Locale[] locales) { + if (locales == null || locales.length == 0) + availableLocales = null; + else + availableLocales = (Locale[])locales.clone(); + } + + public void processWarningOccurred(String baseName, String keyword) { + super.processWarningOccurred(baseName, keyword); + } + } + + public static class DummyIIOMetadataImpl extends IIOMetadata { + + public DummyIIOMetadataImpl() { + super(); + } + + public DummyIIOMetadataImpl(boolean standardMetadataFormatSupported, + String nativeMetadataFormatName, + String nativeMetadataFormatClassName, + String[] extraMetadataFormatNames, + String[] extraMetadataFormatClassNames) { + super(standardMetadataFormatSupported, + nativeMetadataFormatName, + nativeMetadataFormatClassName, + extraMetadataFormatNames, + extraMetadataFormatClassNames); + } + + public boolean isReadOnly() { + return true; + } + + public Node getAsTree(String formatName) { + return null; + } + + public void mergeTree(String formatName, Node root) + throws IIOInvalidTreeException { + throw new IllegalStateException(); + } + + public void reset() { + throw new IllegalStateException(); + } + } + + public static class DummyImageReaderSpiImpl extends ImageReaderSpi { + + static final String[] names ={ "myformat" }; + + public DummyImageReaderSpiImpl() { + super("vendorName", + "version", + names, + null, + null, + "DummyImageReaderImpl", + STANDARD_INPUT_TYPE, + null, + true, + null, + null, + null, + null, + true, + null, + null, + null, + null); + } + public boolean canDecodeInput(Object source) + throws IOException { + return true; + } + public ImageReader createReaderInstance(Object extension) + throws IOException { + return new DummyImageReaderImpl(this); + } + public String getDescription(Locale locale) { + return "DummyImageReaderSpiImpl"; + } + } +} diff --git a/jdk/test/javax/imageio/GetNumImages.java b/jdk/test/javax/imageio/GetNumImages.java new file mode 100644 index 00000000000..942c5e881dc --- /dev/null +++ b/jdk/test/javax/imageio/GetNumImages.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4892609 + * @summary Tests that the appropriate IllegalStateException is thrown if + * ImageReader.getNumImages() is called with a null source or if + * allowSearch is specified at the same time that seekForwardOnly is + * true + */ + +import java.io.ByteArrayInputStream; +import java.util.Iterator; + +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.spi.IIORegistry; +import javax.imageio.spi.ImageReaderSpi; +import javax.imageio.stream.ImageInputStream; + +public class GetNumImages { + + public static void main(String[] args) throws Exception { + IIORegistry registry = IIORegistry.getDefaultInstance(); + + // test ImageReader.getNumImages() for all available ImageReaders, + // with no source set + Iterator readerspis = registry.getServiceProviders(ImageReaderSpi.class, + false); + while (readerspis.hasNext()) { + boolean caughtEx = false; + ImageReaderSpi readerspi = (ImageReaderSpi)readerspis.next(); + ImageReader reader = readerspi.createReaderInstance(); + try { + reader.getNumImages(false); + } catch (IllegalStateException ise) { + // caught exception, everything's okay + caughtEx = true; + } + + if (!caughtEx) { + throw new RuntimeException("Test failed: exception was not " + + "thrown for null input: " + + reader); + } + } + + // test ImageReader.getNumImages() for all available ImageReaders, + // with source set, seekForwardOnly and allowSearch both true + readerspis = registry.getServiceProviders(ImageReaderSpi.class, + false); + while (readerspis.hasNext()) { + boolean caughtEx = false; + ImageReaderSpi readerspi = (ImageReaderSpi)readerspis.next(); + ImageReader reader = readerspi.createReaderInstance(); + byte[] barr = new byte[100]; + ByteArrayInputStream bais = new ByteArrayInputStream(barr); + ImageInputStream iis = ImageIO.createImageInputStream(bais); + try { + reader.setInput(iis, true); + reader.getNumImages(true); + } catch (IllegalStateException ise) { + // caught exception, everything's okay + caughtEx = true; + } + + if (!caughtEx) { + throw new RuntimeException("Test failed: exception was not " + + "thrown when allowSearch and " + + "seekForwardOnly are both true: " + + reader); + } + } + } +} diff --git a/jdk/test/javax/imageio/GetReaderWriterInfo.java b/jdk/test/javax/imageio/GetReaderWriterInfo.java new file mode 100644 index 00000000000..7bcc9d374fe --- /dev/null +++ b/jdk/test/javax/imageio/GetReaderWriterInfo.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4703112 + * @summary Verifies that ImageIO.getReaderFileSuffixes() and similar methods + * return appropriate values + */ + +import java.util.Iterator; + +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.ImageWriter; + +public class GetReaderWriterInfo { + + private static void testGetReaderFormatNames() { + String[] names = ImageIO.getReaderFormatNames(); + for (String n : names) { + Iterator it = ImageIO.getImageReadersByFormatName(n); + if (!it.hasNext()) { + throw new RuntimeException("getReaderFormatNames returned " + + "an unknown name: " + n); + } + } + } + + private static void testGetReaderMIMETypes() { + String[] types = ImageIO.getReaderMIMETypes(); + for (String t : types) { + Iterator it = ImageIO.getImageReadersByMIMEType(t); + if (!it.hasNext()) { + throw new RuntimeException("getReaderMIMETypes returned " + + "an unknown type: " + t); + } + } + } + + private static void testGetReaderFileSuffixes() { + String[] suffixes = ImageIO.getReaderFileSuffixes(); + for (String s : suffixes) { + Iterator it = ImageIO.getImageReadersBySuffix(s); + if (!it.hasNext()) { + throw new RuntimeException("getReaderFileSuffixes returned " + + "an unknown suffix: " + s); + } + } + } + + private static void testGetWriterFormatNames() { + String[] names = ImageIO.getWriterFormatNames(); + for (String n : names) { + Iterator it = ImageIO.getImageWritersByFormatName(n); + if (!it.hasNext()) { + throw new RuntimeException("getWriterFormatNames returned " + + "an unknown name: " + n); + } + } + } + + private static void testGetWriterMIMETypes() { + String[] types = ImageIO.getWriterMIMETypes(); + for (String t : types) { + Iterator it = ImageIO.getImageWritersByMIMEType(t); + if (!it.hasNext()) { + throw new RuntimeException("getWriterMIMETypes returned " + + "an unknown type: " + t); + } + } + } + + private static void testGetWriterFileSuffixes() { + String[] suffixes = ImageIO.getWriterFileSuffixes(); + for (String s : suffixes) { + Iterator it = ImageIO.getImageWritersBySuffix(s); + if (!it.hasNext()) { + throw new RuntimeException("getWriterFileSuffixes returned " + + "an unknown suffix: " + s); + } + } + } + + public static void main(String[] args) { + testGetReaderFormatNames(); + testGetReaderMIMETypes(); + testGetReaderFileSuffixes(); + testGetWriterFormatNames(); + testGetWriterMIMETypes(); + testGetWriterFileSuffixes(); + } +} diff --git a/jdk/test/javax/imageio/IIOImageConstructor.java b/jdk/test/javax/imageio/IIOImageConstructor.java new file mode 100644 index 00000000000..fe7453c5852 --- /dev/null +++ b/jdk/test/javax/imageio/IIOImageConstructor.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4392024 + * @summary Checks for IllegalArgumentException in IIOImage constructor + */ + +import java.awt.image.BufferedImage; + +import javax.imageio.IIOImage; + +public class IIOImageConstructor { + + public static void main(String[] args) { + BufferedImage image = new BufferedImage(1, 1, + BufferedImage.TYPE_INT_RGB); + try { + IIOImage iioi = new IIOImage(image, null, null); + } catch (IllegalArgumentException iae) { + throw new RuntimeException + ("IIOImage constructor taking a RenderedImage fails!"); + } + } +} diff --git a/jdk/test/javax/imageio/ITSDataType.java b/jdk/test/javax/imageio/ITSDataType.java new file mode 100644 index 00000000000..0d0d42fbd09 --- /dev/null +++ b/jdk/test/javax/imageio/ITSDataType.java @@ -0,0 +1,79 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4506450 + * @summary Tests whether ImageTypeSpecifier.createBanded() and + * ImageTypeSpecifier.createInterleaved() can accept all supported + * DataBuffer types + */ + +import java.awt.color.ColorSpace; +import java.awt.image.DataBuffer; + +import javax.imageio.ImageTypeSpecifier; + +public class ITSDataType { + + public static final int[] dataTypes = new int[] { + DataBuffer.TYPE_BYTE, + DataBuffer.TYPE_SHORT, + DataBuffer.TYPE_USHORT, + DataBuffer.TYPE_INT, + DataBuffer.TYPE_FLOAT, + DataBuffer.TYPE_DOUBLE, + }; + + public static void main(String[] args) { + ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY); + int[] bankIndices = new int[] { 1 }; + int[] bandOffsets = new int[] { 0 }; + + // test createBanded() + for (int i = 0; i < dataTypes.length; i++) { + int dataType = dataTypes[i]; + + try { + ImageTypeSpecifier.createBanded(cs, bankIndices, bandOffsets, + dataType, false, false); + } catch (IllegalArgumentException e) { + throw new RuntimeException("createBanded() test failed for " + + "dataType = " + dataType); + } + } + + // test createInterleaved() + for (int i = 0; i < dataTypes.length; i++) { + int dataType = dataTypes[i]; + + try { + ImageTypeSpecifier.createInterleaved(cs, bandOffsets, + dataType, false, false); + } catch (IllegalArgumentException e) { + throw new RuntimeException("createInterleaved() test failed " + + "for dataType = " + dataType); + } + } + } +} diff --git a/jdk/test/java/net/MulticastSocket/JoinGroup.java b/jdk/test/javax/imageio/ImageIOGetImageReaders.java similarity index 65% rename from jdk/test/java/net/MulticastSocket/JoinGroup.java rename to jdk/test/javax/imageio/ImageIOGetImageReaders.java index 8e711aa59d2..99d294a400d 100644 --- a/jdk/test/java/net/MulticastSocket/JoinGroup.java +++ b/jdk/test/javax/imageio/ImageIOGetImageReaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -23,24 +23,24 @@ /* * @test - * @bug 4091811 4148753 - * @summary Test java.net.MulticastSocket joinGroup and leaveGroup - * + * @bug 4432107 + * @summary Checks if ImageIO.getImageReaders(null) throws an IAE */ -import java.io.*; -import java.net.*; +import javax.imageio.ImageIO; +public class ImageIOGetImageReaders { -public class JoinGroup { + public static void main(String[] args) { + boolean gotIAE = false; + try { + ImageIO.getImageReaders(null); + } catch (IllegalArgumentException e) { + gotIAE = true; + } - public static void main(String args[]) throws Exception { - MulticastSocket soc = null; - InetAddress sin = null; - - soc = new MulticastSocket(); - sin = InetAddress.getByName("224.80.80.80"); - soc.joinGroup(sin); - soc.leaveGroup(sin); + if (!gotIAE) { + throw new RuntimeException("Failed to get IAE!"); + } } } diff --git a/jdk/test/javax/imageio/ImageIOWriteFile.java b/jdk/test/javax/imageio/ImageIOWriteFile.java new file mode 100644 index 00000000000..35c59fad643 --- /dev/null +++ b/jdk/test/javax/imageio/ImageIOWriteFile.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4393174 + * @summary Checks that ImageIO.write(..., ..., File) truncates the file + */ + +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.FileOutputStream; + +import javax.imageio.ImageIO; + +public class ImageIOWriteFile { + + public static void main(String[] args) { + long length0 = -1L; + long length1 = -1L; + + try { + BufferedImage bi = + new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); + + File outFile = File.createTempFile("imageiowritefile", ".tmp"); + + // Write image to an empty file + outFile.delete(); + ImageIO.write(bi, "png", outFile); + length0 = outFile.length(); + + // Write a larger file full of junk + outFile.delete(); + FileOutputStream fos = new FileOutputStream(outFile); + for (int i = 0; i < length0*2; i++) { + fos.write(1); + } + fos.close(); + + // Write image again + ImageIO.write(bi, "png", outFile); + length1 = outFile.length(); + + outFile.delete(); + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException("Unexpected exception!"); + } + + if (length0 == 0) { + throw new RuntimeException("File length is zero!"); + } + if (length1 != length0) { + throw new RuntimeException("File length changed!"); + } + } +} diff --git a/jdk/test/javax/imageio/ImageIOWriteNull.java b/jdk/test/javax/imageio/ImageIOWriteNull.java new file mode 100644 index 00000000000..2e19bbaf7eb --- /dev/null +++ b/jdk/test/javax/imageio/ImageIOWriteNull.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4434855 + * @summary Checks that ImageIO.write(null, null, (File)null) throws an IAE + */ + +import java.io.File; + +import javax.imageio.ImageIO; + +public class ImageIOWriteNull { + + public static void main(String[] args) { + try { + ImageIO.write(null, null, (File)null); + throw new RuntimeException("Failed to get IAE!"); + } catch (IllegalArgumentException iae) { + } catch (Exception e) { + throw new RuntimeException("Unexpected exception: " + e); + } + } +} diff --git a/jdk/test/javax/imageio/ImageReadParamPasses.java b/jdk/test/javax/imageio/ImageReadParamPasses.java new file mode 100644 index 00000000000..ffb1832d2fc --- /dev/null +++ b/jdk/test/javax/imageio/ImageReadParamPasses.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4429365 + * @summary Checks that ImageReadParam.setSourceProgressivePasses handles + * overflow correctly + */ + +import javax.imageio.ImageReadParam; + +public class ImageReadParamPasses { + + private static final int maxint = Integer.MAX_VALUE; + + private static void expect(int i, int j) { + if (i != j) { + throw new RuntimeException("Expected " + i + ", got " + j); + } + } + + private static void checkForIAE(int minPass, int numPasses) { + ImageReadParam param = new ImageReadParam(); + + boolean gotIAE = false; + try { + param.setSourceProgressivePasses(minPass, numPasses); + } catch (IllegalArgumentException iae) { + gotIAE = true; + } + if (!gotIAE) { + throw new RuntimeException("Failed to get IAE for wraparound!"); + } + } + + private static void test(int minPass, int numPasses) { + ImageReadParam param = new ImageReadParam(); + + param.setSourceProgressivePasses(minPass, numPasses); + expect(param.getSourceMinProgressivePass(), minPass); + expect(param.getSourceNumProgressivePasses(), numPasses); + + int maxPass = numPasses == maxint ? maxint : minPass + numPasses - 1; + expect(param.getSourceMaxProgressivePass(), maxPass); + } + + public static void main(String[] args) { + // Typical case + test(17, 30); + + // Read all passes + test(0, maxint); + + // Start at pass 17, continue indefinitely + test(17, maxint); + + // Start at pass maxint - 10, continue indefinitely + test(maxint - 10, maxint); + + // Start at pass maxint - 10, go up to maxint - 1 + test(maxint - 10, 10); + + // Start at pass maxint - 10, go up to maxint + test(maxint - 10, 11); + + // Start at maxint, continue indefinitely :-) + test(maxint, maxint); + + // Start at maxint, go up to maxint + test(maxint, 1); + + // Check that an IllegalArgumentException is thrown if + // wraparound occurs + checkForIAE(maxint, 2); + checkForIAE(maxint - 5, 10); + checkForIAE(10, maxint - 5); + checkForIAE(maxint - 1000, maxint - 1000); + checkForIAE(maxint - 1, maxint - 1); + } +} diff --git a/jdk/test/javax/imageio/ImageReaderGetDestination.java b/jdk/test/javax/imageio/ImageReaderGetDestination.java new file mode 100644 index 00000000000..b0a67669367 --- /dev/null +++ b/jdk/test/javax/imageio/ImageReaderGetDestination.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4449211 + * @summary Checks that ImageReader.getDestination throws correct exceptions + */ + +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.util.Iterator; +import java.util.Vector; + +import javax.imageio.IIOException; +import javax.imageio.ImageReadParam; +import javax.imageio.ImageReader; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.spi.ImageReaderSpi; + +public class ImageReaderGetDestination { + + public static void main(String argv[]) { + Vector imageTypes = new Vector(); + boolean gotIAE1 = false; + boolean gotIAE2 = false; + boolean gotIAE3 = false; + boolean gotIAE4 = false; + + try { + DummyImageReaderImpl.getDestination(null, null, 5, 10); + } catch (IllegalArgumentException iae) { + gotIAE1 = true; + } catch (Throwable ee) { + System.out.println("Unexpected exception 1:"); + ee.printStackTrace(); + } + if (!gotIAE1) { + throw new RuntimeException("Failed to get IAE #1!"); + } + + try { + DummyImageReaderImpl.getDestination(null, imageTypes.iterator(), + 5, 10); + } catch (IllegalArgumentException iae) { + gotIAE2 = true; + } catch (Throwable ee) { + System.out.println("Unexpected exception 2:"); + ee.printStackTrace(); + } + if (!gotIAE2) { + throw new RuntimeException("Failed to get IAE #2!"); + } + + imageTypes.add("abc"); + try { + DummyImageReaderImpl.getDestination(null, imageTypes.iterator(), + 5, 10); + } catch (IllegalArgumentException iae) { + gotIAE3 = true; + } catch (Throwable ee) { + System.out.println("Unexpected exception 3:"); + ee.printStackTrace(); + } + if (!gotIAE3) { + throw new RuntimeException("Failed to get IAE #3!"); + } + + imageTypes.clear(); + ImageTypeSpecifier its = ImageTypeSpecifier.createFromBufferedImageType + (BufferedImage.TYPE_INT_RGB); + imageTypes.add(its); + try { + DummyImageReaderImpl.getDestination(null, + imageTypes.iterator(), + Integer.MAX_VALUE, + Integer.MAX_VALUE); + } catch (IllegalArgumentException iae) { + gotIAE4 = true; + } catch (Throwable ee) { + System.out.println("Unexpected exception 4: "); + ee.printStackTrace(); + } + if (!gotIAE4) { + throw new RuntimeException("Failed to get IAE #4!"); + } + } + + public static class DummyImageReaderImpl extends ImageReader { + public DummyImageReaderImpl(ImageReaderSpi originatingProvider) { + super(originatingProvider); + } + public static BufferedImage getDestination(ImageReadParam param, + Iterator imageTypes, + int width, + int height) + throws IIOException { + return ImageReader.getDestination(param, imageTypes, width, height); + } + public int getNumImages(boolean allowSearch) throws IOException {return 1;} + public int getWidth(int imageIndex) throws IOException {return 1;} + public int getHeight(int imageIndex) throws IOException {return 1;} + public Iterator getImageTypes(int imageIndex) + throws IOException {return null;} + public IIOMetadata getStreamMetadata() throws IOException {return null;} + public IIOMetadata getImageMetadata(int imageIndex) + throws IOException {return null;} + public BufferedImage read(int imageIndex, ImageReadParam param) + throws IOException {return null;} + } +} diff --git a/jdk/test/javax/imageio/ImageReaderReadAll.java b/jdk/test/javax/imageio/ImageReaderReadAll.java new file mode 100644 index 00000000000..5e0d0370a33 --- /dev/null +++ b/jdk/test/javax/imageio/ImageReaderReadAll.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4450319 + * @summary Checks that ImageReader.readAll(int, ImageReadParam) makes use of + * the ImageReadParam object + */ + +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.util.Iterator; +import java.util.Vector; + +import javax.imageio.IIOImage; +import javax.imageio.ImageReadParam; +import javax.imageio.ImageReader; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.spi.ImageReaderSpi; +import javax.imageio.stream.MemoryCacheImageInputStream; + +public class ImageReaderReadAll { + + private final static byte[] ba = {}; + + public static void main(String argv[]) { + ImageReader ireader; + ImageReadParam irp; + IIOImage image; + BufferedImage bi; + BufferedImage bi_1; + BufferedImage bi_2; + + ireader = new DummyImageReaderImpl(null); + MemoryCacheImageInputStream mciis = new MemoryCacheImageInputStream + (new ByteArrayInputStream(ba)); + ireader.setInput(mciis); + + irp = new ImageReadParam(); + irp.setDestination(new BufferedImage(10, 10, + BufferedImage.TYPE_3BYTE_BGR)); + try { + image = ireader.readAll(0, irp); + bi_1 = ireader.read(0, irp); + bi_2 = ireader.read(0); + } catch (java.io.IOException ee) { + throw new RuntimeException("Unexpected exception: " + ee); + } + + bi = (BufferedImage)image.getRenderedImage(); + if (bi.getType() != bi_1.getType()) { + throw new RuntimeException("Images have different type!"); + } + } + + + public static class DummyImageReaderImpl extends ImageReader { + + public DummyImageReaderImpl(ImageReaderSpi originatingProvider) { + super(originatingProvider); + } + + public BufferedImage read(int imageIndex, ImageReadParam param) + throws IOException { + if (input == null) + throw new IllegalStateException(); + if (imageIndex >= 1 || imageIndex < 0) + throw new IndexOutOfBoundsException(); + if (seekForwardOnly) { + if (imageIndex < minIndex) + throw new IndexOutOfBoundsException(); + minIndex = imageIndex; + } + + return getDestination(param, getImageTypes(imageIndex), 10, 15); + } + + public Iterator getImageTypes(int imageIndex) throws IOException { + if (input == null) + throw new IllegalStateException(); + if (imageIndex >= 1 || imageIndex < 0) + throw new IndexOutOfBoundsException(); + + Vector imageTypes = new Vector(); + imageTypes.add(ImageTypeSpecifier.createFromBufferedImageType + (BufferedImage.TYPE_BYTE_GRAY )); + return imageTypes.iterator(); + } + + public int getNumImages(boolean allowSearch) throws IOException {return 1;} + public int getWidth(int imageIndex) throws IOException {return 1;} + public int getHeight(int imageIndex) throws IOException {return 1;} + public IIOMetadata getStreamMetadata() throws IOException {return null;} + public IIOMetadata getImageMetadata(int imageIndex) + throws IOException {return null;} + } +} diff --git a/jdk/test/javax/imageio/ImageStreamFromRAF.java b/jdk/test/javax/imageio/ImageStreamFromRAF.java new file mode 100644 index 00000000000..3a1e36847ff --- /dev/null +++ b/jdk/test/javax/imageio/ImageStreamFromRAF.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4395378 + * @summary Checks that ImageIO.createImageInputStream and + * createImageOutputStream produce correct output when given a + * RandomAccessFile + */ + +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; + +import javax.imageio.ImageIO; +import javax.imageio.stream.FileImageInputStream; +import javax.imageio.stream.FileImageOutputStream; +import javax.imageio.stream.ImageInputStream; +import javax.imageio.stream.ImageOutputStream; + +public class ImageStreamFromRAF { + + public static void main(String[] args) { + try { + File f = new File("ImageInputStreamFromRAF.tmp"); + RandomAccessFile raf = new RandomAccessFile(f, "rw"); + ImageInputStream istream = ImageIO.createImageInputStream(raf); + ImageOutputStream ostream = ImageIO.createImageOutputStream(raf); + f.delete(); + if (istream == null) { + throw new RuntimeException("ImageIO.createImageInputStream(RandomAccessFile) returned null!"); + } + if (ostream == null) { + throw new RuntimeException("ImageIO.createImageOutputStream(RandomAccessFile) returned null!"); + } + if (!(istream instanceof FileImageInputStream)) { + throw new RuntimeException("ImageIO.createImageInputStream(RandomAccessFile) did not return a FileImageInputStream!"); + } + if (!(ostream instanceof FileImageOutputStream)) { + throw new RuntimeException("ImageIO.createImageOutputStream(RandomAccessFile) did not return a FileImageOutputStream!"); + } + } catch (IOException ioe) { + throw new RuntimeException("Unexpected IOException: " + ioe); + } + } +} diff --git a/jdk/test/javax/imageio/ImageTypeSpecifierBitsPerBand.java b/jdk/test/javax/imageio/ImageTypeSpecifierBitsPerBand.java new file mode 100644 index 00000000000..74c9128ffc8 --- /dev/null +++ b/jdk/test/javax/imageio/ImageTypeSpecifierBitsPerBand.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4392669 + * @summary Checks contract of ImageTypeSpecifier.getBitsPerBand + */ + +import java.awt.image.BufferedImage; + +import javax.imageio.ImageTypeSpecifier; + +public class ImageTypeSpecifierBitsPerBand { + + public static void main(String[] args) { + int biType = BufferedImage.TYPE_USHORT_565_RGB; + ImageTypeSpecifier type = + ImageTypeSpecifier.createFromBufferedImageType(biType); + + int b0 = type.getBitsPerBand(0); + int b1 = type.getBitsPerBand(1); + int b2 = type.getBitsPerBand(2); + + if (b0 != 5 || b1 != 6 || b2 != 5) { + throw new RuntimeException("Got incorrect bits per band value!"); + } + + boolean gotIAE = false; + try { + int b3 = type.getBitsPerBand(3); + } catch (IllegalArgumentException e) { + gotIAE = true; + } + if (!gotIAE) { + throw new RuntimeException + ("Failed to get IllegalArgumentException for band == 3!"); + } + } +} diff --git a/jdk/test/javax/imageio/ImageTypeSpecifierTest.java b/jdk/test/javax/imageio/ImageTypeSpecifierTest.java new file mode 100644 index 00000000000..98f38b8643d --- /dev/null +++ b/jdk/test/javax/imageio/ImageTypeSpecifierTest.java @@ -0,0 +1,310 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4429934 4429950 4430991 4430993 + * @summary Checks various aspects of ImageTypeSpecifier functionality + */ + +import java.awt.color.ColorSpace; +import java.awt.image.BufferedImage; +import java.awt.image.ColorModel; +import java.awt.image.DataBuffer; +import java.awt.image.SampleModel; + +import javax.imageio.ImageTypeSpecifier; + +public class ImageTypeSpecifierTest { + + private static void fail(String message) { + throw new RuntimeException(message); + } + + private static void test4429934() { + try { + ImageTypeSpecifier itspecifier = + new ImageTypeSpecifier(null, null); + fail("Failed to get IAE!"); + } catch( IllegalArgumentException e ) { + } + + try { + ImageTypeSpecifier itspecifier = new ImageTypeSpecifier(null); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e ) { + } + } + + private static void test4429950() { + createPackedTest(); + createInterleavedTest(); + createBandedTest(); + createIndexedTest(); + } + + public static void createPackedTest() { + ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); + int rmask = 0x00ff0000; + int gmask = 0x0000ff00; + int bmask = 0x000000ff; + int amask = 0xff000000; + try { + ImageTypeSpecifier.createPacked(null, rmask, gmask, bmask, amask, 0, +false); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + ColorSpace cs1 = ColorSpace.getInstance(ColorSpace.CS_GRAY); + try { + ImageTypeSpecifier.createPacked + (cs1, rmask, gmask, bmask, amask, 0, false); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + try { + ImageTypeSpecifier.createPacked(cs, 0, 0, 0, 0, 0, false); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + try { + ImageTypeSpecifier.createPacked(cs, rmask, gmask, bmask, amask, -1, +false); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + } + + public static void createInterleavedTest() { + ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); + int[] bandOffsets = {0,0,0,0}; + int dataType = 0; + boolean hasAlpha = true; + boolean isAlphaPremultiplied = true; + + try { + ImageTypeSpecifier.createInterleaved + (null, bandOffsets, dataType, hasAlpha, isAlphaPremultiplied); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + try { + ImageTypeSpecifier.createInterleaved + (cs, null, dataType, hasAlpha, isAlphaPremultiplied); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + int[] bad_bandOffsets = {0,100,1000}; + try { + ImageTypeSpecifier.createInterleaved + (cs, bad_bandOffsets, dataType, hasAlpha, isAlphaPremultiplied); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + int[] bad_bandOffsets_1 = {}; + try { + ImageTypeSpecifier.createInterleaved + (cs, bad_bandOffsets_1, dataType, hasAlpha, isAlphaPremultiplied); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + } + + public static void createBandedTest() { + ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); + int[] bankIndices = {0, 100, 1000, 10000}; + int[] bandOffsets = {0, 100, 1000, 10000}; + int dataType = 0; + boolean hasAlpha = true; + boolean isAlphaPremultiplied = true; + + try { + ImageTypeSpecifier.createBanded(null, bankIndices, bandOffsets, + dataType, hasAlpha, isAlphaPremultiplied); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + int[] bad_bankIndices = {}; + int[] bad_bandOffsets = {}; + try { + ImageTypeSpecifier.createBanded(cs, bad_bankIndices, bad_bandOffsets, + dataType, hasAlpha, isAlphaPremultiplied); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + try { + ImageTypeSpecifier.createBanded(cs, bankIndices, bandOffsets, + 99999, hasAlpha, isAlphaPremultiplied); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + } + + public static void createGrayscaleTest() { + int bits = 8; + int dataType = DataBuffer.TYPE_BYTE; + boolean isSigned = true; + // testcase 1 + try { + ImageTypeSpecifier.createGrayscale(100, dataType, isSigned); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + try { + ImageTypeSpecifier.createGrayscale(10, dataType, isSigned); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + try { + ImageTypeSpecifier.createGrayscale(bits, 100, isSigned); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + } + + public static void createIndexedTest() { + byte[] redLUT = {0}; + byte[] greenLUT = {0}; + byte[] blueLUT = {0}; + byte[] alphaLUT = {0}; + int bits = 8; + int dataType = DataBuffer.TYPE_BYTE; + + try { + ImageTypeSpecifier.createIndexed(redLUT, greenLUT, + blueLUT, alphaLUT, 0, dataType); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + try { + ImageTypeSpecifier.createIndexed(redLUT, greenLUT, + blueLUT, alphaLUT, 17, dataType); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + try { + ImageTypeSpecifier.createIndexed(redLUT, greenLUT, + blueLUT, alphaLUT, 10, dataType); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + byte[] greenLUT_4 = {}; + try { + ImageTypeSpecifier.createIndexed(redLUT, greenLUT_4, + blueLUT, alphaLUT, bits, dataType); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + byte[] redLUT_5 = {}; + try { + ImageTypeSpecifier.createIndexed(redLUT_5, greenLUT, + blueLUT, alphaLUT, bits, dataType); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + byte[] alphaLUT_6 = {}; + try { + ImageTypeSpecifier.createIndexed(redLUT, greenLUT, + blueLUT, alphaLUT_6 , bits, dataType); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + try { + ImageTypeSpecifier.createIndexed(redLUT, greenLUT, + blueLUT, alphaLUT , bits, 100); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + } + + private static void test4430991() { + ImageTypeSpecifier itspecifier; + + itspecifier = ImageTypeSpecifier.createFromBufferedImageType + (BufferedImage.TYPE_INT_RGB); + + try { + itspecifier.createBufferedImage(Integer.MAX_VALUE, + Integer.MAX_VALUE); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + + try { + itspecifier.getSampleModel(Integer.MAX_VALUE, Integer.MAX_VALUE); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + } + + private static void test4430993() { + ImageTypeSpecifier itspecifier; + + int bits = 32; + int rmask = 0x00ff0000; + int gmask = 0x0000ff00; + int bmask = 0x000000ff; + ColorModel dcm = new java.awt.image.DirectColorModel + (bits, rmask, gmask, bmask); + int[] bandOffsets = new int[2]; + bandOffsets[1] = 1; + SampleModel sm = new java.awt.image.ComponentSampleModel + (DataBuffer.TYPE_SHORT, 1, 1, 2, 2, bandOffsets); + + try { + itspecifier = new ImageTypeSpecifier(dcm, sm); + fail("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + } + + public static void main(String[] args) { + try { + test4429934(); + test4429950(); + test4430991(); + test4430993(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Unexpected exception: " + e); + } + } +} diff --git a/jdk/test/javax/imageio/ImageWriteParamMisc.java b/jdk/test/javax/imageio/ImageWriteParamMisc.java new file mode 100644 index 00000000000..104f856d7ae --- /dev/null +++ b/jdk/test/javax/imageio/ImageWriteParamMisc.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4434870 4434886 4441315 4446842 + * @summary Checks that miscellaneous ImageWriteParam methods work properly + */ + +import java.awt.Dimension; + +import javax.imageio.ImageWriteParam; + +public class ImageWriteParamMisc { + + public static void main(String[] args) { + test4434870(); + test4434886(); + test4441315(); + test4446842(); + } + + public static class ImageWriteParam4434870 extends ImageWriteParam { + public ImageWriteParam4434870() { + super(null); + super.canWriteTiles = true; + super.preferredTileSizes = + new Dimension[] {new Dimension(1, 2), new Dimension(5, 6)}; + } + } + + private static void test4434870() { + ImageWriteParam iwp = new ImageWriteParam4434870(); + try { + Dimension[] dimensions = iwp.getPreferredTileSizes(); + iwp.setTilingMode(ImageWriteParam.MODE_EXPLICIT); + iwp.setTiling(100, 100, 0,0); + throw new RuntimeException("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + } + + public static class ImageWriteParam4434886 extends ImageWriteParam { + public ImageWriteParam4434886() { + super(null); + super.canWriteTiles = true; + super.canOffsetTiles = true; + } + } + + private static void test4434886() { + ImageWriteParam iwp = new ImageWriteParam4434886(); + iwp.setTilingMode(ImageWriteParam.MODE_EXPLICIT); + try { + iwp.setTiling(-1,-2,-3,-4); + throw new RuntimeException("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + } + + public static class ImageWriteParam4441315 extends ImageWriteParam { + public ImageWriteParam4441315() { + super(null); + super.canWriteProgressive = true; + } + } + + private static void test4441315() { + ImageWriteParam iwp = new ImageWriteParam4441315(); + try { + iwp.setProgressiveMode(ImageWriteParam.MODE_EXPLICIT); + throw new RuntimeException("Failed to get IAE!"); + } catch (IllegalArgumentException e) { + } + } + + private static void test4446842() { + ImageWriteParam iwp = new ImageWriteParam(null); + try { + iwp.getCompressionTypes(); + throw new RuntimeException("Failed to get UOE!"); + } catch (UnsupportedOperationException e) { + } + } +} diff --git a/jdk/test/javax/imageio/NullInputOutput.java b/jdk/test/javax/imageio/NullInputOutput.java new file mode 100644 index 00000000000..db275cf65b7 --- /dev/null +++ b/jdk/test/javax/imageio/NullInputOutput.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4892682 4892698 + * @summary Tests that the appropriate IllegalStateException is thrown if + * ImageReader.read() or ImageWriter.write() is called without having + * first set the input/output stream + */ + +import java.awt.image.BufferedImage; +import java.util.Iterator; + +import javax.imageio.ImageReader; +import javax.imageio.ImageWriter; +import javax.imageio.spi.IIORegistry; +import javax.imageio.spi.ImageReaderSpi; +import javax.imageio.spi.ImageWriterSpi; + +public class NullInputOutput { + + public static void main(String[] args) throws Exception { + IIORegistry registry = IIORegistry.getDefaultInstance(); + + // test ImageReader.read() for all available ImageReaders + Iterator readerspis = registry.getServiceProviders(ImageReaderSpi.class, + false); + while (readerspis.hasNext()) { + ImageReaderSpi readerspi = (ImageReaderSpi)readerspis.next(); + ImageReader reader = readerspi.createReaderInstance(); + try { + reader.read(0); + } catch (IllegalStateException ise) { + // caught exception, everything's okay + } + } + + // test ImageWriter.write() for all available ImageWriters + BufferedImage bi = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); + Iterator writerspis = registry.getServiceProviders(ImageWriterSpi.class, + false); + while (writerspis.hasNext()) { + ImageWriterSpi writerspi = (ImageWriterSpi)writerspis.next(); + ImageWriter writer = writerspi.createWriterInstance(); + try { + writer.write(bi); + } catch (IllegalStateException ise) { + // caught exception, everything's okay + } + } + } +} diff --git a/jdk/test/javax/imageio/PNGSpiStreamMetadata.java b/jdk/test/javax/imageio/PNGSpiStreamMetadata.java new file mode 100644 index 00000000000..ee65561198a --- /dev/null +++ b/jdk/test/javax/imageio/PNGSpiStreamMetadata.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4403355 + * @summary Checks that PNGImage{Reader,Writer}Spi.getStreamMetadataFormatNames + * and getNativeStreamMetadataFormatName return null + * @modules java.desktop/com.sun.imageio.plugins.png + */ + +import javax.imageio.spi.ImageReaderSpi; +import javax.imageio.spi.ImageWriterSpi; + +import com.sun.imageio.plugins.png.PNGImageReaderSpi; +import com.sun.imageio.plugins.png.PNGImageWriterSpi; + +public class PNGSpiStreamMetadata { + + private static void fatal() { + throw new RuntimeException("Got a non-null stream metadata format!"); + } + + public static void main(String[] args) { + ImageReaderSpi rspi = new PNGImageReaderSpi(); + if (rspi.getNativeStreamMetadataFormatName() != null) { + fatal(); + } + if (rspi.isStandardStreamMetadataFormatSupported() != false) { + fatal(); + } + if (rspi.getExtraStreamMetadataFormatNames() != null) { + fatal(); + } + + ImageWriterSpi wspi = new PNGImageWriterSpi(); + if (wspi.getNativeStreamMetadataFormatName() != null) { + fatal(); + } + if (wspi.isStandardStreamMetadataFormatSupported() != false) { + fatal(); + } + if (wspi.getExtraStreamMetadataFormatNames() != null) { + fatal(); + } + } +} diff --git a/jdk/test/javax/imageio/PNGSuffixes.java b/jdk/test/javax/imageio/PNGSuffixes.java new file mode 100644 index 00000000000..10f3f72e4bc --- /dev/null +++ b/jdk/test/javax/imageio/PNGSuffixes.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4394924 + * @summary Checks for spurious leading "." in PNG file suffixes + * @modules java.desktop/com.sun.imageio.plugins.png + */ + +import com.sun.imageio.plugins.png.PNGImageWriterSpi; + +public class PNGSuffixes { + + public static void main(String[] args) { + String[] suffixes = new PNGImageWriterSpi().getFileSuffixes(); + for (int i = 0; i < suffixes.length; i++) { + if (suffixes[i].startsWith(".")) { + throw new RuntimeException("Found a \".\" in a suffix!"); + } + } + } +} diff --git a/jdk/test/javax/imageio/ReadBitsTest.java b/jdk/test/javax/imageio/ReadBitsTest.java new file mode 100644 index 00000000000..ad057c7b2ef --- /dev/null +++ b/jdk/test/javax/imageio/ReadBitsTest.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4416800 + * @summary Checks that ImageInputStreamImpl.readBit and readBits handle the bit + * offset correctly + */ + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; + +import javax.imageio.stream.FileCacheImageInputStream; +import javax.imageio.stream.ImageInputStream; + +public class ReadBitsTest { + public static void main(String[] args) throws IOException { + byte[] buffer = new byte[] {(byte)169, (byte)85}; // 10101001 01010101 + InputStream ins = new ByteArrayInputStream(buffer); + ImageInputStream in = new FileCacheImageInputStream(ins,null); + + if (in.getBitOffset() != 0) { + throw new RuntimeException("Initial bit offset != 0!"); + } + + int bit0 = in.readBit(); // 1 + if (bit0 != 1) { + throw new RuntimeException("First bit != 1"); + } + if (in.getBitOffset() != 1) { + throw new RuntimeException("Second bit offset != 1"); + } + + long bits1 = in.readBits(5); // 01010 = 10 + if (bits1 != 10) { + throw new RuntimeException("Bits 1-5 != 10 (= " + bits1 + ")"); + } + if (in.getBitOffset() != 6) { + throw new RuntimeException("Third bit offset != 6"); + } + + int bit1 = in.readBit(); // 0 + if (bit1 != 0) { + throw new RuntimeException("Bit 6 != 0"); + } + if (in.getBitOffset() != 7) { + throw new RuntimeException("Third bit offset != 7"); + } + + long bits2 = in.readBits(8); // 10101010 = 170 + if (bits2 != 170) { + throw new RuntimeException("Bits 7-14 != 170 (= " + bits2 + ")"); + } + if (in.getBitOffset() != 7) { + throw new RuntimeException("Fourth bit offset != 7"); + } + + int bit2 = in.readBit(); // 1 + if (bit2 != 1) { + throw new RuntimeException("Bit 15 != 1"); + } + if (in.getBitOffset() != 0) { + throw new RuntimeException("Fifth bit offset != 0"); + } + + in.close(); + } +} diff --git a/jdk/test/demo/jvmti/minst/MinstTest.java b/jdk/test/javax/imageio/SetOutput.java similarity index 52% rename from jdk/test/demo/jvmti/minst/MinstTest.java rename to jdk/test/javax/imageio/SetOutput.java index b40afdf1004..8f4deda1c87 100644 --- a/jdk/test/demo/jvmti/minst/MinstTest.java +++ b/jdk/test/javax/imageio/SetOutput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -21,32 +21,35 @@ * questions. */ - -/* @test - * @bug 6377205 - * @summary Test jvmti demo minst - * - * @compile ../DemoRun.java - * @compile MinstExample.java - * @build MinstTest - * @run main MinstTest MinstExample +/* + * @test + * @bug 4414455 + * @summary Checks for NPE from ImageWriter.setOutput when the writer has no + * originating service provider + * @modules java.desktop/com.sun.imageio.plugins.png */ -public class MinstTest { +import java.io.File; +import java.io.IOException; - public static void main(String args[]) throws Exception { - DemoRun demo; +import javax.imageio.ImageIO; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageOutputStream; - /* Run demo that uses JVMTI minst agent (no options) */ - demo = new DemoRun("minst", "exclude=java/*,exclude=javax/*,exclude=com/*,exclude=jdk/*,exclude=sun/*" /* options to minst */ ); - demo.runit(args[0]); +import com.sun.imageio.plugins.png.PNGImageWriter; - /* Make sure patterns in output look ok */ - if (demo.output_contains("ERROR")) { - throw new RuntimeException("Test failed - ERROR seen in output"); +public class SetOutput { + + public static void main(String[] args) throws IOException { + ImageWriter iw = new PNGImageWriter(null); + File f = File.createTempFile("imageio", "tmp"); + ImageOutputStream ios = ImageIO.createImageOutputStream(f); + try { + iw.setOutput(ios); + } catch (NullPointerException npe) { + f.delete(); + throw new RuntimeException("Got NullPointerException!"); } - - /* Must be a pass. */ - System.out.println("Test passed - cleanly terminated"); + f.delete(); } } diff --git a/jdk/test/javax/imageio/WriteNullImageTest.java b/jdk/test/javax/imageio/WriteNullImageTest.java new file mode 100644 index 00000000000..c13c16f9ea5 --- /dev/null +++ b/jdk/test/javax/imageio/WriteNullImageTest.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4954545 + * @summary This test verifies whether the ImageWriter implementations throw + * IllegalArgumentException when a null image is passed to the write + * method. This is tested for all the image writers available with the + * IIORegistry. + */ + +import java.io.FileOutputStream; +import java.util.Iterator; + +import javax.imageio.ImageIO; +import javax.imageio.ImageWriter; +import javax.imageio.spi.IIORegistry; +import javax.imageio.spi.ImageWriterSpi; +import javax.imageio.stream.ImageOutputStream; + +public class WriteNullImageTest { + + public WriteNullImageTest() { + boolean testFailed = false; + String failMsg = "FAIL: IllegalArgumentException is not thrown by the " + + "ImageWriter when the image passed to the write() method is " + + "null, for the image formats: "; + + try { + IIORegistry reg = IIORegistry.getDefaultInstance(); + ImageWriter writer = null; + Iterator writerSpiIter = reg.getServiceProviders(ImageWriterSpi.class, true); + + while (writerSpiIter.hasNext()) { + ImageWriterSpi writerSpi = (ImageWriterSpi) writerSpiIter.next(); + writer = writerSpi.createWriterInstance(); + String names[] = writerSpi.getFormatNames(); + + FileOutputStream fos = new FileOutputStream("temp"); + ImageOutputStream ios = ImageIO.createImageOutputStream(fos); + writer.setOutput(ios); + + try { + writer.write(null, null, null); + } catch (IllegalArgumentException iae) { + System.out.println("PASS: Expected exception is thrown when null img is passed " + + "to the write method, for the image format: " + names[0]); + System.out.println("\n"); + } catch (Exception e) { + testFailed = true; + failMsg = failMsg + names[0] + ", "; + } + } + + } catch (Exception e) { + testFailed = true; + throw new RuntimeException("Test Failed. Exception thrown: " + e.toString()); + } + if (testFailed) { + failMsg = failMsg.substring(0, failMsg.lastIndexOf(",")); + throw new RuntimeException(failMsg); + } + } + + public static void main(String args[]) { + WriteNullImageTest test = new WriteNullImageTest(); + } +} diff --git a/jdk/test/javax/imageio/event/WriteProgressListenerTest.java b/jdk/test/javax/imageio/event/WriteProgressListenerTest.java new file mode 100644 index 00000000000..140a6128881 --- /dev/null +++ b/jdk/test/javax/imageio/event/WriteProgressListenerTest.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4420342 4421831 + * @summary Checks that IIOWriteProgressListener methods are called in proper + * sequence for the JPEG and PNG writers + */ + +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.util.Iterator; +import javax.imageio.ImageIO; +import javax.imageio.ImageWriter; +import javax.imageio.event.IIOWriteProgressListener; +import javax.imageio.stream.ImageOutputStream; + +public class WriteProgressListenerTest implements IIOWriteProgressListener { + + final static int UNINITIALIZED = 0; + final static int IMAGE_STARTED = 1; + final static int IMAGE_COMPLETE = 2; + + int state = UNINITIALIZED; + float prevPercentageDone = 0.0F; + File tempFile = null; + + public WriteProgressListenerTest(String format) throws IOException { + ImageWriter writer = null; + Iterator witer = ImageIO.getImageWritersByFormatName(format); + if (!witer.hasNext()) { + error("No writer for format " + format + "!"); + } + writer = (ImageWriter)witer.next(); + + System.out.println("Got writer " + writer); + writer.addIIOWriteProgressListener(this); + + this.tempFile = File.createTempFile("imageio", ".tmp"); + tempFile.deleteOnExit(); + ImageOutputStream stream = ImageIO.createImageOutputStream(tempFile); + writer.setOutput(stream); + + BufferedImage im = + new BufferedImage(100, 100, BufferedImage.TYPE_3BYTE_BGR); + + this.state = UNINITIALIZED; + + writer.write(im); + + if (this.state == UNINITIALIZED) { + error("imageStarted never called!"); + } + if (this.state != IMAGE_COMPLETE) { + error("imageComplete not called!"); + } + + print("Passed!"); + } + + private void error(String s) { + if (tempFile != null) { + tempFile.delete(); + } + throw new RuntimeException(s); + } + + private void print(String s) { + System.out.println(s); + } + + public void sequenceStarted(ImageWriter source) { + error("Obsolete method sequenceStarted was called!"); + } + + public void sequenceComplete(ImageWriter source) { + error("Obsolete method sequenceComplete was called!"); + } + + public void imageStarted(ImageWriter source, int imageIndex) { + print("imageStarted: imageIndex = " + imageIndex); + + if (state != UNINITIALIZED) { + error("imageStarted not called first!"); + } + state = IMAGE_STARTED; + prevPercentageDone = 0.0F; + } + + public void imageProgress(ImageWriter source, + float percentageDone) { + print("imageProgress: percentageDone = " + percentageDone); + + if (state != IMAGE_STARTED) { + error("imageProgress called without prior imageStarted!"); + } + if (percentageDone < prevPercentageDone) { + error("percentageDone did not increase!"); + } + prevPercentageDone = percentageDone; + } + + public void imageComplete(ImageWriter source) { + print("imageComplete"); + + if (state != IMAGE_STARTED) { + error("imageComplete called without imageStarted!"); + } + if (prevPercentageDone == 0.0F) { + error("percentageDone was never updated!"); + } + state = IMAGE_COMPLETE; + } + + public void thumbnailStarted(ImageWriter source, + int imageIndex, int thumbnailIndex) { + } + + public void thumbnailProgress(ImageWriter source, float percentageDone) { + } + + public void thumbnailComplete(ImageWriter source) { + } + + public void writeAborted(ImageWriter source) { + } + + public static void main(String[] args) throws IOException { + new WriteProgressListenerTest("jpeg"); + new WriteProgressListenerTest("png"); + } +} diff --git a/jdk/test/javax/imageio/plugins/bmp/BMPCompressionTest.java b/jdk/test/javax/imageio/plugins/bmp/BMPCompressionTest.java new file mode 100644 index 00000000000..343cf1bf6c0 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/bmp/BMPCompressionTest.java @@ -0,0 +1,433 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4641872 + * @summary Tests writing compression modes of BMP plugin + * @modules java.desktop/com.sun.imageio.plugins.bmp + */ + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Transparency; +import java.awt.color.ColorSpace; +import java.awt.image.BufferedImage; +import java.awt.image.ColorModel; +import java.awt.image.ComponentColorModel; +import java.awt.image.DataBuffer; +import java.awt.image.DirectColorModel; +import java.awt.image.IndexColorModel; +import java.awt.image.PixelInterleavedSampleModel; +import java.awt.image.Raster; +import java.awt.image.SampleModel; +import java.awt.image.SinglePixelPackedSampleModel; +import java.awt.image.WritableRaster; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.Arrays; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.plugins.bmp.BMPImageWriteParam; +import javax.imageio.stream.ImageOutputStream; +import javax.swing.JComponent; +import javax.swing.JFrame; + +import com.sun.imageio.plugins.bmp.BMPMetadata; + +public class BMPCompressionTest { + + static final String format = "BMP"; + + public static void main(String[] args) { + + ImageWriter iw = null; + Iterator writers = ImageIO.getImageWritersByFormatName(format); + if (!writers.hasNext()) { + throw new RuntimeException("No available Image writer for "+format); + } + iw = (ImageWriter)writers.next(); + + + Iterator tests = Test.createTestSet(iw); + + while(tests.hasNext()) { + + Test t = (Test)tests.next(); + System.out.println(t.getDescription()); + t.doTest(); + } + + } + + + static class Test { + static ImageWriter iw; + private BufferedImage img; + private String description; + private BMPImageWriteParam param; + private IIOMetadata meta; + + + public static Iterator createTestSet(ImageWriter w) { + List l = new LinkedList(); + + Test.iw = w; + + // variate compression types + BMPImageWriteParam param = (BMPImageWriteParam)iw.getDefaultWriteParam(); + param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); + param.setCompressionType("BI_RGB"); + if (param.canWriteCompressed()) { + String[] cTypes = param.getCompressionTypes(); + String[] cDescr = param.getCompressionQualityDescriptions(); + float[] cValues = param.getCompressionQualityValues(); + + if (cDescr == null) { + System.out.println("There are no compression quality description!"); + } else { + for(int i=0; i 0) { + format = args[0]; + System.out.println("Test format " + format); + } + + init(); + System.out.println("IR="+ir); + System.out.println("IW="+iw); + ImageIO.setUseCache(false); + + for (int i=0; i " + iw.toString()); + } + if (iw==null) { + throw new RuntimeException("No available Image writer for "+format); + } + ImageWriteParam param = iw.getDefaultWriteParam(); + + param.setSourceRegion(new Rectangle(10, 10, 31, 31)); + param.setSourceSubsampling(3, 3, 0, 0); + + IIOMetadata meta = iw.getDefaultImageMetadata(new ImageTypeSpecifier(img), param); + + IIOImage iio_img = new IIOImage(img, null, meta); + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageOutputStream ios = ImageIO.createImageOutputStream(baos); + iw.setOutput(ios); + iw.write(meta, iio_img, param); + ios.flush(); + + byte[] ba_image = baos.toByteArray(); + + ByteArrayInputStream bais = new ByteArrayInputStream(ba_image); + + ImageReader ir = null; + + Iterator readers = ImageIO.getImageReadersByFormatName(format); + while (readers.hasNext()) { + ir = (ImageReader)readers.next(); + System.out.println(format + " -> " + ir.toString()); + } + if (ir==null) { + throw new RuntimeException("No available Image reader for "+format); + } + + ir.setInput(ImageIO.createImageInputStream(bais)); + + BufferedImage res = ir.read(0); + return res; + } + + private static BufferedImage createTestImage() + throws IOException { + + int w = 50; + int h = 50; + BufferedImage b = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); + Graphics2D g = b.createGraphics(); + g.setColor(Color.red); + g.fillRect(0,0, w, h); + g.setColor(Color.white); + for (int i=10; i<=10+30; i+= 3) { + g.drawLine(i, 10, i, 40); + g.drawLine(10, i, 40, i); + } + return b; + } + + private static boolean compare(final BufferedImage in, + final BufferedImage out) + { + final int width = in.getWidth(); + int height = in.getHeight(); + if (out.getWidth() != width || out.getHeight() != height) { + throw new RuntimeException("Dimensions changed!"); + } + + Raster oldras = in.getRaster(); + ColorModel oldcm = in.getColorModel(); + Raster newras = out.getRaster(); + ColorModel newcm = out.getColorModel(); + + for (int j = 0; j < height; j++) { + for (int i = 0; i < width; i++) { + Object oldpixel = oldras.getDataElements(i, j, null); + int oldrgb = oldcm.getRGB(oldpixel); + int oldalpha = oldcm.getAlpha(oldpixel); + + Object newpixel = newras.getDataElements(i, j, null); + int newrgb = newcm.getRGB(newpixel); + int newalpha = newcm.getAlpha(newpixel); + + if (newrgb != oldrgb || + newalpha != oldalpha) { + // showDiff(in, out); + throw new RuntimeException("Pixels differ at " + i + + ", " + j + " new = " + Integer.toHexString(newrgb) + " old = " + Integer.toHexString(oldrgb)); + } + } + } + return true; + } +} diff --git a/jdk/test/javax/imageio/plugins/bmp/BmpBigDestinationTest.java b/jdk/test/javax/imageio/plugins/bmp/BmpBigDestinationTest.java new file mode 100644 index 00000000000..e9f931eaf48 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/bmp/BmpBigDestinationTest.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4929367 + * @summary tests what BMP image was decoded correctly if destination buffered + * image is bigger than source image + */ + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.Iterator; + +import javax.imageio.ImageIO; +import javax.imageio.ImageReadParam; +import javax.imageio.ImageReader; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriter; + +public class BmpBigDestinationTest { + static String format = "BMP"; + public static void main(String[] args) { + try { + BufferedImage src = new BufferedImage(100, 100, + BufferedImage.TYPE_INT_RGB); + Graphics2D g = src.createGraphics(); + g.setColor(Color.red); + g.fillRect(0,0,100, 100); + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + ImageWriter iw = + (ImageWriter)ImageIO.getImageWritersByFormatName(format).next(); + if (iw == null) { + throw new RuntimeException("No writer available. Test failed."); + } + + iw.setOutput(ImageIO.createImageOutputStream(baos)); + iw.write(src); + + byte[] data = baos.toByteArray(); + + ImageReader ir = + (ImageReader)ImageIO.getImageReadersByFormatName(format).next(); + ir.setInput( + ImageIO.createImageInputStream( + new ByteArrayInputStream(data))); + + Iterator specifiers = ir.getImageTypes(0); + ImageTypeSpecifier typeSpecifier = null; + + if (specifiers.hasNext()) { + typeSpecifier = (ImageTypeSpecifier) specifiers.next(); + } + ImageReadParam param = new ImageReadParam(); + BufferedImage dst = typeSpecifier.createBufferedImage(200, 200); + param.setDestination(dst); + + ir.read(0, param); + + checkResults(src,dst); + + } catch (IOException e) { + e.printStackTrace(); + throw new RuntimeException("Unexpected exception. Test failed."); + } + } + + private static void checkResults(BufferedImage src, BufferedImage dst) { + for(int x=0; x"); + indent(level); + System.out.println(node.getNodeValue()); + indent(level); // emit close tag + System.out.println(""); + } else if (child != null) { + System.out.println(">"); // close current tag + while (child != null) { // emit child tags recursively + displayMetadata(child, level + 1); + child = child.getNextSibling(); + } + indent(level); // emit close tag + System.out.println(""); + } else { + System.out.println("/>"); + } + } + + public static void main(String args[]) { + BmpDefaultImageMetadataTest test = new BmpDefaultImageMetadataTest("bmp"); + } +} diff --git a/jdk/test/javax/imageio/plugins/bmp/CompressionModeTest.java b/jdk/test/javax/imageio/plugins/bmp/CompressionModeTest.java new file mode 100644 index 00000000000..d857c67b41f --- /dev/null +++ b/jdk/test/javax/imageio/plugins/bmp/CompressionModeTest.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4893464 + * @summary Tests bmp writer behavior with different compression modes + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.io.File; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.stream.ImageOutputStream; + +public class CompressionModeTest { + + public static void main(String args[]) { + int[] iModes = { ImageWriteParam.MODE_DISABLED, + ImageWriteParam.MODE_EXPLICIT, + ImageWriteParam.MODE_COPY_FROM_METADATA, + ImageWriteParam.MODE_DEFAULT }; + + String[] strModes = { "ImageWriteParam.MODE_DISABLED", + "ImageWriteParam.MODE_EXPLICIT", + "ImageWriteParam.MODE_COPY_FROM_METADATA", + "ImageWriteParam.MODE_DEFAULT" }; + + for(int i=0; i tests = null; + private static Color[] usedColors = new Color[] { Color.red, Color.green, Color.blue, Color.yellow, Color.white, Color.black }; + + private static final int TYPE_INT_GRB = 0x100; + private static final int TYPE_INT_GBR = 0x101; + private static final int TYPE_INT_RBG = 0x102; + private static final int TYPE_INT_BRG = 0x103; + private static final int TYPE_INT_555_GRB = 0x104; + private static final int TYPE_3BYTE_RGB = 0x105; + private static final int TYPE_3BYTE_GRB = 0x106; + + private static final int w = 300; + private static final int h = 200; + private static final int dx = w / usedColors.length; + + public static void main(String[] args) throws IOException { + initTests(); + + for (Integer type : tests.keySet()) { + new NoExtraBytesTest(type.intValue(), tests.get(type).intValue()).doTest(); + } + System.out.println("Test passed."); + } + + private static void initTests() { + tests = new Hashtable(); + + tests.put(new Integer(BufferedImage.TYPE_INT_RGB), new Integer(24)); + tests.put(new Integer(BufferedImage.TYPE_INT_BGR), new Integer(24)); + tests.put(new Integer(BufferedImage.TYPE_3BYTE_BGR), new Integer(24)); + tests.put(new Integer(TYPE_INT_GRB), new Integer(24)); + tests.put(new Integer(TYPE_INT_GBR), new Integer(24)); + tests.put(new Integer(TYPE_INT_RBG), new Integer(24)); + tests.put(new Integer(TYPE_INT_BRG), new Integer(24)); + tests.put(new Integer(BufferedImage.TYPE_USHORT_555_RGB), new Integer(16)); + tests.put(new Integer(BufferedImage.TYPE_USHORT_565_RGB), new Integer(16)); + tests.put(new Integer(TYPE_INT_555_GRB), new Integer(16)); + tests.put(new Integer(TYPE_3BYTE_RGB), new Integer(24)); + tests.put(new Integer(TYPE_3BYTE_GRB), new Integer(24)); + } + + private static String getImageTypeName(int t) { + switch(t) { + case BufferedImage.TYPE_INT_RGB: + return "TYPE_INT_RGB"; + case BufferedImage.TYPE_INT_BGR: + return "TYPE_INT_BGR"; + case BufferedImage.TYPE_3BYTE_BGR: + return "TYPE_3BYTE_BGR"; + case BufferedImage.TYPE_USHORT_555_RGB: + return "TYPE_USHORT_555_RGB"; + case BufferedImage.TYPE_USHORT_565_RGB: + return "TYPE_USHORT_565_RGB"; + case TYPE_INT_GRB: + return "TYPE_INT_GRB"; + case TYPE_INT_GBR: + return "TYPE_INT_GBR"; + case TYPE_INT_RBG: + return "TYPE_INT_RBG"; + case TYPE_INT_BRG: + return "TYPE_INT_BRG"; + case TYPE_INT_555_GRB: + return "TYPE_INT_555_GRB"; + case TYPE_3BYTE_RGB: + return "TYPE_3BYTE_RGB"; + case TYPE_3BYTE_GRB: + return "TYPE_3BYTE_GRB"; + default: + throw new IllegalArgumentException("Unknown image type: " + t); + } + } + private static BufferedImage createTestImage(int type) { + BufferedImage dst = null; + ColorModel colorModel = null; + WritableRaster raster = null; + ColorSpace cs = null; + System.out.println("Create image for " + getImageTypeName(type)); + switch(type) { + case TYPE_INT_GRB: + colorModel = new DirectColorModel(24, + 0x0000ff00, + 0x00ff0000, + 0x000000ff); + break; + case TYPE_INT_GBR: + colorModel = new DirectColorModel(24, + 0x000000ff, + 0x00ff0000, + 0x0000ff00); + break; + case TYPE_INT_RBG: + colorModel = new DirectColorModel(24, + 0x00ff0000, + 0x000000ff, + 0x0000ff00); + break; + case TYPE_INT_BRG: + colorModel = new DirectColorModel(24, + 0x0000ff00, + 0x000000ff, + 0x00ff0000); + break; + case TYPE_INT_555_GRB: + colorModel = new DirectColorModel(24, + 0x0000001F, + 0x000003e0, + 0x00007c00); + break; + case TYPE_3BYTE_RGB: + cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); + int[] nBits = {8, 8, 8}; + int[] bOffs = {0, 1, 2}; + colorModel = new ComponentColorModel(cs, nBits, false, false, + Transparency.OPAQUE, + DataBuffer.TYPE_BYTE); + raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, + w, h, + w*3, 3, + bOffs, null); + break; + case TYPE_3BYTE_GRB: + cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); + //nBits = {8, 8, 8}; + //bOffs = {0, 1, 2}; + colorModel = new ComponentColorModel(cs, new int[] { 8, 8, 8 }, false, false, + Transparency.OPAQUE, + DataBuffer.TYPE_BYTE); + raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, + w, h, + w*3, 3, + new int[] { 1, 0, 2}, null); + break; + default: + dst = new BufferedImage(w, h, type); + //colorModel = ImageTypeSpecifier.createFromBufferedImageType(type).getColorModel(); + } + + if (dst == null) { + if (raster == null) { + raster = colorModel.createCompatibleWritableRaster(w, h); + } + + dst = new BufferedImage(colorModel, raster, false, null); + } + Graphics g = dst.createGraphics(); + for (int i = 0; i < usedColors.length; i ++) { + g.setColor(usedColors[i]); + g.fillRect(i * dx, 0, dx, h); + } + g.dispose(); + + return dst; + } + + private BufferedImage src; + private int expectedColorDepth; + private int type; + + private IIOImage iio_dst; + + public NoExtraBytesTest(int type, int expectedColorDepth) { + this.type = type; + this.src = createTestImage(type); + this.expectedColorDepth = expectedColorDepth; + } + + public void doTest() throws IOException { + // write src as BMP + System.out.println("Test for image: " + getImageTypeName(type)); + System.out.println("image is " + src); + + File f = File.createTempFile("sizeTest_", ".bmp", new File(".")); + System.out.println("Use file " + f.getCanonicalPath()); + ImageIO.write(src, "BMP", f); + + //read it again + read(f); + + checkColorDepth(); + + checkImageContent(); + } + + private void read(File f) throws IOException { + ImageReader reader = ImageIO.getImageReadersByFormatName("BMP").next(); + + ImageInputStream iis = + ImageIO.createImageInputStream(new FileInputStream(f)); + + reader.setInput(iis); + + iio_dst = reader.readAll(0, reader.getDefaultReadParam()); + } + + private void checkColorDepth() { + IIOMetadata dst = iio_dst.getMetadata(); + + Node data = dst.getAsTree("javax_imageio_bmp_1.0"); + + Node n = data.getFirstChild(); + + while (n != null && !("BitsPerPixel".equals(n.getNodeName()))) { + System.out.println("Node " + n.getNodeName()); + n = n.getNextSibling(); + } + if (n == null) { + throw new RuntimeException("No BitsPerSample node!"); + } + + int bpp = 0; + String value = n.getNodeValue(); + System.out.println("value = " + value); + try { + bpp = Integer.parseInt(value); + } catch (NumberFormatException e) { + throw new RuntimeException("Wrong bpp value: " + value, e); + } + + if (bpp != this.expectedColorDepth) { + throw new RuntimeException("Wrong color depth: " + bpp + + " (should be " + this.expectedColorDepth + ")"); + } + } + + private void checkImageContent() { + BufferedImage dst = + (BufferedImage)iio_dst.getRenderedImage(); + int y = h / 2; + int x = dx / 2; + + for (int i = 0; i < usedColors.length; i++, x += dx) { + int srcRgb = src.getRGB(x, y); + int dstRgb = dst.getRGB(x, y); + int rgb = usedColors[i].getRGB(); + + if (dstRgb != srcRgb || dstRgb != rgb) { + throw new RuntimeException("Wrong color at [" + x + ", " + y + + "] " + Integer.toHexString(dstRgb) + + " (srcRgb=" + Integer.toHexString(srcRgb) + + ", original color is " + Integer.toHexString(rgb) + ")"); + } + + } + System.out.println("Image colors are OK."); + } +} diff --git a/jdk/test/javax/imageio/plugins/bmp/RLECompressionTest.java b/jdk/test/javax/imageio/plugins/bmp/RLECompressionTest.java new file mode 100644 index 00000000000..8efdd98a459 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/bmp/RLECompressionTest.java @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6332480 + * @summary Test verifies that images encoded as BMP with RLE4 or RLE8 + * compression type are read correctly + */ + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.awt.image.IndexColorModel; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageOutputStream; + +public class RLECompressionTest { + public static final int TEST_RLE8 = 0x01; + public static final int TEST_RLE4 = 0x02; + + private static Color[] usedColors = new Color[] { + Color.black, Color.white, Color.red, + Color.green, Color.blue, Color.yellow }; + + int w = 100; + // NB: problem occurs when image height > width + // The problem manifestation is that only first w + // lines of image are filled by decoded data, + // rest of image (all lines below (w-1)-th line) + // is leaved uninitialized (black). + // In order to verify that this problem is solved, + // we use image with height > width. + int h = 2 * w; + + private IndexColorModel getTestColorModel(int type) { + IndexColorModel icm = null; + int bpp = 8; + int size = 256; + + switch(type) { + case TEST_RLE8: + bpp = 8; + size = 256; + break; + case TEST_RLE4: + bpp = 4; + size = 16; + break; + default: + throw new IllegalArgumentException("Wrong test type: " + type); + } + + byte[] palette = new byte[size * 3]; + for (int i = 0; i < usedColors.length; i++) { + palette[3 * i] = (byte)(0xff & usedColors[i].getRed()); + palette[3 * i + 1] = (byte)(0xff & usedColors[i].getGreen()); + palette[3 * i + 2] = (byte)(0xff & usedColors[i].getBlue()); + } + // rest of palette is black + + icm = new IndexColorModel(bpp, size, palette, 0, false); + return icm; + } + + private BufferedImage getTestImage(int type) { + BufferedImage src = null; + IndexColorModel icm = getTestColorModel(type); + src = new BufferedImage(w, h, BufferedImage.TYPE_BYTE_INDEXED, icm); + Graphics2D g = src.createGraphics(); + g.setColor(Color.white); + g.fillRect(0, 0, w, h); + g.dispose(); + + return src; + } + + public void doTest(int type) throws IOException { + BufferedImage src = getTestImage(type); + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageOutputStream ios = ImageIO.createImageOutputStream(baos); + + ImageWriter writer = ImageIO.getImageWritersByFormatName("BMP").next(); + writer.setOutput(ios); + + ImageWriteParam wparam = writer.getDefaultWriteParam(); + wparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); + switch(type) { + case TEST_RLE8: + wparam.setCompressionType("BI_RLE8"); + break; + case TEST_RLE4: + wparam.setCompressionType("BI_RLE4"); + break; + default: + throw new IllegalArgumentException("Wrong test type: " + type); + } + + writer.write(null, new IIOImage(src, null, null), wparam); + + ios.close(); + baos.close(); + + // read result + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + + BufferedImage dst = ImageIO.read(bais); + + checkResult(src, dst); + } + + private void checkResult(BufferedImage src, BufferedImage dst) { + int x = w / 2; + for (int y = 0; y < h; y++) { + int srcRgb = src.getRGB(x, y); + int dstRgb = dst.getRGB(x, y); + + if (srcRgb != dstRgb) { + throw new RuntimeException("Test failed due to color difference: " + + Integer.toHexString(dstRgb) + " instead of " + Integer.toHexString(srcRgb) + + " at [" + x + ", " + y + "]"); + } + } + } + + public static void main(String[] args) throws IOException { + RLECompressionTest test = new RLECompressionTest(); + test.doTest(TEST_RLE8); + test.doTest(TEST_RLE4); + } +} diff --git a/jdk/test/javax/imageio/plugins/bmp/ReaderListenersTest.java b/jdk/test/javax/imageio/plugins/bmp/ReaderListenersTest.java new file mode 100644 index 00000000000..cfa621e818a --- /dev/null +++ b/jdk/test/javax/imageio/plugins/bmp/ReaderListenersTest.java @@ -0,0 +1,257 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4924507 + * @summary Test that listeners of bmp reader receive correct events in case of + * BI_JPEG and BI_PNG compression types + */ + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.event.IIOReadProgressListener; +import javax.imageio.event.IIOReadUpdateListener; + +public class ReaderListenersTest { + public static final String[] compTypes = { "BI_JPEG", "BI_PNG" }; + + public static void main(String[] args) { + for (int i=0; i< compTypes.length; i++) { + doTest(compTypes[i]); + } + } + + private static void doTest(String compression) { + try { + BufferedImage img = createTestImage(); + + ImageWriter iw = (ImageWriter) + ImageIO.getImageWritersByFormatName("bmp").next(); + if (iw == null) { + throw new RuntimeException("No writers for bmp format." + + " Test failed."); + } + + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + iw.setOutput(ImageIO.createImageOutputStream(baos)); + ImageWriteParam param = iw.getDefaultWriteParam(); + param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); + param.setCompressionType(compression); + + iw.write(null, new IIOImage(img, null, null), param); + baos.close(); + + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + + ImageReader ir = (ImageReader) + ImageIO.getImageReadersByFormatName("bmp").next(); + if (ir == null) { + throw new RuntimeException("No readers for bmp format." + + " Test failed."); + } + + IIOReadUpdateAdapter updateAdapter = new IIOReadUpdateAdapter(); + IIOReadProgressAdapter progressAdapter = new IIOReadProgressAdapter(); + ir.addIIOReadProgressListener(progressAdapter); + ir.addIIOReadUpdateListener(updateAdapter); + ir.setInput(ImageIO.createImageInputStream(bais)); + BufferedImage dst = ir.read(0); + + progressAdapter.checkResults(); + + if (!updateAdapter.isImageUpdateUsed) { + throw new RuntimeException("imageUpdate was not used." + + " Test failed."); + } + } catch(IOException e) { + e.printStackTrace(); + throw new RuntimeException("Test failed"); + } + } + + protected static BufferedImage createTestImage() { + BufferedImage res = new BufferedImage(100, 100, + BufferedImage.TYPE_INT_RGB); + Graphics2D g = res.createGraphics(); + g.setColor(Color.red); + g.fillRect(0,0, 100,100); + return res; + } + + static class IIOReadProgressAdapter implements IIOReadProgressListener { + List progress = new ArrayList(); + public boolean isTestPassed = false; + private boolean isImageStarted = false; + private boolean isImageComplete = false; + private boolean isSequenceComplete = false; + private boolean isSequenceStarted = false; + + public void imageComplete(ImageReader source) { + System.out.println("Image completed"); + if (!isImageComplete) { + isImageComplete = true; + } else { + throw new RuntimeException("The imageComplete() is called twice." + + " Test failed."); + } + checkProgress(); + } + + public void imageProgress(ImageReader source, float percentageDone) { + System.out.println("Image Progress "+percentageDone); + progress.add(new Float(percentageDone)); + } + + public void imageStarted(ImageReader source, int imageIndex) { + System.out.println("Image Started "+imageIndex); + if (!isImageStarted) { + isImageStarted = true; + } else { + throw new RuntimeException("The imageStarted() was called twice. " + + " Test failed."); + } + progress.clear(); + } + + public void thumbnailComplete(ImageReader source) { + System.out.println("Thubnail completed"); + } + + public void thumbnailProgress(ImageReader source, + float percentageDone) + { + System.out.println("Thubnail Progress " + percentageDone); + } + + public void thumbnailStarted(ImageReader source, + int imageIndex, int thumbnailIndex) + { + System.out.println("Thubnail started " + imageIndex); + } + + public void sequenceComplete(ImageReader source) { + if (!isSequenceComplete) { + isSequenceComplete = true; + } else { + throw new RuntimeException("The imageComplete() is called twice." + + " Test failed."); + } + } + + public void sequenceStarted(ImageReader source, int minIndex) { + if (!isSequenceStarted) { + isSequenceStarted = true; + } else { + throw new RuntimeException("The imageComplete() is called twice." + + " Test failed."); + } + } + + public void readAborted(ImageReader source) { + System.out.println("read Aborted"); + checkProgress(); + } + + private void checkProgress() { + Iterator i = progress.iterator(); + if (!i.hasNext()) { + throw new RuntimeException("progress values list is empty!"); + } + float val = ((Float)i.next()).floatValue(); + while(i.hasNext()) { + float next = ((Float)i.next()).floatValue(); + if (val >= next) { + throw new RuntimeException("progress values do not increase!"); + } + val = next; + } + isTestPassed = true; + System.out.println("Test passed."); + } + + public void checkResults() { + if (isImageStarted && !isImageComplete) { + throw new RuntimeException("The imageCompleted was not called." + + " Test failed."); + } + } + } + + static class IIOReadUpdateAdapter implements IIOReadUpdateListener { + boolean isImageUpdateUsed = false; + public void imageUpdate(ImageReader source, BufferedImage theImage, + int minX, int minY, int width, int height, + int periodX, int periodY, int[] bands) + { + System.out.println("imageUpdate"); + isImageUpdateUsed = true; + } + public void passComplete(ImageReader source, BufferedImage theImage) { + System.out.println("passComplete"); + } + public void passStarted(ImageReader source, BufferedImage theImage, + int pass, int minPass, int maxPass, + int minX, int minY, int periodX, int periodY, + int[] bands) + { + System.out.println("passStarted"); + } + public void thumbnailPassComplete(ImageReader source, + BufferedImage theThumbnail) + { + System.out.println("thumbnailPassComplete"); + } + public void thumbnailPassStarted(ImageReader source, + BufferedImage theThumbnail, + int pass, int minPass, int maxPass, + int minX, int minY, + int periodX, int periodY, + int[] bands) + { + System.out.println("thumbnailPassStarted"); + } + public void thumbnailUpdate(ImageReader source, + BufferedImage theThumbnail, + int minX, int minY, + int width, int height, + int periodX, int periodY, int[] bands) + { + System.out.println("thumbnailUpdate"); + } + } +} diff --git a/jdk/test/javax/imageio/plugins/bmp/RleEncodingTest.java b/jdk/test/javax/imageio/plugins/bmp/RleEncodingTest.java new file mode 100644 index 00000000000..ce3bd87f82f --- /dev/null +++ b/jdk/test/javax/imageio/plugins/bmp/RleEncodingTest.java @@ -0,0 +1,223 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4893446 + * @summary Tests that we get IOException if we try to encode the incompatible + * image with RLE compression + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.awt.image.IndexColorModel; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageInputStream; +import javax.imageio.stream.ImageOutputStream; + +public class RleEncodingTest { + + private static int testIdx = 1; + + public static void main(String args[]) throws Exception { + try { + int mode = ImageWriteParam.MODE_EXPLICIT; + String type = "BI_RLE4"; + doTest(type, mode); + + type = "BI_RLE8"; + doTest(type, mode); + + mode = ImageWriteParam.MODE_DEFAULT; + type = "BI_RLE4"; + doTest(type, mode); + + type = "BI_RLE8"; + doTest(type, mode); + + System.out.println("Test 4bpp image."); + encodeRLE4Test(); + + System.out.println("Test 8bpp image."); + encodeRLE8Test(); + } catch (IOException e) { + e.printStackTrace(); + throw new RuntimeException("Unexpected exception. Test failed"); + } + } + + private static void doTest(String compressionType, + int compressionMode) throws IOException + { + BufferedImage bimg = new BufferedImage(100, 100, + BufferedImage.TYPE_INT_RGB); + Graphics g = bimg.getGraphics(); + g.setColor(Color.green); + g.fillRect(0, 0, 100, 100); + + doTest(bimg, compressionType, compressionMode); + } + + private static void encodeRLE4Test() throws IOException { + // create 4bpp image + byte[] r = new byte[16]; + r[0] = (byte)0xff; + byte[] g = new byte[16]; + g[1] = (byte)0xff; + byte[] b = new byte[16]; + b[2] = (byte)0xff; + IndexColorModel icm = new IndexColorModel(4, 16, r, g, b); + + BufferedImage bimg = new BufferedImage(100, 100, + BufferedImage.TYPE_BYTE_BINARY, + icm); + + Graphics gr = bimg.getGraphics(); + gr.setColor(Color.green); + gr.fillRect(0, 0, 100, 100); + + doTest(bimg, "BI_RLE4", ImageWriteParam.MODE_EXPLICIT); + } + + private static void encodeRLE8Test() throws IOException { + // create 8bpp image + byte[] r = new byte[256]; + r[0] = (byte)0xff; + byte[] g = new byte[256]; + g[1] = (byte)0xff; + byte[] b = new byte[256]; + b[2] = (byte)0xff; + IndexColorModel icm = new IndexColorModel(8, 256, r, g, b); + + BufferedImage bimg = new BufferedImage(100, 100, + BufferedImage.TYPE_BYTE_INDEXED, + icm); + Graphics gr = bimg.getGraphics(); + gr.setColor(Color.green); + gr.fillRect(0, 0, 100, 100); + + doTest(bimg, "BI_RLE8", ImageWriteParam.MODE_EXPLICIT); + } + + private static void doTest(BufferedImage src, + String compressionType, + int compressionMode) throws IOException + { + + ImageWriter iw = (ImageWriter)ImageIO.getImageWritersBySuffix("bmp").next(); + if (iw == null) { + throw new RuntimeException("No available writer. Test failed."); + } + + IIOImage iioImg = new IIOImage(src, null, null); + ImageWriteParam param = iw.getDefaultWriteParam(); + + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageOutputStream ios = ImageIO.createImageOutputStream(baos); + iw.setOutput(ios); + + System.out.println("Compression Type is " + compressionType); + System.out.println("Compression Mode is " + compressionMode); + + param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); + param.setCompressionType(compressionType); + if (compressionMode != ImageWriteParam.MODE_EXPLICIT) { + param.setCompressionMode(compressionMode); + } + try { + iw.write(null, iioImg, param); + } catch (IOException e) { + int bpp = src.getColorModel().getPixelSize(); + if (compressionMode == ImageWriteParam.MODE_EXPLICIT) { + if ((compressionType.equals("BI_RLE4") && bpp != 4) + || (compressionType.equals("BI_RLE8") && bpp != 8)) + { + System.out.println("Can not encode "+ bpp+ "bpp image as" + + compressionType); + return; + } else { + throw new RuntimeException("Unable to encode " + + bpp + "bpp image as " + + compressionType + + ". Test failed"); + } + } + } + baos.close(); + + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + ImageInputStream iis = ImageIO.createImageInputStream(bais); + + BufferedImage dst = ImageIO.read(iis); + + int w = src.getWidth(); + int h = src.getHeight(); + + Object dstPixel = dst.getRaster().getDataElements(w/2, h/2, null); + Object srcPixel = src.getRaster().getDataElements(w/2, h/2, null); + + if ( (src.getColorModel().getRed(srcPixel) + != dst.getColorModel().getRed(dstPixel)) + || (src.getColorModel().getGreen(srcPixel) + != dst.getColorModel().getGreen(dstPixel)) + || (src.getColorModel().getBlue(srcPixel) + != dst.getColorModel().getBlue(dstPixel)) + || (src.getColorModel().getAlpha(srcPixel) + != dst.getColorModel().getAlpha(dstPixel)) ) { + + showPixel(src, w/2, h/2); + showPixel(dst, w/2, h/2); + + throw new RuntimeException( + "Colors are different: " + + Integer.toHexString(src.getColorModel().getRGB(srcPixel)) + + " and " + + Integer.toHexString(dst.getColorModel().getRGB(dstPixel))); + } + + } + + private static void showPixel(BufferedImage src, int x, int y) { + System.out.println("Img is " + src); + Object p = src.getRaster().getDataElements(x, y, null); + System.out.println("RGB: " + + Integer.toHexString(src.getColorModel().getRGB(p))); + System.out.println("Red: " + + Integer.toHexString(src.getColorModel().getRed(p))); + System.out.println("Green: " + + Integer.toHexString(src.getColorModel().getGreen(p))); + System.out.println("Blue: " + + Integer.toHexString(src.getColorModel().getBlue(p))); + System.out.println("Alpha: " + + Integer.toHexString(src.getColorModel().getAlpha(p))); + } +} diff --git a/jdk/test/javax/imageio/plugins/bmp/TestCompressionBI_BITFIELDS.java b/jdk/test/javax/imageio/plugins/bmp/TestCompressionBI_BITFIELDS.java new file mode 100644 index 00000000000..8bc03692a50 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/bmp/TestCompressionBI_BITFIELDS.java @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6297016 6294960 6294965 6294984 + * @summary Test verifies that buffered images are written correctly if + * compression BI_BITFIELDS is used + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.color.ColorSpace; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; + +public class TestCompressionBI_BITFIELDS { + + protected String format = "BMP"; + + protected ImageReader reader; + + protected ImageWriter writer; + + protected boolean doSave = true; + + Color[] colors = { + Color.red, Color.green, Color.blue, + Color.yellow, Color.white, Color.black}; + + int dx = 50; + int h = 200; + + public TestCompressionBI_BITFIELDS() { + this("BMP"); + } + + public TestCompressionBI_BITFIELDS(String format) { + this.format = format; + reader = ImageIO.getImageReadersByFormatName(format).next(); + writer = ImageIO.getImageWritersByFormatName(format).next(); + } + + protected ImageWriteParam prepareWriteParam(BufferedImage src) { + ImageWriteParam wparam = writer.getDefaultWriteParam(); + wparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); + wparam.setCompressionType("BI_BITFIELDS"); + + return wparam; + } + + public BufferedImage writeAndRead(BufferedImage src) throws IOException { + writer.reset(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + writer.setOutput(ImageIO.createImageOutputStream(baos)); + + ImageWriteParam wparam = prepareWriteParam(src); + + IIOImage img = new IIOImage(src, null, null); + + writer.write(null, img, wparam); + + if (doSave) { + // save images to file in order to be able to check + // that image is well-formed using standard windows tools. + File f = File.createTempFile("wr_test_", "." + format, new File(".")); + System.out.println("Save to file: " + f.getCanonicalPath()); + FileOutputStream fos = new FileOutputStream(f); + fos.write(baos.toByteArray()); + fos.flush(); + fos.close(); + } + + // read result + reader.reset(); + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + reader.setInput(ImageIO.createImageInputStream(bais)); + + return reader.read(0); + } + + public static void main(String[] args) throws IOException { + // buffered image types listed below can be saved as BI_BITFIELDS BMP + int[] types = {BufferedImage.TYPE_3BYTE_BGR, + BufferedImage.TYPE_USHORT_555_RGB, + BufferedImage.TYPE_USHORT_565_RGB, + BufferedImage.TYPE_BYTE_GRAY, + BufferedImage.TYPE_BYTE_BINARY, + BufferedImage.TYPE_BYTE_INDEXED, + BufferedImage.TYPE_INT_BGR, + BufferedImage.TYPE_INT_RGB}; + + for (int i = 0; i < types.length; i++) { + System.out.println("Test image " + types[i]); + TestCompressionBI_BITFIELDS t = new TestCompressionBI_BITFIELDS(); + + BufferedImage src = + t.createTestImage(types[i]); + System.out.println("Image for test: " + src); + System.out.println("SampleModel: " + src.getSampleModel()); + + BufferedImage dst = null; + try { + dst = t.writeAndRead(src); + } catch (IOException e) { + e.printStackTrace(System.out); + } + + + t.compareImages(src, dst); + } + } + + protected BufferedImage createTestImage(int type) { + BufferedImage bimg = new BufferedImage(dx * colors.length, h, type); + Graphics2D g = bimg.createGraphics(); + + for (int i = 0; i < colors.length; i++) { + g.setColor(colors[i]); + g.fillRect(dx * i, 0, dx, h); + } + return bimg; + } + + protected void compareImages(BufferedImage src, BufferedImage dst) { + ColorSpace srcCS = src.getColorModel().getColorSpace(); + ColorSpace dstCS = dst.getColorModel().getColorSpace(); + if (!srcCS.equals(dstCS) && srcCS.getType() == ColorSpace.TYPE_GRAY) { + System.out.println("Workaround color difference with GRAY."); + BufferedImage tmp = + new BufferedImage(src.getWidth(), src.getHeight(), + BufferedImage.TYPE_INT_RGB); + Graphics g = tmp.createGraphics(); + g.drawImage(src, 0, 0, null); + src = tmp; + } + int y = h / 2; + for (int i = 0; i < colors.length; i++) { + int x = dx * i + dx / 2; + int srcRgb = src.getRGB(x, y); + int dstRgb = dst.getRGB(x, y); + + if (srcRgb != dstRgb) { + throw new RuntimeException("Test failed due to color difference: " + + "src_pixel=" + Integer.toHexString(srcRgb) + + "dst_pixel=" + Integer.toHexString(dstRgb)); + } + } + } +} diff --git a/jdk/test/javax/imageio/plugins/bmp/Write3ByteBgrTest.java b/jdk/test/javax/imageio/plugins/bmp/Write3ByteBgrTest.java new file mode 100644 index 00000000000..056d1f2ee9c --- /dev/null +++ b/jdk/test/javax/imageio/plugins/bmp/Write3ByteBgrTest.java @@ -0,0 +1,228 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4892194 8014427 + * @summary Test checks that we able to encode TYPE_3BYTE_BGR images to bmp + * format. Test failed if ArrayIndexOutOfBoundsException will be thrown + * or pixel colors will be changed by the writing/reading. + */ + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.color.ColorSpace; +import java.awt.image.BufferedImage; +import java.awt.image.ColorModel; +import java.awt.image.ComponentColorModel; +import java.awt.image.DataBuffer; +import java.awt.image.Raster; +import java.awt.image.WritableRaster; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageOutputStream; +import javax.swing.JComponent; +import javax.swing.JFrame; + +public class Write3ByteBgrTest { + private static int width = 100; + private static int height = 100; + private static Color color = new Color(0x10, 0x20, 0x30); + + static int bufferedImageType[] = { + BufferedImage.TYPE_CUSTOM, + BufferedImage.TYPE_BYTE_BINARY, + BufferedImage.TYPE_3BYTE_BGR + }; + + static String bufferedImageStringType[] = { + "BufferedImage.TYPE_CUSTOM: test for BandedSampleModel", + "BufferedImage.TYPE_BYTE_BINARY", + "BufferedImage.TYPE_3BYTE_BGR" + }; + + private static String writingFormat = "BMP"; + private static ImageWriter writer = (ImageWriter)ImageIO.getImageWritersByFormatName(writingFormat).next(); + private int type; + + public static void main(String[] args) { + + //int i = 0; + for(int i=0; i= next) { + throw new RuntimeException("progress values do not increase!"); + } + val = next; + } + isTestPassed = true; + System.out.println("Test passed."); + } + } + +} diff --git a/jdk/test/javax/imageio/plugins/bmp/WritingColorChangeTest.java b/jdk/test/javax/imageio/plugins/bmp/WritingColorChangeTest.java new file mode 100644 index 00000000000..4747236b414 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/bmp/WritingColorChangeTest.java @@ -0,0 +1,194 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4892214 + * @summary Test checks that colors are not changed by the writing/reading in + * the BMP format for TYPE_INT_BGR and TYPE_USHORT_555_RGB buffered + * images + */ + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageOutputStream; +import javax.swing.JComponent; +import javax.swing.JFrame; + +public class WritingColorChangeTest { + private static int width = 100; + private static int height = 100; + private static Color color = new Color(0x10, 0x20, 0x30); + + static int bufferedImageType[] = { + BufferedImage.TYPE_USHORT_565_RGB, + BufferedImage.TYPE_INT_BGR, + BufferedImage.TYPE_INT_RGB, + BufferedImage.TYPE_USHORT_555_RGB, + }; + + static String bufferedImageStringType[] = { + "BufferedImage.TYPE_USHORT_565_RGB", + "BufferedImage.TYPE_INT_BGR", + "BufferedImage.TYPE_INT_RGB", + "BufferedImage.TYPE_USHORT_555_RGB", + }; + private static String writingFormat = "BMP"; + private static ImageWriter writer = (ImageWriter)ImageIO.getImageWritersByFormatName(writingFormat).next(); + private int type; + + public static void main(String[] args) { + + //int i = 7; //3; //7; + for(int i=0; i 0) { + int x = rnd.nextInt(w); + int y = rnd.nextInt(h); + + int pSrc = src.getRGB(x, y); + int pDst = src.getRGB(x, y); + + if (pSrc != pDst) { + throw new RuntimeException("Images are different"); + } + } + } + + public static void main(String[] args) { + IndexingTest t = new IndexingTest(); + t.doTest(); + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/LogicalScreenDimensionTest.java b/jdk/test/javax/imageio/plugins/gif/LogicalScreenDimensionTest.java new file mode 100644 index 00000000000..d32c4b9c93b --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/LogicalScreenDimensionTest.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6307618 + * @summary Test verifies that GIF image writer updates the dimension of the + * logical screen according to image dimension + * @modules java.desktop/com.sun.imageio.plugins.gif + */ + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.stream.ImageInputStream; +import javax.imageio.stream.ImageOutputStream; + +import com.sun.imageio.plugins.gif.GIFStreamMetadata; + +public class LogicalScreenDimensionTest { + public static void main(String[] args) throws IOException { + String format = "GIF"; + ImageWriter writer = + ImageIO.getImageWritersByFormatName(format).next(); + if (writer == null) { + throw new RuntimeException("No available writers for " + format); + } + + BufferedImage img = createTestImage(100, 100, BufferedImage.TYPE_BYTE_GRAY); + + ImageWriteParam p = writer.getDefaultWriteParam(); + ImageTypeSpecifier type = + ImageTypeSpecifier.createFromRenderedImage(img); + IIOMetadata inImageMetadata = + writer.getDefaultImageMetadata(type, p); + + IIOMetadata inStreamMetadata = writer.getDefaultStreamMetadata(p); + + // write and read image + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + ImageOutputStream ios = ImageIO.createImageOutputStream(baos); + writer.setOutput(ios); + + writer.write(inStreamMetadata, new IIOImage(img, null, inImageMetadata), p); + + ios.flush(); + ios.close(); + + // read result + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + ImageInputStream iis = ImageIO.createImageInputStream(bais); + ImageReader reader = ImageIO.getImageReader(writer); + reader.setInput(iis); + + IIOMetadata outStreamMetadata = reader.getStreamMetadata(); + + GIFStreamMetadata gifStreamMetadata = (GIFStreamMetadata)outStreamMetadata; + + if (gifStreamMetadata.logicalScreenWidth != img.getWidth() || + gifStreamMetadata.logicalScreenHeight != img.getHeight()) { + throw new RuntimeException("Test failed due to wrong logical screen dimension."); + } + } + + private static BufferedImage createTestImage(int w, int h, int type) { + BufferedImage res = new BufferedImage(w, h, type); + Graphics2D g = res.createGraphics(); + g.setColor(Color.white); + g.fillRect(0, 0, w, h); + g.setColor(Color.black); + g.fillRect(w/4, h/4, w/2, h/2); + + + return res; + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/OddPaletteTest.java b/jdk/test/javax/imageio/plugins/gif/OddPaletteTest.java new file mode 100644 index 00000000000..6ca97656d0a --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/OddPaletteTest.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6275211 6276621 + * @summary Tests that GIF writer plugin is able to write indexed images if + * palette size is not a power of two + */ + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.awt.image.IndexColorModel; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageOutputStream; + +public class OddPaletteTest { + + private static int w = 100; + private static int h = 100; + + public static void main(String[] args) { + BufferedImage[] srcs = new BufferedImage[2]; + srcs[0] = createTestImage(7); // bug 6275211 + srcs[1] = createTestImage(1); // bug 6276621 + + for (int i = 0; i < srcs.length; i++) { + doTest(srcs[i]); + } + } + + private static void doTest(BufferedImage src) { + ImageWriter w = ImageIO.getImageWritersByFormatName("GIF").next(); + if (w == null) { + throw new RuntimeException("No writer available!"); + } + + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageOutputStream ios = ImageIO.createImageOutputStream(baos); + w.setOutput(ios); + w.write(src); + } catch (IOException e) { + throw new RuntimeException("Test failed.", e); + } catch (IllegalArgumentException e) { + throw new RuntimeException("Test failed.", e); + } + } + + private static BufferedImage createTestImage(int paletteSize) { + byte[] r = new byte[paletteSize]; + byte[] g = new byte[paletteSize]; + byte[] b = new byte[paletteSize]; + + int shift = 256 / paletteSize; + for (int i = 0; i < paletteSize; i++) { + r[i] = g[i] = b[i] = (byte)(shift * i); + } + + int numBits = getNumBits(paletteSize); + + System.out.println("num of bits " + numBits); + + IndexColorModel icm = + new IndexColorModel(numBits, paletteSize, r, g, b); + + BufferedImage img = new BufferedImage(w, h, + BufferedImage.TYPE_BYTE_INDEXED, + icm); + Graphics2D g2d = img.createGraphics(); + g2d.setColor(Color.white); + g2d.fillRect(0, 0, w, h); + g2d.setColor(Color.black); + g2d.drawLine(0, 0, w, h); + g2d.drawLine(0, h, w, 0); + + return img; + } + + private static int getNumBits(int paletteSize) { + if (paletteSize < 0) { + throw new IllegalArgumentException("negative palette size: " + + paletteSize); + } + if (paletteSize < 2) { + return 1; + } + int numBits = 0; + + paletteSize--; + + while (paletteSize > 0) { + numBits++; + paletteSize = paletteSize >> 1; + } + return numBits; + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/PrepareWriteSequenceTest.java b/jdk/test/javax/imageio/plugins/gif/PrepareWriteSequenceTest.java new file mode 100644 index 00000000000..9acac92c2ff --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/PrepareWriteSequenceTest.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6284538 + * @summary Test verifies whether IllegalStateException is thrown if the output + * stream have not set to the GIF image writer instance + */ + +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOMetadata; + +public class PrepareWriteSequenceTest { + public static void main(String[] args) throws IOException { + String format = "GIF"; + ImageWriter writer = ImageIO.getImageWritersByFormatName(format).next(); + + ImageWriteParam param = writer.getDefaultWriteParam(); + + IIOMetadata streamMetadata = writer.getDefaultStreamMetadata(param); + + boolean gotException = false; + try { + writer.prepareWriteSequence(streamMetadata); + } catch (IllegalStateException e) { + gotException = true; + System.out.println("Test passed."); + e.printStackTrace(System.out); + } + + if (!gotException) { + throw new RuntimeException("Test failed."); + } + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/RGBAnimationTest.java b/jdk/test/javax/imageio/plugins/gif/RGBAnimationTest.java new file mode 100644 index 00000000000..485b90b0208 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/RGBAnimationTest.java @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6324581 + * @summary Test verifies that RGB images are written to animated GIF image use + * local color table if image palette is not equals to the global color + * table + * @modules java.desktop/com.sun.imageio.plugins.gif + */ + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.stream.ImageOutputStream; + +import com.sun.imageio.plugins.gif.GIFImageMetadata; + +public class RGBAnimationTest { + protected static String format = "GIF"; + protected static boolean doSave = true; + + Frame[] frames; + ImageWriter writer; + ImageReader reader; + + public static void main(String[] args) throws IOException { + RGBAnimationTest test = new RGBAnimationTest(); + test.doTest(); + } + /** Creates a new instance of RGBAnimationTest */ + public RGBAnimationTest() { + frames = new Frame[4]; + + + frames[0] = new Frame(new Color[] {Color.red, Color.green}); + frames[1] = new Frame(new Color[] {Color.green, Color.cyan}); + frames[2] = new Frame(new Color[] {Color.cyan, Color.yellow}); + frames[3] = new Frame(new Color[] {Color.yellow, Color.red}); + + writer = ImageIO.getImageWritersByFormatName(format).next(); + reader = ImageIO.getImageReadersByFormatName(format).next(); + } + + public void doTest() throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + writer.reset(); + ImageOutputStream ios = ImageIO.createImageOutputStream(baos); + writer.setOutput(ios); + + ImageWriteParam wparam = prepareWriteParam(); + + IIOMetadata streamMetadata = prepareStreamMetadata(wparam); + + writer.prepareWriteSequence(streamMetadata); + + for (int i = 0; i < frames.length; i++) { + BufferedImage src = frames[i].getImage(); + IIOMetadata imageMetadata = prepareImageMetadata(i, src, wparam); + IIOImage img = new IIOImage(src, null, imageMetadata); + + writer.writeToSequence(img, wparam); + } + writer.endWriteSequence(); + ios.flush(); + ios.close(); + + if (doSave) { + File f = File.createTempFile("wr_test_", "." + format, new File(".")); + System.out.println("Save to file: " + f.getCanonicalPath()); + FileOutputStream fos = new FileOutputStream(f); + fos.write(baos.toByteArray()); + fos.flush(); + fos.close(); + } + // read result + reader.reset(); + ByteArrayInputStream bais = + new ByteArrayInputStream(baos.toByteArray()); + reader.setInput(ImageIO.createImageInputStream(bais)); + + int minIndex = reader.getMinIndex(); + int numImages = reader.getNumImages(true); + + for (int i = 0; i < numImages; i++) { + BufferedImage dst = reader.read(i + minIndex); + frames[i].checkResult(dst); + } + } + + protected IIOMetadata prepareImageMetadata(int i, BufferedImage img, ImageWriteParam wparam) { + GIFImageMetadata idata = (GIFImageMetadata) + writer.getDefaultImageMetadata(ImageTypeSpecifier.createFromRenderedImage(img), wparam); + + idata.delayTime = 100; + idata.disposalMethod = 0; + idata.transparentColorFlag = false; + + if (i == 0) { + ArrayList appIDs = new ArrayList(); + appIDs.add(new String("NETSCAPE").getBytes()); + ArrayList authCodes = new ArrayList(); + authCodes.add(new String("2.0").getBytes()); + ArrayList appData = new ArrayList(); + byte[] authData = {1, 0, 0}; + appData.add(authData); + + idata.applicationIDs = appIDs; + idata.authenticationCodes = authCodes; + idata.applicationData = appData; + } + return idata; + } + + protected ImageWriteParam prepareWriteParam() { + return writer.getDefaultWriteParam(); + } + + protected IIOMetadata prepareStreamMetadata(ImageWriteParam wparam) { + return writer.getDefaultStreamMetadata(wparam); + } + +} + +class Frame { + protected static int type = BufferedImage.TYPE_INT_RGB; + protected static int dx = 100; + protected static int h = 100; + + protected Color[] colors; + protected BufferedImage img; + + public Frame(Color[] colors) { + this.colors = colors; + img = null; + } + + public BufferedImage getImage() { + if (img == null) { + img = new BufferedImage(dx * colors.length, h, type); + Graphics2D g = img.createGraphics(); + for (int i = 0; i < colors.length; i++) { + g.setColor(colors[i]); + g.fillRect(dx * i, 0, dx, h); + } + } + return img; + } + + public void checkResult(BufferedImage dst) { + int y = h / 2; + int x = dx / 2; + for (int i = 0; i < colors.length; i++) { + + int srcRgb = img.getRGB(i * dx + x, y); + int dstRgb = dst.getRGB(i * dx + x, y); + + if (srcRgb != dstRgb) { + throw new RuntimeException("Test failed due to color difference: " + + Integer.toHexString(dstRgb) + " instead of " + + Integer.toHexString(srcRgb)); + } + } + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/RGBImageTest.java b/jdk/test/javax/imageio/plugins/gif/RGBImageTest.java new file mode 100644 index 00000000000..42c48372d2f --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/RGBImageTest.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6286578 + * @summary Test verifies that RGB images does not convert to gray-scaled if + * default image metadata is used + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.stream.ImageInputStream; +import javax.imageio.stream.ImageOutputStream; + +public class RGBImageTest { + + Color[] usedColors = { + Color.red, Color.green, Color.blue, Color.yellow, + Color.cyan, Color.magenta, Color.white, Color.black }; + + BufferedImage src = null; + int dx= 20; + int height = 100; + + protected BufferedImage getSrc() { + if (src == null) { + src = new BufferedImage(dx * usedColors.length, height, + BufferedImage.TYPE_INT_RGB); + Graphics g = src.createGraphics(); + for (int i = 0; i < usedColors.length; i++) { + g.setColor(usedColors[i]); + g.fillRect(dx * i, 0, dx, height); + } + } + return src; + } + + protected void doTest() throws IOException { + BufferedImage biSrc = getSrc(); + + ImageWriter writer = ImageIO.getImageWritersByFormatName("GIF").next(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageOutputStream ios = ImageIO.createImageOutputStream(baos); + writer.setOutput(ios); + + ImageWriteParam writeParam = writer.getDefaultWriteParam(); + IIOMetadata imageMetadata = + writer.getDefaultImageMetadata(new ImageTypeSpecifier(biSrc), writeParam); + + IIOMetadata streamMetadata = writer.getDefaultStreamMetadata(writeParam); + + IIOImage iioImg = new IIOImage(biSrc, null, imageMetadata); + writer.write(streamMetadata, iioImg, writeParam); + ios.close(); + + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + ImageInputStream iis = ImageIO.createImageInputStream(bais); + ImageReader reader = ImageIO.getImageReader(writer); + reader.setInput(iis); + BufferedImage dst = reader.read(0); + + // do test + int x = dx / 2; + int y = height / 2; + + for (int i = 0; i < usedColors.length; i++) { + int dstRgb = dst.getRGB(x, y); + System.out.println("dstColor: " + Integer.toHexString(dstRgb)); + int srcRgb = usedColors[i].getRGB(); + System.out.println("srcColor: " + Integer.toHexString(srcRgb)); + if (dstRgb != srcRgb) { + throw new RuntimeException("wrong color " + i + ": " + Integer.toHexString(dstRgb)); + } + x += dx; + } + + } + + public static void main(String[] args) throws IOException { + RGBImageTest t = new RGBImageTest(); + t.doTest(); + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/StreamMetadataTest.java b/jdk/test/javax/imageio/plugins/gif/StreamMetadataTest.java new file mode 100644 index 00000000000..9265510d798 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/StreamMetadataTest.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6319418 + * @summary Test verifies that GIF stream metadata could be merged with tree + * representation for all supported formats + */ + +import javax.imageio.ImageIO; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOInvalidTreeException; +import javax.imageio.metadata.IIOMetadata; + +import org.w3c.dom.Node; + +public class StreamMetadataTest { + protected static final String format = "GIF"; + + ImageWriter writer = null; + IIOMetadata streamData = null; + ImageWriteParam wparam = null; + boolean doMerge = true; + + public StreamMetadataTest() { + writer = ImageIO.getImageWritersByFormatName(format).next(); + wparam = writer.getDefaultWriteParam(); + streamData = writer.getDefaultStreamMetadata(wparam); + } + + public void doTest() throws IIOInvalidTreeException { + if (streamData == null) { + throw new RuntimeException("No stream metadata available"); + } + + String[] formatNames = streamData.getMetadataFormatNames(); + for(String fname : formatNames) { + System.out.println("Format name: " + fname); + Node root = streamData.getAsTree(fname); + if (streamData.isReadOnly()) { + throw new RuntimeException("Stream metadata is readonly!"); + } + streamData.reset(); + streamData.mergeTree(fname, root); + } + } + + public static void main(String args[]) { + StreamMetadataTest test = new StreamMetadataTest(); + try { + test.doTest(); + } catch (Exception e) { + throw new RuntimeException("Test failed.", e); + } + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/TransparencyTest.java b/jdk/test/javax/imageio/plugins/gif/TransparencyTest.java new file mode 100644 index 00000000000..401e7ec1f68 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/TransparencyTest.java @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4339415 + * @summary Tests that GIF writer plugin is able to write images with BITMASK + * transparency + */ + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.awt.image.IndexColorModel; +import java.awt.image.WritableRaster; +import java.io.File; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.ImageWriter; + +public class TransparencyTest { + + protected static final String fname = "ttest.gif"; + protected BufferedImage src; + protected BufferedImage dst; + + public static void main(String[] args) { + System.out.println("Test indexed image..."); + IndexColorModel icm = createIndexedBitmaskColorModel(); + BufferedImage img = createIndexedImage(200, 200, icm); + TransparencyTest t = new TransparencyTest(img); + + try { + t.doTest(); + } catch (Exception e) { + throw new RuntimeException("Test failed!", e); + } + System.out.println("Test passed."); + } + + protected TransparencyTest(BufferedImage src) { + this.src = src; + } + + protected void doTest() throws IOException { + int w = src.getWidth(); + int h = src.getHeight(); + + System.out.println("Write image..."); + try { + ImageWriter writer = + ImageIO.getImageWritersByFormatName("GIF").next(); + writer.setOutput(ImageIO.createImageOutputStream(new File(fname))); + writer.write(src); + } catch (Exception e) { + throw new RuntimeException("Test failed.", e); + } + System.out.println("Read image...."); + dst = ImageIO.read(new File(fname)); + + BufferedImage tmp = new BufferedImage(w, 2 * h, + BufferedImage.TYPE_INT_ARGB); + Graphics2D g = tmp.createGraphics(); + g.setColor(Color.pink); + g.fillRect(0, 0, tmp.getWidth(), tmp.getHeight()); + + g.drawImage(src, 0, 0, null); + g.drawImage(dst, 0, h, null); + + int width = w / 8; + int x = 5 * width + width / 2; + for (int y = 0; y < h; y++) { + int argb = tmp.getRGB(x, y); + if (Color.pink.getRGB() != argb) { + throw new RuntimeException("Bad color at " + x + "," + y + + " - " + Integer.toHexString(argb)); + } + } + } + + protected static BufferedImage createIndexedImage(int w, int h, + IndexColorModel icm) + { + BufferedImage img = new BufferedImage(w, h, + BufferedImage.TYPE_BYTE_INDEXED, + icm); + + int mapSize = icm.getMapSize(); + int width = w / mapSize; + + WritableRaster wr = img.getRaster(); + for (int i = 0; i < mapSize; i++) { + for (int y = 0; y < h; y++) { + for (int x = 0; x < width; x++) { + wr.setSample(i * width + x, y, 0, i); + } + } + } + return img; + } + + protected static IndexColorModel createIndexedBitmaskColorModel() { + int paletteSize = 8; + byte[] red = new byte[paletteSize]; + byte[] green = new byte[paletteSize]; + byte[] blue = new byte[paletteSize]; + + red[0] = (byte)0xff; green[0] = (byte)0x00; blue[0] = (byte)0x00; + red[1] = (byte)0x00; green[1] = (byte)0xff; blue[1] = (byte)0x00; + red[2] = (byte)0x00; green[2] = (byte)0x00; blue[2] = (byte)0xff; + red[3] = (byte)0xff; green[3] = (byte)0xff; blue[3] = (byte)0xff; + red[4] = (byte)0x00; green[4] = (byte)0x00; blue[4] = (byte)0x00; + red[5] = (byte)0x80; green[5] = (byte)0x80; blue[5] = (byte)0x80; + red[6] = (byte)0xff; green[6] = (byte)0xff; blue[6] = (byte)0x00; + red[7] = (byte)0x00; green[7] = (byte)0xff; blue[7] = (byte)0xff; + + int numBits = 3; + + IndexColorModel icm = new IndexColorModel(numBits, paletteSize, + red, green, blue, 5); + + return icm; + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/UshortOutOfMemoryTest.java b/jdk/test/javax/imageio/plugins/gif/UshortOutOfMemoryTest.java new file mode 100644 index 00000000000..dcd3750965d --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/UshortOutOfMemoryTest.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6294363 + * @summary Test verifies that creation of tree representation of the native + * image metadata for USHORT_GRAY images does not cause the + * OutOfMemoryError + * @run main/othervm -Xms32M -Xmx32M UshortOutOfMemoryTest + */ + +import java.awt.image.BufferedImage; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOMetadata; + +public class UshortOutOfMemoryTest { + private int type; + private ImageWriter w; + + public UshortOutOfMemoryTest(int type) { + this.type = type; + w = ImageIO.getImageWritersByFormatName("GIF").next(); + } + + public void testGetAsTree() { + ImageWriteParam p = w.getDefaultWriteParam(); + IIOMetadata m = + w.getDefaultImageMetadata(ImageTypeSpecifier.createFromBufferedImageType(type), p); + + String format = m.getNativeMetadataFormatName(); + System.out.println("native format: " + format); + + int count = 0; + try { + while (count < 100) { + System.out.println(" test " + count++); + m.getAsTree(format); + } + } catch (OutOfMemoryError e) { + System.gc(); + throw new RuntimeException("Test failed. Number of performed operations: " + count, e); + } + } + + + public static void main(String[] args) throws IOException { + UshortOutOfMemoryTest t = new UshortOutOfMemoryTest( + BufferedImage.TYPE_USHORT_GRAY); + t.testGetAsTree(); + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/WriteMetadataTest.java b/jdk/test/javax/imageio/plugins/gif/WriteMetadataTest.java new file mode 100644 index 00000000000..23960895397 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/WriteMetadataTest.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6287880 + * @summary Test verifies that default metadata for stream and image returned by + * GIFImageWriter can be modified by the tree representation + */ + +import java.awt.image.BufferedImage; + +import javax.imageio.ImageIO; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOInvalidTreeException; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.metadata.IIOMetadataNode; + +public class WriteMetadataTest { + private static String format = "GIF"; + + public static void main(String[] args) { + ImageWriter w = ImageIO.getImageWritersByFormatName(format).next(); + if (w == null) { + throw new RuntimeException("No available writers for format " + format); + } + ImageWriteParam p = w.getDefaultWriteParam(); + + ImageTypeSpecifier t = + ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB); + + IIOMetadata m = w.getDefaultImageMetadata(t, p); + System.out.println("Default image metadata is " + m); + testWritableMetadata(m); + + IIOMetadata sm = w.getDefaultStreamMetadata(p); + System.out.println("Default stream metadata is " + sm); + testWritableMetadata(sm); + } + + public static void testWritableMetadata(IIOMetadata m) { + String nativeFormatName = + m.getNativeMetadataFormatName(); + System.out.println("Format: " + nativeFormatName); + IIOMetadataNode root = (IIOMetadataNode)m.getAsTree(nativeFormatName); + if (m.isReadOnly()) { + throw new RuntimeException("Metadata is read only!"); + } + try { + m.setFromTree(nativeFormatName, root); + } catch (IIOInvalidTreeException e) { + e.printStackTrace(); + throw new RuntimeException("Test failed!", e); + } catch (IllegalStateException e) { + throw new RuntimeException("Test failed!", e); + } + System.out.println("Test passed.\n\n"); + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/WriterResetTest.java b/jdk/test/javax/imageio/plugins/gif/WriterResetTest.java new file mode 100644 index 00000000000..e93c1db48c3 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/WriterResetTest.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6275251 + * @summary Verifies that GIF image writer throws IllegalStateException if + * assigned output stream was cleared by reset() method + */ + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageOutputStream; + +public class WriterResetTest { + public static void main(String[] args) throws IOException { + ImageWriter w = ImageIO.getImageWritersByFormatName("GIF").next(); + if (w == null) { + throw new RuntimeException("No writers available!"); + } + + ByteArrayOutputStream baos = + new ByteArrayOutputStream(); + + ImageOutputStream ios = + ImageIO.createImageOutputStream(baos); + + w.setOutput(ios); + + BufferedImage img = createTestImage(); + + try { + w.reset(); + w.write(img); + } catch (IllegalStateException e) { + System.out.println("Test passed"); + } catch (Throwable e) { + throw new RuntimeException("Test failed", e); + } + } + + private static BufferedImage createTestImage() { + BufferedImage img = new BufferedImage(100, 100, + BufferedImage.TYPE_INT_RGB); + Graphics2D g = img.createGraphics(); + g.setColor(Color.white); + g.fillRect(0, 0, 100, 100); + g.setColor(Color.black); + g.fillRect(20, 20, 60, 60); + + return img; + } +} diff --git a/jdk/test/javax/imageio/plugins/gif/WriterReuseTest.java b/jdk/test/javax/imageio/plugins/gif/WriterReuseTest.java new file mode 100644 index 00000000000..0e7d64d457f --- /dev/null +++ b/jdk/test/javax/imageio/plugins/gif/WriterReuseTest.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6283089 + * @summary Test verifies that abort flag is cleared by the next write() call + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.event.IIOWriteProgressListener; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.stream.ImageOutputStream; + +public class WriterReuseTest implements IIOWriteProgressListener { + + boolean isFirst = true; + boolean isWritingCompleted = false; + boolean isWritingAborted = false; + + public static void main(String[] args) throws IOException { + doTest(false); + doTest(true); + } + + public static void doTest(boolean writeSequence) throws IOException { + String format = "GIF"; + ImageWriter writer = + ImageIO.getImageWritersByFormatName(format).next(); + if (writer == null) { + throw new RuntimeException("No writer available for " + format); + } + + BufferedImage img = createTestImage(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageOutputStream ios = ImageIO.createImageOutputStream(baos); + writer.setOutput(ios); + + WriterReuseTest t = new WriterReuseTest(); + writer.addIIOWriteProgressListener(t); + + ImageWriteParam param = writer.getDefaultWriteParam(); + IIOMetadata streamMetadata = writer.getDefaultStreamMetadata(param); + IIOImage iioImg = new IIOImage(img, null, null); + if (writeSequence) { + writer.prepareWriteSequence(streamMetadata); + writer.writeToSequence(iioImg, param); + } else { + writer.write(img); + } + + if (!t.isWritingAborted || t.isWritingCompleted) { + throw new RuntimeException("Test failed."); + } + t.reset(); + + // next attempt after abort + ImageOutputStream ios2 = + ImageIO.createImageOutputStream(new ByteArrayOutputStream()); + writer.setOutput(ios2); + if (writeSequence) { + writer.writeToSequence(iioImg, param); + } else { + writer.write(img); + } + + if (t.isWritingAborted || !t.isWritingCompleted) { + throw new RuntimeException("Test failed."); + } + System.out.println("Test passed."); + } + + public static BufferedImage createTestImage() { + BufferedImage img = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED); + Graphics g = img.createGraphics(); + g.setColor(Color.black); + g.fillRect(0, 0, 100, 100); + + g.setColor(Color.white); + g.fillRect(10, 10, 80, 80); + + return img; + } + + public WriterReuseTest() { + isFirst = true; + reset(); + } + + public void reset() { + isWritingAborted = false; + isWritingCompleted = false; + } + + public void imageComplete(ImageWriter source) { + System.out.println("Image Completed"); + this.isWritingCompleted = true; + } + + public void imageProgress(ImageWriter source, float percentageDone) { + System.out.println("Image Progress "+percentageDone); + if (percentageDone > 50 && isFirst) { + isFirst = false; + source.abort(); + } + } + + public void imageStarted(ImageWriter source, int imageIndex) { + System.out.println("Image Started "+imageIndex); + } + + public void thumbnailComplete(ImageWriter source) { + System.out.println("Thubnail completed"); + } + + public void thumbnailProgress(ImageWriter source, float percentageDone) { + System.out.println("Thubnail Progress " + percentageDone); + } + + public void thumbnailStarted(ImageWriter source, int imageIndex, int thumbnailIndex) { + System.out.println("Thubnail started " + imageIndex); + } + + public void writeAborted(ImageWriter source) { + System.out.println("Writing Aborted"); + this.isWritingAborted = true; + } +} diff --git a/jdk/test/javax/imageio/plugins/jpeg/ByteBinaryTest.java b/jdk/test/javax/imageio/plugins/jpeg/ByteBinaryTest.java new file mode 100644 index 00000000000..e34b89f9a46 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/jpeg/ByteBinaryTest.java @@ -0,0 +1,93 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4450894 + * @summary Tests if the JPEG writer properly encodes IndexColorModel images + * that contain less than 8-bit indices (such as TYPE_BYTE_BINARY) + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.ImageIO; + +public class ByteBinaryTest { + + private static final int[] expectedVals = + { 0xffffffff, 0xff000000, 0xffffffff }; + + public static void main(String[] args) { + BufferedImage bi = new BufferedImage(100, 100, + BufferedImage.TYPE_BYTE_BINARY); + + Graphics g = bi.createGraphics(); + g.setColor(Color.white); + g.fillRect(0, 0, 100, 100); + g.setColor(Color.black); + g.fillRect(20, 20, 40, 40); + g.setColor(Color.white); + g.fillRect(25, 25, 25, 25); + g.dispose(); + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + boolean success; + + try { + success = ImageIO.write(bi, "jpeg", baos); + } catch (IOException ioe) { + throw new RuntimeException("Could not write JPEG to stream"); + } + + if (!success) { + throw new RuntimeException("Could not find valid JPEG writer..."); + } + + byte[] bytearr = baos.toByteArray(); + ByteArrayInputStream bais = new ByteArrayInputStream(bytearr); + BufferedImage bi2 = null; + + try { + bi2 = ImageIO.read(bais); + } catch (IOException ioe) { + throw new RuntimeException("Could not read JPEG stream"); + } + + int[] actualVals = new int[3]; + + actualVals[0] = bi2.getRGB(27, 5); + actualVals[1] = bi2.getRGB(27, 22); + actualVals[2] = bi2.getRGB(35, 35); + + for (int i = 0; i < actualVals.length; i++) { + if (actualVals[i] != expectedVals[i]) { + throw new RuntimeException("Pixel mismatch at index: " + i); + } + } + } +} diff --git a/jdk/test/javax/imageio/plugins/jpeg/CanEncodeIndexed.java b/jdk/test/javax/imageio/plugins/jpeg/CanEncodeIndexed.java new file mode 100644 index 00000000000..bf7473e4c00 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/jpeg/CanEncodeIndexed.java @@ -0,0 +1,55 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4528585 + * @summary Tests whether the JPEGImageWriterSpi advertises that it is capable + * of writing images using an IndexColorModel. The test fails if an + * exception is thrown. + */ + +import java.awt.image.BufferedImage; +import java.util.Iterator; + +import javax.imageio.ImageIO; +import javax.imageio.ImageTypeSpecifier; + +public class CanEncodeIndexed { + + public static void main(String[] args) { + BufferedImage img = new BufferedImage(32, 32, + BufferedImage.TYPE_BYTE_INDEXED); + + ImageTypeSpecifier spec = + ImageTypeSpecifier.createFromRenderedImage(img); + + Iterator writers = ImageIO.getImageWriters(spec, "jpeg"); + + if (!writers.hasNext()) { + throw new RuntimeException("Test failed: " + + "no JPEG writer found for " + + "image with IndexColorModel"); + } + } +} diff --git a/jdk/test/javax/imageio/plugins/jpeg/CompressionBug.java b/jdk/test/javax/imageio/plugins/jpeg/CompressionBug.java new file mode 100644 index 00000000000..073d989bac2 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/jpeg/CompressionBug.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4415068 4622201 + * @summary Tests if the JPEG writer responds to the compression quality setting + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.util.Iterator; +import java.util.Random; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageOutputStream; + +public class CompressionBug { + + public CompressionBug() throws IOException { + File fileHighComp = File.createTempFile("CompressionHigh", ".jpg"); + File fileLowComp = File.createTempFile("CompressionLow", ".jpg"); + + fileHighComp.deleteOnExit(); + fileLowComp.deleteOnExit(); + + ImageOutputStream iosHighComp = + ImageIO.createImageOutputStream(fileHighComp); + ImageOutputStream iosLowComp = + ImageIO.createImageOutputStream(fileLowComp); + + int width = 100; + int height = 100; + BufferedImage bi = + new BufferedImage(width, height, + BufferedImage.TYPE_INT_RGB); + Graphics g = bi.createGraphics(); + Random r = new Random(); + for (int i = 0; i < 100; i++) { + Color c = new Color(r.nextInt(256), + r.nextInt(256), + r.nextInt(256)); + int x = r.nextInt(width); + int y = r.nextInt(height); + int w = r.nextInt(width - x); + int h = r.nextInt(height - y); + g.setColor(c); + g.fillRect(x, y, w, h); + } + + ImageTypeSpecifier typeSpecifier = + new ImageTypeSpecifier(bi.getColorModel(), + bi.getSampleModel()); + + ImageWriter writer = null; + Iterator iter = ImageIO.getImageWriters(typeSpecifier,"jpeg"); + while (iter.hasNext()) { + writer = (ImageWriter)iter.next(); + break; + } + + IIOImage iioImg = new IIOImage(bi, null, null); + ImageWriteParam wParam = writer.getDefaultWriteParam(); + wParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); + + // write the highly compressed image (a compression quality setting of + // 0.1f means low visual quality and small file size) + wParam.setCompressionQuality(0.1f); + writer.setOutput(iosHighComp); + writer.write(null, iioImg, wParam); + + // write the somewhat compressed image (a compression quality setting + // of 0.9f means high visual quality and large file size) + wParam.setCompressionQuality(0.9f); + writer.setOutput(iosLowComp); + writer.write(null, iioImg, wParam); + + long sizeOfFileLowComp = fileLowComp.length(); + long sizeOfFileHighComp = fileHighComp.length(); + + // the highly compressed image file should have a smaller file size + // than the image file with low compression; throw an exception if + // this isn't the case + if (sizeOfFileLowComp < sizeOfFileHighComp) { + throw new RuntimeException("Lower compression quality did not " + + "reduce file size!"); + } + } + + public static void main(String args[]) throws IOException { + new CompressionBug(); + } +} diff --git a/jdk/test/sun/security/krb5/auto/BadKdc2.java b/jdk/test/javax/imageio/plugins/jpeg/CompressionVals.java similarity index 52% rename from jdk/test/sun/security/krb5/auto/BadKdc2.java rename to jdk/test/javax/imageio/plugins/jpeg/CompressionVals.java index a490ca73c87..41273fd0383 100644 --- a/jdk/test/sun/security/krb5/auto/BadKdc2.java +++ b/jdk/test/javax/imageio/plugins/jpeg/CompressionVals.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -23,33 +23,25 @@ /* * @test - * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc2 - * @summary krb5 should not try to access unavailable kdc too often + * @bug 4972087 + * @summary Verifies that JPEGImageWriteParam.getCompressionQualityValues() + * returns an array that is one longer than the one returned by + * getCompressionQualityDescriptions() */ -import java.io.*; -import java.security.Security; +import javax.imageio.ImageWriteParam; +import javax.imageio.plugins.jpeg.JPEGImageWriteParam; -public class BadKdc2 { +public class CompressionVals { - public static void main(String[] args) - throws Exception { - - // 1 sec is too short. - BadKdc.setRatio(3.0f); - - Security.setProperty( - "krb5.kdc.bad.policy", "tryLess:2," + BadKdc.toReal(1000)); - BadKdc.go( - "121212222222(32){1,3}11112121(32){1,3}", // 1 2 - "11112121(32){1,3}11112121(32){1,3}", // 1 2 - // refresh - "121212222222(32){1,3}11112121(32){1,3}", // 1 2 - // k3 off k2 on - "1111(21){1,3}1111(22){1,3}", // 1 - // k1 on - "(11){1,3}(12){1,3}" // empty - ); + public static void main(String[] args) { + ImageWriteParam iwp = new JPEGImageWriteParam(null); + iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); + float[] vals = iwp.getCompressionQualityValues(); + String[] descs = iwp.getCompressionQualityDescriptions(); + if (vals.length != (descs.length + 1)) { + throw new RuntimeException("Test failed: Values array is not " + + "one larger than descriptions array"); + } } } diff --git a/jdk/test/javax/imageio/plugins/jpeg/CrashAfterDispose.java b/jdk/test/javax/imageio/plugins/jpeg/CrashAfterDispose.java new file mode 100644 index 00000000000..af5fdef3a0d --- /dev/null +++ b/jdk/test/javax/imageio/plugins/jpeg/CrashAfterDispose.java @@ -0,0 +1,135 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4660047 + * @summary Tests if the JPEG reader/writer crashes the VM if certain methods + * are called after a call to dispose() + */ + +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Iterator; + +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageInputStream; +import javax.imageio.stream.ImageOutputStream; + +public class CrashAfterDispose { + + public static void main(String[] args) throws IOException { + InputStream bais = new ByteArrayInputStream(new byte[100]); + ImageInputStream iis = ImageIO.createImageInputStream(bais); + + // find the JPEG reader + ImageReader reader = null; + Iterator readers = ImageIO.getImageReadersByFormatName("jpeg"); + if (readers.hasNext()) { + reader = (ImageReader)readers.next(); + } else { + throw new RuntimeException("Unable to find a reader!"); + } + + // dispose the reader, then poke and prod it... the reader should + // throw exceptions (which will be caught by this test), but it + // should not crash the VM + reader.dispose(); + + try { + reader.setInput(iis); + } catch (IllegalStateException e) { + } + + try { + reader.read(0); + } catch (IllegalStateException e) { + } + + try { + reader.abort(); + } catch (IllegalStateException e) { + } + + try { + reader.reset(); + } catch (IllegalStateException e) { + } + + try { + reader.dispose(); + } catch (IllegalStateException e) { + } + + // find the JPEG writer + ImageWriter writer = null; + Iterator writers = ImageIO.getImageWritersByFormatName("jpeg"); + if (writers.hasNext()) { + writer = (ImageWriter)writers.next(); + } else { + throw new RuntimeException("Unable to find a writer!"); + } + + // set up output stream + OutputStream baos = new ByteArrayOutputStream(); + ImageOutputStream ios = ImageIO.createImageOutputStream(baos); + BufferedImage bi = new BufferedImage(10, 10, + BufferedImage.TYPE_INT_RGB); + + // dispose the writer, then poke and prod it... the writer should + // throw exceptions (which will be caught by this test), but it + // should not crash the VM + writer.dispose(); + + try { + writer.setOutput(ios); + } catch (IllegalStateException e) { + } + + try { + writer.write(bi); + } catch (IllegalStateException e) { + } + + try { + writer.abort(); + } catch (IllegalStateException e) { + } + + try { + writer.reset(); + } catch (IllegalStateException e) { + } + + try { + writer.dispose(); + } catch (IllegalStateException e) { + } + } +} diff --git a/jdk/test/javax/imageio/plugins/jpeg/DestTypeTest.java b/jdk/test/javax/imageio/plugins/jpeg/DestTypeTest.java new file mode 100644 index 00000000000..01f07a86c8d --- /dev/null +++ b/jdk/test/javax/imageio/plugins/jpeg/DestTypeTest.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 5028259 + * @summary Verifies that usage of the destination type does not cause the + * increase of size of the result jpeg file + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.event.IIOReadWarningListener; +import javax.imageio.event.IIOWriteWarningListener; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.stream.ImageOutputStream; + +public class DestTypeTest implements IIOWriteWarningListener, IIOReadWarningListener { + + ImageWriter w; + ImageReader r; + + public static void main(String[] args) throws IOException { + BufferedImage bi_rgb = createTestImage(BufferedImage.TYPE_INT_RGB); + + DestTypeTest bug = new DestTypeTest(); + byte[] rgb_data = bug.writeTest(bi_rgb); + + System.out.println("rgb jpeg data length is " + rgb_data.length); + + BufferedImage bi_argb = createTestImage(BufferedImage.TYPE_INT_ARGB); + + ImageWriteParam p = bug.getWriteParam(); + IIOMetadata m = bug.getMetadata(p); + + byte[] submeta_data = bug.writeTest(bi_argb, p, m); + System.out.println("desttype and metadata jpeg data length is " + submeta_data.length); + + p = bug.getWriteParam(); + byte[] subbanded_data = bug.writeTest(bi_argb, p); + System.out.println("desttype jpeg data length is " + subbanded_data.length); + + if (submeta_data.length > rgb_data.length) { + throw new RuntimeException("Too big result jpeg: " + submeta_data.length + + "(rgb image size is " + rgb_data.length + ")"); + } + if (subbanded_data.length > rgb_data.length) { + throw new RuntimeException("Too big result jpeg: " + subbanded_data.length + + "(rgb image size is " + rgb_data.length + ")"); + } + } + + public DestTypeTest() { + w = (ImageWriter) + ImageIO.getImageWritersByFormatName("jpeg").next(); + w.addIIOWriteWarningListener(this); + + r = (ImageReader) + ImageIO.getImageReadersByFormatName("jpeg").next(); + r.addIIOReadWarningListener(this); + } + + public ImageWriteParam getWriteParam() { + ImageWriteParam p = w.getDefaultWriteParam(); + p.setSourceBands(new int[] {0, 1, 2}); + ImageTypeSpecifier type = + ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB); + p.setDestinationType(type); + + return p; + } + + public IIOMetadata getMetadata(ImageWriteParam p) { + return w.getDefaultImageMetadata(p.getDestinationType(), null); + } + + public byte[] writeTest(BufferedImage bi) throws IOException { + return writeTest(bi, null); + } + + public byte[] writeTest(BufferedImage bi, + ImageWriteParam p) throws IOException { + return writeTest(bi, p, null); + } + public byte[] writeTest(BufferedImage bi, + ImageWriteParam p, + IIOMetadata m) throws IOException { + ByteArrayOutputStream baos = + new ByteArrayOutputStream(); + + // write test image as jpeg + ImageOutputStream ios = + ImageIO.createImageOutputStream(baos); + w.setOutput(ios); + w.write(null, + new IIOImage(bi, null, m), + p); + ios.close(); + return baos.toByteArray(); + } + + public static BufferedImage createTestImage(int type) { + int w = 100; + int h = 500; + BufferedImage bi = new BufferedImage(3*w, h, type); + Graphics g = bi.createGraphics(); + g.setColor(Color.red); + g.fillRect(0,0,w,h); + g.setColor(Color.green); + g.fillRect(w, 0,w,h); + g.setColor(Color.blue); + g.fillRect(2*w,0,w,h); + + return bi; + } + + public void warningOccurred(ImageWriter source, + int imageIndex, + String warning) { + System.out.println("WRITING WARNING: " + warning); + } + + public void warningOccurred(ImageReader source, + String warning) { + System.out.println("READING WARNING: " + warning); + } +} diff --git a/jdk/test/javax/imageio/plugins/jpeg/JPEGsNotAcceleratedTest.java b/jdk/test/javax/imageio/plugins/jpeg/JPEGsNotAcceleratedTest.java new file mode 100644 index 00000000000..e73a1be19f3 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/jpeg/JPEGsNotAcceleratedTest.java @@ -0,0 +1,365 @@ +/* + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4994702 + * @key headful + * @summary verifies that no regression were introduced with the fix for this + * bug + */ + +import java.awt.AlphaComposite; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.ImageCapabilities; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; +import java.awt.image.DataBuffer; +import java.awt.image.VolatileImage; +import java.awt.image.WritableRaster; +import java.io.File; +import java.io.IOException; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageReadParam; +import javax.imageio.ImageReader; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.stream.FileImageInputStream; +import javax.imageio.stream.ImageOutputStream; + +public class JPEGsNotAcceleratedTest { + + public static final int testRGB = Color.red.getRGB(); + public static final int TEST_W = 100; + public static final int TEST_H = 100; + public static final Rectangle roi = + new Rectangle(TEST_W/4, TEST_H/4, TEST_W/2, TEST_H/2); + + static Frame f; + static boolean showRes = false; + static int testsFinished = 0; + static int testsStarted = 0; + static boolean lowCompression = false; + + static boolean failed = false; + + public JPEGsNotAcceleratedTest(String name) { + BufferedImage bi = readTestImage(name, null, null); + runTestOnImage("no dest image, no region of interest", bi, null); + + BufferedImage destBI = getDestImage(); + bi = readTestImage(name, destBI, null); + runTestOnImage("w/ dest image, no region of interest", bi, null); + + // steal the raster, see if the destination image + // gets accelerated + destBI = getDestImage(); + DataBuffer db = + ((WritableRaster)destBI.getRaster()).getDataBuffer(); + bi = readTestImage(name, destBI, null); + runTestOnImage("w/ dest image (with stolen raster),"+ + " no region of interest", bi, null); + + bi = readTestImage(name, null, roi); + runTestOnImage("no dest image, region of interest", bi, roi); + + destBI = getDestImage(); + bi = readTestImage(name, destBI, roi); + runTestOnImage("w/ dest image, region of interest", bi, roi); + + // accelerate the destination image first, then load + // an image into it. Check that the accelerated copy gets + // updated + destBI = getDestImage(); + accelerateImage(destBI); + bi = readTestImage(name, destBI, roi); + runTestOnImage("w/ accelerated dest image,"+ + " region of interest", bi, roi); + + synchronized (JPEGsNotAcceleratedTest.class) { + testsFinished++; + JPEGsNotAcceleratedTest.class.notify(); + } + + } + + public static BufferedImage readTestImage(String fileName, + BufferedImage dest, + Rectangle srcROI) + { + BufferedImage bi = null; + + try { + FileImageInputStream is = + new FileImageInputStream(new File(fileName)); + ImageReader reader = + (ImageReader)ImageIO.getImageReaders(is).next(); + ImageReadParam param = reader.getDefaultReadParam(); + if (dest != null) { + param.setDestination(dest); + } + if (srcROI != null) { + param.setSourceRegion(srcROI); + } + reader.setInput(is); + bi = reader.read(0, param); + } catch (IOException e) { + System.err.println("Error " + e + + " when reading file: " + fileName); + throw new RuntimeException(e); + } + + return bi; + } + + public static void writeTestImage(String fileName) { + BufferedImage bi = + new BufferedImage(TEST_W, TEST_H, BufferedImage.TYPE_INT_RGB); + Graphics g = bi.getGraphics(); + g.setColor(new Color(testRGB)); + g.fillRect(0, 0, TEST_W, TEST_H); + try { + System.err.printf("Writing %s\n", fileName); + if (lowCompression) { + ImageWriter iw = (ImageWriter)ImageIO.getImageWritersBySuffix("jpeg").next(); + if(iw == null) { + throw new RuntimeException("No available image writer for " + + "jpeg " + + " Test failed."); + } + + File file = new File(fileName); + ImageOutputStream ios = ImageIO.createImageOutputStream(file); + iw.setOutput(ios); + + ImageWriteParam param = iw.getDefaultWriteParam(); + param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); + param.setCompressionQuality(1); + + IIOImage iioImg = new IIOImage(bi, null, null); + iw.write(null, iioImg, param); + + } else { + ImageIO.write(bi, "jpeg", new File(fileName)); + } + } catch (IOException e) { + System.err.println("Error " + e + + " when writing file: " + fileName); + throw new RuntimeException(e); + } + } + + public VolatileImage accelerateImage(BufferedImage bi) { + VolatileImage testVI = f.createVolatileImage(TEST_W, TEST_H); + do { + if (testVI.validate(f.getGraphicsConfiguration()) == + VolatileImage.IMAGE_INCOMPATIBLE) + { + testVI = f.createVolatileImage(TEST_W, TEST_H); + } + Graphics2D g = testVI.createGraphics(); + g.setComposite(AlphaComposite.Src); + g.setColor(Color.green); + g.fillRect(0, 0, TEST_W, TEST_H); + + g.drawImage(bi, 0, 0, null); + g.drawImage(bi, 0, 0, null); + g.drawImage(bi, 0, 0, null); + g.dispose(); + } while (testVI.contentsLost()); + + return testVI; + } + + public BufferedImage getDestImage() { + BufferedImage destBI = + new BufferedImage(TEST_W, TEST_H, BufferedImage.TYPE_INT_RGB); + Graphics2D g = (Graphics2D)destBI.getGraphics(); + g.setComposite(AlphaComposite.Src); + g.setColor(Color.blue); + g.fillRect(0, 0, TEST_W, TEST_H); + return destBI; + } + + public void runTestOnImage(String desc, BufferedImage bi, + Rectangle srcROI) + { + + if (srcROI == null) { + srcROI = new Rectangle(0, 0, TEST_W, TEST_H); + } + + VolatileImage testVI = accelerateImage(bi); + + ImageCapabilities ic = + bi.getCapabilities(f.getGraphicsConfiguration()); + boolean accelerated = ic.isAccelerated(); + + System.err.println("Testing: " + desc + + " -- bi.isAccelerated(): " + accelerated ); + + BufferedImage snapshot = testVI.getSnapshot(); + if (showRes) { + showRes(desc, snapshot); + } + + for (int y = 0; y < srcROI.height; y++) { + for (int x = 0; x < srcROI.width; x++) { + int destRGB = snapshot.getRGB(x, y); + if (destRGB != testRGB && destRGB != 0xfffe0000) { + failed = true; + System.err.printf("Test failed at %dx%d pixel=%x\n", + x, y, snapshot.getRGB(x, y)); + if (!showRes) { + showRes(desc, snapshot); + } + break; + } + } + } + } + + static int startX = 64, startY = 0; + static int frameX = startX, frameY = startY; + private static void showRes(String desc, final BufferedImage src) { + final int w = src.getWidth(); + final int h = src.getHeight(); + + Frame f = new Frame(desc+": dbl-click to exit"); + Component c; + f.add(c = new Component() { + public Dimension getPreferredSize() { + return new Dimension(w,h); + } + + public void paint(Graphics g) { + g.clearRect(0, 0, getWidth(), getHeight()); + g.drawImage(src, 0,0, null); + } + }); + c.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + if (e.getClickCount() > 1) { + System.exit(0); + } + } + }); + f.pack(); + synchronized (JPEGsNotAcceleratedTest.class) { + f.setLocation(frameX, frameY); + frameX += f.getWidth(); + if ((frameX + f.getWidth()) > + f.getGraphicsConfiguration().getBounds().width) + { + frameY += TEST_H; + if ((frameY + f.getHeight()) > + f.getGraphicsConfiguration().getBounds().height) + { + startY += 30; + startX += 30; + frameY = startY; + } + frameX = startX; + } + }; + f.setVisible(true); + } + + public static void usage() { + System.err.println("Usage: java Test [file name] [-write][-show][-low]"); + System.exit(0); + } + + public static void main(String[] args) { + System.setProperty("sun.java2d.pmoffscreen", "true"); + System.setProperty("sun.java2d.ddforcevram", "true"); + String name = "red.jpg"; + + f = new Frame(); + f.pack(); + + if (f.getGraphicsConfiguration().getColorModel().getPixelSize() < 16) { + System.err.println("8-bit display mode detected, dithering issues possible, "+ + "considering test passed."); + f.dispose(); + return; + } + + + for (String arg : args) { + if (arg.equals("-write")) { + writeTestImage(name); + System.exit(0); + } else if (arg.equals("-show")) { + showRes = true; + } else if (arg.equals("-low")) { + lowCompression = true; + name ="red_low.jpg"; + System.err.println("Using low jpeg compression"); + } else if (arg.equals("-help")) { + usage(); + } else { + final String filename = arg; + testsStarted++; + new Thread(new Runnable() { + public void run() { + new JPEGsNotAcceleratedTest(filename); + } + }).start(); + } + } + + if (testsStarted == 0) { + writeTestImage(name); + testsStarted++; + new JPEGsNotAcceleratedTest(name); + } + + + synchronized (JPEGsNotAcceleratedTest.class) { + while (testsFinished < testsStarted) { + try { + JPEGsNotAcceleratedTest.class.wait(100); + } catch (InterruptedException e) { + failed = true; break; + } + } + } + + f.dispose(); + if (failed) { + throw new RuntimeException("Test failed"); + } + + System.err.println("Passed."); + } +} diff --git a/jdk/test/javax/imageio/plugins/jpeg/MergeTreeTest.java b/jdk/test/javax/imageio/plugins/jpeg/MergeTreeTest.java new file mode 100644 index 00000000000..00e9449ab9d --- /dev/null +++ b/jdk/test/javax/imageio/plugins/jpeg/MergeTreeTest.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4895547 + * @summary Test verifies that mergeTree() of JPEGMetadata does not throw the + * NPE + */ + +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.stream.ImageOutputStream; + +import org.w3c.dom.Node; + +public class MergeTreeTest { + public static void main(String[] args) throws IOException { + ImageWriter iw = + (ImageWriter)ImageIO.getImageWritersByFormatName("jpeg").next(); + + ImageTypeSpecifier type = + ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB); + + ImageOutputStream ios = + ImageIO.createImageOutputStream(new File("MergeTreeTest.jpeg")); + iw.setOutput(ios); + + IIOMetadata meta = iw.getDefaultImageMetadata(type, null); + + boolean isFailed = false; + + String[] fmts = meta.getMetadataFormatNames(); + for (int i=0; i 8-bit samples to + * be written. Also tests the JPEGImageWriterSpi.canEncodeImage() + * mechanism for this same behavior. + */ + +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.Iterator; + +import javax.imageio.ImageIO; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageOutputStream; + +public class UshortGrayTest { + + public static void main(String[] args) { + Iterator iter; + BufferedImage bi = new BufferedImage(10, 10, + BufferedImage.TYPE_USHORT_GRAY); + + // Part 1: ensure that JPEGImageWriter throws an exception if it + // encounters an image with 16-bit samples + ImageWriter writer = null; + iter = ImageIO.getImageWritersByFormatName("jpeg"); + if (iter.hasNext()) { + writer = (ImageWriter)iter.next(); + } else { + throw new RuntimeException("No JPEG reader found"); + } + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageOutputStream ios = null; + boolean exceptionThrown = false; + + try { + ios = ImageIO.createImageOutputStream(baos); + } catch (IOException ioe) { + throw new RuntimeException("Could not create ImageOutputStream"); + } + + try { + writer.setOutput(ios); + writer.write(bi); + } catch (IOException ioe) { + exceptionThrown = true; + } + + if (!exceptionThrown) { + throw new RuntimeException("JPEG writer should not be able to " + + "write USHORT_GRAY images"); + } + + // Part 2: ensure that JPEGImageWriterSpi.canEncodeImage() returns + // false for images with 16-bit samples + ImageTypeSpecifier its = + ImageTypeSpecifier.createFromRenderedImage(bi); + + iter = ImageIO.getImageWriters(its, "jpeg"); + if (iter.hasNext()) { + throw new RuntimeException("JPEG writer should not be available" + + " for USHORT_GRAY images"); + } + } +} diff --git a/jdk/test/javax/imageio/plugins/png/CanEncodeShort.java b/jdk/test/javax/imageio/plugins/png/CanEncodeShort.java new file mode 100644 index 00000000000..4f4cec59da5 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/png/CanEncodeShort.java @@ -0,0 +1,66 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4474819 + * @summary Tests whether the PNGImageWriterSpi advertises that it is capable of + * writing images of TYPE_USHORT_565_RGB and TYPE_USHORT_555_RGB. The + * test fails if an exception is thrown. + */ + +import java.awt.image.BufferedImage; +import java.util.Iterator; + +import javax.imageio.ImageIO; +import javax.imageio.ImageTypeSpecifier; + +public class CanEncodeShort { + + private static final int[] types = new int[] { + BufferedImage.TYPE_USHORT_565_RGB, + BufferedImage.TYPE_USHORT_555_RGB, + }; + + private static final String[] typeNames = new String[] { + "TYPE_USHORT_565_RGB", + "TYPE_USHORT_555_RGB", + }; + + public static void main(String[] args) { + for (int i = 0; i < types.length; i++) { + BufferedImage img = new BufferedImage(32, 32, types[i]); + + ImageTypeSpecifier spec = + ImageTypeSpecifier.createFromRenderedImage(img); + + Iterator writers = ImageIO.getImageWriters(spec, "png"); + + if (!writers.hasNext()) { + throw new RuntimeException("Test failed: " + + "no PNG writer found for type " + + typeNames[i]); + } + } + } +} diff --git a/jdk/test/javax/imageio/plugins/png/ImageCompare.java b/jdk/test/javax/imageio/plugins/png/ImageCompare.java new file mode 100644 index 00000000000..b01b1fb808b --- /dev/null +++ b/jdk/test/javax/imageio/plugins/png/ImageCompare.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.image.BufferedImage; +import java.awt.image.ColorModel; +import java.awt.image.Raster; + +// Utility to compare two BufferedImages for RGB equality +public class ImageCompare { + + public static void compare(BufferedImage oldimg, + BufferedImage newimg) { + int width = oldimg.getWidth(); + int height = oldimg.getHeight(); + if (newimg.getWidth() != width || newimg.getHeight() != height) { + throw new RuntimeException("Dimensions changed!"); + } + + Raster oldras = oldimg.getRaster(); + ColorModel oldcm = oldimg.getColorModel(); + Raster newras = newimg.getRaster(); + ColorModel newcm = newimg.getColorModel(); + + for (int j = 0; j < height; j++) { + for (int i = 0; i < width; i++) { + Object oldpixel = oldras.getDataElements(i, j, null); + int oldrgb = oldcm.getRGB(oldpixel); + int oldalpha = oldcm.getAlpha(oldpixel); + + Object newpixel = newras.getDataElements(i, j, null); + int newrgb = newcm.getRGB(newpixel); + int newalpha = newcm.getAlpha(newpixel); + + if (newrgb != oldrgb || + newalpha != oldalpha) { + throw new RuntimeException("Pixels differ at " + i + + ", " + j); + } + } + } + } +} diff --git a/jdk/test/javax/imageio/plugins/png/PngPremultAlphaTest.java b/jdk/test/javax/imageio/plugins/png/PngPremultAlphaTest.java new file mode 100644 index 00000000000..91192e252a6 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/png/PngPremultAlphaTest.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4888478 + * @summary Test that colors do not distort when buffered image with + * premultiplied alpha is encoded to png format + */ + +import java.awt.AlphaComposite; +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; + +import javax.imageio.ImageIO; + +public class PngPremultAlphaTest { + protected static int width = 100; + protected static int height = 100; + + protected static String format = "png"; + + protected static int[] iBufferedImageTypes = { + BufferedImage.TYPE_INT_RGB, + BufferedImage.TYPE_INT_ARGB, + BufferedImage.TYPE_4BYTE_ABGR_PRE, + BufferedImage.TYPE_INT_ARGB_PRE + }; + + protected static String[] strBufferedImageTypes = { + "TYPE_INT_RGB", + "TYPE_INT_ARGB", + "BufferedImage.TYPE_4BYTE_ABGR_PRE", + "BufferedImage.TYPE_INT_ARGB_PRE" + }; + + public static void main(String[] arg) { + for(int i=0; i 1 + || Math.abs(src.getColorModel().getGreen(srcPixel) - dst.getColorModel().getGreen(dstPixel)) > 1 + || Math.abs(src.getColorModel().getBlue(srcPixel) - dst.getColorModel().getBlue(dstPixel)) > 1) { + showPixel(src, width/2, height/2); + showPixel(dst, width/2, height/2); + + throw new RuntimeException( "Colors are different: " + + Integer.toHexString(src.getColorModel().getRGB(srcPixel)) + + " and " + + Integer.toHexString(dst.getColorModel().getRGB(dstPixel))); + } + return true; + } + + private static void showPixel(BufferedImage src, int x, int y) { + System.out.println("Img is " + src); + System.out.println("CM is " + src.getColorModel().getClass().getName()); + Object p = src.getRaster().getDataElements(x, y, null); + System.out.println("RGB: " + + Integer.toHexString(src.getColorModel().getRGB(p))); + System.out.println("Red: " + + Integer.toHexString(src.getColorModel().getRed(p))); + System.out.println("Green: " + + Integer.toHexString(src.getColorModel().getGreen(p))); + System.out.println("Blue: " + + Integer.toHexString(src.getColorModel().getBlue(p))); + System.out.println("Alpha: " + + Integer.toHexString(src.getColorModel().getAlpha(p))); + } +} diff --git a/jdk/test/javax/imageio/plugins/png/ShortPaletteTest.java b/jdk/test/javax/imageio/plugins/png/ShortPaletteTest.java new file mode 100644 index 00000000000..f9e450dfb1e --- /dev/null +++ b/jdk/test/javax/imageio/plugins/png/ShortPaletteTest.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4826548 + * @summary Tests for reading PNG images with 5,6,7 and 8 colors in palette + */ + +import java.awt.image.BufferedImage; +import java.awt.image.IndexColorModel; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.ImageIO; + +public class ShortPaletteTest { + + public static void main(String[] args) { + + for (int numberColors = 2; numberColors <= 16; numberColors++) { + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + BufferedImage image = createImage(numberColors); + ImageIO.write(image, "png", baos); + baos.close(); + System.out.println("Number of colors: " + numberColors); + byte[] buffer = baos.toByteArray(); + ByteArrayInputStream bais = new ByteArrayInputStream(buffer); + ImageIO.read(bais); + System.out.println("OK"); + } catch (ArrayIndexOutOfBoundsException e) { + e.printStackTrace(); + throw new RuntimeException("Test failed."); + } catch (IOException e) { + e.printStackTrace(); + throw new RuntimeException("Unexpected exception was thrown." + + " Test failed."); + } + } + } + + private static IndexColorModel createColorModel(int numberColors) { + + byte[] colors = new byte[numberColors*3]; + int depth = 4; + int startIndex = 0; + + return new IndexColorModel(depth, + numberColors, + colors, + startIndex, + false); + } + + private static BufferedImage createImage(int numberColors) { + return new BufferedImage(32, + 32, + BufferedImage.TYPE_BYTE_BINARY, + createColorModel(numberColors)); + } +} diff --git a/jdk/test/javax/imageio/plugins/png/WriteProgressive.java b/jdk/test/javax/imageio/plugins/png/WriteProgressive.java new file mode 100644 index 00000000000..38e665d0ef8 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/png/WriteProgressive.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4432615 + * @summary Tests progressive writing in the PNG encoder + * @modules java.desktop/com.sun.imageio.plugins.png + */ + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.util.Iterator; +import java.util.Random; + +import javax.imageio.IIOImage; +import javax.imageio.ImageIO; +import javax.imageio.ImageWriteParam; +import javax.imageio.ImageWriter; +import javax.imageio.stream.ImageOutputStream; + +public class WriteProgressive { + + public static void main(String[] args) throws IOException { + Iterator witer = ImageIO.getImageWritersByFormatName("png"); + ImageWriter w = (ImageWriter)witer.next(); + + File f = File.createTempFile("WriteProgressive", ".png"); + ImageOutputStream ios = ImageIO.createImageOutputStream(f); + w.setOutput(ios); + + BufferedImage bi = new BufferedImage(100, 100, + BufferedImage.TYPE_3BYTE_BGR); + Graphics2D g = bi.createGraphics(); + Random r = new Random(10); + for (int i = 0; i < 10000; i++) { + Color c = + new Color(r.nextInt(256), r.nextInt(256), r.nextInt(256)); + g.setColor(c); + g.fillRect(r.nextInt(100), r.nextInt(100), 1, 1); + } + + IIOImage iioimage = new IIOImage(bi, null, null); + + ImageWriteParam param = w.getDefaultWriteParam(); + param.setProgressiveMode(ImageWriteParam.MODE_DEFAULT); + + try { + w.write(null, iioimage, param); + } catch (NullPointerException npe) { + throw new RuntimeException("Got NPE during write!"); + } + + ios.close(); + + BufferedImage bi2 = ImageIO.read(f); + f.delete(); + + ImageCompare.compare(bi, bi2); + } +} diff --git a/jdk/test/javax/imageio/plugins/wbmp/EmptyInputWbmpMetadataTest.java b/jdk/test/javax/imageio/plugins/wbmp/EmptyInputWbmpMetadataTest.java new file mode 100644 index 00000000000..ebb033692e8 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/wbmp/EmptyInputWbmpMetadataTest.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4895483 + * @summary Test checks that the IllegalStateException was thrown if input was + * not set to the WBMPImageReader + */ + +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.metadata.IIOMetadata; + +public class EmptyInputWbmpMetadataTest { + private static String fmt = "BMP"; + + public static void main(String[] args) { + boolean isPassed = false; + ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName(fmt).next(); + + if (ir == null) { + throw new RuntimeException("No available reader for " + fmt); + } + IIOMetadata meta = null; + try { + meta = ir.getImageMetadata(0); + } catch (IllegalStateException e) { + System.out.println("Correct exception was thrown. Test passed."); + isPassed = true; + } catch (IOException e) { + e.printStackTrace(); + } + if (!isPassed) { + throw new RuntimeException("The IllegalStateException was not thrown." + +"Test failed."); + } + } +} diff --git a/jdk/test/javax/imageio/plugins/wbmp/GetImageTypesTest.java b/jdk/test/javax/imageio/plugins/wbmp/GetImageTypesTest.java new file mode 100644 index 00000000000..8a8f5f03a3a --- /dev/null +++ b/jdk/test/javax/imageio/plugins/wbmp/GetImageTypesTest.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4928273 + * @summary Verifies what IllegalStateException is thrown if image input was not + * set + */ + +import java.util.Iterator; + +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; + +public class GetImageTypesTest { + + private static final String format = "wbmp"; + + public static void main(String[] args) { + + boolean passed = false; + ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName(format).next(); + + if (ir == null) { + throw new RuntimeException("No matching reader found. Test Failed"); + } + + try { + Iterator types = ir.getImageTypes(0); + } catch (IllegalStateException e) { + System.out.println("Test passed."); + passed = true; + } catch (Exception e) { + throw new RuntimeException("Unexpected exception was thrown. " + + "Test failed."); + } + + if (!passed) { + throw new RuntimeException("IllegalStateException is not thrown when " + + "calling getImageTypes() without setting " + + "the input source for the image format: " + + format + + ". Test failed"); + } + + } +} diff --git a/jdk/test/javax/imageio/plugins/wbmp/ValidWbmpTest.java b/jdk/test/javax/imageio/plugins/wbmp/ValidWbmpTest.java new file mode 100644 index 00000000000..308ba51a853 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/wbmp/ValidWbmpTest.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4924512 + * @summary Test that wbmp image reader detects incorrect image format + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; + +import javax.imageio.IIOException; +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.stream.ImageInputStream; + +public class ValidWbmpTest { + + public static void main(String[] args) { + try { + String[] formats = { "JPEG", "PNG", "BMP" }; + + BufferedImage img = new BufferedImage(100, 100, + BufferedImage.TYPE_BYTE_GRAY); + Graphics g = img.createGraphics(); + g.setColor(Color.white); + g.fillRect(0,0,100,100); + g.setColor(Color.black); + g.fillRect(10,10,80,80); + + ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName("WBMP").next(); + if (ir==null) { + throw new RuntimeException("No readers for WBMP format!"); + } + for(int i=0; i 0) { + format = args[0]; + System.out.println("Test format " + format); + } + + init(); + ImageIO.setUseCache(false); + + for (int i=0; i"); + indent(level); + System.out.println(node.getNodeValue()); + indent(level); // emit close tag + System.out.println(""); + } else if (child != null) { + System.out.println(">"); // close current tag + while (child != null) { // emit child tags recursively + displayMetadata(child, level + 1); + child = child.getNextSibling(); + } + indent(level); // emit close tag + System.out.println(""); + } else { + System.out.println("/>"); + } + } + + public static void main(String args[]) { + WbmpDefaultImageMetadataTest test = + new WbmpDefaultImageMetadataTest("wbmp"); + } +} diff --git a/jdk/test/javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh b/jdk/test/javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh new file mode 100644 index 00000000000..b2194c99d35 --- /dev/null +++ b/jdk/test/javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh @@ -0,0 +1,272 @@ +#!/bin/ksh -p +# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# @test +# +# @bug 6342404 7078379 8167503 +# +# @summary Test verifies that incorrectly configured ImageIO plugin spi +# does not affect registration of other ImageIO plugin in the +# applet context. +# +# +# @compile IIOPluginTest.java +# @compile DummyReaderPluginSpi.java +# @run shell BadPluginConfigurationTest.sh + +# There are several resources which need to be present before many +# shell scripts can run. Following are examples of how to check for +# many common ones. +# +# Note that the shell used is the Korn Shell, KSH +# +# Also note, it is recommended that make files NOT be used. Rather, +# put the individual commands directly into this file. That way, +# it is possible to use command line arguments and other shell tech- +# niques to find the compiler, etc on different systems. For example, +# a different path could be used depending on whether this were a +# Solaris or Win32 machine, which is more difficult (if even possible) +# in a make file. + + +# Beginning of subroutines: +status=1 + +#Call this from anywhere to fail the test with an error message +# usage: fail "reason why the test failed" +fail() + { echo "The test failed :-(" + echo "$*" 1>&2 + echo "exit status was $status" + exit $status + } #end of fail() + +#Call this from anywhere to pass the test with a message +# usage: pass "reason why the test passed if applicable" +pass() + { echo "The test passed!!!" + echo "$*" 1>&2 + exit 0 + } #end of pass() + +# end of subroutines + + +# The beginning of the script proper + +# Checking for proper OS +OS=`uname -s` +case "$OS" in + SunOS | Linux | Darwin ) + FILESEP="/" + PATHSEP=":" + TMP=`cd /tmp; pwd -P` + ;; + + Windows* ) + FILESEP="\\" + PATHSEP=";" + TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}` + ;; + + CYGWIN* ) + FILESEP="/" + PATHSEP=";" + TMP="/tmp" + ;; + + # catch all other OSs + * ) + echo "Unrecognized system! $OS" + fail "Unrecognized system! $OS" + ;; +esac + +# Want this test to run standalone as well as in the harness, so do the +# following to copy the test's directory into the harness's scratch directory +# and set all appropriate variables: + +if [ -z "${TESTJAVA}" ] ; then + # TESTJAVA is not set, so the test is running stand-alone. + # TESTJAVA holds the path to the root directory of the build of the JDK + # to be tested. That is, any java files run explicitly in this shell + # should use TESTJAVA in the path to the java interpreter. + # So, we'll set this to the JDK spec'd on the command line. If none + # is given on the command line, tell the user that and use a cheesy + # default. + # THIS IS THE JDK BEING TESTED. + if [ -n "$1" ] ; + then TESTJAVA=$1 + else fail "no JDK specified on command line!" + fi + TESTSRC=. + TESTCLASSES=. + STANDALONE=1; +fi +echo "JDK under test is: $TESTJAVA" + +#Deal with .class files: +if [ -n "${STANDALONE}" ] ; + then + #if standalone, remind user to cd to dir. containing test before running it + echo "Just a reminder: cd to the dir containing this test when running it" + # then compile all .java files (if there are any) into .class files + if [ -a *.java ] ; + then echo "Reminder, this test should be in its own directory with all" + echo "supporting files it needs in the directory with it." + ${COMPILEJAVA}/bin/javac ./*.java ; + fi + # else in harness so copy all the class files from where jtreg put them + # over to the scratch directory this test is running in. + else cp ${TESTCLASSES}/*.class . ; +fi + +#if in test harness, then copy the entire directory that the test is in over +# to the scratch directory. This catches any support files needed by the test. +if [ -z "${STANDALONE}" ] ; + then cp ${TESTSRC}/*.java . +fi + +#Just before executing anything, make sure it has executable permission! +chmod 777 ./* + +############### YOUR TEST CODE HERE!!!!!!! ############# + +#All files required for the test should be in the same directory with +# this file. If converting a standalone test to run with the harness, +# as long as all files are in the same directory and it returns 0 for +# pass, you should be able to cut and paste it into here and it will +# run with the test harness. + +# This is an example of running something -- test +# The stuff below catches the exit status of test then passes or fails +# this shell test as appropriate ( 0 status is considered a pass here ) + +echo +echo ------ PREPARE TEST PLUGIN --------- + +# note that we can not use some subdirectory of the +# scratch dir as the plugin dst dir because the test +# app have file read permission for all subdirs of the +# scratch dir + +PLUGINDST_DIR=${TMP}/test_ext +#PLUGINDST_DIR=${TESTJAVA}/lib/ext +TEST_PLUGIN=dummy.jar + +if [ ! -d ${PLUGINDST_DIR} ] ; then + mkdir ${PLUGINDST_DIR} +fi + +# remove old service declaration +if [ -d META-INF ] ; then + rm -rf META-INF +fi + +# generate the service declaration +if [ ! -d META_INF ] ; then + mkdir META-INF + mkdir META-INF/services +fi + +# add wrong record to the service configuration +echo "BadReaderPluginSpi" > META-INF/services/javax.imageio.spi.ImageReaderSpi + +echo "DummyReaderPluginSpi" >> META-INF/services/javax.imageio.spi.ImageReaderSpi + + +${TESTJAVA}/bin/jar -cvf ${TEST_PLUGIN} DummyReaderPluginSpi*.class META-INF/services/javax.imageio.spi.ImageReaderSpi + +echo ----- TEST PLUGIN IS READY -------- +echo +echo ----- INSTALL PLUGIN -------- +echo "Install test plugin to ${PLUGINDST_DIR}" +if [ -f ${PLUGINDST_DIR}/${TEST_PLUGIN} ] ; then + echo "Remove old plugin..." + rm -f ${PLUGINDST_DIR}/${TEST_PLUGIN} +fi +mv -f ${TEST_PLUGIN} ${PLUGINDST_DIR} +if [ -f ${PLUGINDST_DIR}/${TEST_PLUGIN} ] ; then + echo Test plugin is installed. +else + fail "Unable to install test plugin to $PLUGINDST_DIR" +fi +echo ----- PLUGIN IS INSTALLED ------ +echo +echo ----- CLEAN PLUGIN TEMPORARY FILES ----- +rm -rf DummyReaderPluginSpi*.class META-INF +echo ----- CLEANING IS COMPLETE ------- +echo + + +case "$OS" in + CYGWIN* ) + TEST_CODEBASE=$(cygpath -m ${PWD}) + TEST_PLUGIN_JAR=$(cygpath -m ${PLUGINDST_DIR}${FILESEP}${TEST_PLUGIN}) + ;; + + # catch all other OSs + * ) + TEST_CODEBASE=${PWD} + TEST_PLUGIN_JAR=${PLUGINDST_DIR}${FILESEP}${TEST_PLUGIN} + ;; +esac + + +# Update policy file to grant read permission +echo "grant codeBase \"file:${TEST_CODEBASE}\" {" > classpath.policy +echo " permission java.io.FilePermission \"${TEST_PLUGIN_JAR}\", \"read\";" >> classpath.policy +echo " permission java.util.PropertyPermission \"test.5076692.property\", \"read\";" >> classpath.policy +echo "};" >> classpath.policy +echo "grant codeBase \"file:${TEST_PLUGIN_JAR}\" {" >> classpath.policy +echo " permission java.util.PropertyPermission \"test.5076692.property\", \"read\";" >> classpath.policy +echo "};" >> classpath.policy + +echo --------------------- +echo --- Applet policy --- +echo --------------------- +cat classpath.policy +echo --------------------- +echo + +echo ------------------------------- +echo --- Applet Classpath Test --- +echo ------------------------------- +# +# please note that we need to use "==" in setup of the java.security.policy +# property in order to overwrite policies defined in the user policy file +# For more details see: +# http://java.sun.com/j2se/1.5.0/docs/guide/security/PolicyFiles.html) +# + +${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ".${PATHSEP}${TEST_PLUGIN_JAR}" \ + -Djava.security.policy==classpath.policy \ + -Djava.security.manager IIOPluginTest + +status=$? + +if [ $status -eq "0" ] ; then + pass "" +else + fail "Test failed due to test plugin was not found." +fi + diff --git a/jdk/test/javax/imageio/spi/AppletContextTest/DummyReaderPluginSpi.java b/jdk/test/javax/imageio/spi/AppletContextTest/DummyReaderPluginSpi.java new file mode 100644 index 00000000000..be6b459e4f2 --- /dev/null +++ b/jdk/test/javax/imageio/spi/AppletContextTest/DummyReaderPluginSpi.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.IOException; +import java.util.Locale; + +import javax.imageio.IIOException; +import javax.imageio.ImageReader; +import javax.imageio.spi.ImageReaderSpi; +import javax.imageio.spi.ServiceRegistry; + +public class DummyReaderPluginSpi extends ImageReaderSpi { + + private static String [] writerSpiNames = + {"DummyWriterPluginSpi"}; + public static String[] formatNames = {"test_5076692", "TEST_5076692"}; + public static String[] entensions = {"test_5076692"}; + public static String[] mimeType = {"image/test_5076692"}; + + private boolean registered = false; + + public DummyReaderPluginSpi() { + super("Sun Microsystems, Inc.", + "1.0", + formatNames, + entensions, + mimeType, + "DummyPluginReader", + STANDARD_INPUT_TYPE, + writerSpiNames, + false, + null, null, null, null, + false, + "", + "", + null, null); + } + + public void onRegistration(ServiceRegistry registry, + Class category) { + if (registered) { + return; + } + + System.getProperty("test.5076692.property", "not found"); + + registered = true; + } + + public String getDescription(Locale locale) { + return "Standard Dummy Image Reader"; + } + + public boolean canDecodeInput(Object source) throws IOException { + return false; + } + + public ImageReader createReaderInstance(Object extension) + throws IIOException { + return null; + } +} diff --git a/jdk/test/javax/imageio/spi/AppletContextTest/IIOPluginTest.java b/jdk/test/javax/imageio/spi/AppletContextTest/IIOPluginTest.java new file mode 100644 index 00000000000..3ce2d45a6a1 --- /dev/null +++ b/jdk/test/javax/imageio/spi/AppletContextTest/IIOPluginTest.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import javax.imageio.ImageIO; + +public class IIOPluginTest { + + public static String[] dummyformatNames = {"test_5076692", "TEST_5076692"}; + public static String[] dummymimeType = {"image/test_5076692"}; + + public static void main(String[] args) { + SecurityManager sm = System.getSecurityManager(); + System.out.println("Sm is " + sm); + + String formatNames[] = ImageIO.getReaderFormatNames(); + String readerMimeTypes[] = ImageIO.getReaderMIMETypes(); + + if (!isPresent(dummyformatNames, formatNames) || + !isPresent(dummymimeType, readerMimeTypes)) { + throw new RuntimeException("No test plugin available!"); + } + } + + public static boolean isPresent(String[] t, String[] r) { + for (int i=0; i category) { + System.out.println("\nfrom OnRegistration: BMP plugin Registered\n"); + super.onRegistration(sr, category); + } + + public void onDeregistration(ServiceRegistry sr, Class category) { + System.out.println("\nfrom OnDeregistration: BMP plugin De-Registered\n"); + //super.onRegistration(sr, category); + } + } +} diff --git a/jdk/test/javax/imageio/spi/DeregisterOrderedSpiTest.java b/jdk/test/javax/imageio/spi/DeregisterOrderedSpiTest.java new file mode 100644 index 00000000000..603415e1251 --- /dev/null +++ b/jdk/test/javax/imageio/spi/DeregisterOrderedSpiTest.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4936495 8037743 + * @summary This test verifies whether deregistering an ordered spi object does + * not throw any exception + * @modules java.desktop/com.sun.imageio.plugins.bmp + * java.desktop/com.sun.imageio.plugins.gif + * java.desktop/com.sun.imageio.plugins.jpeg + * java.desktop/com.sun.imageio.plugins.png + */ + +import javax.imageio.spi.IIORegistry; +import javax.imageio.spi.ImageReaderSpi; +import javax.imageio.spi.ServiceRegistry; + +public class DeregisterOrderedSpiTest { + + public DeregisterOrderedSpiTest() { + + try { + + ServiceRegistry reg = IIORegistry.getDefaultInstance(); + ImageReaderSpi gifSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.gif.GIFImageReaderSpi.class); + ImageReaderSpi pngSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.png.PNGImageReaderSpi.class); + ImageReaderSpi jpgSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.jpeg.JPEGImageReaderSpi.class); + ImageReaderSpi bmpSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.bmp.BMPImageReaderSpi.class); + + boolean ordered = reg.setOrdering(ImageReaderSpi.class, pngSpi, + gifSpi); + + ordered = reg.setOrdering(ImageReaderSpi.class, gifSpi, jpgSpi); + ordered = reg.setOrdering(ImageReaderSpi.class, bmpSpi, gifSpi); + reg.deregisterServiceProvider(gifSpi); + System.out.println("PASS"); + + } catch (Exception e) { + System.out.println("FAIL"); + throw new RuntimeException("Deregistering a spi object involved in some " + + "ordering throws the following exception: " + e.toString()); + } + } + + public static void main(String args[]) { + DeregisterOrderedSpiTest test = new DeregisterOrderedSpiTest(); + } +} diff --git a/jdk/test/javax/imageio/spi/OrderingTest.java b/jdk/test/javax/imageio/spi/OrderingTest.java new file mode 100644 index 00000000000..ceb6fde4b5a --- /dev/null +++ b/jdk/test/javax/imageio/spi/OrderingTest.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4936445 + * @summary This test verifies whether setting the order reversely between 2 spi + * objects removes the previous ordering that was set between the + * same set of spi objects. This is verified by invoking + * unsetOrdering() method twice consecutively with respect to the same + * spi objects and unsetOrdering() is supposed to return false when + * called for the second time. + * @modules java.desktop/com.sun.imageio.plugins.gif + * java.desktop/com.sun.imageio.plugins.png + */ + +import javax.imageio.spi.IIORegistry; +import javax.imageio.spi.ImageReaderSpi; +import javax.imageio.spi.ServiceRegistry; + +public class OrderingTest { + + public OrderingTest() { + + ServiceRegistry reg = IIORegistry.getDefaultInstance(); + ImageReaderSpi gifSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.gif.GIFImageReaderSpi.class); + ImageReaderSpi pngSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.png.PNGImageReaderSpi.class); + + boolean ordered = reg.setOrdering(ImageReaderSpi.class, gifSpi, pngSpi); + + ordered = reg.setOrdering(ImageReaderSpi.class, pngSpi, gifSpi); + + boolean unordered = reg.unsetOrdering(ImageReaderSpi.class, gifSpi, + pngSpi); + boolean unordered1 = reg.unsetOrdering(ImageReaderSpi.class, gifSpi, + pngSpi); + + if (unordered1) { + throw new RuntimeException("FAIL: Ordering 2 spi objects in the " + + "reverse direction does not remove the previous ordering " + + "set between the spi objects and hence unsetOrdering() " + + "returns true for the same spi objects when called consecutively"); + } else { + System.out.println("PASS"); + } + + } + + public static void main(String args[]) { + OrderingTest test = new OrderingTest(); + } +} diff --git a/jdk/test/javax/imageio/spi/PluginSpiTest.java b/jdk/test/javax/imageio/spi/PluginSpiTest.java new file mode 100644 index 00000000000..04a45f23771 --- /dev/null +++ b/jdk/test/javax/imageio/spi/PluginSpiTest.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6275112 + * @summary Test verifies that imageReaders for base image formats return + * meaningful name of service provider interface (SPI) for base image + * formats + * @modules java.desktop/com.sun.imageio.plugins.gif + * java.desktop/com.sun.imageio.plugins.png + * java.desktop/com.sun.imageio.plugins.jpeg + * java.desktop/com.sun.imageio.plugins.bmp + * java.desktop/com.sun.imageio.plugins.wbmp + */ + +import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.ImageWriter; +import javax.imageio.spi.ImageReaderSpi; + +public class PluginSpiTest { + + public static void main(String[] args) { + String format[] = { "GIF", "PNG", "JPEG", "BMP", "WBMP" }; + for (int i = 0; i < format.length; i++) { + System.out.println("\nFormat " + format[i]); + testFormat(format[i]); + } + } + + public static void testFormat(String format) { + ImageReader reader = + ImageIO.getImageReadersByFormatName(format).next(); + if (reader == null) { + throw new RuntimeException("Failed to get reader for " + format); + } + + ImageReaderSpi readerSpi = reader.getOriginatingProvider(); + System.out.println(format + " Reader SPI: " + readerSpi); + + String writerSpiNames[] = readerSpi.getImageWriterSpiNames(); + if (writerSpiNames == null || writerSpiNames.length == 0) { + throw new RuntimeException("Failed to get writer spi names for " + + format); + } + + System.out.println("Available writer spi names:"); + for (int i = 0; i < writerSpiNames.length; i++) { + System.out.println(writerSpiNames[i]); + try { + Class spiClass = Class.forName(writerSpiNames[i]); + if (spiClass == null) { + throw new RuntimeException("Failed to get spi class " + + writerSpiNames[i]); + } + System.out.println("Got class " + spiClass.getName()); + + Object spiObject = spiClass.newInstance(); + if (spiObject == null) { + throw new RuntimeException("Failed to instantiate spi " + + writerSpiNames[i]); + } + System.out.println("Got instance " + spiObject); + } catch (Throwable e) { + throw new RuntimeException("Failed to test spi " + + writerSpiNames[i]); + } + } + + ImageWriter writer = ImageIO.getImageWriter(reader); + if (writer == null) { + throw new RuntimeException("Failed to get writer for " + format); + } + } +} diff --git a/jdk/test/javax/imageio/spi/RegisterPluginTwiceTest.java b/jdk/test/javax/imageio/spi/RegisterPluginTwiceTest.java new file mode 100644 index 00000000000..fcc8708d07a --- /dev/null +++ b/jdk/test/javax/imageio/spi/RegisterPluginTwiceTest.java @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4836432 8037743 + * @summary This test attempts to register two instances of one ImageReaderSPI. + * Expected behavior is that only one instance of ImageReaderSPI will + * be registered. + */ + +import java.io.IOException; +import java.util.Iterator; +import java.util.Locale; + +import javax.imageio.ImageReader; +import javax.imageio.spi.IIORegistry; +import javax.imageio.spi.ServiceRegistry; +import javax.imageio.stream.ImageInputStream; + +public class RegisterPluginTwiceTest { + + public RegisterPluginTwiceTest() throws Exception { + BMPImageReaderSPI BMPSpi = new BMPImageReaderSPI(); + BMPImageReaderSPI BMPSpi1 = new BMPImageReaderSPI(); + + IIORegistry regis = IIORegistry.getDefaultInstance(); + boolean res1 + = regis.registerServiceProvider(BMPSpi, + javax.imageio.spi.ImageReaderSpi.class); + boolean res2 + = regis.registerServiceProvider(BMPSpi1, + javax.imageio.spi.ImageReaderSpi.class); + + if(!res1 || res2) { + throw new RuntimeException("Bad returned values for registerServiceProvider"); + } + Iterator it = regis.getServiceProviders(Class.forName("javax.imageio.spi.ImageReaderSpi"), true); + int count = 0; + while (it.hasNext()) { + Object o = it.next(); + if(o instanceof BMPImageReaderSPI) { + count++; + System.out.println("Found next BMPImageReaderSPI, count = " +count); + } + } + if(count > 1) { + throw new RuntimeException("Too many instances of the BMPImageReaderSPI was registered!"); + } + } + + public static void main(String args[]) throws Exception{ + RegisterPluginTwiceTest fnio = new RegisterPluginTwiceTest(); + } + + + /** + Not a perfect implementation of SPI. This is just a dummy implementation + which denotes some arbitrary reader class. The intention is to check how this + is getting registered in the registry. Hence some of the values in this class + may be inappropriate.. + */ + public static class BMPImageReaderSPI extends javax.imageio.spi.ImageReaderSpi{ + + private static final String vendorName = "Javasoft"; + + private static final String version = "2.0"; + + private static final String[] names = { "bmp" }; + + private static final String[] suffixes = { "bmp" }; + + private static final String[] MIMETypes = { "image/x-bmp"}; + + private static final String readerClassName = + "com.sun.imageio.plugins.png.PNGImageReader"; + + private static final String[] writerSpiNames = { + "com.sun.imageio.plugins.png.PNGImageWriterSpi" + }; + + public BMPImageReaderSPI() { + super(vendorName, + version, + names, + suffixes, + MIMETypes, + readerClassName, + STANDARD_INPUT_TYPE, + writerSpiNames, + false, + null, null, + null, null, + true, + "BMP Native Metadata", + "com.sun.imageio.plugins.png.PNGMetadataFormat", + null, null + ); + } + + public String getDescription(Locale locale) { + return "Standard BMP image reader"; + } + + public boolean canDecodeInput(Object input) throws IOException { + if (!(input instanceof ImageInputStream)) { + return false; + } + + ImageInputStream stream = (ImageInputStream)input; + byte[] b = new byte[8]; + stream.mark(); + stream.readFully(b); + stream.reset(); + + return (b[0] == (byte)137 && + b[1] == (byte)80 && + b[2] == (byte)78 && + b[3] == (byte)71 && + b[4] == (byte)13 && + b[5] == (byte)10 && + b[6] == (byte)26 && + b[7] == (byte)10); + } + + public ImageReader createReaderInstance(Object extension) { + //return new PNGImageReader(this); + return null; + } + public void onRegistration(ServiceRegistry sr, Class category) { + //System.out.println("Registered "+category); + super.onRegistration(sr, category); + } + + public void onDeregistration(ServiceRegistry sr, Class category) { + //System.out.println("De-Registered "+category); + //super.onRegistration(sr, category); + } + } +} diff --git a/jdk/test/javax/imageio/spi/SpiTest.java b/jdk/test/javax/imageio/spi/SpiTest.java new file mode 100644 index 00000000000..5eee838ecc8 --- /dev/null +++ b/jdk/test/javax/imageio/spi/SpiTest.java @@ -0,0 +1,390 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4395376 + * @summary Performs various sanity checks on Spi class constructors and get + * methods + */ + +import java.util.Iterator; +import java.util.Locale; + +import javax.imageio.ImageReader; +import javax.imageio.ImageTypeSpecifier; +import javax.imageio.ImageWriter; +import javax.imageio.spi.IIORegistry; +import javax.imageio.spi.IIOServiceProvider; +import javax.imageio.spi.ImageReaderSpi; +import javax.imageio.spi.ImageReaderWriterSpi; +import javax.imageio.spi.ImageWriterSpi; +import javax.imageio.spi.ServiceRegistry; + +public class SpiTest { + + String vendorName = null; + String version = null; + String[] names = null; + String[] suffixes = null; + String[] MIMETypes = null; + String readerClassName = null; + String writerClassName = null; + Class[] inputTypes = null; + Class[] outputTypes = null; + String[] writerSpiNames = null; + String[] readerSpiNames = null; + String nativeStreamMetadataFormatName = null; + String nativeStreamMetadataFormatClassName = null; + String[] extraStreamMetadataFormatNames = null; + String[] extraStreamMetadataFormatClassNames = null; + String nativeImageMetadataFormatName = null; + String nativeImageMetadataFormatClassName = null; + String[] extraImageMetadataFormatNames = null; + String[] extraImageMetadataFormatClassNames = null; + + private void error(String message) { + // System.out.println("Error: " + message); + throw new RuntimeException(message); + } + + private void testSpi(IIOServiceProvider spi) { + if (spi.getVendorName() == null) { + error(spi + " getVendorName == null!"); + } + if (spi.getVersion() == null) { + error(spi + " getVersion == null!"); + } + } + + private void testSpi(ImageReaderWriterSpi spi) { + testSpi((IIOServiceProvider)spi); + if (spi.getFormatNames() == null) { + error("spi.getFormatNames == null!"); + } + String[] suffixes = spi.getFileSuffixes(); + if (suffixes != null && suffixes.length == 0) { + error("suffixes.length == 0!"); + } + String[] MIMETypes = spi.getMIMETypes(); + if (MIMETypes != null && MIMETypes.length == 0) { + error("MIMETypes.length == 0!"); + } + if (spi.getPluginClassName() == null) { + error("spi.getPluginClassName == null!"); + } + String[] extraStreamMetadataFormatNames = + spi.getExtraStreamMetadataFormatNames(); + if (extraStreamMetadataFormatNames != null && + extraStreamMetadataFormatNames.length == 0) { + error("extraStreamMetadataFormatNames.length == 0!"); + } + String[] extraImageMetadataFormatNames = + spi.getExtraImageMetadataFormatNames(); + if (extraImageMetadataFormatNames != null && + extraImageMetadataFormatNames.length == 0) { + error("extraImageMetadataFormatNames.length == 0!"); + } + } + + public void testSpi(ImageReaderSpi spi) { + testSpi((ImageReaderWriterSpi)spi); + Class[] inputTypes = spi.getInputTypes(); + if (inputTypes == null) { + error("inputTypes == null!"); + } + if (inputTypes.length == 0) { + error("inputTypes.length == 0!"); + } + String[] writerSpiNames = spi.getImageWriterSpiNames(); + if (writerSpiNames != null && writerSpiNames.length == 0) { + error("writerSpiNames.length == 0!"); + } + } + + public void testSpi(ImageWriterSpi spi) { + testSpi((ImageReaderWriterSpi)spi); + Class[] outputTypes = spi.getOutputTypes(); + if (outputTypes == null) { + error("outputTypes == null!"); + } + if (outputTypes.length == 0) { + error("outputTypes.length == 0!"); + } + String[] readerSpiNames = spi.getImageReaderSpiNames(); + if (readerSpiNames != null && readerSpiNames.length == 0) { + error("readerSpiNames.length == 0!"); + } + } + + private void resetConstructorArguments() { + vendorName = null; + version = null; + names = null; + suffixes = null; + MIMETypes = null; + readerClassName = null; + inputTypes = null; + outputTypes = null; + writerSpiNames = null; + readerSpiNames = null; + nativeStreamMetadataFormatName = null; + nativeStreamMetadataFormatClassName = null; + extraStreamMetadataFormatNames = null; + extraStreamMetadataFormatClassNames = null; + nativeImageMetadataFormatName = null; + nativeImageMetadataFormatClassName = null; + extraImageMetadataFormatNames = null; + extraImageMetadataFormatClassNames = null; + } + + private ImageReaderSpi constructImageReaderSpi() { + return new ImageReaderSpi(vendorName, + version, + names, + suffixes, + MIMETypes, + readerClassName, + inputTypes, + writerSpiNames, + false, + nativeStreamMetadataFormatName, + nativeStreamMetadataFormatClassName, + extraStreamMetadataFormatNames, + extraStreamMetadataFormatClassNames, + false, + nativeImageMetadataFormatName, + nativeImageMetadataFormatClassName, + extraImageMetadataFormatNames, + extraImageMetadataFormatClassNames) { + + public String getDescription(Locale locale) { + return null; + } + + public boolean canDecodeInput(Object source) { + return false; + } + + public ImageReader createReaderInstance(Object extension) { + return null; + } + }; + } + + private ImageWriterSpi constructImageWriterSpi() { + return new ImageWriterSpi(vendorName, + version, + names, + suffixes, + MIMETypes, + writerClassName, + outputTypes, + readerSpiNames, + false, + nativeStreamMetadataFormatName, + nativeStreamMetadataFormatClassName, + extraStreamMetadataFormatNames, + extraStreamMetadataFormatClassNames, + false, + nativeImageMetadataFormatName, + nativeImageMetadataFormatClassName, + extraImageMetadataFormatNames, + extraImageMetadataFormatClassNames) { + + public String getDescription(Locale locale) { + return null; + } + + public boolean canEncodeImage(ImageTypeSpecifier type) { + return false; + } + + public ImageWriter createWriterInstance(Object extension) { + return null; + } + }; + } + + private void checkImageReaderSpiConstructor(boolean shouldFail) { + boolean gotIAE = false; + try { + constructImageReaderSpi(); + } catch (Exception e) { + if (!(e instanceof IllegalArgumentException)) { + error("Got exception " + e); + } else { + gotIAE = true; + } + } + if (gotIAE != shouldFail) { + if (gotIAE) { + error("ImageReaderSpi constructor threw an IAE!"); + } else { + error("ImageReaderSpi constructor didn't throw an IAE!"); + } + } + } + + private void checkImageWriterSpiConstructor(boolean shouldFail) { + boolean gotIAE = false; + try { + constructImageWriterSpi(); + } catch (Exception e) { + if (!(e instanceof IllegalArgumentException)) { + error("Got exception " + e); + } else { + gotIAE = true; + } + } + if (gotIAE != shouldFail) { + if (gotIAE) { + error("ImageWriterSpi constructor threw an IAE!"); + } else { + error("ImageWriterSpi constructor didn't throw an IAE!"); + } + } + } + + public void testImageReaderSpiConstructor() { + resetConstructorArguments(); + + checkImageReaderSpiConstructor(true); + vendorName = "My Vendor"; + checkImageReaderSpiConstructor(true); + version = "My Version"; + checkImageReaderSpiConstructor(true); + names = new String[0]; + checkImageReaderSpiConstructor(true); + names = new String[1]; + names[0] = "My Format Name"; + checkImageReaderSpiConstructor(true); + readerClassName = "com.mycompany.Reader"; + checkImageReaderSpiConstructor(true); + inputTypes = new Class[0]; + checkImageReaderSpiConstructor(true); + inputTypes = new Class[1]; + inputTypes[0] = Object.class; + // Now it should work + checkImageReaderSpiConstructor(false); + + // Test normalization of zero-length arrays + suffixes = new String[0]; + MIMETypes = new String[0]; + writerSpiNames = new String[0]; + extraStreamMetadataFormatNames = new String[0]; + extraImageMetadataFormatNames = new String[0]; + + ImageReaderSpi spi = constructImageReaderSpi(); + if (spi.getFileSuffixes() != null) { + error("Failed to normalize suffixes!"); + } + if (spi.getMIMETypes() != null) { + error("Failed to normalize MIMETypes!"); + } + if (spi.getImageWriterSpiNames() != null) { + error("Failed to normalize writerSpiNames!"); + } + if (spi.getExtraStreamMetadataFormatNames() != null) { + error("Failed to normalize extraStreamMetadataFormatNames!"); + } + if (spi.getExtraImageMetadataFormatNames() != null) { + error("Failed to normalize extraImageMetadataFormatNames!"); + } + } + + public void testImageWriterSpiConstructor() { + resetConstructorArguments(); + + checkImageWriterSpiConstructor(true); + vendorName = "My Vendor"; + checkImageWriterSpiConstructor(true); + version = "My Version"; + checkImageWriterSpiConstructor(true); + names = new String[0]; + checkImageWriterSpiConstructor(true); + names = new String[1]; + names[0] = "My Format Name"; + checkImageWriterSpiConstructor(true); + writerClassName = "com.mycompany.Writer"; + checkImageWriterSpiConstructor(true); + outputTypes = new Class[0]; + checkImageWriterSpiConstructor(true); + outputTypes = new Class[1]; + outputTypes[0] = Object.class; + // Now it should work + checkImageWriterSpiConstructor(false); + + // Test normalization of zero-length arrays + suffixes = new String[0]; + MIMETypes = new String[0]; + readerSpiNames = new String[0]; + extraStreamMetadataFormatNames = new String[0]; + extraStreamMetadataFormatClassNames = new String[0]; + extraImageMetadataFormatNames = new String[0]; + extraImageMetadataFormatClassNames = new String[0]; + + ImageWriterSpi spi = constructImageWriterSpi(); + if (spi.getFileSuffixes() != null) { + error("Failed to normalize suffixes!"); + } + if (spi.getMIMETypes() != null) { + error("Failed to normalize MIMETypes!"); + } + if (spi.getImageReaderSpiNames() != null) { + error("Failed to normalize readerSpiNames!"); + } + if (spi.getExtraStreamMetadataFormatNames() != null) { + error("Failed to normalize extraStreamMetadataFormatNames!"); + } + if (spi.getExtraImageMetadataFormatNames() != null) { + error("Failed to normalize extraImageMetadataFormatNames!"); + } + } + + public SpiTest() { + testImageReaderSpiConstructor(); + testImageWriterSpiConstructor(); + + ServiceRegistry registry = IIORegistry.getDefaultInstance(); + Iterator readers = registry.getServiceProviders(ImageReaderSpi.class, + false); + while (readers.hasNext()) { + ImageReaderSpi rspi = (ImageReaderSpi)readers.next(); + System.out.println("*** Testing " + rspi.getClass().getName()); + testSpi(rspi); + } + + Iterator writers = registry.getServiceProviders(ImageWriterSpi.class, + false); + while (writers.hasNext()) { + ImageWriterSpi wspi = (ImageWriterSpi)writers.next(); + System.out.println("*** Testing " + wspi.getClass().getName()); + testSpi(wspi); + } + } + + public static void main(String[] args) { + new SpiTest(); + } +} diff --git a/jdk/test/javax/imageio/spi/SpiVersionNumbers.java b/jdk/test/javax/imageio/spi/SpiVersionNumbers.java new file mode 100644 index 00000000000..0d3b1a3010c --- /dev/null +++ b/jdk/test/javax/imageio/spi/SpiVersionNumbers.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4415450 + * @summary Checks the version number for the standard stream Spis + * @modules java.desktop/com.sun.imageio.spi + */ + +import javax.imageio.spi.IIOServiceProvider; + +import com.sun.imageio.spi.FileImageInputStreamSpi; +import com.sun.imageio.spi.FileImageOutputStreamSpi; +import com.sun.imageio.spi.InputStreamImageInputStreamSpi; +import com.sun.imageio.spi.OutputStreamImageOutputStreamSpi; +import com.sun.imageio.spi.RAFImageInputStreamSpi; +import com.sun.imageio.spi.RAFImageOutputStreamSpi; + +public class SpiVersionNumbers { + + private static void check(IIOServiceProvider spi) { + String version = spi.getVersion(); + if (!version.equals("1.0")) { + throw new RuntimeException("Provider " + + spi.getClass().getName() + + " has version " + version + "!"); + } + } + + public static void main(String[] args) { + check(new FileImageInputStreamSpi()); + check(new InputStreamImageInputStreamSpi()); + check(new RAFImageInputStreamSpi()); + + check(new FileImageOutputStreamSpi()); + check(new OutputStreamImageOutputStreamSpi()); + check(new RAFImageOutputStreamSpi()); + } + +} diff --git a/jdk/test/demo/jvmti/heapTracker/HeapTrackerTest.java b/jdk/test/javax/imageio/stream/BitPadding.java similarity index 51% rename from jdk/test/demo/jvmti/heapTracker/HeapTrackerTest.java rename to jdk/test/javax/imageio/stream/BitPadding.java index 68c2eb75ff8..819e2c58e9b 100644 --- a/jdk/test/demo/jvmti/heapTracker/HeapTrackerTest.java +++ b/jdk/test/javax/imageio/stream/BitPadding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -21,32 +21,38 @@ * questions. */ - -/* @test - * @bug 5050116 6299047 - * @summary Test jvmti demo heapTracker - * - * @compile ../DemoRun.java - * @compile ../HeapUser.java - * @build HeapTrackerTest - * @run main HeapTrackerTest HeapUser +/* + * @test + * @bug 4430395 + * @summary Checks if write(int) properly pads unwritten bits with zeros */ -public class HeapTrackerTest { +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; - public static void main(String args[]) throws Exception { - DemoRun demo; +import javax.imageio.stream.FileCacheImageOutputStream; - /* Run demo that uses JVMTI heapTracker agent (no options) */ - demo = new DemoRun("heapTracker", "" /* options to heapTracker */ ); - demo.runit(args[0]); +public class BitPadding { - /* Make sure patterns in output look ok */ - if (demo.output_contains("ERROR")) { - throw new RuntimeException("Test failed - ERROR seen in output"); + public static void main(String[] args) throws IOException { + OutputStream ostream = new ByteArrayOutputStream(); + File f = null; + FileCacheImageOutputStream fcios = + new FileCacheImageOutputStream(ostream, f); + fcios.writeBit(1); + fcios.write(96); + + fcios.seek(0); + int r1 = fcios.read(); + if (r1 != 128 ) { + throw new RuntimeException("Failed, first byte is " + r1); } - /* Must be a pass. */ - System.out.println("Test passed - cleanly terminated"); + int r2 = fcios.read(); + if (r2 != 96) { + throw new RuntimeException("Failed, second byte is " + r2); + } } } diff --git a/jdk/test/javax/imageio/stream/DeleteOnExitTest.java b/jdk/test/javax/imageio/stream/DeleteOnExitTest.java new file mode 100644 index 00000000000..02112e5a8d5 --- /dev/null +++ b/jdk/test/javax/imageio/stream/DeleteOnExitTest.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.stream.ImageInputStream; +import javax.imageio.stream.ImageOutputStream; + +public class DeleteOnExitTest { + public static void main(String[] args) throws IOException { + ByteArrayInputStream is = + new ByteArrayInputStream(new byte[100]); + ByteArrayOutputStream os = + new ByteArrayOutputStream(); + + String tmp = System.getProperty("java.io.tmpdir", "."); + System.out.println("tmp: " + tmp); + + // count number of files before test + ImageIO.setUseCache(true); + ImageIO.setCacheDirectory(new File(tmp)); + + File tmpDir = ImageIO.getCacheDirectory(); + System.out.println("tmpDir is " + tmpDir); + int fnum_before = tmpDir.list().length; + System.out.println("Files before test: " + fnum_before); + + ImageInputStream iis = + ImageIO.createImageInputStream(is); + System.out.println("iis = " + iis); + + ImageInputStream iis2 = + ImageIO.createImageInputStream(is); + + ImageOutputStream ios = + ImageIO.createImageOutputStream(os); + System.out.println("ios = " + ios); + + ImageOutputStream ios2 = + ImageIO.createImageOutputStream(os); + + iis2.close(); + ios2.close(); + int fnum_after = tmpDir.list().length; + System.out.println("Files after test: " + fnum_after); + + if (fnum_before == fnum_after) { + throw new RuntimeException("Test failed: cache was not used."); + } + } +} diff --git a/jdk/test/javax/imageio/stream/DeleteOnExitTest.sh b/jdk/test/javax/imageio/stream/DeleteOnExitTest.sh new file mode 100644 index 00000000000..feafda7bf25 --- /dev/null +++ b/jdk/test/javax/imageio/stream/DeleteOnExitTest.sh @@ -0,0 +1,69 @@ +# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. + +# @test +# @bug 6291034 +# @run shell DeleteOnExitTest.sh +# @summary Verify that temporary imageio files files are deleted on VM exit. + +if [ -z "${TESTSRC}" ]; then + echo "TESTSRC undefined: defaulting to ." + TESTSRC=. +fi + +if [ -z "${TESTCLASSES}" ]; then + echo "TESTCLASSES undefined: defaulting to ." + TESTCLASSES=. +fi + +if [ -z "${TESTJAVA}" ]; then + echo "TESTJAVA undefined: can't continue." + exit 1 +fi + +echo "TESTJAVA=${TESTJAVA}" +echo "TESTSRC=${TESTSRC}" +echo "TESTCLASSES=${TESTCLASSES}" +cd ${TESTSRC} +${COMPILEJAVA}/bin/javac -d ${TESTCLASSES} DeleteOnExitTest.java + +cd ${TESTCLASSES} + +numfiles0=`ls ${TESTCLASSES} | grep "imageio*.tmp" | wc -l` + +${TESTJAVA}/bin/java ${TESTVMOPTS} \ + -Djava.io.tmpdir=${TESTCLASSES} DeleteOnExitTest + +if [ $? -ne 0 ] + then + echo "Test fails: exception thrown!" + exit 1 +fi + +numfiles1=`ls ${TESTCLASSES} | grep "imageio*.tmp" | wc -l` + +if [ $numfiles0 -ne $numfiles1 ] + then + echo "Test fails: tmp file exists!" + exit 1 +fi +echo "Test passed." +exit 0 diff --git a/jdk/test/sun/security/krb5/auto/BadKdc4.java b/jdk/test/javax/imageio/stream/FileCacheImageInputStreamNullTest.java similarity index 58% rename from jdk/test/sun/security/krb5/auto/BadKdc4.java rename to jdk/test/javax/imageio/stream/FileCacheImageInputStreamNullTest.java index 8d64db2faca..cea2f67c782 100644 --- a/jdk/test/sun/security/krb5/auto/BadKdc4.java +++ b/jdk/test/javax/imageio/stream/FileCacheImageInputStreamNullTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -23,28 +23,27 @@ /* * @test - * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc4 - * @summary krb5 should not try to access unavailable kdc too often + * @bug 4428802 + * @summary Checks for IAE from FileCacheImageInputStream constructor with a + * null value for 'stream' */ -import java.io.*; -import java.security.Security; +import javax.imageio.stream.FileCacheImageInputStream; -public class BadKdc4 { +public class FileCacheImageInputStreamNullTest { - public static void main(String[] args) - throws Exception { - Security.setProperty("krb5.kdc.bad.policy", ""); - BadKdc.go( - "121212222222(32){1,3}121212222222(32){1,3}", - "121212222222(32){1,3}121212222222(32){1,3}", - // refresh - "121212222222(32){1,3}121212222222(32){1,3}", - // k3 off k2 on - "121212(22){1,3}121212(22){1,3}", - // k1 on - "(12){2,4}" - ); + public static void main (String[] args) throws Exception { + boolean gotIAE = false; + try { + FileCacheImageInputStream fciis = + new FileCacheImageInputStream(null, null); + } catch (IllegalArgumentException e) { + gotIAE = true; + } + + if (!gotIAE) { + throw new RuntimeException + ("Failed to get IllegalArgumentException!"); + } } } diff --git a/jdk/test/javax/imageio/stream/FlushBefore.java b/jdk/test/javax/imageio/stream/FlushBefore.java new file mode 100644 index 00000000000..9902e4f07c8 --- /dev/null +++ b/jdk/test/javax/imageio/stream/FlushBefore.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4431503 + * @summary Checks if flushBefore(pos) throws an IndexOutOfBoundsException if + * pos lies in the flushed portion of the stream + */ + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; + +import javax.imageio.stream.FileCacheImageOutputStream; +import javax.imageio.stream.ImageOutputStream; +import javax.imageio.stream.MemoryCacheImageOutputStream; + +public class FlushBefore { + + public static void main(String[] args) throws IOException { + OutputStream ostream = new ByteArrayOutputStream(); + + FileCacheImageOutputStream fcios = + new FileCacheImageOutputStream(ostream, null); + test(fcios); + + MemoryCacheImageOutputStream mcios = + new MemoryCacheImageOutputStream(ostream); + test(mcios); + } + + private static void test(ImageOutputStream ios) throws IOException { + try { + ios.write(new byte[10], 0, 10); + ios.flushBefore(5); + ios.flushBefore(4); + + throw new RuntimeException + ("Failed to get IndexOutOfBoundsException!"); + } catch (IndexOutOfBoundsException e) { + } + } +} diff --git a/jdk/test/javax/imageio/stream/MemoryCacheImageOutputStreamTest.java b/jdk/test/javax/imageio/stream/MemoryCacheImageOutputStreamTest.java new file mode 100644 index 00000000000..f6690e96fb1 --- /dev/null +++ b/jdk/test/javax/imageio/stream/MemoryCacheImageOutputStreamTest.java @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4417672 4422328 + * @summary Checks the functionality of MemoryCacheImageOutputStream + * particularly with regard to seeking and flushing + */ + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.stream.ImageOutputStream; +import javax.imageio.stream.MemoryCacheImageOutputStream; + +public class MemoryCacheImageOutputStreamTest { + + public static void main(String[] args) throws IOException { + try { + MemoryCacheImageOutputStream stream = + new MemoryCacheImageOutputStream(new ByteArrayOutputStream()); + stream.write(0); // or write anything, for that matter + stream.flush(); + } catch (Exception e) { + throw new RuntimeException("Error flushing stream: " + e); + } + + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ImageOutputStream ios = new MemoryCacheImageOutputStream(os); + + byte[] b = new byte[30*256]; + byte byteVal = (byte)0; + for (int i = 0; i < b.length; i++) { + b[i] = byteVal++; + } + + // Write 261,120 bytes + for (int i = 0; i < 34; i++) { + ios.write(b); + } + // Scatter 256 values at positions 1000, 2000, ... + // Using both write(int) and write(byte[]) + byte[] buf = new byte[1]; + for (int i = 0; i < 256; i += 2) { + ios.seek(1000*i); + ios.write(i); + + ios.seek(1000*(i + 1)); + buf[0] = (byte)(i + 1); + ios.write(buf); + } + + // Re-read scattered values + for (int i = 0; i < 256; i++) { + ios.seek(1000*i); + int val = ios.read(); + if (val != i) { + System.out.println("Got bad value (1) at pos = " + (1000*i)); + } + } + + // Discard two buffers and re-read scattered values + ios.flushBefore(2*8192); + + for (int i = 0; i < 256; i++) { + long pos = 1000*i; + if (pos >= 2*8192) { + ios.seek(pos); + int val = ios.read(); + if (val != i) { + System.out.println("Got bad value (2) at pos = " + (1000*i)); + } + } + } + ios.close(); + + byte[] data = os.toByteArray(); + for (int i = 0; i < data.length; i++) { + byte val = data[i]; + if ((i < 256000) && (i % 1000) == 0) { + if (val != (byte)(i/1000)) { + System.out.println("Got bad value (3) at pos = " + i); + } + } else { + byte gval = (byte)((i % (30*256)) % 256); + if (val != gval) { + System.out.println("Got bad value (4) at pos = " + i + + "(got " + (val & 0xff) + + " wanted " + (gval & 0xff) +")"); + } + } + } + } +} diff --git a/jdk/test/javax/imageio/stream/ReadBytesIIOByteBuffer.java b/jdk/test/javax/imageio/stream/ReadBytesIIOByteBuffer.java new file mode 100644 index 00000000000..483c53b8a00 --- /dev/null +++ b/jdk/test/javax/imageio/stream/ReadBytesIIOByteBuffer.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4446906 + * @summary Checks if ImageInputStreamImpl.readBytes(IIOByteBuffer) tests for + * len < 0 + */ + +import java.io.ByteArrayInputStream; +import java.io.InputStream; + +import javax.imageio.stream.IIOByteBuffer; +import javax.imageio.stream.ImageInputStream; +import javax.imageio.stream.MemoryCacheImageInputStream; + +public class ReadBytesIIOByteBuffer { + + public static void main(String[] argv) { + byte[] bar = {1, 1, 1}; + InputStream is = new ByteArrayInputStream(bar); + + ImageInputStream iis = new MemoryCacheImageInputStream(is); + byte[] b = new byte[10]; + IIOByteBuffer iiob = new IIOByteBuffer(b, 0, b.length); + try { + iis.readBytes(iiob, -1); + } catch (IndexOutOfBoundsException e) { + return; + } catch (Exception e) { + throw new RuntimeException("Unexpected exception: " + e); + } + throw new RuntimeException("No exception thrown for len < 0!"); + } +} diff --git a/jdk/test/javax/imageio/stream/ReadFullyTest.java b/jdk/test/javax/imageio/stream/ReadFullyTest.java new file mode 100644 index 00000000000..ef3ac9052a7 --- /dev/null +++ b/jdk/test/javax/imageio/stream/ReadFullyTest.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4422263 + * @summary Checks that ImageInputStream.readFully(type[], int int) handles sign + * extension and byte ordering correctly + */ + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.nio.ByteOrder; + +import javax.imageio.stream.ImageInputStream; +import javax.imageio.stream.MemoryCacheImageInputStream; + +public class ReadFullyTest { + + static final ByteOrder bigEndian = ByteOrder.BIG_ENDIAN; + static final ByteOrder littleEndian = ByteOrder.LITTLE_ENDIAN; + + private static void expect(long e, long g) { + if (e != g) { + throw new RuntimeException("Expected " + e + ", got " + g); + } + } + + public static void main (String args[]) { + try { + byte[] b = { + (byte)0x11, (byte)0x22, // low low + (byte)0x44, (byte)0x99, // low high + (byte)0xAA, (byte)0x33, // high low + (byte)0xBB, (byte)0xCC // high high + }; + InputStream in = new ByteArrayInputStream(b); + ImageInputStream iin = new MemoryCacheImageInputStream(in); + + short[] s = new short[b.length/2]; + char[] c = new char[b.length/2]; + int[] i = new int[b.length/4]; + long[] l = new long[b.length/8]; + float[] f = new float[b.length/4]; + double[] d = new double[b.length/8]; + + iin.seek(0L); + iin.setByteOrder(bigEndian); + iin.readFully(s, 0, s.length); + expect(s[0] & 0xffff, 0x1122); + expect(s[1] & 0xffff, 0x4499); + expect(s[2] & 0xffff, 0xAA33); + expect(s[3] & 0xffff, 0xBBCC); + + iin.seek(0L); + iin.setByteOrder(littleEndian); + iin.readFully(s, 0, s.length); + expect(s[0] & 0xffff, 0x2211); + expect(s[1] & 0xffff, 0x9944); + expect(s[2] & 0xffff, 0x33AA); + expect(s[3] & 0xffff, 0xCCBB); + + iin.seek(0L); + iin.setByteOrder(bigEndian); + iin.readFully(c, 0, c.length); + expect(c[0], 0x1122); + expect(c[1], 0x4499); + expect(c[2], 0xAA33); + expect(c[3], 0xBBCC); + + iin.seek(0L); + iin.setByteOrder(littleEndian); + iin.readFully(c, 0, c.length); + expect(c[0], 0x2211); + expect(c[1], 0x9944); + expect(c[2], 0x33AA); + expect(c[3], 0xCCBB); + + iin.seek(0L); + iin.setByteOrder(bigEndian); + iin.readFully(i, 0, i.length); + expect(i[0] & 0xffffffff, 0x11224499); + expect(i[1] & 0xffffffff, 0xAA33BBCC); + + iin.seek(0L); + iin.setByteOrder(littleEndian); + iin.readFully(i, 0, i.length); + expect(i[0] & 0xffffffff, 0x99442211); + expect(i[1] & 0xffffffff, 0xCCBB33AA); + + iin.seek(0L); + iin.setByteOrder(bigEndian); + iin.readFully(f, 0, f.length); + expect(Float.floatToIntBits(f[0]) & 0xffffffff, 0x11224499); + expect(Float.floatToIntBits(f[1]) & 0xffffffff, 0xAA33BBCC); + + iin.seek(0L); + iin.setByteOrder(littleEndian); + iin.readFully(f, 0, f.length); + expect(Float.floatToIntBits(f[0]) & 0xffffffff, 0x99442211); + expect(Float.floatToIntBits(f[1]) & 0xffffffff, 0xCCBB33AA); + + iin.seek(0L); + iin.setByteOrder(bigEndian); + iin.readFully(l, 0, l.length); + expect(l[0], 0x11224499AA33BBCCL); + + iin.seek(0L); + iin.setByteOrder(littleEndian); + iin.readFully(l, 0, l.length); + expect(l[0], 0xCCBB33AA99442211L); + + iin.seek(0L); + iin.setByteOrder(bigEndian); + iin.readFully(d, 0, d.length); + expect(Double.doubleToLongBits(d[0]), 0x11224499AA33BBCCL); + + iin.seek(0L); + iin.setByteOrder(littleEndian); + iin.readFully(d, 0, d.length); + expect(Double.doubleToLongBits(d[0]), 0xCCBB33AA99442211L); + } catch (Exception ex) { + throw new RuntimeException("Got exception " + ex); + } + } +} diff --git a/jdk/test/javax/imageio/stream/ReadUnsignedIntTest.java b/jdk/test/javax/imageio/stream/ReadUnsignedIntTest.java new file mode 100644 index 00000000000..878f34d363f --- /dev/null +++ b/jdk/test/javax/imageio/stream/ReadUnsignedIntTest.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4949609 + * @summary Tests that the readUnsignedInt returns the positive value + */ + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.stream.ImageInputStream; + +public class ReadUnsignedIntTest { + + public static void main(String[] args) throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(baos); + + dos.writeInt(1); + dos.writeInt(0x7fffffff); + dos.writeInt(0x8fffffff); + dos.writeInt(0xffffffff); + + dos.close(); + + ByteArrayInputStream bais = + new ByteArrayInputStream(baos.toByteArray()); + ImageInputStream iis = ImageIO.createImageInputStream(bais); + for (int i=0; i<4; i++) { + long res = iis.readUnsignedInt(); + if (res <= 0) { + throw new RuntimeException("Negative number was read: "+ + Long.toString(res, 16)); + } + } + } +} diff --git a/jdk/test/javax/imageio/stream/StreamFlush.java b/jdk/test/javax/imageio/stream/StreamFlush.java new file mode 100644 index 00000000000..fe0569ee445 --- /dev/null +++ b/jdk/test/javax/imageio/stream/StreamFlush.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4414990 4415041 + * @summary Checks that the output is flushed properly when using various + * ImageOutputStreams and writers + */ + +import java.awt.image.BufferedImage; +import java.io.BufferedOutputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.imageio.stream.ImageOutputStream; + +public class StreamFlush { + + public static void main(String[] args) throws IOException { + ImageIO.setUseCache(true); + + // Create a FileImageOutputStream from a FileOutputStream + File temp1 = File.createTempFile("imageio", ".tmp"); + temp1.deleteOnExit(); + ImageOutputStream fios = ImageIO.createImageOutputStream(temp1); + + // Create a FileCacheImageOutputStream from a BufferedOutputStream + File temp2 = File.createTempFile("imageio", ".tmp"); + temp2.deleteOnExit(); + FileOutputStream fos2 = new FileOutputStream(temp2); + BufferedOutputStream bos = new BufferedOutputStream(fos2); + ImageOutputStream fcios1 = ImageIO.createImageOutputStream(bos); + + // Create a FileCacheImageOutputStream from a ByteArrayOutputStream + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageOutputStream fcios2 = ImageIO.createImageOutputStream(baos); + + BufferedImage bi = + new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR); + + ImageIO.write(bi, "jpg", fios); // No bug, check it anyway + ImageIO.write(bi, "png", fcios1); // Bug 4414990 + ImageIO.write(bi, "jpg", fcios2); // Bug 4415041 + + // It should not be necessary to flush any of the streams + // If flushing does make a difference, it indicates a bug + // in the writer or the stream implementation + + // Get length of temp1 before and after flushing + long file1NoFlushLength = temp1.length(); + fios.flush(); + long file1FlushLength = temp1.length(); + + // Get length of temp2 before and after flushing + long file2NoFlushLength = temp2.length(); + fcios1.flush(); + bos.flush(); + long file2FlushLength = temp2.length(); + + byte[] b0 = baos.toByteArray(); + int cacheNoFlushLength = b0.length; + fcios2.flush(); + byte[] b1 = baos.toByteArray(); + int cacheFlushLength = b1.length; + + if (file1NoFlushLength != file1FlushLength) { + // throw new RuntimeException + System.out.println + ("FileImageOutputStream not flushed!"); + } + + if (file2NoFlushLength != file2FlushLength) { + // throw new RuntimeException + System.out.println + ("FileCacheImageOutputStream/BufferedOutputStream not flushed!"); + } + + if (cacheNoFlushLength != cacheFlushLength) { + // throw new RuntimeException + System.out.println + ("FileCacheImageOutputStream/ByteArrayOutputStream not flushed!"); + } + } +} diff --git a/jdk/test/javax/imageio/stream/WriteBitsTest.java b/jdk/test/javax/imageio/stream/WriteBitsTest.java new file mode 100644 index 00000000000..7684ca235af --- /dev/null +++ b/jdk/test/javax/imageio/stream/WriteBitsTest.java @@ -0,0 +1,110 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4507868 + * @summary Checks that ImageOutputStreamImpl.writeBits() advances the stream + * position and bit offset correctly. Also verifies that the + * MemoryCacheImageOutputStream.read() variants reset the bitOffset + * before the read actually occurs. + */ + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import javax.imageio.stream.ImageOutputStream; +import javax.imageio.stream.MemoryCacheImageOutputStream; + +public class WriteBitsTest { + + private static void verify(ImageOutputStream ios, + long expstreampos, int expbitoffset) + throws IOException, RuntimeException + { + long actstreampos = ios.getStreamPosition(); + int actbitoffset = ios.getBitOffset(); + + if ((actstreampos != expstreampos) || + (actbitoffset != expbitoffset)) + { + System.err.println("Expected stream position: " + expstreampos + + " Actual: " + actstreampos); + System.err.println("Expected bit offset: " + expbitoffset + + " Actual: " + actbitoffset); + throw new RuntimeException("Test failed."); + } + } + + public static void main(String argv[]) throws RuntimeException { + ByteArrayOutputStream ostream = new ByteArrayOutputStream(); + MemoryCacheImageOutputStream mcios = new + MemoryCacheImageOutputStream(ostream); + + try { + // verify correct writeBits() functionality + long streampos = 0; + int bitoffset = 0; + + mcios.setBitOffset(bitoffset); + verify(mcios, streampos, bitoffset); + + bitoffset = 3; + mcios.setBitOffset(bitoffset); + verify(mcios, streampos, bitoffset); + + for (int incr = 3; incr <= 15; incr += 12) { + for (int i = 0; i < 64; i += incr) { + mcios.writeBits(10, incr); + + bitoffset += incr; + + if (bitoffset > 7) { + int stroffset = bitoffset / 8; + bitoffset = bitoffset % 8; + streampos += stroffset; + } + + verify(mcios, streampos, bitoffset); + } + } + + // verify correct read(byte[], int, int) functionality + byte[] bytearr = new byte[2]; + mcios.seek(2); + mcios.setBitOffset(3); + int numread = mcios.read(bytearr, 0, 2); + if (numread != 2) { + throw new RuntimeException("Error in mcios.read([BII)I"); + } + verify(mcios, 4, 0); + + // verify correct read() functionality + mcios.setBitOffset(3); + mcios.read(); + verify(mcios, 5, 0); + } catch (IOException e) { + throw new RuntimeException("Unexpected IOException: " + e); + } + } +} diff --git a/jdk/test/javax/management/ImplementationVersion/ImplVersionTest.java b/jdk/test/javax/management/ImplementationVersion/ImplVersionTest.java index ae454b5b7e0..cc77fced683 100644 --- a/jdk/test/javax/management/ImplementationVersion/ImplVersionTest.java +++ b/jdk/test/javax/management/ImplementationVersion/ImplVersionTest.java @@ -29,7 +29,7 @@ * test codebase has the java permission to read the "java.runtime.version" * system property. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean ImplVersionTest ImplVersionCommand * @run build ImplVersionTest ImplVersionCommand ImplVersionReader * @run main ImplVersionTest diff --git a/jdk/test/javax/management/Introspector/AnnotationSecurityTest.java b/jdk/test/javax/management/Introspector/AnnotationSecurityTest.java index 0afb509272c..43b466fbdf6 100644 --- a/jdk/test/javax/management/Introspector/AnnotationSecurityTest.java +++ b/jdk/test/javax/management/Introspector/AnnotationSecurityTest.java @@ -27,7 +27,10 @@ * @summary Test that having a security manager doesn't trigger a * NotCompliantMBeanException * @author Daniel Fuchs, Yves Joan - * @modules java.management + * + * @modules java.desktop + * java.management + * * @run clean AnnotationSecurityTest Described UnDescribed DescribedMBean * UnDescribedMBean SqeDescriptorKey DescribedMX DescribedMXBean * @run build AnnotationSecurityTest Described UnDescribed DescribedMBean diff --git a/jdk/test/javax/management/Introspector/AnnotationTest.java b/jdk/test/javax/management/Introspector/AnnotationTest.java index f14502f310e..7d0021d6e09 100644 --- a/jdk/test/javax/management/Introspector/AnnotationTest.java +++ b/jdk/test/javax/management/Introspector/AnnotationTest.java @@ -27,7 +27,7 @@ * @summary Test that annotations in Standard MBean interfaces * correctly produce Descriptor entries * @author Eamonn McManus - * @modules java.management + * * @run clean AnnotationTest * @run build AnnotationTest * @run main AnnotationTest diff --git a/jdk/test/javax/management/Introspector/ChangingNotifsTest.java b/jdk/test/javax/management/Introspector/ChangingNotifsTest.java index ec2043c624b..57451d64cbc 100644 --- a/jdk/test/javax/management/Introspector/ChangingNotifsTest.java +++ b/jdk/test/javax/management/Introspector/ChangingNotifsTest.java @@ -27,7 +27,7 @@ * @summary Check that Standard MBeans can change their MBeanNotificationInfo[] * and MXBeans cannot * @author Eamonn McManus - * @modules java.management + * * @run clean ChangingNotifsTest * @run build ChangingNotifsTest * @run main ChangingNotifsTest diff --git a/jdk/test/javax/management/Introspector/ClassLeakTest.java b/jdk/test/javax/management/Introspector/ClassLeakTest.java index 5fe43fdd193..c6136333493 100644 --- a/jdk/test/javax/management/Introspector/ClassLeakTest.java +++ b/jdk/test/javax/management/Introspector/ClassLeakTest.java @@ -26,7 +26,7 @@ * @bug 4909536 * @summary Ensure that the Introspector does not retain refs to classes * @author Eamonn McManus - * @modules java.management + * * @run clean ClassLeakTest * @run build ClassLeakTest * @run main ClassLeakTest diff --git a/jdk/test/javax/management/Introspector/DuplicateGetterTest.java b/jdk/test/javax/management/Introspector/DuplicateGetterTest.java index 7be19a00f4e..ec9ed438f41 100644 --- a/jdk/test/javax/management/Introspector/DuplicateGetterTest.java +++ b/jdk/test/javax/management/Introspector/DuplicateGetterTest.java @@ -27,7 +27,6 @@ * @summary Test that an MBean interface can inherit two methods with * the same signature from two unrelated parent interfaces * @author Eamonn McManus - * @modules java.management */ import java.util.*; diff --git a/jdk/test/javax/management/Introspector/FeatureOrderTest.java b/jdk/test/javax/management/Introspector/FeatureOrderTest.java index 96ad78efed2..d109abf741b 100644 --- a/jdk/test/javax/management/Introspector/FeatureOrderTest.java +++ b/jdk/test/javax/management/Introspector/FeatureOrderTest.java @@ -27,7 +27,6 @@ * @summary Test that attributes and operations appear in the same order * in MBeanInfo as they did in the Standard MBean or MXBean Interface. * @author Eamonn McManus - * @modules java.management */ /* diff --git a/jdk/test/javax/management/Introspector/GetMBeanInfoExceptionTest.java b/jdk/test/javax/management/Introspector/GetMBeanInfoExceptionTest.java index bfc71b73c41..7152e0dcd4c 100644 --- a/jdk/test/javax/management/Introspector/GetMBeanInfoExceptionTest.java +++ b/jdk/test/javax/management/Introspector/GetMBeanInfoExceptionTest.java @@ -27,7 +27,7 @@ * @summary Test that the exception thrown by DynamicMBean.getMBeanInfo() * keeps the init cause. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean GetMBeanInfoExceptionTest * @run build GetMBeanInfoExceptionTest * @run main GetMBeanInfoExceptionTest diff --git a/jdk/test/javax/management/Introspector/IdenticalMBeanInfoTest.java b/jdk/test/javax/management/Introspector/IdenticalMBeanInfoTest.java index 9cbad773c74..d9718949387 100644 --- a/jdk/test/javax/management/Introspector/IdenticalMBeanInfoTest.java +++ b/jdk/test/javax/management/Introspector/IdenticalMBeanInfoTest.java @@ -27,7 +27,7 @@ * @summary Check that MBeans with the same class have identical MBeanInfo * unless they are NotificationBroadcasters * @author Eamonn McManus - * @modules java.management + * * @run clean IdenticalMBeanInfoTest * @run build IdenticalMBeanInfoTest * @run main IdenticalMBeanInfoTest diff --git a/jdk/test/javax/management/Introspector/ImmutableNotificationInfoTest.java b/jdk/test/javax/management/Introspector/ImmutableNotificationInfoTest.java index 4880493868e..4c7467a5681 100644 --- a/jdk/test/javax/management/Introspector/ImmutableNotificationInfoTest.java +++ b/jdk/test/javax/management/Introspector/ImmutableNotificationInfoTest.java @@ -27,7 +27,7 @@ * @summary Check that a StandardMBean has immutableInfo=true if it is * a NotificationBroadcasterSupport that doesn't override getNotificationInfo() * @author Eamonn McManus - * @modules java.management + * * @run clean ImmutableNotificationInfoTest * @run build ImmutableNotificationInfoTest * @run main ImmutableNotificationInfoTest diff --git a/jdk/test/javax/management/Introspector/InvokeGettersTest.java b/jdk/test/javax/management/Introspector/InvokeGettersTest.java index 5dacf04b102..6036069a6f5 100644 --- a/jdk/test/javax/management/Introspector/InvokeGettersTest.java +++ b/jdk/test/javax/management/Introspector/InvokeGettersTest.java @@ -26,7 +26,7 @@ * @bug 6317101 * @summary Test that the jmx.invoke.getters system property works * @author Eamonn McManus - * @modules java.management + * * @run clean InvokeGettersTest * @run build InvokeGettersTest * @run main InvokeGettersTest diff --git a/jdk/test/javax/management/Introspector/IsMethodTest.java b/jdk/test/javax/management/Introspector/IsMethodTest.java index a1ec7dbb74d..8a719c628f3 100644 --- a/jdk/test/javax/management/Introspector/IsMethodTest.java +++ b/jdk/test/javax/management/Introspector/IsMethodTest.java @@ -26,7 +26,7 @@ * @bug 4947001 4954369 4954409 4954410 * @summary Test that "Boolean isX()" and "int isX()" define operations * @author Eamonn McManus - * @modules java.management + * * @run clean IsMethodTest * @run build IsMethodTest * @run main IsMethodTest diff --git a/jdk/test/javax/management/Introspector/LegacyConstructorPropertiesTest.java b/jdk/test/javax/management/Introspector/LegacyConstructorPropertiesTest.java index 4848aad5473..f8f33ec9e92 100644 --- a/jdk/test/javax/management/Introspector/LegacyConstructorPropertiesTest.java +++ b/jdk/test/javax/management/Introspector/LegacyConstructorPropertiesTest.java @@ -37,8 +37,10 @@ import javax.management.ObjectName; * j.b.ConstructorProperties and j.m.ConstructorProperties annotations * only j.m.ConstructorProperties annotation is considered. * @author Jaroslav Bachorik - * @modules java.management - * java.desktop + * + * @modules java.desktop + * java.management + * * @run main LegacyConstructorPropertiesTest */ diff --git a/jdk/test/javax/management/Introspector/NotAnMBeanTest.java b/jdk/test/javax/management/Introspector/NotAnMBeanTest.java index 4fccc43e9b5..3bcb68b8e27 100644 --- a/jdk/test/javax/management/Introspector/NotAnMBeanTest.java +++ b/jdk/test/javax/management/Introspector/NotAnMBeanTest.java @@ -26,7 +26,7 @@ * @bug 4914805 * @summary Ensure that the right exception is thrown for illegal MBeans * @author Eamonn McManus - * @modules java.management + * * @run clean NotAnMBeanTest * @run build NotAnMBeanTest * @run main NotAnMBeanTest diff --git a/jdk/test/javax/management/Introspector/NotCompliantCauseTest.java b/jdk/test/javax/management/Introspector/NotCompliantCauseTest.java index 063d30c9cbc..056f00c6527 100644 --- a/jdk/test/javax/management/Introspector/NotCompliantCauseTest.java +++ b/jdk/test/javax/management/Introspector/NotCompliantCauseTest.java @@ -27,7 +27,7 @@ * @summary Test that NotCompliantMBeanException has a cause in case of * type mapping problems. * @author Daniel Fuchs, Alexander Shusherov - * @modules java.management + * * @run clean NotCompliantCauseTest * @run build NotCompliantCauseTest * @run main NotCompliantCauseTest @@ -40,7 +40,6 @@ */ import java.util.Random; -import java.util.logging.Logger; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; @@ -54,12 +53,6 @@ import javax.management.openmbean.OpenDataException; */ public class NotCompliantCauseTest { - /** - * A logger for this class. - **/ - private static final Logger LOG = - Logger.getLogger(NotCompliantCauseTest.class.getName()); - /** * Creates a new instance of NotCompliantCauseTest */ diff --git a/jdk/test/javax/management/Introspector/SetWrongTypeAttributeTest.java b/jdk/test/javax/management/Introspector/SetWrongTypeAttributeTest.java index 111aec1a422..b1762d0efbe 100644 --- a/jdk/test/javax/management/Introspector/SetWrongTypeAttributeTest.java +++ b/jdk/test/javax/management/Introspector/SetWrongTypeAttributeTest.java @@ -27,7 +27,7 @@ * @summary Check that setting the wrong type of an attribute in a Standard * MBean or MXBean causes InvalidAttributeValueException * @author Eamonn McManus - * @modules java.management + * * @run clean SetWrongTypeAttributeTest * @run build SetWrongTypeAttributeTest * @run main SetWrongTypeAttributeTest diff --git a/jdk/test/javax/management/Introspector/UnregisterMBeanExceptionTest.java b/jdk/test/javax/management/Introspector/UnregisterMBeanExceptionTest.java index c2695d76dd7..d18a72bc5a7 100644 --- a/jdk/test/javax/management/Introspector/UnregisterMBeanExceptionTest.java +++ b/jdk/test/javax/management/Introspector/UnregisterMBeanExceptionTest.java @@ -28,7 +28,7 @@ * the supplied MBean although DynamicMBean.getMBeanInfo() throws * a runtime exception. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean UnregisterMBeanExceptionTest * @run build UnregisterMBeanExceptionTest * @run main UnregisterMBeanExceptionTest diff --git a/jdk/test/javax/management/MBeanInfo/EqualExceptionTest.java b/jdk/test/javax/management/MBeanInfo/EqualExceptionTest.java index 2e71b9d05a1..0f12667281f 100644 --- a/jdk/test/javax/management/MBeanInfo/EqualExceptionTest.java +++ b/jdk/test/javax/management/MBeanInfo/EqualExceptionTest.java @@ -26,7 +26,7 @@ * @bug 5071110 * @summary Test whether an null descriptor will cause an NullPointerException. * @author Shanliang JIANG - * @modules java.management + * * @run clean EqualExceptionTest * @run build EqualExceptionTest * @run main EqualExceptionTest diff --git a/jdk/test/javax/management/MBeanInfo/MBeanInfoEqualsNPETest.java b/jdk/test/javax/management/MBeanInfo/MBeanInfoEqualsNPETest.java index d433190d866..ff67ff71d6c 100644 --- a/jdk/test/javax/management/MBeanInfo/MBeanInfoEqualsNPETest.java +++ b/jdk/test/javax/management/MBeanInfo/MBeanInfoEqualsNPETest.java @@ -36,7 +36,7 @@ import javax.management.openmbean.SimpleType; * @bug 8023954 * @summary Test that MBean*Info.equals do not throw NPE * @author Shanliang JIANG - * @modules java.management + * * @run clean MBeanInfoEqualsNPETest * @run build MBeanInfoEqualsNPETest * @run main MBeanInfoEqualsNPETest diff --git a/jdk/test/javax/management/MBeanInfo/MBeanInfoEqualsTest.java b/jdk/test/javax/management/MBeanInfo/MBeanInfoEqualsTest.java index 239cf5ceac9..f2dfeb90a88 100644 --- a/jdk/test/javax/management/MBeanInfo/MBeanInfoEqualsTest.java +++ b/jdk/test/javax/management/MBeanInfo/MBeanInfoEqualsTest.java @@ -26,7 +26,7 @@ * @bug 4719923 * @summary Test that MBeanInfo.equals works even for mutable subclasses * @author Eamonn McManus - * @modules java.management + * * @run clean MBeanInfoEqualsTest * @run build MBeanInfoEqualsTest * @run main MBeanInfoEqualsTest diff --git a/jdk/test/javax/management/MBeanInfo/MBeanInfoHashCodeNPETest.java b/jdk/test/javax/management/MBeanInfo/MBeanInfoHashCodeNPETest.java index 2a175d76305..ee322338a4d 100644 --- a/jdk/test/javax/management/MBeanInfo/MBeanInfoHashCodeNPETest.java +++ b/jdk/test/javax/management/MBeanInfo/MBeanInfoHashCodeNPETest.java @@ -35,7 +35,7 @@ import javax.management.openmbean.SimpleType; * @bug 8023669 * @summary Test that hashCode()throws NullPointerException * @author Shanliang JIANG - * @modules java.management + * * @run clean MBeanInfoHashCodeNPETest * @run build MBeanInfoHashCodeNPETest * @run main MBeanInfoHashCodeNPETest diff --git a/jdk/test/javax/management/MBeanInfo/NullInfoArraysTest.java b/jdk/test/javax/management/MBeanInfo/NullInfoArraysTest.java index c608d787f38..ca0c3321057 100644 --- a/jdk/test/javax/management/MBeanInfo/NullInfoArraysTest.java +++ b/jdk/test/javax/management/MBeanInfo/NullInfoArraysTest.java @@ -27,7 +27,7 @@ * @summary Test that an MBeanInfo works even if it is deserialized from * an implementation where its array fields can be null. * @author Eamonn McManus - * @modules java.management + * * @run clean NullInfoArraysTest * @run build NullInfoArraysTest * @run main NullInfoArraysTest diff --git a/jdk/test/javax/management/MBeanInfo/SerializationTest.java b/jdk/test/javax/management/MBeanInfo/SerializationTest.java index c83fd92e9db..0781cdb4fca 100644 --- a/jdk/test/javax/management/MBeanInfo/SerializationTest.java +++ b/jdk/test/javax/management/MBeanInfo/SerializationTest.java @@ -26,7 +26,7 @@ * @bug 6288100 * @summary Test the new serialization/deserialization methods. * @author Shanliang JIANG - * @modules java.management + * * @run clean SerializationTest * @run build SerializationTest * @run main SerializationTest diff --git a/jdk/test/javax/management/MBeanInfo/SerializationTest1.java b/jdk/test/javax/management/MBeanInfo/SerializationTest1.java index a33898a6a8f..6ccd2066df1 100644 --- a/jdk/test/javax/management/MBeanInfo/SerializationTest1.java +++ b/jdk/test/javax/management/MBeanInfo/SerializationTest1.java @@ -26,7 +26,7 @@ * @bug 6783290 * @summary Test correct reading of an empty Descriptor. * @author Jaroslav Bachorik - * @modules java.management + * * @run clean SerializationTest1 * @run build SerializationTest1 * @run main SerializationTest1 diff --git a/jdk/test/javax/management/MBeanInfo/TooManyFooTest.java b/jdk/test/javax/management/MBeanInfo/TooManyFooTest.java index 55782e4d68d..03be5670344 100644 --- a/jdk/test/javax/management/MBeanInfo/TooManyFooTest.java +++ b/jdk/test/javax/management/MBeanInfo/TooManyFooTest.java @@ -27,7 +27,7 @@ * @summary Test that a method inherited from two different interfaces * appears only once in MBeanInfo. * @author dfuchs - * @modules java.management + * * @run clean TooManyFooTest * @run build TooManyFooTest * @run main TooManyFooTest @@ -55,12 +55,6 @@ import javax.management.openmbean.OpenMBeanOperationInfo; */ public class TooManyFooTest { - /** - * A logger for this class. - **/ - private static final Logger LOG = - Logger.getLogger(TooManyFooTest.class.getName()); - public static class NumberHolder { public Integer getNumber() { return 0;} public void setNumber(Integer n) {}; diff --git a/jdk/test/javax/management/MBeanServer/AttributeListTypeSafeTest.java b/jdk/test/javax/management/MBeanServer/AttributeListTypeSafeTest.java index 3fec474ebfe..602e1f2ebd2 100644 --- a/jdk/test/javax/management/MBeanServer/AttributeListTypeSafeTest.java +++ b/jdk/test/javax/management/MBeanServer/AttributeListTypeSafeTest.java @@ -26,7 +26,6 @@ * @bug 6336968 * @summary Test adding non-Attribute values to an AttributeList. * @author Eamonn McManus - * @modules java.management */ import java.util.Collections; diff --git a/jdk/test/javax/management/MBeanServer/MBeanExceptionTest.java b/jdk/test/javax/management/MBeanServer/MBeanExceptionTest.java index 4e908b39766..31b8530e3e8 100644 --- a/jdk/test/javax/management/MBeanServer/MBeanExceptionTest.java +++ b/jdk/test/javax/management/MBeanServer/MBeanExceptionTest.java @@ -28,8 +28,7 @@ * RuntimeMBeanException and (for Standard MBeans) that checked exceptions * are wrapped in MBeanException * @author Eamonn McManus - * @modules java.management - * @compile MBeanExceptionTest.java + * * @run main MBeanExceptionTest */ diff --git a/jdk/test/javax/management/MBeanServer/MBeanFallbackTest.java b/jdk/test/javax/management/MBeanServer/MBeanFallbackTest.java index b6ab026f801..6cf508598de 100644 --- a/jdk/test/javax/management/MBeanServer/MBeanFallbackTest.java +++ b/jdk/test/javax/management/MBeanServer/MBeanFallbackTest.java @@ -33,7 +33,7 @@ import javax.management.ObjectName; * It needs to be a separate class because the "jdk.jmx.mbeans.allowNonPublic" * system property must be set before c.s.j.m.MBeanAnalyzer has been loaded. * @author Jaroslav Bachorik - * @modules java.management + * * @run clean MBeanFallbackTest * @run build MBeanFallbackTest * @run main/othervm -Djdk.jmx.mbeans.allowNonPublic=true MBeanFallbackTest diff --git a/jdk/test/javax/management/MBeanServer/MBeanServerInvocationHandlerExceptionTest.java b/jdk/test/javax/management/MBeanServer/MBeanServerInvocationHandlerExceptionTest.java index b0008f34e74..441f18c9ba7 100644 --- a/jdk/test/javax/management/MBeanServer/MBeanServerInvocationHandlerExceptionTest.java +++ b/jdk/test/javax/management/MBeanServer/MBeanServerInvocationHandlerExceptionTest.java @@ -26,7 +26,7 @@ * @bug 5092515 * @summary Test how to unwrap a user specific exception * @author Shanliang JIANG - * @modules java.management + * * @run clean MBeanServerInvocationHandlerExceptionTest * @run build MBeanServerInvocationHandlerExceptionTest * @run main MBeanServerInvocationHandlerExceptionTest diff --git a/jdk/test/javax/management/MBeanServer/MBeanTest.java b/jdk/test/javax/management/MBeanServer/MBeanTest.java index 342e15d3b69..628b607f97c 100644 --- a/jdk/test/javax/management/MBeanServer/MBeanTest.java +++ b/jdk/test/javax/management/MBeanServer/MBeanTest.java @@ -31,7 +31,7 @@ import javax.management.ObjectName; * @bug 8010285 * @summary General MBean test. * @author Jaroslav Bachorik - * @modules java.management + * * @run clean MBeanTest * @run build MBeanTest * @run main MBeanTest diff --git a/jdk/test/javax/management/MBeanServer/NewMBeanListenerTest.java b/jdk/test/javax/management/MBeanServer/NewMBeanListenerTest.java index cbccf234e1c..ae92a91b20b 100644 --- a/jdk/test/javax/management/MBeanServer/NewMBeanListenerTest.java +++ b/jdk/test/javax/management/MBeanServer/NewMBeanListenerTest.java @@ -26,7 +26,7 @@ * @bug 4757273 * @summary Test that registered notification is sent early enough * @author Eamonn McManus - * @modules java.management + * * @run clean NewMBeanListenerTest * @run build NewMBeanListenerTest * @run main NewMBeanListenerTest diff --git a/jdk/test/javax/management/MBeanServer/NotifDeadlockTest.java b/jdk/test/javax/management/MBeanServer/NotifDeadlockTest.java index c46a90fdc96..4020addf222 100644 --- a/jdk/test/javax/management/MBeanServer/NotifDeadlockTest.java +++ b/jdk/test/javax/management/MBeanServer/NotifDeadlockTest.java @@ -26,7 +26,7 @@ * @bug 4757273 * @summary Test deadlock in MBeanServerDelegate listeners * @author Eamonn McManus - * @modules java.management + * * @run clean NotifDeadlockTest * @run build NotifDeadlockTest * @run main NotifDeadlockTest diff --git a/jdk/test/javax/management/MBeanServer/PostExceptionTest.java b/jdk/test/javax/management/MBeanServer/PostExceptionTest.java index 35db83c2dc7..3e3c802fc88 100644 --- a/jdk/test/javax/management/MBeanServer/PostExceptionTest.java +++ b/jdk/test/javax/management/MBeanServer/PostExceptionTest.java @@ -27,8 +27,7 @@ * @summary Check behaviour of MBeanServer when postRegister and postDeregister * throw exceptions. * @author Daniel Fuchs - * @modules java.management - * @compile PostExceptionTest.java + * * @run main PostExceptionTest */ diff --git a/jdk/test/javax/management/MBeanServer/PostRegisterDeadlockTest.java b/jdk/test/javax/management/MBeanServer/PostRegisterDeadlockTest.java index 81876af0274..cb198635219 100644 --- a/jdk/test/javax/management/MBeanServer/PostRegisterDeadlockTest.java +++ b/jdk/test/javax/management/MBeanServer/PostRegisterDeadlockTest.java @@ -26,7 +26,7 @@ * @bug 6417044 * @summary Test deadlock in MBeanRegistration.postRegister method * @author Eamonn McManus, Daniel Fuchs - * @modules java.management + * * @run clean PostRegisterDeadlockTest * @run build PostRegisterDeadlockTest * @run main PostRegisterDeadlockTest diff --git a/jdk/test/javax/management/MBeanServer/PostRegisterDeadlockTest2.java b/jdk/test/javax/management/MBeanServer/PostRegisterDeadlockTest2.java index d6d52304add..c816a163c67 100644 --- a/jdk/test/javax/management/MBeanServer/PostRegisterDeadlockTest2.java +++ b/jdk/test/javax/management/MBeanServer/PostRegisterDeadlockTest2.java @@ -26,7 +26,7 @@ * @bug 6417044 * @summary Test that a failing MBean registration does not lead to a deadlock * @author Eamonn McManus - * @modules java.management + * * @run main PostRegisterDeadlockTest2 */ diff --git a/jdk/test/javax/management/MBeanServer/PreDeregisterDeadlockTest.java b/jdk/test/javax/management/MBeanServer/PreDeregisterDeadlockTest.java index f3eb915830f..33d8c592a13 100644 --- a/jdk/test/javax/management/MBeanServer/PreDeregisterDeadlockTest.java +++ b/jdk/test/javax/management/MBeanServer/PreDeregisterDeadlockTest.java @@ -26,7 +26,7 @@ * @bug 6318664 * @summary Test deadlock in MBeanRegistration.preDeregister method * @author Eamonn McManus - * @modules java.management + * * @run clean PreDeregisterDeadlockTest * @run build PreDeregisterDeadlockTest * @run main PreDeregisterDeadlockTest diff --git a/jdk/test/javax/management/MBeanServer/PreRegisterTest.java b/jdk/test/javax/management/MBeanServer/PreRegisterTest.java index 7b1098184c6..4f72fec4d41 100644 --- a/jdk/test/javax/management/MBeanServer/PreRegisterTest.java +++ b/jdk/test/javax/management/MBeanServer/PreRegisterTest.java @@ -26,7 +26,7 @@ * @bug 4911846 * @summary Test that MBeanRegistration can change caller ObjectName * @author Eamonn McManus - * @modules java.management + * * @run clean PreRegisterTest * @run build PreRegisterTest * @run main PreRegisterTest diff --git a/jdk/test/javax/management/MBeanServerFactory/ReleaseMBeanServerTest.java b/jdk/test/javax/management/MBeanServerFactory/ReleaseMBeanServerTest.java index d9d792b3ac5..aa3dd193847 100644 --- a/jdk/test/javax/management/MBeanServerFactory/ReleaseMBeanServerTest.java +++ b/jdk/test/javax/management/MBeanServerFactory/ReleaseMBeanServerTest.java @@ -27,7 +27,7 @@ * @summary Test that the releaseMBeanServer(MBeanServer mbeanServer) method * throws IllegalArgumentException as expected * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean ReleaseMBeanServerTest * @run build ReleaseMBeanServerTest * @run main ReleaseMBeanServerTest diff --git a/jdk/test/javax/management/MustBeValidMBeanInfo/MustBeValidCommand.java b/jdk/test/javax/management/MustBeValidMBeanInfo/MustBeValidCommand.java index 005b1e73933..56a5e14c958 100644 --- a/jdk/test/javax/management/MustBeValidMBeanInfo/MustBeValidCommand.java +++ b/jdk/test/javax/management/MustBeValidMBeanInfo/MustBeValidCommand.java @@ -28,7 +28,7 @@ * IllegalArgumentException when attribute names, operation names, and * Java type names do not strictly follow the expected Java syntax. * @author Daniel Fuchs - * @modules java.management + * * @run clean MustBeValidCommand * @run build MustBeValidCommand * @run main MustBeValidCommand diff --git a/jdk/test/javax/management/ObjectInstance/MBeanInfoFailTest.java b/jdk/test/javax/management/ObjectInstance/MBeanInfoFailTest.java index 0435329d08b..2c45830cb8c 100644 --- a/jdk/test/javax/management/ObjectInstance/MBeanInfoFailTest.java +++ b/jdk/test/javax/management/ObjectInstance/MBeanInfoFailTest.java @@ -26,7 +26,7 @@ * @bug 5001857 * @summary Test queryNames() and queryMBeans() with a buggy DynamicMBean * @author Daniel Fuchs - * @modules java.management + * * @run clean MBeanInfoFailTest * @run build MBeanInfoFailTest * @run main MBeanInfoFailTest diff --git a/jdk/test/javax/management/ObjectInstance/ObjectInstanceNullTest.java b/jdk/test/javax/management/ObjectInstance/ObjectInstanceNullTest.java index 33e8497119d..b44d32eb205 100644 --- a/jdk/test/javax/management/ObjectInstance/ObjectInstanceNullTest.java +++ b/jdk/test/javax/management/ObjectInstance/ObjectInstanceNullTest.java @@ -26,7 +26,7 @@ * @bug 5015663 * @summary Test ObjectInstance(name,null).hashCode() and .equals() * @author Daniel Fuchs - * @modules java.management + * * @run clean ObjectInstanceNullTest * @run build ObjectInstanceNullTest * @run main ObjectInstanceNullTest diff --git a/jdk/test/javax/management/ObjectInstance/ToStringMethodTest.java b/jdk/test/javax/management/ObjectInstance/ToStringMethodTest.java index 166d06c8c55..b9be85632b6 100644 --- a/jdk/test/javax/management/ObjectInstance/ToStringMethodTest.java +++ b/jdk/test/javax/management/ObjectInstance/ToStringMethodTest.java @@ -26,7 +26,7 @@ * @bug 5080083 * @summary Test new added method "toString" * @author Shanliang JIANG - * @modules java.management + * * @run clean ToStringMethodTest * @run build ToStringMethodTest * @run main ToStringMethodTest diff --git a/jdk/test/javax/management/ObjectName/ApplyWildcardTest.java b/jdk/test/javax/management/ObjectName/ApplyWildcardTest.java index 88427122b15..8033e6b4397 100644 --- a/jdk/test/javax/management/ObjectName/ApplyWildcardTest.java +++ b/jdk/test/javax/management/ObjectName/ApplyWildcardTest.java @@ -27,7 +27,7 @@ * @summary Test the ObjectName.apply(ObjectName) method * with wildcards in the key properties value part. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean ApplyWildcardTest * @run build ApplyWildcardTest * @run main ApplyWildcardTest diff --git a/jdk/test/javax/management/ObjectName/ComparatorTest.java b/jdk/test/javax/management/ObjectName/ComparatorTest.java index 2803302ffee..4f8f17e17dd 100644 --- a/jdk/test/javax/management/ObjectName/ComparatorTest.java +++ b/jdk/test/javax/management/ObjectName/ComparatorTest.java @@ -26,7 +26,7 @@ * @bug 5036680 * @summary Test the ObjectName.compareTo() method. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean ComparatorTest * @run build ComparatorTest * @run main ComparatorTest diff --git a/jdk/test/javax/management/ObjectName/DelegateNameWildcardNameTest.java b/jdk/test/javax/management/ObjectName/DelegateNameWildcardNameTest.java index 030b629c850..4d0bf2418ee 100644 --- a/jdk/test/javax/management/ObjectName/DelegateNameWildcardNameTest.java +++ b/jdk/test/javax/management/ObjectName/DelegateNameWildcardNameTest.java @@ -27,7 +27,7 @@ * @summary Test that MBeanServerDelegate.DELEGATE_NAME and ObjectName.WILDCARD * public constants have been initialized properly. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean DelegateNameWildcardNameTest * @run build DelegateNameWildcardNameTest * @run main DelegateNameWildcardNameTest diff --git a/jdk/test/javax/management/ObjectName/NullEmptyKeyValueTest.java b/jdk/test/javax/management/ObjectName/NullEmptyKeyValueTest.java index 385b58c6f55..ac84c58ac6b 100644 --- a/jdk/test/javax/management/ObjectName/NullEmptyKeyValueTest.java +++ b/jdk/test/javax/management/ObjectName/NullEmptyKeyValueTest.java @@ -26,7 +26,7 @@ * @bug 6229396 * @summary Test null/empty key/values in ObjectName constructors. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean NullEmptyKeyValueTest * @run build NullEmptyKeyValueTest * @run main NullEmptyKeyValueTest diff --git a/jdk/test/javax/management/ObjectName/ObjectNameGetInstanceTest.java b/jdk/test/javax/management/ObjectName/ObjectNameGetInstanceTest.java index 12d0f1c5d95..b121c805de3 100644 --- a/jdk/test/javax/management/ObjectName/ObjectNameGetInstanceTest.java +++ b/jdk/test/javax/management/ObjectName/ObjectNameGetInstanceTest.java @@ -26,7 +26,7 @@ * @bug 4894801 * @summary Test that ObjectName.getInstance(ObjectName) preserves key order * @author Eamonn McManus - * @modules java.management + * * @run clean ObjectNameGetInstanceTest * @run build ObjectNameGetInstanceTest * @run main ObjectNameGetInstanceTest diff --git a/jdk/test/javax/management/ObjectName/RepositoryWildcardTest.java b/jdk/test/javax/management/ObjectName/RepositoryWildcardTest.java index 6eba9ff0da8..821673df8c4 100644 --- a/jdk/test/javax/management/ObjectName/RepositoryWildcardTest.java +++ b/jdk/test/javax/management/ObjectName/RepositoryWildcardTest.java @@ -27,7 +27,7 @@ * @summary Test if the repository supports correctly the use of * wildcards in the ObjectName key properties value part. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean RepositoryWildcardTest * @run build RepositoryWildcardTest * @run main RepositoryWildcardTest diff --git a/jdk/test/javax/management/ObjectName/SerialCompatTest.java b/jdk/test/javax/management/ObjectName/SerialCompatTest.java index cbab37d2484..14b8720987b 100644 --- a/jdk/test/javax/management/ObjectName/SerialCompatTest.java +++ b/jdk/test/javax/management/ObjectName/SerialCompatTest.java @@ -26,7 +26,7 @@ * @bug 6211220 6616825 * @summary Test that jmx.serial.form=1.0 works for ObjectName * @author Eamonn McManus, Daniel Fuchs - * @modules java.management + * * @run clean SerialCompatTest * @run build SerialCompatTest * @run main/othervm -Djdk.jmx.mbeans.allowNonPublic=true -Djmx.serial.form=1.0 SerialCompatTest diff --git a/jdk/test/javax/management/ObjectName/ValueWildcardTest.java b/jdk/test/javax/management/ObjectName/ValueWildcardTest.java index ee436bdb551..bdc2db574b6 100644 --- a/jdk/test/javax/management/ObjectName/ValueWildcardTest.java +++ b/jdk/test/javax/management/ObjectName/ValueWildcardTest.java @@ -26,7 +26,7 @@ * @bug 4716807 * @summary Test wildcards in ObjectName key properties value part. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean ValueWildcardTest * @run build ValueWildcardTest * @run main ValueWildcardTest diff --git a/jdk/test/javax/management/TEST.properties b/jdk/test/javax/management/TEST.properties new file mode 100644 index 00000000000..81cb3fce719 --- /dev/null +++ b/jdk/test/javax/management/TEST.properties @@ -0,0 +1,2 @@ +modules = java.management + diff --git a/jdk/test/javax/management/descriptor/DefaultDescriptorTest.java b/jdk/test/javax/management/descriptor/DefaultDescriptorTest.java index 9b3d120ebd4..0fc5edf39bb 100644 --- a/jdk/test/javax/management/descriptor/DefaultDescriptorTest.java +++ b/jdk/test/javax/management/descriptor/DefaultDescriptorTest.java @@ -26,7 +26,7 @@ * @bug 6204469 * @summary Test that MBean*Info can be constructed with default descriptor * @author Eamonn McManus - * @modules java.management + * * @run clean DefaultDescriptorTest * @run build DefaultDescriptorTest * @run main DefaultDescriptorTest diff --git a/jdk/test/javax/management/descriptor/DescriptorTest.java b/jdk/test/javax/management/descriptor/DescriptorTest.java index cb2fd79e41e..e16446d6991 100644 --- a/jdk/test/javax/management/descriptor/DescriptorTest.java +++ b/jdk/test/javax/management/descriptor/DescriptorTest.java @@ -26,7 +26,7 @@ * @bug 6204469 6273765 * @summary Test various aspects of the Descriptor interface * @author Eamonn McManus - * @modules java.management + * * @run clean DescriptorTest * @run build DescriptorTest * @run main DescriptorTest diff --git a/jdk/test/javax/management/descriptor/EqualsHashCodeTest.java b/jdk/test/javax/management/descriptor/EqualsHashCodeTest.java index ca8caaad6e2..de685655209 100644 --- a/jdk/test/javax/management/descriptor/EqualsHashCodeTest.java +++ b/jdk/test/javax/management/descriptor/EqualsHashCodeTest.java @@ -26,7 +26,7 @@ * @bug 6255956 * @summary Test equals and hashCode for descriptors * @author Eamonn McManus - * @modules java.management + * * @run clean EqualsHashCodeTest * @run build EqualsHashCodeTest * @run main EqualsHashCodeTest diff --git a/jdk/test/javax/management/descriptor/ImmutableArrayFieldTest.java b/jdk/test/javax/management/descriptor/ImmutableArrayFieldTest.java index 43138457108..3826a687894 100644 --- a/jdk/test/javax/management/descriptor/ImmutableArrayFieldTest.java +++ b/jdk/test/javax/management/descriptor/ImmutableArrayFieldTest.java @@ -27,7 +27,7 @@ * @summary Test that immutability of ImmutableDescriptor cannot be * compromised by modifying field values that are arrays. * @author Eamonn McManus - * @modules java.management + * * @run clean ImmutableArrayFieldTest * @run build ImmutableArrayFieldTest * @run main ImmutableArrayFieldTest diff --git a/jdk/test/javax/management/descriptor/ImmutableDescriptorSerialTest.java b/jdk/test/javax/management/descriptor/ImmutableDescriptorSerialTest.java index c1f8b20949b..61385e5f44c 100644 --- a/jdk/test/javax/management/descriptor/ImmutableDescriptorSerialTest.java +++ b/jdk/test/javax/management/descriptor/ImmutableDescriptorSerialTest.java @@ -26,7 +26,7 @@ * @bug 6204469 * @summary Test ImmutableDescriptor serialization. * @author Eamonn McManus - * @modules java.management + * * @run clean ImmutableDescriptorSerialTest * @run build ImmutableDescriptorSerialTest * @run main ImmutableDescriptorSerialTest diff --git a/jdk/test/javax/management/descriptor/ImmutableDescriptorSetFieldsTest.java b/jdk/test/javax/management/descriptor/ImmutableDescriptorSetFieldsTest.java index 49cbf6203dd..7e587bcb05a 100644 --- a/jdk/test/javax/management/descriptor/ImmutableDescriptorSetFieldsTest.java +++ b/jdk/test/javax/management/descriptor/ImmutableDescriptorSetFieldsTest.java @@ -28,7 +28,7 @@ * null name in it and calling setFields with a field names array with an * empty name in it throw the expected exceptions. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean ImmutableDescriptorSetFieldsTest * @run build ImmutableDescriptorSetFieldsTest * @run main ImmutableDescriptorSetFieldsTest diff --git a/jdk/test/javax/management/descriptor/MBeanInfoInteropTest.java b/jdk/test/javax/management/descriptor/MBeanInfoInteropTest.java index 96a0101abdc..68a668cd59c 100644 --- a/jdk/test/javax/management/descriptor/MBeanInfoInteropTest.java +++ b/jdk/test/javax/management/descriptor/MBeanInfoInteropTest.java @@ -26,7 +26,7 @@ * @bug 6204469 * @summary Check that descriptors have not broken serial interop. * @author Eamonn McManus - * @modules java.management + * * @run clean MBeanInfoInteropTest SerializedInfo * @run build MBeanInfoInteropTest SerializedInfo * @run main MBeanInfoInteropTest SerializedInfo diff --git a/jdk/test/javax/management/descriptor/UnionTest.java b/jdk/test/javax/management/descriptor/UnionTest.java index 3fc8590fca1..27dc2b828ff 100644 --- a/jdk/test/javax/management/descriptor/UnionTest.java +++ b/jdk/test/javax/management/descriptor/UnionTest.java @@ -26,7 +26,7 @@ * @bug 6273752 * @summary Test ImmutableDescriptor.union * @author Eamonn McManus - * @modules java.management + * * @run clean UnionTest * @run build UnionTest * @run main UnionTest diff --git a/jdk/test/javax/management/generified/GenericTest.java b/jdk/test/javax/management/generified/GenericTest.java index c445276d954..8a56f44ac66 100644 --- a/jdk/test/javax/management/generified/GenericTest.java +++ b/jdk/test/javax/management/generified/GenericTest.java @@ -26,7 +26,7 @@ * @bug 4847959 6191402 * @summary Test newly-generified APIs * @author Eamonn McManus - * @modules java.management + * * @run clean GenericTest * @run build GenericTest * @run main GenericTest diff --git a/jdk/test/javax/management/generified/ListTypeCheckTest.java b/jdk/test/javax/management/generified/ListTypeCheckTest.java index 9a576784f5a..a28ffba92d4 100644 --- a/jdk/test/javax/management/generified/ListTypeCheckTest.java +++ b/jdk/test/javax/management/generified/ListTypeCheckTest.java @@ -26,7 +26,7 @@ * @bug 6250772 * @summary Test that *List objects are checked after asList is called. * @author Eamonn McManus - * @modules java.management + * * @run clean ListTypeCheckTest * @run build ListTypeCheckTest * @run main ListTypeCheckTest diff --git a/jdk/test/javax/management/loading/ArrayClassTest.java b/jdk/test/javax/management/loading/ArrayClassTest.java index 45a88cf302d..ce4cb4eff7a 100644 --- a/jdk/test/javax/management/loading/ArrayClassTest.java +++ b/jdk/test/javax/management/loading/ArrayClassTest.java @@ -27,7 +27,7 @@ * @summary Test that array classes can be found in signatures always * and can be deserialized by the deprecated MBeanServer.deserialize method * @author Eamonn McManus - * @modules java.management + * * @run clean ArrayClassTest * @run build ArrayClassTest * @run main ArrayClassTest diff --git a/jdk/test/javax/management/loading/DocumentRootTest.java b/jdk/test/javax/management/loading/DocumentRootTest.java index b517d634d2b..ae598ddd99e 100644 --- a/jdk/test/javax/management/loading/DocumentRootTest.java +++ b/jdk/test/javax/management/loading/DocumentRootTest.java @@ -27,7 +27,7 @@ * @summary Test parsing error when the mlet file is * located in the web server's document root. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean DocumentRootTest * @run build DocumentRootTest * @run main DocumentRootTest diff --git a/jdk/test/javax/management/loading/GetMBeansFromURLTest.java b/jdk/test/javax/management/loading/GetMBeansFromURLTest.java index 8ca12dc13a6..5f4d889c91b 100644 --- a/jdk/test/javax/management/loading/GetMBeansFromURLTest.java +++ b/jdk/test/javax/management/loading/GetMBeansFromURLTest.java @@ -28,7 +28,7 @@ * given MLet instance throws a ServiceNotFoundException exception * with a non null cause. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean GetMBeansFromURLTest * @run build GetMBeansFromURLTest * @run main GetMBeansFromURLTest diff --git a/jdk/test/javax/management/loading/LibraryLoader/LibraryLoaderTest.java b/jdk/test/javax/management/loading/LibraryLoader/LibraryLoaderTest.java index a858388e7f4..436c4d03dc3 100644 --- a/jdk/test/javax/management/loading/LibraryLoader/LibraryLoaderTest.java +++ b/jdk/test/javax/management/loading/LibraryLoader/LibraryLoaderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,7 @@ * @summary Test that the same native library coming from the same jar file can * be loaded twice by two different MLets on the same JVM without conflict. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean LibraryLoaderTest * @run build LibraryLoaderTest * @run main/othervm LibraryLoaderTest diff --git a/jdk/test/javax/management/loading/MLetCLR/MLetCommand.java b/jdk/test/javax/management/loading/MLetCLR/MLetCommand.java index 728ee23ffa1..2519f4329b2 100644 --- a/jdk/test/javax/management/loading/MLetCLR/MLetCommand.java +++ b/jdk/test/javax/management/loading/MLetCLR/MLetCommand.java @@ -28,7 +28,7 @@ * for the test codebase as it is executed by the MLet code using * doPrivileged. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean MLetCommand * @run build MLetCommand * @run main/othervm/java.security.policy=policy MLetCommand diff --git a/jdk/test/javax/management/loading/MLetContentTest.java b/jdk/test/javax/management/loading/MLetContentTest.java index 76f04b470ce..0fa9ce939f7 100644 --- a/jdk/test/javax/management/loading/MLetContentTest.java +++ b/jdk/test/javax/management/loading/MLetContentTest.java @@ -26,7 +26,7 @@ * @bug 4796780 * @summary The class MLetContentTest becomes public * @author Shanliang JIANG - * @modules java.management + * * @run clean MLetContentTest * @run build MLetContentTest * @run main MLetContentTest diff --git a/jdk/test/javax/management/loading/MletParserLocaleTest.java b/jdk/test/javax/management/loading/MletParserLocaleTest.java index b541e57a149..c1f25dd42bf 100644 --- a/jdk/test/javax/management/loading/MletParserLocaleTest.java +++ b/jdk/test/javax/management/loading/MletParserLocaleTest.java @@ -26,7 +26,7 @@ * @bug 7065236 * @summary Checking MletParser for Locale insensitive strings * @author Harsha Wardhana B - * @modules java.management + * * @run clean MletParserLocaleTest * @run build MletParserLocaleTest * @run main/othervm/timeout=5 MletParserLocaleTest mlet4.html diff --git a/jdk/test/javax/management/loading/ParserInfiniteLoopTest.java b/jdk/test/javax/management/loading/ParserInfiniteLoopTest.java index f0f4da02355..0ae14339fb4 100644 --- a/jdk/test/javax/management/loading/ParserInfiniteLoopTest.java +++ b/jdk/test/javax/management/loading/ParserInfiniteLoopTest.java @@ -29,7 +29,7 @@ * terminated with the corresponding '>' and an opening '<' for * the subsequent tag is encountered. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean ParserInfiniteLoopTest * @run build ParserInfiniteLoopTest * @run main/othervm/timeout=5 ParserInfiniteLoopTest mlet1.html diff --git a/jdk/test/javax/management/loading/SystemClassLoaderTest.java b/jdk/test/javax/management/loading/SystemClassLoaderTest.java index 73430b5b912..d31c5d11c7f 100644 --- a/jdk/test/javax/management/loading/SystemClassLoaderTest.java +++ b/jdk/test/javax/management/loading/SystemClassLoaderTest.java @@ -27,7 +27,7 @@ * @summary Test that a class can load MBeans from its class loader * (at least if it is the system class loader) * @author Eamonn McManus - * @modules java.management + * * @run clean SystemClassLoaderTest * @run build SystemClassLoaderTest * @run main SystemClassLoaderTest diff --git a/jdk/test/javax/management/modelmbean/AddAttributeChangeNotificationListenerTest.java b/jdk/test/javax/management/modelmbean/AddAttributeChangeNotificationListenerTest.java index 049e0be2720..609766adabc 100644 --- a/jdk/test/javax/management/modelmbean/AddAttributeChangeNotificationListenerTest.java +++ b/jdk/test/javax/management/modelmbean/AddAttributeChangeNotificationListenerTest.java @@ -30,7 +30,7 @@ * no other attributes. * @author Yves Joan * @author Eamonn McManus - * @modules java.management + * * @run clean AddAttributeChangeNotificationListenerTest * @run build AddAttributeChangeNotificationListenerTest * @run main AddAttributeChangeNotificationListenerTest diff --git a/jdk/test/javax/management/modelmbean/DescriptorSupportSerialTest.java b/jdk/test/javax/management/modelmbean/DescriptorSupportSerialTest.java index b83d2745bb8..c65af34c58c 100644 --- a/jdk/test/javax/management/modelmbean/DescriptorSupportSerialTest.java +++ b/jdk/test/javax/management/modelmbean/DescriptorSupportSerialTest.java @@ -26,7 +26,7 @@ * @bug 6332962 * @summary Test that DescriptorSupport does not serialize targetObject * @author Eamonn McManus - * @modules java.management + * * @run clean DescriptorSupportSerialTest * @run build DescriptorSupportSerialTest * @run main DescriptorSupportSerialTest diff --git a/jdk/test/javax/management/modelmbean/DescriptorSupportTest.java b/jdk/test/javax/management/modelmbean/DescriptorSupportTest.java index a19044cc95c..ed33c737175 100644 --- a/jdk/test/javax/management/modelmbean/DescriptorSupportTest.java +++ b/jdk/test/javax/management/modelmbean/DescriptorSupportTest.java @@ -26,7 +26,7 @@ * @bug 4883712 4869006 4894856 5016685 * @summary Test that DescriptorSupport correctly validates fields * @author Eamonn McManus - * @modules java.management + * * @run clean DescriptorSupportTest * @run build DescriptorSupportTest * @run main DescriptorSupportTest diff --git a/jdk/test/javax/management/modelmbean/DescriptorSupportXMLLocaleTest.java b/jdk/test/javax/management/modelmbean/DescriptorSupportXMLLocaleTest.java index 402bff7f6e0..340e4264d39 100644 --- a/jdk/test/javax/management/modelmbean/DescriptorSupportXMLLocaleTest.java +++ b/jdk/test/javax/management/modelmbean/DescriptorSupportXMLLocaleTest.java @@ -26,7 +26,7 @@ * @bug 7065236 * @summary Test for locale insensitive strings in DescriptorSupport class * @author Harsha Wardhana B - * @modules java.management + * * @run clean DescriptorSupportXMLLocaleTest * @run build DescriptorSupportXMLLocaleTest * @run main DescriptorSupportXMLLocaleTest diff --git a/jdk/test/javax/management/modelmbean/DescriptorSupportXMLTest.java b/jdk/test/javax/management/modelmbean/DescriptorSupportXMLTest.java index 2e0aee671b3..dc66b2ad794 100644 --- a/jdk/test/javax/management/modelmbean/DescriptorSupportXMLTest.java +++ b/jdk/test/javax/management/modelmbean/DescriptorSupportXMLTest.java @@ -27,7 +27,7 @@ * @summary Test that DescriptorSupport.toXMLString() can be used to * reconstruct an equivalent DescriptorSupport * @author Eamonn McManus - * @modules java.management + * * @run clean DescriptorSupportXMLTest * @run build DescriptorSupportXMLTest * @run main DescriptorSupportXMLTest diff --git a/jdk/test/javax/management/modelmbean/ExoticTargetTypeTest.java b/jdk/test/javax/management/modelmbean/ExoticTargetTypeTest.java index a93791777a4..649379ed0d3 100644 --- a/jdk/test/javax/management/modelmbean/ExoticTargetTypeTest.java +++ b/jdk/test/javax/management/modelmbean/ExoticTargetTypeTest.java @@ -27,7 +27,7 @@ * @summary Test that a custom ModelMBean implementation can have custom * targetType values in its ModelMBeanOperationInfo descriptors. * @author Eamonn McManus - * @modules java.management + * * @run clean ExoticTargetTypeTest * @run build ExoticTargetTypeTest * @run main ExoticTargetTypeTest diff --git a/jdk/test/javax/management/modelmbean/InfoSupportTest.java b/jdk/test/javax/management/modelmbean/InfoSupportTest.java index 01f92bae42e..4854a795697 100644 --- a/jdk/test/javax/management/modelmbean/InfoSupportTest.java +++ b/jdk/test/javax/management/modelmbean/InfoSupportTest.java @@ -29,7 +29,7 @@ * that getDescriptors("mbean") works, and that default values for * MBean descriptors are correctly assigned. * @author Eamonn McManus - * @modules java.management + * * @run clean InfoSupportTest * @run build InfoSupportTest * @run main InfoSupportTest diff --git a/jdk/test/javax/management/modelmbean/LoggingExceptionTest.java b/jdk/test/javax/management/modelmbean/LoggingExceptionTest.java index 92516cd3956..94dfee092ea 100644 --- a/jdk/test/javax/management/modelmbean/LoggingExceptionTest.java +++ b/jdk/test/javax/management/modelmbean/LoggingExceptionTest.java @@ -29,7 +29,9 @@ * when traces enabled and no attributes. * @author Luis-Miguel Alventosa * @author Paul Cheeseman - * @modules java.management + * + * @modules java.logging + * java.management */ import java.util.logging.ConsoleHandler; diff --git a/jdk/test/javax/management/modelmbean/ModelMBeanInfoSupport/GetAllDescriptorsTest.java b/jdk/test/javax/management/modelmbean/ModelMBeanInfoSupport/GetAllDescriptorsTest.java index fd272fbe1a3..b0b24f6510d 100644 --- a/jdk/test/javax/management/modelmbean/ModelMBeanInfoSupport/GetAllDescriptorsTest.java +++ b/jdk/test/javax/management/modelmbean/ModelMBeanInfoSupport/GetAllDescriptorsTest.java @@ -27,7 +27,7 @@ * @summary Test that ModelMBeanInfoSupport.getDescriptors(null) also * returns the MBean's descriptor. * @author Eamonn McManus, Daniel Fuchs - * @modules java.management + * * @run clean GetAllDescriptorsTest * @run build GetAllDescriptorsTest * @run main/othervm/java.security.policy=policy GetAllDescriptorsTest diff --git a/jdk/test/javax/management/modelmbean/OnUnregisterTest.java b/jdk/test/javax/management/modelmbean/OnUnregisterTest.java index dab8dc65512..4d8ada2308f 100644 --- a/jdk/test/javax/management/modelmbean/OnUnregisterTest.java +++ b/jdk/test/javax/management/modelmbean/OnUnregisterTest.java @@ -27,7 +27,7 @@ * @summary Check that OnUnregister is an allowed value for persistPolicy * in ModelMBeanAttributeInfo * @author Eamonn McManus - * @modules java.management + * * @run clean OnUnregisterTest * @run build OnUnregisterTest * @run main OnUnregisterTest diff --git a/jdk/test/javax/management/modelmbean/RequiredModelMBeanGetAttributeTest.java b/jdk/test/javax/management/modelmbean/RequiredModelMBeanGetAttributeTest.java index 855de5fb886..ca2a6768777 100644 --- a/jdk/test/javax/management/modelmbean/RequiredModelMBeanGetAttributeTest.java +++ b/jdk/test/javax/management/modelmbean/RequiredModelMBeanGetAttributeTest.java @@ -36,7 +36,7 @@ * - the declared name can be loaded by the value's class loader and * produces a class to which the value can be assigned. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean RequiredModelMBeanGetAttributeTest * @run build RequiredModelMBeanGetAttributeTest * @run main RequiredModelMBeanGetAttributeTest diff --git a/jdk/test/javax/management/modelmbean/RequiredModelMBeanMethodTest.java b/jdk/test/javax/management/modelmbean/RequiredModelMBeanMethodTest.java index 54d86c82884..0ab0e7b59cc 100644 --- a/jdk/test/javax/management/modelmbean/RequiredModelMBeanMethodTest.java +++ b/jdk/test/javax/management/modelmbean/RequiredModelMBeanMethodTest.java @@ -28,7 +28,7 @@ * from the RequiredModelMBean class itself if they are not in the * ModelMBeanInfo * @author Eamonn McManus - * @modules java.management + * * @run clean RequiredModelMBeanMethodTest * @run build RequiredModelMBeanMethodTest * @run main RequiredModelMBeanMethodTest diff --git a/jdk/test/javax/management/modelmbean/RequiredModelMBeanSetAttributeTest.java b/jdk/test/javax/management/modelmbean/RequiredModelMBeanSetAttributeTest.java index 7f83c2839cc..949a56f9dc6 100644 --- a/jdk/test/javax/management/modelmbean/RequiredModelMBeanSetAttributeTest.java +++ b/jdk/test/javax/management/modelmbean/RequiredModelMBeanSetAttributeTest.java @@ -28,7 +28,7 @@ * MBeanException wrapping a ServiceNotFoundException is thrown is setAttribute * called but no setMethod field has been provided. * @author Jean-Francois Denise - * @modules java.management + * * @run clean RequiredModelMBeanSetAttributeTest * @run build RequiredModelMBeanSetAttributeTest * @run main RequiredModelMBeanSetAttributeTest diff --git a/jdk/test/javax/management/modelmbean/SimpleModelMBean/SimpleModelMBeanCommand.java b/jdk/test/javax/management/modelmbean/SimpleModelMBean/SimpleModelMBeanCommand.java index de7fba15686..5953935ef3c 100644 --- a/jdk/test/javax/management/modelmbean/SimpleModelMBean/SimpleModelMBeanCommand.java +++ b/jdk/test/javax/management/modelmbean/SimpleModelMBean/SimpleModelMBeanCommand.java @@ -28,7 +28,7 @@ * IllegalArgumentException when attribute names, operation names, and * Java type names do not strictly follow the expected Java syntax. * @author Eamonn McManus, Daniel Fuchs - * @modules java.management + * * @run clean SimpleModelMBeanCommand * @run build SimpleModelMBeanCommand * @run main/othervm/java.security.policy=policy SimpleModelMBeanCommand diff --git a/jdk/test/javax/management/monitor/CounterMonitorDeadlockTest.java b/jdk/test/javax/management/monitor/CounterMonitorDeadlockTest.java index 61115d6ee9f..be211c8346c 100644 --- a/jdk/test/javax/management/monitor/CounterMonitorDeadlockTest.java +++ b/jdk/test/javax/management/monitor/CounterMonitorDeadlockTest.java @@ -27,7 +27,7 @@ * @summary Test that no locks are held when a monitor attribute is sampled * or notif delivered. * @author Eamonn McManus - * @modules java.management + * * @run clean CounterMonitorDeadlockTest * @run build CounterMonitorDeadlockTest * @run main CounterMonitorDeadlockTest 1 diff --git a/jdk/test/javax/management/monitor/CounterMonitorInitThresholdTest.java b/jdk/test/javax/management/monitor/CounterMonitorInitThresholdTest.java index a0abb8825d1..ce55042d032 100644 --- a/jdk/test/javax/management/monitor/CounterMonitorInitThresholdTest.java +++ b/jdk/test/javax/management/monitor/CounterMonitorInitThresholdTest.java @@ -28,7 +28,7 @@ * objects added before the counter monitor is started as well as by * the observed objects which are added once the monitor is started. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean CounterMonitorInitThresholdTest * @run build CounterMonitorInitThresholdTest * @run main CounterMonitorInitThresholdTest diff --git a/jdk/test/javax/management/monitor/CounterMonitorTest.java b/jdk/test/javax/management/monitor/CounterMonitorTest.java index 07dba0458ae..957789963fe 100644 --- a/jdk/test/javax/management/monitor/CounterMonitorTest.java +++ b/jdk/test/javax/management/monitor/CounterMonitorTest.java @@ -27,7 +27,7 @@ * @summary Test that the counter monitor, when running in difference mode, * emits a notification every time the threshold is exceeded. * @author Luis-Miguel Alventosa, Shanliang JIANG - * @modules java.management + * * @run clean CounterMonitorTest * @run build CounterMonitorTest * @run main CounterMonitorTest diff --git a/jdk/test/javax/management/monitor/CounterMonitorThresholdTest.java b/jdk/test/javax/management/monitor/CounterMonitorThresholdTest.java index 4463551ffdc..911ec6021a7 100644 --- a/jdk/test/javax/management/monitor/CounterMonitorThresholdTest.java +++ b/jdk/test/javax/management/monitor/CounterMonitorThresholdTest.java @@ -26,7 +26,7 @@ * @bug 6229368 8025207 * @summary Wrong threshold value in CounterMonitor with offset and modulus. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean CounterMonitorThresholdTest * @run build CounterMonitorThresholdTest * @run main CounterMonitorThresholdTest diff --git a/jdk/test/javax/management/monitor/DerivedGaugeMonitorTest.java b/jdk/test/javax/management/monitor/DerivedGaugeMonitorTest.java index 038df903dab..36b9dd40b50 100644 --- a/jdk/test/javax/management/monitor/DerivedGaugeMonitorTest.java +++ b/jdk/test/javax/management/monitor/DerivedGaugeMonitorTest.java @@ -26,7 +26,7 @@ * @bug 6683213 * @summary Test that the initial derived gauge is (Integer)0 * @author Daniel Fuchs - * @modules java.management + * * @run clean DerivedGaugeMonitorTest * @run build DerivedGaugeMonitorTest * @run main DerivedGaugeMonitorTest diff --git a/jdk/test/javax/management/monitor/GaugeMonitorDeadlockTest.java b/jdk/test/javax/management/monitor/GaugeMonitorDeadlockTest.java index 4f50b41a756..b6e3469ba78 100644 --- a/jdk/test/javax/management/monitor/GaugeMonitorDeadlockTest.java +++ b/jdk/test/javax/management/monitor/GaugeMonitorDeadlockTest.java @@ -27,8 +27,9 @@ * @summary Test that no locks are held when a monitor attribute is sampled * or notif delivered. * @author Eamonn McManus + * * @library /lib/testlibrary - * @modules java.management + * * @run clean GaugeMonitorDeadlockTest * @run build GaugeMonitorDeadlockTest * @run main GaugeMonitorDeadlockTest 1 diff --git a/jdk/test/javax/management/monitor/MultiMonitorTest.java b/jdk/test/javax/management/monitor/MultiMonitorTest.java index 9ec7e51734d..9f4c96063bf 100644 --- a/jdk/test/javax/management/monitor/MultiMonitorTest.java +++ b/jdk/test/javax/management/monitor/MultiMonitorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -24,13 +24,13 @@ /* * @test * @bug 4984057 + * @key randomness * @summary Test that monitors can sample a large number of attributes * @author Eamonn McManus - * @modules java.management + * * @run clean MultiMonitorTest * @run build MultiMonitorTest * @run main MultiMonitorTest - * @key randomness */ import java.util.*; @@ -116,6 +116,7 @@ public class MultiMonitorTest { // A couple of granularity periods to detect bad behaviour Thread.sleep(2); + System.out.println("Checking for all listeners to be 0"); if (!listenersAreAll(0, listeners)) { System.out.println("TEST FAILED: listeners not all 0"); System.exit(1); @@ -124,20 +125,18 @@ public class MultiMonitorTest { for (int i = 0; i < 3; i++) proxies[i].start(); - long startTime = System.currentTimeMillis(); - while (!listenersAreAll(N, listeners) - && System.currentTimeMillis() < startTime + 5000) - Thread.sleep(1); + System.out.println("Waiting for listeners to all : " + N); + int iterations = 0; + while (!listenersAreAll(N, listeners)) { + Thread.sleep(500); - // More time for bad behaviour - Thread.sleep(1000); - - if (!listenersAreAll(N, listeners)) { - System.out.print("TEST FAILED: listener counts wrong:"); - for (int i = 0; i < listeners.length; i++) - System.out.print(" " + listeners[i].getCount()); - System.out.println(); - System.exit(1); + if (++iterations == 10) { + for (int i = 0; i < listeners.length; i++) { + System.out.print(" " + listeners[i].getCount()); + } + System.out.println(); + iterations = 0; + } } for (int i = 0; i < 3; i++) { diff --git a/jdk/test/javax/management/monitor/NonComparableAttributeValueTest.java b/jdk/test/javax/management/monitor/NonComparableAttributeValueTest.java index ada24cbc63c..2a4920a6453 100644 --- a/jdk/test/javax/management/monitor/NonComparableAttributeValueTest.java +++ b/jdk/test/javax/management/monitor/NonComparableAttributeValueTest.java @@ -28,7 +28,7 @@ * jmx.monitor.error.type notification when the attribute * being monitored returns a non comparable value. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean NonComparableAttributeValueTest * @run build NonComparableAttributeValueTest * @run main NonComparableAttributeValueTest diff --git a/jdk/test/javax/management/monitor/NullAttributeValueTest.java b/jdk/test/javax/management/monitor/NullAttributeValueTest.java index 7bedeee13fa..f25b19bb0a3 100644 --- a/jdk/test/javax/management/monitor/NullAttributeValueTest.java +++ b/jdk/test/javax/management/monitor/NullAttributeValueTest.java @@ -29,7 +29,7 @@ * being monitored returns a null value. * @author Luis-Miguel Alventosa * @author Shanliang JIANG - * @modules java.management + * * @run clean NullAttributeValueTest * @run build NullAttributeValueTest * @run main NullAttributeValueTest diff --git a/jdk/test/javax/management/monitor/ReflectionExceptionTest.java b/jdk/test/javax/management/monitor/ReflectionExceptionTest.java index a196c0d5a53..ff5acb2dd0d 100644 --- a/jdk/test/javax/management/monitor/ReflectionExceptionTest.java +++ b/jdk/test/javax/management/monitor/ReflectionExceptionTest.java @@ -24,11 +24,11 @@ /* * @test * @bug 6205072 + * @key intermittent * @summary Test that the jmx.monitor.error.runtime monitor notification * is emitted when getAttribute throws ReflectionException. * @author Luis-Miguel Alventosa - * @key intermittent - * @modules java.management + * * @run clean ReflectionExceptionTest MBeanServerBuilderImpl * MBeanServerForwarderInvocationHandler * @run build ReflectionExceptionTest MBeanServerBuilderImpl diff --git a/jdk/test/javax/management/monitor/RuntimeExceptionTest.java b/jdk/test/javax/management/monitor/RuntimeExceptionTest.java index 097b0c29bd3..e6b5446195f 100644 --- a/jdk/test/javax/management/monitor/RuntimeExceptionTest.java +++ b/jdk/test/javax/management/monitor/RuntimeExceptionTest.java @@ -27,7 +27,7 @@ * @summary Test that the jmx.monitor.error.runtime monitor notification * is emitted when getAttribute throws RuntimeException. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean RuntimeExceptionTest MBeanServerBuilderImpl * MBeanServerForwarderInvocationHandler * @run build RuntimeExceptionTest MBeanServerBuilderImpl diff --git a/jdk/test/javax/management/monitor/StartStopTest.java b/jdk/test/javax/management/monitor/StartStopTest.java index 5d5ff35cc12..82ff1619874 100644 --- a/jdk/test/javax/management/monitor/StartStopTest.java +++ b/jdk/test/javax/management/monitor/StartStopTest.java @@ -27,8 +27,9 @@ * @summary Test that tasks are cancelled properly when * monitors are started and stopped in a loop. * @author Luis-Miguel Alventosa + * * @library /lib/testlibrary - * @modules java.management + * * @build jdk.testlibrary.* * @run clean StartStopTest * @run build StartStopTest diff --git a/jdk/test/javax/management/monitor/StringMonitorDeadlockTest.java b/jdk/test/javax/management/monitor/StringMonitorDeadlockTest.java index 1359ad4aa65..a89fef667f8 100644 --- a/jdk/test/javax/management/monitor/StringMonitorDeadlockTest.java +++ b/jdk/test/javax/management/monitor/StringMonitorDeadlockTest.java @@ -24,11 +24,11 @@ /* * @test * @bug 6303187 + * @key intermittent * @summary Test that no locks are held when a monitor attribute is sampled * or notif delivered. * @author Eamonn McManus - * @key intermittent - * @modules java.management + * * @run clean StringMonitorDeadlockTest * @run build StringMonitorDeadlockTest * @run main StringMonitorDeadlockTest 1 diff --git a/jdk/test/javax/management/monitor/ThreadPoolAccTest.java b/jdk/test/javax/management/monitor/ThreadPoolAccTest.java index 71b7c5ec064..2d2ef31b614 100644 --- a/jdk/test/javax/management/monitor/ThreadPoolAccTest.java +++ b/jdk/test/javax/management/monitor/ThreadPoolAccTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,7 @@ * @summary Test that each thread in the thread pool runs * in the context of the monitor.start() caller. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean ThreadPoolAccTest * @run build ThreadPoolAccTest * @run main ThreadPoolAccTest diff --git a/jdk/test/javax/management/monitor/ThreadPoolTest.java b/jdk/test/javax/management/monitor/ThreadPoolTest.java index dce81dad808..b97a92e81a8 100644 --- a/jdk/test/javax/management/monitor/ThreadPoolTest.java +++ b/jdk/test/javax/management/monitor/ThreadPoolTest.java @@ -27,7 +27,7 @@ * @summary Test that all monitors will be well started when sharing * a single thread pool. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean ThreadPoolTest * @run build ThreadPoolTest * @run main/othervm/timeout=300 ThreadPoolTest 1 diff --git a/jdk/test/javax/management/mxbean/AmbiguousConstructorTest.java b/jdk/test/javax/management/mxbean/AmbiguousConstructorTest.java index 0766d1a8050..5ffb7c0c3b6 100644 --- a/jdk/test/javax/management/mxbean/AmbiguousConstructorTest.java +++ b/jdk/test/javax/management/mxbean/AmbiguousConstructorTest.java @@ -26,7 +26,7 @@ * @bug 6175517 6278707 * @summary Test that ambiguous ConstructorProperties annotations are detected. * @author Eamonn McManus - * @modules java.management + * * @run clean AmbiguousConstructorTest * @run build AmbiguousConstructorTest * @run main AmbiguousConstructorTest diff --git a/jdk/test/javax/management/mxbean/ComparatorExceptionTest.java b/jdk/test/javax/management/mxbean/ComparatorExceptionTest.java index 2de6cb1a528..ac9d0e41519 100644 --- a/jdk/test/javax/management/mxbean/ComparatorExceptionTest.java +++ b/jdk/test/javax/management/mxbean/ComparatorExceptionTest.java @@ -26,7 +26,6 @@ * @bug 6601652 * @summary Test exception when SortedMap or SortedSet has non-null Comparator * @author Eamonn McManus - * @modules java.management */ import java.util.SortedMap; diff --git a/jdk/test/javax/management/mxbean/ExceptionDiagnosisTest.java b/jdk/test/javax/management/mxbean/ExceptionDiagnosisTest.java index 16ece4db261..e944b51b0db 100644 --- a/jdk/test/javax/management/mxbean/ExceptionDiagnosisTest.java +++ b/jdk/test/javax/management/mxbean/ExceptionDiagnosisTest.java @@ -26,7 +26,6 @@ * @bug 6713777 * @summary Test that exception messages include all relevant information * @author Eamonn McManus - * @modules java.management */ import javax.management.ConstructorParameters; diff --git a/jdk/test/javax/management/mxbean/GenericTypeTest.java b/jdk/test/javax/management/mxbean/GenericTypeTest.java index 44cfbaa60fc..08015b4bca9 100644 --- a/jdk/test/javax/management/mxbean/GenericTypeTest.java +++ b/jdk/test/javax/management/mxbean/GenericTypeTest.java @@ -26,7 +26,7 @@ * @bug 6376416 6406447 * @summary Test use of generic types in MXBeans (mostly illegal). * @author Eamonn McManus - * @modules java.management + * * @run main GenericTypeTest */ diff --git a/jdk/test/javax/management/mxbean/InvalidMXBeanRegistrationTest.java b/jdk/test/javax/management/mxbean/InvalidMXBeanRegistrationTest.java index 21be355dd54..2fbb54fb454 100644 --- a/jdk/test/javax/management/mxbean/InvalidMXBeanRegistrationTest.java +++ b/jdk/test/javax/management/mxbean/InvalidMXBeanRegistrationTest.java @@ -27,7 +27,7 @@ * @summary Ensure the registration of an invalid MXBean * throws NotCompliantMBeanException. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean InvalidMXBeanRegistrationTest * @run build InvalidMXBeanRegistrationTest * @run main InvalidMXBeanRegistrationTest diff --git a/jdk/test/javax/management/mxbean/LeakTest.java b/jdk/test/javax/management/mxbean/LeakTest.java index 43ac996ab5e..a715d0ea210 100644 --- a/jdk/test/javax/management/mxbean/LeakTest.java +++ b/jdk/test/javax/management/mxbean/LeakTest.java @@ -25,7 +25,7 @@ * @bug 6482247 * @summary Test that creating MXBeans does not introduce memory leaks. * @author Eamonn McManus - * @modules java.management + * * @run build LeakTest RandomMXBeanTest MerlinMXBean TigerMXBean * @run main LeakTest */ diff --git a/jdk/test/javax/management/mxbean/MBeanOperationInfoTest.java b/jdk/test/javax/management/mxbean/MBeanOperationInfoTest.java index 2f63e7f6a7a..960a084b933 100644 --- a/jdk/test/javax/management/mxbean/MBeanOperationInfoTest.java +++ b/jdk/test/javax/management/mxbean/MBeanOperationInfoTest.java @@ -26,7 +26,7 @@ * @bug 6359948 * @summary Check that MXBean operations have the expected ReturnType in MBeanOperationInfo * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean MBeanOperationInfoTest * @run build MBeanOperationInfoTest * @run main MBeanOperationInfoTest diff --git a/jdk/test/javax/management/mxbean/MXBeanAnnotationTest.java b/jdk/test/javax/management/mxbean/MXBeanAnnotationTest.java index 62d1f223f4b..793c68917ff 100644 --- a/jdk/test/javax/management/mxbean/MXBeanAnnotationTest.java +++ b/jdk/test/javax/management/mxbean/MXBeanAnnotationTest.java @@ -26,7 +26,7 @@ * @bug 6316491 * @summary Check that the MXBean annotation works as advertised * @author Eamonn McManus - * @modules java.management + * * @run clean MXBeanAnnotationTest * @run build MXBeanAnnotationTest * @run main MXBeanAnnotationTest diff --git a/jdk/test/javax/management/mxbean/MXBeanFallbackTest.java b/jdk/test/javax/management/mxbean/MXBeanFallbackTest.java index e0243e8da08..00fd1c454c2 100644 --- a/jdk/test/javax/management/mxbean/MXBeanFallbackTest.java +++ b/jdk/test/javax/management/mxbean/MXBeanFallbackTest.java @@ -28,7 +28,7 @@ * It needs to be a separate class because the "jdk.jmx.mbeans.allowNonPublic" * system property must be set before c.s.j.m.MBeanAnalyzer has been loaded. * @author Jaroslav Bachorik - * @modules java.management + * * @run clean MXBeanFallbackTest * @run build MXBeanFallbackTest * @run main/othervm -Djdk.jmx.mbeans.allowNonPublic=true MXBeanFallbackTest diff --git a/jdk/test/javax/management/mxbean/MXBeanFlagTest.java b/jdk/test/javax/management/mxbean/MXBeanFlagTest.java index 71b1fc2f84c..36821d501ed 100644 --- a/jdk/test/javax/management/mxbean/MXBeanFlagTest.java +++ b/jdk/test/javax/management/mxbean/MXBeanFlagTest.java @@ -26,7 +26,7 @@ * @bug 6335337 * @summary Test correctness of mxbean flag in descriptor. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean MXBeanFlagTest * @run build MXBeanFlagTest * @run main MXBeanFlagTest diff --git a/jdk/test/javax/management/mxbean/MXBeanLoadingTest1.java b/jdk/test/javax/management/mxbean/MXBeanLoadingTest1.java index 2dd9abdaaa6..bcfc6fc00fc 100644 --- a/jdk/test/javax/management/mxbean/MXBeanLoadingTest1.java +++ b/jdk/test/javax/management/mxbean/MXBeanLoadingTest1.java @@ -26,8 +26,9 @@ * @bug 8058865 * @summary Checks correct collection of MXBean's class after unregistration * @author Olivier Lagneau - * @modules java.management + * * @library /lib/testlibrary + * * @run main/othervm/timeout=300 MXBeanLoadingTest1 */ diff --git a/jdk/test/javax/management/mxbean/MXBeanPreRegisterTest.java b/jdk/test/javax/management/mxbean/MXBeanPreRegisterTest.java index b8d9382f02d..72833c7dae0 100644 --- a/jdk/test/javax/management/mxbean/MXBeanPreRegisterTest.java +++ b/jdk/test/javax/management/mxbean/MXBeanPreRegisterTest.java @@ -27,7 +27,7 @@ * @summary Ensure that preRegister etc are called, but not when wrapped * by the class StandardMBean * @author Eamonn McManus - * @modules java.management + * * @run clean MXBeanPreRegisterTest * @run build MXBeanPreRegisterTest * @run main MXBeanPreRegisterTest diff --git a/jdk/test/javax/management/mxbean/MXBeanRefTest.java b/jdk/test/javax/management/mxbean/MXBeanRefTest.java index 19cf5f99e15..df46f698e23 100644 --- a/jdk/test/javax/management/mxbean/MXBeanRefTest.java +++ b/jdk/test/javax/management/mxbean/MXBeanRefTest.java @@ -26,7 +26,7 @@ * @bug 6296433 6283873 * @summary Test that inter-MXBean references work as expected. * @author Eamonn McManus - * @modules java.management + * * @run clean MXBeanRefTest * @run build MXBeanRefTest * @run main MXBeanRefTest diff --git a/jdk/test/javax/management/mxbean/MiscTest.java b/jdk/test/javax/management/mxbean/MiscTest.java index 27ce7bd4c8a..148d9e0d48b 100644 --- a/jdk/test/javax/management/mxbean/MiscTest.java +++ b/jdk/test/javax/management/mxbean/MiscTest.java @@ -28,7 +28,7 @@ * interfaceClassName, openType, originalType, StandardMBean, * StandardEmitterMBean. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean MiscTest * @run build MiscTest * @run main MiscTest diff --git a/jdk/test/javax/management/mxbean/OperationImpactTest.java b/jdk/test/javax/management/mxbean/OperationImpactTest.java index 85e159777b4..29e3446b196 100644 --- a/jdk/test/javax/management/mxbean/OperationImpactTest.java +++ b/jdk/test/javax/management/mxbean/OperationImpactTest.java @@ -26,7 +26,7 @@ * @bug 6320104 * @summary Check that MXBean operations have impact UNKNOWN. * @author Eamonn McManus - * @modules java.management + * * @run clean OperationImpactTest * @run build OperationImpactTest * @run main OperationImpactTest diff --git a/jdk/test/javax/management/mxbean/OverloadTest.java b/jdk/test/javax/management/mxbean/OverloadTest.java index 6f6349c80d3..b22b1559638 100644 --- a/jdk/test/javax/management/mxbean/OverloadTest.java +++ b/jdk/test/javax/management/mxbean/OverloadTest.java @@ -26,7 +26,7 @@ * @bug 6175517 * @summary Test that MXBean interfaces can contain overloaded methods * @author Eamonn McManus - * @modules java.management + * * @run clean OverloadTest * @run build OverloadTest * @run main OverloadTest diff --git a/jdk/test/javax/management/mxbean/PreRegisterNameTest.java b/jdk/test/javax/management/mxbean/PreRegisterNameTest.java index 2dabe17ea31..411b7bbf500 100644 --- a/jdk/test/javax/management/mxbean/PreRegisterNameTest.java +++ b/jdk/test/javax/management/mxbean/PreRegisterNameTest.java @@ -26,7 +26,6 @@ * @bug 6448042 * @summary Test that MXBeans can define their own names in preRegister * @author Eamonn McManus - * @modules java.management */ import java.lang.management.ManagementFactory; diff --git a/jdk/test/javax/management/mxbean/PropertyNamesTest.java b/jdk/test/javax/management/mxbean/PropertyNamesTest.java index 534f76c11d9..00be0c0ca9f 100644 --- a/jdk/test/javax/management/mxbean/PropertyNamesTest.java +++ b/jdk/test/javax/management/mxbean/PropertyNamesTest.java @@ -26,7 +26,7 @@ * @bug 6175517 * @summary Test the PropertyNames annotation with MXBeans * @author Eamonn McManus - * @modules java.management + * * @run clean PropertyNamesTest * @run build PropertyNamesTest * @run main PropertyNamesTest diff --git a/jdk/test/javax/management/mxbean/SameObjectTwoNamesTest.java b/jdk/test/javax/management/mxbean/SameObjectTwoNamesTest.java index c71a256892d..10022c592f7 100644 --- a/jdk/test/javax/management/mxbean/SameObjectTwoNamesTest.java +++ b/jdk/test/javax/management/mxbean/SameObjectTwoNamesTest.java @@ -28,7 +28,7 @@ * names produces an exception * @author Alexander Shusherov * @author Eamonn McManus - * @modules java.management + * * @run main SameObjectTwoNamesTest * @run main/othervm -Djmx.mxbean.multiname=true SameObjectTwoNamesTest */ diff --git a/jdk/test/javax/management/mxbean/StandardMBeanOverrideTest.java b/jdk/test/javax/management/mxbean/StandardMBeanOverrideTest.java index c6c6be69332..9ae65e73693 100644 --- a/jdk/test/javax/management/mxbean/StandardMBeanOverrideTest.java +++ b/jdk/test/javax/management/mxbean/StandardMBeanOverrideTest.java @@ -29,7 +29,7 @@ * getMBeanInfo and getNotificationInfo in StandardMBean and * StandardEmitterMBean. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean StandardMBeanOverrideTest * @run build StandardMBeanOverrideTest * @run main StandardMBeanOverrideTest diff --git a/jdk/test/javax/management/mxbean/ThreadMXBeanTest.java b/jdk/test/javax/management/mxbean/ThreadMXBeanTest.java index 2752d4beeb4..3bfef075721 100644 --- a/jdk/test/javax/management/mxbean/ThreadMXBeanTest.java +++ b/jdk/test/javax/management/mxbean/ThreadMXBeanTest.java @@ -24,13 +24,13 @@ /* * @test * @bug 6305746 + * @key randomness * @summary Test that the null values returned by the ThreadMXBean work. * @author Eamonn McManus - * @modules java.management + * * @run clean ThreadMXBeanTest * @run build ThreadMXBeanTest * @run main ThreadMXBeanTest - * @key randomness */ import java.lang.management.*; diff --git a/jdk/test/javax/management/mxbean/TypeNameTest.java b/jdk/test/javax/management/mxbean/TypeNameTest.java index fdd7a94cc07..55c9b22835a 100644 --- a/jdk/test/javax/management/mxbean/TypeNameTest.java +++ b/jdk/test/javax/management/mxbean/TypeNameTest.java @@ -26,7 +26,6 @@ * @bug 6757225 6763051 * @summary Test that type names in MXBeans match their spec. * @author Eamonn McManus - * @modules java.management */ import java.lang.reflect.Field; diff --git a/jdk/test/javax/management/notification/BroadcasterSupportDeadlockTest.java b/jdk/test/javax/management/notification/BroadcasterSupportDeadlockTest.java index d4ba0bacc1b..be3f0d8caa8 100644 --- a/jdk/test/javax/management/notification/BroadcasterSupportDeadlockTest.java +++ b/jdk/test/javax/management/notification/BroadcasterSupportDeadlockTest.java @@ -27,7 +27,7 @@ * @summary Test that NotificationBroadcasterSupport can be subclassed * and used with synchronized(this) without causing deadlock * @author Eamonn McManus - * @modules java.management + * * @run clean BroadcasterSupportDeadlockTest * @run build BroadcasterSupportDeadlockTest * @run main BroadcasterSupportDeadlockTest diff --git a/jdk/test/javax/management/notification/FilterExceptionTest.java b/jdk/test/javax/management/notification/FilterExceptionTest.java index c0d02db1f8a..b2dcc8f2813 100644 --- a/jdk/test/javax/management/notification/FilterExceptionTest.java +++ b/jdk/test/javax/management/notification/FilterExceptionTest.java @@ -26,7 +26,7 @@ * @bug 6244855 6244863 * @summary Exception thrown by NotificationFilter should be ignored * @author Shanliang JIANG - * @modules java.management + * * @run clean FilterExceptionTest * @run build FilterExceptionTest * @run main FilterExceptionTest diff --git a/jdk/test/javax/management/notification/NotifExecutorTest.java b/jdk/test/javax/management/notification/NotifExecutorTest.java index 24e9e937be2..537135e1a19 100644 --- a/jdk/test/javax/management/notification/NotifExecutorTest.java +++ b/jdk/test/javax/management/notification/NotifExecutorTest.java @@ -26,7 +26,7 @@ * @bug 4661545 * @summary Tests to use an executor to send notifications. * @author Shanliang JIANG - * @modules java.management + * * @run clean NotifExecutorTest * @run build NotifExecutorTest * @run main NotifExecutorTest diff --git a/jdk/test/javax/management/notification/NotifInfoTest.java b/jdk/test/javax/management/notification/NotifInfoTest.java index f1ebaa15440..6980cc69f6b 100644 --- a/jdk/test/javax/management/notification/NotifInfoTest.java +++ b/jdk/test/javax/management/notification/NotifInfoTest.java @@ -26,7 +26,7 @@ * @bug 4506105 6303698 * @summary NotificationBroadcasterSupport should have a ctor with MBeanNotificationInfo[] * @author Shanliang JIANG - * @modules java.management + * * @run clean NotifInfoTest * @run build NotifInfoTest * @run main NotifInfoTest diff --git a/jdk/test/javax/management/openmbean/ArrayTypeTest.java b/jdk/test/javax/management/openmbean/ArrayTypeTest.java index c4b88b4047c..9f5acc954c7 100644 --- a/jdk/test/javax/management/openmbean/ArrayTypeTest.java +++ b/jdk/test/javax/management/openmbean/ArrayTypeTest.java @@ -26,7 +26,7 @@ * @bug 5045358 * @summary Test that Open MBeans support arrays of primitive types. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean ArrayTypeTest * @run build ArrayTypeTest * @run main ArrayTypeTest diff --git a/jdk/test/javax/management/openmbean/BadConstraintTest.java b/jdk/test/javax/management/openmbean/BadConstraintTest.java index 5f39ea83a2c..bd407eebb0d 100644 --- a/jdk/test/javax/management/openmbean/BadConstraintTest.java +++ b/jdk/test/javax/management/openmbean/BadConstraintTest.java @@ -27,7 +27,7 @@ * @summary Test that Open MBean attributes and parameters cannot have * illegal constraints like min greater than max * @author Eamonn McManus - * @modules java.management + * * @run clean BadConstraintTest * @run build BadConstraintTest * @run main BadConstraintTest diff --git a/jdk/test/javax/management/openmbean/CompositeDataStringTest.java b/jdk/test/javax/management/openmbean/CompositeDataStringTest.java index f49a6aa86ea..776c61de0a8 100644 --- a/jdk/test/javax/management/openmbean/CompositeDataStringTest.java +++ b/jdk/test/javax/management/openmbean/CompositeDataStringTest.java @@ -26,7 +26,6 @@ * @bug 6610174 * @summary Test that CompositeDataSupport.toString() represents arrays correctly * @author Eamonn McManus - * @modules java.management */ import javax.management.openmbean.ArrayType; diff --git a/jdk/test/javax/management/openmbean/ConstraintTest.java b/jdk/test/javax/management/openmbean/ConstraintTest.java index 5457ba03709..b74bada9ed3 100644 --- a/jdk/test/javax/management/openmbean/ConstraintTest.java +++ b/jdk/test/javax/management/openmbean/ConstraintTest.java @@ -26,7 +26,7 @@ * @bug 6204469 * @summary Test that Open MBean attributes and parameters check constraints * @author Eamonn McManus - * @modules java.management + * * @run clean ConstraintTest * @run build ConstraintTest * @run main ConstraintTest diff --git a/jdk/test/javax/management/openmbean/EqualsTest.java b/jdk/test/javax/management/openmbean/EqualsTest.java index 7d63daff917..79fbe83b45b 100644 --- a/jdk/test/javax/management/openmbean/EqualsTest.java +++ b/jdk/test/javax/management/openmbean/EqualsTest.java @@ -26,7 +26,7 @@ * @bug 5072174 * @summary Test CompositeDataSupport.equals with ArrayType * @author Shanliang JIANG - * @modules java.management + * * @run clean EqualsTest * @run build EqualsTest * @run main EqualsTest diff --git a/jdk/test/javax/management/openmbean/IsValueTest.java b/jdk/test/javax/management/openmbean/IsValueTest.java index 93fa2514b24..94b83035b3c 100644 --- a/jdk/test/javax/management/openmbean/IsValueTest.java +++ b/jdk/test/javax/management/openmbean/IsValueTest.java @@ -26,7 +26,6 @@ * @bug 5072004 * @summary Test new rules for isValue * @author Eamonn McManus - * @modules java.management */ import javax.management.openmbean.*; diff --git a/jdk/test/javax/management/openmbean/NullConstructorParamsTest.java b/jdk/test/javax/management/openmbean/NullConstructorParamsTest.java index 0b0c4188666..167fb3d7c71 100644 --- a/jdk/test/javax/management/openmbean/NullConstructorParamsTest.java +++ b/jdk/test/javax/management/openmbean/NullConstructorParamsTest.java @@ -26,7 +26,6 @@ * @bug 6434298 * @summary Test IAE is thrown when typeName or description parameter is null for TabularType and CompositeType constructors * @author Joel FERAUD - * @modules java.management */ import javax.management.openmbean.*; diff --git a/jdk/test/javax/management/openmbean/OpenMBeanInfoEqualsNPETest.java b/jdk/test/javax/management/openmbean/OpenMBeanInfoEqualsNPETest.java index 2679615b759..d34c57d0dca 100644 --- a/jdk/test/javax/management/openmbean/OpenMBeanInfoEqualsNPETest.java +++ b/jdk/test/javax/management/openmbean/OpenMBeanInfoEqualsNPETest.java @@ -41,7 +41,7 @@ import javax.management.openmbean.SimpleType; * @bug 8023529 * @summary Test that OpenMBean*Info.equals do not throw NPE * @author Shanliang JIANG - * @modules java.management + * * @run clean OpenMBeanInfoEqualsNPETest * @run build OpenMBeanInfoEqualsNPETest * @run main OpenMBeanInfoEqualsNPETest diff --git a/jdk/test/javax/management/openmbean/OpenMBeanInfoHashCodeNPETest.java b/jdk/test/javax/management/openmbean/OpenMBeanInfoHashCodeNPETest.java index 3cd70d30526..ee864d677a3 100644 --- a/jdk/test/javax/management/openmbean/OpenMBeanInfoHashCodeNPETest.java +++ b/jdk/test/javax/management/openmbean/OpenMBeanInfoHashCodeNPETest.java @@ -40,7 +40,7 @@ import javax.management.openmbean.SimpleType; * @bug 8023529 * @summary Test that OpenMBean*Info.hashCode do not throw NPE * @author Shanliang JIANG - * @modules java.management + * * @run clean OpenMBeanInfoHashCodeNPETest * @run build OpenMBeanInfoHashCodeNPETest * @run main OpenMBeanInfoHashCodeNPETest diff --git a/jdk/test/javax/management/openmbean/OpenTypeDescriptorTest.java b/jdk/test/javax/management/openmbean/OpenTypeDescriptorTest.java index 885634e4707..33b209bb84e 100644 --- a/jdk/test/javax/management/openmbean/OpenTypeDescriptorTest.java +++ b/jdk/test/javax/management/openmbean/OpenTypeDescriptorTest.java @@ -28,7 +28,7 @@ * @summary Test that Open*MBeanInfo classes include "openType" in descriptor * and also test serial compatibility with Java 5. * @author Eamonn McManus - * @modules java.management + * * @run clean OpenTypeDescriptorTest * @run build OpenTypeDescriptorTest * @run main OpenTypeDescriptorTest diff --git a/jdk/test/javax/management/proxy/JMXProxyFallbackTest.java b/jdk/test/javax/management/proxy/JMXProxyFallbackTest.java index f157457adad..c68a93654af 100644 --- a/jdk/test/javax/management/proxy/JMXProxyFallbackTest.java +++ b/jdk/test/javax/management/proxy/JMXProxyFallbackTest.java @@ -34,7 +34,7 @@ import javax.management.ObjectName; * It needs to be a separate class because the "jdk.jmx.mbeans.allowNonPublic" * system property must be set before c.s.j.m.MBeanAnalyzer has been loaded. * @author Jaroslav Bachorik - * @modules java.management + * * @run clean JMXProxyFallbackTest * @run build JMXProxyFallbackTest * @run main/othervm -Djdk.jmx.mbeans.allowNonPublic=true JMXProxyFallbackTest diff --git a/jdk/test/javax/management/proxy/JMXProxyTest.java b/jdk/test/javax/management/proxy/JMXProxyTest.java index 33cae1dd3f9..d9e2fcd3d9c 100644 --- a/jdk/test/javax/management/proxy/JMXProxyTest.java +++ b/jdk/test/javax/management/proxy/JMXProxyTest.java @@ -33,7 +33,7 @@ import javax.management.ObjectName; * @summary Tests that javax.management.JMX creates proxies only for the * compliant MBeans/MXBeans * @author Jaroslav Bachorik - * @modules java.management + * * @run clean JMXProxyTest * @run build JMXProxyTest * @run main JMXProxyTest diff --git a/jdk/test/javax/management/proxy/NotificationEmitterProxy.java b/jdk/test/javax/management/proxy/NotificationEmitterProxy.java index 2c602b9e032..c1f43f4c4d0 100644 --- a/jdk/test/javax/management/proxy/NotificationEmitterProxy.java +++ b/jdk/test/javax/management/proxy/NotificationEmitterProxy.java @@ -26,7 +26,7 @@ * @summary Test that we can create proxies which are NotificationEmitters. * @bug 6411747 * @author Daniel Fuchs - * @modules java.management + * * @run clean NotificationEmitterProxy * @run build NotificationEmitterProxy * @run main NotificationEmitterProxy diff --git a/jdk/test/javax/management/proxy/ProxyObjectMethodsTest.java b/jdk/test/javax/management/proxy/ProxyObjectMethodsTest.java index 30238c8fb30..c554ca0b4a3 100644 --- a/jdk/test/javax/management/proxy/ProxyObjectMethodsTest.java +++ b/jdk/test/javax/management/proxy/ProxyObjectMethodsTest.java @@ -26,7 +26,7 @@ * @bug 6177524 * @summary Test how to execute the 3 Object methods by a Proxy. * @author Shanliang JIANG - * @modules java.management + * * @run clean ProxyObjectMethodsTest * @run build ProxyObjectMethodsTest * @run main ProxyObjectMethodsTest diff --git a/jdk/test/javax/management/query/CustomQueryTest.java b/jdk/test/javax/management/query/CustomQueryTest.java index 7ba7396c2c8..f1c3f59cf70 100644 --- a/jdk/test/javax/management/query/CustomQueryTest.java +++ b/jdk/test/javax/management/query/CustomQueryTest.java @@ -26,7 +26,6 @@ * @bug 6692027 * @summary Check that custom subclasses of QueryEval can be serialized. * @author Eamonn McManus - * @modules java.management */ import java.io.ByteArrayInputStream; diff --git a/jdk/test/javax/management/query/InstanceOfExpTest.java b/jdk/test/javax/management/query/InstanceOfExpTest.java index bd36da396a6..4478255aac5 100644 --- a/jdk/test/javax/management/query/InstanceOfExpTest.java +++ b/jdk/test/javax/management/query/InstanceOfExpTest.java @@ -26,7 +26,7 @@ * @bug 5072174 6335848 * @summary test the new method javax.management.Query.isInstanceOf("className") * @author Shanliang JIANG - * @modules java.management + * * @run clean InstanceOfExpTest * @run build InstanceOfExpTest * @run main InstanceOfExpTest diff --git a/jdk/test/javax/management/query/QueryExpStringTest.java b/jdk/test/javax/management/query/QueryExpStringTest.java index 79696585cc1..ab4eebbff96 100644 --- a/jdk/test/javax/management/query/QueryExpStringTest.java +++ b/jdk/test/javax/management/query/QueryExpStringTest.java @@ -26,7 +26,7 @@ * @bug 4886011 * @summary Test that QueryExp.toString() is reversible * @author Eamonn McManus - * @modules java.management + * * @run clean QueryExpStringTest * @run build QueryExpStringTest * @run main QueryExpStringTest diff --git a/jdk/test/javax/management/query/QueryMatchTest.java b/jdk/test/javax/management/query/QueryMatchTest.java index ec5c2a0c5c9..fa359ab97a7 100644 --- a/jdk/test/javax/management/query/QueryMatchTest.java +++ b/jdk/test/javax/management/query/QueryMatchTest.java @@ -26,7 +26,7 @@ * @bug 6266438 * @summary Query.match code for character sequences like [a-z] is wrong. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean QueryMatchTest * @run build QueryMatchTest * @run main QueryMatchTest diff --git a/jdk/test/javax/management/query/QuerySubstringTest.java b/jdk/test/javax/management/query/QuerySubstringTest.java index 7b0a3d81b7d..925e853b73d 100644 --- a/jdk/test/javax/management/query/QuerySubstringTest.java +++ b/jdk/test/javax/management/query/QuerySubstringTest.java @@ -27,7 +27,7 @@ * @summary Query.{initial,any,final}SubString fail if the * matching constraint string contains wildcards. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean QuerySubstringTest * @run build QuerySubstringTest * @run main QuerySubstringTest diff --git a/jdk/test/javax/management/relation/NonArrayListTest.java b/jdk/test/javax/management/relation/NonArrayListTest.java index 28de757f51b..0304c198333 100644 --- a/jdk/test/javax/management/relation/NonArrayListTest.java +++ b/jdk/test/javax/management/relation/NonArrayListTest.java @@ -26,7 +26,7 @@ * @bug 4848474 * @summary Test that relation service doesn't require List params to be ArrayList * @author Eamonn McManus - * @modules java.management + * * @run clean NonArrayListTest * @run build NonArrayListTest * @run main NonArrayListTest diff --git a/jdk/test/javax/management/relation/RelationNotificationSeqNoTest.java b/jdk/test/javax/management/relation/RelationNotificationSeqNoTest.java index b4c974fb9f5..783fe2b8dbf 100644 --- a/jdk/test/javax/management/relation/RelationNotificationSeqNoTest.java +++ b/jdk/test/javax/management/relation/RelationNotificationSeqNoTest.java @@ -26,7 +26,6 @@ * @bug 6701459 * @summary Test sequence numbers in RelationService notifications. * @author Eamonn McManus - * @modules java.management */ /* diff --git a/jdk/test/javax/management/relation/RelationNotificationSourceTest.java b/jdk/test/javax/management/relation/RelationNotificationSourceTest.java index 0133d1a0d38..8a74fa1a122 100644 --- a/jdk/test/javax/management/relation/RelationNotificationSourceTest.java +++ b/jdk/test/javax/management/relation/RelationNotificationSourceTest.java @@ -26,7 +26,7 @@ * @bug 4892674 * @summary Test that RelationNotification can be constructed with ObjectName. * @author Eamonn McManus - * @modules java.management + * * @run clean RelationNotificationSourceTest * @run build RelationNotificationSourceTest * @run main RelationNotificationSourceTest diff --git a/jdk/test/javax/management/relation/RelationTypeTest.java b/jdk/test/javax/management/relation/RelationTypeTest.java index cfcb08884b8..b7fa3fcdb74 100644 --- a/jdk/test/javax/management/relation/RelationTypeTest.java +++ b/jdk/test/javax/management/relation/RelationTypeTest.java @@ -26,7 +26,7 @@ * @bug 4716675 * @summary Test that relation type checking uses isInstanceOf * @author Eamonn McManus - * @modules java.management + * * @run clean RelationTypeTest * @run build RelationTypeTest * @run main RelationTypeTest diff --git a/jdk/test/javax/management/remote/mandatory/TEST.properties b/jdk/test/javax/management/remote/mandatory/TEST.properties new file mode 100644 index 00000000000..cbe51d3310e --- /dev/null +++ b/jdk/test/javax/management/remote/mandatory/TEST.properties @@ -0,0 +1,2 @@ +modules = java.management.rmi + diff --git a/jdk/test/javax/management/remote/mandatory/URLTest.java b/jdk/test/javax/management/remote/mandatory/URLTest.java index d10c1c71f0f..d3e39b5b7f1 100644 --- a/jdk/test/javax/management/remote/mandatory/URLTest.java +++ b/jdk/test/javax/management/remote/mandatory/URLTest.java @@ -26,7 +26,7 @@ * @bug 5057532 * @summary Tests that host names are parsed correctly in URLs * @author Eamonn McManus - * @modules java.management + * * @run clean URLTest * @run build URLTest * @run main URLTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/AddressableTest.java b/jdk/test/javax/management/remote/mandatory/connection/AddressableTest.java index eb8897e4019..556ef787d54 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/AddressableTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/AddressableTest.java @@ -26,7 +26,7 @@ * @bug 6238815 * @summary test the new interface Addressable * @author Shanliang JIANG - * @modules java.management.rmi + * * @run clean AddressableTest * @run build AddressableTest * @run main AddressableTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java b/jdk/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java index 590c7263967..e3570a5c266 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java @@ -24,10 +24,10 @@ /* * @test * @bug 4940957 8025205 + * @key intermittent * @summary Tests behaviour when connections break * @author Eamonn McManus - * @key intermittent - * @modules java.management.rmi + * * @run clean BrokenConnectionTest * @run build BrokenConnectionTest * @run main BrokenConnectionTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/CloseFailedClientTest.java b/jdk/test/javax/management/remote/mandatory/connection/CloseFailedClientTest.java index 2eb59b30acf..b93b3bb946c 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/CloseFailedClientTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/CloseFailedClientTest.java @@ -26,7 +26,7 @@ * @bug 4921888 * @summary Tests that we do not get a NullPointException. * @author Shanliang JIANG - * @modules java.management + * * @run clean CloseFailedClientTest * @run build CloseFailedClientTest * @run main CloseFailedClientTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/CloseServerTest.java b/jdk/test/javax/management/remote/mandatory/connection/CloseServerTest.java index a1944baa8c5..e99be183a3d 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/CloseServerTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/CloseServerTest.java @@ -26,7 +26,7 @@ * @bug 4838640 * @summary test server close in different conditions. * @author Shanliang JIANG - * @modules java.management + * * @run clean CloseServerTest * @run build CloseServerTest * @run main CloseServerTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/CloseUnconnectedTest.java b/jdk/test/javax/management/remote/mandatory/connection/CloseUnconnectedTest.java index 34925683287..e933dd85387 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/CloseUnconnectedTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/CloseUnconnectedTest.java @@ -26,7 +26,7 @@ * @bug 4897052 * @summary Tests that opening and immediately closing a connector works * @author Eamonn McManus - * @modules java.management + * * @run clean CloseUnconnectedTest * @run build CloseUnconnectedTest * @run main CloseUnconnectedTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/CloseableTest.java b/jdk/test/javax/management/remote/mandatory/connection/CloseableTest.java index 791cd89d9b3..d49cd7a88d9 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/CloseableTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/CloseableTest.java @@ -28,7 +28,7 @@ * the method "void close() throws IOException;" extend * or implement the java.io.Closeable interface. * @author Luis-Miguel Alventosa - * @modules java.management.rmi + * * @run clean CloseableTest * @run build CloseableTest * @run main CloseableTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/ConnectionListenerNullTest.java b/jdk/test/javax/management/remote/mandatory/connection/ConnectionListenerNullTest.java index cbe216526c5..18f49d2d25f 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/ConnectionListenerNullTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/ConnectionListenerNullTest.java @@ -26,7 +26,7 @@ * @bug 4943248 * @summary Tests that NullPointerException is thrown when listener is null. * @author Daniel Fuchs - * @modules java.management.rmi + * * @run clean ConnectionListenerNullTest * @run build ConnectionListenerNullTest * @run main ConnectionListenerNullTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/ConnectionTest.java b/jdk/test/javax/management/remote/mandatory/connection/ConnectionTest.java index c16412d843b..db2f5ef0401 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/ConnectionTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/ConnectionTest.java @@ -26,7 +26,7 @@ * @bug 4865397 * @summary Tests remote JMX connections * @author Eamonn McManus - * @modules java.management.rmi + * * @run clean ConnectionTest * @run build ConnectionTest * @run main ConnectionTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/DaemonRMIExporterTest.java b/jdk/test/javax/management/remote/mandatory/connection/DaemonRMIExporterTest.java index de0184ca3a2..73f04b6a361 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/DaemonRMIExporterTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/DaemonRMIExporterTest.java @@ -28,7 +28,7 @@ * @summary test the connector server option that causes it not to prevent the * VM from exiting * @author Shanliang JIANG, Eamonn McManus - * @modules java.management.rmi + * * @run main/othervm DaemonRMIExporterTest */ import java.util.Arrays; diff --git a/jdk/test/javax/management/remote/mandatory/connection/DeadLockTest.java b/jdk/test/javax/management/remote/mandatory/connection/DeadLockTest.java index 65c40688f3a..e9f060248ec 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/DeadLockTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/DeadLockTest.java @@ -26,7 +26,7 @@ * @bug 5039210 * @summary test on a client notification deadlock. * @author Shanliang JIANG - * @modules java.management + * * @run clean DeadLockTest * @run build DeadLockTest * @run main DeadLockTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/FailedConnectionTest.java b/jdk/test/javax/management/remote/mandatory/connection/FailedConnectionTest.java index b231bbaa536..d1f3c7b2bf0 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/FailedConnectionTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/FailedConnectionTest.java @@ -27,7 +27,7 @@ * @bug 4939578 * @summary test to get an IOException. * @author Shanliang JIANG - * @modules java.management + * * @run clean FailedConnectionTest * @run build FailedConnectionTest * @run main FailedConnectionTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/GetConnectionTest.java b/jdk/test/javax/management/remote/mandatory/connection/GetConnectionTest.java index 7c3bf66fe52..f1615253e43 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/GetConnectionTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/GetConnectionTest.java @@ -26,7 +26,7 @@ * @bug 4951414 * @summary Try to get an IOException. * @author Shanliang JIANG - * @modules java.management.rmi + * * @run clean GetConnectionTest * @run build GetConnectionTest * @run main GetConnectionTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/IIOPURLTest.java b/jdk/test/javax/management/remote/mandatory/connection/IIOPURLTest.java index 49aa0e426f0..cdbf829a9b2 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/IIOPURLTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/IIOPURLTest.java @@ -26,7 +26,7 @@ * @bug 4886799 * @summary Check that IIOP URLs have /ior/ in the path * @author Eamonn McManus - * @modules java.management.rmi + * * @run clean IIOPURLTest * @run build IIOPURLTest * @run main IIOPURLTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/JMXServiceURLLocaleTest.java b/jdk/test/javax/management/remote/mandatory/connection/JMXServiceURLLocaleTest.java index 4ff6020ea41..1336b18377d 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/JMXServiceURLLocaleTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/JMXServiceURLLocaleTest.java @@ -26,7 +26,7 @@ * @bug 7065236 * @summary Test for locale insensitive strings in JMXServiceURL class * @author Harsha Wardhana B - * @modules java.management + * * @run clean JMXServiceURLLocaleTest * @run build JMXServiceURLLocaleTest * @run main JMXServiceURLLocaleTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/MultiOpenCloseTest.java b/jdk/test/javax/management/remote/mandatory/connection/MultiOpenCloseTest.java index fc913a690dc..2fa29759529 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/MultiOpenCloseTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/MultiOpenCloseTest.java @@ -26,7 +26,7 @@ * @bug 1234567 * @summary Open, connect then close multi-connectors. * @author Shanliang JIANG - * @modules java.management + * * @run clean MultiOpenCloseTest * @run build MultiOpenCloseTest * @run main MultiOpenCloseTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java b/jdk/test/javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java index 63542a464bf..4f82efc7d54 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java @@ -45,7 +45,7 @@ import javax.management.remote.rmi.RMIConnectorServer; * @bug 6697180 * @summary test on a client notification deadlock. * @author Shanliang JIANG - * @modules java.management.rmi + * * @run clean MultiThreadDeadLockTest * @run build MultiThreadDeadLockTest * @run main MultiThreadDeadLockTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/RMIConnectionIdTest.java b/jdk/test/javax/management/remote/mandatory/connection/RMIConnectionIdTest.java index 3b86bc8eab9..e518ae64459 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/RMIConnectionIdTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/RMIConnectionIdTest.java @@ -26,7 +26,7 @@ * @bug 4901808 7183800 * @summary Check that RMI connection ids include IP address of a client network interface * @author Eamonn McManus - * @modules java.management + * * @run clean RMIConnectionIdTest * @run build RMIConnectionIdTest * @run main RMIConnectionIdTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/RMIConnectorLogAttributesTest.java b/jdk/test/javax/management/remote/mandatory/connection/RMIConnectorLogAttributesTest.java index 2284180d95b..dad29642754 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/RMIConnectorLogAttributesTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/RMIConnectorLogAttributesTest.java @@ -55,6 +55,9 @@ import javax.management.remote.JMXServiceURL; * @bug 8147857 * @summary Tests whether RMIConnector logs attribute names correctly. * @author Severin Gehwolf + * + * @modules java.logging + * java.management.rmi */ public class RMIConnectorLogAttributesTest { diff --git a/jdk/test/javax/management/remote/mandatory/connection/RMIExitTest.java b/jdk/test/javax/management/remote/mandatory/connection/RMIExitTest.java index df81b362187..06f8417372a 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/RMIExitTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/RMIExitTest.java @@ -27,7 +27,7 @@ * @bug 4917237 * @summary test that process exit immediately after stop() / close() called * @author Jean Francois Denise - * @modules java.management.rmi + * * @run clean RMIExitTest * @run build RMIExitTest * @run main RMIExitTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/RMISerializeTest.java b/jdk/test/javax/management/remote/mandatory/connection/RMISerializeTest.java index ac5331d9fae..faba7b7c22a 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/RMISerializeTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/RMISerializeTest.java @@ -26,7 +26,7 @@ * @summary Tests to serialize RMIConnector * @bug 5032052 * @author Shanliang JIANG - * @modules java.management.rmi + * * @run clean RMISerializeTest * @run build RMISerializeTest * @run main RMISerializeTest diff --git a/jdk/test/javax/management/remote/mandatory/connection/ReconnectTest.java b/jdk/test/javax/management/remote/mandatory/connection/ReconnectTest.java index a2a110e2764..6c3ca9a1c67 100644 --- a/jdk/test/javax/management/remote/mandatory/connection/ReconnectTest.java +++ b/jdk/test/javax/management/remote/mandatory/connection/ReconnectTest.java @@ -26,7 +26,7 @@ * @bug 4927217 * @summary test to reconnect * @author Shanliang JIANG - * @modules java.management + * * @run clean ReconnectTest * @run build ReconnectTest * @run main ReconnectTest diff --git a/jdk/test/javax/management/remote/mandatory/connectorServer/ConnectorStopDeadlockTest.java b/jdk/test/javax/management/remote/mandatory/connectorServer/ConnectorStopDeadlockTest.java index ad84f39142a..4a723283f81 100644 --- a/jdk/test/javax/management/remote/mandatory/connectorServer/ConnectorStopDeadlockTest.java +++ b/jdk/test/javax/management/remote/mandatory/connectorServer/ConnectorStopDeadlockTest.java @@ -26,7 +26,6 @@ * @bug 6475157 * @summary Tests deadlock in simultaneous connection and connector-server close * @author Eamonn McManus - * @modules java.management.rmi */ /* This test is somewhat dependent on implementation details. If it suddenly diff --git a/jdk/test/javax/management/remote/mandatory/connectorServer/JNDIFailureTest.java b/jdk/test/javax/management/remote/mandatory/connectorServer/JNDIFailureTest.java index d102ecbd01d..3e2555bd198 100644 --- a/jdk/test/javax/management/remote/mandatory/connectorServer/JNDIFailureTest.java +++ b/jdk/test/javax/management/remote/mandatory/connectorServer/JNDIFailureTest.java @@ -27,7 +27,7 @@ * @summary Tests that JNDI bind failure doesn't leave an orphan RMI * Connector Server object * @author Eamonn McManus - * @modules java.management.rmi + * * @run clean JNDIFailureTest * @run build JNDIFailureTest * @run main JNDIFailureTest diff --git a/jdk/test/javax/management/remote/mandatory/connectorServer/MBSFPreStartPostStartTest.java b/jdk/test/javax/management/remote/mandatory/connectorServer/MBSFPreStartPostStartTest.java index 1d0355edce3..7c3f1e7414b 100644 --- a/jdk/test/javax/management/remote/mandatory/connectorServer/MBSFPreStartPostStartTest.java +++ b/jdk/test/javax/management/remote/mandatory/connectorServer/MBSFPreStartPostStartTest.java @@ -27,7 +27,7 @@ * @summary Test that setting an MBeanServerForwarder on an already * started RMI connector server has the expected behavior. * @author Luis-Miguel Alventosa - * @modules java.management.rmi + * * @run clean MBSFPreStartPostStartTest * @run build MBSFPreStartPostStartTest * @run main MBSFPreStartPostStartTest diff --git a/jdk/test/javax/management/remote/mandatory/loading/DefaultProviderTest.java b/jdk/test/javax/management/remote/mandatory/loading/DefaultProviderTest.java index e0aab2f2415..8db4113f199 100644 --- a/jdk/test/javax/management/remote/mandatory/loading/DefaultProviderTest.java +++ b/jdk/test/javax/management/remote/mandatory/loading/DefaultProviderTest.java @@ -26,7 +26,7 @@ * @bug 4884913 * @summary Tests that default protocols are loaded correctly * @author Eamonn McManus - * @modules java.management + * * @run clean DefaultProviderTest * @run build DefaultProviderTest * @run main DefaultProviderTest diff --git a/jdk/test/javax/management/remote/mandatory/loading/DeserializeEncodedURLTest.java b/jdk/test/javax/management/remote/mandatory/loading/DeserializeEncodedURLTest.java index 2cb8d8742e1..301b999a851 100644 --- a/jdk/test/javax/management/remote/mandatory/loading/DeserializeEncodedURLTest.java +++ b/jdk/test/javax/management/remote/mandatory/loading/DeserializeEncodedURLTest.java @@ -26,7 +26,7 @@ * @bug 4924683 * @summary Check RMI/JRMP stubs can be deserialized using user's loader * @author Eamonn McManus - * @modules java.management.rmi + * * @run clean DeserializeEncodedURLTest SingleClassLoader * @run build DeserializeEncodedURLTest SingleClassLoader * @run main DeserializeEncodedURLTest diff --git a/jdk/test/javax/management/remote/mandatory/loading/MethodResultTest.java b/jdk/test/javax/management/remote/mandatory/loading/MethodResultTest.java index cb68a990d78..ce70611a1f6 100644 --- a/jdk/test/javax/management/remote/mandatory/loading/MethodResultTest.java +++ b/jdk/test/javax/management/remote/mandatory/loading/MethodResultTest.java @@ -26,8 +26,9 @@ * @bug 4898478 * @summary Tests client default class loader used before JSR 160 loader * @author Eamonn McManus - * @modules java.management + * * @library /lib/testlibrary + * * @run clean MethodResultTest * @run build MethodResultTest * @run main MethodResultTest diff --git a/jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java b/jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java index 7c93e0c3563..326dd37c9da 100644 --- a/jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java +++ b/jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java @@ -24,13 +24,13 @@ /* * @test * @bug 4915825 4921009 4934965 4977469 8019584 + * @key randomness * @summary Tests behavior when client or server gets object of unknown class * @author Eamonn McManus - * @modules java.management.rmi + * * @run clean MissingClassTest SingleClassLoader * @run build MissingClassTest SingleClassLoader * @run main MissingClassTest - * @key randomness */ /* diff --git a/jdk/test/javax/management/remote/mandatory/loading/RMIDownloadTest.java b/jdk/test/javax/management/remote/mandatory/loading/RMIDownloadTest.java index ebdf181cdf5..c757baeaaca 100644 --- a/jdk/test/javax/management/remote/mandatory/loading/RMIDownloadTest.java +++ b/jdk/test/javax/management/remote/mandatory/loading/RMIDownloadTest.java @@ -26,7 +26,7 @@ * @bug 5021246 * @summary Check that class downloading is supported by RMI connector * @author Eamonn McManus - * @modules java.management.rmi + * * @run main RMIDownloadTest receive without * @run main RMIDownloadTest send without * @run main RMIDownloadTest receive with diff --git a/jdk/test/javax/management/remote/mandatory/loading/TargetMBeanTest.java b/jdk/test/javax/management/remote/mandatory/loading/TargetMBeanTest.java index a5df3856ec8..9d949995351 100644 --- a/jdk/test/javax/management/remote/mandatory/loading/TargetMBeanTest.java +++ b/jdk/test/javax/management/remote/mandatory/loading/TargetMBeanTest.java @@ -26,7 +26,7 @@ * @bug 4910428 * @summary Tests target MBean class loader used before JSR 160 loader * @author Eamonn McManus - * @modules java.management.rmi + * * @run clean TargetMBeanTest * @run build TargetMBeanTest * @run main TargetMBeanTest diff --git a/jdk/test/javax/management/remote/mandatory/loading/UserClassLoaderTest.java b/jdk/test/javax/management/remote/mandatory/loading/UserClassLoaderTest.java index e634d6cfc41..78367626911 100644 --- a/jdk/test/javax/management/remote/mandatory/loading/UserClassLoaderTest.java +++ b/jdk/test/javax/management/remote/mandatory/loading/UserClassLoaderTest.java @@ -26,7 +26,7 @@ * @bug 6356458 * @summary test to not lose a user classloader * @author Shanliang JIANG - * @modules java.management + * * @run clean UserClassLoaderTest * @run build UserClassLoaderTest * @run main UserClassLoaderTest diff --git a/jdk/test/javax/management/remote/mandatory/notif/AddRemoveTest.java b/jdk/test/javax/management/remote/mandatory/notif/AddRemoveTest.java index a3b433757a7..e4885b4a732 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/AddRemoveTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/AddRemoveTest.java @@ -27,7 +27,7 @@ * @bug 4838640 4917194 * @summary test on add/remove NotificationListener * @author Shanliang JIANG - * @modules java.management + * * @run clean AddRemoveTest * @run build AddRemoveTest * @run main AddRemoveTest diff --git a/jdk/test/javax/management/remote/mandatory/notif/ConcurrentModificationTest.java b/jdk/test/javax/management/remote/mandatory/notif/ConcurrentModificationTest.java index a7830faf921..eb13087a7d9 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/ConcurrentModificationTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/ConcurrentModificationTest.java @@ -26,7 +26,7 @@ * @bug 7120365 * @summary test on Concurrent Modification * @author Shanliang JIANG - * @modules java.management.rmi + * * @run main ConcurrentModificationTest */ diff --git a/jdk/test/javax/management/remote/mandatory/notif/DiffHBTest.java b/jdk/test/javax/management/remote/mandatory/notif/DiffHBTest.java index 8ed989c2b9e..467c84b7dc1 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/DiffHBTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/DiffHBTest.java @@ -26,7 +26,7 @@ * @bug 4911721 * @summary test on add/remove NotificationListener * @author Shanliang JIANG - * @modules java.management + * * @run clean DiffHBTest * @run build DiffHBTest * @run main DiffHBTest diff --git a/jdk/test/javax/management/remote/mandatory/notif/EmptyDomainNotificationTest.java b/jdk/test/javax/management/remote/mandatory/notif/EmptyDomainNotificationTest.java index 5041a6bbd69..79d54760306 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/EmptyDomainNotificationTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/EmptyDomainNotificationTest.java @@ -27,7 +27,7 @@ * @summary Check that the expected notification is received by the JMX * client even when the domain in the ObjectName is not specified * @author Shanliang JIANG - * @modules java.management.rmi + * * @run clean EmptyDomainNotificationTest * @run build EmptyDomainNotificationTest * @run main EmptyDomainNotificationTest diff --git a/jdk/test/javax/management/remote/mandatory/notif/ListenerScaleTest.java b/jdk/test/javax/management/remote/mandatory/notif/ListenerScaleTest.java index bc6922f350d..e9e34455c13 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/ListenerScaleTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/ListenerScaleTest.java @@ -26,9 +26,9 @@ * @bug 6338874 * @summary Check that notification dispatch is not linear in number of MBeans. * @author Eamonn McManus - * @modules java.management.rmi * * @library /lib/testlibrary + * * @run build jdk.testlibrary.* ListenerScaleTest * @run main ListenerScaleTest */ diff --git a/jdk/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java b/jdk/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java index 8bd7aea59e8..600f0de1f44 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/NotSerializableNotifTest.java @@ -23,10 +23,10 @@ /* * @test - * @summary Tests to send a not serializable notification. * @bug 5022196 8132003 + * @summary Tests to send a not serializable notification. * @author Shanliang JIANG - * @modules java.management.rmi + * * @run clean NotSerializableNotifTest * @run build NotSerializableNotifTest * @run main NotSerializableNotifTest diff --git a/jdk/test/javax/management/remote/mandatory/notif/NotifBufferSizePropertyNameTest.java b/jdk/test/javax/management/remote/mandatory/notif/NotifBufferSizePropertyNameTest.java index bb7af6c3518..94a06904282 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/NotifBufferSizePropertyNameTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/NotifBufferSizePropertyNameTest.java @@ -26,7 +26,7 @@ * @bug 6174229 * @summary Verify the property name specifying server notification buffer size. * @author Shanliang JIANG - * @modules java.management + * * @run clean NotifBufferSizePropertyNameTest * @run build NotifBufferSizePropertyNameTest * @run main NotifBufferSizePropertyNameTest diff --git a/jdk/test/javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java b/jdk/test/javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java index 74b2ee582ed..72319d72cb9 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java @@ -26,7 +26,7 @@ * @bug 6199899 * @summary Tests reconnection done by a fetching notif thread. * @author Shanliang JIANG - * @modules java.management.rmi + * * @run clean NotifReconnectDeadlockTest * @run build NotifReconnectDeadlockTest * @run main NotifReconnectDeadlockTest diff --git a/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferCreationTest.java b/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferCreationTest.java index 030d9c2d1a0..cfc57651f17 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferCreationTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferCreationTest.java @@ -26,7 +26,7 @@ * @bug 4934236 * @summary Tests that NotificationBuffer is created when used. * @author jfd@... - * @modules java.management.rmi + * * @run clean NotificationBufferCreationTest NotificationSender * @run build NotificationBufferCreationTest * @run main NotificationBufferCreationTest diff --git a/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferDeadlockTest.java b/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferDeadlockTest.java index 68e712947ab..fd708e01f0b 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferDeadlockTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferDeadlockTest.java @@ -27,7 +27,7 @@ * @summary Tests NotificationBuffer doesn't hold locks when adding listeners, * if test times out then deadlock is suspected. * @author Eamonn McManus - * @modules java.management + * * @run clean NotificationBufferDeadlockTest * @run build NotificationBufferDeadlockTest * @run main NotificationBufferDeadlockTest diff --git a/jdk/test/javax/management/remote/mandatory/notif/NotificationEmissionTest.java b/jdk/test/javax/management/remote/mandatory/notif/NotificationEmissionTest.java index bdacde2ff4e..a54030d4c3e 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/NotificationEmissionTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/NotificationEmissionTest.java @@ -24,11 +24,11 @@ /* * @test * @bug 5106721 + * @key intermittent * @summary Check the emission of notifications when a Security Manager is * installed. Test the property "jmx.remote.x.check.notification.emission". * @author Luis-Miguel Alventosa - * @key intermittent - * @modules java.management.rmi + * * @run clean NotificationEmissionTest * @run build NotificationEmissionTest * @run main NotificationEmissionTest 1 diff --git a/jdk/test/javax/management/remote/mandatory/notif/RMINotifTest.java b/jdk/test/javax/management/remote/mandatory/notif/RMINotifTest.java index 6531b4414a5..9f1a91d680f 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/RMINotifTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/RMINotifTest.java @@ -25,9 +25,8 @@ * @test * @bug 7654321 * @summary Tests to receive notifications for opened and closed connections -ions * @author sjiang - * @modules java.management.rmi + * * @run clean RMINotifTest * @run build RMINotifTest * @run main RMINotifTest diff --git a/jdk/test/javax/management/remote/mandatory/notif/ServerNotifs.java b/jdk/test/javax/management/remote/mandatory/notif/ServerNotifs.java index 036ef7f1682..b222f9c22b1 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/ServerNotifs.java +++ b/jdk/test/javax/management/remote/mandatory/notif/ServerNotifs.java @@ -27,7 +27,7 @@ * @summary Tests the reception of the notifications for opened and closed * connections * @author sjiang - * @modules java.management.rmi + * * @run clean ServerNotifs * @run build ServerNotifs * @run main ServerNotifs diff --git a/jdk/test/javax/management/remote/mandatory/notif/UnexpectedNotifTest.java b/jdk/test/javax/management/remote/mandatory/notif/UnexpectedNotifTest.java index 39a7f444157..3b7c7c631ba 100644 --- a/jdk/test/javax/management/remote/mandatory/notif/UnexpectedNotifTest.java +++ b/jdk/test/javax/management/remote/mandatory/notif/UnexpectedNotifTest.java @@ -27,7 +27,7 @@ * @summary Tests whether a listener receives notifs emitted before the * listener is registered. * @author Shanliang JIANG - * @modules java.management.rmi + * * @run clean UnexpectedNotifTest * @run build UnexpectedNotifTest * @run main UnexpectedNotifTest diff --git a/jdk/test/javax/management/remote/mandatory/passwordAccessFile/NonJMXPrincipalsTest.java b/jdk/test/javax/management/remote/mandatory/passwordAccessFile/NonJMXPrincipalsTest.java index b178b04b632..2726120e253 100644 --- a/jdk/test/javax/management/remote/mandatory/passwordAccessFile/NonJMXPrincipalsTest.java +++ b/jdk/test/javax/management/remote/mandatory/passwordAccessFile/NonJMXPrincipalsTest.java @@ -27,7 +27,7 @@ * @summary Tests that MBeanServerFileAccessController supports * principals other than JMXPrincipal. * @author Luis-Miguel Alventosa - * @modules java.management.rmi + * * @run clean NonJMXPrincipalsTest SimpleStandard SimpleStandardMBean * @run build NonJMXPrincipalsTest SimpleStandard SimpleStandardMBean * @run main NonJMXPrincipalsTest diff --git a/jdk/test/javax/management/remote/mandatory/passwordAccessFile/PasswordAccessFileTest.java b/jdk/test/javax/management/remote/mandatory/passwordAccessFile/PasswordAccessFileTest.java index 43e17772d5f..5e794366b3a 100644 --- a/jdk/test/javax/management/remote/mandatory/passwordAccessFile/PasswordAccessFileTest.java +++ b/jdk/test/javax/management/remote/mandatory/passwordAccessFile/PasswordAccessFileTest.java @@ -27,7 +27,7 @@ * @summary Tests the use of the "jmx.remote.x.password.file" and * "jmx.remote.x.access.file" environment map properties. * @author Luis-Miguel Alventosa - * @modules java.management.rmi + * * @run clean PasswordAccessFileTest SimpleStandard SimpleStandardMBean * @run build PasswordAccessFileTest SimpleStandard SimpleStandardMBean * @run main PasswordAccessFileTest diff --git a/jdk/test/javax/management/remote/mandatory/provider/ProviderTest.java b/jdk/test/javax/management/remote/mandatory/provider/ProviderTest.java index 8491f24caa1..1e02e92253c 100644 --- a/jdk/test/javax/management/remote/mandatory/provider/ProviderTest.java +++ b/jdk/test/javax/management/remote/mandatory/provider/ProviderTest.java @@ -24,7 +24,7 @@ /* * @test ProviderTest.java * @summary Tests jar services provider are called - * @modules java.management.rmi + * * @run clean ProviderTest provider.JMXConnectorProviderImpl provider.JMXConnectorServerProviderImpl * @run build ProviderTest provider.JMXConnectorProviderImpl provider.JMXConnectorServerProviderImpl * @run main ProviderTest diff --git a/jdk/test/javax/management/remote/mandatory/socketFactories/RMISocketFactoriesTest.java b/jdk/test/javax/management/remote/mandatory/socketFactories/RMISocketFactoriesTest.java index c8aa8bdf269..cbdb5e6e1d4 100644 --- a/jdk/test/javax/management/remote/mandatory/socketFactories/RMISocketFactoriesTest.java +++ b/jdk/test/javax/management/remote/mandatory/socketFactories/RMISocketFactoriesTest.java @@ -26,7 +26,7 @@ * @bug 7654321 * @summary Tests the use of the custom RMI socket factories. * @author Luis-Miguel Alventosa - * @modules java.management.rmi + * * @run clean RMISocketFactoriesTest * @run build RMISocketFactoriesTest RMIClientFactory RMIServerFactory * @run main RMISocketFactoriesTest test_server_factory diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java b/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java index c5553029d6f..4e03de3c107 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -44,7 +44,6 @@ import java.lang.management.ManagementFactory; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; -import java.util.Collections; import java.util.HashMap; import java.util.Properties; import javax.management.Attribute; @@ -57,24 +56,11 @@ import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; -import javax.management.remote.JMXPrincipal; import javax.management.remote.JMXServiceURL; -import javax.security.auth.Subject; public class SubjectDelegation2Test { public static void main(String[] args) throws Exception { - // Check for supported operating systems: Solaris - // - // This test runs only on Solaris due to CR 6285916 - // - String osName = System.getProperty("os.name"); - System.out.println("os.name = " + osName); - if (!osName.equals("SunOS")) { - System.out.println("This test runs on Solaris only."); - System.out.println("Bye! Bye!"); - return; - } String policyFile = args[0]; String testResult = args[1]; System.out.println("Policy file = " + policyFile); @@ -137,9 +123,8 @@ public class SubjectDelegation2Test { // Create an RMI connector server // System.out.println("Create an RMI connector server"); - JMXServiceURL url = - new JMXServiceURL("rmi", null, 0, - "/jndi/rmi://:" + port + "/server" + port); + JMXServiceURL url = new JMXServiceURL("rmi", null, 0); + jmxcs = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs); jmxcs.start(); @@ -151,7 +136,7 @@ public class SubjectDelegation2Test { // String[] credentials = new String[] { "monitorRole" , "QED" }; cli_env.put("jmx.remote.credentials", credentials); - jmxc = JMXConnectorFactory.connect(url, cli_env); + jmxc = JMXConnectorFactory.connect(jmxcs.getAddress(), cli_env); MBeanServerConnection mbsc = jmxc.getMBeanServerConnection(); // Get domains from MBeanServer // diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation3Test.java b/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation3Test.java index 27479d1c6db..b999c9ebdf5 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation3Test.java +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation3Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -65,17 +65,6 @@ import javax.security.auth.Subject; public class SubjectDelegation3Test { public static void main(String[] args) throws Exception { - // Check for supported operating systems: Solaris - // - // This test runs only on Solaris due to CR 6285916 - // - String osName = System.getProperty("os.name"); - System.out.println("os.name = " + osName); - if (!osName.equals("SunOS")) { - System.out.println("This test runs on Solaris only."); - System.out.println("Bye! Bye!"); - return; - } String policyFile = args[0]; String testResult = args[1]; System.out.println("Policy file = " + policyFile); @@ -139,8 +128,7 @@ public class SubjectDelegation3Test { // System.out.println("Create an RMI connector server"); JMXServiceURL url = - new JMXServiceURL("rmi", null, 0, - "/jndi/rmi://:" + port + "/server" + port); + new JMXServiceURL("rmi", null, 0); jmxcs = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs); jmxcs.start(); @@ -152,7 +140,7 @@ public class SubjectDelegation3Test { // String[] credentials = new String[] { "monitorRole" , "QED" }; cli_env.put("jmx.remote.credentials", credentials); - jmxc = JMXConnectorFactory.connect(url, cli_env); + jmxc = JMXConnectorFactory.connect(jmxcs.getAddress(), cli_env); Subject delegationSubject = new Subject(true, Collections.singleton(new JMXPrincipal("delegate")), diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21 index 4b83e5fb496..5419fa20aec 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21 @@ -2,6 +2,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; permission java.security.SecurityPermission "createAccessControlContext"; + permission java.lang.RuntimePermission "*"; permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; permission javax.security.auth.AuthPermission "getSubject"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22 index 7db427794b8..87d39c80db9 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22 @@ -1,6 +1,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; + permission java.lang.RuntimePermission "*"; permission java.security.SecurityPermission "createAccessControlContext"; // permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23 index 4a92cb56b6c..584cb479d4f 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23 @@ -1,6 +1,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; + permission java.lang.RuntimePermission "*"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24 index cbb92dff982..ed7f2c9da73 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24 @@ -1,5 +1,6 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; + permission java.lang.RuntimePermission "*"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25 index 98b83de4453..9acbd1a2ef6 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25 @@ -1,5 +1,6 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; + permission java.lang.RuntimePermission "*"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31 index 70939f579f4..43d28c395bc 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31 @@ -1,6 +1,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; + permission java.lang.RuntimePermission "*"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32 index 3f5354ec2ff..bc4c7d44c28 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32 @@ -1,6 +1,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; + permission java.lang.RuntimePermission "*"; permission java.security.SecurityPermission "createAccessControlContext"; // permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33 index b11df459d5a..9a41f4c58ea 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33 @@ -1,6 +1,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; + permission java.lang.RuntimePermission "*"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34 index 761444e7a6c..dd935b0f150 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34 @@ -1,5 +1,6 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; + permission java.lang.RuntimePermission "*"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35 index 5aebb6bc888..29b10230e7d 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35 @@ -1,5 +1,6 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; + permission java.lang.RuntimePermission "*"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole"; diff --git a/jdk/test/javax/management/remote/mandatory/threads/ExecutorShutdownTest.java b/jdk/test/javax/management/remote/mandatory/threads/ExecutorShutdownTest.java index 003780cc474..7620b0ce1a8 100644 --- a/jdk/test/javax/management/remote/mandatory/threads/ExecutorShutdownTest.java +++ b/jdk/test/javax/management/remote/mandatory/threads/ExecutorShutdownTest.java @@ -26,7 +26,7 @@ * @bug 8141591 * @summary Tests if notifications are received after executor is shutdown * @author Harsha Wardhana B - * @modules java.management + * * @run clean ExecutorShutdownTest * @run build ExecutorShutdownTest * @run main ExecutorShutdownTest diff --git a/jdk/test/javax/management/remote/mandatory/threads/ExecutorTest.java b/jdk/test/javax/management/remote/mandatory/threads/ExecutorTest.java index 02351a6eb7c..a1248fef437 100644 --- a/jdk/test/javax/management/remote/mandatory/threads/ExecutorTest.java +++ b/jdk/test/javax/management/remote/mandatory/threads/ExecutorTest.java @@ -26,7 +26,7 @@ * @bug 6190873 * @summary Tests that thread creation can use a user-supplied Executor * @author Eamonn McManus - * @modules java.management + * * @run clean ExecutorTest * @run build ExecutorTest * @run main ExecutorTest diff --git a/jdk/test/javax/management/remote/mandatory/threads/NoServerTimeoutTest.java b/jdk/test/javax/management/remote/mandatory/threads/NoServerTimeoutTest.java index ec88e51d093..f07840e03e4 100644 --- a/jdk/test/javax/management/remote/mandatory/threads/NoServerTimeoutTest.java +++ b/jdk/test/javax/management/remote/mandatory/threads/NoServerTimeoutTest.java @@ -26,7 +26,7 @@ * @bug 6192124 * @summary Tests that you can turn off the server connection timeout thread * @author Eamonn McManus - * @modules java.management + * * @run clean NoServerTimeoutTest * @run build NoServerTimeoutTest * @run main NoServerTimeoutTest diff --git a/jdk/test/javax/management/remote/mandatory/version/ImplVersionTest.java b/jdk/test/javax/management/remote/mandatory/version/ImplVersionTest.java index 1e3662cc1ed..8ee4e769cd8 100644 --- a/jdk/test/javax/management/remote/mandatory/version/ImplVersionTest.java +++ b/jdk/test/javax/management/remote/mandatory/version/ImplVersionTest.java @@ -29,7 +29,7 @@ * test codebase has the java permission to read the "java.runtime.version" * system property. * @author Luis-Miguel Alventosa, Joel Feraud - * @modules java.management + * * @run clean ImplVersionTest ImplVersionCommand * @run build ImplVersionTest ImplVersionCommand ImplVersionReader * @run main ImplVersionTest diff --git a/jdk/test/javax/management/security/AvoidGetMBeanInfoCallsTest.java b/jdk/test/javax/management/security/AvoidGetMBeanInfoCallsTest.java index b4a781bfbf1..cd91a82b37a 100644 --- a/jdk/test/javax/management/security/AvoidGetMBeanInfoCallsTest.java +++ b/jdk/test/javax/management/security/AvoidGetMBeanInfoCallsTest.java @@ -27,7 +27,7 @@ * @summary Test that MBeanServer.queryNames doesn't call getMBeanInfo on every * resultant MBean when there is no security manager installed. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean AvoidGetMBeanInfoCallsTest * @run build AvoidGetMBeanInfoCallsTest * @run main AvoidGetMBeanInfoCallsTest diff --git a/jdk/test/javax/management/security/MBeanPermissionTest.java b/jdk/test/javax/management/security/MBeanPermissionTest.java index 6ac0fc2c071..21a032c76b0 100644 --- a/jdk/test/javax/management/security/MBeanPermissionTest.java +++ b/jdk/test/javax/management/security/MBeanPermissionTest.java @@ -26,7 +26,7 @@ * @bug 6228749 * @summary MBeanPermission(null,"") should throw IllegalArgumentException. * @author Luis-Miguel Alventosa - * @modules java.management + * * @run clean MBeanPermissionTest * @run build MBeanPermissionTest * @run main MBeanPermissionTest diff --git a/jdk/test/javax/management/standardmbean/DeadlockTest.java b/jdk/test/javax/management/standardmbean/DeadlockTest.java index 7bd67394800..3381240d063 100644 --- a/jdk/test/javax/management/standardmbean/DeadlockTest.java +++ b/jdk/test/javax/management/standardmbean/DeadlockTest.java @@ -26,7 +26,7 @@ * @bug 6331746 * @summary Test a deadlock and will be blocked forever if the deadlock is present. * @author Shanliang JIANG - * @modules java.management + * * @run main DeadlockTest */ diff --git a/jdk/test/javax/management/timer/MissingNotificationTest.java b/jdk/test/javax/management/timer/MissingNotificationTest.java index e4bb8c21d92..16de79ce568 100644 --- a/jdk/test/javax/management/timer/MissingNotificationTest.java +++ b/jdk/test/javax/management/timer/MissingNotificationTest.java @@ -24,13 +24,13 @@ /* * @test * @bug 6809322 + * @key randomness * @summary Test for missing notifications in a high concurrency environment * @author Jaroslav Bachorik - * @modules java.management + * * @run clean MissingNotificationTest * @run build MissingNotificationTest * @run main MissingNotificationTest - * @key randomness */ import java.util.Date; diff --git a/jdk/test/javax/management/timer/StartTest.java b/jdk/test/javax/management/timer/StartTest.java index 50f03d4a704..a29a6711b7a 100644 --- a/jdk/test/javax/management/timer/StartTest.java +++ b/jdk/test/javax/management/timer/StartTest.java @@ -26,7 +26,7 @@ * @bug 6659215 * @summary Test on timer start method with past notifications * @author Shanliang JIANG - * @modules java.management + * * @run clean StartTest * @run build StartTest * @run main StartTest diff --git a/jdk/test/javax/naming/TEST.properties b/jdk/test/javax/naming/TEST.properties new file mode 100644 index 00000000000..88ac1ce7ea8 --- /dev/null +++ b/jdk/test/javax/naming/TEST.properties @@ -0,0 +1 @@ +modules = java.naming diff --git a/jdk/test/javax/net/ssl/DTLS/CipherSuite.java b/jdk/test/javax/net/ssl/DTLS/CipherSuite.java index 3509878636c..cfca351e1cb 100644 --- a/jdk/test/javax/net/ssl/DTLS/CipherSuite.java +++ b/jdk/test/javax/net/ssl/DTLS/CipherSuite.java @@ -27,6 +27,7 @@ /* * @test * @bug 8043758 + * @key intermittent * @summary Datagram Transport Layer Security (DTLS) * @modules java.base/sun.security.util * jdk.crypto.ec diff --git a/jdk/test/javax/net/ssl/TLS/CipherTestUtils.java b/jdk/test/javax/net/ssl/TLS/CipherTestUtils.java index 4ad7465e87e..38b0d871c1c 100644 --- a/jdk/test/javax/net/ssl/TLS/CipherTestUtils.java +++ b/jdk/test/javax/net/ssl/TLS/CipherTestUtils.java @@ -2,21 +2,22 @@ * Copyright (c) 2010, 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 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). + * 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. + * 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 + * 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. */ diff --git a/jdk/test/javax/net/ssl/TLS/JSSEClient.java b/jdk/test/javax/net/ssl/TLS/JSSEClient.java index c9467ba2c53..0f510856380 100644 --- a/jdk/test/javax/net/ssl/TLS/JSSEClient.java +++ b/jdk/test/javax/net/ssl/TLS/JSSEClient.java @@ -2,21 +2,22 @@ * Copyright (c) 2010, 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 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). + * 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. + * 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 + * 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. */ diff --git a/jdk/test/javax/net/ssl/TLS/JSSEServer.java b/jdk/test/javax/net/ssl/TLS/JSSEServer.java index d8f77922c4b..9bd4fd0bfa0 100644 --- a/jdk/test/javax/net/ssl/TLS/JSSEServer.java +++ b/jdk/test/javax/net/ssl/TLS/JSSEServer.java @@ -2,21 +2,22 @@ * Copyright (c) 2010, 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 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). + * 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. + * 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 + * 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. */ diff --git a/jdk/test/javax/net/ssl/TLS/TestJSSE.java b/jdk/test/javax/net/ssl/TLS/TestJSSE.java index 7e89e11bb01..2c5a2c6274d 100644 --- a/jdk/test/javax/net/ssl/TLS/TestJSSE.java +++ b/jdk/test/javax/net/ssl/TLS/TestJSSE.java @@ -2,21 +2,22 @@ * Copyright (c) 2010, 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 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). + * 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. + * 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 + * 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. */ diff --git a/jdk/test/javax/net/ssl/TLS/TestJSSEClientDefaultProtocol.java b/jdk/test/javax/net/ssl/TLS/TestJSSEClientDefaultProtocol.java index 710bc681a8f..91d735cf5f6 100644 --- a/jdk/test/javax/net/ssl/TLS/TestJSSEClientDefaultProtocol.java +++ b/jdk/test/javax/net/ssl/TLS/TestJSSEClientDefaultProtocol.java @@ -2,21 +2,22 @@ * 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 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). + * 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. + * 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 + * 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. */ diff --git a/jdk/test/javax/net/ssl/TLS/TestJSSEClientProtocol.java b/jdk/test/javax/net/ssl/TLS/TestJSSEClientProtocol.java index 2668d9f8dac..9a37e54ef23 100644 --- a/jdk/test/javax/net/ssl/TLS/TestJSSEClientProtocol.java +++ b/jdk/test/javax/net/ssl/TLS/TestJSSEClientProtocol.java @@ -2,21 +2,22 @@ * 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 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). + * 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. + * 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 + * 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. */ diff --git a/jdk/test/javax/net/ssl/TLS/TestJSSENoCommonProtocols.java b/jdk/test/javax/net/ssl/TLS/TestJSSENoCommonProtocols.java index bfe59562fcf..8473c8ee4f3 100644 --- a/jdk/test/javax/net/ssl/TLS/TestJSSENoCommonProtocols.java +++ b/jdk/test/javax/net/ssl/TLS/TestJSSENoCommonProtocols.java @@ -2,21 +2,22 @@ * 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 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). + * 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. + * 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 + * 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. */ diff --git a/jdk/test/javax/net/ssl/TLS/TestJSSEServerProtocol.java b/jdk/test/javax/net/ssl/TLS/TestJSSEServerProtocol.java index a745a747d8f..b306ca61a50 100644 --- a/jdk/test/javax/net/ssl/TLS/TestJSSEServerProtocol.java +++ b/jdk/test/javax/net/ssl/TLS/TestJSSEServerProtocol.java @@ -2,21 +2,22 @@ * 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 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). + * 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. + * 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 + * 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. */ diff --git a/jdk/test/javax/print/attribute/TestUnsupportedResolution.java b/jdk/test/javax/print/attribute/TestUnsupportedResolution.java index 8b45b45409e..0ecf842af2a 100644 --- a/jdk/test/javax/print/attribute/TestUnsupportedResolution.java +++ b/jdk/test/javax/print/attribute/TestUnsupportedResolution.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -104,4 +104,3 @@ public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws return PAGE_EXISTS; } } - diff --git a/jdk/test/javax/security/auth/PrivateCredentialPermission/MoreThenOnePrincipals.java b/jdk/test/javax/security/auth/PrivateCredentialPermission/MoreThenOnePrincipals.java index 09f7f010b96..f08301bb119 100644 --- a/jdk/test/javax/security/auth/PrivateCredentialPermission/MoreThenOnePrincipals.java +++ b/jdk/test/javax/security/auth/PrivateCredentialPermission/MoreThenOnePrincipals.java @@ -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 @@ -33,6 +33,7 @@ import org.testng.annotations.Test; /* * @test * @bug 8050409 + * @modules jdk.security.auth * @summary Tests with Subject.getPrivateCredentials to check permission checks with one or more principals. * @run testng/othervm/policy=MoreThenOnePrincipals.policy MoreThenOnePrincipals */ diff --git a/jdk/test/javax/security/auth/PrivateCredentialPermission/Subset.java b/jdk/test/javax/security/auth/PrivateCredentialPermission/Subset.java index 34d574411e9..a48e1f98184 100644 --- a/jdk/test/javax/security/auth/PrivateCredentialPermission/Subset.java +++ b/jdk/test/javax/security/auth/PrivateCredentialPermission/Subset.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -25,11 +25,15 @@ * @test * @author Ram Marti * @bug 4326852 + * @modules jdk.security.auth * @summary Retrive a subset of private credentials can be accessed * @run main/othervm/policy=Subset.policy Subset */ -import java.util.*; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; import com.sun.security.auth.SolarisPrincipal; import javax.security.auth.Subject; diff --git a/jdk/test/javax/security/auth/Subject/Generic.java b/jdk/test/javax/security/auth/Subject/Generic.java index 1afba28f1fb..d81e1dbefdf 100644 --- a/jdk/test/javax/security/auth/Subject/Generic.java +++ b/jdk/test/javax/security/auth/Subject/Generic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/javax/security/auth/Subject/Serial.java b/jdk/test/javax/security/auth/Subject/Serial.java index f4fc860d37e..001f8a9feba 100644 --- a/jdk/test/javax/security/auth/Subject/Serial.java +++ b/jdk/test/javax/security/auth/Subject/Serial.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -24,14 +24,19 @@ /* * @test * @bug 4364826 + * @modules jdk.security.auth * @summary Subject serialized principal set is * implementation-dependent class * @run main/othervm/policy=Serial.policy Serial */ +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.HashSet; +import java.util.Set; import javax.security.auth.Subject; -import java.io.*; -import java.util.*; public class Serial implements java.io.Serializable { diff --git a/jdk/test/javax/security/auth/SubjectDomainCombiner/Regression.java b/jdk/test/javax/security/auth/SubjectDomainCombiner/Regression.java index 36622752250..b2ee1894333 100644 --- a/jdk/test/javax/security/auth/SubjectDomainCombiner/Regression.java +++ b/jdk/test/javax/security/auth/SubjectDomainCombiner/Regression.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -24,18 +24,20 @@ /* * @test * @bug 4390546 + * @modules jdk.security.auth * @summary performance regression and other bugs in * SubjectDomainCombiner.combine * * @run main/othervm/policy=Regression.policy -Djava.security.auth.debug=combiner Regression */ -import javax.security.auth.*; import java.security.ProtectionDomain; import java.security.CodeSource; import java.net.URL; import java.util.Set; import java.util.HashSet; +import javax.security.auth.Subject; +import javax.security.auth.SubjectDomainCombiner; public class Regression { diff --git a/jdk/test/javax/security/auth/kerberos/TEST.properties b/jdk/test/javax/security/auth/kerberos/TEST.properties new file mode 100644 index 00000000000..e7aa6bbed6b --- /dev/null +++ b/jdk/test/javax/security/auth/kerberos/TEST.properties @@ -0,0 +1 @@ +modules = java.security.jgss diff --git a/jdk/test/javax/security/auth/login/Configuration/GetInstance.java b/jdk/test/javax/security/auth/login/Configuration/GetInstance.java index 2f4d7e1e036..4be056bd26c 100644 --- a/jdk/test/javax/security/auth/login/Configuration/GetInstance.java +++ b/jdk/test/javax/security/auth/login/Configuration/GetInstance.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -25,16 +25,21 @@ * @test * @bug 6268315 * @bug 6273812 + * @modules jdk.security.auth * @summary Configuration should be provider-based * @build GetInstanceConfigSpi GetInstanceProvider * @run main/othervm -Djava.security.auth.login.config==${test.src}${/}GetInstance.config GetInstance */ -import javax.security.auth.login.*; - -import java.security.*; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.Provider; +import java.security.Security; +import java.security.URIParameter; import java.io.File; import java.net.URI; +import javax.security.auth.login.AppConfigurationEntry; +import javax.security.auth.login.Configuration; public class GetInstance { diff --git a/jdk/test/javax/security/auth/login/Configuration/GetInstanceSecurity.java b/jdk/test/javax/security/auth/login/Configuration/GetInstanceSecurity.java index ebd58059e52..fc2bec08221 100644 --- a/jdk/test/javax/security/auth/login/Configuration/GetInstanceSecurity.java +++ b/jdk/test/javax/security/auth/login/Configuration/GetInstanceSecurity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,6 +24,7 @@ /* * @test * @bug 6268315 + * @modules jdk.security.auth * @summary Configuration should be provider-based * @build GetInstanceConfigSpi GetInstanceProvider * @run main/othervm/policy=GetInstanceSecurity.policy GetInstanceSecurity @@ -31,8 +32,10 @@ import java.io.File; import java.net.URI; -import java.security.*; -import javax.security.auth.login.*; +import java.security.Policy; +import java.security.Security; +import java.security.URIParameter; +import javax.security.auth.login.Configuration; public class GetInstanceSecurity { diff --git a/jdk/test/javax/security/auth/login/JAASConfigSyntaxCheck/JAASConfigSyntaxTest.java b/jdk/test/javax/security/auth/login/JAASConfigSyntaxCheck/JAASConfigSyntaxTest.java index 1a649ea85a9..b98ed1626f6 100644 --- a/jdk/test/javax/security/auth/login/JAASConfigSyntaxCheck/JAASConfigSyntaxTest.java +++ b/jdk/test/javax/security/auth/login/JAASConfigSyntaxCheck/JAASConfigSyntaxTest.java @@ -1,23 +1,23 @@ - -/** +/* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * This code is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License version 2 only, as published by - * the Free Software Foundation. + * This code is 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). + * 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. + * 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 + * 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. */ diff --git a/jdk/test/javax/security/auth/login/JAASConfigSyntaxCheck/SampleLoginModule.java b/jdk/test/javax/security/auth/login/JAASConfigSyntaxCheck/SampleLoginModule.java index 7df77b0fa19..23f2436e416 100644 --- a/jdk/test/javax/security/auth/login/JAASConfigSyntaxCheck/SampleLoginModule.java +++ b/jdk/test/javax/security/auth/login/JAASConfigSyntaxCheck/SampleLoginModule.java @@ -1,22 +1,23 @@ -/** +/* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * This code is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License version 2 only, as published by - * the Free Software Foundation. + * This code is 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). + * 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. + * 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 + * 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. */ diff --git a/jdk/test/javax/security/auth/login/LoginContext/ConfigConstructor.java b/jdk/test/javax/security/auth/login/LoginContext/ConfigConstructor.java index 3b0f13041e2..0fc36c1b141 100644 --- a/jdk/test/javax/security/auth/login/LoginContext/ConfigConstructor.java +++ b/jdk/test/javax/security/auth/login/LoginContext/ConfigConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -21,9 +21,10 @@ * questions. */ -/** +/* * @test * @bug 4703361 + * @modules jdk.security.auth * @summary can not specify Configuration to LoginContext constructor * * @run main/othervm/policy=ConfigConstructor.policy -Djava.security.auth.login.config=file:${test.src}/ConfigConstructor.config ConfigConstructor @@ -37,10 +38,13 @@ */ import java.util.Map; -import javax.security.auth.*; -import javax.security.auth.login.*; -import javax.security.auth.spi.*; -import javax.security.auth.callback.*; +import javax.security.auth.Subject; +import javax.security.auth.login.AppConfigurationEntry; +import javax.security.auth.login.Configuration; +import javax.security.auth.login.LoginContext; +import javax.security.auth.login.LoginException; +import javax.security.auth.spi.LoginModule; +import javax.security.auth.callback.CallbackHandler; public class ConfigConstructor { diff --git a/jdk/test/javax/security/auth/login/LoginContext/ConfigConstructorNoPerm.java b/jdk/test/javax/security/auth/login/LoginContext/ConfigConstructorNoPerm.java index ece8bd1d936..84287ba9863 100644 --- a/jdk/test/javax/security/auth/login/LoginContext/ConfigConstructorNoPerm.java +++ b/jdk/test/javax/security/auth/login/LoginContext/ConfigConstructorNoPerm.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -21,9 +21,10 @@ * questions. */ -/** +/* * @test * @bug 4703361 + * @modules jdk.security.auth * @summary can not specify Configuration to LoginContext constructor * * @run main/othervm/policy=ConfigConstructorNoPerm.policy -Djava.security.auth.login.config=file:${test.src}/ConfigConstructor.config ConfigConstructorNoPerm @@ -36,10 +37,11 @@ */ import java.util.Map; -import javax.security.auth.*; -import javax.security.auth.login.*; -import javax.security.auth.spi.*; -import javax.security.auth.callback.*; +import javax.security.auth.Subject; +import javax.security.auth.login.AppConfigurationEntry; +import javax.security.auth.login.Configuration; +import javax.security.auth.login.LoginContext; +import javax.security.auth.callback.CallbackHandler; public class ConfigConstructorNoPerm { diff --git a/jdk/test/javax/security/auth/login/LoginContext/ModuleSubject.java b/jdk/test/javax/security/auth/login/LoginContext/ModuleSubject.java index e75f3f0fc67..4aef84bc45d 100644 --- a/jdk/test/javax/security/auth/login/LoginContext/ModuleSubject.java +++ b/jdk/test/javax/security/auth/login/LoginContext/ModuleSubject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -24,6 +24,7 @@ /* * @test * @bug 4378100 + * @modules jdk.security.auth * @summary LoginContext doesn't reinit modules with new Subject * if authentication fails * @@ -31,9 +32,9 @@ * @run main/othervm -Djava.security.auth.login.config=file:${test.src}/ModuleSubject.config ModuleSubject */ -import javax.security.auth.*; -import javax.security.auth.login.*; import java.security.Principal; +import javax.security.auth.login.LoginContext; +import javax.security.auth.login.LoginException; public class ModuleSubject { diff --git a/jdk/test/javax/security/sasl/Sasl/PassSysProps.java b/jdk/test/javax/security/sasl/Sasl/PassSysProps.java index 97aabcbe776..fa89c9bb5da 100644 --- a/jdk/test/javax/security/sasl/Sasl/PassSysProps.java +++ b/jdk/test/javax/security/sasl/Sasl/PassSysProps.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -21,10 +21,11 @@ * questions. */ -/** +/* * @test * @author Vincent Ryan * @bug 6228412 + * @modules java.security.sasl * @summary Check that a Properties object can be passed to the Sasl create * client and create server methods. */ @@ -32,8 +33,12 @@ import java.util.Hashtable; import java.util.Map; import java.util.Properties; -import javax.security.sasl.*; -import javax.security.auth.callback.*; +import javax.security.sasl.Sasl; +import javax.security.sasl.SaslClient; +import javax.security.sasl.SaslException; +import javax.security.sasl.SaslServer; +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; import org.ietf.jgss.GSSException; public class PassSysProps { diff --git a/jdk/test/javax/smartcardio/CommandAPDUTest.java b/jdk/test/javax/smartcardio/CommandAPDUTest.java index f34a2ea381a..edfb1e12161 100644 --- a/jdk/test/javax/smartcardio/CommandAPDUTest.java +++ b/jdk/test/javax/smartcardio/CommandAPDUTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, 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 @@ -26,8 +26,7 @@ * @bug 8049021 * @summary Test different constructors for CommandAPDU and check CLA,INS,NC,NE, * P1,and P2 - * @compile --add-modules=java.smartcardio CommandAPDUTest.java - * @run testng/othervm --add-modules=java.smartcardio CommandAPDUTest + * @run testng CommandAPDUTest */ import java.nio.ByteBuffer; import javax.smartcardio.CommandAPDU; diff --git a/jdk/test/javax/smartcardio/HistoricalBytes.java b/jdk/test/javax/smartcardio/HistoricalBytes.java index c44bbe0c681..b7324d4e64b 100644 --- a/jdk/test/javax/smartcardio/HistoricalBytes.java +++ b/jdk/test/javax/smartcardio/HistoricalBytes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -26,8 +26,6 @@ * @bug 6445367 * @summary Verify that ATR.getHistoricalBytes() works * @author Andreas Sterbenz - * @compile --add-modules=java.smartcardio HistoricalBytes.java - * @run main/othervm --add-modules=java.smartcardio HistoricalBytes */ import java.util.Arrays; diff --git a/jdk/test/javax/smartcardio/ResponseAPDUTest.java b/jdk/test/javax/smartcardio/ResponseAPDUTest.java index 470002d23f0..bec322ea436 100644 --- a/jdk/test/javax/smartcardio/ResponseAPDUTest.java +++ b/jdk/test/javax/smartcardio/ResponseAPDUTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, 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 @@ -25,8 +25,7 @@ * @test * @bug 8049021 * @summary Construct ResponseAPDU from byte array and check NR< SW, SW1 and SW2 - * @compile --add-modules=java.smartcardio ResponseAPDUTest.java - * @run testng/othervm --add-modules=java.smartcardio ResponseAPDUTest + * @run testng ResponseAPDUTest */ import javax.smartcardio.ResponseAPDU; import static org.testng.Assert.*; diff --git a/jdk/test/javax/smartcardio/Serialize.java b/jdk/test/javax/smartcardio/Serialize.java index 7becee4dd9d..611c24ec5dc 100644 --- a/jdk/test/javax/smartcardio/Serialize.java +++ b/jdk/test/javax/smartcardio/Serialize.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -26,8 +26,6 @@ * @bug 6445367 * @summary make sure serialization works * @author Andreas Sterbenz - * @compile --add-modules=java.smartcardio Serialize.java - * @run main/othervm --add-modules=java.smartcardio Serialize */ import java.io.*; diff --git a/jdk/test/javax/smartcardio/TEST.properties b/jdk/test/javax/smartcardio/TEST.properties new file mode 100644 index 00000000000..89d00765d51 --- /dev/null +++ b/jdk/test/javax/smartcardio/TEST.properties @@ -0,0 +1 @@ +modules = java.smartcardio diff --git a/jdk/test/javax/smartcardio/TerminalFactorySpiTest.java b/jdk/test/javax/smartcardio/TerminalFactorySpiTest.java index 853ce2dd1ce..a7414401644 100644 --- a/jdk/test/javax/smartcardio/TerminalFactorySpiTest.java +++ b/jdk/test/javax/smartcardio/TerminalFactorySpiTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, 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 @@ -25,8 +25,7 @@ * @test * @bug 8049021 * @summary Test if we can write new provider for smart card - * @compile --add-modules=java.smartcardio TerminalFactorySpiTest.java - * @run main/othervm/java.security.policy=policy --add-modules=java.smartcardio TerminalFactorySpiTest + * @run main/othervm/java.security.policy=policy TerminalFactorySpiTest */ import java.security.Provider; import java.security.Security; diff --git a/jdk/test/javax/smartcardio/TestCardPermission.java b/jdk/test/javax/smartcardio/TestCardPermission.java index b148d2c70b9..cbeb15dcffb 100644 --- a/jdk/test/javax/smartcardio/TestCardPermission.java +++ b/jdk/test/javax/smartcardio/TestCardPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -26,8 +26,6 @@ * @bug 6293767 6469513 * @summary Test for the CardPermission class * @author Andreas Sterbenz - * @compile --add-modules=java.smartcardio TestCardPermission.java - * @run main/othervm --add-modules=java.smartcardio TestCardPermission */ import javax.smartcardio.*; diff --git a/jdk/test/javax/smartcardio/TestCommandAPDU.java b/jdk/test/javax/smartcardio/TestCommandAPDU.java index d8374e17671..a9e841a0bee 100644 --- a/jdk/test/javax/smartcardio/TestCommandAPDU.java +++ b/jdk/test/javax/smartcardio/TestCommandAPDU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -27,8 +27,6 @@ * @summary Test for the CommandAPDU class * @author Andreas Sterbenz * @key randomness - * @compile --add-modules=java.smartcardio TestCommandAPDU.java - * @run main/othervm --add-modules=java.smartcardio TestCommandAPDU */ import java.util.*; diff --git a/jdk/test/javax/sound/midi/Devices/InitializationHang.java b/jdk/test/javax/sound/midi/Devices/InitializationHang.java index 9b94a7adaf4..c19ed0060aa 100644 --- a/jdk/test/javax/sound/midi/Devices/InitializationHang.java +++ b/jdk/test/javax/sound/midi/Devices/InitializationHang.java @@ -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 @@ -24,18 +24,21 @@ import java.awt.Toolkit; import javax.sound.midi.MidiSystem; +import javax.sound.midi.MidiUnavailableException; /** * @test * @bug 8068412 - * @key headful - * @author Sergey Bylokhov */ public final class InitializationHang { - public static void main(final String[] argv) throws Exception { - MidiSystem.getReceiver(); - Toolkit.getDefaultToolkit(); + public static void main(final String[] argv) { + try { + MidiSystem.getReceiver(); + Toolkit.getDefaultToolkit(); + } catch (final MidiUnavailableException ignored) { + // the test is not applicable + } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Available.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Available.java index 2f66a1f2fb8..47c077dfeab 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Available.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Available.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class Available { @@ -60,8 +61,6 @@ public class Available { assertEquals(avail - 1,readchunk.available()); fis.close(); reader = null; - - } finally { @@ -69,10 +68,7 @@ public class Available { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Close.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Close.java index ddd236a8c21..5841605aff3 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Close.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Close.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class Close { @@ -54,8 +55,6 @@ public class Close { reader = new RIFFReader(fis); reader.close(); reader = null; - - } finally { @@ -63,10 +62,7 @@ public class Close { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetFilePointer.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetFilePointer.java index 05f075f4ab5..0d898165ed8 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetFilePointer.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetFilePointer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class GetFilePointer { @@ -60,8 +61,6 @@ public class GetFilePointer { assertEquals(p+1,readchunk.getFilePointer()); fis.close(); reader = null; - - } finally { @@ -69,10 +68,7 @@ public class GetFilePointer { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetSize.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetSize.java index 9f24f5ab336..cf855c51d3f 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetSize.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetSize.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class GetSize { @@ -59,8 +60,6 @@ public class GetSize { readchunk.readByte(); fis.close(); reader = null; - - } finally { @@ -68,10 +67,7 @@ public class GetSize { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/HasNextChunk.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/HasNextChunk.java index 4594622ebff..c4bbc532af1 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/HasNextChunk.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/HasNextChunk.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class HasNextChunk { @@ -67,8 +68,6 @@ public class HasNextChunk { assertTrue(!reader.hasNextChunk()); fis.close(); reader = null; - - } finally { @@ -76,10 +75,7 @@ public class HasNextChunk { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Read.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Read.java index fb9cea65b6a..7c66013690c 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Read.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Read.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class Read { @@ -62,7 +63,6 @@ public class Read { assertEquals(readchunk.read(), 33); fis.close(); reader = null; - } finally { @@ -70,10 +70,7 @@ public class Read { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByte.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByte.java index 798e6b55e0d..1ee7814112b 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByte.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByte.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class ReadByte { @@ -62,7 +63,6 @@ public class ReadByte { assertEquals((int)reader.readByte(), 33); fis.close(); reader = null; - } finally { @@ -70,10 +70,7 @@ public class ReadByte { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByteArrayIntInt.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByteArrayIntInt.java index 57407713d20..5917e159094 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByteArrayIntInt.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByteArrayIntInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class ReadByteArrayIntInt { @@ -63,8 +64,6 @@ public class ReadByteArrayIntInt { assertEquals(readchunk.read(), 3); fis.close(); reader = null; - - } finally { @@ -72,10 +71,7 @@ public class ReadByteArrayIntInt { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadInt.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadInt.java index 27ea1e7c2a0..e5c12af42a4 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadInt.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class ReadInt { @@ -61,8 +62,6 @@ public class ReadInt { assertEquals(reader.readInt(), 133); fis.close(); reader = null; - - } finally { @@ -70,10 +69,7 @@ public class ReadInt { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadLong.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadLong.java index 6b6aa881d32..3457e2d964a 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadLong.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class ReadLong { @@ -61,8 +62,6 @@ public class ReadLong { assertEquals(reader.readLong(), 133L); fis.close(); reader = null; - - } finally { @@ -70,10 +69,7 @@ public class ReadLong { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadShort.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadShort.java index 9994986dc99..b316f8a7426 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadShort.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadShort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class ReadShort { @@ -61,8 +62,6 @@ public class ReadShort { assertEquals(reader.readShort(), (short)133); fis.close(); reader = null; - - } finally { @@ -70,10 +69,7 @@ public class ReadShort { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadString.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadString.java index 4e48d65f65b..5b04e4fcf37 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadString.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadString.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class ReadString { @@ -61,8 +62,6 @@ public class ReadString { assertEquals(reader.readString(5), "HELLO"); fis.close(); reader = null; - - } finally { @@ -70,10 +69,7 @@ public class ReadString { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedByte.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedByte.java index 7ca5d0617ce..19867706b43 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedByte.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedByte.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class ReadUnsignedByte { @@ -61,8 +62,6 @@ public class ReadUnsignedByte { assertEquals(reader.readUnsignedByte(), 77); fis.close(); reader = null; - - } finally { @@ -70,10 +69,7 @@ public class ReadUnsignedByte { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedInt.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedInt.java index e93e34a3744..2c917bc5155 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedInt.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class ReadUnsignedInt { @@ -61,8 +62,6 @@ public class ReadUnsignedInt { assertEquals(reader.readUnsignedInt(), 55377L); fis.close(); reader = null; - - } finally { @@ -70,10 +69,7 @@ public class ReadUnsignedInt { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedShort.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedShort.java index 3f1492aeb77..4278c4b45fb 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedShort.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedShort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,10 +28,11 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class ReadUnsignedShort { @@ -61,8 +62,6 @@ public class ReadUnsignedShort { assertEquals(reader.readUnsignedShort(), 377); fis.close(); reader = null; - - } finally { @@ -70,10 +69,7 @@ public class ReadUnsignedShort { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java index 4da4f7a8bfc..2af063c34a3 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -28,6 +28,8 @@ import java.io.File; import java.io.FileInputStream; +import java.nio.file.Files; +import java.nio.file.Paths; import com.sun.media.sound.RIFFReader; import com.sun.media.sound.RIFFWriter; @@ -74,8 +76,6 @@ public class Skip { assertEquals(readchunk.read(), 44); fis.close(); reader = null; - - } finally { @@ -83,10 +83,7 @@ public class Skip { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/WriteOutputStream.java b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/WriteOutputStream.java index 194af0f1211..4736e67e352 100644 --- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/WriteOutputStream.java +++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/WriteOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, 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 @@ -29,10 +29,11 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; -import javax.sound.sampled.*; - -import com.sun.media.sound.*; +import com.sun.media.sound.RIFFReader; +import com.sun.media.sound.RIFFWriter; public class WriteOutputStream { @@ -63,8 +64,6 @@ public class WriteOutputStream { assertEquals(readchunk.read(), 33); fis.close(); reader = null; - - } finally { @@ -72,10 +71,7 @@ public class WriteOutputStream { writer.close(); if(reader != null) reader.close(); - - if(tempfile.exists()) - if(!tempfile.delete()) - tempfile.deleteOnExit(); + Files.delete(Paths.get(tempfile.getAbsolutePath())); } } } diff --git a/jdk/test/javax/sound/midi/Sequencer/SeqRecordDoesNotCopy.java b/jdk/test/javax/sound/midi/Sequencer/SeqRecordDoesNotCopy.java index 99d8509c8c7..2c8d2a29032 100644 --- a/jdk/test/javax/sound/midi/Sequencer/SeqRecordDoesNotCopy.java +++ b/jdk/test/javax/sound/midi/Sequencer/SeqRecordDoesNotCopy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -24,6 +24,7 @@ import javax.sound.midi.MidiEvent; import javax.sound.midi.MidiMessage; import javax.sound.midi.MidiSystem; +import javax.sound.midi.MidiUnavailableException; import javax.sound.midi.Receiver; import javax.sound.midi.Sequence; import javax.sound.midi.Sequencer; @@ -34,12 +35,18 @@ import javax.sound.midi.Track; * @test * @bug 5048381 * @summary Sequencer doesn't create distinct messages when recording events. - * @key headful */ public class SeqRecordDoesNotCopy { - public static void main(String argv[]) throws Exception { - Sequencer s = MidiSystem.getSequencer(); - s.open(); + + public static void main(String argv[]) { + Sequencer s = null; + try { + s = MidiSystem.getSequencer(); + s.open(); + } catch (final MidiUnavailableException ignored) { + // the test is not applicable + return; + } try { Sequence seq = new Sequence(Sequence.PPQ, 384, 2); s.setSequence(seq); @@ -86,7 +93,7 @@ public class SeqRecordDoesNotCopy { } catch (Exception e) { System.out.println("Unexpected Exception: "+e); //e.printStackTrace(); - throw new Exception("Test FAILED!"); + throw new RuntimeException("Test FAILED!"); } finally { s.close(); } diff --git a/jdk/test/javax/sound/midi/Sequencer/SeqRecordsRealTimeEvents.java b/jdk/test/javax/sound/midi/Sequencer/SeqRecordsRealTimeEvents.java index 11c240e8843..021e96256f3 100644 --- a/jdk/test/javax/sound/midi/Sequencer/SeqRecordsRealTimeEvents.java +++ b/jdk/test/javax/sound/midi/Sequencer/SeqRecordsRealTimeEvents.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -24,6 +24,7 @@ import javax.sound.midi.MidiEvent; import javax.sound.midi.MidiMessage; import javax.sound.midi.MidiSystem; +import javax.sound.midi.MidiUnavailableException; import javax.sound.midi.Receiver; import javax.sound.midi.Sequence; import javax.sound.midi.Sequencer; @@ -34,12 +35,18 @@ import javax.sound.midi.Track; * @test * @bug 5048381 * @summary Sequencer records real time messages into the sequence - * @key headful */ public class SeqRecordsRealTimeEvents { - public static void main(String argv[]) throws Exception { - Sequencer s = MidiSystem.getSequencer(); - s.open(); + + public static void main(String argv[]) { + Sequencer s = null; + try { + s = MidiSystem.getSequencer(); + s.open(); + } catch (final MidiUnavailableException ignored) { + // the test is not applicable + return; + } try { Sequence seq = new Sequence(Sequence.PPQ, 384, 2); s.setSequence(seq); @@ -90,7 +97,7 @@ public class SeqRecordsRealTimeEvents { } catch (Exception e) { System.out.println("Unexpected Exception: "+e); //e.printStackTrace(); - throw new Exception("Test FAILED!"); + throw new RuntimeException("Test FAILED!"); } finally { s.close(); } diff --git a/jdk/test/javax/sound/midi/Sequencer/SeqStartRecording.java b/jdk/test/javax/sound/midi/Sequencer/SeqStartRecording.java index 423c7a2d69b..876565fddd1 100644 --- a/jdk/test/javax/sound/midi/Sequencer/SeqStartRecording.java +++ b/jdk/test/javax/sound/midi/Sequencer/SeqStartRecording.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -22,25 +22,32 @@ */ import javax.sound.midi.MidiSystem; +import javax.sound.midi.MidiUnavailableException; import javax.sound.midi.Sequencer; /** * @test * @bug 5001943 * @summary Sequencer.startRecording throws unexpected NPE - * @key headful */ public class SeqStartRecording { - public static void main(String argv[]) throws Exception { - Sequencer seq = MidiSystem.getSequencer(); - seq.open(); + + public static void main(String argv[]) { + Sequencer seq = null; + try { + seq = MidiSystem.getSequencer(); + seq.open(); + } catch (final MidiUnavailableException ignored) { + // the test is not applicable + return; + } try { seq.startRecording(); System.out.println("Test passed."); } catch (NullPointerException npe) { System.out.println("Caught NPE: "+npe); npe.printStackTrace(); - throw new Exception("Test FAILED!"); + throw new RuntimeException("Test FAILED!"); } catch (Exception e) { System.out.println("Unexpected Exception: "+e); e.printStackTrace(); diff --git a/jdk/test/javax/sound/midi/Synthesizer/bug4685396.java b/jdk/test/javax/sound/midi/Synthesizer/bug4685396.java index 43f1470584f..f67f7c43bb6 100644 --- a/jdk/test/javax/sound/midi/Synthesizer/bug4685396.java +++ b/jdk/test/javax/sound/midi/Synthesizer/bug4685396.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -23,6 +23,7 @@ import javax.sound.midi.Instrument; import javax.sound.midi.MidiSystem; +import javax.sound.midi.MidiUnavailableException; import javax.sound.midi.Soundbank; import javax.sound.midi.Synthesizer; @@ -31,7 +32,6 @@ import javax.sound.midi.Synthesizer; * @bug 4685396 * @summary Tests that Synthesizer.remapInstrument works * @run main bug4685396 - * @key headful */ public class bug4685396 { @@ -49,8 +49,7 @@ public class bug4685396 { boolean reloadInstr, // reload all instruments? boolean unloadFrom, // unload "from" instrument? boolean unloadTo // unload "to" instrument? - ) throws Exception - { + ) throws MidiUnavailableException { log("Starting test: reloadInstr=" + reloadInstr + ", unloadFrom=" + unloadFrom + ", unloadTo=" + unloadTo @@ -164,6 +163,9 @@ public class bug4685396 { boolean success = false; try { success = test(reloadInstr, unloadFrom, unloadTo); + } catch (final MidiUnavailableException ignored) { + // the test is not applicable + success = true; } catch (Exception ex) { log("Exception: " + ex.toString()); } @@ -171,7 +173,7 @@ public class bug4685396 { return success; } - public static void main(String args[]) throws Exception { + public static void main(String args[]) { boolean failed = false; if (!runTest(true, false, false)) failed = true; diff --git a/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java b/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java index f61126bd609..b9ccb2fcf91 100644 --- a/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java +++ b/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -94,7 +94,7 @@ public final class FrameLengthAfterConversion { } } - public static void main(final String[] args) { + public static void main(final String[] args) throws IOException { for (final FormatConversionProvider fcp : load( FormatConversionProvider.class)) { System.out.println("fcp = " + fcp); @@ -139,7 +139,8 @@ public final class FrameLengthAfterConversion { */ private static void testAfterSaveToStream(final AudioFileWriter afw, final AudioFileFormat.Type type, - final AudioInputStream ais) { + final AudioInputStream ais) + throws IOException { try { final ByteArrayOutputStream out = new ByteArrayOutputStream(); afw.write(ais, type, out); @@ -147,7 +148,7 @@ public final class FrameLengthAfterConversion { out.toByteArray()); validate(AudioSystem.getAudioInputStream(input).getFrameLength()); } catch (IllegalArgumentException | UnsupportedAudioFileException - | IOException ignored) { + ignored) { } } @@ -156,18 +157,19 @@ public final class FrameLengthAfterConversion { */ private static void testAfterSaveToFile(final AudioFileWriter afw, final AudioFileFormat.Type type, - AudioInputStream ais) { + AudioInputStream ais) + throws IOException { + final File temp = File.createTempFile("sound", ".tmp"); try { - final File temp = File.createTempFile("sound", ".tmp"); - temp.deleteOnExit(); afw.write(ais, type, temp); ais = AudioSystem.getAudioInputStream(temp); final long frameLength = ais.getFrameLength(); ais.close(); - Files.delete(Paths.get(temp.getAbsolutePath())); validate(frameLength); } catch (IllegalArgumentException | UnsupportedAudioFileException - | IOException ignored) { + ignored) { + } finally { + Files.delete(Paths.get(temp.getAbsolutePath())); } } diff --git a/jdk/test/javax/sound/sampled/Clip/ClipCloseLoss.java b/jdk/test/javax/sound/sampled/Clip/ClipCloseLoss.java index b7f4fa424bf..56b046163b0 100644 --- a/jdk/test/javax/sound/sampled/Clip/ClipCloseLoss.java +++ b/jdk/test/javax/sound/sampled/Clip/ClipCloseLoss.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -36,7 +36,7 @@ import javax.sound.sampled.Mixer; * @bug 4946913 * @summary DirectClip doesn't kill the thread correctly, sometimes * @run main/othervm ClipCloseLoss - * @key headful + * @key intermittent */ public class ClipCloseLoss { static int frameCount = 441000; // lets say 10 seconds diff --git a/jdk/test/javax/sound/sampled/Clip/bug5070081.java b/jdk/test/javax/sound/sampled/Clip/bug5070081.java index 8c9206b7f14..e7bf7e30de2 100644 --- a/jdk/test/javax/sound/sampled/Clip/bug5070081.java +++ b/jdk/test/javax/sound/sampled/Clip/bug5070081.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -21,17 +21,19 @@ * questions. */ +import java.util.concurrent.TimeUnit; + import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import javax.sound.sampled.DataLine; +import javax.sound.sampled.LineUnavailableException; /* * @test * @bug 5070081 * @summary Tests that javax.sound.sampled.Clip does not loses position through * stop/start - * @key headful */ public class bug5070081 { @@ -43,10 +45,15 @@ public class bug5070081 { static boolean test() throws Exception { DataLine.Info info = new DataLine.Info(Clip.class, format); - Clip clip = (Clip)AudioSystem.getLine(info); - clip.open(format, soundData, 0, soundData.length); - + Clip clip = null; boolean bSuccess = true; + try { + clip = (Clip) AudioSystem.getLine(info); + clip.open(format, soundData, 0, soundData.length); + } catch (LineUnavailableException | IllegalArgumentException ignored) { + // the test is not applicable + return bSuccess; + } long nLengthMS = clip.getMicrosecondLength()/1000; @@ -56,18 +63,22 @@ public class bug5070081 { clip.start(); // start playing Thread.sleep(1000); // wait a sec - long time1 = System.currentTimeMillis(); + long time1 = currentTimeMillis(); long pos1 = clip.getFramePosition(); // store the position - System.out.println(" Position before stop: " + pos1); clip.stop(); // and then stop long pos2 = clip.getFramePosition(); // 2nd try - long time2 = System.currentTimeMillis(); + long time2 = currentTimeMillis(); + + System.out.println(" Position before stop: " + pos1); System.out.println(" Position after stop: " + pos2); - System.out.println(" d(time): " + Math.abs(time2-time1) + " ms;" - + "d(clip pos): " + Math.abs(pos2 - pos1) + " ms."); + long timeDiff = Math.abs(time2 - time1); + // sample rate is 22050 per second, so 22.05 per ms + long posDiff = (long) (Math.abs(pos2 - pos1) / 22.05); + System.out.println(" d(time): " + timeDiff + " ms;" + + "d(clip pos time): " + posDiff + " ms."); - long nDerivation = Math.abs(pos2 - pos1) - Math.abs(time2-time1); + long nDerivation = posDiff - timeDiff; // add 50 ms for deviation (delay for stopping and errors due timer precision) if (nDerivation > 50) { System.out.println(" ERROR(1): The deviation is too much: " + nDerivation + " ms"); @@ -104,4 +115,8 @@ public class bug5070081 { System.out.println("Test passed sucessfully"); } + + private static long currentTimeMillis() { + return TimeUnit.NANOSECONDS.toMillis(System.nanoTime()); + } } diff --git a/jdk/test/javax/sound/sampled/DataLine/LongFramePosition.java b/jdk/test/javax/sound/sampled/DataLine/LongFramePosition.java index e952fa82d2a..079a785de8b 100644 --- a/jdk/test/javax/sound/sampled/DataLine/LongFramePosition.java +++ b/jdk/test/javax/sound/sampled/DataLine/LongFramePosition.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -30,7 +30,6 @@ import javax.sound.sampled.SourceDataLine; * @test * @bug 5049129 * @summary DataLine.getLongFramePosition - * @key headful */ public class LongFramePosition { @@ -59,12 +58,12 @@ public class LongFramePosition { } finally { sdl.close(); } - } catch(LineUnavailableException e){ + } catch (LineUnavailableException | IllegalArgumentException e) { System.out.println(e); System.out.println("Cannot execute test."); return; } - if (failed) throw new Exception("Test FAILED!"); + if (failed) throw new RuntimeException("Test FAILED!"); System.out.println("Test Passed."); } } diff --git a/jdk/test/javax/sound/sampled/DirectAudio/bug6372428.java b/jdk/test/javax/sound/sampled/DirectAudio/bug6372428.java index d5baa4ad1fa..177ebce85a0 100644 --- a/jdk/test/javax/sound/sampled/DirectAudio/bug6372428.java +++ b/jdk/test/javax/sound/sampled/DirectAudio/bug6372428.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -34,7 +34,6 @@ import javax.sound.sampled.TargetDataLine; * @summary playback and capture doesn't interrupt after terminating thread that * calls start() * @run main bug6372428 - * @key headful */ public class bug6372428 { public bug6372428() { diff --git a/jdk/test/javax/sound/sampled/spi/AudioFileReader/ShortHeader.java b/jdk/test/javax/sound/sampled/spi/AudioFileReader/ShortHeader.java index 1f30587889b..0b08c3a5b1c 100644 --- a/jdk/test/javax/sound/sampled/spi/AudioFileReader/ShortHeader.java +++ b/jdk/test/javax/sound/sampled/spi/AudioFileReader/ShortHeader.java @@ -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 @@ -30,6 +30,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import java.nio.file.Files; +import java.nio.file.Paths; import java.util.Arrays; import javax.sound.sampled.AudioSystem; @@ -51,14 +52,16 @@ public final class ShortHeader { public static void main(final String[] args) throws Exception { final File file = Files.createTempFile("audio", "test").toFile(); - file.deleteOnExit(); - try (final OutputStream fos = new FileOutputStream(file)) { - fos.write(W); - } - - testAS(file); - for (final AudioFileReader afr : load(AudioFileReader.class)) { - testAFR(afr, file); + try { + try (final OutputStream fos = new FileOutputStream(file)) { + fos.write(W); + } + testAS(file); + for (final AudioFileReader afr : load(AudioFileReader.class)) { + testAFR(afr, file); + } + } finally { + Files.delete(Paths.get(file.getAbsolutePath())); } } diff --git a/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriterCloseInput.java b/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriterCloseInput.java index b73734ac536..90aea0d80e2 100644 --- a/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriterCloseInput.java +++ b/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriterCloseInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, 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 @@ -33,6 +33,9 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Paths; + import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; @@ -89,7 +92,7 @@ public class WriterCloseInput { if (isFile) { File f = File.createTempFile("WriterCloseInput" + testTotal, "tmp"); AudioSystem.write(inStream, fileType, f); - f.delete(); + Files.delete(Paths.get(f.getAbsolutePath())); } else { OutputStream outStream = new NullOutputStream(); AudioSystem.write(inStream, fileType, outStream); diff --git a/jdk/test/javax/sql/rowset/TEST.properties b/jdk/test/javax/sql/rowset/TEST.properties new file mode 100644 index 00000000000..6c5a2c7aceb --- /dev/null +++ b/jdk/test/javax/sql/rowset/TEST.properties @@ -0,0 +1 @@ +modules = java.sql.rowset diff --git a/jdk/test/javax/swing/JComboBox/6632953/bug6632953.java b/jdk/test/javax/swing/JComboBox/6632953/bug6632953.java index f6f7daa07a9..86ccf75c2a3 100644 --- a/jdk/test/javax/swing/JComboBox/6632953/bug6632953.java +++ b/jdk/test/javax/swing/JComboBox/6632953/bug6632953.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/javax/swing/JComboBox/WindowsComboBoxSize/WindowsComboBoxSizeTest.java b/jdk/test/javax/swing/JComboBox/WindowsComboBoxSize/WindowsComboBoxSizeTest.java new file mode 100644 index 00000000000..64c4e51685f --- /dev/null +++ b/jdk/test/javax/swing/JComboBox/WindowsComboBoxSize/WindowsComboBoxSizeTest.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8179027 + * @requires (os.family == "windows") + * @summary JComboBox too small under Windows LAF + * @run main WindowsComboBoxSizeTest + */ + +import javax.swing.*; +import java.awt.FlowLayout; +import java.awt.Robot; + +public class WindowsComboBoxSizeTest { + private static JTextField textField; + private static JComboBox comboBox; + private static JComboBox comboBoxEd; + private static JFrame frame; + + public static void main(String[] args) throws Exception { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + + SwingUtilities.invokeAndWait(() -> { + frame = new JFrame(); + frame.getContentPane().setLayout( new FlowLayout() ); + + textField = new JTextField("item 1"); + frame.getContentPane().add(textField); + + comboBox = new JComboBox<>(new String[] + {"item 1", "item 2", "item 3"}); + frame.getContentPane().add(comboBox); + + comboBoxEd = new JComboBox<>(new String[] + {"item 1", "item 2", "item 3"}); + comboBoxEd.setEditable( true ); + frame.getContentPane().add(comboBoxEd); + + frame.pack(); + frame.setVisible( true ); + }); + Robot robot = new Robot(); + robot.waitForIdle(); + + try { + test(); + } finally { + SwingUtilities.invokeLater(frame::dispose); + } + } + + private static void test() throws Exception { + SwingUtilities.invokeAndWait(() -> { + int expected = textField.getSize().height; + if (comboBox.getSize().height != expected ) { + throw new RuntimeException( + "Wrong non-editable JComboBox height " + + comboBox.getSize().height); + } + if (comboBoxEd.getSize().height != expected ) { + throw new RuntimeException( + "Wrong editable JComboBox height " + + comboBoxEd.getSize().height); + } + }); + } +} + diff --git a/jdk/test/javax/swing/JFileChooser/4150029/bug4150029.html b/jdk/test/javax/swing/JFileChooser/4150029/bug4150029.html index a016cfb956f..82671856d02 100644 --- a/jdk/test/javax/swing/JFileChooser/4150029/bug4150029.html +++ b/jdk/test/javax/swing/JFileChooser/4150029/bug4150029.html @@ -1,6 +1,6 @@ + + \ No newline at end of file diff --git a/jdk/test/javax/xml/jaxp/Encodings/CheckEncodingPropertiesFile.java b/jdk/test/javax/xml/jaxp/Encodings/CheckEncodingPropertiesFile.java index d5c31961aca..994b6d0f7ac 100644 --- a/jdk/test/javax/xml/jaxp/Encodings/CheckEncodingPropertiesFile.java +++ b/jdk/test/javax/xml/jaxp/Encodings/CheckEncodingPropertiesFile.java @@ -39,7 +39,6 @@ import com.sun.org.apache.xml.internal.serializer.EncodingInfo; import com.sun.org.apache.xml.internal.serializer.Encodings; import java.io.InputStreamReader; -import java.lang.reflect.Module; import java.lang.reflect.Method; import java.nio.charset.Charset; import java.util.ArrayList; diff --git a/jdk/test/javax/xml/jaxp/common/8035437/Document.java b/jdk/test/javax/xml/jaxp/common/8035437/patch-src1/org/w3c/dom/Document.java similarity index 100% rename from jdk/test/javax/xml/jaxp/common/8035437/Document.java rename to jdk/test/javax/xml/jaxp/common/8035437/patch-src1/org/w3c/dom/Document.java diff --git a/jdk/test/javax/xml/jaxp/common/8035437/Node.java b/jdk/test/javax/xml/jaxp/common/8035437/patch-src1/org/w3c/dom/Node.java similarity index 100% rename from jdk/test/javax/xml/jaxp/common/8035437/Node.java rename to jdk/test/javax/xml/jaxp/common/8035437/patch-src1/org/w3c/dom/Node.java diff --git a/jdk/test/javax/xml/jaxp/common/8035437/DocumentImpl.java b/jdk/test/javax/xml/jaxp/common/8035437/patch-src2/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java similarity index 100% rename from jdk/test/javax/xml/jaxp/common/8035437/DocumentImpl.java rename to jdk/test/javax/xml/jaxp/common/8035437/patch-src2/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java diff --git a/jdk/test/javax/xml/jaxp/common/8035437/run.sh b/jdk/test/javax/xml/jaxp/common/8035437/run.sh index ea377c67281..9b1d327e6d2 100644 --- a/jdk/test/javax/xml/jaxp/common/8035437/run.sh +++ b/jdk/test/javax/xml/jaxp/common/8035437/run.sh @@ -28,13 +28,43 @@ # @summary Tests that java.lang.AbstractMethodError is not thrown when # serializing improper version of DocumentImpl class. +OS=`uname -s` +case "$OS" in + SunOS ) + PS=":" + ;; + Linux ) + PS=":" + ;; + Darwin ) + PS=":" + ;; + AIX ) + PS=":" + ;; + Windows*) + PS=";" + ;; + CYGWIN*) + PS=";" + ;; + * ) + echo "Unrecognized system!" + exit 1; + ;; +esac + mkdir -p exec/java.xml compile/java.xml $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \ - -d compile/java.xml -Xmodule:java.xml $TESTSRC/Document.java $TESTSRC/Node.java || exit 1 + -d compile/java.xml --patch-module java.xml=$TESTSRC/patch-src1 \ + $TESTSRC/patch-src1/org/w3c/dom/Document.java \ + $TESTSRC/patch-src1/org/w3c/dom/Node.java || exit 1 $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \ - -d exec/java.xml --patch-module java.xml=compile/java.xml -Xmodule:java.xml $TESTSRC/DocumentImpl.java || exit 2 + -d exec/java.xml --patch-module java.xml=compile/java.xml${PS}$TESTSRC/patch-src2 \ + $TESTSRC/patch-src2/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java \ + || exit 2 $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \ $TESTSRC/AbstractMethodErrorTest.java -d exec || exit 3 diff --git a/jdk/test/jdk/asm/AsmSanity.java b/jdk/test/jdk/asm/AsmSanity.java deleted file mode 100644 index 8f9cc3caf53..00000000000 --- a/jdk/test/jdk/asm/AsmSanity.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -/* - * @test - * @bug 7197401 - * @summary Add a subset of the org.objectweb.asm packages to jdk8 - * This test doesn't test asm functionality, it just tests the presence of - * asm in the jdk. - * These compile/run commands do the following: - * - Verify that asm is not in ct.sym so user code that refs it won't compile. - * - Verify that asm really is in rt.jar and can be accessed when ct.sym is not used. - * - Verify that if user code is compiled without ct.sym, it can't access asm classes - * at runtime when a security manager is in use. - * - * @modules java.base/jdk.internal.org.objectweb.asm - * - * @compile -XDignore.symbol.file=true AsmSanity.java - * @run main/othervm AsmSanity - * - * @run main/othervm/fail AsmSanity secure - * - */ - - -// Verify that the expected asm pkgs are present -import jdk.internal.org.objectweb.asm.*; - -// Verify that we can actually run some of the asm code. -public class AsmSanity { - - static public void main(String[] args) { - if (args.length == 0) { - System.out.println("-- Running without SecurityManager"); - new Label(); - System.out.println("-- Passed"); - return; - } - - if (args[0].equals("secure")) { - System.out.println("-- Running with SecurityManager"); - java.lang.SecurityManager sm = new SecurityManager(); - System.setSecurityManager(sm); - // This should cause an accessClassInPackage exception - new Label(); - return; - } - throw new Error("-- Failed: Unknown argument to main: " + args[0]); - } -} diff --git a/jdk/test/jdk/internal/jimage/JImageOpenTest.java b/jdk/test/jdk/internal/jimage/JImageOpenTest.java index 06c19937a41..9c828d71003 100644 --- a/jdk/test/jdk/internal/jimage/JImageOpenTest.java +++ b/jdk/test/jdk/internal/jimage/JImageOpenTest.java @@ -21,7 +21,6 @@ * questions. */ -import java.lang.reflect.Layer; import java.net.URI; import java.nio.file.FileSystem; import java.nio.file.FileSystems; @@ -48,7 +47,7 @@ public class JImageOpenTest { final List names = Files.walk(root) .filter(p -> p.getNameCount() > 2) - .filter(p -> Layer.boot().findModule(p.getName(1).toString()).isPresent()) + .filter(p -> ModuleLayer.boot().findModule(p.getName(1).toString()).isPresent()) .map(p -> p.subpath(2, p.getNameCount())) .map(p -> p.toString()) .filter(s -> s.endsWith(".class") && !s.endsWith("module-info.class")) diff --git a/jdk/test/jdk/internal/jrtfs/java.policy b/jdk/test/jdk/internal/jrtfs/java.policy index 5df300aa905..276543b8208 100644 --- a/jdk/test/jdk/internal/jrtfs/java.policy +++ b/jdk/test/jdk/internal/jrtfs/java.policy @@ -1,3 +1,3 @@ grant { - permission java.io.FilePermission "${java.home}/-", "read"; + permission java.lang.RuntimePermission "accessSystemModules"; }; diff --git a/jdk/test/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java b/jdk/test/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java index 50235107153..302fb185809 100644 --- a/jdk/test/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java +++ b/jdk/test/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -32,6 +32,7 @@ import jdk.internal.misc.SharedSecrets; * @summary Test JavaLangAccess.newUnsafeString * @modules java.base/jdk.internal.misc * @compile -XDignore.symbol.file NewUnsafeString.java + * @run main NewUnsafeString */ public class NewUnsafeString { diff --git a/jdk/test/jdk/internal/reflect/CallerSensitive/CheckCSMs.java b/jdk/test/jdk/internal/reflect/CallerSensitive/CheckCSMs.java new file mode 100644 index 00000000000..126df3a75e6 --- /dev/null +++ b/jdk/test/jdk/internal/reflect/CallerSensitive/CheckCSMs.java @@ -0,0 +1,251 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import com.sun.tools.classfile.*; +import com.sun.tools.jdeps.ClassFileReader; +import static com.sun.tools.classfile.ConstantPool.*; +import java.io.File; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.net.URI; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.ConcurrentSkipListSet; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.FutureTask; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/* + * @test + * @summary CallerSensitive methods should be static or final instance + * methods except the known list of non-final instance methods + * @modules jdk.jdeps/com.sun.tools.classfile + * jdk.jdeps/com.sun.tools.jdeps + * @build CheckCSMs + * @run main/othervm/timeout=900 CheckCSMs + */ +public class CheckCSMs { + private static int numThreads = 3; + private static boolean listCSMs = false; + private final ExecutorService pool; + + // The goal is to remove this list of Non-final instance @CS methods + // over time. Do not add any new one to this list. + private static Set KNOWN_NON_FINAL_CSMS = + Set.of("java/io/ObjectStreamField#getType ()Ljava/lang/Class;", + "java/io/ObjectStreamClass#forClass ()Ljava/lang/Class;", + "java/lang/Runtime#load (Ljava/lang/String;)V", + "java/lang/Runtime#loadLibrary (Ljava/lang/String;)V", + "java/lang/Thread#getContextClassLoader ()Ljava/lang/ClassLoader;", + "javax/sql/rowset/serial/SerialJavaObject#getFields ()[Ljava/lang/reflect/Field;" + ); + + public static void main(String[] args) throws Exception { + if (args.length > 0 && args[0].equals("--list")) { + listCSMs = true; + } + + CheckCSMs checkCSMs = new CheckCSMs(); + Set result = checkCSMs.run(getPlatformClasses()); + if (!KNOWN_NON_FINAL_CSMS.equals(result)) { + Set diff = new HashSet<>(result); + diff.removeAll(KNOWN_NON_FINAL_CSMS); + throw new RuntimeException("Unexpected non-final instance method: " + + result.stream().sorted() + .collect(Collectors.joining("\n", "\n", ""))); + } + } + + private final Set nonFinalCSMs = new ConcurrentSkipListSet<>(); + private final ReferenceFinder finder; + public CheckCSMs() { + this.finder = new ReferenceFinder(getFilter(), getVisitor()); + pool = Executors.newFixedThreadPool(numThreads); + + } + + public Set run(Stream classes) + throws IOException, InterruptedException, ExecutionException, + ConstantPoolException + { + classes.forEach(this::processPath); + waitForCompletion(); + pool.shutdown(); + return nonFinalCSMs; + } + + + private ReferenceFinder.Filter getFilter() { + final String classname = "jdk/internal/reflect/Reflection"; + final String method = "getCallerClass"; + return new ReferenceFinder.Filter() { + public boolean accept(ConstantPool cpool, CPRefInfo cpref) { + try { + CONSTANT_NameAndType_info nat = cpref.getNameAndTypeInfo(); + return cpref.getClassName().equals(classname) && nat.getName().equals(method); + } catch (ConstantPoolException ex) { + throw new RuntimeException(ex); + } + } + }; + } + + private ReferenceFinder.Visitor getVisitor() { + return new ReferenceFinder.Visitor() { + public void visit(ClassFile cf, Method m, List refs) { + try { + // ignore jdk.unsupported/sun.reflect.Reflection.getCallerClass + // which is a "special" delegate to the internal getCallerClass + if (cf.getName().equals("sun/reflect/Reflection") && + m.getName(cf.constant_pool).equals("getCallerClass")) + return; + + String name = String.format("%s#%s %s", cf.getName(), + m.getName(cf.constant_pool), + m.descriptor.getValue(cf.constant_pool)); + if (!CheckCSMs.isStaticOrFinal(cf, m, cf.constant_pool)) { + System.err.println("Unsupported @CallerSensitive: " + name); + nonFinalCSMs.add(name); + } else { + if (listCSMs) { + System.out.format("@CS %s%n", name); + } + } + } catch (ConstantPoolException ex) { + throw new RuntimeException(ex); + } + } + }; + } + + void processPath(Path path) { + try { + ClassFileReader reader = ClassFileReader.newInstance(path); + for (ClassFile cf : reader.getClassFiles()) { + if (cf.access_flags.is(AccessFlags.ACC_MODULE)) + continue; + + String classFileName = cf.getName(); + // for each ClassFile + // parse constant pool to find matching method refs + // parse each method (caller) + // - visit and find method references matching the given method name + pool.submit(getTask(cf)); + } + } catch (IOException x) { + throw new UncheckedIOException(x); + } catch (ConstantPoolException x) { + throw new RuntimeException(x); + } + } + + private static final String CALLER_SENSITIVE_ANNOTATION + = "Ljdk/internal/reflect/CallerSensitive;"; + + private static boolean isCallerSensitive(Method m, ConstantPool cp) + throws ConstantPoolException + { + RuntimeAnnotations_attribute attr = + (RuntimeAnnotations_attribute)m.attributes.get(Attribute.RuntimeVisibleAnnotations); + if (attr != null) { + for (int i = 0; i < attr.annotations.length; i++) { + Annotation ann = attr.annotations[i]; + String annType = cp.getUTF8Value(ann.type_index); + if (CALLER_SENSITIVE_ANNOTATION.equals(annType)) { + return true; + } + } + } + return false; + } + + private static boolean isStaticOrFinal(ClassFile cf, Method m, ConstantPool cp) + throws ConstantPoolException + { + if (!isCallerSensitive(m, cp)) + return false; + + // either a static method or a final instance method + return m.access_flags.is(AccessFlags.ACC_STATIC) || + m.access_flags.is(AccessFlags.ACC_FINAL) || + cf.access_flags.is(AccessFlags.ACC_FINAL); + } + + private final List> tasks = new ArrayList>(); + private FutureTask getTask(final ClassFile cf) { + FutureTask task = new FutureTask(new Callable() { + public Void call() throws Exception { + finder.parse(cf); + return null; + } + }); + tasks.add(task); + return task; + } + + private void waitForCompletion() throws InterruptedException, ExecutionException { + for (FutureTask t : tasks) { + t.get(); + } + if (tasks.isEmpty()) { + throw new RuntimeException("No classes found, or specified."); + } + System.out.println("Parsed " + tasks.size() + " classfiles"); + } + + static Stream getPlatformClasses() throws IOException { + Path home = Paths.get(System.getProperty("java.home")); + + // Either an exploded build or an image. + File classes = home.resolve("modules").toFile(); + if (classes.isDirectory()) { + return Stream.of(classes.toPath()); + } else { + return jrtPaths(); + } + } + + static Stream jrtPaths() { + FileSystem jrt = FileSystems.getFileSystem(URI.create("jrt:/")); + Path root = jrt.getPath("/"); + + try { + return Files.walk(root) + .filter(p -> p.getNameCount() > 1) + .filter(p -> p.toString().endsWith(".class")); + } catch (IOException x) { + throw new UncheckedIOException(x); + } + } +} diff --git a/jdk/test/jdk/internal/util/jar/TestVersionedStream.java b/jdk/test/jdk/internal/util/jar/TestVersionedStream.java index 5dbef938752..1f043b2bc33 100644 --- a/jdk/test/jdk/internal/util/jar/TestVersionedStream.java +++ b/jdk/test/jdk/internal/util/jar/TestVersionedStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -40,7 +40,6 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.UncheckedIOException; -import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -168,23 +167,23 @@ public class TestVersionedStream { // verify the contents Map contents = new HashMap<>(); - contents.put("p/Bar.class", "base/p/Bar.class\n"); - contents.put("p/Main.class", "base/p/Main.class\n"); + contents.put("p/Bar.class", "base/p/Bar.class"); + contents.put("p/Main.class", "base/p/Main.class"); switch (version.major()) { case 8: - contents.put("p/Foo.class", "base/p/Foo.class\n"); + contents.put("p/Foo.class", "base/p/Foo.class"); break; case 9: - contents.put("p/Foo.class", "v9/p/Foo.class\n"); + contents.put("p/Foo.class", "v9/p/Foo.class"); break; case 10: - contents.put("p/Foo.class", "v10/p/Foo.class\n"); - contents.put("q/Bar.class", "v10/q/Bar.class\n"); + contents.put("p/Foo.class", "v10/p/Foo.class"); + contents.put("q/Bar.class", "v10/q/Bar.class"); break; case 11: - contents.put("p/Bar.class", "v11/p/Bar.class\n"); - contents.put("p/Foo.class", "v11/p/Foo.class\n"); - contents.put("q/Bar.class", "v10/q/Bar.class\n"); + contents.put("p/Bar.class", "v11/p/Bar.class"); + contents.put("p/Foo.class", "v11/p/Foo.class"); + contents.put("q/Bar.class", "v10/q/Bar.class"); break; default: Assert.fail("Test out of date, please add more cases"); @@ -196,7 +195,7 @@ public class TestVersionedStream { Assert.assertTrue(i != -1, name + " not in enames"); JarEntry je = versionedEntries.get(i); try (InputStream is = jf.getInputStream(je)) { - String s = new String(is.readAllBytes()); + String s = new String(is.readAllBytes()).replaceAll(System.lineSeparator(), ""); Assert.assertTrue(s.endsWith(e.getValue()), s); } catch (IOException x) { throw new UncheckedIOException(x); @@ -208,16 +207,13 @@ public class TestVersionedStream { private void createFiles(String... files) { ArrayList list = new ArrayList(); Arrays.stream(files) - .map(f -> "file:///" + userdir + "/" + f) - .map(f -> URI.create(f)) - .filter(u -> u != null) - .map(u -> Paths.get(u)) + .map(f -> Paths.get(userdir.toAbsolutePath().toString(), f)) .forEach(p -> { try { Files.createDirectories(p.getParent()); Files.createFile(p); list.clear(); - list.add(p.toString()); + list.add(p.toString().replace(File.separatorChar, '/')); Files.write(p, list); } catch (IOException x) { throw new UncheckedIOException(x); diff --git a/jdk/test/jdk/modules/etc/JdkQualifiedExportTest.java b/jdk/test/jdk/modules/etc/JdkQualifiedExportTest.java new file mode 100644 index 00000000000..dcc6579f618 --- /dev/null +++ b/jdk/test/jdk/modules/etc/JdkQualifiedExportTest.java @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8176537 + * @summary Check JDK modules have no qualified export to any upgradeable module + * @modules java.base/jdk.internal.module + * @run main JdkQualifiedExportTest + */ + +import jdk.internal.module.ModuleHashes; +import jdk.internal.module.ModuleInfo; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.lang.module.Configuration; +import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleDescriptor.Exports; +import java.lang.module.ModuleDescriptor.Opens; +import java.lang.module.ModuleFinder; +import java.lang.module.ModuleReference; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +public class JdkQualifiedExportTest { + public static void main(String... args) { + // check all system modules + ModuleFinder.ofSystem().findAll() + .stream() + .map(ModuleReference::descriptor) + .sorted(Comparator.comparing(ModuleDescriptor::name)) + .forEach(JdkQualifiedExportTest::check); + } + + static void check(ModuleDescriptor md) { + // skip checking if this is an upgradeable module + if (!HashedModules.contains(md.name())) { + return; + } + + checkExports(md); + checkOpens(md); + } + + static Set KNOWN_EXCEPTIONS = + Set.of("jdk.internal.vm.ci/jdk.vm.ci.services", + "jdk.jsobject/jdk.internal.netscape.javascript.spi"); + + static void checkExports(ModuleDescriptor md) { + // build a map of upgradeable module to Exports that are qualified to it + // skip the qualified exports + Map> targetToExports = new HashMap<>(); + md.exports().stream() + .filter(Exports::isQualified) + .forEach(e -> e.targets().stream() + .filter(mn -> accept(md, mn)) + .forEach(t -> targetToExports.computeIfAbsent(t, _k -> new HashSet<>()) + .add(e))); + + if (targetToExports.size() > 0) { + String mn = md.name(); + + System.err.println(mn); + targetToExports.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .forEach(e -> { + e.getValue().stream() + .forEach(exp -> System.err.format(" exports %s to %s%n", + exp.source(), e.getKey())); + }); + + // no qualified exports to upgradeable modules are expected + // except the known exception cases + if (targetToExports.entrySet().stream() + .flatMap(e -> e.getValue().stream()) + .anyMatch(e -> !KNOWN_EXCEPTIONS.contains(mn + "/" + e.source()))) { + throw new RuntimeException(mn + " can't export package to upgradeable modules"); + } + } + } + + static void checkOpens(ModuleDescriptor md) { + // build a map of upgradeable module to Exports that are qualified to it + // skip the qualified exports + Map> targetToOpens = new HashMap<>(); + md.opens().stream() + .filter(Opens::isQualified) + .forEach(e -> e.targets().stream() + .filter(mn -> accept(md, mn)) + .forEach(t -> targetToOpens.computeIfAbsent(t, _k -> new HashSet<>()) + .add(e))); + + if (targetToOpens.size() > 0) { + String mn = md.name(); + + System.err.println(mn); + targetToOpens.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .forEach(e -> { + e.getValue().stream() + .forEach(exp -> System.err.format(" opens %s to %s%n", + exp.source(), e.getKey())); + }); + + throw new RuntimeException(mn + " can't open package to upgradeable modules"); + } + } + + /** + * Returns true if target is an upgradeable module but not required + * by the source module directly and indirectly. + */ + private static boolean accept(ModuleDescriptor source, String target) { + if (HashedModules.contains(target)) + return false; + + if (!ModuleFinder.ofSystem().find(target).isPresent()) + return false; + + Configuration cf = Configuration.empty().resolve(ModuleFinder.of(), + ModuleFinder.ofSystem(), + Set.of(source.name())); + return !cf.findModule(target).isPresent(); + } + + private static class HashedModules { + static Set HASHED_MODULES = hashedModules(); + + static Set hashedModules() { + Module javaBase = Object.class.getModule(); + try (InputStream in = javaBase.getResourceAsStream("module-info.class")) { + ModuleInfo.Attributes attrs = ModuleInfo.read(in, null); + ModuleHashes hashes = attrs.recordedHashes(); + if (hashes == null) + return Collections.emptySet(); + + Set names = new HashSet<>(hashes.names()); + names.add(javaBase.getName()); + return names; + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + /* + * Returns true if the named module is tied with java.base, + * i.e. non-upgradeable + */ + static boolean contains(String mn) { + return HASHED_MODULES.contains(mn); + } + } +} diff --git a/jdk/test/jdk/modules/etc/UpgradeableModules.java b/jdk/test/jdk/modules/etc/UpgradeableModules.java new file mode 100644 index 00000000000..a5ef602f413 --- /dev/null +++ b/jdk/test/jdk/modules/etc/UpgradeableModules.java @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary Verify that upgradeable modules are not hashed in java.base + * whereas non-upgradeable modules are. + * @modules java.base/jdk.internal.module + * @run main UpgradeableModules + */ + +import jdk.internal.module.ModuleHashes; +import jdk.internal.module.ModuleReferenceImpl; + +import java.lang.module.ModuleFinder; +import java.lang.module.ModuleReference; +import java.lang.module.ResolvedModule; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +public class UpgradeableModules { + private static final List UPGRADEABLE_MODULES = + List.of("java.activation", + "java.compiler", + "java.corba", + "java.jnlp", + "java.transaction", + "java.xml.bind", + "java.xml.ws", + "java.xml.ws.annotation", + "jdk.internal.vm.compiler", + "jdk.deploy", + "jdk.javaws", + "jdk.plugin", + "jdk.plugin.dom", + "jdk.xml.bind", + "jdk.xml.ws"); + + public static void main(String... args) { + Set hashedModules = hashedModules(); + if (hashedModules.isEmpty()) + return; + + if (UPGRADEABLE_MODULES.stream().anyMatch(hashedModules::contains)) { + throw new RuntimeException("upgradeable modules are hashed: " + + UPGRADEABLE_MODULES.stream() + .filter(hashedModules::contains) + .collect(Collectors.joining(" "))); + } + + Set nonUpgradeableModules = + ModuleFinder.ofSystem().findAll().stream() + .map(mref -> mref.descriptor().name()) + .filter(mn -> !UPGRADEABLE_MODULES.contains(mn)) + .collect(Collectors.toSet()); + + if (nonUpgradeableModules.stream().anyMatch(mn -> !hashedModules.contains(mn))) { + throw new RuntimeException("non-upgradeable modules are not hashed: " + + nonUpgradeableModules.stream() + .filter(mn -> !hashedModules.contains(mn)) + .collect(Collectors.joining(" "))); + } + } + + private static Set hashedModules() { + Optional resolvedModule = ModuleLayer.boot() + .configuration() + .findModule("java.base"); + assert resolvedModule.isPresent(); + ModuleReference mref = resolvedModule.get().reference(); + assert mref instanceof ModuleReferenceImpl; + ModuleHashes hashes = ((ModuleReferenceImpl) mref).recordedHashes(); + if (hashes != null) { + Set names = new HashSet<>(hashes.names()); + names.add("java.base"); + return names; + } + + return Set.of(); + } +} diff --git a/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java b/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java index 72e337066cb..12cfee6eb69 100644 --- a/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java +++ b/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -29,15 +29,9 @@ */ import java.lang.module.ModuleDescriptor; -import java.lang.module.ModuleFinder; -import java.lang.module.ModuleReference; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.util.Set; import static java.util.stream.Collectors.toSet; -import static java.lang.module.ModuleDescriptor.Requires.Modifier.*; - import org.testng.annotations.*; import static org.testng.Assert.*; @@ -46,10 +40,10 @@ public class VerifyModuleDelegation { private static final String JAVA_BASE = "java.base"; private static final ModuleDescriptor BASE - = ModuleDescriptor.module(JAVA_BASE).build(); + = ModuleDescriptor.newModule(JAVA_BASE).build(); private static final Set MREFS - = Layer.boot().modules().stream().map(Module::getDescriptor) + = ModuleLayer.boot().modules().stream().map(Module::getDescriptor) .collect(toSet()); private void check(ModuleDescriptor md, ModuleDescriptor ref) { @@ -69,7 +63,7 @@ public class VerifyModuleDelegation { @Test public void checkLoaderDelegation() { - Layer boot = Layer.boot(); + ModuleLayer boot = ModuleLayer.boot(); MREFS.stream() .forEach(md -> md.requires().stream().forEach(req -> { @@ -78,8 +72,9 @@ public class VerifyModuleDelegation { ClassLoader loader1 = boot.findLoader(md.name()); ClassLoader loader2 = boot.findLoader(req.name()); if (loader1 != loader2 && !isAncestor(loader2, loader1)) { - throw new Error(md.name() + " can't delegate to " + - "find classes from " + req.name()); + throw new Error(loader1.getName() + "/" + md.name() + + " can't delegate to find classes from " + + loader2.getName() + "/" + req.name()); } })); } diff --git a/jdk/test/jdk/modules/incubator/DefaultImage.java b/jdk/test/jdk/modules/incubator/DefaultImage.java index ff6f5261f14..dc2236351c8 100644 --- a/jdk/test/jdk/modules/incubator/DefaultImage.java +++ b/jdk/test/jdk/modules/incubator/DefaultImage.java @@ -34,6 +34,9 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; +import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleFinder; +import java.lang.module.ModuleReference; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -41,13 +44,13 @@ import java.util.function.Consumer; import java.util.stream.Stream; import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import static java.nio.charset.StandardCharsets.UTF_8; import static jdk.testlibrary.ProcessTools.executeCommand; import static org.testng.Assert.*; +@Test public class DefaultImage { private static final String JAVA_HOME = System.getProperty("java.home"); private static final Path TEST_SRC = Paths.get(System.getProperty("test.src")); @@ -72,19 +75,13 @@ public class DefaultImage { .resultChecker(r -> r.assertOutputDoesNotContain("jdk.incubator")); } - @DataProvider(name = "tokens") - public Object[][] singleModuleValues() throws IOException { - return new Object[][]{ { "ALL-DEFAULT" }, { "ALL-SYSTEM"} }; - } - - @Test(dataProvider = "tokens") - public void testAddMods(String addModsToken) throws Throwable { + public void testAllDefault() throws Throwable { if (isExplodedBuild()) { System.out.println("Test cannot run on exploded build"); return; } - java("--add-modules", addModsToken, + java("--add-modules", "ALL-DEFAULT", "-cp", CP_DIR.toString(), "listmods.ListModules") .assertSuccess() @@ -92,6 +89,22 @@ public class DefaultImage { .resultChecker(r -> r.assertOutputDoesNotContain("jdk.incubator")); } + public void testAllSystem() throws Throwable { + if (isExplodedBuild()) { + System.out.println("Test cannot run on exploded build"); + return; + } + + if (containsAnyIncubatorModules()) { + java("--add-modules", "ALL-SYSTEM", + "-cp", CP_DIR.toString(), + "listmods.ListModules") + .assertSuccess() + .resultChecker(r -> r.assertOutputContains("java.base")) + .resultChecker(r -> r.assertOutputContains("jdk.incubator")); + } + } + static ToolResult java(String... opts) throws Throwable { ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); @@ -155,4 +168,14 @@ public class DefaultImage { Path modulesPath = Paths.get(JAVA_HOME).resolve("lib").resolve("modules"); return Files.notExists(modulesPath); } + + static boolean containsAnyIncubatorModules() { + return ModuleFinder.ofSystem().findAll().stream() + .map(ModuleReference::descriptor) + .map(ModuleDescriptor::name) + .filter(mn -> mn.startsWith("jdk.incubator")) + .map(mn -> true) + .findAny() + .orElse(false); + } } diff --git a/jdk/test/jdk/modules/incubator/ImageModules.java b/jdk/test/jdk/modules/incubator/ImageModules.java index 347b1d4e221..6b9c9ea1665 100644 --- a/jdk/test/jdk/modules/incubator/ImageModules.java +++ b/jdk/test/jdk/modules/incubator/ImageModules.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -26,6 +26,7 @@ * @bug 8170859 * @summary Basic test for incubator modules in jmods and images * @library /lib/testlibrary + * @key intermittent * @modules jdk.compiler jdk.jartool jdk.jlink * @build CompilerUtils * @run testng/othervm ImageModules @@ -98,7 +99,7 @@ public class ImageModules { List.of("hello world", "message.converter", "java.base"), List.of("WARNING") }, { "--do-not-resolve-by-default", - List.of("ALL-DEFAULT", "ALL-SYSTEM"), + List.of("ALL-DEFAULT"), ToolResult.ASSERT_FAILURE, List.of("java.base", "java.lang.ClassNotFoundException: converter.MessageConverter"), List.of("WARNING", "message.converter") }, @@ -109,7 +110,7 @@ public class ImageModules { "WARNING: Using incubator modules: message.converter"), List.of() }, { "--do-not-resolve-by-default --warn-if-resolved=incubating", - List.of("ALL-DEFAULT", "ALL-SYSTEM"), + List.of("ALL-DEFAULT"), ToolResult.ASSERT_FAILURE, List.of("java.base", "java.lang.ClassNotFoundException: converter.MessageConverter"), List.of("WARNING", "message.converter") }, @@ -215,13 +216,13 @@ public class ImageModules { List.of() }, { "--do-not-resolve-by-default", "", - List.of("ALL-DEFAULT", "ALL-SYSTEM"), + List.of("ALL-DEFAULT"), ToolResult.ASSERT_FAILURE, List.of("java.lang.ClassNotFoundException: writer.MessageWriter", "java.base"), List.of("message.writer") }, { "--do-not-resolve-by-default", "--do-not-resolve-by-default", - List.of("ALL-DEFAULT", "ALL-SYSTEM"), + List.of("ALL-DEFAULT"), ToolResult.ASSERT_FAILURE, List.of("java.lang.ClassNotFoundException: writer.MessageWriter", "java.base"), List.of("message.converter", "message.writer") }, @@ -239,7 +240,8 @@ public class ImageModules { ToolResult.ASSERT_SUCCESS, List.of("HELLO CHEGAR !!!", "message.writer", "message.converter", "java.base", "WARNING: Using incubator modules: message.converter"), - List.of() } }; + List.of() } + }; return values; } diff --git a/jdk/test/jdk/modules/incubator/src/cp/listmods/ListModules.java b/jdk/test/jdk/modules/incubator/src/cp/listmods/ListModules.java index 2d80d198ee0..ceac4c516da 100644 --- a/jdk/test/jdk/modules/incubator/src/cp/listmods/ListModules.java +++ b/jdk/test/jdk/modules/incubator/src/cp/listmods/ListModules.java @@ -23,13 +23,11 @@ package listmods; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import static java.util.stream.Collectors.joining; public class ListModules { public static void main(String[] args) throws Exception { - System.out.println(Layer.boot() + System.out.println(ModuleLayer.boot() .modules() .stream() .map(Module::getName) diff --git a/jdk/test/jdk/modules/incubator/src/cp/test/ConvertToLowerCase.java b/jdk/test/jdk/modules/incubator/src/cp/test/ConvertToLowerCase.java index cf0d1c7cba9..4d0cc85252b 100644 --- a/jdk/test/jdk/modules/incubator/src/cp/test/ConvertToLowerCase.java +++ b/jdk/test/jdk/modules/incubator/src/cp/test/ConvertToLowerCase.java @@ -23,13 +23,11 @@ package test; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import static java.util.stream.Collectors.joining; public class ConvertToLowerCase { public static void main(String[] args) { - System.out.println(Layer.boot() + System.out.println(ModuleLayer.boot() .modules() .stream() .map(Module::getName) diff --git a/jdk/test/jdk/modules/incubator/src/cp/test/WriteUpperCase.java b/jdk/test/jdk/modules/incubator/src/cp/test/WriteUpperCase.java index 844fccb2fcf..f0662a55ed2 100644 --- a/jdk/test/jdk/modules/incubator/src/cp/test/WriteUpperCase.java +++ b/jdk/test/jdk/modules/incubator/src/cp/test/WriteUpperCase.java @@ -23,13 +23,11 @@ package test; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import static java.util.stream.Collectors.joining; public class WriteUpperCase { public static void main(String[] args) { - System.out.println(Layer.boot() + System.out.println(ModuleLayer.boot() .modules() .stream() .map(Module::getName) diff --git a/jdk/test/jdk/modules/open/Basic.java b/jdk/test/jdk/modules/open/Basic.java index 2af576e61e1..27c54902c5b 100644 --- a/jdk/test/jdk/modules/open/Basic.java +++ b/jdk/test/jdk/modules/open/Basic.java @@ -25,7 +25,7 @@ * @test * @library modules * @build m1/* m2/* - * @run testng/othervm --add-modules=m1,m2 Basic + * @run testng/othervm --add-modules=m1,m2 --illegal-access=deny Basic * @summary Basic test of open modules and open packages */ @@ -36,7 +36,6 @@ import java.lang.invoke.MethodType; import java.lang.module.ModuleDescriptor; import java.lang.reflect.Constructor; import java.lang.reflect.InaccessibleObjectException; -import java.lang.reflect.Module; import org.testng.annotations.Test; import org.testng.annotations.BeforeTest; diff --git a/jdk/test/jdk/modules/scenarios/automaticmodules/src/basictest/test/Main.java b/jdk/test/jdk/modules/scenarios/automaticmodules/src/basictest/test/Main.java index 01d8283a4b3..4a729799e29 100644 --- a/jdk/test/jdk/modules/scenarios/automaticmodules/src/basictest/test/Main.java +++ b/jdk/test/jdk/modules/scenarios/automaticmodules/src/basictest/test/Main.java @@ -23,9 +23,6 @@ package test; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; - import http.HttpServer; /** @@ -47,8 +44,8 @@ public class Main { cl = ClassLoader.getSystemClassLoader(); assertTrue(httpModule.canRead(cl.getUnnamedModule())); - // and read all modules in the boot Layer - Layer layer = Layer.boot(); + // and read all modules in the boot layer + ModuleLayer layer = ModuleLayer.boot(); layer.modules().forEach(m -> assertTrue(httpModule.canRead(m))); // run code in the automatic modue, ensures access is allowed diff --git a/jdk/test/jdk/modules/scenarios/automaticmodules/src/sptest/test/Main.java b/jdk/test/jdk/modules/scenarios/automaticmodules/src/sptest/test/Main.java index 5897d671321..dc079b876b3 100644 --- a/jdk/test/jdk/modules/scenarios/automaticmodules/src/sptest/test/Main.java +++ b/jdk/test/jdk/modules/scenarios/automaticmodules/src/sptest/test/Main.java @@ -26,8 +26,6 @@ package test; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleDescriptor.Requires; import java.lang.module.ModuleDescriptor.Provides; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.util.Map; import java.util.Optional; import java.util.ServiceLoader; @@ -36,7 +34,7 @@ import java.util.stream.Collectors; import javax.script.ScriptEngineFactory; /** - * Test that the automatic module "bananascript" is in the boot Layer and + * Test that the automatic module "bananascript" is in the boot layer and * it behaves as a service provider. */ @@ -44,7 +42,7 @@ public class Main { public static void main(String[] args) throws Exception { - Optional om = Layer.boot().findModule("bananascript"); + Optional om = ModuleLayer.boot().findModule("bananascript"); assertTrue(om.isPresent()); ModuleDescriptor descriptor = om.get().getDescriptor(); diff --git a/jdk/test/jdk/modules/scenarios/container/src/container/container/Main.java b/jdk/test/jdk/modules/scenarios/container/src/container/container/Main.java index 67f2416187f..05b8513114e 100644 --- a/jdk/test/jdk/modules/scenarios/container/src/container/container/Main.java +++ b/jdk/test/jdk/modules/scenarios/container/src/container/container/Main.java @@ -27,9 +27,7 @@ import java.io.File; import java.lang.module.Configuration; import java.lang.module.ModuleFinder; import java.lang.module.ResolvedModule; -import java.lang.reflect.Layer; import java.lang.reflect.Method; -import java.lang.reflect.Module; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Set; @@ -43,7 +41,7 @@ public class Main { public static void main(String[] args) throws Exception { System.out.println("Boot layer"); - Layer.boot() + ModuleLayer.boot() .modules() .stream() .map(Module::getName) @@ -70,10 +68,10 @@ public class Main { ModuleFinder finder = ModuleFinder.of(paths); - Configuration cf = Layer.boot().configuration() - .resolveRequiresAndUses(finder, - ModuleFinder.of(), - Set.of(appModuleName)); + Configuration cf = ModuleLayer.boot().configuration() + .resolveAndBind(finder, + ModuleFinder.of(), + Set.of(appModuleName)); System.out.println("Resolved"); cf.modules().stream() @@ -81,9 +79,9 @@ public class Main { .sorted() .forEach(mn -> System.out.format(" %s%n", mn)); - // reify the configuration as a Layer + // reify the configuration as a module layer ClassLoader scl = ClassLoader.getSystemClassLoader(); - Layer layer = Layer.boot().defineModulesWithManyLoaders(cf, scl); + ModuleLayer layer = ModuleLayer.boot().defineModulesWithManyLoaders(cf, scl); // invoke application main method ClassLoader loader = layer.findLoader(appModuleName); diff --git a/jdk/test/jdk/nio/zipfs/MultiReleaseJarTest.java b/jdk/test/jdk/nio/zipfs/MultiReleaseJarTest.java index 6c116010ee0..870b6fad3d0 100644 --- a/jdk/test/jdk/nio/zipfs/MultiReleaseJarTest.java +++ b/jdk/test/jdk/nio/zipfs/MultiReleaseJarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 8144355 8144062 + * @bug 8144355 8144062 8176709 * @summary Test aliasing additions to ZipFileSystem for multi-release jar files * @library /lib/testlibrary/java/util/jar * @build Compiler JarBuilder CreateMultiReleaseTestJars @@ -42,6 +42,7 @@ import java.net.URI; import java.nio.file.*; import java.util.HashMap; import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; import org.testng.Assert; import org.testng.annotations.*; @@ -50,6 +51,7 @@ public class MultiReleaseJarTest { final private int MAJOR_VERSION = Runtime.version().major(); final private String userdir = System.getProperty("user.dir","."); + final private CreateMultiReleaseTestJars creator = new CreateMultiReleaseTestJars(); final private Map stringEnv = new HashMap<>(); final private Map integerEnv = new HashMap<>(); final private Map versionEnv = new HashMap<>(); @@ -63,7 +65,6 @@ public class MultiReleaseJarTest { @BeforeClass public void initialize() throws Exception { - CreateMultiReleaseTestJars creator = new CreateMultiReleaseTestJars(); creator.compileEntries(); creator.buildUnversionedJar(); creator.buildMultiReleaseJar(); @@ -187,6 +188,45 @@ public class MultiReleaseJarTest { } } + @Test + public void testIsMultiReleaseJar() throws Exception { + // Re-examine commented out tests as part of JDK-8176843 + testCustomMultiReleaseValue("true", true); + testCustomMultiReleaseValue("true\r\nOther: value", true); + testCustomMultiReleaseValue("true\nOther: value", true); + //testCustomMultiReleaseValue("true\rOther: value", true); + + testCustomMultiReleaseValue("false", false); + testCustomMultiReleaseValue(" true", false); + testCustomMultiReleaseValue("true ", false); + //testCustomMultiReleaseValue("true\n ", false); + //testCustomMultiReleaseValue("true\r ", false); + //testCustomMultiReleaseValue("true\n true", false); + //testCustomMultiReleaseValue("true\r\n true", false); + } + + private static final AtomicInteger JAR_COUNT = new AtomicInteger(0); + + private void testCustomMultiReleaseValue(String value, boolean expected) + throws Exception { + String fileName = "custom-mr" + JAR_COUNT.incrementAndGet() + ".jar"; + creator.buildCustomMultiReleaseJar(fileName, value, Map.of(), + /*addEntries*/true); + + Map env = Map.of("multi-release", "runtime"); + Path filePath = Paths.get(userdir, fileName); + String ssp = filePath.toUri().toString(); + URI customJar = new URI("jar", ssp , null); + try (FileSystem fs = FileSystems.newFileSystem(customJar, env)) { + if (expected) { + Assert.assertTrue(readAndCompare(fs, MAJOR_VERSION)); + } else { + Assert.assertTrue(readAndCompare(fs, 8)); + } + } + Files.delete(filePath); + } + private static class ByteArrayClassLoader extends ClassLoader { final private FileSystem fs; diff --git a/jdk/test/lib/testlibrary/ModuleTargetHelper.java b/jdk/test/lib/testlibrary/ModuleTargetHelper.java new file mode 100644 index 00000000000..67ff0c7b2d5 --- /dev/null +++ b/jdk/test/lib/testlibrary/ModuleTargetHelper.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.InputStream; +import java.io.IOException; +import java.lang.module.ModuleReader; +import java.lang.module.ModuleReference; +import java.net.URI; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import jdk.internal.module.ClassFileConstants; +import jdk.internal.module.ClassFileAttributes; +import jdk.internal.module.ClassFileAttributes.ModuleTargetAttribute; +import jdk.internal.org.objectweb.asm.Attribute; +import jdk.internal.org.objectweb.asm.ClassReader; +import jdk.internal.org.objectweb.asm.ClassVisitor; +import jdk.internal.org.objectweb.asm.Opcodes; + +public class ModuleTargetHelper { + private ModuleTargetHelper() {} + + public static final class ModuleTarget { + private String targetPlatform; + + public ModuleTarget(String targetPlatform) { + this.targetPlatform = targetPlatform; + } + + public String targetPlatform() { + return targetPlatform; + } + } + + public static ModuleTarget getJavaBaseTarget() throws IOException { + Path p = Paths.get(URI.create("jrt:/modules/java.base/module-info.class")); + try (InputStream in = Files.newInputStream(p)) { + return read(in); + } + } + + public static ModuleTarget read(InputStream in) throws IOException { + ModuleTargetAttribute[] modTargets = new ModuleTargetAttribute[1]; + ClassVisitor cv = new ClassVisitor(Opcodes.ASM5) { + @Override + public void visitAttribute(Attribute attr) { + if (attr instanceof ModuleTargetAttribute) { + modTargets[0] = (ModuleTargetAttribute)attr; + } + } + }; + + // prototype of attributes that should be parsed + Attribute[] attrs = new Attribute[] { + new ModuleTargetAttribute() + }; + + // parse module-info.class + ClassReader cr = new ClassReader(in); + cr.accept(cv, attrs, 0); + if (modTargets[0] != null) { + return new ModuleTarget(modTargets[0].targetPlatform()); + } + + return null; + } + + public static ModuleTarget read(ModuleReference modRef) throws IOException { + ModuleReader reader = modRef.open(); + try (InputStream in = reader.open("module-info.class").get()) { + return read(in); + } finally { + reader.close(); + } + } +} diff --git a/jdk/test/lib/testlibrary/java/util/jar/CreateMultiReleaseTestJars.java b/jdk/test/lib/testlibrary/java/util/jar/CreateMultiReleaseTestJars.java index 504472f1f7e..afde13b4918 100644 --- a/jdk/test/lib/testlibrary/java/util/jar/CreateMultiReleaseTestJars.java +++ b/jdk/test/lib/testlibrary/java/util/jar/CreateMultiReleaseTestJars.java @@ -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 @@ -109,9 +109,17 @@ public class CreateMultiReleaseTestJars { public void buildCustomMultiReleaseJar(String filename, String multiReleaseValue, Map extraAttributes) throws IOException { + buildCustomMultiReleaseJar(filename, multiReleaseValue, extraAttributes, false); + } + + public void buildCustomMultiReleaseJar(String filename, String multiReleaseValue, + Map extraAttributes, boolean addEntries) throws IOException { JarBuilder jb = new JarBuilder(filename); extraAttributes.entrySet() .forEach(entry -> jb.addAttribute(entry.getKey(), entry.getValue())); + if (addEntries) { + addEntries(jb); + } jb.addAttribute("Multi-Release", multiReleaseValue); jb.build(); } diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/FileUtils.java b/jdk/test/lib/testlibrary/jdk/testlibrary/FileUtils.java index 3c85782b85f..9c41b8e7580 100644 --- a/jdk/test/lib/testlibrary/jdk/testlibrary/FileUtils.java +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/FileUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,7 @@ import java.nio.file.SimpleFileVisitor; import java.nio.file.attribute.BasicFileAttributes; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.TimeUnit; /** @@ -190,4 +191,40 @@ public final class FileUtils { } return excs; } + + /** + * Checks whether all file systems are accessible. This is performed + * by checking free disk space on all mounted file systems via a + * separate, spawned process. File systems are considered to be + * accessible if this process completes successfully before a given + * fixed duration has elapsed. + * + * @implNote On Unix this executes the {@code df} command in a separate + * process and on Windows always returns {@code true}. + */ + public static boolean areFileSystemsAccessible() throws IOException { + boolean areFileSystemsAccessible = true; + if (!isWindows) { + // try to check whether 'df' hangs + System.out.println("\n--- df output ---"); + System.out.flush(); + Process proc = new ProcessBuilder("df").inheritIO().start(); + try { + proc.waitFor(90, TimeUnit.SECONDS); + } catch (InterruptedException ignored) { + } + try { + int exitValue = proc.exitValue(); + if (exitValue != 0) { + System.err.printf("df process exited with %d != 0%n", + exitValue); + areFileSystemsAccessible = false; + } + } catch (IllegalThreadStateException ignored) { + System.err.println("df command apparently hung"); + areFileSystemsAccessible = false; + } + } + return areFileSystemsAccessible; + } } diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/NetworkConfiguration.java b/jdk/test/lib/testlibrary/jdk/testlibrary/NetworkConfiguration.java new file mode 100644 index 00000000000..77544d2bd92 --- /dev/null +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/NetworkConfiguration.java @@ -0,0 +1,267 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.testlibrary; + +import java.io.PrintStream; +import java.io.UncheckedIOException; +import java.io.IOException; +import java.net.Inet4Address; +import java.net.Inet6Address; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Predicate; +import java.util.stream.Stream; +import static java.net.NetworkInterface.getNetworkInterfaces; +import static java.util.Collections.list; + +/** + * Helper class for retrieving network interfaces and local addresses + * suitable for testing. + */ +public class NetworkConfiguration { + + static final boolean isWindows = + System.getProperty("os.name").startsWith("Windows"); + static final boolean isMacOS = + System.getProperty("os.name").contains("OS X"); + + private Map> ip4Interfaces; + private Map> ip6Interfaces; + + private NetworkConfiguration(Map> ip4Interfaces, + Map> ip6Interfaces) + { + this.ip4Interfaces = ip4Interfaces; + this.ip6Interfaces = ip6Interfaces; + } + + /** + * Returns a stream of interfaces suitable for functional tests. + */ + public Stream interfaces() { + return Stream.concat(ip4Interfaces(), ip6Interfaces()) + .distinct(); + } + + /** + * Returns a stream of interfaces suitable for IPv4 functional tests. + */ + public Stream ip4Interfaces() { + return ip4Interfaces.keySet().stream() + .filter(NetworkConfiguration::isNotExcludedInterface) + .filter(hasIp4Addresses); + } + + /** + * Returns a stream of interfaces suitable for IPv6 functional tests. + */ + public Stream ip6Interfaces() { + return ip6Interfaces.keySet().stream() + .filter(NetworkConfiguration::isNotExcludedInterface) + .filter(hasIp6Addresses); + } + + private static boolean isNotExcludedInterface(NetworkInterface nif) { + if (isMacOS && nif.getName().contains("awdl")) + return false; + String dName = nif.getDisplayName(); + if (isWindows && dName != null && dName.contains("Teredo")) + return false; + return true; + } + + private final Predicate hasIp4Addresses = nif -> { + Optional addr = ip4Interfaces.get(nif).stream() + .filter(a -> !a.isAnyLocalAddress()) + .findAny(); + + return addr.isPresent(); + }; + + private final Predicate hasIp6Addresses = nif -> { + Optional addr = ip6Interfaces.get(nif).stream() + .filter(a -> !a.isAnyLocalAddress()) + .findAny(); + + return addr.isPresent(); + }; + + + /** + * Returns a stream of interfaces suitable for IPv4 multicast tests. + */ + public Stream ip4MulticastInterfaces() { + return ip4Interfaces().filter(supportsIp4Multicast); + } + + /** + * Returns a stream of interfaces suitable for IPv6 multicast tests. + */ + public Stream ip6MulticastInterfaces() { + return ip6Interfaces().filter(supportsIp6Multicast); + } + + private final Predicate supportsIp4Multicast = nif -> { + try { + if (!nif.supportsMulticast() || nif.isLoopback()) + return false; + + Optional addr = ip4Interfaces.get(nif).stream() + .filter(a -> !a.isAnyLocalAddress()) + .findAny(); + + return addr.isPresent(); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + }; + + private final Predicate supportsIp6Multicast = nif -> { + try { + if (!nif.supportsMulticast() || nif.isLoopback()) + return false; + + Optional addr = ip6Interfaces.get(nif).stream() + .filter(a -> !a.isAnyLocalAddress()) + .findAny(); + + return addr.isPresent(); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + }; + + /** + * Returns all addresses on all "functional" interfaces. + */ + public Stream addresses(NetworkInterface nif) { + return Stream.concat(ip4Interfaces.get(nif).stream(), + ip6Interfaces.get(nif).stream()); + } + + /** + * Returns all IPv4 addresses on all "functional" interfaces. + */ + public Stream ip4Addresses() { + return ip4Interfaces().flatMap(nif -> ip4Addresses(nif)); + } + + /** + * Returns all IPv6 addresses on all "functional" interfaces. + */ + public Stream ip6Addresses() { + return ip6Interfaces().flatMap(nif -> ip6Addresses(nif)); + } + + /** + * Returns all IPv4 addresses the given interface. + */ + public Stream ip4Addresses(NetworkInterface nif) { + return ip4Interfaces.get(nif).stream(); + } + + /** + * Returns all IPv6 addresses for the given interface. + */ + public Stream ip6Addresses(NetworkInterface nif) { + return ip6Interfaces.get(nif).stream(); + } + + /** + * Return a NetworkConfiguration instance. + */ + public static NetworkConfiguration probe() throws IOException { + Map> ip4Interfaces = new HashMap<>(); + Map> ip6Interfaces = new HashMap<>(); + + List nifs = list(getNetworkInterfaces()); + for (NetworkInterface nif : nifs) { + // ignore interfaces that are down + if (!nif.isUp() || nif.isPointToPoint()) + continue; + + List ip4Addresses = new LinkedList<>(); + List ip6Addresses = new LinkedList<>(); + ip4Interfaces.put(nif, ip4Addresses); + ip6Interfaces.put(nif, ip6Addresses); + for (InetAddress addr : list(nif.getInetAddresses())) { + if (addr instanceof Inet4Address) + ip4Addresses.add((Inet4Address)addr); + else if (addr instanceof Inet6Address) + ip6Addresses.add((Inet6Address)addr); + } + } + return new NetworkConfiguration(ip4Interfaces, ip6Interfaces); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + interfaces().forEach(nif -> sb.append(interfaceInformation(nif))); + return sb.toString(); + } + + /** Returns detailed information for the given interface. */ + public static String interfaceInformation(NetworkInterface nif) { + StringBuilder sb = new StringBuilder(); + try { + sb.append("Display name: " + nif.getDisplayName() + "\n"); + sb.append("Name: " + nif.getName() + "\n"); + for (InetAddress inetAddress : list(nif.getInetAddresses())) + sb.append("InetAddress: " + inetAddress + "\n"); + sb.append("Up? " + nif.isUp() + "\n"); + sb.append("Loopback? " + nif.isLoopback() + "\n"); + sb.append("PointToPoint? " + nif.isPointToPoint() + "\n"); + sb.append("Supports multicast? " + nif.supportsMulticast() + "\n"); + sb.append("Virtual? " + nif.isVirtual() + "\n"); + sb.append("Hardware address: " + + Arrays.toString(nif.getHardwareAddress()) + "\n"); + sb.append("MTU: " + nif.getMTU() + "\n"); + sb.append("Index: " + nif.getIndex() + "\n"); + sb.append("\n"); + return sb.toString(); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + /** Prints all the system interface information to the give stream. */ + public static void printSystemConfiguration(PrintStream out) { + try { + out.println("*** all system network interface configuration ***"); + List nifs = list(getNetworkInterfaces()); + for (NetworkInterface nif : nifs) + out.print(interfaceInformation(nif)); + out.println("*** end ***"); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } +} diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java index 9cd49ada770..b929c5c0172 100644 --- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -26,7 +26,6 @@ package jdk.testlibrary; import java.io.PrintWriter; import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; import java.util.function.Predicate; /** @@ -195,7 +194,7 @@ public class ProcessThread extends TestThread { * @return The PID associated with this process runnable */ public long getPid() throws InterruptedException { - return getProcess().getPid(); + return getProcess().pid(); } public void sendMessage(String message) throws InterruptedException { diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java index 224ab0e067d..d4626fa804b 100644 --- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -256,7 +256,7 @@ public final class ProcessTools { * @return Process id */ public static long getProcessId() { - return ProcessHandle.current().getPid(); + return ProcessHandle.current().pid(); } /** @@ -542,8 +542,8 @@ public final class ProcessTools { } @Override - public long getPid() { - return p.getPid(); + public long pid() { + return p.pid(); } @Override diff --git a/jdk/test/org/omg/CORBA/OrbPropertiesTest.java b/jdk/test/org/omg/CORBA/OrbPropertiesTest.java new file mode 100644 index 00000000000..977b2e9b110 --- /dev/null +++ b/jdk/test/org/omg/CORBA/OrbPropertiesTest.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.BufferedWriter; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; + +import org.omg.CORBA.ORB; + +/* + * @test + * @bug 8049375 + * @summary Extend how the org.omg.CORBA.ORB handles the search for orb.properties + * @library /lib/testlibrary + * @build jdk.testlibrary.* + * @modules java.corba + * @compile OrbPropertiesTest.java TestOrbImpl.java TestSingletonOrbImpl.java + * @run main/othervm + * -Djava.naming.provider.url=iiop://localhost:1050 + * -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory + * OrbPropertiesTest -port 1049 + * @run main/othervm/secure=java.lang.SecurityManager/policy=jtreg.test.policy + * -Djava.naming.provider.url=iiop://localhost:3050 + * -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory + * OrbPropertiesTest -port 3049 + */ +public class OrbPropertiesTest { + + public static void main(String[] args) throws Exception { + updateOrbPropertiesFile(); + // create and initialize the ORB + ORB orb = ORB.init(args, null); + if (!(orb instanceof TestOrbImpl)) { + throw new RuntimeException("org.omg.CORBA.ORBClass property not set as expected"); + } + ORB singletonOrb = ORB.init(); + System.out.println("singletonOrb class == " + singletonOrb.getClass().getName()); + if (!(singletonOrb instanceof TestSingletonOrbImpl)) { + throw new RuntimeException("org.omg.CORBA.ORBSingletonClass property not set as expected"); + } + + } + + private static void updateOrbPropertiesFile() throws Exception { + String orbPropertiesFile = System.getProperty("java.home", ".") + "/conf/orb.properties"; + String orbClassMapping = "org.omg.CORBA.ORBClass TestOrbImpl"; + String orbSingletonClassMapping = "org.omg.CORBA.ORBSingletonClass TestSingletonOrbImpl"; + String orbPropertiesMappings = orbClassMapping + "\n" + orbSingletonClassMapping +"\n"; + try (PrintWriter hfPWriter = new PrintWriter(new BufferedWriter( + new FileWriter(orbPropertiesFile, false)))) { + hfPWriter.println(orbPropertiesMappings); + } catch (IOException ioEx) { + ioEx.printStackTrace(); + throw ioEx; + } + } +} diff --git a/jdk/test/org/omg/CORBA/TestOrbImpl.java b/jdk/test/org/omg/CORBA/TestOrbImpl.java new file mode 100644 index 00000000000..1dd7d661b3a --- /dev/null +++ b/jdk/test/org/omg/CORBA/TestOrbImpl.java @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.applet.Applet; +import java.util.Properties; + +import org.omg.CORBA.Any; +import org.omg.CORBA.Context; +import org.omg.CORBA.ContextList; +import org.omg.CORBA.Environment; +import org.omg.CORBA.ExceptionList; +import org.omg.CORBA.NVList; +import org.omg.CORBA.NamedValue; +import org.omg.CORBA.ORB; +import org.omg.CORBA.Object; +import org.omg.CORBA.Request; +import org.omg.CORBA.StructMember; +import org.omg.CORBA.TCKind; +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.UnionMember; +import org.omg.CORBA.WrongTransaction; +import org.omg.CORBA.ORBPackage.InvalidName; +import org.omg.CORBA.portable.OutputStream; + + +public class TestOrbImpl extends ORB{ + + @Override + protected void set_parameters(String[] args, Properties props) { + + } + + @Override + protected void set_parameters(Applet app, Properties props) { + + } + + @Override + public String[] list_initial_services() { + return null; + } + + @Override + public Object resolve_initial_references(String object_name) + throws InvalidName { + return null; + } + + @Override + public String object_to_string(Object obj) { + return null; + } + + @Override + public Object string_to_object(String str) { + return null; + } + + @Override + public NVList create_list(int count) { + return null; + } + + @Override + public NamedValue create_named_value(String s, Any any, int flags) { + return null; + } + + @Override + public ExceptionList create_exception_list() { + return null; + } + + @Override + public ContextList create_context_list() { + return null; + } + + @Override + public Context get_default_context() { + return null; + } + + @Override + public Environment create_environment() { + return null; + } + + @Override + public OutputStream create_output_stream() { + return null; + } + + @Override + public void send_multiple_requests_oneway(Request[] req) { + + } + + @Override + public void send_multiple_requests_deferred(Request[] req) { + + } + + @Override + public boolean poll_next_response() { + return false; + } + + @Override + public Request get_next_response() throws WrongTransaction { + return null; + } + + @Override + public TypeCode get_primitive_tc(TCKind tcKind) { + return null; + } + + @Override + public TypeCode create_struct_tc(String id, String name, + StructMember[] members) { + return null; + } + + @Override + public TypeCode create_union_tc(String id, String name, + TypeCode discriminator_type, UnionMember[] members) { + return null; + } + + @Override + public TypeCode create_enum_tc(String id, String name, String[] members) { + return null; + } + + @Override + public TypeCode create_alias_tc(String id, String name, + TypeCode original_type) { + return null; + } + + @Override + public TypeCode create_exception_tc(String id, String name, + StructMember[] members) { + return null; + } + + @Override + public TypeCode create_interface_tc(String id, String name) { + return null; + } + + @Override + public TypeCode create_string_tc(int bound) { + return null; + } + + @Override + public TypeCode create_wstring_tc(int bound) { + return null; + } + + @Override + public TypeCode create_sequence_tc(int bound, TypeCode element_type) { + return null; + } + + @Override + public TypeCode create_recursive_sequence_tc(int bound, int offset) { + return null; + } + + @Override + public TypeCode create_array_tc(int length, TypeCode element_type) { + return null; + } + + @Override + public Any create_any() { + return null; + } + +} diff --git a/jdk/test/org/omg/CORBA/TestSingletonOrbImpl.java b/jdk/test/org/omg/CORBA/TestSingletonOrbImpl.java new file mode 100644 index 00000000000..fb6a26f807a --- /dev/null +++ b/jdk/test/org/omg/CORBA/TestSingletonOrbImpl.java @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.applet.Applet; +import java.util.Properties; + +import org.omg.CORBA.Any; +import org.omg.CORBA.Context; +import org.omg.CORBA.ContextList; +import org.omg.CORBA.Environment; +import org.omg.CORBA.ExceptionList; +import org.omg.CORBA.NVList; +import org.omg.CORBA.NamedValue; +import org.omg.CORBA.ORB; +import org.omg.CORBA.Object; +import org.omg.CORBA.Request; +import org.omg.CORBA.StructMember; +import org.omg.CORBA.TCKind; +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.UnionMember; +import org.omg.CORBA.WrongTransaction; +import org.omg.CORBA.ORBPackage.InvalidName; +import org.omg.CORBA.portable.OutputStream; + + +public class TestSingletonOrbImpl extends ORB { + + @Override + protected void set_parameters(String[] args, Properties props) { + + } + + @Override + protected void set_parameters(Applet app, Properties props) { + + } + + @Override + public String[] list_initial_services() { + return null; + } + + @Override + public Object resolve_initial_references(String object_name) + throws InvalidName { + return null; + } + + @Override + public String object_to_string(Object obj) { + return null; + } + + @Override + public Object string_to_object(String str) { + return null; + } + + @Override + public NVList create_list(int count) { + return null; + } + + @Override + public NamedValue create_named_value(String s, Any any, int flags) { + return null; + } + + @Override + public ExceptionList create_exception_list() { + return null; + } + + @Override + public ContextList create_context_list() { + return null; + } + + @Override + public Context get_default_context() { + return null; + } + + @Override + public Environment create_environment() { + return null; + } + + @Override + public OutputStream create_output_stream() { + return null; + } + + @Override + public void send_multiple_requests_oneway(Request[] req) { + + } + + @Override + public void send_multiple_requests_deferred(Request[] req) { + + } + + @Override + public boolean poll_next_response() { + return false; + } + + @Override + public Request get_next_response() throws WrongTransaction { + return null; + } + + @Override + public TypeCode get_primitive_tc(TCKind tcKind) { + return null; + } + + @Override + public TypeCode create_struct_tc(String id, String name, + StructMember[] members) { + return null; + } + + @Override + public TypeCode create_union_tc(String id, String name, + TypeCode discriminator_type, UnionMember[] members) { + return null; + } + + @Override + public TypeCode create_enum_tc(String id, String name, String[] members) { + return null; + } + + @Override + public TypeCode create_alias_tc(String id, String name, + TypeCode original_type) { + return null; + } + + @Override + public TypeCode create_exception_tc(String id, String name, + StructMember[] members) { + return null; + } + + @Override + public TypeCode create_interface_tc(String id, String name) { + return null; + } + + @Override + public TypeCode create_string_tc(int bound) { + return null; + } + + @Override + public TypeCode create_wstring_tc(int bound) { + return null; + } + + @Override + public TypeCode create_sequence_tc(int bound, TypeCode element_type) { + return null; + } + + @Override + public TypeCode create_recursive_sequence_tc(int bound, int offset) { + return null; + } + + @Override + public TypeCode create_array_tc(int length, TypeCode element_type) { + return null; + } + + @Override + public Any create_any() { + return null; + } + +} diff --git a/jdk/test/org/omg/CORBA/jtreg.test.policy b/jdk/test/org/omg/CORBA/jtreg.test.policy new file mode 100644 index 00000000000..0e24009f687 --- /dev/null +++ b/jdk/test/org/omg/CORBA/jtreg.test.policy @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +grant { + permission java.util.PropertyPermission "*", "read"; + permission java.io.FilePermission "<>", "read, write, execute"; +}; + +grant codeBase "file:${test.classes}/*" { + permission java.net.SocketPermission "*:*", "connect, accept, listen, resolve"; + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.jndi.cosnaming"; +}; diff --git a/jdk/test/sample/TEST.properties b/jdk/test/sample/TEST.properties deleted file mode 100644 index 8e5f78afde3..00000000000 --- a/jdk/test/sample/TEST.properties +++ /dev/null @@ -1 +0,0 @@ -external.lib.roots = ../../ diff --git a/jdk/test/sample/chatserver/ChatTest.java b/jdk/test/sample/chatserver/ChatTest.java deleted file mode 100644 index dcfe4d3dd6c..00000000000 --- a/jdk/test/sample/chatserver/ChatTest.java +++ /dev/null @@ -1,402 +0,0 @@ -/* - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * 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 Test chat server chatserver test - * - * @library /src/sample/share/nio/chatserver - * @build ChatTest ChatServer Client ClientReader DataReader MessageReader NameReader - * @run testng ChatTest - */ - -import java.io.*; -import java.net.InetSocketAddress; -import java.net.Socket; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.CyclicBarrier; - -import org.testng.annotations.Test; - -public class ChatTest { - public static int listeningPort = 0; - - @Test - public static void doTest() throws Throwable { - testStartStop(); - testPortOpen(); - testAsksForName(); - testUseName(); - testConnectDisconnectConnect(); - testUsernameAndMessage(); - testDontReceiveMessageInNameState(); - } - - private static ChatServer startServer() throws IOException { - ChatServer server = new ChatServer(0); - InetSocketAddress address = (InetSocketAddress) server.getSocketAddress(); - listeningPort = address.getPort(); - server.run(); - return server; - } - - public static void testStartStop() throws Exception { - ChatServer server = startServer(); - server.shutdown(); - } - - public static void testPortOpen() throws Exception { - ChatServer server = startServer(); - try { - Socket socket = new Socket("localhost", listeningPort); - if (!socket.isConnected()) { - throw new RuntimeException("Failed to connect to server: port not open"); - } - } finally { - server.shutdown(); - } - } - - public static void testAsksForName() throws Exception { - ChatServer server = startServer(); - try { - Socket socket = new Socket("localhost", listeningPort); - - Reader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); - String string = readAvailableString(reader); - if (!string.equals("Name: ")) { - throw new RuntimeException("Server doesn't send Name: "); - } - } finally { - server.shutdown(); - } - } - - public static void testUseName() throws Throwable { - ChatServer server = startServer(); - try { - performTestUseName(); - } finally { - server.shutdown(); - } - } - - public static void testConnectDisconnectConnect() throws Exception { - ChatServer server = startServer(); - try { - performTestConnectDisconnectConnect(); - } finally { - server.shutdown(); - } - } - - public static void testUsernameAndMessage() throws Exception { - ChatServer server = startServer(); - try { - performTestUsernameAndMessage(); - } finally { - server.shutdown(); - } - } - - public static void testDontReceiveMessageInNameState() throws Exception { - ChatServer server = startServer(); - try { - performDontReceiveMessageInNameState(); - } finally { - server.shutdown(); - } - } - - private static void assertEqual(List exception, Object value, Object expected) { - if (expected == value) { - return; - } - if (expected == null) { - exception.add(new RuntimeException("Expected null, but was: " + value)); - return; - } - if (!expected.equals(value)) { - exception.add(new RuntimeException("Expected: " + expected + " but was: " + value)); - return; - } - } - - private static void performDontReceiveMessageInNameState() throws Exception { - final CyclicBarrier barrier1 = new CyclicBarrier(2); - final CyclicBarrier barrier2 = new CyclicBarrier(2); - final CyclicBarrier barrier3 = new CyclicBarrier(2); - final List exceptions = Collections.synchronizedList(new ArrayList()); - - ChatConnection chatConnection = new ChatConnection() { - @Override - public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception { - String string = readAvailableString(reader); - assertEqual(exceptions, string, "Name: "); - writer.write("testClient1\n"); - waitForJoin(reader, "testClient1"); - barrier1.await(); - writer.write("Ignore this!\n"); - barrier2.await(); - barrier3.await(); - } - }; - - Thread client2 = new Thread(new ChatConnection() { - @Override - public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception { - barrier1.await(); - barrier2.await(); - String string = readAvailableString(reader); - assertEqual(exceptions, string, "Name: "); - string = readAvailableString(reader, true); - assertEqual(exceptions, string, null); - writer.write("testClient2\n"); - barrier3.await(); - } - }); - - client2.start(); - chatConnection.run(); - if (!exceptions.isEmpty()) { - throw exceptions.get(0); - } - - } - - private static void waitForJoin(BufferedReader reader, String s) throws IOException { - String joined; - do { - joined = readAvailableString(reader); - } while (!(joined != null && joined.contains("Welcome " + s))); - } - - private static void performTestUsernameAndMessage() throws Exception { - final CyclicBarrier barrier1 = new CyclicBarrier(2); - final CyclicBarrier barrier2 = new CyclicBarrier(2); - final CyclicBarrier barrier3 = new CyclicBarrier(2); - final List exceptions = Collections.synchronizedList(new ArrayList()); - - ChatConnection chatConnection = new ChatConnection() { - @Override - public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception { - String string = readAvailableString(reader); - assertEqual(exceptions, string, "Name: "); - writer.write("testClient1\n"); - waitForJoin(reader, "testClient1"); - barrier1.await(); - barrier2.await(); - string = readAvailableString(reader); - assertEqual(exceptions, string, "testClient2: Hello world!\n"); - barrier3.await(); - } - }; - - Thread client2 = new Thread(new ChatConnection() { - @Override - public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception { - String string = readAvailableString(reader); - assertEqual(exceptions, string, "Name: "); - barrier1.await(); - writer.write("testClient2\nHello world!\n"); - barrier2.await(); - barrier3.await(); - } - }); - - client2.start(); - chatConnection.run(); - if (!exceptions.isEmpty()) { - throw exceptions.get(0); - } - } - - private static void performTestConnectDisconnectConnect() throws Exception { - final CyclicBarrier barrier1 = new CyclicBarrier(2); - final CyclicBarrier barrier2 = new CyclicBarrier(2); - final CyclicBarrier barrier3 = new CyclicBarrier(2); - final List exceptions = new ArrayList(); - - ChatConnection chatConnection = new ChatConnection() { - @Override - public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception { - String string = readAvailableString(reader); - assertEqual(exceptions, string, "Name: "); - writer.write("testClient1\n"); - } - }; - - ChatConnection chatConnection2 = new ChatConnection() { - @Override - public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception { - readAvailableString(reader); - writer.write("testClient1\n"); - waitForJoin(reader, "testClient1"); - barrier1.await(); - writer.write("Good morning!\n"); - barrier2.await(); - String string = readAvailableString(reader); - assertEqual(exceptions, string, "testClient2: Hello world!\n"); - barrier3.await(); - } - }; - - Thread client2 = new Thread(new ChatConnection() { - @Override - public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception { - readAvailableString(reader); - writer.write("testClient2\n"); - waitForJoin(reader, "testClient2"); - barrier1.await(); - writer.write("Hello world!\n"); - barrier2.await(); - String string = readAvailableString(reader); - assertEqual(exceptions, string, "testClient1: Good morning!\n"); - barrier3.await(); - } - }); - - client2.start(); - chatConnection.run(); - chatConnection2.run(); - if (!exceptions.isEmpty()) { - throw exceptions.get(0); - } - } - - private static void performTestUseName() throws Exception { - final CyclicBarrier barrier1 = new CyclicBarrier(2); - final CyclicBarrier barrier2 = new CyclicBarrier(2); - final CyclicBarrier barrier3 = new CyclicBarrier(2); - final List exceptions = new ArrayList(); - - ChatConnection chatConnection = new ChatConnection() { - @Override - public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception { - String string = readAvailableString(reader); - if (!"Name: ".equals(string)) { - exceptions.add(new RuntimeException("Expected Name: ")); - } - writer.write("testClient1\n"); - waitForJoin(reader, "testClient1"); - barrier1.await(); - barrier2.await(); - string = readAvailableString(reader); - if (!"testClient2: Hello world!\n".equals(string)) { - exceptions.add(new RuntimeException("testClient2: Hello world!\n")); - } - barrier3.await(); - } - }; - - Thread client2 = new Thread(new ChatConnection() { - @Override - public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception { - String string = readAvailableString(reader); - if (!"Name: ".equals(string)) { - exceptions.add(new RuntimeException("Expected Name: ")); - } - writer.write("testClient2\n"); - waitForJoin(reader, "testClient2"); - barrier1.await(); - writer.write("Hello world!\n"); - barrier2.await(); - barrier3.await(); - } - }); - - client2.start(); - chatConnection.run(); - if (!exceptions.isEmpty()) { - throw exceptions.get(0); - } - } - - private static String readAvailableString(Reader reader) throws IOException { - return readAvailableString(reader, false); - } - - private static String readAvailableString(Reader reader, boolean now) throws IOException { - StringBuilder builder = new StringBuilder(); - int bytes; - if (now && !reader.ready()) { - return null; - } - do { - char[] buf = new char[256]; - bytes = reader.read(buf); - builder.append(buf, 0, bytes); - } while (bytes == 256); - return builder.toString(); - } - - private abstract static class ChatConnection implements Runnable { - public Exception exception; - - @Override - public void run() { - try (Socket socket = new Socket("localhost", listeningPort); - BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); - Writer writer = new FlushingWriter(new OutputStreamWriter(socket.getOutputStream()))) { - socket.setTcpNoDelay(true); - - run(socket, reader, writer); - } catch (Exception e) { - exception = e; - } - } - - public abstract void run(Socket socket, BufferedReader reader, Writer writer) throws Exception; - } - - private static class FlushingWriter extends Writer { - public final Writer delegate; - - private FlushingWriter(Writer delegate) { - this.delegate = delegate; - } - - @Override - public void write(char[] cbuf, int off, int len) throws IOException { - delegate.write(cbuf, off, len); - } - - @Override - public void flush() throws IOException { - delegate.flush(); - } - - @Override - public void close() throws IOException { - delegate.close(); - } - - @Override - public void write(String str) throws IOException { - super.write(str); - flush(); - } - } -} diff --git a/jdk/test/sample/mergesort/MergeSortTest.java b/jdk/test/sample/mergesort/MergeSortTest.java deleted file mode 100644 index fb082c21a56..00000000000 --- a/jdk/test/sample/mergesort/MergeSortTest.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * 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 Test MergeSort - * - * @library /src/sample/share/forkjoin/mergesort - * @build MergeSortTest MergeDemo MergeSort - * @run testng MergeSortTest - */ - -import java.util.Arrays; -import java.util.Random; - -import org.testng.annotations.Test; - -public class MergeSortTest { - private Random random; - private MergeSort target; - - public MergeSortTest(Random random, MergeSort target) { - this.random = random; - this.target = target; - } - - @Test - public static void doTest() { - MergeSortTest test = new MergeSortTest(new Random(), new MergeSort(Runtime.getRuntime().availableProcessors() * 4)); - test.run(); - } - - private int[] generateArray(int elements) { - int[] array = new int[elements]; - for (int i = 0; i < array.length; ++i) { - array[i] = random.nextInt(10); - } - return array; - } - - private void run() { - testSort(); - testSortSingle(); - testSortEmpty(); - testLong(); - } - - public void testLong() { - for (int i = 0; i < 1000; ++i) { - int elements = 1 + i * 100; - - int[] array = generateArray(elements); - int[] copy = Arrays.copyOf(array, array.length); - Arrays.sort(copy); - target.sort(array); - assertEqual(copy, array); - } - } - - private void testSortEmpty() { - int[] array = { }; - target.sort(array); - assertEqual(new int[] { }, array); - } - - private void testSortSingle() { - int[] array = { 1 }; - target.sort(array); - assertEqual(new int[] { 1 }, array); - } - - private void testSort() { - int[] array = { 7, 3, 9, 0, -6, 12, 54, 3, -6, 88, 1412}; - target.sort(array); - assertEqual(new int[] { -6, -6, 0, 3, 3, 7, 9, 12, 54, 88, 1412 }, array); - } - - private void assertEqual(int[] expected, int[] array) { - if (!Arrays.equals(expected, array)) { - throw new RuntimeException("Invalid sorted array!"); - } - } - - -} diff --git a/jdk/test/sanity/client/SwingSet/src/DialogDemoTest.java b/jdk/test/sanity/client/SwingSet/src/DialogDemoTest.java new file mode 100644 index 00000000000..69ee970373b --- /dev/null +++ b/jdk/test/sanity/client/SwingSet/src/DialogDemoTest.java @@ -0,0 +1,104 @@ + +/* + * 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. + */ +import org.jtregext.GuiTestListener; +import com.sun.swingset3.demos.dialog.DialogDemo; +import static com.sun.swingset3.demos.dialog.DialogDemo.*; +import java.awt.Dimension; +import java.awt.Point; +import javax.swing.JDialog; +import static org.testng.AssertJUnit.*; +import org.testng.annotations.Test; +import static org.jemmy2ext.JemmyExt.isIconified; +import static org.jemmy2ext.JemmyExt.ByClassChooser; +import org.netbeans.jemmy.ClassReference; +import org.netbeans.jemmy.ComponentChooser; +import static org.netbeans.jemmy.WindowWaiter.countWindows; +import org.netbeans.jemmy.operators.JFrameOperator; +import org.netbeans.jemmy.operators.JDialogOperator; +import org.netbeans.jemmy.operators.JLabelOperator; +import org.netbeans.jemmy.operators.JButtonOperator; +import org.testng.annotations.Listeners; + +/* + * @test + * @key headful + * @summary Verifies SwingSet3 DialogDemo by checking that separate JDialog is + * shown, it contains predefined label and no new dialogs are opened + * when the "Show JDialog..." button is clicked. + * + * @library /sanity/client/lib/jemmy/src + * @library /sanity/client/lib/Extensions/src + * @library /sanity/client/lib/SwingSet3/src + * @modules java.desktop + * java.logging + * @build org.jemmy2ext.JemmyExt + * @build com.sun.swingset3.demos.dialog.DialogDemo + * @run testng DialogDemoTest + */ +@Listeners(GuiTestListener.class) +public class DialogDemoTest { + + private final ComponentChooser jDialogClassChooser = new ByClassChooser(JDialog.class); + + @Test + public void test() throws Exception { + new ClassReference(DialogDemo.class.getCanonicalName()).startApplication(); + JFrameOperator mainFrame = new JFrameOperator(DIALOG_DEMO_TITLE); + JDialogOperator dialog = new JDialogOperator(DIALOG_TITLE); + JButtonOperator showJDialogButton = new JButtonOperator(mainFrame, SHOW_BUTTON_TITLE); + initialCheckWithLabel(mainFrame, dialog); + checkShowDialogButton(dialog, showJDialogButton); + TestHelpers.checkChangeSize(dialog, new Dimension(dialog.getSize().width * 2, + dialog.getSize().height * 2)); + TestHelpers.checkChangeLocation(dialog, new Point(dialog.getLocation().x + 100, + dialog.getLocation().y + 100)); + } + + private void initialCheckWithLabel(JFrameOperator frame, JDialogOperator jdo) { + JLabelOperator label = new JLabelOperator(jdo); + assertFalse("JFrame is not iconified", isIconified(frame)); + assertEquals("Only one JDialog is present", 1, + countWindows(jDialogClassChooser)); + assertEquals(LABEL_CONTENT, label.getText()); + } + + private void checkShowDialogButton(JDialogOperator jdo, JButtonOperator jbo) + throws InterruptedException { + //Check that the button does not change the number of JDialog + jbo.push(); + Thread.sleep(500); + assertEquals("Only one JDialog is present", 1, + countWindows(jDialogClassChooser)); + assertTrue("Check JDialog is visible", jdo.isVisible()); + jdo.requestClose(); + jdo.waitClosed(); + //Check that the button makes the JDialog visible + //and that 1 jDialog is present. + jbo.push(); + jdo.waitComponentVisible(true); + Thread.sleep(500); + assertEquals("Only one JDialog is present", 1, + countWindows(jDialogClassChooser)); + } +} diff --git a/jdk/test/sanity/client/SwingSet/src/SliderDemoTest.java b/jdk/test/sanity/client/SwingSet/src/SliderDemoTest.java new file mode 100644 index 00000000000..092743cc4e1 --- /dev/null +++ b/jdk/test/sanity/client/SwingSet/src/SliderDemoTest.java @@ -0,0 +1,235 @@ + +/* + * 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. + */ +import org.jtregext.GuiTestListener; +import com.sun.swingset3.demos.slider.SliderDemo; +import java.awt.Component; +import java.awt.event.KeyEvent; +import java.util.function.Predicate; + +import static org.testng.AssertJUnit.*; +import org.testng.annotations.Test; +import org.netbeans.jemmy.ClassReference; +import org.netbeans.jemmy.ComponentChooser; +import org.netbeans.jemmy.operators.JFrameOperator; +import org.netbeans.jemmy.operators.JSliderOperator; +import org.netbeans.jemmy.accessibility.AccessibleNameChooser; +import static com.sun.swingset3.demos.slider.SliderDemo.*; +import org.testng.annotations.Listeners; + +/* + * @test + * @key headful + * @summary Verifies SwingSet3 SliderDemo by moving the sliders through + * different means, checking the slider value corresponding to it, + * checking maximum and minimum values, checking Snap to tick is working + * and checking the presence of ticks and labels. + * + * @library /sanity/client/lib/jemmy/src + * @library /sanity/client/lib/Extensions/src + * @library /sanity/client/lib/SwingSet3/src + * @modules java.desktop + * java.logging + * @build org.jemmy2ext.JemmyExt + * @build com.sun.swingset3.demos.slider.SliderDemo + * @run testng SliderDemoTest + */ +@Listeners(GuiTestListener.class) +public class SliderDemoTest { + + private static final int PLAIN_SLIDER_MINIMUM = -10; + private static final int PLAIN_SLIDER_MAXIMUM = 100; + private static final int HORIZONTAL_MINOR_TICKS_SLIDER_MINIMUM = 0; + private static final int HORIZONTAL_MINOR_TICKS_SLIDER_MAXIMUM = 11; + private static final int VERTICAL_MINOR_TICKS_SLIDER_MINIMUM = 0; + private static final int VERTICAL_MINOR_TICKS_SLIDER_MAXIMUM = 100; + + @Test + public void test() throws Exception { + new ClassReference(SliderDemo.class.getCanonicalName()).startApplication(); + JFrameOperator frame = new JFrameOperator(DEMO_TITLE); + plain(frame, HORIZONTAL_PLAIN_SLIDER); + majorTicks(frame, HORIZONTAL_MAJOR_TICKS_SLIDER); + minorTicks(frame, HORIZONTAL_MINOR_TICKS_SLIDER); + disabled(frame, HORIZONTAL_DISABLED_SLIDER); + plain(frame, VERTICAL_PLAIN_SLIDER); + majorTicks(frame, VERTICAL_MAJOR_TICKS_SLIDER); + minorTicks(frame, VERTICAL_MINOR_TICKS_SLIDER); + disabled(frame, VERTICAL_DISABLED_SLIDER); + } + + private void plain(JFrameOperator jfo, String accessibleName) { + JSliderOperator jso = new JSliderOperator(jfo, + new AccessibleNameChooser(accessibleName)); + if (accessibleName.equals(HORIZONTAL_PLAIN_SLIDER)) { + checkKeyboard(jso); + checkMouse(jso); + } + checkMaximum(jso, PLAIN_SLIDER_MAXIMUM); + checkMinimum(jso, PLAIN_SLIDER_MINIMUM); + checkMoveForward(jso, 10); + } + + private void majorTicks(JFrameOperator jfo, String accessibleName) { + JSliderOperator jso = new JSliderOperator(jfo, + new AccessibleNameChooser(accessibleName)); + checkMoveForward(jso, 40); + assertTrue(jso.getPaintTicks()); + assertEquals(100, jso.getMajorTickSpacing()); + } + + private void minorTicks(JFrameOperator jfo, String accessibleName) { + JSliderOperator jso = new JSliderOperator(jfo, + new AccessibleNameChooser(accessibleName)); + if (accessibleName.equals(HORIZONTAL_MINOR_TICKS_SLIDER)) { + checkMaximum(jso, HORIZONTAL_MINOR_TICKS_SLIDER_MAXIMUM); + checkMinimum(jso, HORIZONTAL_MINOR_TICKS_SLIDER_MINIMUM); + checkMoveForward(jso, 2); + checkSnapToTick(jso, 5, 6); + assertEquals(5, jso.getMajorTickSpacing()); + assertEquals(1, jso.getMinorTickSpacing()); + } else { + checkMaximum(jso, VERTICAL_MINOR_TICKS_SLIDER_MAXIMUM); + checkMinimum(jso, VERTICAL_MINOR_TICKS_SLIDER_MINIMUM); + checkMoveForward(jso, 10); + assertEquals(20, jso.getMajorTickSpacing()); + assertEquals(5, jso.getMinorTickSpacing()); + } + assertTrue(jso.getPaintTicks()); + assertTrue(jso.getPaintLabels()); + } + + private void disabled(JFrameOperator jfo, String accessibleName) + throws InterruptedException { + JSliderOperator jso = new JSliderOperator(jfo, + new AccessibleNameChooser(accessibleName)); + int initialvalue; + initialvalue = jso.getValue(); + jso.clickMouse(jso.getCenterXForClick(), jso.getCenterYForClick(), 10); + Thread.sleep(500); + assertFalse(jso.hasFocus()); + assertEquals(initialvalue, jso.getValue()); + } + + private void checkMaximum(JSliderOperator jso, int maxValue) { + jso.scrollToMaximum(); + waitSliderValue(jso, jSlider -> jSlider.getValue() == maxValue); + } + + private void checkMinimum(JSliderOperator jso, int minValue) { + jso.scrollToMinimum(); + waitSliderValue(jso, jSlider -> jSlider.getValue() == minValue); + } + + private void checkKeyboard(JSliderOperator jso) { + checkKeyPress(jso, KeyEvent.VK_HOME, + jSlider -> jSlider.getValue() == jso.getMinimum()); + + { + int expectedValue = jso.getValue() + 1; + checkKeyPress(jso, KeyEvent.VK_UP, + jSlider -> jSlider.getValue() >= expectedValue); + } + { + int expectedValue = jso.getValue() + 1; + checkKeyPress(jso, KeyEvent.VK_RIGHT, + jSlider -> jSlider.getValue() >= expectedValue); + } + { + int expectedValue = jso.getValue() + 11; + checkKeyPress(jso, KeyEvent.VK_PAGE_UP, + jSlider -> jSlider.getValue() >= expectedValue); + } + + checkKeyPress(jso, KeyEvent.VK_END, + jSlider -> jSlider.getValue() == jso.getMaximum()); + + { + int expectedValue = jso.getValue() - 1; + checkKeyPress(jso, KeyEvent.VK_DOWN, + jSlider -> jSlider.getValue() <= expectedValue); + } + { + int expectedValue = jso.getValue() - 1; + checkKeyPress(jso, KeyEvent.VK_LEFT, + jSlider -> jSlider.getValue() <= expectedValue); + } + { + int expectedValue = jso.getValue() - 11; + checkKeyPress(jso, KeyEvent.VK_PAGE_DOWN, + jSlider -> jSlider.getValue() <= expectedValue); + } + } + + private void checkKeyPress(JSliderOperator jso, int keyCode, + Predicate predicate) { + jso.pushKey(keyCode); + waitSliderValue(jso, predicate); + } + + private void waitSliderValue(JSliderOperator jso, + Predicate predicate) { + jso.waitState(new ComponentChooser() { + public boolean checkComponent(Component comp) { + return predicate.test(jso); + } + + public String getDescription() { + return "Wait till Slider attains the specified state."; + } + }); + } + + private void checkMoveForward(JSliderOperator jso, int value) { + jso.setValue(jso.getMinimum()); + int finalValue = jso.getValue() + value; + jso.scrollToValue(finalValue); + waitSliderValue(jso, jSlider -> jSlider.getValue() == finalValue); + } + + private void checkSnapToTick(JSliderOperator jso, int expectedLower, + int expectedHigher) { + jso.pressMouse(jso.getCenterXForClick(), jso.getCenterYForClick()); + waitSliderValue(jso, jSlider -> jSlider.getValue() == expectedLower + || jSlider.getValue() == expectedHigher); + jso.releaseMouse(); + } + + private void checkMouse(JSliderOperator jso) { + // Check mouse dragging by pressing on the center of Slider and then + // dragging the mouse till the end of the track. + // We set the initial value of the slider as 45, + // which is the value of the slider at the middle. + jso.setValue((jso.getMaximum() + jso.getMinimum()) / 2); + jso.pressMouse(jso.getCenterXForClick(), jso.getCenterYForClick()); + jso.dragMouse(jso.getWidth() + 10, jso.getHeight()); + waitSliderValue(jso, jSlider -> jSlider.getValue() == jSlider.getMaximum()); + jso.releaseMouse(); + + // Check mouse click by clicking on the center of the track 2 times + // and waiting till the slider value has changed from its previous + // value as a result of the clicks. + jso.clickMouse(jso.getCenterXForClick(), jso.getCenterYForClick(), 2); + waitSliderValue(jso, jSlider -> jSlider.getValue() != jSlider.getMaximum()); + } +} diff --git a/jdk/test/sanity/client/SwingSet/src/TestHelpers.java b/jdk/test/sanity/client/SwingSet/src/TestHelpers.java new file mode 100644 index 00000000000..24c2e9d561e --- /dev/null +++ b/jdk/test/sanity/client/SwingSet/src/TestHelpers.java @@ -0,0 +1,24 @@ + +import java.awt.Dimension; +import java.awt.Point; + +import org.netbeans.jemmy.operators.ComponentOperator; + +public class TestHelpers { + + public static void checkChangeLocation(ComponentOperator component, + Point finalLocation) { + Point initialLocation = component.getLocation(); + component.setLocation(finalLocation); + component.waitComponentLocation(finalLocation); + component.setLocation(initialLocation); + } + + public static void checkChangeSize(ComponentOperator component, + Dimension dimensionFinal) { + Dimension dimensionInitial = component.getSize(); + component.setSize(dimensionFinal); + component.waitComponentSize(dimensionFinal); + component.setSize(dimensionInitial); + } +} diff --git a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java new file mode 100644 index 00000000000..4ff166cfd65 --- /dev/null +++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.swingset3.demos.dialog; + +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.*; +import javax.swing.border.EmptyBorder; +import com.sun.swingset3.DemoProperties; +import com.sun.swingset3.demos.DemoUtilities; +import com.sun.swingset3.demos.ResourceManager; +import com.sun.swingset3.demos.slider.SliderDemo; + +/** + * + * @author aim + */ +@DemoProperties( + value = "JDialog Demo", + category = "Toplevel Containers", + description = "Demonstrates JDialog, Swing's top-level dialog container.", + sourceFiles = { + "com/sun/swingset3/demos/dialog/DialogDemo.java", + "com/sun/swingset3/demos/DemoUtilities.java", + "com/sun/swingset3/demos/dialog/resources/images/DialogDemo.gif" + } +) +public class DialogDemo extends JPanel { + + private JDialog dialog; + private JComponent dialogSpaceholder; + + public static final String DIALOG_TITLE = "Demo JDialog"; + public static final String SHOW_BUTTON_TITLE = "Show JDialog..."; + public static final String LABEL_CONTENT = "I'm content."; + public static final String DIALOG_DEMO_TITLE = DialogDemo.class + .getAnnotation(DemoProperties.class).value(); + + public DialogDemo() { + initComponents(); + } + + protected void initComponents() { + dialog = createDialog(); + + setLayout(new BorderLayout()); + + add(createControlPanel(), BorderLayout.WEST); + dialogSpaceholder = createDialogSpaceholder(dialog); + add(dialogSpaceholder, BorderLayout.CENTER); + } + + private static JComponent createDialogSpaceholder(JDialog dialog) { + // Create placeholder panel to provide space in which to + // display the toplevel dialog so that the control panel is not + // obscured by it. + JPanel placeholder = new JPanel(); + Dimension prefSize = dialog.getPreferredSize(); + prefSize.width += 12; + prefSize.height += 12; + placeholder.setPreferredSize(prefSize); + return placeholder; + } + + protected JComponent createControlPanel() { + // Create control panel on Left + Box panel = Box.createVerticalBox(); + panel.setBorder(new EmptyBorder(8, 8, 8, 8)); + + // Create button to control visibility of frame + JButton showButton = new JButton(SHOW_BUTTON_TITLE); + showButton.addActionListener(new ShowActionListener()); + panel.add(showButton); + + return panel; + } + + private static JDialog createDialog() { + + //Create dialog + JDialog dialog = new JDialog(new JFrame(), DIALOG_TITLE, false); + // + + //Add dialog's content + JLabel label = new JLabel(LABEL_CONTENT); + label.setHorizontalAlignment(JLabel.CENTER); + label.setPreferredSize(new Dimension(200, 140)); + dialog.add(label); + // + + //Initialize dialog's size + // which will shrink-to-fit its contents + dialog.pack(); + // + + return dialog; + } + + public void start() { + DemoUtilities.setToplevelLocation(dialog, dialogSpaceholder, SwingConstants.CENTER); + showDialog(); + } + + public void stop() { + //Hide dialog + dialog.setVisible(false); + // + } + + public void showDialog() { + //Show dialog + // if dialog already visible, then bring to the front + if (dialog.isShowing()) { + dialog.toFront(); + } else { + dialog.setVisible(true); + } + // + } + + private class ShowActionListener implements ActionListener { + + public void actionPerformed(ActionEvent actionEvent) { + showDialog(); + } + } + + public static void main(String args[]) { + EventQueue.invokeLater(new Runnable() { + public void run() { + JFrame frame = new JFrame(DIALOG_DEMO_TITLE); + DialogDemo demo = new DialogDemo(); + frame.add(demo); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.pack(); + frame.setVisible(true); + demo.start(); + } + }); + } +} diff --git a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/SliderDemo.java b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/SliderDemo.java new file mode 100644 index 00000000000..7bec4af5cdb --- /dev/null +++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/SliderDemo.java @@ -0,0 +1,280 @@ +/* + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.swingset3.demos.slider; + +import java.awt.*; +import javax.swing.*; +import javax.swing.border.BevelBorder; +import javax.swing.border.TitledBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import com.sun.swingset3.DemoProperties; +import com.sun.swingset3.demos.ResourceManager; +import com.sun.swingset3.demos.textfield.TextFieldDemo; + +/** + * JSlider Demo + * + * @version 1.9 11/17/05 + * @author Dave Kloba + * @author Jeff Dinkins + */ +@DemoProperties( + value = "Slider Demo", + category = "Controls", + description = "Demonstrates the JSlider, a control which supports linear adjustment", + sourceFiles = { + "com/sun/swingset3/demos/slider/SliderDemo.java", + "com/sun/swingset3/demos/ResourceManager.java", + "com/sun/swingset3/demos/slider/resources/SliderDemo.properties", + "com/sun/swingset3/demos/slider/resources/images/SliderDemo.gif" + } +) +public class SliderDemo extends JPanel { + + private static final Dimension HGAP5 = new Dimension(5, 1); + private static final Dimension VGAP5 = new Dimension(1, 5); + private static final Dimension HGAP10 = new Dimension(10, 1); + private static final Dimension VGAP10 = new Dimension(1, 10); + private static final Dimension HGAP20 = new Dimension(20, 1); + private static final Dimension HGAP25 = new Dimension(25, 1); + private final ResourceManager resourceManager = new ResourceManager(this.getClass()); + public static final String DEMO_TITLE = SliderDemo.class.getAnnotation(DemoProperties.class).value(); + public static final String HORIZONTAL_PLAIN_SLIDER = "Horizontal Plain Slider"; + public static final String HORIZONTAL_MAJOR_TICKS_SLIDER = "Horizontal Major Ticks Slider"; + public static final String HORIZONTAL_MINOR_TICKS_SLIDER = "Horizontal Minor Ticks Slider"; + public static final String HORIZONTAL_DISABLED_SLIDER = "Horizontal Disabled Slider"; + public static final String VERTICAL_PLAIN_SLIDER = "Vertical Plain Slider"; + public static final String VERTICAL_MAJOR_TICKS_SLIDER = "Vertical Major Ticks Slider"; + public static final String VERTICAL_MINOR_TICKS_SLIDER = "Vertical Minor Ticks Slider"; + public static final String VERTICAL_DISABLED_SLIDER = "Vertical Disabled Slider"; + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + JFrame frame = new JFrame(SliderDemo.class.getAnnotation(DemoProperties.class).value()); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.getContentPane().add(new SliderDemo()); + frame.setPreferredSize(new Dimension(800, 600)); + frame.pack(); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + /** + * SliderDemo Constructor + */ + public SliderDemo() { + createSliderDemo(); + } + + private void createSliderDemo() { + JSlider s; + JPanel hp; + JPanel vp; + GridLayout g; + JPanel tp; + JLabel tf; + ChangeListener listener; + + setLayout(new BorderLayout()); + tf = new JLabel(resourceManager.getString("SliderDemo.slidervalue")); + add(tf, BorderLayout.SOUTH); + tp = new JPanel(); + g = new GridLayout(1, 2); + g.setHgap(5); + g.setVgap(5); + tp.setLayout(g); + add(tp, BorderLayout.CENTER); + listener = new SliderListener(tf); + BevelBorder border = new BevelBorder(BevelBorder.LOWERED); + hp = new JPanel(); + hp.setLayout(new BoxLayout(hp, BoxLayout.Y_AXIS)); + hp.setBorder(new TitledBorder( + border, + resourceManager.getString("SliderDemo.horizontal"), + TitledBorder.LEFT, + TitledBorder.ABOVE_TOP)); + tp.add(hp); + vp = new JPanel(); + vp.setLayout(new BoxLayout(vp, BoxLayout.X_AXIS)); + vp.setBorder(new TitledBorder( + border, + resourceManager.getString("SliderDemo.vertical"), + TitledBorder.LEFT, + TitledBorder.ABOVE_TOP)); + tp.add(vp); + + // Horizontal Slider 1 + JPanel p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.plain"))); + s = new JSlider(-10, 100, 20); + s.getAccessibleContext().setAccessibleName(HORIZONTAL_PLAIN_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.a_plain_slider")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(VGAP5)); + p.add(s); + p.add(Box.createRigidArea(VGAP5)); + hp.add(p); + hp.add(Box.createRigidArea(VGAP10)); + + // Horizontal Slider 2 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.majorticks"))); + s = new JSlider(100, 1000, 400); + s.setPaintTicks(true); + s.setMajorTickSpacing(100); + s.getAccessibleContext().setAccessibleName(HORIZONTAL_MAJOR_TICKS_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.majorticksdescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(VGAP5)); + p.add(s); + p.add(Box.createRigidArea(VGAP5)); + hp.add(p); + hp.add(Box.createRigidArea(VGAP10)); + + // Horizontal Slider 3 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.ticks"))); + s = new JSlider(0, 11, 6); + s.putClientProperty("JSlider.isFilled", Boolean.TRUE); + s.setPaintTicks(true); + s.setMajorTickSpacing(5); + s.setMinorTickSpacing(1); + s.setPaintLabels(true); + s.setSnapToTicks(true); + s.getLabelTable().put(new Integer(11), new JLabel(Integer.toString(11), JLabel.CENTER)); + s.setLabelTable(s.getLabelTable()); + s.getAccessibleContext().setAccessibleName(HORIZONTAL_MINOR_TICKS_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.minorticksdescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(VGAP5)); + p.add(s); + p.add(Box.createRigidArea(VGAP5)); + hp.add(p); + hp.add(Box.createRigidArea(VGAP10)); + + // Horizontal Slider 4 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.disabled"))); + BoundedRangeModel brm = new DefaultBoundedRangeModel(80, 0, 0, 100); + s = new JSlider(brm); + s.setPaintTicks(true); + s.setMajorTickSpacing(20); + s.setMinorTickSpacing(5); + s.setEnabled(false); + s.getAccessibleContext().setAccessibleName(HORIZONTAL_DISABLED_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.disableddescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(VGAP5)); + p.add(s); + p.add(Box.createRigidArea(VGAP5)); + hp.add(p); + + ////////////////////////////////////////////////////////////////////////////// + // Vertical Slider 1 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.plain"))); + s = new JSlider(JSlider.VERTICAL, -10, 100, 20); + s.getAccessibleContext().setAccessibleName(VERTICAL_PLAIN_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.a_plain_slider")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(HGAP10)); + p.add(s); + p.add(Box.createRigidArea(HGAP10)); + vp.add(p); + vp.add(Box.createRigidArea(HGAP10)); + + // Vertical Slider 2 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.majorticks"))); + s = new JSlider(JSlider.VERTICAL, 100, 1000, 400); + s.putClientProperty("JSlider.isFilled", Boolean.TRUE); + s.setPaintTicks(true); + s.setMajorTickSpacing(100); + s.getAccessibleContext().setAccessibleName(VERTICAL_MAJOR_TICKS_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.majorticksdescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(HGAP25)); + p.add(s); + p.add(Box.createRigidArea(HGAP25)); + vp.add(p); + vp.add(Box.createRigidArea(HGAP5)); + + // Vertical Slider 3 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.minorticks"))); + s = new JSlider(JSlider.VERTICAL, 0, 100, 60); + s.setPaintTicks(true); + s.setMajorTickSpacing(20); + s.setMinorTickSpacing(5); + s.setPaintLabels(true); + s.getAccessibleContext().setAccessibleName(VERTICAL_MINOR_TICKS_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.minorticksdescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(HGAP10)); + p.add(s); + p.add(Box.createRigidArea(HGAP10)); + vp.add(p); + vp.add(Box.createRigidArea(HGAP5)); + + // Vertical Slider 4 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.disabled"))); + s = new JSlider(JSlider.VERTICAL, 0, 100, 80); + s.setPaintTicks(true); + s.setMajorTickSpacing(20); + s.setMinorTickSpacing(5); + s.setEnabled(false); + s.getAccessibleContext().setAccessibleName(VERTICAL_DISABLED_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.disableddescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(HGAP20)); + p.add(s); + p.add(Box.createRigidArea(HGAP20)); + vp.add(p); + } + + private class SliderListener implements ChangeListener { + + private final JLabel tf; + + public SliderListener(JLabel f) { + tf = f; + } + + public void stateChanged(ChangeEvent e) { + JSlider s1 = (JSlider) e.getSource(); + tf.setText(resourceManager.getString("SliderDemo.slidervalue") + s1.getValue()); + } + } +} diff --git a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/resources/SliderDemo.properties b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/resources/SliderDemo.properties new file mode 100644 index 00000000000..7d3cd7e7bbc --- /dev/null +++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/resources/SliderDemo.properties @@ -0,0 +1,18 @@ +### Slider Demo ### + +SliderDemo.accessible_description=This demo shows an example of using the JSlider component. +SliderDemo.tooltip=JSlider demo +SliderDemo.name=Slider Demo + +SliderDemo.slidervalue=Slider Value: +SliderDemo.horizontal=Horizontal +SliderDemo.vertical=Vertical +SliderDemo.plain=Plain +SliderDemo.a_plain_slider=A Plain Slider +SliderDemo.majorticks=Major Ticks +SliderDemo.majorticksdescription=A slider showing major tick marks +SliderDemo.ticks=Minor Ticks, Snap-to-ticks and Labels +SliderDemo.minorticks=Minor Ticks +SliderDemo.minorticksdescription=A slider showing major and minor tick marks, with slider action snapping to tick marks, with some ticks visibly labeled +SliderDemo.disabled=Disabled +SliderDemo.disableddescription=A slider showing major and minor tick marks that is not enabled (cannot be manipulated diff --git a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/WindowWaiter.java b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/WindowWaiter.java index 7d480000fd6..4ca6949fa71 100644 --- a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/WindowWaiter.java +++ b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/WindowWaiter.java @@ -25,6 +25,7 @@ package org.netbeans.jemmy; import java.awt.Component; import java.awt.Frame; import java.awt.Window; +import java.util.stream.Stream; /** * A WindowWaiter is a utility class used to look or wait for Windows. It @@ -282,6 +283,91 @@ public class WindowWaiter extends Waiter implements Timeoutable { return waitWindow(o, ch, 0); } + /** + * Wait till the count of windows which meet the the search criteria becomes + * equal to count. + * + * @param ch a component chooser used to define and apply the search + * criteria. + * @param count the number of expected windows meeting the search criteria. + * @throws InterruptedException + */ + public static void waitWindowCount(ComponentChooser ch, int count) + throws InterruptedException { + waitWindowCount(null, ch, count); + } + + /** + * Wait till the count of windows which meet the the search criteria becomes + * equal to count. + * + * @param owner The owner window of all the windows to be checked + * @param ch a component chooser used to define and apply the search + * criteria. + * @param count the number of expected windows meeting the search criteria. + * @throws InterruptedException + */ + public static void waitWindowCount(Window owner, ComponentChooser ch, int count) + throws InterruptedException { + Waiter stateWaiter = new Waiter<>(new Waitable() { + @Override + public String actionProduced(Void obj) { + return countWindows(owner, ch) == count ? "" : null; + } + + @Override + public String getDescription() { + return "Wait till the count of windows matching the criteria " + + "specified by ComponentChooser reaches :" + count; + } + + @Override + public String toString() { + return "Operator.waitState.Waitable{description = " + + getDescription() + '}'; + } + }); + stateWaiter.waitAction(null); + } + + /** + * Counts all the windows owned by the owner window which match the + * criterion specified by component chooser. + * + * @param owner The owner window of all the windows to be checked + * @param ch A component chooser used to define and apply the search + * criteria + * @return the number of matched windows + */ + public static int countWindows(Window owner, ComponentChooser ch) { + return new QueueTool().invokeAndWait(new QueueTool.QueueAction(null) { + + @Override + public Integer launch() { + Window[] windows; + if (owner == null) { + windows = Window.getWindows(); + } else { + windows = owner.getOwnedWindows(); + } + return (int) Stream.of(windows) + .filter(x -> ch.checkComponent(x)).count(); + } + }); + } + + /** + * Counts all the windows which match the criterion specified by component + * chooser. + * + * @param ch A component chooser used to define and apply the search + * criteria + * @return the number of matched windows + */ + public static int countWindows(ComponentChooser ch) { + return countWindows(null, ch); + } + @Override public String getDescription() { return chooser.getDescription(); diff --git a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/scrolling/JSliderAPIDriver.java b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/scrolling/JSliderAPIDriver.java index 290c431f6f6..9fbff80ce3e 100644 --- a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/scrolling/JSliderAPIDriver.java +++ b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/scrolling/JSliderAPIDriver.java @@ -66,20 +66,15 @@ public class JSliderAPIDriver extends AbstractScrollDriver { if (adj.getScrollDirection() == ScrollAdjuster.DECREASE_SCROLL_DIRECTION) { newValue = (scroll.getValue() > scroll.getMinimum() + getUnitIncrement(scroll)) - ? scroll.getValue() - getUnitIncrement(scroll) - : scroll.getMinimum(); + ? scroll.getValue() - getUnitIncrement(scroll) + : scroll.getMinimum(); + scroll.setValue(newValue); } else if (adj.getScrollDirection() == ScrollAdjuster.INCREASE_SCROLL_DIRECTION) { newValue = (scroll.getValue() < scroll.getMaximum() - getUnitIncrement(scroll)) - ? scroll.getValue() + getUnitIncrement(scroll) - : scroll.getMaximum(); - } - setValue(oper, newValue); - } - - private void setValue(ComponentOperator oper, int value) { - if (value != -1) { - ((JSliderOperator) oper).setValue(value); + ? scroll.getValue() + getUnitIncrement(scroll) + : scroll.getMaximum(); + scroll.setValue(newValue); } } @@ -96,15 +91,16 @@ public class JSliderAPIDriver extends AbstractScrollDriver { if (adj.getScrollDirection() == ScrollAdjuster.DECREASE_SCROLL_DIRECTION) { newValue = (scroll.getValue() > scroll.getMinimum() + getBlockIncrement(scroll)) - ? scroll.getValue() - getBlockIncrement(scroll) - : scroll.getMinimum(); + ? scroll.getValue() - getBlockIncrement(scroll) + : scroll.getMinimum(); + scroll.setValue(newValue); } else if (adj.getScrollDirection() == ScrollAdjuster.INCREASE_SCROLL_DIRECTION) { newValue = (scroll.getValue() < scroll.getMaximum() - getBlockIncrement(scroll)) - ? scroll.getValue() + getBlockIncrement(scroll) - : scroll.getMaximum(); + ? scroll.getValue() + getBlockIncrement(scroll) + : scroll.getMaximum(); + scroll.setValue(newValue); } - setValue(oper, newValue); } @Override diff --git a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/windows/DefaultFrameDriver.java b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/windows/DefaultFrameDriver.java index 055bc872f05..01520509f1d 100644 --- a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/windows/DefaultFrameDriver.java +++ b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/windows/DefaultFrameDriver.java @@ -22,9 +22,7 @@ */ package org.netbeans.jemmy.drivers.windows; -import java.awt.Dimension; import java.awt.Frame; -import java.awt.Toolkit; import java.awt.Window; import java.awt.event.WindowEvent; @@ -61,16 +59,28 @@ public class DefaultFrameDriver extends LightSupportiveDriver implements FrameDr ((FrameOperator) oper).setState(Frame.NORMAL); } + /** Maximizes the frame. + * + * @param oper Frame operator. + * @throws UnsupportedOperatorException if operator class name is not in + * the list of supported classes names + */ @Override public void maximize(ComponentOperator oper) { checkSupported(oper); - oper.setLocation(0, 0); - Dimension ssize = Toolkit.getDefaultToolkit().getScreenSize(); - oper.setSize(ssize.width, ssize.height); + ((FrameOperator) oper).setExtendedState(Frame.MAXIMIZED_BOTH); } + /** Demaximizes the frame. + * + * @param oper Frame operator. + * @throws UnsupportedOperatorException if operator class name is not in + * the list of supported classes names + */ @Override public void demaximize(ComponentOperator oper) { checkSupported(oper); + ((FrameOperator) oper).setExtendedState(Frame.NORMAL); } + } diff --git a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/ComponentOperator.java b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/ComponentOperator.java index 804ad6e4449..3d647ed9df1 100644 --- a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/ComponentOperator.java +++ b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/ComponentOperator.java @@ -57,6 +57,8 @@ import java.io.PrintWriter; import java.util.Hashtable; import java.util.Locale; +import static java.lang.Math.abs; + import org.netbeans.jemmy.CharBindingMap; import org.netbeans.jemmy.ComponentChooser; import org.netbeans.jemmy.ComponentSearcher; @@ -1136,6 +1138,87 @@ public class ComponentOperator extends Operator }); } + /** + * Wait till the Size of the component becomes as expected. + * + * @param exactSize the exact expected size. + */ + public void waitComponentSize(Dimension exactSize) { + waitComponentSize(exactSize, exactSize); + } + + /** + * Wait till the Size of the component becomes between minSize and maxSize. + * + * @param minSize the minimum allowed size. + * @param maxSize the maximum allowed size. + */ + public void waitComponentSize(Dimension minSize, Dimension maxSize) { + waitState(new ComponentChooser() { + @Override + public boolean checkComponent(Component comp) { + Dimension componentSize = comp.getSize(); + return componentSize.height >= minSize.height + && componentSize.height <= maxSize.height + && componentSize.width >= minSize.width + && componentSize.width <= maxSize.width; + } + + @Override + public String getDescription() { + return "Component Size becomes between: " + minSize + + "and " + maxSize; + } + + @Override + public String toString() { + return "ComponentOperator.waitComponentSize" + + ".Waitable{description = " + getDescription() + '}'; + } + }); + } + + /** + * Wait till the component reaches exact location. + * + * @param exactlocation exact expected location. + */ + public void waitComponentLocation(Point exactlocation) { + waitComponentLocation(exactlocation, exactlocation); + } + + /** + * Wait till the component reaches location between minLocation and + * maxLocation + * + * @param minLocation minimum expected location. + * @param maxLocation maximum expected location. + */ + public void waitComponentLocation(Point minLocation, Point maxLocation) { + waitState(new ComponentChooser() { + @Override + public boolean checkComponent(Component comp) { + Point componentLocation = comp.getLocation(); + return componentLocation.x >= minLocation.x + && componentLocation.x <= maxLocation.x + && componentLocation.y >= minLocation.y + && componentLocation.y <= maxLocation.y; + } + + @Override + public String getDescription() { + return "Component reaches location between :" + minLocation + + "and " + maxLocation; + } + + @Override + public String toString() { + return "ComponentOperator.waitComponentLocation" + + ".Waitable{description = " + getDescription() + '}'; + } + }); + } + /** * Returns information about component. */ diff --git a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/FrameOperator.java b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/FrameOperator.java index d66a8e9c211..da6d1d5855a 100644 --- a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/FrameOperator.java +++ b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/FrameOperator.java @@ -274,7 +274,7 @@ public class FrameOperator extends WindowOperator implements Outputable { output.printGolden("Maximizing frame"); driver.maximize(this); if (getVerification()) { - waitState(Frame.NORMAL); + waitState(Frame.MAXIMIZED_BOTH); } } @@ -306,7 +306,7 @@ public class FrameOperator extends WindowOperator implements Outputable { waitState(new ComponentChooser() { @Override public boolean checkComponent(Component comp) { - return ((Frame) comp).getState() == state; + return ((Frame) comp).getExtendedState() == state; } @Override @@ -375,6 +375,19 @@ public class FrameOperator extends WindowOperator implements Outputable { })); } + /** + * Maps {@code Frame.getExtendedState()} through queue + * @return the state of the frame + */ + public int getExtendedState() { + return (runMapping(new MapAction("getExtendedState") { + @Override + public Integer map() { + return ((Frame) getSource()).getExtendedState(); + } + })); + } + /** * Maps {@code Frame.getTitle()} through queue */ @@ -447,6 +460,21 @@ public class FrameOperator extends WindowOperator implements Outputable { }); } + /** + * Maps {@code Frame.setExtendedState(int)} through queue + * @param state of the frame + */ + public void setExtendedState(final int state) { + runMapping(new MapAction("setExtendedState") { + @Override + public Void map() { + ((Frame) getSource()).setExtendedState(state); + return null; + } + }); + + } + /** * Maps {@code Frame.setTitle(String)} through queue */ diff --git a/jdk/test/sun/awt/dnd/8024061/bug8024061.java b/jdk/test/sun/awt/dnd/8024061/bug8024061.java index e220880ac0b..0a9528acafb 100644 --- a/jdk/test/sun/awt/dnd/8024061/bug8024061.java +++ b/jdk/test/sun/awt/dnd/8024061/bug8024061.java @@ -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 @@ -70,9 +70,14 @@ public class bug8024061 { private static final DataFlavor DropObjectFlavor; private static final int DELAY = 1000; - private final DnDPanel panel1 = new DnDPanel(Color.yellow); - private final DnDPanel panel2 = new DnDPanel(Color.pink); + static final DnDPanel panel1 = new DnDPanel(Color.yellow); + static final DnDPanel panel2 = new DnDPanel(Color.pink); private final JFrame frame; + static Point here; + static Point there; + static Dimension d; + + private static final CountDownLatch lock = new CountDownLatch(1); private static volatile Exception dragEnterException = null; @@ -91,7 +96,7 @@ public class bug8024061 { frame = new JFrame("DnDWithRobot"); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); - Dimension d = new Dimension(100, 100); + d = new Dimension(100, 100); panel1.setPreferredSize(d); panel2.setPreferredSize(d); @@ -126,12 +131,15 @@ public class bug8024061 { final Robot robot = new Robot(); robot.setAutoDelay(10); robot.waitForIdle(); + robot.delay(200); JFrame frame = dnd[0].frame; - Point point = frame.getLocationOnScreen(); - Point here = new Point(point.x + 35, point.y + 45); - Point there = new Point(point.x + 120, point.y + 45); - here.x += 25; + SwingUtilities.invokeAndWait(() -> { + here = panel1.getLocationOnScreen(); + there = panel2.getLocationOnScreen(); + }); + here.translate(d.width / 2, d.height / 2); + there.translate(d.width / 2, d.height / 2); robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { @@ -159,7 +167,7 @@ public class bug8024061 { throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { - frame.dispose(); + SwingUtilities.invokeLater(frame::dispose); } } @@ -220,7 +228,7 @@ public class bug8024061 { } } - class DnDPanel extends JPanel { + static class DnDPanel extends JPanel { DropObject dropObject; final DragSource dragSource; final DropTarget dropTarget; diff --git a/jdk/test/sun/jvmstat/TEST.properties b/jdk/test/sun/jvmstat/TEST.properties new file mode 100644 index 00000000000..0f0bd8b2056 --- /dev/null +++ b/jdk/test/sun/jvmstat/TEST.properties @@ -0,0 +1,2 @@ +modules = jdk.internal.jvmstat/sun.jvmstat.monitor + diff --git a/jdk/test/sun/jvmstat/monitor/HostIdentifier/HostIdentifierCreate.java b/jdk/test/sun/jvmstat/monitor/HostIdentifier/HostIdentifierCreate.java index 38c464ebc91..98b6781a5c8 100644 --- a/jdk/test/sun/jvmstat/monitor/HostIdentifier/HostIdentifierCreate.java +++ b/jdk/test/sun/jvmstat/monitor/HostIdentifier/HostIdentifierCreate.java @@ -24,8 +24,10 @@ /* * @test * @bug 4990825 - * @modules jdk.internal.jvmstat/sun.jvmstat.monitor * @summary test that HostIdentifier objects get created as expected + * + * @modules java.xml + * jdk.internal.jvmstat/sun.jvmstat.monitor */ import java.io.*; diff --git a/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java b/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java index 8f9d9d693ac..35482604c44 100644 --- a/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java +++ b/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java @@ -40,9 +40,10 @@ import sun.jvmstat.monitor.VmIdentifier; * @test * @bug 6672135 * @summary setInterval() for local MonitoredHost and local MonitoredVm - * @modules jdk.internal.jvmstat/sun.jvmstat.monitor + * * @library /lib/testlibrary * @library /test/lib + * * @build jdk.testlibrary.* * @build jdk.test.lib.apps.* * @run main TestPollingInterval diff --git a/jdk/test/sun/jvmstat/monitor/VmIdentifier/VmIdentifierCreateResolve.java b/jdk/test/sun/jvmstat/monitor/VmIdentifier/VmIdentifierCreateResolve.java index e3bdb4c9b91..f5f157929be 100644 --- a/jdk/test/sun/jvmstat/monitor/VmIdentifier/VmIdentifierCreateResolve.java +++ b/jdk/test/sun/jvmstat/monitor/VmIdentifier/VmIdentifierCreateResolve.java @@ -24,8 +24,10 @@ /* * @test * @bug 4990825 - * @modules jdk.internal.jvmstat/sun.jvmstat.monitor * @summary test that VmIdentifier objects get created as expected + * + * @modules java.xml + * jdk.internal.jvmstat/sun.jvmstat.monitor */ import java.io.*; diff --git a/jdk/test/sun/jvmstat/perfdata/PrologSanity/PrologSizeSanityCheck.java b/jdk/test/sun/jvmstat/perfdata/PrologSanity/PrologSizeSanityCheck.java index 24438815d6e..edacd65d875 100644 --- a/jdk/test/sun/jvmstat/perfdata/PrologSanity/PrologSizeSanityCheck.java +++ b/jdk/test/sun/jvmstat/perfdata/PrologSanity/PrologSizeSanityCheck.java @@ -24,9 +24,9 @@ /* * @test * @bug 4990825 - * @modules jdk.internal.jvmstat/sun.jvmstat.monitor - * @run main/othervm -XX:+UsePerfData PrologSizeSanityCheck * @summary prolog size and overflow sanity checks + * + * @run main/othervm -XX:+UsePerfData PrologSizeSanityCheck */ import sun.jvmstat.monitor.*; diff --git a/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassInitializationTime.java b/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassInitializationTime.java index 51111af24c4..fd450029d51 100644 --- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassInitializationTime.java +++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassInitializationTime.java @@ -26,7 +26,7 @@ * @bug 4858522 * @summary Basic unit test of HotspotClassLoadingMBean.getClassInitializationTime() * @author Steve Bohne - * @modules java.management/sun.management + * * @run main/othervm -XX:+UsePerfData GetClassInitializationTime */ diff --git a/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java b/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java index 37971f7e2cc..1e1d5aa1b99 100644 --- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java +++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java @@ -26,7 +26,7 @@ * @bug 4858522 * @summary Basic unit test of HotspotClassLoadingMBean.getClassLoadingTime() * @author Steve Bohne - * @modules java.management/sun.management + * * @build ClassToLoad0 * @run main/othervm -XX:+UsePerfData GetClassLoadingTime */ diff --git a/jdk/test/sun/management/HotspotClassLoadingMBean/GetInitializedClassCount.java b/jdk/test/sun/management/HotspotClassLoadingMBean/GetInitializedClassCount.java index 72025d85962..b6f966c999a 100644 --- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetInitializedClassCount.java +++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetInitializedClassCount.java @@ -26,7 +26,7 @@ * @bug 4858522 * @summary Basic unit test of HotspotClassLoadingMBean.getInitializedClassCount() * @author Steve Bohne - * @modules java.management/sun.management + * * @run main/othervm -XX:+UsePerfData GetInitializedClassCount */ diff --git a/jdk/test/sun/management/HotspotClassLoadingMBean/GetLoadedClassSize.java b/jdk/test/sun/management/HotspotClassLoadingMBean/GetLoadedClassSize.java index 2ca1b85f528..9ba6fe6b268 100644 --- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetLoadedClassSize.java +++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetLoadedClassSize.java @@ -26,7 +26,7 @@ * @bug 4858522 * @summary Basic unit test of HotspotClassLoadingMBean.getLoadedClassSize() * @author Steve Bohne - * @modules java.management/sun.management + * * @run main/othervm -XX:+UsePerfData GetLoadedClassSize */ diff --git a/jdk/test/sun/management/HotspotClassLoadingMBean/GetMethodDataSize.java b/jdk/test/sun/management/HotspotClassLoadingMBean/GetMethodDataSize.java index a8e5f43dcd1..8164ba71367 100644 --- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetMethodDataSize.java +++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetMethodDataSize.java @@ -26,7 +26,7 @@ * @bug 4858522 * @summary Basic unit test of HotspotClassLoadingMBean.getMethodDataSize() * @author Steve Bohne - * @modules java.management/sun.management + * * @run main/othervm -XX:+UsePerfData GetMethodDataSize */ diff --git a/jdk/test/sun/management/HotspotClassLoadingMBean/GetUnloadedClassSize.java b/jdk/test/sun/management/HotspotClassLoadingMBean/GetUnloadedClassSize.java index 6319c9abe5f..84e84452cb4 100644 --- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetUnloadedClassSize.java +++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetUnloadedClassSize.java @@ -26,7 +26,7 @@ * @bug 4858522 * @summary Basic unit test of HotspotClassLoadingMBean.getUnloadedClassSize() * @author Steve Bohne - * @modules java.management/sun.management + * * @run main/othervm -XX:+UsePerfData GetUnloadedClassSize */ diff --git a/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointCount.java b/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointCount.java index 7d85e417100..a96d282afba 100644 --- a/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointCount.java +++ b/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointCount.java @@ -26,7 +26,7 @@ * @bug 4858522 * @summary Basic unit test of HotspotClassLoadingMBean.getSafepointCount() * @author Steve Bohne - * @modules java.management/sun.management + * * @run main/othervm -XX:+UsePerfData GetSafepointCount */ diff --git a/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java b/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java index d2a5a7c3646..7b25aaf81b0 100644 --- a/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java +++ b/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java @@ -26,7 +26,7 @@ * @bug 4858522 * @summary Basic unit test of HotspotRuntimeMBean.getSafepointSyncTime() * @author Steve Bohne - * @modules java.management/sun.management + * * @run main/othervm -XX:+UsePerfData GetSafepointSyncTime */ diff --git a/jdk/test/sun/management/HotspotRuntimeMBean/GetTotalSafepointTime.java b/jdk/test/sun/management/HotspotRuntimeMBean/GetTotalSafepointTime.java index 9502285a405..b2769e2c02a 100644 --- a/jdk/test/sun/management/HotspotRuntimeMBean/GetTotalSafepointTime.java +++ b/jdk/test/sun/management/HotspotRuntimeMBean/GetTotalSafepointTime.java @@ -24,8 +24,8 @@ /* * @test * @bug 4858522 - * @modules java.management/sun.management * @summary Basic unit test of HotspotRuntimeMBean.getTotalSafepointTime() + * * @run main/othervm -XX:+UsePerfData GetTotalSafepointTime */ diff --git a/jdk/test/sun/management/HotspotThreadMBean/GetInternalThreads.java b/jdk/test/sun/management/HotspotThreadMBean/GetInternalThreads.java index 5d8fe4853fe..9990adc533c 100644 --- a/jdk/test/sun/management/HotspotThreadMBean/GetInternalThreads.java +++ b/jdk/test/sun/management/HotspotThreadMBean/GetInternalThreads.java @@ -27,7 +27,7 @@ * @summary Basic Test for HotspotThreadMBean.getInternalThreadCount() * and getInternalThreadCpuTime() * @author Mandy Chung - * @modules java.management/sun.management + * * @run main/othervm -XX:+UsePerfData GetInternalThreads */ diff --git a/jdk/test/sun/management/LazyCompositeDataTest.java b/jdk/test/sun/management/LazyCompositeDataTest.java index c3d06523022..7835dd1e35e 100644 --- a/jdk/test/sun/management/LazyCompositeDataTest.java +++ b/jdk/test/sun/management/LazyCompositeDataTest.java @@ -36,7 +36,6 @@ import sun.management.LazyCompositeData; * @test * @bug 8139870 * @summary sun.management.LazyCompositeData.isTypeMatched() fails for composite types with items of ArrayType - * @modules java.management/sun.management * @author Jaroslav Bachorik */ @@ -160,4 +159,5 @@ public class LazyCompositeDataTest { } System.out.println("=== PASSED"); } -} \ No newline at end of file +} + diff --git a/jdk/test/sun/management/LoggingTest/LoggingWithJULTest.java b/jdk/test/sun/management/LoggingTest/LoggingWithJULTest.java index a15e5296ec7..a2c7e791507 100644 --- a/jdk/test/sun/management/LoggingTest/LoggingWithJULTest.java +++ b/jdk/test/sun/management/LoggingTest/LoggingWithJULTest.java @@ -26,11 +26,14 @@ import java.nio.file.Paths; /** * @test * @bug 8172971 - * @modules java.management java.logging * @summary Smoke test to check that logging in java.management works as expected. + * @author danielfuchs + * + * @modules java.management + * java.logging + * * @build LoggingTest LoggingWithJULTest * @run main/othervm LoggingWithJULTest - * @author danielfuchs */ public class LoggingWithJULTest { diff --git a/jdk/test/sun/management/LoggingTest/LoggingWithLoggerFinderTest.java b/jdk/test/sun/management/LoggingTest/LoggingWithLoggerFinderTest.java index feec435db2b..27671f1fd41 100644 --- a/jdk/test/sun/management/LoggingTest/LoggingWithLoggerFinderTest.java +++ b/jdk/test/sun/management/LoggingTest/LoggingWithLoggerFinderTest.java @@ -24,13 +24,13 @@ /** * @test * @bug 8172971 - * @modules java.management * @summary Smoke test to check that logging in java.management is performed * through System.Logger. This test installs a LoggerFinder service * provider and verifies that it gets the traces. + * @author danielfuchs + * * @build test.loggerfinder/test.loggerfinder.TestLoggerFinder LoggingTest LoggingWithLoggerFinderTest * @run main/othervm --add-modules test.loggerfinder LoggingWithLoggerFinderTest - * @author danielfuchs */ public class LoggingWithLoggerFinderTest { diff --git a/jdk/test/sun/management/LoggingTest/test.loggerfinder/test/loggerfinder/TestLoggerFinder.java b/jdk/test/sun/management/LoggingTest/test.loggerfinder/test/loggerfinder/TestLoggerFinder.java index 39c555eee9e..c9ee9169e26 100644 --- a/jdk/test/sun/management/LoggingTest/test.loggerfinder/test/loggerfinder/TestLoggerFinder.java +++ b/jdk/test/sun/management/LoggingTest/test.loggerfinder/test/loggerfinder/TestLoggerFinder.java @@ -26,7 +26,6 @@ package test.loggerfinder; import java.lang.System.Logger; import java.lang.System.Logger.Level; import java.lang.System.LoggerFinder; -import java.lang.reflect.Module; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Optional; diff --git a/jdk/test/sun/management/StackTraceElementCompositeData/CompatibilityTest.java b/jdk/test/sun/management/StackTraceElementCompositeData/CompatibilityTest.java index 00789c89d59..6984eb7657a 100644 --- a/jdk/test/sun/management/StackTraceElementCompositeData/CompatibilityTest.java +++ b/jdk/test/sun/management/StackTraceElementCompositeData/CompatibilityTest.java @@ -15,9 +15,9 @@ import static org.testng.Assert.*; * @test * @bug 8139587 * @summary Check backward compatibility of StackTraceElementCompositeData - * @modules java.management/sun.management - * @run testng CompatibilityTest * @author Jaroslav Bachorik + * + * @run testng CompatibilityTest */ public class CompatibilityTest { @@ -69,4 +69,5 @@ public class CompatibilityTest { assertNull(ste.getModuleName()); assertNull(ste.getModuleVersion()); } -} \ No newline at end of file +} + diff --git a/jdk/test/sun/management/TEST.properties b/jdk/test/sun/management/TEST.properties new file mode 100644 index 00000000000..d2adce131f1 --- /dev/null +++ b/jdk/test/sun/management/TEST.properties @@ -0,0 +1,2 @@ +modules = java.management/sun.management + diff --git a/jdk/test/sun/management/jdp/DynamicLauncher.java b/jdk/test/sun/management/jdp/DynamicLauncher.java index 934002c056b..f55d0c8b671 100644 --- a/jdk/test/sun/management/jdp/DynamicLauncher.java +++ b/jdk/test/sun/management/jdp/DynamicLauncher.java @@ -58,6 +58,11 @@ public abstract class DynamicLauncher { } } } while (tryAgain); + output.shouldHaveExitValue(0); + // java.lang.Exception is thrown by JdpTestCase if something goes wrong + // for instance - see JdpTestCase::shutdown() + output.shouldNotContain("java.lang.Exception:"); + output.shouldNotContain("Error: Could not find or load main class"); } protected OutputAnalyzer runVM() throws Exception { diff --git a/jdk/test/sun/management/jdp/JdpDefaultsTest.java b/jdk/test/sun/management/jdp/JdpDefaultsTest.java index 8236e5e1e25..2f407470c23 100644 --- a/jdk/test/sun/management/jdp/JdpDefaultsTest.java +++ b/jdk/test/sun/management/jdp/JdpDefaultsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -30,10 +30,11 @@ /* * @test JdpDefaultsTest * @summary Assert that we can read JDP packets from a multicast socket connection, on default IP and port. + * * @library /lib/testlibrary - * @modules jdk.management.agent/sun.management.jdp + * * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpOnTestCase DynamicLauncher - * @run main JdpDefaultsTest + * @run main/othervm JdpDefaultsTest */ public class JdpDefaultsTest extends DynamicLauncher { diff --git a/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java b/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java index 9ee4a0cd820..b5d04d5bace 100644 --- a/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java +++ b/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java @@ -22,14 +22,15 @@ */ /** - * @test JdpJmxRemoteDynamicPortTest.java - * @bug 8167337 - * @summary Verify a non-zero value is assigned to jmxremote.port - * when VM is started with jmxremote.port=0. - * @library /lib/testlibrary - * @modules java.management/sun.management.jdp - * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpJmxRemoteDynamicPortTestCase DynamicLauncher - * @run main JdpJmxRemoteDynamicPortTest + * @test JdpJmxRemoteDynamicPortTest.java + * @bug 8167337 + * @summary Verify a non-zero value is assigned to jmxremote.port + * when VM is started with jmxremote.port=0. + * + * @library /lib/testlibrary + * + * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpJmxRemoteDynamicPortTestCase DynamicLauncher + * @run main/othervm JdpJmxRemoteDynamicPortTest */ import java.lang.management.ManagementFactory; @@ -40,7 +41,6 @@ public class JdpJmxRemoteDynamicPortTest extends DynamicLauncher { public static void main(String[] args) throws Exception { DynamicLauncher launcher = new JdpJmxRemoteDynamicPortTest(); launcher.run(); - launcher.getProcessOutpoutAnalyzer().stderrShouldNotContain("java.lang.Exception:"); } protected String[] options() { diff --git a/jdk/test/sun/management/jdp/JdpOffTest.java b/jdk/test/sun/management/jdp/JdpOffTest.java index a1aa6189c5f..2f50e8416ef 100644 --- a/jdk/test/sun/management/jdp/JdpOffTest.java +++ b/jdk/test/sun/management/jdp/JdpOffTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -31,10 +31,11 @@ /* * @test JdpOffTest.java * @summary Assert that no JDP packets are sent to the default address and port. + * * @library /lib/testlibrary - * @modules jdk.management.agent/sun.management.jdp + * * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpOffTestCase DynamicLauncher - * @run main JdpOffTest + * @run main/othervm JdpOffTest */ diff --git a/jdk/test/sun/management/jdp/JdpSpecificAddressTest.java b/jdk/test/sun/management/jdp/JdpSpecificAddressTest.java index f98216427c1..f628e54df00 100644 --- a/jdk/test/sun/management/jdp/JdpSpecificAddressTest.java +++ b/jdk/test/sun/management/jdp/JdpSpecificAddressTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -30,10 +30,11 @@ /* * @test JdpSpecificAddressTest * @summary Assert that we can read JDP packets from a multicast socket connection, on specific IP and port. + * * @library /lib/testlibrary - * @modules jdk.management.agent/sun.management.jdp + * * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpOnTestCase DynamicLauncher - * @run main JdpSpecificAddressTest + * @run main/othervm JdpSpecificAddressTest */ diff --git a/jdk/test/sun/management/jdp/TEST.properties b/jdk/test/sun/management/jdp/TEST.properties new file mode 100644 index 00000000000..122ad1c7e4c --- /dev/null +++ b/jdk/test/sun/management/jdp/TEST.properties @@ -0,0 +1,3 @@ +modules = jdk.management.agent/sun.management.jdp \ + java.logging + diff --git a/jdk/test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java b/jdk/test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java index 6179a33dc3b..223d252686f 100644 --- a/jdk/test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java +++ b/jdk/test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java @@ -22,15 +22,14 @@ */ /** - * @test LocalRMIServerSocketFactoryTest.java - * @bug 6774170 - * @summary Connect to a server socket returned by the LocalRMIServerSocketFactory. + * @test LocalRMIServerSocketFactoryTest.java + * @bug 6774170 + * @summary Connect to a server socket returned by the LocalRMIServerSocketFactory. * - * @author Daniel Fuchs + * @author Daniel Fuchs * - * @modules jdk.management.agent/sun.management.jmxremote - * @run compile -XDignore.symbol.file=true -g LocalRMIServerSocketFactoryTest.java - * @run main LocalRMIServerSocketFactoryTest + * @run compile -XDignore.symbol.file=true -g LocalRMIServerSocketFactoryTest.java + * @run main LocalRMIServerSocketFactoryTest */ import sun.management.jmxremote.LocalRMIServerSocketFactory; diff --git a/jdk/test/sun/management/jmxremote/TEST.properties b/jdk/test/sun/management/jmxremote/TEST.properties new file mode 100644 index 00000000000..c8468535b94 --- /dev/null +++ b/jdk/test/sun/management/jmxremote/TEST.properties @@ -0,0 +1,3 @@ +modules = jdk.management.agent/jdk.internal.agent \ + jdk.management.agent/sun.management.jmxremote + diff --git a/jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java b/jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java index 0e1ebcf5319..8f4b5537f0c 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java +++ b/jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -40,12 +40,16 @@ import jdk.testlibrary.ProcessTools; /** * @test * @bug 6434402 8004926 + * @author Jaroslav Bachorik + * * @library /lib/testlibrary - * @modules jdk.management.agent/jdk.internal.agent + * @modules java.management + * jdk.attach + * jdk.management.agent/jdk.internal.agent + * * @build jdk.testlibrary.* * @build TestManager TestApplication CustomLauncherTest * @run main/othervm CustomLauncherTest - * @author Jaroslav Bachorik */ public class CustomLauncherTest { private static final String TEST_CLASSPATH = System.getProperty("test.class.path"); @@ -140,7 +144,7 @@ public class CustomLauncherTest { System.out.println("Attaching test manager:"); System.out.println("========================="); - System.out.println(" PID : " + serverPrc.getPid()); + System.out.println(" PID : " + serverPrc.pid()); System.out.println(" shutdown port : " + port.get()); ProcessBuilder client = ProcessTools.createJavaProcessBuilder( @@ -148,7 +152,7 @@ public class CustomLauncherTest { TEST_CLASSPATH, "--add-exports", "jdk.management.agent/jdk.internal.agent=ALL-UNNAMED", "TestManager", - String.valueOf(serverPrc.getPid()), + String.valueOf(serverPrc.pid()), port.get(), "true" ); diff --git a/jdk/test/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java b/jdk/test/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java index a7ed6e4fdfc..862c46a23c6 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java +++ b/jdk/test/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java @@ -48,9 +48,9 @@ import jdk.testlibrary.ProcessTools; * @summary Test JMX agent host address binding. Same ports but different * interfaces to bind to (using plain sockets and SSL sockets). * - * @modules jdk.management.agent/jdk.internal.agent - * jdk.management.agent/sun.management.jmxremote * @library /lib/testlibrary + * @modules java.management.rmi + * * @build jdk.testlibrary.* JMXAgentInterfaceBinding * @run main/timeout=5 JMXInterfaceBindingTest */ diff --git a/jdk/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java b/jdk/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java index f731c07245e..5654858d97c 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java +++ b/jdk/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java @@ -27,13 +27,17 @@ * @summary Tests that the jvmstat counters published by the out-of-the-box * management agent for the JMX connection details are correct. * @author Luis-Miguel Alventosa - * @modules jdk.management.agent/jdk.internal.agent + * + * @modules java.management + * jdk.attach + * jdk.management.agent/jdk.internal.agent + * * @run clean JvmstatCountersTest * @run build JvmstatCountersTest * @run main/othervm/timeout=600 -XX:+UsePerfData JvmstatCountersTest 1 * @run main/othervm/timeout=600 -XX:+UsePerfData -Dcom.sun.management.jmxremote JvmstatCountersTest 2 * @run main/othervm/timeout=600 -XX:+UsePerfData -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false JvmstatCountersTest 3 - * @run main/othervm/timeout=600 -XX:+UsePerfData JvmstatCountersTest 4 + * @run main/othervm/timeout=600 -XX:+UsePerfData -Djdk.attach.allowAttachSelf JvmstatCountersTest 4 */ import java.io.*; diff --git a/jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java b/jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java index ae935f3edea..909fedd4b3b 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java +++ b/jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -32,13 +32,17 @@ import jdk.testlibrary.Utils; /** * @test - * @library /lib/testlibrary * @bug 5016507 6173612 6319776 6342019 6484550 8004926 * @summary Start a managed VM and test that a management tool can connect * without connection or username/password details. * TestManager will attempt a connection to the address obtained from * both agent properties and jvmstat buffer. - * @modules jdk.management.agent/jdk.internal.agent + * + * @library /lib/testlibrary + * @modules java.management + * jdk.attach + * jdk.management.agent/jdk.internal.agent + * * @build jdk.testlibrary.* TestManager TestApplication * @run main/othervm/timeout=300 LocalManagementTest */ @@ -125,7 +129,7 @@ public class LocalManagementTest { System.out.println("Attaching test manager:"); System.out.println("========================="); - System.out.println(" PID : " + serverPrc.getPid()); + System.out.println(" PID : " + serverPrc.pid()); System.out.println(" shutdown port : " + port.get()); ProcessBuilder client = ProcessTools.createJavaProcessBuilder( @@ -133,7 +137,7 @@ public class LocalManagementTest { TEST_CLASSPATH, "--add-exports", "jdk.management.agent/jdk.internal.agent=ALL-UNNAMED", "TestManager", - String.valueOf(serverPrc.getPid()), + String.valueOf(serverPrc.pid()), port.get(), "true" ); diff --git a/jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.java b/jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.java index 22f18a48da5..1d9a28024ed 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.java +++ b/jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.java @@ -25,14 +25,14 @@ import java.io.IOException; /** * @test - * @library /lib/testlibrary * @bug 6557093 * @summary Check SSL config file permission for out-of-the-box management - * @modules jdk.management.agent + * @author Taras Ledkov + * + * @library /lib/testlibrary + * * @build jdk.testlibrary.* AbstractFilePermissionTest Dummy * @run main/timeout=300 PasswordFilePermissionTest - * - * @author Taras Ledkov */ public class PasswordFilePermissionTest extends AbstractFilePermissionTest { diff --git a/jdk/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh b/jdk/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh index d4da383d52b..f767505b020 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh +++ b/jdk/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh @@ -24,12 +24,11 @@ # # @test # @bug 6528083 +# @key intermittent # @summary Test RMI Bootstrap # -# @key intermittent # @library /lib/testlibrary -# @modules jdk.management.agent/jdk.internal.agent -# jdk.management.agent/sun.management.jmxremote +# # @build jdk.testlibrary.* TestLogger Utils RmiBootstrapTest # @run shell/timeout=300 RmiBootstrapTest.sh @@ -44,7 +43,7 @@ generatePropertyPasswordFiles `ls ${TESTSRC}/*_test*.in` rm -rf ${TESTCLASSES}/ssl mkdir -p ${TESTCLASSES}/ssl -cp -rf ${TESTSRC}/ssl/*store ${TESTCLASSES}/ssl +cp -rf ${TESTSRC}/ssl/*store ${TESTCLASSES}/ssl chmod -R 777 ${TESTCLASSES}/ssl DEBUGOPTIONS="" @@ -56,7 +55,7 @@ export EXTRAOPTIONS # Call the common generic test # -# No need to since bug 4267864 is now fixed. +# No need to since bug 4267864 is now fixed. # echo ------------------------------------------------------------- echo Launching test for `basename $0 .sh` diff --git a/jdk/test/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java b/jdk/test/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java index f1110063c34..1aeaeb7c3ec 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java +++ b/jdk/test/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java @@ -39,13 +39,14 @@ import java.util.regex.Pattern; /** * @test - * @library /lib/testlibrary * @bug 6228231 * @summary Test that RMI registry uses SSL. - * @modules jdk.management.agent + * @author Luis-Miguel Alventosa, Taras Ledkov + * + * @library /lib/testlibrary + * * @build jdk.testlibrary.* RmiRegistrySslTestApp * @run main/timeout=300 RmiRegistrySslTest - * @author Luis-Miguel Alventosa, Taras Ledkov */ public class RmiRegistrySslTest { private final String TEST_CLASS_PATH = System.getProperty("test.class.path"); diff --git a/jdk/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh b/jdk/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh index cd1fde0a39a..67ae17b51bc 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh +++ b/jdk/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh @@ -27,8 +27,7 @@ # @summary Test RMI Bootstrap with SSL # # @library /lib/testlibrary -# @modules jdk.management.agent/jdk.internal.agent -# jdk.management.agent/sun.management.jmxremote +# # @build jdk.testlibrary.* TestLogger Utils RmiBootstrapTest # @run shell/timeout=300 RmiSslBootstrapTest.sh @@ -43,7 +42,7 @@ generatePropertyPasswordFiles `ls ${TESTSRC}/*_ssltest*.in` rm -rf ${TESTCLASSES}/ssl mkdir -p ${TESTCLASSES}/ssl -cp -rf ${TESTSRC}/ssl/*store ${TESTCLASSES}/ssl +cp -rf ${TESTSRC}/ssl/*store ${TESTCLASSES}/ssl chmod -R 777 ${TESTCLASSES}/ssl DEBUGOPTIONS="" diff --git a/jdk/test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh b/jdk/test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh index 5b88d90e75d..a257cdcc271 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh +++ b/jdk/test/sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.sh @@ -24,10 +24,8 @@ # # @test # @summary Test RMI Bootstrap with SSL and no keystore. -# # @bug 4932854 -# @modules jdk.management.agent/jdk.internal.agent -# jdk.management.agent/sun.management.jmxremote +# # @build TestLogger RmiSslNoKeyStoreTest # @run shell/timeout=300 RmiSslNoKeyStoreTest.sh @@ -42,7 +40,7 @@ generatePropertyPasswordFiles `ls ${TESTSRC}/*_ssltest*.in` rm -rf ${TESTCLASSES}/ssl mkdir -p ${TESTCLASSES}/ssl -cp -rf ${TESTSRC}/ssl/*store ${TESTCLASSES}/ssl +cp -rf ${TESTSRC}/ssl/*store ${TESTCLASSES}/ssl chmod -R 777 ${TESTCLASSES}/ssl DEBUGOPTIONS="" diff --git a/jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java b/jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java index 749d927adeb..176f1546f2d 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java +++ b/jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java @@ -25,14 +25,14 @@ import java.io.IOException; /** * @test - * @library /lib/testlibrary * @bug 6557093 - * @modules jdk.management.agent - * @build jdk.testlibrary.* Dummy AbstractFilePermissionTest * @summary Check SSL config file permission for out-of-the-box management - * @run main/timeout=300 SSLConfigFilePermissionTest - * * @author Taras Ledkov + * + * @library /lib/testlibrary + * + * @build jdk.testlibrary.* Dummy AbstractFilePermissionTest + * @run main/timeout=300 SSLConfigFilePermissionTest */ public class SSLConfigFilePermissionTest extends AbstractFilePermissionTest { diff --git a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java index 4bdc9496e84..90c2e27d071 100644 --- a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java +++ b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 @@ -53,13 +53,17 @@ import jdk.internal.agent.ConnectorAddressLink; /** * @test * @bug 7110104 - * @library /lib/testlibrary - * @modules jdk.management.agent/jdk.internal.agent - * @build jdk.testlibrary.* JMXStartStopTest PortAllocator TestApp ManagementAgentJcmd - * @run main/othervm/timeout=600 -XX:+UsePerfData JMXStartStopTest + * @key randomness intermittent * @summary Makes sure that enabling/disabling the management agent through JCMD * achieves the desired results - * @key randomness intermittent + * + * @library /lib/testlibrary + * @modules java.management + * java.rmi + * jdk.management.agent/jdk.internal.agent + * + * @build jdk.testlibrary.* JMXStartStopTest PortAllocator TestApp ManagementAgentJcmd + * @run main/othervm/timeout=600 -XX:+UsePerfData JMXStartStopTest */ public class JMXStartStopTest { private static final String TEST_APP_NAME = "TestApp"; @@ -342,7 +346,7 @@ public class JMXStartStopTest { throw new BindException("Starting process failed due to " + "the requested port not being available"); } - pid = p.getPid(); + pid = p.pid(); } catch (TimeoutException e) { if (p != null) { p.destroy(); diff --git a/jdk/test/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java b/jdk/test/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java index 2fb8ef6fe4c..14298f8e568 100644 --- a/jdk/test/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java +++ b/jdk/test/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java @@ -38,11 +38,12 @@ import jdk.testlibrary.ProcessTools; /** * @test * @bug 8075926 + * @key intermittent * @summary Makes sure that the current management agent status is reflected * in the related performance counters. - * @key intermittent + * * @library /lib/testlibrary - * @modules jdk.management.agent/jdk.internal.agent + * * @build jdk.testlibrary.* PortAllocator TestApp ManagementAgentJcmd * @run testng/othervm -XX:+UsePerfData JMXStatusPerfCountersTest */ diff --git a/jdk/test/sun/management/jmxremote/startstop/JMXStatusTest.java b/jdk/test/sun/management/jmxremote/startstop/JMXStatusTest.java index 31c96c3407e..ddc951bf081 100644 --- a/jdk/test/sun/management/jmxremote/startstop/JMXStatusTest.java +++ b/jdk/test/sun/management/jmxremote/startstop/JMXStatusTest.java @@ -37,8 +37,9 @@ import jdk.testlibrary.ProcessTools; * @summary Performs a sanity test for the ManagementAgent.status diagnostic command. * Management agent may be disabled, started (only local connections) and started. * The test asserts that the expected text is being printed. + * * @library /lib/testlibrary - * @modules jdk.management.agent/jdk.internal.agent + * * @build jdk.testlibrary.* PortAllocator TestApp ManagementAgentJcmd * JMXStatusTest JMXStatus1Test JMXStatus2Test * @run testng/othervm -XX:+UsePerfData JMXStatus1Test diff --git a/jdk/test/sun/net/idn/NFS4StringPrep.java b/jdk/test/sun/net/idn/NFS4StringPrep.java index fc488f3957c..e1dbe925407 100644 --- a/jdk/test/sun/net/idn/NFS4StringPrep.java +++ b/jdk/test/sun/net/idn/NFS4StringPrep.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/net/www/http/HttpClient/B8025710.java b/jdk/test/sun/net/www/http/HttpClient/B8025710.java index 8074c761188..0c3a9344459 100644 --- a/jdk/test/sun/net/www/http/HttpClient/B8025710.java +++ b/jdk/test/sun/net/www/http/HttpClient/B8025710.java @@ -37,6 +37,7 @@ import javax.net.ssl.*; * @test * @bug 8025710 * @summary Proxied https connection reuse by HttpClient can send CONNECT to the server + * @run main/othervm B8025710 */ public class B8025710 { diff --git a/jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java b/jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java index 022e140cd3d..88526fb1652 100644 --- a/jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java +++ b/jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java @@ -25,6 +25,7 @@ * @test * @bug 5045306 6356004 6993490 * @modules java.base/sun.net.www + * java.management * @library ../../httptest/ * @build HttpCallback TestHttpServer HttpTransaction * @run main/othervm B5045306 diff --git a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java index 72bae7e4ed5..fbdad8c8953 100644 --- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java +++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java @@ -31,9 +31,9 @@ * @bug 6216082 * @summary Redirect problem with HttpsURLConnection using a proxy * @modules java.base/sun.net.www - * @library .. + * @library .. /lib/testlibrary * @build HttpCallback TestHttpsServer ClosedChannelList - * HttpTransaction TunnelProxy + * HttpTransaction TunnelProxy jdk.testlibrary.NetworkConfiguration * @key intermittent * @run main/othervm B6216082 */ @@ -43,6 +43,8 @@ import java.net.*; import javax.net.ssl.*; import java.util.*; +import jdk.testlibrary.NetworkConfiguration; + public class B6216082 { static SimpleHttpTransaction httpTrans; static TestHttpsServer server; @@ -118,21 +120,17 @@ public class B6216082 { } public static InetAddress getNonLoAddress() throws Exception { - NetworkInterface loNIC = NetworkInterface.getByInetAddress(InetAddress.getByName("localhost")); - Enumeration nics = NetworkInterface.getNetworkInterfaces(); - while (nics.hasMoreElements()) { - NetworkInterface nic = nics.nextElement(); - if (!nic.getName().equalsIgnoreCase(loNIC.getName())) { - Enumeration addrs = nic.getInetAddresses(); - while (addrs.hasMoreElements()) { - InetAddress addr = addrs.nextElement(); - if (!addr.isLoopbackAddress()) - return addr; - } - } - } + InetAddress lh = InetAddress.getByName("localhost"); + NetworkInterface loNIC = NetworkInterface.getByInetAddress(lh); - return null; + NetworkConfiguration nc = NetworkConfiguration.probe(); + Optional oaddr = nc.interfaces() + .filter(nif -> !nif.getName().equalsIgnoreCase(loNIC.getName())) + .flatMap(nif -> nc.addresses(nif)) + .filter(a -> !a.isLoopbackAddress()) + .findFirst(); + + return oaddr.orElseGet(() -> null); } public static void startHttpServer() throws IOException { diff --git a/jdk/test/sun/net/www/protocol/jar/MultiReleaseJarURLConnection.java b/jdk/test/sun/net/www/protocol/jar/MultiReleaseJarURLConnection.java index 44464015f34..45fce656440 100644 --- a/jdk/test/sun/net/www/protocol/jar/MultiReleaseJarURLConnection.java +++ b/jdk/test/sun/net/www/protocol/jar/MultiReleaseJarURLConnection.java @@ -26,8 +26,7 @@ * @bug 8132734 8144062 8159785 * @summary Test that URL connections to multi-release jars can be runtime versioned * @library /lib/testlibrary/java/util/jar - * @modules java.compiler - * jdk.compiler + * @modules jdk.compiler * jdk.httpserver * jdk.jartool * @build Compiler JarBuilder CreateMultiReleaseTestJars SimpleHttpServer diff --git a/jdk/test/sun/net/www/protocol/jrt/java.policy b/jdk/test/sun/net/www/protocol/jrt/java.policy index 5df300aa905..276543b8208 100644 --- a/jdk/test/sun/net/www/protocol/jrt/java.policy +++ b/jdk/test/sun/net/www/protocol/jrt/java.policy @@ -1,3 +1,3 @@ grant { - permission java.io.FilePermission "${java.home}/-", "read"; + permission java.lang.RuntimePermission "accessSystemModules"; }; diff --git a/jdk/test/sun/nio/cs/CheckHistoricalNames.java b/jdk/test/sun/nio/cs/CheckHistoricalNames.java index 0b1ee60f301..be73b062d08 100644 --- a/jdk/test/sun/nio/cs/CheckHistoricalNames.java +++ b/jdk/test/sun/nio/cs/CheckHistoricalNames.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4513767 4961027 6217210 - @summary Checks canonical names match between old and (NIO) core charsets + * @bug 4513767 4961027 6217210 + * @summary Checks canonical names match between old and (NIO) core charsets + * @modules jdk.charsets */ import java.io.InputStreamReader; import java.io.IOException; diff --git a/jdk/test/sun/nio/cs/EuroConverter.java b/jdk/test/sun/nio/cs/EuroConverter.java index ea4b6562b0d..5e86a3f4899 100644 --- a/jdk/test/sun/nio/cs/EuroConverter.java +++ b/jdk/test/sun/nio/cs/EuroConverter.java @@ -27,6 +27,7 @@ * @summary Make sure the euro converters, which are derived from * existing converters, only differ from their parents at the expected * code point. + * @modules jdk.charsets */ import java.text.*; diff --git a/jdk/test/sun/nio/cs/HWKatakanaMS932EncodeTest.java b/jdk/test/sun/nio/cs/HWKatakanaMS932EncodeTest.java index 5d06aa4ba0f..76373a9f101 100644 --- a/jdk/test/sun/nio/cs/HWKatakanaMS932EncodeTest.java +++ b/jdk/test/sun/nio/cs/HWKatakanaMS932EncodeTest.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4715330 - @summary Check MS932/windows-31j encoding (char->byte) for halfwidth katakana chars + * @bug 4715330 + * @summary Check MS932/windows-31j encoding (char->byte) for halfwidth katakana chars + * @modules jdk.charsets */ /* diff --git a/jdk/test/sun/nio/cs/ISCIITest.java b/jdk/test/sun/nio/cs/ISCIITest.java index 7897fc3875c..1a7fa4ae016 100644 --- a/jdk/test/sun/nio/cs/ISCIITest.java +++ b/jdk/test/sun/nio/cs/ISCIITest.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4328178 - @summary Performs baseline and regression test on the ISCII91 charset + * @bug 4328178 + * @summary Performs baseline and regression test on the ISCII91 charset + * @modules jdk.charsets */ import java.io.*; diff --git a/jdk/test/sun/nio/cs/JISAutoDetectTest.java b/jdk/test/sun/nio/cs/JISAutoDetectTest.java index f527dac5016..a00095bb254 100644 --- a/jdk/test/sun/nio/cs/JISAutoDetectTest.java +++ b/jdk/test/sun/nio/cs/JISAutoDetectTest.java @@ -26,6 +26,7 @@ * @bug 4087261 4184592 * @summary Make sure to determine Japanese text encoding as correctly * as possible. + * @modules jdk.charsets */ import java.nio.charset.*; diff --git a/jdk/test/sun/nio/cs/NIOJISAutoDetectTest.java b/jdk/test/sun/nio/cs/NIOJISAutoDetectTest.java index 42a418027f3..9071e00eacb 100644 --- a/jdk/test/sun/nio/cs/NIOJISAutoDetectTest.java +++ b/jdk/test/sun/nio/cs/NIOJISAutoDetectTest.java @@ -25,6 +25,7 @@ * @test * @bug 4831163 5053096 5056440 8022224 * @summary NIO charset basic verification of JISAutodetect decoder + * @modules jdk.charsets * @author Martin Buchholz */ diff --git a/jdk/test/sun/nio/cs/SJISCanEncode.java b/jdk/test/sun/nio/cs/SJISCanEncode.java index 219f9d14e71..01292cafea2 100644 --- a/jdk/test/sun/nio/cs/SJISCanEncode.java +++ b/jdk/test/sun/nio/cs/SJISCanEncode.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4913702 - @summary validates canEncode(char c) method for sun.nio.cs.Shift_JIS + * @bug 4913702 + * @summary validates canEncode(char c) method for sun.nio.cs.Shift_JIS + * @modules jdk.charsets */ diff --git a/jdk/test/sun/nio/cs/StreamEncoderClose.java b/jdk/test/sun/nio/cs/StreamEncoderClose.java index e40d6d300e5..68b4111fb47 100644 --- a/jdk/test/sun/nio/cs/StreamEncoderClose.java +++ b/jdk/test/sun/nio/cs/StreamEncoderClose.java @@ -22,10 +22,11 @@ */ /* @test - @bug 5005426 - @summary Check if StreamEncoder close() method works correctly from - error recovery after the underneath OutputStream failed to - close the first time. + * @bug 5005426 + * @summary Check if StreamEncoder close() method works correctly from + * error recovery after the underneath OutputStream failed to + * close the first time. + * @modules jdk.charsets */ import java.io.*; diff --git a/jdk/test/sun/nio/cs/Test6254467.java b/jdk/test/sun/nio/cs/Test6254467.java index 5ade998bae0..39f0b212d69 100644 --- a/jdk/test/sun/nio/cs/Test6254467.java +++ b/jdk/test/sun/nio/cs/Test6254467.java @@ -22,9 +22,10 @@ */ /* @test - @bug 6254467 - @summary Checks if Charset.forName() accepts legal IANA alias names - for charset IBM037. + * @bug 6254467 + * @summary Checks if Charset.forName() accepts legal IANA alias names + * for charset IBM037. + * @modules jdk.charsets */ import java.nio.charset.Charset; diff --git a/jdk/test/sun/nio/cs/TestConverterDroppedCharacters.java b/jdk/test/sun/nio/cs/TestConverterDroppedCharacters.java index 2e1171a5ef2..660ef436940 100644 --- a/jdk/test/sun/nio/cs/TestConverterDroppedCharacters.java +++ b/jdk/test/sun/nio/cs/TestConverterDroppedCharacters.java @@ -22,11 +22,12 @@ */ /* @test - @bug 4122961 - @summary Verify that converters don't drop characters on buffer boundaries + * @bug 4122961 + * @summary Verify that converters don't drop characters on buffer boundaries - This is a slightly modified version of the attachment supplied with the - bug report. + * This is a slightly modified version of the attachment supplied with the + * bug report. + * @modules jdk.charsets */ import java.io.*; diff --git a/jdk/test/sun/nio/cs/TestCp834_SBCS.java b/jdk/test/sun/nio/cs/TestCp834_SBCS.java index d935b84d3ef..539594eb36b 100644 --- a/jdk/test/sun/nio/cs/TestCp834_SBCS.java +++ b/jdk/test/sun/nio/cs/TestCp834_SBCS.java @@ -22,8 +22,9 @@ */ /* @test - @bug 6379808 - @summary Check all Cp933 SBCS characters are not supported in Cp834 + * @bug 6379808 + * @summary Check all Cp933 SBCS characters are not supported in Cp834 + * @modules jdk.charsets */ import java.io.*; diff --git a/jdk/test/sun/nio/cs/TestCp93xSISO.java b/jdk/test/sun/nio/cs/TestCp93xSISO.java index 6ff0441611d..1f4162daaec 100644 --- a/jdk/test/sun/nio/cs/TestCp93xSISO.java +++ b/jdk/test/sun/nio/cs/TestCp93xSISO.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4429358 - @summary Remove illegal SI/SO char to byte mappings + * @bug 4429358 + * @summary Remove illegal SI/SO char to byte mappings + * @modules jdk.charsets */ public class TestCp93xSISO { diff --git a/jdk/test/sun/nio/cs/TestIBM1364.java b/jdk/test/sun/nio/cs/TestIBM1364.java index 78912bdf519..7f4291cad7d 100644 --- a/jdk/test/sun/nio/cs/TestIBM1364.java +++ b/jdk/test/sun/nio/cs/TestIBM1364.java @@ -23,8 +23,9 @@ /* @test - @bug 6803681 - @summary Test IBM1364 + * @bug 6803681 + * @summary Test IBM1364 + * @modules jdk.charsets */ import java.util.Arrays; diff --git a/jdk/test/sun/nio/cs/TestIBMBugs.java b/jdk/test/sun/nio/cs/TestIBMBugs.java index 9b551c8c15d..e870bbb735b 100644 --- a/jdk/test/sun/nio/cs/TestIBMBugs.java +++ b/jdk/test/sun/nio/cs/TestIBMBugs.java @@ -22,8 +22,9 @@ */ /* @test - @bug 6371437 6371422 6371416 6371619 5058184 6371431 6639450 6569191 6577466 - @summary Check if the problems reported in above bugs have been fixed + * @bug 6371437 6371422 6371416 6371619 5058184 6371431 6639450 6569191 6577466 + * @summary Check if the problems reported in above bugs have been fixed + * @modules jdk.charsets */ import java.io.*; diff --git a/jdk/test/sun/nio/cs/TestISO2022CNDecoder.java b/jdk/test/sun/nio/cs/TestISO2022CNDecoder.java index 50375795fee..ac63aeca038 100644 --- a/jdk/test/sun/nio/cs/TestISO2022CNDecoder.java +++ b/jdk/test/sun/nio/cs/TestISO2022CNDecoder.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4779029 4924625 6392664 6730652 - @summary Test decoding of various permutations of valid ISO-2022-CN byte sequences + * @bug 4779029 4924625 6392664 6730652 + * @summary Test decoding of various permutations of valid ISO-2022-CN byte sequences + * @modules jdk.charsets */ /* diff --git a/jdk/test/sun/nio/cs/TestISO2022JP.java b/jdk/test/sun/nio/cs/TestISO2022JP.java index fa533ef7a82..79ceb7fca8b 100644 --- a/jdk/test/sun/nio/cs/TestISO2022JP.java +++ b/jdk/test/sun/nio/cs/TestISO2022JP.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4626545 4879522 4913711 4119445 8042125 - @summary Check full coverage encode/decode for ISO-2022-JP + * @bug 4626545 4879522 4913711 4119445 8042125 + * @summary Check full coverage encode/decode for ISO-2022-JP + * @modules jdk.charsets */ /* diff --git a/jdk/test/sun/nio/cs/TestISO2022JPEncoder.java b/jdk/test/sun/nio/cs/TestISO2022JPEncoder.java index f0d550cd586..b9d557cf3d4 100644 --- a/jdk/test/sun/nio/cs/TestISO2022JPEncoder.java +++ b/jdk/test/sun/nio/cs/TestISO2022JPEncoder.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4251646 - @summary Make sure buffer boundary convert works + * @bug 4251646 + * @summary Make sure buffer boundary convert works + * @modules jdk.charsets */ import java.nio.*; diff --git a/jdk/test/sun/nio/cs/TestISO2022JPSubBytes.java b/jdk/test/sun/nio/cs/TestISO2022JPSubBytes.java index 31815307e7e..672ac03dd78 100644 --- a/jdk/test/sun/nio/cs/TestISO2022JPSubBytes.java +++ b/jdk/test/sun/nio/cs/TestISO2022JPSubBytes.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4262894 6233303 - @summary Testing substitute character Escape sequence + * @bug 4262894 6233303 + * @summary Testing substitute character Escape sequence + * @modules jdk.charsets */ import java.nio.*; diff --git a/jdk/test/sun/nio/cs/TestIllegalISO2022Esc.java b/jdk/test/sun/nio/cs/TestIllegalISO2022Esc.java index d5a06637bc9..98e13059b1d 100644 --- a/jdk/test/sun/nio/cs/TestIllegalISO2022Esc.java +++ b/jdk/test/sun/nio/cs/TestIllegalISO2022Esc.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4429369 - @summary ISO2022CN and ISO2022KR converters throw exception + * @bug 4429369 + * @summary ISO2022CN and ISO2022KR converters throw exception + * @modules jdk.charsets */ import java.io.*; diff --git a/jdk/test/sun/nio/cs/TestIllegalSJIS.java b/jdk/test/sun/nio/cs/TestIllegalSJIS.java index 29aa8a85b53..c1c7f0906a0 100644 --- a/jdk/test/sun/nio/cs/TestIllegalSJIS.java +++ b/jdk/test/sun/nio/cs/TestIllegalSJIS.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4117820 - @summary Verify that SJIS.Decoder works properly for values between 0xA000 and 0xA0FC + * @bug 4117820 + * @summary Verify that SJIS.Decoder works properly for values between 0xA000 and 0xA0FC + * @modules jdk.charsets */ import java.nio.charset.*; diff --git a/jdk/test/sun/nio/cs/TestMS5022X.java b/jdk/test/sun/nio/cs/TestMS5022X.java index bb1ee4f8d9b..fe9c273afce 100644 --- a/jdk/test/sun/nio/cs/TestMS5022X.java +++ b/jdk/test/sun/nio/cs/TestMS5022X.java @@ -22,9 +22,10 @@ */ /* @test - @bug 6173388 6319716 - @summary Check full coverage encode/decode for Microsoft - ISO2022_JP variants MS50220, MS50221 and MSISO2022JP + * @bug 6173388 6319716 + * @summary Check full coverage encode/decode for Microsoft + * ISO2022_JP variants MS50220, MS50221 and MSISO2022JP + * @modules jdk.charsets */ import java.io.*; diff --git a/jdk/test/sun/nio/cs/TestSJIS0213.java b/jdk/test/sun/nio/cs/TestSJIS0213.java index d8ef138793f..da6b0e198bc 100644 --- a/jdk/test/sun/nio/cs/TestSJIS0213.java +++ b/jdk/test/sun/nio/cs/TestSJIS0213.java @@ -22,8 +22,9 @@ */ /* @test - @bug 6529796 6710199 - @summary Test SJIS/MS932_0213 charsets + * @bug 6529796 6710199 + * @summary Test SJIS/MS932_0213 charsets + * @modules jdk.charsets */ import java.util.Arrays; diff --git a/jdk/test/sun/nio/cs/TestSJIS0213_SM.java b/jdk/test/sun/nio/cs/TestSJIS0213_SM.java index 753cfb784f0..fe85d4e4635 100644 --- a/jdk/test/sun/nio/cs/TestSJIS0213_SM.java +++ b/jdk/test/sun/nio/cs/TestSJIS0213_SM.java @@ -22,8 +22,9 @@ */ /* @test - @bug 7152690 - @summary Initialize SJIS_0213 charset with SecurityManager enabled + * @bug 7152690 + * @summary Initialize SJIS_0213 charset with SecurityManager enabled + * @modules jdk.charsets */ public class TestSJIS0213_SM { public static void main(String[] args) throws Throwable { diff --git a/jdk/test/sun/nio/cs/TestTrailingEscapesISO2022JP.java b/jdk/test/sun/nio/cs/TestTrailingEscapesISO2022JP.java index 51758e79ac5..c927a1748b5 100644 --- a/jdk/test/sun/nio/cs/TestTrailingEscapesISO2022JP.java +++ b/jdk/test/sun/nio/cs/TestTrailingEscapesISO2022JP.java @@ -22,8 +22,9 @@ */ /* @test - @bug 4697605 4741233 - @summary Check decoder behaves correctly in ISO2022_JP + * @bug 4697605 4741233 + * @summary Check decoder behaves correctly in ISO2022_JP + * @modules jdk.charsets */ import java.io.*; diff --git a/jdk/test/sun/rmi/rmic/newrmic/equivalence/run.sh b/jdk/test/sun/rmi/rmic/newrmic/equivalence/run.sh index 27c86041414..a2e84bc116b 100644 --- a/jdk/test/sun/rmi/rmic/newrmic/equivalence/run.sh +++ b/jdk/test/sun/rmi/rmic/newrmic/equivalence/run.sh @@ -22,6 +22,8 @@ # # @test +# @ignore test is disabled, while further discussion on the rmic -Xnew feature +# takes place (c.f JDK-8146299, JDK-8145980). # @bug 4911536 # @summary This test verifies that the new implementation of rmic # generates equivalent classes as the old implementation, for a set diff --git a/jdk/test/sun/security/ec/SignedObjectChain.java b/jdk/test/sun/security/ec/SignedObjectChain.java index 6e93053a776..7c320c0ba27 100644 --- a/jdk/test/sun/security/ec/SignedObjectChain.java +++ b/jdk/test/sun/security/ec/SignedObjectChain.java @@ -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 @@ -24,8 +24,9 @@ /* * @test * @bug 8050374 - * @compile ../../../java/security/SignedObject/Chain.java * @summary Verify a chain of signed objects + * @compile ../../../java/security/SignedObject/Chain.java + * @run main SignedObjectChain */ public class SignedObjectChain { diff --git a/jdk/test/sun/security/ec/TestEC.java b/jdk/test/sun/security/ec/TestEC.java index eb4202ad510..c8345d4ce38 100644 --- a/jdk/test/sun/security/ec/TestEC.java +++ b/jdk/test/sun/security/ec/TestEC.java @@ -35,7 +35,6 @@ * @library ../pkcs11/sslecc * @library ../../../java/security/testlibrary * @modules jdk.crypto.cryptoki/sun.security.pkcs11.wrapper - * @compile --add-modules jdk.crypto.cryptoki TestEC.java * @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1" TestEC * @run main/othervm/java.security.policy=TestEC.policy -Djdk.tls.namedGroups="secp256r1,sect193r1" TestEC */ diff --git a/jdk/test/sun/security/krb5/auto/BadKdc.java b/jdk/test/sun/security/krb5/auto/BadKdc.java deleted file mode 100644 index d1ace1a4157..00000000000 --- a/jdk/test/sun/security/krb5/auto/BadKdc.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; -import java.net.BindException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import javax.security.auth.login.LoginException; -import sun.security.krb5.Asn1Exception; -import sun.security.krb5.Config; - -public class BadKdc { - - // Matches the krb5 debug output: - // >>> KDCCommunication: kdc=kdc.rabbit.hole UDP:14319, timeout=2000,... - // ^ kdc# ^ timeout - static final Pattern re = Pattern.compile( - ">>> KDCCommunication: kdc=kdc.rabbit.hole UDP:(\\d)...., " + - "timeout=(\\d+),"); - - // Ratio for timeout values of all timeout tests. Not final so that - // each test can choose their own. - static float ratio = 2f; - - static void setRatio(float ratio) { - BadKdc.ratio = ratio; - } - - static float getRatio() { - return ratio; - } - - // Gets real timeout value. This method is called when writing krb5.conf - static int toReal(int from) { - return (int)(from * ratio + .5); - } - - // De-ratio a millisecond value to second - static int toSymbolicSec(int from) { - return (int)(from / ratio / 1000f + 0.5); - } - - /* - * There are several cases this test fails: - * - * 1. The random selected port is used by another process. No good way to - * prevent this happening, coz krb5.conf must be written before KDC starts. - * There are two different outcomes: - * - * a. Cannot start the KDC. A BindException thrown. - * b. When trying to access a non-existing KDC, a response is received! - * Most likely a Asn1Exception thrown - * - * 2. Even if a KDC is started, and more than 20 seconds pass by, a timeout - * can still happens for the first UDP request. In fact, the KDC did not - * received it at all. This happens on almost all platforms, especially - * solaris-i586 and solaris-x64. - * - * To avoid them: - * - * 1. Catch those exceptions and ignore - * - * 2. a. Make the timeout longer? useless - * b. Read the output carefully, if there is a timeout, it's OK. - * Just make sure the retries times and KDCs are correct. - * This is tough. - * c. Feed the KDC a UDP packet first. The current "solution". - */ - public static void go(String... expected) - throws Exception { - try { - go0(expected); - } catch (BindException be) { - System.out.println("The random port is used by another process"); - } catch (LoginException le) { - Throwable cause = le.getCause(); - if (cause instanceof Asn1Exception) { - System.out.println("Bad packet possibly from another process"); - return; - } - throw le; - } - } - - public static void go0(String... expected) - throws Exception { - System.setProperty("sun.security.krb5.debug", "true"); - - // Idle UDP sockets will trigger a SocketTimeoutException, without it, - // a PortUnreachableException will be thrown. - DatagramSocket d1 = null, d2 = null, d3 = null; - - // Make sure KDCs' ports starts with 1 and 2 and 3, - // useful for checking debug output. - int p1 = 10000 + new java.util.Random().nextInt(10000); - int p2 = 20000 + new java.util.Random().nextInt(10000); - int p3 = 30000 + new java.util.Random().nextInt(10000); - - FileWriter fw = new FileWriter("alternative-krb5.conf"); - - fw.write("[libdefaults]\n" + - "default_realm = " + OneKDC.REALM + "\n" + - "kdc_timeout = " + toReal(2000) + "\n"); - fw.write("[realms]\n" + OneKDC.REALM + " = {\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p3 + "\n" + - "}\n"); - - fw.close(); - System.setProperty("java.security.krb5.conf", "alternative-krb5.conf"); - Config.refresh(); - - // Turn on k3 only - d1 = new DatagramSocket(p1); - d2 = new DatagramSocket(p2); - KDC k3 = on(p3); - - test(expected[0]); - test(expected[1]); - Config.refresh(); - test(expected[2]); - - k3.terminate(); // shutdown k3 - d3 = new DatagramSocket(p3); - - d2.close(); - on(p2); // k2 is on - - test(expected[3]); - d1.close(); - on(p1); // k1 and k2 is on - test(expected[4]); - - d3.close(); - } - - private static KDC on(int p) throws Exception { - KDC k = new KDC(OneKDC.REALM, OneKDC.KDCHOST, p, true); - k.addPrincipal(OneKDC.USER, OneKDC.PASS); - k.addPrincipalRandKey("krbtgt/" + OneKDC.REALM); - // Feed a packet to newly started KDC to warm it up - System.err.println("-------- IGNORE THIS ERROR MESSAGE --------"); - new DatagramSocket().send( - new DatagramPacket("Hello".getBytes(), 5, - InetAddress.getByName(OneKDC.KDCHOST), p)); - return k; - } - - private static void test(String expected) throws Exception { - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - System.out.println("----------------- TEST -----------------"); - try { - test0(bo, expected); - } catch (Exception e) { - System.out.println("----------------- ERROR -----------------"); - System.out.println(new String(bo.toByteArray())); - System.out.println("--------------- ERROR END ---------------"); - throw e; - } - } - - /** - * One round of test for max_retries and timeout. - * @param expected the expected kdc# timeout kdc# timeout... - */ - private static void test0(ByteArrayOutputStream bo, String expected) - throws Exception { - PrintStream oldout = System.out; - boolean failed = false; - System.setOut(new PrintStream(bo)); - try { - Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false); - } catch (Exception e) { - failed = true; - } finally { - System.setOut(oldout); - } - - String[] lines = new String(bo.toByteArray()).split("\n"); - StringBuilder sb = new StringBuilder(); - for (String line: lines) { - Matcher m = re.matcher(line); - if (m.find()) { - System.out.println(line); - sb.append(m.group(1)) - .append(toSymbolicSec(Integer.parseInt(m.group(2)))); - } - } - if (failed) sb.append('-'); - - String output = sb.toString(); - System.out.println("Expected: " + expected + ", actual " + output); - if (!output.matches(expected)) { - throw new Exception("Does not match"); - } - } -} diff --git a/jdk/test/sun/security/krb5/auto/BadKdc1.java b/jdk/test/sun/security/krb5/auto/BadKdc1.java deleted file mode 100644 index 0ac77b60868..00000000000 --- a/jdk/test/sun/security/krb5/auto/BadKdc1.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc1 - * @summary krb5 should not try to access unavailable kdc too often - */ - -import java.security.Security; - -public class BadKdc1 { - - public static void main(String[] args) - throws Exception { - - // 5 sec is default timeout for tryLess - if (BadKdc.getRatio() > 2.5) { - Security.setProperty("krb5.kdc.bad.policy", - "tryLess:1," + BadKdc.toReal(2000)); - } else { - Security.setProperty("krb5.kdc.bad.policy", "tryLess"); - } - - BadKdc.go( - "121212222222(32){1,3}1222(32){1,3}", // 1 2 - // The above line means try kdc1 for 2 seconds then kdc1 - // for 2 seconds... finally kdc3 for 2 seconds. - "1222(32){1,3}1222(32){1,3}", // 1 2 - // refresh - "121212222222(32){1,3}1222(32){1,3}", // 1 2 - // k3 off k2 on - "(122212(22){1,3}|1222323232-)", // 1 - // k1 on - "(12(12){1,3}|122212|122232-)" // empty - ); - } -} diff --git a/jdk/test/sun/security/krb5/auto/Basic.java b/jdk/test/sun/security/krb5/auto/Basic.java index e61928b4bf8..6216bf3a170 100644 --- a/jdk/test/sun/security/krb5/auto/Basic.java +++ b/jdk/test/sun/security/krb5/auto/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 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 @@ -23,13 +23,10 @@ /* * @test - * @bug 7152176 8164437 + * @bug 7152176 * @summary More krb5 tests * @compile -XDignore.symbol.file Basic.java - * @run main/othervm - * Basic jdk.security.jgss - * @run main/othervm --limit-modules java.security.jgss,jdk.security.auth - * Basic java.security.jgss + * @run main/othervm Basic */ import sun.security.jgss.GSSUtil; @@ -63,12 +60,5 @@ public class Basic { b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); Context.handshake(s2, b); - - // Bonus test for 8164437. - String moduleName = c.x().getClass().getModule().getName(); - if (!moduleName.equals(args[0])) { - throw new Exception("Expected: " + args[0] - + ". Actual: " + moduleName); - } } } diff --git a/jdk/test/sun/security/krb5/auto/BogusKDC.java b/jdk/test/sun/security/krb5/auto/BogusKDC.java index c5f9d9e366c..6184f5ab88d 100644 --- a/jdk/test/sun/security/krb5/auto/BogusKDC.java +++ b/jdk/test/sun/security/krb5/auto/BogusKDC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/security/krb5/auto/CommMatcher.java b/jdk/test/sun/security/krb5/auto/CommMatcher.java deleted file mode 100644 index 1cfe25a5d4d..00000000000 --- a/jdk/test/sun/security/krb5/auto/CommMatcher.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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. - */ - -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Matches the krb5 debug output: - * >>> KDCCommunication: kdc=host UDP:11555, timeout=100,Attempt =1, #bytes=138 - * - * Example: - * CommMatcher cm = new CommMatcher(); - * cm.addPort(12345).addPort(23456); - * for (String line : debugOutput) { - * if (cm.match(line)) { - * println("KDC: %c, %s, Timeout: %d\n", - * cm.kdc(), cm.protocol(), cm.timeout()); - * } - * } - */ -public class CommMatcher { - - static final Pattern re = Pattern.compile( - ">>> KDCCommunication: kdc=\\S+ (TCP|UDP):(\\d+), " + - "timeout=(\\d+),Attempt\\s*=(\\d+)"); - - List kdcPorts = new ArrayList<>(); - Matcher matcher; - - /** - * Add KDC ports one by one. The 1st KDC will be 'a' in {@link #kdc()}, - * 2nd is 'b', etc, etc. - */ - public CommMatcher addPort(int port) { - if (port > 0) { - kdcPorts.add(port); - } else { - kdcPorts.clear(); - } - return this; - } - - public boolean match(String line) { - matcher = re.matcher(line); - return matcher.find(); - } - - public String protocol() { - return matcher.group(1); - } - - public char kdc() { - int port = Integer.parseInt(matcher.group(2)); - return (char)(kdcPorts.indexOf(port) + 'a'); - } - - public int timeout() { - return BadKdc.toSymbolicSec(Integer.parseInt(matcher.group(3))); - } - - public int attempt() { - return Integer.parseInt(matcher.group(4)); - } -} diff --git a/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java b/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java index 55f2d1a4d15..1447d81cdd2 100644 --- a/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java +++ b/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -24,6 +24,16 @@ /* * @test * @bug 6578647 6829283 8171340 + * @modules java.base/sun.security.util + * java.security.jgss/sun.security.krb5.internal:+open + * java.security.jgss/sun.security.jgss + * java.security.jgss/sun.security.krb5:+open + * java.security.jgss/sun.security.krb5.internal.ccache + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * jdk.security.auth + * jdk.security.jgss + * jdk.httpserver * @run main/othervm HttpNegotiateServer * @summary Undefined requesting URL in java.net.Authenticator * .getPasswordAuthentication() diff --git a/jdk/test/sun/security/krb5/auto/KdcPolicy.java b/jdk/test/sun/security/krb5/auto/KdcPolicy.java index f4501a5779b..6eca564b96f 100644 --- a/jdk/test/sun/security/krb5/auto/KdcPolicy.java +++ b/jdk/test/sun/security/krb5/auto/KdcPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -38,7 +38,7 @@ import sun.security.krb5.Config; /* * @test - * @bug 8164656 + * @bug 8164656 8181461 * @run main/othervm KdcPolicy udp * @run main/othervm KdcPolicy tcp * @summary krb5.kdc.bad.policy test @@ -110,7 +110,7 @@ public class KdcPolicy { // It is possible the real KDC cannot fulfil the request // in 3s, so it might fail (either 1st time or 2nd time). writeConf(1, 3000, p1, p3); - test("a3000c3000c3000|a3000c3000-|a3000c3000c3000-"); + test("a3000c3000c3000|a3000c3000-|a3000c3000c3000a3000-"); // If a test case won't use a real KDC, it can be sped up. writeConf(3, 5, p1, p2); diff --git a/jdk/test/sun/security/krb5/auto/MaxRetries.java b/jdk/test/sun/security/krb5/auto/MaxRetries.java deleted file mode 100644 index 973873a6524..00000000000 --- a/jdk/test/sun/security/krb5/auto/MaxRetries.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright (c) 2010, 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. - */ - -/* - * @test - * @bug 6844193 - * @compile -XDignore.symbol.file MaxRetries.java - * @run main/othervm/timeout=300 MaxRetries - * @summary support max_retries in krb5.conf - */ - -import javax.security.auth.login.LoginException; -import java.io.*; -import java.net.DatagramSocket; -import java.security.Security; - -public class MaxRetries { - - static int idlePort = -1; - static CommMatcher cm = new CommMatcher(); - - public static void main(String[] args) - throws Exception { - - System.setProperty("sun.security.krb5.debug", "true"); - OneKDC kdc = new OneKDC(null).writeJAASConf(); - - // An idle UDP socket to prevent PortUnreachableException - DatagramSocket ds = new DatagramSocket(); - idlePort = ds.getLocalPort(); - - cm.addPort(idlePort); - cm.addPort(kdc.getPort()); - - System.setProperty("java.security.krb5.conf", "alternative-krb5.conf"); - - Security.setProperty("krb5.kdc.bad.policy", "trylast"); - - // We always make the real timeout to be 1 second - BadKdc.setRatio(0.25f); - rewriteMaxRetries(4); - - // Explanation: In this case, max_retries=4 and timeout=4s. - // For AS-REQ without preauth, we will see 4 4s timeout on kdc#1 - // ("a4" repeat 4 times), and one 4s timeout on kdc#2 ("b4"). For - // AS-REQ with preauth, one 4s timeout on kdc#2 (second "b4"). - // we tolerate 4 real timeout on kdc#2, so make it "(b4){2,6}". - test1("a4a4a4a4b4b4", "a4a4a4a4(b4){2,6}"); - test1("b4b4", "(b4){2,6}"); - - BadKdc.setRatio(1f); - rewriteMaxRetries(1); - // Explanation: Since max_retries=1 only, we could fail in 1st or 2nd - // AS-REQ to kdc#2. - String actual = test1("a1b1b1", "(a1b1b1|a1b1x|a1b1b1x)"); - if (actual.endsWith("x")) { - // If 1st attempt fails, all bads are back available - test1("a1b1b1", "(a1b1b1|a1b1x|a1b1b1x)"); - } else { - test1("b1b1", "(b1b1|b1x|b1b1x)"); - } - - BadKdc.setRatio(0.2f); - rewriteMaxRetries(-1); - test1("a5a5a5b5b5", "a5a5a5(b5){2,4}"); - test1("b5b5", "(b5){2,4}"); - - BadKdc.setRatio(0.25f); - Security.setProperty("krb5.kdc.bad.policy", - "tryless:1,1000"); - rewriteMaxRetries(4); - test1("a4a4a4a4b4a4b4", "a4a4a4a4(b4){1,3}a4(b4){1,3}"); - test1("a4b4a4b4", "a4(b4){1,3}a4(b4){1,3}"); - - BadKdc.setRatio(1f); - rewriteMaxRetries(1); - actual = test1("a1b1a1b1", "(a1b1|a1b1x|a1b1a1b1|a1b1a1b1x)"); - if (actual.endsWith("x")) { - test1("a1b1a1b1", "(a1b1|a1b1x|a1b1a1b1|a1b1a1b1x)"); - } else { - test1("a1b1a1b1", "(a1b1|a1b1x|a1b1a1b1|a1b1a1b1x)"); - } - - BadKdc.setRatio(.2f); - rewriteMaxRetries(-1); - test1("a5a5a5b5a5b5", "a5a5a5(b5){1,2}a5(b5){1,2}"); - test1("a5b5a5b5", "a5(b5){1,2}a5(b5){1,2}"); - - BadKdc.setRatio(1f); - rewriteMaxRetries(2); - if (BadKdc.toReal(2000) > 1000) { - // Explanation: if timeout is longer than 1s in tryLess, - // we will see "a1" at 2nd kdc#1 access - test1("a2a2b2a1b2", "a2a2(b2){1,2}a1(b2){1,2}"); - } else { - test1("a2a2b2a2b2", "a2a2(b2){1,2}a2(b2){1,2}"); - } - - BadKdc.setRatio(1f); - - rewriteUdpPrefLimit(-1, -1); // default, no limit - test2("UDP"); - - rewriteUdpPrefLimit(10, -1); // global rules - test2("TCP"); - - rewriteUdpPrefLimit(10, 10000); // realm rules - test2("UDP"); - - rewriteUdpPrefLimit(10000, 10); // realm rules - test2("TCP"); - - ds.close(); - } - - /** - * One round of test for max_retries and timeout. - * - * @param exact the expected exact match, where no timeout - * happens for real KDCs - * @param relaxed the expected relaxed match, where some timeout - * could happen for real KDCs - * @return the actual result - */ - private static String test1(String exact, String relaxed) throws Exception { - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - PrintStream oldout = System.out; - System.setOut(new PrintStream(bo)); - boolean failed = false; - long start = System.nanoTime(); - try { - Context c = Context.fromJAAS("client"); - } catch (LoginException e) { - failed = true; - } - System.setOut(oldout); - - String[] lines = new String(bo.toByteArray()).split("\n"); - System.out.println("----------------- TEST (" + exact - + ") -----------------"); - - // Result, a series of timeout + kdc# - StringBuilder sb = new StringBuilder(); - for (String line: lines) { - if (cm.match(line)) { - System.out.println(line); - sb.append(cm.kdc()).append(cm.timeout()); - } - } - if (failed) { - sb.append("x"); - } - System.out.println("Time: " + (System.nanoTime() - start) / 1000000000d); - String actual = sb.toString(); - System.out.println("Actual: " + actual); - if (actual.equals(exact)) { - System.out.println("Exact match: " + exact); - } else if (actual.matches(relaxed)) { - System.out.println("!!!! Tolerant match: " + relaxed); - } else { - throw new Exception("Match neither " + exact + " nor " + relaxed); - } - return actual; - } - - /** - * One round of test for udp_preference_limit. - * @param proto the expected protocol used - */ - private static void test2(String proto) throws Exception { - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - PrintStream oldout = System.out; - System.setOut(new PrintStream(bo)); - Context c = Context.fromJAAS("client"); - System.setOut(oldout); - - int count = 2; - String[] lines = new String(bo.toByteArray()).split("\n"); - System.out.println("----------------- TEST -----------------"); - for (String line: lines) { - if (cm.match(line)) { - System.out.println(line); - count--; - if (!cm.protocol().equals(proto)) { - throw new Exception("Wrong protocol value"); - } - } - } - if (count != 0) { - throw new Exception("Retry count is " + count + " less"); - } - } - - /** - * Set udp_preference_limit for global and realm - */ - private static void rewriteUdpPrefLimit(int global, int realm) - throws Exception { - BufferedReader fr = new BufferedReader(new FileReader(OneKDC.KRB5_CONF)); - FileWriter fw = new FileWriter("alternative-krb5.conf"); - while (true) { - String s = fr.readLine(); - if (s == null) { - break; - } - if (s.startsWith("[realms]")) { - // Reconfig global setting - fw.write("kdc_timeout = 5000\n"); - if (global != -1) { - fw.write("udp_preference_limit = " + global + "\n"); - } - } else if (s.trim().startsWith("kdc = ")) { - if (realm != -1) { - // Reconfig for realm - fw.write(" udp_preference_limit = " + realm + "\n"); - } - } - fw.write(s + "\n"); - } - fr.close(); - fw.close(); - sun.security.krb5.Config.refresh(); - } - - /** - * Set max_retries and timeout value for realm. The global value is always - * 3 and 5000. - * - * @param value max_retries and timeout/1000 for a realm, -1 means none. - */ - private static void rewriteMaxRetries(int value) throws Exception { - BufferedReader fr = new BufferedReader(new FileReader(OneKDC.KRB5_CONF)); - FileWriter fw = new FileWriter("alternative-krb5.conf"); - while (true) { - String s = fr.readLine(); - if (s == null) { - break; - } - if (s.startsWith("[realms]")) { - // Reconfig global setting - fw.write("max_retries = 3\n"); - fw.write("kdc_timeout = " + BadKdc.toReal(5000) + "\n"); - } else if (s.trim().startsWith("kdc = ")) { - if (value != -1) { - // Reconfig for realm - fw.write(" max_retries = " + value + "\n"); - fw.write(" kdc_timeout = " + BadKdc.toReal(value*1000) + "\n"); - } - // Add a bad KDC as the first candidate - fw.write(" kdc = localhost:" + idlePort + "\n"); - } - fw.write(s + "\n"); - } - fr.close(); - fw.close(); - sun.security.krb5.Config.refresh(); - } -} diff --git a/jdk/test/sun/security/krb5/auto/ModuleName.java b/jdk/test/sun/security/krb5/auto/ModuleName.java new file mode 100644 index 00000000000..499d35ac3a1 --- /dev/null +++ b/jdk/test/sun/security/krb5/auto/ModuleName.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8164437 + * @summary GSSContext type when jdk.security.jgss is not available + * @library /test/lib + * @compile -XDignore.symbol.file ModuleName.java + * @run main/othervm ModuleName + */ + +import jdk.test.lib.process.ProcessTools; +import sun.security.jgss.GSSUtil; + +import java.util.List; +import java.util.stream.Stream; + +public class ModuleName { + + public static void main(String[] args) throws Throwable { + + if (args.length == 0) { // jtreg launched here + + // With all modules + test("jdk.security.jgss"); + + // With limited modules + List cmd = ProcessTools.createJavaProcessBuilder().command(); + Stream.of(jdk.internal.misc.VM.getRuntimeArguments()) + .filter(arg -> arg.startsWith("--add-exports=") || + arg.startsWith("--add-opens=")) + .forEach(cmd::add); + cmd.addAll(List.of( + "-Dtest.src=" + System.getProperty("test.src"), + "--add-modules", + "java.base,java.security.jgss,jdk.security.auth", + "--limit-modules", + "java.security.jgss,jdk.security.auth", + "ModuleName", + "launched-limited")); + ProcessTools.executeCommand(cmd.toArray(new String[cmd.size()])) + .shouldHaveExitValue(0); + } else { // Launched by ProcessTools above, with limited modules. + test("java.security.jgss"); + } + } + + static void test(String expected) throws Exception { + + new OneKDC(null).writeJAASConf(); + + Context c = Context.fromJAAS("client"); + c.startAsClient(OneKDC.SERVER, GSSUtil.GSS_KRB5_MECH_OID); + + String moduleName = c.x().getClass().getModule().getName(); + if (!moduleName.equals(expected)) { + throw new Exception("Expected: " + expected + + ". Actual: " + moduleName); + } + } +} diff --git a/jdk/test/sun/security/krb5/auto/NoAddresses.java b/jdk/test/sun/security/krb5/auto/NoAddresses.java index 298dc03cb59..be49fda2700 100644 --- a/jdk/test/sun/security/krb5/auto/NoAddresses.java +++ b/jdk/test/sun/security/krb5/auto/NoAddresses.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/jdk/test/sun/security/krb5/auto/Renew.java b/jdk/test/sun/security/krb5/auto/Renew.java index 41e3fcde6b5..92f4108b544 100644 --- a/jdk/test/sun/security/krb5/auto/Renew.java +++ b/jdk/test/sun/security/krb5/auto/Renew.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 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 @@ -26,12 +26,6 @@ * @bug 8058290 * @summary JAAS Krb5LoginModule has suspect ticket-renewal logic, * relies on clockskew grace - * @modules java.base/sun.security.util - * java.security.jgss/sun.security.krb5:+open - * java.security.jgss/sun.security.krb5.internal:+open - * java.security.jgss/sun.security.krb5.internal.ccache - * java.security.jgss/sun.security.krb5.internal.crypto - * java.security.jgss/sun.security.krb5.internal.ktab * @compile -XDignore.symbol.file Renew.java * @run main/othervm Renew 1 * @run main/othervm Renew 2 diff --git a/jdk/test/sun/security/krb5/auto/Renewal.java b/jdk/test/sun/security/krb5/auto/Renewal.java index 3ddf84f7cc6..7ae2378ad9a 100644 --- a/jdk/test/sun/security/krb5/auto/Renewal.java +++ b/jdk/test/sun/security/krb5/auto/Renewal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/jdk/test/sun/security/krb5/auto/SSLwithPerms.java b/jdk/test/sun/security/krb5/auto/SSLwithPerms.java index 8569d3580d0..0779c3dcb44 100644 --- a/jdk/test/sun/security/krb5/auto/SSLwithPerms.java +++ b/jdk/test/sun/security/krb5/auto/SSLwithPerms.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/security/krb5/auto/TEST.properties b/jdk/test/sun/security/krb5/auto/TEST.properties index 777c20d8233..fa23fd6fb0d 100644 --- a/jdk/test/sun/security/krb5/auto/TEST.properties +++ b/jdk/test/sun/security/krb5/auto/TEST.properties @@ -6,4 +6,6 @@ modules java.base/jdk.internal.misc \ java.security.jgss/sun.security.krb5.internal.ccache \ java.security.jgss/sun.security.krb5.internal.rcache \ java.security.jgss/sun.security.krb5.internal.crypto \ - java.security.jgss/sun.security.krb5.internal.ktab + java.security.jgss/sun.security.krb5.internal.ktab \ + jdk.security.auth \ + jdk.security.jgss diff --git a/jdk/test/sun/security/krb5/auto/TcpTimeout.java b/jdk/test/sun/security/krb5/auto/TcpTimeout.java deleted file mode 100644 index 45699fbe5ad..00000000000 --- a/jdk/test/sun/security/krb5/auto/TcpTimeout.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6952519 - * @compile -XDignore.symbol.file TcpTimeout.java - * @run main/othervm TcpTimeout - * @summary kdc_timeout is not being honoured when using TCP - */ - -import java.io.*; -import java.net.ServerSocket; -import sun.security.krb5.Config; - -public class TcpTimeout { - public static void main(String[] args) - throws Exception { - - // Set debug to grab debug output like ">>> KDCCommunication" - System.setProperty("sun.security.krb5.debug", "true"); - - // Called before new ServerSocket on p1 and p2 to make sure - // customized nameservice is used - KDC k = new KDC(OneKDC.REALM, OneKDC.KDCHOST, 0, true); - int p3 = k.getPort(); - k.addPrincipal(OneKDC.USER, OneKDC.PASS); - k.addPrincipalRandKey("krbtgt/" + OneKDC.REALM); - - // Start two listener that does not communicate, simulate timeout - ServerSocket ss1 = null; - ServerSocket ss2 = null; - - try { - ss1 = new ServerSocket(0); - ss2 = new ServerSocket(0); - int p1 = ss1.getLocalPort(); - int p2 = ss2.getLocalPort(); - - FileWriter fw = new FileWriter("alternative-krb5.conf"); - - fw.write("[libdefaults]\n" + - "udp_preference_limit = 1\n" + - "max_retries = 2\n" + - "default_realm = " + OneKDC.REALM + "\n" + - "kdc_timeout = " + BadKdc.toReal(5000) + "\n"); - fw.write("[realms]\n" + OneKDC.REALM + " = {\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p3 + "\n" + - "}\n"); - - fw.close(); - System.setProperty("java.security.krb5.conf", - "alternative-krb5.conf"); - Config.refresh(); - - System.out.println("Ports opened on " + p1 + ", " + p2 + ", " + p3); - - // The correct behavior should be: - // 5 sec on p1, 5 sec on p1, fail - // 5 sec on p2, 5 sec on p2, fail - // p3 ok, p3 ok again for preauth. - int count = 6; - - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - PrintStream oldout = System.out; - System.setOut(new PrintStream(bo)); - Context c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false); - System.setOut(oldout); - - String[] lines = new String(bo.toByteArray()).split("\n"); - for (String line: lines) { - if (line.startsWith(">>> KDCCommunication")) { - System.out.println(line); - count--; - } - } - if (count != 0) { - throw new Exception("Retry count is " + count + " less"); - } - } finally { - if (ss1 != null) ss1.close(); - if (ss2 != null) ss2.close(); - } - } -} diff --git a/jdk/test/sun/security/krb5/auto/UdpTcp.java b/jdk/test/sun/security/krb5/auto/UdpTcp.java deleted file mode 100644 index ae54b793527..00000000000 --- a/jdk/test/sun/security/krb5/auto/UdpTcp.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 4966382 8039132 - * @run main/othervm UdpTcp UDP - * @run main/othervm UdpTcp TCP - * @summary udp or tcp - */ - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import sun.security.krb5.Config; - -public class UdpTcp { - - public static void main(String[] args) - throws Exception { - - System.setProperty("sun.security.krb5.debug", "true"); - - OneKDC kdc = new OneKDC(null); - kdc.writeJAASConf(); - - // Two styles of kdc_timeout setting. One global, one realm-specific. - if (args[0].equals("UDP")) { - KDC.saveConfig(OneKDC.KRB5_CONF, kdc, - "kdc_timeout = 10s"); - } else { - kdc.addConf("kdc_timeout = 10s"); - KDC.saveConfig(OneKDC.KRB5_CONF, kdc, - "udp_preference_limit = 1"); - } - Config.refresh(); - - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - PrintStream oldout = System.out; - System.setOut(new PrintStream(bo)); - Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false); - System.setOut(oldout); - - for (String line: new String(bo.toByteArray()).split("\n")) { - if (line.contains(">>> KDCCommunication")) { - if (!line.contains(args[0]) || !line.contains("timeout=10000")) { - throw new Exception("No " + args[0] + " in: " + line); - } - } - } - } -} diff --git a/jdk/test/sun/security/krb5/canonicalize/Test.java b/jdk/test/sun/security/krb5/canonicalize/Test.java index 62c44de9984..fe1146211c8 100644 --- a/jdk/test/sun/security/krb5/canonicalize/Test.java +++ b/jdk/test/sun/security/krb5/canonicalize/Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 diff --git a/jdk/test/sun/security/mscapi/CastError.java b/jdk/test/sun/security/mscapi/CastError.java index 5f9721af817..c2c7ecdf58d 100644 --- a/jdk/test/sun/security/mscapi/CastError.java +++ b/jdk/test/sun/security/mscapi/CastError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java b/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java index ba1cff444ec..28a2242d72b 100644 --- a/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java +++ b/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -26,7 +26,6 @@ * @bug 6318171 6931562 * @requires os.family == "windows" * @modules jdk.crypto.mscapi/sun.security.mscapi - * @compile --add-modules jdk.crypto.mscapi IsSunMSCAPIAvailable.java * @run main/othervm IsSunMSCAPIAvailable */ diff --git a/jdk/test/sun/security/mscapi/PrngSlow.java b/jdk/test/sun/security/mscapi/PrngSlow.java index b8abd93a834..23d4ae9d0f7 100644 --- a/jdk/test/sun/security/mscapi/PrngSlow.java +++ b/jdk/test/sun/security/mscapi/PrngSlow.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/security/mscapi/PublicKeyInterop.sh b/jdk/test/sun/security/mscapi/PublicKeyInterop.sh index fc1550f9ab4..aab5ab87844 100644 --- a/jdk/test/sun/security/mscapi/PublicKeyInterop.sh +++ b/jdk/test/sun/security/mscapi/PublicKeyInterop.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/security/mscapi/SignedObjectChain.java b/jdk/test/sun/security/mscapi/SignedObjectChain.java index d436612798f..0c5a4098510 100644 --- a/jdk/test/sun/security/mscapi/SignedObjectChain.java +++ b/jdk/test/sun/security/mscapi/SignedObjectChain.java @@ -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 @@ -24,9 +24,10 @@ /* * @test * @bug 8050374 + * @summary Verify a chain of signed objects * @compile ../../../java/security/SignedObject/Chain.java * @requires os.family == "windows" - * @summary Verify a chain of signed objects + * @run main SignedObjectChain */ public class SignedObjectChain { diff --git a/jdk/test/sun/security/pkcs/pkcs8/PKCS8Test.java b/jdk/test/sun/security/pkcs/pkcs8/PKCS8Test.java index 9c3f40b900a..6e893cd03ce 100644 --- a/jdk/test/sun/security/pkcs/pkcs8/PKCS8Test.java +++ b/jdk/test/sun/security/pkcs/pkcs8/PKCS8Test.java @@ -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 @@ -195,12 +195,12 @@ public class PKCS8Test { public static void main(String[] args) throws IOException, InvalidKeyException { - BigInteger p = BigInteger.valueOf(1); - BigInteger q = BigInteger.valueOf(2); - BigInteger g = BigInteger.valueOf(3); - BigInteger x = BigInteger.valueOf(4); + BigInteger x = BigInteger.valueOf(1); + BigInteger p = BigInteger.valueOf(2); + BigInteger q = BigInteger.valueOf(3); + BigInteger g = BigInteger.valueOf(4); - DSAPrivateKey priv = new DSAPrivateKey(p, q, g, x); + DSAPrivateKey priv = new DSAPrivateKey(x, p, q, g); byte[] encodedKey = priv.getEncoded(); byte[] expectedBytes = new byte[EXPECTED.length]; diff --git a/jdk/test/sun/security/pkcs/pkcs8/TestLeadingZeros.java b/jdk/test/sun/security/pkcs/pkcs8/TestLeadingZeros.java new file mode 100644 index 00000000000..92a20450157 --- /dev/null +++ b/jdk/test/sun/security/pkcs/pkcs8/TestLeadingZeros.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8175251 + * @summary ensure that PKCS8-encoded private key with leading 0s + * can be loaded. + * @run main TestLeadingZeros + */ + +import java.io.*; +import java.security.*; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.interfaces.*; +import java.util.*; + +public class TestLeadingZeros { + + // The following test vectors are various BER encoded PKCS8 bytes + static final String[] PKCS8_ENCODINGS = { + // first is the original one from PKCS8Test + "301e020100301206052b0e03020c30090201020201030201040403020101A000", + // changed original to version w/ 1 leading 0 + "301f02020000301206052b0e03020c30090201020201030201040403020101A000", + // changed original to P w/ 1 leading 0 + "301f020100301306052b0e03020c300a020200020201030201040403020101A000", + // changed original to X w/ 2 leading 0s + "3020020100301206052b0e03020c300902010202010302010404050203000001A000" + }; + + public static void main(String[] argv) throws Exception { + KeyFactory factory = KeyFactory.getInstance("DSA", "SUN"); + + for (String encodings : PKCS8_ENCODINGS) { + byte[] encodingBytes = hexToBytes(encodings); + PKCS8EncodedKeySpec encodedKeySpec = + new PKCS8EncodedKeySpec(encodingBytes); + DSAPrivateKey privKey2 = (DSAPrivateKey) + factory.generatePrivate(encodedKeySpec); + System.out.println("key: " + privKey2); + } + System.out.println("Test Passed"); + } + + private static byte[] hexToBytes(String hex) { + if (hex.length() % 2 != 0) { + throw new RuntimeException("Input should be even length"); + } + int size = hex.length() / 2; + byte[] result = new byte[size]; + for (int i = 0; i < size; i++) { + int hi = Character.digit(hex.charAt(2 * i), 16); + int lo = Character.digit(hex.charAt(2 * i + 1), 16); + if ((hi == -1) || (lo == -1)) { + throw new RuntimeException("Input should be hexadecimal"); + } + result[i] = (byte) (16 * hi + lo); + } + return result; + } +} diff --git a/jdk/test/sun/security/pkcs11/ec/TestCurves.java b/jdk/test/sun/security/pkcs11/ec/TestCurves.java index 6cf32c4c9d9..a610d6b27c0 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestCurves.java +++ b/jdk/test/sun/security/pkcs11/ec/TestCurves.java @@ -28,7 +28,6 @@ * @author Andreas Sterbenz * @library .. * @modules jdk.crypto.cryptoki/sun.security.pkcs11.wrapper - * @compile --add-modules jdk.crypto.cryptoki TestCurves.java * @run main/othervm TestCurves * @run main/othervm TestCurves sm * @key randomness diff --git a/jdk/test/sun/security/pkcs12/ProbeLargeKeystore.java b/jdk/test/sun/security/pkcs12/ProbeLargeKeystore.java new file mode 100644 index 00000000000..33450e9170a --- /dev/null +++ b/jdk/test/sun/security/pkcs12/ProbeLargeKeystore.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8181978 + * @summary Test automatic keystore type detection for a large PKCS12 keystore + */ + +import java.io.*; +import java.security.*; +import java.security.cert.*; +import java.security.cert.Certificate; + +public class ProbeLargeKeystore { + + private static final String DIR = System.getProperty("test.src", "."); + private static final String CERT = DIR + "/trusted.pem"; + private static final String ALIAS = "test-entry-"; + private static final int COUNT = 100; + private static final String KEYSTORE = "test-keystore.p12"; + private static final char[] PASSWORD = "passphrase".toCharArray(); + + public static final void main(String[] args) throws Exception { + + // Create a large PKCS12 keystore + + new File(KEYSTORE).delete(); + KeyStore keystore = KeyStore.getInstance("PKCS12"); + keystore.load(null, null); + Certificate cert = loadCertificate(CERT); + + for (int i = 0; i < COUNT; i++) { + keystore.setCertificateEntry(ALIAS + i, cert); + } + + try (FileOutputStream out = new FileOutputStream(KEYSTORE)) { + keystore.store(out, PASSWORD); + } + + // Test the automatic keystore type detection mechanism for PKCS12 + + KeyStore largeKeystore = + KeyStore.getInstance(new File(KEYSTORE), PASSWORD); + + if (largeKeystore.size() != COUNT) { + throw new Exception("Error detecting a large PKCS12 keystore"); + } + + new File(KEYSTORE).delete(); + System.out.println("OK"); + } + + private static final Certificate loadCertificate(String certFile) + throws Exception { + try (FileInputStream certStream = new FileInputStream(certFile)) { + CertificateFactory factory = + CertificateFactory.getInstance("X.509"); + return factory.generateCertificate(certStream); + } + } +} diff --git a/jdk/test/sun/security/pkcs12/StoreSecretKeyTest.java b/jdk/test/sun/security/pkcs12/StoreSecretKeyTest.java index 1c3337dbe30..9677b65aac8 100644 --- a/jdk/test/sun/security/pkcs12/StoreSecretKeyTest.java +++ b/jdk/test/sun/security/pkcs12/StoreSecretKeyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/security/provider/PolicyFile/Modules.java b/jdk/test/sun/security/provider/PolicyFile/Modules.java index fa7d33a8fd9..a3f1e8216de 100644 --- a/jdk/test/sun/security/provider/PolicyFile/Modules.java +++ b/jdk/test/sun/security/provider/PolicyFile/Modules.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -39,7 +39,6 @@ * jdk.net * jdk.security.auth * jdk.security.jgss - * @compile --add-modules=java.xml.ws,java.smartcardio Modules.java * @run main/othervm/java.security.policy==modules.policy Modules */ diff --git a/jdk/test/sun/security/provider/SeedGenerator/SeedGeneratorChoice.java b/jdk/test/sun/security/provider/SeedGenerator/SeedGeneratorChoice.java index 93889729058..581dc54216b 100644 --- a/jdk/test/sun/security/provider/SeedGenerator/SeedGeneratorChoice.java +++ b/jdk/test/sun/security/provider/SeedGenerator/SeedGeneratorChoice.java @@ -1,6 +1,5 @@ /* - * Copyright (c) 2010, 2011, 2016, Oracle and/or its affiliates. All rights - * reserved. + * Copyright (c) 2010, 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 diff --git a/jdk/test/sun/security/rsa/SignedObjectChain.java b/jdk/test/sun/security/rsa/SignedObjectChain.java index 7bda7cd4df6..cc41d179b1f 100644 --- a/jdk/test/sun/security/rsa/SignedObjectChain.java +++ b/jdk/test/sun/security/rsa/SignedObjectChain.java @@ -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 @@ -24,8 +24,9 @@ /* * @test * @bug 8050374 - * @compile ../../../java/security/SignedObject/Chain.java * @summary Verify a chain of signed objects + * @compile ../../../java/security/SignedObject/Chain.java + * @run main SignedObjectChain */ public class SignedObjectChain { diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/JSSEClient.java b/jdk/test/sun/security/ssl/CertPathRestrictions/JSSEClient.java new file mode 100644 index 00000000000..e2e1b47d506 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/JSSEClient.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetSocketAddress; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; + +/* + * A SSL socket client. + */ +public class JSSEClient { + + public static void main(String[] args) throws Exception { + System.out.println("Client: arguments=" + String.join("; ", args)); + + int port = Integer.valueOf(args[0]); + String[] trustNames = args[1].split(TLSRestrictions.DELIMITER); + String[] certNames = args[2].split(TLSRestrictions.DELIMITER); + String constraint = args[3]; + + TLSRestrictions.setConstraint("Client", constraint); + + SSLContext context = TLSRestrictions.createSSLContext( + trustNames, certNames); + SSLSocketFactory socketFactory = context.getSocketFactory(); + try (SSLSocket socket = (SSLSocket) socketFactory.createSocket()) { + socket.connect(new InetSocketAddress("localhost", port), + TLSRestrictions.TIMEOUT); + socket.setSoTimeout(TLSRestrictions.TIMEOUT); + System.out.println("Client: connected"); + + InputStream sslIS = socket.getInputStream(); + OutputStream sslOS = socket.getOutputStream(); + sslOS.write('C'); + sslOS.flush(); + sslIS.read(); + System.out.println("Client: finished"); + } catch (Exception e) { + throw new RuntimeException("Client: failed.", e); + } + } +} diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/JSSEServer.java b/jdk/test/sun/security/ssl/CertPathRestrictions/JSSEServer.java new file mode 100644 index 00000000000..338329163ea --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/JSSEServer.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.InputStream; +import java.io.OutputStream; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; + +/* + * A SSL socket server. + */ +public class JSSEServer { + + private SSLServerSocket server = null; + + private Exception exception = null; + + public JSSEServer(SSLContext context, String constraint, + boolean needClientAuth) throws Exception { + TLSRestrictions.setConstraint("Server", constraint); + + SSLServerSocketFactory serverFactory = context.getServerSocketFactory(); + server = (SSLServerSocket) serverFactory.createServerSocket(0); + server.setSoTimeout(TLSRestrictions.TIMEOUT); + server.setNeedClientAuth(needClientAuth); // for dual authentication + System.out.println("Server: port=" + getPort()); + } + + public void start() { + new Thread(new Runnable() { + + @Override + public void run() { + try { + System.out.println("Server: started"); + try (SSLSocket socket = (SSLSocket) server.accept()) { + socket.setSoTimeout(TLSRestrictions.TIMEOUT); + InputStream sslIS = socket.getInputStream(); + OutputStream sslOS = socket.getOutputStream(); + sslIS.read(); + sslOS.write('S'); + sslOS.flush(); + System.out.println("Server: finished"); + } + } catch (Exception e) { + e.printStackTrace(System.out); + exception = e; + } + } + }).start(); + } + + public int getPort() { + return server.getLocalPort(); + } + + public Exception getException() { + return exception; + } +} diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java b/jdk/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java new file mode 100644 index 00000000000..2a6ffb2d135 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java @@ -0,0 +1,542 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.SocketTimeoutException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.security.KeyFactory; +import java.security.KeyStore; +import java.security.PrivateKey; +import java.security.Security; +import java.security.cert.Certificate; +import java.security.cert.CertificateFactory; +import java.security.spec.PKCS8EncodedKeySpec; +import java.util.Base64; +import java.util.stream.Collectors; + +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLHandshakeException; +import javax.net.ssl.TrustManagerFactory; + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +/* + * @test + * @summary Verify the restrictions for certificate path on JSSE with custom trust store. + * @library /test/lib + * @compile JSSEClient.java + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions DEFAULT + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions C1 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions S1 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions C2 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions S2 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions C3 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions S3 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions C4 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions S4 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions C5 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions S5 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions C6 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions S6 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions C7 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions S7 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions C8 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions S8 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions C9 + * @run main/othervm -Djava.security.debug=certpath TLSRestrictions S9 + */ +public class TLSRestrictions { + + private static final String TEST_CLASSES = System.getProperty("test.classes"); + private static final char[] PASSWORD = "".toCharArray(); + private static final String CERT_DIR = System.getProperty("cert.dir", + System.getProperty("test.src") + "/certs"); + + static final String PROP = "jdk.certpath.disabledAlgorithms"; + static final String NOSHA1 = "MD2, MD5"; + private static final String TLSSERVER = "SHA1 usage TLSServer"; + private static final String TLSCLIENT = "SHA1 usage TLSClient"; + static final String JDKCATLSSERVER = "SHA1 jdkCA & usage TLSServer"; + static final String JDKCATLSCLIENT = "SHA1 jdkCA & usage TLSClient"; + + // This is a space holder in command arguments, and stands for none certificate. + static final String NONE_CERT = "NONE_CERT"; + + static final String DELIMITER = ","; + static final int TIMEOUT = 30000; + + // It checks if java.security contains constraint "SHA1 jdkCA & usage TLSServer" + // for jdk.certpath.disabledAlgorithms by default. + private static void checkDefaultConstraint() { + System.out.println( + "Case: Checks the default value of jdk.certpath.disabledAlgorithms"); + if (!Security.getProperty(PROP).contains(JDKCATLSSERVER)) { + throw new RuntimeException(String.format( + "%s doesn't contain constraint \"%s\", the real value is \"%s\".", + PROP, JDKCATLSSERVER, Security.getProperty(PROP))); + } + } + + /* + * This method creates trust store and key store with specified certificates + * respectively. And then it creates SSL context with the stores. + * If trustNames contains NONE_CERT only, it does not create a custom trust + * store, but the default one in JDK. + * + * @param trustNames Trust anchors, which are used to create custom trust store. + * If null, no custom trust store is created and the default + * trust store in JDK is used. + * @param certNames Certificate chain, which is used to create key store. + * It cannot be null. + */ + static SSLContext createSSLContext(String[] trustNames, + String[] certNames) throws Exception { + CertificateFactory certFactory = CertificateFactory.getInstance("X.509"); + + TrustManagerFactory tmf = null; + if (trustNames != null && trustNames.length > 0 + && !trustNames[0].equals(NONE_CERT)) { + KeyStore trustStore = KeyStore.getInstance("JKS"); + trustStore.load(null, null); + for (int i = 0; i < trustNames.length; i++) { + try (InputStream is = new ByteArrayInputStream( + loadCert(trustNames[i]).getBytes())) { + Certificate trustCert = certFactory.generateCertificate(is); + trustStore.setCertificateEntry("trustCert-" + i, trustCert); + } + } + + tmf = TrustManagerFactory.getInstance("PKIX"); + tmf.init(trustStore); + } + + Certificate[] certChain = new Certificate[certNames.length]; + for (int i = 0; i < certNames.length; i++) { + try (InputStream is = new ByteArrayInputStream( + loadCert(certNames[i]).getBytes())) { + Certificate cert = certFactory.generateCertificate(is); + certChain[i] = cert; + } + } + + PKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec( + Base64.getMimeDecoder().decode(loadPrivKey(certNames[0]))); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PrivateKey privKey = keyFactory.generatePrivate(privKeySpec); + + KeyStore keyStore = KeyStore.getInstance("JKS"); + keyStore.load(null, null); + keyStore.setKeyEntry("keyCert", privKey, PASSWORD, certChain); + + KeyManagerFactory kmf = KeyManagerFactory.getInstance("NewSunX509"); + kmf.init(keyStore, PASSWORD); + + SSLContext context = SSLContext.getInstance("TLS"); + context.init(kmf.getKeyManagers(), + tmf == null ? null : tmf.getTrustManagers(), null); + return context; + } + + /* + * This method sets jdk.certpath.disabledAlgorithms, and then retrieves + * and prints its value. + */ + static void setConstraint(String side, String constraint) { + System.out.printf("%s: Old %s=%s%n", side, PROP, + Security.getProperty(PROP)); + Security.setProperty(PROP, constraint); + System.out.printf("%s: New %s=%s%n", side, PROP, + Security.getProperty(PROP)); + } + + /* + * This method is used to run a variety of cases. + * It launches a server, and then takes a client to connect the server. + * Both of server and client use the same certificates. + * + * @param trustNames Trust anchors, which are used to create custom trust store. + * If null, the default trust store in JDK is used. + * @param certNames Certificate chain, which is used to create key store. + * It cannot be null. The first certificate is regarded as + * the end entity. + * @param serverConstraint jdk.certpath.disabledAlgorithms value on server side. + * @param clientConstraint jdk.certpath.disabledAlgorithms value on client side. + * @param needClientAuth If true, server side acquires client authentication; + * otherwise, false. + * @param pass If true, the connection should be blocked; otherwise, false. + */ + static void testConstraint(String[] trustNames, String[] certNames, + String serverConstraint, String clientConstraint, + boolean needClientAuth, boolean pass) throws Exception { + String trustNameStr = trustNames == null ? "" + : String.join(DELIMITER, trustNames); + String certNameStr = certNames == null ? "" + : String.join(DELIMITER, certNames); + + System.out.printf("Case:%n" + + " trustNames=%s; certNames=%s%n" + + " serverConstraint=%s; clientConstraint=%s%n" + + " needClientAuth=%s%n" + + " pass=%s%n%n", + trustNameStr, certNameStr, + serverConstraint, clientConstraint, + needClientAuth, + pass); + + JSSEServer server = new JSSEServer( + createSSLContext(trustNames, certNames), + serverConstraint, + needClientAuth); + int port = server.getPort(); + server.start(); + + // Run client on another JVM so that its properties cannot be in conflict + // with server's. + OutputAnalyzer outputAnalyzer = ProcessTools.executeTestJvm( + "-Dcert.dir=" + CERT_DIR, + "-Djava.security.debug=certpath", + "-classpath", + TEST_CLASSES, + "JSSEClient", + port + "", + trustNameStr, + certNameStr, + clientConstraint); + int exitValue = outputAnalyzer.getExitValue(); + String clientOut = outputAnalyzer.getOutput(); + + Exception serverException = server.getException(); + if (serverException != null) { + System.out.println("Server: failed"); + } + + System.out.println("---------- Client output start ----------"); + System.out.println(clientOut); + System.out.println("---------- Client output end ----------"); + + if (serverException instanceof SocketTimeoutException + || clientOut.contains("SocketTimeoutException")) { + System.out.println("The communication gets timeout and skips the test."); + return; + } + + if (pass) { + if (serverException != null || exitValue != 0) { + throw new RuntimeException( + "Unexpected failure. Operation was blocked."); + } + } else { + if (serverException == null && exitValue == 0) { + throw new RuntimeException( + "Unexpected pass. Operation was allowed."); + } + + // The test may encounter non-SSL issues, like network problem. + if (!(serverException instanceof SSLHandshakeException + || clientOut.contains("SSLHandshakeException"))) { + throw new RuntimeException("Failure with unexpected exception."); + } + } + } + + /* + * This method is used to run a variety of cases, which don't require client + * authentication by default. + */ + static void testConstraint(String[] trustNames, String[] certNames, + String serverConstraint, String clientConstraint, boolean pass) + throws Exception { + testConstraint(trustNames, certNames, serverConstraint, clientConstraint, + false, pass); + } + + public static void main(String[] args) throws Exception { + switch (args[0]) { + // Case DEFAULT only checks one of default settings for + // jdk.certpath.disabledAlgorithms in JDK/conf/security/java.security. + case "DEFAULT": + checkDefaultConstraint(); + break; + + // Cases C1 and S1 use SHA256 root CA in trust store, + // and use SHA256 end entity in key store. + // C1 only sets constraint "SHA1 usage TLSServer" on client side; + // S1 only sets constraint "SHA1 usage TLSClient" on server side with client auth. + // The connection of the both cases should not be blocked. + case "C1": + testConstraint( + new String[] { "ROOT_CA_SHA256" }, + new String[] { "INTER_CA_SHA256-ROOT_CA_SHA256" }, + NOSHA1, + TLSSERVER, + true); + break; + case "S1": + testConstraint( + new String[] { "ROOT_CA_SHA256" }, + new String[] { "INTER_CA_SHA256-ROOT_CA_SHA256" }, + TLSCLIENT, + NOSHA1, + true, + true); + break; + + // Cases C2 and S2 use SHA256 root CA in trust store, + // and use SHA1 end entity in key store. + // C2 only sets constraint "SHA1 usage TLSServer" on client side; + // S2 only sets constraint "SHA1 usage TLSClient" on server side with client auth. + // The connection of the both cases should be blocked. + case "C2": + testConstraint( + new String[] { "ROOT_CA_SHA256" }, + new String[] { "INTER_CA_SHA1-ROOT_CA_SHA256" }, + NOSHA1, + TLSSERVER, + false); + break; + case "S2": + testConstraint( + new String[] { "ROOT_CA_SHA256" }, + new String[] { "INTER_CA_SHA1-ROOT_CA_SHA256" }, + TLSCLIENT, + NOSHA1, + true, + false); + break; + + // Cases C3 and S3 use SHA1 root CA in trust store, + // and use SHA1 end entity in key store. + // C3 only sets constraint "SHA1 usage TLSServer" on client side; + // S3 only sets constraint "SHA1 usage TLSClient" on server side with client auth. + // The connection of the both cases should be blocked. + case "C3": + testConstraint( + new String[] { "ROOT_CA_SHA1" }, + new String[] { "INTER_CA_SHA1-ROOT_CA_SHA1" }, + NOSHA1, + TLSSERVER, + false); + break; + case "S3": + testConstraint( + new String[] { "ROOT_CA_SHA1" }, + new String[] { "INTER_CA_SHA1-ROOT_CA_SHA1" }, + TLSCLIENT, + NOSHA1, + true, + false); + break; + + // Cases C4 and S4 use SHA1 root CA as trust store, + // and use SHA256 end entity in key store. + // C4 only sets constraint "SHA1 usage TLSServer" on client side; + // S4 only sets constraint "SHA1 usage TLSClient" on server side with client auth. + // The connection of the both cases should not be blocked. + case "C4": + testConstraint( + new String[] { "ROOT_CA_SHA1" }, + new String[] { "INTER_CA_SHA256-ROOT_CA_SHA1" }, + NOSHA1, + TLSSERVER, + true); + break; + case "S4": + testConstraint( + new String[] { "ROOT_CA_SHA1" }, + new String[] { "INTER_CA_SHA256-ROOT_CA_SHA1" }, + TLSCLIENT, + NOSHA1, + true, + true); + break; + + // Cases C5 and S5 use SHA1 root CA in trust store, + // and use SHA256 intermediate CA and SHA256 end entity in key store. + // C5 only sets constraint "SHA1 usage TLSServer" on client side; + // S5 only sets constraint "SHA1 usage TLSClient" on server side with client auth. + // The connection of the both cases should not be blocked. + case "C5": + testConstraint( + new String[] { "ROOT_CA_SHA1" }, + new String[] { + "END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA1", + "INTER_CA_SHA256-ROOT_CA_SHA1" }, + NOSHA1, + TLSSERVER, + true); + break; + case "S5": + testConstraint( + new String[] { "ROOT_CA_SHA1" }, + new String[] { + "END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA1", + "INTER_CA_SHA256-ROOT_CA_SHA1" }, + TLSCLIENT, + NOSHA1, + true, + true); + break; + + // Cases C6 and S6 use SHA1 root CA as trust store, + // and use SHA1 intermediate CA and SHA256 end entity in key store. + // C6 only sets constraint "SHA1 usage TLSServer" on client side; + // S6 only sets constraint "SHA1 usage TLSClient" on server side with client auth. + // The connection of the both cases should be blocked. + case "C6": + testConstraint( + new String[] { "ROOT_CA_SHA1" }, + new String[] { + "END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA1", + "INTER_CA_SHA1-ROOT_CA_SHA1" }, + NOSHA1, + TLSSERVER, + false); + break; + case "S6": + testConstraint( + new String[] { "ROOT_CA_SHA1" }, + new String[] { + "END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA1", + "INTER_CA_SHA1-ROOT_CA_SHA1" }, + TLSCLIENT, + NOSHA1, + true, + false); + break; + + // Cases C7 and S7 use SHA256 root CA in trust store, + // and use SHA256 intermediate CA and SHA1 end entity in key store. + // C7 only sets constraint "SHA1 usage TLSServer" on client side; + // S7 only sets constraint "SHA1 usage TLSClient" on server side with client auth. + // The connection of the both cases should be blocked. + case "C7": + testConstraint( + new String[] { "ROOT_CA_SHA256" }, + new String[] { + "END_ENTITY_SHA1-INTER_CA_SHA256-ROOT_CA_SHA256", + "INTER_CA_SHA256-ROOT_CA_SHA256" }, + NOSHA1, + TLSSERVER, + false); + break; + case "S7": + testConstraint( + new String[] { "ROOT_CA_SHA256" }, + new String[] { + "END_ENTITY_SHA1-INTER_CA_SHA256-ROOT_CA_SHA256", + "INTER_CA_SHA256-ROOT_CA_SHA256" }, + TLSCLIENT, + NOSHA1, + true, + false); + break; + + // Cases C8 and S8 use SHA256 root CA in trust store, + // and use SHA1 intermediate CA and SHA256 end entity in key store. + // C8 only sets constraint "SHA1 usage TLSServer" on client side; + // S8 only sets constraint "SHA1 usage TLSClient" on server side with client auth. + // The connection of the both cases should be blocked. + case "C8": + testConstraint( + new String[] { "ROOT_CA_SHA256" }, + new String[] { + "END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256", + "INTER_CA_SHA1-ROOT_CA_SHA256" }, + NOSHA1, + TLSSERVER, + false); + break; + case "S8": + testConstraint( + new String[] { "ROOT_CA_SHA256" }, + new String[] { + "END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256", + "INTER_CA_SHA1-ROOT_CA_SHA256" }, + TLSCLIENT, + NOSHA1, + true, + false); + break; + + // Cases C9 and S9 use SHA256 root CA and SHA1 intermediate CA in trust store, + // and use SHA256 end entity in key store. + // C9 only sets constraint "SHA1 usage TLSServer" on client side; + // S9 only sets constraint "SHA1 usage TLSClient" on server side with client auth. + // The connection of the both cases should not be blocked. + case "C9": + testConstraint( + new String[] { + "ROOT_CA_SHA256", + "INTER_CA_SHA1-ROOT_CA_SHA256" }, + new String[] { + "END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256" }, + NOSHA1, + TLSSERVER, + true); + break; + case "S9": + testConstraint( + new String[] { + "ROOT_CA_SHA256", + "INTER_CA_SHA1-ROOT_CA_SHA256" }, + new String[] { + "END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256" }, + TLSCLIENT, + NOSHA1, + true, + true); + break; + } + + System.out.println("Case passed"); + System.out.println("========================================"); + } + + private static String loadCert(String certName) { + try { + Path certFilePath = Paths.get(CERT_DIR, certName + ".cer"); + return String.join("\n", + Files.lines(certFilePath).filter((String line) -> { + return !line.startsWith("Certificate") + && !line.startsWith(" "); + }).collect(Collectors.toList())); + } catch (IOException e) { + throw new RuntimeException("Load certificate failed", e); + } + } + + private static String loadPrivKey(String certName) { + Path priveKeyFilePath = Paths.get(CERT_DIR, certName + "-PRIV.key"); + try { + return new String(Files.readAllBytes(priveKeyFilePath)); + } catch (IOException e) { + throw new RuntimeException("Load private key failed", e); + } + } +} diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA1-INTER_CA_SHA256-ROOT_CA_SHA256-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA1-INTER_CA_SHA256-ROOT_CA_SHA256-PRIV.key new file mode 100644 index 00000000000..8da367c7055 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA1-INTER_CA_SHA256-ROOT_CA_SHA256-PRIV.key @@ -0,0 +1,26 @@ +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCYQDZxHxNJV8dQ +I6mfJjuIZxAe5CX9GCrS3Fajh5DXIQwdcvQ4s6YdKzwFn+8dUdspdNTnS+bWjfYw +0iAbsMt6L6ewutaZf6aufh1EBYiwNOvN8C8Cx0iiE8NiBo833AYWHKhDC4qu63QR +dYwb9j+Jg8t6p0lQ64sFLDN/RJOcWlaPQbJbSNBKePQR7WOFvdJgFAdQmQjL+ND6 +PSui9QByyXQ+3nfs7ID4paUxYbCrJMh5/AJqaT04DYDEumfmURUn5+ZOIqmqvI2I +pNXN5gVzL3b8mM2WGr5dpRY5cZ1X//BQ91SNjrKNJlmKFr7nMCfAdzxIW4b/sArv +eYNE2Vy7AgMBAAECggEBAJNtkopFoiJiKnFypxyiJAG4cwbGu/ZxwX3/uLGPY3S9 +3oJhvxVs+IzEQdHchempSwTAyizS9cuLGfs6bbcConZF0Sa0NXvb/SZ4npQwm6St +Ci2Xx530JWQ0qPyyB1r65rXguBp8AaXR/8msPqkQ8YOSqKWzea4u96Zhn9g8Koe6 +AD/8FeSzJBDVbJ+C7jKX/7sKsHbYqulzLMQf0lqXFxpGW+5UJaozoQOWXnnmqU3T +0i4uaGUCXHbQM8eh3fvMFCU4UQMYVS1QOSvZJTnO5bSb8SqeQnCMnQ18ltq4sL43 +qFsEcmAjrlhNoBwslqvfY1bX9NtXyFZ8PuD8OvoFxPkCgYEAxlVfD2qcrAoOcbDe +Em9hDVPizRuzGuCHi9K2YLDrLVDNd6NF3Pk65JiTsd1fA2AZdi+ljKGEwBhNFOyk +qwmK2K4sYy7zvyV3Blmwvyo7+OaeexYF8RIw5keGlRsgHTGarzlQAlJu91UmyAmE +C/99fZbSWo9QndJ0FVR6G3ti71UCgYEAxITBJqVtNFnv4PGdc3FNsYXlRQcSWjs9 +/1lsppLQjC6HMsb6JpxYUF3D4oFiUESKe/9kZzl1H/65Cm2mYq8sj+7lug8P5tz7 +DQa91dFM02r8JLO6TitSuZfbc0XH0K450ntuQlKX581icYSGBUwQHGApespuNVlh +Mg7CmwNse88CgYAienrhEjaUTdc++nFQoR4tE/UslPEo7fmCXCoqWvc3VIGzl6Ww +iX8seD3MwOAglRc4DYZpETcjsdXMmmrx9OG3U2gSAfqLszai2vq38N6mIWlRmn2D +8BaiIbMKvsFxccsjRQJctPnnc10fj0/uSgcFyy9cYOex2AEoKBxmJKgJVQKBgA0c +HhaJ6qMXbN1AwRQ2dsxk9kqIkjzavuQN/yWNncP8RqCojX+N5oZV+v9dSkW4jNSA +0R3hw2KDB60ea38h2IMxmLm0z4bDLyxLSta8w7dG59M6+i7EzRv8eXNTMGVHeiwE +d/KMt/2Kwgp4oMgxrtF1yM6cOoXslINWYL0emVoZAoGAcEKzO8LgPJsIVjRFz3ri +0AQqiXQzYek2WAXYhlQCvBVn8in3MYcxKhjA3Og3Lym0xvZ+/8SbII9QNaidbgIH +HDreeJW4KE5EfVnDaYcxwK/9LXZXndIxrpR0YKNSvZT7DuuQtFCoxJcASxb1k9Tc +5MPT+pyPL+9v2q56ry56qas= diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA1-INTER_CA_SHA256-ROOT_CA_SHA256.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA1-INTER_CA_SHA256-ROOT_CA_SHA256.cer new file mode 100644 index 00000000000..21872d79ba9 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA1-INTER_CA_SHA256-ROOT_CA_SHA256.cer @@ -0,0 +1,81 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + e8:33:78:c7:69:9c:28:c2 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=INTER_CA_SHA256-ROOT_CA_SHA256 + Validity + Not Before: Mar 30 04:51:07 2017 GMT + Not After : Mar 28 04:51:07 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=END_ENTITY_SHA1-INTER_CA_SHA256-ROOT_CA_SHA256 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:98:40:36:71:1f:13:49:57:c7:50:23:a9:9f:26: + 3b:88:67:10:1e:e4:25:fd:18:2a:d2:dc:56:a3:87: + 90:d7:21:0c:1d:72:f4:38:b3:a6:1d:2b:3c:05:9f: + ef:1d:51:db:29:74:d4:e7:4b:e6:d6:8d:f6:30:d2: + 20:1b:b0:cb:7a:2f:a7:b0:ba:d6:99:7f:a6:ae:7e: + 1d:44:05:88:b0:34:eb:cd:f0:2f:02:c7:48:a2:13: + c3:62:06:8f:37:dc:06:16:1c:a8:43:0b:8a:ae:eb: + 74:11:75:8c:1b:f6:3f:89:83:cb:7a:a7:49:50:eb: + 8b:05:2c:33:7f:44:93:9c:5a:56:8f:41:b2:5b:48: + d0:4a:78:f4:11:ed:63:85:bd:d2:60:14:07:50:99: + 08:cb:f8:d0:fa:3d:2b:a2:f5:00:72:c9:74:3e:de: + 77:ec:ec:80:f8:a5:a5:31:61:b0:ab:24:c8:79:fc: + 02:6a:69:3d:38:0d:80:c4:ba:67:e6:51:15:27:e7: + e6:4e:22:a9:aa:bc:8d:88:a4:d5:cd:e6:05:73:2f: + 76:fc:98:cd:96:1a:be:5d:a5:16:39:71:9d:57:ff: + f0:50:f7:54:8d:8e:b2:8d:26:59:8a:16:be:e7:30: + 27:c0:77:3c:48:5b:86:ff:b0:0a:ef:79:83:44:d9: + 5c:bb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA256 + serial:84:A1:70:1D:0A:92:D3:CC + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 22:63:2a:de:80:70:92:f7:53:e4:7f:ea:01:2b:13:b3:1b:02: + 2e:10:b4:1d:b7:33:7f:6f:0d:88:46:5a:b8:db:83:95:77:e2: + db:da:2e:31:0a:85:c6:9a:75:84:ca:73:5c:be:e3:30:22:7e: + bc:60:43:49:7c:69:06:14:4a:89:e4:23:ca:25:99:85:d6:06: + 16:d5:9e:a8:fd:25:43:88:07:12:0a:7e:de:24:33:71:ab:a4: + 23:aa:4e:dc:0f:89:ef:a9:09:89:55:a1:1d:ee:48:35:ea:10: + 42:ff:98:15:2a:e8:5c:46:e0:e4:4f:4c:b9:07:e0:da:08:6f: + ce:4a:fe:98:3e:ae:c5:e5:6a:6e:50:0f:2d:39:01:55:ed:59: + 0b:65:30:54:e8:72:26:ee:9f:cf:3f:ce:6a:20:c8:87:c9:81: + bc:f8:b3:ec:77:bb:bc:5b:8c:3f:18:fd:08:76:ad:27:59:fc: + b8:74:96:0d:cd:ed:97:91:6b:95:89:3a:f3:78:de:9f:06:a6: + ce:36:01:f0:be:ae:d8:d6:c4:3d:51:8a:2a:e0:43:59:8c:b4: + eb:63:93:9d:53:72:f8:4b:a3:c7:4a:da:2e:56:33:b6:46:1b: + 45:a8:23:1b:82:de:6d:4e:e0:18:cf:9b:ba:22:68:8b:8c:de: + 6f:08:2d:bc +-----BEGIN CERTIFICATE----- +MIID/jCCAuagAwIBAgIJAOgzeMdpnCjCMA0GCSqGSIb3DQEBBQUAMG8xCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMScwJQYDVQQDDB5JTlRFUl9DQV9TSEEyNTYtUk9PVF9D +QV9TSEEyNTYwHhcNMTcwMzMwMDQ1MTA3WhcNMjcwMzI4MDQ1MTA3WjB/MQswCQYD +VQQGEwJVUzELMAkGA1UECAwCQ0ExDTALBgNVBAcMBENpdHkxDDAKBgNVBAoMA09y +ZzENMAsGA1UECwwESmF2YTE3MDUGA1UEAwwuRU5EX0VOVElUWV9TSEExLUlOVEVS +X0NBX1NIQTI1Ni1ST09UX0NBX1NIQTI1NjCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAJhANnEfE0lXx1AjqZ8mO4hnEB7kJf0YKtLcVqOHkNchDB1y9Diz +ph0rPAWf7x1R2yl01OdL5taN9jDSIBuwy3ovp7C61pl/pq5+HUQFiLA0683wLwLH +SKITw2IGjzfcBhYcqEMLiq7rdBF1jBv2P4mDy3qnSVDriwUsM39Ek5xaVo9BsltI +0Ep49BHtY4W90mAUB1CZCMv40Po9K6L1AHLJdD7ed+zsgPilpTFhsKskyHn8Ampp +PTgNgMS6Z+ZRFSfn5k4iqaq8jYik1c3mBXMvdvyYzZYavl2lFjlxnVf/8FD3VI2O +so0mWYoWvucwJ8B3PEhbhv+wCu95g0TZXLsCAwEAAaOBjDCBiTB5BgNVHSMEcjBw +oWOkYTBfMQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExDTALBgNVBAcMBENpdHkx +DDAKBgNVBAoMA09yZzENMAsGA1UECwwESmF2YTEXMBUGA1UEAwwOUk9PVF9DQV9T +SEEyNTaCCQCEoXAdCpLTzDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IB +AQAiYyregHCS91Pkf+oBKxOzGwIuELQdtzN/bw2IRlq424OVd+Lb2i4xCoXGmnWE +ynNcvuMwIn68YENJfGkGFEqJ5CPKJZmF1gYW1Z6o/SVDiAcSCn7eJDNxq6Qjqk7c +D4nvqQmJVaEd7kg16hBC/5gVKuhcRuDkT0y5B+DaCG/OSv6YPq7F5WpuUA8tOQFV +7VkLZTBU6HIm7p/PP85qIMiHyYG8+LPsd7u8W4w/GP0Idq0nWfy4dJYNze2XkWuV +iTrzeN6fBqbONgHwvq7Y1sQ9UYoq4ENZjLTrY5OdU3L4S6PHStouVjO2RhtFqCMb +gt5tTuAYz5u6ImiLjN5vCC28 +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA1-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA1-PRIV.key new file mode 100644 index 00000000000..cd99ead5d10 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA1-PRIV.key @@ -0,0 +1,26 @@ +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDaYlKNTU1iQes/ +BtivvM1ixjCk1muM1RdMkJQItZB21y1kM1OLp3EmGKqVqwKbS5OTrMIxjPUwD9Ly +aRJMvSP1xve7zwmNXOngA8eukmQ2olQU58ble6IAHcj4qg7a38E1ITvDmAswhTzK +fI4Z6okLCjKfYafnfbi5JA+E6fiArB3zimjne+tiUNYZh2eYspsOOw6cmaLtIbMP +ZyXy4iP6OCNIikb08Da27zjVn04i1SeUEv1YFmn4B9GWcNLAXyM1LmCNi70+SATp +aZYRjr/BBR6LNZMBsNKJblWFXK3UtfYFiypyirgQjzPtLb1XsuMhfqMt8QZDh8n3 +YvYTW59xAgMBAAECggEAb4NPdhnoDulsL5XWZf55vhtH0ZQv/Qz+xbj57myQJS8B +Xa4b1i8dRv/Hc3+MaDIyXHEWBGle9jjOVbwzfP4D88eyzrMMxKOSRTKI72qPQ5qm +ZrpnxNzZv0d2TQvBZCBnrzKWKu1joVYX0anCghdR/VIqwVoDe+Clx9xTFGLI4yKO +7v0dkr4Hxn3NT6bTV18V6PoGbUgIsmpNYQPFyUM/IHG2ewDffLP+tm7RsEfKYmcx +Hr70pmWBpM9hwTAC+uXHuNXnsX4IjEQOXmm4PJ/A/sm2Bad93SPwi15e29MV8YbO +vvirGLaepa7AUvqoK0DFNCLU6vCeFJ7DUZ/u2P8x8QKBgQDxNOWvy3EV4/P/ocSf +itMtXZWj4driT4vUGwFZWfr3CVpZVaUmqXYeVdzNGuoWlmXOiOAuOepnlA36FCb5 +aGE4cq/hbdtbr+v6awEj5/A2me/ax1W1z6lD0pg0QJ7KvqFCBzVol5yTiWZKBVE+ +jp2waPfes770AUHczw9KKvEGtQKBgQDnxxiZAxtoNmOaB/NZmPNBKvWDw858+QX2 ++u/jEH3pW393tUnipgIoo6yvd6djhJ6/4ViOxdioMIQCBab/xuSB4lfQsrJsWvS9 +uYB794s7CV2r3kUa3ux8wAovW6Fc369nD7JjUPX/Cq3zdlyTDt9LVLRCpZ6Li1xB +r0ZVlpgPTQKBgQCgKay+X0tW6sdxHfyOp8Lz46liaa1LCuDhVZE+wHXZpXc9zJXe +JzZMjF0SQGXh27n8O30IlOJmJrRlMw5yG/I6ZkUNXkIDDryVyom2SuOBjhPrZOMv +15UgeO0h/Sqzm4M+ccTwD4Qjn1+xlPhOnqpsoja8xQPtyAvwz/jqGbtz5QKBgH01 +pSgj8Y5es3fmi6P/aInv9ynzgX0p2fsOnMEBi8Og1j+JBB0YqVni8crozNiKMGhg +CEM4xk41x1qASzMp8w/ngqEPqCu5BzXnHG3b0K9X4+6Q6KwXeZH6/IWQ7p8Jh+wZ +IrlcZ0gcMNSxQFmBU0eSvr6yUe/4nSIu2cQq0oKRAoGAUEFd0LxZw50BdCdpJlcQ ++oTbSUYQhAzPF2ybfR6i8IxXoOjVxpvRehlbwXIQV7XEqamXFTmBLIvuAlF1yWoH +hzxNJuEgPRTPztnHD6LVzvuf2ain+CFZuDrXBT2l8PyF9BNL4/DMRrbgdCxr9F0O +Ti0VJo1TRE8vVzUfVc9w1RI= diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA1.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA1.cer new file mode 100644 index 00000000000..c2cb37cb0eb --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA1.cer @@ -0,0 +1,81 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 86:09:85:57:41:bf:86:65 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=INTER_CA_SHA1-ROOT_CA_SHA1 + Validity + Not Before: Mar 30 04:51:06 2017 GMT + Not After : Mar 28 04:51:06 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:da:62:52:8d:4d:4d:62:41:eb:3f:06:d8:af:bc: + cd:62:c6:30:a4:d6:6b:8c:d5:17:4c:90:94:08:b5: + 90:76:d7:2d:64:33:53:8b:a7:71:26:18:aa:95:ab: + 02:9b:4b:93:93:ac:c2:31:8c:f5:30:0f:d2:f2:69: + 12:4c:bd:23:f5:c6:f7:bb:cf:09:8d:5c:e9:e0:03: + c7:ae:92:64:36:a2:54:14:e7:c6:e5:7b:a2:00:1d: + c8:f8:aa:0e:da:df:c1:35:21:3b:c3:98:0b:30:85: + 3c:ca:7c:8e:19:ea:89:0b:0a:32:9f:61:a7:e7:7d: + b8:b9:24:0f:84:e9:f8:80:ac:1d:f3:8a:68:e7:7b: + eb:62:50:d6:19:87:67:98:b2:9b:0e:3b:0e:9c:99: + a2:ed:21:b3:0f:67:25:f2:e2:23:fa:38:23:48:8a: + 46:f4:f0:36:b6:ef:38:d5:9f:4e:22:d5:27:94:12: + fd:58:16:69:f8:07:d1:96:70:d2:c0:5f:23:35:2e: + 60:8d:8b:bd:3e:48:04:e9:69:96:11:8e:bf:c1:05: + 1e:8b:35:93:01:b0:d2:89:6e:55:85:5c:ad:d4:b5: + f6:05:8b:2a:72:8a:b8:10:8f:33:ed:2d:bd:57:b2: + e3:21:7e:a3:2d:f1:06:43:87:c9:f7:62:f6:13:5b: + 9f:71 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA1 + serial:8D:A0:D2:8A:EE:0B:CF:65 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 29:b0:10:dc:45:ee:68:77:5f:12:9b:fc:de:eb:70:41:2e:6a: + a2:5f:a9:cc:ca:97:24:01:4a:1d:c2:78:52:57:34:9c:83:7f: + 60:f5:d9:68:a2:32:89:e9:d7:25:71:72:71:e5:76:e3:37:af: + 41:25:cc:8b:a4:fd:81:ef:6b:15:2b:91:3c:68:a5:25:53:cf: + c1:b9:aa:49:b4:cd:e3:3c:a2:8e:38:ea:e8:51:7c:7b:92:41: + bd:a3:22:7d:97:59:ad:55:e2:7d:9d:6a:bb:1f:95:84:1c:50: + 00:e9:6c:74:1d:bb:6c:07:ca:bc:6a:a2:dd:c1:66:37:64:bd: + fe:1a:c0:8c:a7:8c:a1:60:b8:c3:d2:5f:92:80:ee:ad:79:29: + f2:ad:e2:9f:74:39:bf:3b:a4:b6:25:2a:87:3f:36:49:b9:52: + fd:91:33:be:1d:41:a9:76:29:47:6e:c7:db:a8:ab:6e:78:91: + c0:13:56:1c:25:41:51:a7:64:4f:07:c0:2a:a8:80:63:8d:98: + e0:54:7d:a6:f4:22:6b:70:fa:1c:16:82:f4:07:2e:e1:ba:94: + 96:ec:c7:9e:8e:0a:24:1e:a4:e9:c0:92:ca:bd:32:98:ef:1f: + e1:a6:e6:4d:1f:c5:68:1b:77:d0:e0:35:1a:a9:c9:ee:98:72: + 7b:c3:e7:51 +-----BEGIN CERTIFICATE----- +MIID9jCCAt6gAwIBAgIJAIYJhVdBv4ZlMA0GCSqGSIb3DQEBCwUAMGsxCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMSMwIQYDVQQDDBpJTlRFUl9DQV9TSEExLVJPT1RfQ0Ff +U0hBMTAeFw0xNzAzMzAwNDUxMDZaFw0yNzAzMjgwNDUxMDZaMH0xCzAJBgNVBAYT +AlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3JnMQ0w +CwYDVQQLDARKYXZhMTUwMwYDVQQDDCxFTkRfRU5USVRZX1NIQTI1Ni1JTlRFUl9D +QV9TSEExLVJPT1RfQ0FfU0hBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBANpiUo1NTWJB6z8G2K+8zWLGMKTWa4zVF0yQlAi1kHbXLWQzU4uncSYYqpWr +AptLk5OswjGM9TAP0vJpEky9I/XG97vPCY1c6eADx66SZDaiVBTnxuV7ogAdyPiq +DtrfwTUhO8OYCzCFPMp8jhnqiQsKMp9hp+d9uLkkD4Tp+ICsHfOKaOd762JQ1hmH +Z5iymw47DpyZou0hsw9nJfLiI/o4I0iKRvTwNrbvONWfTiLVJ5QS/VgWafgH0ZZw +0sBfIzUuYI2LvT5IBOlplhGOv8EFHos1kwGw0oluVYVcrdS19gWLKnKKuBCPM+0t +vVey4yF+oy3xBkOHyfdi9hNbn3ECAwEAAaOBijCBhzB3BgNVHSMEcDBuoWGkXzBd +MQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExDTALBgNVBAcMBENpdHkxDDAKBgNV +BAoMA09yZzENMAsGA1UECwwESmF2YTEVMBMGA1UEAwwMUk9PVF9DQV9TSEExggkA +jaDSiu4Lz2UwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAKbAQ3EXu +aHdfEpv83utwQS5qol+pzMqXJAFKHcJ4Ulc0nIN/YPXZaKIyienXJXFyceV24zev +QSXMi6T9ge9rFSuRPGilJVPPwbmqSbTN4zyijjjq6FF8e5JBvaMifZdZrVXifZ1q +ux+VhBxQAOlsdB27bAfKvGqi3cFmN2S9/hrAjKeMoWC4w9JfkoDurXkp8q3in3Q5 +vzuktiUqhz82SblS/ZEzvh1BqXYpR27H26irbniRwBNWHCVBUadkTwfAKqiAY42Y +4FR9pvQia3D6HBaC9Acu4bqUluzHno4KJB6k6cCSyr0ymO8f4abmTR/FaBt30OA1 +GqnJ7phye8PnUQ== +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256-PRIV.key new file mode 100644 index 00000000000..3f9ad5384df --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256-PRIV.key @@ -0,0 +1,26 @@ +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDaCsiXcNnu7WpV +t+FarvFhtaRr4RMQbKGhiIHi4aV0vqWmpX/eFde01eQZTZcPGJzEnjJrkyFo3Wbd +31bjBLpt40kkI7kbODHrA2L+vY/hoCQeXK8+BrGioX9qHOpD7OLI3Esm1+KDiPPK +w6qr9O9nS/fOID3zly92r+obY2ZuW6jQC0Yah3K9INrSIjH+rHXsmj2U5dCnktfi +LzRcocvqtQHASYXFXEhWr1TCMnSz7h+l07O5YgYpmhwkRIPCkcdP+9wGhO2eOJYU +kfaBteodDh7vHj2F+A6Lheosa4mi/nysyhQJl8uBFw97dqab9ul5Tb03iHmaY/q0 +xJKcEohnAgMBAAECggEBAJsa6K6yHJWWVfo8IBb+M7+qExiat5ELdb8O+DaJBcYS +iIwPVvKI3zVIokZNp5OZkotbbcqQk0ehl7dlVM2RY30gHbuTne36/6eKdTV5a4y4 ++niOviqFYH+sGpNFlnBTZtAzxVIQaJXhKmum3RYN2u/EXrdGwEsz1RO89/AbuZXu +VdtEKkjPHXrIjnBkiT4271sm3OiPwOe6g0NKBMJ4InTyB+YtpgxlXtF+vv5cv6Vt +ayT3sNsdsD8HLrenMmwv/k7nTYgNbhaJX2YCs9W7ZEscU2th6F7Cx6Z0z9h1SElC ++OKKhU6HnG/pWFMfWu80ZNjb3NTpXzTv4CLKjEYvz6ECgYEA8qEe+Ga7+XD0XwPB +bFjoKmhOQhv0VCIiu9RgvIxQn5DuGX4H2hO1GP8LYOQZBm25nICIa+DyDZEaFGgL +QgfPI4boK/rdV8syFTUNfw1Wq+W/pHhqzgUGHAnzRpX8jBQa9of14O+B7//ZFdGj +5nt0qFTOAgNGslXMvSicKD/g0mMCgYEA5g7MpMmZI8zPf/PKLBkrQegdX2TBBiI5 +3KzvQuA29tEFdVwUIuhkgQkmy1u9Ujw0jZZ8NVBOsqfg7e7XkVr6/OF+MVWBjWl3 +Jn3DMCHl/HCLIZ4ZOM6/ydIMpBX6Ii53nvpO6vxRaOUg2T2gVHadVjjQAN9Oj68r +TKUHfs4rTy0CgYB/g5QuQnfqKaYUxXmDQtqJZxYyAlUPXn1Yr85DaY75vYaVGTpx +L0hPIcNOIbLRQRt6l8aaw7cS0D6fmOrJwibn6f/dFVP8zwq8QIyeSFlTsERe4PZo +3hUO6V/UqgD3cZ2WEXB0zgtBIfpqUCpOeHWf/inivuwJz7PxegVP1fqHNwKBgA0p +CZHfqm/+1lvmcUlGg0/43D1JwTT9nju+dM1pkBtcZ6iIBOreSmmLQXnenJzorsTu +t9pA5s+XhOl3gUNiZfszVwmxb4DMaLF9/j1xovtm4L6ikaTLRvNfnbOBQlbUO6mP +fhY5KtsKSG/E87gBNQzqoRN7sr3Lcnmm8x/Q4W9dAoGAITDcOI7UgPcnKMO8JUI5 +96Po3c/S7nBilVZRFOwjn0z6jrjzNTd+1IqkzIKBWfs5WlRkzXI6LPJVghwPUqUa +q2C/3hQATD3FchEIohLfd8bj/wObaZNlKJB59a1RjxRZxuVQl3jvovvpn/hdXuJB +nGIx7MryEG/yRpfrk2DL0bI= diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256.cer new file mode 100644 index 00000000000..22390ed7d7e --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256.cer @@ -0,0 +1,81 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 9e:f7:d7:79:1c:06:83:d5 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=INTER_CA_SHA1-ROOT_CA_SHA256 + Validity + Not Before: Mar 30 04:51:05 2017 GMT + Not After : Mar 28 04:51:05 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=END_ENTITY_SHA256-INTER_CA_SHA1-ROOT_CA_SHA256-PRIV + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:da:0a:c8:97:70:d9:ee:ed:6a:55:b7:e1:5a:ae: + f1:61:b5:a4:6b:e1:13:10:6c:a1:a1:88:81:e2:e1: + a5:74:be:a5:a6:a5:7f:de:15:d7:b4:d5:e4:19:4d: + 97:0f:18:9c:c4:9e:32:6b:93:21:68:dd:66:dd:df: + 56:e3:04:ba:6d:e3:49:24:23:b9:1b:38:31:eb:03: + 62:fe:bd:8f:e1:a0:24:1e:5c:af:3e:06:b1:a2:a1: + 7f:6a:1c:ea:43:ec:e2:c8:dc:4b:26:d7:e2:83:88: + f3:ca:c3:aa:ab:f4:ef:67:4b:f7:ce:20:3d:f3:97: + 2f:76:af:ea:1b:63:66:6e:5b:a8:d0:0b:46:1a:87: + 72:bd:20:da:d2:22:31:fe:ac:75:ec:9a:3d:94:e5: + d0:a7:92:d7:e2:2f:34:5c:a1:cb:ea:b5:01:c0:49: + 85:c5:5c:48:56:af:54:c2:32:74:b3:ee:1f:a5:d3: + b3:b9:62:06:29:9a:1c:24:44:83:c2:91:c7:4f:fb: + dc:06:84:ed:9e:38:96:14:91:f6:81:b5:ea:1d:0e: + 1e:ef:1e:3d:85:f8:0e:8b:85:ea:2c:6b:89:a2:fe: + 7c:ac:ca:14:09:97:cb:81:17:0f:7b:76:a6:9b:f6: + e9:79:4d:bd:37:88:79:9a:63:fa:b4:c4:92:9c:12: + 88:67 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA256 + serial:84:A1:70:1D:0A:92:D3:CD + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 89:84:ce:6d:80:83:e7:19:80:21:a5:d3:79:ac:c4:2f:5c:5f: + 47:f1:1c:e7:40:2a:57:ec:76:01:a9:10:b6:a2:2b:1b:02:ac: + f7:46:b1:67:b3:36:0f:fa:f0:a3:40:c2:5a:38:00:67:a9:9d: + e8:59:be:2f:5b:d0:c6:6c:20:90:c0:3b:6b:af:75:8c:93:ac: + 5a:1e:8b:66:2c:79:0b:6d:9d:0d:d3:68:b5:b6:df:d6:04:6b: + 24:f7:5a:b9:f0:18:08:81:b1:50:1c:ac:1b:7a:b7:b8:d8:8e: + 6f:15:78:7e:23:5f:41:5c:df:76:09:1a:67:36:15:35:6a:77: + 36:09:19:50:12:6d:60:20:c1:7a:36:cb:4c:ee:a8:d7:b7:c7: + 29:26:31:04:0a:44:48:25:be:dd:00:92:ea:8c:00:ee:b4:eb: + 52:4a:da:47:97:d7:42:df:dd:7d:17:de:e3:a1:14:49:3b:2d: + aa:ac:e7:83:0f:c0:2d:3f:31:c5:af:bb:b1:1e:53:d1:a7:13: + 55:e3:25:f6:67:95:a1:75:e9:b8:a1:81:eb:d0:de:8a:a3:af: + 78:dc:d0:39:d0:e7:d6:61:9e:39:7b:8b:f9:ee:44:48:78:92: + e7:22:fa:9c:a4:d0:6b:2b:89:0a:fa:78:3d:7a:af:44:91:e5: + 8a:40:2f:10 +-----BEGIN CERTIFICATE----- +MIIEAjCCAuqgAwIBAgIJAJ7313kcBoPVMA0GCSqGSIb3DQEBCwUAMG0xCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMSUwIwYDVQQDDBxJTlRFUl9DQV9TSEExLVJPT1RfQ0Ff +U0hBMjU2MB4XDTE3MDMzMDA0NTEwNVoXDTI3MDMyODA0NTEwNVowgYQxCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMTwwOgYDVQQDDDNFTkRfRU5USVRZX1NIQTI1Ni1JTlRF +Ul9DQV9TSEExLVJPT1RfQ0FfU0hBMjU2LVBSSVYwggEiMA0GCSqGSIb3DQEBAQUA +A4IBDwAwggEKAoIBAQDaCsiXcNnu7WpVt+FarvFhtaRr4RMQbKGhiIHi4aV0vqWm +pX/eFde01eQZTZcPGJzEnjJrkyFo3Wbd31bjBLpt40kkI7kbODHrA2L+vY/hoCQe +XK8+BrGioX9qHOpD7OLI3Esm1+KDiPPKw6qr9O9nS/fOID3zly92r+obY2ZuW6jQ +C0Yah3K9INrSIjH+rHXsmj2U5dCnktfiLzRcocvqtQHASYXFXEhWr1TCMnSz7h+l +07O5YgYpmhwkRIPCkcdP+9wGhO2eOJYUkfaBteodDh7vHj2F+A6Lheosa4mi/nys +yhQJl8uBFw97dqab9ul5Tb03iHmaY/q0xJKcEohnAgMBAAGjgYwwgYkweQYDVR0j +BHIwcKFjpGEwXzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMQ0wCwYDVQQHDARD +aXR5MQwwCgYDVQQKDANPcmcxDTALBgNVBAsMBEphdmExFzAVBgNVBAMMDlJPT1Rf +Q0FfU0hBMjU2ggkAhKFwHQqS080wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsF +AAOCAQEAiYTObYCD5xmAIaXTeazEL1xfR/Ec50AqV+x2AakQtqIrGwKs90axZ7M2 +D/rwo0DCWjgAZ6md6Fm+L1vQxmwgkMA7a691jJOsWh6LZix5C22dDdNotbbf1gRr +JPdaufAYCIGxUBysG3q3uNiObxV4fiNfQVzfdgkaZzYVNWp3NgkZUBJtYCDBejbL +TO6o17fHKSYxBApESCW+3QCS6owA7rTrUkraR5fXQt/dfRfe46EUSTstqqzngw/A +LT8xxa+7sR5T0acTVeMl9meVoXXpuKGB69DeiqOveNzQOdDn1mGeOXuL+e5ESHiS +5yL6nKTQayuJCvp4PXqvRJHlikAvEA== +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA1-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA1-PRIV.key new file mode 100644 index 00000000000..8584f50ec7e --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA1-PRIV.key @@ -0,0 +1,26 @@ +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHC0ieOFNTJjP+ +HMlFQ/w50Hx/+FYh9z9w3i08dVvi8oEhGUop7fvsqEyuAj3U/BYG87Wsv27wfa9l +qSJRSgqUT3yI4jsMY/ozUInuKpp/yL97abyZVDUZc3diDZqryA/Qur8HNVLyA2hD +DA9x8Ioeu5EDFl7AeqV3jx+A8fbulwVeCa29GByVkWRUEVF/48a1jpazBf2YQvrm +5ElWoG8fuMrz6vgj+gYZYb1GPXmJQrtAIRp4Z1/AquPS4A/O21DnPLEM8WSw+rSC +KGGKMqefJw74zeVyPlOiOmjFTeNfeVDViQrDgU++CTDjFa8XhweU6v+MtY5Mmzmf +2AETGyd9AgMBAAECggEANCdMu8hebOcRsH+ybSfHKw7p0E4to3C5esV8bN8DWI/a +LeYGfL4SyIvAq8eClBAJZYDuFXmDhBgqoSSUDWCtLPc21lcQycpYgKGVwoX/PYRI +R/oIpNRfpW+P1G1kHaaqHjMQYr8iIK+r3gWG9n/kcPEMqhZudVitiopB4vODlDgf +OI0goNWwYOPzoBkJSBbgfYC7vSz0dg+j9ooYPDnyUnHjykhu95mkmBHYc/MVMP8s +ntFB5pgtWuLQATZImW4A1dtZiqCsF6APvJIQASxVq+wv3dwhejF9xMZR96QchVZJ +QvPOcH76njIH4fThb0e46Dn54+KBpCnveSnDtAz5sQKBgQD2u6gWOK/Z4VqGlff1 +diLqzesdalCJhydKzOGRzRiJeW4E4MhEpUjIo44zPGkQ64zq6nefqIltdiaE7T9C +Fnyu/+vd0zE1v3Ipgv0wD3NgTj3gGrBwl2gkY5sfSbCR+8vS/DhRU+s3KN45m3s4 +XfM27Uw/Zh/DFIe7jmGezfe/3wKBgQDOhRjDfxDDLCEXw4QFQb7Sp/43EGfoTd8h +m700T/QXUTGx6qRhzHF9mUVea7FT+3I6CEqYNnZtFlYsJlq1g457rnvUJnTjJZb7 +wFl1h+u4u3IKo/lUUh2vD89PPOkMUF/uamJLh5jK7KNkOjwEDN2yPkRgaedY++nv +NBcUPpGUIwKBgEkFmOWauVC+hVA3qj8XS5Y6g08dW+CYA2T75faEwLJPIeSHsj2+ +vR/EaB15z46WaApOgkDaXHHs+dF1dbdVeGlCjMgF7RZ/JoZqogxLRlZGUcG1pGpu +JQBACnTkFkHeR6CVzQUk1QRqL/rUrU8tXwHukRZiXxwZQ2Ka7QFW6+/5AoGAHGem +Dk2NyqppKtGTeP2f921vw7cX85WyWPcIwQc2NXbPdP8m+OSbv4CzT9dUHo75GQ5G +5ESpaTunQo9L7qdXk59eHMHlVdC3wYylQUsemtv9RYVkJ7rbplZwVx+zliP/7dTo +DCdsVozRtFlmI9B5Najm0rP+Q/jyJhpuCjTI5S0CgYEAsYcmFZZotwOyT4oJ/1Fu +BtSOsoxnCa1vPJTVXEoX3F28ZUP4X0iWgGDO1e3aoWWYxWusf1fUj9BWbVnbtJfb +gJ5JtQTAuMvmjCwFRWcBUytdxTUsWFbuDc5fw7DMW7YqjkCCISkd6Q8JyaFsJPy1 +7uFzumBnFtZGUIo2w4l8yrQ= diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA1.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA1.cer new file mode 100644 index 00000000000..8b9f080920e --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA1.cer @@ -0,0 +1,81 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 9e:b3:99:30:15:24:2c:69 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=INTER_CA_SHA256-ROOT_CA_SHA1 + Validity + Not Before: Mar 30 04:51:06 2017 GMT + Not After : Mar 28 04:51:06 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c7:0b:48:9e:38:53:53:26:33:fe:1c:c9:45:43: + fc:39:d0:7c:7f:f8:56:21:f7:3f:70:de:2d:3c:75: + 5b:e2:f2:81:21:19:4a:29:ed:fb:ec:a8:4c:ae:02: + 3d:d4:fc:16:06:f3:b5:ac:bf:6e:f0:7d:af:65:a9: + 22:51:4a:0a:94:4f:7c:88:e2:3b:0c:63:fa:33:50: + 89:ee:2a:9a:7f:c8:bf:7b:69:bc:99:54:35:19:73: + 77:62:0d:9a:ab:c8:0f:d0:ba:bf:07:35:52:f2:03: + 68:43:0c:0f:71:f0:8a:1e:bb:91:03:16:5e:c0:7a: + a5:77:8f:1f:80:f1:f6:ee:97:05:5e:09:ad:bd:18: + 1c:95:91:64:54:11:51:7f:e3:c6:b5:8e:96:b3:05: + fd:98:42:fa:e6:e4:49:56:a0:6f:1f:b8:ca:f3:ea: + f8:23:fa:06:19:61:bd:46:3d:79:89:42:bb:40:21: + 1a:78:67:5f:c0:aa:e3:d2:e0:0f:ce:db:50:e7:3c: + b1:0c:f1:64:b0:fa:b4:82:28:61:8a:32:a7:9f:27: + 0e:f8:cd:e5:72:3e:53:a2:3a:68:c5:4d:e3:5f:79: + 50:d5:89:0a:c3:81:4f:be:09:30:e3:15:af:17:87: + 07:94:ea:ff:8c:b5:8e:4c:9b:39:9f:d8:01:13:1b: + 27:7d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA1 + serial:8D:A0:D2:8A:EE:0B:CF:64 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 2b:43:e4:c1:37:36:00:a3:ed:25:15:c7:9f:6b:25:0e:24:cd: + 1c:e8:d2:8c:a6:11:05:a9:2b:b5:dc:7b:fd:55:8e:be:1d:15: + d7:8b:a8:a6:44:cf:03:ba:ba:78:74:26:b9:19:11:c0:03:9b: + 4d:2f:f9:f7:ea:da:a3:2f:82:f9:9e:d0:77:d6:bf:eb:fd:57: + c8:eb:03:54:0a:0c:2b:36:0c:e5:99:b7:93:4d:a9:9d:e9:50: + 80:66:4e:73:c1:bd:83:13:09:ee:b9:01:62:ed:90:0e:4f:ff: + 9d:92:f3:cd:db:1f:ba:da:fc:67:9d:cb:a0:09:99:8b:3e:ea: + 9d:61:55:ac:6f:fb:11:5c:c0:fe:fb:ff:5b:15:7d:a7:c1:aa: + 3a:cd:30:43:35:ea:44:8a:21:ae:9f:af:bc:5c:ae:3a:01:2c: + 3b:eb:b6:8c:6a:e1:1c:4e:55:0a:84:5b:f8:68:71:aa:97:02: + 9b:5d:c4:c9:42:df:19:91:28:4a:12:35:8d:2e:3d:10:ec:35: + 8a:b1:d7:e0:e2:a6:f9:f6:47:4b:17:75:84:8e:2d:66:e8:74: + be:d6:27:6b:a2:28:23:26:41:70:92:c2:7c:50:e2:81:c9:e0: + 10:84:5d:87:4f:db:93:ce:dd:09:d2:48:63:3d:53:66:31:64: + 5a:13:b5:a6 +-----BEGIN CERTIFICATE----- +MIID+jCCAuKgAwIBAgIJAJ6zmTAVJCxpMA0GCSqGSIb3DQEBCwUAMG0xCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMSUwIwYDVQQDDBxJTlRFUl9DQV9TSEEyNTYtUk9PVF9D +QV9TSEExMB4XDTE3MDMzMDA0NTEwNloXDTI3MDMyODA0NTEwNlowfzELMAkGA1UE +BhMCVVMxCzAJBgNVBAgMAkNBMQ0wCwYDVQQHDARDaXR5MQwwCgYDVQQKDANPcmcx +DTALBgNVBAsMBEphdmExNzA1BgNVBAMMLkVORF9FTlRJVFlfU0hBMjU2LUlOVEVS +X0NBX1NIQTI1Ni1ST09UX0NBX1NIQTEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDHC0ieOFNTJjP+HMlFQ/w50Hx/+FYh9z9w3i08dVvi8oEhGUop7fvs +qEyuAj3U/BYG87Wsv27wfa9lqSJRSgqUT3yI4jsMY/ozUInuKpp/yL97abyZVDUZ +c3diDZqryA/Qur8HNVLyA2hDDA9x8Ioeu5EDFl7AeqV3jx+A8fbulwVeCa29GByV +kWRUEVF/48a1jpazBf2YQvrm5ElWoG8fuMrz6vgj+gYZYb1GPXmJQrtAIRp4Z1/A +quPS4A/O21DnPLEM8WSw+rSCKGGKMqefJw74zeVyPlOiOmjFTeNfeVDViQrDgU++ +CTDjFa8XhweU6v+MtY5Mmzmf2AETGyd9AgMBAAGjgYowgYcwdwYDVR0jBHAwbqFh +pF8wXTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMQ0wCwYDVQQHDARDaXR5MQww +CgYDVQQKDANPcmcxDTALBgNVBAsMBEphdmExFTATBgNVBAMMDFJPT1RfQ0FfU0hB +MYIJAI2g0oruC89kMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBACtD +5ME3NgCj7SUVx59rJQ4kzRzo0oymEQWpK7Xce/1Vjr4dFdeLqKZEzwO6unh0JrkZ +EcADm00v+ffq2qMvgvme0HfWv+v9V8jrA1QKDCs2DOWZt5NNqZ3pUIBmTnPBvYMT +Ce65AWLtkA5P/52S883bH7ra/Gedy6AJmYs+6p1hVaxv+xFcwP77/1sVfafBqjrN +MEM16kSKIa6fr7xcrjoBLDvrtoxq4RxOVQqEW/hocaqXAptdxMlC3xmRKEoSNY0u +PRDsNYqx1+Dipvn2R0sXdYSOLWbodL7WJ2uiKCMmQXCSwnxQ4oHJ4BCEXYdP25PO +3QnSSGM9U2YxZFoTtaY= +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA256-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA256-PRIV.key new file mode 100644 index 00000000000..7fa63685714 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA256-PRIV.key @@ -0,0 +1,26 @@ +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDuH2+6I/ytoLeW +AG3J0xMQafYmxYDZNaDjiWBl7TGpL4TjRY84FuHI/G8ib0VY9DKtyUixm7qZev+b +ExrfQGk9ZV7Dn41uBvmGcUMSqwb0QV/5/hneP7/3EXhoWjsCFUe0r0zOgCM7O9+F +jUlSuxEHyaFE09PxWGVZpU4Yu71PeoI/JJGITV81o2Fst7Urz65NE5OWrvbO+pfD +EiRvjLv/uil7znYV28lCbH7U1K8q5nGVtnpgTguhGL6/N3lIgvxoBtoXEQwdMV59 +APsH8anA19rHn5h/ZmknryxAs0c6Rg9Plo30MonIU/eAVZwNw8TczD276Rc02xnW +RmbmxToRAgMBAAECggEAbK3OWV9JWJlMkNqbQQzj247w+FsV5ozSZGbzpzFtg/Eb +Lns11XykCg4kTswIE4RIiQaf9efEb34yoL1Ee3YzUgEtEg2FCB2IzvJskV2ba+lW +e4uclNH1tDa2BLKB0f6SXoXPgUP8UHGQH60PNQIJ0MsWnoorZjBY+WQ305QD3/yB +fMonkjpWN+ZNTY8Y3vA2SsS4EoY0Ndy2FpmWPwKKMCcqXw6xzVjKvq+jpFfsGpcj +i3MlKsCG5koreWrXdyt28CVOc6eMW5rsJfAHRw+OSn7PdLaGyZCUUsFXCjG0Vq2G +YwuMfTJprrZk+lbi3XUXWk7XUEURB7Q4lIBxAcskAQKBgQD8pVj0OIsVHAGjQQ7C +ZAnxFlON7XX3fgPdLtil9c+a1GlcPA2K52fBp8YlKlAS4bmZIQHbbkEBjh8KfG1P +x7zBHoUXV8ruo/axzRPoeBVQat5NQKcKnlITrqdf8J3a+8iMxpMpd53h97HGiayq +W04ZQNf7wjXvR+pJVluTEaoVUQKBgQDxSLruMmCsYvD+sipaQ3rBEMIAI3kc7ctl +fEnipEk5wtPkKKldw+rvbh/AwY2i2JMUDcW92hkB5vCvbcKmCEkEO3FbawNkJnJi +qfwbvHP/fGThMV3gbWWF3GZvBKY2+toSa2rwoR5kYTT1e4+byk38NAp/HAItFHIT +DgAgMy6owQKBgQCjd8jKnBtBmVFl9B48oMXd+/gsCM0fSaXuYvVCzH17TJyvVRve +GEQGBSwrt+j/jpWsArNU602cV/y1qDSCPlZfDgRHSkK/jc9805hh/fCsi7kyevaZ +5D5vBb6+UM2Sdv8YNxPY7NB2+PFJ6KKTx2gM5uvYtZx4KivpL7souXE3QQKBgDxg +FZ5q7rPUIjepP13MyteqqNC+D51Eh4PCgP58W3JfpQPPhOnYj14QMVPbWuSnys3W +0Gc8PsuyDQHoti8znYm4khntAjE6SZ8Up+gM1P3WE6wh3Tq+RQwk5WDcSfcx+AVp +6Z2Cw4ccp9LRc1LpYXA9WW8LBCRhnFXWSAPGquNBAoGAdCsvFzSipQ5qxWPlClRM +lKqDdQheRl9IKCuImXZAvdX952VhmP7QV5PUwLV/CkVquvSdRSshrMO/fqFjfkjr +puajXghFXa+YppQW42tPYBmKDnNVgxW5d5sC62AYaykh2iNw3v4BJyN+MMmkSf0M +4/mKvs5m8N2OkOpY6r2wCp8= diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA256.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA256.cer new file mode 100644 index 00000000000..c503f92fb12 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA256.cer @@ -0,0 +1,81 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + e8:33:78:c7:69:9c:28:c1 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=INTER_CA_SHA256-ROOT_CA_SHA256 + Validity + Not Before: Mar 30 04:51:04 2017 GMT + Not After : Mar 28 04:51:04 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=END_ENTITY_SHA256-INTER_CA_SHA256-ROOT_CA_SHA256 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:ee:1f:6f:ba:23:fc:ad:a0:b7:96:00:6d:c9:d3: + 13:10:69:f6:26:c5:80:d9:35:a0:e3:89:60:65:ed: + 31:a9:2f:84:e3:45:8f:38:16:e1:c8:fc:6f:22:6f: + 45:58:f4:32:ad:c9:48:b1:9b:ba:99:7a:ff:9b:13: + 1a:df:40:69:3d:65:5e:c3:9f:8d:6e:06:f9:86:71: + 43:12:ab:06:f4:41:5f:f9:fe:19:de:3f:bf:f7:11: + 78:68:5a:3b:02:15:47:b4:af:4c:ce:80:23:3b:3b: + df:85:8d:49:52:bb:11:07:c9:a1:44:d3:d3:f1:58: + 65:59:a5:4e:18:bb:bd:4f:7a:82:3f:24:91:88:4d: + 5f:35:a3:61:6c:b7:b5:2b:cf:ae:4d:13:93:96:ae: + f6:ce:fa:97:c3:12:24:6f:8c:bb:ff:ba:29:7b:ce: + 76:15:db:c9:42:6c:7e:d4:d4:af:2a:e6:71:95:b6: + 7a:60:4e:0b:a1:18:be:bf:37:79:48:82:fc:68:06: + da:17:11:0c:1d:31:5e:7d:00:fb:07:f1:a9:c0:d7: + da:c7:9f:98:7f:66:69:27:af:2c:40:b3:47:3a:46: + 0f:4f:96:8d:f4:32:89:c8:53:f7:80:55:9c:0d:c3: + c4:dc:cc:3d:bb:e9:17:34:db:19:d6:46:66:e6:c5: + 3a:11 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA256 + serial:84:A1:70:1D:0A:92:D3:CC + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 1d:1a:87:7d:11:0e:cc:cd:7f:6c:ed:21:1a:2c:35:de:09:b8: + c4:cf:0c:31:00:3d:f5:bd:d4:6e:f0:4f:7e:c2:8d:d6:c5:28: + ed:38:9d:d7:52:32:e2:8d:7b:64:c8:1d:4e:69:7e:49:5f:e1: + 5e:04:c7:d3:96:d2:63:ef:2c:35:4f:eb:08:2b:9d:b0:15:df: + 33:d8:1c:59:8e:bb:f1:28:4f:f0:85:bb:3c:56:e1:86:a4:75: + 2b:44:8a:1c:98:ae:94:f3:b6:76:a9:a3:e7:d6:bc:58:ef:fe: + 32:11:6f:76:5b:85:f8:14:91:83:2c:b6:20:a5:48:48:8b:6e: + ee:a8:6c:2b:12:18:94:3e:59:5e:a6:66:53:dc:40:b2:da:fd: + a4:5f:16:35:b6:20:2b:31:86:9b:91:55:b2:35:63:d2:47:bd: + 91:7e:43:bc:d6:0e:dc:95:1a:f0:8d:08:e5:66:cd:d1:0b:32: + d6:92:26:3e:78:e8:70:74:e1:14:64:b0:39:5d:7c:d0:28:23: + c7:83:53:02:90:fe:fc:9e:aa:9a:fb:c4:ef:9d:d5:22:f6:c1: + fd:e4:07:04:25:4f:8f:b2:13:6f:0d:51:cc:54:b4:38:d3:ac: + 31:aa:94:c5:d0:c8:5a:58:35:13:87:3e:f6:74:26:8c:2b:7d: + 6c:8e:36:a5 +-----BEGIN CERTIFICATE----- +MIIEATCCAumgAwIBAgIJAOgzeMdpnCjBMA0GCSqGSIb3DQEBCwUAMG8xCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMScwJQYDVQQDDB5JTlRFUl9DQV9TSEEyNTYtUk9PVF9D +QV9TSEEyNTYwHhcNMTcwMzMwMDQ1MTA0WhcNMjcwMzI4MDQ1MTA0WjCBgTELMAkG +A1UEBhMCVVMxCzAJBgNVBAgMAkNBMQ0wCwYDVQQHDARDaXR5MQwwCgYDVQQKDANP +cmcxDTALBgNVBAsMBEphdmExOTA3BgNVBAMMMEVORF9FTlRJVFlfU0hBMjU2LUlO +VEVSX0NBX1NIQTI1Ni1ST09UX0NBX1NIQTI1NjCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAO4fb7oj/K2gt5YAbcnTExBp9ibFgNk1oOOJYGXtMakvhONF +jzgW4cj8byJvRVj0Mq3JSLGbupl6/5sTGt9AaT1lXsOfjW4G+YZxQxKrBvRBX/n+ +Gd4/v/cReGhaOwIVR7SvTM6AIzs734WNSVK7EQfJoUTT0/FYZVmlThi7vU96gj8k +kYhNXzWjYWy3tSvPrk0Tk5au9s76l8MSJG+Mu/+6KXvOdhXbyUJsftTUryrmcZW2 +emBOC6EYvr83eUiC/GgG2hcRDB0xXn0A+wfxqcDX2sefmH9maSevLECzRzpGD0+W +jfQyichT94BVnA3DxNzMPbvpFzTbGdZGZubFOhECAwEAAaOBjDCBiTB5BgNVHSME +cjBwoWOkYTBfMQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExDTALBgNVBAcMBENp +dHkxDDAKBgNVBAoMA09yZzENMAsGA1UECwwESmF2YTEXMBUGA1UEAwwOUk9PVF9D +QV9TSEEyNTaCCQCEoXAdCpLTzDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUA +A4IBAQAdGod9EQ7MzX9s7SEaLDXeCbjEzwwxAD31vdRu8E9+wo3WxSjtOJ3XUjLi +jXtkyB1OaX5JX+FeBMfTltJj7yw1T+sIK52wFd8z2BxZjrvxKE/whbs8VuGGpHUr +RIocmK6U87Z2qaPn1rxY7/4yEW92W4X4FJGDLLYgpUhIi27uqGwrEhiUPllepmZT +3ECy2v2kXxY1tiArMYabkVWyNWPSR72RfkO81g7clRrwjQjlZs3RCzLWkiY+eOhw +dOEUZLA5XXzQKCPHg1MCkP78nqqa+8TvndUi9sH95AcEJU+PshNvDVHMVLQ406wx +qpTF0MhaWDUThz72dCaMK31sjjal +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA1-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA1-PRIV.key new file mode 100644 index 00000000000..cb077627f1e --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA1-PRIV.key @@ -0,0 +1,26 @@ +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDX1pPNXGpnPQNc +x9ReXrjbcHkIoyXcdXbhO0TnUBV5aGJTEn5/meDsK76Y2KDVyU/EO2jXpaQ5QiGn +UzY6vKIn6boqTov4NLYwBsVPdAG/xZyr5q7p6bnJ8WRj40A2JeOeZ3FMglRtBCNg +rYeEC4MDp2F41OVxsJZ4huodq94arqhD/hjE40g06UNa0I+/2dIpI2cSamIC5b3L +/DK3ol+gIw/OOxMCgzAUSjeH6nTrrW1hUeSKx0NPGWRLWzLQ2yxhYcXlsedNuKHo +ux/p3EkGXoGPajK7s7IlKj9CPQYwlQez37jCLJGovArqTr/8hxfrKMdZOl5bp+6H +6uWh6af7AgMBAAECggEAXrUsM79qfRR7pjmVCTe9G6T1pwGXum3clSYhrPIqChTw +mA0Ubr9Bv7/OKVlc8ZIdKzj6Xy2yquFGzRopQIrHCIZ5htjieC4BB3/hEmUP42s9 +vPxDIibJvD/s0hvEcD4d68LuJylFDHT1ZRWf0iQPAApxLckVSNa4n/hrQEvK8J+G +HIH8VATq9iHp/GQmmFB8b3ubqn46zDGqly14+TGP2KtVJlY9FuCpvmtZZZjJ+K09 +vYM+BATwje6N6PqX5a3Z+NFC1NK9CmC+U6ECJ27uhySn8kvlU/i/SOAnrPftByO7 +g7K8p2Qzq1LlVIUU/JTidNZGXTaTMOVg8eHLmyt92QKBgQD9a94rLqk9BUtVsTYa +AImt+KbUMB+Zi83cYDiCfNBkfIYw4dVUFJecmqZwg7IeqNwuSmXP41fASOvDel/L +8bOj/rPccVSG9pmU0ir5WK9n8zobogfAzvaFr8cmo+TVv0FOZZA8e/+UfVsiKAsW +3nwhwxN8ieILU1dtaNV1IfnAPwKBgQDaCM9URf+DFILI2WpuzKpk1loF6HrlklIn ++N0IFFcalqUpC8GhXTw7suypRBCZ+cp32h7WEcN9aHLMrnkDQP3bGTv53pJT5N9k +7nk9Bfrk0CJCxeMRKwtuMhLkOmT0eh2aB1lWR0owA5b1Gjtiz5kTW7NN2+paJCDz +SiDLVoFpRQKBgQCHvt0N4nuy/QACkd86BGm7b8LlTDXRCMsnrb73XqY9/VngG0gr +NrCTqV9YS6MAu1Dd1uo8djnN/QGU/xsLYpfoU4nCnk450SQpTH7Ke8/Rbb8FiECA +7hutNqAFuardOApiVRLy4zTfNFq5rBtsj5aMezMX9b/Ic0cUiyA0ExP1/wKBgQCp +SDvI34wRdqRQUtWa7xbAsdg1TBnXEjLtTAA4nKpAP4Q+CR2uLlhstW+fv/PvyIwV +X+mfJS2VubmgBzp3d0dhjAcP6mnL7yAvGiRRZ8ozSxG+rCuvEa+PQBuAzYHCeulu +xJPtM+56tt7GsDY5cpsT95eQNNWQZQqcOgqaNTDGzQKBgCmMwRP1HN0qUSSVO1d8 +8N17OoZe5yntppEjesYQrLf4AEgPS3Qj8dv0qfe3z1B0gAKlG9+OR8cUBCMGVyum +b51SiSi3LSm1VeuMfT7JDMSxTkbaI5CY7v+/5yCRFqikgBtCkHM9m4K95d3dVDO8 +JGrlKiKVIbu5LnQZMkPHRIEX diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA1.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA1.cer new file mode 100644 index 00000000000..58a4043c636 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA1.cer @@ -0,0 +1,80 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 8d:a0:d2:8a:ee:0b:cf:65 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=ROOT_CA_SHA1 + Validity + Not Before: Mar 30 04:51:04 2017 GMT + Not After : Mar 28 04:51:04 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=INTER_CA_SHA1-ROOT_CA_SHA1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:d7:d6:93:cd:5c:6a:67:3d:03:5c:c7:d4:5e:5e: + b8:db:70:79:08:a3:25:dc:75:76:e1:3b:44:e7:50: + 15:79:68:62:53:12:7e:7f:99:e0:ec:2b:be:98:d8: + a0:d5:c9:4f:c4:3b:68:d7:a5:a4:39:42:21:a7:53: + 36:3a:bc:a2:27:e9:ba:2a:4e:8b:f8:34:b6:30:06: + c5:4f:74:01:bf:c5:9c:ab:e6:ae:e9:e9:b9:c9:f1: + 64:63:e3:40:36:25:e3:9e:67:71:4c:82:54:6d:04: + 23:60:ad:87:84:0b:83:03:a7:61:78:d4:e5:71:b0: + 96:78:86:ea:1d:ab:de:1a:ae:a8:43:fe:18:c4:e3: + 48:34:e9:43:5a:d0:8f:bf:d9:d2:29:23:67:12:6a: + 62:02:e5:bd:cb:fc:32:b7:a2:5f:a0:23:0f:ce:3b: + 13:02:83:30:14:4a:37:87:ea:74:eb:ad:6d:61:51: + e4:8a:c7:43:4f:19:64:4b:5b:32:d0:db:2c:61:61: + c5:e5:b1:e7:4d:b8:a1:e8:bb:1f:e9:dc:49:06:5e: + 81:8f:6a:32:bb:b3:b2:25:2a:3f:42:3d:06:30:95: + 07:b3:df:b8:c2:2c:91:a8:bc:0a:ea:4e:bf:fc:87: + 17:eb:28:c7:59:3a:5e:5b:a7:ee:87:ea:e5:a1:e9: + a7:fb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA1 + serial:F1:3B:B7:FB:28:3F:52:09 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + d3:ce:da:23:e1:7c:73:fb:7f:26:d7:a4:3c:7b:17:01:75:ce: + a5:bd:75:f1:65:1b:56:27:ae:f8:97:a6:c4:ca:94:93:c9:12: + bb:c7:ec:2b:d5:38:d5:43:3a:6c:c2:51:3a:79:2f:d7:4e:da: + 2d:12:1f:b8:c2:4f:c8:ba:33:d3:f5:0c:78:cc:26:69:24:47: + 3f:ed:17:a0:7f:d0:20:fe:11:ca:75:50:1a:61:e1:91:b5:fa: + 91:04:e9:14:59:77:d4:29:0f:43:19:e0:dc:dd:a6:18:14:f4: + 33:3e:f0:cb:36:7b:18:04:03:dd:be:35:41:c4:3e:65:d2:67: + 44:73:ab:7f:d1:b9:26:7e:b3:1e:d0:e4:a4:52:83:60:a9:e6: + e1:bf:62:bb:9b:16:0c:97:ad:11:1a:2f:eb:92:ca:7e:98:15: + 46:23:59:5d:26:d9:ec:57:85:51:5b:09:f1:9b:1b:d3:5d:53: + 02:67:1a:e4:24:49:67:87:04:75:66:13:56:1b:8b:a1:08:de: + c8:4b:f8:87:73:6e:c2:31:ee:f6:32:14:45:32:a3:3f:e4:b1: + 0f:23:28:29:b4:a3:86:65:4f:2e:57:ad:8f:44:77:f8:4b:ea: + 7b:9d:8e:dc:cb:07:ee:b4:78:46:db:cd:12:eb:ad:ef:9b:8f: + 22:ba:83:7b +-----BEGIN CERTIFICATE----- +MIID1jCCAr6gAwIBAgIJAI2g0oruC89lMA0GCSqGSIb3DQEBBQUAMF0xCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMRUwEwYDVQQDDAxST09UX0NBX1NIQTEwHhcNMTcwMzMw +MDQ1MTA0WhcNMjcwMzI4MDQ1MTA0WjBrMQswCQYDVQQGEwJVUzELMAkGA1UECAwC +Q0ExDTALBgNVBAcMBENpdHkxDDAKBgNVBAoMA09yZzENMAsGA1UECwwESmF2YTEj +MCEGA1UEAwwaSU5URVJfQ0FfU0hBMS1ST09UX0NBX1NIQTEwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQDX1pPNXGpnPQNcx9ReXrjbcHkIoyXcdXbhO0Tn +UBV5aGJTEn5/meDsK76Y2KDVyU/EO2jXpaQ5QiGnUzY6vKIn6boqTov4NLYwBsVP +dAG/xZyr5q7p6bnJ8WRj40A2JeOeZ3FMglRtBCNgrYeEC4MDp2F41OVxsJZ4huod +q94arqhD/hjE40g06UNa0I+/2dIpI2cSamIC5b3L/DK3ol+gIw/OOxMCgzAUSjeH +6nTrrW1hUeSKx0NPGWRLWzLQ2yxhYcXlsedNuKHoux/p3EkGXoGPajK7s7IlKj9C +PQYwlQez37jCLJGovArqTr/8hxfrKMdZOl5bp+6H6uWh6af7AgMBAAGjgYowgYcw +dwYDVR0jBHAwbqFhpF8wXTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMQ0wCwYD +VQQHDARDaXR5MQwwCgYDVQQKDANPcmcxDTALBgNVBAsMBEphdmExFTATBgNVBAMM +DFJPT1RfQ0FfU0hBMYIJAPE7t/soP1IJMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcN +AQEFBQADggEBANPO2iPhfHP7fybXpDx7FwF1zqW9dfFlG1YnrviXpsTKlJPJErvH +7CvVONVDOmzCUTp5L9dO2i0SH7jCT8i6M9P1DHjMJmkkRz/tF6B/0CD+Ecp1UBph +4ZG1+pEE6RRZd9QpD0MZ4NzdphgU9DM+8Ms2exgEA92+NUHEPmXSZ0Rzq3/RuSZ+ +sx7Q5KRSg2Cp5uG/YrubFgyXrREaL+uSyn6YFUYjWV0m2exXhVFbCfGbG9NdUwJn +GuQkSWeHBHVmE1Ybi6EI3shL+IdzbsIx7vYyFEUyoz/ksQ8jKCm0o4ZlTy5XrY9E +d/hL6nudjtzLB+60eEbbzRLrre+bjyK6g3s= +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA256-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA256-PRIV.key new file mode 100644 index 00000000000..8997b5f69e0 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA256-PRIV.key @@ -0,0 +1,26 @@ +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDWN68vV57EPqPZ +Dtvi2+NI4tfxUgkaWJXbqrLKuAJC8bff9edZpMXGAyqMpDDr7MAjs/3TDYpVaWYN +Id5iwqamImbBLYf/K0LOkaX6+TyogaqwwdNVryR5eYcGXEiJY1MJ2mgzCNeGJ091 +4qwll3xkjAFolB6o9QoIbLB3cctl0vw6oAoi3TKWQxJ+UI6/uBotX5eQ9z1b/MDs +6PNXHB22jYAj4tOePMZxq7AVCwTFpWbHK8j5ftXxpVoU5ECNHfIAHLprJqc/lKdf +7rMyflbsjD8nV7TwY+FW7WfOQgiJhk0OK3VaBeSsovpOOwjS4Lpsazh3eUXeZJUk +lrYrMfI3AgMBAAECggEAEpXmNx9NAQ3GPXDSlw4o3AwCXEeXzpdc+SAIPxpT5+b8 +4wt8tQRcvF9N88HTFMUHrpFRNlx4Ygyw8/a6SqtEtilJ7Py8TeE8/JsaYXn6T0xg +uNE4OrjlWzy2AFFFYdYiQDqYy8S6nkMO29V8xg4slrSm8qHXPyVzZ2O2s8ZFtWG+ +ItAMb+Gv7FU2M4te/TwRnadljFAoyWry0XCXle1fN1Y3QJXtu3VDdmLmU0t+VGfa +wuZ5k0FIb9TFIQuxtgUNXJZmIjZw4Ych3luUc1bMSn9FPHeOzk8J3yo1tGqQu15M +KMLHxASTgt6opfhDbYIpD0fJJqCPdiJlMrqXHBPYwQKBgQDy8lrmsjBE97H0U2sS +tqlJq+7VOe2ien+z6seXFxd6XHBI8D/wTi2Q/7BpIGbpek3xc0ujxaFbcqo/RJZA +TUzYmc5leQLTwy4a54Neo33+sOuYPg8fQIMPT1OGa3DXv3EPSC8FdQrweNjn/bDX +YXbXJ2nKc3RgdTVehuMh6mw25wKBgQDhuitrTL3dlyHMGhO+djxW3cgjsUbJXQsK +1GnkGw5mzzL67M6ixw4WNxNJjuXEUI5Vat8iJzhZOA+Ae84DDbeN2FCM7UBpUsyB +9T9aApBYLLMflZhl4PXK/zkh1J9vA5NqqJbAcw6a5uH0kjtuJOSvP5CVQc2xsX9i +U9+eZesQMQKBgHo4Znasqg/oNIRf+vvdHOlNL8fhbqVQzzHqKSLfoRYTrwFirCfu +jInnuA4LGPrYZqHTiPgJEpX456EQli4fNUu6hNUTvdJe3LD4S2SvB1G8G6npfp4Q +TF7FX5W+M3S2gOBZRh6OtUQo56Y+QFr6U1kGIPiSgLeN/51gap/DWVF9AoGBAMmL +hMEloFF+Y/rtPbvNrkqRc+YKn32jyfw9dN7rGYzKbGaHkmjc+sLzIhGHubfzhWLX +Law9AJ8I4y6BXIx1bvMDtche/igMefV/mLUxnNhd8QG+fHhayJwcDlMamdBxjOqq +5Q+oq927UP0ipFXQMzAWvW3Hd3W1WlvdL8kqjxvBAoGBAMaZ9JZO48Zn17IUweZC +oVfM99YaHa+dm3L47PdQN6Ag6UjQ+sZ/6SLGIIg67SDhUQ+nuPCL8PH3Rf7PCuqW +oHW3F+44SIrVdLlMkWb444dxdP6Xvb9aOMpvopBDuvzYPR3xzZ202DZbZ0sIEVu8 +8a+09JbRmEI2/Ee+em6a/Y4T diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA256.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA256.cer new file mode 100644 index 00000000000..440b9c35c57 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA1-ROOT_CA_SHA256.cer @@ -0,0 +1,80 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 84:a1:70:1d:0a:92:d3:cd + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=ROOT_CA_SHA256 + Validity + Not Before: Mar 30 04:51:03 2017 GMT + Not After : Mar 28 04:51:03 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=INTER_CA_SHA1-ROOT_CA_SHA256 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:d6:37:af:2f:57:9e:c4:3e:a3:d9:0e:db:e2:db: + e3:48:e2:d7:f1:52:09:1a:58:95:db:aa:b2:ca:b8: + 02:42:f1:b7:df:f5:e7:59:a4:c5:c6:03:2a:8c:a4: + 30:eb:ec:c0:23:b3:fd:d3:0d:8a:55:69:66:0d:21: + de:62:c2:a6:a6:22:66:c1:2d:87:ff:2b:42:ce:91: + a5:fa:f9:3c:a8:81:aa:b0:c1:d3:55:af:24:79:79: + 87:06:5c:48:89:63:53:09:da:68:33:08:d7:86:27: + 4f:75:e2:ac:25:97:7c:64:8c:01:68:94:1e:a8:f5: + 0a:08:6c:b0:77:71:cb:65:d2:fc:3a:a0:0a:22:dd: + 32:96:43:12:7e:50:8e:bf:b8:1a:2d:5f:97:90:f7: + 3d:5b:fc:c0:ec:e8:f3:57:1c:1d:b6:8d:80:23:e2: + d3:9e:3c:c6:71:ab:b0:15:0b:04:c5:a5:66:c7:2b: + c8:f9:7e:d5:f1:a5:5a:14:e4:40:8d:1d:f2:00:1c: + ba:6b:26:a7:3f:94:a7:5f:ee:b3:32:7e:56:ec:8c: + 3f:27:57:b4:f0:63:e1:56:ed:67:ce:42:08:89:86: + 4d:0e:2b:75:5a:05:e4:ac:a2:fa:4e:3b:08:d2:e0: + ba:6c:6b:38:77:79:45:de:64:95:24:96:b6:2b:31: + f2:37 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA256 + serial:A3:52:9D:82:6F:DD:C6:1D + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 56:fb:b0:ab:a6:bb:3a:55:04:ed:5c:3b:ae:0c:0d:32:8f:aa: + ec:b7:24:2c:d5:37:b9:1f:91:64:21:c2:c0:6d:bc:d4:d4:5e: + e2:f1:12:ad:34:02:93:65:10:6c:93:93:2c:23:53:e8:ed:96: + c7:3b:6b:44:df:ff:24:8b:c1:cc:26:b2:1e:8f:26:66:34:3a: + bb:7d:ef:4e:a6:7e:b2:c8:93:c9:f7:46:5a:de:40:88:70:28: + c7:d1:fd:27:c3:99:fd:6a:a1:a5:e1:6d:c3:5a:bc:99:28:95: + e9:17:ed:a4:56:a5:04:ad:fb:74:a2:01:26:2a:5a:45:bc:7b: + 0d:df:0c:41:79:8b:b4:15:50:cd:88:ce:f5:a7:ee:cb:d2:5b: + 76:81:4c:1b:09:92:0e:e9:c6:42:df:b7:81:9e:89:3d:49:ed: + 17:fa:d2:2f:bd:8b:74:d5:cb:ce:af:46:6a:74:b3:34:a0:c5: + a0:64:66:7a:80:59:15:1e:de:16:df:11:3d:1e:96:e2:e5:2d: + f1:4d:20:f3:f6:f1:19:aa:ac:f8:b4:6e:76:a0:26:6c:cd:90: + f2:23:35:a0:8b:c8:e8:5d:27:5d:34:d3:69:74:61:c5:ac:6a: + 54:e9:86:8d:ca:ca:16:03:48:7f:cd:23:43:41:e2:77:3a:5d: + f2:3e:de:fa +-----BEGIN CERTIFICATE----- +MIID3DCCAsSgAwIBAgIJAIShcB0KktPNMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMRcwFQYDVQQDDA5ST09UX0NBX1NIQTI1NjAeFw0xNzAz +MzAwNDUxMDNaFw0yNzAzMjgwNDUxMDNaMG0xCzAJBgNVBAYTAlVTMQswCQYDVQQI +DAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3JnMQ0wCwYDVQQLDARKYXZh +MSUwIwYDVQQDDBxJTlRFUl9DQV9TSEExLVJPT1RfQ0FfU0hBMjU2MIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1jevL1eexD6j2Q7b4tvjSOLX8VIJGliV +26qyyrgCQvG33/XnWaTFxgMqjKQw6+zAI7P90w2KVWlmDSHeYsKmpiJmwS2H/ytC +zpGl+vk8qIGqsMHTVa8keXmHBlxIiWNTCdpoMwjXhidPdeKsJZd8ZIwBaJQeqPUK +CGywd3HLZdL8OqAKIt0ylkMSflCOv7gaLV+XkPc9W/zA7OjzVxwdto2AI+LTnjzG +cauwFQsExaVmxyvI+X7V8aVaFORAjR3yABy6ayanP5SnX+6zMn5W7Iw/J1e08GPh +Vu1nzkIIiYZNDit1WgXkrKL6TjsI0uC6bGs4d3lF3mSVJJa2KzHyNwIDAQABo4GM +MIGJMHkGA1UdIwRyMHChY6RhMF8xCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTEN +MAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3JnMQ0wCwYDVQQLDARKYXZhMRcwFQYD +VQQDDA5ST09UX0NBX1NIQTI1NoIJAKNSnYJv3cYdMAwGA1UdEwQFMAMBAf8wDQYJ +KoZIhvcNAQEFBQADggEBAFb7sKumuzpVBO1cO64MDTKPquy3JCzVN7kfkWQhwsBt +vNTUXuLxEq00ApNlEGyTkywjU+jtlsc7a0Tf/ySLwcwmsh6PJmY0Ort9706mfrLI +k8n3RlreQIhwKMfR/SfDmf1qoaXhbcNavJkolekX7aRWpQSt+3SiASYqWkW8ew3f +DEF5i7QVUM2IzvWn7svSW3aBTBsJkg7pxkLft4GeiT1J7Rf60i+9i3TVy86vRmp0 +szSgxaBkZnqAWRUe3hbfET0eluLlLfFNIPP28RmqrPi0bnagJmzNkPIjNaCLyOhd +J10002l0YcWsalTpho3KyhYDSH/NI0NB4nc6XfI+3vo= +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA1-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA1-PRIV.key new file mode 100644 index 00000000000..e1388a10251 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA1-PRIV.key @@ -0,0 +1,26 @@ +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDh12cWta4H1sY6 +KHyfvxSJk1JIUAe08JFmHwvO0Eb6LRmKrqwbXEyGs0CPGhMlnmxjvrfXbKkUjodY +9ByxSBa7zYaVdPDGKDQ3HvPxyjZ0npPrHDII2wR+0UOD0ftkDbPHWQFBsl0OY/sI +pRzihYRh8MwCrADdza3vHPrNBz2umuM5jnN20FVIGKhGMGbg5eackBmgvcaWT6BW +B67iYRWVRwLywdSE+imOIS4P7ivndBe1DlB+z4oBmbBwYkM+5WyR3yT4+stdByyn +naL+kExsC/TWDw+sE9TQUo2zqRbNI1j8UhBaQZz1pbX5YeGPTq/Z2J8EGvPxz6VY +PmkDyMl3AgMBAAECggEAKrlDKUqpZ5Y73di26smNKxGRqVhqfNJdz0HkS/We18kc +Yd31dR+a4oial/fI038K5ju4L6rAucDU3gEgRHFsy45v/Won+nS0nBDg+UbV0m4F +cZ7d4Er+qLcR3KgmtKDa98VgtXr2m7hSTypdMoUrrBOPpJnBeDRmyStkTtEl3Bfa +Fh72SZXNauGvB5+qrbPhls1HoWVbzZ3i6oUCBDrfmLD6G0ipGM+AQICmXjYX8OxT +Ye5u/6DU4TkWu5A6/1m0Q4clGZXSeMx2d4PkZ0jZKOXdhwvzAaGh7I0AkuA4ZlCj +slXENyAzQhm4EHHWxvld11e8oEh4DUfWtUXeLttawQKBgQDybE5gjAZdv+5BJXWV +l2G+zb5tKHWd0XQQ2epktX+i+iA5lA0bLkAA4rrmZVsDEc4D2yjINsopBHTjwvtV +F/LBBWIynm6MkIyjY6+0fBfoikz9ebKikuf1YRoRC5Dl0pd2Wa/ps2wowDbQnj3o +4e6x+z0WviyL+uRr1JyotR2J5wKBgQDufVw64Z6AdWThlnP8qXqW12QQBd5qChPr +fHJEkx0ViBoM97yalVzDssXn4X2ESVDqtsxH21SzKzDGzLoCG3PwCPgp9zWk9GS/ +HfhXFzI3qHIlI+s6481vjqDnXtvJ7oHutxYkkYQXSMgC69jeRY0nW78Bz03BAYjQ +boRmeK1x8QKBgQDw9VBOTMADLUPvQwGGKAsC8VQHAgEuVcONAF0nrvPoFcA0GwGP +87+wYayuVy5IdckVMiBuKW91p7VbsjHJGd2zl9tMPwfY9dCkkvBRcEr/W4A9Llqt +l2GyF8smCB4FIfZkr67Xlvy54Jxbbf5RXUi5ZeUJlwuGM2IaACGa2zM6HwKBgEmW +iOTqRTwh/RTWlcd6jAcLQybmiLBzl53r8l5SfoDsVA14S8vvFoaUHRjlrRMqhDtI +WFQ7yzDVvOE6vpJz4hxIyDo6u2TAvG10U/Kbh7VA1qe7I5QyQmuPuPprfKocXB9K +gxyZggalQIIWP/6lu15PoupuCvHpBUw7LcNorSwhAoGAXXBcp4U369B3ld+M+hC9 +G+2VttaC2917iqoM8R7WOiwez+10s+fNv89B6DjZxeX5haa7bbB+RvfqN8OysIRK +m0Bh4w6q/JuRydj9T5sJLk9oUrEFLncqihlNT+1WEwR5x50OODYjpHz1YORo5HzL +cnXKk8xTZFE7mXD1ZJoRLxc= diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA1.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA1.cer new file mode 100644 index 00000000000..3756ab2aeeb --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA1.cer @@ -0,0 +1,80 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 8d:a0:d2:8a:ee:0b:cf:64 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=ROOT_CA_SHA1 + Validity + Not Before: Mar 30 04:51:03 2017 GMT + Not After : Mar 28 04:51:03 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=INTER_CA_SHA256-ROOT_CA_SHA1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e1:d7:67:16:b5:ae:07:d6:c6:3a:28:7c:9f:bf: + 14:89:93:52:48:50:07:b4:f0:91:66:1f:0b:ce:d0: + 46:fa:2d:19:8a:ae:ac:1b:5c:4c:86:b3:40:8f:1a: + 13:25:9e:6c:63:be:b7:d7:6c:a9:14:8e:87:58:f4: + 1c:b1:48:16:bb:cd:86:95:74:f0:c6:28:34:37:1e: + f3:f1:ca:36:74:9e:93:eb:1c:32:08:db:04:7e:d1: + 43:83:d1:fb:64:0d:b3:c7:59:01:41:b2:5d:0e:63: + fb:08:a5:1c:e2:85:84:61:f0:cc:02:ac:00:dd:cd: + ad:ef:1c:fa:cd:07:3d:ae:9a:e3:39:8e:73:76:d0: + 55:48:18:a8:46:30:66:e0:e5:e6:9c:90:19:a0:bd: + c6:96:4f:a0:56:07:ae:e2:61:15:95:47:02:f2:c1: + d4:84:fa:29:8e:21:2e:0f:ee:2b:e7:74:17:b5:0e: + 50:7e:cf:8a:01:99:b0:70:62:43:3e:e5:6c:91:df: + 24:f8:fa:cb:5d:07:2c:a7:9d:a2:fe:90:4c:6c:0b: + f4:d6:0f:0f:ac:13:d4:d0:52:8d:b3:a9:16:cd:23: + 58:fc:52:10:5a:41:9c:f5:a5:b5:f9:61:e1:8f:4e: + af:d9:d8:9f:04:1a:f3:f1:cf:a5:58:3e:69:03:c8: + c9:77 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA1 + serial:F1:3B:B7:FB:28:3F:52:09 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 24:74:94:0a:7d:81:62:16:ed:4e:0f:e2:19:06:bd:8b:7a:e4: + 35:63:4c:73:ec:3a:45:d7:2a:8c:80:e6:6b:d9:26:7d:78:9f: + 6b:36:f9:fd:94:f7:ac:86:3c:0e:95:66:80:f3:0b:93:0f:44: + 0a:05:76:d9:1d:c6:37:6f:ea:02:b9:29:e9:96:11:d1:e6:1e: + 70:95:31:77:22:ed:3c:96:ad:9f:74:8c:41:f5:44:47:a2:4e: + d4:58:86:92:31:36:94:90:05:9d:94:16:8c:f8:c8:18:7b:45: + dc:49:45:53:63:06:bb:c6:a9:33:72:fe:48:7b:0e:21:89:e2: + 6c:44:29:3c:10:65:c6:7d:8e:6c:cb:95:ea:a1:ae:3b:c1:12: + 98:ce:b9:c8:98:12:0d:ac:a7:bd:31:cc:aa:ac:51:b4:a7:33: + 5b:60:0d:d6:ed:e0:29:5a:29:f5:fc:e0:27:db:77:88:fd:59: + 0c:02:70:d8:f4:1d:89:88:13:94:55:5b:77:a3:a6:8e:18:9a: + b8:82:5b:64:27:8c:ef:10:6a:df:ed:fd:a4:b5:2b:44:0f:5f: + 89:08:15:48:df:b0:13:08:7c:08:cc:07:ea:b8:a6:17:ab:35: + 65:07:2c:b9:ec:9a:d0:1f:e7:b9:a7:36:9e:24:f7:73:10:e0: + 70:6c:78:6e +-----BEGIN CERTIFICATE----- +MIID2DCCAsCgAwIBAgIJAI2g0oruC89kMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMRUwEwYDVQQDDAxST09UX0NBX1NIQTEwHhcNMTcwMzMw +MDQ1MTAzWhcNMjcwMzI4MDQ1MTAzWjBtMQswCQYDVQQGEwJVUzELMAkGA1UECAwC +Q0ExDTALBgNVBAcMBENpdHkxDDAKBgNVBAoMA09yZzENMAsGA1UECwwESmF2YTEl +MCMGA1UEAwwcSU5URVJfQ0FfU0hBMjU2LVJPT1RfQ0FfU0hBMTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOHXZxa1rgfWxjoofJ+/FImTUkhQB7TwkWYf +C87QRvotGYqurBtcTIazQI8aEyWebGO+t9dsqRSOh1j0HLFIFrvNhpV08MYoNDce +8/HKNnSek+scMgjbBH7RQ4PR+2QNs8dZAUGyXQ5j+wilHOKFhGHwzAKsAN3Nre8c ++s0HPa6a4zmOc3bQVUgYqEYwZuDl5pyQGaC9xpZPoFYHruJhFZVHAvLB1IT6KY4h +Lg/uK+d0F7UOUH7PigGZsHBiQz7lbJHfJPj6y10HLKedov6QTGwL9NYPD6wT1NBS +jbOpFs0jWPxSEFpBnPWltflh4Y9Or9nYnwQa8/HPpVg+aQPIyXcCAwEAAaOBijCB +hzB3BgNVHSMEcDBuoWGkXzBdMQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExDTAL +BgNVBAcMBENpdHkxDDAKBgNVBAoMA09yZzENMAsGA1UECwwESmF2YTEVMBMGA1UE +AwwMUk9PVF9DQV9TSEExggkA8Tu3+yg/UgkwDAYDVR0TBAUwAwEB/zANBgkqhkiG +9w0BAQsFAAOCAQEAJHSUCn2BYhbtTg/iGQa9i3rkNWNMc+w6RdcqjIDma9kmfXif +azb5/ZT3rIY8DpVmgPMLkw9ECgV22R3GN2/qArkp6ZYR0eYecJUxdyLtPJatn3SM +QfVER6JO1FiGkjE2lJAFnZQWjPjIGHtF3ElFU2MGu8apM3L+SHsOIYnibEQpPBBl +xn2ObMuV6qGuO8ESmM65yJgSDaynvTHMqqxRtKczW2AN1u3gKVop9fzgJ9t3iP1Z +DAJw2PQdiYgTlFVbd6OmjhiauIJbZCeM7xBq3+39pLUrRA9fiQgVSN+wEwh8CMwH +6rimF6s1ZQcsueya0B/nuac2niT3cxDgcGx4bg== +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA256-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA256-PRIV.key new file mode 100644 index 00000000000..e01b5aed2cd --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA256-PRIV.key @@ -0,0 +1,26 @@ +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDbXbqJwTisc3wF +Z6MYWonNxMsWBfNfwFB/KLQfEfZ+phvReORvJZ5lVT/1gTVs5/QhREU0qW48OxyM +NXKgkcBZGLkRvVlDaOEcbTIDa4PYf7rnsTtU8DWYuyqqmeBnJ2ViKJ3ZGA750ctm +ZsDZlWdwE5iCqX3hA/pfHGu+CNiW2jWSulookdIPqdJeLiwgnntm5tZFxoZ9hD1h +J88iRqmqpS4joYXPxUNxfJ49Nx4iRfrx7HpyUVg3i5Q2q/AVuVSwbbPfNaQrG71V +EbK0K7EjtL8Gw8DCS8Gvr0ApIpabA644BueWA9skjns9lvfSuH76Y5e2nHGJiOz7 +LWMFV24LAgMBAAECggEAD546u7gQCucl+1SHniJEEWxjcSv3SeftU0BYoqWqwRWe +gWl0Ch3Jizlollger6RME1pC+x7dBFjJDYp4oMn/wdgqxQKQKmZ7MITtvKSY/H8L +lZdevAtmJXud7AuMmIuLglOV+XDnEA5Jxv6l2Ff0x1v9zb+3gJ/B4aeqXBtRIFxD +CfCcvcN1Bl+jj2fvS8iRrqofGa6DGXZVZvtIVjIvJnR1YBVMVYBNs6kcscM5Nblr +PJFDDsg+Ph7hq5gpwj7pyb4e54sn06pdfBLgGkHJ82tCNkc+f4Ee2M7MoS//m4IC +ajV+xht4REHuB7h5GM50TF5Gziianyc3g8//M7sC8QKBgQD7tvSzJK1N0w9NPK1e +Q5zfEWxU1c7dJ/hr81OpvEzUut1vZeKT1mydtA0YJftDTFTXe5fsPKNTIrL4BWUw +PLa3jWQNNDSLDNhdoqKrno+017pD7+p8G8x3AfyHxn6x2Shoz0jHTnGf+Q0vnvdT +ZTFpWU+3J8Wp4+1Nx2lwGGEJXwKBgQDfGcnk/fTSs/QQNgzkC1HaQ35b66eEBwK3 +yi8KNsNxDByvdYGxaK/tLRiZIsKMxAV+3jebfA4WSgDkenmzGLn4gYUr5gkkmEW5 +irETT+HDK8LeM2iIbCROactwu3ytJrgpaoDXxRbDsGCUf98hjz1JDCR94wjGH78H +K3Pmbm6e1QKBgEIuTVIYj5RJrNlC3dZN8p3Xx+LaQER3cOJ5HIMhJhY8d2IFqLf0 +BaTFJTg3LEP6esgZD82l988w7Vs2l+9B10yVWTv7gOEaZHzh+OEklGYY3jlkiANP +j8eudwX/02nRTcWY0mrMniVQZv4hTqfXkFFBkSr3wwmzCr6LcpZtYn4DAoGBAIEm +2bTBu1/aoxhbYd0GHI1g8x5dbm1E7bLdzZt5Fm00GMsOGFVOiEGiEJJeCAgbVh8a +n1BYYYNPtfKOYDNoxgfxWtmN4o8Xw41kl5vZa5VjmPyu//2xtNbb8dTCBKvsNUJs +kEfYpZQFX/O3jsFLvauy5tElhCfFqv2IjyC/nzQ9AoGBAJLCz62crl/AXqArSnAH +efX9ozrNMJMQDMDtw5xB/EqRMazmTlqkYr0H4iTS69QNAPr8czdmpY6uO6BRE9+/ +f/tWZXQj7eT8pd1Dp2Ed1vHsOfiAUha0cYUMrqshsqKNXrCxl7144iRGZY7OjFI1 +USqVVNaci2IrtW5+NGV62BYP diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA256.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA256.cer new file mode 100644 index 00000000000..8c7e21cc629 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/INTER_CA_SHA256-ROOT_CA_SHA256.cer @@ -0,0 +1,80 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 84:a1:70:1d:0a:92:d3:cc + Signature Algorithm: sha256WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=ROOT_CA_SHA256 + Validity + Not Before: Mar 30 04:51:02 2017 GMT + Not After : Mar 28 04:51:02 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=INTER_CA_SHA256-ROOT_CA_SHA256 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:db:5d:ba:89:c1:38:ac:73:7c:05:67:a3:18:5a: + 89:cd:c4:cb:16:05:f3:5f:c0:50:7f:28:b4:1f:11: + f6:7e:a6:1b:d1:78:e4:6f:25:9e:65:55:3f:f5:81: + 35:6c:e7:f4:21:44:45:34:a9:6e:3c:3b:1c:8c:35: + 72:a0:91:c0:59:18:b9:11:bd:59:43:68:e1:1c:6d: + 32:03:6b:83:d8:7f:ba:e7:b1:3b:54:f0:35:98:bb: + 2a:aa:99:e0:67:27:65:62:28:9d:d9:18:0e:f9:d1: + cb:66:66:c0:d9:95:67:70:13:98:82:a9:7d:e1:03: + fa:5f:1c:6b:be:08:d8:96:da:35:92:ba:5a:28:91: + d2:0f:a9:d2:5e:2e:2c:20:9e:7b:66:e6:d6:45:c6: + 86:7d:84:3d:61:27:cf:22:46:a9:aa:a5:2e:23:a1: + 85:cf:c5:43:71:7c:9e:3d:37:1e:22:45:fa:f1:ec: + 7a:72:51:58:37:8b:94:36:ab:f0:15:b9:54:b0:6d: + b3:df:35:a4:2b:1b:bd:55:11:b2:b4:2b:b1:23:b4: + bf:06:c3:c0:c2:4b:c1:af:af:40:29:22:96:9b:03: + ae:38:06:e7:96:03:db:24:8e:7b:3d:96:f7:d2:b8: + 7e:fa:63:97:b6:9c:71:89:88:ec:fb:2d:63:05:57: + 6e:0b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA256 + serial:A3:52:9D:82:6F:DD:C6:1D + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 3f:f2:91:96:59:da:c1:8a:8c:4d:eb:25:1f:74:87:6f:fc:2e: + 92:7e:44:ff:a7:0b:78:aa:6d:2b:fe:b8:0a:b9:e9:bc:19:87: + 44:15:e1:3a:e4:54:e6:4b:54:3c:75:d9:f8:c9:07:83:74:f4: + 4c:ab:e4:6b:19:64:b6:4b:69:44:6e:74:f6:66:cf:16:43:8f: + 9c:cb:20:e4:7a:5e:78:13:00:6f:28:78:8d:c5:05:46:a9:92: + 0f:d0:38:c3:8b:0e:39:d4:87:e9:ee:35:07:78:dd:1a:1a:8c: + 3a:36:56:4e:3b:96:7a:d1:2c:29:95:06:29:ac:b2:f7:5c:fc: + 09:1c:72:24:e2:9e:72:bf:60:3a:7a:9b:59:35:48:6a:d2:3e: + 76:7f:ad:41:45:a5:6f:93:96:10:c4:4c:cf:3f:f1:1d:00:5f: + d1:60:f1:88:86:d8:ef:ff:72:63:8f:4c:df:9e:35:cb:17:2c: + 16:7b:d4:6c:0e:67:b6:ee:bc:68:07:b0:99:df:c5:f3:88:28: + a1:46:bb:6d:f5:2c:45:6b:e9:90:c0:78:35:20:73:14:5a:d0: + a5:56:cb:04:f4:43:a7:cf:28:f5:a3:5b:ac:f2:a3:4c:f6:39: + 3c:ef:f4:b1:42:20:8e:2a:14:0d:a1:b4:38:b2:f2:6c:14:33: + 05:04:bb:a7 +-----BEGIN CERTIFICATE----- +MIID3jCCAsagAwIBAgIJAIShcB0KktPMMA0GCSqGSIb3DQEBCwUAMF8xCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMRcwFQYDVQQDDA5ST09UX0NBX1NIQTI1NjAeFw0xNzAz +MzAwNDUxMDJaFw0yNzAzMjgwNDUxMDJaMG8xCzAJBgNVBAYTAlVTMQswCQYDVQQI +DAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3JnMQ0wCwYDVQQLDARKYXZh +MScwJQYDVQQDDB5JTlRFUl9DQV9TSEEyNTYtUk9PVF9DQV9TSEEyNTYwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDbXbqJwTisc3wFZ6MYWonNxMsWBfNf +wFB/KLQfEfZ+phvReORvJZ5lVT/1gTVs5/QhREU0qW48OxyMNXKgkcBZGLkRvVlD +aOEcbTIDa4PYf7rnsTtU8DWYuyqqmeBnJ2ViKJ3ZGA750ctmZsDZlWdwE5iCqX3h +A/pfHGu+CNiW2jWSulookdIPqdJeLiwgnntm5tZFxoZ9hD1hJ88iRqmqpS4joYXP +xUNxfJ49Nx4iRfrx7HpyUVg3i5Q2q/AVuVSwbbPfNaQrG71VEbK0K7EjtL8Gw8DC +S8Gvr0ApIpabA644BueWA9skjns9lvfSuH76Y5e2nHGJiOz7LWMFV24LAgMBAAGj +gYwwgYkweQYDVR0jBHIwcKFjpGEwXzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNB +MQ0wCwYDVQQHDARDaXR5MQwwCgYDVQQKDANPcmcxDTALBgNVBAsMBEphdmExFzAV +BgNVBAMMDlJPT1RfQ0FfU0hBMjU2ggkAo1Kdgm/dxh0wDAYDVR0TBAUwAwEB/zAN +BgkqhkiG9w0BAQsFAAOCAQEAP/KRllnawYqMTeslH3SHb/wukn5E/6cLeKptK/64 +CrnpvBmHRBXhOuRU5ktUPHXZ+MkHg3T0TKvkaxlktktpRG509mbPFkOPnMsg5Hpe +eBMAbyh4jcUFRqmSD9A4w4sOOdSH6e41B3jdGhqMOjZWTjuWetEsKZUGKayy91z8 +CRxyJOKecr9gOnqbWTVIatI+dn+tQUWlb5OWEMRMzz/xHQBf0WDxiIbY7/9yY49M +3541yxcsFnvUbA5ntu68aAewmd/F84gooUa7bfUsRWvpkMB4NSBzFFrQpVbLBPRD +p88o9aNbrPKjTPY5PO/0sUIgjioUDaG0OLLybBQzBQS7pw== +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA1-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA1-PRIV.key new file mode 100644 index 00000000000..c56e9f1bdae --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA1-PRIV.key @@ -0,0 +1,26 @@ +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDhROyqYZ5UdQJ0 +xJdG4B+aXPHbIKV0w5AvJ7r4SuvIJ/4pEmV6fIU3+4CvN2sXKzW+0DppOBz99Oe6 +19jfMAx5t0pKHkwh5J0bduLf1k83lm8CvoX1a9lYY6ER4Y8wWtTcHG016onl8Lxq +QVqlqbk9zsbNipvWxipIQOgzq7DmTXQ2Hrx0tg4DROlgwuarPBWcZjq6dG09nI0E +zSY/Wis619L/6sdCxGFhvnJ0YbULvIqdR2J638KEO+rx1RXD66Jqc0KhnGZLf7NT +YfTlY0zIMHE8oMkJPdH9tPKbyXMXhiG/u5x81RcJxT4gLi5fq2yrvMsaUC13bnJJ +npFNy6XTAgMBAAECggEAPS4h9Jg0jw2EUEBAMaCXFK5fhTrVlOO0Ggp5TgvTA3ZR +Ich8RQrih3TH2056yD0VCLC23HK/9Pz5npYWsW70RG5SP9UAqkfTn2znaxFiTF+P +4Lfr296hlc7hJOEUqXZRz0HtKzJ6pzd9hIIhY1K4G6A4AATAFFGXlC4Eolvj3Hf0 +NgVFDYaFDEpEiin+fAsM5c1ZE0pxRZSVE5Emr9XvkvxLm5dK9lKOyyOQ+5RHhxQ6 +J4n+6Ct0O+FkeP9u3jTMtew9gxTwvHSgkf05hSRoqgMKcusKpqhHp6E4mT7sus7q +AYzdv5sNIcx7PpojuHjploMH7ghhYxCmVOOFxXJ4CQKBgQD2naA8zZnh5BfbVC8p +C9A6HfwnZ7cCjGtL30y8fh8OAMHbdGE4JXlhifPgW7PDxZ0Yho4rYd9MxLVcGl+p +YPOKKcaKbzwdUJwZ4Zs1dJC+LTRqku6O3qlEofeojHN5IctLoLqDsiZBD7aT4l+O +wmAWqwLZZQtiFpA/jbCb/Qw7tQKBgQDp11rFSHLKuVdMuSnUon3WN6lj9WNM3KFy +C8R4EN/DTnuHrVL0MCff9eddBYvpQe0z/LA74oAD9fSjmtYe/24qIm2lAWVkwxBm +yyspUmOybU8Q3GN8xw1Vrwg8JR5JVAOwKHwCGmybT7Zs+9eJRONnnZ6nUbTQ94cP +sJVkyGUgZwKBgQCd/0CAk+xpl1tdbiLEtkfSZBF/IWhTXqkDM+2SuW6l5wBL29TJ +RuDsB5jR/Y4+96T86H++9XY9Va0nc9IjzvRYaQlE+ZzW3yUTQ8HPTn3JCWcSfE4Q +BEEHsojbWBhG28rGChRUeVceybVcK2SzLn6nJyqtIppXXkNOJDWoykcDHQKBgHzY +27+k1JTjq3ZtDaZXMvQiN7AEnYW17gRjv/uSlsVBq7ZelYGGDGQIeAQ0J+Tbq/cr +nDP80/hJYtnOmy9llL2uL/f+7NGFS8Z2Bo9DS7NBpQsNf5ho9fefQbhK4Qapcmak +1sCQtxec0XsSYpsJSphRkRkoCG/hGB0KXFi4nTVVAoGAJrrh1rG1UMXmFUpraXIy +Mc58lEYB87EkMOthyK8XklxLoYKPZlVS7AZZDtQMpRC6YnweiX6LmO4AamtlT71x +BzQgmwHn4wOaysDPHFuf5hNCobXJREoiNzHb4AcqiZ7SNAW5Jd+0/PSY47hrDnRy +wNFyg3O0k3kaXz5h3lVhxo4= diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA1.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA1.cer new file mode 100644 index 00000000000..490d03b0a78 --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA1.cer @@ -0,0 +1,80 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + f1:3b:b7:fb:28:3f:52:09 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=ROOT_CA_SHA1 + Validity + Not Before: Mar 30 04:51:01 2017 GMT + Not After : Mar 28 04:51:01 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=ROOT_CA_SHA1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e1:44:ec:aa:61:9e:54:75:02:74:c4:97:46:e0: + 1f:9a:5c:f1:db:20:a5:74:c3:90:2f:27:ba:f8:4a: + eb:c8:27:fe:29:12:65:7a:7c:85:37:fb:80:af:37: + 6b:17:2b:35:be:d0:3a:69:38:1c:fd:f4:e7:ba:d7: + d8:df:30:0c:79:b7:4a:4a:1e:4c:21:e4:9d:1b:76: + e2:df:d6:4f:37:96:6f:02:be:85:f5:6b:d9:58:63: + a1:11:e1:8f:30:5a:d4:dc:1c:6d:35:ea:89:e5:f0: + bc:6a:41:5a:a5:a9:b9:3d:ce:c6:cd:8a:9b:d6:c6: + 2a:48:40:e8:33:ab:b0:e6:4d:74:36:1e:bc:74:b6: + 0e:03:44:e9:60:c2:e6:ab:3c:15:9c:66:3a:ba:74: + 6d:3d:9c:8d:04:cd:26:3f:5a:2b:3a:d7:d2:ff:ea: + c7:42:c4:61:61:be:72:74:61:b5:0b:bc:8a:9d:47: + 62:7a:df:c2:84:3b:ea:f1:d5:15:c3:eb:a2:6a:73: + 42:a1:9c:66:4b:7f:b3:53:61:f4:e5:63:4c:c8:30: + 71:3c:a0:c9:09:3d:d1:fd:b4:f2:9b:c9:73:17:86: + 21:bf:bb:9c:7c:d5:17:09:c5:3e:20:2e:2e:5f:ab: + 6c:ab:bc:cb:1a:50:2d:77:6e:72:49:9e:91:4d:cb: + a5:d3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA1 + serial:F1:3B:B7:FB:28:3F:52:09 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 0b:be:7b:c7:53:14:87:37:02:66:37:f5:6f:38:3c:75:b3:72: + f6:f8:9c:77:4d:9a:e4:5c:23:3a:4a:5f:aa:6e:90:23:e9:b8: + 48:fd:6d:e1:88:b5:a2:a5:0a:30:c0:7d:33:a8:6f:79:42:52: + 80:f8:87:4b:2a:15:0a:ff:14:88:97:21:12:89:1c:d3:33:bf: + fa:4f:5e:68:9a:c6:69:2f:aa:1d:31:aa:80:f5:b0:d3:72:c9: + fa:ce:3b:5f:15:a6:61:e0:f1:d1:ab:e7:40:48:c1:d4:30:bd: + 0a:13:37:0d:ea:ac:38:b2:af:1b:78:3a:29:53:ee:90:71:3b: + 2b:a4:8b:16:e9:da:94:59:44:3d:7f:34:fb:0a:d1:6b:db:3d: + 66:01:a6:0f:98:b5:cc:57:39:b9:09:f2:01:cc:e5:89:86:7d: + f2:9a:b2:ad:08:3d:da:05:f9:24:1e:30:98:cc:92:a9:4c:4a: + cf:a3:53:6e:7f:5e:db:aa:43:9c:ac:b1:b5:80:ab:7e:a3:89: + 71:37:c2:4a:c1:16:9d:26:d5:70:89:8a:8e:a8:cb:40:3b:b8: + f0:d2:31:54:c2:1f:fc:24:5e:29:c1:5e:86:48:1e:83:4e:44: + 30:ff:8d:46:47:b6:0e:9c:77:bf:ba:08:8b:bd:eb:b7:ca:45: + 0a:e3:0c:ec +-----BEGIN CERTIFICATE----- +MIIDyDCCArCgAwIBAgIJAPE7t/soP1IJMA0GCSqGSIb3DQEBBQUAMF0xCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMRUwEwYDVQQDDAxST09UX0NBX1NIQTEwHhcNMTcwMzMw +MDQ1MTAxWhcNMjcwMzI4MDQ1MTAxWjBdMQswCQYDVQQGEwJVUzELMAkGA1UECAwC +Q0ExDTALBgNVBAcMBENpdHkxDDAKBgNVBAoMA09yZzENMAsGA1UECwwESmF2YTEV +MBMGA1UEAwwMUk9PVF9DQV9TSEExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEA4UTsqmGeVHUCdMSXRuAfmlzx2yCldMOQLye6+ErryCf+KRJlenyFN/uA +rzdrFys1vtA6aTgc/fTnutfY3zAMebdKSh5MIeSdG3bi39ZPN5ZvAr6F9WvZWGOh +EeGPMFrU3BxtNeqJ5fC8akFapam5Pc7GzYqb1sYqSEDoM6uw5k10Nh68dLYOA0Tp +YMLmqzwVnGY6unRtPZyNBM0mP1orOtfS/+rHQsRhYb5ydGG1C7yKnUdiet/ChDvq +8dUVw+uianNCoZxmS3+zU2H05WNMyDBxPKDJCT3R/bTym8lzF4Yhv7ucfNUXCcU+ +IC4uX6tsq7zLGlAtd25ySZ6RTcul0wIDAQABo4GKMIGHMHcGA1UdIwRwMG6hYaRf +MF0xCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoG +A1UECgwDT3JnMQ0wCwYDVQQLDARKYXZhMRUwEwYDVQQDDAxST09UX0NBX1NIQTGC +CQDxO7f7KD9SCTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQALvnvH +UxSHNwJmN/VvODx1s3L2+Jx3TZrkXCM6Sl+qbpAj6bhI/W3hiLWipQowwH0zqG95 +QlKA+IdLKhUK/xSIlyESiRzTM7/6T15omsZpL6odMaqA9bDTcsn6zjtfFaZh4PHR +q+dASMHUML0KEzcN6qw4sq8beDopU+6QcTsrpIsW6dqUWUQ9fzT7CtFr2z1mAaYP +mLXMVzm5CfIBzOWJhn3ymrKtCD3aBfkkHjCYzJKpTErPo1Nuf17bqkOcrLG1gKt+ +o4lxN8JKwRadJtVwiYqOqMtAO7jw0jFUwh/8JF4pwV6GSB6DTkQw/41GR7YOnHe/ +ugiLveu3ykUK4wzs +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA256-PRIV.key b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA256-PRIV.key new file mode 100644 index 00000000000..4c53e23e8ab --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA256-PRIV.key @@ -0,0 +1,26 @@ +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC2DzrIXts3huIs +dtX+ZbY6RR5/S4yXUs3jJXc4mbITLn7PO1QVBT528NZVOu6jUxXsPTpTg1jgresh +6Pcv1LNj7bP30uPXhmyawgQVUgLTGyU0+JWLJrpU7cEOTK4f/j58A+UHL255fM7T +B3EvIj2Ad1MAYwIvVZnAXPSFt72YGz15doYiewp8dTXcX4TsFisCbypFikWxpXIF +qjVqbAUx8fYgQxfPWFw4HbVvo3Nu1LqypswAfsmHd2v5nMv8wkAcPG5dIYHACN9r +kPLMoUNUcBLn6QdIUrhk7dldRlR0TWT+VtRLKVWlGkMk9rRK+RnskNSuPg8fjb/Y +gM0m5p0JAgMBAAECggEAPVk8cbClJjzpkhopWiRkF5abBEItCgD5KAXD+uqvuw77 +5FEVsE+oEORvFSFasOaaiJTJRsMH/A4fIbojMZb3LEE5V9VUuZeumSevwI92LDUF +gKgTnGRcfanwWCU2t8kwvRGC57zv+Tg5aZskZMGg/901tvemENVDjjLEoxqbZNmX +WZnhB8XiPxl9K32K0l+qNW3HvKJ8lkaW0L6/4HWWU4rYwbc9TZpzHDOXhAICQB76 +fCw4hcy1K6KjfGjfE/6afqMa76KSxxeCvUYorZlm2gk1WcEafkg9Jwzz2SWtsa8W +L+YzbTd1GE8Z9bDA88Dw3vgdC1Pt0ywX/fJ/GCDHUQKBgQDjNaW/enKYXGTsM5C1 +I94OgSmgnjnjPZIBY0u89iCAf07ueqrNaLJgOEkGpCrLEa4tC2qc57ge1DO2rxTa +6RowUzqG3Oqdsq21QaQZAmjjDC5mXlYPRpWvWVjBRaIDKw9zAUg9qEy24e/pRjdP +cugR30d1OaxExdgoAt8iOqZ67wKBgQDNIPqF/+npd1UAqgdC9lOxnPQly1zjz/zY +jbeJeww9Ut9aCXj0+we4gKhD37d178y1H2QBod+IPpqQ/uZmbNmN5JP+MIk2kZKB +4jquQLa5jEc+y57h8UrWJBY+Ls7xiu/cw3aCAk0JaZRSrH/KzWE91x3s7o2yV43d +dMkRmTTHhwKBgQCHaq4C1WP/UvIDpSgWDe6HDoxU4nj16vheQ2Qcl0T/0OCmWg36 +pu/JUUKU5rtqlHsO9cLxCVo/ZZH8y5TOdCfbrX8wafKbUqcdZKX9EeaZi+ULtiXs +rNEB1WqEpo/M+5kVnioENY6jYT2v9t14SK/wFvdr8pet1YzjK/L5X6NhmQKBgFK4 +0u7I9k61Ve0vpEAH0FaXIgo/yZUBYkj+VZ62pYfxbKsFmObKeSGZmMHObVC9RMNi +BlV2LwvlmzWP5eA2U0GahWgDsMH10KxaTCnLZSTMgkq7mLYrNW/IG8Q14jScQAC6 +PodNYD3EexEgCWUCkA19O885oKDkGAzPtOpI63TvAoGBAJvbKiJSFJNd3CIQlrOM +wNw+Sww+c2Qw4PZZvIJNzjWumjesfUsuAyySrO2nXPzzSOrh7dRW98suaFi1Mih6 +ZwBpIll5VQsd2dwEa6vp6RFGWFNKPvDILEVgcCEOmckKRWDo+fb5bx2VHj1v4kfG +MHDqy8Y2ercsU0Z5mEN8bUD7 diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA256.cer b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA256.cer new file mode 100644 index 00000000000..09d0dbd7f5c --- /dev/null +++ b/jdk/test/sun/security/ssl/CertPathRestrictions/certs/ROOT_CA_SHA256.cer @@ -0,0 +1,80 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + a3:52:9d:82:6f:dd:c6:1d + Signature Algorithm: sha256WithRSAEncryption + Issuer: C=US, ST=CA, L=City, O=Org, OU=Java, CN=ROOT_CA_SHA256 + Validity + Not Before: Mar 30 04:51:01 2017 GMT + Not After : Mar 28 04:51:01 2027 GMT + Subject: C=US, ST=CA, L=City, O=Org, OU=Java, CN=ROOT_CA_SHA256 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b6:0f:3a:c8:5e:db:37:86:e2:2c:76:d5:fe:65: + b6:3a:45:1e:7f:4b:8c:97:52:cd:e3:25:77:38:99: + b2:13:2e:7e:cf:3b:54:15:05:3e:76:f0:d6:55:3a: + ee:a3:53:15:ec:3d:3a:53:83:58:e0:ad:eb:21:e8: + f7:2f:d4:b3:63:ed:b3:f7:d2:e3:d7:86:6c:9a:c2: + 04:15:52:02:d3:1b:25:34:f8:95:8b:26:ba:54:ed: + c1:0e:4c:ae:1f:fe:3e:7c:03:e5:07:2f:6e:79:7c: + ce:d3:07:71:2f:22:3d:80:77:53:00:63:02:2f:55: + 99:c0:5c:f4:85:b7:bd:98:1b:3d:79:76:86:22:7b: + 0a:7c:75:35:dc:5f:84:ec:16:2b:02:6f:2a:45:8a: + 45:b1:a5:72:05:aa:35:6a:6c:05:31:f1:f6:20:43: + 17:cf:58:5c:38:1d:b5:6f:a3:73:6e:d4:ba:b2:a6: + cc:00:7e:c9:87:77:6b:f9:9c:cb:fc:c2:40:1c:3c: + 6e:5d:21:81:c0:08:df:6b:90:f2:cc:a1:43:54:70: + 12:e7:e9:07:48:52:b8:64:ed:d9:5d:46:54:74:4d: + 64:fe:56:d4:4b:29:55:a5:1a:43:24:f6:b4:4a:f9: + 19:ec:90:d4:ae:3e:0f:1f:8d:bf:d8:80:cd:26:e6: + 9d:09 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Authority Key Identifier: + DirName:/C=US/ST=CA/L=City/O=Org/OU=Java/CN=ROOT_CA_SHA256 + serial:A3:52:9D:82:6F:DD:C6:1D + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 6f:2f:a4:56:d5:58:6d:20:74:6b:66:b7:41:eb:c2:8c:56:2e: + 1b:51:79:b0:07:a6:63:28:8b:20:40:b9:72:4b:f5:e0:6b:18: + 39:5b:b4:ae:50:58:25:81:86:e3:19:ec:b1:dd:fb:5c:f5:d4: + a8:7d:a0:50:46:ac:1e:80:dc:cc:aa:0c:61:f8:a3:41:af:03: + 35:a4:02:4f:23:c7:5c:36:26:90:fe:51:07:58:0f:e7:14:26: + 34:c2:a7:bd:f2:34:33:cf:67:e4:2d:82:b6:e8:94:85:d6:8b: + 01:6f:ba:3d:78:f6:db:3d:dc:ba:6e:6d:83:fa:ea:d0:60:ab: + 1b:ad:9b:e2:ba:e3:e3:9f:26:5b:9a:c7:fb:9f:c1:7d:cc:0b: + cf:23:e0:ac:e1:e4:09:08:84:98:d4:6e:16:34:a5:5e:74:d5: + a8:61:e1:65:f7:9a:51:9f:f0:9f:86:65:ce:4f:b8:b6:64:7d: + 86:62:21:ec:71:50:70:ca:6b:2e:74:12:51:b1:68:b0:4a:66: + 19:60:e9:f8:b0:bf:6e:d8:ad:75:29:c3:31:13:73:01:3d:d5: + d4:5b:c2:60:bb:c4:c8:e6:29:cf:a3:49:65:8d:c2:1d:7d:c9: + 75:33:9b:97:73:38:99:5c:7d:b3:9f:b0:be:0d:f4:6a:c6:19: + 8d:98:a1:ca +-----BEGIN CERTIFICATE----- +MIIDzjCCAragAwIBAgIJAKNSnYJv3cYdMA0GCSqGSIb3DQEBCwUAMF8xCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3Jn +MQ0wCwYDVQQLDARKYXZhMRcwFQYDVQQDDA5ST09UX0NBX1NIQTI1NjAeFw0xNzAz +MzAwNDUxMDFaFw0yNzAzMjgwNDUxMDFaMF8xCzAJBgNVBAYTAlVTMQswCQYDVQQI +DAJDQTENMAsGA1UEBwwEQ2l0eTEMMAoGA1UECgwDT3JnMQ0wCwYDVQQLDARKYXZh +MRcwFQYDVQQDDA5ST09UX0NBX1NIQTI1NjCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBALYPOshe2zeG4ix21f5ltjpFHn9LjJdSzeMldziZshMufs87VBUF +Pnbw1lU67qNTFew9OlODWOCt6yHo9y/Us2Pts/fS49eGbJrCBBVSAtMbJTT4lYsm +ulTtwQ5Mrh/+PnwD5Qcvbnl8ztMHcS8iPYB3UwBjAi9VmcBc9IW3vZgbPXl2hiJ7 +Cnx1NdxfhOwWKwJvKkWKRbGlcgWqNWpsBTHx9iBDF89YXDgdtW+jc27UurKmzAB+ +yYd3a/mcy/zCQBw8bl0hgcAI32uQ8syhQ1RwEufpB0hSuGTt2V1GVHRNZP5W1Esp +VaUaQyT2tEr5GeyQ1K4+Dx+Nv9iAzSbmnQkCAwEAAaOBjDCBiTB5BgNVHSMEcjBw +oWOkYTBfMQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExDTALBgNVBAcMBENpdHkx +DDAKBgNVBAoMA09yZzENMAsGA1UECwwESmF2YTEXMBUGA1UEAwwOUk9PVF9DQV9T +SEEyNTaCCQCjUp2Cb93GHTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IB +AQBvL6RW1VhtIHRrZrdB68KMVi4bUXmwB6ZjKIsgQLlyS/Xgaxg5W7SuUFglgYbj +Geyx3ftc9dSofaBQRqwegNzMqgxh+KNBrwM1pAJPI8dcNiaQ/lEHWA/nFCY0wqe9 +8jQzz2fkLYK26JSF1osBb7o9ePbbPdy6bm2D+urQYKsbrZviuuPjnyZbmsf7n8F9 +zAvPI+Cs4eQJCISY1G4WNKVedNWoYeFl95pRn/CfhmXOT7i2ZH2GYiHscVBwymsu +dBJRsWiwSmYZYOn4sL9u2K11KcMxE3MBPdXUW8Jgu8TI5inPo0lljcIdfcl1M5uX +cziZXH2zn7C+DfRqxhmNmKHK +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/ssl/ServerHandshaker/HelloExtensionsTest.java b/jdk/test/sun/security/ssl/ServerHandshaker/HelloExtensionsTest.java new file mode 100644 index 00000000000..bb84d5f01f9 --- /dev/null +++ b/jdk/test/sun/security/ssl/ServerHandshaker/HelloExtensionsTest.java @@ -0,0 +1,287 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173783 + * @summary 6u141 IllegalArgumentException: jdk.tls.namedGroups + * run main/othervm HelloExtensionsTest + * run main/othervm HelloExtensionsTest -Djdk.tls.namedGroups="bug, bug" + * run main/othervm HelloExtensionsTest -Djdk.tls.namedGroups="secp521r1" + * + */ +import javax.crypto.*; +import javax.net.ssl.*; +import javax.net.ssl.SSLEngineResult.*; +import java.io.*; +import java.nio.*; +import java.security.*; + +public class HelloExtensionsTest { + + private static boolean debug = false; + private static boolean proceed = true; + private static boolean EcAvailable = isEcAvailable(); + + static String pathToStores = "../../../../javax/net/ssl/etc"; + private static String keyStoreFile = "keystore"; + private static String trustStoreFile = "truststore"; + private static String passwd = "passphrase"; + + private static String keyFilename = + System.getProperty("test.src", "./") + "/" + pathToStores + + "/" + keyStoreFile; + private static String trustFilename = + System.getProperty("test.src", "./") + "/" + pathToStores + + "/" + trustStoreFile; + + private static void checkDone(SSLEngine ssle) throws Exception { + if (!ssle.isInboundDone()) { + throw new Exception("isInboundDone isn't done"); + } + if (!ssle.isOutboundDone()) { + throw new Exception("isOutboundDone isn't done"); + } + } + + private static void runTest(SSLEngine ssle) throws Exception { + + /* + + A client hello message captured via wireshark by selecting + a TLSv1.2 Client Hello record and clicking through to the + TLSv1.2 Record Layer line and then selecting the hex stream + via "copy -> bytes -> hex stream". + + For Record purposes, here's the ClientHello : + + *** ClientHello, TLSv1.2 + RandomCookie: GMT: 1469560450 bytes = { 108, 140, 12, 202, + 2, 213, 10, 236, 143, 223, 58, 162, 228, 155, 239, 3, 98, + 232, 89, 41, 116, 120, 13, 37, 105, 153, 97, 241 } + Session ID: {} + Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, + TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, + TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, + TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, + TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + TLS_RSA_WITH_AES_128_CBC_SHA, + TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, + TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, + TLS_DHE_RSA_WITH_AES_128_CBC_SHA, + TLS_DHE_DSS_WITH_AES_128_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + TLS_RSA_WITH_AES_128_GCM_SHA256, + TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, + TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, + TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, + TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, + TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + SSL_RSA_WITH_3DES_EDE_CBC_SHA, + TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, + TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, + SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, + SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, + TLS_EMPTY_RENEGOTIATION_INFO_SCSV] + Compression Methods: { 0 } + Extension elliptic_curves, curve names: {secp256r1, + sect163k1, sect163r2, secp192r1, secp224r1, sect233k1, sect233r1, + sect283k1, sect283r1, secp384r1, sect409k1, sect409r1, secp521r1, + sect571k1, sect571r1, secp160k1, secp160r1, secp160r2, sect163r1, + secp192k1, sect193r1, sect193r2, secp224k1, sect239k1, secp256k1} + Extension ec_point_formats, formats: [uncompressed] + Extension signature_algorithms, signature_algorithms: + SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, + SHA256withECDSA, SHA256withRSA, Unknown (hash:0x3, signature:0x3), + Unknown (hash:0x3, signature:0x1), SHA1withECDSA, + SHA1withRSA, SHA1withDSA + Extension server_name, server_name: + [host_name: bugs.openjdk.java.net] + */ + + String hello = "16030300df010000db03035898b7826c8c0cc" + + "a02d50aec8fdf3aa2e49bef0362e8592974780d25699961f" + + "100003ac023c027003cc025c02900670040c009c013002fc" + + "004c00e00330032c02bc02f009cc02dc031009e00a2c008c" + + "012000ac003c00d0016001300ff01000078000a003400320" + + "0170001000300130015000600070009000a0018000b000c0" + + "019000d000e000f001000110002001200040005001400080" + + "016000b00020100000d00180016060306010503050104030" + + "401030303010203020102020000001a00180000156275677" + + "32e6f70656e6a646b2e6a6176612e6e6574"; + + byte[] msg_clihello = hexStringToByteArray(hello); + ByteBuffer bf_clihello = ByteBuffer.wrap(msg_clihello); + + SSLSession session = ssle.getSession(); + int appBufferMax = session.getApplicationBufferSize(); + int netBufferMax = session.getPacketBufferSize(); + + ByteBuffer serverIn = ByteBuffer.allocate(appBufferMax + 50); + ByteBuffer serverOut = ByteBuffer.wrap("I'm Server".getBytes()); + ByteBuffer sTOc = ByteBuffer.allocate(netBufferMax); + + ssle.beginHandshake(); + + // unwrap the clientHello message. + SSLEngineResult result = ssle.unwrap(bf_clihello, serverIn); + System.out.println("server unwrap " + result); + runDelegatedTasks(result, ssle); + + if (!proceed) { + //expected exception occurred. Don't process anymore + return; + } + + // one more step, ensure the clientHello message is parsed. + SSLEngineResult.HandshakeStatus status = ssle.getHandshakeStatus(); + if ( status == HandshakeStatus.NEED_UNWRAP) { + result = ssle.unwrap(bf_clihello, serverIn); + System.out.println("server unwrap " + result); + runDelegatedTasks(result, ssle); + } else if ( status == HandshakeStatus.NEED_WRAP) { + result = ssle.wrap(serverOut, sTOc); + System.out.println("server wrap " + result); + runDelegatedTasks(result, ssle); + } else { + throw new Exception("unexpected handshake status " + status); + } + + // enough, stop + } + + /* + * If the result indicates that we have outstanding tasks to do, + * go ahead and run them in this thread. + */ + private static void runDelegatedTasks(SSLEngineResult result, + SSLEngine engine) throws Exception { + + if (result.getHandshakeStatus() == HandshakeStatus.NEED_TASK) { + Runnable runnable; + try { + while ((runnable = engine.getDelegatedTask()) != null) { + log("\trunning delegated task..."); + runnable.run(); + } + } catch (ExceptionInInitializerError e) { + String v = System.getProperty("jdk.tls.namedGroups"); + if (!EcAvailable || v == null) { + // we weren't expecting this if no EC providers + throw new RuntimeException("Unexpected Error :" + e); + } + if (v != null && v.contains("bug")) { + // OK - we were expecting this Error + log("got expected error for bad jdk.tls.namedGroups"); + proceed = false; + return; + } else { + System.out.println("Unexpected error. " + + "jdk.tls.namedGroups value: " + v); + throw e; + } + } + HandshakeStatus hsStatus = engine.getHandshakeStatus(); + if (hsStatus == HandshakeStatus.NEED_TASK) { + throw new Exception( + "handshake shouldn't need additional tasks"); + } + log("\tnew HandshakeStatus: " + hsStatus); + } + } + + private static byte[] hexStringToByteArray(String s) { + int len = s.length(); + byte[] data = new byte[len / 2]; + for (int i = 0; i < len; i += 2) { + data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + + Character.digit(s.charAt(i+1), 16)); + } + return data; + } + + private static boolean isEcAvailable() { + try { + Signature.getInstance("SHA1withECDSA"); + Signature.getInstance("NONEwithECDSA"); + KeyAgreement.getInstance("ECDH"); + KeyFactory.getInstance("EC"); + KeyPairGenerator.getInstance("EC"); + AlgorithmParameters.getInstance("EC"); + } catch (Exception e) { + log("EC not available. Received: " + e); + return false; + } + return true; + } + + public static void main(String args[]) throws Exception { + SSLEngine ssle = createSSLEngine(keyFilename, trustFilename); + runTest(ssle); + System.out.println("Test Passed."); + } + + /* + * Create an initialized SSLContext to use for this test. + */ + static private SSLEngine createSSLEngine(String keyFile, String trustFile) + throws Exception { + + SSLEngine ssle; + + KeyStore ks = KeyStore.getInstance("JKS"); + KeyStore ts = KeyStore.getInstance("JKS"); + + char[] passphrase = "passphrase".toCharArray(); + + ks.load(new FileInputStream(keyFile), passphrase); + ts.load(new FileInputStream(trustFile), passphrase); + + KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); + kmf.init(ks, passphrase); + + TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); + tmf.init(ts); + + SSLContext sslCtx = SSLContext.getInstance("TLS"); + + sslCtx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); + + ssle = sslCtx.createSSLEngine(); + ssle.setUseClientMode(false); + + return ssle; + } + + + private static void log(String str) { + if (debug) { + System.out.println(str); + } + } +} diff --git a/jdk/test/sun/security/ssl/rsa/SignedObjectChain.java b/jdk/test/sun/security/ssl/rsa/SignedObjectChain.java index ba4b00c56d8..212384ac5bd 100644 --- a/jdk/test/sun/security/ssl/rsa/SignedObjectChain.java +++ b/jdk/test/sun/security/ssl/rsa/SignedObjectChain.java @@ -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 @@ -24,8 +24,9 @@ /* * @test * @bug 8050374 - * @compile ../../../../java/security/SignedObject/Chain.java * @summary Verify a chain of signed objects + * @compile ../../../../java/security/SignedObject/Chain.java + * @run main SignedObjectChain */ public class SignedObjectChain { diff --git a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java index 9ba18ac0f05..928bc5aa199 100644 --- a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java +++ b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java @@ -43,6 +43,7 @@ import java.util.List; import java.util.jar.JarEntry; import java.util.jar.JarFile; +import jdk.test.lib.SecurityTools; import jdk.testlibrary.*; import jdk.testlibrary.JarUtils; import sun.security.pkcs.ContentInfo; @@ -66,6 +67,7 @@ import sun.security.x509.X500Name; * java.base/sun.security.util * java.base/sun.security.tools.keytool * @library /lib/testlibrary + * @library /test/lib * @run main/timeout=600 TimestampCheck */ public class TimestampCheck { @@ -456,7 +458,19 @@ public class TimestampCheck { .shouldMatch("Timestamp signature algorithm: .*key.*weak"); verify(file, "-J-Djava.security.debug=jar") .shouldHaveExitValue(0) - .shouldMatch("SignatureException:.*Disabled"); + .shouldMatch("SignatureException:.*disabled"); + + // For 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms. + // Must call keytool the command, otherwise doPrintCert() might not + // be able to reset "jdk.certpath.disabledAlgorithms". + String sout = SecurityTools.keytool("-printcert -jarfile weak.jar") + .stderrShouldContain("The TSA certificate uses a 512-bit RSA key" + + " which is considered a security risk.") + .getStdout(); + if (sout.indexOf("weak", sout.indexOf("Timestamp:")) < 0) { + throw new RuntimeException("timestamp not weak: " + sout); + } } static void checkHalfWeak(String file) throws Throwable { diff --git a/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java b/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java index de225b2bcb3..cfe23932f3f 100644 --- a/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java +++ b/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -26,9 +26,10 @@ import jdk.testlibrary.JarUtils; /** * @test - * @bug 8024302 8026037 + * @bug 8024302 8026037 8176320 * @summary The test signs and verifies a jar file with -tsacert option * @library /lib/testlibrary warnings + * @library /test/lib * @modules java.base/sun.security.pkcs * java.base/sun.security.timestamp * java.base/sun.security.tools.keytool diff --git a/jdk/test/sun/security/tools/jarsigner/nameclash.sh b/jdk/test/sun/security/tools/jarsigner/nameclash.sh index 69fe12cb8c5..80c9c8da933 100644 --- a/jdk/test/sun/security/tools/jarsigner/nameclash.sh +++ b/jdk/test/sun/security/tools/jarsigner/nameclash.sh @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2014 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -63,4 +63,3 @@ $JARSIGNER $JFILE b -digestalg SHA-1 || exit 2 $JARSIGNER -verify -debug -strict $JFILE || exit 3 exit 0 - diff --git a/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java b/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java index 0c718db925e..89d86e9989c 100644 --- a/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java +++ b/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java @@ -24,6 +24,7 @@ /* * @test * @bug 8138766 + * @key intermittent * @summary New default -sigalg for keytool * @modules java.base/sun.security.tools.keytool * @modules jdk.crypto.ec diff --git a/jdk/test/sun/security/tools/keytool/WeakAlg.java b/jdk/test/sun/security/tools/keytool/WeakAlg.java new file mode 100644 index 00000000000..bb7ae777371 --- /dev/null +++ b/jdk/test/sun/security/tools/keytool/WeakAlg.java @@ -0,0 +1,606 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8171319 8177569 + * @summary keytool should print out warnings when reading or generating + * cert/cert req using weak algorithms + * @library /test/lib + * @modules java.base/sun.security.tools.keytool + * java.base/sun.security.tools + * java.base/sun.security.util + * @run main/othervm/timeout=600 -Duser.language=en -Duser.country=US WeakAlg + */ + +import jdk.test.lib.SecurityTools; +import jdk.test.lib.process.OutputAnalyzer; +import sun.security.tools.KeyStoreUtil; +import sun.security.util.DisabledAlgorithmConstraints; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintStream; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.security.CryptoPrimitive; +import java.security.KeyStore; +import java.security.cert.X509Certificate; +import java.util.Collections; +import java.util.EnumSet; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +public class WeakAlg { + + public static void main(String[] args) throws Throwable { + + rm("ks"); + + // -genkeypair, and -printcert, -list -alias, -exportcert + // (w/ different formats) + checkGenKeyPair("a", "-keyalg RSA -sigalg MD5withRSA", "MD5withRSA"); + checkGenKeyPair("b", "-keyalg RSA -keysize 512", "512-bit RSA key"); + checkGenKeyPair("c", "-keyalg RSA", null); + + kt("-list") + .shouldContain("Warning:") + .shouldMatch(".*MD5withRSA.*risk") + .shouldMatch(".*512-bit RSA key.*risk"); + kt("-list -v") + .shouldContain("Warning:") + .shouldMatch(".*MD5withRSA.*risk") + .shouldContain("MD5withRSA (weak)") + .shouldMatch(".*512-bit RSA key.*risk") + .shouldContain("512-bit RSA key (weak)"); + + // Multiple warnings for multiple cert in -printcert + // or -list or -exportcert + + // -certreq, -printcertreq, -gencert + checkCertReq("a", "", null); + gencert("c-a", "") + .shouldNotContain("Warning"); // new sigalg is not weak + gencert("c-a", "-sigalg MD2withRSA") + .shouldContain("Warning:") + .shouldMatch("The generated certificate.*MD2withRSA.*risk"); + + checkCertReq("a", "-sigalg MD5withRSA", "MD5withRSA"); + gencert("c-a", "") + .shouldContain("Warning:") + .shouldMatch("The certificate request.*MD5withRSA.*risk"); + gencert("c-a", "-sigalg MD2withRSA") + .shouldContain("Warning:") + .shouldMatch("The certificate request.*MD5withRSA.*risk") + .shouldMatch("The generated certificate.*MD2withRSA.*risk"); + + checkCertReq("b", "", "512-bit RSA key"); + gencert("c-b", "") + .shouldContain("Warning:") + .shouldMatch("The certificate request.*512-bit RSA key.*risk") + .shouldMatch("The generated certificate.*512-bit RSA key.*risk"); + + checkCertReq("c", "", null); + gencert("a-c", "") + .shouldContain("Warning:") + .shouldMatch("The issuer.*MD5withRSA.*risk"); + + // but the new cert is not weak + kt("-printcert -file a-c.cert") + .shouldNotContain("Warning") + .shouldNotContain("weak"); + + gencert("b-c", "") + .shouldContain("Warning:") + .shouldMatch("The issuer.*512-bit RSA key.*risk"); + + // -importcert + checkImport(); + + // -importkeystore + checkImportKeyStore(); + + // -gencrl, -printcrl + + checkGenCRL("a", "", null); + checkGenCRL("a", "-sigalg MD5withRSA", "MD5withRSA"); + checkGenCRL("b", "", "512-bit RSA key"); + checkGenCRL("c", "", null); + + kt("-delete -alias b"); + kt("-printcrl -file b.crl") + .shouldContain("WARNING: not verified"); + } + + static void checkImportKeyStore() throws Exception { + + saveStore(); + + rm("ks"); + kt("-importkeystore -srckeystore ks2 -srcstorepass changeit") + .shouldContain("3 entries successfully imported") + .shouldContain("Warning") + .shouldMatch(".*512-bit RSA key.*risk") + .shouldMatch(".*MD5withRSA.*risk"); + + rm("ks"); + kt("-importkeystore -srckeystore ks2 -srcstorepass changeit -srcalias a") + .shouldContain("Warning") + .shouldMatch(".*MD5withRSA.*risk"); + + reStore(); + } + + static void checkImport() throws Exception { + + saveStore(); + + // add trusted cert + + // cert already in + kt("-importcert -alias d -file a.cert", "no") + .shouldContain("Certificate already exists in keystore") + .shouldContain("Warning") + .shouldMatch("The input.*MD5withRSA.*risk") + .shouldContain("Do you still want to add it?"); + kt("-importcert -alias d -file a.cert -noprompt") + .shouldContain("Warning") + .shouldMatch("The input.*MD5withRSA.*risk") + .shouldNotContain("[no]"); + + // cert is self-signed + kt("-delete -alias a"); + kt("-delete -alias d"); + kt("-importcert -alias d -file a.cert", "no") + .shouldContain("Warning") + .shouldContain("MD5withRSA (weak)") + .shouldMatch("The input.*MD5withRSA.*risk") + .shouldContain("Trust this certificate?"); + kt("-importcert -alias d -file a.cert -noprompt") + .shouldContain("Warning") + .shouldMatch("The input.*MD5withRSA.*risk") + .shouldNotContain("[no]"); + + // JDK-8177569: no warning for sigalg of trusted cert + String weakSigAlgCA = null; + KeyStore ks = KeyStoreUtil.getCacertsKeyStore(); + if (ks != null) { + DisabledAlgorithmConstraints disabledCheck = + new DisabledAlgorithmConstraints( + DisabledAlgorithmConstraints.PROPERTY_CERTPATH_DISABLED_ALGS); + Set sigPrimitiveSet = Collections + .unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE)); + + for (String s : Collections.list(ks.aliases())) { + if (ks.isCertificateEntry(s)) { + X509Certificate c = (X509Certificate)ks.getCertificate(s); + String sigAlg = c.getSigAlgName(); + if (!disabledCheck.permits(sigPrimitiveSet, sigAlg, null)) { + weakSigAlgCA = sigAlg; + Files.write(Paths.get("ca.cert"), + ks.getCertificate(s).getEncoded()); + break; + } + } + } + } + if (weakSigAlgCA != null) { + // The following 2 commands still have a warning on why not using + // the -cacerts option directly. + kt("-list -keystore " + KeyStoreUtil.getCacerts()) + .shouldNotContain("risk"); + kt("-list -v -keystore " + KeyStoreUtil.getCacerts()) + .shouldNotContain("risk"); + + // -printcert will always show warnings + kt("-printcert -file ca.cert") + .shouldContain("name: " + weakSigAlgCA + " (weak)") + .shouldContain("Warning") + .shouldMatch("The certificate.*" + weakSigAlgCA + ".*risk"); + kt("-printcert -file ca.cert -trustcacerts") // -trustcacerts useless + .shouldContain("name: " + weakSigAlgCA + " (weak)") + .shouldContain("Warning") + .shouldMatch("The certificate.*" + weakSigAlgCA + ".*risk"); + + // Importing with -trustcacerts ignore CA cert's sig alg + kt("-delete -alias d"); + kt("-importcert -alias d -trustcacerts -file ca.cert", "no") + .shouldContain("Certificate already exists in system-wide CA") + .shouldNotContain("risk") + .shouldContain("Do you still want to add it to your own keystore?"); + kt("-importcert -alias d -trustcacerts -file ca.cert -noprompt") + .shouldNotContain("risk") + .shouldNotContain("[no]"); + + // but not without -trustcacerts + kt("-delete -alias d"); + kt("-importcert -alias d -file ca.cert", "no") + .shouldContain("name: " + weakSigAlgCA + " (weak)") + .shouldContain("Warning") + .shouldMatch("The input.*" + weakSigAlgCA + ".*risk") + .shouldContain("Trust this certificate?"); + kt("-importcert -alias d -file ca.cert -noprompt") + .shouldContain("Warning") + .shouldMatch("The input.*" + weakSigAlgCA + ".*risk") + .shouldNotContain("[no]"); + } + + // a non self-signed weak cert + reStore(); + certreq("b", ""); + gencert("c-b", ""); + kt("-importcert -alias d -file c-b.cert") // weak only, no prompt + .shouldContain("Warning") + .shouldNotContain("512-bit RSA key (weak)") + .shouldMatch("The input.*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + kt("-delete -alias b"); + kt("-delete -alias c"); + kt("-delete -alias d"); + + kt("-importcert -alias d -file c-b.cert", "no") // weak and not trusted + .shouldContain("Warning") + .shouldContain("512-bit RSA key (weak)") + .shouldMatch("The input.*512-bit RSA key.*risk") + .shouldContain("Trust this certificate?"); + kt("-importcert -alias d -file c-b.cert -noprompt") + .shouldContain("Warning") + .shouldMatch("The input.*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + // a non self-signed strong cert + reStore(); + certreq("a", ""); + gencert("c-a", ""); + kt("-importcert -alias d -file c-a.cert") // trusted + .shouldNotContain("Warning") + .shouldNotContain("[no]"); + + kt("-delete -alias a"); + kt("-delete -alias c"); + kt("-delete -alias d"); + + kt("-importcert -alias d -file c-a.cert", "no") // not trusted + .shouldNotContain("Warning") + .shouldContain("Trust this certificate?"); + kt("-importcert -alias d -file c-a.cert -noprompt") + .shouldNotContain("Warning") + .shouldNotContain("[no]"); + + // install reply + + reStore(); + certreq("c", ""); + gencert("a-c", ""); + kt("-importcert -alias c -file a-c.cert") + .shouldContain("Warning") + .shouldMatch("Issuer .*MD5withRSA.*risk"); + + // JDK-8177569: no warning for sigalg of trusted cert + reStore(); + // Change a into a TrustedCertEntry + kt("-exportcert -alias a -file a.cert"); + kt("-delete -alias a"); + kt("-importcert -alias a -file a.cert -noprompt"); + kt("-list -alias a -v") + .shouldNotContain("weak") + .shouldNotContain("Warning"); + // This time a is trusted and no warning on its weak sig alg + kt("-importcert -alias c -file a-c.cert") + .shouldNotContain("Warning"); + + reStore(); + + gencert("a-b", ""); + gencert("b-c", ""); + + // Full chain with root + cat("a-a-b-c.cert", "b-c.cert", "a-b.cert", "a.cert"); + kt("-importcert -alias c -file a-a-b-c.cert") // only weak + .shouldContain("Warning") + .shouldMatch("Reply #2 of 3.*512-bit RSA key.*risk") + .shouldMatch("Reply #3 of 3.*MD5withRSA.*risk") + .shouldNotContain("[no]"); + + // Without root + cat("a-b-c.cert", "b-c.cert", "a-b.cert"); + kt("-importcert -alias c -file a-b-c.cert") // only weak + .shouldContain("Warning") + .shouldMatch("Reply #2 of 2.*512-bit RSA key.*risk") + .shouldMatch("Issuer .*MD5withRSA.*risk") + .shouldNotContain("[no]"); + + reStore(); + gencert("b-a", ""); + + kt("-importcert -alias a -file b-a.cert") + .shouldContain("Warning") + .shouldMatch("Issuer .*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + kt("-importcert -alias a -file c-a.cert") + .shouldNotContain("Warning"); + + kt("-importcert -alias b -file c-b.cert") + .shouldContain("Warning") + .shouldMatch("The input.*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + reStore(); + gencert("b-a", ""); + + cat("c-b-a.cert", "b-a.cert", "c-b.cert"); + + kt("-printcert -file c-b-a.cert") + .shouldContain("Warning") + .shouldMatch("The certificate #2 of 2.*512-bit RSA key.*risk"); + + kt("-delete -alias b"); + + kt("-importcert -alias a -file c-b-a.cert") + .shouldContain("Warning") + .shouldMatch("Reply #2 of 2.*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + kt("-delete -alias c"); + kt("-importcert -alias a -file c-b-a.cert", "no") + .shouldContain("Top-level certificate in reply:") + .shouldContain("512-bit RSA key (weak)") + .shouldContain("Warning") + .shouldMatch("Reply #2 of 2.*512-bit RSA key.*risk") + .shouldContain("Install reply anyway?"); + kt("-importcert -alias a -file c-b-a.cert -noprompt") + .shouldContain("Warning") + .shouldMatch("Reply #2 of 2.*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + reStore(); + } + + private static void cat(String dest, String... src) throws IOException { + System.out.println("---------------------------------------------"); + System.out.printf("$ cat "); + + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + for (String s : src) { + System.out.printf(s + " "); + bout.write(Files.readAllBytes(Paths.get(s))); + } + Files.write(Paths.get(dest), bout.toByteArray()); + System.out.println("> " + dest); + } + + static void checkGenCRL(String alias, String options, String bad) { + + OutputAnalyzer oa = kt("-gencrl -alias " + alias + + " -id 1 -file " + alias + ".crl " + options); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The generated CRL.*" + bad + ".*risk"); + } + + oa = kt("-printcrl -file " + alias + ".crl"); + if (bad == null) { + oa.shouldNotContain("Warning") + .shouldContain("Verified by " + alias + " in keystore") + .shouldNotContain("(weak"); + } else { + oa.shouldContain("Warning:") + .shouldMatch("The CRL.*" + bad + ".*risk") + .shouldContain("Verified by " + alias + " in keystore") + .shouldContain(bad + " (weak)"); + } + } + + static void checkCertReq( + String alias, String options, String bad) { + + OutputAnalyzer oa = certreq(alias, options); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The generated certificate request.*" + bad + ".*risk"); + } + + oa = kt("-printcertreq -file " + alias + ".req"); + if (bad == null) { + oa.shouldNotContain("Warning") + .shouldNotContain("(weak)"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The certificate request.*" + bad + ".*risk") + .shouldContain(bad + " (weak)"); + } + } + + static void checkGenKeyPair( + String alias, String options, String bad) { + + OutputAnalyzer oa = genkeypair(alias, options); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The generated certificate.*" + bad + ".*risk"); + } + + oa = kt("-exportcert -alias " + alias + " -file " + alias + ".cert"); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + + oa = kt("-exportcert -rfc -alias " + alias + " -file " + alias + ".cert"); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + + oa = kt("-printcert -rfc -file " + alias + ".cert"); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + + oa = kt("-list -alias " + alias); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + + // With cert content + + oa = kt("-printcert -file " + alias + ".cert"); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldContain(bad + " (weak)") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + + oa = kt("-list -v -alias " + alias); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldContain(bad + " (weak)") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + } + + // This is slow, but real keytool process is launched. + static OutputAnalyzer kt1(String cmd, String... input) { + cmd = "-keystore ks -storepass changeit " + + "-keypass changeit " + cmd; + System.out.println("---------------------------------------------"); + try { + SecurityTools.setResponse(input); + return SecurityTools.keytool(cmd); + } catch (Throwable e) { + throw new RuntimeException(e); + } + } + + // Fast keytool execution by directly calling its main() method + static OutputAnalyzer kt(String cmd, String... input) { + PrintStream out = System.out; + PrintStream err = System.err; + InputStream ins = System.in; + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + ByteArrayOutputStream berr = new ByteArrayOutputStream(); + boolean succeed = true; + try { + cmd = "-keystore ks -storepass changeit " + + "-keypass changeit " + cmd; + System.out.println("---------------------------------------------"); + System.out.println("$ keytool " + cmd); + System.out.println(); + String feed = ""; + if (input.length > 0) { + feed = Stream.of(input).collect(Collectors.joining("\n")) + "\n"; + } + System.setIn(new ByteArrayInputStream(feed.getBytes())); + System.setOut(new PrintStream(bout)); + System.setErr(new PrintStream(berr)); + sun.security.tools.keytool.Main.main( + cmd.trim().split("\\s+")); + } catch (Exception e) { + // Might be a normal exception when -debug is on or + // SecurityException (thrown by jtreg) when System.exit() is called + if (!(e instanceof SecurityException)) { + e.printStackTrace(); + } + succeed = false; + } finally { + System.setOut(out); + System.setErr(err); + System.setIn(ins); + } + String sout = new String(bout.toByteArray()); + String serr = new String(berr.toByteArray()); + System.out.println("STDOUT:\n" + sout + "\nSTDERR:\n" + serr); + if (!succeed) { + throw new RuntimeException(); + } + return new OutputAnalyzer(sout, serr); + } + + static OutputAnalyzer genkeypair(String alias, String options) { + return kt("-genkeypair -alias " + alias + " -dname CN=" + alias + + " -keyalg RSA -storetype JKS " + options); + } + + static OutputAnalyzer certreq(String alias, String options) { + return kt("-certreq -alias " + alias + + " -file " + alias + ".req " + options); + } + + static OutputAnalyzer exportcert(String alias) { + return kt("-exportcert -alias " + alias + " -file " + alias + ".cert"); + } + + static OutputAnalyzer gencert(String relation, String options) { + int pos = relation.indexOf("-"); + String issuer = relation.substring(0, pos); + String subject = relation.substring(pos + 1); + return kt(" -gencert -alias " + issuer + " -infile " + subject + + ".req -outfile " + relation + ".cert " + options); + } + + static void saveStore() throws IOException { + System.out.println("---------------------------------------------"); + System.out.println("$ cp ks ks2"); + Files.copy(Paths.get("ks"), Paths.get("ks2"), + StandardCopyOption.REPLACE_EXISTING); + } + + static void reStore() throws IOException { + System.out.println("---------------------------------------------"); + System.out.println("$ cp ks2 ks"); + Files.copy(Paths.get("ks2"), Paths.get("ks"), + StandardCopyOption.REPLACE_EXISTING); + } + + static void rm(String s) throws IOException { + System.out.println("---------------------------------------------"); + System.out.println("$ rm " + s); + Files.deleteIfExists(Paths.get(s)); + } +} diff --git a/jdk/test/sun/security/util/FilePermCompat/CompatImpact.java b/jdk/test/sun/security/util/FilePermCompat/CompatImpact.java index 7b2db0417e1..3ead58127e6 100644 --- a/jdk/test/sun/security/util/FilePermCompat/CompatImpact.java +++ b/jdk/test/sun/security/util/FilePermCompat/CompatImpact.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -23,13 +23,14 @@ /* * @test - * @bug 8164705 + * @bug 8164705 8168410 * @summary check compatibility after FilePermission change * @library /java/security/testlibrary/ * @modules java.base/jdk.internal.misc * @run main CompatImpact prepare * @run main CompatImpact builtin - * @run main CompatImpact mine + * @run main/othervm -Djdk.security.filePermCompat=true CompatImpact mine + * @run main/fail CompatImpact mine * @run main CompatImpact dopriv */ @@ -72,7 +73,8 @@ public class CompatImpact { Files.copy(Paths.get(cp, "CompatImpact$DoPrivInner.class"), Paths.get("inner", "CompatImpact$DoPrivInner.class")); break; - // run tests with different policy impls + // default policy always covered, user-defined depends on + // system property jdk.security.filePermCompact. case "builtin": case "mine": cp = System.getProperty("test.classes"); @@ -222,7 +224,8 @@ public class CompatImpact { // Return a Proc object for different policy types private static Proc p(String type, String f) throws Exception { Proc p = Proc.create("CompatImpact") - .prop("java.security.manager", ""); + .prop("java.security.manager", "") + .inheritProp("jdk.security.filePermCompat"); p.args("test", type); switch (type) { case "builtin": diff --git a/jdk/test/sun/security/util/FilePermCompat/Flag.java b/jdk/test/sun/security/util/FilePermCompat/Flag.java index 30c97e2892b..dab4cff5b14 100644 --- a/jdk/test/sun/security/util/FilePermCompat/Flag.java +++ b/jdk/test/sun/security/util/FilePermCompat/Flag.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -25,19 +25,16 @@ * @test * @bug 8164705 * @summary check jdk.filepermission.canonicalize - * @library /java/security/testlibrary/ - * @modules java.base/jdk.internal.misc - * @run main/othervm -Djdk.io.permissionsUseCanonicalPath=true Flag truetrue - * @run main/othervm -Djdk.io.permissionsUseCanonicalPath=false Flag falsetrue - * @run main/othervm Flag falsetrue + * @run main/othervm/policy=flag.policy + * -Djdk.io.permissionsUseCanonicalPath=true Flag true true + * @run main/othervm/policy=flag.policy + * -Djdk.io.permissionsUseCanonicalPath=false Flag false true + * @run main/othervm/policy=flag.policy Flag false true */ import java.io.File; import java.io.FilePermission; import java.lang.*; -import java.security.Permission; -import java.security.Policy; -import java.security.ProtectionDomain; public class Flag { public static void main(String[] args) throws Exception { @@ -51,15 +48,6 @@ public class Flag { FilePermission fp2 = new FilePermission(abs.toString(), "read"); test1 = fp1.equals(fp2); - Policy pol = new Policy() { - @java.lang.Override - public boolean implies(ProtectionDomain domain, Permission permission) { - return fp1.implies(permission); - } - }; - - Policy.setPolicy(pol); - System.setSecurityManager(new SecurityManager()); try { System.getSecurityManager().checkPermission(fp2); test2 = true; @@ -67,8 +55,9 @@ public class Flag { test2 = false; } - if (!args[0].equals(test1 + "" + test2)) { - throw new Exception("Test failed: " + test1 + test2); + if (test1 != Boolean.parseBoolean(args[0]) || + test2 != Boolean.parseBoolean(args[1])) { + throw new Exception("Test failed: " + test1 + " " + test2); } } } diff --git a/jdk/test/sun/security/util/FilePermCompat/flag.policy b/jdk/test/sun/security/util/FilePermCompat/flag.policy new file mode 100644 index 00000000000..70e052a5ac9 --- /dev/null +++ b/jdk/test/sun/security/util/FilePermCompat/flag.policy @@ -0,0 +1,4 @@ +grant { + permission java.io.FilePermission "x", "read"; + permission java.util.PropertyPermission "user.dir", "read"; +}; diff --git a/jdk/test/sun/security/x509/URICertStore/SocksProxy.java b/jdk/test/sun/security/x509/URICertStore/SocksProxy.java index 50c6e89c787..a44cf603124 100644 --- a/jdk/test/sun/security/x509/URICertStore/SocksProxy.java +++ b/jdk/test/sun/security/x509/URICertStore/SocksProxy.java @@ -8,7 +8,7 @@ * * 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 + * 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). * diff --git a/jdk/test/sun/text/IntHashtable/Bug4170614Test.sh b/jdk/test/sun/text/IntHashtable/Bug4170614Test.sh index 0c31934d01c..e70f4905831 100644 --- a/jdk/test/sun/text/IntHashtable/Bug4170614Test.sh +++ b/jdk/test/sun/text/IntHashtable/Bug4170614Test.sh @@ -60,8 +60,8 @@ cd ${TESTSRC} TEST_JAVABASE=${TESTCLASSES}/java.base mkdir -p ${TEST_JAVABASE} ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \ - -Xmodule:java.base \ - -d ${TEST_JAVABASE} Bug4170614Test.java + --patch-module java.base=patch-src \ + -d ${TEST_JAVABASE} patch-src/java/text/Bug4170614Test.java ${TESTJAVA}/bin/java ${TESTVMOPTS} --patch-module java.base=${TEST_JAVABASE} java.text.Bug4170614Test diff --git a/jdk/test/sun/text/IntHashtable/Bug4170614Test.java b/jdk/test/sun/text/IntHashtable/patch-src/java/text/Bug4170614Test.java similarity index 100% rename from jdk/test/sun/text/IntHashtable/Bug4170614Test.java rename to jdk/test/sun/text/IntHashtable/patch-src/java/text/Bug4170614Test.java diff --git a/jdk/test/sun/tools/jcmd/TEST.properties b/jdk/test/sun/tools/jcmd/TEST.properties new file mode 100644 index 00000000000..0bd03a75b92 --- /dev/null +++ b/jdk/test/sun/tools/jcmd/TEST.properties @@ -0,0 +1,2 @@ +modules = jdk.jcmd + diff --git a/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java b/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java index 36481d6ebce..22da2ff4420 100644 --- a/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java +++ b/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java @@ -34,15 +34,14 @@ import jdk.testlibrary.JcmdBase; import jdk.testlibrary.OutputAnalyzer; import jdk.testlibrary.Utils; -/** - * Unit test for jcmd utility. Tests jcmd options which do not send - * requests to a specific JVM process. - */ /* * @test * @bug 7104647 + * @summary Unit test for jcmd utility. Tests jcmd options which do not send + * requests to a specific JVM process. + * * @library /lib/testlibrary - * @modules java.management + * * @build jdk.testlibrary.* * @run main TestJcmdDefaults */ diff --git a/jdk/test/sun/tools/jcmd/TestJcmdSanity.java b/jdk/test/sun/tools/jcmd/TestJcmdSanity.java index c36c9e895b2..9a2140455aa 100644 --- a/jdk/test/sun/tools/jcmd/TestJcmdSanity.java +++ b/jdk/test/sun/tools/jcmd/TestJcmdSanity.java @@ -35,15 +35,14 @@ import jdk.testlibrary.OutputAnalyzer; import jdk.testlibrary.ProcessTools; import jdk.testlibrary.Utils; -/** - * Unit test for jcmd utility. The test will send different diagnostic command - * requests to the current java process. - */ /* * @test * @bug 7104647 7154822 + * @summary Unit test for jcmd utility. The test will send different diagnostic + * command requests to the current java process. + * * @library /lib/testlibrary - * @modules java.management + * * @build jdk.testlibrary.* * @run main/othervm -XX:+UsePerfData TestJcmdSanity */ diff --git a/jdk/test/sun/tools/jconsole/ResourceCheckTest.java b/jdk/test/sun/tools/jconsole/ResourceCheckTest.java index 6d91b5b3eff..a678a476136 100644 --- a/jdk/test/sun/tools/jconsole/ResourceCheckTest.java +++ b/jdk/test/sun/tools/jconsole/ResourceCheckTest.java @@ -22,18 +22,18 @@ */ /** + * @test + * @bug 5008856 5023573 5024917 5062569 7172176 + * @summary 'missing resource key' error for key = "Operating system" * - * @test - * @bug 5008856 5023573 5024917 5062569 7172176 - * @summary 'missing resource key' error for key = "Operating system" - * @modules jdk.jconsole/sun.tools.jconsole - * jdk.jconsole/sun.tools.jconsole.resources:open - * @run main ResourceCheckTest + * @modules jdk.jconsole/sun.tools.jconsole + * jdk.jconsole/sun.tools.jconsole.resources:open + * + * @run main ResourceCheckTest */ import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java index 9285044b358..6191cae2e2e 100644 --- a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java +++ b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -85,7 +85,6 @@ public class BasicLauncherTest { try (OutputStream out = toolProcess.getOutputStream()) { out.write("universe\n".getBytes()); - out.write("printmdo -a\n".getBytes()); out.write("quit\n".getBytes()); } @@ -94,13 +93,6 @@ public class BasicLauncherTest { try (BufferedReader reader = new BufferedReader(new InputStreamReader(toolProcess.getInputStream()))) { String line; - String unexpectedMsg = - "One or more of 'VirtualCallData', 'CounterData', " + - "'ReceiverTypeData', 'bci', 'MethodData' " + - "or 'java/lang/Object' not found"; - boolean knownClassFound = false; - boolean knownProfileDataTypeFound = false; - boolean knownTokensFound = false; while ((line = reader.readLine()) != null) { line = line.trim(); @@ -110,27 +102,6 @@ public class BasicLauncherTest { unexpected = new RuntimeException("CollectedHeap type should be known."); break; } - else if (line.contains("missing reason for ")) { - unexpected = new RuntimeException("missing reason for "); - break; - } - if (line.contains("VirtualCallData") || - line.contains("CounterData") || - line.contains("ReceiverTypeData")) { - knownProfileDataTypeFound = true; - } - if (line.contains("bci") || - line.contains("MethodData")) { - knownTokensFound = true; - } - if (line.contains("java/lang/Object")) { - knownClassFound = true; - } - } - if ((knownClassFound == false) || - (knownTokensFound == false) || - (knownProfileDataTypeFound == false)) { - unexpected = new RuntimeException(unexpectedMsg); } } @@ -144,9 +115,6 @@ public class BasicLauncherTest { throw unexpected; } - if (unexpected != null) { - throw unexpected; - } } catch (Exception ex) { throw new RuntimeException("Test ERROR " + ex, ex); } finally { diff --git a/jdk/test/sun/tools/jhsdb/TEST.properties b/jdk/test/sun/tools/jhsdb/TEST.properties new file mode 100644 index 00000000000..7b91d856e43 --- /dev/null +++ b/jdk/test/sun/tools/jhsdb/TEST.properties @@ -0,0 +1,3 @@ +modules = jdk.hotspot.agent \ + java.management + diff --git a/jdk/test/sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java b/jdk/test/sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java index 75437fa4ed3..9e5a1f15586 100644 --- a/jdk/test/sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java +++ b/jdk/test/sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java @@ -36,11 +36,12 @@ import jdk.test.lib.Platform; * @test * @bug 8042397 * @summary Unit test for jmap utility test heap configuration reader - * @modules jdk.hotspot.agent/sun.jvm.hotspot + * * @library /test/lib * @library /lib/testlibrary - * @build jdk.testlibrary.* - * @build jdk.test.lib.apps.* + * @modules java.management + * jdk.hotspot.agent/sun.jvm.hotspot + * * @build JMapHeapConfigTest TmtoolTestScenario * @run main JMapHeapConfigTest */ diff --git a/jdk/test/sun/tools/jinfo/JInfoTest.java b/jdk/test/sun/tools/jinfo/JInfoTest.java index 720874ba567..a7b6bc3832a 100644 --- a/jdk/test/sun/tools/jinfo/JInfoTest.java +++ b/jdk/test/sun/tools/jinfo/JInfoTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -36,11 +36,12 @@ import jdk.test.lib.apps.LingeredApp; /* * @test * @summary Unit test for jinfo utility - * @modules java.base/jdk.internal.misc + * * @library /test/lib - * @build jdk.test.lib.* - * @build jdk.test.lib.apps.* - * @build jdk.test.lib.process.* + * @modules java.base/jdk.internal.misc + * java.management + * jdk.jcmd + * * @run main JInfoTest */ public class JInfoTest { @@ -88,8 +89,8 @@ public class JInfoTest { LingeredApp.startApp(params, app2); OutputAnalyzer output = jinfo("JInfoTestLingeredApp"); output.shouldHaveExitValue(0); - // "HotSpot(TM)" written once per proc - documentMatch(output.getStdout(), ".*HotSpot\\(TM\\).*HotSpot\\(TM\\).*"); + // "Runtime Environment" written once per proc + documentMatch(output.getStdout(), ".*Runtime Environment.*Runtime Environment.*"); } finally { JInfoTestLingeredApp.stopApp(app1); JInfoTestLingeredApp.stopApp(app2); diff --git a/jdk/test/sun/tools/jinfo/TEST.properties b/jdk/test/sun/tools/jinfo/TEST.properties new file mode 100644 index 00000000000..0bd03a75b92 --- /dev/null +++ b/jdk/test/sun/tools/jinfo/TEST.properties @@ -0,0 +1,2 @@ +modules = jdk.jcmd + diff --git a/jdk/test/sun/tools/jmap/TEST.properties b/jdk/test/sun/tools/jmap/TEST.properties new file mode 100644 index 00000000000..0bd03a75b92 --- /dev/null +++ b/jdk/test/sun/tools/jmap/TEST.properties @@ -0,0 +1,2 @@ +modules = jdk.jcmd + diff --git a/jdk/test/sun/tools/jps/LingeredApp.java b/jdk/test/sun/tools/jps/LingeredApp.java index b4aab24bc41..0de79453aa5 100644 --- a/jdk/test/sun/tools/jps/LingeredApp.java +++ b/jdk/test/sun/tools/jps/LingeredApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -141,7 +141,7 @@ public class LingeredApp { if (appProcess == null) { throw new RuntimeException("Process is not alive"); } - return appProcess.getPid(); + return appProcess.pid(); } /** diff --git a/jdk/test/sun/tools/jstack/TEST.properties b/jdk/test/sun/tools/jstack/TEST.properties new file mode 100644 index 00000000000..0bd03a75b92 --- /dev/null +++ b/jdk/test/sun/tools/jstack/TEST.properties @@ -0,0 +1,2 @@ +modules = jdk.jcmd + diff --git a/jdk/test/sun/tools/jstat/JStatInterval.java b/jdk/test/sun/tools/jstat/JStatInterval.java index 3b29136e756..e3e017e6f29 100644 --- a/jdk/test/sun/tools/jstat/JStatInterval.java +++ b/jdk/test/sun/tools/jstat/JStatInterval.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, 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 @@ -36,11 +36,8 @@ import jdk.testlibrary.ProcessTools; import jdk.testlibrary.JDKToolLauncher; -import java.io.BufferedReader; -import java.io.InputStreamReader; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; public class JStatInterval { private static final String READY = "READY"; @@ -88,7 +85,7 @@ public class JStatInterval { throw new Error("Unable to start the monitored application."); } - String pidStr = String.valueOf(app.getPid()); + String pidStr = String.valueOf(app.pid()); JDKToolLauncher l = JDKToolLauncher.createUsingTestJDK("jstat"); l.addToolArg("-compiler"); l.addToolArg(pidStr); diff --git a/jdk/test/sun/tools/jstat/TEST.properties b/jdk/test/sun/tools/jstat/TEST.properties new file mode 100644 index 00000000000..0bd03a75b92 --- /dev/null +++ b/jdk/test/sun/tools/jstat/TEST.properties @@ -0,0 +1,2 @@ +modules = jdk.jcmd + diff --git a/jdk/test/sun/tools/jstatd/TEST.properties b/jdk/test/sun/tools/jstatd/TEST.properties new file mode 100644 index 00000000000..4741e99f37a --- /dev/null +++ b/jdk/test/sun/tools/jstatd/TEST.properties @@ -0,0 +1,5 @@ +modules = java.management \ + java.rmi + jdk.jcmd \ + jdk.jstatd + diff --git a/jdk/test/sun/tools/jstatd/TestJstatdDefaults.java b/jdk/test/sun/tools/jstatd/TestJstatdDefaults.java index 1b0011b70f5..9cecd9cd642 100644 --- a/jdk/test/sun/tools/jstatd/TestJstatdDefaults.java +++ b/jdk/test/sun/tools/jstatd/TestJstatdDefaults.java @@ -25,8 +25,9 @@ * @test * @bug 4990825 * @key intermittent + * * @library /lib/testlibrary - * @modules java.management + * * @build jdk.testlibrary.* JstatdTest JstatGCUtilParser * @run main/timeout=60 TestJstatdDefaults */ diff --git a/jdk/test/sun/tools/jstatd/TestJstatdExternalRegistry.java b/jdk/test/sun/tools/jstatd/TestJstatdExternalRegistry.java index 9c9b564349c..bed70457464 100644 --- a/jdk/test/sun/tools/jstatd/TestJstatdExternalRegistry.java +++ b/jdk/test/sun/tools/jstatd/TestJstatdExternalRegistry.java @@ -25,8 +25,9 @@ * @test * @bug 4990825 7092186 * @key intermittent + * * @library /lib/testlibrary - * @modules java.management + * * @build jdk.testlibrary.* JstatdTest JstatGCUtilParser * @run main/timeout=60 TestJstatdExternalRegistry */ diff --git a/jdk/test/sun/tools/jstatd/TestJstatdPort.java b/jdk/test/sun/tools/jstatd/TestJstatdPort.java index 8443b3e1bee..393def6f37b 100644 --- a/jdk/test/sun/tools/jstatd/TestJstatdPort.java +++ b/jdk/test/sun/tools/jstatd/TestJstatdPort.java @@ -25,8 +25,9 @@ * @test * @bug 4990825 * @key intermittent + * * @library /lib/testlibrary - * @modules java.management + * * @build jdk.testlibrary.* JstatdTest JstatGCUtilParser * @run main/timeout=60 TestJstatdPort */ diff --git a/jdk/test/sun/tools/jstatd/TestJstatdPortAndServer.java b/jdk/test/sun/tools/jstatd/TestJstatdPortAndServer.java index 9cce98a347d..c2d6faf44b5 100644 --- a/jdk/test/sun/tools/jstatd/TestJstatdPortAndServer.java +++ b/jdk/test/sun/tools/jstatd/TestJstatdPortAndServer.java @@ -25,8 +25,9 @@ * @test * @bug 4990825 * @key intermittent + * * @library /lib/testlibrary - * @modules java.management + * * @build jdk.testlibrary.* JstatdTest JstatGCUtilParser * @run main/timeout=60 TestJstatdPortAndServer */ diff --git a/jdk/test/sun/tools/jstatd/TestJstatdServer.java b/jdk/test/sun/tools/jstatd/TestJstatdServer.java index 565f799765d..8d440d2681b 100644 --- a/jdk/test/sun/tools/jstatd/TestJstatdServer.java +++ b/jdk/test/sun/tools/jstatd/TestJstatdServer.java @@ -25,8 +25,9 @@ * @test * @bug 4990825 * @key intermittent + * * @library /lib/testlibrary - * @modules java.management + * * @build jdk.testlibrary.* JstatdTest JstatGCUtilParser * @run main/timeout=60 TestJstatdServer */ diff --git a/jdk/test/sun/util/calendar/zi/tzdata/VERSION b/jdk/test/sun/util/calendar/zi/tzdata/VERSION index 016d94c21fa..eb5b4595f3e 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/VERSION +++ b/jdk/test/sun/util/calendar/zi/tzdata/VERSION @@ -21,4 +21,4 @@ # or visit www.oracle.com if you need additional information or have any # questions. # -tzdata2016j +tzdata2017b diff --git a/jdk/test/sun/util/calendar/zi/tzdata/africa b/jdk/test/sun/util/calendar/zi/tzdata/africa index 67918afea67..d3de96d1431 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/africa +++ b/jdk/test/sun/util/calendar/zi/tzdata/africa @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-20): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -54,39 +54,33 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # +# European-style abbreviations are commonly used along the Mediterranean. +# For sub-Saharan Africa abbreviations were less standardized. # Previous editions of this database used WAT, CAT, SAT, and EAT -# for +0:00 through +3:00, respectively, -# but Mark R V Murray reports that -# 'SAST' is the official abbreviation for +2:00 in the country of South Africa, -# 'CAT' is commonly used for +2:00 in countries north of South Africa, and -# 'WAT' is probably the best name for +1:00, as the common phrase for +# for UT +00 through +03, respectively, +# but in 1997 Mark R V Murray reported that +# 'SAST' is the official abbreviation for +02 in the country of South Africa, +# 'CAT' is commonly used for +02 in countries north of South Africa, and +# 'WAT' is probably the best name for +01, as the common phrase for # the area that includes Nigeria is "West Africa". -# He has heard of "Western Sahara Time" for +0:00 but can find no reference. # -# To make things confusing, 'WAT' seems to have been used for -1:00 long ago; -# I'd guess that this was because people needed _some_ name for -1:00, -# and at the time, far west Africa was the only major land area in -1:00. -# This usage is now obsolete, as the last use of -1:00 on the African -# mainland seems to have been 1976 in Western Sahara. -# -# To summarize, the following abbreviations seem to have some currency: -# -1:00 WAT West Africa Time (no longer used) -# 0:00 GMT Greenwich Mean Time -# 2:00 CAT Central Africa Time -# 2:00 SAST South Africa Standard Time -# and Murray suggests the following abbreviation: -# 1:00 WAT West Africa Time -# I realize that this leads to 'WAT' being used for both -1:00 and 1:00 -# for times before 1976, but this is the best I can think of -# until we get more information. +# To summarize, the following abbreviations seemed to have some currency: +# +00 GMT Greenwich Mean Time +# +02 CAT Central Africa Time +# +02 SAST South Africa Standard Time +# and Murray suggested the following abbreviation: +# +01 WAT West Africa Time +# Murray's suggestion seems to have caught on in news reports and the like. +# I vaguely recall 'WAT' also being used for -01 in the past but +# cannot now come up with solid citations. # # I invented the following abbreviations; corrections are welcome! -# 2:00 WAST West Africa Summer Time -# 2:30 BEAT British East Africa Time (no longer used) -# 2:45 BEAUT British East Africa Unified Time (no longer used) -# 3:00 CAST Central Africa Summer Time (no longer used) -# 3:00 SAST South Africa Summer Time (no longer used) -# 3:00 EAT East Africa Time +# +02 WAST West Africa Summer Time +# +03 CAST Central Africa Summer Time (no longer used) +# +03 SAST South Africa Summer Time (no longer used) +# +03 EAT East Africa Time +# 'EAT' also seems to have caught on; the others are rare but are paired +# with better-attested non-DST abbreviations. # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -144,17 +138,17 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 # Cape Verde / Cabo Verde # -# Shanks gives 1907 for the transition to CVT. +# Shanks gives 1907 for the transition to +02. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1907 # Praia - -2:00 - CVT 1942 Sep - -2:00 1:00 CVST 1945 Oct 15 - -2:00 - CVT 1975 Nov 25 2:00 - -1:00 - CVT + -2:00 - -02 1942 Sep + -2:00 1:00 -01 1945 Oct 15 + -2:00 - -02 1975 Nov 25 2:00 + -1:00 - -01 # Central African Republic # See Africa/Lagos. @@ -411,7 +405,7 @@ Rule Ghana 1920 1942 - Sep 1 0:00 0:20 GHST Rule Ghana 1920 1942 - Dec 31 0:00 0 GMT # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 - 0:00 Ghana %s + 0:00 Ghana GMT/+0020 # Guinea # See Africa/Abidjan. @@ -420,20 +414,20 @@ Zone Africa/Accra -0:00:52 - LMT 1918 # # Shanks gives 1911-05-26 for the transition to WAT, # evidently confusing the date of the Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # with the date that it took effect, namely 1912-01-01. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 - -1:00 - WAT 1975 + -1:00 - -01 1975 0:00 - GMT # Kenya # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 - 2:30 - BEAT 1940 - 2:45 - BEAUT 1960 + 2:30 - +0230 1940 + 2:45 - +0245 1960 3:00 - EAT Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia Link Africa/Nairobi Africa/Asmara # Eritrea @@ -449,18 +443,25 @@ Link Africa/Nairobi Indian/Mayotte # See Africa/Johannesburg. # Liberia -# From Paul Eggert (2006-03-22): -# In 1972 Liberia was the last country to switch -# from a UTC offset that was not a multiple of 15 or 20 minutes. -# Howse reports that it was in honor of their president's birthday. -# Shank & Pottenger report the date as May 1, whereas Howse reports Jan; -# go with Shanks & Pottenger. -# For Liberia before 1972, Shanks & Pottenger report -0:44, whereas Howse and -# Whitman each report -0:44:30; go with the more precise figure. +# +# From Paul Eggert (2017-03-02): +# +# The Nautical Almanac for the Year 1970, p 264, is the source for -0:44:30. +# +# In 1972 Liberia was the last country to switch from a UTC offset +# that was not a multiple of 15 or 20 minutes. The 1972 change was on +# 1972-01-07, according to an entry dated 1972-01-04 on p 330 of: +# Presidential Papers: First year of the administration of +# President William R. Tolbert, Jr., July 23, 1971-July 31, 1972. +# Monrovia: Executive Mansion. +# +# Use the abbreviation "MMT" before 1972, as the more-accurate numeric +# abbreviation "-004430" would be one byte over the POSIX limit. +# # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time - -0:44:30 - LRT 1972 May # Liberia Time + -0:44:30 - MMT 1972 Jan 7 # approximately MMT 0:00 - GMT ############################################################################### @@ -619,7 +620,7 @@ Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 S Rule Mauritius 2009 only - Mar lastSun 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis - 4:00 Mauritius MU%sT # Mauritius Time + 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez # no information; probably like Indian/Mauritius @@ -938,14 +939,14 @@ Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 # since most of it was then controlled by Morocco. Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún - -1:00 - WAT 1976 Apr 14 + -1:00 - -01 1976 Apr 14 0:00 Morocco WE%sT # Mozambique # # Shanks gives 1903-03-01 for the transition to CAT. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -972,16 +973,19 @@ Link Africa/Maputo Africa/Lusaka # Zambia # the country are close to 40 minutes earlier in sunrise than the rest # of the country. # -# From Paul Eggert (2007-03-31): -# Apparently the Caprivi Strip informally observes Botswana time, but -# we have no details. In the meantime people there can use Africa/Gaborone. +# From Paul Eggert (2017-02-22): +# Although the Zambezi Region (formerly known as Caprivi) informally +# observes Botswana time, we have no details about historical practice. +# In the meantime people there can use Africa/Gaborone. +# See: Immanuel S. The Namibian. 2017-02-23. +# http://www.namibian.com.na/51480/read/Time-change-divides-lawmakers # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Namibia 1994 max - Sep Sun>=1 2:00 1:00 S Rule Namibia 1995 max - Apr Sun>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 - 1:30 - SWAT 1903 Mar # SW Africa Time + 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 2:00 1:00 SAST 1943 Mar 21 2:00 2:00 - SAST 1990 Mar 21 # independence @@ -1008,7 +1012,7 @@ Link Africa/Lagos Africa/Porto-Novo # Benin # Réunion # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis - 4:00 - RET # Réunion Time + 4:00 - +04 # # Crozet Islands also observes Réunion time; see the 'antarctica' file. # @@ -1043,7 +1047,7 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis # Seychelles # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria - 4:00 - SCT # Seychelles Time + 4:00 - +04 # From Paul Eggert (2001-05-30): # Aldabra, Farquhar, and Desroches, originally dependencies of the # Seychelles, were transferred to the British Indian Ocean Territory diff --git a/jdk/test/sun/util/calendar/zi/tzdata/antarctica b/jdk/test/sun/util/calendar/zi/tzdata/antarctica index 2398ac51b07..c88c0b4107b 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/antarctica +++ b/jdk/test/sun/util/calendar/zi/tzdata/antarctica @@ -133,7 +133,8 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13 # O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02 # Prat, -6230-05941 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09 -# These locations have always used Santiago time; use TZ='America/Santiago'. +# These locations employ Region of Magallanes time; use +# TZ='America/Punta_Arenas'. # China - year-round bases # Great Wall, King George Island, -6213-05858, since 1985-02-20 diff --git a/jdk/test/sun/util/calendar/zi/tzdata/asia b/jdk/test/sun/util/calendar/zi/tzdata/asia index ac207403859..306a2aa8bc2 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/asia +++ b/jdk/test/sun/util/calendar/zi/tzdata/asia @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2015-08-08): +# From Paul Eggert (2017-01-13): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -58,29 +58,24 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # -# I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. -# Corrections are welcome! +# The following alphabetic abbreviations appear in these tables: # std dst # LMT Local Mean Time # 2:00 EET EEST Eastern European Time # 2:00 IST IDT Israel -# 3:00 AST ADT Arabia* -# 3:30 IRST IRDT Iran* -# 4:00 GST Gulf* # 5:30 IST India -# 7:00 ICT Indochina, most times and locations* # 7:00 WIB west Indonesia (Waktu Indonesia Barat) # 8:00 WITA central Indonesia (Waktu Indonesia Tengah) # 8:00 CST China -# 8:00 IDT Indochina, 1943-45, 1947-55, 1960-75 (some locations)* -# 8:00 JWST Western Standard Time (Japan, 1896/1937)* -# 8:30 KST KDT Korea when at +0830* -# 9:00 JCST Central Standard Time (Japan, 1896/1937) +# 8:30 KST KDT Korea when at +0830 # 9:00 WIT east Indonesia (Waktu Indonesia Timur) # 9:00 JST JDT Japan # 9:00 KST KDT Korea when at +09 # 9:30 ACST Australian Central Standard Time +# Otherwise, these tables typically use numeric abbreviations like +03 +# and +0330 for integer hour and minute UTC offsets. Although earlier +# editions invented alphabetic time zone abbreviations for every +# offset, this did not reflect common practice. # # See the 'europe' file for Russia and Turkey in Asia. @@ -88,7 +83,7 @@ # Incorporates data for Singapore from Robert Elz' asia 1.1, as well as # additional information from Tom Yap, Sun Microsystems Intercontinental # Technical Support (including a page from the Official Airline Guide - -# Worldwide Edition). The names for time zones are guesses. +# Worldwide Edition). ############################################################################### @@ -109,8 +104,8 @@ Rule RussiaAsia 1996 2011 - Oct lastSun 2:00s 0 - # Afghanistan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 - 4:00 - AFT 1945 - 4:30 - AFT + 4:00 - +04 1945 + 4:30 - +0430 # Armenia # From Paul Eggert (2006-03-22): @@ -253,18 +248,17 @@ Rule Dhaka 2009 only - Dec 31 24:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct # Howrah Mean Time? - 6:30 - BURT 1942 May 15 # Burma Time - 5:30 - IST 1942 Sep - 6:30 - BURT 1951 Sep 30 - 6:00 - DACT 1971 Mar 26 # Dacca Time - 6:00 - BDT 2009 - 6:00 Dhaka BD%sT + 6:30 - +0630 1942 May 15 + 5:30 - +0530 1942 Sep + 6:30 - +0630 1951 Sep 30 + 6:00 - +06 2009 + 6:00 Dhaka +06/+07 # Bhutan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu - 5:30 - IST 1987 Oct - 6:00 - BTT # Bhutan Time + 5:30 - +0530 1987 Oct + 6:00 - +06 # British Indian Ocean Territory # Whitman and the 1995 CIA time zone map say 5:00, but the @@ -274,14 +268,14 @@ Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu # then contained the Chagos Archipelago). # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Chagos 4:49:40 - LMT 1907 - 5:00 - IOT 1996 # BIOT Time - 6:00 - IOT + 5:00 - +05 1996 + 6:00 - +06 # Brunei # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan - 7:30 - BNT 1933 - 8:00 - BNT + 7:30 - +0730 1933 + 8:00 - +08 # Burma / Myanmar @@ -290,9 +284,9 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Yangon 6:24:40 - LMT 1880 # or Rangoon 6:24:40 - RMT 1920 # Rangoon Mean Time? - 6:30 - BURT 1942 May # Burma Time - 9:00 - JST 1945 May 3 - 6:30 - MMT # Myanmar Time + 6:30 - +0630 1942 May + 9:00 - +09 1945 May 3 + 6:30 - +0630 # Cambodia # See Asia/Bangkok. @@ -355,7 +349,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D # (could be true), for the moment I am assuming that those two # counties are mistakes in the astro.com data. -# From Paul Eggert (2014-06-30): +# From Paul Eggert (2017-01-05): # Alois Treindl kindly sent me translations of the following two sources: # # (1) @@ -413,28 +407,26 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D # mainly observed in coastal areas), the five zones were: # # Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT +08:30 -# Asia/Harbin (currently a link to Asia/Shanghai) +# Now part of Asia/Shanghai; its pre-1970 times are not recorded here. # Heilongjiang (except Mohe county), Jilin # # Zhongyuan Time ("Central plain Time") UT +08 -# Asia/Shanghai +# Now part of Asia/Shanghai. # most of China -# This currently represents most other zones as well, -# as apparently these regions have been the same since 1970. # Milne gives 8:05:43.2 for Xujiahui Observatory time; round to nearest. # Guo says Shanghai switched to UT +08 "from the end of the 19th century". # -# Long-shu Time (probably due to Long and Shu being two names of the area) UT +07 -# Asia/Chongqing (currently a link to Asia/Shanghai) +# Long-shu Time (probably as Long and Shu were two names of the area) UT +07 +# Now part of Asia/Shanghai; its pre-1970 times are not recorded here. # Guangxi, Guizhou, Hainan, Ningxia, Sichuan, Shaanxi, and Yunnan; -# most of Gansu; west Inner Mongolia; west Qinghai; and the Guangdong +# most of Gansu; west Inner Mongolia; east Qinghai; and the Guangdong # counties Deqing, Enping, Kaiping, Luoding, Taishan, Xinxing, # Yangchun, Yangjiang, Yu'nan, and Yunfu. # # Xin-zang Time ("Xinjiang-Tibet Time") UT +06 -# Asia/Urumqi -# This currently represents Kunlun Time as well, -# as apparently the two regions have been the same since 1970. +# This region is now part of either Asia/Urumqi or Asia/Shanghai with +# current boundaries uncertain; times before 1970 for areas that +# disagree with Ãœrümqi or Shanghai are not recorded here. # The Gansu counties Aksay, Anxi, Dunhuang, Subei; west Qinghai; # the Guangdong counties Xuwen, Haikang, Suixi, Lianjiang, # Zhanjiang, Wuchuan, Huazhou, Gaozhou, Maoming, Dianbai, and Xinyi; @@ -445,7 +437,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D # Fukang, Kuitun, Kumukuli, Miquan, Qitai, and Turfan. # # Kunlun Time UT +05:30 -# Asia/Kashgar (currently a link to Asia/Urumqi) +# This region is now in the same status as Xin-zang Time (see above). # West Tibet, including Pulan, Aheqi, Shufu, Shule; # West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke, # Zhaosu, Tekesi, Gongliu, Chabuchaer, Huocheng, Bole, Pishan, Suiding, @@ -546,7 +538,7 @@ Zone Asia/Shanghai 8:05:43 - LMT 1901 # Xinjiang time, used by many in western China; represented by Ãœrümqi / Ãœrümchi # / Wulumuqi. (Please use Asia/Shanghai if you prefer Beijing time.) Zone Asia/Urumqi 5:50:20 - LMT 1928 - 6:00 - XJT + 6:00 - +06 # Hong Kong (Xianggang) @@ -765,30 +757,29 @@ Rule Taiwan 1979 only - Oct 1 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Taipei or Taibei or T'ai-pei Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1 - 8:00 - JWST 1937 Oct 1 + 8:00 - CST 1937 Oct 1 9:00 - JST 1945 Sep 21 1:00 8:00 Taiwan C%sT # Macau (Macao, Aomen) # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 S -Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 - -Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 S -Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 S -Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 S -Rule Macau 1965 only - Oct 31 0:00 0 - -Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 S -Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 - -Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 S -Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 - -Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 - -Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 S -Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 S -Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 - +Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 D +Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 S +Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 D +Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 D +Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 D +Rule Macau 1965 only - Oct 31 0:00 0 S +Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 D +Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 S +Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 D +Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 S +Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 S +Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 D +Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 D +Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Macau 7:34:20 - LMT 1912 Jan 1 - 8:00 Macau MO%sT 1999 Dec 20 # return to China - 8:00 PRC C%sT + 8:00 Macau C%sT ############################################################################### @@ -904,11 +895,10 @@ Zone Asia/Tbilisi 2:59:11 - LMT 1880 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 - 8:00 - TLT 1942 Feb 21 23:00 # E Timor Time - 9:00 - JST 1945 Sep 23 - 9:00 - TLT 1976 May 3 - 8:00 - WITA 2000 Sep 17 0:00 - 9:00 - TLT + 8:00 - +08 1942 Feb 21 23:00 + 9:00 - +09 1976 May 3 + 8:00 - +08 2000 Sep 17 0:00 + 9:00 - +09 # India @@ -923,9 +913,9 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata 5:53:20 - HMT 1941 Oct # Howrah Mean Time? - 6:30 - BURT 1942 May 15 # Burma Time + 6:30 - +0630 1942 May 15 5:30 - IST 1942 Sep - 5:30 1:00 IST 1945 Oct 15 + 5:30 1:00 +0630 1945 Oct 15 5:30 - IST # The following are like Asia/Kolkata: # Andaman Is @@ -976,33 +966,33 @@ Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, # but this must be a typo. 7:07:12 - BMT 1923 Dec 31 23:47:12 # Batavia - 7:20 - JAVT 1932 Nov # Java Time - 7:30 - WIB 1942 Mar 23 - 9:00 - JST 1945 Sep 23 - 7:30 - WIB 1948 May - 8:00 - WIB 1950 May - 7:30 - WIB 1964 + 7:20 - +0720 1932 Nov + 7:30 - +0730 1942 Mar 23 + 9:00 - +09 1945 Sep 23 + 7:30 - +0730 1948 May + 8:00 - +08 1950 May + 7:30 - +0730 1964 7:00 - WIB # west and central Borneo Zone Asia/Pontianak 7:17:20 - LMT 1908 May 7:17:20 - PMT 1932 Nov # Pontianak MT - 7:30 - WIB 1942 Jan 29 - 9:00 - JST 1945 Sep 23 - 7:30 - WIB 1948 May - 8:00 - WIB 1950 May - 7:30 - WIB 1964 + 7:30 - +0730 1942 Jan 29 + 9:00 - +09 1945 Sep 23 + 7:30 - +0730 1948 May + 8:00 - +08 1950 May + 7:30 - +0730 1964 8:00 - WITA 1988 Jan 1 7:00 - WIB # Sulawesi, Lesser Sundas, east and south Borneo Zone Asia/Makassar 7:57:36 - LMT 1920 7:57:36 - MMT 1932 Nov # Macassar MT - 8:00 - WITA 1942 Feb 9 - 9:00 - JST 1945 Sep 23 + 8:00 - +08 1942 Feb 9 + 9:00 - +09 1945 Sep 23 8:00 - WITA # Maluku Islands, West Papua, Papua Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov - 9:00 - WIT 1944 Sep 1 - 9:30 - ACST 1964 + 9:00 - +09 1944 Sep 1 + 9:30 - +0930 1964 9:00 - WIT # Iran @@ -1034,8 +1024,6 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov # for at least the last 5 years. Before that, for a few years, the # date used was the first Thursday night of Farvardin and the last # Thursday night of Shahrivar, but I can't give exact dates.... -# I have also changed the abbreviations to what is considered correct -# here in Iran, IRST for regular time and IRDT for daylight saving time. # # From Roozbeh Pournader (2005-04-05): # The text of the Iranian law, in effect since 1925, clearly mentions @@ -1142,9 +1130,9 @@ Rule Iran 2036 max - Sep 21 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time - 3:30 - IRST 1977 Nov - 4:00 Iran IR%sT 1979 - 3:30 Iran IR%sT + 3:30 - +0330 1977 Nov + 4:00 Iran +04/+05 1979 + 3:30 Iran +0330/+0430 # Iraq @@ -1187,8 +1175,8 @@ Rule Iraq 1991 2007 - Oct 1 3:00s 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Baghdad 2:57:40 - LMT 1890 2:57:36 - BMT 1918 # Baghdad Mean Time? - 3:00 - AST 1982 May - 3:00 Iraq A%sT + 3:00 - +03 1982 May + 3:00 Iraq +03/+04 ############################################################################### @@ -1487,8 +1475,6 @@ Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u - 9:00 - JST 1896 Jan 1 - 9:00 - JCST 1937 Oct 1 9:00 Japan J%sT # Since 1938, all Japanese possessions have been like Asia/Tokyo. @@ -1764,7 +1750,23 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # Kazakh 1992-01-13 act appears to provide the same rules and 1992-03-27 # act was to be enacted on the last Sunday of March 1992. -# From Paul Eggert (2016-11-07): +# From Stepan Golosunov (2016-11-08): +# Turgai reorganization should affect only southern part of Qostanay +# oblast. Which should probably be separated into Asia/Arkalyk zone. +# (There were also 1970, 1988 and 1990 Turgai oblast reorganizations +# according to wikipedia.) +# +# [For Qostanay] http://www.ng.kz/gazeta/195/hranit/ +# suggests that clocks were to be moved 40 minutes backwards on +# 1920-01-01 to the fourth time belt. But I do not understand +# how that could happen.... +# +# [For Atyrau and Oral] 1919 decree +# (http://www.worldtimezone.com/dst_news/dst_news_russia-1919-02-08.html +# and in Byalokoz) lists Ural river (plus 10 versts on its left bank) in +# the third time belt (before 1930 this means +03). + +# From Paul Eggert (2016-12-06): # The tables below reflect Golosunov's remarks, with exceptions as noted. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1794,7 +1796,7 @@ Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2 6:00 - +06 # The following zone is like Asia/Qyzylorda except for being one # hour earlier from 1991-09-29 to 1992-03-29. The 1991/2 rules for -# Qostenay are unclear partly because of the 1997 Turgai +# Qostanay are unclear partly because of the 1997 Turgai # reorganization, so this zone is commented out for now. #Zone Asia/Qostanay 4:14:20 - LMT 1924 May 2 # 4:00 - +04 1930 Jun 21 @@ -1831,7 +1833,7 @@ Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2 # AtyraÅ« (KZ-ATY) is like MangghystaÅ« except it switched from # +04/+05 to +05/+06 in spring 1999, not fall 1994. Zone Asia/Atyrau 3:27:44 - LMT 1924 May 2 - 4:00 - +04 1930 Jun 21 + 3:00 - +03 1930 Jun 21 5:00 - +05 1981 Oct 1 6:00 - +06 1982 Apr 1 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s @@ -1843,7 +1845,7 @@ Zone Asia/Atyrau 3:27:44 - LMT 1924 May 2 # From Paul Eggert (2016-03-18): # The 1989 transition is from USSR act No. 227 (1989-03-14). Zone Asia/Oral 3:25:24 - LMT 1924 May 2 # or Ural'sk - 4:00 - +04 1930 Jun 21 + 3:00 - +03 1930 Jun 21 5:00 - +05 1981 Apr 1 5:00 1:00 +06 1981 Oct 1 6:00 - +06 1982 Apr 1 @@ -1949,14 +1951,12 @@ Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 8:30 - KST 1912 Jan 1 - 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 8:30 - KST 1912 Jan 1 - 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Aug 24 9:00 - KST 2015 Aug 15 00:00 8:30 - KST @@ -2011,30 +2011,29 @@ Rule NBorneo 1935 1941 - Dec 14 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kuala_Lumpur 6:46:46 - LMT 1901 Jan 1 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. - 7:00 - MALT 1933 Jan 1 # Malaya Time - 7:00 0:20 MALST 1936 Jan 1 - 7:20 - MALT 1941 Sep 1 - 7:30 - MALT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 7:30 - MALT 1982 Jan 1 - 8:00 - MYT # Malaysia Time + 7:00 - +07 1933 Jan 1 + 7:00 0:20 +0720 1936 Jan 1 + 7:20 - +0720 1941 Sep 1 + 7:30 - +0730 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 7:30 - +0730 1982 Jan 1 + 8:00 - +08 # Sabah & Sarawak # From Paul Eggert (2014-08-12): # The data entries here are mostly from Shanks & Pottenger, but the 1942, 1945 # and 1982 transition dates are from Mok Ly Yng. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kuching 7:21:20 - LMT 1926 Mar - 7:30 - BORT 1933 # Borneo Time - 8:00 NBorneo BOR%sT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 8:00 - BORT 1982 Jan 1 - 8:00 - MYT + 7:30 - +0730 1933 + 8:00 NBorneo +08/+0820 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 8:00 - +08 # Maldives # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Maldives 4:54:00 - LMT 1880 # Male 4:54:00 - MMT 1960 # Male Mean Time - 5:00 - MVT # Maldives Time + 5:00 - +05 # Mongolia @@ -2161,37 +2160,41 @@ Rule Mongol 1983 only - Oct 1 0:00 0 - # correction of 02:00 (in the previous edition) not being done correctly # in the latest edition; so ignore it for now. +# From Ganbold Tsagaankhuu (2017-02-09): +# Mongolian Government meeting has concluded today to cancel daylight +# saving time adoption in Mongolia. Source: http://zasag.mn/news/view/16192 + Rule Mongol 1985 1998 - Mar lastSun 0:00 1:00 S Rule Mongol 1984 1998 - Sep lastSun 0:00 0 - # IATA SSIM (1999-09) says Mongolia no longer observes DST. Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S -Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S -Rule Mongol 2015 max - Sep lastSat 0:00 0 - +Rule Mongol 2015 2016 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 2016 - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta Zone Asia/Hovd 6:06:36 - LMT 1905 Aug - 6:00 - HOVT 1978 # Hovd Time - 7:00 Mongol HOV%sT + 6:00 - +06 1978 + 7:00 Mongol +07/+08 # Ulaanbaatar, a.k.a. Ulan Bataar, Ulan Bator, Urga Zone Asia/Ulaanbaatar 7:07:32 - LMT 1905 Aug - 7:00 - ULAT 1978 # Ulaanbaatar Time - 8:00 Mongol ULA%sT + 7:00 - +07 1978 + 8:00 Mongol +08/+09 # Choibalsan, a.k.a. Bajan Tümen, Bajan Tumen, Chojbalsan, # Choybalsan, Sanbejse, Tchoibalsan Zone Asia/Choibalsan 7:38:00 - LMT 1905 Aug - 7:00 - ULAT 1978 - 8:00 - ULAT 1983 Apr - 9:00 Mongol CHO%sT 2008 Mar 31 # Choibalsan Time - 8:00 Mongol CHO%sT + 7:00 - +07 1978 + 8:00 - +08 1983 Apr + 9:00 Mongol +09/+10 2008 Mar 31 + 8:00 Mongol +08/+09 # Nepal # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kathmandu 5:41:16 - LMT 1920 - 5:30 - IST 1986 - 5:45 - NPT # Nepal Time + 5:30 - +0530 1986 + 5:45 - +0545 # Oman # See Asia/Dubai. @@ -2340,10 +2343,10 @@ Rule Pakistan 2009 only - Apr 15 0:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Karachi 4:28:12 - LMT 1907 - 5:30 - IST 1942 Sep - 5:30 1:00 IST 1945 Oct 15 - 5:30 - IST 1951 Sep 30 - 5:00 - KART 1971 Mar 26 # Karachi Time + 5:30 - +0530 1942 Sep + 5:30 1:00 +0630 1945 Oct 15 + 5:30 - +0530 1951 Sep 30 + 5:00 - +05 1971 Mar 26 5:00 Pakistan PK%sT # Pakistan Time # Palestine @@ -2708,15 +2711,15 @@ Rule Phil 1978 only - Sep 21 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31 8:04:00 - LMT 1899 May 11 - 8:00 Phil PH%sT 1942 May - 9:00 - JST 1944 Nov - 8:00 Phil PH%sT + 8:00 Phil +08/+09 1942 May + 9:00 - +09 1944 Nov + 8:00 Phil +08/+09 # Qatar # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha - 4:00 - GST 1972 Jun - 3:00 - AST + 4:00 - +04 1972 Jun + 3:00 - +03 Link Asia/Qatar Asia/Bahrain # Saudi Arabia @@ -2743,7 +2746,7 @@ Link Asia/Qatar Asia/Bahrain # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 - 3:00 - AST + 3:00 - +03 Link Asia/Riyadh Asia/Aden # Yemen Link Asia/Riyadh Asia/Kuwait @@ -2753,14 +2756,13 @@ Link Asia/Riyadh Asia/Kuwait # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. - 7:00 - MALT 1933 Jan 1 # Malaya Time - 7:00 0:20 MALST 1936 Jan 1 - 7:20 - MALT 1941 Sep 1 - 7:30 - MALT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 7:30 - MALT 1965 Aug 9 # independence - 7:30 - SGT 1982 Jan 1 # Singapore Time - 8:00 - SGT + 7:00 - +07 1933 Jan 1 + 7:00 0:20 +0720 1936 Jan 1 + 7:20 - +0720 1941 Sep 1 + 7:30 - +0730 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 7:30 - +0730 1982 Jan 1 + 8:00 - +08 # Spratly Is # no information @@ -2819,8 +2821,8 @@ Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1 Zone Asia/Colombo 5:19:24 - LMT 1880 5:19:32 - MMT 1906 # Moratuwa Mean Time 5:30 - +0530 1942 Jan 5 - 5:30 0:30 +0530/+06 1942 Sep - 5:30 1:00 +0530/+0630 1945 Oct 16 2:00 + 5:30 0:30 +06 1942 Sep + 5:30 1:00 +0630 1945 Oct 16 2:00 5:30 - +0530 1996 May 25 0:00 6:30 - +0630 1996 Oct 26 0:30 6:00 - +06 2006 Apr 15 0:30 @@ -3002,7 +3004,7 @@ Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Bangkok 6:42:04 - LMT 1880 6:42:04 - BMT 1920 Apr # Bangkok Mean Time - 7:00 - ICT + 7:00 - +07 Link Asia/Bangkok Asia/Phnom_Penh # Cambodia Link Asia/Bangkok Asia/Vientiane # Laos @@ -3018,7 +3020,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 May 2 # or Ashkhabad # United Arab Emirates # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 - 4:00 - GST + 4:00 - +04 Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan @@ -3091,15 +3093,15 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1 - 7:06:30 - PLMT 1911 May 1 - 7:00 - ICT 1942 Dec 31 23:00 - 8:00 - IDT 1945 Mar 14 23:00 - 9:00 - JST 1945 Sep 2 - 7:00 - ICT 1947 Apr 1 - 8:00 - IDT 1955 Jul 1 - 7:00 - ICT 1959 Dec 31 23:00 - 8:00 - IDT 1975 Jun 13 - 7:00 - ICT + 7:06:30 - PLMT 1911 May 1 # Phù Liá»…n MT + 7:00 - +07 1942 Dec 31 23:00 + 8:00 - +08 1945 Mar 14 23:00 + 9:00 - +09 1945 Sep 2 + 7:00 - +07 1947 Apr 1 + 8:00 - +08 1955 Jul 1 + 7:00 - +07 1959 Dec 31 23:00 + 8:00 - +08 1975 Jun 13 + 7:00 - +07 # Yemen # See Asia/Riyadh. diff --git a/jdk/test/sun/util/calendar/zi/tzdata/australasia b/jdk/test/sun/util/calendar/zi/tzdata/australasia index 81ef5215942..db7e7f7bcb2 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/australasia +++ b/jdk/test/sun/util/calendar/zi/tzdata/australasia @@ -67,8 +67,8 @@ Zone Australia/Perth 7:43:24 - LMT 1895 Dec 8:00 Aus AW%sT 1943 Jul 8:00 AW AW%sT Zone Australia/Eucla 8:35:28 - LMT 1895 Dec - 8:45 Aus ACW%sT 1943 Jul - 8:45 AW ACW%sT + 8:45 Aus +0845/+0945 1943 Jul + 8:45 AW +0845/+0945 # Queensland # @@ -235,7 +235,8 @@ Rule LH 2008 max - Apr Sun>=1 2:00 0 S Rule LH 2008 max - Oct Sun>=1 2:00 0:30 D Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb 10:00 - AEST 1981 Mar - 10:30 LH LH%sT + 10:30 LH +1030/+1130 1985 Jul + 10:30 LH +1030/+11 # Australian miscellany # @@ -273,19 +274,19 @@ Zone Antarctica/Macquarie 0 - -00 1899 Nov 0 - -00 1948 Mar 25 10:00 Aus AE%sT 1967 10:00 AT AE%sT 2010 Apr 4 3:00 - 11:00 - MIST # Macquarie I Standard Time + 11:00 - +11 # Christmas # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Christmas 7:02:52 - LMT 1895 Feb - 7:00 - CXT # Christmas Island Time + 7:00 - +07 # Cocos (Keeling) Is # These islands were ruled by the Ross family from about 1830 to 1978. # We don't know when standard time was introduced; for now, we guess 1900. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Cocos 6:27:40 - LMT 1900 - 6:30 - CCT # Cocos Islands Time + 6:30 - +0630 # Fiji @@ -398,16 +399,16 @@ Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 S Rule Fiji 2015 max - Jan Sun>=15 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva - 12:00 Fiji FJ%sT # Fiji Time + 12:00 Fiji +12/+13 # French Polynesia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Gambier -8:59:48 - LMT 1912 Oct # Rikitea - -9:00 - GAMT # Gambier Time + -9:00 - -09 Zone Pacific/Marquesas -9:18:00 - LMT 1912 Oct - -9:30 - MART # Marquesas Time + -9:30 - -0930 Zone Pacific/Tahiti -9:58:16 - LMT 1912 Oct # Papeete - -10:00 - TAHT # Tahiti Time + -10:00 - -10 # Clipperton (near North America) is administered from French Polynesia; # it is uninhabited. @@ -422,15 +423,15 @@ Link Pacific/Guam Pacific/Saipan # N Mariana Is # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Tarawa 11:32:04 - LMT 1901 # Bairiki - 12:00 - GILT # Gilbert Is Time + 12:00 - +12 Zone Pacific/Enderbury -11:24:20 - LMT 1901 - -12:00 - PHOT 1979 Oct # Phoenix Is Time - -11:00 - PHOT 1995 - 13:00 - PHOT + -12:00 - -12 1979 Oct + -11:00 - -11 1995 + 13:00 - +13 Zone Pacific/Kiritimati -10:29:20 - LMT 1901 - -10:40 - LINT 1979 Oct # Line Is Time - -10:00 - LINT 1995 - 14:00 - LINT + -10:40 - -1040 1979 Oct + -10:00 - -10 1995 + 14:00 - +14 # N Mariana Is # See Pacific/Guam. @@ -438,31 +439,31 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 1901 # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Majuro 11:24:48 - LMT 1901 - 11:00 - MHT 1969 Oct # Marshall Islands Time - 12:00 - MHT + 11:00 - +11 1969 Oct + 12:00 - +12 Zone Pacific/Kwajalein 11:09:20 - LMT 1901 - 11:00 - MHT 1969 Oct - -12:00 - KWAT 1993 Aug 20 # Kwajalein Time - 12:00 - MHT + 11:00 - +11 1969 Oct + -12:00 - -12 1993 Aug 20 + 12:00 - +12 # Micronesia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Chuuk 10:07:08 - LMT 1901 - 10:00 - CHUT # Chuuk Time + 10:00 - +10 Zone Pacific/Pohnpei 10:32:52 - LMT 1901 # Kolonia - 11:00 - PONT # Pohnpei Time + 11:00 - +11 Zone Pacific/Kosrae 10:51:56 - LMT 1901 - 11:00 - KOST 1969 Oct # Kosrae Time - 12:00 - KOST 1999 - 11:00 - KOST + 11:00 - +11 1969 Oct + 12:00 - +12 1999 + 11:00 - +11 # Nauru # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Nauru 11:07:40 - LMT 1921 Jan 15 # Uaobe - 11:30 - NRT 1942 Mar 15 # Nauru Time - 9:00 - JST 1944 Aug 15 - 11:30 - NRT 1979 May - 12:00 - NRT + 11:30 - +1130 1942 Mar 15 + 9:00 - +09 1944 Aug 15 + 11:30 - +1130 1979 May + 12:00 - +12 # New Caledonia # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -473,7 +474,7 @@ Rule NC 1996 only - Dec 1 2:00s 1:00 S Rule NC 1997 only - Mar 2 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Noumea 11:05:48 - LMT 1912 Jan 13 # Nouméa - 11:00 NC NC%sT + 11:00 NC +11/+12 ############################################################################### @@ -514,8 +515,8 @@ Zone Pacific/Auckland 11:39:04 - LMT 1868 Nov 2 11:30 NZ NZ%sT 1946 Jan 1 12:00 NZ NZ%sT Zone Pacific/Chatham 12:13:48 - LMT 1868 Nov 2 - 12:15 - CHAST 1946 Jan 1 - 12:45 Chatham CHA%sT + 12:15 - +1215 1946 Jan 1 + 12:45 Chatham +1245/+1345 Link Pacific/Auckland Antarctica/McMurdo @@ -537,8 +538,8 @@ Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua - -10:30 - CKT 1978 Nov 12 # Cook Is Time - -10:00 Cook CK%sT + -10:30 - -1030 1978 Nov 12 + -10:00 Cook -10/-0930 ############################################################################### @@ -546,29 +547,29 @@ Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua # Niue # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi - -11:20 - NUT 1951 # Niue Time - -11:30 - NUT 1978 Oct 1 - -11:00 - NUT + -11:20 - -1120 1951 + -11:30 - -1130 1978 Oct 1 + -11:00 - -11 # Norfolk # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston - 11:12 - NMT 1951 # Norfolk Mean Time - 11:30 - NFT 1974 Oct 27 02:00 # Norfolk T. - 11:30 1:00 NFST 1975 Mar 2 02:00 - 11:30 - NFT 2015 Oct 4 02:00 - 11:00 - NFT + 11:12 - +1112 1951 + 11:30 - +1130 1974 Oct 27 02:00 + 11:30 1:00 +1230 1975 Mar 2 02:00 + 11:30 - +1130 2015 Oct 4 02:00 + 11:00 - +11 # Palau (Belau) # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Palau 8:57:56 - LMT 1901 # Koror - 9:00 - PWT # Palau Time + 9:00 - +09 # Papua New Guinea # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 9:48:32 - PMMT 1895 # Port Moresby Mean Time - 10:00 - PGT # Papua New Guinea Time + 10:00 - +10 # # From Paul Eggert (2014-10-13): # Base the Bougainville entry on the Arawa-Kieta region, which appears to have @@ -583,28 +584,26 @@ Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 # and seem to have controlled it until their 1945-08-21 surrender. # # The Autonomous Region of Bougainville switched from UT +10 to +11 -# on 2014-12-28 at 02:00. They call +11 "Bougainville Standard Time"; -# abbreviate this as BST. See: +# on 2014-12-28 at 02:00. They call +11 "Bougainville Standard Time". +# See: # http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/ # Zone Pacific/Bougainville 10:22:16 - LMT 1880 9:48:32 - PMMT 1895 - 10:00 - PGT 1942 Jul - 9:00 - JST 1945 Aug 21 - 10:00 - PGT 2014 Dec 28 2:00 - 11:00 - BST + 10:00 - +10 1942 Jul + 9:00 - +09 1945 Aug 21 + 10:00 - +10 2014 Dec 28 2:00 + 11:00 - +11 # Pitcairn # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Pitcairn -8:40:20 - LMT 1901 # Adamstown - -8:30 - PNT 1998 Apr 27 0:00 - -8:00 - PST # Pitcairn Standard Time + -8:30 - -0830 1998 Apr 27 0:00 + -8:00 - -08 # American Samoa Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 -11:22:48 - LMT 1911 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands @@ -685,17 +684,17 @@ Rule WS 2012 max - Sep lastSun 3:00 1 D # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 - -11:30 - WSST 1950 - -11:00 WS S%sT 2011 Dec 29 24:00 # S=Samoa - 13:00 WS WS%sT + -11:30 - -1130 1950 + -11:00 WS -11/-10 2011 Dec 29 24:00 + 13:00 WS +13/+14 # Solomon Is # excludes Bougainville, for which see Papua New Guinea # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara - 11:00 - SBT # Solomon Is Time + 11:00 - +11 -# Tokelau Is +# Tokelau # # From Gwillim Law (2011-12-29) # A correspondent informed me that Tokelau, like Samoa, will be skipping @@ -716,8 +715,8 @@ Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fakaofo -11:24:56 - LMT 1901 - -11:00 - TKT 2011 Dec 30 # Tokelau Time - 13:00 - TKT + -11:00 - -11 2011 Dec 30 + 13:00 - +13 # Tonga # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -736,7 +735,7 @@ Zone Pacific/Tongatapu 12:19:20 - LMT 1901 # Tuvalu # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Funafuti 11:56:52 - LMT 1901 - 12:00 - TVT # Tuvalu Time + 12:00 - +12 # US minor outlying islands @@ -760,10 +759,11 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901 # Johnston # -# From Paul Eggert (2014-03-11): +# From Paul Eggert (2017-02-10): # Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. # Details are uncertain. We have no data for Johnston after 1970, so -# treat it like Hawaii for now. +# treat it like Hawaii for now. Since Johnston is now uninhabited, +# its link to Pacific/Honolulu is in the 'backward' file. # # In his memoirs of June 6th to October 4, 1945 # (2005), Herbert C. Bach writes, @@ -783,8 +783,6 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901 # See the table on page 4 where he lists GMT and local times for the tests; a # footnote for the JI tests reads that local time is "JI time = Hawaii Time # Minus One Hour". -# -# See 'northamerica' for Pacific/Johnston. # Kingman # uninhabited @@ -798,7 +796,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901 # Wake # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Wake 11:06:28 - LMT 1901 - 12:00 - WAKT # Wake Time + 12:00 - +12 # Vanuatu @@ -811,12 +809,12 @@ Rule Vanuatu 1992 1993 - Jan Sun>=23 0:00 0 - Rule Vanuatu 1992 only - Oct Sun>=23 0:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila - 11:00 Vanuatu VU%sT # Vanuatu Time + 11:00 Vanuatu +11/+12 # Wallis and Futuna # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Wallis 12:15:20 - LMT 1901 - 12:00 - WFT # Wallis & Futuna Time + 12:00 - +12 ############################################################################### @@ -827,15 +825,15 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -852,28 +850,19 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # -# I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. +# The following abbreviations are from other sources. # Corrections are welcome! # std dst # LMT Local Mean Time # 8:00 AWST AWDT Western Australia -# 8:45 ACWST ACWDT Central Western Australia* -# 9:00 JST Japan # 9:30 ACST ACDT Central Australia # 10:00 AEST AEDT Eastern Australia +# 10:00 GST Guam through 2000 # 10:00 ChST Chamorro -# 10:30 LHST LHDT Lord Howe* -# 11:00 BST Bougainville* # 11:30 NZMT NZST New Zealand through 1945 # 12:00 NZST NZDT New Zealand 1946-present -# 12:15 CHAST Chatham through 1945* -# 12:45 CHAST CHADT Chatham 1946-present* -# 13:00 WSST WSDT (western) Samoa 2011-present* -# -11:30 WSST Western Samoa through 1950* # -11:00 SST Samoa # -10:00 HST Hawaii -# - 8:00 PST Pitcairn* # # See the 'northamerica' file for Hawaii. # See the 'southamerica' file for Easter I and the Galápagos Is. diff --git a/jdk/test/sun/util/calendar/zi/tzdata/backward b/jdk/test/sun/util/calendar/zi/tzdata/backward index ec96c7e39f6..b4cf3be2d34 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/backward +++ b/jdk/test/sun/util/calendar/zi/tzdata/backward @@ -119,6 +119,7 @@ Link Pacific/Auckland NZ Link Pacific/Chatham NZ-CHAT Link America/Denver Navajo Link Asia/Shanghai PRC +Link Pacific/Honolulu Pacific/Johnston Link Pacific/Pohnpei Pacific/Ponape Link Pacific/Pago_Pago Pacific/Samoa Link Pacific/Chuuk Pacific/Truk diff --git a/jdk/test/sun/util/calendar/zi/tzdata/europe b/jdk/test/sun/util/calendar/zi/tzdata/europe index 9cede59acda..0d8a40e4f37 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/europe +++ b/jdk/test/sun/util/calendar/zi/tzdata/europe @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -79,26 +79,23 @@ # History of Summer Time # # (1998-09-21, in Portuguese) - # # I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. -# Corrections are welcome! -# std dst 2dst -# LMT Local Mean Time -# -4:00 AST ADT Atlantic -# -3:00 WGT WGST Western Greenland* -# -1:00 EGT EGST Eastern Greenland* -# 0:00 GMT BST BDST Greenwich, British Summer -# 0:00 GMT IST Greenwich, Irish Summer -# 0:00 WET WEST WEMT Western Europe -# 0:19:32.13 AMT NST Amsterdam, Netherlands Summer (1835-1937)* -# 0:20 NET NEST Netherlands (1937-1940)* -# 1:00 BST British Standard (1968-1971) -# 1:00 CET CEST CEMT Central Europe -# 1:00:14 SET Swedish (1879-1899)* -# 2:00 EET EEST Eastern Europe -# 3:00 MSK MSD Moscow +# the rest are variants of the "xMT" pattern for a city's mean time, +# or are from other sources. Corrections are welcome! +# std dst 2dst +# LMT Local Mean Time +# -4:00 AST ADT Atlantic +# 0:00 GMT BST BDST Greenwich, British Summer +# 0:00 GMT IST Greenwich, Irish Summer +# 0:00 WET WEST WEMT Western Europe +# 0:19:32.13 AMT* NST* Amsterdam, Netherlands Summer (1835-1937) +# 1:00 BST British Standard (1968-1971) +# 1:00 CET CEST CEMT Central Europe +# 1:00:14 SET Swedish (1879-1899) +# 1:36:34 RMT* LST* Riga, Latvian Summer (1880-1926)* +# 2:00 EET EEST Eastern Europe +# 3:00 MSK MSD MDST* Moscow # From Peter Ilieve (1994-12-04), # The original six [EU members]: Belgium, France, (West) Germany, Italy, @@ -498,7 +495,7 @@ Link Europe/London Europe/Isle_of_Man # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 - -0:25:21 - DMT 1916 May 21 2:00 + -0:25:21 - DMT 1916 May 21 2:00 # Dublin MT -0:25:21 1:00 IST 1916 Oct 1 2:00s 0:00 GB-Eire %s 1921 Dec 6 # independence 0:00 GB-Eire GMT/IST 1940 Feb 25 2:00 @@ -1087,16 +1084,16 @@ Rule Thule 2007 max - Nov Sun>=1 2:00 0 S # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Danmarkshavn -1:14:40 - LMT 1916 Jul 28 - -3:00 - WGT 1980 Apr 6 2:00 - -3:00 EU WG%sT 1996 + -3:00 - -03 1980 Apr 6 2:00 + -3:00 EU -03/-02 1996 0:00 - GMT Zone America/Scoresbysund -1:27:52 - LMT 1916 Jul 28 # Ittoqqortoormiit - -2:00 - CGT 1980 Apr 6 2:00 - -2:00 C-Eur CG%sT 1981 Mar 29 - -1:00 EU EG%sT + -2:00 - -02 1980 Apr 6 2:00 + -2:00 C-Eur -02/-01 1981 Mar 29 + -1:00 EU -01/+00 Zone America/Godthab -3:26:56 - LMT 1916 Jul 28 # Nuuk - -3:00 - WGT 1980 Apr 6 2:00 - -3:00 EU WG%sT + -3:00 - -03 1980 Apr 6 2:00 + -3:00 EU -03/-02 Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base -4:00 Thule A%sT @@ -1511,7 +1508,7 @@ Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Reykjavik -1:28 - LMT 1908 - -1:00 Iceland IS%sT 1968 Apr 7 1:00s + -1:00 Iceland -01/+00 1968 Apr 7 1:00s 0:00 - GMT # Italy @@ -1975,7 +1972,7 @@ Rule Neth 1945 only - Sep 16 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Amsterdam 0:19:32 - LMT 1835 0:19:32 Neth %s 1937 Jul 1 - 0:20 Neth NE%sT 1940 May 16 0:00 # Dutch Time + 0:20 Neth +0020/+0120 1940 May 16 0:00 1:00 C-Eur CE%sT 1945 Apr 2 2:00 1:00 Neth CE%sT 1977 1:00 EU CE%sT @@ -2192,16 +2189,34 @@ Zone Europe/Lisbon -0:36:45 - LMT 1884 0:00 W-Eur WE%sT 1992 Sep 27 1:00s 1:00 EU CE%sT 1996 Mar 31 1:00u 0:00 EU WE%sT +# This Zone can be simplified once we assume zic %z. Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada -1:54:32 - HMT 1912 Jan 1 # Horta Mean Time - -2:00 Port AZO%sT 1966 Apr 3 2:00 # Azores Time - -1:00 Port AZO%sT 1983 Sep 25 1:00s - -1:00 W-Eur AZO%sT 1992 Sep 27 1:00s + -2:00 Port -02/-01 1942 Apr 25 22:00s + -2:00 Port +00 1942 Aug 15 22:00s + -2:00 Port -02/-01 1943 Apr 17 22:00s + -2:00 Port +00 1943 Aug 28 22:00s + -2:00 Port -02/-01 1944 Apr 22 22:00s + -2:00 Port +00 1944 Aug 26 22:00s + -2:00 Port -02/-01 1945 Apr 21 22:00s + -2:00 Port +00 1945 Aug 25 22:00s + -2:00 Port -02/-01 1966 Apr 3 2:00 + -1:00 Port -01/+00 1983 Sep 25 1:00s + -1:00 W-Eur -01/+00 1992 Sep 27 1:00s 0:00 EU WE%sT 1993 Mar 28 1:00u - -1:00 EU AZO%sT + -1:00 EU -01/+00 +# This Zone can be simplified once we assume zic %z. Zone Atlantic/Madeira -1:07:36 - LMT 1884 # Funchal -1:07:36 - FMT 1912 Jan 1 # Funchal Mean Time - -1:00 Port MAD%sT 1966 Apr 3 2:00 # Madeira Time + -1:00 Port -01/+00 1942 Apr 25 22:00s + -1:00 Port +01 1942 Aug 15 22:00s + -1:00 Port -01/+00 1943 Apr 17 22:00s + -1:00 Port +01 1943 Aug 28 22:00s + -1:00 Port -01/+00 1944 Apr 22 22:00s + -1:00 Port +01 1944 Aug 26 22:00s + -1:00 Port -01/+00 1945 Apr 21 22:00s + -1:00 Port +01 1945 Aug 25 22:00s + -1:00 Port -01/+00 1966 Apr 3 2:00 0:00 Port WE%sT 1983 Sep 25 1:00s 0:00 EU WE%sT @@ -2559,10 +2574,8 @@ Zone Europe/Moscow 2:30:17 - LMT 1880 3:00 - MSK -# From Tim Parenti (2014-07-03): -# Europe/Simferopol covers... -# ** **** Crimea, Republic of -# ** **** Sevastopol +# From Paul Eggert (2016-12-06): +# Europe/Simferopol covers Crimea. Zone Europe/Simferopol 2:16:24 - LMT 1880 2:16 - SMT 1924 May 2 # Simferopol Mean T @@ -3255,46 +3268,77 @@ Link Europe/Prague Europe/Bratislava # See Europe/Belgrade. # Spain +# +# From Paul Eggert (2016-12-14): +# +# The source for Europe/Madrid before 2013 is: +# Planesas P. La hora oficial en España y sus cambios. +# Anuario del Observatorio Astronómico de Madrid (2013, in Spanish). +# http://astronomia.ign.es/rknowsys-theme/images/webAstro/paginas/documentos/Anuario/lahoraoficialenespana.pdf +# As this source says that historical time in the Canaries is obscure, +# and it does not discuss Ceuta, stick with Shanks for now for that data. +# +# In the 1918 and 1919 fallback transitions in Spain, the clock for +# the hour-longer day officially kept going after midnight, so that +# the repeated instances of that day's 00:00 hour were 24 hours apart, +# with a fallback transition from the second occurrence of 00:59... to +# the next day's 00:00. Our data format cannot represent this +# directly, and instead repeats the first hour of the next day, with a +# fallback transition from the next day's 00:59... to 00:00. + +# From Michael Deckers (2016-12-15): +# The Royal Decree of 1900-06-26 quoted by Planesas, online at +# https://www.boe.es/datos/pdfs/BOE//1900/209/A00383-00384.pdf +# says in its article 5 (my translation): +# These dispositions will enter into force beginning with the +# instant at which, according to the time indicated in article 1, +# the 1st day of January of 1901 will begin. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -# For 1917-1919 Whitman gives Apr Sat>=1 - Oct Sat>=1; -# go with Shanks & Pottenger. -Rule Spain 1917 only - May 5 23:00s 1:00 S -Rule Spain 1917 1919 - Oct 6 23:00s 0 - -Rule Spain 1918 only - Apr 15 23:00s 1:00 S -Rule Spain 1919 only - Apr 5 23:00s 1:00 S -# Whitman gives 1921 Feb 28 - Oct 14; go with Shanks & Pottenger. -Rule Spain 1924 only - Apr 16 23:00s 1:00 S -# Whitman gives 1924 Oct 14; go with Shanks & Pottenger. -Rule Spain 1924 only - Oct 4 23:00s 0 - -Rule Spain 1926 only - Apr 17 23:00s 1:00 S -# Whitman says no DST in 1929; go with Shanks & Pottenger. -Rule Spain 1926 1929 - Oct Sat>=1 23:00s 0 - -Rule Spain 1927 only - Apr 9 23:00s 1:00 S -Rule Spain 1928 only - Apr 14 23:00s 1:00 S -Rule Spain 1929 only - Apr 20 23:00s 1:00 S -# Whitman gives 1937 Jun 16, 1938 Apr 16, 1940 Apr 13; -# go with Shanks & Pottenger. -Rule Spain 1937 only - May 22 23:00s 1:00 S -Rule Spain 1937 1939 - Oct Sat>=1 23:00s 0 - -Rule Spain 1938 only - Mar 22 23:00s 1:00 S -Rule Spain 1939 only - Apr 15 23:00s 1:00 S -Rule Spain 1940 only - Mar 16 23:00s 1:00 S -# Whitman says no DST 1942-1945; go with Shanks & Pottenger. -Rule Spain 1942 only - May 2 22:00s 2:00 M # Midsummer -Rule Spain 1942 only - Sep 1 22:00s 1:00 S -Rule Spain 1943 1946 - Apr Sat>=13 22:00s 2:00 M -Rule Spain 1943 only - Oct 3 22:00s 1:00 S -Rule Spain 1944 only - Oct 10 22:00s 1:00 S -Rule Spain 1945 only - Sep 30 1:00 1:00 S -Rule Spain 1946 only - Sep 30 0:00 0 - +Rule Spain 1918 only - Apr 15 23:00 1:00 S +Rule Spain 1918 1919 - Oct 6 24:00s 0 - +Rule Spain 1919 only - Apr 6 23:00 1:00 S +Rule Spain 1924 only - Apr 16 23:00 1:00 S +Rule Spain 1924 only - Oct 4 24:00s 0 - +Rule Spain 1926 only - Apr 17 23:00 1:00 S +Rule Spain 1926 1929 - Oct Sat>=1 24:00s 0 - +Rule Spain 1927 only - Apr 9 23:00 1:00 S +Rule Spain 1928 only - Apr 15 0:00 1:00 S +Rule Spain 1929 only - Apr 20 23:00 1:00 S +# Republican Spain during the civil war; it controlled Madrid until 1939-03-28. +Rule Spain 1937 only - Jun 16 23:00 1:00 S +Rule Spain 1937 only - Oct 2 24:00s 0 - +Rule Spain 1938 only - Apr 2 23:00 1:00 S +Rule Spain 1938 only - Apr 30 23:00 2:00 M +Rule Spain 1938 only - Oct 2 24:00 1:00 S +# The following rules are for unified Spain again. +# +# Planesas does not say what happened in Madrid between its fall on +# 1939-03-28 and the Nationalist spring-forward transition on +# 1939-04-15. For lack of better info, assume Madrid's clocks did not +# change during that period. +# +# The first rule is commented out, as it is redundant for Republican Spain. +#Rule Spain 1939 only - Apr 15 23:00 1:00 S +Rule Spain 1939 only - Oct 7 24:00s 0 - +Rule Spain 1942 only - May 2 23:00 1:00 S +Rule Spain 1942 only - Sep 1 1:00 0 - +Rule Spain 1943 1946 - Apr Sat>=13 23:00 1:00 S +Rule Spain 1943 1944 - Oct Sun>=1 1:00 0 - +Rule Spain 1945 1946 - Sep lastSun 1:00 0 - Rule Spain 1949 only - Apr 30 23:00 1:00 S -Rule Spain 1949 only - Sep 30 1:00 0 - -Rule Spain 1974 1975 - Apr Sat>=13 23:00 1:00 S +Rule Spain 1949 only - Oct 2 1:00 0 - +Rule Spain 1974 1975 - Apr Sat>=12 23:00 1:00 S Rule Spain 1974 1975 - Oct Sun>=1 1:00 0 - Rule Spain 1976 only - Mar 27 23:00 1:00 S Rule Spain 1976 1977 - Sep lastSun 1:00 0 - -Rule Spain 1977 1978 - Apr 2 23:00 1:00 S -Rule Spain 1978 only - Oct 1 1:00 0 - +Rule Spain 1977 only - Apr 2 23:00 1:00 S +Rule Spain 1978 only - Apr 2 2:00s 1:00 S +Rule Spain 1978 only - Oct 1 2:00s 0 - +# Nationalist Spain during the civil war +#Rule NatSpain 1937 only - May 22 23:00 1:00 S +#Rule NatSpain 1937 1938 - Oct Sat>=1 24:00s 0 - +#Rule NatSpain 1938 only - Mar 26 23:00 1:00 S # The following rules are copied from Morocco from 1967 through 1978. Rule SpainAfrica 1967 only - Jun 3 12:00 1:00 S Rule SpainAfrica 1967 only - Oct 1 0:00 0 - @@ -3306,11 +3350,11 @@ Rule SpainAfrica 1977 only - Sep 28 0:00 0 - Rule SpainAfrica 1978 only - Jun 1 0:00 1:00 S Rule SpainAfrica 1978 only - Aug 4 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Europe/Madrid -0:14:44 - LMT 1901 Jan 1 0:00s - 0:00 Spain WE%sT 1946 Sep 30 +Zone Europe/Madrid -0:14:44 - LMT 1900 Dec 31 23:45:16 + 0:00 Spain WE%sT 1940 Mar 16 23:00 1:00 Spain CE%sT 1979 1:00 EU CE%sT -Zone Africa/Ceuta -0:21:16 - LMT 1901 +Zone Africa/Ceuta -0:21:16 - LMT 1900 Dec 31 23:38:44 0:00 - WET 1918 May 6 23:00 0:00 1:00 WEST 1918 Oct 7 23:00 0:00 - WET 1924 @@ -3319,7 +3363,7 @@ Zone Africa/Ceuta -0:21:16 - LMT 1901 1:00 - CET 1986 1:00 EU CE%sT Zone Atlantic/Canary -1:01:36 - LMT 1922 Mar # Las Palmas de Gran C. - -1:00 - CANT 1946 Sep 30 1:00 # Canaries T + -1:00 - -01 1946 Sep 30 1:00 0:00 - WET 1980 Apr 6 0:00s 0:00 1:00 WEST 1980 Sep 28 1:00u 0:00 EU WE%sT @@ -3732,7 +3776,7 @@ Zone Europe/Uzhgorod 1:29:12 - LMT 1890 Oct # spelling, except omit the apostrophe as it is not allowed in # portable Posix file names. Zone Europe/Zaporozhye 2:20:40 - LMT 1880 - 2:20 - CUT 1924 May 2 # Central Ukraine T + 2:20 - +0220 1924 May 2 2:00 - EET 1930 Jun 21 3:00 - MSK 1941 Aug 25 1:00 C-Eur CE%sT 1943 Oct 25 diff --git a/jdk/test/sun/util/calendar/zi/tzdata/iso3166.tab b/jdk/test/sun/util/calendar/zi/tzdata/iso3166.tab index 004a4a70556..38a3a1ed52b 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/iso3166.tab +++ b/jdk/test/sun/util/calendar/zi/tzdata/iso3166.tab @@ -32,8 +32,8 @@ # All text uses UTF-8 encoding. The columns of the table are as follows: # # 1. ISO 3166-1 alpha-2 country code, current as of -# ISO 3166-1 Newsletter VI-16 (2013-07-11). See: Updates on ISO 3166 -# http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm +# ISO 3166-1 N905 (2016-11-15). See: Updates on ISO 3166-1 +# http://isotc.iso.org/livelink/livelink/Open/16944257 # 2. The usual English name for the coded region, # chosen so that alphabetic sorting of subsets produces helpful lists. # This is not the same as the English name in the ISO 3166 tables. diff --git a/jdk/test/sun/util/calendar/zi/tzdata/leapseconds b/jdk/test/sun/util/calendar/zi/tzdata/leapseconds index 71d774d16fa..3823c9abc4c 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/leapseconds +++ b/jdk/test/sun/util/calendar/zi/tzdata/leapseconds @@ -81,5 +81,5 @@ Leap 2012 Jun 30 23:59:60 + S Leap 2015 Jun 30 23:59:60 + S Leap 2016 Dec 31 23:59:60 + S -# Updated through IERS Bulletin C52 -# File expires on: 28 June 2017 +# Updated through IERS Bulletin C53 +# File expires on: 28 December 2017 diff --git a/jdk/test/sun/util/calendar/zi/tzdata/northamerica b/jdk/test/sun/util/calendar/zi/tzdata/northamerica index 56b089c8fc5..d59d2705b99 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/northamerica +++ b/jdk/test/sun/util/calendar/zi/tzdata/northamerica @@ -201,22 +201,6 @@ Zone CST6CDT -6:00 US C%sT Zone MST7MDT -7:00 US M%sT Zone PST8PDT -8:00 US P%sT -# From Bob Devine (1988-01-28): -# ...Alaska (and Hawaii) had the timezone names changed in 1967. -# old new -# Pacific Standard Time(PST) -same- -# Yukon Standard Time(YST) -same- -# Central Alaska S.T. (CAT) Alaska-Hawaii St[an]dard Time (AHST) -# Nome Standard Time (NT) Bering Standard Time (BST) -# -# ...Alaska's timezone lines were redrawn in 1983 to give only 2 tz. -# The YST zone now covers nearly all of the state, AHST just part -# of the Aleutian islands. No DST. - -# From Paul Eggert (1995-12-19): -# The tables below use 'NST', not 'NT', for Nome Standard Time. -# I invented 'CAWT' for Central Alaska War Time. - # From U. S. Naval Observatory (1989-01-19): # USA EASTERN 5 H BEHIND UTC NEW YORK, WASHINGTON # USA EASTERN 4 H BEHIND UTC APR 3 - OCT 30 @@ -273,6 +257,21 @@ Zone PST8PDT -8:00 US P%sT # Samoa standard time # The law doesn't give abbreviations. # +# From Paul Eggert (2016-12-19): +# Here are URLs for the 1918 and 1966 legislation: +# http://uscode.house.gov/statviewer.htm?volume=40&page=451 +# http://uscode.house.gov/statviewer.htm?volume=80&page=108 +# Although the 1918 names were officially "United States Standard +# Eastern Time" and similarly for "Central", "Mountain", "Pacific", +# and "Alaska", in practice "Standard" was placed just before "Time", +# as codified in 1966. In practice, Alaska time was abbreviated "AST" +# before 1968. Summarizing the 1967 name changes: +# 1918 names 1967 names +# -08 Standard Pacific Time (PST) Pacific standard time (PST) +# -09 (unofficial) Yukon (YST) Yukon standard time (YST) +# -10 Standard Alaska Time (AST) Alaska-Hawaii standard time (AHST) +# -11 (unofficial) Nome (NST) Bering standard time (BST) +# # From Paul Eggert (2000-01-08), following a heads-up from Rives McDow: # Public law 106-564 (2000-12-23) introduced ... "Chamorro Standard Time" # for time in Guam and the Northern Marianas. See the file "australasia". @@ -328,6 +327,15 @@ Zone PST8PDT -8:00 US P%sT # Roberts, city administrator in Phenix City. as saying "We are in the Central # time zone, but we do go by the Eastern time zone because so many people work # in Columbus." +# +# From Paul Eggert (2017-02-22): +# Four cities are involved. The two not mentioned above are Smiths Station +# and Valley. Barbara Brooks, Valley's assistant treasurer, heard it started +# because West Point Pepperell textile mills were in Alabama while the +# corporate office was in Georgia, and residents voted to keep Eastern +# time even after the mills closed. See: Kazek K. Did you know which +# Alabama towns are in a different time zone? al.com 2017-02-06. +# http://www.al.com/living/index.ssf/2017/02/do_you_know_which_alabama_town.html # From Paul Eggert (2014-09-06): # Monthly Notices of the Royal Astronomical Society 44, 4 (1884-02-08), 208 @@ -505,7 +513,7 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02 -8:00 US P%sT # Alaska -# AK%sT is the modern abbreviation for -9:00 per USNO. +# AK%sT is the modern abbreviation for -09 per USNO. # # From Paul Eggert (2001-05-30): # Howse writes that Alaska switched from the Julian to the Gregorian calendar, @@ -611,10 +619,8 @@ Zone America/Yakutat 14:41:05 - LMT 1867 Oct 18 -9:00 US AK%sT Zone America/Anchorage 14:00:24 - LMT 1867 Oct 18 -9:59:36 - LMT 1900 Aug 20 12:00 - -10:00 - CAT 1942 - -10:00 US CAT/CAWT 1945 Aug 14 23:00u - -10:00 US CAT/CAPT 1946 # Peace - -10:00 - CAT 1967 Apr + -10:00 - AST 1942 + -10:00 US A%sT 1967 Apr -10:00 - AHST 1969 -10:00 US AH%sT 1983 Oct 30 2:00 -9:00 US Y%sT 1983 Nov 30 @@ -703,7 +709,6 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 -10:30 1:00 HDT 1945 Sep 30 2:00 -10:30 - HST 1947 Jun 8 2:00 -10:00 - HST -Link Pacific/Honolulu Pacific/Johnston # Now we turn to US areas that have diverged from the consensus since 1970. @@ -1091,15 +1096,15 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00 ################################################################################ -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -2757,15 +2762,15 @@ Zone America/Barbados -3:58:29 - LMT 1924 # Bridgetown # Belize # Whitman entirely disagrees with Shanks; go with Shanks & Pottenger. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 HD -Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 S -Rule Belize 1973 only - Dec 5 0:00 1:00 D -Rule Belize 1974 only - Feb 9 0:00 0 S -Rule Belize 1982 only - Dec 18 0:00 1:00 D -Rule Belize 1983 only - Feb 12 0:00 0 S +Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 -0530 +Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 CST +Rule Belize 1973 only - Dec 5 0:00 1:00 CDT +Rule Belize 1974 only - Feb 9 0:00 0 CST +Rule Belize 1982 only - Dec 18 0:00 1:00 CDT +Rule Belize 1983 only - Feb 12 0:00 0 CST # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Belize -5:52:48 - LMT 1912 Apr - -6:00 Belize C%sT + -6:00 Belize %s # Bermuda @@ -3037,16 +3042,16 @@ Zone America/Havana -5:29:28 - LMT 1890 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule DR 1966 only - Oct 30 0:00 1:00 D -Rule DR 1967 only - Feb 28 0:00 0 S -Rule DR 1969 1973 - Oct lastSun 0:00 0:30 HD -Rule DR 1970 only - Feb 21 0:00 0 S -Rule DR 1971 only - Jan 20 0:00 0 S -Rule DR 1972 1974 - Jan 21 0:00 0 S +Rule DR 1966 only - Oct 30 0:00 1:00 EDT +Rule DR 1967 only - Feb 28 0:00 0 EST +Rule DR 1969 1973 - Oct lastSun 0:00 0:30 -0430 +Rule DR 1970 only - Feb 21 0:00 0 EST +Rule DR 1971 only - Jan 20 0:00 0 EST +Rule DR 1972 1974 - Jan 21 0:00 0 EST # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Santo_Domingo -4:39:36 - LMT 1890 -4:40 - SDMT 1933 Apr 1 12:00 # S. Dom. MT - -5:00 DR E%sT 1974 Oct 27 + -5:00 DR %s 1974 Oct 27 -4:00 - AST 2000 Oct 29 2:00 -5:00 US E%sT 2000 Dec 3 1:00 -4:00 - AST @@ -3157,6 +3162,12 @@ Zone America/Guatemala -6:02:04 - LMT 1918 Oct 5 # http://www.vantbefinfo.com/changement-dheure-pas-pour-haiti/ # http://news.anmwe.com/haiti-lheure-nationale-ne-sera-ni-avancee-ni-reculee-cette-annee/ +# From Steffen Thorsen (2017-03-12): +# We have received 4 mails from different people telling that Haiti +# has started DST again today, and this source seems to confirm that, +# I have not been able to find a more authoritative source: +# https://www.haitilibre.com/en/news-20319-haiti-notices-time-change-in-haiti.html + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Haiti 1983 only - May 8 0:00 1:00 D Rule Haiti 1984 1987 - Apr lastSun 0:00 1:00 D @@ -3169,6 +3180,8 @@ Rule Haiti 2005 2006 - Apr Sun>=1 0:00 1:00 D Rule Haiti 2005 2006 - Oct lastSun 0:00 0 S Rule Haiti 2012 2015 - Mar Sun>=8 2:00 1:00 D Rule Haiti 2012 2015 - Nov Sun>=1 2:00 0 S +Rule Haiti 2017 max - Mar Sun>=8 2:00 1:00 D +Rule Haiti 2017 max - Nov Sun>=1 2:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Port-au-Prince -4:49:20 - LMT 1890 -4:49 - PPMT 1917 Jan 24 12:00 # P-a-P MT @@ -3336,8 +3349,8 @@ Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre -4:00 - AST 1980 May - -3:00 - PMST 1987 # Pierre & Miquelon Time - -3:00 Canada PM%sT + -3:00 - -03 1987 + -3:00 Canada -03/-02 # St Vincent and the Grenadines # See America/Port_of_Spain. diff --git a/jdk/test/sun/util/calendar/zi/tzdata/southamerica b/jdk/test/sun/util/calendar/zi/tzdata/southamerica index bbc0a95067a..44dbd957566 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/southamerica +++ b/jdk/test/sun/util/calendar/zi/tzdata/southamerica @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2016-12-05): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -47,32 +47,10 @@ # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. # http://www.jstor.org/stable/1774359 # -# Earlier editions of these tables used the North American style (e.g. ARST and -# ARDT for Argentine Standard and Daylight Time), but the following quote -# suggests that it's better to use European style (e.g. ART and ARST). -# I suggest the use of _Summer time_ instead of the more cumbersome -# _daylight-saving time_. _Summer time_ seems to be in general use -# in Europe and South America. -# -- E O Cutler, _New York Times_ (1937-02-14), quoted in -# H L Mencken, _The American Language: Supplement I_ (1960), p 466 -# -# Earlier editions of these tables also used the North American style -# for time zones in Brazil, but this was incorrect, as Brazilians say -# "summer time". Reinaldo Goulart, a São Paulo businessman active in -# the railroad sector, writes (1999-07-06): -# The subject of time zones is currently a matter of discussion/debate in -# Brazil. Let's say that "the Brasília time" is considered the -# "official time" because Brasília is the capital city. -# The other three time zones are called "Brasília time "minus one" or -# "plus one" or "plus two". As far as I know there is no such -# name/designation as "Eastern Time" or "Central Time". -# So I invented the following (English-language) abbreviations for now. -# Corrections are welcome! -# std dst -# -2:00 FNT FNST Fernando de Noronha -# -3:00 BRT BRST Brasília -# -4:00 AMT AMST Amazon -# -5:00 ACT ACST Acre +# These tables use numeric abbreviations like -03 and -0330 for +# integer hour and minute UTC offsets. Although earlier editions used +# alphabetic time zone abbreviations, these abbreviations were +# invented and did not reflect common practice. ############################################################################### @@ -407,12 +385,6 @@ Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 S # # So I guess a new set of rules, besides "Arg", must be made and the last # America/Argentina/San_Luis entries should change to use these... -# -# I'm enclosing a patch that does what I say... regretfully, the San Luis -# timezone must be called "WART/WARST" even when most of the time (like, -# right now) WARST == ART... that is, since last Sunday, all the country -# is using UTC-3, but in my patch, San Luis calls it "WARST" and the rest -# of the country calls it "ART". # ... # From Alexander Krivenyshev (2010-04-09): @@ -451,11 +423,11 @@ Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 S # Buenos Aires (BA), Capital Federal (CF), Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 # # Córdoba (CB), Santa Fe (SF), Entre Ríos (ER), Corrientes (CN), Misiones (MN), # Chaco (CC), Formosa (FM), Santiago del Estero (SE) @@ -469,113 +441,113 @@ Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31 # Zone America/Argentina/Cordoba -4:16:48 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 # # Salta (SA), La Pampa (LP), Neuquén (NQ), Rio Negro (RN) Zone America/Argentina/Salta -4:21:40 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Tucumán (TM) Zone America/Argentina/Tucuman -4:20:52 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 13 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 13 + -3:00 Arg -03/-02 # # La Rioja (LR) Zone America/Argentina/La_Rioja -4:27:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 1 - -4:00 - WART 1991 May 7 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 1 + -4:00 - -04 1991 May 7 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # San Juan (SJ) Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 1 - -4:00 - WART 1991 May 7 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 31 - -4:00 - WART 2004 Jul 25 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 1 + -4:00 - -04 1991 May 7 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 31 + -4:00 - -04 2004 Jul 25 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Jujuy (JY) Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 Mar 4 - -4:00 - WART 1990 Oct 28 - -4:00 1:00 WARST 1991 Mar 17 - -4:00 - WART 1991 Oct 6 - -3:00 1:00 ARST 1992 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 Mar 4 + -4:00 - -04 1990 Oct 28 + -4:00 1:00 -03 1991 Mar 17 + -4:00 - -04 1991 Oct 6 + -3:00 1:00 -02 1992 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Catamarca (CT), Chubut (CH) Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Mendoza (MZ) Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 Mar 4 - -4:00 - WART 1990 Oct 15 - -4:00 1:00 WARST 1991 Mar 1 - -4:00 - WART 1991 Oct 15 - -4:00 1:00 WARST 1992 Mar 1 - -4:00 - WART 1992 Oct 18 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 23 - -4:00 - WART 2004 Sep 26 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 Mar 4 + -4:00 - -04 1990 Oct 15 + -4:00 1:00 -03 1991 Mar 1 + -4:00 - -04 1991 Oct 15 + -4:00 1:00 -03 1992 Mar 1 + -4:00 - -04 1992 Oct 18 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 23 + -4:00 - -04 2004 Sep 26 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # San Luis (SL) @@ -584,44 +556,44 @@ Rule SanLuis 2007 2008 - Oct Sun>=8 0:00 1:00 S Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 - -3:00 1:00 ARST 1990 Mar 14 - -4:00 - WART 1990 Oct 15 - -4:00 1:00 WARST 1991 Mar 1 - -4:00 - WART 1991 Jun 1 - -3:00 - ART 1999 Oct 3 - -4:00 1:00 WARST 2000 Mar 3 - -3:00 - ART 2004 May 31 - -4:00 - WART 2004 Jul 25 - -3:00 Arg AR%sT 2008 Jan 21 - -4:00 SanLuis WAR%sT 2009 Oct 11 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 + -3:00 1:00 -02 1990 Mar 14 + -4:00 - -04 1990 Oct 15 + -4:00 1:00 -03 1991 Mar 1 + -4:00 - -04 1991 Jun 1 + -3:00 - -03 1999 Oct 3 + -4:00 1:00 -03 2000 Mar 3 + -3:00 - -03 2004 May 31 + -4:00 - -04 2004 Jul 25 + -3:00 Arg -03/-02 2008 Jan 21 + -4:00 SanLuis -04/-03 2009 Oct 11 + -3:00 - -03 # # Santa Cruz (SC) Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31 - -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:16:48 - CMT 1920 May + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Tierra del Fuego, Antártida e Islas del Atlántico Sur (TF) Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31 - -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 30 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:16:48 - CMT 1920 May + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 30 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # Aruba Link America/Curacao America/Aruba @@ -631,7 +603,7 @@ Link America/Curacao America/Aruba Zone America/La_Paz -4:32:36 - LMT 1890 -4:32:36 - CMT 1931 Oct 15 # Calamarca MT -4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST - -4:00 - BOT # Bolivia Time + -4:00 - -04 # Brazil @@ -983,12 +955,12 @@ Rule Brazil 2038 max - Feb Sun>=15 0:00 0 - # # Fernando de Noronha (administratively part of PE) Zone America/Noronha -2:09:40 - LMT 1914 - -2:00 Brazil FN%sT 1990 Sep 17 - -2:00 - FNT 1999 Sep 30 - -2:00 Brazil FN%sT 2000 Oct 15 - -2:00 - FNT 2001 Sep 13 - -2:00 Brazil FN%sT 2002 Oct 1 - -2:00 - FNT + -2:00 Brazil -02/-01 1990 Sep 17 + -2:00 - -02 1999 Sep 30 + -2:00 Brazil -02/-01 2000 Oct 15 + -2:00 - -02 2001 Sep 13 + -2:00 Brazil -02/-01 2002 Oct 1 + -2:00 - -02 # Other Atlantic islands have no permanent settlement. # These include Trindade and Martim Vaz (administratively part of ES), # Rocas Atoll (RN), and the St Peter and St Paul Archipelago (PE). @@ -1001,119 +973,119 @@ Zone America/Noronha -2:09:40 - LMT 1914 # In the north a very small part from the river Javary (now Jari I guess, # the border with Amapá) to the Amazon, then to the Xingu. Zone America/Belem -3:13:56 - LMT 1914 - -3:00 Brazil BR%sT 1988 Sep 12 - -3:00 - BRT + -3:00 Brazil -03/-02 1988 Sep 12 + -3:00 - -03 # # west Pará (PA) # West Pará includes Altamira, Óbidos, Prainha, Oriximiná, and Santarém. Zone America/Santarem -3:38:48 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 2008 Jun 24 0:00 - -3:00 - BRT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 2008 Jun 24 0:00 + -3:00 - -03 # # Maranhão (MA), Piauí (PI), Ceará (CE), Rio Grande do Norte (RN), # Paraíba (PB) Zone America/Fortaleza -2:34:00 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 22 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 22 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Pernambuco (PE) (except Atlantic islands) Zone America/Recife -2:19:36 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 15 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 15 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Tocantins (TO) Zone America/Araguaina -3:12:48 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1995 Sep 14 - -3:00 Brazil BR%sT 2003 Sep 24 - -3:00 - BRT 2012 Oct 21 - -3:00 Brazil BR%sT 2013 Sep - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1995 Sep 14 + -3:00 Brazil -03/-02 2003 Sep 24 + -3:00 - -03 2012 Oct 21 + -3:00 Brazil -03/-02 2013 Sep + -3:00 - -03 # # Alagoas (AL), Sergipe (SE) Zone America/Maceio -2:22:52 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1995 Oct 13 - -3:00 Brazil BR%sT 1996 Sep 4 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 22 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1995 Oct 13 + -3:00 Brazil -03/-02 1996 Sep 4 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 22 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Bahia (BA) # There are too many Salvadors elsewhere, so use America/Bahia instead # of America/Salvador. Zone America/Bahia -2:34:04 - LMT 1914 - -3:00 Brazil BR%sT 2003 Sep 24 - -3:00 - BRT 2011 Oct 16 - -3:00 Brazil BR%sT 2012 Oct 21 - -3:00 - BRT + -3:00 Brazil -03/-02 2003 Sep 24 + -3:00 - -03 2011 Oct 16 + -3:00 Brazil -03/-02 2012 Oct 21 + -3:00 - -03 # # Goiás (GO), Distrito Federal (DF), Minas Gerais (MG), # Espírito Santo (ES), Rio de Janeiro (RJ), São Paulo (SP), Paraná (PR), # Santa Catarina (SC), Rio Grande do Sul (RS) Zone America/Sao_Paulo -3:06:28 - LMT 1914 - -3:00 Brazil BR%sT 1963 Oct 23 0:00 - -3:00 1:00 BRST 1964 - -3:00 Brazil BR%sT + -3:00 Brazil -03/-02 1963 Oct 23 0:00 + -3:00 1:00 -02 1964 + -3:00 Brazil -03/-02 # # Mato Grosso do Sul (MS) Zone America/Campo_Grande -3:38:28 - LMT 1914 - -4:00 Brazil AM%sT + -4:00 Brazil -04/-03 # # Mato Grosso (MT) Zone America/Cuiaba -3:44:20 - LMT 1914 - -4:00 Brazil AM%sT 2003 Sep 24 - -4:00 - AMT 2004 Oct 1 - -4:00 Brazil AM%sT + -4:00 Brazil -04/-03 2003 Sep 24 + -4:00 - -04 2004 Oct 1 + -4:00 Brazil -04/-03 # # Rondônia (RO) Zone America/Porto_Velho -4:15:36 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 # # Roraima (RR) Zone America/Boa_Vista -4:02:40 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 1999 Sep 30 - -4:00 Brazil AM%sT 2000 Oct 15 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 1999 Sep 30 + -4:00 Brazil -04/-03 2000 Oct 15 + -4:00 - -04 # # east Amazonas (AM): Boca do Acre, Jutaí, Manaus, Floriano Peixoto # The great circle line from Tabatinga to Porto Acre divides # east from west Amazonas. Zone America/Manaus -4:00:04 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 1993 Sep 28 - -4:00 Brazil AM%sT 1994 Sep 22 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 1993 Sep 28 + -4:00 Brazil -04/-03 1994 Sep 22 + -4:00 - -04 # # west Amazonas (AM): Atalaia do Norte, Boca do Maoco, Benjamin Constant, # Eirunepé, Envira, Ipixuna Zone America/Eirunepe -4:39:28 - LMT 1914 - -5:00 Brazil AC%sT 1988 Sep 12 - -5:00 - ACT 1993 Sep 28 - -5:00 Brazil AC%sT 1994 Sep 22 - -5:00 - ACT 2008 Jun 24 0:00 - -4:00 - AMT 2013 Nov 10 - -5:00 - ACT + -5:00 Brazil -05/-04 1988 Sep 12 + -5:00 - -05 1993 Sep 28 + -5:00 Brazil -05/-04 1994 Sep 22 + -5:00 - -05 2008 Jun 24 0:00 + -4:00 - -04 2013 Nov 10 + -5:00 - -05 # # Acre (AC) Zone America/Rio_Branco -4:31:12 - LMT 1914 - -5:00 Brazil AC%sT 1988 Sep 12 - -5:00 - ACT 2008 Jun 24 0:00 - -4:00 - AMT 2013 Nov 10 - -5:00 - ACT + -5:00 Brazil -05/-04 1988 Sep 12 + -5:00 - -05 2008 Jun 24 0:00 + -4:00 - -04 2013 Nov 10 + -5:00 - -05 # Chile @@ -1258,6 +1230,18 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # to mean 24:00 mainland time, not 24:00 local time, so that Easter # Island is always two hours behind the mainland. +# From Juan Correa (2016-12-04): +# Magallanes region ... will keep DST (UTC -3) all year round.... +# http://www.soychile.cl/Santiago/Sociedad/2016/12/04/433428/Bachelet-firmo-el-decreto-para-establecer-un-horario-unico-para-la-Region-de-Magallanes.aspx +# +# From Deborah Goldsmith (2017-01-19): +# http://www.diariooficial.interior.gob.cl/publicaciones/2017/01/17/41660/01/1169626.pdf +# From Paul Eggert (2017-01-19): +# The above says the Magallanes change expires 2019-05-11 at 24:00, +# so in theory, they will revert to -04/-03 after that, which means +# they will switch from -03 to -04 one hour after Santiago does that day. +# For now, assume that they will not revert. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Chile 1927 1931 - Sep 1 0:00 1:00 S Rule Chile 1928 1932 - Apr 1 0:00 0 - @@ -1298,22 +1282,35 @@ Rule Chile 2016 max - Aug Sun>=9 4:00u 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Santiago -4:42:46 - LMT 1890 -4:42:46 - SMT 1910 Jan 10 # Santiago Mean Time - -5:00 - CLT 1916 Jul 1 # Chile Time + -5:00 - -05 1916 Jul 1 -4:42:46 - SMT 1918 Sep 10 - -4:00 - CLT 1919 Jul 1 + -4:00 - -04 1919 Jul 1 -4:42:46 - SMT 1927 Sep 1 - -5:00 Chile CL%sT 1932 Sep 1 - -4:00 - CLT 1942 Jun 1 - -5:00 - CLT 1942 Aug 1 - -4:00 - CLT 1946 Jul 15 - -4:00 1:00 CLST 1946 Sep 1 # central Chile - -4:00 - CLT 1947 Apr 1 - -5:00 - CLT 1947 May 21 23:00 - -4:00 Chile CL%sT + -5:00 Chile -05/-04 1932 Sep 1 + -4:00 - -04 1942 Jun 1 + -5:00 - -05 1942 Aug 1 + -4:00 - -04 1946 Jul 15 + -4:00 1:00 -03 1946 Sep 1 # central Chile + -4:00 - -04 1947 Apr 1 + -5:00 - -05 1947 May 21 23:00 + -4:00 Chile -04/-03 +Zone America/Punta_Arenas -4:43:40 - LMT 1890 + -4:42:46 - SMT 1910 Jan 10 + -5:00 - -05 1916 Jul 1 + -4:42:46 - SMT 1918 Sep 10 + -4:00 - -04 1919 Jul 1 + -4:42:46 - SMT 1927 Sep 1 + -5:00 Chile -05/-04 1932 Sep 1 + -4:00 - -04 1942 Jun 1 + -5:00 - -05 1942 Aug 1 + -4:00 - -04 1947 Apr 1 + -5:00 - -05 1947 May 21 23:00 + -4:00 Chile -04/-03 2016 Dec 4 + -3:00 - -03 Zone Pacific/Easter -7:17:28 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile -07/-06 1982 Mar 14 3:00u # Easter Time + -6:00 Chile -06/-05 # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, @@ -1333,9 +1330,10 @@ Zone Pacific/Easter -7:17:28 - LMT 1890 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - -00 1965 - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1982 May - -4:00 Chile CL%sT + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1982 May + -4:00 Chile -04/-03 2016 Dec 4 + -3:00 - -03 # Colombia @@ -1348,7 +1346,7 @@ Rule CO 1993 only - Apr 4 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Bogota -4:56:16 - LMT 1884 Mar 13 -4:56:16 - BMT 1914 Nov 23 # Bogotá Mean Time - -5:00 CO CO%sT # Colombia Time + -5:00 CO -05/-04 # Malpelo, Providencia, San Andres # no information; probably like America/Bogota @@ -1372,7 +1370,7 @@ Zone America/Bogota -4:56:16 - LMT 1884 Mar 13 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad - -4:30 - ANT 1965 # Netherlands Antilles Time + -4:30 - -0430 1965 -4:00 - AST # From Arthur David Olson (2011-06-15): @@ -1387,19 +1385,32 @@ Link America/Curacao America/Kralendijk # Caribbean Netherlands # # Milne says the Central and South American Telegraph Company used -5:24:15. # -# From Paul Eggert (2007-03-04): -# Apparently Ecuador had a failed experiment with DST in 1992. -# (2007-02-27) and -# (2006-11-06) both -# talk about "hora Sixto". Leave this alone for now, as we have no data. +# From Alois Treindl (2016-12-15): +# http://www.elcomercio.com/actualidad/hora-sixto-1993.html +# ... Whether the law applied also to Galápagos, I do not know. +# From Paul Eggert (2016-12-15): +# http://www.elcomercio.com/afull/modificacion-husohorario-ecuador-presidentes-decreto.html +# This says President Sixto Durán Ballén signed decree No. 285, which +# established DST from 1992-11-28 to 1993-02-05; it does not give transition +# times. The people called it "hora de Sixto" ("Sixto hour"). The change did +# not go over well; a popular song "Qué hora es" by Jaime Guevara had lyrics +# that included "Amanecía en mitad de la noche, los guaguas iban a clase sin +# sol" ("It was dawning in the middle of the night, the buses went to class +# without sun"). Although Ballén's campaign slogan was "Ni un paso atrás" +# (Not one step back), the clocks went back in 1993 and the experiment was not +# repeated. For now, assume transitions were at 00:00 local time country-wide. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Ecuador 1992 only - Nov 28 0:00 1:00 S +Rule Ecuador 1993 only - Feb 5 0:00 0 - # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guayaquil -5:19:20 - LMT 1890 -5:14:00 - QMT 1931 # Quito Mean Time - -5:00 - ECT # Ecuador Time + -5:00 Ecuador -05/-04 Zone Pacific/Galapagos -5:58:24 - LMT 1931 # Puerto Baquerizo Moreno - -5:00 - ECT 1986 - -6:00 - GALT # Galápagos Time + -5:00 - -05 1986 + -6:00 Ecuador -06/-05 # Falklands @@ -1499,25 +1510,24 @@ Rule Falk 2001 2010 - Sep Sun>=1 2:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Stanley -3:51:24 - LMT 1890 -3:51:24 - SMT 1912 Mar 12 # Stanley Mean Time - -4:00 Falk FK%sT 1983 May # Falkland Is Time - -3:00 Falk FK%sT 1985 Sep 15 - -4:00 Falk FK%sT 2010 Sep 5 2:00 - -3:00 - FKST + -4:00 Falk -04/-03 1983 May + -3:00 Falk -03/-02 1985 Sep 15 + -4:00 Falk -04/-03 2010 Sep 5 2:00 + -3:00 - -03 # French Guiana # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Cayenne -3:29:20 - LMT 1911 Jul - -4:00 - GFT 1967 Oct # French Guiana Time - -3:00 - GFT + -4:00 - -04 1967 Oct + -3:00 - -03 # Guyana # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown - -3:45 - GBGT 1966 May 26 # Br Guiana Time - -3:45 - GYT 1975 Jul 31 # Guyana Time - -3:00 - GYT 1991 + -3:45 - -0345 1975 Jul 31 + -3:00 - -03 1991 # IATA SSIM (1996-06) says -4:00. Assume a 1991 switch. - -4:00 - GYT + -4:00 - -04 # Paraguay # @@ -1609,9 +1619,9 @@ Rule Para 2013 max - Mar Sun>=22 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Asuncion -3:50:40 - LMT 1890 -3:50:40 - AMT 1931 Oct 10 # Asunción Mean Time - -4:00 - PYT 1972 Oct # Paraguay Time - -3:00 - PYT 1974 Apr - -4:00 Para PY%sT + -4:00 - -04 1972 Oct + -3:00 - -03 1974 Apr + -4:00 Para -04/-03 # Peru # @@ -1638,12 +1648,12 @@ Rule Peru 1994 only - Apr 1 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Lima -5:08:12 - LMT 1890 -5:08:36 - LMT 1908 Jul 28 # Lima Mean Time? - -5:00 Peru PE%sT # Peru Time + -5:00 Peru -05/-04 # South Georgia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken - -2:00 - GST # South Georgia Time + -2:00 - -02 # South Sandwich Is # uninhabited; scientific personnel have wintered @@ -1653,9 +1663,8 @@ Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken Zone America/Paramaribo -3:40:40 - LMT 1911 -3:40:52 - PMT 1935 # Paramaribo Mean Time -3:40:36 - PMT 1945 Oct # The capital moved? - -3:30 - NEGT 1975 Nov 20 # Dutch Guiana Time - -3:30 - SRT 1984 Oct # Suriname Time - -3:00 - SRT + -3:30 - -0330 1984 Oct + -3:00 - -03 # Trinidad and Tobago # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1758,11 +1767,16 @@ Rule Uruguay 2006 only - Mar 12 2:00 0 - # [dated 2015-06-29; repeals Decree 311/006 dated 2006-09-04] Rule Uruguay 2006 2014 - Oct Sun>=1 2:00 1:00 S Rule Uruguay 2007 2015 - Mar Sun>=8 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] + +# This Zone can be simplified once we assume zic %z. Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28 -3:44:44 - MMT 1920 May 1 # Montevideo MT - -3:30 Uruguay UY%sT 1942 Dec 14 # Uruguay Time - -3:00 Uruguay UY%sT + -3:30 Uruguay -0330/-03 1942 Dec 14 + -3:00 Uruguay -03/-02 1968 + -3:00 Uruguay -03/-0230 1971 + -3:00 Uruguay -03/-02 1974 + -3:00 Uruguay -03/-0230 1974 Dec 22 + -3:00 Uruguay -03/-02 # Venezuela # @@ -1796,7 +1810,7 @@ Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Caracas -4:27:44 - LMT 1890 -4:27:40 - CMT 1912 Feb 12 # Caracas Mean Time? - -4:30 - VET 1965 Jan 1 0:00 # Venezuela T. - -4:00 - VET 2007 Dec 9 3:00 - -4:30 - VET 2016 May 1 2:30 - -4:00 - VET + -4:30 - -0430 1965 Jan 1 0:00 + -4:00 - -04 2007 Dec 9 3:00 + -4:30 - -0430 2016 May 1 2:30 + -4:00 - -04 diff --git a/jdk/test/sun/util/calendar/zi/tzdata/zone.tab b/jdk/test/sun/util/calendar/zi/tzdata/zone.tab index 7255ea5bfb4..8d6247d21a7 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/zone.tab +++ b/jdk/test/sun/util/calendar/zi/tzdata/zone.tab @@ -165,6 +165,7 @@ CH +4723+00832 Europe/Zurich CI +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga CL -3327-07040 America/Santiago Chile (most areas) +CL -5309-07055 America/Punta_Arenas Region of Magallanes CL -2709-10926 Pacific/Easter Easter Island CM +0403+00942 Africa/Douala CN +3114+12128 Asia/Shanghai Beijing Time @@ -420,7 +421,6 @@ UA +5026+03031 Europe/Kiev Ukraine (most areas) UA +4837+02218 Europe/Uzhgorod Ruthenia UA +4750+03510 Europe/Zaporozhye Zaporozh'ye/Zaporizhia; Lugansk/Luhansk (east) UG +0019+03225 Africa/Kampala -UM +1645-16931 Pacific/Johnston Johnston Atoll UM +2813-17722 Pacific/Midway Midway Islands UM +1917+16637 Pacific/Wake Wake Island US +404251-0740023 America/New_York Eastern (most areas) diff --git a/jdk/test/tools/jar/mmrjar/Basic.java b/jdk/test/tools/jar/mmrjar/Basic.java index 6b0ad843641..a5b1eca0346 100644 --- a/jdk/test/tools/jar/mmrjar/Basic.java +++ b/jdk/test/tools/jar/mmrjar/Basic.java @@ -221,7 +221,8 @@ public class Basic { Assert.assertEquals(actual, expected); } - // jar tool does two updates, no exported packages, all concealed + // jar tool does two updates, no exported packages, all concealed. + // Along with various --describe-module variants @Test public void test5() throws IOException { // compile the mr10 directory @@ -266,10 +267,13 @@ public class Basic { jar("-d --file mr.jar"); + String uri = (Paths.get("mr.jar")).toUri().toString(); + uri = "jar:" + uri + "/!module-info.class"; + actual = lines(outbytes); expected = Set.of( - "hi", - "requires mandated java.base", + "hi " + uri, + "requires java.base mandated", "contains p", "contains p.internal" ); @@ -304,13 +308,19 @@ public class Basic { actual = lines(outbytes); expected = Set.of( - "hi", - "requires mandated java.base", + "hi " + uri, + "requires java.base mandated", "contains p", "contains p.internal", "contains p.internal.bar" ); Assert.assertEquals(actual, expected); + + for (String release : new String[] {"9" , "10", "100", "1000"}) { + jar("-d --file mr.jar --release " + release); + actual = lines(outbytes); + Assert.assertEquals(actual, expected); + } } // root and versioned module-info entries have different main-class, version @@ -331,7 +341,7 @@ public class Basic { ModuleInfoExtender mie = ModuleInfoExtender.newExtender( new ByteArrayInputStream(mdBytes)); - mie.mainClass("foo.main"); + mie.mainClass("p.Main"); mie.version(Version.parse("1.0")); ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -345,7 +355,7 @@ public class Basic { // different main-class mie = ModuleInfoExtender.newExtender(new ByteArrayInputStream(mdBytes)); - mie.mainClass("foo.main2"); + mie.mainClass("p.Main2"); mie.version(Version.parse("1.0")); baos.reset(); mie.write(baos); @@ -360,7 +370,7 @@ public class Basic { // different version mie = ModuleInfoExtender.newExtender(new ByteArrayInputStream(mdBytes)); - mie.mainClass("foo.main"); + mie.mainClass("p.Main"); mie.version(Version.parse("2.0")); baos.reset(); mie.write(baos); @@ -395,21 +405,48 @@ public class Basic { Files.copy(Paths.get("test7-v9", "module-info.class"), Paths.get("test7-v10", "module-info.class")); - int rc = jar("--create --file mmr.jar --main-class=foo.main -C test7 . --release 9 -C test7-v9 . --release 10 -C test7-v10 ."); - -System.out.println("-----------------------"); -System.out.println( new String(errbytes.toByteArray())); - - + int rc = jar("--create --file mmr.jar --main-class=p.Main -C test7 . --release 9 -C test7-v9 . --release 10 -C test7-v10 ."); Assert.assertEquals(rc, 0); + jar("-d --file=mmr.jar"); + Set actual = lines(outbytes); + Set expected = Set.of( + "releases: 9 10", + "No root module descriptor, specify --release" + ); + Assert.assertEquals(actual, expected); - jar("-tf mmr.jar"); + String uriPrefix = "jar:" + (Paths.get("mmr.jar")).toUri().toString(); -System.out.println("-----------------------"); -System.out.println( new String(outbytes.toByteArray())); + jar("-d --file=mmr.jar --release 9"); + actual = lines(outbytes); + expected = Set.of( + "releases: 9 10", + "m1 " + uriPrefix + "/!META-INF/versions/9/module-info.class", + "requires java.base mandated", + "exports p", + "main-class p.Main" + ); + Assert.assertEquals(actual, expected); - Optional exp = Optional.of("foo.main"); + jar("-d --file=mmr.jar --release 10"); + actual = lines(outbytes); + expected = Set.of( + "releases: 9 10", + "m1 " + uriPrefix + "/!META-INF/versions/10/module-info.class", + "requires java.base mandated", + "exports p", + "main-class p.Main" + ); + Assert.assertEquals(actual, expected); + + for (String release : new String[] {"11", "12", "15", "100"}) { + jar("-d --file mmr.jar --release " + release); + actual = lines(outbytes); + Assert.assertEquals(actual, expected); + } + + Optional exp = Optional.of("p.Main"); try (ZipFile zf = new ZipFile("mmr.jar")) { Assert.assertTrue(zf.getEntry("module-info.class") == null); diff --git a/jdk/test/tools/jar/modularJar/Basic.java b/jdk/test/tools/jar/modularJar/Basic.java index 8a9d44132fc..a656a86b24b 100644 --- a/jdk/test/tools/jar/modularJar/Basic.java +++ b/jdk/test/tools/jar/modularJar/Basic.java @@ -39,6 +39,7 @@ import java.util.stream.Stream; import jdk.testlibrary.FileUtils; import jdk.testlibrary.JDKToolFinder; import org.testng.annotations.BeforeTest; +import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import static java.lang.String.format; @@ -46,7 +47,7 @@ import static java.lang.System.out; /* * @test - * @bug 8167328 8171830 + * @bug 8167328 8171830 8165640 8174248 8176772 * @library /lib/testlibrary * @modules jdk.compiler * jdk.jartool @@ -241,11 +242,6 @@ public class Basic { java(mp, FOO.moduleName + "/" + FOO.mainClass) .assertSuccess() -.resultChecker(r -> { - System.out.println("==================================="); - System.out.println(r.output); - System.out.println("==================================="); -}) .resultChecker(r -> assertModuleData(r, FOO)); try (InputStream fis = Files.newInputStream(modularJar); JarInputStream jis = new JarInputStream(fis)) { @@ -338,7 +334,7 @@ public class Basic { // A "bad" main class in first create ( and no version ) jar("--create", "--file=" + modularJar.toString(), - "--main-class=" + "IAmNotTheEntryPoint", + "--main-class=" + "jdk.test.foo.IAmNotTheEntryPoint", "--no-manifest", "-C", modClasses.toString(), ".") // includes module-info.class .assertSuccess(); @@ -482,13 +478,13 @@ public class Basic { "--file=" + modularJar.toString()) .assertSuccess() .resultChecker(r -> { - // Expect similar output: "bar, requires mandated foo, ... + // Expect "bar jar:file:/.../!module-info.class" // conceals jdk.test.foo, conceals jdk.test.foo.internal" - Pattern p = Pattern.compile("\\s+bar\\s+requires\\s++foo"); - assertTrue(p.matcher(r.output).find(), - "Expecting to find \"bar, requires foo,...\"", + String uri = "jar:" + modularJar.toUri().toString() + "/!module-info.class"; + assertTrue(r.output.contains("bar " + uri), + "Expecting to find \"bar " + uri + "\"", "in output, but did not: [" + r.output + "]"); - p = Pattern.compile( + Pattern p = Pattern.compile( "contains\\s+jdk.test.foo\\s+contains\\s+jdk.test.foo.internal"); assertTrue(p.matcher(r.output).find(), "Expecting to find \"contains jdk.test.foo,...\"", @@ -739,6 +735,54 @@ public class Basic { .assertSuccess(); } + @Test + public void servicesCreateWithoutFailureNonRootMRMJAR() throws IOException { + // without a root module-info.class + Path mp = Paths.get("servicesCreateWithoutFailureNonRootMRMJAR"); + createTestDir(mp); + Path modClasses = MODULE_CLASSES.resolve("baz"); + Path mrjarDir = MRJAR_DIR.resolve("baz"); + Path modularJar = mp.resolve("baz.jar"); + + jar("--create", + "--file=" + modularJar.toString(), + "--main-class=" + "jdk.test.baz.Baz", + "-m", mrjarDir.resolve("META-INF/MANIFEST.MF").toRealPath().toString(), + "-C", mrjarDir.toString(), "META-INF/versions/9/module-info.class", + "-C", modClasses.toString(), "jdk/test/baz/BazService.class", + "-C", modClasses.toString(), "jdk/test/baz/Baz.class", + "-C", modClasses.toString(), "jdk/test/baz/internal/BazServiceImpl.class") + .assertSuccess(); + + + for (String option : new String[] {"--describe-module", "-d" }) { + + jar(option, + "--file=" + modularJar.toString(), + "--release", "9") + .assertSuccess() + .resultChecker(r -> + assertTrue(r.output.contains("main-class jdk.test.baz.Baz"), + "Expected to find ", "main-class jdk.test.baz.Baz", + " in [", r.output, "]")); + + jarWithStdin(modularJar.toFile(), option, "--release", "9") + .assertSuccess() + .resultChecker(r -> + assertTrue(r.output.contains("main-class jdk.test.baz.Baz"), + "Expected to find ", "main-class jdk.test.baz.Baz", + " in [", r.output, "]")); + + } + // run module main class + java(mp, "baz/jdk.test.baz.Baz") + .assertSuccess() + .resultChecker(r -> + assertTrue(r.output.contains("mainClass:jdk.test.baz.Baz"), + "Expected to find ", "mainClass:jdk.test.baz.Baz", + " in [", r.output, "]")); + } + @Test public void exportCreateWithMissingPkg() throws IOException { @@ -759,8 +803,8 @@ public class Basic { } @Test - public void printModuleDescriptorFoo() throws IOException { - Path mp = Paths.get("printModuleDescriptorFoo"); + public void describeModuleFoo() throws IOException { + Path mp = Paths.get("describeModuleFoo"); createTestDir(mp); Path modClasses = MODULE_CLASSES.resolve(FOO.moduleName); Path modularJar = mp.resolve(FOO.moduleName + ".jar"); @@ -773,7 +817,7 @@ public class Basic { "-C", modClasses.toString(), ".") .assertSuccess(); - for (String option : new String[] {"--print-module-descriptor", "-d" }) { + for (String option : new String[] {"--describe-module", "-d" }) { jar(option, "--file=" + modularJar.toString()) .assertSuccess() @@ -794,8 +838,8 @@ public class Basic { } @Test - public void printModuleDescriptorFooFromStdin() throws IOException { - Path mp = Paths.get("printModuleDescriptorFooFromStdin"); + public void describeModuleFooFromStdin() throws IOException { + Path mp = Paths.get("describeModuleFooFromStdin"); createTestDir(mp); Path modClasses = MODULE_CLASSES.resolve(FOO.moduleName); Path modularJar = mp.resolve(FOO.moduleName + ".jar"); @@ -808,7 +852,7 @@ public class Basic { "-C", modClasses.toString(), ".") .assertSuccess(); - for (String option : new String[] {"--print-module-descriptor", "-d" }) { + for (String option : new String[] {"--describe-module", "-d" }) { jarWithStdin(modularJar.toFile(), option) .assertSuccess() @@ -820,6 +864,50 @@ public class Basic { } } + + @DataProvider(name = "autoNames") + public Object[][] autoNames() { + return new Object[][] { + // JAR file name module-name[@version] + { "foo.jar", "foo" }, + { "foo1.jar", "foo1" }, + { "foo4j.jar", "foo4j", }, + { "foo-1.2.3.4.jar", "foo@1.2.3.4" }, + { "foo-bar.jar", "foo.bar" }, + { "foo-1.2-SNAPSHOT.jar", "foo@1.2-SNAPSHOT" }, + }; + } + + @Test(dataProvider = "autoNames") + public void describeAutomaticModule(String jarName, String mid) + throws IOException + { + Path mp = Paths.get("describeAutomaticModule"); + createTestDir(mp); + Path regularJar = mp.resolve(jarName); + Path t = Paths.get("t"); + if (Files.notExists(t)) + Files.createFile(t); + + jar("--create", + "--file=" + regularJar.toString(), + t.toString()) + .assertSuccess(); + + for (String option : new String[] {"--describe-module", "-d" }) { + jar(option, + "--file=" + regularJar.toString()) + .assertSuccess() + .resultChecker(r -> { + assertTrue(r.output.contains("No module descriptor found")); + assertTrue(r.output.contains("Derived automatic module")); + assertTrue(r.output.contains(mid + " automatic"), + "Expected [", "module " + mid,"] in [", r.output, "]"); + } + ); + } + } + // -- Infrastructure static Result jarWithStdin(File stdinSource, String... args) { diff --git a/jdk/test/tools/jar/modularJar/src/bar/jdk/test/bar/Bar.java b/jdk/test/tools/jar/modularJar/src/bar/jdk/test/bar/Bar.java index 2d1d844c818..a7bd3f1c222 100644 --- a/jdk/test/tools/jar/modularJar/src/bar/jdk/test/bar/Bar.java +++ b/jdk/test/tools/jar/modularJar/src/bar/jdk/test/bar/Bar.java @@ -28,7 +28,6 @@ import java.lang.module.ModuleDescriptor.Exports; import java.lang.module.ModuleDescriptor.Provides; import java.lang.module.ModuleReference; import java.lang.module.ResolvedModule; -import java.lang.reflect.Module; import java.util.Optional; import java.util.StringJoiner; import java.util.HashSet; diff --git a/jdk/test/tools/jar/modularJar/src/baz/jdk/test/baz/Baz.java b/jdk/test/tools/jar/modularJar/src/baz/jdk/test/baz/Baz.java new file mode 100644 index 00000000000..e2bb5a3e4fa --- /dev/null +++ b/jdk/test/tools/jar/modularJar/src/baz/jdk/test/baz/Baz.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.test.baz; + +import java.lang.module.ModuleDescriptor; + +public class Baz { + public static void main(String[] args) { + ModuleDescriptor md = Baz.class.getModule().getDescriptor(); + System.out.println("nameAndVersion:" + md.toNameAndVersion()); + md.mainClass().ifPresent(mc -> System.out.println("mainClass:" + mc)); + } +} diff --git a/jdk/test/tools/jar/multiRelease/whitebox/Driver.java b/jdk/test/tools/jar/multiRelease/whitebox/Driver.java new file mode 100644 index 00000000000..a7ac089f060 --- /dev/null +++ b/jdk/test/tools/jar/multiRelease/whitebox/Driver.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @modules jdk.jartool/sun.tools.jar + * @run testng/othervm jdk.jartool/sun.tools.jar.ValidatorComparatorTest + */ diff --git a/jdk/test/tools/jar/multiRelease/whitebox/jdk.jartool/sun/tools/jar/ValidatorComparatorTest.java b/jdk/test/tools/jar/multiRelease/whitebox/jdk.jartool/sun/tools/jar/ValidatorComparatorTest.java new file mode 100644 index 00000000000..974078274b2 --- /dev/null +++ b/jdk/test/tools/jar/multiRelease/whitebox/jdk.jartool/sun/tools/jar/ValidatorComparatorTest.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @summary White-box test for Validator.ENTRYNAME_COMPARATOR ( currently just + * checks module descriptors ). + */ +package sun.tools.jar; + +import java.util.List; +import static java.util.stream.Collectors.toList; +import static sun.tools.jar.Validator.ENTRYNAME_COMPARATOR; + +import org.testng.Assert; +import org.testng.annotations.Test; + +public class ValidatorComparatorTest { + + @Test + public void testModuleInfo() throws Throwable { + List list = + List.of("module-info.class", + "META-INF/versions/9/module-info.class", + "META-INF/versions/10/module-info.class"); + List sorted = list.stream() + .sorted(ENTRYNAME_COMPARATOR) + .collect(toList()); + List expected = list; + Assert.assertEquals(sorted, expected); + + + list = List.of("META-INF/versions/10/module-info.class", + "META-INF/versions/9/module-info.class", + "module-info.class"); + sorted = list.stream().sorted(ENTRYNAME_COMPARATOR).collect(toList()); + expected = + List.of("module-info.class", + "META-INF/versions/9/module-info.class", + "META-INF/versions/10/module-info.class"); + Assert.assertEquals(sorted, expected); + + + list = List.of("META-INF/versions/1001/module-info.class", + "META-INF/versions/1000/module-info.class", + "META-INF/versions/999/module-info.class", + "META-INF/versions/101/module-info.class", + "META-INF/versions/100/module-info.class", + "META-INF/versions/99/module-info.class", + "META-INF/versions/31/module-info.class", + "META-INF/versions/30/module-info.class", + "META-INF/versions/29/module-info.class", + "META-INF/versions/21/module-info.class", + "META-INF/versions/20/module-info.class", + "META-INF/versions/13/module-info.class", + "META-INF/versions/12/module-info.class", + "META-INF/versions/11/module-info.class", + "META-INF/versions/10/module-info.class", + "META-INF/versions/9/module-info.class", + "module-info.class"); + sorted = list.stream().sorted(ENTRYNAME_COMPARATOR).collect(toList()); + expected = + List.of("module-info.class", + "META-INF/versions/9/module-info.class", + "META-INF/versions/10/module-info.class", + "META-INF/versions/11/module-info.class", + "META-INF/versions/12/module-info.class", + "META-INF/versions/13/module-info.class", + "META-INF/versions/20/module-info.class", + "META-INF/versions/21/module-info.class", + "META-INF/versions/29/module-info.class", + "META-INF/versions/30/module-info.class", + "META-INF/versions/31/module-info.class", + "META-INF/versions/99/module-info.class", + "META-INF/versions/100/module-info.class", + "META-INF/versions/101/module-info.class", + "META-INF/versions/999/module-info.class", + "META-INF/versions/1000/module-info.class", + "META-INF/versions/1001/module-info.class"); + Assert.assertEquals(sorted, expected); + } +} diff --git a/jdk/test/tools/jimage/VerifyJimage.java b/jdk/test/tools/jimage/VerifyJimage.java index d5415af35b0..9ed9880d0a5 100644 --- a/jdk/test/tools/jimage/VerifyJimage.java +++ b/jdk/test/tools/jimage/VerifyJimage.java @@ -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 @@ -49,7 +49,7 @@ import jdk.internal.jimage.ImageLocation; * @test * @summary Verify jimage * @modules java.base/jdk.internal.jimage - * @run main/othervm --add-modules=ALL-SYSTEM,jdk.incubator.httpclient VerifyJimage + * @run main/othervm --add-modules ALL-SYSTEM VerifyJimage */ /** @@ -76,8 +76,8 @@ public class VerifyJimage { long start = System.nanoTime(); int numThreads = Integer.getInteger("jdk.test.threads", 1); - List readers = newJImageReaders(); - VerifyJimage verify = new VerifyJimage(readers, numThreads); + JImageReader reader = newJImageReader(); + VerifyJimage verify = new VerifyJimage(reader, numThreads); if (args.length == 0) { // load classes from jimage verify.loadClasses(); @@ -90,9 +90,7 @@ public class VerifyJimage { } verify.waitForCompletion(); long end = System.nanoTime(); - int entries = readers.stream() - .mapToInt(JImageReader::entries) - .sum(); + int entries = reader.entries(); System.out.format("%d entries %d files verified: %d ms %d errors%n", entries, verify.count.get(), TimeUnit.NANOSECONDS.toMillis(end - start), failed.size()); @@ -105,11 +103,11 @@ public class VerifyJimage { } private final AtomicInteger count = new AtomicInteger(0); - private final List readers; + private final JImageReader reader; private final ExecutorService pool; - VerifyJimage(List readers, int numThreads) { - this.readers = readers; + VerifyJimage(JImageReader reader, int numThreads) { + this.reader = reader; this.pool = Executors.newFixedThreadPool(numThreads); } @@ -132,7 +130,7 @@ public class VerifyJimage { -> !Files.isDirectory(p) && !mdir.relativize(p).toString().startsWith("_") && !p.getFileName().toString().equals("MANIFEST.MF")) - .forEach(p -> compare(mdir, p, readers)); + .forEach(p -> compare(mdir, p, reader)); } catch (IOException e) { throw new UncheckedIOException(e); } @@ -154,7 +152,7 @@ public class VerifyJimage { "jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector" ); - private void compare(Path mdir, Path p, List readers) { + private void compare(Path mdir, Path p, JImageReader reader) { String entry = p.getFileName().toString().equals(MODULE_INFO) ? mdir.getFileName().toString() + "/" + MODULE_INFO : mdir.relativize(p).toString().replace(File.separatorChar, '/'); @@ -167,52 +165,59 @@ public class VerifyJimage { return; } - String jimage = "modules"; - JImageReader reader = readers.stream() - .filter(r -> r.findLocation(entry) != null) - .filter(r -> jimage.isEmpty() || r.imageName().equals(jimage)) - .findFirst().orElse(null); - if (reader == null) { - failed.add(entry + " not found: " + p.getFileName().toString()); - } else { + if (reader.findLocation(entry) != null) { reader.compare(entry, p); } } private void loadClasses() { ClassLoader loader = ClassLoader.getSystemClassLoader(); - for (JImageReader reader : readers) { - Arrays.stream(reader.getEntryNames()) - .filter(n -> n.endsWith(".class") && !n.endsWith(MODULE_INFO)) - .forEach(n -> { - String cn = removeModule(n).replaceAll("\\.class$", "").replace('/', '.'); - count.incrementAndGet(); - try { - System.out.println("Loading " + cn); - Class.forName(cn, false, loader); - } catch (VerifyError ve) { - System.err.println("VerifyError for " + cn); - failed.add(reader.imageName() + ": " + cn + " not verified: " + ve.getMessage()); - } catch (ClassNotFoundException e) { - failed.add(reader.imageName() + ": " + cn + " not found"); - } - }); + Stream.of(reader.getEntryNames()) + .filter(this::accept) + .map(this::toClassName) + .forEach(cn -> { + count.incrementAndGet(); + try { + System.out.println("Loading " + cn); + Class.forName(cn, false, loader); + } catch (VerifyError ve) { + System.err.println("VerifyError for " + cn); + failed.add(reader.imageName() + ": " + cn + " not verified: " + ve.getMessage()); + } catch (ClassNotFoundException e) { + failed.add(reader.imageName() + ": " + cn + " not found"); + } + }); + } + + private String toClassName(String entry) { + int index = entry.indexOf('/', 1); + return entry.substring(index + 1, entry.length()) + .replaceAll("\\.class$", "").replace('/', '.'); + } + + private static Set EXCLUDED_MODULES = + Set.of("javafx.deploy", "jdk.deploy", "jdk.plugin", "jdk.javaws", + // All JVMCI packages other than jdk.vm.ci.services are dynamically + // exported to jdk.internal.vm.compiler and jdk.aot + "jdk.internal.vm.compiler", "jdk.aot" + ); + + private boolean accept(String entry) { + int index = entry.indexOf('/', 1); + String mn = index > 1 ? entry.substring(1, index) : ""; + // filter deployment modules + + if (mn.isEmpty() || EXCLUDED_MODULES.contains(mn)) { + return false; } + return entry.endsWith(".class") && !entry.endsWith(MODULE_INFO); } - private String removeModule(String path) { - int index = path.indexOf('/', 1); - return path.substring(index + 1, path.length()); - } - - private static List newJImageReaders() throws IOException { + private static JImageReader newJImageReader() throws IOException { String home = System.getProperty("java.home"); Path jimage = Paths.get(home, "lib", "modules"); - JImageReader reader = new JImageReader(jimage); - List result = new ArrayList<>(); System.out.println("opened " + jimage); - result.add(reader); - return result; + return new JImageReader(jimage); } static class JImageReader extends BasicImageReader { diff --git a/jdk/test/tools/jlink/IntegrationTest.java b/jdk/test/tools/jlink/IntegrationTest.java index 9bf019069ba..1218fad9f27 100644 --- a/jdk/test/tools/jlink/IntegrationTest.java +++ b/jdk/test/tools/jlink/IntegrationTest.java @@ -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 @@ -25,6 +25,7 @@ import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.UncheckedIOException; +import java.nio.ByteOrder; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -135,17 +136,12 @@ public class IntegrationTest { } System.out.println(jl); - JlinkConfiguration config - = new JlinkConfiguration(null, null, null, null); - - System.out.println(config); - Plugin p = Jlink.newPlugin("toto", Collections.emptyMap(), null); if (p != null) { throw new Exception("Plugin should be null"); } - Plugin p2 = Jlink.newPlugin("compress", Collections.emptyMap(), null); + Plugin p2 = Jlink.newPlugin("compress", Map.of("compress", "1"), null); if (p2 == null) { throw new Exception("Plugin should not be null"); } @@ -163,7 +159,7 @@ public class IntegrationTest { Set limits = new HashSet<>(); limits.add("java.management"); JlinkConfiguration config = new Jlink.JlinkConfiguration(output, - modulePaths, mods, limits, null); + modulePaths, mods, limits, ByteOrder.nativeOrder()); List lst = new ArrayList<>(); @@ -211,10 +207,6 @@ public class IntegrationTest { } checkReleaseProperty(props, "JAVA_VERSION"); - checkReleaseProperty(props, "JAVA_FULL_VERSION"); - checkReleaseProperty(props, "OS_NAME"); - checkReleaseProperty(props, "OS_ARCH"); - checkReleaseProperty(props, "OS_VERSION"); if (!Files.exists(output.resolve("toto.txt"))) { throw new AssertionError("Post processing not called"); diff --git a/jdk/test/tools/jlink/JLink2Test.java b/jdk/test/tools/jlink/JLink2Test.java index 9eed823069a..5c0f7f33571 100644 --- a/jdk/test/tools/jlink/JLink2Test.java +++ b/jdk/test/tools/jlink/JLink2Test.java @@ -39,7 +39,6 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; -import java.lang.reflect.Layer; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; @@ -88,7 +87,7 @@ public class JLink2Test { private static void testOptions() throws Exception { List builtInPlugins = new ArrayList<>(); - builtInPlugins.addAll(PluginRepository.getPlugins(Layer.boot())); + builtInPlugins.addAll(PluginRepository.getPlugins(ModuleLayer.boot())); if(builtInPlugins.isEmpty()) { throw new Exception("No builtin plugins"); } diff --git a/jdk/test/tools/jlink/JLinkNegativeTest.java b/jdk/test/tools/jlink/JLinkNegativeTest.java index f8ac8093f33..4b4e3d81760 100644 --- a/jdk/test/tools/jlink/JLinkNegativeTest.java +++ b/jdk/test/tools/jlink/JLinkNegativeTest.java @@ -25,6 +25,7 @@ * @test * @summary Negative tests for jlink * @bug 8130861 + * @bug 8174718 * @author Andrei Eremeev * @library ../lib * @modules java.base/jdk.internal.jimage @@ -50,6 +51,7 @@ import java.nio.file.attribute.BasicFileAttributes; import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Set; import jdk.internal.module.ModuleInfoWriter; import org.testng.SkipException; @@ -176,7 +178,7 @@ public class JLinkNegativeTest { .output(imageFile) .addMods("not_zip") .modulePath(helper.defaultModulePath()) - .call().assertFailure("Error: java.util.zip.ZipException: zip file is empty"); + .call().assertFailure("Error: Error reading"); } finally { deleteDirectory(jar); } @@ -191,7 +193,7 @@ public class JLinkNegativeTest { .output(imageFile) .addMods("not_zip") .modulePath(helper.defaultModulePath()) - .call().assertFailure("Error: java.io.IOException: Invalid jmod file"); + .call().assertFailure("Error: java.io.IOException: Invalid JMOD file"); } finally { deleteDirectory(jmod); } @@ -250,7 +252,7 @@ public class JLinkNegativeTest { String moduleName = "hacked4"; Path jmod = helper.generateDefaultJModule(moduleName).assertSuccess(); JImageGenerator.addFiles(jmod, - new InMemoryFile("/native", new byte[0]), + new InMemoryFile("/lib", new byte[0]), new InMemoryFile("/conf", new byte[0]), new InMemoryFile("/bin", new byte[0])); try { @@ -274,7 +276,7 @@ public class JLinkNegativeTest { helper.getJmodSrcDir(), helper.getJmodClassesDir(), moduleName2, classNames); try (OutputStream out = Files.newOutputStream(module2.resolve("module-info.class"))) { - ModuleInfoWriter.write(ModuleDescriptor.module(moduleName1) + ModuleInfoWriter.write(ModuleDescriptor.newModule(moduleName1) .requires("java.base").build(), out); } @@ -332,7 +334,7 @@ public class JLinkNegativeTest { helper.getJarSrcDir(), helper.getJarClassesDir(), moduleName2, classNames); try (OutputStream out = Files.newOutputStream(module2.resolve("module-info.class"))) { - ModuleInfoWriter.write(ModuleDescriptor.module(moduleName1) + ModuleInfoWriter.write(ModuleDescriptor.newModule(moduleName1) .requires("java.base").build(), out); } @@ -346,4 +348,27 @@ public class JLinkNegativeTest { deleteDirectory(jar2); } } + + public void testInconsistentModuleInfo() throws IOException { + String moduleName = "inconsistentJar"; + List classNames = Arrays.asList("xorg.acme.internal.B"); + Path module = helper.generateModuleCompiledClasses( + helper.getJarSrcDir(), helper.getJarClassesDir(), moduleName, classNames); + + try (OutputStream out = Files.newOutputStream(module.resolve("module-info.class"))) { + ModuleInfoWriter.write(ModuleDescriptor.newModule(moduleName) + .requires("java.base") + .packages(Set.of("org.acme.internal")) + .build(), out); + } + + Path jar = JImageGenerator.createJarFile(helper.getJarDir().resolve(moduleName + ".jar"), module); + try { + helper.generateDefaultImage(moduleName) + .assertFailure("Module inconsistentJar's descriptor indicates the set of packages is : " + + "[org.acme.internal], but module contains packages: [xorg.acme.internal]"); + } finally { + deleteDirectory(jar); + } + } } diff --git a/jdk/test/tools/jlink/JLinkTest.java b/jdk/test/tools/jlink/JLinkTest.java index 4690bb12180..64b220710e5 100644 --- a/jdk/test/tools/jlink/JLinkTest.java +++ b/jdk/test/tools/jlink/JLinkTest.java @@ -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 @@ -25,7 +25,6 @@ import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; import java.lang.module.ModuleDescriptor; -import java.lang.reflect.Layer; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -88,7 +87,7 @@ public class JLinkTest { { // number of built-in plugins List builtInPlugins = new ArrayList<>(); - builtInPlugins.addAll(PluginRepository.getPlugins(Layer.boot())); + builtInPlugins.addAll(PluginRepository.getPlugins(ModuleLayer.boot())); totalPlugins = builtInPlugins.size(); // actual num. of plugins loaded from jdk.jlink module int actualJLinkPlugins = 0; @@ -274,7 +273,7 @@ public class JLinkTest { String[] userOptions = {"--compress", "2", "foo" }; String moduleName = "orphanarg1"; helper.generateDefaultJModule(moduleName, "composite2"); - helper.generateDefaultImage(userOptions, moduleName).assertFailure("Error: orphan argument: foo"); + helper.generateDefaultImage(userOptions, moduleName).assertFailure("Error: invalid argument: foo"); } // orphan argument - JDK-8166810 @@ -282,7 +281,7 @@ public class JLinkTest { String[] userOptions = {"--output", "foo", "bar" }; String moduleName = "orphanarg2"; helper.generateDefaultJModule(moduleName, "composite2"); - helper.generateDefaultImage(userOptions, moduleName).assertFailure("Error: orphan argument: bar"); + helper.generateDefaultImage(userOptions, moduleName).assertFailure("Error: invalid argument: bar"); } // basic check for --help - JDK-8173717 diff --git a/jdk/test/tools/jlink/basic/src/test/jdk/test/Test.java b/jdk/test/tools/jlink/basic/src/test/jdk/test/Test.java index e038745c80b..79d07d85ad3 100644 --- a/jdk/test/tools/jlink/basic/src/test/jdk/test/Test.java +++ b/jdk/test/tools/jlink/basic/src/test/jdk/test/Test.java @@ -23,9 +23,6 @@ package jdk.test; -import java.lang.reflect.Module; -import java.lang.reflect.Layer; - public class Test { public static void main(String[] args) { System.out.println(Test.class + " ..."); @@ -36,7 +33,7 @@ public class Test { ClassLoader scl = ClassLoader.getSystemClassLoader(); ClassLoader cl1 = Test.class.getClassLoader(); Module testModule = Test.class.getModule(); - ClassLoader cl2 = Layer.boot().findLoader(testModule.getName()); + ClassLoader cl2 = ModuleLayer.boot().findLoader(testModule.getName()); if (cl1 != scl) throw new RuntimeException("Not loaded by system class loader"); diff --git a/jdk/test/tools/jlink/bindservices/BindServices.java b/jdk/test/tools/jlink/bindservices/BindServices.java new file mode 100644 index 00000000000..b4ab4cc7784 --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/BindServices.java @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.File; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.spi.ToolProvider; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static jdk.testlibrary.ProcessTools.*; + +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * @test + * @bug 8174826 + * @library /lib/testlibrary + * @modules jdk.compiler jdk.jlink + * @build BindServices CompilerUtils jdk.testlibrary.ProcessTools + * @run testng BindServices + */ + +public class BindServices { + private static final String JAVA_HOME = System.getProperty("java.home"); + private static final String TEST_SRC = System.getProperty("test.src"); + + private static final Path SRC_DIR = Paths.get(TEST_SRC, "src"); + private static final Path MODS_DIR = Paths.get("mods"); + + private static final String MODULE_PATH = + Paths.get(JAVA_HOME, "jmods").toString() + + File.pathSeparator + MODS_DIR.toString(); + + // the names of the modules in this test + private static String[] modules = new String[] {"m1", "m2", "m3"}; + + + private static boolean hasJmods() { + if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) { + System.err.println("Test skipped. NO jmods directory"); + return false; + } + return true; + } + + /* + * Compiles all modules used by the test + */ + @BeforeTest + public void compileAll() throws Throwable { + if (!hasJmods()) return; + + for (String mn : modules) { + Path msrc = SRC_DIR.resolve(mn); + assertTrue(CompilerUtils.compile(msrc, MODS_DIR, + "--module-source-path", SRC_DIR.toString())); + } + } + + @Test + public void noServiceBinding() throws Throwable { + if (!hasJmods()) return; + + Path dir = Paths.get("noServiceBinding"); + + // no service binding and does not link m2,m3 providers. + JLink.run("--output", dir.toString(), + "--module-path", MODULE_PATH, + "--add-modules", "m1").output(); + + testImage(dir, "m1"); + } + + @Test + public void fullServiceBinding() throws Throwable { + if (!hasJmods()) return; + + Path dir = Paths.get("fullServiceBinding"); + + // full service binding + // m2 is a provider used by m1. During service binding, when m2 is + // resolved, m2 uses p2.T that causes m3 to be linked as it is a + // provider to p2.T + JLink.run("--output", dir.toString(), + "--module-path", MODULE_PATH, + "--add-modules", "m1", + "--bind-services", + "--limit-modules", "m1,m2,m3"); + + testImage(dir, "m1", "m2", "m3"); + } + + @Test + public void testVerbose() throws Throwable { + if (!hasJmods()) return; + + Path dir = Paths.get("verbose"); + + List output = + JLink.run("--output", dir.toString(), + "--module-path", MODULE_PATH, + "--add-modules", "m1", + "--bind-services", + "--verbose", + "--limit-modules", "m1,m2,m3").output(); + + List expected = List.of( + "m1 " + MODS_DIR.resolve("m1").toUri().toString(), + "m2 " + MODS_DIR.resolve("m2").toUri().toString(), + "m3 " + MODS_DIR.resolve("m3").toUri().toString(), + "java.base provides java.nio.file.spi.FileSystemProvider used by java.base", + "m1 provides p1.S used by m1", + "m2 provides p1.S used by m1", + "m2 provides p2.T used by m2", + "m3 provides p2.T used by m2", + "m3 provides p3.S not used by any observable module" + ); + + assertTrue(output.containsAll(expected)); + + testImage(dir, "m1", "m2", "m3"); + } + + @Test + public void testVerboseAndNoBindServices() throws Throwable { + if (!hasJmods()) return; + + Path dir = Paths.get("verboseNoBind"); + + List output = + JLink.run("--output", dir.toString(), + "--module-path", MODULE_PATH, + "--verbose", + "--add-modules", "m1").output(); + + assertTrue(output.contains("m1 provides p1.S used by m1")); + + testImage(dir, "m1"); + } + + /* + * Tests the given ${java.home} to only contain the specified modules + */ + private void testImage(Path javaHome, String... modules) throws Throwable { + Path java = javaHome.resolve("bin").resolve("java"); + String[] cmd = Stream.concat( + Stream.of(java.toString(), "-m", "m1/p1.Main"), + Stream.of(modules)).toArray(String[]::new); + + assertTrue(executeProcess(cmd).outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + } + + static class JLink { + static final ToolProvider JLINK_TOOL = ToolProvider.findFirst("jlink") + .orElseThrow(() -> + new RuntimeException("jlink tool not found") + ); + + static JLink run(String... options) { + JLink jlink = new JLink(); + assertTrue(jlink.execute(options) == 0); + return jlink; + } + + final List output = new ArrayList<>(); + private int execute(String... options) { + System.out.println("jlink " + + Stream.of(options).collect(Collectors.joining(" "))); + + StringWriter writer = new StringWriter(); + PrintWriter pw = new PrintWriter(writer); + int rc = JLINK_TOOL.run(pw, pw, options); + System.out.println(writer.toString()); + Stream.of(writer.toString().split("\\v")) + .map(String::trim) + .forEach(output::add); + return rc; + } + + boolean contains(String s) { + return output.contains(s); + } + + List output() { + return output; + } + } +} diff --git a/jdk/test/tools/jlink/bindservices/SuggestProviders.java b/jdk/test/tools/jlink/bindservices/SuggestProviders.java new file mode 100644 index 00000000000..d7e5b6c4ef6 --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/SuggestProviders.java @@ -0,0 +1,321 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.File; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.spi.ToolProvider; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * @test + * @bug 8174826 + * @library /lib/testlibrary + * @modules jdk.charsets jdk.compiler jdk.jlink + * @build SuggestProviders CompilerUtils + * @run testng SuggestProviders + */ + +public class SuggestProviders { + private static final String JAVA_HOME = System.getProperty("java.home"); + private static final String TEST_SRC = System.getProperty("test.src"); + + private static final Path SRC_DIR = Paths.get(TEST_SRC, "src"); + private static final Path MODS_DIR = Paths.get("mods"); + + private static final String MODULE_PATH = + Paths.get(JAVA_HOME, "jmods").toString() + + File.pathSeparator + MODS_DIR.toString(); + + // the names of the modules in this test + private static String[] modules = new String[] {"m1", "m2", "m3"}; + + + private static boolean hasJmods() { + if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) { + System.err.println("Test skipped. NO jmods directory"); + return false; + } + return true; + } + + /* + * Compiles all modules used by the test + */ + @BeforeTest + public void compileAll() throws Throwable { + if (!hasJmods()) return; + + for (String mn : modules) { + Path msrc = SRC_DIR.resolve(mn); + assertTrue(CompilerUtils.compile(msrc, MODS_DIR, + "--module-source-path", SRC_DIR.toString())); + } + } + + // check a subset of services used by java.base + private final List JAVA_BASE_USES = List.of( + "uses java.lang.System$LoggerFinder", + "uses java.net.ContentHandlerFactory", + "uses java.net.spi.URLStreamHandlerProvider", + "uses java.nio.channels.spi.AsynchronousChannelProvider", + "uses java.nio.channels.spi.SelectorProvider", + "uses java.nio.charset.spi.CharsetProvider", + "uses java.nio.file.spi.FileSystemProvider", + "uses java.nio.file.spi.FileTypeDetector", + "uses java.security.Provider", + "uses java.util.spi.ToolProvider" + ); + + private final List JAVA_BASE_PROVIDERS = List.of( + "java.base provides java.nio.file.spi.FileSystemProvider used by java.base" + ); + + private final List SYSTEM_PROVIDERS = List.of( + "jdk.charsets provides java.nio.charset.spi.CharsetProvider used by java.base", + "jdk.compiler provides java.util.spi.ToolProvider used by java.base", + "jdk.compiler provides javax.tools.JavaCompiler used by java.compiler", + "jdk.jlink provides jdk.tools.jlink.plugin.Plugin used by jdk.jlink", + "jdk.jlink provides java.util.spi.ToolProvider used by java.base" + ); + + private final List APP_USES = List.of( + "uses p1.S", + "uses p2.T" + ); + + private final List APP_PROVIDERS = List.of( + "m1 provides p1.S used by m1", + "m2 provides p1.S used by m1", + "m2 provides p2.T used by m2", + "m3 provides p2.T used by m2", + "m3 provides p3.S not used by any observable module" + ); + + @Test + public void suggestProviders() throws Throwable { + if (!hasJmods()) return; + + List output = JLink.run("--module-path", MODULE_PATH, + "--suggest-providers").output(); + + Stream uses = + Stream.concat(JAVA_BASE_USES.stream(), APP_USES.stream()); + Stream providers = + Stream.concat(SYSTEM_PROVIDERS.stream(), APP_PROVIDERS.stream()); + + assertTrue(output.containsAll(Stream.concat(uses, providers) + .collect(Collectors.toList()))); + } + + /** + * find providers from the observable modules and --add-modules has no + * effect on the suggested providers + */ + @Test + public void observableModules() throws Throwable { + if (!hasJmods()) return; + + List output = JLink.run("--module-path", MODULE_PATH, + "--add-modules", "m1", + "--suggest-providers").output(); + + Stream uses = + Stream.concat(JAVA_BASE_USES.stream(), Stream.of("uses p1.S")); + Stream providers = + Stream.concat(SYSTEM_PROVIDERS.stream(), APP_PROVIDERS.stream()); + + assertTrue(output.containsAll(Stream.concat(uses, providers) + .collect(Collectors.toList()))); + } + + /** + * find providers from the observable modules with --limit-modules + */ + @Test + public void limitModules() throws Throwable { + if (!hasJmods()) return; + + List output = JLink.run("--module-path", MODULE_PATH, + "--limit-modules", "m1", + "--suggest-providers").output(); + + Stream uses = + Stream.concat(JAVA_BASE_USES.stream(), Stream.of("uses p1.S")); + Stream providers = + Stream.concat(JAVA_BASE_PROVIDERS.stream(), + Stream.of("m1 provides p1.S used by m1") + ); + + assertTrue(output.containsAll(Stream.concat(uses, providers) + .collect(Collectors.toList()))); + } + + @Test + public void providersForServices() throws Throwable { + if (!hasJmods()) return; + + List output = + JLink.run("--module-path", MODULE_PATH, + "--suggest-providers", + "java.nio.charset.spi.CharsetProvider,p1.S").output(); + + System.out.println(output); + Stream expected = Stream.concat( + Stream.of("jdk.charsets provides java.nio.charset.spi.CharsetProvider used by java.base"), + Stream.of("m1 provides p1.S used by m1", + "m2 provides p1.S used by m1") + ); + + assertTrue(output.containsAll(expected.collect(Collectors.toList()))); + } + + @Test + public void unusedService() throws Throwable { + if (!hasJmods()) return; + + List output = + JLink.run("--module-path", MODULE_PATH, + "--suggest-providers", + "p3.S").output(); + + List expected = List.of( + "m3 provides p3.S not used by any observable module" + ); + assertTrue(output.containsAll(expected)); + + // should not print other services m3 provides + assertFalse(output.contains("m3 provides p2.T used by m2")); + } + + @Test + public void nonExistentService() throws Throwable { + if (!hasJmods()) return; + + List output = + JLink.run("--module-path", MODULE_PATH, + "--suggest-providers", + "nonExistentType").output(); + + List expected = List.of( + "No provider found for service specified to --suggest-providers: nonExistentType" + ); + assertTrue(output.containsAll(expected)); + } + + @Test + public void noSuggestProviders() throws Throwable { + if (!hasJmods()) return; + + List output = + JLink.run("--module-path", MODULE_PATH, + "--bind-services", + "--suggest-providers").output(); + + String expected = "--bind-services option is specified. No additional providers suggested."; + assertTrue(output.contains(expected)); + + } + + @Test + public void suggestTypeNotRealProvider() throws Throwable { + if (!hasJmods()) return; + + List output = + JLink.run("--module-path", MODULE_PATH, + "--add-modules", "m1", + "--suggest-providers", + "java.util.List").output(); + + System.out.println(output); + List expected = List.of( + "No provider found for service specified to --suggest-providers: java.util.List" + ); + + assertTrue(output.containsAll(expected)); + } + + @Test + public void addNonObservableModule() throws Throwable { + if (!hasJmods()) return; + + List output = + JLink.run("--module-path", MODULE_PATH, + "--add-modules", "nonExistentModule", + "--suggest-providers", + "java.nio.charset.spi.CharsetProvider").output(); + + System.out.println(output); + List expected = List.of( + "jdk.charsets provides java.nio.charset.spi.CharsetProvider used by java.base" + ); + + assertTrue(output.containsAll(expected)); + } + + static class JLink { + static final ToolProvider JLINK_TOOL = ToolProvider.findFirst("jlink") + .orElseThrow(() -> + new RuntimeException("jlink tool not found") + ); + + static JLink run(String... options) { + JLink jlink = new JLink(); + assertTrue(jlink.execute(options) == 0); + return jlink; + } + + final List output = new ArrayList<>(); + private int execute(String... options) { + System.out.println("jlink " + + Stream.of(options).collect(Collectors.joining(" "))); + + StringWriter writer = new StringWriter(); + PrintWriter pw = new PrintWriter(writer); + int rc = JLINK_TOOL.run(pw, pw, options); + System.out.println(writer.toString()); + Stream.of(writer.toString().split("\\v")) + .map(String::trim) + .forEach(output::add); + return rc; + } + + boolean contains(String s) { + return output.contains(s); + } + + List output() { + return output; + } + } +} diff --git a/jdk/test/tools/jlink/bindservices/src/m1/module-info.java b/jdk/test/tools/jlink/bindservices/src/m1/module-info.java new file mode 100644 index 00000000000..59ebbe89663 --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/src/m1/module-info.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m1 { + exports p1; + uses p1.S; + provides p1.S with p1.Impl; +} diff --git a/jdk/test/tools/jlink/bindservices/src/m1/p1/Impl.java b/jdk/test/tools/jlink/bindservices/src/m1/p1/Impl.java new file mode 100644 index 00000000000..b03f4e521e4 --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/src/m1/p1/Impl.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p1; + +public class Impl implements S { + public String name() { + return this.getClass().getName(); + } +} diff --git a/jdk/test/tools/jlink/bindservices/src/m1/p1/Main.java b/jdk/test/tools/jlink/bindservices/src/m1/p1/Main.java new file mode 100644 index 00000000000..d3a07ed6601 --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/src/m1/p1/Main.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p1; + +import java.lang.module.ModuleFinder; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * This tests if JAVA_HOME is linked only with the specified modules. + */ +public class Main { + public static void main(String... args) { + Set modules = ModuleFinder.ofSystem().findAll().stream() + .map(mref -> mref.descriptor().name()) + .filter(mn -> !mn.equals("java.base")) + .collect(Collectors.toSet()); + + Set notLinked = Stream.of(args).filter(mn -> !modules.contains(mn)) + .collect(Collectors.toSet()); + if (!notLinked.isEmpty()) { + throw new RuntimeException("Expected modules not linked in the image: " + + notLinked); + } + Stream.of(args).forEach(modules::remove); + + if (!modules.isEmpty()) { + throw new RuntimeException("Unexpected modules linked in the image: " + + modules); + } + } +} diff --git a/jdk/test/tools/launcher/modules/listmods/src/java.transaction/javax/transaction/atomic/Atomic.java b/jdk/test/tools/jlink/bindservices/src/m1/p1/S.java similarity index 88% rename from jdk/test/tools/launcher/modules/listmods/src/java.transaction/javax/transaction/atomic/Atomic.java rename to jdk/test/tools/jlink/bindservices/src/m1/p1/S.java index f4974e39065..5b43138d068 100644 --- a/jdk/test/tools/launcher/modules/listmods/src/java.transaction/javax/transaction/atomic/Atomic.java +++ b/jdk/test/tools/jlink/bindservices/src/m1/p1/S.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,8 +21,8 @@ * questions. */ -package javax.transaction.atomic; - -public interface Atomic { +package p1; +public interface S { + String name(); } diff --git a/jdk/test/tools/jlink/bindservices/src/m2/module-info.java b/jdk/test/tools/jlink/bindservices/src/m2/module-info.java new file mode 100644 index 00000000000..c32e334d229 --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/src/m2/module-info.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m2 { + requires m1; + exports p2; + uses p2.T; + provides p1.S with p2.Impl; + provides p2.T with p2.Impl; +} diff --git a/jdk/test/tools/jlink/bindservices/src/m2/p2/Impl.java b/jdk/test/tools/jlink/bindservices/src/m2/p2/Impl.java new file mode 100644 index 00000000000..d790e9ee467 --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/src/m2/p2/Impl.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p2; + +public class Impl implements p1.S, T { + public String name() { + return this.getClass().getName(); + } + + public void run() { + } +} diff --git a/jdk/test/tools/jlink/bindservices/src/m2/p2/T.java b/jdk/test/tools/jlink/bindservices/src/m2/p2/T.java new file mode 100644 index 00000000000..dea30505b32 --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/src/m2/p2/T.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p2; + +public interface T { + void run(); +} diff --git a/jdk/test/tools/jlink/bindservices/src/m3/module-info.java b/jdk/test/tools/jlink/bindservices/src/m3/module-info.java new file mode 100644 index 00000000000..126f4c8a8ab --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/src/m3/module-info.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m3 { + requires m2; + provides p2.T with p3.Impl; + provides p3.S with p3.MyProvider; +} diff --git a/jdk/test/tools/jlink/bindservices/src/m3/p3/Impl.java b/jdk/test/tools/jlink/bindservices/src/m3/p3/Impl.java new file mode 100644 index 00000000000..4d328cdd71c --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/src/m3/p3/Impl.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p3; + +public class Impl implements p2.T { + public void run() { + } +} diff --git a/jdk/test/tools/jlink/bindservices/src/m3/p3/MyProvider.java b/jdk/test/tools/jlink/bindservices/src/m3/p3/MyProvider.java new file mode 100644 index 00000000000..e0f7f8ec9c0 --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/src/m3/p3/MyProvider.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p3; + +public class MyProvider implements S { + public void run() { + } +} diff --git a/jdk/test/tools/jlink/bindservices/src/m3/p3/S.java b/jdk/test/tools/jlink/bindservices/src/m3/p3/S.java new file mode 100644 index 00000000000..a521b32f57c --- /dev/null +++ b/jdk/test/tools/jlink/bindservices/src/m3/p3/S.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p3; + +public interface S { + void run(); +} diff --git a/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java b/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java index 874f5ea78c3..a61f592f55d 100644 --- a/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java +++ b/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -26,16 +26,15 @@ * @bug 8156499 * @summary Test image creation from Multi-Release JAR * @author Steve Drach - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules java.base/jdk.internal.jimage * java.base/jdk.internal.module - * @build jdk.testlibrary.FileUtils jdk.test.lib.process.* + * @build jdk.test.lib.process.* * @run testng JLinkMultiReleaseJarTest */ import java.io.ByteArrayInputStream; import java.io.IOException; -import java.io.UncheckedIOException; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; @@ -54,10 +53,8 @@ import java.util.stream.Stream; import jdk.internal.jimage.BasicImageReader; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; -import jdk.testlibrary.FileUtils; import org.testng.Assert; -import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -138,23 +135,6 @@ public class JLinkMultiReleaseJarTest { Assert.assertEquals(rc, 0); } - @AfterClass - public void close() throws IOException { - Files.walk(userdir, 1) - .filter(p -> !p.equals(userdir)) - .forEach(p -> { - try { - if (Files.isDirectory(p)) { - FileUtils.deleteFileTreeWithRetry(p); - } else { - FileUtils.deleteFileIfExistsWithRetry(p); - } - } catch (IOException x) { - throw new UncheckedIOException(x); - } - }); - } - @Test public void basicTest() throws Throwable { if (ignoreTest()) return; diff --git a/jdk/test/tools/jlink/plugins/CompressorPluginTest.java b/jdk/test/tools/jlink/plugins/CompressorPluginTest.java index aea5c21424f..dbed1a726bf 100644 --- a/jdk/test/tools/jlink/plugins/CompressorPluginTest.java +++ b/jdk/test/tools/jlink/plugins/CompressorPluginTest.java @@ -93,80 +93,53 @@ public class CompressorPluginTest { new ResourceDecompressorFactory[]{ new StringSharingDecompressorFactory()}); - // compress == ZIP + String sharing - Properties options = new Properties(); - options.setProperty(ZipPlugin.NAME, ""); - checkCompress(classes, new DefaultCompressPlugin(), options, + // compress level 0 == no compression + Properties options0 = new Properties(); + options0.setProperty(DefaultCompressPlugin.NAME, + "0"); + checkCompress(classes, new DefaultCompressPlugin(), + options0, new ResourceDecompressorFactory[]{ - new ZipDecompressorFactory(), - new StringSharingDecompressorFactory() }); - // compress == ZIP + String sharing + filter - options.setProperty(DefaultCompressPlugin.FILTER, - "**Exception.class"); - checkCompress(classes, new DefaultCompressPlugin(), options, - new ResourceDecompressorFactory[]{ - new ZipDecompressorFactory(), - new StringSharingDecompressorFactory() - }, Collections.singletonList(".*Exception.class")); - - // compress level 1 == ZIP + // compress level 1 == String sharing Properties options1 = new Properties(); - options1.setProperty(DefaultCompressPlugin.NAME, - "1"); + options1.setProperty(DefaultCompressPlugin.NAME, "1"); checkCompress(classes, new DefaultCompressPlugin(), options1, new ResourceDecompressorFactory[]{ - new ZipDecompressorFactory() + new StringSharingDecompressorFactory() }); - // compress level 1 == ZIP + // compress level 1 == String sharing + filter options1.setProperty(DefaultCompressPlugin.FILTER, "**Exception.class"); + options1.setProperty(DefaultCompressPlugin.NAME, "1"); checkCompress(classes, new DefaultCompressPlugin(), options1, + new ResourceDecompressorFactory[]{ + new StringSharingDecompressorFactory() + }, Collections.singletonList(".*Exception.class")); + + // compress level 2 == ZIP + Properties options2 = new Properties(); + options2.setProperty(DefaultCompressPlugin.FILTER, + "**Exception.class"); + options2.setProperty(DefaultCompressPlugin.NAME, "2"); + checkCompress(classes, new DefaultCompressPlugin(), + options2, new ResourceDecompressorFactory[]{ new ZipDecompressorFactory() }, Collections.singletonList(".*Exception.class")); - // compress level 2 == ZIP + String sharing - Properties options2 = new Properties(); - options2.setProperty(DefaultCompressPlugin.NAME, - "2"); - checkCompress(classes, new DefaultCompressPlugin(), - options2, - new ResourceDecompressorFactory[]{ - new ZipDecompressorFactory(), - new StringSharingDecompressorFactory() - }); - - // compress level 2 == ZIP + String sharing + filter + // compress level 2 == ZIP + filter options2.setProperty(DefaultCompressPlugin.FILTER, "**Exception.class"); + options2.setProperty(DefaultCompressPlugin.NAME, "2"); checkCompress(classes, new DefaultCompressPlugin(), options2, new ResourceDecompressorFactory[]{ new ZipDecompressorFactory(), - new StringSharingDecompressorFactory() - }, Collections.singletonList(".*Exception.class")); - - // compress level 0 == String sharing - Properties options0 = new Properties(); - options0.setProperty(DefaultCompressPlugin.NAME, "0"); - checkCompress(classes, new DefaultCompressPlugin(), - options0, - new ResourceDecompressorFactory[]{ - new StringSharingDecompressorFactory() - }); - - // compress level 0 == String sharing + filter - options0.setProperty(DefaultCompressPlugin.FILTER, - "**Exception.class"); - checkCompress(classes, new DefaultCompressPlugin(), - options0, - new ResourceDecompressorFactory[]{ - new StringSharingDecompressorFactory() }, Collections.singletonList(".*Exception.class")); } @@ -234,6 +207,11 @@ public class CompressorPluginTest { Properties config, ResourceDecompressorFactory[] factories, List includes) throws Exception { + if (factories.length == 0) { + // no compression, nothing to check! + return; + } + long[] original = new long[1]; long[] compressed = new long[1]; resources.entries().forEach(resource -> { diff --git a/jdk/test/tools/jlink/plugins/ExcludeVMPluginTest.java b/jdk/test/tools/jlink/plugins/ExcludeVMPluginTest.java index f581e9bad90..ee4bfabe4b7 100644 --- a/jdk/test/tools/jlink/plugins/ExcludeVMPluginTest.java +++ b/jdk/test/tools/jlink/plugins/ExcludeVMPluginTest.java @@ -155,10 +155,10 @@ public class ExcludeVMPluginTest { String[] winput = new String[input.length]; String[] woutput = new String[expectedOutput.length]; for (int i = 0; i < input.length; i++) { - winput[i] = "/java.base/native" + arch + input[i]; + winput[i] = "/java.base/lib" + arch + input[i]; } for (int i = 0; i < expectedOutput.length; i++) { - woutput[i] = "/java.base/native" + arch + expectedOutput[i]; + woutput[i] = "/java.base/lib" + arch + expectedOutput[i]; } doCheckVM(vm, winput, jvmcfg, woutput, expectdJvmCfg); } @@ -169,7 +169,7 @@ public class ExcludeVMPluginTest { byte[] jvmcfgContent = jvmcfg.getBytes(); ResourcePoolManager poolMgr = new ResourcePoolManager(); poolMgr.add( - ResourcePoolEntry.create("/java.base/native/jvm.cfg", + ResourcePoolEntry.create("/java.base/lib/jvm.cfg", ResourcePoolEntry.Type.NATIVE_LIB, jvmcfgContent)); // java.base/module-info.class is used by exclude vm plugin @@ -192,7 +192,7 @@ public class ExcludeVMPluginTest { p.configure(config); ResourcePool out = p.transform(poolMgr.resourcePool(), outMgr.resourcePoolBuilder()); - String newContent = new String(out.findEntry("/java.base/native/jvm.cfg").get().contentBytes()); + String newContent = new String(out.findEntry("/java.base/lib/jvm.cfg").get().contentBytes()); if (!expectdJvmCfg.equals(newContent)) { throw new Exception("Got content " + newContent + " expected " + expectdJvmCfg); @@ -209,7 +209,7 @@ public class ExcludeVMPluginTest { } out.entries().forEach(md -> { - if (md.path().equals("/java.base/native/jvm.cfg") || + if (md.path().equals("/java.base/lib/jvm.cfg") || md.path().equals("/java.base/module-info.class")) { return; } diff --git a/jdk/test/tools/jlink/plugins/PluginsNegativeTest.java b/jdk/test/tools/jlink/plugins/PluginsNegativeTest.java index 6119fe41d92..17ae87e13bf 100644 --- a/jdk/test/tools/jlink/plugins/PluginsNegativeTest.java +++ b/jdk/test/tools/jlink/plugins/PluginsNegativeTest.java @@ -30,7 +30,6 @@ * jdk.jlink/jdk.tools.jlink.plugin * @run main/othervm PluginsNegativeTest */ -import java.lang.reflect.Layer; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -63,7 +62,7 @@ public class PluginsNegativeTest { private void testDuplicateBuiltInProviders() { List javaPlugins = new ArrayList<>(); - javaPlugins.addAll(PluginRepository.getPlugins(Layer.boot())); + javaPlugins.addAll(PluginRepository.getPlugins(ModuleLayer.boot())); for (Plugin javaPlugin : javaPlugins) { System.out.println("Registered plugin: " + javaPlugin.getName()); } @@ -72,7 +71,7 @@ public class PluginsNegativeTest { try { PluginRepository.registerPlugin(new CustomPlugin(pluginName)); try { - PluginRepository.getPlugin(pluginName, Layer.boot()); + PluginRepository.getPlugin(pluginName, ModuleLayer.boot()); throw new AssertionError("Exception is not thrown for duplicate plugin: " + pluginName); } catch (Exception ignored) { } @@ -83,7 +82,7 @@ public class PluginsNegativeTest { } private void testUnknownProvider() { - if (PluginRepository.getPlugin("unknown", Layer.boot()) != null) { + if (PluginRepository.getPlugin("unknown", ModuleLayer.boot()) != null) { throw new AssertionError("Exception expected for unknown plugin name"); } } diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java index fb7f5569e06..36f82a9ddc4 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java @@ -81,9 +81,13 @@ public class CompiledVersionTest { Path msrc = SRC_DIR.resolve(mn); if (version.equals("0")) { assertTrue(CompilerUtils.compile(msrc, MODS_DIR, + "--add-exports", "java.base/jdk.internal.module=m1", + "--add-exports", "java.base/jdk.internal.org.objectweb.asm=m1", "--module-source-path", SRC_DIR.toString())); } else { assertTrue(CompilerUtils.compile(msrc, MODS_DIR, + "--add-exports", "java.base/jdk.internal.module=m1", + "--add-exports", "java.base/jdk.internal.org.objectweb.asm=m1", "--module-source-path", SRC_DIR.toString(), "--module-version", version)); } diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java index ce25cd762bc..6629524f45c 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java @@ -25,6 +25,8 @@ import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleDescriptor.*; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; +import java.io.IOException; +import java.io.UncheckedIOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -40,7 +42,11 @@ import static org.testng.Assert.*; /** * @test * @bug 8142968 8173381 + * @library /lib/testlibrary * @modules java.base/jdk.internal.misc + * @modules java.base/jdk.internal.module + * @modules java.base/jdk.internal.org.objectweb.asm + * @build ModuleTargetHelper * @run testng SystemModulesTest * @summary Verify the properties of ModuleDescriptor created * by SystemModules @@ -62,23 +68,26 @@ public class SystemModulesTest { return; ModuleFinder.ofSystem().findAll().stream() - .map(ModuleReference::descriptor) .forEach(this::checkAttributes); } - // JMOD files are created with osName and osArch that may be different - // than os.name and os.arch system property + // JMOD files are created with OS name and arch matching the bundle name private boolean checkOSName(String name) { - if (name.equals(OS_NAME)) - return true; + if (OS_NAME.startsWith("Windows")) { + return name.equals("windows"); + } - if (OS_NAME.equals("Mac OS X")) { - return name.equals("Darwin"); - } else if (OS_NAME.startsWith("Windows")) { - return name.startsWith("Windows"); - } else { - System.err.println("ERROR: " + name + " but expected: " + OS_NAME); - return false; + switch (OS_NAME) { + case "Linux": + return name.equals("linux"); + case "SunOS": + return name.equals("solaris"); + case "Mac OS X": + return name.equals("macos"); + default: + // skip validation on unknown platform + System.out.println("Skip checking OS name in ModuleTarget: " + name); + return true; } } @@ -89,28 +98,31 @@ public class SystemModulesTest { switch (OS_ARCH) { case "i386": case "x86": - return name.equals("i586"); + return name.equals("x86"); + case "amd64": + case "x86_64": + return name.equals("amd64"); default: - System.err.println("ERROR: " + name + " but expected: " + OS_ARCH); - return false; + // skip validation on unknown platform + System.out.println("Skip checking OS arch in ModuleTarget: " + name); + return true; } } - private void checkAttributes(ModuleDescriptor md) { - System.out.format("%s %s %s %s%n", md.name(), - md.osName(), md.osArch(), md.osVersion()); - - if (md.name().equals("java.base")) { - assertTrue(checkOSName(md.osName().get())); - assertTrue(checkOSArch(md.osArch().get())); - assertTrue(md.osVersion().isPresent()); - } else { - // target platform attribute is dropped by jlink plugin - assertFalse(md.osName().isPresent()); - assertFalse(md.osArch().isPresent()); - assertFalse(md.osVersion().isPresent()); - assertTrue(md.packages().size() > 0 - || EMPTY_MODULES.contains(md.name()), md.name()); + private void checkAttributes(ModuleReference modRef) { + try { + if (modRef.descriptor().name().equals("java.base")) { + ModuleTargetHelper.ModuleTarget mt = ModuleTargetHelper.read(modRef); + String[] values = mt.targetPlatform().split("-"); + assertTrue(checkOSName(values[0])); + assertTrue(checkOSArch(values[1])); + } else { + // target platform attribute is dropped by jlink plugin for other modules + ModuleTargetHelper.ModuleTarget mt = ModuleTargetHelper.read(modRef); + assertTrue(mt == null || mt.targetPlatform() == null); + } + } catch (IOException exp) { + throw new UncheckedIOException(exp); } } diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java index 3c58d2a3e6d..c8a221840b1 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -24,7 +24,6 @@ import java.io.File; import java.io.IOException; import java.lang.module.ModuleDescriptor; -import java.lang.reflect.Layer; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -38,17 +37,18 @@ import jdk.testlibrary.FileUtils; import static jdk.testlibrary.ProcessTools.*; - import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import static org.testng.Assert.*; /** * @test - * @bug 8142968 8173381 + * @bug 8142968 8173381 8174740 * @library /lib/testlibrary * @modules jdk.compiler jdk.jlink - * @build UserModuleTest CompilerUtils jdk.testlibrary.FileUtils jdk.testlibrary.ProcessTools + * @modules java.base/jdk.internal.module + * @modules java.base/jdk.internal.org.objectweb.asm + * @build ModuleTargetHelper UserModuleTest CompilerUtils jdk.testlibrary.FileUtils jdk.testlibrary.ProcessTools * @run testng UserModuleTest */ @@ -64,7 +64,7 @@ public class UserModuleTest { private static final String MAIN_MID = "m1/p1.Main"; // the names of the modules in this test - private static String[] modules = new String[] {"m1", "m2", "m3", "m4"}; + private static String[] modules = new String[] {"m1", "m2", "m3", "m4", "m5"}; private static boolean hasJmods() { @@ -85,7 +85,9 @@ public class UserModuleTest { for (String mn : modules) { Path msrc = SRC_DIR.resolve(mn); assertTrue(CompilerUtils.compile(msrc, MODS_DIR, - "--module-source-path", SRC_DIR.toString())); + "--module-source-path", SRC_DIR.toString(), + "--add-exports", "java.base/jdk.internal.module=" + mn, + "--add-exports", "java.base/jdk.internal.org.objectweb.asm=" + mn)); } if (Files.exists(IMAGE)) { @@ -106,7 +108,10 @@ public class UserModuleTest { if (!hasJmods()) return; Path java = IMAGE.resolve("bin").resolve("java"); - assertTrue(executeProcess(java.toString(), "-m", MAIN_MID) + assertTrue(executeProcess(java.toString(), + "--add-exports", "java.base/jdk.internal.module=m1,m4", + "--add-exports", "java.base/jdk.internal.org.objectweb.asm=m1,m4", + "-m", MAIN_MID) .outputTo(System.out) .errorTo(System.out) .getExitValue() == 0); @@ -136,6 +141,8 @@ public class UserModuleTest { Path java = IMAGE.resolve("bin").resolve("java"); assertTrue(executeProcess(java.toString(), + "--add-exports", "java.base/jdk.internal.module=m1,m4", + "--add-exports", "java.base/jdk.internal.org.objectweb.asm=m1,m4", "-Djdk.system.module.finder.disabledFastPath", "-m", MAIN_MID) .outputTo(System.out) @@ -154,26 +161,75 @@ public class UserModuleTest { Path dir = Paths.get("dedupSetTest"); createImage(dir, "m1", "m2", "m3", "m4"); Path java = dir.resolve("bin").resolve("java"); - assertTrue(executeProcess(java.toString(), "-m", MAIN_MID) + assertTrue(executeProcess(java.toString(), + "--add-exports", "java.base/jdk.internal.module=m1,m4", + "--add-exports", "java.base/jdk.internal.org.objectweb.asm=m1,m4", + "-m", MAIN_MID) + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + } + + @Test + public void testRequiresStatic() throws Throwable { + if (!hasJmods()) return; + + Path dir = Paths.get("requiresStatic"); + createImage(dir, "m5"); + Path java = dir.resolve("bin").resolve("java"); + assertTrue(executeProcess(java.toString(), "-m", "m5/p5.Main") + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + + // run with m3 present + assertTrue(executeProcess(java.toString(), + "--module-path", MODS_DIR.toString(), + "--add-modules", "m3", + "-m", "m5/p5.Main") + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + } + + @Test + public void testRequiresStatic2() throws Throwable { + if (!hasJmods()) return; + + Path dir = Paths.get("requiresStatic2"); + createImage(dir, "m3", "m5"); + + Path java = dir.resolve("bin").resolve("java"); + assertTrue(executeProcess(java.toString(), "-m", "m5/p5.Main") + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + + // boot layer with m3 and m5 + assertTrue(executeProcess(java.toString(), + "--add-modules", "m3", + "-m", "m5/p5.Main") .outputTo(System.out) .errorTo(System.out) .getExitValue() == 0); } private void createJmods(String... modules) throws IOException { - // use the same target platform as in java.base - ModuleDescriptor md = Layer.boot().findModule("java.base").get() - .getDescriptor(); - String osName = md.osName().get(); - String osArch = md.osArch().get(); + ModuleTargetHelper.ModuleTarget mt = ModuleTargetHelper.getJavaBaseTarget(); + if (mt == null) { + throw new RuntimeException("ModuleTarget is missing for java.base"); + } + + String[] values = mt.targetPlatform().split("-"); + String osName = values[0]; + String osArch = values[1]; // create JMOD files Files.createDirectories(JMODS_DIR); Stream.of(modules).forEach(mn -> assertTrue(jmod("create", "--class-path", MODS_DIR.resolve(mn).toString(), - "--os-name", osName, - "--os-arch", osArch, + "--target-platform", mt.targetPlatform(), "--main-class", mn.replace('m', 'p') + ".Main", JMODS_DIR.resolve(mn + ".jmod").toString()) == 0) ); @@ -202,6 +258,8 @@ public class UserModuleTest { // verify ModuleDescriptor Path java = dir.resolve("bin").resolve("java"); assertTrue(executeProcess(java.toString(), + "--add-exports", "java.base/jdk.internal.module=m1,m4", + "--add-exports", "java.base/jdk.internal.org.objectweb.asm=m1,m4", "--add-modules=m1", "-m", "m4") .outputTo(System.out) .errorTo(System.out) @@ -231,6 +289,8 @@ public class UserModuleTest { // verify ModuleDescriptor Path java = dir.resolve("bin").resolve("java"); assertTrue(executeProcess(java.toString(), + "--add-exports", "java.base/jdk.internal.module=m1,m4", + "--add-exports", "java.base/jdk.internal.org.objectweb.asm=m1,m4", "--add-modules=m1", "-m", "m4", "retainModuleTarget") .outputTo(System.out) .errorTo(System.out) diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/module-info.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/module-info.java index f6ecf6b2bf5..870680b482c 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/module-info.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -21,5 +21,9 @@ * questions. */ +/* + * m1 has an exported package and also internal package + */ module m1 { + exports p1; } diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/p1/Main.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/p1/Main.java index 4b4bf359304..59a059bca2e 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/p1/Main.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/p1/Main.java @@ -23,10 +23,9 @@ package p1; +import java.io.InputStream; import java.io.IOException; import java.lang.module.ModuleDescriptor; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.net.URI; import java.nio.file.FileSystem; import java.nio.file.FileSystems; @@ -35,7 +34,37 @@ import java.nio.file.Path; import java.util.Collections; import java.util.Set; +import jdk.internal.module.ClassFileAttributes; +import jdk.internal.module.ClassFileAttributes.ModuleTargetAttribute; +import jdk.internal.module.ClassFileConstants; +import jdk.internal.org.objectweb.asm.Attribute; +import jdk.internal.org.objectweb.asm.ClassReader; +import jdk.internal.org.objectweb.asm.ClassVisitor; +import jdk.internal.org.objectweb.asm.Opcodes; + public class Main { + private static boolean hasModuleTarget(InputStream in) throws IOException { + ModuleTargetAttribute[] modTargets = new ModuleTargetAttribute[1]; + ClassVisitor cv = new ClassVisitor(Opcodes.ASM5) { + @Override + public void visitAttribute(Attribute attr) { + if (attr instanceof ModuleTargetAttribute) { + modTargets[0] = (ModuleTargetAttribute)attr; + } + } + }; + + // prototype of attributes that should be parsed + Attribute[] attrs = new Attribute[] { + new ModuleTargetAttribute() + }; + + // parse module-info.class + ClassReader cr = new ClassReader(in); + cr.accept(cv, attrs, 0); + return modTargets[0] != null && modTargets[0].targetPlatform() != null; + } + public static void main(String... args) throws Exception { // load another package p2.T.test(); @@ -44,12 +73,13 @@ public class Main { validate(Main.class.getModule()); // validate the Moduletarget attribute for java.base - ModuleDescriptor md = Layer.boot().findModule("java.base").get() - .getDescriptor(); - if (!md.osName().isPresent() || !md.osArch().isPresent() || - !md.osVersion().isPresent()) { - throw new RuntimeException("java.base: " + md.osName() + " " + - md.osArch() + " " + md.osVersion()); + FileSystem fs = FileSystems.newFileSystem(URI.create("jrt:/"), + Collections.emptyMap()); + Path path = fs.getPath("/", "modules", "java.base", "module-info.class"); + try (InputStream in = Files.newInputStream(path)) { + if (! hasModuleTarget(in)) { + throw new RuntimeException("Missing ModuleTarget for java.base"); + } } } @@ -67,9 +97,9 @@ public class Main { checkPackages(md.packages(), "p1", "p2"); checkPackages(md1.packages(), "p1", "p2"); - // check ModuleTarget attribute - checkModuleTargetAttribute(md); - checkModuleTargetAttribute(md1); + try (InputStream in = Files.newInputStream(path)) { + checkModuleTargetAttribute(in, "p1"); + } } static void checkPackages(Set pkgs, String... expected) { @@ -78,10 +108,9 @@ public class Main { } } - static void checkModuleTargetAttribute(ModuleDescriptor md) { - if (md.osName().isPresent() || md.osArch().isPresent() || - md.osVersion().isPresent()) { - throw new RuntimeException(md.osName() + " " + md.osArch() + " " + md.osVersion()); + static void checkModuleTargetAttribute(InputStream in, String modName) throws IOException { + if (hasModuleTarget(in)) { + throw new RuntimeException("ModuleTarget present for " + modName); } } } diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/module-info.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/module-info.java index c2e7fb62e4c..69e08bef75c 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/module-info.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/module-info.java @@ -23,4 +23,5 @@ module m3 { requires m4; + exports p3; } diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Foo.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Foo.java new file mode 100644 index 00000000000..07a7f51a86e --- /dev/null +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Foo.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p3; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Documented +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.SOURCE) +public @interface Foo { +} diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Lib.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Lib.java new file mode 100644 index 00000000000..7a8ad28d21a --- /dev/null +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Lib.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p3; + +public class Lib { + public static String concat(String x, String y) { + return x + y; + } +} diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Main.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Main.java index c7ff38e6d50..aa7563e666e 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Main.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Main.java @@ -26,7 +26,6 @@ package p3; import p4.Foo; import java.lang.module.ModuleDescriptor; import java.lang.reflect.Field; -import java.lang.reflect.Module; import static java.lang.module.ModuleDescriptor.Exports.Modifier.*; diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m4/p4/Main.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m4/p4/Main.java index d4ca677a758..bdb606fad90 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m4/p4/Main.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m4/p4/Main.java @@ -27,7 +27,6 @@ import java.io.IOException; import java.io.InputStream; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; -import java.lang.reflect.Layer; import java.net.URI; import java.nio.file.FileSystem; import java.nio.file.FileSystems; @@ -36,7 +35,46 @@ import java.nio.file.Path; import java.util.Collections; import java.util.Set; +import jdk.internal.module.ClassFileAttributes; +import jdk.internal.module.ClassFileAttributes.ModuleTargetAttribute; +import jdk.internal.module.ClassFileConstants; +import jdk.internal.org.objectweb.asm.Attribute; +import jdk.internal.org.objectweb.asm.ClassReader; +import jdk.internal.org.objectweb.asm.ClassVisitor; +import jdk.internal.org.objectweb.asm.Opcodes; + public class Main { + private static boolean hasModuleTarget(InputStream in) throws IOException { + ModuleTargetAttribute[] modTargets = new ModuleTargetAttribute[1]; + ClassVisitor cv = new ClassVisitor(Opcodes.ASM5) { + @Override + public void visitAttribute(Attribute attr) { + if (attr instanceof ModuleTargetAttribute) { + modTargets[0] = (ModuleTargetAttribute)attr; + } + } + }; + + // prototype of attributes that should be parsed + Attribute[] attrs = new Attribute[] { + new ModuleTargetAttribute() + }; + + // parse module-info.class + ClassReader cr = new ClassReader(in); + cr.accept(cv, attrs, 0); + return modTargets[0] != null && modTargets[0].targetPlatform() != null; + } + + private static boolean hasModuleTarget(String modName) throws IOException { + FileSystem fs = FileSystems.newFileSystem(URI.create("jrt:/"), + Collections.emptyMap()); + Path path = fs.getPath("/", "modules", modName, "module-info.class"); + try (InputStream in = Files.newInputStream(path)) { + return hasModuleTarget(in); + } + } + // the system module plugin by default drops ModuleTarget attribute private static boolean expectModuleTarget = false; public static void main(String... args) throws IOException { @@ -49,13 +87,8 @@ public class Main { } // java.base is packaged with osName/osArch/osVersion - ModuleDescriptor md = Layer.boot().findModule("java.base").get() - .getDescriptor(); - if (!md.osName().isPresent() || - !md.osArch().isPresent() || - !md.osVersion().isPresent()) { - throw new RuntimeException("osName/osArch/osVersion is missing: " + - md.osName() + " " + md.osArch() + " " + md.osVersion()); + if (! hasModuleTarget("java.base")) { + throw new RuntimeException("ModuleTarget absent for java.base"); } // verify module-info.class for m1 and m4 @@ -65,7 +98,7 @@ public class Main { private static void checkModule(String mn, String... packages) throws IOException { // verify ModuleDescriptor from the runtime module - ModuleDescriptor md = Layer.boot().findModule(mn).get() + ModuleDescriptor md = ModuleLayer.boot().findModule(mn).get() .getDescriptor(); checkModuleDescriptor(md, packages); @@ -82,7 +115,7 @@ public class Main { checkModuleDescriptor(ModuleDescriptor.read(Files.newInputStream(path)), packages); } - static void checkModuleDescriptor(ModuleDescriptor md, String... packages) { + static void checkModuleDescriptor(ModuleDescriptor md, String... packages) throws IOException { String mainClass = md.name().replace('m', 'p') + ".Main"; if (!md.mainClass().get().equals(mainClass)) { throw new RuntimeException(md.mainClass().toString()); @@ -90,22 +123,16 @@ public class Main { if (expectModuleTarget) { // ModuleTarget attribute is retained - if (!md.osName().isPresent() || !md.osArch().isPresent()) { - throw new RuntimeException("osName or osArch is missing: " + - md.osName() + " " + md.osArch()); + if (! hasModuleTarget(md.name())) { + throw new RuntimeException("ModuleTarget missing for " + md.name()); } } else { // by default ModuleTarget attribute is dropped - if (md.osName().isPresent() || md.osArch().isPresent()) { - throw new RuntimeException("osName and osArch should not be set: " + - md.osName() + " " + md.osArch()); + if (hasModuleTarget(md.name())) { + throw new RuntimeException("ModuleTarget present for " + md.name()); } } - if (md.osVersion().isPresent()) { - throw new RuntimeException("Expected no osVersion set: " + md.osVersion()); - } - Set pkgs = md.packages(); if (!pkgs.equals(Set.of(packages))) { throw new RuntimeException(pkgs + " expected: " + Set.of(packages)); diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/module-info.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/module-info.java new file mode 100644 index 00000000000..ce1d36933d0 --- /dev/null +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/module-info.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m5 { + requires static m3; + exports p5; +} diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/p5/Main.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/p5/Main.java new file mode 100644 index 00000000000..f0f46e68dff --- /dev/null +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/p5/Main.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p5; + +import p3.Foo; +import p3.Lib; + +/** + * This test verifies jlink support of requires static. + */ +public class Main { + public static void main(String... args) { + boolean libPresent = ModuleLayer.boot().findModule("m3").isPresent(); + if (LibHelper.libClassFound != libPresent) { + throw new RuntimeException("Expected module m3 not in the boot layer"); + } + + if (libPresent) { + // p3.Lib must be present + LibHelper.concat("x", "y"); + } + } + + static class LibHelper { + @Foo + static final boolean libClassFound; + + static { + boolean found = false; + try { + Class c = Class.forName("p3.Lib"); + found = true; + } catch (ClassNotFoundException e) { + } + libClassFound = found; + } + + public static String concat(String x, String y) { + return Lib.concat(x, y); + } + } +} diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/test/jdk/test/Main.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/test/jdk/test/Main.java index e5c6fe8e6ca..d7f36589093 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/test/jdk/test/Main.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/test/jdk/test/Main.java @@ -24,8 +24,6 @@ package jdk.test; import java.lang.module.ModuleDescriptor; -import java.lang.reflect.Layer; -import java.lang.reflect.Module; import java.net.URI; import java.nio.file.FileSystem; import java.nio.file.FileSystems; @@ -65,7 +63,7 @@ public class Main { // check the module descriptor of a system module for (int i=0; i < modules.size(); i++) { String mn = modules.get(i); - Module module = Layer.boot().findModule(mn).orElseThrow( + Module module = ModuleLayer.boot().findModule(mn).orElseThrow( () -> new RuntimeException(mn + " not found") ); diff --git a/jdk/test/tools/jmod/JmodTest.java b/jdk/test/tools/jmod/JmodTest.java index 27dc8396e74..e578b2f360e 100644 --- a/jdk/test/tools/jmod/JmodTest.java +++ b/jdk/test/tools/jmod/JmodTest.java @@ -66,7 +66,7 @@ public class JmodTest { static final String CLASSES_PREFIX = "classes/"; static final String CMDS_PREFIX = "bin/"; - static final String LIBS_PREFIX = "native/"; + static final String LIBS_PREFIX = "lib/"; static final String CONFIGS_PREFIX = "conf/"; @BeforeTest @@ -393,16 +393,17 @@ public class JmodTest { MODS_DIR.resolve("describeFoo.jmod").toString()) .assertSuccess() .resultChecker(r -> { - // Expect similar output: "foo, requires mandated java.base - // exports jdk.test.foo, contains jdk.test.foo.internal" - Pattern p = Pattern.compile("\\s+foo\\s+requires\\s+mandated\\s+java.base"); + // Expect similar output: "foo... exports jdk.test.foo ... + // ... requires java.base mandated... contains jdk.test.foo.internal" + Pattern p = Pattern.compile("foo\\s+exports\\s+jdk.test.foo"); assertTrue(p.matcher(r.output).find(), - "Expecting to find \"foo, requires java.base\"" + + "Expecting to find \"foo... exports jdk.test.foo\"" + "in output, but did not: [" + r.output + "]"); p = Pattern.compile( - "exports\\s+jdk.test.foo\\s+contains\\s+jdk.test.foo.internal"); + "requires\\s+java.base\\s+mandated\\s+contains\\s+jdk.test.foo.internal"); assertTrue(p.matcher(r.output).find(), - "Expecting to find \"exports ..., contains ...\"" + + "Expecting to find \"requires java.base mandated..., " + + "contains jdk.test.foo.internal ...\"" + "in output, but did not: [" + r.output + "]"); }); } diff --git a/jdk/test/tools/jmod/hashes/HashesTest.java b/jdk/test/tools/jmod/hashes/HashesTest.java index 3700554983f..10680927c19 100644 --- a/jdk/test/tools/jmod/hashes/HashesTest.java +++ b/jdk/test/tools/jmod/hashes/HashesTest.java @@ -312,9 +312,7 @@ public class HashesTest { assertTrue(ht.hashes("m2") == null); // should not override any JDK packaged modules - ModuleFinder finder = new ModulePath(Runtime.version(), - true, - mpath); + ModuleFinder finder = ModulePath.of(Runtime.version(), true, mpath); assertTrue(ht.hashes(finder,"jdk.compiler") == null); assertTrue(ht.hashes(finder,"jdk.attach") == null); } @@ -325,9 +323,7 @@ public class HashesTest { } private ModuleHashes hashes(String name) { - ModuleFinder finder = new ModulePath(Runtime.version(), - true, - lib); + ModuleFinder finder = ModulePath.of(Runtime.version(), true, lib); return hashes(finder, name); } diff --git a/jdk/test/tools/launcher/ArgsEnvVar.java b/jdk/test/tools/launcher/ArgsEnvVar.java index 30644e19a70..5dd63c84cb4 100644 --- a/jdk/test/tools/launcher/ArgsEnvVar.java +++ b/jdk/test/tools/launcher/ArgsEnvVar.java @@ -23,7 +23,7 @@ /** * @test - * @bug 8170832 + * @bug 8170832 8180447 * @summary Arguments passed in environment variable * @build TestHelper * @run main ArgsEnvVar @@ -40,7 +40,7 @@ public class ArgsEnvVar extends TestHelper { private static File testJar = null; private static Map env = new HashMap<>(); - private static String JAVA_OPTIONS = "JAVA_OPTIONS"; + private static String JDK_JAVA_OPTIONS = "JDK_JAVA_OPTIONS"; static void init() throws IOException { if (testJar != null) { @@ -105,7 +105,7 @@ public class ArgsEnvVar extends TestHelper { File argFile2 = createArgFile("argFile2", List.of("-Darg.file2=TWO")); File argFile3 = createArgFile("argFile3", List.of("-Darg.file3=THREE")); - env.put(JAVA_OPTIONS, "@argFile1\n-Xint\r-cp @@escaped\t@argFile2"); + env.put(JDK_JAVA_OPTIONS, "@argFile1\n-Xint\r-cp @@escaped\t@argFile2"); TestResult tr = doExec(env, javaCmd, "@argFile3", "-cp", "test.jar", "Foo", "uarg1", "@uarg2"); @@ -133,13 +133,13 @@ public class ArgsEnvVar extends TestHelper { } private TestResult testInEnv(List options) { - env.put(JAVA_OPTIONS, String.join(" ", options)); + env.put(JDK_JAVA_OPTIONS, String.join(" ", options)); return doExec(env, javaCmd, "-jar", "test.jar"); } private TestResult testInEnvAsArgFile(List options) throws IOException { File argFile = createArgFile("argFile", options); - env.put(JAVA_OPTIONS, "@argFile"); + env.put(JDK_JAVA_OPTIONS, "@argFile"); TestResult tr = doExec(env, javaCmd, "-jar", "test.jar"); argFile.delete(); return tr; @@ -187,7 +187,7 @@ public class ArgsEnvVar extends TestHelper { File argFile1 = createArgFile("arg File 1", List.of("-Xint")); File argFile2 = createArgFile("arg File 2", List.of("-Dprop='value with spaces'")); File argFile3 = createArgFile("arg File 3", List.of("-Xmx32m")); - env.put(JAVA_OPTIONS, "'@arg File 1' @\"arg File 2\" @'arg File'\" 3\""); + env.put(JDK_JAVA_OPTIONS, "'@arg File 1' @\"arg File 2\" @'arg File'\" 3\""); TestResult tr = doExec(env, javaCmd, "-jar", "test.jar"); List options = new ArrayList<>(); @@ -204,7 +204,7 @@ public class ArgsEnvVar extends TestHelper { @Test public void openQuoteShouldFail() { - env.put(JAVA_OPTIONS, "-Dprop='value missing close quote"); + env.put(JDK_JAVA_OPTIONS, "-Dprop='value missing close quote"); TestResult tr = doExec(env, javaCmd, "-version"); tr.checkNegative(); if (!tr.testStatus) { @@ -215,15 +215,30 @@ public class ArgsEnvVar extends TestHelper { @Test public void noWildcard() { - env.put(JAVA_OPTIONS, "-cp *"); + env.put(JDK_JAVA_OPTIONS, "-cp *"); TestResult tr = doExec(env, javaCmd, "-jar", "test.jar"); verifyOptions(List.of("-cp", "*", "-jar", "test.jar"), tr); - env.put(JAVA_OPTIONS, "-p ?"); + env.put(JDK_JAVA_OPTIONS, "-p ?"); tr = doExec(env, javaCmd, "-jar", "test.jar", "one", "two"); verifyOptions(List.of("-p", "?", "-jar", "test.jar", "one", "two"), tr); } + @Test + public void testTrailingSpaces() { + env.put(JDK_JAVA_OPTIONS, "--add-exports java.base/jdk.internal.misc=ALL-UNNAMED "); + TestResult tr = doExec(env, javaCmd, "-jar", "test.jar"); + verifyOptions(List.of("--add-exports", "java.base/jdk.internal.misc=ALL-UNNAMED", "-jar", "test.jar"), tr); + + env.put(JDK_JAVA_OPTIONS, "--class-path ' '"); + tr = doExec(env, javaCmd, "-jar", "test.jar"); + verifyOptions(List.of("--class-path", " ", "-jar", "test.jar"), tr); + + env.put(JDK_JAVA_OPTIONS, " --add-exports java.base/jdk.internal.misc=ALL-UNNAMED "); + tr = doExec(env, javaCmd, "-jar", "test.jar"); + verifyOptions(List.of("--add-exports", "java.base/jdk.internal.misc=ALL-UNNAMED", "-jar", "test.jar"), tr); + } + public static void main(String... args) throws Exception { init(); ArgsEnvVar a = new ArgsEnvVar(); @@ -236,4 +251,3 @@ public class ArgsEnvVar extends TestHelper { } } } - diff --git a/jdk/test/tools/launcher/I18NArgTest.java b/jdk/test/tools/launcher/I18NArgTest.java index 25f4ec113ba..fa09736da2f 100644 --- a/jdk/test/tools/launcher/I18NArgTest.java +++ b/jdk/test/tools/launcher/I18NArgTest.java @@ -95,21 +95,19 @@ public class I18NArgTest extends TestHelper { throw new RuntimeException("test fails"); } - // Test via JAVA_OPTIONS -/* + // Test via JDK_JAVA_OPTIONS Map env = new HashMap<>(); String cmd = "-Dtest.src=" + TEST_SOURCES_DIR.getAbsolutePath() + " -Dtest.classes=" + TEST_CLASSES_DIR.getAbsolutePath() + " -cp " + TEST_CLASSES_DIR.getAbsolutePath() + " I18NArgTest " + unicodeStr + " " + hexValue; - env.put("JAVA_OPTIONS", cmd); + env.put("JDK_JAVA_OPTIONS", cmd); tr = doExec(env, javaCmd); System.out.println(tr.testOutput); if (!tr.isOK()) { System.err.println(tr); throw new RuntimeException("test fails"); } -*/ } static void testCharacters(String... args) { diff --git a/jdk/test/tools/launcher/Jexec.java b/jdk/test/tools/launcher/Jexec.java new file mode 100644 index 00000000000..f2c9cfc37e8 --- /dev/null +++ b/jdk/test/tools/launcher/Jexec.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8175000 + * @summary test jexec + * @build TestHelper + * @run main Jexec + */ + +import java.io.File; +import java.io.IOException; + +public class Jexec extends TestHelper { + private final File testJar; + private final File jexecCmd; + private final String message = "Hello, do you read me ?"; + + Jexec() throws IOException { + jexecCmd = new File(JAVA_LIB, "jexec"); + if (!jexecCmd.exists() || !jexecCmd.canExecute()) { + throw new Error("jexec: does not exist or not executable"); + } + + testJar = new File("test.jar"); + StringBuilder tsrc = new StringBuilder(); + tsrc.append("public static void main(String... args) {\n"); + tsrc.append(" for (String x : args) {\n"); + tsrc.append(" System.out.println(x);\n"); + tsrc.append(" }\n"); + tsrc.append("}\n"); + createJar(testJar, tsrc.toString()); + } + + public static void main(String... args) throws Exception { + // linux is the only supported platform, give the others a pass + if (!isLinux) { + System.err.println("Warning: unsupported platform test passes vacuously"); + return; + } + // ok to run the test now + Jexec t = new Jexec(); + t.run(null); + } + + @Test + void jexec() throws Exception { + TestResult tr = doExec(jexecCmd.getAbsolutePath(), + testJar.getAbsolutePath(), message); + if (!tr.isOK()) { + System.err.println(tr); + throw new Exception("incorrect exit value"); + } + if (!tr.contains(message)) { + System.err.println(tr); + throw new Exception("expected message \'" + message + "\' not found"); + } + } +} diff --git a/jdk/test/tools/launcher/MainClassCantBeLoadedTest.java b/jdk/test/tools/launcher/MainClassCantBeLoadedTest.java new file mode 100644 index 00000000000..fe3e13744c0 --- /dev/null +++ b/jdk/test/tools/launcher/MainClassCantBeLoadedTest.java @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8174694 8181033 + * @summary improve error message shown when main class can't be loaded + * @compile MainClassCantBeLoadedTest.java + * @run main MainClassCantBeLoadedTest + */ + +import java.io.*; +import java.util.*; + +public class MainClassCantBeLoadedTest extends TestHelper { + private MainClassCantBeLoadedTest(){} + + @Test + void testLoadingClassWithMissingSuper() throws Exception { + if (!isEnglishLocale()) { + return; + } + + File cwd = new File("."); + File srcDir = new File(cwd, "src"); + if (srcDir.exists()) { + recursiveDelete(srcDir); + } + srcDir.mkdirs(); + + /* we want to generate two classes A and B, where B is the superclass of A + * class A has a main method + */ + ArrayList scratchpad = new ArrayList<>(); + scratchpad.add("public class A extends B {"); + scratchpad.add(" public static void main(String... args) {}"); + scratchpad.add("}"); + createFile(new File(srcDir, "A.java"), scratchpad); + + scratchpad.clear(); + scratchpad.add("class B {}"); + createFile(new File(srcDir, "B.java"), scratchpad); + + // let's compile both + TestResult trCompilation = doExec(javacCmd, + "-d", "out", + new File(srcDir, "A.java").toString(), + new File(srcDir, "B.java").toString()); + if (!trCompilation.isOK()) { + System.err.println(trCompilation); + throw new RuntimeException("Error: compiling"); + } + + // and now B is removed + File outDir = new File(cwd, "out"); + File bClass = new File(outDir, "B.class"); + bClass.delete(); + + // if A is executed + TestResult trExecution = doExec(javaCmd, "-cp", "out", "A"); + // then this error message should be generated + trExecution.contains("Error: Could not find or load main class A"); + trExecution.contains("Caused by: java.lang.NoClassDefFoundError: B"); + if (!trExecution.testStatus) + System.err.println(trExecution); + } + + @Test + void testFailToInitializeMainClass() throws Exception { + if (!isEnglishLocale()) { + return; + } + + File cwd = new File("."); + File srcDir = new File(cwd, "src"); + if (srcDir.exists()) { + recursiveDelete(srcDir); + } + srcDir.mkdirs(); + + /* we want to generate class C that will resolve additional class + */ + ArrayList scratchpad = new ArrayList<>(); + scratchpad.add("public class C {"); + scratchpad.add(" public static void main(String... args) {"); + scratchpad.add(" try {"); + scratchpad.add(" System.out.println(\"loading of restricted class\");"); + scratchpad.add(" } catch (Exception e) {"); + scratchpad.add(" java.security.Provider p = new com.sun.crypto.provider.SunJCE();"); + scratchpad.add(" p.toString();"); + scratchpad.add(" }"); + scratchpad.add(" }"); + scratchpad.add("}"); + createFile(new File(srcDir, "C.java"), scratchpad); + + + // Compile and execute C should succeed + TestResult trCompilation = doExec(javacCmd, + "--add-exports", "java.base/com.sun.crypto.provider=ALL-UNNAMED", + "-d", "out", + new File(srcDir, "C.java").toString()); + if (!trCompilation.isOK()) { + System.err.println(trCompilation); + throw new RuntimeException("Error: compiling"); + } + + TestResult trExecution = doExec(javaCmd, + "--add-exports", "java.base/com.sun.crypto.provider=ALL-UNNAMED", + "-cp", "out", "C"); + if (!trExecution.isOK()) { + System.err.println(trExecution); + throw new RuntimeException("Error: executing"); + } + + // Execute C with security manager will fail with AccessControlException + trExecution = doExec(javaCmd, + "-Djava.security.manager", + "--add-exports", "java.base/com.sun.crypto.provider=ALL-UNNAMED", + "-cp", "out", "C"); + + // then this error message should be generated + trExecution.contains("Error: Unable to initialize main class C"); + trExecution.contains("Caused by: java.security.AccessControlException: " + + "access denied (\"java.lang.RuntimePermission\"" + + " \"accessClassInPackage.com.sun.crypto.provider\")"); + if (!trExecution.testStatus) + System.err.println(trExecution); + } + + public static void main(String[] args) throws Exception { + MainClassCantBeLoadedTest a = new MainClassCantBeLoadedTest(); + a.run(args); + if (testExitValue > 0) { + System.out.println("Total of " + testExitValue + " failed"); + throw new RuntimeException("Test failed"); + } else { + System.out.println("Test passed"); + } + } +} diff --git a/jdk/test/tools/launcher/ToolsOpts.java b/jdk/test/tools/launcher/ToolsOpts.java index f8920c6acd7..5837c62e015 100644 --- a/jdk/test/tools/launcher/ToolsOpts.java +++ b/jdk/test/tools/launcher/ToolsOpts.java @@ -87,11 +87,16 @@ public class ToolsOpts extends TestHelper { contents.add(" }\n"); contents.add(" }\n"); contents.add("}\n"); - createFile(new File(mainJava), contents); + String mainJavaPath = "patch-src/com/sun/tools/javac/" + mainJava; + File mainJavaFile = new File(mainJavaPath.replace('/', File.separatorChar)); + mainJavaFile.getParentFile().mkdirs(); + createFile(mainJavaFile, contents); // compile Main.java into directory to override classes in jdk.compiler new File("jdk.compiler").mkdir(); - compile("-Xmodule:jdk.compiler", "-d", "jdk.compiler", mainJava); + compile("--patch-module", "jdk.compiler=patch-src", + "-d", "jdk.compiler", + mainJavaFile.toString()); } static void pass(String msg) { diff --git a/jdk/test/tools/launcher/modules/addexports/AddExportsTestWarningError.java b/jdk/test/tools/launcher/modules/addexports/AddExportsTestWarningError.java index ed2f7c0d7a8..0a20fec711a 100644 --- a/jdk/test/tools/launcher/modules/addexports/AddExportsTestWarningError.java +++ b/jdk/test/tools/launcher/modules/addexports/AddExportsTestWarningError.java @@ -134,16 +134,16 @@ public class AddExportsTestWarningError { return new Object[][]{ // source not found - {"DoesNotExist/p=m1", "WARNING: Unknown module: DoesNotExist specified in --add-exports"}, + {"DoesNotExist/p=m1", "WARNING: Unknown module: DoesNotExist specified to --add-exports"}, {"m1/DoesNotExist=m2", "WARNING: package DoesNotExist not in m1"}, // target not found - {"m1/p1=DoesNotExist", "WARNING: Unknown module: DoesNotExist specified in --add-exports"}, + {"m1/p1=DoesNotExist", "WARNING: Unknown module: DoesNotExist specified to --add-exports"}, // bad names - {"m*/p1=m2", "WARNING: Unknown module: m* specified in --add-exports"}, + {"m*/p1=m2", "WARNING: Unknown module: m* specified to --add-exports"}, {"m1/p!=m2", "WARNING: package p! not in m1"}, - {"m1/p1=m!", "WARNING: Unknown module: m! specified in --add-exports"}, + {"m1/p1=m!", "WARNING: Unknown module: m! specified to --add-exports"}, }; } diff --git a/jdk/test/tools/launcher/modules/addexports/manifest/AddExportsAndOpensInManifest.java b/jdk/test/tools/launcher/modules/addexports/manifest/AddExportsAndOpensInManifest.java index c9abb2cf067..74036e3bef6 100644 --- a/jdk/test/tools/launcher/modules/addexports/manifest/AddExportsAndOpensInManifest.java +++ b/jdk/test/tools/launcher/modules/addexports/manifest/AddExportsAndOpensInManifest.java @@ -75,7 +75,8 @@ public class AddExportsAndOpensInManifest { Paths.get("Test1.class"), Paths.get("Test2.class")); // java -jar test.jar - return ProcessTools.executeTestJava("-jar", jarfile.toString()) + return ProcessTools.executeTestJava("--illegal-access=deny", + "-jar", jarfile.toString()) .outputTo(System.out) .errorTo(System.out); } diff --git a/jdk/test/tools/launcher/modules/addreads/AddReadsTestWarningError.java b/jdk/test/tools/launcher/modules/addreads/AddReadsTestWarningError.java index 5b8558350ef..6c9ee5634eb 100644 --- a/jdk/test/tools/launcher/modules/addreads/AddReadsTestWarningError.java +++ b/jdk/test/tools/launcher/modules/addreads/AddReadsTestWarningError.java @@ -168,14 +168,14 @@ public class AddReadsTestWarningError { return new Object[][]{ // source not found - {"DoesNotExist=m2", "WARNING: Unknown module: DoesNotExist specified in --add-reads"}, + {"DoesNotExist=m2", "WARNING: Unknown module: DoesNotExist specified to --add-reads"}, // target not found - {"m2=DoesNotExist", "WARNING: Unknown module: DoesNotExist specified in --add-reads"}, + {"m2=DoesNotExist", "WARNING: Unknown module: DoesNotExist specified to --add-reads"}, // bad names - {"m*=m2", "WARNING: Unknown module: m* specified in --add-reads"}, - {"m2=m!", "WARNING: Unknown module: m! specified in --add-reads"}, + {"m*=m2", "WARNING: Unknown module: m* specified to --add-reads"}, + {"m2=m!", "WARNING: Unknown module: m! specified to --add-reads"}, }; } diff --git a/jdk/test/tools/launcher/modules/basic/InitErrors.java b/jdk/test/tools/launcher/modules/basic/InitErrors.java new file mode 100644 index 00000000000..dd3a9837939 --- /dev/null +++ b/jdk/test/tools/launcher/modules/basic/InitErrors.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @library /lib/testlibrary + * @build InitErrors jdk.testlibrary.* + * @run testng InitErrors + * @summary Basic test to ensure that module system initialization errors + * go the right stream and with the right level of verbosity + */ + + +import java.util.Arrays; +import jdk.testlibrary.ProcessTools; +import jdk.testlibrary.OutputAnalyzer; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +public class InitErrors { + + // the option to cause module initialization to fail + private static final String ADD_UNKNOWN_MODULE = "--add-modules=XXX"; + + // the expected error message + private static final String UNKNOWN_MODULE_NOT_FOUND= "Module XXX not found"; + + // output expected in the stack trace when using -Xlog:init=debug + private static final String STACK_FRAME = "java.base/java.lang.System.initPhase2"; + + + /** + * Default behavior, send error message to stdout + */ + @Test + public void testDefaultOutput() throws Exception { + expectFail(showVersion(ADD_UNKNOWN_MODULE) + .stdoutShouldContain(UNKNOWN_MODULE_NOT_FOUND) + .stdoutShouldNotContain(STACK_FRAME) + .stderrShouldNotContain(UNKNOWN_MODULE_NOT_FOUND) + .stderrShouldNotContain(STACK_FRAME)); + } + + /** + * -XX:+DisplayVMOutputToStderr should send error message to stderr + */ + @Test + public void testOutputToStderr() throws Exception { + expectFail(showVersion(ADD_UNKNOWN_MODULE, "-XX:+DisplayVMOutputToStderr") + .stdoutShouldNotContain(UNKNOWN_MODULE_NOT_FOUND) + .stdoutShouldNotContain(STACK_FRAME) + .stderrShouldContain(UNKNOWN_MODULE_NOT_FOUND) + .stderrShouldNotContain(STACK_FRAME)); + } + + /** + * -Xlog:init=debug should print stack trace to stdout + */ + @Test + public void testStackTrace() throws Exception { + expectFail(showVersion(ADD_UNKNOWN_MODULE, "-Xlog:init=debug") + .stdoutShouldContain(UNKNOWN_MODULE_NOT_FOUND) + .stdoutShouldContain(STACK_FRAME) + .stderrShouldNotContain(UNKNOWN_MODULE_NOT_FOUND) + .stderrShouldNotContain(STACK_FRAME)); + } + + /** + * -Xlog:init=debug -XX:+DisplayVMOutputToStderr should print stack trace + * to stderr + */ + @Test + public void testStackTraceToStderr() throws Exception { + expectFail(showVersion(ADD_UNKNOWN_MODULE, + "-Xlog:init=debug", + "-XX:+DisplayVMOutputToStderr") + .stdoutShouldNotContain(UNKNOWN_MODULE_NOT_FOUND) + .stdoutShouldNotContain(STACK_FRAME) + .stderrShouldContain(UNKNOWN_MODULE_NOT_FOUND) + .stderrShouldContain(STACK_FRAME)); + } + + private OutputAnalyzer showVersion(String... args) throws Exception { + int len = args.length; + args = Arrays.copyOf(args, len+1); + args[len] = "-version"; + return ProcessTools.executeTestJava(args) + .outputTo(System.out) + .errorTo(System.out); + } + + private void expectFail(OutputAnalyzer output) { + assertFalse(output.getExitValue() == 0); + } + +} diff --git a/jdk/test/tools/launcher/modules/describe/DescribeModuleTest.java b/jdk/test/tools/launcher/modules/describe/DescribeModuleTest.java new file mode 100644 index 00000000000..330bb5ef9ca --- /dev/null +++ b/jdk/test/tools/launcher/modules/describe/DescribeModuleTest.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @modules java.xml + * @library /lib/testlibrary + * @build DescribeModuleTest jdk.testlibrary.* + * @run testng DescribeModuleTest + * @summary Basic test for java --describe-module + */ + +import jdk.testlibrary.ProcessTools; + +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +@Test +public class DescribeModuleTest { + + /** + * Test that the output describes java.base + */ + private void expectJavaBase(String... args) throws Exception { + int exitValue = ProcessTools.executeTestJava(args) + .outputTo(System.out) + .errorTo(System.out) + .stdoutShouldContain("java.base") + .stdoutShouldContain("exports java.lang") + .stdoutShouldContain("uses java.nio.file.spi.FileSystemProvider") + .stdoutShouldContain("contains sun.launcher") + .stdoutShouldNotContain("requires ") + .getExitValue(); + assertTrue(exitValue == 0); + } + + /** + * Test that the output describes java.xml + */ + private void expectJavaXml(String... args) throws Exception { + int exitValue = ProcessTools.executeTestJava(args) + .outputTo(System.out) + .errorTo(System.out) + .stdoutShouldContain("java.xml") + .stdoutShouldContain("exports javax.xml") + .stdoutShouldContain("requires java.base") + .stdoutShouldContain("uses javax.xml.stream.XMLInputFactory") + .getExitValue(); + assertTrue(exitValue == 0); + } + + /** + * Test output/exitValue when describing an unknown module + */ + private void expectUnknownModule(String... args) throws Exception { + int exitValue = ProcessTools.executeTestJava(args) + .outputTo(System.out) + .errorTo(System.out) + .stdoutShouldNotContain("requires java.base") + .getExitValue(); + assertTrue(exitValue != 0); + } + + + public void testDescribeJavaBase() throws Exception { + expectJavaBase("--describe-module", "java.base"); + expectJavaBase("--describe-module=java.base"); + expectJavaBase("-d", "java.base"); + } + + public void testDescribeJavaXml() throws Exception { + expectJavaXml("--describe-module", "java.xml"); + expectJavaXml("--describe-module=java.xml"); + expectJavaXml("-d", "java.xml"); + } + + public void testDescribeUnknownModule() throws Exception { + expectUnknownModule("--describe-module", "jdk.rhubarb"); + expectUnknownModule("--describe-module=jdk.rhubarb"); + expectUnknownModule("-d", "jdk.rhubarb"); + } + +} diff --git a/jdk/test/tools/launcher/modules/dryrun/DryRunTest.java b/jdk/test/tools/launcher/modules/dryrun/DryRunTest.java index fe9a293be57..afb1fbc78f1 100644 --- a/jdk/test/tools/launcher/modules/dryrun/DryRunTest.java +++ b/jdk/test/tools/launcher/modules/dryrun/DryRunTest.java @@ -167,22 +167,6 @@ public class DryRunTest { // test main method with and without --add-modules mm int exitValue = exec("--module-path", LIBS_DIR.toString(), "-m", mid); - assertTrue(exitValue != 0); - - exitValue = exec("--module-path", LIBS_DIR.toString(), - "--add-modules", M_MODULE, - "-m", mid); - assertTrue(exitValue == 0); - - // test dry run with and without --add-modules m - // no resolution failure - exitValue = exec("--dry-run", "--module-path", LIBS_DIR.toString(), - "-m", mid); - assertTrue(exitValue == 0); - - exitValue = exec("--dry-run", "--module-path", LIBS_DIR.toString(), - "--add-modules", M_MODULE, - "-m", mid); assertTrue(exitValue == 0); } diff --git a/jdk/test/tools/launcher/modules/illegalaccess/IllegalAccessTest.java b/jdk/test/tools/launcher/modules/illegalaccess/IllegalAccessTest.java new file mode 100644 index 00000000000..c6181769d95 --- /dev/null +++ b/jdk/test/tools/launcher/modules/illegalaccess/IllegalAccessTest.java @@ -0,0 +1,491 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @modules java.base/jdk.internal.misc + * java.base/sun.security.x509 + * java.activation + * @library /lib/testlibrary modules + * @build IllegalAccessTest TryAccess JarUtils CompilerUtils jdk.testlibrary.* + * @build m/* + * @run testng/othervm/timeout=180 IllegalAccessTest + * @summary Basic test for java --illegal-access=$VALUE + */ + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.jar.Attributes; +import java.util.jar.Manifest; +import java.util.stream.Stream; + +import jdk.testlibrary.ProcessTools; +import jdk.testlibrary.OutputAnalyzer; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Basic test of --illegal-access=value to deny or permit access to JDK internals. + */ + +@Test +public class IllegalAccessTest { + + static final String TEST_SRC = System.getProperty("test.src"); + static final String TEST_CLASSES = System.getProperty("test.classes"); + static final String MODULE_PATH = System.getProperty("jdk.module.path"); + + /** + * Represents the expected result of a test. + */ + static final class Result { + private final boolean success; + private final List expectedOutput = new ArrayList<>(); + private final List notExpectedOutput = new ArrayList<>(); + + Result(boolean success) { + this.success = success; + } + + Result expect(String msg) { + expectedOutput.add(msg); + return this; + } + + Result doNotExpect(String msg) { + notExpectedOutput.add(msg); + return this; + } + + boolean shouldSucceed() { + return success; + } + + Stream expectedOutput() { + return expectedOutput.stream(); + } + + Stream notExpectedOutput() { + return notExpectedOutput.stream(); + } + + @Override + public String toString() { + String s = (success) ? "success" : "failure"; + for (String msg : expectedOutput) { + s += "/" + msg; + } + return s; + } + } + + static Result success() { + return new Result(true); + } + + static Result successNoWarning() { + return success().doNotExpect("WARNING"); + } + + static Result successWithWarning() { + return success().expect("WARNING"); + } + + static Result fail(String expectedOutput) { + return new Result(false).expect(expectedOutput).doNotExpect("WARNING"); + } + + @DataProvider(name = "denyCases") + public Object[][] denyCases() { + return new Object[][] { + { "accessPublicClassNonExportedPackage", fail("IllegalAccessError") }, + { "accessPublicClassJdk9NonExportedPackage", fail("IllegalAccessError") }, + + { "reflectPublicMemberExportedPackage", successNoWarning() }, + { "reflectNonPublicMemberExportedPackage", fail("IllegalAccessException") }, + { "reflectPublicMemberNonExportedPackage", fail("IllegalAccessException") }, + { "reflectNonPublicMemberNonExportedPackage", fail("IllegalAccessException") }, + { "reflectPublicMemberJdk9NonExportedPackage", fail("IllegalAccessException") }, + { "reflectPublicMemberApplicationModule", successNoWarning() }, + + { "setAccessiblePublicMemberExportedPackage", successNoWarning() }, + { "setAccessibleNonPublicMemberExportedPackage", fail("InaccessibleObjectException") }, + { "setAccessiblePublicMemberNonExportedPackage", fail("InaccessibleObjectException") }, + { "setAccessibleNonPublicMemberNonExportedPackage", fail("InaccessibleObjectException") }, + { "setAccessiblePublicMemberJdk9NonExportedPackage", fail("InaccessibleObjectException") }, + { "setAccessiblePublicMemberApplicationModule", successNoWarning() }, + { "setAccessibleNotPublicMemberApplicationModule", fail("InaccessibleObjectException") }, + + { "privateLookupPublicClassExportedPackage", fail("IllegalAccessException") }, + { "privateLookupNonPublicClassExportedPackage", fail("IllegalAccessException") }, + { "privateLookupPublicClassNonExportedPackage", fail("IllegalAccessException") }, + { "privateLookupNonPublicClassNonExportedPackage", fail("IllegalAccessException") }, + { "privateLookupPublicClassJdk9NonExportedPackage", fail("IllegalAccessException") }, + }; + } + + @DataProvider(name = "permitCases") + public Object[][] permitCases() { + return new Object[][] { + { "accessPublicClassNonExportedPackage", successNoWarning() }, + { "accessPublicClassJdk9NonExportedPackage", fail("IllegalAccessError") }, + + { "reflectPublicMemberExportedPackage", successNoWarning() }, + { "reflectNonPublicMemberExportedPackage", fail("IllegalAccessException") }, + { "reflectPublicMemberNonExportedPackage", successWithWarning() }, + { "reflectNonPublicMemberNonExportedPackage", fail("IllegalAccessException") }, + { "reflectPublicMemberJdk9NonExportedPackage", fail("IllegalAccessException") }, + + { "setAccessiblePublicMemberExportedPackage", successNoWarning()}, + { "setAccessibleNonPublicMemberExportedPackage", successWithWarning() }, + { "setAccessiblePublicMemberNonExportedPackage", successWithWarning() }, + { "setAccessibleNonPublicMemberNonExportedPackage", successWithWarning() }, + { "setAccessiblePublicMemberJdk9NonExportedPackage", fail("InaccessibleObjectException") }, + { "setAccessiblePublicMemberApplicationModule", successNoWarning() }, + { "setAccessibleNotPublicMemberApplicationModule", fail("InaccessibleObjectException") }, + + { "privateLookupPublicClassExportedPackage", successWithWarning() }, + { "privateLookupNonPublicClassExportedPackage", successWithWarning() }, + { "privateLookupPublicClassNonExportedPackage", successWithWarning() }, + { "privateLookupNonPublicClassNonExportedPackage", successWithWarning() }, + { "privateLookupPublicClassJdk9NonExportedPackage", fail("IllegalAccessException") }, + { "privateLookupPublicClassApplicationModule", fail("IllegalAccessException") }, + }; + } + + /** + * Checks an expected result with the output captured by the given + * OutputAnalyzer. + */ + void checkResult(Result expectedResult, OutputAnalyzer outputAnalyzer) { + expectedResult.expectedOutput().forEach(outputAnalyzer::shouldContain); + expectedResult.notExpectedOutput().forEach(outputAnalyzer::shouldNotContain); + int exitValue = outputAnalyzer.getExitValue(); + if (expectedResult.shouldSucceed()) { + assertTrue(exitValue == 0); + } else { + assertTrue(exitValue != 0); + } + } + + /** + * Runs the test to execute the given test action. The VM is run with the + * given VM options and the output checked to see that it matches the + * expected result. + */ + OutputAnalyzer run(String action, Result expectedResult, String... vmopts) + throws Exception + { + Stream s1 = Stream.of(vmopts); + Stream s2 = Stream.of("-p", MODULE_PATH, "--add-modules=m", + "-cp", TEST_CLASSES, "TryAccess", action); + String[] opts = Stream.concat(s1, s2).toArray(String[]::new); + OutputAnalyzer outputAnalyzer = ProcessTools + .executeTestJava(opts) + .outputTo(System.out) + .errorTo(System.out); + if (expectedResult != null) + checkResult(expectedResult, outputAnalyzer); + return outputAnalyzer; + } + + OutputAnalyzer run(String action, String... vmopts) throws Exception { + return run(action, null, vmopts); + } + + /** + * Runs an executable JAR to execute the given test action. The VM is run + * with the given VM options and the output checked to see that it matches + * the expected result. + */ + void run(Path jarFile, String action, Result expectedResult, String... vmopts) + throws Exception + { + Stream s1 = Stream.of(vmopts); + Stream s2 = Stream.of("-jar", jarFile.toString(), action); + String[] opts = Stream.concat(s1, s2).toArray(String[]::new); + checkResult(expectedResult, ProcessTools.executeTestJava(opts) + .outputTo(System.out) + .errorTo(System.out)); + } + + @Test(dataProvider = "denyCases") + public void testDeny(String action, Result expectedResult) throws Exception { + run(action, expectedResult, "--illegal-access=deny"); + } + + @Test(dataProvider = "permitCases") + public void testDefault(String action, Result expectedResult) throws Exception { + run(action, expectedResult); + } + + @Test(dataProvider = "permitCases") + public void testPermit(String action, Result expectedResult) throws Exception { + run(action, expectedResult, "--illegal-access=permit"); + } + + @Test(dataProvider = "permitCases") + public void testWarn(String action, Result expectedResult) throws Exception { + run(action, expectedResult, "--illegal-access=warn"); + } + + @Test(dataProvider = "permitCases") + public void testDebug(String action, Result expectedResult) throws Exception { + // expect stack trace with WARNING + if (expectedResult.expectedOutput().anyMatch("WARNING"::equals)) { + expectedResult.expect("TryAccess.main"); + } + run(action, expectedResult, "--illegal-access=debug"); + } + + /** + * Test accessing internals of upgradeable module + */ + public void testWithUpgradedModule() throws Exception { + // upgradeable module loaded from run-time image + run("setAccessibleNotPublicMemberUpgradeableModule", successWithWarning(), + "--add-modules=java.activation"); + + // upgradeable module loaded from upgrade module path + Path upgradesrc = Paths.get(TEST_SRC, "upgradesrc"); + Path upgrademods = Files.createDirectory(Paths.get("upgrademods")); + Path output = upgrademods.resolve("java.activation"); + assertTrue(CompilerUtils.compile(upgradesrc, output)); + run("setAccessibleNotPublicMemberUpgradeableModule", + fail("InaccessibleObjectException"), + "--upgrade-module-path=" + upgrademods, + "--add-modules=java.activation"); + } + + /** + * Specify --add-exports to export a package + */ + public void testWithAddExportsOption() throws Exception { + // warning + run("reflectPublicMemberNonExportedPackage", successWithWarning()); + + // no warning due to --add-exports + run("reflectPublicMemberNonExportedPackage", successNoWarning(), + "--add-exports", "java.base/sun.security.x509=ALL-UNNAMED"); + + // attempt two illegal accesses, one allowed by --add-exports + run("reflectPublicMemberNonExportedPackage" + + ",setAccessibleNonPublicMemberExportedPackage", + successWithWarning(), + "--add-exports", "java.base/sun.security.x509=ALL-UNNAMED"); + } + + /** + * Specify --add-open to open a package + */ + public void testWithAddOpensOption() throws Exception { + // warning + run("setAccessibleNonPublicMemberExportedPackage", successWithWarning()); + + // no warning due to --add-opens + run("setAccessibleNonPublicMemberExportedPackage", successNoWarning(), + "--add-opens", "java.base/java.lang=ALL-UNNAMED"); + + // attempt two illegal accesses, one allowed by --add-opens + run("reflectPublicMemberNonExportedPackage" + + ",setAccessibleNonPublicMemberExportedPackage", + successWithWarning(), + "--add-opens", "java.base/java.lang=ALL-UNNAMED"); + } + + /** + * Test reflective API to export a package + */ + public void testWithReflectiveExports() throws Exception { + // compile patch for java.base + Path src = Paths.get(TEST_SRC, "patchsrc", "java.base"); + Path patch = Files.createDirectories(Paths.get("patches", "java.base")); + assertTrue(CompilerUtils.compile(src, patch, + "--patch-module", "java.base=" + src)); + + // reflectively export, then access + run("exportNonExportedPackages,reflectPublicMemberNonExportedPackage", + successNoWarning(), + "--patch-module", "java.base=" + patch); + + // access, reflectively export, access again + List output = run("reflectPublicMemberNonExportedPackage," + + "exportNonExportedPackages," + + "reflectPublicMemberNonExportedPackage", + "--patch-module", "java.base="+patch, + "--illegal-access=warn").asLines(); + assertTrue(count(output, "WARNING") == 1); // one warning + } + + /** + * Test reflective API to open a package + */ + public void testWithReflectiveOpens() throws Exception { + // compile patch for java.base + Path src = Paths.get(TEST_SRC, "patchsrc", "java.base"); + Path patch = Files.createDirectories(Paths.get("patches", "java.base")); + assertTrue(CompilerUtils.compile(src, patch, + "--patch-module", "java.base=" + src)); + + // reflectively open exported package, then access + run("openExportedPackage,setAccessibleNonPublicMemberExportedPackage", + successNoWarning(), + "--patch-module", "java.base=" + patch); + + // access, reflectively open exported package, access again + List output1 = run("setAccessibleNonPublicMemberExportedPackage" + + ",openExportedPackage" + + ",setAccessibleNonPublicMemberExportedPackage", + "--patch-module", "java.base=" + patch, + "--illegal-access=warn").asLines(); + assertTrue(count(output1, "WARNING") == 1); // one warning + + // reflectively open non-exported packages, then access + run("openNonExportedPackages,setAccessibleNonPublicMemberNonExportedPackage", + successNoWarning(), + "--patch-module", "java.base=" + patch); + + // access, reflectively open non-exported package, access again + List output2 = run("setAccessibleNonPublicMemberNonExportedPackage" + + ",openNonExportedPackages" + + ",setAccessibleNonPublicMemberNonExportedPackage", + "--patch-module", "java.base=" + patch, + "--illegal-access=warn").asLines(); + assertTrue(count(output2, "WARNING") == 1); // one warning + } + + /** + * Specify Add-Exports in JAR file manifest + */ + public void testWithAddExportsInManifest() throws Exception { + Manifest man = new Manifest(); + Attributes attrs = man.getMainAttributes(); + attrs.put(Attributes.Name.MANIFEST_VERSION, "1.0"); + attrs.put(Attributes.Name.MAIN_CLASS, "TryAccess"); + attrs.put(new Attributes.Name("Add-Exports"), "java.base/sun.security.x509"); + Path jarfile = Paths.get("x.jar"); + Path classes = Paths.get(TEST_CLASSES); + JarUtils.createJarFile(jarfile, man, classes, Paths.get("TryAccess.class")); + + run(jarfile, "reflectPublicMemberNonExportedPackage", successNoWarning()); + + run(jarfile, "setAccessibleNonPublicMemberExportedPackage", successWithWarning()); + + // attempt two illegal accesses, one allowed by Add-Exports + run(jarfile, "reflectPublicMemberNonExportedPackage," + + "setAccessibleNonPublicMemberExportedPackage", + successWithWarning()); + } + + /** + * Specify Add-Opens in JAR file manifest + */ + public void testWithAddOpensInManifest() throws Exception { + Manifest man = new Manifest(); + Attributes attrs = man.getMainAttributes(); + attrs.put(Attributes.Name.MANIFEST_VERSION, "1.0"); + attrs.put(Attributes.Name.MAIN_CLASS, "TryAccess"); + attrs.put(new Attributes.Name("Add-Opens"), "java.base/java.lang"); + Path jarfile = Paths.get("x.jar"); + Path classes = Paths.get(TEST_CLASSES); + JarUtils.createJarFile(jarfile, man, classes, Paths.get("TryAccess.class")); + + run(jarfile, "setAccessibleNonPublicMemberExportedPackage", successNoWarning()); + + run(jarfile, "reflectPublicMemberNonExportedPackage", successWithWarning()); + + // attempt two illegal accesses, one allowed by Add-Opens + run(jarfile, "reflectPublicMemberNonExportedPackage," + + "setAccessibleNonPublicMemberExportedPackage", + successWithWarning()); + } + + /** + * Test that default behavior is to print a warning on the first illegal + * access only. + */ + public void testWarnOnFirstIllegalAccess() throws Exception { + String action1 = "reflectPublicMemberNonExportedPackage"; + String action2 = "setAccessibleNonPublicMemberExportedPackage"; + int warningCount = count(run(action1).asLines(), "WARNING"); + + // same illegal access + List output1 = run(action1 + "," + action1).asLines(); + assertTrue(count(output1, "WARNING") == warningCount); + + // different illegal access + List output2 = run(action1 + "," + action2).asLines(); + assertTrue(count(output2, "WARNING") == warningCount); + } + + /** + * Test that --illegal-access=warn prints a one-line warning per each unique + * illegal access. + */ + public void testWarnPerIllegalAccess() throws Exception { + String action1 = "reflectPublicMemberNonExportedPackage"; + String action2 = "setAccessibleNonPublicMemberExportedPackage"; + + // same illegal access + String repeatedActions = action1 + "," + action1; + List output1 = run(repeatedActions, "--illegal-access=warn").asLines(); + assertTrue(count(output1, "WARNING") == 1); + + // different illegal access + String differentActions = action1 + "," + action2; + List output2 = run(differentActions, "--illegal-access=warn").asLines(); + assertTrue(count(output2, "WARNING") == 2); + } + + /** + * Specify --illegal-access more than once, last one wins + */ + public void testRepeatedOption() throws Exception { + run("accessPublicClassNonExportedPackage", successNoWarning(), + "--illegal-access=deny", "--illegal-access=permit"); + run("accessPublicClassNonExportedPackage", fail("IllegalAccessError"), + "--illegal-access=permit", "--illegal-access=deny"); + } + + /** + * Specify bad value to --illegal-access + */ + public void testBadValue() throws Exception { + run("accessPublicClassNonExportedPackage", + fail("Value specified to --illegal-access not recognized"), + "--illegal-access=BAD"); + } + + private int count(Iterable lines, CharSequence cs) { + int count = 0; + for (String line : lines) { + if (line.contains(cs)) count++; + } + return count; + } +} diff --git a/jdk/test/tools/launcher/modules/illegalaccess/TryAccess.java b/jdk/test/tools/launcher/modules/illegalaccess/TryAccess.java new file mode 100644 index 00000000000..848e1544eeb --- /dev/null +++ b/jdk/test/tools/launcher/modules/illegalaccess/TryAccess.java @@ -0,0 +1,194 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import javax.activation.MimeTypeParameterList; +import java.lang.invoke.MethodHandles; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.nio.channels.SocketChannel; + +/** + * Launched by IllegalAccessTest to attempt illegal access. + */ + +public class TryAccess { + + public static void main(String[] args) throws Exception { + String[] methodNames = args[0].split(","); + for (String methodName : methodNames) { + Method m = TryAccess.class.getDeclaredMethod(methodName); + m.invoke(null); + } + } + + // -- static access -- + + static void accessPublicClassNonExportedPackage() throws Exception { + Object obj = new sun.security.x509.X500Name("CN=name"); + } + + static void accessPublicClassJdk9NonExportedPackage() { + Object obj = jdk.internal.misc.Unsafe.getUnsafe(); + } + + // -- reflective access -- + + static void reflectPublicMemberExportedPackage() throws Exception { + Constructor ctor = String.class.getConstructor(String.class); + Object name = ctor.newInstance("value"); + } + + static void reflectNonPublicMemberExportedPackage() throws Exception { + Field f = String.class.getDeclaredField("value"); + Object obj = f.get("foo"); + } + + static void reflectPublicMemberNonExportedPackage() throws Exception { + Class clazz = Class.forName("sun.security.x509.X500Name"); + Constructor ctor = clazz.getConstructor(String.class); + Object obj = ctor.newInstance("CN=user"); + } + + static void reflectNonPublicMemberNonExportedPackage() throws Exception { + SocketChannel sc = SocketChannel.open(); + Field f = sc.getClass().getDeclaredField("fd"); + Object obj = f.get(sc); + } + + static void reflectPublicMemberJdk9NonExportedPackage() throws Exception { + Class clazz = Class.forName("jdk.internal.misc.Unsafe"); + Method m = clazz.getMethod("getUnsafe"); + Object obj = m.invoke(null); + } + + static void reflectPublicMemberApplicationModule() throws Exception { + Class clazz = Class.forName("p.Type"); + Constructor ctor = clazz.getConstructor(int.class); + Object obj = ctor.newInstance(1); + } + + // -- setAccessible -- + + static void setAccessiblePublicMemberExportedPackage() throws Exception { + Constructor ctor = String.class.getConstructor(String.class); + ctor.setAccessible(true); + } + + static void setAccessibleNonPublicMemberExportedPackage() throws Exception { + Method method = ClassLoader.class.getDeclaredMethod("defineClass", + byte[].class, int.class, int.class); + method.setAccessible(true); + } + + static void setAccessiblePublicMemberNonExportedPackage() throws Exception { + Class clazz = Class.forName("sun.security.x509.X500Name"); + Constructor ctor = clazz.getConstructor(String.class); + ctor.setAccessible(true); + } + + static void setAccessibleNonPublicMemberNonExportedPackage() throws Exception { + SocketChannel sc = SocketChannel.open(); + Field f = sc.getClass().getDeclaredField("fd"); + f.setAccessible(true); + } + + static void setAccessiblePublicMemberJdk9NonExportedPackage() throws Exception { + Class clazz = Class.forName("jdk.internal.misc.Unsafe"); + Method m = clazz.getMethod("getUnsafe"); + m.setAccessible(true); + } + + static void setAccessiblePublicMemberApplicationModule() throws Exception { + Class clazz = Class.forName("p.Type"); + Constructor ctor = clazz.getConstructor(int.class); + ctor.setAccessible(true); + } + + static void setAccessibleNotPublicMemberUpgradeableModule() throws Exception { + Method method = MimeTypeParameterList.class.getDeclaredMethod("parse", + String.class); + method.setAccessible(true); + } + + static void setAccessibleNotPublicMemberApplicationModule() throws Exception { + Class clazz = Class.forName("p.Type"); + Constructor ctor = clazz.getDeclaredConstructor(int.class, int.class); + ctor.setAccessible(true); + } + + + // -- privateLookupIn -- + + static void privateLookupPublicClassExportedPackage() throws Exception { + MethodHandles.privateLookupIn(String.class, MethodHandles.lookup()); + } + + static void privateLookupNonPublicClassExportedPackage() throws Exception { + Class clazz = Class.forName("java.lang.WeakPairMap"); + MethodHandles.privateLookupIn(clazz, MethodHandles.lookup()); + } + + static void privateLookupPublicClassNonExportedPackage() throws Exception { + Class clazz = Class.forName("sun.security.x509.X500Name"); + MethodHandles.privateLookupIn(clazz, MethodHandles.lookup()); + } + + static void privateLookupNonPublicClassNonExportedPackage() throws Exception { + Class clazz = Class.forName("sun.nio.ch.SocketChannelImpl"); + MethodHandles.privateLookupIn(clazz, MethodHandles.lookup()); + } + + static void privateLookupPublicClassJdk9NonExportedPackage() throws Exception { + Class clazz = Class.forName("jdk.internal.misc.Unsafe"); + MethodHandles.privateLookupIn(clazz, MethodHandles.lookup()); + } + + static void privateLookupPublicClassApplicationModule() throws Exception { + Class clazz = Class.forName("p.Type"); + MethodHandles.privateLookupIn(clazz, MethodHandles.lookup()); + } + + + // -- export/open packages to this unnamed module -- + + static void exportNonExportedPackages() throws Exception { + Class helper = Class.forName("java.lang.Helper"); + Method m = helper.getMethod("export", String.class, Module.class); + m.invoke(null, "sun.security.x509", TryAccess.class.getModule()); + m.invoke(null, "sun.nio.ch", TryAccess.class.getModule()); + } + + static void openExportedPackage() throws Exception { + Class helper = Class.forName("java.lang.Helper"); + Method m = helper.getMethod("open", String.class, Module.class); + m.invoke(null, "java.lang", TryAccess.class.getModule()); + } + + static void openNonExportedPackages() throws Exception { + Class helper = Class.forName("java.lang.Helper"); + Method m = helper.getMethod("open", String.class, Module.class); + m.invoke(null, "sun.security.x509", TryAccess.class.getModule()); + m.invoke(null, "sun.nio.ch", TryAccess.class.getModule()); + } +} diff --git a/jdk/test/tools/launcher/modules/illegalaccess/modules/m/module-info.java b/jdk/test/tools/launcher/modules/illegalaccess/modules/m/module-info.java new file mode 100644 index 00000000000..90248e83226 --- /dev/null +++ b/jdk/test/tools/launcher/modules/illegalaccess/modules/m/module-info.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m { + exports p; +} diff --git a/jdk/test/tools/launcher/modules/illegalaccess/modules/m/p/Type.java b/jdk/test/tools/launcher/modules/illegalaccess/modules/m/p/Type.java new file mode 100644 index 00000000000..b83e70be94c --- /dev/null +++ b/jdk/test/tools/launcher/modules/illegalaccess/modules/m/p/Type.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p; + +public class Type { + + private Type(int x, int y) { } + + public Type(int x) { } +} diff --git a/jdk/test/tools/launcher/modules/illegalaccess/patchsrc/java.base/java/lang/Helper.java b/jdk/test/tools/launcher/modules/illegalaccess/patchsrc/java.base/java/lang/Helper.java new file mode 100644 index 00000000000..822a0a80520 --- /dev/null +++ b/jdk/test/tools/launcher/modules/illegalaccess/patchsrc/java.base/java/lang/Helper.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.lang; + +public class Helper { + private Helper() { } + + /** + * Exports a package to a module. + */ + public static void export(String pn, Module other) { + Helper.class.getModule().addExports(pn, other); + } + + /** + * Opens a package to a module. + */ + public static void open(String pn, Module other) { + Helper.class.getModule().addOpens(pn, other); + } +} diff --git a/jdk/test/tools/launcher/modules/illegalaccess/upgradesrc/java.activation/javax/activation/MimeTypeParameterList.java b/jdk/test/tools/launcher/modules/illegalaccess/upgradesrc/java.activation/javax/activation/MimeTypeParameterList.java new file mode 100644 index 00000000000..5398bcd7ce4 --- /dev/null +++ b/jdk/test/tools/launcher/modules/illegalaccess/upgradesrc/java.activation/javax/activation/MimeTypeParameterList.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.activation; + +public class MimeTypeParameterList { + protected void parse(String parameterList) { } +} diff --git a/jdk/test/tools/launcher/modules/illegalaccess/upgradesrc/java.activation/module-info.java b/jdk/test/tools/launcher/modules/illegalaccess/upgradesrc/java.activation/module-info.java new file mode 100644 index 00000000000..31cde855b66 --- /dev/null +++ b/jdk/test/tools/launcher/modules/illegalaccess/upgradesrc/java.activation/module-info.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module java.activation { + exports javax.activation; +} diff --git a/jdk/test/tools/launcher/modules/listmods/ListModsTest.java b/jdk/test/tools/launcher/modules/listmods/ListModsTest.java index 7b1dd9340e7..4fd8984842b 100644 --- a/jdk/test/tools/launcher/modules/listmods/ListModsTest.java +++ b/jdk/test/tools/launcher/modules/listmods/ListModsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -33,7 +33,7 @@ import java.nio.file.Path; import java.nio.file.Paths; -import static jdk.testlibrary.ProcessTools.*; +import jdk.testlibrary.ProcessTools; import jdk.testlibrary.OutputAnalyzer; import org.testng.annotations.BeforeTest; @@ -66,138 +66,80 @@ public class ListModsTest { SRC_DIR.resolve("java.transaction"), UPGRADEMODS_DIR.resolve("java.transaction")); assertTrue(compiled); - } - @Test public void testListAll() throws Exception { - OutputAnalyzer output - = executeTestJava("--list-modules") - .outputTo(System.out) - .errorTo(System.out); - output.shouldContain("java.base"); - output.shouldContain("java.xml"); - assertTrue(output.getExitValue() == 0); + exec("--list-modules") + .shouldContain("java.base") + .shouldContain("java.xml") + .shouldHaveExitValue(0); } - - @Test - public void testListOneModule() throws Exception { - OutputAnalyzer output - = executeTestJava("--list-modules=java.base") - .outputTo(System.out) - .errorTo(System.out); - output.shouldContain("java.base"); - output.shouldContain("exports java.lang"); - assertTrue(output.getExitValue() == 0); - } - - - @Test - public void testListTwoModules() throws Exception { - OutputAnalyzer output - = executeTestJava("--list-modules", "java.base,java.xml") - .outputTo(System.out) - .errorTo(System.out); - output.shouldContain("java.base"); - output.shouldContain("exports java.lang"); - output.shouldContain("java.xml"); - output.shouldContain("exports javax.xml"); - assertTrue(output.getExitValue() == 0); - } - - - @Test - public void testListUnknownModule() throws Exception { - OutputAnalyzer output - = executeTestJava("--list-modules", "java.rhubarb") - .outputTo(System.out) - .errorTo(System.out); - output.shouldNotContain("java.base"); - output.shouldContain("java.rhubarb not observable"); - assertTrue(output.getExitValue() == 0); - } - - @Test public void testListWithModulePath() throws Exception { - OutputAnalyzer output - = executeTestJava("--module-path", MODS_DIR.toString(), "--list-modules") - .outputTo(System.out) - .errorTo(System.out); - output.shouldContain("java.base"); - output.shouldContain("m1"); - assertTrue(output.getExitValue() == 0); + exec("--list-modules", "--module-path", MODS_DIR.toString()) + .shouldContain("java.base") + .shouldContain("m1") + .shouldHaveExitValue(0); } - @Test public void testListWithUpgradeModulePath() throws Exception { - OutputAnalyzer output - = executeTestJava("--upgrade-module-path", UPGRADEMODS_DIR.toString(), - "--list-modules", "java.transaction") - .outputTo(System.out) - .errorTo(System.out); - output.shouldContain("exports javax.transaction.atomic"); - assertTrue(output.getExitValue() == 0); + String dir = UPGRADEMODS_DIR.toString(); + exec("--list-modules", "--upgrade-module-path", dir) + .shouldContain(UPGRADEMODS_DIR.toString()) + .shouldHaveExitValue(0); } - @Test public void testListWithLimitMods1() throws Exception { - OutputAnalyzer output - = executeTestJava("--limit-modules", "java.management.rmi", "--list-modules") - .outputTo(System.out) - .errorTo(System.out); - output.shouldContain("java.rmi"); - output.shouldContain("java.base"); - output.shouldNotContain("java.scripting"); - assertTrue(output.getExitValue() == 0); + exec("--limit-modules", "java.management.rmi", "--list-modules") + .shouldContain("java.rmi") + .shouldContain("java.base") + .shouldNotContain("java.scripting") + .shouldHaveExitValue(0); } - @Test public void testListWithLimitMods2() throws Exception { - OutputAnalyzer output - = executeTestJava("--module-path", MODS_DIR.toString(), - "--limit-modules", "java.management", - "--list-modules") - .outputTo(System.out) - .errorTo(System.out); - output.shouldContain("java.base"); - output.shouldNotContain("m1"); - assertTrue(output.getExitValue() == 0); + exec("--list-modules", + "--module-path", MODS_DIR.toString(), + "--limit-modules", "java.management") + .shouldContain("java.base") + .shouldNotContain("m1") + .shouldHaveExitValue(0); } - /** * java -version --list-modules => should print version and exit */ @Test public void testListWithPrintVersion1() throws Exception { - OutputAnalyzer output - = executeTestJava("-version", "--list-modules") - .outputTo(System.out) - .errorTo(System.out); - output.shouldNotContain("java.base"); - output.shouldContain("Runtime Environment"); - assertTrue(output.getExitValue() == 0); + exec("-version", "--list-modules") + .shouldNotContain("java.base") + .shouldContain("Runtime Environment") + .shouldHaveExitValue(0); } - /** * java --list-modules -version => should list modules and exit */ @Test public void testListWithPrintVersion2() throws Exception { - OutputAnalyzer output - = executeTestJava("--list-modules", "-version") + exec("--list-modules", "-version") + .shouldContain("java.base") + .shouldNotContain("Runtime Environment") + .shouldHaveExitValue(0); + } + + /** + * java args... returning the OutputAnalyzer to analyzer the output + */ + private OutputAnalyzer exec(String... args) throws Exception { + return ProcessTools.executeTestJava(args) .outputTo(System.out) .errorTo(System.out); - output.shouldContain("java.base"); - output.shouldNotContain("Runtime Environment"); - assertTrue(output.getExitValue() == 0); } } diff --git a/jdk/test/tools/launcher/modules/listmods/src/java.transaction/module-info.java b/jdk/test/tools/launcher/modules/listmods/src/java.transaction/module-info.java index d1a268c6ded..95ddcb75f4f 100644 --- a/jdk/test/tools/launcher/modules/listmods/src/java.transaction/module-info.java +++ b/jdk/test/tools/launcher/modules/listmods/src/java.transaction/module-info.java @@ -23,5 +23,4 @@ module java.transaction { exports javax.transaction; - exports javax.transaction.atomic; } diff --git a/jdk/test/tools/launcher/modules/patch/basic/PatchTest.java b/jdk/test/tools/launcher/modules/patch/basic/PatchTest.java index 968336ae8aa..15457cf7664 100644 --- a/jdk/test/tools/launcher/modules/patch/basic/PatchTest.java +++ b/jdk/test/tools/launcher/modules/patch/basic/PatchTest.java @@ -105,22 +105,24 @@ public class PatchTest { MODS_DIR.resolve("test")); assertTrue(compiled, "classes did not compile"); - // javac -Xmodule:$MODULE -d patches1/$MODULE patches1/$MODULE/** + // javac --patch-module $MODULE=patches1/$MODULE -d patches1/$MODULE patches1/$MODULE/** // jar cf patches/$MODULE-1.jar -C patches1/$MODULE . for (Path src : Files.newDirectoryStream(SRC1_DIR)) { Path output = PATCHES1_DIR.resolve(src.getFileName()); String mn = src.getFileName().toString(); - compiled = CompilerUtils.compile(src, output, "-Xmodule:" + mn); + compiled = CompilerUtils.compile(src, output, + "--patch-module", mn + "=" + src.toString()); assertTrue(compiled, "classes did not compile"); JarUtils.createJarFile(PATCHES_DIR.resolve(mn + "-1.jar"), output); } - // javac -Xmodule:$MODULE -d patches2/$MODULE patches2/$MODULE/** + // javac --patch-module $MODULE=patches2/$MODULE -d patches2/$MODULE patches2/$MODULE/** // jar cf patches/$MODULE-2.jar -C patches2/$MODULE . for (Path src : Files.newDirectoryStream(SRC2_DIR)) { Path output = PATCHES2_DIR.resolve(src.getFileName()); String mn = src.getFileName().toString(); - compiled = CompilerUtils.compile(src, output, "-Xmodule:" + mn); + compiled = CompilerUtils.compile(src, output, + "--patch-module", mn + "=" + src.toString()); assertTrue(compiled, "classes did not compile"); JarUtils.createJarFile(PATCHES_DIR.resolve(mn + "-2.jar"), output); } diff --git a/jdk/test/tools/launcher/modules/patch/basic/PatchTestWarningError.java b/jdk/test/tools/launcher/modules/patch/basic/PatchTestWarningError.java index 711bedf8e3a..2d5b14bb858 100644 --- a/jdk/test/tools/launcher/modules/patch/basic/PatchTestWarningError.java +++ b/jdk/test/tools/launcher/modules/patch/basic/PatchTestWarningError.java @@ -93,20 +93,22 @@ public class PatchTestWarningError { MODS_DIR.resolve("test")); assertTrue(compiled, "classes did not compile"); - // javac -Xmodule:$MODULE -d patches1/$MODULE patches1/$MODULE/** + // javac --patch-module $MODULE=patches1/$MODULE -d patches1/$MODULE patches1/$MODULE/** Path src = SRC1_DIR.resolve("java.base"); Path output = PATCHES1_DIR.resolve(src.getFileName()); Files.createDirectories(output); String mn = src.getFileName().toString(); - compiled = CompilerUtils.compile(src, output, "-Xmodule:" + mn); + compiled = CompilerUtils.compile(src, output, + "--patch-module", mn + "=" + src.toString()); assertTrue(compiled, "classes did not compile"); - // javac -Xmodule:$MODULE -d patches2/$MODULE patches2/$MODULE/** + // javac --patch-module $MODULE=patches2/$MODULE -d patches2/$MODULE patches2/$MODULE/** src = SRC2_DIR.resolve("java.base"); output = PATCHES2_DIR.resolve(src.getFileName()); Files.createDirectories(output); mn = src.getFileName().toString(); - compiled = CompilerUtils.compile(src, output, "-Xmodule:" + mn); + compiled = CompilerUtils.compile(src, output, + "--patch-module", mn + "=" + src.toString()); assertTrue(compiled, "classes did not compile"); } @@ -177,7 +179,7 @@ public class PatchTestWarningError { "-m", "test/jdk.test.Main", arg) .outputTo(System.out) .errorTo(System.out) - .shouldContain("WARNING: Unknown module: DoesNotExist specified in --patch-module") + .shouldContain("WARNING: Unknown module: DoesNotExist specified to --patch-module") .getExitValue(); assertTrue(exitValue == 0); diff --git a/jdk/test/tools/launcher/modules/patch/basic/src/test/jdk/test/Main.java b/jdk/test/tools/launcher/modules/patch/basic/src/test/jdk/test/Main.java index f274a17ad2a..e23e38d2fba 100644 --- a/jdk/test/tools/launcher/modules/patch/basic/src/test/jdk/test/Main.java +++ b/jdk/test/tools/launcher/modules/patch/basic/src/test/jdk/test/Main.java @@ -28,8 +28,6 @@ package jdk.test; -import java.lang.reflect.Module; - public class Main { public static void main(String[] args) throws Exception { diff --git a/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java b/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java index 9a5c84cad99..4fa50c5b697 100644 --- a/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java +++ b/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -23,9 +23,8 @@ /* * @test - * @bug 8157068 - * @summary Patch java.base and user module with Hashes attribute tied with - * other module. + * @bug 8157068 8177844 + * @summary Patch java.base and user module with ModuleHashes attribute * @library /lib/testlibrary * @modules jdk.compiler * @build CompilerUtils @@ -52,13 +51,13 @@ public class PatchSystemModules { private static final String JAVA_HOME = System.getProperty("java.home"); private static final Path TEST_SRC = Paths.get(System.getProperty("test.src")); - private static final Path PATCH_SRC_DIR = TEST_SRC.resolve("src1"); private static final Path JMODS = Paths.get(JAVA_HOME, "jmods"); private static final Path MODS_DIR = Paths.get("mods"); private static final Path JARS_DIR = Paths.get("jars"); private static final Path PATCH_DIR = Paths.get("patches"); private static final Path IMAGE = Paths.get("image"); + private static final Path NEW_M1_JAR = JARS_DIR.resolve("new_m1.jar"); private static final String JAVA_BASE = "java.base"; private final String[] modules = new String[] { "m1", "m2" }; @@ -66,6 +65,8 @@ public class PatchSystemModules { @BeforeTest private void setup() throws Throwable { Path src = TEST_SRC.resolve("src"); + Path src1 = TEST_SRC.resolve("src1"); + for (String name : modules) { assertTrue(CompilerUtils.compile(src.resolve(name), MODS_DIR, @@ -73,19 +74,36 @@ public class PatchSystemModules { } // compile patched source - assertTrue(CompilerUtils.compile(PATCH_SRC_DIR.resolve(JAVA_BASE), + String patchDir = src1.resolve(JAVA_BASE).toString(); + assertTrue(CompilerUtils.compile(src1.resolve(JAVA_BASE), PATCH_DIR.resolve(JAVA_BASE), - "-Xmodule:java.base")); - assertTrue(CompilerUtils.compile(PATCH_SRC_DIR.resolve("m2"), + "--patch-module", "java.base=" + patchDir)); + assertTrue(CompilerUtils.compile(src1.resolve("m2"), PATCH_DIR.resolve("m2"))); + createJars(); + // create an image with only m1 and m2 if (Files.exists(JMODS)) { // create an image with m1,m2 createImage(); } + + // compile a different version of m1 + Path tmp = Paths.get("tmp"); + assertTrue(CompilerUtils.compile(src1.resolve("m1"), tmp, + "--module-path", MODS_DIR.toString(), + "--module-source-path", src1.toString())); + + // package new_m1.jar + jar("--create", + "--file=" + NEW_M1_JAR.toString(), + "-C", tmp.resolve("m1").toString(), "."); } + /* + * Test patching system module and user module on module path + */ @Test public void test() throws Throwable { Path patchedJavaBase = PATCH_DIR.resolve(JAVA_BASE); @@ -106,6 +124,9 @@ public class PatchSystemModules { "-m", "m1/p1.Main", "2"); } + /* + * Test --patch-module on a custom image + */ @Test public void testImage() throws Throwable { if (Files.notExists(JMODS)) @@ -124,27 +145,49 @@ public class PatchSystemModules { "-m", "m1/p1.Main", "2"); } + /* + * Test a module linked in a system hashed in ModuleHashes attribute + * cannot be upgraded + */ @Test - public void upgradeTiedModule() throws Throwable { + public void upgradeHashedModule() throws Throwable { if (Files.notExists(JMODS)) return; - Path m1 = MODS_DIR.resolve("m1.jar"); - - // create another m1.jar - jar("--create", - "--file=" + m1.toString(), - "-C", MODS_DIR.resolve("m1").toString(), "."); - // Fail to upgrade m1.jar with mismatched hash runTestWithExitCode(getJava(IMAGE), - "--upgrade-module-path", m1.toString(), + "--upgrade-module-path", NEW_M1_JAR.toString(), "-m", "m1/p1.Main"); + // test when SystemModules fast path is not enabled, i.e. exploded image runTestWithExitCode(getJava(IMAGE), "--patch-module", "java.base=" + PATCH_DIR.resolve(JAVA_BASE), - "--upgrade-module-path", m1.toString(), - "-m", "m1/p1.Main", "1"); + "--upgrade-module-path", NEW_M1_JAR.toString(), + "-m", "m1/p1.Main"); + } + + /* + * Test a module linked in a system hashed in ModuleHashes attribute + * cannot be upgraded combining with --patch-module and --upgrade-module-path + */ + @Test + public void patchHashedModule() throws Throwable { + if (Files.notExists(JMODS)) + return; + + // --patch-module does not disable hash check. + // Test that a hashed module cannot be upgraded. + runTestWithExitCode(getJava(IMAGE), + "--patch-module", "m1=.jar", + "--upgrade-module-path", NEW_M1_JAR.toString(), + "-m", "m1/p1.Main"); + + // test when SystemModules fast path is not enabled, i.e. exploded image + runTestWithExitCode(getJava(IMAGE), + "--patch-module", "java.base=" + PATCH_DIR.resolve(JAVA_BASE), + "--patch-module", "m1=.jar", + "--upgrade-module-path", NEW_M1_JAR.toString(), + "-m", "m1/p1.Main"); } private void runTestWithExitCode(String... options) throws Throwable { @@ -170,9 +213,8 @@ public class PatchSystemModules { assertTrue(exitValue == 0); } - static void createImage() throws Throwable { + static void createJars() throws Throwable { FileUtils.deleteFileTreeUnchecked(JARS_DIR); - FileUtils.deleteFileTreeUnchecked(IMAGE); Files.createDirectories(JARS_DIR); Path m1 = JARS_DIR.resolve("m1.jar"); @@ -188,7 +230,10 @@ public class PatchSystemModules { "--module-path", JARS_DIR.toString(), "--hash-modules", "m1", "-C", MODS_DIR.resolve("m2").toString(), "."); + } + static void createImage() throws Throwable { + FileUtils.deleteFileTreeUnchecked(IMAGE); String mpath = JARS_DIR.toString() + File.pathSeparator + JMODS.toString(); execTool("jlink", "--module-path", mpath, diff --git a/jdk/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java index a774fc7427f..a1399123c2e 100644 --- a/jdk/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java +++ b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java @@ -23,6 +23,10 @@ package jdk.internal.module; +import java.util.Collections; +import java.util.Map; +import java.util.Set; + /* * Test --patch-module java.base=jdk/modules/java.base to override * java.base with an exploded image @@ -30,7 +34,17 @@ package jdk.internal.module; public final class SystemModules { public static final String[] MODULE_NAMES = new String[0]; + public static int PACKAGES_IN_BOOT_LAYER = 1024; + public static boolean hasSplitPackages() { return true; } + + public static Map> concealedPackagesToOpen() { + return Collections.emptyMap(); + } + + public static Map> exportedPackagesToOpen() { + return Collections.emptyMap(); + } } diff --git a/jdk/test/tools/launcher/modules/patch/systemmodules/src1/m1/module-info.java b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/m1/module-info.java new file mode 100644 index 00000000000..25fcf4211ab --- /dev/null +++ b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/m1/module-info.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m1 { + requires m2; +} diff --git a/jdk/test/tools/launcher/modules/patch/systemmodules/src1/m1/p1/Main.java b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/m1/p1/Main.java new file mode 100644 index 00000000000..158a51869b0 --- /dev/null +++ b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/m1/p1/Main.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p1; + +public class Main { + public static void main(String[] args) throws Exception { + throw new RuntimeException("should not reach here"); + } +} diff --git a/jdk/test/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java b/jdk/test/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java new file mode 100644 index 00000000000..0d2a1c4c3ed --- /dev/null +++ b/jdk/test/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @modules jdk.jdeps jdk.zipfs + * @library /lib/testlibrary + * @build ShowModuleResolutionTest jdk.testlibrary.* + * @run testng ShowModuleResolutionTest + * @summary Basic test for java --show-module-resolution + */ + +import jdk.testlibrary.ProcessTools; + +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +@Test +public class ShowModuleResolutionTest { + + /** + * Test that the resolution does not bind any services + */ + private void expectJavaBase(String... args) throws Exception { + int exitValue = ProcessTools.executeTestJava(args) + .outputTo(System.out) + .errorTo(System.out) + .stdoutShouldContain("root java.base") + .stdoutShouldNotContain("java.base binds") + .getExitValue(); + assertTrue(exitValue == 0); + } + + /** + * Test that the resolution binds services that resolves additional + * modules + */ + private void expectProviders(String... args) throws Exception { + int exitValue = ProcessTools.executeTestJava(args) + .outputTo(System.out) + .errorTo(System.out) + .stdoutShouldContain("root java.base") + .stdoutShouldContain("root java.compiler") + .stdoutShouldContain("root jdk.compiler") + .stdoutShouldContain("root java.compiler") + .stdoutShouldContain("jdk.compiler requires java.compiler") + .stdoutShouldContain("java.base binds jdk.compiler") + .stdoutShouldContain("java.base binds jdk.jdeps") + .stdoutShouldContain("java.base binds jdk.zipfs") + .stdoutShouldContain("java.compiler binds jdk.compiler") + .stdoutShouldContain("jdk.jdeps requires jdk.compiler") + .getExitValue(); + assertTrue(exitValue == 0); + } + + public void test() throws Exception { + expectJavaBase("--show-module-resolution", + "--limit-modules", "java.base", + "-version"); + expectProviders("--show-module-resolution", + "--limit-modules", "java.base,jdk.jdeps,jdk.zipfs", + "-version"); + } +} diff --git a/jdk/test/tools/launcher/modules/upgrademodulepath/src/test/jdk/test/Main.java b/jdk/test/tools/launcher/modules/upgrademodulepath/src/test/jdk/test/Main.java index e5540aded8b..b6ab2656a45 100644 --- a/jdk/test/tools/launcher/modules/upgrademodulepath/src/test/jdk/test/Main.java +++ b/jdk/test/tools/launcher/modules/upgrademodulepath/src/test/jdk/test/Main.java @@ -24,7 +24,6 @@ package jdk.test; import java.lang.module.ModuleReference; -import java.lang.reflect.Layer; import java.net.URI; import javax.enterprise.context.Scope; @@ -53,7 +52,7 @@ public class Main { // javax.transaction should be found in boot layer. ModuleReference ref = - Layer.boot().configuration().findModule(TRANSACTION_MODULE).get().reference(); + ModuleLayer.boot().configuration().findModule(TRANSACTION_MODULE).get().reference(); // check uri of java.transaction found on the upgrade module path. URI uri = ref.location().get(); System.out.println("uri: " + uri); diff --git a/jdk/test/tools/launcher/modules/validate/ValidateModulesTest.java b/jdk/test/tools/launcher/modules/validate/ValidateModulesTest.java new file mode 100644 index 00000000000..668e4e48b4a --- /dev/null +++ b/jdk/test/tools/launcher/modules/validate/ValidateModulesTest.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @modules java.xml + * @library /lib/testlibrary + * @build ValidateModulesTest JarUtils jdk.testlibrary.* + * @run testng ValidateModulesTest + * @summary Basic test for java --validate-modules + */ + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; + +import jdk.testlibrary.ProcessTools; +import jdk.testlibrary.OutputAnalyzer; + +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +@Test +public class ValidateModulesTest { + + /** + * Test that the system modules validate. + */ + public void testSystemModules() throws Exception { + run("--validate-modules") + .stdoutShouldContain("java.base") + .stdoutShouldContain("java.xml") + .shouldHaveExitValue(0); + } + + /** + * Test an automatic module on the module path with classes in the same + * package as a system module. + */ + public void testPackageConflict() throws Exception { + Path tmpdir = Files.createTempDirectory("tmp"); + + Path classes = Files.createDirectory(tmpdir.resolve("classes")); + touch(classes, "javax/xml/XMLConstants.class"); + touch(classes, "javax/xml/parsers/SAXParser.class"); + + Path lib = Files.createDirectory(tmpdir.resolve("lib")); + JarUtils.createJarFile(lib.resolve("xml.jar"), classes); + + int exitValue = run("-p", lib.toString(), "--validate-modules") + .shouldContain("xml automatic") + .shouldContain("conflicts with module java.xml") + .getExitValue(); + assertTrue(exitValue != 0); + + } + + /** + * Test two modules with the same name in a directory. + */ + public void testDuplicateModule() throws Exception { + Path tmpdir = Files.createTempDirectory("tmp"); + + Path classes = Files.createDirectory(tmpdir.resolve("classes")); + touch(classes, "org/foo/Bar.class"); + + Path lib = Files.createDirectory(tmpdir.resolve("lib")); + JarUtils.createJarFile(lib.resolve("foo-1.0.jar"), classes); + JarUtils.createJarFile(lib.resolve("foo-2.0.jar"), classes); + + int exitValue = run("-p", lib.toString(), "--validate-modules") + .shouldContain("contains same module") + .getExitValue(); + assertTrue(exitValue != 0); + } + + /** + * Test two modules with the same name in different directories. + */ + public void testShadowed() throws Exception { + Path tmpdir = Files.createTempDirectory("tmp"); + + Path classes = Files.createDirectory(tmpdir.resolve("classes")); + touch(classes, "org/foo/Bar.class"); + + Path lib1 = Files.createDirectory(tmpdir.resolve("lib1")); + JarUtils.createJarFile(lib1.resolve("foo-1.0.jar"), classes); + + Path lib2 = Files.createDirectory(tmpdir.resolve("lib2")); + JarUtils.createJarFile(lib2.resolve("foo-2.0.jar"), classes); + + run("-p", lib1 + File.pathSeparator + lib2, "--validate-modules") + .shouldContain("shadowed by") + .shouldHaveExitValue(0); + } + + /** + * Runs the java launcher with the given arguments. + */ + private OutputAnalyzer run(String... args) throws Exception { + return ProcessTools.executeTestJava(args) + .outputTo(System.out) + .errorTo(System.out); + } + + /** + * Creates a file relative the given directory. + */ + private void touch(Path dir, String relPath) throws IOException { + Path file = dir.resolve(relPath.replace('/', File.separatorChar)); + Files.createDirectories(file.getParent()); + Files.createFile(file); + } +} diff --git a/jdk/test/tools/pack200/MultiRelease.java b/jdk/test/tools/pack200/MultiRelease.java index d5e0438544d..491c09c34c5 100644 --- a/jdk/test/tools/pack200/MultiRelease.java +++ b/jdk/test/tools/pack200/MultiRelease.java @@ -12,7 +12,7 @@ * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * - r You should have received a copy of the GNU General Public License version + * 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. * diff --git a/jdk/test/tools/pack200/pack200-verifier/src/xmlkit/ClassReader.java b/jdk/test/tools/pack200/pack200-verifier/src/xmlkit/ClassReader.java index 97e5f767b6e..719f91b08c7 100644 --- a/jdk/test/tools/pack200/pack200-verifier/src/xmlkit/ClassReader.java +++ b/jdk/test/tools/pack200/pack200-verifier/src/xmlkit/ClassReader.java @@ -1542,9 +1542,7 @@ class AttributeVisitor implements Attribute.Visitor { @Override public Element visitModuleTarget(ModuleTarget_attribute attr, Element p) { Element e = new Element(x.getCpString(attr.attribute_name_index)); - e.add(x.getCpString(attr.os_name_index)); - e.add(x.getCpString(attr.os_arch_index)); - e.add(x.getCpString(attr.os_version_index)); + e.add(x.getCpString(attr.target_platform_index)); e.trimToSize(); p.add(e); return null; diff --git a/make/Bundles.gmk b/make/Bundles.gmk index 1791818abc7..81321550e23 100644 --- a/make/Bundles.gmk +++ b/make/Bundles.gmk @@ -183,29 +183,17 @@ ifneq ($(filter product-bundles, $(MAKECMDGOALS)), ) $(JDK_SYMBOLS_EXCLUDE_PATTERN) \ $(JDK_EXTRA_EXCLUDES) \ $(SYMBOLS_EXCLUDE_PATTERN) \ - $(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \ + $(JDK_IMAGE_HOMEDIR)/demo/% \ , \ $(ALL_JDK_FILES) \ ) - DEMOS_BUNDLE_FILES := \ - $(filter-out \ - $(JDK_SYMBOLS_EXCLUDE_PATTERN) \ - $(SYMBOLS_EXCLUDE_PATTERN) \ - , \ - $(filter \ - $(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \ - $(JDK_IMAGE_HOMEDIR)/release \ - , \ - $(ALL_JDK_FILES) \ - ) \ - ) JDK_SYMBOLS_BUNDLE_FILES := \ $(filter \ $(JDK_SYMBOLS_EXCLUDE_PATTERN) \ $(SYMBOLS_EXCLUDE_PATTERN) \ , \ $(filter-out \ - $(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \ + $(JDK_IMAGE_HOMEDIR)/demo/% \ , \ $(ALL_JDK_FILES) \ ) \ @@ -271,14 +259,6 @@ ifneq ($(filter product-bundles, $(MAKECMDGOALS)), ) PRODUCT_TARGETS += $(BUILD_JRE_SYMBOLS_BUNDLE) - $(eval $(call SetupBundleFile, BUILD_DEMOS_BUNDLE, \ - BUNDLE_NAME := $(DEMOS_BUNDLE_NAME), \ - FILES := $(DEMOS_BUNDLE_FILES), \ - BASE_DIRS := $(JDK_IMAGE_DIR), \ - SUBDIR := $(JDK_BUNDLE_SUBDIR), \ - )) - - PRODUCT_TARGETS += $(BUILD_DEMOS_BUNDLE) endif ################################################################################ diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index 0b54c856da4..090434a1607 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -85,7 +85,7 @@ endif ################################################################################ -java.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' +java.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' ################################################################################ @@ -95,7 +95,8 @@ java.datatransfer_COPY := flavormap.properties ################################################################################ java.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference \ - '-Xdoclint/package:java.*,javax.*' -Xlint:exports + '-Xdoclint/package:java.*,javax.*' -Xlint:exports \ + --doclint-format html4 java.desktop_COPY := .gif .png .wav .txt .xml .css .pf java.desktop_CLEAN := iio-plugin.properties cursors.properties @@ -247,7 +248,7 @@ java.management_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint ################################################################################ -java.management.rmi_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:javax.*' +java.management.rmi_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:javax.*' ################################################################################ @@ -461,14 +462,30 @@ jdk.internal.jvmstat_COPY := aliasmap # -parameters provides method's parameters information in class file, # JVMCI compilers make use of that information for various sanity checks. # Don't use Indy strings concatenation to have good JVMCI startup performance. +# The exports are needed since JVMCI is dynamically exported (see +# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo). -jdk.vm.ci_ADD_JAVAC_FLAGS := -parameters -Xlint:-exports -XDstringConcat=inline +jdk.internal.vm.ci_ADD_JAVAC_FLAGS := -parameters -Xlint:-exports -XDstringConcat=inline ################################################################################ -jdk.vm.compiler_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline +jdk.internal.vm.compiler_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=jdk.internal.vm.compiler \ + # -jdk.vm.compiler_EXCLUDES += \ +jdk.internal.vm.compiler_EXCLUDES += \ org.graalvm.compiler.core.match.processor \ org.graalvm.compiler.nodeinfo.processor \ org.graalvm.compiler.options.processor \ @@ -502,7 +519,27 @@ jdk.vm.compiler_EXCLUDES += \ ################################################################################ -jdk.aot_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline +# -parameters provides method's parameters information in class file, +# JVMCI compilers make use of that information for various sanity checks. +# Don't use Indy strings concatenation to have good JAOTC startup performance. +# The exports are needed since JVMCI is dynamically exported (see +# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo). + +jdk.aot_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler,jdk.aot \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=jdk.internal.vm.compiler,jdk.aot \ + # ################################################################################ @@ -557,16 +594,16 @@ MODULESOURCEPATH := $(call GetModuleSrcPath) # Add imported modules to the modulepath MODULEPATH := $(call PathList, $(IMPORT_MODULES_CLASSES)) -ifeq ($(MODULE), jdk.vm.ci) - ## WORKAROUND jdk.vm.ci source structure issue +ifeq ($(MODULE), jdk.internal.vm.ci) + ## WORKAROUND jdk.internal.vm.ci source structure issue JVMCI_MODULESOURCEPATH := $(MODULESOURCEPATH) \ $(subst /$(MODULE)/,/*/, $(filter-out %processor/src, \ - $(wildcard $(HOTSPOT_TOPDIR)/src/jdk.vm.ci/share/classes/*/src))) + $(wildcard $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes/*/src))) MODULESOURCEPATH := $(call PathList, $(JVMCI_MODULESOURCEPATH)) endif -ifeq ($(MODULE), jdk.vm.compiler) - ## WORKAROUND jdk.vm.compiler source structure issue +ifeq ($(MODULE), jdk.internal.vm.compiler) + ## WORKAROUND jdk.internal.vm.compiler source structure issue VM_COMPILER_MODULESOURCEPATH := $(MODULESOURCEPATH) \ $(subst /$(MODULE)/,/*/, $(filter-out %processor/src %test/src %jtt/src %bench/src %microbenchmarks/src, \ $(wildcard $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes/*/src))) diff --git a/make/CreateJmods.gmk b/make/CreateJmods.gmk index fd502f116d9..299198b9008 100644 --- a/make/CreateJmods.gmk +++ b/make/CreateJmods.gmk @@ -105,10 +105,10 @@ ifeq ($(MODULE), java.base) DEPS += $(patsubst %, $(JMODS_DIR)/%.jmod, \ $(filter-out java.base $(ALL_UPGRADEABLE_MODULES), $(call FindAllModules))) - EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(ALL_UPGRADEABLE_MODULES)))) + EXCLUDE_PATTERN := $(strip $(subst $(SPACE),$$|,$(strip $(ALL_UPGRADEABLE_MODULES)))) JMOD_FLAGS += --module-path $(JMODS_DIR) \ - --hash-modules '^(?!$(EXCLUDE_PATTERN))' + --hash-modules '^(?!$(EXCLUDE_PATTERN)$$)' endif endif endif @@ -135,11 +135,9 @@ $(JMODS_DIR)/$(MODULE).jmod: $(DEPS) $(RM) $@ $(JMODS_TEMPDIR)/$(notdir $@) $(JMOD) create \ --module-version $(VERSION_SHORT) \ - --os-name $(REQUIRED_OS_NAME) \ - --os-arch $(OPENJDK_TARGET_CPU_LEGACY) \ - --os-version $(REQUIRED_OS_VERSION) \ + --target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \ --module-path $(JMODS_DIR) \ - --exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}' \ + --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}' \ $(JMOD_FLAGS) $(JMODS_TEMPDIR)/$(notdir $@) $(MV) $(JMODS_TEMPDIR)/$(notdir $@) $@ diff --git a/make/Docs.gmk b/make/Docs.gmk new file mode 100644 index 00000000000..b997881805c --- /dev/null +++ b/make/Docs.gmk @@ -0,0 +1,566 @@ +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +default: all + +include $(SPEC) +include MakeBase.gmk +include Modules.gmk +include ProcessMarkdown.gmk +include ZipArchive.gmk +include $(JDK_TOPDIR)/make/Tools.gmk +include $(JDK_TOPDIR)/make/ModuleTools.gmk + +# This is needed to properly setup DOCS_MODULES. +$(eval $(call ReadImportMetaData)) + +################################################################################ +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, , Docs.gmk)) + +################################################################################ +# This file generates all documentation for OpenJDK. +# +# We will generate API documentation for two different selections of the source +# code: "Java SE", which contains just the modules covered by the top-level +# module java.se.ee, and "JDK", which covers all of Java SE and also all +# other available modules that should be documented, including imported modules, +# if any. +# +# We will also generate separate, free-standing specifications from either +# markdown or existing html files. +# + +################################################################################ +# Javadoc settings + +# On top of the sources that was used to compile the JDK, we need some +# extra java.rmi sources that are used just for javadoc. +MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \ + $(SUPPORT_OUTPUTDIR)/rmic/* $(JDK_TOPDIR)/src/*/share/doc/stub) + +# URLs +JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase9&id=homepage +BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/ +COPYRIGHT_URL := {@docroot}/../legal/copyright.html +LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java9speclicense.html +REDISTRIBUTION_URL := http://www.oracle.com/technetwork/java/redist-137594.html + +# In order to get a specific ordering it's necessary to specify the total +# ordering of tags as the tags are otherwise ordered in order of definition. +JAVADOC_TAGS := \ + -tag beaninfo:X \ + -tag revised:X \ + -tag since.unbundled:X \ + -tag spec:X \ + -tag specdefault:X \ + -tag Note:X \ + -tag ToDo:X \ + -tag 'apiNote:a:API Note:' \ + -tag 'implSpec:a:Implementation Requirements:' \ + -tag 'implNote:a:Implementation Note:' \ + -tag param \ + -tag return \ + -tag throws \ + -taglet build.tools.taglet.ModuleGraph \ + -tag since \ + -tag version \ + -tag serialData \ + -tag factory \ + -tag see \ + -tag 'jvms:a:See The Java™ Virtual Machine Specification:' \ + -tag 'jls:a:See The Java™ Language Specification:' \ + -taglet build.tools.taglet.ExtLink \ + -taglet build.tools.taglet.Incubating \ + -tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ + $(CUSTOM_JAVADOC_TAGS) \ + # + +# Which doclint checks to ignore +JAVADOC_DISABLED_DOCLINT := accessibility html missing syntax reference + +# The initial set of options for javadoc +JAVADOC_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \ + -serialwarn -encoding ISO-8859-1 -breakiterator -splitIndex --system none \ + -html5 -javafx --expand-requires transitive + +# Should we add DRAFT stamps to the generated javadoc? +ifeq ($(VERSION_IS_GA), true) + IS_DRAFT := false +else + IS_DRAFT := true +endif + +################################################################################ +# General text snippets + +FULL_COMPANY_NAME := Oracle and/or its affiliates +COMPANY_ADDRESS := 500 Oracle Parkway, Redwood Shores, CA 94065 USA + +JAVA_PLATFORM := Java Platform + +ifeq ($(IS_DRAFT), true) + DRAFT_MARKER_STR :=
                    DRAFT $(VERSION_STRING) + ifeq ($(VERSION_BUILD), 0) + DRAFT_MARKER_TITLE := [ad-hoc build] + else + DRAFT_MARKER_TITLE := [build $(VERSION_BUILD)] + endif + DRAFT_TEXT := This specification is not final and is subject to change. \ + Use is subject to
                    license terms. +endif + +JAVADOC_BOTTOM := \ + Report a bug or suggest an enhancement
                    \ + For further API reference and developer documentation see the \ + Java SE \ + Documentation, which contains more detailed, \ + developer-targeted descriptions with conceptual overviews, definitions \ + of terms, workarounds, and working code examples.
                    \ + Java is a trademark or registered trademark of $(FULL_COMPANY_NAME) in \ + the US and other countries.
                    \ + Copyright \ + © 1993, $(COPYRIGHT_YEAR), $(FULL_COMPANY_NAME), \ + $(COMPANY_ADDRESS).
                    All rights reserved. \ + Use is subject to license terms and the \ + documentation redistribution policy. \ + $(DRAFT_MARKER_STR) + + +JAVADOC_TOP := \ +
                    $(DRAFT_TEXT)
                    + +################################################################################ +# JDK javadoc titles/text snippets + +JDK_SHORT_NAME := Java SE $(VERSION_SPECIFICATION) & JDK $(VERSION_SPECIFICATION) +JDK_LONG_NAME := Java® Platform, Standard Edition \ + & Java Development Kit + +################################################################################ +# Java SE javadoc titles/text snippets + +JAVASE_SHORT_NAME := Java SE $(VERSION_SPECIFICATION) +JAVASE_LONG_NAME := Java® Platform, Standard Edition + +################################################################################ +# Functions + +# Helper function for creating a png file from a dot file generated by the +# GenGraphs tool. +# param 1: SetupJavadocGeneration namespace ($1) +# param 2: module name +# +define setup_gengraph_dot_to_png + $1_$2_DOT_SRC := $$($1_GENGRAPHS_DIR)/$2.dot + $1_$2_PNG_TARGET := $$($1_TARGET_DIR)/$2-graph.png + + # For each module needing a graph, create a png file from the dot file + # generated by the GenGraphs tool and store it in the target dir. + $$($1_$2_PNG_TARGET): $$($1_GENGRAPHS_MARKER) + $$(call MakeDir, $$(@D)) + $$(call ExecuteWithLog, $$($1_$2_DOT_SRC), \ + $$(DOT) -Tpng -o $$($1_$2_PNG_TARGET) $$($1_$2_DOT_SRC)) + + $1_MODULEGRAPH_TARGETS += $$($1_$2_PNG_TARGET) +endef + +# Helper function to create the overview.html file to use with the -overview +# javadoc option. +# Returns the filename as $1_OVERVIEW. +# +# param 1: SetupJavadocGeneration namespace ($1) +define create_overview_file + $1_OVERVIEW_TEXT := \ + \ + \ + # + ifneq ($$($1_GROUPS),) + $1_OVERVIEW_TEXT += \ +

                    This document is divided into \ + $$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) sections:

                    \ +
                    \ + # + $1_OVERVIEW_TEXT += $$(foreach g, $$($1_GROUPS), \ +
                    $$($$g_GROUP_NAME)
                    \ +
                    $$($$g_GROUP_DESCRIPTION)
                    \ + ) + $1_OVERVIEW_TEXT += \ +
                    \ + # + endif + $1_OVERVIEW_TEXT += \ + \ + # + + $1_OVERVIEW := $$(SUPPORT_OUTPUTDIR)/docs/$1-overview.html + + $1_OVERVIEW_VARDEPS_FILE := $$(call DependOnVariable, $1_OVERVIEW_TEXT, \ + $$($1_OVERVIEW).vardeps) + + $$($1_OVERVIEW): $$($1_OVERVIEW_VARDEPS_FILE) + $$(call LogInfo, Creating overview.html for $1) + $$(call MakeDir, $$(@D)) + $$(PRINTF) > $$@ '$$($1_OVERVIEW_TEXT)' +endef + +################################################################################ +# Setup make rules to create an API documentation collection, using javadoc and +# other tools if needed. +# +# Parameter 1 is the name of the rule. This name is used as variable prefix. +# Targets generated are returned as $1_JAVADOC_TARGETS and +# $1_MODULEGRAPH_TARGETS. Note that the index.html file will work as a "touch +# file" for all the magnitude of files that are generated by javadoc. +# +# Remaining parameters are named arguments. These include: +# MODULES - Modules to generate javadoc for +# GROUPS - Name of the groups to divide the modules into, if any +# SHORT_NAME - The short name of this documentation collection +# LONG_NAME - The long name of this documentation collection +# TARGET_DIR - Where to store the output +# +SetupApiDocsGeneration = $(NamedParamsMacroTemplate) +define SetupApiDocsGenerationBody + + # Figure out all modules, both specified and transitive indirect exports, that + # will be processed by javadoc. + $1_INDIRECT_EXPORTS := $$(call FindTransitiveIndirectDepsForModules, $$($1_MODULES)) + $1_ALL_MODULES := $$(sort $$($1_MODULES) $$($1_INDIRECT_EXPORTS)) + + ifeq ($$(ENABLE_FULL_DOCS), true) + # Tell the ModuleGraph taglet to generate html links to soon-to-be-created + # png files with module graphs. + $1_JAVA_ARGS += -DenableModuleGraph=true + endif + + # Always include tags and basic options + $1_OPTIONS := $$(JAVADOC_TAGS) $$(JAVADOC_OPTIONS) + + $1_OPTIONS += --module-source-path $$(MODULES_SOURCE_PATH) + $1_OPTIONS += --module $$(call CommaList, $$($1_MODULES)) + + # Create a string like "-Xdoclint:all,-syntax,-html,..." + $1_OPTIONS += -Xdoclint:all,$$(call CommaList, $$(addprefix -, \ + $$(JAVADOC_DISABLED_DOCLINT))) + + $1_DOC_TITLE := $$($1_LONG_NAME)
                    Version $$(VERSION_SPECIFICATION) API Specification + $1_WINDOW_TITLE := $$(subst &,&,$$($1_SHORT_NAME)) \ + $$(DRAFT_MARKER_TITLE) + ifeq ($(VERSION_IS_GA), true) # Workaround stylesheet bug + $1_HEADER_PAD := 14 + else + $1_HEADER_PAD := 9 + endif + $1_HEADER_TITLE :=
                    $$($1_SHORT_NAME) \ + $$(DRAFT_MARKER_STR)
                    + + $1_OPTIONS += -doctitle '$$($1_DOC_TITLE)' + $1_OPTIONS += -windowtitle '$$($1_WINDOW_TITLE)' + $1_OPTIONS += -header '$$($1_HEADER_TITLE)' + $1_OPTIONS += -bottom '$$(JAVADOC_BOTTOM)' + ifeq ($$(IS_DRAFT), true) + $1_OPTIONS += -top '$$(JAVADOC_TOP)' + endif + + # Do not store debug level options in VARDEPS. + ifneq ($$(LOG_LEVEL), trace) + $1_LOG_OPTION += -quiet + else + $1_LOG_OPTION += -verbose + endif + + # Generate the overview.html file. This will return the filename in + # $1_OVERVIEW. + $$(eval $$(call create_overview_file,$1)) + $1_OPTIONS += -overview $$($1_OVERVIEW) + + $$(foreach g, $$($1_GROUPS), \ + $$(eval $1_OPTIONS += -group "$$($$g_GROUP_NAME)" "$$($$g_GROUP_MODULES)") \ + ) + + $1_VARDEPS := $$($1_JAVA_ARGS) $$($1_OPTIONS) $$(MODULES_SOURCE_PATH) \ + $$($1_ALL_MODULES) + $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ + $$(SUPPORT_OUTPUTDIR)/docs/$1.vardeps) + + # Get a list of all files in all the source dirs for all included modules + $1_SOURCE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach module, \ + $$($1_ALL_MODULES), $$(call FindModuleSrcDirs, $$(module))))) + + # Javadoc creates a lot of files but use index.html as a marker + $$($1_TARGET_DIR)/index.html: $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) \ + $$($1_SOURCE_DEPS) $$($1_OVERVIEW) + $$(call LogWarn, Generating $1 javadoc for \ + $$(words $$($1_ALL_MODULES)) modules) + $$(call LogInfo, Javadoc modules: $$($1_ALL_MODULES)) + $$(call MakeDir, $$($1_TARGET_DIR)) + $$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/docs/$1, \ + $$(JAVA) -Djava.awt.headless=true $$($1_JAVA_ARGS) \ + $$(NEW_JAVADOC) -d $$($1_TARGET_DIR) \ + $$(JAVADOC_TAGS) $$($1_OPTIONS) $$($1_LOG_OPTION)) + + $1_JAVADOC_TARGETS := $$($1_TARGET_DIR)/index.html + + ifeq ($$(ENABLE_FULL_DOCS), true) + # We have asked ModuleGraph to generate links to png files. Now we must + # produce the png files. + + # Locate which modules has the @moduleGraph tag in their module-info.java + $1_MODULES_NEEDING_GRAPH := $$(strip $$(foreach m, $$($1_ALL_MODULES), \ + $$(if $$(shell $$(GREP) -e @moduleGraph \ + $$(wildcard $$(addsuffix /module-info.java, \ + $$(call FindModuleSrcDirs, $$m)))), \ + $$m) \ + )) + + # First we run the GenGraph tool. It will query the module structure of the + # running JVM and output .dot files for all existing modules. + GENGRAPHS_PROPS := \ + $$(JDK_TOPDIR)/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties + + $1_GENGRAPHS_DIR := $$(SUPPORT_OUTPUTDIR)/docs/$1-gengraphs + $1_GENGRAPHS_MARKER := $$($1_GENGRAPHS_DIR)/_gengraphs_run.marker + + $$($1_GENGRAPHS_MARKER): $$(BUILD_JIGSAW_TOOLS) $$(GENGRAPHS_PROPS) + $$(call LogInfo, Running gengraphs for $1 documentation) + $$(call MakeDir, $$($1_GENGRAPHS_DIR)) + $$(call ExecuteWithLog, $$($1_GENGRAPHS_DIR)/gengraphs, \ + $$(TOOL_GENGRAPHS) --spec --output $$($1_GENGRAPHS_DIR) \ + --dot-attributes $$(GENGRAPHS_PROPS) && \ + $$(TOUCH) $$($1_GENGRAPHS_MARKER)) + + # For each module needing a graph, create a png file from the dot file + # generated by the GenGraphs tool and store it in the target dir. + # They will depend on $1_GENGRAPHS_MARKER, and will be added to $1. + $$(foreach m, $$($1_MODULES_NEEDING_GRAPH), \ + $$(eval $$(call setup_gengraph_dot_to_png,$1,$$m)) \ + ) + endif +endef + +################################################################################ +# Setup generation of the JDK API documentation (javadoc + modulegraph) + +# Define the groups of the JDK API documentation +JavaSE_GROUP_NAME := Java SE +JavaSE_GROUP_MODULES := $(call ColonList, $(sort java.se.ee \ + $(call FindTransitiveIndirectDepsForModules, java.se.ee))) +JavaSE_GROUP_DESCRIPTION := \ + The Java Platform, Standard Edition (Java SE) APIs define the core Java \ + platform for general-purpose computing. These APIs are in modules whose \ + names start with {@code java}. \ + # +JDK_GROUPS += JavaSE + +JDK_GROUP_NAME := JDK +JDK_GROUP_MODULES := jdk.* +JDK_GROUP_DESCRIPTION := \ + The Java Development Kit (JDK) APIs are specific to the JDK and will not \ + necessarily be available in all implementations of the Java SE Platform. \ + These APIs are in modules whose names start with {@code jdk}. \ + # +JDK_GROUPS += JDK + +# If we are importing JavaFX, we need a JavaFX group. In an ideal world, this +# would have been abstracted away to a more proper generic handling of imported +# modules. +ifneq ($(findstring javafx., $(IMPORTED_MODULES)), ) + JavaFX_GROUP_NAME := JavaFX + JavaFX_GROUP_MODULES := javafx.* + JavaFX_GROUP_DESCRIPTION := \ + The JavaFX APIs define a set of user-interface controls, graphics, \ + media, and web packages for developing rich client applications. These \ + APIs are in modules whose names start with {@code javafx}. \ + # + JDK_GROUPS += JavaFX +endif + +# All modules to have docs generated by docs-jdk-api target +JDK_MODULES := $(sort $(DOCS_MODULES)) + +$(eval $(call SetupApiDocsGeneration, JDK_API, \ + MODULES := $(JDK_MODULES), \ + GROUPS := $(JDK_GROUPS), \ + SHORT_NAME := $(JDK_SHORT_NAME), \ + LONG_NAME := $(JDK_LONG_NAME), \ + TARGET_DIR := $(DOCS_OUTPUTDIR)/api, \ +)) + +# Targets generated are returned in JDK_API_JAVADOC_TARGETS and +# JDK_API_MODULEGRAPH_TARGETS. + +################################################################################ +# Setup generation of the Java SE API documentation (javadoc + modulegraph) + +# The Java SE module scope is just java.se.ee and its transitive indirect +# exports. +JAVASE_MODULES := java.se.ee + +$(eval $(call SetupApiDocsGeneration, JAVASE_API, \ + MODULES := $(JAVASE_MODULES), \ + SHORT_NAME := $(JAVASE_SHORT_NAME), \ + LONG_NAME := $(JAVASE_LONG_NAME), \ + TARGET_DIR := $(IMAGES_OUTPUTDIR)/javase-docs/api, \ +)) + +# Targets generated are returned in JAVASE_API_JAVADOC_TARGETS and +# JAVASE_API_MODULEGRAPH_TARGETS. + +################################################################################ + +JDK_INDEX_HTML := $(DOCS_OUTPUTDIR)/index.html + +JDK_INDEX_CONTENT := \ + \ + \ + \ + \ + \ + + +$(JDK_INDEX_HTML): + $(ECHO) '$(JDK_INDEX_CONTENT)' > $@ + +JDK_INDEX_TARGETS += $(JDK_INDEX_HTML) + +# Copy the global resources +GLOBAL_SPECS_RESOURCES_DIR := $(JDK_TOPDIR)/make/data/docs-resources/ +$(eval $(call SetupCopyFiles, COPY_GLOBAL_RESOURCES, \ + SRC := $(GLOBAL_SPECS_RESOURCES_DIR), \ + FILES := $(call CacheFind, $(GLOBAL_SPECS_RESOURCES_DIR)), \ + DEST := $(DOCS_OUTPUTDIR), \ +)) +JDK_INDEX_TARGETS += $(COPY_GLOBAL_RESOURCES) + +# Copy the legal notices distributed with the docs bundle +DOCS_LEGAL_NOTICES := jquery.md jszip.md pako.md +$(eval $(call SetupCopyFiles, COPY_DOCS_LEGAL_NOTICES, \ + SRC := $(LANGTOOLS_TOPDIR)/src/jdk.javadoc/share/legal, \ + FILES := $(DOCS_LEGAL_NOTICES), \ + DEST := $(DOCS_OUTPUTDIR)/legal, \ +)) +JDK_INDEX_TARGETS += $(COPY_DOCS_LEGAL_NOTICES) + +################################################################################ +# Copy JDK specs files + +# For all html documentation in $module/share/specs directories, copy it +# unmodified + +ALL_MODULES := $(call FindAllModules) +COPY_SPEC_FILTER := %.html %.gif %.jpg %.mib %.css + +$(foreach m, $(ALL_MODULES), \ + $(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \ + $(foreach d, $(SPECS_$m), \ + $(if $(filter $(COPY_SPEC_FILTER), $(call CacheFind, $d)), \ + $(eval $(call SetupCopyFiles, COPY_$m, \ + SRC := $d, \ + FILES := $(filter $(COPY_SPEC_FILTER), $(call CacheFind, $d)), \ + DEST := $(DOCS_OUTPUTDIR)/specs/, \ + )) \ + $(eval JDK_SPECS_TARGETS += $(COPY_$m)) \ + ) \ + ) \ +) + +ifeq ($(ENABLE_FULL_DOCS), true) + # For all markdown files in $module/share/specs directories, convert them to + # html. + + GLOBAL_SPECS_DEFAULT_CSS_FILE := $(DOCS_OUTPUTDIR)/resources/jdk-default.css + + $(foreach m, $(ALL_MODULES), \ + $(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \ + $(foreach d, $(SPECS_$m), \ + $(if $(filter %.md, $(call CacheFind, $d)), \ + $(eval $(call SetupProcessMarkdown, CONVERT_MARKDOWN_$m_$(patsubst $(TOPDIR)/%,%,$d), \ + SRC := $d, \ + FILES := $(filter %.md, $(call CacheFind, $d)), \ + DEST := $(DOCS_OUTPUTDIR)/specs/, \ + CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \ + )) \ + ) \ + $(eval JDK_SPECS_TARGETS += $(CONVERT_MARKDOWN_$m_$(patsubst $(TOPDIR)/%,%,$d))) \ + ) \ + ) +endif + +# Special treatment for generated documentation + +JDWP_PROTOCOL := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html +$(eval $(call SetupCopyFiles, COPY_JDWP_PROTOCOL, \ + FILES := $(JDWP_PROTOCOL), \ + DEST := $(DOCS_OUTPUTDIR)/specs/jdwp, \ +)) +JDK_SPECS_TARGETS += $(COPY_JDWP_PROTOCOL) + +# Get jvmti.html from the main jvm variant (all variants' jvmti.html are identical). +JVMTI_HTML := $(HOTSPOT_OUTPUTDIR)/variant-$(JVM_VARIANT_MAIN)/gensrc/jvmtifiles/jvmti.html +$(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \ + FILES := $(JVMTI_HTML), \ + DEST := $(DOCS_OUTPUTDIR)/specs, \ +)) +JDK_SPECS_TARGETS += $(COPY_JVMTI_HTML) + +################################################################################ +# Optional target which bundles all generated javadocs into a zip archive. + +JAVADOC_ZIP_NAME := jdk-$(VERSION_STRING)-docs.zip +JAVADOC_ZIP_FILE := $(OUTPUT_ROOT)/bundles/$(JAVADOC_ZIP_NAME) + +$(eval $(call SetupZipArchive, BUILD_JAVADOC_ZIP, \ + SRC := $(DOCS_OUTPUTDIR), \ + ZIP := $(JAVADOC_ZIP_FILE), \ + EXTRA_DEPS := $(JDK_API_JAVADOC_TARGETS) $(JDK_API_MODULEGRAPH_TARGETS) \ + $(JDK_SPECS_TARGETS), \ +)) + +ZIP_TARGETS += $(BUILD_JAVADOC_ZIP) + +################################################################################ + +docs-jdk-api-javadoc: $(JDK_API_JAVADOC_TARGETS) $(JDK_API_CUSTOM_TARGETS) + +docs-jdk-api-modulegraph: $(JDK_API_MODULEGRAPH_TARGETS) + +docs-javase-api-javadoc: $(JAVASE_API_JAVADOC_TARGETS) $(JAVASE_API_CUSTOM_TARGETS) + +docs-javase-api-modulegraph: $(JAVASE_API_MODULEGRAPH_TARGETS) + +docs-jdk-specs: $(JDK_SPECS_TARGETS) + +docs-jdk-index: $(JDK_INDEX_TARGETS) + +docs-zip: $(ZIP_TARGETS) + +all: docs-jdk-api-javadoc docs-jdk-api-modulegraph docs-javase-api-javadoc \ + docs-javase-api-modulegraph docs-jdk-specs docs-jdk-index docs-zip + +.PHONY: default all docs-jdk-api-javadoc docs-jdk-api-modulegraph \ + docs-javase-api-javadoc docs-javase-api-modulegraph docs-jdk-specs \ + docs-jdk-index docs-zip diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk index 43e388ddab4..60c80ea47ca 100644 --- a/make/GenerateLinkOptData.gmk +++ b/make/GenerateLinkOptData.gmk @@ -49,7 +49,7 @@ TARGETS += $(CLASSLIST_JAR) LINK_OPT_DIR := $(SUPPORT_OUTPUTDIR)/link_opt CLASSLIST_FILE := $(LINK_OPT_DIR)/classlist -JLI_TRACE_FILE := $(LINK_OPT_DIR)/jli_trace.out +JLI_TRACE_FILE := $(LINK_OPT_DIR)/default_jli_trace.txt # If an external buildjdk has been supplied, we don't build a separate interim # image, so just use the external build jdk instead. @@ -69,7 +69,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR) # The jli trace is created by the same recipe as classlist. By declaring these # dependencies, make will correctly rebuild both jli trace and classlist -# incrementally using the single recpie above. +# incrementally using the single recipe above. $(CLASSLIST_FILE): $(JLI_TRACE_FILE) $(JLI_TRACE_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR) @@ -83,6 +83,19 @@ $(eval $(call SetupCopyFiles, COPY_CLASSLIST, \ TARGETS += $(COPY_CLASSLIST) +# Copy the default_jli_trace.txt file into jdk.jlink +$(eval $(call SetupCopyFiles, COPY_JLI_TRACE, \ + FILES := $(JLI_TRACE_FILE), \ + DEST := $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jlink/internal/plugins, \ +)) + +# Because of the single recipe for jli trace and classlist above, the +# COPY_JLI_TRACE rule needs to explicitly add the classlist file as a +# prerequisite. +$(COPY_JLI_TRACE): $(CLASSLIST_FILE) + +TARGETS += $(COPY_JLI_TRACE) + ################################################################################ all: $(TARGETS) diff --git a/make/Help.gmk b/make/Help.gmk index bd10fa2ccb7..c9a06d291af 100644 --- a/make/Help.gmk +++ b/make/Help.gmk @@ -1,5 +1,5 @@ # -# 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 @@ -47,13 +47,15 @@ help: $(info $(_) # dependencies for the target. This is faster but may) $(info $(_) # result in incorrect build results!) $(info $(_) make docs # Create all docs) - $(info $(_) make docs-javadoc # Create just javadocs, depends on less than full docs) + $(info $(_) make docs-jdk-api # Create just JDK javadocs) $(info $(_) make profiles # Create complete jre compact profile images) $(info $(_) make bootcycle-images # Build images twice, second time with newly built JDK) $(info $(_) make install # Install the generated images locally) $(info $(_) make reconfigure # Rerun configure with the same arguments as last time) $(info $(_) make help # Give some help on using make) $(info $(_) make test # Run tests, default is all tests (see TEST below)) + $(info $(_) make run-test- # Run test, e.g. run-test-tier1) + $(info $(_) make run-test TEST= # Run test(s) given by TEST specification) $(info ) $(info Targets for cleaning) $(info $(_) make clean # Remove all files generated by make, but not those) @@ -95,6 +97,8 @@ help: $(info $(_) # method is 'auto', 'ignore' or 'fail' (default)) $(info $(_) make test TEST= # Only run the given test or tests, e.g.) $(info $(_) # make test TEST="jdk_lang jdk_net") + $(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness for run-test) + $(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness for run-test) $(info ) $(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))),\ $(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration.)) diff --git a/make/Images.gmk b/make/Images.gmk index 09740cb53d9..c8567bd0ee2 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -105,7 +105,7 @@ JLINK_ORDER_RESOURCES := **module-info.class JLINK_JLI_CLASSES := ifeq ($(ENABLE_GENERATE_CLASSLIST), true) JLINK_ORDER_RESOURCES += @$(SUPPORT_OUTPUTDIR)/link_opt/classlist - JLINK_JLI_CLASSES := --generate-jli-classes=@$(SUPPORT_OUTPUTDIR)/link_opt/jli_trace.out + JLINK_JLI_CLASSES := --generate-jli-classes=@$(SUPPORT_OUTPUTDIR)/link_opt/default_jli_trace.txt endif JLINK_ORDER_RESOURCES += \ /java.base/java/** \ @@ -309,34 +309,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows) JDK_TARGETS += $(JDK_MAN_PAGE_LIST) endif # Windows -################################################################################ -# doc files - -JRE_DOC_LOCATION ?= $(JDK_TOPDIR) -JDK_DOC_LOCATION ?= $(JDK_TOPDIR) - -JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES)) -JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES)) - -# Processing license files from source area to image area -# These are modified to have the platform specific EOL chars. -define process-doc-file - $(call LogInfo, Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@)) - $(MKDIR) -p $(@D) - $(RM) $@ - LC_ALL=C $(SED) 's/$$//g' $< > $@ - $(CHMOD) 444 $@ -endef - -$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/% - $(process-doc-file) - -$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/% - $(process-doc-file) - -JRE_TARGETS += $(JRE_DOC_TARGETS) -JDK_TARGETS += $(JDK_DOC_TARGETS) - ################################################################################ # src.zip @@ -375,17 +347,6 @@ ifneq ($(filter jdk, $(MAKECMDGOALS)), ) JDK_TARGETS += $(JDK_COPY_DEMOS) endif -################################################################################ -# /sample dir - -$(eval $(call SetupCopyFiles, COPY_SAMPLES, \ - SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \ - DEST := $(JDK_IMAGE_DIR)/sample, \ - FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \ - $(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample/image)))) - -JDK_TARGETS += $(COPY_SAMPLES) - ################################################################################ # Code coverage data files diff --git a/make/Init.gmk b/make/Init.gmk index 15d25b4136d..5785b12fd8c 100644 --- a/make/Init.gmk +++ b/make/Init.gmk @@ -1,5 +1,5 @@ # -# 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 @@ -51,7 +51,7 @@ ifeq ($(HAS_SPEC),) # Targets provided by Init.gmk. ALL_INIT_TARGETS := print-modules print-targets print-configuration \ - reconfigure pre-compare-build post-compare-build + print-tests reconfigure pre-compare-build post-compare-build # CALLED_TARGETS is the list of targets that the user provided, # or "default" if unspecified. @@ -66,7 +66,7 @@ ifeq ($(HAS_SPEC),) ifeq ($(CALLED_SPEC_TARGETS), ) ONLY_GLOBAL_TARGETS := true endif - ifneq ($(findstring qp, $(MAKEFLAGS)),) + ifeq ($(findstring p, $(MAKEFLAGS))$(findstring q, $(MAKEFLAGS)), pq) ONLY_GLOBAL_TARGETS := true endif @@ -251,6 +251,11 @@ else # HAS_SPEC=true $(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \ NO_RECIPES=true print-targets ) + print-tests: + ( cd $(TOPDIR) && \ + $(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \ + NO_RECIPES=true print-tests ) + print-configuration: $(ECHO) $(CONFIGURE_COMMAND_LINE) @@ -310,6 +315,9 @@ else # HAS_SPEC=true $(call StopGlobalTimer) $(call ReportBuildTimes) endif + if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \ + exit 1 ; \ + fi $(PRINTF) "Finished building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE) endif @@ -319,7 +327,7 @@ else # HAS_SPEC=true $(call ReportBuildTimes) $(call PrintFailureReports) $(call PrintBuildLogFailures) - $(PRINTF) "Hint: If caused by a warning, try configure --disable-warnings-as-errors.\n\n" + $(PRINTF) "Hint: See common/doc/building.html#troubleshooting for assistance.\n\n" ifneq ($(COMPARE_BUILD), ) $(call CleanupCompareBuild) endif diff --git a/make/InitSupport.gmk b/make/InitSupport.gmk index 92b34d72f02..9bab7e5d8aa 100644 --- a/make/InitSupport.gmk +++ b/make/InitSupport.gmk @@ -33,6 +33,11 @@ ifndef _INITSUPPORT_GMK _INITSUPPORT_GMK := 1 ifeq ($(HAS_SPEC),) + + # Include the corresponding closed file, if present. + # Normal hook mechanism cannot be used since we have no SPEC. + -include $(topdir)/closed/make/InitSupport.gmk + ############################################################################## # Helper functions for the initial part of Init.gmk, before the spec file is # loaded. Most of these functions provide parsing and setting up make options @@ -40,8 +45,8 @@ ifeq ($(HAS_SPEC),) ############################################################################## # Make control variables, handled by Init.gmk - INIT_CONTROL_VARIABLES := LOG CONF CONF_NAME SPEC JOBS TEST_JOBS CONF_CHECK \ - COMPARE_BUILD + INIT_CONTROL_VARIABLES += LOG CONF CONF_NAME SPEC JOBS TEST_JOBS CONF_CHECK \ + COMPARE_BUILD JTREG GTEST # All known make control variables MAKE_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) TEST JDK_FILTER @@ -498,6 +503,7 @@ else # $(HAS_SPEC)=true define PrepareFailureLogs $(RM) -r $(MAKESUPPORT_OUTPUTDIR)/failure-logs 2> /dev/null && \ $(MKDIR) -p $(MAKESUPPORT_OUTPUTDIR)/failure-logs + $(RM) $(MAKESUPPORT_OUTPUTDIR)/exit-with-error 2> /dev/null endef # Remove any javac server logs and port files. This diff --git a/make/Javadoc.gmk b/make/Javadoc.gmk deleted file mode 100644 index aa2a8b96d8b..00000000000 --- a/make/Javadoc.gmk +++ /dev/null @@ -1,754 +0,0 @@ -# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -default: all - -include $(SPEC) -include MakeBase.gmk -include $(JDK_TOPDIR)/make/Tools.gmk - -################################################################################ - -# List of all possible directories for javadoc to look for sources -# Allow custom to overwrite. -JAVADOC_SOURCE_DIRS = \ - $(SUPPORT_OUTPUTDIR)/gensrc/* \ - $(addsuffix /*, $(IMPORT_MODULES_SRC)) \ - $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \ - $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_TYPE)/classes \ - $(JDK_TOPDIR)/src/*/share/classes \ - $(HOTSPOT_TOPDIR)/src/*/share/classes \ - $(LANGTOOLS_TOPDIR)/src/*/share/classes \ - $(NASHORN_TOPDIR)/src/*/share/classes \ - $(CORBA_TOPDIR)/src/*/share/classes \ - $(JAXP_TOPDIR)/src/*/share/classes \ - $(JAXWS_TOPDIR)/src/*/share/classes \ - $(SUPPORT_OUTPUTDIR)/rmic/* \ - $(JDK_TOPDIR)/src/*/share/doc/stub \ - # - -# Should we use -Xdocrootparent? Allow custom to overwrite. -DOCROOTPARENT_FLAG = TRUE - -# URLs -JAVADOC_BASE_URL := http://docs.oracle.com/javase/$(VERSION_SPECIFICATION)/docs -BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/ - -################################################################################ -# Text snippets - -FULL_COMPANY_NAME := Oracle and/or its affiliates -COMPANY_ADDRESS := 500 Oracle Parkway
                    Redwood Shores, CA 94065 USA -BUG_SUBMIT_LINE := Submit a bug or feature - -COMMON_BOTTOM_TEXT := $(BUG_SUBMIT_LINE)
                    Java is a trademark or registered \ - trademark of $(FULL_COMPANY_NAME) in the US and other countries. - -CORE_BOTTOM_COPYRIGHT_URL := {@docroot}/../legal/cpyr.html -CORE_BOTTOM_TEXT := \ - $(BUG_SUBMIT_LINE) \ -
                    For further API reference and developer documentation, see \ - Java SE \ - Documentation. That documentation contains more detailed, \ - developer-targeted descriptions, with conceptual overviews, definitions of \ - terms, workarounds, and working code examples. - -ifeq ($(VERSION_IS_GA), true) - DRAFT_MARKER := - DRAFT_WINDOW_TITLE_MARKER := - EARLYACCESS_TOP := -else - # We need a draft format when not building the GA version. - DRAFT_MARKER :=
                    DRAFT $(VERSION_STRING) - ifeq ($(VERSION_BUILD), 0) - DRAFT_WINDOW_TITLE_MARKER := $(SPACE)[ad-hoc build] - else - DRAFT_WINDOW_TITLE_MARKER := $(SPACE)[build $(VERSION_BUILD)] - endif - EARLYACCESS_TOP := \ -
                    Please note that the specifications \ - and other information contained herein are not final and are subject to \ - change. The information is being made available to you solely for \ - purpose of evaluation.
                    -endif - -################################################################################ -# Special treatment for the core package list. All separate "small" javadoc -# invocation needs to be able to see the core package list. - -ALL_PKG_DIRS := $(dir $(filter %.java, $(call CacheFind, \ - $(wildcard $(JAVADOC_SOURCE_DIRS))))) -ALL_SRC_PREFIXES := $(addsuffix /%, $(wildcard $(JAVADOC_SOURCE_DIRS))) -ALL_PKG_DIRNAMES := $(foreach prefix, $(ALL_SRC_PREFIXES), \ - $(patsubst $(prefix),%, $(filter $(prefix), $(ALL_PKG_DIRS)))) -ALL_PACKAGES := $(sort $(subst /,., $(patsubst %/, %, $(ALL_PKG_DIRNAMES)))) - -# Core packages are all packages beginning with java, javax or org, except a few -# excludes. -JAVA_PACKAGES := $(filter java.%, $(ALL_PACKAGES)) -JAVAX_PACKAGES := $(filter javax.%, $(ALL_PACKAGES)) -ORG_PACKAGES := $(filter org.%, $(ALL_PACKAGES)) - -# Allow custom makefile to add more excluded packages -CORE_EXCLUDED_PACKAGES += \ - java.awt.dnd.peer \ - java.awt.peer \ - javax.smartcardio \ - org.jcp.xml.dsig.internal% \ - org.w3c.dom.css \ - org.w3c.dom.html \ - org.w3c.dom.stylesheets \ - org.w3c.dom.xpath \ - org.graalvm.compiler.% \ - # - -CORE_PACKAGES := $(filter-out $(CORE_EXCLUDED_PACKAGES), \ - $(JAVA_PACKAGES) $(JAVAX_PACKAGES) $(ORG_PACKAGES)) - -CORE_PACKAGES_LIST_DIR := $(SUPPORT_OUTPUTDIR)/docs/core-packages -CORE_PACKAGES_LIST_FILE := $(CORE_PACKAGES_LIST_DIR)/package-list - -CORE_PACKAGES_VARDEPS_FILE := $(call DependOnVariable, CORE_PACKAGES, \ - $(CORE_PACKAGES_LIST_FILE).vardeps) - -$(CORE_PACKAGES_LIST_FILE): $(CORE_PACKAGES_VARDEPS_FILE) - $(call MakeDir, $(@D)) - $(eval $(call ListPathsSafely, CORE_PACKAGES, $@)) - -################################################################################ -# Support functions for SetupJavadocGeneration - -# Generate the text used in the -bottom argument. -# Note that COPYRIGHT_YEAR is the current year (from spec.gmk) -# Arguments: -# arg 1: first copyright year -# arg 2: copyright url (optional) -# arg 3: free-form text snippet (optional) -define GenerateBottom - $(if $(strip $3), $(strip $3))
                    $(if \ - $(strip $2),Copyright,Copyright) \ - © $(strip $1), $(COPYRIGHT_YEAR), $(FULL_COMPANY_NAME). \ - $(COMPANY_ADDRESS). All rights reserved.
                    -endef - -# Speed up finding by filling cache -$(eval $(call FillCacheFind, $(wildcard $(JAVADOC_SOURCE_DIRS)))) - -# In order to get a specific ordering it's necessary to specify the total -# ordering of tags as the tags are otherwise ordered in order of definition. -DEFAULT_JAVADOC_TAGS := \ - -tag beaninfo:X \ - -tag revised:X \ - -tag since.unbundled:X \ - -tag spec:X \ - -tag specdefault:X \ - -tag Note:X \ - -tag ToDo:X \ - -tag 'apiNote:a:API Note:' \ - -tag 'implSpec:a:Implementation Requirements:' \ - -tag 'implNote:a:Implementation Note:' \ - -tag param \ - -tag return \ - -tag throws \ - -tag since \ - -tag version \ - -tag serialData \ - -tag factory \ - -tag see \ - -tag 'jvms:a:See The Java™ Virtual Machine Specification:' \ - -tag 'jls:a:See The Java™ Language Specification:' \ - -taglet build.tools.taglet.Incubating \ - -tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ - # - -DEFAULT_JAVADOC_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \ - -serialwarn -encoding ISO-8859-1 -breakiterator --system none - -################################################################################ -# Setup make rules for running javadoc. -# -# Parameter 1 is the name of the rule. This name is used as variable prefix, -# and the targets generated are listed in a variable by that name. Note that -# the index.html file will work as a "touch file" for all the magnitude of -# files that are generated by javadoc. -# -# Remaining parameters are named arguments. These include: -# MODULES - Modules to include -# PACKAGES - Packages to include -# IS_CORE - Set to TRUE for the Core API package which needs special treatment -# API_ROOT - Where to base the documentation (jre or jdk) -# DEST_DIR - A directory relative to the API root -# OVERVIEW - Path to a html overview file -# TITLE - Default title to use for the more specific versions below -# WINDOW_TITLE - Title to use in -windowtitle. Computed from TITLE if empty. -# HEADER_TITLE - Title to use in -header. Computed from TITLE if empty. -# DOC_TITLE - Title to use in -doctitle. Computed from TITLE if empty. -# FIRST_COPYRIGHT_YEAR - First year this bundle was introduced -# DISABLED_DOCLINT - Doclint warnings to exclude. -# DOCLINT_PACKAGES - Optional -Xdoclint/package value -# SPLIT_INDEX - Enable -splitIndex (split index-all.html if it is too large) -# BOTTOM_COPYRIGHT_URL - Copyright URL to use in -bottom -# BOTTOM_TEXT - Extra text to use in -bottom -# EXTRA_TOP - Additional -top data -# -SetupJavadocGeneration = $(NamedParamsMacroTemplate) -define SetupJavadocGenerationBody - ifeq ($$($1_IS_CORE), TRUE) - $1_JAVA := $$(JAVA) - $1_OUTPUT_DIRNAME := api - else - $1_JAVA := $$(JAVA_SMALL) - $1_OUTPUT_DIRNAME := $$($1_API_ROOT)/api/$$($1_DEST_DIR) - - # Compute a relative path to core root. - # The non-core api javadocs need to be able to access the root of the core - # api directory, so for jdk/api or jre/api to get to the core api/ - # directory we would use this - $1_RELATIVE_CORE_DIR := $$(call DirToDotDot, $$($1_OUTPUT_DIRNAME))/api - - # We need to tell javadoc the directory in which to find the core package-list - $1_OPTIONS += -linkoffline $$($1_RELATIVE_CORE_DIR) $$(CORE_PACKAGES_LIST_DIR) - - $1_DEPS += $(CORE_PACKAGES_LIST_FILE) - endif - - $1_OPTIONS += --add-modules $$(call CommaList, $$($1_MODULES)) - - ifneq ($$($1_DISABLED_DOCLINT), ) - # Create a string like ",-syntax,-html" - $1_DOCLINT_EXCEPTIONS := ,$$(call CommaList, $$(addprefix -, $$($1_DISABLED_DOCLINT))) - endif - $1_OPTIONS += -Xdoclint:all$$($1_DOCLINT_EXCEPTIONS) - - ifneq ($$($1_DOCLINT_PACKAGES), ) - $1_OPTIONS += -Xdoclint/package:$$(call CommaList, $$($1_DOCLINT_PACKAGES)) - endif - - ifeq ($$($1_DOC_TITLE), ) - $1_DOC_TITLE := $$($1_TITLE) - endif - $1_OPTIONS += -doctitle '$$($1_DOC_TITLE)' - - ifeq ($$($1_WINDOW_TITLE), ) - $1_WINDOW_TITLE := $$(strip $$(subst ™,, $$($1_TITLE))) - endif - $1_OPTIONS += -windowtitle '$$($1_WINDOW_TITLE)$$(DRAFT_WINDOW_TITLE_MARKER)' - - ifeq ($$($1_HEADER_TITLE), ) - $1_HEADER_TITLE := $$(strip $$(subst ™,, $$($1_TITLE))) - endif - $1_OPTIONS += -header '$$($1_HEADER_TITLE)$$(DRAFT_MARKER)' - - ifneq ($$($1_EXTRA_TOP), ) - $1_OPTIONS += -top '$$($1_EXTRA_TOP)' - endif - - ifeq ($$($1_BOTTOM_TEXT), ) - $1_BOTTOM_TEXT := $(COMMON_BOTTOM_TEXT) - endif - $1_BOTTOM := $$(call GenerateBottom, $$($1_FIRST_COPYRIGHT_YEAR), \ - $$($1_BOTTOM_COPYRIGHT_URL), $$($1_BOTTOM_TEXT)) - $1_OPTIONS += -bottom '$$($1_BOTTOM)$$(DRAFT_MARKER)' - - ifneq ($$($1_OVERVIEW), ) - $1_OPTIONS += -overview $$($1_OVERVIEW) - $1_DEPS += $$($1_OVERVIEW) - endif - - ifneq ($$($1_SPLIT_INDEX), ) - $1_OPTIONS += -splitIndex - endif - - ifneq ($$($DOCROOTPARENT_FLAG), ) - $1_OPTIONS += -Xdocrootparent $(JAVADOC_BASE_URL) - endif - - $1_VARDEPS := $$($1_OPTIONS) $$($1_PACKAGES) - $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ - $$(SUPPORT_OUTPUTDIR)/docs/$1.vardeps) - - # Do not store debug level options in VARDEPS. - ifneq ($$(LOG_LEVEL), trace) - $1_OPTIONS += -quiet - else - $1_OPTIONS += -verbose - endif - - $1_PACKAGE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach p, \ - $$(subst .,/,$$(strip $$($1_PACKAGES))), \ - $$(addsuffix /$$p, $$(wildcard $$(JAVADOC_SOURCE_DIRS)))))) - - # If there are many packages, use an @-file... - ifneq ($$(word 17, $$($1_PACKAGES)), ) - $1_PACKAGES_FILE := $$(SUPPORT_OUTPUTDIR)/docs/$1.packages - $1_PACKAGES_ARG := @$$($1_PACKAGES_FILE) - else - $1_PACKAGES_ARG := $$($1_PACKAGES) - endif - - # The index.html which is a marker for all the output from javadoc. - $1_INDEX_FILE := $$(JAVADOC_OUTPUTDIR)/$$($1_OUTPUT_DIRNAME)/index.html - - # Rule for actually running javadoc - $$($1_INDEX_FILE): $(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) $$($1_PACKAGE_DEPS) $$($1_DEPS) - $$(call LogWarn, Generating Javadoc from $$(words $$($1_PACKAGES)) package(s) for $$($1_OUTPUT_DIRNAME)) - $$(call MakeDir, $$(@D)) - ifneq ($$($1_PACKAGES_FILE), ) - $$(eval $$(call ListPathsSafely, $1_PACKAGES, $$($1_PACKAGES_FILE))) - endif - $$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/docs/$1.javadoc, \ - $$($1_JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) -d $$(@D) \ - $$(DEFAULT_JAVADOC_TAGS) $$(DEFAULT_JAVADOC_OPTIONS) \ - --module-source-path $$(call PathList, $$(JAVADOC_SOURCE_DIRS)) \ - $$($1_OPTIONS) $$($1_PACKAGES_ARG)) - - # The output returned will be the index.html file - $1 := $$($1_INDEX_FILE) -endef - -################################################################################ - -$(eval $(call SetupJavadocGeneration, coredocs, \ - MODULES := java.se.ee, \ - PACKAGES := $(CORE_PACKAGES), \ - IS_CORE := TRUE, \ - OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html, \ - WINDOW_TITLE := Java Platform SE $(VERSION_SPECIFICATION), \ - HEADER_TITLE := Java™ Platform
                    Standard Ed. $(VERSION_SPECIFICATION), \ - DOC_TITLE := Java™ Platform$(COMMA) Standard Edition \ - $(VERSION_SPECIFICATION)
                    API Specification, \ - FIRST_COPYRIGHT_YEAR := 1993, \ - DISABLED_DOCLINT := accessibility html missing syntax, \ - DOCLINT_PACKAGES := -org.omg.* jdk.internal.logging.*, \ - SPLIT_INDEX := TRUE, \ - BOTTOM_COPYRIGHT_URL := $(CORE_BOTTOM_COPYRIGHT_URL), \ - BOTTOM_TEXT := $(CORE_BOTTOM_TEXT), \ - EXTRA_TOP := $(EARLYACCESS_TOP), \ -)) - -TARGETS += $(coredocs) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, docletapi, \ - MODULES := jdk.javadoc, \ - PACKAGES := \ - jdk.javadoc.doclet \ - jdk.javadoc.doclet.taglet \ - jdk.javadoc.doclets, \ - API_ROOT := jdk, \ - DEST_DIR := javadoc/doclet, \ - TITLE := Doclet API, \ - FIRST_COPYRIGHT_YEAR := 1993, \ -)) - -TARGETS += $(docletapi) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, old-docletapi, \ - MODULES := jdk.javadoc, \ - PACKAGES := com.sun.javadoc, \ - API_ROOT := jdk, \ - DEST_DIR := javadoc/old/doclet, \ - TITLE := Doclet API, \ - FIRST_COPYRIGHT_YEAR := 1993, \ -)) - -TARGETS += $(old-docletapi) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, tagletapi, \ - MODULES := jdk.javadoc, \ - PACKAGES := com.sun.tools.doclets, \ - API_ROOT := jdk, \ - DEST_DIR := javadoc/old/taglet, \ - TITLE := Taglet API, \ - FIRST_COPYRIGHT_YEAR := 1993, \ -)) - -TARGETS += $(tagletapi) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, domapi, \ - MODULES := \ - java.xml \ - jdk.xml.dom, \ - PACKAGES := \ - org.w3c.dom \ - org.w3c.dom.bootstrap \ - org.w3c.dom.ls \ - org.w3c.dom.ranges \ - org.w3c.dom.traversal \ - org.w3c.dom.html \ - org.w3c.dom.stylesheets \ - org.w3c.dom.css \ - org.w3c.dom.events \ - org.w3c.dom.views, \ - API_ROOT := jre, \ - DEST_DIR := plugin/dom, \ - TITLE := Common DOM API, \ - FIRST_COPYRIGHT_YEAR := 2005, \ - DISABLED_DOCLINT := accessibility html missing, \ - SPLIT_INDEX := TRUE, \ -)) - -TARGETS += $(domapi) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, jdi, \ - MODULES := jdk.jdi, \ - PACKAGES := \ - com.sun.jdi \ - com.sun.jdi.event \ - com.sun.jdi.request \ - com.sun.jdi.connect \ - com.sun.jdi.connect.spi, \ - API_ROOT := jdk, \ - DEST_DIR := jpda/jdi, \ - OVERVIEW := $(JDK_TOPDIR)/src/jdk.jdi/share/classes/jdi-overview.html, \ - TITLE := Java™ Debug Interface, \ - FIRST_COPYRIGHT_YEAR := 1999, \ - DISABLED_DOCLINT := accessibility missing syntax, \ - SPLIT_INDEX := TRUE, \ -)) - -TARGETS += $(jdi) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, jaas, \ - MODULES := jdk.security.auth, \ - PACKAGES := \ - com.sun.security.auth \ - com.sun.security.auth.callback \ - com.sun.security.auth.login \ - com.sun.security.auth.module, \ - API_ROOT := jre, \ - DEST_DIR := security/jaas/spec, \ - OVERVIEW := $(JDK_TOPDIR)/src/jdk.security.auth/share/classes/jaas-overview.html, \ - TITLE := Java™ Authentication and Authorization Service, \ - FIRST_COPYRIGHT_YEAR := 1998, \ - DISABLED_DOCLINT := missing, \ -)) - -TARGETS += $(jaas) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, jgss, \ - MODULES := jdk.security.jgss, \ - PACKAGES := com.sun.security.jgss, \ - API_ROOT := jre, \ - DEST_DIR := security/jgss/spec, \ - OVERVIEW := $(JDK_TOPDIR)/src/java.security.jgss/share/classes/jgss-overview.html, \ - TITLE := Java™ GSS-API Utilities, \ - FIRST_COPYRIGHT_YEAR := 2000, \ -)) - -TARGETS += $(jgss) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, smartcardio, \ - MODULES := java.smartcardio, \ - PACKAGES := javax.smartcardio, \ - API_ROOT := jre, \ - DEST_DIR := security/smartcardio/spec, \ - TITLE := Java™ Smart Card I/O, \ - FIRST_COPYRIGHT_YEAR := 2005, \ -)) - -TARGETS += $(smartcardio) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, httpserver, \ - MODULES := jdk.httpserver, \ - PACKAGES := \ - com.sun.net.httpserver \ - com.sun.net.httpserver.spi, \ - API_ROOT := jre, \ - DEST_DIR := net/httpserver/spec, \ - TITLE := Java™ HTTP Server, \ - FIRST_COPYRIGHT_YEAR := 2005, \ - DISABLED_DOCLINT := accessibility missing syntax, \ -)) - -TARGETS += $(httpserver) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, httpclient, \ - MODULES := jdk.incubator.httpclient, \ - PACKAGES := \ - jdk.incubator.http, \ - API_ROOT := jre, \ - DEST_DIR := incubator/httpclient/spec, \ - TITLE := Java™ HTTP Client API (incubator module), \ - FIRST_COPYRIGHT_YEAR := 2015, \ - DISABLED_DOCLINT := accessibility missing syntax, \ -)) - -TARGETS += $(httpclient) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, jsobject, \ - MODULES := jdk.jsobject, \ - PACKAGES := netscape.javascript, \ - API_ROOT := jre, \ - DEST_DIR := plugin/jsobject, \ - FIRST_COPYRIGHT_YEAR := 1993, \ - TITLE := Java™ JSObject Doc, \ -)) - -TARGETS += $(jsobject) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, mgmt, \ - MODULES := jdk.management, \ - PACKAGES := com.sun.management, \ - API_ROOT := jre, \ - DEST_DIR := management/extension, \ - OVERVIEW := $(JDK_TOPDIR)/src/java.management/share/classes/mgmt-overview.html, \ - TITLE := Monitoring and Management Interface for the Java™ Platform, \ - FIRST_COPYRIGHT_YEAR := 2003, \ - DISABLED_DOCLINT := accessibility missing reference, \ -)) - -TARGETS += $(mgmt) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, attach, \ - MODULES := jdk.attach, \ - PACKAGES := \ - com.sun.tools.attach \ - com.sun.tools.attach.spi, \ - API_ROOT := jdk, \ - DEST_DIR := attach/spec, \ - TITLE := Attach API, \ - FIRST_COPYRIGHT_YEAR := 2005, \ - DISABLED_DOCLINT := reference, \ -)) - -TARGETS += $(attach) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, jconsole, \ - MODULES := jdk.jconsole, \ - PACKAGES := com.sun.tools.jconsole, \ - API_ROOT := jdk, \ - DEST_DIR := jconsole/spec, \ - TITLE := JConsole API, \ - FIRST_COPYRIGHT_YEAR := 2006, \ -)) - -TARGETS += $(jconsole) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, jshellapi, \ - MODULES := jdk.jshell, \ - PACKAGES := \ - jdk.jshell \ - jdk.jshell.spi \ - jdk.jshell.execution \ - jdk.jshell.tool, \ - API_ROOT := jdk, \ - DEST_DIR := jshell, \ - TITLE := JShell API, \ - FIRST_COPYRIGHT_YEAR := 2015, \ - SPLIT_INDEX := TRUE, \ -)) - -TARGETS += $(jshellapi) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, treeapi, \ - MODULES := jdk.compiler, \ - PACKAGES := \ - com.sun.source.doctree \ - com.sun.source.tree \ - com.sun.source.util, \ - API_ROOT := jdk, \ - DEST_DIR := javac/tree, \ - TITLE := Compiler Tree API, \ - FIRST_COPYRIGHT_YEAR := 2005, \ - SPLIT_INDEX := TRUE, \ -)) - -TARGETS += $(treeapi) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, nashornapi, \ - MODULES := jdk.scripting.nashorn, \ - PACKAGES := \ - jdk.nashorn.api.scripting \ - jdk.nashorn.api.tree, \ - API_ROOT := jdk, \ - DEST_DIR := nashorn, \ - TITLE := Nashorn API, \ - FIRST_COPYRIGHT_YEAR := 2014, \ - SPLIT_INDEX := TRUE, \ -)) - -TARGETS += $(nashornapi) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, dynalinkapi, \ - MODULES := jdk.dynalink, \ - PACKAGES := \ - jdk.dynalink \ - jdk.dynalink.beans \ - jdk.dynalink.linker \ - jdk.dynalink.linker.support \ - jdk.dynalink.support, \ - API_ROOT := jdk, \ - DEST_DIR := dynalink, \ - TITLE := Dynalink API, \ - FIRST_COPYRIGHT_YEAR := 2015, \ -)) - -TARGETS += $(dynalinkapi) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, sctp, \ - MODULES := jdk.sctp, \ - PACKAGES := com.sun.nio.sctp, \ - API_ROOT := jre, \ - DEST_DIR := nio/sctp/spec, \ - TITLE := SCTP API, \ - FIRST_COPYRIGHT_YEAR := 2009, \ -)) - -TARGETS += $(sctp) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, jaccess, \ - MODULES := jdk.accessibility, \ - PACKAGES := com.sun.java.accessibility.util, \ - API_ROOT := jre, \ - DEST_DIR := accessibility/jaccess/spec, \ - TITLE := JACCESS API, \ - FIRST_COPYRIGHT_YEAR := 2002, \ -)) - -TARGETS += $(jaccess) - -################################################################################ - -$(eval $(call SetupJavadocGeneration, jdknet, \ - MODULES := jdk.net, \ - PACKAGES := jdk.net, \ - API_ROOT := jre, \ - DEST_DIR := net/socketoptions/spec, \ - TITLE := jdk.net API, \ - FIRST_COPYRIGHT_YEAR := 2014, \ - DISABLED_DOCLINT := missing, \ -)) - -TARGETS += $(jdknet) - -################################################################################ -# Copy JDWP html file - -JDWP_HTML := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html - -$(eval $(call SetupCopyFiles, COPY_JDWP_HTML, \ - FILES := $(JDWP_HTML), \ - DEST := $(JAVADOC_OUTPUTDIR)/platform/jpda/jdwp, \ -)) - -COPY_TARGETS += $(COPY_JDWP_HTML) - -################################################################################ -# Copy JVMTI html file - -# Pick jvmti.html from any jvm variant, they are all the same. -JVMTI_HTML := $(firstword \ - $(wildcard $(HOTSPOT_OUTPUTDIR)/variant-*/gensrc/jvmtifiles/jvmti.html)) - -$(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \ - FILES := $(JVMTI_HTML), \ - DEST := $(JAVADOC_OUTPUTDIR)/platform/jvmti, \ -)) - -COPY_TARGETS += $(COPY_JVMTI_HTML) - -################################################################################ -# Optional target which bundles all generated javadocs into a zip archive. - -JAVADOC_ARCHIVE_NAME := jdk-$(VERSION_STRING)-docs.zip -JAVADOC_ARCHIVE_ASSEMBLY_DIR := $(SUPPORT_OUTPUTDIR)/docs/zip-docs -JAVADOC_ARCHIVE_DIR := $(OUTPUT_ROOT)/bundles -JAVADOC_ARCHIVE := $(JAVADOC_ARCHIVE_DIR)/$(JAVADOC_ARCHIVE_NAME) - -$(JAVADOC_ARCHIVE): $(TARGETS) $(COPY_TARGETS) - $(call LogInfo, Compressing javadoc to single $(JAVADOC_ARCHIVE_NAME)) - $(MKDIR) -p $(JAVADOC_ARCHIVE_DIR) - $(RM) -r $(JAVADOC_ARCHIVE_ASSEMBLY_DIR) - $(MKDIR) -p $(JAVADOC_ARCHIVE_ASSEMBLY_DIR) - all_roots=`$(FIND) $(JAVADOC_OUTPUTDIR) | $(GREP) index.html | grep -v old/doclet`; \ - pushd $(JAVADOC_ARCHIVE_ASSEMBLY_DIR); \ - for index_file in $${all_roots} ; do \ - target_dir=`dirname $${index_file}`; \ - name=`$(ECHO) $${target_dir} | $(SED) "s;/spec;;" | $(SED) "s;.*/;;"`; \ - $(LN) -s $${target_dir} $${name}; \ - done; \ - $(ZIPEXE) -q -r $(JAVADOC_ARCHIVE) * ; \ - popd ; - -ZIP_TARGETS += $(JAVADOC_ARCHIVE) - -################################################################################ - -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, , Javadoc.gmk)) - -################################################################################ - -docs-javadoc: $(BUILD_TOOLS_JDK) $(TARGETS) - -docs-copy: $(COPY_TARGETS) - -docs-zip: $(ZIP_TARGETS) - -all: docs-javadoc docs-copy docs-zip - -.PHONY: default all docs-javadoc docs-copy docs-zip diff --git a/make/Main.gmk b/make/Main.gmk index 22f43c2317d..a5e1d8625ce 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -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 @@ -43,6 +43,7 @@ include $(SRC_ROOT)/make/MainSupport.gmk # Load the vital tools for all the makefiles. include $(SRC_ROOT)/make/common/MakeBase.gmk include $(SRC_ROOT)/make/common/Modules.gmk +include $(SRC_ROOT)/make/common/FindTests.gmk # Declare ALL_TARGETS as an immediate variable. This variable is a list of all # valid top level targets. It's used to declare them all as PHONY and to @@ -271,15 +272,15 @@ ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \ $(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-jsig hotspot-ide-project ################################################################################ -# Build demos and samples targets +# Build demos targets demos-jdk: +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk) -samples-jdk: - +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopySamples.gmk) +test-image-demos-jdk: + +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk images) -ALL_TARGETS += demos-jdk samples-jdk +ALL_TARGETS += demos-jdk test-image-demos-jdk ################################################################################ # Jigsaw specific data and analysis targets. @@ -362,16 +363,35 @@ ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-im ################################################################################ # Docs targets -docs-javadoc: - +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-javadoc) +# If building full docs, to complete docs-*-api we need both the javadoc and +# modulegraph targets. +docs-jdk-api-javadoc: + +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-api-javadoc) -docs-copy: - +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-copy) +docs-jdk-api-modulegraph: + +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-api-modulegraph) + +docs-javase-api-javadoc: + +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-javase-api-javadoc) + +docs-javase-api-modulegraph: + +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-javase-api-modulegraph) + +docs-jdk-specs: + +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-specs) + +docs-jdk-index: + +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-index) docs-zip: - +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-zip) + +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-zip) -ALL_TARGETS += docs-javadoc docs-copy docs-zip +update-build-docs: + +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f UpdateBuildDocs.gmk) + +ALL_TARGETS += docs-jdk-api-javadoc docs-jdk-api-modulegraph \ + docs-javase-api-javadoc docs-javase-api-modulegraph docs-jdk-specs \ + docs-jdk-index docs-zip update-build-docs ################################################################################ # Cross compilation support @@ -422,6 +442,22 @@ endif ALL_TARGETS += $(INTERIM_JMOD_TARGETS) interim-image generate-link-opt-data +################################################################################ +# Generate test names for all JTReg test groups +# + +define DeclareRunTestRecipe + run-test-$1: + +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$1") + +endef + +# ALL_NAMED_TESTS is defined in FindTests.gmk +$(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t))) +ALL_TEST_TARGETS := $(addprefix run-test-, $(ALL_NAMED_TESTS)) + +ALL_TARGETS += $(ALL_TEST_TARGETS) + ################################################################################ # Build tests # @@ -446,6 +482,9 @@ test-image-jdk-jtreg-native: +($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \ test-image-jdk-jtreg-native) +run-test: + +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$(TEST)") + ifeq ($(BUILD_GTEST), true) test-image-hotspot-gtest: +($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f GtestImage.gmk) @@ -474,7 +513,8 @@ endif ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \ test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \ test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \ - test-failure-handler test-image-failure-handler test-image-hotspot-gtest + test-failure-handler test-image-failure-handler test-image-hotspot-gtest \ + run-test ################################################################################ # Run tests @@ -597,6 +637,7 @@ else # jdk libs, even though they don't need to. To avoid warnings, make sure they # aren't built until after libjava and libjvm are available to link to. demos-jdk: java.base-libs exploded-image-optimize + test-image-demos-jdk: demos-jdk # Declare dependency from -java to -gensrc $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc)) @@ -633,16 +674,16 @@ else # in javadoc. java.desktop-gensrc-jdk: java.base-gensrc - # The annotation processing for jdk.vm.ci and jdk.vm.compiler needs classes - # from the current JDK. - jdk.vm.ci-gensrc-hotspot: $(addsuffix -java, \ - $(call FindTransitiveDepsForModule, jdk.vm.ci)) - jdk.vm.compiler-gensrc-hotspot: $(addsuffix -java, \ - $(call FindTransitiveDepsForModule, jdk.vm.compiler)) + # The annotation processing for jdk.internal.vm.ci and jdk.internal.vm.compiler + # needs classes from the current JDK. + jdk.internal.vm.ci-gensrc-hotspot: $(addsuffix -java, \ + $(call FindTransitiveDepsForModule, jdk.internal.vm.ci)) + jdk.internal.vm.compiler-gensrc-hotspot: $(addsuffix -java, \ + $(call FindTransitiveDepsForModule, jdk.internal.vm.compiler)) - # For jdk.vm.compiler, the gensrc step is generating a module-info.java.extra + # For jdk.internal.vm.compiler, the gensrc step is generating a module-info.java.extra # file to be processed by the gensrc-moduleinfo target. - jdk.vm.compiler-gensrc-moduleinfo: jdk.vm.compiler-gensrc-hotspot + jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-hotspot # Explicitly add dependencies for special targets java.base-java: unpack-sec @@ -654,8 +695,7 @@ else # When creating a BUILDJDK, we don't need to add hashes to java.base, thus # we don't need to depend on all other jmods ifneq ($(CREATING_BUILDJDK), true) - java.base-jmod: jrtfs-jar $(filter-out java.base-jmod \ - $(addsuffix -jmod, $(call FindAllUpgradeableModules)), $(JMOD_TARGETS)) + java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS)) endif # Building java.base-jmod requires all of hotspot to be built. @@ -728,12 +768,12 @@ else generate-link-opt-data: buildtools-jdk # The generated classlist needs to go into java.base-jmod. - java.base-jmod jdk-image jre-image: generate-link-opt-data + java.base-jmod jdk.jlink-jmod jdk-image jre-image: generate-link-opt-data endif release-file: create-source-revision-tracker - jdk-image: jmods zip-source demos samples release-file + jdk-image: jmods zip-source demos release-file jre-image: jmods release-file symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS) @@ -749,15 +789,29 @@ else bootcycle-images: jdk-image - docs-javadoc: $(GENSRC_TARGETS) rmic + docs-jdk-api-javadoc: $(GENSRC_TARGETS) rmic - # The gensrc step for jdk.jdi creates an html file that is used by docs-copy. - docs-copy: hotspot-$(JVM_VARIANT_MAIN)-gensrc jdk.jdi-gensrc + docs-javase-api-javadoc: $(GENSRC_TARGETS) rmic - docs-zip: docs-javadoc docs-copy + docs-jdk-api-modulegraph: exploded-image buildtools-modules + + docs-javase-api-modulegraph: exploded-image buildtools-modules + + # The gensrc steps for hotspot and jdk.jdi create html spec files. + docs-jdk-specs: hotspot-$(JVM_VARIANT_MAIN)-gensrc jdk.jdi-gensrc \ + docs-jdk-index + + docs-jdk-index: exploded-image buildtools-modules + + docs-zip: docs-jdk test: jdk-image test-image + run-test: jdk-image test-image + + # Declare dependency for all generated test targets + $(foreach t, $(ALL_TEST_TARGETS), $(eval $t: jdk-image test-image)) + create-buildjdk-copy: jdk.jlink-java java.base-gendata \ $(addsuffix -java, $(INTERIM_IMAGE_MODULES)) @@ -857,8 +911,6 @@ java.base: hotspot demos: demos-jdk -samples: samples-jdk - # The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk. exploded-image-base: $(ALL_MODULES) exploded-image: exploded-image-base release-file @@ -870,6 +922,22 @@ endif create-buildjdk: create-buildjdk-copy create-buildjdk-interim-image +docs-jdk-api: docs-jdk-api-javadoc +docs-javase-api: docs-javase-api-javadoc + +# If we're building full docs, we must also generate the module graphs to +# get non-broken api documentation. +ifeq ($(ENABLE_FULL_DOCS), true) + docs-jdk-api: docs-jdk-api-modulegraph + docs-javase-api: docs-javase-api-modulegraph +endif + +docs-jdk: docs-jdk-api docs-jdk-specs docs-jdk-index +docs-javase: docs-javase-api + +# alias for backwards compatibility +docs-javadoc: docs-jdk-api + mac-bundles: mac-bundles-jdk # The $(BUILD_OUTPUT)/images directory contain the resulting deliverables, @@ -901,11 +969,12 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) endif # This target builds the documentation image -docs-image: docs-javadoc docs-copy +docs-image: docs-jdk # This target builds the test image test-image: prepare-test-image test-image-hotspot-jtreg-native \ - test-image-jdk-jtreg-native test-image-failure-handler test-image-hotspot-gtest + test-image-jdk-jtreg-native test-image-failure-handler test-image-hotspot-gtest \ + test-image-demos-jdk # all-images builds all our deliverables as images. all-images: product-images test-image docs-image @@ -915,9 +984,10 @@ all-bundles: product-bundles test-bundles docs-bundles ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \ copy java rmic libs launchers jmods \ - jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples \ + jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \ exploded-image-base exploded-image \ - create-buildjdk mac-bundles product-images \ + create-buildjdk docs-jdk-api docs-javase-api docs-jdk docs-javase \ + docs-javadoc mac-bundles product-images \ profiles profiles-images \ docs-image test-image all-images \ all-bundles @@ -1032,6 +1102,9 @@ print-targets: print-modules: @$(ECHO) $(sort $(ALL_MODULES)) +print-tests: + @$(ECHO) $(sort $(ALL_NAMED_TESTS)) + create-main-targets-include: $(call LogInfo, Generating main target list) @$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \ diff --git a/make/ReleaseFile.gmk b/make/ReleaseFile.gmk index b57cb7be780..0f4d080a07e 100644 --- a/make/ReleaseFile.gmk +++ b/make/ReleaseFile.gmk @@ -48,6 +48,8 @@ define create-info-file $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)")) $(call info-file-item, "SOURCE", "$(strip $(SOURCE_REVISION))") $(call info-file-item, "IMPLEMENTOR", "$(COMPANY_NAME)") + $(call info-file-item, "OS_NAME", "$(RELEASE_FILE_OS_NAME)") + $(call info-file-item, "OS_ARCH", "$(RELEASE_FILE_OS_ARCH)") endef # Param 1 - The file containing the MODULES list diff --git a/make/RunTests.gmk b/make/RunTests.gmk new file mode 100644 index 00000000000..fa21f305e13 --- /dev/null +++ b/make/RunTests.gmk @@ -0,0 +1,491 @@ +# +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +default: all + +include $(SPEC) +include MakeBase.gmk +include FindTests.gmk + +# We will always run multiple tests serially +.NOTPARALLEL: + +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, , RunTests.gmk)) + +TEST_RESULTS_DIR := $(BUILD_OUTPUT)/test-results +TEST_SUPPORT_DIR := $(BUILD_OUTPUT)/test-support + + +################################################################################ +# Parse control variables +################################################################################ + +$(eval $(call ParseKeywordVariable, JTREG, \ + KEYWORDS := JOBS TIMEOUT TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM, \ + STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS, \ +)) + +ifneq ($(JTREG), ) + # Inform the user + $(info Running tests using JTREG control variable '$(JTREG)') +endif + +$(eval $(call ParseKeywordVariable, GTEST, \ + KEYWORDS := REPEAT, \ + STRING_KEYWORDS := OPTIONS, \ +)) + +ifneq ($(GTEST), ) + # Inform the user + $(info Running tests using GTEST control variable '$(GTEST)') +endif + + +################################################################################ +# Component-specific Jtreg settings +################################################################################ + +ifeq ($(TEST_JOBS), 0) + # If TEST_JOBS is not specified, hotspot fallback default is + # min(num_cores / 2, 12). + hotspot_JTREG_JOBS := $(shell $(EXPR) $(NUM_CORES) / 2) + ifeq ($(hotspot_JTREG_JOBS), 0) + hotspot_JTREG_JOBS := 1 + else ifeq ($(shell $(EXPR) $(hotspot_JTREG_JOBS) \> 12), 1) + hotspot_JTREG_JOBS := 12 + endif +endif + +hotspot_JTREG_MAX_MEM := 0 +hotspot_JTREG_ASSERT := false +hotspot_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/hotspot/jtreg/native +jdk_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/jdk/jtreg/native + + +################################################################################ +# Parse test selection +# +# The user has given a test selection in the TEST variable. We must parse it +# and determine what that means in terms of actual calls to the test framework. +# +# The parse functions take as argument a test specification as given by the +# user, and returns a fully qualified test descriptor if it was a match, or +# nothing if not. A single test specification can result in multiple test +# descriptors being returned. A valid test descriptor must always be accepted +# and returned identically. +################################################################################ + +# Helper function to determine if a test specification is a Gtest test +# +# It is a Gtest test if it is either "gtest", or "gtest:" followed by an optional +# test filter string. +define ParseGtestTestSelection + $(if $(filter gtest%, $1), \ + $(if $(filter gtest, $1), \ + gtest:all \ + , \ + $(if $(filter gtest:, $1), \ + gtest:all \ + , \ + $1 \ + ) \ + ) \ + ) +endef + +# Helper function to determine if a test specification is a Jtreg test +# +# It is a Jtreg test if it optionally begins with jtreg:, and then is either +# an unspecified group name (possibly prefixed by :), or a group in a +# specified /test directory, or a path to a test or test directory, +# either absolute or relative to TOPDIR. +define ParseJtregTestSelection + $(eval TEST_NAME := $(strip $(patsubst jtreg:%, %, $1))) \ + $(if $(or $(findstring :, $(TEST_NAME)), $(findstring /, $(TEST_NAME))), , \ + $(eval TEST_NAME := :$(TEST_NAME)) \ + ) \ + $(if $(findstring :, $(TEST_NAME)), \ + $(if $(filter :%, $(TEST_NAME)), \ + $(foreach component, $(JTREG_COMPONENTS), \ + $(if $(filter $(patsubst :%, %, $(TEST_NAME)), \ + $($(component)_JTREG_TEST_GROUPS)), \ + jtreg:$(component)/test:$(patsubst :%,%,$(TEST_NAME)) \ + ) \ + ) \ + , \ + $(eval COMPONENT := $(word 1, $(subst /, $(SPACE), $(TEST_NAME)))) \ + $(eval GROUP := $(word 2, $(subst :, $(SPACE), $(TEST_NAME)))) \ + $(if $(filter $(COMPONENT), $(JTREG_COMPONENTS)), \ + $(if $(filter $(GROUP), $($(COMPONENT)_JTREG_TEST_GROUPS)), \ + jtreg:$(TEST_NAME) \ + ) \ + ) \ + ) \ + , \ + $(if $(filter /%, $(TEST_NAME)), \ + $(if $(wildcard $(TEST_NAME)), \ + jtreg:$(TEST_NAME) \ + ) \ + , \ + $(if $(wildcard $(TOPDIR)/$(TEST_NAME)), \ + jtreg:$(TEST_NAME) \ + ) \ + ) \ + ) +endef + +ifeq ($(TEST), ) + $(info No test selection given in TEST!) + $(info Please use e.g. 'run-test TEST=tier1' or 'run-test-tier1') + $(info See common/doc/testing.[md|html] for help) + $(error Cannot continue) +endif + +# Now intelligently convert the test selection given by the user in TEST +# into a list of fully qualified test descriptors of the tests to run. +TESTS_TO_RUN := +$(foreach test, $(TEST), \ + $(eval PARSED_TESTS := $(call ParseCustomTestSelection, $(test))) \ + $(if $(strip $(PARSED_TESTS)), , \ + $(eval PARSED_TESTS += $(call ParseGtestTestSelection, $(test))) \ + ) \ + $(if $(strip $(PARSED_TESTS)), , \ + $(eval PARSED_TESTS += $(call ParseJtregTestSelection, $(test))) \ + ) \ + $(if $(strip $(PARSED_TESTS)), , \ + $(eval UNKNOWN_TEST := $(test)) \ + ) \ + $(eval TESTS_TO_RUN += $(PARSED_TESTS)) \ +) + +ifneq ($(UNKNOWN_TEST), ) + $(info Unknown test selection: '$(UNKNOWN_TEST)') + $(info See common/doc/testing.[md|html] for help) + $(error Cannot continue) +endif + +TESTS_TO_RUN := $(strip $(TESTS_TO_RUN)) + + +# Present the result of our parsing to the user +$(info Test selection '$(TEST)', will run:) +$(foreach test, $(TESTS_TO_RUN), $(info * $(test))) + + +################################################################################ +# Functions for setting up rules for running the selected tests +# +# The SetupRun*Test functions all have the same interface: +# +# Parameter 1 is the name of the rule. This is the test id, based on the test +# descriptor, and this is also used as variable prefix, and the targets +# generated are listed in a variable by that name. +# +# Remaining parameters are named arguments. Currently this is only: +# TEST -- The properly formatted fully qualified test descriptor +# +# After the rule named by the test id has been executed, the following +# variables will be available: +# testid_TOTAL - the total number of tests run +# testid_PASSED - the number of successful tests +# testid_FAILED - the number of failed tests +# testid_ERROR - the number of tests was neither successful or failed +# +################################################################################ + +### Rules for Gtest + +SetupRunGtestTest = $(NamedParamsMacroTemplate) +define SetupRunGtestTestBody + $1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1 + $1_TEST_SUPPORT_DIR := $$(TEST_SUPPORT_DIR)/$1 + + $1_TEST_NAME := $$(strip $$(patsubst gtest:%, %, $$($1_TEST))) + ifneq ($$($1_TEST_NAME), all) + $1_GTEST_FILTER := --gtest_filter=$$($1_TEST_NAME)* + endif + + ifneq ($$(GTEST_REPEAT), ) + $1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT) + endif + + run-test-$1: + $$(call LogWarn) + $$(call LogWarn, Running test '$$($1_TEST)') + $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) + $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, \ + $$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/server/gtestLauncher \ + -jdk $(JDK_IMAGE_DIR) $$($1_GTEST_FILTER) \ + --gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \ + $$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) \ + > >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) || true ) + + $1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt + + parse-test-$1: run-test-$1 + $$(call LogWarn, Finished running test '$$($1_TEST)') + $$(call LogWarn, Test report is stored in $$(strip \ + $$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR)))) + $$(eval $1_TOTAL := $$(shell $$(AWK) '/==========.* tests? from .* \ + test cases? ran/ { print $$$$2 }' $$($1_RESULT_FILE))) + $$(eval $1_PASSED := $$(shell $$(AWK) '/\[ PASSED \] .* tests?./ \ + { print $$$$4 }' $$($1_RESULT_FILE))) + $$(eval $1_FAILED := $$(shell $$(AWK) '/\[ FAILED \] .* tests?, \ + listed below/ { print $$$$4 }' $$($1_RESULT_FILE))) + $$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) + $$(eval $1_ERROR := $$(shell \ + $$(EXPR) $$($1_TOTAL) - $$($1_PASSED) - $$($1_FAILED))) + + $1: run-test-$1 parse-test-$1 + + TARGETS += $1 +endef + +################################################################################ + +### Rules for Jtreg + +# Helper function for SetupRunJtregTest. Set a JTREG_* variable from, in order: +# 1) Specified by user on command line +# 2) Component-specific default +# 3) Generic default +# +# Note: No spaces are allowed around the arguments. +# Arg $1 The test ID (i.e. $1 in SetupRunJtregTest) +# Arg $2 Base variable, e.g. JTREG_JOBS +# Arg $3 The default value (optional) +define SetJtregValue + ifneq ($$($2), ) + $1_$2 := $$($2) + else + ifneq ($$($$($1_COMPONENT)_$2), ) + $1_$2 := $$($$($1_COMPONENT)_$2) + else + ifneq ($3, ) + $1_$2 := $3 + endif + endif + endif +endef + +SetupRunJtregTest = $(NamedParamsMacroTemplate) +define SetupRunJtregTestBody + $1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1 + $1_TEST_SUPPORT_DIR := $$(TEST_SUPPORT_DIR)/$1 + + $1_TEST_NAME := $$(strip $$(patsubst jtreg:%, %, $$($1_TEST))) + $1_COMPONENT := $$(firstword $$(subst /, $$(SPACE), $$($1_TEST_NAME))) + + ifeq ($$(JT_HOME), ) + $$(info Error: jtreg framework is not found.) + $$(info Please run configure using --with-jtreg.) + $$(error Cannot continue) + endif + + # Unfortunately, we need different defaults for some JTREG values, + # depending on what component we're running. + + # Convert JTREG_foo into $1_JTREG_foo with a suitable value. + $$(eval $$(call SetJtregValue,$1,JTREG_TEST_MODE,agentvm)) + $$(eval $$(call SetJtregValue,$1,JTREG_ASSERT,true)) + $$(eval $$(call SetJtregValue,$1,JTREG_MAX_MEM,512m)) + $$(eval $$(call SetJtregValue,$1,JTREG_NATIVEPATH)) + $$(eval $$(call SetJtregValue,$1,JTREG_BASIC_OPTIONS)) + + ifneq ($(TEST_JOBS), 0) + # User has specified TEST_JOBS, use that as fallback default + $$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS))) + else + # Use JOBS as default (except for hotspot) + $$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(JOBS))) + endif + + ifeq ($$(shell $$(EXPR) $$($1_JTREG_JOBS) \> 50), 1) + # Until CODETOOLS-7901892 is fixed, JTreg cannot handle more than 50 jobs + $1_JTREG_JOBS := 50 + endif + + # Make sure MaxRAMFraction is high enough to not cause OOM or swapping since + # we may end up with a lot of JVM's + $1_JTREG_MAX_RAM_FRACTION := $$(shell $$(EXPR) $$($1_JTREG_JOBS) \* 4) + + JTREG_TIMEOUT ?= 4 + JTREG_VERBOSE ?= fail,error,summary + JTREG_RETAIN ?= fail,error + + ifneq ($$($1_JTREG_MAX_MEM), 0) + $1_JTREG_BASIC_OPTIONS += -vmoption:-Xmx$$($1_JTREG_MAX_MEM) + $1_JTREG_LAUNCHER_OPTIONS += -Xmx$$($1_JTREG_MAX_MEM) + endif + + $1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \ + -verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \ + -concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT) \ + -vmoption:-XX:MaxRAMFraction=$$($1_JTREG_MAX_RAM_FRACTION) + + $1_JTREG_BASIC_OPTIONS += -automatic -keywords:\!ignore -ignore:quiet + + # Some tests needs to find a boot JDK using the JDK8_HOME variable. + $1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK) + + $1_JTREG_BASIC_OPTIONS += \ + $$(addprefix -javaoption:, $$(JTREG_JAVA_OPTIONS)) \ + $$(addprefix -vmoption:, $$(JTREG_VM_OPTIONS)) \ + # + + ifeq ($$($1_JTREG_ASSERT), true) + $1_JTREG_BASIC_OPTIONS += -ea -esa + endif + + ifneq ($$($1_JTREG_NATIVEPATH), ) + $1_JTREG_BASIC_OPTIONS += -nativepath:$$($1_JTREG_NATIVEPATH) + endif + + run-test-$1: + $$(call LogWarn) + $$(call LogWarn, Running test '$$($1_TEST)') + $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) + $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, \ + $$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \ + -Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \ + $$($1_JTREG_BASIC_OPTIONS) \ + -testjdk:$$(JDK_IMAGE_DIR) \ + -dir:$$(TOPDIR) \ + -reportDir:$$($1_TEST_RESULTS_DIR) \ + -workDir:$$($1_TEST_SUPPORT_DIR) \ + $$(JTREG_OPTIONS) \ + $$($1_TEST_NAME) || true ) + + $1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt + + parse-test-$1: run-test-$1 + $$(call LogWarn, Finished running test '$$($1_TEST)') + $$(call LogWarn, Test report is stored in $$(strip \ + $$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR)))) + $$(eval $1_PASSED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \ + for (i=1; i<=NF; i++) { if ($$$$i == "passed:") \ + print $$$$(i+1) } }' $$($1_RESULT_FILE))) + $$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) + $$(eval $1_FAILED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \ + for (i=1; i<=NF; i++) { if ($$$$i == "failed:") \ + print $$$$(i+1) } }' $$($1_RESULT_FILE))) + $$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) + $$(eval $1_ERROR := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \ + for (i=1; i<=NF; i++) { if ($$$$i == "error:") \ + print $$$$(i+1) } }' $$($1_RESULT_FILE))) + $$(if $$($1_ERROR), , $$(eval $1_ERROR := 0)) + $$(eval $1_TOTAL := $$(shell \ + $$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR))) + + $1: run-test-$1 parse-test-$1 + + TARGETS += $1 +endef + + +################################################################################ +# Setup and execute make rules for all selected tests +################################################################################ + +# Helper function to determine which handler to use for the given test +UseGtestTestHandler = \ + $(if $(filter gtest:%, $1), true) + +UseJtregTestHandler = \ + $(if $(filter jtreg:%, $1), true) + +# Now process each test to run and setup a proper make rule +$(foreach test, $(TESTS_TO_RUN), \ + $(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \ + $(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \ + $(eval ALL_TEST_IDS += $(TEST_ID)) \ + $(if $(call UseCustomTestHandler, $(test)), \ + $(eval $(call SetupRunCustomTest, $(TEST_ID), \ + TEST := $(test), \ + )) \ + ) \ + $(if $(call UseGtestTestHandler, $(test)), \ + $(eval $(call SetupRunGtestTest, $(TEST_ID), \ + TEST := $(test), \ + )) \ + ) \ + $(if $(call UseJtregTestHandler, $(test)), \ + $(eval $(call SetupRunJtregTest, $(TEST_ID), \ + TEST := $(test), \ + )) \ + ) \ +) + +# Sort also removes duplicates, so if there is any we'll get fewer words. +ifneq ($(words $(ALL_TEST_IDS)), $(words $(sort $(ALL_TEST_IDS)))) + $(error Duplicate test specification) +endif + + +################################################################################ +# The main target for RunTests.gmk +################################################################################ + +# The SetupRun*Test functions have populated TARGETS. + +TEST_FAILURE := false + +run-test: $(TARGETS) + # Print a table of the result of all tests run and their result + $(ECHO) + $(ECHO) ============================== + $(ECHO) Test summary + $(ECHO) ============================== + $(PRINTF) "%2s %-49s %5s %5s %5s %5s %2s\n" " " TEST \ + TOTAL PASS FAIL ERROR " " + $(foreach test, $(TESTS_TO_RUN), \ + $(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \ + $(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \ + $(if $(filter $($(TEST_ID)_PASSED), $($(TEST_ID)_TOTAL)), \ + $(PRINTF) "%2s %-49s %5d %5d %5d %5d %2s\n" " " "$(test)" \ + $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) $($(TEST_ID)_FAILED) \ + $($(TEST_ID)_ERROR) " " $(NEWLINE) \ + , \ + $(PRINTF) "%2s %-49s %5d %5d %5d %5d %2s\n" ">>" "$(test)" \ + $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) $($(TEST_ID)_FAILED) \ + $($(TEST_ID)_ERROR) "<<" $(NEWLINE) \ + $(eval TEST_FAILURE := true) \ + ) \ + ) + $(ECHO) ============================== + $(if $(filter true, $(TEST_FAILURE)), \ + $(ECHO) TEST FAILURE $(NEWLINE) \ + $(TOUCH) $(MAKESUPPORT_OUTPUTDIR)/exit-with-error \ + , \ + $(ECHO) TEST SUCCESS \ + ) + $(ECHO) + +################################################################################ + +all: run-test + +.PHONY: default all run-test $(TARGETS) diff --git a/jdk/make/CopySamples.gmk b/make/UpdateBuildDocs.gmk similarity index 58% rename from jdk/make/CopySamples.gmk rename to make/UpdateBuildDocs.gmk index 09d0bf7ba44..edcd6485a09 100644 --- a/jdk/make/CopySamples.gmk +++ b/make/UpdateBuildDocs.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,36 +27,43 @@ default: all include $(SPEC) include MakeBase.gmk +include ProcessMarkdown.gmk +################################################################################ +# This makefile updates the generated build html documentation. +# ################################################################################ -SAMPLE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/sample/image -SAMPLE_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/share -SAMPLE_SOLARIS_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/solaris - -# Exclude the vm directory -$(eval $(call SetupCopyFiles, COPY_SHARE_SAMPLES, \ - SRC := $(SAMPLE_SOURCE_DIR), \ - DEST := $(SAMPLE_TARGET_DIR), \ - FILES := $(filter-out $(SAMPLE_SOURCE_DIR)/vm/%, \ - $(call CacheFind, $(SAMPLE_SOURCE_DIR))), \ -)) - -TARGETS += $(COPY_SHARE_SAMPLES) - -ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx)) - $(eval $(call SetupCopyFiles, COPY_SOLARIS_SAMPLES, \ - SRC := $(SAMPLE_SOLARIS_SOURCE_DIR), \ - DEST := $(SAMPLE_TARGET_DIR), \ - FILES := $(call CacheFind, $(SAMPLE_SOLARIS_SOURCE_DIR)), \ - )) - - TARGETS += $(COPY_SOLARIS_SAMPLES) +ifeq ($(PANDOC), ) + $(info No pandoc executable was detected by configure) + $(error Cannot continue) endif +GLOBAL_SPECS_DEFAULT_CSS_FILE := $(JDK_TOPDIR)/make/data/docs-resources/resources/jdk-default.css + ################################################################################ -$(eval $(call IncludeCustomExtension, jdk, CopySamples.gmk)) +DOCS_DIR := $(TOPDIR)/common/doc + +$(eval $(call SetupProcessMarkdown, building, \ + FILES := $(DOCS_DIR)/building.md, \ + DEST := $(DOCS_DIR), \ + CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \ + OPTIONS := --toc, \ +)) +TARGETS += $(building) + +$(eval $(call SetupProcessMarkdown, testing, \ + FILES := $(DOCS_DIR)/testing.md, \ + DEST := $(DOCS_DIR), \ + CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \ + OPTIONS := --toc, \ +)) +TARGETS += $(testing) + +################################################################################ + +$(eval $(call IncludeCustomExtension, , UpdateBuildDocs.gmk)) ################################################################################ diff --git a/make/common/FindTests.gmk b/make/common/FindTests.gmk new file mode 100644 index 00000000000..8394e546ac3 --- /dev/null +++ b/make/common/FindTests.gmk @@ -0,0 +1,77 @@ +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. 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 _FIND_TESTS_GMK +_FIND_TESTS_GMK := 1 + +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, , common/FindTests.gmk)) + +# JTREG_COMPONENTS might have been set by a custom extension +JTREG_COMPONENTS += hotspot jdk langtools nashorn jaxp + +################################################################################ +# Find the Jtreg test groups for the given component. +# +# Parameter 1 is the name of the component. This name is used as variable prefix. +# +# After this macro has been evaluated, the following variables are defined for +# the component: +# JTREG_TESTROOT - The path to the root of the test directory +# JTREG_GROUP_FILES - The file(s) containing the group definitions +# JTREG_TEST_GROUPS - The name of the test groups that the component defines +# +FindJtregGroups = $(NamedParamsMacroTemplate) +define FindJtregGroupsBody + $1_JTREG_TESTROOT := $$(TOPDIR)/$1/test + ifneq ($$(wildcard $$($1_JTREG_TESTROOT)), ) + $1_JTREG_GROUP_FILENAMES := $$(shell $$(SED) -n -e 's/\[\(.*\)\]/\1/g' \ + -e 's/^groups\w*=//p' $$($1_JTREG_TESTROOT)/TEST.ROOT) + $1_JTREG_GROUP_FILES := $$(addprefix $$($1_JTREG_TESTROOT)/, \ + $$($1_JTREG_GROUP_FILENAMES)) + $1_JTREG_TEST_GROUPS := $$(strip $$(shell $$(SED) -n \ + -e 's/\([^ ]*\)\w*=.*/\1/gp' $$(wildcard $$($1_JTREG_GROUP_FILES)) \ + | $$(SORT) -u)) + endif +endef + +# Configure definitions for all available test components +$(foreach component, $(JTREG_COMPONENTS), \ + $(eval $(call FindJtregGroups, $(component)))) + +# Create a list of all available Jtreg test groups in all components +JTREG_TEST_GROUPS += $(sort $(foreach component, $(JTREG_COMPONENTS), \ + $($(component)_JTREG_TEST_GROUPS))) + +# Add Jtreg test groups to list of named tests (test groups, test list, etc) +# ALL_NAMED_TESTS might have been set by a custom extension +ALL_NAMED_TESTS += $(JTREG_TEST_GROUPS) + +# Add Gtest +ALL_NAMED_TESTS += gtest + +################################################################################ + +endif # _FIND_TESTS_GMK diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk index dce01ffa060..ff8ced0fcf6 100644 --- a/make/common/MakeBase.gmk +++ b/make/common/MakeBase.gmk @@ -672,9 +672,9 @@ ifneq ($(DISABLE_CACHE_FIND), true) # Param 1 - Dirs to find in # Param 2 - (optional) specialization. Normally "-a \( ... \)" expression. define CacheFind - $(if $(filter-out $(addsuffix /%,- $(FIND_CACHE_DIRS)) $(FIND_CACHE_DIRS),$1), \ - $(shell $(FIND) $1 \( -type f -o -type l \) $2), \ - $(filter $(addsuffix /%,$(patsubst %/,%,$1)) $1,$(FIND_CACHE))) + $(if $(filter-out $(addsuffix /%,- $(FIND_CACHE_DIRS)) $(FIND_CACHE_DIRS),$1), \ + $(if $(wildcard $1), $(shell $(FIND) $1 \( -type f -o -type l \) $2)), \ + $(filter $(addsuffix /%,$(patsubst %/,%,$1)) $1,$(FIND_CACHE))) endef else @@ -754,6 +754,55 @@ define SetupCopyFilesBody endef +################################################################################ +# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..." +# These will be converted into a series of variables like FOO_KEYWORD1=val1, +# FOO_KEYWORD2=val2, etc. Unknown keywords will cause an error. +# +# Parameter 1 is the name of the rule, and is also the name of the variable. +# +# Remaining parameters are named arguments. These include: +# KEYWORDS A list of valid keywords +# STRING_KEYWORDS A list of valid keywords, processed as string. This means +# that '%20' will be replaced by ' ' to allow for multi-word strings. +# +ParseKeywordVariable = $(NamedParamsMacroTemplate) +define ParseKeywordVariableBody + ifneq ($$($1), ) + # To preserve spaces, substitute them with a hopefully unique pattern + # before splitting and then re-substitute spaces back. + $1_MANGLED := $$(subst $$(SPACE),||||,$$($1)) + $$(foreach mangled_part, $$(subst ;, , $$($1_MANGLED)), \ + $$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \ + $$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \ + $$(eval $1_NO_MATCH := true) \ + $$(foreach keyword, $$($1_KEYWORDS), \ + $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \ + $$(if $$(filter $$(keyword)=%, $$(part)), \ + $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part)))) \ + $$(eval $1_NO_MATCH := ) \ + ) \ + ) \ + $$(foreach keyword, $$($1_STRING_KEYWORDS), \ + $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \ + $$(if $$(filter $$(keyword)=%, $$(part)), \ + $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(subst %20, , $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part))))) \ + $$(eval $1_NO_MATCH := ) \ + ) \ + ) \ + $$(if $$($1_NO_MATCH), \ + $$(if $$(filter $$(part), $$($1_KEYWORDS) $$($1_STRING_KEYWORDS)), \ + $$(info Keyword $$(part) for $1 needs to be assigned a value.) \ + , \ + $$(info $$(part) is not a valid keyword for $1.) \ + $$(info Valid keywords: $$($1_KEYWORDS) $$($1_STRING_KEYWORDS).) \ + ) \ + $$(error Cannot continue) \ + ) \ + ) + endif +endef + ################################################################################ # ShellQuote # @@ -763,6 +812,22 @@ endef ShellQuote = \ $(SQUOTE)$(subst $(SQUOTE),$(SQUOTE)\$(SQUOTE)$(SQUOTE),$(strip $1))$(SQUOTE) +################################################################################ +# FixPath +# +# On Windows, converts a path from cygwin/unix style (e.g. /bin/foo) into +# "mixed mode" (e.g. c:/cygwin/bin/foo). On other platforms, return the path +# unchanged. +# This is normally not needed since we use the FIXPATH prefix for command lines, +# but might be needed in certain circumstances. +ifeq ($(OPENJDK_TARGET_OS), windows) + FixPath = \ + $(shell $(CYGPATH) -m $1) +else + FixPath = \ + $1 +endif + ################################################################################ # Write to and read from file @@ -901,6 +966,17 @@ CommaList = \ $(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \ ) +################################################################################ +# Converts a space separated list to a colon separated list. +# +# Replacing double-colon with a single colon is to workaround the issue with +# some version of make on windows that doesn't substitute spaces with one colon +# properly. +ColonList = \ + $(strip \ + $(subst ::,:,$(subst $(SPACE),:,$(strip $1))) \ + ) + ################################################################################ # Hook to include the corresponding custom file, if present. diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk index 4ceb4513623..9bbcf6c8f51 100644 --- a/make/common/Modules.gmk +++ b/make/common/Modules.gmk @@ -40,6 +40,7 @@ PLATFORM_MODULES := JRE_TOOL_MODULES := UPGRADEABLE_MODULES := AGGREGATOR_MODULES := +DOCS_MODULES := # Hook to include the corresponding custom file, if present. $(eval $(call IncludeCustomExtension, , common/Modules.gmk)) @@ -58,12 +59,12 @@ BOOT_MODULES += \ java.security.sasl \ java.xml \ jdk.httpserver \ + jdk.internal.vm.ci \ jdk.management \ jdk.management.agent \ jdk.net \ jdk.sctp \ jdk.unsupported \ - jdk.vm.ci \ # # to be deprivileged @@ -71,18 +72,23 @@ BOOT_MODULES += \ jdk.naming.rmi \ # +# Modules that directly or indirectly requiring upgradeable modules +# should carefully be considered if it should be upgradeable or not. UPGRADEABLE_MODULES += \ java.activation \ + java.compiler \ java.corba \ java.transaction \ java.xml.bind \ java.xml.ws \ java.xml.ws.annotation \ + jdk.internal.vm.compiler \ # -# Modules explicitly declared as not being upgradeable even though they require -# an upgradeable module. -NON_UPGRADEABLE_MODULES += +UPGRADEABLE_TOOL_MODULES += \ + jdk.xml.bind \ + jdk.xml.ws \ + # AGGREGATOR_MODULES += \ java.se \ @@ -95,8 +101,6 @@ PLATFORM_MODULES += \ # PLATFORM_MODULES += \ - java.compiler \ - jdk.incubator.httpclient \ java.scripting \ java.security.jgss \ java.smartcardio \ @@ -105,10 +109,10 @@ PLATFORM_MODULES += \ java.xml.crypto \ jdk.accessibility \ jdk.charsets \ - jdk.crypto.ec \ jdk.crypto.cryptoki \ - jdk.desktop \ + jdk.crypto.ec \ jdk.dynalink \ + jdk.incubator.httpclient \ jdk.jsobject \ jdk.localedata \ jdk.naming.dns \ @@ -119,18 +123,65 @@ PLATFORM_MODULES += \ jdk.zipfs \ # +ifeq ($(OPENJDK_TARGET_OS), windows) + PLATFORM_MODULES += jdk.crypto.mscapi +endif + +ifeq ($(OPENJDK_TARGET_OS), solaris) + PLATFORM_MODULES += jdk.crypto.ucrypto +endif + JRE_TOOL_MODULES += \ jdk.jdwp.agent \ jdk.pack \ jdk.scripting.nashorn.shell \ # -ifeq ($(OPENJDK_TARGET_OS), windows) - PLATFORM_MODULES += jdk.crypto.mscapi -endif -ifeq ($(OPENJDK_TARGET_OS), solaris) - PLATFORM_MODULES += jdk.crypto.ucrypto -endif +################################################################################ + +# DOCS_MODULES defines the root modules for javadoc generation. +# All of their `require transitive` modules directly and indirectly will be included. +DOCS_MODULES += \ + java.se.ee \ + java.smartcardio \ + jdk.accessibility \ + jdk.attach \ + jdk.charsets \ + jdk.compiler \ + jdk.crypto.cryptoki \ + jdk.crypto.ec \ + jdk.dynalink \ + jdk.editpad \ + jdk.hotspot.agent \ + jdk.httpserver \ + jdk.incubator.httpclient \ + jdk.jartool \ + jdk.javadoc \ + jdk.jcmd \ + jdk.jconsole \ + jdk.jdeps \ + jdk.jdi \ + jdk.jdwp.agent \ + jdk.jlink \ + jdk.jsobject \ + jdk.jshell \ + jdk.jstatd \ + jdk.localedata \ + jdk.management \ + jdk.management.agent \ + jdk.naming.dns \ + jdk.naming.rmi \ + jdk.net \ + jdk.pack \ + jdk.policytool \ + jdk.rmic \ + jdk.scripting.nashorn \ + jdk.sctp \ + jdk.security.auth \ + jdk.security.jgss \ + jdk.xml.dom \ + jdk.zipfs \ + # # These modules are included in the interim image which is used to run profiling # before building the real images. @@ -147,7 +198,7 @@ endif # Filter out Graal specific modules if Graal build is disabled ifeq ($(INCLUDE_GRAAL), false) - MODULES_FILTER += jdk.vm.compiler + MODULES_FILTER += jdk.internal.vm.compiler endif ################################################################################ @@ -182,6 +233,8 @@ ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE)) endif SRC_SUBDIRS += share/classes +SPEC_SUBDIRS += share/specs + # Find all module-info.java files for the current build target platform and # configuration. # Param 1 - Module to find for, set to * for finding all @@ -234,6 +287,12 @@ FindModuleSrcDirs = \ $(addsuffix /$(strip $1), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \ $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))))) +# Find all specs dirs for a particular module +# $1 - Module to find specs dirs for +FindModuleSpecsDirs = \ + $(strip $(wildcard \ + $(foreach sub, $(SPEC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))))) + # Construct the complete module source path GetModuleSrcPath = \ $(call PathList, \ @@ -241,7 +300,8 @@ GetModuleSrcPath = \ $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /*/$(sub), $(TOP_SRC_DIRS)))) ################################################################################ -# Extract module dependencies from module-info.java files. +# Extract module dependencies from module-info.java files, both normal +# dependencies ("requires"), and indirect exports ("requires transitive"). MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk @@ -255,25 +315,39 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \ ( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \ $(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\ BEGIN { if (MODULE != "java.base") printf(" java.base"); } \ - /requires/ { sub(/;/, ""); \ - sub(/requires/, ""); \ - sub(/transitive/, ""); \ - sub(/\/\/.*/, ""); \ - sub(/\/\*.*\*\//, ""); \ - gsub(/^ +\*.*/, ""); \ - gsub(/ /, ""); \ - printf(" %s", $$0) } \ - END { printf("\n") }' $m \ + /^ *requires/ { sub(/;/, ""); \ + sub(/requires/, ""); \ + sub(/transitive/, ""); \ + sub(/\/\/.*/, ""); \ + sub(/\/\*.*\*\//, ""); \ + gsub(/^ +\*.*/, ""); \ + gsub(/ /, ""); \ + printf(" %s", $$0) } \ + END { printf("\n") }' $m && \ + $(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) :=" && \ + $(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\ + BEGIN { if (MODULE != "java.base") printf(" java.base"); } \ + /^ *requires *transitive/ { \ + sub(/;/, ""); \ + sub(/requires/, ""); \ + sub(/transitive/, ""); \ + sub(/\/\/.*/, ""); \ + sub(/\/\*.*\*\//, ""); \ + gsub(/^ +\*.*/, ""); \ + gsub(/ /, ""); \ + printf(" %s", $$0) } \ + END { printf("\n") }' $m \ ) >> $@ $(NEWLINE)) -include $(MODULE_DEPS_MAKEFILE) -# Param 1: Module to find deps for +# Find dependencies ("requires") for a given module. +# Param 1: Module to find dependencies for. FindDepsForModule = \ $(DEPS_$(strip $1)) -# Finds transitive dependencies in 3 levels. -# Param 1: Module to find transitive deps for +# Find dependencies ("requires") transitively in 3 levels for a given module. +# Param 1: Module to find dependencies for. FindTransitiveDepsForModule = \ $(sort $(call FindDepsForModule, $1) \ $(foreach m, $(call FindDepsForModule, $1), \ @@ -281,18 +355,35 @@ FindTransitiveDepsForModule = \ $(foreach n, $(call FindDepsForModule, $m), \ $(call FindDepsForModule, $n)))) +# Find dependencies ("requires") transitively in 3 levels for a set of modules. +# Param 1: List of modules to find dependencies for. +FindTransitiveDepsForModules = \ + $(sort $(foreach m, $1, $(call FindTransitiveDepsForModule, $m))) + +# Find indirect exported modules ("requires transitive") for a given module . +# Param 1: Module to find indirect exported modules for. +FindIndirectExportsForModule = \ + $(TRANSITIVE_MODULES_$(strip $1)) + +# Finds indirect exported modules transitively in 3 levels for a given module. +# Param 1: Module to find indirect exported modules for. +FindTransitiveIndirectDepsForModule = \ + $(sort $(call FindIndirectExportsForModule, $1) \ + $(foreach m, $(call FindIndirectExportsForModule, $1), \ + $(call FindIndirectExportsForModule, $m) \ + $(foreach n, $(call FindIndirectExportsForModule, $m), \ + $(call FindIndirectExportsForModule, $n)))) + +# Finds indirect exported modules transitively in 3 levels for a set of modules. +# Param 1: List of modules to find indirect exported modules for. +FindTransitiveIndirectDepsForModules = \ + $(sort $(foreach m, $1, $(call FindTransitiveIndirectDepsForModule, $m))) + # Upgradeable modules are those that are either defined as upgradeable or that # require an upradeable module. FindAllUpgradeableModules = \ - $(filter-out $(MODULES_FILTER) $(NON_UPGRADEABLE_MODULES), \ - $(sort $(UPGRADEABLE_MODULES) $(foreach m, \ - $(filter-out $(UPGRADEABLE_MODULES), $(call FindAllModules)), \ - $(if $(filter $(UPGRADEABLE_MODULES), \ - $(call FindTransitiveDepsForModule, $m)), \ - $m \ - ) \ - )) \ - ) + $(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_MODULES) $(UPGRADEABLE_TOOL_MODULES))) + ################################################################################ @@ -329,6 +420,10 @@ define ReadSingleImportMetaData else ifeq ($$(classloader), ext) PLATFORM_MODULES += $1 endif + ifneq ($$(include_in_docs), false) + # defaults to true if unspecified + DOCS_MODULES += $1 + endif else # Default to include in all JRE_MODULES += $1 diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk index ae0cc2068de..28911884d04 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -165,6 +165,7 @@ endif WINDOWS_SHOWINCLUDE_SED_PATTERN := \ -e '/^Note: including file:/!d' \ -e 's|Note: including file: *||' \ + -e 's|\r||g' \ -e 's|\\|/|g' \ -e 's|^\([a-zA-Z]\):|$(UNIX_PATH_PREFIX)/\1|g' \ -e '\|$(TOPDIR)|I !d' \ diff --git a/make/common/ProcessMarkdown.gmk b/make/common/ProcessMarkdown.gmk new file mode 100644 index 00000000000..fe4d30e75cf --- /dev/null +++ b/make/common/ProcessMarkdown.gmk @@ -0,0 +1,103 @@ +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. 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. +# + +ifeq (,$(_MAKEBASE_GMK)) + $(error You must include MakeBase.gmk prior to including ProcessMarkdown.gmk) +endif + +# Helper function for SetupProcessMarkdown +# $1: The $1 from SetupProcessMarkdown +# $2: The name of the current source file, relative to $1_SRC +define ProcessMarkdown + $1_$2_OUTPUT_FILE := $$($1_DEST)/$$(basename $2).html + $1_$2_TARGET_DIR := $$(dir $$($1_$2_OUTPUT_FILE)) + ifneq ($$($1_CSS), ) + ifneq ($$(findstring http:/, $$($1_CSS)), ) + $1_$2_CSS_OPTION := --css '$$($1_CSS)' + else + $1_$2_CSS := $$(strip $$(call RelativePath, $$($1_CSS), $$($1_$2_TARGET_DIR))) + $1_$2_CSS_OPTION := --css '$$($1_$2_CSS)' + endif + endif + $1_$2_OPTIONS = $$(shell $$(GREP) _pandoc-options_: $$($1_SRC)/$2 | $$(CUT) -d : -f 2-) + $1_$2_MARKER := $$(subst /,_,$1_$2) + + $1_$2_VARDEPS := $$($1_OPTIONS) $$($1_CSS) + $1_$2_VARDEPS_FILE := $$(call DependOnVariable, $1_$2_VARDEPS, \ + $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER).vardeps) + +$$($1_$2_OUTPUT_FILE): $$($1_SRC)/$2 $$($1_$2_VARDEPS_FILE) + $$(call LogInfo, Converting $2 to html) + $$(call MakeDir, $$($1_$2_TARGET_DIR) $$(SUPPORT_OUTPUTDIR)/markdown) + $$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER), \ + $$(PANDOC) $$($1_OPTIONS) -f markdown -t html5 --standalone \ + $$($1_$2_CSS_OPTION) $$($1_$2_OPTIONS) '$$<' -o '$$@') + ifneq ($$(findstring $$(LOG_LEVEL), debug trace),) + TOO_LONG_LINES=`$$(GREP) -E -e '^.{80}.+$$$$' $$<` || true ; \ + if [ "x$$$$TOO_LONG_LINES" != x ]; then \ + $$(ECHO) "Warning: Unsuitable markdown in $$<:" ; \ + $$(ECHO) "The following lines are longer than 80 characters:" ; \ + $$(GREP) -E -n -e '^.{80}.+$$$$' $$< || true ; \ + fi + endif + + $1 += $$($1_$2_OUTPUT_FILE) +endef + +################################################################################ +# Setup make rules for converting a markdown file to html. +# +# Parameter 1 is the name of the rule. This name is used as variable prefix, +# and the targets generated are listed in a variable by that name. +# +# Remaining parameters are named arguments. These include: +# SRC : Source root dir (defaults to dir of first file) +# DEST : Dest root dir +# FILES : List of files to copy with absolute paths, or path relative to SRC. +# Must be in SRC. +# OPTIONS : Additional options to pandoc +# +SetupProcessMarkdown = $(NamedParamsMacroTemplate) +define SetupProcessMarkdownBody + ifeq ($$($1_FILES), ) + $$(error FILES is missing in SetupProcessMarkdown $1) + endif + + ifeq ($$($1_DEST), ) + $$(error DEST is missing in SetupProcessMarkdown $1) + endif + + # Default SRC to the dir of the first file. + ifeq ($$($1_SRC), ) + $1_SRC := $$(dir $$(firstword $$($1_FILES))) + endif + + # Remove any trailing slash from SRC and DEST + $1_SRC := $$(patsubst %/,%,$$($1_SRC)) + $1_DEST := $$(patsubst %/,%,$$($1_DEST)) + + $$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \ + $$(eval $$(call ProcessMarkdown,$1,$$f)) \ + ) +endef diff --git a/make/common/SetupJavaCompilers.gmk b/make/common/SetupJavaCompilers.gmk index 5ac4b86fe23..4e7c8eebf19 100644 --- a/make/common/SetupJavaCompilers.gmk +++ b/make/common/SetupJavaCompilers.gmk @@ -32,7 +32,7 @@ DISABLE_WARNINGS := -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast, # If warnings needs to be non-fatal for testing purposes use a command like: # make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000" -JAVAC_WARNINGS := -Xlint:all,-removal -Werror +JAVAC_WARNINGS := -Xlint:all -Werror # The BOOT_JAVAC setup uses the boot jdk compiler to compile the tools # and the interim javac, to be run by the boot jdk. @@ -69,7 +69,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \ JVM := $(JAVA_JAVAC), \ JAVAC := $(NEW_JAVAC), \ - FLAGS := -source 9 -target 9 \ + FLAGS := -source 9 -target 9 --doclint-format html5 \ -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \ SERVER_DIR := $(SJAVAC_SERVER_DIR), \ SERVER_JVM := $(SJAVAC_SERVER_JAVA))) diff --git a/make/devkit/createGraphvizBundle.sh b/make/devkit/createGraphvizBundle.sh new file mode 100644 index 00000000000..290e68c382c --- /dev/null +++ b/make/devkit/createGraphvizBundle.sh @@ -0,0 +1,63 @@ +#!/bin/bash -e +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. 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. +# +# Create a bundle in the current directory, containing what's needed to run +# the 'dot' program from the graphviz suite by the OpenJDK build. + +TMPDIR=`mktemp -d -t graphvizbundle-XXXX` +trap "rm -rf \"$TMPDIR\"" EXIT + +ORIG_DIR=`pwd` +cd "$TMPDIR" +GRAPHVIZ_VERSION=2.38.0-1 +PACKAGE_VERSION=1.1 +TARGET_PLATFORM=linux_x64 +BUNDLE_NAME=graphviz-$TARGET_PLATFORM-$GRAPHVIZ_VERSION+$PACKAGE_VERSION.tar.gz +wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-$GRAPHVIZ_VERSION.el6.x86_64.rpm +wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-libs-$GRAPHVIZ_VERSION.el6.x86_64.rpm +wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-plugins-core-$GRAPHVIZ_VERSION.el6.x86_64.rpm +wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-plugins-x-$GRAPHVIZ_VERSION.el6.x86_64.rpm +wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/libtool-ltdl-2.2.6-15.5.el6.x86_64.rpm + +mkdir graphviz +cd graphviz +for rpm in ../*.rpm; do + rpm2cpio $rpm | cpio --extract --make-directories +done + +cat > dot << EOF +#!/bin/bash +# Get an absolute path to this script +this_script_dir=\`dirname \$0\` +this_script_dir=\`cd \$this_script_dir > /dev/null && pwd\` +export LD_LIBRARY_PATH="\$this_script_dir/usr/lib64:\$LD_LIBRARY_PATH" +exec \$this_script_dir/usr/bin/dot "\$@" +EOF +chmod +x dot +export LD_LIBRARY_PATH="$TMPDIR/graphviz/usr/lib64:$LD_LIBRARY_PATH" +# create config file +./dot -c +tar -cvzf ../$BUNDLE_NAME * +cp ../$BUNDLE_NAME "$ORIG_DIR" diff --git a/make/devkit/createPandocBundle.sh b/make/devkit/createPandocBundle.sh new file mode 100644 index 00000000000..0badfa8ffda --- /dev/null +++ b/make/devkit/createPandocBundle.sh @@ -0,0 +1,73 @@ +#!/bin/bash -e +# +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. 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. +# +# Create a bundle in the current directory, containing what's needed to run +# the 'pandoc' program by the OpenJDK build. + +TMPDIR=`mktemp -d -t pandocbundle-XXXX` +trap "rm -rf \"$TMPDIR\"" EXIT + +ORIG_DIR=`pwd` +cd "$TMPDIR" +PANDOC_VERSION=1.17.2 +FULL_PANDOC_VERSION=1.17.2-1 +PACKAGE_VERSION=1.0 +TARGET_PLATFORM=linux_x64 +BUNDLE_NAME=pandoc-$TARGET_PLATFORM-$PANDOC_VERSION+$PACKAGE_VERSION.tar.gz + +wget https://github.com/jgm/pandoc/releases/download/$PANDOC_VERSION/pandoc-$FULL_PANDOC_VERSION-amd64.deb + +mkdir pandoc +cd pandoc +ar p ../pandoc-$FULL_PANDOC_VERSION-amd64.deb data.tar.gz | tar xz +cd .. + +# Pandoc depends on libgmp.so.10, which in turn depends on libc. No readily +# available precompiled binaries exists which match the requirement of +# support for older linuxes (glibc 2.12), so we'll compile it ourselves. + +LIBGMP_VERSION=6.1.2 + +wget https://gmplib.org/download/gmp/gmp-$LIBGMP_VERSION.tar.xz +mkdir gmp +cd gmp +tar xf ../gmp-$LIBGMP_VERSION.tar.xz +cd gmp-$LIBGMP_VERSION +./configure --prefix=$TMPDIR/pandoc/usr +make +make install +cd ../.. + +cat > pandoc/pandoc << EOF +#!/bin/bash +# Get an absolute path to this script +this_script_dir=\`dirname \$0\` +this_script_dir=\`cd \$this_script_dir > /dev/null && pwd\` +export LD_LIBRARY_PATH="\$this_script_dir/usr/lib:\$LD_LIBRARY_PATH" +exec \$this_script_dir/usr/bin/pandoc "\$@" +EOF +chmod +x pandoc/pandoc +tar -cvzf ../$BUNDLE_NAME pandoc +cp ../$BUNDLE_NAME "$ORIG_DIR" diff --git a/nashorn/.hgtags b/nashorn/.hgtags index 22c28403722..bc0d5aa0566 100644 --- a/nashorn/.hgtags +++ b/nashorn/.hgtags @@ -389,3 +389,25 @@ ddc52e72757086a75a54371e8e7f56a3f89f1e55 jdk-9+152 19aaaf2d02b7d6986538cd9a8c46901ecb50eebf jdk-9+153 a84b49cfee63716975535abae2865ffef4dd6474 jdk-9+154 f9bb37a817b3cd3b758a60f3c68258a6554eb382 jdk-9+155 +d577398d31111be4bdaa08008247cf4242eaea94 jdk-9+156 +f6070efba6af0dc003e24ca736426c93e99ee96a jdk-9+157 +13ae2480a4c395026b3aa1739e0f9895dc8b25d9 jdk-9+158 +d75af059cff651c1b5cccfeb4c9ea8d054b28cfd jdk-9+159 +9d4dbb8cbe7ce321c6e9e34dc9e0974760710907 jdk-9+160 +d6ef419af865dccf1e5be8047b0aba09286ffa93 jdk-9+161 +2cd29b339692524de64d049b329873facaff9727 jdk-9+162 +5e5e436543daea0c174d878d5e3ff8dd791e538a jdk-9+163 +b473fab09baab51a06ffba02eb06c7f5ee8578f7 jdk-9+164 +e36e62d3ea53c316f295b37bcc19867fbf510235 jdk-9+165 +5b2e7b2101c0048ba9f1df722e56611f523fdfe8 jdk-9+166 +e118c818dbf84d15191414c453b77c089116fdc0 jdk-9+167 +0f81cde5a1f75786f381dbfb59b9afbab70174c7 jdk-9+168 +131e250080158e57ce45130560f5f987b92642b5 jdk-9+169 +550bfc15779f8f339610793867fdc251125811b5 jdk-9+170 +fc416270a776409b74006262dd0a9f5f5ff31555 jdk-9+171 +c8d6b740f0f7ec834b4157bf0d4523e8bbddb3f0 jdk-9+172 +fa8e4de50e821eed876388c84f7129a6739268be jdk-9+173 +7d4006eaa088848c4fa2ac4aef0ba9982f80752a jdk-9+174 +734b3209b6edeb57e482c97793ae9c066af72871 jdk-9+175 +3c6fbdf6e785aaf18d35ce9c6684369952fd22ec jdk-9+176 +aa7404e062b95f679018f25eaaf933dcf0cf3f2b jdk-9+177 diff --git a/nashorn/make/project.properties b/nashorn/make/project.properties index e47ed11ccb3..5626838f560 100644 --- a/nashorn/make/project.properties +++ b/nashorn/make/project.properties @@ -37,7 +37,8 @@ javac.target=1.9 javadoc.option=\ -tag "implSpec:a:Implementation Requirements:" \ - -tag "implNote:a:Implementation Note:" + -tag "implNote:a:Implementation Note:" \ + -tag "moduleGraph:a:Module Graph" # nashorn version information nashorn.version=0.1 diff --git a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/StandardOperation.java b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/StandardOperation.java index e5acb1b55a0..7b7865d8ed7 100644 --- a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/StandardOperation.java +++ b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/StandardOperation.java @@ -95,8 +95,8 @@ public enum StandardOperation implements Operation { /** * Get the value from a namespace defined on an object. Call sites with this * operation should have a signature of - * (receiver, name)→value or - * (receiver)→value when used with {@link NamedOperation}, with + * (receiver, name)→value or + * (receiver)→value when used with {@link NamedOperation}, with * all parameters and return type being of any type (either primitive or * reference). This operation must always be used as part of a {@link NamespaceOperation}. */ @@ -104,21 +104,21 @@ public enum StandardOperation implements Operation { /** * Set the value in a namespace defined on an object. Call sites with this * operation should have a signature of - * (receiver, name, value)→void or - * (receiver, value)→void when used with {@link NamedOperation}, + * (receiver, name, value)→void or + * (receiver, value)→void when used with {@link NamedOperation}, * with all parameters and return type being of any type (either primitive * or reference). This operation must always be used as part of a {@link NamespaceOperation}. */ SET, /** * Call a callable object. Call sites with this operation should have a - * signature of (callable, receiver, arguments...)→value, + * signature of (callable, receiver, arguments...)→value, * with all parameters and return type being of any type (either primitive or * reference). Typically, the callables are presumed to be methods of an object, so * an explicit receiver value is always passed to the callable before the arguments. * If a callable has no concept of a receiver, it is free to ignore the value of the * receiver argument. - * The CALL operation is allowed to be used with a + * The {@code CALL} operation is allowed to be used with a * {@link NamedOperation} even though it does not take a name. Using it with * a named operation won't affect its signature; the name is solely meant to * be used as a diagnostic description for error messages. @@ -126,9 +126,9 @@ public enum StandardOperation implements Operation { CALL, /** * Call a constructor object. Call sites with this operation should have a - * signature of (constructor, arguments...)→value, with all + * signature of (constructor, arguments...)→value, with all * parameters and return type being of any type (either primitive or - * reference). The NEW operation is allowed to be used with a + * reference). The {@code NEW} operation is allowed to be used with a * {@link NamedOperation} even though it does not take a name. Using it with * a named operation won't affect its signature; the name is solely meant to * be used as a diagnostic description for error messages. diff --git a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/CallerSensitiveDynamicMethod.java b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/CallerSensitiveDynamicMethod.java index 016873489d5..6d12e2f2fd8 100644 --- a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/CallerSensitiveDynamicMethod.java +++ b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/CallerSensitiveDynamicMethod.java @@ -92,7 +92,6 @@ import java.lang.reflect.Executable; import java.lang.reflect.Member; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.security.AccessControlContext; import java.security.AccessController; import java.security.PrivilegedAction; diff --git a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/CheckRestrictedPackage.java b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/CheckRestrictedPackage.java index 2427cc63205..22ce67ee968 100644 --- a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/CheckRestrictedPackage.java +++ b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/CheckRestrictedPackage.java @@ -84,7 +84,6 @@ package jdk.dynalink.beans; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.security.AccessControlContext; import java.security.AccessController; import java.security.PrivilegedAction; diff --git a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/linker/GuardingTypeConverterFactory.java b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/linker/GuardingTypeConverterFactory.java index f5db5fc3616..dda73197c91 100644 --- a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/linker/GuardingTypeConverterFactory.java +++ b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/linker/GuardingTypeConverterFactory.java @@ -108,8 +108,8 @@ public interface GuardingTypeConverterFactory { * language's objects to Java interfaces and classes by generating adapters * for them. *

                    - * The type of the invocation is (sourceType)→targetType, while the - * type of the guard is (sourceType)→boolean. You are allowed to + * The type of the invocation is (sourceType)→targetType, while the + * type of the guard is (sourceType)→boolean. You are allowed to * return unconditional invocations (with no guard) if the source type is * specific to your runtime and your runtime only. *

                    Note that this method will never be invoked for diff --git a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/linker/support/Lookup.java b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/linker/support/Lookup.java index b996821d8f3..d9de82e0b4e 100644 --- a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/linker/support/Lookup.java +++ b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/linker/support/Lookup.java @@ -89,7 +89,6 @@ import java.lang.invoke.MethodType; import java.lang.reflect.Constructor; import java.lang.reflect.Executable; import java.lang.reflect.Field; -import java.lang.reflect.Module; import java.lang.reflect.Method; /** diff --git a/nashorn/src/jdk.dynalink/share/classes/module-info.java b/nashorn/src/jdk.dynalink/share/classes/module-info.java index 9e9fcbc3d20..3a79c4b8e60 100644 --- a/nashorn/src/jdk.dynalink/share/classes/module-info.java +++ b/nashorn/src/jdk.dynalink/share/classes/module-info.java @@ -24,6 +24,7 @@ */ /** + * Defines the API for dynamic linking of high-level operations on objects. *

                    * Dynalink is a library for dynamic linking of high-level operations on objects. * These operations include "read a property", @@ -31,8 +32,8 @@ * useful for implementing programming languages where at least some expressions * have dynamic types (that is, types that can not be decided statically), and * the operations on dynamic types are expressed as - * {@link java.lang.invoke.CallSite call sites}. These call sites will be - * linked to appropriate target {@link java.lang.invoke.MethodHandle method handles} + * {@linkplain java.lang.invoke.CallSite call sites}. These call sites will be + * linked to appropriate target {@linkplain java.lang.invoke.MethodHandle method handles} * at run time based on actual types of the values the expressions evaluated to. * These can change between invocations, necessitating relinking the call site * multiple times to accommodate new types; Dynalink handles all that and more. @@ -204,7 +205,7 @@ * on how it links the various operations. *

                    Cross-language interoperability

                    * A {@code DynamicLinkerFactory} can be configured with a - * {@link jdk.dynalink.DynamicLinkerFactory#setClassLoader(ClassLoader) class + * {@linkplain jdk.dynalink.DynamicLinkerFactory#setClassLoader(ClassLoader) class * loader}. It will try to instantiate all * {@link jdk.dynalink.linker.GuardingDynamicLinkerExporter} classes visible to * that class loader and compose the linkers they provide into the @@ -216,6 +217,11 @@ * language runtime B gets passed to code from language runtime A, the linker * from B will get a chance to link the call site in A when it encounters the * object from B. + * + * @uses jdk.dynalink.linker.GuardingDynamicLinkerExporter + * + * @moduleGraph + * @since 9 */ module jdk.dynalink { requires java.logging; diff --git a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java index d792738cfa4..2821111d69a 100644 --- a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java +++ b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java @@ -281,8 +281,7 @@ public final class Main extends Shell { } } - // FIXME: needs to be changed to use javase 9 docs later - private static String JAVADOC_BASE = "http://download.java.net/jdk9/docs/api/"; + private static String JAVADOC_BASE = "https://docs.oracle.com/javase/9/docs/api/"; private static void openBrowserForJavadoc(String relativeUrl) { try { diff --git a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/module-info.java b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/module-info.java index 790fc62b366..8f3a13550f4 100644 --- a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/module-info.java +++ b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/module-info.java @@ -24,12 +24,23 @@ */ /** - * Nashorn shell module + * Defines Nashorn shell module. + * + *

                    This module includes the command line tool {@index jjs jjs tool} + * to invoke the Nashorn engine. + * + *

                    + *
                    Tool Guides: + *
                    {@extLink jjs_tool_reference jjs} + *
                    + * + * @moduleGraph + * @since 9 */ module jdk.scripting.nashorn.shell { - requires java.desktop; requires java.compiler; - requires jdk.scripting.nashorn; + requires java.desktop; requires jdk.internal.le; + requires jdk.scripting.nashorn; } diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForOfLoopTree.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForOfLoopTree.java index d95e2ed638e..999c4d3e3f9 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForOfLoopTree.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForOfLoopTree.java @@ -38,7 +38,7 @@ package jdk.nashorn.api.tree; */ public interface ForOfLoopTree extends LoopTree { /** - * The for..in left hand side expression. + * The for..of left hand side expression. * * @return the left hand side expression */ @@ -52,7 +52,7 @@ public interface ForOfLoopTree extends LoopTree { ExpressionTree getExpression(); /** - * The statement contained in this for..in statement. + * The statement contained in this for..of statement. * * @return the statement */ diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TreeVisitor.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TreeVisitor.java index ea8fc0d4222..70c124d453c 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TreeVisitor.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TreeVisitor.java @@ -30,7 +30,7 @@ package jdk.nashorn.api.tree; * Classes implementing this interface are used to operate * on a tree when the kind of tree is unknown at compile time. * When a visitor is passed to an tree's {@link Tree#accept - * accept} method, the visitXYZ method most applicable + * accept} method, the visitXyz method most applicable * to that tree is invoked. * *

                    Classes implementing this interface may or may not throw a diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/SpillObjectCreator.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/SpillObjectCreator.java index c4e4aae312a..c23920bf751 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/SpillObjectCreator.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/SpillObjectCreator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/TypeMap.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/TypeMap.java index a26e6b93f56..f554a3cdada 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/TypeMap.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/TypeMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java index a40ed5f22ce..aeec38cc796 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java @@ -51,9 +51,7 @@ import java.lang.module.ModuleFinder; import java.lang.module.ModuleReader; import java.lang.module.ModuleReference; import java.lang.reflect.Field; -import java.lang.reflect.Layer; import java.lang.reflect.Modifier; -import java.lang.reflect.Module; import java.net.MalformedURLException; import java.net.URL; import java.nio.file.Path; @@ -378,7 +376,7 @@ public final class Context { static final boolean javaSqlFound, javaSqlRowsetFound; static { - final Layer boot = Layer.boot(); + final ModuleLayer boot = ModuleLayer.boot(); javaSqlFound = boot.findModule("java.sql").isPresent(); javaSqlRowsetFound = boot.findModule("java.sql.rowset").isPresent(); } @@ -1334,7 +1332,7 @@ public final class Context { * @return the new Module */ static Module createModuleTrusted(final ModuleDescriptor descriptor, final ClassLoader loader) { - return createModuleTrusted(Layer.boot(), descriptor, loader); + return createModuleTrusted(ModuleLayer.boot(), descriptor, loader); } /** @@ -1346,7 +1344,7 @@ public final class Context { * @param loader the class loader of the module * @return the new Module */ - static Module createModuleTrusted(final Layer parent, final ModuleDescriptor descriptor, final ClassLoader loader) { + static Module createModuleTrusted(final ModuleLayer parent, final ModuleDescriptor descriptor, final ClassLoader loader) { final String mn = descriptor.name(); final ModuleReference mref = new ModuleReference(descriptor, null) { @@ -1372,10 +1370,10 @@ public final class Context { }; final Configuration cf = parent.configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of(mn)); + .resolve(finder, ModuleFinder.of(), Set.of(mn)); - final PrivilegedAction pa = () -> parent.defineModules(cf, name -> loader); - final Layer layer = AccessController.doPrivileged(pa, GET_LOADER_ACC_CTXT); + final PrivilegedAction pa = () -> parent.defineModules(cf, name -> loader); + final ModuleLayer layer = AccessController.doPrivileged(pa, GET_LOADER_ACC_CTXT); final Module m = layer.findModule(mn).get(); assert m.getLayer() == layer; @@ -1796,9 +1794,9 @@ public final class Context { collect(Collectors.toSet()); } - final Layer boot = Layer.boot(); + final ModuleLayer boot = ModuleLayer.boot(); final Configuration conf = boot.configuration(). - resolveRequires(mf, ModuleFinder.of(), rootMods); + resolve(mf, ModuleFinder.of(), rootMods); final String firstMod = rootMods.iterator().next(); return boot.defineModulesWithOneLoader(conf, cl).findLoader(firstMod); } diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/NashornLoader.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/NashornLoader.java index c9d48053bd3..cc86b464355 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/NashornLoader.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/NashornLoader.java @@ -34,7 +34,6 @@ import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; -import java.lang.reflect.Module; import java.security.AccessController; import java.security.CodeSource; import java.security.Permission; diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptLoader.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptLoader.java index 4a223527876..d0e0ca14899 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptLoader.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptLoader.java @@ -26,9 +26,10 @@ package jdk.nashorn.internal.runtime; import java.lang.module.ModuleDescriptor; -import java.lang.reflect.Module; +import java.lang.module.ModuleDescriptor.Modifier; import java.security.CodeSource; import java.util.Objects; +import java.util.Set; /** * Responsible for loading script generated classes. @@ -69,12 +70,11 @@ final class ScriptLoader extends NashornLoader { private Module createModule(final String moduleName) { final Module structMod = context.getStructLoader().getModule(); final ModuleDescriptor.Builder builder = - ModuleDescriptor.module(moduleName) - .requires("java.base") + ModuleDescriptor.newModule(moduleName, Set.of(Modifier.SYNTHETIC)) .requires("java.logging") .requires(NASHORN_MODULE.getName()) .requires(structMod.getName()) - .contains(SCRIPTS_PKG); + .packages(Set.of(SCRIPTS_PKG)); if (Context.javaSqlFound) { builder.requires("java.sql"); diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java index bf34f1f14a1..8a914ddfd03 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -56,6 +56,8 @@ import jdk.nashorn.internal.ir.debug.JSONWriter; import jdk.nashorn.internal.objects.AbstractIterator; import jdk.nashorn.internal.objects.Global; import jdk.nashorn.internal.objects.NativeObject; +import jdk.nashorn.internal.objects.NativeJava; +import jdk.nashorn.internal.objects.NativeArray; import jdk.nashorn.internal.parser.Lexer; import jdk.nashorn.internal.runtime.arrays.ArrayIndex; import jdk.nashorn.internal.runtime.linker.Bootstrap; @@ -398,6 +400,30 @@ public final class ScriptRuntime { if (itr != null) { return itr; } + + if (obj instanceof Map) { + return new Iterator() { + private Iterator iter = ((Map)obj).entrySet().iterator(); + + @Override + public boolean hasNext() { + return iter.hasNext(); + } + + @Override + public Object next() { + Map.Entry next = (Map.Entry)iter.next(); + Object[] keyvalue = new Object[]{next.getKey(), next.getValue()}; + NativeArray array = NativeJava.from(null, keyvalue); + return array; + } + + @Override + public void remove() { + iter.remove(); + } + }; + } } final Global global = Global.instance(); diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SpillProperty.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SpillProperty.java index 26a5048fad7..ec197ed77ae 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SpillProperty.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SpillProperty.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StructureLoader.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StructureLoader.java index 075540a4eda..f1c9ef315b0 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StructureLoader.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StructureLoader.java @@ -31,8 +31,9 @@ import static jdk.nashorn.internal.codegen.CompilerConstants.JS_OBJECT_DUAL_FIEL import static jdk.nashorn.internal.codegen.CompilerConstants.JS_OBJECT_SINGLE_FIELD_PREFIX; import java.lang.module.ModuleDescriptor; -import java.lang.reflect.Module; +import java.lang.module.ModuleDescriptor.Modifier; import java.security.ProtectionDomain; +import java.util.Set; import jdk.nashorn.internal.codegen.ObjectClassGenerator; /** @@ -62,12 +63,11 @@ final class StructureLoader extends NashornLoader { } private Module createModule(final String moduleName) { - final ModuleDescriptor descriptor - = ModuleDescriptor.module(moduleName) - .requires("java.base") - .requires(NASHORN_MODULE.getName()) - .contains(SCRIPTS_PKG) - .build(); + final ModuleDescriptor descriptor = + ModuleDescriptor.newModule(moduleName, Set.of(Modifier.SYNTHETIC)) + .requires(NASHORN_MODULE.getName()) + .packages(Set.of(SCRIPTS_PKG)) + .build(); final Module mod = Context.createModuleTrusted(descriptor, this); loadModuleManipulator(); diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java index 6f2ee8cd7b8..8b324246e23 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java @@ -176,6 +176,8 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { final int index = getIndex((Number)key); if (index > -1) { return ((JSObject)jsobj).getSlot(index); + } else { + return ((JSObject)jsobj).getMember(JSType.toString(key)); } } else if (isString(key)) { final String name = key.toString(); @@ -193,7 +195,12 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { if (key instanceof Integer) { ((JSObject)jsobj).setSlot((Integer)key, value); } else if (key instanceof Number) { - ((JSObject)jsobj).setSlot(getIndex((Number)key), value); + final int index = getIndex((Number)key); + if (index > -1) { + ((JSObject)jsobj).setSlot(index, value); + } else { + ((JSObject)jsobj).setMember(JSType.toString(key), value); + } } else if (isString(key)) { ((JSObject)jsobj).setMember(key.toString(), value); } diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JavaAdapterClassLoader.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JavaAdapterClassLoader.java index a488e6cd4cb..06f035c4b5e 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JavaAdapterClassLoader.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JavaAdapterClassLoader.java @@ -27,7 +27,6 @@ package jdk.nashorn.internal.runtime.linker; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.lang.reflect.Module; import java.security.AccessControlContext; import java.security.AccessController; import java.security.PrivilegedAction; @@ -115,7 +114,11 @@ final class JavaAdapterClassLoader { @Override public Class loadClass(final String name, final boolean resolve) throws ClassNotFoundException { try { - Context.checkPackageAccess(name); + final int i = name.lastIndexOf('.'); + if(i != -1){ + final String pkgName = name.substring(0,i); + Context.checkPackageAccess(pkgName); + } return super.loadClass(name, resolve); } catch (final SecurityException se) { // we may be implementing an interface or extending a class that was diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/scripts/ModuleGraphManipulator.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/scripts/ModuleGraphManipulator.java index b3e165ad226..72e0be1d255 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/scripts/ModuleGraphManipulator.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/scripts/ModuleGraphManipulator.java @@ -25,7 +25,6 @@ package jdk.nashorn.internal.scripts; -import java.lang.reflect.Module; import jdk.nashorn.api.scripting.JSObject; /** diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/module-info.java b/nashorn/src/jdk.scripting.nashorn/share/classes/module-info.java index 83b41891f51..a73f3a57552 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/module-info.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/module-info.java @@ -24,77 +24,128 @@ */ /** -

                    -Nashorn is a runtime environment for programs written in ECMAScript 5.1. -

                    -

                    Usage

                    -The recommended way to use Nashorn is through the JSR-223 -"Scripting for the Java Platform" APIs found in the {@link javax.script} package. Usually, you'll obtain a -{@link javax.script.ScriptEngine} instance for Nashorn using: -
                    + * Provides the implementation of Nashorn script engine and
                    + * the runtime environment for programs written in ECMAScript 5.1.
                    + * 

                    + * Nashorn is a runtime environment for programs written in ECMAScript 5.1. + *

                    + * + *

                    Usage

                    + * + * The recommended way to use Nashorn is through the + * JSR-223 + * "Scripting for the Java Platform" APIs found in the + * {@link javax.script} package. Usually, you'll obtain a + * {@link javax.script.ScriptEngine} instance for Nashorn using: + *
                     import javax.script.*;
                     ...
                     ScriptEngine nashornEngine = new ScriptEngineManager().getEngineByName("nashorn");
                     
                    -and then use it just as you would any other JSR-223 script engine. See -{@code jdk.nashorn.api.scripting} package -for details. -

                    Compatibility

                    -Nashorn is 100% compliant with the ECMA-262 Standard, Edition 5.1. It requires a Java Virtual Machine that implements the -JSR-292 "Supporting Dynamically Typed Languages on the Java -Platform" specification (often referred to as "invokedynamic"), as well as the already mentioned JSR-223. -

                    Interoperability with the Java platform

                    -In addition to being a 100% ECMAScript 5.1 runtime, Nashorn provides features for interoperability of the ECMAScript -programs with the Java platform. In general, any Java object put into the script engine's context will be visible from -the script. In terms of the standard, such Java objects are not considered "native objects", but rather "host objects", -as defined in section 4.3.8. This distinction allows certain semantical differences in handling them compared to native -objects. For most purposes, Java objects behave just as native objects do: you can invoke their methods, get and set -their properties. In most cases, though, you can't add arbitrary properties to them, nor can you remove existing -properties. -

                    Java collection handling

                    -Native Java arrays and {@link java.util.List}s support indexed access to their elements through the property accessors, -and {@link java.util.Map}s support both property and element access through both dot and square-bracket property -accessors, with the difference being that dot operator gives precedence to object properties (its fields and properties -defined as {@code getXxx} and {@code setXxx} methods) while the square bracket operator gives precedence to map -elements. Native Java arrays expose the {@code length} property. -

                    ECMAScript primitive types

                    -ECMAScript primitive types for number, string, and boolean are represented with {@link java.lang.Number}, -{@link java.lang.CharSequence}, and {@link java.lang.Boolean} objects. While the most often used number type is -{@link java.lang.Double} and the most often used string type is {@link java.lang.String}, don't rely on it as various -internal optimizations cause other subclasses of {@code Number} and internal implementations of {@code CharSequence} to -be used. -

                    Type conversions

                    -When a method on a Java object is invoked, the arguments are converted to the formal parameter types of the Java method -using all allowed ECMAScript conversions. This can be surprising, as in general, conversions from string to number will -succeed according to Standard's section 9.3 "ToNumber" and so on; string to boolean, number to boolean, Object to -number, Object to string all work. Note that if the Java method's declared parameter type is {@code java.lang.Object}, -Nashorn objects are passed without any conversion whatsoever; specifically if the JavaScript value being passed is of -primitive string type, you can only rely on it being a {@code java.lang.CharSequence}, and if the value is a number, you -can only rely on it being a {@code java.lang.Number}. If the Java method declared parameter type is more specific (e.g. -{@code java.lang.String} or {@code java.lang.Double}), then Nashorn will of course ensure the required type is passed. -

                    SAM types

                    -As a special extension when invoking Java methods, ECMAScript function objects can be passed in place of an argument -whose Java type is so-called "single abstract method" or "SAM" type. While this name usually covers single-method -interfaces, Nashorn is a bit more versatile, and it recognizes a type as a SAM type if all its abstract methods are -overloads of the same name, and it is either an interface, or it is an abstract class with -a no-arg constructor. The type itself must be public, while the constructor and the methods can be either public or -protected. If there are multiple abstract overloads of the same name, the single function will serve as the shared -implementation for all of them, and additionally it will also override any non-abstract methods of the same name. -This is done to be consistent with the fact that ECMAScript does not have the concept of overloaded methods. -

                    The {@code Java} object

                    -Nashorn exposes a non-standard global object named {@code Java} that is the primary API entry point into Java -platform-specific functionality. You can use it to create instances of Java classes, convert from Java arrays to native -arrays and back, and so on. -

                    Other non-standard built-in objects

                    -In addition to {@code Java}, Nashorn also exposes some other non-standard built-in objects: -{@code JSAdapter}, {@code JavaImporter}, {@code Packages} + * + * and then use it just as you would any other JSR-223 script engine. See + * + * {@code jdk.nashorn.api.scripting} package for details. + *

                    Compatibility

                    + * Nashorn is 100% compliant with the + * ECMA-262 Standard, Edition 5.1. + * It requires a Java Virtual Machine that implements the + * + * JSR-292 "Supporting Dynamically Typed Languages on the Java Platform" + * specification (often referred to as "invokedynamic"), as well as + * the already mentioned JSR-223. + * + *

                    Interoperability with the Java platform

                    + * + * In addition to being a 100% ECMAScript 5.1 runtime, Nashorn provides features + * for interoperability of the ECMAScript programs with the Java platform. + * In general, any Java object put into the script engine's context will be + * visible from the script. In terms of the standard, such Java objects are not + * considered "native objects", but rather "host objects", as defined in + * section 4.3.8. This distinction allows certain semantical differences + * in handling them compared to native objects. For most purposes, Java objects + * behave just as native objects do: you can invoke their methods, get and set + * their properties. In most cases, though, you can't add arbitrary properties + * to them, nor can you remove existing properties. + * + *

                    Java collection handling

                    + * + * Native Java arrays and {@link java.util.List}s support indexed access to + * their elements through the property accessors, and {@link java.util.Map}s + * support both property and element access through both dot and square-bracket + * property accessors, with the difference being that dot operator gives + * precedence to object properties (its fields and properties defined as + * {@code getXxx} and {@code setXxx} methods) while the square bracket + * operator gives precedence to map elements. Native Java arrays expose + * the {@code length} property. + * + *

                    ECMAScript primitive types

                    + * + * ECMAScript primitive types for number, string, and boolean are represented + * with {@link java.lang.Number}, {@link java.lang.CharSequence}, and + * {@link java.lang.Boolean} objects. While the most often used number type + * is {@link java.lang.Double} and the most often used string type is + * {@link java.lang.String}, don't rely on it as various internal optimizations + * cause other subclasses of {@code Number} and internal implementations of + * {@code CharSequence} to be used. + * + *

                    Type conversions

                    + * + * When a method on a Java object is invoked, the arguments are converted to + * the formal parameter types of the Java method using all allowed ECMAScript + * conversions. This can be surprising, as in general, conversions from string + * to number will succeed according to Standard's section 9.3 "ToNumber" + * and so on; string to boolean, number to boolean, Object to number, + * Object to string all work. Note that if the Java method's declared parameter + * type is {@code java.lang.Object}, Nashorn objects are passed without any + * conversion whatsoever; specifically if the JavaScript value being passed + * is of primitive string type, you can only rely on it being a + * {@code java.lang.CharSequence}, and if the value is a number, you can only + * rely on it being a {@code java.lang.Number}. If the Java method declared + * parameter type is more specific (e.g. {@code java.lang.String} or + * {@code java.lang.Double}), then Nashorn will of course ensure + * the required type is passed. + * + *

                    SAM types

                    + * + * As a special extension when invoking Java methods, ECMAScript function + * objects can be passed in place of an argument whose Java type is so-called + * "single abstract method" or "SAM" type. While this name usually covers + * single-method interfaces, Nashorn is a bit more versatile, and it + * recognizes a type as a SAM type if all its abstract methods are + * overloads of the same name, and it is either an interface, or it is an + * abstract class with a no-arg constructor. The type itself must be public, + * while the constructor and the methods can be either public or protected. + * If there are multiple abstract overloads of the same name, the single + * function will serve as the shared implementation for all of them, + * and additionally it will also override any non-abstract methods of + * the same name. This is done to be consistent with the fact that + * ECMAScript does not have the concept of overloaded methods. + * + *

                    The {@code Java} object

                    + * + * Nashorn exposes a non-standard global object named {@code Java} that is + * the primary API entry point into Java platform-specific functionality. + * You can use it to create instances of Java classes, convert from Java arrays + * to native arrays and back, and so on. + * + *

                    Other non-standard built-in objects

                    + * + * In addition to {@code Java}, Nashorn also exposes some other + * non-standard built-in objects: + * {@code JSAdapter}, {@code JavaImporter}, {@code Packages} + * + * @provides javax.script.ScriptEngineFactory + * @moduleGraph + * @since 9 */ module jdk.scripting.nashorn { requires java.logging; - requires transitive java.scripting; requires jdk.dynalink; + requires transitive java.scripting; + exports jdk.nashorn.api.scripting; exports jdk.nashorn.api.tree; @@ -105,9 +156,9 @@ module jdk.scripting.nashorn { exports jdk.nashorn.tools to jdk.scripting.nashorn.shell; - provides javax.script.ScriptEngineFactory - with jdk.nashorn.api.scripting.NashornScriptEngineFactory; + provides javax.script.ScriptEngineFactory with + jdk.nashorn.api.scripting.NashornScriptEngineFactory; - provides jdk.dynalink.linker.GuardingDynamicLinkerExporter - with jdk.nashorn.api.linker.NashornLinkerExporter; + provides jdk.dynalink.linker.GuardingDynamicLinkerExporter with + jdk.nashorn.api.linker.NashornLinkerExporter; } diff --git a/nashorn/test/TEST.ROOT b/nashorn/test/TEST.ROOT index 08e6c7f53f2..2c826e5b639 100644 --- a/nashorn/test/TEST.ROOT +++ b/nashorn/test/TEST.ROOT @@ -8,7 +8,10 @@ keys=intermittent randomness groups=TEST.groups # Minimum jtreg version -requiredVersion=4.2 b04 +requiredVersion=4.2 b07 # Use new module options useNewOptions=true + +# Use --patch-module instead of -Xmodule: +useNewPatchModule=true diff --git a/nashorn/test/script/basic/JDK-8150218.js b/nashorn/test/script/basic/JDK-8150218.js index 72dffa2cd6f..6263a0fcd3f 100644 --- a/nashorn/test/script/basic/JDK-8150218.js +++ b/nashorn/test/script/basic/JDK-8150218.js @@ -1,21 +1,21 @@ /* - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute it and/or modify it * 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. diff --git a/nashorn/test/script/basic/JDK-8170594.js b/nashorn/test/script/basic/JDK-8170594.js index 6365500aafd..7f74e9803c4 100644 --- a/nashorn/test/script/basic/JDK-8170594.js +++ b/nashorn/test/script/basic/JDK-8170594.js @@ -1,21 +1,21 @@ /* - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute it and/or modify it * 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. diff --git a/nashorn/test/script/basic/JDK-8171849.js b/nashorn/test/script/basic/JDK-8171849.js index febc97cee11..cce68742e6e 100644 --- a/nashorn/test/script/basic/JDK-8171849.js +++ b/nashorn/test/script/basic/JDK-8171849.js @@ -1,21 +1,21 @@ /* - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute it and/or modify it * 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. diff --git a/nashorn/test/script/basic/JDK-8176511.js b/nashorn/test/script/basic/JDK-8176511.js new file mode 100644 index 00000000000..08fbd551ddb --- /dev/null +++ b/nashorn/test/script/basic/JDK-8176511.js @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8176511: JSObject property access is broken for numeric keys outside the int range + * + * @test + * @run + */ + + +var reassignWithNewGlobal = loadWithNewGlobal({ + script: '(function (o, i) { o[i] = o[i]; })', name: 'internal.js' + +}); + +function test(i) { + var o = {}; + o[i] = true; + var before = JSON.stringify(o); + reassignWithNewGlobal(o, i); + var after = JSON.stringify(o); + Assert.assertEquals(before, after); +} + +test(-2147483649); +test(-2147483648); +test(2147483647); +test(2147483648); + diff --git a/jdk/test/demo/jvmti/gctest/Gctest.java b/nashorn/test/script/basic/es6/JDK-8156743.js similarity index 52% rename from jdk/test/demo/jvmti/gctest/Gctest.java rename to nashorn/test/script/basic/es6/JDK-8156743.js index 2683cf2bc89..d44b8476a6c 100644 --- a/jdk/test/demo/jvmti/gctest/Gctest.java +++ b/nashorn/test/script/basic/es6/JDK-8156743.js @@ -1,51 +1,75 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. - * + * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). - * + * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * + * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ - -/* @test - * @bug 5027764 - * @summary Test jvmti demo gctest +/** + * JDK-8156743: ES6 for..of should work for Java Maps and Sets * - * @compile ../DemoRun.java - * @build BigHello Gctest - * @run main Gctest BigHello + * @test + * @run + * @option --language=es6 */ -public class Gctest { +var map = new Map([ + [1, 'one'], + [2, 'two'], + [3, 'three'] +]); - public static void main(String args[]) throws Exception { - DemoRun demo; +var set = new Set(['red', 'green', 'blue']); - /* Run demo that uses JVMTI gctest agent (no options) */ - demo = new DemoRun("gctest", "" /* options to gctest */ ); - demo.runit(args[0]); +var HashMap = Java.type("java.util.HashMap"); +var jmap = new HashMap(); +jmap.put(1, 'one'); +jmap.put(2, 'two'); +jmap.put(3, 'three'); - /* Make sure patterns in output look ok */ - if (demo.output_contains("ERROR")) { - throw new RuntimeException("Test failed - ERROR seen in output"); - } +var HashSet = Java.type("java.util.HashSet"); +var jset = new HashSet(); +jset.add('red'); +jset.add('green'); +jset.add('blue'); - /* Must be a pass. */ - System.out.println("Test passed - cleanly terminated"); - } +for(var keyvalue of map){ + print(keyvalue[0],keyvalue[1]); } + +for(var keyvalue of jmap){ + print(keyvalue[0],keyvalue[1]); +} + +for(var keyvalue of map){ + print(keyvalue); +} + +for(var keyvalue of jmap){ + print(keyvalue); +} + +for(var element of set){ + print(element); +} + +for(var element of jset){ + print(element); +} + diff --git a/nashorn/test/script/basic/es6/JDK-8156743.js.EXPECTED b/nashorn/test/script/basic/es6/JDK-8156743.js.EXPECTED new file mode 100644 index 00000000000..80c8bb7ca20 --- /dev/null +++ b/nashorn/test/script/basic/es6/JDK-8156743.js.EXPECTED @@ -0,0 +1,18 @@ +1 one +2 two +3 three +1 one +2 two +3 three +1,one +2,two +3,three +1,one +2,two +3,three +red +green +blue +red +green +blue diff --git a/nashorn/test/script/basic/es6/JDK-8168373.js b/nashorn/test/script/basic/es6/JDK-8168373.js index af26e73533e..56d58b7da35 100644 --- a/nashorn/test/script/basic/es6/JDK-8168373.js +++ b/nashorn/test/script/basic/es6/JDK-8168373.js @@ -1,21 +1,21 @@ /* - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute it and/or modify it * 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. @@ -36,8 +36,8 @@ function r(x) { return x } // "read" try { // Try creates control flow edges from assignments into catch blocks. // Lexically scoped, never read int variable (undefined at catch block) but still with a cf edge into catch block. // Since it's never read, it's not written either (Nashorn optimizes some dead writes). - let x = 0; - if (p()) { throw {}; } // We need `p()` so this block doesn't get optimized away, for possibility of a `throw` + let x = 0; + if (p()) { throw {}; } // We need `p()` so this block doesn't get optimized away, for possibility of a `throw` x = 0.0; // change the type of x to double r(x); // read x otherwise it's optimized away } catch (e) {} // under the bug, "throw" will try to widen unwritten int x to double for here and cause a verifier error diff --git a/nashorn/test/src/jdk/nashorn/test/models/Reflector.java b/nashorn/test/src/jdk/nashorn/test/models/Reflector.java index 9722694bab0..72f2938d0d4 100644 --- a/nashorn/test/src/jdk/nashorn/test/models/Reflector.java +++ b/nashorn/test/src/jdk/nashorn/test/models/Reflector.java @@ -29,7 +29,6 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Executable; import java.lang.reflect.Field; import java.lang.reflect.Method; -import java.lang.reflect.Module; import jdk.nashorn.internal.runtime.Context; /** diff --git a/test/TestCommon.gmk b/test/TestCommon.gmk index 4aecf79a0fb..4529d7375a6 100644 --- a/test/TestCommon.gmk +++ b/test/TestCommon.gmk @@ -370,7 +370,7 @@ endif # Give tests access to JT_JAVA, see JDK-8141609 JTREG_BASIC_OPTIONS += -e:JDK8_HOME=${JT_JAVA} # Set other vm and test options -JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_OPTIONS:%=-vmoption:%) $(JAVA_VM_ARGS:%=-vmoption:%) +JTREG_TEST_OPTIONS += $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_OPTIONS:%=-vmoption:%) $(JAVA_VM_ARGS:%=-vmoption:%) ifeq ($(IGNORE_MARKED_TESTS), true) # Option to tell jtreg to not run tests marked with "ignore" diff --git a/test/lib/RedefineClassHelper.java b/test/lib/RedefineClassHelper.java index 75768092365..2c236907a7a 100644 --- a/test/lib/RedefineClassHelper.java +++ b/test/lib/RedefineClassHelper.java @@ -23,7 +23,7 @@ import java.io.PrintWriter; import java.lang.instrument.*; -import jdk.test.lib.InMemoryJavaCompiler; +import jdk.test.lib.compiler.InMemoryJavaCompiler; /* * Helper class to write tests that redefine classes. diff --git a/test/lib/jdk/test/lib/wrappers/InfiniteLoop.java b/test/lib/jdk/test/lib/InfiniteLoop.java similarity index 98% rename from test/lib/jdk/test/lib/wrappers/InfiniteLoop.java rename to test/lib/jdk/test/lib/InfiniteLoop.java index dbee901f8c0..15097b66ff5 100644 --- a/test/lib/jdk/test/lib/wrappers/InfiniteLoop.java +++ b/test/lib/jdk/test/lib/InfiniteLoop.java @@ -21,7 +21,7 @@ * questions. */ -package jdk.test.lib.wrappers; +package jdk.test.lib; import java.util.Objects; diff --git a/test/lib/jdk/test/lib/wrappers/TimeLimitedRunner.java b/test/lib/jdk/test/lib/TimeLimitedRunner.java similarity index 99% rename from test/lib/jdk/test/lib/wrappers/TimeLimitedRunner.java rename to test/lib/jdk/test/lib/TimeLimitedRunner.java index 73d53b43b12..cea92f34405 100644 --- a/test/lib/jdk/test/lib/wrappers/TimeLimitedRunner.java +++ b/test/lib/jdk/test/lib/TimeLimitedRunner.java @@ -21,7 +21,7 @@ * questions. */ -package jdk.test.lib.wrappers; +package jdk.test.lib; import java.util.Objects; import java.util.concurrent.Callable; diff --git a/test/lib/jdk/test/lib/apps/LingeredApp.java b/test/lib/jdk/test/lib/apps/LingeredApp.java index 8632a835695..22a123ccbb5 100644 --- a/test/lib/jdk/test/lib/apps/LingeredApp.java +++ b/test/lib/jdk/test/lib/apps/LingeredApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, 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 @@ -143,7 +143,7 @@ public class LingeredApp { if (appProcess == null) { throw new RuntimeException("Process is not alive"); } - return appProcess.getPid(); + return appProcess.pid(); } /** diff --git a/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java b/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java index f794ef36090..8c574875f8a 100644 --- a/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java +++ b/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java @@ -199,6 +199,10 @@ public abstract class CommandLineOptionTest { throws Throwable { List finalOptions = new ArrayList<>(); finalOptions.add(CommandLineOptionTest.getVMTypeOption()); + String extraFlagForEmulated = CommandLineOptionTest.getVMTypeOptionForEmulated(); + if (extraFlagForEmulated != null) { + finalOptions.add(extraFlagForEmulated); + } Collections.addAll(finalOptions, options); CommandLineOptionTest.verifyJVMStartup(expectedMessages, @@ -390,6 +394,10 @@ public abstract class CommandLineOptionTest { String... additionalVMOpts) throws Throwable { List finalOptions = new ArrayList<>(); finalOptions.add(CommandLineOptionTest.getVMTypeOption()); + String extraFlagForEmulated = CommandLineOptionTest.getVMTypeOptionForEmulated(); + if (extraFlagForEmulated != null) { + finalOptions.add(extraFlagForEmulated); + } Collections.addAll(finalOptions, additionalVMOpts); CommandLineOptionTest.verifyOptionValue(optionName, expectedValue, @@ -497,6 +505,18 @@ public abstract class CommandLineOptionTest { throw new RuntimeException("Unknown VM mode."); } + /** + * @return addtional VMoptions(Emulated related) required to start a new VM with the same type as current. + */ + private static String getVMTypeOptionForEmulated() { + if (Platform.isServer() && !Platform.isEmulatedClient()) { + return "-XX:-NeverActAsServerClassMachine"; + } else if (Platform.isEmulatedClient()) { + return "-XX:+NeverActAsServerClassMachine"; + } + return null; + } + private final BooleanSupplier predicate; /** diff --git a/test/lib/jdk/test/lib/InMemoryJavaCompiler.java b/test/lib/jdk/test/lib/compiler/InMemoryJavaCompiler.java similarity index 74% rename from test/lib/jdk/test/lib/InMemoryJavaCompiler.java rename to test/lib/jdk/test/lib/compiler/InMemoryJavaCompiler.java index 5fb78e4441f..e174b320180 100644 --- a/test/lib/jdk/test/lib/InMemoryJavaCompiler.java +++ b/test/lib/jdk/test/lib/compiler/InMemoryJavaCompiler.java @@ -21,14 +21,16 @@ * questions. */ -package jdk.test.lib; +package jdk.test.lib.compiler; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URI; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import javax.tools.ForwardingJavaFileManager; import javax.tools.FileObject; @@ -37,6 +39,7 @@ import javax.tools.JavaCompiler.CompilationTask; import javax.tools.JavaFileObject; import javax.tools.JavaFileObject.Kind; import javax.tools.SimpleJavaFileObject; +import javax.tools.StandardLocation; import javax.tools.ToolProvider; /** @@ -53,7 +56,7 @@ import javax.tools.ToolProvider; * *
                      * {@code
                    - * import jdk.test.lib.InMemoryJavaCompiler;
                    + * import jdk.test.lib.compiler.InMemoryJavaCompiler;
                      * import jdk.test.lib.ByteClassLoader;
                      *
                      * class Example {
                    @@ -104,11 +107,24 @@ public class InMemoryJavaCompiler {
                         }
                     
                         private static class FileManagerWrapper extends ForwardingJavaFileManager {
                    -        private MemoryJavaFileObject file;
                    +        private static final Location PATCH_LOCATION = new Location() {
                    +            @Override
                    +            public String getName() {
                    +                return "patch module location";
                    +            }
                     
                    -        public FileManagerWrapper(MemoryJavaFileObject file) {
                    +            @Override
                    +            public boolean isOutputLocation() {
                    +                return false;
                    +            }
                    +        };
                    +        private final MemoryJavaFileObject file;
                    +        private final String moduleOverride;
                    +
                    +        public FileManagerWrapper(MemoryJavaFileObject file, String moduleOverride) {
                                 super(getCompiler().getStandardFileManager(null, null, null));
                                 this.file = file;
                    +            this.moduleOverride = moduleOverride;
                             }
                     
                             @Override
                    @@ -121,6 +137,28 @@ public class InMemoryJavaCompiler {
                                 }
                                 return file;
                             }
                    +
                    +        @Override
                    +        public Location getLocationForModule(Location location, JavaFileObject fo) throws IOException {
                    +            if (fo == file && moduleOverride != null) {
                    +                return PATCH_LOCATION;
                    +            }
                    +            return super.getLocationForModule(location, fo);
                    +        }
                    +
                    +        @Override
                    +        public String inferModuleName(Location location) throws IOException {
                    +            if (location == PATCH_LOCATION) {
                    +                return moduleOverride;
                    +            }
                    +            return super.inferModuleName(location);
                    +        }
                    +
                    +        @Override
                    +        public boolean hasLocation(Location location) {
                    +            return super.hasLocation(location) || location == StandardLocation.PATCH_MODULE_PATH;
                    +        }
                    +
                         }
                     
                         /**
                    @@ -148,6 +186,15 @@ public class InMemoryJavaCompiler {
                         }
                     
                         private static CompilationTask getCompilationTask(MemoryJavaFileObject file, String... options) {
                    -        return getCompiler().getTask(null, new FileManagerWrapper(file), null, Arrays.asList(options), null, Arrays.asList(file));
                    +        List opts = new ArrayList<>();
                    +        String moduleOverride = null;
                    +        for (String opt : options) {
                    +            if (opt.startsWith("-Xmodule:")) {
                    +                moduleOverride = opt.substring("-Xmodule:".length());
                    +            } else {
                    +                opts.add(opt);
                    +            }
                    +        }
                    +        return getCompiler().getTask(null, new FileManagerWrapper(file, moduleOverride), null, opts, null, Arrays.asList(file));
                         }
                     }
                    diff --git a/test/lib/jdk/test/lib/DynamicVMOption.java b/test/lib/jdk/test/lib/management/DynamicVMOption.java
                    similarity index 99%
                    rename from test/lib/jdk/test/lib/DynamicVMOption.java
                    rename to test/lib/jdk/test/lib/management/DynamicVMOption.java
                    index 17f545e126e..786f1d85b22 100644
                    --- a/test/lib/jdk/test/lib/DynamicVMOption.java
                    +++ b/test/lib/jdk/test/lib/management/DynamicVMOption.java
                    @@ -20,7 +20,8 @@
                      * or visit www.oracle.com if you need additional information or have any
                      * questions.
                      */
                    -package jdk.test.lib;
                    +
                    +package jdk.test.lib.management;
                     
                     import com.sun.management.HotSpotDiagnosticMXBean;
                     import java.lang.management.ManagementFactory;
                    diff --git a/test/lib/jdk/test/lib/process/ProcessTools.java b/test/lib/jdk/test/lib/process/ProcessTools.java
                    index 3f4bbb7fa79..5066efb7f1b 100644
                    --- a/test/lib/jdk/test/lib/process/ProcessTools.java
                    +++ b/test/lib/jdk/test/lib/process/ProcessTools.java
                    @@ -1,5 +1,5 @@
                     /*
                    - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
                    + * Copyright (c) 2013, 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
                    @@ -302,7 +302,7 @@ public final class ProcessTools {
                          * @return Process id
                          */
                         public static long getProcessId() throws Exception {
                    -        return ProcessHandle.current().getPid();
                    +        return ProcessHandle.current().pid();
                         }
                         /**
                          * Gets the array of strings containing input arguments passed to the VM
                    @@ -580,8 +580,8 @@ public final class ProcessTools {
                             }
                     
                             @Override
                    -        public long getPid() {
                    -            return p.getPid();
                    +        public long pid() {
                    +            return p.pid();
                             }
                     
                             @Override
                    diff --git a/test/lib/sun/hotspot/WhiteBox.java b/test/lib/sun/hotspot/WhiteBox.java
                    index 5a2b5078d4f..b04735febc1 100644
                    --- a/test/lib/sun/hotspot/WhiteBox.java
                    +++ b/test/lib/sun/hotspot/WhiteBox.java
                    @@ -453,7 +453,6 @@ public class WhiteBox {
                                                       Object[] packages);
                       public native void AddModuleExports(Object from_module, String pkg, Object to_module);
                       public native void AddReadsModule(Object from_module, Object source_module);
                    -  public native void AddModulePackage(Object module, String pkg);
                       public native void AddModuleExportsToAllUnnamed(Object module, String pkg);
                       public native void AddModuleExportsToAll(Object module, String pkg);
                       public native Object GetModuleByPackageName(Object ldr, String pkg);
                    diff --git a/test/make/TestMakeBase.gmk b/test/make/TestMakeBase.gmk
                    index 0bed3ea447c..60a7a6a3b67 100644
                    --- a/test/make/TestMakeBase.gmk
                    +++ b/test/make/TestMakeBase.gmk
                    @@ -1,5 +1,5 @@
                     #
                    -# Copyright (c) 2014, 2016, 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
                    @@ -179,7 +179,7 @@ test-vardep:
                     	test "some string value1" = "`$(CAT) $(VARDEP_DIR)/target-file`"
                     	test -e $(VARDEP_FLAG_FILE)
                             #
                    -        # Make the target file again and verify that the value is updated with 
                    +        # Make the target file again and verify that the value is updated with
                             # the new value
                             #
                     	$(SLEEP_ON_MAC)
                    @@ -340,6 +340,61 @@ $(eval $(call assert-equals, \
                         RelativePath, \
                     ))
                     
                    +################################################################################
                    +# Test ParseKeywordVariable
                    +
                    +KWBASE := APA=banan;GURKA=tomat;COUNT=1%202%203%204%205;SUM=1+2+3+4+5;MANY_WORDS=I have the best words.
                    +
                    +$(eval $(call ParseKeywordVariable, KWBASE, \
                    +    KEYWORDS := APA GURKA SUM, \
                    +    STRING_KEYWORDS := COUNT MANY_WORDS, \
                    +))
                    +
                    +$(eval $(call assert-equals, \
                    +    $(KWBASE_APA), \
                    +    banan, \
                    +    ParseKeywordVariable failed to parse APA, \
                    +))
                    +
                    +$(eval $(call assert-equals, \
                    +    $(KWBASE_COUNT), \
                    +    1 2 3 4 5, \
                    +    ParseKeywordVariable failed to parse COUNT, \
                    +))
                    +
                    +$(eval $(call assert-equals, \
                    +    $(KWBASE_SUM), \
                    +    1+2+3+4+5, \
                    +    ParseKeywordVariable failed to parse SUM, \
                    +))
                    +
                    +$(eval $(call assert-equals, \
                    +    $(KWBASE_MANY_WORDS), \
                    +    I have the best words., \
                    +    ParseKeywordVariable failed to parse MANY_WORDS, \
                    +))
                    +
                    +# Simulate variable set from command line by using "override"
                    +override KWBASE_WEIRD_GURKA := paprika
                    +KWBASE_WEIRD := ;;APA=banan;;;GURKA=apelsin;APA=skansen;;
                    +
                    +$(eval $(call ParseKeywordVariable, KWBASE_WEIRD, \
                    +    KEYWORDS := APA GURKA SUM, \
                    +    STRING_KEYWORDS := COUNT, \
                    +))
                    +
                    +$(eval $(call assert-equals, \
                    +    $(KWBASE_WEIRD_APA), \
                    +    skansen, \
                    +    ParseKeywordVariable failed to overwrite APA, \
                    +))
                    +
                    +$(eval $(call assert-equals, \
                    +    $(KWBASE_WEIRD_GURKA), \
                    +    paprika, \
                    +    ParseKeywordVariable failed to preserve GURKA, \
                    +))
                    +
                     ################################################################################
                     
                     all: $(TEST_TARGETS)